Commit Graph

902 Commits

Author SHA1 Message Date
Jeff Law 20b39b6f05 * write.c (relax_and_size_seg): Correct test to determine
if the section's size was rounded up.
1993-10-31 08:06:11 +00:00
Jeff Law e75acd689b * config/obj-som.h (obj_set_symbol_type): Define a hook so GAS
can properly set all the SOM symbol types.
	* config/tc-hppa.c (pa_symbol_type): New enum to represent the
	symbol types which can be set from an IMPORT/EXPORT statement.
	(pa_export_args): Set the pa_symbol_type type based on arguments.
	If defined, call obj_set_symbol_type to pass this information on
	to the BFD backend.
1993-10-31 07:48:41 +00:00
Jeff Law d191a03cf5 * read.c (get_stab_string_offset): Set SEC_DEBUGGING for any
stab section we make.
        (s_stab_generic): Likewise.
1993-10-31 07:38:33 +00:00
Jeff Law 65a7f8a604 Allow backends to override the value of the "fake" label.
See ChangeLog for the details.
1993-10-31 02:19:05 +00:00
Jeff Law b309df49dc * config/tc-i386.h (DOT_LABEL_PREFIX): Delete.
(LOCAL_LABEL, FAKE_LABEL_NAME): Define.
        * config/tc-m68k.h (DOT_LABEL_PREFIX): Delete.
        (LOCAL_LABEL, FAKE_LABEL_NAME): Define.
        * config/te-sco386.h (DOT_LABEL_PREFIX): Delete.
        (LOCAL_LABEL, FAKE_LABEL_NAME): Define.
1993-10-31 02:18:17 +00:00
Jeff Law b89094aa91 * config/tc-hppa.h (FAKE_LABEL_NAME): Define as L$0\001 so it's
known to be a local label.
1993-10-31 02:13:49 +00:00
Jeff Law d4c8cbd8ef * expr.c (make_expr_symbol): Delete DOT_LABEL_PREFIX code
and instead simply use the string defined by FAKE_LABEL_NAME.
        (operand): Likewise.
        * read.c (s_stab_generic): Likewise.
1993-10-31 02:13:34 +00:00
Jeff Law 6bc14195fb Rework space/subspace handling in PA code to fully support
SOM spaces/subspaces.
	* tc-hppa.c (USE_ALIASES): New object-format dependent define
	to control the use of space/subspace name aliases.
	(update_subspace): Accept space chain entry for containing space
	as a new parameter.  All callers changed.
	(pa_get_label): Use current_space rather than pa_segment_to_space.
	(pa_define_label): Likewise.
	(pa_undefine_label): Likewise.
	(md_begin): Change into the (possibly modified) text_section.
	(pa_parse_space_stmt): Create a new segment/space if create_flag
	is true, and the space name is not one of the two predefined spaces.
	(pa_subspace): Use current_space rather than a lookup via
	pa_segment_to_space.  Reset BFD section flags as required by
	the .subspace directive.  Likewise for the section alignment.
	Pass the current space to update_subspace and create_new_subspace.
	(pa_spaces_begin): Only use space/subspace aliases if USE_ALIASES
	is true.  When not using aliases, create a BFD section for each
	subspace encountered.  When not using aliases replace the default
	text, data, and bss segments with new ones.
	(create_new_subspace): When not using aliases each subspace has a
	section/segment and subsegments are not needed, so set the subsegment
	to zero.
1993-10-31 01:54:01 +00:00
Jeff Law 3b9a72c53c Rework space/subspace handling in PA code to fully support
SOM spaces/subspaces.
	* config/tc-hppa.c (USE_ALIASES): New object-format dependent define
	to control the use of space/subspace name aliases.
	(update_subspace): Accept space chain entry for containing space
	as a new parameter.  All callers changed.
	(pa_get_label): Use current_space rather than pa_segment_to_space.
	(pa_define_label): Likewise.
	(pa_undefine_label): Likewise.
	(md_begin): Change into the (possibly modified) text_section.
	(pa_parse_space_stmt): Create a new segment/space if create_flag
	is true, and the space name is not one of the two predefined spaces.
	(pa_subspace): Use current_space rather than a lookup via
	pa_segment_to_space.  Reset BFD section flags as required by
	the .subspace directive.  Likewise for the section alignment.
	Pass the current space to update_subspace and create_new_subspace.
	(pa_spaces_begin): Only use space/subspace aliases if USE_ALIASES
	is true.  When not using aliases, create a BFD section for each
	subspace encountered.  When not using aliases replace the default
	text, data, and bss segments with new ones.
	(create_new_subspace): When not using aliases each subspace has a
	section/segment and subsegments are not needed, so set the subsegment
	to zero.
