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:H.J. Lu <hjl.tools@gmail.com> (cherry picked from commit 8be33827)
Loading
Please register or sign in to comment