https://bugs.llvm.org/show_bug.cgi?id=38749
Bug ID: 38749
Summary: [Linker script] forward reference
Product: lld
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: ELF
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Can lld support forward reference to a section which is mentioned after?
At line 4, _text_start refers to .bss which is specified after and expected
value is 0x4000.
This feature is supported by bfd linker.
1 # REQUIRES: x86
2 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
3 # RUN: echo "SECTIONS { \
4 # RUN: _text_start = LOADADDR(.bss); \
5 # RUN: .text : { *(.text) } \
6 # RUN: . = 0x4000; \
7 # RUN: .bss : { *(.bss) } \
8 # RUN: }" > %t.script
9 # RUN: ld.lld -o %t1 --script %t.script %t
10 # RUN: llvm-objdump -t %t1 | FileCheck %s
11
12 .text
13 nop
14 nop
15 .section .bss, "aw",@nobits
16 .quad 0
17 # CHECK: 0000000000004000 *ABS* 00000000 _text_start
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs