aboutsummaryrefslogtreecommitdiff
path: root/bfd/section.c
AgeCommit message (Collapse)AuthorFilesLines
2002-01-30Tidy up formatting in bfd-in2.hNick Clifton1-35/+8
2002-01-05 * section.c (bfd_section_init): Remove unnecessary initialisations.Alan Modra1-13/+51
(bfd_section_list_clear): New function. (bfd_section_list_remove, bfd_section_list_insert): New macros. (_bfd_strip_section_from_output): Use them. * coffcode.h (coff_set_alignment_hook): Likewise. * elf32-mips.c (_bfd_mips_elf_final_link): Likewise. * elf64-mips.c (mips_elf64_final_link): Likewise. * elf64-mmix.c (mmix_elf_final_link): Likewise. * sunos.c (sunos_add_dynamic_symbols): Likewise. * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise. * bfd-in2.h: Regenerate. * netbsd-core.c (netbsd_core_file_p): Use bfd_make_section_anyway rather than doing our own section handling. Clean up after errors with bfd_release and bfd_section_list_clear. Handle unexpected flags. * aoutf1.h (sunos4_core_file_p): Likewise. * aix386-core.c (aix386_core_file_p): Likewise. * cisco-core.c (cisco_core_file_validate): Likewise. * ptrace-core.c (ptrace_unix_core_file_p): Likewise. * trad-core.c (trad_unix_core_file_p): Likewise. * hppabsd-core.c (hppabsd_core_core_file_p): Clean up after errors with bfd_release and bfd_section_list_clear. * hpux-core.c (hpux_core_core_file_p): Likewise. * irix-core.c (irix_core_core_file_p): Likewise. * lynx-core.c (lynx_core_file_p): Likewise. * osf-core.c (osf_core_core_file_p): Likewise. * rs6000-core.c (rs6000coff_core_p): Likewise. * sco5-core.c (sco5_core_file_p): Likewise.
2001-12-17hash bfd sections for fast lookup and create.Alan Modra1-78/+160
bfd/ChangeLog * bfd.c (struct _bfd): Add section_htab, section_tail. * libbfd-in.h (_bfd_delete_bfd): Declare. (bfd_section_hash_newfunc): Declare. * opncls.c (_bfd_new_bfd): Free memory on failure. Init section_htab and section_tail. (_bfd_delete_bfd): New function. (bfd_openr): Use it. (bfd_fdopenr): Likewise. (bfd_openstreamr): Likewise. (bfd_openw): Likewise. (bfd_close): Likewise. (bfd_close_all_done): Likewise. (bfd_release): Comment. * section.c (struct section_hash_entry): New. (bfd_section_hash_newfunc): New function. (section_hash_lookup): Define. (bfd_section_init): New function, split out from bfd_make_section_anyway. (bfd_get_section_by_name): Lookup via hash table. (bfd_get_unique_section_name): Likewise. (bfd_make_section_old_way): Rewrite to use hash table. (bfd_make_section_anyway): Likewise. (bfd_make_section): Likewise. Return NULL for attempts to make BFD_{ABS,COM,UND,IND}_SECTION_NAME. (_bfd_strip_section_from_output): Adjust section_tail if needed. * configure.in: Bump bfd version. * configure: Regenerate. * libbfd.h: Regenerate. * bfd-in2.h: Regenerate. ld/ChangeLog * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Adjust section_tail when fiddling with section list. (gld${EMULATION_NAME}_list_options): Ensure sentences aren't broken into separate strings to make translation easier. * emultempl/mmo.em (mmo_place_orphan): Adjust section_tail when fiddling with section list. * emultempl/pe.em (gld_${EMULATION_NAME}_place_orphan): Likewise.
2001-11-19Define and use bfd_is_const_section().Nick Clifton1-0/+6
2001-11-13 * section.c (bfd_make_section_anyway): Don't increment section_idAlan Modra1-2/+4
and the BFD's section_count if adding the section failed. * vms.c (vms_new_section_hook): Adjust for bfd_make_section_anyway change.
2001-10-18 * section.c (_bfd_strip_section_from_output): Don't countJakub Jelinek1-1/+4
SEC_EXCLUDE sections as references. Set SEC_EXCLUDE.
2001-10-10 * aout-encap.c: Fix comment typos.Kazu Hirata1-1/+1
* aoutx.h: Likewise. * archive.c: Likewise. * bout.c: Likewise. * coff64-rs6000.c: Likewise. * coffcode.h: Likewise. * coffgen.c: Likewise. * cofflink.c: Likewise. * coff-mips.c: Likewise. * ecoff.c: Likewise. * elf32-m32r.c: Likewise. * libcoff-in.h: Likewise. * libecoff.h: Likewise. * libxcoff.h: Likewise. * nlm32-i386.c: Likewise. * pdp11.c: Likewise. * section.c: Likewise. * som.c: Likewise. * som.h: Likewise. * bfd-in2.h: Regenerate. * libcoff.h: Likewise.
2001-10-09 * elf-bfd.h (struct bfd_elf_section_data): Add "group" andAlan Modra1-5/+10
"next_in_group". Fix gp and gp_size comments. * elf.c (union elf_internal_group): New. (setup_group): New function. (_bfd_elf_make_section_from_shdr): Set BFD flags for SHT_GROUP. Call setup_group for SHF_GROUP sections. (bfd_section_from_shdr): Build a BFD section for SHT_GROUP. (elf_fake_sections): Set header type for SEC_GROUP, and header flags for sections in a group. (set_group_contents): New function. (_bfd_elf_compute_section_file_positions): Call it. (assign_section_numbers): Set sh_link for SHT_GROUP. * elflink.h (gc_mark_hook): Handle section groups. * elfxx-target.h: Add SEC_GROUP to applicable_flags. * section.c (SEC_GROUP): Define. (struct sec): Comment fixes. * bfd-in2.h: Regenerate. * elf.c (bfd_elf_print_symbol): Formatting fix; migrate expression out of function args. (_bfd_elf_canonicalize_reloc): Similarly. (_bfd_elf_get_symtab): Here too. (_bfd_elf_canonicalize_dynamic_symtab): And here. * elfcode.h (elf_slurp_symbol_table): Don't recalculate size for bfd_bread, and remove unnecessary cast.
2001-09-29 * section.c (struct sec): Remove kept_section.Alan Modra1-7/+2
(STD_SECTION): Remove kept_section initialisation. (bfd_make_section_anyway): Here too. * ecoff.c (bfd_debug_section): Remove kept_section initialisation. * cofflink.c (_bfd_coff_link_input_bfd): Don't test kept_section. * elflink.h (elf_link_input_bfd): Set discarded link-once section symbols to zero, and remove all code involved with kept_section and tracking section symbol values. * bfd-in2.h: Regenerate. * configure.in: Bump version number. * configure: Regenerate. * ldlang.c (section_already_linked): Remove assignment to kept_section.
2001-09-28 * section.c (SEC_ARCH_BIT_0): New; replace unused SEC_BALIGN.Richard Henderson1-3/+5
* bfd-in2.h: Rebuild.
2001-09-18Touches most files in bfd/, so likely will be blamed for everything..Alan Modra1-29/+25
o bfd_read and bfd_write lose an unnecessary param and become bfd_bread and bfd_bwrite. o bfd_*alloc now all take a bfd_size_type arg, and will error if size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files or bugs in linker scripts etc. o file_ptr becomes a bfd_signed_vma. Besides matching sizes with various other types involved in handling sections, this should make it easier for bfd to support a 64 bit off_t on 32 bit hosts that provide it. o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*) generally available. They now cast their args to bfd_vma and bfd_byte * as appropriate, which removes a swag of casts from the source. o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and aout-encap.c. o Zillions of formatting and -Wconversion fixes.
2001-06-02 * section.c (_bfd_strip_section_from_output): Handle NULLHans-Peter Nilsson1-0/+5
output_section.
2001-05-17Add a flag to asection, linker_has_input, and use it to reliablyAlan Modra1-4/+11
determine whether an input section is the first one assigned to an output section.
2001-04-14 * section.c (STD_SECTION): Add entsize.Jakub Jelinek1-5/+5
2001-04-142001-04-13 H.J. Lu <hjl@gnu.org>H.J. Lu1-0/+13
* section.c (SEC_MERGE): Define new flag for merging. (SEC_STRINGS): Likewise. (entsize): New field.
2001-03-08Update copyright noticesNick Clifton1-1/+2
2000-12-202000-12-19 Kazu Hirata <kazu@hxi.com>Kazu Hirata1-17/+2
* sco5-core.c: Fix formatting. * section.c: Likewise. * sparclinux.c: Likewise. * sparclynx.c: Likewise. * sparcnetbsd.c: Likewise. * srec.c: Likewise. * stabs.c: Likewise. * stab-syms.c: Likewise. * sunos.c: Likewise. * syms.c: Likewise. * sysdep.h: Likewise.
2000-11-132000-11-09 Philip Blundell <pb@futuretv.com>Phil Blundell1-1/+1
* section.c (STD_SECTION): Set gc_mark flag.
2000-11-08 * elf64-ia64.c (elf64_ia64_final_link): New local unwind_output_sec.Richard Henderson1-0/+5
Set it before bfd_elf64_bfd_final_link call. Use it after the call. * section.c (bfd_set_section_contents): Call memcpy if section->contents set and location not equal to contents plus offset.
2000-10-12Another try at correcting relocations against discardedAlan Modra1-8/+9
link-once section symbols.
2000-10-10* section.c (bfd_make_section_anyway): Release newsect ptr whenAlan Modra1-2/+5
newsect->symbol fails to alloc. Use bfd_release instead of free.
2000-09-20Handle out of memory situations.Alan Modra1-0/+2
2000-09-08(bfd_get_unique_section_name): Put a dot before the numeric suffix.Alan Modra1-6/+6
2000-09-06`template' isn't a very good name for a variable.Alan Modra1-6/+6
Who invented c++ anyway?
2000-09-05(SEC_HAS_GOT_REF): Define new flag for asection.Alan Modra1-0/+57
(bfd_get_unique_section_name): New function.
2000-08-03Restore reverted code. Fix bug in reverted code which was eliminating tooNick Clifton1-7/+10
many segments.
2000-08-032000-08-03 H.J. Lu <hjl@gnu.org>H.J. Lu1-10/+7
* section.c: Back out the change made by Nick Clifton <nickc@cygnus.com> on 2000-07-31. It breaks stripping dynamic binaries. * bfd-in2.h: Likewise. * elf.c: Likewise.
2000-07-31Improve section to segment mapping code.Nick Clifton1-7/+10
2000-07-10Avoid negative section sequence ids.Alan Modra1-3/+3
2000-07-08Add sequence id field to asection.Alan Modra1-228/+240
Tidy comments and replace deprecated CONST with const.
2000-06-19Applied Stephane Carrez <Stephane.Carrez@worldnet.fr> patches to add supportNick Clifton1-6/+6
for m68hc11 and m68hc12 processors.
2000-04-07SEC_BLOCK, SEC_CLINK, and C_STATLAB added (TI COFF support).Timothy Wall1-0/+10
2000-02-21This lot mainly cleans up `comparison between signed and unsigned' gccAlan Modra1-2/+4
warnings. One usused var, and a macro parenthesis fix too. Also check input sections are elf when doing gc in elflink.h.
2000-02-13 * section.c (_bfd_strip_section_from_output): Add info parameter.Ian Lance Taylor1-6/+34
If it passed as non-NULL, use it to check whether any input BFD has an input section which uses this output section. Change all callers. * bfd-in2.h: Rebuild. * bfd-in.h: Move declarations of bfd_get_elf_phdr_upper_bound and bfd_get_elf_phdrs in from bfd-in2.h, correcting patch of 1999-11-29. * bfd-in2.h: Rebuild.
2000-01-13Apply Tim walls octest vs bytes patchNick Clifton1-8/+11
1999-09-061999-09-06 Donn Terry <donn@interix.com>Ian Lance Taylor1-3/+47
* section.c (struct bfd_comdat_info): Define. (asection): Add comdat field. (STD_SECTION): Initialize comdat field. (bfd_make_section_anyway): Likewise. * bfd-in2.h: Rebuild.
1999-08-09 * section.c (SEC_SMALL_DATA): Rename from SEC_SHORT.Ian Lance Taylor1-1/+1
* bfd-in2.h: Rebuild.
1999-08-081999-08-08 Mumit Khan <khan@xraylith.wisc.edu>Ian Lance Taylor1-0/+4
* section.c (SEC_SHARED): Define. * coffcode.h (sec_to_styp_flags): Handle SEC_SHARED. (styp_to_sec_flags): Likewise. * peicode.h (coff_swap_scnhdr_out): Likewise. * bfd-in2.h: Rebuild. 1999-08-08 Ian Lance Taylor <ian@zembu.com> * coffcode.h (coff_classify_symbol): Comment out part of 1999-08-05 change which breaks cygwin DLLs.
1999-08-06 * section.c (global_syms): Only initialize union field ifIan Lance Taylor1-9/+17
__STDC__.
1999-07-11 * Many files: Changes to avoid gcc warnings: Add ATTRIBUTE_UNUSEDIan Lance Taylor1-6/+10
as appropriate. Fill in structure initializations. Add variable initializations. Add casts. * dwarf1.c (parse_line_table): Change eachLine to unsigned long. (dwarf1_unit_find_nearest_line): Change i to unsigned long.
1999-06-20 * section.c (_bfd_strip_section_from_output): Ignore sectionsRichard Henderson1-2/+4
DISCARDed by the link script.
1999-06-15 * section.c (SEC_SHORT): Define.Richard Henderson1-0/+4
* bfd-in2.h: Rebuild.
1999-06-07 * section.c (_bfd_strip_section_from_output): Remove outputRichard Henderson1-12/+12
sections with no initial link_order.
1999-05-0319990502 sourceware importbinu_ss_19990502Richard Henderson1-0/+1075