diff options
Diffstat (limited to 'lld/test/ELF/linkerscript')
| -rw-r--r-- | lld/test/ELF/linkerscript/merge-sections.s | 9 | ||||
| -rw-r--r-- | lld/test/ELF/linkerscript/symbols-synthetic.s | 14 |
2 files changed, 8 insertions, 15 deletions
diff --git a/lld/test/ELF/linkerscript/merge-sections.s b/lld/test/ELF/linkerscript/merge-sections.s index 25ddacb7145..f9da04c6d23 100644 --- a/lld/test/ELF/linkerscript/merge-sections.s +++ b/lld/test/ELF/linkerscript/merge-sections.s @@ -1,7 +1,7 @@ # REQUIRES: x86 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t -# RUN: echo "SECTIONS {.foo : {*(.foo.*)} }" > %t.script +# RUN: echo "SECTIONS {.foo : { begin = .; *(.foo.*) end = .;} }" > %t.script # RUN: ld.lld -o %t1 --script %t.script %t -shared # RUN: llvm-readobj -s -t %t1 | FileCheck %s @@ -52,6 +52,13 @@ # CHECK-NEXT: AddressAlignment: 2 # CHECK-NEXT: EntrySize: 2 + +# CHECK: Name: begin +# CHECK-NEXT: Value: 0x1C8 + +# CHECK: Name: end +# CHECK-NEXT: Value: 0x1D0 + .section .foo.1a,"aMS",@progbits,1 .asciz "foo" diff --git a/lld/test/ELF/linkerscript/symbols-synthetic.s b/lld/test/ELF/linkerscript/symbols-synthetic.s index a30c97da0a5..fdb33309bcc 100644 --- a/lld/test/ELF/linkerscript/symbols-synthetic.s +++ b/lld/test/ELF/linkerscript/symbols-synthetic.s @@ -29,19 +29,6 @@ # RUN: ld.lld -o %t1 --eh-frame-hdr --script %t.script %t # RUN: llvm-objdump -t %t1 | FileCheck --check-prefix=SIMPLE %s -# The script below contains symbols in the middle of .eh_frame_hdr section. -# We don't support this. -# RUN: echo "SECTIONS { \ -# RUN: .eh_frame_hdr : { \ -# RUN: PROVIDE_HIDDEN(_begin_sec = .); \ -# RUN: __eh_frame_hdr_start = .; \ -# RUN: *(.eh_frame_hdr) \ -# RUN: PROVIDE_HIDDEN(_end_sec_abs = ABSOLUTE(.)); \ -# RUN: *(.eh_frame_hdr) } \ -# RUN: PROVIDE_HIDDEN(_end_sec = .); \ -# RUN: }" > %t.script -# RUN: not ld.lld -o %t1 --eh-frame-hdr --script %t.script %t 2>&1 | FileCheck --check-prefix=ERROR %s - # Check that the following script is processed without errors # RUN: echo "SECTIONS { \ # RUN: .eh_frame_hdr : { \ @@ -69,7 +56,6 @@ # SIMPLE-NEXT: 0000000000001010 *ABS* 00000000 __eh_frame_hdr_start2 # SIMPLE-NEXT: 0000000000001018 .eh_frame_hdr 00000000 __eh_frame_hdr_end # SIMPLE-NEXT: 0000000000001020 *ABS* 00000000 __eh_frame_hdr_end2 -# ERROR: section '.eh_frame_hdr' supports only start and end symbols .global _start _start: |

