[patch] Fix handling of common symbols with plugins

Rafael Espíndola rafael.espindola@gmail.com
Wed Sep 17 22:36:00 GMT 2014


>> The gold patch looks good to me. Thanks!

Pushed.

> Can you add an ld testcase to ld/testsuite/ld-plugin/lto.exp?

I don't think my patch changes the behavior of bfd-l, it is just a
cleanup. I applied Hal Finkel's patch to let ld work with llvm IR and
it passes the run.sh that I emailed earlier with or without my patch.

Having said that, while the size field is not useful for common
symbols, it might be just what is needed for coff's
COMDAT_SELECT_LARGEST. Do you know if that is implemented?

Thanks for mentioning tests. I decided to try to write one for gold. I
managed to write one that passes now but fails with my patch reverted,
but it uses readelf to check the alignment of .bss, is that OK?

Cheers,
Rafael

2014-09-17  Rafael Ávila de Espíndola <rafael.espindola@gmail.com>

        * testsuite/Makefile.am (plugin_test_10): New test.
        * testsuite/Makefile.in: Regenerate
        * testsuite/plugin_common_test_2.c (c1): Align to 8.
        * testsuite/plugin_test_10.sh: New file.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.patch
Type: text/x-patch
Size: 11927 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20140917/81001e5f/attachment.bin>


More information about the Binutils mailing list