diff options
author | Alan Modra <amodra@gmail.com> | 2017-04-23 15:21:11 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2017-04-23 20:33:34 +0930 |
commit | 7eacd66b086cabb1daab20890d5481894d4f56b2 (patch) | |
tree | 15b664ffb07f3dd3e24c80c24e69c54f396b46af /bfd/elf.c | |
parent | bce964aa6c777d236fbd641f2bc7bb931cfe4bf3 (diff) | |
download | gdb-7eacd66b086cabb1daab20890d5481894d4f56b2.zip gdb-7eacd66b086cabb1daab20890d5481894d4f56b2.tar.gz gdb-7eacd66b086cabb1daab20890d5481894d4f56b2.tar.bz2 |
PR 21414, null pointer deref of _bfd_elf_large_com_section sym
PR 21414
* section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
* elf.c (lcomm_sym): New.
(_bfd_elf_large_com_section): Use lcomm_sym section symbol.
* bfd-in2.h: Regenerate.
Diffstat (limited to 'bfd/elf.c')
-rw-r--r-- | bfd/elf.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -11244,9 +11244,11 @@ _bfd_elf_get_synthetic_symtab (bfd *abfd, /* It is only used by x86-64 so far. ??? This repeats *COM* id of zero. sec->id is supposed to be unique, - but current usage would allow all of _bfd_std_section to be zero. t*/ + but current usage would allow all of _bfd_std_section to be zero. */ +static const asymbol lcomm_sym + = GLOBAL_SYM_INIT ("LARGE_COMMON", &_bfd_elf_large_com_section); asection _bfd_elf_large_com_section - = BFD_FAKE_SECTION (_bfd_elf_large_com_section, NULL, + = BFD_FAKE_SECTION (_bfd_elf_large_com_section, &lcomm_sym, "LARGE_COMMON", 0, SEC_IS_COMMON); void |