New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a tag to indicate whether to work around this binutils ADD/SUB/SE… #414
Add a tag to indicate whether to work around this binutils ADD/SUB/SE… #414
Conversation
…T bug See <https://sourceware.org/bugzilla/show_bug.cgi?id=31179> for slightly more info. Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
|
This If an object is subject to this gas bug, what can the toolchain do? The Personally I think we should just treat the gas bug as a defect and live with it. Usually we'd not run into a problem at all. Moving forward, I wish that binutils has better tests :) The gas bug fix doesn't come with a test, so a future regression cannot be detected. Perhaps RISC-V folks may have more bandwidth to improve the status quo (see also my feature request binutils/testsuite/lib/binutils-common.exp: Support free-form shell commands and check patterns to solve some pain so that gas contributors will become more willing to add tests). |
|
|
I'm not sure if making a modification to the spec is the best way to handle the situation, but this proposal, as it stands, is incomplete because it does not specify anything other than defining a new tag. What should the linker do if the tag is present in an object file? I think the spec needs to address that question. |
|
Has short chart with Nelson about the bug and this tag, and we both don't think the tag resolve the problem unless all other toolchain also always emit that tag as well.
Update: Let me sort out this issue again, it little mess to me |
|
More detail here: Use this uleb128 directive as example: The assembler should emit So it will become problem once new binutils (2.42, not release yet) link the object files which produced by binutils (2.41), because that will evaluate the And |
Should be ignore the addend of SET_ULEB128, so need this patch to fix the problem, and let ld.bfd ignore the addend of SUB_ULEB128 in binutils 2.42 to workaround it. But after applying this patch, the behavior of The ld.bfd always calculate (V - S + A) for SUB relocation, so this looks wrong and conflict with psabi. Maybe we should limit people cannot use the |
|
We can’t go adding tags to document historic bugs. If binutils is broken then that’s pretty sad and I have questions about the testing methodology (and review process) in use, but that’s for the binutils maintainers to deal with like any other bug. |
|
Discussed in last psABI meeting, and we reach consensus to close this PR since we believe this tag isn't help that issue too much. |
…T bug
See https://sourceware.org/bugzilla/show_bug.cgi?id=31179 for slightly more info.