This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
bfd/elfxx-ia64.c patch
- From: Steve Ellcey <sje at cup dot hp dot com>
- To: binutils at sources dot redhat dot com
- Date: Tue, 22 Jan 2002 17:05:42 -0800 (PST)
- Subject: bfd/elfxx-ia64.c patch
- Reply-to: sje at cup dot hp dot com
I think elfxx-ia64.c may be unique in that it has two specialized
vectors defined at the end of it, one for AIX and one for HP-UX. This
results in the necessity of "resetting" any macros that are defined to
AIX specific functions back to their defaults before defining the HP-UX
vector. Without this the HP-UX vector could call some AIX functions
which is not what is desired.
I am not entirely happy with the way I am doing this but I couldn't find
a cleaner way to reset them. I tried "saving" the old value of
elf_backend_add_symbol_hook and bfd_elfNN_bfd_link_add_symbols in
another macro before AIX reset them but that did not work.
Can someone review this and, if it is OK, check it in. I have no write
permission but do have a copyright assignment on file.
Steve Ellcey
sje@cup.hp.com
2002-01-22 Steve Ellcey <sje@cup.hp.com>
* bfd/elfxx-ia64.c: Reset AIX vector function overrides for HP-UX.
*** src.orig/bfd/elfxx-ia64.c Tue Jan 22 16:53:07 2002
--- src/bfd/elfxx-ia64.c Tue Jan 22 16:55:47 2002
*************** elfNN_hpux_backend_section_from_bfd_sect
*** 4591,4596 ****
--- 4591,4597 ----
#include "elfNN-target.h"
+
/* HPUX-specific vectors. */
#undef TARGET_LITTLE_SYM
*************** elfNN_hpux_backend_section_from_bfd_sect
*** 4599,4604 ****
--- 4600,4615 ----
#define TARGET_BIG_SYM bfd_elfNN_ia64_hpux_big_vec
#undef TARGET_BIG_NAME
#define TARGET_BIG_NAME "elfNN-ia64-hpux-big"
+
+ /* We need to undo the AIX specific functions. */
+
+ #undef elf_backend_add_symbol_hook
+ #define elf_backend_add_symbol_hook elfNN_ia64_add_symbol_hook
+
+ #undef bfd_elfNN_bfd_link_add_symbols
+ #define bfd_elfNN_bfd_link_add_symbols _bfd_generic_link_add_symbols
+
+ /* These are HP-UX specific functions. */
#undef elf_backend_post_process_headers
#define elf_backend_post_process_headers elfNN_hpux_post_process_headers