aboutsummaryrefslogtreecommitdiff
path: root/bfd/section.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2017-04-23 15:21:11 +0930
committerAlan Modra <amodra@gmail.com>2017-04-23 20:33:34 +0930
commit7eacd66b086cabb1daab20890d5481894d4f56b2 (patch)
tree15b664ffb07f3dd3e24c80c24e69c54f396b46af /bfd/section.c
parentbce964aa6c777d236fbd641f2bc7bb931cfe4bf3 (diff)
downloadgdb-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/section.c')
-rw-r--r--bfd/section.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/bfd/section.c b/bfd/section.c
index 4b3cf6a..28eee7f 100644
--- a/bfd/section.c
+++ b/bfd/section.c
@@ -738,20 +738,20 @@ CODE_FRAGMENT
. { NULL }, { NULL } \
. }
.
+.{* We use a macro to initialize the static asymbol structures because
+. traditional C does not permit us to initialize a union member while
+. gcc warns if we don't initialize it.
+. the_bfd, name, value, attr, section [, udata] *}
+.#ifdef __STDC__
+.#define GLOBAL_SYM_INIT(NAME, SECTION) \
+. { 0, NAME, 0, BSF_SECTION_SYM, SECTION, { 0 }}
+.#else
+.#define GLOBAL_SYM_INIT(NAME, SECTION) \
+. { 0, NAME, 0, BSF_SECTION_SYM, SECTION }
+.#endif
+.
*/
-/* We use a macro to initialize the static asymbol structures because
- traditional C does not permit us to initialize a union member while
- gcc warns if we don't initialize it. */
- /* the_bfd, name, value, attr, section [, udata] */
-#ifdef __STDC__
-#define GLOBAL_SYM_INIT(NAME, SECTION) \
- { 0, NAME, 0, BSF_SECTION_SYM, SECTION, { 0 }}
-#else
-#define GLOBAL_SYM_INIT(NAME, SECTION) \
- { 0, NAME, 0, BSF_SECTION_SYM, SECTION }
-#endif
-
/* These symbols are global, not specific to any BFD. Therefore, anything
that tries to change them is broken, and should be repaired. */