Page MenuHomePhabricator

[X32][CET] Fix size and alignment of section

Authored by hvdijk on May 1 2021, 5:33 AM.



X32 uses 32-bit ELF object files with 32-bit alignment, so the section needs to be emitted as it is for X86.

Diff Detail

Event Timeline

hvdijk created this revision.May 1 2021, 5:33 AM
hvdijk requested review of this revision.May 1 2021, 5:33 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 1 2021, 5:33 AM
MaskRay accepted this revision.May 1 2021, 1:55 PM
MaskRay retitled this revision from [X32][CET] Fix section to [X32][CET] Fix alignment of section.



While here, const int


you can omit <

This revision is now accepted and ready to land.May 1 2021, 1:55 PM
hvdijk updated this revision to Diff 342177.May 1 2021, 2:10 PM
hvdijk retitled this revision from [X32][CET] Fix alignment of section to [X32][CET] Fix size and alignment of section.

It wasn't just the alignment that was wrong, the section contains its own size as a field, which had an incorrect value as a result of the alignment.

hvdijk marked an inline comment as done.May 1 2021, 2:11 PM
hvdijk added inline comments.

llc writes to stdout by default when reading from stdin, and writes to <file>.s otherwise, so just dropping < doesn't work. It's possible to use -o - instead to explicitly specify writing to stdout but the other lines in this file and the other three CET test files all use llc < %s rather than llc %s -o -, so for consistency I'd rather leave it if that's okay too?

MaskRay added inline comments.May 1 2021, 2:15 PM

I forgot it:)

This revision was landed with ongoing or failed builds.May 1 2021, 2:17 PM
This revision was automatically updated to reflect the committed changes.