mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-21 04:42:53 +08:00
12b2843a6b
Trying to use the SEC_LINKER_CREATED section flag to determine whether a symbol is linker defined fails to work on targets like alpha that define special SEC_COMMON sections. These might contain symbols that originated in an object file. include/ * bfdlink.h (struct bfd_link_hash_entry): Comment non_ir_ref. Add linker_def. bfd/ * elflink.c (_bfd_elf_define_linkage_sym): Set linker_def. * linker.c (_bfd_generic_link_add_one_symbol): Clear linker_def for CDEF, DEF, DEFW, COM. ld/ * ldexp.c (exp_fold_tree_1 <etree_provide>): Test linker_def. ld/testsuite/ * ld-powerpc/sdabase.s, * ld-powerpc/sdabase.t, * ld-powerpc/sdabase.d: New test. * ld-powerpc/sdabase2.t, * ld-powerpc/sdabase2.d: New test. * ld-powerpc/powerpc.exp: Run them.
11 lines
197 B
Makefile
11 lines
197 B
Makefile
#source: sdabase.s
|
|
#as: -a32
|
|
#ld: -melf32ppc -T sdabase2.t
|
|
#objdump: -s
|
|
#target: powerpc*-*-*
|
|
|
|
.*: file format .*
|
|
|
|
Contents of section \.sdata:
|
|
0400 (00000400|00040000) (00000400|00040000) .*
|