mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-24 12:23:31 +08:00
some cleanup of vms code -- sizeof usage &c
This commit is contained in:
@ -1,3 +1,23 @@
|
|||||||
|
Mon Dec 19 13:49:07 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
|
||||||
|
|
||||||
|
* config/obj-vms.c (Create_VMS_Object_File): Instead of formatting
|
||||||
|
a buffer to pass to `error', just call `as_fatal' directly.
|
||||||
|
(VMS_Psect_Spec): Ditto.
|
||||||
|
(VMS_TBT_Module_Begin, VMS_TBT_Source_File, gen1,
|
||||||
|
VMS_typedef_parse, VMS_LSYM_Parse, VMS_Emit_Globalvalues): Call
|
||||||
|
as_tsktsk instead of printf.
|
||||||
|
(VMS_TBT_Module_Begin, VMS_TBT_Line_PC_Correlation,
|
||||||
|
VMS_TBT_Source_File, VMS_TBT_Source_Lines,
|
||||||
|
VMS_Store_Repeated_Data, VMS_Check_For_Main): Use explicit
|
||||||
|
integers rather than sizeof expressions using basic integer types,
|
||||||
|
in case host and target aren't the same. Use memcpy or COPY_*
|
||||||
|
macros instead of possibly unaligned word or longword assignment.
|
||||||
|
|
||||||
|
* config/obj-vms.h (OBJ_SYMFIELD_TYPE): New macro.
|
||||||
|
* config/obj-vms.c (VMS_Store_PIC_Symbol_Reference,
|
||||||
|
VMS_Check_For_Main, VMS_write_object_file): Use sy_obj instead of
|
||||||
|
forcing sy_number to hold a pointer.
|
||||||
|
|
||||||
Fri Dec 16 14:40:16 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
|
Fri Dec 16 14:40:16 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
|
||||||
|
|
||||||
* config/tc-sh.c (md_begin): Don't fill in md_relax_table here.
|
* config/tc-sh.c (md_begin): Don't fill in md_relax_table here.
|
||||||
|
@ -494,13 +494,7 @@ Create_VMS_Object_File ()
|
|||||||
* Deal with errors
|
* Deal with errors
|
||||||
*/
|
*/
|
||||||
if (VMS_Object_File_FD < 0)
|
if (VMS_Object_File_FD < 0)
|
||||||
{
|
as_fatal ("Couldn't create VMS object file \"%s\"", out_file_name);
|
||||||
char Error_Line[256];
|
|
||||||
|
|
||||||
sprintf (Error_Line, "Couldn't create VMS object file \"%s\"",
|
|
||||||
out_file_name);
|
|
||||||
error (Error_Line);
|
|
||||||
}
|
|
||||||
/*
|
/*
|
||||||
* Initialize object file hacking variables
|
* Initialize object file hacking variables
|
||||||
*/
|
*/
|
||||||
@ -823,7 +817,7 @@ VMS_TBT_Module_Begin ()
|
|||||||
if (strlen (Module_Name) > 31)
|
if (strlen (Module_Name) > 31)
|
||||||
{
|
{
|
||||||
if (flag_hash_long_names)
|
if (flag_hash_long_names)
|
||||||
printf ("%s: Module name truncated: %s\n", myname, Module_Name);
|
as_tsktsk ("Module name truncated: %s", Module_Name);
|
||||||
Module_Name[31] = 0;
|
Module_Name[31] = 0;
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
@ -842,7 +836,7 @@ VMS_TBT_Module_Begin ()
|
|||||||
* Language type == "C"
|
* Language type == "C"
|
||||||
*/
|
*/
|
||||||
COPY_LONG (cp, DST_S_C_C);
|
COPY_LONG (cp, DST_S_C_C);
|
||||||
cp += sizeof (long);
|
cp += 4;
|
||||||
/*
|
/*
|
||||||
* Store the module name
|
* Store the module name
|
||||||
*/
|
*/
|
||||||
@ -1207,7 +1201,7 @@ VMS_TBT_Line_PC_Correlation (Line_Number, Offset, Psect, Do_Delta)
|
|||||||
{
|
{
|
||||||
*cp++ = DST_S_C_INCR_LINUM_W;
|
*cp++ = DST_S_C_INCR_LINUM_W;
|
||||||
COPY_SHORT (cp, Line_Number - 1);
|
COPY_SHORT (cp, Line_Number - 1);
|
||||||
cp += sizeof (short);
|
cp += 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
@ -1223,13 +1217,13 @@ VMS_TBT_Line_PC_Correlation (Line_Number, Offset, Psect, Do_Delta)
|
|||||||
{
|
{
|
||||||
*cp++ = DST_S_C_DELTA_PC_W;
|
*cp++ = DST_S_C_DELTA_PC_W;
|
||||||
COPY_SHORT (cp, Offset);
|
COPY_SHORT (cp, Offset);
|
||||||
cp += sizeof (short);
|
cp += 2;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
*cp++ = DST_S_C_DELTA_PC_L;
|
*cp++ = DST_S_C_DELTA_PC_L;
|
||||||
COPY_LONG (cp, Offset);
|
COPY_LONG (cp, Offset);
|
||||||
cp += sizeof (long);
|
cp += 4;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Local[0] = cp - (Local + 1);
|
Local[0] = cp - (Local + 1);
|
||||||
@ -1291,8 +1285,8 @@ VMS_TBT_Source_File (Filename, ID_Number)
|
|||||||
Status = sys$open (&Fab);
|
Status = sys$open (&Fab);
|
||||||
if (!(Status & 1))
|
if (!(Status & 1))
|
||||||
{
|
{
|
||||||
printf ("gas: Couldn't find source file \"%s\", status=%%X%x\n",
|
as_tsktsk ("Couldn't find source file \"%s\", status=%%X%x",
|
||||||
Filename, Status);
|
Filename, Status);
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
sys$close (&Fab);
|
sys$close (&Fab);
|
||||||
@ -1327,25 +1321,25 @@ VMS_TBT_Source_File (Filename, ID_Number)
|
|||||||
* File ID
|
* File ID
|
||||||
*/
|
*/
|
||||||
COPY_SHORT (cp, ID_Number);
|
COPY_SHORT (cp, ID_Number);
|
||||||
cp += sizeof (short);
|
cp += 2;
|
||||||
#ifndef VMS
|
#ifndef VMS
|
||||||
/*
|
/*
|
||||||
* Creation Date. Unknown, so we fill with zeroes.
|
* Creation Date. Unknown, so we fill with zeroes.
|
||||||
*/
|
*/
|
||||||
*(long *) cp = 0;
|
COPY_LONG (cp, 0);
|
||||||
cp += sizeof (long);
|
cp += 4;
|
||||||
*(long *) cp = 0;
|
COPY_LONG (cp, 0);
|
||||||
cp += sizeof (long);
|
cp += 4;
|
||||||
/*
|
/*
|
||||||
* End of file block
|
* End of file block
|
||||||
*/
|
*/
|
||||||
*(long *) cp = 0;
|
COPY_LONG (cp, 0);
|
||||||
cp += sizeof (long);
|
cp += 4;
|
||||||
/*
|
/*
|
||||||
* First free byte
|
* First free byte
|
||||||
*/
|
*/
|
||||||
*(short *) cp = 0;
|
COPY_SHORT (cp, 0);
|
||||||
cp += sizeof (short);
|
cp += 2;
|
||||||
/*
|
/*
|
||||||
* Record format
|
* Record format
|
||||||
*/
|
*/
|
||||||
@ -1359,20 +1353,18 @@ VMS_TBT_Source_File (Filename, ID_Number)
|
|||||||
/*
|
/*
|
||||||
* Creation Date
|
* Creation Date
|
||||||
*/
|
*/
|
||||||
*(long *) cp = ((long *) &Date_Xab.xab$q_cdt)[0];
|
memcpy (cp, (char *) &Date_Xab.xab$q_cdt, 8);
|
||||||
cp += sizeof (long);
|
cp += 8;
|
||||||
*(long *) cp = ((long *) &Date_Xab.xab$q_cdt)[1];
|
|
||||||
cp += sizeof (long);
|
|
||||||
/*
|
/*
|
||||||
* End of file block
|
* End of file block
|
||||||
*/
|
*/
|
||||||
*(long *) cp = File_Header_Xab.xab$l_ebk;
|
COPY_LONG (cp, File_Header_Xab.xab$l_ebk);
|
||||||
cp += sizeof (long);
|
cp += 4;
|
||||||
/*
|
/*
|
||||||
* First free byte
|
* First free byte
|
||||||
*/
|
*/
|
||||||
*(short *) cp = File_Header_Xab.xab$w_ffb;
|
COPY_SHORT (cp, File_Header_Xab.xab$w_ffb);
|
||||||
cp += sizeof (short);
|
cp += 2;
|
||||||
/*
|
/*
|
||||||
* Record format
|
* Record format
|
||||||
*/
|
*/
|
||||||
@ -1426,19 +1418,19 @@ VMS_TBT_Source_Lines (ID_Number, Starting_Line_Number, Number_Of_Lines)
|
|||||||
* File ID Number
|
* File ID Number
|
||||||
*/
|
*/
|
||||||
COPY_SHORT (cp, ID_Number);
|
COPY_SHORT (cp, ID_Number);
|
||||||
cp += sizeof (short);
|
cp += 2;
|
||||||
/*
|
/*
|
||||||
* Set record number
|
* Set record number
|
||||||
*/
|
*/
|
||||||
*cp++ = DST_S_C_SRC_SETREC_L;
|
*cp++ = DST_S_C_SRC_SETREC_L;
|
||||||
COPY_LONG (cp, Starting_Line_Number);
|
COPY_LONG (cp, Starting_Line_Number);
|
||||||
cp += sizeof (long);
|
cp += 4;
|
||||||
/*
|
/*
|
||||||
* Define lines
|
* Define lines
|
||||||
*/
|
*/
|
||||||
*cp++ = DST_S_C_SRC_DEFLINES_W;
|
*cp++ = DST_S_C_SRC_DEFLINES_W;
|
||||||
COPY_SHORT (cp, Number_Of_Lines);
|
COPY_SHORT (cp, Number_Of_Lines);
|
||||||
cp += sizeof (short);
|
cp += 2;
|
||||||
/*
|
/*
|
||||||
* Done
|
* Done
|
||||||
*/
|
*/
|
||||||
@ -1806,9 +1798,8 @@ gen1 (spnt, array_suffix_len)
|
|||||||
spnt1 = find_symbol (spnt1->type2);
|
spnt1 = find_symbol (spnt1->type2);
|
||||||
if (!spnt1)
|
if (!spnt1)
|
||||||
{
|
{
|
||||||
printf ("gcc-as warning(debugger output):");
|
as_tsktsk ("debugger forward reference error, dbx type %d",
|
||||||
printf ("Forward reference error, dbx type %d\n",
|
spnt->type2);
|
||||||
spnt->type2);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1880,7 +1871,7 @@ generate_suffix (spnt, dbx_type)
|
|||||||
*/
|
*/
|
||||||
if ((total_len >= MAX_DEBUG_RECORD) || overflow)
|
if ((total_len >= MAX_DEBUG_RECORD) || overflow)
|
||||||
{
|
{
|
||||||
printf (" Variable descriptor %d too complicated. Defined as *void ", spnt->dbx_type);
|
as_warn ("Variable descriptor %d too complicated. Defined as void*", spnt->dbx_type);
|
||||||
VMS_Store_Immediate_Data (pvoid, 6, OBJ_S_C_DBG);
|
VMS_Store_Immediate_Data (pvoid, 6, OBJ_S_C_DBG);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -2505,8 +2496,8 @@ VMS_typedef_parse (str)
|
|||||||
strcpy(str, pnt1);
|
strcpy(str, pnt1);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
printf ("gcc-as warning(debugger output):");
|
as_tsktsk ("debugginer output: %d is an unknown untyped variable.",
|
||||||
printf (" %d is an unknown untyped variable.\n", spnt->dbx_type);
|
spnt->dbx_type);
|
||||||
return 1; /* do not know what this is */
|
return 1; /* do not know what this is */
|
||||||
}
|
}
|
||||||
/* now define this module*/
|
/* now define this module*/
|
||||||
@ -2723,8 +2714,8 @@ VMS_typedef_parse (str)
|
|||||||
/* check if this is a forward reference */
|
/* check if this is a forward reference */
|
||||||
if(final_pass && final_forward_reference(spnt1))
|
if(final_pass && final_forward_reference(spnt1))
|
||||||
{
|
{
|
||||||
printf("gcc-as warning(debugger output):");
|
as_tsktsk ("debugger output: structure element `%s' has undefined type",
|
||||||
printf("structure element `%s' has undefined type\n",pnt2);
|
pnt2);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
Local[i++] = 7 + len;
|
Local[i++] = 7 + len;
|
||||||
@ -2835,8 +2826,8 @@ VMS_typedef_parse (str)
|
|||||||
default:
|
default:
|
||||||
spnt->advanced = UNKNOWN;
|
spnt->advanced = UNKNOWN;
|
||||||
spnt->VMS_type = 0;
|
spnt->VMS_type = 0;
|
||||||
printf ("gcc-as warning(debugger output):");
|
as_tsktsk ("debugger output: %d is an unknown type of variable.",
|
||||||
printf (" %d is an unknown type of variable.\n", spnt->dbx_type);
|
spnt->dbx_type);
|
||||||
return 1; /* unable to decipher */
|
return 1; /* unable to decipher */
|
||||||
}
|
}
|
||||||
/* this removes the evidence of the definition so that the outer levels of
|
/* this removes the evidence of the definition so that the outer levels of
|
||||||
@ -2966,8 +2957,8 @@ VMS_LSYM_Parse ()
|
|||||||
/* if (pass > 1) printf(" Required %d passes\n",pass);*/
|
/* if (pass > 1) printf(" Required %d passes\n",pass);*/
|
||||||
if (incomplete != 0)
|
if (incomplete != 0)
|
||||||
{
|
{
|
||||||
printf ("gcc-as warning(debugger output):");
|
as_tsktsk ("debugger output: Unable to resolve %d circular references.",
|
||||||
printf ("Unable to resolve %d circular references.\n", incomplete);
|
incomplete);
|
||||||
}
|
}
|
||||||
fpnt = f_ref_root;
|
fpnt = f_ref_root;
|
||||||
symbol_name = "\0";
|
symbol_name = "\0";
|
||||||
@ -2978,9 +2969,8 @@ VMS_LSYM_Parse ()
|
|||||||
if (find_symbol (fpnt->dbx_type) !=
|
if (find_symbol (fpnt->dbx_type) !=
|
||||||
(struct VMS_DBG_Symbol *) NULL)
|
(struct VMS_DBG_Symbol *) NULL)
|
||||||
{
|
{
|
||||||
printf ("gcc-as warning(debugger output):");
|
as_tsktsk ("debugger forward reference error, dbx type %d",
|
||||||
printf ("Forward reference error, dbx type %d\n",
|
fpnt->dbx_type);
|
||||||
fpnt->dbx_type);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
fixit[0] = 0;
|
fixit[0] = 0;
|
||||||
@ -3803,14 +3793,9 @@ VMS_Psect_Spec (Name, Size, Type, vsp)
|
|||||||
/* In this case we still generate the psect */
|
/* In this case we still generate the psect */
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
{
|
as_fatal ("Globalsymbol attribute for symbol %s was unexpected.",
|
||||||
char Error_Line[256];
|
Name);
|
||||||
sprintf (Error_Line,
|
break;
|
||||||
"Globalsymbol attribute for symbol %s was unexpected.\n",
|
|
||||||
Name);
|
|
||||||
error (Error_Line);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
} /* switch */
|
} /* switch */
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3981,7 +3966,7 @@ VMS_Emit_Globalvalues (text_siz, data_siz, Data_Segment)
|
|||||||
VMS_Global_Symbol_Spec (stripped_name, 0, globalvalue, 3);
|
VMS_Global_Symbol_Spec (stripped_name, 0, globalvalue, 3);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
printf (" Invalid globalvalue of %s\n", stripped_name);
|
as_tsktsk ("Invalid globalvalue of %s", stripped_name);
|
||||||
break;
|
break;
|
||||||
} /* switch */
|
} /* switch */
|
||||||
} /* if */
|
} /* if */
|
||||||
@ -4123,12 +4108,24 @@ VMS_Store_Repeated_Data (Repeat_Count, Pointer, Size, Record_Type)
|
|||||||
/*
|
/*
|
||||||
* Ignore zero bytes/words/longwords
|
* Ignore zero bytes/words/longwords
|
||||||
*/
|
*/
|
||||||
if ((Size == sizeof (char)) && (*Pointer == 0))
|
switch (Size)
|
||||||
return;
|
{
|
||||||
if ((Size == sizeof (short)) && (*(short *) Pointer == 0))
|
case 4:
|
||||||
return;
|
if (Pointer[3] != 0
|
||||||
if ((Size == sizeof (long)) && (*(long *) Pointer == 0))
|
|| Pointer[2] != 0)
|
||||||
return;
|
goto do_it;
|
||||||
|
case 2:
|
||||||
|
if (Pointer[1] != 0)
|
||||||
|
goto do_it;
|
||||||
|
case 1:
|
||||||
|
if (Pointer[0] != 0)
|
||||||
|
goto do_it;
|
||||||
|
/* zero value */
|
||||||
|
return;
|
||||||
|
default:
|
||||||
|
do_it:
|
||||||
|
break;
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
* If the data is too big for a TIR_S_C_STO_RIVB sub-record
|
* If the data is too big for a TIR_S_C_STO_RIVB sub-record
|
||||||
* then we do it manually
|
* then we do it manually
|
||||||
@ -4182,8 +4179,7 @@ VMS_Store_PIC_Symbol_Reference (Symbol, Offset, PC_Relative,
|
|||||||
int Psect_Offset;
|
int Psect_Offset;
|
||||||
int Record_Type;
|
int Record_Type;
|
||||||
{
|
{
|
||||||
register struct VMS_Symbol *vsp =
|
register struct VMS_Symbol *vsp = Symbol->sy_obj;
|
||||||
(struct VMS_Symbol *) (Symbol->sy_number);
|
|
||||||
char Local[32];
|
char Local[32];
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -4553,6 +4549,7 @@ VMS_Check_For_Main ()
|
|||||||
S_SET_VALUE (symbolP, 0);
|
S_SET_VALUE (symbolP, 0);
|
||||||
symbolP->sy_name_offset = 0;
|
symbolP->sy_name_offset = 0;
|
||||||
symbolP->sy_number = 0;
|
symbolP->sy_number = 0;
|
||||||
|
symbolP->sy_obj = 0;
|
||||||
symbolP->sy_frag = New_Frag;
|
symbolP->sy_frag = New_Frag;
|
||||||
symbolP->sy_resolved = 0;
|
symbolP->sy_resolved = 0;
|
||||||
symbolP->sy_resolving = 0;
|
symbolP->sy_resolving = 0;
|
||||||
@ -4571,7 +4568,7 @@ VMS_Check_For_Main ()
|
|||||||
fixP->fx_addsy = symbolP;
|
fixP->fx_addsy = symbolP;
|
||||||
fixP->fx_subsy = 0;
|
fixP->fx_subsy = 0;
|
||||||
fixP->fx_offset = 0;
|
fixP->fx_offset = 0;
|
||||||
fixP->fx_size = sizeof (long);
|
fixP->fx_size = 4;
|
||||||
fixP->fx_pcrel = 1;
|
fixP->fx_pcrel = 1;
|
||||||
fixP->fx_next = text_fix_root;
|
fixP->fx_next = text_fix_root;
|
||||||
text_fix_root = fixP;
|
text_fix_root = fixP;
|
||||||
@ -4762,7 +4759,7 @@ VMS_write_object_file (text_siz, data_siz, bss_siz, text_frag_root,
|
|||||||
vsp->Psect_Offset = 0;
|
vsp->Psect_Offset = 0;
|
||||||
vsp->Next = VMS_Symbols;
|
vsp->Next = VMS_Symbols;
|
||||||
VMS_Symbols = vsp;
|
VMS_Symbols = vsp;
|
||||||
sp->sy_number = (int) vsp;
|
sp->sy_obj = vsp;
|
||||||
/*
|
/*
|
||||||
* Make the psect for this data
|
* Make the psect for this data
|
||||||
*/
|
*/
|
||||||
@ -4813,7 +4810,7 @@ VMS_write_object_file (text_siz, data_siz, bss_siz, text_frag_root,
|
|||||||
bss_address_frag.fr_address;
|
bss_address_frag.fr_address;
|
||||||
vsp->Next = VMS_Symbols;
|
vsp->Next = VMS_Symbols;
|
||||||
VMS_Symbols = vsp;
|
VMS_Symbols = vsp;
|
||||||
sp->sy_number = (int) vsp;
|
sp->sy_obj = vsp;
|
||||||
break;
|
break;
|
||||||
/*
|
/*
|
||||||
* Global initialized data
|
* Global initialized data
|
||||||
@ -4831,15 +4828,14 @@ VMS_write_object_file (text_siz, data_siz, bss_siz, text_frag_root,
|
|||||||
vsp->Psect_Offset = 0;
|
vsp->Psect_Offset = 0;
|
||||||
vsp->Next = VMS_Symbols;
|
vsp->Next = VMS_Symbols;
|
||||||
VMS_Symbols = vsp;
|
VMS_Symbols = vsp;
|
||||||
sp->sy_number = (int) vsp;
|
sp->sy_obj = vsp;
|
||||||
/*
|
/*
|
||||||
* Make its psect
|
* Make its psect
|
||||||
*/
|
*/
|
||||||
Globalref = VMS_Psect_Spec (
|
Globalref = VMS_Psect_Spec (S_GET_NAME (sp),
|
||||||
S_GET_NAME (sp),
|
vsp->Size,
|
||||||
vsp->Size,
|
S_GET_OTHER (sp) ? "CONST" : "COMMON",
|
||||||
S_GET_OTHER (sp) ? "CONST" : "COMMON",
|
vsp);
|
||||||
vsp);
|
|
||||||
if (Globalref)
|
if (Globalref)
|
||||||
Psect_Number--;
|
Psect_Number--;
|
||||||
|
|
||||||
@ -4884,7 +4880,7 @@ VMS_write_object_file (text_siz, data_siz, bss_siz, text_frag_root,
|
|||||||
Local_Initialized_Data_Size += vsp->Size;
|
Local_Initialized_Data_Size += vsp->Size;
|
||||||
vsp->Next = VMS_Symbols;
|
vsp->Next = VMS_Symbols;
|
||||||
VMS_Symbols = vsp;
|
VMS_Symbols = vsp;
|
||||||
sp->sy_number = (int) vsp;
|
sp->sy_obj = vsp;
|
||||||
break;
|
break;
|
||||||
/*
|
/*
|
||||||
* Global Text definition
|
* Global Text definition
|
||||||
@ -4943,7 +4939,7 @@ VMS_write_object_file (text_siz, data_siz, bss_siz, text_frag_root,
|
|||||||
vsp->Psect_Offset = S_GET_VALUE (sp);
|
vsp->Psect_Offset = S_GET_VALUE (sp);
|
||||||
vsp->Next = VMS_Symbols;
|
vsp->Next = VMS_Symbols;
|
||||||
VMS_Symbols = vsp;
|
VMS_Symbols = vsp;
|
||||||
sp->sy_number = (int) vsp;
|
sp->sy_obj = vsp;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
/*
|
/*
|
||||||
@ -4973,8 +4969,7 @@ VMS_write_object_file (text_siz, data_siz, bss_siz, text_frag_root,
|
|||||||
* Error
|
* Error
|
||||||
*/
|
*/
|
||||||
if (S_GET_TYPE (sp) != 22)
|
if (S_GET_TYPE (sp) != 22)
|
||||||
printf (" ERROR, unknown type (%d)\n",
|
as_tsktsk ("unhandled stab type %d", S_GET_TYPE (sp));
|
||||||
S_GET_TYPE (sp));
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -5110,7 +5105,7 @@ VMS_write_object_file (text_siz, data_siz, bss_siz, text_frag_root,
|
|||||||
/*
|
/*
|
||||||
* Size will HAVE to be "long"
|
* Size will HAVE to be "long"
|
||||||
*/
|
*/
|
||||||
if (fixP->fx_size != sizeof (long))
|
if (fixP->fx_size != 4)
|
||||||
error ("Fixup datum was not a longword");
|
error ("Fixup datum was not a longword");
|
||||||
/*
|
/*
|
||||||
* Symbol must be "added" (if it is ever
|
* Symbol must be "added" (if it is ever
|
||||||
@ -5265,7 +5260,7 @@ VMS_write_object_file (text_siz, data_siz, bss_siz, text_frag_root,
|
|||||||
/*
|
/*
|
||||||
* Size will HAVE to be "long"
|
* Size will HAVE to be "long"
|
||||||
*/
|
*/
|
||||||
if (fixP->fx_size != sizeof (long))
|
if (fixP->fx_size != 4)
|
||||||
error ("Fixup datum was not a longword");
|
error ("Fixup datum was not a longword");
|
||||||
/*
|
/*
|
||||||
* Symbol must be "added" (if it is ever
|
* Symbol must be "added" (if it is ever
|
||||||
@ -5277,16 +5272,15 @@ VMS_write_object_file (text_siz, data_siz, bss_siz, text_frag_root,
|
|||||||
/*
|
/*
|
||||||
* Store the symbol value in a PIC fashion
|
* Store the symbol value in a PIC fashion
|
||||||
*/
|
*/
|
||||||
VMS_Store_PIC_Symbol_Reference (
|
VMS_Store_PIC_Symbol_Reference (fixP->fx_addsy,
|
||||||
fixP->fx_addsy,
|
fixP->fx_offset,
|
||||||
fixP->fx_offset,
|
fixP->fx_pcrel,
|
||||||
fixP->fx_pcrel,
|
vsp->Psect_Index,
|
||||||
vsp->Psect_Index,
|
fixP->fx_frag->fr_address +
|
||||||
fixP->fx_frag->fr_address +
|
fixP->fx_where -
|
||||||
fixP->fx_where -
|
S_GET_VALUE (vsp->Symbol) +
|
||||||
S_GET_VALUE (vsp->Symbol) +
|
vsp->Psect_Offset,
|
||||||
vsp->Psect_Offset,
|
OBJ_S_C_TIR);
|
||||||
OBJ_S_C_TIR);
|
|
||||||
/*
|
/*
|
||||||
* Done
|
* Done
|
||||||
*/
|
*/
|
||||||
|
@ -129,6 +129,8 @@ typedef struct nlist obj_symbol_type; /* Symbol table entry */
|
|||||||
|
|
||||||
/* Symbol table macros and constants */
|
/* Symbol table macros and constants */
|
||||||
|
|
||||||
|
#define OBJ_SYMFIELD_TYPE struct VMS_Symbol *
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Macros to extract information from a symbol table entry.
|
* Macros to extract information from a symbol table entry.
|
||||||
* This syntaxic indirection allows independence regarding a.out or coff.
|
* This syntaxic indirection allows independence regarding a.out or coff.
|
||||||
|
Reference in New Issue
Block a user