* bfd/elf64-alpha.c (elf64_alpha_relocate_section): Use the
[deliverable/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
3a13dd8f
RH
1Mon Oct 13 21:24:04 1997 Richard Henderson <rth@cygnus.com>
2
3 * bfd/elf64-alpha.c (elf64_alpha_relocate_section): Use the
4 got_enties of the default symbol for the default versioned
5 symbol. Patch from hjl@gnu.ai.mit.edu, modified not to use
6 alloca in the loop.
7
c7eece07
NC
8Mon Oct 13 17:37:37 1997 Nick Clifton <nickc@cygnus.com>
9
10 * elf32-v850.c (v850_elf_final_link_relocate): Only use the bottom
11 24 bits of the PC when computing a PC relative relocation.
12
676d3f02
NC
13Fri Oct 10 16:01:30 1997 Nick Clifton <nickc@cygnus.com>
14
15 * elf32-v850.c (v850_elf_reloc, v850_elf_final_link_relocate):
16 Correct value for maximum positive 22 bit PC relative relocation.
17 (v850_elf_final_link_relocate): Prevent overflow from HI16_S and
18 HI_16 relocations. Correct bit adjustment in TDA offsets.
19
70e818d4
DE
20Thu Oct 9 16:43:39 1997 Doug Evans <dje@canuck.cygnus.com>
21
22 * elf64-sparc.c (sparc_elf_{hix22,lox10}_reloc): New functions.
23 (sparc64_elf_howto_table): Use them for HIX22,LOX10 relocs.
24
b0632d61
RH
25Wed Oct 8 11:38:45 1997 Richard Henderson <rth@cygnus.com>
26
27 * elfcore.h (bfd_prstatus): Pedanticly, alignment_power should
28 be LOG_FILE_ALIGN.
29
ba2934ce
RH
30Wed Oct 8 11:36:00 1997 Richard Henderson <rth@cygnus.com>
31
32 * config.bfd: Missed one alpha* change.
33
34Tue Oct 7 13:00:17 1997 Doug Evans <dje@canuck.cygnus.com>
35
36 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Remove BFD64 support.
37 * elf64-sparc.c (SPARC64_OLD_RELOCS): Undef.
38 (MINUS_ONE): New macro.
39 (sparc_elf_notsup_reloc): New function.
40 (sparc64_elf_howto_table): Add entries for DISP64,PLT64,HIX22,LOX10,
41 H44,M44,L44,REGISTER.
42 (sparc_reloc_map): Likewise. Map BFD_RELOC_CTOR to R_SPARC_64.
43 (init_insn_reloc): New function.
44 (sparc_elf_wdisp16_reloc): Use it.
45 (sparc64_elf_relocate_section): Add entries for OLO10,HIX22,LOX10.
46
758b6765
ILT
47Tue Oct 7 11:40:37 1997 Ian Lance Taylor <ian@cygnus.com>
48
49 * som.c (som_construct_extended_name_table): Remove static
50 function, and define as macro instead.
51
6b5f5d61
RH
52Fri Oct 3 14:02:17 1997 Richard Henderson <rth@cygnus.com>
53
54 * config.bfd: Change alpha-*-* to alpha*-*-*; config.guess now
55 recognizes alphaev5 etc.
56 * configure.host: Likewise.
57
9b5ec8b1
ILT
58Fri Oct 3 11:23:47 1997 Ian Lance Taylor <ian@cygnus.com>
59
927e3a30
ILT
60 Make ld -s work on AIX:
61 * xcofflink.c (xcoff_link_add_symbols): Don't create the .debug
62 section if we are stripping.
63 (bfd_xcoff_size_dynamic_sections): Don't set the .debug section
64 size if we are stripping.
65 (_bfd_xcoff_bfd_final_link): Don't set SEC_RELOC or rel_filepos,
66 and don't write out relocs, if we are stripping.
67 (xcoff_link_input_bfd): Don't set up reloc if we are stripping.
68 (xcoff_write_global_symbol): Don't write out symbol or reloc if we
69 are stripping.
70
d9eff006
ILT
71 * configure.in: Don't include elf.lo again for ELF targets; it's
72 always in the library anyhow.
73 * configure: Rebuild.
74
75 * bfd-in2.h: Rebuild.
76
9b5ec8b1
ILT
77 * elf32-sparc.c (sparc_elf_wdisp16_reloc): Cast to bfd_byte *, not
78 char *, when calling bfd_get_32 and bfd_put_32.
79 * sunos.c (sunos_scan_dynamic_symbol): Cast contents to char *
80 when calling strcpy.
81
22b23d7d
DE
82Thu Oct 2 16:15:50 1997 Doug Evans <dje@canuck.cygnus.com>
83
84 * reloc.c (bfd_check_overflow): New function.
85 (bfd_perform_relocation, bfd_install_relocation): Use it.
86 (BFD_RELOC_SPARC_{DISP64,PLT64}): New relocs.
87 (BFD_RELOC_SPARC_{HIX22,LOX10,H44,M44,L44,REGISTER}): New relocs.
88 * bfd-in2.h: Regenerate.
89 * libbfd.h: Regenerate.
90
2fb4c89f
ILT
91Thu Oct 2 13:17:18 1997 Ian Lance Taylor <ian@cygnus.com>
92
93 * peicode.h (coff_swap_scnhdr_out): Set IMAGE_SCN_MEM_READ for an
94 unrecognized section. From Jon Thackray <jont@harlequin.co.uk>.
95
7810074c
ILT
96Wed Oct 1 14:03:44 1997 Ian Lance Taylor <ian@cygnus.com>
97
9347808d
ILT
98 * Makefile.am ($(BFD_H)): Change stmp-bfd.h to stmp-bfd-h.
99 (stmp-bfd-h): Rename from stmp-bfd.h.
100 (BFD_H_FILES, LIBBFD_H_FILES, LIBCOFF_H_FILES): New variables.
101 ($(srcdir)/bfd-in2.h): Just depend upon stmp-bin2-h.
102 (stmp-bin2-h): New target.
103 ($(srcdir)/libbfd.h): Just depend upon stmp-lbfd-h.
104 (stmp-lbfd-h): New target.
105 ($(srcdir)/libcoff.h): Just depend upon stmp-lcoff-h.
106 (stmp-lcoff-h): New target.
107 (CLEANFILES): Change stmp-bfd.h to stmp-bfd-h. Add stmp-bin2.h,
108 stmp-lbfd-h, and stmp-lcoff-h.
109 * Makefile.in: Rebuild.
110
7810074c
ILT
111 * configure.in: Use a diversion to set enable_shared before the
112 arguments are parsed.
113 * configure: Rebuild.
114
a446b86d
DE
115Tue Sep 30 14:18:32 1997 Doug Evans <dje@canuck.cygnus.com>
116
117 * elf32-sparc.c (_bfd_sparc_elf_howto_table): R_SPARC_GLOB_JMP
118 renamed to R_SPARC_UNUSED_42.
119 (sparc_reloc_map): Delete R_SPARC_GLOB_JMP entry.
120 * elf64-sparc.c (_bfd_sparc_elf_howto_table): R_SPARC_GLOB_JMP
121 renamed to R_SPARC_UNUSED_42.
122 (sparc_reloc_map): Delete R_SPARC_GLOB_JMP entry.
123 * reloc.c (BFD_RELOC_SPARC_GLOB_JMP): Delete.
124 * bfd-in2.h: Regenerated.
125 * libbfd.h: Regenerated.
126
7810074c
ILT
127Thu Sep 25 12:15:02 1997 Ian Lance Taylor <ian@cygnus.com>
128
129 * elflink.h (elf_merge_symbol): Don't check the hash creator until
130 after we have set *sym_hash.
131
780a00c9
ILT
132Wed Sep 24 16:52:28 1997 Joel Sherrill <joel@oarcorp.com>
133
134 * config.bfd (sh*-*-rtems*): New target, like sh-*-*elf*.
135
805c3d70
ILT
136Wed Sep 24 11:27:23 1997 Ian Lance Taylor <ian@cygnus.com>
137
0035c8a0
ILT
138 * Makefile.am (libbfd_a_SOURCES): Define.
139 * Makefile.in: Rebuild.
140
805c3d70
ILT
141 * configure.in: Call AC_CHECK_TOOL before AM_PROG_LIBTOOL.
142 * aclocal.m4: Rebuild with new libtool.
143 * configure: Rebuild.
144
3099ef78
ILT
145Tue Sep 23 19:03:13 1997 Ian Lance Taylor <ian@cygnus.com>
146
147 * elf.c (map_sections_to_segments): Even if we are not demand
148 paged, don't put a loadable section after a nonloadable section.
149 (assign_file_positions_for_segments): Increment the file offset
150 for a section with contents, even if it is not loadable.
151
152start-sanitize-v850e
153Sun Sep 21 11:03:24 1997 Nick Clifton <nickc@cygnus.com>
154
155 * elf32-v850.c (v850_elf_final_link_relocate): Add return code
156 indicating that __ctbp could not be found.
157
158end-sanitize-v850e
55e6f0bf
NC
159Thu Sep 18 15:04:57 1997 Nick Clifton <nickc@cygnus.com>
160
161 * elf32-v850.c (v850_elf_check_relocs): Improve error message.
162
db1fa6ab 163Wed Sep 17 09:54:51 1997 Nick Clifton <nickc@cygnus.com>
9420c20a
NC
164start-sanitize-v850e
165
166 * elf32-v850.c (v850_elf_final_link_relocate, v850_elf_reloc,
167 v850_elf_check_relocs, v850_elf_reloc_map, v850_elf_howto_table):
168 Add support for the CALLT relocs.
169
170 * reloc.c (COMMENT): Add BFD_RELOC_V850_CALLT_6_7_OFFSET and
171 BFD_RELOC_V850_CALLT_16_16_OFFSET.
172end-sanitize-v850e
db1fa6ab
NC
173
174 * elf32-v850.c (v850_elf_final_link_relocate): Add checks to catch
175 relocations against non-existant symbols.
176
5bb28764
NC
177Tue Sep 16 14:20:27 1997 Nick Clifton <nickc@cygnus.com>
178
179 * reloc.c: Add BFR_RELOC_V850_TDA_16_16_OFFSET.
180
181 * elf32-v850.c (v850_elf_reloc, v850_elf_final_link_relocate,
182 v850_elf_howto_table, v850_elf_reloc_map): Add support for a 16
183 bit reloc in the tiny data area.
184
2199f848
KR
185start-sanitize-d30v
186Mon Sep 15 11:27:36 1997 Ken Raeburn <raeburn@cygnus.com>
187
188 Merged changes from Martin Hunt:
189
190 * elf32-d30v.c (bfd_elf_d30v_reloc): Change pc-relative relocs
191 over 2^32 bytes to be absolute. Needed because D30V PC doesn't
192 necessarily wrap.
193
194 * reloc.c, elf32-d30v.c (BFD_RELOC_D30V_9_PCREL,
195 BFD_RELOC_D30V_9_PCREL_R): New relocs.
196
197 * elf32-d30v.c (bfd_elf_d30v_reloc_21): New function.
198 Do 15 and 21 bit pc-relative relocations.
199 * reloc.c (BFD_RELOC_D30V_15_PCREL_R, BFD_RELOC_D30V_21_PCREL_R):
200 New relocations.
201
202 * elf32-d30v.c (bfd_elf_d30v_reloc): Addend needs to be
203 added to the relocation, not or'd.
204
205end-sanitize-d30v
43898c91
NC
206Wed Sep 10 15:17:25 1997 Nick Clifton <nickc@cygnus.com>
207
208 * elf32-v850.c (v850_elf_reloc): Remove spurious error message.
209
eaa9c2e7
AC
210Wed Sep 10 11:17:50 1997 Andrew Cagney <cagney@b1.cygnus.com>
211
212 * archures.c (bfd_default_scan): Use strcasecmp.
213 (bfd_default_scan): Test for match with arch_name + ":" +
214 printable_name.
215 (bfd_default_scan): Test for match with printable_name - ":".
216 (bfd_default_scan): Delete w65, h8300, h8500, z8k, i960 special
217 cases. Each implements their own scan function.
218 (bfd_default_scan): Delete 386, 2900, 860, mips 2000, mips 4400
219 special cases. Since info->mach == 0. The test mach == number
220 fails.
221 (bfd_arch_list): New function, return name of all the supported
222 architectures.
223
98ab32a5
NC
224Tue Sep 9 10:21:56 1997 Nick Clifton <nickc@cygnus.com>
225
226 * elf32-v850.c (v850_elf_print_private_bfd_data): Break after
227 decoding architecture.
5ddf2a9e
NC
228 (v850_elf_reloc): Do not complain if a R_V850_LO16 reloc has bit
229 15 set.
98ab32a5 230
60b570d1
RH
231Sun Sep 7 12:25:22 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
232
233 * bfd/elf64-alpha.c (reloc_howto_type): Fix the howto table.
234
679bf0a2
ILT
235Thu Sep 4 09:44:10 1997 Ian Lance Taylor <ian@cygnus.com>
236
1732b93b
ILT
237 * Makefile.am: Rebuild dependencies.
238 (ALL_MACHINES_CFILES): Add cpu-v850.c.
239 (ALL_MACHINES_CFILES): Add elf32-v850.c.
240 * Makefile.in: Rebuild.
241
4878fa5b
ILT
242 * reloc.c: Remove extraneous commas from relocation entries.
243 Remove BFD_RELOC_V850_16_PCREL.
244 * bfd-in2.h: Rebuild.
245
679bf0a2
ILT
246 * xcofflink.c (xcoff_link_add_symbols): Put XTY_CM/XMC_TD symbols
247 in sections named .tocbss rather than .bss.
248
93f18857
NC
249Wed Sep 3 11:23:23 1997 Nick Clifton <nickc@cygnus.com>
250
251 * libbfd.h, bfd-in2.h, elf32-v850.c: Removed
252 BFD_RELOC_V850_16_PCREL.
253
c2d70826
FF
254Tue Sep 2 20:44:10 1997 Fred Fish <fnf@cygnus.com>
255
256 * cofflink.c (coff_link_check_ar_symbols): Handle C_SYSTEM syms
257 the same as C_EXT syms.
258 (coff_link_add_symbols): Ditto.
259 (_bfd_coff_link_input_bfd): Ditto.
260 (_bfd_coff_write_task_globals): Add save_global_to_static. Use
261 it to preserve and restore state of global_to_static flag.
262
8bef8c30
NC
263Tue Sep 2 17:45:22 1997 Nick Clifton <nickc@cygnus.com>
264
265 * elf32-v850.c (v850_elf_object_p): Set machine number based on
266 bits in e_flags field rather than magic numbers.
267 (v850_elf_final_write_processing, v850_elf_set_private_flags,
268 v850_elf_copy_private_bfd_data, v850_elf_merge_private_bfd_data,
269 v850_elf_print_private_bfd_data): New functions.
270
271start-sanitize-v850e
272Tue Sep 2 17:43:49 1997 Nick Clifton <nickc@cygnus.com>
273
274 * elf.c (prep_headers): Remove V850E magic number.
8bef8c30 275 * elf.c (prep_headers): Remove V850EQ magic number.
8bef8c30
NC
276end-sanitize-v850e
277
1c0e698e
DE
278Tue Sep 2 17:35:05 1997 Doug Evans <dje@canuck.cygnus.com>
279
280 * cpu-arc.c (arc_get_mach): Properly scan defined mach entries.
281
a9d67a88
JL
282Tue Sep 2 18:29:37 1997 Jeffrey A Law (law@cygnus.com)
283
284 * elf-m10200.c (mn10200_elf_final_link_relocate): PC relative
285 instructions are relative to the next instruction, not the
286 current instruction.
287 (mn10200_elf_relax_section): Similarly.
288
def31039
NC
289Tue Sep 2 15:45:45 1997 Nick Clifton <nickc@cygnus.com>
290
291 * cpu-v850.c: Use a macro to construct bfd_arch_info_type
292 entries.
293
294 * reloc.c, libbfd.h, bfd-in2.h, elf32-v850.c: Replace
295 BFD_RELOC_V850_{SDA/TDA/ZDA}_OFFSET relocs with new bit pattern
296 specific versions: BFD_RELOC_V850_{area}_{bits}_OFFSET.
297
f40d28bf
AC
298Thu Aug 28 17:01:09 1997 Andrew Cagney <cagney@b1.cygnus.com>
299
300 * cpu-v850.c: Remove "plain" from v850 printable name.
301 (scan): Use strcasecmp.
302
303 * archures.c (bfd_mach_v850): Define.
304
305 * cpu-sh.c (scan_mach): Compare with table instead of hardwired to
306 just sh/SH, use strcasecmp.
307 (arch_info_struct): Add entries for sh3 et.al.
308
309 * archures.c (bfd_mach_sh, ...): Define.
310
2f88c324
AC
311Wed Aug 27 17:33:07 1997 Andrew Cagney <cagney@b1.cygnus.com>
312
313 * archures.c (bfd_archures_list): Always NULL terminate the list.
314
2c66160c
ILT
315Tue Aug 26 17:26:51 1997 Ian Lance Taylor <ian@cygnus.com>
316
099ddbf1
ILT
317 * Makefile.am: Rebuild dependencies.
318 (ALL_MACHINES_CFILES): Add cpu-arc.c.
319 (ALL_MACHINES_CFILES): Add elf32-arc.c.
320 (elf32-arc.lo): Remove explicit dependency.
321 * Makefile.in: Rebuild.
322
2c66160c
ILT
323 * acinclude.m4 (BFD_CC_FOR_BUILD): Set EXEEXT_FOR_BUILD.
324 * doc/Makefile.am (MKDOC): Use EXEEXT_FOR_BUILD, not EXEEXT.
325 * aclocal.m4, configure, Makefile.in, doc/Makefile.in: Rebuild.
326
70e8e585
CP
327Mon Aug 25 16:14:34 1997 Christopher Provenzano <proven@cygnus.com>
328
329 * configure: Rebuild with latest devo autoconf for NT support
330
04f295b6
NC
331Mon Aug 25 16:11:04 1997 Nick Clifton <nickc@cygnus.com>
332
333 * cpu-arm.c (compatible): If B is a default type, return A.
334
8988d935 335Mon Aug 25 15:35:46 1997 Nick Clifton <nickc@cygnus.com>
591ebe42 336
8988d935
NC
337 * cpu-v850.c (scan): New function.
338 (arch_info_struct): New structure.
339 (bfd_v850_arch): Add link into arch_info_structure.
591ebe42 340
8988d935
NC
341 * config.bfd (targ_cpu): All v850 variants use the bfd_arch_v850
342 architecture.
845c40d5 343
8988d935
NC
344 * elf32-v850.c (v850_elf_object_p): New function.
345
346start-sanitize-v850e
347 * archures.c (bfd_mach_v850e): Machine value for v850e.
348
349 * bfd-in2.h (bfd_mach_v850e): Machine value for v850e.
350
351 * elf32-v850.c (ELF_MACHINE_CODE): Default to v850e machine
352 number.
353
354 * elf.c (prep_headers): Add support for v850e machine number.
15d82b26 355
8988d935
NC
356 * archures.c (bfd_mach_v850eq): Machine value for v850eq.
357
358 * bfd-in2.h (bfd_mach_v850eq): Machine value for v850eq.
359
360 * elf32-v850.c (ELF_MACHINE_CODE): Default to v850eq machine
361 number.
362
363 * elf.c (prep_headers): Add support for v850eq machine number.
15d82b26 364end-sanitize-v850e
2cf9a0d0 365
8988d935
NC
366Mon Aug 25 14:07:33 1997 Ian Lance Taylor <ian@cygnus.com>
367
368 * syms.c (_bfd_stab_section_find_nearest_line): Clear the
369 cached_stab field if the offset prevents us from using the cache.
845c40d5 370
a0682677
ILT
371Mon Aug 25 12:08:13 1997 Ian Lance Taylor <ian@cygnus.com>
372
373 * aout-target.h (MY(vec)): Add SEC_CODE and SEC_DATA to section
374 flags.
375 * aout-arm.c (aout_arm_little_vec): Likewise.
376 (aout_arm_big_vec): Likewise.
377 * bout.c (b_out_vec_big_host): Likewise.
378 (b_out_vec_little_host): Likewise.
379 * mipsbsd.c (aout_mips_little_vec): Likewise.
380 (aout_mips_big_vec): Likewise.
381
382start-sanitize-tic80
383Tue Aug 19 10:09:10 1997 Fred Fish <fnf@cygnus.com>
384
385 * coff-tic80.c (COFF_ALIGN_IN_SFLAGS): Define to 1.
386 * coffcode.h (styp_to_sec_flags): Ignore incoming STYP_INFO
387 bit in s_flags if COFF_ALIGN_IN_S_FLAGS is defined.
388
389end-sanitize-tic80
c4188c2a
FF
390Tue Aug 19 08:47:17 1997 Fred Fish <fnf@cygnus.com>
391
392 * coff-i960.c (COFF_ALIGN_IN_SECTION_HEADER): Define to 1.
393 (GET_SCNHDR_ALIGN, PUT_SCNHDR_ALIGN): Define.
394 * coff-m88k.c (GET_SCNHDR_NRELOC, GET_SCNHDR_NLNNO): Define.
395 * coffcode.h (coff_set_alignment_hook): Conditionally compile in if
396 COFF_ALIGN_IN_SECTION_HEADER is defined. Convert alignment to power
397 of two for I960 only.
398 * coffswap.h (GET_SCNHDR_NRELOC, PUT_SCNHDR_NRELOC, GET_SCNDHR_NLNNO,
399 PUT_SCNHDR_NLNNO, GET_SCNHDR_FLAGS, PUT_SCNHDR_FLAGS): Provide
400 default definitions.
401 (coff_swap_scnhdr_in): Use GET_SCNHDR_FLAGS, GET_SCNHDR_NRELOC,
402 GET_SCNHDR_NLNNO, and GET_SCNHDR_ALIGN.
403 (coff_swap_scnhdr_out): Use PUT_SCNHDR_FLAGS, PUT_SCNHDR_ALIGN.
404start-sanitize-tic80
405 * Makefile.in (coff-tic80.o): Depends upon coffswap.h.
406 * coff-tic80.c (COFF_ALIGN_IN_SECTION_HEADER): Define to 1.
407 (GET_SCNHDR_FLAGS, PUT_SCNHDR_FLAGS): Define
408 *coffcode.h (coff_write_object_contents): Set alignment field in
409 section header for TIC80COFF files.
410end-sanitize-tic80
411
def47b53
NC
412Mon Aug 18 11:36:19 1997 Nick Clifton <nickc@cygnus.com>
413
414 * elf32-v850.c (v850_elf_howto_table, v850_elf_reloc_map,
415 v850_elf_check_relocs, v850_elf_reloc,
416 v850_elf_final_link_relocate): Add support for
417 BFD_RELOC_V850_16_PCREL relocation.
418
419 * reloc.c (COMMENT): Add suuport for BFD_RELOC_V850_16_PCREL
420 relocation.
421
422 * libbfd.h: Add support for BFD_RELOC_V850_16_PCREL relocation.
423
424 * bfd-in2.h: Add support for BFD_RELOC_V850_16_PCREL relocation.
def47b53
NC
425
426start-sanitize-v850e
427Mon Aug 18 11:33:56 1997 Nick Clifton <nickc@cygnus.com>
428
429 * cpu-v850e: New file.
430
431 * elf.c (prep_headers): Add support for v850e target.
432
433 * bfd-in2.h (bfd_architecture): Add support for v850e target.
434
435 * config.bfd: Add support for v850e target.
436
437 * archures.c: Add support for v850e target.
def47b53 438
def47b53
NC
439Mon Aug 18 11:33:56 1997 Nick Clifton <nickc@cygnus.com>
440
441 * cpu-v850eq: New file.
442
443 * elf.c (prep_headers): Add support for v850eq target.
444
445 * bfd-in2.h (bfd_architecture): Add support for v850eq target.
446
447 * config.bfd: Add support for v850eq target.
448
449 * archures.c: Add support for v850eq target.
15d82b26 450end-sanitize-v850e
def47b53 451
00c7247b
ILT
452Fri Aug 15 12:01:28 1997 Ian Lance Taylor <ian@cygnus.com>
453
454 * coffgen.c (coff_find_nearest_line): Correctly handle the offset
455 argument as section relative, rather than an absolute address.
456 From Jan Hoogenraad <hoogenrd@natlab.research.philips.com>.
457
76af94b9
DE
458Fri Aug 15 04:58:02 1997 Doug Evans <dje@canuck.cygnus.com>
459
460 * config.bfd (arc-*-elf*): Add.
461 * configure.in (bfd_elf32_{little,big}arc_vec): Add.
462 * configure: Rebuild.
463 * Makefile.am (ALL_MACHINES): Add cpu-arc.lo.
464 (BFD32_BACKENDS): Add elf32-arc.lo.
465 (cpu-arc.lo,elf32-arc.lo): Add rules for.
466 * Makefile.in: Rebuild.
467 * archures.c (architecture list): Add bfd_arch_arc.
468 (bfd_archures_list): Add bfd_arc_arch.
469 (bfd_mach_arc_base): Define.
470 * reloc.c (BFD_RELOC_ARC_B22_PCREL,BFD_RELOC_ARC_B26): Add.
471 * targets.c (bfd_elf32_{little,big}arc_vec): Declare.
472 (bfd_target_vect): Add them.
473 * bfd-in2.h, libbfd.h: Rebuild.
474 * cpu-arc.c, elf32-arc.c: New files.
475 * elf.c (pre_headers): Recognize bfd_arch_arc.
476
477Tue Aug 12 11:45:18 1997 Ian Lance Taylor <ian@cygnus.com>
478
479 * aoutx.h (NAME(aout,final_link)): If no symbols, make sure the
480 data section is correctly rounded to a page in the file.
481
6ccdc203
ILT
482Mon Aug 11 12:45:43 1997 Ian Lance Taylor <ian@cygnus.com>
483
484 * aoutx.h (NAME(aout,final_link)): Don't emit the string table if
485 there are no symbols.
486
2af5a7e4
ILT
487Sun Aug 10 14:45:56 1997 Ian Lance Taylor <ian@cygnus.com>
488
489 * coff-stgo32.c: Rename from coff-stubgo32.c to avoid old System V
490 file system 14 character limit.
491 * Makefile.am, configure.in: Corresponding changes.
492 * Makefile.in, configure: Rebuild.
493
494Fri Aug 8 18:34:36 1997 Ian Lance Taylor <ian@cygnus.com>
495
496 * Makefile.am: (ALL_MACHINES_CFILES): Add elf32-d10v.c.
497 Rebuild dependencies.
498 * Makefile.in: Rebuild.
499
c40331ba
ILT
500Wed Aug 6 18:56:51 1997 Ian Lance Taylor <ian@cygnus.com>
501
502 * Makefile.am (docdir): Define.
503 * Makefile.in: Rebuild.
504
097fd78a
ILT
505Tue Aug 5 23:05:03 1997 Ian Lance Taylor <ian@cygnus.com>
506
507 * configure: Rebuild with autoconf 2.12.1.
508
509Mon Aug 4 12:00:35 1997 Ian Lance Taylor <ian@cygnus.com>
510
511 * aclocal.m4, configure: Rebuild with new automake patches.
512
e6071dc5
PS
513Sun Aug 3 08:15:12 1997 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
514
515 * rs6000-core.c (make_bfd_asection): New function to add a section
516 to the core file bfd.
517 (rs6000coff_core_p): Use make_bfd_asection to add the core file
518 sections.
519 Use BFD routines to seek, read and stat the core file.
520 Handle .data sections from loaded objects and anonymously mmapped
521 regions, these are available in AIX 4 core files.
522
aa13d30d
ILT
523Fri Aug 1 12:58:32 1997 Ian Lance Taylor <ian@cygnus.com>
524
525 * configure.in: Set enable_shared before AM_PROG_LIBTOOL.
526 * acinclude.m4: Move acmacros.m4 in here. Remove AM_PROG_LIBTOOL
527 copy; use a patches libtool instead.
528 * acmacros.m4: Remove.
529 * Makefile.in, aclocal.m4, configure: Rebuild.
530
c0734708
ILT
531Thu Jul 31 19:55:36 1997 Ian Lance Taylor <ian@cygnus.com>
532
533 * Makefile.am: New file, based on old Makefile.in.
5e377ed2
ILT
534 * acmacros.m4: New file, copied from old aclocal.m4.
535 * acinclude.m4: New file.
536 * configure.in: Call AM_PROG_LIBTOOL. Remove shared library
537 handling; now handled by libtool. Replace AC_CONFIG_HEADER with
538 AM_CONFIG_HEADER. Replace AC_PROG_INSTALL with AM_PROG_INSTALL.
539 Call AM_MAINTAINER_MODE, AM_CYGWIN32, and AM_EXEEXT. Change all
540 .o files to .lo. Remove stamp-h handling in AC_OUTPUT.
c0734708
ILT
541 * acconfig.h: Mention PACKAGE and VERSION.
542 * stamp-h.in: New file.
543 * dep-in.sed: Change .o to .lo.
544 * Makefile.in: Now built with automake.
545 * aclocal.m4: Now built with aclocal.
546 * config.in, configure: Rebuild.
9df51f4f 547 * VERSION: Remove.
c0734708 548
3745ac6d
ILT
549Thu Jul 31 12:09:20 1997 Geoff Keating <geoffk@ozemail.com.au>
550
551 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Don't set TEXTREL
552 if there is only a relocation to a read-only but not allocatable
553 section (like .stab).
554 * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
555 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
556 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
557 * elf32-mips.c (mips_elf_size_dynamic_sections): Likewise.
558 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
559
560 * elf32-ppc.c (ppc_elf_howto_raw): Correct various comments.
561 (ppc_elf_create_linker_section): These sections are not
562 created by the linker (that is, they are created by the user
563 putting data in them). In particular, they can be the source
564 and target of relocations.
565 (ppc_elf_adjust_dynamic_symbol): Check postcondition of
566 bfd_elf32_link_record_dynamic_symbol. Align 16-byte common
567 objects (for instance, 'long double') to 16-byte boundaries.
568 (ppc_elf_size_dynamic_sections): Make the code that generates
569 section symbols exactly the same as for sparc, reducing the
570 number of section symbols output.
571 (ppc_elf_check_relocs): Check postcondition of
572 bfd_elf32_link_record_dynamic_symbol. Make default case the
573 same as corresponding code for sparc, fixing bug involving
574 .rela.stabs.
575 (ppc_elf_finish_dynamic_symbol): Fix case involving GOT symbols
576 forced to be local because of versioning (by replicating
577 corresponding change in sparc). Treat R_PPC_RELATIVE RELA relocs
578 as usual in ELF, not as pseudo-REL relocs (as the sparc linker
579 does).
580 (ppc_elf_relocate_section): Add handy debugging code for when
581 assertion fails. Add some more 'symbol made local because of
582 versioning' cases.
583
584 * elf32-ppc.c (ppc_elf_relocate_section): Cope with addend when
585 processing a GOT relocation as required by ABI.
586
13eb6306
ILT
587Wed Jul 30 21:30:35 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
588
589 * elflink.h (NAME(bfd_elf,record_link_assignment)): Remove any
590 version info if this symbol came from a dynamic object.
591 (elf_link_add_object_symbols): Set the version info of a symbol
592 only if the object actually contains version definitions and
593 defines this symbol.
594
b1ee3d6a
RS
595Mon Jul 28 18:07:43 1997 Rob Savoye <rob@chinadoll.cygnus.com>
596
597 * aclocal.m4: Add CYGWIN and EXEEXT autoconf macros.
598 * configure.in: Use CYGWIN and EXEEXT autoconf macro to look for
599 win32 dependencies.
600 * configure: Regenerated with autoconf 2.12.
601 * doc/Makefile.in: Add $(EXEEXT) to chew executable.
602
f366291b
PS
603Mon Jul 28 02:50:29 1997 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
604
605 * rs6000-core.c (rs6000coff_core_p): If CORE_TRUNC is set, print
606 a warning rather than returning an error.
607
8dbbb8be
FL
608Sun Jul 27 19:54:14 1997 Felix Lee <flee@cygnus.com>
609
610 * coffswap.h (coff_swap_aux_in): add semicolon to make MSVC happy.
611
3e94ea70
FL
612Fri Jul 25 14:50:08 1997 Felix Lee <flee@cygnus.com>
613
614 * cisco-core.c: define signals for wingdb.
615
fbd550db
ILT
616Fri Jul 25 16:27:07 1997 Ian Lance Taylor <ian@cygnus.com>
617
618 * ecofflink.c (bfd_ecoff_debug_accumulate): Only merge files with
619 the same number of aux entries.
620
491501de
JL
621Fri Jul 25 08:22:15 1997 Jeffrey A Law (law@cygnus.com)
622
623 * som.c (hppa_som_gen_reloc_type): Use R_DATA_EXPR for the
624 difference of two symbols if the relocation size is 32 bits.
625 (som_write_fixups): Handle R_DATA_EXPR.
626
1868acf8
ILT
627Wed Jul 23 16:08:02 1997 Ian Lance Taylor <ian@cygnus.com>
628
629 * coff-i386.c (coff_i386_reloc): Don't offset a common symbol by
630 its value if COFF_WITH_PE is defined.
631
e8640d5e
ILT
632Tue Jul 22 17:19:45 1997 Robert Hoehne <robert.hoehne@Mathematik.TU-Chemnitz.DE>
633
179ce6e1
ILT
634 * coff-stubgo32.c: New file.
635 * go32stub.h: New file.
636 * coff-i386.c: If COFF_GO32_EXE, include coff/go32exe.h.
e8640d5e
ILT
637 * coffswap.h (coff_swap_filehdr_in): Invoke
638 COFF_ADJUST_FILEHDR_IN_PRE and COFF_ADJUST_FILEHDR_IN_POST if they
639 are defined.
640 (coff_swap_filehdr_out): Invoke COFF_ADJUST_FILEHDR_OUT_PRE and
641 COFF_ADJUST_FILEHDR_OUT_POST if they are defined.
642 (coff_swap_aux_in): Invoke COFF_ADJUST_AUX_IN_PRE and
643 COFF_ADJUST_AUX_IN_POST if they are defined.
644 (coff_swap_aux_out): Invoke COFF_ADJUST_AUX_OUT_PRE and
645 COFF_ADJUST_AUX_OUT_POST if they are defined.
646 (coff_swap_scnhdr_in): Invoke COFF_ADJUST_SCNHDR_IN_PRE and
647 COFF_ADJUST_SCNHDR_IN_POST if they are defined.
648 (coff_swap_scnhdr_out): Invoke COFF_ADJUST_SCNHDR_OUT_PRE and
649 COFF_ADJUST_SCNHDR_OUT_POST if they are defined.
179ce6e1
ILT
650 * targets.c (go32stubbedcoff_vec): Declare.
651 (bfd_target_vector): Add go32stubbedcoff_vec.
652 * configure.in (go32coff_vec): New target vector.
653 (go32stubbedcoff_vec): Likewise.
88a25e44
ILT
654 * config.bfd (i[3456]86-*-msdosdjgpp*): New target.
655 (i[3456]86-*-go32*): Change to be like new msdosdjgpp*.
179ce6e1
ILT
656 * Makefile.in: Rebuild dependencies.
657 (BFD32_BACKENDS): Add coff-stubgo32.o.
658 (BFD32_BACKENDS_CFILES): Add coff-stubgo32.c.
659 (HFILES): Add go32stub.h.
e8640d5e 660
60f1ad85
ILT
661Tue Jul 22 15:09:12 1997 Ian Lance Taylor <ian@cygnus.com>
662
663 * configure.in: Check for fdopen.
664 * configure, config.in: Rebuild.
665 * opncls.c (bfd_fdopenr): Check HAVE_FDOPEN rather than VMS or
666 __GO32__. Reindent a bit.
667
f1c88b48
ILT
668Sun Jul 20 20:05:20 1997 Ian Lance Taylor <ian@cygnus.com>
669
670 * sunos.c (sunos_create_dynamic_sections): Set SEC_LINKER_CREATED
671 flag for newly created sections.
672 (sunos_add_dynamic_symbols): Don't discard newly created sections
673 if shared library is dynobj.
674
3fc2c146
ILT
675Mon Jul 14 15:33:55 1997 Ian Lance Taylor <ian@cygnus.com>
676
677 * elf.c (map_sections_to_segments): When checking whether
678 including a section in a segment would force us to skip a page,
679 align the address of the next segment to avoid wraparound
680 problems.
681
7f2e6854
FF
682start-sanitize-tic80
683Tue Jul 8 12:11:29 1997 Fred Fish <fnf@cygnus.com>
684
685 * coffcode.h (coff_write_object_contents): Initialize
686 target id field to TIC80_TARGET_ID.
687 * coffswap.h (coff_swap_filehdr_out): Swap out target id field
688 if used.
689 (coff_swap_filehdr_in): Swap in target id field if used.
690
691end-sanitize-tic80
40496096
ILT
692Mon Jul 7 16:41:20 1997 Ian Lance Taylor <ian@cygnus.com>
693
694 * coff-i386.c (coff_i386_is_local_label_name): New static function
695 if TARGET_UNDERSCORE.
696 (coff_bfd_is_local_label_name): Define if TARGET_UNDERSCORE.
697 (i386coff_vec): Add SEC_CODE and SEC_DATA to section_flags.
698
01da2d52
ILT
699Mon Jun 30 14:29:26 1997 Ian Lance Taylor <ian@cygnus.com>
700
701 * elf32-m68k.c (howto_table): Use complain_overflow_bitfield, not
702 complain_overflow_signed, for 32 bit PC relative relocations.
703
8211c929
ILT
704Thu Jun 26 01:26:31 1997 Ian Lance Taylor <ian@cygnus.com>
705
677525e9
ILT
706 * elflink.h (elf_link_add_object_symbols): When a version
707 indirection symbol is overridden, make the original symbol point
708 at the real overriding symbol.
709
20db2495
ILT
710 * elf.c (bfd_elf_string_from_elf_section): Check for an invalid
711 string index.
712
8211c929
ILT
713 * elflink.h (elf_link_output_extsym): Use the right section for a
714 common symbol.
715 * elf32-mips.c (mips_elf_link_output_symbol_hook): If a common
716 symbol was in .scommon, mark it as SHN_MIPS_SCOMMON.
717
0ac96a37
ILT
718Wed Jun 25 12:43:10 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
719
e9982ee5
ILT
720 * elflink.h (elf_merge_symbols): Resolve indirect and warning
721 symbols before checking for new symbols.
722
0ac96a37
ILT
723 * elfcore.h (elf_corefile_note): Move out of HAVE_SYS_PROCFS_H.
724
a90f6864
ILT
725Tue Jun 24 11:20:43 1997 Ian Lance Taylor <ian@cygnus.com>
726
727 * coffgen.c (coff_object_p): Read the f_opthdr bytes from the
728 file, not aoutsz bytes (they are different in XCOFF .o files).
729
730 * xcofflink.c (xcoff_link_add_symbols): Permit symbols to be
731 redefined by objects included from archives.
732
044d7d49
ILT
733Mon Jun 23 18:03:27 1997 Ian Lance Taylor <ian@cygnus.com>
734
541a4b54
ILT
735 * elflink.h (elf_merge_symbol): In the case of a new defined
736 symbol overriding an old defined symbol, return the hash table
737 entry which we modify, even if it is the target of an
738 indirection.
739 (elf_link_add_object_symbols): If the real name of the symbol gets
740 overridden, convert the versioned symbol into an indirect symbol
741 to the real symbol.
742
044d7d49
ILT
743 * elflink.h (elf_merge_symbol): New static function, broken out of
744 elf_link_add_object_symbols.
745 (elf_link_add_object_symbols): Call it.
746
3ce6d941
ILT
747Sun Jun 22 19:40:57 1997 Ian Lance Taylor <ian@cygnus.com>
748
749 * coff-i386.c (i3coff_object_p): If COFF_IMAGE_WITH_PE, hack to
750 handle case where COFF filehdr does not immediately follow PE
751 header.
752 * coffgen.c (coff_object_p): Remove useless seek to current
753 location.
754
ba0e3b78
ILT
755Wed Jun 18 19:03:38 1997 Ian Lance Taylor <ian@cygnus.com>
756
757 * linker.c (link_action): Change COMMON_ROW/indr to from CREF to
758 REFC.
759
ac44b2b9
ILT
760Tue Jun 17 11:55:02 1997 Ian Lance Taylor <ian@cygnus.com>
761
762 * cofflink.c (_bfd_coff_link_input_bfd): If stripping debugging
763 symbols, skip N_ABS symbols with debugging storage classes.
764
b6eb341b
ILT
765Mon Jun 16 18:56:27 1997 Geoff Keating <geoffk@ozemail.com.au>
766
767 * elf32-ppc.c (ppc_elf_relocate_section): Don't emit R_PPC_REL*
c1292d9b
ILT
768 relocs in shared libraries which refer to local symbols. Cope
769 with addend when processing a GOT relocation.
b6eb341b
ILT
770
771 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Only create symbols
772 for sections that the linker didn't create.
773 (ppc_elf_finish_dynamic_sections): Only try to write out a section
c1292d9b 774 symbol if it was created in ppc_elf_size_dynamic_sections.
b6eb341b
ILT
775 (ppc_elf_relocate_section): Complain if we have to generate a reloc
776 relative to a section for which we didn't output a symbol.
777
778 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Clean up. PLT
c1292d9b
ILT
779 relocs are 'rela' relocs, like everything else. .rela.plt is not
780 a read-only section, so we don't have to special-case it.
b6eb341b
ILT
781
782 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Entries in the
783 .rela.bss section are (of course) 'rela' relocs not 'rel' relocs.
784
785 * elf32-ppc.c (ppc_elf_check_relocs): Initialise srelgot.
786 (ppc_elf_relocate_section): @got offsets are 4 from start of the
787 actual .got section.
788 * elflink.c (_bfd_elf_create_got_section): The three reserved
789 words start from the symbol '_GLOBAL_OFFSET_TABLE_'.
790
791 * elf32-ppc.c (ppc_elf_size_dynamic_sections): '.rela' is 5
792 characters, not 4.
793
794 * elf32-ppc.c (ppc_elf_check_relocs): Use
795 _bfd_elf_create_got_section to create the GOT rather than
796 ppc_elf_create_linker_section. Create the '.rela.got' section
797 ourselves.
798 (ppc_elf_finish_dynamic_symbol): Set up GOT relocations when a
799 symbol has a GOT entry.
800 (ppc_elf_relocate_section): Record when a symbol is used through
801 the GOT, and allocate space in the GOT for each such symbol.
802 (ppc_elf_adjust_dynamic_symbol): Delete unused .got.plt stuff.
803 (ppc_elf_create_linker_section): Delete unused LINKER_SECTION_GOT
804 stuff.
805
806 * elf32-ppc.c (ppc_elf_howto_raw): GOT16_HA relocs should be
807 treated in a similar way to ADDR16_HA relocs.
808 (ppc_elf_relocate_section): PLTREL24 relocs do not get copied into
809 shared objects; the linker must deal with them.
810 (ppc_elf_create_linker_section): Stop setting
811 _GLOBAL_OFFSET_TABLE_ to the wrong value; delete unused
812 LINKER_SECTION_PLT stuff.
813 (ppc_elf_check_relocs): Delete unused LINKER_SECTION_PLT stuff.
814 (ppc_elf_finish_dynamic_sections): Use BFD calls to get GOT
815 section, not ELF-specific calls.
816 (elf_backend_plt_not_loaded): Set to 1.
817 (elf_backend_got_symbol_offset): Set to 4.
818 * elf-bfd.h (elf_backend_data): Add 'plt_not_loaded' member
819 for when ld.so fills in the PLT; and 'got_symbol_offset' member.
820 * elflink.c (_bfd_elf_create_dynamic_sections): Apply
821 plt_not_loaded member.
822 (_bfd_elf_create_got_section): Apply got_symbol_offset.
823 * elfxx-target.h (elf_backend_plt_not_loaded): Set default to
824 'loaded'.
825 (elf_backend_G_O_T_offset): Set default to 0.
826 (elfNN_bed): Set added fields.
827
828 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Was setting
829 DT_RELENT in shared objects; should be DT_RELAENT.
830
831 * elf32-ppc.c (ppc_elf_relocate_section): Propagate
832 R_PPC_ADDR16_HA relocs to shared objects. Cope with case where
833 such a reloc (in a non-shared object) refers to a symbol that's
834 not defined.
835
fdc944a7
ILT
836Mon Jun 16 14:42:14 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
837
838 * elfcode.h (put_signed_word): Define.
839 (get_signed_word): Define.
840 (elf_swap_reloca_in): Use get_signed_word for the r_addend field.
841 (elf_swap_reloca_out): Use put_signed_word for the r_addend
842 field.
843 * elf32-m68k.c (elf_m68k_finish_dynamic_symbol): Use
844 bfd_get_signed_32 to set the r_addend field.
845 * elf64-mips.c (mips_elf64_swap_reloca_in): Use
846 bfd_h_get_signed_64 to set the r_addend field.
847
c19fbe0f
ILT
848Mon Jun 16 12:31:29 1997 Ian Lance Taylor <ian@cygnus.com>
849
90d7b9b9
ILT
850 * elf32-i386.c (elf_i386_relocate_section): When generating a
851 shared library, do the relocation if the input section is not
852 allocated in memory.
853
c19fbe0f
ILT
854 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Call
855 elf_link_assign_sym_version before elf_adjust_dynamic_symbol.
856 (elf_fix_symbol_flags): New static function, broken out of
857 elf_adjust_dynamic_symbol.
858 (elf_adjust_dynamic_symbol): Call elf_fix_symbol_flags.
859 (elf_link_assign_sym_version): Likewise. Permit a symbol to be
860 forced local even if NEEDS_PLT is set. When forcing a symbol to
861 be local, clear NEEDS_PLT.
862 (elf_link_output_extsym): Remove unused local bed.
863
bb2a6cfb
JL
864Wed Jun 11 22:44:20 1997 Jeffrey A Law (law@cygnus.com)
865
866 * elf32-mn10300.c (elf32_mn10300_link_hash_entry): New structure
867 for derived elf linker hash table entries. References to
868 elf_link_hash_entry changed appropriately.
869 (elf32_mn10300_link_hash_table): New structure for derived elf
870 linker hash table.
871 (elf32_mn10300_hash_table): Define.
872 (elf32_mn10300_link_hash_traverse): Likewise.
873 (elf32_mn10300_link_hash_newfunc): New function.
874 (elf32_mn10300_link_hash_table_create): Likewise.
875 (elf32_mn10300_finish_hash_table_entry): Likewise.
876 (mn10300_elf_relax_section): Handle "call" -> "calls", removal
877 of prologue code, and call:32->call:16 relaxing.
878 (compute_function_info: New function.
879 (bfd_elf32_bfd_ilink_hash_table_create): Define.
880
6a1878c9
ILT
881Wed Jun 11 00:00:07 1997 Ian Lance Taylor <ian@cygnus.com>
882
8519ea21
ILT
883 * elflink.h (elf_link_output_extsym): Call finish_dynamic_symbol
884 for a symbol which is being forced to be local.
885 * elf32-i386.c (elf_i386_relocate_section): Write out the
c1292d9b
ILT
886 relocation value for a GOT reloc for a symbol which is turning
887 into a local symbol.
8519ea21
ILT
888 (elf_i386_finish_dynamic_symbol): If a symbol is turning into a
889 local symbol, write out a RELATIVE reloc rather than a GLOB_DAT
890 reloc.
891 * elf32-m68k.c, elf32-sparc.c: Corresponding changes.
892
6a1878c9
ILT
893 * elf32-i386.c (elf_i386_relocate_section): Get the relocation
894 value if the symbol is turning into a local symbol.
895 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
896 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
897
601acd61
UD
8981997-06-10 22:58 Ulrich Drepper <drepper@cygnus.com>
899
900 * elflink.h (elf_link_add_object_symbols): Also read verneed
901 information by calling `_bfd_elf_slurp_version_tables'.
902 (elf_link_add_object_symbols): For undefined symbols look for
8519ea21 903 version information in the verneed records.
601acd61
UD
904 (elf_link_add_object_symbols): Use soname of shared object
905 for verneed record if it is available.
906
ba383e02
ILT
907Tue Jun 10 11:13:03 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
908
909 * cpu-arm.c: Add prototypes for compatible and scan.
910 * cofflink.c: Add prototype for mark_relocs.
911
912 * archive.c (bfd_special_undocumented_glue): Change filename to
913 const pointer. Add prototype.
914
94e05b00
ILT
915Mon Jun 9 12:34:21 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
916
917 * elflink.h (elf_link_add_object_symbols): Ignore relocations of
918 sections that will be discarded.
919
cf2cd4cf
UD
9201997-06-06 22:58 Ulrich Drepper <drepper@cygnus.com>
921
922 * elflink.h (elf_link_find_version_dependencies): When searching
923 for known version symbol skip non-matching verdef records, not
924 matching records.
925
926Thu Jun 5 15:52:45 1997 Ian Lance Taylor <ian@cygnus.com>
927
928 * cofflink.c (_bfd_coff_generic_relocate_section): Write a long,
c1292d9b 929 not a bfd_vma, to the base file, to match how dlltool reads it.
cf2cd4cf 930
48e509bf
NC
931Tue Jun 3 16:57:45 1997 Nick Clifton <nickc@cygnus.com>
932
fd2553f9
NC
933 * reloc.c: Add thumb relocations.
934
48e509bf
NC
935 * bfd-in2.h: Add Thumb relocations.
936
937 * libbfd.h: Add Thumb relocations.
938
939Mon Jun 2 10:41:52 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
940
941 * cpu-m68k.c (arch_info_struct): Fix 68060 cpu name.
942
907f6015
ILT
943Fri May 30 12:46:27 1997 Ian Lance Taylor <ian@cygnus.com>
944
e08eb976
ILT
945 * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Set dynindx
946 for a section even if it is not loaded.
947
907f6015
ILT
948 * cofflink.c (coff_link_add_symbols): If PE file, don't subtract
949 section VMA.
950 (_bfd_coff_link_input_bfd): Separate section VMA handling for
951 input and output files.
952 (_bfd_coff_generic_relocate_section): Check whether input file,
953 not output file, is a PE file.
954
955Wed May 28 15:48:43 1997 Nick Clifton <nickc@cygnus.com>
956
957 * coff-arm.c: (coff_arm_bfd_set_private_flags): Make static.
958
5edcd3b9
ILT
959Wed May 28 16:16:04 1997 Ian Lance Taylor <ian@cygnus.com>
960
961 * coff-i386.c (coff_i386_reloc): Don't just exit if we see an
962 R_IMAGEBASE reloc.
963
916660cb
NC
964Wed May 28 09:48:43 1997 Nick Clifton <nickc@cygnus.com>
965
966 * cpu-arm.c (compatible): Add test for supersets of ARM
cf2cd4cf 967 architectures.
916660cb 968
3c82a731
BM
969Tue May 27 19:42:03 1997 Bob Manson <manson@charmed.cygnus.com>
970
971 * cofflink.c (_bfd_coff_final_link): Initialize global_to_static
c1292d9b 972 member.
3c82a731 973
177f3d7f
NC
974Tue May 27 14:34:08 1997 Nick Clifton <nickc@cygnus.com>
975
976 * coff-arm.c (coff_arm_bfd_set_private_flags): Make global. It is
977 called directly by gas/config/tc-arm.c.
cf2cd4cf 978
70edb961
ILT
979Tue May 27 15:58:53 1997 Richard Henderson <rth@tamu.edu>
980
981 * elf64-alpha.c (PLT_ENTRY_*): Use a new thread-safe format.
982 (elf64_alpha_finish_dynamic_symbol): Fill it in properly.
983
d82e4bf6
ILT
984Mon May 26 14:05:13 1997 Ian Lance Taylor <ian@cygnus.com>
985
986 * coff-ppc.c (coff_ppc_relocate_section): If PE file, don't add
987 section VMA.
988
315dc1f4
FF
989Mon May 26 10:57:48 1997 Fred Fish <fnf@cygnus.com>
990
991 * peicode.h (coff_bfd_print_private_bfd_data): #undef before #define.
992 (coff_bfd_copy_private_bfd_data): Ditto.
993 * coff-arm.c (coff_arm_bfd_merge_private_bfd_data): Make static.
994 (coff_arm_bfd_print_private_bfd_data): Ditto.
995 (coff_arm_bfd_set_private_flags): Ditto.
996 (coff_arm_bfd_copy_private_bfd_data): Ditto.
997
e074d05e
FF
998Fri May 23 15:14:58 1997 Fred Fish <fnf@cygnus.com>
999
1000 * libcoff-in.h (struct coff_final_link_info): Add boolean
1001 global_to_static member for support of task linking.
1002 (_bfd_coff_write_task_globals): Add prototype.
1003 * libcoff.h: Regenerate.
1004 * coffcode.h (coff_write_object_contents): Use #ifdef to
1005 check RS6000COFF_C, to be consistent with all other uses
1006 in this file.
1007 * cofflink.c (_bfd_coff_final_link): If doing task linking,
1008 call _bfd_coff_write_task_globals.
1009 (_bfd_coff_link_input_bfd): If doing task linking, convert
1010 global functions to static.
1011 (_bfd_coff_write_global_sym): If doing task linking, convert
1012 global variables to static.
1013 (_bfd_coff_write_task_globals): New function.
1014start-sanitize-tic80
1015 * coff-tic80.c (TIC80COFF): Define this instead of just TIC80.
1016 (C_AUTOARG): #undef since it clashes with C_UEXT.
1017 (C_LASTENT): #undef since it clashes with C_STATLAB.
1018 * coffcode.h (coff_write_object_contents): Use TIC80COFF
1019 rather than TIC80.
1020 (coff_slurp_symbol_table): Use C_SYSTEM. Hide C_AUTOARG use
1021 when TIC80COFF defined (clashes with C_UEXT). Explicitly
1022 recognize C_UEXT, C_STATLAB, and C_EXTLAB as unsupported.
1023end-sanitize-tic80
1024
8ac5f940 1025start-sanitize-tic80
546d7a90
ILT
1026Fri May 23 12:38:24 1997 Ian Lance Taylor <ian@cygnus.com>
1027
1028 * coff-tic80.c (tic80_howto_table): Change overflow check for most
1029 PP relocations to complain_overflow_dont.
1030
8ac5f940
ILT
1031Thu May 22 20:22:14 1997 Ian Lance Taylor <ian@cygnus.com>
1032
1033 * coff-tic80.c (tic80_howto_table): Add PP relocations. Change
1034 name of R_RELLONG to "RELLONG". Set rightshift and complain for
1035 M_PPCR.
1036 (ppbase_reloc, glob15_reloc): New static functions.
1037 (glob16_reloc, local16_reloc): New static functions.
1038 (rtype2howto): Handle all relocation types.
1039 (coff_tic80_relocate_section): New static function.
1040 (coff_relocate_section): Define to coff_tic80_relocate_section.
1041 * Makefile.in (coff-tic80.o): Depends upon include/coff/tic80.h.
1042
1043end-sanitize-tic80
d2d70da5
ILT
1044Wed May 21 17:15:50 1997 Ian Lance Taylor <ian@cygnus.com>
1045
20a9631a
ILT
1046 * coffcode.h (coff_slurp_symbol_table): If COFF_WITH_PE or
1047 COFF_IMAGE_WITH_PE, don't subtract the section VMA from the symbol
1048 value.
1049 * coffgen.c (fixup_symbol_value): Add abfd parameter. Change all
1050 callers. If PE file, don't add section VMA.
1051 (coff_write_alien_symbol): If PE file, don't add section VMA.
1052 * cofflink.c (_bfd_coff_link_input_bfd): Likewise.
1053 (_bfd_coff_write_global_sym): Likewise.
1054 (_bfd_coff_generic_relocate_section): Likewise.
1055
d2d70da5
ILT
1056 * peicode.h: Add & 0xffffffff when using ImageBase in case bfd_vma
1057 is 64 bits.
1058
e18683b7
NC
1059Wed May 21 09:58:10 1997 Nick Clifton <nickc@cygnus.com>
1060
1061 * cofflink.c (mark_relocs): Add new function to mark symbols which
d2d70da5 1062 are used by relocations.
c1292d9b 1063 (_bfd_coff_link_input_bfd): Add call to mark_relocs() and code to
d2d70da5 1064 suppress the skipping of symbols that have thus been marked.
e18683b7 1065
4e39c0f9
ILT
1066Tue May 20 18:45:26 1997 Ian Lance Taylor <ian@cygnus.com>
1067
1068 * coff-sh.c (sh_merge_private_data): New static function.
1069 (coff_bfd_merge_private_bfd_data): Define.
1070
69f3f9f7 1071start-sanitize-tic80
4e39c0f9
ILT
1072Mon May 19 14:46:00 1997 Mark Alexander <marka@cygnus.com>
1073
1074 * coff-tic80.c: Remove unnecessary #ifdefs.
1075 * config.bfd: Set targ_underscore to yes for tic80.
1076
69f3f9f7
MA
1077Mon May 19 14:26:36 1997 Mark Alexander <marka@cygnus.com>
1078
1079 * coff-tic80.c (NAMES_HAVE_UNDERSCORE): Define (fixes problem
1080 with unresolved external symbols in GDB).
1081
1082end-sanitize-tic80
efc02f66
JL
1083Fri May 16 10:23:03 1997 Jeffrey A Law (law@cygnus.com)
1084
c1292d9b
ILT
1085 * elf-m10300.c (elf32_mn10300_relax_section): Read in all
1086 the symbols associated with each BFD.
1087 (mn10300_elf_relax_delete_bytes): Don't adjust the same symbol
1088 more than once.
efc02f66
JL
1089 * elf-m10200.c: Likewise.
1090 * elf32-m32r.c: Likewise.
1091 * elf32-sh.c: Likewise.
1092
fd6c00ba
ILT
1093Fri May 16 12:10:52 1997 Ian Lance Taylor <ian@cygnus.com>
1094
1095 * elflink.h (elf_link_add_object_symbols): Don't decrease the
c1292d9b
ILT
1096 alignment of a common symbol. If two symbols that look like
1097 common symbols are found in two shared libraries, and the size is
1098 different, use the larger size, and warn if --warn-common. If a
fd6c00ba
ILT
1099 common symbol overrides a definition in a shared library, set the
1100 size to the larger size, and warn if --warn-common.
1101
4c4badea
NC
1102Thu May 15 14:31:28 1997 Nick Clifton <nickc@cygnus.com>
1103
1104 * cpu-arm.c (compatible): Allow default machine to be polymorphed
1105 into any other machine type.
1106
1107 * coffcode.h (coff_set_flags): Initialise flags variable to 0.
1108
1109 * coff-arm.c (coff_arm_bfd_merge_private_bfd_data): When merging
1110 data into an unitialised destination set its machine type as well.
1111
031dfce0
ILT
1112Thu May 15 16:40:20 1997 Ian Lance Taylor <ian@cygnus.com>
1113
1114 * elflink.h (elf_link_add_object_symbols): Force ELF symbol size
77bd8dfa
ILT
1115 to common symbol size. Consistently treat uninitialized symbols
1116 in shared objects as common symbols.
031dfce0 1117
46686c78
NC
1118Fri May 9 10:15:27 1997 Nick Clifton <nickc@cygnus.com>
1119
1120 * archures.c (constants): Added new constants to identify the
1121 type of the ARM architecture: bfd_mach_arm_2, bfd_mach_arm_2a,
cf2cd4cf 1122 bfd_mach_arm_3, bfd_mach_arm_3M, bfd_mach_arm_4 and bfd_mach_arm_4T.
46686c78
NC
1123
1124 * bfd-in2.h (constants): Added new constants to identify
1125 the type of the ARM architecture: bfd_mach_arm_2, bfd_mach_arm_2a,
1126 bfd_mach_arm_3, bfd_mach_arm_3M, bfd_mach_arm_4 and
1127 bfd_mach_arm_4T. This file is auto-magically generated from the
1128 archures.c file. This update is just to save work.
1129
1130 * coff-arm.c (coff_arm_bfd_merge_private_bfd_data,
1131 coff_arm_bfd_print_private_bfd_data,
1132 coff_arm_bfd_set_private_flags,
1133 coff_arm_bfd_copy_private_bfd_data): Added these new functions.
cf2cd4cf 1134 (global): Macro redefinitions set up to use these new functions.
46686c78
NC
1135
1136 * coffcode.h (coff_mkobject_hook): Added call to
d2d70da5 1137 coff_arm_bfd_set_private_flags().
c1292d9b 1138 (coff_set_arch_mach_hook): Added code to set machine type based on
d2d70da5
ILT
1139 bits stored in internal flags.
1140 (coff_set_flags): Added code to set the new bits in the flags
1141 field based on the machine number.
46686c78
NC
1142 (function definition macros): Made all function definition macros
1143 conditional so that they can be overridden by target specific
1144 files.
1145
1146 * cpu-arm.c (compatible): Added this function. (arch_info_struct):
1147 Structure extended to include new types, one each for ARMv2,
1148 ARMv2a, ARMv3, ARMv3M, ARMv4 and ARMv4T.
1149
1150 * libcoff-in.h (struct coff_tdata): Added flags field.
cf2cd4cf 1151
3baa24ad
ILT
1152Fri May 9 17:40:02 1997 Ian Lance Taylor <ian@cygnus.com>
1153
64aaba23
ILT
1154 * config.bfd (i[3456]86-*-gnu*): Don't include Mach support.
1155
3baa24ad
ILT
1156 * config.bfd: Change #if 0 around uses of host_aout_vec to #if
1157 HAVE_host_aout_vec.
1158
aba5cc8b
MM
1159Mon May 5 13:57:32 1997 Mike Meissner <meissner@cygnus.com>
1160
1161 * coffgen.c (coff_find_nearest_line): If there are no syments,
1162 just return false.
1163
6a2922d5
ILT
1164Mon May 5 18:18:45 1997 Philip Blundell <pjb27@cam.ac.uk>
1165
1166 * config.bfd: cope with '*-*-linux-gnuaout' targets.
1167
1168Thu May 1 11:31:12 1997 Ian Lance Taylor <ian@cygnus.com>
1169
1170 * targmatch.sed: Add explicit \n characters to work around bug in
1171 HP/UX 10.20 sed program.
1172
412dfaed
ILT
1173Wed Apr 30 12:27:03 1997 Ian Lance Taylor <ian@cygnus.com>
1174
1175 * elf.c (copy_private_bfd_data): Cast csecs to avoid sign
1176 extension problems.
1177
3c8caeb7
ILT
1178Tue Apr 22 12:06:08 1997 Ian Lance Taylor <ian@cygnus.com>
1179
1180 * Makefile.in (do_maintainer_clean): Don't remove bfd-in2.h.
1181
f4236094
ILT
1182Mon Apr 21 11:21:31 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1183
1184 * elf32-m68k.c: Follow the last changes in elf32-i386.c:
1185 (struct elf_m68k_pcrel_relocs_copied, struct
1186 elf_m68k_link_hash_entry, struct elf_m68k_link_hash_table,
1187 elf_m68k_link_hash_traverse, elf_m68k_hash_table,
1188 elf_m68k_link_hash_newfunc, elf_m68k_link_hash_table_create,
1189 elf_m68k_discard_copies, bfd_elf32_bfd_link_hash_table_create):
1190 New definitions.
1191 (elf_m68k_check_relocs): If linking with -Bsymbolic, don't copy
1192 PC relative relocs for a global symbol defined in a regular
1193 object, and count the number of PC relative relocs copied for any
1194 global symbol.
1195 (elf_m68k_size_dynamic_sections): If linking with -Bsymbolic,
1196 traverse with elf_m68k_discard_copies.
1197
752eaefc
ILT
1198Sat Apr 19 22:50:14 1997 Ian Lance Taylor <ian@cygnus.com>
1199
9d71be72
ILT
1200 * elf32-i386.c (elf_i386_check_relocs): Only count PC relative
1201 relocs. From Jamie Lokier <jamie@rebellion.co.uk>.
1202
752eaefc
ILT
1203 * coffcode.h (coff_compute_section_file_positions): Force the
1204 potential last byte in the file to be written out when
1205 COFF_IMAGE_WITH_PE.
1206
e066f244
ILT
1207Thu Apr 17 13:46:56 1997 Per Fogelstrom <pefo@openbsd.org>
1208
a0412785 1209 * configure.host (mips*-*-openbsd*): New host.
e066f244 1210
81f01dd5
ILT
1211Thu Apr 17 11:10:54 1997 Ian Lance Taylor <ian@cygnus.com>
1212
f02004e9
ILT
1213 * elflink.h (elf_link_add_object_symbols): Only subtract the
1214 section VMA from the symbol value if this is a fully linked file.
1215
6e2183b1
ILT
1216 * elf32-i386.c (struct elf_i386_pcrel_relocs_copied): Define.
1217 (struct elf_i386_link_hash_entry): Define.
1218 (struct elf_i386_link_hash_table): Define.
1219 (elf_i386_link_hash_traverse): Define.
1220 (elf_i386_hash_table): Define.
1221 (elf_i386_link_hash_newfunc): New static function.
1222 (elf_i386_link_hash_table_create): New static function.
1223 (elf_i386_check_relocs): If linking with -Bsymbolic, don't copy
1224 PC relative relocs for a global symbol defined in a regular
1225 object, and count the number of PC relative relocs copied for any
1226 global symbol.
1227 (elf_i386_size_dynamic_sections): If linking with -Bsymbolic,
1228 traverse with elf_i386_discard_copies.
1229 (elf_i386_discard_copies): New static function.
1230 (bfd_elf32_bfd_link_hash_table_create): Define.
1231
81f01dd5
ILT
1232 From Gordon W. Ross <gwr@mc.com>:
1233 * aoutf1.h (MY_entry_is_text_address): Define if not defined.
1234 (sunos4_aout_backend): Use MY_entry_is_text_address.
1235
ebec2a6a
MH
1236start-sanitize-d30v
1237Wed Apr 16 12:43:32 1997 Martin Hunt <hunt@cygnus.com>
1238
1239 * elf32-d30v.c (elf_d30v_howto_table): Changed size of
1240 R_D30V_32_NORMAL to 2 (4 bytes).
1241
cf2cd4cf 1242end-sanitize-d30v
10888f10
ILT
1243Wed Apr 16 14:02:29 1997 Ian Lance Taylor <ian@cygnus.com>
1244
a895901a
ILT
1245 From Gordon W. Ross <gwr@mc.com>:
1246 * netbsd.h (N_SHARED_LIB): Define.
1247 (SEGMENT_SIZE): Don't define.
1248 * m68knetbsd.c (SEGMENT_SIZE): Don't define (revert change of
1249 April 11).
1250 * sparcnetbsd.c (TARGET_PAGE_SIZE): Define as 0x2000.
1251 (SEGMENT_SIZE): Don't define.
1252
10888f10
ILT
1253 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Set .rela.bss size
1254 to sizeof Rela structure, not sizeof Rel structure. From Gary
1255 Thomas <g.thomas@opengroup.org>.
1256
a0c80726
ILT
1257Tue Apr 15 11:50:37 1997 Ian Lance Taylor <ian@cygnus.com>
1258
55aba333
ILT
1259 * aout-target.h (MY(callback)): If entry_is_text_address, adjust
1260 whenever entry is larger than text address, but only by whole
1261 pages. From Gordon W. Ross <gwr@mc.com>.
1262
9b31e6f5
ILT
1263 * Makefile.in (install): Depend upon installdirs. Use
1264 mkinstalldirs to build $(oldincludedir).
1265 (installdirs): New target.
1266
a0c80726
ILT
1267 * elflink.h (elf_link_add_object_symbols): Don't call check_relocs
1268 if this is a debugging section which we are stripping.
1269
1270Mon Apr 14 12:39:30 1997 Richard Henderson <rth@tamu.edu>
1271
1272 * elf64-alpha.c (elf64_alpha_object_p): Allocate the
1273 alpha-specific target data struct.
1274
e5d7e3df
ILT
1275Mon Apr 14 11:45:46 1997 Ian Lance Taylor <ian@cygnus.com>
1276
1277 From Thomas Graichen <graichen@rzpd.de>:
1278 * Makefile.in: Always use $(SHELL) when running move-if-change.
1279 * configure.in: Use ${CONFIG_SHELL} when running $ac_config_sub.
1280 * configure: Rebuild.
1281
4b8c8bb9
ILT
1282Fri Apr 11 15:43:24 1997 Ian Lance Taylor <ian@cygnus.com>
1283
3bc3351e
ILT
1284 * elfcode.h (elf_slurp_symbol_table): Only subtract the section
1285 VMA if this is an executable file or a shared object.
1286
faa0b8db
ILT
1287 * targets.c (netbsd_core_vec): Declare. From Gordon W. Ross
1288 <gwr@mc.com>.
1289
1290 * libaout.h (struct aout_backend_data): Add entry_is_text_address
1291 field.
1292 * aout-target.h (SEGMENT_SIZE): Define to TARGET_PAGE_SIZE at the
1293 start of the file. Remove uses later on which switch using
1294 ifdef.
1295 (MY(callback)): Handle entry_is_text_address.
1296 (MY_entry_is_text_address): Define if not defined.
1297 (MY(backend_data)): Initialize new field.
1298 * aoutf1.h (sunos4_aout_backend): Likewise.
1299 * i386aout.c (MY(backend_data)): Likewise.
1300 * i386mach3.c (MY(backend_data)): Likewise.
1301 * mipsbsd.c (MY(backend_data)): Likewise.
1302 * sparclynx.c (sparclynx_aout_backend): Likewise.
1303 * netbsd.h (SEGMENT_SIZE): Define if not defined.
1304 (MY_entry_is_text_address): Define.
a895901a 1305 * m68knetbsd.c (SEGMENT_SIZE): Define as 0x20000.
faa0b8db 1306
4b8c8bb9
ILT
1307 * xcofflink.c (bfd_xcoff_import_symbol): Handle importing a symbol
1308 whose name starts with `.'.
1309
3b1b0308
ILT
1310Fri Apr 11 11:57:15 1997 Niklas Hallqvist <niklas@appli.se>
1311
1312 * config.bfd: (i[3456]86-*-openbsd*, m68*-*-openbsd*,
1313 mips*el*-*-openbsd*, mips*-*-openbsd*, ns32k-*-openbsd*,
1314 powerpc-*-*bsd*, sparc-*-openbsd*): New targets.
1315 * configure.in (i[3456]86-*-openbsd*, mips*-*-openbsd*,
1316 m68*-*-openbsd*, ns32k-*-openbsd*, powerpc-*-*bsd*,
1317 sparc-*-openbsd*): New targets.
1318 * configure: Rebuild.
1319
57a3027b
ILT
1320Tue Apr 8 18:09:29 1997 Jamie Lokier <jamie@rebellion.co.uk>
1321
1322 * stabs.c (struct stab_section_info): New field
1323 `cumulative_skips'.
1324 (_bfd_link_section_stabs): Fill the above array.
1325 (_bfd_stab_section_offset): Use `cumulative_skips' to
1326 speed up offset calculation.
1327
a01362cc
JL
1328Tue Apr 8 00:01:31 1997 Jeffrey A Law (law@cygnus.com)
1329
69444014
JL
1330 * elf-mn10300.c (mn10300_elf_relax_section): Don't forget the
1331 addend for non pc-relative relocations.
1332
a01362cc
JL
1333 * elf-m10300.c (bfd_elf32_mn10300_reloc): Remove prototype
1334 for non-existent function.
1335
1336 * elf-m10300.c (mn10300_elf_relax_section): New function.
1337 (mn10300_elf_relax_delete_bytes): Likewise.
1338 (mn10300_elf_symbol_address_p): Likewise.
1339 (mn10300_elf_get_relocated_section_contents): Likewise.
1340 (bfd_elf32_bfd_relax_section): Define.
1341 (bfd_elf32_bfd_get_relocated_section_contents): Likewise.
1342
418d5b05
ILT
1343Mon Apr 7 16:47:09 1997 Ian Lance Taylor <ian@cygnus.com>
1344
1345 * configure.host: Set SHLIB_LIBS.
1346 * configure.in: Substitute SHLIB_LIBS.
1347 * configure: Rebuild.
1348 * Makefile.in (SHLIB_LIBS): New variable.
1349 ($(SHLIB)): Use $(SHLIB_LIBS).
1350
d9654a71
MS
1351Mon Apr 7 10:53:52 1997 Michael Snyder <msnyder@cleaver.cygnus.com>
1352
1353 * bfd-in.h bfd-in2.h: add bfd_section_lma macro to correspond
1354 with bfd_section_vma.
1355
5641f23e
ILT
1356Fri Apr 4 11:37:15 1997 Ian Lance Taylor <ian@cygnus.com>
1357
b872076e
ILT
1358 * configure.in: Update file names for bfd_elf32_mn10[23]00_vec.
1359 Correct CPU file names for mn10[23]00.
1360 * configure: Rebuild.
1361
ac664747
ILT
1362 * bfd.c (bfd_record_phdr): Cast count to size_t before
1363 subtraction.
1364
44fe6ab1
ILT
1365 * coff-ppc.c (dump_toc): Add cast to avoid warning from SunOS cc.
1366 * coff-rs6000.c (xcoff_read_ar_hdr): Likewise.
1367 (xcoff_write_archive_contents): LIkewise.
1368 * elf32-mips.c (_bfd_mips_elf_set_section_contents): Likewise.
1369 (mips_elf_create_procedure_table): Likewise.
1370 * peicode.h (pe_print_idata): Likewise.
1371 (pe_print_edata, pe_print_pdata, pe_print_reloc): Likewise.
1372 * xcofflink.c (xcoff_get_section_contents): Likewise.
1373 (_bfd_xcoff_canonicalize_dynamic_symtab): Likewise.
1374 (xcoff_link_add_symbols): Likewise.
1375 (xcoff_link_add_symbols): Likewise.
1376
0cea98f0
ILT
1377 * ppcboot.c (ppcboot_set_arch_mach): Make static.
1378 (ppcboot_bfd_print_private_bfd_data): Likewise.
1379
5641f23e
ILT
1380 * elf32-mips.c (elf_mips_ctor64_howto): Set complain_on_overflow
1381 to complain_overflow_signed.
1382
58b4a8f3
ILT
1383Thu Apr 3 11:51:54 1997 Ian Lance Taylor <ian@cygnus.com>
1384
1385 * VERSION: Set to 2.8.1.
1386
1387 * Branched binutils 2.8.
1388
1389 * elf32-ppc.c (ppc_elf_check_relocs): Don't check SEC_ALLOC when
1390 deciding whether to copy a reloc into a shared object.
1391 (ppc_elf_relocate_section): Likewise. Relocate R_PPC_RELATIVE
1392 relocs in unallocated sections.
1393 * elf32-sparc.c (elf32_sparc_relocate_section): Relocate
1394 R_SPARC_RELATIVE relocs in unallocated sections.
1395
acba322e
MM
1396Wed Apr 2 16:19:41 1997 Mike Meissner <meissner@cygnus.com>
1397
1398 * elf32-ppc.c (ppc_elf_check_relocs): Undo March 26 change and
1399 always create got section so that the _GLOBAL_OFFSET_TABLE_ label
1400 is always created.
1401
ab66cc8d
ILT
1402Wed Apr 2 10:49:07 1997 Ian Lance Taylor <ian@cygnus.com>
1403
ba254dc5
ILT
1404 * elflink.h (elf_link_add_object_symbols): Let a common symbol
1405 override an uninitialized symbol from a shared library with a
1406 smaller size.
f74e2365 1407
7a68d1f7
ILT
1408 * elf-m10200.c: Rename from elf32-mn10200.c.
1409 * elf-m10300.c: Rename from elf32-mn10300.c.
1410 * cpu-m10200.c: Rename from cpu-mn10200.c
1411 * cpu-m10300.c: Rename from cpu-mn10300.c
1412 * Makefile.in: Update accordingly.
1413
3072dce9
ILT
1414 * elf32-mips.c (elf_mips_ctor64_howto): New static variable.
1415 (elf_mips_isa): Move to earlier in file.
1416 (mips_reloc_map): Remove BFD_RELOC_CTOR entry.
1417 (bfd_elf32_bfd_reloc_type_lookup): Handle BFD_RELOC_CTOR
1418 specially.
1419
ab66cc8d
ILT
1420 * elf32-mips.c (mips16_jump_reloc): Print a warning rather than
1421 calling abort.
1422
0f854557
ILT
1423Tue Apr 1 16:18:05 1997 Klaus Kaempf <kkaempf@progis.de>
1424
1425 * configure.com: New file.
1426 * config.h-vms: Remove file.
1427 * makefile.vms: Update for new configure scheme.
1428
8faaff9e
ILT
1429Mon Mar 31 23:28:39 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
1430
0f854557
ILT
1431 * libcoff-in.h (ppc_allocate_toc_section): Declare.
1432 (ppc_process_before_allocation): Declare.
1433 * libcoff.h: Rebuild.
1434
8faaff9e
ILT
1435 * coffcode.h (coff_mkobject_hook): Declare if not a macro.
1436
5cfc9987
ILT
1437Mon Mar 31 16:29:50 1997 Joel Sherrill <joel@oarcorp.com>
1438
3418d8c4 1439 * config.bfd (hppa*-*-rtems*): New target, like hppa-*-*elf*.
5cfc9987 1440
34c68301
ILT
1441Mon Mar 31 16:11:35 1997 Ian Lance Taylor <ian@cygnus.com>
1442
1443 * coff-a29k.c (coff_a29k_relocate_section): Don't use symndx as a
1444 symbol index for a R_IHCONST reloc.
1445
774dc17c
ILT
1446Mon Mar 31 15:40:59 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
1447
1448 * targmatch.sed: Do not use \(\) recursively.
1449
9e55b695
ILT
1450Fri Mar 28 14:44:08 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
1451
1452 * m68klinux.c (MACHTYPE_OK): Define.
1453 * i386linux.c (MACHTYPE_OK): Define.
1454
f3f3b475
ILT
1455Fri Mar 28 11:56:15 1997 Ian Lance Taylor <ian@cygnus.com>
1456
5f792743
ILT
1457 From David S. Miller <davem@caip.rutgers.edu> and H.J. Lu
1458 <hjl@gnu.ai.mit.edu>:
1459 * sparclinux.c: New file.
774dc17c
ILT
1460 * bfd-in.h (bfd_sparclinux_size_dynamic_sections): Declare.
1461 * bfd-in2.h: Rebuild.
5f792743
ILT
1462 * config.bfd (sparc-*-linuxaout*, sparc-*-linux*): New targets.
1463 * configure.in (sparclinux_vec): Add to list of vectors.
1464 * configure: Rebuild.
1465 * targets.c (sparclinux_vec): Declare.
1466 (bfd_target_vector): Add sparclinux_vec.
1467 * Makefile.in: Rebuild dependencies.
1468 (BFD32_BACKENDS): Add sparclinux.o.
1469 (BFD32_BACKENDS_CFILES): Add sparclinux.c.
1470
bebe5fbf
ILT
1471 * coff-mips.c (mips_ecoff_backend_data): Initialize new
1472 bfd_coff_backend_data field.
1473 * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
1474
f0315e65
ILT
1475 * config.bfd: Add bfd_elf64_{big,little}mips_vec to targ_selvecs
1476 for mips*el*-*-linux* and mips*-*-linux*. From H.J. Lu
1477 <hjl@lucon.org> and Ralf Baechle <ralf@gnu.ai.mit.edu>.
1478
f3f3b475
ILT
1479 * bfd.c: Include "libiberty.h".
1480 (strerror): Don't declare.
1481 (bfd_errmsg): Call xstrerror rather than strerror.
1482
013b249f
ILT
1483Thu Mar 27 12:55:42 1997 Ian Lance Taylor <ian@cygnus.com>
1484
eb80d52a
ILT
1485 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Generate a COPY
1486 reloc even if the symbol is in the .bss section.
1487 * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Likewise.
1488 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Likewise.
1489 * elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Likewise.
1490
f89adeb7
ILT
1491 * coffcode.h (bfd_coff_backend_data): Add new field
1492 _bfd_coff_default_section_alignment_power.
1493 (bfd_coff_default_section_alignment_power): Define.
1494 (bfd_coff_std_swap_table): Initialize new field.
1495 * libcoff.h: Rebuild.
1496 * cofflink.c (coff_link_add_symbols): Limit alignment of a common
1497 symbol to the default section alignment.
1498
013b249f
ILT
1499 * COPYING: Update FSF address.
1500
0e9c4377
MH
1501start-sanitize-d30v
1502Thu Mar 27 00:45:57 1997 Martin M. Hunt <hunt@pizza.cygnus.com>
1503
cf2cd4cf
UD
1504 * elf32-d30v.c (elf_d30v_howto_table): Fix a typo in the
1505 21-bit absolute that made it act as a relative.
0e9c4377 1506
cf2cd4cf 1507end-sanitize-d30v
537327bc
ILT
1508Wed Mar 26 14:50:20 1997 Ian Lance Taylor <ian@cygnus.com>
1509
0e9c4377
MH
1510 * elflink.c (_bfd_elf_create_linker_section): Don't set
1511 bss_section and rel_section from existing sections.
1512
537327bc
ILT
1513 * elf32-ppc.c (ppc_elf_check_relocs): Only create the got section
1514 if it is needed.
1515
60d1227a
SG
1516Tue Mar 25 22:26:56 1997 Stu Grossman (grossman@critters.cygnus.com)
1517
1518 * aoutx.h (some_aout_object_p): Change executable test to fix
1519 problems with embedded a.out systems.
1520
3cd5cf3d
ILT
1521Tue Mar 25 14:35:37 1997 Ian Lance Taylor <ian@cygnus.com>
1522
6717fb0d
ILT
1523 * stabs.c (_bfd_stab_section_offset): New function.
1524 * libbfd-in.h (_bfd_stab_section_offset): Declare.
1525 * libbfd.h: Rebuild.
1526 * elf32-i386.c (elf_i386_relocate_section): Adjust the offset of a
1527 stab reloc.
1528 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1529 * elf32-mips.c (mips_elf_relocate_section): Likewise.
1530 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1531 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1532 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
1533
3cd5cf3d
ILT
1534 * stabs.c (_bfd_link_section_stabs): Copy over the first header
1535 symbol. Check for memory allocation failure of *psinfo.
1536 (_bfd_write_section_stabs): Add psinfo parameter. Change all
1537 callers. Set the value of the header symbol.
1538 * libbfd-in.h (_bfd_write_section_stabs): Update declaration.
1539 * libbfd.h: Rebuild.
1540
67e87a1d
FF
1541start-sanitize-tic80
1542Mon Mar 24 20:07:29 1997 Fred Fish <fnf@cygnus.com>
1543
1544 * coff-tic80.c (tic80_howto_table): Add R_ABS entry.
1545 (rtype2howto): Handle R_ABS reloc type. Also abort on unhandled
1546 reloc types, rather than silently failing to generate an output file.
1547
1548end-sanitize-tic80
e9148724
ILT
1549Mon Mar 24 13:41:00 1997 Ian Lance Taylor <ian@cygnus.com>
1550
e1ea3dd5
ILT
1551 * targmatch.sed: Use the hold space to put the #ifdef around the
1552 the string constant.
1553 * targets.c (UNSUPPORTED_TARGET): Don't define.
1554 (find_target): Don't check for UNSUPPORTED_TARGET.
1555 (bfd_set_default_target): Don't try to optimize by checking for
1556 default.
1557
032dc9ed
ILT
1558 * Makefile.in: Rebuild dependencies.
1559 (ALL_MACHINES_CFILES): Add cpu-m32r.c.
1560 (BFD32_BACKENDS_CFILES): Add elf32-m32r.c.
1561 (elf32-m32r.o): Remove explicit target.
1562
19d02576
ILT
1563 * config.bfd: Don't set targ_underscore for i[3456]86-*-gnu* or
1564 i[3456]86-*-linux*.
1565
e9148724
ILT
1566 * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Don't
1567 count section symbols for sections that were created by the
1568 linker, or are not allocatable or not loadable.
1569 (elf32_sparc_finish_dynamic_sections): Output output section
1570 symbols for section for which we made space for them.
1571
0727fe10
ILT
1572Fri Mar 21 13:08:26 1997 Ian Lance Taylor <ian@cygnus.com>
1573
1574 * elf32-sparc.c (elf32_sparc_size_dynamic_sections): If there is
1575 no .rela.plt section, don't output a DT_PLTGOT dynamic entry.
1576
ff22a9db
DE
1577Fri Mar 21 12:36:46 1997 Doug Evans <dje@canuck.cygnus.com>
1578
1579 * elf32-m32r.c (m32r_elf_howto_table): Use special function for LO16.
1580 (m32r_hi16_list): New static local.
1581 (m32r_elf_hi16_reloc): Don't perform reloc, just queue it up.
1582 (m32r_elf_do_hi16_reloc): Delete.
1583 (m32r_elf_relocate_hi16): New function.
1584 (m32r_elf_lo16_reloc): New function.
1585 (m32r_elf_relocate_section): For HI16 relocs, scan for corresponding
1586 LO16 reloc.
1587
1588 Mon Mar 10 16:03:31 1997 Doug Evans <dje@seba.cygnus.com>
1589
1590 * elf32-m32r.c (m32r_elf_create_linker_section): Delete.
1591 (m32r_elf_add_symbol_hook): Rewrite _SDA_BASE_ support.
1592 (m32r_elf_final_sda_base): New function.
1593 (m32r_elf_relocate_section): Rewrite sdata support.
1594 (m32r_elf_finish_dynamic_sections): Delete.
1595
34bc6ffc
ILT
1596Thu Mar 20 12:39:02 1997 Ian Lance Taylor <ian@cygnus.com>
1597
ac388f2a
ILT
1598 Based on patches from Philippe De Muyter <phdm@info.ucl.ac.be>.
1599 * coff-svm68k.c: New file. Just defines some macros and includes
1600 coff-m68k.c.
1601 * coff-m68k.c: Add functions to handle common addends, moved in
1602 from cf-m68klynx.c. Control them using COFF_COMMON_ADDEND macro.
1603 Control whether relocs are visible using STATIC_RELOCS.
1604 * cf-m68klynx.c: Simplify greatly: just define macros to control
1605 coff-m68k.c.
1606 * coff-aux.c: Likewise. Just leave add_one_symbol routine.
1607 * targets. (m68ksysvcoff_vec): Declare.
1608 (bfd_target_vector): Add m68ksysvcoff_vec.
1609 * config.bfd (m68*-motorola-sysv*): New target.
1610 * configure.in (m68ksysvcoff_vec): New vector.
1611 * configure: Rebuild.
1612 * Makefile.in: Rebuild dependencies.
1613 (BFD32_BACKENDS): Add coff-svm68k.o.
1614 (BFD32_BACKENDS_CFILES): Add coff-svm68k.c.
1615
b9576d75
ILT
1616 * binary.c (binary_set_section_contents): Don't get misled if the
1617 first section is not loadable. From Matthew L. Martin
1618 <mlm@xedia.com>.
1619
34bc6ffc
ILT
1620 * elflink.h (elf_bfd_final_link): Set the value of a section
1621 symbol to the section address unless doing a relocateable link.
1622
1623Tue Mar 18 23:03:17 1997 Richard Henderson <rth@tamu.edu>
1624
1625 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't create
1626 .plt entry if we've taken the function's address.
1627 (elf64_alpha_merge_gots): Merge collected flags info as well.
1628
303e7257
ILT
1629Tue Mar 18 22:40:09 1997 H.J. Lu <hjl@lucon.org>
1630
1631 * Many files: Add function prototypes.
1632 * cpu-m68k.c (bfd_default_scan_num_mach): Don't declare.
1633 * ecofflink.c: Include "libcoff.h" and "libecoff.h".
1634 * elf32-ppc.c (ppc_elf_fake_sections): Make static.
1635 * opncls.c (bfd_openstreamr): Change stream parameter to PTR.
1636 * peicode.h: Change several void * parameters to PTR.
1637 * srec.c (srec_get_symbol_info): Make static.
1638 * syms.c (bfd_symbol_is_absolute): Remove.
7197adc4 1639 * Makefile.in: Rebuild dependencies.
303e7257 1640
939b2169
ILT
1641Tue Mar 18 12:58:08 1997 Ian Lance Taylor <ian@cygnus.com>
1642
e76386d2
ILT
1643 * elf32-m32r.c (m32r_elf_is_local_label_name): Remove.
1644 (bfd_elf32_bfd_is_local_label): Don't define.
1645
939b2169
ILT
1646 * xcofflink.c (_bfd_xcoff_bfd_final_link): Call bfd_malloc rather
1647 than malloc.
1648
50ede03d
ILT
1649Mon Mar 17 11:32:53 1997 Ian Lance Taylor <ian@cygnus.com>
1650
508539ab
ILT
1651 * bfd-in.h: Don't include obstack.h.
1652 (struct bfd_hash_table): Change memory field to PTR.
1653 * bfd.c (struct _bfd): Change memory field to PTR.
1654 * bfd-in2.h: Rebuild.
1655 * libbfd-in.h (bfd_release): Declare as function, don't define as
1656 macro.
1657 * libbfd.h: Rebuild.
1658 * opncls.c: Include "objalloc.h" rather than "obstack.h". Use
1659 objalloc routines rather than obstack routines.
1660 (obstack_chunk_alloc, obstack_chunk_free): Don't define.
1661 (getpagesize): Don't define.
1662 (_bfd_new_bfd): Don't set _bfd_chunksize.
1663 (bfd_openr): Free new bfd and objalloc on failure.
1664 (bfd_fdopenr, bfd_openstreamr, bfd_openw): Likewise.
1665 (bfd_alloc_size): Remove.
1666 (bfd_release): New function.
1667 * hash.c: Include "objalloc.h" rather than "obstack.h". Use
1668 objalloc routines rather than obstack routines.
1669 (obstack_chunk_alloc, obstack_chunk_free): Don't define.
1670 * ecofflink.c: Include "objalloc.h" rather than "obstack.h". Use
1671 objalloc routines rather than obstack routines.
1672 (obstack_chunk_alloc, obstack_chunk_free): Don't define.
1673 (struct accumulate): Change memory to struct objalloc *.
1674 * liboasys.h (oasys_data_type): Remove oasys_obstack field.
1675 * dep-in.sed: Don't remove obstack.h from dependency list.
1676 * Makefile.in: Rebuild dependencies.
1677 (BFD_H_DEPS): Remove obstack.h.
1678 (install): Don't install obstack.h.
1679 * Many files: Don't include "obstack.h".
1680 * VERSION: Bump.
1681
062a1b96
ILT
1682 * opncls.c (bfd_alloc_grow, bfd_alloc_finish): Remove.
1683 * libbfd-in.h (bfd_alloc_grow, bfd_alloc_finish): Don't declare.
1684 * libbfd.h: Rebuild.
1685 * ieee.c (ieee_archive_p): Rewrite to not use bfd_alloc_grow.
1686 * sunos.c (sunos_add_dynamic_symbols): Likewise.
0103b447 1687 * srec.c (srec_scan): Rewrite to not use obstack_1grow.
062a1b96 1688
50ede03d
ILT
1689 * opncls.c (bfd_alloc): Rename from bfd_alloc_by_size_t. Remove
1690 old version of bfd_alloc.
1691 * libbfd-in.h (bfd_alloc_by_size_t): Don't declare.
1692 * libbfd.h: Rebuild.
1693 * Several files: Call bfd_alloc rather than bfd_alloc_by_size_t.
1694
5e67a3c6
ILT
1695Sat Mar 15 15:24:18 1997 Ian Lance Taylor <ian@cygnus.com>
1696
1697 * elf32-mips.c (mips_elf_is_local_label_name): Accept the generic
1698 ELF local label syntax as well.
1699
7305cacd
FF
1700Sat Mar 15 10:16:42 1997 Fred Fish <fnf@cygnus.com>
1701
1702 * config.bfd (powerpc-*-beos*): New target.
1703 * configure.in (powerpc-*-beos*): Add case that explicitly
1704 does not set COREFILE for now. A future BeOS version is
1705 expected to support core files.
1706 * configure: Regenerate with autoconf.
1707
f56d634e
ILT
1708Fri Mar 14 16:43:22 1997 Ian Lance Taylor <ian@cygnus.com>
1709
4813bbed
ILT
1710 * elf32-mips.c (mips_elf_check_relocs): Give an error if CALL16 is
1711 seen with a local symbol, rather than crashing.
1712
f56d634e
ILT
1713 * elfcode.h (elf_slurp_symbol_table): Don't try to read the
1714 version symbols if there aren't any.
1715
4507d858
FF
1716start-sanitize-tic80
1717Thu Mar 13 16:38:30 1997 Fred Fish <fnf@cygnus.com>
1718
1719 * coff-tic80.c (coff_rtype_to_howto): Define
1720 (coff_tic80_rtype_to_howto): Clone generic coff version and
1721 add code to handle the funky TI "internal relocations".
1722
1723end-sanitize-tic80
94ba939a
ILT
1724Thu Mar 13 14:08:53 1997 Ian Lance Taylor <ian@cygnus.com>
1725
37897db0
ILT
1726 * elflink.h (elf_link_add_object_symbols): Don't warn about type
1727 or size changes because of a weak symbol.
1728
94ba939a
ILT
1729 * cisco-core.c (SIGEMT): Define if not defined.
1730
e549b1d2
ILT
1731Wed Mar 12 21:36:05 1997 Ian Lance Taylor <ian@cygnus.com>
1732
1733 * elflink.h (elf_link_add_object_symbols): Use extsymoff when
1734 setting ever. Sanity check the version number. Sort out copying
1735 flags and other information when adding an indirect symbol.
1736 (NAME(bfd_elf,size_dynamic_sections)): Preserve any dynamic
1737 symbols added by the backend. Clear the entire contents of the
1738 versym section.
1739 (elf_export_symbol): Ignore indirect symbols.
1740 (elf_link_output_extsym): Accept a section without an owner in an
1741 assert.
1742 * elfcode.h (elf_slurp_symbol_table): Add a sanity check on the
1743 version count. Correct the allocation of x_versymp.
1744
1745 * elf32-mips.c (mips_elf_add_symbol_hook): Don't set the owner of
1746 the magic sections used for SHN_MIPS_TEXT and SHN_MIPS_DATA.
1747 Don't return bfd_und_section_ptr when info->shared.
1748 (mips_elf_final_link): Set the alignment of .rtproc to 4, not 12.
1749 (mips_elf_create_dynamic_sections): Correct type: ^= for &=.
1750 (mips_elf_check_relocs): Resolve an indirect symbol in
1751 sym_hashes.
1752 (mips_elf_finish_dynamic_symbol): Don't change SHN_ABS into
1753 SHN_MIPS_TEXT or SHN_MIPS_DATA.
1754
1755 * elf.c (bfd_elf_print_symbol): Tweak version output slightly.
1756
1757Tue Mar 11 01:38:36 1997 Ian Lance Taylor <ian@cygnus.com>
1758
1759 From Eric Youngdale <eric@andante.jic.com>:
1760 * elf-bfd.h (ELF_LINK_FORCED_LOCAL): Define.
1761 * elf.c (bfd_elf_print_symbol): Correct errors in last change.
1762 * elflink.h (elf_link_add_object_symbols): Handle cases in which a
1763 versioned symbol appears in both a regular and a shared object.
1764 (elf_link_assign_sym_version): Set ELF_LINK_FORCED_LOCAL when
1765 appropriate. Improve error message.
1766 (struct elf_outext_info): Rename from elf_finfo_failed. Change
1767 all uses. Add localsyms field.
1768 (elf_bfd_final_link): When generating a shared library, call
1769 elf_link_output_extsym to output all local symbols.
1770 (elf_link_output_extsym): Handle symbols which were forced to
1771 become local.
1772
d6bfcdb5
ILT
1773Sun Mar 9 23:08:49 1997 Ian Lance Taylor <ian@cygnus.com>
1774
1775 From Eric Youngdale <eric@andante.jic.com>:
1776 * elf-bfd.h (elf_symbol_type): Add version field.
1777 * elfcode.h (elf_slurp_symbol_table): Set version field.
1778 * elflink.h (elf_link_add_object_symbols): When creating an
1779 indirect symbol for a default version symbol, set DEF_DYNAMIC if
1780 appropriate. Set up an indirection from the nondefault version of
1781 the symbol as well.
1782 (NAME(bfd_elf,size_dynamic_sections)): Call
1783 elf_link_assign_sym_version before checking whether there are any
1784 versions. Always record the version name as a dynamic symbol.
1785 Initialize counters.
1786 (elf_link_assign_sym_version): After finding a version, see if a
1787 symbol should be forced to local scope. Create a new version
1788 definition if appropriate.
1789 (elf_link_output_extsym): Correct indirect symbol handling.
1790 * elf.c (bfd_elf_print_symbol): Print version information.
1791 (bfd_section_from_shdr): Turn version sections into BFD sections.
1792 (elf_fake_sections): Only copy cverdefs and cverrefs into sh_info
1793 if sh_info is not already set.
1794 (_bfd_elf_copy_private_section_data): Copy sh_info for version
1795 sections.
1796 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Tell
1797 _bfd_stringtab_add to copy the name into permanent memory if
1798 appropriate.
1799
7debe20c
ILT
1800Fri Mar 7 11:55:31 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
1801
1802 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Fully parenthesize.
1803
358bb592
ILT
1804Fri Mar 7 10:37:30 1997 Ian Lance Taylor <ian@cygnus.com>
1805
ccd0e5e2
ILT
1806 * coffcode.h (bfd_coff_backend_data): Change
1807 _bfd_coff_compute_section_file_positions to return a boolean
1808 value. Change all callers.
1809 (coff_compute_section_file_positions): Change return type to
1810 boolean. If the size of the last section changed, then output a
1811 zero byte at the end of the file.
1812 * libcoff.h: Rebuild.
1813
e8c4696e
ILT
1814 * xcofflink.c (_bfd_xcoff_bfd_final_link): Always allocate space
1815 for at least 6 output symbols.
1816 (xcoff_write_global_symbol): When emitting TOC entry relocs, also
1817 emit a TC csect to represent the space they take up. For an XO
1818 symbol, just emit a reference, not a csect.
1819
4104dff6
ILT
1820 * Makefile.in ($(SHLINK)): Just use ln -s, not ln -sf, since
1821 Solaris doesn't like the combined options, and the -f is
1822 unnecessary.
5bd7c941 1823 (stamp-tshlink, install): Likewise.
4104dff6 1824
358bb592
ILT
1825 * elf32-mips.c (mips_elf_relocate_section): Correct R_MIPS16_26
1826 handling when little endian.
1827
77bf22e6
JL
1828Thu Mar 6 13:51:51 1997 Jeffrey A Law (law@cygnus.com)
1829
5847e6dd
JL
1830 * elf32-mn10300.c (mn10300_elf_final_link_relocate): New function.
1831 (mn10300_elf_relocate_section): Likewise.
1832 (elf_backend_relocate_section): Define.
1833
77bf22e6
JL
1834 * elf32-mn10300.c (reloc_type): Remove PCREL{8,16,32}_{1,2}BYTE
1835 relocs. Replace them with generic PCREL_{8,16,32} relocs.
1836 (elf32_mn10300_howto_table): Likewise.
1837 (elf32_mn10300_reloc_map): Likewise.
1838 (bfd_elf32_mn10300_reloc): Delete unused function.
1839
13b58694
FF
1840Thu Mar 6 12:19:59 1997 Fred Fish <fnf@cygnus.com>
1841
1842start-sanitize-tic80
1843 * coff-tic80.c (rtype2howto): If passed a relocation type we don't
1844 understand, just set the howto field to NULL, and the caller will
1845 print an appropriate error message.
1846end-sanitize-tic80
1847 * coffcode.h (coff_slurp_reloc_table): Pull duplicate declarations and
1848 code fragment out of both legs of #ifdef RELOC_PROCESSING ... #endif
1849 block. Use NULL for initializations of "ptr" rather than bare 0.
1850 * coff-h8300.c: Fix typo in comment.
1851 * coff-h8500.c: Ditto.
1852 * coff-w65.c: Ditto
1853 * coff-z8k.c: Ditto.
cf2cd4cf 1854
da171461
DE
1855Wed Mar 5 13:59:09 1997 Doug Evans <dje@seba.cygnus.com>
1856
1857 * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc): Fix overflow calc.
1858 (m32r_elf_relax_section, m32r_elf_relax_delete_bytes,
1859 m32r_elf_get_relocated_section_contents): First pass at relax support.
1860
da171461
DE
1861Mon Mar 3 13:27:09 1997 Ulrich Drepper <drepper@rtl.cygnus.com>
1862
1863 * elflink.h (elf_link_add_object_symbols): Use correct sh_size
1864 entry for reading verdef records.
1865 Use correct braces for computing increments of extverdaux and
1866 exteverdef record pointers.
1867
4b4ac3ae
FF
1868start-sanitize-tic80
1869Sun Mar 2 22:47:54 1997 Fred Fish <fnf@cygnus.com>
1870
1871 * coff-tic80.c (COFF_DEFAULT_SECTION_ALIGNMENT_POWER): Set this to 2
1872 instead of 4.
1873
1874end-sanitize-tic80
a48ef404
ILT
1875Sun Mar 2 16:25:35 1997 Ian Lance Taylor <ian@cygnus.com>
1876
1877 * elflink.h (elf_link_find_version_dependencies): Check that
1878 DEF_REGULAR is not set as well as checking that DEF_DYNAMIC is
1879 set.
1880
84fd6e7e
FF
1881start-sanitize-tic80
1882Fri Feb 28 16:52:40 1997 Fred Fish <fnf@cygnus.com>
1883
1884 * coffcode.h (coff_set_flags): Add case for TIC80_ARCH_MAGIC.
1885
1886end-sanitize-tic80
af4dffff
ILT
1887Fri Feb 28 15:06:45 1997 Ian Lance Taylor <ian@cygnus.com>
1888
73769e1f
ILT
1889 * targets.c (bfd_default_vector): Make non-const.
1890 (find_target): New static function, broken out of
1891 bfd_find_target.
1892 (bfd_set_default_target): New function.
1893 (bfd_find_target): Call find_target. When defaulting, use
1894 bfd_default_vector[0] if it is not NULL.
1895 * libbfd-in.h (bfd_default_vector): Adjust declaration.
1896 * bfd-in2.h, libbfd.h: Rebuild.
1897
af4dffff
ILT
1898 * syms.c (bfd_is_local_label): Return false if the symbol has no
1899 name.
1900 * coff-i960.c (coff_i960_is_local_label_name): New function.
1901 (coff_bfd_is_local_label_name): Define.
1902 * coff-m68k.c (m68k_coff_is_local_label_name): New function.
1903 (coff_bfd_is_local_label_name): Define.
1904 * coff-rs6000.c (xcoff_is_local_label_name): New function.
1905 (coff_bfd_is_local_label_name): Define.
1906 * elf.c (_bfd_elf_is_local_label_name): Treat symbols beginning
1907 with .. or _.L_ as local.
1908 * elf32-i386.c (elf_i386_is_local_label_name): New function.
1909 (bfd_elf32_bfd_is_local_label_name): Define.
1910 * evax-alpha.c (evax_bfd_is_local_label_name): Treat symbols
1911 beginning with $ as local.
1912
85d6f0b4
ILT
1913Thu Feb 27 18:36:23 1997 Ian Lance Taylor <ian@cygnus.com>
1914
e316f514
ILT
1915 * aoutx.h (aout_link_write_symbols): Use bfd_is_local_label_name
1916 rather than comparing against info->lprefix.
1917 * cofflink.c (_bfd_coff_link_input_bfd): Likewise.
1918 * elflink.h (elf_link_input_bfd): Likewise.
1919 * linker.c (_bfd_generic_link_output_symbols): Likewise.
1920 * xcofflink.c (xcoff_link_input_bfd): Likewise.
1921
1922 * elfxx-target.h (bfd_elfNN_bfd_is_local_label_name): Define as
1923 _bfd_elf_is_local_label_name if not already defined.
1924 * elf.c (_bfd_elf_is_local_label_name): New function.
1925 * elf-bfd.h (_bfd_elf_is_local_label_name): Declare.
1926
1927 * coff-m88k.c (coff_bfd_is_local_label_name): Define.
1928 (m88k_is_local_label_name): New static function.
1929
1930 * coffcode.h (coff_bfd_is_local_label_name): Define as
1931 _bfd_coff_is_local_label_name if not already defined.
1932 * coffgen.c (_bfd_coff_is_local_label_name): New function.
1933 * libcoff-in.h (_bfd_coff_is_local_label_name): Declare.
1934 * libcoff.h: Rebuild.
cf2cd4cf 1935
35a3e78e
ILT
1936 * targets.c (BFD_JUMP_TABLE_SYMBOLS): Change _bfd_is_local_label
1937 to _bfd_is_local_label_name.
1938 (bfd_target): Likewise.
1939 * syms.c (bfd_is_local_label): Define as function, not macro.
1940 (bfd_is_local_name): Define.
1941 * libbfd.c (bfd_generic_is_local_label_name): Rename from
1942 bfd_generic_is_local_label, and take a string rather than a
1943 symbol.
1944 * libbfd-in.h (_bfd_nosymbols_bfd_is_local_label): Don't define.
1945 (_bfd_nosymbols_bfd_is_local_label_name): Define.
1946 (bfd_generic_is_local_label): Don't declare.
1947 (bfd_generic_is_local_label_name): Declare.
1948 * bfd-in2.h, libbfd.h: Rebuild.
1949 * All backends: Change local_label to local_label_name.
1950
85d6f0b4
ILT
1951 * elf32-mips.c (struct mips_got_info): Add assigned_gotno field.
1952 (mips_elf_relocate_got_local): Change return type to boolean.
1953 Don't assume that the first zero entry is unassigned; instead, use
1954 assigned_gotno.
1955 (mips_elf_relocate_section): Check return value of
1956 mips_elf_relocate_got_local.
1957 (mips_elf_create_got_section): Initialize assigned_gotno field.
1958
56819c99
MH
1959start-sanitize-d30v
1960Wed Feb 26 15:19:51 1997 Martin M. Hunt <hunt@pizza.cygnus.com>
1961
1962 * elf32-d30v.c (bfd_elf_d30v_reloc): Add code to do 32-bit
1963 relocations.
1964
cf2cd4cf 1965end-sanitize-d30v
fa802cb0
ILT
1966Wed Feb 26 13:33:03 1997 Ian Lance Taylor <ian@cygnus.com>
1967
1968 * elflink.h (elf_link_input_bfd): Don't skip symbols from sections
1969 that have no contents merely because linker_mark is not set.
1970
1971Tue Feb 25 18:51:35 1997 Stan Shebs <shebs@andros.cygnus.com>
1972
1973 * config.bfd (mips*-*-lnews*): New target.
1974 * coff-mips.c (mips_relocate_section): Make assert compare
1975 content byteorder instead of header byteorder.
1976 (ecoff_biglittle_vec): New BFD, big-endian headers, little-endian
1977 data.
55ef0d90 1978 * targets.c (bfd_target_vector): Add ecoff_biglittle_vec.
fa802cb0
ILT
1979 * configure.in (ecoff_biglittle_vec): Add case.
1980 * configure: Update.
1981
7b4be668
ILT
1982Tue Feb 25 00:32:49 1997 Ian Lance Taylor <ian@cygnus.com>
1983
b08f5ac2
ILT
1984 * elf.c (elf_fake_sections): Use SHT_NOTE for any section whose
1985 name begins with ".note".
1986 (map_sections_to_segments): Add a PT_NOTE segment for any loadable
1987 section whose name begins with ".note".
1988 (get_program_header_size): Corresponding change.
1989
7b4be668
ILT
1990 * elf32-mips.c (mips_elf_relocate_section): Check for misaligned
1991 jal and for jal overflow.
1992
1993Mon Feb 24 17:53:14 1997 Ian Lance Taylor <ian@cygnus.com>
1994
1995 From Eric Youngdale <eric@andante.jic.com>:
1996 * elflink.h (elf_link_add_archive_symbols): If a default symbol is
1997 not found, try looking it up again without the version name.
1998 (elf_link_add_object_symbols): Always link against the dynamic
1999 symbol table of a dynamic object. When linking against a dynamic
2000 object, include version strings in symbol names, and set up
2001 version information. Add indirect symbols for default versions.
2002 (elf_link_create_dynamic_sections): Add special version sections.
2003 (struct elf_assign_sym_version_info): Define.
2004 (struct elf_find_verdep_info): Define.
2005 (NAME(bfd_elf,size_dynamic_sections)): Add verdefs parameter. Set
2006 up version sections.
2007 (elf_adjust_dynamic_symbol): Ignore indirect symbols.
2008 (elf_link_find_version_dependencies): New static function.
2009 (elf_link_assign_sym_version): New static function.
2010 (elf_link_renumber_dynsyms): New static function.
2011 (struct elf_final_link_info): Add symver_sec field.
2012 (elf_bfd_final_link): Initialize finfo.symver_sec. Don't count
2013 local symbols of a dynamic object. Handle DT_VER* constants.
2014 (elf_link_output_extsym): Simplify BFD_ASSERT checking for a
2015 dynamic object. Skip indirect symbols from ELF objects. Remove
2016 the version name before choosing a hash bucket. Write out the
2017 version information if appropriate.
2018 (elf_link_input_bfd): Check for DYNAMIC, not ET_DYN.
2019 * bfd-in.h (bfd_elf32_size_dynamic_sections): Update declaration.
2020 (bfd_elf64_size_dynamic_sections): Likewise.
2021 * bfd-in2.h: Rebuild.
2022 * elf-bfd.h (struct elf_link_hash_entry): Add verinfo field.
2023 Change elf_link_hash_flags to unsigned short.
2024 (ELF_LINK_HIDDEN): Define.
2025 (struct elf_obj_tdata): Add fields dynversym_hdr, dynverref_hdr,
2026 dynverdef_hdr, dynversym_section, dynverdef_section,
2027 dynverref_section, cverdefs, cverrefs, verdef, verref.
2028 (elf_dynversym, elf_dynverdef, elf_dynverref): Define.
2029 (_bfd_elf_swap_verdef_in, _bfd_elf_swap_verdef_out): Declare.
2030 (_bfd_elf_swap_verdaux_in, _bfd_elf_swap_verdaux_out): Declare.
2031 (_bfd_elf_swap_verneed_in, _bfd_elf_swap_verneed_out): Declare.
2032 (_bfd_elf_swap_vernaux_in, _bfd_elf_swap_vernaux_out): Declare.
2033 (_bfd_elf_swap_versym_in, _bfd_elf_swap_versym_out): Declare.
2034 (_bfd_elf_slurp_version_tables): Declare.
2035 * elf.c (_bfd_elf_swap_verdef_in): New function.
2036 (_bfd_elf_swap_verdef_out): Likewise.
2037 (_bfd_elf_swap_verdaux_in, _bfd_elf_swap_verdaux_out): Likewise.
2038 (_bfd_elf_swap_verneed_in, _bfd_elf_swap_verneed_out): Likewise.
2039 (_bfd_elf_swap_vernaux_in, _bfd_elf_swap_vernaux_out): Likewise.
2040 (_bfd_elf_swap_versym_in, _bfd_elf_swap_versym_out): Likewise.
2041 (_bfd_elf_print_private_bfd_data): Add DT_VER* constants. Print
2042 version information if there is any.
2043 (_bfd_elf_link_hash_newfunc): Initialize verinfo field.
2044 (bfd_section_from_shdr): Handle SHT_GNU_ver* section types.
2045 (elf_fake_sections): Handle .gnu.version* section names.
2046 (assign_section_numbers): Handle SHT_GNU_ver* section types.
2047 (_bfd_elf_slurp_version_tables): New function.
2048 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Don't include
2049 version name in string entered in dynamic hash table.
2050 * elfcode.h: Include fnmatch.h.
2051 * elf32-i386.c (elf_i386_relocate_section): Handle a dynamic
2052 symbol which was forced to become local.
2053 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
2054 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2055 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
2056 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
2057
7b951eed
JL
2058Fri Feb 21 16:15:18 1997 Jeffrey A Law (law@cygnus.com)
2059
2060 * elf32-mn10200.c (mn10200_elf_final_link_relocate): Simplify
2061 somewhat.
2062 (mn10200_elf_relax_section): Correctly compute a symbol's value
2063 when the symbol is local, but not in the same section as we are
2064 relaxing. Implement abs24 -> abs16, imm24 -> imm16 and d24 -> d16
2065 relaxing.
2066
77dd1a25
DE
2067Fri Feb 21 13:55:14 1997 Doug Evans <dje@seba.cygnus.com>
2068
2069 * elf32-m32r.c: Rewrite to use ELF backend linker.
2070 Store lower 16 bits of addend in R_M32R_HI16_[SU]LO insns.
2071 Add small data area support (R_M32R_SDA16).
2072 * reloc.c: Document BFD_RELOC_M32R_SDA16.
2073 * bfd-in2.h,libbfd.h: Regenerated.
2074
fd395661
JL
2075Thu Feb 20 23:50:31 1997 Jeffrey A Law (law@cygnus.com)
2076
2077 * elf32-mn10200.c (mn10200_elf_relax_section): New function.
2078 (mn10200_elf_relax_delete_bytes): Likewise.
2079 (mn10200_elf_symbol_address_p): Likewise.
2080 (mn10200_elf_get_relocated_section_contents): Likewise.
2081 (bfd_elf32_bfd_relax_section): Define.
2082 (bfd_elf32_bfd_get_relocated_section_contents): Likewise.
64af6679
JL
2083
2084 * elf32-mn10200.c (mn10200_elf_final_link_relocate): New function.
2085 (mn10200_elf_relocate_section): Likewise.
2086 (elf_backend_relocate_section): Define.
2087
fd8d7c31
MH
2088start-sanitize-d30v
2089Tue Feb 18 17:22:59 1997 Martin M. Hunt <hunt@pizza.cygnus.com>
2090
2091 * Makefile.in, archures.c, config.bfd, configure.in, elf.c,
cf2cd4cf 2092 reloc.c, targets.c: New target, elf-*-D30V.
fd8d7c31
MH
2093
2094 * bfd-in2.h, configure, libbfd.h: Rebuilt.
2095
2096 * cpu-d30v.c, elf32-d30v.c: New files.
cf2cd4cf
UD
2097
2098end-sanitize-d30v
92a956e8
FF
2099Tue Feb 18 15:31:48 1997 Fred Fish <fnf@cygnus.com>
2100
2101 * reloc.c (struct reloc_howto_struct): Fix typo in comment.
2102 * bfd-in2.h: Regenerated.
2103start-sanitize-tic80
2104 * coff-tic80.c (RTYPE2HOWTO): Replace abort with real function.
2105 (rtype2howto): Add function.
2106 (tic80_howto_table): Add.
2107end-sanitize-tic80
cf2cd4cf 2108
92a956e8
FF
2109Tue Feb 18 11:41:00 1996 Dawn Perchik <dawn@cygnus.com>
2110
2111 * sysdep.h: Don't define errno in MSVC if error.h is included.
2112
8d1ba96e
JL
2113Tue Feb 18 10:04:13 1997 Jeffrey A Law (law@cygnus.com)
2114
2115 * elf32-v850.c (v850_elf_relocate_section): Make sure r_symndx
2116 is initialized before it is used.
2117
8ceca983
ILT
2118Mon Feb 17 11:28:40 1997 Ian Lance Taylor <ian@cygnus.com>
2119
2120 * hp300hpux.c (convert_sym_type): Don't convert a secondary common
2121 symbol into a weak undefined symbol; leave it as a common symbol.
2122
54626f1a
ILT
2123Fri Feb 14 19:08:03 1997 Ian Lance Taylor <ian@cygnus.com>
2124
2125 * elflink.h (elf_link_add_object_symbols): Don't issue a warning
2126 about a symbol defined in a dynamic object if it has already been
2127 defined in a regular object.
2128
236969ac
ILT
2129Thu Feb 13 20:53:22 1997 Klaus Kaempf (kkaempf@progis.de)
2130
2131 * makefile.vms: Add gcc flags to allow compiling with current gcc
2132 snapshot
2133 (targmatch.h): New dependency.
2134
54626f1a
ILT
2135 * reloc.c (BFD_RELOC_ALPHA_CODEADDR): New relocation for
2136 openVMS/Alpha.
2137 * evax.h (ALPHA_R_CODEADDR): New relocation.
2138 * evax-alpha.c (ALPHA_R_CODEADDR): 64 bit procedure relocation for
2139 openVMS/Alpha.
2140 * evax-etir.c (ALPHA_R_CODEADDR): Output object code for this
2141 relocation.
2142 * bfd-in2.h, libbfd.h: Rebuild.
2143
2144 Restrict symbol length to 64 bytes, case preserving:
2145 * evax-emh.c (_bfd_evax_write_emh): Remove case hacking.
2146 * evax-misc.c (_bfd_evax_case_hack_symbol): Remove.
2147 (_bfd_evax_length_hash_symbol): Added.
2148 * evax-etir.c (_bfd_evax_write_etir): Call
2149 _bfd_evax_length_hash_symbol before output of symbol.
2150 * evax-egsd.c (_bfd_evax_write_egsd): Likewise.
2151 * evax.h (flag_hash_long_names, flag_show_after_trunc): Remove.
2152
2153 * evax-emh.c: Output filename to object file without path.
2154
2155 * evax-egsd.c: New sections for local and global commons.
2156
2157 * evax-alpha.c, evax-emh.c, evax-egsd.c, evax-etir.c,
2158 evax-misc.c, evax.h: Remove 8 bit characters from copyright
2159 notices. Replace AXP with Alpha.
2160
62332d05
ILT
2161Wed Feb 12 18:10:30 1997 Ian Lance Taylor <ian@cygnus.com>
2162
2163 * sunos.c (sunos_create_dynamic_sections): We need the dynamic
2164 sections if we are creating a shared library.
2165
3883007e
DE
2166Tue Feb 11 15:45:43 1997 Doug Evans <dje@canuck.cygnus.com>
2167
2168 * configure.host (i386-windows): Don't set host64=true.
2169
a4183ba5
ILT
2170Tue Feb 11 15:27:32 1997 Ian Lance Taylor <ian@cygnus.com>
2171
2172 * elf32-mips.c (reloc_type): Add R_MIPS16_GPREL.
2173 (elf_mips16_gprel_howto): New static variable.
2174 (mips16_gprel_reloc): New static function.
2175 (bfd_elf32_bfd_reloc_type_lookup): Handle BFD_RELOC_MIPS16_GPREL.
2176 (mips_info_to_howto_rel): Handle R_MIPS16_GPREL.
2177 (mips_elf_relocate_section): Handle R_MIPS16_GPREL.
2178 * reloc.c (BFD_RELOC_MIPS16_GPREL): Define.
2179 * bfd-in2.h, libbfd.h: Rebuild.
2180
97cbfc23 2181Mon Feb 10 23:25:00 1997 Doug Evans <dje@seba.cygnus.com>
b9c5ee68
DE
2182
2183 * elf32-m32r.c (elf_m32r_howto_table): Change partial_inplace to true
2184 for R_M32R_{16,32,24,HI16_ULO,HI16_SLO,LO16}.
2185
276c2d7d
GRK
2186start-sanitize-r5900
2187 Fri Feb 7 16:20:17 1997 Gavin Koch <gavin@cygnus.com>
cf2cd4cf 2188
276c2d7d 2189 * config.bfd: add r5900
cf2cd4cf
UD
2190
2191end-sanitize-r5900
ba4a4594
ILT
2192Fri Feb 7 12:39:11 1997 Ian Lance Taylor <ian@cygnus.com>
2193
2194 * elflink.h (elf_link_input_bfd): If we've discarded a section,
2195 the output section will be the absolute section; don't print an
2196 assertion message for that case when doing a relocateable link.
2197
e900e695
ILT
2198Thu Feb 6 16:55:43 1997 Ian Lance Taylor <ian@cygnus.com>
2199
2200 * elf32-mips.c (FN_STUB, CALL_STUB, CALL_FP_STUB): Define.
2201 (struct mips_elf_link_hash_entry): Add new fields fn_stub,
2202 need_fn_sub, call_stub, and call_fp_stub.
2203 (struct mips_elf_link_hash_table): Add field mips16_stubs_seen.
2204 (mips_elf_link_hash_newfunc): Initialize new fields.
2205 (mips_elf_link_hash_table_create): Likewise.
2206 (mips_elf_relocate_section): Redirect relocations to use mips16
2207 stubs when appropriate.
2208 (mips_elf_check_relocs): Attach stub sections to the appropriate
2209 symbol. Set need_fn_stub when appropriate.
2210 (mips_elf_always_size_sections): New static function.
2211 (mips_elf_check_mips16_stubs): New static function.
2212 (elf_backend_always_size_sections): Define.
2213 * elf-bfd.h (struct elf_obj_tdata): Add local_stubs field.
2214
2215 * elflink.h (elf_link_input_bfd): Discard local symbols that are
2216 attached to sections which are not being included in the link.
2217
5b61a02a
ILT
2218Wed Feb 5 13:20:17 1997 Ian Lance Taylor <ian@cygnus.com>
2219
2220 * cofflink.c (_bfd_coff_generic_relocate_section): Ignore the
2221 symbol value when computing the addend for a pc_relative
2222 pcrel_offset reloc.
2223
bcb686ca
ILT
2224Mon Feb 3 11:54:06 1997 Ian Lance Taylor <ian@cygnus.com>
2225
5a50eec6
ILT
2226 * cofflink.c (_bfd_coff_generic_relocate_section): If doing a
2227 relocateable link, just skip pc_relative pcrel_offset relocs.
2228 * coff-arm.c (coff_arm_rtype_to_howto): Return a different howto
2229 structure for an ARM26 reloc which can be resolved.
2230 (coff_arm_adjust_symndx): Only convert ARM26 to ARM26D if the
2231 reloc can be resolved.
2232
bcb686ca
ILT
2233 * coff-h8300.c (h8300_reloc16_extra_cases): Correct off by one
2234 error in overflow check for R_RELBYTE.
2235
167dc907
ILT
2236Fri Jan 31 14:07:27 1997 Ian Lance Taylor <ian@cygnus.com>
2237
6c58561e
ILT
2238 * ieee.c (ieee_slurp_section_data): Pick up the start address.
2239 From Mark Rasin <mark.rasin@telrad.co.il>.
2240
167dc907
ILT
2241 * aoutx.h (aout_link_write_symbols): Don't apply discard_l to
2242 debugging symbols.
2243
1a2faf1f
JL
2244Wed Jan 29 00:00:49 1997 Jeffrey A Law (law@cygnus.com)
2245
2246 * elf32-mn10200.c (reloc_type): Add 16bit pc-relative reloc.
2247 (elf_mn10200_howto_table): Likewise.
2248 (mn10200_reloc_map): Likewise.
2249
1d5c6cfd
DE
2250Mon Jan 27 12:07:35 1997 Doug Evans <dje@seba.cygnus.com>
2251
2252 * reloc.c: Add relocs BFD_RELOC_M32R_{HI16_[US]LO,LO16}.
2253 * bfd-in2.h, libbfd.h: Regenerated.
2254 * elf32-m32r.c: Add support for them.
2255
9950f925
ILT
2256Mon Jan 27 12:25:02 1997 Ian Lance Taylor <ian@cygnus.com>
2257
54aa1dea
ILT
2258 * aout-arm.c (MY_swap_std_reloc_in): Remove unused r_length.
2259 * elf32-ppc.c (ppc_elf_check_relocs): Remove unused plt.
54aa1dea
ILT
2260 * elf32-v850.c (v850_elf_final_link_relocate): Remove used
2261 r_format and r_pcrel. Always return a value.
54aa1dea
ILT
2262 * riscix.c (MY_final_link_callback): Define to dummy value.
2263
9950f925
ILT
2264 * elf32-i386.c (elf_i386_size_dynamic_sections): When checking for
2265 relocations against the text segment, look up the output name of
2266 the reloc section.
2267 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
2268 * elf32-mips.c (mips_elf_size_dynamic_sections): Likewise.
2269 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
2270 * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
2271 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
2272
0716c2e9 2273start-sanitize-tic80
8c00b01d
FF
2274Wed Jan 22 15:40:28 1997 Fred Fish <fnf@cygnus.com>
2275
2276 * coff-tic80.c (tic80coff_vec): Use correct data put/get
2277 routines for little endian data.
2278 * coffcode.h (coff_write_object_contents): Set magic to
2279 TIC80_ARCH_MAGIC for TIc80.
2280
0716c2e9
FF
2281Tue Jan 21 12:32:43 1997 Fred Fish <fnf@cygnus.com>
2282
2283 * coff-tic80.c (tic80coff_vec): Change to little endian data
2284 as the default.
2285
2286end-sanitize-tic80
db109ca2
ILT
2287Thu Jan 16 17:45:57 1997 Ian Lance Taylor <ian@cygnus.com>
2288
2289 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Change type of
2290 auxiliary_filters parameter to be const char * const *. Accept a
2291 NULL terminated array.
2292 * bfd-in.h (bfd_elf32_size_dynamic_sections): Update declaration.
2293 (bfd_elf32_size_dynamic_sections): Update declaration.
2294 * bfd-in2.h: Rebuild.
2295
2296Wed Jan 15 11:21:32 1997 Ian Lance Taylor <ian@cygnus.com>
2297
2298 * elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Treat a
2299 NOTYPE symbol in a text section as a FUNC symbol.
2300
2301 * coffcode.h (coff_compute_section_file_positions): Force
2302 relocbase to be aligned to COFF_DEFAULT_SECTION_ALIGNMENT_POWER.
2303
e1616e16
DE
2304Tue Jan 14 08:46:33 1997 Doug Evans <dje@canuck.cygnus.com>
2305
2306 * libaout.h (machine_type): Reserve several values for sparclet.
2307
4af93ad0
MM
2308start-sanitize-tic80
2309Mon Jan 13 22:39:08 1997 Michael Meissner <meissner@tiktok.cygnus.com>
2310
2311 * config.bfd (tic80-*-*): Don't require 'coff'.
2312
91eb4378 2313end-sanitize-tic80
0ce71ebd
MM
2314Mon Jan 13 19:36:25 1997 Michael Meissner <meissner@tiktok.cygnus.com>
2315
2316 * elf32-v850.c (v850_elf_howto_table): Set the special_function
2317 table to v850_elf_reloc for all non-standard relocations.
2318 (v850_elf_check_relocs): Add check for h being non-null.
2319 (v850_elf_reloc): Add R_V850_ZDA_OFFSET support. Use switch
2320 statement instead of multiple ifs.
2321 (v850_elf_relocate_section): Fix up error message, don't just call
2322 abort.
2323
483e1b91
JL
2324Mon Jan 6 13:28:35 1997 Jeffrey A Law (law@cygnus.com)
2325
09a7bde3 2326 * elf32-mn10200.c (elf_mn10200_howto): Don't ever set partial-inplace.
40131692
JL
2327 Use bfd_elf_generic_reloc as special function for all relocs.
2328 (bfd_elf32_mn10200_reloc): Remove unnecessary function.
2329
2330 * elf32-mn10200.c (elf_mn10200_howto): Set pcrel_offset for
483e1b91
JL
2331 24bit pc-relative reloc.
2332
28eb95aa
FF
2333start-sanitize-tic80
2334Fri Jan 3 16:33:00 1997 Fred Fish <fnf@cygnus.com>
2335
2336 * Makefile.in (coff-tic80.o): Add coffcode.h to dependency list.
2337 * coff-tic80.c (tic80coff_vec): Data byte order is big endian and
2338 header byte order is little endian. Use correct bfd_get and
2339 bfd_put routines for little endian headers.
2340 * coffcode.h (coff_set_arch_mach_hook): Set arch to
2341 bfd_arch_tic80 for TIC80_ARCH_MAGIC number.
2342
2343end-sanitize-tic80
b3ef3894
JL
2344Fri Jan 3 16:54:08 1997 Jeffrey A Law (law@cygnus.com)
2345
2346 * reloc.c: Add BFD_RELOC_24.
2347 * elf32-mn10200.c (enum reloc_type): Add 24bit and pcrel relocs.
2348 (elf_mn10200_howto, mn10200_reloc_map): Corresponding changes.
2349 * bfd-in2.h, libbfd.h: Rebuilt.
2350
ff12f303
ILT
2351Fri Jan 3 16:58:31 1997 Richard Henderson <rth@tamu.edu>
2352
2353 elf64-alpha multiple .got rewrite:
2354
2355 * elf-bfd.h (struct elf_backend_data): Add always_size_sections entry.
2356 (bfd_elf*_mkobject): Don't define here ...
2357 * elfxx-target.h: ... but rather here. Default always_size_sections
2358 hook to NULL.
cf2cd4cf 2359 * elf.c (elf_mkobject): Rename to bfd_elf_mkobject, since that was
ff12f303
ILT
2360 what the #defines in elf-bfd.h transmuted it to anyway.
2361
2362 * section.c: Add SEC_LINKER_CREATED flag.
2363 * bfd-in2.h: Rebuild.
2364 * elf32-i386.c (elf_i386_check_relocs): Add SEC_LINKER_CREATED to
2365 relocation section flags.
2366 (elf_i386_size_dynamic_sections): Use SEC_LINKER_CREATED instead of
2367 SEC_IN_MEMORY to recognize generated bits.
2368 * elf32-m68k.c (elf_m68k_check_relocs, elf_m68k_size_dynamic_sections):
2369 Likewise.
2370 * elf32-mips.c (mips_elf_final_link, mips_elf_create_dynamic_sections,
2371 mips_elf_create_compact_rel_section, mips_elf_create_got_section,
2372 mips_elf_check_relocs, mips_elf_size_dynamic_sections): Likewise.
2373 * elf32-ppc.c (ppc_elf_create_linker_section,
2374 ppc_elf_size_dynamic_sections): Likewise.
2375 * elf32-sparc.c (elf32_sparc_check_relocs,
2376 elf32_sparc_size_dynamic_sections): Likewise.
cf2cd4cf 2377 * elflink.c (_bfd_elf_create_got_section): Add SEC_LINKER_CREATED to
ff12f303
ILT
2378 section flags.
2379 (_bfd_elf_create_dynamic_sections): Likewise.
2380 (_bfd_elf_make_linker_section_rela): Likewise.
2381 * elflink.h (elf_link_create_dynamic_sections): Likewise.
2382 (bfd_elf,size_dynamic_sections): Call the always_size_sections hook.
2383 (elf_bfd_final_link): Use SEC_LINKER_CREATED instead of SEC_IN_MEMORY
2384 to identify generated bits.
2385 (elf_link_input_bfd): Likewise.
2386
2387 * elf64-alpha.c: Rewrite everything touching relocations.
2388
de224d6a
MM
2389Fri Jan 3 11:42:53 1997 Michael Meissner <meissner@tiktok.cygnus.com>
2390
2391 * elf32-v850.c (all functions and static variables): Go through
2392 and regularize names to be of the form v850_elf_<xxx>.
2393 (toplevel): Include <elf/v850.h>.
2394 (enum reloc_type): Move to include/elf/v850.h.
2395 (v850_elf_check_relocs): For common variables, if the variable is
2396 referenced by a R_V850_{SDA,ZDA,TDA} relocation, put the variable
2397 into the appropriate section.
2398 (elf_backend_check_relocs): Define.
2399
afaed5e9
MM
2400Tue Dec 31 15:15:28 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2401
2402 * elf32-v850.c (elf_v850_howto_table): Fix some spacing.
2403
148437ec
ILT
2404Tue Dec 31 14:44:50 1996 Ian Lance Taylor <ian@cygnus.com>
2405
7c342fc5
ILT
2406 * config.bfd (mips*el-*-linux*): New target.
2407 (mips*-*-linux*): New target.
2408
2409 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Clean up.
2410 Return a useful value.
2411
6ded6615
ILT
2412 * Makefile.in (ALL_CFLAGS): Add -D_GNU_SOURCE.
2413
dda7af9f
ILT
2414 * configure.in: Check ac_cv_func_mmap_fixed_mapped, not
2415 ac_cv_func_mmap.
2416 * configure: Rebuild.
ab98712a
ILT
2417 * configure.host: Use ac_cv_func_mmap_fixed_mapped instead of
2418 ac_cv_func_mmap in bfd/configure.host.
dda7af9f 2419
148437ec
ILT
2420 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Add
2421 filter_shlib and auxiliary_filter_shlib parameters.
2422 * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_AUXILIARY and
2423 DT_FILTER.
2424 * bfd-in.h (bfd_elf32_size_dynamic_sections): Update declaration.
2425 (bfd_elf64_size_dynamic_sections): Likewise.
2426 * bfd-in2.h: Rebuild.
2427
1eeccb22
ILT
2428Mon Dec 30 18:48:52 1996 Ian Lance Taylor <ian@cygnus.com>
2429
2430 * xcofflink.c (xcoff_build_ldsyms): When exporting all defined
2431 symbols, don't export a symbol which is defined by an object in an
2432 archive which contains shared objects.
2433
60b26712 2434start-sanitize-tic80
fc46a9ec
FF
2435Mon Dec 30 16:12:58 1996 Fred Fish <fnf@cygnus.com>
2436
2437 * archures.c (enum bfd_architecture): Add bfd_arch_tic80
2438 for TI TMS320c80 (MVP).
2439 (bfd_archures_list): Add bfd_tic80_arch.
2440 * bfd-in2.h: Regenerate by running "make headers".
2441
60b26712
FF
2442Sun Dec 29 16:18:52 1996 Fred Fish <fnf@cygnus.com>
2443
2444 * cpu-tic80.c (bfd_tic80_arch): Add struct.
2445 * configure.in (case $vec): Correct typo, "tb" not "tp".
2446 Also add cofflink.o for tic80coff_vec.
2447 * configure: Regenerate with autoconf.
2448
2449end-sanitize-tic80
412f8c93
ILT
2450Mon Dec 30 11:54:56 1996 Ian Lance Taylor <ian@cygnus.com>
2451
2452 * libbfd.c: Patch up the mmap code so that it is only built if BFD
2453 is configured with --with-mmap.
2454
5a608f5b 2455start-sanitize-tic80
fc46a9ec 2456Sun Dec 29 10:48:57 1996 Fred Fish <fnf@cygnus.com>
5a608f5b
FF
2457
2458 * Makefile.in (BFD32_BACKENDS): Add coff-tic80.o
2459 (ALL_MACHINES): Add cpu-tic80.o
2460 (cpu-tic80.o, coff-tic80.o): Add dependencies.
2461 * coff-tic80.c: Add skeleton, cloned from another coff config.
2462 * coffcode.h (coff_write_object_contents): Set magic to TIC80MAGIC
2463 for TIc80.
2464
2465end-sanitize-tic80
60b26712 2466Fri Dec 27 20:56:41 1996 Fred Fish <fnf@cygnus.com>
cd6213ff
FF
2467
2468 * TODO: Correct a misspelling.
2469start-sanitize-tic80
2470 * coff-tic80.c: New file for TI TMS320C80 (MVP).
2471 * cpu-tic80.c: New file for TI TMS320C80 (MVP).
2472 * configure.in (case $vec): Add tic80coff_vec entry.
2473 * configure: Regenerate with autoconf.
2474 * archures.c (bfd_tic80_arch): Declare.
2475 * bfd-in2.h (enum bfd_architecture): Add bfd_arch_tic80.
2476 * config.bfd (case ${targ}): Add tic80*-*-coff* target.
2477 * targets.c (tic80coff_vec): Add decl as extern bfd_target.
2478 (bfd_target_vector): Add tic80coff_vec entry.
2479end-sanitize-tic80
2480
6b8ec6f3
ILT
2481Fri Dec 27 11:48:12 1996 H.J. Lu <hjl@lucon.org>
2482
2483 * elflink.h (elf_buckets): Add some more values for larger
2484 binaries.
2485
78650abd
ILT
2486Thu Dec 26 18:36:54 1996 Ian Lance Taylor <ian@cygnus.com>
2487
2488 * Makefile.in (install): Move subdir_do out of conditional. From
2489 Fred Fish <fnf@cygnus.com>.
2490
8d16fe5c
JL
2491Wed Dec 18 10:04:30 1996 Jeffrey A Law (law@cygnus.com)
2492
2493 * elf32-mn10200.c (enum reloc_type): Enable basic 8, 16, and
2494 32 bit relocs.
2495 (elf_mn10200_howto_table): Likewise.
2496 (mn10200_reloc_map): Likewise.
2497
69e2ff18
ILT
2498Tue Dec 17 11:09:36 1996 Ian Lance Taylor <ian@cygnus.com>
2499
e4f4813f
ILT
2500 * elf32-mips.c (mips_elf_add_symbol_hook): Add 1 to the value of a
2501 mips16 symbol during the link.
2502 (mips_elf_finish_dynamic_symbol): Subtract 1 from the value of a
2503 mips16 symbol.
2504 (mips_elf_link_output_symbol_hook): New static function.
2505 (elf_backend_link_output_symbol_hook): Define.
2506
69e2ff18
ILT
2507 * elf.c (bfd_elf_print_symbol): Print the st_other field if it is
2508 not zero.
2509
e85f2fbd
ILT
2510Mon Dec 16 14:38:39 1996 Ian Lance Taylor <ian@cygnus.com>
2511
2512 * elf.c (bfd_section_from_shdr): Don't check for reloc sections
2513 against SEC_DEBUGGING sections here (revert patch of December 5).
2514 * elfcode.h (elf_object_p): Check for them here, instead.
2515
e35765a9
ILT
2516Sun Dec 15 14:46:06 1996 Ian Lance Taylor <ian@cygnus.com>
2517
2518 * elfcode.h (elf_slurp_reloc_table): Add dynamic parameter.
2519 * elf.c (_bfd_elf_canonicalize_reloc): Pass new argument to
2520 slurp_reloc_table.
2521 (_bfd_elf_get_dynamic_reloc_upper_bound): New function.
2522 (_bfd_elf_canonicalize_dynamic_reloc): New function.
2523 * elf-bfd.h (struct elf_size_info): Update declaration of
2524 slurp_reloc_table.
2525 (_bfd_elf_get_dynamic_reloc_upper_bound): Declare.
2526 (_bfd_elf_canonicalize_dynamic_reloc): Declare.
2527 * elfxx-target.h: Use new dynamic reloc routines by default.
2528 * elf64-mips.c (mips_elf64_slurp_reloc_table): Add dynamic
2529 parameter.
2530
6270adfb
ILT
2531Fri Dec 13 13:18:49 1996 Dan Wilder <dan@gasboy.com>
2532
2533 * coffcode.h (coff_set_flags): Use MC68KBCSMAGIC for bfd_arch_m68k
2534 if NAMES_HAVE_UNDERSCORE is defined.
2535
21e45f82
DE
2536Fri Dec 13 11:13:23 1996 Doug Evans <dje@canuck.cygnus.com>
2537
2538 * libaout.h (enum machine_type): Change M_SPARCLET from 142 to 131.
2539
e7bab9df
MM
2540Thu Dec 12 15:07:20 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2541
2542 * elf32-ppc.c (ppc_elf_check_relocs): Move R_PPC_PLTREL24 into the
2543 supported relocs.
2544
a5147005
ILT
2545Thu Dec 12 14:55:41 1996 Ian Lance Taylor <ian@cygnus.com>
2546
440f3914
ILT
2547 * elflink.h (elf_link_add_object_symbols): Only add a weak
2548 symbol if the real definition is in the dynamic symbol table.
2549 After finding the real definition, then, if it is dynamic, add the
2550 weak symbol to the dynamic symbol table.
2551
e5c3708d
ILT
2552 * coff-aux.c (coff_m68k_aux_link_add_one_symbol): Make static.
2553
a5147005
ILT
2554 * ppcboot.c (ppcboot_set_arch_mach): Don't define; it's a
2555 function.
2556 (ppcboot_bfd_print_private_bfd_data): Don't take the address of an
2557 array.
2558
2559Tue Dec 10 23:23:52 1996 Jeffrey A Law (law@cygnus.com)
2560
2561 * elf32-mn10300.c (reloc_type): Remove big endian mn10300 reloc
2562 variants.
2563 (elf32_mn10300_howto_table, mn10300_reloc_map): Likewise.
2564 (bfd_elf32_mn10300_reloc): Write data in little endian format.
2565 * reloc.c: Remove mn10300 big endian relocs.
2566 * bfd-in2.h, libbfd.h: Rebuilt.
2567
2568 * elf32-mn10200.c: Update from elf32-mn10300.c.
cf2cd4cf 2569
207e944c
JL
2570Fri Dec 6 15:18:05 1996 Jeffrey A Law (law@cygnus.com)
2571
31cffd2e
JL
2572 * elf32-mn10300.c (elf_symbol_leading_char): Define.
2573
207e944c
JL
2574 * elf32-mn10300.c: Add some comments.
2575
6dcf1ef5
ILT
2576Fri Dec 6 17:16:43 1996 Ian Lance Taylor <ian@cygnus.com>
2577
2578 * ihex.c (ihex_scan): Always initialize buf before jumping to
2579 error_return.
2580 (ihex_read_section): Likewise.
2581
d28f058e
JL
2582Thu Dec 5 22:29:18 1996 Jeffrey A Law (law@cygnus.com)
2583
2584 * elf32-mn10300.c (elf_mn10300_howto_table): Don't set partial-
2585 inplace for most relocs.
2586
80be821d
ILT
2587Thu Dec 5 13:24:46 1996 Ian Lance Taylor <ian@cygnus.com>
2588
2589 * elflink.h (elf_link_add_object_symbols): Calling check_relocs
2590 even if SEC_ALLOC is not set.
2591 * elf32-i386.c (elf_i386_check_relocs): Don't check SEC_ALLOC
2592 when deciding whether to copy a reloc into a shared object.
2593 (elf_i386_relocate_section): Likewise.
2594 * elf32-sparc.c (elf32_sparc_check_relocs): Likewise.
2595 (elf32_sparc_relocate_section): Likewise.
2596 * elf32-i386.c (elf_i386_check_relocs): Don't set SEC_ALLOC in a
2597 reloc section if it is not set in the source section.
2598 * elf32-sparc.c (elf32_sparc_check_relocs): Likewise.
2599 * elf.c (bfd_section_from_shdr): Mark a reloc section associated
2600 with a SEC_DEBUGGING section as SEC_DEBUGGING.
2601
e5c4495c
MM
2602Wed Dec 4 14:18:13 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2603
2604 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): #if 0 code that
2605 expects a .got.plt until we actually create it.
2606
179b58d9
ILT
2607Mon Dec 2 12:13:51 1996 Ian Lance Taylor <ian@cygnus.com>
2608
e5c4495c
MM
2609 * cofflink.c (_bfd_coff_generic_relocate_section): Print an error
2610 message for bfd_reloc_outofrange, rather than aborting. From
2611 Philippe De Muyter <phdm@info.ucl.ac.be>.
2612
179b58d9
ILT
2613 * cofflink.c (_bfd_coff_final_link): If there aren't any relocs in
2614 a relocateable link, don't try to process them. From Heinz Wrobel
2615 <wrobel@lpr.e-technik.tu-muenchen.de>.
2616
943686fa
JL
2617Mon Dec 2 00:39:24 1996 Jeffrey A Law (law@cygnus.com)
2618
2619 * elf32-mn10300.c (mn10300_info_howto): Renamed from
a5147005 2620 mn10300_info_howto_rel. Tweak reloc argument to be an
943686fa
JL
2621 Elf32_Internal_Rela.
2622 (USE_RELA): Define instead of USE_REL.
2623 (elf_info_to_howto, elf_info_howto_rel): Corresponding changes.
2624
0e0f4106
PS
2625Sun Dec 1 00:18:59 1996 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
2626
2627 * configure.in, configure: Handle mips*-sgi-irix6*.
2628 * irix-core.c (irix_core_core_file_p): Accept CORE_MAGICN32
2629 core files.
2630
15aafe49
ILT
2631Wed Nov 27 12:10:25 1996 Ian Lance Taylor <ian@cygnus.com>
2632
2633 * elf32-i386.c (elf_i386_relocate_section): Warn about a
2634 relocation against a symbol defined in a section with no output
2635 section.
2636
6c02f1a0
ILT
2637Tue Nov 26 11:07:31 1996 Ian Lance Taylor <ian@cygnus.com>
2638
dfc7020d
ILT
2639 * aclocal.m4 (BFD_CC_FOR_BUILD): Don't require AC_C_CROSS.
2640 * configure, config.in: Rebuild with autoconf 2.12.
2641
6c02f1a0
ILT
2642 * elf-bfd.h (struct elf_link_hash_entry): Add other field.
2643 * elf.c (_bfd_elf_link_hash_newfunc): Initialize other field.
2644 (swap_out_syms): Set st_other from existing st_other field.
2645 * elflink.h (elf_link_add_object_symbols): Store st_other in hash
2646 table other field.
2647 (elf_link_output_extsym): Set the other field from the global hash
2648 table entry.
2649 * elf32-mips.c (enum reloc_type): Add R_MIPS16_26.
2650 (elf_mips16_jump_howto): New static variable.
2651 (mips16_jump_reloc): New static function.
2652 (bfd_elf32_bfd_reloc_type_lookup): Handle BFD_RELOC_MIPS16_JMP.
2653 (mips_info_to_howto_rel): Handle R_MIPS16_26.
2654 (mips_elf_relocate_section): Handle R_MIPS16_26. Handle R_MIPS_26
2655 to a mips16 symbol.
2656 * reloc.c (BFD_RELOC_MIPS16_JMP): Add to list of relocs.
2657 * bfd-in2.h, libbfd.h: Rebuild.
2658 * cpu-mips.c (arch_info_struct): Add mips:16 entry.
2659
f082b5ea
ILT
2660Mon Nov 25 11:23:32 1996 Ian Lance Taylor <ian@cygnus.com>
2661
2662 * configure.host: Use long long for mips-sgi-irix6*.
2663
2664 * coffswap.h (coff_swap_scnhdr_out): Make line number overflow
2665 only a warning. From Philippe De Muyter <phdemuyt@ulb.ac.be>.
2666
12fdaaf8
JL
2667Mon Nov 25 08:52:29 1996 Jeffrey A Law (law@cygnus.com)
2668
2669 * elf32-mn10300.c (bfd_elf32_mn10300_reloc): New function.
2670 (enum reloc_type): Add more reloc types.
2671 (elf32_mn10300_howto_table): Update for new reloc types.
2672 (elf32_mn10300_reloc_map): Update for new reloc types.
2673 * reloc.c: Add some new relocs for the mn10300 series.
2674 * bfd-in2.h, libbfd.h: Rebuilt.
cf2cd4cf 2675
23def276
JL
2676Sat Nov 23 13:26:18 1996 Jeffrey A Law (law@cygnus.com)
2677
2678 * som.c (setup_sections): Don't lose for a space which has
2679 no data, but some symbols.
2680
a600a89e
ILT
2681Fri Nov 22 11:32:13 1996 Ian Lance Taylor <ian@cygnus.com>
2682
2683 * sunos.c (struct sunos_link_hash_table): Add got_needed field.
2684 (sunos_link_hash_table_create): Initialize got_needed.
2685 (sunos_create_dynamic_sections): Only set .got section size if it
2686 is not already set. Set got_needed.
2687 (bfd_sunos_size_dynamic_sections): Check got_needed. Only set
2688 sdynptr, and only handle dynamic sections, if dynamic sections are
2689 needed.
2690 (sunos_scan_std_relocs): Pass false to create_dynamic_sections.
2691 Initialize .got section.
2692 (sunos_scan_ext_relocs): Likewise.
2693 (sunos_write_dynamic_symbol): Set up PLT entry even if this is not
2694 a dynamic symbol.
2695 (sunos_finish_dynamic_link): Check got_needed. Only set up
2696 dynamic linking information if needed.
2697
aa09d6b2 2698Thu Nov 21 10:31:31 1996 Rob Savoye (rob@cygnus.com)
cf2cd4cf 2699
aa09d6b2
RS
2700 * config.bfd: Added VersaDOS format to the Ericsson configuration.
2701
c3239e66
JL
2702Wed Nov 20 16:31:31 1996 Jeffrey A Law (law@cygnus.com)
2703
2704 * elf32-mn10300.c: Rough cut at relocs for the mn10300.
2705
c3239e66
JL
2706Wed Nov 13 08:12:38 1996 Jeffrey A Law (law@cygnus.com)
2707
2708 * Makefile.in (elf32-d10v.o): Don't depend on elf/d10v.h
2709 anymore.
2710
c3239e66
JL
2711Tue Nov 12 13:30:00 1996 Dawn Perchik <dawn@cygnus.com>
2712
2713 * filemode.c: Include sysdep.h.
2714 * ihex.c: Add casts to eliminate compiler warnings.
2715 * sunos.c: Add casts to eliminate compiler warnings.
2716
9e23db76
MM
2717Mon Nov 11 10:37:02 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2718
2719 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Create .got.plt
2720 section.
2721 (ppc_elf_check_relocs): Add support for R_PPC_LOCAL24PC. Make
2722 appropriate relocations in the .so file if shared.
2723 (ppc_elf_relocate_section): Ditto.
2724
affcfcf9
DE
2725Tue Oct 29 15:03:02 1996 Doug Evans <dje@canuck.cygnus.com>
2726
2727 * elf32-m32r.c (elf_m32r_howto_table, R_M32R_24): Use
2728 complain_overflow_unsigned.
2729
421a2956
MH
2730Tue Oct 29 12:53:46 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
2731
2732 * elf32-d10v.c (elf_d10v_howto_table): Don't complain on
2733 overflows for R_D10V_16 and R_D10V_18.
2734
061cc10b
ILT
2735Tue Oct 29 13:23:53 1996 Ian Lance Taylor <ian@cygnus.com>
2736
2737 * ieee.c (ieee_write_section_part): Use LMA rather than VMA.
2738 (do_with_relocs): Likewise.
2739 (do_as_repeat): Likewise.
2740 (copy_expression): Likewise.
2741
2742Fri Oct 25 16:56:40 1996 Ian Lance Taylor <ian@cygnus.com>
2743
2744 * ieee.c (ieee_write_external_part): Correctly record whether
2745 there is an external part.
2746
061cc10b
ILT
2747Thu Oct 24 14:32:52 1996 Jeffrey A Law (law@cygnus.com)
2748
2749 * elf32-v850.c (elf32_v850_bfd_final_link_relocate): Correctly
2750 handle tda offsets for sld.w and sst.w instructions.
2751 Fix alignment check in sld.w and sst.w tda reloc handling.
2752
27c7e907
SG
2753Thu Oct 24 09:08:47 1996 Stu Grossman (grossman@critters.cygnus.com)
2754
2755 * aclocal.m4, configure: Set USE_BINARY_FOPEN for *-*-windows.
2756
90ffe48b
JL
2757Wed Oct 23 00:53:16 1996 Jeffrey A Law (law@cygnus.com)
2758
2759 * elf32-v850.c: Add comments about assumptions about
2760 char, short & long sizes.
2761 (elf32_v850_bfd_final_link_relocate): Fix sign extension
2762 problems for several relocs.
2763
2764 * elf32-v850.c (elf32_v850_howto_table): Fix typo in
2765 R_V850_SDA_OFFSET entry.
2766
84be2a8f
ILT
2767Wed Oct 23 00:20:34 1996 Ian Lance Taylor <ian@cygnus.com>
2768
2769 * xcofflink.c (bfd_xcoff_import_symbol): Don't allocate ldsym.
2770 Store import file index in ldindx.
2771 (xcoff_build_ldsyms): Assume that ldsym was not previously
2772 allocated. For an imported symbol, copy ldindx into l_ifile.
2773
725b96f5
JL
2774Tue Oct 22 19:20:38 1996 Jeffrey A Law (law@cygnus.com)
2775
c322f1b5 2776 * elf32-v850.c (elf_v850_howto_table): Fix ordering of
90ffe48b
JL
2777 R_V850_ZDA_OFFSET and R_V850_TDA_OFFSET. Fix various
2778 fields in R_V850_TDA_OFFSET.
c322f1b5 2779 (elf32_v850_bfd_final_link_relocate): Tweak pc-relative
90ffe48b 2780 relocs to work more like other relocs. Handle R_V850_TDA_OFFSET
c322f1b5
JL
2781 relocations.
2782
725b96f5
JL
2783 * elf32-v850.c: Include bfdlink.h.
2784 (bfd_elf32_v850_reloc): Return an error if we get a reloc
2785 we can't handle.
2786 (elf32_v850_bfd_final_link_relocate): New function.
2787 (v850_elf_relocation_section): Likewise.
2788 (elf_backend_relocate_section): Define.
2789
40c0ea5a
ILT
2790Tue Oct 22 17:22:43 1996 Ian Lance Taylor <ian@cygnus.com>
2791
2792 * binary.c (binary_set_section_contents): Ignore sections which
2793 don't have SEC_LOAD and SEC_ALLOC set.
2794
9c52f4b2
JL
2795Mon Oct 21 12:13:05 1996 Jeffrey A Law (law@cygnus.com)
2796
2797 * linker.c (_bfd_generic_final_link): Avoid losing static
2798 symbols in the .bss section.
2799
bd4dd3d0
ILT
2800Mon Oct 21 10:54:58 1996 Ian Lance Taylor <ian@cygnus.com>
2801
68553b63
ILT
2802 * elf32-mips.c (elf_mips_howto_table): Describe R_MIPS_64.
2803 (mips32_64bit_reloc): New static function.
2804 (mips_reloc_map): Add entry for BFD_RELOC_64.
2805 (mips_elf_relocate_section): Handle R_MIPS_64.
2806
bd4dd3d0
ILT
2807 * linker.c (default_indirect_link_order): Print an error message
2808 when attempting to do a relocateable link with different object
2809 file formats, rather than calling abort.
2810
56910544
DE
2811Thu Oct 17 10:43:29 1996 Doug Evans <dje@canuck.cygnus.com>
2812
2813 * reloc.c (m32r relocs): Rename them.
2814 * bfd-in2.h, libbfd.h: Regenerated.
2815 * elf32-m32r.c: Update.
2816 (m32r_elf_10_pcrel_reloc): New function.
2817 (elf_m32r_howto_table, R_M32R_10_PCREL entry): Use it.
2818 (elf_m32r_howto_table, R_M32R_24 entry): Fix {src,dst}_masks.
2819
e1d98a0a
JL
2820Wed Oct 16 11:24:35 1996 Jeffrey A Law (law@cygnus.com)
2821
4948949e
JL
2822 * linker.c (_bfd_generic_final_link): Set "linker_mark" for
2823 all sections that will be included in the output file.
2824 (_bfd_generic_link_output_symbols): Discard symbols in sections
2825 which are being discarded.
b6d08fce
JL
2826 * elf32-v850.c (enum reloc_type): Add R_V850_SDA_OFFSET,
2827 R_V850_TDA_OFFSET and R_V850_ZDA_OFFSET.
2828 (elf_v850_howto_table): Corresponding changes.
2829 (elf_v850_reloc_map): Corresponding changes.
2830 * reloc.c: Add additional V850 relocations.
2831 * bfd-in2.h, libbfd.h: Rebuilt.
2832
e1d98a0a
JL
2833 * elf32-v850.c (bfd_elf32_v850_reloc): Mask out bits we
2834 no longer want in pc-relative relocs.
2835
05f1baaa
JL
2836Tue Oct 15 22:17:37 1996 Jeffrey A Law (law@cygnus.com)
2837
2838 * elf32-v850.c (bfd_elf32_v850_reloc): Don't silently
2839 accept a reloc against an undefined sybmol!
2840
1336da39
SG
2841Tue Oct 15 16:17:28 1996 Stu Grossman (grossman@critters.cygnus.com)
2842
2843 * elf32-v850.c: Define elf_symbol_leading_char to be '_'.
2844
c24453fe
ILT
2845Tue Oct 15 12:40:41 1996 Ian Lance Taylor <ian@cygnus.com>
2846
ede836b9
ILT
2847 * VERSION: Bump for new relocation.
2848
c24453fe
ILT
2849 * hosts/i386bsd.h: If NBPG is not defined, define it as
2850 PAGE_SIZE, for recent versions of FreeBSD.
2851
e7a50458
ILT
2852Mon Oct 14 12:37:26 1996 Ian Lance Taylor <ian@cygnus.com>
2853
2854 * configure.host: Use `long long' as the 64 bit type on a Solaris
2855 host, since both gcc and the SunPRO compilers support it.
2856
6b31fd3a
ILT
2857Mon Oct 14 11:17:24 1996 Richard Henderson <rth@tamu.edu>
2858
cf2cd4cf 2859 * reloc.c: Create a new BFD_RELOC_ALPHA_ELF_LITERAL. It was a
6b31fd3a
ILT
2860 mistake to have reused the ECOFF LITERAL for ELF since they have
2861 different semantics.
2862 * elf64-alpha.c (elf_reloc_map): Map from ELF_LITERAL.
2863 * bfd-in2.h, libbfd.h: Rebuild.
2864
2865 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Trap .got
2866 section overflow.
2867
2868 * elf64-alpha.c (elf64_alpha_relocate_section): Do not emit a
2869 dynamic relocation for an undefweak symbol when we are building
2870 a static executable.
2871
f20f2474
SS
2872Thu Oct 10 11:15:06 1996 Stan Shebs <shebs@andros.cygnus.com>
2873
2874 * mpw-make.sed (config.bfd, targmatch.sed): Edit references to
2875 point explicitly to srcdir.
2876 (targmatch.h): Edit references to point explicitly to objdir.
2877
3e222a5a
ILT
2878Thu Oct 10 14:14:23 1996 Ian Lance Taylor <ian@cygnus.com>
2879
2880 * config.bfd: When setting targ_cpu, don't get confused by
2881 linux-gnu.
2882
81501797
SG
2883Tue Oct 8 08:51:19 1996 Stu Grossman (grossman@critters.cygnus.com)
2884
2885 * configure.host: Add support for windows host (a build done
2886 under the Microsoft build environment).
2887
fe4ff515
ILT
2888Tue Oct 8 11:40:16 1996 Ian Lance Taylor <ian@cygnus.com>
2889
1c4794f5
ILT
2890 * elflink.h (elf_link_add_object_symbols): If a symbol is a weak
2891 definition in a dynamic object, add it to the dynamic symbol table
2892 if any dynamic object mentions it. Reverts part of last patch.
2893
9d81de19
ILT
2894 * sunos.c (struct sunos_link_hash_table): Add got_base field.
2895 (sunos_link_hash_table_create): Initialize got_base.
2896 (bfd_sunos_size_dynamic_sections): If the .got section is more
2897 than 0x1000 bytes, set __GLOBAL_OFFSET_TABLE_ and got_base to
2898 0x1000.
2899 (sunos_check_dynamic_reloc): Subtract got_base from a base
2900 relative relocation.
2901
fe4ff515
ILT
2902 * elf32-mips.c (elf_mips_isa): New static function.
2903 (_bfd_mips_elf_merge_private_bfd_data): Don't warn about linking
2904 -mips1 and -mips2 code together, or -mips3 and -mips4 code.
2905
1233f74b
ILT
2906Mon Oct 7 11:44:17 1996 Ian Lance Taylor <ian@cygnus.com>
2907
2908 * archive.c (do_slurp_coff_armap): Only treat archive as little
2909 endian for i960 COFF.
2910
a3d5a706
ILT
2911Fri Oct 4 13:49:01 1996 Ian Lance Taylor <ian@cygnus.com>
2912
65f56a58
ILT
2913 * coffcode.h (coff_compute_section_file_positions): Adjust sofar
2914 by the change in size of the section when EXEC_P is not set.
2915
a9dd34a9
ILT
2916 * coff-m68k.c (coff_rtype_to_howto): Define if not defined.
2917 (m68kcoff_rtype_to_howto): New static function.
2918 * cf-m68klynx.c (coff_m68k_lynx_rtype_to_howto): Add the section
2919 VMA to the addend for a PC relative reloc.
2920
05a68c24
ILT
2921 * dep-in.sed: Rework backslash loop a bit to avoid bug in sed on
2922 HP/UX 10.20.
2923 * Makefile.in: Rebuild dependencies.
2924
a3d5a706
ILT
2925 * dep-in.sed: Remove ../bfd/sysdep.h, since it will appear when
2926 som.h is included.
2927
c00ae065
JL
2928Fri Oct 4 11:41:39 1996 Jeffrey A Law (law@cygnus.com)
2929
2930 * Makefile.in: Remove explicit dependencies for mn10200 and
2931 mn10300 files.
2932 (ALL_MACHINE_CFILES): Add cpu-mn10200.c and cpu-mn10300.c.
2933 (BFD32_BACKENDS_CFILES): Add elf32-mn10200.c and elf32-mn10300.c
2934 (dependencies): Rebuilt.
2935
dee99794
ILT
2936Thu Oct 3 16:57:51 1996 Ian Lance Taylor <ian@cygnus.com>
2937
1d871eb7
ILT
2938 * cofflink.c (coff_link_add_symbols): Set obj_coff_keep_syms
2939 during this function.
2940
6b5af55c
ILT
2941 * elflink.c (_bfd_elf_create_linker_section): Only use an existing
2942 section if the flags are compatible.
2943
dee99794
ILT
2944 * configure.in: Add havevecs, and put it in tdefaults.
2945 * mpw-config.in: Likewise.
2946 * configure: Rebuild.
2947 * targmatch.sed: New file; a sed script to build targmatch.h from
2948 config.bfd.
2949 * config.bfd: Add #if, #endif, and comments for targmatch.h.
2950 * targets.c: Include "fnmatch.h".
2951 (struct targmatch): Define.
2952 (bfd_target_match): Define by including targmatch.h.
2953 (bfd_find_target): If the target is not found by name, search for
2954 it as a configuration triplet.
2955 * Makefile.in: Rebuild dependencies.
2956 (BFD32_BACKENDS): Add aout-arm.o, aout-sparcle.o, hp300bsd.o,
2957 i386dynix.o, m68k4knetbsd.o, and riscix.o.
2958 (BFD32_BACKENDS_CFILES): Add aout-arm.c, aout-sparcle.c,
2959 hp300bsd.c, i386dynix.c, m68k4knetbsd.c, and riscix.c.
2960 (HFILES): Add targmatch.h. Also, alphabetize and reindent.
2961 (CFILES): Remove i386dynix.c and hp300bsd.c.
2962 (targmatch.h): New target.
2963 (do_clean): Remove targmatch.h.
2964
2965 * configure.in: Add BFD_NEED_DECLARATION(getenv).
2966 * acconfig.h: Add NEED_DECLARATION_GETENV.
2967 * configure, config.in: Rebuild.
2968 * sysdep.h: If NEED_DECLARATION_GETENV, declare getenv.
2969 * aout-adobe.c (aout_adobe_object_p): Don't declare getenv.
2970
ae1b99e4
JL
2971Thu Oct 3 09:29:09 1996 Jeffrey A Law (law@cygnus.com)
2972
2973 * cpu-mn10x00.c, elf32-mn10x00: Removed.
2974 * cpu-mn10200.c, cpu-mn10300.c: New files.
2975 * elf32-mn10200.c, elf32-mn10300.c: New files.
2976 * Makefile.in: Break mn10x00 support into two separate
2977 configurations, mn10200 and mn10300.
2978 * archures.c, config.bfd, configure.in, elf.c, targets.c: Likewise.
2979 * bfd-in2.h, configure: Rebuilt.
2980
4c7f3fde
JM
2981Thu Oct 3 15:38:19 1996 Jason Molenda (crash@godzilla.cygnus.co.jp)
2982
2983 * Makefile.in (do_clean): Move config.log to do_distclean.
2984
efc2b064
JL
2985Wed Oct 2 21:40:55 1996 Jeffrey A Law (law@cygnus.com)
2986
2987 * cpu-mn10x00.c, elf32-mn10x00.c: New files.
2988 * Makefile.in (ALL_MACHINES): Add cpu-mn10x00.o.
2989 (BFD32_BACKENDS): Similarly for elf32-mn10x00.o.
2990 (elf32-mn10x00.o): Add dependencies.
2991 * archures.c (enum bfd_architecture): Add bfd_arch_mn10x00.
2992 (bfd_mn10x00_arch): Declare.
2993 (bfd_archures_list): Add bfd_mn10x00_arch.
2994 * config.bfd: Add mn10x00-*-*.
2995 * configure.in: Add bfd_elf32_mn10x00_vec.
2996 * elf.c (prep_headers): Handle bfd_arch_mn10x00.
2997 * targets.c (bfd_elf32_mn10x00_vec): Declare.
2998 (bfd_target_vector): Add bfd_elf32_mn10x00_vec.
2999 * bfd-in2.h, configure: Rebuilt.
cf2cd4cf 3000
bf53bd9f
ILT
3001Wed Oct 2 15:46:45 1996 Klaus Kaempf <kkaempf@progis.de>
3002
3003 openVMS/Alpha: Provide filename and case_hack flags via
3004 symbol table from gas.
3005 Add case_hack code for symbol output from vax/vms.
3006 * evax-alpha.c (evax_initialize): Remove filename handling,
3007 filename is provided via symbol table.
3008 (evax_get_symtab): Use local symbol count when setting up table.
3009 * evax-egsd.c (_bfd_evax_slurp_egsd): Print correct name when
3010 debugging.
3011 (_bfd_evax_write_egsd): Skip file name symbol.
3012 * evax-emh.c (get_vms_time_string): Local function now.
3013 (_bfd_evax_write_emh): Extract source filename and case_hack flags
3014 from symbol table.
3015 * evax_write_etir (_bfd_evax_write_etir): Pass all symbol names
3016 through _bfd_evax_case_hack_symbol.
3017 * evax-misc.c (hash_string, _bfd_evax_case_hack_symbol): New
3018 functions.
3019 (_bfd_evax_basename): Removed.
3020 (_bfd_get_vms_time_string): Moved to evax-emh.c.
3021 * evax.h (evax_private_data_struct): Remove filename.
3022 (flag_hash_long_names, flag_show_after_trunc,
3023 flag_no_hash_mixed_case, vms_name_mapping): New flags for
3024 vms_case_hack.
3025
263d4a62
ILT
3026Wed Oct 2 12:02:02 1996 Ian Lance Taylor <ian@cygnus.com>
3027
a0fe6c2d
ILT
3028 * freebsd.h (N_GET_MAGIC_NET): Don't use ntohl.
3029 (N_GETMID_NET, N_GETFLAG_NET): Likewise.
3030 (NO_SWAP_MAGIC): Don't define.
3031 (SWAP_MAGIC): Define.
3032
263d4a62
ILT
3033 * cofflink.c (_bfd_coff_link_input_bfd): Don't crash if there is
3034 no hash table entry for a global symbol.
3035
161ac690
ILT
3036Tue Oct 1 16:14:22 1996 Joel Sherrill <joel@oarcorp.com>
3037
3038 * config.bfd (mips*-*-rtems*): New target, like mips*-*-elf*.
3039
0db6249c
ILT
3040Tue Oct 1 12:31:39 1996 Ian Lance Taylor <ian@cygnus.com>
3041
8dd53b5c
ILT
3042 * cofflink.c (coff_link_add_symbols): Don't override a meaningful
3043 symbol type with T_NULL. Warn if symbol type changes. Based on
e5c4495c 3044 patch from Philippe De Muyter <phdm@info.ucl.ac.be>.
8dd53b5c 3045
0db6249c
ILT
3046 * elflink.h (elf_link_add_object_symbols): Only put a symbol from
3047 a dynamic object in the dynamic symbol table if it is referenced
3048 or defined by a regular object.
3049
0db6249c
ILT
3050Fri Sep 27 18:41:07 1996 Stu Grossman (grossman@critters.cygnus.com)
3051
3052 * elf32-v850.c (bfd_elf32_v850_is_local_label): New function to
3053 remove dwarf local labels. Shrinks binaries by a factor of 3!
3054
0db6249c
ILT
3055Mon Sep 23 13:33:00 1996 Ian Lance Taylor <ian@cygnus.com>
3056
3057 * elf32-ppc.c (ppc_elf_add_symbol_hook): Create the .sbss section
3058 by hand, rather than by calling bfd_make_section.
3059
80675684
DE
3060Mon Sep 23 09:23:41 1996 Doug Evans <dje@seba.cygnus.com>
3061
3062 * reloc.c: Rename m32r relocs.
3063 * bfd-in2.h, libbfd.h: Rebuilt.
3064 * elf32-m32r.c: Update.
80675684 3065
a5a43df1
ILT
3066Fri Sep 20 11:43:43 1996 Ian Lance Taylor <ian@cygnus.com>
3067
e12ab364
ILT
3068 * aoutx.h (aout_link_input_section_ext): When doing a relocateable
3069 link, adjust the symbol index of a base relative reloc. Don't
3070 change the addend of a PC relative reloc if pcrel_offset is set.
3071 * sunos.c (bfd_sunos_size_dynamic_sections): Don't do anything for
3072 a relocateable link.
3073
a5a43df1
ILT
3074 * reloc.c (bfd_perform_relocation): Apply the relocation even if
3075 it is zero, in case src_mask matters.
3076 (bfd_install_relocation): Likewise.
3077
e425358f
ILT
3078Thu Sep 19 11:03:06 1996 Ian Lance Taylor <ian@cygnus.com>
3079
3080 * xcofflink.c (xcoff_link_add_symbols): Always initialize
3081 keep_syms.
3082 (_bfd_xcoff_bfd_final_link): Don't set target_index
3083 to an uninitialized value.
3084
7f21c97c
ILT
3085Tue Sep 17 14:18:31 1996 Ian Lance Taylor <ian@cygnus.com>
3086
3087 * coffcode.h (coff_slurp_line_table): Warn about illegal symbol
3088 indices, rather than crashing.
3089 (coff_slurp_reloc_table): Likewise. Check whether the howto field
3090 is NULL.
8d784abe
ILT
3091 * coff-sh.c (sh_relocate_section): Check for an illegal symbol
3092 index.
7f21c97c 3093
9859bc31
ILT
3094Mon Sep 16 12:39:36 1996 Ian Lance Taylor <ian@cygnus.com>
3095
1153e84b
ILT
3096 * coff-arm.c (aoutarm_std_reloc_howto): Change dst_mask for ARM26D
3097 reloc to 0.
3098 (coff_arm_adjust_symndx): New static function.
3099 (coff_adjust_symndx): Define.
3100
9859bc31
ILT
3101 * srec.c (srec_scan): Accept multiple symbols on a single line.
3102 From Pascal Martin <pmartin@alsys.com>.
3103
3104 * README: New file.
3105
f8b82e49
DE
3106Fri Sep 13 14:32:42 1996 Doug Evans <dje@canuck.cygnus.com>
3107
3108 * aoutf1.h (MY_bfd_merge_private_bfd_data): Define.
3109 (sunos_merge_private_bfd_data): New function.
3110
0a7b8735
ILT
3111Fri Sep 13 15:50:57 1996 Ian Lance Taylor <ian@cygnus.com>
3112
76d30c3f
ILT
3113 * bfd.c (bfd_copy_private_bfd_data): Switch on output BFD rather
3114 than input BFD.
3115 (bfd_merge_private_bfd_data): Likewise.
3116 * section.c (bfd_copy_private_section_data): Likewise.
3117 * syms.c (bfd_copy_private_symbol_data): Likewise.
3118 * bfd-in2.h: Rebuild.
3119 * aout-target.h (MY_bfd_copy_private_section_data): Check that
3120 both BFD's are the right flavour.
3121 * ecoff.c (_bfd_ecoff_bfd_copy_private_bfd_data): Likewise.
3122 * elf.c (_bfd_elf_copy_private_symbol_data): Likewise.
3123 * elf32-mips.c (_bfd_mips_elf_copy_private_bfd_data): Likewise.
3124 (_bfd_mips_elf_merge_private_bfd_data): Likewise.
3125 * elf32-ppc.c (ppc_elf_copy_private_bfd_data): Likewise.
3126 (ppc_elf_merge_private_bfd_data): Likewise.
3127 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Likewise.
3128 * peicode.h (pe_bfd_copy_private_section_data): Likewise.
3129
0a7b8735
ILT
3130 * elf32-hppa.c (elf_hppa_howto_table): Fill in some fields for
3131 R_PARISC_DIR32, so that _bfd_stab_section_find_nearest_line passes
3132 its sanity check.
3133
3ebefb07
DE
3134Thu Sep 12 11:45:57 1996 Doug Evans <dje@seba.cygnus.com>
3135
3136 * reloc.c: Add m32r relocs.
3137 * bfd-in2.h, libbfd.h: Rebuilt.
6cb9c903 3138 * cpu-m32r.c,elf32-m32r.c: New files.
3ebefb07 3139
cacfb845
ILT
3140Thu Sep 12 11:10:05 1996 Ian Lance Taylor <ian@cygnus.com>
3141
3142 * ieee.c (ieee_vec): Set symbol_leading_char field to '_'.
3143
d7775b43
ILT
3144Wed Sep 11 11:57:56 1996 Ian Lance Taylor <ian@cygnus.com>
3145
e461da9b
ILT
3146 * tekhex.c (first_phase): Change type parameter from char to int.
3147 (out): Likewise.
3148 (pass_over): Change func to expect int, not char.
3149
d7775b43
ILT
3150 * elf.c (assign_file_positions_for_segments): Test SEC_ALLOC
3151 rather than SEC_LOAD when aligning the file offset for the first
3152 section in a segment.
3153
ea3f0585
FF
3154Tue Sep 10 16:18:30 1996 Fred Fish <fnf@cygnus.com>
3155
3156 * syms.c (coff_section_type): Make arg const.
3157 * irix-core.c (irix_core_core_file_p): Remove extraneous extra arg
3158 to make_bfd_asection().
3159 * elf-bfd.h (bfd_section_from_phdr): Add prototype.
3160 * elfcode.h (bfd_section_from_phdr): Remove prototype.
3161 (_bfd_elf_stringtab_init): Remove prototype.
3162
3163 * netbsd-core.c (swap_abort): Add prototype.
3164 * aix386-core.c (swap_abort): Ditto & make static
3165 * hpux-core.c (swap_abort): Ditto & make static.
3166 * irix-core.c (swap_abort): Ditto & make static.
3167 * ptrace-core.c (swap_abort): Ditto & make static.
3168 * trad-core.c (swap_abort): Ditto & make static.
3169 * coffswap.h (coff_swap_reloc_in): Ditto.
3170 (coff_swap_reloc_out): Ditto.
3171 (coff_swap_filehdr_in): Ditto.
3172 (coff_swap_filehdr_out): Ditto.
3173 (coff_swap_sym_in): Ditto.
3174 (coff_swap_sym_out): Ditto.
3175 (coff_swap_aux_in): Ditto.
3176 (coff_swap_aux_out): Ditto.
3177 (coff_swap_lineno_in): Ditto.
3178 (coff_swap_lineno_out): Ditto.
3179 (coff_swap_aouthdr_in): Ditto.
3180 (coff_swap_aouthdr_out): Ditto.
3181 (coff_swap_scnhdr_in): Ditto.
3182 (coff_swap_scnhdr_out): Ditto.
3183 * ihex.c (ihex_sizeof_headers): Ditto.
3184 * tekhex.c (getsym): Ditto.
3185 (find_chunk): Ditto & make static.
3186 (insert_byte): Ditto.
3187 (first_phase): Ditto.
3188 (pass_over): Ditto.
3189 (tekhex_get_symtab): Ditto & make static.
3190 (tekhex_get_symtab_upper_bound): Ditto & make static.
3191 (tekhex_mkobject): Ditto.
3192 (tekhex_object_p): Ditto.
3193 (move_section_contents): Ditto.
3194 (tekhex_get_section_contents): Ditto.
3195 (tekhex_set_arch_mach): Ditto & make static.
3196 (tekhex_set_section_contents): Ditto.
3197 (writevalue): Ditto.
3198 (writesym): Ditto.
3199 (out): Ditto.
3200 (tekhex_write_object_contents): Ditto.
3201 (tekhex_sizeof_headers): Ditto.
3202 (tekhex_make_empty_symbol): Ditto.
3203 (tekhex_get_symbol_info): Ditto.
3204 (tekhex_print_symbol): Ditto.
3205 * irix-core.c (make_bfd_asection): Ditto.
3206 (irix_core_core_file_p): Ditto.
3207 (irix_core_core_file_failing_command): Ditto.
3208 (irix_core_core_file_failing_signal): Ditto.
3209 (irix_core_core_file_matches_executable_p): Ditto.
3210 (irix_core_make_empty_symbol): Ditto.
3211 * coff-mips.c (mips_bfd_reloc_type_lookup): Ditto.
3212 * srec.c (srec_new_symbol): Ditto.
3213 (srec_get_section_contents): Ditto.
3214 (srec_set_arch_mach): Ditto.
3215 (srec_set_section_contents): Ditto.
3216 (internal_srec_write_object_contents): Ditto.
3217 (srec_write_object_contents): Ditto.
3218 (symbolsrec_write_object_contents): Ditto.
3219 (srec_sizeof_headers): Ditto.
3220 (srec_make_empty_symbol): Ditto.
3221 (srec_get_symtab_upper_bound): Ditto.
3222 (srec_get_symtab): Ditto.
3223 (srec_print_symbol): Ditto and make static.
3224 * elf.c (elf_read): Ditto
3225 (assign_section_numbers): Ditto.
3226 (elf_fake_sections): Ditto.
3227 (sym_is_global): Ditto.
3228 (elf_map_symbols): Ditto.
3229 (get_program_header_size): Ditto.
3230 * coffgen.c (make_a_section_from_file): Ditto.
3231 (coff_real_object_p): Ditto.
3232 (fixup_symbol_value): Ditto.
3233 (build_debug_section): Ditto.
3234 (copy_name): Ditto.
3235 * syms.c (coff_section_type): Ditto.
cf2cd4cf 3236
00d7a64b
JL
3237Mon Sep 9 22:36:01 1996 Jeffrey A Law (law@cygnus.com)
3238
3239 * bfd-in2.h: Rebuilt after m32r changes.
3240
71d7d44f
DE
3241Mon Sep 9 12:31:22 1996 Doug Evans <dje@canuck.cygnus.com>
3242
66e4c229 3243 * config.bfd,configure.in,configure: Add m32r support.
f0c12b73 3244 * Makefile.in,archures.c,elf.c,targets.c: Likewise.
71d7d44f
DE
3245 * config.bfd: Keep target list alphabetically sorted.
3246
629f776a
JL
3247Mon Sep 9 11:48:41 1996 Jeffrey A Law (law@cygnus.com)
3248
3249 * elf32-v850.c (bfd_elf32_v850_reloc, case R_V850_HI16): Don't forget
3250 to add in the constant part found in the instruction itself.
3251 (case R_V850_HI16_S): Likewise.
3252
9c85b19d
MH
3253Fri Sep 6 17:04:39 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
3254
3255 * elf32-d10v.c (elf_d10v_howto_table): Modify the size of R_D10V_16
3256 and R_D10V_18 to be 1 (word).
3257
4be2140e
ILT
3258Thu Sep 5 15:23:08 1996 Ian Lance Taylor <ian@cygnus.com>
3259
3260 * stabs.c (_bfd_link_section_stabs): If the output_section field
3261 of either section is bfd_abs_section, then the linker is
3262 discarding the section and we should not optimize it.
3263
0cd98b92
DE
3264Tue Sep 3 12:16:20 1996 Doug Evans <dje@canuck.cygnus.com>
3265
3266 * Makefile.in (aout-sparcle.o): New target.
3267 * aoutf1.h (TARGET_IS_BIG_ENDIAN_P): Don't define if little endian.
3268 * config.bfd (sparclet-*-aout*): Add case.
3269 * configure.in (sparcle_aout_vec): Add case.
3270 * configure: Regenerated.
0cd98b92
DE
3271 * targets.c (sparcle_aout_vec): Declare.
3272 (bfd_target_vector): Add sparcle_aout_vec.
3273 * aout-sparcle.c: New file.
3274
7b0af209 3275Tue Sep 3 00:57:02 1996 Jeffrey A Law (law@cygnus.com)
b5ef63c4 3276
e73b6ae6
JL
3277 * elf32-v850.c (bfd_elf32_v850_reloc): Fix handling of
3278 low order sign bit propogation for R_V850_HI16_S.
3279
3280 * elf32-v850.c (bfd_elf32_v850_reloc): New function for
7b0af209
JL
3281 handling V850 specific relocs.
3282 (elf_v850_howto_table): Use the new function for some
3283 relocations. Twiddle masks & shifts for some relocs.
3284 Set partial_inplace where needed.
3285
7b0af209
JL
3286Mon Sep 2 12:12:34 1996 Ian Lance Taylor <ian@cygnus.com>
3287
3288 * cpu-mips.c: Add an explicit mips:3000 entry, and change the
3289 default architecture to a machine number of 0.
3290 * elf32-mips.c (_bfd_mips_elf_object_p): Set the machine number
3291 for E_MIPS_ARCH_1.
3292 (_bfd_mips_elf_merge_private_bfd_data): If the machine number of
3293 the output BFD is the default, set it from the first input BFD.
3294
7b0af209
JL
3295Sun Sep 1 18:38:01 1996 Jeffrey A Law (law@cygnus.com)
3296
3297 * elf32-v850.c (elf_v850_howto_table): All the 16bit relocs
3298 insert at bitpos zero. The HI16 relocs are shifted right
3299 by 16 bits. Fix src_mask for all relocs.
3300 (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME): Define. The V850 is
3301 little endian!
3302 (TARGET_BIG_SYM, TARGET_BIG_NAME): Remove. The V850 is little
3303 endian!
b5ef63c4 3304
bde9d875
ILT
3305Sun Sep 1 15:41:08 1996 Ian Lance Taylor <ian@cygnus.com>
3306
3307 * rs6000-core.c (rs6000coff_core_file_matches_executable_p):
3308 Rewrite to use BFD file read routines and to avoid using a fixed
3309 length for the file name.
3310
237b5c4c
JL
3311Sat Aug 31 10:22:25 1996 Jeffrey A Law (law@cygnus.com)
3312
3313 * elf32-v850.c (enum reloc_type): Add R_V850_{32,16,8}.
3314 (elf_v850_howto_table): Add support for R_V850_{32,16,8}.
3315 (v850_reloc_map): Add translation from BFD_RELOC_{32,16,8}
3316 to R_V850_{32,16,8}.
3317
01b49cb3
C
3318Fri Aug 30 18:06:04 1996 J.T. Conklin <jtc@hippo.cygnus.com>
3319
3320 * elf32-v850.c (reloc_type): Add R_V850_HI16_S.
3321 (elf_v850_howto_table): Add info for HI16_S reloc.
3322 (v850_reloc_map): Add HI_16_S reloc.
3323 * reloc.c: Define BFD_RELOC_V850_* relocs.
3324
492cfc71
ILT
3325Fri Aug 30 11:49:19 1996 Ian Lance Taylor <ian@cygnus.com>
3326
c86158e5
ILT
3327 Add SH ELF support.
3328 * elf32-sh.c: New file.
3329 * elf.c (prep_headers): Handle bfd_arch_sh.
3330 * elfcode.h (write_relocs): Handle absolute symbol.
3331 * elf-bfd.h (_bfd_elf32_link_read_relocs): Declare.
3332 (_bfd_elf64_link_read_relocs): Declare.
3333 * elflink.h (NAME(_bfd_elf,link_read_relocs)): Rename from
3334 elf_link_read_relocs. Make globally visible. Change all
3335 callers.
3336 (elf_link_input_bfd): Get external symbols from cache in
3337 symtab_hdr->contents. Get contents from cache in
3338 elf_section_data.
3339 * elfxx-target.h (bfD_elfNN_bfd_relax_section): Only define if not
3340 already defined.
3341 * reloc.c: Define BFD_RELOC_SH_* relocs.
3342 * libbfd-in.h (_bfd_sh_align_load_span): Declare.
3343 * coff-sh.c (sh_insns_conflict): Fix a return value.
3344 (_bfd_sh_align_load_span): New globally visible function, broken
3345 out of sh_align_load.
3346 (sh_align_load): Call _bfd_sh_align_load_span.
3347 (sh_swap_insns): Change relocs parameter to PTR.
3348 * bfd-in2.h, libbfd.h: Rebuild.
3349 * targets.c (bfd_elf32_sh_vec): Declare.
3350 (bfd_elf32_shl_vec): Declare.
3351 * config.bfd (sh-*-elf*): New target.
3352 * configure.in (bfd_elf32_sh_vec): New target vector.
3353 (bfd_elf32_shl_vec): New target vector.
3354 * configure: Rebuild.
3355 * Makefile.in: Rebuild dependencies.
3356 (BFD32_BACKENDS): Add elf32-sh.o.
3357 (BFD32_BACKENDS_CFILES): Add elf32-sh.c.
3358
3359 * elf.c (map_sections_to_segments): Check that LMA does not skip a
3360 page before checking D_PAGED.
3361
492cfc71
ILT
3362 * ihex.c (ihex_scan): Removed unnecessary extbase variable.
3363 (ihex_write_object_contents): Remove extbase; always use segbase
3364 instead.
3365
f7954d86
MM
3366Thu Aug 29 16:52:17 1996 Michael Meissner <meissner@tiktok.cygnus.com>
3367
3368 * configure.in (i[345]86-*-*): Recognize i686 for pentium pro.
3369 * configure.host (i[345]86-*-*): Ditto.
3370 * config.bfd (i[345]86-*-*): Ditto.
3371 * configure: Regenerate.
3372
3373 * config.bfd (i[3456]86-*-dgux*): Recognize as a synonym for x86
3374 elf.
3375
3376Tue Aug 27 09:18:18 1996 Jeffrey A Law (law@cygnus.com)
3377
3378 * elf32-hppa.c (hppa_elf_gen_reloc_type): Add new argument.
3379 * elf32-hppa.h (hppa_elf_gen_reloc_type): Update prototype.
3380 * som.c (hppa_som_gen_reloc_type): Add new argument. If
3381 we encounter an R_DATA_ONE_SYMBOL reloc against a symbol that
3382 will have an ST_CODE type, change the symbol's type to ST_DATA.
3383 * som.c (hppa_som_gen_reloc_type): Update prototype.
3384
4da624dd
ILT
3385Tue Aug 27 00:12:22 1996 Ian Lance Taylor <ian@cygnus.com>
3386
3387 * elf32-mips.c (mips_elf_check_relocs): Set dynobj if needed for
3388 R_MIPS_32 and R_MIPS_REL32. Set sgot and g as soon as possible.
3389 (mips_elf_size_dynamic_sections): Don't require .got to exist.
3390 (mips_elf_finish_dynamic_sections): Likewise.
3391
9461513b
ILT
3392Thu Aug 22 10:54:38 1996 Ian Lance Taylor <ian@cygnus.com>
3393
1c952df6
ILT
3394 * configure.host (HLDENV): New variable to set. Set it for
3395 *-*-sysv4*, since those linkers may not support -R but they always
3396 support LD_RUN_PATH.
3397
9461513b
ILT
3398 * libieee.h (NSECTIONS): Don't define.
3399 (ieee_data_struct): Change section_table to asection **. Add
3400 section_table_size.
3401 * ieee.c (get_section_entry): If the table isn't big enough, make
3402 it bigger.
3403 (ieee_slurp_sections): Remove assertion about number of sections.
3404 (ieee_object_p): Adjust initialization of ieee to match changes to
3405 the structure.
3406
3407 * xcofflink.c (xcoff_mark): Don't copy relocs for undefined
3408 symbols merely because we are generating a shared library.
3409 (xcoff_build_ldsyms): Don't set up global linkage code for an
3410 undefined symbol merely because we are generating a shared
3411 library.
3412
0c1d95c7 3413Tue Aug 20 15:06:05 1996 J.T. Conklin <jtc@hippo.cygnus.com>
cf2cd4cf 3414
0c1d95c7
C
3415 * Makefile.in (ALL_MACHINES): Add cpu-v850.o.
3416 (BFD32_BACKENDS) Add elf32-v850.o.
3417 * archures.c: Add bfd_v850_arch.
3418 * bfd-in2.h: Add bfd_v850_arch.
3419 * config.bfd (v850-*-*): New target.
3420 * configure: (bfd_elf32_v850_vec) New vector.
3421 * configure.in: (bfd_elf32_v850_vec) New vector.
3422 * cpu-v850.c: New file.
3423 * elf.c (prep_headers): Added case bfd_arch_v850.
3424 * elf32-v850.c: New file.
3425 * targets.c (bfd_elf32_v850_vec): New vector.
cf2cd4cf 3426
0c1d95c7
C
3427Fri Aug 16 16:25:35 1996 Ian Lance Taylor <ian@cygnus.com>
3428
3429 * xcofflink.c (xcoff_link_add_dynamic_symbols): Create and define
3430 a function code symbol for an XMC_XO symbol.
3431
22edd547
SS
3432Thu Aug 15 12:33:29 1996 Stan Shebs <shebs@andros.cygnus.com>
3433
3434 * mpw-config.in: Update editing of autoconf vars to reflect
3435 Jul 18 configure.in change.
3436 * mpw-make.sed: Update editing of include pathnames to be
3437 more general, add @DASH_C_FLAG@ to explicit compile rule edit.
3438
3439Thu Aug 15 10:35:13 1996 Richard Henderson <rth@tamu.edu>
3440
3441 * elf64-alpha.c (elf64_alpha_output_extsym): The section from
3442 which to offset to get the .plt entry address is ".plt".
3443
53ef6e60
JSC
3444Thu Aug 15 16:40:30 1996 James G. Smith <jsmith@cygnus.co.uk>
3445
3446 * reloc.c: (BFD_RELOC_ARM_THUMB_ADD, BFD_RELOC_ARM_THUMB_IMM,
3447 BFD_RELOC_ARM_THUMB_SHIFT, BFD_RELOC_ARM_THUMB_OFFSET):
3448 Added, for internal use by the ARM gas.
3449 * libbfd.h: Rebuilt
3450 * bfd-in2.h: Rebuilt
3451
37d7888d
ILT
3452Wed Aug 14 17:02:09 1996 Richard Henderson <rth@tamu.edu>
3453
3454 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Correct typo
3455 in section dynidx start.
3456
e38d6d36
ILT
3457Tue Aug 13 14:35:38 1996 Ian Lance Taylor <ian@cygnus.com>
3458
3459 * elf.c (_bfd_elf_make_section_from_shdr): Treat sections whose
3460 name begins with .gnu.linkonce as SEC_LINK_ONCE. This is an
3461 optimization for g++.
3462
ae20860e
MM
3463Tue Aug 13 17:04:40 1996 Michael Meissner <meissner@tiktok.cygnus.com>
3464
3465 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): If one module has
3466 the -mrelocatable-lib bit set and the other doesn't, clear the
3467 -mrelocatable-lib bit in the header.
3468
4596421b
ILT
3469Sat Aug 10 22:59:17 1996 Ian Lance Taylor <ian@cygnus.com>
3470
3471 * elflink.h (elf_link_add_object_symbols): Do not resolve a common
3472 symbol against a STT_FUNC symbol in a shared library.
3473
f11e3f62
ILT
3474Fri Aug 9 12:44:57 1996 Ian Lance Taylor <ian@cygnus.com>
3475
410bc61d
ILT
3476 * xcofflink.c (xcoff_link_add_dynamic_symbols): If a descriptor
3477 symbol is found, automatically define the corresponding function
3478 code.
3479
d92099f1
ILT
3480 * cofflink.c (coff_link_add_symbols): Only set (*sym_hash)->numaux
3481 if sym.n_numaux is not zero.
3482 (_bfd_coff_link_input_bfd): Permit the symbol and the hash table
3483 entry to disagree about the number of aux entries if the symbol
3484 has zero.
3485
f11e3f62
ILT
3486 * elf32-mips.c (mips_elf_check_relocs): Create the .rel.dyn
3487 section if it might be needed, not just if info->shared.
3488 (mips_elf_adjust_dynamic_symbol): Make room for a null element at
3489 the start of .rel.dyn if we are going to use it.
3490 (mips_elf_finish_dynamic_sections): Only clear the first element
3491 of .rel.dyn if the size is greater than zero.
3492
fbc4ed7d
ILT
3493Thu Aug 8 16:24:55 1996 Ian Lance Taylor <ian@cygnus.com>
3494
b2a05baf
ILT
3495 * xcofflink.c (xcoff_link_input_bfd): If we already called the
3496 undefined_symbol callback for a symbol, then don't issue any more
3497 warnings about loader relocs.
3498 (_bfd_ppc_xcoff_relocate_section): Don't do any further processing
3499 after calling the undefined_symbol callback.
3500
fbc4ed7d
ILT
3501 * xcofflink.c (XCOFF_MULTIPLY_DEFINED): Define.
3502 (xcoff_link_add_symbols): Permit multiple definitions of a symbol
3503 as the AIX linker seems to do.
3504
8612a388
ILT
3505Thu Aug 8 12:21:56 1996 Klaus Kaempf <kkaempf@progis.de>
3506
3507 * evax-alpha.c (evax_alpha_vec): Corrected flags, cleanup.
3508 (evax_initialize): Remove evax_reloc_table.
3509 (evax_close_and_cleanup): Ditto.
3510 (reloc_nil): Ditto.
3511 (alpha_howto_table): Remove ALPHA_R_SWREL32 and ALPHA_R_SWREL64
3512 entries.
3513 (evax_bfd_reloc_type_lookup): Ditto.
3514 * evax-egsd.c (_bfd_evax_slurp_egsd): Add a few casts; set
3515 cooked_size == raw_size.
3516 * evax-emh.c (_bfd_evax_register_filename): Remove.
3517 * evax-etir.c (etir_stc): Allow ETIR_S_C_STC_xx commands.
3518 * evax-misc.c (add_new_contents): Malloc section at full size.
3519 (_bfd_save_evax_section): Memcpy section contents directly.
3520 * evax.h (ALPHA_R_SWREL32, ALPHA_R_SWREL64): Remove.
3521 (evax_reloc_table): Remove.
3522
3523 * hosts/alphavms.h (O_ACCMODE): Define if needed.
3524
3525 * makefile.vms: Add better support for DEC C compilation
3526 Add evax.h dependencies
3527
3528 * reloc.c (bfd_get_reloc_size): Add case for 16 byte reloc.
3529 (BFD_RELOC_SWREL32,BFD_RELOC_SWREL64): Remove.
3530 (BFD_RELOC_ALPHA_BASEREG): Remove.
3531 * bfd-in2.h, libbfd.h: Rebuild.
3532
320a5c6b
SG
3533Thu Aug 8 08:17:32 1996 Stu Grossman (grossman@critters.cygnus.com)
3534
3535 * archive.c (bsd_write_armap): Ifdef around calls to getuid and
3536 getgid if _WIN32 is defined.
3537 * opncls.c (bfd_fdopenr): Remove unnecessary WINGDB ifdef.
3538
2055bf85
SG
3539Wed Aug 7 23:19:00 1996 Stu Grossman (grossman@critters.cygnus.com)
3540
3541 * aoutx.h bfd-in.h bfd-in2.h opncls.c riscix.c som.c targets.c:
3542 Change NO_FLAGS to BFD_NO_FLAGS to avoid conflict with an HPUX
3543 include file.
3544 * libbfd.c: Create dummy getpagesize() macro if HAVE_GETPAGESIZE
3545 isn't defined.
3546
85fe9d3e
ILT
3547Wed Aug 7 14:11:44 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
3548
3549 * configure.in: Call BFD_NEEDED_DECLARATION on strstr and
3550 realloc.
3551 * acconfig.h (NEED_DECLARATION_STRSTR): New macro.
3552 (NEED_DECLARATION_REALLOC): New macro.
3553 * configure, config.in: Rebuild.
3554 * sysdep.h (strstr): Declare if NEED_DECLARATION_STRSTR.
3555 (realloc): Declare if NEED_DECLARATION_REALLOC.
3556
3557 * aclocal.m4 (BFD_NEED_DECLARATION): Include <string.h> or
3558 <strings.h> if they exist.
3559
3560 * ieee.c (ieee_set_section_contents): Cast bfd_alloc return.
3561
9b3307b0
ILT
3562Wed Aug 7 12:12:03 1996 Ian Lance Taylor <ian@cygnus.com>
3563
cc425b55
ILT
3564 * cpu-i386.c (i8086_arch): Architecture info for the i8086.
3565
9b3307b0
ILT
3566 Based on patches from Eric Valette <valette@crf.canon.fr>:
3567 * elf32-i386.c (enum reloc_type): Add FIRST_INVALID_RELOC,
3568 LAST_INVALID_RELOC, R_386_16, R_386_PC16, R_386_8, R_386_PC8.
3569 (elf_howto_table): Add entries for new relocs.
3570 (elf_i386_reloc_type_lookup): Handle new relocs.
3571 (elf_i386_info_to_howto): Just call abort.
3572 (elf_i386_info_to_howto_rel): Check that the reloc type is valid.
3573 (elf_i386_relocate_section): Likewise.
3574
75e3a45a
MH
3575Tue Aug 6 12:54:56 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
3576
3577 * elf32-d10v.c (elf_d10v_howto_table): Added R_D10V_32.
3578
191d910c
ILT
3579Mon Aug 5 13:42:41 1996 Ian Lance Taylor <ian@cygnus.com>
3580
b944e7e8
ILT
3581 * elf.c (_bfd_elf_make_section_from_shdr): For a loadable section,
3582 only get the LMA from the phdr if they are in the same part of the
3583 file.
3584
191d910c
ILT
3585 * elf.c (map_sections_to_segments): Rewrite tests for starting a
3586 new segment to make them more comprehensible. If the relationship
3587 between the LMA and the VMA changed, start a new segment. Don't
3588 check dynsec when deciding whether to start a new segment for a
3589 writeable section; -N will now handle this.
3590
e751d506
JL
3591Thu Aug 1 22:43:08 1996 Jeffrey A Law (law@cygnus.com)
3592
3593 * libhppa.h: Remove "esel" changes. Not the right approach.
3594 * som.c: Corresponding changes.
3595 (som_bfd_derive_misc_symbol_info): Use ST_DATA for symbols
3596 which don't have a SOM symbol type associated with them.
3597 Reverses a 1994 change.
3598
cdb88e87
ILT
3599Wed Jul 31 15:50:55 1996 Ian Lance Taylor <ian@cygnus.com>
3600
3601 Make ld -N more reasonable for ELF:
3602 * elf.c (map_sections_to_segments): If D_PAGED is not set, set
3603 phdr_in_section to false, and always use a single load segment.
3604 (elf_sort_sections): Sort sections by LMA after VMA.
3605 (assign_file_positions_for_segments): If D_PAGED is not set, don't
3606 align to maxpagesize.
3607 (assign_file_positions_except_relocs): Likewise.
3608 * elfcode.h (elf_object_p): If a section is loaded but not page
3609 aligned, clear D_PAGED.
3610
d1b40d8e
JSC
3611Wed Jul 31 15:00:12 1996 James G. Smith <jsmith@cygnus.co.uk>
3612
3613 * reloc.c: (BFD_RELOC_ARM_OFFSETIMM8, BFD_RELOC_ARM_HWLITERAL):
3614 Added, for internal use by the ARM gas.
3615 * libbfd.h: Rebuilt
3616 * bfd-in2.h: Rebuilt
3617
ad240a82
JL
3618Tue Jul 30 14:14:57 1996 Jeffrey A Law (law@cygnus.com)
3619
3620 * libhppa.h (R_HPPA_ESEL): New field selector.
3621 (e_esel): Similarly.
3622 * som.c (hppa_som_gen_reloc_type): If we encounter an e_esel,
3623 then generate R_COMP2 (PUSH_SYM), R_DATA_EXPR fixup stream.
3624 (som_write_fixups): Handle R_DATA_EXPR just like R_CODE_EXPR.
3625
fb4dc1eb
ILT
3626Tue Jul 30 13:31:27 1996 Ian Lance Taylor <ian@cygnus.com>
3627
3628 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Do the regular
3629 archive search before looking for stripped dynamic objects.
3630
b223f950
ILT
3631Fri Jul 26 17:51:39 1996 Ian Lance Taylor <ian@cygnus.com>
3632
3633 * xcofflink.c (xcoff_build_ldsyms): Make exporting an undefined
3634 symbol a warning rather than an error.
3635
64f808f9
ILT
3636Wed Jul 24 12:02:53 1996 Ian Lance Taylor <ian@cygnus.com>
3637
3638 * elf.c (assign_file_positions_for_segments): Track the virtual
3639 memory position separately from the file position, and use it to
3640 compute the alignment adjustment.
3641
11609502
MH
3642Tue Jul 23 10:43:31 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
3643
3644 * elf32-d10v.c (elf_d10v_howto_table): Changed all relocs to "long"
3645 and fixed mask on R_D10V_10_PCREL_L.
3646
9bd65136
ILT
3647Mon Jul 22 15:30:30 1996 Ian Lance Taylor <ian@cygnus.com>
3648
bf9884d4
ILT
3649 * elf64-mips.c: Include "aout/ar.h".
3650 (mips_elf64_slurp_armap): New static function.
3651 (mips_elf64_write_armap): New static function.
3652 (bfd_elf64_archive_*): Define.
3653 * elfxx-target.h (bfd_elfNN_archive_p): Define if not defined.
3654 Use instead of bfd_generic_archive_p.
3655 (bfd_elfNN_write_archive_contents): Define if not defined. Use
3656 instead of _bfd_write_archive_contents.
3657 (bfd_elfNN_mkdarchive): Define if not defined. Use instead of
3658 _bfd_generic_mkarchive.
3659 (TARGET_BIG_SYM): If bfd_elfNN_archive_functions is defined, use
3660 bfd_elfNN_archive in BFD_JUMP_TABLE_ARCHIVE rather than
3661 _bfd_archive_coff.
3662 (TARGET_LITTLE_SYM): Likewise.
3663 * archive.c (bfd_slurp_armap): Check for and reject an archive map
3664 name of /SYM64/.
3665 * Makefile.in: Rebuild dependencies.
3666
3667 * elf32-mips.c (_bfd_mips_elf_final_write_processing): Handle
3668 SHT_MIPS_LIBLIST, SHT_MIPS_CONTENT, SHT_MIPS_SYMBOL_LIB, and
3669 SHT_MIPS_EVENTS sections.
3670 (_bfd_mips_elf_section_from_shdr): Handle SHT_MIPS_IFACE,
3671 SHT_MIPS_CONTENT, SHT_MIPS_SYMBOL_LIB, and SHT_MIPS_EVENTS
3672 sections.
3673 (_bfd_mips_elf_fake_sections): Likewise.
3674
9bd65136
ILT
3675 * libecoff.h (ecoff_data_type): Add rdata_in_text field.
3676 * ecoff.c (ecoff_compute_section_file_positions): Copy
3677 rdata_in_text from backend info to tdata. Clear it if any data
3678 section comes before .rdata.
3679 (_bfd_ecoff_write_object_contents): Use rdata_in_text field in
3680 tdata rather than backend info.
3681
194141a9
ILT
3682Fri Jul 19 18:15:51 1996 Ian Lance Taylor <ian@cygnus.com>
3683
3684 * configure.in: Fix test for whether a compiler has a 64 bit
3685 type. From Jim Wilson <wilson@cygnus.com>.
3686
a8a3d83a
ILT
3687Thu Jul 18 15:39:10 1996 Ian Lance Taylor <ian@cygnus.com>
3688
f4e14cb9
ILT
3689 * configure.host (mips-sgi-irix6*): New host.
3690
3691 * configure.in: Set and substitute VERSION, BFD_HOST_64BIT_LONG
3692 (replacing HOST_64BITLONG), BFD_HOST_64_BIT_DEFINED,
3693 BFD_HOST_64_BIT, and BFD_HOST_U_64_BIT. Add bfd-in2.h:bfd-in2.h
3694 to AC_OUTPUT call.
3695 * configure: Rebuild.
3696 * bfd-in.h (BFD_ARCH_SIZE): Define as @wordsize@, not @WORDSIZE@.
3697 (BFD_HOST_64_BIT): Define conditionally.
3698 (BFD_HOST_U_64_BIT): Define when BFD_HOST_64_BIT is defined.
3699 (bfd_vma): Typedef as BFD_HOST_U_64_BIT.
3700 (symvalue, bfd_size_type): Likewise.
3701 * bfd-in2.h: Rebuild.
3702 * Makefile.in (do_clean): Remove bfd-tmp.h.
3703 (do_distclean): Remove bfd-in3.h.
3704 (stmp-bfd.h): Just do copy-if-change bfd-in3.h bfd.h.
3705 (bfd-in3.h): New target.
3706
74556b94
ILT
3707 * config.bfd (sparc-*-sysv4*): Don't build sunos_big_vec. From
3708 Andrew Gierth <ANDREWG@microlise.co.uk>.
3709
ab659fd6
ILT
3710 * configure.host: Set INSTALL_SHLIB.
3711 * configure.in: Call AC_SUBST (INSTALL_SHLIB).
3712 * configure: Rebuild.
3713 * Makefile.in (install): Use @INSTALL_SHLIB@.
3714
e8c249cb
ILT
3715 * config.bfd (mips*-*-irix6*): New target.
3716 * configure.host: Handle Irix 6 shared library like Irix 5.
3717
a8a3d83a
ILT
3718 * xcofflink.c (xcoff_link_add_symbols): Don't check an XMC_TD
3719 symbol for a magic name.
3720 (xcoff_link_input_bfd): Don't change the reloc symbol for an
3721 XMC_TD symbol.
3722 (_bfd_ppc_xcoff_relocate_section): Don't get the TOC offset for an
3723 XMC_TD symbol.
3724
b576c7b3
SS
3725Thu Jul 18 11:36:31 1996 Stan Shebs <shebs@andros.cygnus.com>
3726
3727 * mpw-config.in: Add ELF support to mips config, create the
3728 elf32-target.h file in the object dir.
3729 * mpw-make.sed: Edit elfXX-target.h refs at beginnings of lines.
3730
2ba0d82d
KK
3731Wed Jul 17 18:02:32 1996 Kim Knuttila <krk@cygnus.com>
3732
3733 * coff-ppc.c: Redid debug scheme - numerous fprintf's gone.
3734 Also removed most abort calls, in favor of using bfd reporting.
3735
b576c7b3 3736Wed Jul 17 14:51:52 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
50bd50d4 3737
b576c7b3
SS
3738 * Makefile.in (ALL_MACHINES): Add cpu-d10v.o.
3739 (BFD32_BACKENDS) Add elf32-d10v.o.
50bd50d4
MH
3740 * archures.c: Add bfd_d10v_arch.
3741 * bfd-in2.h: Add bfd_d10v_arch.
3742 * config.bfd (d10v-*-*): New target.
3743 * configure: (bfd_elf32_d10v_vec) New vector.
3744 * configure.in: (bfd_elf32_d10v_vec) New vector.
3745 * cpu-d10v.c: New file.
3746 * elf.c (prep_headers): Added case bfd_arch_d10v.
3747 * elf32-d10v.c: New file.
3748 * libbfd.h: Rebuild.
b576c7b3
SS
3749 * reloc.c (BFD_RELOC_D10V_10_PCREL_R, BFD_RELOC_D10V_10_PCREL_L,
3750 BFD_RELOC_D10V_18, BFD_RELOC_D10V_18_PCREL): Define.
50bd50d4 3751 * targets.c (bfd_elf32_d10v_vec): New vector.
cf2cd4cf 3752
2ce9802e
KK
3753Wed Jul 17 10:58:55 1996 Kim Knuttila <krk@cygnus.com>
3754
3755 * coff-ppc.c (coff_ppc_relocate_section): Removed bogus fprintf
3756
9676e446 3757Tue Jul 16 23:49:02 1996 Stu Grossman (grossman@critters.cygnus.com)
3cc21bf6 3758
9676e446
SG
3759 * archures.c bfd-in2.h: Add bfd_mach_i386_i386 and
3760 bfd_mach_i386_i8086 machine types.
3cc21bf6 3761
f7171978
ILT
3762Wed Jul 10 12:42:56 1996 Ian Lance Taylor <ian@cygnus.com>
3763
3764 * ecoff.c (_bfd_ecoff_new_section_hook): Set SEC_CODE for _INIT
3765 and _FINI sections.
3766
74e2ab38
ILT
3767Wed Jul 10 11:18:21 1996 Richard Henderson <rth@tamu.edu>
3768
3769 * coffcode.h (coff_set_section_contents): A/UX does not require
3770 special handling of the _LIB section.
3771
01cfaa6b
JL
3772Tue Jul 9 15:52:20 1996 Jeffrey A Law (law@cygnus.com)
3773
3774 * coff-h8300.c (h8300_reloc16_extra_cases): Use the correct
3775 value for R_RELBYTE.
3776
3777 * reloc16.c (bfd_coff_reloc16_relax_section): Only "shrinks"
3778 array if one was allocated.
3779
eb52b9dc
ILT
3780Tue Jul 9 12:21:54 1996 Ian Lance Taylor <ian@cygnus.com>
3781
3782 From Kazumoto Kojima <kkojima@kk.info.kanagawa-u.ac.jp>:
3783 * elf32-mips.c (struct mips_elf_link_hash_table): Add new fields
3784 use_rld_obj_head and rld_value.
3785 (mips_elf_link_hash_table_create): Initialize new fields.
3786 (mips_elf_add_symbol_hook): Mark __rld_obj_head symbol as
3787 dynamic.
3788 (mips_elf_create_dynamic_sections): Create .rld_map section. If
3789 __rld_obj_head symbol not seen, create an __rld_map symbol.
3790 (mips_elf_size_dynamic_sections): Make space in .rld_map section.
3791 Create a DT_MIPS_RLD_MAP entry rather than a DT_DEBUG entry.
3792 (mips_elf_finish_dynamic_symbol): Save value of __rld_map or
3793 __rld_obj_head symbol.
3794 (mips_elf_finish_dynamic_sections): Handle DT_MIPS_RLD_MAP.
3795
56b4cbaa
ILT
3796Mon Jul 8 16:18:03 1996 Ian Lance Taylor <ian@cygnus.com>
3797
9b292d4c
ILT
3798 * elf32-mips.c (mips_reloc_map): Remove BFD_RELOC_32_PCREL entry.
3799
dab45734
ILT
3800 * elf32-ppc.c (ppc_elf_howto_raw): For R_PPC_ADDR16_HA, use
3801 ppc_elf_addr16_ha_reloc.
3802 (ppc_elf_addr16_ha_reloc): New static function.
3803
56b4cbaa
ILT
3804 * coff-mips.c (struct mips_hi): Define.
3805 (mips_refhi_list): New static variable.
3806 (mips_refhi_addr, mips_refhi_addend): Remove.
3807 (mips_refhi_reloc): Maintain a list of unmatched REFHI relocs.
3808 (mips_reflo_reloc): Process mips_refhi_list.
3809 (mips_relhi_list): New static variable.
3810 (mips_relhi_addr, mips_relhi_addend): Remove.
3811 (mips_relhi_reloc): Maintain a list of unmatched RELHI relocs.
3812 (mips_rello_reloc): Process mips_relhi_list.
3813 (mips_relocate_section): Permit an arbitrary number of REFHI or
3814 RELHI relocs before the associated REFLO or RELLO reloc.
3815
b777c6a7
ILT
3816Fri Jul 5 19:27:49 1996 Ian Lance Taylor <ian@cygnus.com>
3817
3818 * aout-target.h (MY(callback)): Set reloc_count fields.
3819
100b65dd
ILT
3820Thu Jul 4 12:00:37 1996 Ian Lance Taylor <ian@cygnus.com>
3821
48f3aaf3
ILT
3822 * sunos.c (sunos_add_dynamic_symbols): Don't create dynamic
3823 sections unless this is a SunOS link.
3824
100b65dd
ILT
3825 * VERSION: Set to 2.7.1.
3826
3827 * Released binutils 2.7.
3828
a31e14f4
ILT
3829Wed Jul 3 14:59:47 1996 Ian Lance Taylor <ian@cygnus.com>
3830
4d3daf4f
ILT
3831 * i386aout.c: Include "aout/aout64.h".
3832 (i386aout_write_object_contents): New static function.
3833 (MY_write_object_contents): Define.
3834
a31e14f4
ILT
3835 * netbsd.h (MY(write_object_contents)): Make sure that
3836 adjust_sizes_and_vmas is called before fiddling with the magic
3837 number.
3838
d2d04f7a
ILT
3839Tue Jul 2 23:30:39 1996 Ian Lance Taylor <ian@cygnus.com>
3840
3841 * stabs.c (_bfd_link_section_stabs): Fix casts of psinfo.
3842
4f6ee760
ILT
3843Sun Jun 30 13:34:33 1996 Ian Lance Taylor <ian@cygnus.com>
3844
3845 * libbfd-in.h (itos, stoi): Don't define.
3846 * libbfd.h: Rebuild.
3847 * i386lynx.c (KEEPIT): Define as udata.i.
3848 (NAME(lynx,swap_std_reloc_out)): Don't use stoi.
3849 (NAME(lynx,swap_ext_reloc_out)): Likewise.
3850 * riscix.c (riscix_swap_std_reloc_out): Use udata.i rather than
3851 flags. Don't use stoi.
3852
3853 * elf32-mips.c (ELF_MAGPAGESIZE): Change definition to 0x1000.
3854
3855 * elf.c (map_sections_to_segments): Don't start a new segment for
3856 a writable section if it's on the same page as the previous
3857 segment. Reset the writable variable for a readonly section.
3858
dfb89b82
KK
3859Sat Jun 29 16:18:51 1996 Kim Knuttila <krk@cygnus.com>
3860
3861 * peicode.h (coff_swap_aouthdr_in): Missing initializations of
3862 first_thunk_address, thunk_size, and import_table_size.
3863 * peicode.h: Improved some diagnostics regarding edata sections.
3864
3865 * coff-ppc.c (coff_ppc_relocate_section): Earlier error check
3866 on IMGLUE relocs.
3867 (coff_ppc_relocate_section): Improved diagnostic for large TOCDEFN's.
3868 (TARGET_LITTLE_SYM): Added missing D_PAGED.
3869
8e80606f
ILT
3870Fri Jun 28 13:48:45 1996 Ian Lance Taylor <ian@cygnus.com>
3871
f93fb275
ILT
3872 * xcofflink.c (xcoff_link_check_ar_symbols): An undefined symbol
3873 with XCOFF_DEF_DYNAMIC set is really defined.
3874 (xcoff_link_check_dynamic_ar_symbols): Likewise.
3875 (xcoff_link_add_symbols): Only create special sections if using an
3876 XCOFF hash table.
3877
8e80606f
ILT
3878 * reloc.c (bfd_perform_relocation): Handle xcoff-powermac like
3879 aixcoff-rs6000.
3880 (bfd_install_relocation): Likewise.
3881
eec2f824
ILT
3882Fri Jun 28 11:17:00 1996 Richard Henderson <rth@tamu.edu>
3883
3884 * elf64-alpha.c (struct alpha_elf_link_hash_entry): Add flags
3885 field.
3886 (ALPHA_ELF_LINK_HASH_LU_ADDR): Define.
3887 (ALPHA_ELF_LINK_HASH_LU_MEM): Define.
3888 (ALPHA_ELF_LINK_HASH_LU_FUNC): Define.
3889 (elf64_alpha_link_hash_newfunc): Initialize flags field.
3890 (elf64_alpha_check_relocs): Record types of LITUSE entries that
3891 are found for LITERAL relocs.
3892 (elf64_alpha_adjust_dynamic_symbol): If a symbol has its address
3893 taken, we cannot generate a .plt entry for the symbol.
3894
5304aea9
ILT
3895Thu Jun 27 11:24:29 1996 Ian Lance Taylor <ian@cygnus.com>
3896
3897 * configure.in: Add AC_ISC_POSIX, and check for setitimer and
3898 sysconf functions (for gprof).
3899 * configure, config.in: Rebuild.
3900
017047d4
ILT
3901Wed Jun 26 16:29:02 1996 Ian Lance Taylor <ian@cygnus.com>
3902
f292bbe9
ILT
3903 * ecoff.c (_bfd_ecoff_archive_p): Check the first object file in
3904 an archive if it has a map. If the object file has the wrong
3905 xvec, reject it.
3906
566e2325
ILT
3907 * coff-alpha.c (alpha_adjust_reloc_in): Set the addend for a
3908 BRADDR, SREL16, SREL32, or SREL64 reloc against an external
3909 symbol.
3910 (alpha_relocate_section): Likewise.
3911
017047d4
ILT
3912 * coffswap.h (coff_swap_reloc_out): Use RELSZ, not sizeof.
3913 (coff_swap_filehdr_out): Use FILHSZ, not sizeof.
3914 (coff_swap_sym_out): Use SYMESZ, not sizeof.
3915 (coff_swap_aux_out): Use AUXESZ, not sizeof.
3916 (coff_swap_lineno_out): Use LINESZ, not sizeof.
3917 (coff_swap_aouthdr_out): Use AOUTSZ, not sizeof.
3918 (coff_swap_scnhdr_out): Use SCNHSZ, not sizeof.
3919 * peicode.h: Corresponding changes.
3920
cb73f5d7
MM
3921Tue Jun 25 15:28:34 1996 Michael Meissner <meissner@tiktok.cygnus.com>
3922
3923 * elflink.h (elf_create_pointer_linker_section): Comment out code
3924 dealing with making GOT pointers negative of the GOT symbol for
3925 now.
3926
297a4f1a
ILT
3927Tue Jun 25 11:41:24 1996 Richard Henderson <rth@tamu.edu>
3928
3929 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't
3930 increment the .rela.plt size until after we're done creating the
3931 .plt entry.
3932 (elf64_alpha_finish_dynamic_symbol): Change .plt entry to load the
3933 .rela.plt offset directly rather than calculating it.
3934
dbbfec07 3935Mon Jun 24 17:15:10 1996 Jason Molenda (crash@godzilla.cygnus.co.jp)
cf2cd4cf
UD
3936
3937 * Makefile.in, (bindir, libdir, datadir, mandir, infodir, includedir):
01e58ff6 3938 Use autoconf-set values.
cf2cd4cf
UD
3939 * doc/Makefile.in (bindir, libdir, datadir, mandir, infodir,
3940 includedir, INSTALL, INSTALL_PROGRAM, INSTALL_DATA): Use autoconf-set
01e58ff6 3941 values.
dbbfec07
JM
3942 (docdir): Deleted.
3943 * configure.in (AC_PREREQ): autoconf v2.5 or higher.
3944 * configure: Rebuilt.
cf2cd4cf 3945
50004d8d
JL
3946Mon Jun 24 22:50:35 1996 Jeffrey A Law (law@cygnus.com)
3947
3948 * som.c (som_write_fixups): Fix typo in R_END_TRY for exception
3949 handling code > 1k away.
3950
3951Mon Jun 24 18:41:06 1996 Michael Meissner <meissner@tiktok.cygnus.com>
3952
3953 * elflink.h (elf_create_pointer_linker_section): If DEBUG is
3954 defined, output whenever the symbol is updated.
3955
2e0567eb
ILT
3956Mon Jun 24 17:58:12 1996 Jouke Numan <jnuman@bazis.nl>
3957
3958 * elf.c (elf_fake_sections): Don't set sh_addr of a non SEC_ALLOC
3959 section to 0 if user_set_vma is set.
3960 * elflink.h (elf_bfd_final_link): Likewise.
3961
3962Sun Jun 23 20:42:51 1996 Doug Evans <dje@canuck.cygnus.com>
3963
3964 Partially undo patch of Jun 20.
3965 * coffcode.h (coff_set_alignment_hook): Use COFF_IMAGE_WITH_PE.
3966 (coff_compute_section_file_positions): Likewise.
3967 (coff_write_object_contents): Likewise. Re-add deleted code, but
3968 use #ifdef COFF_WITH_PE, not COFF_OBJ_WITH_PE.
3969 * peicode.h (pe_bfd_copy_private_bfd_data): Re-add #ifdef.
3970
bff4a496
ILT
3971Fri Jun 21 17:38:15 1996 Joel Sherrill <joel@merlin.gcs.redstone.army.mil>
3972
3973 * config.bfd: Add support for *-*-rtems* configurations.
cf2cd4cf 3974
7ae6550f
ILT
3975Fri Jun 21 15:19:59 1996 Ian Lance Taylor <ian@cygnus.com>
3976
3977 * elf.c (prep_headers): Add bfd_arch_alpha case.
3978
e8f46717
ILT
3979Fri Jun 21 12:35:27 1996 Richard Henderson <rth@tamu.edu>
3980
3981 * elf64-alpha.c: New file.
3982 * config.bfd (alpha-*-linuxecoff*): New target.
3983 (alpha-*-linux*, alpha-*-elf*): New targets.
3984 * configure.in (bfd_elf64_alpha_vec): New vector.
3985 * configure: Rebuild.
3986 * targets.c (bfd_elf64_alpha_vec): Declare.
3987 (bfd_target_vector): Add bfd_elf64_alpha_vec if BFD64.
3988 * reloc.c (BFD_RELOC_ALPHA_GPDISP): Define.
3989 * bfd-in2.h, libbfd.h: Rebuild.
3990 * Makefile.in: Rebuild dependencies.
3991 (BFD64_BACKENDS): Add elf64-alpha.o.
3992 (BFD64_BACKENDS_CFILES): Add elf64-alpha.c.
3993
bacecac8
ILT
3994Thu Jun 20 18:14:25 1996 Ian Lance Taylor <ian@cygnus.com>
3995
3996 * ecoff.c (ecoff_armap_hash): If hlog is 0, just return 0, rather
3997 than relying on a right shift of 32.
3998
9ca108cd
DE
3999Thu Jun 20 11:00:57 1996 Doug Evans <dje@canuck.cygnus.com>
4000
b9110a3c
DE
4001 * coffcode.h (coff_set_alignment_hook): Change COFF_IMAGE_WITH_PE
4002 ifdef to COFF_WITH_PE.
4003 (coff_compute_section_file_positions): Likewise.
4004 (coff_write_object_contents): Likewise. Delete COFF_OBJ_WITH_PE.
4005 * pe-{arm,i386,ppc}.c (COFF_OBJ_WITH_PE): Delete.
4006 * peicode.h (pe_bfd_copy_private_bfd_data): Delete ifdef
4007 COFF_IMAGE_WITH_PE, always include.
4008
9ca108cd
DE
4009 * peicode.h (coff_swap_scnhdr_out): ".drectve" doesn't have trailing 0.
4010
c2073f05
ILT
4011Wed Jun 19 11:37:52 1996 Ian Lance Taylor <ian@cygnus.com>
4012
7fc6a16a
ILT
4013 * elf.c (map_sections_to_segments): Fix up the test for -Ttext to
4014 approximate the correct answer if SIZEOF_HEADERS was not used.
4015
c2073f05
ILT
4016 * binary.c (binary_set_section_contents): Set section file
4017 position based on LMA rather than VMA.
4018
4838929e
ILT
4019Wed Jun 19 11:19:25 1996 Manfred Hollstein KS/EIC5 60/3/142 #40283 <manfred@lts.sel.alcatel.de>
4020
4021 * linker.c (_bfd_generic_link_output_symbols): Don't output any
4022 symbols if info->strip == strip_all.
4023
4024Tue Jun 18 15:17:36 1996 Jeffrey A. Law <law@rtl.cygnus.com>
4025
4026 * coff-h8300.c: Remove #if 0 code.
4027 (compatable): Don't allow mixing/matching of different architectures.
cf2cd4cf 4028
4838929e
ILT
4029 * archures.c (bfd_mach_h8300s): Add.
4030 * bfd-in2.h: Rebuilt.
4031 * coff-h8300.c (funcvec_hash_newfunc): Handle H8/S too.
4032 (BADMAG): Likewise.
4033 (h8300_reloc16_estimate): Likewise.
4034 (h8300_reloc16_extra_cases): Likewise.
4035 (h8300_bfd_link_add_symbols): Likewise.
4036 * coffcode.h (coff_set_arch_mach_hook): Likewise.
4037 (coff_set_flags): Likewise.
4038 * cpu-h8300.c (h8300_scan): Likewise.
4039 Add H8/S to bfd_h8300_arch list.
4040
c3d8e071
ILT
4041Tue Jun 18 14:42:58 1996 Klaus Kaempf <kkaempf@progis.de>
4042
4043 Added support for Alpha OpenVMS:
4044 * evax.h, evax-alpha.c, evax-egsd.c, evax-emh.c: New files.
4045 * evax-etir.c, evax-misc.c, hosts/alphavms.h: New files.
4046 * config.h-vms, makefile.vms: New files.
4047 * config.bfd (alpha-*-*vms*): New target.
4048 * configure.in (evax_alpha_vec): New target vector.
4049 * configure: Rebuild.
4050 * reloc.c (BFD_RELOC_SWREL32, BFD_RELOC_SWREL64): Define.
4051 (BFD_RELOC_ALPHA_LINKAGE, BFD_RELOC_ALPHA_BASEREG): Define.
4052 * targets.c (bfd_target_evax_flavour): Define.
4053 (evax_alpha_vec): Declare.
4054 (bfd_target_vector): Add ecoffalpha_little_vec and evax_alpha_vec
4055 if BFD64 is defined.
4056 * bfd-in2.h, libbfd.h: Rebuild.
4057 * Makefile.in: Rebuild dependencies.
4058 (BFD64_BACKENDS): Add evax-alpha.o, evax-egsd.o, evax-etir.o,
4059 evax-emh.o, and evax-misc.o.
4060 (BFD64_BACKENDS_CFILES): Add evax-alpha.c, evax-egsd.c,
4061 evax-etir.c, evax-emh.c, and evax-misc.c.
4062 (HFILES): Add evax.h.
4063
142aa7d9
ILT
4064Tue Jun 18 13:54:18 1996 Ian Lance Taylor <ian@cygnus.com>
4065
4066 * coff-h8300.c (h8300_reloc16_extra_cases): Make name a const
4067 pointer.
4068 (h8300_bfd_link_add_symbols): Likewise.
4069
b658d64d
JL
4070Mon Jun 17 10:06:50 1996 Jeffrey A. Law <law@rtl.cygnus.com>
4071
4072 * som.h (R_HPPA_BEGIN_TRY, R_HPPA_END_TRY): Define.
4073 * som.c (som_write_fixups): Handle R_BEGIN_TRY and R_END_TRY.
4074
2df1e84b
ILT
4075Mon Jun 17 12:49:11 1996 Ian Lance Taylor <ian@cygnus.com>
4076
4077 * elf32-mips.c (mips_elf_relocate_section): Don't create a reloc
4078 for R_MIPS_REL32 and R_MIPS_32 relocs if no dynamic sections were
4079 created.
4080 (mips_elf_check_relocs): Only create .rel.dyn for R_MIPS_REL32 and
4081 R_MIPS_32 relocs if creating a shared library.
4082
4083Thu Jun 13 20:14:51 1996 Doug Evans <dje@canuck.cygnus.com>
4084
4085 * peicode.h (add_data_entry): Use pei_section_data rather than
4086 _cooked_size. Corresponds to May 13 change in coffcode.h.
4087
8100e72c
ILT
4088Thu Jun 13 10:23:40 1996 Ian Lance Taylor <ian@cygnus.com>
4089
51bc9642
ILT
4090 * cofflink.c (_bfd_coff_final_link): Handle long section names.
4091 * coffcode.h (coff_write_object_contents): If there are long
4092 section names, always set the f_symptr field, even if there are no
4093 symbols.
4094 * peicode.h (coff_swap_filehdr_in): Don't clear the f_symptr field
4095 if there are no symbols.
4096
8100e72c
ILT
4097 * coffgen.c (make_a_section_from_file): Check return value of
4098 _bfd_coff_read_string_table.
4099 (coff_real_object_p): Check return value of
4100 make_a_section_from_file.
4101 (_bfd_coff_read_string_table): Check that there are some symbols
4102 before trying to read the string table size.
4103
0e3bd85e
ILT
4104Wed Jun 12 11:16:37 1996 Ian Lance Taylor <ian@cygnus.com>
4105
ed675a04
ILT
4106 * xcofflink.c (xcoff_link_add_symbols): When considering whether
4107 to replace a symbol in a dynamic object with a symbol from another
4108 dynamic object, do the replacement if the existing symbol is
4109 global linkage code.
4110
49144784
ILT
4111 * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Check explicitly
4112 for _ptrgl, and treat it as global linkage code.
4113
0e3bd85e
ILT
4114 * aoutx.h (NAME(aout,find_nearest_line)): Notice if we find a
4115 filename or N_SO symbol past the offset, and use it to indicate
4116 that there is no line number or function when appropriate.
4117
a5c7acea
ILT
4118Tue Jun 11 15:24:48 1996 Ian Lance Taylor <ian@cygnus.com>
4119
4120 * xcofflink.c (xcoff_build_ldsyms): Set XCOFF_DEF_REGULAR for a
4121 common symbol defined by the linker. Don't export function code
4122 even if export_defineds is set.
4123
4124Mon Jun 10 11:57:27 1996 Jeffrey A Law (law@cygnus.com)
4125
4126 * coff-h8300.c (howto_table): Add new entries for R_BCC_INV
4127 and R_JMP_DEL.
4128 (rtype2howto): Handle R_BCC_INV and R_JMP_DEL.
4129 (h8300_symbol_address_p): New function.
4130 (h8300_reloc16_estimate): Eliminate jumps made unnecessary by
4131 relaxing.
4132
890f5b7f
JL
4133Sun Jun 9 16:30:20 1996 Jeffrey A Law (law@cygnus.com)
4134
4135 * coff-h8300.c (h8300_reloc16_estimate): Fix many minor spacing
4136 problems.
4137 (h8300_reloc16_estimate, cases R_JMP1, R_JMP2): Adjust "dot"
4138 correctly for the two variants. Allow relaxing if the target
4139 is 128 bytes away since after relaxation it'll be 126 bytes away.
4140 (h8300_reloc16_estimate, case R_PCRWORD): Correctly adjust
4141 "dot" and "value". Allow relaxing if the target is 128 bytes
4142 away since after relaxation it'll be 126 bytes away.
4143 * reloc16.c (bfd_coff_reloc16_relax_section): Keep relaxing
4144 the given section until nothing changes.
4145
0593fc16
ILT
4146Thu Jun 6 15:24:45 1996 Richard Henderson <rth@tamu.edu>
4147
4148 * ecoff.c (_bfd_ecoff_new_section_hook): Remove the _PDATA
4149 alignment hack--we can get the lnnoptr info another way without
4150 suddenly increasing the alignment requirements. Set the flags for
4151 the _PDATA section.
4152 (ecoff_compute_section_file_positions): Do so.
4153
9b263b79
ILT
4154Thu Jun 6 11:24:37 1996 Ian Lance Taylor <ian@cygnus.com>
4155
bbf7c335
ILT
4156 * ieee.c (ieee_write_object_contents): Put a timestamp in the file
4157 to keep the HP emulator database happy.
4158
9b263b79
ILT
4159 * config.bfd: Recognize powerpc-*-linux* and powerpcle-*-linux*.
4160 From Kevin Buettner <kev@primenet.com>.
4161
4162Wed Jun 5 15:16:04 1996 Ian Lance Taylor <ian@cygnus.com>
4163
4164 * aoutx.h (translate_to_native_sym_flags): Don't try to print the
4165 name of a NULL section.
4166
26145b15
ILT
4167Tue Jun 4 18:53:58 1996 Ian Lance Taylor <ian@cygnus.com>
4168
4169 * linker.c (_bfd_generic_link_add_one_symbol): If notice_all is
4170 set, always call the notice callback.
4171
4172 * VERSION: Increment for bfdlink.h change.
4173
3a2080d8
ILT
4174Mon Jun 3 11:01:53 1996 Ian Lance Taylor <ian@cygnus.com>
4175
9d175198
ILT
4176 * coff-sh.c (COFF_DEFAULT_SECTION_ALIGNMENT_POWER): Set to 4.
4177 (sh_relax_delete_bytes): Correct handling of differently sized
4178 trailing alignment reloc.
4179
5a04f1bd
ILT
4180 * bfd-in.h: Use #error if BFD_HOST_64_BIT can not be defined.
4181 * bfd-in2.h: Rebuild.
4182 * configure.in: Warn if there is no known 64 bit type.
4183 * configure: Rebuild.
4184
60c8b04f
ILT
4185 * Makefile.in: Rebuild dependencies.
4186 (BFD32_BACKENDS): Add ppcboot.o.
4187 (BFD32_BACKENDS_CFILES): Add ppcboot.c.
4188
3a2080d8
ILT
4189 * elf32-mips.c (mips_elf_size_dynamic_sections): Initialize c.
4190 From Per Fogelstrom <per.fogelstrom@mailbox200.swipnet.se>.
4191
903612a2
ILT
4192Sat Jun 1 21:49:58 1996 Ian Lance Taylor <ian@cygnus.com>
4193
4194 * elf64-mips.c (bfd_mips_elf64_swap_reginfo_in)
4195 (bfd_mips_elf64_swap_reginfo_out): Move from here...
4196 * elf32-mips.c (bfd_mips_elf64_swap_reginfo_in)
4197 (bfd_mips_elf64_swap_reginfo_out): ...to here.
4198
38893c8c
ILT
4199Fri May 31 13:51:28 1996 Ian Lance Taylor <ian@cygnus.com>
4200
bc05732b
ILT
4201 * elf64-mips.c: Improve reloc special_functions and handling of
4202 SHT_MIPS_OPTIONS section.
4203 * elf32-mips.c (_bfd_mips_elf_hi16_reloc): Rename from
4204 mips_elf_hi16_reloc and make globally visible.
4205 (_bfd_mips_elf_lo16_reloc): Rename from mips_elf_lo16_reloc and
4206 make globally visible.
4207 (_bfd_mips_elf_got16_reloc): Rename from mips_elf_got16_reloc and
4208 make globally visible.
4209 (_bfd_mips_elf_gprel16_reloc): Rename from mips_elf_gprel16_reloc
4210 and make globally visible.
4211 (gprel16_with_gp): Check howto->src_mask before using value in
4212 insn.
4213 (_bfd_mips_elf_gprel32_reloc): Rename from mips_elf_gprel32_reloc
4214 and make globally visible.
4215 (gprel32_with_gp): Check howto->src_mask before fetching value.
4216 (bfd_mips_elf_swap_options_in): New function.
4217 (bfd_mips_elf_swap_options_out): New function.
4218 (_bfd_mips_elf_set_private_flags): Rename from
4219 mips_elf_set_private_flags and make globally visible.
4220 (_bfd_mips_elf_copy_private_bfd_data): Rename from
4221 mips_elf_copy_private_bfd_data and make globally visible.
4222 (_bfd_mips_elf_merge_private_bfd_data): Rename from
4223 mips_elf_merge_private_bfd_data and make globally visible.
4224 (_bfd_mips_elf_section_from_shdr): Accept .MIPS.options as a name
4225 for a SHT_MIPS_OPTIONS section.
4226 (mips_elf32_section_from_shdr): Handle SHT_MIPS_OPTIONS section.
4227 (_bfd_mips_elf_fake_sections): Consider .MIPS.options to be the
4228 name of a SHT_MIPS_OPTIONS section.
4229 (_bfd_mips_elf_set_section_contents): New function.
4230 (mips_elf32_section_processing): Set the GP value in a
4231 SHT_MIPS_OPTIONS section.
4232 (_bfd_mips_elf_find_nearest_line): Rename from
4233 mips_elf_find_nearest_line and make globally visible.
4234 (bfd_elf32_set_section_contents): Define.
4235 * elf-bfd.h (_bfd_mips_elf_hi16_reloc): Declare.
4236 (_bfd_mips_elf_lo16_reloc): Declare.
4237 (_bfd_mips_elf_gprel16_reloc): Declare.
4238 (_bfd_mips_elf_got16_reloc): Declare.
4239 (_bfd_mips_elf_gprel32_reloc): Declare.
4240 (_bfd_mips_elf_set_private_flags): Declare.
4241 (_bfd_mips_elf_copy_private_bfd_data): Declare.
4242 (_bfd_mips_elf_merge_private_bfd_data): Declare.
4243 (_bfd_mips_elf_find_nearest_line): Declare.
4244 (_bfd_mips_elf_set_section_contents): Declare.
4245
38893c8c
ILT
4246 * elf32-hppa.c (elf32_hppa_info_to_howto): Rename from
4247 elf_info_to_howto.
4248 (elf_info_to_howto): Define.
4249 * elf32-sparc.c (elf32_sparc_info_to_howto): Rename from
4250 elf_info_to_howto.
4251 (elf_info_to_howto): Define.
4252 * elf64-sparc.c (sparc64_elf_info_to_howto): Rename from
4253 elf_info_to_howto.
4254 (elf_info_to_howto): Define.
4255
4256 * coff-w65.c (h8300_reloc16_estimate): Rename R_MOVB[12] to
4257 R_MOV16B[12], to match change in coff/internal.h.
4258
cabd8fa0
ILT
4259Thu May 30 12:38:49 1996 Ian Lance Taylor <ian@cygnus.com>
4260
00176555
ILT
4261 * elf64-mips.c: Extensive additions to provide better support for
4262 writing files and for gas.
4263 * elf32-mips.c (_bfd_mips_elf_object_p): New function, broken out
4264 of mips_elf_object_p.
4265 (mips_elf32_object_p): Rename from mips_elf_object_p; call
4266 _bfd_mips_elf_object_p.
4267 (_bfd_mips_elf_final_write_processing): Rename from
4268 mips_elf_final_write_processing and make globally visible.
4269 (_bfd_mips_elf_fake_sections): Rename from
4270 mips_elf_fake_sections and make globally visible.
4271 (_bfd_mips_elf_section_from_bfd_section): Rename from
4272 mips_elf_section_from_bfd_section and make globally visible.
4273 (_bfd_mips_elf_section_processing): New function, broken out of
4274 mips_elf_section_processing.
4275 (mips_elf32_section_processing): Rename from
4276 mips_elf_section_processing; call
4277 _bfd_mips_elf_section_processing.
4278 (_bfd_mips_elf_symbol_processing): Rename from
4279 mips_elf_symbol_processing and make globally visible.
4280 (_bfd_mips_elf_read_ecoff_info): Rename from
4281 mips_elf_read_ecoff_info and make globally visible.
4282 (mips_elf32_ecoff_debug_swap): Rename from
4283 mips_elf_ecoff_debug_swap.
4284 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Use asymbol rather than
4285 struct symbol_cache_entry.
4286 (_bfd_elf_validate_reloc): New function, moved in from
4287 elfcode.h:validate_reloc.
4288 * elfcode.h (validate_reloc): Remove; moved into elf.c and renamed
4289 to _bfd_elf_validate_reloc. Change all callers.
4290 * elf-bfd.h (bfd_section_from_shdr): Declare.
4291 (_bfd_elf_symbol_from_bfd_symbol): Declare.
4292 (_bfd_elf_validate_reloc): Declare.
4293 (_bfd_mips_elf_object_p): Declare.
4294 (_bfd_mips_elf_fake_sections): Declare.
4295 (_bfd_mips_elf_section_from_bfd_section): Declare.
4296 (_bfd_mips_elf_section_processing): Declare.
4297 (_bfd_mips_elf_symbol_processing): Declare.
4298 (_bfd_mips_elf_read_ecoff_info): Declare.
4299 (_bfd_mips_elf_final_write_processing): Declare.
4300 * elfxx-target.h (bfd_elfNN_get_reloc_upper_bound): Don't define
4301 if already defined.
4302
cabd8fa0
ILT
4303 * elf32-mips.c (mips_elf_object_p): Handle E_MIPS_ARCH_4.
4304 (mips_elf_final_write_processing): Likewise.
4305
d1bf45aa
ILT
4306Wed May 29 16:15:29 1996 Ian Lance Taylor <ian@cygnus.com>
4307
4308 64-bit MIPS ELF ABI objdump support:
4309 * elf64-mips.c: New file.
4310 * Makefile.in: Rebuild dependencies.
4311 (BFD64_BACKENDS): Add elf64-mips.o.
4312 (BFD64_BACKENDS_CFILES): Add elf64-mips.c.
4313 * config.bfd (mips*el-*-elf*) Add bfd_elf64_bigmips_vec and
4314 bfd_elf64_littlemips_vec to targ_selvecs.
4315 (mips*-*-elf*): Likewise.
4316 * confingure.in: Add bfd_elf64_bigmips_vec and
4317 bfd_elf64_littlemips_vec to vector switch.
4318 * configure: Rebuild.
4319 * elf32-mips.c (_bfd_mips_elf_section_from_shdr): New function,
4320 broken out of mips_elf_section_from_shdr.
4321 (mips_elf32_section_from_shdr): Rename from
4322 mips_elf_section_from_shdr. Call new function.
4323 (elf_backend_section_from_shdr): Update name of renamed function.
4324 * elf-bfd.h (struct elf_size_info): Change second parameter of
4325 write_out_phdrs to be const. Likewise for second parameter of
4326 swap_symbol_out.
4327 (struct bfd_elf_section_data): Add rel_hdr2 field.
4328 (bfd_elf32_swap_symbol_in): Change second parameter to be const.
4329 (bfd_elf32_swap_symbol_out): Likewise.
4330 (bfd_elf32_swap_reloc_in): Likewise.
4331 (bfd_elf32_swap_reloc_out): Likewise.
4332 (bfd_elf32_swap_reloca_in): Likewise.
4333 (bfd_elf32_swap_reloca_out): Likewise.
4334 (bfd_elf32_swap_phdr_in): Likewise.
4335 (bfd_elf32_swap_phdr_out): Likewise.
4336 (bfd_elf32_swap_dyn_in): Likewise.
4337 (bfd_elf32_swap_dyn_out): Likewise.
4338 (bfd_elf32_slurp_symbol_table): Declare.
4339 (bfd_elf32_write_shdrs_and_ehdr): Declare.
4340 (bfd_elf32_write_out_phdrs): Declare.
4341 (bfd_elf64_swap_symbol_in): Change second parameter to be const.
4342 (bfd_elf64_swap_symbol_out): Likewise.
4343 (bfd_elf64_swap_reloc_in): Likewise.
4344 (bfd_elf64_swap_reloc_out): Likewise.
4345 (bfd_elf64_swap_reloca_in): Likewise.
4346 (bfd_elf64_swap_reloca_out): Likewise.
4347 (bfd_elf64_swap_phdr_in): Likewise.
4348 (bfd_elf64_swap_phdr_out): Likewise.
4349 (bfd_elf64_swap_dyn_in): Likewise.
4350 (bfd_elf64_swap_dyn_out): Likewise.
4351 (bfd_elf64_slurp_symbol_table): Declare.
4352 (bfd_elf64_write_shdrs_and_ehdr): Declare.
4353 (bfd_elf64_write_out_phdrs): Declare.
4354 (_bfd_mips_elf_section_from_shdr): Declare.
4355 * elf.c (bfd_section_from_shdr): Remove assertion requiring
4356 SHT_REL/SHT_RELA to match use_rela_p. If there is already a reloc
4357 section for the section, add the new one to rel_hdr2. Increment
4358 reloc_count rather than setting it.
4359 * elfcode.h (elf_slurp_symbol_table): Define name as macro.
4360 Remove static declaration.
4361 (elf_write_shdrs_and_ehdr): Define name as macro.
4362 (elf_write_out_phdrs): Likewise.
4363 (elf_swap_ehdr_in, elf_swap_ehdr_out): Declare.
4364 (elf_swap_shdr_in, elf_swap_shdr_out): Declare.
4365 (elf_swap_symbol_in): Change second parameter to be const.
4366 (elf_swap_symbol_out): Likewise.
4367 (elf_swap_ehdr_in, elf_swap_ehdr_out): Likewise.
4368 (elf_swap_shdr_in, elf_swap_shdr_out): Likewise.
4369 (elf_swap_phdr_in, elf_swap_phdr_out): Likewise.
4370 (elf_swap_reloc_in, elf_swap_reloc_out): Likewise.
4371 (elf_swap_reloca_in, elf_swap_reloca_out): Likewise.
4372 (elf_write_out_phdrs): Rename from write_out_phdrs. Change second
4373 parameter to be const. Make non-static.
4374 (elf_write_shdrs_and_ehdr): Rename from write_shdrs_and_ehdr.
4375 Make non-static.
4376 (elf_slurp_symbol_table): Make non-static.
4377 (NAME(_bfd_elf,size_info)): Update names of renamed functions.
4378 * elfxx-target.h (elf_info_to_howto): Define if not defined.
4379 (elf_backend_size_info): Likewise.
4380 (elfNN_bed): Use elf_backend_size_info.
4381 * targets.c (bfd_elf64_bigmips_vec): Declare.
4382 (bfd_elf64_littlemips_vec): Declare.
4383 (bfd_target_vector): Add bfd_elf64_bigmips_vec and
4384 bfd_elf64_littlemips_vec if BFD64 is defined.
cf2cd4cf 4385
d1bf45aa
ILT
4386 * libbfd.c (bfd_get_file_window): Add cast to fprintf argument.
4387
7dd3d45a
ILT
4388Tue May 28 11:42:08 1996 Ian Lance Taylor <ian@cygnus.com>
4389
07692951
ILT
4390 * coff-sh.c (sh_relax_delete_bytes): Insert nop instructions, not
4391 zeroes, in alignment holes.
4392
a4322a77
ILT
4393 * configure: Rebuild with autoconf 2.10.
4394
7dd3d45a
ILT
4395 * aoutx.h (NAME(aout,find_nearest_line)): Make room for the
4396 potential leading underscore in the allocated buffer.
4397
0293d5b0
MM
4398Fri May 24 14:28:38 1996 Michael Meissner <meissner@tiktok.cygnus.com>
4399
4400 * elf32-ppc.c (ppc_elf_add_symbol_hook): Do not put small common
4401 symbols into .sbss if this is a relocatable link.
4402
a5d0cd50
ILT
4403Thu May 23 12:26:24 1996 Ian Lance Taylor <ian@cygnus.com>
4404
4405 * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Warn about
4406 undefined symbols when creating a shared library.
4407
4408Fri May 17 13:54:15 1996 Ian Lance Taylor <ian@cygnus.com>
4409
4410 * coff-sh.c: Add a bunch of new code and static const arrays to
4411 support aligning loads and stores on four byte memory boundaries.
4412 Also:
4413 (sh_coff_howtos): Add entries for R_SH_CODE, R_SH_DATA and
4414 R_SH_LABEL.
4415 (sh_relax_section): Look for R_SH_CODE relocs. If we find one,
4416 call sh_align_loads.
4417 (sh_relax_delete_bytes): Don't mark R_SH_CODE or R_SH_DATA relocs
4418 as unused.
4419
c403d358
ILT
4420Thu May 16 16:34:13 1996 Ian Lance Taylor <ian@cygnus.com>
4421
4422 * cache.c (bfd_open_file): Unlink the file before opening it for
4423 write. From Marty Leisner <leisner@sdsp.mc.xerox.com>.
4424
4425 * opncls.c (bfd_fdopenr): Set opened_once.
4426
2f710e17
ILT
4427Tue May 14 12:35:32 1996 Ian Lance Taylor <ian@cygnus.com>
4428
ff60fc3a
ILT
4429 * som.c (som_slurp_reloc_table): Clear external_relocs cache after
4430 freeing it.
4431
2f710e17
ILT
4432 * libbfd.c: Remove #ifdef FILE_OFFSET_IS_CHAR_INDEX, and compile
4433 the code unconditionally.
4434
efb33f6b
ILT
4435Mon May 13 19:51:37 1996 Ian Lance Taylor <ian@cygnus.com>
4436
4437 * libcoff-in.h (struct pei_section_tdata): Define structure.
4438 (pei_section_data): Define macro.
4439 * libcoff.h: Rebuild.
4440 * coffcode.h (coff_set_alignment_hook): If COFF_IMAGE_WITH_PE,
4441 store s_paddr field in pei_section_data.
4442 (coff_compute_section_file_positions): Use pei_section_data rather
4443 than _cooked_size, and don't overwrite an existing value.
4444 (coff_write_object_contents): If COFF_OBJ_WITH_PE, set s_paddr to
4445 0. If COFF_IMAGE_WITH_PE, set s_paddr to pei_section_data.
4446 * peicode.h (coff_bfd_copy_private_section_data): Define if
4447 COFF_IMAGE_WITH_PE.
4448 (pe_bfd_copy_private_section_data): New static function if
4449 COFF_IMAGE_WITH_PE.
4450
5ecd6d7f
ILT
4451Wed May 8 16:10:38 1996 Ian Lance Taylor <ian@cygnus.com>
4452
db1e2aa7
ILT
4453 * srec.c (srec_set_arch_mach): Write as a function rather than a
4454 macro definition.
4455
5ecd6d7f
ILT
4456 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): If an archive has
4457 no map, just check each member in turn to see whether it is
4458 required.
4459
aefee5c8
MM
4460Wed May 8 09:17:34 1996 Michael Meissner <meissner@tiktok.cygnus.com>
4461
4462 * ppcboot.c (ppcboot_object_p): Check for type 0x41 in partition
4463 table. Call BFD_ASSERT to validate header size, instead of
4464 calling fatal.
4465 (ppcboot_bfd_print_private_bfd_data): Put quotes around partition
4466 name.
4467
0d1fcbbb
MM
4468Tue May 7 16:10:19 1996 Michael Meissner <meissner@tiktok.cygnus.com>
4469
4470 * ppcboot.c: New target for looking at PPCbug boot records.
4471
4472 * config{ure.in,.bfd}: Add support for ppcboot target.
4473 * targets.c: Ditto.
4474 * configure: Regenerate.
cf2cd4cf 4475
f4597f8c
JL
4476Tue May 7 11:15:19 1996 Jeffrey A Law (law@cygnus.com)
4477
4478 * coff-h8300.c (howto_table): Update names to match recent
4479 changes to include/coff/internal.h. Fix minor errors in the
4480 existing relocs. Add R_MOVL1 and R_MOVL2.
4481 (rtype2howto): Similarly.
4482 (h8300_reloc16_estimate): Rewrite to simplify, fix bugs in the
4483 existing relaxing code and peform more relaxing.
4484 (h8300_reloc16_extra_cases): Likewise.
4485
0dc70e1a
JL
4486Mon May 6 18:24:09 1996 Jeffrey A Law (law@cygnus.com)
4487
4488 * reloc16.c (bfd_coff_reloc16_get_value): Handle common
4489 symbols correctly.
4490
d1b8ccb0
PS
4491Sat May 4 05:08:45 1996 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
4492
4493 * elfcode.h (elf_object_p): Reject generic ELF target if
4494 e_machine matches an alternate machine code in a specific backend.
4495
4496 * netbsd-core.c (netbsd_core_vec): Remove initializer for
4497 obsolete align_power_min field.
4498
c9f5444e
JL
4499Fri May 3 13:07:35 1996 Jeffrey A Law (law@cygnus.com)
4500
4501 * coff-h8300.c (reloc_howto_type): Add howto entry for
4502 R_PCRWORD_B.
4503 (rtype2howto): Handle R_PCRWORD_B.
4504 (h8300_reloc16_extra_cases): Handle R_PCRWORD_B.
4505 (h8300_reloc_16_estimate): Likewise. Try to turn a 16bit
4506 pc-relative branch (R_PCRWORD) into an 8bit pc-relative
4507 branch (R_PCWORD_B).
4508
4ad842aa
ILT
4509Fri May 3 10:47:41 1996 Ian Lance Taylor <ian@cygnus.com>
4510
340d654f
ILT
4511 * aoutx.h (translate_from_native_sym_flags): Set the section for
4512 BSF_CONSTRUCTOR symbols.
4513
4ad842aa
ILT
4514 * cofflink.c (_bfd_coff_link_input_bfd): Correct setting of
4515 last_bf_index.
4516
9c7a5748
DE
4517Wed May 1 18:39:32 1996 Doug Evans <dje@canuck.cygnus.com>
4518
4519 * coffcode.h (coff_write_object_contents): In comdat section lookup,
4520 stop looking when section is found.
4521
622c93a3
ILT
4522Wed May 1 14:17:57 1996 Ian Lance Taylor <ian@cygnus.com>
4523
e8f3bb64 4524 * coffcode.h (STRING_SIZE_SIZE): Define.
9aac8e83
ILT
4525 (styp_to_sec_flags): Handle long symbol names when looking for the
4526 section symbol.
e8f3bb64
ILT
4527 (bfd_coff_backend_data): Add _bfd_coff_long_section_names field.
4528 (bfd_coff_long_section_names): Define.
4529 (coff_write_object_contents): Handle long section names.
4530 (bfd_coff_std_swap_table): Initialize new field.
4531 * libcoff.h: Rebuild.
4532 * coffgen.c (make_a_section_from_file): Handle long section
4533 names.
4534 (coff_write_symbols): Handle long section names.
4535 * coff-alpha.c (alpha_ecoff_backend_data): Initialize new field.
4536 * coff-mips.c (mips_ecoff_backend_data): Likewise.
4537 * pe-arm.c (COFF_LONG_SECTION_NAMES): Define.
4538 * pei-arm.c (COFF_LONG_SECTION_NAMES): Define.
4539 * pe-i386.c (COFF_LONG_SECTION_NAMES): Define.
4540 * pei-i386.c (COFF_LONG_SECTION_NAMES): Define.
4541 * pe-ppc.c (COFF_LONG_SECTION_NAMES): Define.
4542 * pei-ppc.c (COFF_LONG_SECTION_NAMES): Define.
4543
622c93a3
ILT
4544 * bout.c (b_out_callback): Set lma of sections.
4545 (b_out_bfd_get_relocated_section_contents): Rename in_abfd
4546 parameter to output_bfd. Used input_bfd instead of output_bfd in
4547 several places.
4548
6b725f83
ILT
4549Tue Apr 30 17:56:39 1996 Ian Lance Taylor <ian@cygnus.com>
4550
b7d1158a
ILT
4551 * aoutx.h (translate_from_native_sym_flags): Don't create
4552 SEC_CONSTRUCTOR sections.
4553 * ecoff.c (ecoff_set_symbol_info): Likewise.
4554
6b725f83
ILT
4555 * elf32-mips.c (mips_elf_copy_private_bfd_data): Copy elf_gp.
4556 From Don Bowman <bowman@waterloo.hp.com>.
4557
e28a1e77
DE
4558Tue Apr 30 17:06:32 1996 Doug Evans <dje@canuck.cygnus.com>
4559
4560 * coff-arm.c (armcoff_little_vec): If COFF_WITH_PE is defined, add
4561 SEC_LINK_ONCE and SEC_LINK_DUPLICATES to section_flags.
4562
abec70b9
ILT
4563Mon Apr 29 13:15:17 1996 Ian Lance Taylor <ian@cygnus.com>
4564
4565 * elf32-mips.c (struct mips_elf_link_hash_entry): Add
4566 mips_32_relocs field.
4567 (mips_elf_link_hash_newfunc): Initialize mips_32_relocs field.
4568 (mips_elf_relocate_section): Copy R_MIPS_REL32 and R_MIPS_32
4569 relocs against a global symbol which is not defined in a regular
4570 file.
4571 (mips_elf_check_relocs): For a R_MIPS_REL32 or R_MIPS_32 reloc
4572 against a global symbol, increment mips_32_relocs.
4573 (mips_elf_adjust_dynamic_symbol): If mips_32_relocs is set, and
4574 the symbol is not defined in a regular file, make room in the
4575 .rel.dyn section.
4576
ecba7a3a
ILT
4577Fri Apr 26 18:00:37 1996 Ian Lance Taylor <ian@cygnus.com>
4578
656c5b6d
ILT
4579 * ecoff.c (ecoff_compute_section_file_positions): Track the real
4580 file position and the virtual file position separately. Set
4581 filepos information bsaed on the real file position.
4582 (_bfd_ecoff_set_section_contents): Handle .lib sections like the
4583 Jan 23 change to coffcode.h.
4584
ecba7a3a
ILT
4585 * som.c (som_slurp_symbol_table): Set the symbol count to the
4586 number of BFD symbols created.
4587
e25a7988
MM
4588Fri Apr 26 12:34:29 1996 Michael Meissner <meissner@tiktok.cygnus.com>
4589
4590 * elf32-ppc.c (ppc_elf_check_relocs): Forward relocations to the
4591 output file if linking shared objects. Loop to check all relocs,
4592 rather than returning false on first error.
4593
5c28a96e
MM
4594Thu Apr 25 13:25:12 1996 Michael Meissner <meissner@tiktok.cygnus.com>
4595
3f7ca26b
MM
4596 * elf32-ppc.c (ppc_elf_create_linker_section): Add PLT case.
4597 (ppc_elf_additional_program_headers): If .interp section, bump #
4598 of program headers by 1.
4599 (ppc_elf_adjust_dynamic_symbol): Flesh out support.
4600 (ppc_elf_size_dynamic_sections): Add support for .plt section.
4601 (ppc_elf_check_relocs): Print out filename in debug code. Enable
4602 PLT support.
4603 (ppc_elf_finish_dynamic_symbol): Add support for PLT's, beef up
4604 debug output.
4605 (ppc_elf_relocate_section): If the output section isn't defined,
4606 don't abort, just give an error message.
4607
5c28a96e
MM
4608 * elflink.c (_bfd_elf_create_dynamic_sections): If the section
4609 being created is .sdata or .sdata2, don't make the symbol dynamic.
4610
f5d65485
ILT
4611Wed Apr 24 14:04:07 1996 Ian Lance Taylor <ian@cygnus.com>
4612
4613 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through the
4614 members of an archive for dynamic objects with no symbols, and
4615 pass them directly to check_archive_element.
4616 (xcoff_link_check_ar_symbols): Pass dynamic objects to
4617 xcoff_link_check_dynamic_ar_symbols.
4618 (xcoff_link_check_dynamic_ar_symbols): New static function.
4619
4620 * coff-rs6000.c (rs6000coff_vec): Change BFD_JUMP_TABLE_DYNAMIC
4621 from _bfd_nodynamic to _bfd_xcoff.
4622 * libcoff-in.h (_bfd_xcoff_get_dynamic_symtab_upper_bound):
4623 Declare.
4624 (_bfd_xcoff_canonicalize_dynamic_symtab): Declare.
4625 (_bfd_xcoff_get_dynamic_reloc_upper_bound): Declare.
4626 (_bfd_xcoff_canonicalize_dynamic_reloc): Declare.
4627 * libcoff.h: Rebuild.
4628 * xcofflink.c (xcoff_swap_ldrel_in): New static function.
4629 (xcoff_get_section_contents): New static function.
4630 (_bfd_xcoff_get_dynamic_symtab_upper_bound): New function.
4631 (_bfd_xcoff_canonicalize_dynamic_symtab): New function.
4632 (_bfd_xcoff_get_dynamic_reloc_upper_bound): New function.
4633 (xcoff_dynamic_reloc): New static variable.
4634 (_bfd_xcoff_canonicalize_dynamic_reloc): New function.
4635 (xcoff_link_add_dynamic_symbols): Use xcoff_get_section_contents.
cf2cd4cf 4636
f5d65485
ILT
4637Tue Apr 23 12:48:42 1996 Ian Lance Taylor <ian@cygnus.com>
4638
4639 * coff-sparc.c (bfd_coff_generic_reloc): Return bfd_reloc_ok even
4640 if reloc_entry->addend is not 0.
4641 (CALC_ADDEND): Just set the addend to reloc.r_offset.
4642
34249b2f
DE
4643Mon Apr 22 18:29:01 1996 Doug Evans <dje@canuck.cygnus.com>
4644
4645 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Fix spelling of
4646 R_SPARC_GLOB_JMP.
4647 * elf64-sparc.c (sparc64_elf_howto_table): Likewise.
4648 Add entries for R_SPARC_[56].
4649 (sparc_reloc_map): Add entries for R_SPARC_[56].
4650
af50cd91
ILT
4651Mon Apr 22 15:07:24 1996 Ian Lance Taylor <ian@cygnus.com>
4652
1726b8f0
ILT
4653 Optimize linking of stabs in sections as used in ELF and COFF.
4654 * stabs.c: New file.
4655 * libbfd-in.h (_bfd_link_section_stabs): Declare.
4656 (_bfd_write_section_stabs): Declare.
4657 (_bfd_write_stab_strings): Declare.
4658 * libbfd.h: Rebuild.
4659 * libcoff-in.h (struct coff_section_tdata): Add stab_info field.
4660 (struct coff_link_hash_table): Add stab_info field.
4661 * libcoff.h: Rebuild.
4662 * cofflink.c (_bfd_coff_link_hash_table_init): Initialize
4663 stab_info field.
4664 (coff_link_add_symbols): Call _bfd_link_section_stabs if
4665 appropriate.
4666 (_bfd_coff_final_link): Write out stab strings hash table.
4667 (_bfd_coff_link_input_bfd): Handle optimized stabs sections.
4668 * coff-ppc.c (ppc_bfd_coff_final_link): Write out stab strings
4669 hash table.
4670 * elf-bfd.h (struct elf_link_hash_table): Add stab_info field.
4671 (struct bfd_elf_section_data): Add stab_info field.
4672 * elf.c (_bfd_elf_link_hash_table_init): Initialize stab_info
4673 field.
4674 * elflink.h (elf_link_add_object_symbols): If appropriate, call
4675 _bfd_link_section_stabs.
4676 (elf_bfd_final_link): Write out stab strings hash table.
4677 (elf_link_input_bfd): Handle optimized stabs sections.
4678 * reloc.c (_bfd_final_link_relocate): Check address against
4679 _raw_size rather than _cooked_size.
4680 * Makefile.in: Rebuild dependencies.
4681 (BFD_LIBS): Add stabs.o
4682 (BFD_LIBS_CFILES): Add stabs.c.
4683
4684 * VERSION: Increment for bfdlink.h change.
4685
af50cd91
ILT
4686 * coffgen.c (coff_renumber_symbols): Correct handling of
4687 BSF_NOT_AT_END common symbols.
4688
f9fa5df3
ILT
4689Fri Apr 19 19:21:56 1996 Ian Lance Taylor <ian@cygnus.com>
4690
4691 * coff-ppc.c (record_toc): Add cast to avoid warning.
4692 (ppc_allocate_toc_section): Likewise.
4693 (coff_ppc_relocate_section): Remove ANSI C string concatenation.
4694 (ppc_coff_reloc_type_lookup): Remove unreached code.
4695 * coffcode.h (coff_write_object_contents): Don't take the address
4696 of an array.
4697 * peicode.h (pe_print_idata): Add casts to avoid warning.
4698 (pe_print_edata): Likewise.
4699 (pe_print_reloc): Remove ANSI C string concatenation.
4700
d6e0e2f7
ILT
4701Thu Apr 18 18:51:18 1996 Ian Lance Taylor <ian@cygnus.com>
4702
4703 * libcoff-in.h (struct coff_final_link_info): Add last_bf_index
4704 and last_bf fields.
4705 * libcoff.h: Rebuild.
4706 * coffswap.h (coff_swap_aux_in): Swap endndx field for C_FCN
4707 symbols.
4708 (coff_swap_aux_out): Likewise.
4709 * peicode.h (coff_swap_aux_in): Likewise.
4710 (coff_swap_aux_out): Likewise.
4711 * coffgen.c (coff_pointerize_aux): Check endndx field for C_FCN
4712 symbols.
4713 * cofflink.c (_bfd_coff_final_link): Initialize last_bf_index
4714 field.
4715 (_bfd_coff_link_input_bfd): Check endndx field for C_FCN symbols.
4716 Fix up .bf endndx link fields.
4717 * coff-ppc.c (ppc_bfd_coff_final_link): Initialize last_bf_index
4718 field.
4719 * xcofflink.c (xcoff_link_input_bfd): Check endndx field for C_FCN
4720 symbols.
4721
221d1e19
MM
4722Wed Apr 17 12:08:24 1996 Michael Meissner <meissner@tiktok.cygnus.com>
4723
4724 * pe{,i}-ppc.c (PPC_PE): Define instead of PPC, so that compiling
4725 on Solaris PowerPC systems doesn't get confused.
4726
4727 * ccffcode.h (coff_write_object_contents): Use #ifdef PPC_PE, not
4728 #ifdef PPC.
4729
4730 * elfcore.h (bfd_prstatus, bfd_fpregset): Add thread argument.
4731 (elf_corefile_note): If HAVE_SYS_PROCFS_H is not defined, don't
4732 update did_reg and did_reg2.
4733
8f9a56c6
ILT
4734Wed Apr 17 13:07:37 1996 Ian Lance Taylor <ian@cygnus.com>
4735
f97fca78
ILT
4736 * xcofflink.c (xcoff_link_input_bfd): Check for TOC overflow.
4737
8f9a56c6
ILT
4738 * linker.c (_bfd_generic_link_add_one_symbol): When calling the
4739 callback routines, pass h->root.string rather than name, in case
4740 copy is true and name is transient.
4741
603fdf16
SG
4742Tue Apr 16 16:36:38 1996 Stu Grossman (grossman@lisa.cygnus.com)
4743
4744 * elfcore.h: Add support for core files with multiple threads.
4745 (Primarily for Solaris.)
4746
a2d914e1
ILT
4747Tue Apr 16 13:44:08 1996 Ian Lance Taylor <ian@cygnus.com>
4748
cdf23557
ILT
4749 * aoutx.h (NAME(aout,squirt_out_relocs)): Don't do anything if
4750 section->orelocation is NULL.
4751
a2d914e1
ILT
4752 * coffgen.c (bfd_coff_get_syment): New function.
4753 (bfd_coff_get_auxent): New function.
4754 * bfd-in.h (bfd_coff_get_syment): Declare.
4755 (bfd_coff_get_auxent): Declare.
4756 * bfd-in2.h: Rebuild.
4757
5cf36a32
ILT
4758Mon Apr 15 19:06:59 1996 Ian Lance Taylor <ian@cygnus.com>
4759
4760 * elf32-mips.c (struct mips_hi16): Define.
4761 (mips_hi16_addr, mips_hi16_addend): Remove.
4762 (mips_hi16_list): New static variable.
4763 (mips_elf_hi16_reloc): Maintain a list of unmatched HI16 relocs.
4764 (mips_elf_lo16_reloc): Process mips_hi16_list.
4765 (mips_elf_relocate_section): Permit an arbitrary number of HI16
4766 relocs before the associated LO16 reloc.
4767
b7fce5be
ILT
4768Wed Apr 10 00:23:53 1996 Ian Lance Taylor <ian@cygnus.com>
4769
176512da
ILT
4770 * versados.c (versados_scan): Check bfd_alloc return value.
4771 (versados_object_p): Check all bfd_read return values. Require
4772 that lang field be less than 10, to avoid confusion with Intel Hex
4773 files.
4774
18de3f19
ILT
4775 * libaout.h (WRITE_HEADERS): Write out the relocs even if there
4776 aren't any symbols.
4777 * aoutx.h (NAME(aout,swap_std_reloc_out)): Set r_index to N_ABS,
4778 not 0, for an absolute symbol.
4779 (NAME(aout,swap_ext_reloc_out)): Likewise.
4780
66ab4152
ILT
4781 * ihex.c (ihex_scan): Accept a length of 4 for record type 5.
4782 (ihex_write_object_contents): For a large start address, output
4783 the full 32 bit address in record type 5.
4784
b7fce5be
ILT
4785 * ieee.c (ieee_write_byte): Change second parameter from bfd_byte
4786 to int to avoid promotion problems in prototype.
4787
f1b45745
ILT
4788Tue Apr 9 11:44:21 1996 Ian Lance Taylor <ian@cygnus.com>
4789
f400f358
ILT
4790 * configure.host: Use ${srcdir} when looking for picfrag.
4791
3d9a5986
ILT
4792 * configure.host: Switch on ${libdir}, not $(libdir). From
4793 alan@spri.levels.unisa.edu.au (Alan Modra).
4794
f1b45745
ILT
4795 * aoutx.h (aout_link_add_symbols): Always call add_dynamic_symbols
4796 entry point, not just for DYNAMIC objects.
4797 * sunos.c (sunos_add_dynamic_symbols): Always call
4798 sunos_create_dynamic_sections. If called with a non DYNAMIC
4799 object, don't do anything else.
4800 (sunos_add_one_symbol): Don't call sunos_create_dynamic_sections.
4801
6f21f2e3
ILT
4802Mon Apr 8 12:09:36 1996 Ian Lance Taylor <ian@cygnus.com>
4803
639b5a09
ILT
4804 * configure.in: Permit --enable-shared to specify a list of
4805 directories.
4806 * configure: Rebuild.
4807
6f21f2e3
ILT
4808 * configure.host: Set HLDFLAGS and SHLIB_CFLAGS for *-dec-osf*
4809 host when configuring with --enable-shard.
4810
3f5f565b
ILT
4811Fri Apr 5 12:24:13 1996 Ian Lance Taylor <ian@cygnus.com>
4812
1ac75f5c
ILT
4813 * config.bfd: Add i[345]86-*-freebsdelf* target; from John Polstra
4814 <jdp@polstra.com>.
4815
1a9951a9
ILT
4816 * linker.c (link_action): For WARN_ROW/warn, use MWARN, not CYCLE,
4817 to avoid crashing in bfd_hash_replace.
4818
f1ac3acb 4819 * sysdep.h: Use #ifdef, not #if.
3f5f565b 4820
eb5f58e0
ILT
4821Thu Apr 4 23:32:23 1996 Ian Lance Taylor <ian@cygnus.com>
4822
4823 * config.in: Rebuild.
4824
ab1aa5cd
FF
4825Thu Apr 4 18:49:09 1996 Fred Fish <fnf@cygnus.com>
4826
4827 * configure.in (mips-sony-bsd*): Fix typo in AC_DEFINE.
4828 (AC_CHECK_HEADERS): Check for sys/time.h
4829 (AC_HEADER_TIME): Add macro.
4830 * configure: Rebuild.
4831 * sysdep.h: Use TIME_WITH_SYS_TIME and HAVE_SYS_TIME_H
4832 to control what combination of <time> and <sys/time.h>
4833 get included.
cf2cd4cf 4834
d1f74cd2
DE
4835Tue Apr 2 13:11:53 1996 Doug Evans <dje@canuck.cygnus.com>
4836
4837 * aoutf1.h (sunos_32_set_arch_mach): Handle M_SPARCLET.
4838 (aout_32_sunos4_write_object_contents): Likewise.
4839 * aoutx.h (NAME(aout,machine_type)): Handle
4840 bfd_mach_sparc_{sparclet,sparclite}.
4841 * archures.c (bfd_mach_sparc_{sparclet,sparclite}): Define.
4842 (bfd_mach_sparc_v9_p): Update.
4843 * cpu-sparc.c (arch_info_struct): Add entries for sparclet,sparclite.
4844 * libaout.h (enum machine_type): Add M_SPARCLET.
4845 * sunos.c (MACHTYPE_OK): Define.
4846 * bfd-in2.h: Regenerated.
4847
1dad72bd
ILT
4848Tue Apr 2 00:33:18 1996 Ian Lance Taylor <ian@cygnus.com>
4849
19bfbcbe
ILT
4850 * elf-bfd.h (struct elf_link_hash_table): Add hgot field.
4851 * elf.c (_bfd_elf_link_hash_table_init): Initialize hgot field.
4852 * elflink.c (_bfd_elf_create_got_section): Store the
4853 _GLOBAL_OFFSET_TABLE_ hash table entry in the hgot field.
4854 * elf32-sparc.c (elf32_sparc_check_relocs): If the size of the
4855 global offset table goes over 0x1000, set the value of
4856 _GLOBAL_OFFSET_TABLE_ to 0x1000 into the section.
4857 (elf32_sparc_relocate_section): Subtract the offset of
4858 _GLOBAL_OFFSET_TABLE_ when handling GOT relocations.
4859
1dad72bd
ILT
4860 * elfcode.h: Don't include <string.h>.
4861
ca4e2190
JL
4862Mon Apr 1 10:39:24 1996 Jeffrey A Law (law@cygnus.com)
4863
4864 * linker.c (_bfd_generic_link_hash_newfunc): Renamed from
4865 generic_link_hash_newfunc. All references changed.
4866 * genlink.h (_bfd_generic_link_hash_newfunc): Declaration
4867 moved here from libbfd-in.h.
4868 * libbfd-in.h: Corresponding changes.
4869 * libbfd.h: Regenerated.
4870
ce6a7731
ILT
4871Mon Apr 1 12:35:36 1996 Ian Lance Taylor <ian@cygnus.com>
4872
aad53b0d
ILT
4873 * aoutx.h (aout_link_input_section_std): When reporting an
4874 overflow error, use the name of the symbol in the hash table if
4875 available.
4876 (aout_link_input_section_ext): Likewise.
4877
ce6a7731
ILT
4878 * elflink.h (elf_adjust_dynamic_symbol): If a common symbol got
4879 defined in a regular file, set ELF_LINK_HASH_DEF_REGULAR.
4880
323b430f
SC
4881Sun Mar 31 01:58:41 1996 steve chamberlain <sac@slash.cygnus.com>
4882
4883 * peicode.h (coff_swap_aouthdr_out): Delete test for .junk.
4884 * coffcode.h (coff_compute_section_file_positions): Likewise.
4885 (coff_write_object_contents): Likewise.
cf2cd4cf 4886
7fc1cd16
ILT
4887Fri Mar 29 12:44:36 1996 Ian Lance Taylor <ian@cygnus.com>
4888
5a28331f
ILT
4889 * section.c (SEC_LINK_ONCE): Define.
4890 (SEC_LINK_DUPLICATES): Define.
4891 (SEC_LINK_DUPLICATES_DISCARD): Define.
4892 (SEC_LINK_DUPLICATES_ONE_ONLY): Define.
4893 (SEC_LINK_DUPLICATES_SAME_SIZE): Define.
4894 (SEC_LINK_DUPLICATES_SAME_CONTENTS): Define.
4895 * bfd-in2.h: Rebuild.
4896 * coffcode.h (sec_to_styp_flags): If COFF_WITH_PE, turn
4897 SEC_LINK_ONCE into IMAGE_SCN_LNK_COMDAT.
4898 (styp_to_sec_flags): If COFF_WITH_PE, turn IMAGE_SCN_LNK_REMOVE
4899 into SEC_EXCLUDE. If IMAGE_SCN_LNK_COMDAT is set, set
4900 SEC_LINK_ONCE, and look through the symbol table for the setting
4901 for SEC_LINK_DUPLICATES.
4902 (coff_write_object_contents): If COFF_WITH_PE, if SEC_LINK_ONCE is
4903 set for a section, find the section symbol in the symbol table,
4904 and set the aux entry based on SEC_LINK_DUPLICATES.
4905 * coffgen.c (coff_print_symbol): Add a space before "checksum".
4906 * coff-arm.c (armcoff_big_vec): If COFF_WITH_PE is defined, add
4907 SEC_LINK_ONCE and SEC_LINK_DUPLICATES to section_flags.
4908 * coff-i386.c (i386coff_vec): Likewise.
4909 * coff-ppc.c (TARGET_LITTLE_SYM, TARGET_BIG_SYM): Likewise.
4910
7fc1cd16
ILT
4911 * VERSION: Bump to 2.6.1.
4912 * Makefile.in (stamp-h): Depend upon VERSION.
4913
9399a257
JL
4914Thu Mar 28 23:48:49 1996 Jeffrey A Law (law@cygnus.com)
4915
4916 * libbfd-in.h (generic_link_hash_newfunc): Add declaration.
4917 * libbfd.h: Rebuilt.
4918 * linker.c (generic_link_hash_newfunc): No longer static.
4919 * coffcode.h (coff_bfd_link_hash_create): Allow specific targets
4920 to override.
4921 * coff-h8300.c: Add two derived hash tables and their associated
4922 funtions and #defines for use by the h8300 linker.
4923 (h8300_reloc16_extra_cases, case R_MEM_INDIRECT): Create entries in
4924 the function vector as needed. Place the address of the function
4925 vector entry in the location specified by the R_MEM_INDIRECT reloc.
4926 Rewrite the vectors section contents as necessary.
cf2cd4cf 4927 (h8300_bfd_link_add_symbols): New function for the h8300 linker.
9399a257
JL
4928 (coff_bfd_link_add_symbols): Define to use h8300 specific version.
4929 (coff_bfd_link_hash_table_create): Likewise.
4930
506f2bb4
ILT
4931Thu Mar 28 17:44:08 1996 Ian Lance Taylor <ian@cygnus.com>
4932
4933 * libhppa.h: If gcc 2.7 or higher, declare all the functions with
4934 __attribute__ ((__unused__)) so that -Wall doesn't warn about
4935 them.
4936 (hppa_rebuild_insn): Pass pointer to correct type to
4937 low_sign_unext and dis_assemble_21.
4938
05a84ae1
DE
4939Thu Mar 28 11:00:36 1996 Doug Evans <dje@canuck.cygnus.com>
4940
4941 * config.bfd (sparc64-{sysv4*,solaris2*}): Delete.
4942 Stick with sparc-*-{sysv4*,solaris2*}.
4943
919cf4b5
ILT
4944Wed Mar 27 10:43:34 1996 Ian Lance Taylor <ian@cygnus.com>
4945
8230f31c
ILT
4946 * peicode.h (coff_swap_aux_in): Swap in extra PE x_scn fields.
4947 (coff_swap_aux_out): Swap out extra PE x_scn fields.
4948 * coffswap.h (coff_swap_aux_in): Zero out extra PE x_scn fields.
4949 * coffgen.c (coff_print_symbol): If any of the extra PE x_scn
4950 fields is non-zero, print them.
4951
9addd1d4
ILT
4952 * coff-ppc.c (ppc_record_toc_entry): Put inside COFF_IMAGE_WITH_PE
4953 ifdef. Remove unused variables.
4954 (ppc_record_data_in_toc_entry): Ifdef out. Removed unused
4955 variables.
4956 (ppc_mark_symbol_as_glue): Put inside COFF_IMAGE_WITH_PE ifdef.
4957 (get_symbol_value): Ifdef out.
4958 (pe_ppc_reloc): Ifdef out. Remove unused variables.
4959 (coff_ppc_relocate_section): Remove unused variables. Make
4960 fprintf strings and argument types correspond. Put before_addr in
4961 DEBUG_RELOC ifdef.
ff0e4a93
ILT
4962 (dump_toc): Make fprintf strings and argument types correspond.
4963 (ppc_process_before_allocation): Remove unused variables. Always
4964 return a value.
9addd1d4
ILT
4965 (ppc_reflo_reloc): Ifdef out.
4966 (ppc_addr32nb_reloc): Ifdef out.
4967 (ppc_coff_rtype2howto): Make fprintf strings and argument types
4968 correspond.
4969 (coff_ppc_rtype_to_howto): Likewise.
4970 (ppc_coff_swap_sym_in_hook): Remove unused variables.
4971
4972 * peicode.h (pe_print_idata): Move otherwise unused variables into
4973 the #ifdef where they are used. Always return a value.
ff0e4a93
ILT
4974 (pe_print_edata): Make fprintf strings and argument types
4975 correspond. Always return a value.
9addd1d4
ILT
4976 (pe_print_pdata): Removed unused variable addr_value. Always
4977 return a value.
4978 (pe_print_reloc): Remove unused variable onaline. Make fprintf
ff0e4a93 4979 strings and argument types correspond. Always return a value.
9addd1d4
ILT
4980
4981 * elf32-ppc.c (ppc_elf_fake_sections): Return true.
4982 (ppc_elf_finish_dynamic_symbol): Move definition of unused
4983 variable rela inside #if 0 section where it is used.
4984
c877bdf1
ILT
4985 * ns32k.h: New file.
4986 * cpu-ns32k.h: Include ns32k.h. Rename externally visible
4987 functions to start with _bfd_.
4988 * aout-ns32k.c: Include ns32k.h. Change references to renamed
4989 functions in cpu-ns32k.h.
4990 * Makefile.in: Rebuild dependencies.
4991 (HFILES): Add ns32k.h.
4992
ff0e4a93
ILT
4993 * section.c (struct sec): Add linker_mark field. Change
4994 user_set_vma and reloc_done to be single bit fields.
4995 (STD_SECTION): Update accordingly.
7ec49f91
ILT
4996 * bfd-in2.h: Rebuild.
4997 * aoutx.h (NAME(aout,final_link)): Mark sections included in the
4998 link.
4999 (aout_link_input_bfd): Don't link unmarked sections.
5000 * cofflink.c (_bfd_coff_final_link): Mark sections included in the
5001 link.
5002 (_bfd_coff_link_input_bfd): Don't link unmarked sections.
5003 * coff-ppc.c (ppc_bfd_coff_final_link): Mark sections included in
5004 the link.
5005 * elflink.h (elf_bfd_final_link): Mark sections included in the
5006 link.
5007 (elf_link_input_bfd): Don't link unmarked sections.
5008 * xcofflink.c (_bfd_xcoff_bfd_final_link): Mark sections included
5009 in the link.
5010 (xcoff_link_input_bfd): Don't link unmarked sections.
5011
919cf4b5
ILT
5012 * coffswap.h (coff_swap_scnhdr_out): Include section name in
5013 overflow error messages.
5014
986cf3b8
ILT
5015Tue Mar 26 15:46:18 1996 Ian Lance Taylor <ian@cygnus.com>
5016
fd681dcd
ILT
5017 * bfd.c (_bfd_default_error_handler): If _bfd_error_program_name
5018 is not set, print "BFD: " before the error message.
5019
986cf3b8
ILT
5020 * configure.in: Use AC_CHECK_TOOL to find ar and ranlib. From
5021 Miles Bader <miles@gnu.ai.mit.edu>.
5022 * configure: Rebuild.
5023
3998d526
ILT
5024Fri Mar 22 12:17:00 1996 Ian Lance Taylor <ian@cygnus.com>
5025
c3dffbd7
ILT
5026 * xcofflink.c (xcoff_link_input_bfd): Fix scan for C_BINCL/C_EINCL
5027 symbols.
5028
3998d526
ILT
5029 * config.bfd: Add ieee_vec to targ_selvecs for i960 targets and
5030 m68k-aout, m68k-coff, and m68k-elf targets.
5031
e4d27380
ILT
5032Fri Mar 22 11:33:44 1996 Martin Anantharaman <martin@goofy.imech.uni-duisburg.de>
5033
5034 * ieee.c: Changed #ifdef KEEPMINUSPCININST to #if KEEPMINUSPCININST.
5035 (ieee_generic_stat_arch_elt): Restructured to prevent
5036 ieee_object_p from being called repeatedly.
5037
51776a11
SC
5038Thu Mar 21 11:00:47 1996 steve chamberlain <sac@slash.cygnus.com>
5039
5040 * coffcode.h (coff_write_object_contents): Allocate
5041 buffers large enough for any FILEHDR or AOUTHDR.
5042
5043Thu Mar 21 16:28:17 1996 David Mosberger-Tang <davidm@azstarnet.com>
5044
5045 * ecofflink.c (lookup_line): New static function, renamed and
5046 slighly changed from old _bfd_ecoff_locate_line.
5047 (_bfd_ecoff_locate_line): Cache line number information. Use
5048 lookup_line for actual lookup.
5049
9e4ebb1b
MM
5050Thu Mar 21 14:59:11 1996 Michael Meissner <meissner@tiktok.cygnus.com>
5051
5052 * peicode.h (pe_print_pdata): Warn if the .pdata section is not a
5053 multiple of 20 bytes.
5054
9e7427a4
ILT
5055Thu Mar 21 13:54:40 1996 Ian Lance Taylor <ian@cygnus.com>
5056
51776a11
SC
5057 * ecoff.c (_bfd_ecoff_find_nearest_line): Use bfd_zalloc to
5058 allocate ecoff_find_line, and don't initialize by hand.
5059 * elf32-mips.c (mips_elf_find_nearest_line): Use bfd_zalloc for
5060 mips_elf_find_line, and don't call memset.
5061
9e7427a4
ILT
5062 * coffcode.h (coff_compute_section_file_positions): If not
5063 producing a final executable, don't consider sofar when aligning
5064 the section to the correct size.
5065
5066Wed Mar 20 16:53:12 1996 Ian Lance Taylor <ian@cygnus.com>
5067
5068 * coffcode.h (coff_add_missing_symbols): Ifdef out.
5069 (coff_write_object_contents): Don't call coff_add_missing_symbols.
5070 * coffgen.c (coff_section_symbol): Ifdef out.
5071
e7f9ba4f
ILT
5072Mon Mar 18 12:54:41 1996 Ian Lance Taylor <ian@cygnus.com>
5073
5074 * elf32-mips.c (mips_elf_gprel32_reloc): Initialize gp if
5075 output_bfd is not NULL.
5076
34c4d647
DE
5077Thu Mar 14 17:12:06 1996 Doug Evans <dje@charmed.cygnus.com>
5078
5079 * coffgen.c (coff_get_normalized_symtab): Call bfd_zalloc instead
5080 of bfd_alloc (fixes fix_line not being initialized).
5081 Delete zeroing of fix_{value,tag,end,scnlen} fields.
5082
4e054247
JL
5083Thu Mar 14 16:06:06 1996 Jeffrey A Law (law@cygnus.com)
5084
57289b5c
JL
5085 * coffcode.h: Allow specific backends to override the
5086 bfd_link_add_symbols routine.
5087
4e054247
JL
5088 * coff-h8300.c: Include genlink.h.
5089 (howto_table): Add R_MEM_INDIRECT.
5090 (rtype2howto): Support R_MEM_INDIRECT.
5091 (h8300_reloc16_extra_cases): Handle R_MEM_INDIRECT like R_RELBYTE
5092 for now.
cf2cd4cf 5093
a10d3dec
ILT
5094Tue Mar 12 12:41:17 1996 David Mosberger-Tang <davidm@koala.azstarnet.com>
5095
5096 * coff-alpha.c (alpha_relocate_section): Use
5097 info->callbacks_warning, rather than _bfd_error_handler, for
5098 "multiple gp" warning.
5099
ea2488ad
ILT
5100Tue Mar 12 12:10:55 1996 Ian Lance Taylor <ian@cygnus.com>
5101
8881b321
ILT
5102 * linker.c (bfd_wrapped_link_hash_lookup): New function.
5103 (_bfd_generic_link_add_one_symbol): Remove BFD_ASSERT on hash
5104 table string. Use bfd_wrapped_link_hash_lookup.
5105 (_bfd_generic_link_write_global_symbol): Remove BFD_ASSERT on hash
5106 table string.
5107 * aoutx.h (aout_link_write_symbols): Use the name from the hash
5108 table, if any, when writing out symbols.
5109 (aout_link_input_section_std): Use the name from the hash table,
5110 if any, when reporting undefined symbols.
5111 (aout_link_input_section_ext): Likewise.
5112 (aout_link_reloc_link_order): Use bfd_wrapped_link_hash_lookup.
5113 * bout.c (get_value): Likewise.
5114 * cofflink.c (_bfd_coff_reloc_link_order): Likewise.
5115 * ecoff.c (ecoff_reloc_link_order): Likewise.
5116 * elflink.h (elf_link_add_object_symbols): Likewise.
cf2cd4cf 5117 (elf_reloc_link_order): Likewise.
8881b321
ILT
5118 * linker.c (_bfd_generic_link_output_symbols): Likewise.
5119 (_bfd_generic_reloc_link_order): Likewise.
5120 (default_indirect_link_order): Likewise.
5121 * reloc16.c (bfd_coff_reloc16_get_value): Likewise.
5122 * sunos.c (sunos_add_one_symbol): Likewise.
5123 * xcofflink.c (xcoff_link_add_symbols): Likewise.
5124 (bfd_xcoff_link_count_reloc): Likewise.
5125 (xcoff_reloc_link_order): Likewise.
5126
5127 * ecoffswap.h (ecoff_swap_fdr_in): If ECOFF_64, turn 0xffffffff
5128 into -1 for intern->rss.
5129
ea2488ad
ILT
5130 * configure: Rebuild with autoconf 2.8.
5131
c189fdfb
ILT
5132Mon Mar 11 12:28:31 1996 Ian Lance Taylor <ian@cygnus.com>
5133
5134 * stab-syms.c (__define_stab_duplicate): Define.
5135 (bfd_get_stab_name): Rename from aout_stab_name. Rewrite to use a
5136 switch.
5137 * bfd-in.h (bfd_get_stab_name): Declare.
5138 * bfd-in2.h: Rebuild.
5139 * Makefile.in: Rebuild dependencies.
5140 (BFD_LIBS): Add stab-syms.o.
5141 (BFD_LIBS_CFILES): Add stab-syms.c.
5142 (BFD32_BACKENDS): Remove stab-syms.o.
5143 (BFD32_BACKENDS_CFILES): Remove stab-syms.c.
5144 * configure.in: Don't list stab-syms.o in bfd_backends.
5145 * configure: Rebuild.
5146 * libaout.h (aout_stab_name): Don't declare.
5147 * aoutx.h (NAME(aout,get_symbol_info)): Call bfd_get_stab_name,
5148 not aout_stab_name.
5149
5150Fri Mar 8 11:26:20 1996 Ian Lance Taylor <ian@cygnus.com>
5151
5152 * elf.c (assign_file_positions_for_segments): Adjust file offset
5153 for section alignment even if SEC_LOAD is not set.
5154
c5bde1ef
ILT
5155Tue Mar 5 12:02:23 1996 Ian Lance Taylor <ian@cygnus.com>
5156
8f218e05
ILT
5157 * configure.in: Don't set SHLIB or SHLINK to an empty string,
5158 since they appear as targets in Makefile.in.
5159 * configure: Rebuild.
5160
c5bde1ef
ILT
5161 * sunos.c (sunos_scan_ext_relocs): If not making a shared library,
5162 don't fiddle with a symbol which is not defined anywhere.
5163
cb84f028
ILT
5164Mon Mar 4 12:49:16 1996 Ian Lance Taylor <ian@cygnus.com>
5165
4e59f523
ILT
5166 * xcofflink.c (xcoff_mark): Treat undefined imported symbols as
5167 though they are defined in a shared library.
5168 (xcoff_build_ldsyms): Likewise.
5169
ea2504d5
ILT
5170 * coffgen.c (coff_find_nearest_line): Don't look at the line
5171 numbers for the section if section->lineno is NULL.
5172
cb84f028
ILT
5173 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Print a useful error
5174 message rather than calling BFD_ASSERT.
5175 * elfcode.h (write_relocs): Check return value of
5176 _bfd_elf_symbol_from_bfd_symbol.
5177
6e036cf7
MM
5178Fri Mar 1 09:42:59 1996 Michael Meissner <meissner@tiktok.cygnus.com>
5179
5180 * elf32-ppc.c (ppc_elf_add_symbol_hook): Don't set SEC_LOAD flag
5181 for .sbss section.
5182
d08435de
JL
5183Wed Feb 28 11:25:47 1996 Jeffrey A Law (law@cygnus.com)
5184
5185 * libhppa.h (hppa_reloc_field_selector_type): Add R_HPPA_NLSEL
5186 and R_HPPA_NLRSEL.
5187 (e_nsel, e_nlsel, e_nlrsel): Undefine. Add to
5188 hppa_reloc_field_selector_type_alt.
5189 (hppa_field_adjust): Handle e_nlsel, e_nlrsel. Fix e_nsel handling.
5190 * som.c (hppa_som_gen_reloc_type): Handle N', NL' NLR' field
5191 selectors.
5192 (som_write_fixups): Finish handling of R_N0SEL and R_N1SEL.
5193
09609415
ILT
5194Wed Feb 28 11:00:24 1996 Ian Lance Taylor <ian@cygnus.com>
5195
5196 * elf.c (assign_file_positions_for_segments): Adjust the segment
5197 memory size for the alignment of a SEC_ALLOC section, not just a
5198 SEC_LOAD section.
5199
55626bf0
ILT
5200Tue Feb 27 14:17:31 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
5201
5202 * m68klinux.c: New file.
5203 * hosts/m68klinux.h: New file.
5204 * config.bfd (m68*-*-linuxaout*, m68*-*-linux*): New targets.
5205 * configure.in (m68*-*-linux*): New native host.
5206 (m68klinux_vec): New vector.
5207 * configure: Rebuild.
5208 * targets.c (m68klinux_vec): Declare.
5209 * i386linux.c (bfd_i386linux_size_dynamic_sections): Renamed from
5210 bfd_linux_size_dynmic_sections to avoid clash with m68klinux.c.
5211 * bfd-in.h (bfd_i386linux_size_dynamic_sections): Rename
5212 declaration from bfd_linux_size_dynamic_sections.
5213 (bfd_m68klinux_size_dynamic_sections): Declare.
5214 * bfd-in2.h: Rebuild.
5215 * Makefile.in: Rebuild dependencies.
5216 (BFD32_BACKENDS): Add m68klinux.o.
5217 (BFD32_BACKENDS_CFILES): Add m68klinux.c.
5218
6c7b3090
JL
5219Tue Feb 27 11:31:34 1996 Jeffrey A Law (law@cygnus.com)
5220
5221 * libhppa.h (pa_arch): Add pa20.
5222 (hppa_reloc_field_selector_type): Add R_HPPA_NSEL.
5223 (e_nsel): Undefine. Add to hppa_reloc_field_selector_type_alt.
5224 (hppa_field_adjust): Handle e_nsel.
5225 * som.c: Provide default definitions for many new relocs found only
5226 in hpux10 include files.
5227 (som_fixup_formats): Add several new relocs from hpux10.
5228 (som_hppa_howto_table): Add hpux10 relocs.
5229 (som_write_fixups): Handle R_N0SEL and R_N1SEL hpux10 relocs.
5230
14fd4616
SS
5231Mon Feb 26 12:52:48 1996 Stan Shebs <shebs@andros.cygnus.com>
5232
5233 * mpw-make.sed: Edit out recent shared library support, and
5234 rules to rebuild .h files using doc/chew.
5235
3d9f042c
ILT
5236Mon Feb 26 14:48:39 1996 David Mosberger-Tang <davidm@AZStarNet.com>
5237
5238 * ecoff.c (ecoff_compute_section_file_positions): Adjust the file
5239 size even of sections with no contents.
5240
bdec6228
ILT
5241Mon Feb 26 14:01:13 1996 Ian Lance Taylor <ian@cygnus.com>
5242
88358469
ILT
5243 * cofflink.c (_bfd_coff_link_input_bfd): When merging, skip names
5244 starting with '$' the way we skip names starting with '.'. When
5245 updating x_endndx, don't be fooled by an index which has been
5246 merged.
5247
bdec6228
ILT
5248 * cofflink.c (_bfd_coff_link_input_bfd): Don't try to optimize a
5249 struct/union/enum type with no elements.
5250
053ae1d7
ILT
5251Sat Feb 24 11:38:58 1996 Ian Lance Taylor <ian@cygnus.com>
5252
15f4406c
ILT
5253 * bfd.c (bfd_errmsg): Handle a NULL return from strerror.
5254
c8435133
ILT
5255 * archive.c (bfd_generic_archive_p): If the first file in the
5256 archive can not be recognized as an object, don't assume that this
5257 is the wrong format.
5258
053ae1d7
ILT
5259 * elf.c (bfd_elf_set_dt_needed_name): Don't do anything if the
5260 format is not bfd_object.
5261 (bfd_elf_get_dt_soname): Likewise.
5262
ea74d979
ILT
5263Wed Feb 21 13:58:04 1996 Ian Lance Taylor <ian@cygnus.com>
5264
5265 * coff-sh.c (sh_relax_delete_bytes): Correct range of R_SH_USES
5266 reloc.
5267
871a3f3b
C
5268Tue Feb 20 16:22:44 1996 J.T. Conklin <jtc@rtl.cygnus.com>
5269
5270 * bfd.c (tdata): Add netbsd_core_data.
5271 * bfd-in2.h: Regenerated.
5272
5273Tue Feb 20 16:50:02 1996 Ian Lance Taylor <ian@cygnus.com>
5274
fe6fc35f
ILT
5275 * sunos.c (SUNOS_CONSTRUCTOR): Define.
5276 (sunos_add_one_symbol): Don't let a symbol from a dynamic object
5277 override a constructor symbol. Set SUNOS_CONSTRUCTOR when
5278 appropriate.
5279
871a3f3b
C
5280 * bout.c (b_out_squirt_out_relocs): Use udata.i rather than flags
5281 to get the symbol index, matching 14 Jul 95 change.
5282
d3785301
FF
5283Tue Feb 20 08:26:27 1996 Fred Fish <fnf@phydeaux.cygnus.com>
5284
5285 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents):
5286 Remove duplicate definition of gp.
5287
60a49e7f
ILT
5288Mon Feb 19 12:37:41 1996 Ian Lance Taylor <ian@cygnus.com>
5289
81bdcecf
ILT
5290 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Don't
5291 assume that we can set the GP value and then get the same value,
5292 since it won't be true if the output file is neither ELF nor
5293 ECOFF.
5294 * coff-mips.c (mips_adjust_reloc_in): Don't bother to use
5295 _bfd_get_gp_value here.
5296 (mips_gprel_reloc): Don't assume we can set and get the GP value.
5297 * elf32-mips.c (mips_elf_hi16_reloc): Get gp value from
5298 mips_elf_final_gp.
5299 (mips_elf_lo16_reloc): Likewise.
5300 (mips_elf_final_gp): Add pgp parameter. Set it to the GP value.
5301 Don't require that the BFD be ELF.
5302 (mips_elf_gprel16_reloc): Get gp value from mips_elf_final_gp.
5303 (mips_elf_gprel32_reloc): Likewise.
5304 (mips_elf_relocate_section): Don't assume we can set and get the
5305 GP value.
5306 (mips_elf_finish_dynamic_symbol): Don't bother to use
5307 _bfd_get_gp_value here.
5308
5309 * elf32-mips.c (mips_elf_create_procedure_table): Initialize sv.
5310 Don't change epdr between malloc and free. Be careful not to free
5311 NULL pointers. Zero out the first RPDR.
5312
7b61165a
ILT
5313 * configure.host: On Linux, only pass -rpath option if $(libdir)
5314 is neither /lib nor /usr/lib. From Alan Modra
5315 <alan@mullet.Levels.UniSA.Edu.Au>.
5316
60a49e7f
ILT
5317 * elf-bfd.h (struct elf_obj_tdata): Rename dt_needed_name to
5318 dt_name.
5319 (elf_dt_name): Rename from elf_dt_needed_name.
5320 * elf.c (bfd_elf_set_dt_needed_name): Use elf_dt_name, not
5321 elf_dt_needed_name.
5322 (bfd_elf_get_dt_soname): New function.
5323 * elflink.h (elf_link_add_object_symbols): Use elf_dt_name, not
5324 elf_dt_needed_name. Save the SONAME back in elf_dt_name.
5325 * bfd-in.h (bfd_elf_get_dt_soname): Declare.
5326 * bfd-in2.h: Rebuild.
5327
b268e261
DE
5328Mon Feb 19 02:50:23 1996 Doug Evans <dje@charmed.cygnus.com>
5329
5330 * elf32-sparc.c (elf32_sparc_reloc_type_lookup): Renamed from
5331 _bfd_sparc_elf_reloc_type_lookup.
5332 (bfd_elf32_bfd_reloc_type_lookup): Update.
5333 * elf64-sparc.c (SPARC64_OLD_RELOCS): Define.
5334 (sparc64_elf_howto_table): Define.
5335 (sparc_reloc_map): Define.
5336 (sparc64_elf_reloc_type_lookup): New function.
5337 (sparc_elf_wdisp16_reloc): New function.
5338 (elf_info_to_howto): Use sparc64_elf_howto_table.
5339 (sparc64_elf_relocate_section): Likewise.
5340 (bfd_elf64_bfd_reloc_type_lookup): Update.
5341
9e2ef098
ILT
5342Sun Feb 18 15:02:25 1996 Ian Lance Taylor <ian@cygnus.com>
5343
5344 * configure.host: Check for 'do not mix' from native linker before
5345 trying to use -rpath.
5346
4c70373f
ILT
5347Fri Feb 16 12:46:18 1996 Ian Lance Taylor <ian@cygnus.com>
5348
cba3f8a9
ILT
5349 * bfd.c (_bfd_get_gp_value): New function.
5350 (_bfd_set_gp_value): New function.
5351 * libbfd-in.h (_bfd_get_gp_value): Declare.
5352 (_bfd_set_gp_value): Declare.
5353 * libbfd.h: Rebuild.
5354 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Use
5355 _bfd_get_gp_value and _bfd_set_gp_value rather than referring
5356 directly to the fields in the tdata information.
5357 (alpha_relocate_section): Likewise.
5358 * coff-mips.c (mips_adjust_reloc_in): Likewise.
5359 (mips_gprel_reloc): Likewise.
5360 (mips_relocate_section): Likewise.
5361 * elf32-mips.c (mips_elf_hi16_reloc): Likewise.
5362 (mips_elf_lo16_reloc): Likewise.
5363 (mips_elf_final_gp): Likewise.
5364 (mips_elf_gprel16_reloc): Likewise.
5365 (mips_elf_gprel32_reloc): Likewise.
5366 (mips_elf_relocate_section): Likewise.
5367 (mips_elf_finish_dynamic_symbol): Likewise.
5368
4c70373f
ILT
5369 * bout.c (b_out_set_arch_mach): Recognize bfd_mach_i960_jx.
5370
a0a2dd54
ILT
5371Thu Feb 15 11:29:13 1996 Ian Lance Taylor <ian@cygnus.com>
5372
f54c7482 5373 * configure.in: Call AC_PROG_CC before configure.host.
65eed095
ILT
5374 * configure: Rebuild.
5375 * configure.host: Don't set information which autoconf should
5376 figure out, namely CC, CFLAGS, LDFLAGS, AR, and RANLIB.
65eed095 5377
14293419
ILT
5378 * configure.host: Remove go32 and win32 host information, since it
5379 should no longer be needed.
5380
edf3fe48
ILT
5381 * elf.c (map_sections_to_segments): If we have a .dynamic section,
5382 then start a new segment rather than put a writable section in a
5383 readonly segment.
5384
b5e4f369
ILT
5385 * configure.host: Set RPATH_ENVVAR.
5386
f2e33e27
ILT
5387 * Makefile.in: Rebuild dependencies.
5388
a0a2dd54
ILT
5389 * elflink.c (_bfd_elf_create_linker_section): Remove unused
5390 zero_section variable.
5391
52c6bc4d
ILT
5392Thu Feb 15 10:39:17 1996 H.J. Lu <hjl@zoom.com>
5393
5394 * Makefile.in ($(srcdir)/bfd-in2.h): Rename target from bfd-in2.h.
5395 ($(srcdir)/libbfd.h): Rename from libbfd.h.
5396 ($(srcdir)/libcoff.h): Rename from libcoff.h.
5397
c9e5279f
ILT
5398Wed Feb 14 16:29:07 1996 Martin Anantharaman <martin@mail.imech.uni-duisburg.de>
5399
cb50baea
ILT
5400 * ieee.c (ieee_write_expression): Only use an R variable for a
5401 local symbol. Don't output a zero offset. Handle a zero address.
5402 (SRC_MASK, PCREL_OFFSET): Define based on KEEPMINUSPCININST.
5403 (rel32_howto, rel16_howto, rel8_howto): Use SRC_MASK and
5404 PCREL_OFFSET.
5405 (parse_expression): Don't try to handle multiple occurrences of a
5406 P variable. Handle I variables differently from X variables. Fix
5407 the order of minus expressions.
5408 (ieee_slurp_external_symbols): Generate an I variable for an NN
5409 record. Fix handling of ATI and ATX records.
5410 (ieee_slurp_sections): Only set minimal section attributes.
5411 Adjust them later, based on the section contents.
5412 (ieee_object_p): Read in the file until just after the ME record.
5413 Call ieee_slurp_section_data to set the section flags.
5414 (do_one): Add iterations parameter. Only repeat the first load
5415 item. Set the section and file reloc flags.
5416 (ieee_slurp_section_data): Set section flags. Pass iterations to
5417 do_one.
5418 (ieee_canonicalize_reloc): Handle I variables.
5419 (do_with_relocs): Only emit relocation size when necessary.
5420 Increase MAXRUN to 127. Change ov to be assigned, and take
5421 src_mask and pcrel_offset into account.
5422 (ieee_write_data_part): Skip sections that are not loaded.
5423 (ieee_write_external_part): Don't output optional last entry of WX
5424 records.
5425 (ieee_write_me_part): Make setting of me_record neater.
5426 (ieee_generic_stat_arch_elt): Get the size of an archive element.
5427
c9e5279f
ILT
5428 * syms.c (stt): Add entries for zerovars, vars, and code.
5429
5430 * elfcode.h (validate_reloc): New static function.
5431 (write_relocs): Call validate_reloc for non ELF relocs.
5432
5433 * elfxx-target.h (elf_symbol_leading_char): Define if not defined.
5434 (TARGET_BIG_SYM): Use elf_symbol_leading_char.
5435 (TARGET_LITTLE_SYM): Likewise.
5436
5437 * config.bfd (m68*-*-psos*): New target.
5438
d9d65be6
ILT
5439Tue Feb 13 15:56:22 1996 Bryan Ford <baford@snake.cs.utah.edu>
5440
5441 * i386msdos.c: Remove some #if 0 code.
5442 (msdos_write_object_contents): Don't include empty sections in the
5443 size computation, regardless of their address.
5444
5445Tue Feb 13 15:36:37 1996 Michael Meissner <meissner@tiktok.cygnus.com>
5446
5447 * elf32-ppc.c (ppc_elf_relocate_section): Don't segfault if dynboj
5448 is NULL, ie, the -r switch is used.
5449
db5970c7
ILT
5450Tue Feb 13 14:35:15 1996 Ian Lance Taylor <ian@cygnus.com>
5451
e9f03cd4
ILT
5452 * reloc.c (BFD_RELOC_MIPS_GOT_HI16): Define.
5453 (BFD_RELOC_MIPS_GOT_LO16): Define.
b7384d22 5454 (BFD_RELOC_MIPS_CALL_HI16, BFD_RELOC_MIPS_CALL_LO16): Define.
e9f03cd4
ILT
5455 * bfd-in2.h, libbfd.h: Rebuild.
5456 * elf32-mips.c (mips_reloc_map): Map new relocs.
5457
fe7c066a
ILT
5458 * configure.host: Set HDLFLAGS for *-*-hpux with --enable-shared.
5459
1ab628e4
ILT
5460 * Makefile.in ($(SHLINK)): Check ts against $(SHLIB), not
5461 $(SHLINK).
5462
db5970c7
ILT
5463 * ieee.c (get_symbol): Set the section to bfd_abs_section.
5464 (do_with_relocs): If EXEC_P is set and there are no relocs, use a
5465 simple number for the section address, rather than an expression.
5466 Limit the number of bytes between relocs to MAXRUN.
5467 (ieee_write_me_part): Set me_record to the file offset after the
5468 start address.
5469 (ieee_write_processor): New static function.
5470 (ieee_write_object_contents): Use ieee_write_processor.
5471
318b7c18
ILT
5472Fri Feb 9 10:53:00 1996 Ian Lance Taylor <ian@cygnus.com>
5473
db5970c7
ILT
5474 * configure.host: Use ${CC-gcc} when testing for -rpath on SunOS.
5475
5476 * coff-aux.c: Change include of aux.h to aux-coff.h.
318b7c18 5477
56b64690
ILT
5478Thu Feb 8 14:01:03 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
5479
5480 * elf32-m68k.c (elf_m68k_relocate_section): For a R_68K_RELATIVE
5481 relocation put the addend both in the reloc entry and the data.
5482 (elf_m68k_finish_dynamic_symbol): Likewise. Mask out marker in
5483 GOT offset value.
5484
5485 * elf32-m68k.c (elf_m68k_relocate_section): If -Bsymbolic, resolve
5486 a R_68K_PCxx reloc against a defined global symbol directly.
5487 (elf_m68k_check_relocs): Don't count such a reloc.
5488
5489 * elf32-m68k.c (elf_m68k_check_relocs): Don't record a symbol with
5490 a PLTxx reloc as dynamic. Disallow PLTxxO reloc against a local
5491 symbol for now, otherwise always record the symbol as dynamic.
5492 (elf_m68k_adjust_dynamic_symbol): If a symbol with a PLTxx reloc
5493 is not referenced by a dynamic object, and we are not making a
5494 shared object, then don't make a PLT entry. If we do make a PLT
5495 entry, make sure the symbol has been recorded as dynamic.
5496
5d649ca8
ILT
5497Wed Feb 7 13:56:06 1996 Ian Lance Taylor <ian@cygnus.com>
5498
5499 * configure.host: When making a shared library, set HLDFLAGS to
5500 pass an appropriate -rpath option. Use the make variable SONAME
5501 as the shared library soname, rather than computing it here. On
5502 SunOS, build stamp-tshlink in place of $(SHLINK).
5503 * Makefile.in (SONAME): New variable.
5504 ($(SHLINK)): Make a link to the transformed name, as well.
5505 (stamp-tshlink): New target.
5506 (install): Skip stamp-tshlink during install.
5507
8cc98cd5
MM
5508Wed Feb 7 13:37:39 1996 Michael Meissner <meissner@tiktok.cygnus.com>
5509
56b64690
ILT
5510 * elf32-ppc.c (ppc_elf_add_symbol_hook): Do not assume that the
5511 linker sections have been set up yet.
5512
8cc98cd5
MM
5513 * elf.c (make_mapping): Add an additional argument to suppress
5514 making the first section include the program headers.
5515 (map_sections_to_segments): If the user used -Ttext such that the
5516 program headers are on a different page, do not set the flags
5517 saying that this section includes the program headers.
5518
fe16107d
C
5519Tue Feb 6 14:04:49 1996 J.T. Conklin <jtc@rtl.cygnus.com>
5520
5521 * configure.in (*-*-netbsd*): Set COREFILE to netbsd-core.c.
5522 don't define TRAD_HEADER.
5523 * configure: Rebuild.
5524
5525 * netbsd-core.c: New file, support for NetBSD core files.
5526 * hosts/*nbsd.h: Removed.
5527
f1783016
DE
5528Tue Feb 6 11:47:49 1996 Doug Evans <dje@charmed.cygnus.com>
5529
5530 * reloc.c (BFD_RELOC_SPARC_[567]): New reloc types.
5531 (BFD_RELOC_SPARC_LO7 reloc type): Deleted.
5532 * libbfd.h, bfd-in2.h: Regenerated.
5533 * elf32-sparc.c (_bfd_sparc_elf_reloc_type_lookup): Renamed from
5534 bfd_elf32_bfd_reloc_type_lookup.
5535 (reloc_type{,_names}): Deleted.
5536 (_bfd_sparc_elf_howto_table): Renamed from elf_sparc_howto_table.
5537 Add sparc64 relocs.
5538 (sparc_reloc_map): Add sparc64 relocs.
5539 (sparc_elf_notsupported_reloc): New static function.
5540 (sparc_elf_wdisp16_reloc): New static function.
5541 (elf32_sparc_check_relocs): Handle R_SPARC_WDISP{16,19}.
5542 (elf32_sparc_relocate_section): Likewise.
5543 (bfd_elf32_bfd_reloc_type_lookup): Define.
5544 * elf64-sparc.c (sparc64_elf_wdisp16_reloc): Deleted.
5545 (reloc_type{,_names}): Deleted.
5546 (elf_sparc_howto_table): Deleted.
5547 (sparc_reloc_map): Deleted.
5548 (_bfd_sparc_elf_howto_table): Renamed from elf_sparc_howto_table.
5549 (bfd_elf64_bfd_reloc_type_lookup): Change from function to #define.
5550
48fd00b6
ILT
5551Tue Feb 6 12:12:22 1996 Ian Lance Taylor <ian@cygnus.com>
5552
2300e217
ILT
5553 * configure.host: Make SHLIB_CFLAGS include $(PICFLAG) on a
5554 *-*-hpux* host.
5555
48fd00b6
ILT
5556 * Makefile.in (program_transform_name): New variable.
5557 (install): Transform library name before installing it.
5558
8adca582
ILT
5559Mon Feb 5 10:38:27 1996 Ian Lance Taylor <ian@cygnus.com>
5560
cbe75cb6
ILT
5561 * archures.c (bfd_mach_i960_hx): Define.
5562 * bfd-in2.h: Rebuild.
5563 * cpu-i960.c (scan_960_mach): Accept machine "hx".
5564 (MATRIX): Expand entries for HX.
5565 (arch_info_struct): Add i960:hx entry.
5566 * bout.c (b_out_set_arch_mach): Handle bfd_mach_i960_hx.
5567 * coffcode.h (coff_set_arch_mach_hook): Handle F_I960HX.
5568 (coff_set_flags): Handle bfd_mach_i960_hx.
5569
44f795f7
ILT
5570 Support for building as a shared library, based on patches from
5571 Alan Modra <alan@spri.levels.unisa.edu.au>:
5572 * configure.in: Add AC_ARG_ENABLE for shared and commonbfdlib.
5573 New substitutions: ALLLIBS, PICFLAG, SHLIB, SHLIB_CC,
5574 SHLIB_CFLAGS, COMMON_SHLIB, PICLIST, SHLINK.
5575 * configure: Rebuild.
5576 * configure.host: If --enable-shared, adjust shared library stuff
5577 based on the host. If the host is SunOS, and the linker supports
5578 -rpath, set HLDFLAGS to use it.
5579 * Makefile.in (ALLLIBS): New variable.
5580 (PICFLAG, SHLIB, SHLIB_CC, SHLIB_CFLAGS): New variables.
5581 (COMMON_SHLIB, SHLINK): New variables.
5582 (.c.o): If PICFLAG is set, compile twice, once PIC, once normal.
5583 (STAGESTUFF): Remove variable.
5584 (all): Depend upon $(ALLLIBS) and @PICLIST@ rather than
5585 $(TARGETLIB).
5586 (stamp-ofiles): New target, like old ofiles target, but build
5587 using a temporary file and move-if-change, and touch stamp-ofiles
5588 when done.
5589 (ofiles): Just depend upon stamp-ofiles.
5590 (stamp-piclist, piclist): New targets.
5591 ($(SHLIB), $(SHLINK)): New targets.
5592 (targets.o, archures.o): Build twice if PICFLAG is set.
5593 (do_mostlyclean): Remove pic/*.o.
5594 (do_clean): Remove stamp-ofiles, $(SHLIB), $(SHLINK), piclist, and
5595 stamp-piclist.
5596 (do_distclean): Remove pic and stamp-picdir.
5597 (install): Install shared libraries.
5598 ($(OFILES)): Depend upon stamp-picdir.
5599 (stamp-picdir): New target.
5600
cb62d2bc
ILT
5601 * libcoff-in.h: Add comment reminding people that libcoff.h is a
5602 generated file.
5603 * libcoff.h: Rebuild.
5604
8adca582
ILT
5605 * elflink.h (elf_adjust_dynamic_symbol): Don't try to get the
5606 flavour of a section with no owner.
5607
5608 * elf32-mips.c (mips_elf_create_dynamic_sections): Clear
5609 ELF_LINK_NON_ELF flag.
5610 (mips_elf_create_got_section): Likewise.
5611
5612 * elf.c: Revert last change, since it breaks dynamic linking.
5613 * elf-bfd.h (struct elf_backend_data): Remove want_hdr_in_seg
5614 field.
5615 * elf32-mips.c (elf_backend_want_hdr_in_seg): Don't define.
5616 * elfxx-target.h (elf_backend_want_hdr_in_seg): Don't define.
5617 (elfNN_bed): Don't initialize want_hdr_in_seg field.
5618
5619Sun Feb 4 20:45:13 1996 Michael Meissner <meissner@tiktok.cygnus.com>
5620
5621 * elf.c (assign_file_positions_for_segments): If the backend does
5622 not want the elf header or the program headers in the address
5623 space, do not include them in the calculations.
5624
5625 * elf32-ppc.c (ppc_elf_additional_program_headers): New hook
5626 function to determine if we need additional program headers.
5627 (ppc_elf_modify_segment_map): Define as a NOP function for now.
5628 (ppc_elf_create_linker_section): .sdata2 is a read-only section.
5629
0f09ddd4
ILT
5630Sat Feb 3 23:00:03 1996 Ian Lance Taylor <ian@cygnus.com>
5631
5632 * coffcode.h: Move today's libcoff.h change into coffcode.h.
5633
b48f10ba
FF
5634Sat Feb 3 15:43:44 1996 Fred Fish <fnf@cygnus.com>
5635
0f09ddd4
ILT
5636 * libcoff.h (bfd_coff_link_add_one_symbol): Combine macro args
5637 back into one line. Some compilers (sunos 4.1.3 for example)
5638 won't accept args split across more than one line.
b48f10ba 5639
50761d3b
SC
5640Fri Feb 2 11:42:15 1996 Steve Chamberlain <sac@slash.cygnus.com>
5641
5642 * aclocal.m4 (BFD_BINARY_FOPEN): Understand cygwin32.
5643 * configure: Regenerate.
5644
9dce8260
JL
5645Fri Feb 2 12:12:16 1996 Jeffrey A Law (law@cygnus.com)
5646
5647 * elf32-hppa.c (elf32_hppa_backend_symbol_table_processing): Don't
5648 try to do arithmetic on a void *, cast it to a unsigned char * first.
5649
6c55897c
ILT
5650Thu Feb 1 16:04:06 1996 Ian Lance Taylor <ian@cygnus.com>
5651
869b7d80
ILT
5652 * elf-bfd.h (ELF_LINK_NON_ELF): Define.
5653 * elf.c (_bfd_elf_link_hash_newfunc): Set elf_link_hash_flags to
5654 ELF_LINK_NON_ELF.
5655 * elflink.h (elf_link_add_object_symbols): Reset ELF_LINK_NON_ELF
5656 flag for a newly defined symbol.
5657 (NAME(bfd_elf,record_link_assignment)): Likewise.
5658 (elf_adjust_dynamic_symbol): If ELF_LINK_NON_ELF is set, try to
5659 set the DEF or REF_REGULAR flags correctly.
5660
6f6956c6
ILT
5661 * Makefile.in (bfd-in2.h): Make bfd.h, not protos, in docdir.
5662 (libbfd.h, libcoff.h): Corresponding change.
5663
6c55897c
ILT
5664 * elf32-i386.c (elf_i386_check_relocs): Don't record a symbol with
5665 a PLT32 reloc as dynamic.
5666 (elf_i386_adjust_dynamic_symbol): If a symbol with a PLT32 reloc
5667 is not referenced by a dynamic object, and we are not making a
5668 shared object, then don't make a PLT entry. If we do make a PLT
5669 entry, make sure the symbol has been recorded as dynamic.
5670
b06136f2
SC
5671Wed Jan 31 17:23:32 1996 Steve Chamberlain <sac@slash.cygnus.com>
5672
5673 * coff-i386.c (coff_i386_reloc_type_lookup): Add BFD_RELOC_32_PCREL.
5674 * config.bfd (i[345]86-*-win32): Becomes i[345]86-*-cygwin32.
5675 (powerpcle-*-cygwin32): New.
5676 * peicode.h (add_data_entry): Get address from vma.
5677
5c867ecd
MM
5678Wed Jan 31 16:23:57 1996 Michael Meissner <meissner@tiktok.cygnus.com>
5679
5680 * elflink.c (_bfd_elf_create_linker_section): If the symbol
5681 attached to the section has already been created as an undefined
5682 symbol, treat it as if it hasn't been created yet.
5683
28c16b55
ILT
5684Wed Jan 31 16:16:53 1996 Ian Lance Taylor <ian@cygnus.com>
5685
5686 * elflink.h (elf_bfd_final_link): Don't output initial dummy
5687 symbol or section symbols if stripping all symbols and this is not
5688 a relocateable link. Don't output the symbol string table if
5689 there are no symbols.
5690 (elf_link_flush_output_syms): Don't do anything if there are no
5691 symbols to flush.
5692
d19df9b5
ILT
5693Wed Jan 31 12:55:49 1996 Richard Henderson <rth@tamu.edu>
5694
5695 * coff-aux.c: New file.
5696 * hosts/m68kaux.h: New file.
5697 * config.bfd (m68*-apple-aux*): New target.
5698 * configure.in (m68*-apple-aux*): New native host.
5699 (m68kaux_coff_vec): New vector.
5700 * configure: Rebuild.
5701 * targets.c (m68kaux_coff_vec): Declare.
5702 * coffcode.h (bfd_coff_backend_data): Add field
5703 _bfd_coff_link_add_one_symbol.
5704 (bfd_coff_link_add_one_symbol): Define.
5705 (compare_arelent_ptr): New static function if TARG_AUX.
5706 (coff_write_relocs): If TARG_AUX, sort the relocs.
5707 (coff_write_object_contents): Set A/UX aouthdr magic number.
5708 (coff_link_add_one_symbol): Define if not defined.
5709 (bfd_coff_std_swap_table): Initialize new field.
5710 * libcoff.h: Rebuild.
5711 * cofflink.c (coff_link_add_symbols): Call
5712 bfd_coff_link_add_one_symbol rather than
5713 _bfd_generic_link_add_one_symbol.
5714 * coff-m68k.c (COFF_PAGE_SIZE): Don't define if already defined.
5715 * coff-alpha.c (alpha_ecoff_backend_data): Initialize new field.
5716 * coff-mips.c (mips_ecoff_backend_data): Likewise.
5717 * Makefile.in: Rebuild dependencies.
5718 (BFD32_BACKENDS): Add coff-aux.o.
5719 (BFD32_BACKENDS_CFILES): Add coff-aux.c.
5720
a796aafd
ILT
5721Wed Jan 31 11:37:46 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
5722
5723 * elf32-m68k.c (elf_m68k_relocate_section): Fix R_68K_GOT*
5724 relocation; ignore addend with R_68K_{GOT,PLT}*O relocation.
5725
a8763553
ILT
5726Tue Jan 30 12:09:04 1996 Ian Lance Taylor <ian@cygnus.com>
5727
66761e59
ILT
5728 * Makefile.in (do_maintainer_clean): Remove $(srcdir)/bfd-in2.h,
5729 $(srcdir)/libbfd.h and $(srcdir)/libcoff.h.
5730 (maintainer-clean): Warn about deleting special files.
5731 (bfd-in2.h, libbfd.h, libcoff.h): New targets.
5732
cf5138e3
ILT
5733 * elf32-hppa.c (elf32_hppa_relocate_section): Handle indirect and
5734 warning symbols correctly.
5735 * elf32-i386.c (elf_i386_relocate_section): Likewise.
5736 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
5737 * elf32-mips.c (mips_elf_relocate_section): Likewise.
5738 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
5739 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
5740 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
5741
a8763553
ILT
5742 * syms.c (_bfd_stab_section_find_nearest_line): Add casts to avoid
5743 warnings.
5744
bdd2e7f1
KK
5745Mon Jan 29 14:27:24 1996 Kim Knuttila <krk@cygnus.com>
5746
cf2cd4cf 5747 * libcoff-in.h: aligned newly exported names with bfd naming
bdd2e7f1
KK
5748 conventions. Removed an erroneous define of POWERPC_LE_PE.
5749 * libcoff.h: Rebuild.
5750 * cofflink.c, coff-ppc.c: the above function name changes
5751
d2bb6c79
ILT
5752Mon Jan 29 13:06:28 1996 Ian Lance Taylor <ian@cygnus.com>
5753
eb5bc1f3
ILT
5754 From Basim Kadhim <kadhim@spock.cs.colorado.edu>:
5755 * ecoff.c (struct extsym_info): Define.
5756 (_bfd_ecoff_bfd_final_link): Pass a pointer to struct extsym_info
5757 to ecoff_link_write_external.
5758 (ecoff_link_write_external): Accept a struct extsym_info pointer.
5759 Strip symbols when appropriate.
5760
052b35d2
ILT
5761 Based on patches from Ronald F. Guilmette <rfg@monkeys.com>:
5762 * syms.c (BSF_OBJECT): Define.
5763 (bfd_print_symbol_vandf): Print 'O' for BSF_OBJECT.
5764 * bfd-in2.h: Rebuild.
5765 * elfcode.h (elf_slurp_symbol_table): Set BSF_OBJECT for an
5766 STT_OBJECT symbol.
5767 * elf.c (swap_out_syms): Only set type to STT_OBJECT if BSF_OBJECT
5768 is set.
5769
53787b23
ILT
5770 * elf32-i386.c (elf_i386_relocate_section): If -Bsymbolic, when
5771 copying relocs into a shared object, treat a defined global symbol
5772 as a local symbol.
5773 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
5774 * elf32-mips.c (mips_elf_relocate_section): Likewise.
5775 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
5776
d2bb6c79
ILT
5777 * elflink.h (elf_link_add_object_symbols): Only set weakdef to a
5778 real defined symbol, not to a weak defined symbol.
5779
13d1a4dd
KK
5780Mon Jan 29 11:34:36 1996 Kim Knuttila <krk@cygnus.com>
5781
5782 * cofflink.c: removed the POWERPC_LE_PE hack, promoted some types
5783 and made a few static functions externs.
5784
5785 * coff-ppc.c (ppc_bfd_coff_final_link): new function, replaces the
5786 POWERPC_LE_PE hack in cofflink.
5787
5788 * libcoff-in.h: promoted the following from cofflink.c to allow
5789 _bfd_coff_final_link to be overridden - STRING_SIZE_SIZE,
cf2cd4cf 5790 coff_debug_merge_element, struct coff_debug_merge_type,
13d1a4dd
KK
5791 coff_debug_merge_hash_entry, coff_debug_merge_hash_table,
5792 coff_debug_merge_hash_table_init, coff_debug_merge_hash_table_free,
cf2cd4cf 5793 coff_debug_merge_hash_lookup, coff_link_section_info,
13d1a4dd
KK
5794 coff_final_link_info, coff_debug_merge_hash_newfunc,
5795 coff_write_global_sym, coff_link_input_bfd, coff_reloc_link_order.
5796
5797 * libcoff.h: re-gen'd
5798
86aac8ea
ILT
5799Fri Jan 26 18:33:35 1996 Ian Lance Taylor <ian@cygnus.com>
5800
5801 * syms.c: Include "bfdlink.h".
5802 (struct stab_find_info): Define.
5803 (_bfd_stab_section_find_nearest_line): New function.
5804 * libbfd-in.h (_bfd_stab_section_find_nearest_line): Declare.
5805 * libbfd.h: Rebuild.
5806 * elf-bfd.h (struct elf_obj_tdata): Add line_info field.
5807 * elf.c (_bfd_elf_find_nearest_line): Try calling
5808 _bfd_stab_section_find_nearest_line before searching the ELF
5809 symbol table. Find the closest STT_FUNC symbol, not the last one.
5810 * libcoff-in.h (coff_data_type): Add line_info field.
bdd2e7f1 5811 * libcoff.h: Rebuild.
86aac8ea
ILT
5812 * coffgen.c (coff_find_nearest_line): Try calling
5813 _bfd_stab_section_find_nearest_line before searching the COFF
5814 symbol table.
5815 * Makefile.in: Rebuild dependencies.
5816
5817Fri Jan 26 16:11:19 1996 Michael Meissner <meissner@tiktok.cygnus.com>
5818
5819 * elf32-ppc.c (R_PPC_EMB_SDA21 relocations): Make relocation size
5820 4 bytes, so we get the correct value when updating the register
5821 field in little endian mode.
5822
43d36aad
ILT
5823Thu Jan 25 12:14:16 1996 Ian Lance Taylor <ian@cygnus.com>
5824
f0a97077
ILT
5825 * libcoff-in.h (struct xcoff_tdata): Remove toc_section and
5826 entry_section fields. Add sntoc and snentry fields.
5827 * libcoff.h: Rebuild.
5828 * coffcode.h (coff_mkobject_hook): Initialize sntoc and snentry,
5829 not toc_section and entry_section (the COFF file does not have any
5830 sections at this point).
5831 (coff_write_object_contents): Set o_snentry and o_sntoc from
5832 snentry and sntoc rather than entry_section and toc_section.
5833 * coff-rs6000.c (xcoff_copy_private_bfd_data): Copy sntoc and
5834 snentry, not toc_section and entry_section.
5835 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Don't set
5836 entry_section from hentry.
5837 (xcoff_link_input_bfd): If a defined symbol has XCOFF_ENTRY set,
ea2504d5 5838 set snenty.
f0a97077
ILT
5839 (xcoff_link_input_bfd): Set sntoc, not toc_section.
5840 (xcoff_write_global_symbol): Get toc_section from sntoc, rather
5841 than using toc_section directly.
5842
9b4598d0
ILT
5843 * archures.c: Add missing `.' in enum bfd_architecture.
5844 * bfd-in2.h: Rebuild.
5845
43d36aad
ILT
5846 * config.bfd (i[345]86-*-sco*elf*): Use bfd_elf32_i386_vec. From
5847 Robert Lipe <robertl@arnet.com>.
5848
eb82bc60
MM
5849Thu Jan 25 12:08:51 1996 Michael Meissner <meissner@tiktok.cygnus.com>
5850
5851 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Add .rela.sdata{,2}
5852 to sections we allocate. Use bfd_zalloc to allocate initialial
5853 sections, not bfd_alloc.
5854 (ppc_elf_check_relocs): Remove BFD_ASSERTs for !shared from
5855 SDA{,2}I16 relocations.
5856 (ppc_elf_add_symbol_hook): Use the value of -G nn to determine
5857 whether to put something in .sbss or not.
5858 (ppc_elf_relocate_section): Add support for more relocations. Add
c1e65e24
MM
5859 in sec->output_offset where appropriate. Make error messages
5860 include the symbol name.
eb82bc60
MM
5861
5862 * elflink.c (_bfd_elf_create_linker_section): Lookup symbol before
5863 trying to add it to the symbol table, so _GLOBAL_OFFSET_TABLE_
5864 doesn't get redefined messages if -shared.
5865
5866 * elflink.h (elf_create_pointer_linker_section) Only bump RELA
5867 section if the rel_section field has been set up.
5868
9d621c7d
MM
5869Wed Jan 24 20:40:26 1996 Michael Meissner <meissner@tiktok.cygnus.com>
5870
5871 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo in eabi
5872 relocations.
5873
75c9ddc9
DE
5874Wed Jan 24 10:38:34 1996 Doug Evans <dje@charmed.cygnus.com>
5875
5876 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Delete checking
5877 of flags, only flags used are controlled by mach number. Bump up
5878 output file mach number to highest of input file mach numbers.
5879 (elf32_sparc_object_p): Watch for EF_SPARC_SUN_US1.
5880 (elf32_sparc_final_write_processing): Set EF_SPARC_SUN_US1 if v8plusa.
5881
72c513bc
DE
5882 * config.bfd (sparc64-*-{sysv4*,solaris2*}): Comment out
5883 bfd_elf64_sparc_vec support.
5884
3cbe19d2
MM
5885Tue Jan 23 14:33:05 1996 Michael Meissner <meissner@tiktok.cygnus.com>
5886
5887 * elf32-ppc.c (ppc_elf_copy_private_bfd_data): Don't complain if
5888 the embedded bit is set on some objects and not on others. Just
5889 or it together.
d8fd85ad
MM
5890 (ppc_elf_relocate_section): Implement R_PPC_EMB_{SDA21,RELSDA}
5891 relocations.
3cbe19d2 5892
5eb83ede
ILT
5893Tue Jan 23 14:22:45 1996 Ian Lance Taylor <ian@cygnus.com>
5894
4a3d3b42
ILT
5895 * coffcode.h (coff_new_section_hook): Don't try to align the
5896 .stabstr section.
5897
5eb83ede
ILT
5898 * coffcode.h (coff_set_section_contents): Fix the handling of the
5899 .lib section to work even if the entire section contents are
5900 written at once. From Gvran Uddeborg <gvran@uddeborg.pp.se> and
5901 Robert Lipe <robertl@arnet.com>.
5902
05f927dd
MM
5903Mon Jan 22 18:45:51 1996 Michael Meissner <meissner@tiktok.cygnus.com>
5904
5905 * elflink.h (elf_finish_pointer_linker_section): Don't allocate
5906 memory here for contents.
5907
5908 * elf32-ppc.c (ppc_elf_relocate_section): Bump up _SDA_BASE_ and
5909 _SDA2_BASE_ by 32768.
5910 (ppc_elf_size_dynamic_sections): #if out PLT code which we haven't
5911 started using. Allocate contents for .sdata and .sdata2 sections
5912 also.
5913 (ppc_elf_check_relocs): Use bfd_get_section_name in debug message,
5914 rather than _name.
5915 (ppc_elf_finish_dynamic_symbol): Remove code that attempted to
5916 size _SDA{,2}_BASE_.
5917 (ppc_elf_relocate_section): Change how sdata{,2} relocations are
5918 done.
5919
5bc513b4
DE
5920Mon Jan 22 08:52:04 1996 Doug Evans <dje@charmed.cygnus.com>
5921
5a5bac64
DE
5922 * elflink.h (elf_finish_pointer_linker_section): Fix typo.
5923
5bc513b4 5924 * archures.c (bfd_mach_sparc_v9): Renamed from bfd_mach_sparc64.
5bc513b4 5925 (bfd_mach_sparc_{v8plus,v8plusa}): Define.
5bc513b4 5926 (bfd_mach_sparc_v9a): Define.
049f3d4c 5927 (bfd_mach_sparc_v9_p): Define.
5bc513b4
DE
5928 * bfd-in2.h: Regenerated.
5929 * aoutx.h (aout,machine_type): bfd_mach_sparc64 renamed to
5930 bfd_mach_sparc_v9.
d3366d23 5931 * elf64-sparc.c (sparc64_elf_object_p): Likewise.
5bc513b4
DE
5932 * config.bfd (sparc64-*-sysv4*,sparc64-*-solaris2*): Set targ_defvec
5933 to bfd_elf32_sparc_vec.
5934 * cpu-sparc.c (arch_info_struct): Renamed from sparc_arch_info.
5bc513b4 5935 Add v8plus{,a} support.
5bc513b4 5936 Add v9a support.
768b8ade 5937 (sparc_compatible): New function.
5bc513b4 5938 * elf32-sparc.h: #include "elf/sparc.h".
75c9ddc9 5939 (elf32_sparc_merge_private_bfd_data, elf32_sparc_object_p,
5bc513b4 5940 elf32_sparc_final_write_processing): New functions.
75c9ddc9 5941 (bfd_elf32_bfd_merge_private_bfd_data, elf_backend_object_p,
5bc513b4 5942 elf_backend_final_write_processing): Define.
5bc513b4 5943
3b3753b8
MM
5944Mon Jan 22 11:21:51 1996 Michael Meissner <meissner@tiktok.cygnus.com>
5945
5946 * elf-bfd.h (struct elf_link_hash_entry): Add
5947 linker_section_pointer field.
5948 (enum elf_linker_section_enum): Enumeration for new way of
5949 creating linker dynamic sections and symbols.
5950 (elf_linker_section{,_pointers}): New structures for creating
5951 dynamic sections and symbols.
5952 (elf_obj_tdata): Add linker_section_pointers and linker_section
5953 fields.
5954 (elf_local_ptr_offsets,elf_linker_section): New accessor macros.
5955 (_bfd_elf_create_linker_section): New declarations.
5956 (_bfd_elf_find_pointer_linker_section): Ditto.
5957 (bfd_elf{32,64}_{create,finish}_pointer_linker_section): Ditto.
5958 (_bfd_elf_make_linker_section_rela): Ditto.
5959
5960 * elf.c (_bfd_elf_link_hash_newfunc): Initialize new fields.
5961
5962 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Delete.
5963 (ppc_elf_create_linker_section): New function to create the
5964 sections .got, .sdata, and .sdata2.
5965 (ppc_elf_size_dynamic_sections): Zap .rela.{sdata,sdata2} if
5966 needed.
5967 (ppc_elf_check_relocs): Support more of the eabi relocations.
5968 (ppc_elf_relocate_section): Ditto.
5969 (ppc_elf_finish_dynamic_symbols): Adjust _SDA{,2}_BASE_ by 32768
5970 if the .sdata{,2} + .sbss{,2} section size is > 32k.
5971
5972 * elflink.h (elf_create_pointer_linker_section): New function to
5973 create initialized pointers in dynamic linker sections.
5974 (elf_finish_pointer_linker_section): Actually intialize the
5975 pointers created above.
5976
5977 * elfcode.h (bfd_elf{32,64}_create_pointer_linker_section): New
5978 macros to provide both 32 and 64 bit versions of
5979 elf_create_pointer_linker_section.
5980 (bfd_elf{32,64}_finish_pointer_linker_section): New macros to
5981 provide both 32 and 64 bit versions of
5982 elf_finish_pointer_linker_section.
5983
5984 * elflink.c (_bfd_elf_create_linker_section): New function to
5985 create a linker section.
5986 (_bfd_elf_find_pointer_linker_section): Find a unique pointer to a
5987 given address in the linker pointer offsets created for a given
5988 symbol.
5989 (_bfd_elf_make_linker_section_rela): Make a RELA section
5990 corresponding to the generated linker section.
5991
6b3eb07e
DE
5992Sat Jan 20 08:36:10 1996 Doug Evans <dje@canuck.cygnus.com>
5993
5994 * elf32-sparc.c (ELF_MACHINE_ALT1): Define.
5995
e7894f6b
KK
5996Thu Jan 18 18:25:34 1996 Kim Knuttila <krk@cygnus.com>
5997
5998 * coff-ppc.c (coff_ppc_relocate_section): changed TOCDEFN relocs.
5999 (coff_ppc_relocate_section): Handle special values for gcc built dlls.
6000 (dump_toc): fix diagnosing code to identify out-of-toc-bounds entries.
6001 Also begin the toc at 4 as an eye catcher ('31313131' marks the first
6002 toc entry in an objdump) for now.
cf2cd4cf 6003 (ppc_do_last, ppc_get_last): New function - needed to save processing
e7894f6b 6004 the toc owner to the end.
cf2cd4cf 6005 (ppc_coff_swap_sym_in_hook): Removed an incorrect hack for doing the
e7894f6b
KK
6006 toc owner last.
6007
cf2cd4cf
UD
6008 * cofflink.c (_bfd_coff_final_link): Added a new hack to keep the
6009 toc owner from being done till last. Must define POWERPC_LE_PC
e7894f6b
KK
6010 to enable it.
6011
6012 * coffcode.h (coff_set_alignment_hook): alignment setting for .stab
6013
6014 * peicode.h (coff_swap_scnhdr_out): set section flags for stab/str
6015 to INFO.
6016 (coff_swap_aouthdr_out): Removed a non-working hack for computing the
6017 SizeOfImage for PowerPC. Ignore the size of the .junk section.
6018
80b99ca0
ILT
6019Thu Jan 18 17:42:12 1996 Ian Lance Taylor <ian@cygnus.com>
6020
6021 * elfcore.h: Include <signal.h> before <sys/procfs.h>.
6022
df96df4c
ILT
6023Wed Jan 17 12:40:14 1996 Ian Lance Taylor <ian@cygnus.com>
6024
6025 * cpu-powerpc.c (arch_info_struct): Change last entry to not point
6026 back to first.
6027 (bfd_powerpc_arch): Point at first entry in arch_info_struct.
6028
d49ddb85
ILT
6029Tue Jan 16 15:10:49 1996 Ian Lance Taylor <ian@cygnus.com>
6030
6031 * elf.c (assign_file_positions_for_segments): Don't increment file
6032 offset for a segment which contains no loadable sections.
6033
4500a112
MM
6034Mon Jan 15 17:46:27 1996 Michael Meissner <meissner@tiktok.cygnus.com>
6035
6036 * reloc.c: Add new PowerPC relocations.
6037 * {bfd-in2,libbfd}.h: Regenerate.
6038
6039 * elf32-ppc.c (ppc_elf_howto_raw): Add more PPC relocations.
6040 (ppc_elf_reloc_type_lookup): Lookup new relocations.
6041
252239f8
ILT
6042Mon Jan 15 14:29:44 1996 Ian Lance Taylor <ian@cygnus.com>
6043
20ab764e
ILT
6044 * aoutx.h (howto_table_ext): Fix RELOC_BASE10 and RELOC_BASE22
6045 entries.
6046
0a4ffa2d
ILT
6047 * sunos.c (sunos_scan_ext_relocs): Don't fail assert if
6048 info->shared.
6049
45ca3195
ILT
6050 * coffgen.c (coff_find_nearest_line): Don't try to cache
6051 information in sections that are not owned by a BFD. From Richard
6052 Henderson <richard@atheist.tamu.edu>.
6053
252239f8
ILT
6054 * elf32-mips.c: Numerous changes to dynamic linking code, mostly
6055 from Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>.
6056 * elflink.h (elf_link_output_extsym): Remove special check for
6057 _rld_new_interface.
6058
6059 * ecoffswap.h: Add prototypes for static functions.
6060
bd2d10c0
MM
6061Sun Jan 14 21:36:08 1996 Michael Meissner <meissner@tiktok.cygnus.com>
6062
6063 * elf32-ppc.c (ppc_elf_{unsupported,std}_reloc): Remove functions.
6064 (ppc_elf_howto_raw): Remove ppc_elf_{unsupported,std}_reloc
6065 references.
6066 (ppc_elf_relocate_section): No longer allow .sdata/.sbss sections
6067 to satisfy a TOC16 relocation. Rewrite unsupported relocation
6068 support. Begin support for R_PPC_SDA{2,}REL.
6069
1c3a295b
MM
6070Sat Jan 13 09:36:52 1996 Michael Meissner <meissner@tiktok.cygnus.com>
6071
6072 * elf32-ppc.c (ppc_elf_create_dynamic_sections): New function to
6073 create the .got and .got.neg sections.
6074 (ppc_elf_size_dynamic_sections): Call it.
6075 (ppc_elf_check_relocs): Call it.
6076 (ppc_elf_size_dynamic_sections): Support .got.neg, just like .got.
6077 (ppc_elf_check_relocs): Add error messages for relocations we
6078 don't yet support. Do not include R_PPC_SDAREL16 like a GOT
6079 relocation.
6080
57081126
MM
6081Fri Jan 12 15:27:59 1996 Michael Meissner <meissner@tiktok.cygnus.com>
6082
6083 * elf32-ppc.c (ppc_elf_fake_sections): Define, and handle the new
6084 section flags for V.4 and eabi.
6085
3c38b3df
ILT
6086Fri Jan 12 13:59:16 1996 Ian Lance Taylor <ian@cygnus.com>
6087
14899eb7
ILT
6088 * elf.c (assign_file_positions_for_segments): If a segment
6089 contains no sections, don't mark it as readable.
6090
98bb57ad
ILT
6091 * elf-bfd.h (_bfd_elf_section_from_bfd_section): Declare.
6092 * elfcode.h (_bfd_elf_section_from_bfd_section): Don't declare.
6093
02fcd126
ILT
6094 * elf.c (_bfd_elf_print_private_bfd_data): Dump contents of
6095 dynamic section, if there is one.
6096 * elf-bfd.h (struct elf_size_info): Add swap_dyn_in field.
6097 (bfd_elf32_swap_dyn_in): Change type of second parameter to PTR.
6098 (bfd_elf64_swap_dyn_in): Likewise.
6099 * elfcode.h (elf_swap_dyn_in): Change type of second parameter to
6100 PTR.
6101 (NAME(_bfd_elf,size_info)): Initialize swap_dyn_in field.
6102
3c38b3df
ILT
6103 * elf32-i386.c (elf_i386_size_dynamic_sections): Don't create a
6104 DT_TEXTREL entry because of .rel.plt. From Martin Pirker
6105 <pirker@eiunix.tuwien.ac.at>.
6106
83f4323e
MM
6107Thu Jan 11 17:06:14 1996 Michael Meissner <meissner@tiktok.cygnus.com>
6108
6109 * section.c (SEC_{EXCLUDE,SORT_ENTRIES}): New section flags for
6110 PowerPC V.4 and eabi.
6111 * bfd-in2.h: Regenerate.
6112 * libfd.h: Regenerate.
6113
6114 * elfxx-target.h (TARGET_{BIG,LITTLE}_SYM): Add new flags.
6115
6116 * elf32-ppc.c (ppc_elf_section_from_shdr): Support SHT_ORDERED
6117 section type and SHF_EXCLUDE section flag, turning them into the
6118 appropriate bfd section flag.
6119
a0271667
ILT
6120Thu Jan 11 11:23:30 1996 Ian Lance Taylor <ian@cygnus.com>
6121
c9746fb6
ILT
6122 * xcofflink.c (xcoff_link_add_symbols): Create the special
6123 sections if we see a DYNAMIC object, in case that is the only
6124 XCOFF input object we see.
cf2cd4cf 6125
5b3b9ff6
ILT
6126 * elf32-mips.c: Extensive changes for a start at dynamic linking
6127 support, from Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>.
6128
6129 * elf-bfd.h (struct elf_backend_data): Add type_change_ok field.
6130 (struct elf_backend_data): Remove
6131 elf_backend_create_program_headers field. Add
6132 elf_backend_additional_program_headers and
6133 elf_backend_modify_segment_map fields.
6134 * elfxx-target.h (elf_backend_type_change_ok): Define if not
6135 defined.
6136 (elf_backend_additional_program_headers): Likewise.
6137 (elf_backend_modify_segment_map): Likewise.
6138 (elf_backend_create_program_headers): Don't define.
6139 (elfNN_bed): Change to account for field changes.
6140 * elf.c (assign_file_positions_for_segments): Call new
6141 modify_segment_map backend function. Don't call old
6142 create_program_headers backend function.
6143 (get_program_header_size): Call additional_program_headers rather
6144 than create_program_headers.
6145 * elflink.h (elf_link_add_object_symbols): Initialize
6146 type_change_ok from new backend field.
6147 (elf_link_output_extsym): Don't warn if _rld_new_interface is
6148 defined.
6149 (elf_reloc_link_order): Treat a reloc against a defined symbol as
6150 a reloc against the appropriate section.
6151
761f377f
ILT
6152 * elf-bfd.h (struct bfd_elf_section_data): Add tdata field.
6153 (struct elf_obj_tdata): Rename ppc_flags_init field to flags_init.
6154 (elf_flags_init): Rename from elf_ppc_flags_init.
6155 * elf32-ppc.c (ppc_elf_set_private_flags): Use elf_flags_init, not
6156 elf_ppc_flags_init.
6157 (ppc_elf_copy_private_bfd_data): Likewise.
6158 (ppc_elf_merge_private_bfd_data): Likewise.
6159
a0271667
ILT
6160 * elf32-m68k.c (howto_table): Change src_mask to 0 for all
6161 relocation entries.
6162
64d5f5d0
ILT
6163Tue Jan 9 15:22:53 1996 David Mosberger-Tang <davidm@azstarnet.com>
6164
6165 * coff-alpha.c (alpha_relocate_section): During final link, allow
6166 output .lita section to be bigger than 64k by adjusting gp value
6167 on a per-input section basis.
6168 * libecoff.h (struct ecoff_tdata): Add issued_multiple_gp_warning
6169 field.
6170 (struct ecoff_section_tdata): Add gp field.
6171
c40d9c77
ILT
6172Tue Jan 9 12:00:36 1996 Ian Lance Taylor <ian@cygnus.com>
6173
64d5f5d0
ILT
6174 Handle Alpha ECOFF changes in OSF/1 3.2.
6175 * libecoff.h (struct ecoff_backend_data): Add get_elt_at_filepos
6176 field.
6177 * coff-alpha.c: Include "aout/ar.h".
6178 (alpha_ecoff_get_relocated_section_contents): Don't require an
6179 ALPHA_R_IGNORE reloc after an ALPHA_R_GPDISP reloc, since OSF/1
6180 3.2 doesn't generate one.
6181 (alpha_relocate_section): Likewise.
6182 (alpha_ecoff_slurp_armap): Define.
6183 (alpha_ecoff_slurp_extended_name_table): Define.
6184 (alpha_ecoff_construct_extended_name_table): Define.
6185 (alpha_ecoff_truncate_arname): Define.
6186 (alpha_ecoff_write_armap): Define.
6187 (alpha_ecoff_generic_stat_arch_elt): Define.
6188 (alpha_ecoff_update_armap_timestamp): Define.
6189 (ARFZMAG): Define.
6190 (alpha_ecoff_read_ar_hdr): New static function.
6191 (alpha_ecoff_get_elt_at_filepos): New static function.
6192 (alpha_ecoff_openr_next_archived_file): New static function.
6193 (alpha_ecoff_get_elt_at_index): New static function.
6194 (alpha_ecoff_backend_data): Initialize get_elt_at_filepos field.
6195 (ecoffalpha_little_vec): Change BFD_JUMP_TABLE_ARCHIVE from
6196 _bfd_ecoff to alpha_ecoff.
6197 * ecoff.c (ecoff_link_add_archive_symbols): Use get_elt_at_filepos
6198 field from backend structure, rather than always calling
6199 _bfd_get_elt_at_filepos.
6200 * coff-mips.c (mips_ecoff_backend_data): Initialize
6201 get_elt_at_filepos field.
6202 * archive.c (_bfd_generic_read_ar_hdr_mag): New function, copied
6203 from _bfd_generic_read_ar_hdr with minor changes.
6204 (_bfd_generic_read_ar_hdr): Use _bfd_generic_read_ar_hdr_mag.
6205 * libbfd-in.h (_bfd_generic_read_ar_hdr_mag): Declare.
6206 * libbfd.h: Rebuild.
6207
6208 * bfd-in.h (BFD_IN_MEMORY): Define.
6209 * libbfd-in.h (struct bfd_in_memory): Define.
6210 * libbfd.c (bfd_read): Handle BFD_IN_MEMORY flag.
6211 (bfd_get_file_window): Don't try to map a BFD_IN_MEMORY file.
6212 (bfd_write, bfd_stat): Abort if BFD_IN_MEMORY is set.
6213 (bfd_tell, bfd_flush, bfd_seek): Handle BFD_IN_MEMORY flag.
6214 * bfd.c (struct _bfd): Change iostream field from char * to PTR.
6215 (bfd_get_size): Handle BFD_IN_MEMORY flag.
6216 * cache.c (bfd_cache_close): Ignore BFD_IN_MEMORY files.
6217 (bfd_open_file): Cast to PTR, not char *, when setting iostream.
6218 (bfd_cache_lookup_worker): Abort if BFD_IN_MEMORY is set.
6219 * opncls.c (bfd_fdopenr): Cast to PTR, not char *, when setting
6220 iostream.
6221 (bfd_openstreamr): Likewise.
6222 * aoutx.h (NAME(aout,some_aout_object_p)): Only fstat iostream if
6223 BFD_IN_MEMORY is not set.
6224 * riscix.c (riscix_some_aout_object_p): Likewise.
6225 * bfd-in2.h, libbfd.h: Rebuild.
6226
6227 * targets.c (bfd_target): Add _bfd_get_elt_at_index field.
6228 (BFD_JUMP_TABLE_ARCHIVE): Add _get_elt_at_index.
6229 (bfd_get_elt_at_index): Define.
6230 * archive.c (_bfd_generic_get_elt_at_index): Rename from
6231 bfd_get_elt_at_index. Change index parameter from int to
6232 symindex.
6233 * libbfd-in.h (_bfd_generic_get_elt_at_index): Declare.
6234 (_bfd_noarchive_get_elt_at_index): Define.
6235 (_bfd_archive_bsd_get_elt_at_index): Define.
6236 (_bfd_archive_coff_get_elt_at_index): Define.
6237 * bfd-in2.h, libbfd.h: Rebuild.
6238 * aout-target.h (MY_get_elt_at_index): Define if not defined.
6239 * coff-rs6000.c (xcoff_get_elt_at_index): Define.
6240 * ieee.c (ieee_get_elt_at_index): Define.
6241 * libecoff.h (_bfd_ecoff_get_elt_at_index): Define.
6242 * oasys.c (oasys_get_elt_at_index): Define.
6243 * som.c (som_get_elt_at_index): Define.
6244
c40d9c77
ILT
6245 * ecoff.c (_bfd_ecoff_find_nearest_line): Don't restrict line
6246 numbers to the .text section.
6247
efa77952
ILT
6248Mon Jan 8 17:00:57 1996 Ian Lance Taylor <ian@cygnus.com>
6249
6250 * ieee.c (ieee_write_debug_part): Change return type to boolean.
6251 If there is a SEC_DEBUGGING section, get the contents of the debug
6252 information part from it.
6253 (ieee_set_section_contents): Store the contents of a SEC_DEBUGGING
6254 section in memory.
6255 (ieee_write_object_contents): Check ieee_write_debug_part return.
6256
767f22d5
FF
6257Thu Jan 4 17:12:37 1996 Fred Fish <fnf@cygnus.com>
6258
6259 * config.bfd (i[345]86-*-freebsd*): Add target.
6260 * configure.in (i386freebsd_vec): Add vec.
6261 * configure: Regenerate.
6262 * Makefile.in (BFD32_BACKENDS): Add i386freebsd.o.
6263 (BFD32_BACKENDS_CFILES): Add i386freebsd.c.
6264 Rebuild dependencies..
6265 * freebsd.h: New file.
6266 * i386freebsd.c: New file.
6267 * targets.c (i386freebsd_vec): Declare.
6268 (bfd_target_vector): Add i386freebsd_vec.
6269 * i386linux.c (SEGMENT_SIZE): Define as TARGET_PAGE_SIZE
6270 * i386netbsd.c (SEGMENT_SIZE): Define as TARGET_PAGE_SIZE
cf2cd4cf 6271
f8254a3c
ILT
6272Thu Jan 4 16:27:46 1996 Ian Lance Taylor <ian@cygnus.com>
6273
6274 * ieee.c (ieee_slurp_debug): New static function.
6275 (ieee_object_p): Call it.
6276 (ieee_slurp_section_data): Skip debugging sections.
6277 (ieee_get_reloc_upper_bound): Likewise.
6278 (ieee_get_section_contents): Likewise.
6279 (ieee_canonicalize_reloc): Likewise.
6280 (ieee_write_section_part): Likewise.
6281 (ieee_write_debug_part): Likewise.
6282 (ieee_write_data_part): Likewise.
6283 (init_for_output): Likewise.
6284
07a159db
MM
6285Wed Jan 3 19:42:47 1996 Michael Meissner <meissner@wogglebug.tiac.net>
6286
6287 * elf32-ppc.c (ppc_elf_relocate_section): Make @GOT relocations
6288 work.
6289 (ppc_elf_howto_raw): Just use bfd_elf_generic_reloc for all howto
6290 relocs, since ppc_elf_relocate_section handles the linker case.
6291 (ppc_elf_{addr16_ha,got16,toc16,brtaken}_reloc): Delete, no longer
6292 used.
6293 (ppc_elf_{addr16_ha,got16,toc16,brtaken}_inner): Merge these into
6294 ppc_elf_relocate_section since that is now the only caller.
6295 (ppc_elf_relocate_section): Ditto.
6296
d812945a
ILT
6297Wed Jan 3 15:11:30 1996 Ian Lance Taylor <ian@cygnus.com>
6298
6299 * coffcode.h (coff_write_object_contents): If we don't know the
6300 section of the entry point for an XCOFF executable, always set the
6301 entry address to -1.
6302
3a56d0b4
MM
6303Tue Jan 2 14:17:15 1996 Michael Meissner <meissner@tiktok.cygnus.com>
6304
6305 * elf.c (bfd_section_from_shdr): Add support for note sections.
6306
c4406e50
ILT
6307Tue Jan 2 13:10:25 1996 Ian Lance Taylor <ian@cygnus.com>
6308
d812945a
ILT
6309 * bfd-in.h (struct _symbol_info): Add stab_type field.
6310 * bfd-in2.h: Rebuild.
6311 * aoutx.h (NAME(aout,get_symbol_info)): Set stab_type.
6312
c4406e50
ILT
6313 * elf32-ppc.c: Remove trailing newline from calls to
6314 _bfd_error_handler.
6315 (ppc_elf_merge_private_bfd_data): Only warn about endianness
6316 difference if target endianness is known.
6317
08556813
MM
6318Thu Dec 21 12:43:49 1995 Michael Meissner <meissner@tiktok.cygnus.com>
6319
6320 * elf32-ppc.c (ppc_elf_howto_raw): Add a phony reloc to handle the
6321 old style TOC16 references without using R_PPC_GOT.
6322 (ppc_reloc_type): Ditto.
6323 (ppc_elf_reloc_type_lookup): Add support for TOC16.
6324 (ppc_elf_toc16_inner): Renamed from ppc_elf_got16_inner.
6325 (ppc_elf_toc16_reloc): Renamed from ppc_elf_toc16_reloc.
6326 (ppc_elf_got16_{inner,reloc}): Stubs for real GOT support.
6327 (ppc_elf_check_relocs): New function for GOT/PLT support that is
6328 work in progress.
6329 (ppc_elf_adjust_dynamic_symbol): Ditto.
6330 (ppc_elf_adjust_dynindx): Ditto.
6331 (ppc_elf_size_dynamic_sections): Ditto.
6332 (ppc_elf_finish_dynamic_symbol): Ditto.
6333 (ppc_elf_finish_dynamic_sections): Ditto.
6334 (ELF_DYNAMIC_INTERPRETER): Define.
6335
86587dd4
KR
6336Wed Dec 20 19:14:18 1995 Ken Raeburn <raeburn@cygnus.com>
6337
6338 * elf.c (copy_private_bfd_data): When attaching sections to
6339 segments ignore sections that won't be allocated. Patch from
6340 Andreas Schwab.
6341
bf7f243f
KR
6342Tue Dec 19 20:01:43 1995 Ken Raeburn <raeburn@cygnus.com>
6343
6344 * config.bfd: Match on m68k-cbm-* only if OS doesn't match
6345 anything else.
6346
d9518e2e
ILT
6347Tue Dec 19 16:38:59 1995 Ian Lance Taylor <ian@cygnus.com>
6348
6349 * coff-i960.c (CALC_ADDEND): Define.
6350 (coff_i960_relocate_section): Add the input section VMA to the
6351 addend for PC relative relocs.
6352
6353Sun Dec 17 20:11:55 1995 Kim Knuttila <krk@cygnus.com>
6354
6355 * peicode.h (pe_print_pdata): Must test the entire entry for zero
6356 to correctly terminate.
6357
010a405a
ILT
6358Fri Dec 15 12:05:57 1995 Ian Lance Taylor <ian@cygnus.com>
6359
dc092b6b
ILT
6360 * targets.c (enum bfd_endian): Define.
6361 (bfd_target): Rename byteorder_big_p to byteorder, and change it
6362 from boolean to enum bfd_endian. Change header_byteorder_big_p
6363 correspondingly.
6364 * bfd-in.h (bfd_big_endian, bfd_little_endian): New macros.
6365 (bfd_header_big_endian, bfd_header_little_endian): New macros.
6366 * bfd-in2.h: Rebuild.
6367 * All targets: Change initialization of byteorder and
6368 header_byteorder to use enum bfd_endian values rather than
6369 booleans.
6370 * All files: Change all references to byteorder_big_p and
6371 header_byteorder_big_p to use new bfd_*_endian macros.
6372
010a405a
ILT
6373 * coffgen.c (make_a_section_from_file): Set lma to s_paddr, not
6374 s_vaddr.
6375 * coffcode.h (coff_write_object_contents): Set s_paddr to lma, not
6376 vma.
6377 * ecoff.c (_bfd_ecoff_write_object_contents): Likewise.
6378
fcb43906
SC
6379Fri Dec 15 07:32:09 1995 steve chamberlain <sac@slash.cygnus.com>
6380
6381 * pe[i]-i386.c (TARGET_UNDERSCORE): Define to '_'.
6382
0d709d31
ILT
6383Thu Dec 14 13:45:37 1995 Ian Lance Taylor <ian@cygnus.com>
6384
14578105
ILT
6385 * ieee.c: Lots of minor cleanups. Make many functions return
6386 errors rather than calling abort. Also:
6387 (ieee_write_twobyte): Remove; change callers to call existing
6388 ieee_write_2bytes function.
6389 (ieee_write_expression): Don't output the section twice when
6390 outputting a local symbol. Don't emit an extraneous zero if there
6391 is only one term.
6392 (ieee_slurp_sections): Set the lma as well as the vma.
6393 (ieee_archive_p): Use bfd_alloc_grow rather than an obstack.
6394
0d709d31
ILT
6395 * ihex.c (ihex_set_arch_mach): Don't accept any architecture, just
6396 a recognized one or bfd_arch_unknown.
6397 (ihex_get_symtab_upper_bound): Define as bfd_0l, to permit objcopy
6398 to succeed.
6399 (ihex_get_symtab): Likewise.
6400
14dc2f77
ILT
6401Wed Dec 13 15:44:06 1995 Ian Lance Taylor <ian@cygnus.com>
6402
6403 * aoutx.h: Include <ctype.h>.
6404 (struct aout_link_includes_table): Define.
6405 (struct aout_link_includes_totals): Define.
6406 (struct aout_link_includes_entry): Define.
6407 (aout_link_includes_lookup): Define macro.
6408 (struct aout_final_link_info): Add includes field.
6409 (aout_link_includes_newfunc): New static function.
6410 (NAME(aout,final_link)): Initialize includes hash table.
6411 (aout_link_write_symbols): Eliminate duplicate N_BINCL entries.
6412
480ccad5
SS
6413Wed Dec 13 10:52:14 1995 Stan Shebs <shebs@andros.cygnus.com>
6414
6415 * mpw-config.in: Match on mips-*-* instead of mips-idt-ecoff.
6416
3920d9c9
KK
6417Wed Dec 13 11:07:45 1995 Kim Knuttila <krk@cygnus.com>
6418
6419 * coff-ppc.c (coff_ppc_relocate_section): removed debugging code.
6420
207345f2
KK
6421Tue Dec 12 17:42:06 1995 Kim Knuttila <krk@cygnus.com>
6422
6423 * peicode.h (pe_print_reloc): New function to dump the .reloc section.
6424 (pe_print_private_bfd_data): call pe_print_reloc.
6425 * coffcode.h (coff_set_alignment_hook): .reloc section alignment.
6426 * coff-ppc.c (in_reloc_p): Added missing non-eligible relocs. Spiffed
6427 up some debugging as well.
6428
273c019e
ILT
6429Tue Dec 12 11:34:23 1995 Ian Lance Taylor <ian@cygnus.com>
6430
6431 * config.bfd: Handle sparc-*-elf*. From Ronald F. Guilmette
6432 <rfg@monkeys.com>.
6433
010d9f2d
ILT
6434Fri Dec 8 17:47:07 1995 Ian Lance Taylor <ian@cygnus.com>
6435
6436 * elflink.h (elf_link_add_object_symbols): Set section_count to 0
6437 when setting sections to NULL.
6438
4a4a66bd
ILT
6439Wed Dec 6 17:05:37 1995 Ian Lance Taylor <ian@cygnus.com>
6440
6441 * xcofflink.c (struct xcoff_loader_info): Add export_defineds
6442 field.
6443 (bfd_xcoff_size_dynamic_sections): Add export_defineds parameter.
6444 (xcoff_build_ldsyms): If export_defineds is set, set XCOFF_EXPORT
6445 for all symbols.
6446 * bfd-in.h (bfd_xcoff_size_dynamic_sections): Update declaration.
6447 * bfd-in2.h: Rebuild.
6448
545bf026
KK
6449Mon Dec 4 16:40:47 1995 Kim Knuttila <krk@cygnus.com>
6450
6451 * coffcode.h (coff_set_alignment_hook): Removed some debugging printf's
6452
1f4ae0d6
ILT
6453Mon Dec 4 11:25:39 1995 Ian Lance Taylor <ian@cygnus.com>
6454
55cac920
ILT
6455 * ihex.c (ihex_scan): Handle record types 4 and 5.
6456 (ihex_object_p): Permit types 4 and 5.
6457 (ihex_set_section_contents): Remove check for out of range
6458 addresses.
6459 (ihex_write_object_contents): Generate types 4 and 5.
6460
1f4ae0d6
ILT
6461 * elflink.h (elf_link_output_extsym): Just ignore warning and
6462 indirect references to symbols which don't really exist.
6463
53d45489
KK
6464Sun Dec 3 19:00:27 1995 Kim Knuttila <krk@cygnus.com>
6465
6466 * peicode.h (pe_print_idata): Minor format fixes
6467 (pe_print_edata): New function. Under private printing, this formats
6468 the edata section of a PE file.
6469 (pe_print_private_bfd_data): Added call to pe_print_edata.
6470
361e8876
DE
6471Sun Dec 3 16:46:54 1995 Richard Earnshaw (rearnsha@armltd.co.uk)
6472
6473 * aout-arm.c (MY_swap_std_reloc_out): Use KEEPIT to get the symbol
6474 index, don't call stoi.
6475
58142f10
ILT
6476Fri Dec 1 14:46:51 1995 Ian Lance Taylor <ian@cygnus.com>
6477
ffd15489
ILT
6478 * srec.c (srec_scan): Set lma as well as vma.
6479
6480 * ihex.c: New file; support for Intel Hex format.
6481 * targets.c (enum bfd_flavour): Add bfd_target_ihex_flavour.
6482 (ihex_vec): Declare.
6483 (bfd_target_vector): Always include ihex_vec.
6484 * bfd.c (struct _bfd): Add ihex_data field to tdata union.
6485 * Makefile.in: Rebuild dependencies.
6486 (BFD_LIBS): Add ihex.o
6487 (BFD_LIBS_CFILES): Add ihex.c.
6488 * bfd-in2.h: Rebuild.
6489
ae0a6bea
ILT
6490 * elf.c (assign_file_positions_for_segments): Sort the sections in
6491 each segment.
6492 (get_program_header_size): Return the right size if segment_map is
6493 not NULL.
6494 (copy_private_bfd_data): Don't bother to sort the sections.
6495
6496 * bfd.c (bfd_record_phdr): New function.
6497 * bfd-in.h (bfd_record_phdr): Declare.
6498 * bfd_in2.h: Rebuild.
6499
ce0ee4bf
ILT
6500 * elf32-sparc.c (elf32_sparc_relocate_section): Remove bogus
6501 BFD_ASSERT.
6502
58142f10
ILT
6503 * libbfd.c (bfd_malloc, bfd_realloc): New functions.
6504 (bfd_zmalloc): Return PTR, not char *. Take size_t, not
6505 bfd_size_type.
6506 * libbfd-in.h (bfd_malloc, bfd_realloc): Declare.
6507 (bfd_zmalloc): Change declaration.
6508 * libbfd.h: Rebuild.
6509 * Many files: Use bfd_malloc and bfd_realloc rather than malloc
6510 and realloc. Don't set bfd_error_no_memory if they fail.
6511
59066248
KK
6512Thu Nov 30 19:32:26 1995 Kim Knuttila <krk@cygnus.com>
6513
6514 * coff-ppc.c: Added macros to tidy up toc cell treatment. Numerous
cf2cd4cf 6515 uses as well. Added a new howto to deal with TOCREL16 relocs that
59066248
KK
6516 are TOCDEFN as well.
6517 (coff_ppc_relocate_section): Expanded treatment of ADDR32NB relocs
6518 to handle RVA relocs from dlltool.
6519 (ppc_coff_rtype2howto): TOCDEFN reloc addition.
6520 (coff_ppc_rtype_to_howto): TOCDEFN reloc addition.
6521 (ppc_coff_reloc_type_lookup): TOCDEFN reloc addition.
6522
cf2cd4cf 6523 * coffcode.h (coff_set_alignment_hook): check idata$X sections
59066248
KK
6524 to get the right section alignment.
6525
6933148a
ILT
6526Thu Nov 30 16:48:18 1995 Ian Lance Taylor <ian@cygnus.com>
6527
6528 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
6529 p_paddr if p_paddr is zero.
6530 (make_mapping): Set includes_filehdr and includes_phdrs for first
6531 PT_LOAD segment.
6532 (map_sections_to_segments): Set includes_phdrs for PT_PHDR
6533 segment.
6534 (assign_file_positions_for_segments): Handle includes_filehdr and
6535 includes_phdrs. Remove special handling of PT_PHDR and first
6536 PT_LOAD segments.
6537 (copy_private_bfd_data): Set includes_filehdr and includes_phdr
6538 when appropriate. Remove special handling of PT_PHDR segment.
6539 Use a more complex condition for when a section is included in a
6540 segment to handle Solaris linker oddities.
6541
f62fed1c
ILT
6542Thu Nov 30 11:17:33 1995 Manfred Hollstein KS/EF4A 60/1F/110 #40283 <manfred@lts.sel.alcatel.de>
6543
6544 * coff-m88k.c (howto_table): Reformatted for easier reading;
6545 special_function now points to new function m88k_special_reloc.
6546 (howto_hvrt16): Function previously used for handling HVRT16 relocs
6547 removed.
6548 (rtype2howto): Do not add reloc's r_offset to the addend, this will
6549 be done correctly by m88k_special_reloc.
6550 (reloc_processing): New function to be used by RELOC_PROCESSING.
6551 (RELOC_PROCESSING): Define to call reloc_processing.
6552
64ecde46
ILT
6553Wed Nov 29 12:42:36 1995 Ian Lance Taylor <ian@cygnus.com>
6554
b00c57ec
ILT
6555 * peicode.h (pe_print_idata): Call malloc rather than xmalloc.
6556 (pe_print_pdata): Likewise.
6557
a9713b91
ILT
6558 * opncls.c (bfd_alloc_by_size_t): Set bfd_error_no_memory if
6559 obstack_alloc fails.
6560 (bfd_alloc_finish): Set bfd_error_no_memory if obstack_finish
6561 fails.
6562 * libbfd.c (bfd_zmalloc): Set bfd_error_no_memory if malloc fails.
6563 * Many files: don't set bfd_error_no_memory if one of the above
6564 routines fails.
6565
3dbf33ee
ILT
6566 * elf.c (assign_file_positions_for_segments): Don't adjust p_paddr
6567 if p_paddr_valid is set.
6568 (copy_private_bfd_data): New static function.
6569 (_bfd_elf_copy_private_section_data): Call copy_private_bfd_data.
6570
44ef8897
ILT
6571 * elf.c (assign_file_positions_for_segments): Fix case where extra
6572 program headers were allocated.
6573
27fb8f29
ILT
6574 * elf.c (_bfd_elf_print_private_bfd_data): New function.
6575 * elf-bfd.h (_bfd_elf_print_private_bfd_data): Declare.
6576 * elfxx-target.h (bfd_elfNN_bfd_print_private_bfd_data): Define to
6577 _bfd_elf_print_private_bfd_data.
6578
64ecde46
ILT
6579 * coff-alpha.c (alpha_ecoff_swap_reloc_in): Don't abort if
6580 r_symndx is RELOC_SECTION_NONE for an ALPHA_R_IGNORE reloc.
6581 Change a RELOC_SECTION_LITA symndx to RELOC_SECTION_ABS.
6582 (alpha_ecoff_swap_reloc_out): Change RELOC_SECTION_ABS to
6583 RELOC_SECTION_LITA for ALPHA_R_IGNORE.
6584 (alpha_adjust_reloc_out): For ALPHA_R_IGNORE, don't change
6585 RELOC_SECTION_ABS to RELOC_SECTION_NONE.
6586
fd0198f0
ILT
6587Tue Nov 28 16:59:50 1995 Ian Lance Taylor <ian@cygnus.com>
6588
6589 * elf-bfd.h (struct elf_obj_tdata): Add segment_map field.
6590 * elf.c (make_mapping): New static function.
6591 (map_sections_to_segments): New static function.
6592 (elf_sort_sections): New static function.
6593 (assign_file_positions_for_segments): New static function.
6594 (map_program_segments): Remove.
6595 (get_program_header_size): Remove sorted_hdrs, count, and
6596 maxpagesize parameters. Simplify.
6597 (assign_file_positions_except_relocs): When generating an
6598 executable, use assign_file_positions_for_segments.
6599 (elf_sort_hdrs): Remove.
6600 (_bfd_elf_sizeof_headers): Remove eliminated parameters from call
6601 to get_program_header_size.
6602
3b3f7625
ILT
6603Mon Nov 27 12:27:46 1995 Ian Lance Taylor <ian@cygnus.com>
6604
1ff0461b
ILT
6605 * hp300hpux.c (MY(callback)): Set lma as well as vma.
6606
80c8485c
ILT
6607 * configure, config.in: Regenerate with autoconf 2.7.
6608
3b3f7625
ILT
6609 * elf32-i386.c (elf_backend_plt_readonly): Set correctly, to 1.
6610 * elf32-sparc.c (elf_backend_plt_readonly): Set correctly, to 0.
6611
fa63d1ef
ILT
6612Wed Nov 22 12:02:09 1995 Ian Lance Taylor <ian@cygnus.com>
6613
a877f591
ILT
6614 * ecoff.c (_bfd_ecoff_new_section_hook): Handle .rconst section.
6615 (ecoff_sec_to_styp_flags): Likewise.
6616 (_bfd_ecoff_styp_to_sec_flags): Handle STYP_RCONST.
6617 (ecoff_set_symbol_info): Handle scRConst.
6618 (ecoff_slurp_reloc_table): Handle RELOC_SECTION_RCONST.
6619 (ecoff_compute_section_file_positions): Handle .rconst section.
6620 (_bfd_ecoff_write_object_contents): Likewise.
6621 (ecoff_link_check_archive_element): Handle scRConst.
6622 (ecoff_link_add_externals): Likewise.
6623 (ecoff_link_write_external): Handle .rconst section.
6624 (ecoff_reloc_link_order): Likewise.
6625 * ecofflink.c (bfd_ecoff_debug_accumulate): Handle scRConst.
6626 * coff-alpha.c (alpha_convert_external_reloc): Handle .rconst
6627 section.
6628 (alpha_relocate_section): Handle RELOC_SECTION_RCONST.
6629
fa63d1ef
ILT
6630 * sunos.c (sunos_scan_dynamic_symbol): Only set written if the
6631 DEF_DYNAMIC flag is set.
6632
25bada65
KR
6633Tue Nov 21 13:25:29 1995 Ken Raeburn <raeburn@cygnus.com>
6634
6635 * host-aout.c: If TRAD_HEADER is defined, include it.
6636
7938b4cb
ILT
6637Tue Nov 21 13:03:57 1995 Ian Lance Taylor <ian@cygnus.com>
6638
85e493f0
ILT
6639 * aclocal.m4 (AC_PROG_CC): Remove local definition.
6640 (BFD_BINARY_FOPEN): Require AC_CANONICAL_SYSTEM.
6641 (BFD_NEED_DECLARATION): New function.
6642 * configure.in: Use BFD_NEED_DECLARATION.
bd77213b
ILT
6643 * acconfig.h: Put NEED_DECLARATION_* in @TOP@ section.
6644 * configure, config.in: Rebuild with autoconf 2.6.
85e493f0 6645
83dcdc61
ILT
6646 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Clear
6647 special_sections before returning when called with a non XCOFF
6648 BFD.
6649
7938b4cb
ILT
6650 * coffgen.c (coff_renumber_symbols): Sort common symbols with
6651 global symbols.
6652
6653 * coffcode.h (coff_compute_section_file_positions): Only pad the
6654 previous section to force file alignment when creating an
6655 executable.
6656
b5403ad7
ILT
6657Mon Nov 20 14:54:09 1995 Ian Lance Taylor <ian@cygnus.com>
6658
a418e05d
ILT
6659 * coffcode.h (coff_compute_section_file_positions): If
6660 RS6000COFF_C, set up the .debug section.
6661
b5403ad7
ILT
6662 * xcofflink.c (xcoff_link_input_bfd): Adjust the TOC anchor value
6663 if it is not large enough to accomodate the entire TOC area with
6664 signed 16 bit offsets.
6665 (xcoff_write_global_symbol): Handle negative TOC offsets in global
6666 linkage code.
6667 (_bfd_ppc_xcoff_relocate_section): Adjust relocations against a
6668 TOC anchor to use the TOC value used in the output file.
6669
90a7abbc
ILT
6670Sat Nov 18 18:01:41 1995 Ian Lance Taylor <ian@cygnus.com>
6671
6672 * coffgen.c (_bfd_coff_get_external_symbols): Cast malloc return.
6673 (_bfd_coff_read_string_table): Likewise.
6674
177b1932
DE
6675Sat Nov 18 19:43:04 1995 Richard Earnshaw (rearnsha@armltd.co.uk)
6676
6677 * pe-arm.c: Fix typos.
6678 * coff-arm.c: Likewise.
6679
6680Fri Nov 17 16:22:04 1995 Kim Knuttila <krk@cygnus.com>
6681
6682 * coff-ppc.c (list_ele): Added "cat"egory member.
6683 (record_toc): New category parameter (priv or pub).
6684 (ppc_record_toc_entry): Check to see if toc bounds exceeded.
6685 (ppc_process_before_allocation): Removed embrionic data-in-toc from
6686 the mainline. It addes extra toc cells in error.
6687 (ppc_coff_swap_sym_in_hook): Added some documentation.
6688 (dump_toc): Can now diagnose "virtual toc" chicanery.
6689
e34314c4
ILT
6690Fri Nov 17 10:41:25 1995 Philippe De Muyter <phdm@info.ucl.ac.be>
6691
6692 * elf-bfd.h (struct elf_link_hash_table): Change type of
6693 dynsymcount and bucketcount fields from size_t to bfd_size_type.
6694
73a68447
ILT
6695Fri Nov 17 10:02:58 1995 Ian Lance Taylor <ian@cygnus.com>
6696
535e9e29
ILT
6697 * coffcode.h (coff_pointerize_aux_hook): I960 version: don't
6698 pointerize C_LEAFSTAT or C_LEAFEXT entries.
6699
73a68447
ILT
6700 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Only create
6701 DT_INIT and DT_FINI entries if the _init or _fini symbol is
6702 defined or mentioned in a regular file.
6703
cd2b2402
KK
6704Thu Nov 16 15:16:42 1995 Kim Knuttila <krk@cygnus.com>
6705
6706 * coff-ppc.c (ppc_record_data_in_toc_entry): new function
6707 (coff_ppc_relocate_section): Handle TOCDEFN attribute
6708 (coff_ppc_relocate_section): Correct REL24 handling
6709 (ppc_process_before_allocation): Correct TOCDEFN handling
6710
6711 * peicode.h (dir_names): Added name descriptions
6712
b218076e
KR
6713Thu Nov 16 03:38:03 1995 Ken Raeburn <raeburn@cygnus.com>
6714
6715 * VERSION: Updated to cygnus-2.6.
6716
6717Wed Nov 15 19:30:07 1995 Ken Raeburn <raeburn@cygnus.com>
6718
6719 * targets.c (m68k4knetbsd_vec): Declare.
6720
e9f30616
ILT
6721Wed Nov 15 18:05:52 1995 Ian Lance Taylor <ian@cygnus.com>
6722
6723 * targets.c (bfd_target): Change type of second argument to
6724 _bfd_print_private_bfd_data from void * to PTR.
6725 * libbfd-in.h (_bfd_generic_bfd_print_private_bfd_data): Cast
6726 using PTR rather than void *.
6727 * bfd-in2, libbfd.h: Rebuild.
6728 * peicode.h (pe_print_private_bfd_data): Change vfile from void *
6729 to PTR.
6730 * elfxx-target.h (bfd_elfNN_bfd_print_private_bfd_data): Define as
6731 _bfd_generic_bfd_print_private_bfd_data rather than casting
6732 bfd_true.
6733
ae75c4a4
KR
6734Wed Nov 15 04:09:14 1995 Ken Raeburn <raeburn@cygnus.com>
6735
6736 * Makefile.in (.dep1): Fix stupid typo in last change. Remove any
6737 "DO NOT DELETE" lines or blank lines that mkdep writes on some
6738 systems.
6739 (BFD_LIBS_CFILES, ALL_MACHINES_CFILES, BFD32_BACKENDS_CFILES,
6740 BFD64_BACKENDS_CFILES): New variables.
6741 (CFILES): Use them.
cf2cd4cf 6742
bebcd3db
ILT
6743Tue Nov 14 11:52:23 1995 Ian Lance Taylor <ian@cygnus.com>
6744
4b71e164
ILT
6745 * peicode.h (coff_swap_aouthdr_out): For PPC PE, start isize at 0,
6746 not at the file position of the first section.
6747 * coffcode.h (coff_compute_section_file_positions): Avoid using
6748 unportable #elif.
6749 (coff_write_object_contents): When generating a PPC PE executable
6750 with no symbols, round up the file size to a COFF_PAGE_SIZE
6751 boundary.
6752 * cofflink.c (_bfd_coff_final_link): If there are no symbols,
6753 don't write out a string table.
6754
631b10f4
ILT
6755 * elf.c (bfd_section_from_shdr): When using a different section
6756 header, pass the new one to _bfd_elf_make_section_from_shdr.
6757 (elf_fake_sections): Don't set sh_info and sh_entsize fields.
6758 (elf_map_symbols): Add section VMA to symbol value when comparing
6759 against 0.
6760 (_bfd_elf_compute_section_file_positions): Only build symbol table
6761 if there are some symbols. Set file offset of symtab and strtab
6762 sections.
6763 (assign_file_positions_except_relocs): Remove dosyms parameter.
6764 Change all callers. Never set file offset of symtab and strtab
6765 sections.
6766 (_bfd_elf_copy_private_section_data): New function.
6767 (MAP_ONESYMTAB, MAP_DYNSYMTAB, MAP_STRTAB, MAP_SHSTRTAB): Define.
6768 (_bfd_elf_copy_private_symbol_data): New function.
6769 (swap_out_syms): Check for special mapping of st_shndx created by
6770 copy_private_symbol_data.
6771 * elfxx-target.h: Use new copy routines.
6772 * elf-bfd.h (_bfd_elf_copy_private_symbol_data): Declare.
6773 (_bfd_elf_copy_private_section_data): Declare.
6774
6775 * config.bfd (sh-*-*): Set targ_defvec to shcoff_vec.
6776
6777 * coffcode.h (coff_slurp_symbol_table): If COFF_WITH_PE, handle
6778 C_NT_WEAK.
6779
bebcd3db
ILT
6780 * coff-sh.c (shlcoff_vec): Use _bfd_generic_archive_p, not
6781 _bfd_dummy_target, matching the recent change to archive
6782 recognition.
6783
7ad4ba81
ILT
6784Mon Nov 13 13:24:38 1995 Ian Lance Taylor <ian@cygnus.com>
6785
afa67334
ILT
6786 * libbfd.c (bfd_get_file_window): Use casts to avoid doing
6787 arithmetic on PTR types.
6788
f2bd8915
ILT
6789 * aout-target.h (MY(callback)): Set the lma of the sections.
6790
7ad4ba81
ILT
6791 * ecoff.c (ecoff_reloc_link_order): Turn a reloc against a defined
6792 symbol into a reloc against the section.
6793
93b6a3f8
KK
6794Mon Nov 13 07:31:35 1995 Kim Knuttila <krk@cygnus.com>
6795
6796 * coff-ppc.c (ppc_coff_link_hash_entry): added support for inline
6797 glue for the relocs: IMGLUE and IFGLUE.
6798 (record_toc): new function - tracks toc contents
6799 (ppc_mark_symbol_as_glue): new function - supports the IMGLUE reloc
6800 (coff_ppc_relocate_section): Added support and fixes for IMGLUE/IFGLUE
6801 (ppc_coff_rtype2howto): removed invalid IMGLUE hack
6802 (coff_ppc_rtype_to_howto): removed invalid IMGLUE hack
125d37c4 6803 (ppc_record_toc_entry): Removed a debug define (duh)
93b6a3f8
KK
6804
6805 * peicode.h (coff_swap_scnhdr_out): Fixed invalid strcmp for ".reldata"
6806 (pe_print_idata): New function - formats the idata section data
6807 (pe_print_pdata): New function - formats the pdata section data
6808 (pe_print_private_bfd_data): calls to above
6809
c769947b
SS
6810Sun Nov 12 12:23:24 1995 Stan Shebs <shebs@andros.cygnus.com>
6811
6812 * Makefile.in (bfd_libs_here, etc): Provide empty definitions.
6813 * coff-rs6000.c (rs6000coff_vec): Add conditional defines
6814 TARGET_SYM and TARGET_NAME for vector and BFD name.
6815 * coff-pmac.c (pmac_xcoff_vec): Remove.
6816 (TARGET_SYM, TARGET_NAME): Define.
6817 * coffcode.h (coff_set_arch_mach_hook) [POWERMAC]: Set the
6818 machine to 0, not all PowerMacs are 601s.
6819
6820Fri Nov 10 12:10:14 1995 Ian Lance Taylor <ian@cygnus.com>
6821
6822 * elfcode.h (elf_object_p): Read in any program headers.
6823 * elf.c (_bfd_elf_make_section_from_shdr): Adjust section lma
6824 based on the program headers, if any.
6825 (elf_fake_sections): Set sh_addr from the vma, not the lma.
6826 (map_program_segments): Set p_paddr of program headers based on
6827 the lma.
6828
ee174815
ILT
6829Thu Nov 9 13:01:31 1995 Ian Lance Taylor <ian@cygnus.com>
6830
839087b7
ILT
6831 * archive.c (bfd_generic_archive_p): Preserve tdata in case of
6832 failure.
6833
922530a6
ILT
6834 * aoutx.h (NAME(aout,final_link)): Report a reasonable error when
6835 trying to do a relocateable link with a non-a.out object file.
6836
6837 * archive.c (bfd_generic_archive_p): Check the first object file
6838 in an archive even if target_defaulted is set. If the object file
6839 has the wrong xvec, reject it.
6840
a1774c51
ILT
6841 * aoutx.h (NAME(aout,set_section_contents)): If a section can not
6842 be represented, report the name via _bfd_error_handler.
6843 (translate_to_native_sym_flags): Likewise.
6844 * elf32-mips.c (mips_elf_final_link): Likewise.
6845 * oasys.c (oasys_write_sections): Likewise.
6846
4a378b13
ILT
6847 * coffcode.h (coff_set_alignment_hook): Write RS6000COFF_C version
6848 which checks for STYP_OVRFLO sections.
6849 (coff_compute_section_file_positions): If RS6000COFF_C, handle
6850 reloc and lineno count overflows.
6851 (coff_write_object_contents): Call coff_count_linenumbers before
6852 coff_compute_section_file_positions. If RS6000COFF_C, handle
6853 reloc and lineno count overflows.
6854 * xcofflink.c (_bfd_xcoff_bfd_final_link): Count line numbers and
6855 relocs before dealing with .pad sections. Count overflow section
6856 headers when handling .pad sections.
6857
7906bf87
ILT
6858 * coffcode.h (coff_write_object_contents): Set a.out vstamp to 1
6859 if RS6000COFF_C.
6860
ee174815
ILT
6861 * xcofflink.c (XCOFF_DESCRIPTOR): Define.
6862 (struct xcoff_link_hash_table): Add descriptor_section and
6863 special_sections fields.
6864 (_bfd_xcoff_bfd_link_hash_table_create): Initialize new fields.
6865 (xcoff_link_add_symbols): Set linkage section alignment. Create
6866 descriptor section. Check for magic symbol names (_text, etc.),
6867 and record them in special_sections if found. Set
6868 XCOFF_DESCRIPTOR flag for a function descriptor, and set its
6869 descriptor field to point back to the function code symbol.
6870 (xcoff_sweep): Always mark the special descriptor_section.
6871 (bfd_xcoff_export_symbol): Check whether the symbol might be a
6872 function descriptor, and mark it if it is.
6873 (bfd_xcoff_size_dynamic_sections): Add new special_sections
6874 parameter, and fill it in. Allocate space for the descriptor
6875 section.
6876 (xcoff_build_ldsyms): Set XCOFF_DEF_REGULAR flag when defining
6877 global linkage code. If an undefined function descriptor is
6878 exported, arrange to define it. Warn about any other undefined
6879 exported symbol.
6880 (_bfd_xcoff_bfd_final_link): Write out the descriptor section.
6881 (xcoff_write_global_symbol): Create a function descriptor when
6882 necessary.
6883 * bfd-in.h (bfd_xcoff_size_dynamic_sections): Update declaration.
6884 * bfd-in2.h: Rebuild.
6885
0e829f18
KK
6886Thu Nov 9 08:40:23 1995 Kim Knuttila <krk@cygnus.com>
6887
6888 * coff-ppc.c (ppc_coff_link_hash_entry): new types for hashing
6889 (ppc_coff_link_hash_table): new types for hashing
6890 (ppc_coff_link_hash_newfunc): hash entry constructor
6891 (ppc_coff_link_hash_table_init): hash table initializer
6892 (ppc_coff_link_hash_table_create): hash table constructor
6893 (ppc_record_toc_entry): changed references to hash table
6894 (coff_ppc_relocate_section): changed references to hash table
6895
6896 * libcoff-in.h (coff_link_hash_entry): removed toc_offset
6897 * libcoff.h: Rebuild
6898
6899 * cofflink.c (_bfd_coff_link_hash_newfunc): removed toc_offset init
6900 (coff_link_add_symbols): removed toc_offset init
6901
7ac84736
KR
6902Thu Nov 9 04:00:38 1995 Ken Raeburn <raeburn@cygnus.com>
6903
b27cc4bc
KR
6904 * Makefile.in (.dep1): Make sure the file mkdep is to write exists
6905 first.
6906
7ac84736
KR
6907 * configure.in: Added new option --with[out]-mmap. Set USE_MMAP
6908 if it is given and mmep is available.
6909 * acconfig.h: Undef USE_MMAP.
6910 * configure, config.in: Regenerated.
6911 * aoutx.h: If USE_MMAP is not defined, do all symbol and string
6912 table handling the old way.
6913 (aout_get_external_symbols): Don't complain if last byte of string
6914 table is nonzero.
6915 * libbfd.c [HAVE_MADVISE]: Include sys/types.h and sys/mman.h.
6916 (bfd_free_window) [! USE_MMAP]: Don't define.
6917 (bfd_get_file_window,
6918 _bfd_generic_get_section_contents_in_window) [! USE_MMAP]: Abort.
6919
1b3b0c03
ILT
6920Wed Nov 8 20:03:44 1995 Eric Freudenthal <freudenthal@nyu.edu>
6921
6922 * coff-a29k.c (SIGN_EXTEND_HWORD): Use ~0xffff rather than
6923 0xffff0000.
6924
092abcdf
ILT
6925Wed Nov 8 11:31:11 1995 Ian Lance Taylor <ian@cygnus.com>
6926
33698029
ILT
6927 * coff-a29k.c (a29k_reloc): Change handling of R_IREL reloc to be
6928 compatible with AMD generated COFF files. Try to support both AMD
6929 and GNU formats simultaneously.
6930 (coff_a29k_relocate_section): Likewise.
6931
0bb8ff19
ILT
6932 * libbfd.c (bfd_get_file_window): Change writable parameter from
6933 int to boolean; update all callers. Pass MAP_SHARED if not
6934 writable--it's required on Solaris. Cast fprintf argument to
6935 avoid warning.
6936 * bfd-in.h (bfd_get_file_window): Update declaration.
6937 * bfd-in2.h: Rebuild.
6938 * aoutx.h: Update calls to bfd_get_file_window.
6939
0634a431
ILT
6940 * xcofflink.c (XCOFF_DEF_DYNAMIC): Rename from XCOFF_REF_DYNAMIC.
6941 Change all uses.
6942 (xcoff_swap_ldhdr_in): New static function.
6943 (xcoff_swap_ldsym_in): New static function.
7812bf9c 6944 (xcoff_find_reloc): Handle the case of a single reloc correctly.
0634a431
ILT
6945 (xcoff_link_add_symbols): If we just created a descriptor, pass it
6946 to _bfd_generic_link_add_one_symbol, to save a hash lookup.
417acf22 6947 Handle XTY_ER/XMC_XO symbols correctly.
0634a431
ILT
6948 (xcoff_link_add_dynamic_symbols): Rewrite to read .loader symbols
6949 rather than normal symbol table.
417acf22
ILT
6950 (bfd_xcoff_import_symbol): It's not an error if the symbol is
6951 already defined with the same absolute value.
0634a431
ILT
6952 (xcoff_mark): When considering called symbols, check whether the
6953 descriptor is from a dynamic object, rather than the symbol
6954 itself.
6955 (xcoff_build_ldsyms): Likewise.
6956
092abcdf
ILT
6957 * libbfd.c (bfd_get_file_window): Change return type to boolean.
6958 Cast realloc and malloc return values. If malloc or realloc fail,
6959 set bfd_error_no_memory.
6960 * bfd-in.h (bfd_get_file_window): Change type to boolean.
6961 * bfd-in2.h: Rebuild.
6962
d6f41a7d
KK
6963Tue Nov 7 11:53:48 1995 Kim Knuttila <krk@cygnus.com>
6964
6965 * coff-ppc.c (ppc_record_toc_entry): new function.
6966 (in_reloc_p): changed return value.
6967 (coff_ppc_relocate_section): much rework.
6968 (ppc_allocate_toc_section): new function.
6969 (ppc_process_before_allocation): new function.
6970 (ppc_coff_swap_sym_in_hook): new function.
6971
6972 * cofflink.c (_bfd_coff_link_hash_newfunc): initialize toc_offset.
6973 (coff_link_add_symbols): initialize toc_offset.
6974
6975 * peicode.h (coff_swap_sym_in): Added coff_swap_sym_in_hook
6976 (coff_swap_aouthdr_out): Added more sections to the data
6977 dictionary for the pe file header. Also changed linker version
6978 number on the ppc side.
6979 (dir_names): small improvements to the dictionary printing.
6980 (pe_mkobject_hook): save the file level flags.
6981
6982 * libcoff-in.h (coff_link_hash_entry): added toc_offset field
6983 (pe_tdata): added real_flags field
6984 (coff_tdata): added local_toc_sym_map and access macro
6985
6986 * libcoff.h (coff_link_hash_entry): added toc_offset field
6987 (pe_tdata): added real_flags field
6988 (coff_tdata): added local_toc_sym_map and access macro
6989
6990 * coffcode.h (coff_set_alignment_hook): added hook for PE.
6991 (coff_mkobject): init for local_toc_sym_map
6992 (coff_write_object_contents): set the internal_a.magic to
6993 IMAGE_NT_OPTIONAL_HDR_MAGIC which appears to be what other
6994 ppc compilers use.
6995
6bc200f2
ILT
6996Tue Nov 7 13:48:58 1995 Ian Lance Taylor <ian@cygnus.com>
6997
c0971298
ILT
6998 * ecofflink.c (_bfd_ecoff_locate_line): Keep looking through stabs
6999 entries until both the line number address and the function name
7000 address are too large.
7001
6a468850
ILT
7002 * configure.in: Call AC_CHECK_PROG to find and cache AR.
7003 * configure: Rebuilt.
7004
6bc200f2
ILT
7005 * aclocal.m4 (BFD_CC_FOR_BUILD): Don't define CC_FOR_BUILD if it
7006 is defined in the environment.
7007
c44bf94c
JL
7008Tue Nov 7 10:57:24 1995 Jeffrey A Law (law@cygnus.com)
7009
7010 * som.c (som_get_section_contents_in_window): Define to use
7011 generic version.
7012
cf587de8
ILT
7013Mon Nov 6 17:13:15 1995 Harry Dolan <dolan@ssd.intel.com>
7014
7015 * coff-i860.c: New file, based on coff-i386.c.
7016 * cpu-i860.c: New file, based on cpu-i386.c.
7017 * hosts/i860mach3.h: New file, based on hosts/i386mach3.h.
7018 * config.bfd (i860-*-mach3*, i860-*-osf1*, i860-*-coff*): New
7019 targets, using i860coff_vec.
7020 * configure.in (i860-*-mach3*, i860-*-osf1*): New hosts, using
7021 trad-core.o and hosts/i860mach3.h.
7022 (i860coff_vec): Use coff-i860.o and cofflink.o.
7023 * configure: Rebuild.
7024 * Makefile.in: Rebuild dependencies.
7025 (ALL_MACHINES): Add cpu-i860.o.
7026 (BFD32_BACKENDS): Add coff-i860.o.
7027 (CFILES): Add cpu-i860.c and coff-i860.c.
7028 * targets.c (i860coff_vec): Declare.
cf2cd4cf 7029 (bfd_target_vector): Add &i860coff_vec.
cf587de8
ILT
7030 * archures.c (bfd_i860_arch): Declare.
7031 (bfd_archures_list): Add &bfd_i860_arch.
7032 * coffcode.h (coff_set_arch_mach_hook): Handle I860 magic number.
7033 (coff_set_flags): Handle bfd_arch_i860.
7034 (coff_write_object_contents): Handle I860 a.out magic number.
7035
83c23fca
ILT
7036Mon Nov 6 14:34:07 1995 Ian Lance Taylor <ian@cygnus.com>
7037
7038 * xcofflink.c (xcoff_link_add_symbols): Set the alignment power of
7039 the created .tc section to 2.
7040 (xcoff_mark): Don't keep a .loader reloc for a call to an
7041 undefined symbol when creating a shared library.
7042 (xcoff_build_ldsyms): When creating a shared library, generate
7043 global linkage code for a call to an undefined symbol.
7044
5d9eb9c3
KR
7045Sun Nov 5 21:44:13 1995 Ken Raeburn <raeburn@cygnus.com>
7046
7047 * Makefile.in (CFILES): Rebuild list from BFD_LIBS, ALL_MACHINES,
7048 BFD32_BACKENDS, BFD64_BACKENDS.
7049 (.dep1): Put mkdep output in a separate file.
7050 Rebuilt dependencies.
7051
ffacb892
KR
7052 * ecoff.c (_bfd_ecoff_slurp_armap): Cast _bfd_read_ar_hdr return
7053 value.
7054
4fe6d901
KR
7055 Permit use of mmap when available:
7056
7057 * configure.in: Check for mmap, madvise, mprotect.
7058 * config.in, configure: Regenerated.
7059
7060 * libbfd.c (struct _bfd_window_internal): Define type.
7061 (bfd_init_window, bfd_free_window, bfd_get_file_window): New
7062 functions.
7063 (ok_to_map): New static variable for debugging.
7064 (_bfd_generic_get_section_contents_in_window): New function.
7065 * bfd-in.h (bfd_window_internal): Declare type.
7066 (bfd_window): Define type.
7067 (bfd_init_window, bfd_free_window, bfd_get_file_window): Declare.
7068 * libbfd-in.h (_bfd_generic_get_section_contents_in_window):
7069 Declare.
7070
7071 * libaout.h (struct aoutdata): Add two window fields.
7072 (obj_aout_sym_window, obj_aout_string_window): New macros.
7073 * aoutx.h (some_aout_object_p): Initialize windows.
7074 (aout_get_external_symbols): Get symbol data and strings in
7075 windows instead of explicitly allocated buffers.
7076 (slurp_symbol_table): Free window instead of memory.
7077 (bfd_free_cached_info): Release windows instead of freeing storage
7078 directly.
7079 (aout_link_free_symbols): Ditto.
7080
7081 * targets.c (bfd_target): Add new field for
7082 get_section_contents_in_window.
7083 (BFD_JUMP_TABLE_GENERIC): Updated.
7084 * aout-adobe.c, aout-target.h, binary.c, bout.c, coff-alpha.c,
7085 coff-mips.c, elfxx-target.h, i386msdos.c, i386os9k.c, ieee.c,
7086 libcoff-in.h, oasys.c, srec.c, tekhex.c, versados.c: Added new
7087 macros for get_section_contents_in_window field.
7088
d9e771e3
FF
7089Sat Nov 4 12:23:26 1995 Fred Fish <fnf@cygnus.com>
7090
7091 * core.c: Renamed to corefile.c
7092 * makefile.dos (OBJS): Change core.o to corefile.o
7093 * Makefile.in (CFILES, BFD_LIBS): Use corefile.c instead of core.c
cf2cd4cf 7094
583db7a8
ILT
7095Fri Nov 3 15:54:59 1995 Ian Lance Taylor <ian@cygnus.com>
7096
7097 * xcofflink.c (xcoff_link_add_symbols): Rename local variable sub
7098 to o. Clobber and restore the list of new csects around the call
7099 to _bfd_generic_link_add_one_symbol, in case it wants to report a
7100 linker error and the linker wants to read the symbol table. Reset
7101 the line number count of a real section even if it has no relocs.
7102 (_bfd_xcoff_bfd_final_link): If shared, set the DYNAMIC flag.
7103
7104 * coffgen.c (_bfd_coff_read_string_table): Warn if the string size
7105 is too small.
7106
68aed7db
ILT
7107Thu Nov 2 23:16:39 1995 Ian Lance Taylor <ian@cygnus.com>
7108
18a9609c
ILT
7109 * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Don't warn about
7110 an undefined symbol in a shared link.
7111
68aed7db
ILT
7112 * linker.c (_bfd_generic_link_add_one_symbol): Correct type of
7113 oldtype from bfd_link_order_type to bfd_link_hash_type. From
7114 phdm@info.ucl.ac.be (Philippe De Muyter).
7115
7f82c7e1
ILT
7116Wed Nov 1 14:26:02 1995 Manfred Hollstein KS/EF4A 60/1F/110 #40283 <manfred@lts.sel.alcatel.de>
7117
7118 * coff-m88k.c (rtype2howto): New static function.
7119 (RTYPE2HOWTO): Use it rather than a macro definition.
7120
7121 * coffcode.h (coff_write_object_contents): set internal_a.magic
7122 to PAGEMAGICPEXECPAGED #if defined (M68) && !defined (LYNXOS).
7123
4c8b9746 7124 * configure.in: m68*-motorola-sysv* does not use ptrace-core.o;
7f82c7e1
ILT
7125 define TRAD_HEADER to new file hosts/delta68.h.
7126 m88*-motorola-sysv*, however, does use ptrace-core.o.
7127 * hosts/delta68.h: New file.
7128
7129 * ptrace-core.c (ptrace_unix_core_file_p): change bfd_zmalloc to
7130 bfd_zalloc; provide proper parm abfd to calls to bfd_zalloc.
7131
619c7730
KR
7132Wed Nov 1 13:51:54 1995 Ken Raeburn <raeburn@cygnus.com>
7133
7134 * i386linux.c (MY(vec)): Declare before use.
7135
73246ff8
ILT
7136Wed Nov 1 11:45:07 1995 Ian Lance Taylor <ian@cygnus.com>
7137
e8d6d5d0
ILT
7138 * reloc16.c (bfd_coff_reloc16_get_relocated_section_contents):
7139 Pass input_bfd, not in_bfd, to bfd_coff_reloc16_extra_cases.
7140
b2193cc5
ILT
7141 * elf.c (bfd_elf_set_dt_needed_name): Don't do anything if the
7142 BFD is not of the right type.
7143 (bfd_elf_get_needed_list): Likewise.
7144 * i386linux.c (bfd_linux_size_dynamic_sections): Likewise.
7145 * sunos.c (bfd_sunos_get_needed_list): Likewise.
7146 * xcofflink.c (XCOFF_XVECP): Define.
7147 (bfd_xcoff_link_record_set): Don't do anything if the BFD is not
7148 of the right type.
7149 (bfd_xcoff_import_symbol): Likewise.
7150 (bfd_xcoff_export_symbol): Likewise.
7151 (bfd_xcoff_link_count_reloc): Likewise.
7152 (bfd_xcoff_record_link_assignment): Likewise.
7153 (bfd_xcoff_size_dynamic_sections): Likewise.
7154
baabeb74
ILT
7155 * sunos.c (sunos_scan_ext_relocs): Only check the reloc symbol
7156 table index against the number of symbols for a base relative
7157 reloc.
7158
73246ff8
ILT
7159 * coff-rs6000.c (_bfd_xcoff_sizeof_headers): Change from macro to
7160 static function.
7161 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Set
7162 full_aouthdr flag here...
7163 (_bfd_xcoff_bfd_final_link): ...not here.
7164
6ab826bd
FF
7165Tue Oct 31 12:52:02 1995 Fred Fish <fnf@cygnus.com>
7166
7167 * libelf.h: Rename to elf-bfd.h to avoid conflict with
7168 systems that have a system <libelf.h>.
7169 * Makefile.in: Globally replace libelf.h with elf-bfd.h.
7170 * bfd.c, elf.c, elf32-arc.c, elf32-gen.c, elf32-hppa.c,
7171 elf32-hppa.h, elf32-i386.c, elf32-i860.c, elf32-m68k.c,
7172 elf32-m88k.c, elf32-mips.c, elf32-ppc.c, elf32-sparc.c,
7173 elf64-gen.c, elf64-sparc.c, elfcode.h, elflink.c,
7174 elfxx-target.h: Include elf-bfd.h rather than libelf.h.
7175 * elfxx-target.h: Change libelf.h reference to elf-bfd.h.
7176
999cc186
ILT
7177Tue Oct 31 15:30:07 1995 David Mosberger-Tang <davidm@azstarnet.com>
7178
0652d579
ILT
7179 * ecoff.c (ecoff_set_symbol_info): Add new parameter weak. If
7180 set, set BSF_WEAK in symbol. Change all callers.
7181 (ecoff_get_extr): Set weakext based on BSF_WEAK.
7182 (ecoff_link_add_externals): If weakext is set, pass BSF_WEAK to
7183 _bfd_generic_link_add_one_symbol.
7184 (ecoff_indirect_link_order): Check that the section tdata relocs
7185 are not NULL before using them.
7186
999cc186
ILT
7187 * configure.in (alpha*-*-linux*): Set COREFILE to trad-core.o and
7188 define TRAD_HEADER as hosts/alphalinux.h.
7189 * configure: Rebuild.
7190 * hosts/alphalinux.h: New file.
7191 * trad-core.c (trad_unix_core_file_p): Cast u.u_ar0 to bfd_vma,
7192 not int.
7193
e6080520
ILT
7194Tue Oct 31 12:34:11 1995 Ian Lance Taylor <ian@cygnus.com>
7195
2bd0aeb9
ILT
7196 * coffcode.h (coff_slurp_symbol_table): Accept C_BCOMM and
7197 C_ECOMM storage classes.
7198
e6080520
ILT
7199 * xcofflink.c (xcoff_mark_symbol): New static function, broken out
7200 of xcoff_mark.
7201 (xcoff_mark): Call xcoff_mark_symbol.
7202 (bfd_xcoff_export_symbol): Call xcoff_mark_symbol.
7203 (bfd_xcoff_link_count_reloc): Call xcoff_mark_symbol rather than
7204 doing it by hand.
7205 (xcoff_build_ldsyms): Build a .loader symbol for an export symbol.
7206
5fe14a9f
ILT
7207Mon Oct 30 14:53:48 1995 Ian Lance Taylor <ian@cygnus.com>
7208
f630a0a4
ILT
7209 * xcofflink.c (struct xcoff_final_link_info): Add new line_filepos
7210 field.
7211 (xcoff_find_reloc): New static function.
7212 (xcoff_link_add_symbols): Use it.
7213 (_bfd_xcoff_bfd_final_link): Set finfo.line_filepos.
7214 (xcoff_link_input_bfd): Handle C_BINCL and C_EINCL. Don't
7215 relocate the value of C_DECL.
7216
5fe14a9f
ILT
7217 * elf.c (elf_fake_sections): Remove bogus BFD_ASSERT.
7218
dff77ed7
SC
7219Sat Oct 28 01:25:34 1995 steve chamberlain <sac@slash.cygnus.com>
7220
7221 * cofflink.c (_bfd_coff_generic_relocate_section): Make
7222 callback decide what goes in .relocs.
7223 * pe[i]-i386.c (TARGET_UNDERSCORE): Define.
7224 * peicode.h (pe_mkobject_hook): Only copy aouthdr if
7225 there is one.
7226
697a8fe8
ILT
7227Sat Oct 28 01:51:02 1995 Ian Lance Taylor <ian@cygnus.com>
7228
7229 * xcofflink.c (xcoff_link_add_symbols): Handle csects in the
7230 absolute section.
7231
2d7de17d
ILT
7232Fri Oct 27 18:14:39 1995 Ian Lance Taylor <ian@cygnus.com>
7233
7234 * xcofflink.c: More improvements, mostly to fix handling of
7235 constructors and a few other special cases.
7236 * coff-rs6000.c (rs6000coff_vec): Set symbol_leading_char back to
7237 zero, reverting yesterday's change.
7238 * bfd-in.h (bfd_xcoff_link_record_set): Declare.
7239 (bfd_xcoff_link_count_reloc): Declare.
7240 (bfd_xcoff_record_link_assignment): Declare.
7241 * bfd-in2.h: Rebuild.
7242
f552f751
NH
7243Fri Oct 27 14:42:15 1995 Niklas Hallqvist <niklas@appli.se>
7244
4906b2a3 7245 * PORTING, aout-arm.c, aout-encap.c, aout-target.h,
f552f751
NH
7246 aoutx.h, gen-aout.c, host-aout.c, hp300bsd.c, i386aout.c
7247 i386bsd.c, i386dynix.c, i386linux.c, i386lynx.c, i386mach3.c,
7248 i386netbsd.c, m68klynx.c, m88kmach3.c, mipsbsd.c, newsos3.c,
7249 ns32knetbsd.c, pc532-mach.c, riscix.c, sparclynx.c, sparcnetbsd.c:
7250 Change PAGE_SIZE to TARGET_PAGE_SIZE.
7251
7252 * m68knetbsd.c: Ditto as well as add support for the m68k4k object
7253 format.
7254
7255 * netbsd.h: Double ditto (incl. m68k4k support). NetBSD's text
7256 segments includes the a.out header. See to that the magic number
7257 *always* is big-endian.
7258
7259 * config.bfd: Add m68*-hp*-netbsd* case. Cross-pollinate m68k and
7260 m68k4k NetBSD configurations.
7261
7262 * configure.in, configure: Separate i386 & mips NetBSD
7263 configurations from other BSD ones. Don't assume DEC is the only
7264 thing NetBSD/mips run on. Add {m68k,ns32k,sparc}-*-netbsd*
7265 configurations. Add support for m68k4k NetBSD object format.
7266
7267 * libaout.h: Added M_68K4K_NETBSD magic.
6fd1f40d
NH
7268
7269 * m68k4knetbsd.c: New file.
cf2cd4cf 7270
f552f751
NH
7271 * hosts/{m68k,sparc}nbsd.h: Don't define HOST_BIG_ENDIAN_P.
7272
7273 * hosts/nbsd.h: Define HOST_BIG_ENDIAN_P according to
7274 <machine/endian.h>.
7275
6fd1f40d 7276 * hosts/mipsnbsd.h: New file.
cf2cd4cf 7277
867d923d
ILT
7278Thu Oct 26 14:16:47 1995 Ian Lance Taylor <ian@cygnus.com>
7279
7280 * xcofflink.c: Numerous changes to get closer to a working XCOFF
7281 linker.
7282 * libcoff-in.h (struct xcoff_tdata): Add full_aouthdr,
7283 toc_section, and entry_section fields.
7284 (struct xcoff_section_tdata): Remove ldrel_count field.
7285 * libcoff.h: Rebuild.
7286 * coffcode.h (coff_mkobject_hook): Initialize new xcoff_data
7287 fields.
7288 (coff_compute_section_file_positions): If RS6000COFF_C, generate
7289 full a.out header if full_aouthdr is set in xcoff_data.
7290 (coff_write_object_contents): Likewise. Set o_snentry and o_sntoc
7291 based on sections stored in xcoff_data.
7292 * coff-rs6000.c (xcoff_copy_private_bfd_data): Copy new xcoff_data
7293 fields.
aad2c618
ILT
7294 (xcoff_reloc_type_lookup): Handle BFD_RELOC_CTOR.
7295 (rs6000coff_vec): Set symbol_leading_char to '.'.
867d923d
ILT
7296 * coffgen.c (coff_get_symbol_info): If fix_value is set, fix the
7297 value stored in ret rather than returning a pointer value.
cf2cd4cf 7298
6bd9ffdb
MM
7299Wed Oct 25 23:10:39 1995 Michael Meissner <meissner@tiktok.cygnus.com>
7300
7301 * config.bfd (powerpc{,le}-{elf,sysv4,eabi,solaris2}): Remove MAC
7302 format for now.
7303
9d14250f
JL
7304Wed Oct 25 16:19:27 1995 Jeffrey A Law (law@cygnus.com)
7305
7306 * som.c (som_slurp_string_table): Allocate the strings with malloc
7307 since they're free'd by free_cached_info.
7308 (som_slurp_symbol_table): Similarly for the symbol table.
7309
a2bd0529
PB
7310Wed Oct 25 14:59:22 1995 Per Bothner <bothner@kalessin.cygnus.com>
7311
7312 * Makefile.in (diststuff): Don't make headers.
7313
28a0c103
ILT
7314Wed Oct 25 11:32:54 1995 Ian Lance Taylor <ian@cygnus.com>
7315
356cd465
ILT
7316 * Makefile.in: Rebuild dependencies.
7317
1edd3a7b
ILT
7318 * sunos.c (bfd_sunos_record_link_assignment): Don't do anything if
7319 output_bfd is not SunOS.
7320 (bfd_sunos_size_dynamic_sections): Likewise. Don't scan relocs of
7321 non-SunOS input files.
7322
28a0c103
ILT
7323 * xcofflink.c: Extensive changes to support linking shared objects
7324 and generating a .loader section.
7325 * libcoff-in.h (struct xcoff_tdata): Add import_file_id field.
b73322d9
ILT
7326 (struct xcoff_section_tdata): Add lineno_count, first_symndx,
7327 last_symndx, and ldrel_count fields.
28a0c103
ILT
7328 * libcoff.h: Rebuild.
7329 * coff-rs6000.c (xcoff_howto_table): Correct reloc names.
7330 * coffcode.h (styp_to_sec_flags): Don't set any flags if STYP_PAD
7331 is set.
7332 * bfd-in.h (bfd_xcoff_import_symbol): Declare.
7333 (bfd_xcoff_export_symbol): Declare.
7334 (bfd_xcoff_size_dynamic_sections): Declare.
7335 * bfd-in2.h: Rebuild.
7336
aadf04f7
SS
7337Tue Oct 24 17:44:20 1995 Stan Shebs <shebs@andros.cygnus.com>
7338
7339 * configure.in: Add xcofflink.o to pmac_xcoff_vec.
7340 * configure: Rebuild.
7341 * mpw-config.in: Add xcofflink.c.o to powerpc-apple-macos.
7342 * coff-pmac.c: Include coff-rs6000.c instead of duplicating its
7343 contents.
7344 (pmac_xcoff_vec): Update to use new xcoff support.
7345 * coff-rs6000.c (xcoff_generic_stat_arch_elt): Make static.
7346 (xcoff_write_armap): Declare buf as unsigned char.
7347 * xcofflink.c (xcoff_link_add_symbols): Declare a local as PTR.
7348
7349 * mpw-make.sed: Generalize subdir_do edit.
cf2cd4cf 7350
ddf4639b
JL
7351Tue Oct 24 10:25:01 1995 Jeffrey A Law (law@cygnus.com)
7352
7353 * hppabsd-core.c (make_bfd_asection): Initialize asect->filepos
7354 correctly. Don't initialize asect->vma.
7355
e7bedf65
KR
7356Fri Oct 20 13:23:48 1995 Ken Raeburn <raeburn@cygnus.com>
7357
7358 * opncls.c (_bfd_new_bfd): If _bfd_chunksize wasn't preset, use
7359 something a little less than the page size.
7360
7361Thu Oct 19 13:06:09 1995 Ian Lance Taylor <ian@cygnus.com>
7362
7363 * coff-i960.c (coff_i960_adjust_symndx): Clear *adjustedp.
7364
3a70e298
SC
7365Wed Oct 18 16:20:08 1995 steve chamberlain <sac@slash.cygnus.com>
7366
7367 * coff-i386.c (coff_i386_reloc_type_lookup): New.
7368 * coffcode.h (coff_write_object_contents): If .bss is before
7369 .data us that as data_start.
7370 * cofflink.c (_bfd_coff_generic_relocate_section): Get reloc
7371 calc correct.
7372 * peicode.h (add_data_entry): Use _cooked_size of data directory.
7373 (coff_swap_outhdr_out): Hardwire in version number.
cf2cd4cf 7374
5a2846e3
KR
7375Wed Oct 18 16:50:54 1995 Ken Raeburn <raeburn@cygnus.com>
7376
3c3a5268
KR
7377 * sunos.c (sunos_add_dynamic_symbols): Rename local variables
7378 major and minor to *_vno, since the former are also macros in
7379 SunOS header files. Cast result of bfd_alloc to appropriate
7380 type.
7381
5a2846e3
KR
7382 * coffgen.c (coff_find_nearest_line): Cast used_by_bfd value
7383 before assigning to sec_data.
7384
0f6c885e
ILT
7385Wed Oct 18 13:25:17 1995 Ian Lance Taylor <ian@cygnus.com>
7386
7387 * ecoff.c (_bfd_ecoff_find_nearest_line): The offset argument is
7388 now relative to the section, not absolute.
7389 * ecofflink.c (_bfd_ecoff_locate_line): Use the right symbol to
7390 get the file name when there is a N_SO directory name. When
7391 handling stabs, remember that section->vma was added to the
7392 offset.
7393
11fa6636
ILT
7394Tue Oct 17 18:24:54 1995 Ian Lance Taylor <ian@cygnus.com>
7395
7396 * sunos.c (struct sunos_link_hash_table): Add needed field.
7397 (sunos_link_hash_table_create): Call bfd_release, not free.
7398 (sunos_link_hash_table_create): Initialize needed field.
7399 (sunos_add_dynamic_symbols): Record needed objects.
7400 (bfd_sunos_get_needed_list): New function.
7401 * bfd-in.h (bfd_sunos_get_needed_list): Declare.
7402 * bfd-in2.h: Rebuild.
7403
c974e19e
SC
7404Mon Oct 16 14:43:59 1995 steve chamberlain <sac@slash.cygnus.com>
7405
7406 * libcoff-in.h (pe_data_type.in_reloc_p): New.
7407
22a35f0b
ILT
7408Mon Oct 16 10:52:50 1995 Ian Lance Taylor <ian@cygnus.com>
7409
54406786
ILT
7410 * bfd-in.h (struct bfd_link_needed_list): Rename from
7411 bfd_elf_link_needed_list.
7412 * bfd-in2.h: Rebuild.
7413 * elf.c, elflink.h, libelf.h: Corresponding changes.
7414
dd984644
ILT
7415 Add start at AIX linker support; no shared libraries yet.
7416 * xcofflink.c: New file.
7417 * configure.in (rs600coff_vec): Use xcofflink.o.
7418 * configure: Rebuild.
7419 * libcoff-in.h (struct xcoff_tdata): Add csects and debug_indices
7420 fields.
7421 (struct xcoff_section_tdata): Define.
7422 (xcoff_section_data): Define macro.
7423 (_bfd_xcoff_bfd_link_hash_table_create): Declare.
7424 (_bfd_xcoff_bfd_link_add_symbols): Declare.
7425 (_bfd_xcoff_bfd_final_link): Declare.
7426 (_bfd_ppc_xcoff_relocate_section): Declare.
7427 * libcoff.h: Rebuild.
7428 * coff-rs6000.c: Clean up a bit.
7429 (xcoff_mkobject): Default modtype to 1L, not RE. Initialize
7430 cputype, csects, and debug_indices.
7431 (xcoff_copy_private_bfd_data): Copy cputype.
7432 (xcoff_howto_table): Rename from rs6000coff_howto_table.
7433 (xcoff_rtype2howto): Rename from rs6000coff_rtype2howto.
7434 (xcoff_reloc_type_lookup): Rename from
7435 rs6000coff_reloc_type_lookup.
7436 (coff_relocate_section): Define.
7437 (_bfd_xcoff_sizeof_headers): Define.
7438 (_bfd_xcoff_bfd_get_relocated_section_contents): Define.
7439 (_bfd_xcoff_bfd_relax_section): Define.
7440 (_bfd_xcoff_bfd_link_split_section): Define.
7441 (rs6000coff_vec): For BFD_JUMP_TABLE_LINK, use _bfd_xcoff, not
7442 coff.
7443 * coffcode.h (coff_compute_section_file_positions): If AIX,
7444 increment sofar by SMALL_AOUTSZ if not executable.
7445 (coff_write_object_contents): If AIX, always output an a.out
7446 header; if not executable, header size of SMALL_AOUTSZ.
7447 * hash.c (struct bfd_strtab_hash): Add xcoff field.
7448 (_bfd_stringtab_init): Initialize xcoff field.
7449 (_bfd_xcoff_stringtab_init): New function.
7450 (_bfd_stringtab_add): In XCOFF mode, leave two bytes for length.
7451 (_bfd_stringtab_emit): In XCOFF mode, write out length.
7452 * libbfd-in.h (_bfd_xcoff_stringtab_init): Declare.
7453 * libbfd.h: Rebuild.
7454 * Makefile.in: Rebuild dependencies.
7455 (BFD32_BACKENDS): Add xcofflink.o.
7456 (CFILES): Add xcofflink.c.
7457
22a35f0b
ILT
7458 * elf32-mips.c (mips_elf_symbol_processing): Set SEC_ALLOC, not
7459 SEC_NO_FLAGS, for .acommon section. From Peter Schauer
7460 <Peter.Schauer@Regent.E-Technik.TU-Muenchen.DE>.
7461
fb417a21
MM
7462Sat Oct 14 21:36:02 1995 Michael Meissner <meissner@tiktok.cygnus.com>
7463
7464 * coff-ppc.c (in_reloc_p): Add, clone from coff-i386.c.
7465
7466Fri Oct 13 17:48:43 1995 Ken Raeburn <raeburn@cygnus.com>
7467
7468 * acconfig.h (HAVE_SYS_PROCFS_H): Undef, with comment.
7469 * config.in: Regenerated.
7470
7471 * opncls.c (getpagesize) [!HAVE_GETPAGESIZE]: Define as 2048.
7472 (_bfd_chunksize): New variable.
7473 (_bfd_new_bfd): Set it to getpagesize() if negative, and use it
7474 for obstack chunk size.
7475 * configure.in: Check for getpagesize.
7476 * configure: Regenerated.
7477
7478 Mon Sep 25 22:49:32 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
7479
7480 * trad-core.c (rawptr): Make it a local variable of
7481 ptrace_unix_core_file_p.
7482
b1e46369
SC
7483Fri Oct 13 11:22:01 1995 steve chamberlain <sac@slash.cygnus.com>
7484
7485 * coff-arm.c (in_reloc_p): New.
7486 * coff-i386.c (in_reloc_p): New.
7487 * coffcode.h: Allways include peicode.h if COFF_WITH_PE.
7488 (coff_write_object_contents): Only set has_reloc_section
7489 if PE_IMAGE.
7490 * cofflink.c (_bfd_coff_generic_relocate_section): Call
7491 in_reloc_p to decide if reloc should be emitted.
7492 * libcoff.h (pe_data_type.in_reloc_p): New.
7493 * peicode.h (pe_mkobject): Initialize in_reloc_p.
7494
ee9f09cd
ILT
7495Wed Oct 11 00:49:29 1995 Ian Lance Taylor <ian@cygnus.com>
7496
b1e46369
SC
7497 * cofflink.c (_bfd_coff_internal_syment_name): Move to coffgen.c.
7498 (_bfd_coff_read_internal_relocs): Likewise.
7499 * coffgen.c (_bfd_coff_internal_syment_name): Copy from coffgen.c.
7500 (_bfd_coff_read_internal_relocs): Likewise.
7501
ee9f09cd
ILT
7502 * elflink.h (elf_link_add_object_symbols): Correct conditions
7503 under which type and size change warnings are issued.
7504
78b31b6b
ILT
7505Tue Oct 10 18:32:46 1995 Ian Lance Taylor <ian@cygnus.com>
7506
7507 * coffgen.c (coff_count_linenumbers): Don't count line numbers for
7508 a symbol which is not in a real section.
7509 (coff_write_native_symbol): Corresponding change.
7510
7511 * cofflink.c (_bfd_coff_link_hash_newfunc): Rename from
7512 coff_link_hash_newfunc and make non-static.
7513 (_bfd_coff_link_hash_table_init): New function, broken out of
7514 _bfd_coff_link_hash_table_create.
7515 (_bfd_coff_link_hash_table_create): Use it.
7516 (process_embedded_commands): Make static.
7517 * libcoff-in.h ((_bfd_coff_link_hash_newfunc): Declare.
7518 (_bfd_coff_link_hash_table_init): Declare.
7519 * libcoff.h: Rebuild.
7520
7521 * coffcode.h (coff_mkobject_hook): If RS6000COFF_C, set cputype
7522 field in XCOFF tdata.
7523 (coff_set_arch_mach_hook): Check ifdef RS6000COFF_C, not ifdef
7524 U802ROMAGIC, for clarity. Try to set arch and machine correctly
7525 based on cputype stored in a.out header, or in n_type of initial
7526 .file symbol.
7527 (coff_write_object_contents): Set cputype correctly in a.out
7528 header.
7529 (coff_slurp_symbol_table): Add casts to file_ptr to avoid
7530 warnings.
7531 * coffswap.h (coff_swap_aouthdr_in): Swap in cputype field.
7532 (coff_swap_aouthdr_out): Swap out cputype field. Don't clear
7533 old resv1 field.
7534 * libcoff-in.h (struct xcoff_tdata): Add cputype field.
7535 * libcoff.h: Rebuild.
7536
7537 * cpu-rs6000.c (rs6000_compatible): New static function.
7538 (bfd_rs6000_arch): Use it.
7539 * cpu-powerpc.c (powerpc_compatible): New static function.
7540 (arch_info_struct): Define various flavours of PowerPC.
7541 (bfd_powerpc_arch): Use powerpc_compatible. Point at
7542 arch_info_struct.
7543
9dd7e56f
FF
7544Tue Oct 10 10:50:46 1995 Fred Fish <fnf@cygnus.com>
7545
78b31b6b 7546 * Makefile.in (FLAGS_TO_PASS): Remove BISON.
9dd7e56f 7547
8235c112
ILT
7548Tue Oct 10 01:28:29 1995 Ian Lance Taylor <ian@cygnus.com>
7549
7550 * elflink.h (elf_link_add_object_symbols): Don't warn about
7551 changing the size or type if the old definition was weak.
7552
0322af0d
ILT
7553Mon Oct 9 11:24:08 1995 Ian Lance Taylor <ian@cygnus.com>
7554
49488f2b
ILT
7555 * coffcode.h (combined_entry_type): Add fix_line field.
7556 (coff_slurp_line_table): Warn if we try to set the lineno field of
7557 a symbol twice.
7558 (coff_slurp_symbol_table): If RS6000COFF_C, handle C_BINCL and
7559 C_EINCL by setting fix_line. Fix C_BSTAT symbol value.
7560 * coffgen.c (coff_mangle_symbols): Handle fix_line.
7561 (coff_write_symbol): Only use N_DEBUG if the symbol is in the
7562 absolute section.
7563 (coff_print_symbol): Print fix_value symbols in a useful fashion.
7564 * libcoff.h: Rebuild.
7565
5f710a3a
ILT
7566 * libcoff-in.h (struct xcoff_tdata): Define.
7567 (xcoff_data): Define.
7568 * bfd.c (struct _bfd): Add xcoff_obj_data field to tdata union.
7569 * bfd-in2.h, libcoff.h: Rebuild.
7570 * coff-rs6000.c (xcoff_mkobject): New static function.
7571 (coff_mkobject): Define.
7572 (xcoff_copy_private_bfd_data): New static function.
7573 (coff_bfd_copy_private_bfd_data): Define.
7574 (rs6000coff_howto_table): Change R_TOC complain_on_overflow from
7575 signed to bitfield.
7576 (rs6000coff_vec): Add DYNAMIC to object_flags.
7577 * coffcode.h (sec_to_styp_flags): If RS6000COFF_C, handle .pad and
7578 .loader sections specially.
7579 (coff_new_section_hook): If RS6000COFF_C, get the .text and .data
7580 section alignment from the XCOFF tdata information.
7581 (coff_mkobject_hook): If RS6000COFF_C, set DYNAMIC based on
7582 F_SHROBJ, and copy the extra a.out header information into the
7583 XCOFF tdata structure.
7584 (coff_write_object_contents): If RS6000COFF_C, set F_SHROBJ,
7585 F_DYNLOAD and the extra a.out header information.
7586 (coff_slurp_symbol_table): Set BSF_NOT_AT_END for a C_EXT or
7587 C_HIDEXT symbol with attached csect information.
7588 * coffswap.h (coff_swap_aouthdr_in): If RS6000COFF_C, swap
7589 in the o_maxdata field.
7590 (coff_swap_aouthdr_out): If RS6000COFF_C, swap extra XCOFF fields.
7591 * coffgen.c (coff_renumber_symbols): Don't move any symbol to the
7592 end if BSF_NOT_AT_END is set.
3f2c5b2d 7593
0322af0d
ILT
7594 * targets.c (bfd_target): Rename _bfd_read_ar_hdr field to
7595 _bfd_read_ar_hdr_fn.
7596 * libbfd-in.h (_bfd_read_ar_hdr): Update accordingly.
7597 * bfd-in2.h, libbfd.h: Rebuild.
7598 * archive.c (_bfd_get_elt_at_filepos): Cast _bfd_read_ar_hdr
7599 return value.
7600 (do_slurp_bsd_armap, do_slurp_coff_armap): Likewise.
7601 (bfd_slurp_bsd_armap_f2): Likewise.
7602 (_bfd_slurp_extended_name_table): Likewise.
7603
3266eaff
KR
7604Fri Oct 6 16:18:35 1995 Ken Raeburn <raeburn@cygnus.com>
7605
7606 Mon Sep 25 22:49:32 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
7607
7608 * archive.c (bfd_get_next_mapent): Return BFD_NO_MORE_SYMBOLS
7609 when the symbol table is empty.
7610
7611 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Don't reserve
7612 space for section symbols, since we don't output them either.
7613 (elf_m68k_adjust_dynindx): Removed.
7614
7615 * ptrace-core.c (rawptr): Make it a local variable of
7616 ptrace_unix_core_file_p.
3266eaff 7617
249479fa
MM
7618Fri Oct 6 12:24:47 1995 Michael Meissner <meissner@tiktok.cygnus.com>
7619
45b5d2f0
MM
7620 * coff-rs6000.c (xcoff_write_archive_contents): Return false, not
7621 NULL.
7622
249479fa
MM
7623 * config.bfd (powerpc{,le}-{elf,sysv4,eabi,solaris2}): Add NT, and
7624 Mac object file formats.
7625
c53fac12
ILT
7626Fri Oct 6 12:04:02 1995 Ian Lance Taylor <ian@cygnus.com>
7627
4372f33f
ILT
7628 * coffgen.c (coff_fix_symbol_name): Don't try to set up file
7629 auxent if there isn't one.
7630 (coff_write_symbols): If there is no file auxent, use SYMNMLEN
7631 rather than FILNMLEN as the maximum name length.
7632
0fc9ada9
ILT
7633 * coffcode.h (bfd_coff_backend_data): Add new field
7634 _bfd_coff_print_aux.
7635 (bfd_coff_print_aux): New static function.
7636 (coff_pointerize_aux_hook (RS6000COFF_C version)): Pointerize the
7637 scnlen field of an XTY_LD csect aux entry.
7638 (coff_print_aux): New static function.
7639 (coff_slurp_symbol_table): Don't pointerize scnlen field; now done
7640 in coff_pointerize_aux_hook.
7641 (bfd_coff_std_swap_table): Initialize new field.
7642 * coffgen.c (coff_print_symbol): Call bfd_coff_print_aux.
7643 * libcoff.h: Rebuild.
7644 * coff-alpha.c (alpha_ecoff_backend_data): Initialize new field.
7645 * coff-mips.c (mips_ecoff_backend_data): Likewise.
7646
7860fe38
ILT
7647 * coffcode.h (coff_write_object_contents): On AIX, clear F_RELFLG
7648 if there are symbols, for native AIX ld compatibility.
7649
c80cc833
ILT
7650 * coffcode.h (bfd_coff_backend_data): Add new field
7651 _bfd_coff_pointerize_aux_hook.
7652 (coff_pointerize_aux_hook): Define as a function if RS6000COFF_C
7653 or I960, and as 0 otherwise.
7654 (bfd_coff_std_swap_table): Initialize new field.
7655 * libcoff.h: Rebuild.
7656 * coffgen.c (coff_pointerize_aux): Change parameters to take
7657 symbol pointer instead of type and class, and to take aux index.
7658 Call _bfd_coff_pointerize_aux_hook if it is defined.
7659 (coff_get_normalized_symtab): Always call coff_pointerize_aux.
7660 * coff-alpha.c (alpha_ecoff_backend_data): Initialize all fields.
7661 * coff-mips.c (mips_ecoff_backend_data): Likewise.
7662
c53fac12
ILT
7663 * coff-rs6000.c: Add full support for AIX archives. Rewrite old
7664 read-only/host-only support.
7665
7666 * coffcode.h (coff_slurp_symbol_table): Set C_HIDEXT symbols to be
7667 BSF_LOCAL.
d11e6b52
ILT
7668 (OTHER_GLOBAL_CLASS): Do not define to be C_HIDEXT if
7669 RS6000COFF_C.
c53fac12
ILT
7670
7671 * targets.c (bfd_target): Add _bfd_read_ar_hdr field. Modify
7672 BFD_JUMP_TABLE_ARCHIVE accordingly.
7673 * libbfd-in.h (_bfd_snarf_ar_hdr): Don't declare.
7674 (_bfd_compute_and_write_armap): Declare.
7675 (_bfd_generic_read_ar_hdr): Declare.
7676 (_bfd_read_ar_hdr): Define.
7677 (_bfd_noarchive_read_ar_hdr): Define.
7678 (_bfd_archive_bsd_read_ar_hdr): Define.
7679 (_bfd_archive_coff_read_ar_hdr): Define.
7680 * archive.c: Change all callers of _bfd_snarf_ar_hdr to call
7681 _bfd_read_ar_hdr instead.
7682 (_bfd_generic_read_ar_hdr): Rename from _bfd_snarf_ar_hdr.
7683 (_bfd_compute_and_write_armap): Rename from
7684 compute_and_write_armap. Make non-static. Change all callers.
7685 * ecoff.c (_bfd_ecoff_slurp_armap): Call _bfd_read_ar_hdr rather
7686 than _bfd_snarf_ar_hdr.
7687 * aout-target.h (MY_read_ar_hdr): Define if not defined.
7688 * ieee.c (ieee_read_ar_hdr): Define.
7689 * libecoff.h (_bfd_ecoff_read_ar_hdr): Define.
7690 * oasys.c (oasys_read_ar_hdr): Define.
7691 * som.c (som_read_ar_hdr): Define.
7692 * bfd-in2.h, libbfd.h: Rebuild.
7693
f8e47484
SC
7694Thu Oct 5 14:04:07 1995 steve chamberlain <sac@slash.cygnus.com>
7695
7696 * peicode.c (coff_swap_filehdr_in): If symptr is
7697 zero, there aren't any symbols, even if nsyms is set.
7698
2b874a2d
ILT
7699Thu Oct 5 11:45:02 1995 Ian Lance Taylor <ian@cygnus.com>
7700
aca73687
ILT
7701 * libecoff.h (struct ecoff_backend_data): Add adjust_headers
7702 field.
7703 * ecoff.c (ecoff_sec_to_styp_flags): Check for various Alpha
7704 sections, and set styp correctly for them: .got, .hash, .dynamic,
7705 .liblist, .rel.dyn, .conflic, .dynstr, .dynsym, .comment.
7706 (_bfd_ecoff_styp_to_sec_flags): Check for various Alpha section
7707 types.
7708 (ecoff_sort_hdrs): New static function.
7709 (ecoff_compute_section_file_positions): Return boolean, not void.
7710 Sort the sections by VMA before looking through them. Put the
7711 first non SEC_ALLOC section on a new page. Put every SEC_ALLOC
7712 section on an appropriate boundary within the page.
7713 (ecoff_compute_reloc_file_positions): Check return value of
7714 ecoff_compute_section_file_positions.
7715 (_bfd_ecoff_set_section_contents): Likewise.
7716 (_bfd_ecoff_write_object_contents): Check for various Alpha
7717 section types when incrementing text_size and data_size. Call
7718 adjust_headers backend function if it exists.
7719 * coff-alpha.c (alpha_adjust_headers): New static function.
7720 (alpha_ecoff_backend_data): Initialize adjust_headers field.
7721 * coff-mips.c (mips_ecoff_backend_data): Likewise.
7722
2b874a2d
ILT
7723 * hosts/i386bsd.h: Restore file incorrectly deleted on Sep 6.
7724
c780e5db
JL
7725Wed Oct 4 18:15:02 1995 Jeff Law (law@hurl.cygnus.com)
7726
7727 * rs6000-core.c (CORE_VERSION_1): Use CORE_VERSION_1 instead
7728 of ALTERNATE_AIX_CORE_FORMAT.
7729 * configure.in (aix4): No longer need CORE_FLAGS.
7730 * configure: Updated.
7731
2a01c351
KR
7732Wed Oct 4 15:36:36 1995 Ken Raeburn <raeburn@cygnus.com>
7733
7734 NS32k changes from Ian Dall:
7735 * aoutx.h (MY_final_link_relocate, MY_relocate_contents): New
7736 macros.
7737 (aout_link_input_section_std, aout_link_input_section_ext,
7738 aout_link_reloc_link_order): Call them instead of _bfd_*
7739 versions.
7740 * aout-target.h (MY_exec_header_not_counted): New macro, defaults
7741 to zero.
7742 (backend_data): Use it instead of hardcoded zero.
7743
7744 * aout-ns32k.c (CTOR_TABLE_RELOC_HOWTO): New macro.
7745 (MY_swap_std_reloc_out): Use udata.i for KEEPIT, don't call stoi.
7746
7747 * ns32knetbsd.c: Include bfd.h.
7748 (MY_text_includes_header, MY_bfd_reloc_type_lookup): New macros.
7749 (MY_bfd_reloc_type_lookup): Declare function too.
7750 * pc532-mach.c (set_sizes): Don't declare.
7751 (MY_text_includes_header, MY_exec_header_not_counted): Define.
7752 (backend_data, MY_backend_data): Don't define.
7753
7754 * config.bfd: Treat ns32k-pc532-ux* like ns32k-pc532-mach*, and
7755 ns32k-*-lites* like ns32k-*-netbsd*.
7756
7757 * hosts/nbsd.h: Swap order of sys/vmparam.h and sys/param.h, to
7758 compile on lites.
7759
5944d75b
ILT
7760Wed Oct 4 14:15:52 1995 Ian Lance Taylor <ian@cygnus.com>
7761
7762 * coffcode.h (coff_write_object_contents): Restore setting
7763 f_timdat to 0, deleted on August 22.
7764
db344f82
SC
7765Tue Oct 3 16:28:32 1995 steve chamberlain <sac@slash.cygnus.com>
7766
7767 * coffcode.h (coff_bfd_copy_private_symbol_data,
7768 coff_bfd_copy_private_section_data,
7769 coff_bfd_copy_private_bfd_data): ifdef to allow overrides.
7770 * peicode.h (coff_bfd_copy_private_bfd_data): New
7771 (pe_bfd_copy_private_bfd_data): New.
7772 (coff_swap_scnhdr_in): Swap bss size into the right place.
7773 (pe_print_private_bfd_data): Add some newlines.
5944d75b 7774
c780e5db 7775Tue Oct 3 11:53:04 1995 Jeff Law (law@hurl.cygnus.com)
97f1feda
JL
7776
7777 * som.c (setup_sections): Don't die if a space has no subspaces.
7778
3d7c42c9
ILT
7779Mon Oct 2 14:08:55 1995 Ian Lance Taylor <ian@cygnus.com>
7780
7781 * elflink.h (elf_link_add_object_symbols): Don't let a weak
7782 dynamic symbol override a common symbol. Don't change the size or
7783 type if they have been set and the new symbol is not a definition.
7784 Warn if the size or type changes.
7785
c780e5db 7786Sun Oct 1 01:34:41 1995 Jeff Law (law@hurl.cygnus.com)
709af562
JL
7787
7788 * som.c (som_begin_writing): Don't write the symbol table or
7789 symbol strings.
7790 (som_finish_writing): Write them here. Place them after the
7791 subspace data, but before the relocs.
7792
7793Fri Sep 29 11:01:55 1995 Ian Lance Taylor <ian@cygnus.com>
7794
7795 * sunos.c (sunos_add_one_symbol): Just pass false, not
7796 info->shared_library, to sunos_create_dynamic_sections.
7797 (sunos_scan_ext_relocs): Don't warn about a reloc in the .text
7798 section.
7799 (sunos_check_dynamic_reloc): Remove .text section assertion.
7800
7009e451
SS
7801Thu Sep 28 18:48:47 1995 Stan Shebs <shebs@andros.cygnus.com>
7802
7803 * config.bfd: Add powerpc-*-macos*, powerpc-*-mpw*.
7804 * configure, configure.in: Add pmac_xcoff_vec case.
7805 * Makefile.in (BFD32_BACKENDS): Add coff-pmac.o.
7806 * coff-pmac.c: New file, PowerMac XCOFF support.
7807 * coffcode.h (coff_set_arch_mach_hook): Add PowerMac case.
7808 * targets.c (pmac_xcoff_vec): Declare.
7809
7810 * mpw-config.in: Various changes to be compatible with the
7811 autoconf-based configury.
7812 * mpw-make.sed: New file, sed commands to translate Unix
7813 makefile into MPW syntax.
7814 * mpw-make.in: Remove.
7815 * hosts/mpw.h: Remove.
7816 * bfd-in.h, bfd-in2.h: If MPW, include the file that defines
7817 true and false as enums, then define TRUE_FALSE_ALREADY_DEFINED.
7818
b91537be
SC
7819Thu Sep 28 17:06:23 1995 steve chamberlain <sac@slash.cygnus.com>
7820
7821 * binary.c (binary_get_symtab): Return an empty string on error.
7822 * opncls.c (bfd_fdpenr): Change WIN32 restriction to WINGDB.
7823
30360a6f
KK
7824Thu Sep 28 15:30:44 1995 Kim Knuttila <krk@nellie>
7825
7826 * coff-ppc.c: Reformatted according to gnu conventions
7827 Removed irrelevant "if 0" code
7828
20d1e233
ILT
7829Thu Sep 28 11:19:53 1995 Ian Lance Taylor <ian@cygnus.com>
7830
69fd4fdd
ILT
7831 * hp300hpux.c (convert_sym_type): Treat secondary symbols as weak
7832 symbols rather than as indirect symbols.
7833 (MY(slurp_symbol_table)): Don't do anything special about
7834 secondary symbols.
7835
46b5a892
ILT
7836 * coffcode.h (coff_new_section_hook): Make sure that the alignment
7837 of .ctors and .dtors sections is no larger than 2.
7838
9db59230
ILT
7839 * sunos.c (sunos_add_one_symbol): Don't change
7840 bfd_link_hash_common to bfd_link_hash_new, since it may be on the
7841 undef list.
7842 (bfd_sunos_record_link_assignment): Don't put __DYNAMIC in the
7843 dynamic symbols when creating a shared library.
7844 (sunos_scan_ext_relocs): Handle relocs correctly when creating a
7845 shared library.
7846 (sunos_scan_dynamic_symbol): Don't mark the __DYNAMIC symbol as
7847 written even if it is not defined in a regular object.
7848 (sunos_write_dynamic_symbol): Use plt_offset for the address of
7849 the jump table reloc. Add an assertion. Use RELOC_JMP_SLOT
7850 rather than the constant 22.
7851 (sunos_check_dynamic_reloc): Handle creating a shared library.
7852 (sunos_finish_dynamic_link): Set the first entry in the GOT to
7853 zero when creating a shared library.
7854 * aoutx.h (NAME(aout,final_link)): If there is a symbol __DYNAMIC,
7855 write it out at the start of the symbol table.
7856
20d1e233
ILT
7857 * Makefile.in (BFD32_BACKENDS): Add coff-arm.o.
7858
a11e10fe
DE
7859Thu Sep 28 00:58:05 1995 Doug Evans <dje@deneb.cygnus.com>
7860
7861 * config.bfd: Add arm-*-coff.
7862 * configure.in, configure: Add armcoff_{little,big}_vec.
7863 * targets.c (armcoff_{little,big}_vec): Declare.
7864 (bfd_target_vector): Add armcoff_{little,big}_vec.
7865 * coff-arm.c (armcoff_{little,big}_vec): Always define.
7866
99062cfc
ILT
7867Wed Sep 27 10:37:14 1995 Ian Lance Taylor <ian@cygnus.com>
7868
7869 * targets.c (bfd_find_target): Remove debugging code.
7870
deacbe0f
KK
7871Wed Sep 27 07:23:39 1995 Kim Knuttila <krk@nellie>
7872
cf2cd4cf 7873 * coff-ppc.c, pe-ppc.c, pei-ppc.c: Initial bfd for coff/PE
deacbe0f
KK
7874 support on powerpc.
7875 * Makefile.in: added *-ppc files
7876 * coffcode.h: ppc MAGIC, and use peicode.h rather than coffswap.h to
7877 allow pe based .o's to be shared with other tools on ppc/NT
7878 * config.bfd: added powerpc[le]-[pe|winnt] config support
cf2cd4cf 7879 * configure, configure.in: added bfd_powerpc[le]_pe[i]_vec
deacbe0f
KK
7880 * peicode.h: Added more section flags for PE on ppc
7881 Added coff_swap_filehdr_out to allow peicode.h to be
7882 used for non-image PE files on ppc.
7883 Check for image, or not, before copying pe_opthdr
7884 * targets.c: Added new bfd's
30360a6f
KK
7885 * targets.c: Removed two inactive bfds that shouldn't have made it this
7886 far.
deacbe0f 7887
d22b02e0
MM
7888Tue Sep 26 14:06:41 1995 Michael Meissner <meissner@tiktok.cygnus.com>
7889
7890 * elf32-ppc.c (ppc_reloc_type): Rename from reloc_type, and use
7891 explicit values to initialize all relocs. Change all users.
7892 (ppc_elf_brtaken_inner): New function to handle branch predicition
7893 relocs.
7894 (ppc_elf_brtaken_reloc): Ditto.
7895 (ppc_elf_howto_raw): Use new functions. Make sure all unsupported
7896 relocs use ppc_elf_unsupported_reloc.
7897 (ppc_elf_merge_private_bfd_data): Keep track of whether an error
7898 needs to be reported.
7899 (ppc_elf_relocate_section): Support branch prediction relocs.
7900
fcf490c0
ILT
7901Tue Sep 26 12:48:05 1995 Ian Lance Taylor <ian@cygnus.com>
7902
e6cb7b41
ILT
7903 * bfd.c (bfd_assert): Remove \n from string passed to
7904 _bfd_error_handler.
7905
1af85fbb
ILT
7906 * coff-i386.c: (TWO_DATA_SECS): Don't define.
7907 * coffcode.h (bfd_coff_backend_data): Remove _bfd_make_section_hook.
7908 (bfd_coff_make_section_hook): Don't define.
7909 (coff_make_section_hook): Remove.
7910 (sec_to_styp_flags): Remove TWO_DATA_SECS case.
7911 (styp_to_sec_flags): Likewise.
7912 (coff_write_object_contents): Likewise.
7913 (bfd_coff_std_swap_table): Don't initialize make_section_hook
7914 field.
7915 * libcoff.h: Rebuild.
7916 * coffgen.c (make_a_section_from_file): Just call
7917 bfd_make_section_anyway, not bfd_make_section or
7918 bfd_coff_make_section_hook.
7919 * ecoff.c (_bfd_ecoff_make_section_hook): Remove.
7920 * libecoff.h (_bfd_ecoff_make_section_hook): Don't declare.
7921 * coff-alpha.c (alpha_ecoff_backend_data): Don't initialize
7922 make_section_hook field.
7923 * coff-mips.c (mips_ecoff_backend_data): Likewise.
7924
fcf490c0
ILT
7925 * aoutx.h (translate_from_native_sym_flags): Don't try to stuff
7926 pointers into value field for warning and indirect symbols; just
7927 leave the value field alone.
7928 * linker.c (generic_link_add_symbol_list): Use next symbol for
7929 warning and indirect symbols, rather than looking in symbol value.
7930 * ecoff.c (ecoff_set_symbol_info): Remove indirect_ptr_ptr
7931 parameter. Change all callers. Remove support for indirect
7932 symbols; it didn't work anyhow.
7933 (_bfd_ecoff_slurp_symbol_table): Remove indirect_ptr variable.
7934 * syms.c: Change comments about BSF_WARNING and BSF_INDIRECT.
7935 * bfd-in2.h: Rebuild.
7936
cc47d19a
MM
7937Mon Sep 25 16:04:09 1995 Michael Meissner <meissner@tiktok.cygnus.com>
7938
7939 * elf32-ppc.c (ppc_elf_howto_raw): For all 14-bit branch relocs,
7940 go back to telling the tools this reloc operates on 32 bits.
7941
81449d47
ILT
7942Mon Sep 25 11:48:02 1995 Ian Lance Taylor <ian@cygnus.com>
7943
7a7fbffb
ILT
7944 * aout-adobe.c (aout_adobe_callback): Use _bfd_error_handler
7945 rather than a direct fprintf.
7946 * archive.c (_bfd_write_archive_contents): Likewise.
7947 * coffcode.h (coff_slurp_symbol_table): Likewise.
7948 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Likewise.
7949 (ppc_elf_unsupported_reloc): Likewise.
7950 (ppc_elf_relocate_section): Likewise.
7951 * i386linux.c (linux_tally_symbols): Likewise.
7952 (linux_finish_dynamic_link): Likewise.
7953 * osf-core.c (osf_core_core_file_p): Likewise.
7954 * rs6000-core.c (rs6000coff_get_section_contents): Likewise.
7955 * som.c (som_sizeof_headers): Likewise.
7956 * srec.c (srec_bad_byte): Likewise.
7957 * bfd.c (bfd_assert): Likewise. Also change file to be const.
7958 * libbfd-in.h (bfd_assert): Declare first parameter const.
7959 * libbfd.h: Rebuild.
7960 * coff-a29k.c (a29k_reloc): Don't bother to fprintf; returning
7961 bfd_reloc_overflow is enough.
7962 * coff-h8300.c (rtype2howto): Don't bother to fprintf; just abort.
7963 * coff-h8500.c (rtype2howto): Likewise.
7964 * coff-z8k.c (rtype2howto): Likewise.
7965 * coffcode.h (dummy_reloc16_extra_cases): Likewise.
7966 * elf.c (_bfd_elf_get_lineno): Likewise.
7967 (_bfd_elf_no_info_to_howto): Likewise.
7968 (_bfd_elf_no_info_to_howto_rel): Likewise.
7969 * hp300hpux.c (convert_sym_type): Likewise.
7970 (MY(swap_std_reloc_in)): Likewise.
7971 * elf.c (bfd_section_from_shdr): Remove #if 0 sections.
7972
f1c6dd5d
ILT
7973 * libaout.h (struct aoutdata): Add line_buf field.
7974 * aoutx.h (NAME(aout,find_nearest_line)): Remove statics buffer
7975 and filename_buffer. Instead, use a malloc buffer stored in the
7976 new line_buf field. Remove length restrictions.
7977
f0500a41
ILT
7978 * coffgen.c (string_size): Remove static variable.
7979 (debug_string_size, debug_string_section): Likewise.
7980 (coff_fix_symbol_name): Add string_size_p, debug_string_section_p,
7981 and debug_string_size_p parameters. Use them instead of the
7982 global variables. Change all callers.
7983 (coff_write_symbol): Likewise.
7984 (coff_write_alien_symbol, coff_write_native_symbol): Likewise.
7985 (coff_write_symbols): Add local variables to replace removed
7986 global variables.
7987
25b5a53d
ILT
7988 * libcoff-in.h (struct coff_section_tdata): Add offset, i,
7989 function, and line_base fields.
7990 * libcoff.h: Rebuild.
7991 * coffgen.c (coff_find_nearest_line): Use section tdata to cache
7992 information, rather than using static variables.
7993
641ac26a
ILT
7994 * sunos.c (sunos_read_dynamic_info): Adjust offsets in an NMAGIC
7995 file. From Peter DeWolf <pld@amt.tay1.dec.com>.
7996
81449d47
ILT
7997 * init.c (initialized): Remove static variable.
7998 (bfd_init): Don't bother setting initialized.
7999 (bfd_check_init): Remove.
8000 * opncls.c (_bfd_new_bfd): Don't call bfd_check_init.
8001 * libbfd.h: Rebuild.
8002
138b9b81
PS
8003Sat Sep 23 01:22:23 1995 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
8004
8005 * rs6000-core.c (rs6000coff_core_p): Don't check the core file
8006 size for full core dumps. Copy core file header to private data.
8007 (rs6000coff_core_file_failing_command,
8008 rs6000coff_core_file_failing_signal): New functions to extract
8009 the file name and terminating signal from the core file.
8010 * coff-rs6000.c: Use them.
8011
2ffbb79a
ILT
8012Fri Sep 22 17:44:47 1995 Ian Lance Taylor <ian@cygnus.com>
8013
8014 Change arch info to be const, initialized at compile time.
8015 * archures.c: Reindent many functions. Change CONST to const.
8016 (bfd_arch_info_type): Make arch_name const. Remove disassemble;
8017 nothing set it anyhow. Make next const.
8018 (bfd_arch_info_list): Remove.
8019 (bfd_archures_list): Rename from archures_init_table. Change from
8020 a table of function pointers to a table of bfd_arch_info_type
8021 structure addresses.
8022 (bfd_scan_arch): Rewrite accordingly. Return a const pointer.
8023 (bfd_lookup_arch): Likewise.
8024 (bfd_set_arch_info): Rewrite accordingly. Change argument to be a
8025 const pointer.
8026 (bfd_default_arch_struct): Make const.
8027 (bfd_arch_init, bfd_arch_linkin): Remove.
8028 (bfd_get_arch_info): Return a const pointer.
8029 * init.c (bfd_init): Don't call bfd_arch_init.
8030 * bfd.c (struct _bfd): Make arch_info const.
8031 * bfd-in2.h: Rebuild.
8032 * libbfd.h: Rebuild.
8033 * configure.in: Put & before everything in $selarchs.
8034 * configure: Rebuild.
8035 * cpu-*.c: Change bfd_*_arch from a function which calls
8036 bfd_arch_linkin to a const structure.
8037 * ieee.c (ieee_object_p): Make arch const.
8038
02f85cda
MM
8039Fri Sep 22 16:23:18 1995 Michael Meissner <meissner@tiktok.cygnus.com>
8040
8041 * reloc.c (bfd_reloc_code_type): Add relocations to support all of
8042 PowerPC V.4.
8043 * bfd-in2.h: Regenerate.
8044 * libbfd.h: Regenerate.
8045
8046 * elf32-ppc.c (reloc_type): Update names to match current draft.
8047 (ppc_elf_howto_raw): Mark 14 bit relocs as short sized and PC
8048 relative. Update names to current V.4 draft.
8049 (ppc_elf_reloc_type_lookup): Add support for more relocations.
8050 (ppc_elf_relocate_section): Rename relocations to match draft.
8051
dd82c578
MM
8052Thu Sep 21 21:53:18 1995 Michael Meissner <meissner@cygnus.com>
8053
8054 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Allow modules
8055 compiled with -mrelocatable-lib to be linked with either normal
8056 modules or -mrelocatable modules.
8057
f69e888e
ILT
8058Wed Sep 20 12:03:26 1995 Ian Lance Taylor <ian@cygnus.com>
8059
e18c4e8f
ILT
8060 * coffcode.h (coff_write_object_contents): Clear the vstamp field
8061 in the a.out header.
8062
f69e888e
ILT
8063 * aoutx.h (NAME(aout,swap_ext_reloc_out)): Don't set r_extern for
8064 a reloc against a local symbol, even if it's not a section.
8065
a5655244
ILT
8066Tue Sep 19 17:02:26 1995 Ian Lance Taylor <ian@cygnus.com>
8067
8068 * targets.c (bfd_target): Remove unused align_power_min field.
8069 * bfd-in2.h: Rebuild.
8070 * All backends: Remove initialization of align_power_min.
8071
500d7394
SC
8072Tue Sep 19 14:02:21 1995 steve chamberlain <sac@slash.cygnus.com>
8073
8074 * peicode.h (coff_swap_scnhdr_out): Get sizes for BSS right.
500d7394 8075
049df0a8
ILT
8076Mon Sep 18 14:35:01 1995 Arne H. Juul <arnej@pvv.unit.no>
8077
8078 * config.bfd (mips-dec-netbsd*): New target.
8079 * configure.host (mips-dec-netbsd*): New host.
8080 * configure.in (mips-dec-netbsd*): New native.
8081 * configure: Rebuild.
8082
1862bbd8
ILT
8083Fri Sep 15 10:24:36 1995 Ian Lance Taylor <ian@cygnus.com>
8084
8085 Make the COFF backend linker merge common types:
8086 * cofflink.c (struct coff_debug_merge_element): Define.
8087 (struct coff_debug_merge_type): Define.
8088 (struct coff_debug_merge_hash_entry): Define.
8089 (struct coff_debug_merge_hash_table): Define.
8090 (coff_debug_merge_hash_table_init): Define.
8091 (coff_debug_merge_hash_table_free): Define.
8092 (coff_debug_merge_hash_lookup): Define.
8093 (struct coff_final_link_info): Add debug_merge field.
8094 (coff_debug_merge_hash_newfunc): New static function.
8095 (_bfd_coff_final_link): Allocate and free debug_merge table.
8096 (coff_link_input_bfd): Merge identical enum, struct and union
8097 types.
8098
a208a70f
ILT
8099Thu Sep 14 14:53:58 1995 Ian Lance Taylor <ian@cygnus.com>
8100
8101 Convert i960 COFF to use COFF backend linker.
8102 * coff-i960.c (coff_i960_relocate): Use a coff_section_data
8103 structure to store the symbol being used.
8104 (coff_i960_start_final_link): New static function.
8105 (coff_i960_relocate_section): New static function.
8106 (coff_i960_adjust_symndx): New static function.
8107 (coff_start_final_link): Define.
8108 (coff_relocate_section): Define.
8109 (coff_adjust_symndx): Define.
8110 * coffcode.h (bfd_coff_backend_data): Add new callback function
8111 _bfd_coff_start_final_link.
8112 (bfd_coff_start_final_link): Define.
8113 (coff_start_final_link): Define if not defined.
8114 (bfd_coff_std_swap_table): Add coff_start_final_link.
8115 * cofflink.c (_bfd_coff_internal_syment_name): Make globally
8116 visible.
8117 (_bfd_coff_final_link): Call bfd_coff_start_final_link if the
8118 function callback is not NULL.
8119 * libcoff-in.h (struct coff_section_tdata): Add tdata field.
8120 (_bfd_coff_internal_syment_name): Declare.
8121 * libcoff.h: Rebuild.
8122 * configure.in (icoff_big_vec): Add cofflink.o.
8123 (icoff_little_vec): Likewise.
8124 * configure: Rebuild.
8125
f0abedbe
FF
8126Wed Sep 13 17:38:23 1995 Fred Fish <fnf@rtl.cygnus.com>
8127
8128 * Makefile.in (clean-info): Remove extraneous tab from line
8129 following action.
8130
aa4b3dc5
ILT
8131Wed Sep 13 13:27:53 1995 Ian Lance Taylor <ian@cygnus.com>
8132
8133 * cofflink.c (coff_link_input_bfd): Fail if a section with no
8134 contents has relocs.
8135
4ca63811 8136Thu Sep 12 12:45:34 1995 steve chamberlain <sac@slash.cygnus.com>
beee31b1
SC
8137
8138 * coffcode.h (coff_compute_section_file_positions): Keep the
cf2cd4cf 8139 raw size safe.
beee31b1
SC
8140 (coff_write_object_contents): Remember if it's a relocatable
8141 file.
8142 * libcoff-in.h (pe_data_type): New member 'has_reloc_section'
8143 * peicode.h (coff_swap_filehdr_out): Clear not-reloc flag
8144 if relocatable file. Swap out saved raw size.
8145
ae115e51
ILT
8146Tue Sep 12 12:14:33 1995 Ian Lance Taylor <ian@cygnus.com>
8147
9521bac3
ILT
8148 * Makefile.in (do_maintainer_clean): Rename from do_realclean.
8149 (maintainer-clean): Rename from realclean, passing
8150 maintainer-clean down to subdirectories, but leave realclean as a
8151 synonym.
8152
4ca63811
ILT
8153 * linker.c (_bfd_generic_link_add_one_symbol): Pass symbol name to
8154 warning callback.
8155
5aa4c3ff
ILT
8156 * dep-in.sed: Remove config.h from generated dependencies.
8157
396aaeb2
ILT
8158 * sunos.c (sunos_slurp_dynamic_symtab): New static function,
8159 broken out of sunos_canonicalize_dynamic_symtab.
8160 (sunos_canonicalize_dynamic_symtab): Call new function
8161 sunos_slurp_dynamic_symtab.
8162 (sunos_add_dynamic_symbols): Add three new parameters. Return the
8163 dynamic symbol table to the caller.
8164 * aoutx.h (aout_link_add_symbols): Permit add_dynamic_symbols
8165 callback to override the symbols being read.
8166 * libaout.h (struct aout_backend_data): Add three new parameters
8167 to add_dynamic_symbols callback.
8168
ae115e51
ILT
8169 Extensive minor changes to avoid various gcc warnings. Also:
8170 * Makefile.in (BFD32_BACKENDS): Remove coff-arm.o.
8171 * archures.c (bfd_arch_info_type): Change mach field from long to
8172 unsigned long.
8173 (bfd_lookup_arch): Change machine parameter from long to unsigned
8174 long.
8175
b088e4b2
ILT
8176Mon Sep 11 10:55:47 1995 Ian Lance Taylor <ian@cygnus.com>
8177
8178 * sunos.c (sunos_scan_std_relocs): Fix BFD_ASSERT: it's OK to find
8179 a symbol with a non-zero plt_offset.
8180
1dff7902
ILT
8181Fri Sep 8 11:47:24 1995 Ian Lance Taylor <ian@cygnus.com>
8182
2b71e1e4
ILT
8183 * elfcode.h (align_file_position): Remove; not used.
8184
1dff7902
ILT
8185 * configure.in: Only check for <sys/procfs.h> on a native system,
8186 and make sure it defines prstatus_t.
8187 * configure: Rebuild.
8188
870015b1
ILT
8189Thu Sep 7 12:48:01 1995 Ian Lance Taylor <ian@cygnus.com>
8190
535c89f0
ILT
8191 * sunos.c (sunos_write_dynamic_symbol): Correct m68k abort test.
8192
936b870c
ILT
8193 * config.in: Rename from config.h.in.
8194 * configure.in: Call AC_CONFIG_HEADER with config.h:config.in.
a7873a6c 8195 Check for config.h:config.in when creating stamp-h.
936b870c 8196 * configure: Rebuild.
a7873a6c
ILT
8197 * Makefile.in (stamp-h): Depend upon config.in rather than
8198 config.h.in. Set CONFIG_HEADERS to config.h:config.in when
8199 calling config.status.
936b870c 8200
870015b1
ILT
8201 * Makefile.in (do_distclean): Remove config.h and stamp-h.
8202 (Makefile): Just rebuild Makefile.
8203 (config.h, stamp-h): New targets.
8204 * configure.in: Create stamp-h when rebuilding config.h.
8205 * configure: Rebuild.
8206
b7577823
ILT
8207Wed Sep 6 15:00:33 1995 Ian Lance Taylor <ian@cygnus.com>
8208
8209 * configure.in: Call AC_CONFIG_HEADER. Substitute
8210 HOST_64BIT_LONG. Check that various header files exist. Check
8211 that fcntl exists. Call BFD_BINARY_FOPEN. Check whether malloc
8212 and/or free need to be declared. Don't make a link to sysdep.h.
8213 Define TRAD_HEADER for various hosts.
8214 * configure: Rebuild.
8215 * configure.host: Don't set my_host. Add definitions taken from
8216 host header files for various entries. Remove entries which now
8217 do nothing.
8218 * acconfig.h: New file.
8219 * config.h.in: New file, built by autoheader.
8220 * sysdep.h: New file.
8221 * Makefile.in (do_distclean): Don't remove sysdep.h.
8222 (RECONFIG): Remove.
8223 (LOCAL_H_DEPS): New variable.
8224 ($(BFD_LIBS)): Use $(LOCAL_H_DEPS) rather than libbfd.h and
8225 $(RECONFIG).
8226 ($(BFD_MACHINES), $(BFD_BACKENDS)): Likewise.
8227 ($(OPTIONAL_BACKENDS)): Likewise.
8228 (stmp-bfd.h): Just substitute for BFD_HOST_64BIT_LONG, rather than
8229 looking through sysdep.h.
8230 * bfd-in.h (BFD_HOST_64BIT_LONG): Define; set by Makefile.
8231 (BFD_HOST_64_BIT): Define based on BFD_HOST_64BIT_LONG.
8232 (fprintf_vma, sprintf_vma): Likewise.
8233 (int64_type, uint64_type): Don't define.
8234 * bfd-in2.h: Rebuild.
8235 * archures.c, bfd.c, srec.c: Include <ctype.h>.
8236 * elfcore.h: Check HAVE_SYS_PROCFS_H rather than HAVE_PROCFS.
8237 * lynx-core.c: Include stuff from old hosts/lynx.h.
8238 * opncls.c (bfd_fdopenr): Check HAVE_FNCTL and defined (F_GETFL),
8239 rather than NO_FCNTL.
8240 * targets.c (bfd_target_list): Check HOST_HPPAHPUX and ! __STDC__
8241 rather than NATIVE_HPPAHPUX_COMPILER.
8242 * trad-core.c: Don't include <errno.h>. Include TRAD_HEADER if it
8243 is defined.
8244 * hosts/*.h: Remove all header files which merely include,
8245 declare, and define things. Leave header files which define
8246 information needed by trad-core.c.
8247
8248 * aclocal.m4 (BFD_BINARY_FOPEN): Define.
8249 (BFD_CC_FOR_BUILD): Define.
8250 * configure.in: Use BFD_CC_FOR_BUILD.
8251 * configure: Rebuild.
8252
7a93ebdd
ILT
8253Tue Sep 5 19:35:28 1995 Ian Lance Taylor <ian@cygnus.com>
8254
4c2e4d0e
ILT
8255 * aclocal.m4: Don't try to grep ../Makefile if it doesn't exist.
8256 * configure: Rebuild.
8257
7a93ebdd
ILT
8258 * coff-sparc.c (CALC_ADDEND): Don't set the addend to the value of
8259 a global symbol.
8260
866bb9e5
JM
8261Tue Sep 5 12:48:26 1995 Jason Molenda (crash@phydeaux.cygnus.com)
8262
8263 * config.bfd: i386pe_ve -> i386pe_vec.
8264
2b79a104
ILT
8265Mon Sep 4 14:02:43 1995 Ian Lance Taylor <ian@cygnus.com>
8266
f515fb2f
ILT
8267 * configure.host: Incorporate host Makefile fragments by setting
8268 shell variables.
8269 * configure.in: Call AC_PROG_CC. Substitute CFLAGS, HDEFINES and
8270 AR. Call AC_PROG_INSTALL. Substitute CC_FOR_BUILD, choosing a
8271 value based on whether the code is being compiled by a cross
8272 compiler. Don't substitute host_makefile_frag or frags.
8273 * aclocal.m4: New file to define local AC_PROG_CC.
8274 * configure: Rebuild.
8275 * Makefile.in (INSTALL): Set to @INSTALL@.
8276 (INSTALL_PROGRAM): Set to @INSTALL_PROGRAM@.
8277 (INSTALL_DATA): Set to @INSTALL_DATA@.
8278 (AR): Set to @AR@.
8279 (CC): Define as @CC@.
8280 (CFLAGS): Set to @CFLAGS@.
8281 (CC_FOR_BUILD): Set to @CC_FOR_BUILD@.
8282 (@host_makefile_frag@): Remove.
8283 (ALL_CFLAGS): Change $(HDEFINES) to @HDEFINES@. Move $(CFLAGS)
8284 after other options.
8285 (config.status): Remove dependency upon @frags@.
8286 * config/*.mh, config/README: Remove.
8287
2b79a104
ILT
8288 * config.bfd: Rewrite to incorporate the contents of the Makefile
8289 fragments by setting shell variables, rather than merely returning
8290 the name of a Makefile fragment.
8291 * configure.in: Use shell variables set by config.bfd rather than
8292 looking at the target Makefile fragment files. Don't substitute
8293 target_makefile_frag. Do substitute TDEFINES.
8294 * configure: Rebuild.
8295 * Makefile.in (@target_makefile_frag@): Remove.
8296 (ALL_CFLAGS): Change $(TDEFINES) to @TDEFINES@.
8297 * config/*.mt: Remove.
8298
2cb159a5
KR
8299Mon Sep 4 03:13:28 1995 Ken Raeburn <raeburn@cygnus.com>
8300
8301 * configure.in: Put changequote lines around "i[345]86" patterns
8302 section of core file support.
8303
ef07871c
JL
8304Sun Sep 3 11:31:58 1995 Jeff Law (law@snake.cs.utah.edu)
8305
8306 * som.c (som_bfd_print_private_bfd_data): Define to use the
8307 generic version.
8308
1613e075
SC
8309Fri Sep 1 17:08:40 1995 steve chamberlain <sac@slash.cygnus.com>
8310
8311 * peicode.h (coff_swap_aouthdr_in): Add ImageBase to
8312 entry, text_start and data_start.
8313
a52a3ce8
ILT
8314Fri Sep 1 18:06:28 1995 Ian Lance Taylor <ian@cygnus.com>
8315
a21227ef
ILT
8316 * Makefile.in (OFILES): Remove $(TDEPFILES).
8317 * config/apollo.mt (TDEPFILES): Remove.
8318 * config/README: Update.
8319
a52a3ce8
ILT
8320 * configure.in: For a native configuration, set COREFILE and
8321 COREFLAG based on the canonical host name.
8322 * configure: Rebuild.
8323 * Makefile.in: Rebuild dependencies.
8324 (ALL_CFLAGS): Add @COREFLAG@.
8325 (OFILES): Replace $(HDEPFILES) with @COREFILE@.
8326 * coff-rs6000.c: Check AIX_CORE rather than HOST_AIX for core file
8327 support routines. Check LYNX_CORE rather than HOST_LYNX.
8328 * lynx-core.c: Check LYNX_CORE rather than HOST_LYNX.
8329 * i386lynx.c: Likewise.
8330 * m68klynx.c: Likewise.
8331 * sparclynx.c: Likewise.
8332 * rs6000-core.c: Check AIX_CORE rather than HOST_AIX.
8333 * *-core.c: Comment changes.
8334 * config/decstation.mh (HDEPFILES): Remove.
8335 (HDEFINES): Remove -DTRAD_CORE.
8336 * config/irix3.mh (RANLIB): Remove.
8337 * config/irix4.mh (HDEPFILES, RANLIB): Remove.
8338 (HDEFINES): Remove -DIRIX_CORE.
8339 * config/riscos.mh (RANLIB, HDEPFILES): Remove.
8340 (HDEFINES): Remove -DTRAD_CORE.
8341 * config/ncr3000.mh (AR_FLAGS, RANLIB): Remove.
8342 * config/ultra3.mh (RANLIB): Remove.
8343 * config/aix4.mh, config/alphaosf.mh, config/amix.mh: Remove.
8344 * config/apollo.mh, config/delta68.mh, config/delta88.mh: Remove.
8345 * config/dpx2.mh, config/esix.mh, config/harris.mh: Remove.
8346 * config/hp300.mh, config/hp300bsd.mh, config/hppabsd.mh: Remove.
8347 * config/hppahpux.mh, config/hppaosf.mh: Remove.
8348 * config/i386aix.mh, config/i386bsd.mh: Remove.
8349 * config/i386linux.mh, config/i386mach3.mh: Remove.
8350 * config/i386sco.mh, config/i386v.mh, config/i386v4.mh: Remove.
8351 * config/irix5.mh, config/m88kmach3.mh, config/mipsbsd.mh: Remove.
8352 * config/mipsmach3.mh, config/news-mips.mh: Remove.
8353 * config/news.mh, config/pc532mach.mh, config/riscix.mh: Remove.
8354 * config/rs600.mh, config/rs6000lynx.mh: Remove.
8355 * config/solaris2.mh, config/stratus.mh: Remove.
8356 * config/symmetry.mh, config/sysv4.mh, config/tahoe.mh: Remove.
8357 * config/vaxbsd.mh, config/vaxult.mh, config/vaxult2.mh: Remove.
8358
d6f672b8
ILT
8359Fri Sep 1 15:18:50 1995 Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>
8360
8361 * elflink.h (elf_bfd_final_link): Don't change a DT_INIT or
8362 DT_FINI entry if the appropriate symbol is not in the hash table.
8363
8364 * libelf.h (struct elf_backend_data): Add create_program_headers
8365 and want_hdr_in_seg fields.
8366 * elfxx-target.h (elf_backend_want_hdr_in_seg): Define if not
8367 defined.
8368 (elf_backend_create_program_headers): Likewise.
8369 (elfNN_bed): Initialize create_program_headers and
8370 want_hdr_in_seg.
8371 * elf.c (get_program_header_size): Call create_program_headers
8372 backend routine.
8373 (map_program_segments): Check want_hdr_in_seg backend field. Call
8374 create_program_headers backend routine.
8375
8376 * elf.c (assign_file_positions_except_relocs): Align non allocated
8377 sections when creating an executable.
8378
8379 * elfcode.h (elf_swap_phdr_in): Make non static.
8380 (elf_swap_phdr_out): Make non static.
8381 * libelf.h (bfd_elf32_swap_phdr_in): Declare.
8382 (bfd_elf32_swap_phdr_out): Declare.
8383 (bfd_elf64_swap_phdr_in): Declare.
8384 (bfd_elf64_swap_phdr_out): Declare.
8385
8386 * ecofflink.c (ecoff_collect_shuffle): New static function.
8387 (_bfd_ecoff_get_accumulated_pdr): New function.
8388 (_bfd_ecoff_get_accumulated_sym): New function.
8389 (_bfd_ecoff_get_accumulated_ss): New function.
8390 * libbfd-in.h (_bfd_ecoff_get_accumulated_pdr): Declare.
8391 (_bfd_ecoff_get_accumulated_sym): Declare.
8392 (_bfd_ecoff_get_accumulated_ss): Declare.
8393 * libbfd.h: Rebuild.
8394
0cb70568
ILT
8395Fri Sep 1 13:20:25 1995 Ian Lance Taylor <ian@cygnus.com>
8396
d6f672b8
ILT
8397 * libecoff.h (_bfd_ecoff_bfd_print_private_bfd_data): Fix typo.
8398
0cb70568
ILT
8399 * elflink.h (elf_link_add_object_symbols): Handle indirect and
8400 warning symbols. If any section is named .gnu.warning.XXX, treat
8401 the contents as a warning to be issued if the symbol XXX is
8402 referenced.
8403 (elf_link_output_extsym): For an indirect or warning symbol, just
8404 output the symbol it points to.
8405
8406 * linker.c (_bfd_link_hash_newfunc): Don't bother to set bfd_error
8407 if bfd_hash_allocate fails, since it will already be set.
8408 (generic_link_hash_newfunc): Likewise.
8409 (archive_hash_newfunc): Likewise.
8410 (hash_entry_bfd): New static function.
8411 (_bfd_generic_link_add_one_symbol): Pass new arguments to warning
8412 callback. Allocate a new warning using the hash table newfunc.
8413 Use bfd_hash_replace to update the entry in the hash table, rather
8414 than assuming we can copy the fields with structure assignment.
8415
8416 * hash.c (bfd_hash_replace): New function.
8417 * bfd-in.h (bfd_hash_replace): Declare.
8418 * bfd-in2.h: Rebuild.
8419
f14db880
JSC
8420Fri Sep 1 08:12:50 1995 James G. Smith <jsmith@beauty.cygnus.com>
8421
8422 * config.bfd: Add mips*vr4300-*-elf* target.
8423 * config/mipsbvr4300.mt: Added.
8424
1613e075 8425See file ChangeLog.2
e6d739eb 8426
41126f15
JK
8427\f
8428Local Variables:
c6c7035c 8429mode: change-log
41126f15 8430left-margin: 8
6ec3bb6a
ILT
8431fill-column: 74
8432version-control: never
8433End:
This page took 0.642255 seconds and 4 git commands to generate.