[ELF] - Define __bss_start symbol.
authorGeorge Rimar <grimar@accesssoftek.com>
Wed, 5 Apr 2017 10:03:25 +0000 (10:03 +0000)
committerGeorge Rimar <grimar@accesssoftek.com>
Wed, 5 Apr 2017 10:03:25 +0000 (10:03 +0000)
commite6c5d3862d123f84bf400078172fd93680e15c5b
treef2e76b773c454453479b656c8d5c6c22fd547df7
parentd5be88ecf8bf0032794101bcad3ee9a2a01dfe5a
[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
lld/ELF/Symbols.cpp
lld/ELF/Symbols.h
lld/ELF/Writer.cpp
lld/test/ELF/bss-start-common.s [new file with mode: 0644]