Re: sysret_ss_attrs fails to compile

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

 



It's a relocation that won't work on a PIE build, and your system is
probably configured to build using PIE even if not requested.  Can you
try adding -no-pie to the builds that use thunks.S?

(Given how thunks.S works, it'll also fail if relocated above 4G, so
even eliminating the relocations may not be enough.)

On Wed, Sep 27, 2017 at 10:12 AM, Shuah Khan <shuahkh@xxxxxxxxxxxxxxx> wrote:
> Hi Andi,
>
> I just noticed this on 4.14 and the problem exists even in 4.13
>
> tools/testing/selftests/x86$ make
> gcc -m64 -o .../tools/testing/selftests/x86/single_step_syscall_64 -O2 -g -std=gnu99 -pthread -Wall  single_step_syscall.c -lrt -ldl
> gcc -m64 -o .../tools/testing/selftests/x86/sysret_ss_attrs_64 -O2 -g -std=gnu99 -pthread -Wall  sysret_ss_attrs.c thunks.S -lrt -ldl
> /usr/bin/ld: /tmp/ccS6pvIh.o: relocation R_X86_64_32S against `.text' can not be used when making a shared object; recompile with -fPIC
> /usr/bin/ld: final link failed: Nonrepresentable section on output
> collect2: error: ld returned 1 exit status
> Makefile:49: recipe for target '.../tools/testing/selftests/x86/sysret_ss_attrs_64' failed
> make: *** [.../tools/testing/selftests/x86/sysret_ss_attrs_64] Error 1
>
> Any thoughts how to fix this? Might be system specific env. issue?
>
> Before I start searching, I thought I will ask for help??
>
> thanks,
> -- Shuah
>
> --
> Shuah Khan
> Sr. Linux Kernel Developer
> Open Source Innovation Group
> Samsung Research America (Silicon Valley)
> shuahkh@xxxxxxxxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux