bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/31179] RISC-V: The SET/ADD/SUB fix breaks ABI compatibility with


From: nelsonc1225 at sourceware dot org
Subject: [Bug ld/31179] RISC-V: The SET/ADD/SUB fix breaks ABI compatibility with 2.41 objects
Date: Wed, 20 Dec 2023 03:36:46 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=31179

Nelson Chu <nelsonc1225 at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nelsonc1225 at sourceware dot 
org

--- Comment #7 from Nelson Chu <nelsonc1225 at sourceware dot org> ---
Created attachment 15267
  --> https://sourceware.org/bugzilla/attachment.cgi?id=15267&action=edit
proposed solution v1

I'm running the regressions of riscv-gnu-toolchain, so will send the patch if
everything looks well.  Basically the root cause of the problem is same as what
Andreas mentioned, and the proposed solution is also same as what Palmer said,
so just make sure that what the proposed patch plan to do in the short-term,

For 2.42 assembler,
- Keep generating the right zero addend of SUB_ULEB128 relocation.

For 2.42 linker,
- Ignore the addend of SUB_ULEB128 relocation when relocating since it should
always be zero by using .ueb128 directive.
- Add ld target option, --[no-]check-uleb128, to enable/disable checking if
SUB_ULEB128 with non-zero addend.  If people get warnings by enabling the
option, then,
1. they should plan to rebuild their stuff to get the right behavior in
assembler.
2. they probably are using .reloc *SUB* with non-zero addend, then they will
get troubles temporarily.  Since the .reloc usage is rarely to use in RISC-V,
so there is much room for discussion in terms of use.  That means maybe we
should just encourage people don't use that, or add some limitation for it.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]