Files
clang-p2996/lld/test/ELF/linkerscript/implicit-program-header.s
George Rimar db1a062447 [ELF] - Do not remove empty output sections that are explicitly assigned to phdr in script.
This continues direction started in D43069.

We can keep sections that are explicitly assigned to segment in script.
It helps to simplify code.

Differential revision: https://reviews.llvm.org/D43571

llvm-svn: 325887
2018-02-23 10:53:04 +00:00

23 lines
749 B
ArmAsm

# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
# RUN: echo "PHDRS { \
# RUN: ph_write PT_LOAD FLAGS(2); \
# RUN: ph_exec PT_LOAD FLAGS(1); \
# RUN: } \
# RUN: SECTIONS { \
# RUN: .bar : { *(.bar) } : ph_exec \
# RUN: .foo : { *(.foo) } \
# RUN: .text : { *(.text) } : ph_write \
# RUN: }" > %t.script
# RUN: ld.lld --hash-style=sysv -o %t1 --script %t.script \
# RUN: %t.o -shared
# RUN: llvm-readobj -elf-output-style=GNU -l %t1 | FileCheck %s
# CHECK: Segment Sections...
# CHECK-NEXT: 00 .text .dynsym .hash .dynstr .dynamic
# CHECK-NEXT: 01 .bar .foo
.quad 0
.section .foo,"ax"
.quad 0