This is an archive of the discontinued LLVM Phabricator instance.

[lld][ELF][test] Fix excessive output file size in loongarch-add-sub.s
ClosedPublic

Authored by xen0n on Jul 25 2023, 10:25 PM.

Details

Summary

Initially the .rodata section came before .text, hence sharing its
segment with the program header sitting at a small offset, pushing the
output file size to ~72GiB (the file was sparse though, so not much is
really written). This breaks on 32-bit platforms and is irrelevant to
the feature being tested, so re-order the two sections so .text gets
processed first, and both sections get their own segment.

This addresses the issue found by the clang-armv8-lld-2stage builder:

https://lab.llvm.org/buildbot/#/builders/178/builds/5340

Diff Detail

Event Timeline

xen0n created this revision.Jul 25 2023, 10:25 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 25 2023, 10:25 PM
xen0n requested review of this revision.Jul 25 2023, 10:25 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 25 2023, 10:25 PM

We need to cherry-pick this to the LLVM 17 release branch, otherwise other 32-bit platforms will also fail on this test.

SixWeining accepted this revision.Jul 26 2023, 5:49 AM
This revision is now accepted and ready to land.Jul 26 2023, 5:49 AM
xry111 accepted this revision.Jul 26 2023, 6:40 AM

LGTM.

FWIW GNU assembler does not agree with this test case: it complains relocation out of range for baz and quux.

LGTM and LGTM for cherry picking to release/17.x