* config/tc-v850.c (reg_name_search): Generalize to search
[deliverable/binutils-gdb.git] / bfd / ChangeLog
1 Thu Aug 22 10:54:38 1996 Ian Lance Taylor <ian@cygnus.com>
2
3 * configure.host (HLDENV): New variable to set. Set it for
4 *-*-sysv4*, since those linkers may not support -R but they always
5 support LD_RUN_PATH.
6
7 * libieee.h (NSECTIONS): Don't define.
8 (ieee_data_struct): Change section_table to asection **. Add
9 section_table_size.
10 * ieee.c (get_section_entry): If the table isn't big enough, make
11 it bigger.
12 (ieee_slurp_sections): Remove assertion about number of sections.
13 (ieee_object_p): Adjust initialization of ieee to match changes to
14 the structure.
15
16 * xcofflink.c (xcoff_mark): Don't copy relocs for undefined
17 symbols merely because we are generating a shared library.
18 (xcoff_build_ldsyms): Don't set up global linkage code for an
19 undefined symbol merely because we are generating a shared
20 library.
21
22 start-sanitize-v850
23 Tue Aug 20 15:06:05 1996 J.T. Conklin <jtc@hippo.cygnus.com>
24
25 * Makefile.in (ALL_MACHINES): Add cpu-v850.o.
26 (BFD32_BACKENDS) Add elf32-v850.o.
27 * archures.c: Add bfd_v850_arch.
28 * bfd-in2.h: Add bfd_v850_arch.
29 * config.bfd (v850-*-*): New target.
30 * configure: (bfd_elf32_v850_vec) New vector.
31 * configure.in: (bfd_elf32_v850_vec) New vector.
32 * cpu-v850.c: New file.
33 * elf.c (prep_headers): Added case bfd_arch_v850.
34 * elf32-v850.c: New file.
35 * targets.c (bfd_elf32_v850_vec): New vector.
36
37 end-sanitize-v850
38 Fri Aug 16 16:25:35 1996 Ian Lance Taylor <ian@cygnus.com>
39
40 * xcofflink.c (xcoff_link_add_dynamic_symbols): Create and define
41 a function code symbol for an XMC_XO symbol.
42
43 Thu Aug 15 12:33:29 1996 Stan Shebs <shebs@andros.cygnus.com>
44
45 * mpw-config.in: Update editing of autoconf vars to reflect
46 Jul 18 configure.in change.
47 * mpw-make.sed: Update editing of include pathnames to be
48 more general, add @DASH_C_FLAG@ to explicit compile rule edit.
49
50 Thu Aug 15 10:35:13 1996 Richard Henderson <rth@tamu.edu>
51
52 * elf64-alpha.c (elf64_alpha_output_extsym): The section from
53 which to offset to get the .plt entry address is ".plt".
54
55 Thu Aug 15 16:40:30 1996 James G. Smith <jsmith@cygnus.co.uk>
56
57 * reloc.c: (BFD_RELOC_ARM_THUMB_ADD, BFD_RELOC_ARM_THUMB_IMM,
58 BFD_RELOC_ARM_THUMB_SHIFT, BFD_RELOC_ARM_THUMB_OFFSET):
59 Added, for internal use by the ARM gas.
60 * libbfd.h: Rebuilt
61 * bfd-in2.h: Rebuilt
62
63 Wed Aug 14 17:02:09 1996 Richard Henderson <rth@tamu.edu>
64
65 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Correct typo
66 in section dynidx start.
67
68 Tue Aug 13 14:35:38 1996 Ian Lance Taylor <ian@cygnus.com>
69
70 * elf.c (_bfd_elf_make_section_from_shdr): Treat sections whose
71 name begins with .gnu.linkonce as SEC_LINK_ONCE. This is an
72 optimization for g++.
73
74 Tue Aug 13 17:04:40 1996 Michael Meissner <meissner@tiktok.cygnus.com>
75
76 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): If one module has
77 the -mrelocatable-lib bit set and the other doesn't, clear the
78 -mrelocatable-lib bit in the header.
79
80 Sat Aug 10 22:59:17 1996 Ian Lance Taylor <ian@cygnus.com>
81
82 * elflink.h (elf_link_add_object_symbols): Do not resolve a common
83 symbol against a STT_FUNC symbol in a shared library.
84
85 Fri Aug 9 12:44:57 1996 Ian Lance Taylor <ian@cygnus.com>
86
87 * xcofflink.c (xcoff_link_add_dynamic_symbols): If a descriptor
88 symbol is found, automatically define the corresponding function
89 code.
90
91 * cofflink.c (coff_link_add_symbols): Only set (*sym_hash)->numaux
92 if sym.n_numaux is not zero.
93 (_bfd_coff_link_input_bfd): Permit the symbol and the hash table
94 entry to disagree about the number of aux entries if the symbol
95 has zero.
96
97 * elf32-mips.c (mips_elf_check_relocs): Create the .rel.dyn
98 section if it might be needed, not just if info->shared.
99 (mips_elf_adjust_dynamic_symbol): Make room for a null element at
100 the start of .rel.dyn if we are going to use it.
101 (mips_elf_finish_dynamic_sections): Only clear the first element
102 of .rel.dyn if the size is greater than zero.
103
104 Thu Aug 8 16:24:55 1996 Ian Lance Taylor <ian@cygnus.com>
105
106 * xcofflink.c (xcoff_link_input_bfd): If we already called the
107 undefined_symbol callback for a symbol, then don't issue any more
108 warnings about loader relocs.
109 (_bfd_ppc_xcoff_relocate_section): Don't do any further processing
110 after calling the undefined_symbol callback.
111
112 * xcofflink.c (XCOFF_MULTIPLY_DEFINED): Define.
113 (xcoff_link_add_symbols): Permit multiple definitions of a symbol
114 as the AIX linker seems to do.
115
116 Thu Aug 8 12:21:56 1996 Klaus Kaempf <kkaempf@progis.de>
117
118 * evax-alpha.c (evax_alpha_vec): Corrected flags, cleanup.
119 (evax_initialize): Remove evax_reloc_table.
120 (evax_close_and_cleanup): Ditto.
121 (reloc_nil): Ditto.
122 (alpha_howto_table): Remove ALPHA_R_SWREL32 and ALPHA_R_SWREL64
123 entries.
124 (evax_bfd_reloc_type_lookup): Ditto.
125 * evax-egsd.c (_bfd_evax_slurp_egsd): Add a few casts; set
126 cooked_size == raw_size.
127 * evax-emh.c (_bfd_evax_register_filename): Remove.
128 * evax-etir.c (etir_stc): Allow ETIR_S_C_STC_xx commands.
129 * evax-misc.c (add_new_contents): Malloc section at full size.
130 (_bfd_save_evax_section): Memcpy section contents directly.
131 * evax.h (ALPHA_R_SWREL32, ALPHA_R_SWREL64): Remove.
132 (evax_reloc_table): Remove.
133
134 * hosts/alphavms.h (O_ACCMODE): Define if needed.
135
136 * makefile.vms: Add better support for DEC C compilation
137 Add evax.h dependencies
138
139 * reloc.c (bfd_get_reloc_size): Add case for 16 byte reloc.
140 (BFD_RELOC_SWREL32,BFD_RELOC_SWREL64): Remove.
141 (BFD_RELOC_ALPHA_BASEREG): Remove.
142 * bfd-in2.h, libbfd.h: Rebuild.
143
144 Thu Aug 8 08:17:32 1996 Stu Grossman (grossman@critters.cygnus.com)
145
146 * archive.c (bsd_write_armap): Ifdef around calls to getuid and
147 getgid if _WIN32 is defined.
148 * opncls.c (bfd_fdopenr): Remove unnecessary WINGDB ifdef.
149
150 Wed Aug 7 23:19:00 1996 Stu Grossman (grossman@critters.cygnus.com)
151
152 * aoutx.h bfd-in.h bfd-in2.h opncls.c riscix.c som.c targets.c:
153 Change NO_FLAGS to BFD_NO_FLAGS to avoid conflict with an HPUX
154 include file.
155 * libbfd.c: Create dummy getpagesize() macro if HAVE_GETPAGESIZE
156 isn't defined.
157
158 Wed Aug 7 14:11:44 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
159
160 * configure.in: Call BFD_NEEDED_DECLARATION on strstr and
161 realloc.
162 * acconfig.h (NEED_DECLARATION_STRSTR): New macro.
163 (NEED_DECLARATION_REALLOC): New macro.
164 * configure, config.in: Rebuild.
165 * sysdep.h (strstr): Declare if NEED_DECLARATION_STRSTR.
166 (realloc): Declare if NEED_DECLARATION_REALLOC.
167
168 * aclocal.m4 (BFD_NEED_DECLARATION): Include <string.h> or
169 <strings.h> if they exist.
170
171 * ieee.c (ieee_set_section_contents): Cast bfd_alloc return.
172
173 Wed Aug 7 12:12:03 1996 Ian Lance Taylor <ian@cygnus.com>
174
175 * cpu-i386.c (i8086_arch): Architecture info for the i8086.
176
177 Based on patches from Eric Valette <valette@crf.canon.fr>:
178 * elf32-i386.c (enum reloc_type): Add FIRST_INVALID_RELOC,
179 LAST_INVALID_RELOC, R_386_16, R_386_PC16, R_386_8, R_386_PC8.
180 (elf_howto_table): Add entries for new relocs.
181 (elf_i386_reloc_type_lookup): Handle new relocs.
182 (elf_i386_info_to_howto): Just call abort.
183 (elf_i386_info_to_howto_rel): Check that the reloc type is valid.
184 (elf_i386_relocate_section): Likewise.
185
186 start-sanitize-d10v
187 Tue Aug 6 12:54:56 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
188
189 * elf32-d10v.c (elf_d10v_howto_table): Added R_D10V_32.
190
191 end-sanitize-d10v
192 Mon Aug 5 13:42:41 1996 Ian Lance Taylor <ian@cygnus.com>
193
194 * elf.c (_bfd_elf_make_section_from_shdr): For a loadable section,
195 only get the LMA from the phdr if they are in the same part of the
196 file.
197
198 * elf.c (map_sections_to_segments): Rewrite tests for starting a
199 new segment to make them more comprehensible. If the relationship
200 between the LMA and the VMA changed, start a new segment. Don't
201 check dynsec when deciding whether to start a new segment for a
202 writeable section; -N will now handle this.
203
204 Thu Aug 1 22:43:08 1996 Jeffrey A Law (law@cygnus.com)
205
206 * libhppa.h: Remove "esel" changes. Not the right approach.
207 * som.c: Corresponding changes.
208 (som_bfd_derive_misc_symbol_info): Use ST_DATA for symbols
209 which don't have a SOM symbol type associated with them.
210 Reverses a 1994 change.
211
212 Wed Jul 31 15:50:55 1996 Ian Lance Taylor <ian@cygnus.com>
213
214 Make ld -N more reasonable for ELF:
215 * elf.c (map_sections_to_segments): If D_PAGED is not set, set
216 phdr_in_section to false, and always use a single load segment.
217 (elf_sort_sections): Sort sections by LMA after VMA.
218 (assign_file_positions_for_segments): If D_PAGED is not set, don't
219 align to maxpagesize.
220 (assign_file_positions_except_relocs): Likewise.
221 * elfcode.h (elf_object_p): If a section is loaded but not page
222 aligned, clear D_PAGED.
223
224 Wed Jul 31 15:00:12 1996 James G. Smith <jsmith@cygnus.co.uk>
225
226 * reloc.c: (BFD_RELOC_ARM_OFFSETIMM8, BFD_RELOC_ARM_HWLITERAL):
227 Added, for internal use by the ARM gas.
228 * libbfd.h: Rebuilt
229 * bfd-in2.h: Rebuilt
230
231 Tue Jul 30 14:14:57 1996 Jeffrey A Law (law@cygnus.com)
232
233 * libhppa.h (R_HPPA_ESEL): New field selector.
234 (e_esel): Similarly.
235 * som.c (hppa_som_gen_reloc_type): If we encounter an e_esel,
236 then generate R_COMP2 (PUSH_SYM), R_DATA_EXPR fixup stream.
237 (som_write_fixups): Handle R_DATA_EXPR just like R_CODE_EXPR.
238
239 Tue Jul 30 13:31:27 1996 Ian Lance Taylor <ian@cygnus.com>
240
241 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Do the regular
242 archive search before looking for stripped dynamic objects.
243
244 Fri Jul 26 17:51:39 1996 Ian Lance Taylor <ian@cygnus.com>
245
246 * xcofflink.c (xcoff_build_ldsyms): Make exporting an undefined
247 symbol a warning rather than an error.
248
249 Wed Jul 24 12:02:53 1996 Ian Lance Taylor <ian@cygnus.com>
250
251 * elf.c (assign_file_positions_for_segments): Track the virtual
252 memory position separately from the file position, and use it to
253 compute the alignment adjustment.
254
255 start-sanitize-d10v
256 Tue Jul 23 10:43:31 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
257
258 * elf32-d10v.c (elf_d10v_howto_table): Changed all relocs to "long"
259 and fixed mask on R_D10V_10_PCREL_L.
260
261 end-sanitize-d10v
262 Mon Jul 22 15:30:30 1996 Ian Lance Taylor <ian@cygnus.com>
263
264 * elf64-mips.c: Include "aout/ar.h".
265 (mips_elf64_slurp_armap): New static function.
266 (mips_elf64_write_armap): New static function.
267 (bfd_elf64_archive_*): Define.
268 * elfxx-target.h (bfd_elfNN_archive_p): Define if not defined.
269 Use instead of bfd_generic_archive_p.
270 (bfd_elfNN_write_archive_contents): Define if not defined. Use
271 instead of _bfd_write_archive_contents.
272 (bfd_elfNN_mkdarchive): Define if not defined. Use instead of
273 _bfd_generic_mkarchive.
274 (TARGET_BIG_SYM): If bfd_elfNN_archive_functions is defined, use
275 bfd_elfNN_archive in BFD_JUMP_TABLE_ARCHIVE rather than
276 _bfd_archive_coff.
277 (TARGET_LITTLE_SYM): Likewise.
278 * archive.c (bfd_slurp_armap): Check for and reject an archive map
279 name of /SYM64/.
280 * Makefile.in: Rebuild dependencies.
281
282 * elf32-mips.c (_bfd_mips_elf_final_write_processing): Handle
283 SHT_MIPS_LIBLIST, SHT_MIPS_CONTENT, SHT_MIPS_SYMBOL_LIB, and
284 SHT_MIPS_EVENTS sections.
285 (_bfd_mips_elf_section_from_shdr): Handle SHT_MIPS_IFACE,
286 SHT_MIPS_CONTENT, SHT_MIPS_SYMBOL_LIB, and SHT_MIPS_EVENTS
287 sections.
288 (_bfd_mips_elf_fake_sections): Likewise.
289
290 * libecoff.h (ecoff_data_type): Add rdata_in_text field.
291 * ecoff.c (ecoff_compute_section_file_positions): Copy
292 rdata_in_text from backend info to tdata. Clear it if any data
293 section comes before .rdata.
294 (_bfd_ecoff_write_object_contents): Use rdata_in_text field in
295 tdata rather than backend info.
296
297 Fri Jul 19 18:15:51 1996 Ian Lance Taylor <ian@cygnus.com>
298
299 * configure.in: Fix test for whether a compiler has a 64 bit
300 type. From Jim Wilson <wilson@cygnus.com>.
301
302 Thu Jul 18 15:39:10 1996 Ian Lance Taylor <ian@cygnus.com>
303
304 * configure.host (mips-sgi-irix6*): New host.
305
306 * configure.in: Set and substitute VERSION, BFD_HOST_64BIT_LONG
307 (replacing HOST_64BITLONG), BFD_HOST_64_BIT_DEFINED,
308 BFD_HOST_64_BIT, and BFD_HOST_U_64_BIT. Add bfd-in2.h:bfd-in2.h
309 to AC_OUTPUT call.
310 * configure: Rebuild.
311 * bfd-in.h (BFD_ARCH_SIZE): Define as @wordsize@, not @WORDSIZE@.
312 (BFD_HOST_64_BIT): Define conditionally.
313 (BFD_HOST_U_64_BIT): Define when BFD_HOST_64_BIT is defined.
314 (bfd_vma): Typedef as BFD_HOST_U_64_BIT.
315 (symvalue, bfd_size_type): Likewise.
316 * bfd-in2.h: Rebuild.
317 * Makefile.in (do_clean): Remove bfd-tmp.h.
318 (do_distclean): Remove bfd-in3.h.
319 (stmp-bfd.h): Just do copy-if-change bfd-in3.h bfd.h.
320 (bfd-in3.h): New target.
321
322 * config.bfd (sparc-*-sysv4*): Don't build sunos_big_vec. From
323 Andrew Gierth <ANDREWG@microlise.co.uk>.
324
325 * configure.host: Set INSTALL_SHLIB.
326 * configure.in: Call AC_SUBST (INSTALL_SHLIB).
327 * configure: Rebuild.
328 * Makefile.in (install): Use @INSTALL_SHLIB@.
329
330 * config.bfd (mips*-*-irix6*): New target.
331 * configure.host: Handle Irix 6 shared library like Irix 5.
332
333 * xcofflink.c (xcoff_link_add_symbols): Don't check an XMC_TD
334 symbol for a magic name.
335 (xcoff_link_input_bfd): Don't change the reloc symbol for an
336 XMC_TD symbol.
337 (_bfd_ppc_xcoff_relocate_section): Don't get the TOC offset for an
338 XMC_TD symbol.
339
340 Thu Jul 18 11:36:31 1996 Stan Shebs <shebs@andros.cygnus.com>
341
342 * mpw-config.in: Add ELF support to mips config, create the
343 elf32-target.h file in the object dir.
344 * mpw-make.sed: Edit elfXX-target.h refs at beginnings of lines.
345
346 Wed Jul 17 18:02:32 1996 Kim Knuttila <krk@cygnus.com>
347
348 * coff-ppc.c: Redid debug scheme - numerous fprintf's gone.
349 Also removed most abort calls, in favor of using bfd reporting.
350
351 start-sanitize-d10v
352 Wed Jul 17 14:51:52 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
353
354 * Makefile.in (ALL_MACHINES): Add cpu-d10v.o.
355 (BFD32_BACKENDS) Add elf32-d10v.o.
356 * archures.c: Add bfd_d10v_arch.
357 * bfd-in2.h: Add bfd_d10v_arch.
358 * config.bfd (d10v-*-*): New target.
359 * configure: (bfd_elf32_d10v_vec) New vector.
360 * configure.in: (bfd_elf32_d10v_vec) New vector.
361 * cpu-d10v.c: New file.
362 * elf.c (prep_headers): Added case bfd_arch_d10v.
363 * elf32-d10v.c: New file.
364 * libbfd.h: Rebuild.
365 * reloc.c (BFD_RELOC_D10V_10_PCREL_R, BFD_RELOC_D10V_10_PCREL_L,
366 BFD_RELOC_D10V_18, BFD_RELOC_D10V_18_PCREL): Define.
367 * targets.c (bfd_elf32_d10v_vec): New vector.
368 end-sanitize-d10v
369
370 Wed Jul 17 10:58:55 1996 Kim Knuttila <krk@cygnus.com>
371
372 * coff-ppc.c (coff_ppc_relocate_section): Removed bogus fprintf
373
374 Tue Jul 16 23:49:02 1996 Stu Grossman (grossman@critters.cygnus.com)
375
376 * archures.c bfd-in2.h: Add bfd_mach_i386_i386 and
377 bfd_mach_i386_i8086 machine types.
378
379 Wed Jul 10 12:42:56 1996 Ian Lance Taylor <ian@cygnus.com>
380
381 * ecoff.c (_bfd_ecoff_new_section_hook): Set SEC_CODE for _INIT
382 and _FINI sections.
383
384 Wed Jul 10 11:18:21 1996 Richard Henderson <rth@tamu.edu>
385
386 * coffcode.h (coff_set_section_contents): A/UX does not require
387 special handling of the _LIB section.
388
389 Tue Jul 9 15:52:20 1996 Jeffrey A Law (law@cygnus.com)
390
391 * coff-h8300.c (h8300_reloc16_extra_cases): Use the correct
392 value for R_RELBYTE.
393
394 * reloc16.c (bfd_coff_reloc16_relax_section): Only "shrinks"
395 array if one was allocated.
396
397 Tue Jul 9 12:21:54 1996 Ian Lance Taylor <ian@cygnus.com>
398
399 From Kazumoto Kojima <kkojima@kk.info.kanagawa-u.ac.jp>:
400 * elf32-mips.c (struct mips_elf_link_hash_table): Add new fields
401 use_rld_obj_head and rld_value.
402 (mips_elf_link_hash_table_create): Initialize new fields.
403 (mips_elf_add_symbol_hook): Mark __rld_obj_head symbol as
404 dynamic.
405 (mips_elf_create_dynamic_sections): Create .rld_map section. If
406 __rld_obj_head symbol not seen, create an __rld_map symbol.
407 (mips_elf_size_dynamic_sections): Make space in .rld_map section.
408 Create a DT_MIPS_RLD_MAP entry rather than a DT_DEBUG entry.
409 (mips_elf_finish_dynamic_symbol): Save value of __rld_map or
410 __rld_obj_head symbol.
411 (mips_elf_finish_dynamic_sections): Handle DT_MIPS_RLD_MAP.
412
413 Mon Jul 8 16:18:03 1996 Ian Lance Taylor <ian@cygnus.com>
414
415 * elf32-mips.c (mips_reloc_map): Remove BFD_RELOC_32_PCREL entry.
416
417 * elf32-ppc.c (ppc_elf_howto_raw): For R_PPC_ADDR16_HA, use
418 ppc_elf_addr16_ha_reloc.
419 (ppc_elf_addr16_ha_reloc): New static function.
420
421 * coff-mips.c (struct mips_hi): Define.
422 (mips_refhi_list): New static variable.
423 (mips_refhi_addr, mips_refhi_addend): Remove.
424 (mips_refhi_reloc): Maintain a list of unmatched REFHI relocs.
425 (mips_reflo_reloc): Process mips_refhi_list.
426 (mips_relhi_list): New static variable.
427 (mips_relhi_addr, mips_relhi_addend): Remove.
428 (mips_relhi_reloc): Maintain a list of unmatched RELHI relocs.
429 (mips_rello_reloc): Process mips_relhi_list.
430 (mips_relocate_section): Permit an arbitrary number of REFHI or
431 RELHI relocs before the associated REFLO or RELLO reloc.
432
433 Fri Jul 5 19:27:49 1996 Ian Lance Taylor <ian@cygnus.com>
434
435 * aout-target.h (MY(callback)): Set reloc_count fields.
436
437 Thu Jul 4 12:00:37 1996 Ian Lance Taylor <ian@cygnus.com>
438
439 * sunos.c (sunos_add_dynamic_symbols): Don't create dynamic
440 sections unless this is a SunOS link.
441
442 * VERSION: Set to 2.7.1.
443
444 * Released binutils 2.7.
445
446 Wed Jul 3 14:59:47 1996 Ian Lance Taylor <ian@cygnus.com>
447
448 * i386aout.c: Include "aout/aout64.h".
449 (i386aout_write_object_contents): New static function.
450 (MY_write_object_contents): Define.
451
452 * netbsd.h (MY(write_object_contents)): Make sure that
453 adjust_sizes_and_vmas is called before fiddling with the magic
454 number.
455
456 Tue Jul 2 23:30:39 1996 Ian Lance Taylor <ian@cygnus.com>
457
458 * stabs.c (_bfd_link_section_stabs): Fix casts of psinfo.
459
460 Sun Jun 30 13:34:33 1996 Ian Lance Taylor <ian@cygnus.com>
461
462 * libbfd-in.h (itos, stoi): Don't define.
463 * libbfd.h: Rebuild.
464 * i386lynx.c (KEEPIT): Define as udata.i.
465 (NAME(lynx,swap_std_reloc_out)): Don't use stoi.
466 (NAME(lynx,swap_ext_reloc_out)): Likewise.
467 * riscix.c (riscix_swap_std_reloc_out): Use udata.i rather than
468 flags. Don't use stoi.
469
470 * elf32-mips.c (ELF_MAGPAGESIZE): Change definition to 0x1000.
471
472 * elf.c (map_sections_to_segments): Don't start a new segment for
473 a writable section if it's on the same page as the previous
474 segment. Reset the writable variable for a readonly section.
475
476 Sat Jun 29 16:18:51 1996 Kim Knuttila <krk@cygnus.com>
477
478 * peicode.h (coff_swap_aouthdr_in): Missing initializations of
479 first_thunk_address, thunk_size, and import_table_size.
480 * peicode.h: Improved some diagnostics regarding edata sections.
481
482 * coff-ppc.c (coff_ppc_relocate_section): Earlier error check
483 on IMGLUE relocs.
484 (coff_ppc_relocate_section): Improved diagnostic for large TOCDEFN's.
485 (TARGET_LITTLE_SYM): Added missing D_PAGED.
486
487 Fri Jun 28 13:48:45 1996 Ian Lance Taylor <ian@cygnus.com>
488
489 * xcofflink.c (xcoff_link_check_ar_symbols): An undefined symbol
490 with XCOFF_DEF_DYNAMIC set is really defined.
491 (xcoff_link_check_dynamic_ar_symbols): Likewise.
492 (xcoff_link_add_symbols): Only create special sections if using an
493 XCOFF hash table.
494
495 * reloc.c (bfd_perform_relocation): Handle xcoff-powermac like
496 aixcoff-rs6000.
497 (bfd_install_relocation): Likewise.
498
499 Fri Jun 28 11:17:00 1996 Richard Henderson <rth@tamu.edu>
500
501 * elf64-alpha.c (struct alpha_elf_link_hash_entry): Add flags
502 field.
503 (ALPHA_ELF_LINK_HASH_LU_ADDR): Define.
504 (ALPHA_ELF_LINK_HASH_LU_MEM): Define.
505 (ALPHA_ELF_LINK_HASH_LU_FUNC): Define.
506 (elf64_alpha_link_hash_newfunc): Initialize flags field.
507 (elf64_alpha_check_relocs): Record types of LITUSE entries that
508 are found for LITERAL relocs.
509 (elf64_alpha_adjust_dynamic_symbol): If a symbol has its address
510 taken, we cannot generate a .plt entry for the symbol.
511
512 Thu Jun 27 11:24:29 1996 Ian Lance Taylor <ian@cygnus.com>
513
514 * configure.in: Add AC_ISC_POSIX, and check for setitimer and
515 sysconf functions (for gprof).
516 * configure, config.in: Rebuild.
517
518 Wed Jun 26 16:29:02 1996 Ian Lance Taylor <ian@cygnus.com>
519
520 * ecoff.c (_bfd_ecoff_archive_p): Check the first object file in
521 an archive if it has a map. If the object file has the wrong
522 xvec, reject it.
523
524 * coff-alpha.c (alpha_adjust_reloc_in): Set the addend for a
525 BRADDR, SREL16, SREL32, or SREL64 reloc against an external
526 symbol.
527 (alpha_relocate_section): Likewise.
528
529 * coffswap.h (coff_swap_reloc_out): Use RELSZ, not sizeof.
530 (coff_swap_filehdr_out): Use FILHSZ, not sizeof.
531 (coff_swap_sym_out): Use SYMESZ, not sizeof.
532 (coff_swap_aux_out): Use AUXESZ, not sizeof.
533 (coff_swap_lineno_out): Use LINESZ, not sizeof.
534 (coff_swap_aouthdr_out): Use AOUTSZ, not sizeof.
535 (coff_swap_scnhdr_out): Use SCNHSZ, not sizeof.
536 * peicode.h: Corresponding changes.
537
538 Tue Jun 25 15:28:34 1996 Michael Meissner <meissner@tiktok.cygnus.com>
539
540 * elflink.h (elf_create_pointer_linker_section): Comment out code
541 dealing with making GOT pointers negative of the GOT symbol for
542 now.
543
544 Tue Jun 25 11:41:24 1996 Richard Henderson <rth@tamu.edu>
545
546 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't
547 increment the .rela.plt size until after we're done creating the
548 .plt entry.
549 (elf64_alpha_finish_dynamic_symbol): Change .plt entry to load the
550 .rela.plt offset directly rather than calculating it.
551
552 Mon Jun 24 17:15:10 1996 Jason Molenda (crash@godzilla.cygnus.co.jp)
553
554 * Makefile.in, (bindir, libdir, datadir, mandir, infodir, includedir):
555 Use autoconf-set values.
556 * doc/Makefile.in (bindir, libdir, datadir, mandir, infodir,
557 includedir, INSTALL, INSTALL_PROGRAM, INSTALL_DATA): Use autoconf-set
558 values.
559 (docdir): Deleted.
560 * configure.in (AC_PREREQ): autoconf v2.5 or higher.
561 * configure: Rebuilt.
562
563 Mon Jun 24 22:50:35 1996 Jeffrey A Law (law@cygnus.com)
564
565 * som.c (som_write_fixups): Fix typo in R_END_TRY for exception
566 handling code > 1k away.
567
568 Mon Jun 24 18:41:06 1996 Michael Meissner <meissner@tiktok.cygnus.com>
569
570 * elflink.h (elf_create_pointer_linker_section): If DEBUG is
571 defined, output whenever the symbol is updated.
572
573 Mon Jun 24 17:58:12 1996 Jouke Numan <jnuman@bazis.nl>
574
575 * elf.c (elf_fake_sections): Don't set sh_addr of a non SEC_ALLOC
576 section to 0 if user_set_vma is set.
577 * elflink.h (elf_bfd_final_link): Likewise.
578
579 Sun Jun 23 20:42:51 1996 Doug Evans <dje@canuck.cygnus.com>
580
581 Partially undo patch of Jun 20.
582 * coffcode.h (coff_set_alignment_hook): Use COFF_IMAGE_WITH_PE.
583 (coff_compute_section_file_positions): Likewise.
584 (coff_write_object_contents): Likewise. Re-add deleted code, but
585 use #ifdef COFF_WITH_PE, not COFF_OBJ_WITH_PE.
586 * peicode.h (pe_bfd_copy_private_bfd_data): Re-add #ifdef.
587
588 Fri Jun 21 17:38:15 1996 Joel Sherrill <joel@merlin.gcs.redstone.army.mil>
589
590 * config.bfd: Add support for *-*-rtems* configurations.
591
592 Fri Jun 21 15:19:59 1996 Ian Lance Taylor <ian@cygnus.com>
593
594 * elf.c (prep_headers): Add bfd_arch_alpha case.
595
596 Fri Jun 21 12:35:27 1996 Richard Henderson <rth@tamu.edu>
597
598 * elf64-alpha.c: New file.
599 * config.bfd (alpha-*-linuxecoff*): New target.
600 (alpha-*-linux*, alpha-*-elf*): New targets.
601 * configure.in (bfd_elf64_alpha_vec): New vector.
602 * configure: Rebuild.
603 * targets.c (bfd_elf64_alpha_vec): Declare.
604 (bfd_target_vector): Add bfd_elf64_alpha_vec if BFD64.
605 * reloc.c (BFD_RELOC_ALPHA_GPDISP): Define.
606 * bfd-in2.h, libbfd.h: Rebuild.
607 * Makefile.in: Rebuild dependencies.
608 (BFD64_BACKENDS): Add elf64-alpha.o.
609 (BFD64_BACKENDS_CFILES): Add elf64-alpha.c.
610
611 Thu Jun 20 18:14:25 1996 Ian Lance Taylor <ian@cygnus.com>
612
613 * ecoff.c (ecoff_armap_hash): If hlog is 0, just return 0, rather
614 than relying on a right shift of 32.
615
616 Thu Jun 20 11:00:57 1996 Doug Evans <dje@canuck.cygnus.com>
617
618 * coffcode.h (coff_set_alignment_hook): Change COFF_IMAGE_WITH_PE
619 ifdef to COFF_WITH_PE.
620 (coff_compute_section_file_positions): Likewise.
621 (coff_write_object_contents): Likewise. Delete COFF_OBJ_WITH_PE.
622 * pe-{arm,i386,ppc}.c (COFF_OBJ_WITH_PE): Delete.
623 * peicode.h (pe_bfd_copy_private_bfd_data): Delete ifdef
624 COFF_IMAGE_WITH_PE, always include.
625
626 * peicode.h (coff_swap_scnhdr_out): ".drectve" doesn't have trailing 0.
627
628 Wed Jun 19 11:37:52 1996 Ian Lance Taylor <ian@cygnus.com>
629
630 * elf.c (map_sections_to_segments): Fix up the test for -Ttext to
631 approximate the correct answer if SIZEOF_HEADERS was not used.
632
633 * binary.c (binary_set_section_contents): Set section file
634 position based on LMA rather than VMA.
635
636 Wed Jun 19 11:19:25 1996 Manfred Hollstein KS/EIC5 60/3/142 #40283 <manfred@lts.sel.alcatel.de>
637
638 * linker.c (_bfd_generic_link_output_symbols): Don't output any
639 symbols if info->strip == strip_all.
640
641 Tue Jun 18 15:17:36 1996 Jeffrey A. Law <law@rtl.cygnus.com>
642
643 * coff-h8300.c: Remove #if 0 code.
644 (compatable): Don't allow mixing/matching of different architectures.
645
646 * archures.c (bfd_mach_h8300s): Add.
647 * bfd-in2.h: Rebuilt.
648 * coff-h8300.c (funcvec_hash_newfunc): Handle H8/S too.
649 (BADMAG): Likewise.
650 (h8300_reloc16_estimate): Likewise.
651 (h8300_reloc16_extra_cases): Likewise.
652 (h8300_bfd_link_add_symbols): Likewise.
653 * coffcode.h (coff_set_arch_mach_hook): Likewise.
654 (coff_set_flags): Likewise.
655 * cpu-h8300.c (h8300_scan): Likewise.
656 Add H8/S to bfd_h8300_arch list.
657
658 Tue Jun 18 14:42:58 1996 Klaus Kaempf <kkaempf@progis.de>
659
660 Added support for Alpha OpenVMS:
661 * evax.h, evax-alpha.c, evax-egsd.c, evax-emh.c: New files.
662 * evax-etir.c, evax-misc.c, hosts/alphavms.h: New files.
663 * config.h-vms, makefile.vms: New files.
664 * config.bfd (alpha-*-*vms*): New target.
665 * configure.in (evax_alpha_vec): New target vector.
666 * configure: Rebuild.
667 * reloc.c (BFD_RELOC_SWREL32, BFD_RELOC_SWREL64): Define.
668 (BFD_RELOC_ALPHA_LINKAGE, BFD_RELOC_ALPHA_BASEREG): Define.
669 * targets.c (bfd_target_evax_flavour): Define.
670 (evax_alpha_vec): Declare.
671 (bfd_target_vector): Add ecoffalpha_little_vec and evax_alpha_vec
672 if BFD64 is defined.
673 * bfd-in2.h, libbfd.h: Rebuild.
674 * Makefile.in: Rebuild dependencies.
675 (BFD64_BACKENDS): Add evax-alpha.o, evax-egsd.o, evax-etir.o,
676 evax-emh.o, and evax-misc.o.
677 (BFD64_BACKENDS_CFILES): Add evax-alpha.c, evax-egsd.c,
678 evax-etir.c, evax-emh.c, and evax-misc.c.
679 (HFILES): Add evax.h.
680
681 Tue Jun 18 13:54:18 1996 Ian Lance Taylor <ian@cygnus.com>
682
683 * coff-h8300.c (h8300_reloc16_extra_cases): Make name a const
684 pointer.
685 (h8300_bfd_link_add_symbols): Likewise.
686
687 Mon Jun 17 10:06:50 1996 Jeffrey A. Law <law@rtl.cygnus.com>
688
689 * som.h (R_HPPA_BEGIN_TRY, R_HPPA_END_TRY): Define.
690 * som.c (som_write_fixups): Handle R_BEGIN_TRY and R_END_TRY.
691
692 Mon Jun 17 12:49:11 1996 Ian Lance Taylor <ian@cygnus.com>
693
694 * elf32-mips.c (mips_elf_relocate_section): Don't create a reloc
695 for R_MIPS_REL32 and R_MIPS_32 relocs if no dynamic sections were
696 created.
697 (mips_elf_check_relocs): Only create .rel.dyn for R_MIPS_REL32 and
698 R_MIPS_32 relocs if creating a shared library.
699
700 Thu Jun 13 20:14:51 1996 Doug Evans <dje@canuck.cygnus.com>
701
702 * peicode.h (add_data_entry): Use pei_section_data rather than
703 _cooked_size. Corresponds to May 13 change in coffcode.h.
704
705 Thu Jun 13 10:23:40 1996 Ian Lance Taylor <ian@cygnus.com>
706
707 * cofflink.c (_bfd_coff_final_link): Handle long section names.
708 * coffcode.h (coff_write_object_contents): If there are long
709 section names, always set the f_symptr field, even if there are no
710 symbols.
711 * peicode.h (coff_swap_filehdr_in): Don't clear the f_symptr field
712 if there are no symbols.
713
714 * coffgen.c (make_a_section_from_file): Check return value of
715 _bfd_coff_read_string_table.
716 (coff_real_object_p): Check return value of
717 make_a_section_from_file.
718 (_bfd_coff_read_string_table): Check that there are some symbols
719 before trying to read the string table size.
720
721 Wed Jun 12 11:16:37 1996 Ian Lance Taylor <ian@cygnus.com>
722
723 * xcofflink.c (xcoff_link_add_symbols): When considering whether
724 to replace a symbol in a dynamic object with a symbol from another
725 dynamic object, do the replacement if the existing symbol is
726 global linkage code.
727
728 * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Check explicitly
729 for _ptrgl, and treat it as global linkage code.
730
731 * aoutx.h (NAME(aout,find_nearest_line)): Notice if we find a
732 filename or N_SO symbol past the offset, and use it to indicate
733 that there is no line number or function when appropriate.
734
735 Tue Jun 11 15:24:48 1996 Ian Lance Taylor <ian@cygnus.com>
736
737 * xcofflink.c (xcoff_build_ldsyms): Set XCOFF_DEF_REGULAR for a
738 common symbol defined by the linker. Don't export function code
739 even if export_defineds is set.
740
741 Mon Jun 10 11:57:27 1996 Jeffrey A Law (law@cygnus.com)
742
743 * coff-h8300.c (howto_table): Add new entries for R_BCC_INV
744 and R_JMP_DEL.
745 (rtype2howto): Handle R_BCC_INV and R_JMP_DEL.
746 (h8300_symbol_address_p): New function.
747 (h8300_reloc16_estimate): Eliminate jumps made unnecessary by
748 relaxing.
749
750 Sun Jun 9 16:30:20 1996 Jeffrey A Law (law@cygnus.com)
751
752 * coff-h8300.c (h8300_reloc16_estimate): Fix many minor spacing
753 problems.
754 (h8300_reloc16_estimate, cases R_JMP1, R_JMP2): Adjust "dot"
755 correctly for the two variants. Allow relaxing if the target
756 is 128 bytes away since after relaxation it'll be 126 bytes away.
757 (h8300_reloc16_estimate, case R_PCRWORD): Correctly adjust
758 "dot" and "value". Allow relaxing if the target is 128 bytes
759 away since after relaxation it'll be 126 bytes away.
760 * reloc16.c (bfd_coff_reloc16_relax_section): Keep relaxing
761 the given section until nothing changes.
762
763 Thu Jun 6 15:24:45 1996 Richard Henderson <rth@tamu.edu>
764
765 * ecoff.c (_bfd_ecoff_new_section_hook): Remove the _PDATA
766 alignment hack--we can get the lnnoptr info another way without
767 suddenly increasing the alignment requirements. Set the flags for
768 the _PDATA section.
769 (ecoff_compute_section_file_positions): Do so.
770
771 Thu Jun 6 11:24:37 1996 Ian Lance Taylor <ian@cygnus.com>
772
773 * ieee.c (ieee_write_object_contents): Put a timestamp in the file
774 to keep the HP emulator database happy.
775
776 * config.bfd: Recognize powerpc-*-linux* and powerpcle-*-linux*.
777 From Kevin Buettner <kev@primenet.com>.
778
779 Wed Jun 5 15:16:04 1996 Ian Lance Taylor <ian@cygnus.com>
780
781 * aoutx.h (translate_to_native_sym_flags): Don't try to print the
782 name of a NULL section.
783
784 Tue Jun 4 18:53:58 1996 Ian Lance Taylor <ian@cygnus.com>
785
786 * linker.c (_bfd_generic_link_add_one_symbol): If notice_all is
787 set, always call the notice callback.
788
789 * VERSION: Increment for bfdlink.h change.
790
791 Mon Jun 3 11:01:53 1996 Ian Lance Taylor <ian@cygnus.com>
792
793 * coff-sh.c (COFF_DEFAULT_SECTION_ALIGNMENT_POWER): Set to 4.
794 (sh_relax_delete_bytes): Correct handling of differently sized
795 trailing alignment reloc.
796
797 * bfd-in.h: Use #error if BFD_HOST_64_BIT can not be defined.
798 * bfd-in2.h: Rebuild.
799 * configure.in: Warn if there is no known 64 bit type.
800 * configure: Rebuild.
801
802 * Makefile.in: Rebuild dependencies.
803 (BFD32_BACKENDS): Add ppcboot.o.
804 (BFD32_BACKENDS_CFILES): Add ppcboot.c.
805
806 * elf32-mips.c (mips_elf_size_dynamic_sections): Initialize c.
807 From Per Fogelstrom <per.fogelstrom@mailbox200.swipnet.se>.
808
809 Sat Jun 1 21:49:58 1996 Ian Lance Taylor <ian@cygnus.com>
810
811 * elf64-mips.c (bfd_mips_elf64_swap_reginfo_in)
812 (bfd_mips_elf64_swap_reginfo_out): Move from here...
813 * elf32-mips.c (bfd_mips_elf64_swap_reginfo_in)
814 (bfd_mips_elf64_swap_reginfo_out): ...to here.
815
816 Fri May 31 13:51:28 1996 Ian Lance Taylor <ian@cygnus.com>
817
818 * elf64-mips.c: Improve reloc special_functions and handling of
819 SHT_MIPS_OPTIONS section.
820 * elf32-mips.c (_bfd_mips_elf_hi16_reloc): Rename from
821 mips_elf_hi16_reloc and make globally visible.
822 (_bfd_mips_elf_lo16_reloc): Rename from mips_elf_lo16_reloc and
823 make globally visible.
824 (_bfd_mips_elf_got16_reloc): Rename from mips_elf_got16_reloc and
825 make globally visible.
826 (_bfd_mips_elf_gprel16_reloc): Rename from mips_elf_gprel16_reloc
827 and make globally visible.
828 (gprel16_with_gp): Check howto->src_mask before using value in
829 insn.
830 (_bfd_mips_elf_gprel32_reloc): Rename from mips_elf_gprel32_reloc
831 and make globally visible.
832 (gprel32_with_gp): Check howto->src_mask before fetching value.
833 (bfd_mips_elf_swap_options_in): New function.
834 (bfd_mips_elf_swap_options_out): New function.
835 (_bfd_mips_elf_set_private_flags): Rename from
836 mips_elf_set_private_flags and make globally visible.
837 (_bfd_mips_elf_copy_private_bfd_data): Rename from
838 mips_elf_copy_private_bfd_data and make globally visible.
839 (_bfd_mips_elf_merge_private_bfd_data): Rename from
840 mips_elf_merge_private_bfd_data and make globally visible.
841 (_bfd_mips_elf_section_from_shdr): Accept .MIPS.options as a name
842 for a SHT_MIPS_OPTIONS section.
843 (mips_elf32_section_from_shdr): Handle SHT_MIPS_OPTIONS section.
844 (_bfd_mips_elf_fake_sections): Consider .MIPS.options to be the
845 name of a SHT_MIPS_OPTIONS section.
846 (_bfd_mips_elf_set_section_contents): New function.
847 (mips_elf32_section_processing): Set the GP value in a
848 SHT_MIPS_OPTIONS section.
849 (_bfd_mips_elf_find_nearest_line): Rename from
850 mips_elf_find_nearest_line and make globally visible.
851 (bfd_elf32_set_section_contents): Define.
852 * elf-bfd.h (_bfd_mips_elf_hi16_reloc): Declare.
853 (_bfd_mips_elf_lo16_reloc): Declare.
854 (_bfd_mips_elf_gprel16_reloc): Declare.
855 (_bfd_mips_elf_got16_reloc): Declare.
856 (_bfd_mips_elf_gprel32_reloc): Declare.
857 (_bfd_mips_elf_set_private_flags): Declare.
858 (_bfd_mips_elf_copy_private_bfd_data): Declare.
859 (_bfd_mips_elf_merge_private_bfd_data): Declare.
860 (_bfd_mips_elf_find_nearest_line): Declare.
861 (_bfd_mips_elf_set_section_contents): Declare.
862
863 * elf32-hppa.c (elf32_hppa_info_to_howto): Rename from
864 elf_info_to_howto.
865 (elf_info_to_howto): Define.
866 * elf32-sparc.c (elf32_sparc_info_to_howto): Rename from
867 elf_info_to_howto.
868 (elf_info_to_howto): Define.
869 * elf64-sparc.c (sparc64_elf_info_to_howto): Rename from
870 elf_info_to_howto.
871 (elf_info_to_howto): Define.
872
873 * coff-w65.c (h8300_reloc16_estimate): Rename R_MOVB[12] to
874 R_MOV16B[12], to match change in coff/internal.h.
875
876 Thu May 30 12:38:49 1996 Ian Lance Taylor <ian@cygnus.com>
877
878 * elf64-mips.c: Extensive additions to provide better support for
879 writing files and for gas.
880 * elf32-mips.c (_bfd_mips_elf_object_p): New function, broken out
881 of mips_elf_object_p.
882 (mips_elf32_object_p): Rename from mips_elf_object_p; call
883 _bfd_mips_elf_object_p.
884 (_bfd_mips_elf_final_write_processing): Rename from
885 mips_elf_final_write_processing and make globally visible.
886 (_bfd_mips_elf_fake_sections): Rename from
887 mips_elf_fake_sections and make globally visible.
888 (_bfd_mips_elf_section_from_bfd_section): Rename from
889 mips_elf_section_from_bfd_section and make globally visible.
890 (_bfd_mips_elf_section_processing): New function, broken out of
891 mips_elf_section_processing.
892 (mips_elf32_section_processing): Rename from
893 mips_elf_section_processing; call
894 _bfd_mips_elf_section_processing.
895 (_bfd_mips_elf_symbol_processing): Rename from
896 mips_elf_symbol_processing and make globally visible.
897 (_bfd_mips_elf_read_ecoff_info): Rename from
898 mips_elf_read_ecoff_info and make globally visible.
899 (mips_elf32_ecoff_debug_swap): Rename from
900 mips_elf_ecoff_debug_swap.
901 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Use asymbol rather than
902 struct symbol_cache_entry.
903 (_bfd_elf_validate_reloc): New function, moved in from
904 elfcode.h:validate_reloc.
905 * elfcode.h (validate_reloc): Remove; moved into elf.c and renamed
906 to _bfd_elf_validate_reloc. Change all callers.
907 * elf-bfd.h (bfd_section_from_shdr): Declare.
908 (_bfd_elf_symbol_from_bfd_symbol): Declare.
909 (_bfd_elf_validate_reloc): Declare.
910 (_bfd_mips_elf_object_p): Declare.
911 (_bfd_mips_elf_fake_sections): Declare.
912 (_bfd_mips_elf_section_from_bfd_section): Declare.
913 (_bfd_mips_elf_section_processing): Declare.
914 (_bfd_mips_elf_symbol_processing): Declare.
915 (_bfd_mips_elf_read_ecoff_info): Declare.
916 (_bfd_mips_elf_final_write_processing): Declare.
917 * elfxx-target.h (bfd_elfNN_get_reloc_upper_bound): Don't define
918 if already defined.
919
920 * elf32-mips.c (mips_elf_object_p): Handle E_MIPS_ARCH_4.
921 (mips_elf_final_write_processing): Likewise.
922
923 Wed May 29 16:15:29 1996 Ian Lance Taylor <ian@cygnus.com>
924
925 64-bit MIPS ELF ABI objdump support:
926 * elf64-mips.c: New file.
927 * Makefile.in: Rebuild dependencies.
928 (BFD64_BACKENDS): Add elf64-mips.o.
929 (BFD64_BACKENDS_CFILES): Add elf64-mips.c.
930 * config.bfd (mips*el-*-elf*) Add bfd_elf64_bigmips_vec and
931 bfd_elf64_littlemips_vec to targ_selvecs.
932 (mips*-*-elf*): Likewise.
933 * confingure.in: Add bfd_elf64_bigmips_vec and
934 bfd_elf64_littlemips_vec to vector switch.
935 * configure: Rebuild.
936 * elf32-mips.c (_bfd_mips_elf_section_from_shdr): New function,
937 broken out of mips_elf_section_from_shdr.
938 (mips_elf32_section_from_shdr): Rename from
939 mips_elf_section_from_shdr. Call new function.
940 (elf_backend_section_from_shdr): Update name of renamed function.
941 * elf-bfd.h (struct elf_size_info): Change second parameter of
942 write_out_phdrs to be const. Likewise for second parameter of
943 swap_symbol_out.
944 (struct bfd_elf_section_data): Add rel_hdr2 field.
945 (bfd_elf32_swap_symbol_in): Change second parameter to be const.
946 (bfd_elf32_swap_symbol_out): Likewise.
947 (bfd_elf32_swap_reloc_in): Likewise.
948 (bfd_elf32_swap_reloc_out): Likewise.
949 (bfd_elf32_swap_reloca_in): Likewise.
950 (bfd_elf32_swap_reloca_out): Likewise.
951 (bfd_elf32_swap_phdr_in): Likewise.
952 (bfd_elf32_swap_phdr_out): Likewise.
953 (bfd_elf32_swap_dyn_in): Likewise.
954 (bfd_elf32_swap_dyn_out): Likewise.
955 (bfd_elf32_slurp_symbol_table): Declare.
956 (bfd_elf32_write_shdrs_and_ehdr): Declare.
957 (bfd_elf32_write_out_phdrs): Declare.
958 (bfd_elf64_swap_symbol_in): Change second parameter to be const.
959 (bfd_elf64_swap_symbol_out): Likewise.
960 (bfd_elf64_swap_reloc_in): Likewise.
961 (bfd_elf64_swap_reloc_out): Likewise.
962 (bfd_elf64_swap_reloca_in): Likewise.
963 (bfd_elf64_swap_reloca_out): Likewise.
964 (bfd_elf64_swap_phdr_in): Likewise.
965 (bfd_elf64_swap_phdr_out): Likewise.
966 (bfd_elf64_swap_dyn_in): Likewise.
967 (bfd_elf64_swap_dyn_out): Likewise.
968 (bfd_elf64_slurp_symbol_table): Declare.
969 (bfd_elf64_write_shdrs_and_ehdr): Declare.
970 (bfd_elf64_write_out_phdrs): Declare.
971 (_bfd_mips_elf_section_from_shdr): Declare.
972 * elf.c (bfd_section_from_shdr): Remove assertion requiring
973 SHT_REL/SHT_RELA to match use_rela_p. If there is already a reloc
974 section for the section, add the new one to rel_hdr2. Increment
975 reloc_count rather than setting it.
976 * elfcode.h (elf_slurp_symbol_table): Define name as macro.
977 Remove static declaration.
978 (elf_write_shdrs_and_ehdr): Define name as macro.
979 (elf_write_out_phdrs): Likewise.
980 (elf_swap_ehdr_in, elf_swap_ehdr_out): Declare.
981 (elf_swap_shdr_in, elf_swap_shdr_out): Declare.
982 (elf_swap_symbol_in): Change second parameter to be const.
983 (elf_swap_symbol_out): Likewise.
984 (elf_swap_ehdr_in, elf_swap_ehdr_out): Likewise.
985 (elf_swap_shdr_in, elf_swap_shdr_out): Likewise.
986 (elf_swap_phdr_in, elf_swap_phdr_out): Likewise.
987 (elf_swap_reloc_in, elf_swap_reloc_out): Likewise.
988 (elf_swap_reloca_in, elf_swap_reloca_out): Likewise.
989 (elf_write_out_phdrs): Rename from write_out_phdrs. Change second
990 parameter to be const. Make non-static.
991 (elf_write_shdrs_and_ehdr): Rename from write_shdrs_and_ehdr.
992 Make non-static.
993 (elf_slurp_symbol_table): Make non-static.
994 (NAME(_bfd_elf,size_info)): Update names of renamed functions.
995 * elfxx-target.h (elf_info_to_howto): Define if not defined.
996 (elf_backend_size_info): Likewise.
997 (elfNN_bed): Use elf_backend_size_info.
998 * targets.c (bfd_elf64_bigmips_vec): Declare.
999 (bfd_elf64_littlemips_vec): Declare.
1000 (bfd_target_vector): Add bfd_elf64_bigmips_vec and
1001 bfd_elf64_littlemips_vec if BFD64 is defined.
1002
1003 * libbfd.c (bfd_get_file_window): Add cast to fprintf argument.
1004
1005 Tue May 28 11:42:08 1996 Ian Lance Taylor <ian@cygnus.com>
1006
1007 * coff-sh.c (sh_relax_delete_bytes): Insert nop instructions, not
1008 zeroes, in alignment holes.
1009
1010 * configure: Rebuild with autoconf 2.10.
1011
1012 * aoutx.h (NAME(aout,find_nearest_line)): Make room for the
1013 potential leading underscore in the allocated buffer.
1014
1015 Fri May 24 14:28:38 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1016
1017 * elf32-ppc.c (ppc_elf_add_symbol_hook): Do not put small common
1018 symbols into .sbss if this is a relocatable link.
1019
1020 Thu May 23 12:26:24 1996 Ian Lance Taylor <ian@cygnus.com>
1021
1022 * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Warn about
1023 undefined symbols when creating a shared library.
1024
1025 Fri May 17 13:54:15 1996 Ian Lance Taylor <ian@cygnus.com>
1026
1027 * coff-sh.c: Add a bunch of new code and static const arrays to
1028 support aligning loads and stores on four byte memory boundaries.
1029 Also:
1030 (sh_coff_howtos): Add entries for R_SH_CODE, R_SH_DATA and
1031 R_SH_LABEL.
1032 (sh_relax_section): Look for R_SH_CODE relocs. If we find one,
1033 call sh_align_loads.
1034 (sh_relax_delete_bytes): Don't mark R_SH_CODE or R_SH_DATA relocs
1035 as unused.
1036
1037 Thu May 16 16:34:13 1996 Ian Lance Taylor <ian@cygnus.com>
1038
1039 * cache.c (bfd_open_file): Unlink the file before opening it for
1040 write. From Marty Leisner <leisner@sdsp.mc.xerox.com>.
1041
1042 * opncls.c (bfd_fdopenr): Set opened_once.
1043
1044 Tue May 14 12:35:32 1996 Ian Lance Taylor <ian@cygnus.com>
1045
1046 * som.c (som_slurp_reloc_table): Clear external_relocs cache after
1047 freeing it.
1048
1049 * libbfd.c: Remove #ifdef FILE_OFFSET_IS_CHAR_INDEX, and compile
1050 the code unconditionally.
1051
1052 Mon May 13 19:51:37 1996 Ian Lance Taylor <ian@cygnus.com>
1053
1054 * libcoff-in.h (struct pei_section_tdata): Define structure.
1055 (pei_section_data): Define macro.
1056 * libcoff.h: Rebuild.
1057 * coffcode.h (coff_set_alignment_hook): If COFF_IMAGE_WITH_PE,
1058 store s_paddr field in pei_section_data.
1059 (coff_compute_section_file_positions): Use pei_section_data rather
1060 than _cooked_size, and don't overwrite an existing value.
1061 (coff_write_object_contents): If COFF_OBJ_WITH_PE, set s_paddr to
1062 0. If COFF_IMAGE_WITH_PE, set s_paddr to pei_section_data.
1063 * peicode.h (coff_bfd_copy_private_section_data): Define if
1064 COFF_IMAGE_WITH_PE.
1065 (pe_bfd_copy_private_section_data): New static function if
1066 COFF_IMAGE_WITH_PE.
1067
1068 Wed May 8 16:10:38 1996 Ian Lance Taylor <ian@cygnus.com>
1069
1070 * srec.c (srec_set_arch_mach): Write as a function rather than a
1071 macro definition.
1072
1073 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): If an archive has
1074 no map, just check each member in turn to see whether it is
1075 required.
1076
1077 Wed May 8 09:17:34 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1078
1079 * ppcboot.c (ppcboot_object_p): Check for type 0x41 in partition
1080 table. Call BFD_ASSERT to validate header size, instead of
1081 calling fatal.
1082 (ppcboot_bfd_print_private_bfd_data): Put quotes around partition
1083 name.
1084
1085 Tue May 7 16:10:19 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1086
1087 * ppcboot.c: New target for looking at PPCbug boot records.
1088
1089 * config{ure.in,.bfd}: Add support for ppcboot target.
1090 * targets.c: Ditto.
1091 * configure: Regenerate.
1092
1093 Tue May 7 11:15:19 1996 Jeffrey A Law (law@cygnus.com)
1094
1095 * coff-h8300.c (howto_table): Update names to match recent
1096 changes to include/coff/internal.h. Fix minor errors in the
1097 existing relocs. Add R_MOVL1 and R_MOVL2.
1098 (rtype2howto): Similarly.
1099 (h8300_reloc16_estimate): Rewrite to simplify, fix bugs in the
1100 existing relaxing code and peform more relaxing.
1101 (h8300_reloc16_extra_cases): Likewise.
1102
1103 Mon May 6 18:24:09 1996 Jeffrey A Law (law@cygnus.com)
1104
1105 * reloc16.c (bfd_coff_reloc16_get_value): Handle common
1106 symbols correctly.
1107
1108 Sat May 4 05:08:45 1996 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
1109
1110 * elfcode.h (elf_object_p): Reject generic ELF target if
1111 e_machine matches an alternate machine code in a specific backend.
1112
1113 * netbsd-core.c (netbsd_core_vec): Remove initializer for
1114 obsolete align_power_min field.
1115
1116 Fri May 3 13:07:35 1996 Jeffrey A Law (law@cygnus.com)
1117
1118 * coff-h8300.c (reloc_howto_type): Add howto entry for
1119 R_PCRWORD_B.
1120 (rtype2howto): Handle R_PCRWORD_B.
1121 (h8300_reloc16_extra_cases): Handle R_PCRWORD_B.
1122 (h8300_reloc_16_estimate): Likewise. Try to turn a 16bit
1123 pc-relative branch (R_PCRWORD) into an 8bit pc-relative
1124 branch (R_PCWORD_B).
1125
1126 Fri May 3 10:47:41 1996 Ian Lance Taylor <ian@cygnus.com>
1127
1128 * aoutx.h (translate_from_native_sym_flags): Set the section for
1129 BSF_CONSTRUCTOR symbols.
1130
1131 * cofflink.c (_bfd_coff_link_input_bfd): Correct setting of
1132 last_bf_index.
1133
1134 Wed May 1 18:39:32 1996 Doug Evans <dje@canuck.cygnus.com>
1135
1136 * coffcode.h (coff_write_object_contents): In comdat section lookup,
1137 stop looking when section is found.
1138
1139 Wed May 1 14:17:57 1996 Ian Lance Taylor <ian@cygnus.com>
1140
1141 * coffcode.h (STRING_SIZE_SIZE): Define.
1142 (styp_to_sec_flags): Handle long symbol names when looking for the
1143 section symbol.
1144 (bfd_coff_backend_data): Add _bfd_coff_long_section_names field.
1145 (bfd_coff_long_section_names): Define.
1146 (coff_write_object_contents): Handle long section names.
1147 (bfd_coff_std_swap_table): Initialize new field.
1148 * libcoff.h: Rebuild.
1149 * coffgen.c (make_a_section_from_file): Handle long section
1150 names.
1151 (coff_write_symbols): Handle long section names.
1152 * coff-alpha.c (alpha_ecoff_backend_data): Initialize new field.
1153 * coff-mips.c (mips_ecoff_backend_data): Likewise.
1154 * pe-arm.c (COFF_LONG_SECTION_NAMES): Define.
1155 * pei-arm.c (COFF_LONG_SECTION_NAMES): Define.
1156 * pe-i386.c (COFF_LONG_SECTION_NAMES): Define.
1157 * pei-i386.c (COFF_LONG_SECTION_NAMES): Define.
1158 * pe-ppc.c (COFF_LONG_SECTION_NAMES): Define.
1159 * pei-ppc.c (COFF_LONG_SECTION_NAMES): Define.
1160
1161 * bout.c (b_out_callback): Set lma of sections.
1162 (b_out_bfd_get_relocated_section_contents): Rename in_abfd
1163 parameter to output_bfd. Used input_bfd instead of output_bfd in
1164 several places.
1165
1166 Tue Apr 30 17:56:39 1996 Ian Lance Taylor <ian@cygnus.com>
1167
1168 * aoutx.h (translate_from_native_sym_flags): Don't create
1169 SEC_CONSTRUCTOR sections.
1170 * ecoff.c (ecoff_set_symbol_info): Likewise.
1171
1172 * elf32-mips.c (mips_elf_copy_private_bfd_data): Copy elf_gp.
1173 From Don Bowman <bowman@waterloo.hp.com>.
1174
1175 Tue Apr 30 17:06:32 1996 Doug Evans <dje@canuck.cygnus.com>
1176
1177 * coff-arm.c (armcoff_little_vec): If COFF_WITH_PE is defined, add
1178 SEC_LINK_ONCE and SEC_LINK_DUPLICATES to section_flags.
1179
1180 Mon Apr 29 13:15:17 1996 Ian Lance Taylor <ian@cygnus.com>
1181
1182 * elf32-mips.c (struct mips_elf_link_hash_entry): Add
1183 mips_32_relocs field.
1184 (mips_elf_link_hash_newfunc): Initialize mips_32_relocs field.
1185 (mips_elf_relocate_section): Copy R_MIPS_REL32 and R_MIPS_32
1186 relocs against a global symbol which is not defined in a regular
1187 file.
1188 (mips_elf_check_relocs): For a R_MIPS_REL32 or R_MIPS_32 reloc
1189 against a global symbol, increment mips_32_relocs.
1190 (mips_elf_adjust_dynamic_symbol): If mips_32_relocs is set, and
1191 the symbol is not defined in a regular file, make room in the
1192 .rel.dyn section.
1193
1194 Fri Apr 26 18:00:37 1996 Ian Lance Taylor <ian@cygnus.com>
1195
1196 * ecoff.c (ecoff_compute_section_file_positions): Track the real
1197 file position and the virtual file position separately. Set
1198 filepos information bsaed on the real file position.
1199 (_bfd_ecoff_set_section_contents): Handle .lib sections like the
1200 Jan 23 change to coffcode.h.
1201
1202 * som.c (som_slurp_symbol_table): Set the symbol count to the
1203 number of BFD symbols created.
1204
1205 Fri Apr 26 12:34:29 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1206
1207 * elf32-ppc.c (ppc_elf_check_relocs): Forward relocations to the
1208 output file if linking shared objects. Loop to check all relocs,
1209 rather than returning false on first error.
1210
1211 Thu Apr 25 13:25:12 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1212
1213 * elf32-ppc.c (ppc_elf_create_linker_section): Add PLT case.
1214 (ppc_elf_additional_program_headers): If .interp section, bump #
1215 of program headers by 1.
1216 (ppc_elf_adjust_dynamic_symbol): Flesh out support.
1217 (ppc_elf_size_dynamic_sections): Add support for .plt section.
1218 (ppc_elf_check_relocs): Print out filename in debug code. Enable
1219 PLT support.
1220 (ppc_elf_finish_dynamic_symbol): Add support for PLT's, beef up
1221 debug output.
1222 (ppc_elf_relocate_section): If the output section isn't defined,
1223 don't abort, just give an error message.
1224
1225 * elflink.c (_bfd_elf_create_dynamic_sections): If the section
1226 being created is .sdata or .sdata2, don't make the symbol dynamic.
1227
1228 Wed Apr 24 14:04:07 1996 Ian Lance Taylor <ian@cygnus.com>
1229
1230 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through the
1231 members of an archive for dynamic objects with no symbols, and
1232 pass them directly to check_archive_element.
1233 (xcoff_link_check_ar_symbols): Pass dynamic objects to
1234 xcoff_link_check_dynamic_ar_symbols.
1235 (xcoff_link_check_dynamic_ar_symbols): New static function.
1236
1237 * coff-rs6000.c (rs6000coff_vec): Change BFD_JUMP_TABLE_DYNAMIC
1238 from _bfd_nodynamic to _bfd_xcoff.
1239 * libcoff-in.h (_bfd_xcoff_get_dynamic_symtab_upper_bound):
1240 Declare.
1241 (_bfd_xcoff_canonicalize_dynamic_symtab): Declare.
1242 (_bfd_xcoff_get_dynamic_reloc_upper_bound): Declare.
1243 (_bfd_xcoff_canonicalize_dynamic_reloc): Declare.
1244 * libcoff.h: Rebuild.
1245 * xcofflink.c (xcoff_swap_ldrel_in): New static function.
1246 (xcoff_get_section_contents): New static function.
1247 (_bfd_xcoff_get_dynamic_symtab_upper_bound): New function.
1248 (_bfd_xcoff_canonicalize_dynamic_symtab): New function.
1249 (_bfd_xcoff_get_dynamic_reloc_upper_bound): New function.
1250 (xcoff_dynamic_reloc): New static variable.
1251 (_bfd_xcoff_canonicalize_dynamic_reloc): New function.
1252 (xcoff_link_add_dynamic_symbols): Use xcoff_get_section_contents.
1253
1254 Tue Apr 23 12:48:42 1996 Ian Lance Taylor <ian@cygnus.com>
1255
1256 * coff-sparc.c (bfd_coff_generic_reloc): Return bfd_reloc_ok even
1257 if reloc_entry->addend is not 0.
1258 (CALC_ADDEND): Just set the addend to reloc.r_offset.
1259
1260 Mon Apr 22 18:29:01 1996 Doug Evans <dje@canuck.cygnus.com>
1261
1262 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Fix spelling of
1263 R_SPARC_GLOB_JMP.
1264 * elf64-sparc.c (sparc64_elf_howto_table): Likewise.
1265 Add entries for R_SPARC_[56].
1266 (sparc_reloc_map): Add entries for R_SPARC_[56].
1267
1268 Mon Apr 22 15:07:24 1996 Ian Lance Taylor <ian@cygnus.com>
1269
1270 Optimize linking of stabs in sections as used in ELF and COFF.
1271 * stabs.c: New file.
1272 * libbfd-in.h (_bfd_link_section_stabs): Declare.
1273 (_bfd_write_section_stabs): Declare.
1274 (_bfd_write_stab_strings): Declare.
1275 * libbfd.h: Rebuild.
1276 * libcoff-in.h (struct coff_section_tdata): Add stab_info field.
1277 (struct coff_link_hash_table): Add stab_info field.
1278 * libcoff.h: Rebuild.
1279 * cofflink.c (_bfd_coff_link_hash_table_init): Initialize
1280 stab_info field.
1281 (coff_link_add_symbols): Call _bfd_link_section_stabs if
1282 appropriate.
1283 (_bfd_coff_final_link): Write out stab strings hash table.
1284 (_bfd_coff_link_input_bfd): Handle optimized stabs sections.
1285 * coff-ppc.c (ppc_bfd_coff_final_link): Write out stab strings
1286 hash table.
1287 * elf-bfd.h (struct elf_link_hash_table): Add stab_info field.
1288 (struct bfd_elf_section_data): Add stab_info field.
1289 * elf.c (_bfd_elf_link_hash_table_init): Initialize stab_info
1290 field.
1291 * elflink.h (elf_link_add_object_symbols): If appropriate, call
1292 _bfd_link_section_stabs.
1293 (elf_bfd_final_link): Write out stab strings hash table.
1294 (elf_link_input_bfd): Handle optimized stabs sections.
1295 * reloc.c (_bfd_final_link_relocate): Check address against
1296 _raw_size rather than _cooked_size.
1297 * Makefile.in: Rebuild dependencies.
1298 (BFD_LIBS): Add stabs.o
1299 (BFD_LIBS_CFILES): Add stabs.c.
1300
1301 * VERSION: Increment for bfdlink.h change.
1302
1303 * coffgen.c (coff_renumber_symbols): Correct handling of
1304 BSF_NOT_AT_END common symbols.
1305
1306 Fri Apr 19 19:21:56 1996 Ian Lance Taylor <ian@cygnus.com>
1307
1308 * coff-ppc.c (record_toc): Add cast to avoid warning.
1309 (ppc_allocate_toc_section): Likewise.
1310 (coff_ppc_relocate_section): Remove ANSI C string concatenation.
1311 (ppc_coff_reloc_type_lookup): Remove unreached code.
1312 * coffcode.h (coff_write_object_contents): Don't take the address
1313 of an array.
1314 * peicode.h (pe_print_idata): Add casts to avoid warning.
1315 (pe_print_edata): Likewise.
1316 (pe_print_reloc): Remove ANSI C string concatenation.
1317
1318 Thu Apr 18 18:51:18 1996 Ian Lance Taylor <ian@cygnus.com>
1319
1320 * libcoff-in.h (struct coff_final_link_info): Add last_bf_index
1321 and last_bf fields.
1322 * libcoff.h: Rebuild.
1323 * coffswap.h (coff_swap_aux_in): Swap endndx field for C_FCN
1324 symbols.
1325 (coff_swap_aux_out): Likewise.
1326 * peicode.h (coff_swap_aux_in): Likewise.
1327 (coff_swap_aux_out): Likewise.
1328 * coffgen.c (coff_pointerize_aux): Check endndx field for C_FCN
1329 symbols.
1330 * cofflink.c (_bfd_coff_final_link): Initialize last_bf_index
1331 field.
1332 (_bfd_coff_link_input_bfd): Check endndx field for C_FCN symbols.
1333 Fix up .bf endndx link fields.
1334 * coff-ppc.c (ppc_bfd_coff_final_link): Initialize last_bf_index
1335 field.
1336 * xcofflink.c (xcoff_link_input_bfd): Check endndx field for C_FCN
1337 symbols.
1338
1339 Wed Apr 17 12:08:24 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1340
1341 * pe{,i}-ppc.c (PPC_PE): Define instead of PPC, so that compiling
1342 on Solaris PowerPC systems doesn't get confused.
1343
1344 * ccffcode.h (coff_write_object_contents): Use #ifdef PPC_PE, not
1345 #ifdef PPC.
1346
1347 * elfcore.h (bfd_prstatus, bfd_fpregset): Add thread argument.
1348 (elf_corefile_note): If HAVE_SYS_PROCFS_H is not defined, don't
1349 update did_reg and did_reg2.
1350
1351 Wed Apr 17 13:07:37 1996 Ian Lance Taylor <ian@cygnus.com>
1352
1353 * xcofflink.c (xcoff_link_input_bfd): Check for TOC overflow.
1354
1355 * linker.c (_bfd_generic_link_add_one_symbol): When calling the
1356 callback routines, pass h->root.string rather than name, in case
1357 copy is true and name is transient.
1358
1359 Tue Apr 16 16:36:38 1996 Stu Grossman (grossman@lisa.cygnus.com)
1360
1361 * elfcore.h: Add support for core files with multiple threads.
1362 (Primarily for Solaris.)
1363
1364 Tue Apr 16 13:44:08 1996 Ian Lance Taylor <ian@cygnus.com>
1365
1366 * aoutx.h (NAME(aout,squirt_out_relocs)): Don't do anything if
1367 section->orelocation is NULL.
1368
1369 * coffgen.c (bfd_coff_get_syment): New function.
1370 (bfd_coff_get_auxent): New function.
1371 * bfd-in.h (bfd_coff_get_syment): Declare.
1372 (bfd_coff_get_auxent): Declare.
1373 * bfd-in2.h: Rebuild.
1374
1375 Mon Apr 15 19:06:59 1996 Ian Lance Taylor <ian@cygnus.com>
1376
1377 * elf32-mips.c (struct mips_hi16): Define.
1378 (mips_hi16_addr, mips_hi16_addend): Remove.
1379 (mips_hi16_list): New static variable.
1380 (mips_elf_hi16_reloc): Maintain a list of unmatched HI16 relocs.
1381 (mips_elf_lo16_reloc): Process mips_hi16_list.
1382 (mips_elf_relocate_section): Permit an arbitrary number of HI16
1383 relocs before the associated LO16 reloc.
1384
1385 Wed Apr 10 00:23:53 1996 Ian Lance Taylor <ian@cygnus.com>
1386
1387 * versados.c (versados_scan): Check bfd_alloc return value.
1388 (versados_object_p): Check all bfd_read return values. Require
1389 that lang field be less than 10, to avoid confusion with Intel Hex
1390 files.
1391
1392 * libaout.h (WRITE_HEADERS): Write out the relocs even if there
1393 aren't any symbols.
1394 * aoutx.h (NAME(aout,swap_std_reloc_out)): Set r_index to N_ABS,
1395 not 0, for an absolute symbol.
1396 (NAME(aout,swap_ext_reloc_out)): Likewise.
1397
1398 * ihex.c (ihex_scan): Accept a length of 4 for record type 5.
1399 (ihex_write_object_contents): For a large start address, output
1400 the full 32 bit address in record type 5.
1401
1402 * ieee.c (ieee_write_byte): Change second parameter from bfd_byte
1403 to int to avoid promotion problems in prototype.
1404
1405 Tue Apr 9 11:44:21 1996 Ian Lance Taylor <ian@cygnus.com>
1406
1407 * configure.host: Use ${srcdir} when looking for picfrag.
1408
1409 * configure.host: Switch on ${libdir}, not $(libdir). From
1410 alan@spri.levels.unisa.edu.au (Alan Modra).
1411
1412 * aoutx.h (aout_link_add_symbols): Always call add_dynamic_symbols
1413 entry point, not just for DYNAMIC objects.
1414 * sunos.c (sunos_add_dynamic_symbols): Always call
1415 sunos_create_dynamic_sections. If called with a non DYNAMIC
1416 object, don't do anything else.
1417 (sunos_add_one_symbol): Don't call sunos_create_dynamic_sections.
1418
1419 Mon Apr 8 12:09:36 1996 Ian Lance Taylor <ian@cygnus.com>
1420
1421 * configure.in: Permit --enable-shared to specify a list of
1422 directories.
1423 * configure: Rebuild.
1424
1425 * configure.host: Set HLDFLAGS and SHLIB_CFLAGS for *-dec-osf*
1426 host when configuring with --enable-shard.
1427
1428 Fri Apr 5 12:24:13 1996 Ian Lance Taylor <ian@cygnus.com>
1429
1430 * config.bfd: Add i[345]86-*-freebsdelf* target; from John Polstra
1431 <jdp@polstra.com>.
1432
1433 * linker.c (link_action): For WARN_ROW/warn, use MWARN, not CYCLE,
1434 to avoid crashing in bfd_hash_replace.
1435
1436 * sysdep.h: Use #ifdef, not #if.
1437
1438 Thu Apr 4 23:32:23 1996 Ian Lance Taylor <ian@cygnus.com>
1439
1440 * config.in: Rebuild.
1441
1442 Thu Apr 4 18:49:09 1996 Fred Fish <fnf@cygnus.com>
1443
1444 * configure.in (mips-sony-bsd*): Fix typo in AC_DEFINE.
1445 (AC_CHECK_HEADERS): Check for sys/time.h
1446 (AC_HEADER_TIME): Add macro.
1447 * configure: Rebuild.
1448 * sysdep.h: Use TIME_WITH_SYS_TIME and HAVE_SYS_TIME_H
1449 to control what combination of <time> and <sys/time.h>
1450 get included.
1451
1452 Tue Apr 2 13:11:53 1996 Doug Evans <dje@canuck.cygnus.com>
1453
1454 * aoutf1.h (sunos_32_set_arch_mach): Handle M_SPARCLET.
1455 (aout_32_sunos4_write_object_contents): Likewise.
1456 * aoutx.h (NAME(aout,machine_type)): Handle
1457 bfd_mach_sparc_{sparclet,sparclite}.
1458 * archures.c (bfd_mach_sparc_{sparclet,sparclite}): Define.
1459 (bfd_mach_sparc_v9_p): Update.
1460 * cpu-sparc.c (arch_info_struct): Add entries for sparclet,sparclite.
1461 * libaout.h (enum machine_type): Add M_SPARCLET.
1462 * sunos.c (MACHTYPE_OK): Define.
1463 * bfd-in2.h: Regenerated.
1464
1465 Tue Apr 2 00:33:18 1996 Ian Lance Taylor <ian@cygnus.com>
1466
1467 * elf-bfd.h (struct elf_link_hash_table): Add hgot field.
1468 * elf.c (_bfd_elf_link_hash_table_init): Initialize hgot field.
1469 * elflink.c (_bfd_elf_create_got_section): Store the
1470 _GLOBAL_OFFSET_TABLE_ hash table entry in the hgot field.
1471 * elf32-sparc.c (elf32_sparc_check_relocs): If the size of the
1472 global offset table goes over 0x1000, set the value of
1473 _GLOBAL_OFFSET_TABLE_ to 0x1000 into the section.
1474 (elf32_sparc_relocate_section): Subtract the offset of
1475 _GLOBAL_OFFSET_TABLE_ when handling GOT relocations.
1476
1477 * elfcode.h: Don't include <string.h>.
1478
1479 Mon Apr 1 10:39:24 1996 Jeffrey A Law (law@cygnus.com)
1480
1481 * linker.c (_bfd_generic_link_hash_newfunc): Renamed from
1482 generic_link_hash_newfunc. All references changed.
1483 * genlink.h (_bfd_generic_link_hash_newfunc): Declaration
1484 moved here from libbfd-in.h.
1485 * libbfd-in.h: Corresponding changes.
1486 * libbfd.h: Regenerated.
1487
1488 Mon Apr 1 12:35:36 1996 Ian Lance Taylor <ian@cygnus.com>
1489
1490 * aoutx.h (aout_link_input_section_std): When reporting an
1491 overflow error, use the name of the symbol in the hash table if
1492 available.
1493 (aout_link_input_section_ext): Likewise.
1494
1495 * elflink.h (elf_adjust_dynamic_symbol): If a common symbol got
1496 defined in a regular file, set ELF_LINK_HASH_DEF_REGULAR.
1497
1498 Sun Mar 31 01:58:41 1996 steve chamberlain <sac@slash.cygnus.com>
1499
1500 * peicode.h (coff_swap_aouthdr_out): Delete test for .junk.
1501 * coffcode.h (coff_compute_section_file_positions): Likewise.
1502 (coff_write_object_contents): Likewise.
1503
1504 Fri Mar 29 12:44:36 1996 Ian Lance Taylor <ian@cygnus.com>
1505
1506 * section.c (SEC_LINK_ONCE): Define.
1507 (SEC_LINK_DUPLICATES): Define.
1508 (SEC_LINK_DUPLICATES_DISCARD): Define.
1509 (SEC_LINK_DUPLICATES_ONE_ONLY): Define.
1510 (SEC_LINK_DUPLICATES_SAME_SIZE): Define.
1511 (SEC_LINK_DUPLICATES_SAME_CONTENTS): Define.
1512 * bfd-in2.h: Rebuild.
1513 * coffcode.h (sec_to_styp_flags): If COFF_WITH_PE, turn
1514 SEC_LINK_ONCE into IMAGE_SCN_LNK_COMDAT.
1515 (styp_to_sec_flags): If COFF_WITH_PE, turn IMAGE_SCN_LNK_REMOVE
1516 into SEC_EXCLUDE. If IMAGE_SCN_LNK_COMDAT is set, set
1517 SEC_LINK_ONCE, and look through the symbol table for the setting
1518 for SEC_LINK_DUPLICATES.
1519 (coff_write_object_contents): If COFF_WITH_PE, if SEC_LINK_ONCE is
1520 set for a section, find the section symbol in the symbol table,
1521 and set the aux entry based on SEC_LINK_DUPLICATES.
1522 * coffgen.c (coff_print_symbol): Add a space before "checksum".
1523 * coff-arm.c (armcoff_big_vec): If COFF_WITH_PE is defined, add
1524 SEC_LINK_ONCE and SEC_LINK_DUPLICATES to section_flags.
1525 * coff-i386.c (i386coff_vec): Likewise.
1526 * coff-ppc.c (TARGET_LITTLE_SYM, TARGET_BIG_SYM): Likewise.
1527
1528 * VERSION: Bump to 2.6.1.
1529 * Makefile.in (stamp-h): Depend upon VERSION.
1530
1531 Thu Mar 28 23:48:49 1996 Jeffrey A Law (law@cygnus.com)
1532
1533 * libbfd-in.h (generic_link_hash_newfunc): Add declaration.
1534 * libbfd.h: Rebuilt.
1535 * linker.c (generic_link_hash_newfunc): No longer static.
1536 * coffcode.h (coff_bfd_link_hash_create): Allow specific targets
1537 to override.
1538 * coff-h8300.c: Add two derived hash tables and their associated
1539 funtions and #defines for use by the h8300 linker.
1540 (h8300_reloc16_extra_cases, case R_MEM_INDIRECT): Create entries in
1541 the function vector as needed. Place the address of the function
1542 vector entry in the location specified by the R_MEM_INDIRECT reloc.
1543 Rewrite the vectors section contents as necessary.
1544 (h8300_bfd_link_add_symbols): New function for the h8300 linker.
1545 (coff_bfd_link_add_symbols): Define to use h8300 specific version.
1546 (coff_bfd_link_hash_table_create): Likewise.
1547
1548 Thu Mar 28 17:44:08 1996 Ian Lance Taylor <ian@cygnus.com>
1549
1550 * libhppa.h: If gcc 2.7 or higher, declare all the functions with
1551 __attribute__ ((__unused__)) so that -Wall doesn't warn about
1552 them.
1553 (hppa_rebuild_insn): Pass pointer to correct type to
1554 low_sign_unext and dis_assemble_21.
1555
1556 Thu Mar 28 11:00:36 1996 Doug Evans <dje@canuck.cygnus.com>
1557
1558 * config.bfd (sparc64-{sysv4*,solaris2*}): Delete.
1559 Stick with sparc-*-{sysv4*,solaris2*}.
1560
1561 Wed Mar 27 10:43:34 1996 Ian Lance Taylor <ian@cygnus.com>
1562
1563 * peicode.h (coff_swap_aux_in): Swap in extra PE x_scn fields.
1564 (coff_swap_aux_out): Swap out extra PE x_scn fields.
1565 * coffswap.h (coff_swap_aux_in): Zero out extra PE x_scn fields.
1566 * coffgen.c (coff_print_symbol): If any of the extra PE x_scn
1567 fields is non-zero, print them.
1568
1569 * coff-ppc.c (ppc_record_toc_entry): Put inside COFF_IMAGE_WITH_PE
1570 ifdef. Remove unused variables.
1571 (ppc_record_data_in_toc_entry): Ifdef out. Removed unused
1572 variables.
1573 (ppc_mark_symbol_as_glue): Put inside COFF_IMAGE_WITH_PE ifdef.
1574 (get_symbol_value): Ifdef out.
1575 (pe_ppc_reloc): Ifdef out. Remove unused variables.
1576 (coff_ppc_relocate_section): Remove unused variables. Make
1577 fprintf strings and argument types correspond. Put before_addr in
1578 DEBUG_RELOC ifdef.
1579 (dump_toc): Make fprintf strings and argument types correspond.
1580 (ppc_process_before_allocation): Remove unused variables. Always
1581 return a value.
1582 (ppc_reflo_reloc): Ifdef out.
1583 (ppc_addr32nb_reloc): Ifdef out.
1584 (ppc_coff_rtype2howto): Make fprintf strings and argument types
1585 correspond.
1586 (coff_ppc_rtype_to_howto): Likewise.
1587 (ppc_coff_swap_sym_in_hook): Remove unused variables.
1588
1589 * peicode.h (pe_print_idata): Move otherwise unused variables into
1590 the #ifdef where they are used. Always return a value.
1591 (pe_print_edata): Make fprintf strings and argument types
1592 correspond. Always return a value.
1593 (pe_print_pdata): Removed unused variable addr_value. Always
1594 return a value.
1595 (pe_print_reloc): Remove unused variable onaline. Make fprintf
1596 strings and argument types correspond. Always return a value.
1597
1598 * elf32-ppc.c (ppc_elf_fake_sections): Return true.
1599 (ppc_elf_finish_dynamic_symbol): Move definition of unused
1600 variable rela inside #if 0 section where it is used.
1601
1602 * ns32k.h: New file.
1603 * cpu-ns32k.h: Include ns32k.h. Rename externally visible
1604 functions to start with _bfd_.
1605 * aout-ns32k.c: Include ns32k.h. Change references to renamed
1606 functions in cpu-ns32k.h.
1607 * Makefile.in: Rebuild dependencies.
1608 (HFILES): Add ns32k.h.
1609
1610 * section.c (struct sec): Add linker_mark field. Change
1611 user_set_vma and reloc_done to be single bit fields.
1612 (STD_SECTION): Update accordingly.
1613 * bfd-in2.h: Rebuild.
1614 * aoutx.h (NAME(aout,final_link)): Mark sections included in the
1615 link.
1616 (aout_link_input_bfd): Don't link unmarked sections.
1617 * cofflink.c (_bfd_coff_final_link): Mark sections included in the
1618 link.
1619 (_bfd_coff_link_input_bfd): Don't link unmarked sections.
1620 * coff-ppc.c (ppc_bfd_coff_final_link): Mark sections included in
1621 the link.
1622 * elflink.h (elf_bfd_final_link): Mark sections included in the
1623 link.
1624 (elf_link_input_bfd): Don't link unmarked sections.
1625 * xcofflink.c (_bfd_xcoff_bfd_final_link): Mark sections included
1626 in the link.
1627 (xcoff_link_input_bfd): Don't link unmarked sections.
1628
1629 * coffswap.h (coff_swap_scnhdr_out): Include section name in
1630 overflow error messages.
1631
1632 Tue Mar 26 15:46:18 1996 Ian Lance Taylor <ian@cygnus.com>
1633
1634 * bfd.c (_bfd_default_error_handler): If _bfd_error_program_name
1635 is not set, print "BFD: " before the error message.
1636
1637 * configure.in: Use AC_CHECK_TOOL to find ar and ranlib. From
1638 Miles Bader <miles@gnu.ai.mit.edu>.
1639 * configure: Rebuild.
1640
1641 Fri Mar 22 12:17:00 1996 Ian Lance Taylor <ian@cygnus.com>
1642
1643 * xcofflink.c (xcoff_link_input_bfd): Fix scan for C_BINCL/C_EINCL
1644 symbols.
1645
1646 * config.bfd: Add ieee_vec to targ_selvecs for i960 targets and
1647 m68k-aout, m68k-coff, and m68k-elf targets.
1648
1649 Fri Mar 22 11:33:44 1996 Martin Anantharaman <martin@goofy.imech.uni-duisburg.de>
1650
1651 * ieee.c: Changed #ifdef KEEPMINUSPCININST to #if KEEPMINUSPCININST.
1652 (ieee_generic_stat_arch_elt): Restructured to prevent
1653 ieee_object_p from being called repeatedly.
1654
1655 Thu Mar 21 11:00:47 1996 steve chamberlain <sac@slash.cygnus.com>
1656
1657 * coffcode.h (coff_write_object_contents): Allocate
1658 buffers large enough for any FILEHDR or AOUTHDR.
1659
1660 Thu Mar 21 16:28:17 1996 David Mosberger-Tang <davidm@azstarnet.com>
1661
1662 * ecofflink.c (lookup_line): New static function, renamed and
1663 slighly changed from old _bfd_ecoff_locate_line.
1664 (_bfd_ecoff_locate_line): Cache line number information. Use
1665 lookup_line for actual lookup.
1666
1667 Thu Mar 21 14:59:11 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1668
1669 * peicode.h (pe_print_pdata): Warn if the .pdata section is not a
1670 multiple of 20 bytes.
1671
1672 Thu Mar 21 13:54:40 1996 Ian Lance Taylor <ian@cygnus.com>
1673
1674 * ecoff.c (_bfd_ecoff_find_nearest_line): Use bfd_zalloc to
1675 allocate ecoff_find_line, and don't initialize by hand.
1676 * elf32-mips.c (mips_elf_find_nearest_line): Use bfd_zalloc for
1677 mips_elf_find_line, and don't call memset.
1678
1679 * coffcode.h (coff_compute_section_file_positions): If not
1680 producing a final executable, don't consider sofar when aligning
1681 the section to the correct size.
1682
1683 Wed Mar 20 16:53:12 1996 Ian Lance Taylor <ian@cygnus.com>
1684
1685 * coffcode.h (coff_add_missing_symbols): Ifdef out.
1686 (coff_write_object_contents): Don't call coff_add_missing_symbols.
1687 * coffgen.c (coff_section_symbol): Ifdef out.
1688
1689 Mon Mar 18 12:54:41 1996 Ian Lance Taylor <ian@cygnus.com>
1690
1691 * elf32-mips.c (mips_elf_gprel32_reloc): Initialize gp if
1692 output_bfd is not NULL.
1693
1694 Thu Mar 14 17:12:06 1996 Doug Evans <dje@charmed.cygnus.com>
1695
1696 * coffgen.c (coff_get_normalized_symtab): Call bfd_zalloc instead
1697 of bfd_alloc (fixes fix_line not being initialized).
1698 Delete zeroing of fix_{value,tag,end,scnlen} fields.
1699
1700 Thu Mar 14 16:06:06 1996 Jeffrey A Law (law@cygnus.com)
1701
1702 * coffcode.h: Allow specific backends to override the
1703 bfd_link_add_symbols routine.
1704
1705 * coff-h8300.c: Include genlink.h.
1706 (howto_table): Add R_MEM_INDIRECT.
1707 (rtype2howto): Support R_MEM_INDIRECT.
1708 (h8300_reloc16_extra_cases): Handle R_MEM_INDIRECT like R_RELBYTE
1709 for now.
1710
1711 Tue Mar 12 12:41:17 1996 David Mosberger-Tang <davidm@koala.azstarnet.com>
1712
1713 * coff-alpha.c (alpha_relocate_section): Use
1714 info->callbacks_warning, rather than _bfd_error_handler, for
1715 "multiple gp" warning.
1716
1717 Tue Mar 12 12:10:55 1996 Ian Lance Taylor <ian@cygnus.com>
1718
1719 * linker.c (bfd_wrapped_link_hash_lookup): New function.
1720 (_bfd_generic_link_add_one_symbol): Remove BFD_ASSERT on hash
1721 table string. Use bfd_wrapped_link_hash_lookup.
1722 (_bfd_generic_link_write_global_symbol): Remove BFD_ASSERT on hash
1723 table string.
1724 * aoutx.h (aout_link_write_symbols): Use the name from the hash
1725 table, if any, when writing out symbols.
1726 (aout_link_input_section_std): Use the name from the hash table,
1727 if any, when reporting undefined symbols.
1728 (aout_link_input_section_ext): Likewise.
1729 (aout_link_reloc_link_order): Use bfd_wrapped_link_hash_lookup.
1730 * bout.c (get_value): Likewise.
1731 * cofflink.c (_bfd_coff_reloc_link_order): Likewise.
1732 * ecoff.c (ecoff_reloc_link_order): Likewise.
1733 * elflink.h (elf_link_add_object_symbols): Likewise.
1734 (elf_reloc_link_order): Likewise.
1735 * linker.c (_bfd_generic_link_output_symbols): Likewise.
1736 (_bfd_generic_reloc_link_order): Likewise.
1737 (default_indirect_link_order): Likewise.
1738 * reloc16.c (bfd_coff_reloc16_get_value): Likewise.
1739 * sunos.c (sunos_add_one_symbol): Likewise.
1740 * xcofflink.c (xcoff_link_add_symbols): Likewise.
1741 (bfd_xcoff_link_count_reloc): Likewise.
1742 (xcoff_reloc_link_order): Likewise.
1743
1744 * ecoffswap.h (ecoff_swap_fdr_in): If ECOFF_64, turn 0xffffffff
1745 into -1 for intern->rss.
1746
1747 * configure: Rebuild with autoconf 2.8.
1748
1749 Mon Mar 11 12:28:31 1996 Ian Lance Taylor <ian@cygnus.com>
1750
1751 * stab-syms.c (__define_stab_duplicate): Define.
1752 (bfd_get_stab_name): Rename from aout_stab_name. Rewrite to use a
1753 switch.
1754 * bfd-in.h (bfd_get_stab_name): Declare.
1755 * bfd-in2.h: Rebuild.
1756 * Makefile.in: Rebuild dependencies.
1757 (BFD_LIBS): Add stab-syms.o.
1758 (BFD_LIBS_CFILES): Add stab-syms.c.
1759 (BFD32_BACKENDS): Remove stab-syms.o.
1760 (BFD32_BACKENDS_CFILES): Remove stab-syms.c.
1761 * configure.in: Don't list stab-syms.o in bfd_backends.
1762 * configure: Rebuild.
1763 * libaout.h (aout_stab_name): Don't declare.
1764 * aoutx.h (NAME(aout,get_symbol_info)): Call bfd_get_stab_name,
1765 not aout_stab_name.
1766
1767 Fri Mar 8 11:26:20 1996 Ian Lance Taylor <ian@cygnus.com>
1768
1769 * elf.c (assign_file_positions_for_segments): Adjust file offset
1770 for section alignment even if SEC_LOAD is not set.
1771
1772 Tue Mar 5 12:02:23 1996 Ian Lance Taylor <ian@cygnus.com>
1773
1774 * configure.in: Don't set SHLIB or SHLINK to an empty string,
1775 since they appear as targets in Makefile.in.
1776 * configure: Rebuild.
1777
1778 * sunos.c (sunos_scan_ext_relocs): If not making a shared library,
1779 don't fiddle with a symbol which is not defined anywhere.
1780
1781 Mon Mar 4 12:49:16 1996 Ian Lance Taylor <ian@cygnus.com>
1782
1783 * xcofflink.c (xcoff_mark): Treat undefined imported symbols as
1784 though they are defined in a shared library.
1785 (xcoff_build_ldsyms): Likewise.
1786
1787 * coffgen.c (coff_find_nearest_line): Don't look at the line
1788 numbers for the section if section->lineno is NULL.
1789
1790 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Print a useful error
1791 message rather than calling BFD_ASSERT.
1792 * elfcode.h (write_relocs): Check return value of
1793 _bfd_elf_symbol_from_bfd_symbol.
1794
1795 Fri Mar 1 09:42:59 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1796
1797 * elf32-ppc.c (ppc_elf_add_symbol_hook): Don't set SEC_LOAD flag
1798 for .sbss section.
1799
1800 Wed Feb 28 11:25:47 1996 Jeffrey A Law (law@cygnus.com)
1801
1802 * libhppa.h (hppa_reloc_field_selector_type): Add R_HPPA_NLSEL
1803 and R_HPPA_NLRSEL.
1804 (e_nsel, e_nlsel, e_nlrsel): Undefine. Add to
1805 hppa_reloc_field_selector_type_alt.
1806 (hppa_field_adjust): Handle e_nlsel, e_nlrsel. Fix e_nsel handling.
1807 * som.c (hppa_som_gen_reloc_type): Handle N', NL' NLR' field
1808 selectors.
1809 (som_write_fixups): Finish handling of R_N0SEL and R_N1SEL.
1810
1811 Wed Feb 28 11:00:24 1996 Ian Lance Taylor <ian@cygnus.com>
1812
1813 * elf.c (assign_file_positions_for_segments): Adjust the segment
1814 memory size for the alignment of a SEC_ALLOC section, not just a
1815 SEC_LOAD section.
1816
1817 Tue Feb 27 14:17:31 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1818
1819 * m68klinux.c: New file.
1820 * hosts/m68klinux.h: New file.
1821 * config.bfd (m68*-*-linuxaout*, m68*-*-linux*): New targets.
1822 * configure.in (m68*-*-linux*): New native host.
1823 (m68klinux_vec): New vector.
1824 * configure: Rebuild.
1825 * targets.c (m68klinux_vec): Declare.
1826 * i386linux.c (bfd_i386linux_size_dynamic_sections): Renamed from
1827 bfd_linux_size_dynmic_sections to avoid clash with m68klinux.c.
1828 * bfd-in.h (bfd_i386linux_size_dynamic_sections): Rename
1829 declaration from bfd_linux_size_dynamic_sections.
1830 (bfd_m68klinux_size_dynamic_sections): Declare.
1831 * bfd-in2.h: Rebuild.
1832 * Makefile.in: Rebuild dependencies.
1833 (BFD32_BACKENDS): Add m68klinux.o.
1834 (BFD32_BACKENDS_CFILES): Add m68klinux.c.
1835
1836 Tue Feb 27 11:31:34 1996 Jeffrey A Law (law@cygnus.com)
1837
1838 * libhppa.h (pa_arch): Add pa20.
1839 (hppa_reloc_field_selector_type): Add R_HPPA_NSEL.
1840 (e_nsel): Undefine. Add to hppa_reloc_field_selector_type_alt.
1841 (hppa_field_adjust): Handle e_nsel.
1842 * som.c: Provide default definitions for many new relocs found only
1843 in hpux10 include files.
1844 (som_fixup_formats): Add several new relocs from hpux10.
1845 (som_hppa_howto_table): Add hpux10 relocs.
1846 (som_write_fixups): Handle R_N0SEL and R_N1SEL hpux10 relocs.
1847
1848 Mon Feb 26 12:52:48 1996 Stan Shebs <shebs@andros.cygnus.com>
1849
1850 * mpw-make.sed: Edit out recent shared library support, and
1851 rules to rebuild .h files using doc/chew.
1852
1853 Mon Feb 26 14:48:39 1996 David Mosberger-Tang <davidm@AZStarNet.com>
1854
1855 * ecoff.c (ecoff_compute_section_file_positions): Adjust the file
1856 size even of sections with no contents.
1857
1858 Mon Feb 26 14:01:13 1996 Ian Lance Taylor <ian@cygnus.com>
1859
1860 * cofflink.c (_bfd_coff_link_input_bfd): When merging, skip names
1861 starting with '$' the way we skip names starting with '.'. When
1862 updating x_endndx, don't be fooled by an index which has been
1863 merged.
1864
1865 * cofflink.c (_bfd_coff_link_input_bfd): Don't try to optimize a
1866 struct/union/enum type with no elements.
1867
1868 Sat Feb 24 11:38:58 1996 Ian Lance Taylor <ian@cygnus.com>
1869
1870 * bfd.c (bfd_errmsg): Handle a NULL return from strerror.
1871
1872 * archive.c (bfd_generic_archive_p): If the first file in the
1873 archive can not be recognized as an object, don't assume that this
1874 is the wrong format.
1875
1876 * elf.c (bfd_elf_set_dt_needed_name): Don't do anything if the
1877 format is not bfd_object.
1878 (bfd_elf_get_dt_soname): Likewise.
1879
1880 Wed Feb 21 13:58:04 1996 Ian Lance Taylor <ian@cygnus.com>
1881
1882 * coff-sh.c (sh_relax_delete_bytes): Correct range of R_SH_USES
1883 reloc.
1884
1885 Tue Feb 20 16:22:44 1996 J.T. Conklin <jtc@rtl.cygnus.com>
1886
1887 * bfd.c (tdata): Add netbsd_core_data.
1888 * bfd-in2.h: Regenerated.
1889
1890 Tue Feb 20 16:50:02 1996 Ian Lance Taylor <ian@cygnus.com>
1891
1892 * sunos.c (SUNOS_CONSTRUCTOR): Define.
1893 (sunos_add_one_symbol): Don't let a symbol from a dynamic object
1894 override a constructor symbol. Set SUNOS_CONSTRUCTOR when
1895 appropriate.
1896
1897 * bout.c (b_out_squirt_out_relocs): Use udata.i rather than flags
1898 to get the symbol index, matching 14 Jul 95 change.
1899
1900 Tue Feb 20 08:26:27 1996 Fred Fish <fnf@phydeaux.cygnus.com>
1901
1902 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents):
1903 Remove duplicate definition of gp.
1904
1905 Mon Feb 19 12:37:41 1996 Ian Lance Taylor <ian@cygnus.com>
1906
1907 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Don't
1908 assume that we can set the GP value and then get the same value,
1909 since it won't be true if the output file is neither ELF nor
1910 ECOFF.
1911 * coff-mips.c (mips_adjust_reloc_in): Don't bother to use
1912 _bfd_get_gp_value here.
1913 (mips_gprel_reloc): Don't assume we can set and get the GP value.
1914 * elf32-mips.c (mips_elf_hi16_reloc): Get gp value from
1915 mips_elf_final_gp.
1916 (mips_elf_lo16_reloc): Likewise.
1917 (mips_elf_final_gp): Add pgp parameter. Set it to the GP value.
1918 Don't require that the BFD be ELF.
1919 (mips_elf_gprel16_reloc): Get gp value from mips_elf_final_gp.
1920 (mips_elf_gprel32_reloc): Likewise.
1921 (mips_elf_relocate_section): Don't assume we can set and get the
1922 GP value.
1923 (mips_elf_finish_dynamic_symbol): Don't bother to use
1924 _bfd_get_gp_value here.
1925
1926 * elf32-mips.c (mips_elf_create_procedure_table): Initialize sv.
1927 Don't change epdr between malloc and free. Be careful not to free
1928 NULL pointers. Zero out the first RPDR.
1929
1930 * configure.host: On Linux, only pass -rpath option if $(libdir)
1931 is neither /lib nor /usr/lib. From Alan Modra
1932 <alan@mullet.Levels.UniSA.Edu.Au>.
1933
1934 * elf-bfd.h (struct elf_obj_tdata): Rename dt_needed_name to
1935 dt_name.
1936 (elf_dt_name): Rename from elf_dt_needed_name.
1937 * elf.c (bfd_elf_set_dt_needed_name): Use elf_dt_name, not
1938 elf_dt_needed_name.
1939 (bfd_elf_get_dt_soname): New function.
1940 * elflink.h (elf_link_add_object_symbols): Use elf_dt_name, not
1941 elf_dt_needed_name. Save the SONAME back in elf_dt_name.
1942 * bfd-in.h (bfd_elf_get_dt_soname): Declare.
1943 * bfd-in2.h: Rebuild.
1944
1945 Mon Feb 19 02:50:23 1996 Doug Evans <dje@charmed.cygnus.com>
1946
1947 * elf32-sparc.c (elf32_sparc_reloc_type_lookup): Renamed from
1948 _bfd_sparc_elf_reloc_type_lookup.
1949 (bfd_elf32_bfd_reloc_type_lookup): Update.
1950 * elf64-sparc.c (SPARC64_OLD_RELOCS): Define.
1951 (sparc64_elf_howto_table): Define.
1952 (sparc_reloc_map): Define.
1953 (sparc64_elf_reloc_type_lookup): New function.
1954 (sparc_elf_wdisp16_reloc): New function.
1955 (elf_info_to_howto): Use sparc64_elf_howto_table.
1956 (sparc64_elf_relocate_section): Likewise.
1957 (bfd_elf64_bfd_reloc_type_lookup): Update.
1958
1959 Sun Feb 18 15:02:25 1996 Ian Lance Taylor <ian@cygnus.com>
1960
1961 * configure.host: Check for 'do not mix' from native linker before
1962 trying to use -rpath.
1963
1964 Fri Feb 16 12:46:18 1996 Ian Lance Taylor <ian@cygnus.com>
1965
1966 * bfd.c (_bfd_get_gp_value): New function.
1967 (_bfd_set_gp_value): New function.
1968 * libbfd-in.h (_bfd_get_gp_value): Declare.
1969 (_bfd_set_gp_value): Declare.
1970 * libbfd.h: Rebuild.
1971 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Use
1972 _bfd_get_gp_value and _bfd_set_gp_value rather than referring
1973 directly to the fields in the tdata information.
1974 (alpha_relocate_section): Likewise.
1975 * coff-mips.c (mips_adjust_reloc_in): Likewise.
1976 (mips_gprel_reloc): Likewise.
1977 (mips_relocate_section): Likewise.
1978 * elf32-mips.c (mips_elf_hi16_reloc): Likewise.
1979 (mips_elf_lo16_reloc): Likewise.
1980 (mips_elf_final_gp): Likewise.
1981 (mips_elf_gprel16_reloc): Likewise.
1982 (mips_elf_gprel32_reloc): Likewise.
1983 (mips_elf_relocate_section): Likewise.
1984 (mips_elf_finish_dynamic_symbol): Likewise.
1985
1986 * bout.c (b_out_set_arch_mach): Recognize bfd_mach_i960_jx.
1987
1988 Thu Feb 15 11:29:13 1996 Ian Lance Taylor <ian@cygnus.com>
1989
1990 * configure.in: Call AC_PROG_CC before configure.host.
1991 * configure: Rebuild.
1992 * configure.host: Don't set information which autoconf should
1993 figure out, namely CC, CFLAGS, LDFLAGS, AR, and RANLIB.
1994
1995 * configure.host: Remove go32 and win32 host information, since it
1996 should no longer be needed.
1997
1998 * elf.c (map_sections_to_segments): If we have a .dynamic section,
1999 then start a new segment rather than put a writable section in a
2000 readonly segment.
2001
2002 * configure.host: Set RPATH_ENVVAR.
2003
2004 * Makefile.in: Rebuild dependencies.
2005
2006 * elflink.c (_bfd_elf_create_linker_section): Remove unused
2007 zero_section variable.
2008
2009 Thu Feb 15 10:39:17 1996 H.J. Lu <hjl@zoom.com>
2010
2011 * Makefile.in ($(srcdir)/bfd-in2.h): Rename target from bfd-in2.h.
2012 ($(srcdir)/libbfd.h): Rename from libbfd.h.
2013 ($(srcdir)/libcoff.h): Rename from libcoff.h.
2014
2015 Wed Feb 14 16:29:07 1996 Martin Anantharaman <martin@mail.imech.uni-duisburg.de>
2016
2017 * ieee.c (ieee_write_expression): Only use an R variable for a
2018 local symbol. Don't output a zero offset. Handle a zero address.
2019 (SRC_MASK, PCREL_OFFSET): Define based on KEEPMINUSPCININST.
2020 (rel32_howto, rel16_howto, rel8_howto): Use SRC_MASK and
2021 PCREL_OFFSET.
2022 (parse_expression): Don't try to handle multiple occurrences of a
2023 P variable. Handle I variables differently from X variables. Fix
2024 the order of minus expressions.
2025 (ieee_slurp_external_symbols): Generate an I variable for an NN
2026 record. Fix handling of ATI and ATX records.
2027 (ieee_slurp_sections): Only set minimal section attributes.
2028 Adjust them later, based on the section contents.
2029 (ieee_object_p): Read in the file until just after the ME record.
2030 Call ieee_slurp_section_data to set the section flags.
2031 (do_one): Add iterations parameter. Only repeat the first load
2032 item. Set the section and file reloc flags.
2033 (ieee_slurp_section_data): Set section flags. Pass iterations to
2034 do_one.
2035 (ieee_canonicalize_reloc): Handle I variables.
2036 (do_with_relocs): Only emit relocation size when necessary.
2037 Increase MAXRUN to 127. Change ov to be assigned, and take
2038 src_mask and pcrel_offset into account.
2039 (ieee_write_data_part): Skip sections that are not loaded.
2040 (ieee_write_external_part): Don't output optional last entry of WX
2041 records.
2042 (ieee_write_me_part): Make setting of me_record neater.
2043 (ieee_generic_stat_arch_elt): Get the size of an archive element.
2044
2045 * syms.c (stt): Add entries for zerovars, vars, and code.
2046
2047 * elfcode.h (validate_reloc): New static function.
2048 (write_relocs): Call validate_reloc for non ELF relocs.
2049
2050 * elfxx-target.h (elf_symbol_leading_char): Define if not defined.
2051 (TARGET_BIG_SYM): Use elf_symbol_leading_char.
2052 (TARGET_LITTLE_SYM): Likewise.
2053
2054 * config.bfd (m68*-*-psos*): New target.
2055
2056 Tue Feb 13 15:56:22 1996 Bryan Ford <baford@snake.cs.utah.edu>
2057
2058 * i386msdos.c: Remove some #if 0 code.
2059 (msdos_write_object_contents): Don't include empty sections in the
2060 size computation, regardless of their address.
2061
2062 Tue Feb 13 15:36:37 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2063
2064 * elf32-ppc.c (ppc_elf_relocate_section): Don't segfault if dynboj
2065 is NULL, ie, the -r switch is used.
2066
2067 Tue Feb 13 14:35:15 1996 Ian Lance Taylor <ian@cygnus.com>
2068
2069 * reloc.c (BFD_RELOC_MIPS_GOT_HI16): Define.
2070 (BFD_RELOC_MIPS_GOT_LO16): Define.
2071 (BFD_RELOC_MIPS_CALL_HI16, BFD_RELOC_MIPS_CALL_LO16): Define.
2072 * bfd-in2.h, libbfd.h: Rebuild.
2073 * elf32-mips.c (mips_reloc_map): Map new relocs.
2074
2075 * configure.host: Set HDLFLAGS for *-*-hpux with --enable-shared.
2076
2077 * Makefile.in ($(SHLINK)): Check ts against $(SHLIB), not
2078 $(SHLINK).
2079
2080 * ieee.c (get_symbol): Set the section to bfd_abs_section.
2081 (do_with_relocs): If EXEC_P is set and there are no relocs, use a
2082 simple number for the section address, rather than an expression.
2083 Limit the number of bytes between relocs to MAXRUN.
2084 (ieee_write_me_part): Set me_record to the file offset after the
2085 start address.
2086 (ieee_write_processor): New static function.
2087 (ieee_write_object_contents): Use ieee_write_processor.
2088
2089 Fri Feb 9 10:53:00 1996 Ian Lance Taylor <ian@cygnus.com>
2090
2091 * configure.host: Use ${CC-gcc} when testing for -rpath on SunOS.
2092
2093 * coff-aux.c: Change include of aux.h to aux-coff.h.
2094
2095 Thu Feb 8 14:01:03 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2096
2097 * elf32-m68k.c (elf_m68k_relocate_section): For a R_68K_RELATIVE
2098 relocation put the addend both in the reloc entry and the data.
2099 (elf_m68k_finish_dynamic_symbol): Likewise. Mask out marker in
2100 GOT offset value.
2101
2102 * elf32-m68k.c (elf_m68k_relocate_section): If -Bsymbolic, resolve
2103 a R_68K_PCxx reloc against a defined global symbol directly.
2104 (elf_m68k_check_relocs): Don't count such a reloc.
2105
2106 * elf32-m68k.c (elf_m68k_check_relocs): Don't record a symbol with
2107 a PLTxx reloc as dynamic. Disallow PLTxxO reloc against a local
2108 symbol for now, otherwise always record the symbol as dynamic.
2109 (elf_m68k_adjust_dynamic_symbol): If a symbol with a PLTxx reloc
2110 is not referenced by a dynamic object, and we are not making a
2111 shared object, then don't make a PLT entry. If we do make a PLT
2112 entry, make sure the symbol has been recorded as dynamic.
2113
2114 Wed Feb 7 13:56:06 1996 Ian Lance Taylor <ian@cygnus.com>
2115
2116 * configure.host: When making a shared library, set HLDFLAGS to
2117 pass an appropriate -rpath option. Use the make variable SONAME
2118 as the shared library soname, rather than computing it here. On
2119 SunOS, build stamp-tshlink in place of $(SHLINK).
2120 * Makefile.in (SONAME): New variable.
2121 ($(SHLINK)): Make a link to the transformed name, as well.
2122 (stamp-tshlink): New target.
2123 (install): Skip stamp-tshlink during install.
2124
2125 Wed Feb 7 13:37:39 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2126
2127 * elf32-ppc.c (ppc_elf_add_symbol_hook): Do not assume that the
2128 linker sections have been set up yet.
2129
2130 * elf.c (make_mapping): Add an additional argument to suppress
2131 making the first section include the program headers.
2132 (map_sections_to_segments): If the user used -Ttext such that the
2133 program headers are on a different page, do not set the flags
2134 saying that this section includes the program headers.
2135
2136 Tue Feb 6 14:04:49 1996 J.T. Conklin <jtc@rtl.cygnus.com>
2137
2138 * configure.in (*-*-netbsd*): Set COREFILE to netbsd-core.c.
2139 don't define TRAD_HEADER.
2140 * configure: Rebuild.
2141
2142 * netbsd-core.c: New file, support for NetBSD core files.
2143 * hosts/*nbsd.h: Removed.
2144
2145 Tue Feb 6 11:47:49 1996 Doug Evans <dje@charmed.cygnus.com>
2146
2147 * reloc.c (BFD_RELOC_SPARC_[567]): New reloc types.
2148 (BFD_RELOC_SPARC_LO7 reloc type): Deleted.
2149 * libbfd.h, bfd-in2.h: Regenerated.
2150 * elf32-sparc.c (_bfd_sparc_elf_reloc_type_lookup): Renamed from
2151 bfd_elf32_bfd_reloc_type_lookup.
2152 (reloc_type{,_names}): Deleted.
2153 (_bfd_sparc_elf_howto_table): Renamed from elf_sparc_howto_table.
2154 Add sparc64 relocs.
2155 (sparc_reloc_map): Add sparc64 relocs.
2156 (sparc_elf_notsupported_reloc): New static function.
2157 (sparc_elf_wdisp16_reloc): New static function.
2158 (elf32_sparc_check_relocs): Handle R_SPARC_WDISP{16,19}.
2159 (elf32_sparc_relocate_section): Likewise.
2160 (bfd_elf32_bfd_reloc_type_lookup): Define.
2161 * elf64-sparc.c (sparc64_elf_wdisp16_reloc): Deleted.
2162 (reloc_type{,_names}): Deleted.
2163 (elf_sparc_howto_table): Deleted.
2164 (sparc_reloc_map): Deleted.
2165 (_bfd_sparc_elf_howto_table): Renamed from elf_sparc_howto_table.
2166 (bfd_elf64_bfd_reloc_type_lookup): Change from function to #define.
2167
2168 Tue Feb 6 12:12:22 1996 Ian Lance Taylor <ian@cygnus.com>
2169
2170 * configure.host: Make SHLIB_CFLAGS include $(PICFLAG) on a
2171 *-*-hpux* host.
2172
2173 * Makefile.in (program_transform_name): New variable.
2174 (install): Transform library name before installing it.
2175
2176 Mon Feb 5 10:38:27 1996 Ian Lance Taylor <ian@cygnus.com>
2177
2178 * archures.c (bfd_mach_i960_hx): Define.
2179 * bfd-in2.h: Rebuild.
2180 * cpu-i960.c (scan_960_mach): Accept machine "hx".
2181 (MATRIX): Expand entries for HX.
2182 (arch_info_struct): Add i960:hx entry.
2183 * bout.c (b_out_set_arch_mach): Handle bfd_mach_i960_hx.
2184 * coffcode.h (coff_set_arch_mach_hook): Handle F_I960HX.
2185 (coff_set_flags): Handle bfd_mach_i960_hx.
2186
2187 Support for building as a shared library, based on patches from
2188 Alan Modra <alan@spri.levels.unisa.edu.au>:
2189 * configure.in: Add AC_ARG_ENABLE for shared and commonbfdlib.
2190 New substitutions: ALLLIBS, PICFLAG, SHLIB, SHLIB_CC,
2191 SHLIB_CFLAGS, COMMON_SHLIB, PICLIST, SHLINK.
2192 * configure: Rebuild.
2193 * configure.host: If --enable-shared, adjust shared library stuff
2194 based on the host. If the host is SunOS, and the linker supports
2195 -rpath, set HLDFLAGS to use it.
2196 * Makefile.in (ALLLIBS): New variable.
2197 (PICFLAG, SHLIB, SHLIB_CC, SHLIB_CFLAGS): New variables.
2198 (COMMON_SHLIB, SHLINK): New variables.
2199 (.c.o): If PICFLAG is set, compile twice, once PIC, once normal.
2200 (STAGESTUFF): Remove variable.
2201 (all): Depend upon $(ALLLIBS) and @PICLIST@ rather than
2202 $(TARGETLIB).
2203 (stamp-ofiles): New target, like old ofiles target, but build
2204 using a temporary file and move-if-change, and touch stamp-ofiles
2205 when done.
2206 (ofiles): Just depend upon stamp-ofiles.
2207 (stamp-piclist, piclist): New targets.
2208 ($(SHLIB), $(SHLINK)): New targets.
2209 (targets.o, archures.o): Build twice if PICFLAG is set.
2210 (do_mostlyclean): Remove pic/*.o.
2211 (do_clean): Remove stamp-ofiles, $(SHLIB), $(SHLINK), piclist, and
2212 stamp-piclist.
2213 (do_distclean): Remove pic and stamp-picdir.
2214 (install): Install shared libraries.
2215 ($(OFILES)): Depend upon stamp-picdir.
2216 (stamp-picdir): New target.
2217
2218 * libcoff-in.h: Add comment reminding people that libcoff.h is a
2219 generated file.
2220 * libcoff.h: Rebuild.
2221
2222 * elflink.h (elf_adjust_dynamic_symbol): Don't try to get the
2223 flavour of a section with no owner.
2224
2225 * elf32-mips.c (mips_elf_create_dynamic_sections): Clear
2226 ELF_LINK_NON_ELF flag.
2227 (mips_elf_create_got_section): Likewise.
2228
2229 * elf.c: Revert last change, since it breaks dynamic linking.
2230 * elf-bfd.h (struct elf_backend_data): Remove want_hdr_in_seg
2231 field.
2232 * elf32-mips.c (elf_backend_want_hdr_in_seg): Don't define.
2233 * elfxx-target.h (elf_backend_want_hdr_in_seg): Don't define.
2234 (elfNN_bed): Don't initialize want_hdr_in_seg field.
2235
2236 Sun Feb 4 20:45:13 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2237
2238 * elf.c (assign_file_positions_for_segments): If the backend does
2239 not want the elf header or the program headers in the address
2240 space, do not include them in the calculations.
2241
2242 * elf32-ppc.c (ppc_elf_additional_program_headers): New hook
2243 function to determine if we need additional program headers.
2244 (ppc_elf_modify_segment_map): Define as a NOP function for now.
2245 (ppc_elf_create_linker_section): .sdata2 is a read-only section.
2246
2247 Sat Feb 3 23:00:03 1996 Ian Lance Taylor <ian@cygnus.com>
2248
2249 * coffcode.h: Move today's libcoff.h change into coffcode.h.
2250
2251 Sat Feb 3 15:43:44 1996 Fred Fish <fnf@cygnus.com>
2252
2253 * libcoff.h (bfd_coff_link_add_one_symbol): Combine macro args
2254 back into one line. Some compilers (sunos 4.1.3 for example)
2255 won't accept args split across more than one line.
2256
2257 Fri Feb 2 11:42:15 1996 Steve Chamberlain <sac@slash.cygnus.com>
2258
2259 * aclocal.m4 (BFD_BINARY_FOPEN): Understand cygwin32.
2260 * configure: Regenerate.
2261
2262 Fri Feb 2 12:12:16 1996 Jeffrey A Law (law@cygnus.com)
2263
2264 * elf32-hppa.c (elf32_hppa_backend_symbol_table_processing): Don't
2265 try to do arithmetic on a void *, cast it to a unsigned char * first.
2266
2267 Thu Feb 1 16:04:06 1996 Ian Lance Taylor <ian@cygnus.com>
2268
2269 * elf-bfd.h (ELF_LINK_NON_ELF): Define.
2270 * elf.c (_bfd_elf_link_hash_newfunc): Set elf_link_hash_flags to
2271 ELF_LINK_NON_ELF.
2272 * elflink.h (elf_link_add_object_symbols): Reset ELF_LINK_NON_ELF
2273 flag for a newly defined symbol.
2274 (NAME(bfd_elf,record_link_assignment)): Likewise.
2275 (elf_adjust_dynamic_symbol): If ELF_LINK_NON_ELF is set, try to
2276 set the DEF or REF_REGULAR flags correctly.
2277
2278 * Makefile.in (bfd-in2.h): Make bfd.h, not protos, in docdir.
2279 (libbfd.h, libcoff.h): Corresponding change.
2280
2281 * elf32-i386.c (elf_i386_check_relocs): Don't record a symbol with
2282 a PLT32 reloc as dynamic.
2283 (elf_i386_adjust_dynamic_symbol): If a symbol with a PLT32 reloc
2284 is not referenced by a dynamic object, and we are not making a
2285 shared object, then don't make a PLT entry. If we do make a PLT
2286 entry, make sure the symbol has been recorded as dynamic.
2287
2288 Wed Jan 31 17:23:32 1996 Steve Chamberlain <sac@slash.cygnus.com>
2289
2290 * coff-i386.c (coff_i386_reloc_type_lookup): Add BFD_RELOC_32_PCREL.
2291 * config.bfd (i[345]86-*-win32): Becomes i[345]86-*-cygwin32.
2292 (powerpcle-*-cygwin32): New.
2293 * peicode.h (add_data_entry): Get address from vma.
2294
2295 Wed Jan 31 16:23:57 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2296
2297 * elflink.c (_bfd_elf_create_linker_section): If the symbol
2298 attached to the section has already been created as an undefined
2299 symbol, treat it as if it hasn't been created yet.
2300
2301 Wed Jan 31 16:16:53 1996 Ian Lance Taylor <ian@cygnus.com>
2302
2303 * elflink.h (elf_bfd_final_link): Don't output initial dummy
2304 symbol or section symbols if stripping all symbols and this is not
2305 a relocateable link. Don't output the symbol string table if
2306 there are no symbols.
2307 (elf_link_flush_output_syms): Don't do anything if there are no
2308 symbols to flush.
2309
2310 Wed Jan 31 12:55:49 1996 Richard Henderson <rth@tamu.edu>
2311
2312 * coff-aux.c: New file.
2313 * hosts/m68kaux.h: New file.
2314 * config.bfd (m68*-apple-aux*): New target.
2315 * configure.in (m68*-apple-aux*): New native host.
2316 (m68kaux_coff_vec): New vector.
2317 * configure: Rebuild.
2318 * targets.c (m68kaux_coff_vec): Declare.
2319 * coffcode.h (bfd_coff_backend_data): Add field
2320 _bfd_coff_link_add_one_symbol.
2321 (bfd_coff_link_add_one_symbol): Define.
2322 (compare_arelent_ptr): New static function if TARG_AUX.
2323 (coff_write_relocs): If TARG_AUX, sort the relocs.
2324 (coff_write_object_contents): Set A/UX aouthdr magic number.
2325 (coff_link_add_one_symbol): Define if not defined.
2326 (bfd_coff_std_swap_table): Initialize new field.
2327 * libcoff.h: Rebuild.
2328 * cofflink.c (coff_link_add_symbols): Call
2329 bfd_coff_link_add_one_symbol rather than
2330 _bfd_generic_link_add_one_symbol.
2331 * coff-m68k.c (COFF_PAGE_SIZE): Don't define if already defined.
2332 * coff-alpha.c (alpha_ecoff_backend_data): Initialize new field.
2333 * coff-mips.c (mips_ecoff_backend_data): Likewise.
2334 * Makefile.in: Rebuild dependencies.
2335 (BFD32_BACKENDS): Add coff-aux.o.
2336 (BFD32_BACKENDS_CFILES): Add coff-aux.c.
2337
2338 Wed Jan 31 11:37:46 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2339
2340 * elf32-m68k.c (elf_m68k_relocate_section): Fix R_68K_GOT*
2341 relocation; ignore addend with R_68K_{GOT,PLT}*O relocation.
2342
2343 Tue Jan 30 12:09:04 1996 Ian Lance Taylor <ian@cygnus.com>
2344
2345 * Makefile.in (do_maintainer_clean): Remove $(srcdir)/bfd-in2.h,
2346 $(srcdir)/libbfd.h and $(srcdir)/libcoff.h.
2347 (maintainer-clean): Warn about deleting special files.
2348 (bfd-in2.h, libbfd.h, libcoff.h): New targets.
2349
2350 * elf32-hppa.c (elf32_hppa_relocate_section): Handle indirect and
2351 warning symbols correctly.
2352 * elf32-i386.c (elf_i386_relocate_section): Likewise.
2353 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
2354 * elf32-mips.c (mips_elf_relocate_section): Likewise.
2355 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2356 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
2357 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
2358
2359 * syms.c (_bfd_stab_section_find_nearest_line): Add casts to avoid
2360 warnings.
2361
2362 Mon Jan 29 14:27:24 1996 Kim Knuttila <krk@cygnus.com>
2363
2364 * libcoff-in.h: aligned newly exported names with bfd naming
2365 conventions. Removed an erroneous define of POWERPC_LE_PE.
2366 * libcoff.h: Rebuild.
2367 * cofflink.c, coff-ppc.c: the above function name changes
2368
2369 Mon Jan 29 13:06:28 1996 Ian Lance Taylor <ian@cygnus.com>
2370
2371 From Basim Kadhim <kadhim@spock.cs.colorado.edu>:
2372 * ecoff.c (struct extsym_info): Define.
2373 (_bfd_ecoff_bfd_final_link): Pass a pointer to struct extsym_info
2374 to ecoff_link_write_external.
2375 (ecoff_link_write_external): Accept a struct extsym_info pointer.
2376 Strip symbols when appropriate.
2377
2378 Based on patches from Ronald F. Guilmette <rfg@monkeys.com>:
2379 * syms.c (BSF_OBJECT): Define.
2380 (bfd_print_symbol_vandf): Print 'O' for BSF_OBJECT.
2381 * bfd-in2.h: Rebuild.
2382 * elfcode.h (elf_slurp_symbol_table): Set BSF_OBJECT for an
2383 STT_OBJECT symbol.
2384 * elf.c (swap_out_syms): Only set type to STT_OBJECT if BSF_OBJECT
2385 is set.
2386
2387 * elf32-i386.c (elf_i386_relocate_section): If -Bsymbolic, when
2388 copying relocs into a shared object, treat a defined global symbol
2389 as a local symbol.
2390 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
2391 * elf32-mips.c (mips_elf_relocate_section): Likewise.
2392 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
2393
2394 * elflink.h (elf_link_add_object_symbols): Only set weakdef to a
2395 real defined symbol, not to a weak defined symbol.
2396
2397 Mon Jan 29 11:34:36 1996 Kim Knuttila <krk@cygnus.com>
2398
2399 * cofflink.c: removed the POWERPC_LE_PE hack, promoted some types
2400 and made a few static functions externs.
2401
2402 * coff-ppc.c (ppc_bfd_coff_final_link): new function, replaces the
2403 POWERPC_LE_PE hack in cofflink.
2404
2405 * libcoff-in.h: promoted the following from cofflink.c to allow
2406 _bfd_coff_final_link to be overridden - STRING_SIZE_SIZE,
2407 coff_debug_merge_element, struct coff_debug_merge_type,
2408 coff_debug_merge_hash_entry, coff_debug_merge_hash_table,
2409 coff_debug_merge_hash_table_init, coff_debug_merge_hash_table_free,
2410 coff_debug_merge_hash_lookup, coff_link_section_info,
2411 coff_final_link_info, coff_debug_merge_hash_newfunc,
2412 coff_write_global_sym, coff_link_input_bfd, coff_reloc_link_order.
2413
2414 * libcoff.h: re-gen'd
2415
2416 Fri Jan 26 18:33:35 1996 Ian Lance Taylor <ian@cygnus.com>
2417
2418 * syms.c: Include "bfdlink.h".
2419 (struct stab_find_info): Define.
2420 (_bfd_stab_section_find_nearest_line): New function.
2421 * libbfd-in.h (_bfd_stab_section_find_nearest_line): Declare.
2422 * libbfd.h: Rebuild.
2423 * elf-bfd.h (struct elf_obj_tdata): Add line_info field.
2424 * elf.c (_bfd_elf_find_nearest_line): Try calling
2425 _bfd_stab_section_find_nearest_line before searching the ELF
2426 symbol table. Find the closest STT_FUNC symbol, not the last one.
2427 * libcoff-in.h (coff_data_type): Add line_info field.
2428 * libcoff.h: Rebuild.
2429 * coffgen.c (coff_find_nearest_line): Try calling
2430 _bfd_stab_section_find_nearest_line before searching the COFF
2431 symbol table.
2432 * Makefile.in: Rebuild dependencies.
2433
2434 Fri Jan 26 16:11:19 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2435
2436 * elf32-ppc.c (R_PPC_EMB_SDA21 relocations): Make relocation size
2437 4 bytes, so we get the correct value when updating the register
2438 field in little endian mode.
2439
2440 Thu Jan 25 12:14:16 1996 Ian Lance Taylor <ian@cygnus.com>
2441
2442 * libcoff-in.h (struct xcoff_tdata): Remove toc_section and
2443 entry_section fields. Add sntoc and snentry fields.
2444 * libcoff.h: Rebuild.
2445 * coffcode.h (coff_mkobject_hook): Initialize sntoc and snentry,
2446 not toc_section and entry_section (the COFF file does not have any
2447 sections at this point).
2448 (coff_write_object_contents): Set o_snentry and o_sntoc from
2449 snentry and sntoc rather than entry_section and toc_section.
2450 * coff-rs6000.c (xcoff_copy_private_bfd_data): Copy sntoc and
2451 snentry, not toc_section and entry_section.
2452 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Don't set
2453 entry_section from hentry.
2454 (xcoff_link_input_bfd): If a defined symbol has XCOFF_ENTRY set,
2455 set snenty.
2456 (xcoff_link_input_bfd): Set sntoc, not toc_section.
2457 (xcoff_write_global_symbol): Get toc_section from sntoc, rather
2458 than using toc_section directly.
2459
2460 * archures.c: Add missing `.' in enum bfd_architecture.
2461 * bfd-in2.h: Rebuild.
2462
2463 * config.bfd (i[345]86-*-sco*elf*): Use bfd_elf32_i386_vec. From
2464 Robert Lipe <robertl@arnet.com>.
2465
2466 Thu Jan 25 12:08:51 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2467
2468 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Add .rela.sdata{,2}
2469 to sections we allocate. Use bfd_zalloc to allocate initialial
2470 sections, not bfd_alloc.
2471 (ppc_elf_check_relocs): Remove BFD_ASSERTs for !shared from
2472 SDA{,2}I16 relocations.
2473 (ppc_elf_add_symbol_hook): Use the value of -G nn to determine
2474 whether to put something in .sbss or not.
2475 (ppc_elf_relocate_section): Add support for more relocations. Add
2476 in sec->output_offset where appropriate. Make error messages
2477 include the symbol name.
2478
2479 * elflink.c (_bfd_elf_create_linker_section): Lookup symbol before
2480 trying to add it to the symbol table, so _GLOBAL_OFFSET_TABLE_
2481 doesn't get redefined messages if -shared.
2482
2483 * elflink.h (elf_create_pointer_linker_section) Only bump RELA
2484 section if the rel_section field has been set up.
2485
2486 Wed Jan 24 20:40:26 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2487
2488 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo in eabi
2489 relocations.
2490
2491 Wed Jan 24 10:38:34 1996 Doug Evans <dje@charmed.cygnus.com>
2492
2493 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Delete checking
2494 of flags, only flags used are controlled by mach number. Bump up
2495 output file mach number to highest of input file mach numbers.
2496 (elf32_sparc_object_p): Watch for EF_SPARC_SUN_US1.
2497 (elf32_sparc_final_write_processing): Set EF_SPARC_SUN_US1 if v8plusa.
2498
2499 * config.bfd (sparc64-*-{sysv4*,solaris2*}): Comment out
2500 bfd_elf64_sparc_vec support.
2501
2502 Tue Jan 23 14:33:05 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2503
2504 * elf32-ppc.c (ppc_elf_copy_private_bfd_data): Don't complain if
2505 the embedded bit is set on some objects and not on others. Just
2506 or it together.
2507 (ppc_elf_relocate_section): Implement R_PPC_EMB_{SDA21,RELSDA}
2508 relocations.
2509
2510 Tue Jan 23 14:22:45 1996 Ian Lance Taylor <ian@cygnus.com>
2511
2512 * coffcode.h (coff_new_section_hook): Don't try to align the
2513 .stabstr section.
2514
2515 * coffcode.h (coff_set_section_contents): Fix the handling of the
2516 .lib section to work even if the entire section contents are
2517 written at once. From Gvran Uddeborg <gvran@uddeborg.pp.se> and
2518 Robert Lipe <robertl@arnet.com>.
2519
2520 Mon Jan 22 18:45:51 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2521
2522 * elflink.h (elf_finish_pointer_linker_section): Don't allocate
2523 memory here for contents.
2524
2525 * elf32-ppc.c (ppc_elf_relocate_section): Bump up _SDA_BASE_ and
2526 _SDA2_BASE_ by 32768.
2527 (ppc_elf_size_dynamic_sections): #if out PLT code which we haven't
2528 started using. Allocate contents for .sdata and .sdata2 sections
2529 also.
2530 (ppc_elf_check_relocs): Use bfd_get_section_name in debug message,
2531 rather than _name.
2532 (ppc_elf_finish_dynamic_symbol): Remove code that attempted to
2533 size _SDA{,2}_BASE_.
2534 (ppc_elf_relocate_section): Change how sdata{,2} relocations are
2535 done.
2536
2537 Mon Jan 22 08:52:04 1996 Doug Evans <dje@charmed.cygnus.com>
2538
2539 * elflink.h (elf_finish_pointer_linker_section): Fix typo.
2540
2541 * archures.c (bfd_mach_sparc_v9): Renamed from bfd_mach_sparc64.
2542 (bfd_mach_sparc_{v8plus,v8plusa}): Define.
2543 (bfd_mach_sparc_v9a): Define.
2544 (bfd_mach_sparc_v9_p): Define.
2545 * bfd-in2.h: Regenerated.
2546 * aoutx.h (aout,machine_type): bfd_mach_sparc64 renamed to
2547 bfd_mach_sparc_v9.
2548 * elf64-sparc.c (sparc64_elf_object_p): Likewise.
2549 * config.bfd (sparc64-*-sysv4*,sparc64-*-solaris2*): Set targ_defvec
2550 to bfd_elf32_sparc_vec.
2551 * cpu-sparc.c (arch_info_struct): Renamed from sparc_arch_info.
2552 Add v8plus{,a} support.
2553 Add v9a support.
2554 (sparc_compatible): New function.
2555 * elf32-sparc.h: #include "elf/sparc.h".
2556 (elf32_sparc_merge_private_bfd_data, elf32_sparc_object_p,
2557 elf32_sparc_final_write_processing): New functions.
2558 (bfd_elf32_bfd_merge_private_bfd_data, elf_backend_object_p,
2559 elf_backend_final_write_processing): Define.
2560
2561 Mon Jan 22 11:21:51 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2562
2563 * elf-bfd.h (struct elf_link_hash_entry): Add
2564 linker_section_pointer field.
2565 (enum elf_linker_section_enum): Enumeration for new way of
2566 creating linker dynamic sections and symbols.
2567 (elf_linker_section{,_pointers}): New structures for creating
2568 dynamic sections and symbols.
2569 (elf_obj_tdata): Add linker_section_pointers and linker_section
2570 fields.
2571 (elf_local_ptr_offsets,elf_linker_section): New accessor macros.
2572 (_bfd_elf_create_linker_section): New declarations.
2573 (_bfd_elf_find_pointer_linker_section): Ditto.
2574 (bfd_elf{32,64}_{create,finish}_pointer_linker_section): Ditto.
2575 (_bfd_elf_make_linker_section_rela): Ditto.
2576
2577 * elf.c (_bfd_elf_link_hash_newfunc): Initialize new fields.
2578
2579 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Delete.
2580 (ppc_elf_create_linker_section): New function to create the
2581 sections .got, .sdata, and .sdata2.
2582 (ppc_elf_size_dynamic_sections): Zap .rela.{sdata,sdata2} if
2583 needed.
2584 (ppc_elf_check_relocs): Support more of the eabi relocations.
2585 (ppc_elf_relocate_section): Ditto.
2586 (ppc_elf_finish_dynamic_symbols): Adjust _SDA{,2}_BASE_ by 32768
2587 if the .sdata{,2} + .sbss{,2} section size is > 32k.
2588
2589 * elflink.h (elf_create_pointer_linker_section): New function to
2590 create initialized pointers in dynamic linker sections.
2591 (elf_finish_pointer_linker_section): Actually intialize the
2592 pointers created above.
2593
2594 * elfcode.h (bfd_elf{32,64}_create_pointer_linker_section): New
2595 macros to provide both 32 and 64 bit versions of
2596 elf_create_pointer_linker_section.
2597 (bfd_elf{32,64}_finish_pointer_linker_section): New macros to
2598 provide both 32 and 64 bit versions of
2599 elf_finish_pointer_linker_section.
2600
2601 * elflink.c (_bfd_elf_create_linker_section): New function to
2602 create a linker section.
2603 (_bfd_elf_find_pointer_linker_section): Find a unique pointer to a
2604 given address in the linker pointer offsets created for a given
2605 symbol.
2606 (_bfd_elf_make_linker_section_rela): Make a RELA section
2607 corresponding to the generated linker section.
2608
2609 Sat Jan 20 08:36:10 1996 Doug Evans <dje@canuck.cygnus.com>
2610
2611 * elf32-sparc.c (ELF_MACHINE_ALT1): Define.
2612
2613 Thu Jan 18 18:25:34 1996 Kim Knuttila <krk@cygnus.com>
2614
2615 * coff-ppc.c (coff_ppc_relocate_section): changed TOCDEFN relocs.
2616 (coff_ppc_relocate_section): Handle special values for gcc built dlls.
2617 (dump_toc): fix diagnosing code to identify out-of-toc-bounds entries.
2618 Also begin the toc at 4 as an eye catcher ('31313131' marks the first
2619 toc entry in an objdump) for now.
2620 (ppc_do_last, ppc_get_last): New function - needed to save processing
2621 the toc owner to the end.
2622 (ppc_coff_swap_sym_in_hook): Removed an incorrect hack for doing the
2623 toc owner last.
2624
2625 * cofflink.c (_bfd_coff_final_link): Added a new hack to keep the
2626 toc owner from being done till last. Must define POWERPC_LE_PC
2627 to enable it.
2628
2629 * coffcode.h (coff_set_alignment_hook): alignment setting for .stab
2630
2631 * peicode.h (coff_swap_scnhdr_out): set section flags for stab/str
2632 to INFO.
2633 (coff_swap_aouthdr_out): Removed a non-working hack for computing the
2634 SizeOfImage for PowerPC. Ignore the size of the .junk section.
2635
2636 Thu Jan 18 17:42:12 1996 Ian Lance Taylor <ian@cygnus.com>
2637
2638 * elfcore.h: Include <signal.h> before <sys/procfs.h>.
2639
2640 Wed Jan 17 12:40:14 1996 Ian Lance Taylor <ian@cygnus.com>
2641
2642 * cpu-powerpc.c (arch_info_struct): Change last entry to not point
2643 back to first.
2644 (bfd_powerpc_arch): Point at first entry in arch_info_struct.
2645
2646 Tue Jan 16 15:10:49 1996 Ian Lance Taylor <ian@cygnus.com>
2647
2648 * elf.c (assign_file_positions_for_segments): Don't increment file
2649 offset for a segment which contains no loadable sections.
2650
2651 Mon Jan 15 17:46:27 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2652
2653 * reloc.c: Add new PowerPC relocations.
2654 * {bfd-in2,libbfd}.h: Regenerate.
2655
2656 * elf32-ppc.c (ppc_elf_howto_raw): Add more PPC relocations.
2657 (ppc_elf_reloc_type_lookup): Lookup new relocations.
2658
2659 Mon Jan 15 14:29:44 1996 Ian Lance Taylor <ian@cygnus.com>
2660
2661 * aoutx.h (howto_table_ext): Fix RELOC_BASE10 and RELOC_BASE22
2662 entries.
2663
2664 * sunos.c (sunos_scan_ext_relocs): Don't fail assert if
2665 info->shared.
2666
2667 * coffgen.c (coff_find_nearest_line): Don't try to cache
2668 information in sections that are not owned by a BFD. From Richard
2669 Henderson <richard@atheist.tamu.edu>.
2670
2671 * elf32-mips.c: Numerous changes to dynamic linking code, mostly
2672 from Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>.
2673 * elflink.h (elf_link_output_extsym): Remove special check for
2674 _rld_new_interface.
2675
2676 * ecoffswap.h: Add prototypes for static functions.
2677
2678 Sun Jan 14 21:36:08 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2679
2680 * elf32-ppc.c (ppc_elf_{unsupported,std}_reloc): Remove functions.
2681 (ppc_elf_howto_raw): Remove ppc_elf_{unsupported,std}_reloc
2682 references.
2683 (ppc_elf_relocate_section): No longer allow .sdata/.sbss sections
2684 to satisfy a TOC16 relocation. Rewrite unsupported relocation
2685 support. Begin support for R_PPC_SDA{2,}REL.
2686
2687 Sat Jan 13 09:36:52 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2688
2689 * elf32-ppc.c (ppc_elf_create_dynamic_sections): New function to
2690 create the .got and .got.neg sections.
2691 (ppc_elf_size_dynamic_sections): Call it.
2692 (ppc_elf_check_relocs): Call it.
2693 (ppc_elf_size_dynamic_sections): Support .got.neg, just like .got.
2694 (ppc_elf_check_relocs): Add error messages for relocations we
2695 don't yet support. Do not include R_PPC_SDAREL16 like a GOT
2696 relocation.
2697
2698 Fri Jan 12 15:27:59 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2699
2700 * elf32-ppc.c (ppc_elf_fake_sections): Define, and handle the new
2701 section flags for V.4 and eabi.
2702
2703 Fri Jan 12 13:59:16 1996 Ian Lance Taylor <ian@cygnus.com>
2704
2705 * elf.c (assign_file_positions_for_segments): If a segment
2706 contains no sections, don't mark it as readable.
2707
2708 * elf-bfd.h (_bfd_elf_section_from_bfd_section): Declare.
2709 * elfcode.h (_bfd_elf_section_from_bfd_section): Don't declare.
2710
2711 * elf.c (_bfd_elf_print_private_bfd_data): Dump contents of
2712 dynamic section, if there is one.
2713 * elf-bfd.h (struct elf_size_info): Add swap_dyn_in field.
2714 (bfd_elf32_swap_dyn_in): Change type of second parameter to PTR.
2715 (bfd_elf64_swap_dyn_in): Likewise.
2716 * elfcode.h (elf_swap_dyn_in): Change type of second parameter to
2717 PTR.
2718 (NAME(_bfd_elf,size_info)): Initialize swap_dyn_in field.
2719
2720 * elf32-i386.c (elf_i386_size_dynamic_sections): Don't create a
2721 DT_TEXTREL entry because of .rel.plt. From Martin Pirker
2722 <pirker@eiunix.tuwien.ac.at>.
2723
2724 Thu Jan 11 17:06:14 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2725
2726 * section.c (SEC_{EXCLUDE,SORT_ENTRIES}): New section flags for
2727 PowerPC V.4 and eabi.
2728 * bfd-in2.h: Regenerate.
2729 * libfd.h: Regenerate.
2730
2731 * elfxx-target.h (TARGET_{BIG,LITTLE}_SYM): Add new flags.
2732
2733 * elf32-ppc.c (ppc_elf_section_from_shdr): Support SHT_ORDERED
2734 section type and SHF_EXCLUDE section flag, turning them into the
2735 appropriate bfd section flag.
2736
2737 Thu Jan 11 11:23:30 1996 Ian Lance Taylor <ian@cygnus.com>
2738
2739 * xcofflink.c (xcoff_link_add_symbols): Create the special
2740 sections if we see a DYNAMIC object, in case that is the only
2741 XCOFF input object we see.
2742
2743 * elf32-mips.c: Extensive changes for a start at dynamic linking
2744 support, from Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>.
2745
2746 * elf-bfd.h (struct elf_backend_data): Add type_change_ok field.
2747 (struct elf_backend_data): Remove
2748 elf_backend_create_program_headers field. Add
2749 elf_backend_additional_program_headers and
2750 elf_backend_modify_segment_map fields.
2751 * elfxx-target.h (elf_backend_type_change_ok): Define if not
2752 defined.
2753 (elf_backend_additional_program_headers): Likewise.
2754 (elf_backend_modify_segment_map): Likewise.
2755 (elf_backend_create_program_headers): Don't define.
2756 (elfNN_bed): Change to account for field changes.
2757 * elf.c (assign_file_positions_for_segments): Call new
2758 modify_segment_map backend function. Don't call old
2759 create_program_headers backend function.
2760 (get_program_header_size): Call additional_program_headers rather
2761 than create_program_headers.
2762 * elflink.h (elf_link_add_object_symbols): Initialize
2763 type_change_ok from new backend field.
2764 (elf_link_output_extsym): Don't warn if _rld_new_interface is
2765 defined.
2766 (elf_reloc_link_order): Treat a reloc against a defined symbol as
2767 a reloc against the appropriate section.
2768
2769 * elf-bfd.h (struct bfd_elf_section_data): Add tdata field.
2770 (struct elf_obj_tdata): Rename ppc_flags_init field to flags_init.
2771 (elf_flags_init): Rename from elf_ppc_flags_init.
2772 * elf32-ppc.c (ppc_elf_set_private_flags): Use elf_flags_init, not
2773 elf_ppc_flags_init.
2774 (ppc_elf_copy_private_bfd_data): Likewise.
2775 (ppc_elf_merge_private_bfd_data): Likewise.
2776
2777 * elf32-m68k.c (howto_table): Change src_mask to 0 for all
2778 relocation entries.
2779
2780 Tue Jan 9 15:22:53 1996 David Mosberger-Tang <davidm@azstarnet.com>
2781
2782 * coff-alpha.c (alpha_relocate_section): During final link, allow
2783 output .lita section to be bigger than 64k by adjusting gp value
2784 on a per-input section basis.
2785 * libecoff.h (struct ecoff_tdata): Add issued_multiple_gp_warning
2786 field.
2787 (struct ecoff_section_tdata): Add gp field.
2788
2789 Tue Jan 9 12:00:36 1996 Ian Lance Taylor <ian@cygnus.com>
2790
2791 Handle Alpha ECOFF changes in OSF/1 3.2.
2792 * libecoff.h (struct ecoff_backend_data): Add get_elt_at_filepos
2793 field.
2794 * coff-alpha.c: Include "aout/ar.h".
2795 (alpha_ecoff_get_relocated_section_contents): Don't require an
2796 ALPHA_R_IGNORE reloc after an ALPHA_R_GPDISP reloc, since OSF/1
2797 3.2 doesn't generate one.
2798 (alpha_relocate_section): Likewise.
2799 (alpha_ecoff_slurp_armap): Define.
2800 (alpha_ecoff_slurp_extended_name_table): Define.
2801 (alpha_ecoff_construct_extended_name_table): Define.
2802 (alpha_ecoff_truncate_arname): Define.
2803 (alpha_ecoff_write_armap): Define.
2804 (alpha_ecoff_generic_stat_arch_elt): Define.
2805 (alpha_ecoff_update_armap_timestamp): Define.
2806 (ARFZMAG): Define.
2807 (alpha_ecoff_read_ar_hdr): New static function.
2808 (alpha_ecoff_get_elt_at_filepos): New static function.
2809 (alpha_ecoff_openr_next_archived_file): New static function.
2810 (alpha_ecoff_get_elt_at_index): New static function.
2811 (alpha_ecoff_backend_data): Initialize get_elt_at_filepos field.
2812 (ecoffalpha_little_vec): Change BFD_JUMP_TABLE_ARCHIVE from
2813 _bfd_ecoff to alpha_ecoff.
2814 * ecoff.c (ecoff_link_add_archive_symbols): Use get_elt_at_filepos
2815 field from backend structure, rather than always calling
2816 _bfd_get_elt_at_filepos.
2817 * coff-mips.c (mips_ecoff_backend_data): Initialize
2818 get_elt_at_filepos field.
2819 * archive.c (_bfd_generic_read_ar_hdr_mag): New function, copied
2820 from _bfd_generic_read_ar_hdr with minor changes.
2821 (_bfd_generic_read_ar_hdr): Use _bfd_generic_read_ar_hdr_mag.
2822 * libbfd-in.h (_bfd_generic_read_ar_hdr_mag): Declare.
2823 * libbfd.h: Rebuild.
2824
2825 * bfd-in.h (BFD_IN_MEMORY): Define.
2826 * libbfd-in.h (struct bfd_in_memory): Define.
2827 * libbfd.c (bfd_read): Handle BFD_IN_MEMORY flag.
2828 (bfd_get_file_window): Don't try to map a BFD_IN_MEMORY file.
2829 (bfd_write, bfd_stat): Abort if BFD_IN_MEMORY is set.
2830 (bfd_tell, bfd_flush, bfd_seek): Handle BFD_IN_MEMORY flag.
2831 * bfd.c (struct _bfd): Change iostream field from char * to PTR.
2832 (bfd_get_size): Handle BFD_IN_MEMORY flag.
2833 * cache.c (bfd_cache_close): Ignore BFD_IN_MEMORY files.
2834 (bfd_open_file): Cast to PTR, not char *, when setting iostream.
2835 (bfd_cache_lookup_worker): Abort if BFD_IN_MEMORY is set.
2836 * opncls.c (bfd_fdopenr): Cast to PTR, not char *, when setting
2837 iostream.
2838 (bfd_openstreamr): Likewise.
2839 * aoutx.h (NAME(aout,some_aout_object_p)): Only fstat iostream if
2840 BFD_IN_MEMORY is not set.
2841 * riscix.c (riscix_some_aout_object_p): Likewise.
2842 * bfd-in2.h, libbfd.h: Rebuild.
2843
2844 * targets.c (bfd_target): Add _bfd_get_elt_at_index field.
2845 (BFD_JUMP_TABLE_ARCHIVE): Add _get_elt_at_index.
2846 (bfd_get_elt_at_index): Define.
2847 * archive.c (_bfd_generic_get_elt_at_index): Rename from
2848 bfd_get_elt_at_index. Change index parameter from int to
2849 symindex.
2850 * libbfd-in.h (_bfd_generic_get_elt_at_index): Declare.
2851 (_bfd_noarchive_get_elt_at_index): Define.
2852 (_bfd_archive_bsd_get_elt_at_index): Define.
2853 (_bfd_archive_coff_get_elt_at_index): Define.
2854 * bfd-in2.h, libbfd.h: Rebuild.
2855 * aout-target.h (MY_get_elt_at_index): Define if not defined.
2856 * coff-rs6000.c (xcoff_get_elt_at_index): Define.
2857 * ieee.c (ieee_get_elt_at_index): Define.
2858 * libecoff.h (_bfd_ecoff_get_elt_at_index): Define.
2859 * oasys.c (oasys_get_elt_at_index): Define.
2860 * som.c (som_get_elt_at_index): Define.
2861
2862 * ecoff.c (_bfd_ecoff_find_nearest_line): Don't restrict line
2863 numbers to the .text section.
2864
2865 Mon Jan 8 17:00:57 1996 Ian Lance Taylor <ian@cygnus.com>
2866
2867 * ieee.c (ieee_write_debug_part): Change return type to boolean.
2868 If there is a SEC_DEBUGGING section, get the contents of the debug
2869 information part from it.
2870 (ieee_set_section_contents): Store the contents of a SEC_DEBUGGING
2871 section in memory.
2872 (ieee_write_object_contents): Check ieee_write_debug_part return.
2873
2874 Thu Jan 4 17:12:37 1996 Fred Fish <fnf@cygnus.com>
2875
2876 * config.bfd (i[345]86-*-freebsd*): Add target.
2877 * configure.in (i386freebsd_vec): Add vec.
2878 * configure: Regenerate.
2879 * Makefile.in (BFD32_BACKENDS): Add i386freebsd.o.
2880 (BFD32_BACKENDS_CFILES): Add i386freebsd.c.
2881 Rebuild dependencies..
2882 * freebsd.h: New file.
2883 * i386freebsd.c: New file.
2884 * targets.c (i386freebsd_vec): Declare.
2885 (bfd_target_vector): Add i386freebsd_vec.
2886 * i386linux.c (SEGMENT_SIZE): Define as TARGET_PAGE_SIZE
2887 * i386netbsd.c (SEGMENT_SIZE): Define as TARGET_PAGE_SIZE
2888
2889 Thu Jan 4 16:27:46 1996 Ian Lance Taylor <ian@cygnus.com>
2890
2891 * ieee.c (ieee_slurp_debug): New static function.
2892 (ieee_object_p): Call it.
2893 (ieee_slurp_section_data): Skip debugging sections.
2894 (ieee_get_reloc_upper_bound): Likewise.
2895 (ieee_get_section_contents): Likewise.
2896 (ieee_canonicalize_reloc): Likewise.
2897 (ieee_write_section_part): Likewise.
2898 (ieee_write_debug_part): Likewise.
2899 (ieee_write_data_part): Likewise.
2900 (init_for_output): Likewise.
2901
2902 Wed Jan 3 19:42:47 1996 Michael Meissner <meissner@wogglebug.tiac.net>
2903
2904 * elf32-ppc.c (ppc_elf_relocate_section): Make @GOT relocations
2905 work.
2906 (ppc_elf_howto_raw): Just use bfd_elf_generic_reloc for all howto
2907 relocs, since ppc_elf_relocate_section handles the linker case.
2908 (ppc_elf_{addr16_ha,got16,toc16,brtaken}_reloc): Delete, no longer
2909 used.
2910 (ppc_elf_{addr16_ha,got16,toc16,brtaken}_inner): Merge these into
2911 ppc_elf_relocate_section since that is now the only caller.
2912 (ppc_elf_relocate_section): Ditto.
2913
2914 Wed Jan 3 15:11:30 1996 Ian Lance Taylor <ian@cygnus.com>
2915
2916 * coffcode.h (coff_write_object_contents): If we don't know the
2917 section of the entry point for an XCOFF executable, always set the
2918 entry address to -1.
2919
2920 Tue Jan 2 14:17:15 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2921
2922 * elf.c (bfd_section_from_shdr): Add support for note sections.
2923
2924 Tue Jan 2 13:10:25 1996 Ian Lance Taylor <ian@cygnus.com>
2925
2926 * bfd-in.h (struct _symbol_info): Add stab_type field.
2927 * bfd-in2.h: Rebuild.
2928 * aoutx.h (NAME(aout,get_symbol_info)): Set stab_type.
2929
2930 * elf32-ppc.c: Remove trailing newline from calls to
2931 _bfd_error_handler.
2932 (ppc_elf_merge_private_bfd_data): Only warn about endianness
2933 difference if target endianness is known.
2934
2935 Thu Dec 21 12:43:49 1995 Michael Meissner <meissner@tiktok.cygnus.com>
2936
2937 * elf32-ppc.c (ppc_elf_howto_raw): Add a phony reloc to handle the
2938 old style TOC16 references without using R_PPC_GOT.
2939 (ppc_reloc_type): Ditto.
2940 (ppc_elf_reloc_type_lookup): Add support for TOC16.
2941 (ppc_elf_toc16_inner): Renamed from ppc_elf_got16_inner.
2942 (ppc_elf_toc16_reloc): Renamed from ppc_elf_toc16_reloc.
2943 (ppc_elf_got16_{inner,reloc}): Stubs for real GOT support.
2944 (ppc_elf_check_relocs): New function for GOT/PLT support that is
2945 work in progress.
2946 (ppc_elf_adjust_dynamic_symbol): Ditto.
2947 (ppc_elf_adjust_dynindx): Ditto.
2948 (ppc_elf_size_dynamic_sections): Ditto.
2949 (ppc_elf_finish_dynamic_symbol): Ditto.
2950 (ppc_elf_finish_dynamic_sections): Ditto.
2951 (ELF_DYNAMIC_INTERPRETER): Define.
2952
2953 Wed Dec 20 19:14:18 1995 Ken Raeburn <raeburn@cygnus.com>
2954
2955 * elf.c (copy_private_bfd_data): When attaching sections to
2956 segments ignore sections that won't be allocated. Patch from
2957 Andreas Schwab.
2958
2959 Tue Dec 19 20:01:43 1995 Ken Raeburn <raeburn@cygnus.com>
2960
2961 * config.bfd: Match on m68k-cbm-* only if OS doesn't match
2962 anything else.
2963
2964 Tue Dec 19 16:38:59 1995 Ian Lance Taylor <ian@cygnus.com>
2965
2966 * coff-i960.c (CALC_ADDEND): Define.
2967 (coff_i960_relocate_section): Add the input section VMA to the
2968 addend for PC relative relocs.
2969
2970 Sun Dec 17 20:11:55 1995 Kim Knuttila <krk@cygnus.com>
2971
2972 * peicode.h (pe_print_pdata): Must test the entire entry for zero
2973 to correctly terminate.
2974
2975 Fri Dec 15 12:05:57 1995 Ian Lance Taylor <ian@cygnus.com>
2976
2977 * targets.c (enum bfd_endian): Define.
2978 (bfd_target): Rename byteorder_big_p to byteorder, and change it
2979 from boolean to enum bfd_endian. Change header_byteorder_big_p
2980 correspondingly.
2981 * bfd-in.h (bfd_big_endian, bfd_little_endian): New macros.
2982 (bfd_header_big_endian, bfd_header_little_endian): New macros.
2983 * bfd-in2.h: Rebuild.
2984 * All targets: Change initialization of byteorder and
2985 header_byteorder to use enum bfd_endian values rather than
2986 booleans.
2987 * All files: Change all references to byteorder_big_p and
2988 header_byteorder_big_p to use new bfd_*_endian macros.
2989
2990 * coffgen.c (make_a_section_from_file): Set lma to s_paddr, not
2991 s_vaddr.
2992 * coffcode.h (coff_write_object_contents): Set s_paddr to lma, not
2993 vma.
2994 * ecoff.c (_bfd_ecoff_write_object_contents): Likewise.
2995
2996 Fri Dec 15 07:32:09 1995 steve chamberlain <sac@slash.cygnus.com>
2997
2998 * pe[i]-i386.c (TARGET_UNDERSCORE): Define to '_'.
2999
3000 Thu Dec 14 13:45:37 1995 Ian Lance Taylor <ian@cygnus.com>
3001
3002 * ieee.c: Lots of minor cleanups. Make many functions return
3003 errors rather than calling abort. Also:
3004 (ieee_write_twobyte): Remove; change callers to call existing
3005 ieee_write_2bytes function.
3006 (ieee_write_expression): Don't output the section twice when
3007 outputting a local symbol. Don't emit an extraneous zero if there
3008 is only one term.
3009 (ieee_slurp_sections): Set the lma as well as the vma.
3010 (ieee_archive_p): Use bfd_alloc_grow rather than an obstack.
3011
3012 * ihex.c (ihex_set_arch_mach): Don't accept any architecture, just
3013 a recognized one or bfd_arch_unknown.
3014 (ihex_get_symtab_upper_bound): Define as bfd_0l, to permit objcopy
3015 to succeed.
3016 (ihex_get_symtab): Likewise.
3017
3018 Wed Dec 13 15:44:06 1995 Ian Lance Taylor <ian@cygnus.com>
3019
3020 * aoutx.h: Include <ctype.h>.
3021 (struct aout_link_includes_table): Define.
3022 (struct aout_link_includes_totals): Define.
3023 (struct aout_link_includes_entry): Define.
3024 (aout_link_includes_lookup): Define macro.
3025 (struct aout_final_link_info): Add includes field.
3026 (aout_link_includes_newfunc): New static function.
3027 (NAME(aout,final_link)): Initialize includes hash table.
3028 (aout_link_write_symbols): Eliminate duplicate N_BINCL entries.
3029
3030 Wed Dec 13 10:52:14 1995 Stan Shebs <shebs@andros.cygnus.com>
3031
3032 * mpw-config.in: Match on mips-*-* instead of mips-idt-ecoff.
3033
3034 Wed Dec 13 11:07:45 1995 Kim Knuttila <krk@cygnus.com>
3035
3036 * coff-ppc.c (coff_ppc_relocate_section): removed debugging code.
3037
3038 Tue Dec 12 17:42:06 1995 Kim Knuttila <krk@cygnus.com>
3039
3040 * peicode.h (pe_print_reloc): New function to dump the .reloc section.
3041 (pe_print_private_bfd_data): call pe_print_reloc.
3042 * coffcode.h (coff_set_alignment_hook): .reloc section alignment.
3043 * coff-ppc.c (in_reloc_p): Added missing non-eligible relocs. Spiffed
3044 up some debugging as well.
3045
3046 Tue Dec 12 11:34:23 1995 Ian Lance Taylor <ian@cygnus.com>
3047
3048 * config.bfd: Handle sparc-*-elf*. From Ronald F. Guilmette
3049 <rfg@monkeys.com>.
3050
3051 Fri Dec 8 17:47:07 1995 Ian Lance Taylor <ian@cygnus.com>
3052
3053 * elflink.h (elf_link_add_object_symbols): Set section_count to 0
3054 when setting sections to NULL.
3055
3056 Wed Dec 6 17:05:37 1995 Ian Lance Taylor <ian@cygnus.com>
3057
3058 * xcofflink.c (struct xcoff_loader_info): Add export_defineds
3059 field.
3060 (bfd_xcoff_size_dynamic_sections): Add export_defineds parameter.
3061 (xcoff_build_ldsyms): If export_defineds is set, set XCOFF_EXPORT
3062 for all symbols.
3063 * bfd-in.h (bfd_xcoff_size_dynamic_sections): Update declaration.
3064 * bfd-in2.h: Rebuild.
3065
3066 Mon Dec 4 16:40:47 1995 Kim Knuttila <krk@cygnus.com>
3067
3068 * coffcode.h (coff_set_alignment_hook): Removed some debugging printf's
3069
3070 Mon Dec 4 11:25:39 1995 Ian Lance Taylor <ian@cygnus.com>
3071
3072 * ihex.c (ihex_scan): Handle record types 4 and 5.
3073 (ihex_object_p): Permit types 4 and 5.
3074 (ihex_set_section_contents): Remove check for out of range
3075 addresses.
3076 (ihex_write_object_contents): Generate types 4 and 5.
3077
3078 * elflink.h (elf_link_output_extsym): Just ignore warning and
3079 indirect references to symbols which don't really exist.
3080
3081 Sun Dec 3 19:00:27 1995 Kim Knuttila <krk@cygnus.com>
3082
3083 * peicode.h (pe_print_idata): Minor format fixes
3084 (pe_print_edata): New function. Under private printing, this formats
3085 the edata section of a PE file.
3086 (pe_print_private_bfd_data): Added call to pe_print_edata.
3087
3088 Sun Dec 3 16:46:54 1995 Richard Earnshaw (rearnsha@armltd.co.uk)
3089
3090 * aout-arm.c (MY_swap_std_reloc_out): Use KEEPIT to get the symbol
3091 index, don't call stoi.
3092
3093 Fri Dec 1 14:46:51 1995 Ian Lance Taylor <ian@cygnus.com>
3094
3095 * srec.c (srec_scan): Set lma as well as vma.
3096
3097 * ihex.c: New file; support for Intel Hex format.
3098 * targets.c (enum bfd_flavour): Add bfd_target_ihex_flavour.
3099 (ihex_vec): Declare.
3100 (bfd_target_vector): Always include ihex_vec.
3101 * bfd.c (struct _bfd): Add ihex_data field to tdata union.
3102 * Makefile.in: Rebuild dependencies.
3103 (BFD_LIBS): Add ihex.o
3104 (BFD_LIBS_CFILES): Add ihex.c.
3105 * bfd-in2.h: Rebuild.
3106
3107 * elf.c (assign_file_positions_for_segments): Sort the sections in
3108 each segment.
3109 (get_program_header_size): Return the right size if segment_map is
3110 not NULL.
3111 (copy_private_bfd_data): Don't bother to sort the sections.
3112
3113 * bfd.c (bfd_record_phdr): New function.
3114 * bfd-in.h (bfd_record_phdr): Declare.
3115 * bfd_in2.h: Rebuild.
3116
3117 * elf32-sparc.c (elf32_sparc_relocate_section): Remove bogus
3118 BFD_ASSERT.
3119
3120 * libbfd.c (bfd_malloc, bfd_realloc): New functions.
3121 (bfd_zmalloc): Return PTR, not char *. Take size_t, not
3122 bfd_size_type.
3123 * libbfd-in.h (bfd_malloc, bfd_realloc): Declare.
3124 (bfd_zmalloc): Change declaration.
3125 * libbfd.h: Rebuild.
3126 * Many files: Use bfd_malloc and bfd_realloc rather than malloc
3127 and realloc. Don't set bfd_error_no_memory if they fail.
3128
3129 Thu Nov 30 19:32:26 1995 Kim Knuttila <krk@cygnus.com>
3130
3131 * coff-ppc.c: Added macros to tidy up toc cell treatment. Numerous
3132 uses as well. Added a new howto to deal with TOCREL16 relocs that
3133 are TOCDEFN as well.
3134 (coff_ppc_relocate_section): Expanded treatment of ADDR32NB relocs
3135 to handle RVA relocs from dlltool.
3136 (ppc_coff_rtype2howto): TOCDEFN reloc addition.
3137 (coff_ppc_rtype_to_howto): TOCDEFN reloc addition.
3138 (ppc_coff_reloc_type_lookup): TOCDEFN reloc addition.
3139
3140 * coffcode.h (coff_set_alignment_hook): check idata$X sections
3141 to get the right section alignment.
3142
3143 Thu Nov 30 16:48:18 1995 Ian Lance Taylor <ian@cygnus.com>
3144
3145 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
3146 p_paddr if p_paddr is zero.
3147 (make_mapping): Set includes_filehdr and includes_phdrs for first
3148 PT_LOAD segment.
3149 (map_sections_to_segments): Set includes_phdrs for PT_PHDR
3150 segment.
3151 (assign_file_positions_for_segments): Handle includes_filehdr and
3152 includes_phdrs. Remove special handling of PT_PHDR and first
3153 PT_LOAD segments.
3154 (copy_private_bfd_data): Set includes_filehdr and includes_phdr
3155 when appropriate. Remove special handling of PT_PHDR segment.
3156 Use a more complex condition for when a section is included in a
3157 segment to handle Solaris linker oddities.
3158
3159 Thu Nov 30 11:17:33 1995 Manfred Hollstein KS/EF4A 60/1F/110 #40283 <manfred@lts.sel.alcatel.de>
3160
3161 * coff-m88k.c (howto_table): Reformatted for easier reading;
3162 special_function now points to new function m88k_special_reloc.
3163 (howto_hvrt16): Function previously used for handling HVRT16 relocs
3164 removed.
3165 (rtype2howto): Do not add reloc's r_offset to the addend, this will
3166 be done correctly by m88k_special_reloc.
3167 (reloc_processing): New function to be used by RELOC_PROCESSING.
3168 (RELOC_PROCESSING): Define to call reloc_processing.
3169
3170 Wed Nov 29 12:42:36 1995 Ian Lance Taylor <ian@cygnus.com>
3171
3172 * peicode.h (pe_print_idata): Call malloc rather than xmalloc.
3173 (pe_print_pdata): Likewise.
3174
3175 * opncls.c (bfd_alloc_by_size_t): Set bfd_error_no_memory if
3176 obstack_alloc fails.
3177 (bfd_alloc_finish): Set bfd_error_no_memory if obstack_finish
3178 fails.
3179 * libbfd.c (bfd_zmalloc): Set bfd_error_no_memory if malloc fails.
3180 * Many files: don't set bfd_error_no_memory if one of the above
3181 routines fails.
3182
3183 * elf.c (assign_file_positions_for_segments): Don't adjust p_paddr
3184 if p_paddr_valid is set.
3185 (copy_private_bfd_data): New static function.
3186 (_bfd_elf_copy_private_section_data): Call copy_private_bfd_data.
3187
3188 * elf.c (assign_file_positions_for_segments): Fix case where extra
3189 program headers were allocated.
3190
3191 * elf.c (_bfd_elf_print_private_bfd_data): New function.
3192 * elf-bfd.h (_bfd_elf_print_private_bfd_data): Declare.
3193 * elfxx-target.h (bfd_elfNN_bfd_print_private_bfd_data): Define to
3194 _bfd_elf_print_private_bfd_data.
3195
3196 * coff-alpha.c (alpha_ecoff_swap_reloc_in): Don't abort if
3197 r_symndx is RELOC_SECTION_NONE for an ALPHA_R_IGNORE reloc.
3198 Change a RELOC_SECTION_LITA symndx to RELOC_SECTION_ABS.
3199 (alpha_ecoff_swap_reloc_out): Change RELOC_SECTION_ABS to
3200 RELOC_SECTION_LITA for ALPHA_R_IGNORE.
3201 (alpha_adjust_reloc_out): For ALPHA_R_IGNORE, don't change
3202 RELOC_SECTION_ABS to RELOC_SECTION_NONE.
3203
3204 Tue Nov 28 16:59:50 1995 Ian Lance Taylor <ian@cygnus.com>
3205
3206 * elf-bfd.h (struct elf_obj_tdata): Add segment_map field.
3207 * elf.c (make_mapping): New static function.
3208 (map_sections_to_segments): New static function.
3209 (elf_sort_sections): New static function.
3210 (assign_file_positions_for_segments): New static function.
3211 (map_program_segments): Remove.
3212 (get_program_header_size): Remove sorted_hdrs, count, and
3213 maxpagesize parameters. Simplify.
3214 (assign_file_positions_except_relocs): When generating an
3215 executable, use assign_file_positions_for_segments.
3216 (elf_sort_hdrs): Remove.
3217 (_bfd_elf_sizeof_headers): Remove eliminated parameters from call
3218 to get_program_header_size.
3219
3220 Mon Nov 27 12:27:46 1995 Ian Lance Taylor <ian@cygnus.com>
3221
3222 * hp300hpux.c (MY(callback)): Set lma as well as vma.
3223
3224 * configure, config.in: Regenerate with autoconf 2.7.
3225
3226 * elf32-i386.c (elf_backend_plt_readonly): Set correctly, to 1.
3227 * elf32-sparc.c (elf_backend_plt_readonly): Set correctly, to 0.
3228
3229 Wed Nov 22 12:02:09 1995 Ian Lance Taylor <ian@cygnus.com>
3230
3231 * ecoff.c (_bfd_ecoff_new_section_hook): Handle .rconst section.
3232 (ecoff_sec_to_styp_flags): Likewise.
3233 (_bfd_ecoff_styp_to_sec_flags): Handle STYP_RCONST.
3234 (ecoff_set_symbol_info): Handle scRConst.
3235 (ecoff_slurp_reloc_table): Handle RELOC_SECTION_RCONST.
3236 (ecoff_compute_section_file_positions): Handle .rconst section.
3237 (_bfd_ecoff_write_object_contents): Likewise.
3238 (ecoff_link_check_archive_element): Handle scRConst.
3239 (ecoff_link_add_externals): Likewise.
3240 (ecoff_link_write_external): Handle .rconst section.
3241 (ecoff_reloc_link_order): Likewise.
3242 * ecofflink.c (bfd_ecoff_debug_accumulate): Handle scRConst.
3243 * coff-alpha.c (alpha_convert_external_reloc): Handle .rconst
3244 section.
3245 (alpha_relocate_section): Handle RELOC_SECTION_RCONST.
3246
3247 * sunos.c (sunos_scan_dynamic_symbol): Only set written if the
3248 DEF_DYNAMIC flag is set.
3249
3250 Tue Nov 21 13:25:29 1995 Ken Raeburn <raeburn@cygnus.com>
3251
3252 * host-aout.c: If TRAD_HEADER is defined, include it.
3253
3254 Tue Nov 21 13:03:57 1995 Ian Lance Taylor <ian@cygnus.com>
3255
3256 * aclocal.m4 (AC_PROG_CC): Remove local definition.
3257 (BFD_BINARY_FOPEN): Require AC_CANONICAL_SYSTEM.
3258 (BFD_NEED_DECLARATION): New function.
3259 * configure.in: Use BFD_NEED_DECLARATION.
3260 * acconfig.h: Put NEED_DECLARATION_* in @TOP@ section.
3261 * configure, config.in: Rebuild with autoconf 2.6.
3262
3263 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Clear
3264 special_sections before returning when called with a non XCOFF
3265 BFD.
3266
3267 * coffgen.c (coff_renumber_symbols): Sort common symbols with
3268 global symbols.
3269
3270 * coffcode.h (coff_compute_section_file_positions): Only pad the
3271 previous section to force file alignment when creating an
3272 executable.
3273
3274 Mon Nov 20 14:54:09 1995 Ian Lance Taylor <ian@cygnus.com>
3275
3276 * coffcode.h (coff_compute_section_file_positions): If
3277 RS6000COFF_C, set up the .debug section.
3278
3279 * xcofflink.c (xcoff_link_input_bfd): Adjust the TOC anchor value
3280 if it is not large enough to accomodate the entire TOC area with
3281 signed 16 bit offsets.
3282 (xcoff_write_global_symbol): Handle negative TOC offsets in global
3283 linkage code.
3284 (_bfd_ppc_xcoff_relocate_section): Adjust relocations against a
3285 TOC anchor to use the TOC value used in the output file.
3286
3287 Sat Nov 18 18:01:41 1995 Ian Lance Taylor <ian@cygnus.com>
3288
3289 * coffgen.c (_bfd_coff_get_external_symbols): Cast malloc return.
3290 (_bfd_coff_read_string_table): Likewise.
3291
3292 Sat Nov 18 19:43:04 1995 Richard Earnshaw (rearnsha@armltd.co.uk)
3293
3294 * pe-arm.c: Fix typos.
3295 * coff-arm.c: Likewise.
3296
3297 Fri Nov 17 16:22:04 1995 Kim Knuttila <krk@cygnus.com>
3298
3299 * coff-ppc.c (list_ele): Added "cat"egory member.
3300 (record_toc): New category parameter (priv or pub).
3301 (ppc_record_toc_entry): Check to see if toc bounds exceeded.
3302 (ppc_process_before_allocation): Removed embrionic data-in-toc from
3303 the mainline. It addes extra toc cells in error.
3304 (ppc_coff_swap_sym_in_hook): Added some documentation.
3305 (dump_toc): Can now diagnose "virtual toc" chicanery.
3306
3307 Fri Nov 17 10:41:25 1995 Philippe De Muyter <phdm@info.ucl.ac.be>
3308
3309 * elf-bfd.h (struct elf_link_hash_table): Change type of
3310 dynsymcount and bucketcount fields from size_t to bfd_size_type.
3311
3312 Fri Nov 17 10:02:58 1995 Ian Lance Taylor <ian@cygnus.com>
3313
3314 * coffcode.h (coff_pointerize_aux_hook): I960 version: don't
3315 pointerize C_LEAFSTAT or C_LEAFEXT entries.
3316
3317 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Only create
3318 DT_INIT and DT_FINI entries if the _init or _fini symbol is
3319 defined or mentioned in a regular file.
3320
3321 Thu Nov 16 15:16:42 1995 Kim Knuttila <krk@cygnus.com>
3322
3323 * coff-ppc.c (ppc_record_data_in_toc_entry): new function
3324 (coff_ppc_relocate_section): Handle TOCDEFN attribute
3325 (coff_ppc_relocate_section): Correct REL24 handling
3326 (ppc_process_before_allocation): Correct TOCDEFN handling
3327
3328 * peicode.h (dir_names): Added name descriptions
3329
3330 Thu Nov 16 03:38:03 1995 Ken Raeburn <raeburn@cygnus.com>
3331
3332 * VERSION: Updated to cygnus-2.6.
3333
3334 Wed Nov 15 19:30:07 1995 Ken Raeburn <raeburn@cygnus.com>
3335
3336 * targets.c (m68k4knetbsd_vec): Declare.
3337
3338 Wed Nov 15 18:05:52 1995 Ian Lance Taylor <ian@cygnus.com>
3339
3340 * targets.c (bfd_target): Change type of second argument to
3341 _bfd_print_private_bfd_data from void * to PTR.
3342 * libbfd-in.h (_bfd_generic_bfd_print_private_bfd_data): Cast
3343 using PTR rather than void *.
3344 * bfd-in2, libbfd.h: Rebuild.
3345 * peicode.h (pe_print_private_bfd_data): Change vfile from void *
3346 to PTR.
3347 * elfxx-target.h (bfd_elfNN_bfd_print_private_bfd_data): Define as
3348 _bfd_generic_bfd_print_private_bfd_data rather than casting
3349 bfd_true.
3350
3351 Wed Nov 15 04:09:14 1995 Ken Raeburn <raeburn@cygnus.com>
3352
3353 * Makefile.in (.dep1): Fix stupid typo in last change. Remove any
3354 "DO NOT DELETE" lines or blank lines that mkdep writes on some
3355 systems.
3356 (BFD_LIBS_CFILES, ALL_MACHINES_CFILES, BFD32_BACKENDS_CFILES,
3357 BFD64_BACKENDS_CFILES): New variables.
3358 (CFILES): Use them.
3359
3360 Tue Nov 14 11:52:23 1995 Ian Lance Taylor <ian@cygnus.com>
3361
3362 * peicode.h (coff_swap_aouthdr_out): For PPC PE, start isize at 0,
3363 not at the file position of the first section.
3364 * coffcode.h (coff_compute_section_file_positions): Avoid using
3365 unportable #elif.
3366 (coff_write_object_contents): When generating a PPC PE executable
3367 with no symbols, round up the file size to a COFF_PAGE_SIZE
3368 boundary.
3369 * cofflink.c (_bfd_coff_final_link): If there are no symbols,
3370 don't write out a string table.
3371
3372 * elf.c (bfd_section_from_shdr): When using a different section
3373 header, pass the new one to _bfd_elf_make_section_from_shdr.
3374 (elf_fake_sections): Don't set sh_info and sh_entsize fields.
3375 (elf_map_symbols): Add section VMA to symbol value when comparing
3376 against 0.
3377 (_bfd_elf_compute_section_file_positions): Only build symbol table
3378 if there are some symbols. Set file offset of symtab and strtab
3379 sections.
3380 (assign_file_positions_except_relocs): Remove dosyms parameter.
3381 Change all callers. Never set file offset of symtab and strtab
3382 sections.
3383 (_bfd_elf_copy_private_section_data): New function.
3384 (MAP_ONESYMTAB, MAP_DYNSYMTAB, MAP_STRTAB, MAP_SHSTRTAB): Define.
3385 (_bfd_elf_copy_private_symbol_data): New function.
3386 (swap_out_syms): Check for special mapping of st_shndx created by
3387 copy_private_symbol_data.
3388 * elfxx-target.h: Use new copy routines.
3389 * elf-bfd.h (_bfd_elf_copy_private_symbol_data): Declare.
3390 (_bfd_elf_copy_private_section_data): Declare.
3391
3392 * config.bfd (sh-*-*): Set targ_defvec to shcoff_vec.
3393
3394 * coffcode.h (coff_slurp_symbol_table): If COFF_WITH_PE, handle
3395 C_NT_WEAK.
3396
3397 * coff-sh.c (shlcoff_vec): Use _bfd_generic_archive_p, not
3398 _bfd_dummy_target, matching the recent change to archive
3399 recognition.
3400
3401 Mon Nov 13 13:24:38 1995 Ian Lance Taylor <ian@cygnus.com>
3402
3403 * libbfd.c (bfd_get_file_window): Use casts to avoid doing
3404 arithmetic on PTR types.
3405
3406 * aout-target.h (MY(callback)): Set the lma of the sections.
3407
3408 * ecoff.c (ecoff_reloc_link_order): Turn a reloc against a defined
3409 symbol into a reloc against the section.
3410
3411 Mon Nov 13 07:31:35 1995 Kim Knuttila <krk@cygnus.com>
3412
3413 * coff-ppc.c (ppc_coff_link_hash_entry): added support for inline
3414 glue for the relocs: IMGLUE and IFGLUE.
3415 (record_toc): new function - tracks toc contents
3416 (ppc_mark_symbol_as_glue): new function - supports the IMGLUE reloc
3417 (coff_ppc_relocate_section): Added support and fixes for IMGLUE/IFGLUE
3418 (ppc_coff_rtype2howto): removed invalid IMGLUE hack
3419 (coff_ppc_rtype_to_howto): removed invalid IMGLUE hack
3420 (ppc_record_toc_entry): Removed a debug define (duh)
3421
3422 * peicode.h (coff_swap_scnhdr_out): Fixed invalid strcmp for ".reldata"
3423 (pe_print_idata): New function - formats the idata section data
3424 (pe_print_pdata): New function - formats the pdata section data
3425 (pe_print_private_bfd_data): calls to above
3426
3427 Sun Nov 12 12:23:24 1995 Stan Shebs <shebs@andros.cygnus.com>
3428
3429 * Makefile.in (bfd_libs_here, etc): Provide empty definitions.
3430 * coff-rs6000.c (rs6000coff_vec): Add conditional defines
3431 TARGET_SYM and TARGET_NAME for vector and BFD name.
3432 * coff-pmac.c (pmac_xcoff_vec): Remove.
3433 (TARGET_SYM, TARGET_NAME): Define.
3434 * coffcode.h (coff_set_arch_mach_hook) [POWERMAC]: Set the
3435 machine to 0, not all PowerMacs are 601s.
3436
3437 Fri Nov 10 12:10:14 1995 Ian Lance Taylor <ian@cygnus.com>
3438
3439 * elfcode.h (elf_object_p): Read in any program headers.
3440 * elf.c (_bfd_elf_make_section_from_shdr): Adjust section lma
3441 based on the program headers, if any.
3442 (elf_fake_sections): Set sh_addr from the vma, not the lma.
3443 (map_program_segments): Set p_paddr of program headers based on
3444 the lma.
3445
3446 Thu Nov 9 13:01:31 1995 Ian Lance Taylor <ian@cygnus.com>
3447
3448 * archive.c (bfd_generic_archive_p): Preserve tdata in case of
3449 failure.
3450
3451 * aoutx.h (NAME(aout,final_link)): Report a reasonable error when
3452 trying to do a relocateable link with a non-a.out object file.
3453
3454 * archive.c (bfd_generic_archive_p): Check the first object file
3455 in an archive even if target_defaulted is set. If the object file
3456 has the wrong xvec, reject it.
3457
3458 * aoutx.h (NAME(aout,set_section_contents)): If a section can not
3459 be represented, report the name via _bfd_error_handler.
3460 (translate_to_native_sym_flags): Likewise.
3461 * elf32-mips.c (mips_elf_final_link): Likewise.
3462 * oasys.c (oasys_write_sections): Likewise.
3463
3464 * coffcode.h (coff_set_alignment_hook): Write RS6000COFF_C version
3465 which checks for STYP_OVRFLO sections.
3466 (coff_compute_section_file_positions): If RS6000COFF_C, handle
3467 reloc and lineno count overflows.
3468 (coff_write_object_contents): Call coff_count_linenumbers before
3469 coff_compute_section_file_positions. If RS6000COFF_C, handle
3470 reloc and lineno count overflows.
3471 * xcofflink.c (_bfd_xcoff_bfd_final_link): Count line numbers and
3472 relocs before dealing with .pad sections. Count overflow section
3473 headers when handling .pad sections.
3474
3475 * coffcode.h (coff_write_object_contents): Set a.out vstamp to 1
3476 if RS6000COFF_C.
3477
3478 * xcofflink.c (XCOFF_DESCRIPTOR): Define.
3479 (struct xcoff_link_hash_table): Add descriptor_section and
3480 special_sections fields.
3481 (_bfd_xcoff_bfd_link_hash_table_create): Initialize new fields.
3482 (xcoff_link_add_symbols): Set linkage section alignment. Create
3483 descriptor section. Check for magic symbol names (_text, etc.),
3484 and record them in special_sections if found. Set
3485 XCOFF_DESCRIPTOR flag for a function descriptor, and set its
3486 descriptor field to point back to the function code symbol.
3487 (xcoff_sweep): Always mark the special descriptor_section.
3488 (bfd_xcoff_export_symbol): Check whether the symbol might be a
3489 function descriptor, and mark it if it is.
3490 (bfd_xcoff_size_dynamic_sections): Add new special_sections
3491 parameter, and fill it in. Allocate space for the descriptor
3492 section.
3493 (xcoff_build_ldsyms): Set XCOFF_DEF_REGULAR flag when defining
3494 global linkage code. If an undefined function descriptor is
3495 exported, arrange to define it. Warn about any other undefined
3496 exported symbol.
3497 (_bfd_xcoff_bfd_final_link): Write out the descriptor section.
3498 (xcoff_write_global_symbol): Create a function descriptor when
3499 necessary.
3500 * bfd-in.h (bfd_xcoff_size_dynamic_sections): Update declaration.
3501 * bfd-in2.h: Rebuild.
3502
3503 Thu Nov 9 08:40:23 1995 Kim Knuttila <krk@cygnus.com>
3504
3505 * coff-ppc.c (ppc_coff_link_hash_entry): new types for hashing
3506 (ppc_coff_link_hash_table): new types for hashing
3507 (ppc_coff_link_hash_newfunc): hash entry constructor
3508 (ppc_coff_link_hash_table_init): hash table initializer
3509 (ppc_coff_link_hash_table_create): hash table constructor
3510 (ppc_record_toc_entry): changed references to hash table
3511 (coff_ppc_relocate_section): changed references to hash table
3512
3513 * libcoff-in.h (coff_link_hash_entry): removed toc_offset
3514 * libcoff.h: Rebuild
3515
3516 * cofflink.c (_bfd_coff_link_hash_newfunc): removed toc_offset init
3517 (coff_link_add_symbols): removed toc_offset init
3518
3519 Thu Nov 9 04:00:38 1995 Ken Raeburn <raeburn@cygnus.com>
3520
3521 * Makefile.in (.dep1): Make sure the file mkdep is to write exists
3522 first.
3523
3524 * configure.in: Added new option --with[out]-mmap. Set USE_MMAP
3525 if it is given and mmep is available.
3526 * acconfig.h: Undef USE_MMAP.
3527 * configure, config.in: Regenerated.
3528 * aoutx.h: If USE_MMAP is not defined, do all symbol and string
3529 table handling the old way.
3530 (aout_get_external_symbols): Don't complain if last byte of string
3531 table is nonzero.
3532 * libbfd.c [HAVE_MADVISE]: Include sys/types.h and sys/mman.h.
3533 (bfd_free_window) [! USE_MMAP]: Don't define.
3534 (bfd_get_file_window,
3535 _bfd_generic_get_section_contents_in_window) [! USE_MMAP]: Abort.
3536
3537 Wed Nov 8 20:03:44 1995 Eric Freudenthal <freudenthal@nyu.edu>
3538
3539 * coff-a29k.c (SIGN_EXTEND_HWORD): Use ~0xffff rather than
3540 0xffff0000.
3541
3542 Wed Nov 8 11:31:11 1995 Ian Lance Taylor <ian@cygnus.com>
3543
3544 * coff-a29k.c (a29k_reloc): Change handling of R_IREL reloc to be
3545 compatible with AMD generated COFF files. Try to support both AMD
3546 and GNU formats simultaneously.
3547 (coff_a29k_relocate_section): Likewise.
3548
3549 * libbfd.c (bfd_get_file_window): Change writable parameter from
3550 int to boolean; update all callers. Pass MAP_SHARED if not
3551 writable--it's required on Solaris. Cast fprintf argument to
3552 avoid warning.
3553 * bfd-in.h (bfd_get_file_window): Update declaration.
3554 * bfd-in2.h: Rebuild.
3555 * aoutx.h: Update calls to bfd_get_file_window.
3556
3557 * xcofflink.c (XCOFF_DEF_DYNAMIC): Rename from XCOFF_REF_DYNAMIC.
3558 Change all uses.
3559 (xcoff_swap_ldhdr_in): New static function.
3560 (xcoff_swap_ldsym_in): New static function.
3561 (xcoff_find_reloc): Handle the case of a single reloc correctly.
3562 (xcoff_link_add_symbols): If we just created a descriptor, pass it
3563 to _bfd_generic_link_add_one_symbol, to save a hash lookup.
3564 Handle XTY_ER/XMC_XO symbols correctly.
3565 (xcoff_link_add_dynamic_symbols): Rewrite to read .loader symbols
3566 rather than normal symbol table.
3567 (bfd_xcoff_import_symbol): It's not an error if the symbol is
3568 already defined with the same absolute value.
3569 (xcoff_mark): When considering called symbols, check whether the
3570 descriptor is from a dynamic object, rather than the symbol
3571 itself.
3572 (xcoff_build_ldsyms): Likewise.
3573
3574 * libbfd.c (bfd_get_file_window): Change return type to boolean.
3575 Cast realloc and malloc return values. If malloc or realloc fail,
3576 set bfd_error_no_memory.
3577 * bfd-in.h (bfd_get_file_window): Change type to boolean.
3578 * bfd-in2.h: Rebuild.
3579
3580 Tue Nov 7 11:53:48 1995 Kim Knuttila <krk@cygnus.com>
3581
3582 * coff-ppc.c (ppc_record_toc_entry): new function.
3583 (in_reloc_p): changed return value.
3584 (coff_ppc_relocate_section): much rework.
3585 (ppc_allocate_toc_section): new function.
3586 (ppc_process_before_allocation): new function.
3587 (ppc_coff_swap_sym_in_hook): new function.
3588
3589 * cofflink.c (_bfd_coff_link_hash_newfunc): initialize toc_offset.
3590 (coff_link_add_symbols): initialize toc_offset.
3591
3592 * peicode.h (coff_swap_sym_in): Added coff_swap_sym_in_hook
3593 (coff_swap_aouthdr_out): Added more sections to the data
3594 dictionary for the pe file header. Also changed linker version
3595 number on the ppc side.
3596 (dir_names): small improvements to the dictionary printing.
3597 (pe_mkobject_hook): save the file level flags.
3598
3599 * libcoff-in.h (coff_link_hash_entry): added toc_offset field
3600 (pe_tdata): added real_flags field
3601 (coff_tdata): added local_toc_sym_map and access macro
3602
3603 * libcoff.h (coff_link_hash_entry): added toc_offset field
3604 (pe_tdata): added real_flags field
3605 (coff_tdata): added local_toc_sym_map and access macro
3606
3607 * coffcode.h (coff_set_alignment_hook): added hook for PE.
3608 (coff_mkobject): init for local_toc_sym_map
3609 (coff_write_object_contents): set the internal_a.magic to
3610 IMAGE_NT_OPTIONAL_HDR_MAGIC which appears to be what other
3611 ppc compilers use.
3612
3613 Tue Nov 7 13:48:58 1995 Ian Lance Taylor <ian@cygnus.com>
3614
3615 * ecofflink.c (_bfd_ecoff_locate_line): Keep looking through stabs
3616 entries until both the line number address and the function name
3617 address are too large.
3618
3619 * configure.in: Call AC_CHECK_PROG to find and cache AR.
3620 * configure: Rebuilt.
3621
3622 * aclocal.m4 (BFD_CC_FOR_BUILD): Don't define CC_FOR_BUILD if it
3623 is defined in the environment.
3624
3625 Tue Nov 7 10:57:24 1995 Jeffrey A Law (law@cygnus.com)
3626
3627 * som.c (som_get_section_contents_in_window): Define to use
3628 generic version.
3629
3630 Mon Nov 6 17:13:15 1995 Harry Dolan <dolan@ssd.intel.com>
3631
3632 * coff-i860.c: New file, based on coff-i386.c.
3633 * cpu-i860.c: New file, based on cpu-i386.c.
3634 * hosts/i860mach3.h: New file, based on hosts/i386mach3.h.
3635 * config.bfd (i860-*-mach3*, i860-*-osf1*, i860-*-coff*): New
3636 targets, using i860coff_vec.
3637 * configure.in (i860-*-mach3*, i860-*-osf1*): New hosts, using
3638 trad-core.o and hosts/i860mach3.h.
3639 (i860coff_vec): Use coff-i860.o and cofflink.o.
3640 * configure: Rebuild.
3641 * Makefile.in: Rebuild dependencies.
3642 (ALL_MACHINES): Add cpu-i860.o.
3643 (BFD32_BACKENDS): Add coff-i860.o.
3644 (CFILES): Add cpu-i860.c and coff-i860.c.
3645 * targets.c (i860coff_vec): Declare.
3646 (bfd_target_vector): Add &i860coff_vec.
3647 * archures.c (bfd_i860_arch): Declare.
3648 (bfd_archures_list): Add &bfd_i860_arch.
3649 * coffcode.h (coff_set_arch_mach_hook): Handle I860 magic number.
3650 (coff_set_flags): Handle bfd_arch_i860.
3651 (coff_write_object_contents): Handle I860 a.out magic number.
3652
3653 Mon Nov 6 14:34:07 1995 Ian Lance Taylor <ian@cygnus.com>
3654
3655 * xcofflink.c (xcoff_link_add_symbols): Set the alignment power of
3656 the created .tc section to 2.
3657 (xcoff_mark): Don't keep a .loader reloc for a call to an
3658 undefined symbol when creating a shared library.
3659 (xcoff_build_ldsyms): When creating a shared library, generate
3660 global linkage code for a call to an undefined symbol.
3661
3662 Sun Nov 5 21:44:13 1995 Ken Raeburn <raeburn@cygnus.com>
3663
3664 * Makefile.in (CFILES): Rebuild list from BFD_LIBS, ALL_MACHINES,
3665 BFD32_BACKENDS, BFD64_BACKENDS.
3666 (.dep1): Put mkdep output in a separate file.
3667 Rebuilt dependencies.
3668
3669 * ecoff.c (_bfd_ecoff_slurp_armap): Cast _bfd_read_ar_hdr return
3670 value.
3671
3672 Permit use of mmap when available:
3673
3674 * configure.in: Check for mmap, madvise, mprotect.
3675 * config.in, configure: Regenerated.
3676
3677 * libbfd.c (struct _bfd_window_internal): Define type.
3678 (bfd_init_window, bfd_free_window, bfd_get_file_window): New
3679 functions.
3680 (ok_to_map): New static variable for debugging.
3681 (_bfd_generic_get_section_contents_in_window): New function.
3682 * bfd-in.h (bfd_window_internal): Declare type.
3683 (bfd_window): Define type.
3684 (bfd_init_window, bfd_free_window, bfd_get_file_window): Declare.
3685 * libbfd-in.h (_bfd_generic_get_section_contents_in_window):
3686 Declare.
3687
3688 * libaout.h (struct aoutdata): Add two window fields.
3689 (obj_aout_sym_window, obj_aout_string_window): New macros.
3690 * aoutx.h (some_aout_object_p): Initialize windows.
3691 (aout_get_external_symbols): Get symbol data and strings in
3692 windows instead of explicitly allocated buffers.
3693 (slurp_symbol_table): Free window instead of memory.
3694 (bfd_free_cached_info): Release windows instead of freeing storage
3695 directly.
3696 (aout_link_free_symbols): Ditto.
3697
3698 * targets.c (bfd_target): Add new field for
3699 get_section_contents_in_window.
3700 (BFD_JUMP_TABLE_GENERIC): Updated.
3701 * aout-adobe.c, aout-target.h, binary.c, bout.c, coff-alpha.c,
3702 coff-mips.c, elfxx-target.h, i386msdos.c, i386os9k.c, ieee.c,
3703 libcoff-in.h, oasys.c, srec.c, tekhex.c, versados.c: Added new
3704 macros for get_section_contents_in_window field.
3705
3706 Sat Nov 4 12:23:26 1995 Fred Fish <fnf@cygnus.com>
3707
3708 * core.c: Renamed to corefile.c
3709 * makefile.dos (OBJS): Change core.o to corefile.o
3710 * Makefile.in (CFILES, BFD_LIBS): Use corefile.c instead of core.c
3711
3712 start-sanitize-gm
3713 Sat Nov 4 10:16:54 1995 Stu Grossman (grossman@cygnus.com)
3714
3715 * config.bfd (mips*-*-magic*): Add bfd_elf32_bigmips_vec to
3716 targ_selvecs to allow debugging under Irix-5 native.
3717
3718 end-sanitize-gm
3719 Fri Nov 3 15:54:59 1995 Ian Lance Taylor <ian@cygnus.com>
3720
3721 * xcofflink.c (xcoff_link_add_symbols): Rename local variable sub
3722 to o. Clobber and restore the list of new csects around the call
3723 to _bfd_generic_link_add_one_symbol, in case it wants to report a
3724 linker error and the linker wants to read the symbol table. Reset
3725 the line number count of a real section even if it has no relocs.
3726 (_bfd_xcoff_bfd_final_link): If shared, set the DYNAMIC flag.
3727
3728 * coffgen.c (_bfd_coff_read_string_table): Warn if the string size
3729 is too small.
3730
3731 Thu Nov 2 23:16:39 1995 Ian Lance Taylor <ian@cygnus.com>
3732
3733 * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Don't warn about
3734 an undefined symbol in a shared link.
3735
3736 * linker.c (_bfd_generic_link_add_one_symbol): Correct type of
3737 oldtype from bfd_link_order_type to bfd_link_hash_type. From
3738 phdm@info.ucl.ac.be (Philippe De Muyter).
3739
3740 Wed Nov 1 14:26:02 1995 Manfred Hollstein KS/EF4A 60/1F/110 #40283 <manfred@lts.sel.alcatel.de>
3741
3742 * coff-m88k.c (rtype2howto): New static function.
3743 (RTYPE2HOWTO): Use it rather than a macro definition.
3744
3745 * coffcode.h (coff_write_object_contents): set internal_a.magic
3746 to PAGEMAGICPEXECPAGED #if defined (M68) && !defined (LYNXOS).
3747
3748 * configure.in: m68*-motorola-sysv* does not use ptrace-core.o;
3749 define TRAD_HEADER to new file hosts/delta68.h.
3750 m88*-motorola-sysv*, however, does use ptrace-core.o.
3751 * hosts/delta68.h: New file.
3752
3753 * ptrace-core.c (ptrace_unix_core_file_p): change bfd_zmalloc to
3754 bfd_zalloc; provide proper parm abfd to calls to bfd_zalloc.
3755
3756 Wed Nov 1 13:51:54 1995 Ken Raeburn <raeburn@cygnus.com>
3757
3758 * i386linux.c (MY(vec)): Declare before use.
3759
3760 Wed Nov 1 11:45:07 1995 Ian Lance Taylor <ian@cygnus.com>
3761
3762 * reloc16.c (bfd_coff_reloc16_get_relocated_section_contents):
3763 Pass input_bfd, not in_bfd, to bfd_coff_reloc16_extra_cases.
3764
3765 * elf.c (bfd_elf_set_dt_needed_name): Don't do anything if the
3766 BFD is not of the right type.
3767 (bfd_elf_get_needed_list): Likewise.
3768 * i386linux.c (bfd_linux_size_dynamic_sections): Likewise.
3769 * sunos.c (bfd_sunos_get_needed_list): Likewise.
3770 * xcofflink.c (XCOFF_XVECP): Define.
3771 (bfd_xcoff_link_record_set): Don't do anything if the BFD is not
3772 of the right type.
3773 (bfd_xcoff_import_symbol): Likewise.
3774 (bfd_xcoff_export_symbol): Likewise.
3775 (bfd_xcoff_link_count_reloc): Likewise.
3776 (bfd_xcoff_record_link_assignment): Likewise.
3777 (bfd_xcoff_size_dynamic_sections): Likewise.
3778
3779 * sunos.c (sunos_scan_ext_relocs): Only check the reloc symbol
3780 table index against the number of symbols for a base relative
3781 reloc.
3782
3783 * coff-rs6000.c (_bfd_xcoff_sizeof_headers): Change from macro to
3784 static function.
3785 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Set
3786 full_aouthdr flag here...
3787 (_bfd_xcoff_bfd_final_link): ...not here.
3788
3789 Tue Oct 31 12:52:02 1995 Fred Fish <fnf@cygnus.com>
3790
3791 * libelf.h: Rename to elf-bfd.h to avoid conflict with
3792 systems that have a system <libelf.h>.
3793 * Makefile.in: Globally replace libelf.h with elf-bfd.h.
3794 * bfd.c, elf.c, elf32-arc.c, elf32-gen.c, elf32-hppa.c,
3795 elf32-hppa.h, elf32-i386.c, elf32-i860.c, elf32-m68k.c,
3796 elf32-m88k.c, elf32-mips.c, elf32-ppc.c, elf32-sparc.c,
3797 elf64-gen.c, elf64-sparc.c, elfcode.h, elflink.c,
3798 elfxx-target.h: Include elf-bfd.h rather than libelf.h.
3799 * elfxx-target.h: Change libelf.h reference to elf-bfd.h.
3800
3801 Tue Oct 31 15:30:07 1995 David Mosberger-Tang <davidm@azstarnet.com>
3802
3803 * ecoff.c (ecoff_set_symbol_info): Add new parameter weak. If
3804 set, set BSF_WEAK in symbol. Change all callers.
3805 (ecoff_get_extr): Set weakext based on BSF_WEAK.
3806 (ecoff_link_add_externals): If weakext is set, pass BSF_WEAK to
3807 _bfd_generic_link_add_one_symbol.
3808 (ecoff_indirect_link_order): Check that the section tdata relocs
3809 are not NULL before using them.
3810
3811 * configure.in (alpha*-*-linux*): Set COREFILE to trad-core.o and
3812 define TRAD_HEADER as hosts/alphalinux.h.
3813 * configure: Rebuild.
3814 * hosts/alphalinux.h: New file.
3815 * trad-core.c (trad_unix_core_file_p): Cast u.u_ar0 to bfd_vma,
3816 not int.
3817
3818 Tue Oct 31 12:34:11 1995 Ian Lance Taylor <ian@cygnus.com>
3819
3820 * coffcode.h (coff_slurp_symbol_table): Accept C_BCOMM and
3821 C_ECOMM storage classes.
3822
3823 * xcofflink.c (xcoff_mark_symbol): New static function, broken out
3824 of xcoff_mark.
3825 (xcoff_mark): Call xcoff_mark_symbol.
3826 (bfd_xcoff_export_symbol): Call xcoff_mark_symbol.
3827 (bfd_xcoff_link_count_reloc): Call xcoff_mark_symbol rather than
3828 doing it by hand.
3829 (xcoff_build_ldsyms): Build a .loader symbol for an export symbol.
3830
3831 Mon Oct 30 14:53:48 1995 Ian Lance Taylor <ian@cygnus.com>
3832
3833 * xcofflink.c (struct xcoff_final_link_info): Add new line_filepos
3834 field.
3835 (xcoff_find_reloc): New static function.
3836 (xcoff_link_add_symbols): Use it.
3837 (_bfd_xcoff_bfd_final_link): Set finfo.line_filepos.
3838 (xcoff_link_input_bfd): Handle C_BINCL and C_EINCL. Don't
3839 relocate the value of C_DECL.
3840
3841 * elf.c (elf_fake_sections): Remove bogus BFD_ASSERT.
3842
3843 Sat Oct 28 01:25:34 1995 steve chamberlain <sac@slash.cygnus.com>
3844
3845 * cofflink.c (_bfd_coff_generic_relocate_section): Make
3846 callback decide what goes in .relocs.
3847 * pe[i]-i386.c (TARGET_UNDERSCORE): Define.
3848 * peicode.h (pe_mkobject_hook): Only copy aouthdr if
3849 there is one.
3850
3851 Sat Oct 28 01:51:02 1995 Ian Lance Taylor <ian@cygnus.com>
3852
3853 * xcofflink.c (xcoff_link_add_symbols): Handle csects in the
3854 absolute section.
3855
3856 Fri Oct 27 18:14:39 1995 Ian Lance Taylor <ian@cygnus.com>
3857
3858 * xcofflink.c: More improvements, mostly to fix handling of
3859 constructors and a few other special cases.
3860 * coff-rs6000.c (rs6000coff_vec): Set symbol_leading_char back to
3861 zero, reverting yesterday's change.
3862 * bfd-in.h (bfd_xcoff_link_record_set): Declare.
3863 (bfd_xcoff_link_count_reloc): Declare.
3864 (bfd_xcoff_record_link_assignment): Declare.
3865 * bfd-in2.h: Rebuild.
3866
3867 Fri Oct 27 14:42:15 1995 Niklas Hallqvist <niklas@appli.se>
3868
3869 * PORTING, aout-arm.c, aout-encap.c, aout-target.h,
3870 aoutx.h, gen-aout.c, host-aout.c, hp300bsd.c, i386aout.c
3871 i386bsd.c, i386dynix.c, i386linux.c, i386lynx.c, i386mach3.c,
3872 i386netbsd.c, m68klynx.c, m88kmach3.c, mipsbsd.c, newsos3.c,
3873 ns32knetbsd.c, pc532-mach.c, riscix.c, sparclynx.c, sparcnetbsd.c:
3874 Change PAGE_SIZE to TARGET_PAGE_SIZE.
3875
3876 * m68knetbsd.c: Ditto as well as add support for the m68k4k object
3877 format.
3878
3879 * netbsd.h: Double ditto (incl. m68k4k support). NetBSD's text
3880 segments includes the a.out header. See to that the magic number
3881 *always* is big-endian.
3882
3883 * config.bfd: Add m68*-hp*-netbsd* case. Cross-pollinate m68k and
3884 m68k4k NetBSD configurations.
3885
3886 * configure.in, configure: Separate i386 & mips NetBSD
3887 configurations from other BSD ones. Don't assume DEC is the only
3888 thing NetBSD/mips run on. Add {m68k,ns32k,sparc}-*-netbsd*
3889 configurations. Add support for m68k4k NetBSD object format.
3890
3891 * libaout.h: Added M_68K4K_NETBSD magic.
3892
3893 * m68k4knetbsd.c: New file.
3894
3895 * hosts/{m68k,sparc}nbsd.h: Don't define HOST_BIG_ENDIAN_P.
3896
3897 * hosts/nbsd.h: Define HOST_BIG_ENDIAN_P according to
3898 <machine/endian.h>.
3899
3900 * hosts/mipsnbsd.h: New file.
3901
3902 start-sanitize-gm
3903 Fri Oct 27 09:41:51 1995 Stu Grossman (grossman@cygnus.com)
3904
3905 * config.bfd: Add config stuff for mips*-*-magic* to set
3906 targ_defvec to ecoff_big_vec.
3907
3908 end-sanitize-gm
3909 Thu Oct 26 14:16:47 1995 Ian Lance Taylor <ian@cygnus.com>
3910
3911 * xcofflink.c: Numerous changes to get closer to a working XCOFF
3912 linker.
3913 * libcoff-in.h (struct xcoff_tdata): Add full_aouthdr,
3914 toc_section, and entry_section fields.
3915 (struct xcoff_section_tdata): Remove ldrel_count field.
3916 * libcoff.h: Rebuild.
3917 * coffcode.h (coff_mkobject_hook): Initialize new xcoff_data
3918 fields.
3919 (coff_compute_section_file_positions): If RS6000COFF_C, generate
3920 full a.out header if full_aouthdr is set in xcoff_data.
3921 (coff_write_object_contents): Likewise. Set o_snentry and o_sntoc
3922 based on sections stored in xcoff_data.
3923 * coff-rs6000.c (xcoff_copy_private_bfd_data): Copy new xcoff_data
3924 fields.
3925 (xcoff_reloc_type_lookup): Handle BFD_RELOC_CTOR.
3926 (rs6000coff_vec): Set symbol_leading_char to '.'.
3927 * coffgen.c (coff_get_symbol_info): If fix_value is set, fix the
3928 value stored in ret rather than returning a pointer value.
3929
3930 Wed Oct 25 23:10:39 1995 Michael Meissner <meissner@tiktok.cygnus.com>
3931
3932 * config.bfd (powerpc{,le}-{elf,sysv4,eabi,solaris2}): Remove MAC
3933 format for now.
3934
3935 Wed Oct 25 16:19:27 1995 Jeffrey A Law (law@cygnus.com)
3936
3937 * som.c (som_slurp_string_table): Allocate the strings with malloc
3938 since they're free'd by free_cached_info.
3939 (som_slurp_symbol_table): Similarly for the symbol table.
3940
3941 Wed Oct 25 14:59:22 1995 Per Bothner <bothner@kalessin.cygnus.com>
3942
3943 * Makefile.in (diststuff): Don't make headers.
3944
3945 Wed Oct 25 11:32:54 1995 Ian Lance Taylor <ian@cygnus.com>
3946
3947 * Makefile.in: Rebuild dependencies.
3948
3949 * sunos.c (bfd_sunos_record_link_assignment): Don't do anything if
3950 output_bfd is not SunOS.
3951 (bfd_sunos_size_dynamic_sections): Likewise. Don't scan relocs of
3952 non-SunOS input files.
3953
3954 * xcofflink.c: Extensive changes to support linking shared objects
3955 and generating a .loader section.
3956 * libcoff-in.h (struct xcoff_tdata): Add import_file_id field.
3957 (struct xcoff_section_tdata): Add lineno_count, first_symndx,
3958 last_symndx, and ldrel_count fields.
3959 * libcoff.h: Rebuild.
3960 * coff-rs6000.c (xcoff_howto_table): Correct reloc names.
3961 * coffcode.h (styp_to_sec_flags): Don't set any flags if STYP_PAD
3962 is set.
3963 * bfd-in.h (bfd_xcoff_import_symbol): Declare.
3964 (bfd_xcoff_export_symbol): Declare.
3965 (bfd_xcoff_size_dynamic_sections): Declare.
3966 * bfd-in2.h: Rebuild.
3967
3968 Tue Oct 24 17:44:20 1995 Stan Shebs <shebs@andros.cygnus.com>
3969
3970 * configure.in: Add xcofflink.o to pmac_xcoff_vec.
3971 * configure: Rebuild.
3972 * mpw-config.in: Add xcofflink.c.o to powerpc-apple-macos.
3973 * coff-pmac.c: Include coff-rs6000.c instead of duplicating its
3974 contents.
3975 (pmac_xcoff_vec): Update to use new xcoff support.
3976 * coff-rs6000.c (xcoff_generic_stat_arch_elt): Make static.
3977 (xcoff_write_armap): Declare buf as unsigned char.
3978 * xcofflink.c (xcoff_link_add_symbols): Declare a local as PTR.
3979
3980 * mpw-make.sed: Generalize subdir_do edit.
3981
3982 Tue Oct 24 10:25:01 1995 Jeffrey A Law (law@cygnus.com)
3983
3984 * hppabsd-core.c (make_bfd_asection): Initialize asect->filepos
3985 correctly. Don't initialize asect->vma.
3986
3987 Fri Oct 20 13:23:48 1995 Ken Raeburn <raeburn@cygnus.com>
3988
3989 * opncls.c (_bfd_new_bfd): If _bfd_chunksize wasn't preset, use
3990 something a little less than the page size.
3991
3992 Thu Oct 19 13:06:09 1995 Ian Lance Taylor <ian@cygnus.com>
3993
3994 * coff-i960.c (coff_i960_adjust_symndx): Clear *adjustedp.
3995
3996 Wed Oct 18 16:20:08 1995 steve chamberlain <sac@slash.cygnus.com>
3997
3998 * coff-i386.c (coff_i386_reloc_type_lookup): New.
3999 * coffcode.h (coff_write_object_contents): If .bss is before
4000 .data us that as data_start.
4001 * cofflink.c (_bfd_coff_generic_relocate_section): Get reloc
4002 calc correct.
4003 * peicode.h (add_data_entry): Use _cooked_size of data directory.
4004 (coff_swap_outhdr_out): Hardwire in version number.
4005
4006 Wed Oct 18 16:50:54 1995 Ken Raeburn <raeburn@cygnus.com>
4007
4008 * sunos.c (sunos_add_dynamic_symbols): Rename local variables
4009 major and minor to *_vno, since the former are also macros in
4010 SunOS header files. Cast result of bfd_alloc to appropriate
4011 type.
4012
4013 * coffgen.c (coff_find_nearest_line): Cast used_by_bfd value
4014 before assigning to sec_data.
4015
4016 Wed Oct 18 13:25:17 1995 Ian Lance Taylor <ian@cygnus.com>
4017
4018 * ecoff.c (_bfd_ecoff_find_nearest_line): The offset argument is
4019 now relative to the section, not absolute.
4020 * ecofflink.c (_bfd_ecoff_locate_line): Use the right symbol to
4021 get the file name when there is a N_SO directory name. When
4022 handling stabs, remember that section->vma was added to the
4023 offset.
4024
4025 Tue Oct 17 18:24:54 1995 Ian Lance Taylor <ian@cygnus.com>
4026
4027 * sunos.c (struct sunos_link_hash_table): Add needed field.
4028 (sunos_link_hash_table_create): Call bfd_release, not free.
4029 (sunos_link_hash_table_create): Initialize needed field.
4030 (sunos_add_dynamic_symbols): Record needed objects.
4031 (bfd_sunos_get_needed_list): New function.
4032 * bfd-in.h (bfd_sunos_get_needed_list): Declare.
4033 * bfd-in2.h: Rebuild.
4034
4035 Mon Oct 16 14:43:59 1995 steve chamberlain <sac@slash.cygnus.com>
4036
4037 * libcoff-in.h (pe_data_type.in_reloc_p): New.
4038
4039 Mon Oct 16 10:52:50 1995 Ian Lance Taylor <ian@cygnus.com>
4040
4041 * bfd-in.h (struct bfd_link_needed_list): Rename from
4042 bfd_elf_link_needed_list.
4043 * bfd-in2.h: Rebuild.
4044 * elf.c, elflink.h, libelf.h: Corresponding changes.
4045
4046 Add start at AIX linker support; no shared libraries yet.
4047 * xcofflink.c: New file.
4048 * configure.in (rs600coff_vec): Use xcofflink.o.
4049 * configure: Rebuild.
4050 * libcoff-in.h (struct xcoff_tdata): Add csects and debug_indices
4051 fields.
4052 (struct xcoff_section_tdata): Define.
4053 (xcoff_section_data): Define macro.
4054 (_bfd_xcoff_bfd_link_hash_table_create): Declare.
4055 (_bfd_xcoff_bfd_link_add_symbols): Declare.
4056 (_bfd_xcoff_bfd_final_link): Declare.
4057 (_bfd_ppc_xcoff_relocate_section): Declare.
4058 * libcoff.h: Rebuild.
4059 * coff-rs6000.c: Clean up a bit.
4060 (xcoff_mkobject): Default modtype to 1L, not RE. Initialize
4061 cputype, csects, and debug_indices.
4062 (xcoff_copy_private_bfd_data): Copy cputype.
4063 (xcoff_howto_table): Rename from rs6000coff_howto_table.
4064 (xcoff_rtype2howto): Rename from rs6000coff_rtype2howto.
4065 (xcoff_reloc_type_lookup): Rename from
4066 rs6000coff_reloc_type_lookup.
4067 (coff_relocate_section): Define.
4068 (_bfd_xcoff_sizeof_headers): Define.
4069 (_bfd_xcoff_bfd_get_relocated_section_contents): Define.
4070 (_bfd_xcoff_bfd_relax_section): Define.
4071 (_bfd_xcoff_bfd_link_split_section): Define.
4072 (rs6000coff_vec): For BFD_JUMP_TABLE_LINK, use _bfd_xcoff, not
4073 coff.
4074 * coffcode.h (coff_compute_section_file_positions): If AIX,
4075 increment sofar by SMALL_AOUTSZ if not executable.
4076 (coff_write_object_contents): If AIX, always output an a.out
4077 header; if not executable, header size of SMALL_AOUTSZ.
4078 * hash.c (struct bfd_strtab_hash): Add xcoff field.
4079 (_bfd_stringtab_init): Initialize xcoff field.
4080 (_bfd_xcoff_stringtab_init): New function.
4081 (_bfd_stringtab_add): In XCOFF mode, leave two bytes for length.
4082 (_bfd_stringtab_emit): In XCOFF mode, write out length.
4083 * libbfd-in.h (_bfd_xcoff_stringtab_init): Declare.
4084 * libbfd.h: Rebuild.
4085 * Makefile.in: Rebuild dependencies.
4086 (BFD32_BACKENDS): Add xcofflink.o.
4087 (CFILES): Add xcofflink.c.
4088
4089 * elf32-mips.c (mips_elf_symbol_processing): Set SEC_ALLOC, not
4090 SEC_NO_FLAGS, for .acommon section. From Peter Schauer
4091 <Peter.Schauer@Regent.E-Technik.TU-Muenchen.DE>.
4092
4093 Sat Oct 14 21:36:02 1995 Michael Meissner <meissner@tiktok.cygnus.com>
4094
4095 * coff-ppc.c (in_reloc_p): Add, clone from coff-i386.c.
4096
4097 Fri Oct 13 17:48:43 1995 Ken Raeburn <raeburn@cygnus.com>
4098
4099 * acconfig.h (HAVE_SYS_PROCFS_H): Undef, with comment.
4100 * config.in: Regenerated.
4101
4102 * opncls.c (getpagesize) [!HAVE_GETPAGESIZE]: Define as 2048.
4103 (_bfd_chunksize): New variable.
4104 (_bfd_new_bfd): Set it to getpagesize() if negative, and use it
4105 for obstack chunk size.
4106 * configure.in: Check for getpagesize.
4107 * configure: Regenerated.
4108
4109 Mon Sep 25 22:49:32 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4110
4111 * trad-core.c (rawptr): Make it a local variable of
4112 ptrace_unix_core_file_p.
4113
4114 Fri Oct 13 11:22:01 1995 steve chamberlain <sac@slash.cygnus.com>
4115
4116 * coff-arm.c (in_reloc_p): New.
4117 * coff-i386.c (in_reloc_p): New.
4118 * coffcode.h: Allways include peicode.h if COFF_WITH_PE.
4119 (coff_write_object_contents): Only set has_reloc_section
4120 if PE_IMAGE.
4121 * cofflink.c (_bfd_coff_generic_relocate_section): Call
4122 in_reloc_p to decide if reloc should be emitted.
4123 * libcoff.h (pe_data_type.in_reloc_p): New.
4124 * peicode.h (pe_mkobject): Initialize in_reloc_p.
4125
4126 Wed Oct 11 00:49:29 1995 Ian Lance Taylor <ian@cygnus.com>
4127
4128 * cofflink.c (_bfd_coff_internal_syment_name): Move to coffgen.c.
4129 (_bfd_coff_read_internal_relocs): Likewise.
4130 * coffgen.c (_bfd_coff_internal_syment_name): Copy from coffgen.c.
4131 (_bfd_coff_read_internal_relocs): Likewise.
4132
4133 * elflink.h (elf_link_add_object_symbols): Correct conditions
4134 under which type and size change warnings are issued.
4135
4136 Tue Oct 10 18:32:46 1995 Ian Lance Taylor <ian@cygnus.com>
4137
4138 * coffgen.c (coff_count_linenumbers): Don't count line numbers for
4139 a symbol which is not in a real section.
4140 (coff_write_native_symbol): Corresponding change.
4141
4142 * cofflink.c (_bfd_coff_link_hash_newfunc): Rename from
4143 coff_link_hash_newfunc and make non-static.
4144 (_bfd_coff_link_hash_table_init): New function, broken out of
4145 _bfd_coff_link_hash_table_create.
4146 (_bfd_coff_link_hash_table_create): Use it.
4147 (process_embedded_commands): Make static.
4148 * libcoff-in.h ((_bfd_coff_link_hash_newfunc): Declare.
4149 (_bfd_coff_link_hash_table_init): Declare.
4150 * libcoff.h: Rebuild.
4151
4152 * coffcode.h (coff_mkobject_hook): If RS6000COFF_C, set cputype
4153 field in XCOFF tdata.
4154 (coff_set_arch_mach_hook): Check ifdef RS6000COFF_C, not ifdef
4155 U802ROMAGIC, for clarity. Try to set arch and machine correctly
4156 based on cputype stored in a.out header, or in n_type of initial
4157 .file symbol.
4158 (coff_write_object_contents): Set cputype correctly in a.out
4159 header.
4160 (coff_slurp_symbol_table): Add casts to file_ptr to avoid
4161 warnings.
4162 * coffswap.h (coff_swap_aouthdr_in): Swap in cputype field.
4163 (coff_swap_aouthdr_out): Swap out cputype field. Don't clear
4164 old resv1 field.
4165 * libcoff-in.h (struct xcoff_tdata): Add cputype field.
4166 * libcoff.h: Rebuild.
4167
4168 * cpu-rs6000.c (rs6000_compatible): New static function.
4169 (bfd_rs6000_arch): Use it.
4170 * cpu-powerpc.c (powerpc_compatible): New static function.
4171 (arch_info_struct): Define various flavours of PowerPC.
4172 (bfd_powerpc_arch): Use powerpc_compatible. Point at
4173 arch_info_struct.
4174
4175 Tue Oct 10 10:50:46 1995 Fred Fish <fnf@cygnus.com>
4176
4177 * Makefile.in (FLAGS_TO_PASS): Remove BISON.
4178
4179 Tue Oct 10 01:28:29 1995 Ian Lance Taylor <ian@cygnus.com>
4180
4181 * elflink.h (elf_link_add_object_symbols): Don't warn about
4182 changing the size or type if the old definition was weak.
4183
4184 Mon Oct 9 11:24:08 1995 Ian Lance Taylor <ian@cygnus.com>
4185
4186 * coffcode.h (combined_entry_type): Add fix_line field.
4187 (coff_slurp_line_table): Warn if we try to set the lineno field of
4188 a symbol twice.
4189 (coff_slurp_symbol_table): If RS6000COFF_C, handle C_BINCL and
4190 C_EINCL by setting fix_line. Fix C_BSTAT symbol value.
4191 * coffgen.c (coff_mangle_symbols): Handle fix_line.
4192 (coff_write_symbol): Only use N_DEBUG if the symbol is in the
4193 absolute section.
4194 (coff_print_symbol): Print fix_value symbols in a useful fashion.
4195 * libcoff.h: Rebuild.
4196
4197 * libcoff-in.h (struct xcoff_tdata): Define.
4198 (xcoff_data): Define.
4199 * bfd.c (struct _bfd): Add xcoff_obj_data field to tdata union.
4200 * bfd-in2.h, libcoff.h: Rebuild.
4201 * coff-rs6000.c (xcoff_mkobject): New static function.
4202 (coff_mkobject): Define.
4203 (xcoff_copy_private_bfd_data): New static function.
4204 (coff_bfd_copy_private_bfd_data): Define.
4205 (rs6000coff_howto_table): Change R_TOC complain_on_overflow from
4206 signed to bitfield.
4207 (rs6000coff_vec): Add DYNAMIC to object_flags.
4208 * coffcode.h (sec_to_styp_flags): If RS6000COFF_C, handle .pad and
4209 .loader sections specially.
4210 (coff_new_section_hook): If RS6000COFF_C, get the .text and .data
4211 section alignment from the XCOFF tdata information.
4212 (coff_mkobject_hook): If RS6000COFF_C, set DYNAMIC based on
4213 F_SHROBJ, and copy the extra a.out header information into the
4214 XCOFF tdata structure.
4215 (coff_write_object_contents): If RS6000COFF_C, set F_SHROBJ,
4216 F_DYNLOAD and the extra a.out header information.
4217 (coff_slurp_symbol_table): Set BSF_NOT_AT_END for a C_EXT or
4218 C_HIDEXT symbol with attached csect information.
4219 * coffswap.h (coff_swap_aouthdr_in): If RS6000COFF_C, swap
4220 in the o_maxdata field.
4221 (coff_swap_aouthdr_out): If RS6000COFF_C, swap extra XCOFF fields.
4222 * coffgen.c (coff_renumber_symbols): Don't move any symbol to the
4223 end if BSF_NOT_AT_END is set.
4224
4225 * targets.c (bfd_target): Rename _bfd_read_ar_hdr field to
4226 _bfd_read_ar_hdr_fn.
4227 * libbfd-in.h (_bfd_read_ar_hdr): Update accordingly.
4228 * bfd-in2.h, libbfd.h: Rebuild.
4229 * archive.c (_bfd_get_elt_at_filepos): Cast _bfd_read_ar_hdr
4230 return value.
4231 (do_slurp_bsd_armap, do_slurp_coff_armap): Likewise.
4232 (bfd_slurp_bsd_armap_f2): Likewise.
4233 (_bfd_slurp_extended_name_table): Likewise.
4234
4235 Fri Oct 6 16:18:35 1995 Ken Raeburn <raeburn@cygnus.com>
4236
4237 Mon Sep 25 22:49:32 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4238
4239 * archive.c (bfd_get_next_mapent): Return BFD_NO_MORE_SYMBOLS
4240 when the symbol table is empty.
4241
4242 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Don't reserve
4243 space for section symbols, since we don't output them either.
4244 (elf_m68k_adjust_dynindx): Removed.
4245
4246 * ptrace-core.c (rawptr): Make it a local variable of
4247 ptrace_unix_core_file_p.
4248
4249 Fri Oct 6 12:24:47 1995 Michael Meissner <meissner@tiktok.cygnus.com>
4250
4251 * coff-rs6000.c (xcoff_write_archive_contents): Return false, not
4252 NULL.
4253
4254 * config.bfd (powerpc{,le}-{elf,sysv4,eabi,solaris2}): Add NT, and
4255 Mac object file formats.
4256
4257 Fri Oct 6 12:04:02 1995 Ian Lance Taylor <ian@cygnus.com>
4258
4259 * coffgen.c (coff_fix_symbol_name): Don't try to set up file
4260 auxent if there isn't one.
4261 (coff_write_symbols): If there is no file auxent, use SYMNMLEN
4262 rather than FILNMLEN as the maximum name length.
4263
4264 * coffcode.h (bfd_coff_backend_data): Add new field
4265 _bfd_coff_print_aux.
4266 (bfd_coff_print_aux): New static function.
4267 (coff_pointerize_aux_hook (RS6000COFF_C version)): Pointerize the
4268 scnlen field of an XTY_LD csect aux entry.
4269 (coff_print_aux): New static function.
4270 (coff_slurp_symbol_table): Don't pointerize scnlen field; now done
4271 in coff_pointerize_aux_hook.
4272 (bfd_coff_std_swap_table): Initialize new field.
4273 * coffgen.c (coff_print_symbol): Call bfd_coff_print_aux.
4274 * libcoff.h: Rebuild.
4275 * coff-alpha.c (alpha_ecoff_backend_data): Initialize new field.
4276 * coff-mips.c (mips_ecoff_backend_data): Likewise.
4277
4278 * coffcode.h (coff_write_object_contents): On AIX, clear F_RELFLG
4279 if there are symbols, for native AIX ld compatibility.
4280
4281 * coffcode.h (bfd_coff_backend_data): Add new field
4282 _bfd_coff_pointerize_aux_hook.
4283 (coff_pointerize_aux_hook): Define as a function if RS6000COFF_C
4284 or I960, and as 0 otherwise.
4285 (bfd_coff_std_swap_table): Initialize new field.
4286 * libcoff.h: Rebuild.
4287 * coffgen.c (coff_pointerize_aux): Change parameters to take
4288 symbol pointer instead of type and class, and to take aux index.
4289 Call _bfd_coff_pointerize_aux_hook if it is defined.
4290 (coff_get_normalized_symtab): Always call coff_pointerize_aux.
4291 * coff-alpha.c (alpha_ecoff_backend_data): Initialize all fields.
4292 * coff-mips.c (mips_ecoff_backend_data): Likewise.
4293
4294 * coff-rs6000.c: Add full support for AIX archives. Rewrite old
4295 read-only/host-only support.
4296
4297 * coffcode.h (coff_slurp_symbol_table): Set C_HIDEXT symbols to be
4298 BSF_LOCAL.
4299 (OTHER_GLOBAL_CLASS): Do not define to be C_HIDEXT if
4300 RS6000COFF_C.
4301
4302 * targets.c (bfd_target): Add _bfd_read_ar_hdr field. Modify
4303 BFD_JUMP_TABLE_ARCHIVE accordingly.
4304 * libbfd-in.h (_bfd_snarf_ar_hdr): Don't declare.
4305 (_bfd_compute_and_write_armap): Declare.
4306 (_bfd_generic_read_ar_hdr): Declare.
4307 (_bfd_read_ar_hdr): Define.
4308 (_bfd_noarchive_read_ar_hdr): Define.
4309 (_bfd_archive_bsd_read_ar_hdr): Define.
4310 (_bfd_archive_coff_read_ar_hdr): Define.
4311 * archive.c: Change all callers of _bfd_snarf_ar_hdr to call
4312 _bfd_read_ar_hdr instead.
4313 (_bfd_generic_read_ar_hdr): Rename from _bfd_snarf_ar_hdr.
4314 (_bfd_compute_and_write_armap): Rename from
4315 compute_and_write_armap. Make non-static. Change all callers.
4316 * ecoff.c (_bfd_ecoff_slurp_armap): Call _bfd_read_ar_hdr rather
4317 than _bfd_snarf_ar_hdr.
4318 * aout-target.h (MY_read_ar_hdr): Define if not defined.
4319 * ieee.c (ieee_read_ar_hdr): Define.
4320 * libecoff.h (_bfd_ecoff_read_ar_hdr): Define.
4321 * oasys.c (oasys_read_ar_hdr): Define.
4322 * som.c (som_read_ar_hdr): Define.
4323 * bfd-in2.h, libbfd.h: Rebuild.
4324
4325 Thu Oct 5 14:04:07 1995 steve chamberlain <sac@slash.cygnus.com>
4326
4327 * peicode.c (coff_swap_filehdr_in): If symptr is
4328 zero, there aren't any symbols, even if nsyms is set.
4329
4330 Thu Oct 5 11:45:02 1995 Ian Lance Taylor <ian@cygnus.com>
4331
4332 * libecoff.h (struct ecoff_backend_data): Add adjust_headers
4333 field.
4334 * ecoff.c (ecoff_sec_to_styp_flags): Check for various Alpha
4335 sections, and set styp correctly for them: .got, .hash, .dynamic,
4336 .liblist, .rel.dyn, .conflic, .dynstr, .dynsym, .comment.
4337 (_bfd_ecoff_styp_to_sec_flags): Check for various Alpha section
4338 types.
4339 (ecoff_sort_hdrs): New static function.
4340 (ecoff_compute_section_file_positions): Return boolean, not void.
4341 Sort the sections by VMA before looking through them. Put the
4342 first non SEC_ALLOC section on a new page. Put every SEC_ALLOC
4343 section on an appropriate boundary within the page.
4344 (ecoff_compute_reloc_file_positions): Check return value of
4345 ecoff_compute_section_file_positions.
4346 (_bfd_ecoff_set_section_contents): Likewise.
4347 (_bfd_ecoff_write_object_contents): Check for various Alpha
4348 section types when incrementing text_size and data_size. Call
4349 adjust_headers backend function if it exists.
4350 * coff-alpha.c (alpha_adjust_headers): New static function.
4351 (alpha_ecoff_backend_data): Initialize adjust_headers field.
4352 * coff-mips.c (mips_ecoff_backend_data): Likewise.
4353
4354 * hosts/i386bsd.h: Restore file incorrectly deleted on Sep 6.
4355
4356 Wed Oct 4 18:15:02 1995 Jeff Law (law@hurl.cygnus.com)
4357
4358 * rs6000-core.c (CORE_VERSION_1): Use CORE_VERSION_1 instead
4359 of ALTERNATE_AIX_CORE_FORMAT.
4360 * configure.in (aix4): No longer need CORE_FLAGS.
4361 * configure: Updated.
4362
4363 Wed Oct 4 15:36:36 1995 Ken Raeburn <raeburn@cygnus.com>
4364
4365 NS32k changes from Ian Dall:
4366 * aoutx.h (MY_final_link_relocate, MY_relocate_contents): New
4367 macros.
4368 (aout_link_input_section_std, aout_link_input_section_ext,
4369 aout_link_reloc_link_order): Call them instead of _bfd_*
4370 versions.
4371 * aout-target.h (MY_exec_header_not_counted): New macro, defaults
4372 to zero.
4373 (backend_data): Use it instead of hardcoded zero.
4374
4375 * aout-ns32k.c (CTOR_TABLE_RELOC_HOWTO): New macro.
4376 (MY_swap_std_reloc_out): Use udata.i for KEEPIT, don't call stoi.
4377
4378 * ns32knetbsd.c: Include bfd.h.
4379 (MY_text_includes_header, MY_bfd_reloc_type_lookup): New macros.
4380 (MY_bfd_reloc_type_lookup): Declare function too.
4381 * pc532-mach.c (set_sizes): Don't declare.
4382 (MY_text_includes_header, MY_exec_header_not_counted): Define.
4383 (backend_data, MY_backend_data): Don't define.
4384
4385 * config.bfd: Treat ns32k-pc532-ux* like ns32k-pc532-mach*, and
4386 ns32k-*-lites* like ns32k-*-netbsd*.
4387
4388 * hosts/nbsd.h: Swap order of sys/vmparam.h and sys/param.h, to
4389 compile on lites.
4390
4391 Wed Oct 4 14:15:52 1995 Ian Lance Taylor <ian@cygnus.com>
4392
4393 * coffcode.h (coff_write_object_contents): Restore setting
4394 f_timdat to 0, deleted on August 22.
4395
4396 Tue Oct 3 16:28:32 1995 steve chamberlain <sac@slash.cygnus.com>
4397
4398 * coffcode.h (coff_bfd_copy_private_symbol_data,
4399 coff_bfd_copy_private_section_data,
4400 coff_bfd_copy_private_bfd_data): ifdef to allow overrides.
4401 * peicode.h (coff_bfd_copy_private_bfd_data): New
4402 (pe_bfd_copy_private_bfd_data): New.
4403 (coff_swap_scnhdr_in): Swap bss size into the right place.
4404 (pe_print_private_bfd_data): Add some newlines.
4405
4406 Tue Oct 3 11:53:04 1995 Jeff Law (law@hurl.cygnus.com)
4407
4408 * som.c (setup_sections): Don't die if a space has no subspaces.
4409
4410 Mon Oct 2 14:08:55 1995 Ian Lance Taylor <ian@cygnus.com>
4411
4412 * elflink.h (elf_link_add_object_symbols): Don't let a weak
4413 dynamic symbol override a common symbol. Don't change the size or
4414 type if they have been set and the new symbol is not a definition.
4415 Warn if the size or type changes.
4416
4417 Sun Oct 1 01:34:41 1995 Jeff Law (law@hurl.cygnus.com)
4418
4419 * som.c (som_begin_writing): Don't write the symbol table or
4420 symbol strings.
4421 (som_finish_writing): Write them here. Place them after the
4422 subspace data, but before the relocs.
4423
4424 Fri Sep 29 11:01:55 1995 Ian Lance Taylor <ian@cygnus.com>
4425
4426 * sunos.c (sunos_add_one_symbol): Just pass false, not
4427 info->shared_library, to sunos_create_dynamic_sections.
4428 (sunos_scan_ext_relocs): Don't warn about a reloc in the .text
4429 section.
4430 (sunos_check_dynamic_reloc): Remove .text section assertion.
4431
4432 Thu Sep 28 18:48:47 1995 Stan Shebs <shebs@andros.cygnus.com>
4433
4434 * config.bfd: Add powerpc-*-macos*, powerpc-*-mpw*.
4435 * configure, configure.in: Add pmac_xcoff_vec case.
4436 * Makefile.in (BFD32_BACKENDS): Add coff-pmac.o.
4437 * coff-pmac.c: New file, PowerMac XCOFF support.
4438 * coffcode.h (coff_set_arch_mach_hook): Add PowerMac case.
4439 * targets.c (pmac_xcoff_vec): Declare.
4440
4441 * mpw-config.in: Various changes to be compatible with the
4442 autoconf-based configury.
4443 * mpw-make.sed: New file, sed commands to translate Unix
4444 makefile into MPW syntax.
4445 * mpw-make.in: Remove.
4446 * hosts/mpw.h: Remove.
4447 * bfd-in.h, bfd-in2.h: If MPW, include the file that defines
4448 true and false as enums, then define TRUE_FALSE_ALREADY_DEFINED.
4449
4450 Thu Sep 28 17:06:23 1995 steve chamberlain <sac@slash.cygnus.com>
4451
4452 * binary.c (binary_get_symtab): Return an empty string on error.
4453 * opncls.c (bfd_fdpenr): Change WIN32 restriction to WINGDB.
4454
4455 Thu Sep 28 15:30:44 1995 Kim Knuttila <krk@nellie>
4456
4457 * coff-ppc.c: Reformatted according to gnu conventions
4458 Removed irrelevant "if 0" code
4459
4460 Thu Sep 28 11:19:53 1995 Ian Lance Taylor <ian@cygnus.com>
4461
4462 * hp300hpux.c (convert_sym_type): Treat secondary symbols as weak
4463 symbols rather than as indirect symbols.
4464 (MY(slurp_symbol_table)): Don't do anything special about
4465 secondary symbols.
4466
4467 * coffcode.h (coff_new_section_hook): Make sure that the alignment
4468 of .ctors and .dtors sections is no larger than 2.
4469
4470 * sunos.c (sunos_add_one_symbol): Don't change
4471 bfd_link_hash_common to bfd_link_hash_new, since it may be on the
4472 undef list.
4473 (bfd_sunos_record_link_assignment): Don't put __DYNAMIC in the
4474 dynamic symbols when creating a shared library.
4475 (sunos_scan_ext_relocs): Handle relocs correctly when creating a
4476 shared library.
4477 (sunos_scan_dynamic_symbol): Don't mark the __DYNAMIC symbol as
4478 written even if it is not defined in a regular object.
4479 (sunos_write_dynamic_symbol): Use plt_offset for the address of
4480 the jump table reloc. Add an assertion. Use RELOC_JMP_SLOT
4481 rather than the constant 22.
4482 (sunos_check_dynamic_reloc): Handle creating a shared library.
4483 (sunos_finish_dynamic_link): Set the first entry in the GOT to
4484 zero when creating a shared library.
4485 * aoutx.h (NAME(aout,final_link)): If there is a symbol __DYNAMIC,
4486 write it out at the start of the symbol table.
4487
4488 * Makefile.in (BFD32_BACKENDS): Add coff-arm.o.
4489
4490 Thu Sep 28 00:58:05 1995 Doug Evans <dje@deneb.cygnus.com>
4491
4492 * config.bfd: Add arm-*-coff.
4493 * configure.in, configure: Add armcoff_{little,big}_vec.
4494 * targets.c (armcoff_{little,big}_vec): Declare.
4495 (bfd_target_vector): Add armcoff_{little,big}_vec.
4496 * coff-arm.c (armcoff_{little,big}_vec): Always define.
4497
4498 Wed Sep 27 10:37:14 1995 Ian Lance Taylor <ian@cygnus.com>
4499
4500 * targets.c (bfd_find_target): Remove debugging code.
4501
4502 Wed Sep 27 07:23:39 1995 Kim Knuttila <krk@nellie>
4503
4504 * coff-ppc.c, pe-ppc.c, pei-ppc.c: Initial bfd for coff/PE
4505 support on powerpc.
4506 * Makefile.in: added *-ppc files
4507 * coffcode.h: ppc MAGIC, and use peicode.h rather than coffswap.h to
4508 allow pe based .o's to be shared with other tools on ppc/NT
4509 * config.bfd: added powerpc[le]-[pe|winnt] config support
4510 * configure, configure.in: added bfd_powerpc[le]_pe[i]_vec
4511 * peicode.h: Added more section flags for PE on ppc
4512 Added coff_swap_filehdr_out to allow peicode.h to be
4513 used for non-image PE files on ppc.
4514 Check for image, or not, before copying pe_opthdr
4515 * targets.c: Added new bfd's
4516 * targets.c: Removed two inactive bfds that shouldn't have made it this
4517 far.
4518
4519 Tue Sep 26 14:06:41 1995 Michael Meissner <meissner@tiktok.cygnus.com>
4520
4521 * elf32-ppc.c (ppc_reloc_type): Rename from reloc_type, and use
4522 explicit values to initialize all relocs. Change all users.
4523 (ppc_elf_brtaken_inner): New function to handle branch predicition
4524 relocs.
4525 (ppc_elf_brtaken_reloc): Ditto.
4526 (ppc_elf_howto_raw): Use new functions. Make sure all unsupported
4527 relocs use ppc_elf_unsupported_reloc.
4528 (ppc_elf_merge_private_bfd_data): Keep track of whether an error
4529 needs to be reported.
4530 (ppc_elf_relocate_section): Support branch prediction relocs.
4531
4532 Tue Sep 26 12:48:05 1995 Ian Lance Taylor <ian@cygnus.com>
4533
4534 * bfd.c (bfd_assert): Remove \n from string passed to
4535 _bfd_error_handler.
4536
4537 * coff-i386.c: (TWO_DATA_SECS): Don't define.
4538 * coffcode.h (bfd_coff_backend_data): Remove _bfd_make_section_hook.
4539 (bfd_coff_make_section_hook): Don't define.
4540 (coff_make_section_hook): Remove.
4541 (sec_to_styp_flags): Remove TWO_DATA_SECS case.
4542 (styp_to_sec_flags): Likewise.
4543 (coff_write_object_contents): Likewise.
4544 (bfd_coff_std_swap_table): Don't initialize make_section_hook
4545 field.
4546 * libcoff.h: Rebuild.
4547 * coffgen.c (make_a_section_from_file): Just call
4548 bfd_make_section_anyway, not bfd_make_section or
4549 bfd_coff_make_section_hook.
4550 * ecoff.c (_bfd_ecoff_make_section_hook): Remove.
4551 * libecoff.h (_bfd_ecoff_make_section_hook): Don't declare.
4552 * coff-alpha.c (alpha_ecoff_backend_data): Don't initialize
4553 make_section_hook field.
4554 * coff-mips.c (mips_ecoff_backend_data): Likewise.
4555
4556 * aoutx.h (translate_from_native_sym_flags): Don't try to stuff
4557 pointers into value field for warning and indirect symbols; just
4558 leave the value field alone.
4559 * linker.c (generic_link_add_symbol_list): Use next symbol for
4560 warning and indirect symbols, rather than looking in symbol value.
4561 * ecoff.c (ecoff_set_symbol_info): Remove indirect_ptr_ptr
4562 parameter. Change all callers. Remove support for indirect
4563 symbols; it didn't work anyhow.
4564 (_bfd_ecoff_slurp_symbol_table): Remove indirect_ptr variable.
4565 * syms.c: Change comments about BSF_WARNING and BSF_INDIRECT.
4566 * bfd-in2.h: Rebuild.
4567
4568 Mon Sep 25 16:04:09 1995 Michael Meissner <meissner@tiktok.cygnus.com>
4569
4570 * elf32-ppc.c (ppc_elf_howto_raw): For all 14-bit branch relocs,
4571 go back to telling the tools this reloc operates on 32 bits.
4572
4573 Mon Sep 25 11:48:02 1995 Ian Lance Taylor <ian@cygnus.com>
4574
4575 * aout-adobe.c (aout_adobe_callback): Use _bfd_error_handler
4576 rather than a direct fprintf.
4577 * archive.c (_bfd_write_archive_contents): Likewise.
4578 * coffcode.h (coff_slurp_symbol_table): Likewise.
4579 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Likewise.
4580 (ppc_elf_unsupported_reloc): Likewise.
4581 (ppc_elf_relocate_section): Likewise.
4582 * i386linux.c (linux_tally_symbols): Likewise.
4583 (linux_finish_dynamic_link): Likewise.
4584 * osf-core.c (osf_core_core_file_p): Likewise.
4585 * rs6000-core.c (rs6000coff_get_section_contents): Likewise.
4586 * som.c (som_sizeof_headers): Likewise.
4587 * srec.c (srec_bad_byte): Likewise.
4588 * bfd.c (bfd_assert): Likewise. Also change file to be const.
4589 * libbfd-in.h (bfd_assert): Declare first parameter const.
4590 * libbfd.h: Rebuild.
4591 * coff-a29k.c (a29k_reloc): Don't bother to fprintf; returning
4592 bfd_reloc_overflow is enough.
4593 * coff-h8300.c (rtype2howto): Don't bother to fprintf; just abort.
4594 * coff-h8500.c (rtype2howto): Likewise.
4595 * coff-z8k.c (rtype2howto): Likewise.
4596 * coffcode.h (dummy_reloc16_extra_cases): Likewise.
4597 * elf.c (_bfd_elf_get_lineno): Likewise.
4598 (_bfd_elf_no_info_to_howto): Likewise.
4599 (_bfd_elf_no_info_to_howto_rel): Likewise.
4600 * hp300hpux.c (convert_sym_type): Likewise.
4601 (MY(swap_std_reloc_in)): Likewise.
4602 * elf.c (bfd_section_from_shdr): Remove #if 0 sections.
4603
4604 * libaout.h (struct aoutdata): Add line_buf field.
4605 * aoutx.h (NAME(aout,find_nearest_line)): Remove statics buffer
4606 and filename_buffer. Instead, use a malloc buffer stored in the
4607 new line_buf field. Remove length restrictions.
4608
4609 * coffgen.c (string_size): Remove static variable.
4610 (debug_string_size, debug_string_section): Likewise.
4611 (coff_fix_symbol_name): Add string_size_p, debug_string_section_p,
4612 and debug_string_size_p parameters. Use them instead of the
4613 global variables. Change all callers.
4614 (coff_write_symbol): Likewise.
4615 (coff_write_alien_symbol, coff_write_native_symbol): Likewise.
4616 (coff_write_symbols): Add local variables to replace removed
4617 global variables.
4618
4619 * libcoff-in.h (struct coff_section_tdata): Add offset, i,
4620 function, and line_base fields.
4621 * libcoff.h: Rebuild.
4622 * coffgen.c (coff_find_nearest_line): Use section tdata to cache
4623 information, rather than using static variables.
4624
4625 * sunos.c (sunos_read_dynamic_info): Adjust offsets in an NMAGIC
4626 file. From Peter DeWolf <pld@amt.tay1.dec.com>.
4627
4628 * init.c (initialized): Remove static variable.
4629 (bfd_init): Don't bother setting initialized.
4630 (bfd_check_init): Remove.
4631 * opncls.c (_bfd_new_bfd): Don't call bfd_check_init.
4632 * libbfd.h: Rebuild.
4633
4634 Sat Sep 23 01:22:23 1995 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
4635
4636 * rs6000-core.c (rs6000coff_core_p): Don't check the core file
4637 size for full core dumps. Copy core file header to private data.
4638 (rs6000coff_core_file_failing_command,
4639 rs6000coff_core_file_failing_signal): New functions to extract
4640 the file name and terminating signal from the core file.
4641 * coff-rs6000.c: Use them.
4642
4643 Fri Sep 22 17:44:47 1995 Ian Lance Taylor <ian@cygnus.com>
4644
4645 Change arch info to be const, initialized at compile time.
4646 * archures.c: Reindent many functions. Change CONST to const.
4647 (bfd_arch_info_type): Make arch_name const. Remove disassemble;
4648 nothing set it anyhow. Make next const.
4649 (bfd_arch_info_list): Remove.
4650 (bfd_archures_list): Rename from archures_init_table. Change from
4651 a table of function pointers to a table of bfd_arch_info_type
4652 structure addresses.
4653 (bfd_scan_arch): Rewrite accordingly. Return a const pointer.
4654 (bfd_lookup_arch): Likewise.
4655 (bfd_set_arch_info): Rewrite accordingly. Change argument to be a
4656 const pointer.
4657 (bfd_default_arch_struct): Make const.
4658 (bfd_arch_init, bfd_arch_linkin): Remove.
4659 (bfd_get_arch_info): Return a const pointer.
4660 * init.c (bfd_init): Don't call bfd_arch_init.
4661 * bfd.c (struct _bfd): Make arch_info const.
4662 * bfd-in2.h: Rebuild.
4663 * libbfd.h: Rebuild.
4664 * configure.in: Put & before everything in $selarchs.
4665 * configure: Rebuild.
4666 * cpu-*.c: Change bfd_*_arch from a function which calls
4667 bfd_arch_linkin to a const structure.
4668 * ieee.c (ieee_object_p): Make arch const.
4669
4670 Fri Sep 22 16:23:18 1995 Michael Meissner <meissner@tiktok.cygnus.com>
4671
4672 * reloc.c (bfd_reloc_code_type): Add relocations to support all of
4673 PowerPC V.4.
4674 * bfd-in2.h: Regenerate.
4675 * libbfd.h: Regenerate.
4676
4677 * elf32-ppc.c (reloc_type): Update names to match current draft.
4678 (ppc_elf_howto_raw): Mark 14 bit relocs as short sized and PC
4679 relative. Update names to current V.4 draft.
4680 (ppc_elf_reloc_type_lookup): Add support for more relocations.
4681 (ppc_elf_relocate_section): Rename relocations to match draft.
4682
4683 Thu Sep 21 21:53:18 1995 Michael Meissner <meissner@cygnus.com>
4684
4685 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Allow modules
4686 compiled with -mrelocatable-lib to be linked with either normal
4687 modules or -mrelocatable modules.
4688
4689 Wed Sep 20 12:03:26 1995 Ian Lance Taylor <ian@cygnus.com>
4690
4691 * coffcode.h (coff_write_object_contents): Clear the vstamp field
4692 in the a.out header.
4693
4694 * aoutx.h (NAME(aout,swap_ext_reloc_out)): Don't set r_extern for
4695 a reloc against a local symbol, even if it's not a section.
4696
4697 Tue Sep 19 17:02:26 1995 Ian Lance Taylor <ian@cygnus.com>
4698
4699 * targets.c (bfd_target): Remove unused align_power_min field.
4700 * bfd-in2.h: Rebuild.
4701 * All backends: Remove initialization of align_power_min.
4702
4703 Tue Sep 19 14:02:21 1995 steve chamberlain <sac@slash.cygnus.com>
4704
4705 * peicode.h (coff_swap_scnhdr_out): Get sizes for BSS right.
4706
4707 Mon Sep 18 14:35:01 1995 Arne H. Juul <arnej@pvv.unit.no>
4708
4709 * config.bfd (mips-dec-netbsd*): New target.
4710 * configure.host (mips-dec-netbsd*): New host.
4711 * configure.in (mips-dec-netbsd*): New native.
4712 * configure: Rebuild.
4713
4714 Fri Sep 15 10:24:36 1995 Ian Lance Taylor <ian@cygnus.com>
4715
4716 Make the COFF backend linker merge common types:
4717 * cofflink.c (struct coff_debug_merge_element): Define.
4718 (struct coff_debug_merge_type): Define.
4719 (struct coff_debug_merge_hash_entry): Define.
4720 (struct coff_debug_merge_hash_table): Define.
4721 (coff_debug_merge_hash_table_init): Define.
4722 (coff_debug_merge_hash_table_free): Define.
4723 (coff_debug_merge_hash_lookup): Define.
4724 (struct coff_final_link_info): Add debug_merge field.
4725 (coff_debug_merge_hash_newfunc): New static function.
4726 (_bfd_coff_final_link): Allocate and free debug_merge table.
4727 (coff_link_input_bfd): Merge identical enum, struct and union
4728 types.
4729
4730 Thu Sep 14 14:53:58 1995 Ian Lance Taylor <ian@cygnus.com>
4731
4732 Convert i960 COFF to use COFF backend linker.
4733 * coff-i960.c (coff_i960_relocate): Use a coff_section_data
4734 structure to store the symbol being used.
4735 (coff_i960_start_final_link): New static function.
4736 (coff_i960_relocate_section): New static function.
4737 (coff_i960_adjust_symndx): New static function.
4738 (coff_start_final_link): Define.
4739 (coff_relocate_section): Define.
4740 (coff_adjust_symndx): Define.
4741 * coffcode.h (bfd_coff_backend_data): Add new callback function
4742 _bfd_coff_start_final_link.
4743 (bfd_coff_start_final_link): Define.
4744 (coff_start_final_link): Define if not defined.
4745 (bfd_coff_std_swap_table): Add coff_start_final_link.
4746 * cofflink.c (_bfd_coff_internal_syment_name): Make globally
4747 visible.
4748 (_bfd_coff_final_link): Call bfd_coff_start_final_link if the
4749 function callback is not NULL.
4750 * libcoff-in.h (struct coff_section_tdata): Add tdata field.
4751 (_bfd_coff_internal_syment_name): Declare.
4752 * libcoff.h: Rebuild.
4753 * configure.in (icoff_big_vec): Add cofflink.o.
4754 (icoff_little_vec): Likewise.
4755 * configure: Rebuild.
4756
4757 Wed Sep 13 17:38:23 1995 Fred Fish <fnf@rtl.cygnus.com>
4758
4759 * Makefile.in (clean-info): Remove extraneous tab from line
4760 following action.
4761
4762 Wed Sep 13 13:27:53 1995 Ian Lance Taylor <ian@cygnus.com>
4763
4764 * cofflink.c (coff_link_input_bfd): Fail if a section with no
4765 contents has relocs.
4766
4767 Thu Sep 12 12:45:34 1995 steve chamberlain <sac@slash.cygnus.com>
4768
4769 * coffcode.h (coff_compute_section_file_positions): Keep the
4770 raw size safe.
4771 (coff_write_object_contents): Remember if it's a relocatable
4772 file.
4773 * libcoff-in.h (pe_data_type): New member 'has_reloc_section'
4774 * peicode.h (coff_swap_filehdr_out): Clear not-reloc flag
4775 if relocatable file. Swap out saved raw size.
4776
4777 Tue Sep 12 12:14:33 1995 Ian Lance Taylor <ian@cygnus.com>
4778
4779 * Makefile.in (do_maintainer_clean): Rename from do_realclean.
4780 (maintainer-clean): Rename from realclean, passing
4781 maintainer-clean down to subdirectories, but leave realclean as a
4782 synonym.
4783
4784 * linker.c (_bfd_generic_link_add_one_symbol): Pass symbol name to
4785 warning callback.
4786
4787 * dep-in.sed: Remove config.h from generated dependencies.
4788
4789 * sunos.c (sunos_slurp_dynamic_symtab): New static function,
4790 broken out of sunos_canonicalize_dynamic_symtab.
4791 (sunos_canonicalize_dynamic_symtab): Call new function
4792 sunos_slurp_dynamic_symtab.
4793 (sunos_add_dynamic_symbols): Add three new parameters. Return the
4794 dynamic symbol table to the caller.
4795 * aoutx.h (aout_link_add_symbols): Permit add_dynamic_symbols
4796 callback to override the symbols being read.
4797 * libaout.h (struct aout_backend_data): Add three new parameters
4798 to add_dynamic_symbols callback.
4799
4800 Extensive minor changes to avoid various gcc warnings. Also:
4801 * Makefile.in (BFD32_BACKENDS): Remove coff-arm.o.
4802 * archures.c (bfd_arch_info_type): Change mach field from long to
4803 unsigned long.
4804 (bfd_lookup_arch): Change machine parameter from long to unsigned
4805 long.
4806
4807 Mon Sep 11 10:55:47 1995 Ian Lance Taylor <ian@cygnus.com>
4808
4809 * sunos.c (sunos_scan_std_relocs): Fix BFD_ASSERT: it's OK to find
4810 a symbol with a non-zero plt_offset.
4811
4812 Fri Sep 8 11:47:24 1995 Ian Lance Taylor <ian@cygnus.com>
4813
4814 * elfcode.h (align_file_position): Remove; not used.
4815
4816 * configure.in: Only check for <sys/procfs.h> on a native system,
4817 and make sure it defines prstatus_t.
4818 * configure: Rebuild.
4819
4820 Thu Sep 7 12:48:01 1995 Ian Lance Taylor <ian@cygnus.com>
4821
4822 * sunos.c (sunos_write_dynamic_symbol): Correct m68k abort test.
4823
4824 * config.in: Rename from config.h.in.
4825 * configure.in: Call AC_CONFIG_HEADER with config.h:config.in.
4826 Check for config.h:config.in when creating stamp-h.
4827 * configure: Rebuild.
4828 * Makefile.in (stamp-h): Depend upon config.in rather than
4829 config.h.in. Set CONFIG_HEADERS to config.h:config.in when
4830 calling config.status.
4831
4832 * Makefile.in (do_distclean): Remove config.h and stamp-h.
4833 (Makefile): Just rebuild Makefile.
4834 (config.h, stamp-h): New targets.
4835 * configure.in: Create stamp-h when rebuilding config.h.
4836 * configure: Rebuild.
4837
4838 Wed Sep 6 15:00:33 1995 Ian Lance Taylor <ian@cygnus.com>
4839
4840 * configure.in: Call AC_CONFIG_HEADER. Substitute
4841 HOST_64BIT_LONG. Check that various header files exist. Check
4842 that fcntl exists. Call BFD_BINARY_FOPEN. Check whether malloc
4843 and/or free need to be declared. Don't make a link to sysdep.h.
4844 Define TRAD_HEADER for various hosts.
4845 * configure: Rebuild.
4846 * configure.host: Don't set my_host. Add definitions taken from
4847 host header files for various entries. Remove entries which now
4848 do nothing.
4849 * acconfig.h: New file.
4850 * config.h.in: New file, built by autoheader.
4851 * sysdep.h: New file.
4852 * Makefile.in (do_distclean): Don't remove sysdep.h.
4853 (RECONFIG): Remove.
4854 (LOCAL_H_DEPS): New variable.
4855 ($(BFD_LIBS)): Use $(LOCAL_H_DEPS) rather than libbfd.h and
4856 $(RECONFIG).
4857 ($(BFD_MACHINES), $(BFD_BACKENDS)): Likewise.
4858 ($(OPTIONAL_BACKENDS)): Likewise.
4859 (stmp-bfd.h): Just substitute for BFD_HOST_64BIT_LONG, rather than
4860 looking through sysdep.h.
4861 * bfd-in.h (BFD_HOST_64BIT_LONG): Define; set by Makefile.
4862 (BFD_HOST_64_BIT): Define based on BFD_HOST_64BIT_LONG.
4863 (fprintf_vma, sprintf_vma): Likewise.
4864 (int64_type, uint64_type): Don't define.
4865 * bfd-in2.h: Rebuild.
4866 * archures.c, bfd.c, srec.c: Include <ctype.h>.
4867 * elfcore.h: Check HAVE_SYS_PROCFS_H rather than HAVE_PROCFS.
4868 * lynx-core.c: Include stuff from old hosts/lynx.h.
4869 * opncls.c (bfd_fdopenr): Check HAVE_FNCTL and defined (F_GETFL),
4870 rather than NO_FCNTL.
4871 * targets.c (bfd_target_list): Check HOST_HPPAHPUX and ! __STDC__
4872 rather than NATIVE_HPPAHPUX_COMPILER.
4873 * trad-core.c: Don't include <errno.h>. Include TRAD_HEADER if it
4874 is defined.
4875 * hosts/*.h: Remove all header files which merely include,
4876 declare, and define things. Leave header files which define
4877 information needed by trad-core.c.
4878
4879 * aclocal.m4 (BFD_BINARY_FOPEN): Define.
4880 (BFD_CC_FOR_BUILD): Define.
4881 * configure.in: Use BFD_CC_FOR_BUILD.
4882 * configure: Rebuild.
4883
4884 Tue Sep 5 19:35:28 1995 Ian Lance Taylor <ian@cygnus.com>
4885
4886 * aclocal.m4: Don't try to grep ../Makefile if it doesn't exist.
4887 * configure: Rebuild.
4888
4889 * coff-sparc.c (CALC_ADDEND): Don't set the addend to the value of
4890 a global symbol.
4891
4892 Tue Sep 5 12:48:26 1995 Jason Molenda (crash@phydeaux.cygnus.com)
4893
4894 * config.bfd: i386pe_ve -> i386pe_vec.
4895
4896 Mon Sep 4 14:02:43 1995 Ian Lance Taylor <ian@cygnus.com>
4897
4898 * configure.host: Incorporate host Makefile fragments by setting
4899 shell variables.
4900 * configure.in: Call AC_PROG_CC. Substitute CFLAGS, HDEFINES and
4901 AR. Call AC_PROG_INSTALL. Substitute CC_FOR_BUILD, choosing a
4902 value based on whether the code is being compiled by a cross
4903 compiler. Don't substitute host_makefile_frag or frags.
4904 * aclocal.m4: New file to define local AC_PROG_CC.
4905 * configure: Rebuild.
4906 * Makefile.in (INSTALL): Set to @INSTALL@.
4907 (INSTALL_PROGRAM): Set to @INSTALL_PROGRAM@.
4908 (INSTALL_DATA): Set to @INSTALL_DATA@.
4909 (AR): Set to @AR@.
4910 (CC): Define as @CC@.
4911 (CFLAGS): Set to @CFLAGS@.
4912 (CC_FOR_BUILD): Set to @CC_FOR_BUILD@.
4913 (@host_makefile_frag@): Remove.
4914 (ALL_CFLAGS): Change $(HDEFINES) to @HDEFINES@. Move $(CFLAGS)
4915 after other options.
4916 (config.status): Remove dependency upon @frags@.
4917 * config/*.mh, config/README: Remove.
4918
4919 * config.bfd: Rewrite to incorporate the contents of the Makefile
4920 fragments by setting shell variables, rather than merely returning
4921 the name of a Makefile fragment.
4922 * configure.in: Use shell variables set by config.bfd rather than
4923 looking at the target Makefile fragment files. Don't substitute
4924 target_makefile_frag. Do substitute TDEFINES.
4925 * configure: Rebuild.
4926 * Makefile.in (@target_makefile_frag@): Remove.
4927 (ALL_CFLAGS): Change $(TDEFINES) to @TDEFINES@.
4928 * config/*.mt: Remove.
4929
4930 Mon Sep 4 03:13:28 1995 Ken Raeburn <raeburn@cygnus.com>
4931
4932 * configure.in: Put changequote lines around "i[345]86" patterns
4933 section of core file support.
4934
4935 Sun Sep 3 11:31:58 1995 Jeff Law (law@snake.cs.utah.edu)
4936
4937 * som.c (som_bfd_print_private_bfd_data): Define to use the
4938 generic version.
4939
4940 Fri Sep 1 17:08:40 1995 steve chamberlain <sac@slash.cygnus.com>
4941
4942 * peicode.h (coff_swap_aouthdr_in): Add ImageBase to
4943 entry, text_start and data_start.
4944
4945 Fri Sep 1 18:06:28 1995 Ian Lance Taylor <ian@cygnus.com>
4946
4947 * Makefile.in (OFILES): Remove $(TDEPFILES).
4948 * config/apollo.mt (TDEPFILES): Remove.
4949 * config/README: Update.
4950
4951 * configure.in: For a native configuration, set COREFILE and
4952 COREFLAG based on the canonical host name.
4953 * configure: Rebuild.
4954 * Makefile.in: Rebuild dependencies.
4955 (ALL_CFLAGS): Add @COREFLAG@.
4956 (OFILES): Replace $(HDEPFILES) with @COREFILE@.
4957 * coff-rs6000.c: Check AIX_CORE rather than HOST_AIX for core file
4958 support routines. Check LYNX_CORE rather than HOST_LYNX.
4959 * lynx-core.c: Check LYNX_CORE rather than HOST_LYNX.
4960 * i386lynx.c: Likewise.
4961 * m68klynx.c: Likewise.
4962 * sparclynx.c: Likewise.
4963 * rs6000-core.c: Check AIX_CORE rather than HOST_AIX.
4964 * *-core.c: Comment changes.
4965 * config/decstation.mh (HDEPFILES): Remove.
4966 (HDEFINES): Remove -DTRAD_CORE.
4967 * config/irix3.mh (RANLIB): Remove.
4968 * config/irix4.mh (HDEPFILES, RANLIB): Remove.
4969 (HDEFINES): Remove -DIRIX_CORE.
4970 * config/riscos.mh (RANLIB, HDEPFILES): Remove.
4971 (HDEFINES): Remove -DTRAD_CORE.
4972 * config/ncr3000.mh (AR_FLAGS, RANLIB): Remove.
4973 * config/ultra3.mh (RANLIB): Remove.
4974 * config/aix4.mh, config/alphaosf.mh, config/amix.mh: Remove.
4975 * config/apollo.mh, config/delta68.mh, config/delta88.mh: Remove.
4976 * config/dpx2.mh, config/esix.mh, config/harris.mh: Remove.
4977 * config/hp300.mh, config/hp300bsd.mh, config/hppabsd.mh: Remove.
4978 * config/hppahpux.mh, config/hppaosf.mh: Remove.
4979 * config/i386aix.mh, config/i386bsd.mh: Remove.
4980 * config/i386linux.mh, config/i386mach3.mh: Remove.
4981 * config/i386sco.mh, config/i386v.mh, config/i386v4.mh: Remove.
4982 * config/irix5.mh, config/m88kmach3.mh, config/mipsbsd.mh: Remove.
4983 * config/mipsmach3.mh, config/news-mips.mh: Remove.
4984 * config/news.mh, config/pc532mach.mh, config/riscix.mh: Remove.
4985 * config/rs600.mh, config/rs6000lynx.mh: Remove.
4986 * config/solaris2.mh, config/stratus.mh: Remove.
4987 * config/symmetry.mh, config/sysv4.mh, config/tahoe.mh: Remove.
4988 * config/vaxbsd.mh, config/vaxult.mh, config/vaxult2.mh: Remove.
4989
4990 Fri Sep 1 15:18:50 1995 Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>
4991
4992 * elflink.h (elf_bfd_final_link): Don't change a DT_INIT or
4993 DT_FINI entry if the appropriate symbol is not in the hash table.
4994
4995 * libelf.h (struct elf_backend_data): Add create_program_headers
4996 and want_hdr_in_seg fields.
4997 * elfxx-target.h (elf_backend_want_hdr_in_seg): Define if not
4998 defined.
4999 (elf_backend_create_program_headers): Likewise.
5000 (elfNN_bed): Initialize create_program_headers and
5001 want_hdr_in_seg.
5002 * elf.c (get_program_header_size): Call create_program_headers
5003 backend routine.
5004 (map_program_segments): Check want_hdr_in_seg backend field. Call
5005 create_program_headers backend routine.
5006
5007 * elf.c (assign_file_positions_except_relocs): Align non allocated
5008 sections when creating an executable.
5009
5010 * elfcode.h (elf_swap_phdr_in): Make non static.
5011 (elf_swap_phdr_out): Make non static.
5012 * libelf.h (bfd_elf32_swap_phdr_in): Declare.
5013 (bfd_elf32_swap_phdr_out): Declare.
5014 (bfd_elf64_swap_phdr_in): Declare.
5015 (bfd_elf64_swap_phdr_out): Declare.
5016
5017 * ecofflink.c (ecoff_collect_shuffle): New static function.
5018 (_bfd_ecoff_get_accumulated_pdr): New function.
5019 (_bfd_ecoff_get_accumulated_sym): New function.
5020 (_bfd_ecoff_get_accumulated_ss): New function.
5021 * libbfd-in.h (_bfd_ecoff_get_accumulated_pdr): Declare.
5022 (_bfd_ecoff_get_accumulated_sym): Declare.
5023 (_bfd_ecoff_get_accumulated_ss): Declare.
5024 * libbfd.h: Rebuild.
5025
5026 Fri Sep 1 13:20:25 1995 Ian Lance Taylor <ian@cygnus.com>
5027
5028 * libecoff.h (_bfd_ecoff_bfd_print_private_bfd_data): Fix typo.
5029
5030 * elflink.h (elf_link_add_object_symbols): Handle indirect and
5031 warning symbols. If any section is named .gnu.warning.XXX, treat
5032 the contents as a warning to be issued if the symbol XXX is
5033 referenced.
5034 (elf_link_output_extsym): For an indirect or warning symbol, just
5035 output the symbol it points to.
5036
5037 * linker.c (_bfd_link_hash_newfunc): Don't bother to set bfd_error
5038 if bfd_hash_allocate fails, since it will already be set.
5039 (generic_link_hash_newfunc): Likewise.
5040 (archive_hash_newfunc): Likewise.
5041 (hash_entry_bfd): New static function.
5042 (_bfd_generic_link_add_one_symbol): Pass new arguments to warning
5043 callback. Allocate a new warning using the hash table newfunc.
5044 Use bfd_hash_replace to update the entry in the hash table, rather
5045 than assuming we can copy the fields with structure assignment.
5046
5047 * hash.c (bfd_hash_replace): New function.
5048 * bfd-in.h (bfd_hash_replace): Declare.
5049 * bfd-in2.h: Rebuild.
5050
5051 Fri Sep 1 08:12:50 1995 James G. Smith <jsmith@beauty.cygnus.com>
5052
5053 * config.bfd: Add mips*vr4300-*-elf* target.
5054 * config/mipsbvr4300.mt: Added.
5055
5056 See file ChangeLog.2
5057
5058 \f
5059 Local Variables:
5060 mode: indented-text
5061 left-margin: 8
5062 fill-column: 74
5063 version-control: never
5064 End:
This page took 0.203624 seconds and 4 git commands to generate.