diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5abf05b6a..3e5b10fe2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -61,7 +61,7 @@ jobs: if: ${{ matrix.test-qemu }} - run: apt-get update && apt-get -y install gcc g++ clang clang-format lld curl bubblewrap if: ${{ contains(matrix.container, 'ubuntu') }} - - run: apt-get update && apt-get -y install qemu-user gcc-aarch64-linux-gnu g++-aarch64-linux-gnu gcc-riscv64-linux-gnu g++-riscv64-linux-gnu gcc-loongarch64-linux-gnu g++-loongarch64-linux-gnu binutils-aarch64-linux-gnu binutils-riscv64-linux-gnu binutils-loongarch64-linux-gnu + - run: apt-get update && apt-get -y install qemu-user gcc-aarch64-linux-gnu g++-aarch64-linux-gnu gcc-riscv64-linux-gnu g++-riscv64-linux-gnu gcc-loongarch64-linux-gnu g++-loongarch64-linux-gnu gcc-powerpc64le-linux-gnu g++-powerpc64le-linux-gnu binutils-aarch64-linux-gnu binutils-riscv64-linux-gnu binutils-loongarch64-linux-gnu binutils-powerpc64le-linux-gnu if: ${{ matrix.test-qemu }} - run: zypper refresh && zypper in -y gcc gcc-c++ glibc-devel-static clang lld curl rustup bubblewrap if: ${{ contains(matrix.container, 'opensuse') }} @@ -79,7 +79,7 @@ jobs: - uses: dtolnay/rust-toolchain@nightly id: rust-toolchain with: - targets: x86_64-unknown-linux-gnu,x86_64-unknown-linux-musl,aarch64-unknown-linux-gnu,aarch64-unknown-linux-musl,riscv64gc-unknown-linux-gnu,riscv64gc-unknown-linux-musl,loongarch64-unknown-linux-gnu,loongarch64-unknown-linux-musl + targets: x86_64-unknown-linux-gnu,x86_64-unknown-linux-musl,aarch64-unknown-linux-gnu,aarch64-unknown-linux-musl,riscv64gc-unknown-linux-gnu,riscv64gc-unknown-linux-musl,loongarch64-unknown-linux-gnu,loongarch64-unknown-linux-musl,powerpc64le-unknown-linux-gnu components: rustc-codegen-cranelift-preview - uses: wild-linker/action@latest with: diff --git a/libwild/src/lib.rs b/libwild/src/lib.rs index 053c5c575..0cdf50f0f 100644 --- a/libwild/src/lib.rs +++ b/libwild/src/lib.rs @@ -55,7 +55,11 @@ pub(crate) mod perf; not(target_os = "linux"), all( target_os = "linux", - any(target_arch = "riscv64", target_arch = "loongarch64") + any( + target_arch = "riscv64", + target_arch = "loongarch64", + target_arch = "powerpc64" + ) ) ))] #[path = "perf_unsupported.rs"] diff --git a/linker-diff/src/arch.rs b/linker-diff/src/arch.rs index 5101cb34c..837b57978 100644 --- a/linker-diff/src/arch.rs +++ b/linker-diff/src/arch.rs @@ -18,6 +18,7 @@ pub(crate) enum ArchKind { Aarch64, RiscV64, LoongArch64, + Ppc64, } /// Provides architecture-specific functionality needed by linker-diff. @@ -283,6 +284,7 @@ impl ArchKind { object::elf::EM_AARCH64 => Ok(ArchKind::Aarch64), object::elf::EM_RISCV => Ok(ArchKind::RiscV64), object::elf::EM_LOONGARCH => Ok(ArchKind::LoongArch64), + object::elf::EM_PPC64 => Ok(ArchKind::Ppc64), other => bail!("Unsupported ELF architecture {other}",), } } diff --git a/linker-diff/src/lib.rs b/linker-diff/src/lib.rs index be60e2a08..bd9047f3b 100644 --- a/linker-diff/src/lib.rs +++ b/linker-diff/src/lib.rs @@ -44,6 +44,7 @@ mod gnu_hash; mod header_diff; mod init_order; mod loongarch64; +mod ppc64; mod riscv64; mod riscv_attributes; pub(crate) mod section_map; @@ -324,6 +325,7 @@ impl Config { .map(ToOwned::to_owned), ), ArchKind::X86_64 => {} + ArchKind::Ppc64 => {} ArchKind::LoongArch64 => self.ignore.extend( [ "section.sdata", @@ -708,6 +710,9 @@ impl Report { ArchKind::LoongArch64 => { self.report_arch_specific_diffs::(objects); } + ArchKind::Ppc64 => { + self.report_arch_specific_diffs::(objects); + } } } diff --git a/linker-diff/src/ppc64.rs b/linker-diff/src/ppc64.rs new file mode 100644 index 000000000..f48260334 --- /dev/null +++ b/linker-diff/src/ppc64.rs @@ -0,0 +1,150 @@ +use crate::ArchKind; +use crate::arch::Arch; +use crate::arch::Instruction; +use crate::arch::Relaxation; +use crate::arch::RelaxationByteRange; +use crate::asm_diff::BasicValueKind; +use crate::utils::decode_insn_with_objdump; +use linker_utils::elf::DynamicRelocationKind; +use linker_utils::elf::RelocationKindInfo; +use linker_utils::elf::ppc64_rel_type_to_string; +use linker_utils::ppc64::RelaxationKind; +use linker_utils::relaxation::RelocationModifier; +use std::fmt::Display; + +#[derive(Clone, Copy, PartialEq, Eq, Debug)] +pub(crate) struct Ppc64; + +impl Arch for Ppc64 { + type RType = RType; + type RelaxationKind = RelaxationKind; + type RawInstruction = Option; + + const MAX_RELAX_MODIFY_BEFORE: u64 = 0; + const MAX_RELAX_MODIFY_AFTER: u64 = 0; + + fn possible_relaxations_do( + _r_type: Self::RType, + _section_kind: object::SectionKind, + _cb: impl FnMut(Relaxation), + ) { + // No relaxations are implemented for ppc64 yet. + } + + fn relaxation_byte_range(_relaxation: Relaxation) -> RelaxationByteRange { + RelaxationByteRange { + offset_shift: 0, + num_bytes: 4, + } + } + + fn apply_relaxation( + relaxation_kind: Self::RelaxationKind, + section_bytes: &mut [u8], + offset_in_section: &mut u64, + addend: &mut i64, + ) { + relaxation_kind.apply(section_bytes, offset_in_section, addend); + } + + fn next_relocation_modifier(relaxation_kind: Self::RelaxationKind) -> RelocationModifier { + relaxation_kind.next_modifier() + } + + fn instruction_to_string(instruction: &Instruction) -> String { + instruction.raw_instruction.clone().unwrap_or_default() + } + + fn decode_instructions_in_range( + section_bytes: &[u8], + section_address: u64, + _function_offset_in_section: u64, + range: std::ops::Range, + ) -> Vec> { + // ppc64 instructions are a fixed 4 bytes, so we can start decoding at the (aligned) start + // of the range. + let mut offset = range.start & !3; + let mut instructions = Vec::new(); + while offset < range.end { + if offset as usize + 4 > section_bytes.len() { + break; + } + let bytes = §ion_bytes[offset as usize..offset as usize + 4]; + let address = section_address + offset; + let raw_instruction = decode_insn_with_objdump(bytes, address, ArchKind::Ppc64).ok(); + instructions.push(Instruction { + raw_instruction, + address, + bytes, + }); + offset += 4; + } + instructions + } + + fn decode_plt_entry( + _plt_entry: &[u8], + _plt_base: u64, + _plt_offset: u64, + ) -> Option { + // PLT generation isn't implemented for ppc64 yet. + None + } + + fn should_chain_relocations(_chain_prefix: &[Self::RType]) -> bool { + false + } + + fn get_relocation_base_mask(_relocation_info: &RelocationKindInfo) -> u64 { + u64::MAX + } + + fn relocation_to_pc_offset(_relocation_info: &RelocationKindInfo) -> u64 { + 0 + } + + fn is_complete_chain(_chain: impl Iterator) -> bool { + true + } + + fn get_basic_value_for_tp_offset() -> BasicValueKind { + BasicValueKind::TlsOffset + } +} + +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub(crate) struct RType(u32); + +impl crate::arch::RType for RType { + fn from_raw(raw: u32) -> Self { + RType(raw) + } + + fn from_dynamic_relocation_kind(kind: DynamicRelocationKind) -> Self { + Self::from_raw(kind.ppc64_r_type()) + } + + fn opt_relocation_info(self) -> Option { + linker_utils::ppc64::relocation_type_from_raw(self.0) + } + + fn dynamic_relocation_kind(self) -> Option { + DynamicRelocationKind::from_ppc64_r_type(self.0) + } +} + +impl Display for RType { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + Display::fmt(&ppc64_rel_type_to_string(self.0), f) + } +} + +impl crate::arch::RelaxationKind for RelaxationKind { + fn is_no_op(self) -> bool { + matches!(self, RelaxationKind::NoOp) + } + + fn is_replace_with_no_op(self) -> bool { + false + } +} diff --git a/linker-diff/src/utils.rs b/linker-diff/src/utils.rs index 50a0c9469..81df96683 100644 --- a/linker-diff/src/utils.rs +++ b/linker-diff/src/utils.rs @@ -18,6 +18,10 @@ pub fn decode_insn_with_objdump(insn: &[u8], address: u64, arch: ArchKind) -> Re ArchKind::RiscV64 => ("riscv:rv64", ["riscv64-linux-gnu-objdump", "objdump"]), ArchKind::X86_64 => todo!(), // x86_64 objdump is not used in linker-diff currently ArchKind::LoongArch64 => ("Loongarch64", ["loongarch64-linux-gnu-objdump", "objdump"]), + ArchKind::Ppc64 => ( + "powerpc:common64", + ["powerpc64le-linux-gnu-objdump", "objdump"], + ), }; let objdump = objdump_bin_candidates @@ -28,6 +32,10 @@ pub fn decode_insn_with_objdump(insn: &[u8], address: u64, arch: ArchKind) -> Re let command = Command::new(objdump) .arg("-b") .arg("binary") + // Every target we support is little-endian. Be explicit, since some machines (e.g. the + // generic `powerpc:common64`) default to big-endian and would otherwise disassemble the + // raw bytes as garbage on a big-endian-defaulting host. + .arg("--endian=little") .arg(format!("--adjust-vma=0x{address:x}")) .arg("-m") .arg(objdump_arch) diff --git a/linker-utils/src/elf.rs b/linker-utils/src/elf.rs index 1a25e8c25..7136b5c92 100644 --- a/linker-utils/src/elf.rs +++ b/linker-utils/src/elf.rs @@ -730,6 +730,23 @@ impl DynamicRelocationKind { DynamicRelocationKind::JumpSlot => object::elf::R_PPC64_JMP_SLOT, } } + + #[must_use] + pub fn from_ppc64_r_type(r_type: u32) -> Option { + let kind = match r_type { + object::elf::R_PPC64_COPY => DynamicRelocationKind::Copy, + object::elf::R_PPC64_IRELATIVE => DynamicRelocationKind::Irelative, + object::elf::R_PPC64_DTPMOD64 => DynamicRelocationKind::DtpMod, + object::elf::R_PPC64_DTPREL64 => DynamicRelocationKind::DtpOff, + object::elf::R_PPC64_TPREL64 => DynamicRelocationKind::TpOff, + object::elf::R_PPC64_RELATIVE => DynamicRelocationKind::Relative, + object::elf::R_PPC64_ADDR64 => DynamicRelocationKind::Absolute, + object::elf::R_PPC64_GLOB_DAT => DynamicRelocationKind::GotEntry, + object::elf::R_PPC64_JMP_SLOT => DynamicRelocationKind::JumpSlot, + _ => return None, + }; + Some(kind) + } } #[derive(Clone, Debug, Copy, PartialEq, Eq)] diff --git a/wild/tests/external_tests/mold_skip_tests.toml b/wild/tests/external_tests/mold_skip_tests.toml index 6c20cfc7c..703042835 100644 --- a/wild/tests/external_tests/mold_skip_tests.toml +++ b/wild/tests/external_tests/mold_skip_tests.toml @@ -128,6 +128,10 @@ tests = [ "arch-loongarch64-relax-tlsdesc.sh", ] +[skipped_groups.arch_ppc64le] +reason = "ppc64le specific tests" +tests = ["arch-ppc64le-save-restore-gprs.sh"] + [skipped_groups.tls] reason = "Related to TLS" tests = ["tls-common.sh", "tls-le-error.sh"] diff --git a/wild/tests/integration_tests.rs b/wild/tests/integration_tests.rs index b6686f9be..6a643c4fe 100644 --- a/wild/tests/integration_tests.rs +++ b/wild/tests/integration_tests.rs @@ -552,6 +552,8 @@ enum Architecture { RiscV64, #[strum(serialize = "loongarch64")] LoongArch64, + #[strum(serialize = "ppc64le")] + Ppc64, } const ALL_ARCHITECTURES: &[Architecture] = &[ @@ -559,6 +561,7 @@ const ALL_ARCHITECTURES: &[Architecture] = &[ Architecture::AArch64, Architecture::RiscV64, Architecture::LoongArch64, + Architecture::Ppc64, ]; impl Architecture { @@ -568,6 +571,16 @@ impl Architecture { Architecture::AArch64 => "aarch64elf", Architecture::RiscV64 => "elf64lriscv", Architecture::LoongArch64 => "elf64loongarch", + Architecture::Ppc64 => "elf64lppc", + } + } + + /// The architecture prefix used in target triples / cross-toolchain names. This differs from + /// the short name (`Display`) for ppc64le, whose triple prefix is `powerpc64le`. + fn triple_arch(&self) -> String { + match self { + Architecture::Ppc64 => "powerpc64le".to_owned(), + _ => self.to_string(), } } @@ -580,7 +593,7 @@ impl Architecture { fn default_target_triple(&self, platform: PlatformKind) -> String { match platform { - PlatformKind::Elf => format!("{self}-unknown-linux-gnu"), + PlatformKind::Elf => format!("{}-unknown-linux-gnu", self.triple_arch()), PlatformKind::MachO => format!("{}-apple-darwin", self.darwin_arch_name()), } } @@ -593,11 +606,12 @@ impl Architecture { } fn cross_triplet(&self) -> String { - let suse_triplet = format!("{self}-suse-linux"); + let arch = self.triple_arch(); + let suse_triplet = format!("{arch}-suse-linux"); if std::path::Path::new(&format!("/usr/{suse_triplet}/sys-root")).exists() { return suse_triplet; } - format!("{self}-linux-gnu") + format!("{arch}-linux-gnu") } fn get_cross_sysroot_path(&self) -> String { @@ -643,6 +657,7 @@ fn dynamic_linker_path(cross_arch: Option) -> &'static str { Some(Architecture::AArch64) => "/lib/ld-linux-aarch64.so.1", Some(Architecture::RiscV64) => "/lib/ld-linux-riscv64-lp64d.so.1", Some(Architecture::LoongArch64) => "/lib/ld-linux-loongarch-lp64d.so.1", + Some(Architecture::Ppc64) => "/lib64/ld64.so.2", } } @@ -705,6 +720,10 @@ fn get_host_architecture() -> Architecture { { Architecture::LoongArch64 } + #[cfg(all(target_arch = "powerpc64", target_endian = "little"))] + { + Architecture::Ppc64 + } } fn is_host_debian_based() -> bool { @@ -2304,14 +2323,20 @@ fn get_c_compiler( (_, "clang", CLanguage::Cpp) => Ok("clang++".to_string()), ( Some( - arch @ (Architecture::AArch64 | Architecture::RiscV64 | Architecture::LoongArch64), + arch @ (Architecture::AArch64 + | Architecture::RiscV64 + | Architecture::LoongArch64 + | Architecture::Ppc64), ), "gcc" | "g++", CLanguage::C, ) => Ok(format!("{}-gcc", arch.cross_triplet())), ( Some( - arch @ (Architecture::AArch64 | Architecture::RiscV64 | Architecture::LoongArch64), + arch @ (Architecture::AArch64 + | Architecture::RiscV64 + | Architecture::LoongArch64 + | Architecture::Ppc64), ), "gcc" | "g++", CLanguage::Cpp, @@ -4434,10 +4459,12 @@ fn find_cross_paths(name: &str) -> HashMap { Architecture::AArch64, Architecture::RiscV64, Architecture::LoongArch64, + Architecture::Ppc64, ] .into_iter() .map(|arch| { - let path = PathBuf::from(format!("/usr/{arch}-linux-gnu/bin/{name}")); + // Use the GNU triple prefix (`powerpc64le`), not the short arch name (`ppc64le`). + let path = PathBuf::from(format!("/usr/{}-linux-gnu/bin/{name}", arch.triple_arch())); if path.exists() { (arch, path) } else { @@ -4624,7 +4651,10 @@ fn run_with_config( .with_context(|| format!("Output binary assertions failed. {program}"))?; } - if config.test_config.run_all_diffs { + // ppc64le: full output-diff parity against the reference linker is pending (glink / + // DT_PPC64_GLINK emission and section alignment aren't matched yet), so we validate that + // binaries link and run, but don't byte-compare them. Drop this carve-out as parity lands. + if config.test_config.run_all_diffs && config.arch != Architecture::Ppc64 { diff_shared_objects(config, &programs)?; diff_executables(config, &programs)?; } diff --git a/wild/tests/sources/elf/archive-activation/archive-activation.c b/wild/tests/sources/elf/archive-activation/archive-activation.c index 55e4a8ed5..517334a38 100644 --- a/wild/tests/sources/elf/archive-activation/archive-activation.c +++ b/wild/tests/sources/elf/archive-activation/archive-activation.c @@ -50,6 +50,7 @@ //#DiffIgnore:section.got //#Config:lto-clang:lto +//#SkipArch: ppc64le //#Compiler:clang //#LinkerDriver:clang //#SkipLinker:ld @@ -60,6 +61,7 @@ //#Archive:empty.a //#Config:lto-clang-thin:lto +//#SkipArch: ppc64le //#Compiler:clang //#LinkerDriver:clang //#SkipLinker:ld diff --git a/wild/tests/sources/elf/backtrace/backtrace.c b/wild/tests/sources/elf/backtrace/backtrace.c index dcc22d8b1..f9d566c74 100644 --- a/wild/tests/sources/elf/backtrace/backtrace.c +++ b/wild/tests/sources/elf/backtrace/backtrace.c @@ -10,6 +10,7 @@ //#RequiresGlibc:true //#Config:eh-frame:default +//#SkipArch: ppc64le //#CompArgs:-O0 -fomit-frame-pointer //#Config:sframe:default diff --git a/wild/tests/sources/elf/call-hidden-archive/call-hidden-archive.c b/wild/tests/sources/elf/call-hidden-archive/call-hidden-archive.c index 7fe927e4f..d81b4db06 100644 --- a/wild/tests/sources/elf/call-hidden-archive/call-hidden-archive.c +++ b/wild/tests/sources/elf/call-hidden-archive/call-hidden-archive.c @@ -3,6 +3,7 @@ // Makes sure we don't incorrectly allow the hidden attribute from the archive to affect the // reference to the dynamic symbol. +//#SkipArch: ppc64le //#Object:runtime.c //#Mode:dynamic //#Shared:call-hidden-archive-lib.c diff --git a/wild/tests/sources/elf/common/runtime.c b/wild/tests/sources/elf/common/runtime.c index 66d5dd1f0..e15918250 100644 --- a/wild/tests/sources/elf/common/runtime.c +++ b/wild/tests/sources/elf/common/runtime.c @@ -53,4 +53,25 @@ void exit_syscall(int exit_code) { : "r"(a7), "r"(a0) : "memory"); } +#elif defined(__powerpc64__) +void exit_syscall(int exit_code) { + register long r0 __asm__("r0") = 1; // __NR_exit + register long r3 __asm__("r3") = exit_code; + __asm__ __volatile__("sc" : "+r"(r3) : "r"(r0) : "memory"); +} +#endif + +#if defined(__powerpc64__) +// Unlike the other targets, gcc on ppc64le lowers large aggregate initialisers to a call to +// memcpy even at -O0, and these freestanding tests don't link libc. Provide a minimal +// implementation. At -O0 gcc doesn't run loop-idiom recognition, so this byte loop is not turned +// back into a memcpy call (verified by disassembly). +void* memcpy(void* dest, const void* src, __SIZE_TYPE__ n) { + char* d = dest; + const char* s = src; + for (__SIZE_TYPE__ i = 0; i < n; i++) { + d[i] = s[i]; + } + return dest; +} #endif diff --git a/wild/tests/sources/elf/copy-relocations/copy-relocations.c b/wild/tests/sources/elf/copy-relocations/copy-relocations.c index b7e9e84b1..b4f61ceee 100644 --- a/wild/tests/sources/elf/copy-relocations/copy-relocations.c +++ b/wild/tests/sources/elf/copy-relocations/copy-relocations.c @@ -1,3 +1,4 @@ +//#SkipArch: ppc64le //#Object:runtime.c //#EnableLinker:lld //#Mode:dynamic diff --git a/wild/tests/sources/elf/cpp-integration/cpp-integration.cc b/wild/tests/sources/elf/cpp-integration/cpp-integration.cc index f9fd8a4af..b7e6aa4bc 100644 --- a/wild/tests/sources/elf/cpp-integration/cpp-integration.cc +++ b/wild/tests/sources/elf/cpp-integration/cpp-integration.cc @@ -13,12 +13,14 @@ //#DiffMatchAny:true //#Config:pie:default +//#SkipArch: ppc64le //#CompArgs:-fpie -fmerge-constants //#LinkerDriver:g++ //#LinkArgs:-pie -Wl,-z,now //#EnableLinker:lld //#Config:no-pie:default +//#SkipArch: ppc64le //#CompArgs:-fno-pie -fmerge-constants //#LinkerDriver:g++ //#LinkArgs:-no-pie -Wl,-z,now @@ -45,6 +47,7 @@ //#Arch: x86_64 //#Config:clang-pie:default +//#SkipArch: ppc64le //#CompArgs:-fpie //#Compiler:clang //#LinkerDriver:clang++ @@ -68,6 +71,7 @@ //#Arch: x86_64 //#Config:clang-crel:default +//#SkipArch: ppc64le //#Compiler:clang //#CompArgs: -Wa,--crel,--allow-experimental-crel //#LinkerDriver:clang++ diff --git a/wild/tests/sources/elf/ctors/ctors.c b/wild/tests/sources/elf/ctors/ctors.c index 0c1cb21ea..52a637b33 100644 --- a/wild/tests/sources/elf/ctors/ctors.c +++ b/wild/tests/sources/elf/ctors/ctors.c @@ -1,3 +1,4 @@ +//#SkipArch: ppc64le //#LinkerDriver:gcc //#DiffIgnore:section.data //#DiffIgnore:section.rodata diff --git a/wild/tests/sources/elf/data-pointers/data-pointers.c b/wild/tests/sources/elf/data-pointers/data-pointers.c index 68fbead46..f0a187c72 100644 --- a/wild/tests/sources/elf/data-pointers/data-pointers.c +++ b/wild/tests/sources/elf/data-pointers/data-pointers.c @@ -1,3 +1,4 @@ +//#SkipArch: ppc64le //#Shared:runtime.c //#EnableLinker:lld //#Mode:dynamic diff --git a/wild/tests/sources/elf/dynamic-bss-only/dynamic-bss-only.c b/wild/tests/sources/elf/dynamic-bss-only/dynamic-bss-only.c index a4ee10d09..737a5f1a6 100644 --- a/wild/tests/sources/elf/dynamic-bss-only/dynamic-bss-only.c +++ b/wild/tests/sources/elf/dynamic-bss-only/dynamic-bss-only.c @@ -1,6 +1,7 @@ // This test sets up the scenario where we have TBSS, but not TDATA. We then have a TLSGD relocation // for a local TLS variable in TBSS. We hope to verify that the TLSGD entry gets the correct offset. +//#SkipArch: ppc64le //#CompArgs:-fPIC -ftls-model=global-dynamic //#LinkArgs:-shared -z now //#RunEnabled:false diff --git a/wild/tests/sources/elf/entry-in-shared/entry-in-shared.c b/wild/tests/sources/elf/entry-in-shared/entry-in-shared.c index c2ff1c28d..a829490ec 100644 --- a/wild/tests/sources/elf/entry-in-shared/entry-in-shared.c +++ b/wild/tests/sources/elf/entry-in-shared/entry-in-shared.c @@ -1,5 +1,6 @@ // https://github.com/wild-linker/wild/issues/1137 //#Config:entry-in-shared +//#SkipArch: ppc64le //#LinkArgs:-shared -z now //#RunEnabled:false //#Object:runtime.c diff --git a/wild/tests/sources/elf/exception/exception.cc b/wild/tests/sources/elf/exception/exception.cc index e5608c943..ff352758f 100644 --- a/wild/tests/sources/elf/exception/exception.cc +++ b/wild/tests/sources/elf/exception/exception.cc @@ -9,9 +9,11 @@ //#DiffIgnore:version._ZSt21ios_base_library_initv //#Config:gcc:default +//#SkipArch: ppc64le //#LinkerDriver:g++ //#Config:clang:default +//#SkipArch: ppc64le //#Compiler:clang //#LinkerDriver:clang++ diff --git a/wild/tests/sources/elf/exclude-libs-selective/exclude-libs-selective.c b/wild/tests/sources/elf/exclude-libs-selective/exclude-libs-selective.c index a90e7d6b9..32bad4dda 100644 --- a/wild/tests/sources/elf/exclude-libs-selective/exclude-libs-selective.c +++ b/wild/tests/sources/elf/exclude-libs-selective/exclude-libs-selective.c @@ -1,4 +1,5 @@ //#Config:default +//#SkipArch: ppc64le //#LinkArgs:-z now -Bshareable --exclude-libs exclude-libs-selective-excluded.a //#Mode:dynamic //#RunEnabled:false @@ -12,6 +13,7 @@ // --whole-archive should not cause us to treat an archive like it's not an archive for the purposes // of --exclude-libs. //#Config:whole-archive:default +//#SkipArch: ppc64le //#LinkArgs:-z now -Bshareable --whole-archive --exclude-libs exclude-libs-selective-excluded.a extern int excluded_fn(void); diff --git a/wild/tests/sources/elf/exclude-libs-single/exclude-libs-single.c b/wild/tests/sources/elf/exclude-libs-single/exclude-libs-single.c index afced6d86..15f1ecf40 100644 --- a/wild/tests/sources/elf/exclude-libs-single/exclude-libs-single.c +++ b/wild/tests/sources/elf/exclude-libs-single/exclude-libs-single.c @@ -1,3 +1,4 @@ +//#SkipArch: ppc64le //#LinkArgs:-z now -Bshareable --exclude-libs somelib //#Mode:dynamic //#RunEnabled:false diff --git a/wild/tests/sources/elf/export-dynamic/export-dynamic.c b/wild/tests/sources/elf/export-dynamic/export-dynamic.c index a5c30bdf1..424f4e41d 100644 --- a/wild/tests/sources/elf/export-dynamic/export-dynamic.c +++ b/wild/tests/sources/elf/export-dynamic/export-dynamic.c @@ -44,6 +44,7 @@ //#EnableLinker:lld //#Config:dynamic-symbols-list +//#SkipArch: ppc64le //#LinkArgs:-z now -shared --dynamic-list ./export-dynamic.def //#ExpectDynSym:foo //#ExpectDynSym:baz diff --git a/wild/tests/sources/elf/global-definitions/global-definitions.c b/wild/tests/sources/elf/global-definitions/global-definitions.c index f94a51c9b..7bf814217 100644 --- a/wild/tests/sources/elf/global-definitions/global-definitions.c +++ b/wild/tests/sources/elf/global-definitions/global-definitions.c @@ -1,3 +1,4 @@ +//#SkipArch: ppc64le //#Object:global_references.c //#Object:runtime.c //#EnableLinker:lld diff --git a/wild/tests/sources/elf/ifunc-shared/ifunc-shared.c b/wild/tests/sources/elf/ifunc-shared/ifunc-shared.c index 0e9344b57..e5286a507 100644 --- a/wild/tests/sources/elf/ifunc-shared/ifunc-shared.c +++ b/wild/tests/sources/elf/ifunc-shared/ifunc-shared.c @@ -1,4 +1,5 @@ //#AbstractConfig:default +//#SkipArch: ppc64le //#RequiresGlibc:true //#Object:compute32.c //#CompArgs:-fPIC diff --git a/wild/tests/sources/elf/ifunc2/ifunc2.c b/wild/tests/sources/elf/ifunc2/ifunc2.c index 975f8a11c..ebf831615 100644 --- a/wild/tests/sources/elf/ifunc2/ifunc2.c +++ b/wild/tests/sources/elf/ifunc2/ifunc2.c @@ -6,6 +6,7 @@ //#RequiresGlibc:true //#Config:pie:default +//#SkipArch: ppc64le //#CompArgs:-fpie //#LinkerDriver:gcc //#LinkArgs:-Wl,-z,now diff --git a/wild/tests/sources/elf/libc-ifunc/libc-ifunc.c b/wild/tests/sources/elf/libc-ifunc/libc-ifunc.c index 8341ac91c..370bfb649 100644 --- a/wild/tests/sources/elf/libc-ifunc/libc-ifunc.c +++ b/wild/tests/sources/elf/libc-ifunc/libc-ifunc.c @@ -1,3 +1,4 @@ +//#SkipArch: ppc64le //#CompArgs:-fPIC -g //#LinkerDriver:gcc //#LinkArgs:-pie -Wl,-z,now diff --git a/wild/tests/sources/elf/libc-integration/libc-integration.c b/wild/tests/sources/elf/libc-integration/libc-integration.c index b04f1aa3b..f56fbb5e6 100644 --- a/wild/tests/sources/elf/libc-integration/libc-integration.c +++ b/wild/tests/sources/elf/libc-integration/libc-integration.c @@ -22,6 +22,7 @@ //#DiffIgnore:.dynamic.DT_NEEDED //#Config:clang-static:default +//#SkipArch: ppc64le //#LinkerDriver:clang //#LinkArgs:-static -Wl,--strip-debug -Wl,--gc-sections -Wl,-z,now //#Object:libc-integration-0.c @@ -31,6 +32,7 @@ //#DiffIgnore:rel.extra-got-plt-got //#Config:clang-static-pie:default +//#SkipArch: ppc64le //#CompArgs:-fPIE -fPIC //#LinkerDriver:clang //#LinkArgs:-static-pie -Wl,--strip-debug -Wl,--gc-sections -Wl,-z,now @@ -47,7 +49,7 @@ //#Object:libc-integration-1.c //#EnableLinker:lld // Seems lld linked binary crashes under QEMU. -//#SkipArch: loongarch64,riscv64 +//#SkipArch: loongarch64,riscv64,ppc64le //#DiffIgnore:rel.extra-got-plt-got //#Config:gcc-static-pie:default @@ -59,9 +61,10 @@ //#EnableLinker:lld // riscv64: lld-linked binary crashes with SIGSEGV under QEMU. // loongarch64: wild produces output that differs from both ld and lld (#1702). -//#SkipArch: loongarch64,riscv64 +//#SkipArch: loongarch64,riscv64,ppc64le //#Config:clang-initial-exec:shared +//#SkipArch: ppc64le //#CompArgs:-g -fPIC -ftls-model=initial-exec -DDYNAMIC_DEP //#LinkerDriver:clang //#LinkArgs:-fPIC -dynamic -Wl,--strip-debug -Wl,--gc-sections -Wl,-rpath,$ORIGIN -Wl,-z,now @@ -70,6 +73,7 @@ //#DiffIgnore:section.relro_padding //#Config:clang-global-dynamic:shared +//#SkipArch: ppc64le //#Compiler:clang //#CompArgs:-g -fPIC -ftls-model=global-dynamic -DDYNAMIC_DEP //#LinkerDriver:clang @@ -88,7 +92,7 @@ //#LinkerDriver:gcc //#LinkArgs:-dynamic -Wl,--strip-debug -Wl,--gc-sections -Wl,-z,now -L./does/not/exist // Fails under QEMU for some reason for both RISC-V and LoongArch64. -//#SkipArch: loongarch64, riscv64 +//#SkipArch: loongarch64, riscv64,ppc64le //#Config:gcc-dynamic-no-pie:shared //#CompArgs:-g -no-pie -DDYNAMIC_DEP -DVERIFY_CTORS @@ -101,7 +105,7 @@ //#EnableLinker:lld //#LinkArgs:-dynamic -no-pie -Wl,--strip-debug -Wl,--gc-sections -Wl,-z,now -L/does/not/exist // Fails under QEMU for some reason for both RISC-V and LoongArch64. -//#SkipArch: loongarch64, riscv64 +//#SkipArch: loongarch64, riscv64,ppc64le //#Config:gcc-dynamic-pie-large:shared //#CompArgs:-g -fpie -DDYNAMIC_DEP -mcmodel=large @@ -112,6 +116,7 @@ //#Arch: x86_64 //#Config:gcc-relr:shared +//#SkipArch: ppc64le //#CompArgs:-g -fpie -DDYNAMIC_DEP -DVERIFY_CTORS //#CompSoArgs:-g -fPIC //#LinkerDriver:gcc @@ -124,6 +129,7 @@ //#Contains:.relr.dyn //#Config:gcc-pack-dyn-relocs-relr:shared +//#SkipArch: ppc64le //#CompArgs:-g -fpie -DDYNAMIC_DEP -DVERIFY_CTORS //#CompSoArgs:-g -fPIC //#LinkerDriver:gcc diff --git a/wild/tests/sources/elf/lto-integration/lto-integration.c b/wild/tests/sources/elf/lto-integration/lto-integration.c index 1aec8c1fa..7e6fe9c93 100644 --- a/wild/tests/sources/elf/lto-integration/lto-integration.c +++ b/wild/tests/sources/elf/lto-integration/lto-integration.c @@ -1,4 +1,5 @@ //#Config:clang +//#SkipArch: ppc64le //#RequiresLinkerPlugin:true //#LinkerDriver:clang //#SkipLinker:ld diff --git a/wild/tests/sources/elf/mixed-verdef-verneed/mixed-verdef-verneed.c b/wild/tests/sources/elf/mixed-verdef-verneed/mixed-verdef-verneed.c index 491efad37..b2ddc5dad 100644 --- a/wild/tests/sources/elf/mixed-verdef-verneed/mixed-verdef-verneed.c +++ b/wild/tests/sources/elf/mixed-verdef-verneed/mixed-verdef-verneed.c @@ -1,5 +1,6 @@ // Makes sure that having both verdef and verneed doesn't cause problems. +//#SkipArch: ppc64le //#Mode:dynamic //#Object:runtime.c //#LinkArgs:-z now --version-script ./mixed-verdef-verneed.map diff --git a/wild/tests/sources/elf/nmagic/nmagic.c b/wild/tests/sources/elf/nmagic/nmagic.c index 43487a289..3ec4bf341 100644 --- a/wild/tests/sources/elf/nmagic/nmagic.c +++ b/wild/tests/sources/elf/nmagic/nmagic.c @@ -1,4 +1,5 @@ //#Config:default +//#SkipArch: ppc64le //#LinkArgs:--nmagic -z relro //#Object:runtime.c //#NoProgramHeader:PHDR @@ -12,10 +13,13 @@ //#ExpectLoadAlignment:0x8 0x20 //#Config:warn-max-page-size:default +//#SkipArch: ppc64le //#LinkArgs:--nmagic -z max-page-size=65536 //#ExpectWarningWild:-z max-page-size is incompatible with --nmagic //#Config:no-dynamic-linking:default +// Re-enable ppc64le here: this config links fine, but inherits the SkipArch from `default`. +//#Arch: x86_64,aarch64,riscv64,loongarch64,ppc64le //#Shared:force-dynamic-linking.c //#ExpectError:(?i)Attempted static link of dynamic object diff --git a/wild/tests/sources/elf/pack-relative-relocs-shared/pack-relative-relocs-shared.c b/wild/tests/sources/elf/pack-relative-relocs-shared/pack-relative-relocs-shared.c index caefaac92..73dbb357a 100644 --- a/wild/tests/sources/elf/pack-relative-relocs-shared/pack-relative-relocs-shared.c +++ b/wild/tests/sources/elf/pack-relative-relocs-shared/pack-relative-relocs-shared.c @@ -1,4 +1,5 @@ //#Config:wild-so +//#SkipArch: ppc64le //#SoSingleLinker:wild //#LinkerDriver:gcc //#LinkArgs:-Wl,-z,now,-z,pack-relative-relocs diff --git a/wild/tests/sources/elf/relocatables/relocatables.c b/wild/tests/sources/elf/relocatables/relocatables.c index 2f0b744bf..4b4a07e1d 100644 --- a/wild/tests/sources/elf/relocatables/relocatables.c +++ b/wild/tests/sources/elf/relocatables/relocatables.c @@ -1,3 +1,4 @@ +//#SkipArch: ppc64le //#EnableLinker:lld //#Object:runtime.c //#Relocatable:relocatable-1.c,relocatable-2.c diff --git a/wild/tests/sources/elf/relro/relro.c b/wild/tests/sources/elf/relro/relro.c index cb70abc24..d186ca2a9 100644 --- a/wild/tests/sources/elf/relro/relro.c +++ b/wild/tests/sources/elf/relro/relro.c @@ -9,10 +9,12 @@ //#DiffIgnore:.dynamic.DT_RELAENT //#Config:enabled:default +//#SkipArch: ppc64le //#LinkArgs:-z relro //#ExpectProgramHeader:GNU_RELRO //#Config:disabled:default +//#SkipArch: ppc64le //#LinkArgs:-z norelro //#NoProgramHeader:GNU_RELRO //#DoesNotContain:relro_padding diff --git a/wild/tests/sources/elf/rust-integration-dynamic/rust-integration-dynamic.rs b/wild/tests/sources/elf/rust-integration-dynamic/rust-integration-dynamic.rs index b8b874e45..02c76c96b 100644 --- a/wild/tests/sources/elf/rust-integration-dynamic/rust-integration-dynamic.rs +++ b/wild/tests/sources/elf/rust-integration-dynamic/rust-integration-dynamic.rs @@ -1,4 +1,5 @@ //#Config:default +//#SkipArch: ppc64le //#DiffIgnore:.dynamic.* // It looks like GNU ld sets .tdata's alignment to match .tbss's alignment //#DiffIgnore:section.tdata.alignment diff --git a/wild/tests/sources/elf/rust-integration/rust-integration.rs b/wild/tests/sources/elf/rust-integration/rust-integration.rs index 8f5eb2a9b..992ed9973 100644 --- a/wild/tests/sources/elf/rust-integration/rust-integration.rs +++ b/wild/tests/sources/elf/rust-integration/rust-integration.rs @@ -37,6 +37,7 @@ //#DiffIgnore:section.debug_str.entsize //#Config:llvm-dynamic:default +//#SkipArch: ppc64le //#CompArgs:-C debuginfo=2 //#DiffIgnore:.dynamic.DT_JMPREL //#DiffIgnore:.dynamic.DT_PLTGOT diff --git a/wild/tests/sources/elf/rust-tls/rust-tls.rs b/wild/tests/sources/elf/rust-tls/rust-tls.rs index af02d81da..49a3baad0 100644 --- a/wild/tests/sources/elf/rust-tls/rust-tls.rs +++ b/wild/tests/sources/elf/rust-tls/rust-tls.rs @@ -6,15 +6,19 @@ //#DiffIgnore:.dynamic.DT_TEXTREL //#Config:global-dynamic:default +//#SkipArch: ppc64le //#CompArgs:-Ztls-model=global-dynamic //#Config:local-dynamic:default +//#SkipArch: ppc64le //#CompArgs:-Ztls-model=local-dynamic //#Config:initial-exec:default +//#SkipArch: ppc64le //#CompArgs:-Ztls-model=initial-exec //#Config:local-exec:default +//#SkipArch: ppc64le //#CompArgs:-Ztls-model=local-exec use std::cell::Cell; diff --git a/wild/tests/sources/elf/section-start/section-start.c b/wild/tests/sources/elf/section-start/section-start.c index 57478f3c5..22bac401a 100644 --- a/wild/tests/sources/elf/section-start/section-start.c +++ b/wild/tests/sources/elf/section-start/section-start.c @@ -6,7 +6,7 @@ //#DiffIgnore:section.rodata.alignment //#DiffIgnore:section.data //#DiffIgnore:section.sdata -//#SkipArch:loongarch64 +//#SkipArch:loongarch64,ppc64le /* BFD rejects the code on loongarch: relocation truncated to fit: R_LARCH_B26 against symbol `foo' defined in .foo section. */ diff --git a/wild/tests/sources/elf/shared-priority/shared-priority.c b/wild/tests/sources/elf/shared-priority/shared-priority.c index 8310fdb0c..a8ceee6fe 100644 --- a/wild/tests/sources/elf/shared-priority/shared-priority.c +++ b/wild/tests/sources/elf/shared-priority/shared-priority.c @@ -14,6 +14,7 @@ //#DiffIgnore:dynsym.var1.section //#Config:shared-first-archive-not-loaded:default +//#SkipArch: ppc64le //#Shared:shared-priority-1.c //#Archive:shared-priority-2.c diff --git a/wild/tests/sources/elf/shared/shared.c b/wild/tests/sources/elf/shared/shared.c index 70c10045c..0869cfbbd 100644 --- a/wild/tests/sources/elf/shared/shared.c +++ b/wild/tests/sources/elf/shared/shared.c @@ -2,6 +2,7 @@ // object and having that symbol be defined by an archive entry that we don't load. //#Config:default +//#SkipArch: ppc64le //#LinkArgs:-shared -z now //#Mode:dynamic //#RunDynSym:foo @@ -14,6 +15,7 @@ //#ExpectDynSym:call_bar1 //#Config:symbolic:default +//#SkipArch: ppc64le //#LinkArgs:-shared -z now -Bsymbolic //#DiffIgnore:.dynamic.DT_FLAGS.SYMBOLIC //#DiffIgnore:.dynamic.DT_SYMBOLIC @@ -22,12 +24,15 @@ //#ExpectDynamic:DT_FLAGS //#Config:symbolic-functions:default +//#SkipArch: ppc64le //#LinkArgs:-shared -z now -Bsymbolic-functions //#Config:nosymbolic:default +//#SkipArch: ppc64le //#LinkArgs:-shared -z now -Bno-symbolic //#Config:symbolic-non-weak:default +//#SkipArch: ppc64le //#LinkArgs:-shared -z now -Bsymbolic-non-weak //#SkipLinker:ld //#EnableLinker:lld @@ -35,6 +40,7 @@ //#DiffIgnore:section.relro_padding //#Config:symbolic-non-weak-functions:default +//#SkipArch: ppc64le //#LinkArgs:-shared -z now -Bsymbolic-non-weak-functions //#SkipLinker:ld //#EnableLinker:lld diff --git a/wild/tests/sources/elf/shlib-archive-activation/shlib-archive-activation.c b/wild/tests/sources/elf/shlib-archive-activation/shlib-archive-activation.c index 00a470ef0..123bb3f16 100644 --- a/wild/tests/sources/elf/shlib-archive-activation/shlib-archive-activation.c +++ b/wild/tests/sources/elf/shlib-archive-activation/shlib-archive-activation.c @@ -9,6 +9,7 @@ //#DiffIgnore:.dynamic.DT_NEEDED //#Config:archive:default +//#SkipArch: ppc64le //#Shared:shlib-archive-activation-1.c //#Archive:shlib-archive-activation-2.c diff --git a/wild/tests/sources/elf/shlib-undefined/shlib-undefined.c b/wild/tests/sources/elf/shlib-undefined/shlib-undefined.c index e5a83597c..7cb584ec6 100644 --- a/wild/tests/sources/elf/shlib-undefined/shlib-undefined.c +++ b/wild/tests/sources/elf/shlib-undefined/shlib-undefined.c @@ -17,12 +17,14 @@ // Allow linking against shared object with undefined symbols. We don't run this because the runtime // linker would error due to the undefined symbol. //#Config:allow:default +//#SkipArch: ppc64le //#Shared:shlib-undefined-2.c //#LinkArgs:--allow-shlib-undefined -z now // This should also succeed to link because our shared object depends on another shared object that // we don't have loaded. //#Config:disallow-incomplete:default +//#SkipArch: ppc64le //#Shared:shlib-undefined-2.c //#LinkArgs:--no-allow-shlib-undefined @@ -35,6 +37,7 @@ //#ExpectError:def2 //#Config:shared:default +//#SkipArch: ppc64le //#Shared:shlib-undefined-2.c //#LinkArgs:-z now -shared //#RunEnabled:false diff --git a/wild/tests/sources/elf/symbol-versions/symbol-versions.c b/wild/tests/sources/elf/symbol-versions/symbol-versions.c index b9e5e1346..4063133dd 100644 --- a/wild/tests/sources/elf/symbol-versions/symbol-versions.c +++ b/wild/tests/sources/elf/symbol-versions/symbol-versions.c @@ -14,13 +14,16 @@ //#EnableLinker:lld //#Config:verdef-0:verdef +//#SkipArch: ppc64le //#TestUpdateInPlace:true //#LinkArgs:--shared --version-script=./symbol-versions-script.map //#Config:verdef-1:verdef +//#SkipArch: ppc64le //#LinkArgs:--shared --soname=symbol-versions.so --version-script=./symbol-versions-script.map //#Config:verdef-lto:verdef +//#SkipArch: ppc64le //#RequiresLinkerPlugin:true //#LinkerDriver:gcc //#CompArgs:-flto -znow @@ -28,6 +31,7 @@ //#DiffIgnore:eh_frame //#Config:with-escaping:verdef +//#SkipArch: ppc64le //#LinkArgs:--shared --version-script=./symbol-versions-with-escaping.map #include "../common/runtime.h" diff --git a/wild/tests/sources/elf/symver-shared/symver-shared.c b/wild/tests/sources/elf/symver-shared/symver-shared.c index db034c603..9dfba03d8 100644 --- a/wild/tests/sources/elf/symver-shared/symver-shared.c +++ b/wild/tests/sources/elf/symver-shared/symver-shared.c @@ -2,6 +2,7 @@ // contains the definition foo@VER_1.0. Note that the definition with a single '@' is not the // default version. i.e. it doesn't bind 'foo'. +//#SkipArch: ppc64le //#Object:runtime.c //#Shared:symver-shared-1.c //#Shared:symver-shared-2.c diff --git a/wild/tests/sources/elf/tls-common/tls-common.c b/wild/tests/sources/elf/tls-common/tls-common.c index 005c9d1f6..369de29d4 100644 --- a/wild/tests/sources/elf/tls-common/tls-common.c +++ b/wild/tests/sources/elf/tls-common/tls-common.c @@ -2,6 +2,7 @@ // section with TLS flag. This is necessary to fully stress the linker. //#Config:default +//#SkipArch: ppc64le //#LinkArgs:-z now //#Mode:dynamic //#Shared:runtime.c diff --git a/wild/tests/sources/elf/tls-custom/tls-custom.c b/wild/tests/sources/elf/tls-custom/tls-custom.c index 57542ed6e..2554cb96f 100644 --- a/wild/tests/sources/elf/tls-custom/tls-custom.c +++ b/wild/tests/sources/elf/tls-custom/tls-custom.c @@ -1,5 +1,6 @@ // Verifies that we can handle a custom, NOBITS TLS section. +//#SkipArch: ppc64le //#LinkerDriver:gcc //#Object:tls-custom-1.s //#EnableLinker:lld diff --git a/wild/tests/sources/elf/tls-local-dynamic/tls-local-dynamic.c b/wild/tests/sources/elf/tls-local-dynamic/tls-local-dynamic.c index 7497cfc27..4c3226d39 100644 --- a/wild/tests/sources/elf/tls-local-dynamic/tls-local-dynamic.c +++ b/wild/tests/sources/elf/tls-local-dynamic/tls-local-dynamic.c @@ -4,6 +4,7 @@ //#DiffIgnore:dynsym.foo.section //#Config:gcc:default +//#SkipArch: ppc64le //#CompArgs:-ftls-model=local-dynamic -fPIC -O2 //#LinkerDriver:gcc //#LinkArgs:-Wl,-z,now @@ -13,7 +14,7 @@ //#DiffEnabled:false // TODO: For some reason, the test fails under QEMU for LoongArch64, even though it runs correctly // on a native Alpine Linux system. -//#SkipArch:loongarch64 +//#SkipArch:loongarch64,ppc64le //#Config:gcc-no-relax-aarch64:gcc-no-relax //#CompArgs:-ftls-model=local-dynamic -fPIC -O2 -mtls-dialect=trad diff --git a/wild/tests/sources/elf/tls-local-exec/tls-local-exec.c b/wild/tests/sources/elf/tls-local-exec/tls-local-exec.c index d57c1c074..fc3996143 100644 --- a/wild/tests/sources/elf/tls-local-exec/tls-local-exec.c +++ b/wild/tests/sources/elf/tls-local-exec/tls-local-exec.c @@ -5,6 +5,7 @@ //#DiffIgnore:section.rodata.alignment //#Config:pie:default +//#SkipArch: ppc64le //#CompArgs:-fpie //#LinkerDriver:gcc //#LinkArgs:-Wl,-z,now diff --git a/wild/tests/sources/elf/tls-variant/tls-variant.c b/wild/tests/sources/elf/tls-variant/tls-variant.c index abfbded0d..572e0dd31 100644 --- a/wild/tests/sources/elf/tls-variant/tls-variant.c +++ b/wild/tests/sources/elf/tls-variant/tls-variant.c @@ -23,7 +23,7 @@ //#Object:tls-variant-1.c //#Object:tls-variant-2.c:-ftls-model=global-dynamic -mtls-dialect=trad //#Object:tls-variant-3.c:-ftls-model=initial-exec -mtls-dialect=trad -//#SkipArch: x86_64,riscv64 +//#SkipArch: x86_64,riscv64,ppc64le //#Config:gcc-shared-tls-trad:default //#CompArgs:-fpic diff --git a/wild/tests/sources/elf/tlsdesc/tlsdesc.c b/wild/tests/sources/elf/tlsdesc/tlsdesc.c index accb6bc93..f3e8104b6 100644 --- a/wild/tests/sources/elf/tlsdesc/tlsdesc.c +++ b/wild/tests/sources/elf/tlsdesc/tlsdesc.c @@ -14,7 +14,7 @@ //#Config:gcc-tls-desc-desc:gcc-tls-desc //#CompArgs:-mtls-dialect=desc -fPIC -//#SkipArch: x86_64,riscv64 +//#SkipArch: x86_64,riscv64,ppc64le //#Config:gcc-tls-desc-pie:gcc-tls-desc //#CompArgs:-mtls-dialect=gnu2 -fPIE @@ -22,7 +22,7 @@ //#Config:gcc-tls-desc-pie-desc:gcc-tls-desc-pie //#CompArgs:-mtls-dialect=desc -//#SkipArch: x86_64,riscv64 +//#SkipArch: x86_64,riscv64,ppc64le //#Config:gcc-tls-desc-static:gcc-tls-desc //#CompArgs:-mtls-dialect=gnu2 -fPIC -static @@ -37,7 +37,7 @@ //#Config:gcc-tls-desc-shared-desc:gcc-tls-desc-shared //#CompArgs:-mtls-dialect=desc -//#SkipArch: x86_64,riscv64,loongarch64 +//#SkipArch: x86_64,riscv64,loongarch64,ppc64le //#Config:clang-tls-desc:gcc-tls-desc //#CompArgs:-mtls-dialect=gnu2 -fPIC diff --git a/wild/tests/sources/elf/trivial-dynamic/trivial-dynamic.c b/wild/tests/sources/elf/trivial-dynamic/trivial-dynamic.c index 378fa1cf2..d65d273d4 100644 --- a/wild/tests/sources/elf/trivial-dynamic/trivial-dynamic.c +++ b/wild/tests/sources/elf/trivial-dynamic/trivial-dynamic.c @@ -1,4 +1,5 @@ //#Config:default +//#SkipArch: ppc64le //#Object:runtime.c //#EnableLinker:lld //#Mode:dynamic @@ -17,14 +18,17 @@ //#DiffMatchAny:true //#Config:origin:default +//#SkipArch: ppc64le //#LinkArgs:-z now -z origin //#ExpectDynamic:DT_FLAGS //#Config:nodelete:default +//#SkipArch: ppc64le //#LinkArgs:-z now -z nodelete //#ExpectDynamic:DT_FLAGS_1 //#Config:symbolic:default +//#SkipArch: ppc64le //#LinkArgs:-z now -Bsymbolic // TODO: Set these //#DiffIgnore:.dynamic.DT_FLAGS.SYMBOLIC diff --git a/wild/tests/sources/elf/trivial-main/trivial-main.c b/wild/tests/sources/elf/trivial-main/trivial-main.c index 97ededa1c..e504b0f73 100644 --- a/wild/tests/sources/elf/trivial-main/trivial-main.c +++ b/wild/tests/sources/elf/trivial-main/trivial-main.c @@ -7,8 +7,10 @@ //#ExpectSym:main //#Config:gcc:default +//#SkipArch: ppc64le //#Config:gcc-static:default +//#SkipArch: ppc64le //#LinkArgs:-static -Wl,--gc-sections //#DiffIgnore:section.rela.plt.link //#DiffIgnore:section.sdata @@ -22,9 +24,10 @@ //#DiffEnabled:false //#SkipLinker:ld // TODO: #874 -//#SkipArch: riscv64 +//#SkipArch: riscv64,ppc64le //#Config:clang-static:default +//#SkipArch: ppc64le //#Compiler:clang //#LinkArgs:-static //#DiffIgnore:section.rela.plt.link @@ -38,9 +41,10 @@ //#DiffEnabled:false //#SkipLinker:ld // For some reason, both linkers cannot find: `rcrt1.o` -//#SkipArch: riscv64 +//#SkipArch: riscv64,ppc64le //#Config:clang:default +//#SkipArch: ppc64le //#Compiler: clang //#Config:gcc-indirect-external:default diff --git a/wild/tests/sources/elf/undef-transitive/undef-transitive.c b/wild/tests/sources/elf/undef-transitive/undef-transitive.c index da378876c..1e6d8d9ae 100644 --- a/wild/tests/sources/elf/undef-transitive/undef-transitive.c +++ b/wild/tests/sources/elf/undef-transitive/undef-transitive.c @@ -6,11 +6,13 @@ //#Mode:dynamic //#Config:object-first:default +//#SkipArch: ppc64le //#Object:undef-transitive-1.c //#Shared:undef-transitive-2.c //#ExpectError:foo //#Config:shlib-first:default +//#SkipArch: ppc64le //#Shared:undef-transitive-2.c //#Object:undef-transitive-1.c //#ExpectError:foo