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
12 lines
110 B
ArmAsm
12 lines
110 B
ArmAsm
.global defined
|
|
defined = 0
|
|
|
|
.section .foo,"a"
|
|
.quad 1
|
|
|
|
.section .bar,"a"
|
|
.quad 1
|
|
|
|
.section .test,"a"
|
|
.quad 1
|