Skip to content
Commit d16a1893 authored by H.J. Lu's avatar H.J. Lu
Browse files

ld: Add an LTO test for common symbol override



Linker checks if a symbol in an archive member is a real definition, not
common, before including the archive member in the link output so that
only a real definition in archive will override the common symbol in
object file.  Add an LTO test to verify that a real definition in archive
overrides the common symbol in object file.

	* testsuite/ld-plugin/common-1.c: New file.
	* testsuite/ld-plugin/definition-1.c: Likewise.
	* testsuite/ld-plugin/lto.exp: Run common tests.

Signed-off-by: default avatarH.J. Lu <hjl.tools@gmail.com>
(cherry picked from commit 8be33827)
parent 5824c288
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment