mirror of
https://github.com/upx/upx
synced 2025-09-28 19:06:07 +08:00
Protect against changes from future gas versions in amd64-linux.elf-entry.S.
This commit is contained in:
parent
f7a35fb9fe
commit
d9bf8a76d9
|
@ -233,9 +233,20 @@ unfold:
|
||||||
XXX: 4GB Note that MOVL $imm32,reg zero-extends to 64-bits.
|
XXX: 4GB Note that MOVL $imm32,reg zero-extends to 64-bits.
|
||||||
(Use an temporary register to obtain 4GB range on PUSH constant.)
|
(Use an temporary register to obtain 4GB range on PUSH constant.)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if 1
|
||||||
|
/* INFO: newer gas versions (correctly) encode the "push $IMMEDIATE" into
|
||||||
|
a R_X86_64_32S instead of R_X86_64_32 relocation type.
|
||||||
|
Avoid that until tested.
|
||||||
|
*/
|
||||||
|
.byte 0x68; .int JMPU // push $ JMPU (R_X86_64_32)
|
||||||
|
push %rax // for unmap in fold
|
||||||
|
.byte 0x68; .int LENU // push $ JMPU (R_X86_64_32)
|
||||||
|
#else
|
||||||
push $ JMPU // for unmap in fold
|
push $ JMPU // for unmap in fold
|
||||||
push %rax // for unmap in fold
|
push %rax // for unmap in fold
|
||||||
push $ LENU // for unmap in fold
|
push $ LENU // for unmap in fold
|
||||||
|
#endif
|
||||||
push %rcx // ADRX for upx_main
|
push %rcx // ADRX for upx_main
|
||||||
push %r15 // LENX for upx_main
|
push %r15 // LENX for upx_main
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user