Commit graph

88 commits

Author SHA1 Message Date
Jeff Law
5ae218df2a * config/tc-hppa.c (md_pseudo_table): Add entries for
"begin_brtab" and "end_brtab" pseudo-ops.
	(pa_brtab): New function.
	(tc_gen_reloc, SOM version): Handle R_BEGIN_BRTAB and R_END_BRTAB.
	(hppa_force_relocation): Force relocations for BRTAB fixups
	when OBJ_SOM is defined.

More infrastructure for PA optimziations.
1995-08-13 06:39:39 +00:00
Jeff Law
249c7415a4 * config/tc-hppa.h (MAX_RELOC_EXPANSION): Bump to 6.
* config/tc-hppa.c (tc_gen_reloc, SOM version): Handle
	relocations for the difference of two (possibly external)
	symbols.
	(hppa_fix_adjustable): For SOM, reject reductions involving
	the difference of two symbols.
	(hppa_force_relocation): Force relocations for expressions
	involving the difference of two symbols.

gas/bfd part of mentor-7363
1995-07-03 23:33:21 +00:00
Jeff Law
764771905a * config/tc-hppa.c (pa_build_unwind_subspace): Zero out memory
from frag_more calls.
1995-06-19 21:34:39 +00:00
Jeff Law
4ff6f92ae8 * config/tc-hppa.c (pa_ip): Check for invalid register in single
precision fmpyadd and fmpysub instructions.
1995-06-13 04:29:41 +00:00
Jeff Law
4829cd65a7 * config/tc-hppa.c (md_apply_fix): Do nothing for an out of range
PC relative call since those only occur in cases where the linker
	can fix them up.
	(hppa_force_relocation): Force relocations for out of range PC
	relative calls.
1995-05-03 19:10:55 +00:00
Jeff Law
2c23d22bee * config/tc-hppa.c (pa_ip, case 'z'): Don't lose argument
relocation bits for absolute calls.
1995-03-06 02:42:14 +00:00
Jeff Law
b4682e519f Apparently I forgot to commit this change:
* config/tc-hppa.c (md_apply_fix): Go ahead and call
        hppa_field_adjust to get a new value for R_DATA_ONE_SYMBOL
        relocations in SOM.
        (hppa_fix_adjustable): Refine somewhat.
1995-02-07 18:20:57 +00:00
Ken Raeburn
d675782a06 * config/obj-aout.h, config/obj-coff.c, config/obj-elf.h, config/obj-som.h,
config/tc-h8500.c, config/tc-hppa.c, config/tc-hppa.h, config/tc-sh.c,
config/tc-z8k.c: Don't rely on use of ".." when including header files.
* config/tc-rce.c: Ditto.

