This is an archive of the discontinued LLVM Phabricator instance.

[ELF] - Linkerscript: implement DEFINED() command.
ClosedPublic

Authored by grimar on Sep 23 2016, 5:10 AM.

Details

Summary

DEFINED(symbol)
Return 1 if symbol is in the linker global symbol table and is defined before
the statement using DEFINED in the script, otherwise return 0.

Can be used to define default values for symbols. Found it in the wild here:
https://searchcode.com/file/103745382/board/bf561-ezkit/u-boot.lds.S

Patch implements it.

Diff Detail

Repository
rL LLVM

Event Timeline

grimar updated this revision to Diff 72257.Sep 23 2016, 5:10 AM
grimar retitled this revision from to [ELF] - Linkerscript: implement DEFINED() command..
grimar updated this object.
grimar added reviewers: ruiu, rafael.
grimar added subscribers: llvm-commits, grimar, davide, evgeny777.
This revision was automatically updated to reflect the committed changes.