This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [patch] current: MIPS64/ELF handle relocations in .pdr sections
- From: "Maciej W. Rozycki" <macro at ds2 dot pg dot gda dot pl>
- To: Eric Christopher <echristo at redhat dot com>
- Cc: Daniel Jacobowitz <drow at mvista dot com>, binutils at sources dot redhat dot com, Thiemo Seufer <ica2_ts at csv dot ica dot uni-stuttgart dot de>, cgd at broadcom dot com
- Date: Tue, 4 Jun 2002 17:45:39 +0200 (MET DST)
- Subject: Re: [patch] current: MIPS64/ELF handle relocations in .pdr sections
- Organization: Technical University of Gdansk
On 31 May 2002, Eric Christopher wrote:
> Well. There we go. Thanks Daniel.
>
> Maciej, please check in your patch.
Here is a new version. OK to apply?
2002-06-03 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
* elf32-mips.c (elf32_mips_ignore_discarded_relocs): Move to...
elfxx-mips.c (_bfd_mips_elf_ignore_discarded_relocs): ... here.
elf64-mips.c (elf_backend_ignore_discarded_relocs): Use
_bfd_mips_elf_ignore_discarded_relocs.
elfxx-mips.h (_bfd_mips_elf_ignore_discarded_relocs): Declare.
Maciej
--
+ Maciej W. Rozycki, Technical University of Gdansk, Poland +
+--------------------------------------------------------------+
+ e-mail: macro@ds2.pg.gda.pl, PGP key available +
binutils-2.12.90-20020603-mips64-pdr.patch
diff -up --recursive --new-file binutils.macro/bfd/elf32-mips.c binutils/bfd/elf32-mips.c
--- binutils.macro/bfd/elf32-mips.c 2002-05-15 03:25:22.000000000 +0000
+++ binutils/bfd/elf32-mips.c 2002-06-03 23:48:04.000000000 +0000
@@ -82,8 +82,6 @@ static boolean elf32_mips_grok_psinfo
PARAMS ((bfd *, Elf_Internal_Note *));
static boolean elf32_mips_discard_info
PARAMS ((bfd *, struct elf_reloc_cookie *, struct bfd_link_info *));
-static boolean elf32_mips_ignore_discarded_relocs
- PARAMS ((asection *));
static boolean elf32_mips_write_section
PARAMS ((bfd *, asection *, bfd_byte *));
static irix_compat_t elf32_mips_irix_compat
@@ -1727,15 +1725,6 @@ elf32_mips_discard_info (abfd, cookie, i
}
static boolean
-elf32_mips_ignore_discarded_relocs (sec)
- asection *sec;
-{
- if (strcmp (sec->name, ".pdr") == 0)
- return true;
- return false;
-}
-
-static boolean
elf32_mips_write_section (output_bfd, sec, contents)
bfd *output_bfd;
asection *sec;
@@ -2056,7 +2045,7 @@ static const struct ecoff_debug_swap mip
#define elf_backend_discard_info elf32_mips_discard_info
#define elf_backend_ignore_discarded_relocs \
- elf32_mips_ignore_discarded_relocs
+ _bfd_mips_elf_ignore_discarded_relocs
#define elf_backend_write_section elf32_mips_write_section
#define elf_backend_mips_irix_compat elf32_mips_irix_compat
#define elf_backend_mips_rtype_to_howto mips_elf32_rtype_to_howto
diff -up --recursive --new-file binutils.macro/bfd/elf64-mips.c binutils/bfd/elf64-mips.c
--- binutils.macro/bfd/elf64-mips.c 2002-04-05 03:25:28.000000000 +0000
+++ binutils/bfd/elf64-mips.c 2002-06-03 23:48:11.000000000 +0000
@@ -2719,6 +2719,8 @@ const struct elf_size_info mips_elf64_si
#define elf_backend_gc_mark_hook _bfd_mips_elf_gc_mark_hook
#define elf_backend_gc_sweep_hook _bfd_mips_elf_gc_sweep_hook
#define elf_backend_hide_symbol _bfd_mips_elf_hide_symbol
+#define elf_backend_ignore_discarded_relocs \
+ _bfd_mips_elf_ignore_discarded_relocs
#define elf_backend_mips_irix_compat elf64_mips_irix_compat
#define elf_backend_mips_rtype_to_howto mips_elf64_rtype_to_howto
#define elf_backend_ecoff_debug_swap &mips_elf64_ecoff_debug_swap
diff -up --recursive --new-file binutils.macro/bfd/elfxx-mips.c binutils/bfd/elfxx-mips.c
--- binutils.macro/bfd/elfxx-mips.c 2002-05-15 03:25:25.000000000 +0000
+++ binutils/bfd/elfxx-mips.c 2002-06-03 23:48:16.000000000 +0000
@@ -6414,6 +6414,15 @@ _bfd_mips_elf_hide_symbol (info, entry,
got->_raw_size += MIPS_ELF_GOT_SIZE (dynobj);
}
+boolean
+_bfd_mips_elf_ignore_discarded_relocs (sec)
+ asection *sec;
+{
+ if (strcmp (sec->name, ".pdr") == 0)
+ return true;
+ return false;
+}
+
/* MIPS ELF uses a special find_nearest_line routine in order the
handle the ECOFF debugging information. */
diff -up --recursive --new-file binutils.macro/bfd/elfxx-mips.h binutils/bfd/elfxx-mips.h
--- binutils.macro/bfd/elfxx-mips.h 2002-04-04 07:10:00.000000000 +0000
+++ binutils/bfd/elfxx-mips.h 2002-06-03 23:48:23.000000000 +0000
@@ -71,6 +71,8 @@ extern void _bfd_mips_elf_copy_indirect_
PARAMS ((struct elf_link_hash_entry *, struct elf_link_hash_entry *));
extern void _bfd_mips_elf_hide_symbol
PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *, boolean));
+extern boolean _bfd_mips_elf_ignore_discarded_relocs
+ PARAMS ((asection *));
extern boolean _bfd_mips_elf_find_nearest_line
PARAMS ((bfd *, asection *, asymbol **, bfd_vma, const char **,
const char **, unsigned int *));