aboutsummaryrefslogtreecommitdiff
path: root/gas/obj.h
AgeCommit message (Collapse)AuthorFilesLines
2024-01-04Update year range in copyright notice of binutils filesAlan Modra1-1/+1
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.
2023-08-31gas init_stab_section and get_stab_string_offsetAlan Modra1-1/+1
get_stab_string_offset currently creates the stabstr section if not already present, in the process keeping a reference to the malloc'd section name string. Really, the name belongs in bfd_alloc'd memory or some obstack so that it doesn't show as a memory leak on exit. s_stab_generic at least does allocate the name for the stab section on an obstack, but doesn't tidy that as well as it could. Return paths after issuing a warning don't release the memory, nor the memory for the "string" copy. This patch fixes these problems. s_stab_generic is rearranged so that creation of the sections occurs earlier, before any potential uses of the note obstack during expression parsing. That makes it possible to always free the section name strings unless used to create new sections. I've also avoided get_absolute_expression_and_terminator as I see that function might skip over end-of-line, and lack of a --input_line_pointer might have caused the following source line to be ignored. (Other uses of this function in gas are OK.) * config/obj-coff.c (obj_coff_init_stab_section): Add stabstr param. Pass to get_stab_string_offset rather than name of section. * config/obj-som.c (obj_som_init_stab_section): Likewise. * config/obj-elf.c (obj_elf_init_stab_section): Likewise. (elf_init_stab_section): Adjust. * config/obj-coff.h (INIT_STAB_SECTION): Update. (obj_coff_init_stab_section): Update prototype. * config/obj-som.h: Similarly. * config/obj-elf.h: Similarly. * config/obj-multi.h (INIT_STAB_SECTION): Update. * obj.h (struct format_ops <init_stab_section>): Update. * read.h (get_stab_string_offset): Update prototype. * stabs.c (cached_sec): Delete. (stabs_begin): Adjust to suit. (get_stab_string_offset): Add stabstr param, delete stabstr_name and free_stabstr_secname params. Don't make stabstr section here. (eat_comma): New function. (s_stab_generic): Replace stab_secname_obstack_end param with bool freenames. Move creation of stab and stabstr sections earlier, so the names can be freed earlier before possible use of notes obstack during expression parsing. Tidy error paths ensuring "string" is freed. Use get_absolute_expression in place of get_absolute_expression_and_terminator. (s_stab): Adjust. (s_xstab): Use notes_concat to make stabstr section name.
2023-08-31gas OBJ_PROCESS_STABAlan Modra1-1/+1
This macro and the supporting functions have an unused "seg" first argument. Tidy that. * config/obj-aout.c (obj_aout_process_stab): Delete first param. * config/obj-ecoff.h (OBJ_PROCESS_STAB): Likewise. * config/obj-elf.c (elf_process_stab): Likewise. * config/obj-elf.h (OBJ_PROCESS_STAB): Likewise. * config/obj-macho.h (OBJ_PROCESS_STAB): Likewise. * config/obj-multi.h (OBJ_PROCESS_STAB): Likewise. * ecoff.c (ecoff_stab): Likewise. * ecoff.h (ecoff_stab): Likewise. * obj.h (struct format_ops <process_stab>): Likewise. * stabs.c (OBJ_PROCESS_STAB): Likewise.
2023-05-03Generated docs and include filesAlan Modra1-0/+2
bfd/doc/chew.c extracts documentation from source code comments annotated with keywords, and generates much of bfd.h and libbfd.h from those same comments. The docs have suffered from people (me too) adding things like CODE_FRAGMENT to the source to put code into bfd.h without realising that CODE_FRAGMENT also puts @example around said code into the docs. So we have random senseless things in the docs. This patch fixes that problem (well, the senseless things from CODE_FRAGMENT), moves most of the code out of bfd-in.h, and improves a few chew.c features. libbfd.h now automatically gets ATTRIBUTE_HIDDEN prototypes, and indentation in bfd.h and libbfd.h is better.
2023-02-02gas obj_endAlan Modra1-0/+1
Provide a way for config/obj-* to clean up at end of assembly, and do so for ELF. * obj.h (struct format_ops): Add "end". * config/obj-aout.c (aout_format_ops): Init new field. * config/obj-coff.c (coff_format_ops): Likewise. * config/obj-ecoff.c (ecoff_format_ops): Likewise. * config/obj-elf.c (elf_format_ops): Likewise. (elf_begin): Move later in file. Clear some more variables. (comment_section): Make file scope. (free_section_idx): Rewrite. (elf_adjust_symtab): Expand str_htab_create call and use free_section_idx as delete function. (elf_frob_file_after_relocs): Don't clean up groups.indexes here. (elf_end): New function. * config/obj-elf.h (obj_end): Define. * config/obj-multi.h (obj_end): Define. * output-file.c (output_file_close): Call obj_end.
2023-01-01Update year range in copyright notice of binutils filesAlan Modra1-1/+1
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.
2022-04-12gas: drop .appfile and .applineJan Beulich1-1/+1
These were used originally to represent "# <line> <file>" constructs inserted by (typically) compilers when pre-processing. Quite some time ago they were replaced by .linefile though. Since the original directives were never documented, we ought to be able to remove support for them. As a result in a number of case function parameter aren't used anymore and can hence be dropped.
2022-01-02Update year range in copyright notice of binutils filesAlan Modra1-1/+1
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.
2021-01-01Update year range in copyright notice of binutils filesAlan Modra1-1/+1
2020-01-01Update year range in copyright notice of binutils filesAlan Modra1-1/+1
2019-01-01Update year range in copyright notice of binutils filesAlan Modra1-1/+1
2018-01-03Update year range in copyright notice of binutils filesAlan Modra1-1/+1
2017-01-02Update year range in copyright notice of all files.Alan Modra1-1/+1
2016-01-01Copyright update for binutilsAlan Modra1-1/+1
2015-01-02ChangeLog rotatation and copyright year updateAlan Modra1-1/+1
2014-03-05Update copyright yearsAlan Modra1-2/+1
2010-10-25 * obj.h (struct format_ops): Add adjust_symtab.Alan Modra1-1/+2
* config/obj-multi.h (obj_adjust_symtab): Define. * config/obj-aout.c (aout_format_ops): Init new field. * config/obj-coff.c (coff_format_ops): Likewise. * config/obj-ecoff.c (ecoff_format_ops): Likewise. * config/obj-elf.c (elf_format_ops): Likewise.
2009-11-02missed from last commitAlan Modra1-1/+2
2007-07-03Switch to GPLv3Nick Clifton1-2/+2
2005-08-11 * README-vms: Delete.Alan Modra1-10/+1
* config-gas.com: Delete. * makefile.vms: Delete. * vmsconf.sh: Delete. * config/atof-tahoe.c: Delete. * config/m88k-opcode.h: Delete. * config/obj-bout.c: Delete. * config/obj-bout.h: Delete. * config/obj-hp300.c: Delete. * config/obj-hp300.h: Delete. * config/tc-a29k.c: Delete. * config/tc-a29k.h: Delete. * config/tc-h8500.c: Delete. * config/tc-h8500.h: Delete. * config/tc-m88k.c: Delete. * config/tc-m88k.h: Delete. * config/tc-tahoe.c: Delete. * config/tc-tahoe.h: Delete. * config/tc-tic80.c: Delete. * config/tc-tic80.h: Delete. * config/tc-w65.c: Delete. * config/tc-w65.h: Delete. * config/te-aux.h: Delete. * config/te-delt88.h: Delete. * config/te-delta.h: Delete. * config/te-dpx2.h: Delete. * config/te-hp300.h: Delete. * config/te-ic960.h: Delete. * config/vms-a-conf.h: Delete. * doc/c-a29k.texi: Delete. * doc/c-h8500.texi: Delete. * doc/c-m88k.texi: Delete. * README: Remove obsolete examples, and list of supported targets. * Makefile.am: Remove a29k, h8500, m88k, tahoe, tic80, w65, bout and hp300 support. (DEP_FLAGS): Don't define BFD_ASSEMBLER. * configure.in: Remove --enable-bfd-assembler, need_bfd, primary_bfd_gas. * configure.tgt: Remove a29k, h8300-coff, h8500-*, i960 non-elf, m68k non bfd, m88k, or32-coff, tic80-*, vax non-bfd, w65k-*, *-nindy. * as.c: Remove all non-BFD_ASSEMBLER code, support for above targets. * as.h: Likewise. * dw2gencfi.c: Likewise. * dwarf2dbg.c: Likewise. * ehopt.c: Likewise. * input-file.c: Likewise. * listing.c: Likewise. * literal.c: Likewise. * messages.c: Likewise. * obj.h: Likewise. * output-file.c: Likewise. * read.c: Likewise. * stabs.c: Likewise. * struc-symbol.h: Likewise. * subsegs.c: Likewise. * subsegs.h: Likewise. * symbols.c: Likewise. * symbols.h: Likewise. * tc.h: Likewise. * write.c: Likewise. * write.h: Likewise. * config/aout_gnu.h: Likewise. * config/obj-aout.c: Likewise. * config/obj-aout.h: Likewise. * config/obj-coff.c: Likewise. * config/obj-coff.h: Likewise. * config/obj-evax.h: Likewise. * config/obj-ieee.h: Likewise. * config/tc-arm.c: Likewise. * config/tc-arm.h: Likewise. * config/tc-avr.c: Likewise. * config/tc-avr.h: Likewise. * config/tc-crx.h: Likewise. * config/tc-d10v.h: Likewise. * config/tc-d30v.h: Likewise. * config/tc-dlx.h: Likewise. * config/tc-fr30.h: Likewise. * config/tc-frv.h: Likewise. * config/tc-h8300.c: Likewise. * config/tc-h8300.h: Likewise. * config/tc-hppa.h: Likewise. * config/tc-i370.h: Likewise. * config/tc-i386.c: Likewise. * config/tc-i386.h: Likewise. * config/tc-i860.h: Likewise. * config/tc-i960.c: Likewise. * config/tc-i960.h: Likewise. * config/tc-ip2k.h: Likewise. * config/tc-iq2000.h: Likewise. * config/tc-m32c.h: Likewise. * config/tc-m32r.h: Likewise. * config/tc-m68hc11.h: Likewise. * config/tc-m68k.c: Likewise. * config/tc-m68k.h: Likewise. * config/tc-maxq.c: Likewise. * config/tc-maxq.h: Likewise. * config/tc-mcore.c: Likewise. * config/tc-mcore.h: Likewise. * config/tc-mn10200.h: Likewise. * config/tc-mn10300.c: Likewise. * config/tc-mn10300.h: Likewise. * config/tc-ms1.h: Likewise. * config/tc-msp430.c: Likewise. * config/tc-msp430.h: Likewise. * config/tc-ns32k.c: Likewise. * config/tc-ns32k.h: Likewise. * config/tc-openrisc.h: Likewise. * config/tc-or32.c: Likewise. * config/tc-or32.h: Likewise. * config/tc-ppc.c: Likewise. * config/tc-ppc.h: Likewise. * config/tc-s390.h: Likewise. * config/tc-sh.c: Likewise. * config/tc-sh.h: Likewise. * config/tc-sparc.c: Likewise. * config/tc-tic30.c: Likewise. * config/tc-tic30.h: Likewise. * config/tc-tic4x.c: Likewise. * config/tc-tic4x.h: Likewise. * config/tc-tic54x.c: Likewise. * config/tc-tic54x.h: Likewise. * config/tc-v850.h: Likewise. * config/tc-vax.c: Likewise. * config/tc-vax.h: Likewise. * config/tc-xstormy16.h: Likewise. * config/tc-xtensa.h: Likewise. * config/tc-z8k.c: Likewise. * config/tc-z8k.h: Likewise. * config/vms-a-conf.h * doc/Makefile.am: Likewise. * doc/all.texi: Likewise. * doc/as.texinfo: Likewise. * doc/Makefile.in: Regenerate. * Makefile.in: Regenerate. * configure: Regenerate. * config.in: Regenerate. * po/POTFILES.in: Regenerate.
2005-05-05Update the address and phone number of the FSFNick Clifton1-2/+2
2005-03-03update copyright datesAlan Modra1-2/+2
2004-11-10 * obj.h (struct format_ops <app_file>): Add int param.Alan Modra1-1/+1
* read.h (s_app_file_string): Likewise. * read.c (s_app_file_string): Likewise. (s_app_file): Adjust s_app_file_string call. * config/tc-mips.c (s_mips_file): Likewise. * config/obj-coff.h (obj_app_file): Add app param. * config/obj-ecoff.h (obj_app_file): Likewise. * config/obj-multi.h (obj_app_file): Likewise. * config/obj-elf.h (elf_file_symbol): Likewise. * config/obj-elf.c (elf_file_symbol): Only emit one file symbol if called for # preprocessor lines.
2003-12-03 * messages.c: Convert to ISO-C.Kazu Hirata1-38/+38
* obj.h: Likewise. * output-file.c: Likewise. * output-file.h: Likewise. * sb.c: Likewise. * sb.h: Likewise. * stabs.c: Likewise. * subsegs.c: Likewise. * subsegs.h: Likewise. * tc.h: Likewise.
2002-09-05gas reloc rewrite.Alan Modra1-1/+2
2001-03-08Fix copyright noticesNick Clifton1-1/+1
2000-11-082000-11-07 H.J. Lu <hjl@gnu.org>H.J. Lu1-0/+1
* doc/as.texinfo (.symver): Updated for versioned symbol reference. * obj.h (format_ops): Add the frob_file_before_adjust field. * config/obj-aout.c (aout_format_ops): Set the frob_file_before_adjust field to 0. * config/obj-coff.c (coff_format_ops): Likewise. * config/obj-ecoff.c (ecoff_format_ops): Likewise. * config/obj-elf.c (obj_elf_symver): Allow duplicated version name. (elf_frob_file_before_adjust): New function to remove unneeded versioned symbols from the symbol table. (elf_format_ops): Set the frob_file_before_adjust field to elf_frob_file_before_adjust. * config/obj-elf.h (obj_frob_file_before_adjust): Defined if not defined. * config/obj-multi.h (obj_frob_file_before_adjust): Defined.
2000-05-22 * obj.h (struct format_ops): New members begin, app_file,Hans-Peter Nilsson1-0/+8
s_set_other, s_set_desc, s_get_type, s_set_type, separate_stab_sections, init_stab_section. * config/obj-multi.h: Update GPL notice to v2. (obj_begin): New. (obj_app_file): New. (S_SET_SIZE): Test s_set_size for NULL before calling. (S_SET_ALIGN): Similar for s_set_align. (S_SET_OTHER): New. (S_SET_DESC): New. (S_GET_TYPE): New. (S_SET_TYPE): New. (SEPARATE_STAB_SECTIONS): New. (INIT_STAB_SECTION): New. (EMIT_SECTION_SYMBOLS): New. (AOUT_STABS) [OBJ_MAYBE_AOUT]: Define. * config/obj-elf.h: Update GPL notice to v2. Mention that this file is included from obj-multi.h. (obj_begin): Wrap definition in ifndef. (elf_file_symbol): Constify declaration. (obj_app_file): Ditto. (SEPARATE_STAB_SECTIONS, INIT_STAB_SECTION, OBJ_PROCESS_STAB): Wrap in ifndef SEPARATE_STAB_SECTIONS. * config/obj-elf.c (elf_s_set_other): New. (elf_file_symbol): Constify argument. (elf_separate_stab_sections): New. (elf_init_stab_section): New. (elf_format_ops): Add new members. Remove comma at end. * config/obj-ecoff.c (ecoff_separate_stab_sections): New. (ecoff_format_ops): Add new fields. Remove comma at end. Mention inconsistency for emit_section_symbols. * config/obj-coff.h (c_dot_file_symbol): Constify declaration. * config/obj-coff.c (c_dot_file_symbol): Constify argument. (coff_separate_stab_sections): New. (coff_format_ops): Add new members. * config/obj-aout.c (obj_aout_sec_sym_ok_for_reloc): New. (obj_aout_s_set_other): New. (obj_aout_s_set_desc): New. (obj_aout_s_get_type): New. (obj_aout_s_set_type): New. (obj_aout_separate_stab_sections): New. (aout_format_ops): New members added. Use obj_aout_process_stab, not 0. Use obj_aout_sec_sym_ok_for_reloc, not 0. (obj_aout_frob_symbol): Add ATTRIBUTE_UNUSED to args as appropriate. (obj_aout_line, obj_aout_weak, obj_aout_type): Ditto.
2000-01-26This set of patches add support for aout emulation on the x86Alan Modra1-1/+4
assembler. ie. You will be able to do "as --em=i386aout" on an x86 linux-elf assembler to generate aout format object files, rather than using a separate assembler. The aout emulation is enabled by giving "--enable-targets=i386-linuxaout" to configure. Oh yeah, there's a couple of fixes too. Error messages shouldn't be passed to printf in the format arg just in case someone puts a `%' in the message.
1999-05-0319990502 sourceware importbinu_ss_19990502Richard Henderson1-0/+81