forked from OSchip/llvm-project
[ELF] Linkerscript: simplify DATA_SEGMENT_ALIGN evaluation
We can simplify the evaluation of DATA_SEGMENT_ALIGN just to simple align(). That way it will work exactly like we have in non-script case. Change was suggested by Rafael Ávila de Espíndola Differential revision: https://reviews.llvm.org/D22807 llvm-svn: 276745
This commit is contained in:
parent
6151699b08
commit
528e0bfa12
|
@ -813,7 +813,7 @@ Expr ScriptParser::readPrimary() {
|
|||
expect(")");
|
||||
return [=](uint64_t Dot) -> uint64_t {
|
||||
uint64_t Val = E(Dot);
|
||||
return alignTo(Dot, Val) + (Dot & (Val - 1));
|
||||
return alignTo(Dot, Val);
|
||||
};
|
||||
}
|
||||
if (Tok == "DATA_SEGMENT_END") {
|
||||
|
|
|
@ -288,7 +288,7 @@
|
|||
# CHECK-NEXT: Flags [
|
||||
# CHECK-NEXT: SHF_ALLOC
|
||||
# CHECK-NEXT: ]
|
||||
# CHECK-NEXT: Address: 0x26008
|
||||
# CHECK-NEXT: Address: 0x26000
|
||||
# CHECK-NEXT: Offset:
|
||||
# CHECK-NEXT: Size:
|
||||
# CHECK-NEXT: Link:
|
||||
|
|
Loading…
Reference in New Issue