Commit 89753bbf authored by Alan Modra's avatar Alan Modra
Browse files

Warn when a script redefines a symbol

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.
parent 93993f67
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment