aboutsummaryrefslogtreecommitdiff
path: root/include/coff
diff options
context:
space:
mode:
authorCl?ment Chigot <clement.chigot@atos.net>2021-04-22 12:28:50 +0100
committerNick Clifton <nickc@redhat.com>2021-04-22 12:28:50 +0100
commitb11b2969a9a507d9e42c8029cfeb06b9bc41fceb (patch)
tree3137d85d940c2357e5f0ecaf383dce391b97d395 /include/coff
parentd018cd835ccdbfcfbc1e144a836974a9b9c385b6 (diff)
downloadgdb-b11b2969a9a507d9e42c8029cfeb06b9bc41fceb.zip
gdb-b11b2969a9a507d9e42c8029cfeb06b9bc41fceb.tar.gz
gdb-b11b2969a9a507d9e42c8029cfeb06b9bc41fceb.tar.bz2
Harmonize and improve auxiliary entries support for XCOFF
bfd/ChangeLog: * coff-rs6000.c (_bfd_xcoff_swap_aux_in): Add errors for unsupported storage class or auxialiry entries. Improve and adapt to new aux structures. Add C_DWARF support. (_bfd_xcoff_swap_aux_out): Likewise. * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Likewise. (_bfd_xcoff64_swap_aux_out): Likewise. binutils/ChangeLog: * od-xcoff.c (dump_xcoff32_symbols): Adapt to new aux structures. include/ChangeLog: * coff/internal.h (union internal_auxent): Add x_sect structure. * coff/rs6000.h (union external_auxent): Rework to match official documentation. * coff/rs6k64.h (union external_auxent): Likewise. (_AUX_SECT): New define.
Diffstat (limited to 'include/coff')
-rw-r--r--include/coff/internal.h6
-rw-r--r--include/coff/rs6000.h101
-rw-r--r--include/coff/rs6k64.h102
3 files changed, 108 insertions, 101 deletions
diff --git a/include/coff/internal.h b/include/coff/internal.h
index b09bb0f..e79bf56 100644
--- a/include/coff/internal.h
+++ b/include/coff/internal.h
@@ -659,6 +659,12 @@ union internal_auxent
/* 14 ??? */
#define XMC_TC0 15 /* Read-write TOC anchor */
#define XMC_TD 16 /* Read-write data in TOC */
+
+ struct
+ {
+ long x_scnlen; /* Section length */
+ long x_nreloc; /* Number of relocation entries */
+ } x_sect;
};
/********************** RELOCATION DIRECTIVES **********************/
diff --git a/include/coff/rs6000.h b/include/coff/rs6000.h
index ff2de53..e60efff 100644
--- a/include/coff/rs6000.h
+++ b/include/coff/rs6000.h
@@ -153,59 +153,54 @@ struct external_syment
union external_auxent {
- struct {
- char x_tagndx[4]; /* str, un, or enum tag indx */
- union {
- struct {
- char x_lnno[2]; /* declaration line number */
- char x_size[2]; /* str/union/array size */
- } x_lnsz;
- char x_fsize[4]; /* size of function */
- } x_misc;
- union {
- struct { /* if ISFCN, tag, or .bb */
- char x_lnnoptr[4]; /* ptr to fcn line # */
- char x_endndx[4]; /* entry ndx past block end */
- } x_fcn;
- struct { /* if ISARY, up to 4 dimen. */
- char x_dimen[E_DIMNUM][2];
- } x_ary;
- } x_fcnary;
- char x_tvndx[2]; /* tv index */
- } x_sym;
-
- struct {
- union {
- char x_fname[E_FILNMLEN];
- struct {
- char x_zeroes[4];
- char x_offset[4];
- } x_n;
- } x_n;
- char x_ftype[1];
- } x_file;
-
- struct {
- char x_scnlen[4]; /* section length */
- char x_nreloc[2]; /* # relocation entries */
- char x_nlinno[2]; /* # line numbers */
- } x_scn;
-
- struct {
- char x_tvfill[4]; /* tv fill value */
- char x_tvlen[2]; /* length of .tv */
- char x_tvran[2][2]; /* tv range */
- } x_tv; /* info about .tv section (in auxent of symbol .tv)) */
-
- struct {
- unsigned char x_scnlen[4];
- unsigned char x_parmhash[4];
- unsigned char x_snhash[2];
- unsigned char x_smtyp[1];
- unsigned char x_smclas[1];
- unsigned char x_stab[4];
- unsigned char x_snstab[2];
- } x_csect;
+ struct {
+ char x_pad1[2];
+ char x_lnno[4]; /* Source line number */
+ char x_pad[12];
+ } x_sym;
+
+ struct {
+ char x_exptr[4];
+ char x_fsize[4];
+ char x_lnnoptr[4];
+ char x_endndx[4];
+ char x_pad[1];
+ } x_fcn;
+
+ struct {
+ union {
+ char x_fname[E_FILNMLEN];
+ struct {
+ char x_zeroes[4];
+ char x_offset[4];
+ } x_n;
+ } x_n;
+ char x_ftype[1];
+ } x_file;
+
+ struct {
+ char x_scnlen[4]; /* section length */
+ char x_nreloc[2]; /* # relocation entries */
+ char x_nlinno[2]; /* # line numbers */
+ char x_pad[10];
+ } x_scn;
+
+ struct {
+ char x_scnlen[4];
+ char x_parmhash[4];
+ char x_snhash[2];
+ char x_smtyp[1];
+ char x_smclas[1];
+ char x_stab[4];
+ char x_snstab[2];
+ } x_csect;
+
+ struct {
+ char x_scnlen[4];
+ char x_pad1[4];
+ char x_nreloc[4];
+ char x_pad2[6];
+ } x_sect;
};
diff --git a/include/coff/rs6k64.h b/include/coff/rs6k64.h
index 53adf4b..58ffd6e 100644
--- a/include/coff/rs6k64.h
+++ b/include/coff/rs6k64.h
@@ -144,54 +144,59 @@ struct external_syment
union external_auxent
{
- struct {
- union {
- struct {
- char x_lnno[4]; /* declaration line number */
- char x_size[2]; /* str/union/array size */
- } x_lnsz;
- struct {
- char x_lnnoptr[8];/* ptr to fcn line */
- char x_fsize[4]; /* size of function */
- char x_endndx[4]; /* entry ndx past block end */
- } x_fcn;
- } x_fcnary;
- } x_sym;
-
- struct {
- union {
- char x_fname[E_FILNMLEN];
- struct {
- char x_zeroes[4];
- char x_offset[4];
- char x_pad[6];
- } x_n;
- } x_n;
- unsigned char x_ftype[1];
- unsigned char x_resv[2];
- } x_file;
-
- struct {
- char x_exptr[8];
- char x_fsize[4];
- char x_endndx[4];
- char x_pad[1];
- } x_except;
-
- struct {
- unsigned char x_scnlen_lo[4];
- unsigned char x_parmhash[4];
- unsigned char x_snhash[2];
- unsigned char x_smtyp[1];
- unsigned char x_smclas[1];
- unsigned char x_scnlen_hi[4];
- unsigned char x_pad[1];
- } x_csect;
-
- struct {
- char x_pad[17];
- char x_auxtype[1];
- } x_auxtype;
+ struct {
+ char x_lnno[4]; /* declaration line number */
+ char x_pad[13];
+ char x_auxtype[1];
+ } x_sym;
+
+ struct {
+ char x_lnnoptr[8];/* ptr to fcn line */
+ char x_fsize[4]; /* size of function */
+ char x_endndx[4]; /* entry ndx past block end */
+ char x_pad[1];
+ char x_auxtype[1];
+ } x_fcn;
+
+ struct {
+ union {
+ char x_fname[E_FILNMLEN];
+ struct {
+ char x_zeroes[4];
+ char x_offset[4];
+ char x_pad[6];
+ } x_n;
+ } x_n;
+ unsigned char x_ftype[1];
+ unsigned char x_resv[2];
+ char x_auxtype[1];
+ } x_file;
+
+ struct {
+ char x_exptr[8];
+ char x_fsize[4];
+ char x_endndx[4];
+ char x_pad[1];
+ char x_auxtype[1];
+ } x_except;
+
+ struct {
+ char x_scnlen_lo[4];
+ char x_parmhash[4];
+ char x_snhash[2];
+ char x_smtyp[1];
+ char x_smclas[1];
+ char x_scnlen_hi[4];
+ char x_pad[1];
+ char x_auxtype[1];
+ } x_csect;
+
+ struct {
+ char x_scnlen[8];
+ char x_nreloc[8];
+ char x_pad[1];
+ char x_auxtype[1];
+ } x_sect;
};
#define SYMENT struct external_syment
@@ -207,6 +212,7 @@ union external_auxent
#define _AUX_SYM 253
#define _AUX_FILE 252
#define _AUX_CSECT 251
+#define _AUX_SECT 250
/********************** RELOCATION DIRECTIVES **********************/