[PATCH] D41234: [ELF] Fix placement of a sentinel entry in the .ARM.exidx section.

Rafael Avila de Espindola via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 22 10:01:08 PST 2017


Igor Kudrin via Phabricator <reviews at reviews.llvm.org> writes:

>   --- a/test/ELF/arm-data-prel.s
>   +++ b/test/ELF/arm-data-prel.s
>   @@ -1,7 +1,8 @@
>    // RUN: llvm-mc %s -triple=armv7-unknown-linux-gnueabi -filetype=obj -o %t.o
>    // RUN: echo "SECTIONS { \
>   -// RUN:          .text : { *(.text) } \
>   -// RUN:          .prel.test : { *(.ARM.exidx) } \
>   +// RUN:          .text : { *(.text.0) } \
>   +// RUN:          .prel.test : { *(.ARM.exidx.0) } \
>   +// RUN:          .trap : { *(.ARM.exidx) *(.dummy) } \
>    // RUN:          .prel.test.TEST1 : { *(.ARM.exidx.TEST1) } \
>    // RUN:          .TEST1 : { *(.TEST1) } } " > %t.script
>    // RUN: ld.lld --script %t.script %t.o -o %t
>   @@ -32,7 +33,7 @@ _start:
>     mov     pc, lr
>     .fnend
>    
>   - .section .text, "ax",%progbits
>   + .section .text.0, "ax",%progbits
>    // The generated .ARM.exidx section will refer to the personality
>    // routine __aeabi_unwind_cpp_pr0. Provide a dummy implementation
>    // to stop an undefined symbol error
>
> Generally, I prefer my code to be safe. Although I must admit, that, with this script, lld still crashes, just a bit later, in `OutputSection::finalize()`.

Please open a bug about the crash.

Cheers,
Rafael


More information about the llvm-commits mailing list