File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -1061,17 +1061,14 @@ void LinkerScript::assignOffsets(OutputSection *sec) {
1061
1061
}
1062
1062
1063
1063
state->outSec = sec;
1064
- if (sec->addrExpr && script->hasSectionsCommand ) {
1065
- // The alignment is ignored.
1066
- sec->addr = dot;
1067
- } else {
1068
- // sec->alignment is the max of ALIGN and the maximum of input
1069
- // section alignments.
1064
+ if (!(sec->addrExpr && script->hasSectionsCommand )) {
1065
+ // ALIGN is respected. sec->alignment is the max of ALIGN and the maximum of
1066
+ // input section alignments.
1070
1067
const uint64_t pos = dot;
1071
1068
dot = alignToPowerOf2 (dot, sec->addralign );
1072
- sec->addr = dot;
1073
1069
expandMemoryRegions (dot - pos);
1074
1070
}
1071
+ sec->addr = dot;
1075
1072
1076
1073
// state->lmaOffset is LMA minus VMA. If LMA is explicitly specified via AT()
1077
1074
// or AT>, recompute state->lmaOffset; otherwise, if both previous/current LMA
You can’t perform that action at this time.
0 commit comments