* ldmisc.h (demangle): Declare.
[deliverable/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
ecba7a3a
ILT
1Fri Apr 26 18:00:37 1996 Ian Lance Taylor <ian@cygnus.com>
2
3 * som.c (som_slurp_symbol_table): Set the symbol count to the
4 number of BFD symbols created.
5
e25a7988
MM
6Fri Apr 26 12:34:29 1996 Michael Meissner <meissner@tiktok.cygnus.com>
7
8 * elf32-ppc.c (ppc_elf_check_relocs): Forward relocations to the
9 output file if linking shared objects. Loop to check all relocs,
10 rather than returning false on first error.
11
5c28a96e
MM
12Thu Apr 25 13:25:12 1996 Michael Meissner <meissner@tiktok.cygnus.com>
13
3f7ca26b
MM
14 * elf32-ppc.c (ppc_elf_create_linker_section): Add PLT case.
15 (ppc_elf_additional_program_headers): If .interp section, bump #
16 of program headers by 1.
17 (ppc_elf_adjust_dynamic_symbol): Flesh out support.
18 (ppc_elf_size_dynamic_sections): Add support for .plt section.
19 (ppc_elf_check_relocs): Print out filename in debug code. Enable
20 PLT support.
21 (ppc_elf_finish_dynamic_symbol): Add support for PLT's, beef up
22 debug output.
23 (ppc_elf_relocate_section): If the output section isn't defined,
24 don't abort, just give an error message.
25
5c28a96e
MM
26 * elflink.c (_bfd_elf_create_dynamic_sections): If the section
27 being created is .sdata or .sdata2, don't make the symbol dynamic.
28
f5d65485
ILT
29Wed Apr 24 14:04:07 1996 Ian Lance Taylor <ian@cygnus.com>
30
31 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through the
32 members of an archive for dynamic objects with no symbols, and
33 pass them directly to check_archive_element.
34 (xcoff_link_check_ar_symbols): Pass dynamic objects to
35 xcoff_link_check_dynamic_ar_symbols.
36 (xcoff_link_check_dynamic_ar_symbols): New static function.
37
38 * coff-rs6000.c (rs6000coff_vec): Change BFD_JUMP_TABLE_DYNAMIC
39 from _bfd_nodynamic to _bfd_xcoff.
40 * libcoff-in.h (_bfd_xcoff_get_dynamic_symtab_upper_bound):
41 Declare.
42 (_bfd_xcoff_canonicalize_dynamic_symtab): Declare.
43 (_bfd_xcoff_get_dynamic_reloc_upper_bound): Declare.
44 (_bfd_xcoff_canonicalize_dynamic_reloc): Declare.
45 * libcoff.h: Rebuild.
46 * xcofflink.c (xcoff_swap_ldrel_in): New static function.
47 (xcoff_get_section_contents): New static function.
48 (_bfd_xcoff_get_dynamic_symtab_upper_bound): New function.
49 (_bfd_xcoff_canonicalize_dynamic_symtab): New function.
50 (_bfd_xcoff_get_dynamic_reloc_upper_bound): New function.
51 (xcoff_dynamic_reloc): New static variable.
52 (_bfd_xcoff_canonicalize_dynamic_reloc): New function.
53 (xcoff_link_add_dynamic_symbols): Use xcoff_get_section_contents.
54
55Tue Apr 23 12:48:42 1996 Ian Lance Taylor <ian@cygnus.com>
56
57 * coff-sparc.c (bfd_coff_generic_reloc): Return bfd_reloc_ok even
58 if reloc_entry->addend is not 0.
59 (CALC_ADDEND): Just set the addend to reloc.r_offset.
60
34249b2f
DE
61Mon Apr 22 18:29:01 1996 Doug Evans <dje@canuck.cygnus.com>
62
63 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Fix spelling of
64 R_SPARC_GLOB_JMP.
65 * elf64-sparc.c (sparc64_elf_howto_table): Likewise.
66 Add entries for R_SPARC_[56].
67 (sparc_reloc_map): Add entries for R_SPARC_[56].
68
af50cd91
ILT
69Mon Apr 22 15:07:24 1996 Ian Lance Taylor <ian@cygnus.com>
70
1726b8f0
ILT
71 Optimize linking of stabs in sections as used in ELF and COFF.
72 * stabs.c: New file.
73 * libbfd-in.h (_bfd_link_section_stabs): Declare.
74 (_bfd_write_section_stabs): Declare.
75 (_bfd_write_stab_strings): Declare.
76 * libbfd.h: Rebuild.
77 * libcoff-in.h (struct coff_section_tdata): Add stab_info field.
78 (struct coff_link_hash_table): Add stab_info field.
79 * libcoff.h: Rebuild.
80 * cofflink.c (_bfd_coff_link_hash_table_init): Initialize
81 stab_info field.
82 (coff_link_add_symbols): Call _bfd_link_section_stabs if
83 appropriate.
84 (_bfd_coff_final_link): Write out stab strings hash table.
85 (_bfd_coff_link_input_bfd): Handle optimized stabs sections.
86 * coff-ppc.c (ppc_bfd_coff_final_link): Write out stab strings
87 hash table.
88 * elf-bfd.h (struct elf_link_hash_table): Add stab_info field.
89 (struct bfd_elf_section_data): Add stab_info field.
90 * elf.c (_bfd_elf_link_hash_table_init): Initialize stab_info
91 field.
92 * elflink.h (elf_link_add_object_symbols): If appropriate, call
93 _bfd_link_section_stabs.
94 (elf_bfd_final_link): Write out stab strings hash table.
95 (elf_link_input_bfd): Handle optimized stabs sections.
96 * reloc.c (_bfd_final_link_relocate): Check address against
97 _raw_size rather than _cooked_size.
98 * Makefile.in: Rebuild dependencies.
99 (BFD_LIBS): Add stabs.o
100 (BFD_LIBS_CFILES): Add stabs.c.
101
102 * VERSION: Increment for bfdlink.h change.
103
af50cd91
ILT
104 * coffgen.c (coff_renumber_symbols): Correct handling of
105 BSF_NOT_AT_END common symbols.
106
f9fa5df3
ILT
107Fri Apr 19 19:21:56 1996 Ian Lance Taylor <ian@cygnus.com>
108
109 * coff-ppc.c (record_toc): Add cast to avoid warning.
110 (ppc_allocate_toc_section): Likewise.
111 (coff_ppc_relocate_section): Remove ANSI C string concatenation.
112 (ppc_coff_reloc_type_lookup): Remove unreached code.
113 * coffcode.h (coff_write_object_contents): Don't take the address
114 of an array.
115 * peicode.h (pe_print_idata): Add casts to avoid warning.
116 (pe_print_edata): Likewise.
117 (pe_print_reloc): Remove ANSI C string concatenation.
118
d6e0e2f7
ILT
119Thu Apr 18 18:51:18 1996 Ian Lance Taylor <ian@cygnus.com>
120
121 * libcoff-in.h (struct coff_final_link_info): Add last_bf_index
122 and last_bf fields.
123 * libcoff.h: Rebuild.
124 * coffswap.h (coff_swap_aux_in): Swap endndx field for C_FCN
125 symbols.
126 (coff_swap_aux_out): Likewise.
127 * peicode.h (coff_swap_aux_in): Likewise.
128 (coff_swap_aux_out): Likewise.
129 * coffgen.c (coff_pointerize_aux): Check endndx field for C_FCN
130 symbols.
131 * cofflink.c (_bfd_coff_final_link): Initialize last_bf_index
132 field.
133 (_bfd_coff_link_input_bfd): Check endndx field for C_FCN symbols.
134 Fix up .bf endndx link fields.
135 * coff-ppc.c (ppc_bfd_coff_final_link): Initialize last_bf_index
136 field.
137 * xcofflink.c (xcoff_link_input_bfd): Check endndx field for C_FCN
138 symbols.
139
221d1e19
MM
140Wed Apr 17 12:08:24 1996 Michael Meissner <meissner@tiktok.cygnus.com>
141
142 * pe{,i}-ppc.c (PPC_PE): Define instead of PPC, so that compiling
143 on Solaris PowerPC systems doesn't get confused.
144
145 * ccffcode.h (coff_write_object_contents): Use #ifdef PPC_PE, not
146 #ifdef PPC.
147
148 * elfcore.h (bfd_prstatus, bfd_fpregset): Add thread argument.
149 (elf_corefile_note): If HAVE_SYS_PROCFS_H is not defined, don't
150 update did_reg and did_reg2.
151
8f9a56c6
ILT
152Wed Apr 17 13:07:37 1996 Ian Lance Taylor <ian@cygnus.com>
153
f97fca78
ILT
154 * xcofflink.c (xcoff_link_input_bfd): Check for TOC overflow.
155
8f9a56c6
ILT
156 * linker.c (_bfd_generic_link_add_one_symbol): When calling the
157 callback routines, pass h->root.string rather than name, in case
158 copy is true and name is transient.
159
603fdf16
SG
160Tue Apr 16 16:36:38 1996 Stu Grossman (grossman@lisa.cygnus.com)
161
162 * elfcore.h: Add support for core files with multiple threads.
163 (Primarily for Solaris.)
164
a2d914e1
ILT
165Tue Apr 16 13:44:08 1996 Ian Lance Taylor <ian@cygnus.com>
166
cdf23557
ILT
167 * aoutx.h (NAME(aout,squirt_out_relocs)): Don't do anything if
168 section->orelocation is NULL.
169
a2d914e1
ILT
170 * coffgen.c (bfd_coff_get_syment): New function.
171 (bfd_coff_get_auxent): New function.
172 * bfd-in.h (bfd_coff_get_syment): Declare.
173 (bfd_coff_get_auxent): Declare.
174 * bfd-in2.h: Rebuild.
175
5cf36a32
ILT
176Mon Apr 15 19:06:59 1996 Ian Lance Taylor <ian@cygnus.com>
177
178 * elf32-mips.c (struct mips_hi16): Define.
179 (mips_hi16_addr, mips_hi16_addend): Remove.
180 (mips_hi16_list): New static variable.
181 (mips_elf_hi16_reloc): Maintain a list of unmatched HI16 relocs.
182 (mips_elf_lo16_reloc): Process mips_hi16_list.
183 (mips_elf_relocate_section): Permit an arbitrary number of HI16
184 relocs before the associated LO16 reloc.
185
b7fce5be
ILT
186Wed Apr 10 00:23:53 1996 Ian Lance Taylor <ian@cygnus.com>
187
176512da
ILT
188 * versados.c (versados_scan): Check bfd_alloc return value.
189 (versados_object_p): Check all bfd_read return values. Require
190 that lang field be less than 10, to avoid confusion with Intel Hex
191 files.
192
18de3f19
ILT
193 * libaout.h (WRITE_HEADERS): Write out the relocs even if there
194 aren't any symbols.
195 * aoutx.h (NAME(aout,swap_std_reloc_out)): Set r_index to N_ABS,
196 not 0, for an absolute symbol.
197 (NAME(aout,swap_ext_reloc_out)): Likewise.
198
66ab4152
ILT
199 * ihex.c (ihex_scan): Accept a length of 4 for record type 5.
200 (ihex_write_object_contents): For a large start address, output
201 the full 32 bit address in record type 5.
202
b7fce5be
ILT
203 * ieee.c (ieee_write_byte): Change second parameter from bfd_byte
204 to int to avoid promotion problems in prototype.
205
f1b45745
ILT
206Tue Apr 9 11:44:21 1996 Ian Lance Taylor <ian@cygnus.com>
207
f400f358
ILT
208 * configure.host: Use ${srcdir} when looking for picfrag.
209
3d9a5986
ILT
210 * configure.host: Switch on ${libdir}, not $(libdir). From
211 alan@spri.levels.unisa.edu.au (Alan Modra).
212
f1b45745
ILT
213 * aoutx.h (aout_link_add_symbols): Always call add_dynamic_symbols
214 entry point, not just for DYNAMIC objects.
215 * sunos.c (sunos_add_dynamic_symbols): Always call
216 sunos_create_dynamic_sections. If called with a non DYNAMIC
217 object, don't do anything else.
218 (sunos_add_one_symbol): Don't call sunos_create_dynamic_sections.
219
6f21f2e3
ILT
220Mon Apr 8 12:09:36 1996 Ian Lance Taylor <ian@cygnus.com>
221
639b5a09
ILT
222 * configure.in: Permit --enable-shared to specify a list of
223 directories.
224 * configure: Rebuild.
225
6f21f2e3
ILT
226 * configure.host: Set HLDFLAGS and SHLIB_CFLAGS for *-dec-osf*
227 host when configuring with --enable-shard.
228
3f5f565b
ILT
229Fri Apr 5 12:24:13 1996 Ian Lance Taylor <ian@cygnus.com>
230
1ac75f5c
ILT
231 * config.bfd: Add i[345]86-*-freebsdelf* target; from John Polstra
232 <jdp@polstra.com>.
233
1a9951a9
ILT
234 * linker.c (link_action): For WARN_ROW/warn, use MWARN, not CYCLE,
235 to avoid crashing in bfd_hash_replace.
236
f1ac3acb 237 * sysdep.h: Use #ifdef, not #if.
3f5f565b 238
eb5f58e0
ILT
239Thu Apr 4 23:32:23 1996 Ian Lance Taylor <ian@cygnus.com>
240
241 * config.in: Rebuild.
242
ab1aa5cd
FF
243Thu Apr 4 18:49:09 1996 Fred Fish <fnf@cygnus.com>
244
245 * configure.in (mips-sony-bsd*): Fix typo in AC_DEFINE.
246 (AC_CHECK_HEADERS): Check for sys/time.h
247 (AC_HEADER_TIME): Add macro.
248 * configure: Rebuild.
249 * sysdep.h: Use TIME_WITH_SYS_TIME and HAVE_SYS_TIME_H
250 to control what combination of <time> and <sys/time.h>
251 get included.
252
d1f74cd2
DE
253Tue Apr 2 13:11:53 1996 Doug Evans <dje@canuck.cygnus.com>
254
255 * aoutf1.h (sunos_32_set_arch_mach): Handle M_SPARCLET.
256 (aout_32_sunos4_write_object_contents): Likewise.
257 * aoutx.h (NAME(aout,machine_type)): Handle
258 bfd_mach_sparc_{sparclet,sparclite}.
259 * archures.c (bfd_mach_sparc_{sparclet,sparclite}): Define.
260 (bfd_mach_sparc_v9_p): Update.
261 * cpu-sparc.c (arch_info_struct): Add entries for sparclet,sparclite.
262 * libaout.h (enum machine_type): Add M_SPARCLET.
263 * sunos.c (MACHTYPE_OK): Define.
264 * bfd-in2.h: Regenerated.
265
1dad72bd
ILT
266Tue Apr 2 00:33:18 1996 Ian Lance Taylor <ian@cygnus.com>
267
19bfbcbe
ILT
268 * elf-bfd.h (struct elf_link_hash_table): Add hgot field.
269 * elf.c (_bfd_elf_link_hash_table_init): Initialize hgot field.
270 * elflink.c (_bfd_elf_create_got_section): Store the
271 _GLOBAL_OFFSET_TABLE_ hash table entry in the hgot field.
272 * elf32-sparc.c (elf32_sparc_check_relocs): If the size of the
273 global offset table goes over 0x1000, set the value of
274 _GLOBAL_OFFSET_TABLE_ to 0x1000 into the section.
275 (elf32_sparc_relocate_section): Subtract the offset of
276 _GLOBAL_OFFSET_TABLE_ when handling GOT relocations.
277
1dad72bd
ILT
278 * elfcode.h: Don't include <string.h>.
279
ca4e2190
JL
280Mon Apr 1 10:39:24 1996 Jeffrey A Law (law@cygnus.com)
281
282 * linker.c (_bfd_generic_link_hash_newfunc): Renamed from
283 generic_link_hash_newfunc. All references changed.
284 * genlink.h (_bfd_generic_link_hash_newfunc): Declaration
285 moved here from libbfd-in.h.
286 * libbfd-in.h: Corresponding changes.
287 * libbfd.h: Regenerated.
288
ce6a7731
ILT
289Mon Apr 1 12:35:36 1996 Ian Lance Taylor <ian@cygnus.com>
290
aad53b0d
ILT
291 * aoutx.h (aout_link_input_section_std): When reporting an
292 overflow error, use the name of the symbol in the hash table if
293 available.
294 (aout_link_input_section_ext): Likewise.
295
ce6a7731
ILT
296 * elflink.h (elf_adjust_dynamic_symbol): If a common symbol got
297 defined in a regular file, set ELF_LINK_HASH_DEF_REGULAR.
298
323b430f
SC
299Sun Mar 31 01:58:41 1996 steve chamberlain <sac@slash.cygnus.com>
300
301 * peicode.h (coff_swap_aouthdr_out): Delete test for .junk.
302 * coffcode.h (coff_compute_section_file_positions): Likewise.
303 (coff_write_object_contents): Likewise.
304
7fc1cd16
ILT
305Fri Mar 29 12:44:36 1996 Ian Lance Taylor <ian@cygnus.com>
306
5a28331f
ILT
307 * section.c (SEC_LINK_ONCE): Define.
308 (SEC_LINK_DUPLICATES): Define.
309 (SEC_LINK_DUPLICATES_DISCARD): Define.
310 (SEC_LINK_DUPLICATES_ONE_ONLY): Define.
311 (SEC_LINK_DUPLICATES_SAME_SIZE): Define.
312 (SEC_LINK_DUPLICATES_SAME_CONTENTS): Define.
313 * bfd-in2.h: Rebuild.
314 * coffcode.h (sec_to_styp_flags): If COFF_WITH_PE, turn
315 SEC_LINK_ONCE into IMAGE_SCN_LNK_COMDAT.
316 (styp_to_sec_flags): If COFF_WITH_PE, turn IMAGE_SCN_LNK_REMOVE
317 into SEC_EXCLUDE. If IMAGE_SCN_LNK_COMDAT is set, set
318 SEC_LINK_ONCE, and look through the symbol table for the setting
319 for SEC_LINK_DUPLICATES.
320 (coff_write_object_contents): If COFF_WITH_PE, if SEC_LINK_ONCE is
321 set for a section, find the section symbol in the symbol table,
322 and set the aux entry based on SEC_LINK_DUPLICATES.
323 * coffgen.c (coff_print_symbol): Add a space before "checksum".
324 * coff-arm.c (armcoff_big_vec): If COFF_WITH_PE is defined, add
325 SEC_LINK_ONCE and SEC_LINK_DUPLICATES to section_flags.
326 * coff-i386.c (i386coff_vec): Likewise.
327 * coff-ppc.c (TARGET_LITTLE_SYM, TARGET_BIG_SYM): Likewise.
328
7fc1cd16
ILT
329 * VERSION: Bump to 2.6.1.
330 * Makefile.in (stamp-h): Depend upon VERSION.
331
9399a257
JL
332Thu Mar 28 23:48:49 1996 Jeffrey A Law (law@cygnus.com)
333
334 * libbfd-in.h (generic_link_hash_newfunc): Add declaration.
335 * libbfd.h: Rebuilt.
336 * linker.c (generic_link_hash_newfunc): No longer static.
337 * coffcode.h (coff_bfd_link_hash_create): Allow specific targets
338 to override.
339 * coff-h8300.c: Add two derived hash tables and their associated
340 funtions and #defines for use by the h8300 linker.
341 (h8300_reloc16_extra_cases, case R_MEM_INDIRECT): Create entries in
342 the function vector as needed. Place the address of the function
343 vector entry in the location specified by the R_MEM_INDIRECT reloc.
344 Rewrite the vectors section contents as necessary.
345 (h8300_bfd_link_add_symbols): New function for the h8300 linker.
346 (coff_bfd_link_add_symbols): Define to use h8300 specific version.
347 (coff_bfd_link_hash_table_create): Likewise.
348
506f2bb4
ILT
349Thu Mar 28 17:44:08 1996 Ian Lance Taylor <ian@cygnus.com>
350
351 * libhppa.h: If gcc 2.7 or higher, declare all the functions with
352 __attribute__ ((__unused__)) so that -Wall doesn't warn about
353 them.
354 (hppa_rebuild_insn): Pass pointer to correct type to
355 low_sign_unext and dis_assemble_21.
356
05a84ae1
DE
357Thu Mar 28 11:00:36 1996 Doug Evans <dje@canuck.cygnus.com>
358
359 * config.bfd (sparc64-{sysv4*,solaris2*}): Delete.
360 Stick with sparc-*-{sysv4*,solaris2*}.
361
919cf4b5
ILT
362Wed Mar 27 10:43:34 1996 Ian Lance Taylor <ian@cygnus.com>
363
8230f31c
ILT
364 * peicode.h (coff_swap_aux_in): Swap in extra PE x_scn fields.
365 (coff_swap_aux_out): Swap out extra PE x_scn fields.
366 * coffswap.h (coff_swap_aux_in): Zero out extra PE x_scn fields.
367 * coffgen.c (coff_print_symbol): If any of the extra PE x_scn
368 fields is non-zero, print them.
369
9addd1d4
ILT
370 * coff-ppc.c (ppc_record_toc_entry): Put inside COFF_IMAGE_WITH_PE
371 ifdef. Remove unused variables.
372 (ppc_record_data_in_toc_entry): Ifdef out. Removed unused
373 variables.
374 (ppc_mark_symbol_as_glue): Put inside COFF_IMAGE_WITH_PE ifdef.
375 (get_symbol_value): Ifdef out.
376 (pe_ppc_reloc): Ifdef out. Remove unused variables.
377 (coff_ppc_relocate_section): Remove unused variables. Make
378 fprintf strings and argument types correspond. Put before_addr in
379 DEBUG_RELOC ifdef.
ff0e4a93
ILT
380 (dump_toc): Make fprintf strings and argument types correspond.
381 (ppc_process_before_allocation): Remove unused variables. Always
382 return a value.
9addd1d4
ILT
383 (ppc_reflo_reloc): Ifdef out.
384 (ppc_addr32nb_reloc): Ifdef out.
385 (ppc_coff_rtype2howto): Make fprintf strings and argument types
386 correspond.
387 (coff_ppc_rtype_to_howto): Likewise.
388 (ppc_coff_swap_sym_in_hook): Remove unused variables.
389
390 * peicode.h (pe_print_idata): Move otherwise unused variables into
391 the #ifdef where they are used. Always return a value.
ff0e4a93
ILT
392 (pe_print_edata): Make fprintf strings and argument types
393 correspond. Always return a value.
9addd1d4
ILT
394 (pe_print_pdata): Removed unused variable addr_value. Always
395 return a value.
396 (pe_print_reloc): Remove unused variable onaline. Make fprintf
ff0e4a93 397 strings and argument types correspond. Always return a value.
9addd1d4
ILT
398
399 * elf32-ppc.c (ppc_elf_fake_sections): Return true.
400 (ppc_elf_finish_dynamic_symbol): Move definition of unused
401 variable rela inside #if 0 section where it is used.
402
c877bdf1
ILT
403 * ns32k.h: New file.
404 * cpu-ns32k.h: Include ns32k.h. Rename externally visible
405 functions to start with _bfd_.
406 * aout-ns32k.c: Include ns32k.h. Change references to renamed
407 functions in cpu-ns32k.h.
408 * Makefile.in: Rebuild dependencies.
409 (HFILES): Add ns32k.h.
410
ff0e4a93
ILT
411 * section.c (struct sec): Add linker_mark field. Change
412 user_set_vma and reloc_done to be single bit fields.
413 (STD_SECTION): Update accordingly.
7ec49f91
ILT
414 * bfd-in2.h: Rebuild.
415 * aoutx.h (NAME(aout,final_link)): Mark sections included in the
416 link.
417 (aout_link_input_bfd): Don't link unmarked sections.
418 * cofflink.c (_bfd_coff_final_link): Mark sections included in the
419 link.
420 (_bfd_coff_link_input_bfd): Don't link unmarked sections.
421 * coff-ppc.c (ppc_bfd_coff_final_link): Mark sections included in
422 the link.
423 * elflink.h (elf_bfd_final_link): Mark sections included in the
424 link.
425 (elf_link_input_bfd): Don't link unmarked sections.
426 * xcofflink.c (_bfd_xcoff_bfd_final_link): Mark sections included
427 in the link.
428 (xcoff_link_input_bfd): Don't link unmarked sections.
429
919cf4b5
ILT
430 * coffswap.h (coff_swap_scnhdr_out): Include section name in
431 overflow error messages.
432
986cf3b8
ILT
433Tue Mar 26 15:46:18 1996 Ian Lance Taylor <ian@cygnus.com>
434
fd681dcd
ILT
435 * bfd.c (_bfd_default_error_handler): If _bfd_error_program_name
436 is not set, print "BFD: " before the error message.
437
986cf3b8
ILT
438 * configure.in: Use AC_CHECK_TOOL to find ar and ranlib. From
439 Miles Bader <miles@gnu.ai.mit.edu>.
440 * configure: Rebuild.
441
3998d526
ILT
442Fri Mar 22 12:17:00 1996 Ian Lance Taylor <ian@cygnus.com>
443
c3dffbd7
ILT
444 * xcofflink.c (xcoff_link_input_bfd): Fix scan for C_BINCL/C_EINCL
445 symbols.
446
3998d526
ILT
447 * config.bfd: Add ieee_vec to targ_selvecs for i960 targets and
448 m68k-aout, m68k-coff, and m68k-elf targets.
449
e4d27380
ILT
450Fri Mar 22 11:33:44 1996 Martin Anantharaman <martin@goofy.imech.uni-duisburg.de>
451
452 * ieee.c: Changed #ifdef KEEPMINUSPCININST to #if KEEPMINUSPCININST.
453 (ieee_generic_stat_arch_elt): Restructured to prevent
454 ieee_object_p from being called repeatedly.
455
51776a11
SC
456Thu Mar 21 11:00:47 1996 steve chamberlain <sac@slash.cygnus.com>
457
458 * coffcode.h (coff_write_object_contents): Allocate
459 buffers large enough for any FILEHDR or AOUTHDR.
460
461Thu Mar 21 16:28:17 1996 David Mosberger-Tang <davidm@azstarnet.com>
462
463 * ecofflink.c (lookup_line): New static function, renamed and
464 slighly changed from old _bfd_ecoff_locate_line.
465 (_bfd_ecoff_locate_line): Cache line number information. Use
466 lookup_line for actual lookup.
467
9e4ebb1b
MM
468Thu Mar 21 14:59:11 1996 Michael Meissner <meissner@tiktok.cygnus.com>
469
470 * peicode.h (pe_print_pdata): Warn if the .pdata section is not a
471 multiple of 20 bytes.
472
9e7427a4
ILT
473Thu Mar 21 13:54:40 1996 Ian Lance Taylor <ian@cygnus.com>
474
51776a11
SC
475 * ecoff.c (_bfd_ecoff_find_nearest_line): Use bfd_zalloc to
476 allocate ecoff_find_line, and don't initialize by hand.
477 * elf32-mips.c (mips_elf_find_nearest_line): Use bfd_zalloc for
478 mips_elf_find_line, and don't call memset.
479
9e7427a4
ILT
480 * coffcode.h (coff_compute_section_file_positions): If not
481 producing a final executable, don't consider sofar when aligning
482 the section to the correct size.
483
484Wed Mar 20 16:53:12 1996 Ian Lance Taylor <ian@cygnus.com>
485
486 * coffcode.h (coff_add_missing_symbols): Ifdef out.
487 (coff_write_object_contents): Don't call coff_add_missing_symbols.
488 * coffgen.c (coff_section_symbol): Ifdef out.
489
e7f9ba4f
ILT
490Mon Mar 18 12:54:41 1996 Ian Lance Taylor <ian@cygnus.com>
491
492 * elf32-mips.c (mips_elf_gprel32_reloc): Initialize gp if
493 output_bfd is not NULL.
494
34c4d647
DE
495Thu Mar 14 17:12:06 1996 Doug Evans <dje@charmed.cygnus.com>
496
497 * coffgen.c (coff_get_normalized_symtab): Call bfd_zalloc instead
498 of bfd_alloc (fixes fix_line not being initialized).
499 Delete zeroing of fix_{value,tag,end,scnlen} fields.
500
4e054247
JL
501Thu Mar 14 16:06:06 1996 Jeffrey A Law (law@cygnus.com)
502
57289b5c
JL
503 * coffcode.h: Allow specific backends to override the
504 bfd_link_add_symbols routine.
505
4e054247
JL
506 * coff-h8300.c: Include genlink.h.
507 (howto_table): Add R_MEM_INDIRECT.
508 (rtype2howto): Support R_MEM_INDIRECT.
509 (h8300_reloc16_extra_cases): Handle R_MEM_INDIRECT like R_RELBYTE
510 for now.
511
a10d3dec
ILT
512Tue Mar 12 12:41:17 1996 David Mosberger-Tang <davidm@koala.azstarnet.com>
513
514 * coff-alpha.c (alpha_relocate_section): Use
515 info->callbacks_warning, rather than _bfd_error_handler, for
516 "multiple gp" warning.
517
ea2488ad
ILT
518Tue Mar 12 12:10:55 1996 Ian Lance Taylor <ian@cygnus.com>
519
8881b321
ILT
520 * linker.c (bfd_wrapped_link_hash_lookup): New function.
521 (_bfd_generic_link_add_one_symbol): Remove BFD_ASSERT on hash
522 table string. Use bfd_wrapped_link_hash_lookup.
523 (_bfd_generic_link_write_global_symbol): Remove BFD_ASSERT on hash
524 table string.
525 * aoutx.h (aout_link_write_symbols): Use the name from the hash
526 table, if any, when writing out symbols.
527 (aout_link_input_section_std): Use the name from the hash table,
528 if any, when reporting undefined symbols.
529 (aout_link_input_section_ext): Likewise.
530 (aout_link_reloc_link_order): Use bfd_wrapped_link_hash_lookup.
531 * bout.c (get_value): Likewise.
532 * cofflink.c (_bfd_coff_reloc_link_order): Likewise.
533 * ecoff.c (ecoff_reloc_link_order): Likewise.
534 * elflink.h (elf_link_add_object_symbols): Likewise.
535 (elf_reloc_link_order): Likewise.
536 * linker.c (_bfd_generic_link_output_symbols): Likewise.
537 (_bfd_generic_reloc_link_order): Likewise.
538 (default_indirect_link_order): Likewise.
539 * reloc16.c (bfd_coff_reloc16_get_value): Likewise.
540 * sunos.c (sunos_add_one_symbol): Likewise.
541 * xcofflink.c (xcoff_link_add_symbols): Likewise.
542 (bfd_xcoff_link_count_reloc): Likewise.
543 (xcoff_reloc_link_order): Likewise.
544
545 * ecoffswap.h (ecoff_swap_fdr_in): If ECOFF_64, turn 0xffffffff
546 into -1 for intern->rss.
547
ea2488ad
ILT
548 * configure: Rebuild with autoconf 2.8.
549
c189fdfb
ILT
550Mon Mar 11 12:28:31 1996 Ian Lance Taylor <ian@cygnus.com>
551
552 * stab-syms.c (__define_stab_duplicate): Define.
553 (bfd_get_stab_name): Rename from aout_stab_name. Rewrite to use a
554 switch.
555 * bfd-in.h (bfd_get_stab_name): Declare.
556 * bfd-in2.h: Rebuild.
557 * Makefile.in: Rebuild dependencies.
558 (BFD_LIBS): Add stab-syms.o.
559 (BFD_LIBS_CFILES): Add stab-syms.c.
560 (BFD32_BACKENDS): Remove stab-syms.o.
561 (BFD32_BACKENDS_CFILES): Remove stab-syms.c.
562 * configure.in: Don't list stab-syms.o in bfd_backends.
563 * configure: Rebuild.
564 * libaout.h (aout_stab_name): Don't declare.
565 * aoutx.h (NAME(aout,get_symbol_info)): Call bfd_get_stab_name,
566 not aout_stab_name.
567
568Fri Mar 8 11:26:20 1996 Ian Lance Taylor <ian@cygnus.com>
569
570 * elf.c (assign_file_positions_for_segments): Adjust file offset
571 for section alignment even if SEC_LOAD is not set.
572
c5bde1ef
ILT
573Tue Mar 5 12:02:23 1996 Ian Lance Taylor <ian@cygnus.com>
574
8f218e05
ILT
575 * configure.in: Don't set SHLIB or SHLINK to an empty string,
576 since they appear as targets in Makefile.in.
577 * configure: Rebuild.
578
c5bde1ef
ILT
579 * sunos.c (sunos_scan_ext_relocs): If not making a shared library,
580 don't fiddle with a symbol which is not defined anywhere.
581
cb84f028
ILT
582Mon Mar 4 12:49:16 1996 Ian Lance Taylor <ian@cygnus.com>
583
4e59f523
ILT
584 * xcofflink.c (xcoff_mark): Treat undefined imported symbols as
585 though they are defined in a shared library.
586 (xcoff_build_ldsyms): Likewise.
587
ea2504d5
ILT
588 * coffgen.c (coff_find_nearest_line): Don't look at the line
589 numbers for the section if section->lineno is NULL.
590
cb84f028
ILT
591 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Print a useful error
592 message rather than calling BFD_ASSERT.
593 * elfcode.h (write_relocs): Check return value of
594 _bfd_elf_symbol_from_bfd_symbol.
595
6e036cf7
MM
596Fri Mar 1 09:42:59 1996 Michael Meissner <meissner@tiktok.cygnus.com>
597
598 * elf32-ppc.c (ppc_elf_add_symbol_hook): Don't set SEC_LOAD flag
599 for .sbss section.
600
d08435de
JL
601Wed Feb 28 11:25:47 1996 Jeffrey A Law (law@cygnus.com)
602
603 * libhppa.h (hppa_reloc_field_selector_type): Add R_HPPA_NLSEL
604 and R_HPPA_NLRSEL.
605 (e_nsel, e_nlsel, e_nlrsel): Undefine. Add to
606 hppa_reloc_field_selector_type_alt.
607 (hppa_field_adjust): Handle e_nlsel, e_nlrsel. Fix e_nsel handling.
608 * som.c (hppa_som_gen_reloc_type): Handle N', NL' NLR' field
609 selectors.
610 (som_write_fixups): Finish handling of R_N0SEL and R_N1SEL.
611
09609415
ILT
612Wed Feb 28 11:00:24 1996 Ian Lance Taylor <ian@cygnus.com>
613
614 * elf.c (assign_file_positions_for_segments): Adjust the segment
615 memory size for the alignment of a SEC_ALLOC section, not just a
616 SEC_LOAD section.
617
55626bf0
ILT
618Tue Feb 27 14:17:31 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
619
620 * m68klinux.c: New file.
621 * hosts/m68klinux.h: New file.
622 * config.bfd (m68*-*-linuxaout*, m68*-*-linux*): New targets.
623 * configure.in (m68*-*-linux*): New native host.
624 (m68klinux_vec): New vector.
625 * configure: Rebuild.
626 * targets.c (m68klinux_vec): Declare.
627 * i386linux.c (bfd_i386linux_size_dynamic_sections): Renamed from
628 bfd_linux_size_dynmic_sections to avoid clash with m68klinux.c.
629 * bfd-in.h (bfd_i386linux_size_dynamic_sections): Rename
630 declaration from bfd_linux_size_dynamic_sections.
631 (bfd_m68klinux_size_dynamic_sections): Declare.
632 * bfd-in2.h: Rebuild.
633 * Makefile.in: Rebuild dependencies.
634 (BFD32_BACKENDS): Add m68klinux.o.
635 (BFD32_BACKENDS_CFILES): Add m68klinux.c.
636
6c7b3090
JL
637Tue Feb 27 11:31:34 1996 Jeffrey A Law (law@cygnus.com)
638
639 * libhppa.h (pa_arch): Add pa20.
640 (hppa_reloc_field_selector_type): Add R_HPPA_NSEL.
641 (e_nsel): Undefine. Add to hppa_reloc_field_selector_type_alt.
642 (hppa_field_adjust): Handle e_nsel.
643 * som.c: Provide default definitions for many new relocs found only
644 in hpux10 include files.
645 (som_fixup_formats): Add several new relocs from hpux10.
646 (som_hppa_howto_table): Add hpux10 relocs.
647 (som_write_fixups): Handle R_N0SEL and R_N1SEL hpux10 relocs.
648
14fd4616
SS
649Mon Feb 26 12:52:48 1996 Stan Shebs <shebs@andros.cygnus.com>
650
651 * mpw-make.sed: Edit out recent shared library support, and
652 rules to rebuild .h files using doc/chew.
653
3d9f042c
ILT
654Mon Feb 26 14:48:39 1996 David Mosberger-Tang <davidm@AZStarNet.com>
655
656 * ecoff.c (ecoff_compute_section_file_positions): Adjust the file
657 size even of sections with no contents.
658
bdec6228
ILT
659Mon Feb 26 14:01:13 1996 Ian Lance Taylor <ian@cygnus.com>
660
88358469
ILT
661 * cofflink.c (_bfd_coff_link_input_bfd): When merging, skip names
662 starting with '$' the way we skip names starting with '.'. When
663 updating x_endndx, don't be fooled by an index which has been
664 merged.
665
bdec6228
ILT
666 * cofflink.c (_bfd_coff_link_input_bfd): Don't try to optimize a
667 struct/union/enum type with no elements.
668
053ae1d7
ILT
669Sat Feb 24 11:38:58 1996 Ian Lance Taylor <ian@cygnus.com>
670
15f4406c
ILT
671 * bfd.c (bfd_errmsg): Handle a NULL return from strerror.
672
c8435133
ILT
673 * archive.c (bfd_generic_archive_p): If the first file in the
674 archive can not be recognized as an object, don't assume that this
675 is the wrong format.
676
053ae1d7
ILT
677 * elf.c (bfd_elf_set_dt_needed_name): Don't do anything if the
678 format is not bfd_object.
679 (bfd_elf_get_dt_soname): Likewise.
680
ea74d979
ILT
681Wed Feb 21 13:58:04 1996 Ian Lance Taylor <ian@cygnus.com>
682
683 * coff-sh.c (sh_relax_delete_bytes): Correct range of R_SH_USES
684 reloc.
685
871a3f3b
C
686Tue Feb 20 16:22:44 1996 J.T. Conklin <jtc@rtl.cygnus.com>
687
688 * bfd.c (tdata): Add netbsd_core_data.
689 * bfd-in2.h: Regenerated.
690
691Tue Feb 20 16:50:02 1996 Ian Lance Taylor <ian@cygnus.com>
692
fe6fc35f
ILT
693 * sunos.c (SUNOS_CONSTRUCTOR): Define.
694 (sunos_add_one_symbol): Don't let a symbol from a dynamic object
695 override a constructor symbol. Set SUNOS_CONSTRUCTOR when
696 appropriate.
697
871a3f3b
C
698 * bout.c (b_out_squirt_out_relocs): Use udata.i rather than flags
699 to get the symbol index, matching 14 Jul 95 change.
700
d3785301
FF
701Tue Feb 20 08:26:27 1996 Fred Fish <fnf@phydeaux.cygnus.com>
702
703 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents):
704 Remove duplicate definition of gp.
705
60a49e7f
ILT
706Mon Feb 19 12:37:41 1996 Ian Lance Taylor <ian@cygnus.com>
707
81bdcecf
ILT
708 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Don't
709 assume that we can set the GP value and then get the same value,
710 since it won't be true if the output file is neither ELF nor
711 ECOFF.
712 * coff-mips.c (mips_adjust_reloc_in): Don't bother to use
713 _bfd_get_gp_value here.
714 (mips_gprel_reloc): Don't assume we can set and get the GP value.
715 * elf32-mips.c (mips_elf_hi16_reloc): Get gp value from
716 mips_elf_final_gp.
717 (mips_elf_lo16_reloc): Likewise.
718 (mips_elf_final_gp): Add pgp parameter. Set it to the GP value.
719 Don't require that the BFD be ELF.
720 (mips_elf_gprel16_reloc): Get gp value from mips_elf_final_gp.
721 (mips_elf_gprel32_reloc): Likewise.
722 (mips_elf_relocate_section): Don't assume we can set and get the
723 GP value.
724 (mips_elf_finish_dynamic_symbol): Don't bother to use
725 _bfd_get_gp_value here.
726
727 * elf32-mips.c (mips_elf_create_procedure_table): Initialize sv.
728 Don't change epdr between malloc and free. Be careful not to free
729 NULL pointers. Zero out the first RPDR.
730
7b61165a
ILT
731 * configure.host: On Linux, only pass -rpath option if $(libdir)
732 is neither /lib nor /usr/lib. From Alan Modra
733 <alan@mullet.Levels.UniSA.Edu.Au>.
734
60a49e7f
ILT
735 * elf-bfd.h (struct elf_obj_tdata): Rename dt_needed_name to
736 dt_name.
737 (elf_dt_name): Rename from elf_dt_needed_name.
738 * elf.c (bfd_elf_set_dt_needed_name): Use elf_dt_name, not
739 elf_dt_needed_name.
740 (bfd_elf_get_dt_soname): New function.
741 * elflink.h (elf_link_add_object_symbols): Use elf_dt_name, not
742 elf_dt_needed_name. Save the SONAME back in elf_dt_name.
743 * bfd-in.h (bfd_elf_get_dt_soname): Declare.
744 * bfd-in2.h: Rebuild.
745
b268e261
DE
746Mon Feb 19 02:50:23 1996 Doug Evans <dje@charmed.cygnus.com>
747
748 * elf32-sparc.c (elf32_sparc_reloc_type_lookup): Renamed from
749 _bfd_sparc_elf_reloc_type_lookup.
750 (bfd_elf32_bfd_reloc_type_lookup): Update.
751 * elf64-sparc.c (SPARC64_OLD_RELOCS): Define.
752 (sparc64_elf_howto_table): Define.
753 (sparc_reloc_map): Define.
754 (sparc64_elf_reloc_type_lookup): New function.
755 (sparc_elf_wdisp16_reloc): New function.
756 (elf_info_to_howto): Use sparc64_elf_howto_table.
757 (sparc64_elf_relocate_section): Likewise.
758 (bfd_elf64_bfd_reloc_type_lookup): Update.
759
9e2ef098
ILT
760Sun Feb 18 15:02:25 1996 Ian Lance Taylor <ian@cygnus.com>
761
762 * configure.host: Check for 'do not mix' from native linker before
763 trying to use -rpath.
764
4c70373f
ILT
765Fri Feb 16 12:46:18 1996 Ian Lance Taylor <ian@cygnus.com>
766
cba3f8a9
ILT
767 * bfd.c (_bfd_get_gp_value): New function.
768 (_bfd_set_gp_value): New function.
769 * libbfd-in.h (_bfd_get_gp_value): Declare.
770 (_bfd_set_gp_value): Declare.
771 * libbfd.h: Rebuild.
772 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Use
773 _bfd_get_gp_value and _bfd_set_gp_value rather than referring
774 directly to the fields in the tdata information.
775 (alpha_relocate_section): Likewise.
776 * coff-mips.c (mips_adjust_reloc_in): Likewise.
777 (mips_gprel_reloc): Likewise.
778 (mips_relocate_section): Likewise.
779 * elf32-mips.c (mips_elf_hi16_reloc): Likewise.
780 (mips_elf_lo16_reloc): Likewise.
781 (mips_elf_final_gp): Likewise.
782 (mips_elf_gprel16_reloc): Likewise.
783 (mips_elf_gprel32_reloc): Likewise.
784 (mips_elf_relocate_section): Likewise.
785 (mips_elf_finish_dynamic_symbol): Likewise.
786
4c70373f
ILT
787 * bout.c (b_out_set_arch_mach): Recognize bfd_mach_i960_jx.
788
a0a2dd54
ILT
789Thu Feb 15 11:29:13 1996 Ian Lance Taylor <ian@cygnus.com>
790
f54c7482 791 * configure.in: Call AC_PROG_CC before configure.host.
65eed095
ILT
792 * configure: Rebuild.
793 * configure.host: Don't set information which autoconf should
794 figure out, namely CC, CFLAGS, LDFLAGS, AR, and RANLIB.
65eed095 795
14293419
ILT
796 * configure.host: Remove go32 and win32 host information, since it
797 should no longer be needed.
798
edf3fe48
ILT
799 * elf.c (map_sections_to_segments): If we have a .dynamic section,
800 then start a new segment rather than put a writable section in a
801 readonly segment.
802
b5e4f369
ILT
803 * configure.host: Set RPATH_ENVVAR.
804
f2e33e27
ILT
805 * Makefile.in: Rebuild dependencies.
806
a0a2dd54
ILT
807 * elflink.c (_bfd_elf_create_linker_section): Remove unused
808 zero_section variable.
809
52c6bc4d
ILT
810Thu Feb 15 10:39:17 1996 H.J. Lu <hjl@zoom.com>
811
812 * Makefile.in ($(srcdir)/bfd-in2.h): Rename target from bfd-in2.h.
813 ($(srcdir)/libbfd.h): Rename from libbfd.h.
814 ($(srcdir)/libcoff.h): Rename from libcoff.h.
815
c9e5279f
ILT
816Wed Feb 14 16:29:07 1996 Martin Anantharaman <martin@mail.imech.uni-duisburg.de>
817
cb50baea
ILT
818 * ieee.c (ieee_write_expression): Only use an R variable for a
819 local symbol. Don't output a zero offset. Handle a zero address.
820 (SRC_MASK, PCREL_OFFSET): Define based on KEEPMINUSPCININST.
821 (rel32_howto, rel16_howto, rel8_howto): Use SRC_MASK and
822 PCREL_OFFSET.
823 (parse_expression): Don't try to handle multiple occurrences of a
824 P variable. Handle I variables differently from X variables. Fix
825 the order of minus expressions.
826 (ieee_slurp_external_symbols): Generate an I variable for an NN
827 record. Fix handling of ATI and ATX records.
828 (ieee_slurp_sections): Only set minimal section attributes.
829 Adjust them later, based on the section contents.
830 (ieee_object_p): Read in the file until just after the ME record.
831 Call ieee_slurp_section_data to set the section flags.
832 (do_one): Add iterations parameter. Only repeat the first load
833 item. Set the section and file reloc flags.
834 (ieee_slurp_section_data): Set section flags. Pass iterations to
835 do_one.
836 (ieee_canonicalize_reloc): Handle I variables.
837 (do_with_relocs): Only emit relocation size when necessary.
838 Increase MAXRUN to 127. Change ov to be assigned, and take
839 src_mask and pcrel_offset into account.
840 (ieee_write_data_part): Skip sections that are not loaded.
841 (ieee_write_external_part): Don't output optional last entry of WX
842 records.
843 (ieee_write_me_part): Make setting of me_record neater.
844 (ieee_generic_stat_arch_elt): Get the size of an archive element.
845
c9e5279f
ILT
846 * syms.c (stt): Add entries for zerovars, vars, and code.
847
848 * elfcode.h (validate_reloc): New static function.
849 (write_relocs): Call validate_reloc for non ELF relocs.
850
851 * elfxx-target.h (elf_symbol_leading_char): Define if not defined.
852 (TARGET_BIG_SYM): Use elf_symbol_leading_char.
853 (TARGET_LITTLE_SYM): Likewise.
854
855 * config.bfd (m68*-*-psos*): New target.
856
d9d65be6
ILT
857Tue Feb 13 15:56:22 1996 Bryan Ford <baford@snake.cs.utah.edu>
858
859 * i386msdos.c: Remove some #if 0 code.
860 (msdos_write_object_contents): Don't include empty sections in the
861 size computation, regardless of their address.
862
863Tue Feb 13 15:36:37 1996 Michael Meissner <meissner@tiktok.cygnus.com>
864
865 * elf32-ppc.c (ppc_elf_relocate_section): Don't segfault if dynboj
866 is NULL, ie, the -r switch is used.
867
db5970c7
ILT
868Tue Feb 13 14:35:15 1996 Ian Lance Taylor <ian@cygnus.com>
869
e9f03cd4
ILT
870 * reloc.c (BFD_RELOC_MIPS_GOT_HI16): Define.
871 (BFD_RELOC_MIPS_GOT_LO16): Define.
b7384d22 872 (BFD_RELOC_MIPS_CALL_HI16, BFD_RELOC_MIPS_CALL_LO16): Define.
e9f03cd4
ILT
873 * bfd-in2.h, libbfd.h: Rebuild.
874 * elf32-mips.c (mips_reloc_map): Map new relocs.
875
fe7c066a
ILT
876 * configure.host: Set HDLFLAGS for *-*-hpux with --enable-shared.
877
1ab628e4
ILT
878 * Makefile.in ($(SHLINK)): Check ts against $(SHLIB), not
879 $(SHLINK).
880
db5970c7
ILT
881 * ieee.c (get_symbol): Set the section to bfd_abs_section.
882 (do_with_relocs): If EXEC_P is set and there are no relocs, use a
883 simple number for the section address, rather than an expression.
884 Limit the number of bytes between relocs to MAXRUN.
885 (ieee_write_me_part): Set me_record to the file offset after the
886 start address.
887 (ieee_write_processor): New static function.
888 (ieee_write_object_contents): Use ieee_write_processor.
889
318b7c18
ILT
890Fri Feb 9 10:53:00 1996 Ian Lance Taylor <ian@cygnus.com>
891
db5970c7
ILT
892 * configure.host: Use ${CC-gcc} when testing for -rpath on SunOS.
893
894 * coff-aux.c: Change include of aux.h to aux-coff.h.
318b7c18 895
56b64690
ILT
896Thu Feb 8 14:01:03 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
897
898 * elf32-m68k.c (elf_m68k_relocate_section): For a R_68K_RELATIVE
899 relocation put the addend both in the reloc entry and the data.
900 (elf_m68k_finish_dynamic_symbol): Likewise. Mask out marker in
901 GOT offset value.
902
903 * elf32-m68k.c (elf_m68k_relocate_section): If -Bsymbolic, resolve
904 a R_68K_PCxx reloc against a defined global symbol directly.
905 (elf_m68k_check_relocs): Don't count such a reloc.
906
907 * elf32-m68k.c (elf_m68k_check_relocs): Don't record a symbol with
908 a PLTxx reloc as dynamic. Disallow PLTxxO reloc against a local
909 symbol for now, otherwise always record the symbol as dynamic.
910 (elf_m68k_adjust_dynamic_symbol): If a symbol with a PLTxx reloc
911 is not referenced by a dynamic object, and we are not making a
912 shared object, then don't make a PLT entry. If we do make a PLT
913 entry, make sure the symbol has been recorded as dynamic.
914
5d649ca8
ILT
915Wed Feb 7 13:56:06 1996 Ian Lance Taylor <ian@cygnus.com>
916
917 * configure.host: When making a shared library, set HLDFLAGS to
918 pass an appropriate -rpath option. Use the make variable SONAME
919 as the shared library soname, rather than computing it here. On
920 SunOS, build stamp-tshlink in place of $(SHLINK).
921 * Makefile.in (SONAME): New variable.
922 ($(SHLINK)): Make a link to the transformed name, as well.
923 (stamp-tshlink): New target.
924 (install): Skip stamp-tshlink during install.
925
8cc98cd5
MM
926Wed Feb 7 13:37:39 1996 Michael Meissner <meissner@tiktok.cygnus.com>
927
56b64690
ILT
928 * elf32-ppc.c (ppc_elf_add_symbol_hook): Do not assume that the
929 linker sections have been set up yet.
930
8cc98cd5
MM
931 * elf.c (make_mapping): Add an additional argument to suppress
932 making the first section include the program headers.
933 (map_sections_to_segments): If the user used -Ttext such that the
934 program headers are on a different page, do not set the flags
935 saying that this section includes the program headers.
936
fe16107d
C
937Tue Feb 6 14:04:49 1996 J.T. Conklin <jtc@rtl.cygnus.com>
938
939 * configure.in (*-*-netbsd*): Set COREFILE to netbsd-core.c.
940 don't define TRAD_HEADER.
941 * configure: Rebuild.
942
943 * netbsd-core.c: New file, support for NetBSD core files.
944 * hosts/*nbsd.h: Removed.
945
f1783016
DE
946Tue Feb 6 11:47:49 1996 Doug Evans <dje@charmed.cygnus.com>
947
948 * reloc.c (BFD_RELOC_SPARC_[567]): New reloc types.
949 (BFD_RELOC_SPARC_LO7 reloc type): Deleted.
950 * libbfd.h, bfd-in2.h: Regenerated.
951 * elf32-sparc.c (_bfd_sparc_elf_reloc_type_lookup): Renamed from
952 bfd_elf32_bfd_reloc_type_lookup.
953 (reloc_type{,_names}): Deleted.
954 (_bfd_sparc_elf_howto_table): Renamed from elf_sparc_howto_table.
955 Add sparc64 relocs.
956 (sparc_reloc_map): Add sparc64 relocs.
957 (sparc_elf_notsupported_reloc): New static function.
958 (sparc_elf_wdisp16_reloc): New static function.
959 (elf32_sparc_check_relocs): Handle R_SPARC_WDISP{16,19}.
960 (elf32_sparc_relocate_section): Likewise.
961 (bfd_elf32_bfd_reloc_type_lookup): Define.
962 * elf64-sparc.c (sparc64_elf_wdisp16_reloc): Deleted.
963 (reloc_type{,_names}): Deleted.
964 (elf_sparc_howto_table): Deleted.
965 (sparc_reloc_map): Deleted.
966 (_bfd_sparc_elf_howto_table): Renamed from elf_sparc_howto_table.
967 (bfd_elf64_bfd_reloc_type_lookup): Change from function to #define.
968
48fd00b6
ILT
969Tue Feb 6 12:12:22 1996 Ian Lance Taylor <ian@cygnus.com>
970
2300e217
ILT
971 * configure.host: Make SHLIB_CFLAGS include $(PICFLAG) on a
972 *-*-hpux* host.
973
48fd00b6
ILT
974 * Makefile.in (program_transform_name): New variable.
975 (install): Transform library name before installing it.
976
8adca582
ILT
977Mon Feb 5 10:38:27 1996 Ian Lance Taylor <ian@cygnus.com>
978
cbe75cb6
ILT
979 * archures.c (bfd_mach_i960_hx): Define.
980 * bfd-in2.h: Rebuild.
981 * cpu-i960.c (scan_960_mach): Accept machine "hx".
982 (MATRIX): Expand entries for HX.
983 (arch_info_struct): Add i960:hx entry.
984 * bout.c (b_out_set_arch_mach): Handle bfd_mach_i960_hx.
985 * coffcode.h (coff_set_arch_mach_hook): Handle F_I960HX.
986 (coff_set_flags): Handle bfd_mach_i960_hx.
987
44f795f7
ILT
988 Support for building as a shared library, based on patches from
989 Alan Modra <alan@spri.levels.unisa.edu.au>:
990 * configure.in: Add AC_ARG_ENABLE for shared and commonbfdlib.
991 New substitutions: ALLLIBS, PICFLAG, SHLIB, SHLIB_CC,
992 SHLIB_CFLAGS, COMMON_SHLIB, PICLIST, SHLINK.
993 * configure: Rebuild.
994 * configure.host: If --enable-shared, adjust shared library stuff
995 based on the host. If the host is SunOS, and the linker supports
996 -rpath, set HLDFLAGS to use it.
997 * Makefile.in (ALLLIBS): New variable.
998 (PICFLAG, SHLIB, SHLIB_CC, SHLIB_CFLAGS): New variables.
999 (COMMON_SHLIB, SHLINK): New variables.
1000 (.c.o): If PICFLAG is set, compile twice, once PIC, once normal.
1001 (STAGESTUFF): Remove variable.
1002 (all): Depend upon $(ALLLIBS) and @PICLIST@ rather than
1003 $(TARGETLIB).
1004 (stamp-ofiles): New target, like old ofiles target, but build
1005 using a temporary file and move-if-change, and touch stamp-ofiles
1006 when done.
1007 (ofiles): Just depend upon stamp-ofiles.
1008 (stamp-piclist, piclist): New targets.
1009 ($(SHLIB), $(SHLINK)): New targets.
1010 (targets.o, archures.o): Build twice if PICFLAG is set.
1011 (do_mostlyclean): Remove pic/*.o.
1012 (do_clean): Remove stamp-ofiles, $(SHLIB), $(SHLINK), piclist, and
1013 stamp-piclist.
1014 (do_distclean): Remove pic and stamp-picdir.
1015 (install): Install shared libraries.
1016 ($(OFILES)): Depend upon stamp-picdir.
1017 (stamp-picdir): New target.
1018
cb62d2bc
ILT
1019 * libcoff-in.h: Add comment reminding people that libcoff.h is a
1020 generated file.
1021 * libcoff.h: Rebuild.
1022
8adca582
ILT
1023 * elflink.h (elf_adjust_dynamic_symbol): Don't try to get the
1024 flavour of a section with no owner.
1025
1026 * elf32-mips.c (mips_elf_create_dynamic_sections): Clear
1027 ELF_LINK_NON_ELF flag.
1028 (mips_elf_create_got_section): Likewise.
1029
1030 * elf.c: Revert last change, since it breaks dynamic linking.
1031 * elf-bfd.h (struct elf_backend_data): Remove want_hdr_in_seg
1032 field.
1033 * elf32-mips.c (elf_backend_want_hdr_in_seg): Don't define.
1034 * elfxx-target.h (elf_backend_want_hdr_in_seg): Don't define.
1035 (elfNN_bed): Don't initialize want_hdr_in_seg field.
1036
1037Sun Feb 4 20:45:13 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1038
1039 * elf.c (assign_file_positions_for_segments): If the backend does
1040 not want the elf header or the program headers in the address
1041 space, do not include them in the calculations.
1042
1043 * elf32-ppc.c (ppc_elf_additional_program_headers): New hook
1044 function to determine if we need additional program headers.
1045 (ppc_elf_modify_segment_map): Define as a NOP function for now.
1046 (ppc_elf_create_linker_section): .sdata2 is a read-only section.
1047
0f09ddd4
ILT
1048Sat Feb 3 23:00:03 1996 Ian Lance Taylor <ian@cygnus.com>
1049
1050 * coffcode.h: Move today's libcoff.h change into coffcode.h.
1051
b48f10ba
FF
1052Sat Feb 3 15:43:44 1996 Fred Fish <fnf@cygnus.com>
1053
0f09ddd4
ILT
1054 * libcoff.h (bfd_coff_link_add_one_symbol): Combine macro args
1055 back into one line. Some compilers (sunos 4.1.3 for example)
1056 won't accept args split across more than one line.
b48f10ba 1057
50761d3b
SC
1058Fri Feb 2 11:42:15 1996 Steve Chamberlain <sac@slash.cygnus.com>
1059
1060 * aclocal.m4 (BFD_BINARY_FOPEN): Understand cygwin32.
1061 * configure: Regenerate.
1062
9dce8260
JL
1063Fri Feb 2 12:12:16 1996 Jeffrey A Law (law@cygnus.com)
1064
1065 * elf32-hppa.c (elf32_hppa_backend_symbol_table_processing): Don't
1066 try to do arithmetic on a void *, cast it to a unsigned char * first.
1067
6c55897c
ILT
1068Thu Feb 1 16:04:06 1996 Ian Lance Taylor <ian@cygnus.com>
1069
869b7d80
ILT
1070 * elf-bfd.h (ELF_LINK_NON_ELF): Define.
1071 * elf.c (_bfd_elf_link_hash_newfunc): Set elf_link_hash_flags to
1072 ELF_LINK_NON_ELF.
1073 * elflink.h (elf_link_add_object_symbols): Reset ELF_LINK_NON_ELF
1074 flag for a newly defined symbol.
1075 (NAME(bfd_elf,record_link_assignment)): Likewise.
1076 (elf_adjust_dynamic_symbol): If ELF_LINK_NON_ELF is set, try to
1077 set the DEF or REF_REGULAR flags correctly.
1078
6f6956c6
ILT
1079 * Makefile.in (bfd-in2.h): Make bfd.h, not protos, in docdir.
1080 (libbfd.h, libcoff.h): Corresponding change.
1081
6c55897c
ILT
1082 * elf32-i386.c (elf_i386_check_relocs): Don't record a symbol with
1083 a PLT32 reloc as dynamic.
1084 (elf_i386_adjust_dynamic_symbol): If a symbol with a PLT32 reloc
1085 is not referenced by a dynamic object, and we are not making a
1086 shared object, then don't make a PLT entry. If we do make a PLT
1087 entry, make sure the symbol has been recorded as dynamic.
1088
b06136f2
SC
1089Wed Jan 31 17:23:32 1996 Steve Chamberlain <sac@slash.cygnus.com>
1090
1091 * coff-i386.c (coff_i386_reloc_type_lookup): Add BFD_RELOC_32_PCREL.
1092 * config.bfd (i[345]86-*-win32): Becomes i[345]86-*-cygwin32.
1093 (powerpcle-*-cygwin32): New.
1094 * peicode.h (add_data_entry): Get address from vma.
1095
5c867ecd
MM
1096Wed Jan 31 16:23:57 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1097
1098 * elflink.c (_bfd_elf_create_linker_section): If the symbol
1099 attached to the section has already been created as an undefined
1100 symbol, treat it as if it hasn't been created yet.
1101
28c16b55
ILT
1102Wed Jan 31 16:16:53 1996 Ian Lance Taylor <ian@cygnus.com>
1103
1104 * elflink.h (elf_bfd_final_link): Don't output initial dummy
1105 symbol or section symbols if stripping all symbols and this is not
1106 a relocateable link. Don't output the symbol string table if
1107 there are no symbols.
1108 (elf_link_flush_output_syms): Don't do anything if there are no
1109 symbols to flush.
1110
d19df9b5
ILT
1111Wed Jan 31 12:55:49 1996 Richard Henderson <rth@tamu.edu>
1112
1113 * coff-aux.c: New file.
1114 * hosts/m68kaux.h: New file.
1115 * config.bfd (m68*-apple-aux*): New target.
1116 * configure.in (m68*-apple-aux*): New native host.
1117 (m68kaux_coff_vec): New vector.
1118 * configure: Rebuild.
1119 * targets.c (m68kaux_coff_vec): Declare.
1120 * coffcode.h (bfd_coff_backend_data): Add field
1121 _bfd_coff_link_add_one_symbol.
1122 (bfd_coff_link_add_one_symbol): Define.
1123 (compare_arelent_ptr): New static function if TARG_AUX.
1124 (coff_write_relocs): If TARG_AUX, sort the relocs.
1125 (coff_write_object_contents): Set A/UX aouthdr magic number.
1126 (coff_link_add_one_symbol): Define if not defined.
1127 (bfd_coff_std_swap_table): Initialize new field.
1128 * libcoff.h: Rebuild.
1129 * cofflink.c (coff_link_add_symbols): Call
1130 bfd_coff_link_add_one_symbol rather than
1131 _bfd_generic_link_add_one_symbol.
1132 * coff-m68k.c (COFF_PAGE_SIZE): Don't define if already defined.
1133 * coff-alpha.c (alpha_ecoff_backend_data): Initialize new field.
1134 * coff-mips.c (mips_ecoff_backend_data): Likewise.
1135 * Makefile.in: Rebuild dependencies.
1136 (BFD32_BACKENDS): Add coff-aux.o.
1137 (BFD32_BACKENDS_CFILES): Add coff-aux.c.
1138
a796aafd
ILT
1139Wed Jan 31 11:37:46 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1140
1141 * elf32-m68k.c (elf_m68k_relocate_section): Fix R_68K_GOT*
1142 relocation; ignore addend with R_68K_{GOT,PLT}*O relocation.
1143
a8763553
ILT
1144Tue Jan 30 12:09:04 1996 Ian Lance Taylor <ian@cygnus.com>
1145
66761e59
ILT
1146 * Makefile.in (do_maintainer_clean): Remove $(srcdir)/bfd-in2.h,
1147 $(srcdir)/libbfd.h and $(srcdir)/libcoff.h.
1148 (maintainer-clean): Warn about deleting special files.
1149 (bfd-in2.h, libbfd.h, libcoff.h): New targets.
1150
cf5138e3
ILT
1151 * elf32-hppa.c (elf32_hppa_relocate_section): Handle indirect and
1152 warning symbols correctly.
1153 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1154 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1155 * elf32-mips.c (mips_elf_relocate_section): Likewise.
1156 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1157 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1158 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1159
a8763553
ILT
1160 * syms.c (_bfd_stab_section_find_nearest_line): Add casts to avoid
1161 warnings.
1162
bdd2e7f1
KK
1163Mon Jan 29 14:27:24 1996 Kim Knuttila <krk@cygnus.com>
1164
1165 * libcoff-in.h: aligned newly exported names with bfd naming
1166 conventions. Removed an erroneous define of POWERPC_LE_PE.
1167 * libcoff.h: Rebuild.
1168 * cofflink.c, coff-ppc.c: the above function name changes
1169
d2bb6c79
ILT
1170Mon Jan 29 13:06:28 1996 Ian Lance Taylor <ian@cygnus.com>
1171
eb5bc1f3
ILT
1172 From Basim Kadhim <kadhim@spock.cs.colorado.edu>:
1173 * ecoff.c (struct extsym_info): Define.
1174 (_bfd_ecoff_bfd_final_link): Pass a pointer to struct extsym_info
1175 to ecoff_link_write_external.
1176 (ecoff_link_write_external): Accept a struct extsym_info pointer.
1177 Strip symbols when appropriate.
1178
052b35d2
ILT
1179 Based on patches from Ronald F. Guilmette <rfg@monkeys.com>:
1180 * syms.c (BSF_OBJECT): Define.
1181 (bfd_print_symbol_vandf): Print 'O' for BSF_OBJECT.
1182 * bfd-in2.h: Rebuild.
1183 * elfcode.h (elf_slurp_symbol_table): Set BSF_OBJECT for an
1184 STT_OBJECT symbol.
1185 * elf.c (swap_out_syms): Only set type to STT_OBJECT if BSF_OBJECT
1186 is set.
1187
53787b23
ILT
1188 * elf32-i386.c (elf_i386_relocate_section): If -Bsymbolic, when
1189 copying relocs into a shared object, treat a defined global symbol
1190 as a local symbol.
1191 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1192 * elf32-mips.c (mips_elf_relocate_section): Likewise.
1193 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1194
d2bb6c79
ILT
1195 * elflink.h (elf_link_add_object_symbols): Only set weakdef to a
1196 real defined symbol, not to a weak defined symbol.
1197
13d1a4dd
KK
1198Mon Jan 29 11:34:36 1996 Kim Knuttila <krk@cygnus.com>
1199
1200 * cofflink.c: removed the POWERPC_LE_PE hack, promoted some types
1201 and made a few static functions externs.
1202
1203 * coff-ppc.c (ppc_bfd_coff_final_link): new function, replaces the
1204 POWERPC_LE_PE hack in cofflink.
1205
1206 * libcoff-in.h: promoted the following from cofflink.c to allow
1207 _bfd_coff_final_link to be overridden - STRING_SIZE_SIZE,
1208 coff_debug_merge_element, struct coff_debug_merge_type,
1209 coff_debug_merge_hash_entry, coff_debug_merge_hash_table,
1210 coff_debug_merge_hash_table_init, coff_debug_merge_hash_table_free,
1211 coff_debug_merge_hash_lookup, coff_link_section_info,
1212 coff_final_link_info, coff_debug_merge_hash_newfunc,
1213 coff_write_global_sym, coff_link_input_bfd, coff_reloc_link_order.
1214
1215 * libcoff.h: re-gen'd
1216
86aac8ea
ILT
1217Fri Jan 26 18:33:35 1996 Ian Lance Taylor <ian@cygnus.com>
1218
1219 * syms.c: Include "bfdlink.h".
1220 (struct stab_find_info): Define.
1221 (_bfd_stab_section_find_nearest_line): New function.
1222 * libbfd-in.h (_bfd_stab_section_find_nearest_line): Declare.
1223 * libbfd.h: Rebuild.
1224 * elf-bfd.h (struct elf_obj_tdata): Add line_info field.
1225 * elf.c (_bfd_elf_find_nearest_line): Try calling
1226 _bfd_stab_section_find_nearest_line before searching the ELF
1227 symbol table. Find the closest STT_FUNC symbol, not the last one.
1228 * libcoff-in.h (coff_data_type): Add line_info field.
bdd2e7f1 1229 * libcoff.h: Rebuild.
86aac8ea
ILT
1230 * coffgen.c (coff_find_nearest_line): Try calling
1231 _bfd_stab_section_find_nearest_line before searching the COFF
1232 symbol table.
1233 * Makefile.in: Rebuild dependencies.
1234
1235Fri Jan 26 16:11:19 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1236
1237 * elf32-ppc.c (R_PPC_EMB_SDA21 relocations): Make relocation size
1238 4 bytes, so we get the correct value when updating the register
1239 field in little endian mode.
1240
43d36aad
ILT
1241Thu Jan 25 12:14:16 1996 Ian Lance Taylor <ian@cygnus.com>
1242
f0a97077
ILT
1243 * libcoff-in.h (struct xcoff_tdata): Remove toc_section and
1244 entry_section fields. Add sntoc and snentry fields.
1245 * libcoff.h: Rebuild.
1246 * coffcode.h (coff_mkobject_hook): Initialize sntoc and snentry,
1247 not toc_section and entry_section (the COFF file does not have any
1248 sections at this point).
1249 (coff_write_object_contents): Set o_snentry and o_sntoc from
1250 snentry and sntoc rather than entry_section and toc_section.
1251 * coff-rs6000.c (xcoff_copy_private_bfd_data): Copy sntoc and
1252 snentry, not toc_section and entry_section.
1253 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Don't set
1254 entry_section from hentry.
1255 (xcoff_link_input_bfd): If a defined symbol has XCOFF_ENTRY set,
ea2504d5 1256 set snenty.
f0a97077
ILT
1257 (xcoff_link_input_bfd): Set sntoc, not toc_section.
1258 (xcoff_write_global_symbol): Get toc_section from sntoc, rather
1259 than using toc_section directly.
1260
9b4598d0
ILT
1261 * archures.c: Add missing `.' in enum bfd_architecture.
1262 * bfd-in2.h: Rebuild.
1263
43d36aad
ILT
1264 * config.bfd (i[345]86-*-sco*elf*): Use bfd_elf32_i386_vec. From
1265 Robert Lipe <robertl@arnet.com>.
1266
eb82bc60
MM
1267Thu Jan 25 12:08:51 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1268
1269 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Add .rela.sdata{,2}
1270 to sections we allocate. Use bfd_zalloc to allocate initialial
1271 sections, not bfd_alloc.
1272 (ppc_elf_check_relocs): Remove BFD_ASSERTs for !shared from
1273 SDA{,2}I16 relocations.
1274 (ppc_elf_add_symbol_hook): Use the value of -G nn to determine
1275 whether to put something in .sbss or not.
1276 (ppc_elf_relocate_section): Add support for more relocations. Add
c1e65e24
MM
1277 in sec->output_offset where appropriate. Make error messages
1278 include the symbol name.
eb82bc60
MM
1279
1280 * elflink.c (_bfd_elf_create_linker_section): Lookup symbol before
1281 trying to add it to the symbol table, so _GLOBAL_OFFSET_TABLE_
1282 doesn't get redefined messages if -shared.
1283
1284 * elflink.h (elf_create_pointer_linker_section) Only bump RELA
1285 section if the rel_section field has been set up.
1286
9d621c7d
MM
1287Wed Jan 24 20:40:26 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1288
1289 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo in eabi
1290 relocations.
1291
75c9ddc9
DE
1292Wed Jan 24 10:38:34 1996 Doug Evans <dje@charmed.cygnus.com>
1293
1294 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Delete checking
1295 of flags, only flags used are controlled by mach number. Bump up
1296 output file mach number to highest of input file mach numbers.
1297 (elf32_sparc_object_p): Watch for EF_SPARC_SUN_US1.
1298 (elf32_sparc_final_write_processing): Set EF_SPARC_SUN_US1 if v8plusa.
1299
72c513bc
DE
1300 * config.bfd (sparc64-*-{sysv4*,solaris2*}): Comment out
1301 bfd_elf64_sparc_vec support.
1302
3cbe19d2
MM
1303Tue Jan 23 14:33:05 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1304
1305 * elf32-ppc.c (ppc_elf_copy_private_bfd_data): Don't complain if
1306 the embedded bit is set on some objects and not on others. Just
1307 or it together.
d8fd85ad
MM
1308 (ppc_elf_relocate_section): Implement R_PPC_EMB_{SDA21,RELSDA}
1309 relocations.
3cbe19d2 1310
5eb83ede
ILT
1311Tue Jan 23 14:22:45 1996 Ian Lance Taylor <ian@cygnus.com>
1312
4a3d3b42
ILT
1313 * coffcode.h (coff_new_section_hook): Don't try to align the
1314 .stabstr section.
1315
5eb83ede
ILT
1316 * coffcode.h (coff_set_section_contents): Fix the handling of the
1317 .lib section to work even if the entire section contents are
1318 written at once. From Gvran Uddeborg <gvran@uddeborg.pp.se> and
1319 Robert Lipe <robertl@arnet.com>.
1320
05f927dd
MM
1321Mon Jan 22 18:45:51 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1322
1323 * elflink.h (elf_finish_pointer_linker_section): Don't allocate
1324 memory here for contents.
1325
1326 * elf32-ppc.c (ppc_elf_relocate_section): Bump up _SDA_BASE_ and
1327 _SDA2_BASE_ by 32768.
1328 (ppc_elf_size_dynamic_sections): #if out PLT code which we haven't
1329 started using. Allocate contents for .sdata and .sdata2 sections
1330 also.
1331 (ppc_elf_check_relocs): Use bfd_get_section_name in debug message,
1332 rather than _name.
1333 (ppc_elf_finish_dynamic_symbol): Remove code that attempted to
1334 size _SDA{,2}_BASE_.
1335 (ppc_elf_relocate_section): Change how sdata{,2} relocations are
1336 done.
1337
5bc513b4
DE
1338Mon Jan 22 08:52:04 1996 Doug Evans <dje@charmed.cygnus.com>
1339
5a5bac64
DE
1340 * elflink.h (elf_finish_pointer_linker_section): Fix typo.
1341
5bc513b4 1342 * archures.c (bfd_mach_sparc_v9): Renamed from bfd_mach_sparc64.
5bc513b4 1343 (bfd_mach_sparc_{v8plus,v8plusa}): Define.
5bc513b4 1344 (bfd_mach_sparc_v9a): Define.
049f3d4c 1345 (bfd_mach_sparc_v9_p): Define.
5bc513b4
DE
1346 * bfd-in2.h: Regenerated.
1347 * aoutx.h (aout,machine_type): bfd_mach_sparc64 renamed to
1348 bfd_mach_sparc_v9.
d3366d23 1349 * elf64-sparc.c (sparc64_elf_object_p): Likewise.
5bc513b4
DE
1350 * config.bfd (sparc64-*-sysv4*,sparc64-*-solaris2*): Set targ_defvec
1351 to bfd_elf32_sparc_vec.
1352 * cpu-sparc.c (arch_info_struct): Renamed from sparc_arch_info.
5bc513b4 1353 Add v8plus{,a} support.
5bc513b4 1354 Add v9a support.
768b8ade 1355 (sparc_compatible): New function.
5bc513b4 1356 * elf32-sparc.h: #include "elf/sparc.h".
75c9ddc9 1357 (elf32_sparc_merge_private_bfd_data, elf32_sparc_object_p,
5bc513b4 1358 elf32_sparc_final_write_processing): New functions.
75c9ddc9 1359 (bfd_elf32_bfd_merge_private_bfd_data, elf_backend_object_p,
5bc513b4 1360 elf_backend_final_write_processing): Define.
5bc513b4 1361
3b3753b8
MM
1362Mon Jan 22 11:21:51 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1363
1364 * elf-bfd.h (struct elf_link_hash_entry): Add
1365 linker_section_pointer field.
1366 (enum elf_linker_section_enum): Enumeration for new way of
1367 creating linker dynamic sections and symbols.
1368 (elf_linker_section{,_pointers}): New structures for creating
1369 dynamic sections and symbols.
1370 (elf_obj_tdata): Add linker_section_pointers and linker_section
1371 fields.
1372 (elf_local_ptr_offsets,elf_linker_section): New accessor macros.
1373 (_bfd_elf_create_linker_section): New declarations.
1374 (_bfd_elf_find_pointer_linker_section): Ditto.
1375 (bfd_elf{32,64}_{create,finish}_pointer_linker_section): Ditto.
1376 (_bfd_elf_make_linker_section_rela): Ditto.
1377
1378 * elf.c (_bfd_elf_link_hash_newfunc): Initialize new fields.
1379
1380 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Delete.
1381 (ppc_elf_create_linker_section): New function to create the
1382 sections .got, .sdata, and .sdata2.
1383 (ppc_elf_size_dynamic_sections): Zap .rela.{sdata,sdata2} if
1384 needed.
1385 (ppc_elf_check_relocs): Support more of the eabi relocations.
1386 (ppc_elf_relocate_section): Ditto.
1387 (ppc_elf_finish_dynamic_symbols): Adjust _SDA{,2}_BASE_ by 32768
1388 if the .sdata{,2} + .sbss{,2} section size is > 32k.
1389
1390 * elflink.h (elf_create_pointer_linker_section): New function to
1391 create initialized pointers in dynamic linker sections.
1392 (elf_finish_pointer_linker_section): Actually intialize the
1393 pointers created above.
1394
1395 * elfcode.h (bfd_elf{32,64}_create_pointer_linker_section): New
1396 macros to provide both 32 and 64 bit versions of
1397 elf_create_pointer_linker_section.
1398 (bfd_elf{32,64}_finish_pointer_linker_section): New macros to
1399 provide both 32 and 64 bit versions of
1400 elf_finish_pointer_linker_section.
1401
1402 * elflink.c (_bfd_elf_create_linker_section): New function to
1403 create a linker section.
1404 (_bfd_elf_find_pointer_linker_section): Find a unique pointer to a
1405 given address in the linker pointer offsets created for a given
1406 symbol.
1407 (_bfd_elf_make_linker_section_rela): Make a RELA section
1408 corresponding to the generated linker section.
1409
6b3eb07e
DE
1410Sat Jan 20 08:36:10 1996 Doug Evans <dje@canuck.cygnus.com>
1411
1412 * elf32-sparc.c (ELF_MACHINE_ALT1): Define.
1413
e7894f6b
KK
1414Thu Jan 18 18:25:34 1996 Kim Knuttila <krk@cygnus.com>
1415
1416 * coff-ppc.c (coff_ppc_relocate_section): changed TOCDEFN relocs.
1417 (coff_ppc_relocate_section): Handle special values for gcc built dlls.
1418 (dump_toc): fix diagnosing code to identify out-of-toc-bounds entries.
1419 Also begin the toc at 4 as an eye catcher ('31313131' marks the first
1420 toc entry in an objdump) for now.
1421 (ppc_do_last, ppc_get_last): New function - needed to save processing
1422 the toc owner to the end.
1423 (ppc_coff_swap_sym_in_hook): Removed an incorrect hack for doing the
1424 toc owner last.
1425
1426 * cofflink.c (_bfd_coff_final_link): Added a new hack to keep the
1427 toc owner from being done till last. Must define POWERPC_LE_PC
1428 to enable it.
1429
1430 * coffcode.h (coff_set_alignment_hook): alignment setting for .stab
1431
1432 * peicode.h (coff_swap_scnhdr_out): set section flags for stab/str
1433 to INFO.
1434 (coff_swap_aouthdr_out): Removed a non-working hack for computing the
1435 SizeOfImage for PowerPC. Ignore the size of the .junk section.
1436
80b99ca0
ILT
1437Thu Jan 18 17:42:12 1996 Ian Lance Taylor <ian@cygnus.com>
1438
1439 * elfcore.h: Include <signal.h> before <sys/procfs.h>.
1440
df96df4c
ILT
1441Wed Jan 17 12:40:14 1996 Ian Lance Taylor <ian@cygnus.com>
1442
1443 * cpu-powerpc.c (arch_info_struct): Change last entry to not point
1444 back to first.
1445 (bfd_powerpc_arch): Point at first entry in arch_info_struct.
1446
d49ddb85
ILT
1447Tue Jan 16 15:10:49 1996 Ian Lance Taylor <ian@cygnus.com>
1448
1449 * elf.c (assign_file_positions_for_segments): Don't increment file
1450 offset for a segment which contains no loadable sections.
1451
4500a112
MM
1452Mon Jan 15 17:46:27 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1453
1454 * reloc.c: Add new PowerPC relocations.
1455 * {bfd-in2,libbfd}.h: Regenerate.
1456
1457 * elf32-ppc.c (ppc_elf_howto_raw): Add more PPC relocations.
1458 (ppc_elf_reloc_type_lookup): Lookup new relocations.
1459
252239f8
ILT
1460Mon Jan 15 14:29:44 1996 Ian Lance Taylor <ian@cygnus.com>
1461
20ab764e
ILT
1462 * aoutx.h (howto_table_ext): Fix RELOC_BASE10 and RELOC_BASE22
1463 entries.
1464
0a4ffa2d
ILT
1465 * sunos.c (sunos_scan_ext_relocs): Don't fail assert if
1466 info->shared.
1467
45ca3195
ILT
1468 * coffgen.c (coff_find_nearest_line): Don't try to cache
1469 information in sections that are not owned by a BFD. From Richard
1470 Henderson <richard@atheist.tamu.edu>.
1471
252239f8
ILT
1472 * elf32-mips.c: Numerous changes to dynamic linking code, mostly
1473 from Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>.
1474 * elflink.h (elf_link_output_extsym): Remove special check for
1475 _rld_new_interface.
1476
1477 * ecoffswap.h: Add prototypes for static functions.
1478
bd2d10c0
MM
1479Sun Jan 14 21:36:08 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1480
1481 * elf32-ppc.c (ppc_elf_{unsupported,std}_reloc): Remove functions.
1482 (ppc_elf_howto_raw): Remove ppc_elf_{unsupported,std}_reloc
1483 references.
1484 (ppc_elf_relocate_section): No longer allow .sdata/.sbss sections
1485 to satisfy a TOC16 relocation. Rewrite unsupported relocation
1486 support. Begin support for R_PPC_SDA{2,}REL.
1487
1c3a295b
MM
1488Sat Jan 13 09:36:52 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1489
1490 * elf32-ppc.c (ppc_elf_create_dynamic_sections): New function to
1491 create the .got and .got.neg sections.
1492 (ppc_elf_size_dynamic_sections): Call it.
1493 (ppc_elf_check_relocs): Call it.
1494 (ppc_elf_size_dynamic_sections): Support .got.neg, just like .got.
1495 (ppc_elf_check_relocs): Add error messages for relocations we
1496 don't yet support. Do not include R_PPC_SDAREL16 like a GOT
1497 relocation.
1498
57081126
MM
1499Fri Jan 12 15:27:59 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1500
1501 * elf32-ppc.c (ppc_elf_fake_sections): Define, and handle the new
1502 section flags for V.4 and eabi.
1503
3c38b3df
ILT
1504Fri Jan 12 13:59:16 1996 Ian Lance Taylor <ian@cygnus.com>
1505
14899eb7
ILT
1506 * elf.c (assign_file_positions_for_segments): If a segment
1507 contains no sections, don't mark it as readable.
1508
98bb57ad
ILT
1509 * elf-bfd.h (_bfd_elf_section_from_bfd_section): Declare.
1510 * elfcode.h (_bfd_elf_section_from_bfd_section): Don't declare.
1511
02fcd126
ILT
1512 * elf.c (_bfd_elf_print_private_bfd_data): Dump contents of
1513 dynamic section, if there is one.
1514 * elf-bfd.h (struct elf_size_info): Add swap_dyn_in field.
1515 (bfd_elf32_swap_dyn_in): Change type of second parameter to PTR.
1516 (bfd_elf64_swap_dyn_in): Likewise.
1517 * elfcode.h (elf_swap_dyn_in): Change type of second parameter to
1518 PTR.
1519 (NAME(_bfd_elf,size_info)): Initialize swap_dyn_in field.
1520
3c38b3df
ILT
1521 * elf32-i386.c (elf_i386_size_dynamic_sections): Don't create a
1522 DT_TEXTREL entry because of .rel.plt. From Martin Pirker
1523 <pirker@eiunix.tuwien.ac.at>.
1524
83f4323e
MM
1525Thu Jan 11 17:06:14 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1526
1527 * section.c (SEC_{EXCLUDE,SORT_ENTRIES}): New section flags for
1528 PowerPC V.4 and eabi.
1529 * bfd-in2.h: Regenerate.
1530 * libfd.h: Regenerate.
1531
1532 * elfxx-target.h (TARGET_{BIG,LITTLE}_SYM): Add new flags.
1533
1534 * elf32-ppc.c (ppc_elf_section_from_shdr): Support SHT_ORDERED
1535 section type and SHF_EXCLUDE section flag, turning them into the
1536 appropriate bfd section flag.
1537
a0271667
ILT
1538Thu Jan 11 11:23:30 1996 Ian Lance Taylor <ian@cygnus.com>
1539
c9746fb6
ILT
1540 * xcofflink.c (xcoff_link_add_symbols): Create the special
1541 sections if we see a DYNAMIC object, in case that is the only
1542 XCOFF input object we see.
1543
5b3b9ff6
ILT
1544 * elf32-mips.c: Extensive changes for a start at dynamic linking
1545 support, from Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>.
1546
1547 * elf-bfd.h (struct elf_backend_data): Add type_change_ok field.
1548 (struct elf_backend_data): Remove
1549 elf_backend_create_program_headers field. Add
1550 elf_backend_additional_program_headers and
1551 elf_backend_modify_segment_map fields.
1552 * elfxx-target.h (elf_backend_type_change_ok): Define if not
1553 defined.
1554 (elf_backend_additional_program_headers): Likewise.
1555 (elf_backend_modify_segment_map): Likewise.
1556 (elf_backend_create_program_headers): Don't define.
1557 (elfNN_bed): Change to account for field changes.
1558 * elf.c (assign_file_positions_for_segments): Call new
1559 modify_segment_map backend function. Don't call old
1560 create_program_headers backend function.
1561 (get_program_header_size): Call additional_program_headers rather
1562 than create_program_headers.
1563 * elflink.h (elf_link_add_object_symbols): Initialize
1564 type_change_ok from new backend field.
1565 (elf_link_output_extsym): Don't warn if _rld_new_interface is
1566 defined.
1567 (elf_reloc_link_order): Treat a reloc against a defined symbol as
1568 a reloc against the appropriate section.
1569
761f377f
ILT
1570 * elf-bfd.h (struct bfd_elf_section_data): Add tdata field.
1571 (struct elf_obj_tdata): Rename ppc_flags_init field to flags_init.
1572 (elf_flags_init): Rename from elf_ppc_flags_init.
1573 * elf32-ppc.c (ppc_elf_set_private_flags): Use elf_flags_init, not
1574 elf_ppc_flags_init.
1575 (ppc_elf_copy_private_bfd_data): Likewise.
1576 (ppc_elf_merge_private_bfd_data): Likewise.
1577
a0271667
ILT
1578 * elf32-m68k.c (howto_table): Change src_mask to 0 for all
1579 relocation entries.
1580
64d5f5d0
ILT
1581Tue Jan 9 15:22:53 1996 David Mosberger-Tang <davidm@azstarnet.com>
1582
1583 * coff-alpha.c (alpha_relocate_section): During final link, allow
1584 output .lita section to be bigger than 64k by adjusting gp value
1585 on a per-input section basis.
1586 * libecoff.h (struct ecoff_tdata): Add issued_multiple_gp_warning
1587 field.
1588 (struct ecoff_section_tdata): Add gp field.
1589
c40d9c77
ILT
1590Tue Jan 9 12:00:36 1996 Ian Lance Taylor <ian@cygnus.com>
1591
64d5f5d0
ILT
1592 Handle Alpha ECOFF changes in OSF/1 3.2.
1593 * libecoff.h (struct ecoff_backend_data): Add get_elt_at_filepos
1594 field.
1595 * coff-alpha.c: Include "aout/ar.h".
1596 (alpha_ecoff_get_relocated_section_contents): Don't require an
1597 ALPHA_R_IGNORE reloc after an ALPHA_R_GPDISP reloc, since OSF/1
1598 3.2 doesn't generate one.
1599 (alpha_relocate_section): Likewise.
1600 (alpha_ecoff_slurp_armap): Define.
1601 (alpha_ecoff_slurp_extended_name_table): Define.
1602 (alpha_ecoff_construct_extended_name_table): Define.
1603 (alpha_ecoff_truncate_arname): Define.
1604 (alpha_ecoff_write_armap): Define.
1605 (alpha_ecoff_generic_stat_arch_elt): Define.
1606 (alpha_ecoff_update_armap_timestamp): Define.
1607 (ARFZMAG): Define.
1608 (alpha_ecoff_read_ar_hdr): New static function.
1609 (alpha_ecoff_get_elt_at_filepos): New static function.
1610 (alpha_ecoff_openr_next_archived_file): New static function.
1611 (alpha_ecoff_get_elt_at_index): New static function.
1612 (alpha_ecoff_backend_data): Initialize get_elt_at_filepos field.
1613 (ecoffalpha_little_vec): Change BFD_JUMP_TABLE_ARCHIVE from
1614 _bfd_ecoff to alpha_ecoff.
1615 * ecoff.c (ecoff_link_add_archive_symbols): Use get_elt_at_filepos
1616 field from backend structure, rather than always calling
1617 _bfd_get_elt_at_filepos.
1618 * coff-mips.c (mips_ecoff_backend_data): Initialize
1619 get_elt_at_filepos field.
1620 * archive.c (_bfd_generic_read_ar_hdr_mag): New function, copied
1621 from _bfd_generic_read_ar_hdr with minor changes.
1622 (_bfd_generic_read_ar_hdr): Use _bfd_generic_read_ar_hdr_mag.
1623 * libbfd-in.h (_bfd_generic_read_ar_hdr_mag): Declare.
1624 * libbfd.h: Rebuild.
1625
1626 * bfd-in.h (BFD_IN_MEMORY): Define.
1627 * libbfd-in.h (struct bfd_in_memory): Define.
1628 * libbfd.c (bfd_read): Handle BFD_IN_MEMORY flag.
1629 (bfd_get_file_window): Don't try to map a BFD_IN_MEMORY file.
1630 (bfd_write, bfd_stat): Abort if BFD_IN_MEMORY is set.
1631 (bfd_tell, bfd_flush, bfd_seek): Handle BFD_IN_MEMORY flag.
1632 * bfd.c (struct _bfd): Change iostream field from char * to PTR.
1633 (bfd_get_size): Handle BFD_IN_MEMORY flag.
1634 * cache.c (bfd_cache_close): Ignore BFD_IN_MEMORY files.
1635 (bfd_open_file): Cast to PTR, not char *, when setting iostream.
1636 (bfd_cache_lookup_worker): Abort if BFD_IN_MEMORY is set.
1637 * opncls.c (bfd_fdopenr): Cast to PTR, not char *, when setting
1638 iostream.
1639 (bfd_openstreamr): Likewise.
1640 * aoutx.h (NAME(aout,some_aout_object_p)): Only fstat iostream if
1641 BFD_IN_MEMORY is not set.
1642 * riscix.c (riscix_some_aout_object_p): Likewise.
1643 * bfd-in2.h, libbfd.h: Rebuild.
1644
1645 * targets.c (bfd_target): Add _bfd_get_elt_at_index field.
1646 (BFD_JUMP_TABLE_ARCHIVE): Add _get_elt_at_index.
1647 (bfd_get_elt_at_index): Define.
1648 * archive.c (_bfd_generic_get_elt_at_index): Rename from
1649 bfd_get_elt_at_index. Change index parameter from int to
1650 symindex.
1651 * libbfd-in.h (_bfd_generic_get_elt_at_index): Declare.
1652 (_bfd_noarchive_get_elt_at_index): Define.
1653 (_bfd_archive_bsd_get_elt_at_index): Define.
1654 (_bfd_archive_coff_get_elt_at_index): Define.
1655 * bfd-in2.h, libbfd.h: Rebuild.
1656 * aout-target.h (MY_get_elt_at_index): Define if not defined.
1657 * coff-rs6000.c (xcoff_get_elt_at_index): Define.
1658 * ieee.c (ieee_get_elt_at_index): Define.
1659 * libecoff.h (_bfd_ecoff_get_elt_at_index): Define.
1660 * oasys.c (oasys_get_elt_at_index): Define.
1661 * som.c (som_get_elt_at_index): Define.
1662
c40d9c77
ILT
1663 * ecoff.c (_bfd_ecoff_find_nearest_line): Don't restrict line
1664 numbers to the .text section.
1665
efa77952
ILT
1666Mon Jan 8 17:00:57 1996 Ian Lance Taylor <ian@cygnus.com>
1667
1668 * ieee.c (ieee_write_debug_part): Change return type to boolean.
1669 If there is a SEC_DEBUGGING section, get the contents of the debug
1670 information part from it.
1671 (ieee_set_section_contents): Store the contents of a SEC_DEBUGGING
1672 section in memory.
1673 (ieee_write_object_contents): Check ieee_write_debug_part return.
1674
767f22d5
FF
1675Thu Jan 4 17:12:37 1996 Fred Fish <fnf@cygnus.com>
1676
1677 * config.bfd (i[345]86-*-freebsd*): Add target.
1678 * configure.in (i386freebsd_vec): Add vec.
1679 * configure: Regenerate.
1680 * Makefile.in (BFD32_BACKENDS): Add i386freebsd.o.
1681 (BFD32_BACKENDS_CFILES): Add i386freebsd.c.
1682 Rebuild dependencies..
1683 * freebsd.h: New file.
1684 * i386freebsd.c: New file.
1685 * targets.c (i386freebsd_vec): Declare.
1686 (bfd_target_vector): Add i386freebsd_vec.
1687 * i386linux.c (SEGMENT_SIZE): Define as TARGET_PAGE_SIZE
1688 * i386netbsd.c (SEGMENT_SIZE): Define as TARGET_PAGE_SIZE
1689
f8254a3c
ILT
1690Thu Jan 4 16:27:46 1996 Ian Lance Taylor <ian@cygnus.com>
1691
1692 * ieee.c (ieee_slurp_debug): New static function.
1693 (ieee_object_p): Call it.
1694 (ieee_slurp_section_data): Skip debugging sections.
1695 (ieee_get_reloc_upper_bound): Likewise.
1696 (ieee_get_section_contents): Likewise.
1697 (ieee_canonicalize_reloc): Likewise.
1698 (ieee_write_section_part): Likewise.
1699 (ieee_write_debug_part): Likewise.
1700 (ieee_write_data_part): Likewise.
1701 (init_for_output): Likewise.
1702
07a159db
MM
1703Wed Jan 3 19:42:47 1996 Michael Meissner <meissner@wogglebug.tiac.net>
1704
1705 * elf32-ppc.c (ppc_elf_relocate_section): Make @GOT relocations
1706 work.
1707 (ppc_elf_howto_raw): Just use bfd_elf_generic_reloc for all howto
1708 relocs, since ppc_elf_relocate_section handles the linker case.
1709 (ppc_elf_{addr16_ha,got16,toc16,brtaken}_reloc): Delete, no longer
1710 used.
1711 (ppc_elf_{addr16_ha,got16,toc16,brtaken}_inner): Merge these into
1712 ppc_elf_relocate_section since that is now the only caller.
1713 (ppc_elf_relocate_section): Ditto.
1714
d812945a
ILT
1715Wed Jan 3 15:11:30 1996 Ian Lance Taylor <ian@cygnus.com>
1716
1717 * coffcode.h (coff_write_object_contents): If we don't know the
1718 section of the entry point for an XCOFF executable, always set the
1719 entry address to -1.
1720
3a56d0b4
MM
1721Tue Jan 2 14:17:15 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1722
1723 * elf.c (bfd_section_from_shdr): Add support for note sections.
1724
c4406e50
ILT
1725Tue Jan 2 13:10:25 1996 Ian Lance Taylor <ian@cygnus.com>
1726
d812945a
ILT
1727 * bfd-in.h (struct _symbol_info): Add stab_type field.
1728 * bfd-in2.h: Rebuild.
1729 * aoutx.h (NAME(aout,get_symbol_info)): Set stab_type.
1730
c4406e50
ILT
1731 * elf32-ppc.c: Remove trailing newline from calls to
1732 _bfd_error_handler.
1733 (ppc_elf_merge_private_bfd_data): Only warn about endianness
1734 difference if target endianness is known.
1735
08556813
MM
1736Thu Dec 21 12:43:49 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1737
1738 * elf32-ppc.c (ppc_elf_howto_raw): Add a phony reloc to handle the
1739 old style TOC16 references without using R_PPC_GOT.
1740 (ppc_reloc_type): Ditto.
1741 (ppc_elf_reloc_type_lookup): Add support for TOC16.
1742 (ppc_elf_toc16_inner): Renamed from ppc_elf_got16_inner.
1743 (ppc_elf_toc16_reloc): Renamed from ppc_elf_toc16_reloc.
1744 (ppc_elf_got16_{inner,reloc}): Stubs for real GOT support.
1745 (ppc_elf_check_relocs): New function for GOT/PLT support that is
1746 work in progress.
1747 (ppc_elf_adjust_dynamic_symbol): Ditto.
1748 (ppc_elf_adjust_dynindx): Ditto.
1749 (ppc_elf_size_dynamic_sections): Ditto.
1750 (ppc_elf_finish_dynamic_symbol): Ditto.
1751 (ppc_elf_finish_dynamic_sections): Ditto.
1752 (ELF_DYNAMIC_INTERPRETER): Define.
1753
86587dd4
KR
1754Wed Dec 20 19:14:18 1995 Ken Raeburn <raeburn@cygnus.com>
1755
1756 * elf.c (copy_private_bfd_data): When attaching sections to
1757 segments ignore sections that won't be allocated. Patch from
1758 Andreas Schwab.
1759
bf7f243f
KR
1760Tue Dec 19 20:01:43 1995 Ken Raeburn <raeburn@cygnus.com>
1761
1762 * config.bfd: Match on m68k-cbm-* only if OS doesn't match
1763 anything else.
1764
d9518e2e
ILT
1765Tue Dec 19 16:38:59 1995 Ian Lance Taylor <ian@cygnus.com>
1766
1767 * coff-i960.c (CALC_ADDEND): Define.
1768 (coff_i960_relocate_section): Add the input section VMA to the
1769 addend for PC relative relocs.
1770
1771Sun Dec 17 20:11:55 1995 Kim Knuttila <krk@cygnus.com>
1772
1773 * peicode.h (pe_print_pdata): Must test the entire entry for zero
1774 to correctly terminate.
1775
010a405a
ILT
1776Fri Dec 15 12:05:57 1995 Ian Lance Taylor <ian@cygnus.com>
1777
dc092b6b
ILT
1778 * targets.c (enum bfd_endian): Define.
1779 (bfd_target): Rename byteorder_big_p to byteorder, and change it
1780 from boolean to enum bfd_endian. Change header_byteorder_big_p
1781 correspondingly.
1782 * bfd-in.h (bfd_big_endian, bfd_little_endian): New macros.
1783 (bfd_header_big_endian, bfd_header_little_endian): New macros.
1784 * bfd-in2.h: Rebuild.
1785 * All targets: Change initialization of byteorder and
1786 header_byteorder to use enum bfd_endian values rather than
1787 booleans.
1788 * All files: Change all references to byteorder_big_p and
1789 header_byteorder_big_p to use new bfd_*_endian macros.
1790
010a405a
ILT
1791 * coffgen.c (make_a_section_from_file): Set lma to s_paddr, not
1792 s_vaddr.
1793 * coffcode.h (coff_write_object_contents): Set s_paddr to lma, not
1794 vma.
1795 * ecoff.c (_bfd_ecoff_write_object_contents): Likewise.
1796
fcb43906
SC
1797Fri Dec 15 07:32:09 1995 steve chamberlain <sac@slash.cygnus.com>
1798
1799 * pe[i]-i386.c (TARGET_UNDERSCORE): Define to '_'.
1800
0d709d31
ILT
1801Thu Dec 14 13:45:37 1995 Ian Lance Taylor <ian@cygnus.com>
1802
14578105
ILT
1803 * ieee.c: Lots of minor cleanups. Make many functions return
1804 errors rather than calling abort. Also:
1805 (ieee_write_twobyte): Remove; change callers to call existing
1806 ieee_write_2bytes function.
1807 (ieee_write_expression): Don't output the section twice when
1808 outputting a local symbol. Don't emit an extraneous zero if there
1809 is only one term.
1810 (ieee_slurp_sections): Set the lma as well as the vma.
1811 (ieee_archive_p): Use bfd_alloc_grow rather than an obstack.
1812
0d709d31
ILT
1813 * ihex.c (ihex_set_arch_mach): Don't accept any architecture, just
1814 a recognized one or bfd_arch_unknown.
1815 (ihex_get_symtab_upper_bound): Define as bfd_0l, to permit objcopy
1816 to succeed.
1817 (ihex_get_symtab): Likewise.
1818
14dc2f77
ILT
1819Wed Dec 13 15:44:06 1995 Ian Lance Taylor <ian@cygnus.com>
1820
1821 * aoutx.h: Include <ctype.h>.
1822 (struct aout_link_includes_table): Define.
1823 (struct aout_link_includes_totals): Define.
1824 (struct aout_link_includes_entry): Define.
1825 (aout_link_includes_lookup): Define macro.
1826 (struct aout_final_link_info): Add includes field.
1827 (aout_link_includes_newfunc): New static function.
1828 (NAME(aout,final_link)): Initialize includes hash table.
1829 (aout_link_write_symbols): Eliminate duplicate N_BINCL entries.
1830
480ccad5
SS
1831Wed Dec 13 10:52:14 1995 Stan Shebs <shebs@andros.cygnus.com>
1832
1833 * mpw-config.in: Match on mips-*-* instead of mips-idt-ecoff.
1834
3920d9c9
KK
1835Wed Dec 13 11:07:45 1995 Kim Knuttila <krk@cygnus.com>
1836
1837 * coff-ppc.c (coff_ppc_relocate_section): removed debugging code.
1838
207345f2
KK
1839Tue Dec 12 17:42:06 1995 Kim Knuttila <krk@cygnus.com>
1840
1841 * peicode.h (pe_print_reloc): New function to dump the .reloc section.
1842 (pe_print_private_bfd_data): call pe_print_reloc.
1843 * coffcode.h (coff_set_alignment_hook): .reloc section alignment.
1844 * coff-ppc.c (in_reloc_p): Added missing non-eligible relocs. Spiffed
1845 up some debugging as well.
1846
273c019e
ILT
1847Tue Dec 12 11:34:23 1995 Ian Lance Taylor <ian@cygnus.com>
1848
1849 * config.bfd: Handle sparc-*-elf*. From Ronald F. Guilmette
1850 <rfg@monkeys.com>.
1851
010d9f2d
ILT
1852Fri Dec 8 17:47:07 1995 Ian Lance Taylor <ian@cygnus.com>
1853
1854 * elflink.h (elf_link_add_object_symbols): Set section_count to 0
1855 when setting sections to NULL.
1856
4a4a66bd
ILT
1857Wed Dec 6 17:05:37 1995 Ian Lance Taylor <ian@cygnus.com>
1858
1859 * xcofflink.c (struct xcoff_loader_info): Add export_defineds
1860 field.
1861 (bfd_xcoff_size_dynamic_sections): Add export_defineds parameter.
1862 (xcoff_build_ldsyms): If export_defineds is set, set XCOFF_EXPORT
1863 for all symbols.
1864 * bfd-in.h (bfd_xcoff_size_dynamic_sections): Update declaration.
1865 * bfd-in2.h: Rebuild.
1866
545bf026
KK
1867Mon Dec 4 16:40:47 1995 Kim Knuttila <krk@cygnus.com>
1868
1869 * coffcode.h (coff_set_alignment_hook): Removed some debugging printf's
1870
1f4ae0d6
ILT
1871Mon Dec 4 11:25:39 1995 Ian Lance Taylor <ian@cygnus.com>
1872
55cac920
ILT
1873 * ihex.c (ihex_scan): Handle record types 4 and 5.
1874 (ihex_object_p): Permit types 4 and 5.
1875 (ihex_set_section_contents): Remove check for out of range
1876 addresses.
1877 (ihex_write_object_contents): Generate types 4 and 5.
1878
1f4ae0d6
ILT
1879 * elflink.h (elf_link_output_extsym): Just ignore warning and
1880 indirect references to symbols which don't really exist.
1881
53d45489
KK
1882Sun Dec 3 19:00:27 1995 Kim Knuttila <krk@cygnus.com>
1883
1884 * peicode.h (pe_print_idata): Minor format fixes
1885 (pe_print_edata): New function. Under private printing, this formats
1886 the edata section of a PE file.
1887 (pe_print_private_bfd_data): Added call to pe_print_edata.
1888
361e8876
DE
1889Sun Dec 3 16:46:54 1995 Richard Earnshaw (rearnsha@armltd.co.uk)
1890
1891 * aout-arm.c (MY_swap_std_reloc_out): Use KEEPIT to get the symbol
1892 index, don't call stoi.
1893
58142f10
ILT
1894Fri Dec 1 14:46:51 1995 Ian Lance Taylor <ian@cygnus.com>
1895
ffd15489
ILT
1896 * srec.c (srec_scan): Set lma as well as vma.
1897
1898 * ihex.c: New file; support for Intel Hex format.
1899 * targets.c (enum bfd_flavour): Add bfd_target_ihex_flavour.
1900 (ihex_vec): Declare.
1901 (bfd_target_vector): Always include ihex_vec.
1902 * bfd.c (struct _bfd): Add ihex_data field to tdata union.
1903 * Makefile.in: Rebuild dependencies.
1904 (BFD_LIBS): Add ihex.o
1905 (BFD_LIBS_CFILES): Add ihex.c.
1906 * bfd-in2.h: Rebuild.
1907
ae0a6bea
ILT
1908 * elf.c (assign_file_positions_for_segments): Sort the sections in
1909 each segment.
1910 (get_program_header_size): Return the right size if segment_map is
1911 not NULL.
1912 (copy_private_bfd_data): Don't bother to sort the sections.
1913
1914 * bfd.c (bfd_record_phdr): New function.
1915 * bfd-in.h (bfd_record_phdr): Declare.
1916 * bfd_in2.h: Rebuild.
1917
ce0ee4bf
ILT
1918 * elf32-sparc.c (elf32_sparc_relocate_section): Remove bogus
1919 BFD_ASSERT.
1920
58142f10
ILT
1921 * libbfd.c (bfd_malloc, bfd_realloc): New functions.
1922 (bfd_zmalloc): Return PTR, not char *. Take size_t, not
1923 bfd_size_type.
1924 * libbfd-in.h (bfd_malloc, bfd_realloc): Declare.
1925 (bfd_zmalloc): Change declaration.
1926 * libbfd.h: Rebuild.
1927 * Many files: Use bfd_malloc and bfd_realloc rather than malloc
1928 and realloc. Don't set bfd_error_no_memory if they fail.
1929
59066248
KK
1930Thu Nov 30 19:32:26 1995 Kim Knuttila <krk@cygnus.com>
1931
1932 * coff-ppc.c: Added macros to tidy up toc cell treatment. Numerous
1933 uses as well. Added a new howto to deal with TOCREL16 relocs that
1934 are TOCDEFN as well.
1935 (coff_ppc_relocate_section): Expanded treatment of ADDR32NB relocs
1936 to handle RVA relocs from dlltool.
1937 (ppc_coff_rtype2howto): TOCDEFN reloc addition.
1938 (coff_ppc_rtype_to_howto): TOCDEFN reloc addition.
1939 (ppc_coff_reloc_type_lookup): TOCDEFN reloc addition.
1940
1941 * coffcode.h (coff_set_alignment_hook): check idata$X sections
1942 to get the right section alignment.
1943
6933148a
ILT
1944Thu Nov 30 16:48:18 1995 Ian Lance Taylor <ian@cygnus.com>
1945
1946 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
1947 p_paddr if p_paddr is zero.
1948 (make_mapping): Set includes_filehdr and includes_phdrs for first
1949 PT_LOAD segment.
1950 (map_sections_to_segments): Set includes_phdrs for PT_PHDR
1951 segment.
1952 (assign_file_positions_for_segments): Handle includes_filehdr and
1953 includes_phdrs. Remove special handling of PT_PHDR and first
1954 PT_LOAD segments.
1955 (copy_private_bfd_data): Set includes_filehdr and includes_phdr
1956 when appropriate. Remove special handling of PT_PHDR segment.
1957 Use a more complex condition for when a section is included in a
1958 segment to handle Solaris linker oddities.
1959
f62fed1c
ILT
1960Thu Nov 30 11:17:33 1995 Manfred Hollstein KS/EF4A 60/1F/110 #40283 <manfred@lts.sel.alcatel.de>
1961
1962 * coff-m88k.c (howto_table): Reformatted for easier reading;
1963 special_function now points to new function m88k_special_reloc.
1964 (howto_hvrt16): Function previously used for handling HVRT16 relocs
1965 removed.
1966 (rtype2howto): Do not add reloc's r_offset to the addend, this will
1967 be done correctly by m88k_special_reloc.
1968 (reloc_processing): New function to be used by RELOC_PROCESSING.
1969 (RELOC_PROCESSING): Define to call reloc_processing.
1970
64ecde46
ILT
1971Wed Nov 29 12:42:36 1995 Ian Lance Taylor <ian@cygnus.com>
1972
b00c57ec
ILT
1973 * peicode.h (pe_print_idata): Call malloc rather than xmalloc.
1974 (pe_print_pdata): Likewise.
1975
a9713b91
ILT
1976 * opncls.c (bfd_alloc_by_size_t): Set bfd_error_no_memory if
1977 obstack_alloc fails.
1978 (bfd_alloc_finish): Set bfd_error_no_memory if obstack_finish
1979 fails.
1980 * libbfd.c (bfd_zmalloc): Set bfd_error_no_memory if malloc fails.
1981 * Many files: don't set bfd_error_no_memory if one of the above
1982 routines fails.
1983
3dbf33ee
ILT
1984 * elf.c (assign_file_positions_for_segments): Don't adjust p_paddr
1985 if p_paddr_valid is set.
1986 (copy_private_bfd_data): New static function.
1987 (_bfd_elf_copy_private_section_data): Call copy_private_bfd_data.
1988
44ef8897
ILT
1989 * elf.c (assign_file_positions_for_segments): Fix case where extra
1990 program headers were allocated.
1991
27fb8f29
ILT
1992 * elf.c (_bfd_elf_print_private_bfd_data): New function.
1993 * elf-bfd.h (_bfd_elf_print_private_bfd_data): Declare.
1994 * elfxx-target.h (bfd_elfNN_bfd_print_private_bfd_data): Define to
1995 _bfd_elf_print_private_bfd_data.
1996
64ecde46
ILT
1997 * coff-alpha.c (alpha_ecoff_swap_reloc_in): Don't abort if
1998 r_symndx is RELOC_SECTION_NONE for an ALPHA_R_IGNORE reloc.
1999 Change a RELOC_SECTION_LITA symndx to RELOC_SECTION_ABS.
2000 (alpha_ecoff_swap_reloc_out): Change RELOC_SECTION_ABS to
2001 RELOC_SECTION_LITA for ALPHA_R_IGNORE.
2002 (alpha_adjust_reloc_out): For ALPHA_R_IGNORE, don't change
2003 RELOC_SECTION_ABS to RELOC_SECTION_NONE.
2004
fd0198f0
ILT
2005Tue Nov 28 16:59:50 1995 Ian Lance Taylor <ian@cygnus.com>
2006
2007 * elf-bfd.h (struct elf_obj_tdata): Add segment_map field.
2008 * elf.c (make_mapping): New static function.
2009 (map_sections_to_segments): New static function.
2010 (elf_sort_sections): New static function.
2011 (assign_file_positions_for_segments): New static function.
2012 (map_program_segments): Remove.
2013 (get_program_header_size): Remove sorted_hdrs, count, and
2014 maxpagesize parameters. Simplify.
2015 (assign_file_positions_except_relocs): When generating an
2016 executable, use assign_file_positions_for_segments.
2017 (elf_sort_hdrs): Remove.
2018 (_bfd_elf_sizeof_headers): Remove eliminated parameters from call
2019 to get_program_header_size.
2020
3b3f7625
ILT
2021Mon Nov 27 12:27:46 1995 Ian Lance Taylor <ian@cygnus.com>
2022
1ff0461b
ILT
2023 * hp300hpux.c (MY(callback)): Set lma as well as vma.
2024
80c8485c
ILT
2025 * configure, config.in: Regenerate with autoconf 2.7.
2026
3b3f7625
ILT
2027 * elf32-i386.c (elf_backend_plt_readonly): Set correctly, to 1.
2028 * elf32-sparc.c (elf_backend_plt_readonly): Set correctly, to 0.
2029
fa63d1ef
ILT
2030Wed Nov 22 12:02:09 1995 Ian Lance Taylor <ian@cygnus.com>
2031
a877f591
ILT
2032 * ecoff.c (_bfd_ecoff_new_section_hook): Handle .rconst section.
2033 (ecoff_sec_to_styp_flags): Likewise.
2034 (_bfd_ecoff_styp_to_sec_flags): Handle STYP_RCONST.
2035 (ecoff_set_symbol_info): Handle scRConst.
2036 (ecoff_slurp_reloc_table): Handle RELOC_SECTION_RCONST.
2037 (ecoff_compute_section_file_positions): Handle .rconst section.
2038 (_bfd_ecoff_write_object_contents): Likewise.
2039 (ecoff_link_check_archive_element): Handle scRConst.
2040 (ecoff_link_add_externals): Likewise.
2041 (ecoff_link_write_external): Handle .rconst section.
2042 (ecoff_reloc_link_order): Likewise.
2043 * ecofflink.c (bfd_ecoff_debug_accumulate): Handle scRConst.
2044 * coff-alpha.c (alpha_convert_external_reloc): Handle .rconst
2045 section.
2046 (alpha_relocate_section): Handle RELOC_SECTION_RCONST.
2047
fa63d1ef
ILT
2048 * sunos.c (sunos_scan_dynamic_symbol): Only set written if the
2049 DEF_DYNAMIC flag is set.
2050
25bada65
KR
2051Tue Nov 21 13:25:29 1995 Ken Raeburn <raeburn@cygnus.com>
2052
2053 * host-aout.c: If TRAD_HEADER is defined, include it.
2054
7938b4cb
ILT
2055Tue Nov 21 13:03:57 1995 Ian Lance Taylor <ian@cygnus.com>
2056
85e493f0
ILT
2057 * aclocal.m4 (AC_PROG_CC): Remove local definition.
2058 (BFD_BINARY_FOPEN): Require AC_CANONICAL_SYSTEM.
2059 (BFD_NEED_DECLARATION): New function.
2060 * configure.in: Use BFD_NEED_DECLARATION.
bd77213b
ILT
2061 * acconfig.h: Put NEED_DECLARATION_* in @TOP@ section.
2062 * configure, config.in: Rebuild with autoconf 2.6.
85e493f0 2063
83dcdc61
ILT
2064 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Clear
2065 special_sections before returning when called with a non XCOFF
2066 BFD.
2067
7938b4cb
ILT
2068 * coffgen.c (coff_renumber_symbols): Sort common symbols with
2069 global symbols.
2070
2071 * coffcode.h (coff_compute_section_file_positions): Only pad the
2072 previous section to force file alignment when creating an
2073 executable.
2074
b5403ad7
ILT
2075Mon Nov 20 14:54:09 1995 Ian Lance Taylor <ian@cygnus.com>
2076
a418e05d
ILT
2077 * coffcode.h (coff_compute_section_file_positions): If
2078 RS6000COFF_C, set up the .debug section.
2079
b5403ad7
ILT
2080 * xcofflink.c (xcoff_link_input_bfd): Adjust the TOC anchor value
2081 if it is not large enough to accomodate the entire TOC area with
2082 signed 16 bit offsets.
2083 (xcoff_write_global_symbol): Handle negative TOC offsets in global
2084 linkage code.
2085 (_bfd_ppc_xcoff_relocate_section): Adjust relocations against a
2086 TOC anchor to use the TOC value used in the output file.
2087
90a7abbc
ILT
2088Sat Nov 18 18:01:41 1995 Ian Lance Taylor <ian@cygnus.com>
2089
2090 * coffgen.c (_bfd_coff_get_external_symbols): Cast malloc return.
2091 (_bfd_coff_read_string_table): Likewise.
2092
177b1932
DE
2093Sat Nov 18 19:43:04 1995 Richard Earnshaw (rearnsha@armltd.co.uk)
2094
2095 * pe-arm.c: Fix typos.
2096 * coff-arm.c: Likewise.
2097
2098Fri Nov 17 16:22:04 1995 Kim Knuttila <krk@cygnus.com>
2099
2100 * coff-ppc.c (list_ele): Added "cat"egory member.
2101 (record_toc): New category parameter (priv or pub).
2102 (ppc_record_toc_entry): Check to see if toc bounds exceeded.
2103 (ppc_process_before_allocation): Removed embrionic data-in-toc from
2104 the mainline. It addes extra toc cells in error.
2105 (ppc_coff_swap_sym_in_hook): Added some documentation.
2106 (dump_toc): Can now diagnose "virtual toc" chicanery.
2107
e34314c4
ILT
2108Fri Nov 17 10:41:25 1995 Philippe De Muyter <phdm@info.ucl.ac.be>
2109
2110 * elf-bfd.h (struct elf_link_hash_table): Change type of
2111 dynsymcount and bucketcount fields from size_t to bfd_size_type.
2112
73a68447
ILT
2113Fri Nov 17 10:02:58 1995 Ian Lance Taylor <ian@cygnus.com>
2114
535e9e29
ILT
2115 * coffcode.h (coff_pointerize_aux_hook): I960 version: don't
2116 pointerize C_LEAFSTAT or C_LEAFEXT entries.
2117
73a68447
ILT
2118 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Only create
2119 DT_INIT and DT_FINI entries if the _init or _fini symbol is
2120 defined or mentioned in a regular file.
2121
cd2b2402
KK
2122Thu Nov 16 15:16:42 1995 Kim Knuttila <krk@cygnus.com>
2123
2124 * coff-ppc.c (ppc_record_data_in_toc_entry): new function
2125 (coff_ppc_relocate_section): Handle TOCDEFN attribute
2126 (coff_ppc_relocate_section): Correct REL24 handling
2127 (ppc_process_before_allocation): Correct TOCDEFN handling
2128
2129 * peicode.h (dir_names): Added name descriptions
2130
b218076e
KR
2131Thu Nov 16 03:38:03 1995 Ken Raeburn <raeburn@cygnus.com>
2132
2133 * VERSION: Updated to cygnus-2.6.
2134
2135Wed Nov 15 19:30:07 1995 Ken Raeburn <raeburn@cygnus.com>
2136
2137 * targets.c (m68k4knetbsd_vec): Declare.
2138
e9f30616
ILT
2139Wed Nov 15 18:05:52 1995 Ian Lance Taylor <ian@cygnus.com>
2140
2141 * targets.c (bfd_target): Change type of second argument to
2142 _bfd_print_private_bfd_data from void * to PTR.
2143 * libbfd-in.h (_bfd_generic_bfd_print_private_bfd_data): Cast
2144 using PTR rather than void *.
2145 * bfd-in2, libbfd.h: Rebuild.
2146 * peicode.h (pe_print_private_bfd_data): Change vfile from void *
2147 to PTR.
2148 * elfxx-target.h (bfd_elfNN_bfd_print_private_bfd_data): Define as
2149 _bfd_generic_bfd_print_private_bfd_data rather than casting
2150 bfd_true.
2151
ae75c4a4
KR
2152Wed Nov 15 04:09:14 1995 Ken Raeburn <raeburn@cygnus.com>
2153
2154 * Makefile.in (.dep1): Fix stupid typo in last change. Remove any
2155 "DO NOT DELETE" lines or blank lines that mkdep writes on some
2156 systems.
2157 (BFD_LIBS_CFILES, ALL_MACHINES_CFILES, BFD32_BACKENDS_CFILES,
2158 BFD64_BACKENDS_CFILES): New variables.
2159 (CFILES): Use them.
2160
bebcd3db
ILT
2161Tue Nov 14 11:52:23 1995 Ian Lance Taylor <ian@cygnus.com>
2162
4b71e164
ILT
2163 * peicode.h (coff_swap_aouthdr_out): For PPC PE, start isize at 0,
2164 not at the file position of the first section.
2165 * coffcode.h (coff_compute_section_file_positions): Avoid using
2166 unportable #elif.
2167 (coff_write_object_contents): When generating a PPC PE executable
2168 with no symbols, round up the file size to a COFF_PAGE_SIZE
2169 boundary.
2170 * cofflink.c (_bfd_coff_final_link): If there are no symbols,
2171 don't write out a string table.
2172
631b10f4
ILT
2173 * elf.c (bfd_section_from_shdr): When using a different section
2174 header, pass the new one to _bfd_elf_make_section_from_shdr.
2175 (elf_fake_sections): Don't set sh_info and sh_entsize fields.
2176 (elf_map_symbols): Add section VMA to symbol value when comparing
2177 against 0.
2178 (_bfd_elf_compute_section_file_positions): Only build symbol table
2179 if there are some symbols. Set file offset of symtab and strtab
2180 sections.
2181 (assign_file_positions_except_relocs): Remove dosyms parameter.
2182 Change all callers. Never set file offset of symtab and strtab
2183 sections.
2184 (_bfd_elf_copy_private_section_data): New function.
2185 (MAP_ONESYMTAB, MAP_DYNSYMTAB, MAP_STRTAB, MAP_SHSTRTAB): Define.
2186 (_bfd_elf_copy_private_symbol_data): New function.
2187 (swap_out_syms): Check for special mapping of st_shndx created by
2188 copy_private_symbol_data.
2189 * elfxx-target.h: Use new copy routines.
2190 * elf-bfd.h (_bfd_elf_copy_private_symbol_data): Declare.
2191 (_bfd_elf_copy_private_section_data): Declare.
2192
2193 * config.bfd (sh-*-*): Set targ_defvec to shcoff_vec.
2194
2195 * coffcode.h (coff_slurp_symbol_table): If COFF_WITH_PE, handle
2196 C_NT_WEAK.
2197
bebcd3db
ILT
2198 * coff-sh.c (shlcoff_vec): Use _bfd_generic_archive_p, not
2199 _bfd_dummy_target, matching the recent change to archive
2200 recognition.
2201
7ad4ba81
ILT
2202Mon Nov 13 13:24:38 1995 Ian Lance Taylor <ian@cygnus.com>
2203
afa67334
ILT
2204 * libbfd.c (bfd_get_file_window): Use casts to avoid doing
2205 arithmetic on PTR types.
2206
f2bd8915
ILT
2207 * aout-target.h (MY(callback)): Set the lma of the sections.
2208
7ad4ba81
ILT
2209 * ecoff.c (ecoff_reloc_link_order): Turn a reloc against a defined
2210 symbol into a reloc against the section.
2211
93b6a3f8
KK
2212Mon Nov 13 07:31:35 1995 Kim Knuttila <krk@cygnus.com>
2213
2214 * coff-ppc.c (ppc_coff_link_hash_entry): added support for inline
2215 glue for the relocs: IMGLUE and IFGLUE.
2216 (record_toc): new function - tracks toc contents
2217 (ppc_mark_symbol_as_glue): new function - supports the IMGLUE reloc
2218 (coff_ppc_relocate_section): Added support and fixes for IMGLUE/IFGLUE
2219 (ppc_coff_rtype2howto): removed invalid IMGLUE hack
2220 (coff_ppc_rtype_to_howto): removed invalid IMGLUE hack
125d37c4 2221 (ppc_record_toc_entry): Removed a debug define (duh)
93b6a3f8
KK
2222
2223 * peicode.h (coff_swap_scnhdr_out): Fixed invalid strcmp for ".reldata"
2224 (pe_print_idata): New function - formats the idata section data
2225 (pe_print_pdata): New function - formats the pdata section data
2226 (pe_print_private_bfd_data): calls to above
2227
c769947b
SS
2228Sun Nov 12 12:23:24 1995 Stan Shebs <shebs@andros.cygnus.com>
2229
2230 * Makefile.in (bfd_libs_here, etc): Provide empty definitions.
2231 * coff-rs6000.c (rs6000coff_vec): Add conditional defines
2232 TARGET_SYM and TARGET_NAME for vector and BFD name.
2233 * coff-pmac.c (pmac_xcoff_vec): Remove.
2234 (TARGET_SYM, TARGET_NAME): Define.
2235 * coffcode.h (coff_set_arch_mach_hook) [POWERMAC]: Set the
2236 machine to 0, not all PowerMacs are 601s.
2237
2238Fri Nov 10 12:10:14 1995 Ian Lance Taylor <ian@cygnus.com>
2239
2240 * elfcode.h (elf_object_p): Read in any program headers.
2241 * elf.c (_bfd_elf_make_section_from_shdr): Adjust section lma
2242 based on the program headers, if any.
2243 (elf_fake_sections): Set sh_addr from the vma, not the lma.
2244 (map_program_segments): Set p_paddr of program headers based on
2245 the lma.
2246
ee174815
ILT
2247Thu Nov 9 13:01:31 1995 Ian Lance Taylor <ian@cygnus.com>
2248
839087b7
ILT
2249 * archive.c (bfd_generic_archive_p): Preserve tdata in case of
2250 failure.
2251
922530a6
ILT
2252 * aoutx.h (NAME(aout,final_link)): Report a reasonable error when
2253 trying to do a relocateable link with a non-a.out object file.
2254
2255 * archive.c (bfd_generic_archive_p): Check the first object file
2256 in an archive even if target_defaulted is set. If the object file
2257 has the wrong xvec, reject it.
2258
a1774c51
ILT
2259 * aoutx.h (NAME(aout,set_section_contents)): If a section can not
2260 be represented, report the name via _bfd_error_handler.
2261 (translate_to_native_sym_flags): Likewise.
2262 * elf32-mips.c (mips_elf_final_link): Likewise.
2263 * oasys.c (oasys_write_sections): Likewise.
2264
4a378b13
ILT
2265 * coffcode.h (coff_set_alignment_hook): Write RS6000COFF_C version
2266 which checks for STYP_OVRFLO sections.
2267 (coff_compute_section_file_positions): If RS6000COFF_C, handle
2268 reloc and lineno count overflows.
2269 (coff_write_object_contents): Call coff_count_linenumbers before
2270 coff_compute_section_file_positions. If RS6000COFF_C, handle
2271 reloc and lineno count overflows.
2272 * xcofflink.c (_bfd_xcoff_bfd_final_link): Count line numbers and
2273 relocs before dealing with .pad sections. Count overflow section
2274 headers when handling .pad sections.
2275
7906bf87
ILT
2276 * coffcode.h (coff_write_object_contents): Set a.out vstamp to 1
2277 if RS6000COFF_C.
2278
ee174815
ILT
2279 * xcofflink.c (XCOFF_DESCRIPTOR): Define.
2280 (struct xcoff_link_hash_table): Add descriptor_section and
2281 special_sections fields.
2282 (_bfd_xcoff_bfd_link_hash_table_create): Initialize new fields.
2283 (xcoff_link_add_symbols): Set linkage section alignment. Create
2284 descriptor section. Check for magic symbol names (_text, etc.),
2285 and record them in special_sections if found. Set
2286 XCOFF_DESCRIPTOR flag for a function descriptor, and set its
2287 descriptor field to point back to the function code symbol.
2288 (xcoff_sweep): Always mark the special descriptor_section.
2289 (bfd_xcoff_export_symbol): Check whether the symbol might be a
2290 function descriptor, and mark it if it is.
2291 (bfd_xcoff_size_dynamic_sections): Add new special_sections
2292 parameter, and fill it in. Allocate space for the descriptor
2293 section.
2294 (xcoff_build_ldsyms): Set XCOFF_DEF_REGULAR flag when defining
2295 global linkage code. If an undefined function descriptor is
2296 exported, arrange to define it. Warn about any other undefined
2297 exported symbol.
2298 (_bfd_xcoff_bfd_final_link): Write out the descriptor section.
2299 (xcoff_write_global_symbol): Create a function descriptor when
2300 necessary.
2301 * bfd-in.h (bfd_xcoff_size_dynamic_sections): Update declaration.
2302 * bfd-in2.h: Rebuild.
2303
0e829f18
KK
2304Thu Nov 9 08:40:23 1995 Kim Knuttila <krk@cygnus.com>
2305
2306 * coff-ppc.c (ppc_coff_link_hash_entry): new types for hashing
2307 (ppc_coff_link_hash_table): new types for hashing
2308 (ppc_coff_link_hash_newfunc): hash entry constructor
2309 (ppc_coff_link_hash_table_init): hash table initializer
2310 (ppc_coff_link_hash_table_create): hash table constructor
2311 (ppc_record_toc_entry): changed references to hash table
2312 (coff_ppc_relocate_section): changed references to hash table
2313
2314 * libcoff-in.h (coff_link_hash_entry): removed toc_offset
2315 * libcoff.h: Rebuild
2316
2317 * cofflink.c (_bfd_coff_link_hash_newfunc): removed toc_offset init
2318 (coff_link_add_symbols): removed toc_offset init
2319
7ac84736
KR
2320Thu Nov 9 04:00:38 1995 Ken Raeburn <raeburn@cygnus.com>
2321
b27cc4bc
KR
2322 * Makefile.in (.dep1): Make sure the file mkdep is to write exists
2323 first.
2324
7ac84736
KR
2325 * configure.in: Added new option --with[out]-mmap. Set USE_MMAP
2326 if it is given and mmep is available.
2327 * acconfig.h: Undef USE_MMAP.
2328 * configure, config.in: Regenerated.
2329 * aoutx.h: If USE_MMAP is not defined, do all symbol and string
2330 table handling the old way.
2331 (aout_get_external_symbols): Don't complain if last byte of string
2332 table is nonzero.
2333 * libbfd.c [HAVE_MADVISE]: Include sys/types.h and sys/mman.h.
2334 (bfd_free_window) [! USE_MMAP]: Don't define.
2335 (bfd_get_file_window,
2336 _bfd_generic_get_section_contents_in_window) [! USE_MMAP]: Abort.
2337
1b3b0c03
ILT
2338Wed Nov 8 20:03:44 1995 Eric Freudenthal <freudenthal@nyu.edu>
2339
2340 * coff-a29k.c (SIGN_EXTEND_HWORD): Use ~0xffff rather than
2341 0xffff0000.
2342
092abcdf
ILT
2343Wed Nov 8 11:31:11 1995 Ian Lance Taylor <ian@cygnus.com>
2344
33698029
ILT
2345 * coff-a29k.c (a29k_reloc): Change handling of R_IREL reloc to be
2346 compatible with AMD generated COFF files. Try to support both AMD
2347 and GNU formats simultaneously.
2348 (coff_a29k_relocate_section): Likewise.
2349
0bb8ff19
ILT
2350 * libbfd.c (bfd_get_file_window): Change writable parameter from
2351 int to boolean; update all callers. Pass MAP_SHARED if not
2352 writable--it's required on Solaris. Cast fprintf argument to
2353 avoid warning.
2354 * bfd-in.h (bfd_get_file_window): Update declaration.
2355 * bfd-in2.h: Rebuild.
2356 * aoutx.h: Update calls to bfd_get_file_window.
2357
0634a431
ILT
2358 * xcofflink.c (XCOFF_DEF_DYNAMIC): Rename from XCOFF_REF_DYNAMIC.
2359 Change all uses.
2360 (xcoff_swap_ldhdr_in): New static function.
2361 (xcoff_swap_ldsym_in): New static function.
7812bf9c 2362 (xcoff_find_reloc): Handle the case of a single reloc correctly.
0634a431
ILT
2363 (xcoff_link_add_symbols): If we just created a descriptor, pass it
2364 to _bfd_generic_link_add_one_symbol, to save a hash lookup.
417acf22 2365 Handle XTY_ER/XMC_XO symbols correctly.
0634a431
ILT
2366 (xcoff_link_add_dynamic_symbols): Rewrite to read .loader symbols
2367 rather than normal symbol table.
417acf22
ILT
2368 (bfd_xcoff_import_symbol): It's not an error if the symbol is
2369 already defined with the same absolute value.
0634a431
ILT
2370 (xcoff_mark): When considering called symbols, check whether the
2371 descriptor is from a dynamic object, rather than the symbol
2372 itself.
2373 (xcoff_build_ldsyms): Likewise.
2374
092abcdf
ILT
2375 * libbfd.c (bfd_get_file_window): Change return type to boolean.
2376 Cast realloc and malloc return values. If malloc or realloc fail,
2377 set bfd_error_no_memory.
2378 * bfd-in.h (bfd_get_file_window): Change type to boolean.
2379 * bfd-in2.h: Rebuild.
2380
d6f41a7d
KK
2381Tue Nov 7 11:53:48 1995 Kim Knuttila <krk@cygnus.com>
2382
2383 * coff-ppc.c (ppc_record_toc_entry): new function.
2384 (in_reloc_p): changed return value.
2385 (coff_ppc_relocate_section): much rework.
2386 (ppc_allocate_toc_section): new function.
2387 (ppc_process_before_allocation): new function.
2388 (ppc_coff_swap_sym_in_hook): new function.
2389
2390 * cofflink.c (_bfd_coff_link_hash_newfunc): initialize toc_offset.
2391 (coff_link_add_symbols): initialize toc_offset.
2392
2393 * peicode.h (coff_swap_sym_in): Added coff_swap_sym_in_hook
2394 (coff_swap_aouthdr_out): Added more sections to the data
2395 dictionary for the pe file header. Also changed linker version
2396 number on the ppc side.
2397 (dir_names): small improvements to the dictionary printing.
2398 (pe_mkobject_hook): save the file level flags.
2399
2400 * libcoff-in.h (coff_link_hash_entry): added toc_offset field
2401 (pe_tdata): added real_flags field
2402 (coff_tdata): added local_toc_sym_map and access macro
2403
2404 * libcoff.h (coff_link_hash_entry): added toc_offset field
2405 (pe_tdata): added real_flags field
2406 (coff_tdata): added local_toc_sym_map and access macro
2407
2408 * coffcode.h (coff_set_alignment_hook): added hook for PE.
2409 (coff_mkobject): init for local_toc_sym_map
2410 (coff_write_object_contents): set the internal_a.magic to
2411 IMAGE_NT_OPTIONAL_HDR_MAGIC which appears to be what other
2412 ppc compilers use.
2413
6bc200f2
ILT
2414Tue Nov 7 13:48:58 1995 Ian Lance Taylor <ian@cygnus.com>
2415
c0971298
ILT
2416 * ecofflink.c (_bfd_ecoff_locate_line): Keep looking through stabs
2417 entries until both the line number address and the function name
2418 address are too large.
2419
6a468850
ILT
2420 * configure.in: Call AC_CHECK_PROG to find and cache AR.
2421 * configure: Rebuilt.
2422
6bc200f2
ILT
2423 * aclocal.m4 (BFD_CC_FOR_BUILD): Don't define CC_FOR_BUILD if it
2424 is defined in the environment.
2425
c44bf94c
JL
2426Tue Nov 7 10:57:24 1995 Jeffrey A Law (law@cygnus.com)
2427
2428 * som.c (som_get_section_contents_in_window): Define to use
2429 generic version.
2430
cf587de8
ILT
2431Mon Nov 6 17:13:15 1995 Harry Dolan <dolan@ssd.intel.com>
2432
2433 * coff-i860.c: New file, based on coff-i386.c.
2434 * cpu-i860.c: New file, based on cpu-i386.c.
2435 * hosts/i860mach3.h: New file, based on hosts/i386mach3.h.
2436 * config.bfd (i860-*-mach3*, i860-*-osf1*, i860-*-coff*): New
2437 targets, using i860coff_vec.
2438 * configure.in (i860-*-mach3*, i860-*-osf1*): New hosts, using
2439 trad-core.o and hosts/i860mach3.h.
2440 (i860coff_vec): Use coff-i860.o and cofflink.o.
2441 * configure: Rebuild.
2442 * Makefile.in: Rebuild dependencies.
2443 (ALL_MACHINES): Add cpu-i860.o.
2444 (BFD32_BACKENDS): Add coff-i860.o.
2445 (CFILES): Add cpu-i860.c and coff-i860.c.
2446 * targets.c (i860coff_vec): Declare.
2447 (bfd_target_vector): Add &i860coff_vec.
2448 * archures.c (bfd_i860_arch): Declare.
2449 (bfd_archures_list): Add &bfd_i860_arch.
2450 * coffcode.h (coff_set_arch_mach_hook): Handle I860 magic number.
2451 (coff_set_flags): Handle bfd_arch_i860.
2452 (coff_write_object_contents): Handle I860 a.out magic number.
2453
83c23fca
ILT
2454Mon Nov 6 14:34:07 1995 Ian Lance Taylor <ian@cygnus.com>
2455
2456 * xcofflink.c (xcoff_link_add_symbols): Set the alignment power of
2457 the created .tc section to 2.
2458 (xcoff_mark): Don't keep a .loader reloc for a call to an
2459 undefined symbol when creating a shared library.
2460 (xcoff_build_ldsyms): When creating a shared library, generate
2461 global linkage code for a call to an undefined symbol.
2462
5d9eb9c3
KR
2463Sun Nov 5 21:44:13 1995 Ken Raeburn <raeburn@cygnus.com>
2464
2465 * Makefile.in (CFILES): Rebuild list from BFD_LIBS, ALL_MACHINES,
2466 BFD32_BACKENDS, BFD64_BACKENDS.
2467 (.dep1): Put mkdep output in a separate file.
2468 Rebuilt dependencies.
2469
ffacb892
KR
2470 * ecoff.c (_bfd_ecoff_slurp_armap): Cast _bfd_read_ar_hdr return
2471 value.
2472
4fe6d901
KR
2473 Permit use of mmap when available:
2474
2475 * configure.in: Check for mmap, madvise, mprotect.
2476 * config.in, configure: Regenerated.
2477
2478 * libbfd.c (struct _bfd_window_internal): Define type.
2479 (bfd_init_window, bfd_free_window, bfd_get_file_window): New
2480 functions.
2481 (ok_to_map): New static variable for debugging.
2482 (_bfd_generic_get_section_contents_in_window): New function.
2483 * bfd-in.h (bfd_window_internal): Declare type.
2484 (bfd_window): Define type.
2485 (bfd_init_window, bfd_free_window, bfd_get_file_window): Declare.
2486 * libbfd-in.h (_bfd_generic_get_section_contents_in_window):
2487 Declare.
2488
2489 * libaout.h (struct aoutdata): Add two window fields.
2490 (obj_aout_sym_window, obj_aout_string_window): New macros.
2491 * aoutx.h (some_aout_object_p): Initialize windows.
2492 (aout_get_external_symbols): Get symbol data and strings in
2493 windows instead of explicitly allocated buffers.
2494 (slurp_symbol_table): Free window instead of memory.
2495 (bfd_free_cached_info): Release windows instead of freeing storage
2496 directly.
2497 (aout_link_free_symbols): Ditto.
2498
2499 * targets.c (bfd_target): Add new field for
2500 get_section_contents_in_window.
2501 (BFD_JUMP_TABLE_GENERIC): Updated.
2502 * aout-adobe.c, aout-target.h, binary.c, bout.c, coff-alpha.c,
2503 coff-mips.c, elfxx-target.h, i386msdos.c, i386os9k.c, ieee.c,
2504 libcoff-in.h, oasys.c, srec.c, tekhex.c, versados.c: Added new
2505 macros for get_section_contents_in_window field.
2506
d9e771e3
FF
2507Sat Nov 4 12:23:26 1995 Fred Fish <fnf@cygnus.com>
2508
2509 * core.c: Renamed to corefile.c
2510 * makefile.dos (OBJS): Change core.o to corefile.o
2511 * Makefile.in (CFILES, BFD_LIBS): Use corefile.c instead of core.c
2512
bf917766
SG
2513start-sanitize-gm
2514Sat Nov 4 10:16:54 1995 Stu Grossman (grossman@cygnus.com)
2515
2516 * config.bfd (mips*-*-magic*): Add bfd_elf32_bigmips_vec to
2517 targ_selvecs to allow debugging under Irix-5 native.
2518
2519end-sanitize-gm
583db7a8
ILT
2520Fri Nov 3 15:54:59 1995 Ian Lance Taylor <ian@cygnus.com>
2521
2522 * xcofflink.c (xcoff_link_add_symbols): Rename local variable sub
2523 to o. Clobber and restore the list of new csects around the call
2524 to _bfd_generic_link_add_one_symbol, in case it wants to report a
2525 linker error and the linker wants to read the symbol table. Reset
2526 the line number count of a real section even if it has no relocs.
2527 (_bfd_xcoff_bfd_final_link): If shared, set the DYNAMIC flag.
2528
2529 * coffgen.c (_bfd_coff_read_string_table): Warn if the string size
2530 is too small.
2531
68aed7db
ILT
2532Thu Nov 2 23:16:39 1995 Ian Lance Taylor <ian@cygnus.com>
2533
18a9609c
ILT
2534 * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Don't warn about
2535 an undefined symbol in a shared link.
2536
68aed7db
ILT
2537 * linker.c (_bfd_generic_link_add_one_symbol): Correct type of
2538 oldtype from bfd_link_order_type to bfd_link_hash_type. From
2539 phdm@info.ucl.ac.be (Philippe De Muyter).
2540
7f82c7e1
ILT
2541Wed Nov 1 14:26:02 1995 Manfred Hollstein KS/EF4A 60/1F/110 #40283 <manfred@lts.sel.alcatel.de>
2542
2543 * coff-m88k.c (rtype2howto): New static function.
2544 (RTYPE2HOWTO): Use it rather than a macro definition.
2545
2546 * coffcode.h (coff_write_object_contents): set internal_a.magic
2547 to PAGEMAGICPEXECPAGED #if defined (M68) && !defined (LYNXOS).
2548
4c8b9746 2549 * configure.in: m68*-motorola-sysv* does not use ptrace-core.o;
7f82c7e1
ILT
2550 define TRAD_HEADER to new file hosts/delta68.h.
2551 m88*-motorola-sysv*, however, does use ptrace-core.o.
2552 * hosts/delta68.h: New file.
2553
2554 * ptrace-core.c (ptrace_unix_core_file_p): change bfd_zmalloc to
2555 bfd_zalloc; provide proper parm abfd to calls to bfd_zalloc.
2556
619c7730
KR
2557Wed Nov 1 13:51:54 1995 Ken Raeburn <raeburn@cygnus.com>
2558
2559 * i386linux.c (MY(vec)): Declare before use.
2560
73246ff8
ILT
2561Wed Nov 1 11:45:07 1995 Ian Lance Taylor <ian@cygnus.com>
2562
e8d6d5d0
ILT
2563 * reloc16.c (bfd_coff_reloc16_get_relocated_section_contents):
2564 Pass input_bfd, not in_bfd, to bfd_coff_reloc16_extra_cases.
2565
b2193cc5
ILT
2566 * elf.c (bfd_elf_set_dt_needed_name): Don't do anything if the
2567 BFD is not of the right type.
2568 (bfd_elf_get_needed_list): Likewise.
2569 * i386linux.c (bfd_linux_size_dynamic_sections): Likewise.
2570 * sunos.c (bfd_sunos_get_needed_list): Likewise.
2571 * xcofflink.c (XCOFF_XVECP): Define.
2572 (bfd_xcoff_link_record_set): Don't do anything if the BFD is not
2573 of the right type.
2574 (bfd_xcoff_import_symbol): Likewise.
2575 (bfd_xcoff_export_symbol): Likewise.
2576 (bfd_xcoff_link_count_reloc): Likewise.
2577 (bfd_xcoff_record_link_assignment): Likewise.
2578 (bfd_xcoff_size_dynamic_sections): Likewise.
2579
baabeb74
ILT
2580 * sunos.c (sunos_scan_ext_relocs): Only check the reloc symbol
2581 table index against the number of symbols for a base relative
2582 reloc.
2583
73246ff8
ILT
2584 * coff-rs6000.c (_bfd_xcoff_sizeof_headers): Change from macro to
2585 static function.
2586 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Set
2587 full_aouthdr flag here...
2588 (_bfd_xcoff_bfd_final_link): ...not here.
2589
6ab826bd
FF
2590Tue Oct 31 12:52:02 1995 Fred Fish <fnf@cygnus.com>
2591
2592 * libelf.h: Rename to elf-bfd.h to avoid conflict with
2593 systems that have a system <libelf.h>.
2594 * Makefile.in: Globally replace libelf.h with elf-bfd.h.
2595 * bfd.c, elf.c, elf32-arc.c, elf32-gen.c, elf32-hppa.c,
2596 elf32-hppa.h, elf32-i386.c, elf32-i860.c, elf32-m68k.c,
2597 elf32-m88k.c, elf32-mips.c, elf32-ppc.c, elf32-sparc.c,
2598 elf64-gen.c, elf64-sparc.c, elfcode.h, elflink.c,
2599 elfxx-target.h: Include elf-bfd.h rather than libelf.h.
2600 * elfxx-target.h: Change libelf.h reference to elf-bfd.h.
2601
999cc186
ILT
2602Tue Oct 31 15:30:07 1995 David Mosberger-Tang <davidm@azstarnet.com>
2603
0652d579
ILT
2604 * ecoff.c (ecoff_set_symbol_info): Add new parameter weak. If
2605 set, set BSF_WEAK in symbol. Change all callers.
2606 (ecoff_get_extr): Set weakext based on BSF_WEAK.
2607 (ecoff_link_add_externals): If weakext is set, pass BSF_WEAK to
2608 _bfd_generic_link_add_one_symbol.
2609 (ecoff_indirect_link_order): Check that the section tdata relocs
2610 are not NULL before using them.
2611
999cc186
ILT
2612 * configure.in (alpha*-*-linux*): Set COREFILE to trad-core.o and
2613 define TRAD_HEADER as hosts/alphalinux.h.
2614 * configure: Rebuild.
2615 * hosts/alphalinux.h: New file.
2616 * trad-core.c (trad_unix_core_file_p): Cast u.u_ar0 to bfd_vma,
2617 not int.
2618
e6080520
ILT
2619Tue Oct 31 12:34:11 1995 Ian Lance Taylor <ian@cygnus.com>
2620
2bd0aeb9
ILT
2621 * coffcode.h (coff_slurp_symbol_table): Accept C_BCOMM and
2622 C_ECOMM storage classes.
2623
e6080520
ILT
2624 * xcofflink.c (xcoff_mark_symbol): New static function, broken out
2625 of xcoff_mark.
2626 (xcoff_mark): Call xcoff_mark_symbol.
2627 (bfd_xcoff_export_symbol): Call xcoff_mark_symbol.
2628 (bfd_xcoff_link_count_reloc): Call xcoff_mark_symbol rather than
2629 doing it by hand.
2630 (xcoff_build_ldsyms): Build a .loader symbol for an export symbol.
2631
5fe14a9f
ILT
2632Mon Oct 30 14:53:48 1995 Ian Lance Taylor <ian@cygnus.com>
2633
f630a0a4
ILT
2634 * xcofflink.c (struct xcoff_final_link_info): Add new line_filepos
2635 field.
2636 (xcoff_find_reloc): New static function.
2637 (xcoff_link_add_symbols): Use it.
2638 (_bfd_xcoff_bfd_final_link): Set finfo.line_filepos.
2639 (xcoff_link_input_bfd): Handle C_BINCL and C_EINCL. Don't
2640 relocate the value of C_DECL.
2641
5fe14a9f
ILT
2642 * elf.c (elf_fake_sections): Remove bogus BFD_ASSERT.
2643
dff77ed7
SC
2644Sat Oct 28 01:25:34 1995 steve chamberlain <sac@slash.cygnus.com>
2645
2646 * cofflink.c (_bfd_coff_generic_relocate_section): Make
2647 callback decide what goes in .relocs.
2648 * pe[i]-i386.c (TARGET_UNDERSCORE): Define.
2649 * peicode.h (pe_mkobject_hook): Only copy aouthdr if
2650 there is one.
2651
697a8fe8
ILT
2652Sat Oct 28 01:51:02 1995 Ian Lance Taylor <ian@cygnus.com>
2653
2654 * xcofflink.c (xcoff_link_add_symbols): Handle csects in the
2655 absolute section.
2656
2d7de17d
ILT
2657Fri Oct 27 18:14:39 1995 Ian Lance Taylor <ian@cygnus.com>
2658
2659 * xcofflink.c: More improvements, mostly to fix handling of
2660 constructors and a few other special cases.
2661 * coff-rs6000.c (rs6000coff_vec): Set symbol_leading_char back to
2662 zero, reverting yesterday's change.
2663 * bfd-in.h (bfd_xcoff_link_record_set): Declare.
2664 (bfd_xcoff_link_count_reloc): Declare.
2665 (bfd_xcoff_record_link_assignment): Declare.
2666 * bfd-in2.h: Rebuild.
2667
f552f751
NH
2668Fri Oct 27 14:42:15 1995 Niklas Hallqvist <niklas@appli.se>
2669
2670 * PORTING, aout-arm.c, aout-encap.c, aout-rce.c, aout-target.h,
2671 aoutx.h, gen-aout.c, host-aout.c, hp300bsd.c, i386aout.c
2672 i386bsd.c, i386dynix.c, i386linux.c, i386lynx.c, i386mach3.c,
2673 i386netbsd.c, m68klynx.c, m88kmach3.c, mipsbsd.c, newsos3.c,
2674 ns32knetbsd.c, pc532-mach.c, riscix.c, sparclynx.c, sparcnetbsd.c:
2675 Change PAGE_SIZE to TARGET_PAGE_SIZE.
2676
2677 * m68knetbsd.c: Ditto as well as add support for the m68k4k object
2678 format.
2679
2680 * netbsd.h: Double ditto (incl. m68k4k support). NetBSD's text
2681 segments includes the a.out header. See to that the magic number
2682 *always* is big-endian.
2683
2684 * config.bfd: Add m68*-hp*-netbsd* case. Cross-pollinate m68k and
2685 m68k4k NetBSD configurations.
2686
2687 * configure.in, configure: Separate i386 & mips NetBSD
2688 configurations from other BSD ones. Don't assume DEC is the only
2689 thing NetBSD/mips run on. Add {m68k,ns32k,sparc}-*-netbsd*
2690 configurations. Add support for m68k4k NetBSD object format.
2691
2692 * libaout.h: Added M_68K4K_NETBSD magic.
6fd1f40d
NH
2693
2694 * m68k4knetbsd.c: New file.
f552f751
NH
2695
2696 * hosts/{m68k,sparc}nbsd.h: Don't define HOST_BIG_ENDIAN_P.
2697
2698 * hosts/nbsd.h: Define HOST_BIG_ENDIAN_P according to
2699 <machine/endian.h>.
2700
6fd1f40d
NH
2701 * hosts/mipsnbsd.h: New file.
2702
d6d44ef9
SG
2703start-sanitize-gm
2704Fri Oct 27 09:41:51 1995 Stu Grossman (grossman@cygnus.com)
2705
2706 * config.bfd: Add config stuff for mips*-*-magic* to set
2707 targ_defvec to ecoff_big_vec.
2708
2709end-sanitize-gm
867d923d
ILT
2710Thu Oct 26 14:16:47 1995 Ian Lance Taylor <ian@cygnus.com>
2711
2712 * xcofflink.c: Numerous changes to get closer to a working XCOFF
2713 linker.
2714 * libcoff-in.h (struct xcoff_tdata): Add full_aouthdr,
2715 toc_section, and entry_section fields.
2716 (struct xcoff_section_tdata): Remove ldrel_count field.
2717 * libcoff.h: Rebuild.
2718 * coffcode.h (coff_mkobject_hook): Initialize new xcoff_data
2719 fields.
2720 (coff_compute_section_file_positions): If RS6000COFF_C, generate
2721 full a.out header if full_aouthdr is set in xcoff_data.
2722 (coff_write_object_contents): Likewise. Set o_snentry and o_sntoc
2723 based on sections stored in xcoff_data.
2724 * coff-rs6000.c (xcoff_copy_private_bfd_data): Copy new xcoff_data
2725 fields.
aad2c618
ILT
2726 (xcoff_reloc_type_lookup): Handle BFD_RELOC_CTOR.
2727 (rs6000coff_vec): Set symbol_leading_char to '.'.
867d923d
ILT
2728 * coffgen.c (coff_get_symbol_info): If fix_value is set, fix the
2729 value stored in ret rather than returning a pointer value.
2730
6bd9ffdb
MM
2731Wed Oct 25 23:10:39 1995 Michael Meissner <meissner@tiktok.cygnus.com>
2732
2733 * config.bfd (powerpc{,le}-{elf,sysv4,eabi,solaris2}): Remove MAC
2734 format for now.
2735
9d14250f
JL
2736Wed Oct 25 16:19:27 1995 Jeffrey A Law (law@cygnus.com)
2737
2738 * som.c (som_slurp_string_table): Allocate the strings with malloc
2739 since they're free'd by free_cached_info.
2740 (som_slurp_symbol_table): Similarly for the symbol table.
2741
a2bd0529
PB
2742Wed Oct 25 14:59:22 1995 Per Bothner <bothner@kalessin.cygnus.com>
2743
2744 * Makefile.in (diststuff): Don't make headers.
2745
28a0c103
ILT
2746Wed Oct 25 11:32:54 1995 Ian Lance Taylor <ian@cygnus.com>
2747
356cd465
ILT
2748 * Makefile.in: Rebuild dependencies.
2749
1edd3a7b
ILT
2750 * sunos.c (bfd_sunos_record_link_assignment): Don't do anything if
2751 output_bfd is not SunOS.
2752 (bfd_sunos_size_dynamic_sections): Likewise. Don't scan relocs of
2753 non-SunOS input files.
2754
28a0c103
ILT
2755 * xcofflink.c: Extensive changes to support linking shared objects
2756 and generating a .loader section.
2757 * libcoff-in.h (struct xcoff_tdata): Add import_file_id field.
b73322d9
ILT
2758 (struct xcoff_section_tdata): Add lineno_count, first_symndx,
2759 last_symndx, and ldrel_count fields.
28a0c103
ILT
2760 * libcoff.h: Rebuild.
2761 * coff-rs6000.c (xcoff_howto_table): Correct reloc names.
2762 * coffcode.h (styp_to_sec_flags): Don't set any flags if STYP_PAD
2763 is set.
2764 * bfd-in.h (bfd_xcoff_import_symbol): Declare.
2765 (bfd_xcoff_export_symbol): Declare.
2766 (bfd_xcoff_size_dynamic_sections): Declare.
2767 * bfd-in2.h: Rebuild.
2768
aadf04f7
SS
2769Tue Oct 24 17:44:20 1995 Stan Shebs <shebs@andros.cygnus.com>
2770
2771 * configure.in: Add xcofflink.o to pmac_xcoff_vec.
2772 * configure: Rebuild.
2773 * mpw-config.in: Add xcofflink.c.o to powerpc-apple-macos.
2774 * coff-pmac.c: Include coff-rs6000.c instead of duplicating its
2775 contents.
2776 (pmac_xcoff_vec): Update to use new xcoff support.
2777 * coff-rs6000.c (xcoff_generic_stat_arch_elt): Make static.
2778 (xcoff_write_armap): Declare buf as unsigned char.
2779 * xcofflink.c (xcoff_link_add_symbols): Declare a local as PTR.
2780
2781 * mpw-make.sed: Generalize subdir_do edit.
2782
ddf4639b
JL
2783Tue Oct 24 10:25:01 1995 Jeffrey A Law (law@cygnus.com)
2784
2785 * hppabsd-core.c (make_bfd_asection): Initialize asect->filepos
2786 correctly. Don't initialize asect->vma.
2787
e7bedf65
KR
2788Fri Oct 20 13:23:48 1995 Ken Raeburn <raeburn@cygnus.com>
2789
2790 * opncls.c (_bfd_new_bfd): If _bfd_chunksize wasn't preset, use
2791 something a little less than the page size.
2792
2793Thu Oct 19 13:06:09 1995 Ian Lance Taylor <ian@cygnus.com>
2794
2795 * coff-i960.c (coff_i960_adjust_symndx): Clear *adjustedp.
2796
3a70e298
SC
2797Wed Oct 18 16:20:08 1995 steve chamberlain <sac@slash.cygnus.com>
2798
2799 * coff-i386.c (coff_i386_reloc_type_lookup): New.
2800 * coffcode.h (coff_write_object_contents): If .bss is before
2801 .data us that as data_start.
2802 * cofflink.c (_bfd_coff_generic_relocate_section): Get reloc
2803 calc correct.
2804 * peicode.h (add_data_entry): Use _cooked_size of data directory.
2805 (coff_swap_outhdr_out): Hardwire in version number.
2806
5a2846e3
KR
2807Wed Oct 18 16:50:54 1995 Ken Raeburn <raeburn@cygnus.com>
2808
3c3a5268
KR
2809 * sunos.c (sunos_add_dynamic_symbols): Rename local variables
2810 major and minor to *_vno, since the former are also macros in
2811 SunOS header files. Cast result of bfd_alloc to appropriate
2812 type.
2813
5a2846e3
KR
2814 * coffgen.c (coff_find_nearest_line): Cast used_by_bfd value
2815 before assigning to sec_data.
2816
0f6c885e
ILT
2817Wed Oct 18 13:25:17 1995 Ian Lance Taylor <ian@cygnus.com>
2818
2819 * ecoff.c (_bfd_ecoff_find_nearest_line): The offset argument is
2820 now relative to the section, not absolute.
2821 * ecofflink.c (_bfd_ecoff_locate_line): Use the right symbol to
2822 get the file name when there is a N_SO directory name. When
2823 handling stabs, remember that section->vma was added to the
2824 offset.
2825
11fa6636
ILT
2826Tue Oct 17 18:24:54 1995 Ian Lance Taylor <ian@cygnus.com>
2827
2828 * sunos.c (struct sunos_link_hash_table): Add needed field.
2829 (sunos_link_hash_table_create): Call bfd_release, not free.
2830 (sunos_link_hash_table_create): Initialize needed field.
2831 (sunos_add_dynamic_symbols): Record needed objects.
2832 (bfd_sunos_get_needed_list): New function.
2833 * bfd-in.h (bfd_sunos_get_needed_list): Declare.
2834 * bfd-in2.h: Rebuild.
2835
c974e19e
SC
2836Mon Oct 16 14:43:59 1995 steve chamberlain <sac@slash.cygnus.com>
2837
2838 * libcoff-in.h (pe_data_type.in_reloc_p): New.
2839
22a35f0b
ILT
2840Mon Oct 16 10:52:50 1995 Ian Lance Taylor <ian@cygnus.com>
2841
54406786
ILT
2842 * bfd-in.h (struct bfd_link_needed_list): Rename from
2843 bfd_elf_link_needed_list.
2844 * bfd-in2.h: Rebuild.
2845 * elf.c, elflink.h, libelf.h: Corresponding changes.
2846
dd984644
ILT
2847 Add start at AIX linker support; no shared libraries yet.
2848 * xcofflink.c: New file.
2849 * configure.in (rs600coff_vec): Use xcofflink.o.
2850 * configure: Rebuild.
2851 * libcoff-in.h (struct xcoff_tdata): Add csects and debug_indices
2852 fields.
2853 (struct xcoff_section_tdata): Define.
2854 (xcoff_section_data): Define macro.
2855 (_bfd_xcoff_bfd_link_hash_table_create): Declare.
2856 (_bfd_xcoff_bfd_link_add_symbols): Declare.
2857 (_bfd_xcoff_bfd_final_link): Declare.
2858 (_bfd_ppc_xcoff_relocate_section): Declare.
2859 * libcoff.h: Rebuild.
2860 * coff-rs6000.c: Clean up a bit.
2861 (xcoff_mkobject): Default modtype to 1L, not RE. Initialize
2862 cputype, csects, and debug_indices.
2863 (xcoff_copy_private_bfd_data): Copy cputype.
2864 (xcoff_howto_table): Rename from rs6000coff_howto_table.
2865 (xcoff_rtype2howto): Rename from rs6000coff_rtype2howto.
2866 (xcoff_reloc_type_lookup): Rename from
2867 rs6000coff_reloc_type_lookup.
2868 (coff_relocate_section): Define.
2869 (_bfd_xcoff_sizeof_headers): Define.
2870 (_bfd_xcoff_bfd_get_relocated_section_contents): Define.
2871 (_bfd_xcoff_bfd_relax_section): Define.
2872 (_bfd_xcoff_bfd_link_split_section): Define.
2873 (rs6000coff_vec): For BFD_JUMP_TABLE_LINK, use _bfd_xcoff, not
2874 coff.
2875 * coffcode.h (coff_compute_section_file_positions): If AIX,
2876 increment sofar by SMALL_AOUTSZ if not executable.
2877 (coff_write_object_contents): If AIX, always output an a.out
2878 header; if not executable, header size of SMALL_AOUTSZ.
2879 * hash.c (struct bfd_strtab_hash): Add xcoff field.
2880 (_bfd_stringtab_init): Initialize xcoff field.
2881 (_bfd_xcoff_stringtab_init): New function.
2882 (_bfd_stringtab_add): In XCOFF mode, leave two bytes for length.
2883 (_bfd_stringtab_emit): In XCOFF mode, write out length.
2884 * libbfd-in.h (_bfd_xcoff_stringtab_init): Declare.
2885 * libbfd.h: Rebuild.
2886 * Makefile.in: Rebuild dependencies.
2887 (BFD32_BACKENDS): Add xcofflink.o.
2888 (CFILES): Add xcofflink.c.
2889
22a35f0b
ILT
2890 * elf32-mips.c (mips_elf_symbol_processing): Set SEC_ALLOC, not
2891 SEC_NO_FLAGS, for .acommon section. From Peter Schauer
2892 <Peter.Schauer@Regent.E-Technik.TU-Muenchen.DE>.
2893
fb417a21
MM
2894Sat Oct 14 21:36:02 1995 Michael Meissner <meissner@tiktok.cygnus.com>
2895
2896 * coff-ppc.c (in_reloc_p): Add, clone from coff-i386.c.
2897
2898Fri Oct 13 17:48:43 1995 Ken Raeburn <raeburn@cygnus.com>
2899
2900 * acconfig.h (HAVE_SYS_PROCFS_H): Undef, with comment.
2901 * config.in: Regenerated.
2902
2903 * opncls.c (getpagesize) [!HAVE_GETPAGESIZE]: Define as 2048.
2904 (_bfd_chunksize): New variable.
2905 (_bfd_new_bfd): Set it to getpagesize() if negative, and use it
2906 for obstack chunk size.
2907 * configure.in: Check for getpagesize.
2908 * configure: Regenerated.
2909
2910 Mon Sep 25 22:49:32 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2911
2912 * trad-core.c (rawptr): Make it a local variable of
2913 ptrace_unix_core_file_p.
2914
b1e46369
SC
2915Fri Oct 13 11:22:01 1995 steve chamberlain <sac@slash.cygnus.com>
2916
2917 * coff-arm.c (in_reloc_p): New.
2918 * coff-i386.c (in_reloc_p): New.
2919 * coffcode.h: Allways include peicode.h if COFF_WITH_PE.
2920 (coff_write_object_contents): Only set has_reloc_section
2921 if PE_IMAGE.
2922 * cofflink.c (_bfd_coff_generic_relocate_section): Call
2923 in_reloc_p to decide if reloc should be emitted.
2924 * libcoff.h (pe_data_type.in_reloc_p): New.
2925 * peicode.h (pe_mkobject): Initialize in_reloc_p.
2926
ee9f09cd
ILT
2927Wed Oct 11 00:49:29 1995 Ian Lance Taylor <ian@cygnus.com>
2928
b1e46369
SC
2929 * cofflink.c (_bfd_coff_internal_syment_name): Move to coffgen.c.
2930 (_bfd_coff_read_internal_relocs): Likewise.
2931 * coffgen.c (_bfd_coff_internal_syment_name): Copy from coffgen.c.
2932 (_bfd_coff_read_internal_relocs): Likewise.
2933
ee9f09cd
ILT
2934 * elflink.h (elf_link_add_object_symbols): Correct conditions
2935 under which type and size change warnings are issued.
2936
78b31b6b
ILT
2937Tue Oct 10 18:32:46 1995 Ian Lance Taylor <ian@cygnus.com>
2938
2939 * coffgen.c (coff_count_linenumbers): Don't count line numbers for
2940 a symbol which is not in a real section.
2941 (coff_write_native_symbol): Corresponding change.
2942
2943 * cofflink.c (_bfd_coff_link_hash_newfunc): Rename from
2944 coff_link_hash_newfunc and make non-static.
2945 (_bfd_coff_link_hash_table_init): New function, broken out of
2946 _bfd_coff_link_hash_table_create.
2947 (_bfd_coff_link_hash_table_create): Use it.
2948 (process_embedded_commands): Make static.
2949 * libcoff-in.h ((_bfd_coff_link_hash_newfunc): Declare.
2950 (_bfd_coff_link_hash_table_init): Declare.
2951 * libcoff.h: Rebuild.
2952
2953 * coffcode.h (coff_mkobject_hook): If RS6000COFF_C, set cputype
2954 field in XCOFF tdata.
2955 (coff_set_arch_mach_hook): Check ifdef RS6000COFF_C, not ifdef
2956 U802ROMAGIC, for clarity. Try to set arch and machine correctly
2957 based on cputype stored in a.out header, or in n_type of initial
2958 .file symbol.
2959 (coff_write_object_contents): Set cputype correctly in a.out
2960 header.
2961 (coff_slurp_symbol_table): Add casts to file_ptr to avoid
2962 warnings.
2963 * coffswap.h (coff_swap_aouthdr_in): Swap in cputype field.
2964 (coff_swap_aouthdr_out): Swap out cputype field. Don't clear
2965 old resv1 field.
2966 * libcoff-in.h (struct xcoff_tdata): Add cputype field.
2967 * libcoff.h: Rebuild.
2968
2969 * cpu-rs6000.c (rs6000_compatible): New static function.
2970 (bfd_rs6000_arch): Use it.
2971 * cpu-powerpc.c (powerpc_compatible): New static function.
2972 (arch_info_struct): Define various flavours of PowerPC.
2973 (bfd_powerpc_arch): Use powerpc_compatible. Point at
2974 arch_info_struct.
2975
9dd7e56f
FF
2976Tue Oct 10 10:50:46 1995 Fred Fish <fnf@cygnus.com>
2977
78b31b6b 2978 * Makefile.in (FLAGS_TO_PASS): Remove BISON.
9dd7e56f 2979
8235c112
ILT
2980Tue Oct 10 01:28:29 1995 Ian Lance Taylor <ian@cygnus.com>
2981
2982 * elflink.h (elf_link_add_object_symbols): Don't warn about
2983 changing the size or type if the old definition was weak.
2984
0322af0d
ILT
2985Mon Oct 9 11:24:08 1995 Ian Lance Taylor <ian@cygnus.com>
2986
49488f2b
ILT
2987 * coffcode.h (combined_entry_type): Add fix_line field.
2988 (coff_slurp_line_table): Warn if we try to set the lineno field of
2989 a symbol twice.
2990 (coff_slurp_symbol_table): If RS6000COFF_C, handle C_BINCL and
2991 C_EINCL by setting fix_line. Fix C_BSTAT symbol value.
2992 * coffgen.c (coff_mangle_symbols): Handle fix_line.
2993 (coff_write_symbol): Only use N_DEBUG if the symbol is in the
2994 absolute section.
2995 (coff_print_symbol): Print fix_value symbols in a useful fashion.
2996 * libcoff.h: Rebuild.
2997
5f710a3a
ILT
2998 * libcoff-in.h (struct xcoff_tdata): Define.
2999 (xcoff_data): Define.
3000 * bfd.c (struct _bfd): Add xcoff_obj_data field to tdata union.
3001 * bfd-in2.h, libcoff.h: Rebuild.
3002 * coff-rs6000.c (xcoff_mkobject): New static function.
3003 (coff_mkobject): Define.
3004 (xcoff_copy_private_bfd_data): New static function.
3005 (coff_bfd_copy_private_bfd_data): Define.
3006 (rs6000coff_howto_table): Change R_TOC complain_on_overflow from
3007 signed to bitfield.
3008 (rs6000coff_vec): Add DYNAMIC to object_flags.
3009 * coffcode.h (sec_to_styp_flags): If RS6000COFF_C, handle .pad and
3010 .loader sections specially.
3011 (coff_new_section_hook): If RS6000COFF_C, get the .text and .data
3012 section alignment from the XCOFF tdata information.
3013 (coff_mkobject_hook): If RS6000COFF_C, set DYNAMIC based on
3014 F_SHROBJ, and copy the extra a.out header information into the
3015 XCOFF tdata structure.
3016 (coff_write_object_contents): If RS6000COFF_C, set F_SHROBJ,
3017 F_DYNLOAD and the extra a.out header information.
3018 (coff_slurp_symbol_table): Set BSF_NOT_AT_END for a C_EXT or
3019 C_HIDEXT symbol with attached csect information.
3020 * coffswap.h (coff_swap_aouthdr_in): If RS6000COFF_C, swap
3021 in the o_maxdata field.
3022 (coff_swap_aouthdr_out): If RS6000COFF_C, swap extra XCOFF fields.
3023 * coffgen.c (coff_renumber_symbols): Don't move any symbol to the
3024 end if BSF_NOT_AT_END is set.
3f2c5b2d 3025
0322af0d
ILT
3026 * targets.c (bfd_target): Rename _bfd_read_ar_hdr field to
3027 _bfd_read_ar_hdr_fn.
3028 * libbfd-in.h (_bfd_read_ar_hdr): Update accordingly.
3029 * bfd-in2.h, libbfd.h: Rebuild.
3030 * archive.c (_bfd_get_elt_at_filepos): Cast _bfd_read_ar_hdr
3031 return value.
3032 (do_slurp_bsd_armap, do_slurp_coff_armap): Likewise.
3033 (bfd_slurp_bsd_armap_f2): Likewise.
3034 (_bfd_slurp_extended_name_table): Likewise.
3035
3266eaff
KR
3036Fri Oct 6 16:18:35 1995 Ken Raeburn <raeburn@cygnus.com>
3037
3038 Mon Sep 25 22:49:32 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3039
3040 * archive.c (bfd_get_next_mapent): Return BFD_NO_MORE_SYMBOLS
3041 when the symbol table is empty.
3042
3043 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Don't reserve
3044 space for section symbols, since we don't output them either.
3045 (elf_m68k_adjust_dynindx): Removed.
3046
3047 * ptrace-core.c (rawptr): Make it a local variable of
3048 ptrace_unix_core_file_p.
3266eaff 3049
249479fa
MM
3050Fri Oct 6 12:24:47 1995 Michael Meissner <meissner@tiktok.cygnus.com>
3051
45b5d2f0
MM
3052 * coff-rs6000.c (xcoff_write_archive_contents): Return false, not
3053 NULL.
3054
249479fa
MM
3055 * config.bfd (powerpc{,le}-{elf,sysv4,eabi,solaris2}): Add NT, and
3056 Mac object file formats.
3057
c53fac12
ILT
3058Fri Oct 6 12:04:02 1995 Ian Lance Taylor <ian@cygnus.com>
3059
4372f33f
ILT
3060 * coffgen.c (coff_fix_symbol_name): Don't try to set up file
3061 auxent if there isn't one.
3062 (coff_write_symbols): If there is no file auxent, use SYMNMLEN
3063 rather than FILNMLEN as the maximum name length.
3064
0fc9ada9
ILT
3065 * coffcode.h (bfd_coff_backend_data): Add new field
3066 _bfd_coff_print_aux.
3067 (bfd_coff_print_aux): New static function.
3068 (coff_pointerize_aux_hook (RS6000COFF_C version)): Pointerize the
3069 scnlen field of an XTY_LD csect aux entry.
3070 (coff_print_aux): New static function.
3071 (coff_slurp_symbol_table): Don't pointerize scnlen field; now done
3072 in coff_pointerize_aux_hook.
3073 (bfd_coff_std_swap_table): Initialize new field.
3074 * coffgen.c (coff_print_symbol): Call bfd_coff_print_aux.
3075 * libcoff.h: Rebuild.
3076 * coff-alpha.c (alpha_ecoff_backend_data): Initialize new field.
3077 * coff-mips.c (mips_ecoff_backend_data): Likewise.
3078
7860fe38
ILT
3079 * coffcode.h (coff_write_object_contents): On AIX, clear F_RELFLG
3080 if there are symbols, for native AIX ld compatibility.
3081
c80cc833
ILT
3082 * coffcode.h (bfd_coff_backend_data): Add new field
3083 _bfd_coff_pointerize_aux_hook.
3084 (coff_pointerize_aux_hook): Define as a function if RS6000COFF_C
3085 or I960, and as 0 otherwise.
3086 (bfd_coff_std_swap_table): Initialize new field.
3087 * libcoff.h: Rebuild.
3088 * coffgen.c (coff_pointerize_aux): Change parameters to take
3089 symbol pointer instead of type and class, and to take aux index.
3090 Call _bfd_coff_pointerize_aux_hook if it is defined.
3091 (coff_get_normalized_symtab): Always call coff_pointerize_aux.
3092 * coff-alpha.c (alpha_ecoff_backend_data): Initialize all fields.
3093 * coff-mips.c (mips_ecoff_backend_data): Likewise.
3094
c53fac12
ILT
3095 * coff-rs6000.c: Add full support for AIX archives. Rewrite old
3096 read-only/host-only support.
3097
3098 * coffcode.h (coff_slurp_symbol_table): Set C_HIDEXT symbols to be
3099 BSF_LOCAL.
d11e6b52
ILT
3100 (OTHER_GLOBAL_CLASS): Do not define to be C_HIDEXT if
3101 RS6000COFF_C.
c53fac12
ILT
3102
3103 * targets.c (bfd_target): Add _bfd_read_ar_hdr field. Modify
3104 BFD_JUMP_TABLE_ARCHIVE accordingly.
3105 * libbfd-in.h (_bfd_snarf_ar_hdr): Don't declare.
3106 (_bfd_compute_and_write_armap): Declare.
3107 (_bfd_generic_read_ar_hdr): Declare.
3108 (_bfd_read_ar_hdr): Define.
3109 (_bfd_noarchive_read_ar_hdr): Define.
3110 (_bfd_archive_bsd_read_ar_hdr): Define.
3111 (_bfd_archive_coff_read_ar_hdr): Define.
3112 * archive.c: Change all callers of _bfd_snarf_ar_hdr to call
3113 _bfd_read_ar_hdr instead.
3114 (_bfd_generic_read_ar_hdr): Rename from _bfd_snarf_ar_hdr.
3115 (_bfd_compute_and_write_armap): Rename from
3116 compute_and_write_armap. Make non-static. Change all callers.
3117 * ecoff.c (_bfd_ecoff_slurp_armap): Call _bfd_read_ar_hdr rather
3118 than _bfd_snarf_ar_hdr.
3119 * aout-target.h (MY_read_ar_hdr): Define if not defined.
3120 * ieee.c (ieee_read_ar_hdr): Define.
3121 * libecoff.h (_bfd_ecoff_read_ar_hdr): Define.
3122 * oasys.c (oasys_read_ar_hdr): Define.
3123 * som.c (som_read_ar_hdr): Define.
3124 * bfd-in2.h, libbfd.h: Rebuild.
3125
f8e47484
SC
3126Thu Oct 5 14:04:07 1995 steve chamberlain <sac@slash.cygnus.com>
3127
3128 * peicode.c (coff_swap_filehdr_in): If symptr is
3129 zero, there aren't any symbols, even if nsyms is set.
3130
2b874a2d
ILT
3131Thu Oct 5 11:45:02 1995 Ian Lance Taylor <ian@cygnus.com>
3132
aca73687
ILT
3133 * libecoff.h (struct ecoff_backend_data): Add adjust_headers
3134 field.
3135 * ecoff.c (ecoff_sec_to_styp_flags): Check for various Alpha
3136 sections, and set styp correctly for them: .got, .hash, .dynamic,
3137 .liblist, .rel.dyn, .conflic, .dynstr, .dynsym, .comment.
3138 (_bfd_ecoff_styp_to_sec_flags): Check for various Alpha section
3139 types.
3140 (ecoff_sort_hdrs): New static function.
3141 (ecoff_compute_section_file_positions): Return boolean, not void.
3142 Sort the sections by VMA before looking through them. Put the
3143 first non SEC_ALLOC section on a new page. Put every SEC_ALLOC
3144 section on an appropriate boundary within the page.
3145 (ecoff_compute_reloc_file_positions): Check return value of
3146 ecoff_compute_section_file_positions.
3147 (_bfd_ecoff_set_section_contents): Likewise.
3148 (_bfd_ecoff_write_object_contents): Check for various Alpha
3149 section types when incrementing text_size and data_size. Call
3150 adjust_headers backend function if it exists.
3151 * coff-alpha.c (alpha_adjust_headers): New static function.
3152 (alpha_ecoff_backend_data): Initialize adjust_headers field.
3153 * coff-mips.c (mips_ecoff_backend_data): Likewise.
3154
2b874a2d
ILT
3155 * hosts/i386bsd.h: Restore file incorrectly deleted on Sep 6.
3156
c780e5db
JL
3157Wed Oct 4 18:15:02 1995 Jeff Law (law@hurl.cygnus.com)
3158
3159 * rs6000-core.c (CORE_VERSION_1): Use CORE_VERSION_1 instead
3160 of ALTERNATE_AIX_CORE_FORMAT.
3161 * configure.in (aix4): No longer need CORE_FLAGS.
3162 * configure: Updated.
3163
2a01c351
KR
3164Wed Oct 4 15:36:36 1995 Ken Raeburn <raeburn@cygnus.com>
3165
3166 NS32k changes from Ian Dall:
3167 * aoutx.h (MY_final_link_relocate, MY_relocate_contents): New
3168 macros.
3169 (aout_link_input_section_std, aout_link_input_section_ext,
3170 aout_link_reloc_link_order): Call them instead of _bfd_*
3171 versions.
3172 * aout-target.h (MY_exec_header_not_counted): New macro, defaults
3173 to zero.
3174 (backend_data): Use it instead of hardcoded zero.
3175
3176 * aout-ns32k.c (CTOR_TABLE_RELOC_HOWTO): New macro.
3177 (MY_swap_std_reloc_out): Use udata.i for KEEPIT, don't call stoi.
3178
3179 * ns32knetbsd.c: Include bfd.h.
3180 (MY_text_includes_header, MY_bfd_reloc_type_lookup): New macros.
3181 (MY_bfd_reloc_type_lookup): Declare function too.
3182 * pc532-mach.c (set_sizes): Don't declare.
3183 (MY_text_includes_header, MY_exec_header_not_counted): Define.
3184 (backend_data, MY_backend_data): Don't define.
3185
3186 * config.bfd: Treat ns32k-pc532-ux* like ns32k-pc532-mach*, and
3187 ns32k-*-lites* like ns32k-*-netbsd*.
3188
3189 * hosts/nbsd.h: Swap order of sys/vmparam.h and sys/param.h, to
3190 compile on lites.
3191
5944d75b
ILT
3192Wed Oct 4 14:15:52 1995 Ian Lance Taylor <ian@cygnus.com>
3193
3194 * coffcode.h (coff_write_object_contents): Restore setting
3195 f_timdat to 0, deleted on August 22.
3196
db344f82
SC
3197Tue Oct 3 16:28:32 1995 steve chamberlain <sac@slash.cygnus.com>
3198
3199 * coffcode.h (coff_bfd_copy_private_symbol_data,
3200 coff_bfd_copy_private_section_data,
3201 coff_bfd_copy_private_bfd_data): ifdef to allow overrides.
3202 * peicode.h (coff_bfd_copy_private_bfd_data): New
3203 (pe_bfd_copy_private_bfd_data): New.
3204 (coff_swap_scnhdr_in): Swap bss size into the right place.
3205 (pe_print_private_bfd_data): Add some newlines.
5944d75b 3206
c780e5db 3207Tue Oct 3 11:53:04 1995 Jeff Law (law@hurl.cygnus.com)
97f1feda
JL
3208
3209 * som.c (setup_sections): Don't die if a space has no subspaces.
3210
3d7c42c9
ILT
3211Mon Oct 2 14:08:55 1995 Ian Lance Taylor <ian@cygnus.com>
3212
3213 * elflink.h (elf_link_add_object_symbols): Don't let a weak
3214 dynamic symbol override a common symbol. Don't change the size or
3215 type if they have been set and the new symbol is not a definition.
3216 Warn if the size or type changes.
3217
c780e5db 3218Sun Oct 1 01:34:41 1995 Jeff Law (law@hurl.cygnus.com)
709af562
JL
3219
3220 * som.c (som_begin_writing): Don't write the symbol table or
3221 symbol strings.
3222 (som_finish_writing): Write them here. Place them after the
3223 subspace data, but before the relocs.
3224
3225Fri Sep 29 11:01:55 1995 Ian Lance Taylor <ian@cygnus.com>
3226
3227 * sunos.c (sunos_add_one_symbol): Just pass false, not
3228 info->shared_library, to sunos_create_dynamic_sections.
3229 (sunos_scan_ext_relocs): Don't warn about a reloc in the .text
3230 section.
3231 (sunos_check_dynamic_reloc): Remove .text section assertion.
3232
7009e451
SS
3233Thu Sep 28 18:48:47 1995 Stan Shebs <shebs@andros.cygnus.com>
3234
3235 * config.bfd: Add powerpc-*-macos*, powerpc-*-mpw*.
3236 * configure, configure.in: Add pmac_xcoff_vec case.
3237 * Makefile.in (BFD32_BACKENDS): Add coff-pmac.o.
3238 * coff-pmac.c: New file, PowerMac XCOFF support.
3239 * coffcode.h (coff_set_arch_mach_hook): Add PowerMac case.
3240 * targets.c (pmac_xcoff_vec): Declare.
3241
3242 * mpw-config.in: Various changes to be compatible with the
3243 autoconf-based configury.
3244 * mpw-make.sed: New file, sed commands to translate Unix
3245 makefile into MPW syntax.
3246 * mpw-make.in: Remove.
3247 * hosts/mpw.h: Remove.
3248 * bfd-in.h, bfd-in2.h: If MPW, include the file that defines
3249 true and false as enums, then define TRUE_FALSE_ALREADY_DEFINED.
3250
b91537be
SC
3251Thu Sep 28 17:06:23 1995 steve chamberlain <sac@slash.cygnus.com>
3252
3253 * binary.c (binary_get_symtab): Return an empty string on error.
3254 * opncls.c (bfd_fdpenr): Change WIN32 restriction to WINGDB.
3255
30360a6f
KK
3256Thu Sep 28 15:30:44 1995 Kim Knuttila <krk@nellie>
3257
3258 * coff-ppc.c: Reformatted according to gnu conventions
3259 Removed irrelevant "if 0" code
3260
20d1e233
ILT
3261Thu Sep 28 11:19:53 1995 Ian Lance Taylor <ian@cygnus.com>
3262
69fd4fdd
ILT
3263 * hp300hpux.c (convert_sym_type): Treat secondary symbols as weak
3264 symbols rather than as indirect symbols.
3265 (MY(slurp_symbol_table)): Don't do anything special about
3266 secondary symbols.
3267
46b5a892
ILT
3268 * coffcode.h (coff_new_section_hook): Make sure that the alignment
3269 of .ctors and .dtors sections is no larger than 2.
3270
9db59230
ILT
3271 * sunos.c (sunos_add_one_symbol): Don't change
3272 bfd_link_hash_common to bfd_link_hash_new, since it may be on the
3273 undef list.
3274 (bfd_sunos_record_link_assignment): Don't put __DYNAMIC in the
3275 dynamic symbols when creating a shared library.
3276 (sunos_scan_ext_relocs): Handle relocs correctly when creating a
3277 shared library.
3278 (sunos_scan_dynamic_symbol): Don't mark the __DYNAMIC symbol as
3279 written even if it is not defined in a regular object.
3280 (sunos_write_dynamic_symbol): Use plt_offset for the address of
3281 the jump table reloc. Add an assertion. Use RELOC_JMP_SLOT
3282 rather than the constant 22.
3283 (sunos_check_dynamic_reloc): Handle creating a shared library.
3284 (sunos_finish_dynamic_link): Set the first entry in the GOT to
3285 zero when creating a shared library.
3286 * aoutx.h (NAME(aout,final_link)): If there is a symbol __DYNAMIC,
3287 write it out at the start of the symbol table.
3288
20d1e233
ILT
3289 * Makefile.in (BFD32_BACKENDS): Add coff-arm.o.
3290
a11e10fe
DE
3291Thu Sep 28 00:58:05 1995 Doug Evans <dje@deneb.cygnus.com>
3292
3293 * config.bfd: Add arm-*-coff.
3294 * configure.in, configure: Add armcoff_{little,big}_vec.
3295 * targets.c (armcoff_{little,big}_vec): Declare.
3296 (bfd_target_vector): Add armcoff_{little,big}_vec.
3297 * coff-arm.c (armcoff_{little,big}_vec): Always define.
3298
99062cfc
ILT
3299Wed Sep 27 10:37:14 1995 Ian Lance Taylor <ian@cygnus.com>
3300
3301 * targets.c (bfd_find_target): Remove debugging code.
3302
deacbe0f
KK
3303Wed Sep 27 07:23:39 1995 Kim Knuttila <krk@nellie>
3304
3305 * coff-ppc.c, pe-ppc.c, pei-ppc.c: Initial bfd for coff/PE
3306 support on powerpc.
3307 * Makefile.in: added *-ppc files
3308 * coffcode.h: ppc MAGIC, and use peicode.h rather than coffswap.h to
3309 allow pe based .o's to be shared with other tools on ppc/NT
3310 * config.bfd: added powerpc[le]-[pe|winnt] config support
3311 * configure, configure.in: added bfd_powerpc[le]_pe[i]_vec
3312 * peicode.h: Added more section flags for PE on ppc
3313 Added coff_swap_filehdr_out to allow peicode.h to be
3314 used for non-image PE files on ppc.
3315 Check for image, or not, before copying pe_opthdr
3316 * targets.c: Added new bfd's
30360a6f
KK
3317 * targets.c: Removed two inactive bfds that shouldn't have made it this
3318 far.
deacbe0f 3319
d22b02e0
MM
3320Tue Sep 26 14:06:41 1995 Michael Meissner <meissner@tiktok.cygnus.com>
3321
3322 * elf32-ppc.c (ppc_reloc_type): Rename from reloc_type, and use
3323 explicit values to initialize all relocs. Change all users.
3324 (ppc_elf_brtaken_inner): New function to handle branch predicition
3325 relocs.
3326 (ppc_elf_brtaken_reloc): Ditto.
3327 (ppc_elf_howto_raw): Use new functions. Make sure all unsupported
3328 relocs use ppc_elf_unsupported_reloc.
3329 (ppc_elf_merge_private_bfd_data): Keep track of whether an error
3330 needs to be reported.
3331 (ppc_elf_relocate_section): Support branch prediction relocs.
3332
fcf490c0
ILT
3333Tue Sep 26 12:48:05 1995 Ian Lance Taylor <ian@cygnus.com>
3334
e6cb7b41
ILT
3335 * bfd.c (bfd_assert): Remove \n from string passed to
3336 _bfd_error_handler.
3337
1af85fbb
ILT
3338 * coff-i386.c: (TWO_DATA_SECS): Don't define.
3339 * coffcode.h (bfd_coff_backend_data): Remove _bfd_make_section_hook.
3340 (bfd_coff_make_section_hook): Don't define.
3341 (coff_make_section_hook): Remove.
3342 (sec_to_styp_flags): Remove TWO_DATA_SECS case.
3343 (styp_to_sec_flags): Likewise.
3344 (coff_write_object_contents): Likewise.
3345 (bfd_coff_std_swap_table): Don't initialize make_section_hook
3346 field.
3347 * libcoff.h: Rebuild.
3348 * coffgen.c (make_a_section_from_file): Just call
3349 bfd_make_section_anyway, not bfd_make_section or
3350 bfd_coff_make_section_hook.
3351 * ecoff.c (_bfd_ecoff_make_section_hook): Remove.
3352 * libecoff.h (_bfd_ecoff_make_section_hook): Don't declare.
3353 * coff-alpha.c (alpha_ecoff_backend_data): Don't initialize
3354 make_section_hook field.
3355 * coff-mips.c (mips_ecoff_backend_data): Likewise.
3356
fcf490c0
ILT
3357 * aoutx.h (translate_from_native_sym_flags): Don't try to stuff
3358 pointers into value field for warning and indirect symbols; just
3359 leave the value field alone.
3360 * linker.c (generic_link_add_symbol_list): Use next symbol for
3361 warning and indirect symbols, rather than looking in symbol value.
3362 * ecoff.c (ecoff_set_symbol_info): Remove indirect_ptr_ptr
3363 parameter. Change all callers. Remove support for indirect
3364 symbols; it didn't work anyhow.
3365 (_bfd_ecoff_slurp_symbol_table): Remove indirect_ptr variable.
3366 * syms.c: Change comments about BSF_WARNING and BSF_INDIRECT.
3367 * bfd-in2.h: Rebuild.
3368
cc47d19a
MM
3369Mon Sep 25 16:04:09 1995 Michael Meissner <meissner@tiktok.cygnus.com>
3370
3371 * elf32-ppc.c (ppc_elf_howto_raw): For all 14-bit branch relocs,
3372 go back to telling the tools this reloc operates on 32 bits.
3373
81449d47
ILT
3374Mon Sep 25 11:48:02 1995 Ian Lance Taylor <ian@cygnus.com>
3375
7a7fbffb
ILT
3376 * aout-adobe.c (aout_adobe_callback): Use _bfd_error_handler
3377 rather than a direct fprintf.
3378 * archive.c (_bfd_write_archive_contents): Likewise.
3379 * coffcode.h (coff_slurp_symbol_table): Likewise.
3380 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Likewise.
3381 (ppc_elf_unsupported_reloc): Likewise.
3382 (ppc_elf_relocate_section): Likewise.
3383 * i386linux.c (linux_tally_symbols): Likewise.
3384 (linux_finish_dynamic_link): Likewise.
3385 * osf-core.c (osf_core_core_file_p): Likewise.
3386 * rs6000-core.c (rs6000coff_get_section_contents): Likewise.
3387 * som.c (som_sizeof_headers): Likewise.
3388 * srec.c (srec_bad_byte): Likewise.
3389 * bfd.c (bfd_assert): Likewise. Also change file to be const.
3390 * libbfd-in.h (bfd_assert): Declare first parameter const.
3391 * libbfd.h: Rebuild.
3392 * coff-a29k.c (a29k_reloc): Don't bother to fprintf; returning
3393 bfd_reloc_overflow is enough.
3394 * coff-h8300.c (rtype2howto): Don't bother to fprintf; just abort.
3395 * coff-h8500.c (rtype2howto): Likewise.
3396 * coff-z8k.c (rtype2howto): Likewise.
3397 * coffcode.h (dummy_reloc16_extra_cases): Likewise.
3398 * elf.c (_bfd_elf_get_lineno): Likewise.
3399 (_bfd_elf_no_info_to_howto): Likewise.
3400 (_bfd_elf_no_info_to_howto_rel): Likewise.
3401 * hp300hpux.c (convert_sym_type): Likewise.
3402 (MY(swap_std_reloc_in)): Likewise.
3403 * elf.c (bfd_section_from_shdr): Remove #if 0 sections.
3404
f1c6dd5d
ILT
3405 * libaout.h (struct aoutdata): Add line_buf field.
3406 * aoutx.h (NAME(aout,find_nearest_line)): Remove statics buffer
3407 and filename_buffer. Instead, use a malloc buffer stored in the
3408 new line_buf field. Remove length restrictions.
3409
f0500a41
ILT
3410 * coffgen.c (string_size): Remove static variable.
3411 (debug_string_size, debug_string_section): Likewise.
3412 (coff_fix_symbol_name): Add string_size_p, debug_string_section_p,
3413 and debug_string_size_p parameters. Use them instead of the
3414 global variables. Change all callers.
3415 (coff_write_symbol): Likewise.
3416 (coff_write_alien_symbol, coff_write_native_symbol): Likewise.
3417 (coff_write_symbols): Add local variables to replace removed
3418 global variables.
3419
25b5a53d
ILT
3420 * libcoff-in.h (struct coff_section_tdata): Add offset, i,
3421 function, and line_base fields.
3422 * libcoff.h: Rebuild.
3423 * coffgen.c (coff_find_nearest_line): Use section tdata to cache
3424 information, rather than using static variables.
3425
641ac26a
ILT
3426 * sunos.c (sunos_read_dynamic_info): Adjust offsets in an NMAGIC
3427 file. From Peter DeWolf <pld@amt.tay1.dec.com>.
3428
81449d47
ILT
3429 * init.c (initialized): Remove static variable.
3430 (bfd_init): Don't bother setting initialized.
3431 (bfd_check_init): Remove.
3432 * opncls.c (_bfd_new_bfd): Don't call bfd_check_init.
3433 * libbfd.h: Rebuild.
3434
138b9b81
PS
3435Sat Sep 23 01:22:23 1995 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
3436
3437 * rs6000-core.c (rs6000coff_core_p): Don't check the core file
3438 size for full core dumps. Copy core file header to private data.
3439 (rs6000coff_core_file_failing_command,
3440 rs6000coff_core_file_failing_signal): New functions to extract
3441 the file name and terminating signal from the core file.
3442 * coff-rs6000.c: Use them.
3443
2ffbb79a
ILT
3444Fri Sep 22 17:44:47 1995 Ian Lance Taylor <ian@cygnus.com>
3445
3446 Change arch info to be const, initialized at compile time.
3447 * archures.c: Reindent many functions. Change CONST to const.
3448 (bfd_arch_info_type): Make arch_name const. Remove disassemble;
3449 nothing set it anyhow. Make next const.
3450 (bfd_arch_info_list): Remove.
3451 (bfd_archures_list): Rename from archures_init_table. Change from
3452 a table of function pointers to a table of bfd_arch_info_type
3453 structure addresses.
3454 (bfd_scan_arch): Rewrite accordingly. Return a const pointer.
3455 (bfd_lookup_arch): Likewise.
3456 (bfd_set_arch_info): Rewrite accordingly. Change argument to be a
3457 const pointer.
3458 (bfd_default_arch_struct): Make const.
3459 (bfd_arch_init, bfd_arch_linkin): Remove.
3460 (bfd_get_arch_info): Return a const pointer.
3461 * init.c (bfd_init): Don't call bfd_arch_init.
3462 * bfd.c (struct _bfd): Make arch_info const.
3463 * bfd-in2.h: Rebuild.
3464 * libbfd.h: Rebuild.
3465 * configure.in: Put & before everything in $selarchs.
3466 * configure: Rebuild.
3467 * cpu-*.c: Change bfd_*_arch from a function which calls
3468 bfd_arch_linkin to a const structure.
3469 * ieee.c (ieee_object_p): Make arch const.
3470
02f85cda
MM
3471Fri Sep 22 16:23:18 1995 Michael Meissner <meissner@tiktok.cygnus.com>
3472
3473 * reloc.c (bfd_reloc_code_type): Add relocations to support all of
3474 PowerPC V.4.
3475 * bfd-in2.h: Regenerate.
3476 * libbfd.h: Regenerate.
3477
3478 * elf32-ppc.c (reloc_type): Update names to match current draft.
3479 (ppc_elf_howto_raw): Mark 14 bit relocs as short sized and PC
3480 relative. Update names to current V.4 draft.
3481 (ppc_elf_reloc_type_lookup): Add support for more relocations.
3482 (ppc_elf_relocate_section): Rename relocations to match draft.
3483
dd82c578
MM
3484Thu Sep 21 21:53:18 1995 Michael Meissner <meissner@cygnus.com>
3485
3486 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Allow modules
3487 compiled with -mrelocatable-lib to be linked with either normal
3488 modules or -mrelocatable modules.
3489
f69e888e
ILT
3490Wed Sep 20 12:03:26 1995 Ian Lance Taylor <ian@cygnus.com>
3491
e18c4e8f
ILT
3492 * coffcode.h (coff_write_object_contents): Clear the vstamp field
3493 in the a.out header.
3494
f69e888e
ILT
3495 * aoutx.h (NAME(aout,swap_ext_reloc_out)): Don't set r_extern for
3496 a reloc against a local symbol, even if it's not a section.
3497
a5655244
ILT
3498Tue Sep 19 17:02:26 1995 Ian Lance Taylor <ian@cygnus.com>
3499
3500 * targets.c (bfd_target): Remove unused align_power_min field.
3501 * bfd-in2.h: Rebuild.
3502 * All backends: Remove initialization of align_power_min.
3503
500d7394
SC
3504Tue Sep 19 14:02:21 1995 steve chamberlain <sac@slash.cygnus.com>
3505
3506 * peicode.h (coff_swap_scnhdr_out): Get sizes for BSS right.
500d7394 3507
049df0a8
ILT
3508Mon Sep 18 14:35:01 1995 Arne H. Juul <arnej@pvv.unit.no>
3509
3510 * config.bfd (mips-dec-netbsd*): New target.
3511 * configure.host (mips-dec-netbsd*): New host.
3512 * configure.in (mips-dec-netbsd*): New native.
3513 * configure: Rebuild.
3514
1862bbd8
ILT
3515Fri Sep 15 10:24:36 1995 Ian Lance Taylor <ian@cygnus.com>
3516
3517 Make the COFF backend linker merge common types:
3518 * cofflink.c (struct coff_debug_merge_element): Define.
3519 (struct coff_debug_merge_type): Define.
3520 (struct coff_debug_merge_hash_entry): Define.
3521 (struct coff_debug_merge_hash_table): Define.
3522 (coff_debug_merge_hash_table_init): Define.
3523 (coff_debug_merge_hash_table_free): Define.
3524 (coff_debug_merge_hash_lookup): Define.
3525 (struct coff_final_link_info): Add debug_merge field.
3526 (coff_debug_merge_hash_newfunc): New static function.
3527 (_bfd_coff_final_link): Allocate and free debug_merge table.
3528 (coff_link_input_bfd): Merge identical enum, struct and union
3529 types.
3530
a208a70f
ILT
3531Thu Sep 14 14:53:58 1995 Ian Lance Taylor <ian@cygnus.com>
3532
3533 Convert i960 COFF to use COFF backend linker.
3534 * coff-i960.c (coff_i960_relocate): Use a coff_section_data
3535 structure to store the symbol being used.
3536 (coff_i960_start_final_link): New static function.
3537 (coff_i960_relocate_section): New static function.
3538 (coff_i960_adjust_symndx): New static function.
3539 (coff_start_final_link): Define.
3540 (coff_relocate_section): Define.
3541 (coff_adjust_symndx): Define.
3542 * coffcode.h (bfd_coff_backend_data): Add new callback function
3543 _bfd_coff_start_final_link.
3544 (bfd_coff_start_final_link): Define.
3545 (coff_start_final_link): Define if not defined.
3546 (bfd_coff_std_swap_table): Add coff_start_final_link.
3547 * cofflink.c (_bfd_coff_internal_syment_name): Make globally
3548 visible.
3549 (_bfd_coff_final_link): Call bfd_coff_start_final_link if the
3550 function callback is not NULL.
3551 * libcoff-in.h (struct coff_section_tdata): Add tdata field.
3552 (_bfd_coff_internal_syment_name): Declare.
3553 * libcoff.h: Rebuild.
3554 * configure.in (icoff_big_vec): Add cofflink.o.
3555 (icoff_little_vec): Likewise.
3556 * configure: Rebuild.
3557
f0abedbe
FF
3558Wed Sep 13 17:38:23 1995 Fred Fish <fnf@rtl.cygnus.com>
3559
3560 * Makefile.in (clean-info): Remove extraneous tab from line
3561 following action.
3562
aa4b3dc5
ILT
3563Wed Sep 13 13:27:53 1995 Ian Lance Taylor <ian@cygnus.com>
3564
3565 * cofflink.c (coff_link_input_bfd): Fail if a section with no
3566 contents has relocs.
3567
4ca63811 3568Thu Sep 12 12:45:34 1995 steve chamberlain <sac@slash.cygnus.com>
beee31b1
SC
3569
3570 * coffcode.h (coff_compute_section_file_positions): Keep the
3571 raw size safe.
3572 (coff_write_object_contents): Remember if it's a relocatable
3573 file.
3574 * libcoff-in.h (pe_data_type): New member 'has_reloc_section'
3575 * peicode.h (coff_swap_filehdr_out): Clear not-reloc flag
3576 if relocatable file. Swap out saved raw size.
3577
ae115e51
ILT
3578Tue Sep 12 12:14:33 1995 Ian Lance Taylor <ian@cygnus.com>
3579
9521bac3
ILT
3580 * Makefile.in (do_maintainer_clean): Rename from do_realclean.
3581 (maintainer-clean): Rename from realclean, passing
3582 maintainer-clean down to subdirectories, but leave realclean as a
3583 synonym.
3584
4ca63811
ILT
3585 * linker.c (_bfd_generic_link_add_one_symbol): Pass symbol name to
3586 warning callback.
3587
5aa4c3ff
ILT
3588 * dep-in.sed: Remove config.h from generated dependencies.
3589
396aaeb2
ILT
3590 * sunos.c (sunos_slurp_dynamic_symtab): New static function,
3591 broken out of sunos_canonicalize_dynamic_symtab.
3592 (sunos_canonicalize_dynamic_symtab): Call new function
3593 sunos_slurp_dynamic_symtab.
3594 (sunos_add_dynamic_symbols): Add three new parameters. Return the
3595 dynamic symbol table to the caller.
3596 * aoutx.h (aout_link_add_symbols): Permit add_dynamic_symbols
3597 callback to override the symbols being read.
3598 * libaout.h (struct aout_backend_data): Add three new parameters
3599 to add_dynamic_symbols callback.
3600
ae115e51
ILT
3601 Extensive minor changes to avoid various gcc warnings. Also:
3602 * Makefile.in (BFD32_BACKENDS): Remove coff-arm.o.
3603 * archures.c (bfd_arch_info_type): Change mach field from long to
3604 unsigned long.
3605 (bfd_lookup_arch): Change machine parameter from long to unsigned
3606 long.
3607
b088e4b2
ILT
3608Mon Sep 11 10:55:47 1995 Ian Lance Taylor <ian@cygnus.com>
3609
3610 * sunos.c (sunos_scan_std_relocs): Fix BFD_ASSERT: it's OK to find
3611 a symbol with a non-zero plt_offset.
3612
1dff7902
ILT
3613Fri Sep 8 11:47:24 1995 Ian Lance Taylor <ian@cygnus.com>
3614
2b71e1e4
ILT
3615 * elfcode.h (align_file_position): Remove; not used.
3616
1dff7902
ILT
3617 * configure.in: Only check for <sys/procfs.h> on a native system,
3618 and make sure it defines prstatus_t.
3619 * configure: Rebuild.
3620
870015b1
ILT
3621Thu Sep 7 12:48:01 1995 Ian Lance Taylor <ian@cygnus.com>
3622
535c89f0
ILT
3623 * sunos.c (sunos_write_dynamic_symbol): Correct m68k abort test.
3624
936b870c
ILT
3625 * config.in: Rename from config.h.in.
3626 * configure.in: Call AC_CONFIG_HEADER with config.h:config.in.
a7873a6c 3627 Check for config.h:config.in when creating stamp-h.
936b870c 3628 * configure: Rebuild.
a7873a6c
ILT
3629 * Makefile.in (stamp-h): Depend upon config.in rather than
3630 config.h.in. Set CONFIG_HEADERS to config.h:config.in when
3631 calling config.status.
936b870c 3632
870015b1
ILT
3633 * Makefile.in (do_distclean): Remove config.h and stamp-h.
3634 (Makefile): Just rebuild Makefile.
3635 (config.h, stamp-h): New targets.
3636 * configure.in: Create stamp-h when rebuilding config.h.
3637 * configure: Rebuild.
3638
b7577823
ILT
3639Wed Sep 6 15:00:33 1995 Ian Lance Taylor <ian@cygnus.com>
3640
3641 * configure.in: Call AC_CONFIG_HEADER. Substitute
3642 HOST_64BIT_LONG. Check that various header files exist. Check
3643 that fcntl exists. Call BFD_BINARY_FOPEN. Check whether malloc
3644 and/or free need to be declared. Don't make a link to sysdep.h.
3645 Define TRAD_HEADER for various hosts.
3646 * configure: Rebuild.
3647 * configure.host: Don't set my_host. Add definitions taken from
3648 host header files for various entries. Remove entries which now
3649 do nothing.
3650 * acconfig.h: New file.
3651 * config.h.in: New file, built by autoheader.
3652 * sysdep.h: New file.
3653 * Makefile.in (do_distclean): Don't remove sysdep.h.
3654 (RECONFIG): Remove.
3655 (LOCAL_H_DEPS): New variable.
3656 ($(BFD_LIBS)): Use $(LOCAL_H_DEPS) rather than libbfd.h and
3657 $(RECONFIG).
3658 ($(BFD_MACHINES), $(BFD_BACKENDS)): Likewise.
3659 ($(OPTIONAL_BACKENDS)): Likewise.
3660 (stmp-bfd.h): Just substitute for BFD_HOST_64BIT_LONG, rather than
3661 looking through sysdep.h.
3662 * bfd-in.h (BFD_HOST_64BIT_LONG): Define; set by Makefile.
3663 (BFD_HOST_64_BIT): Define based on BFD_HOST_64BIT_LONG.
3664 (fprintf_vma, sprintf_vma): Likewise.
3665 (int64_type, uint64_type): Don't define.
3666 * bfd-in2.h: Rebuild.
3667 * archures.c, bfd.c, srec.c: Include <ctype.h>.
3668 * elfcore.h: Check HAVE_SYS_PROCFS_H rather than HAVE_PROCFS.
3669 * lynx-core.c: Include stuff from old hosts/lynx.h.
3670 * opncls.c (bfd_fdopenr): Check HAVE_FNCTL and defined (F_GETFL),
3671 rather than NO_FCNTL.
3672 * targets.c (bfd_target_list): Check HOST_HPPAHPUX and ! __STDC__
3673 rather than NATIVE_HPPAHPUX_COMPILER.
3674 * trad-core.c: Don't include <errno.h>. Include TRAD_HEADER if it
3675 is defined.
3676 * hosts/*.h: Remove all header files which merely include,
3677 declare, and define things. Leave header files which define
3678 information needed by trad-core.c.
3679
3680 * aclocal.m4 (BFD_BINARY_FOPEN): Define.
3681 (BFD_CC_FOR_BUILD): Define.
3682 * configure.in: Use BFD_CC_FOR_BUILD.
3683 * configure: Rebuild.
3684
7a93ebdd
ILT
3685Tue Sep 5 19:35:28 1995 Ian Lance Taylor <ian@cygnus.com>
3686
4c2e4d0e
ILT
3687 * aclocal.m4: Don't try to grep ../Makefile if it doesn't exist.
3688 * configure: Rebuild.
3689
7a93ebdd
ILT
3690 * coff-sparc.c (CALC_ADDEND): Don't set the addend to the value of
3691 a global symbol.
3692
866bb9e5
JM
3693Tue Sep 5 12:48:26 1995 Jason Molenda (crash@phydeaux.cygnus.com)
3694
3695 * config.bfd: i386pe_ve -> i386pe_vec.
3696
2b79a104
ILT
3697Mon Sep 4 14:02:43 1995 Ian Lance Taylor <ian@cygnus.com>
3698
f515fb2f
ILT
3699 * configure.host: Incorporate host Makefile fragments by setting
3700 shell variables.
3701 * configure.in: Call AC_PROG_CC. Substitute CFLAGS, HDEFINES and
3702 AR. Call AC_PROG_INSTALL. Substitute CC_FOR_BUILD, choosing a
3703 value based on whether the code is being compiled by a cross
3704 compiler. Don't substitute host_makefile_frag or frags.
3705 * aclocal.m4: New file to define local AC_PROG_CC.
3706 * configure: Rebuild.
3707 * Makefile.in (INSTALL): Set to @INSTALL@.
3708 (INSTALL_PROGRAM): Set to @INSTALL_PROGRAM@.
3709 (INSTALL_DATA): Set to @INSTALL_DATA@.
3710 (AR): Set to @AR@.
3711 (CC): Define as @CC@.
3712 (CFLAGS): Set to @CFLAGS@.
3713 (CC_FOR_BUILD): Set to @CC_FOR_BUILD@.
3714 (@host_makefile_frag@): Remove.
3715 (ALL_CFLAGS): Change $(HDEFINES) to @HDEFINES@. Move $(CFLAGS)
3716 after other options.
3717 (config.status): Remove dependency upon @frags@.
3718 * config/*.mh, config/README: Remove.
3719
2b79a104
ILT
3720 * config.bfd: Rewrite to incorporate the contents of the Makefile
3721 fragments by setting shell variables, rather than merely returning
3722 the name of a Makefile fragment.
3723 * configure.in: Use shell variables set by config.bfd rather than
3724 looking at the target Makefile fragment files. Don't substitute
3725 target_makefile_frag. Do substitute TDEFINES.
3726 * configure: Rebuild.
3727 * Makefile.in (@target_makefile_frag@): Remove.
3728 (ALL_CFLAGS): Change $(TDEFINES) to @TDEFINES@.
3729 * config/*.mt: Remove.
3730
2cb159a5
KR
3731Mon Sep 4 03:13:28 1995 Ken Raeburn <raeburn@cygnus.com>
3732
3733 * configure.in: Put changequote lines around "i[345]86" patterns
3734 section of core file support.
3735
ef07871c
JL
3736Sun Sep 3 11:31:58 1995 Jeff Law (law@snake.cs.utah.edu)
3737
3738 * som.c (som_bfd_print_private_bfd_data): Define to use the
3739 generic version.
3740
1613e075
SC
3741Fri Sep 1 17:08:40 1995 steve chamberlain <sac@slash.cygnus.com>
3742
3743 * peicode.h (coff_swap_aouthdr_in): Add ImageBase to
3744 entry, text_start and data_start.
3745
a52a3ce8
ILT
3746Fri Sep 1 18:06:28 1995 Ian Lance Taylor <ian@cygnus.com>
3747
a21227ef
ILT
3748 * Makefile.in (OFILES): Remove $(TDEPFILES).
3749 * config/apollo.mt (TDEPFILES): Remove.
3750 * config/README: Update.
3751
a52a3ce8
ILT
3752 * configure.in: For a native configuration, set COREFILE and
3753 COREFLAG based on the canonical host name.
3754 * configure: Rebuild.
3755 * Makefile.in: Rebuild dependencies.
3756 (ALL_CFLAGS): Add @COREFLAG@.
3757 (OFILES): Replace $(HDEPFILES) with @COREFILE@.
3758 * coff-rs6000.c: Check AIX_CORE rather than HOST_AIX for core file
3759 support routines. Check LYNX_CORE rather than HOST_LYNX.
3760 * lynx-core.c: Check LYNX_CORE rather than HOST_LYNX.
3761 * i386lynx.c: Likewise.
3762 * m68klynx.c: Likewise.
3763 * sparclynx.c: Likewise.
3764 * rs6000-core.c: Check AIX_CORE rather than HOST_AIX.
3765 * *-core.c: Comment changes.
3766 * config/decstation.mh (HDEPFILES): Remove.
3767 (HDEFINES): Remove -DTRAD_CORE.
3768 * config/irix3.mh (RANLIB): Remove.
3769 * config/irix4.mh (HDEPFILES, RANLIB): Remove.
3770 (HDEFINES): Remove -DIRIX_CORE.
3771 * config/riscos.mh (RANLIB, HDEPFILES): Remove.
3772 (HDEFINES): Remove -DTRAD_CORE.
3773 * config/ncr3000.mh (AR_FLAGS, RANLIB): Remove.
3774 * config/ultra3.mh (RANLIB): Remove.
3775 * config/aix4.mh, config/alphaosf.mh, config/amix.mh: Remove.
3776 * config/apollo.mh, config/delta68.mh, config/delta88.mh: Remove.
3777 * config/dpx2.mh, config/esix.mh, config/harris.mh: Remove.
3778 * config/hp300.mh, config/hp300bsd.mh, config/hppabsd.mh: Remove.
3779 * config/hppahpux.mh, config/hppaosf.mh: Remove.
3780 * config/i386aix.mh, config/i386bsd.mh: Remove.
3781 * config/i386linux.mh, config/i386mach3.mh: Remove.
3782 * config/i386sco.mh, config/i386v.mh, config/i386v4.mh: Remove.
3783 * config/irix5.mh, config/m88kmach3.mh, config/mipsbsd.mh: Remove.
3784 * config/mipsmach3.mh, config/news-mips.mh: Remove.
3785 * config/news.mh, config/pc532mach.mh, config/riscix.mh: Remove.
3786 * config/rs600.mh, config/rs6000lynx.mh: Remove.
3787 * config/solaris2.mh, config/stratus.mh: Remove.
3788 * config/symmetry.mh, config/sysv4.mh, config/tahoe.mh: Remove.
3789 * config/vaxbsd.mh, config/vaxult.mh, config/vaxult2.mh: Remove.
3790
d6f672b8
ILT
3791Fri Sep 1 15:18:50 1995 Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>
3792
3793 * elflink.h (elf_bfd_final_link): Don't change a DT_INIT or
3794 DT_FINI entry if the appropriate symbol is not in the hash table.
3795
3796 * libelf.h (struct elf_backend_data): Add create_program_headers
3797 and want_hdr_in_seg fields.
3798 * elfxx-target.h (elf_backend_want_hdr_in_seg): Define if not
3799 defined.
3800 (elf_backend_create_program_headers): Likewise.
3801 (elfNN_bed): Initialize create_program_headers and
3802 want_hdr_in_seg.
3803 * elf.c (get_program_header_size): Call create_program_headers
3804 backend routine.
3805 (map_program_segments): Check want_hdr_in_seg backend field. Call
3806 create_program_headers backend routine.
3807
3808 * elf.c (assign_file_positions_except_relocs): Align non allocated
3809 sections when creating an executable.
3810
3811 * elfcode.h (elf_swap_phdr_in): Make non static.
3812 (elf_swap_phdr_out): Make non static.
3813 * libelf.h (bfd_elf32_swap_phdr_in): Declare.
3814 (bfd_elf32_swap_phdr_out): Declare.
3815 (bfd_elf64_swap_phdr_in): Declare.
3816 (bfd_elf64_swap_phdr_out): Declare.
3817
3818 * ecofflink.c (ecoff_collect_shuffle): New static function.
3819 (_bfd_ecoff_get_accumulated_pdr): New function.
3820 (_bfd_ecoff_get_accumulated_sym): New function.
3821 (_bfd_ecoff_get_accumulated_ss): New function.
3822 * libbfd-in.h (_bfd_ecoff_get_accumulated_pdr): Declare.
3823 (_bfd_ecoff_get_accumulated_sym): Declare.
3824 (_bfd_ecoff_get_accumulated_ss): Declare.
3825 * libbfd.h: Rebuild.
3826
0cb70568
ILT
3827Fri Sep 1 13:20:25 1995 Ian Lance Taylor <ian@cygnus.com>
3828
d6f672b8
ILT
3829 * libecoff.h (_bfd_ecoff_bfd_print_private_bfd_data): Fix typo.
3830
0cb70568
ILT
3831 * elflink.h (elf_link_add_object_symbols): Handle indirect and
3832 warning symbols. If any section is named .gnu.warning.XXX, treat
3833 the contents as a warning to be issued if the symbol XXX is
3834 referenced.
3835 (elf_link_output_extsym): For an indirect or warning symbol, just
3836 output the symbol it points to.
3837
3838 * linker.c (_bfd_link_hash_newfunc): Don't bother to set bfd_error
3839 if bfd_hash_allocate fails, since it will already be set.
3840 (generic_link_hash_newfunc): Likewise.
3841 (archive_hash_newfunc): Likewise.
3842 (hash_entry_bfd): New static function.
3843 (_bfd_generic_link_add_one_symbol): Pass new arguments to warning
3844 callback. Allocate a new warning using the hash table newfunc.
3845 Use bfd_hash_replace to update the entry in the hash table, rather
3846 than assuming we can copy the fields with structure assignment.
3847
3848 * hash.c (bfd_hash_replace): New function.
3849 * bfd-in.h (bfd_hash_replace): Declare.
3850 * bfd-in2.h: Rebuild.
3851
f14db880
JSC
3852Fri Sep 1 08:12:50 1995 James G. Smith <jsmith@beauty.cygnus.com>
3853
3854 * config.bfd: Add mips*vr4300-*-elf* target.
3855 * config/mipsbvr4300.mt: Added.
3856
1613e075 3857See file ChangeLog.2
e6d739eb 3858
41126f15
JK
3859\f
3860Local Variables:
3861mode: indented-text
3862left-margin: 8
6ec3bb6a
ILT
3863fill-column: 74
3864version-control: never
3865End:
This page took 0.373044 seconds and 4 git commands to generate.