public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] x86: Skip undefined symbol when finishing DT_RELR
@ 2022-02-05 15:32 H.J. Lu
  0 siblings, 0 replies; only message in thread
From: H.J. Lu @ 2022-02-05 15:32 UTC (permalink / raw)
  To: binutils

I am checking this and backporting it to 2.38 branch.


H.J.
---
Don't abort for undefined symbol when finishing DT_RELR.  Instead, skip
undefined symbol.  Undefined symbol will be reported by relocate_section.

	* elfxx-x86.c (elf_x86_size_or_finish_relative_reloc): Skip
	undefined symbol in finishing phase.
---
 bfd/elfxx-x86.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/bfd/elfxx-x86.c b/bfd/elfxx-x86.c
index da8a488db36..f58a0a1ac3c 100644
--- a/bfd/elfxx-x86.c
+++ b/bfd/elfxx-x86.c
@@ -1484,11 +1484,13 @@ elf_x86_size_or_finish_relative_reloc
 		}
 	      else
 		{
-		  /* Allow undefined symbol only at the sizing phase.  */
+		  /* Allow undefined symbol only at the sizing phase.
+		     Otherwise skip undefined symbol here.  Undefined
+		     symbol will be reported by relocate_section.  */
 		  if (outrel == NULL)
 		    relocation = 0;
 		  else
-		    abort ();
+		    continue;
 		}
 	    }
 	  else
-- 
2.34.1


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

only message in thread, other threads:[~2022-02-05 15:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-05 15:32 [PATCH] x86: Skip undefined symbol when finishing DT_RELR H.J. Lu

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).