1993-10-31 01:53:01 +00:00
Jeff Law 5c2bae7507 * gas/hppa/unsorted/unsorted.exp (ss_align): Remove OSF xfail.
* gas/hppa/more.parse/parse.exp: Add new test.
        * gas/hppa/more.parse/ssbug.s: New test to make sure non-default
        * sections are handled correctly.
1993-10-31 01:45:52 +00:00
Jeff Law 03cc338bc1 * gas/hppa/more.parse/parse.exp: Add new test.
* gas/hppa/more.parse/ssbug.s: New test to make sure non-default
	sections are handled correctly.
1993-10-31 01:41:59 +00:00
Jeff Law 548ea75baa * config/tc-hppa.c (pa_parse_space_stmt): If needed, call
obj_set_section_attributes to pass space attributes to the
        BFD backend.
        (create_new_space): Likewise.
        (create_new_subspace): Likewise for subspace attributes using
        obj_set_subsection_attributes.
        (update_subspace): Likewise for subspace attributes using
        obj_set_subsection_attributes.
1993-10-30 23:11:31 +00:00
Jeff Law 0f3b419c4c * config/tc-hppa.c (pa_parse_space_stmt): Get segment and sort key
for $TEXT$ and $PRIVATE$ from the default space structure.
1993-10-30 23:00:34 +00:00
Jeff Law 9a182533aa * config/tc-hppa.c (pa_export_args): Always set BSF_FUNCTION
as appropriate for the given type.
1993-10-30 22:55:19 +00:00
Jeff Law 62f0841b9d * config/tc-hppa.c (tc_gen_reloc): Preliminary stab at handling
SOM relocations.
1993-10-30 22:35:49 +00:00
Jeff Law d56f45f5bc * config/tc-hppa.c (pa_comm): Delete incorrect check for symbol
redefinition.
1993-10-30 22:02:53 +00:00
Jeff Law 3c87583d0a * config/obj-som.[ch]: New files for SOM support. Note SOM
support is not yet complete in GAS or BFD.
1993-10-30 21:57:16 +00:00
Jeff Law 0fa747c4f3 * config/obj-som.[ch]: New files for SOM support in GAS. 1993-10-30 21:55:00 +00:00
Jeff Law 12696e9cb5 * config/ho-hppabsd.h: Delete IO* macros, they are defined in
stdio.h.  Delete declaration of free.  Include stdlib.h, unistd.h,
        and string.h.
1993-10-30 21:29:29 +00:00
Jeff Law 9bc0f7c85c * gas/all/gas.exp: Disable (and fail) p1480.s for all PA targets. 1993-10-30 21:14:53 +00:00
Jeff Law b89b288031 * config/obj-coffbfd.c (obj_coff_init_stab_section): Append "str"
to stab section name to get the stab string section name.  Pass
        the full name of the stab string section to get_stab_string_offset.
        * config/obj-elf.c (obj_elf_init_stab_section): Likewise.
1993-10-30 07:15:46 +00:00
Jeff Law 762df61d4c * gas/hppa/more.parse/parse.exp: Fix typos. 1993-10-29 23:34:37 +00:00
Jeff Law 06c368b7d3 * gas/hppa/more.parse/calldatabug.s: Colonize. 1993-10-29 23:28:16 +00:00
Jeff Law 13925cef35 * config/tc-hppa.c (md_begin): Disable "-R" option to fold
text and data segments.  Warn user "-R" is unsupported on the
        PA.
1993-10-29 21:09:43 +00:00
Jeff Law 53c0b9e754 Back out of last change. Instead:
* config/tc-hppa.c (md_begin): Disable "-R" option to fold
        text and data segments.  Warn user "-R" is unsupported on the
        PA.
1993-10-29 21:08:19 +00:00
Jeff Law 37ed805e49 * as.c (main): Disable "-R" option if NO_FOLD_DATA_AND_TEXT
is defined.
        * config/tc-hppa.h (NO_FOLD_DATA_AND_TEXT): Define.  Folding
        of text and data segments fails miserably on the PA.
1993-10-29 20:36:07 +00:00
Jeff Law 2b151da9aa * config/tc-hppa.h (NO_FOLD_DATA_AND_TEXT): Define. Folding
of text and data segments fails miserably on the PA.
1993-10-29 20:35:44 +00:00
Jeff Law 6aba9d2931 * as.c (main): Disable "-R" option if NO_FOLD_DATA_AND_TEXT
is defined.
1993-10-29 20:35:26 +00:00
Jeff Law a54c84c779 * gas/hppa/{basic, more.parse, reloc, unsorted}: New directories.
* gas/hppa/*/*.exp: New test drivers.
        * gas/hppa/*/*.s: New test files.
