diff mbox series

[ARM] Fix warning cannot find thumb start symbol

Message ID CAKdteOaBu2yhuE7n1L0jSaWKqQOOhFQcCVHW3Z9BP7-DuPtY9g@mail.gmail.com
State New
Headers show
Series [ARM] Fix warning cannot find thumb start symbol | expand

Commit Message

Christophe Lyon July 5, 2018, 12:55 p.m. UTC
Hi,

In case params.thumb_entry_symbol has its default NULL value, using it
to print a warning in gld${EMULATION_NAME}_finish results in a crash.

Use h->root.string instead which either points to
params.thumb_entry_symbol name or to entry_symbol name.

OK?

Thanks,

Christophe
2018-07-05  Christophe Lyon  <christophe.lyon@linaro.org>

	* emultempl/armelf.em (gld${EMULATION_NAME}_finish): Use the right
	symbol name in case of warning.

Comments

Nick Clifton July 6, 2018, 2:32 p.m. UTC | #1
Hi Christophe,

> Use h->root.string instead which either points to

> params.thumb_entry_symbol name or to entry_symbol name.


Approved for mainline.

Cheers
  Nick
diff mbox series

Patch

diff --git a/ld/emultempl/armelf.em b/ld/emultempl/armelf.em
index 2d98064..8ceceda 100644
--- a/ld/emultempl/armelf.em
+++ b/ld/emultempl/armelf.em
@@ -499,7 +499,7 @@  gld${EMULATION_NAME}_finish (void)
     }
   else
     einfo (_("%P: warning: cannot find thumb start symbol %s\n"),
-	   params.thumb_entry_symbol);
+	   h->root.string);
 }
 
 /* This is a convenient point to tell BFD about target specific flags.