mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-21 01:12:32 +08:00
bfd/
2006-12-07 H.J. Lu <hjl@gnu.org> PR ld/3666 * elflink.c (elf_link_add_object_symbols): Keep symbol visibility for symbols from discarded section. ld/testsuite/ 2006-12-07 H.J. Lu <hjl@gnu.org> PR ld/3666 * ld-elf/group3a.d: New file. * ld-elf/group3a.s: Likewise. * ld-elf/group3b.d: Likewise. * ld-elf/group3b.s: Likewise.
This commit is contained in:
parent
8c9343347a
commit
e5d080028d
@ -1,3 +1,9 @@
|
||||
2006-12-07 H.J. Lu <hjl@gnu.org>
|
||||
|
||||
PR ld/3666
|
||||
* elflink.c (elf_link_add_object_symbols): Keep symbol
|
||||
visibility for symbols from discarded section.
|
||||
|
||||
2006-12-06 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* elf64-alpha.c (elf64_alpha_merge_symbol_attribute): New function.
|
||||
|
@ -3682,12 +3682,10 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
|
||||
sec = bfd_abs_section_ptr;
|
||||
else if (sec->kept_section)
|
||||
{
|
||||
/* Symbols from discarded section are undefined, and have
|
||||
default visibility. */
|
||||
/* Symbols from discarded section are undefined. We keep
|
||||
its visibility. */
|
||||
sec = bfd_und_section_ptr;
|
||||
isym->st_shndx = SHN_UNDEF;
|
||||
isym->st_other = (STV_DEFAULT
|
||||
| (isym->st_other & ~ ELF_ST_VISIBILITY (-1)));
|
||||
}
|
||||
else if ((abfd->flags & (EXEC_P | DYNAMIC)) != 0)
|
||||
value -= sec->vma;
|
||||
|
@ -1,3 +1,11 @@
|
||||
2006-12-07 H.J. Lu <hjl@gnu.org>
|
||||
|
||||
PR ld/3666
|
||||
* ld-elf/group3a.d: New file.
|
||||
* ld-elf/group3a.s: Likewise.
|
||||
* ld-elf/group3b.d: Likewise.
|
||||
* ld-elf/group3b.s: Likewise.
|
||||
|
||||
2006-12-05 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* ld-alpha/tlspic.rd: Update for unused section removal.
|
||||
|
8
ld/testsuite/ld-elf/group3a.d
Normal file
8
ld/testsuite/ld-elf/group3a.d
Normal file
@ -0,0 +1,8 @@
|
||||
#source: group3a.s
|
||||
#source: group3b.s
|
||||
#ld: -T group.ld
|
||||
#readelf: -s
|
||||
Symbol table '.symtab' contains .* entries:
|
||||
#...
|
||||
.*: 0[0]*1000 0 OBJECT GLOBAL HIDDEN . foo
|
||||
#...
|
5
ld/testsuite/ld-elf/group3a.s
Normal file
5
ld/testsuite/ld-elf/group3a.s
Normal file
@ -0,0 +1,5 @@
|
||||
.section .data,"awG",%progbits,foo_group,comdat
|
||||
.globl foo
|
||||
.type foo,%object
|
||||
foo:
|
||||
.word 0
|
8
ld/testsuite/ld-elf/group3b.d
Normal file
8
ld/testsuite/ld-elf/group3b.d
Normal file
@ -0,0 +1,8 @@
|
||||
#source: group3b.s
|
||||
#source: group3a.s
|
||||
#ld: -T group.ld
|
||||
#readelf: -s
|
||||
Symbol table '.symtab' contains .* entries:
|
||||
#...
|
||||
.*: 0[0]*1000 0 OBJECT GLOBAL HIDDEN . foo
|
||||
#...
|
6
ld/testsuite/ld-elf/group3b.s
Normal file
6
ld/testsuite/ld-elf/group3b.s
Normal file
@ -0,0 +1,6 @@
|
||||
.section .data,"awG",%progbits,foo_group,comdat
|
||||
.hidden foo
|
||||
.globl foo
|
||||
.type foo,%object
|
||||
foo:
|
||||
.word 0
|
Loading…
Reference in New Issue
Block a user