bazel icon indicating copy to clipboard operation
bazel copied to clipboard

Fix test_cc_starlark_api_additional_inputs when used with lld.

Open benjaminp opened this issue 4 years ago • 1 comments

Unlike the GNU linkers, lld does not insert an absolute symbol for every version in the version script into the symbol table. Check the version script is working by instead assigning a particular symbol a version.

benjaminp avatar Nov 09 '21 00:11 benjaminp

Thank you for the review.

To hopefully answer both of your questions: The intention of this test appears to be to check that a linker script can be successfully passed using the additional_inputs flag to cc_common.link. The test was previous relying on the linker inserting a symbol from the version script into the binary regardless of whether any symbols were given that version. However, lld does not have this behavior. Therefore, I modified the test binary and linker script to assign a version to a specific symbol, f.

benjaminp avatar Feb 23 '22 17:02 benjaminp