+
+ * ld-elf/eh1.d: Add explicit --64 to as options, and explicit
+ -melf_x86_64 and -Ttext to ld options, so we don't assume every
+ x86_64-*-* target uses --64 (vs --x32) by default or has the
+ same address space layout.
+ * ld-elf/eh2.d: Likewise.
+ * ld-elf/eh3.d: Likewise.
+ * ld-elf/eh4.d: Likewise.
+ * ld-elf/elf.exp: For target *-*-nacl*, use options_regsub(ld) to
+ map -melf_x86_64 to -melf_x86_64_nacl.
+
* ld-sparc/tlssunbin32.rd: Fix regexp.
set LDFLAGS "$LDFLAGS -Ttext-segment 0x1000000"
}
+if { [istarget "*-*-nacl*"] } {
+ # The eh[1-4] cases are written to expect ELFCLASS64 layout on x86-64.
+ # But the target default is ELFCLASS32. So the cases explicitly use
+ # -melf_x86_64 to select that, but NaCl needs a different emulation name.
+ set options_regsub(ld) {-melf_x86_64 -melf_x86_64_nacl}
+}
+
if { [is_remote host] } then {
remote_download host merge.ld
}