Add TMS320C4x support
[deliverable/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
026df7c5
NC
12002-08-28 Svein E. Seldal <Svein.Seldal@solidas.com>
2
3 * config.bfd: Add tic4x-*-*coff* and c4x-*-*coff* target.
4 * configure.in: Add tic4x_coff vector files.
5 * configure: Regenerate.
6 * Makefile.am: Add tic4x target.
7 * Makefile.in: Regenerate.
8
92002-08-27 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
10
11 * archures.c: Add the BFD arch type tic4x.
12 * bfd-in.h: Add BFD_IN_MEMORY flag.
13 * coff-tic4x.c: New file.
14 * coffswap.h (coff_swap_sym_out): Add preadjuster.
15 * cpu-tic4x.c: New file.
16 * targets.c: Added tic4x- in list of xvecs.
17 * ticoff.h: New file.
18 * bfd-in2.h: Regenerate.
19
88f7bcd5
NC
202002-08-27 Adam Nemet <anemet@lnxw.com>
21
22 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Set the last
23 bit of DT_INIT and DT_FINI for Thumb functions.
24
c8e48751
AM
252002-08-26 Alan Modra <amodra@bigpond.net.au>
26
27 * coffcode.h (coff_set_arch_mach_hook): Handle W65MAGIC.
28
2846975a
AM
292002-08-26 Alan Modra <amodra@bigpond.net.au>
30
31 * aoutx.h (NAME(aout,reloc_type_lookup)): Handle BFD_RELOC_8.
32
067653c5
AM
332002-08-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
34
35 * elf32-sh.c (sh_elf_copy_indirect_symbol): New.
36 (create_got_section, allocate_dynrelocs, readonly_dynrelocs):
37 Likewise.
38 (struct elf_sh_pcrel_relocs_copied): Removed.
39 (struct elf_sh_dyn_relocs): New.
40 (struct elf_sh_link_hash_entry): Replace pcrel_relocs_copied
41 field with dyn_relocs.
42 (struct elf_sh_link_hash_table): Add short-cuts to get dynamic
43 sections and sym_sec.
44 (sh_elf_link_hash_newfunc): Clear dyn_relocs.
45 (sh_elf_link_hash_table_create): Clear shorts-cuts and sym_sec.
46 (sh_elf_create_dynamic_sections): Use create_got_section instead
47 of _bfd_elf_create_got_section.
48 (sh_elf_check_relocs): Likewise.
49 (sh_elf_create_dynamic_sections): Use short-cuts to the dynamic
50 sections.
51 (sh_elf_adjust_dynamic_symbol, sh_elf_size_dynamic_sections,
52 sh_elf_relocate_section, sh_elf_check_relocs,
53 sh_elf_finish_dynamic_symbol, sh_elf_finish_dynamic_sections):
54 Likewise.
55 (sh_elf_adjust_dynamic_symbol): Handle nocopyreloc. Keep the
56 dynamic relocations and avoiding the copy relocation when we
57 didn't find any dynamic relocations in the section which has
58 contents or is read-only.
59 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
60 (sh_elf_size_dynamic_sections): Don't reset the size of
61 .rela.got section even if dynamic_sections_created flag is off.
62 Don't use sh_elf_discard_copies. Scan all input bfd and use
63 allocate_dynrelocs. Call readonly_dynrelocs to determine
64 whether we need DT_TEXTREL.
65 (sh_elf_adjust_dynamic_symbol): Use plt.refcount to determine
66 whether the symbol was never referred to.
67 (sh_elf_relocate_section): Use WILL_CALL_FINISH_DYNAMIC_SYMBOL.
68 (sh_elf_gc_sweep_hook): Fill with the real sweep function.
69 (sh_elf_check_relocs): Call create_got_section if the short-cut
70 to .got is null. Increment reference counters only instead of
71 allocating space on dynamic sections here. Don't conditionalize
72 uninitialized got.offset value when marking the symbol as a
73 global offset table entry. Keep relocations for symbols satisfied
74 by a dynamic library to avoid copy relocations for the symbol.
75 Set dynobj field of an elf hash table if needed.
76 (sh_elf_finish_dynamic_sections): Handle null section pointer
77 correctly.
78 (elf_backend_copy_indirect_symbol): Defined.
79 (elf_backend_can_refcount): Defined.
80
7e326afc
NC
812002-08-23 Nick Clifton <nickc@redhat.com>
82
83 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Undo
84 previous change. Add comment explaining why.
85
c8614e8e
AM
862002-08-23 Stephen Clarke <stephen.clarke@superh.com>
87
88 * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le): Copy
89 contents of .got.plt[2] to tr0, not address of .got.plt.
90 (sh_elf_finish_dynamic_symbol): Do not apply GOT_BIAS when
91 patching absolute plt entry. For shmedia plt entry, set bottom bit
92 of branch to plt0 as this is a branch to an shmedia instruction.
93 * elf64-sh64.c (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le):
94 Copy contents of .got.plt[2] to tr0, not address of .got.plt.
95 (elf_sh64_plt_entry_be, elf_sh64_plt_entry_le): Use ptrel to
96 branch to plt0.
97 (sh64_elf64_finish_dynamic_symbol): Do not apply GOT_BIAS when
98 patching absolute plt entry. For shmedia plt entry, branch to
99 plt0 is now ptrel, so use relative offset. Set bottom bit of
100 branch target as it is a branch to an shmedia instruction.
101
3b587c71
AM
1022002-08-23 Stephen Clarke <stephen.clarke@superh.com>,
103 Richard Shann <richard.shann@superh.com>
104
105 * elf32-sh.c (sh_elf_finish_dynamic_sections): Set LSB of DT_INIT
106 value if .init is an SHmedia function. Similarly for DT_FINI.
107 * elf64-sh64.c (sh64_elf64_finish_dynamic_sections): Likewise.
108
957dcaa8
AM
1092002-08-23 Stephen Clarke <stephen.clarke@superh.com>
110
3b587c71 111 * elf32-sh.c (sh_elf_size_dynamic_sections): Zero initialize
957dcaa8 112 dynamic section.
3b587c71 113 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
957dcaa8 114
a4263c47
NC
1152002-08-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
116
117 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use a simple
118 byte read when reading the return address register column.
119
db4ed121
NC
1202002-08-22 Nick Clifton <nickc@redhat.com>
121
122 * config.bfd: Add powepc64-*-*bsd* target.
123
ed71e111
NC
1242002-08-22 Graeme Peterson <gp@qnx.com>
125
126 * Makefile.am: Add entries for elf32-shqnx.c
127 * Makefile.in: Regenerate.
128 * config.bfd: Add support sh-*-nto* target.
129 * configure.in: Add support for bfd_elf32_sh{l}qnx_vec.
130 * configure: Regenerate.
131 * elf32-qnx.h: Changed typo "elf_i386qnx_*" to "elf_qnx_*" .
132 * elf32-sh.c: Do not include elf32-target.h if
133 ELF32_SH_C_INCLUDED is defined.
134 * elf32-shqnx.c: New file: Support for QNX.
135 * targets.c: Add bfd_elf32_sh{l}qnx_vec.
136
0ab72ee2
NC
1372002-08-22 Nick Clifton <nickc@redhat.com>
138
75c83283
NC
139 * po/tr.po: Updated Turkish translation.
140
0ab72ee2
NC
141 * syms.c (_bfd_generic_read_minisymbols): Set bfd_error if the
142 symbols are not read.
143
56780f18
AM
1442002-08-22 Alan Modra <amodra@bigpond.net.au>
145
146 * elf32-m68hc11.c: Formatting fixes.
147 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
148 * elf32-m68hc12.c: Formatting fixes.
149 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
150
b48fa14c
AM
1512002-08-22 Alan Modra <amodra@bigpond.net.au>
152
a7c71b0c
AM
153 * coff-rs6000.c (rs6000coff_vec <object_flags>): Add SEC_CODE and
154 SEC_DATA.
155 (pmac_xcoff_vec): Likewise.
156 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
157 (aix5coff64_vec): Likewise.
158
56780f18
AM
1592002-08-22 Alan Modra <amodra@bigpond.net.au>
160
b48fa14c
AM
161 * elf-bfd.h (struct elf_backend_data): Add struct elf_backend_data
162 param to elf_backend_copy_indirect_symbol.
163 (_bfd_elf_link_hash_copy_indirect): Likewise.
164 * elflink.h (elf_add_default_symbol, elf_fix_symbol_flags): Adjust
165 calls to copy_indirect_symbol.
166 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
167 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
168 * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
169 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
170 * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
171 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
172 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
173 * elfxx-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
174 * elfxx-mips.h (_bfd_mips_elf_copy_indirect_symbol): Likewise.
175 * elf.c (_bfd_elf_link_hash_copy_indirect): Likewise. Properly
176 test refcounts for "used" values.
177
8c2ab17d
AM
1782002-08-21 John David Anglin <dave@hiauly1.hia.nrc.ca>
179
180 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Add PARAMS to
181 argument declaration.
182
d62b1198
EZ
1832002-08-19 Elena Zannoni <ezannoni@redhat.com>
184
185 * archures.c (bfd_mach_ppc_e500): Added.
186 * bfd-in2.h: Rebuilt.
187 * cpu-powerpc.c (bfd_powerpc_archs): Added e500.
188
9f88ba09
AM
1892002-08-19 Alan Modra <amodra@bigpond.net.au>
190
191 * elf32-m68hc12.c (elf_backend_can_gc_sections): False.
192
df622259
AC
1932002-08-17 Andrew Cagney <ac131313@redhat.com>
194
195 * elf.c (bfd_elf_get_elf_syms): Change type of `esym' to
196 `bfd_byte'.
197
44c410de
SC
1982002-08-17 Stan Cox <scox@redhat.com>
199
200 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Use the
201 IRIX 6 segment layout for NEWABI.
202
4972a8e9
SC
2032002-08-16 Stephen Clarke <stephen.clarke@superh.com>
204
205 * bfd/elf32-sh.c (sh_elf_gc_mark_hook): For sh64, skip indirect
206 symbols when looking for section referred to by a relocation.
207 * bfd/elf64-sh.c (sh_elf64_gc_mark_hook): Likewise.
208
c5cd6d62
AM
2092002-08-15 Alan Modra <amodra@bigpond.net.au>
210
211 * elf32-i370.c: Move reloc enum to include/elf/i370.h.
212
0741c7be
HPN
2132002-08-15 Hans-Peter Nilsson <hp@axis.com>
214
215 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Add
216 missing check for whether the symbol is referenced by DSO before
217 unexporting it as an unneeded dynamic symbol.
218
e8d5d179
L
2192002-08-14 H.J. Lu <hjl@gnu.org>
220
221 * libbfd.h: Regenerate.
222
e9229007
L
2232002-08-14 H.J. Lu <hjl@gnu.org>
224
225 * config.bfd: Always add 64bit vectors to 32bit Linux/mips.
226
1fd03b5a
SC
2272002-08-14 Stephane Carrez <stcarrez@nerim.fr>
228
229 * elf32-m68hc11.c (m68hc11_relax_group): New to relax group of
230 instructions.
231 (m68hc11_direct_relax): New to define table of relaxable instructions.
232 (find_relaxable_insn): New, find a relaxable insn.
233 (compare_reloc): New to compare two relocs.
234 (m68hc11_elf_relax_section): New, relax text sections.
235 (m68hc11_elf_relax_delete_bytes): New, delete bytes and adjust branchs.
236 (elf32_m68hc11_check_relocs): New function for GC support.
237 (elf32_m68hc11_relocate_section): New function for GC support.
238 (bfd_elf32_bfd_relax_section): Define to support linker relaxation.
239 (elf_backend_check_relocs): Likewise.
240 (elf_backend_relocate_section): Likewise.
241
c828c771
L
2422002-08-13 H.J. Lu <hjl@gnu.org>
243
244 * elflink.h (NAME(bfd_elf,size_dynamic_sections): Don't count
245 definitions in shared objects when checking symbol with
246 undefined version.
247
9b701e44
SC
2482002-08-13 Stephane Carrez <stcarrez@nerim.fr>
249
250 * elf32-m68hc11.c (elf32_m68hc11_gc_mark_hook): New for section GC.
251 (elf32_m68hc11_gc_sweep_hook): Likewise.
252 (elf_backend_gc_mark_hook): Define for GC section support.
253 (elf_backend_gc_sweep_hook): Likewise.
254 (elf_backend_can_gc_sections): Likewise.
255
256 * elf32-m68hc12.c: Likewise.
257
96405e3c
SC
2582002-08-13 Stephane Carrez <stcarrez@nerim.fr>
259
260 * elf32-m68hc11.c (_bfd_m68hc11_elf_print_private_bfd_data): New.
261 (_bfd_m68hc11_elf_merge_private_bfd_data): New function.
262 (_bfd_m68hc11_elf_set_private_flags): New function.
263 Use them to set/check/print ELF flags specific to 68HC11.
264
265 * elf32-m68hc12.c (_bfd_m68hc12_elf_print_private_bfd_data): New.
266 (_bfd_m68hc12_elf_merge_private_bfd_data): New function.
267 (_bfd_m68hc12_elf_set_private_flags): New function.
268 Use them to set/check/print ELF flags specific to 68HC12.
269
dae78fb0
SC
2702002-08-13 Stephane Carrez <stcarrez@nerim.fr>
271
272 * elf32-m68hc11.c (elf_m68hc11_howto_table): Add the new relocs;
273 fix masks for PC-rel relocs.
274 (m68hc11_elf_ignore_reloc): New function.
275
276 * elf32-m68hc12.c (m68hc12_elf_special_reloc): New to handle specific
277 68HC12 banked addressing relocs.
278 (m68hc12_phys_addr): New to compute physical address of banked memory.
279 (m68hc12_phys_page): Likewise for page.
280 (m68hc12_addr_is_banked): New to see if address is in banked area.
281 (elf_m68hc12_howto_table): Add new relocs and rename to xx12.
282
3dbfec86
SC
2832002-08-13 Stephane Carrez <stcarrez@nerim.fr>
284
285 * reloc.c (BFD_RELOC_M68HC11_RL_JUMP, BFD_RELOC_M68HC11_RL_GROUP,
286 BFD_RELOC_M68HC11_LO16, BFD_RELOC_M68HC11_PAGE,
287 BFD_RELOC_M68HC11_24): New relocs for 68HC11/68HC12.
288 * bfd-in2.h: Regenerate.
289
871da94f
L
2902002-08-12 H.J. Lu <hjl@gnu.org>
291
292 * elflink.h (elf_add_default_symbol): Preserve section across
293 elf_merge_symbol.
294
59bc061d
NC
2952002-08-09 Graeme Peterson <gp@qnx.com>
296
297 * Makefile.am: Add entries for elf32-ppcqnx.c, and add
298 elf32-qnx.h dependency to elfarmqnx-nabi.c and elf32-i386qnx.c.
299 * Makefile.in: Regenerate.
300 * config.bfd: Add support for powerpc{le}-*-nto targets.
301 * configure.in: Add support for bfd_elf32_powerpc{le}qnx_vec.
302 * configure: Regenerate.
303 * elf32-i386qnx.c: Moved backend functions into a QNX specific
304 common file "elf32-qnx.h", and now include that file.
305 * elf32-qnx.h: New file: QNX specific common elf backend.
306 * elf32-ppc.c: Do not include elf32-target.h if
307 ELF32_PPC_C_INCLUDED is defined.
308 * elf32-ppcqnx.c: New file: Support for QNX.
309 * elfarmqnx-nabi.c: Include elf32-qnx.h for qnx elf backend.
310 * targets.c: Add bfd_elf32_powerpc{le}qnx_vec.
311
2b692c59
NC
3122002-08-09 Nick Clifton <nickc@redhat.com>
313
314 * po/sv.po: Updated Swedish translation.
315
d0c7ff07
TS
3162002-08-09 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
317
318 * elfxx-mips.c (mips_elf_global_got_index): Avoid segfault if
319 g->global_gotsym is NULL.
320
d8bbe778
L
3212002-08-08 H.J. Lu <hjl@gnu.org>
322
c5cd6d62 323 * elflink.h (elf_add_default_symbol): Don't warn if a definition
d8bbe778
L
324 overrides an indirect versioned symbol.
325
c366c25e
JJ
3262002-08-08 Jakub Jelinek <jakub@redhat.com>
327
328 * elf32-i386.c (elf_i386_relocate_section): Fill in proper addend
329 for R_386_TLS_TPOFF32 relocs against symndx 0.
330
31941635
L
3312002-08-07 H.J. Lu <hjl@gnu.org>
332
333 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Check symbol
334 with undefined version if needed.
335 (elf_link_assign_sym_version): Match a default symbol with a
336 version without definition. No need to hide the default
337 definition separately.
338
0f3bd64f
AM
3392002-08-08 Alan Modra <amodra@bigpond.net.au>
340
7330fb86
AM
341 * elflink.h (elf_link_output_extsym): Don't output symbols from
342 SEC_EXCLUDE sections.
343
0f3bd64f
AM
344 * aoutx.h (aout_link_write_symbols): Correct handling of warning syms.
345
a4aa0fb7
AM
3462002-08-07 Alan Modra <amodra@bigpond.net.au>
347
348 * elf64-ppc.c (edit_opd): Arrange to drop symbols for discarded .opd
349 entries.
350
34ea4a36
TS
3512002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
352
353 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Cast signedness
354 mismatch.
355
141ff970
TS
3562002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
357
358 * elfxx-mips.c (ABI_64_P): Remove superfluous check.
359
28458e7e
TS
3602002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
361
362 * elf32-mips.c (mips_reloc_map): Fix typo.
363
0121a3da
AM
3642002-08-06 Alan Modra <amodra@bigpond.net.au>
365
366 * xcofflink.c (xcoff_write_global_symbol): Set n_scnum for abs_section.
367
d006db6c
AM
3682002-08-06 Alan Modra <amodra@bigpond.net.au>
369
370 * elf64-ppc.c (ppc64_elf_howto_raw): Zero all src_mask entries.
371
8ea80f08
AM
3722002-08-06 Alan Modra <amodra@bigpond.net.au>
373
2a52da53
AM
374 * libxcoff.h: Use PARAMS on function declarations.
375 * coff-rs6000.c (xcoff_generate_rtinit): Simplify size calc.
376 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
377
8ea80f08
AM
378 * coff-rs6000.c: (xcoff_rtype2howto): Don't place reloc address in
379 addend.
380 * coff64-rs6000.c: (xcoff64_rtype2howto): Likewise.
381
cf9ab45b
AM
3822002-08-06 Alan Modra <amodra@bigpond.net.au>
383
384 * coff-rs6000.c: Formatting fixes.
385 (xcoff_calculate_relocation): Use PARAMS in declaration.
386 (xcoff_complain_overflow): Likewise.
387 (xcoff_ppc_relocate_section): Use old-style function pointer call.
388 (bfd_xcoff_backend_data): Remove useless comments.
389 (rs6000coff_vec): Likewise.
390 (bfd_pmac_xcoff_backend_data): Likewise.
391 (pmac_xcoff_vec): Likewise.
8ea80f08 392
cf9ab45b
AM
393 * coff64-rs6000.c: Formatting fixes.
394 (xcoff64_calculate_relocation): Use PARAMS in declaration.
395 (xcoff64_ppc_relocate_section): Use old-style function pointer call.
396 (bfd_xcoff_backend_data): Remove useless comments.
397 (rs6000coff64_vec): Likewise.
398 (bfd_xcoff_aix5_backend_data): Likewise.
399 (aix5coff64_vec): Likewise.
400
48bfecdd
AM
4012002-08-06 Alan Modra <amodra@bigpond.net.au>
402
a78eab4e
AM
403 * coff-rs6000.c (xcoff_howto_table): Revert some of last change to
404 mask entries. Use complain_overflow_dont for R_REF.
405 (xcoff_reloc_type_ba): Revert last change.
406 (xcoff_reloc_type_br): Likewise.
407 (xcoff_reloc_type_crel): Likewise.
408 (xcoff_ppc_relocate_section): Likewise.
409 * coff64-rs6000.c (xcoff64_reloc_type_br): Likewise.
410 (xcoff64_ppc_relocate_section): Likewise.
411 (xcoff64_howto_table): Revert some of last change to mask entries.
412 Use complain_overflow_dont for R_REF.
413
48bfecdd
AM
414 * coff-rs6000.c (xcoff_howto_table): Fix src_mask entries. Make all
415 relocs with bitsize == 16 have size = 1.
416 (xcoff_reloc_type_ba): Correct src_mask and dst_mask adjustment.
417 (xcoff_reloc_type_br): Likewise.
418 (xcoff_reloc_type_crel): Likewise.
419 (xcoff_ppc_relocate_section): Set up src_mask and dst_mask correctly.
420 * coff64-rs6000.c (xcoff64_reloc_type_br): Correct src_mask and
421 dst_mask adjustment.
422 (xcoff64_ppc_relocate_section): Set up src_mask and dst_mask correctly.
423 (xcoff64_howto_table): Fix src_mask entries. Make all relocs with
424 bitsize == 16 have size = 1.
425
fd13ed0c
DC
4262002-08-01 Denis Chertykov <denisc@overta.ru>
427
428 * elf32-ip2k.c: Processor manufacturer changed to Ubicom.
429 (struct misc): New field isymbuf. All free_* fields removed.
430 (symbol_value): Pass in internal syms. No need to swap syms in.
431 (ip2k_elf_relax_section): Use bfd_elf_get_elf_syms. Properly free
432 possibly cached info.
433 (tidyup_after_error): Removed.
434 (ip2k_elf_relax_section_pass1): Don't use removed fields of struct
435 misc. Use new field.
436 (adjust_all_relocations): Use internal syms. No need to swap syms
437 in and out.
438 (add_page_insn): Don't use removed fields of struct misc.
439
24a1ba0f
NC
4402002-08-01 Nick Clifton <nickc@redhat.com>
441
442 * elf32-arm.h: Revert previous delta.
443
a6903459
NC
4442002-08-01 Nick Clifton <nickc@redhat.com>
445
446 * configure.in (AM_INIT_AUTOMAKE): Bump version number.
447 * configure: Regenerate.
448
39a2a3eb
L
4492002-07-31 H.J. Lu <hjl@gnu.org>
450
451 * config.bfd: Add x86-64 vector to Linux/i386 if 64bit BFD is
452 selected.
453
a0dfa6a8
L
4542002-07-31 H.J. Lu <hjl@gnu.org>
455
456 * config.bfd: Add n32 vectors to 32bit Linux/mips if 64bit BFD
457 is selected.
458
cd67d266
JJ
4592002-07-31 Jakub Jelinek <jakub@redhat.com>
460
461 * elf32-i386.c (elf_i386_copy_indirect_symbol): Swap tls_type
462 if _bfd_elf_link_hash_copy_indirect will swap got.refcount.
463
4eb6b71c
NC
4642002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
465
466 * cpu-ns32k.c (_bfd_ns32k_put_immdeiate, _bfd_ns32k_get_immediate):
467 There is no 8 byte relocation type for this architecture.
468 (do_ns32k_reloc): Use bfd_vma instead of native types.
469 (bfd_ns32k_put_immediate, _bfd_ns32k_relocate_contents) put_data
470 returns void.
471 (_bfd_ns32k_put_displacement): Don't check for overflow. We can
472 rely on generic code to do that.
473 * aout-ns32k.c (howto_table): Add appropriate overflow detection
474 to all table entries.
475 (_bfd_ns32k_relocate_contents): put_data returns void.
476 * ns32k.h: (_bfd_ns32k_put_displacement, _bfd_ns32k_put_immediate)
477 (_bfd_do_ns32k_reloc_contents): Fix prototypes. put data functions
478 return void.
479
f7c33884
NC
4802002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
481
482 * aoutx.h (aout_link_check_ar_symbols): Whether to include an
483 archive object is target dependant.
484
8f64befb
NC
4852002-07-31 Adam Nemet <anemet@lnxw.com>
486
487 * elf32-arm.h (ARM_PLT_ENTRY_SIZE): Rename PLT_ENTRY_SIZE.
488 (THUMB_PLT_ENTRY_SIZE): New macro.
489 (PLT_ENTRY_SIZE): Return the appropriate *_PLT_ENTRY_SIZE.
490 (elf32_arm_plt0_entry): Rename PLT_ENTRY_SIZE to
491 ARM_PLT_ENTRY_SIZE.
492 (elf32_arm_plt_entry): Likewise.
493 (elf_backend_plt_header_size): Likewise.
494 (elf32_thumb_plt0_entry): New global.
495 (elf32_arm_finish_dynamic_sections): Use it. Put Thumb entries
496 into .plt.thumb.
497 (elf32_thumb_plt_entry): New global.
498 (elf32_arm_finish_dynamic_symbol): Use it. Use .thumb.plt for
499 Thumb entries. Set the bottom bit of the corresponding GOT entry
500 for a Thumb PLT entry.
501 (struct elf32_arm_plt_entry_info): New structure.
502 (struct elf32_arm_link_hash_entry, plt_info): New member of this
503 type.
504 (elf32_arm_link_hash_newfunc): Initialize new member.
505 (elf32_arm_final_link_relocate, R_ARM_THM_PC22 case): Handle
506 relocations against the PLT.
507 (elf32_arm_check_relocs, case R_ARM_PLT32 case): Set
508 first_rel_type if this is the first time we encounter the symbol.
509 (elf32_arm_check_relocs, case R_ARM_THM_PC22 case): New case.
510 Determine if relocation needs a PLT entry. Set first_rel_type if
511 this is the first time we encounter the symbol
512 (elf32_arm_adjust_dynamic_symbol): Create PLT entries for Thumb
513 functions as well.
514 (elf32_arm_size_dynamic_sections): Handle .plt.thumb like .plt.
515 (elf32_arm_create_dynamic_sections): New function. Create the
516 .plt.thumb section.
517 (elf_backend_create_dynamic_sections): Call it.
518
47badb7b
NC
5192002-07-31 Nick Clifton <nickc@redhat.com>
520
521 * bfd.c (bfd_alt_mach_code): Rename parameter 'index' to
522 'alternative' in order to avoid shadowing global symbol of the
523 same name.
524 * bfd-in2.h: Regenerate.
525 * libbfd.h: Regenerate.
526 * libcoff.h: Regenerate.
527
8a397dad
TS
5282002-07-31 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
529
530 * Makefile.am: Add n32 ABI support.
531 * Makefile.in: Regenerate.
532 * config.bfd: Add n32 vectors to mips64*-*-linux* targets. Treat 64
533 bit vectors for mips*-*-linux targets as optional.
534 * configure.in: Add n32 ABI vectors.
535 * configure: Regenerate.
536 * elf32-mips.c (mips_elf32_object_p): Reject n32 ABI files.
537 * elfn32-mips.c: New file, n32 ABI support.
538 * targets.c: Add n32 ABI vectors.
539
7e392df6 5402002-07-30 Graeme Peterson <gp@qnx.com>
83e1617e 541
7e392df6
NC
542 * elfarmqnx-nabi.c: New file: Support for QNX.
543 * config.bfd: Add support for arm-*-nto target.
544 * configure.in: Add support for bfd_elf32_{big|little}armqnx_vec.
545 * configure: Regenerate.
546 * Makefile.am: Add entries for elfarmqnx-nabi.c.
547 * Makefile.in: Regenerate.
548 * elf32-arm.h (ELF_MAXPAGESIZE): Do not define if already defined.
549 Do not define global function if ELFARM_NABI_C_INCLUDED is defined.
550 * elfarm-nabi.c: Do not include elf32-arm.h if
551 ELFARM_NABI_C_INCLUDED is defined.
552 * targets.c: Add bfd_elf32_{big|little}armqnx_vec.
7330fb86 553
7e392df6 5542002-07-30 Nick Clifton <nickc@redhat.com>
7330fb86 555
83e1617e
NC
556 * po/sv.po: Updated Swedish translation.
557
704afa60
JJ
5582002-07-30 Jakub Jelinek <jakub@redhat.com>
559
560 * elf.c (elf_fake_sections): Fix up .tbss sh_size and sh_type.
561
487e54f2
AM
5622002-07-30 Alan Modra <amodra@bigpond.net.au>
563
564 * aoutx.h (some_aout_object_p): Clean up tdata properly on error.
565 * archive.c (bfd_generic_archive_p): Likewise.
566 * coff-rs6000.c (_bfd_xcoff_archive_p): Likewise.
567 (_bfd_xcoff_archive_p): Use bfd_scan_vma in place of strtol.
568 * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
569 (xcoff64_archive_p): Likewise.
570 (xcoff64_openr_next_archived_file): Likewise.
571 (xcoff64_archive_p): Clean up tdata properly on error.
572 * coffgen.c (coff_real_object_p): Likewise.
573 (coff_object_p): Release filehdr and opthdr.
574 * ecoff.c (_bfd_ecoff_archive_p): Clean up tdata properly on error.
575 * ieee.c (ieee_archive_p): Likewise.
576 * ihex.c (ihex_object_p): Likewise.
577 (ihex_mkobject): Always allocate tdata.
578 * peicode.h (pe_ILF_object_p): Release bfd_alloc'd buffer on error.
579 * srec.c (srec_mkobject): Always allocate tdata.
580 (srec_object_p): Clean up tdata properly on error.
581 (symbolsrec_object_p): Likewise.
582 * versados.c (versados_object_p): Likewise.
583 * vms-misc.c (_bfd_vms_get_record): Use bfd_malloc instead of malloc,
584 and bfd_realloc instead of realloc.
585 (add_new_contents): Use bfd_alloc instead of bfd_malloc for sections.
586 * vms.c (vms_initialize): Always allocate tdata. Use bfd_alloc in
587 place of bfd_malloc, simplifying error freeing. Free hash table too.
588 (vms_object_p): Clean up tdata on error.
589 (vms_mkobject): Don't complain on stderr if vms_initialize fails.
590 (vms_close_and_cleanup): Adjust for bfd_alloc use.
591
9d46020e
AM
5922002-07-30 Alan Modra <amodra@bigpond.net.au>
593
594 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set e_flags.
595
fb39dac1
RS
5962002-07-26 Chris Demetriou <cgd@broadcom.com>
597
598 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Merge ASE
599 flags into resulting BFD.
600
7a624474
AM
6012002-07-26 Alan Modra <amodra@bigpond.net.au>
602
603 From John Reiser <jreiser@BitWagon.com>
604 * elf32-i386.c (elf_i386_link_hash_table_create): Clear
605 tls_ldm_got.refcount.
606
a4382ec6
TS
6072002-07-25 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
608
609 * elf64-mips.c: Update TODO comment.
610 (mips_elf64_higher_reloc,mips_elf64_highest_reloc,
611 mips_elf64_gprel16_reloca): Remove prototypes.
612 (mips16_jump_reloc,mips16_gprel_reloc): Add functions.
613 (UNUSED_RELOC): Replace by EMPTY_RELOC.
614 (mips_elf64_howto_table_rel): Use special R_MIPS_HI16 handling. Remove
615 wrong comments. Remove disfunctional support of R_MIPS_HIGHER and
616 R_MIPS_HIGHEST.
617 (mips_elf64_howto_table_rela): Fix handling of R_MIPS_GPREL16 and
618 R_MIPS_GOT16. Remove wrong comments.
619 (elf_mips16_jump_howto,elf_mips16_gprel_howto,
620 elf_mips_gnu_vtinherit_howto,elf_mips_gnu_vtentry_howto): New, code
621 from elf32-mips.c.
622 (mips_elf64_hi16_reloc): Fix formatting.
623 (mips_elf64_higher_reloc,mips_elf64_highest_reloc): Remove.
624 (mips_elf64_got16_reloc): Fix formatting. Remove superfluous code.
625 Better comment. Fall back to R_MIPS_GOT_DISP instead of abort().
626 (mips_elf64_gprel16_reloc): Make static. Add check for
627 partial_inplace.
628 (mips_elf64_gprel16_reloca): Remove.
629 (mips_elf64_literal_reloc): New function.
630 (mips_elf64_gprel32_reloc): Fix formatting.
631 (mips_elf64_shift6_reloc): Fix comment. Make static.
632 (mips16_jump_reloc,mips16_gprel_reloc): New functions, code from
633 elf32-mips.c.
634 (elf_reloc_map,mips_reloc_map): New mapping table, similiar as in
635 elf32-mips.c
636 (bfd_elf64_bfd_reloc_type_lookup): Use the mapping table. Enable GNU
637 specific relocations.
638 (mips_elf64_rtype_to_howto): Enable GNU specific relocations.
639 (mips_elf64_object_p): Invert logic to check for SGI-ish ABI.
640 (ELF_MAXPAGESIZE): Add comment.
641
219576a4
NC
6422002-07-25 Nick Clifton <nickc@redhat.com>
643
644 * po/sv.po: Updated Swedish translation.
645 * po/es.po: Updated Spanish translation.
646 * po/fr.po: Updated French translation.
647
8c58d23b
AM
6482002-07-25 Alan Modra <amodra@bigpond.net.au>
649
650 * elf-bfd.h (_bfd_elf32_link_record_local_dynamic_symbol): Define
651 as elf_link_record_local_dynamic_symbol.
652 (_bfd_elf64_link_record_local_dynamic_symbol): Likewise.
653 (elf_link_record_local_dynamic_symbol): Declare. Now returns int.
654 * elflink.h (elf_link_record_local_dynamic_symbol): Move to..
655 * elflink.c: .. here. Use bfd_elf_get_elf_syms. Check whether an
656 attempt is made to record a symbol in a discarded section, and
657 return `2' in that case.
658
ff3063f5
NC
6592002-07-24 Nick Clifton <nickc@redhat.com>
660
661 * po/sv.po: Updated Swedish translation.
662 * po/es.po: Updated Spanish translation.
663
f0fe0e16
AM
6642002-07-23 Alan Modra <amodra@bigpond.net.au>
665
c1fb5f8a
AM
666 * po/SRC-POTFILES.in: Regenerate.
667
f0fe0e16
AM
668 * elf-hppa.h (elf_hppa_relocate_section): If relocatable, return
669 immediately. Remove code handling relocatable linking.
670 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
671 * elf32-cris.c (cris_elf_relocate_section): Likewise.
672 * elf32-fr30.c (elf32_frv_relocate_section): Likewise.
de2d743e 673 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
f0fe0e16
AM
674 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
675 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
676 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
677 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
678 * elf32-v850.c (v850_elf_relocate_section): Likewise.
679 * elf32-vax.c (elf_vax_relocate_section): Likewise.
680 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
681 * elf32-avr.c (elf_backend_rela_normal): Define.
682 * elf32-cris.c: Likewise.
683 * elf32-fr30.c: Likewise.
de2d743e 684 * elf32-frv.c: Likewise.
f0fe0e16
AM
685 * elf32-h8300.c: Likewise.
686 * elf32-hppa.c: Likewise.
687 * elf32-ip2k.c: Likewise.
688 * elf32-sparc.c: Likewise.
689 * elf32-v850.c: Likewise.
690 * elf32-vax.c: Likewise.
691 * elf64-hppa.c: Likewise.
692 * elf64-sparc.c: Likewise.
693 * elf32-fr30.c (elf32_frv_relocate_section): Edit comment.
de2d743e 694 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
f0fe0e16
AM
695 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
696 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
697 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
698 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
699 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
700 * elf-m10200.c (USE_RELA): Don't define.
701 * elf-m10300.c: Likewise.
de2d743e 702 * elfarm-oabi.c: Likewise.
f0fe0e16
AM
703 * elf32-i370.c: Likewise.
704 * elf32-ip2k.c: Likewise.
705 * elf32-m68k.c: Likewise.
706 * elf32-mcore.c: Likewise.
707 * elf32-ppc.c: Likewise.
708 * elf32-s390.c: Likewise.
709 * elf32-vax.c: Likewise.
710 * elf64-ppc.c: Likewise.
711 * elf64-s390.c: Likewise.
712 * elf64-x86-64.c: Likewise.
713 * elfxx-ia64.c: Likewise.
714 * elf32-avr.c (USE_REL): Don't undef.
715 * elf32-ip2k.c: Likewise.
716
5e8d7549
NC
7172002-07-23 Nick Clifton <nickc@redhat.com>
718
719 * elf-bfd.h (struct elf_backend_data): Add new bitfield
720 'want_p_paddr_set_to_zero'.
721 * elfxx-target.h: Set default value for want_p_paddr_set_to_zero
722 to false;
723 * elfxx-ia64.c: Set want_p_paddr_set_zero for HPUX target.
724 * elf.c (copy_private_bfd_data): Test want_p_paddr_set_zero.
725
9e12c7db
NC
7262002-07-23 Gabor Keresztfalvi <keresztg@mail.com>
727
728 * nlmcode.h (nlm_swap_auxiliary_headers_out): Swapped the order of
729 the MeSsAgEs and CoPyRiGhT tags to make >=NW4.x NLM loaders to
730 show the Copyright string.
731 Minor formatting tidy ups.
732
0461a601
NC
7332002-07-23 Nick Clifton <nickc@redhat.com>
734
ff3063f5
NC
735 * po/fr.po: Updated French translation.
736 * po/sv.po: Updated Swedish translation.
0461a601 737
fad2542d
AM
7382002-07-23 Alan Modra <amodra@bigpond.net.au>
739
740 * elflink.h (elf_link_input_bfd): Don't change internal symbols
741 when outputting relocs.
742
c0647bfc
JT
7432002-07-20 Jason Thorpe <thorpej@wasabisystems.com>
744
745 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only insert
746 DT_PLTGOT into the dynamic section if there is a PLT.
747
d01414a5
TS
7482002-07-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
749
750 * elfxx-mips.c (_bfd_mips_elf_discard_info): New function, code from
751 elf32-mips.c.
752 (_bfd_mips_elf_write_section): Likewise.
753 * elfxx-mips.h (_bfd_mips_elf_discard_info): New prototype.
754 (_bfd_mips_elf_write_section): Likewise.
755 * elf32-mips.c (elf32_mips_discard_info): Move to elfxx-mips.c.
756 (elf32_mips_write_section): Likewise.
757 * elf64-mips.c (_bfd_mips_elf_ignore_discarded_relocs): Use it.
758 (_bfd_mips_elf_write_section): Likewise.
759
40c97fc6
AM
7602002-07-19 Alan Modra <amodra@bigpond.net.au>
761
762 * elfxx-ia64.c: (elfNN_ia64_modify_segment_map): Properly scan
763 PT_IA_64_UNWIND segments for a given section.
764
58378160
L
7652002-07-17 H.J. Lu <hjl@gnu.org>
766
767 * Makefile.am: Fix a typo.
768 * Makefile.in: Regenerate.
769
cf88bb9f
NC
7702002-07-15 Denis Chertykov <denisc@overta.ru>
771 Frank Ch. Eigler <fche@redhat.com>
772 Ben Elliston <bje@redhat.com>
773 Alan Lehotsky <alehotsky@cygnus.com>
774 John Healy <jhealy@redhat.com>
775 Graham Stott <grahams@redhat.com>
776 Jeff Johnston <jjohnstn@redhat.com>
777
778 * Makefile.am: Add support for ip2k.
779 * Makefile.in: Regenerate.
780 * doc/Makefile.in: Regenerate.
781 * archures.c: Add support for ip2k.
782 * config.bfd: Add support for ip2k.
783 * configure.in: Add support for ip2k.
784 * configure: Regenerate.
785 * reloc.c: Add support for ip2k.
786 * targets.c: Add support for ip2k.
787 * bfd-in2.h: Regenerate.
788 * libbfd.h: Regenerate.
789 * cpu-ip2k.c: New file.
790 * elf32-ip2k.c: New file.
791
0dafd5f6
RE
7922002-07-17 Ian Rickards <irickard@arm.com>
793
40c97fc6 794 * dwarf2.c (concat_filename): If we can't establish the directory
0dafd5f6
RE
795 just return the filename.
796
36b08f12
AM
7972002-07-16 Moritz Jodeit <moritz@jodeit.org>
798
799 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Correct order of memset args.
800
58821868
AM
8012002-07-16 Alan Modra <amodra@bigpond.net.au>
802
803 * elflink.h: Formatting fixes, tidy prototypes.
804 (elf_link_assign_sym_version): Move common code out of loop.
805
c89583f8
AM
8062002-07-16 Alan Modra <amodra@bigpond.net.au>
807
808 * elflink.h (elf_link_input_bfd): Don't call reloc_emitter when
809 reloc section size is zero. Correct reloc output location.
810
ba94744e
AM
8112002-07-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
812
813 * elf-hppa.h (elf_hppa_reloc_final_type): Use R_PARISC_PCREL16F as
814 the final type for the e_fsel selector when generating PA2.0W code.
815 (elf_hppa_relocate_insn): Provide support for PA2.0W 16-bit format 1
816 relocations.
817
96a94295
L
8182002-07-14 H.J. Lu <hjl@gnu.org>
819
820 * elflink.h (elf_link_assign_sym_version): Hide the default
821 definition if there is a hidden versioned definition.
822
6849c52f
HPN
8232002-07-12 Hans-Peter Nilsson <hp@axis.com>
824
825 * elf32-cris.c (cris_elf_relocate_section): Drop nonsensical
826 dynamic reference test in assertion when initializing GOT with
827 static contents. Just assert that there are either no dynamic
828 sections, the symbol is defined in the regular objects or that the
829 symbol is undef weak. Tweak comment.
830 (elf_cris_finish_dynamic_symbol): Emit .got reloc for a program
831 only if the symbol isn't defined in the program and isn't undef
832 weak.
833 (elf_cris_adjust_dynamic_symbol): Simplify condition for getting
834 rid of PLT entry: only do it if the symbol isn't defined in a DSO.
835 When doing so, clear ELF_LINK_HASH_NEEDS_PLT. Tweak comments.
836 (elf_cris_discard_excess_program_dynamics): Don't consider
837 ELF_LINK_HASH_REF_DYNAMIC when omitting .got runtime relocs.
838
239e1f3a
AM
8392002-07-11 Alan Modra <amodra@bigpond.net.au>
840
841 * elf32-i386.c (elf_i386_relocate_section): Don't complain about
842 unresolved debugging relocs in dynamic applications.
843 * elf32-s390.c (elf_s390_relocate_section): Likewise.
844 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
845 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
846 * elf64-s390.c (elf_s390_relocate_section): Likewise.
847 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
848 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
849
2f6d9989
AM
8502002-07-10 Alan Modra <amodra@bigpond.net.au>
851
f5e87a1d
AM
852 * elf64-ppc.c (ONES): Define.
853 (ppc64_elf_howto_table): Use ONES here to avoid warnings. Fill in
854 missing src_mask fields. Tweak R_PPC64_NONE, R_PPC64_COPY. Fill
855 in missing dst_mask fields on R_PPC64_PLT32, R_PPC64_PLTREL32.
856
2f6d9989
AM
857 * elf64-ppc.c (ppc64_elf_get_symbol_info): Delete.
858 (ppc64_elf_set_private_flags): Delete.
859 (ppc64_elf_section_from_shdr): Delete.
860 (ppc64_elf_merge_private_bfd_data): Remove flag checking/merging code.
861 (ppc64_elf_fake_sections): Delete.
862 (bfd_elf64_bfd_set_private_flags): Don't define.
863 (bfd_elf64_get_symbol_info): Likewise.
864 (elf_backend_section_from_shdr): Likewise.
865 (elf_backend_fake_sections): Likewise.
866
0594c12d
AM
8672002-07-10 Marco Walther <Marco.Walther@sun.com>
868
869 * elf.c: (assign_section_numbers) Set sh_entsize for .stab only
870 when not already set.
871 * elf64-sparc.c: (sparc64_elf_fake_sections): New function.
872 (elf_backend_fake_sections): Define.
873
699cb9b8
AM
8742002-07-10 Alan Modra <amodra@bigpond.net.au>
875
876 * merge.c (_bfd_merge_section): Remove redundant output_section check.
877 Formatting.
878 (_bfd_merge_sections): Don't set SEC_EXCLUDE on unused sections.
879
0a4787a0
HPN
8802002-07-09 Hans-Peter Nilsson <hp@axis.com>
881
882 * elf32-cris.c (cris_elf_relocate_section): Move sanity-check for
883 NULL sym_hashes to just before use.
884 <case R_CRIS_32_GOTREL>: In test for local symbol, accept also
885 symbol with non-default visibility.
886 <case R_CRIS_32_GOTREL, case R_CRIS_32_PLT_GOTREL>: Ditto.
887 <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
888 Ditto.
889 (cris_elf_gc_sweep_hook): Only decrease h->plt.refcount for
890 symbol with non-default visibility.
891 (cris_elf_check_relocs): At tests for local symbol before
892 increasing h->plt.refcount, also check for non-default
893 visibility. Ditto when checking for local symbol to eliminate
894 pc-relative runtime relocs.
895
aecc8f8a
AM
8962002-07-08 Alan Modra <amodra@bigpond.net.au>
897
898 * elf.c: Formatting.
899 (IS_SOLARIS_PT_INTERP): Add p_paddr and p_memsz checks.
900 (INCLUDE_SECTION_IN_SEGMENT): Remove IS_SOLARIS_PT_INTERP.
901 (copy_private_bfd_data): Set p_vaddr on broken Solaris PT_INTERP
902 segments.
903
e9168c1e
MM
9042002-07-07 Mark Mitchell <mark@codesourcery.com>
905 Alan Modra <amodra@bigpond.net.au>
906
907 * cofflink.c (_bfd_coff_final_link): On PE COFF systems, take into
908 account the impact of relocation count overflow when computing
909 section offsets.
910 * coffcode.h (coff_write_relocs): Use obj_pe when deciding whether
911 or not to apply the PE COFF reloc overflow handling. Fix a
912 fencepost error in deciding whether or not to use that technique.
913
6cdc0ccc
AM
9142002-07-07 Alan Modra <amodra@bigpond.net.au>
915
916 * elf-bfd.h (struct elf_reloc_cookie): Remove locsym_shndx,
917 change type of locsyms.
918 (bfd_elf_get_elf_syms): Declare.
919 * elf.c (bfd_elf_get_elf_syms): New function.
920 (group_signature): Use bfd_elf_get_elf_syms.
921 (bfd_section_from_r_symndx): Likewise.
922 * elfcode.h (elf_slurp_symbol_table): Likewise.
923 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
924 (elf_link_add_object_symbols): Likewise. Reorganise to increase
925 locality of various data structures. Properly free internal relocs.
926 (elf_bfd_final_link): Properly free internal relocs.
927 (elf_link_check_versioned_symbol): Use bfd_elf_get_elf_syms.
928 (elf_link_input_bfd): Likewise.
929 (elf_gc_mark): Likewise. Properly free internal relocs.
930 (elf_gc_sweep): Properly free internal relocs.
931 (elf_reloc_symbol_deleted_p): No need to swap syms in.
932 (elf_bfd_discard_info): Use bfd_elf_get_elf_syms. Properly free
933 internal relocs.
934 * elf-m10200.c (mn10200_elf_relax_section): Use bfd_elf_get_elf_syms.
935 Properly free possibly cached info.
936 (mn10200_elf_relax_delete_bytes): Remove symbol swapping code.
937 (mn10200_elf_symbol_address_p): Pass in internal syms. Remove
938 symbol swapping code.
939 (mn10200_elf_get_relocated_section_contents): Use bfd_elf_get_elf_syms.
940 Properly free possibly cached info.
941 * elf-m10300.c (mn10300_elf_relax_section): As above for elf-m10200.c.
942 (mn10300_elf_relax_delete_bytes): Likewise.
943 (mn10300_elf_symbol_address_p): Likewise.
944 (mn10300_elf_get_relocated_section_contents): Likewise.
945 * elf32-h8300.c (elf32_h8_relax_section): As above for elf-m10200.c.
946 (elf32_h8_relax_delete_bytes): Likewise.
947 (elf32_h8_symbol_address_p): Likewise.
948 (elf32_h8_get_relocated_section_contents): Likewise.
949 * elf32-m32r.c (m32r_elf_relax_section): As above for elf-m10200.c.
950 (m32r_elf_relax_delete_bytes): Likewise.
951 (m32r_elf_get_relocated_section_contents): Likewise.
952 * elf32-sh.c (sh_elf_reloc_loop): Free section contents using
953 elf_section_data to determine whether cached.
954 (sh_elf_relax_section): As above for elf-m10200.c.
955 (sh_elf_relax_delete_bytes): Likewise.
956 (sh_elf_get_relocated_section_contents): Likewise.
957 * elf32-xstormy16.c (xstormy16_elf_relax_section): As above.
958 * elf64-alpha.c (elf64_alpha_relax_section): As above. Also delay
959 reading of local syms.
960 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
961 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): As above.
962 * elfxx-ia64.c (elfNN_ia64_relax_section): As above.
963 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Properly free internal
964 relocs.
965 * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Properly
966 free internal relocs and section contents. Don't read symbols.
967 * elf32-hppa.c (get_local_syms): Use bfd_elf_get_elf_syms.
968 (elf32_hppa_size_stubs): Don't free local syms.
969 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Delay
970 reading of local syms. Use bfd_elf_get_elf_syms. Properly free
971 possibly cached info.
972 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
973 * elf64-hppa.c (elf64_hppa_check_relocs): Use bfd_elf_get_elf_syms.
974 * elf64-ppc.c (struct ppc_link_hash_table): Delete bfd_count and
975 all_local_syms.
976 (get_local_syms): Delete function.
977 (edit_opd): Use bfd_elf_get_elf_syms. Free on error exit. Cache
978 on exit.
979 (ppc64_elf_size_stubs): Use bfd_elf_get_elf_syms. Free/cache on exit.
980
b3212001
JW
9812002-07-05 Jim Wilson <wilson@redhat.com>
982
983 * syms.c (decode_section_type): New.
984 (bfd_decode_symclass): Call decode_section_type.
985
894bb1ee
JJ
9862002-07-04 Jakub Jelinek <jakub@redhat.com>
987
988 * merge.c (_bfd_merged_section_offset): Avoid accessing byte before
989 section content start.
990 Reported by Michael Schumacher <mike@hightec-rt.com>.
991
bc0ba537
AM
9922002-07-04 Alan Modra <amodra@bigpond.net.au>
993
994 * section.c (_bfd_strip_section_from_output): Remove unnecessary
995 link order code. Don't actually remove the output section here;
996 Just set a flag for the linker to do so.
997 * elflink.c (_bfd_elf_link_renumber_dynsyms): Test for removed
998 sections when setting up output section dynsyms.
999
797fc050
AM
10002002-07-04 Alan Modra <amodra@bigpond.net.au>
1001
1002 * elflink.h (elf_link_add_object_symbols): Revert 1999-09-02 hpux
1003 fudge.
1004 * elf.c (bfd_section_from_shdr): Work around broken hpux shared
1005 libs here instead.
1006
99881371
MS
10072002-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
1008
1009 * elf64-s390.c (create_got_section): Set .got section alignment to
1010 8 bytes.
1011 (elf_s390_check_relocs): Set .rela.dyn section alignment to 8 bytes.
1012
47d9a591
AM
10132002-07-02 Alan Modra <amodra@bigpond.net.au>
1014
1015 * elf.c (_bfd_elf_reloc_type_class): Fix comment grammar.
1016
179d3252
JT
10172002-07-01 Matt Thomas <matt@3am-software.com>
1018
1019 * elf32-vax.c (elf32_vax_print_private_bfd_data): Change EF_*
1020 to EF_VAX_*.
1021
4a14403c
TS
10222002-07-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1023
1024 * elfxx-mips.c (ABI_64_P): Fix comment.
1025 (MIPS_ELF_OPTIONS_SECTION_NAME,MIPS_ELF_STUB_SECTION_NAME): Use the
1026 new section names for N64 ABI.
1027 (mips_elf_output_extsym): No special _gp_disp handling for NewABI.
1028 (mips_elf_calculate_relocation): Code formatting.
1029 (mips_elf_create_dynamic_relocation): Likewise.
1030 (_bfd_mips_elf_fake_sections): IRIX6 needs this hack, too.
1031 (_bfd_mips_elf_size_dynamic_sections): Handle GOT_PAGE for any NewABI.
1032 (_bfd_mips_elf_relocate_section): No special handling for R_MIPS_64
1033 in any NewABI.
1034 (_bfd_mips_elf_finish_dynamic_symbol): No special _gp_disp handling
1035 for NewABI.
1036 (_bfd_mips_elf_modify_segment_map): Handle any N64 ABI.
1037 (_bfd_mips_elf_gc_sweep_hook): NewABI GOT relocs should be handled
1038 here, too.
1039
607c0e09
AS
10402002-07-01 Andreas Schwab <schwab@suse.de>
1041
1042 * elf64-x86-64.c (elf64_x86_64_relocate_section): Only convert
1043 R_X86_64_64 to R_X86_64_RELATIVE.
1044
ba26fd96
AM
10452002-07-01 John David Anglin <dave@hiauly1.hia.nrc.ca>
1046
1047 * vaxbsd.c: New BFD backend for VAX BSD and Ultrix.
1048 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Add new backend.
1049 Run "make dep-am".
1050 * config.bfd (vax-*-bsd* | vax-*-ultrix*): Use vaxbsd_vec instead of
1051 host_aout_vec.
1052 * configure.in (vaxbsd_vec): Add.
1053 * targets.c (vaxbsd_vec): Add.
1054 * Makefile.in: Rebuild.
1055 * configure: Rebuild.
1056 * po/SRC-POTFILES.in: Rebuild.
1057
1e2f5b6e
AM
10582002-07-01 Alan Modra <amodra@bigpond.net.au>
1059
1060 * elflink.h (elf_gc_mark): Pass in the section whose relocs we are
1061 examining to gc_mark_hook, rather than the bfd.
1062 (elf_gc_sections): Adjust.
1063 * elf-bfd.h (struct elf_backend_data <gc_mark_hook>): Likewise.
1064 * elf-m10300.c (mn10300_elf_gc_mark_hook): Likewise.
1065 * elf32-arm.h (elf32_arm_gc_mark_hook): Likewise.
1066 * elf32-avr.c (elf32_avr_gc_mark_hook): Likewise.
1067 * elf32-cris.c (cris_elf_gc_mark_hook): Likewise.
1068 * elf32-d10v.c (elf32_d10v_gc_mark_hook): Likewise.
1069 * elf32-fr30.c (fr30_elf_gc_mark_hook): Likewise.
1070 * elf32-hppa.c (elf32_hppa_gc_mark_hook): Likewise.
1071 * elf32-i386.c (elf_i386_gc_mark_hook): Likewise.
1072 * elf32-m32r.c (m32r_elf_gc_mark_hook): Likewise.
1073 * elf32-m68k.c (elf_m68k_gc_mark_hook): Likewise.
1074 * elf32-mcore.c (mcore_elf_gc_mark_hook): Likewise.
1075 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Likewise.
1076 * elf32-ppc.c (ppc_elf_gc_mark_hook): Likewise.
1077 * elf32-s390.c (elf_s390_gc_mark_hook): Likewise.
1078 * elf32-sh.c (sh_elf_gc_mark_hook): Likewise.
1079 * elf32-sparc.c (elf32_sparc_gc_mark_hook): Likewise.
1080 * elf32-v850.c (v850_elf_gc_mark_hook): Likewise.
1081 * elf32-vax.c (elf_vax_gc_mark_hook): Likewise.
1082 * elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Likewise.
1083 * elf64-mmix.c (mmix_elf_gc_mark_hook): Likewise.
1084 * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
1085 * elf64-s390.c (elf_s390_gc_mark_hook): Likewise.
1086 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
1087 * elfxx-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise.
1088 * elfxx-mips.h (_bfd_mips_elf_gc_mark_hook): Likewise.
1089 * elf64-x86-64.c (elf64_x86_64_gc_mark_hook): Likewise.
1090 * elf32-frv.c (elf32_frv_gc_mark_hook): Likewise. Also remove
1091 redundant local sym tests.
1092 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_entry.
1093 (link_hash_newfunc): Init is_entry.
1094 (ppc64_elf_copy_indirect_symbol): Copy is_entry.
1095 (ppc64_elf_link_hash_table_create): Init all_local_syms.
1096 (create_linkage_sections): Use bfd_make_section_anyway rather than
1097 bfd_make_section.
1098 (ppc64_elf_mark_entry_syms): New function.
1099 (ppc64_elf_check_relocs): Don't bother testing elf_bad_symtab. Set
1100 up opd entry to function section map.
1101 (ppc64_elf_gc_mark_hook): Special case opd section relocs, and
1102 relocs that reference the opd section.
1103 (edit_opd): New function.
1104 (ppc64_elf_size_dynamic_sections): Call get_local_syms and edit_opd.
1105 (ppc64_elf_setup_section_lists): Don't calculate htab->bfd_count here.
1106 (get_local_syms): Do so here. Exit if we already have local syms.
1107 Remove bogus comment imported from elf32-hppa.c. Don't attempt to
1108 read local syms on non-ELF input.
1109 (ppc64_elf_size_stubs): Call _bfd_elf64_link_read_relocs rather
1110 than duplicating it's function here. Adjust free of internal
1111 relocs to suit.
1112 (ppc64_elf_relocate_section): Adjust local syms in opd section.
1113 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Declare.
1114 * elf32-hppa.c (elf32_hppa_size_stubs): Call
1115 _bfd_elf32_link_read_relocs rather than duplicating it's function
1116 here. Adjust free of internal relocs to suit.
1117
1b71fb54
AJ
11182002-07-01 Andreas Jaeger <aj@suse.de>
1119
1120 * elf64-x86-64.c (elf64_x86_64_check_relocs): Certain relocations
1121 are not allowed in shared libs code, enforce -fPIC.
1122
8d28f606
HPN
11232002-06-29 Hans-Peter Nilsson <hp@bitrange.com>
1124
1125 * mmo.c (mmo_write_loc_chunk): Don't eliminate leading and
1126 trailing zero-sequences when there's previous left-over data.
1127
5ac81c74
JL
11282002-06-27 John David Anglin <dave@hiauly1.hia.nrc.ca>
1129
1130 * elf64-hppa.c (elf64_hppa_reloc_type_class): New function.
1131 (elf64_hppa_finish_dynamic_sections): Check other_rel_sec, dlt_rel_sec
1132 and opd_rel_sec in order for starting rela section. Check _raw_size.
1133 (elf_backend_reloc_type_class): Define.
1134
91a4d569
AM
11352002-06-27 Kevin Buettner <kevinb@redhat.com>
1136
1137 * dwarf2.c (decode_line_info): Handle older, non-standard, 64-bit
1138 DWARF2 formats.
1139
feee612b
AM
11402002-06-27 Alan Modra <amodra@bigpond.net.au>
1141
1142 * cpu-powerpc.c: Comment on ordering of arch_info.
1143 * elf32-ppc.c (ppc_elf_object_p): New function.
1144 (elf_backend_object_p): Define.
1145 * elf64-ppc.c (ppc64_elf_object_p): New function.
1146 (elf_backend_object_p): Define.
1147
a4e6cefc
JT
11482002-06-26 Jason Thorpe <thorpej@wasabisystems.com>
1149
1150 * configure.in (vax-*-netbsd*): Set COREFILE to netbsd-core.lo.
1151 * configure: Regenerate.
1152
dae2dd0d
NC
11532002-06-25 Jason Eckhardt <jle@rice.edu>
1154
1155 * dwarf2.c (decode_line_info): Check unit->addr_size
1156 to read in the proper number of prologue bytes.
1157
680f9d5c
NC
11582002-06-25 Nick Clifton <nickc@cambridge.redhat.com>
1159
1160 * config.bfd (powerpc-*-aix5*): Only create a selvecs for
1161 aix5coff64_vec if 64-bit bfd support has been enabled.
91a4d569
AM
1162 (powerpc64-*-aix5*): Only define if 64-bit bfd support has
1163 been enabled.
dae2dd0d 1164
680f9d5c
NC
1165 * targets.c (_bfd_target_vector[]): Only include
1166 aix5coff64_vec if 64-bit bfd support has been enabled.
1167
d4c88bbb
AM
11682002-06-25 Alan Modra <amodra@bigpond.net.au>
1169
1170 * elf64-ppc.c (ppc_add_stub): Replace strcpy/strncpy with memcpy.
1171 * elf32-hppa.c (hppa_add_stub): Likewise.
1172 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
1173 * elflink.h (elf_add_default_symbol): Fix comment typo.
1174 (elf_add_default_symbol): Replace strcpy and strncpy with memcpy.
1175 (elf_link_add_object_symbols): Likewise.
1176 (elf_link_assign_sym_version): Likewise.
1177 * hash.c (bfd_hash_lookup): Likewise.
1178 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
1179 * section.c (bfd_get_unique_section_name): Likewise.
1180 * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
1181 * elf.c (_bfd_elf_make_section_from_phdr): Likewise.
1182 (assign_section_numbers): Likewise.
1183 (_bfd_elfcore_make_pseudosection): Likewise.
1184 (elfcore_grok_lwpstatus): Likewise.
1185 (elfcore_grok_win32pstatus): Likewise.
1186 (elfcore_write_note): Constify input params. Use PTR instead of
1187 void *. Include terminating NUL in namesz. Correct padding.
1188 Support NULL "name" param. Use memcpy instead of strcpy.
1189 (elfcore_write_prpsinfo): Constify input params.
1190 (elfcore_write_prstatus): Likewise. Use PTR instead of void *.
1191 (elfcore_write_lwpstatus): Likewise.
1192 (elfcore_write_pstatus): Likewise.
1193 (elfcore_write_prfpreg): Likewise.
1194 (elfcore_write_prxfpreg): Likewise.
1195 * elf-bfd.h (elfcore_write_note): Update declaration.
1196 (elfcore_write_prpsinfo): Likewise.
1197 (elfcore_write_prstatus): Likewise.
1198 (elfcore_write_pstatus): Likewise.
1199 (elfcore_write_prfpreg): Likewise.
1200 (elfcore_write_prxfpreg): Likewise.
1201 (elfcore_write_lwpstatus): Likewise.
1202
b0ac09d2
NC
12032002-06-25 Jason Eckhardt <jle@rice.edu>
1204
1205 * ecoff.c (ecoff_set_symbol_info): Set BSF_FUNCTION for
1206 symbols of type stProc and stStaticProc.
1207
12082002-06-25 Nick Clifton <nickc@redhat.com>
1209
1210 * ecoff.c: VArious formatting fixes.
1211
021d6096
AM
12122002-06-25 Alan Modra <amodra@bigpond.net.au>
1213
1214 * coff-rs6000.c (xcoff_generate_rtinit): Fix typo.
1215
82e51918
AM
12162002-06-25 Alan Modra <amodra@bigpond.net.au>
1217
1218 * aout-adobe.c: Don't compare against "true" or "false.
1219 * aout-target.h: Likewise.
1220 * aoutx.h: Likewise.
1221 * archive.c: Likewise.
1222 * bout.c: Likewise.
1223 * cache.c: Likewise.
1224 * coff-a29k.c: Likewise.
1225 * coff-alpha.c: Likewise.
1226 * coff-i386.c: Likewise.
1227 * coff-mips.c: Likewise.
1228 * coff-or32.c: Likewise.
1229 * coff64-rs6000.c: Likewise.
1230 * coffcode.h: Likewise.
1231 * coffgen.c: Likewise.
1232 * cpu-ns32k.c: Likewise.
1233 * ecoff.c: Likewise.
1234 * ecofflink.c: Likewise.
1235 * elf.c: Likewise.
1236 * elf32-arm.h: Likewise.
1237 * elf32-cris.c: Likewise.
1238 * elf32-d30v.c: Likewise.
1239 * elf32-i386.c: Likewise.
1240 * elf32-mcore.c: Likewise.
1241 * elf32-ppc.c: Likewise.
1242 * elf32-sh.c: Likewise.
1243 * elf32-sh64.c: Likewise.
1244 * elf32-v850.c: Likewise.
1245 * elf64-alpha.c: Likewise.
1246 * elf64-sh64.c: Likewise.
1247 * elfcode.h: Likewise.
1248 * elfcore.h: Likewise.
1249 * elflink.h: Likewise.
1250 * elfxx-mips.c: Likewise.
1251 * i386os9k.c: Likewise.
1252 * ieee.c: Likewise.
1253 * libbfd.c: Likewise.
1254 * linker.c: Likewise.
1255 * mmo.c: Likewise.
1256 * nlm32-alpha.c: Likewise.
1257 * nlm32-i386.c: Likewise.
1258 * nlm32-ppc.c: Likewise.
1259 * nlm32-sparc.c: Likewise.
1260 * nlmcode.h: Likewise.
1261 * oasys.c: Likewise.
1262 * pdp11.c: Likewise.
1263 * peicode.h: Likewise.
1264 * reloc.c: Likewise.
1265 * som.c: Likewise.
1266 * srec.c: Likewise.
1267 * tekhex.c: Likewise.
1268 * vms.c: Likewise.
1269 * xcofflink.c: Likewise.
1270 * elf64-sparc.c: Edit comment to not use "== false".
1271
1272 * aoutf1.h: Don't use "? true : false".
1273 * ecoff.c: Likewise.
1274 * format.c: Likewise.
1275 * ieee.c: Likewise.
1276 * linker.c: Likewise.
1277 * mmo.c: Likewise.
1278 * oasys.c: Likewise.
1279
48fc70a2
AM
12802002-06-23 H.J. Lu <hjl@gnu.org>
1281
1282 * elflink.h (elf_link_add_archive_symbols): For the default
1283 version, check references with only one `@' first.
1284
47b7c2db
AM
12852002-06-23 John David Anglin <dave@hiauly1.hia.nrc.ca>
1286
1287 * elf64-hppa.c (elf64_hppa_mark_milli_and_exported_functions): New
1288 function.
1289 (allocate_global_data_dlt): Don't add millicode symbols to dynamic
1290 symbol table.
1291 (allocate_global_data_opd, allocate_dynrel_entries): Likewise.
1292 (elf64_hppa_size_dynamic_sections): Revise to use
1293 elf64_hppa_mark_milli_and_exported_functions.
1294 (elf64_hppa_finish_dynamic_symbol): Remove code to keep millicode
1295 symbols out of dynamic symbol table.
1296
f5d44ba0
AM
12972002-06-23 Alan Modra <amodra@bigpond.net.au>
1298
bb3fff1e
AM
1299 * Makefile.in: Regenerate.
1300 * libbfd.h: Regenerate.
1301 * bfd-in2.h: Regenerate.
1302 * configure: Regenerate.
1303 * po/SRC-POTFILES.in: Regenerate.
1304
f5d44ba0
AM
1305 * elflink.h: Comment typo fixes.
1306
13072002-06-23 H.J. Lu <hjl@gnu.org>
1308
1309 * elf-bfd.h (elf_link_loaded_list): New structure.
1310 (elf_link_hash_table): Add "loaded".
1311 * elf.c (_bfd_elf_link_hash_table_init): Initialize "loaded".
1312 * elflink.h (elf_link_check_versioned_symbol): New function.
1313 (elf_link_output_extsym): Call elf_link_check_versioned_symbol.
1314
cc36acdf
NC
13152002-06-19 Nick Clifton <nickc@cambridge.redhat.com>
1316
1317 * elflink.h (size_dynamic_sections): If the target does not
f5d44ba0 1318 support an ELF style hash table, return true, indicating that
cc36acdf
NC
1319 nothing needed to be done, rather than false, indicating that the
1320 section's size could not be computed.
1321
4e5ba5b7
DB
13222002-06-18 Dave Brolley <brolley@redhat.com>
1323
1324 From Catherine Moore, Michael Meissner, Dave Brolley:
1325 * po/SRC-POTFILES.in: Add cpu-frv.c and elf32-frv.c
1326 * targets.c: Support bfd_elf32_frv_vec.
1327 * reloc.c: Add FRV relocs.
1328 * configure.in: Add support for bfd-elf32-frv-vec.
1329 * config.bfd (targ_cpu): Add support for frv-*-elf.
1330 * archures.c: Add frv arch and machines.
1331 * Makefile.am (ALL_MACHINES): Add cpu-frv.lo.
1332 (ALL_MACHINES_CFILES): Add cpu-frv.c.
1333 (BFD32_BACKENDS): Add elf32-frv.lo.
1334 (BFD32_BACKENDS_CFILES): Add elf32-frv.c
1335 (cpu-frv.lo): New target.
1336 (elf32-frv.lo): New target.
1337 * cpu-frv.c: New file.
1338 * elf32-frv.c: New file.
1339
7ece0d85
JJ
13402002-06-18 Jakub Jelinek <jakub@redhat.com>
1341
1342 * elfcode.h (elf_object_p): Sanity check eh_shoff == 0 implies
1343 e_shnum == 0.
1344 Only read the first section header if e_shoff is non-zero.
1345 Don't consider e_shstrndx if there are no sections.
1346
57fb03ac
TR
13472002-06-17 Tom Rix <trix@redhat.com>
1348
1349 * elf32-d10v.c (elf_d10v_howto_table): Change R_D10V_10_PCREL_R,
f5d44ba0 1350 R_D10V_10_PCREL_L and R_D10V_18_PCREL to use
57fb03ac
TR
1351 complain_overflow_bitfield.
1352
341ca622
AM
13532002-06-17 Alan Modra <amodra@bigpond.net.au>
1354
767e34d1
AM
1355 * opncls.c (bfd_openr): Remove redundant bfd_set_error.
1356 (bfd_fdopenr): Likewise.
1357 (bfd_openstreamr): Likewise.
1358 (bfd_openw): Likewise.
1359
341ca622
AM
1360 * targets.c: Sort target vecs.
1361 (_bfd_target_vector): Add aix5coff64_vec, bfd_elf32_sh64_vec,
1362 bfd_elf32_sh64l_vec, bfd_elf32_sh64lnbsd_vec,
1363 bfd_elf32_sh64nbsd_vec, bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec,
1364 bfd_elf64_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec.
1365 * configure.in: Sort target vecs. Add m88kmach3_vec.
1366 * configure: Regenerate.
1367
dfbbae4c
HPN
13682002-06-16 Hans-Peter Nilsson <hp@bitrange.com>
1369
1370 * elf64-mmix.c (bpo_reloc_request_sort_fn): Use member
1371 bpo_reloc_no to break sort order ties, not address of items.
1372
d663e1cd
JL
13732002-06-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
1374
1375 * elf-hppa.h (elf_hppa_final_link): Fix formatting in comment.
1376 Skip excluded sections in determing __gp value.
1377 (elf_hppa_final_link_relocate): Use the symbol's address in
1378 R_PARISC_FPTR64 relocations that don't need an opd entry.
1379 * elf64-hppa.c (allocate_dynrel_entries): Simplify code.
1380 (elf64_hppa_finalize_dynreloc): Likewise.
1381 (elf64_hppa_size_dynamic_sections): Move comments and fix typo.
1382 (elf64_hppa_finish_dynamic_symbol): Break up assert.
1383
a8295218
NC
13842002-06-14 Sergey Grigoriev <serge@leopold.Physik.Uni-Augsburg.DE>
1385
1386 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
1387 alignment for .bss, .data and .text sections so that sse and sse2
1388 code will work.
1389 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
1390
13912002-06013 J"orn Rennecke <joern.rennecke@superh.com>
5d9b5481
JR
1392
1393 config.bfd: Add support for sh[1234]l*-*-elf* | sh3el*-*-elf*,
1394 sh[1234]*-elf*.
1395
3db4b612
JL
13962002-06-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
1397
2cb69dd3
JL
1398 * elflink.h (elf_bfd_final_link): Improve error handling for missing
1399 dynamic sections.
1400
3db4b612
JL
1401 * elf64-hppa.c (allocate_global_data_opd): We don't need an opd entry
1402 for a symbol that has no output section.
1403 (allocate_dynrel_entries): Correct comment.
1404 (elf64_hppa_finalize_dynreloc): Likewise. Don't create an opd entry
1405 unless we want one.
1406 (elf64_hppa_finalize_opd): Prevent segfault if dyn_h is NULL.
1407 (elf64_hppa_finalize_dlt): Likewise. Prevent segfault for symbols
1408 with no section. Remove unnecessary parentheses.
1409
f3813499
TR
14102002-06-11 Tom Rix <trix@redhat.com>
1411
1412 * coffcode.h (coff_compute_section_file_positions): Add data
1413 section to AIX loader alignment check.
1414
f5d44ba0 1415 * coff-rs6000.c (_bfd_xcoff_mkobject): Set default text section
f3813499
TR
1416 alignment to 4 bytes.
1417 (_bfd_xcoff_copy_private_bfd_data): Use text and data alignment
1418 power accessor macro.
1419 (do_shared_object_padding): Remove invalid assertion.
1420
0ebaf185
RS
14212002-06-10 Richard Sandiford <rsandifo@redhat.com>
1422
1423 * section.c (_bfd_strip_section_from_output): Set SEC_EXCLUDE
1424 for removed output sections.
1425
ebe3e2d1
NC
14262002-06-10 Geoffrey Keating <geoffk@redhat.com>
1427
1428 * merge.c (merge_strings): Use htab_create_alloc with calloc, not
1429 htab_alloc.
1430 * elf-strtab.c (_bfd_elf_strtab_finalize): Likewise.
1431
0b14c2aa
L
14322002-06-08 H.J. Lu <hjl@gnu.org>
1433
1434 * elf.c (copy_private_bfd_data): Don't cast to bfd_size_type to
1435 work around a long long bug in gcc 2.96 on mips.
1436
3c2bfad6
JT
14372002-06-08 Jason Thorpe <thorpej@wasabisystems.com>
1438
1439 * Makefile.am (BFD32_BACKENDS): Add vax1knetbsd.lo.
1440 (BFD32_BACKENDS_CFILES): Add vax1knetbsd.c.
1441 Regenerate dependency lists.
1442 * Makefile.in: Regenerate.
1443 * config.bfd (vax-*-netbsdelf*, vax-*-netbsdaout*): Add
1444 vax1knetbsd_vec to targ_selvecs.
1445 * configure.in: Add vax1knetbsd_vec.
1446 * configure: Regenerate.
1447 * targets.c (_bfd_target_vector): Add vax1knetbsd_vec.
1448 * vax1knetbsd.c: New file.
1449 * vaxnetbsd.c: Update copyright years.
1450 (TARGET_PAGE_SIZE): Set to 0x1000.
1451 (DEFAULT_MID): Set to M_VAX4K_NETBSD.
1452
91149be3
JT
14532002-06-08 Matt Thomas <matt@3am-software.com>
1454
1455 * libaout.h (enum machine_type): Add M_VAX4K_NETBSD.
1456
21e15248
AM
14572002-06-08 Alan Modra <amodra@bigpond.net.au>
1458
1459 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Make static.
1460
986b7daa
AM
14612002-06-08 Alan Modra <amodra@bigpond.net.au>
1462
e90b95f6
AM
1463 * Makefile.am: Run "make dep-am".
1464 * Makefile.in: Regenerate.
1465
3f9c735e
AM
1466 * armnetbsd.c: Replace CONST with const.
1467 * corefile.c: Likewise.
1468 * elf32-dlx.c: Likewise.
1469 * elf64-mips.c: Likewise.
1470 * mmo.c: Likewise.
1471 * ns32knetbsd.c: Likewise.
1472
986b7daa
AM
1473 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Check the hash
1474 table is elf64-sparc.
1475
5a659663
TS
14762002-06-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1477
1478 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Simplify code.
1479 Fix RELA addends to get not shifted in the result. Don't do special
1480 handling of R_MIPS_64 for NewABI.
1481
9bab7074
AM
14822002-06-07 Alan Modra <amodra@bigpond.net.au>
1483
1484 * aoutx.h (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
1485 (NAME(aout,slurp_reloc_table)): Likewise.
1486 * coff-mips.c (mips_relax_section): Use bfd_zalloc.
1487 * coff-rs6000.c (xcoff_write_armap_big): Use bfd_zmalloc.
1488 (xcoff_write_archive_contents_big): Likewise.
1489 (xcoff_generate_rtinit): Likewise.
1490 (xcoff_generate_rtinit): Likewise, and check error return.
1491 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
1492 * coffgen.c (coff_section_symbol): Use bfd_zalloc.
1493 (coff_get_normalized_symtab): Likewise.
1494 (coff_make_empty_symbol): Likewise.
1495 (bfd_coff_set_symbol_class): Likewise.
1496 * cofflink.c (coff_link_add_symbols): Likewise.
1497 * ecoff.c (_bfd_ecoff_make_empty_symbol): Likewise.
1498 * ecofflink.c (ecoff_write_shuffle): Use bfd_zmalloc.
1499 (bfd_ecoff_write_accumulated_debug): Likewise.
1500 * elf64-alpha.c (get_got_entry): Use bfd_zalloc.
1501 * i386linux.c (bfd_i386linux_size_dynamic_sections): Likewise.
1502 * i386lynx.c (NAME(lynx,slurp_reloc_table)): Use bfd_zmalloc.
1503 * ieee.c (do_with_relocs): Use bfd_zalloc.
1504 * m68klinux.c (bfd_m68klinux_size_dynamic_sections): Likewise.
1505 * pdp11.c (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
1506 (NAME(aout,slurp_reloc_table)): Likewise.
1507 (NAME(aout,squirt_out_relocs)): Don't memset when zalloc'd.
1508 * reloc16.c (bfd_coff_reloc16_relax_section): Use bfd_zmalloc.
1509 * som.c (som_build_and_write_symbol_table): Likewise.
1510 (som_slurp_string_table): Likewise.
1511 (som_slurp_symbol_table): Likewise.
1512 (som_bfd_ar_write_symbol_stuff): Likewise.
1513 * sparclinux.c (bfd_sparclinux_size_dynamic_sections): Use bfd_zalloc.
1514 * sunos.c (bfd_sunos_size_dynamic_sections): Likewise.
1515 * tekhex.c (find_chunk): Likewise. Get rid of unused "sname".
1516 * vms-gsd.c (_bfd_vms_slurp_gsd): Use bfd_zmalloc.
1517 * xcofflink.c (xcoff_link_add_symbols): Use bfd_zalloc/bfd_zmalloc.
1518
1126897b
AM
15192002-06-07 Alan Modra <amodra@bigpond.net.au>
1520
1521 * elf-bfd.h (struct bfd_elf_section_data <group_name>): Replace with
1522 "group" union.
1523 (elf_group_name): Update.
1524 (elf_group_id): Define.
1525 (bfd_elf_set_group_contents): Declare.
1526 * elf.c (elf_fake_sections): Qualify use of elf_group_name.
1527 (set_group_contents): Rename to bfd_elf_set_group_contents. Remove
1528 ATTRIBUTE_UNUSED from failedptrarg. If elf_group_id is set, use
1529 that sym for the signature.
1530 (_bfd_elf_compute_section_file_positions): Don't call
1531 set_group_contents for "ld -r" case.
1532 (swap_out_syms): Use bfd_zalloc.
1533 * elflink.h (elf_link_add_archive_symbols): Likewise.
1534 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
1535 (elf_bfd_final_link): Call bfd_elf_set_group_contents.
1536
3fad3c7c
AM
15372002-06-07 Alan Modra <amodra@bigpond.net.au>
1538
1539 * elf64-ppc.c (ppc64_elf_relocate_section): Allow unresolved
1540 relocs in opd for non-shared too.
1541
76f99c63
JL
15422002-06-06 Jeffrey Law <law@redhat.com
1543
1544 * elf32-h8300.c (elf32_h8_relax_section): Ignore uninteresting
1545 relocations.
1546
7217313c
NC
15472002-06-06 Nick Clifton <nickc@cambridge.redhat.com>
1548
1549 * merge.c: Include libiberty.h.
1550 * elf-strtab.c: Include libiberty.h.
1551
6cb22815
AM
15522002-06-06 Elias Athanasopoulos <eathan@otenet.gr>
1553
1554 * peXXigen.c (pe_print_idata): Remove unused variable.
1555
1ed89aa9
NC
15562002-06-06 David Heine <dlheine@tensilica.com>
1557
1558 * elf.c (assign_file_positions_for_segments): Remove unallocated
1559 sections from the section to segment mapping for PT_LOAD segments.
1560 Update comment about empty loadable segments.
1561
644c4c80
RS
15622002-06-06 Richard Sandiford <rsandifo@redhat.com>
1563
1564 * stabs.c (_bfd_link_section_stabs): Check that the symbol offset
1565 is within the .stabstr section.
1566
f8ecb12b
AM
15672002-06-06 Alan Modra <amodra@bigpond.net.au>
1568
1569 * elf-bfd.h (struct elf_size_info <swap_symbol_in>): Function args
1570 are "const PTR", not "const PTR *".
1571 (bfd_elf32_swap_symbol_in): Likewise.
1572 (bfd_elf64_swap_symbol_in): Likewise.
1573 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR.
1574 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
1575 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
1576 (elf_link_add_object_symbols): Likewise.
1577 (elf_link_record_local_dynamic_symbol): Likewise.
1578 (elf_link_input_bfd): Likewise.
1579 (elf_gc_mark): Likewise.
1580 (elf_reloc_symbol_deleted_p): Likewise.
1581 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
1582 (mn10200_elf_relax_delete_bytes): Likewise.
1583 (mn10200_elf_symbol_address_p): Likewise.
1584 (mn10200_elf_get_relocated_section_contents): Likewise.
1585 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
1586 (mn10300_elf_relax_section): Likewise.
1587 (mn10300_elf_relax_delete_bytes): Likewise.
1588 (mn10300_elf_symbol_address_p): Likewise.
1589 (mn10300_elf_get_relocated_section_contents): Likewise.
1590 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
1591 (elf32_h8_relax_delete_bytes): Likewise.
1592 (elf32_h8_symbol_address_p): Likewise.
1593 (elf32_h8_get_relocated_section_contents): Likewise.
1594 * elf32-hppa.c (get_local_syms): Likewise.
1595 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
1596 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
1597 * elf32-sh.c (sh_elf_relax_section): Likewise.
1598 (sh_elf_relax_delete_bytes): Likewise.
1599 (sh_elf_get_relocated_section_contents): Likewise.
1600 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
1601 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
1602 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
1603 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
1604 * elf64-ppc.c (get_local_syms): Likewise.
1605 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
1606 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
1607
1ed89aa9 16082002-06-05 J"orn Rennecke <joern.rennecke@superh.com>
7a33bc10
JR
1609
1610 * config.bfd (sh64l*-*-elf*, shl*-*-elf*): New configurations.
1611
73ff0d56
AM
16122002-06-05 Alan Modra <amodra@bigpond.net.au>
1613
9dce4196
AM
1614 * elf.c (group_signature): Swap in the whole symbol, and handle
1615 extracting section symbol names.
1616 (setup_group): Add comment.
1617 (set_group_contents): When called from objcopy or ld, arrange for
1618 section contents to be written. Write group member output section
1619 indices to allow objcopy to reorganize sections.
1620 (_bfd_elf_copy_private_section_data): Copy group info.
1621
73ff0d56
AM
1622 * elf-bfd.h (struct elf_size_info): Add swap_symbol_in field.
1623 (bfd_elf32_swap_symbol_in): Update prototype.
1624 (bfd_elf64_swap_symbol_in): Likewise.
1625 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR *.
1626 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
1627 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
1628 (elf_link_add_object_symbols): Likewise.
1629 (elf_link_record_local_dynamic_symbol): Likewise.
1630 (elf_link_input_bfd): Likewise.
1631 (elf_gc_mark): Likewise.
1632 (elf_reloc_symbol_deleted_p): Likewise.
1633 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
1634 (mn10200_elf_relax_delete_bytes): Likewise.
1635 (mn10200_elf_symbol_address_p): Likewise.
1636 (mn10200_elf_get_relocated_section_contents): Likewise.
1637 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
1638 (mn10300_elf_relax_section): Likewise.
1639 (mn10300_elf_relax_delete_bytes): Likewise.
1640 (mn10300_elf_symbol_address_p): Likewise.
1641 (mn10300_elf_get_relocated_section_contents): Likewise.
1642 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
1643 (elf32_h8_relax_delete_bytes): Likewise.
1644 (elf32_h8_symbol_address_p): Likewise.
1645 (elf32_h8_get_relocated_section_contents): Likewise.
1646 * elf32-hppa.c (get_local_syms): Likewise.
1647 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
1648 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
1649 * elf32-sh.c (sh_elf_relax_section): Likewise.
1650 (sh_elf_relax_delete_bytes): Likewise.
1651 (sh_elf_get_relocated_section_contents): Likewise.
1652 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
1653 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
1654 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
1655 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
1656 * elf64-ppc.c (get_local_syms): Likewise.
1657 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
1658 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
1659 * elfcode.h (NAME(_bfd_elf,size_info)): Update initialiser.
1660 * elf64-alpha.c (alpha_elf_size_info): Likewise.
1661 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
1662 * elf64-mips.c (mips_elf64_size_info): Likewise.
1663 * elf64-s390.c (s390_elf64_size_info): Likewise.
1664 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
1665
53bfd6b4
MR
16662002-06-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
1667
1668 * elf32-mips.c (elf32_mips_ignore_discarded_relocs): Move to...
1669 elfxx-mips.c (_bfd_mips_elf_ignore_discarded_relocs): ... here.
1670 elf64-mips.c (elf_backend_ignore_discarded_relocs): Use
1671 _bfd_mips_elf_ignore_discarded_relocs.
1672 elfxx-mips.h (_bfd_mips_elf_ignore_discarded_relocs): Declare.
1673
d4df96e6
L
16742002-06-05 H.J. Lu <hjl@gnu.org>
1675
1676 * elfxx-mips.c (mips_elf_calculate_relocation): Call
1677 _bfd_elf_rel_local_sym for STT_SECTION relocations against
1678 the SEC_MERGE section.
1679
e61463e1
AM
16802002-06-05 Alan Modra <amodra@bigpond.net.au>
1681
3cac74d0
AM
1682 * coff-alpha.c: Update copyright date.
1683 * coff-mips.c: Likewise.
1684 * xcoff-target.h: Likewise.
1685
e61463e1
AM
1686 * bfd-in.h: Remove "taken from the source" comment.
1687 * libbfd-in.h: Likewise.
1688 * libcoff-in.h: Likewise.
1689 * bfd-in2.h: Regenerate.
1690 * libbfd.h: Regenerate.
1691 * libcoff.h: Regenerate.
1692
1693 * elf.c (bfd_elf_discard_group): Return true.
1694 * elf-bfd.h (bfd_elf_discard_group): Declare.
1695 * bfd-in.h (bfd_elf_discard_group): Don't declare here.
1696 * section.c (bfd_discard_group): Rename to bfd_generic_discard_group.
1697 * bfd.c (bfd_discard_group): Define.
1698 * targets.c (struct bfd_target): Add _bfd_discard_group.
1699 (BFD_JUMP_TABLE_LINK): Here too.
1700 * libbfd-in.h (_bfd_nolink_bfd_discard_group): Define.
1701 * aout-adobe.c (aout_32_bfd_discard_group): Define.
1702 * aout-target.h (MY_bfd_discard_group): Define.
1703 * aout-tic30.c (MY_bfd_discard_group): Define.
1704 * binary.c (binary_bfd_discard_group): Define.
1705 * bout.c (b_out_bfd_discard_group): Define.
1706 * coff-alpha.c (_bfd_ecoff_bfd_discard_group): Define.
1707 * coffcode.h (coff_bfd_discard_group): Define.
1708 * coff-mips.c (_bfd_ecoff_bfd_discard_group): Define.
1709 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Define.
1710 * i386msdos.c (msdos_bfd_discard_group): Define.
1711 * i386os9k.c (os9k_bfd_discard_group): Define.
1712 * ieee.c (ieee_bfd_discard_group): Define.
1713 * ihex.c (ihex_bfd_discard_group): Define.
1714 * mmo.c (mmo_bfd_discard_group): Define.
1715 * nlm-target.h (nlm_bfd_discard_group): Define.
1716 * oasys.c (oasys_bfd_discard_group): Define.
1717 * ppcboot.c (ppcboot_bfd_discard_group): Define.
1718 * som.c (som_bfd_discard_group): Define.
1719 * srec.c (srec_bfd_discard_group): Define.
1720 * tekhex.c (tekhex_bfd_discard_group): Define.
1721 * versados.c (versados_bfd_discard_group): Define.
1722 * vms.c (vms_bfd_discard_group): Define.
1723 * xcoff-target.h (_bfd_xcoff_bfd_discard_group): Define.
1724 * coff64-rs6000.c (rs6000coff64_vec): Update initialiser.
1725 (aix5coff64_vec): Likewise.
1726 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Likewise.
1727
9cba27b2
JT
17282002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
1729
1730 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-com.lo.
1731 (BFD32_BACKENDS_CFILES): Add elf32-sh64-com.c.
1732 (elf32-sh64-com.lo): New dependency list.
1733 * Makefile.in: Regenerate.
1734 * configure.in (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec)
1735 (bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec): Add
1736 elf32-sh64-com.lo.
1737 * configure: Regenerate.
1738 * elf32-sh64.c (sh64_address_in_cranges)
1739 (sh64_get_contents_type, sh64_address_is_shmedia): Move to...
1740 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb):
1741 (crange_bsearch_cmpl): Prepend _bfd_sh64_ to name and move to...
1742 * elf32-sh64-com.c: ...here. New file.
1743
8d2c33be
AM
17442002-06-04 Alan Modra <amodra@bigpond.net.au>
1745
1746 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Remove
1747 ATTRIBUTE_UNUSED on used params.
1748 * elf32-vax.c (elf_vax_gc_mark_hook): Remove unnecessary checks
1749 before calling bfd_section_from_elf_index on local syms.
1750 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
1751
5b0e55b6
JT
17522002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
1753
1754 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-nbsd.lo.
1755 (BFD32_BACKENDS_CFILES): Add elf32-sh64-nbsd.c.
1756 (BFD64_BACKENDS): Add elf64-sh64-nbsd.lo.
1757 (BFD64_BACKENDS_CFILES): Add elf64-sh64-nbsd.c.
1758 (elf32-sh64-nbsd.lo, elf64-sh64-nbsd.lo): New rules.
1759 * Makefile.in: Regenerate.
1760 * config.bfd (sh5le-*-netbsd*, sh5-*-netbsd*, sh64le-*-netbsd*)
1761 (sh64-*-netbsd*): New targets.
1762 * configure.in: Add bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec,
1763 bfd_elf64_sh64nbsd_vec, and bfd_elf64_sh64lnbsd_vec.
1764 * configure: Regenerate.
1765 * elf32-sh64-nbsd.c: New file.
1766 * elf64-sh64-nbsd.c: New file.
1767 * targets.c: Add extern decls for bfd_elf32_sh64nbsd_vec,
1768 bfd_elf32_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec, and
1769 bfd_elf64_sh64lnbsd_vec.
1770
b885599b
AM
17712002-06-04 Alan Modra <amodra@bigpond.net.au>
1772
1773 * elf.c (setup_group): Set SEC_LINK_ONCE on GRP_COMDAT groups.
1774 (bfd_section_from_shdr): Likewise. Set section name of group
1775 sections from signature.
1776 (group_signature): Split out from setup_group. Ensure symbol table
1777 is available.
1778 (bfd_elf_discard_group): New function.
1779 (_bfd_elf_make_section_from_shdr): Don't set SEC_LINK_ONCE on
1780 .gnu.linkonce* sections if they are members of a group.
1781 (set_group_contents): Set GRP_COMDAT flag.
1782 * section.c (bfd_discard_group): New function.
1783 * bfd-in.h (bfd_elf_discard_group): Declare.
1784 * bfd-in2.h: Regenerate.
1785 * elf-bfd.h (struct bfd_elf_section_data): Add linkonce_p field.
1786 (elf_linkonce_p): Define.
1787
90937f86
AM
17882002-06-04 Alan Modra <amodra@bigpond.net.au>
1789
1790 * elf.c (bfd_section_from_shdr): Make "name" const.
1791 * elf-bfd.h (elf_backend_section_from_shdr): Likewise.
1792 * elf32-i370.c (i370_elf_section_from_shdr): Likewise.
1793 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
1794 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
1795 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
1796 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
1797 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
1798 * elf64-ppc.c (ppc64_elf_section_from_shdr): Likewise.
1799 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
1800 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
1801 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
1802
cf6fb9ce
MR
18032002-06-03 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
1804
1805 * elfxx-mips.c (ABI_64_P): Use backend's data to determine the
1806 ABI.
1807
cedb70c5
KH
18082002-06-02 Kazu Hirata <kazu@cs.umass.edu>
1809
1810 * elf32-arc.c: Fix formatting.
1811 * elf32-arm.h: Likewise.
1812 * elf32-cris.c: Likewise.
1813 * elf32-dlx.c: Likewise.
1814 * elf32-hppa.c: Likewise.
1815 * elf32-i386.c: Likewise.
1816 * elf32-i386qnx.c: Likewise.
1817 * elf32-or32.c: Likewise.
1818 * elf32-s390.c: Likewise.
1819 * elf32-sh64.c: Likewise.
1820 * elf32-vax.c: Likewise.
1821 * elf32-xstormy16.c: Likewise.
1822 * elf64-alpha.c: Likewise.
1823 * elf64-mmix.c: Likewise.
1824 * elf64-ppc.c: Likewise.
1825 * elf64-s390.c: Likewise.
1826 * elf64-sh64.c: Likewise.
1827 * elf64-x86-64.c: Likewise.
1828
048d873d
RH
18292002-06-02 Richard Henderson <rth@redhat.com>
1830
1831 * elf64-alpha.c (elf64_alpha_relocate_section): Don't dereference
1832 null when there are no got entries for a symbol.
1833 (elf64_alpha_relax_find_tls_segment): Rearrange to avoid
1834 uninitialized variable warning.
1835
4a67a098
RH
18362002-06-01 Richard Henderson <rth@redhat.com>
1837
1838 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Don't test for
1839 undefined symbols here.
1840 (elf64_alpha_relax_section): Do it here. Also test for not
1841 defined in the current module.
1842 (elf64_alpha_relocate_section_r): Split out of ...
1843 (elf64_alpha_relocate_section): ... here. Don't dereference
1844 NULL when looking up local got entries.
1845
f44f99a5
RH
18462002-06-01 Richard Henderson <rth@redhat.com>
1847
1848 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Reject undefined
1849 symbols from JSR relaxation.
1850 (elf64_alpha_size_plt_section_1): New.
1851 (elf64_alpha_calc_dynrel_sizes): Split out .rela.got bits ...
1852 (elf64_alpha_size_rela_got_1): ... here.
1853 (elf64_alpha_size_dynamic_sections): Split out .rela.got bits ...
1854 (elf64_alpha_size_rela_got_section): ... here.
1855 (elf64_alpha_size_plt_section): New.
1856 (elf64_alpha_relax_section): Call them.
1857 (elf64_alpha_size_got_sections): Remove output_bfd arg.
1858 (elf64_alpha_finish_dynamic_symbol): Check gotent use_count.
1859
9e756d64
RH
18602002-06-01 Richard Henderson <rth@redhat.com>
1861
1862 * elf64-alpha.c (alpha_get_dtprel_base, alpha_get_tprel_base): New.
1863 (elf64_alpha_relocate_section): Use them. Reject LE TLS relocs
1864 in shared libraries. Fix DTPRELHI and TPRELHI value.
1865 (INSN_ADDQ, INSN_RDUNIQ): New.
1866 (struct alpha_relax_info): Add symtab_hdr, tls_segment, first_gotent.
1867 (elf64_alpha_relax_with_lituse): Return boolean. Remove irelend
1868 argument. Reject dynamic symbols. Use LITUSE symbolic constants.
1869 (elf64_alpha_relax_got_load): Rename from relax_without_lituse.
1870 Handle GOTDTPREL and GOTTPREL relocations.
1871 (elf64_alpha_relax_gprelhilo): New.
1872 (elf64_alpha_relax_tls_get_addr): New.
1873 (elf64_alpha_relax_find_tls_segment): New.
1874 (elf64_alpha_relax_section): Handle TLS relocations.
1875 (ALPHA_ELF_LINK_HASH_TLS_IE): New.
1876 (elf64_alpha_check_relocs): Set it.
1877
c853d7f6
RH
18782002-06-01 Richard Henderson <rth@redhat.com>
1879
b646261c
RH
1880 * elf64-alpha.c (elf64_alpha_relax_section): Don't store computed gp.
1881
c853d7f6
RH
1882 * elf64-alpha.c (elf64_alpha_check_relocs): Fix typo on maybe_dynamic
1883 check; don't suppress dynamic relocs for non-allocated sections.
1884
d7e41a96
RH
1885 * elf64-alpha.c: Remove dead code.
1886
5f333394
AM
18872002-05-31 Alan Modra <amodra@bigpond.net.au>
1888
08e0ee05
AM
1889 * bfd-in2.h: Regenerate.
1890 * libbfd.h: Regenerate.
1891 * po/SRC-POTFILES.in: Regenerate.
1892
5f333394
AM
1893 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate
1894 space for bss .plt.
1895
caf47ea6
AM
18962002-05-31 Graeme Peterson <gp@qnx.com>
1897
1898 * Makefile.am (BFD32_BACKENDS): Add elf32-i386qnx.lo.
1899 (BFD32_BACKENDS_CFILES): Add elf32-i386qnx.c.
1900 Run "make dep-am".
1901 * Makefile.in: Regenerate.
1902 * config.bfd: Add i[3456]86-*-nto-qnx* support.
1903 * configure.in: Add bfd_elf32_i386qnx_vec support.
1904 * configure: Regenerate.
1905 * elf-bfd.h (struct elf_backend_data): Add set_nonloadable_filepos,
1906 is_contained_by_filepos, and copy_private_bfd_data_p.
1907 * elf.c (assign_file_positions_for_segments): Call backend
1908 set_nonloadable_filepos. Fix non-K&R call to _bfd_error_handler.
1909 (IS_CONTAINED_BY_FILEPOS): Define.
1910 (INCLUDE_SECTION_IN_SEGMENT): Also test IS_CONTAINED_BY_FILEPOS.
1911 (copy_private_bfd_data): Use IS_CONTAINED_BY_FILEPOS. Typo fix.
1912 Fix non-K&R call to _bfd_error_handler.
1913 (_bfd_elf_copy_private_section_data): Use backend
1914 copy_private_bfd_data_p.
1915 * elf32-i386.c: Don't include elfxx-target.h when
1916 ELF32_I386_C_INCLUDED is defined.
1917 * elf32-i386qnx.c: New QNX elf backend file.
1918 * elfxx-target.h: Add elf_backend_set_nonloadable_filepos,
1919 elf_backend_is_contained_by_filepos, and
1920 elf_backend_do_copy_private_bfd_data.
1921 * targets.c: Add bfd_target bfd_elf32_i386qnx_vec.
1922
5bc56484
AM
19232002-05-31 Alan Modra <amodra@bigpond.net.au>
1924
1925 * elfarm-oabi.c (bfd_elf32_arm_add_glue_sections_to_bfd): Define.
1926 Move other similar defines to start of file.
1927
1b164155
TR
19282002-05-30 Tom Rix <trix@redhat.com>
1929
1930 * coff-rs6000.c (xcoff_rtype2howto): Handle 16 bit R_RBA.
1931 * coff64-rs6000.c (xcoff64_rtype2howto): Same.
1932
3765b1be
RH
19332002-05-30 Richard Henderson <rth@redhat.com>
1934
1935 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_TLSGD,
1936 ALPHA_ELF_LINK_HASH_LU_TLSLDM, ALPHA_ELF_LINK_HASH_LU_FUNC): New.
1937 (ALPHA_ELF_GOT_ENTRY_RELOCS_DONE): Remove.
1938 (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Remove.
1939 (struct alpha_elf_got_entry): Add reloc_type, reloc_done, reloc_xlated.
1940 (struct alpha_elf_obj_tdata): Rename total_got_entries and
1941 n_local_got_entries to total_got_size and local_got_size.
1942 (elf64_alpha_howto, elf64_alpha_reloc_map): Update for TLS relocs.
1943 (alpha_got_entry_size): New.
1944 (elf64_alpha_relax_with_lituse): Use it.
1945 (elf64_alpha_relax_without_lituse): Likewise.
1946 (MAX_GOT_SIZE): Rename from MAX_GOT_ENTRIES.
1947 (get_got_entry): New.
1948 (elf64_alpha_check_relocs): Handle TLS relocs. Reorganize.
1949 (elf64_alpha_adjust_dynamic_symbol): Test LU_FUNC as a mask.
1950 (elf64_alpha_merge_ind_symbols): Check gotent->reloc_type.
1951 (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots): Likewise.
1952 (elf64_alpha_calc_got_offsets_for_symbol): Use alpha_got_entry_size.
1953 (elf64_alpha_calc_got_offsets): Likewise.
1954 (alpha_dynamic_entries_for_reloc): New.
1955 (elf64_alpha_calc_dynrel_sizes): Use it.
1956 (elf64_alpha_size_dynamic_sections): Likewise.
1957 (elf64_alpha_relocate_section): Handle TLS relocations.
1958 * reloc.c: Add Alpha TLS relocations.
1959 * bfd-in2.h, libbfd.h: Rebuild.
1960
5e226794
NC
19612002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
1962
1963 * peXXigen.c (pe_print_idata): Remove double printed
1964 import table lines; add Bound-To comment.
1965
90ace9e9
JT
19662002-05-29 Matt Thomas <matt@3am-software.com>
1967
1968 * Makefile.am (BFD32_BACKENDS): Add elf32-vax.lo.
1969 (BFD32_BACKENDS_CFILES): Add elf32-vax.c.
1970 (elf32-vax.lo): New rule.
1971 * Makefile.in: Regenerate.
1972 * configure.in (bfd_elf32_vax_vec)
1973 (vaxnetbsd_vec): New vectors.
1974 * configure: Regenerate.
1975 * config.bfd (vax-*-netbsdelf*)
1976 (vax-*-netbsdaout*)
1977 (vax-*-netbsd*): New targets.
1978 * elf32-vax.c: New file.
1979 * reloc.c: Add VAX relocations.
1980 * bfd-in2.h: Regenerate.
1981 * targets.c (_bfd_target_vector): Add bfd_elf32_vax_vec.
1982
4a253e81
JT
19832002-05-29 Jason Thorpe <thorpej@wasabisystems.com>
1984
1985 * config.bfd (arm-*-netbsd*): Add bfd_elf32_littlearm_vec
1986 and bfd_elf32_bigarm_vec to targ_selvecs.
1987
6e7c73dd
CF
19882002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
1989
1990 * peXXigen.c (pe_print_idata): Fix seg faults on printing import tables
1991 with auto-imported symbols.
1992
8afb0e02
NC
19932002-05-29 Adam Nemet <anemet@lnxw.com>
1994
1995 * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Don't add glue
1996 sections only record bfd.
9bab7074 1997 (bfd_elf32_arm_add_glue_sections_to_bfd): New function.
8afb0e02 1998 * bfd-in.h (bfd_elf32_arm_add_glue_sections_to_bfd): Declare it.
9bab7074 1999 * bfd-in2.h: Regenerate.
8afb0e02 2000
a95653f5
NC
20012002-05-28 Nick Clifton <nickc@cambridge.redhat.com>
2002
2003 * syms.c (_bfd_stab_section_find_nearest_line): Move
2004 declaration and initialisation of saw_line and saw_func out of
2005 for loop.
2006
7cdc5bba
AM
20072002-05-29 Alan Modra <amodra@bigpond.net.au>
2008
2009 * elf64-ppc.c (ppc64_elf_get_symbol_info): New function.
2010 (bfd_elf64_get_symbol_info): Define.
2011 * elfxx-target.h (bfd_elfNN_get_symbol_info): Only define if undef.
2012
4c7aad1c
AM
20132002-05-29 Andrey Volkov <avolkov@transas.com>
2014
2015 * cpu-h8300.c: Make default h8300 machine first in machine list.
2016
d172d4ba
NC
20172002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net>
2018
2019 * config.bfd: Added DLX configuraton.
2020 * Makefile.am: Added DLX configuraton.
2021 * configure.in: Added DLX configuraton.
2022 * archures.c: Add DLX architecure.
2023 * reloc.c: Add DLX relocs.
2024 * targets.c: Added DLX target vector.
2025 * configure: Regenerate.
2026 * Makefile.in: Regenreate.
2027 * bfd-in2.h: Regenreate.
2028 * elf32-dlx.c: New file: Support DLX target.
2029 * cpu-dlx.c: New file: Support DLX target.
2030
d1329ca3
AM
20312002-05-25 Alan Modra <amodra@bigpond.net.au>
2032
428d0de3
AM
2033 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Formatting.
2034
d1329ca3
AM
2035 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Revert last change.
2036 (ppc64_elf_check_relocs): Don't set up function descriptor symbol
2037 strings to point inside function code sym string.
2038 (func_desc_adjust): Likewise.
2039 (ppc64_elf_hide_symbol): Rewrite code to look up function code sym.
2040
3bab7989
ML
20412002-05-24 Michal Ludvig <mludvig@suse.cz>
2042
2043 * elf64-x86-64.c (elf64_x86_64_grok_prstatus): Added.
2044 (elf64_x86_64_grok_psinfo): Added.
2045
436e8db0
NC
20462002-05-24 TAMURA Kent <kent@netbsd.org>
2047
2048 * config.bfd: Add a target for i386-netbsdpe.
2049
ea1e4b0d
AM
20502002-05-24 Alan Modra <amodra@bigpond.net.au>
2051
2052 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy is_func
2053 and is_func_descriptor.
2054 (func_desc_adjust): Hide function code sym in shared libs unless
2055 there is a matching exported function descriptor sym.
2056
13ae64f3
JJ
20572002-05-23 Jakub Jelinek <jakub@redhat.com>
2058
2059 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_THREAD_LOCAL
2060 for symbols from SHF_TLS section.
2061 (_bfd_elf_print_private_bfd_data): Add PT_TLS.
2062 (elf_fake_sections): Set SHF_TLS for SEC_THREAD_LOCAL sections.
2063 (map_sections_to_segments): Build PT_TLS segment if necessary.
2064 (assign_file_positions_for_segments): Likewise.
2065 (get_program_header_size): Account for PT_TLS segment.
2066 (swap_out_syms): Set type of BSF_THREAD_LOCAL symbols and symbols from
2067 SEC_THREAD_LOCAL sections to STT_TLS.
2068 * reloc.c: Add 386 and IA-64 TLS relocs.
2069 * section.c (SEC_THREAD_LOCAL): Define.
2070 (SEC_CONSTRUCTOR_TEXT, SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS):
2071 Remove.
2072 * elflink.h (elf_link_add_object_symbols): Support .tcommon.
2073 (size_dynamic_sections): If DF_STATIC_TLS, set DF_FLAGS
2074 unconditionally.
2075 (struct elf_final_link_info): Add first_tls_sec.
2076 (elf_bfd_final_link): Set first_tls_sec.
2077 Compute elf_hash_table (info)->tls_segment.
2078 (elf_link_output_extsym): Handle STT_TLS symbols.
2079 (elf_link_input_bfd): Likewise.
2080 * syms.c (BSF_THREAD_LOCAL): Define.
2081 * bfd-in2.h: Rebuilt.
2082 * libbfd.h: Rebuilt.
2083 * elf32-i386.c (elf_i386_tls_transition, dtpoff_base, tpoff,
2084 elf_i386_mkobject, elf_i386_object_p): New functions.
2085 (elf_howto_table): Add TLS relocs.
2086 (elf_i386_reloc_type_lookup): Support TLS relocs.
2087 (elf_i386_info_to_howto_rel): Likewise.
2088 (struct elf_i386_link_hash_entry): Add tls_type.
2089 (struct elf_i386_obj_tdata): New.
2090 (elf_i386_hash_entry, elf_i386_tdata, elf_i386_local_got_tls_type):
2091 New macros.
2092 (struct elf_i386_link_hash_table): Add tls_ldm_got.
2093 (link_hash_newfunc): Clear tls_type.
2094 (elf_i386_check_relocs): Support TLS relocs.
2095 (elf_i386_gc_sweep_hook): Likewise.
2096 (allocate_dynrelocs): Likewise.
2097 (elf_i386_size_dynamic_sections): Likewise.
2098 (elf_i386_relocate_section): Likewise.
2099 (elf_i386_finish_dynamic_symbol): Likewise.
2100 (bfd_elf32_mkobject, elf_backend_object_p): Define.
2101 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add tprel_offset,
2102 dtpmod_offset, dtprel_offset, tprel_done, dtpmod_done, dtprel_done,
2103 want_tprel, want_dtpmod, want_dtprel.
2104 (elfNN_ia64_tprel_base, elfNN_ia64_dtprel_base): New functions.
2105 (ia64_howto_table): Add TLS relocs, rename R_IA64_LTOFF_TP22 to
2106 R_IA64_LTOFF_TPREL22.
2107 (elf_code_to_howto_index): Add TLS relocs.
2108 (elfNN_ia64_check_relocs): Support TLS relocs.
2109 (allocate_global_data_got): Account for TLS .got data.
2110 (allocate_dynrel_entries): Account for TLS dynamic relocations.
2111 (elfNN_ia64_install_value): Supprt TLS relocs.
2112 (set_got_entry): Support TLS relocs.
2113 (elfNN_ia64_relocate_section): Likewise.
2114
c62e1cc3
NC
21152002-05-23 Nick Clifton <nickc@cambridge.redhat.com>
2116
2117 * elf32-arm.h (elf32_arm_final_link_relocate): For the Thumb
2118 BLX reloc round the relocation up rather than down.
2119 * coff-arm.c (coff_arm_relocate_section): Likewise.
2120
c5a43a5d
L
21212002-05-21 H.J. Lu (hjl@gnu.org)
2122
2123 * linker.c (_bfd_generic_link_add_one_symbol): Allow multiple
2124 definition.
2125
afbe61cf
AM
21262002-05-22 Alan Modra <amodra@bigpond.net.au>
2127
2128 * elf64-ppc.c (ppc64_elf_size_stubs): Don't strip .branch_lt.
2129 (ppc64_elf_relocate_section): Handle unresolved relocs in opd.
2130
9c07fe7c
AM
21312002-05-22 Alan Modra <amodra@bigpond.net.au>
2132
2133 * elf64-ppc.c (ppc64_elf_relocate_section): Return false for
2134 unresolved relocs.
2135 (ppc64_elf_size_dynamic_sections): Check for splt NULL.
2136
21611032
TS
21372002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2138
c5cd6d62 2139 * bfd.c (bfd_get_arch_size): Remove bfd_set_error call for
21611032
TS
2140 non-ELF targets.
2141
41241523
TS
21422002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2143
2144 * elf-bfd.h (elf_backend_emit_relocs): Change prototype to return
2145 an error value.
2146 * elflink.h (elf_link_output_relocs): Likewise. Improve error message.
2147 return with false on error.
2148 (elf_link_input_bfd): Check reloc_emitter return value.
2149
658f2588
JT
21502002-05-21 Jason Thorpe <thorpej@wasabisystems.com>
2151
2152 * config.bfd (armeb-*-netbsdelf*): New target.
2153
c862ae31
AM
21542002-05-20 Alan Modra <amodra@bigpond.net.au>
2155
2156 * elf64-ppc.c (ppc_build_one_stub): Point undefined function syms
2157 at the plt call stub.
2158
6dd14845
TS
21592002-05-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2160
2161 * cpu-mips.c (mips_compatible): Don't try to check machine
2162 compatibility.
2163
a58d9c34
TR
21642002-05-18 Tom Rix <trix@redhat.com>
2165
2166 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_out): Fix C_FILE auxent.
2167
ef60b7ff
AM
21682002-05-17 Alan Modra <amodra@bigpond.net.au>
2169
2170 * elf64-ppc.c (ppc64_elf_info_to_howto): Formatting.
2171 (ppc64_elf_relocate_section): Don't warn about reloc overflow when
2172 we've already warned about an undefined symbol. Report more
2173 detail on reloc errors.
2174
a703a6ea
AM
21752002-05-17 Alan Modra <amodra@bigpond.net.au>
2176
2177 * acinclude.m4 (AM_INSTALL_LIBBFD): New.
2178 * configure.in: Invoke AM_INSTALL_LIBBFD.
2179 * Makefile.am (install-data-local): Revert 2002-05-13. Move to..
2180 (install_libbfd): .. New target.
2181 (uninstall_libbfd): Likewise.
2182 (install-bfdlibLTLIBRARIES): Likewise.
2183 (uninstall-bfdlibLTLIBRARIES): Likewise.
2184 (bfdlibdir): New.
2185 (bfdincludedir): New.
2186 (lib_LTLIBRARIES): Rename to bfdlib_LTLIBRARIES.
2187 * aclocal.m4: Regenerate.
2188 * configure: Regenerate.
2189 * Makefile.in: Regenerate.
2190
2c13d98b
NC
21912002-05-17 Stuart Balfour <sbalfour@cisco.com>
2192
2193 * hash.c (bfd_hash_lookup): Remove computation of len from inside
2194 hash loop.
2195
629936c5
NC
21962002-05-16 Nick Clifton <nickc@cambridge.redhat.com>
2197
2198 * config.bfd: Add targets for sh64-linux (little endian and
2199 big endian).
2200
e4cf60a8
NC
22012002-05-15 Laurent Pinchart <laurent.pinchart@skynet.be>
2202
2203 * peXXigen.c (pe_print_idata): Do not assume that the first thunk
2204 is located in the same section as the import table. Instead
2205 check, and if necessary load the section containing the thunk.
2206
d1e66cd4
NC
22072002-05-15 Nick Clifton <nickc@cambridge.redhat.com>
2208
2209 * aix5ppc-core.c (xcoff64_core_p): Replace bfd_read with
ea1e4b0d
AM
2210 bfd_bread.
2211 (xcoff64_core_file_matches_executable_p): Replace bfd_read
2212 with bfd_bread.
d1e66cd4 2213
2d653fc7
AM
22142002-05-15 Alan Modra <amodra@bigpond.net.au>
2215
2216 * aix5ppc-core.c: Warning fixes.
2217 * aout-adobe.c (aout_32_bfd_link_just_syms): Define.
2218 * aout-target.h (MY_bfd_link_just_syms): Define.
2219 * aout-tic30.c (MY_bfd_link_just_syms): Define.
2220 * bfd.c (bfd_link_just_syms): Define.
2221 * binary.c (binary_bfd_link_just_syms): Define.
2222 * bout.c (b_out_bfd_link_just_syms): Define.
2223 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update initializer.
2224 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
2225 * coffcode.h (coff_bfd_link_just_syms): Define.
2226 * elf-bfd.h (enum elf_link_info_type): Add ELF_INFO_TYPE_JUST_SYMS.
2227 (elf_discarded_section): Check for ELF_INFO_TYPE_JUST_SYMS.
2228 (_bfd_elf_link_just_syms): Declare.
2229 * elf.c (_bfd_elf_link_just_syms): New function.
2230 * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Check that
2231 sections haven't already been discarded by the linker.
2232 * elflink.h (elf_link_add_object_symbols): Likewise for stab
2233 sections and SEC_MERGE sections.
2234 (elf_bfd_discard_info): Similarly here.
2235 * elfxx-target.h (bfd_elfNN_bfd_link_just_syms): Define.
2236 * i386msdos.c (msdos_bfd_link_just_syms): Define.
2237 * i386os9k.c (os9k_bfd_link_just_syms): Define.
2238 * ieee.c (ieee_bfd_link_just_syms): Define.
2239 * ihex.c (ihex_bfd_link_just_syms): Define.
2240 * libbfd-in.h (_bfd_nolink_bfd_link_just_syms): Define.
2241 (_bfd_generic_link_just_syms): Declare.
2242 * libecoff.h (_bfd_ecoff_bfd_link_just_syms): Define.
2243 * linker.c (_bfd_generic_link_just_syms): New function.
2244 * mmo.c (mmo_bfd_link_just_syms): Define.
2245 * nlm-target.h (nlm_bfd_link_just_syms): Define.
2246 * oasys.c (oasys_bfd_link_just_syms): Define.
2247 * ppcboot.c (ppcboot_bfd_link_just_syms): Define.
2248 * som.c (som_bfd_link_just_syms): Define.
2249 * srec.c (srec_bfd_link_just_syms): Define.
2250 * targets.c (struct bfd_target): Add _bfd_link_just_syms.
2251 (BFD_JUMP_TABLE_LINK): And here.
2252 * tekhex.c (tekhex_bfd_link_just_syms): Define.
2253 * versados.c (versados_bfd_link_just_syms): Define.
2254 * vms.c (vms_bfd_link_just_syms): Define.
2255 * libbfd.h: Regenerate.
2256 * bfd-in2.h: Regenerate.
2257
cb7394f2
TS
22582002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2259
2260 * elf32-mips.c: Remove superfluous definitions copied from
2261 elfxx-mips.c.
2262 (bfd_elf32_bigmips_vec,bfd_elf32_littlemips_vec): Use the
2263 SGIish vectors to check the special case.
2264 (mips_elf_hi16_reloc): Fix comment.
2265 (mips_elf_got16_reloc): Likewise.
2266 (_bfd_mips_elf32_gprel16_reloc): Likewise.
2267 (elf_reloc_map): Code cleanup.
2268 (mips_reloc_map): Add comment.
2269 (bfd_elf23_bfd_reloc_type_lookup): Code cleanup.
2270 (mips_elf32_rtype_to_howto): Likewise.
2271 (mips_elf32_discard_info): Likewise.
2272 (elf32_mips_irix_compat): Invert logic: Only SGIish vectors
2273 lead to IRIX compatibility now.
2274
8dc1a139
TS
22752002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2276
2277 * elfxx-mips.c: Call it IRIX, not Irix in comments.
2278
2051e1b5
JT
22792002-05-13 Jason Thorpe <thorpej@wasabisystems.com>
2280
2281 * config.bfd (shle-*-netbsdelf*): Add target which includes
2282 sh64 support.
2283
83954261
AM
22842002-05-13 David Edelsohn <edelsohn@gnu.org>
2285
2286 * configure.in: Revert 2002-04-07. Instead, auto-configure
2287 HAVE_ST_C_IMPL.
2288 * configure: Regenerate.
2289 * config.in: Regenerate.
2290 * rs6000-core.c (CNEW_IMPL): Guard use of c_impl with HAVE_ST_C_IMPL
2291 or AIX_5_CORE.
2292
a9bf1154
NC
22932002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
2294
2295 * configure.in (sparc*-*-openbsd*): Support sparc64-openbsd
2296 corefiles as well.2
2297 * configure: Regenerate.
2298
3129eb7a
AM
22992002-05-13 Alan Modra <amodra@bigpond.net.au>
2300
2301 * Makefile.am (install-data-local): Install headers to
2302 $(exec_prefix)/include.
2303 * Makefile.in: Regenerate.
2304
a9a32010
DJ
23052002-05-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
2306 Daniel Jacobowitz <drow@mvista.com>
2307
2308 * coff-sh.c (sh_reloc_map): Map to R_SH_IMM32 for non-PE. Don't
2309 map BFD_RELOC_RVA.
2310
23112002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
690cc98b
NC
2312
2313 * config.bfd (alpha*-*-openbsd*, sparc64*-*-openbsd*,
2314 hppa*-*-openbsd*): New targets.
2315 * configure.in (alpha*-*-openbsd*): Set COREFILE.
2316 * configure: Regenerate.
2317
f1f0d9ab
TR
23182002-05-10 Tom Rix <trix@redhat.com>
2319
ea1e4b0d 2320 * coff64-rs6000.c (xcoff64_reloc_type_br): New function for
f1f0d9ab
TR
2321 xcoff64_ppc_relocate_section.
2322 * coff-rs6000.c : Extern common xcoff_reloc_type functions.
2323 * libxcoff.h: Common xcoff_reloc_type function declaration.
2324
c432ba1a
AM
23252002-05-10 Alan Modra <amodra@bigpond.net.au>
2326
16a10388 2327 * elf32-i386.c (elf_i386_relocate_section): Remove overflow checks
90937f86 2328 added in 2002-05-09 commit.
16a10388 2329
c432ba1a
AM
2330 * elf32-hppa.c (elf32_hppa_size_stubs): Revert part of 2002-05-04,
2331 don't look for stubs on all undefined syms.
2332
4a335f3d
AM
23332002-05-09 Alan Modra <amodra@bigpond.net.au>
2334
8fc39d5d
AM
2335 * elf64-ppc.c (RA_REGISTER_MASK, RA_REGISTER_SHIFT): Delete.
2336 (ppc64_elf_howto_raw <R_PPC64_RELATIVE>): Not pc_relative or
2337 pcrel_offset.
2338
4a335f3d
AM
2339 * elf32-i386.c (elf_howto_table): Comments.
2340 (elf_i386_relocate_section): Handle more relocs for relocatable
2341 linking and against SEC_MERGE sections.
2342
41fcb14e
AM
23432002-05-08 Alan Modra <amodra@bigpond.net.au>
2344
2345 * elf32-ppc.c (ppc_elf_create_got): New function.
2346 (ppc_elf_create_dynamic_sections): Call ppc_elf_create_got before
ea1e4b0d 2347 _bfd_elf_create_dynamic_sections. Correct .plt flags.
41fcb14e
AM
2348 (ppc_elf_check_relocs): Use ppc_elf_create_got in place of
2349 _bfd_elf_create_got_section.
2350
b491616a
AM
23512002-05-07 Alan Modra <amodra@bigpond.net.au>
2352
2353 * elf-bfd.h (struct elf_backend_data): Add rela_normal.
2354 * elfxx-target.h (elf_backend_rela_normal): Define.
2355 (elfNN_bed): Init rela_normal.
2356 * elflink.h (elf_link_input_bfd <emit_relocs>): Handle adjustment
2357 for section symbols here if rela_normal. Simplify abs section test.
2358 * elf-m10200.c (mn10200_elf_relocate_section): If relocatable,
2359 return immediately. Remove code handling relocatable linking.
2360 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
2361 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
2362 * elf32-i370.c (i370_elf_relocate_section): Likewise.
2363 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
2364 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
2365 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
2366 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
2367 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2368 * elf32-s390.c (elf_s390_relocate_section): Likewise.
2369 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
2370 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
2371 * elf64-s390.c (elf_s390_relocate_section): Likewise.
2372 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
2373 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
2374 * elf32-arm.h (elf32_arm_relocate_section): Likewise #ifndef USE_REL.
2375 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
2376 * elf-m10200.c (elf_backend_rela_normal): Define.
2377 * elf-m10300.c (elf_backend_rela_normal): Define.
2378 * elf32-fr30.c (elf_backend_rela_normal): Define.
2379 * elf32-i370.c (elf_backend_rela_normal): Define.
2380 * elf32-i860.c (elf_backend_rela_normal): Define.
2381 * elf32-m68k.c (elf_backend_rela_normal): Define.
2382 * elf32-mcore.c (elf_backend_rela_normal): Define.
2383 * elf32-openrisc.c (elf_backend_rela_normal): Define.
2384 * elf32-ppc.c (elf_backend_rela_normal): Define.
2385 * elf32-s390.c (elf_backend_rela_normal): Define.
2386 * elf32-xstormy16.c (elf_backend_rela_normal): Define.
2387 * elf64-ppc.c (elf_backend_rela_normal): Define.
2388 * elf64-s390.c (elf_backend_rela_normal): Define.
2389 * elf64-x86-64.c (elf_backend_rela_normal): Define.
2390 * elfxx-ia64.c (elf_backend_rela_normal): Define.
2391 * elf32-arm.h (elf_backend_rela_normal): Define #ifndef USE_REL.
2392 * elf32-m32r.c (elf_backend_rela_normal): Likewise.
2393
df212a7e
NC
23942002-05-06 Nick Clifton <nickc@cambridge.redhat.com>
2395
2396 * elf32-arm.h (elf32_arm_final_link_relocate): Convert
2397 'reloc_signed_max' and 'reloc_signed_min' into half-word offsets.
2398
3decf53c
AM
23992002-05-06 Alan Modra <amodra@bigpond.net.au>
2400
2401 * elflink.h (elf_link_input_bfd <emit_relocs>): Adjust r_offset
2402 when not relocatable. Fix reloc_emitter call for K&R.
2403
f46c2da6
AM
24042002-05-04 Alan Modra <amodra@bigpond.net.au>
2405
2406 * elf64-ppc.c (ppc64_elf_relocate_section): Reinstate code
2407 reloading local sym addend mistakenly removed in 2002-05-01 change.
2408
2409 * dwarf2.c (struct line_head): Make prologue_length a bfd_vma.
2410 (read_abbrevs): Change "offset" param to bfd_vma.
2411 (parse_comp_unit): Change "version" and addr_size to unsigned ints.
2412 Change "abbrev_offset" to bfd_vma.
2413 (read_indirect_string): Use correct conversion chars in error
2414 message format string, cast bfd_vma's to unsigned long.
2415 (read_abbrevs): Likewise.
2416 (read_attribute_value): Likewise.
2417 (decode_line_info): Likewise.
2418 (scan_unit_for_functions): Likewise.
2419 (parse_comp_unit): Likewise.
2420
59862849
TR
24212002-05-04 Tom Rix <trix@redhat.com>
2422
2423 * coffswap.h (coff_swap_reloc_in): Remove XCOFF support.
2424 (coff_swap_reloc_out): Same.
2425 * coff-rs6000.c: (xcoff_swap_reloc_in): Moved from coffswap.h.
2426 (xcoff_swap_reloc_out): Same.
2427 (xcoff_rtype2howto): Renamed from _bfd_xcoff_rtype2howto. Special
2428 case some 16 bit relocs. Add reloc value to output.
2429 (xcoff_howto_table): Remove 64 bit R_POS, add 16 bit
ea1e4b0d 2430 R_RBR. Improve names.
59862849
TR
2431 (_bfd_xcoff_reloc_type_lookup): Adjust for removal of 64 bit R_POS.
2432 (bfd_xcoff_backend_data): Update with new reloc swap names.
2433 (bfd_pmac_xcoff_backend_data) : Same.
2434 * coff64-rs6000.c: (xcoff64_swap_reloc_in): Moved from coffswap.h.
2435 (xcoff64_swap_reloc_out): Same.
ea1e4b0d 2436 (xcoff64_rtype2howto): Special case some 16 bit relocs and 32 bit
59862849 2437 R_POS. Add reloc value to output.
ea1e4b0d
AM
2438 (xcoff64_howto_table): Move 64 bit R_POS to first entry. Add 16
2439 bit R_RBR. Improve names, masks.
59862849
TR
2440 (xcoff64_reloc_type_lookup): Adjust for move of 64 bit R_POS.
2441 (bfd_xcoff_backend_data): Update with new reloc swap names.
2442 (bfd_xcoff_aix5_backend_data) : Same.
2443
b4655ea9
AM
24442002-05-04 Alan Modra <amodra@bigpond.net.au>
2445
2446 * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add
2447 bfd_count top_index, input_list, all_local_syms.
2448 (elf32_hppa_setup_section_lists): New function, split from
2449 elf32_hppa_size_stubs.
2450 (elf32_hppa_next_input_section): Likewise.
2451 (group_sections): Likewise.
2452 (get_local_syms): Likewise.
2453 (elf32_hppa_size_stubs): Adjust for split out functions. Look for
2454 stubs on undefined syms too.
2455 (elf32_hppa_set_gp): Use bfd_link_hash* instead of elf_link_hash*.
8fc39d5d 2456 Only access htab elf fields when we have an elf hash table.
b4655ea9
AM
2457 * elf32-hppa.h (elf32_hppa_setup_section_lists): Declare.
2458 (elf32_hppa_next_input_section): Declare.
2459
301e3139
AM
24602002-05-04 Bob Byrnes <byrnes@curl.com>
2461
2462 * opncls.c (_bfd_new_bfd_contained_in): Check return value of
2463 _bfd_new_bfd.
2464
7c5fcef7
L
24652002-05-03 H.J. Lu (hjl@gnu.org)
2466
2467 * elfxx-mips.c (mips_elf_link_hash_entry): Add forced_local.
2468 (mips_elf_link_hash_newfunc): Initialize forced_local to false.
2469 (mips_elf_record_global_got_symbol): Call _bfd_mips_elf_hide_symbol
2470 to hide a global symbol.
2471 (_bfd_mips_elf_hide_symbol): Return if forced_local is true. Set
ea1e4b0d 2472 forced_local to true.
7c5fcef7 2473
84de6048
RH
24742002-05-02 Richard Henderson <rth@redhat.com>
2475
2476 * elf64-alpha.c (elf64_alpha_relocate_section): Force relative relocs
2477 vs SHN_UNDEF to zero.
2478
805fc799
AM
24792002-05-02 Alan Modra <amodra@bigpond.net.au>
2480
c061c2d8
AM
2481 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_SECTOFF>): Change to a
2482 16 bit reloc.
2483 <R_PPC64_SECTOFF_DS>: Likewise.
2484 (ppc64_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
2485 SECTOFF reloc.
2486 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_SECTOFF>): Correct.
2487 (ppc_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
2488 SECTOFF reloc.
2489
805fc799
AM
2490 * elf64-ppc.c (ppc64_elf_addr16_ha_reloc): Delete.
2491 (ppc64_elf_ha_reloc): New function.
2492 (ppc64_elf_brtaken_reloc): New function.
2493 (ppc64_elf_sectoff_reloc): New function.
2494 (ppc64_elf_sectoff_ha_reloc): New function.
2495 (ppc64_elf_toc_reloc): New function.
2496 (ppc64_elf_toc_ha_reloc): New function.
2497 (ppc64_elf_toc64_reloc): New function.
2498 (ppc64_elf_unhandled_reloc): New function.
2499 (ppc64_elf_howto_raw): Use the above.
2500 <R_PPC64_RELATIVE>: Mark pc_relative, pcrel_offset.
2501 <R_PPC64_SECTOFF>: Not pc_relative or pcrel_offset. Fix dst_mask.
2502 <R_PPC64_SECTOFF_DS>: Likewise.
2503 (IS_ABSOLUTE_RELOC): Update.
2504 (struct ppc_link_hash_table): Add have_undefweak.
2505 (ppc64_elf_link_hash_table_create): Init.
2506 (func_desc_adjust): Set have_undefweak.
2507 (ppc64_elf_func_desc_adjust): Call func_desc_adjust earlier. Only
2508 add the .sfpr blr when have_undefweak.
2509 (ppc64_elf_setup_section_lists): Check hash table flavour.
2510 (ppc64_elf_next_input_section): Move output_section->owner test to
2511 ppc64elf.em.
2512 (ppc64_elf_set_toc): Rename to ppc64_elf_toc, remove info param
2513 and relocatable test. Return TOCstart and don't set elf_gp.
2514 (ppc64_elf_relocate_section): Correct BRTAKEN/BRNTAKEN branch
2515 offset calculation. Add assert on weak sym branch tweaks.
2516 * elf64-ppc.h (ppc64_elf_set_toc): Delete.
2517 (ppc64_elf_toc): Declare.
2518 (ppc64_elf_next_input_section): Update.
ea1e4b0d 2519
818c39a3
AM
25202002-05-01 Alan Modra <amodra@bigpond.net.au>
2521
2522 * syms.c (_bfd_stab_section_find_nearest_line): Don't bomb on NULL
2523 file_name.
2524
721956f4
AM
25252002-05-01 Alan Modra <amodra@bigpond.net.au>
2526
2527 * elf64-ppc.c (CROR_151515, CROR_313131): Define.
2528 (ppc64_elf_relocate_section): Use them. Don't look for plt calls
2529 on R_PPC64_ADDR24 relocs. Require a nop or no link reg on plt
2530 call branches. Correct undefined weak destination.
2531 (ppc64_elf_func_desc_adjust): Always create at least one blr in
2532 .sfpr, and correct case where either only savef* or restf* is
2533 needed.
2534
2535 Long branch stubs, multiple stub sections.
2536 * elf64-ppc.h (ppc64_elf_setup_section_lists): Declare.
2537 (ppc64_elf_next_input_section): Declare.
2538 * elf64-ppc.c: Move linker-only prototypes.
2539 (STUB_SUFFIX): Define.
2540 (enum ppc_stub_type): New.
2541 (struct ppc_stub_hash_entry): New.
2542 (struct ppc_branch_hash_entry): New.
2543 (struct ppc_link_hash_entry): Add stub_cache, oh.
2544 (struct ppc_link_hash_table): Add stub_hash_table etc. Remove
2545 sstub. Add sbrlt, srelbrlt, has_14bit_branch, stub_iteration.
2546 Rename plt_overflow to stub_error.
2547 (ppc_stub_hash_lookup): Define.
2548 (ppc_branch_hash_lookup): Define.
2549 (stub_hash_newfunc): New function.
2550 (branch_hash_newfunc): New function.
2551 (link_hash_newfunc): Init new fields.
2552 (ppc64_elf_link_hash_table_create): Likewise.
2553 (ppc64_elf_link_hash_table_free): New function.
2554 (ppc_stub_name): New function.
2555 (ppc_get_stub_entry): New function.
2556 (ppc_add_stub): New function.
2557 (create_linkage_sections): Use bfd_make_section_anyway. Create
2558 .branch_lt and .rela.branch_lt sections. Don't create .stub.
2559 (ppc64_elf_check_relocs): Set has_14bit_branch on R_PPC64_REL14*,
2560 and set up for plt call stubs. Link func and func desc syms.
2561 (ppc64_elf_gc_sweep_hook): Handle REL14* as per REL24.
2562 (func_desc_adjust): Avoid hash lookup when func desc sym available
2563 via shortcut, and set links when processing.
2564 (ppc64_elf_hide_symbol): Likewise.
2565 (allocate_dynrelocs): Don't allocate stub section here.
2566 (ppc64_elf_size_dynamic_sections): Handle sbrlt and srelbrlt.
2567 Remove sstub code.
2568 (ppc_type_of_stub): New function.
2569 (build_one_stub): Delete.
2570 (ppc_build_one_stub): New function.
2571 (ppc_size_one_stub): New function.
2572 (ppc64_elf_setup_section_lists): New function.
2573 (ppc64_elf_next_input_section): New function.
2574 (group_sections): New function.
2575 (get_local_syms): New function.
2576 (ppc64_elf_size_stubs): Rewrite.
2577 (ppc64_elf_build_stubs): Rewrite.
2578 (ppc64_elf_relocate_section): Look up stub entry for REL24
2579 relocs. Don't propagate REL14* to dynamic objects. Look for long
2580 branch stubs if REL14* or REL24 relocs won't reach.
2581 (bfd_elf64_bfd_link_hash_table_free): Define.
2582
09c2219b
MM
25832002-04-30 Mark Mitchell <mark@codesourcery.com>
2584
c5cd6d62 2585 * config.bfd: Add support for powerpc-*-windiss.
09c2219b 2586
07b678c0
TR
25872002-04-30 Tom Rix <trix@redhat.com>
2588
2589 * xcofflink.c (xcoff_link_add_symbols): Always copy undef C_EXT
2590 symbol names into the hash table.
2591
dbe341c6
TR
25922002-04-28 Tom Rix <trix@redhat.com>
2593
2594 * coff-rs6000.c (xcoff_calculate_relocation) : Function table for
ea1e4b0d 2595 calulating relocations.
dbe341c6 2596 (xcoff_complain_overflow) : Function table for relocation errors.
ea1e4b0d
AM
2597 (xcoff_ppc_relocate_section): Use relocation and complain function
2598 tables.
2599 (xcoff_complain_overflow_unsigned_func): New complain function.
dbe341c6
TR
2600 (xcoff_complain_overflow_signed_func): Same.
2601 (xcoff_complain_overflow_bitfield_func): Same.
2602 (xcoff_complain_overflow_dont_func): Same.
2603 (xcoff_reloc_type_crel): New recot function.
2604 (xcoff_reloc_type_br): Same.
2605 (xcoff_reloc_type_ba): Same.
2606 (xcoff_reloc_type_toc): Same.
2607 (xcoff_reloc_type_rel): Same.
2608 (xcoff_reloc_type_neg): Same.
2609 (xcoff_reloc_type_pos): Same.
2610 (xcoff_reloc_type_fail): Same.
2611 (xcoff_reloc_type_noop): Same.
2612 * libxcoff.h : Declare common parts for xcoff64.
2613 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Use relocation
ea1e4b0d 2614 and complain function tables.
dbe341c6 2615
985142a4
AM
26162002-04-28 Alan Modra <amodra@bigpond.net.au>
2617
2618 * elf64-x86-64.c (struct elf64_x86_64_dyn_relocs): Comment typo.
2619 * elf32-hppa.c (elf32_hppa_final_link): Formatting.
2620
eba91044
AM
26212002-04-26 Alan Modra <amodra@bigpond.net.au>
2622
e54fdaa5
AM
2623 * opncls.c (bfd_make_readable): Call bfd_section_list_clear.
2624 * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
2625
a50c1845
AM
2626 * elflink.h (elf_bfd_final_link): Ensure input bfd class is the
2627 same as the output before calling elf_link_input_bfd.
2628
eba91044
AM
2629 * coffcode.h (coff_compute_section_file_positions): Set
2630 section_tail after shuffling section list.
2631
3c25c5f6
NC
26322002-04-24 Christian Groessler <chris@groessler.org>
2633
2634 * coff-z8k.c (extra_case): Fix R_IMM32 relocations: The
2635 addresses are 23bit with a special layout, not plain 32bit
2636 values. Prevent relocation of immediate values.
2637
40d32fc6
CD
26382002-04-24 Chris G. Demetriou <cgd@broadcom.com>
2639
2640 * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): If MDMX or
2641 MIPS-16 ASE flags are set, print something to indicate that.
2642
067fa4a6
AM
26432002-04-23 Alan Modra <amodra@bigpond.net.au>
2644
2645 * elf32-hppa.c (hppa_type_of_stub): Correct and simplify condition
2646 under which a plt call stub is used.
2647 (final_link_relocate): Similarly.
2648 (allocate_plt_static): Clear h-plabel except when plt entry is
2649 exclusively used for a plabel.
2650 (allocate_dynrelocs): Use the above to simplify plt sizing.
2651 (struct elf32_hppa_link_hash_table): Add has_22bit_branch.
2652 (elf32_hppa_link_hash_table_create): Init.
2653 (BL22_RP): Define.
2654 (hppa_build_one_stub): Use BL22_RP if has_22bit_branch.
2655 (elf32_hppa_check_relocs): Set has_22bit_branch.
2656
2657 * elf32-hppa.c (elf32_hppa_check_relocs): Remove debug message.
2658 (final_link_relocate): Likewise.
2659
af40ce3c
JJ
26602002-04-22 Jakub Jelinek <jakub@redhat.com>
2661
2662 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't build
2663 search table if some FDE is DW_EH_PE_aligned encoded either.
2664 (_bfd_elf_write_section_eh_frame): Handle terminating FDE specially.
2665
09ae86c2
JJ
26662002-04-22 Richard Smith <richard@ex-parrot.com>
2667 Jakub Jelinek <jakub@redhat.com>
2668
2669 * elf-eh-frame.c (struct eh_cie_fde): Add per_encoding_relative.
2670 (_bfd_elf_discard_section_eh_frame): Set it for CIEs with pcrel
2671 encoded personality.
2672 (_bfd_elf_write_section_eh_frame): Adjust pcrel encoded personality
2673 for CIE/FDE removal.
2674
deeb2cd7
TR
26752002-04-20 Tom Rix <trix@redhat.com>
2676
2677 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Fix C_FILE auxent.
2678
99dc0092
AM
26792002-04-20 Alan Modra <amodra@bigpond.net.au>
2680
aa3d5824
AM
2681 * archures.c (bfd_lookup_arch): Move the list order comment..
2682 (struct bfd_arch_info): ..to where it belongs.
2683 * bfd-in2.h: Regenerate.
2684
99dc0092
AM
2685 * archures.c (bfd_lookup_arch): Add comment on list order.
2686 (bfd_default_set_arch_mach): Use bfd_lookup_arch.
2687 * cpu-powerpc.c (bfd_powerpc_archs): Re-order so that the default
2688 is always at head of list.
2689
7831a775
NC
26902002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
2691
2692 * coff-arm.c (coff_thumb_pcrel_12, coff_thumb_pcrel_9,
2693 insert_thumb_branch, record_thumb_to_arm_glue): Suppress
2694 definition of these functions for ARM_WINCE builds as they are
2695 not used.
ea1e4b0d 2696 (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET): Do not define
7831a775
NC
2697 for ARM_WINCE builds.
2698
26992002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
2700
ea1e4b0d 2701 * coff-arm.c (bfd_arm_process_before_allocation):
7831a775
NC
2702
27032002-04-17 J"orn Rennecke <joern.rennecke@superh.com>
a44d7f9c
JR
2704
2705 * cpu-sh.c (scan_mach): Delete.
2706 (arch_info_struct): Replace scan_mach with bfd_default_scan.
2707 (bfd_sh_arch): Likewise.
2708
3d8dbe36
NC
27092002-04-16 Nick Clifton <nickc@cambridge.redhat.com>
2710
2711 * ihex.c (ihex_write_object_contents): Fix check for records
2712 crossing 64K boundaries.
2713
4ab82700
AM
27142002-04-16 Alan Modra <amodra@bigpond.net.au>
2715
2716 * elf32-m32r.c (m32r_elf_add_symbol_hook): Check the hash table
2717 type rather than just assuming entries are ELF.
2718 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
2719 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
2720 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Likewise.
2721 * elf64-mmix.c (mmix_elf_add_symbol_hook): Use bfd_link_hash_entry
2722 rather than elf_link_hash_entry.
2723
036fe0fe
RH
27242002-04-15 Richard Henderson <rth@redhat.com>
2725
2726 * elf32-mips.c (mips_elf32_object_p): Revert 0404 fragment: allow
2727 n32 binaries.
2728
c4f3d130
NC
27292002-04-15 Michael Snyder <msnyder@redhat.com>
2730
2731 * opncls.c (bfd_close): Write contents if writeable.
2732 Minor formatting tidy-ups.
2733
4ab82700 27342002-04-15 Alan Modra <amodra@bigpond.net.au>
27242387
AM
2735
2736 * elf32-ppc.c (ppc_elf_add_symbol_hook): Check the hash table type.
2737
0c04d169
MS
27382002-04-12 Michael Snyder <msnyder@redhat.com>
2739
2740 * bfd-in.h (bfd_get_section_lma): New access macro.
2741 Minor white-space fix-up.
2742
89d4966f
AM
27432002-04-12 Alan Modra <amodra@bigpond.net.au>
2744
2745 * elf.c (prep_headers): Don't zero EI_OSABI, EI_ABIVERSION or
2746 header pad.
2747
8d0da3c2
DD
27482002-04-09 DJ Delorie <dj@redhat.com>
2749
2750 * elfarm-nabi.c (elf32_arm_howto_table): Fix ABS16 masks.
2751
05793179
NC
27522002-04-09 Casper S. Hornstrup <chorns@users.sourceforge.net>
2753
2754 * coffcode.h (coff_read_word): New.
2755 (coff_compute_checksum): New.
2756 (coff_apply_checksum): New.
2757 (coff_write_object_contents): Call coff_apply_checksum () to
2758 apply checksum to PE image.
2759
46fe4e66
AM
27602002-04-08 Randolph Chung <tausq@debian.org>
2761
2762 * elf32-hppa.c (hppa_unwind_entry_compare): Move to elf-hppa.h.
2763 (elf32_hppa_final_link): Split out sorting logic to..
2764 * elf-hppa.h (elf_hppa_sort_unwind): ..here.
2765 (elf_hppa_final_link): Call elf_hppa_sort_unwind.
2766
3b5b409c
AC
27672002-04-07 Andrew Cagney <ac131313@redhat.com>
2768
2769 * configure.in: Add missing ``|'' to powerpc-*-aix4.[4-9]*
2770 pattern.
2771 * configure: Re-generate.
2772
ac7b6ceb
AC
27732002-04-07 Andrew Cagney <ac131313@redhat.com>
2774
2775 * configure.in: Only define AIX_CORE_DUMPX_CORE when AIX version
2776 is greater or equal to 4.3.3.
2777 * configure: Regenerate.
2778 Fix PR gdb/344.
2779
44aa49bb
HPN
27802002-04-05 Hans-Peter Nilsson <hp@axis.com>
2781
2782 * elf32-cris.c (cris_elf_howto_table) <R_CRIS_16_PCREL,
2783 R_CRIS_32_PCREL>: Fix typo in name.
2784 (cris_elf_check_relocs): Always create .rela.got here when
2785 R_CRIS_16_GOTPLT or R_CRIS_32_GOTPLT is seen.
2786 (elf_cris_adjust_gotplt_to_got): Don't create .rela.got here;
2787 assume it's created.
2788
e2d34d7d
DJ
27892002-04-04 Daniel Jacobowitz <drow@mvista.com>
2790
2791 * aout-adobe.c (aout_32_bfd_link_hash_table_free): Define.
2792 * aout-target.h (MY_bfd_link_hash_table_free): Conditionally
2793 define.
2794 * aout-tic30.c (MY_bfd_link_hash_table_free): Likewise.
2795 * bfd.c (bfd_link_hash_table_free): Define.
2796 * binary.c (binary_bfd_link_hash_table_free): Define.
2797 * bout.c (b_out_bfd_link_hash_table_free): Define.
2798 * coff-rs6000.c (rs6000coff_vec): Include
2799 _bfd_generic_link_hash_table_free.
2800 (pmac_xcoff_vec): Likewise.
2801 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
2802 (aix5coff64_vec): Likewise.
2803 * coffcode.h (coff_bfd_link_hash_table_free): Conditionally define.
2804 * elf-m10300.c (elf32_mn10300_link_hash_table_free): New function.
2805 (bfd_elf32_bfd_link_hash_table_free): Define.
2806 * elf32-hppa.c (elf32_hppa_link_hash_table_free): New function.
2807 (bfd_elf32_bfd_link_hash_table_free): Define.
2808 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Conditionally
2809 define.
2810 * i386msdos.c (msdos_bfd_link_hash_table_free): Define.
2811 * i386os9k.c (os9k_bfd_link_hash_table_free): Define.
2812 * ieee.c (ieee_bfd_link_hash_table_free): Define.
2813 * ihex.c (ihex_bfd_link_hash_table_free): Define.
2814 * libbfd-in.h (_bfd_nolink_bfd_link_hash_table_free): Define.
2815 (_bfd_generic_link_hash_table_free): Add prototype.
2816 * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Add prototype.
2817 * libecoff.h (_bfd_ecoff_bfd_link_hash_table_free): Define.
2818 * linker.c (_bfd_generic_link_hash_table_free): New function.
2819 * mmo.c (mmo_bfd_link_hash_table_free): Define.
2820 * nlm-target.h (nlm_bfd_link_hash_table_free): Define.
2821 * oasys.c (oasys_bfd_link_hash_table_free): Define.
2822 * ppcboot.c (ppcboot_bfd_link_hash_table_free): Define.
2823 * som.c (som_bfd_link_hash_table_free): Define.
2824 * srec.c (srec_bfd_link_hash_table_free): Define.
2825 * tekhex.c (tekhex_bfd_link_hash_table_free): Define.
2826 * versados.c (versados_bfd_link_hash_table_free): Define.
2827 * vms.c (vms_bfd_link_hash_table_free): New function.
2828 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_free): New function.
2829
2830 * coff-arm.c (coff_arm_link_hash_table_create): Use bfd_malloc
2831 instead of bfd_alloc.
2832 * coff-h8300.c (h8300_coff_link_hash_table_create): Likewise.
2833 * coff-mcore.c (coff_mcore_link_hash_table_create): Likewise.
2834 * coff-ppc.c (ppc_coff_link_hash_table_create): Likewise.
2835 * cofflink.c (_bfd_coff_link_hash_table_create): Likewise.
2836 * ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
2837 * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise.
2838 * elf.c (_bfd_elf_link_hash_table_create): Likewise.
2839 * elf32-arm.h (elf32_arm_link_hash_table_create): Likewise.
2840 * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
2841 * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise.
2842 * elf32-i386.c (elf_i386_link_hash_table_create): Likewise.
2843 * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
2844 * elf32-s390.c (elf_s390_link_hash_table_create): Likewise.
2845 * elf32-sh.c (sh_elf_link_hash_table_create): Likewise.
2846 * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create): Likewise.
2847 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
2848 * elf64-s390.c (elf_s390_link_hash_table_create): Likewise.
2849 * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise.
2850 * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create): Likewise.
2851 * elf64-x86-64.c (elf64_x86_64_link_hash_table_create): Likewise.
2852 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
2853 * linker.c (_bfd_generic_link_hash_table_create): Likewise.
2854 * m68klinux.c (linux_link_hash_table_create): Likewise.
2855 * sparclinux.c (linux_link_hash_table_create): Likewise.
2856 * sunos.c (sunos_link_hash_table_create): Likewise.
2857 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise.
2858
2859 * targets.c: Add _bfd_link_hash_table_free to xvec.
2860
2861 * bfd-in2.h: Regenerate.
2862 * libbfd.h: Regenerate.
2863 * libcoff.h: Regenerate.
2864
830629ab
AM
28652002-04-04 Alan Modra <amodra@bigpond.net.au>
2866
2867 * dep-in.sed: Cope with absolute paths.
2868 * Makefile.am (dep.sed): Subst TOPDIR, and not INCDIR.
2869 Run "make dep-am".
2870 * Makefile.in: Regenerate.
2871 * coff-arm.c: Fix copyright date.
2872 * cpu-h8300.c: Likewise.
2873 * cpu-i370.c: Likewise.
2874 * cpu-s390.c: Likewise.
2875 * cpu-mips.c: Likewise.
2876 * po/SRC-POTFILES.in: Regenerate.
2877
c6e90b02
TS
28782002-04-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2879
2880 * Makefile.am: Add elfxx-mips.c to the known backends.
2881 (elf32-mips.lo): remove dependency to coff/external.h.
2882 * Makefile.in: Regenerate.
2883 * configure.in: Add elfxx-mips.lo to all vectors using elf32-mips.lo
2884 Remove elf32-mips.lo from 64 bit vectors. Update dependencies
2885 accordingly.
2886 * configure: Regenerate.
2887 * elf-bfd.h: Move all MIPS ELF specific prototypes to elfxx-mips.h.
2888 (irix_compat_t): IRIX compatibility level, moved from elf32-mips.c.
2889 (elf_backend_mips_irix_compat, elf_backend_mips_rtype_to_howto): New
2890 MIPS specific backend functions.
2891 * elf32-mips.c: Moved most code to elfxx-mips.c.
2892 (mips_elf_hi16_reloc): Rename from _bfd_mips_elf_hi16_reloc and make
2893 static.
2894 (mips_elf_lo16_reloc): Likewise, was _bfd_mips_elf_lo16_reloc.
2895 (mips_elf_got16_reloc): Likewise, was _bfd_mips_elf_got16_reloc.
2896 (mips_elf_gprel32_reloc): Likewise, was _bfd_mips_elf_gprel32_reloc.
2897 (mips_elf32_rtype_to_howto): Rename from mips_rtype_to_howto. Changed
2898 interface to allow selection of the right REL or RELA howto table.
2899 (mips_elf32_object_p): Rename from _bfd_mips_elf_object_p and made
2900 static. Let it refuse n32 objects.
2901 (elf32_mips_grok_prstatus): Rename from _bfd_elf32_mips_grok_prstatus.
2902 (elf32_mips_grok_psinfo): Rename from _bfd_elf32_mips_grok_psinfo.
2903 (elf32_mips_discard_info): Rename from _bfd_elf32_mips_discard_info.
2904 (elf32_mips_ignore_discarded_relocs): Rename from
2905 _bfd_elf32_mips_ignore_discarded_relocs.
2906 (elf32_mips_write_section): Rename from _bfd_elf32_mips_write_section.
2907 (elf32_mips_irix_compat): New function, replaces IRIX_COMPAT.
2908 (elf_mips_howto_table_rela): Remove.
2909 * elf64-mips.c: Moved most code to elfxx-mips.c.
2910 (bfd_elf64_bfd_reloc_type_lookup): Make static.
2911 (mips_elf64_rtype_to_howto): New function.
2912 (mips_elf64_object_p): Likewise.
2913 (elf64_mips_irix_compat): Likewise.
2914 * elfxx-mips.c: New file containing common code merged together from
2915 elf32-mips.c and elf64-mips.c.
2916 * elfxx-mips.h: New file containing MIPS specific prototypes from
2917 elf-bfd.h.
2918 * elfxx-target.h: Add handling for elf_backend_mips_irix_compat and
2919 elf_backend_mips_rtype_to_howto.
2920
d8dce692
AM
29212002-04-04 Alan Modra <amodra@bigpond.net.au>
2922
2923 * srec.c (MAXCHUNK, Chunk): Revise comments.
2924 (srec_write_record): Correct buffer size.
2925 (srec_write_header): Do without intermediate buffer.
2926 (srec_write_section): Validate Chunk.
2927 (srec_write_terminator): Pass NULL instead of dummy buffer.
2928 (srec_write_symbols): Pass file and symbol names directly to
2929 bfd_bwrite so sprintf won't overflow buffer.
2930
b88a866a
JJ
29312002-04-03 Jakub Jelinek <jakub@redhat.com>
2932
2933 * elf32-sparc.c (elf32_sparc_relocate_section): Don't emit dynamic
2934 PC relative relocs against hidden symbols.
2935 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
2936
d7866f04
AM
29372002-04-03 Alan Modra <amodra@bigpond.net.au>
2938
2939 * elf.c (_bfd_elf_make_section_from_shdr): When setting section
2940 LMAs, loop over segments until p_vaddr and p_memsz specify an
2941 extent enclosing the section.
2942
9e81ee67
NC
29432002-04-02 Nick Clifton <nickc@cambridge.redhat.com>
2944
2945 * ihex.c (ihex_write_object_contents): Do not allow records to
2946 cross a 64K boundary - wrap if necessary.
2947
d2b64500
JT
29482002-04-01 Nathan Williams <nathanw@wasabisystems.com>
2949
2950 * elf.c (elfcore_netbsd_get_lwpid): Fix off-by-one error
2951 which caused the returned LWP ID to always be 0.
2952
e36f7d53
RH
29532002-04-01 Richard Henderson <rth@redhat.com>
2954
2955 * elf32-sparc.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
2956 (elf32_sparc_relocate_section): Use it to figure out when to
2957 initialize .got entries.
2958 * elf64-sparc.c: Similarly.
2959
e92d460e
AM
29602002-03-28 Alan Modra <amodra@bigpond.net.au>
2961
2962 * linker.c (link_action): Ignore duplicate warning syms.
2963 (_bfd_generic_link_write_global_symbol): Follow warning symbol link.
2964 * elflink.h (elf_adjust_dynstr_offsets): Likewise.
2965 (elf_adjust_dynamic_symbol): Likewise.
2966 (elf_export_symbol): Likewise.
2967 (elf_link_find_version_dependencies): Likewise.
2968 (elf_link_assign_sym_version): Likewise.
2969 (elf_link_sec_merge_syms): Likewise.
2970 (elf_link_output_extsym): Likewise.
2971 (elf_gc_sweep_symbol): Likewise.
2972 (elf_gc_propagate_vtable_entries_used): Likewise.
2973 (elf_gc_smash_unused_vtentry_relocs): Likewise.
2974 (elf_gc_allocate_got_offsets): Likewise.
2975 (elf_collect_hash_codes): Likewise.
2976 * elflink.c (elf_link_renumber_hash_table_dynsyms): Likewise.
2977 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
2978 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
2979 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
2980 * elf32-arm.h (elf32_arm_discard_copies): Likewise.
2981 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Likewise.
2982 (elf_cris_discard_excess_dso_dynamics): Likewise.
2983 * elf32-hppa.c (clobber_millicode_symbols): Likewise.
2984 (mark_PIC_calls): Likewise.
2985 (allocate_plt_static): Likewise.
2986 (allocate_dynrelocs): Likewise.
2987 (readonly_dynrelocs): Likewise.
2988 * elf32-i386.c (allocate_dynrelocs): Likewise.
2989 (readonly_dynrelocs): Likewise.
2990 * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
2991 * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
2992 * elf32-mips.c (mips_elf_output_extsym): Likewise.
2993 (mips_elf_sort_hash_table_f): Likewise.
2994 (mips_elf_check_mips16_stubs): Likewise.
2995 * elf32-s390.c (allocate_dynrelocs): Likewise.
2996 (readonly_dynrelocs): Likewise.
2997 * elf32-sh.c (sh_elf_discard_copies): Likewise.
2998 * elf32-xstormy16.c (xstormy16_relax_plt_check): Likewise.
2999 (xstormy16_relax_plt_realloc): Likewise.
3000 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
3001 (elf64_alpha_output_extsym): Likewise.
3002 * elf64-hppa.c (elf64_hppa_mark_exported_functions): Likewise.
3003 * elf64-mips.c (mips_elf64_sort_hash_table_f): Likewise.
3004 (mips_elf64_check_mips16_stubs): Likewise.
3005 (mips_elf64_output_extsym): Likewise.
3006 * elf64-ppc.c (func_desc_adjust): Likewise.
3007 (allocate_dynrelocs): Likewise.
3008 (readonly_dynrelocs): Likewise.
3009 * elf64-s390.c (allocate_dynrelocs): Likewise.
3010 (readonly_dynrelocs): Likewise.
3011 * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
3012 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
3013 (readonly_dynrelocs): Likewise.
3014 * elfxx-ia64.c (elfNN_ia64_global_dyn_sym_thunk): Likewise.
3015 * aoutx.h (aout_link_write_other_symbol): Likewise.
3016 * cofflink.c (_bfd_coff_write_task_globals): Likewise.
3017 (_bfd_coff_write_global_sym): Likewise.
3018 * i386linux.c (linux_tally_symbols): Likewise.
3019 * m68klinux.c (linux_tally_symbols): Likewise.
3020 * sparclinux.c (linux_tally_symbols): Likewise.
3021 * pdp11.c (aout_link_write_other_symbol): Likewise.
3022 * sunos.c (sunos_scan_dynamic_symbol): Likewise.
3023 * xcofflink.c (xcoff_build_ldsyms): Likewise.
3024 (xcoff_write_global_symbol): Likewise.
3025
3026 * cofflink.c (_bfd_coff_final_link): Formatting.
3027 * cpu-mips.c (mips_compatible): Make static, prototype.
3028 * elf32-i386.c (elf_i386_check_relocs): Formatting.
3029 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
3030 * elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
3031 * elf64-mips.c (mips_elf64_sort_hash_table): Likewise.
3032 (mips_elf64_final_link): Likewise.
3033 * elflink.h (elf_link_find_version_dependencies): Remove duplicate
3034 prototype.
3035
2106126f
NC
30362002-03-27 Nick Clifton <nickc@cambridge.redhat.com>
3037
3038 * coff-arm.c (SWAP_IN_RELOC_OFFSET): Define.
3039 (SWAP_OUT_RELOC_OFFSET): Define.
3040
b99d1833
AM
30412002-03-27 Gregory Steuck <greg@nest.cx>
3042
3043 * elf.c (_bfd_elf_get_symtab_upper_bound): Leave space for
3044 terminating NULL if empty symbol table.
3045 (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise.
3046
ad43ed4c
L
30472002-03-26 H.J. Lu (hjl@gnu.org)
3048
3049 * elflink.h (elf_link_input_bfd): Revert the last change since
3050 the gcc exception handling isn't fixed yet.
3051
3851fca4
L
30522002-03-26 H.J. Lu (hjl@gnu.org)
3053
3054 * elflink.h (elf_link_input_bfd): Complain about relocations
3055 against local symbols in discarded sections.
3056
b91afed7
AM
30572002-03-26 Alan Modra <amodra@bigpond.net.au>
3058
3059 * elflink.h (elf_gc_mark): Don't recurse into non-ELF sections.
3060
dba143ef
AM
30612002-03-23 Alan Modra <amodra@bigpond.net.au>
3062
3063 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
3064 section file offset for !SEC_LOAD sections.
3065
ee29b9fb
RE
30662002-03-21 Richard Earnshaw <rearnsha@arm.com>
3067
830629ab
AM
3068 * elf32-arm.h (elf32_arm_final_link_relocate <case R_ARM_GOTOFF>,
3069 <case R_ARM_GOT>): Handle relocations to Thumb functions.
ee29b9fb 3070
54327882
AM
30712002-03-21 Alan Modra <amodra@bigpond.net.au>
3072
3073 * coff64-rs6000.c (_bfd_xcoff64_put_symbol_name): Prototype.
3074 Whitespace changes.
3075 * archive.c: Update copyright date.
3076 * bfd-in2.h: Regenerate.
3077 * libbfd.h: Regenerate.
3078 * Makefile.am: Run "make dep-am"
3079 * Makefile.in: Regenerate.
3080 * po/SRC-POTFILES.in: Regenerate.
3081
1ee24f27
DJ
30822002-03-20 Daniel Jacobowitz <drow@mvista.com>
3083
3084 * dwarf2.c (struct funcinfo): Move up.
3085 (lookup_address_in_function_table): New argument function_ptr.
3086 Set it.
3087 (lookup_address_in_line_table): New argument function. If function
3088 is non-NULL, use it to handle ``addr'' before the first line note of
3089 the function.
3090 (comp_unit_find_nearest_line): Update and swap calls to
3091 lookup_address_in_function_table and lookup_address_in_line_table.
3092 * syms.c (_bfd_stab_section_find_nearest_line): Use the first
3093 N_SLINE encountered if we see an N_FUN before any N_SLINE.
3094
51b9608c
TR
30952002-03-20 Tom Rix <trix@redhat.com>
3096
ea1e4b0d 3097 * coff-rs6000.c (_bfd_xcoff_stat_arch_elt): Renamed from
51b9608c 3098 _bfd_xcoff_generic_stat_arch_elt. Fix format check.
ea1e4b0d 3099 * coff64-rs6000.c : Use _bfd_xcoff_stat_arch_elt.
51b9608c 3100
789c90aa
TR
31012002-03-19 Tom Rix <trix@redhat.com>
3102
ea1e4b0d 3103 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through all
789c90aa
TR
3104 dynamic objects in archives.
3105
1da54d81
HPN
31062002-03-19 Hans-Peter Nilsson <hp@bitrange.com>
3107
3108 * elflink.h (NAME(bfd_elf,record_link_assignment)): Don't set
3109 STT_NOTYPE symbols to STT_OBJECT.
3110
7831a775 31112002-03-18 Jan Hubicka <jh@suse.cz>
beb43bb9
JH
3112
3113 * cpu-i386.c (bfd_x86_64_arch): Rename to "i386:x86-64"
3114
eb1e0e80
NC
31152002-03-18 Tom Rix <trix@redhat.com>
3116
3117 * aix5ppc.core.c : New file for AIX 5 64 bit core support.
3118 * bfd-in.h : Add bfd_xcoff_ar_archive_set_magic declaration.
3119 * coff-rs6000 (do_pad) : New function for archive padding.
3120 (do_copy) : New function for object file copying in archives.
3121 (do_shared_object_padding) : New function for padding shared
3122 objects to their text section alignment in archives.
3123 (bfd_xcoff_ar_achive_set_magic) : Stub.
3124 (xcoff_write_armap_big) : Use do_copy and do_pad.
3125 (xcoff_write_archive_contents_big) : Use do_shared_object_padding,
3126 do_copy and do_pad.
3127 * coff64-rs6000.c (xcoff64_write_ojbect_contents) : Use
ea1e4b0d 3128 bfd_xcoff_magic_number.
eb1e0e80
NC
3129 (xcoff64_bad_format_hook) : New function for _bfd_bad_format_hook
3130 fop.
3131 (xcoff_backend_data_r) : Use xcoff64_bad_format_hook.
3132 (bfd_xcoff_aix5_backend_data) : New Aix 5 backend data.
3133 (aix5coff64_vec) : New Aix 5 target aix5coff64-rs6000.
3134 * rs6000-core.c : Update copyright date.
ea1e4b0d 3135 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Check for NULL
eb1e0e80
NC
3136 csectpp.
3137 * coffcode.h (coff_new_section_hook) : Use new accessor macros.
3138 (coff_set_arch_mach_hook) : Add Aix 5 U64_TOCMAGIC magic #.
3139 (coff_set_flags) : Use bfd_xcoff_magic_number.
3140 * libxcoff.h (bfd_xcoff_is_xcoff64): Add U64_TOCMAGIC.
3141 * configure.in : Add powerpc-*-aix5 and rs6000-*-aix5 support.
3142 * Makefile.am : Same.
3143 * config.bfd : Same.
3144 * targets.c : Same.
3145 * configure : Regnerate.
3146 * Makefile.in : Same.
3147 * bfd-in2.h : Same.
3148
a1c259a1
NC
31492002-03-18 Nick Clifton <nickc@cambridge.redhat.com>
3150
3151 * po/fr.po: Updated version.
3152
4dae1ae7
AM
31532002-03-18 Alan Modra <amodra@bigpond.net.au>
3154
3155 * libbfd.c (bfd_write_bigendian_4byte_int): Return true iff success.
3156 * libbfd.h: Regenerate.
3157 * archive.c (coff_write_armap): Pass on failures from
3158 bfd_write_bigendian_4byte_int.
3159
36b4f6e7
L
31602002-03-14 H.J. Lu <hjl@gnu.org>
3161
3162 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the BFD
3163 error to bfd_error_nonrepresentable_section for reinit_array
3164 section in DSO.
3165
a1aefc76
NC
31662002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
3167
a181be0a
NC
3168 * coffcode.h (coff_slurp_symbol_table): When adding BSF_WEAK flag,
3169 OR it in rather than replacing previously selected flags.
3170
a1aefc76
NC
3171 * elfxx-target.h (TARGET_BIG_SYM): Set ar_max_namelen to 15.
3172 (TARGET_LITTLE_SYM): Set ar_max_namelen to 15.
3173
c119f9b8
AM
31742002-03-14 Alan Modra <amodra@bigpond.net.au>
3175
3176 * cpu-mips.c (mips_compatible): New. Don't check bits_per_word.
3177 (N): Use the above.
3178 * elflink.h (elf_bfd_final_link): Revert last change. Instead,
3179 ensure reloc size matches before calling elf_link_input_bfd.
3180 Add an assert to check reloc size when counting output relocs.
3181
c295a511
NC
31822002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
3183
3184 * mmo.c (mmo_get_loc): Return NULL rather than false.
3185
9ce88e60
NC
31862002-03-13 Nick Clifton <nickc@cambridge.redhat.com>
3187
3188 * po/fr.po: Updated version.
3189
4ddafab0
AM
31902002-03-13 Alan Modra <amodra@bigpond.net.au>
3191
b74fa2cd
AM
3192 * archures.c (bfd_default_compatible): Test bits_per_word.
3193 * cpu-i386.c (i386_compatible): Remove. Replace occurrences with
3194 bfd_default_compatible.
3195 * cpu-i370.c (i370_compatible): Likewise.
3196 * cpu-sparc.c (sparc_compatible): Likewise.
3197 * cpu-h8300.c (compatible): Test in->arch == out->arch.
3198
40b829d4
AM
3199 * elflink.h: Formatting fixes.
3200 (elf_link_output_extsym): Merge undefined and undef weak cases.
3201
4ddafab0
AM
3202 * elflink.h (elf_bfd_final_link): Only call elf_link_input_bfd
3203 when word size of input matches output word size.
3204
dd53c801
AJ
32052002-03-12 Andreas Jaeger <aj@suse.de>
3206
3207 * cpu-i386.c (i386_compatible): New. Use it instead of
3208 bfd_default_compatible.
3209
aa066ac8
L
32102002-03-07 H.J. Lu (hjl@gnu.org)
3211
3212 * coff-sh.c (shcoff_reloc_map): Use bfd_reloc_code_real_type
3213 as the type for bfd_reloc_val.
3214
1bf42538
JL
32152002-03-05 John David Anglin <dave@hiauly1.hia.nrc.ca>
3216
3217 * elf-hppa.h (elf_hppa_is_dynamic_loader_symbol): New function.
3218 (elf_hppa_relocate_section): Ignore undefined dynamic loader symbols.
3219 (elf_hppa_final_link_relocate): Correct relocations for indirect
3220 references to local data through the DLT. Fix .opd creation for
3221 local symbols using R_PARISC_LTOFF_FPTR32 and R_PARISC_FPTR64
3222 relocations. Use e_lsel selector for R_PARISC_DLTIND21L,
3223 R_PARISC_LTOFF_FPTR21L and R_PARISC_LTOFF_TP21L as per
3224 "Processor-Specific ELF for PA_RISC, Version 1.43" document.
3225 Similarly, use e_rsel for DLT and LTOFF 'R' relocations.
3226 * elf32-hppa.c (final_link_relocate): Revise relocation selectors
3227 as per "Processor-Specific ELF for PA_RISC, Version 1.43" document.
3228
86eaf01e
JJ
32292002-03-05 Jakub Jelinek <jakub@redhat.com>
3230
3231 * merge.c (_bfd_merge_sections): Don't segfault if there
3232 is nothing to merge due to GC.
3233
c44233aa
AM
32342002-03-05 Alan Modra <amodra@bigpond.net.au>
3235
039cc25f
AM
3236 * elf32-hppa.c (clobber_millicode_symbols): Remove hack to keep
3237 symbols that have been forced local.
3238
c44233aa
AM
3239 * elflink.h (elf_bfd_final_link): Call elf_link_output_extsym
3240 to output forced local syms for non-shared link.
3241 (elf_link_output_extsym): Tweak condition for calling backend
3242 adjust_dynamic_symbol so that previous behaviour is kept.
3243 Whitespace changes throughout file.
3244
25e27870
L
32452002-03-04 H.J. Lu <hjl@gnu.org>
3246
3247 * elf.c (bfd_section_from_shdr): Handle special sections,
3248 .init_array, .fini_array and .preinit_array.
3249 (elf_fake_sections): Likewise.
3250
3251 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Create the
3252 DT entry only if the section is in output for .init_array,
3253 .fini_array and .preinit_array. Complain about .preinit_array
3254 section in DSO.
3255 (elf_bfd_final_link): Warn zero size for .init_array,
3256 .fini_array and .preinit_array sections.
3257
3258 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Remove
3259 SHT_INIT_ARRAY, SHT_FINI_ARRAY and SHT_PREINIT_ARRAY.
3260 (elfNN_ia64_fake_sections): Remove .init_array, .fini_array and
3261 .preinit_array.
3262
bb2a49f2
AM
32632002-03-04 Alan Modra <amodra@bigpond.net.au>
3264
3265 * configure.in (WIN32LIBADD): Don't eval PICFLAG assignment.
3266 * configure: Regenerate.
3267
38487e5e
TR
32682002-03-02 Tom Rix <trix@redhat.com>
3269
c44233aa
AM
3270 * coff64-rs6000.c (xcoff64_howto_table): Replace howto types with
3271 symbolic equiv.
38487e5e
TR
3272 * coff-rs6000.c (xcoff_howto_table): Same.
3273
30831527
RH
32742002-03-01 David Mosberger <davidm@hpl.hp.com>
3275
3276 * elflink.h (size_dynamic_sections): If section named
3277 ".preinit_array" exists, create DT_PREINIT_ARRAY and
3278 DT_PREINIT_ARRAYSZ entries in dynamic table. Analogously for
3279 ".init_array" and ".fini_array".
3280 (elf_bfd_final_link): Handle DT_PREINIT_ARRAYSZ, DT_INIT_ARRAYSZ,
3281 DT_FINI_ARRAYSZ, DT_PREINIT_ARRAY, DT_INIT_ARRAY, and
3282 DT_FINI_ARRAY.
3283
c8e5ddc8
AM
32842002-02-26 Andrew Macleod <amacleod@cygnus.com>
3285
3286 * elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local
3287 dynsyms.
3288
96e0dda4
AM
32892002-02-25 Alan Modra <amodra@bigpond.net.au>
3290
1c5b6bf8
AM
3291 * elf64-hppa.h: Update copyright date.
3292
96e0dda4
AM
3293 * elf64-ppc.c (ppc64_elf_check_relocs): Warning fix.
3294 (ppc64_elf_relocate_section): Don't generate power4 style branch
3295 hints for *_BRTAKEN and *_BRNTAKEN relocs.
3296
0fb19cbc
JJ
32972002-02-22 Jakub Jelinek <jakub@redhat.com>
3298
3299 * elf64-sh64.c (sh_elf64_relocate_section): Fix a typo from my
3300 last patch.
3301 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
3302
c434dee6
AJ
33032002-02-21 Andreas Jaeger <aj@suse.de>
3304
3305 * elf64-x86-64.c: Major rework that introduces all recent changes
3306 to the x86-64 backend. Get a closer match to elf32-i386.
3307 (struct elf64_x86_64_dyn_relocs): Rename from
3308 elf64_x86_64_pcrel_relocs_copied, add additional fields. Change
3309 all users.
3310 (struct elf64_x86_64_link_hash_table): Add short cuts to some
3311 sections.
3312 (link_hash_newfunc): Rename from elf64_x86_64_link_hash_newfunc,
3313 remove casts, initialize new hash members.
3314 (create_got_section): New.
3315 (elf64_x86_64_create_dynamic_sections): New.
3316 (elf64_x86_64_copy_indirect_symbol): New.
3317 (elf64_x86_64_check_relocs): Don't allocate space for dynamic
3318 relocs, .got or .relgot here but do it in allocate_dynrelocs.
3319 Reference count possible .plt and .got entries. Don't test input
3320 section SEC_READONLY here to try to avoid copy relocs, and keep
3321 dyn_relocs regardless of ELF_LINK_NON_GOT_REF. Don't set
3322 DF_TEXTREL here. Delay setting of variables until needed. Cache
3323 pointer to "sreloc" section in elf_section_data. Tweak condition
3324 under which .got created. Report files with bad relocation
3325 section names.
3326 (elf64_x86_64_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
3327 Reference count possible .plt entries. Don't deallocate .got and
3328 .relgot space here.
3329 (elf64_x86_64_adjust_dynamic_symbol): Handle nocopyreloc. Don't
3330 do copy reloc processing for weakdefs. Remove redundant casts and
3331 aborts. Delay setting of vars until needed. Move creation of
3332 dynamic symbols and allocation of .plt and .rela.plt to
3333 allocate_dynrelocs. Replace BFD_ASSERT with abort.
3334 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
3335 (allocate_dynrelocs): New.
3336 (readonly_dynrelocs): New.
3337 (elf64_x86_64_size_dynamic_sections): Call readonly_dynrelocs.
3338 Allocate space for dyn relocs. Replace BFD_ASSERT with abort.
3339 Zero out the dynamic allocated content space.
3340 (elf64_x86_64_discard_copies): Removed.
3341 (elf64_x86_64_relocate_section): Make use of dynamic section
3342 short-cuts. Localise vars, and delay setting. Better error
3343 reporting, replace BFD_ASSERT with abort. Check
3344 ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined in the
3345 regular object file and tread the weak definition as the normal
3346 one. Don't discard relocs for undefweak or undefined symbols and
3347 check !DEF_REGULAR as well as DEF_DYNAMIC in test for avoided copy
3348 relocs.
3349 (elf64_x86_64_finish_dynamic_symbol): Don't copy relocs for
3350 symbols that have been forced local. Use same test to decide if
3351 we can use a relative reloc for got as relocate_section. Expand
3352 SHN_UNDEF comment. Move expressions out of function calls.
3353 Replace BFD_ASSERT with abort.
3354 (bfd_elf64_bfd_final_link): Removed.
3355 (elf_backend_copy_indirect_symbol): Define.
3356
ff3a6ee3
TR
33572002-02-20 Tom Rix <trix@redhat.com>
3358
3359 * coff-rs6000.c (xcoff_howto_table): Add 16 bit R_BA.
3360 (_bfd_xcoff_reloc_type_lookup): Use it.
3361 * coff64-rs6000.c (xcoff64_howto_table): Same.
3362 (xcoff64_reloc_type_lookup): Same.
c434dee6 3363
a68d41fb
AM
33642002-02-20 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
3365
3366 * osf-core.c (osf_core_vec): OSF/1 (Digital Unix) core files are
3367 little endian.
3368
befc3abb
MS
33692002-02-19 Martin Schwidefsky <schwidefsky@de.ibm.com>
3370
3371 * archures.c (bfd_mach_s390_esa): Rename to bfd_mach_s390_31.
3372 (bfd_mach_s390_esame): Rename to bfd_mach_s390_64.
3373 * bfd-in2.h: Regenerate.
3374 * cpu-s390.c (arch_info_struct): Use renamed architecture defines.
3375 Replace architecture name "s390" with "s390:31-bit" and "s390:esame"
3376 with "s390:64-bit".
3377 * elf32-s390.c (elf_howto_table): Add 32 bit pc relative relocations.
3378 (elf_s390_reloc_type_lookup): Likewise.
3379 (elf_s390_check_relocs): Likewise.
3380 (elf_s390_gc_sweep_hook): Likewise.
3381 (elf_s390_relocate_section): Likewise.
3382 (elf_s390_object_p): Use renamed architecture define.
3383 * elf64-s390.c (elf_s390_object_p): Use renamed architecture define.
3384
6eeeec9b
FCE
33852002-02-19 Frank Ch. Eigler <fche@redhat.com>
3386
3387 * syms.c (stt[]): Sorted. Added .init/.fini -> "t" mapping.
3388
0bb2d96a
JJ
33892002-02-19 Jakub Jelinek <jakub@redhat.com>
3390
3391 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Enable
3392 absptr -> pcrel optimization for shared libs.
3393 Only create minimal .eh_frame_hdr if absptr FDE encoding in shared
3394 library cannot be converted to pcrel.
3395 (_bfd_elf_eh_frame_section_offset): Return -2 if making absptr
3396 relative.
3397 * elf32-i386.c (elf_i386_relocate_section): If
3398 _bfd_elf_section_offset returned -2, skip, but make sure the
3399 relocation is installed.
3400 * elf32-arm.h (elf32_arm_final_link_relocate): Likewise.
3401 * elf32-cris.c (cris_elf_relocate_section): Likewise.
3402 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
3403 * elf32-i370.c (i370_elf_relocate_section): Likewise.
3404 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
3405 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
3406 * elf32-s390.c (elf_s390_relocate_section): Likewise.
3407 * elf32-sh.c (sh_elf_relocate_section): Likewise.
3408 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
3409 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
3410 * elf64-s390.c (elf_s390_relocate_section): Likewise.
3411 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
3412 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
3413 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
3414 * elf64-alpha.c (elf64_alpha_relocate_section): Handle
3415 _bfd_elf_section_offset returning -2 the same way as -1.
3416 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
3417 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add FIXME
3418 and BFD_ASSERT.
3419 * elf64-mips.c (mips_elf64_create_dynamic_relocation): Likewise.
3420
69f284c7
TR
34212002-02-18 Tom Rix <trix@redhat.com>
3422
3423 * xcofflink.c (bfd_xcoff_link_gernate_rtinit): Add -brtl support.
3424 (bfd_xcoff_size_dynamic_sections): Same.
3425 * bfd-in.h (bfd_xcoff_link_generate_rtinit): Same.
3426 (bfd_xcoff_size_dynamic_sections): Same.
3427 * coff-rs6000.c (xcoff_generate_rtinit): Same.
3428 * coff-rs646000.c (xcoff64_generate_rtinit): Same.
3429 * libxcoff.h (struct xcoff_backend_data_rec): Same.
3430 * xcofflink.c (xcoff_build_ldsyms, xcoff_link_add_symbols): Clean.
3431 * bfd-in2.h: Regenerate.
3432
82bd7b59
AM
34332002-02-18 Alan Modra <amodra@bigpond.net.au>
3434
3435 * elf64-ppc.c (STFD_FR0_0R1, LFD_FR0_0R1, BLR): Define.
3436 (struct ppc_link_hash_table): Add sfpr.
3437 (ppc64_elf_link_hash_table_create): Init it.
3438 (ppc64_elf_create_dynamic_sections): Split creation of .stub and
3439 .glink out to..
3440 (create_linkage_sections): ..here. Make .sfpr too.
3441 (ppc64_elf_check_relocs): Call create_linkage_sections, and set
3442 dynobj early.
3443 (MIN_SAVE_FPR, MAX_SAVE_FPR): Define.
3444 (ppc64_elf_func_desc_adjust): Look for missing ._savef* and
3445 ._restf* functions, and create as needed.
3446 (func_desc_adjust): Only force_local for shared libs.
3447
ef1355e8
NC
34482002-02-18 David O'Brien <obrien@FreeBSD.org>
3449
3450 * configure.in: Bump version number post 2.12 branching.
3451 * configure: Regenerate.
3452
dfa36a69
HPN
34532002-02-17 Hans-Peter Nilsson <hp@bitrange.com>
3454
3455 * mmo.c: Correct and improve comments.
3456 (mmo_write_chunk): Store trailing byte in bfd buffer; don't
3457 zero-pad. Use input to fill up non-empty bfd buffer.
3458 (mmo_flush_chunk): New function.
3459 (mmo_write_loc_chunk): Add parameter last_vmap, all callers
3460 changed. Don't emit location specifier if VMA is same as
3461 *LAST_VMAP after omitting leading zero contents. Call
3462 mmo_flush_chunk before emitting location specifier.
3463 (mmo_write_loc_chunk_list): Call mmo_flush_chunk when finished
3464 with mmo_write_loc_chunk calls.
3465 (mmo_internal_write_section): Call mmo_flush_chunk after
3466 mmo_write_chunk.
3467 (mmo_write_symbols_and_terminator): Move :Main to first position
3468 in symbol array. Add faked one if it does not exist if there are
3469 other symbols. Don't add it if there are no symbols at all. Move
3470 out test for value of :Main from symbol loop. Rename table
3471 fakemain to maintable and variable mainsym to fakemain.
3472
ccf00ab6
RH
34732002-02-15 Richard Henderson <rth@redhat.com>
3474
3475 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: A target
3476 section with no got matches any got. Simplify error generaion.
3477
88eaccc2
AM
34782002-02-15 Alan Modra <amodra@bigpond.net.au>
3479
fd96f80f
AM
3480 Support arbitrary length fill patterns.
3481 * linker.c (bfd_new_link_order): Zero all fields with bfd_zalloc.
3482 (_bfd_default_link_order): Remove bfd_fill_link_order code.
3483 Call default_data_link_order.
3484 (default_fill_link_order): Delete.
3485 (default_data_link_order): New function.
3486 * elf32-mips.c (_bfd_mips_elf_final_link): Replace occurrences
3487 of bfd_fill_link_order with bfd_data_link_order.
3488 * elf64-alpha.c (elf64_alpha_final_link): Likewise.
3489 * elf64-mips.c (mips_elf64_final_link): Likewise.
3490
88eaccc2
AM
3491 * bfd.c (bfd_scan_vma): Clamp overflows to max bfd_vma value.
3492 Correct value returned in "end" for "0x<non-hex>".
3493
e2fd756b
NC
34942002-02-14 Nick Clifton <nickc@cambridge.redhat.com>
3495
3496 * cpu-arm.c (processors): Replace 'arch' field with 'mach'.
3497 (scan): Test against 'mach' field in info structure.
3498
edd29cf9
AM
34992002-02-14 Alan Modra <amodra@bigpond.net.au>
3500
3501 * elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD.
3502
1e30956e 35032002-02-14 Matt Fredette <fredette@netbsd.org>
76f57f3a
JT
3504
3505 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize
3506 EF_M68000.
3507
bf36db18
NC
35082002-02-13 Nick Clifton <nickc@cambridge.redhat.com>
3509
3510 * elf.c (_bfd_elf_make_section_from_shdr): Do not insist on
edd29cf9
AM
3511 non-zero physical addresses when adjusting the LMAs of new
3512 sections.
bf36db18 3513
189c6563
AM
35142002-02-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
3515
3516 * elf-hppa.h (elf_hppa_reloc_final_type): New function stripped
3517 from _bfd_elf_hppa_gen_reloc_type.
3518 (_bfd_elf_hppa_gen_reloc_type): Remove duplicate prototype.
3519 * elf32-hppa.h (elf32_hppa_reloc_final_type): Add protptype.
3520 * elf32-hppa.c: Include elf32-hppa.h before elf-hppa.h.
3521 * elf64-hppa.h (elf64_hppa_reloc_final_type): Add protptype.
3522
e948afaf
AO
35232002-02-12 Alexandre Oliva <aoliva@redhat.com>
3524
3525 * elf-m10300.c (mn10300_elf_relax_section): Skip section before
3526 loading its contents if there's nothing to do in it.
3527
19397422
AM
35282002-02-12 Alan Modra <amodra@bigpond.net.au>
3529
0ad3a73b
AM
3530 * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for crossing
3531 64k boundary.
3532
19397422
AM
3533 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Add dynamic
3534 DT_PPC64_OPD and DT_PPC64_OPDSZ tags.
3535 (ppc64_elf_finish_dynamic_sections): Set values for them.
3536
51316059
MS
35372002-02-11 Michael Snyder <msnyder@redhat.com>
3538
3539 * elf-bfd.h (elfcore_write_lwpstatus): Add prototype.
3540 * elf.c (elfcore_grok_pstatus): Add prototype.
3541 (elfcore_grok_lwpstatus): Add prototype.
3542 (elfcore_write_lwpstatus): New function.
3543 (elfcore_write_pstatus): Fix typo, eliminate unnecessary memcpy.
3544
518313c3
AO
35452002-02-11 Alexandre Oliva <aoliva@redhat.com>
3546
3547 * elf32-sh.c: Added missing prototypes.
3548 * elf32-sh64.c: Likewise.
3549 (sh_elf_align_loads): Mark unused args as such.
3550 * elf64-sh64.c: Added missing prototypes.
3551 (struct elf_sh64_link_hash_entry): Fix typo.
3552 (sh_elf64_relocate_section): Fix info argument passed to
3553 _bfd_elf_section_offset.
3554
2c73f9d8
AM
35552002-02-11 Alan Modra <amodra@bigpond.net.au>
3556
3557 * Makefile.am: "make dep-am".
3558 * Makefile.in: Regenerate.
3559 * aclocal.m4: Regenerate.
3560 * config.in: Regenerate.
3561 * configure: Regenerate.
3562
d426c6b0
DJ
35632002-02-10 Daniel Jacobowitz <drow@mvista.com>
3564
3565 * coff-rs6000.c (xcoff_generate_rtinit): Silence uninitialized
3566 variable warnings.
3567 * elf32-sh.c (sh_elf_relax_section): Silence signed/unsigned
3568 comparison warning.
3569 * trad-core.c (trad_unix_core_file_p): Silence pointer/integer
3570 cast warnings for the common case.
3571
e58ee0cd
HPN
35722002-02-10 Hans-Peter Nilsson <hp@bitrange.com>
3573
3574 * config.bfd (sh-*-linux*, sh-*-elf* | sh-*-rtemself*): Add sh64
3575 vectors.
3576 (sh-*-netbsdelf*): New, to trump sh*-*-netbsdelf* and add sh64
3577 vectors.
3578
7793f4d0
RH
35792002-02-09 Richard Henderson <rth@redhat.com>
3580
3581 * elf64-alpha.c (elf64_alpha_howto): Add R_ALPHA_BRSGP.
3582 (elf64_alpha_reloc_map, elf64_alpha_check_relocs): Likewise.
3583 (elf64_alpha_relocate_section): Likewise.
3584 * reloc.c (BFD_RELOC_ALPHA_BRSGP): New.
3585 * bfd-in2.h, libbfd.h: Rebuild.
3586
7e799044
HPN
35872002-02-09 Hans-Peter Nilsson <hp@bitrange.com>
3588
3589 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs): Check
3590 that base-plus-offset reloc accounting is consistent.
3591 (mmix_elf_relax_section): Keep base-plus-offset reloc accounting
3592 up to date for undefined symbols.
3593
027d73eb
EC
35942002-02-08 Eric Christopher <echristo@redhat.com>
3595
3596 From Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
3597
3598 * elf32-mips.c (_bfd_mips_elf_fake_sections): Don't create .rela
3599 sections for the O32 ABI.
3600
517662d4
CD
36012002-02-08 Chris Demetriou <cgd@broadcom.com>
3602
3603 * elf32-arm.h: Fix formatting of _("...").
3604 * elf32-d10v.c: Likewise.
3605 * elf32-m68k.c: Likewise.
3606 * elf32-mips.c: Likewise.
3607
5e37cc46
NC
36082002-02-08 Ivan Guzvinec <ivang@opencores.org>
3609
3610 * coff-or32.c: Fix compile time warning messages.
3611
fbca6ad9
AO
36122002-02-08 Alexandre Oliva <aoliva@redhat.com>
3613
3614 Contribute sh64-elf.
3615 2002-01-23 Alexandre Oliva <aoliva@redhat.com>
3616 * reloc.c (R_SH_GOTPLT32, R_SH_GOT_LOW16, R_SH_GOT_MEDLOW16,
3617 R_SH_GOT_MEDHI16, R_SH_GOT_HI16, R_SH_GOTPLT_LOW16,
3618 R_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_HI16,
3619 R_SH_PLT_LOW16, R_SH_PLT_MEDLOW16, R_SH_PLT_MEDHI16,
3620 R_SH_PLT_HI16, R_SH_GOTOFF_LOW16, R_SH_GOTOFF_MEDLOW16,
3621 R_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_HI16, R_SH_GOTPC_LOW16,
3622 R_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDHI16, R_SH_GOTPC_HI16,
3623 R_SH_GOT10BY4, R_SH_GOTPLT10BY4, R_SH_GOT10BY8, R_SH_GOTPLT10BY8,
3624 R_SH_COPY64, R_SH_GLOB_DAT64, R_SH_JMP_SLOT64, R_SH_RELATIVE64):
3625 New relocs.
3626 * libbfd.h, bfd-in2.h: Rebuilt.
3627 * elf32-sh.c (sh_elf_howto_table): Define new relocs.
3628 (sh_reloc_map): Map them.
3629 (PLT_ENTRY_SIZE, elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
3630 elf_sh_plt_entry_be, elf_sh_plt_entry_le, elf_sh_pic_plt_entry_be,
3631 elf_sh_pic_plt_entry_le, elf_sh_plt0_entry, elf_sh_plt_entry,
3632 elf_sh_pic_plt_entry, elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
3633 elf_sh_plt0_gotplt_offset, elf_sh_plt_temp_offset,
3634 elf_sh_plt_symbol_offset, elf_sh_plt_reloc_offset,
3635 movi_shori_putval) [INCLUDE_SHMEDIA]: New.
3636 (elf_sh_link_hash_entry) [INCLUDE_SHMEDIA]: Add
3637 datalabel_got_offset.
3638 (sh_elf_link_hash_newfunc): Initialize it.
3639 (sh_elf_relocate_section): Augment the scope of
3640 seen_stt_datalabel. Introduce GOTPLT support. Extend GOTPC, PLT,
3641 GOT and GOTOFF handling to new SHmedia relocation types. Support
3642 GOT_BIAS.
3643 (sh_elf_check_relocs): Likewise.
3644 (sh_elf_finish_dynamic_symbol) [TARGET_SHMEDIA]: Set up values in
3645 PLT entries using movi_shori_putval. Support GOT_BIAS.
3646 (sh_elf_finish_dynamic_sections): Likewise.
3647 * elf32-sh64.c (shmedia_prepare_reloc): Do not add addend to
3648 relocation, it's now done by the caller.
3649 (GOT_BIAS): New.
3650 * elf64-sh64.c (GOT_BIAS, PLT_ENTRY_SIZE, elf_sh64_sizeof_plt,
3651 elf_sh64_plt_plt0_offset, elf_sh64_plt0_gotplt_offset,
3652 elf_sh64_plt_temp_offset, elf_sh64_plt_symbol_offset,
3653 elf_sh64_plt_reloc_offset, ELF_DYNAMIC_INTERPRETER,
3654 elf_sh64_pcrel_relocs_copied, elf_sh64_link_hash_entry,
3655 elf_sh64_link_hash_table, sh64_elf64_link_hash_traverse,
3656 sh64_elf64_hash_table): New.
3657 (sh_elf64_howto_table): Introduce new relocs.
3658 (sh_elf64_info_to_howto): Accept new PIC relocs.
3659 (sh_elf64_relocate_section): Augment the scope of
3660 seen_stt_datalabel. Support new PIC relocs.
3661 (sh_elf64_check_relocs): Support new PIC relocs.
3662 (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le,
3663 elf_sh64_plt_entry_be, elf_sh64_plt_entry_le,
3664 elf_sh64_pic_plt_entry_be, elf_sh64_pic_plt_entry_le,
3665 elf_sh64_plt0_entry, elf_sh64_plt_entry, elf_sh64_pic_plt_entry,
3666 sh64_elf64_link_hash_newfunc, sh64_elf64_link_hash_table_create,
3667 movi_shori_putval, movi_3shori_putval,
3668 sh64_elf64_create_dynamic_sections,
3669 sh64_elf64_adjust_dynamic_symbol, sh64_elf64_discard_copies,
3670 sh64_elf64_size_dynamic_sections,
3671 sh64_elf64_finish_dynamic_symbol,
3672 sh64_elf64_finish_dynamic_sections): New.
3673 (elf_backend_create_dynamic-sections,
3674 bfd_elf64_bfd_link_hash_table_create,
3675 elf_backend_adjust_dynamic_symbol,
3676 elf_backend_size_dynamic_sections,
3677 elf_backend_finish_dynamic_symbol,
3678 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
3679 elf_backend_plt_readonly, elf_backend_want_plt_sym,
3680 elf_backend_got_header_size, elf_backend_plt_header_size):
3681 Define.
3682 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
3683 * elf32-sh.c: Renumbered and renamed some SH5 relocations to
3684 match official numbers and names; moved unmaching ones to the
3685 range 0xf2-0xff.
3686 * elf32-sh64.c, elf64-sh64.c: Likewise.
3687 2001-03-12 DJ Delorie <dj@redhat.com>
3688 * elf32-sh.c (sh_elf_relax_section): Don't relax SHmedia
3689 sections.
3690 2001-03-12 DJ Delorie <dj@redhat.com>
3691 * elf32-sh64.c (shmedia_prepare_reloc): Validate relocs that must
3692 be aligned.
3693 * elf64-sh64.c (sh_elf64_relocate_section): Ditto.
3694 2001-01-14 Hans-Peter Nilsson <hpn@cygnus.com>
3695 * elf32-sh64.c (bfd_elf32_bfd_copy_private_section_data): Define.
3696 (sh64_elf_fake_sections): Set type to SHT_SH5_CR_SORTED for a
3697 .cranges section with SEC_SORT_ENTRIES set.
3698 (sh64_backend_section_from_shdr): Set SEC_SORT_ENTRIES on an
3699 incoming sorted .cranges section.
3700 (sh64_bfd_elf_copy_private_section_data): New.
3701 (sh64_elf_final_write_processing): Only sort .cranges and modify
3702 start address if called by linker.
3703 2001-01-08 Ben Elliston <bje@redhat.com>
3704 * elf32-sh64.c (sh64_elf_final_write_processing): Activate
3705 Hans-Peter Nilsson's set bit 0 patch from 2001-01-06.
3706 * elf64-sh64.c (sh64_elf64_final_write_processing): Ditto.
3707 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
3708 * elf64-sh64.c (sh_elf64_howto_table): No open brace at start of
3709 line. Add comments before all entries.
3710 <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct and clarify describing
3711 comment.
3712 (sh_elf64_reloc): Correct head comment.
3713 (sh_elf64_relocate_section): Correct spacing.
3714 <relocating for a local symbol>: Do not honour STO_SH5_ISA32;
3715 instead call reloc_dangerous callback.
3716 <case R_SH_SHMEDIA_CODE>: New case.
3717 (sh_elf64_gc_mark_hook): Correct spacing.
3718 (sh_elf64_check_relocs): Ditto.
3719 * elf32-sh64.c (shmedia_prepare_reloc) <case R_SH_SHMEDIA_CODE>:
3720 New case.
3721 * elf32-sh.c: Correct #endif comments for #ifndef-wrapped
3722 functions.
3723 (sh_elf_howto_table) <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct,
3724 clarify describing comment. Add comments before all entries.
3725 (sh_elf_relocate_section) <relocating for a local symbol>: Do not
3726 honour STO_SH5_ISA32; instead call reloc_dangerous callback.
3727 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
3728 Sort .cranges section in final link. Prepare to set bit 0 on
3729 entry address.
3730 * elf32-sh64.c (struct sh64_find_section_vma_data): New.
3731 (sh64_elf_link_output_symbol_hook): Fix typo in prototype.
3732 (sh64_elf_set_mach_from_flags): Set SEC_DEBUGGING on incoming
3733 .cranges section.
3734 (sh64_backend_section_from_shdr): New, to recognize
3735 SHT_SH5_CR_SORTED on incoming .cranges section.
3736 (elf_backend_section_from_shdr): Define.
3737 (sh64_elf_final_write_processing): Sort outgoing .cranges
3738 section. (New, temporarily disabled:) Set bit 0 on entry address
3739 according to ISA type.
3740 (sh64_find_section_for_address): New.
3741 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb,
3742 crange_bsearch_cmpl): Move here from opcodes/sh64-dis.c.
3743 (sh64_address_in_cranges): Move here from opcodes/sh64-dis.c. Use
3744 bfd_malloc, not xmalloc.
3745 (sh64_get_contents_type): Move here from opcodes/sh64-dis.c. Make
3746 global.
3747 * elf32-sh64.c (sh64_elf64_final_write_processing): New, (but
3748 temporarily disabled) setting bit 0 on entry address.
3749 (elf_backend_final_write_processing): Define.
3750 2001-01-05 Hans-Peter Nilsson <hpn@cygnus.com>
3751 * elf32-sh.c (sh_elf_howto_table) <R_SH_PT_16>: Adjust fields to
3752 be a proper relocation for PTA and PTB rather than a marker.
3753 <R_SH_IMMU5, R_SH_IMMS6, R_SH_IMMU6, R_SH_IMMS10, R_SH_IMMS10BY2,
3754 R_SH_IMMS10BY4, R_SH_IMMS10BY8, R_SH_IMMS16, R_SH_IMMU16,
3755 R_SH_IMM_LOW16, R_SH_IMM_LOW16_PCREL, R_SH_IMM_MEDLOW16,
3756 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16_PCREL,
3757 R_SH_IMM_HI16, R_SH_IMM_HI16_PCREL, R_SH_64, R_SH_64_PCREL>:
3758 Zero src_mask.
3759 * elf64-sh64.c: Ditto.
3760 (sh_elf64_relocate_section) <case R_SH_PT_16>: New case.
3761 * elf32-sh64.c: Include opcodes/sh64-opc.h
3762 (shmedia_prepare_reloc): Take a bfd_link_info pointer as first
3763 argument. Drop const qualifiers from "bfd *" and "bfd_byte *"
3764 parameters. No unused parameters. Caller changed.
3765 <case R_SH_PT_16>: New case.
3766 * Makefile.am (elf32-sh64.lo): Add dependency on sh64-opc.h.
3767 * Makefile.in: Regenerate.
3768 2000-12-30 Hans-Peter Nilsson <hpn@cygnus.com>
3769 * elf64-sh64.c (sh64_elf64_fake_sections): Set SHF_SH5_ISA32 for
3770 all code sections.
3771 (sh_elf64_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
3772 (sh64_elf_merge_private_data): Ditto.
3773 * elf32-sh64.c (sh64_elf_fake_sections): Use sh64_elf_section_data
3774 to access stored section flags.
3775 (sh64_elf_final_write_processing): Return immediately unless
3776 called by linker. Use sh64_elf_section_data (cranges) to get size
3777 of linker-generated cranges entries.
3778 (sh64_elf_copy_private_data): Add missing "return true".
3779 (sh64_elf_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
3780 (sh_elf64_merge_private_data): Ditto.
3781 2000-12-19 Hans-Peter Nilsson <hpn@cygnus.com>
3782 * elf64-sh64.c (sh64_elf64_fake_sections): New, copy of
3783 elf64-sh64.c:sh64_elf_fake_sections.
3784 (elf_backend_fake_sections): Define as sh64_elf64_fake_sections.
3785 2000-12-18 Hans-Peter Nilsson <hpn@cygnus.com>
3786 * elf32-sh64.c (sh64_elf_copy_private_data_internal): Delete.
3787 (sh64_elf_final_write_processing): New.
3788 (elf_backend_final_write_processing): Define.
3789 (sh64_elf_fake_sections): Get header flags from tdata field.
3790 (sh64_elf_copy_private_data): Do not call
3791 sh64_elf_copy_private_data_internal, just copy e_flags field.
3792 (sh64_elf_merge_private_data): Do not call
3793 sh64_elf_copy_private_data_internal.
3794 2000-12-12 Hans-Peter Nilsson <hpn@cygnus.com>
3795 Remove EF_SH64_ABI64, let ELF size make difference.
3796 Remove SH64-specific BFD section flag.
3797 * elf32-sh64.c (sh64_elf_fake_sections): Recognize section as
3798 containing SHmedia through elf_section_data (asect)->tdata
3799 non-zero, not using a BFD section flag.
3800 (sh64_elf_set_mach_from_flags): Don't recognize EF_SH64_ABI64.
3801 (sh64_elf_merge_private_data): Similar.
3802 (elf_backend_section_flags): Don't define.
3803 (sh64_elf_backend_section_flags): Delete.
3804 * elf64-sh64.c (sh_elf64_set_mach_from_flags): Recognize EF_SH64,
3805 not EF_SH64_ABI64.
3806 (sh_elf64_merge_private_data): Similar.
3807 * section.c (Section flags definitions): Don't define
3808 SEC_SH_ISA_SHMEDIA.
3809 (bfd-in2.h): Regenerate.
3810 2000-12-09 Hans-Peter Nilsson <hpn@cygnus.com>
3811 Make DataLabel references work with partial linking.
3812 * elf32-sh64.c: Fix formatting.
3813 (sh64_elf_link_output_symbol_hook): New.
3814 (elf_backend_link_output_symbol_hook): Define to
3815 sh64_elf_link_output_symbol_hook.
3816 (sh64_elf_add_symbol_hook): Make DataLabel symbol just global
3817 undefined if partial linking. Adjust sanity check.
3818 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): New.
3819 (elf_backend_link_output_symbol_hook): Define to
3820 sh64_elf64_link_output_symbol_hook.
3821 (sh64_elf64_add_symbol_hook): Make DataLabel symbol just global
3822 undefined if partial linking. Adjust sanity check.
3823 2000-12-07 Hans-Peter Nilsson <hpn@cygnus.com>
3824 Implement semantics for inter-file DataLabel references.
3825 * elf64-sh64.c (DATALABEL_SUFFIX): Define.
3826 (sh64_elf64_add_symbol_hook): New.
3827 (sh_elf64_relocate_section): If passing an indirect symbol with
3828 st_type STT_DATALABEL on the way to a symbol with st_other
3829 STO_SH5_ISA32, do not bitor 1 to the relocation.
3830 (elf_backend_add_symbol_hook): Define to
3831 sh64_elf64_add_symbol_hook.
3832 * elf64-sh32.c: Tweak comments.
3833 (DATALABEL_SUFFIX): Define.
3834 (sh64_elf_add_symbol_hook): New.
3835 (elf_backend_add_symbol_hook): Define to sh64_elf_add_symbol_hook.
3836 * elf32-sh.c (sh_elf_relocate_section): If passing an indirect
3837 symbol with st_type STT_DATALABEL on the way to a symbol with
3838 st_other STO_SH5_ISA32, do not bitor 1 to the relocation.
3839 2000-12-05 Hans-Peter Nilsson <hpn@cygnus.com>
3840 Pass through STT_DATALABEL.
3841 * elf32-sh64.c (sh64_elf_get_symbol_type): New.
3842 (elf_backend_get_symbol_type): Define.
3843 * elf64-sh64.c (sh64_elf64_get_symbol_type): New.
3844 (elf_backend_get_symbol_type): Define.
3845 2000-11-30 Hans-Peter Nilsson <hpn@cygnus.com>
3846 * elf32-sh64.c: Tweak comments.
3847 (sh64_elf_copy_private_data_internal): Add prototype.
3848 (bfd_elf32_bfd_set_private_flags): Define.
3849 (sh64_elf_copy_private_data_internal): Compare machine name, not
3850 textual BFD target name, to check whether to copy section flag
3851 SHF_SH5_ISA32.
3852 (sh64_elf_merge_private_data): Validize bfd_get_arch_size.
3853 Tweak section-contents-type-mismatch message.
3854 (shmedia_prepare_reloc): Add ATTRIBUTE_UNUSED markers.
3855 Validize reloc-types.
3856 * elf64-sh64.c: New file.
3857 * targets.c (bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec): Declare.
3858 * Makefile.am (BFD64_BACKENDS): Add elf64-sh64.lo.
3859 (BFD64_BACKENDS_CFILES): Add elf64-sh64.c.
3860 Regenerate dependencies.
3861 * Makefile.in: Regenerate.
3862 * config.bfd (sh64-*-elf*): Add bfd_elf64_sh64_vec and
3863 bfd_elf64_sh64l_vec.
3864 * configure.in: Handle bfd_elf64_sh64_vec and
3865 bfd_elf64_sh64l_vec.
3866 * configure: Regenerate.
3867 * po/POTFILES.in: Regenerate.
3868 * po/bfd.pot: Regenerate.
3869 2000-11-29 Hans-Peter Nilsson <hpn@cygnus.com>
3870 * elf32-sh64.c (sh64_elf_set_mach_from_flags): Do not recognize
3871 anything else but EF_SH64 and EF_SH64_ABI64.
3872 (sh64_elf_merge_private_data): Emit error for anything else but
3873 EF_SH64 and EF_SH64_ABI64.
3874 * config.bfd: Remove bfd_elf32_shblin_vec and bfd_elf32_shlin_vec
3875 from targ_selvecs.
3876 * configure.in: Add cofflink.lo to bfd_elf32_sh64_vec and
3877 bfd_elf32_sh64l_vec as a temporary measure.
3878 * configure: Regenerate.
3879 2000-11-27 Hans-Peter Nilsson <hpn@cygnus.com>
3880 * cpu-sh.c (arch_info_struct): Include sh5 item
3881 unconditionalized.
3882 * config.bfd (sh64-*-elf*): Do not set targ_cflags.
3883 Add targ_selvecs bfd_elf32_sh_vec, bfd_elf32_shl_vec,
3884 bfd_elf32_shblin_vec and bfd_elf32_shlin_vec.
3885 * elf32-sh64.c: Tweak comments.
3886 (sh64_elf_set_mach_from_flags): Recognize all machine flags that
3887 are proper subsets of SH64 as bfd_mach_sh5. Add EF_SH64_ABI64.
3888 (sh64_elf_copy_private_data_internal): Wrap long line.
3889 (sh64_elf_merge_private_data): Rewrite to allow objects from
3890 SH64 subsets to be linked together.
3891 (INCLUDE_SHMEDIA): Define.
3892 * elf32-sh.c (sh_elf_relocate_section) <local symbol>:
3893 Parenthesize plus-expression inside or-expression.
3894 <global symbol>: Ditto.
3895 (sh_elf_set_mach_from_flags): Remove code refusing
3896 deleted EF_SH64_32BIT_ABI flag.
3897 2000-11-26 Hans-Peter Nilsson <hpn@cygnus.com>
3898 * elf32-sh.c (sh_elf_howto_table) <R_SH_IMM_LOW16_PCREL,
3899 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16_PCREL,
3900 R_SH_IMM_HI16_PCREL, R_SH_64_PCREL>: Set pcrel_offset to true.
3901 (sh_elf_relocate_section) <local symbol>: Or 1 in
3902 calculation of relocation if sym->st_other & STO_SH5_ISA32.
3903 <global symbol>: Ditto if h->other & STO_SH5_ISA32.
3904 * elf32-sh64.c (shmedia_prepare_reloc): Add rel->r_addend to
3905 relocation.
3906 2000-11-24 Hans-Peter Nilsson <hpn@cygnus.com>
3907 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64.lo.
3908 (BFD32_BACKENDS_CFILES): Add elf32-sh64.c.
3909 Regenerate dependencies.
3910 * Makefile.in: Regenerate.
3911 * archures.c: Add bfd_mach_sh5.
3912 * config.bfd: Map targ_cpu sh* to bfd_sh_arch.
3913 Handle sh64-*-elf*. Set targ_cflags to -DINCLUDE_SHMEDIA.
3914 * configure.in: Handle bfd_elf32_sh64_vec and bfd_elf32_sh64l_vec.
3915 * configure: Regenerate.
3916 * reloc.c (BFD_RELOC_SH_SHMEDIA_CODE, BFD_RELOC_SH_IMMU5,
3917 BFD_RELOC_SH_IMMS6, BFD_RELOC_SH_IMMS6BY32, BFD_RELOC_SH_IMMU6,
3918 BFD_RELOC_SH_IMMS10, BFD_RELOC_SH_IMMS10BY2,
3919 BFD_RELOC_SH_IMMS10BY4, BFD_RELOC_SH_IMMS10BY8,
3920 BFD_RELOC_SH_IMMS16, BFD_RELOC_SH_IMMU16, BFD_RELOC_SH_IMM_LOW16,
3921 BFD_RELOC_SH_IMM_LOW16_PCREL, BFD_RELOC_SH_IMM_MEDLOW16,
3922 BFD_RELOC_SH_IMM_MEDLOW16_PCREL, BFD_RELOC_SH_IMM_MEDHI16,
3923 BFD_RELOC_SH_IMM_MEDHI16_PCREL, BFD_RELOC_SH_IMM_HI16,
3924 BFD_RELOC_SH_IMM_HI16_PCREL, BFD_RELOC_SH_PT_16): New relocations.
3925 * cpu-sh.c [INCLUDE_SHMEDIA] (arch_info_struct): Define and link
3926 in item for SH5.
3927 * elf32-sh.c [INCLUDE_SHMEDIA] (sh_elf_howto_table): Add howto items
3928 for SHmedia relocs.
3929 [INCLUDE_SHMEDIA] (sh_rel): Add mappings for SHmedia relocs.
3930 [INCLUDE_SHMEDIA] (sh_elf_relocate_section) [default]: Call
3931 shmedia_prepare_reloc, goto final_link_relocate if it returns
3932 non-zero, else fail as before.
3933 (sh_elf_set_mach_from_flags): Provide function only if not defined
3934 as macro. Do not recognize objects with EF_SH64_32BIT_ABI set.
3935 (sh_elf_set_private_flags): Provide function only if not defined
3936 as a macro.
3937 (sh_elf_copy_private_data): Similar.
3938 (sh_elf_merge_private_data): Similar.
3939 * section.c (SEC_SH_ISA_SHMEDIA): New.
3940 * targets.c (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec): Declare.
3941 * elf32-sh64.c: New file.
3942 * libbfd.h: Regenerate.
3943 * bfd-in2.h: Regenerate.
3944 * po/POTFILES.in: Regenerate.
3945 * po/bfd.pot: Regenerate.
3946 * bfd-in2.h: Regenerate.
3947 * libbfd.h: Regenerate.
3948
e108f470
DJ
39492002-02-07 Daniel Jacobowitz <drow@mvista.com>
3950
3951 * bfd-in.h: Update <stdbool.h> check to only see if <stdbool.h> has
3952 been included, not drag it in.
3953 * bfd-in2.h: Regenerate.
3954
259d18a3
L
39552002-02-06 H.J. Lu (hjl@gnu.org)
3956
3957 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Update
3958 the mach and ISA fields if necessary.
3959
f13b834e
NC
39602002-02-06 Nick Clifton <nickc@cambridge.redhat.com>
3961
3962 * coffcode.h (coff_set_arch_mach_hook): Select the highest known
3963 ARM architecture when an F_ARM_5 flag is detected, since we cannot
3964 be sure exactly which architecture this represents.
3965
82f6addb
NC
39662002-02-05 Nick Clifton <nickc@redhat.com>
3967
3968 * po/tr.po: Updated translation.
3969
899f54f5
AM
39702002-02-05 Alan Modra <amodra@bigpond.net.au>
3971
3972 From Jimi X <jimix@watson.ibm.com>
3973 * archures (bfd_mach_ppc64): Define.
3974 (bfd_powerpc_arch): Rename to bfd_powerpc_archs.
3975 (bfd_powerpc_arch): Define.
3976 * bfd-in2.h: Regenerate.
3977 * cpu-powerpc.c (arch_info_struct): Rename to bfd_powerpc_archs.
3978 (bfd_powerpc_arch): Move to tail of bfd_powerpc_archs.
3979 (bfd_powerpc_archs): Add default powerpc64 arch.
3980
248866a8
AM
39812002-02-05 Alan Modra <amodra@bigpond.net.au>
3982
3983 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Check for relocs
3984 against section syms in readonly sections. Don't do the global
3985 sym check if we find one.
3986 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
3987 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
0a6958db 3988 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
248866a8
AM
3989 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
3990 (elf_s390_grok_prstatus): Add missing prototype.
3991
4fa5c2a8
HPN
39922002-02-04 Hans-Peter Nilsson <hp@bitrange.com>
3993
3994 * elf64-mmix.c (mmix_dump_bpo_gregs): New function.
3995 (mmix_elf_check_common_relocs) <case R_MMIX_BASE_PLUS_OFFSET>:
3996 Call bfd_get_section_by_name only once. Initialize
3997 bpodata->n_bpo_relocs_this_section.
3998 (_bfd_mmix_prepare_linker_allocated_gregs): Remove comment
3999 referring to DSOs.
4000 (bpo_reloc_request_sort_fn): Don't use difference of values as
4001 return-value.
4002
537c972e
DB
40032002-02-02 David O'Brien <obrien@FreeBSD>
4004
4005 * configure.in: Tweak the FreeBSD 4.x recognition more. Only treat
4006 version 4.5 and later the same as 5-CURRENT.
4007 * configure: Re-generate.
4008
006336b8
JT
40092002-02-02 Jason Thorpe <thorpej@wasabisystems.com>
4010
4011 * config.bfd (hppa*-*-netbsd*): New target.
4012
6c571f00
PT
40132002-01-31 Philipp Thomas <pthomas@suse.de>
4014
19397422
AM
4015 * coff-arm.c (coff_arm_merge_private_bfd_data): Move ERROR
4016 to front of message. Unify messages with elf32-arm.h. Use
4017 commas where neccessary.
4018 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Use all upcase
4019 ERROR in messages. Unify messages with coff-arm.c. Correct
4020 VFP/FPA error message.
4021 (elf32_arm_print_private_bfd_data): Don't mark APCS-26 and
4022 APCS-32 for translation.
6c571f00 4023
930b4cb2
HPN
40242002-02-01 Hans-Peter Nilsson <hp@bitrange.com>
4025
4026 Perform on-demand global register allocation from
4027 R_MMIX_BASE_PLUS_OFFSET relocs.
4028 * elf64-mmix.c (struct bpo_reloc_section_info, struct
4029 bpo_reloc_request, struct bpo_greg_section_info): New.
4030 (mmix_elf_check_common_relocs, mmix_elf_gc_sweep_hook,
4031 bpo_reloc_request_sort_fn, mmix_elf_relax_section,
4032 _bfd_mmix_check_all_relocs,
4033 _bfd_mmix_prepare_linker_allocated_gregs,
4034 _bfd_mmix_finalize_linker_allocated_gregs): New functions.
4035 (elf_mmix_howto_table): Correct src_mask for most relocs.
4036 (mmix_elf_perform_relocation) <case R_MMIX_BASE_PLUS_OFFSET>: New
4037 case.
4038 (mmix_final_link_relocate) <case R_MMIX_BASE_PLUS_OFFSET>: New
4039 case. Fix typo in comment. New label do_mmix_reloc.
4040 (mmix_elf_check_relocs): Abuse bfd_link_info member base_file to
4041 store first object file with a base-plus-offset reloc. Call
4042 mmix_elf_check_common_relocs for the part common with mmo.
4043 (mmix_elf_final_link): Write out linker-allocated register
4044 contents section.
4045 (elf_backend_gc_sweep_hook): Define.
4046 (bfd_elf64_bfd_relax_section): Define.
4047
4048 * mmo.c: Don't include <ctype.h>
4049 (mmo_init): Correct init-once logic.
4050
3e36d993
TR
40512002-02-01 Tom Rix <trix@redhat.com>
4052
4053 * config.bfd: Conditionally support <aiaff> for pre AIX 4.3.
4054
ba323545
AM
40552002-02-01 Alan Modra <amodra@bigpond.net.au>
4056
4057 * Makefile.am: Run "make dep-am"
4058 * Makefile.in: Regenerate.
4059
012884d6
DB
40602002-01-31 David O'Brien <obrien@FreeBSD>
4061
4062 * configure.in: Recognize the differences in core files from FreeBSD
4063 4.{0,1} and later versions of 4.x. This treats 4.2+ the same as
4064 5-CURRENT.
4065 * configure: Regenerate.
4066
3b16e843
NC
40672002-01-31 Ivan Guzvinec <ivang@opencores.org>
4068
4069 * coff-or32.c: New file.
4070 * cpu-or32.c: New file.
4071 * elf32-or32.c: New file.
4072 * archures.c: Add support for or32.
4073 * targets.c: Add support for or32.
4074 * bfd-in2.h: Regenerate.
7dc0ab31 4075 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags,
3b16e843
NC
4076 coff_write_object_contents): Add support for or32.
4077 * config.bfd: Add target.
4078 * configure.in: Add support for or32.
4079 * configure: Regenerate.
4080 * Makefile.am: Add support for or32.
4081 * Makefile.in: Regenerate.
3b16e843
NC
4082 * po/SRC-POTFILES.in: Add or32 files.
4083 * po/bfd.pot: Regenerate.
7dc0ab31 4084
caf8ca8e
NC
40852002-01-31 Nick Clifton <nickc@cambridge.redhat.com>
4086 Don Lindsay <lindsayd@cisco.com>
4087
4088 * elf32-mips.c (mips_elf_calculate_relocation): Replace 'return
4089 false' with a return of a bfd_reloc_ error code.
4090
e5dfef09
HPN
40912002-01-31 Hans-Peter Nilsson <hp@axis.com>
4092
4093 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
4094 unexport unreferenced symbols when --export-dynamic. Call
4095 _bfd_elf_strtab_delref when unexporting.
4096
4e4770d0
DJ
40972002-01-30 Daniel Jacobowitz <drow@mvista.com>
4098
4099 * bfd-in.h: Include <stdbool.h> if it is available.
4100 * bfd-in2.h: Regenerated.
4101
e1fa50e7
AM
41022002-01-31 Alan Modra <amodra@bigpond.net.au>
4103
4104 * elf64-ppc.c (func_desc_adjust): STV_PROTECTED functions should
4105 not go via the plt.
4106
b5f79c76
NC
41072002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
4108
b5f79c76
NC
4109 * archures.c: Tidy up formatting of embedded comments.
4110 * bfd.c: Tidy up formatting of embedded comments.
7dc0ab31 4111 * bfd-in.h: Fix formatting of comments.
b5f79c76
NC
4112 * reloc.c: Tidy up formatting of ordinary & embedded comments.
4113 * section.c: Tidy up formatting of embedded comments.
4114 * syms.c: Tidy up formatting of embedded comments.
4115 * targets.c: Tidy up formatting of embedded comments.
4116
4117 * bfd-in2.h: Regenerate.
4118
ca09e32b
NC
41192002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
4120
4121 * vms-tir.c (cmd_name): New function.
4122 (tir_cmd_name): New function.
4123 (etir_sta, etir_sto, etir_opr, etir_stc): Use cmd_name().
4124 (tir_opr, tir_ctl, tir_cmd): use tir_cmd_name().
4125 Fix formatting.
7dc0ab31 4126
ca09e32b
NC
4127 * peXXigen.c (pe_print_idata): Rearrange message to aid in
4128 translation.
4129 (pe_print_pdata): Rearrange message to aid in translation.
4130
4131 * libbfd.c (warn_deprecated): Rearrange error message to aid in
4132 translation.
4133
4134 * ihex.c (ihex_write_object_contents): Fix spelling typo.
4135
4136 * ieee.c (ieee_slurp_external_symbols): Remove spurious space.
4137
4138 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Rearrange error
4139 message to aid in translation.
4140
4141 * elf64-mmix.c (mmix_final_link_relocate): Rearrange error message
4142 to aid in translation.
4143
4144 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix typo.
4145
7dc0ab31 41462002-01-30 Philipp Thomas <pthomas@suse.de>
ae1a89b7
PT
4147
4148 * coff-arm.c, elf32-elf.h: Unify messages.
4149
05f64ac6
NC
41502002-01-30 Nick Clifton <nickc@redhat.com>
4151
4152 * po/sv.po: Updated translation.
4153
f5a3e38a
NC
41542002-01-30 Philipp Thomas <pthomas@suse.de>
4155
4156 * dwarf2.c (read_abbrev): Use full section name in error message.
4157 (decode_line_info): Likewise.
661a3fd4
NC
4158
4159 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Don't translate debugging
4160 message.
4161
d926e03d
AM
41622002-01-30 Alan Modra <amodra@bigpond.net.au>
4163
4164 * elf64-ppc.c (func_desc_adjust): Only provide missing function
4165 descriptor symbols for undefined function code syms. Clear
4166 ELF_LINK_NON_ELF so that they can stay weak.
4167
030d18fb 41682002-01-29 Chris Demetriou <cgd@broadcom.com>
7dc0ab31 4169 Mitch Lichtenberg <mpl@broadcom.com>
030d18fb
CD
4170
4171 * bfd-in.h (bfd_mips_elf32_create_embedded_relocs): New prototype.
4172 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): New function
4173 to handle 32-bit ELF embedded reloc (ld --embedded-relocs)
4174 generation.
4175 * bfd-in2.h: Regenerate.
4176
fcc76bea
CD
41772002-01-29 Chris Demetriou <cgd@broadcom.com>
4178
4179 * elf32-mips.c: Add additional comments about HI16 relocation
4180 processing.
4181 (_bfd_mips_elf_hi16_reloc): Don't subtract address here for
4182 pc-relative relocations. (Reverts change made on 2001-10-31.)
4183 (_bfd_mips_elf_lo16_reloc): Subtract address of LO16 part here
4184 for pc-relative relocations.
4185 (mips_elf_calculate_relocation): Add a comment about a kludge
4186 in the R_MIPS_GNU_REL_HI16 handling.
4187 (_bfd_mips_elf_relocate_section): Implement that kludge;
4188 adjust pc-relative HI16 relocation for difference in HI16 and
4189 LO16 addresses, since it can't easily be done in
4190 mips_elf_calculate_relocation.
4191
f9cd9119
MS
41922002-01-29 Martin Schwidefsky <schwidefsky@de.ibm.com>
4193
4194 * elf32-i386 (elf_i386_adjust_dynamic_symbol): Do not replace PLT32
4195 relocations with PC32 relocations for undefined or weak symbols.
4196 * elf32-s390 (elf_i386_adjust_dynamic_symbol): Likewise.
4197 * elf64-s390x (elf_i386_adjust_dynamic_symbol): Likewise.
4198
702248bb
JT
41992002-01-28 Jason Thorpe <thorpej@wasabisystems.com>
4200
4201 * elfcore.h (elf_core_file_p): Improve comment for last change.
4202
4867be41
DJ
42032002-01-27 Daniel Jacobowitz <drow@mvista.com>
4204
4205 * configure: Regenerated.
4206
a94cef6a
JT
42072002-01-27 Jason Thorpe <thorpej@wasabisystems.com>
4208
4209 * elfcore.h (elf_core_file_p): Set the machine architecture
4210 before processing the program headers.
4211
7562a296
HPN
42122002-01-26 Hans-Peter Nilsson <hp@bitrange.com>
4213
966abd70
HPN
4214 * configure.in <64-bit configuration>: If using gcc, check and
4215 emit error for egcs-1.1.2.
4216 * configure: Regenerate.
4217
e8eab623
NC
42182002-01-26 Egor Duda <deo@logos-m.ru>
4219
4220 * elf.c (elfcore_grok_win32pstatus): Copy only as much information
4221 as possible to avoid stack corruption.
4222
73896efb
RH
42232002-01-26 Richard Henderson <rth@redhat.com>
4224
4225 * elf64-alpha.c (elf64_alpha_check_relocs): Don't set reltext
4226 for non-allocated sections.
4227
42282002-01-25 Mark Kettenis <kettenis@gnu.org>
c106e334
MK
4229
4230 * elf.c (elfcore_write_prstatus): Make sure we pass the address of
4231 prstat.pr_reg even if it is a struct.
4232
73896efb 42332002-01-25 Steve Ellcey <sje@cup.hp.com>
254ed743 4234
c5cd6d62 4235 * elfxx-ia64.c: Reset AIX vector function overrides for HP-UX.
254ed743 4236
3d66c4f7
NC
42372002-01-25 Philipp Thomas <pthomas@suse.de>
4238
4239 * coffgen.c (coff_print_symbol): Don't mark info message
4240 for translation.
4241
9460ecda
NC
42422002-01-25 Nick Clifton <nickc@redhat.com>
4243
4244 * po/fr.po: Updated translation.
4245 * po/es.po: Updated translation.
4246
cc9ff76a
AM
42472002-01-25 Philipp Thomas <pthomas@suse.de>
4248
4249 * coff-alpha.c (alpha_relocate_section): Unify warning message
4250 for GP relative relocations without GP defined.
4251 * coff-mips.c (mips_relocate_section): Likewise.
4252
c68836a9
AM
42532002-01-25 Alan Modra <amodra@bigpond.net.au>
4254
4255 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Avoid
4256 unsigned overflow when new_offset < old_offset.
4257
e8eab623 42582002-01-24 Philipp Thomas <pthomas@suse.de>
391154e9
NC
4259
4260 * bfd.c (_bfd_abort): Fix typo.
4261
8ba89f17
RH
42622002-01-23 Richard Henderson <rth@redhat.com>
4263
4264 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't suppress
4265 plt entries for undefweak symbols.
4266
c6953948
NC
42672002-01-23 Steve Ellcey <sje@cup.hp.com>
4268
c5cd6d62 4269 * targets.c (bfd_elf32_ia64_hpux_big_vec): Add to DEFAULT_VECTOR.
c6953948
NC
4270 (bfd_elf64_ia64_hpux_big_vec): Ditto.
4271 (bfd_elf32_h8300_vec): Ditto.
4272
41bd81ab
AM
42732002-01-23 Alan Modra <amodra@bigpond.net.au>
4274
4275 * elf64-ppc.c: Remove stale part of ABI comment.
4276 (NO_OPD_RELOCS): Define.
4277 (ppc64_elf_check_relocs): Use it.
4278 (ppc64_elf_relocate_section): Here too.
4279 (build_one_stub): Don't point function syms at the stub. Instead,
4280 hijack plt.offset.
4281 (ppc64_elf_relocate_section): Check whether REL24 relocs should
4282 really go to the stub. Make all dynamic relocs in opd against
4283 locals.
4284 (ppc64_elf_finish_dynamic_symbol): Allow for non-standard use of
4285 plt.offset.
4286
f304919d
RH
42872002-01-22 Richard Henderson <rth@redhat.com>
4288
4289 * elf64-alpha.c (INSN_UNOP): Encode with RB as $sp.
4290
c0ef99a7
AM
42912002-01-22 Alan Modra <amodra@bigpond.net.au>
4292
60ee0d4a
AM
4293 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Correct sign of
4294 TOC_BASE_OFF adjustment.
4295
c0ef99a7
AM
4296 * Makefile.am: Run "make dep-am".
4297 * Makefile.in: Regenerate.
4298 * po/SRC-POTFILES.in: Regenerate.
4299
64328b46
AM
43002002-01-22 John David Anglin <dave@hiauly1.hia.nrc.ca>
4301
4302 * configure.host (hppa*64*-*-hpux*, hppa*64*-*-linux*): Add new
4303 host defines.
4304
59953665 43052002-01-21 Hans-Peter Nilsson <hp@axis.com>
58255df3
HPN
4306
4307 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GOTREL>:
4308 Check for and emit error if sgot is NULL at this point.
4309
9596feea
JT
43102002-01-21 Jason Thorpe <thorpej@wasabisystems.com>
4311
4312 * config.bfd (ia64*-*-netbsd*): New target.
4313
7b45c6e1
AM
43142002-01-21 Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
4315
4316 * som.c (som_write_space_strings): Comment typo fix.
4317
e5094212
AM
43182002-01-21 Alan Modra <amodra@bigpond.net.au>
4319
e86ce104
AM
4320 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_func and
4321 is_func_descriptor fields.
4322 (link_hash_newfunc): Init them.
4323 (ppc64_elf_check_relocs): Only R_PPC24_REL24 syms starting with a
4324 dot are candidates for plt entries. When processing .opd relocs,
4325 set function descriptor strings to point inside function code
4326 string, and set new ppc_link_hash_entry fields.
4327 (ppc64_elf_gc_sweep_hook): Don't sweep R_PPC64_REL24 relocs.
4328 (ppc64_elf_adjust_dynamic_symbol): Remove most code dealing with
4329 function descriptors. It's now done in..
4330 (func_desc_adjust): New.
4331 (ppc64_elf_func_desc_adjust): New.
4332 (define elf_backend_always_size_sections): Define.
4333 (ppc64_elf_hide_symbol): New.
4334 (define elf_backend_hide_symbol): Define.
4335 (allocate_dynrelocs): Remove code looking up function descriptors
4336 as that has been done earlier.
4337 (ppc64_elf_size_dynamic_sections): Use htab shortcut to elf hash
4338 table.
4339 (ppc64_elf_finish_dynamic_symbol): Likewise. Remove code looking
4340 up function descriptor.
4341 (build_one_stub): Look up the function code sym. Check for
4342 invalid plt offsets.
4343 (ppc64_elf_relocate_section): Tweak calls to undefined weak syms.
4344 Convert R_PPC64_TOC relocs to R_PPC64_RELATIVE in shared libs.
4345
e5094212
AM
4346 * elf-bfd.h (elf_backend_data <elf_backend_hide_symbol>): Add
4347 boolean param.
4348 (_bfd_elf_link_hash_hide_symbol): Likewise.
4349 * elflink.h (elf_link_add_object_symbols): Adjust call to
4350 elf_backend_hide_symbol.
4351 (elf_fix_symbol_flags): Likewise.
4352 (elf_link_assign_sym_version): Likewise. Use bfd_malloc rather
4353 than bfd_alloc.
4354 * elf.c (_bfd_elf_link_hash_hide_symbol): Add "force_local" param.
4355 Set ELF_LINK_FORCED_LOCAL and call _bfd_elf_strtab_delref.
4356 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
4357 (clobber_millicode_symbols): Adjust to suit new hide_symbol.
4358 * elf32-cris.c (elf_cris_hide_symbol): Add "force_local" param
4359 and adjust to suit.
4360 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise, and call
4361 _bfd_elf_link_hash_hide_symbol rather than duplicating code.
4362 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
4363
40b8271b
AM
43642002-01-18 Alan Modra <amodra@bigpond.net.au>
4365
4366 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Test for a
4367 dynamic function descriptor symbol, not the associated function
4368 symbol.
4369
55baa95b
EC
43702002-01-17 Eric Christopher <echristo@redhat.com>
4371
4372 * elf32-mips.c (mips_elf_calculate_relocation): Fix typo.
4373
328577ad
NC
43742002-01-17 Nick Clifton <nickc@cambridge.redhat.com>
4375
4376 * po/bfd.pot: Regenerate.
4377 * po/fr.po: Regenerate.
4378
af746e92
AM
43792002-01-17 Alan Modra <amodra@bigpond.net.au>
4380
4381 * elf-bfd.h (elf_backend_data <elf_backend_section_from_bfd_section>):
4382 Remove "Elf_Internal_Shdr *" param.
4383 (_bfd_mips_elf_section_from_bfd_section): Ditto.
4384 * elf32-mips.c (_bfd_mips_elf_section_from_bfd_section): Ditto.
4385 * elf32-m32r.c (_bfd_m32r_elf_section_from_bfd_section): Ditto.
4386 * elf32-v850.c (v850_elf_section_from_bfd_section): Ditto.
4387 * elf64-mmix.c (mmix_elf_section_from_bfd_section): Ditto.
4388 * elfxx-ia64.c (elfNN_hpux_backend_section_from_bfd_section): Ditto.
4389 * elf.c (_bfd_elf_section_from_bfd_section): Allow backend
4390 function to override special sections. Remove hdr arg from
4391 backend call, and don't loop.
4392
175e9962
EC
43932002-01-16 Eric Christopher <echristo@redhat.com>
4394
4395 * elf32-mips.c (mips_elf_calculate_relocation): Set require_jalxp
4396 on R_MIPS_26 and target is 16bit. Add R_MIPS16_GPREL to list of
4397 relocations requiring gp0 and gp.
4398
96a846ea
RE
43992002-01-16 Richard Earnshaw <rearnsha@arm.com>
4400
175e9962 4401 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle
96a846ea
RE
4402 EF_ARM_VFP_FLOAT.
4403 (elf32_arm_print_private_bfd_data): Likewise.
4404
af3ae48d
NC
44052002-01-16 Nick Clifton <nickc@cambridge.redhat.com>
4406
4407 * po/tr.po: Import new version.
4408
10ed1bba
AM
44092002-01-16 Alan Modra <amodra@bigpond.net.au>
4410
4411 * elf64-ppc.c (ppc64_elf_howto_raw): Remove stale FIXMEs.
4412 (ppc64_elf_reloc_type_lookup): Use proper CTOR reloc.
4413 (ORI_R0_R0_0): Correct.
4414
5d1634d7
AM
44152002-01-16 Alan Modra <amodra@bigpond.net.au>
4416
4417 * elflink.c (_bfd_elf_create_dynamic_sections): Don't set SEC_CODE
4418 when plt_not_loaded.
4419 * elf64-ppc.c (ppc64_elf_create_dynamic_sections): No need to
4420 clear .plt SEC_CODE here. Create .stub and correct .glink flags.
4421 (PLT_INITIAL_ENTRY_SIZE): Set to 24.
4422 (ppc64_elf_glink_code): Delete.
4423 (PPC64_ELF_GLINK_SIZE): Delete.
4424 (ADDIS_R12_R2, STD_R2_40R1, LD_R11_0R12, LD_R2_0R12, MTCTR_R11,
4425 BCTR, ADDIS_R12_R12_1, LD_R2_40R1, NOP, LI_R0_0, B_DOT, LIS_R0_0,
4426 ORI_R0_R0_0): Define.
4427 (PLT_CALL_STUB_SIZE, GLINK_CALL_STUB_SIZE): Define.
4428 (struct ppc_link_hash_table): Add sstub and plt_overflow.
4429 (ppc64_elf_link_hash_table_create): Init them.
4430 (ppc64_elf_check_relocs <R_PPC64_REL24>): Refcount .plt entry.
4431 Don't copy to shared lib.
4432 (ppc64_elf_check_relocs): Call bfd_set_error on errors.
4433 (ppc64_elf_gc_sweep_hook <R_PPC64_REL24>): Sweep plt refcount.
4434 (allocate_dynrelocs <plt>): Don't change function sym here. Make
4435 room for .stub and .glink code.
4436 (ppc64_elf_size_dynamic_sections): Handle .stub. Make entry for
4437 DT_PPC64_GLINK.
4438 (ppc64_elf_final_link): Rename to ppc64_elf_set_toc. Don't call
4439 bfd_elf64_bfd_final_link.
4440 (bfd_elf64_bfd_final_link): Don't define.
4441 (ppc64_elf_size_stubs): New.
4442 (build_plt_stub): New.
4443 (build_one_stub): New.
4444 (ppc64_elf_build_stubs): New.
4445 (ppc64_elf_relocate_section <toc relocs>): Remove assert.
4446 (ppc64_elf_relocate_section): Don't copy R_PPC64_REL24 relocs.
4447 (ppc64_elf_finish_dynamic_symbol): Don't build stubs here. Set
4448 DT_PPC64_GLINK entry. Tweak DT_PLTGOT, DT_JMPREL, DT_PLTRELSZ in
4449 case output sections not separate. Adjust DT_RELASZ to not
4450 include plt relocs. Set reserved got entry. Set got and plt
4451 entry size.
4452 (elf_backend_got_header_size): Set to 8.
4453 * elf64-ppc.h: New file.
4454
c601ffdb
AM
44552002-01-16 Alan Modra <amodra@bigpond.net.au>
4456
4457 * elf32-arm.h (elf32_arm_size_dynamic_sections): When removing
4458 sections, use bfd_section_list_remove.
4459 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
4460 * elflink.h (elf_link_add_object_symbols): When removing all
4461 sections, use bfd_section_list_clear.
4462
8fb4cb7f
NC
44632002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
4464
4465 * po/sv.po: New file: Swedish translation.
4466 * configure.in (ALL_LINGUAS): Add sv.
4467 * configure: Regenerate.
4468
d3c456e9
JJ
44692002-01-15 Jakub Jelinek <jakub@redhat.com>
4470
4471 * elflink.h (elf_link_input_bfd): Back out 2002-01-07 change.
4472 * elf.c (merge_sections_remove_hook): New function.
4473 (_bfd_elf_merge_sections): Pass it as 3rd argument to
4474 _bfd_merge_sections.
4475 * libbfd-in.h (_bfd_merge_sections): Add 3rd argument.
4476 * libbfd.h: Rebuilt.
4477 * merge.c (_bfd_merge_sections): Add remove_hook argument.
4478 Call remove_hook if a SEC_EXCLUDE section is encountered.
4479
1f7fd478
NC
44802002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
4481
4482 * elf32-xstormy16.c (xstormy16_reloc_map): Add new field 'table'.
4483 (xstormy16_reloc_map): Initialise new field with correct howto
4484 table.
4485 (xstormy16_reloc_type_lookup): Use 'table' field to locate correct
4486 howto entry.
4487
b87011e9
MS
44882002-01-10 Michael Snyder <msnyder@redhat.com>
4489
4490 * elf.c (elfcore_write_prstatus): Use long instead of pid_t;
4491 (elfcore_write_pstatus): Use long instead of pid_t;
4492 * elf-bfd.h: Change prototypes to use long instead of pid_t;
4493
175e9962 44942002-01-09 Jason Thorpe <thorpej@wasabisystems.com>
b4db1224
JT
4495
4496 * elf.c: Update copyright years.
4497 (elfcore_grok_netbsd_note): Use NT_NETBSDCORE_PROCINFO
4498 and NT_NETBSDCORE_FIRSTMACH. Improve a comment.
4499
7c76fa91
MS
45002002-01-08 Michael Snyder <msnyder@redhat.com>
4501
4502 Add capability to write corefile note sections, for gdb.
4503 * elf.c (elfcore_write_note): New function.
4504 (elfcore_write_prpsinfo): New function.
4505 (elfcore_write_prstatus): New function.
4506 (elfcore_write_pstatus): New function.
4507 (elfcore_write_prfpreg): New function.
4508 (elfcore_write_prxfpreg): New function.
97996af6 4509 * elf-bfd.h: Add prototypes for above functions.
7c76fa91 4510
e1fddb6b
AO
45112002-01-08 Alexandre Oliva <aoliva@redhat.com>
4512
4513 * elf.c (elf_fake_sections): Propagate errors from
4514 elf_backend_fake_section.
4515
8d05742f
JT
45162002-01-07 Jason Thorpe <thorpej@wasabisystems.com>
4517
4518 * Makefile.am (BFD32_BACKENDS): Add elf32-sh-nbsd.lo.
4519 (BFD32_BACKENDS_CFILES): Add elf32-sh-nbsd.c.
4520 (elf32-sh-nbsd.lo): New rule.
4521 * Makefile.in: Regenerate.
4522 * config.bfd (sh*le-*-netbsdelf*): New target.
4523 (sh*-*-netbsdelf*): New target.
4524 * configure.in: Include netbsd-core.lo for native sh*-*-netbsd*.
4525 (bfd_elf32_shnbsd_vec): New vector.
4526 (bfd_elf32_shlnbsd_vec): New vector.
4527 * configure: Regenerate.
4528 * elf32-sh-nbsd.c: New file.
4529 * targets.c: Update copyright years.
175e9962 4530 (_bfd_target_vector): Add bfd_elf32_shlnbsd_vec and
8d05742f
JT
4531 bfd_elf32_shnbsd_vec.
4532
1dba4cb4
AH
45332002-01-07 Aldy Hernandez <aldyh@redhat.com>
4534
4535 * coff-rs6000.c (READ20): Use bfd_scan_vma.
4536
47b22aef
GK
45372002-01-07 Geoffrey Keating <geoffk@redhat.com>
4538
4539 * elflink.h (elf_link_input_bfd): Don't ask for the merged offset
4540 of a symbol in a section that will be deleted.
4541
be2d1673
NC
45422002-01-07 Nick Clifton <nickc@cambridge.redhat.com>
4543
4544 * po/es.po: New file: Spanish translation.
4545 * configure.in (ALL_LINGUAS): Add es.
4546 * configure: Regenerate.
4547
d9cf1b54
AM
45482002-01-06 Steve Ellcey <sje@cup.hp.com>
4549
4550 * elfxx-ia64.c (is_unwind_section_name): Add target vector as
4551 argument so we can handle HP-UX specially.
4552 (elfNN_ia64_hpux_vec): New for use in is_unwind_section_name.
4553 (elfNN_hpux_backend_section_from_bfd_section): New for support
4554 of SHN_IA_64_ANSI_COMMON.
4555 (elfNN_ia64_relax_section): Add support for SHN_IA_64_ANSI_COMMON.
4556 (is_unwind_section_name): Add special HP-UX support.
4557 (elfNN_ia64_section_from_shdr): Add support for more sections.
4558 (elfNN_ia64_fake_sections): Modify is_unwind_section_name call and
4559 add support for more sections.
4560 (elfNN_ia64_additional_program_headers): Modify
4561 is_unwind_section_name call.
4562 (elfNN_ia64_modify_segment_map): Remove assumption that there is
4563 only one unwind section in segment.
4564
3f3c5c34
AM
45652002-01-06 Alan Modra <amodra@bigpond.net.au>
4566
4567 * syms.c (_bfd_generic_make_empty_symbol): New function.
4568 * libbfd-in.h (_bfd_nosymbols_make_empty_symbol): Define as
4569 _bfd_generic_make_empty_symbol.
4570 * libbfd.h: Regenerate.
4571 * bfd-in2.h: Regenerate.
4572 * hppabsd-core.c (hppabsd_core_make_empty_symbol): Delete function.
4573 (hppabsd_core_get_symtab_upper_bound): Don't define.
4574 (hppabsd_core_get_symtab): Likewise.
4575 (hppabsd_core_print_symbol): Likewise.
4576 (hppabsd_core_get_symbol_info): Likewise.
4577 (hppabsd_core_bfd_is_local_label_name): Likewise.
4578 (hppabsd_core_get_lineno): Likewise.
4579 (hppabsd_core_find_nearest_line): Likewise.
4580 (hppabsd_core_bfd_make_debug_symbol): Likewise.
4581 (hppabsd_core_read_minisymbols): Likewise.
4582 (hppabsd_core_minisymbol_to_symbol): Likewise.
4583 (hppabsd_core_vec): Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols).
4584 Formatting fixes.
4585 * hpux-core.c: Similarly.
4586 * irix-core.c: Similarly.
4587 * osf-core.c: Similarly.
4588 * sco5-core.c: Similarly.
4589 * binary.c (binary_make_empty_symbol): Remove function, define as
4590 _bfd_generic_make_empty_symbol.
4591 * ihex.c (ihex_make_empty_symbol): Likewise.
4592 * mmo.c (mmo_make_empty_symbol): Likewise.
4593 * ppcboot.c (ppcboot_make_empty_symbol): Likewise.
4594 * srec.c (srec_make_empty_symbol): Likewise.
4595 * versados.c (versados_make_empty_symbol): Likewise.
4596 * vms.c (_bfd_vms_make_empty_symbol): Remove.
4597 (vms_make_empty_symbol): Define as _bfd_generic_make_empty_symbol.
4598 * vms-gsd.c (_bfd_vms_slurp_gsd): Call bfd_make_empty_symbol
4599 rather than _bfd_vms_make_empty_symbol.
4600 * vms-misc.c (new_symbol): Likewise.
4601
3f0a7f7f
AM
46022002-01-05 Alan Modra <amodra@bigpond.net.au>
4603
9e7b37b3
AM
4604 * section.c (bfd_section_init): Remove unnecessary initialisations.
4605 (bfd_section_list_clear): New function.
4606 (bfd_section_list_remove, bfd_section_list_insert): New macros.
4607 (_bfd_strip_section_from_output): Use them.
4608 * coffcode.h (coff_set_alignment_hook): Likewise.
4609 * elf32-mips.c (_bfd_mips_elf_final_link): Likewise.
4610 * elf64-mips.c (mips_elf64_final_link): Likewise.
4611 * elf64-mmix.c (mmix_elf_final_link): Likewise.
4612 * sunos.c (sunos_add_dynamic_symbols): Likewise.
4613 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
4614 * bfd-in2.h: Regenerate.
4615
4616 * netbsd-core.c (netbsd_core_file_p): Use bfd_make_section_anyway
4617 rather than doing our own section handling. Clean up after errors
4618 with bfd_release and bfd_section_list_clear. Handle unexpected
4619 flags.
4620 * aoutf1.h (sunos4_core_file_p): Likewise.
4621 * aix386-core.c (aix386_core_file_p): Likewise.
4622 * cisco-core.c (cisco_core_file_validate): Likewise.
4623 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
4624 * trad-core.c (trad_unix_core_file_p): Likewise.
4625
4626 * hppabsd-core.c (hppabsd_core_core_file_p): Clean up after errors
4627 with bfd_release and bfd_section_list_clear.
4628 * hpux-core.c (hpux_core_core_file_p): Likewise.
4629 * irix-core.c (irix_core_core_file_p): Likewise.
4630 * lynx-core.c (lynx_core_file_p): Likewise.
4631 * osf-core.c (osf_core_core_file_p): Likewise.
4632 * rs6000-core.c (rs6000coff_core_p): Likewise.
4633 * sco5-core.c (sco5_core_file_p): Likewise.
4634
3f0a7f7f
AM
4635 * elf32-mips.c (_bfd_mips_elf_lo16_reloc): Simplify, and perform
4636 sign extension adjustments without conditionals.
4637
a3aa38ee
JJ
46382002-01-04 Jakub Jelinek <jakub@redhat.com>
4639
4640 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Don't crash if
4641 CIE at .eh_frame start is removed due to no FDEs referencing it.
4642
8a8b2d4b
AJ
46432002-01-04 Jason Thorpe <thorpej@wasabisystems.com>
4644
4645 * config.bfd (x86_64-*-netbsd*): New target.
4646 * configure.in (x86_64-*-netbsd*): Set COREFILE
4647 to netbsd-core.lo.
4648 * configure: Regenerated.
4649
04b5af89
TR
46502002-01-03 Tom Rix <trix@redhat.com>
4651
4652 * xcofflink.c (_bfd_xcoff_bfd_final_link): Update .pad section ordering
4653 for recent bfd_make_section_anyway change.
4654
51c5503b
NC
46552002-01-03 Nick Clifton <nickc@cambridge.redhat.com>
4656
4657 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
4658 R_ARM_THM_PC11 reloc.
4659
07f7c046
NC
46602002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
4661
4662 * configure.in (LINGUAS): Add ja.
4663 * configure: Regenerate.
4664 * po/ja.po: Import from translation project's web site.
4665
5eefb65f
NC
46662002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
4667
4668 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Reformat error
4669 messages to ease translation into other languages.
4670
39e90f10 4671For older changes see ChangeLog-0001
56882138
AM
4672\f
4673Local Variables:
4674mode: change-log
4675left-margin: 8
4676fill-column: 74
4677version-control: never
4678End:
This page took 0.332888 seconds and 4 git commands to generate.