Files
clang-p2996/lld/test/ELF/linkerscript/Inputs/define.s
Hafiz Abid Qadeer 1f166edeb4 [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
2020-07-28 21:18:01 +01:00

12 lines
110 B
ArmAsm

.global defined
defined = 0
.section .foo,"a"
.quad 1
.section .bar,"a"
.quad 1
.section .test,"a"
.quad 1