HomePhabricator

[lld][linkerscript] Fix handling of DEFINED.

Authored by abidh on Jul 16 2020, 1:40 PM.

Description

[lld][linkerscript] Fix handling of DEFINED.

Current implementation did not check that symbols is actually defined. Only checked for presence. GNU ld documentation says,

"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."

https://sourceware.org/binutils/docs/ld/Builtin-Functions.html#Builtin-Functions

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D83758

Details

Committed
abidhJul 28 2020, 1:18 PM
Reviewer
MaskRay
Differential Revision
D83758: [lld][linkerscript] Fix handling of DEFINED.
Parents
rG1e027b77f056: [llvm][NFC] refactor setBlockFrequency for clarity.
Branches
Unknown
Tags
Unknown