diff --git a/output/outelf.c b/output/outelf.c index 0c889bb6..787a3aab 100644 --- a/output/outelf.c +++ b/output/outelf.c @@ -872,7 +872,7 @@ static void elf_deflabel(char *name, int32_t segment, int64_t offset, if (!nasm_strnicmp(spcword, "notype", wlen)) type = STT_NOTYPE; else if (!nasm_strnicmp(spcword, "object", wlen)) - type = STT_NOTYPE; + type = STT_OBJECT; else if (!nasm_strnicmp(spcword, "hidden", wlen)) sym->other = STV_HIDDEN; else if (!nasm_strnicmp(spcword, "strong", wlen)) diff --git a/test/elf_visibility.asm b/test/elf_visibility.asm index 81ea7a0c..b1dc83cb 100644 --- a/test/elf_visibility.asm +++ b/test/elf_visibility.asm @@ -6,6 +6,7 @@ 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 @@ -23,6 +24,7 @@ foo_weak: foo_hidden_weak: mov eax,weak_ref mov eax,strong_ref + mov eax,weak_object_ref foo_label: ret foo_end: