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
❯ gcc main.c -fpie -Wl,--pie -B ~/Programming/wild && ./a.out
Segmentation fault (core dumped)
❯ gcc main.c -fpie -Wl,--pie
/usr/lib64/gcc/x86_64-suse-linux/14/../../../../x86_64-suse-linux/bin/ld: /usr/lib64/gcc/x86_64-suse-linux/14/crtbegin.o: relocation R_X86_64_32 against hidden symbol `__TMC_END__' can not be used when making a PIE object
/usr/lib64/gcc/x86_64-suse-linux/14/../../../../x86_64-suse-linux/bin/ld: failed to set dynamic section sizes: bad value
collect2: error: ld returned 1 exit status
❯ gcc main.c -fpie -Wl,--pie -fuse-ld=mold
mold: error: /usr/lib64/gcc/x86_64-suse-linux/14/crtbegin.o:(.text): R_X86_64_32 relocation at offset 0x1 against symbol `__TMC_END__' can not be used; recompile with -fPIC
mold: error: /usr/lib64/gcc/x86_64-suse-linux/14/crtbegin.o:(.text): R_X86_64_32S relocation at offset 0x7 against symbol `.tm_clone_table' can not be used; recompile with -fPIC
mold: error: /usr/lib64/gcc/x86_64-suse-linux/14/crtbegin.o:(.text): R_X86_64_32 relocation at offset 0x18 against symbol `.tm_clone_table' can not be used; recompile with -fPIC
mold: error: /usr/lib64/gcc/x86_64-suse-linux/14/crtbegin.o:(.text): R_X86_64_32 relocation at offset 0x31 against symbol `__TMC_END__' can not be used; recompile with -fPIC
mold: error: /usr/lib64/gcc/x86_64-suse-linux/14/crtbegin.o:(.text): R_X86_64_32S relocation at offset 0x38 against symbol `.tm_clone_table' can not be used; recompile with -fPIC
mold: error: /usr/lib64/gcc/x86_64-suse-linux/14/crtbegin.o:(.text): R_X86_64_32 relocation at offset 0x5a against symbol `.tm_clone_table' can not be used; recompile with -fPIC
collect2: error: ld returned 1 exit status
❯ gcc main.c -fpie -Wl,--pie -fuse-ld=lld
ld.lld: error: relocation R_X86_64_32 cannot be used against symbol '__TMC_END__'; recompile with -fPIC
>>> defined in /usr/lib64/gcc/x86_64-suse-linux/14/crtend.o
>>> referenced by crtstuff.c
>>> /usr/lib64/gcc/x86_64-suse-linux/14/crtbegin.o:(.text+0x1)
ld.lld: error: relocation R_X86_64_32S cannot be used against local symbol; recompile with -fPIC
>>> defined in /usr/lib64/gcc/x86_64-suse-linux/14/crtbegin.o
>>> referenced by crtstuff.c
>>> /usr/lib64/gcc/x86_64-suse-linux/14/crtbegin.o:(.text+0x7)
ld.lld: error: relocation R_X86_64_32 cannot be used against symbol '_ITM_deregisterTMCloneTable'; recompile with -fPIC
>>> defined in /usr/lib64/gcc/x86_64-suse-linux/14/crtbegin.o
>>> referenced by crtstuff.c
>>> /usr/lib64/gcc/x86_64-suse-linux/14/crtbegin.o:(.text+0xE)
ld.lld: error: relocation R_X86_64_32 cannot be used against local symbol; recompile with -fPIC
>>> defined in /usr/lib64/gcc/x86_64-suse-linux/14/crtbegin.o
>>> referenced by crtstuff.c
>>> /usr/lib64/gcc/x86_64-suse-linux/14/crtbegin.o:(.text+0x18)
ld.lld: error: relocation R_X86_64_32 cannot be used against symbol '__TMC_END__'; recompile with -fPIC
>>> defined in /usr/lib64/gcc/x86_64-suse-linux/14/crtend.o
>>> referenced by crtstuff.c
>>> /usr/lib64/gcc/x86_64-suse-linux/14/crtbegin.o:(.text+0x31)
ld.lld: error: relocation R_X86_64_32S cannot be used against local symbol; recompile with -fPIC
>>> defined in /usr/lib64/gcc/x86_64-suse-linux/14/crtbegin.o
>>> referenced by crtstuff.c
>>> /usr/lib64/gcc/x86_64-suse-linux/14/crtbegin.o:(.text+0x38)
ld.lld: error: relocation R_X86_64_32 cannot be used against symbol '_ITM_registerTMCloneTable'; recompile with -fPIC
>>> defined in /usr/lib64/gcc/x86_64-suse-linux/14/crtbegin.o
>>> referenced by crtstuff.c
>>> /usr/lib64/gcc/x86_64-suse-linux/14/crtbegin.o:(.text+0x50)
ld.lld: error: relocation R_X86_64_32 cannot be used against local symbol; recompile with -fPIC
>>> defined in /usr/lib64/gcc/x86_64-suse-linux/14/crtbegin.o
>>> referenced by crtstuff.c
>>> /usr/lib64/gcc/x86_64-suse-linux/14/crtbegin.o:(.text+0x5A)
collect2: error: ld returned 1 exit status
The text was updated successfully, but these errors were encountered:
I noticed the following is rejected:
The text was updated successfully, but these errors were encountered: