diff options
author | Nick Clifton <nickc@redhat.com> | 2003-01-20 18:06:21 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2003-01-20 18:06:21 +0000 |
commit | 571fe01fe0fda48588110eec401755cd82a512e7 (patch) | |
tree | cf79e4cfa4aac87c32e3e4a3122c5e501fc1174f /bfd | |
parent | f2dd3617b5abbdbf929f7b07cb3da97f518aef85 (diff) | |
download | gdb-571fe01fe0fda48588110eec401755cd82a512e7.zip gdb-571fe01fe0fda48588110eec401755cd82a512e7.tar.gz gdb-571fe01fe0fda48588110eec401755cd82a512e7.tar.bz2 |
Treat elfNN_bed like other macros defined in elfxx-target.h and #undef it
before #define'ing it.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 9 | ||||
-rw-r--r-- | bfd/elf32-i386.c | 45 | ||||
-rw-r--r-- | bfd/elf32-sh.c | 43 | ||||
-rw-r--r-- | bfd/elf32-sh64.c | 9 | ||||
-rw-r--r-- | bfd/elf64-alpha.c | 111 |
5 files changed, 108 insertions, 109 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index dc405cc..eb037e2 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,12 @@ +2003-01-20 Fabio Alemagna <falemagn@aros.org> + + * elf32-sh.c: Treat elfNN_bed like other macros defined in + elfxx-target.h and #undef it before #define'ing it. + * elf32-i386.c: Likewise. + * elf32-sh64.c: Likewise. + * elf64-alpha.c: Likewise. + * elf64-sh64.c: Likewise. + 2003-01-20 Martin Schwidefsky <schwidefsky@de.ibm.com> * bfd-in2.h: Regenerate. diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c index 9c94887..69292da 100644 --- a/bfd/elf32-i386.c +++ b/bfd/elf32-i386.c @@ -1,22 +1,22 @@ /* Intel 80386/80486-specific support for 32-bit ELF - Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 + Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. -This file is part of BFD, the Binary File Descriptor library. + This file is part of BFD, the Binary File Descriptor library. -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "bfd.h" #include "sysdep.h" @@ -41,9 +41,9 @@ static struct bfd_hash_entry *link_hash_newfunc static struct bfd_link_hash_table *elf_i386_link_hash_table_create PARAMS ((bfd *)); static bfd_boolean create_got_section - PARAMS((bfd *, struct bfd_link_info *)); + PARAMS ((bfd *, struct bfd_link_info *)); static bfd_boolean elf_i386_create_dynamic_sections - PARAMS((bfd *, struct bfd_link_info *)); + PARAMS ((bfd *, struct bfd_link_info *)); static void elf_i386_copy_indirect_symbol PARAMS ((struct elf_backend_data *, struct elf_link_hash_entry *, struct elf_link_hash_entry *)); @@ -51,9 +51,9 @@ static int elf_i386_tls_transition PARAMS ((struct bfd_link_info *, int, int)); static bfd_boolean elf_i386_mkobject - PARAMS((bfd *)); + PARAMS ((bfd *)); static bfd_boolean elf_i386_object_p - PARAMS((bfd *)); + PARAMS ((bfd *)); static bfd_boolean elf_i386_check_relocs PARAMS ((bfd *, struct bfd_link_info *, asection *, const Elf_Internal_Rela *)); @@ -88,7 +88,7 @@ static enum elf_reloc_type_class elf_i386_reloc_type_class static bfd_boolean elf_i386_finish_dynamic_sections PARAMS ((bfd *, struct bfd_link_info *)); -#define USE_REL 1 /* 386 uses REL relocations instead of RELA */ +#define USE_REL 1 /* 386 uses REL relocations instead of RELA. */ #include "elf/i386.h" @@ -3423,11 +3423,8 @@ elf_i386_post_process_headers (abfd, link_info) } #undef elf_backend_post_process_headers -#define elf_backend_post_process_headers elf_i386_post_process_headers - -#define elf32_bed elf32_i386_fbsd_bed +#define elf_backend_post_process_headers elf_i386_post_process_headers +#undef elf32_bed +#define elf32_bed elf32_i386_fbsd_bed #include "elf32-target.h" - -#undef elf_backend_post_process_headers -#undef elf32_bed diff --git a/bfd/elf32-sh.c b/bfd/elf32-sh.c index 96cd778..d1e618b 100644 --- a/bfd/elf32-sh.c +++ b/bfd/elf32-sh.c @@ -1,23 +1,23 @@ /* Hitachi SH specific support for 32-bit ELF - Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 + Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. Contributed by Ian Lance Taylor, Cygnus Support. -This file is part of BFD, the Binary File Descriptor library. + This file is part of BFD, the Binary File Descriptor library. -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "bfd.h" #include "sysdep.h" @@ -62,9 +62,9 @@ static void sh_elf_copy_indirect_symbol static int sh_elf_optimized_tls_reloc PARAMS ((struct bfd_link_info *, int, int)); static bfd_boolean sh_elf_mkobject - PARAMS((bfd *)); + PARAMS ((bfd *)); static bfd_boolean sh_elf_object_p - PARAMS((bfd *)); + PARAMS ((bfd *)); static bfd_boolean sh_elf_check_relocs PARAMS ((bfd *, struct bfd_link_info *, asection *, const Elf_Internal_Rela *)); @@ -85,7 +85,7 @@ static bfd_reloc_status_type sh_elf_reloc_loop PARAMS ((int, bfd *, asection *, bfd_byte *, bfd_vma, asection *, bfd_vma, bfd_vma)); static bfd_boolean create_got_section - PARAMS((bfd *, struct bfd_link_info *)); + PARAMS ((bfd *, struct bfd_link_info *)); static bfd_boolean sh_elf_create_dynamic_sections PARAMS ((bfd *, struct bfd_link_info *)); static bfd_vma dtpoff_base @@ -7328,7 +7328,7 @@ sh_elf_reloc_type_class (rela) } } -/* Support for Linux core dump NOTE sections */ +/* Support for Linux core dump NOTE sections. */ static bfd_boolean elf32_shlin_grok_prstatus (abfd, note) bfd *abfd; @@ -7462,12 +7462,11 @@ elf32_shlin_grok_psinfo (abfd, note) #define ELF_MAXPAGESIZE 0x10000 #undef elf_symbol_leading_char #define elf_symbol_leading_char 0 - +#undef elf32_bed #define elf32_bed elf32_sh_nbsd_bed #include "elf32-target.h" -#undef elf32_bed /* Linux support. */ #undef TARGET_BIG_SYM @@ -7483,13 +7482,9 @@ elf32_shlin_grok_psinfo (abfd, note) #define elf_backend_grok_prstatus elf32_shlin_grok_prstatus #undef elf_backend_grok_psinfo #define elf_backend_grok_psinfo elf32_shlin_grok_psinfo - +#undef elf32_bed #define elf32_bed elf32_sh_lin_bed #include "elf32-target.h" -#undef elf_backend_grok_prstatus -#undef elf_backend_grok_psinfo -#undef elf32_bed - #endif /* INCLUDE_SHMEDIA */ diff --git a/bfd/elf32-sh64.c b/bfd/elf32-sh64.c index a6638e9..492fd73 100644 --- a/bfd/elf32-sh64.c +++ b/bfd/elf32-sh64.c @@ -1,5 +1,5 @@ /* Hitachi SH64-specific support for 32-bit ELF - Copyright 2000, 2001, 2002 Free Software Foundation, Inc. + Copyright 2000, 2001, 2002, 2003 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -765,13 +765,11 @@ sh64_elf_final_write_processing (abfd, linker) #define ELF_MAXPAGESIZE 0x10000 #undef elf_symbol_leading_char #define elf_symbol_leading_char 0 - +#undef elf32_bed #define elf32_bed elf32_sh64_nbsd_bed #include "elf32-target.h" -#undef elf32_bed - /* Linux support. */ #undef TARGET_BIG_SYM #define TARGET_BIG_SYM bfd_elf32_sh64blin_vec @@ -781,9 +779,8 @@ sh64_elf_final_write_processing (abfd, linker) #define TARGET_LITTLE_SYM bfd_elf32_sh64lin_vec #undef TARGET_LITTLE_NAME #define TARGET_LITTLE_NAME "elf32-sh64-linux" - +#undef elf32_bed #define elf32_bed elf32_sh64_lin_bed #include "elf32-target.h" -#undef elf32_bed diff --git a/bfd/elf64-alpha.c b/bfd/elf64-alpha.c index bce2668..aa8ca99 100644 --- a/bfd/elf64-alpha.c +++ b/bfd/elf64-alpha.c @@ -1,23 +1,23 @@ /* Alpha specific support for 64-bit ELF - Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 + Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. Contributed by Richard Henderson <rth@tamu.edu>. -This file is part of BFD, the Binary File Descriptor library. + This file is part of BFD, the Binary File Descriptor library. -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* We need a published ABI spec for this. Until one comes out, don't assume this'll remain unchanged forever. */ @@ -48,60 +48,60 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "ecoffswap.h" static int alpha_elf_dynamic_symbol_p - PARAMS((struct elf_link_hash_entry *, struct bfd_link_info *)); + PARAMS ((struct elf_link_hash_entry *, struct bfd_link_info *)); static struct bfd_hash_entry * elf64_alpha_link_hash_newfunc - PARAMS((struct bfd_hash_entry *, struct bfd_hash_table *, const char *)); + PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *)); static struct bfd_link_hash_table * elf64_alpha_bfd_link_hash_table_create - PARAMS((bfd *)); + PARAMS ((bfd *)); static bfd_reloc_status_type elf64_alpha_reloc_nil - PARAMS((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **)); + PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **)); static bfd_reloc_status_type elf64_alpha_reloc_bad - PARAMS((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **)); + PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **)); static bfd_reloc_status_type elf64_alpha_do_reloc_gpdisp - PARAMS((bfd *, bfd_vma, bfd_byte *, bfd_byte *)); + PARAMS ((bfd *, bfd_vma, bfd_byte *, bfd_byte *)); static bfd_reloc_status_type elf64_alpha_reloc_gpdisp - PARAMS((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **)); + PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **)); static reloc_howto_type * elf64_alpha_bfd_reloc_type_lookup - PARAMS((bfd *, bfd_reloc_code_real_type)); + PARAMS ((bfd *, bfd_reloc_code_real_type)); static void elf64_alpha_info_to_howto - PARAMS((bfd *, arelent *, Elf_Internal_Rela *)); + PARAMS ((bfd *, arelent *, Elf_Internal_Rela *)); static bfd_boolean elf64_alpha_mkobject - PARAMS((bfd *)); + PARAMS ((bfd *)); static bfd_boolean elf64_alpha_object_p - PARAMS((bfd *)); + PARAMS ((bfd *)); static bfd_boolean elf64_alpha_section_from_shdr - PARAMS((bfd *, Elf_Internal_Shdr *, const char *)); + PARAMS ((bfd *, Elf_Internal_Shdr *, const char *)); static bfd_boolean elf64_alpha_section_flags - PARAMS((flagword *, Elf_Internal_Shdr *)); + PARAMS ((flagword *, Elf_Internal_Shdr *)); static bfd_boolean elf64_alpha_fake_sections - PARAMS((bfd *, Elf_Internal_Shdr *, asection *)); + PARAMS ((bfd *, Elf_Internal_Shdr *, asection *)); static bfd_boolean elf64_alpha_create_got_section - PARAMS((bfd *, struct bfd_link_info *)); + PARAMS ((bfd *, struct bfd_link_info *)); static bfd_boolean elf64_alpha_create_dynamic_sections - PARAMS((bfd *, struct bfd_link_info *)); + PARAMS ((bfd *, struct bfd_link_info *)); static bfd_boolean elf64_alpha_read_ecoff_info - PARAMS((bfd *, asection *, struct ecoff_debug_info *)); + PARAMS ((bfd *, asection *, struct ecoff_debug_info *)); static bfd_boolean elf64_alpha_is_local_label_name - PARAMS((bfd *, const char *)); + PARAMS ((bfd *, const char *)); static bfd_boolean elf64_alpha_find_nearest_line - PARAMS((bfd *, asection *, asymbol **, bfd_vma, const char **, - const char **, unsigned int *)); + PARAMS ((bfd *, asection *, asymbol **, bfd_vma, const char **, + const char **, unsigned int *)); #if defined(__STDC__) || defined(ALMOST_STDC) struct alpha_elf_link_hash_entry; #endif static bfd_boolean elf64_alpha_output_extsym - PARAMS((struct alpha_elf_link_hash_entry *, PTR)); + PARAMS ((struct alpha_elf_link_hash_entry *, PTR)); static bfd_boolean elf64_alpha_can_merge_gots - PARAMS((bfd *, bfd *)); + PARAMS ((bfd *, bfd *)); static void elf64_alpha_merge_gots - PARAMS((bfd *, bfd *)); + PARAMS ((bfd *, bfd *)); static bfd_boolean elf64_alpha_calc_got_offsets_for_symbol PARAMS ((struct alpha_elf_link_hash_entry *, PTR)); static void elf64_alpha_calc_got_offsets @@ -129,27 +129,27 @@ static struct alpha_elf_got_entry *get_got_entry PARAMS ((bfd *, struct alpha_elf_link_hash_entry *, unsigned long, unsigned long, bfd_vma)); static bfd_boolean elf64_alpha_check_relocs - PARAMS((bfd *, struct bfd_link_info *, asection *sec, + PARAMS ((bfd *, struct bfd_link_info *, asection *sec, const Elf_Internal_Rela *)); static bfd_boolean elf64_alpha_adjust_dynamic_symbol - PARAMS((struct bfd_link_info *, struct elf_link_hash_entry *)); + PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *)); static bfd_boolean elf64_alpha_size_dynamic_sections - PARAMS((bfd *, struct bfd_link_info *)); + PARAMS ((bfd *, struct bfd_link_info *)); static bfd_boolean elf64_alpha_relocate_section_r - PARAMS((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *, - Elf_Internal_Rela *, Elf_Internal_Sym *, asection **)); + PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *, + Elf_Internal_Rela *, Elf_Internal_Sym *, asection **)); static bfd_boolean elf64_alpha_relocate_section - PARAMS((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *, + PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *, Elf_Internal_Rela *, Elf_Internal_Sym *, asection **)); static bfd_boolean elf64_alpha_finish_dynamic_symbol - PARAMS((bfd *, struct bfd_link_info *, struct elf_link_hash_entry *, - Elf_Internal_Sym *)); + PARAMS ((bfd *, struct bfd_link_info *, struct elf_link_hash_entry *, + Elf_Internal_Sym *)); static bfd_boolean elf64_alpha_finish_dynamic_sections - PARAMS((bfd *, struct bfd_link_info *)); + PARAMS ((bfd *, struct bfd_link_info *)); static bfd_boolean elf64_alpha_final_link - PARAMS((bfd *, struct bfd_link_info *)); + PARAMS ((bfd *, struct bfd_link_info *)); static bfd_boolean elf64_alpha_merge_ind_symbols - PARAMS((struct alpha_elf_link_hash_entry *, PTR)); + PARAMS ((struct alpha_elf_link_hash_entry *, PTR)); static Elf_Internal_Rela * elf64_alpha_find_reloc_at_ofs PARAMS ((Elf_Internal_Rela *, Elf_Internal_Rela *, bfd_vma, int)); static enum elf_reloc_type_class elf64_alpha_reloc_type_class @@ -180,13 +180,13 @@ struct alpha_elf_link_hash_entry { struct alpha_elf_got_entry *next; - /* which .got subsection? */ + /* Which .got subsection? */ bfd *gotobj; - /* the addend in effect for this entry. */ + /* The addend in effect for this entry. */ bfd_vma addend; - /* the .got offset for this entry. */ + /* The .got offset for this entry. */ int got_offset; /* How many references to this entry? */ @@ -205,22 +205,22 @@ struct alpha_elf_link_hash_entry unsigned char reloc_xlated; } *got_entries; - /* used to count non-got, non-plt relocations for delayed sizing + /* Used to count non-got, non-plt relocations for delayed sizing of relocation sections. */ struct alpha_elf_reloc_entry { struct alpha_elf_reloc_entry *next; - /* which .reloc section? */ + /* Which .reloc section? */ asection *srel; - /* what kind of relocation? */ + /* What kind of relocation? */ unsigned int rtype; - /* is this against read-only section? */ + /* Is this against read-only section? */ unsigned int reltext : 1; - /* how many did we find? */ + /* How many did we find? */ unsigned long count; } *reloc_entries; }; @@ -5616,6 +5616,7 @@ elf64_alpha_fbsd_post_process_headers (abfd, link_info) #define elf_backend_post_process_headers \ elf64_alpha_fbsd_post_process_headers +#undef elf64_bed #define elf64_bed elf64_alpha_fbsd_bed #include "elf64-target.h" |