diff options
author | David E. O'Brien <obrien@FreeBSD.org> | 2006-09-12 07:03:58 +0000 |
---|---|---|
committer | David E. O'Brien <obrien@FreeBSD.org> | 2006-09-12 07:03:58 +0000 |
commit | 6b31c6b17ff6284900c29c976c71dbb0010d4569 (patch) | |
tree | 4e865d3cb9c95fc9b82bb545240e8fcd3b733db9 /gnu | |
parent | da07c79f6a43469e4256fdabea8fa9677d657d32 (diff) | |
download | src-6b31c6b17ff6284900c29c976c71dbb0010d4569.tar.gz src-6b31c6b17ff6284900c29c976c71dbb0010d4569.zip |
Craft the FreeBSD/ARM ABI by hacking the New ARM ABI source.
Submitted by: cognet
Notes
Notes:
svn path=/head/; revision=162243
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/usr.bin/binutils/libbfd/Makefile.arm | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/gnu/usr.bin/binutils/libbfd/Makefile.arm b/gnu/usr.bin/binutils/libbfd/Makefile.arm index 4178b29f9293..cccec427e325 100644 --- a/gnu/usr.bin/binutils/libbfd/Makefile.arm +++ b/gnu/usr.bin/binutils/libbfd/Makefile.arm @@ -19,3 +19,27 @@ VECS+= bfd_elf32_littlearm_vec .else VECS+= bfd_elf32_bigarm_vec .end + +CLEANFILES+= elf32-arm-fbsd.c + +# XXX: We should really add the FreeBSD case in elf32_arm_nabi_grok_prstatus +# instead of defining our own elf32_fbsd_arm_grok_prstatus. +# +elf32-arm-fbsd.c: elfarm-nabi.c + cat ${.ALLSRC} | sed \ + -e s/ELFOSABI_ARM/ELFOSABI_FREEBSD/g \ + -e "s/\(.*#define.*\)elf32_arm_nabi_grok_prstatus/\1elf32_fbsd_arm_grok_prstatus/" + -e s/"#include.*elf32-arm.h.*//" >${.TARGET} + echo '\ + static bfd_boolean \ + elf32_fbsd_arm_grok_prstatus(bfd *abfd, Elf_Internal_Note *note) \ + { size_t raw_size =68 ; int offset = 28; \ + if (note->descsz != 96) return (FALSE); \ + if (elf_tdata(abfd)->core_signal == 0) \ + elf_tdata (abfd)->core_signal = ((int *)(note->descdata))[5]; \ + elf_tdata (abfd)->core_pid = ((int *)(note->descdata))[6]; \ + /* Make a ".reg/999" section. */ \ + return _bfd_elfcore_make_pseudosection (abfd, ".reg",raw_size, \ + note->descpos + offset); \ + }' >> ${.TARGET} + echo '#include "elf32-arm.h"' >> ${.TARGET} |