mirror of
https://github.com/netwide-assembler/nasm.git
synced 2024-12-21 09:19:31 +08:00
e47f4b7ad5
The "object" symbol keyword would incorrectly generate STT_NOTYPE instead of STT_OBJECT. Add test for weak object references; they are different from plain weak references in that they are guaranteed to resolve to zero if the symbol is not found. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
31 lines
528 B
NASM
31 lines
528 B
NASM
global foo:(foo_end - foo)
|
|
global foo_hidden:function hidden
|
|
global foo_protected:function protected
|
|
global foo_internal:function internal
|
|
global foo_weak:function weak
|
|
global foo_hidden_weak:function hidden weak
|
|
|
|
extern strong_ref, weak_ref:weak, unused_ref
|
|
extern weak_object_ref:weak object
|
|
required required_ref
|
|
|
|
SECTION .text align=16
|
|
|
|
foo:
|
|
nop
|
|
foo_hidden:
|
|
nop
|
|
foo_protected:
|
|
nop
|
|
foo_internal:
|
|
nop
|
|
foo_weak:
|
|
ret
|
|
foo_hidden_weak:
|
|
mov eax,weak_ref
|
|
mov eax,strong_ref
|
|
mov eax,weak_object_ref
|
|
foo_label:
|
|
ret
|
|
foo_end:
|