Make sure elf_fbsd_post_process_headers() is actually called for ia64.

This is done by prepending the file to elfxx-ia64, not appending it.

Additionally, reduce diffs between Makefile.amd64 and Makefile.ia64;
instead of echo'ing defines in Makefiles, just add the needed define to
elf-fbsd-brand.c directly, as it is only used for amd64 and ia64.
This commit is contained in:
Dimitry Andric 2010-10-26 17:49:17 +00:00
parent 0a0025449d
commit 1368e47f87
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/projects/binutils-2.17/; revision=214385
3 changed files with 9 additions and 8 deletions

View File

@ -20,14 +20,13 @@ VECS= ${DEFAULT_VECTOR} \
bfd_efi_app_ia32_vec \
${I386_VECS}
CLEANFILES+= elf64-amd64-fbsd.c pepigen.c peigen.c
CLEANFILES+= elf64-amd64-fbsd.c pepigen.c # peigen.c
elf64-amd64-fbsd.c: ${.CURDIR}/elf-fbsd-brand.c ${SRCDIR}/bfd/elf64-x86-64.c
cat ${.ALLSRC:M*elf-fbsd-brand.c} > ${.TARGET}
echo "#define elf_backend_post_process_headers elf_fbsd_post_process_headers" \
>> ${.TARGET}
cat ${.ALLSRC:M*elf64-x86-64.c} >> ${.TARGET}
elf64-amd64-fbsd.c: elf-fbsd-brand.c elf64-x86-64.c
cat ${.ALLSRC} > ${.TARGET}
pepigen.c: peXXigen.c
sed -e s/XX/pep/g ${.ALLSRC} > ${.TARGET}
peigen.c: peXXigen.c
sed -e s/XX/pe/g ${.ALLSRC} > ${.TARGET}

View File

@ -23,8 +23,8 @@ VECS+= ${DEFAULT_VECTOR} \
CLEANFILES+= elf64-ia64.c pepigen.c # peigen.c
elf64-ia64.c: elfxx-ia64.c elf-fbsd-brand.c
cat ${.ALLSRC} | sed -e s/NN/64/g > ${.TARGET}
elf64-ia64.c: elf-fbsd-brand.c elfxx-ia64.c
sed -e s/NN/64/g ${.ALLSRC} > ${.TARGET}
pepigen.c: peXXigen.c
sed -e s/XX/pep/g ${.ALLSRC} > ${.TARGET}

View File

@ -49,3 +49,5 @@ elf_fbsd_post_process_headers (abfd, link_info)
/* Put an ABI label supported by FreeBSD >= 4.1. */
i_ehdrp->e_ident[EI_OSABI] = ELFOSABI_FREEBSD;
}
#define elf_backend_post_process_headers elf_fbsd_post_process_headers