3 * elf32-ppc.c (ppc_elf_howto_raw): For all 14-bit branch relocs,
4 go back to telling the tools this reloc operates on 32 bits.
8 * libcoff-in.h (struct coff_section_tdata): Add offset, i,
9 function, and line_base fields.
11 * coffgen.c (coff_find_nearest_line): Use section tdata to cache
12 information, rather than using static variables.
14 * sunos.c (sunos_read_dynamic_info): Adjust offsets in an NMAGIC
17 * init.c (initialized): Remove static variable.
18 (bfd_init): Don't bother setting initialized.
19 (bfd_check_init): Remove.
20 * opncls.c (_bfd_new_bfd): Don't call bfd_check_init.
25 * rs6000-core.c (rs6000coff_core_p): Don't check the core file
26 size for full core dumps. Copy core file header to private data.
27 (rs6000coff_core_file_failing_command,
28 rs6000coff_core_file_failing_signal): New functions to extract
29 the file name and terminating signal from the core file.
30 * coff-rs6000.c: Use them.
34 Change arch info to be const, initialized at compile time.
35 * archures.c: Reindent many functions. Change CONST to const.
36 (bfd_arch_info_type): Make arch_name const. Remove disassemble;
37 nothing set it anyhow. Make next const.
38 (bfd_arch_info_list): Remove.
39 (bfd_archures_list): Rename from archures_init_table. Change from
40 a table of function pointers to a table of bfd_arch_info_type
42 (bfd_scan_arch): Rewrite accordingly. Return a const pointer.
43 (bfd_lookup_arch): Likewise.
44 (bfd_set_arch_info): Rewrite accordingly. Change argument to be a
46 (bfd_default_arch_struct): Make const.
47 (bfd_arch_init, bfd_arch_linkin): Remove.
48 (bfd_get_arch_info): Return a const pointer.
49 * init.c (bfd_init): Don't call bfd_arch_init.
50 * bfd.c (struct _bfd): Make arch_info const.
53 * configure.in: Put & before everything in $selarchs.
55 * cpu-*.c: Change bfd_*_arch from a function which calls
56 bfd_arch_linkin to a const structure.
57 * ieee.c (ieee_object_p): Make arch const.
61 * reloc.c (bfd_reloc_code_type): Add relocations to support all of
63 * bfd-in2.h: Regenerate.
64 * libbfd.h: Regenerate.
66 * elf32-ppc.c (reloc_type): Update names to match current draft.
67 (ppc_elf_howto_raw): Mark 14 bit relocs as short sized and PC
68 relative. Update names to current V.4 draft.
69 (ppc_elf_reloc_type_lookup): Add support for more relocations.
70 (ppc_elf_relocate_section): Rename relocations to match draft.
74 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Allow modules
75 compiled with -mrelocatable-lib to be linked with either normal
76 modules or -mrelocatable modules.
80 * coffcode.h (coff_write_object_contents): Clear the vstamp field
83 * aoutx.h (NAME(aout,swap_ext_reloc_out)): Don't set r_extern for
84 a reloc against a local symbol, even if it's not a section.
88 * targets.c (bfd_target): Remove unused align_power_min field.
90 * All backends: Remove initialization of align_power_min.
94 * peicode.h (coff_swap_scnhdr_out): Get sizes for BSS right.
98 * config.bfd (mips-dec-netbsd*): New target.
99 * configure.host (mips-dec-netbsd*): New host.
100 * configure.in (mips-dec-netbsd*): New native.
101 * configure: Rebuild.
105 Make the COFF backend linker merge common types:
106 * cofflink.c (struct coff_debug_merge_element): Define.
107 (struct coff_debug_merge_type): Define.
108 (struct coff_debug_merge_hash_entry): Define.
109 (struct coff_debug_merge_hash_table): Define.
110 (coff_debug_merge_hash_table_init): Define.
111 (coff_debug_merge_hash_table_free): Define.
112 (coff_debug_merge_hash_lookup): Define.
113 (struct coff_final_link_info): Add debug_merge field.
114 (coff_debug_merge_hash_newfunc): New static function.
115 (_bfd_coff_final_link): Allocate and free debug_merge table.
116 (coff_link_input_bfd): Merge identical enum, struct and union
121 Convert i960 COFF to use COFF backend linker.
122 * coff-i960.c (coff_i960_relocate): Use a coff_section_data
123 structure to store the symbol being used.
124 (coff_i960_start_final_link): New static function.
125 (coff_i960_relocate_section): New static function.
126 (coff_i960_adjust_symndx): New static function.
127 (coff_start_final_link): Define.
128 (coff_relocate_section): Define.
129 (coff_adjust_symndx): Define.
130 * coffcode.h (bfd_coff_backend_data): Add new callback function
131 _bfd_coff_start_final_link.
132 (bfd_coff_start_final_link): Define.
133 (coff_start_final_link): Define if not defined.
134 (bfd_coff_std_swap_table): Add coff_start_final_link.
135 * cofflink.c (_bfd_coff_internal_syment_name): Make globally
137 (_bfd_coff_final_link): Call bfd_coff_start_final_link if the
138 function callback is not NULL.
139 * libcoff-in.h (struct coff_section_tdata): Add tdata field.
140 (_bfd_coff_internal_syment_name): Declare.
141 * libcoff.h: Rebuild.
142 * configure.in (icoff_big_vec): Add cofflink.o.
143 (icoff_little_vec): Likewise.
144 * configure: Rebuild.
148 * Makefile.in (clean-info): Remove extraneous tab from line
153 * cofflink.c (coff_link_input_bfd): Fail if a section with no
158 * coffcode.h (coff_compute_section_file_positions): Keep the
160 (coff_write_object_contents): Remember if it's a relocatable
162 * libcoff-in.h (pe_data_type): New member 'has_reloc_section'
163 * peicode.h (coff_swap_filehdr_out): Clear not-reloc flag
164 if relocatable file. Swap out saved raw size.
168 * Makefile.in (do_maintainer_clean): Rename from do_realclean.
169 (maintainer-clean): Rename from realclean, passing
170 maintainer-clean down to subdirectories, but leave realclean as a
173 * linker.c (_bfd_generic_link_add_one_symbol): Pass symbol name to
176 * dep-in.sed: Remove config.h from generated dependencies.
178 * sunos.c (sunos_slurp_dynamic_symtab): New static function,
179 broken out of sunos_canonicalize_dynamic_symtab.
180 (sunos_canonicalize_dynamic_symtab): Call new function
181 sunos_slurp_dynamic_symtab.
182 (sunos_add_dynamic_symbols): Add three new parameters. Return the
183 dynamic symbol table to the caller.
184 * aoutx.h (aout_link_add_symbols): Permit add_dynamic_symbols
185 callback to override the symbols being read.
186 * libaout.h (struct aout_backend_data): Add three new parameters
187 to add_dynamic_symbols callback.
189 Extensive minor changes to avoid various gcc warnings. Also:
190 * Makefile.in (BFD32_BACKENDS): Remove coff-arm.o.
191 * archures.c (bfd_arch_info_type): Change mach field from long to
193 (bfd_lookup_arch): Change machine parameter from long to unsigned
198 * sunos.c (sunos_scan_std_relocs): Fix BFD_ASSERT: it's OK to find
199 a symbol with a non-zero plt_offset.
203 * elfcode.h (align_file_position): Remove; not used.
205 * configure.in: Only check for <sys/procfs.h> on a native system,
206 and make sure it defines prstatus_t.
207 * configure: Rebuild.
211 * sunos.c (sunos_write_dynamic_symbol): Correct m68k abort test.
213 * config.in: Rename from config.h.in.
214 * configure.in: Call AC_CONFIG_HEADER with config.h:config.in.
215 Check for config.h:config.in when creating stamp-h.
216 * configure: Rebuild.
217 * Makefile.in (stamp-h): Depend upon config.in rather than
218 config.h.in. Set CONFIG_HEADERS to config.h:config.in when
219 calling config.status.
221 * Makefile.in (do_distclean): Remove config.h and stamp-h.
222 (Makefile): Just rebuild Makefile.
223 (config.h, stamp-h): New targets.
224 * configure.in: Create stamp-h when rebuilding config.h.
225 * configure: Rebuild.
229 * configure.in: Call AC_CONFIG_HEADER. Substitute
230 HOST_64BIT_LONG. Check that various header files exist. Check
231 that fcntl exists. Call BFD_BINARY_FOPEN. Check whether malloc
232 and/or free need to be declared. Don't make a link to sysdep.h.
233 Define TRAD_HEADER for various hosts.
234 * configure: Rebuild.
235 * configure.host: Don't set my_host. Add definitions taken from
236 host header files for various entries. Remove entries which now
238 * acconfig.h: New file.
239 * config.h.in: New file, built by autoheader.
240 * sysdep.h: New file.
241 * Makefile.in (do_distclean): Don't remove sysdep.h.
243 (LOCAL_H_DEPS): New variable.
244 ($(BFD_LIBS)): Use $(LOCAL_H_DEPS) rather than libbfd.h and
246 ($(BFD_MACHINES), $(BFD_BACKENDS)): Likewise.
247 ($(OPTIONAL_BACKENDS)): Likewise.
248 (stmp-bfd.h): Just substitute for BFD_HOST_64BIT_LONG, rather than
249 looking through sysdep.h.
250 * bfd-in.h (BFD_HOST_64BIT_LONG): Define; set by Makefile.
251 (BFD_HOST_64_BIT): Define based on BFD_HOST_64BIT_LONG.
252 (fprintf_vma, sprintf_vma): Likewise.
253 (int64_type, uint64_type): Don't define.
254 * bfd-in2.h: Rebuild.
255 * archures.c, bfd.c, srec.c: Include <ctype.h>.
256 * elfcore.h: Check HAVE_SYS_PROCFS_H rather than HAVE_PROCFS.
257 * lynx-core.c: Include stuff from old hosts/lynx.h.
258 * opncls.c (bfd_fdopenr): Check HAVE_FNCTL and defined (F_GETFL),
259 rather than NO_FCNTL.
260 * targets.c (bfd_target_list): Check HOST_HPPAHPUX and ! __STDC__
261 rather than NATIVE_HPPAHPUX_COMPILER.
262 * trad-core.c: Don't include <errno.h>. Include TRAD_HEADER if it
264 * hosts/*.h: Remove all header files which merely include,
265 declare, and define things. Leave header files which define
266 information needed by trad-core.c.
268 * aclocal.m4 (BFD_BINARY_FOPEN): Define.
269 (BFD_CC_FOR_BUILD): Define.
270 * configure.in: Use BFD_CC_FOR_BUILD.
271 * configure: Rebuild.
275 * aclocal.m4: Don't try to grep ../Makefile if it doesn't exist.
276 * configure: Rebuild.
278 * coff-sparc.c (CALC_ADDEND): Don't set the addend to the value of
283 * config.bfd: i386pe_ve -> i386pe_vec.
287 * configure.host: Incorporate host Makefile fragments by setting
289 * configure.in: Call AC_PROG_CC. Substitute CFLAGS, HDEFINES and
290 AR. Call AC_PROG_INSTALL. Substitute CC_FOR_BUILD, choosing a
291 value based on whether the code is being compiled by a cross
292 compiler. Don't substitute host_makefile_frag or frags.
293 * aclocal.m4: New file to define local AC_PROG_CC.
294 * configure: Rebuild.
295 * Makefile.in (INSTALL): Set to @INSTALL@.
296 (INSTALL_PROGRAM): Set to @INSTALL_PROGRAM@.
297 (INSTALL_DATA): Set to @INSTALL_DATA@.
299 (CC): Define as @CC@.
300 (CFLAGS): Set to @CFLAGS@.
301 (CC_FOR_BUILD): Set to @CC_FOR_BUILD@.
302 (@host_makefile_frag@): Remove.
303 (ALL_CFLAGS): Change $(HDEFINES) to @HDEFINES@. Move $(CFLAGS)
305 (config.status): Remove dependency upon @frags@.
306 * config/*.mh, config/README: Remove.
308 * config.bfd: Rewrite to incorporate the contents of the Makefile
309 fragments by setting shell variables, rather than merely returning
310 the name of a Makefile fragment.
311 * configure.in: Use shell variables set by config.bfd rather than
312 looking at the target Makefile fragment files. Don't substitute
313 target_makefile_frag. Do substitute TDEFINES.
314 * configure: Rebuild.
315 * Makefile.in (@target_makefile_frag@): Remove.
316 (ALL_CFLAGS): Change $(TDEFINES) to @TDEFINES@.
317 * config/*.mt: Remove.
321 * configure.in: Put changequote lines around "i[345]86" patterns
322 section of core file support.
326 * som.c (som_bfd_print_private_bfd_data): Define to use the
331 * peicode.h (coff_swap_aouthdr_in): Add ImageBase to
332 entry, text_start and data_start.
336 * Makefile.in (OFILES): Remove $(TDEPFILES).
337 * config/apollo.mt (TDEPFILES): Remove.
338 * config/README: Update.
340 * configure.in: For a native configuration, set COREFILE and
341 COREFLAG based on the canonical host name.
342 * configure: Rebuild.
343 * Makefile.in: Rebuild dependencies.
344 (ALL_CFLAGS): Add @COREFLAG@.
345 (OFILES): Replace $(HDEPFILES) with @COREFILE@.
346 * coff-rs6000.c: Check AIX_CORE rather than HOST_AIX for core file
347 support routines. Check LYNX_CORE rather than HOST_LYNX.
348 * lynx-core.c: Check LYNX_CORE rather than HOST_LYNX.
349 * i386lynx.c: Likewise.
350 * m68klynx.c: Likewise.
351 * sparclynx.c: Likewise.
352 * rs6000-core.c: Check AIX_CORE rather than HOST_AIX.
353 * *-core.c: Comment changes.
354 * config/decstation.mh (HDEPFILES): Remove.
355 (HDEFINES): Remove -DTRAD_CORE.
356 * config/irix3.mh (RANLIB): Remove.
357 * config/irix4.mh (HDEPFILES, RANLIB): Remove.
358 (HDEFINES): Remove -DIRIX_CORE.
359 * config/riscos.mh (RANLIB, HDEPFILES): Remove.
360 (HDEFINES): Remove -DTRAD_CORE.
361 * config/ncr3000.mh (AR_FLAGS, RANLIB): Remove.
362 * config/ultra3.mh (RANLIB): Remove.
363 * config/aix4.mh, config/alphaosf.mh, config/amix.mh: Remove.
364 * config/apollo.mh, config/delta68.mh, config/delta88.mh: Remove.
365 * config/dpx2.mh, config/esix.mh, config/harris.mh: Remove.
366 * config/hp300.mh, config/hp300bsd.mh, config/hppabsd.mh: Remove.
367 * config/hppahpux.mh, config/hppaosf.mh: Remove.
368 * config/i386aix.mh, config/i386bsd.mh: Remove.
369 * config/i386linux.mh, config/i386mach3.mh: Remove.
370 * config/i386sco.mh, config/i386v.mh, config/i386v4.mh: Remove.
371 * config/irix5.mh, config/m88kmach3.mh, config/mipsbsd.mh: Remove.
372 * config/mipsmach3.mh, config/news-mips.mh: Remove.
373 * config/news.mh, config/pc532mach.mh, config/riscix.mh: Remove.
374 * config/rs600.mh, config/rs6000lynx.mh: Remove.
375 * config/solaris2.mh, config/stratus.mh: Remove.
376 * config/symmetry.mh, config/sysv4.mh, config/tahoe.mh: Remove.
377 * config/vaxbsd.mh, config/vaxult.mh, config/vaxult2.mh: Remove.
381 * elflink.h (elf_bfd_final_link): Don't change a DT_INIT or
382 DT_FINI entry if the appropriate symbol is not in the hash table.
384 * libelf.h (struct elf_backend_data): Add create_program_headers
385 and want_hdr_in_seg fields.
386 * elfxx-target.h (elf_backend_want_hdr_in_seg): Define if not
388 (elf_backend_create_program_headers): Likewise.
389 (elfNN_bed): Initialize create_program_headers and
391 * elf.c (get_program_header_size): Call create_program_headers
393 (map_program_segments): Check want_hdr_in_seg backend field. Call
394 create_program_headers backend routine.
396 * elf.c (assign_file_positions_except_relocs): Align non allocated
397 sections when creating an executable.
399 * elfcode.h (elf_swap_phdr_in): Make non static.
400 (elf_swap_phdr_out): Make non static.
401 * libelf.h (bfd_elf32_swap_phdr_in): Declare.
402 (bfd_elf32_swap_phdr_out): Declare.
403 (bfd_elf64_swap_phdr_in): Declare.
404 (bfd_elf64_swap_phdr_out): Declare.
406 * ecofflink.c (ecoff_collect_shuffle): New static function.
407 (_bfd_ecoff_get_accumulated_pdr): New function.
408 (_bfd_ecoff_get_accumulated_sym): New function.
409 (_bfd_ecoff_get_accumulated_ss): New function.
410 * libbfd-in.h (_bfd_ecoff_get_accumulated_pdr): Declare.
411 (_bfd_ecoff_get_accumulated_sym): Declare.
412 (_bfd_ecoff_get_accumulated_ss): Declare.
417 * libecoff.h (_bfd_ecoff_bfd_print_private_bfd_data): Fix typo.
419 * elflink.h (elf_link_add_object_symbols): Handle indirect and
420 warning symbols. If any section is named .gnu.warning.XXX, treat
421 the contents as a warning to be issued if the symbol XXX is
423 (elf_link_output_extsym): For an indirect or warning symbol, just
424 output the symbol it points to.
426 * linker.c (_bfd_link_hash_newfunc): Don't bother to set bfd_error
427 if bfd_hash_allocate fails, since it will already be set.
428 (generic_link_hash_newfunc): Likewise.
429 (archive_hash_newfunc): Likewise.
430 (hash_entry_bfd): New static function.
431 (_bfd_generic_link_add_one_symbol): Pass new arguments to warning
432 callback. Allocate a new warning using the hash table newfunc.
433 Use bfd_hash_replace to update the entry in the hash table, rather
434 than assuming we can copy the fields with structure assignment.
436 * hash.c (bfd_hash_replace): New function.
437 * bfd-in.h (bfd_hash_replace): Declare.
438 * bfd-in2.h: Rebuild.
442 * config.bfd: Add mips*vr4300-*-elf* target.
443 * config/mipsbvr4300.mt: Added.
452 version-control: never