* config/obj-coff.c (fixup_segment): Reformat condition in an `if' statement.
1994-12-20 20:07:41 +00:00
Jeff Law
b8f7596cbe * config/tc-hppa.c (pa_subspace): Make sure SEC_HAS_CONTENTS is
clear for a section with the "ZERO" attribute.
1994-12-19 22:33:35 +00:00
Jeff Law
60937ce7c2 * Reduce useless symbols for ELF in an attempt to make smaller
objects and speed up the linker.
	* config/tc-hppa.c (struct call_info): Replace end_symbol field
	with a size field.
	(hppa_elf_mark_end_function): Delete unneeded function.
	(pa_build_unwind_subspace): For the 2nd unwind relocation, use
	the function symbol + function size instead of a special symbol
	for the end of the function.
	(process_exit): Compute the function size here.  Don't call
	hppa_elf_mark_end_of_function anymore.
	(pa_procend): Likewise.
	(hppa_fix_adjustable): Only reject 32bit relocations for SOM.
	(elf_hppa_final_processing): Simplify.
1994-12-19 21:23:20 +00:00
Jeff Law
740e5428b0 * config/tc-hppa.c (tc_gen_reloc, ELF variant): Add section->vma
to the relocation's offset.
1994-11-23 06:34:13 +00:00
Jeff Law
dc1b12211f * config/tc-hppa.c (pa_subspace): Make sure to always reset
current_subspace.
	(pa_text, pa_data): Likewise.
1994-11-16 06:17:08 +00:00
Jeff Law
e67b3aa3a7 * config/tc-hppa.c (pa_align): New function. Aligns the current
offset within the current subspace along with updating the
	alignment of the subspace itself.
	(pa_subspace): Default alignment to one byte rathern than zero
	bytes to avoid setting alignment to log2(0).
	(md_pseudo_table): Use pa_alignment for .align.
1994-11-16 04:58:48 +00:00
Jeff Law
75c28b4966 * 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.
1994-09-14 02:20:24 +00:00
Ken Raeburn
460531dad9 Use EXIT_SUCCESS and EXIT_FAILURE in all exit calls.
Use exit rather than returning from main, for consistency on VMS.
Call as_fatal instead of as_bad or as_warn followed by exit.
1994-09-13 23:07:48 +00:00
Jeff Law
2cffb4f411 * config/tc-hppa.c (pa_comm): Set sy_resolved for the common
symbol.
1994-08-16 07:54:06 +00:00
Jeff Law
fbf718862a * config/tc-hppa.c (create_new_space): Initialize sd_subspaces
field in the space chain.
1994-08-01 20:12:41 +00:00
Jeff Law
907f11fe71 * config/tc-hppa.c (tc_gen_reloc): Cast return value from
hppa_gen_reloc_type.
1994-08-01 08:44:02 +00:00
Jeff Law
8fd04cbacc * config/tc-hppa.c (hppa_fix_adjustable): Reject reductions for
symbols in DLT relative relocs.
	(tc_gen_reloc): Zero out the addend field for DLT relative relocs.
1994-07-07 17:35:27 +00:00
Jeff Law
8fb99170f1 Fix thinko in last change 1994-07-05 01:18:23 +00:00
Jeff Law
655f3ef4af * config/tc-hppa.c (is_complex): New macro.
(cons_fix_new_hppa): "Handle" complex expressions.
1994-07-05 00:37:14 +00:00
David MacKenzie
def66e248c * as.h: Replace flagseen with separate variables.
* as.c (parse_args): Set them.  Don't accept -1 option, or -v
	explicitly (it's a synonym for --version).
	* as.c, input-scrub.c, messages.c, read.c, symbols.c, write.c,
	config/obj-aout.c, config/obj-aout.h, config/obj-bout.c,
	config/obj-bout.h, config/obj-coff.c, config/obj-coff.h,
	config/obj-vms.c, config/tc-hppa.c, config/tc-i386.c,
	config/tc-i960.c, config/tc-m68k.c, config/tc-mips.c,
	config/tc-vax.c: Use the new flag variables instead of flagseen.
	* config/tc-vax.c [OBJ_VMS]: Recognize -+, -1, -v, and document in
	usage.
1994-06-03 20:59:20 +00:00
David MacKenzie
f3d817d8b7 * as.c (show_usage): Remove target specific messages;
instead, call md_show_usage.
	(parse_args): Use getopt_long_only.  Take pointers to argc and
	argv.
	(main): Pass parse_args pointers.
	* as.h: Remove 3 variables that are redundant with flagseen.
	* as.c, messages.c: Change their users to use flagseen.
	Define getopt stuff.
	* tc.h: Update md_parse_option decl.  Add md_show_usage decl.
	* config/tc-*.c: Add md_shortopts, md_longopts,
	md_longopts_size, md_show_usage.  Change calling convention for
	md_parse_option.  Remove md_parse_long_option.
	* config/tc-ns32k.c: Rename `struct option' to `struct ns32k_option'.
	* config/tc-i386.h: Don't define md_parse_option.
1994-06-03 17:42:27 +00:00
Jeff Law
44e8d616e5 * config/tc-hppa.c (pa_ip): Use R_HPPA_ABS_CALL, not R_HPPA for
absolute calls.
1994-05-18 15:18:23 +00:00
Jeff Law
ee8b834600 * config/tc-hppa.c (pa_parse_fp_cmp_cond): Report an error
on a partial completer match.
1994-05-17 18:54:50 +00:00
Jeff Law
3315c7c714 * config/tc-hppa.c: Change .hppa_unwind to .PARISC.unwind
throughout code.
	(is_complex): Delete definition and support for complex relocation
	types.
	(tc_gen_reloc): Delete special unwind crud for ELF.  Simplify and
	rewrite ELF code based on 94-02-02 PA ELF draft spec.
	(pa_build_unwind_subspace): Use standard PARISC_DIR32 relocs for
	the unwind descriptors.
