Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

relocation R_X86_64_32S against symbol `dummy_stack' can not be used when making a PIE object... #78

Open
st-fresh opened this issue Mar 28, 2021 · 4 comments

Comments

@st-fresh
Copy link

st-fresh commented Mar 28, 2021

sandsifter-master dir using make and getting 1 Error...
injector.c:322:91: note: (near initialization for ‘total_range.end.bytes’)
cc injector.o -O3 -Wall -l:libcapstone.a -o injector -pthread
/usr/bin/ld: injector.o: relocation R_X86_64_32S against symbol 'dummy_stack' can not be used when making a PIE object; recompile with -fPIE
collect2: error: ld returned 1 exit status
make: *** [Makefile:35: injector] Error 1

My system details according to uname -r & lscpu & lshw

uname -r
5.8.0-48-generic

lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
Address sizes: 39 bits physical, 48 bits virtual
CPU(s): 8
On-line CPU(s) list: 0-7
Thread(s) per core: 2
Core(s) per socket: 4
Socket(s): 1
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 60
Model name: Intel(R) Core(TM) i7-4700MQ CPU @ 2.40GHz
Stepping: 3
CPU MHz: 2183.036
CPU max MHz: 3400.0000
CPU min MHz: 800.0000
BogoMIPS: 4788.93
Virtualization: VT-x
L1d cache: 128 KiB
L1i cache: 128 KiB
L2 cache: 1 MiB
L3 cache: 6 MiB
NUMA node0 CPU(s): 0-7
Vulnerability Itlb multihit: KVM: Mitigation: VMX disabled
Vulnerability L1tf: Mitigation; PTE Inversion; VMX conditional cache flushes, SMT vulnerable
Vulnerability Mds: Mitigation; Clear CPU buffers; SMT vulnerable
Vulnerability Meltdown: Mitigation; PTI
Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl and seccomp
Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2: Mitigation; Full generic retpoline, IBPB conditional, IBRS_FW, STIBP conditional, RSB filling
Vulnerability Srbds: Mitigation; Microcode
Vulnerability Tsx async abort: Not affected
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdp
e1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds
_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm ab
m cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 s
mep bmi2 erms invpcid xsaveopt dtherm ida arat pln pts md_clear flush_l1d

lshw
product: Alienware 14 (Alienware 14)
vendor: Alienware
version: A09
serial: XXXXXXX
width: 64 bits
capabilities: smbios-2.7 dmi-2.7 smp vsyscall32
*-cpu
product: Intel(R) Core(TM) i7-4700MQ CPU @ 2.40GHz
vendor: Intel Corp.
physical id: 4
bus info: cpu@0
version: Intel(R) Core(TM) i7-4700MQ CPU @ 2.40GHz
serial: To Be Filled By O.E.M.
slot: U3E1
size: 2398MHz
capacity: 3400MHz
width: 64 bits
clock: 100MHz
capabilities: lm fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp x86-64 constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid xsaveopt dtherm ida arat pln pts md_clear flush_l1d cpufreq
configuration: cores=4 enabledcores=4 threads=8
*-cache:0
description: L1 cache
physical id: 9
slot: L1 Cache
size: 32KiB
capacity: 32KiB
capabilities: synchronous internal write-back instruction
configuration: level=1
*-cache:1
description: L2 cache
physical id: a
slot: L2 Cache
size: 256KiB
capacity: 256KiB
capabilities: synchronous internal write-back unified
configuration: level=2
*-cache:2
description: L3 cache
physical id: b
slot: L3 Cache
size: 6MiB
capacity: 6MiB
capabilities: synchronous internal write-back unified
configuration: level=3
*-cache
description: L1 cache
physical id: 8
slot: L1 Cache
size: 32KiB
capacity: 32KiB
capabilities: synchronous internal write-back data
configuration: level=1
*-memory
description: System Memory
physical id: 29
slot: System board or motherboard
size: 8GiB
*-bank:0
description: SODIMM DDR3 Synchronous 1600 MHz (0.6 ns)
product: HMT451S6AFR8A-PB
vendor: Hynix
physical id: 0
serial: 384964CC
slot: JDIMM2
size: 4GiB
width: 64 bits
clock: 1600MHz (0.6ns)
*-bank:1
description: SODIMM DDR3 Synchronous 1600 MHz (0.6 ns)
product: HMT451S6AFR8A-PB
vendor: Hynix
physical id: 1
serial: 383964CC
slot: JDIMM1
size: 4GiB
width: 64 bits
clock: 1600MHz (0.6ns)
*-pci
description: Host bridge
product: Xeon E3-1200 v3/4th Gen Core Processor DRAM Controller
vendor: Intel Corporation
physical id: 100
bus info: pci@0000:00:00.0
version: 06
width: 32 bits
clock: 33MHz
*-pci:0
description: PCI bridge
product: Xeon E3-1200 v3/4th Gen Core Processor PCI Express x16 Controller
vendor: Intel Corporation
physical id: 1
bus info: pci@0000:00:01.0
version: 06
width: 32 bits
clock: 33MHz
capabilities: pci pm msi pciexpress normal_decode bus_master cap_list
configuration: driver=pcieport
resources: irq:24 ioport:4000(size=4096) memory:d0000000-d1ffffff ioport:a0000000(size=536870912)
*-isa
description: ISA bridge
product: HM87 Express LPC Controller
vendor: Intel Corporation
physical id: 1f
bus info: pci@0000:00:1f.0
version: 04
width: 32 bits
clock: 33MHz
capabilities: isa bus_master cap_list
configuration: driver=lpc_ich latency=0
resources: irq:0
*-raid
description: RAID bus controller
product: 82801 Mobile SATA Controller [RAID mode]
vendor: Intel Corporation
physical id: 1f.2
bus info: pci@0000:00:1f.2
version: 04
width: 32 bits
clock: 66MHz
capabilities: raid msi pm bus_master cap_list
configuration: driver=ahci latency=0
resources: irq:31 ioport:5088(size=8) ioport:5094(size=4) ioport:5080(size=8) ioport:5090(size=4) ioport:5060(size=32) memory:d271b000-d271b7ff
*-serial
description: SMBus
product: 8 Series/C220 Series Chipset Family SMBus Controller
vendor: Intel Corporation
physical id: 1f.3
bus info: pci@0000:00:1f.3
version: 04
width: 64 bits
clock: 33MHz
configuration: driver=i801_smbus latency=0
resources: irq:18 memory:d2719000-d27190ff ioport:5040(size=32)
*-disk
description: ATA Disk
product: WDC WD7500BPKT-7
vendor: Western Digital
physical id: 0.0.0
bus info: scsi@0:0.0.0
logical name: /dev/sda
version: 1A01
serial: WD-WXA1A43E3807
size: 698GiB (750GB)
capabilities: partitioned partitioned:dos
configuration: ansiversion=5 logicalsectorsize=512 sectorsize=4096 signature=7b9f17d3
*-volume:0 UNCLAIMED
description: Windows FAT volume
vendor: mkfs.fat
physical id: 1
bus info: scsi@0:0.0.0,1
version: FAT32
serial: 991e-5fe0
size: 510MiB
capacity: 512MiB
capabilities: primary bootable fat initialized
configuration: FATs=2 filesystem=fat
*-volume:1
description: Extended partition
physical id: 2
bus info: scsi@0:0.0.0,2
logical name: /dev/sda2
size: 698GiB
capacity: 698GiB
capabilities: primary extended partitioned partitioned:extended
*-logicalvolume
description: EXT4 volume
vendor: Linux
physical id: 5
logical name: /dev/sda5
logical name: /
version: 1.0
serial: 092dccec-e841-4cfb-a7a8-c763f2541909
size: 698GiB
capacity: 698GiB
capabilities: journaled extended_attributes large_files huge_files dir_nlink recover 64bit extents ext4 ext2 initialized
configuration: created=2021-03-28 06:50:10 filesystem=ext4 lastmountpoint=/ modified=2021-03-28 15:04:42 mount.fstype=ext4 mount.options=rw,relatime,errors=remount-ro mounted=2021-03-28 15:04:46 state=mounted

So R_X86_64_32S requires some special compile flag -fPIE maybe because I have 64 and 32 bit available not sure, just curious as to exactly what this error means and how it impacts my use of sandsifter on this system thanks

@st-fresh
Copy link
Author

Now I'm getting..
sudo: unable to execute ./sifter.py: No such file or directory when I try to run sudo ./sifter.py --unk --dis --len --sync --tick -- -P1 -t from within the directory containing sifter.py so maybe [Makefile:35: injector] Error 1 is preventing sifter.py from compiling

@Scoder12
Copy link

Try rm -f injector.o && make CFLAGS=-fPIC

@Scoder12
Copy link

Or try solution from #74

@Stardust8502
Copy link

This comment solves it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants