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