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