1994-05-16 19:29:56 +00:00
Jeff Law
9de7c1fc8d * config/tc-hppa.c (pa_parse_space_stmt): Use the built-in
defaults for defined, private, and spnum fields for the
        $TEXT$ and $PRIVATE$ spaces.  Do not clobber spnum.  Do
        not reset the segment if just updating a space.
        (pa_spaces_begin): Set BFD section flags for all built-in
        subspaces.
1994-04-18 21:29:28 +00:00
Jeff Law
caed9e8251 * config/tc-hppa.c (pa_procend): Handle case where label was
defined after the .proc directive.
1994-04-11 16:11:12 +00:00
Jeff Law
0521099057 * config/tc-hppa.c (pa_procend): Give an error if we encounter a
procend for a procedure without a name.
1994-04-11 16:02:12 +00:00
Jeff Law
0b503989f5 * config/tc-hppa.h (elf_tc_symbol): Delete. No longer used.
(elf_tc_make_sections): Likewise.
        (hppa_tc_make_sections, hppa_tc_symbol): Delete extern decls.

        * config/tc-hppa.c (hppa_tc_make_sections): Delete function.
        (hppa_tc_symbol): Likewise.

        * config/obj-elf.c (elf_frob_file): Delete elf_tc_symbol and
        elf_tc_make_sections stuff.  It was there to support PA braindamage
        which has been fixed, and in the case of elf_tc_make_sections is
        redundant with elf_tc_final_processing.
1994-04-07 17:39:16 +00:00
Jeff Law
79381848ca * config/tc-hppa.c (tc_gen_reloc): Fix thinko in ELF version. 1994-04-05 00:06:46 +00:00
Jeff Law
de3ffc7aef * config/tc-hppa.c (tc_gen_reloc): Set addend for relocation
involving a function symbol which is not a plabel to zero.
        (md_apply_fix): Never pass a function symbol to field_adjust.
1994-03-27 22:05:21 +00:00
Jeff Law
49ccc55510 * config/tc-hppa.c (pa_import): Correctly handle importing of an
already defined symbol.
1994-03-17 21:37:42 +00:00
Jeff Law
c38c91dadb * config/tc-hppa.c (pa_equ): Handle both .reg and .equ correctly. 1994-03-17 00:49:30 +00:00
Jeff Law
f2ada9106d * config/tc-hppa.c (pa_callinfo): Accept "millicode" as an
argument to a .callinfo directive.  Don't loop forever on errors.
1994-03-16 22:42:51 +00:00
Jeff Law
fb338f1d79 * config/tc-hppa.c: Add a few casts to make HP C compiler happy.
* config/obj-som.c (obj_som_version, obj_som_copyright): Be prepared
        to handle an error from bfd_som_attach_aux_hdr.
1994-03-02 20:02:17 +00:00
Jeff Law
e03095c9bb * config/tc-hppa.c (hppa_tc_symbol): Call PA ELF BFD version.
(hppa_tc_make_sections): Likewise.
        (pa_build_symextn_section): Delete unused function.
        (hppa_tc_make_symextn_section): Likewise.
        (pa_export): Delete call to pa_build_symextn_section.

        * config/tc-hppa.h (hppa_tc_symbol): Add extern decl.
        (elf_hppa_final_processing): Delete extern decl.
        (hppa_tc_symbol): Delete extern decl.
1994-02-26 04:57:57 +00:00
Jeff Law
2f156c92bd * config/tc-hppa.c: Disable multiple $CODE$ subspace code. It
confuses GDB for some unknown reason.
        * cofnig/obj-som.c: Likewise.
