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