Something went wrong on our end
Select Git revision
handler_amd64.ld
-
Simon Ruderich authored
The old approach to extract only the .text segment was very hacky and did already break a few times, e.g. a7d0c60e ("helper: prevent string constants in .data with more force", 2018-06-05) and 19e417d2 ("helper: display unknown syscalls in ASM_HELPER", 2018-04-07). Instead we now use a custom linker script which includes only the .text and .rodata sections. This allows `objcopy -O binary` with all sections. This also fixes a regression with clang-4.0 which was broken on Sid since f9d69043 ("helper: enable most syscalls also in asm-helper mode", 2018-06-19). The size increase of the switch statement in sandbox_syscall_dispatcher() caused clang to use a lookup table (in the .rodata section) which was not copied to the flat binary causing a crash.
Simon Ruderich authoredThe old approach to extract only the .text segment was very hacky and did already break a few times, e.g. a7d0c60e ("helper: prevent string constants in .data with more force", 2018-06-05) and 19e417d2 ("helper: display unknown syscalls in ASM_HELPER", 2018-04-07). Instead we now use a custom linker script which includes only the .text and .rodata sections. This allows `objcopy -O binary` with all sections. This also fixes a regression with clang-4.0 which was broken on Sid since f9d69043 ("helper: enable most syscalls also in asm-helper mode", 2018-06-19). The size increase of the switch statement in sandbox_syscall_dispatcher() caused clang to use a lookup table (in the .rodata section) which was not copied to the flat binary causing a crash.