1993-10-29 05:22:27 +00:00
Jeff Law 47882613c7 Unsorted PA tests. 1993-10-29 05:21:18 +00:00
Jeff Law 7317acfcea Quick description of test directory contents. 1993-10-29 05:20:11 +00:00
Jeff Law 9b1b0ad1a6 Relocation tests for the PA. 1993-10-29 05:14:07 +00:00
Jeff Law 7b5b8e5117 Additional parsing tests for PA gas. 1993-10-29 05:06:18 +00:00
Jeff Law 64285e8321 * gas/hppa/basic: New directory.
* gas/hppa/basic/basic.exp: New test driver.
        * gas/hppa/basic/*.s: New test files.
1993-10-29 04:58:03 +00:00
Jeff Law fae89ef08e Keep hppa test directory. 1993-10-29 04:56:45 +00:00
Jeff Law 6bf5210ada Basic hppa GAS testsuite. 1993-10-29 04:55:51 +00:00
Jeff Law a0b5dd523e Add new hppa directory. 1993-10-29 04:54:51 +00:00
Jeff Law d33ace2e25 * config/tc-hppa.c (md_pseudo_table): Default alignment is 8 for
.align and .ALIGN directives.
1993-10-29 01:01:35 +00:00
Jeff Law 3515a504aa * config/tc-hppa.c (pa_parse_space_stmt): Advance
input_line_pointer when an invalid argument is encountered.
1993-10-28 23:14:33 +00:00
Jeff Law 48ac0c90e9 * config/tc-hppa.c (pa_space): Do not report an error for a .space
directive which does not define a "well-known" space and does
	not include a space number as an argument.

	* config/tc-hppa.c (pa_def_subspaces): Correct initialization of the
	"defined", "loadable", "code_only" and "space_index" fields.
	(pa_def_spaces): Correct initialization of the "spnum", "defined",
	and "private" fields.

	* write.h (struct fix): Add new tc_fix_data field for the various
	backends to attach machine dependent fixup information to.
	* write.c (fix_new_internal): Initialize new tc_fix_data field.
	* config/tc-hppa.c (hppa_fix_struct): Delete unnecessary fix_fixP and
	fx_next fields.
	(hppa_find_hppa_fix): Delete unnecessary function.  Fix all
	callers	to get HPPA fixup information from the tc_fix_data field
	in the GAS fixup.
	(hppa_fix_root): Delete unnecessary variable.
	(fix_new_hppa): Attach HPPA fixup data to the GAS fixup.

	* config/tc-hppa.c (pa_set_start_symbol); Delete unwanted
	function.  Fix all callers.
	(subspace_dictionary_chain): Delete unused ssd_start_sym field.

	* config/tc-hppa.c (hppa_fix_adjustable): New function to determine
	if a particular fixup is adjustable.
	* config/tc-hppa.h (tc_fix_adjustable): Call hppa_fix_adjustable to
	perform the real work.

	* config/tc-hppa.h (RELOC_EXPANSION_POSSIBLE): Move definition out
	of OBJ_XXX conditionals.
	(MAX_RELOC_EXPANSION): Likewise.

	* config/tc-hppa.c (log2): Renamed from is_power_of_2.  Fix all
	callers. Now returns log2 (N) for positive N which are an exact
	power of two or -1 for an error.

	* config/tc-hppa.c (pa_callinfo): Range check values provided for
	ENTRY_GR, ENTRY_FR and ENTRY_SR.  Properly adjust vaues before
	inserting them into the unwind table.

	* config/tc-hppa.c (NEEDS_FIXUP): Delete definition and all references.
	(hppa_gen_reloc_type): New object format dependent macro.
	(pa_ip): Delete tons of code which was either OBJ_SOM or OBJ_ELF
	conditional.  The code can (and will) be shared between SOM & ELF
	formats in the near future.
	(cons_fix_new_hppa, md_apply_fix_1): Likewise.
	(pa_build_unwind_subspace, process_exit, pa_exit): Likewise.
	(tc_gen_reloc): Use hppa_gen_reloc rather than an object format
	specific call.

	* config/tc-hppa.c (pa_comm): Set the segment for a common symbol
	to bfd_und_section.

	* config/obj-elf.h (obj_elf_version): Add extern prototype.

	* configure.in (hppa-*-bsd*): New configuration.
	BFD is always used for GAS generating SOM objects.

	* write.c (adjust_reloc_syms): Set sy_used_in_reloc if an
	adjustment is rejected by the target machine.

	* config/tc-hppa.c (pa_big_cons): Delete function and its
	declaration.  All callers changed to use pa_cons.

	* write.c (fixup_segment): Fix indention and open/close brace
	problem.

	From Pete Hoogenboom:
	* config/tc-hppa.c (md_atof): Return a NULL on success rather than
	an empty string.
1993-10-28 20:49:19 +00:00
Jeff Law 00f6df56f6 Merge with current Utah code:
* config/tc-hppa.h (tc_fix_adjustable): Call hppa_fix_adjustable to
        perform the real work.

        * config/tc-hppa.h (RELOC_EXPANSION_POSSIBLE): Move definition out
        of OBJ_XXX conditionals.
        (MAX_RELOC_EXPANSION): Likewise.
1993-10-28 20:43:13 +00:00
Jeff Law aa8b30edeb Merge with current Utah code:
* config/tc-hppa.c (pa_space): Do not report an error for a .space
        directive which does not define a "well-known" space and does
        not include a space number as an argument.

        * config/tc-hppa.c (pa_def_subspaces): Correct initialization of the
        "defined", "loadable", "code_only" and "space_index" fields.
        (pa_def_spaces): Correct initialization of the "spnum", "defined",
        and "private" fields.

	* config/tc-hppa.c (hppa_fix_struct): Delete unnecessary fix_fixP and
        fx_next fields.
        (hppa_find_hppa_fix): Delete unnecessary function.  Fix all
        callers to get HPPA fixup information from the tc_fix_data field
        in the GAS fixup.
        (hppa_fix_root): Delete unnecessary variable.
        (fix_new_hppa): Attach HPPA fixup data to the GAS fixup.

        * config/tc-hppa.c (pa_set_start_symbol); Delete unwanted
        function.  Fix all callers.
        (subspace_dictionary_chain): Delete unused ssd_start_sym field.

        * config/tc-hppa.c (hppa_fix_adjustable): New function to determine
        if a particular fixup is adjustable.

        * config/tc-hppa.c (log2): Renamed from is_power_of_2.  Fix all
        callers. Now returns log2 (N) for positive N which are an exact
        power of two or -1 for an error.

        * config/tc-hppa.c (pa_callinfo): Range check values provided for
        ENTRY_GR, ENTRY_FR and ENTRY_SR.  Properly adjust vaues before
        inserting them into the unwind table.

        * config/tc-hppa.c (NEEDS_FIXUP): Delete definition and all references.
        (hppa_gen_reloc_type): New object format dependent macro.
        (pa_ip): Delete tons of code which was either OBJ_SOM or OBJ_ELF
        conditional.  The code can (and will) be shared between SOM & ELF
        formats in the near future.
        (cons_fix_new_hppa, md_apply_fix_1): Likewise.
        (pa_build_unwind_subspace, process_exit, pa_exit): Likewise.
        (tc_gen_reloc): Use hppa_gen_reloc rather than an object format
        specific call.

        * config/tc-hppa.c (pa_comm): Set the segment for a common symbol
        to bfd_und_section.

        * config/tc-hppa.c (pa_big_cons): Delete function and its
        declaration.  All callers changed to use pa_cons.

        From Pete Hoogenboom:
        * config/tc-hppa.c (md_atof): Return a NULL on success rather than
        an empty string.
1993-10-28 20:41:49 +00:00
Ian Lance Taylor 6121fb06ad * config/tc-a29k.c (md_begin): When opcodes are mashed together in
the table, require that the one without bit 0x1000000 set come
	first.  Require further that it be case 'b' or 'P'.  The a29k
	opcode table already meets these constraints.
	(machine_ip): When handling case 'i' or 'A', make sure that the
	appropriate opcode really exists by looking at the next entry in
	the opcode table.
1993-10-28 17:14:16 +00:00
Ian Lance Taylor 729f4bbaa8 * config/tc-m68k.c (m68k_ip): Adjust offsets for PC relative
fixups.  Add 6 for long 7.3 case, 2 for short 7.2 case.
1993-10-27 22:23:16 +00:00
Ian Lance Taylor 007ff46b2e * config/obj-ecoff.c (obj_ecoff_ent): Ignore an optional number
after a .ent directive.
1993-10-27 18:47:40 +00:00
Ian Lance Taylor d1ee509baf Took case '>' out of macro_build again to avoid confusion. Use & 0x1f
on the shift count rather than % 32.
1993-10-27 16:54:54 +00:00
Ian Lance Taylor 56c96faae6 * config/tc-mips.c (macro_build): Handle '>' case (shift amount
between 32 and 63 for double shift instruction).
	(mips_ip): Likewise.
	(printInsn): Likewise.
1993-10-27 15:52:03 +00:00
Ian Lance Taylor 5694ad9319 * config/tc-ns32k.c (tc_aout_fix_to_chars): Output the symbol
number in the right place.  Untested.  Probably does not work for
	cross assembly.  From cagney@cs.adelaide.edu.au (Andrew Cagney).
1993-10-26 22:10:37 +00:00
Ian Lance Taylor f3751617c3 * config/tc-m68k.c (md_apply_fix_2): Error if a short branch uses
an illegal offset of 0 or -1.
1993-10-26 21:58:41 +00:00
Ian Lance Taylor fa20b8bfd5 * config/obj-elf.c (obj_elf_init_stab_section): Align .stab
section to a longword boundary.
1993-10-26 21:01:15 +00:00