diff options
author | Alexandre Oliva <aoliva@redhat.com> | 2004-06-21 14:45:42 +0000 |
---|---|---|
committer | Alexandre Oliva <aoliva@redhat.com> | 2004-06-21 14:45:42 +0000 |
commit | aee6f5b4bd1c978694bede743979c0c4f560d46b (patch) | |
tree | a185bf850c2fe9563a1fbf0a89a5c6b981cddbe4 /bfd/elf32-frv.c | |
parent | 05576f107c90440f15fa8a03e009c3f541af0b75 (diff) | |
download | gdb-aee6f5b4bd1c978694bede743979c0c4f560d46b.zip gdb-aee6f5b4bd1c978694bede743979c0c4f560d46b.tar.gz gdb-aee6f5b4bd1c978694bede743979c0c4f560d46b.tar.bz2 |
bfd/ChangeLog:
* elf-bfd.h (struct elf_backend_data): Added
elf_backend_omit_section_dynsym.
(_bfd_elf_link_omit_section_dynsym): Declare.
* elf32-frv.c (_frvfdpic_link_omit_section_dynsym): New.
(elf_backend_omit_section_dynsym): Use it for frvfdpic.
* elflink.c (_bfd_elf_link_omit_section_dynsym): Split out of...
(_bfd_elf_link_renumber_dynsyms): ... this function.
* elfxx-target.h (elf_backend_omit_section_dynsym): Default to
_bfd_elf_link_omit_section_dynsym).
(elfNN_bed): Added elf_backend_omit_section_dynsym.
ld/ChangeLog:
* emulparams/elf32frvfd.sh (GENERATE_PIE_SCRIPT): Set to yes.
ld/testsuite/ChangeLog:
* ld-frv/fdpic-pie-1.d: Adjust for pie-specific link script.
* ld-frv/fdpic-pie-2.d: Likewise.
* ld-frv/fdpic-pie-6.d: Likewise.
* ld-frv/fdpic-pie-7.d: Likewise.
* ld-frv/fdpic-pie-8.d: Likewise.
* ld-frv/fdpic-shared-1.d: Likewise.
* ld-frv/fdpic-shared-2.d: Likewise.
* ld-frv/fdpic-shared-3.d: Likewise.
* ld-frv/fdpic-shared-4.d: Likewise.
* ld-frv/fdpic-shared-5.d: Likewise.
* ld-frv/fdpic-shared-6.d: Likewise.
* ld-frv/fdpic-shared-7.d: Likewise.
* ld-frv/fdpic-shared-8.d: Likewise.
* ld-frv/fdpic-shared-local-2.d: Likewise.
* ld-frv/fdpic-shared-local-8.d: Likewise.
Diffstat (limited to 'bfd/elf32-frv.c')
-rw-r--r-- | bfd/elf32-frv.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/bfd/elf32-frv.c b/bfd/elf32-frv.c index cf3195a..ad2c324 100644 --- a/bfd/elf32-frv.c +++ b/bfd/elf32-frv.c @@ -2685,6 +2685,30 @@ elf32_frv_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp) return TRUE; } +/* We need dynamic symbols for every section, since segments can + relocate independently. */ +static bfd_boolean +_frvfdpic_link_omit_section_dynsym (bfd *output_bfd ATTRIBUTE_UNUSED, + struct bfd_link_info *info + ATTRIBUTE_UNUSED, + asection *p ATTRIBUTE_UNUSED) +{ + switch (elf_section_data (p)->this_hdr.sh_type) + { + case SHT_PROGBITS: + case SHT_NOBITS: + /* If sh_type is yet undecided, assume it could be + SHT_PROGBITS/SHT_NOBITS. */ + case SHT_NULL: + return FALSE; + + /* There shouldn't be section relative relocations + against any other section. */ + default: + return TRUE; + } +} + /* Create a .got section, as well as its additional info field. This is almost entirely copied from elflink.c:_bfd_elf_create_got_section(). */ @@ -4825,4 +4849,7 @@ frv_elf_print_private_bfd_data (abfd, ptr) #undef elf_backend_default_use_rela_p #define elf_backend_default_use_rela_p 1 +#undef elf_backend_omit_section_dynsym +#define elf_backend_omit_section_dynsym _frvfdpic_link_omit_section_dynsym + #include "elf32-target.h" |