* config/obj-som.h (S_SET_OTHER, S_SET_TYPE): Delete a.out crud.

(S_SET_DESC, S_GET_OTHER, S_GET_TYPE, S_GET_DESC): Likewise.
	(obj_attach_unwind_info): Do not define.  Not needed anymore.
	* config/tc-hppa.c: Delete whitespace at EOL.
	(struct hppa_fix_struct): Delete fx_unwind field and all references.
	(fix_new_hppa): Last arg is now a pointer to an int.  Do not
	call obj_attach_unwind_info anymore.  For SOM R_ENTRY and R_EXIT
	fixups, store 32bits of unwind information in the fx_addnumber
	field of the fixup.
	(md_assemble, pa_entry, process_exit, pa_procend): For SOM R_ENTRY
	and R_EXIT fixups, pass a NULL pointer to fix_new_hppa, and a
	pointer to 32 bits of unwind info.
	(tc_gen_reloc): For SOM R_ENTRY and R_EXIT fixups, set the symbol
	pointer to the dummy symbol; set the addend field to fx_addnumber.
	(pa_comm, pa_equ, pa_type_args, pa_import): Use bfd_XXX_section_ptr
	rather than &bfd_XXX_section.
This commit is contained in:
Jeff Law 1994-09-14 02:20:24 +00:00
parent d7152d074b
commit 75c28b4966
2 changed files with 98 additions and 84 deletions

View file

@ -1,3 +1,22 @@
Tue Sep 13 20:05:47 1994 Jeff Law (law@snake.cs.utah.edu)
* config/obj-som.h (S_SET_OTHER, S_SET_TYPE): Delete a.out crud.
(S_SET_DESC, S_GET_OTHER, S_GET_TYPE, S_GET_DESC): Likewise.
(obj_attach_unwind_info): Do not define. Not needed anymore.
* config/tc-hppa.c: Delete whitespace at EOL.
(struct hppa_fix_struct): Delete fx_unwind field and all references.
(fix_new_hppa): Last arg is now a pointer to an int. Do not
call obj_attach_unwind_info anymore. For SOM R_ENTRY and R_EXIT
fixups, store 32bits of unwind information in the fx_addnumber
field of the fixup.
(md_assemble, pa_entry, process_exit, pa_procend): For SOM R_ENTRY
and R_EXIT fixups, pass a NULL pointer to fix_new_hppa, and a
pointer to 32 bits of unwind info.
(tc_gen_reloc): For SOM R_ENTRY and R_EXIT fixups, set the symbol
pointer to the dummy symbol; set the addend field to fx_addnumber.
(pa_comm, pa_equ, pa_type_args, pa_import): Use bfd_XXX_section_ptr
rather than &bfd_XXX_section.
Tue Sep 13 21:15:36 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
* config/tc-i386.c (md_apply_fix_1): For GOTPC relocs, decrement

View file

