if (ent->fix_tag)
{
- pauxent->x_sym.x_tagndx.l =
+ pauxent->x_sym.x_tagndx.u32 =
((combined_entry_type *) pauxent->x_sym.x_tagndx.p
- obj_raw_syments (abfd));
ent->fix_tag = 0;
if (ent->fix_end)
{
- pauxent->x_sym.x_fcnary.x_fcn.x_endndx.l =
+ pauxent->x_sym.x_fcnary.x_fcn.x_endndx.u32 =
((combined_entry_type *) pauxent->x_sym.x_fcnary.x_fcn.x_endndx.p
- obj_raw_syments (abfd));
ent->fix_end = 0;
if (ent->fix_scnlen)
{
- pauxent->x_csect.x_scnlen.l =
+ pauxent->x_csect.x_scnlen.u64 =
((combined_entry_type *) pauxent->x_csect.x_scnlen.p
- obj_raw_syments (abfd));
ent->fix_scnlen = 0;
case C_HIDEXT:
if (indx + 1 == numaux)
{
- in->x_csect.x_scnlen.l = H_GET_32 (abfd, ext->x_csect.x_scnlen);
+ in->x_csect.x_scnlen.u64 = H_GET_32 (abfd, ext->x_csect.x_scnlen);
in->x_csect.x_parmhash = H_GET_32 (abfd, ext->x_csect.x_parmhash);
in->x_csect.x_snhash = H_GET_16 (abfd, ext->x_csect.x_snhash);
/* We don't have to hack bitfields in x_smtyp because it's
= H_GET_32 (abfd, ext->x_fcn.x_fsize);
in->x_sym.x_fcnary.x_fcn.x_lnnoptr
= H_GET_32 (abfd, ext->x_fcn.x_lnnoptr);
- in->x_sym.x_fcnary.x_fcn.x_endndx.l
+ in->x_sym.x_fcnary.x_fcn.x_endndx.u32
= H_GET_32 (abfd, ext->x_fcn.x_endndx);
}
break;
case C_HIDEXT:
if (indx + 1 == numaux)
{
- H_PUT_32 (abfd, in->x_csect.x_scnlen.l, ext->x_csect.x_scnlen);
+ H_PUT_32 (abfd, in->x_csect.x_scnlen.u64, ext->x_csect.x_scnlen);
H_PUT_32 (abfd, in->x_csect.x_parmhash, ext->x_csect.x_parmhash);
H_PUT_16 (abfd, in->x_csect.x_snhash, ext->x_csect.x_snhash);
/* We don't have to hack bitfields in x_smtyp because it's
H_PUT_32 (abfd, in->x_sym.x_misc.x_fsize, ext->x_fcn.x_fsize);
H_PUT_32 (abfd, in->x_sym.x_fcnary.x_fcn.x_lnnoptr,
ext->x_fcn.x_lnnoptr);
- H_PUT_32 (abfd, in->x_sym.x_fcnary.x_fcn.x_endndx.l,
+ H_PUT_32 (abfd, in->x_sym.x_fcnary.x_fcn.x_endndx.u32,
ext->x_fcn.x_endndx);
}
break;
syment.n_scnum = 1;
syment.n_sclass = C_HIDEXT;
syment.n_numaux = 1;
- auxent.x_csect.x_scnlen.l = data_buffer_size;
+ auxent.x_csect.x_scnlen.u64 = data_buffer_size;
auxent.x_csect.x_smtyp = 3 << 3 | XTY_SD;
auxent.x_csect.x_smclas = XMC_RW;
bfd_coff_swap_sym_out (abfd, &syment,
if (auxtype != _AUX_CSECT)
goto error;
- bfd_vma h = H_GET_S32 (abfd, ext->x_csect.x_scnlen_hi);
+ bfd_vma h = H_GET_32 (abfd, ext->x_csect.x_scnlen_hi);
bfd_vma l = H_GET_32 (abfd, ext->x_csect.x_scnlen_lo);
- in->x_csect.x_scnlen.l = h << 32 | (l & 0xffffffff);
+ in->x_csect.x_scnlen.u64 = h << 32 | (l & 0xffffffff);
in->x_csect.x_parmhash = H_GET_32 (abfd, ext->x_csect.x_parmhash);
in->x_csect.x_snhash = H_GET_16 (abfd, ext->x_csect.x_snhash);
= H_GET_64 (abfd, ext->x_fcn.x_lnnoptr);
in->x_sym.x_misc.x_fsize
= H_GET_32 (abfd, ext->x_fcn.x_fsize);
- in->x_sym.x_fcnary.x_fcn.x_endndx.l
+ in->x_sym.x_fcnary.x_fcn.x_endndx.u32
= H_GET_32 (abfd, ext->x_fcn.x_endndx);
}
break;
{
bfd_vma temp;
- temp = in->x_csect.x_scnlen.l & 0xffffffff;
+ temp = in->x_csect.x_scnlen.u64 & 0xffffffff;
H_PUT_32 (abfd, temp, ext->x_csect.x_scnlen_lo);
- temp = in->x_csect.x_scnlen.l >> 32;
+ temp = in->x_csect.x_scnlen.u64 >> 32;
H_PUT_32 (abfd, temp, ext->x_csect.x_scnlen_hi);
H_PUT_32 (abfd, in->x_csect.x_parmhash, ext->x_csect.x_parmhash);
H_PUT_16 (abfd, in->x_csect.x_snhash, ext->x_csect.x_snhash);
H_PUT_64 (abfd, in->x_sym.x_fcnary.x_fcn.x_lnnoptr,
ext->x_fcn.x_lnnoptr);
H_PUT_32 (abfd, in->x_sym.x_misc.x_fsize, ext->x_fcn.x_fsize);
- H_PUT_32 (abfd, in->x_sym.x_fcnary.x_fcn.x_endndx.l,
+ H_PUT_32 (abfd, in->x_sym.x_fcnary.x_fcn.x_endndx.u32,
ext->x_fcn.x_endndx);
H_PUT_8 (abfd, _AUX_FCN, ext->x_csect.x_auxtype);
}
syment.n_scnum = 2;
syment.n_sclass = C_HIDEXT;
syment.n_numaux = 1;
- auxent.x_csect.x_scnlen.l = data_buffer_size;
+ auxent.x_csect.x_scnlen.u64 = data_buffer_size;
auxent.x_csect.x_smtyp = 3 << 3 | XTY_SD;
auxent.x_csect.x_smclas = XMC_RW;
bfd_coff_swap_sym_out (abfd, &syment,
{
BFD_ASSERT (! aux->is_sym);
if (SMTYP_SMTYP (aux->u.auxent.x_csect.x_smtyp) == XTY_LD
- && (bfd_vma) aux->u.auxent.x_csect.x_scnlen.l < obj_raw_syment_count (abfd))
+ && aux->u.auxent.x_csect.x_scnlen.u64 < obj_raw_syment_count (abfd))
{
aux->u.auxent.x_csect.x_scnlen.p =
- table_base + aux->u.auxent.x_csect.x_scnlen.l;
+ table_base + aux->u.auxent.x_csect.x_scnlen.u64;
aux->fix_scnlen = 1;
}
if (SMTYP_SMTYP (aux->u.auxent.x_csect.x_smtyp) != XTY_LD)
{
BFD_ASSERT (! aux->fix_scnlen);
- fprintf (file, "val %5" PRId64,
- (int64_t) aux->u.auxent.x_csect.x_scnlen.l);
+ fprintf (file, "val %5" PRIu64,
+ aux->u.auxent.x_csect.x_scnlen.u64);
}
else
{
fprintf (file, "indx ");
if (! aux->fix_scnlen)
- fprintf (file, "%4" PRId64,
- (int64_t) aux->u.auxent.x_csect.x_scnlen.l);
+ fprintf (file, "%4" PRIu64,
+ aux->u.auxent.x_csect.x_scnlen.u64);
else
fprintf (file, "%4ld",
(long) (aux->u.auxent.x_csect.x_scnlen.p - table_base));
}
fprintf (file,
- " prmhsh %ld snhsh %u typ %d algn %d clss %u stb %ld snstb %u",
+ " prmhsh %u snhsh %u typ %d algn %d clss %u stb %u snstb %u",
aux->u.auxent.x_csect.x_parmhash,
(unsigned int) aux->u.auxent.x_csect.x_snhash,
SMTYP_SMTYP (aux->u.auxent.x_csect.x_smtyp),
break;
default:
- in->x_sym.x_tagndx.l = H_GET_32 (abfd, ext->Sym.WeakDefaultSymIndex);
+ in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->Sym.WeakDefaultSymIndex);
/* Characteristics is ignored. */
break;
}
break;
}
- H_PUT_32 (abfd, in->x_sym.x_tagndx.l, ext->Sym.WeakDefaultSymIndex);
+ H_PUT_32 (abfd, in->x_sym.x_tagndx.u32, ext->Sym.WeakDefaultSymIndex);
H_PUT_32 (abfd, 1, ext->Sym.WeakSearchType);
return AUXESZ;
BFD_ASSERT (! a->is_sym);
if (a->fix_tag)
{
- a->u.auxent.x_sym.x_tagndx.l =
+ a->u.auxent.x_sym.x_tagndx.u32 =
a->u.auxent.x_sym.x_tagndx.p->offset;
a->fix_tag = 0;
}
if (a->fix_end)
{
- a->u.auxent.x_sym.x_fcnary.x_fcn.x_endndx.l =
+ a->u.auxent.x_sym.x_fcnary.x_fcn.x_endndx.u32 =
a->u.auxent.x_sym.x_fcnary.x_fcn.x_endndx.p->offset;
a->fix_end = 0;
}
if (a->fix_scnlen)
{
- a->u.auxent.x_csect.x_scnlen.l =
+ a->u.auxent.x_csect.x_scnlen.u64 =
a->u.auxent.x_csect.x_scnlen.p->offset;
a->fix_scnlen = 0;
}
if ((ISFCN (type) || ISTAG (n_sclass) || n_sclass == C_BLOCK
|| n_sclass == C_FCN)
- && auxent->u.auxent.x_sym.x_fcnary.x_fcn.x_endndx.l > 0
- && auxent->u.auxent.x_sym.x_fcnary.x_fcn.x_endndx.l
- < (long) obj_raw_syment_count (abfd)
- && table_base + auxent->u.auxent.x_sym.x_fcnary.x_fcn.x_endndx.l
- < table_end)
+ && auxent->u.auxent.x_sym.x_fcnary.x_fcn.x_endndx.u32 > 0
+ && (auxent->u.auxent.x_sym.x_fcnary.x_fcn.x_endndx.u32
+ < obj_raw_syment_count (abfd))
+ && (table_base + auxent->u.auxent.x_sym.x_fcnary.x_fcn.x_endndx.u32
+ < table_end))
{
auxent->u.auxent.x_sym.x_fcnary.x_fcn.x_endndx.p =
- table_base + auxent->u.auxent.x_sym.x_fcnary.x_fcn.x_endndx.l;
+ table_base + auxent->u.auxent.x_sym.x_fcnary.x_fcn.x_endndx.u32;
auxent->fix_end = 1;
}
/* A negative tagndx is meaningless, but the SCO 3.2v4 cc can
generate one, so we must be careful to ignore it. */
- if ((unsigned long) auxent->u.auxent.x_sym.x_tagndx.l
- < obj_raw_syment_count (abfd)
- && table_base + auxent->u.auxent.x_sym.x_tagndx.l < table_end)
+ if (auxent->u.auxent.x_sym.x_tagndx.u32 < obj_raw_syment_count (abfd)
+ && table_base + auxent->u.auxent.x_sym.x_tagndx.u32 < table_end)
{
auxent->u.auxent.x_sym.x_tagndx.p =
- table_base + auxent->u.auxent.x_sym.x_tagndx.l;
+ table_base + auxent->u.auxent.x_sym.x_tagndx.u32;
auxent->fix_tag = 1;
}
}
if (auxp->fix_tag)
tagndx = auxp->u.auxent.x_sym.x_tagndx.p - root;
else
- tagndx = auxp->u.auxent.x_sym.x_tagndx.l;
+ tagndx = auxp->u.auxent.x_sym.x_tagndx.u32;
fprintf (file, "\n");
break;
case C_DWARF:
- fprintf (file, "AUX scnlen 0x%lx nreloc %ld",
- (unsigned long) auxp->u.auxent.x_sect.x_scnlen,
+ fprintf (file, "AUX scnlen %#" PRIx64 " nreloc %" PRId64,
+ auxp->u.auxent.x_sect.x_scnlen,
auxp->u.auxent.x_sect.x_nreloc);
break;
if (auxp->u.auxent.x_scn.x_checksum != 0
|| auxp->u.auxent.x_scn.x_associated != 0
|| auxp->u.auxent.x_scn.x_comdat != 0)
- fprintf (file, " checksum 0x%lx assoc %d comdat %d",
+ fprintf (file, " checksum 0x%x assoc %d comdat %d",
auxp->u.auxent.x_scn.x_checksum,
auxp->u.auxent.x_scn.x_associated,
auxp->u.auxent.x_scn.x_comdat);
next = (auxp->u.auxent.x_sym.x_fcnary.x_fcn.x_endndx.p
- root);
else
- next = auxp->u.auxent.x_sym.x_fcnary.x_fcn.x_endndx.l;
+ next = auxp->u.auxent.x_sym.x_fcnary.x_fcn.x_endndx.u32;
llnos = auxp->u.auxent.x_sym.x_fcnary.x_fcn.x_lnnoptr;
fprintf (file,
"AUX tagndx %ld ttlsiz 0x%lx lnnos %ld next %ld",
record indicating that if the weak symbol is not resolved,
another external symbol is used instead. */
struct coff_link_hash_entry *h2 =
- h->auxbfd->tdata.coff_obj_data->sym_hashes[
- h->aux->x_sym.x_tagndx.l];
+ h->auxbfd->tdata.coff_obj_data->sym_hashes
+ [h->aux->x_sym.x_tagndx.u32];
if (h2 && h2->root.type != bfd_link_hash_undefined)
return h2->root.u.def.section;
islp = isymp + 2;
esl = esym + 2 * isymesz;
eslend = ((bfd_byte *) obj_coff_external_syms (input_bfd)
- + aux.x_sym.x_fcnary.x_fcn.x_endndx.l * isymesz);
+ + aux.x_sym.x_fcnary.x_fcn.x_endndx.u32 * isymesz);
while (esl < eslend)
{
const char *elename;
bfd_coff_swap_aux_in (input_bfd, (esl + isymesz),
islp->n_type, islp->n_sclass, 0,
islp->n_numaux, &eleaux);
- indx = eleaux.x_sym.x_tagndx.l;
+ indx = eleaux.x_sym.x_tagndx.u32;
/* FIXME: If this tagndx entry refers to a symbol
defined later in this file, we just ignore it.
|| isymp->n_sclass == C_BLOCK
|| isymp->n_sclass == C_FCN)
{
- indx = auxp->x_sym.x_fcnary.x_fcn.x_endndx.l;
+ indx = auxp->x_sym.x_fcnary.x_fcn.x_endndx.u32;
if (indx > 0
&& indx < obj_raw_syment_count (input_bfd))
{
indx = output_index;
else
indx = flaginfo->sym_indices[indx];
- auxp->x_sym.x_fcnary.x_fcn.x_endndx.l = indx;
+ auxp->x_sym.x_fcnary.x_fcn.x_endndx.u32 = indx;
}
}
- indx = auxp->x_sym.x_tagndx.l;
+ indx = auxp->x_sym.x_tagndx.u32;
if (indx > 0 && indx < obj_raw_syment_count (input_bfd))
{
long symindx;
symindx = flaginfo->sym_indices[indx];
if (symindx < 0)
- auxp->x_sym.x_tagndx.l = 0;
+ auxp->x_sym.x_tagndx.u32 = 0;
else
- auxp->x_sym.x_tagndx.l = symindx;
+ auxp->x_sym.x_tagndx.u32 = symindx;
}
/* The .bf symbols are supposed to be linked through
{
if (flaginfo->last_bf_index != -1)
{
- flaginfo->last_bf.x_sym.x_fcnary.x_fcn.x_endndx.l =
+ flaginfo->last_bf.x_sym.x_fcnary.x_fcn.x_endndx.u32 =
*indexp;
if ((bfd_size_type) flaginfo->last_bf_index
}
}
- if (auxp->x_sym.x_fcnary.x_fcn.x_endndx.l != 0)
+ if (auxp->x_sym.x_fcnary.x_fcn.x_endndx.u32 != 0)
flaginfo->last_bf_index = -1;
else
{
external causes the library member to be linked.
See also linker.c: generic_link_check_archive_element. */
struct coff_link_hash_entry *h2 =
- h->auxbfd->tdata.coff_obj_data->sym_hashes[
- h->aux->x_sym.x_tagndx.l];
+ h->auxbfd->tdata.coff_obj_data->sym_hashes
+ [h->aux->x_sym.x_tagndx.u32];
if (!h2 || h2->root.type == bfd_link_hash_undefined)
{
break;
}
- in->x_sym.x_tagndx.l = H_GET_32 (abfd, ext->x_sym.x_tagndx);
+ in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
#ifndef NO_TVNDX
in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
#endif
|| ISTAG (in_class))
{
in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
- in->x_sym.x_fcnary.x_fcn.x_endndx.l = GET_FCN_ENDNDX (abfd, ext);
+ in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
}
else
{
break;
}
- H_PUT_32 (abfd, in->x_sym.x_tagndx.l, ext->x_sym.x_tagndx);
+ H_PUT_32 (abfd, in->x_sym.x_tagndx.u32, ext->x_sym.x_tagndx);
#ifndef NO_TVNDX
H_PUT_16 (abfd, in->x_sym.x_tvndx, ext->x_sym.x_tvndx);
#endif
|| ISTAG (in_class))
{
PUT_FCN_LNNOPTR (abfd, in->x_sym.x_fcnary.x_fcn.x_lnnoptr, ext);
- PUT_FCN_ENDNDX (abfd, in->x_sym.x_fcnary.x_fcn.x_endndx.l, ext);
+ PUT_FCN_ENDNDX (abfd, in->x_sym.x_fcnary.x_fcn.x_endndx.u32, ext);
}
else
{
break;
}
- in->x_sym.x_tagndx.l = H_GET_32 (abfd, ext->x_sym.x_tagndx);
+ in->x_sym.x_tagndx.u32 = H_GET_32 (abfd, ext->x_sym.x_tagndx);
in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
|| ISTAG (in_class))
{
in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
- in->x_sym.x_fcnary.x_fcn.x_endndx.l = GET_FCN_ENDNDX (abfd, ext);
+ in->x_sym.x_fcnary.x_fcn.x_endndx.u32 = GET_FCN_ENDNDX (abfd, ext);
}
else
{
break;
}
- H_PUT_32 (abfd, in->x_sym.x_tagndx.l, ext->x_sym.x_tagndx);
+ H_PUT_32 (abfd, in->x_sym.x_tagndx.u32, ext->x_sym.x_tagndx);
H_PUT_16 (abfd, in->x_sym.x_tvndx, ext->x_sym.x_tvndx);
if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
|| ISTAG (in_class))
{
PUT_FCN_LNNOPTR (abfd, in->x_sym.x_fcnary.x_fcn.x_lnnoptr, ext);
- PUT_FCN_ENDNDX (abfd, in->x_sym.x_fcnary.x_fcn.x_endndx.l, ext);
+ PUT_FCN_ENDNDX (abfd, in->x_sym.x_fcnary.x_fcn.x_endndx.u32, ext);
}
else
{
/* This is an external reference. */
if (sym.n_sclass == C_HIDEXT
|| sym.n_scnum != N_UNDEF
- || aux.x_csect.x_scnlen.l != 0)
+ || aux.x_csect.x_scnlen.u64 != 0)
{
_bfd_error_handler
/* xgettext:c-format */
(_("%pB: bad XTY_ER symbol `%s': class %d scnum %d "
"scnlen %" PRId64),
abfd, name, sym.n_sclass, sym.n_scnum,
- (int64_t) aux.x_csect.x_scnlen.l);
+ aux.x_csect.x_scnlen.u64);
bfd_set_error (bfd_error_bad_value);
goto error_return;
}
if (aux.x_csect.x_smclas == XMC_TC0)
{
if (sym.n_sclass != C_HIDEXT
- || aux.x_csect.x_scnlen.l != 0)
+ || aux.x_csect.x_scnlen.u64 != 0)
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%pB: XMC_TC0 symbol `%s' is class %d scnlen %" PRId64),
- abfd, name, sym.n_sclass, (int64_t) aux.x_csect.x_scnlen.l);
+ (_("%pB: XMC_TC0 symbol `%s' is class %d scnlen %" PRIu64),
+ abfd, name, sym.n_sclass, aux.x_csect.x_scnlen.u64);
bfd_set_error (bfd_error_bad_value);
goto error_return;
}
&& sym.n_sclass == C_HIDEXT
&& info->output_bfd->xvec == abfd->xvec
&& ((bfd_xcoff_is_xcoff32 (abfd)
- && aux.x_csect.x_scnlen.l == 4)
+ && aux.x_csect.x_scnlen.u64 == 4)
|| (bfd_xcoff_is_xcoff64 (abfd)
- && aux.x_csect.x_scnlen.l == 8)))
+ && aux.x_csect.x_scnlen.u64 == 8)))
{
asection *enclosing;
struct internal_reloc *relocs;
if (! bfd_is_abs_section (enclosing)
&& ((bfd_vma) sym.n_value < enclosing->vma
- || ((bfd_vma) sym.n_value + aux.x_csect.x_scnlen.l
+ || (sym.n_value + aux.x_csect.x_scnlen.u64
> enclosing->vma + enclosing->size)))
{
_bfd_error_handler
csect->filepos = (enclosing->filepos
+ sym.n_value
- enclosing->vma);
- csect->size = aux.x_csect.x_scnlen.l;
- csect->rawsize = aux.x_csect.x_scnlen.l;
+ csect->size = aux.x_csect.x_scnlen.u64;
+ csect->rawsize = aux.x_csect.x_scnlen.u64;
csect->flags |= SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS;
csect->alignment_power = SMTYP_ALIGN (aux.x_csect.x_smtyp);
bool bad;
bad = false;
- if (aux.x_csect.x_scnlen.l < 0
- || (aux.x_csect.x_scnlen.l
- >= esym - (bfd_byte *) obj_coff_external_syms (abfd)))
+ if (aux.x_csect.x_scnlen.u64
+ >= (size_t) (esym - (bfd_byte *) obj_coff_external_syms (abfd)))
bad = true;
if (! bad)
{
- section = xcoff_data (abfd)->csects[aux.x_csect.x_scnlen.l];
+ section = xcoff_data (abfd)->csects[aux.x_csect.x_scnlen.u64];
if (section == NULL
|| (section->flags & SEC_HAS_CONTENTS) == 0)
bad = true;
if (csect == NULL)
goto error_return;
csect->vma = sym.n_value;
- csect->size = aux.x_csect.x_scnlen.l;
+ csect->size = aux.x_csect.x_scnlen.u64;
csect->alignment_power = SMTYP_ALIGN (aux.x_csect.x_smtyp);
/* There are a number of other fields and section flags
which we do not bother to set. */
csect->flags |= SEC_IS_COMMON;
csect->size = 0;
section = csect;
- value = aux.x_csect.x_scnlen.l;
+ value = aux.x_csect.x_scnlen.u64;
}
break;
{
unsigned long indx;
- indx = aux.x_csect.x_scnlen.l;
+ indx = aux.x_csect.x_scnlen.u64;
if (indx < obj_raw_syment_count (input_bfd))
{
long symindx;
symindx = flinfo->sym_indices[indx];
if (symindx < 0)
{
- aux.x_csect.x_scnlen.l = 0;
+ aux.x_csect.x_scnlen.u64 = 0;
}
else
{
- aux.x_csect.x_scnlen.l = symindx;
+ aux.x_csect.x_scnlen.u64 = symindx;
}
}
}
|| isymp->n_sclass == C_BLOCK
|| isymp->n_sclass == C_FCN)
{
- indx = aux.x_sym.x_fcnary.x_fcn.x_endndx.l;
+ indx = aux.x_sym.x_fcnary.x_fcn.x_endndx.u32;
if (indx > 0
&& indx < obj_raw_syment_count (input_bfd))
{
indx = output_index;
else
indx = flinfo->sym_indices[indx];
- aux.x_sym.x_fcnary.x_fcn.x_endndx.l = indx;
+ aux.x_sym.x_fcnary.x_fcn.x_endndx.u32 = indx;
}
}
- indx = aux.x_sym.x_tagndx.l;
+ indx = aux.x_sym.x_tagndx.u32;
if (indx > 0 && indx < obj_raw_syment_count (input_bfd))
{
long symindx;
symindx = flinfo->sym_indices[indx];
if (symindx < 0)
- aux.x_sym.x_tagndx.l = 0;
+ aux.x_sym.x_tagndx.u32 = 0;
else
- aux.x_sym.x_tagndx.l = symindx;
+ aux.x_sym.x_tagndx.u32 = symindx;
}
}
memset (&iraux, 0, sizeof iraux);
iraux.x_csect.x_smtyp = XTY_SD;
iraux.x_csect.x_smclas = XMC_TC0;
- iraux.x_csect.x_scnlen.l = 0;
+ iraux.x_csect.x_scnlen.u64 = 0;
bfd_coff_swap_aux_out (output_bfd, &iraux, T_NULL, C_HIDEXT, 0, 1,
flinfo->outsyms + bfd_coff_symesz (output_bfd));
whether the output is 32 or 64 bit. */
memset (&iraux, 0, sizeof iraux);
iraux.x_csect.x_smtyp = XTY_SD;
- /* iraux.x_csect.x_scnlen.l = 4 or 8, see below. */
+ /* iraux.x_csect.x_scnlen.u64 = 4 or 8, see below. */
iraux.x_csect.x_smclas = XMC_TC;
/* 32 bit uses a 32 bit R_POS to do the relocations
if (bfd_xcoff_is_xcoff64 (output_bfd))
{
irel->r_size = 63;
- iraux.x_csect.x_scnlen.l = 8;
+ iraux.x_csect.x_scnlen.u64 = 8;
}
else if (bfd_xcoff_is_xcoff32 (output_bfd))
{
irel->r_size = 31;
- iraux.x_csect.x_scnlen.l = 4;
+ iraux.x_csect.x_scnlen.u64 = 4;
}
else
return false;
/* For stub symbols, the section already has its correct size. */
if (h->root.u.def.section->owner == xcoff_hash_table (flinfo->info)->params->stub_bfd)
{
- aux.x_csect.x_scnlen.l = h->root.u.def.section->size;
+ aux.x_csect.x_scnlen.u64 = h->root.u.def.section->size;
}
else if ((h->flags & XCOFF_HAS_SIZE) != 0)
{
{
if (l->h == h)
{
- aux.x_csect.x_scnlen.l = l->size;
+ aux.x_csect.x_scnlen.u64 = l->size;
break;
}
}
isym.n_scnum = h->root.u.c.p->section->output_section->target_index;
isym.n_sclass = C_EXT;
aux.x_csect.x_smtyp = XTY_CM;
- aux.x_csect.x_scnlen.l = h->root.u.c.size;
+ aux.x_csect.x_scnlen.u64 = h->root.u.c.size;
}
else
abort ();
outsym += bfd_coff_symesz (output_bfd);
aux.x_csect.x_smtyp = XTY_LD;
- aux.x_csect.x_scnlen.l = obj_raw_syment_count (output_bfd);
+ aux.x_csect.x_scnlen.u64 = obj_raw_syment_count (output_bfd);
bfd_coff_swap_aux_out (output_bfd, (void *) &aux, T_NULL, C_EXT, 0, 1,
(void *) outsym);
outsym += bfd_coff_auxesz (output_bfd);
return type;
}
- if (pauxent != NULL && pauxent->x_sym.x_tagndx.l > 0)
+ if (pauxent != NULL && (int32_t) pauxent->x_sym.x_tagndx.u32 > 0)
{
debug_type *slot;
/* This is a reference to an existing type. FIXME: gdb checks
that the class is not C_STRTAG, nor C_UNTAG, nor C_ENTAG. */
- slot = coff_get_slot (types, pauxent->x_sym.x_tagndx.l);
+ slot = coff_get_slot (types, pauxent->x_sym.x_tagndx.u32);
if (*slot != DEBUG_TYPE_NULL)
return *slot;
else
int count;
bool done;
- symend = pauxent->x_sym.x_fcnary.x_fcn.x_endndx.l;
+ symend = pauxent->x_sym.x_fcnary.x_fcn.x_endndx.u32;
alloc = 10;
fields = (debug_field *) xmalloc (alloc * sizeof *fields);
int count;
bool done;
- symend = pauxent->x_sym.x_fcnary.x_fcn.x_endndx.l;
+ symend = pauxent->x_sym.x_fcnary.x_fcn.x_endndx.u32;
alloc = 10;
names = (const char **) xmalloc (alloc * sizeof *names);
/* Omit the tv related fields. */
/* Accessors. */
-#define SA_GET_SYM_TAGNDX(s) (SYM_AUXENT (s)->x_sym.x_tagndx.l)
+#define SA_GET_SYM_TAGNDX(s) (SYM_AUXENT (s)->x_sym.x_tagndx.u32)
#define SA_GET_SYM_LNNO(s) (SYM_AUXENT (s)->x_sym.x_misc.x_lnsz.x_lnno)
#define SA_GET_SYM_SIZE(s) (SYM_AUXENT (s)->x_sym.x_misc.x_lnsz.x_size)
#define SA_GET_SYM_FSIZE(s) (SYM_AUXENT (s)->x_sym.x_misc.x_fsize)
csectaux = &coffsymbol (symbol_get_bfdsym (within))
->native[S_GET_NUMBER_AUXILIARY(within)].u.auxent;
- SA_SET_SYM_FSIZE (sym, csectaux->x_csect.x_scnlen.l);
+ SA_SET_SYM_FSIZE (sym, csectaux->x_csect.x_scnlen.u64);
}
}
else if (S_GET_STORAGE_CLASS (sym) == C_FCN
{
/* This is the TOC table. */
know (strcmp (S_GET_NAME (sym), "TOC") == 0);
- a->x_csect.x_scnlen.l = 0;
+ a->x_csect.x_scnlen.u64 = 0;
a->x_csect.x_smtyp = (2 << 3) | XTY_SD;
}
else if (symbol_get_tc (sym)->subseg != 0)
/* This is a csect symbol. x_scnlen is the size of the
csect. */
if (symbol_get_tc (sym)->next == (symbolS *) NULL)
- a->x_csect.x_scnlen.l = (bfd_section_size (S_GET_SEGMENT (sym))
- - S_GET_VALUE (sym));
+ a->x_csect.x_scnlen.u64
+ = bfd_section_size (S_GET_SEGMENT (sym)) - S_GET_VALUE (sym);
else
{
resolve_symbol_value (symbol_get_tc (sym)->next);
- a->x_csect.x_scnlen.l = (S_GET_VALUE (symbol_get_tc (sym)->next)
- - S_GET_VALUE (sym));
+ a->x_csect.x_scnlen.u64
+ = S_GET_VALUE (symbol_get_tc (sym)->next) - S_GET_VALUE (sym);
}
if (symbol_get_tc (sym)->symbol_class == XMC_BS
|| symbol_get_tc (sym)->symbol_class == XMC_UL)
|| S_GET_SEGMENT (sym) == ppc_xcoff_tbss_section.segment)
{
/* This is a common symbol. */
- a->x_csect.x_scnlen.l = symbol_get_frag (sym)->fr_offset;
+ a->x_csect.x_scnlen.u64 = symbol_get_frag (sym)->fr_offset;
a->x_csect.x_smtyp = (symbol_get_tc (sym)->align << 3) | XTY_CM;
if (S_GET_SEGMENT (sym) == ppc_xcoff_tbss_section.segment)
symbol_get_tc (sym)->symbol_class = XMC_UL;
else if (! S_IS_DEFINED (sym))
{
/* This is an external symbol. */
- a->x_csect.x_scnlen.l = 0;
+ a->x_csect.x_scnlen.u64 = 0;
a->x_csect.x_smtyp = XTY_ER;
}
else if (ppc_is_toc_sym (sym))
|| (!ppc_is_toc_sym (next)))
{
if (ppc_after_toc_frag == (fragS *) NULL)
- a->x_csect.x_scnlen.l = (bfd_section_size (data_section)
- - S_GET_VALUE (sym));
+ a->x_csect.x_scnlen.u64
+ = bfd_section_size (data_section) - S_GET_VALUE (sym);
else
- a->x_csect.x_scnlen.l = (ppc_after_toc_frag->fr_address
- - S_GET_VALUE (sym));
+ a->x_csect.x_scnlen.u64
+ = ppc_after_toc_frag->fr_address - S_GET_VALUE (sym);
}
else
{
resolve_symbol_value (next);
- a->x_csect.x_scnlen.l = (S_GET_VALUE (next)
- - S_GET_VALUE (sym));
+ a->x_csect.x_scnlen.u64
+ = S_GET_VALUE (next) - S_GET_VALUE (sym);
}
a->x_csect.x_smtyp = (2 << 3) | XTY_SD;
}
if (csect == (symbolS *) NULL)
{
as_warn (_("warning: symbol %s has no csect"), S_GET_NAME (sym));
- a->x_csect.x_scnlen.l = 0;
+ a->x_csect.x_scnlen.u64 = 0;
}
else
{
i = S_GET_NUMBER_AUXILIARY (csect);
S_SET_NUMBER_AUXILIARY (csect, i + 1);
a = &coffsymbol (symbol_get_bfdsym (csect))->native[i + 1].u.auxent;
- a->x_csect.x_scnlen.l = 0;
+ a->x_csect.x_scnlen.u64 = 0;
a->x_csect.x_smtyp = XTY_SD;
a->x_csect.x_parmhash = 0;
a->x_csect.x_snhash = 0;
/* Define an array type. */
/* auxent refers to array, not base type. */
- if (aux->x_sym.x_tagndx.l == 0)
+ if (aux->x_sym.x_tagndx.u32 == 0)
cs->c_naux = 0;
/* Shift the indices down. */
unions, and enums, so we have to check the c_sclass field. SCO
3.2v4 cc gets confused with pointers to pointers to defined
structs, and generates negative x_tagndx fields. */
- if (cs->c_naux > 0 && aux->x_sym.x_tagndx.l != 0)
+ if (cs->c_naux > 0 && aux->x_sym.x_tagndx.u32 != 0)
{
if (cs->c_sclass != C_STRTAG
&& cs->c_sclass != C_UNTAG
&& cs->c_sclass != C_ENTAG
- && aux->x_sym.x_tagndx.l >= 0)
+ && (int32_t) aux->x_sym.x_tagndx.u32 >= 0)
{
- type = coff_alloc_type (aux->x_sym.x_tagndx.l);
+ type = coff_alloc_type (aux->x_sym.x_tagndx.u32);
return type;
}
else
union internal_auxent *aux,
struct objfile *objfile)
{
- if (aux->x_sym.x_tagndx.l == 0)
+ if (aux->x_sym.x_tagndx.u32 == 0)
cs->c_naux = 0; /* auxent refers to function, not base
type. */
{
type = coff_read_struct_type (cs->c_symnum,
aux->x_sym.x_misc.x_lnsz.x_size,
- aux->x_sym.x_fcnary.x_fcn.x_endndx.l,
+ aux->x_sym.x_fcnary.x_fcn.x_endndx.u32,
objfile);
}
return type;
{
type = coff_read_struct_type (cs->c_symnum,
aux->x_sym.x_misc.x_lnsz.x_size,
- aux->x_sym.x_fcnary.x_fcn.x_endndx.l,
+ aux->x_sym.x_fcnary.x_fcn.x_endndx.u32,
objfile);
}
type->set_code (TYPE_CODE_UNION);
{
type = coff_read_enum_type (cs->c_symnum,
aux->x_sym.x_misc.x_lnsz.x_size,
- aux->x_sym.x_fcnary.x_fcn.x_endndx.l,
+ aux->x_sym.x_fcnary.x_fcn.x_endndx.u32,
objfile);
}
return type;
/* Dealing with a symbol with a csect entry. */
#define CSECT(PP) ((PP)->x_csect)
-#define CSECT_LEN(PP) (CSECT(PP).x_scnlen.l)
+#define CSECT_LEN(PP) (CSECT(PP).x_scnlen.u64)
#define CSECT_ALIGN(PP) (SMTYP_ALIGN(CSECT(PP).x_smtyp))
#define CSECT_SMTYP(PP) (SMTYP_SMTYP(CSECT(PP).x_smtyp))
#define CSECT_SCLAS(PP) (CSECT(PP).x_smclas)
if (pst != NULL)
{
CORE_ADDR highval =
- symbol.n_value + csect_aux.x_csect.x_scnlen.l;
+ symbol.n_value + CSECT_LEN (&csect_aux);
if (highval > pst->raw_text_high ())
pst->set_text_high (highval);
{
union
{
- long l; /* str, un, or enum tag indx */
+ uint32_t u32; /* str, un, or enum tag indx */
struct coff_ptr_struct *p;
- } x_tagndx;
+ } x_tagndx;
union
{
struct
{
- unsigned short x_lnno; /* declaration line number */
- unsigned short x_size; /* str/union/array size */
- } x_lnsz;
- long x_fsize; /* size of function */
- } x_misc;
+ uint16_t x_lnno; /* declaration line number */
+ uint16_t x_size; /* str/union/array size */
+ } x_lnsz;
+ uint32_t x_fsize; /* size of function */
+ } x_misc;
union
{
struct
{ /* if ISFCN, tag, or .bb */
- bfd_signed_vma x_lnnoptr; /* ptr to fcn line # */
+ uint64_t x_lnnoptr; /* ptr to fcn line # */
union
{ /* entry ndx past block end */
- long l;
+ uint32_t u32;
struct coff_ptr_struct *p;
- } x_endndx;
- } x_fcn;
+ } x_endndx;
+ } x_fcn;
struct
{ /* if ISARY, up to 4 dimen. */
- unsigned short x_dimen[DIMNUM];
- } x_ary;
- } x_fcnary;
+ uint16_t x_dimen[DIMNUM];
+ } x_ary;
+ } x_fcnary;
- unsigned short x_tvndx; /* tv index */
- } x_sym;
+ uint16_t x_tvndx; /* tv index */
+ } x_sym;
struct
{
32 bits. */
uintptr_t x_zeroes;
uintptr_t x_offset;
- } x_n;
+ } x_n;
} x_n;
- unsigned char x_ftype;
- } x_file;
+ uint8_t x_ftype;
+ } x_file;
struct
{
- long x_scnlen; /* section length */
- unsigned short x_nreloc; /* # relocation entries */
- unsigned short x_nlinno; /* # line numbers */
- unsigned long x_checksum; /* section COMDAT checksum for PE */
- unsigned short x_associated; /* COMDAT associated section index for PE */
- unsigned char x_comdat; /* COMDAT selection number for PE */
- } x_scn;
+ uint32_t x_scnlen; /* section length */
+ uint16_t x_nreloc; /* # relocation entries */
+ uint16_t x_nlinno; /* # line numbers */
+ uint32_t x_checksum; /* section COMDAT checksum for PE */
+ uint16_t x_associated; /* COMDAT associated section index for PE */
+ uint8_t x_comdat; /* COMDAT selection number for PE */
+ } x_scn;
struct
{
- long x_tvfill; /* tv fill value */
- unsigned short x_tvlen; /* length of .tv */
- unsigned short x_tvran[2]; /* tv range */
- } x_tv; /* info about .tv section (in auxent of symbol .tv)) */
+ uint32_t x_tvfill; /* tv fill value */
+ uint16_t x_tvlen; /* length of .tv */
+ uint16_t x_tvran[2]; /* tv range */
+ } x_tv; /* info about .tv section (in auxent of symbol .tv)) */
/******************************************
* RS/6000-specific auxent - last auxent for every external symbol
{
union
{ /* csect length or enclosing csect */
- bfd_signed_vma l;
+ uint64_t u64;
struct coff_ptr_struct *p;
} x_scnlen;
- long x_parmhash; /* parm type hash index */
- unsigned short x_snhash; /* sect num with parm hash */
- unsigned char x_smtyp; /* symbol align and type */
+ uint32_t x_parmhash; /* parm type hash index */
+ uint16_t x_snhash; /* sect num with parm hash */
+ uint8_t x_smtyp; /* symbol align and type */
/* 0-4 - Log 2 of alignment */
/* 5-7 - symbol type */
- unsigned char x_smclas; /* storage mapping class */
- long x_stab; /* dbx stab info index */
- unsigned short x_snstab; /* sect num with dbx stab */
- } x_csect; /* csect definition information */
+ uint8_t x_smclas; /* storage mapping class */
+ uint32_t x_stab; /* dbx stab info index */
+ uint16_t x_snstab; /* sect num with dbx stab */
+ } x_csect; /* csect definition information */
/* x_smtyp values: */
struct
{
- long x_scnlen; /* Section length */
- long x_nreloc; /* Number of relocation entries */
+ uint64_t x_scnlen; /* Section length */
+ uint64_t x_nreloc; /* Number of relocation entries */
} x_sect;
};
if (h->symbol_class != C_NT_WEAK || h->numaux != 1)
continue;
h2 = h->auxbfd->tdata.coff_obj_data->sym_hashes
- [h->aux->x_sym.x_tagndx.l];
+ [h->aux->x_sym.x_tagndx.u32];
/* We don't want a base reloc if the aux sym is not
found, undefined, or if it is the constant ABS
zero default value. (We broaden that slightly by