Index: binutils-2.23.1/ld/emulparams/aarch64elf.sh =================================================================== --- binutils-2.23.1.orig/ld/emulparams/aarch64elf.sh +++ binutils-2.23.1/ld/emulparams/aarch64elf.sh @@ -33,3 +33,14 @@ ATTRS_SECTIONS='.ARM.attributes 0 : { KE # This sets the stack to the top of the simulator memory (2^19 bytes). STACK_ADDR=0x80000 + +# For Linux modify the default library search path +# to first include a 64-bit specific directory. +case "$target" in + aarch64*-linux*) + case "$EMULATION_NAME" in + *) LIBPATH_SUFFIX=64 ;; + esac + ;; +esac + Index: binutils-2.23.1/ld/emulparams/aarch64linux.sh =================================================================== --- binutils-2.23.1.orig/ld/emulparams/aarch64linux.sh +++ binutils-2.23.1/ld/emulparams/aarch64linux.sh @@ -34,3 +34,14 @@ OTHER_SECTIONS='.note.gnu.arm.ident 0 : ATTRS_SECTIONS='.ARM.attributes 0 : { KEEP (*(.ARM.attributes)) KEEP (*(.gnu.attributes)) }' # Ensure each PLT entry is aligned to a cache line. PLT=".plt ${RELOCATING-0} : ALIGN(16) { *(.plt)${IREL_IN_PLT+ *(.iplt)} }" + +# For Linux modify the default library search path +# to first include a 64-bit specific directory. +case "$target" in + aarch64*-linux*) + case "$EMULATION_NAME" in + *) LIBPATH_SUFFIX=64 ;; + esac + ;; +esac +