Re: [RFC] RISC-V: Go PLT for CALL/JUMP/RVC_JUMP if `h->plt.offset' isn't -1

2025-03-11 Thread Nelson Chu
On Mon, Mar 10, 2025 at 11:33 AM Fangrui Song wrote: > >> (lld has a quite simple model where undefined non-weak and undefined > >> weak symbols are handled in a unified way. > >> A symbol is preemptible if: > >> > >> * -shared or at least one input file is DSO, and > >> * the symbol is undefined

Re: [RFC] RISC-V: Go PLT for CALL/JUMP/RVC_JUMP if `h->plt.offset' isn't -1

2025-03-09 Thread Nelson Chu
On Mon, Mar 10, 2025 at 10:04 AM Fangrui Song wrote: > I am intrigued by the problem but I have trouble understanding the > description. What behavior does this patch change? > > > riscv64-unknown-linux-gnu-gcc test.c > -Wl,--unresolved-symbols=ignore-in-object-files > > There is no -nostdlib, th

Re: [RFC] RISC-V: Go PLT for CALL/JUMP/RVC_JUMP if `h->plt.offset' isn't -1

2025-03-07 Thread Nelson Chu
Committed, thanks. Nelson On Mon, Mar 3, 2025 at 11:51 AM Nelson Chu wrote: > Looks like we could give it a try and see if it works and won't affect > current projects. I will commit it before this weekend if there are no > objections. > > Thanks > Nelson > > On

Re: [RFC] RISC-V: Go PLT for CALL/JUMP/RVC_JUMP if `h->plt.offset' isn't -1

2025-03-02 Thread Nelson Chu
Looks like we could give it a try and see if it works and won't affect current projects. I will commit it before this weekend if there are no objections. Thanks Nelson On Tue, Feb 11, 2025 at 1:53 AM Palmer Dabbelt wrote: > On Sat, 08 Feb 2025 00:33:37 PST (-0800), Nelson Chu wrote: &

[RFC] RISC-V: Go PLT for CALL/JUMP/RVC_JUMP if `h->plt.offset' isn't -1

2025-02-08 Thread Nelson Chu
I got an request about the undefined behaviors, considering the following case, $ cat test.c void main () { foo(); } $ cat lib.h void foo(void); $ riscv64-unknown-linux-gnu-gcc test.c riscv64-unknown-linux-gnu/bin/ld: /tmp/ccRO8fJl.o: in function `main': test.c:(.text+0x8): undefined reference t