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
[*] Relocations for a section that's not loaded: .rela.dyn
[*] Relocations for a section that's not loaded: .rela.plt
[x] Could not replace value in .init_array
[x] Couldn't find valid section 3db0
[x] Couldn't find valid section 3fc8
[x] Couldn't find valid section 3fd0
[x] Couldn't find valid section 3fd8
[x] Couldn't find valid section 3fe0
[x] Couldn't find valid section 3fe8
[x] Couldn't find valid section 3ff0
[x] Couldn't find valid section 3ff8
g++ hello.s
fails with output:
hello.s: Assembler messages:
hello.s:76: Error: unrecognized symbol type "GLIBCXX_3.4_4080"
hello.s:76: Error: junk at end of line, first unrecognized character is `,'
hello.s:77: Error: junk at end of line, first unrecognized character is `@'
hello.s:78: Error: invalid character '@' in mnemonic
It looks like it has generated some syntax that as doesn't like. Cleaning that up (not sure of the consequences but I just removed it), it then fails on an undefined label:
$ g++ hello.s
/usr/bin/ld: /tmp/ccaM02YR.o:(.init_array+0x0): undefined reference to `.LC1160'
collect2: error: ld returned 1 exit status
.LC1160 seems to be necessary for something (otherwise the program segfaults at startup), but I can't tell what it needs to point to.
The text was updated successfully, but these errors were encountered:
The problem here is that you are using C++ - and at the moment retrowrite doesn't support it (we support well behaved (i.e. compiled with a compiler) C PIE binaries and shared libraries and kernel modules at the moment). However, we are working on C++ support. I can't give an ETA publicly for when this will be released, but we'd like to do it as soon as we can :)
I'll leave this open and we'll post back once we have working C++ support you can use.
diagprov
changed the title
Can't rebuild output of retrowrite on g++ Hello World
C++ Support: Can't rebuild output of retrowrite on g++ Hello World
Jul 16, 2021
Background
Input file
hello.cpp
Repro
g++ -pie -o hello hello.cpp
./retro/bin/retrowrite hello hello.s
noting output:
g++ hello.s
fails with output:
It looks like it has generated some syntax that
as
doesn't like. Cleaning that up (not sure of the consequences but I just removed it), it then fails on an undefined label:.LC1160
seems to be necessary for something (otherwise the program segfaults at startup), but I can't tell what it needs to point to.The text was updated successfully, but these errors were encountered: