Skip to content

Commit

Permalink
Align .gnu.version_r and .gnu.version_d to 4 byte boundaries
Browse files Browse the repository at this point in the history
They don't contain 8 byte date items, so they don't need to be aligned
to 8 byte boundaries.
  • Loading branch information
rui314 committed Oct 11, 2024
1 parent fdaa13c commit 382e45e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/mold.h
Original file line number Diff line number Diff line change
Expand Up @@ -956,7 +956,7 @@ class VerneedSection : public Chunk<E> {
this->name = ".gnu.version_r";
this->shdr.sh_type = SHT_GNU_VERNEED;
this->shdr.sh_flags = SHF_ALLOC;
this->shdr.sh_addralign = sizeof(Word<E>);
this->shdr.sh_addralign = 4;
}

void construct(Context<E> &ctx);
Expand All @@ -973,7 +973,7 @@ class VerdefSection : public Chunk<E> {
this->name = ".gnu.version_d";
this->shdr.sh_type = SHT_GNU_VERDEF;
this->shdr.sh_flags = SHF_ALLOC;
this->shdr.sh_addralign = 8;
this->shdr.sh_addralign = 4;
}

void construct(Context<E> &ctx);
Expand Down

0 comments on commit 382e45e

Please sign in to comment.