Skip to content

x86_64 tests assume they're being run on an x86_64 host #764

@jonathonpenix

Description

@jonathonpenix

Description

There's a number of x86_64 test failures when building/testing eld on AArch64 Linux.

See the log here for full output, but the relevant test failures are:

eld :: x86_64/linux/DefaultImageBase/DefaultImageBase.test
eld :: x86_64/linux/DynamicDataCall/DynamicDataCall.test
eld :: x86_64/linux/DynamicRelocsForAbs64/DynamicRelocsforAbs64.test
eld :: x86_64/linux/EmulationSupport/EmulationOption.test
eld :: x86_64/linux/TlsGDnonpreemptible/TlsGDnonpreemptible.test
eld :: x86_64/linux/TlsGDpreemptible/TlsGDpreemptible.test
eld :: x86_64/linux/TlsIEModel/TlsIEModel.test
eld :: x86_64/linux/TlsLDModel/TlsLDModel.test
eld :: x86_64/linux/relocCOPY/relocCOPY.test
eld :: x86_64/linux/relocGOTPCREL/relocGOTPCREL.test
eld :: x86_64/linux/relocIRELATIVE/relocIRELATIVE.test
eld :: x86_64/linux/relocPLT32Static/relocPLT32Static.test
eld :: x86_64/linux/relocPLT32dynamic/relocPLT32dynamic.test

Failures either look like "cannot execute binary file: Exec format error" or "Fatal: cannot read file 'crt1.o'"

The exec format errors are just a mismatch between x86 and aarch64--presumably these tests should be gated depending on the host architecture (or, presence of an appropriate qemu, etc.)

The "Fatal: cannot read file 'crt1.o'" I think is just that clang can't find the runtime libs it is by default looking for, for the relevant target. That part I think is a toolchain issue (the default invocation doesn't work/the toolchain isn't really "self contained" for the targets it supports). But, the tests with these errors that I spot checked also seem to execute the resulting binaries, so I'm guessing we again just want to gate these based on the host arch being x86.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingtesting

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions