mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-01 15:11:24 +00:00
Fix the type of a symbol created with .comm and no corresponding .type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119060 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
60d5b5fdee
commit
765fb1a446
@ -409,6 +409,7 @@ void MCELFStreamer::EmitCommonSymbol(MCSymbol *Symbol, uint64_t Size,
|
||||
if (!BindingExplicitlySet.count(Symbol)) {
|
||||
SetBinding(SD, ELF::STB_GLOBAL);
|
||||
SD.setExternal(true);
|
||||
SetType(SD, ELF::STT_OBJECT);
|
||||
}
|
||||
|
||||
if (GetBinding(SD) == ELF_STB_Local) {
|
||||
|
@ -61,3 +61,15 @@ foo:
|
||||
// CHECK-NEXT: ('st_shndx', 0x0000fff2)
|
||||
// CHECK-NEXT: ('st_value', 0x00000010)
|
||||
// CHECK-NEXT: ('st_size', 0x00000028)
|
||||
|
||||
.comm common5,4,4
|
||||
|
||||
// CHECK: # Symbol 0x00000008
|
||||
// CHECK-NEXT: (('st_name', 0x00000025) # 'common5'
|
||||
// CHECK-NEXT: ('st_bind', 0x00000001)
|
||||
// CHECK-NEXT: ('st_type', 0x00000001)
|
||||
// CHECK-NEXT: ('st_other', 0x00000000)
|
||||
// CHECK-NEXT: ('st_shndx', 0x0000fff2)
|
||||
// CHECK-NEXT: ('st_value', 0x00000004)
|
||||
// CHECK-NEXT: ('st_size', 0x00000004)
|
||||
// CHECK-NEXT: ),
|
||||
|
Loading…
Reference in New Issue
Block a user