diff options
author | Alan Modra <amodra@gmail.com> | 2003-02-04 12:34:08 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2003-02-04 12:34:08 +0000 |
commit | 68bfbfcc5aa8bda806bef9edf274059d6ad571fc (patch) | |
tree | 67e23bcd83a595235d03d491a88d7ec6ea7ef9f3 /gas | |
parent | f8bd30003a95f7b0d943688b21d3a5758e898674 (diff) | |
download | gdb-68bfbfcc5aa8bda806bef9edf274059d6ad571fc.zip gdb-68bfbfcc5aa8bda806bef9edf274059d6ad571fc.tar.gz gdb-68bfbfcc5aa8bda806bef9edf274059d6ad571fc.tar.bz2 |
bfd
* elf-bfd.h (enum elf_link_info_type): Remove.
(struct bfd_elf_section_data): Move sec_info_type, use_rela_p fields
to struct sec. Remove linkonce_p field.
(elf_linkonce_p): Delete.
(elf_discarded_section): Update for sec_info_type change.
* section.c (struct sec): Add sec_info_type, use_rela_p, has_tls_reloc,
flag11, flag12, flag13, flag14, flag15, flag16, flag20, flag24.
(ELF_INFO_TYPE_NONE): Define.
(ELF_INFO_TYPE_STABS): Define.
(ELF_INFO_TYPE_MERGE): Define.
(ELF_INFO_TYPE_EH_FRAME): Define.
(ELF_INFO_TYPE_JUST_SYMS): Define.
(STD_SECTION): Update struct sec initializer.
* ecoff.c (bfd_debug_section): Likewise.
* elf.c: Likewise. Update occurrences of sec_info_type and use_rela_p.
* elflink.h: Likewise.
* elf-eh-frame.c: Likewise.
* elf64-alpha.c: Likewise.
* elfxx-ia64.c: Likewise.
* elfxx-mips.c: Likewise.
* bfd-in2.h: Regenerate.
* elf32-sparc.c (sec_do_relax): Use elf_section_data macro rather than
referring to used_by_bfd.
* elf64-sparc.c (sec_do_relax): Likewise.
* elf64-mmix.c (mmix_elf_section_data): Likewise.
* elfxx-mips.c (mips_elf_section_data): Likewise.
* ieee.c (ieee_slurp_section_data): Use ieee_per_section macro.
(ieee_get_section_contents): Likewise.
(ieee_new_section_hook): Formatting.
(ieee_canonicalize_reloc): Remove commented out code.
* mmo.c (mmo_section_data): Define. Use throughout file.
* oasys.c (oasys_get_section_contents): Use oasys_per_section macro.
gas
* config/obj-elf.c (obj_elf_change_section): Set SEC_LINK_ONCE and
SEC_LINK_DUPLICATES_DISCARD directly rather than using elf_linkonce_p.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 5 | ||||
-rw-r--r-- | gas/config/obj-elf.c | 9 |
2 files changed, 10 insertions, 4 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index e4383bb..617e484 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2003-02-04 Alan Modra <amodra@bigpond.net.au> + + * config/obj-elf.c (obj_elf_change_section): Set SEC_LINK_ONCE and + SEC_LINK_DUPLICATES_DISCARD directly rather than using elf_linkonce_p. + 2003-02-02 Richard Sandiford <rsandifo@redhat.com> * config/tc-mips.c (enum small_ex_type): Remove. diff --git a/gas/config/obj-elf.c b/gas/config/obj-elf.c index 05d668f..6c15704 100644 --- a/gas/config/obj-elf.c +++ b/gas/config/obj-elf.c @@ -755,11 +755,12 @@ obj_elf_change_section (name, type, attr, entsize, group_name, linkonce, push) if (type == SHT_NOBITS) seg_info (sec)->bss = 1; + if (linkonce) + flags |= SEC_LINK_ONCE | SEC_LINK_DUPLICATES_DISCARD; bfd_set_section_flags (stdoutput, sec, flags); if (flags & SEC_MERGE) sec->entsize = entsize; elf_group_name (sec) = group_name; - elf_linkonce_p (sec) = linkonce; /* Add a symbol for this section to the symbol table. */ secsym = symbol_find (name); @@ -776,8 +777,8 @@ obj_elf_change_section (name, type, attr, entsize, group_name, linkonce, push) if (((old_sec->flags ^ flags) & (SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_CODE | SEC_EXCLUDE | SEC_SORT_ENTRIES | SEC_MERGE | SEC_STRINGS - | SEC_THREAD_LOCAL)) - || linkonce != elf_linkonce_p (sec)) + | SEC_LINK_ONCE | SEC_LINK_DUPLICATES_DISCARD + | SEC_THREAD_LOCAL))) as_warn (_("ignoring changed section attributes for %s"), name); if ((flags & SEC_MERGE) && old_sec->entsize != (unsigned) entsize) as_warn (_("ignoring changed section entity size for %s"), name); @@ -2037,7 +2038,7 @@ elf_frob_file () flags = SEC_READONLY | SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_GROUP; for (s = list.head[i]; s != NULL; s = elf_next_in_group (s)) - if (elf_linkonce_p (s) != ((flags & SEC_LINK_ONCE) != 0)) + if ((s->flags ^ flags) & SEC_LINK_ONCE) { flags |= SEC_LINK_ONCE | SEC_LINK_DUPLICATES_DISCARD; if (s != list.head[i]) |