+2006-10-19 Alan Modra <amodra@bigpond.net.au>
+
+ * elf32-arm.c (bfd_elf32_arm_allocate_interworking_sect): Check,
+ don't set, glue section size.
+ (record_arm_to_thumb_glue): Set glue section size here.
+ (record_thumb_to_arm_glue): Likewise.
+ (bfd_elf32_arm_add_glue_sections_to_bfd): Formatting.
+ (bfd_elf32_arm_process_before_allocation): Ignore exluded sections.
+
2006-10-18 Roy Marples <uberlord@gentoo.org>
* elf64-sparc.c: Add FreeBSD support.
foo = bfd_alloc (globals->bfd_of_glue_owner, globals->arm_glue_size);
- s->size = globals->arm_glue_size;
+ BFD_ASSERT (s->size == globals->arm_glue_size);
s->contents = foo;
}
foo = bfd_alloc (globals->bfd_of_glue_owner, globals->thumb_glue_size);
- s->size = globals->thumb_glue_size;
+ BFD_ASSERT (s->size == globals->thumb_glue_size);
s->contents = foo;
}
struct bfd_link_hash_entry * bh;
struct elf32_arm_link_hash_table * globals;
bfd_vma val;
+ bfd_size_type size;
globals = elf32_arm_hash_table (link_info);
free (tmp_name);
if ((link_info->shared || globals->root.is_relocatable_executable))
- globals->arm_glue_size += ARM2THUMB_PIC_GLUE_SIZE;
+ size = ARM2THUMB_PIC_GLUE_SIZE;
else
- globals->arm_glue_size += ARM2THUMB_STATIC_GLUE_SIZE;
+ size = ARM2THUMB_STATIC_GLUE_SIZE;
+
+ s->size += size;
+ globals->arm_glue_size += size;
return myh;
}
free (tmp_name);
+ s->size += THUMB2ARM_GLUE_SIZE;
hash_table->thumb_glue_size += THUMB2ARM_GLUE_SIZE;
return;
/* Note: we do not include the flag SEC_LINKER_CREATED, as this
will prevent elf_link_input_bfd() from processing the contents
of this section. */
- flags = SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_CODE | SEC_READONLY;
+ flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY
+ | SEC_CODE | SEC_READONLY);
sec = bfd_make_section_with_flags (abfd,
ARM2THUMB_GLUE_SECTION_NAME,
if (sec == NULL)
{
- flags = SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY
- | SEC_CODE | SEC_READONLY;
+ flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY
+ | SEC_CODE | SEC_READONLY);
sec = bfd_make_section_with_flags (abfd,
THUMB2ARM_GLUE_SECTION_NAME,
if (sec->reloc_count == 0)
continue;
+ if ((sec->flags & SEC_EXCLUDE) != 0)
+ continue;
+
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
/* Load the relocs. */
+2006-10-19 Alan Modra <amodra@bigpond.net.au>
+
+ * emultempl/armelf.em (arm_elf_before_allocation): Run
+ gld${EMULATION_NAME}_before_allocation later.
+ * ldlang.c (lang_size_sections_1): Revert 2006-09-15 change.
+
2006-10-18 Roy Marples <uberlord@gentoo.org>
- * emulparams/elf64_sparc_fbsd.sh (OUTPUT_FORMAT): Define as elf64-sparc-freebsd.
+ * emulparams/elf64_sparc_fbsd.sh (OUTPUT_FORMAT): Define as
+ elf64-sparc-freebsd.
2006-10-18 Joseph Myers <joseph@codesourcery.com>
os->processed_vma = TRUE;
if (bfd_is_abs_section (os->bfd_section) || os->ignored)
- {
- if (os->bfd_section->size > 0)
- {
- /* PR ld/3107: Do not abort when a buggy linker script
- causes a non-empty section to be discarded. */
- if (bfd_is_abs_section (os->bfd_section))
- einfo (_("%P%X: internal error: attempting to take the size of the non-section *ABS*\n"));
- else
- einfo (_("%P: warning: discarding non-empty, well known section %A\n"),
- os->bfd_section);
- }
- }
+ /* Except for some special linker created sections,
+ no output section should change from zero size
+ after strip_excluded_output_sections. A non-zero
+ size on an ignored section indicates that some
+ input section was not sized early enough. */
+ ASSERT (os->bfd_section->size == 0);
else
{
dot = os->bfd_section->vma;