mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-01-24 12:35:55 +08:00
89753bbf81
Note that we don't even warn if scripts adjust a symbol as in ld-elf/var1 and ld-scripts/pr14962. include/ * bfdlink.h (struct bfd_link_info): Add warn_multiple_definition. ld/ * ldexp.c (exp_fold_tree_1): Warn on script defining a symbol defined in an object file. * ldmain.c (multiple_definition): Heed info->warn_multiple_definition. * testsuite/ld-scripts/defined5.d: Expect a warning.
12 lines
295 B
Makefile
12 lines
295 B
Makefile
#ld: -Tdefined5.t
|
|
#warning: .*multiple definition of `defined'.*
|
|
#nm: -B
|
|
#xfail: [is_xcoff_format]
|
|
# xcoff outputs value of "defined" from the object file
|
|
|
|
# Check that a script can override an object file symbol, if multiple
|
|
# definitions are allowed. See pr12356.
|
|
#...
|
|
0+1000 D defined
|
|
#pass
|