* PR26623, buffer overflow in ppc_symbol_is_valid
@ 2020-09-16 7:14 Alan Modra
0 siblings, 0 replies; only message in thread
From: Alan Modra @ 2020-09-16 7:14 UTC (permalink / raw)
To: binutils
Synthetic symbols are not elf_symbol_type symbols.
PR 26623
* elf-bfd.h (elf_symbol_from): Exclude synthetic symbols.
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h
index eebdf9ac73..9b0a2028d3 100644
--- a/bfd/elf-bfd.h
+++ b/bfd/elf-bfd.h
@@ -792,7 +792,8 @@ struct elf_size_info {
};
#define elf_symbol_from(ABFD,S) \
- (((S)->the_bfd != NULL \
+ ((((S)->flags & BSF_SYNTHETIC) == 0 \
+ && (S)->the_bfd != NULL \
&& (S)->the_bfd->xvec->flavour == bfd_target_elf_flavour \
&& (S)->the_bfd->tdata.elf_obj_data != 0) \
? (elf_symbol_type *) (S) \
--
Alan Modra
Australia Development Lab, IBM
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-09-16 7:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-16 7:14 PR26623, buffer overflow in ppc_symbol_is_valid 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).