Given foo = 0 foo = foo + 256 the gas in freebsd produces [ 5] .symtab SYMTAB 0000000000000000 000230 000078 18 6 5 8 ... 4: 0000000000000100 0 NOTYPE LOCAL DEFAULT 5 foo note that the symbol foo shows up in section .symtab. That causes a link error with lld since it has no idea what to do with it. The bug was fixed in gas in 8424d8f538ffb17bf5e61ac73137f86e47bc8952. llvm-mc works too. The testcase is reduced from ./sys/crypto/skein/amd64/skein_block_asm.s
Created attachment 170897 [details] avoid the gas bug
Comment on attachment 170897 [details] avoid the gas bug This will likely need to go in sys/modules/crypto/Makefile as well
Added to lib/libmd/Makefile in r303158, via https://reviews.freebsd.org/D6789 lib/libcrypt/Makefile was not changed in r303158, and does not build skein_block_asm.s sys/modules/crypto/Makefile was not changed, but does build skein_block_asm.s
For bugs matching the following conditions: - Status == In Progress - Assignee == "bugs@FreeBSD.org" - Last Modified Year <= 2017 Do - Set Status to "Open"
Fixed in base r303158. Feel free to reopen if there is still work pending.
(In reply to Oleksandr Tymoshenko from comment #5) To be clear it is worked around in base r303158 rather than fixed. That said, GNU binutils in the base system will not be upgraded, and is expected to be removed entirely. Thus there's no need to track any additional work here.