Age | Commit message (Collapse) | Author | Files | Lines |
|
First of all make the declarations globally visible, such that producer
and consumer actually share them.
For the latter two simply add const (as PPC already had it,), while for
the former achieve the effect by converting to an array: There's no need
for the extra level of indirection.
|
|
Adds two new external authors to etc/update-copyright.py to cover
bfd/ax_tls.m4, and adds gprofng to dirs handled automatically, then
updates copyright messages as follows:
1) Update cgen/utils.scm emitted copyrights.
2) Run "etc/update-copyright.py --this-year" with an extra external
author I haven't committed, 'Kalray SA.', to cover gas testsuite
files (which should have their copyright message removed).
3) Build with --enable-maintainer-mode --enable-cgen-maint=yes.
4) Check out */po/*.pot which we don't update frequently.
|
|
There are two problems: symbol_equated_p() doesn't recognize equates of
registers, and S_CAN_BE_REDEFINED() goes by section rather than by
expression type. Both together undermine .eqv and .equiv clearly meaning
to guard the involved symbols against re-definition (both ways).
To compensate pseudo_set() now using O_symbol and S_CAN_BE_REDEFINED()
now checking for O_register,
- for targets creating register symbols through symbol_{new,create}() ->
symbol_init() -> S_SET_VALUE() (alpha, arc, dlx, ia64, m68k, mips,
mmix, tic4x, tic54x, plus anything using cgen or itbl-ops), have
symbol_init() set their expressions to O_register,
- x86'es parse_register() also can't go by section anymore when
trying to "look through" equates; probably symbol_equated_p() should
have been used there from the beginning, if only that had worked for
equates of registers,
- various targets need to "look through" equates when parsing insn
operands (which also helps transitive forward equates); perhaps even
more ought to, but many don't look to consider the possibility of
register equates in the first place.
This was uncovered by code reported in PR gas/30274 (duplicating
PR gas/30272), except that there .eqv was used when really .equ was
meant. Therefore that bug report is addressed here only in so far as
gas wouldn't crash anymore; the code there still won't assemble
successfully, just that now the issues there are properly diagnosed.
|
|
The newer update-copyright.py fixes file encoding too, removing cr/lf
on binutils/bfdtest2.c and ld/testsuite/ld-cygwin/exe-export.exp, and
embedded cr in binutils/testsuite/binutils-all/ar.exp string match.
|
|
Using notes_calloc means all of the string hash table memory should
now be freed before gas exits, even though htab_delete isn't called.
This also means that the hash table free_f and del_f must be NULL,
because freeing notes obstack memory results in all more recently
allocated notes memory being freed too. So hash table resizing won't
free any memory, and will be a little faster. Also, htab_delete won't
do anything (and be quick about it).
Since htab_traverse can also resize hash tables (to make another
traversal faster if the table is largely empty), stop that happening
when only one traversal is done.
* as.h: Reorder hash.h after symbols.h for notes_calloc decl.
* hash.h (str_htab_create): Use notes_calloc. Do not free.
* symbols.c (resolve_local_symbol_values): Don't resize
during hash table traversal.
* config/obj-elf.c (elf_frob_file_after_relocs): Likewise.
* config/tc-ia64.c (ia64_adjust_symtab, ia64_frob_file): Likewise.
* config/tc-nds32.c (nds32_elf_analysis_relax_hint): Likewise.
|
|
This allocates entries added to the string hash tables on the notes
obstack, so that at least those do not leak. A followup patch will
switch over the str_hash allocation to notes_calloc, which is why I
haven't implemented deleting all the target string hash tables.
* config/obj-coff-seh.c (get_pxdata_name, alloc_pxdata_item): Use
notes obstack for string hash table entries.
* config/tc-alpha.c (get_alpha_reloc_tag, md_begin): Likewise.
* config/tc-h8300.c (md_begin): Likewise.
* config/tc-ia64.c (dot_rot, dot_pred_rel, dot_alias): Likewise.
* config/tc-nds32.c (nds32_relax_hint): Likewise.
* config/tc-riscv.c (riscv_init_csr_hash): Likewise.
* config/tc-score.c (s3_insert_reg): Likewise.
(s3_build_score_ops_hsh, s3_build_dependency_insn_hsh): Likewise.
* config/tc-score7.c (s7_build_score_ops_hsh): Likewise.
(s7_build_dependency_insn_hsh): Likewise.
* config/tc-tic4x.c (tic4x_asg): Likewise.
|
|
Currently md_end is typically used for some final actions rather than
freeing memory like other *_end functions. Rename it to md_finish,
and rename target implementation. The renaming of target functions
makes it possible to find them all with "grep md_finish",
eg. md_mips_end is renamed to mips_md_finish, not md_mips_finish.
This patch leaves a number of md_end functions unchanged, those that
either do nothing or deallocate memory, and calls them late.
The idea here is that target maintainers implement md_end functions to
tidy memory, if anyone cares. Freeing persistent memory in gas is
not at all important, except that it can hide more important memory
leaks, those that happen once per some frequent gas operation, amongst
these unimportant memory leaks.
* as.c (main): Rename md_end to md_finish.
* config/tc-alpha.c, * config/tc-alpha.h,
* config/tc-arc.c, * config/tc-arc.h,
* config/tc-arm.c, * config/tc-arm.h,
* config/tc-csky.c, * config/tc-csky.h,
* config/tc-ia64.c, * config/tc-ia64.h,
* config/tc-mcore.c, * config/tc-mcore.h,
* config/tc-mips.c, * config/tc-mips.h,
* config/tc-mmix.c, * config/tc-mmix.h,
* config/tc-msp430.c, * config/tc-msp430.h,
* config/tc-nds32.c, * config/tc-nds32.h,
* config/tc-ppc.c, * config/tc-ppc.h,
* config/tc-pru.c, * config/tc-pru.h,
* config/tc-riscv.c, * config/tc-riscv.h,
* config/tc-s390.c, * config/tc-s390.h,
* config/tc-sparc.c, * config/tc-sparc.h,
* config/tc-tic4x.c, * config/tc-tic4x.h,
* config/tc-tic6x.c, * config/tc-tic6x.h,
* config/tc-v850.c, * config/tc-v850.h,
* config/tc-xtensa.c, * config/tc-xtensa.h,
* config/tc-z80.c, * config/tc-z80.h: Similarly.
* output-file.c (output_file_close): Call md_end.
|
|
The result of running etc/update-copyright.py --this-year, fixing all
the files whose mode is changed by the script, plus a build with
--enable-maintainer-mode --enable-cgen-maint=yes, then checking
out */po/*.pot which we don't update frequently.
The copy of cgen was with commit d1dd5fcc38ead reverted as that commit
breaks building of bfp opcodes files.
|
|
In some cases, eg. riscv_pre_output_hook, gas generates out-of-order
relocations. Various places in the linker assume relocs are sorted
by increasing r_offset, which is normally the case. Provide
GAS_SORT_RELOCS to handle unsorted relocs.
bfd/
PR 28709
* elf32-nds32.c (nds32_insertion_sort): Make static.
* elf32-nds32.h (nds32_insertion_sort): Delete declaration.
gas/
PR 28709
* write.c (write_relocs): Implement reloc sorting by r_offset
when GAS_SORT_RELOCS.
* config/tc-nds32.c (compar_relent, nds32_set_section_relocs): Delete.
* config/tc-nds32.h (nds32_set_section_relocs): Don't declare.
(SET_SECTION_RELOCS): Don't define.
(GAS_SORT_RELOCS): Define.
* config/tc-riscv.h (GAS_SORT_RELOCS): Define.
|
|
Many places report errors of the nature "can't resolve a - b".
This provides a utility function to report such errors consistently.
I removed the section reporting and quotes around symbol names while I
was at it. Compare
ifunc-2.s:4: Error: can't resolve `bar1' {.text.1 section} - `foo1' {.text.1 section}
with
ifunc-2.s:4: Error: can't resolve bar1 - foo1
In many cases the section names don't help the user very much in
figuring out what went wrong, and the quotes if present arguably ought
to be placed around the entire expression:
can't resolve `bar1 - foo1'
The patch also tidies some tc_get_reloc functions that leak memory on
error paths.
* write.h (as_bad_subtract): Declare.
* write.c (as_bad_subtract): New function.
(fixup_segment): Use as_bad_subtract.
* config/tc-arc.c (md_apply_fix): Likewise.
* config/tc-avr.c (md_apply_fix, tc_gen_reloc): Likewise.
* config/tc-cris.c (md_apply_fix): Likewise.
* config/tc-d10v.c (md_apply_fix): Likewise.
* config/tc-d30v.c (md_apply_fix): Likewise.
* config/tc-ft32.c (md_apply_fix): Likewise.
* config/tc-h8300.c (tc_gen_reloc): Likewise.
* config/tc-m68hc11.c (md_apply_fix): Likewise.
* config/tc-mmix.c (mmix_frob_file): Likewise.
* config/tc-mn10200.c (tc_gen_reloc): Likewise.
* config/tc-nds32.c (nds32_apply_fix): Likewise.
* config/tc-pru.c (md_apply_fix): Likewise.
* config/tc-riscv.c (md_apply_fix): Likewise.
* config/tc-s12z.c (md_apply_fix): Likewise.
* config/tc-s390.c (md_apply_fix): Likewise.
* config/tc-tilegx.c (md_apply_fix): Likewise.
* config/tc-tilepro.c (md_apply_fix): Likewise.
* config/tc-v850.c (md_apply_fix): Likewise.
* config/tc-vax.c (md_apply_fix): Likewise.
* config/tc-xc16x.c (tc_gen_reloc): Likewise.
* config/tc-xgate.c (md_apply_fix): Likewise.
* config/tc-xstormy16.c (xstormy16_md_apply_fix): Likewise.
* config/tc-xtensa.c (md_apply_fix): Likewise.
* config/tc-z80.c (tc_gen_reloc): Likewise.
* config/tc-spu.c (md_apply_fix): Likewise.
(tc_gen_reloc): Delete dead code. Free memory on error.
* config/tc-cr16.c (tc_gen_reloc): Use as_bad_subtract. Free
on error.
* config/tc-crx.c (tc_gen_reloc): Likewise.
* config/tc-ppc.c (tc_gen_reloc): Likewise.
* testsuite/gas/i386/ifunc-2.l: Adjust to suit changed error message.
* testsuite/gas/mips/lui-2.l: Likewise.
* testsuite/gas/tic6x/reloc-bad-1.l: Likewise.
|
|
Some extern declarations differ in constnes to their definitions too.
Let's make sure this sort of thing doesn't happen again, but putting
the externs in a header where they belong.
gas/
* config/tc-nds32.c (nds32_keyword_gpr): Don't declare.
(md_begin): Constify k.
opcodes/
* nds32-dis.c (nds32_find_reg_keyword): Constify arg and return.
(nds32_parse_audio_ext, nds32_parse_opcode): Constify psys_reg.
(nds32_field_table, nds32_opcode_table, nds32_keyword_table),
(nds32_opcodes, nds32_operand_fields, nds32_keywords),
(nds32_keyword_gpr): Move declarations to..
* nds32-asm.h: ..here, constifying to match definitions.
|
|
* config/tc-nds32.c: Change all references of keyword_gpr to
nds32_keyword_gpr.
|
|
* config/tc-nds32.c (do_pseudo_push_bhwd, do_pseudo_pop_bhwd),
(do_pseudo_pusha, do_pseudo_pushi): Avoid fortify strncpy bound
error.
|
|
gas/ChangeLog:
* as.c (select_emulation_mode): Use startswith.
* config/m68k-parse.y: Likewise.
* config/obj-aout.c (obj_aout_type): Likewise.
* config/obj-elf.c (elf_common_parse): Likewise.
(obj_elf_section_type): Likewise.
(obj_elf_section_word): Likewise.
(obj_elf_section): Likewise.
(obj_elf_symver): Likewise.
(adjust_stab_sections): Likewise.
* config/obj-evax.c (evax_shorten_name): Likewise.
* config/obj-macho.c (obj_mach_o_is_frame_section): Likewise.
* config/tc-aarch64.c (parse_aarch64_imm_float): Likewise.
(aarch64_parse_features): Likewise.
(create_register_alias): Likewise.
(aarch64_data_in_code): Likewise.
(md_parse_option): Likewise.
* config/tc-alpha.c (s_alpha_section_word): Likewise.
(s_alpha_pdesc): Likewise.
* config/tc-arc.c (tokenize_extregister): Likewise.
* config/tc-arm.c (create_register_alias): Likewise.
(create_neon_reg_alias): Likewise.
(parse_ifimm_zero): Likewise.
(parse_qfloat_immediate): Likewise.
(arm_elf_section_type): Likewise.
(arm_parse_extension): Likewise.
(aeabi_set_public_attributes): Likewise.
(s_arm_arch_extension): Likewise.
(arm_data_in_code): Likewise.
(start_unwind_section): Likewise.
* config/tc-avr.c (avr_ldi_expression): Likewise.
* config/tc-csky.c (is_freglist_legal): Likewise.
(csky_s_section): Likewise.
* config/tc-d30v.c (do_assemble): Likewise.
* config/tc-dlx.c (parse_operand): Likewise.
* config/tc-epiphany.c (md_assemble): Likewise.
* config/tc-h8300.c (h8300_elf_section): Likewise.
(get_operand): Likewise.
* config/tc-hppa.c (pa_ip): Likewise.
(pa_level): Likewise.
(pa_space): Likewise.
* config/tc-i386.c (i386_mach): Likewise.
(md_assemble): Likewise.
(check_VecOperations): Likewise.
(i386_target_format): Likewise.
(i386_elf_section_type): Likewise.
* config/tc-ia64.c (start_unwind_section): Likewise.
(md_parse_option): Likewise.
(is_taken_branch): Likewise.
(idesc->name,): Likewise.
(note_register_values): Likewise.
(do_alias): Likewise.
* config/tc-m32c.c (insn_to_subtype): Likewise.
* config/tc-m68hc11.c (get_operand): Likewise.
(md_assemble): Likewise.
* config/tc-m68k.c (m68k_ip): Likewise.
(m68k_elf_suffix): Likewise.
* config/tc-mcore.c (mcore_s_section): Likewise.
* config/tc-metag.c (parse_get_set): Likewise.
(md_parse_option): Likewise.
* config/tc-microblaze.c (parse_imm): Likewise.
(check_got): Likewise.
(md_apply_fix): Likewise.
* config/tc-mips.c (CPU_HAS_MIPS16): Likewise.
(md_begin): Likewise.
(s_is_linkonce): Likewise.
(check_regno): Likewise.
(match_float_constant): Likewise.
(classify_vr4120_insn): Likewise.
(match_insn): Likewise.
(mips_after_parse_args): Likewise.
(s_change_sec): Likewise.
(s_option): Likewise.
(parse_code_option): Likewise.
(md_section_align): Likewise.
(nopic_need_relax): Likewise.
* config/tc-mmix.c (mmix_handle_mmixal): Likewise.
* config/tc-mn10300.c (mn10300_fix_adjustable): Likewise.
(mn10300_end_of_match): Likewise.
* config/tc-msp430.c (msp430_make_init_symbols): Likewise.
* config/tc-nds32.c (nds32_parse_option): Likewise.
* config/tc-nds32.h (md_do_align): Likewise.
* config/tc-nios2.c (strprefix): Likewise.
(nios2_special_relocation_p): Likewise.
(nios2_parse_base_register): Likewise.
(nios2_cons): Likewise.
* config/tc-ns32k.c (addr_mode): Likewise.
* config/tc-pdp11.c (set_option): Likewise.
(parse_reg): Likewise.
(parse_ac5): Likewise.
(parse_op_no_deferred): Likewise.
(set_cpu_model): Likewise.
(set_machine_model): Likewise.
* config/tc-pj.c (md_operand): Likewise.
* config/tc-ppc.c (ppc_set_cpu): Likewise.
(ppc_arch): Likewise.
(ppc_section_type): Likewise.
* config/tc-s12z.c (tb_reg_rel): Likewise.
(tb_opr_rel): Likewise.
* config/tc-s390.c (s390_parse_cpu): Likewise.
(md_parse_option): Likewise.
* config/tc-score.c (s3_nopic_need_relax): Likewise.
(s3_pic_need_relax): Likewise.
* config/tc-score7.c (s7_nopic_need_relax): Likewise.
(s7_pic_need_relax): Likewise.
* config/tc-sh.h (SUB_SEGMENT_ALIGN): Likewise.
* config/tc-sparc.c (md_parse_option): Likewise.
(sparc_ip): Likewise.
(s_reserve): Likewise.
(s_common): Likewise.
(s_seg): Likewise.
(sparc_cons): Likewise.
* config/tc-tic54x.c (stag_add_field): Likewise.
(tic54x_endstruct): Likewise.
* config/tc-tic6x.c (tic6x_start_unwind_section): Likewise.
* config/tc-v850.c (v850_comm): Likewise.
(md_begin): Likewise.
(md_assemble): Likewise.
* config/tc-vax.c (vax_cons): Likewise.
* config/tc-wasm32.c (wasm32_leb128): Likewise.
* config/tc-xstormy16.c (md_operand): Likewise.
* config/tc-xtensa.c (get_directive): Likewise.
(xg_instruction_matches_option_term): Likewise.
(is_unaligned_label): Likewise.
(cache_literal_section): Likewise.
* config/xtensa-relax.c (parse_precond): Likewise.
(parse_option_cond): Likewise.
(transition_applies): Likewise.
(wide_branch_opcode): Likewise.
* dw2gencfi.c: Likewise.
* dwarf2dbg.c (dwarf2_directive_filename): Likewise.
* ehopt.c (get_cie_info): Likewise.
* input-file.c (input_file_open): Likewise.
* listing.c (listing_newline): Likewise.
(debugging_pseudo): Likewise.
* read.c (read_a_source_file): Likewise.
* write.c (adjust_reloc_syms): Likewise.
(compress_debug): Likewise.
(maybe_generate_build_notes): Likewise.
|
|
* as.h (POISON_BFD_BOOLEAN): Define.
* as.c, * as.h, * atof-generic.c, * config/atof-ieee.c,
* config/bfin-aux.h, * config/obj-coff.c, * config/obj-ecoff.c,
* config/obj-elf.c, * config/obj-elf.h, * config/obj-som.c,
* config/tc-aarch64.c, * config/tc-alpha.c, * config/tc-arc.c,
* config/tc-arc.h, * config/tc-arm.c, * config/tc-arm.h,
* config/tc-avr.c, * config/tc-avr.h, * config/tc-bfin.c,
* config/tc-bfin.h, * config/tc-bpf.c, * config/tc-cris.c,
* config/tc-csky.c, * config/tc-csky.h, * config/tc-d10v.c,
* config/tc-d10v.h, * config/tc-d30v.c, * config/tc-d30v.h,
* config/tc-dlx.c, * config/tc-dlx.h, * config/tc-epiphany.c,
* config/tc-epiphany.h, * config/tc-fr30.c, * config/tc-fr30.h,
* config/tc-frv.c, * config/tc-frv.h, * config/tc-ft32.c,
* config/tc-ft32.h, * config/tc-h8300.c, * config/tc-hppa.c,
* config/tc-i386-intel.c, * config/tc-i386.c, * config/tc-ia64.c,
* config/tc-ip2k.c, * config/tc-iq2000.c, * config/tc-iq2000.h,
* config/tc-lm32.c, * config/tc-lm32.h, * config/tc-m32c.c,
* config/tc-m32c.h, * config/tc-m32r.c, * config/tc-m32r.h,
* config/tc-m68hc11.c, * config/tc-m68k.c, * config/tc-mcore.c,
* config/tc-mcore.h, * config/tc-mep.c, * config/tc-mep.h,
* config/tc-metag.c, * config/tc-metag.h,
* config/tc-microblaze.c, * config/tc-mips.c, * config/tc-mips.h,
* config/tc-mmix.c, * config/tc-mn10200.c, * config/tc-mn10300.c,
* config/tc-mn10300.h, * config/tc-moxie.c, * config/tc-msp430.c,
* config/tc-msp430.h, * config/tc-mt.c, * config/tc-mt.h,
* config/tc-nds32.c, * config/tc-nds32.h, * config/tc-nios2.c,
* config/tc-ns32k.c, * config/tc-or1k.c, * config/tc-or1k.h,
* config/tc-pdp11.c, * config/tc-ppc.c, * config/tc-pru.c,
* config/tc-pru.h, * config/tc-riscv.c, * config/tc-riscv.h,
* config/tc-rx.c, * config/tc-rx.h, * config/tc-s12z.c,
* config/tc-s12z.h, * config/tc-s390.c, * config/tc-score.c,
* config/tc-score.h, * config/tc-score7.c, * config/tc-sh.c,
* config/tc-sh.h, * config/tc-spu.c, * config/tc-tic54x.c,
* config/tc-tic6x.c, * config/tc-tic6x.h, * config/tc-tilegx.c,
* config/tc-tilepro.c, * config/tc-v850.c, * config/tc-v850.h,
* config/tc-visium.c, * config/tc-visium.h, * config/tc-wasm32.c,
* config/tc-wasm32.h, * config/tc-xc16x.c, * config/tc-xgate.c,
* config/tc-xstormy16.c, * config/tc-xstormy16.h,
* config/tc-xtensa.c, * config/tc-xtensa.h, * config/tc-z80.c,
* config/tc-z8k.c, * config/xtensa-istack.h,
* config/xtensa-relax.c, * config/xtensa-relax.h, * dw2gencfi.c,
* dwarf2dbg.c, * dwarf2dbg.h, * expr.c, * expr.h, * frags.c,
* frags.h, * listing.c, * macro.c, * output-file.c, * read.c,
* read.h, * stabs.c, * symbols.c, * write.c: Replace bfd_boolean
with bool, FALSE with false, and TRUE with true.
|
|
|
|
Some versions of gcc with -Werror=format-overflow complain about using
a perfectly good 7 char buffer for "r%dr%d" when the int is between 0
and 64, apparently not seeing the value range.
note: __builtin___sprintf_chk output between 5 and 24 bytes into a destination of size 7
* config/tc-arc.c (declare_register_set): Avoid false positive
format-overflow warning.
* config/tc-epiphany.c (md_assemble): Likewise.
* config/tc-mips.c (md_begin): Likewise.
* config/tc-mmix.c (mmix_md_begin): Likewise.
* config/tc-nds32.c (nds32_elf_append_relax_relocs): Avoid false
positive "may be used uninitialized" warning.
|
|
Inserting with replacement is wrong for some gas hash table uses.
This patch implements an htab_insert that conditionally replaces, and
similarly for str_hash_insert. str_hash_insert with replace=0 is
roughly equivalent to the older hash_insert, and str_hash_insert with
replace=1 to the older hash_jam, but return values are different. I
found it useful to know whether the slot was occupied prior to
inserting/replacing. I've also reinstated the fatal errors on messing
up opcode tables with duplicates.
PR 26513
* hash.h (htab_insert): Update prototype and comment.
(struct string_tuple): Make "value" a const void*.
(string_tuple_alloc): Likewise.
(str_hash_find, str_hash_find_n): Cast returned value.
(str_hash_insert): Add "replace" parameter, and return slot pointer.
Free alloc'd element when not inserted.
* hash.c (htab_insert): Likewise. Return slot when element exists,
otherwise return NULL.
* read.c (pop_insert): Insert into hash table without first searching.
* config/tc-avr.c (md_begin): Likewise.
* config/tc-msp430.c (md_begin): Likewise.
* config/tc-nds32.c (nds32_init_nds32_pseudo_opcodes): Likewise.
* config/tc-v850.c (md_begin): Likewise.
* macro.c (do_formals, define_macro, macro_expand_body): Likewise.
(delete_macro): Delete from hash table.
* config/tc-tic54x.c (subsym_create_or_replace): Correct logic.
* symbols.c (local_symbol_make, symbol_table_insert): Allow
replacement of hash table entries.
* config/obj-coff-seh.c (seh_hash_insert): Likewise.
* config/obj-coff.c (tag_insert): Likewise.
* config/tc-iq2000.c (iq2000_add_macro): Likewise.
* config/tc-m68k.c (md_begin): Likewise for aliases.
* config/tc-tic4x.c (tic4x_asg): Likewise.
* config/tc-tic6x.c (md_begin): Likewise.
* dw2gencfi.c (dwcfi_hash_find_or_make): Disallow replacement of
hash table entries.
* ecoff.c (add_string, get_tag): Likewise.
* macro.c (expand_irp): Likewise.
* config/obj-elf.c (build_additional_section_info): Likewise.
* config/tc-aarch64.c (insert_reg_alias): Likewise.
(checked_hash_insert): Likewise.
* config/tc-alpha.c (get_alpha_reloc_tag, md_begin): Likewise.
* config/tc-arc.c (arc_insert_opcode, declare_register): Likewise.
(declare_addrtype, md_begin, arc_extcorereg): Likewise.
* config/tc-arm.c (insert_reg_alias): Likewise.
(arm_tc_equal_in_insn, md_begin): Likewise.
* config/tc-cr16.c (initialise_reg_hash_table, md_begin): Likewise.
* config/tc-cris.c (md_begin): Likewise.
* config/tc-crx.c (md_begin): Likewise.
* config/tc-csky.c (md_begin): Likewise.
* config/tc-d10v.c (md_begin): Likewise.
* config/tc-dlx.c (md_begin): Likewise.
* config/tc-ft32.c (md_begin): Likewise.
* config/tc-h8300.c (md_begin): Likewise.
* config/tc-hppa.c (md_begin): Likewise.
* config/tc-i386.c (md_begin): Likewise.
* config/tc-ia64.c (dot_rot, dot_entry, declare_register): Likewise.
(md_begin, dot_alias): Likewise.
* config/tc-m68hc11.c (md_begin): Likewise.
* config/tc-m68k.c (md_begin): Likewise.
* config/tc-mcore.c (md_begin): Likewise.
* config/tc-microblaze.c (md_begin): Likewise.
* config/tc-mips.c (md_begin): Likewise.
* config/tc-mmix.c (md_begin): Likewise.
* config/tc-mn10200.c (md_begin): Likewise.
* config/tc-mn10300.c (md_begin): Likewise.
* config/tc-moxie.c (md_begin): Likewise.
* config/tc-nds32.c (nds32_relax_hint, md_begin): Likewise.
* config/tc-nios2.c (md_begin): Likewise.
* config/tc-ns32k.c (md_begin): Likewise.
* config/tc-pdp11.c (md_begin): Likewise.
* config/tc-pj.c (fake_opcode, md_begin): Likewise.
* config/tc-ppc.c (ppc_setup_opcodes): Likewise.
* config/tc-pru.c (md_begin): Likewise.
* config/tc-riscv.c (init_ext_version_hash): Likewise.
(init_opcode_names_hash, hash_reg_name, init_opcode_hash): Likewise.
(riscv_init_csr_hash): Likewise.
* config/tc-s390.c (s390_setup_opcodes, md_begin): Likewise.
* config/tc-score.c (s3_insert_reg): Likewise.
(s3_build_score_ops_hsh, s3_build_dependency_insn_hsh): Likewise.
* config/tc-score7.c (s7_build_score_ops_hsh): Likewise.
(s7_build_dependency_insn_hsh, s7_insert_reg): Likewise.
* config/tc-sh.c (md_begin): Likewise.
* config/tc-sparc.c (md_begin): Likewise.
* config/tc-spu.c (md_begin): Likewise.
* config/tc-tic30.c (md_begin): Likewise.
* config/tc-tic4x.c (tic4x_inst_insert): Likewise.
* config/tc-tic54x.c (stag_add_field_symbols, md_begin): Likewise.
(tic54x_endstruct, tic54x_var, tic54x_macro_info): Likewise.
(subsym_substitute): Likewise.
* config/tc-tilegx.c (md_begin): Likewise.
* config/tc-tilepro.c (md_begin): Likewise.
* config/tc-vax.c (vip_begin): Likewise.
* config/tc-wasm32.c (md_begin): Likewise.
* config/tc-xgate.c (md_begin): Likewise.
* config/tc-z8k.c (md_begin): Likewise.
* testsuite/gas/ppc/dcbt.d,
* testsuite/gas/ppc/dcbt.s: New test.
* testsuite/gas/ppc/ppc.exp: Run it.
* ecoff.c (add_string): Report fatal error on duplicates.
* config/tc-alpha.c (md_begin): Likewise.
* config/tc-arc.c (arc_insert_opcode, declare_register): Likewise.
(declare_addrtype, md_begin, arc_extcorereg): Likewise.
* config/tc-cr16.c (initialise_reg_hash_table, md_begin): Likewise.
* config/tc-cris.c (md_begin): Likewise.
* config/tc-crx.c (md_begin): Likewise.
* config/tc-dlx.c (md_begin): Likewise.
* config/tc-hppa.c (md_begin): Likewise.
* config/tc-i386.c (md_begin): Likewise.
* config/tc-ia64.c (dot_rot, dot_entry, declare_register): Likewise.
(md_begin): Likewise.
* config/tc-m68k.c (md_begin): Likewise.
* config/tc-mips.c (md_begin): Likewise.
* config/tc-nios2.c (md_begin): Likewise.
* config/tc-ns32k.c (md_begin): Likewise.
* config/tc-ppc.c (ppc_setup_opcodes): Likewise.
* config/tc-pru.c (md_begin): Likewise.
* config/tc-riscv.c (init_ext_version_hash): Likewise.
(init_opcode_names_hash, hash_reg_name, init_opcode_hash): Likewise.
* config/tc-s390.c (s390_setup_opcodes, md_begin): Likewise.
* config/tc-sparc.c (md_begin): Likewise.
* config/tc-tic30.c (md_begin): Likewise.
* config/tc-tic4x.c (tic4x_inst_insert): Likewise.
* config/tc-tilegx.c (md_begin): Likewise.
* config/tc-tilepro.c (md_begin): Likewise.
* config/tc-vax.c (vip_begin): Likewise.
* config/tc-alpha.c,
* config/tc-arm.c,
* config/tc-avr.c,
* config/tc-cr16.c,
* config/tc-csky.c,
* config/tc-i386.c,
* config/tc-m68hc11.c,
* config/tc-m68k.c,
* config/tc-microblaze.c,
* config/tc-ns32k.c,
* config/tc-pj.c,
* config/tc-ppc.c,
* config/tc-score.c,
* config/tc-score7.c,
* config/tc-tic4x.c,
* config/tc-tic54x.c,
* config/tc-tilegx.c,
* config/tc-tilepro.c,
* config/tc-xgate.c: Formatting.
|
|
These functions take an offset within frag, frag within section, and
section parameter. So it makes sense to order the parameters as
section, frag, offset.
* symbols.h (symbol_new, symbol_create, local_symbol_make),
(symbol_temp_new): Arrange params as section, frag, offset.
* symbols.c: Adjust to suit.
* as.c: Likewise.
* cgen.c: Likewise.
* dwarf2dbg.c: Likewise.
* ecoff.c: Likewise.
* expr.c: Likewise.
* itbl-ops.c: Likewise.
* read.c: Likewise.
* stabs.c: Likewise.
* subsegs.c: Likewise.
* config/obj-coff.c: Likewise.
* config/obj-elf.c: Likewise.
* config/obj-macho.c: Likewise.
* config/tc-aarch64.c: Likewise.
* config/tc-alpha.c: Likewise.
* config/tc-arc.c: Likewise.
* config/tc-arm.c: Likewise.
* config/tc-avr.c: Likewise.
* config/tc-cr16.c: Likewise.
* config/tc-cris.c: Likewise.
* config/tc-csky.c: Likewise.
* config/tc-dlx.c: Likewise.
* config/tc-hppa.c: Likewise.
* config/tc-i386.c: Likewise.
* config/tc-ia64.c: Likewise.
* config/tc-m32r.c: Likewise.
* config/tc-m68k.c: Likewise.
* config/tc-mips.c: Likewise.
* config/tc-mmix.c: Likewise.
* config/tc-mn10200.c: Likewise.
* config/tc-mn10300.c: Likewise.
* config/tc-nds32.c: Likewise.
* config/tc-nios2.c: Likewise.
* config/tc-ppc.c: Likewise.
* config/tc-riscv.c: Likewise.
* config/tc-s390.c: Likewise.
* config/tc-sh.c: Likewise.
* config/tc-tic4x.c: Likewise.
* config/tc-tic54x.c: Likewise.
* config/tc-xtensa.c: Likewise.
|
|
* config/obj-coff-seh.c (seh_hash_insert): Port to use new
str_htab type.
(seh_hash_find): Likewise.
(seh_hash_find_or_make): Likewise.
* config/obj-coff.c (tag_init): Likewise.
(tag_insert): Likewise.
(tag_find): Likewise.
* config/obj-elf.c (struct group_list): Likewise.
(build_additional_section_info): Likewise.
(free_section_idx): Likewise.
(elf_adjust_symtab): Likewise.
(elf_frob_file_after_relocs): Likewise.
* config/tc-aarch64.c (INSN_SIZE): Likewise.
(parse_reg): Likewise.
(insert_reg_alias): Likewise.
(create_register_alias): Likewise.
(s_unreq): Likewise.
(parse_shift): Likewise.
(parse_pldop): Likewise.
(parse_barrier): Likewise.
(parse_barrier_psb): Likewise.
(parse_bti_operand): Likewise.
(parse_sys_reg): Likewise.
(parse_sys_ins_reg): Likewise.
(lookup_mnemonic): Likewise.
(opcode_lookup): Likewise.
(parse_operands): Likewise.
(checked_hash_insert): Likewise.
(sysreg_hash_insert): Likewise.
(fill_instruction_hash_table): Likewise.
(md_begin): Likewise.
* config/tc-alpha.c (struct alpha_reloc_tag): Likewise.
(get_alpha_reloc_tag): Likewise.
(assemble_tokens_to_insn): Likewise.
(assemble_tokens): Likewise.
(md_begin): Likewise.
* config/tc-arc.c (arc_find_opcode): Likewise.
(arc_insert_opcode): Likewise.
(find_opcode_match): Likewise.
(declare_register): Likewise.
(declare_addrtype): Likewise.
(md_begin): Likewise.
(arc_parse_name): Likewise.
(tc_arc_regname_to_dw2regnum): Likewise.
(arc_extcorereg): Likewise.
* config/tc-arm.c (MVE_BAD_QREG): Likewise.
(arm_reg_parse_multi): Likewise.
(parse_reloc): Likewise.
(insert_reg_alias): Likewise.
(create_register_alias): Likewise.
(s_unreq): Likewise.
(parse_shift): Likewise.
(parse_psr): Likewise.
(parse_cond): Likewise.
(parse_barrier): Likewise.
(do_vfp_nsyn_opcode): Likewise.
(opcode_lookup): Likewise.
(arm_tc_equal_in_insn): Likewise.
(md_begin): Likewise.
* config/tc-avr.c (md_begin): Likewise.
(avr_ldi_expression): Likewise.
(md_assemble): Likewise.
(avr_update_gccisr): Likewise.
(avr_emit_insn): Likewise.
* config/tc-cr16.c (get_register): Likewise.
(get_register_pair): Likewise.
(get_index_register): Likewise.
(get_index_register_pair): Likewise.
(get_pregister): Likewise.
(get_pregisterp): Likewise.
(initialise_reg_hash_table): Likewise.
(md_begin): Likewise.
(cr16_assemble): Likewise.
(md_assemble): Likewise.
* config/tc-cris.c (cris_insn_first_word_frag): Likewise.
(md_begin): Likewise.
(cris_process_instruction): Likewise.
* config/tc-crx.c (get_register): Likewise.
(get_copregister): Likewise.
(md_begin): Likewise.
(md_assemble): Likewise.
* config/tc-csky.c (md_begin): Likewise.
(parse_opcode): Likewise.
(get_operand_value): Likewise.
(v1_work_jbsr): Likewise.
(v2_work_rotlc): Likewise.
(v2_work_bgeni): Likewise.
(v2_work_not): Likewise.
* config/tc-d10v.c (sizeof): Likewise.
(md_begin): Likewise.
(do_assemble): Likewise.
(md_apply_fix): Likewise.
* config/tc-d30v.c (sizeof): Likewise.
(md_begin): Likewise.
(do_assemble): Likewise.
* config/tc-dlx.c (RELOC_DLX_VTENTRY): Likewise.
(md_begin): Likewise.
(machine_ip): Likewise.
* config/tc-ft32.c (md_begin): Likewise.
(md_assemble): Likewise.
* config/tc-h8300.c (md_begin): Likewise.
(md_assemble): Likewise.
* config/tc-hppa.c (pa_ip): Likewise.
(md_begin): Likewise.
* config/tc-i386.c (md_begin): Likewise.
(i386_print_statistics): Likewise.
(parse_insn): Likewise.
(process_operands): Likewise.
(i386_index_check): Likewise.
(parse_real_register): Likewise.
* config/tc-ia64.c (dot_rot): Likewise.
(dot_entry): Likewise.
(declare_register): Likewise.
(md_begin): Likewise.
(ia64_parse_name): Likewise.
(md_assemble): Likewise.
(dot_alias): Likewise.
(do_alias): Likewise.
(ia64_adjust_symtab): Likewise.
(do_secalias): Likewise.
(ia64_frob_file): Likewise.
* config/tc-m68hc11.c (m68hc11_print_statistics): Likewise.
(md_begin): Likewise.
(print_insn_format): Likewise.
(md_assemble): Likewise.
* config/tc-m68k.c (tc_gen_reloc): Likewise.
(m68k_ip): Likewise.
(md_begin): Likewise.
* config/tc-mcore.c (md_begin): Likewise.
(md_assemble): Likewise.
* config/tc-microblaze.c (md_begin): Likewise.
(md_assemble): Likewise.
(md_apply_fix): Likewise.
* config/tc-mips.c (nopic_need_relax): Likewise.
(md_begin): Likewise.
(macro_build): Likewise.
(mips16_macro_build): Likewise.
(mips_lookup_insn): Likewise.
(mips_ip): Likewise.
(mips16_ip): Likewise.
* config/tc-mmix.c (sizeof): Likewise.
(mmix_md_begin): Likewise.
(md_assemble): Likewise.
* config/tc-mn10200.c (md_begin): Likewise.
(md_assemble): Likewise.
* config/tc-mn10300.c (HAVE_AM30): Likewise.
(md_begin): Likewise.
(md_assemble): Likewise.
* config/tc-moxie.c (md_begin): Likewise.
(md_assemble): Likewise.
* config/tc-msp430.c (md_begin): Likewise.
(msp430_operands): Likewise.
(md_assemble): Likewise.
* config/tc-nds32.c (PV_DONT_CARE): Likewise.
(builtin_isreg): Likewise.
(builtin_regnum): Likewise.
(nds32_init_nds32_pseudo_opcodes): Likewise.
(nds32_lookup_pseudo_opcode): Likewise.
(nds32_relax_hint): Likewise.
(md_begin): Likewise.
(nds32_find_reloc_table): Likewise.
(nds32_elf_append_relax_relocs_traverse): Likewise.
(nds32_relax_branch_instructions): Likewise.
(md_convert_frag): Likewise.
(nds32_elf_analysis_relax_hint): Likewise.
(tc_nds32_regname_to_dw2regnum): Likewise.
* config/tc-nios2.c (nios2_opcode_lookup): Likewise.
(nios2_reg_lookup): Likewise.
(nios2_ps_lookup): Likewise.
(md_begin): Likewise.
* config/tc-ns32k.c (struct hash_control): Likewise.
(parse): Likewise.
(md_begin): Likewise.
* config/tc-pdp11.c (md_begin): Likewise.
(md_assemble): Likewise.
* config/tc-pj.c (fake_opcode): Likewise.
(alias): Likewise.
(md_begin): Likewise.
(md_assemble): Likewise.
* config/tc-ppc.c (ppc_setup_opcodes): Likewise.
(md_assemble): Likewise.
* config/tc-pru.c (pru_opcode_lookup): Likewise.
(pru_reg_lookup): Likewise.
(md_begin): Likewise.
(md_end): Likewise.
* config/tc-riscv.c (init_ext_version_hash): Likewise.
(riscv_get_default_ext_version): Likewise.
(riscv_set_arch): Likewise.
(init_opcode_names_hash): Likewise.
(opcode_name_lookup): Likewise.
(enum reg_class): Likewise.
(hash_reg_name): Likewise.
(riscv_init_csr_hash): Likewise.
(reg_csr_lookup_internal): Likewise.
(reg_lookup_internal): Likewise.
(init_opcode_hash): Likewise.
(md_begin): Likewise.
(DECLARE_CSR): Likewise.
(macro_build): Likewise.
(riscv_ip): Likewise.
* config/tc-s390.c (register_name): Likewise.
(s390_setup_opcodes): Likewise.
(md_begin): Likewise.
(md_assemble): Likewise.
(s390_insn): Likewise.
* config/tc-score.c (struct s3_reg_map): Likewise.
(s3_score_reg_parse): Likewise.
(s3_dependency_type_from_insn): Likewise.
(s3_parse_16_32_inst): Likewise.
(s3_parse_48_inst): Likewise.
(s3_insert_reg): Likewise.
(s3_build_reg_hsh): Likewise.
(s3_build_score_ops_hsh): Likewise.
(s3_build_dependency_insn_hsh): Likewise.
(s3_begin): Likewise.
* config/tc-score7.c (struct s7_reg_map): Likewise.
(s7_score_reg_parse): Likewise.
(s7_dependency_type_from_insn): Likewise.
(s7_parse_16_32_inst): Likewise.
(s7_build_score_ops_hsh): Likewise.
(s7_build_dependency_insn_hsh): Likewise.
(s7_insert_reg): Likewise.
(s7_build_reg_hsh): Likewise.
(s7_begin): Likewise.
* config/tc-sh.c (EMPTY): Likewise.
(md_begin): Likewise.
(find_cooked_opcode): Likewise.
* config/tc-sparc.c (md_begin): Likewise.
(sparc_ip): Likewise.
* config/tc-spu.c (md_begin): Likewise.
(md_assemble): Likewise.
* config/tc-tic30.c (md_begin): Likewise.
(tic30_operand): Likewise.
(tic30_parallel_insn): Likewise.
(md_assemble): Likewise.
* config/tc-tic4x.c (TIC4X_ALT_SYNTAX): Likewise.
(tic4x_asg): Likewise.
(tic4x_inst_insert): Likewise.
(tic4x_inst_add): Likewise.
(md_begin): Likewise.
(tic4x_operand_parse): Likewise.
(md_assemble): Likewise.
* config/tc-tic54x.c (MAX_SUBSYM_HASH): Likewise.
(stag_add_field_symbols): Likewise.
(tic54x_endstruct): Likewise.
(tic54x_tag): Likewise.
(tic54x_remove_local_label): Likewise.
(tic54x_clear_local_labels): Likewise.
(tic54x_var): Likewise.
(tic54x_macro_start): Likewise.
(tic54x_macro_info): Likewise.
(tic54x_macro_end): Likewise.
(subsym_isreg): Likewise.
(subsym_structsz): Likewise.
(md_begin): Likewise.
(is_mmreg): Likewise.
(is_type): Likewise.
(encode_condition): Likewise.
(encode_cc3): Likewise.
(encode_cc2): Likewise.
(encode_operand): Likewise.
(tic54x_parse_insn): Likewise.
(tic54x_parse_parallel_insn_firstline): Likewise.
(subsym_create_or_replace): Likewise.
(subsym_lookup): Likewise.
(subsym_substitute): Likewise.
(tic54x_undefined_symbol): Likewise.
* config/tc-tic6x.c (md_begin): Likewise.
(md_assemble): Likewise.
* config/tc-tilegx.c (O_hw2_last_plt): Likewise.
(INSERT_SPECIAL_OP): Likewise.
(md_begin): Likewise.
(tilegx_parse_name): Likewise.
(parse_reg_expression): Likewise.
(md_assemble): Likewise.
* config/tc-tilepro.c (O_tls_ie_load): Likewise.
(INSERT_SPECIAL_OP): Likewise.
(tilepro_parse_name): Likewise.
(parse_reg_expression): Likewise.
(md_assemble): Likewise.
* config/tc-v850.c (md_begin): Likewise.
(md_assemble): Likewise.
* config/tc-vax.c (md_ri_to_chars): Likewise.
(vip_begin): Likewise.
(vip): Likewise.
(main): Likewise.
(md_begin): Likewise.
* config/tc-wasm32.c (md_begin): Likewise.
(md_assemble): Likewise.
* config/tc-xgate.c (xgate_parse_operand): Likewise.
(md_begin): Likewise.
(md_assemble): Likewise.
* config/tc-z8k.c (md_begin): Likewise.
(md_assemble): Likewise.
|
|
* config/tc-csky.c (get_operand_value): Rewrite 1 << 31 expressions
to avoid signed overflow.
* config/tc-mcore.c (md_assemble): Likewise.
* config/tc-mips.c (gpr_read_mask, gpr_write_mask): Likewise.
* config/tc-nds32.c (SET_ADDEND): Likewise.
* config/tc-nios2.c (nios2_assemble_arg_R): Likewise.
|
|
Labels don't go in the first column according to standard emacs C
indent rules, and I got annoyed enough at seeing diff -p show a label
rather than the function name to fix this.
bfd/
* aoutx.h: Indent labels correctly. Format error strings.
* archive.c: Likewise.
* archive64.c: Likewise.
* coff-arm.c: Likewise.
* coff-rs6000.c: Likewise.
* coff-stgo32.c: Likewise.
* cpu-arm.c: Likewise.
* dwarf2.c: Likewise.
* elf-ifunc.c: Likewise.
* elf-properties.c: Likewise.
* elf-s390-common.c: Likewise.
* elf-strtab.c: Likewise.
* elf.c: Likewise.
* elf32-arm.c: Likewise.
* elf32-bfin.c: Likewise.
* elf32-cr16.c: Likewise.
* elf32-csky.c: Likewise.
* elf32-i386.c: Likewise.
* elf32-m68k.c: Likewise.
* elf32-msp430.c: Likewise.
* elf32-nds32.c: Likewise.
* elf32-nios2.c: Likewise.
* elf32-pru.c: Likewise.
* elf32-xtensa.c: Likewise.
* elf64-ia64-vms.c: Likewise.
* elf64-x86-64.c: Likewise.
* elfcode.h: Likewise.
* elfcore.h: Likewise.
* elflink.c: Likewise.
* elfnn-aarch64.c: Likewise.
* elfnn-ia64.c: Likewise.
* elfnn-riscv.c: Likewise.
* elfxx-mips.c: Likewise.
* elfxx-sparc.c: Likewise.
* elfxx-x86.c: Likewise.
* i386lynx.c: Likewise.
* merge.c: Likewise.
* pdp11.c: Likewise.
* plugin.c: Likewise.
* reloc.c: Likewise.
binutils/
* elfedit.c: Indent labels correctly.
* readelf.c: Likewise.
* resres.c: Likewise.
gas/
* config/obj-elf.c: Indent labels correctly.
* config/obj-macho.c: Likewise.
* config/tc-aarch64.c: Likewise.
* config/tc-alpha.c: Likewise.
* config/tc-arm.c: Likewise.
* config/tc-cr16.c: Likewise.
* config/tc-crx.c: Likewise.
* config/tc-frv.c: Likewise.
* config/tc-i386-intel.c: Likewise.
* config/tc-i386.c: Likewise.
* config/tc-ia64.c: Likewise.
* config/tc-mn10200.c: Likewise.
* config/tc-mn10300.c: Likewise.
* config/tc-nds32.c: Likewise.
* config/tc-riscv.c: Likewise.
* config/tc-s12z.c: Likewise.
* config/tc-xtensa.c: Likewise.
* config/tc-z80.c: Likewise.
* read.c: Likewise.
* symbols.c: Likewise.
* write.c: Likewise.
ld/
* emultempl/cskyelf.em: Indent labels correctly.
* ldfile.c: Likewise.
* ldlang.c: Likewise.
* plugin.c: Likewise.
opcodes/
* aarch64-asm.c: Indent labels correctly.
* aarch64-dis.c: Likewise.
* aarch64-gen.c: Likewise.
* aarch64-opc.c: Likewise.
* alpha-dis.c: Likewise.
* i386-dis.c: Likewise.
* nds32-asm.c: Likewise.
* nfp-dis.c: Likewise.
* visium-dis.c: Likewise.
|
|
|
|
Also fixes m68hc1x printf arguments which would have bombed when
compiling on a 32-bit host with --enable-64-bit-bfd.
bfd/
PR 24955
* elf32-arm.c (set_cmse_veneer_addr_from_implib): Use bfd_malloc
rather than xmalloc.
* elf32-m68hc1x.c (reloc_warning): New function.
(elf32_m68hc11_relocate_section): Use it here. Cast bfd_vma values
corresponding to %lx in format strings.
* elf32-nds32.c (nds32_insertion_sort): Use a stack temporary.
gas/
* config/tc-nds32.c (nds32_set_section_relocs): Use relocs and n
parameters rather than equivalent sec->orelocation and
sec->reloc_count. Don't sort for n <= 1. Tidy.
|
|
This large patch removes the unnecessary bfd parameter from various
bfd section macros and functions. The bfd is hardly ever used and if
needed for the bfd_set_section_* or bfd_rename_section functions can
be found via section->owner except for the com, und, abs, and ind
std_section special sections. Those sections shouldn't be modified
anyway.
The patch also removes various bfd_get_section_<field> macros,
replacing their use with bfd_section_<field>, and adds
bfd_set_section_lma. I've also fixed a minor bug in gas where
compressed section renaming was done directly rather than calling
bfd_rename_section. This would have broken bfd_get_section_by_name
and similar functions, but that hardly mattered at such a late stage
in gas processing.
bfd/
* bfd-in.h (bfd_get_section_name, bfd_get_section_vma),
(bfd_get_section_lma, bfd_get_section_alignment),
(bfd_get_section_size, bfd_get_section_flags),
(bfd_get_section_userdata): Delete.
(bfd_section_name, bfd_section_size, bfd_section_vma),
(bfd_section_lma, bfd_section_alignment): Lose bfd parameter.
(bfd_section_flags, bfd_section_userdata): New.
(bfd_is_com_section): Rename parameter.
* section.c (bfd_set_section_userdata, bfd_set_section_vma),
(bfd_set_section_alignment, bfd_set_section_flags, bfd_rename_section),
(bfd_set_section_size): Delete bfd parameter, rename section parameter.
(bfd_set_section_lma): New.
* bfd-in2.h: Regenerate.
* mach-o.c (bfd_mach_o_init_section_from_mach_o): Delete bfd param,
update callers.
* aoutx.h, * bfd.c, * coff-alpha.c, * coff-arm.c, * coff-mips.c,
* coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c,
* compress.c, * ecoff.c, * elf-eh-frame.c, * elf-hppa.h,
* elf-ifunc.c, * elf-m10200.c, * elf-m10300.c, * elf-properties.c,
* elf-s390-common.c, * elf-vxworks.c, * elf.c, * elf32-arc.c,
* elf32-arm.c, * elf32-avr.c, * elf32-bfin.c, * elf32-cr16.c,
* elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-csky.c,
* elf32-d10v.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c,
* elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c,
* elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c, * elf32-m32c.c,
* elf32-m32r.c, * elf32-m68hc1x.c, * elf32-m68k.c, * elf32-mcore.c,
* elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c,
* elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c,
* elf32-nios2.c, * elf32-or1k.c, * elf32-ppc.c, * elf32-pru.c,
* elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c,
* elf32-score7.c, * elf32-sh.c, * elf32-spu.c, * elf32-tic6x.c,
* elf32-tilepro.c, * elf32-v850.c, * elf32-vax.c, * elf32-visium.c,
* elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c,
* elf64-bpf.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mmix.c,
* elf64-ppc.c, * elf64-s390.c, * elf64-sparc.c, * elf64-x86-64.c,
* elflink.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c,
* elfxx-aarch64.c, * elfxx-mips.c, * elfxx-sparc.c,
* elfxx-tilegx.c, * elfxx-x86.c, * i386msdos.c, * linker.c,
* mach-o.c, * mmo.c, * opncls.c, * pdp11.c, * pei-x86_64.c,
* peicode.h, * reloc.c, * section.c, * syms.c, * vms-alpha.c,
* xcofflink.c: Update throughout for bfd section macro and function
changes.
binutils/
* addr2line.c, * bucomm.c, * coffgrok.c, * dlltool.c, * nm.c,
* objcopy.c, * objdump.c, * od-elf32_avr.c, * od-macho.c,
* od-xcoff.c, * prdbg.c, * rdcoff.c, * rddbg.c, * rescoff.c,
* resres.c, * size.c, * srconv.c, * strings.c, * windmc.c: Update
throughout for bfd section macro and function changes.
gas/
* as.c, * as.h, * dw2gencfi.c, * dwarf2dbg.c, * ecoff.c,
* read.c, * stabs.c, * subsegs.c, * subsegs.h, * write.c,
* config/obj-coff-seh.c, * config/obj-coff.c, * config/obj-ecoff.c,
* config/obj-elf.c, * config/obj-macho.c, * config/obj-som.c,
* config/tc-aarch64.c, * config/tc-alpha.c, * config/tc-arc.c,
* config/tc-arm.c, * config/tc-avr.c, * config/tc-bfin.c,
* config/tc-bpf.c, * config/tc-d10v.c, * config/tc-d30v.c,
* config/tc-epiphany.c, * config/tc-fr30.c, * config/tc-frv.c,
* config/tc-h8300.c, * config/tc-hppa.c, * config/tc-i386.c,
* config/tc-ia64.c, * config/tc-ip2k.c, * config/tc-iq2000.c,
* config/tc-lm32.c, * config/tc-m32c.c, * config/tc-m32r.c,
* config/tc-m68hc11.c, * config/tc-mep.c, * config/tc-microblaze.c,
* config/tc-mips.c, * config/tc-mmix.c, * config/tc-mn10200.c,
* config/tc-mn10300.c, * config/tc-msp430.c, * config/tc-mt.c,
* config/tc-nds32.c, * config/tc-or1k.c, * config/tc-ppc.c,
* config/tc-pru.c, * config/tc-rl78.c, * config/tc-rx.c,
* config/tc-s12z.c, * config/tc-s390.c, * config/tc-score.c,
* config/tc-score7.c, * config/tc-sh.c, * config/tc-sparc.c,
* config/tc-spu.c, * config/tc-tic4x.c, * config/tc-tic54x.c,
* config/tc-tic6x.c, * config/tc-tilegx.c, * config/tc-tilepro.c,
* config/tc-v850.c, * config/tc-visium.c, * config/tc-wasm32.c,
* config/tc-xc16x.c, * config/tc-xgate.c, * config/tc-xstormy16.c,
* config/tc-xtensa.c, * config/tc-z8k.c: Update throughout for
bfd section macro and function changes.
* write.c (compress_debug): Use bfd_rename_section.
gdb/
* aarch64-linux-tdep.c, * arm-tdep.c, * auto-load.c,
* coff-pe-read.c, * coffread.c, * corelow.c, * dbxread.c,
* dicos-tdep.c, * dwarf2-frame.c, * dwarf2read.c, * elfread.c,
* exec.c, * fbsd-tdep.c, * gcore.c, * gdb_bfd.c, * gdb_bfd.h,
* hppa-tdep.c, * i386-cygwin-tdep.c, * i386-fbsd-tdep.c,
* i386-linux-tdep.c, * jit.c, * linux-tdep.c, * machoread.c,
* maint.c, * mdebugread.c, * minidebug.c, * mips-linux-tdep.c,
* mips-sde-tdep.c, * mips-tdep.c, * mipsread.c, * nto-tdep.c,
* objfiles.c, * objfiles.h, * osabi.c, * ppc-linux-tdep.c,
* ppc64-tdep.c, * record-btrace.c, * record-full.c, * remote.c,
* rs6000-aix-tdep.c, * rs6000-tdep.c, * s390-linux-tdep.c,
* s390-tdep.c, * solib-aix.c, * solib-dsbt.c, * solib-frv.c,
* solib-spu.c, * solib-svr4.c, * solib-target.c,
* spu-linux-nat.c, * spu-tdep.c, * symfile-mem.c, * symfile.c,
* symmisc.c, * symtab.c, * target.c, * windows-nat.c,
* xcoffread.c, * cli/cli-dump.c, * compile/compile-object-load.c,
* mi/mi-interp.c: Update throughout for bfd section macro and
function changes.
* gcore (gcore_create_callback): Use bfd_set_section_lma.
* spu-tdep.c (spu_overlay_new_objfile): Likewise.
gprof/
* corefile.c, * symtab.c: Update throughout for bfd section
macro and function changes.
ld/
* ldcref.c, * ldctor.c, * ldelf.c, * ldlang.c, * pe-dll.c,
* emultempl/aarch64elf.em, * emultempl/aix.em,
* emultempl/armcoff.em, * emultempl/armelf.em,
* emultempl/cr16elf.em, * emultempl/cskyelf.em,
* emultempl/m68hc1xelf.em, * emultempl/m68kelf.em,
* emultempl/mipself.em, * emultempl/mmix-elfnmmo.em,
* emultempl/mmo.em, * emultempl/msp430.em,
* emultempl/nios2elf.em, * emultempl/pe.em, * emultempl/pep.em,
* emultempl/ppc64elf.em, * emultempl/xtensaelf.em: Update
throughout for bfd section macro and function changes.
libctf/
* ctf-open-bfd.c: Update throughout for bfd section macro changes.
opcodes/
* arc-ext.c: Update throughout for bfd section macro changes.
sim/
* common/sim-load.c, * common/sim-utils.c, * cris/sim-if.c,
* erc32/func.c, * lm32/sim-if.c, * m32c/load.c, * m32c/trace.c,
* m68hc11/interp.c, * ppc/hw_htab.c, * ppc/hw_init.c,
* rl78/load.c, * rl78/trace.c, * rx/gdb-if.c, * rx/load.c,
* rx/trace.c: Update throughout for bfd section macro changes.
|
|
with address sanitization enabled.
PR 24538
gas * macro.c (get_any_string): Increase size of buffer used to hold
decimal value of expression result.
* dw2gencfi.c (get_debugseg_name): Handle an empty name.
* dwarf2dbg.c (get_filenum): Catch integer wraparound when
extending allocate file array.
(dwarf2_directive_filename): Add extra checks of the computed file
number.
* config/tc-arm.c (arm_tc_equal_in_insn): Insert copy of name into
warning hash table.
(s_arm_eabi_attribute): Check for obj_elf_vendor_attribute
returning -1.
* config/tc-i386.c (i386_output_nops): Catch an attempt to
generate nops of negative lengths.
* as.h (MAX_LITTLENUMS): Move definition to here from...
* config/atof-ieee.c: ...here.
* config/tc-aarch64.c: ...here.
* config/tc-arc.c: ...here.
* config/tc-arm.c: ...here.
* config/tc-epiphany.c: ...here.
* config/tc-i386.c: ...here.
* config/tc-ia64.c: ...here. (And correct the value).
* config/tc-m32c.c: ...here.
* config/tc-m32r.c: ...here.
* config/tc-metag.c: ...here.
* config/tc-microblaze.c: ...here.
* config/tc-nds32.c: ...here.
* config/tc-or1k.c: ...here.
* config/tc-score.c: ...here.
* config/tc-score7.c: ...here.
* config/tc-tic4x.c: ...here.
* config/tc-tilegx.c: ...here.
* config/tc-tilepro.c: ...here.
* config/tc-visium.c: ...here.
* config/tc-sh.c (md_assemble): Add check for an instruction with
no opcodes.
* config/tc-mips.c (mips_lookup_insn): Add check for very short
instruction name.
* config/tc-tic54x.c: Use unsigned chars to access is_end_of_line
array.
(tic54x_start_line_hook): Check for an empty line.
(next_line_shows_parallel): Do not walk off the end of the string.
(tic54x_macro_start): Check for too much macro nesting.
(tic54x_start_label): Add label_start parameter. Use this
parameter to check the first character of the label.
* config/tc-tic54x.h (TC_START_LABEL_WITHOUT_COLON): Pass
line_start variable to tic54x_start_label.
PR 24538
opcodes * ia64-opc.c (ia64_find_matching_opcode): Check for reaching the
end of the table prematurely.
|
|
|
|
This file was never supposed to be widely used. The fact that it has
found its way into many gas files led to bugs, typically when code
expecting a symbolS* to point at a struct symbol is presented with a
struct local_symbol. Also, commit 158184ac9e changed these structs in
2012 but didn't catch all places where symbol bsym was being used to
test for a local_symbol.
* Makefile.am (HFILES): Delete struc-symbol.h.
* doc/internals.texi: Delete struc-symbol.h reference and out
of date local symbol description.
* struc-symbol.h: Delete. Move contents to..
* symbols.c: ..here.
(symbol_on_chain, symbol_symbolS): New functions.
* symbols.h (symbol_on_chain, symbol_symbolS): Declare.
* cgen.c: Don't #include struc-symbol.h.
(gas_cgen_parse_operand): Don't test for local_symbol using
bsym, instead call symbol_symbolS. Use symbol_get_bfdsym.
(weak_operand_overflow_check, make_right_shifted_expr): Use
symbol accessors.
* config/obj-coff.c: Don't #include struc-symbol.h.
(GET_FILENAME_STRING): Delete.
* config/obj-elf.c: Don't #include struc-symbol.h.
(elf_file_symbol): Use symbol accessors.
(elf_adjust_symtab): Call symbol_on_chain.
* config/obj-evax.c: Don't #include struc-symbol.h.
* config/tc-nds32.c: Likewise.
* config/tc-rl78.c: Likewise.
* config/tc-rx.c: Likewise.
* config/tc-alpha.c: Likewise.
(add_to_link_pool, s_alpha_comm): Use symbol accessors.
* config/tc-arc.c: Don't #include struc-symbol.h.
(arc_check_relocs): Use symbol accessors, testing gas symbol
section rather than bfd symbol section.
* config/tc-avr.c: Don't #include struc-symbol.h.
(avr_patch_gccisr_frag): Use symbol accessors.
* config/tc-bfin.c: Don't #include struc-symbol.h.
(bfin_loop_beginend): Use symbol accessors.
* config/tc-csky.c: Don't #include struc-symbol.h.
(v2_work_movih, v2_work_ori): Use symbol accessors. Check for
absolute symbol as well as O_constant.
* config/tc-riscv.c: Don't #include struc-symbol.h.
(riscv_pre_output_hook): Use symbol accessors.
* config/tc-s390.c: Don't #include struc-symbol.h.
(s390_literals): Use symbol accessors.
* config/tc-score.c (s3_build_la_pic, s3_build_lwst_pic): Use
symbol accessors.
(s3_relax_branch_inst16, s3_relax_cmpbranch_inst32): Don't
test symbol bsym.
* config/tc-score7.c: Don't #include struc-symbol.h.
(s7_build_la_pic, s7_build_lwst_pic): Use symbol accessors.
(s7_b32_relax_to_b16): Don't test symbol bsym.
* config/tc-sh.c: Don't #include struc-symbol.h.
(insert_loop_bounds): Use symbol accessors.
(sh_frob_section): Remove bogus symbol canonicalization.
* config/tc-tic54x.c: Don't #include struc-symbol.h.
(tic54x_bss): Use symbol accessors.
* config/tc-tilegx.c: Don't #include struc-symbol.h.
(emit_tilegx_instruction, tilegx_parse_name): Use symbol accessors.
* config/tc-tilepro.c: Don't #include struc-symbol.h.
(emit_tilepro_instruction, tilepro_parse_name): Use accessors.
* config/tc-xtensa.c: Don't #include struc-symbol.h.
(xg_assemble_vliw_tokens): Use symbol accessors.
(xg_order_trampoline_chain): Likewise.
* ehopt.c: Don't #include struc-symbol.h.
(check_eh_frame): Correct local symbol test. Use symbol accessors.
* write.c: Don't #include struc-symbol.h.
(create_note_reloc, maybe_generate_build_notes): Use symbol accessors.
* Makefile.in: Regenerate.
* po/POTFILES.in: Regenerate.
|
|
binutils on upstream!
We have not only removed all unsupported and obsolete code, but also supported lost of new features,
including better link-time relaxations and TLS implementations. Besides, the files generated by the
newly assembler and linker usually get higher performance and more optimized code size.
ld * emultempl/nds32elf.em (hyper_relax): New variable.
(nds32_elf_create_output_section_statements):
the parameters of bfd_elf32_nds32_set_target_option
(PARSE_AND_LIST_PROLOGUE, PARSE_AND_LIST_OPTIONS,
PARSE_AND_LIST_ARGS_CASES): Add new option --mhyper-relax.
* emultempl/nds32elf.em (nds32_elf_after_open): Updated.
* emultempl/nds32elf.em (tls_desc_trampoline): New variable.
* (nds32_elf_create_output_section_statements): Updated.
* (nds32_elf_after_parse): Disable relaxations when PIC is enable.
* (PARSE_AND_LIST_PROLOGUE, PARSE_AND_LIST_OPTIONS,
PARSE_AND_LIST_ARGS_CASES): Add new option --m[no-]tlsdesc-trampoline.
include * elf/nds32.h: Remove the unused target features.
* dis-asm.h (disassemble_init_nds32): Declared.
* elf/nds32.h (E_NDS32_NULL): Removed.
(E_NDS32_HAS_DSP_INST, E_NDS32_HAS_ZOL): New.
* opcode/nds32.h: Ident.
(N32_SUB6, INSN_LW): New macros.
(enum n32_opcodes): Updated.
* elf/nds32.h: Doc fixes.
* elf/nds32.h: Add R_NDS32_LSI.
* elf/nds32.h: Add new relocations for TLS.
gas * config/tc-nds32.c: Remove the unused target features.
(nds32_relax_relocs, md_pseudo_table, nds32_elf_record_fixup_exp,
nds32_set_elf_flags_by_insn, nds32_insert_relax_entry,
nds32_apply_fix): Likewise.
(nds32_no_ex9_begin): Removed.
* config/tc-nds32.c (add_mapping_symbol_for_align,
make_mapping_symbol, add_mapping_symbol): New functions.
* config/tc-nds32.h (enum mstate): New.
(nds32_segment_info_type): Likewise.
* configure.ac (--enable-dsp-ext, --enable-zol-ext): New options.
* config.in: Regenerated.
* configure: Regenerated.
* config/tc-nds32.c (nds32_dx_regs):
Set the value according to the configuration.
(nds32_perf_ext, nds32_perf_ext2, nds32_string_ext, nds32_audio_ext):
Likewise.
(nds32_dsp_ext): New variable. Set the value according to the
configuration.
(nds32_zol_ext): Likewise.
(asm_desc, nds32_pseudo_opcode_table): Make them static.
(nds32_set_elf_flags_by_insn): Updated.
(nds32_check_insn_available): Updated.
(nds32_str_tolower): New function.
* config/tc-nds32.c (relax_table): Updated.
(md_begin): Updated.
(md_assemble): Use XNEW macro to allocate space for `insn.info',
and then remember to free it.
(md_section_align): Cast (-1) to ValueT.
(nds32_get_align): Cast (~0U) to addressT.
(nds32_relax_branch_instructions): Updated.
(md_convert_frag): Add new local variable `final_r_type'.
(invalid_prev_frag): Add new bfd_boolean parameter `relax'.
All callers changed.
* config/tc-nds32.c (struct nds32_relocs_pattern): Add `insn' field.
(struct nds32_hint_map): Add `option_list' field.
(struct suffix_name, suffix_table): Remove the unused `pic' field.
(do_pseudo_b, do_pseudo_bal): Remove the suffix checking.
(do_pseudo_la_internal, do_pseudo_pushpopm): Indent.
(relax_hint_bias, relax_hint_id_current): New static variables.
(reset_bias, relax_hint_begin): New variables.
(nds_itoa): New function.
(CLEAN_REG, GET_OPCODE): New macros.
(struct relax_hint_id): New.
(nds32_relax_hint): For .relax_hint directive, we can use `begin'
and `end' to mark the relax pattern without giving exactly id number.
(nds32_elf_append_relax_relocs): Handle the case that the .relax_hint
directives are attached to pseudo instruction.
(nds32_elf_save_pseudo_pattern): Change the second parameter from
instruction's opcode to byte code.
(nds32_elf_build_relax_relation): Add new bfd_boolean parameter
`pseudo_hint'.
(nds32_lookup_pseudo_opcode): Fix the overflow issue.
(enum nds32_insn_type): Add N32_RELAX_ALU1 and N32_RELAX_16BIT.
(nds32_elf_record_fixup_exp, relax_ls_table, hint_map,
nds32_find_reloc_table, nds32_match_hint_insn, nds32_parse_name):
Updated.
* config/tc-nds32.h (MAX_RELAX_NUM): Extend it to 6.
(enum nds32_relax_hint_type): Merge NDS32_RELAX_HINT_LA and
NDS32_RELAX_HINT_LS into NDS32_RELAX_HINT_LALS. Add
NDS32_RELAX_HINT_LA_PLT, NDS32_RELAX_HINT_LA_GOT and
NDS32_RELAX_HINT_LA_GOTOFF.
* config/tc-nds32.h (relax_ls_table): Add floating load/store
to gp relax pattern.
(hint_map, nds32_find_reloc_table): Likewise.
* configure.ac: Define NDS32_LINUX_TOOLCHAIN.
* configure: Regenerated.
* config.in: Regenerated.
* config/tc-nds32.h (enum nds32_ramp): Updated.
(enum nds32_relax_hint_type): Likewise.
* config/tc-nds32.c: Include "errno.h" and "limits.h".
(relax_ls_table): Add TLS relax patterns.
(nds32_elf_append_relax_relocs): Attach BFD_RELOC_NDS32_GROUP on
each instructions of TLS patterns.
(nds32_elf_record_fixup_exp): Updated.
(nds32_apply_fix): Likewise.
(suffix_table): Add TLSDESC suffix.
binutils* testsuite/binutils-all/objcopy.exp: Set the unsupported reloc number
from 215 to 255 for NDS32.
bfd * elf32-nds32.c (nds32_elf_relax_loadstore):
Remove the unused target features.
(bfd_elf32_nds32_set_target_option): Remove the unused parameters.
(nds32_elf_relax_piclo12, nds32_elf_relax_letlslo12,
nds32_elf_relax_letlsadd, nds32_elf_relax_letlsls,
nds32_elf_relax_pltgot_suff, nds32_elf_relax_got_suff
nds32_elf_relax_gotoff_suff, calculate_plt_memory_address,
calculate_plt_offset, calculate_got_memory_address,
nds32_elf_check_dup_relocs): Removed.
All callers changed.
* elf32-nds32.h: Remove the unused macros and defines.
(elf_nds32_link_hash_table): Remove the unused variable.
(bfd_elf32_nds32_set_target_option): Update prototype.
(nds32_elf_ex9_init): Removed.
* elf32-nds32.c (nds32_convert_32_to_16): Updated.
* elf32-nds32.c (HOWTO2, HOWTO3): Define new HOWTO macros
to initialize array nds32_elf_howto_table in any order
without lots of EMPTY_HOWTO.
(nds32_reloc_map): Updated.
* reloc.c: Add BFD_RELOC_NDS32_LSI.
* bfd-in2.h: Regenerated.
* bfd/libbfd.h: Regenerated.
* elf32-nds32.c (nds32_elf_relax_howto_table): Add R_NDS32_LSI.
(nds32_reloc_map): Likewise.
(nds32_elf_relax_flsi): New function.
(nds32_elf_relax_section): Support floating load/store relaxation.
* elf32-nds32.c (NDS32_GUARD_SEC_P, elf32_nds32_local_gp_offset):
New macro.
(struct elf_nds32_link_hash_entry): New `offset_to_gp' field.
(struct elf_nds32_obj_tdata): New `offset_to_gp' and `hdr_size' fields.
(elf32_nds32_allocate_local_sym_info, nds32_elf_relax_guard,
nds32_elf_is_target_special_symbol, nds32_elf_maybe_function_sym):
New functions.
(nds32_info_to_howto_rel): Add BFD_ASSERT.
(bfd_elf32_bfd_reloc_type_table_lookup, nds32_elf_link_hash_newfunc,
nds32_elf_link_hash_table_create, nds32_elf_relocate_section,
nds32_elf_relax_loadstore, nds32_elf_relax_lo12, nds32_relax_adjust_label,
bfd_elf32_nds32_set_target_option, nds32_fag_mark_relax): Updated.
(nds32_elf_final_sda_base): Improve it to find the better gp value.
(insert_nds32_elf_blank): Must consider `len' when inserting blanks.
* elf32-nds32.h (bfd_elf32_nds32_set_target_option): Update prototype.
(struct elf_nds32_link_hash_table): Add new variable `hyper_relax'.
* elf32-nds32.c (elf32_nds32_allocate_dynrelocs): New function.
(create_got_section): Likewise.
(allocate_dynrelocs, nds32_elf_size_dynamic_sections,
nds32_elf_relocate_section, nds32_elf_finish_dynamic_symbol): Updated.
(nds32_elf_check_relocs): Fix the issue that the shared library may
has TEXTREL entry in the dynamic section.
(nds32_elf_create_dynamic_sections): Enable to call readonly_dynrelocs
since the TEXTREL issue is fixed in the nds32_elf_check_relocs.
(nds32_elf_finish_dynamic_sections): Update and add DT_RELASZ
dynamic entry.
(calculate_offset): Remove the unused parameter `pic_ext_target' and
related codes.
All callers changed.
(elf_backend_dtrel_excludes_plt): Disable it temporarily since it
will cause some errors for our test cases.
* elf32-nds32.c (nds32_elf_merge_private_bfd_data): Allow to link the
generic object.
* reloc.c: Add TLS relocations.
* libbfd.h: Regenerated.
* bfd-in2.h: Regenerated.
* elf32-nds32.h (struct section_id_list_t): New.
(elf32_nds32_lookup_section_id, elf32_nds32_check_relax_group,
elf32_nds32_unify_relax_group, nds32_elf_unify_tls_model):
New prototypes.
(elf32_nds32_compute_jump_table_size, elf32_nds32_local_tlsdesc_gotent):
New macro.
(nds32_insertion_sort, bfd_elf32_nds32_set_target_option,
elf_nds32_link_hash_table): Updated.
* elf32-nds32.c (enum elf_nds32_tls_type): New.
(struct elf32_nds32_relax_group_t, struct relax_group_list_t): New.
(elf32_nds32_add_dynreloc, patch_tls_desc_to_ie, get_tls_type,
fls, ones32, list_insert, list_insert_sibling, dump_chain,
elf32_nds32_check_relax_group, elf32_nds32_lookup_section_id,
elf32_nds32_unify_relax_group, nds32_elf_unify_tls_model): New functions.
(elf_nds32_obj_tdata): Add new fields.
(elf32_nds32_relax_group_ptr, nds32_elf_local_tlsdesc_gotent): New macros.
(nds32_elf_howto_table): Add TLS relocations.
(nds32_reloc_map): Likewise.
(nds32_elf_copy_indirect_symbol, nds32_elf_size_dynamic_sections,
nds32_elf_finish_dynamic_symbol, elf32_nds32_allocate_local_sym_info,
nds32_elf_relocate_section, bfd_elf32_nds32_set_target_option,
nds32_elf_check_relocs, allocate_dynrelocs): Updated.
(nds32_elf_relax_section): Call nds32_elf_unify_tls_model.
(dtpoff_base): Rename it to `gottpof' and then update it.
opcodes * nds32-asm.c (operand_fields): Remove the unused fields.
(nds32_opcodes): Remove the unused instructions.
* nds32-dis.c (nds32_ex9_info): Removed.
(nds32_parse_opcode): Updated.
(print_insn_nds32): Likewise.
* nds32-asm.c (config.h, stdlib.h, string.h): New includes.
(LEX_SET_FIELD, LEX_GET_FIELD): Update defines.
(nds32_asm_init, build_operand_hash_table, build_keyword_hash_table,
build_opcode_hash_table): New functions.
(nds32_keyword_table, nds32_keyword_count_table, nds32_field_table,
nds32_opcode_table): New.
(hw_ktabs): Declare it to a pointer rather than an array.
(build_hash_table): Removed.
* nds32-asm.h (enum): Add SYN_INPUT, SYN_OUTPUT, SYN_LOPT,
SYN_ROPT and upadte HW_GPR and HW_INT.
* nds32-dis.c (keywords): Remove const.
(match_field): New function.
(nds32_parse_opcode): Updated.
* disassemble.c (disassemble_init_for_target):
Add disassemble_init_nds32.
* nds32-dis.c (eum map_type): New.
(nds32_private_data): Likewise.
(get_mapping_symbol_type, is_mapping_symbol, nds32_symbol_is_valid,
nds32_add_opcode_hash_table, disassemble_init_nds32): New functions.
(print_insn_nds32): Updated.
* nds32-asm.c (parse_aext_reg): Add new parameter.
(parse_re, parse_re2, parse_aext_reg): Only reduced registers
are allowed to use.
All callers changed.
* nds32-asm.c (keyword_usr, keyword_sr): Updated.
(operand_fields): Add new fields.
(nds32_opcodes): Add new instructions.
(keyword_aridxi_mx): New keyword.
* nds32-asm.h (enum): Add NASM_ATTR_DSP_ISAEXT, HW_AEXT_ARIDXI_MX
and NASM_ATTR_ZOL.
(ALU2_1, ALU2_2, ALU2_3): New macros.
* nds32-dis.c (nds32_filter_unknown_insn): Updated.
|
|
Remove `-Wshadow' compilation errors:
cc1: warnings being treated as errors
.../gas/config/tc-nds32.c: In function 'md_assemble':
.../gas/config/tc-nds32.c:5212: error: declaration of 'expr' shadows a global declaration
.../gas/expr.h:180: error: shadowed declaration is here
make[4]: *** [tc-nds32.o] Error 1
which for versions of GCC before 4.8 prevent support for NDS32 targets
from being built. See also GCC PR c/53066.
gas/
* tc-nds32.c (md_assemble): Rename `expr' local variable to
`insn_expr'.
|
|
|
|
|
|
PR gas/21072
* asintl.h: Fix spelling mistakes and typos.
* atof-generic.c: Likewise.
* bit_fix.h: Likewise.
* config/atof-ieee.c: Likewise.
* config/bfin-defs.h: Likewise.
* config/bfin-parse.y: Likewise.
* config/obj-coff-seh.h: Likewise.
* config/obj-coff.c: Likewise.
* config/obj-evax.c: Likewise.
* config/obj-macho.c: Likewise.
* config/rx-parse.y: Likewise.
* config/tc-aarch64.c: Likewise.
* config/tc-alpha.c: Likewise.
* config/tc-arc.c: Likewise.
* config/tc-arm.c: Likewise.
* config/tc-avr.c: Likewise.
* config/tc-bfin.c: Likewise.
* config/tc-cr16.c: Likewise.
* config/tc-cris.c: Likewise.
* config/tc-crx.c: Likewise.
* config/tc-d10v.c: Likewise.
* config/tc-d30v.c: Likewise.
* config/tc-dlx.c: Likewise.
* config/tc-epiphany.c: Likewise.
* config/tc-frv.c: Likewise.
* config/tc-hppa.c: Likewise.
* config/tc-i370.c: Likewise.
* config/tc-i386-intel.c: Likewise.
* config/tc-i386.c: Likewise.
* config/tc-i960.c: Likewise.
* config/tc-ia64.c: Likewise.
* config/tc-m32r.c: Likewise.
* config/tc-m68hc11.c: Likewise.
* config/tc-m68k.c: Likewise.
* config/tc-mcore.c: Likewise.
* config/tc-mep.c: Likewise.
* config/tc-mep.h: Likewise.
* config/tc-metag.c: Likewise.
* config/tc-microblaze.c: Likewise.
* config/tc-mips.c: Likewise.
* config/tc-mmix.c: Likewise.
* config/tc-mn10200.c: Likewise.
* config/tc-mn10300.c: Likewise.
* config/tc-msp430.c: Likewise.
* config/tc-msp430.h: Likewise.
* config/tc-nds32.c: Likewise.
* config/tc-nds32.h: Likewise.
* config/tc-nios2.c: Likewise.
* config/tc-nios2.h: Likewise.
* config/tc-ns32k.c: Likewise.
* config/tc-pdp11.c: Likewise.
* config/tc-ppc.c: Likewise.
* config/tc-pru.c: Likewise.
* config/tc-rx.c: Likewise.
* config/tc-s390.c: Likewise.
* config/tc-score.c: Likewise.
* config/tc-score7.c: Likewise.
* config/tc-sh.c: Likewise.
* config/tc-sh64.c: Likewise.
* config/tc-sparc.c: Likewise.
* config/tc-tic4x.c: Likewise.
* config/tc-tic54x.c: Likewise.
* config/tc-v850.c: Likewise.
* config/tc-vax.c: Likewise.
* config/tc-visium.c: Likewise.
* config/tc-xgate.c: Likewise.
* config/tc-xtensa.c: Likewise.
* config/tc-z80.c: Likewise.
* config/tc-z8k.c: Likewise.
* config/te-vms.c: Likewise.
* config/xtensa-relax.c: Likewise.
* doc/as.texinfo: Likewise.
* doc/c-arm.texi: Likewise.
* doc/c-hppa.texi: Likewise.
* doc/c-i370.texi: Likewise.
* doc/c-i386.texi: Likewise.
* doc/c-m32r.texi: Likewise.
* doc/c-m68k.texi: Likewise.
* doc/c-mmix.texi: Likewise.
* doc/c-msp430.texi: Likewise.
* doc/c-nds32.texi: Likewise.
* doc/c-ns32k.texi: Likewise.
* doc/c-riscv.texi: Likewise.
* doc/c-rx.texi: Likewise.
* doc/c-s390.texi: Likewise.
* doc/c-tic6x.texi: Likewise.
* doc/c-tilegx.texi: Likewise.
* doc/c-tilepro.texi: Likewise.
* doc/c-v850.texi: Likewise.
* doc/c-xgate.texi: Likewise.
* doc/c-xtensa.texi: Likewise.
* dwarf2dbg.c: Likewise.
* ecoff.c: Likewise.
* itbl-ops.c: Likewise.
* listing.c: Likewise.
* macro.c: Likewise.
* po/gas.pot: Likewise.
* read.c: Likewise.
* struc-symbol.h: Likewise.
* symbols.h: Likewise.
* testsuite/gas/arc/relocs-errors.err: Likewise.
* write.c: Likewise.
|
|
|
|
* as.h: Fix spelling in comments.
* config/obj-ecoff.c: Fix spelling in comments.
* config/obj-macho.c: Fix spelling in comments.
* config/tc-aarch64.c: Fix spelling in comments.
* config/tc-arc.c: Fix spelling in comments.
* config/tc-arm.c: Fix spelling in comments.
* config/tc-avr.c: Fix spelling in comments.
* config/tc-cr16.c: Fix spelling in comments.
* config/tc-epiphany.c: Fix spelling in comments.
* config/tc-frv.c: Fix spelling in comments.
* config/tc-hppa.c: Fix spelling in comments.
* config/tc-hppa.h: Fix spelling in comments.
* config/tc-i370.c: Fix spelling in comments.
* config/tc-m68hc11.c: Fix spelling in comments.
* config/tc-m68k.c: Fix spelling in comments.
* config/tc-mcore.c: Fix spelling in comments.
* config/tc-mep.c: Fix spelling in comments.
* config/tc-metag.c: Fix spelling in comments.
* config/tc-mips.c: Fix spelling in comments.
* config/tc-mn10200.c: Fix spelling in comments.
* config/tc-mn10300.c: Fix spelling in comments.
* config/tc-nds32.c: Fix spelling in comments.
* config/tc-nios2.c: Fix spelling in comments.
* config/tc-ns32k.c: Fix spelling in comments.
* config/tc-pdp11.c: Fix spelling in comments.
* config/tc-ppc.c: Fix spelling in comments.
* config/tc-riscv.c: Fix spelling in comments.
* config/tc-rx.c: Fix spelling in comments.
* config/tc-score.c: Fix spelling in comments.
* config/tc-score7.c: Fix spelling in comments.
* config/tc-sparc.c: Fix spelling in comments.
* config/tc-tic54x.c: Fix spelling in comments.
* config/tc-vax.c: Fix spelling in comments.
* config/tc-xgate.h: Fix spelling in comments.
* config/tc-xtensa.c: Fix spelling in comments.
* config/tc-z80.c: Fix spelling in comments.
* dwarf2dbg.c: Fix spelling in comments.
* input-file.h: Fix spelling in comments.
* itbl-ops.c: Fix spelling in comments.
* read.c: Fix spelling in comments.
* stabs.c: Fix spelling in comments.
* symbols.c: Fix spelling in comments.
* write.c: Fix spelling in comments.
* testsuite/gas/all/itbl-test.c: Fix spelling in comments.
* testsuite/gas/tic4x/opclasses.h: Fix spelling in comments.
|
|
Well, not all are errors, but a little more substantive than just
fiddling with comments.
bfd/
* coffcode.h (coff_slurp_symbol_table): Revert accidental commit
made 2015-01-08.
* elf32-nds32.c (nds32_elf_grok_psinfo): Add missing break.
* reloc.c (bfd_default_reloc_type_lookup): Add missing breaks.
opcodes/
* arc-ext.c (create_map): Add missing break.
* msp430-decode.opc (encode_as): Likewise.
* msp430-decode.c: Regenerate.
binutils/
* coffdump.c (dump_coff_where): Add missing break.
* stabs.c (stab_xcoff_builtin_type): Likewise.
gas/
* config/tc-arc.c (find_opcode_match): Add missing break.
* config/tc-i960.c (get_cdisp): Likewise.
* config/tc-metag.c (parse_swap, md_apply_fix): Likewise.
* config/tc-mt.c (md_parse_option): Likewise.
* config/tc-nds32.c (nds32_apply_fix): Likewise.
* config/tc-hppa.c (pa_ip): Assert rather than testing last
condition of multiple if statements.
* config/tc-s390.c (s390_exp_compare): Return 0 on error.
* config/tc-tic4x.c (tic4x_operand_parse): Add as_bad and break
out of case rather than falling into next case. Formatting.
ld/
* plugin.c (asymbol_from_plugin_symbol): Avoid compiler warning
by adding return.
|
|
It can be initialized with values greater than 0x80000000, which don't fit in a
signed int. Further it appears to be used as a set of bit flags where unsigned
int is more typical.
gas/ChangeLog:
2016-07-19 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
* config/tc-nds32.c (struct nds32_pseudo_opcode): Make pseudo_val
unsigned int.
(do_pseudo_b): Adjust.
(do_pseudo_bal): Likewise.
(do_pseudo_bge): Likewise.
(do_pseudo_bges): Likewise.
(do_pseudo_bgt): Likewise.
(do_pseudo_bgts): Likewise.
(do_pseudo_ble): Likewise.
(do_pseudo_bles): Likewise.
(do_pseudo_blt): Likewise.
(do_pseudo_blts): Likewise.
(do_pseudo_br): Likewise.
(do_pseudo_bral): Likewise.
(do_pseudo_la): Likewise.
(do_pseudo_li): Likewise.
(do_pseudo_ls_bhw): Likewise.
(do_pseudo_ls_bhwp): Likewise.
(do_pseudo_ls_bhwpc): Likewise.
(do_pseudo_ls_bhwi): Likewise.
(do_pseudo_move): Likewise.
(do_pseudo_neg): Likewise.
(do_pseudo_not): Likewise.
(do_pseudo_pushpopm): Likewise.
(do_pseudo_pushpop): Likewise.
(do_pseudo_v3push): Likewise.
(do_pseudo_v3pop): Likewise.
(do_pseudo_pushpop_stack): Likewise.
(do_pseudo_push_bhwd): Likewise.
(do_pseudo_pop_bhwd): Likewise.
(do_pseudo_pusha): Likewise.
(do_pseudo_pushi): Likewise.
|
|
gas/ChangeLog:
2016-06-27 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
* config/tc-nds32.c (md_begin): Use ARRAY_SIZE instead of a sentinal
element in relax_table.
|
|
gas * config/tc-nds32.c (nds32_get_align): Avoid left shifting a
signed constant.
|
|
it points to the result of strchr on a const char *, so it aliases
something that is const. Further its only passed to a function that expects a
const char *, so there's no reason for it to not be const.
gas/ChangeLog:
2016-06-05 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
* config/tc-nds32.c (nds32_parse_option): Make the type of ptr_arg
const char *.
|
|
Its a bit shorter and simpler than raw xmalloc.
gas/ChangeLog:
2016-05-13 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
* app.c (app_push): Use XNEW and related macros.
* as.c (parse_args): Likewise.
* cgen.c (make_right_shifted_expr): Likewise.
(gas_cgen_tc_gen_reloc): Likewise.
* config/bfin-defs.h: Likewise.
* config/bfin-parse.y: Likewise.
* config/obj-coff.c (stack_init): Likewise.
(stack_push): Likewise.
(coff_obj_symbol_new_hook): Likewise.
(coff_obj_symbol_clone_hook): Likewise.
(add_lineno): Likewise.
(coff_frob_symbol): Likewise.
* config/obj-elf.c (obj_elf_section_name): Likewise.
(build_group_lists): Likewise.
* config/obj-evax.c (evax_symbol_new_hook): Likewise.
* config/obj-macho.c (obj_mach_o_indirect_symbol): Likewise.
* config/tc-aarch64.c (insert_reg_alias): Likewise.
(find_or_make_literal_pool): Likewise.
(add_to_lit_pool): Likewise.
(fill_instruction_hash_table): Likewise.
* config/tc-alpha.c (load_expression): Likewise.
(emit_jsrjmp): Likewise.
(s_alpha_ent): Likewise.
(s_alpha_end): Likewise.
(s_alpha_linkage): Likewise.
(md_begin): Likewise.
(tc_gen_reloc): Likewise.
* config/tc-arc.c (arc_insert_opcode): Likewise.
(arc_extcorereg): Likewise.
* config/tc-bfin.c: Likewise.
* config/tc-cr16.c: Likewise.
* config/tc-cris.c: Likewise.
* config/tc-crx.c (preprocess_reglist): Likewise.
* config/tc-d10v.c: Likewise.
* config/tc-frv.c (frv_insert_vliw_insn): Likewise.
(frv_tomcat_shuffle): Likewise.
* config/tc-h8300.c: Likewise.
* config/tc-i370.c (i370_macro): Likewise.
* config/tc-i386.c (lex_got): Likewise.
(md_parse_option): Likewise.
* config/tc-ia64.c (alloc_record): Likewise.
(set_imask): Likewise.
(save_prologue_count): Likewise.
(dot_proc): Likewise.
(dot_endp): Likewise.
(ia64_frob_label): Likewise.
(add_qp_imply): Likewise.
(add_qp_mutex): Likewise.
(mark_resource): Likewise.
(dot_alias): Likewise.
* config/tc-m68hc11.c: Likewise.
* config/tc-m68k.c (m68k_frob_label): Likewise.
(s_save): Likewise.
(mri_control_label): Likewise.
(push_mri_control): Likewise.
(build_mri_control_operand): Likewise.
(s_mri_else): Likewise.
(s_mri_break): Likewise.
(s_mri_next): Likewise.
(s_mri_for): Likewise.
(s_mri_endw): Likewise.
* config/tc-metag.c (create_mnemonic_htab): Likewise.
* config/tc-microblaze.c: Likewise.
* config/tc-mmix.c (s_loc): Likewise.
* config/tc-nds32.c (nds32_relax_hint): Likewise.
* config/tc-nios2.c (nios2_insn_reloc_new): Likewise.
* config/tc-rl78.c: Likewise.
* config/tc-rx.c (rx_include): Likewise.
* config/tc-sh.c: Likewise.
* config/tc-sh64.c (shmedia_frob_section_type): Likewise.
* config/tc-sparc.c: Likewise.
* config/tc-spu.c: Likewise.
* config/tc-tic6x.c (static tic6x_unwind_info *tic6x_get_unwind): Likewise.
(tic6x_start_unwind_section): Likewise.
* config/tc-tilegx.c: Likewise.
* config/tc-tilepro.c: Likewise.
* config/tc-v850.c: Likewise.
* config/tc-visium.c: Likewise.
* config/tc-xgate.c: Likewise.
* config/tc-xtensa.c (xtensa_translate_old_userreg_ops): Likewise.
(new_resource_table): Likewise.
(resize_resource_table): Likewise.
(xtensa_create_trampoline_frag): Likewise.
(xtensa_maybe_create_literal_pool_frag): Likewise.
(cache_literal_section): Likewise.
* config/xtensa-relax.c (append_transition): Likewise.
(append_condition): Likewise.
(append_value_condition): Likewise.
(append_constant_value_condition): Likewise.
(append_literal_op): Likewise.
(append_label_op): Likewise.
(append_constant_op): Likewise.
(append_field_op): Likewise.
(append_user_fn_field_op): Likewise.
(enter_opname_n): Likewise.
(enter_opname): Likewise.
(split_string): Likewise.
(parse_insn_templ): Likewise.
(clone_req_or_option_list): Likewise.
(clone_req_option_list): Likewise.
(parse_option_cond): Likewise.
(parse_insn_pattern): Likewise.
(parse_insn_repl): Likewise.
(build_transition): Likewise.
(build_transition_table): Likewise.
* dw2gencfi.c (alloc_fde_entry): Likewise.
(alloc_cfi_insn_data): Likewise.
(cfi_add_CFA_remember_state): Likewise.
(dot_cfi_escape): Likewise.
(dot_cfi_fde_data): Likewise.
(select_cie_for_fde): Likewise.
* dwarf2dbg.c (dwarf2_directive_loc): Likewise.
* ecoff.c (ecoff_add_bytes): Likewise.
(ecoff_build_debug): Likewise.
* input-scrub.c (input_scrub_push): Likewise.
(input_scrub_begin): Likewise.
(input_scrub_next_buffer): Likewise.
* itbl-ops.c (append_insns_as_macros): Likewise.
(alloc_entry): Likewise.
(alloc_field): Likewise.
* listing.c (listing_newline): Likewise.
(listing_listing): Likewise.
* macro.c (get_any_string): Likewise.
(delete_macro): Likewise.
* stabs.c (generate_asm_file): Likewise.
(stabs_generate_asm_lineno): Likewise.
* subsegs.c (subseg_change): Likewise.
(subseg_get): Likewise.
* symbols.c (define_dollar_label): Likewise.
(symbol_relc_make_sym): Likewise.
* write.c (write_relocs): Likewise.
|
|
gas/ChangeLog:
2016-04-03 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
* app.c (app_push): use XNEW macro.
* as.c: Likewise.
* config/obj-elf.c (obj_elf_change_section): Likewise.
(elf_copy_symbol_attributes): Likewise.
(obj_elf_size): Likewise.
(build_group_lists): Likewise.
* config/tc-aarch64.c (add_operand_error_record): Likewise.
(md_assemble): Likewise.
(tc_gen_reloc): Likewise.
(get_upper_str): Likewise.
(aarch64_parse_features): Likewise.
* config/tc-arm.c (insert_reg_alias): Likewise.
(insert_neon_reg_alias): Likewise.
(find_or_make_literal_pool): Likewise.
(s_arm_elf_cons): Likewise.
(add_unwind_opcode): Likewise.
(arm_parse_extension): Likewise.
* config/tc-avr.c (create_record_for_frag): Likewise.
* config/tc-crx.c: Likewise.
* config/tc-d30v.c: Likewise.
* config/tc-dlx.c (s_proc): Likewise.
* config/tc-ft32.c: Likewise.
* config/tc-h8300.c: Likewise.
* config/tc-hppa.c (pa_proc): Likewise.
(create_new_space): Likewise.
(create_new_subspace): Likewise.
* config/tc-i860.c: Likewise.
* config/tc-i960.c: Likewise.
* config/tc-ia64.c: Likewise.
* config/tc-iq2000.c (iq2000_add_macro): Likewise.
(iq2000_record_hi16): Likewise.
* config/tc-m32c.c (m32c_indirect_operand): Likewise.
* config/tc-m32r.c (debug_sym): Likewise.
(m32r_record_hi16): Likewise.
* config/tc-m68k.c (m68k_ip): Likewise.
(md_begin): Likewise.
* config/tc-mcore.c: Likewise.
* config/tc-microblaze.c (check_got): Likewise.
* config/tc-mips.c (append_insn): Likewise.
(s_mipsset): Likewise.
(mips_record_label): Likewise.
(s_mips_end): Likewise.
* config/tc-mmix.c (mmix_frob_file): Likewise.
* config/tc-mn10200.c: Likewise.
* config/tc-mn10300.c: Likewise.
* config/tc-moxie.c: Likewise.
* config/tc-msp430.c: Likewise.
* config/tc-nds32.c (nds32_elf_save_pseudo_pattern): Likewise.
* config/tc-ns32k.c: Likewise.
* config/tc-or1k.c: Likewise.
* config/tc-pdp11.c: Likewise.
* config/tc-pj.c (fake_opcode): Likewise.
* config/tc-ppc.c (ppc_apuinfo_section_add): Likewise.
(ppc_macro): Likewise.
(ppc_dwsect): Likewise.
(ppc_machine): Likewise.
* config/tc-rl78.c (rl78_frag_init): Likewise.
* config/tc-rx.c (rx_frag_init): Likewise.
* config/tc-s390.c (s390_lit_suffix): Likewise.
(s390_machine): Likewise.
(s390_machinemode): Likewise.
* config/tc-score.c (s3_insert_reg): Likewise.
(s3_gen_reloc): Likewise.
* config/tc-score7.c (s7_insert_reg): Likewise.
(s7_gen_reloc): Likewise.
* config/tc-tic30.c (tic30_operand): Likewise.
* config/tc-tic4x.c (tic4x_inst_make): Likewise.
* config/tc-tic54x.c (stag_add_field): Likewise.
(tic54x_struct): Likewise.
(tic54x_space): Likewise.
(tic54x_field): Likewise.
(tic54x_mlib): Likewise.
(subsym_substitute): Likewise.
* config/tc-tic6x.c (tic6x_frob_label): Likewise.
* config/tc-vax.c: Likewise.
* config/tc-xc16x.c: Likewise.
* config/tc-xtensa.c (xtensa_add_insn_label): Likewise.
(directive_push): Likewise.
(xtensa_begin_directive): Likewise.
(tokenize_arguments): Likewise.
(xtensa_add_literal_sym): Likewise.
(new_resource_table): Likewise.
(resize_resource_table): Likewise.
(emit_single_op): Likewise.
(xtensa_create_trampoline_frag): Likewise.
(xtensa_maybe_create_literal_pool_frag): Likewise.
(xtensa_add_config_info): Likewise.
(xtensa_realloc_fixup_cache): Likewise.
(add_subseg_info): Likewise.
(cache_literal_section): Likewise.
(add_xt_block_frags): Likewise.
(add_xt_prop_frags): Likewise.
(init_op_placement_info_table): Likewise.
(build_section_rename): Likewise.
* config/tc-z80.c: Likewise.
* config/tc-z8k.c: Likewise.
* depend.c (register_dependency): Likewise.
* dwarf2dbg.c (get_line_subseg): Likewise.
(dwarf2_gen_line_info_1): Likewise.
(get_filenum): Likewise.
* ecoff.c (allocate_scope): Likewise.
(allocate_vlinks): Likewise.
(allocate_shash): Likewise.
(allocate_thash): Likewise.
(allocate_tag): Likewise.
(allocate_forward): Likewise.
(allocate_thead): Likewise.
(allocate_lineno_list): Likewise.
* expr.c (make_expr_symbol): Likewise.
* hash.c (hash_new_sized): Likewise.
* input-file.c (input_file_push): Likewise.
* listing.c (file_info): Likewise.
(listing_newline): Likewise.
* macro.c (new_formal): Likewise.
(define_macro): Likewise.
* remap.c (add_debug_prefix_map): Likewise.
* symbols.c (symbol_find_noref): Likewise.
(define_dollar_label): Likewise.
(fb_label_instance_inc): Likewise.
(symbol_relc_make_value): Likewise.
|
|
* cgen.c (weak_operand_overflow_check): Return const char*.
* messages.c (as_internal_value_out_of_range): Formatting.
(as_warn_value_out_of_range): Consify prefix param.
(as_bad_value_out_of_range): Likewise.
* read.c (s_errwarn): Constify msg..
(s_float_space, float_cons): ..and err.
* as.h (as_warn_value_out_of_range, as_bad_value_out_of_range,
ieee_md_atof, vax_md_atof): Update prototypes.
* tc.h (md_atof): Update prototype.
* config/atof-ieee.c (ieee_md_atof): Return const char*.
* config/atof-vax.c (vax_md_atof): Likewise.
* config/obj-elf.c (obj_elf_parse_section_letters): Constify bad_msg.
* config/tc-aarch64.c (md_atof): Return const char*.
* config/tc-alpha.c (s_alpha_section_name): Likewise.
(s_alpha_comm): Constify sec_name.
(section_name): Constify.
(s_alpha_section): Consify name..
(alpha_elf_section_letter): ..and ptr_msg param..
(md_atof): ..and return.
* config/tc-alpha.h (alpha_elf_section_letter): Update prototype.
* config/tc-arc.c (md_atof): Return const char*.
* config/tc-arm.c (md_atof): Likewise.
* config/tc-avr.c (md_atof): Likewise.
* config/tc-bfin.c (md_atof): Likewise.
* config/tc-cr16.c (md_atof): Likewise.
* config/tc-cris.c (md_atof): Likewise.
* config/tc-crx.c (md_atof): Likewise.
* config/tc-d10v.c (md_atof): Likewise.
* config/tc-d30v.c (md_atof): Likewise.
* config/tc-dlx.c (md_atof): Likewise.
* config/tc-epiphany.c (md_atof): Likewise.
* config/tc-fr30.c (md_atof): Likewise.
* config/tc-frv.c (md_atof): Likewise.
* config/tc-ft32.c (md_atof): Likewise.
* config/tc-h8300.c (md_atof): Likewise.
* config/tc-hppa.c (struct default_subspace_dict): Constify name.
(struct default_space_dict): Likewise.
(create_new_space): Constify name param.
(create_new_subspace): Likewise.
(is_defined_space, is_defined_subspace): Likewise.
(pa_parse_space_stmt): Constify space_name param.
(md_atof): Return const char*.
(pa_spaces_begin): Constify name.
* config/tc-i370.c (md_atof): Return const char*.
* config/tc-i386.c (md_atof): Likewise.
(x86_64_section_letter): Constify ptr_msg param.
* config/tc-i386.h (x86_64_section_letter): Update prototype.
* config/tc-i860.c (struct i860_it): Constify error.
(md_atof): Return const char*.
* config/tc-i960.c (md_atof): Likewise.
* config/tc-ia64.c (md_atof): Likewise.
(ia64_elf_section_letter): Constify ptr_msg param.
* config/tc-ia64.h (ia64_elf_section_letter): Update prototype.
* config/tc-ip2k.c (md_atof): Return const char*.
* config/tc-iq2000.c (md_atof): Likewise.
* config/tc-lm32.c (md_atof): Likewise.
* config/tc-m32c.c (md_atof): Likewise.
* config/tc-m32r.c (md_atof): Likewise.
* config/tc-m68hc11.c (md_atof): Likewise.
* config/tc-m68k.c (md_atof): Likewise.
* config/tc-mcore.c (md_atof): Likewise.
* config/tc-mep.c (md_atof): Likewise.
(mep_elf_section_letter): Constify ptr_msg param.
* config/tc-mep.h (mep_elf_section_letter): Update prototype.
* config/tc-metag.c (md_atof): Return const char*.
* config/tc-microblaze.c (md_atof): Likewise.
* config/tc-microblaze.h (md_atof): Delete prototype.
* config/tc-mips.c (mips_parse_argument_token): Constify err.
(md_atof): Return const char*.
* config/tc-mmix.c (md_atof): Likewise.
* config/tc-mn10200.c (md_atof): Likewise.
* config/tc-mn10300.c (md_atof): Likewise.
* config/tc-moxie.c (md_atof): Likewise.
* config/tc-msp430.c (md_atof): Likewise.
* config/tc-mt.c (md_atof): Likewise.
* config/tc-nds32.c (md_atof): Likewise.
* config/tc-nios2.c (md_atof): Likewise.
(nios2_elf_section_letter): Constify ptr_msg param.
* config/tc-nios2.h (nios2_elf_section_letter): Update prototype.
* config/tc-ns32k.c (md_atof): Return const char*.
* config/tc-or1k.c (md_atof): Likewise.
* config/tc-pdp11.c (struct pdp11_code): Constify error.
(md_atof): Return const char*.
* config/tc-pj.c (md_atof): Likewise.
* config/tc-ppc.c (md_atof): Likewise.
* config/tc-rl78.c (md_atof): Likewise.
* config/tc-rx.c (md_atof): Likewise.
* config/tc-s390.c (md_atof): Likewise.
* config/tc-score.c (s3_atof, md_atof): Likewise.
* config/tc-sh.c (md_atof): Likewise.
* config/tc-sparc.c (struct sparc_it): Constify error.
(md_atof): Return const char*.
* config/tc-spu.c (md_atof): Likewise.
* config/tc-tic30.c (md_atof): Likewise.
* config/tc-tic4x.c (md_atof): Likewise.
* config/tc-tic54x.c (md_atof): Likewise.
* config/tc-tic6x.c (md_atof): Likewise.
* config/tc-tilegx.c (md_atof): Likewise.
* config/tc-tilepro.c (md_atof): Likewise.
* config/tc-v850.c (parse_register_list, md_atof): Likewise.
* config/tc-vax.c (md_atof): Likewise.
* config/tc-visium.c (md_atof): Likewise.
* config/tc-xc16x.c (md_atof): Likewise.
* config/tc-xgate.c (md_atof): Likewise.
* config/tc-xstormy16.c (md_atof): Likewise.
* config/tc-xtensa.c (md_atof): Likewise.
* config/tc-z80.c (md_atof): Likewise.
* config/tc-z8k.c (md_atof): Likewise.
|
|
For these targets its not clear how md_assemble can usefully be split up so
that part can take const char *. There is also a fair number of targets that
need md_assemble () to take a char *, so we can't easily make the argument
const. So since there isn't many callers it seems easiest to just add a couple
of casts.
gas/ChangeLog:
2016-03-31 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
* config/tc-m32c.c (m32c_md_end): cast the argument to md_assemble to
char *.
(m32c_indirect_operand): Likewise.
* config/tc-nds32.c (do_pseudo_b): Likewise.
(do_pseudo_bal): Likewise.
(do_pseudo_ls_bhw): Likewise.
|
|
This is mostly just adding const in many places, however there are a couple
interesting things. We need to add casts in tc-s390.c and tc-cris.c because
they have functions that assign to input_line_pointer an argument that
sometimes comes from md_parse_option. Presumably this is safe because those
targets never pass literals to md_parse_option (), but this code should
probably be improved in the future. Also xtensa passes the argument to strtoll
which is a rather odd function, it takes a const char * as argument and returns
a pointer into that string as a char * through an out argument, but we can work
around that by adding more variables.
gas/ChangeLog:
2016-03-29 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
* config/tc-aarch64.c (struct aarch64_long_option_table): Ad const
qualifier.
* config/tc-alpha.c (md_parse_option): Likewise.
* config/tc-arc.c (md_parse_option): Likewise.
* config/tc-arm.c (struct arm_long_option_table): Likewise.
(md_parse_option): Likewise.
* config/tc-avr.c (md_parse_option): Likewise.
* config/tc-bfin.c (md_parse_option): Likewise.
* config/tc-cr16.c (md_parse_option): Likewise.
* config/tc-cris.c (s_cris_arch): Likewise.
(md_parse_option): Likewise.
* config/tc-crx.c (md_parse_option): Likewise.
* config/tc-d10v.c (md_parse_option): Likewise.
* config/tc-d30v.c (md_parse_option): Likewise.
* config/tc-dlx.c (md_parse_option): Likewise.
* config/tc-epiphany.c (md_parse_option): Likewise.
* config/tc-fr30.c (md_parse_option): Likewise.
* config/tc-frv.c (md_parse_option): Likewise.
* config/tc-ft32.c (md_parse_option): Likewise.
* config/tc-h8300.c (md_parse_option): Likewise.
* config/tc-hppa.c (md_parse_option): Likewise.
* config/tc-i370.c (md_parse_option): Likewise.
* config/tc-i386.c (md_parse_option): Likewise.
* config/tc-i860.c (md_parse_option): Likewise.
* config/tc-i960.c (md_parse_option): Likewise.
* config/tc-ia64.c (md_parse_option): Likewise.
* config/tc-ip2k.c (md_parse_option): Likewise.
* config/tc-iq2000.c (md_parse_option): Likewise.
* config/tc-lm32.c (md_parse_option): Likewise.
* config/tc-m32c.c (md_parse_option): Likewise.
* config/tc-m32r.c (md_parse_option): Likewise.
* config/tc-m68hc11.c (md_parse_option): Likewise.
* config/tc-m68k.c (md_parse_option): Likewise.
* config/tc-mcore.c (md_parse_option): Likewise.
* config/tc-mep.c (md_parse_option): Likewise.
* config/tc-metag.c (struct metag_long_option): Likewise.
(md_parse_option): Likewise.
* config/tc-microblaze.c (md_parse_option): Likewise.
* config/tc-microblaze.h (md_parse_option): Remove prototype.
* config/tc-mips.c (md_parse_option): Adjust.
* config/tc-mmix.c (md_parse_option): Likewise.
* config/tc-mn10200.c (md_parse_option): Likewise.
* config/tc-mn10300.c (md_parse_option): Likewise.
* config/tc-moxie.c (md_parse_option): Likewise.
* config/tc-msp430.c (md_parse_option): Likewise.
* config/tc-mt.c (md_parse_option): Likewise.
* config/tc-nds32.c (md_parse_option): Likewise.
* config/tc-nds32.h (nds32_parse_option): Likewise.
* config/tc-nios2.c (md_parse_option): Likewise.
* config/tc-ns32k.c (md_parse_option): Likewise.
* config/tc-or1k.c (md_parse_option): Likewise.
* config/tc-pdp11.c (md_parse_option): Likewise.
* config/tc-pj.c (md_parse_option): Likewise.
* config/tc-ppc.c (md_parse_option): Likewise.
* config/tc-rl78.c (md_parse_option): Likewise.
* config/tc-rx.c (md_parse_option): Likewise.
* config/tc-s390.c (s390_parse_cpu): Likewise.
* config/tc-score.c (md_parse_option): Likewise.
* config/tc-sh.c (md_parse_option): Likewise.
* config/tc-sparc.c (md_parse_option): Likewise.
* config/tc-spu.c (md_parse_option): Likewise.
* config/tc-tic30.c (md_parse_option): Likewise.
* config/tc-tic4x.c (md_parse_option): Likewise.
* config/tc-tic54x.c (md_parse_option): Likewise.
* config/tc-tic6x.c (md_parse_option): Likewise.
* config/tc-tilegx.c (md_parse_option): Likewise.
* config/tc-tilepro.c (md_parse_option): Likewise.
* config/tc-v850.c (md_parse_option): Likewise.
* config/tc-vax.c (md_parse_option): Likewise.
* config/tc-visium.c (struct visium_long_option_table): Likewise.
* config/tc-xc16x.c (md_parse_option): Likewise.
* config/tc-xgate.c (md_parse_option): Likewise.
* config/tc-xstormy16.c (md_parse_option): Likewise.
* config/tc-xtensa.c (md_parse_option): Likewise.
* config/tc-z80.c (md_parse_option): Likewise.
* config/tc-z8k.c (md_parse_option): Likewise.
* tc.h (md_parse_option): Likewise.
|
|
gas/ChangeLog:
2016-03-28 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
* config/obj-elf.c (obj_elf_section_name): Return const char *.
* config/obj-elf.h (obj_elf_section_name): Adjust.
* config/tc-aarch64.c (aarch64_parse_features): Likewise.
(aarch64_parse_cpu): Likewise.
(aarch64_parse_arch): Likewise.
* config/tc-arm.c (arm_parse_extension): Likewise.
(arm_parse_cpu): Likewise.
(arm_parse_arch): Likewise.
* config/tc-nds32.c: Likewise.
* config/xtensa-relax.c (parse_special_fn): Likewise.
* stabs.c (generate_asm_file): Likewise.
|
|
bfd * warning.m4 (GCC_WARN_CFLAGS): Add -Wstack-usage=262144
* configure: Regenerate.
* elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Replace use of
alloca with call to xmalloc.
* elf32-nds32.c: Likewise.
* elf64-hppa.c: Likewise.
* elfxx-mips.c: Likewise.
* pef.c: Likewise.
* pei-x86_64.c: Likewise.
* som.c: Likewise.
* xsym.c: Likewise.
binutils * dlltool.c: Replace use of alloca with call to xmalloc.
* dllwrap.c: Likewise.
* nlmconv.c: Likewise.
* objdump.c: Likewise.
* resrc.c: Likewise.
* winduni.c: Likewise.
* configure: Regenerate.
gas * atof-generic.c: Replace use of alloca with call to xmalloc.
* cgen.c: Likewise.
* dwarf2dbg.c: Likewise.
* macro.c: Likewise.
* remap.c: Likewise.
* stabs.c: Likewise.
* symbols.c: Likewise.
* config/obj-elf.c: Likewise.
* config/tc-aarch64.c: Likewise.
* config/tc-arc.c: Likewise.
* config/tc-arm.c: Likewise.
* config/tc-avr.c: Likewise.
* config/tc-ia64.c: Likewise.
* config/tc-mips.c: Likewise.
* config/tc-msp430.c: Likewise.
* config/tc-nds32.c: Likewise.
* config/tc-ppc.c: Likewise.
* config/tc-sh.c: Likewise.
* config/tc-tic30.c: Likewise.
* config/tc-tic54x.c: Likewise.
* config/tc-xstormy16.c: Likewise.
* config/te-vms.c: Likewise.
* configure: Regenerate.
ld * emultempl/msp430.em: Replace use of alloca with call to xmalloc.
* plugin.c: Likewise.
* pe-dll.c: Likewise.
|
|
opcodes * mcore-opc.h: Add const qualifiers.
* microblaze-opc.h (struct op_code_struct): Likewise.
* sh-opc.h: Likewise.
* tic4x-dis.c (tic4x_print_indirect): Likewise.
(tic4x_print_op): Likewise.
include * opcode/dlx.h (struct dlx_opcode): Add const qualifiers.
* opcode/h8300.h (struct h8_opcode): Likewise.
* opcode/hppa.h (struct pa_opcode): Likewise.
* opcode/msp430.h: Likewise.
* opcode/spu.h (struct spu_opcode): Likewise.
* opcode/tic30.h (struct _register): Likewise.
* opcode/tic4x.h (struct tic4x_register): Likewise.
(struct tic4x_cond): Likewise.
(struct tic4x_indirect): Likewise.
(struct tic4x_inst): Likewise.
* opcode/visium.h (struct reg_entry): Likewise.
gas * config/tc-arc.c: Add const qualifiers.
* config/tc-h8300.c (md_begin): Likewise.
* config/tc-ia64.c (print_prmask): Likewise.
* config/tc-msp430.c (msp430_operands): Likewise.
* config/tc-nds32.c (struct suffix_name): Likewise.
(struct nds32_parse_option_table): Likewise.
(struct nds32_set_option_table): Likewise.
(do_pseudo_pushpopm): Likewise.
(do_pseudo_pushpop_stack): Likewise.
(nds32_relax_relocs): Likewise.
(nds32_flag): Likewise.
(struct nds32_hint_map): Likewise.
(nds32_find_reloc_table): Likewise.
(nds32_match_hint_insn): Likewise.
* config/tc-s390.c: Likewise.
* config/tc-sh.c (get_specific): Likewise.
* config/tc-tic30.c: Likewise.
* config/tc-tic4x.c (tic4x_inst_add): Likewise.
(tic4x_indirect_parse): Likewise.
* config/tc-vax.c (vax_cons): Likewise.
* config/tc-z80.c (struct reg_entry): Likewise.
* config/tc-epiphany.c (md_assemble): Adjust.
(epiphany_assemble): New function.
(epiphany_elf_section_rtn): Call do_align directly.
(epiphany_elf_section_text): Likewise.
* config/tc-ip2k.c (ip2k_elf_section_rtn): Likewise.
(ip2k_elf_section_text): Likewise.
* read.c (do_align): Make it not static.
* read.h (do_align): New prototype.
|
|
|
|
This patch fixes all occurences of left-shifting negative constants in C cod
which is undefined by the C standard.
gas/ChangeLog:
* read.c (parse_bitfield_cons): Fix left shift of negative value.
* config/tc-xstormy16.c (md_section_align): Likewise.
* config/tc-xgate.c (md_section_align): Likewise.
* config/tc-visium.c (md_section_align): Likewise.
* config/tc-v850.c (md_section_align): Likewise.
* config/tc-tic6x.c (md_section_align): Likewise.
* config/tc-sh.c (SH64PCREL32_M, SH64PCREL48_M, SH64PCREL32_M)
(MOVI_32_M, MOVI_48_M, MOVI_32_M, md_section_align): Likewise.
* config/tc-sh64.c (shmedia_md_estimate_size_before_relax): Likewise.
* config/tc-score.c (s3_section_align): Likewise.
* config/tc-score7.c (s7_section_align): Likewise.
* config/tc-s390.c (md_section_align): Likewise.
* config/tc-rx.c (md_section_align): Likewise.
* config/tc-rl78.c (md_section_align): Likewise.
* config/tc-ppc.c (md_section_align): Likewise.
* config/tc-or1k.c (md_section_align): Likewise.
* config/tc-nds32.c (md_section_align): Likewise.
* config/tc-mt.c (md_section_align): Likewise.
* config/tc-msp430.c (md_section_align): Likewise.
* config/tc-mn10300.c (md_section_align): Likewise.
* config/tc-mn10200.c (md_section_align): Likewise.
* config/tc-mips.c (md_section_align): Likewise.
* config/tc-microblaze.c (parse_imm): Likewise.
* config/tc-mep.c (md_section_align): Likewise.
* config/tc-m68k.c (md_section_align): Likewise.
* config/tc-m68hc11.c (md_section_align): Likewise.
* config/tc-m32r.c (md_section_align): Likewise.
* config/tc-m32c.c (md_section_align): Likewise.
* config/tc-lm32.c (md_section_align): Likewise.
* config/tc-iq2000.c (md_section_align): Likewise.
* config/tc-ip2k.c (md_section_align): Likewise.
* config/tc-ia64.c (dot_save, dot_vframe): Likewise.
* config/tc-i960.c (md_number_to_field, md_section_align): Likewise.
* config/tc-i386.c (md_section_align): Likewise.
* config/tc-i370.c (md_section_align): Likewise.
* config/tc-frv.c (md_section_align): Likewise.
* config/tc-fr30.c (md_section_align): Likewise.
* config/tc-epiphany.c (md_section_align): Likewise.
* config/tc-d30v.c (md_section_align): Likewise.
* config/tc-d10v.c (md_section_align): Likewise.
* config/tc-cr16.c (l_cons): Likewise.
* config/tc-bfin.c (md_section_align): Likewise.
* config/tc-arm.c (md_section_align): Likewise.
* config/tc-arc.c (md_section_align): Likewise.
* config/bfin-parse.y (expr_1): Likewise.
gas/testsuite/ChangeLog:
* gas/all/test-gen.c (random_order_16s, random_order_24s)
(random_order_32s): Fix left shift of negative value.
|