diff options
author | Nick Clifton <nickc@redhat.com> | 2021-12-01 11:29:34 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2021-12-01 11:29:34 +0000 |
commit | 92fc129e2b0066706ee8971d311f2c507ce38d4b (patch) | |
tree | 9b2a165a4391deff79047d38229f1f6ce41a416f | |
parent | 288712bbaca36bff6578bc839ebcdc3707662f81 (diff) | |
download | gdb-92fc129e2b0066706ee8971d311f2c507ce38d4b.zip gdb-92fc129e2b0066706ee8971d311f2c507ce38d4b.tar.gz gdb-92fc129e2b0066706ee8971d311f2c507ce38d4b.tar.bz2 |
Fix the fields in the x_n union inside the the x_file structure so that pointers can be stored.
PR 28630
* coff/internal.h (x_n): Use bfd_hostptr_t for the fields in this
structure.
-rw-r--r-- | include/ChangeLog | 6 | ||||
-rw-r--r-- | include/coff/internal.h | 14 |
2 files changed, 15 insertions, 5 deletions
diff --git a/include/ChangeLog b/include/ChangeLog index c0486e9..c5b3631 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,9 @@ +2021-12-01 Nick Clifton <nickc@redhat.com> + + PR 28630 + * coff/internal.h (x_n): Use bfd_hostptr_t for the fields in this + structure. + 2021-11-25 Andrew Burgess <aburgess@redhat.com> Simon Cook <simon.cook@embecosm.com> diff --git a/include/coff/internal.h b/include/coff/internal.h index d01af73..3c61253 100644 --- a/include/coff/internal.h +++ b/include/coff/internal.h @@ -540,7 +540,6 @@ union internal_auxent { struct { - union { long l; /* str, un, or enum tag indx */ @@ -580,18 +579,23 @@ union internal_auxent struct { - union { - /* PR 17754: We use to FILNMLEN for the size of the x_fname + union + { + /* PR 17754: We used to use FILNMLEN for the size of the x_fname array, but that causes problems as PE targets use a larger value. We cannot use their definition of E_FILNMLEN as this header can be used without including any PE headers. */ char x_fname[20]; struct { - long x_zeroes; - long x_offset; + /* PR 28630: We use bfd_hostptr_t because these fields may be + used to hold pointers. We assume that this type is at least + as big as the long type. */ + bfd_hostptr_t x_zeroes; + bfd_hostptr_t x_offset; } x_n; } x_n; + unsigned char x_ftype; } x_file; |