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