mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-10-18 13:23:10 +08:00
bfd/
* 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. ld/ * 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.
This commit is contained in:
@ -1,3 +1,12 @@
|
|||||||
|
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>
|
2006-10-18 Roy Marples <uberlord@gentoo.org>
|
||||||
|
|
||||||
* elf64-sparc.c: Add FreeBSD support.
|
* elf64-sparc.c: Add FreeBSD support.
|
||||||
|
@ -2565,7 +2565,7 @@ bfd_elf32_arm_allocate_interworking_sections (struct bfd_link_info * info)
|
|||||||
|
|
||||||
foo = bfd_alloc (globals->bfd_of_glue_owner, globals->arm_glue_size);
|
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;
|
s->contents = foo;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2580,7 +2580,7 @@ bfd_elf32_arm_allocate_interworking_sections (struct bfd_link_info * info)
|
|||||||
|
|
||||||
foo = bfd_alloc (globals->bfd_of_glue_owner, globals->thumb_glue_size);
|
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;
|
s->contents = foo;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2600,6 +2600,7 @@ record_arm_to_thumb_glue (struct bfd_link_info * link_info,
|
|||||||
struct bfd_link_hash_entry * bh;
|
struct bfd_link_hash_entry * bh;
|
||||||
struct elf32_arm_link_hash_table * globals;
|
struct elf32_arm_link_hash_table * globals;
|
||||||
bfd_vma val;
|
bfd_vma val;
|
||||||
|
bfd_size_type size;
|
||||||
|
|
||||||
globals = elf32_arm_hash_table (link_info);
|
globals = elf32_arm_hash_table (link_info);
|
||||||
|
|
||||||
@ -2643,9 +2644,12 @@ record_arm_to_thumb_glue (struct bfd_link_info * link_info,
|
|||||||
free (tmp_name);
|
free (tmp_name);
|
||||||
|
|
||||||
if ((link_info->shared || globals->root.is_relocatable_executable))
|
if ((link_info->shared || globals->root.is_relocatable_executable))
|
||||||
globals->arm_glue_size += ARM2THUMB_PIC_GLUE_SIZE;
|
size = ARM2THUMB_PIC_GLUE_SIZE;
|
||||||
else
|
else
|
||||||
globals->arm_glue_size += ARM2THUMB_STATIC_GLUE_SIZE;
|
size = ARM2THUMB_STATIC_GLUE_SIZE;
|
||||||
|
|
||||||
|
s->size += size;
|
||||||
|
globals->arm_glue_size += size;
|
||||||
|
|
||||||
return myh;
|
return myh;
|
||||||
}
|
}
|
||||||
@ -2721,6 +2725,7 @@ record_thumb_to_arm_glue (struct bfd_link_info *link_info,
|
|||||||
|
|
||||||
free (tmp_name);
|
free (tmp_name);
|
||||||
|
|
||||||
|
s->size += THUMB2ARM_GLUE_SIZE;
|
||||||
hash_table->thumb_glue_size += THUMB2ARM_GLUE_SIZE;
|
hash_table->thumb_glue_size += THUMB2ARM_GLUE_SIZE;
|
||||||
|
|
||||||
return;
|
return;
|
||||||
@ -2748,7 +2753,8 @@ bfd_elf32_arm_add_glue_sections_to_bfd (bfd *abfd,
|
|||||||
/* Note: we do not include the flag SEC_LINKER_CREATED, as this
|
/* Note: we do not include the flag SEC_LINKER_CREATED, as this
|
||||||
will prevent elf_link_input_bfd() from processing the contents
|
will prevent elf_link_input_bfd() from processing the contents
|
||||||
of this section. */
|
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,
|
sec = bfd_make_section_with_flags (abfd,
|
||||||
ARM2THUMB_GLUE_SECTION_NAME,
|
ARM2THUMB_GLUE_SECTION_NAME,
|
||||||
@ -2767,8 +2773,8 @@ bfd_elf32_arm_add_glue_sections_to_bfd (bfd *abfd,
|
|||||||
|
|
||||||
if (sec == NULL)
|
if (sec == NULL)
|
||||||
{
|
{
|
||||||
flags = SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY
|
flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY
|
||||||
| SEC_CODE | SEC_READONLY;
|
| SEC_CODE | SEC_READONLY);
|
||||||
|
|
||||||
sec = bfd_make_section_with_flags (abfd,
|
sec = bfd_make_section_with_flags (abfd,
|
||||||
THUMB2ARM_GLUE_SECTION_NAME,
|
THUMB2ARM_GLUE_SECTION_NAME,
|
||||||
@ -2865,6 +2871,9 @@ bfd_elf32_arm_process_before_allocation (bfd *abfd,
|
|||||||
if (sec->reloc_count == 0)
|
if (sec->reloc_count == 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if ((sec->flags & SEC_EXCLUDE) != 0)
|
||||||
|
continue;
|
||||||
|
|
||||||
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
|
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
|
||||||
|
|
||||||
/* Load the relocs. */
|
/* Load the relocs. */
|
||||||
|
@ -1,6 +1,13 @@
|
|||||||
|
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>
|
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>
|
2006-10-18 Joseph Myers <joseph@codesourcery.com>
|
||||||
|
|
||||||
|
18
ld/ldlang.c
18
ld/ldlang.c
@ -4368,18 +4368,12 @@ lang_size_sections_1
|
|||||||
os->processed_vma = TRUE;
|
os->processed_vma = TRUE;
|
||||||
|
|
||||||
if (bfd_is_abs_section (os->bfd_section) || os->ignored)
|
if (bfd_is_abs_section (os->bfd_section) || os->ignored)
|
||||||
{
|
/* Except for some special linker created sections,
|
||||||
if (os->bfd_section->size > 0)
|
no output section should change from zero size
|
||||||
{
|
after strip_excluded_output_sections. A non-zero
|
||||||
/* PR ld/3107: Do not abort when a buggy linker script
|
size on an ignored section indicates that some
|
||||||
causes a non-empty section to be discarded. */
|
input section was not sized early enough. */
|
||||||
if (bfd_is_abs_section (os->bfd_section))
|
ASSERT (os->bfd_section->size == 0);
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dot = os->bfd_section->vma;
|
dot = os->bfd_section->vma;
|
||||||
|
Reference in New Issue
Block a user