Files
clang-p2996/lld/test/ELF/bss-start-common.s
George Rimar e6c5d3862d [ELF] - Define __bss_start symbol.
GNU linkers define __bss_start symbol.
Patch teaches LLD to do that. This is PR32051.

Below is part of standart ld.bfd script:

.data1          : { *(.data1) }
  _edata = .; PROVIDE (edata = .);
  . = .;
  __bss_start = .;
  .bss            :
  {
Currently LLD can emit up to 3 .bss* sections as one of testcase shows.
Implementation inserts this symbol before first .bss* output section.

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

llvm-svn: 299528
2017-04-05 10:03:25 +00:00

16 lines
428 B
ArmAsm

# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
# RUN: ld.lld %t -o %t2
# RUN: llvm-objdump -t -section-headers %t2 | FileCheck %s
# CHECK: Sections:
# CHECK: Idx Name Size Address Type
# CHECK: 2 .bss 00000004 0000000000201000 BSS
# CHECK: SYMBOL TABLE:
# CHECK: 0000000000201000 .bss 00000000 __bss_start
.global __bss_start
.text
_start:
.comm sym1,4,4