mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-15 04:31:49 +08:00
e1b5d517d1
When defining the section symbol, __start_FOO, for the section FOO: 1. Treat the common symbol, __start_FOO, in input object file as definition. 2. Clear verinfo.verdef. bfd/ PR ld/26094 * elflink.c (bfd_elf_define_start_stop): Handle common symbols. Clear verinfo.verdef. ld/ PR ld/26094 * testsuite/ld-elf/pr26094-1.ver: New fike. * testsuite/ld-elf/pr26094-1a.c: Likewise. * testsuite/ld-elf/pr26094-1a.rd: Likewise. * testsuite/ld-elf/pr26094-1b.c: Likewise. * testsuite/ld-elf/pr26094-1b.rd: Likewise. * testsuite/ld-elf/pr26094-1c.c: Likewise. * testsuite/ld-elf/shared.exp: Run ld/26094 tests.
8 lines
129 B
C
8 lines
129 B
C
char foo_data __attribute__(( section("FOO") )) = { 0 };
|
|
|
|
extern void * __start_FOO;
|
|
|
|
void * foo() {
|
|
return __start_FOO;
|
|
}
|