@ -421,9 +421,6 @@ struct hppa_fix_struct
/* Argument relocation bits. */
long fx_arg_reloc;
/* The unwind descriptor associated with this fixup. */
char fx_unwind[8];
/* The segment this fixup appears in. */
segT segment;
};
@ -529,7 +526,7 @@ static void fix_new_hppa PARAMS ((fragS *, int, int, symbolS *,
long, expressionS *, int,
bfd_reloc_code_real_type,
enum hppa_reloc_field_selector_type,
int, long, char *));
int, long, int *));
static int is_end_of_statement PARAMS ((void));
static int reg_name_search PARAMS ((char *));
static int pa_chk_field_selector PARAMS ((char **));
@ -1145,7 +1142,7 @@ pa_undefine_label ()
static void
fix_new_hppa (frag, where, size, add_symbol, offset, exp, pcrel,
r_type, r_field, r_format, arg_reloc, unwind_desc)
r_type, r_field, r_format, arg_reloc, unwind_bits)
fragS *frag;
int where;
int size;
@ -1157,7 +1154,7 @@ fix_new_hppa (frag, where, size, add_symbol, offset, exp, pcrel,
enum hppa_reloc_field_selector_type r_field;
int r_format;
long arg_reloc;
char *unwind_desc;
int* unwind_bits;
{
fixS *new_fix;
@ -1174,17 +1171,10 @@ fix_new_hppa (frag, where, size, add_symbol, offset, exp, pcrel,
hppa_fix->fx_r_format = r_format;
hppa_fix->fx_arg_reloc = arg_reloc;
hppa_fix->segment = now_seg;
if (unwind_desc)
{
bcopy (unwind_desc, hppa_fix->fx_unwind, 8);
/* If necessary call BFD backend function to attach the
unwind bits to the target dependent parts of a BFD symbol.
Yuk. */
#ifdef obj_attach_unwind_info
obj_attach_unwind_info (add_symbol->bsym, unwind_desc);
#ifdef OBJ_SOM
if (r_type == R_ENTRY || r_type == R_EXIT)
new_fix->fx_addnumber = *unwind_bits;
#endif
}
/* foo-$global$ is used to access non-automatic storage. $global$
is really just a marker and has served its purpose, so eliminate
@ -1230,7 +1220,7 @@ cons_fix_new_hppa (frag, where, size, exp)
fix_new_hppa (frag, where, size,
(symbolS *) NULL, (offsetT) 0, exp, 0, rel_type,
hppa_field_selector, 32, 0, (char *) 0);
hppa_field_selector, 32, 0, NULL);
/* Reset field selector to its default state. */
hppa_field_selector = 0;
@ -1330,9 +1320,9 @@ md_assemble (str)
char *where = frag_more (0);
fix_new_hppa (frag_now, where - frag_now->fr_literal, 0,
last_call_info->start_symbol, (offsetT) 0, NULL,
NULL, (offsetT) 0, NULL,
0, R_HPPA_ENTRY, e_fsel, 0, 0,
(char *) &last_call_info->ci_unwind.descriptor);
(int *)&last_call_info->ci_unwind.descriptor);
}
#endif
}
@ -2658,7 +2648,6 @@ tc_gen_reloc (section, fixp)
case R_S_MODE:
case R_D_MODE:
case R_R_MODE:
case R_EXIT:
case R_FSEL:
case R_LSEL:
case R_RSEL:
@ -2667,6 +2656,13 @@ tc_gen_reloc (section, fixp)
relocs[i]->addend = 0;
break;
case R_ENTRY:
case R_EXIT:
/* There is no symbol associated with these fixups. */
relocs[i]->sym_ptr_ptr = &dummy_symbol->bsym;
relocs[i]->addend = fixp->fx_addnumber;
break;
default:
if (fixp->fx_addsy && fixp->fx_addsy->bsym->flags & BSF_FUNCTION)
relocs[i]->addend = 0;
@ -4043,16 +4039,14 @@ pa_build_unwind_subspace (call_info)
/* Relocation info. for start offset of the function. */
fix_new_hppa (frag_now, p - frag_now->fr_literal, 4,
call_info->start_symbol, (offsetT) 0,
(expressionS *) NULL, 0, R_PARISC_DIR32, e_fsel, 32, 0,
(char *) 0);
(expressionS *) NULL, 0, R_PARISC_DIR32, e_fsel, 32, 0, NULL);
p = frag_more (4);
/* Relocation info. for end offset of the function. */
fix_new_hppa (frag_now, p - frag_now->fr_literal, 4,
call_info->end_symbol, (offsetT) 0,
(expressionS *) NULL, 0, R_PARISC_DIR32, e_fsel, 32, 0,
(char *) 0);
(expressionS *) NULL, 0, R_PARISC_DIR32, e_fsel, 32, 0, NULL);
/* Dump it. */
unwind = (char *) &call_info->ci_unwind;
@ -4279,7 +4273,7 @@ pa_comm (unused)
else
{
S_SET_VALUE (symbol, size);
S_SET_SEGMENT (symbol, &bfd_und_section);
S_SET_SEGMENT (symbol, bfd_und_section_ptr);
S_SET_EXTERNAL (symbol);
/* colon() has already set the frag to the current location in the
@ -4339,9 +4333,9 @@ pa_entry (unused)
char *where = frag_more (0);
fix_new_hppa (frag_now, where - frag_now->fr_literal, 0,
last_call_info->start_symbol, (offsetT) 0, NULL,
NULL, (offsetT) 0, NULL,
0, R_HPPA_ENTRY, e_fsel, 0, 0,
(char *) &last_call_info->ci_unwind.descriptor);
(int *) &last_call_info->ci_unwind.descriptor);
}
#endif
}
@ -4362,7 +4356,7 @@ pa_equ (reg)
S_SET_VALUE (symbol, pa_parse_number (&input_line_pointer, 0));
else
S_SET_VALUE (symbol, (unsigned int) get_absolute_expression ());
S_SET_SEGMENT (symbol, &bfd_abs_section);
S_SET_SEGMENT (symbol, bfd_abs_section_ptr);
}
else
{
@ -4404,8 +4398,9 @@ process_exit ()
if we split the unwind bits up between the relocations which
denote the entry and exit points. */
fix_new_hppa (frag_now, where - frag_now->fr_literal, 0,
last_call_info->start_symbol, (offsetT) 0,
NULL, 0, R_HPPA_EXIT, e_fsel, 0, 0, NULL);
NULL, (offsetT) 0,
NULL, 0, R_HPPA_EXIT, e_fsel, 0, 0,
(int *) &last_call_info->ci_unwind.descriptor + 1);
#endif
}
@ -4489,7 +4484,7 @@ pa_type_args (symbolP, is_export)
{
input_line_pointer += 8;
symbolP->bsym->flags &= ~BSF_FUNCTION;
S_SET_SEGMENT (symbolP, &bfd_abs_section);
S_SET_SEGMENT (symbolP, bfd_abs_section_ptr);
type = SYMBOL_TYPE_ABSOLUTE;
}
else if (strncasecmp (input_line_pointer, "code", 4) == 0)
@ -4653,7 +4648,7 @@ pa_import (unused)
/* If the section is undefined, then the symbol is undefined
Since this is an import, leave the section undefined. */
S_SET_SEGMENT (symbol, &bfd_und_section);
S_SET_SEGMENT (symbol, bfd_und_section_ptr);
}
}
else
@ -4895,9 +4890,9 @@ pa_procend (unused)
char *where = frag_more (0);
fix_new_hppa (frag_now, where - frag_now->fr_literal, 0,
last_call_info->start_symbol, (offsetT) 0, NULL,
NULL, (offsetT) 0, NULL,
0, R_HPPA_ENTRY, e_fsel, 0, 0,
(char *) &last_call_info->ci_unwind.descriptor);
(int *) &last_call_info->ci_unwind.descriptor);
}
#endif
}