forked from OSchip/llvm-project
Adjust the .bss alignment to include common symbols.
llvm-svn: 262840
This commit is contained in:
parent
81113ef68c
commit
e711fc3767
|
@ -722,6 +722,7 @@ void Writer<ELFT>::addCommonSymbols(std::vector<DefinedCommon *> &Syms) {
|
|||
uintX_t Off = getBss()->getSize();
|
||||
for (DefinedCommon *C : Syms) {
|
||||
Off = alignTo(Off, C->MaxAlignment);
|
||||
Out<ELFT>::Bss->updateAlign(C->MaxAlignment);
|
||||
C->OffsetInBss = Off;
|
||||
Off += C->Size;
|
||||
}
|
||||
|
|
|
@ -13,6 +13,9 @@
|
|||
// CHECK-NEXT: Address: 0x11000
|
||||
// CHECK-NEXT: Offset:
|
||||
// CHECK-NEXT: Size: 22
|
||||
// CHECK-NEXT: Link: 0
|
||||
// CHECK-NEXT: Info: 0
|
||||
// CHECK-NEXT: AddressAlignment: 16
|
||||
|
||||
// CHECK: Name: sym1
|
||||
// CHECK-NEXT: Value: 0x11004
|
||||
|
|
Loading…
Reference in New Issue