aboutsummaryrefslogtreecommitdiff
path: root/include/coff
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2016-01-18 15:58:47 +0000
committerNick Clifton <nickc@redhat.com>2016-01-18 15:58:47 +0000
commit9ae678af999b8a692c4e6efbe493f39f0085d149 (patch)
tree3d66932e9acf44617cdb0cb2fe3c899db344add4 /include/coff
parentf303dbd60d9c7984832446eeb9d4e4d89703c615 (diff)
downloadbinutils-9ae678af999b8a692c4e6efbe493f39f0085d149.zip
binutils-9ae678af999b8a692c4e6efbe493f39f0085d149.tar.gz
binutils-9ae678af999b8a692c4e6efbe493f39f0085d149.tar.bz2
Use a 32-bit value to hold the section number in the internal COFF symbol structure.
PR ld/19440 inc * coff/internal.h (internal_syment): Use int to hold section number. (N_UNDEF): Cast to int not short. (N_ABS): Likewise. (N_DEBUG): Likewise. (N_TV): Likewise. (P_TV): Likewise. bfd PR ld/19440 * coff-rs6000.c (_bfd_xcoff_swap_sym_in): Sign extend external section number into internal section number. * coff64-rs6000.c (_bfd_xcoff64_swap_sym_in): Likewise. * coffswap.h (coff_swap_sym_in): Likewise. * peXXigen.c (_bfd_XXi_swap_sym_in): Likewise. * coffcode.h (_coff_bigobj_swap_sym_in): Make sure that internal section number field is big enough to hold the external value.
Diffstat (limited to 'include/coff')
-rw-r--r--include/coff/internal.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/include/coff/internal.h b/include/coff/internal.h
index aa758ed..885ac16 100644
--- a/include/coff/internal.h
+++ b/include/coff/internal.h
@@ -483,7 +483,7 @@ struct internal_syment
char *_n_nptr[2]; /* allows for overlaying */
} _n;
bfd_vma n_value; /* value of symbol */
- short n_scnum; /* section number */
+ int n_scnum; /* section number */
unsigned short n_flags; /* copy of flags from filhdr */
unsigned short n_type; /* type and derived type */
unsigned char n_sclass; /* storage class */
@@ -497,11 +497,11 @@ struct internal_syment
/* Relocatable symbols have number of the section in which they are defined,
or one of the following: */
-#define N_UNDEF ((short)0) /* undefined symbol */
-#define N_ABS ((short)-1) /* value of symbol is absolute */
-#define N_DEBUG ((short)-2) /* debugging symbol -- value is meaningless */
-#define N_TV ((short)-3) /* indicates symbol needs preload transfer vector */
-#define P_TV ((short)-4) /* indicates symbol needs postload transfer vector*/
+#define N_UNDEF ((int)0) /* undefined symbol */
+#define N_ABS ((int)-1) /* value of symbol is absolute */
+#define N_DEBUG ((int)-2) /* debugging symbol -- value is meaningless */
+#define N_TV ((int)-3) /* indicates symbol needs preload transfer vector */
+#define P_TV ((int)-4) /* indicates symbol needs postload transfer vector*/
/* Type of a symbol, in low N bits of the word. */