public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* x86_64 and other targets finish_dynamic_symbol
@ 2024-02-13 23:53 Alan Modra
  2024-02-14  0:03 ` H.J. Lu
  0 siblings, 1 reply; 5+ messages in thread
From: Alan Modra @ 2024-02-13 23:53 UTC (permalink / raw)
  To: binutils; +Cc: hjl.tools

elf_x86_64_finish_dynamic_symbol contains 

      else if (bfd_link_pic (info)
	       && SYMBOL_REFERENCES_LOCAL_P (info, h))
	{
	  if (!SYMBOL_DEFINED_NON_SHARED_P (h))
	    return false;

Returning false from finish_dynamic_symbol will not result in an error
being printed but will result in the linker exiting with a non-zero
status.  I reckon this particular "return false" cannot occur on
x86_64, but similar code in other target backends that have copied
older versions of the x86_64 code do.  eg. See the s390 patch I just
posted.

I propose changing all occurrences of "return false" in
finish_dynamic_symbol functions where targets don't first emit an
error message, to BFD_ASSERTs.  Opinions?

-- 
Alan Modra
Australia Development Lab, IBM

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-02-15 10:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-13 23:53 x86_64 and other targets finish_dynamic_symbol Alan Modra
2024-02-14  0:03 ` H.J. Lu
2024-02-15  1:26   ` Alan Modra
2024-02-15  8:44     ` Alan Modra
2024-02-15 10:59       ` Alan Modra

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