Skip to content
Commit 28ac19c9 authored by George Rimar's avatar George Rimar
Browse files

[ELF] - Linkerscript: do not define _edata,_end,_etext if SECTIONS is used.

I faced that when tried to link FreeBSD kernel. 
It was "duplicate symbol: _edata in (internal) and (internal)" error.
_data was a shared symbol that came from hack.so. At first it was replaced with DefinedRegular by the code
disabled in this patch and later when script tried to define the same symbol - the error was shown.

In the same situation (as given in testcase) ld defines them as UND. gold defines as ABS with zero value. 
Patch just disables any operations of creating these symbols if script do layout.

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

llvm-svn: 277986
parent 86db9e7b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment