From d01e2a23a35139d64687b473b93d7f39b54b9d56 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Wed, 11 Oct 2000 07:05:02 +0000 Subject: [PATCH] Revert 2000-10-07 link-once section symbol changes. --- bfd/ChangeLog | 2 ++ bfd/elf.c | 12 ++++++------ gas/ChangeLog | 4 ++++ gas/config/obj-elf.c | 15 --------------- 4 files changed, 12 insertions(+), 21 deletions(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 0376e8c4ee9..d9b016be91c 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,7 @@ 2000-10-11 Alan Modra + * elf.c (swap_out_syms): Revert 2000-10-07 changes. + * ieee.c (ieee_make_empty_symbol): Oops, bfd_zalloc needs another arg. 2000-10-10 Alan Modra diff --git a/bfd/elf.c b/bfd/elf.c index bc8dec7a275..f434fcf29b8 100644 --- a/bfd/elf.c +++ b/bfd/elf.c @@ -4352,10 +4352,11 @@ swap_out_syms (abfd, sttp, relocatable_p) flagword flags = syms[idx]->flags; int type; - /* Section symbols usually have no name. The exception is - link-once section symbols, which we make global. */ - if ((flags & (BSF_SECTION_SYM | BSF_GLOBAL)) == BSF_SECTION_SYM) - sym.st_name = 0; + if ((flags & BSF_SECTION_SYM) != 0) + { + /* Section symbols have no name. */ + sym.st_name = 0; + } else { sym.st_name = (unsigned long) _bfd_stringtab_add (stt, @@ -4462,8 +4463,7 @@ swap_out_syms (abfd, sttp, relocatable_p) type = (*bed->elf_backend_get_symbol_type) (&type_ptr->internal_elf_sym, type); if (flags & BSF_SECTION_SYM) - sym.st_info = ELF_ST_INFO ((flags & BSF_GLOBAL - ? STB_GLOBAL : STB_LOCAL), STT_SECTION); + sym.st_info = ELF_ST_INFO (STB_LOCAL, STT_SECTION); else if (bfd_is_com_section (syms[idx]->section)) sym.st_info = ELF_ST_INFO (STB_GLOBAL, type); else if (bfd_is_und_section (syms[idx]->section)) diff --git a/gas/ChangeLog b/gas/ChangeLog index bdd724e939a..23d4b7a525a 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,7 @@ +2000-10-11 Alan Modra + + * config/obj-elf.c (elf_frob_symbol): Revert 2000-10-07 change. + 2000-10-07 Alan Modra * config/tc-hppa.c (md_apply_fix): Remove plainly wrong assert. diff --git a/gas/config/obj-elf.c b/gas/config/obj-elf.c index 0f49ab6339f..4e7f3a36d06 100644 --- a/gas/config/obj-elf.c +++ b/gas/config/obj-elf.c @@ -1742,21 +1742,6 @@ elf_frob_symbol (symp, puntp) && S_IS_DEFINED (symp)) symbol_get_bfdsym (symp)->flags |= BSF_OBJECT; #endif - - if (symbol_section_p (symp)) - { - asection *symsec = S_GET_SEGMENT (symp); - - if ((bfd_get_section_flags (stdoutput, symsec) & SEC_LINK_ONCE) != 0 - || strncmp (segment_name (symsec), ".gnu.linkonce", - sizeof ".gnu.linkonce" - 1) == 0) - { - /* Make section syms global on ELF linkonce sections. - This way, any reference to the section symbol will - resolve to the section that actually stays in. */ - S_SET_EXTERNAL (symp); - } - } } void -- 2.30.2