public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [committed] bfd: VAX PCREL relocs for DWARF2
@ 2007-04-06 16:32 Matt Thomas
  0 siblings, 0 replies; only message in thread
From: Matt Thomas @ 2007-04-06 16:32 UTC (permalink / raw)
  To: binutils

2007-04-03  Matt Thomas  <matt@netbsd.org>

	* elf32-vax.c (elf_vax_relocate_section): Do not emit a PCREL reloc
	in a shared object if it is not in a CODE section or if it is against
	a section symbol.  This allows DWARF2 to use pcrel format.

Index: elf32-vax.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-vax.c,v
retrieving revision 1.41
diff -u -r1.41 elf32-vax.c
--- elf32-vax.c	26 Mar 2007 12:23:02 -0000	1.41
+++ elf32-vax.c	6 Apr 2007 16:27:11 -0000
@@ -1625,8 +1625,9 @@
	      && ((r_type != R_VAX_PC8
		   && r_type != R_VAX_PC16
		   && r_type != R_VAX_PC32)
-		  || (!info->symbolic
-		      || !h->def_regular)))
+		  || ((input_section->flags & SEC_CODE)
+		      && (!info->symbolic
+			  || (!h->def_regular && h->type != STT_SECTION)))))
	    {
	      Elf_Internal_Rela outrel;
	      bfd_byte *loc;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-04-06 16:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-04-06 16:32 [committed] bfd: VAX PCREL relocs for DWARF2 Matt Thomas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).