1994-01-19 00:21:16 +00:00
Jeff Law
51517966bc * config/tc-hppa.c (pa_ip): Explicitly check for comma before 'u'
and 'f' template operand.
1994-01-17 09:30:07 +00:00
Jeff Law
d0286a2112 * config/tc-hppa.c (pa_ip): Handle 'N', 'O', 'o', '0', '1', 'u',
and '2' in copr and sfu instruction templates.
1994-01-17 08:19:56 +00:00
Jeff Law
86066d063b * config/obj-som.c (som_frob_file): Call adjust_code_sections
for each section.
        (adjust_code_sections): New function.  Adjusts the VMA for all the
        $CODE$ subspaces.

        * config/tc-hppa.c (md_assemble): Also handle creating a fixup
        for the unwind descriptors if a function's label follows the
        .PROC and .ENTRY directives.
        (pa_entry): Don't set BSF_FUNCTION for the label symbol here; it
        is done elsewhere.  Don't create a fixup for the unwind
        descriptors if the function's label has not been defined yet.
        (pa_proc): For SOM, place each procedure within a new $CODE$
        subspace.  Adjust the segment and frag for the associated
        function label if it exists.
1994-01-13 20:17:39 +00:00
Jeff Law
fca59f9d42 * config/tc-hppa.c (hppa_fix_struct): Add new "segment" field.
(hppa_fix_new): Initialize segment field.
        (md_apply_fix): Do nothing for pc-relative fixup which involves
        crossing a segment boundary.
        (pa_procend): Undefine the current label after handling .PROC
        and .PROCEND directives.
        (dummy_symbol): Make type "symbolS *".  Change references as
        appropriate.
1994-01-13 06:06:35 +00:00
Jeff Law
4047ff1d24 * config/tc-hppa.c (pa_ip): Put check for missing label on .PROC
here.  Handle case where label may be defined after the .PROC.
        (pa_proc): It is not an error if the procedure's label isn't
        defined before the .PROC directive.
1994-01-10 17:54:01 +00:00
Ken Raeburn
6868afe647 * as.c (main): Only invoke md_end if it's defined as a macro.
* tc.h (md_end): Don't declare it.
* config/tc-*.[ch] (md_end): Deleted, in cases where it doesn't do anything.
* config/tc-vax.c (vip_end): Deleted null function.
* config/tc-mips.c (md_mips_end): Renamed from md_end.
* config/tc-mips.h (md_mips_end): Declare.
(md_end): New macro, calls md_mips_end.

* write.c (write_object_file): Don't close output file.
* as.c (main): Close output file (if needed) after calling listing_print, which
should be after calling write_object_file, which sets the frag addresses.
1993-12-20 16:48:00 +00:00
Ken Raeburn
c999fd9fc2 * config/tc-vax.c (tc_aout_fix_to_chars): Local variable NBYTES_R_LENGTH now
const.

* config/obj-*.c, config/tc-*.c: Omit superfluous "return" statements at ends
of functions.  Don't check for null return from hash_new, since it won't return
at all if there's no memory available.  Also, check for null return from
hash_insert, rather than zero-length string, as success indicator.
1993-12-16 21:31:22 +00:00
Jeff Law
551d2fd4cf * config/tc-hppa.c (md_apply_fix): Handle cases where no
relocation will be emitted for 32bit formats.
1993-12-15 05:41:11 +00:00
Jeff Law
9d5a9b20fe * config/tc-hppa.c (md_apply_fix): Do not call hppa_field_adjust
for any of the 'T' field selectors.
1993-12-14 07:34:37 +00:00
Jeff Law
dd2f509f3d * config/obj-som.[ch] (obj_read_begin_hook): Remove last change.
Breaks with the HP compilers.

        * config/tc-hppa.c (struct call_info): Remove fields which were
        set but never used.  Remove all code which sets those fields.
        (struct subspace_dictionary_chain): Likewise.
        (struct space_dictionary_chain): Likewise.
        (pa_desc): Delete useless function.  Delete all references.
        (hppa_tc_make_sections): No need to count the number of symbols for
        the symbol extension section.
1993-12-06 19:21:51 +00:00
Jeff Law
eb91665b4c * config/obj-som.c (obj_som_version): Pass version string to
SOM BFD backend.
        (obj_som_copyright): New function.  Much like obj_som_version.

        * config/tc-hppa.c (obj_copyright): Define as appropriate for
        SOM and ELF.
        (pa_copyright): Just a stub now.
1993-12-06 08:55:06 +00:00
Jeff Law
4165dcc239 * config/tc-hppa.c (tc_gen_reloc, SOM version): Handle relocation
expansion due to rounding mode selectors.  Handle R_[RDSN]_MODE
        relocations for selecting the current rounding mode.
1993-12-06 03:24:49 +00:00