Re: llvm-strip vs ld.bfd (at least on i386): SIGABRT in sys_execve

2023-02-16 Thread Theo Buehler
On Wed, Feb 15, 2023 at 11:30:34AM -0800, Philip Guenther wrote: > llvm-strip is somehow ignoring the alignment requirements of the segments. > If you look at the "readelf -l" output instead: > > Good: > Program Headers: > Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align

Re: llvm-strip vs ld.bfd (at least on i386): SIGABRT in sys_execve

2023-02-15 Thread Philip Guenther
On Wed, Feb 15, 2023 at 7:48 AM Stuart Henderson wrote: > Noticed while testing with LLVM 15, but it affects plain -current > as well. If I take a binary that was linked with ld.bfd and strip it > (i.e. this is now using llvm-strip), it breaks the output file in > such a way that it cannot be

Re: llvm-strip vs ld.bfd (at least on i386): SIGABRT in sys_execve

2023-02-15 Thread Todd C . Miller
On Wed, 15 Feb 2023 09:03:55 -0700, "Todd C. Miller" wrote: > It should not be removing .shstrtab. What happens if you tell > llvm-strip to preserve .shstrtab? E.g. --keep-section .shstrtab? Nevermind, I misread the readelf output, the stripped binary does actually have .shstrtab. - todd

Re: llvm-strip vs ld.bfd (at least on i386): SIGABRT in sys_execve

2023-02-15 Thread Todd C . Miller
It should not be removing .shstrtab. What happens if you tell llvm-strip to preserve .shstrtab? E.g. --keep-section .shstrtab? - todd

llvm-strip vs ld.bfd (at least on i386): SIGABRT in sys_execve

2023-02-15 Thread Stuart Henderson
Noticed while testing with LLVM 15, but it affects plain -current as well. If I take a binary that was linked with ld.bfd and strip it (i.e. this is now using llvm-strip), it breaks the output file in such a way that it cannot be executed: : i386.p; cat a.c #include int main() {