structure instead.
(coff_ppc_relocate_section): Remove unused variables. Make
fprintf strings and argument types correspond. Put before_addr in
DEBUG_RELOC ifdef.
+ (dump_toc): Make fprintf strings and argument types correspond.
+ (ppc_process_before_allocation): Remove unused variables. Always
+ return a value.
(ppc_reflo_reloc): Ifdef out.
(ppc_addr32nb_reloc): Ifdef out.
(ppc_coff_rtype2howto): Make fprintf strings and argument types
* peicode.h (pe_print_idata): Move otherwise unused variables into
the #ifdef where they are used. Always return a value.
- (pe_print_edata): Change fprintf strings and add cast to make
- fprintf strings correspond to actual types. Always return a
- value.
+ (pe_print_edata): Make fprintf strings and argument types
+ correspond. Always return a value.
(pe_print_pdata): Removed unused variable addr_value. Always
return a value.
(pe_print_reloc): Remove unused variable onaline. Make fprintf
- strings and arguments correspond. Always return a value.
+ strings and argument types correspond. Always return a value.
* elf32-ppc.c (ppc_elf_fake_sections): Return true.
(ppc_elf_finish_dynamic_symbol): Move definition of unused
* Makefile.in: Rebuild dependencies.
(HFILES): Add ns32k.h.
- * section.c (SEC_LINKER_MARK): Define.
+ * section.c (struct sec): Add linker_mark field. Change
+ user_set_vma and reloc_done to be single bit fields.
+ (STD_SECTION): Update accordingly.
* bfd-in2.h: Rebuild.
* aoutx.h (NAME(aout,final_link)): Mark sections included in the
link.
for (p = o->link_order_head; p != NULL; p = p->next)
{
if (p->type == bfd_indirect_link_order)
- p->u.indirect.section->flags |= SEC_LINKER_MARK;
+ p->u.indirect.section->linker_mark = true;
}
}
return false;
/* Relocate and write out the sections. These functions use the
- symbol map created by aout_link_write_symbols. SEC_LINKER_MARK
- will be set if these sections are to be included in the link,
- which will normally be the case. */
- if ((obj_textsec (input_bfd)->flags & SEC_LINKER_MARK) != 0)
+ symbol map created by aout_link_write_symbols. The linker_mark
+ field will be set if these sections are to be included in the
+ link, which will normally be the case. */
+ if (obj_textsec (input_bfd)->linker_mark)
{
if (! aout_link_input_section (finfo, input_bfd,
obj_textsec (input_bfd),
exec_hdr (input_bfd)->a_trsize))
return false;
}
- if ((obj_datasec (input_bfd)->flags & SEC_LINKER_MARK) != 0)
+ if (obj_datasec (input_bfd)->linker_mark)
{
if (! aout_link_input_section (finfo, input_bfd,
obj_datasec (input_bfd),
table. */
#define SEC_SORT_ENTRIES 0x80000
- /* A mark flag used by some of the linker backends. This
- should not be set by application code. */
-#define SEC_LINKER_MARK 0x100000
-
/* End of section flags. */
+ /* Some internal packed boolean fields. */
+
+ /* See the vma field. */
+ unsigned int user_set_vma : 1;
+
+ /* Whether relocations have been processed. */
+ unsigned int reloc_done : 1;
+
+ /* A mark flag used by some of the linker backends. */
+ unsigned int linker_mark : 1;
+
+ /* End of internal packed boolean fields. */
+
/* The virtual memory address of the section - where it will be
at run time. The symbols are relocated against this. The
user_set_vma flag is maintained by bfd; if it's not set, the
target and various flags). */
bfd_vma vma;
- boolean user_set_vma;
/* The load address of the section - where it would be in a
rom image; really only used for writing section header
bfd *owner;
- boolean reloc_done;
/* A symbol which points at this section only */
struct symbol_cache_entry *symbol;
struct symbol_cache_entry **symbol_ptr_ptr;
link. This will normally be every section. We need
to do this so that we can identify any sections which
the linker has decided to not include. */
- sec->flags |= SEC_LINKER_MARK;
+ sec->linker_mark = true;
if (info->strip == strip_none
|| info->strip == strip_some)
link. This will normally be every section. We need
to do this so that we can identify any sections which
the linker has decided to not include. */
- sec->flags |= SEC_LINKER_MARK;
+ sec->linker_mark = true;
if (info->strip == strip_none
|| info->strip == strip_some)
{
bfd_byte *contents;
- if ((o->flags & SEC_LINKER_MARK) == 0)
+ if (! o->linker_mark)
{
/* This section was omitted from the link. */
continue;
link. This will normally be every section. We need
to do this so that we can identify any sections which
the linker has decided to not include. */
- sec->flags |= SEC_LINKER_MARK;
+ sec->linker_mark = true;
if (info->relocateable)
o->reloc_count += sec->reloc_count;
/* Relocate the contents of each section. */
for (o = input_bfd->sections; o != NULL; o = o->next)
{
- if ((o->flags & SEC_LINKER_MARK) == 0)
+ if (! o->linker_mark)
{
/* This section was omitted from the link. */
continue;
. table. *}
.#define SEC_SORT_ENTRIES 0x80000
.
-. {* A mark flag used by some of the linker backends. This
-. should not be set by application code. *}
-.#define SEC_LINKER_MARK 0x100000
-.
. {* End of section flags. *}
.
+. {* Some internal packed boolean fields. *}
+.
+. {* See the vma field. *}
+. unsigned int user_set_vma : 1;
+.
+. {* Whether relocations have been processed. *}
+. unsigned int reloc_done : 1;
+.
+. {* A mark flag used by some of the linker backends. *}
+. unsigned int linker_mark : 1;
+.
+. {* End of internal packed boolean fields. *}
+.
. {* The virtual memory address of the section - where it will be
. at run time. The symbols are relocated against this. The
. user_set_vma flag is maintained by bfd; if it's not set, the
. target and various flags). *}
.
. bfd_vma vma;
-. boolean user_set_vma;
.
. {* The load address of the section - where it would be in a
. rom image; really only used for writing section header
.
. bfd *owner;
.
-. boolean reloc_done;
. {* A symbol which points at this section only *}
. struct symbol_cache_entry *symbol;
. struct symbol_cache_entry **symbol_ptr_ptr;
#define STD_SECTION(SEC, FLAGS, SYM, NAME, IDX) \
const asymbol * const SYM = (asymbol *) &global_syms[IDX]; \
const asection SEC = \
- { NAME, 0, 0, FLAGS, 0, false, 0, 0, 0, 0, (asection *) &SEC, \
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (boolean) 0, \
- (asymbol *) &global_syms[IDX], (asymbol **) &SYM, }
+ { NAME, 0, 0, FLAGS, 0, 0, 0, 0, 0, 0, 0, 0, (asection *) &SEC, \
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
+ (asymbol *) &global_syms[IDX], (asymbol **) &SYM, 0, 0 }
STD_SECTION (bfd_com_section, SEC_IS_COMMON, bfd_com_symbol,
BFD_COM_SECTION_NAME, 0);
link. This will normally be every section. We need
to do this so that we can identify any sections which
the linker has decided to not include. */
- sec->flags |= SEC_LINKER_MARK;
+ sec->linker_mark = true;
if (info->strip == strip_none
|| info->strip == strip_some)
{
bfd_byte *contents;
- if ((o->flags & SEC_LINKER_MARK) == 0)
+ if (! o->linker_mark)
{
/* This section was omitted from the link. */
continue;