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