From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22434 invoked by alias); 23 Jan 2002 01:05:53 -0000 Mailing-List: contact binutils-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sources.redhat.com Received: (qmail 22401 invoked from network); 23 Jan 2002 01:05:52 -0000 Received: from unknown (HELO palrel11.hp.com) (156.153.255.246) by sources.redhat.com with SMTP; 23 Jan 2002 01:05:52 -0000 Received: from hpda.cup.hp.com (hpda.cup.hp.com [15.75.208.53]) by palrel11.hp.com (Postfix) with ESMTP id B1F11E00987 for ; Tue, 22 Jan 2002 17:05:52 -0800 (PST) Received: from hpsje.cup.hp.com (hpsje.cup.hp.com [15.0.98.5]) by hpda.cup.hp.com (Postfix) with ESMTP id 4778374E6 for ; Tue, 22 Jan 2002 17:05:42 -0800 (PST) Received: (from sje@localhost) by hpsje.cup.hp.com (8.8.6 (PHNE_17190)/8.7.3 TIS Messaging 5.0) id RAA13204 for binutils@sources.redhat.com; Tue, 22 Jan 2002 17:05:42 -0800 (PST) Date: Tue, 22 Jan 2002 17:46:00 -0000 From: Steve Ellcey Message-Id: <200201230105.RAA13204@hpsje.cup.hp.com> To: binutils@sources.redhat.com Subject: bfd/elfxx-ia64.c patch Reply-To: sje@cup.hp.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2002-01/txt/msg00453.txt.bz2 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 * 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