Bug 209917 - Old gas creates a symbol pointing to symtab
Summary: Old gas creates a symbol pointing to symtab
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: gnu (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: Ed Maste
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2016-06-01 01:31 UTC by Rafael Avila de Espindola
Modified: 2019-01-24 13:54 UTC (History)
6 users (show)

See Also:


Attachments
avoid the gas bug (1004 bytes, patch)
2016-06-01 05:48 UTC, Rafael Avila de Espindola
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rafael Avila de Espindola 2016-06-01 01:31:06 UTC
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
Comment 1 Rafael Avila de Espindola 2016-06-01 05:48:32 UTC
Created attachment 170897 [details]
avoid the gas bug
Comment 2 Allan Jude freebsd_committer freebsd_triage 2016-06-01 06:17:06 UTC
Comment on attachment 170897 [details]
avoid the gas bug

This will likely need to go in sys/modules/crypto/Makefile as well
Comment 3 Ed Maste freebsd_committer freebsd_triage 2017-11-22 03:39:28 UTC
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
Comment 4 Eitan Adler freebsd_committer freebsd_triage 2018-05-20 23:53:54 UTC
For bugs matching the following conditions:
- Status == In Progress
- Assignee == "bugs@FreeBSD.org"
- Last Modified Year <= 2017

Do
- Set Status to "Open"
Comment 5 Oleksandr Tymoshenko freebsd_committer freebsd_triage 2019-01-24 09:14:06 UTC
Fixed in base r303158. Feel free to reopen if there is still work pending.
Comment 6 Ed Maste freebsd_committer freebsd_triage 2019-01-24 13:54:38 UTC
(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.