You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Binutils [1] and a currently in-flight LLD patch [2] define ULEB128 such
that a SUB_ULEB128 must be preceded by a matching SET_ULEB128. This
means that if the first SET_ULEB128 that comes before a given
SUB_ULEB128 does not have the same relocation address, the linkers will
fail. A SET_ULEB128 also cannot appear alone.
Define this behavior in psABI such that libraries that read relocations
are able to make this same assumption. This change enforces that SET_ULEB128
must always immediately preceed the associated SUB_ULEB128, and vice
versa.
[1] https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=bfd/elfnn-riscv.c;h=09aa7be225ef3cba23fefd2ee977b3556a51368c;hb=HEAD#l2506
[2] https://reviews.llvm.org/D142880
Signed-off-by: Charlie Jenkins <[email protected]>
.2+| 60 .2+| SET_ULEB128 .2+| Static | _ULEB128_ .2+| Must be placed immediately before a SUB_ULEB128 with the same offset. Local label assignment <<uleb128-note,*note>>
.2+| 61 .2+| SUB_ULEB128 .2+| Static | _ULEB128_ .2+| Must be placed immediately after a SET_ULEB128 with the same offset. Local label subtraction <<uleb128-note,*note>>
462
462
<| V - S - A
463
463
.2+| 62 .2+| TLSDESC_HI20 .2+| Static | _U-Type_ .2+| High 20 bits of a 32-bit PC-relative offset into a TLS descriptor entry, `%tlsdesc_hi(symbol)`
0 commit comments