* thread.c (info_threads_command): Use get_selected_frame ().
[deliverable/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
5d35169e
AM
12003-07-27 Alan Modra <amodra@bigpond.net.au>
2
3 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Ensure no copy relocs
4 on function descriptors.
5 (ELIMINATE_COPY_RELOCS): Expand comment.
6 (ppc64_elf_special_sections): Move. Don't include non-ppc64 sections.
7 Do include ".toc1".
8
3cddba1e
L
92003-07-25 H.J. Lu <hongjiu.lu@intel.com>
10
11 * elf.c (_bfd_elf_new_section_hook): Set the default section
12 type to SHT_NULL.
13 (elf_fake_sections): Set the section type based on asect->flags
14 if it is SHT_NULL. Don't abort on processor specific section
15 types.
16
d622ef4b
L
172003-07-25 H.J. Lu <hongjiu.lu@intel.com>
18
19 * bfd-in2.h: Regenerated.
20
2f89ff8d
L
212003-07-25 H.J. Lu <hongjiu.lu@intel.com>
22
23 * elf-bfd.h (bfd_elf_special_section): New.
24 (elf_backend_data): Add special_sections, a pointer to
25 bfd_elf_special_section.
26 (elf_section_type). New.
27 (elf_section_flags): New.
28 (_bfd_elf_get_sec_type_attr): New.
29
30 * elf.c (_bfd_elf_make_section_from_shdr): Always use the
31 real section type/flags.
32 (special_sections): New.
33 (get_special_section): New.
34 (_bfd_elf_get_sec_type_attr): New.
35 (_bfd_elf_new_section_hook): Check special_section to set
36 elf_section_type and elf_section_flags.
37 (elf_fake_sections): Don't use section name to set ELF section
38 data.
39
40 * elf32-m32r.c (m32r_elf_special_sections): New.
41 (elf_backend_special_sections): Defined.
42
43 * elf32-m68hc11.c (elf32_m68hc11_special_sections): New.
44 (elf_backend_special_sections): Defined.
45
46 * elf32-mcore.c (mcore_elf_special_sections): New.
47 (elf_backend_special_sections): Defined.
48
49 * elf32-ppc.c (ppc_elf_special_sections): New.
50 (elf_backend_special_sections): Defined.
51
52 * elf32-sh64.c (sh64_elf_special_sections): New.
53 (elf_backend_special_sections): Defined.
54
55 * elf32-v850.c (v850_elf_special_sections): New.
56 (elf_backend_special_sections): Defined.
57
58 * elf32-xtensa.c (elf_xtensa_special_sections): New.
59 (elf_backend_special_sections): Defined.
60
61 * elf64-alpha.c (elf64_alpha_special_sections): New.
62 (elf_backend_special_sections): Defined.
63
64 * elf64-hppa.c (elf64_hppa_special_sections): New.
65 (elf_backend_special_sections): Defined.
66
67 * elf64-ppc.c (ppc64_elf_special_sections): New.
68 (elf_backend_special_sections): Defined.
69
70 * elf64-sh64.c (sh64_elf64_special_sections): New.
71 (elf_backend_special_sections): Defined.
72
73 * elfxx-ia64.c (elfNN_ia64_special_sections): New.
74 (elf_backend_special_sections): Defined.
75
76 * elfxx-mips.c (_bfd_mips_elf_special_sections): New.
77
78 * elfxx-mips.h (_bfd_mips_elf_special_sections): New.
79 (elf_backend_special_sections): Defined.
80
81 * elfxx-target.h (elf_backend_special_sections): New. Default
82 to NULL.
83 (elfNN_bed): Initialize special_sections.
84
85 * section.c (bfd_abs_section): Remove const.
86 (bfd_und_section): Likewise.
87 (bfd_com_section): Likewise.
88 (bfd_ind_section): Likewise.
89
20650579
NC
902003-07-24 Nick Clifton <nickc@redhat.com>
91
92 * coff-arm.c (EXTRA_S_FLAGS): Include SEC_CODE so that code
93 sections are assigned the LOAD attribute.
94
09fd220b
KK
952003-07-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
96
97 * elf32-sh.c: Convert to C90. Replace PTR with void *.
98 * elf32-sh64-com.c: Likewise.
99 * elf32-sh64.c: Likewise.
100 * elf32-sh64.h: Likewise.
101 * elf64-sh64.c: Likewise.
102
3d85aebe
KK
1032003-07-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
104
105 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
106 (allocate_dynrelocs): Likewise.
107 (sh_elf_relocate_section): Likewise. Use SYMBOL_REFERENCES_LOCAL.
108 (sh_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
109
834d807b
NC
1102003-07-24 Nick Clifton <nickc@redhat.com>
111
112 * po/fr.po: Updated French translation.
113
571b5725
BW
1142003-07-23 Bob Wilson <bob.wilson@acm.org>
115
116 * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Make inline and move
117 near the beginning of the file. Swap order of arguments. Call
118 _bfd_elf_dynamic_symbol_p with "ignore_protected" set to 0.
119 (elf_xtensa_fix_refcounts): Adjust xtensa_elf_dynamic_symbol_p call.
120 (elf_xtensa_relocate_section): Likewise.
121 (shrink_dynamic_reloc_sections): Likewise.
122
b536dc1e
BW
1232003-07-23 Bob Wilson <bob.wilson@acm.org>
124
125 * elf32-xtensa.c (plt_reloc_count): Fix typo in comment.
126 (elf_xtensa_size_dynamic_sections): Use elf_discarded_section.
127 (elf_xtensa_combine_prop_entries): Avoid returning non-zero without
128 first printing an error message.
129 (elf_xtensa_finish_dynamic_sections): Likewise.
130 (elf_xtensa_discard_info_for_section): Adjust size of .got.loc when
131 discarding literal table entries.
132 (elf_xtensa_merge_private_bfd_data): Remove newline from error message.
133 (elf_xtensa_do_asm_simplify): Likewise.
134
7f888330
SC
1352003-07-23 Stephane Carrez <stcarrez@nerim.fr>
136
137 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Avoid crash when
138 we have a local symbol in common section.
139
ecc27c31
L
1402003-07-22 H.J. Lu <hongjiu.lu@intel.com>
141
142 * elflink.c (_bfd_elf_dynamic_symbol_p): Don't return TRUE for
143 weak symbols.
144
f9f3cf65
NC
1452003-07-22 Nick Clifton <nickc@redhat.com>
146
147 * coffcode.h (coff_slurp_symbol_table): Add C_TCSYM and C_ECOML to
148 expected RS6000 storage classes.
149
bb32e54f
L
1502003-07-21 H.J. Lu <hongjiu.lu@intel.com>
151
152 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Mark
153 output_bfd unused to silence gcc.
154
796f2a93
NC
1552003-07-21 Nick Clifton <nickc@redhat.com>
156
157 * po/sv.po: Updated Swedish translation.
158
f6c52c13
AM
1592003-07-21 Alan Modra <amodra@bigpond.net.au>
160
161 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Use..
162 (_bfd_elf_symbol_refs_local_p): ..this. Declare.
163 * elflink.c (_bfd_elf_symbol_refs_local_p): New function.
164 * elf32-i386.c (elf_i386_relocate_section): Remove h NULL test
165 now done in _bfd_elf_symbol_refs_local_p.
166 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
167 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
168 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
169
aa37626c
L
1702003-07-18 H.J. Lu <hongjiu.lu@intel.com>
171
172 * elflink.c (_bfd_elf_dynamic_symbol_p): Undo the last change.
173
1e364ec9
L
1742003-07-18 H.J. Lu <hongjiu.lu@intel.com>
175
176 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL): Fix a typo.
177 (SYMBOL_CALLS_LOCAL): Likewise.
178
179 * elflink.c (_bfd_elf_dynamic_symbol_p): Return TRUE
180 immediately if symbol isn't defined locally.
181
986a241f
RH
1822003-07-18 Richard Henderson <rth@redhat.com>
183
184 * elflink.c (_bfd_elf_dynamic_symbol_p): New.
185 * elf-bfd.h (_bfd_elf_dynamic_symbol_p): Declare it.
186 (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Use it.
187 * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Likewise.
188 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
189 * elf64-hppa.c (elf64_hppa_dynamic_symbol_p): Likewise.
190 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Likewise.
191 Update all callers to provide the relocation being resolved.
192
ac4b3dd8
NC
1932003-07-17 Shaun Jackman <sjackman@pathwayconnect.com>
194
195 * config.bfd (arm-wince-pe): Add -DARM_COFF_BUGFIX to
196 targ_cflags.
197
6c37ac4d
NC
1982003-07-17 Nick Clifton <nickc@redhat.com>
199
200 * po/es.po: New Spanish translation.
201 * po/sv.po: New Swedish translation.
202 * po/opcodes.pot: Regenerate.
203
02e6ad56
RH
2042003-07-16 Richard Henderson <rth@redhat.com>
205
206 * config.bfd, configure.host, configure.in: Remove ia64-aix support.
207 * elfxx-ia64.c, targets.c: Likewise.
208
5686517c
RH
2092003-07-16 Richard Henderson <rth@redhat.com>
210
211 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Properly return false
212 for symbols defined locally plus -Bsymbolic. Tidy logic.
213
5a7ea749
RS
2142003-07-15 Richard Sandiford <rsandifo@redhat.com>
215
216 * archures.c (bfd_mach_mips7000): New.
217 * bfd-in2.h: Regenerated.
218 * cpu-mips.c (arch_info_struct): Add an entry for mips:7000.
219 * elfxx-mips.c (mips_set_isa_flags): Handle bfd_mach_mips7000.
220 (mips_mach_extensions): Add an entry for it.
221
76bff705
NC
2222003-07-14 Nick Clifton <nickc@redhat.com>
223
224 * po/tr.po: Update with latest version.
225 * po/SRC-POTFILES.in: Regenerate.
226 * po/bfd.pot: Regenerate.
227 * Makfile.in: Regenerate.
228 * configure: Regenerate.
229
d0facd1b
NC
2302003-07-12 Jeff Baker <jbaker@qnx.com>
231
232 * bfd/config.bfd (__QNXTARGET__): Define for Neutrino architectures.
233 * bfd/elf32-arm.h (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
234 * bfd/elf32-sh.c (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
235 * bfd/elf32-ppc.c (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
236
bcb9b88d
NC
2372003-07-12 Jeff Muizelaar <muizelaar@rogers.com>
238
239 * coffcode.h (coff_set_section_contents): Set the
240 IMAGE_FILE_32BIT_MACHINE flag for PE targets.
241
7a9823f1
RS
2422003-07-11 Richard Sandiford <rsandifo@redhat.com>
243
244 * bfd-in.h (bfd_h8300_pad_address): Declare.
245 * bfd-in2.h: Regenerate.
246 * cpu-h8300.c (bfd_h8300_pad_address): New function.
247 * coff-h8300.c (h8300_reloc16_estimate): Use it to canonicalize
248 addresses before checking whether they can be relaxed.
249 (h8300_reloc16_extra_cases): Likewise for the R_MOVL2 sanity check.
250 Don't complain about overflows in general 8-bit relocations.
251 * elf32-h8300.c (elf32_h8_relax_section): Use bfd_h8300_pad_address.
252 Fix handling of R_H8_DIR24A8.
253
c6baf75e
RS
2542003-07-11 Richard Sandiford <rsandifo@redhat.com>
255
256 * elf32-h8300.c: Convert function prototypes and definitions
257 to C90 syntax.
258 * coff-h8300.c: Likewise.
259 * cpu-h8300.c: Likewise.
260
fce00800
AM
2612003-07-11 Alan Modra <amodra@bigpond.net.au>
262
263 * po/SRC-POTFILES.in: Regenerate.
264 * po/bfd.pot: Likewise.
265
e901de89
BW
2662003-07-10 Bob Wilson <bob.wilson@acm.org>
267
268 * elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Create new
269 .got.loc section. Do not set SEC_ALLOC or SEC_LOAD flags for the
270 .xt.lit.plt section.
271 (elf_xtensa_size_dynamic_sections): Set size of the .got.loc section
272 and allocate memory for it.
273 (elf_xtensa_combine_prop_entries): Copy contents of .xt.lit output
274 section to the .got.loc section.
275 (elf_xtensa_finish_dynamic_sections): Fix up call to
276 elf_xtensa_combine_prop_entries and set DT_XTENSA_GOT_LOC_OFF to
277 the address of .got.loc.
278 (relax_property_section): Shrink .got.loc to match changes in any
279 literal table section.
280 (xtensa_is_property_section): Change to match
281 xtensa_get_property_section_name.
282 (xtensa_is_littable_section): New.
283
eff26f78
L
2842003-07-10 H.J. Lu <hongjiu.lu@intel.com>
285
286 * elfxx-ia64.c (IA64_HOWTO): Set dst_mask to -1 instead of
287 -1LL.
288
942e0f42
AM
2892003-07-10 Alan Modra <amodra@bigpond.net.au>
290
291 * Makefile.am (BFD32_BACKENDS): Add elf32-am33lin.lo.
292 (BFD32_BACKENDS_CFILES): elf32-am33lin.c not elf32-am33lin.lo.
293 Run "make dep-am".
294 * Makefile.in: Regenerate.
295
73c3cd1c
AO
2962003-07-10 Alexandre Oliva <aoliva@redhat.com>
297
298 2001-09-12 Alexandre Oliva <aoliva@redhat.com>
299 * elf32-am33lin.c (ELF_MACHINE_CODE): Redefine to EM_MN10300.
300 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10300.
301 2001-06-02 Nick Clifton <nickc@cambridge.redhat.com>
302 * elf32-am33lin.c: Rename global functions.
303 2001-05-09 Alexandre Oliva <aoliva@redhat.com>
304 * config.bfd (am33_2.0, am33_2.0-*-linux*): Added.
305 * configure.in (bfd_elf32_am33lin_vec): Added.
306 * Makefile.am (BFD32_BACKENDS): Added elf32-am33lin.lo.
307 (elf32-am33lin.lo): List dependencies.
308 * aclocal.m4, configure, Makefile.in: Rebuilt.
309 * elf-m10300.c (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME,
310 ELF_ARCH, ELF_MACHINE_CODE, ELF_MAXPAGESIZE): Define only if
311 ELF_ARCH was not defined before.
312 (elf_symbol_leading_char): Define if not defined.
313 * elf32-am33lin.c: Override the definitions above.
314 * targets.c (bfd_elf32_am33lin_vec): New.
315
03a12831
AO
3162003-07-09 Alexandre Oliva <aoliva@redhat.com>
317
318 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
319 * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Initialize
320 pcrel_relocs_copied.
321 2001-12-13 Alexandre Oliva <aoliva@redhat.com>
322 * elf-m10300.c (ELF_DYNAMIC_INTERPRETER): Renamed from
323 ld-linux.so.2 to ld.so.1.
324 2001-10-10 Alexandre Oliva <aoliva@redhat.com>
325 * elf-m10300.c (elf_mn10300_sizeof_plt0): New macro.
326 (_bfd_mn10300_elf_adjust_dynamic_symbol): Use it.
327 (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
328 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Allocate
329 .rela.* section contents with bfd_zalloc.
330 2001-09-25 Alexandre Oliva <aoliva@redhat.com>
331 * elf-m10300.c: Added declarations for functions missing them.
332 Merge some shared-library changes from the i386 back-end. Use
333 R_MN10300_RELATIVE instead of R_MN10300_PCREL32 and
334 R_MN10300_GLOB_DAT instead of R_MN10300_32 where appropriate.
335 (struct elf32_mn10300_link_hash_entry): Remove duplicates of
336 members of elf_link_hash_entry. Adjusted references.
337 (mn10300_elf_final_link_relocate): dynobj was already loaded
338 into a local variable, use it.
339 2001-09-21 Nick Clifton <nickc@cambridge.redhat.com>
340 * elf-m10300.c: Add missing function prototypes.
341 2001-08-24 Alexandre Oliva <aoliva@redhat.com>
342 * elf-m10300.c (mn10300_elf_relocate_section): Don't compute
343 relocation for dynamic relocations.
344 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
345 * reloc.c (BFD_RELOC_MN10300_GOTOFF24): New.
346 * elf-m10300.c: Introduce GOTPC16, GOTOFF24, GOTOFF16 and
347 PLT16, and rename GOTPC to GOTPC32 and GOTOFF to GOTOFF32.
348 (_bfd_mn10300_elf_create_dynamic_sections): Move creation ot PLT...
349 (_bfd_mn10300_elf_create_got_section): ... here, so that its
350 adress is already known at the time we compute relaxations.
351 (mn10300_elf_relax_section): Relax GOTPC32, GOTOFF32, GOT32
352 and PLT32 to narrower relocations.
353 * libbfd.h, bfd-in2.h: Rebuilt.
354 2001-04-12 Alexandre Oliva <aoliva@redhat.com>
355 * reloc.c (BFD_RELOC_MN10300_GOT32, BFD_RELOC_MN10300_GOT24,
356 BFD_RELOC_MN10300_GOT16, BFD_RELOC_MN10300_COPY,
357 BFD_RELOC_MN10300_GLOB_DAT, BFD_RELOC_MN10300_JMP_SLOT,
358 BFD_RELOC_MN10300_RELATIVE): New relocs.
359 * libbfd.h, bfd-in2.h: Rebuilt.
360 * elf-m10300.c (struct elf_mn10300_pcrel_relocs_copied): New.
361 (struct elf32_mn10300_link_hash_entry): Added DSO-related
362 fields.
363 (elf_mn10300_howto): Defined new relocation types.
364 (mn10300_reloc_map): Map them.
365 (_bfd_mn10300_elf_create_got_section): New fn.
366 (mn10300_elf_check_relocs): Handle PIC relocs.
367 (mn10300_elf_final_link_relocate): Likewise.
368 (mn10300_elf_relocate_section): Handle DSOs.
369 (PLT0_ENTRY_SIZE, PLT_ENTRY_SIZE, PIC_PLT_ENTRY_SIZE): New macros.
370 (elf_mn10300_plt0_entry, elf_mn10300_plt_entry,
371 elf_mn10300_pic_plt_entry): New.
372 (elf_mn10300_sizeof_plt, elf_mn10300_plt_plt0_offset,
373 elf_mn10300_plt0_linker_offset, elf_mn10300_plt0_gotid_offset,
374 elf_mn10300_plt_temp_offset, elf_mn10300_plt_symbol_offset,
375 elf_mn10300_plt_reloc_offset: New macros.
376 (ELF_DYNAMIC_INTERPRETER): Likewise.
377 (_bfd_mn10300_elf_create_dynamic_sections): New function.
378 (_bfd_mn10300_elf_adjust_dynamic_symbol): Likewise.
379 (_bfd_mn10300_elf_discard_copies): Likewise.
380 (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
381 (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
382 (_bfd_mn10300_elf_finish_dynamic_sections): Likewise.
383 (elf_backend_can_gc_sections,
384 elf_backend_create_dynamic_sections,
385 elf_backend_adjust_dynamic_sections,
386 elf_backend_size_dynamic_sections,
387 elf_backend_finish_dynamic_symbol,
388 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
389 elf_backend_plt_readonly, elf_backend_want_plt_sym,
390 elf_backend_got_header_size, elf_backend_plt_header_size): New
391 macros.
392
b08fa4d3
AO
3932003-07-09 Alexandre Oliva <aoliva@redhat.com>
394
395 2001-05-06 Alexandre Oliva <aoliva@redhat.com>
396 * elf-m10300.c (compute_function_info): Account for AM33
397 registers in `movm' when computing stack space for `call' when
398 linking for AM33/2.0 link.
399 2000-04-01 Alexandre Oliva <aoliva@cygnus.com>
400 * archures.c (bfd_mach_am33_2): Renamed from bfd_mach_am332.
401 * bfd-in2.h: Rebuilt.
402 * cpu-m10300.c (bfd_am33_2_arch): Renamed from bfd_am332_arch.
403 * elf-m10300.c: Updated.
404 2000-03-31 Alexandre Oliva <aoliva@cygnus.com>
405 * archures.c (bfd_mach_am332): Defined.
406 * bfd-in2.h: Rebuilt.
407 * cpu-m10300.c (bfd_am332_arch): Defined.
408 (bfd_am33_arch): Chained with am33-2.
409 * elf-m10300.c (elf_mn10300_mach): Handle am332.
410 (_bfd_mn10300_elf_final_write_processing): Likewise.
411
201933ea
L
4122003-07-09 H.J. Lu <hongjiu.lu@intel.com>
413
414 * elfxx-ia64.c (IA64_HOWTO): Set dst_mask to -1LL.
415
e717da7e
AM
4162003-07-10 Alan Modra <amodra@bigpond.net.au>
417
418 * elf64-ppc.c (bfd_elf64_mkobject): Define.
419 (struct ppc64_elf_obj_tdata): New.
420 (ppc64_elf_tdata, ppc64_tlsld_got): Define.
421 (ppc64_elf_mkobject): New function.
422 (struct got_entry): Add "owner". Move "tls_type".
423 (struct ppc_link_hash_table): Delete "relgot", "tlsld_got".
424 (ppc64_elf_init_stub_bfd): New function.
425 (create_got_section): Create header .got in dynobj. Create .got
426 and .rela.got in each bfd. Stash pointers in ppc64_elf_obj_tdata.
427 (ppc64_elf_create_dynamic_sections): Don't call create_got_section.
428 Look for dynobj .got, and test it.
429 (ppc64_elf_copy_indirect_symbol): Adjust for changed got.
430 (update_local_sym_info): Likewise.
431 (ppc64_elf_check_relocs): Likewise.
432 (ppc64_elf_gc_sweep_hook): Likewise.
433 (ppc64_elf_tls_optimize): Likewise.
434 (allocate_dynrelocs): Likewise.
435 (ppc64_elf_size_dynamic_sections): Likewise.
436 (ppc64_elf_relocate_section): Likewise.
437 (ppc64_elf_next_toc_section): Update comment.
438 (toc_adjusting_stub_needed): Remove unneeded cast.
439 (ppc64_elf_build_stubs): Check for stub sections in stub bfd by
440 testing section flags.
441 (ppc64_elf_build_stubs): Likewise.
442 (ppc64_elf_size_stubs): Likewise. Remove stub_bfd param.
443 (ppc64_elf_finish_dynamic_sections): Write out got sections.
444 (func_desc_adjust): Copy over dynamic info for undef weaks.
445 * elf64-ppc.h (ppc64_elf_init_stub_bfd): Declare.
446 (ppc64_elf_size_stubs): Update prototype.
447 * elflink.h (elf_link_sort_relocs): Use link_orders to find reldyn
448 input sections rather than scanning dynobj.
449
18ad015f
RS
4502003-07-09 Richard Sandiford <rsandifo@redhat.com>
451
452 * elfxx-mips.c (mips_elf_link_hash_entry): Remove min_dyn_reloc_index.
453 (bfd_mips_elf_swap_msym_in, bfd_mips_elf_swap_msym_out): Delete.
454 (mips_elf_create_msym_section): Delete.
455 (mips_elf_create_dynamic_relocation): Don't set min_dyn_reloc_index.
456 (_bfd_mips_elf_copy_indirect_symbol): Likewise.
457 (_bfd_mips_elf_create_dynamic_sections): Don't create .msym.
458 (_bfd_mips_elf_size_dynamic_sections): Don't calculate its size.
459 (_bfd_mips_elf_size_dynamic_sections): Don't add DT_MIPS_MSYM.
460 (_bfd_mips_elf_finish_dynamic_symbol): Don't add symbols to .msym.
461 (_bfd_mips_elf_finish_dynamic_sections): Likewise.
462
e10609d3
RS
4632003-07-09 Richard Sandiford <rsandifo@redhat.com>
464
465 * elfxx-mips.c (mips_elf_irix6_finish_dynamic_symbol): Make the
466 symbols protected.
467
0d591ff7
RS
4682003-07-09 Richard Sandiford <rsandifo@redhat.com>
469
470 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Fix handling
471 of relocations whose offset is -2.
472
fdd07405
RS
4732003-07-09 Richard Sandiford <rsandifo@redhat.com>
474
475 * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): Treat
476 forced-local symbols like other locals. Don't create relocations
477 against STN_UNDEF in irix objects.
478
d2fba50d
RS
4792003-07-09 Richard Sandiford <rsandifo@redhat.com>
480
481 * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): In SGI-
482 compatible objects, add the values of defined external symbols
483 to the addend.
484
6eaa6adc
RS
4852003-07-09 Richard Sandiford <rsandifo@redhat.com>
486
487 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Always
488 initialize a GOT entry to the symbol's st_value.
489
0c83546a
AM
4902003-07-08 Alan Modra <amodra@bigpond.net.au>
491
43c40ab2
AM
492 * elf-bfd.h (struct elf_obj_tdata): Move linker_section_pointers..
493 * elf32-ppc.c (struct ppc_elf_obj_tdata): ..to here. New.
494 (ppc_elf_tdata): Define.
495 (elf_local_ptr_offsets): Adjust.
496 (ppc_elf_mkobject): New function.
497 (bfd_elf32_mkobject): Define.
498
0c83546a
AM
499 * elfcode.h (elf_object_p): Allocate tdata via _bfd_set_format.
500 * elfcore.h (elf_core_file_p): Likewise.
501 * section.c (bfd_section_init): Remove prototype.
502
58111eb7
AM
5032003-07-08 Alan Modra <amodra@bigpond.net.au>
504
505 * elf-bfd.h (struct elf_link_hash_entry): Remove linker_section_pointer
506 field.
507 (enum elf_linker_section_enum): Delete.
508 (struct elf_linker_section): Delete.
509 (struct elf_linker_section_pointers): Delete.
510 (struct elf_obj_tdata): Remove #if 0 chunk. Remove linker_section.
511 Make linker_section_pointers a void**.
512 (elf_local_ptr_offsets, elf_linker_section): Don't define.
513 * elf32-ppc.c (enum elf_linker_section_enum): New, cut-down version
514 of old item in elf-bfd.h.
515 (struct elf_linker_section): Likewise.
516 (struct elf_linker_section_pointers): Likewise.
517 (elf_local_ptr_offsets): Define.
518 (struct ppc_elf_link_hash_entry): Add linker_section_pointer.
519 (ppc_elf_link_hash_newfunc): Init it.
520 (struct ppc_elf_link_hash_table): Add sbss.
521 (ppc_elf_link_hash_table_create): zmalloc rather than clearing
522 individual fields.
523 (elf_create_linker_section): Fold into..
524 (ppc_elf_create_linker_section): ..here. Remove hole_size code.
525 Make rela section here if shared.
526 (elf_find_pointer_linker_section): Pass lsect rather than enum.
527 (elf_create_pointer_linker_section): Adjust. zalloc rather than
528 clearing in a loop.
529 (elf_finish_pointer_linker_section): Adjust. Don't make rela
530 section here.
531 (ppc_elf_check_relocs): Adjust.
532 (ppc_elf_add_symbol_hook): Tighten hash creator test. Remove code
533 creating .sbss by hand.
534 * elf.c (_bfd_elf_link_hash_newfunc): Adjust.
535
15f8604d
JJ
5362003-07-04 Jakub Jelinek <jakub@redhat.com>
537
538 * elf32-s390.c (elf_howto_table): Change R_390_GOT12 to
539 complain_overflow_bitfield.
540 * elf64-s390.c (elf_howto_table): Change R_390_GOT12 to
541 complain_overflow_bitfield.
542
3368a7fb
JJ
5432003-07-04 Jakub Jelinek <jakub@redhat.com>
544
545 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Return
546 true even if -pie.
547
9203ba99
JJ
5482003-07-04 Jakub Jelinek <jakub@redhat.com>
549
550 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add rel_fptr_sec.
551 (elfNN_ia64_dynamic_symbol_p): Change info->shared into
552 !info->executable.
553 (get_fptr): For -pie create .opd as writable section and create
554 .rela.opd as well.
555 (elfNN_ia64_check_relocs): Change info->shared into
556 !info->executable.
557 (allocate_fptr): Likewise.
558 (allocate_dynrel_entries): Account for a relative reloc for -pie
559 @fptr(). Don't account for a relative reloc if -pie want_ltoff_fptr
560 for undefweak symbol. Account for an IPLT reloc in .rela.opd
561 section if -pie.
562 (set_got_entry): Don't create a relative reloc if -pie
563 want_ltoff_fptr for undefweak symbol.
564 (set_fptr_entry): Emit an IPLT reloc in .rela.opd for -pie.
565 (elfNN_ia64_relocate_section): Emit a relative reloc for -pie
566 @fptr().
567
568 * elfxx-ia64.c (elfNN_ia64_relocate_section): Issue undefined_symbol
569 even if -pie.
570 * elf32-i386.c (elf_i386_relocate_section): Likewise.
571 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
572 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
573 * elf64-s390.c (elf_s390_relocate_section): Likewise.
574 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
575 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
576 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
577 * elf32-s390.c (elf_s390_relocate_section): Likewise.
578 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
579
e0a868d1 5802003-07-04 Paul Clarke <paulc@senet.com.au>
8c17da6e
NC
581
582 * elf32-h8300.c (R_H8_DIR32A16): Fix name field.
583 (elf32_h8_relax_section) <R_H8_DIR16A8>: Adjust position of relocation.
584 <R_H8_DIR32A16>: Fix type of relocation.
585
35cad4c4
KK
5862003-07-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
587
588 * elf32-sh.c (sh_elf_create_dynamic_sections): Return if dynamic
589 sections were created already. Remove unnecessary tests of
590 the previous change.
591
03151a5a
KK
5922003-07-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
593
594 * elf32-sh.c (sh_elf_create_dynamic_sections): Don't call
595 bfd_make_section for existing sections.
596
003d627e
AM
5972003-07-04 Alan Modra <amodra@bigpond.net.au>
598
2293c499
AM
599 * elf32-sparc.c (elf32_sparc_check_relocs): Don't call
600 create_got_section if we already have done so.
601 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
602 (sh_elf_check_relocs): Likewise.
603 (sh_elf_adjust_dynamic_symbol): Delete "dynobj" var. Use
604 htab->root.dynobj instead.
605 (sh_elf_check_relocs): Likewise.
606 (sh_elf_finish_dynamic_sections): Likewise.
607
003d627e
AM
608 * section.c (bfd_make_section): Return NULL for existing section.
609
fa681e5d
AM
6102003-07-04 Alan Modra <amodra@bigpond.net.au>
611
612 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Don't call
613 ppc_elf_create_got if we've already done so.
3dab13f6
AM
614
615 * elf-bfd.h (_bfd_elf_create_linker_section) Don't declare.
616 (_bfd_elf_find_pointer_linker_section): Likewise.
617 (bfd_elf32_create_pointer_linker_section): Likewise.
618 (bfd_elf32_finish_pointer_linker_section): Likewise.
619 (bfd_elf64_create_pointer_linker_section): Likewise.
620 (bfd_elf64_finish_pointer_linker_section): Likewise.
621 (_bfd_elf_make_linker_section_rela): Likewise.
622 * elfcode.h (elf_create_pointer_linker_section): Don't define.
623 (elf_finish_pointer_linker_section): Likewise.
624 * elflink.c (_bfd_elf_make_linker_section_rela): Delete.
625 (_bfd_elf_create_linker_section): Move this function..
626 (_bfd_elf_find_pointer_linker_section): ..and this..
627 * elflink.h (elf_create_pointer_linker_section): ..and this..
628 (elf_finish_pointer_linker_section): ..and this..
629 * elf32-ppc.c: ..to here, renaming to the following, and adjusting
630 calls.
631 (elf_create_linker_section): Convert to C90, tidy.
632 (elf_find_pointer_linker_section): Likewise.
633 (elf_create_pointer_linker_section): Likewise.
634 (elf_finish_pointer_linker_section): Likewise.
635 * elf32-i370.c: Delete #if 0 code.
636
772119ce
AM
6372003-07-02 Alan Modra <amodra@bigpond.net.au>
638
639 * elf64-ppc.c (ppc64_elf_func_desc_adjust): Don't allow _savef* and
640 _restf* to be satisfied by shared libs, and always force them local.
641 (toc_adjusting_stub_needed): Avoid scanning linker created sections.
642 Correct test for "bl".
643 (ppc64_elf_relocate_section <R_PPC64_TLS>): Correct test for
644 primary opcode 31.
645
bd1ea41b
MS
6462003-07-01 Martin Schwidefsky <schwidefsky@de.ibm.com>
647
648 * elf32-s390.c (s390_elf_ldisp_reloc): New prototype.
649 (s390_tls_reloc): New function.
650 (elf_howto_table): Add long displacement relocations R_390_20,
651 R_390_GOT20, R_390_GOTPLT20 and R_390_TLS_GOTIE20.
652 (elf_s390_reloc_type_lookup): Likewise.
653 (elf_s390_check_relocs): Likewise.
654 (elf_s390_gc_sweep_hook): Likewise.
655 (elf_s390_relocate_section): Likewise.
656 * elf64-s390.c: Same changes as for elf32-s390.c.
657 * reloc.c: Add long displacement relocations BFD_RELOC_390_20,
43c40ab2 658 BFD_RELOC_390_GOT20, BFD_RELOC_390_GOTPLT20 and
bd1ea41b
MS
659 BFD_RELOC_390_TLS_GOTIE20.
660 * bfd-in2.h: Regenerate.
661 * libbfd.h: Likewise.
662
113202d6
AM
6632003-06-30 Alan Modra <amodra@bigpond.net.au>
664
665 * cpu-ia64-opc.c (ext_imms_scaled): Don't sign extend using shifts.
666 (ins_imms, ins_immsm1u4): Likewise. Warning fix.
667
c58b9523
AM
6682003-06-29 Alan Modra <amodra@bigpond.net.au>
669
670 * archive.c: Convert to C90, remove unnecessary prototypes and casts.
671 Replace PTR with void *. Formatting.
672 * archive64.c: Likewise.
673 * archures.c: Likewise.
674 * bfd-in.h: Likewise.
675 * bfd.c: Likewise.
676 * bfdio.c: Likewise.
677 * bfdwin.c: Likewise.
678 * cache.c: Likewise.
679 * corefile.c: Likewise.
680 * format.c: Likewise.
681 * init.c: Likewise.
682 * libbfd-in.h: Likewise.
683 * libbfd.c: Likewise.
684 * linker.c: Likewise.
685 * opncls.c: Likewise.
686 * reloc.c: Likewise.
687 * section.c: Likewise.
688 * simple.c: Likewise.
689 * syms.c: Likewise.
690 * targets.c: Likewise.
691 * bfd-in2.h: Regenerate.
692 * libbfd.h: Regenerate.
693
694 * ecoff.c (bfd_debug_section): Add missing kept_section initialization.
695 * libbfd-in.h (_bfd_sh_align_load_span): Don't declare if defined.
696 * libbfd.c (COERCE32, EIGHT_GAZILLION): Simplify.
697 (bfd_getb64): Rewrite without parens.
698 (bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
699 * cache.c (insert, snip): Remove INLINE.
700 * linker.c (bfd_link_add_undef): Likewise.
701
27482721
AJ
7022003-06-29 Andreas Jaeger <aj@suse.de>
703
704 * elf64-x86-64.c: Convert to ISO C90 prototypes, remove
705 unnecessary prototypes. Replace PTR with void *.
58611256
AJ
706 (elf64_x86_64_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL to
707 trim plt entries. Move undefweak non-default visibility test ...
708 (allocate_dynrelocs): ... from here.
709 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
710 Change all callers.
711 (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL. Use
712 SYMBOL_REFERENCES_LOCAL for dynreloc check.
713 (elf64_x86_64_relocate_section): Use SYMBOL_CALLS_LOCAL for
714 dynreloc and .got relocs.
715 (elf64_x86_64_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL
716 for .got relocs.
27482721 717
2b86c02e
TS
7182003-06-29 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
719
720 * elfxx-mips.c: Allow lazy binding for R_MIPS_JALR.
721
e7c81c25
NC
7222003-06-27 Nick Clifton <nickc@redhat.com>
723
724 * opncls.c (bfd_add_gnu_debuglink_section): Rename to
725 bfd_add_gnu_debuglink_section and only create the section, do not
726 fill in its contents.
727 (bfd_fill_in_gnu_debuglink_section): New function. Fill in the
728 contents of a .gnu-debuglink section.
729 * bfd-in2.h: Regenerate.
730
72b4917c
TS
7312003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
732
733 * elfxx-mips.c: Revert .got alignment to 2**4.
734
91709090
TS
7352003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
736
737 * elf32-mips.c: Fix addend for _gp_disp special symbol.
738
7a79a000
TS
7392003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
740
741 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Remove non-default
742 relocation header setup.
743
e47cd125
AM
7442003-06-25 Alan Modra <amodra@bigpond.net.au>
745
746 * elf32-ppc.c (ppc_elf_howto_table): Remove unnecessary cast.
747 (ppc_elf_reloc_type_lookup): Modify comment.
748 (ppc_elf_info_to_howto): Ditto.
749 (ppc_elf_relocate_section): Ditto.
750 (ppc_elf_check_relocs): Call ppc_elf_howto_init.
751
1049f94e
AM
7522003-06-25 Alan Modra <amodra@bigpond.net.au>
753
754 * aout-ns32k.c: Correct spelling of "relocatable".
755 * aoutx.h: Likewise.
756 * bfd-in.h: Likewise.
757 * bfd.c: Likewise.
758 * bout.c: Likewise.
759 * coff-a29k.c: Likewise.
760 * coff-alpha.c: Likewise.
761 * coff-arm.c: Likewise.
762 * coff-i386.c: Likewise.
763 * coff-i860.c: Likewise.
764 * coff-i960.c: Likewise.
765 * coff-m68k.c: Likewise.
766 * coff-m88k.c: Likewise.
767 * coff-mcore.c: Likewise.
768 * coff-mips.c: Likewise.
769 * coff-or32.c: Likewise.
770 * coff-ppc.c: Likewise.
771 * coff-rs6000.c: Likewise.
772 * coff-sh.c: Likewise.
773 * coff-tic80.c: Likewise.
774 * coff64-rs6000.c: Likewise.
775 * cofflink.c: Likewise.
776 * cpu-ns32k.c: Likewise.
777 * ecoff.c: Likewise.
778 * ecofflink.c: Likewise.
779 * elf-bfd.h: Likewise.
780 * elf-eh-frame.c: Likewise.
781 * elf-hppa.h: Likewise.
782 * elf-m10200.c: Likewise.
783 * elf-m10300.c: Likewise.
784 * elf.c: Likewise.
785 * elf32-arm.h: Likewise.
786 * elf32-avr.c: Likewise.
787 * elf32-cris.c: Likewise.
788 * elf32-d10v.c: Likewise.
789 * elf32-dlx.c: Likewise.
790 * elf32-fr30.c: Likewise.
791 * elf32-frv.c: Likewise.
792 * elf32-h8300.c: Likewise.
793 * elf32-hppa.c: Likewise.
794 * elf32-i370.c: Likewise.
795 * elf32-i386.c: Likewise.
796 * elf32-i860.c: Likewise.
797 * elf32-i960.c: Likewise.
798 * elf32-ip2k.c: Likewise.
799 * elf32-iq2000.c: Likewise.
800 * elf32-m32r.c: Likewise.
801 * elf32-m68hc11.c: Likewise.
802 * elf32-m68hc1x.c: Likewise.
803 * elf32-m68k.c: Likewise.
804 * elf32-mcore.c: Likewise.
805 * elf32-mips.c: Likewise.
806 * elf32-msp430.c: Likewise.
807 * elf32-openrisc.c: Likewise.
808 * elf32-ppc.c: Likewise.
809 * elf32-s390.c: Likewise.
810 * elf32-sh.c: Likewise.
811 * elf32-sh64.c: Likewise.
812 * elf32-sparc.c: Likewise.
813 * elf32-v850.c: Likewise.
814 * elf32-vax.c: Likewise.
815 * elf32-xstormy16.c: Likewise.
816 * elf32-xtensa.c: Likewise.
817 * elf64-alpha.c: Likewise.
818 * elf64-hppa.c: Likewise.
819 * elf64-mips.c: Likewise.
820 * elf64-mmix.c: Likewise.
821 * elf64-ppc.c: Likewise.
822 * elf64-s390.c: Likewise.
823 * elf64-sh64.c: Likewise.
824 * elf64-sparc.c: Likewise.
825 * elf64-x86-64.c: Likewise.
826 * elfcode.h: Likewise.
827 * elflink.h: Likewise.
828 * elfn32-mips.c: Likewise.
829 * elfxx-ia64.c: Likewise.
830 * elfxx-mips.c: Likewise.
831 * i386linux.c: Likewise.
832 * ieee.c: Likewise.
833 * libcoff-in.h: Likewise.
834 * linker.c: Likewise.
835 * m68klinux.c: Likewise.
836 * pdp11.c: Likewise.
837 * pe-mips.c: Likewise.
838 * peXXigen.c: Likewise.
839 * reloc.c: Likewise.
840 * reloc16.c: Likewise.
841 * sparclinux.c: Likewise.
842 * sunos.c: Likewise.
843 * syms.c: Likewise.
844 * versados.c: Likewise.
845 * vms.c: Likewise.
846 * xcofflink.c: Likewise.
847 * bfd-in2.h: Regenerate.
848 * libcoff.h: Regenerate.
849 * libbfd.h: Regenerate.
850
55fd94b0
AM
8512003-06-24 Alan Modra <amodra@bigpond.net.au>
852
d85f2c7d
AM
853 * elf32-ppc.c (ppc_elf_check_relocs): Report plt reloc against
854 local sym errors.
855
55fd94b0
AM
856 * elf32-i386.c: Convert to C90 function definitions, remove unnecessary
857 prototypes and casts. Replace PTR with void *. Formatting.
858 * elf32-ppc.c: Likewise. Break long strings too.
859 (ppc_elf_relax_section): Use enum elf_ppc_reloc_type for r_type.
860 (ppc_elf_unhandled_reloc): Internationalize error message.
861 * elf32-ppc.h: Remove PARAMS.
862
88810f8c
MM
8632003-06-23 Mark Mitchell <mark@codesourcery.com>
864
865 * elf32-ppc.c (ppc_elf_begin_write_processing): Use bytes to count
866 APUinfo slots.
867 (ppc_elf_final_write_processing): Likewise.
868
6e35c4da
L
8692003-06-23 H.J. Lu <hongjiu.lu@intel.com>
870
871 * elflink.h (elf_link_input_bfd): Check raw size when using
872 kept_section to preserve debug information discarded by
873 linkonce.
874
8f3bab57
AM
8752003-06-20 Alan Modra <amodra@bigpond.net.au>
876
877 * elf64-ppc.c (struct ppc_link_hash_table): Add top_id.
878 (ppc64_elf_setup_section_lists): Set it.
879 (ppc64_elf_relocate_section): Check sym section id against top_id.
880 (ppc_build_one_stub): Comment on top_id.
881
efbc813e
NC
8822003-06-20 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
883
884 * config.bfd: Add tic4x-*-rtems*.
885
4ce794b7
AM
8862003-06-20 Alan Modra <amodra@bigpond.net.au>
887
888 * elf64-ppc.c: Convert to C90 function definitions, remove unnecessary
889 prototypes and casts. Replace PTR with void *. Format copyright.
890 Mention ABI links.
891 (struct ppc_link_hash_table): Rename sgot, srelgot, splt, srelplt,
892 sdynbss, srelbss, sglink, sbrlt and srelbrlt to got, relgot .. relbrlt.
893 (ppc_type_of_stub): Make r_type an enum.
894 (ppc64_elf_size_stubs): Likewise.
895 * elf64-ppc.h: Remove PARAMS macro.
896
d2a300cf
AM
8972003-06-19 Alan Modra <amodra@bigpond.net.au>
898
3254fd24
AM
899 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Reinstate init of
900 elf hash tab fields.
901
d2a300cf
AM
902 * elf64-ppc.c (ppc64_elf_reloc_type_lookup): Tidy prototype.
903 (ppc64_elf_info_to_howto): Likewise.
904 (ppc64_elf_build_stubs): Add "stats" param, and print statistics.
905 * elf64-ppc.h (ppc64_elf_build_stubs): Adjust prototype.
906
83615de0
AM
9072003-06-19 Alan Modra <amodra@bigpond.net.au>
908
909 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore R_SPARC_DISP32
910 reloc overflow on discarded eh_frame entries.
911
9b5ecbd0
AM
9122003-06-19 Alan Modra <amodra@bigpond.net.au>
913
914 * elf64-ppc.c (toc_adjusting_stub_needed): New function.
915 (ppc64_elf_next_input_section): Use it here to set has_gp_reloc.
916 Return error condition.
917 (ppc64_elf_size_stubs): Restrict toc adjusting stubs to sections
918 that have has_gp_reloc set.
919 (struct ppc_link_hash_table): Add stub_count.
920 (ppc_build_one_stub): Increment it.
921 (ppc64_elf_link_hash_table_create): zmalloc rather than clearing
922 individual fields.
923 * elf64-ppc.h (ppc64_elf_next_input_section): Update prototype.
924
64c456e1
AM
9252003-06-18 Alan Modra <amodra@bigpond.net.au>
926
927 * elflink.h (elf_gc_record_vtentry): Revert last change. Correct
928 size calculation from addend. Round size up.
929
3dab95d3
HPN
9302003-06-18 Hans-Peter Nilsson <hp@axis.com>
931
932 * elf32-cris.c (cris_elf_relocate_section) <case
933 R_CRIS_32_GOTREL>: When linking a program, don't complain about a
934 symbol from a normal object or an undefined weak symbol.
935
0b13192e
AM
9362003-06-18 Alan Modra <amodra@bigpond.net.au>
937
938 * elf64-ppc.c (ppc64_elf_relocate_section): Accept a symbol on
939 R_PPC64_TOC relocs.
940
f97b9cb8
L
9412003-06-17 H.J. Lu <hongjiu.lu@intel.com>
942
943 * section.c (struct sec): Put back kept_section.
944 (STD_SECTION): Put back kept_section initialization.
945 * bfd-in2.h: Regenerate.
946
947 * elflink.h (elf_link_input_bfd): Also check discarded linkonce
948 sections for relocateable output. Use kept_section to preserve
949 debug information discarded by linkonce.
950
9f1c3a0a
L
9512003-06-17 Roland McGrath <roland@redhat.com>
952
953 * elfxx-ia64.c (elfNN_ia64_relocate_section): Support
954 segment-relative relocation between different segments.
955
734b6cf9
AM
9562003-06-17 Alan Modra <amodra@bigpond.net.au>
957
1cf1f670
AM
958 * elf64-ppc.c (ppc64_elf_relocate_section): Do unaligned reloc
959 optimizations earlier.
960
734b6cf9
AM
961 * elf64-ppc.c (struct ppc_link_hash_table): Reinstate top_index.
962 Restore previous input_list type.
963 (ppc64_elf_link_hash_table_create): Undo last change.
964 (ppc64_elf_setup_section_lists): Reinstate code setting up input lists
965 per output section, but don't bother with bfd_abs_section marker.
966 (ppc64_elf_next_input_section): Adjust for multiple input section
967 lists.
968 (group_sections): Likewise.
969
23fbd6fa
JJ
9702003-06-17 Jakub Jelinek <jakub@redhat.com>
971
972 * elf64-ppc.c (ppc64_elf_relocation_section): Ensure
973 *r_offset == r_addend for RELATIVE relocs against .got.
974
dad27d18
AM
9752003-06-17 Alan Modra <amodra@bigpond.net.au>
976
977 * elf64-ppc.c (ppc64_elf_relocate_section): Optimize unaligned relocs.
978
b613960a
NC
9792003-06-17 Nick Clifton <nickc@redhat.com>
980
981 * elflink.h (elf_gc_record_vtentry): Allocate an extra element
4ce794b7
AM
982 in the vtable_entries_used array to allow for the accessing
983 the largest element.
b613960a 984
000732f7
AM
9852003-06-17 Alan Modra <amodra@bigpond.net.au>
986
3d6f9012
AM
987 * elf64-ppc.c (struct ppc_link_hash_table): Remove top_index. Modify
988 input_list.
989 (ppc64_elf_link_hash_table_create): Init input_list here.
990 (ppc64_elf_setup_section_lists): Remove code setting up input lists
991 per output section. Set toc_off for abs and other standard sections.
992 (ppc64_elf_reinit_toc): Don't set elf_gp on input bfds lacking a toc.
993 (ppc64_elf_next_input_section): Adjust for single input section list.
994 Don't set toc_curr from input bfds that haven't set elf_gp.
995 (group_sections): Adjust for single input section list.
996
000732f7
AM
997 * elf64-ppc.c (ppc64_elf_relocate_section): Correct pcrel section zero.
998
81407a69
AM
9992003-06-16 Alan Modra <amodra@bigpond.net.au>
1000
1001 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing toctprel
1002 tls, check that a TOC16_DS or TOC16_LO_DS reloc isn't pointing to a
1003 dtprel entry. Ensure TLS_LD DTPMOD reloc has a zero addend. Write
1004 got section for RELATIVE relocs. Fix wrong comment. Change condition
1005 under which dynamic relocs update the section contents.
1006
a06a29f2
NC
10072003-06-13 Robert Millan <zeratul2@wanadoo.es>
1008
1009 * config.bfd: Add i386-netbsd-gnu target.
1010
7d1ebfb2
NC
10112003-06-12 Nick Clifton <nickc@redhat.com>
1012
1013 * opncls.c (calc_crc32): Rename to
1014 bfd_calc_gnu_debuglink_crc32 and export.
81407a69 1015 (GNU_DEBUGLINK): Define and use to replace occurrences of
7d1ebfb2 1016 hard-coded ".gnu_debuglink" in the code.
81407a69 1017 (get_debug_link_info): Prevent aborts by replacing call to
7d1ebfb2 1018 xmalloc with a call to malloc.
81407a69 1019 (find_separate_debug_file): Prevent aborts by replacing calls
7d1ebfb2 1020 to xmalloc and xstrdup with calls to malloc and strdup.
81407a69 1021 (bfd_add_gnu_debuglink): New function. Add a .gnu_debuglink
7d1ebfb2
NC
1022 section to a bfd.
1023 * bfd-in2.h: Regenerate.
1024
10252003-06-12 Federico G. Schwindt <fgsch@lodoss.net>
81407a69 1026
7d1ebfb2
NC
1027 * config.bfd (i[3-7]86-*-openbsd[0-2].* | i[3-7]86-*-openbsd3.[0-3]):
1028 New target (was i[3-7]86-*-openbsd* before).
1029 (i[3-7]86-*-openbsd*): Change to use bfd_elf32_i386_vec.
1030 (vax-*-openbsd*): New target.
1031
d80dcc6a
TS
10322003-06-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1033
1034 * elfxx-mips.c (MIPS_ELF_OPTIONS_SECTION_NAME): Use .MIPS.options
1035 for n32, too.
1036 (MIPS_ELF_STUB_SECTION_NAME): Use .MIPS.stubs for n32, too.
1037 (mips_elf_rel_dyn_section): Use appropriate section alignment.
1038 (mips_elf_create_got_section): Likewise.
1039 (_bfd_mips_elf_create_dynamic_sections): Likewise.
1040
a7ebbfdf
TS
10412003-06-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1042
1043 * elf32-mips.c (mips_elf_generic_reloc): New Function.
1044 (elf_mips_howto_table_rel): Use it.
1045 (gprel32_with_gp): Move prototype.
1046 (mips_elf_hi16_reloc): Check for ! BSF_LOCAL instead of zero addend.
1047 Use mips_elf_generic_reloc.
1048 (mips_elf_got16_reloc): Check for ! BSF_LOCAL instead of zero addend.
1049 Code cleanup.
1050 (_bfd_mips_elf32_gprel16_reloc): Check for ! BSF_LOCAL instead of
1051 zero addend.
1052 (mips_elf_gprel32_reloc): Likewise. Use the same GP assignment logic
1053 as in the other *_gprel*_reloc functions.
1054 (gprel32_with_gp): Handle partial_inplace properly.
1055 (mips32_64bit_reloc): Use mips_elf_generic_reloc.
1056 (mips16_gprel_reloc): Check for ! BSF_LOCAL instead of zero addend.
1057 Do addend handling directly instead of calling
1058 _bfd_mips_elf_gprel16_with_gp. Handle partial_inplace properly.
1059 * elf64-mips.c (mips_elf64_hi16_reloc): Check for ! BSF_LOCAL instead
1060 of zero addend. Handle partial_inplace properly.
1061 (mips_elf64_got16_reloc): Check for ! BSF_LOCAL instead of zero
1062 addend.
1063 (mips_elf64_gprel16_reloc): Likewise.
1064 (mips_elf64_literal_reloc): Likewise.
1065 (mips_elf64_gprel32_reloc): Likewise. Use the same GP assignment
1066 logic as in the other *_gprel*_reloc functions. Handle
1067 partial_inplace properly.
1068 (mips_elf64_shift6_reloc): Check for ! BSF_LOCAL instead of zero
1069 addend. Handle partial_inplace properly.
1070 (mips16_gprel_reloc): Likewise. Do addend handling directly instead
1071 of calling _bfd_mips_elf_gprel16_with_gp.
1072 * elfn32-mips.c (mips_elf_got16_reloc): Check for BSF_LOCAL.
1073 (mips_elf_gprel32_reloc): Check for ! BSF_LOCAL instead
1074 of zero addend.
1075 (mips_elf_shift6_reloc): Handle partial_inplace properly.
1076 (mips16_gprel_reloc): Likewise. Do addend handling directly instead
1077 of calling _bfd_mips_elf_gprel16_with_gp.
1078 * elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp): Handle
1079 partial_inplace properly. Fix wrong addend handling. Fix overflow
1080 check.
1081 (_bfd_mips_elf_sign_extend): Renamed from mips_elf_sign_extend and
1082 exported.
1083 (mips_elf_calculate_relocation): Use _bfd_mips_elf_sign_extend.
1084 (_bfd_mips_elf_relocate_section): Likewise.
1085 (mips_elf_create_dynamic_relocation): Update sec_info_type access.
1086 * elfxx-mips.h (_bfd_mips_relax_section): Fix prototype declaration.
1087 (_bfd_mips_elf_sign_extend): New prototype.
1088
49ba19a4 10892003-06-11 Federico G. Schwindt <fgsch@lodoss.net>
81407a69 1090
49ba19a4
NC
1091 * config.bfd (sparc-*-openbsd[0-2].* | sparc-*-openbsd3.[0-1]):
1092 New target (was sparc-*-openbsd* before).
1093 (sparc-*-openbsd*): Change to use bfd_elf32_sparc_vec.
81407a69 1094
de6e5e1a
NC
1095 * configure.in (vax-*-openbsd*): Set COREFILE to netbsd-core.lo.
1096 * configure: Regenerate.
1097
3b443373
L
10982003-06-11 H.J. Lu <hongjiu.lu@intel.com>
1099
1100 * po/Make-in (DESTDIR): New.
1101 (install-data-yes): Support $(DESTDIR).
1102 (uninstall): Likewise.
1103
795bb480
AM
11042003-06-11 Alan Modra <amodra@bigpond.net.au>
1105
1106 * Makefile.am (config.status): Depend on version.h.
1107 Run "make dep-am".
1108 * Makefile.in: Regenerate.
1109 * po/SRC-POTFILES.in: Regenerate.
1110
adadcc0c
AM
11112003-06-10 Alan Modra <amodra@bigpond.net.au>
1112 Gary Hade <garyhade@us.ibm.com>
1113
1114 * elf64-ppc.c (ppc64_elf_relocate_section <*_DS>): Special case lq.
1115
f4984206
RS
11162003-06-10 Richard Sandiford <rsandifo@redhat.com>
1117
1118 * archures.c (bfd_mach_h8300sxn): New architecture.
1119 * bfd-in2.h: Regenerate.
1120 * cpu-h8300.c (h8300_scan): Check for 'sxn'.
1121 (h8300sxn_info_struct): New.
1122 (h8300sx_info_struct): Link to it.
1123 * elf32-h8300.c (elf32_h8_mach): Add h8300sxn case.
1124 (elf32_h8_final_write_processing): Likewise.
1125
ad8e1ba5
AM
11262003-06-08 Alan Modra <amodra@bigpond.net.au>
1127
1128 * elf64-ppc.c: Move TARGET_LITTLE_SYM and other macros used by
1129 elfxx-target.h so that we can use elf_backend_got_header_size.
1130 (ELF_MACHINE_ALT1, ELF_MACHINE_ALT2): Delete.
1131 (GLINK_CALL_STUB_SIZE): Modify. Define new glink call stub and
1132 associated macros.
1133 (ppc64_elf_howto_raw <GOT_TPREL16_DS, GOT_TPREL16_LO_DS>): Correct
1134 dst_mask.
1135 (enum ppc_stub_type): Add ppc_stub_long_branch_r2off and
1136 ppc_stub_plt_branch_r2off.
1137 (struct ppc_stub_hash_entry): Reorganize.
1138 (struct ppc_link_hash_table): Add no_multi_toc, multi_toc_needed,
1139 toc_curr, toc_off and emit_stub_syms.
1140 (ppc64_elf_link_hash_table_create): Init them.
1141 (ppc_stub_name): Correct string size.
1142 (ppc64_elf_check_relocs): Set has_gp_reloc on GOT and TOC relocs.
1143 (ppc64_elf_size_dynamic_sections): Set no_multi_toc if GOT entries
1144 used.
1145 (ppc_type_of_stub): Tweak root.type test.
1146 (build_plt_stub): Remove glink code. Adjust for insn macro changes.
1147 (ppc_size_one_stub): Handle ppc_stub_long_branch_r2off and
1148 ppc_stub_plt_branch_r2off.
1149 (ppc_build_one_stub): Likewise. Fix var shadowing. Correct addis,addi
1150 range test. Use toc_off to calculte r2 values. Handle emit_stub_syms.
1151 (ppc64_elf_setup_section_lists): Remove htab creator flavour test.
1152 Initialize elf_gp and toc_curr.
1153 (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): New functions.
1154 (ppc64_elf_next_input_section): Set toc_off.
1155 (group_sections): Ensure groups have the same TOC.
1156 (ppc64_elf_size_stubs): Check whether we need a TOC adjusting stub.
1157 (ppc64_elf_build_stubs): Add emit_stub_syms param, and stash in htab.
1158 Build new glink stub.
1159 (ppc64_elf_relocate_section): Handle multiple TOCs. Fix comments.
1160 (ppc64_elf_finish_dynamic_sections): Adjust DT_PPC64_GLINK.
1161 * elf64-ppc.h (ppc64_elf_build_stubs): Update prototype.
1162 (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): Declare.
1163 * section.c (struct sec): Rename flag12 to has_gp_reloc.
1164 (STD_SECTION): Update.
1165 * ecoff.c (bfd_debug_section): Update comment.
1166 * bfd-in2.h: Regenerate.
1167
90fff0d4
DJ
11682003-06-05 Daniel Jacobowitz <drow@mvista.com>
1169
1170 * elfcode.h (elf_slurp_reloc_table_from_section): Don't dereference
1171 NULL function pointers.
1172
c82b20e4
DJ
11732003-06-05 Daniel Jacobowitz <drow@mvista.com>
1174
1175 * simple.c (bfd_simple_get_relocated_section_contents): Call
1176 _bfd_generic_link_add_symbols instead of bfd_link_add_symbols.
1177
53d4437a
SS
11782003-06-04 Svein E. Seldal <Svein.Seldal@solidas.com>
1179
5a5b9651
SS
1180 * coff-tic54x.c: Removed the ticoff0_bad_format_hook() and
1181 ticoff1_bad_format_hook() functions. Removed the coff0 and coff1
1182 swaptables.
1183 * coff-tic4x.c: Ditto
53d4437a
SS
1184 * coffcode.h: Added extra arguments to CREATE_BIG_COFF_TARGET_VEC
1185 and CREATE_LITTLE_COFF_TARGET_VEC. Created the macro
5a5b9651
SS
1186 CREATE_BIGHDR_COFF_TARGET_VEC. Created the ticoff0_bad_format_hook(),
1187 ticoff1_bad_format_hook() functions. Created the coff0 and coff1
1188 swap tables.
53d4437a
SS
1189 * coff-tic4x.c: Adopted new CREATE_xxx_COFF_TARGET_VEC macros.
1190 * coff-a29k.c: Append COFF_SWAP_TABLE argument
1191 * coff-apollo.c: Ditto
1192 * coff-arm.c: Ditto
1193 * coff-h8300.c: Ditto
1194 * coff-h8500.c: Ditto
1195 * coff-i960.c: Ditto
1196 * coff-m68k.c: Ditto
1197 * coff-m88k.c: Ditto
1198 * coff-mcore.c: Ditto
1199 * coff-sh.c: Ditto
1200 * coff-sparc.c: Ditto
1201 * coff-tic80.c: Ditto
1202 * coff-we32k.c: Ditto
1203 * coff-z8k.c: Ditto
1204 * coff-w65.c: Ditto
1205
736694c8
SS
12062003-06-04 Svein E. Seldal <Svein.Seldal@solidas.com>
1207
1208 * coff-tic4x.c (ticoff0_swap_table, ticoff1_swap_table): Fixed
1209 initialization bug
1210
9ee5e499
JJ
12112003-06-03 Jakub Jelinek <jakub@redhat.com>
1212
1213 * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_STACK.
1214 (bfd_section_from_phdr): Likewise.
1215 (map_sections_to_segments): Create PT_GNU_STACK segment header.
1216 (get_program_header_size): Count with PT_GNU_STACK.
1217 * elf-bfd.h (struct elf_obj_tdata): Add stack_flags.
1218 * elflink.h (bfd_elfNN_size_dynamic_sections): Set stack_flags.
1219
6f6f27f8
L
12202003-06-03 H.J. Lu <hongjiu.lu@intel.com>
1221
1222 * elflink.h (elf_link_input_bfd): Call linker error_handler
1223 for discarded definitions.
1224
a3b6428f
NC
12252003-06-03 Elias Athanasopoulos <elathan@phys.uoa.gr>
1226
1227 * syms.c (decode_section_type): Return 'n' if section flags are
1228 SEC_HAS_CONTENTS && SEC_READONLY.
1229
e30ddb24
NC
12302003-06-03 Nick Clifton <nickc@redhat.com>
1231
1232 * elf32-v850.c (v850_elf_howto_t): Rename R_V850_32to
1233 R_V850_ABS32. Add entry for R_V850_REL32.
adadcc0c
AM
1234 (v850_elf_reloc_map): Likewise.
1235 (v850_elf_check_relocs): Likewise.
1236 (v850_elf_perform_relocation): Likewise.
1237 (v850_elf_final_link_relocate): Likewise. Include computation
e30ddb24 1238 to make R_V850_REl32 pc-relative.
adadcc0c 1239
2558b9a9
KK
12402003-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1241
1242 * elf32-sh.c (sh_elf_size_dynamic_sections): Create .interp section
1243 and DT_DEBUG dynamic tag even for position independent executables.
1244 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewize.
1245
f15398ef
DJ
12462003-06-02 Daniel Jacobowitz <drow@mvista.com>
1247
1248 * config.bfd: Move obsolete entries out of the range of the
1249 targmatch sed script.
1250
cad28985
DJ
12512003-06-02 Daniel Jacobowitz <drow@mvista.com>
1252
1253 * config.bfd (mips*-dec-bsd*, mips*-*-pe*): Mark as obsolete.
1254
f2c822e3
JJ
12552003-05-31 Jakub Jelinek <jakub@redhat.com>
1256
1257 * elf32-ppc.c (allocate_dynrelocs): Use single slot for first 8192
1258 plt entries, not just 8191.
1259
c9c27aad
DJ
12602003-05-30 Daniel Jacobowitz <drow@mvista.com>
1261
1262 * elfxx-mips.c (_bfd_mips_elf_discard_info): Correct loop index.
1263 Reported by Ken Faiczak <kfaiczak@SANDVINE.com>.
1264
36af4a4e
JJ
12652003-05-30 Ulrich Drepper <drepper@redhat.com>
1266 Jakub Jelinek <jakub@redhat.com>
1267
1268 * elflink.h (elf_link_add_object_symbols): Use !info->executable
1269 instead of info->shared where appropriate.
1270 (bfd_elfNN_size_dynamic_sections, elf_link_output_extsym): Likewise.
1271 * elflink.c (_bfd_elf_create_got_section): Likewise.
1272 (_bfd_elf_link_create_dynamic_sections): Likewise.
1273 (_bfd_elf_link_assign_sym_version): Likewise.
1274 * elf32-i386.c (elf_i386_size_dynamic_sections): Create .interp section
1275 and DT_DEBUG dynamic tag even for position independent executables.
1276 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
1277 * elf32-s390.c (elf_s390_size_dynamic_sections: Likewise.
1278 * elf64-ppc.c (ppc64_elf_size_dynamic_sections: Likewise.
1279 * elf64-s390.c (elf_s390_size_dynamic_sections: Likewise.
1280 * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections: Likewise.
1281 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections: Likewise.
1282 * elf32-sparc.c (elf32_sparc_size_dynamic_sections: Likewise.
1283 * elf64-alpha.c (elf64_alpha_size_dynamic_sections: Likewise.
1284 * elf64-sparc.c (sparc64_elf_size_dynamic_sections: Likewise.
1285
f8843e87
AM
12862003-05-30 Kris Warkentin <kewarken@qnx.com>
1287
1288 * elf.c (elfcore_grok_nto_status): Only set lwpid for the active or
1289 signalled thread.
1290 (elfcore_grok_nto_gregs): Only make .reg section for the active thread.
1291
29e1a6e4
NC
12922003-05-29 Nick Clifton <nickc@redhat.com>
1293
1294 * pef.c: Include "safe-ctype.h" instead of <ctype.h>.
1295 Tidy up formatting.
1296 * Makefile.am: Add dependency on safe-ctype.h.
1297 * Makefile.in: Regenerate.
1298
4b555070
TS
12992003-05-29 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1300
1301 * elfxx-mips.c: Don't force symbols local unconditionally.
1302
0236e03e
L
13032003-05-28 Alan Modra <amodra@bigpond.net.au>
1304
1305 * elf32-hppa.c (elf32_hppa_relocate_section): Delete bogus
1306 undefined_symbol call.
1307
9e4aeb93
RS
13082003-05-27 Richard Sandiford <rsandifo@redhat.com>
1309
1310 * elfxx-mips.c (mips_elf_hash_sort_data): Fix formattting.
1311 (mips_elf_link_hash_table): Likewise.
1312
d0c728db
TS
13132003-05-22 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1314
1315 * elf64-mips.c (elf_mips_gnu_rel16_s2): Add internally used
1316 R_MIPS_GNU_REL16_S2 support.
1317 (bfd_elf64_bfd_reloc_type_lookup): Use it.
1318 (mips_elf64_rtype_to_howto): Use it.
1319 * elfn32-mips.c (elf_mips_gnu_rel16_s2): Add internally used
1320 R_MIPS_GNU_REL16_S2 support.
1321 (bfd_elf32_bfd_reloc_type_lookup): Use it.
1322 (mips_elf_n32_rtype_to_howto): Use it.
1323
759ebd76
DA
13242003-05-21 Stuart F. Downing <sdowning@fame.com>
1325
1326 * som.h: Define PA_2_0 before including a.out.h
1327
143d77c5
EC
13282003-05-07 Eric Christopher <echristo@redhat.com>
1329 Alexandre Oliva <aoliva@redhat.com>
1330
1331 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Adjust
1332 pic tests, change to warning.
1333 (_bfd_mips_elf_final_link): Remove EF_MIPS_CPIC flag setting.
1334
cea3d58d
NC
13352003-05-21 Marcus Comstedt <marcus@mc.pp.se>
1336
1337 * config.bfd: Check for a target triplet of shl-...-netbsdelf as
1338 well as shle-...-netbsdelf. Remove duplicate entry.
1339
385a4c14
NC
13402003-05-21 Nick Clifton <nickc@redhat.com>
1341
60e42408
NC
1342 * elf32-xstormy16.c (xstormy16_elf_howto_table): Fix dst_mask
1343 for X_STORMY16_REL_12 reloc.
1344
385a4c14 1345 * elf.c (bfd_elf_get_needed_list): Use is_elf_hash_table to check
9b5ecbd0 1346 the type of the hash table in the bfd_link_info structure.
385a4c14
NC
1347 (bfd_elf_get_runpath_list): Likewise.
1348
129b8c20
RM
13492003-05-19 Roland McGrath <roland@redhat.com>
1350
1351 * elf.c (bfd_elf_bfd_from_remote_memory): New function.
1352 * bfd-in.h: Declare it.
1353 * bfd-in2.h: Regenerated.
1354 * elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): New function.
1355 * elf-bfd.h (struct elf_backend_data): New function pointer member
1356 elf_backend_bfd_from_remote_memory.
1357 (_bfd_elf32_bfd_from_remote_memory, _bfd_elf64_bfd_from_remote_memory):
1358 Declare them.
1359 * elfxx-target.h (elf_backend_bfd_from_remote_memory): New macro.
1360 (elfNN_bed): Add that to the initializer.
1361
13622003-05-15 Roland McGrath <roland@redhat.com>
1363
1364 * elf.c (elfcore_grok_note): Grok NT_AUXV note, make ".auxv" section.
1365
22d5e339
L
13662003-05-20 Jakub Jelinek <jakub@redhat.com>
1367
1368 * elflink.h (elf_link_output_extsym): Only issue error about !=
1369 STV_DEFAULT symbols if they are bfd_link_hash_undefined.
1370
13712003-05-20 H.J. Lu <hongjiu.lu@intel.com>
1372
1373 * elflink.c (_bfd_elf_merge_symbol): Check ELF_LINK_DYNAMIC_DEF
1374 when removing the old definition for symbols with non-default
1375 visibility.
1376
b645cb17
JE
13772003-05-18 Jason Eckhardt <jle@rice.edu>
1378
1379 * elf32-i860.c (elf32_i860_relocate_highadj): Simplify calculation.
1380
d2ff124f
AS
13812003-05-17 Andreas Schwab <schwab@suse.de>
1382
1383 * elf32-m68k.c (elf_m68k_check_relocs): Cache reloc section in
1384 elf_section_data during processing of pc-relative and absolute
1385 relocations.
1386 (elf_m68k_relocate_section): Use the cached reloc section instead
1387 of computing it again. Fix handling of visibility. Don't modify
1388 addend when copying over a relocation into the output.
1389
9c7a29a3
AM
13902003-05-17 Alan Modra <amodra@bigpond.net.au>
1391
1392 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
1393 to trim plt entries. Move undefweak non-default visibility test..
1394 (allocate_dynrelocs): ..from here.
1395 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't test
1396 dynamic_sections_created here. Update comment. Move undefweak
1397 non-default visibility test..
1398 (allocate_dynrelocs): ..from here. Fix comment.
1399 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
1400 to trim plt entries. Move undefweak non-default visibility test..
1401 (allocate_dynrelocs): ..from here. Fix comment.
1402 * elflink.h (elf_link_output_extsym): Compare ELF_ST_VISIBILITY with
1403 STV_DEFAULT rather than comparing with zero.
1404 * elflink.c (_bfd_elf_merge_symbol): Likewise.
1405 (_bfd_elf_fix_symbol_flags): Likewise. Format comment.
1406
9bcf4de0
TS
14072003-05-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1408
1409 * bfd.c (_bfd_get_gp_value): Prevent illegal access for abfd null
1410 pointers.
1411 (_bfd_set_gp_value): Likewise.
1412
5d1db417
MS
14132003-05-16 Michael Snyder <msnyder@redhat.com>
1414 From Bernd Schmidt <bernds@redhat.com>
1415 * archures.c (bfd_mach_h8300sx): New.
1416 * bfd-in2.h: Regenerate.
1417 * cpu-h8300.c (h8300_scan)): Add support for h8300sx.
1418 (h8300sx_info_struct): New.
1419 (h8300s_info_struct): Link to it.
1420 * elf32-h8300.c (elf32_h8_mach): Add support for h8300sx.
1421 (elf32_h8_final_write_processing): Likewise.
1422 (elf32_h8_relax_section): Likewise.
1423
80c7c40a
NC
14242003-05-16 Kelley Cook <kelleycook@wideopenwest.com>
1425
1426 * config.bfd: Accept i[3-7]86 variants.
1427 * configure.host: Likewise.
1428 * configure.in: Likewise.
1429 * configure: Regenerate.
1430
c1be741f
L
14312003-05-15 H.J. Lu <hongjiu.lu@intel.com>
1432
1433 * elflink.c (_bfd_elf_fix_symbol_flags): Also hide protected
1434 symbol.
1435
a15d9d3a
L
14362003-05-15 H.J. Lu <hongjiu.lu@intel.com>
1437
1438 * elflink.h (elf_link_check_versioned_symbol): Also allow
1439 the base version.
1440
09695f56
AM
14412003-05-15 Alan Modra <amodra@bigpond.net.au>
1442 H.J. Lu <hongjiu.lu@intel.com>
1443
1444 * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL.
1445 (elf_i386_relocate_section): Likewise.
1446 * elf32-ppc.c (allocate_dynrelocs): Likewise.
1447 (ppc_elf_relocate_section): Likewise.
1448 * elf64-ppc.c (allocate_dynrelocs): Likewise.
1449 (ppc64_elf_relocate_section): Likewise.
1450
40f62fa0
TS
14512003-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1452
1453 * elf32-mips.c (gprel32_with_gp): Remove useless N64 ABI case.
1454
47247ced
SC
14552003-05-13 Stephane Carrez <stcarrez@nerim.fr>
1456
1457 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Check for
1458 processor capability, allow merge of HC12 and HCS12 in some cases.
1459 (m68hc11_elf_hash_table_create): Use bfd_malloc instead of bfd_zalloc.
1460 * cpu-m68hc12.c (bfd_m68hc12s_arch): New struct.
1461 (bfd_m68hc12_arch): Link it.
1462 (scan_mach): New function.
1463
32dfa85d
AH
14642003-05-13 Andrew Haley <aph@redhat.com>
1465
1466 * elf.c (bfd_elf_hash): Mask lower 32 bits of hash.
1467
586119b3
AM
14682003-05-13 Alan Modra <amodra@bigpond.net.au>
1469 H.J. Lu <hongjiu.lu@intel.com>
1470
1471 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Move from
1472 elf32-ppc.c. Add ELF_LINK_FORCED_LOCAL check.
1473 * elf32-ppc.c: (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Delete.
1474 (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for dynreloc check.
1475 (ppc_elf_relocate_section): Likewise.
1476 * elf64-ppc.c (allocate_dynrelocs): Likewise.
1477 (ppc64_elf_relocate_section): Likewise. Use for .got relocs too.
1478 (ppc64_elf_adjust_dynamic_symbol): Don't assume symbols with .plt
1479 relocs need no other types.
1480 * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for
1481 dynreloc check.
1482 (elf_i386_relocate_section): Likewise. Use for .got relocs too.
1483 (elf_i386_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL for
1484 .got relocs.
1485
04e534c3
KK
14862003-05-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1487
1488 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): For weak symbols,
1489 copy ELF_LINK_NON_GOT_REF from weakdef.
9b5ecbd0 1490 (allocate_dynrelocs): For undef weak syms with non-default
04e534c3
KK
1491 visibility, a) don't allocate plt entries, b) don't allocate
1492 .got relocs, c) discard dyn rel space
adadcc0c
AM
1493 (sh_elf_relocate_section): d) don't generate .got relocs, e)
1494 don't generate dynamic relocs.
04e534c3
KK
1495 (sh_elf_copy_indirect_symbol): Don't copy ELF_LINK_NON_GOT_REF
1496 for weakdefs when symbol already adjusted.
1497
0afb2dc0
NC
14982003-05-12 Nick Clifton <nickc@redhat.com>
1499
1500 * elf32-xstormy16.c (xstormy16_elf_howto_table): use 'bitfield'
1501 overflow detection for R_XSTORMY16_16 reloc.
1502
9d29900b
NC
15032003-05-12 Paul Clarke <paulc@senet.com.au>
1504
1505 * elf32-h8300.c: Fix typo in name of R_H8_DIR8 reloc.
1506
a48c6a54
JE
15072003-05-11 Jason Eckhardt <jle@rice.edu>
1508
1509 * elf32-i860.c (elf32_i860_relocate_highadj): Properly
1510 adjust upper bits.
1511 (elf32_i860_relocate_splitn): Obtain upper 5 bits from the
1512 proper place.
1513 (elf32_i860_relocate_pc16): Obtain upper 5 bits from the
1514 proper place.
1515
44f745a6
AS
15162003-05-11 Andreas Schwab <schwab@suse.de>
1517
1518 * elf32-m68k.c (elf_m68k_relocate_section): Replace ugly
1519 complicated tests for unresolvable relocs with a simple direct
1520 scheme using "unresolved_reloc" var. Report some detail on
1521 bfd_reloc_outofrange and similar errors.
1522
4ec72bde
MS
15232003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
1524
1525 * elf32-s390.c (allocate_dynrelocs, elf_s390_relocate_section):
1526 Fix WILL_CALL_FINISH_DYNAMIC_SYMBOL call.
1527 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
1528 * elf64-s390.c: Likewise.
1529
64285810
MS
15302003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
1531
1532 * elf32-s390.c (ELIMINATE_COPY_RELOCS): Define as one.
1533 (elf_s390_adjust_dynamic_symbol): For weak symbols, copy
1534 ELF_LINK_NON_GOT_REF from weakdef.
1535 (elf_s390_copy_indirect_symbol): Test whether the weakdef sym has
1536 already been adjusted before treating it specially.
1537 * el64-s390.c: Likwise.
1538
82058a73
MS
15392003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
1540
1541 * elf32-s390.c (allocate_dynrelocs): For undef weak syms with
1542 non-default visibility, a) don't make them dynamic, b) discard
1543 space for dynamic relocs.
1544 (elf_s390_relocate_section): Initialize the GOT entries and skip
1545 R_390_{8,16,32}/R_390_PC{16,16DBL,32DBL,32} for weak undefined
1546 symbols with non-default visibility.
1547 * elf64-s390.c: Likewise.
1548
60d8b524
AM
15492003-05-09 Alan Modra <amodra@bigpond.net.au>
1550
1551 * cpu-arm.c (arm_check_note): Warning fix.
1552 * elf32-iq2000.c (iq2000_elf_check_relocs): Warning fixes. Arrange
1553 to keep relocs if edited.
1554 (iq2000_elf_print_private_bfd_data): Return TRUE.
1555 * elfxx-ia64.c (elfNN_ia64_relax_section): Use ELFNN_R_SYM, not
1556 ELF64_R_SYM.
1557 (elfNN_ia64_relax_ldxmov): Warning fix.
1558 * xtensa-isa.c (xtensa_add_isa): Warning fix.
1559 * xtensa-modules.c (get_num_opcodes): Warning fix.
1560
e57b5356
AM
15612003-05-09 Andrey Petrov <petrov@netbsd.org>
1562
1563 * elf.c (elf_fake_sections): Use correct cast for sh_name.
1564
45d6a902
AM
15652003-05-09 Alan Modra <amodra@bigpond.net.au>
1566
1567 * elflink.c (_bfd_elf_link_create_dynamic_sections): Move from
1568 elflink.h. Replace LOG_FILE_ALIGN with bed->s->log_file_align.
1569 (_bfd_elf_create_dynamic_sections): Use bed->s->log_file_align.
1570 (bfd_elf_record_link_assignment): Move from elflink.h.
1571 (_bfd_elf_merge_symbol): Likewise.
1572 (_bfd_elf_add_default_symbol): Likewise.
1573 (_bfd_elf_export_symbol): Likewise.
1574 (_bfd_elf_link_find_version_dependencies): Likewise.
1575 (_bfd_elf_link_assign_sym_version): Likewise.
1576 (_bfd_elf_link_read_relocs): Likewise.
1577 (_bfd_elf_link_size_reloc_section): Likewise.
1578 (_bfd_elf_fix_symbol_flags): Likewise.
1579 (_bfd_elf_adjust_dynamic_symbol): Likewise.
1580 (_bfd_elf_link_sec_merge_syms): Likewise.
1581 (elf_link_read_relocs_from_section): Likewise. Use bed->s->sizeof_rel
1582 and bed->s->sizeof_rela.
1583 (_bfd_elf_link_output_relocs): Likewise.
1584 * elf-bfd.h (struct elf_size_info): Rename file_align to
1585 log_file_align.
1586 (struct elf_info_failed): Move from elflink.h.
1587 (struct elf_assign_sym_version_info): Likewise.
1588 (struct elf_find_verdep_info): Likewise.
1589 (_bfd_elf_create_dynamic_sections): Delete duplicate declaration.
1590 (_bfd_elf_merge_symbol, _bfd_elf_add_default_symbol,
1591 _bfd_elf_export_symbol, _bfd_elf_link_find_version_dependencies,
1592 _bfd_elf_link_assign_sym_version,
1593 _bfd_elf_link_create_dynamic_sections, _bfd_elf_link_read_relocs,
1594 _bfd_elf_link_size_reloc_section, _bfd_elf_link_output_relocs,
1595 _bfd_elf_fix_symbol_flags, _bfd_elf_adjust_dynamic_symbol,
1596 _bfd_elf_link_sec_merge_syms): Declare.
1597 (bfd_elf32_link_create_dynamic_sections): Don't declare.
1598 (_bfd_elf32_link_read_relocs): Likewise.
1599 (bfd_elf64_link_create_dynamic_sections): Likewise.
1600 (_bfd_elf64_link_read_relocs): Likewise.
1601 * elflink.h: Move lots o' stuff elsewhere.
1602 * bfd-in.h (bfd_elf32_record_link_assignment): Don't declare.
1603 (bfd_elf64_record_link_assignment): Likewise.
1604 (bfd_elf_record_link_assignment): Declare.
1605 * bfd-in2.h: Regenerate.
1606 * elfcode.h (elf_link_create_dynamic_sections): Don't declare.
1607 (NAME(_bfd_elf,size_info)): Adjust for log_file_align.
1608 * elf.c (_bfd_elf_init_reloc_shdr): Adjust for bed->s->log_file_align.
1609 (assign_file_positions_for_segments): Likewise.
1610 (assign_file_positions_except_relocs): Likewise.
1611 (swap_out_syms, elfcore_write_note): Likewise.
1612 * elf-m10200.c: Adjust for changed function names.
1613 * elf-m10300.c: Likewise.
1614 * elf32-arm.h: Likewise.
1615 * elf32-h8300.c: Likewise.
1616 * elf32-hppa.c: Likewise.
1617 * elf32-ip2k.c: Likewise.
1618 * elf32-m32r.c: Likewise.
1619 * elf32-m68hc11.c: Likewise.
1620 * elf32-m68hc1x.c: Likewise.
1621 * elf32-m68k.c: Likewise.
1622 * elf32-mips.c: Likewise.
1623 * elf32-ppc.c: Likewise.
1624 * elf32-sh.c: Likewise.
1625 * elf32-v850.c: Likewise.
1626 * elf32-xtensa.c: Likewise.
1627 * elf64-alpha.c: Likewise.
1628 * elf64-hppa.c: Likewise.
1629 * elf64-mmix.c: Likewise.
1630 * elf64-ppc.c: Likewise.
1631 * elf64-sh64.c: Likewise.
1632 * elfxx-ia64.c: Likewise.
1633 * elfxx-mips.c: Likewise.
1634 (MIPS_ELF_LOG_FILE_ALIGN): Use log_file_align.
1635 * elf64-alpha.c (alpha_elf_size_info): Adjust for log_file_align.
1636 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
1637 * elf64-mips.c (mips_elf64_size_info): Likewise.
1638 * elf64-s390.c (s390_elf64_size_info): Likewise.
1639 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
1640
bf1e742e
L
16412003-05-08 H.J. Lu <hongjiu.lu@intel.com>
1642
1643 * elflink.h (elf_add_default_symbol): After skipping the
1644 unversioned symbol, go to non-default one.
1645
6a32c710
L
16462003-05-07 H.J. Lu <hongjiu.lu@intel.com>
1647
1648 * elfxx-ia64.c (_bfd_elf_link_hash_hide_symbol): Also clear the
1649 want_plt field.
1650 (elfNN_ia64_relocate_section): Don't do dynamic symbol lookup
1651 for symbols with non-default visibility.
1652
71552942
L
16532003-05-07 H.J. Lu <hongjiu.lu@intel.com>
1654
1655 * elflink.h (elf_link_check_versioned_symbol): Also handle the
1656 case that a DSO references a hidden symbol which may be
1657 satisfied by a versioned symbol in another DSO.
1658 (elf_link_output_extsym): Check versioned definition for hidden
1659 symbol referenced by a DSO.
1660
208c2cd6
NC
16612003-05-07 Nick Clifton <nickc@redhat.com>
1662
1663 * elf32-xstormy16.c (xstormy16_elf_howto_table): Reset
1664 R_XSTORMY16_16 reloc to ignore overflows.
1665
aa701218
AO
16662003-05-06 Alexandre Oliva <aoliva@redhat.com>
1667
1668 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Improve
1669 error message for mixing different-endian files. Check for ABI
1670 compatibility of input files with the selected emulation.
1671
4e795f50
AM
16722003-05-05 Alan Modra <amodra@bigpond.net.au>
1673
1674 * elf32-i386.c (allocate_dynrelocs): For undef weak syms with
1675 non-default visibility, a) don't make them dynamic, b) discard
1676 space for dynamic relocs.
1677 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
1678
1679 * elf32-ppc.c (allocate_dynrelocs): For undef weak syms with
1680 non-default visibility, a) don't allocate plt entries, b) don't
1681 allocate .got relocs, c) discard dyn rel space,
1682 (ppc_elf_relocate_section): d) don't generate .got relocs, e)
1683 don't generate dynamic relocs.
1684 * elf64-ppc.c (allocate_dynrelocs): As above.
1685 (ppc64_elf_relocate_section): As above.
1686
4bc6e03a
AJ
16872003-05-05 Andreas Jaeger <aj@suse.de>
1688
1689 * elf64-x86-64.c (allocate_dynrelocs): Don't allocate dynamic
1690 relocation entries for weak undefined symbols with non-default
1691 visibility.
1692 (elf64_x86_64_relocate_section): Initialize the GOT entries and
1693 skip R_386_32/R_386_PC32 for weak undefined symbols with
1694 non-default visibility.
1695
ef5aade5
L
16962003-05-04 H.J. Lu <hjl@gnu.org>
1697
1698 * elf32-i386.c (allocate_dynrelocs): Don't allocate dynamic
1699 relocation entries for weak undefined symbols with non-default
1700 visibility.
1701 (elf_i386_relocate_section): Initialize the GOT entries and
1702 skip R_386_32/R_386_PC32 for weak undefined symbols with
1703 non-default visibility.
129b8c20 1704
ef5aade5
L
1705 * elfxx-ia64.c (allocate_fptr): Don't allocate function
1706 descriptors for weak undefined symbols with non-default
1707 visibility.
1708 (allocate_dynrel_entries): Don't allocate relocation entries
1709 for symbols resolved to 0.
1710 (set_got_entry): Don't install dynamic relocation for weak
1711 undefined symbols with non-default visibility.
1712 (set_pltoff_entry): Likewise.
1713
1714 * elflink.h (elf_fix_symbol_flags): Hide weak undefined symbols
1715 with non-default visibility.
1716 (elf_link_output_extsym): Don't make weak undefined symbols
1717 with non-default visibility dynamic.
1718
c424e0e9
L
17192003-05-04 H.J. Lu <hjl@gnu.org>
1720
1721 * elflink.h (elf_merge_symbol): Correctly handle weak definiton.
1722
d31e3dfe
L
17232003-05-04 H.J. Lu <hjl@gnu.org>
1724
1725 * elflink.h (elf_merge_symbol): Don't record a hidden/internal
1726 symbol dynamic. Check indirection when removing the old
1727 definition for symbols with non-default visibility.
1728 (elf_add_default_symbol): Skip when told by elf_merge_symbol.
1729
4d2e1ff0
NC
17302003-05-02 Nick Clifton <nickc@redhat.com>
1731
1732 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make the
1733 R_XSTORMY16_8 and R_XSTORMY16_16 relocs detect and complain about
1734 unsigned overflow.
1735
d40d037c
AJ
17362003-05-02 Andreas Jaeger <aj@suse.de>
1737
1738 * elf64-x86-64.c (elf_x86_64_copy_indirect_symbol): Don't copy
1739 ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
1740 (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
1741 (elf_x86_64_adjust_dynamic_symbol): For weak symbols, copy
1742 ELF_LINK_NON_GOT_REF from weakdef.
1743
c5d1701e
NC
17442003-05-02 Charles Lepple <clepple@ghz.cc>
1745 Nick Clifton <nickc@redhat.com>
1746
1747 * acinclude.m4: Fix name of --enable-install-libbfd switch.
1748 * aclocal.m4: Regenerate.
1749 * configure: Regenerate.
1750 * Makefile.in: Regenerate.
1751
81848ca0
AM
17522003-05-01 Alan Modra <amodra@bigpond.net.au>
1753
1754 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Test whether the
1755 weakdef sym has already been adjusted before treating it specially.
1756 * elf32-i386.c (elf_i386_copy_indirect_symbol): Don't copy
1757 ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
1758 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
1759 (ppc64_elf_check_relocs): Set ELF_LINK_NON_GOT_REF.
03d14457 1760
c7996ad6
L
17612003-04-28 H.J. Lu <hjl@gnu.org>
1762
1763 * elfxx-ia64.c (elfNN_ia64_relax_section): Relax ldxmov during
1764 the relax finalize pass.
1765
1766 * section.c (struct sec): Add need_finalize_relax and remove
1767 flag11.
1768 (STD_SECTION): Update struct sec initializer.
1769 * bfd-in2.h: Regenerated.
1770
f006af20
L
17712003-04-28 H.J. Lu <hjl@gnu.org>
1772
1773 * elflink.h (elf_merge_symbol): Call elf_backend_copy_indirect_symbol
1774 to copy any information related to dynamic linking when we flip
1775 the indirection.
1776
1b1fe8fe
L
17772003-04-27 H.J. Lu <hjl@gnu.org>
1778
1779 * elf-bfd.h (ELF_LINK_DYNAMIC_DEF): New.
1780 (ELF_LINK_DYNAMIC_WEAK): New.
1781
1782 * elflink.h (elf_merge_symbol): Add one argument to indicate if
1783 a symbol should be skipped. Ignore definitions in dynamic
1784 objects for symbols with non-default visibility.
1785 (elf_add_default_symbol): Adjusted.
1786 (elf_link_add_object_symbols): Check if a symbol should be
1787 skipped. Don't merge the visibility field with the one from
1788 a dynamic object.
1789 (elf_link_check_versioned_symbol): Use undef_bfd.
1790 (elf_link_output_extsym): Warn if a forced local symbol is
1791 referenced from dynamic objects. Make non-weak undefined symbol
1792 with non-default visibility a fatal error.
1793
052a450c
DJ
17942003-04-27 Daniel Jacobowitz <drow@mvista.com>
1795
1796 * configure.in: Bump version on HEAD to 2.14.90.
1797 * configure: Regenerated.
1798
d204f4c0
SC
17992003-04-26 Stephane Carrez <stcarrez@nerim.fr>
1800
1801 PR savannah/3331:
1802 * elf32-m68hc11.c (m68hc11_elf_relax_section): Clear prev_insn_group
1803 when we couldn't relax something.
1804
3c0a515d
L
18052003-04-25 Alan Modra <amodra@bigpond.net.au>
1806
1807 * elflink.h (elf_merge_symbol): When we find a regular definition
1808 for an indirect symbol, flip the indirection so that the old
1809 direct symbol now points to the new definition.
1810
d145330d
RM
18112003-04-24 Roland McGrath <roland@redhat.com>
1812
1813 * elf.c (bfd_section_from_phdr): Map PT_GNU_EH_FRAME to "eh_frame_hdr".
1814
fc0bffd6
AM
18152003-04-24 Alan Modra <amodra@bigpond.net.au>
1816
1817 * elf32-ppc.c: Formatting and comment fixes.
1818 (ELIMINATE_COPY_RELOCS): Move before ppc_elf_copy_indirect_symbol.
1819 (ppc_elf_copy_indirect_symbol): Copy flags here for weakdefs.
1820
18212003-04-24 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
8d9cd6b1
NC
1822
1823 * archures.c (bfd_mach_h8300hn, bfd_mach_h8300sn): Added.
1824 * bfd-in2.h: Rebuilt.
1825 * coff-h8300.c (BADMAG): Add check for H8300HNBADMAG & H8300SNBADMAG.
fc0bffd6 1826 * coffcode.h (coff_set_arch_mach_hook): Add case for H8300HNMAGIC
8d9cd6b1
NC
1827 & H8300SNMAGIC.
1828 (coff_set_flags): Add case for bfd_mach_h8300hn & bfd_mach_h8300sn.
1829 * cpu-h8300.c (h8300_scan): Handle h8300hn, h8300sn.
1830 (h8300sn_info_struct, h8300hn_info_struct): New.
1831 * elf32-h8300.c (elf32_h8_mach): Handle case for h8300hn & h8300sn
1832 (elf32_h8_final_write_processing): Likewise.
1833
267fb3c1
KK
18342003-04-23 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1835
1836 * elf32-sh.c (tpoff): New.
1837 (struct elf_sh_dyn_relocs): Remove tls_tpoff32.
1838 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
fc0bffd6 1839 (allocate_dynrelocs): Don't make unnecessary dynamic TLS
267fb3c1 1840 relocations. Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses.
fc0bffd6 1841 (sh_elf_relocate_section): Likewise. Remove unnecessary tests.
267fb3c1
KK
1842 (dtpoff_base): Fix wrong indentation.
1843 (sh_elf_check_relocs): Don't set DF_STATIC_TLS flag with non-TLS
1844 relocations. Don't set tls_tpoff32 flag. Don't make unnecessary
1845 R_SH_TLS_TPOFF32 relocations.
1846
ef230218
JR
18472003-04-23 J"orn Rennecke <joern.rennecke@superh.com>
1848
1849 * archures.c (enum bfd_architecture): Amend comment to refer to SuperH.
1850 * cpu-sh.c: Likewise.
1851 * elf32-sh.c: Likewise.
1852 * reloc.c (bfd_reloc_code_real): Likewise.
1853 * elf32-sh64-com.c: Change comment to refer to SuperH.
1854 * elf32-sh64.c: Likewise.
1855 * elf64-sh64.c: Likewise.
1856 * bfd-in2.h (enum bfd_architecture): Regenerate.
1857
8c29f035
AM
18582003-04-23 Alan Modra <amodra@bigpond.net.au>
1859
1860 From Julien LEMOINE <speedblue@debian.org>
1861 * elf32-i386.c (elf_i386_info_to_howto): Delete.
1862 (elf_info_to_howto): Define as elf_i386_info_to_howto_rel.
1863
26597c86
NC
18642003-04-22 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
1865
1866 * archures.c: Replace references to Mitsubishi M32R with references
1867 to Renesas M32R.
1868 * relocs.c: Likewise.
1869 * bfd-in2.h: Regenerate.
1870
cc13e3ef
RH
18712003-04-21 Richard Henderson <rth@redhat.com>
1872
1873 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Return false for an
1874 executable when a symbol is defined both regular and dynamic.
1875
f5a6f915
SC
18762003-04-21 Stephane Carrez <stcarrez@nerim.fr>
1877
1878 * Makefile.am (BFD32_BACKENDS): Add elf32-m68hc1x.lo.
1879 (elf32-m68hc1x.lo): Update dependencies
1880 * configure.in: Add elf32-m68hc1x.lo.
1881 * configure: Rebuild.
1882 * Makefile.in: Rebuild.
1883
3a65329d
SC
18842003-04-21 Stephane Carrez <stcarrez@nerim.fr>
1885
1886 * elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
1887 (m68hc11_elf_hash_table_create): New function.
1888 (elf32_m68hc11_link_hash_table_free): New function.
1889 (stub_hash_newfunc): New function.
1890 (m68hc11_add_stub): New function.
1891 (elf32_m68hc11_add_symbol_hook): New function.
1892 (elf32_m68hc11_setup_section_lists): New function.
1893 (elf32_m68hc11_next_input_section): New function.
1894 (elf32_m68hc11_size_stubs): New function.
1895 (elf32_m68hc11_build_stubs): New function.
1896 (m68hc11_get_relocation_value): New function.
1897 (elf32_m68hc11_relocate_section): Call the above to redirect
1898 some relocations to the trampoline code.
1899 (m68hc11_elf_export_one_stub): New function.
1900 (m68hc11_elf_set_symbol): New function.
1901 (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse.
1902 (m68hc11_elf_get_bank_parameters): Get parameters only when the info
1903 is not yet initialized.
1904
1905 * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
1906 (elf32_m68hc11_stub_hash_entry): New struct.
1907 (m68hc11_page_info): Add trampoline handler address.
1908 (m68hc11_elf_link_hash_table): Add stubs generation members.
1909 (elf32_m68hc11_add_symbol_hook): Declare.
1910 (elf32_m68hc11_setup_section_lists): Declare.
1911 (elf32_m68hc11_size_stubs): Declare.
1912 (elf32_m68hc11_build_stubs): Declare.
8c29f035 1913
3a65329d
SC
1914 * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c.
1915 (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise.
1916 (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto.
1917 (_bfd_m68hc11_elf_set_private_flags): Ditto.
1918 (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto.
1919 (_bfd_m68hc11_elf_print_private_bfd_data): Ditto.
1920 (bfd_elf32_bfd_link_hash_table_create): Define.
1921 (elf_backend_add_symbol_hook): Define.
1922 (m68hc11_elf_bfd_link_hash_table_create): New function.
1923 (m68hc11_elf_build_one_stub): New function.
1924 (m68hc11_elf_size_one_stub): New function.
1925 (m68hc11_elf_bfd_link_hash_table_create): Install the above.
1926 (bfd_elf32_bfd_link_hash_table_create): Define.
1927
1928 * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove.
1929 (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked.
1930 (m68hc12_phys_addr): Ditto.
1931 (m68hc12_phys_page): Ditto.
1932 (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c.
1933 (elf32_m68hc11_gc_mark_hook): Likewise.
1934 (elf32_m68hc11_gc_sweep_hook): Likewise.
1935 (elf32_m68hc11_check_relocs): Likewise.
1936 (elf32_m68hc11_relocate_section): Likewise.
1937 (_bfd_m68hc12_elf_set_private_flags): Likewise.
1938 (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise.
1939 (_bfd_m68hc12_elf_print_private_bfd_data): Likewise.
1940 (m68hc12_elf_build_one_stub): New function.
1941 (m68hc12_elf_size_one_stub): New function.
1942 (m68hc12_elf_bfd_link_hash_table_create): New function, use the above.
1943 (elf_backend_add_symbol_hook): Define.
1944 (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
1945
4081944f
NC
19462003-04-18 Nick Clifton <nickc@redhat.com>
1947
1948 * format.c (bfd_check_format_matches): Only check associated
1949 vector if the matching_vector has been created.
1950
060dc71d
AO
19512003-04-15 Alexandre Oliva <aoliva@redhat.com>
1952
1953 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Fix typo in
1954 2003-04-09's change.
1955
a3476bef
NC
19562003-04-15 Brian Ford <ford@vss.fsi.com>
1957
1958 * peicode.h (coff_swap_scnhdr_in): If a section holds
1959 uninitialized data and is from an object file or from an
1960 executable image that has not initialized the s_size field, or if
1961 the physical size is padded, use the virtual size (stored in
1962 s_paddr) instead.
1963
ca4fa240
NC
19642003-04-15 H.J. Lu <hjl@gnu.org>
1965
1966 * elflink.h (elf_link_add_object_symbols): Properly report
1967 filename for alignment reduction.
1968
c2dcd04e
NC
19692003-04-15 Rohit Kumar Srivastava <rohits@kpitcummins.com>
1970
1971 * archures.c: Replace occurrances of 'Hitachi' with 'Renesas'.
1972 * reloc.c: Likewise.
1973 * coff-h8300.c: Likewise.
1974 * coff-h8500.c: Likewise.
1975 * coff-sh.c: Likewise.
1976 * cpu-h8300.c: Likewise.
1977 * cpu-sh.c: Likewise.
1978 * elf32-h8300.c: Likewise.
1979 * elf32-sh.c: Likewise.
1980 * elf32-sh64-com.c: Likewise.
1981 * elf32-sh64.c: Likewise.
1982 * elf64-sh64.c: Likewise.
1983 * bfd-in2.h: Regenerate.
1984
f7661995
NC
19852003-04-14 H.J. Lu <hjl@gnu.org>
1986
1987 * elflink.h (elf_link_add_object_symbols): Maintain maximum
1988 alignment for common symbols. Warn reducing alignment for
1989 common symbols. Report old filename when symbol size changes.
1990
93a2b7ae
AO
19912003-04-12 Alexandre Oliva <aoliva@redhat.com>
1992
1993 * elfxx-mips.c (mips_elf_calculate_relocation): Adjust two other
1994 occurrences of the same test changed in the previous patch.
1995 Optimize.
1996
0176c794
AO
19972003-04-11 Alexandre Oliva <aoliva@redhat.com>
1998
1999 * elfxx-mips.c (mips_elf_get_global_gotsym_index): New.
2000 (mips_elf_calculate_relocation): Decay GOT_PAGE/GOT_OFST to
2001 GOT_DISP/addend only if the symbol got a global GOT entry.
2002
0fdc1bf1
AO
20032003-04-10 Alexandre Oliva <aoliva@redhat.com>
2004
2005 * elfxx-mips.c (mips_elf_calculate_relocation): Decay
2006 GOT_PAGE/GOT_OFST referencing overridable symbol to
2007 GOT_DISP/addend.
2008 (_bfd_mips_elf_check_relocs): Handle GOT_PAGE referencing
2009 global symbol as GOT_DISP.
2010
9b8c98a4
BW
20112003-04-10 Bob Wilson <bob.wilson@acm.org>
2012
2013 * elf32-xtensa.c (elf_xtensa_relocate_section): Don't continue to the
2014 next relocation on an undefined symbol.
2015
ec1659c8
RH
20162003-04-09 Richard Henderson <rth@redhat.com>
2017
2018 * elf64-alpha.c (elf64_alpha_relocate_section) <R_ALPHA_GPREL32>:
2019 Ignore relocations against r_symndx == 0.
2020
7dfb07f7
L
20212003-04-09 H.J. Lu <hjl@gnu.org>
2022
2023 * elf64-alpha.c (elf64_alpha_relocate_section): Don't return
2024 FALSE for undefined symbols.
2025 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
2026
a3805e4e
AO
20272003-04-09 Alexandre Oliva <aoliva@redhat.com>
2028
2029 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Try DWARF3-standard
2030 and IRIX-specific shift-to-64-bit 4-byte lengths before following
2031 addr_size.
2032
69931e60
AO
20332003-04-08 Alexandre Oliva <aoliva@redhat.com>
2034
2035 * elf32-mips.c (bfd_elf32_bfd_reloc_type_lookup): Detect (ctor)
2036 pointer size from ABI, not arch_bits_per_address.
2037
59a8c196
KB
20382003-04-07 Kevin Buettner <kevinb@redhat.com>
2039
2040 * elfn32-mips.c (elf32_mips_grok_prstatus): Adjust core file related
2041 constants for n32 ABI.
2042
8e16317c
NC
20432003-04-06 Andrew Cagney <cagney@redhat.com>
2044
2045 * simple.c (bfd_simple_get_relocated_section_contents): Disable
2046 free that leads to GDB vs BFD memory corruption.
2047
196486be
SC
20482003-04-04 Stephane Carrez <stcarrez@nerim.fr>
2049
2050 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Also adjust
2051 symbols that mark the end of the section.
2052 (m68hc11_elf_relax_section): Use R_M68HC11_PCREL_8 relocs when
2053 converting to a relative branch so that the offset is computed after
2054 the relaxation; also relocate a jsr into a bsr if possible but don't
2055 relax them if they are to a far symbol as we need to call the
2056 trampoline code.
2057 (elf_m68hc11_howto_table): Set pcrel_offset to true.
2058
be33c5dd
SS
20592003-04-04 Svein E. Seldal <Svein.Seldal@solidas.com>
2060
2061 * archures.c: Namespace cleanup. Rename bfd_mach_c3x to
2062 bfd_mach_tic3x and bfd_mach_c4x to bfd_mach_tic4x
2063 * bfd-in2.h: Regenerate
2064 * coff-tic4x.c: Namespace cleanup. Replace s/c4x/tic4x/
2065 * cpu-tic4x.c: Ditto
2066
ff0c9faf
NC
20672003-04-03 Nick Clifton <nickc@redhat.com>
2068
2069 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Compute ps and ss
2070 differently for object files and executables.
2071 * peicode.h (coff_swap_scnhdr_in): Only set the s_size field
2072 for object files or for executables who have not already
2073 initialised the field.
2074 * libpei.h (bfd_pe_executable_p): New macro. Return true if
2075 the PE format bfd is an executable.
2076
2b98e6c0
AM
20772003-04-03 Alan Modra <amodra@bigpond.net.au>
2078
2079 * elf32-ppc.c (ppc_elf_check_relocs): Don't use SYMBOL_REFERENCES_LOCAL
2080 here as it's too early to reliably determine locality.
2081 (ppc_elf_gc_sweep_hook): Likewise.
c8b21ee5 2082 (SYMBOL_REFERENCES_LOCAL): Expand comment.
2b98e6c0 2083
92403579
BW
20842003-04-02 Bob Wilson <bob.wilson@acm.org>
2085
2086 * xtensa-modules.c: Remove comment indicating that this is a
2087 generated file.
2088
c45a316a
AM
20892003-04-02 Alan Modra <amodra@bigpond.net.au>
2090
2091 * elfxx-mips.c (_bfd_mips_elf_hide_symbol): Test for NULL dynobj.
2092
e0001a05
NC
20932003-04-01 Bob Wilson <bob.wilson@acm.org>
2094
8c29f035
AM
2095 * Makefile.am (ALL_MACHINES): Add cpu-xtensa.lo.
2096 (ALL_MACHINES_CFILES): Add cpu-xtensa.c.
2097 (BFD32_BACKENDS): Add elf32-xtensa.lo, xtensa-isa.lo, and
2098 xtensa-modules.lo.
2099 (BFD32_BACKENDS_CFILES): Add elf32-xtensa.c, xtensa-isa.c, and
2100 xtensa-modules.c.
2101 (cpu-xtensa.lo): New target.
2102 (elf32-xtensa.lo): Likewise.
2103 (xtensa-isa.lo): Likewise.
2104 (xtensa-modules.lo): Likewise.
2105 * Makefile.in: Regenerate.
2106 * archures.c (bfd_architecture): Add bfd_{arch,mach}_xtensa.
2107 (bfd_archures_list): Add bfd_xtensa_arch.
2108 * config.bfd: Handle xtensa-*-*.
2109 * configure.in: Handle bfd_elf32_xtensa_{le,be}_vec.
2110 * configure: Regenerate.
2111 * reloc.c: Add BFD_RELOC_XTENSA_{RTLD,GLOB_DAT,JMP_SLOT,RELATIVE,
2112 PLT,OP0,OP1,OP2,ASM_EXPAND,ASM_SIMPLIFY}.
2113 * targets.c (bfd_elf32_xtensa_be_vec): Declare.
2114 (bfd_elf32_xtensa_le_vec): Likewise.
2115 (bfd_target_vector): Add bfd_elf32_xtensa_{be,le}_vec.
2116 * cpu-xtensa.c: New file.
2117 * elf32-xtensa.c: Likewise.
2118 * xtensa-isa.c: Likewise.
2119 * xtensa-modules.c: Likewise.
2120 * libbfd.h: Regenerate.
2121 * bfd-in2.h: Likewise.
e0001a05 2122
5a6c6817
NC
21232003-04-01 Nick Clifton <nickc@redhat.com>
2124
2125 * archures.c (bfd_mach_arm_unknown): Define.
2126 * bfd-in.h (bfd_arm_merge_machines, bfd_arm+update_notes,
2127 bfd_arm_get_mach_from_notes): Prototype.
2128 * bfd-in2.h: Regenerate.
2129 * coff-arm.c (coff_arm_merge_private_bfd_data): Call
2130 bfd_arm_merge_machines.
2131 (coff_arm_final_link_postscript): Call bfd_arm_update_notes.
2132 * coffcode.h (coff_set_arch_mach_hook): Call
2133 bfd_arm_get_mach_from_notes.
2134 * coffgen.c (coff_real_object_p): Revert previous delta.
2135 * cpu_arm.c (arm_check_note): New function. Examine a note in a
2136 .note section.
2137 (bfd_arm_merge_machines): New function: Handle the merging of ARM
2138 binaries compiled for different architectures..
2139 (bfd_arm_update_notes): New function: Update an ARM note section.
2140 (bfd_arm_get_mach_from_notes): New function: Extract a bfd machine
2141 number from an ARM note section.
2142 * elf32-arm.h (elf32_arm_object_p): Use
2143 bfd_arm_get_mach_from_notes.
2144 (elf32_arm_merge_private_bfd_data): Use bfd_arm_merge_machines.
2145 (elf32_arm_final_write_processing): Use bfd_arm_update_notes.
8c29f035 2146
0cc1cf99
BE
21472003-04-01 Ben Elliston <bje@wasabisystems.com>
2148
2149 * dwarf2.c (read_attribute_value): Correct typo in comment.
2150
af3ef9fe
NC
21512003-04-01 Nick Clifton <nickc@redhat.com>
2152
2153 * dwarf2.c (concat_filename): Use bfd_malloc() and strdup()
2154 instead of concat().
2155 (decode_line_info): Only free filename if it is not NULL.
d63fd5d1
NC
2156 (add_line_info): Make a copy of the filename when storing it into
2157 the info structure.
af3ef9fe 2158
6e84a906
DJ
21592003-03-31 Andreas Schwab <schwab@suse.de>
2160 Daniel Jacobowitz <drow@mvista.com>
2161
2162 * simple.c (bfd_simple_get_relocated_section_contents): Add
2163 parameter symbol_table. Optionally use it instead of the symbol
2164 table from the bfd. Save and restore output offsets and output
2165 sections around bfd_get_relocated_section_contents. Fix a memory
2166 leak.
2167 (simple_save_output_info, simple_restore_output_info): New
2168 functions.
2169 * bfd-in2.h: Regenerate.
2170 * dwarf2.c (read_abbrevs): Use
2171 bfd_simple_get_relocated_section_contents instead of
2172 bfd_get_section_contents.
2173 (decode_line_info): Likewise.
2174 (_bfd_dwarf2_find_nearest_line): Likewise. Don't call
2175 find_rela_addend.
2176 (find_rela_addend): Remove.
2177 * elfxx-ia64.c (elfNN_ia64_reloc): Weaken sanity check for
2178 debugging sections.
2179 (elfNN_ia64_hash_table_create): Create the hash table with malloc,
2180 not bfd_zalloc.
2181
5ed6aba4
NC
21822003-03-31 David Heine <dlheine@suif.stanford.edu>
2183
2184 * aoutx.h (aout_link_hash_table_create): Use bfd_malloc instead of
2185 bfd_alloc.
2186 * dwarf2.c (concat_filename): Always allocate space for the
2187 returned filename.
2188 (decode_line_info): Free the allocated filename returned by
2189 concat_filename.
2190 * elf-eh-frame.c (bfd_elf_write_section_eh_frame): Fix memory leaks.
2191 * elf.c (copy_private_bfd_data): Likewise.
2192 (_bfd_elf_slurp_version_tables): Fix bug freeing contents pointer.
2193 * elflink.h (elf_link_sort_relocs): Fix memory leak.
2194 * format.c (bfd_check_format_matches): Likewise.
2195 * linker.c (bfd_generic_final_link): Likewise.
2196 * opncls.c (find_separate_debug_info): Likewise.
2197 * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
8c29f035 2198
5941afc1
L
21992003-03-28 H.J. Lu <hjl@gnu.org>
2200
2201 * elflink.h (elf_link_add_object_symbols): Correctly combine
2202 visibilities.
2203
9d73f260
JJ
22042003-03-27 Jakub Jelinek <jakub@redhat.com>
2205
2206 * elfxx-ia64.c (elfNN_ia64_relax_section): Reset self_dtpmod_offset
2207 to -1 before recomputing got offsets.
2208
a5ad465a
AS
22092003-03-26 Andreas Schwab <schwab@suse.de>
2210
2211 * elf32-m68k.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
2212 (elf_m68k_relocate_section): Use it to correctly handle symbols
2213 forced to be local.
2214 (elf_m68k_finish_dynamic_symbol): Emit RELATIVE reloc for got
2215 entries for symbols that are forced to be local.
2216
d0647110
AO
22172003-03-25 Alexandre Oliva <aoliva@redhat.com>
2218
2219 * elfxx-mips.c (_bfd_mips_relax_section): New function.
2220 * elfxx-mips.h (_bfd_mips_relax_section): Declare.
2221 * elfn32-mips.c, elf64-mips.c: Use it.
2222
e16bb312
NC
22232003-03-25 Stan Cox <scox@redhat.com>
2224 Nick Clifton <nickc@redhat.com>
8c29f035 2225
9b5ecbd0 2226 Contribute support for Intel's iWMMXt chip - an ARM variant:
e16bb312
NC
2227
2228 * archures.c: Add bfd_mach_arm_iWMMXt.
2229 * reloc.c: Add BFD_RELOC_ARM_CP_OFF_IMM_S2.
2230 * bfd-in2.h: Regenerate.
2231 * libbfd.h: Regenerate.
2232 * coff-arm.c (coff_arm_merge_private_bfd_data): Allow iWMMXt
2233 object files to be linked with XScale ones.
2234 (coff_arm_final_link_postscript): Update note section.
2235 * coffcode.h (coff_set_arch_mach_hook): Handle note section.
2236 * coffgen.c (coff_real_object_p): Call bfd_coff_set_arch_mach_hook
2237 after identifying a coff binary.
2238 * cpu-arm.c (processors): Add iWMMXt.
2239 (arch_inf): Likewise.
2240 * elf32-arm.h (arm_object_p): Handle note section.
9b5ecbd0 2241 (elf32_arm_merge_private_bfd_data): Allow iWMMXt object files to
e16bb312
NC
2242 be linked with XScale ones.
2243 (elf32_arm_section_flags): New function: Set flags on note section.
2244 (elf32_arm_final_write_processing): Handle note section.
2245
25f14c34
DD
22462003-03-21 DJ Delorie <dj@redhat.com>
2247
2248 * elf32-xstormy16.c (elf32_xstormy16_relocate_section): Call
2249 _bfd_elf_rela_local_sym.
2250
04b3329b
L
22512003-03-20 H.J. Lu <hjl@gnu.org>
2252
2253 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't try relax for
2254 non-ELF outputs.
2255
c25cfdf8
NC
22562003-03-20 Nick Clifton <nickc@redhat.com>
2257
2258 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Initialise $idata2 and
2259 $idata5 in case bfd_coff_final_link is not called.
2260
3e1d7f19
JJ
22612003-03-19 Jakub Jelinek <jakub@redhat.com>
2262
2263 * elf64-sparc.c (struct sparc64_elf_section_data): Add reloc_count
2264 field.
2265 (canon_reloc_count): Define.
2266 (sparc64_elf_slurp_one_reloc_table, sparc64_elf_slurp_reloc_table,
2267 sparc64_elf_canonicalize_dynamic_reloc): Use it instead of
2268 reloc_count.
2269 (sparc64_elf_canonicalize_reloc): New routine.
2270 (bfd_elf64_canonicalize_reloc): Define.
2271
3fa1d917
JJ
22722003-03-18 Jakub Jelinek <jakub@redhat.com>
2273
2274 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle relaxation
2275 againt mergeable sections. Take r_addend into account when caching
2276 trampolines.
2277
f86b235a
RH
22782003-03-18 Richard Henderson <rth@redhat.com>
2279
8c29f035
AM
2280 * elfxx-ia64.c (get_dyn_sym_info): Return NULL gracefully for
2281 local symbols that have no dyninfo.
f86b235a 2282
49ae03bf
NC
22832003-03-14 Gene Smith <gene.smith@siemens.com>
2284
2285 * ieee.c (ieee_write_expression): Handle the case where symbol is
2286 NULL.
2287 General formatting improvements.
2288
6a457e5c
NC
22892003-03-13 Nick Clifton <nickc@redhat.com>
2290
2291 * configure.in (LINGUAS): Add zh_CN.
2292 * configure: Regenerate.
2293 * po/zh_CN.po: New file.
2294
93516ec3
NC
22952003-03-13 Elias Athanasopoulos <elathan@phys.uoa.gr>
2296
2297 * aout-cris.c (BYTES_IN_WORD): Don't define.
2298 aout-encap.c: Likewise.
2299 aout-ns32k.c: Likewise.
2300 aout-tic30.c: Likewise.
2301 hp300bsd.c: Likewise.
2302 i386aout.c: Likewise.
2303 i386dynix.c: Likewise.
2304 i386linux.c: Likewise.
2305 i386lynx.c: Likewise.
2306 i386mach3.c: Likewise.
2307 m68k4knetbsd.c: Likewise.
2308 m68klinux.c: Likewise.
2309 m68klynx.c: Likewise.
2310 m68knetbsd.c: Likewise.
2311 m88kmach3.c: Likewise.
2312 mipsbsd.c: Likewise.
2313 newsos3.c: Likewise.
2314 sparclinux.c: Likewise.
2315 sparclynx.c: Likewise.
2316 sparcnetbsd.c: Likewise.
2317 vaxbsd.c: Likewise. Fix comment formatting.
2318
fee24f1c
AO
23192003-03-12 Alexandre Oliva <aoliva@redhat.com>
2320
0b25d3e6
AO
2321 * Reverted 2003-03-02's patch.
2322
fee24f1c
AO
2323 * elfxx-target.h (bfd_elfNN_canonicalize_reloc): Make it
2324 overridable.
2325 * elf64-mips.c (mips_elf64_canonicalize_reloc,
2326 mips_elf64_get_dynamic_reloc_upper_bound,
2327 mips_elf64_canonicalize_dynamic_reloc): New, adapted from elf.c.
2328 (bfd_elf64_get_canonicalize_reloc,
2329 bfd_elf64_get_dynamic_reloc_upper_bound,
2330 bfd_elf64_canonicalize_dynamic_reloc): Define.
2331 (mips_elf64_slurp_reloc_table): Support dynamic.
2332 (mips_elf64_slurp_one_reloc_table): Adjust.
2333
64fb1839
NC
23342003-03-12 Nick Clifton <nickc@redhat.com>
2335
2336 * xsym.c (bfd_sym_fetch_type_information_table_entry): Change
2337 'index' to 'offset' in test for zero value.
2338
908488f1
AO
23392003-03-11 Alexandre Oliva <aoliva@redhat.com>
2340
2341 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Do not create
2342 dynamic relocations pointing to local or section symbols, use the
2343 NULL symbol instead. Document the choice to not emit an
2344 additional R_MIPS_64 relocation.
2345
e515b051
AM
23462003-03-11 Alan Modra <amodra@bigpond.net.au>
2347
2348 * elf32-ppc.c (ppc_elf_relocate_section): Subtract tls seg vma from
2349 zero index dynamic tls relocs generated for the GOT. Tidy code.
2350 Set "relocation" to 1 on DTPMOD32 relocs. Optimize HA adjustment.
2351 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
2352
a23b6845
AM
23532003-03-07 Alan Modra <amodra@bigpond.net.au>
2354
87d243f1
AM
2355 * elf32-ppc.c (ppc_elf_relocate_section): Don't look for a nop after
2356 a tls_get_addr call.
2357
a23b6845
AM
2358 * elf32-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
2359 (ppc_elf_adjust_dynamic_symbol): For weak symbols, copy
2360 ELF_LINK_NON_GOT_REF from weakdef.
2361 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
2362 (ppc64_elf_adjust_dynamic_symbol): For weak symbols, copy
2363 ELF_LINK_NON_GOT_REF from weakdef.
2364 * elf32-i386.c (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
2365 (elf_i386_adjust_dynamic_symbol): For weak symbols, copy
2366 ELF_LINK_NON_GOT_REF from weakdef.
2367
2d36fe5f
AH
23682003-03-06 Jakub Jelinek <jakub@redhat.com>
2369 Andrew Haley <aph@redhat.com>
2370
2371 * elflink.h (elf_bfd_discard_info): Don't process eh frames if
2372 output is relocateable.
2373
34f304a7
NC
23742003-03-06 Steven Konopa <skonopa@kgo.csc.com>
2375
2376 * som.c (som_fixup_formats): Correct formats for R_AUX_UNWIND and
2377 R_COMMENT.
2378
7b609f53
AM
23792003-03-06 Alan Modra <amodra@bigpond.net.au>
2380
2381 * elf32-ppc.c (ppc_elf_create_linker_section): Don't capitalize
2382 error messages.
2383 (ELIMINATE_COPY_RELOCS): Define to zero.
2384 (ppc_elf_relocate_section): Don't deref htab->tls_sec when calculating
2385 TLSLD relocs. Report reloc types on a number of errors. Optimize
2386 LOCAL24PC check for non-local syms. Don't capitalize error messages.
2387 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define to zero.
2388 (ppc64_elf_relocate_section): Don't deref htab->tls_sec when
2389 calculating TLSLD relocs. Report reloc types on a number of errors.
2390 Don't capitalize error messages.
2391
6a0fb186
L
23922003-03-03 H.J. Lu <hjl@gnu.org>
2393
2394 * elfxx-ia64.c (USE_BRL): Removed.
2395 (oor_ip): Removed.
2396
34f304a7 23972003-03-03 J"orn Rennecke <joern.rennecke@superh.com>
bdfaef52
JR
2398
2399 * elf32-sh.c (sh_elf_howto_tab): Make R_SH_IND12W into an ordinary
2400 relocation (no special function), and make it non-partial_inplace.
2401 (sh_elf_relax_section): When creating a bsr, use a consistent value
2402 no matter if the symbol is extern or not; set addend to -4.
2403 Don't swap load / non-load instructions for SH4.
2404 (sh_elf_relax_delete_bytes): In R_SH_IND12W case, check the offset
2405 rather than if the symbol is external to determine if adjusting the
2406 offset makes sense. Adjust the addend too if appropriate.
2407 (sh_elf_relocate_section): In R_SH_IND12W, don't fiddle with the
2408 relocation.
2409
a9d68a1e
NC
24102003-03-03 Nick Clifton <nickc@redhat.com>
2411
2412 * po/da.po: Installed latest translation.
2413
7c2be35c
TS
24142003-03-02 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2415
2416 * elf32-mips.c (elf_mips_howto_table_rel): Change definition of
2417 R_MIPS_PC16 to rightshift 2.
2418 (elf_reloc_map mips_reloc_map): Map to rightshifted BFD reloc.
2419 (bfd_elf32_bfd_reloc_type_lookup): Support
2420 BFD_RELOC_MIPSEMB_16_PCREL_S2.
2421 * elf64-mips.c (mips_elf64_howto_table_rel): Change definition of
2422 R_MIPS_PC16 to rightshift 2.
2423 (mips_elf64_howto_table_rela): Likewise.
2424 (mips_reloc_map): Map to rightshifted BFD reloc.
2425 * elfn32-mips.c: The same as in elf64-mips.c.
2426 * elfxx-mips.c (mips_elf_got_for_ibfd): Typo in comment.
2427 (mips_elf_calculate_relocation): Handle rightshifted addends for
2428 R_MIPS_PC16.
2429 * reloc.c (BFD_RELOC_MIPSEMB_16_PCREL_S2): New BFD relocation for
2430 MIPS Embedded PIC. Remove superfluous empty COMMENT.
2431 * libbfd.h: Regenerate.
2432 * bfd-in2.h: Regenerate.
2433
484a4f9c
RH
24342003-02-28 Richard Henderson <rth@redhat.com>
2435
2436 * elfxx-ia64.c (elfNN_ia64_relax_section): Correct bounds
2437 for ltoff22x relaxation.
2438
2ce40c65
AM
24392003-03-01 Alan Modra <amodra@bigpond.net.au>
2440
2441 * bfd-in.h (_bfd): Don't define.
2442 * bfd.c: Rename occurrences of "struct _bfd" to "struct bfd".
2443 * syms.c: Likewise.
2444 * bfd-in2.h: Regenerate.
2445
2c4c2bc0
RH
24462003-02-27 Richard Henderson <rth@redhat.com>
2447
2448 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add want_gotx;
2449 (elfNN_ia64_check_relocs): Set it.
2450 (allocate_global_data_got): Check it.
2451 (allocate_local_got): Likewise.
2452 (allocate_dynrel_entries): Likewise.
2453 (elfNN_ia64_relax_ldxmov): New.
2454 (elfNN_ia64_relax_section): Handle LTOFF22X, LDXMOV.
2455 (elfNN_ia64_choose_gp): Split out from ...
2456 (elfNN_ia64_final_link): ... here.
8c29f035 2457
c2852e88
AC
24582003-02-27 Andrew Cagney <cagney@redhat.com>
2459
2460 * bfd.c (struct bfd): Rename "struct _bfd".
2461 * bfd-in.h: Update copyright.
2462 (struct bfd): Rename "struct _bfd".
2463 (_bfd): Define for backward compatibility.
2464 * bfd-in2.h: Regenerate.
2465
3f87cb70
AM
24662003-02-25 Alan Modra <amodra@bigpond.net.au>
2467
3f9a32bd
AM
2468 * elflink.h (elf_bfd_final_link): Apportion reloc counts to rel_hdr
2469 and rel_hdr2 when initially counting input relocs rather than after
2470 creating output reloc sections.
4fabe71e
AM
2471 (elf_link_read_relocs_from_section): Don't abort with wrong reloc
2472 sizes.
3f9a32bd 2473
3f87cb70
AM
2474 * Makefile.am: Run "make dep-am".
2475 * Makefile.in: Regenerate.
2476
07c6e936
NC
24772003-02-24 Kris Warkentin <kewarken@qnx.com>
2478
2479 * elf.c (elfcore_read_notes): Add check for QNX style core file.
2480 (elfcore_grog_nto_note): New function.
2481 (elfcore_grog_nto_gregs): New function.
2482 (elfcore_grog_nto_status): New function.
2483
aad5d350
AM
24842003-02-24 Alan Modra <amodra@bigpond.net.au>
2485
2486 * elflink.c (_bfd_elf_create_got_section): Check existing .got
2487 section flags before concluding that we've already been called.
2488 Don't use register keyword.
2489 (_bfd_elf_create_dynamic_sections): Don't use register keyword.
2490 (_bfd_elf_create_linker_section): Formatting.
2491
2ab1486e
NC
24922003-02-20 jmc <jmc@prioris.mini.pw.edu.pl>
2493
2494 * coff-h8300.c: Fix typo: intial -> initial.
2495 * coff-ppc.c: Likewise.
2496
70bccea4
AM
24972003-02-20 Alan Modra <amodra@bigpond.net.au>
2498
2499 * elf32-ppc.c: Formatting.
2500 (allocate_dynrelocs): LD and GD relocs against the same sym need
2501 separate GOT entries.
2502 (ppc_elf_relocate_section): Correct GOT handling for multiple GOT
2503 entries per symbol.
2504
ee05f2fe
AM
25052003-02-19 Alan Modra <amodra@bigpond.net.au>
2506
26e41594
AM
2507 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Simplify dynamic reloc
2508 removal. Localize vars. Remove unnecessary dynobj test.
2509 * elf32-i386 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead
2510 of INFO.
2511 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
2512 and optimize.
2513 (elf_i386_relocate_section): Likewise.
2514 (elf_i386_gc_sweep_hook): Simplify dyn reloc removal. Localize vars.
2515 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
2516 * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
2517 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
2518 * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
2519 * elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise. Remove
2520 local_dynrel for section too. Don't touch HIPLT22, LOPLT10, PCPLT32
2521 or PCPLT10 relocs. Don't subtract twice on PLT32 relocs.
2522 Formatting.
2523
f4656909
AM
2524 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define.
2525 (ppc64_elf_check_relocs): Use it. Correct comment. Move SEC_ALLOC
2526 test.
2527 (ppc64_elf_adjust_dynamic_symbol): Use ELIMINATE_COPY_RELOCS.
2528 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
2529 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
2530 and optimize. Use ELIMINATE_COPY_RELOCS.
2531 (ppc64_elf_relocate_section): Likewise.
2532
ee05f2fe
AM
2533 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Add pc_count field.
2534 (ppc_elf_copy_indirect_symbol): Copy pc_count field.
2535 (ELIMINATE_COPY_RELOCS): Define.
2536 (ppc_elf_adjust_dynamic_symbol): Convert copy relocs to dynamic.
2537 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
2538 (MUST_BE_DYN_RELOC): Define.
2539 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
2540 and optimize. Trim dyn_relocs.
2541 (ppc_elf_check_relocs): Don't generate dyn_relocs when we know they'll
2542 not be used. Do generate dyn_relocs for copy reloc avoidance. Keep
2543 track of pc_rel dyn relocs.
2544 (ppc_elf_relocate_section): Remove "will_become_local". Adjust
2545 WILL_CALL_FINISH_DYNAMIC_SYMBOL use. Trim dyn relocs as per
2546 allocate_dynrelocs. Don't recalculate "sec".
2547
7619e7c7
AM
25482003-02-18 Alan Modra <amodra@bigpond.net.au>
2549
d881513a
AM
2550 * elf32-ppc.c (ppc_elf_relocate_section): Remove unnecessary test.
2551 * elf64-ppc.c (ppc64_elf_tls_optimize): Decrement tlsld_got.refcount
2552 on invalid LD relocs.
2553 (allocate_dynrelocs): Invalid LD relocs don't use tlsld_got entry.
2554 (ppc64_elf_relocate_section): Unify new handling of LD relocs and
2555 tlsld_got entry. Use IS_PPC64_TLS_RELOC.
2556
7619e7c7
AM
2557 * elf32-ppc.h: New file.
2558 * elf32-ppc.c: Include elf32-ppc.h.
2559 (NOP, CROR_151515, CROR_313131, TP_OFFSET, DTP_OFFSET): Define.
2560 (struct ppc_elf_link_hash_entry): Rename "root" to "elf". Adjust uses.
2561 Add "tls_mask" field.
2562 (TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL, TLS_TLS, TLS_TPRELGD): Define.
2563 (struct ppc_elf_link_hash_table): Rename "root" to "elf". Adjust uses.
2564 Add got, relgot, plt, relplt, dynbss, relbss, dynsbss, relsbss,
2565 sdata, sdata2, tls_sec, tls_get_addr, tlsld_got fields.
2566 Make use of htab shortcuts throughout file.
2567 (ppc_elf_link_hash_newfunc): Init tls_mask field.
2568 (ppc_elf_link_hash_table_create): Init new fields.
2569 (ppc_elf_copy_indirect_symbol): Copy tls_mask.
2570 (ppc_elf_howto_raw): Add tls relocs.
2571 (ppc_elf_reloc_type_lookup): Handle them.
2572 (ppc_elf_unhandled_reloc): New function.
2573 (ppc_elf_create_got): Stash got section pointer in hash table,
2574 return status. Make .rela.got too.
2575 (ppc_elf_create_dynamic_sections): Stash section pointers in htab.
2576 (ppc_elf_adjust_dynamic_symbol): Only set up copy relocs when
2577 NON_GOT_REF set. Don't allocate space in .plt here..
2578 (allocate_dynrelocs): ..do so here instead, properly ref-counting and
2579 not allocating plt entries unnecessarily. Allocate got entries here.
2580 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
2581 (ppc_elf_size_dynamic_sections): Allocate local got entries. Pass
2582 "info" during allocate_dynrelocs hash traversal. Use htab section
2583 shortcuts rather than searching for named sections. Get rid of
2584 "plt" and "strip" booleans.
2585 (update_local_sym_info, bad_shared_reloc): New functions.
2586 (ppc_elf_check_relocs): Handle TLS relocs. Move .rela.got creation to
2587 ppc_elf_create_got. Don't mark got or plt reloc syms dynamic, do so
2588 in allocate_dynreloc. Use update_local_sym_info and bad_shared_reloc.
2589 Disallow R_PPC_EMB_RELSDA, R_PPC_EMB_NADDR32, R_PPC_EMB_NADDR16,
2590 R_PPC_EMB_NADDR16_LO, R_PPC_EMB_NADDR16_HI and R_PPC_EMB_NADDR16_HA
2591 in shared libs. R_PPC_PLTREL32 is a plt reloc too. Refcount all
2592 relocs that might use a plt entry. Set NON_GOT_REF too.
2593 Enumerate all do-nothing relocs.
2594 (ppc_elf_gc_sweep_hook): Simplify removal of dynrelocs. Handle
2595 tls relocs and all plt relocs.
2596 (ppc_elf_tls_setup, ppc_elf_tls_optimize): New functions.
2597 (ppc_elf_finish_dynamic_symbol): Don't build got entries here.
2598 (ppc_elf_finish_dynamic_sections): Rewrite tag code using htab
2599 shortcuts.
2600 (ppc_elf_relocate_section): Tidy. Handle TLS relocs. Use
2601 bfd_elf_local_sym_name. Simplify unresolved reloc code. Build got
2602 entries and got relocs here. Warn on non-zero got reloc addend.
2603 Split out branch taken/not taken reloc code into a separate switch
2604 and correct offset calculation. Allow BRTAKEN/BRNTAKEN dynamic relocs.
2605 Split out HA reloc adjustments to separate switch statement. Don't
2606 warn on reloc overflow if we've already warned about undefined.
2607 Don't rebuild sym name when reporting errors. Report all possible
2608 errors from _bfd_final_link_relocate.
2609 (bfd_elf32_bfd_final_link): Don't define.
2610
cd27b276
AM
26112003-02-18 Alan Modra <amodra@bigpond.net.au>
2612
2613 * elf64-ppc.c (ppc64_elf_relocate_section): Don't init "r". Don't
2614 rebuild sym name when reporting errors.
2615
ae9a127f
NC
26162003-02-17 Nick Clifton <nickc@redhat.com>
2617
3f9a32bd 2618 * elflink.h (elf_link_output_extsym): Only check
ae9a127f
NC
2619 allow_shlib_undefined for shared libraries.
2620 * elf32-i386.c (elf_i386_relocate_section): Remove bogus check
2621 of allow_shlib_undefined.
2622 * elf32-cris.c (cris_elf_relocate_section): Likewise.
2623 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
2624 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
2625 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2626 * elf32-s390.c (elf_s390_relocate_section): Likewise.
2627 * elf32-sh.c (sh_elf_relocate_section): Likewise.
2628 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
2629 * elf32-vax.c (elf_vax_relocate_section): Likewise.
2630 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
2631 * elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
2632 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
2633 * elf64-s390.c (elf_s390_relocate_section): Likewise.
2634 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
2635 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
2636 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
2637 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
2638
b5f852ea
NC
26392003-02-17 Nick Clifton <nickc@redhat.com>
2640
2641 * elf.c (SEGMENT_AFTER_SEGMENT): Add third parameter - the
2642 address field to use in the comparison.
3f9a32bd 2643 (SEGMENT_OVERLAPS): Check that LMAs overlap as well.
b5f852ea 2644
3193e234
NC
26452003-02-14 Bob Wilson <bob.wilson@acm.org>
2646
2647 * elfcore.h (elf_core_file_p): Compare alternate machine codes for ELF
2648 backends when checking if the generic ELF target should be used.
2649
21efdc8d
NC
2650 * syms.c (_bfd_stab_section_find_nearest_line): For line number stabs
2651 outside of functions, treat values as absolute addresses.
2652
ed781d5d
NC
2653 * bfd.c: Change embedded documentation to use consistent indentation
2654 and to split up long lines. Change informal style of description
2655 for functions lacking real documentation.
2656 * coffcode.h: Break up long lines in embedded documentation.
2657 * format.c: Likewise.
2658 * targets.c: Likewise.
2659 * libcoff.h: Regenerate.
2660 * bfd-in2.h: Regenerate.
2661
58ac9f71
AM
26622003-02-14 Alan Modra <amodra@bigpond.net.au>
2663
2664 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Init tls_get_addr.
2665 (ppc64_elf_copy_indirect_symbol): Merge tls_mask too.
2666 (ppc64_elf_gc_sweep_hook): Simplify removal of dyn_relocs.
2667 (allocate_dynrelocs): Don't treat undefined and undefweak specially.
2668 (ppc_size_one_stub): Fix warning, and tighten plt entry check.
2669 (group_sections): Don't share a stub section if stubs are for a large
2670 section. Adjust comment.
2671 (ppc64_elf_size_stubs): Roughly double the size left for stubs if
2672 !stubs_always_before_branch.
2673 (ppc64_elf_relocate_section): Initialize tlsld GOT entry once. Don't
2674 treat undefined and undefweak specially when processing dyn relocs.
2675
9147e853
JJ
26762003-02-13 Jakub Jelinek <jakub@redhat.com>
2677
2678 * elflink.h (elf_link_add_object_symbols): Handle .symver x, x@FOO.
2679
427bfd90
NC
26802003-02-13 Nick Clifton <nickc@redhat.com>
2681
2682 * elf32-arm.h (elf32_thumb_to_arm_stub): Include section VMAs
2683 in computation of offset to insert into BL instruction.
2684
42b5d0ea
NC
26852003-02-11 Uwe Stieber <uwe@wwws.de>
2686
2687 * config.bfd: Add support for kaOS as cross build target system.
2688
a48ebf4d
AM
26892003-02-11 Alan Modra <amodra@bigpond.net.au>
2690
2691 * elf64-ppc.c (ppc64_elf_check_relocs): Match versioned
2692 .__tls_get_addr too.
2693 (ppc64_elf_tls_setup): Ensure cached tls_get_addr is not indirect.
2694
c95b8a7a
KK
26952003-02-10 Kaz kojima <kkojima@rr.iij4u.or.jp>
2696
2697 * elf32-sh.c (elf_sh_dyn_relocs): Add tls_tpoff32 field.
2698 (elf_sh_link_hash_entry): Remove tls_tpoff32 field.
2699 (sh_elf_link_hash_newfunc): Remove the initialization of
2700 tls_tpoff32 field.
2701 (allocate_dynrelocs): Keep dyn_relocs if it includes the entry
2702 for which tls_tpoff32 flag is set.
2703 (sh_elf_relocate_section): Covert to LE only if the dyn_relocs
2704 of the symbol includes the entry matched with the input_section
2705 and having tls_tpoff32 flag on. When linking statically, set
2706 symbol index of R_SH_TLS_TPOFF32 relocation to zero if the symbol
2707 is defined in this executable.
2708 (sh_elf_check_relocs): Set tls_tpoff32 flag appropriately.
2709
a779acda
JJ
27102003-02-10 Jakub Jelinek <jakub@redhat.com>
2711
2712 * elf32-s390.c (elf_s390_size_dynamic_sections): Set relocs to TRUE
2713 even if there is just non-empty .rela.plt.
2714
fde78edd
NC
27152003-02-10 Nick Clifton <nickc@redhat.com>
2716
2717 * archures.c (bfd_mach_arm_ep9312): Define.
2718 * bfd-in2.h: Regenerate.
2719 * cpu-arm.c (processors[]): Add ep9312.
2720 (bfd_arm_arch): Add ep9312.
2721 * elf32-arm.h (elf32_arm_merge_private_data): Update error
2722 messages and add test for Maverick floating point support.
2723 (elf32_arm_print_private_bfd_data): Handle
2724 EF_ARM_MAVERICK_FLOAT flag.
c178919b
NC
2725 (elf32_arm_object_p): New function.
2726 (elf_backend_object_p): Define.
fde78edd 2727
e7b938ca
AM
27282003-02-10 Alan Modra <amodra@bigpond.net.au>
2729
2730 * elf64-ppc.c: Rename assorted occurrences of tls_type and similar
2731 variables, structure fields or function params to tls_mask or
2732 similar to better reflect usage.
2733 (struct got_entry): Comment.
9b5ecbd0 2734 (struct ppc_link_hash_entry): Expand comment, and renumber TLS_*.
e7b938ca
AM
2735 (get_tls_mask): Rename from get_tls_type.
2736
951fd09b
AM
27372003-02-09 Alan Modra <amodra@bigpond.net.au>
2738
2739 * elf64-ppc.c (TLS_GD_LD): Don't define..
2740 (TLS_GD): ..define this instead and update all uses.
2741 (TLS_TPRELGD): Define.
2742 (ppc64_elf_link_hash_table_create): Tweak initialization of
2743 init_refcount and init_offset.
2744 (ppc64_elf_check_relocs): Add one extra element to t_symndx array.
2745 Mark second slot of GD or LD toc entries.
2746 (get_tls_type): Return an int. Distinguish toc GD and LD entries
2747 from other tls types.
2748 (ppc64_elf_tls_setup): New function, split out from..
2749 (ppc64_elf_tls_optimize): ..here. Don't optimize when symbols are
2750 defined in a dynamic object. Fix LD optimization. Don't set TLS_TPREL
2751 on GD->IE optimization, use TLS_TPRELGD instead. Use get_tls_type
2752 return value to properly decide whether toc GD and LD entries can
2753 optimize away __tls_get_addr call. Check next reloc after DTPMOD64
2754 to determine GD or LD rather than looking at TLS_LD flag. Don't
2755 attempt to adjust got entry tls_type here..
2756 (allocate_dynrelocs): ..instead, adjust got entry tls_type here, and
2757 look for possible merges.
2758 (ppc64_elf_size_dynamic_sections): Adjust local got entries for
2759 optimization.
2760 (ppc64_elf_size_stubs): Tweak __tls_get_addr fudge.
2761 (ppc64_elf_relocate_section): Rename some vars to better reflect usage.
2762 Make use of return value from get_tls_type to properly detect GD and
2763 LD optimizations. Split tlsld/gd hi/ha from lo/ds case. Don't
2764 handle tls_get_addr removal when looking at REL24 relocs, do it when
2765 looking at the previous reloc. Check reloc after DTPMOD64 to determine
2766 GD or LD.
2767 * elf64-ppc.h (ppc64_elf_tls_setup): Declare.
2768
acc990f2
AM
27692003-02-08 Alan Modra <amodra@bigpond.net.au>
2770
00b28bb0
AM
2771 * elf32-hppa.c (group_sections): Don't share a stub section if
2772 stubs are for a large section.
2773
acc990f2
AM
2774 * elf32-hppa.c (elf32_hppa_size_stubs): Double the size left for
2775 stubs if !stubs_always_before_branch.
2776
589e6347
NC
27772003-02-07 Nick Clifton <nickc@redhat.com>
2778
2779 * elf.c (swap_out_syms): Generate an error message if an
2780 equivalent output section cannot be found for a symbol.
2781
c328dc3f
JJ
27822003-02-07 Jakub Jelinek <jakub@redhat.com>
2783
2784 * elf64-alpha.c (elf64_alpha_relax_section): Don't crash if
2785 local_got_entries is NULL.
2786
84f97cb6
AS
27872003-02-06 Andreas Schwab <schwab@suse.de>
2788
2789 * elf-eh-frame.c (get_DW_EH_PE_signed): Define.
2790 (read_value): Add parameter is_signed, use signed extraction if
2791 the value is signed.
2792 (_bfd_elf_write_section_eh_frame): Pass signed flag of the
2793 encoding to read_value.
2794
6349e628
AM
27952003-02-06 Alan Modra <amodra@bigpond.net.au>
2796
2797 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy got and
2798 plt info when called to transfer weak sym info.
2799
411e1bfb
AM
28002003-02-05 Alan Modra <amodra@bigpond.net.au>
2801
2802 * reloc.c: Add PPC and PPC64 TLS relocs.
2803 * libbfd.h: Regenerate.
2804 * bfd-in2.h: Regenerate.
2805 * elf64-ppc.c (TP_OFFSET, DTP_OFFSET): Declare.
2806 (ppc64_elf_howto_raw): Add TLS howto's. Adjust R_PPC64_NONE to be
2807 against a 32 bit field.
2808 (ppc64_elf_reloc_type_lookup): Handle TLS relocs.
2809 (_ppc64_elf_section_data): Add t_symndx and comments.
2810 (ppc64_elf_section_data): Use elf_section_data macro.
2811 (ppc64_elf_new_section_hook): American spelling.
2812 (struct got_entry, struct plt_entry): New.
2813 (MUST_BE_DYN_RELOC): Rename from IS_ABSOLUTE_RELOC.
2814 (struct ppc_stub_hash_entry): Add "addend" field.
2815 (struct ppc_link_hash_entry): Add "tls_type".
2816 (TLS_TLS, TLS_GD_LD, TLS_LD, TLS_TPREL, TLS_DTPREL,
2817 TLS_EXPLICIT): Define.
2818 (struct ppc_link_hash_table): Add tls_sec, tls_get_addr, tlsld_got.
2819 (link_hash_newfunc): Init new fields.
58ac9f71 2820 (ppc64_elf_link_hash_table_create): Likewise. Set init_refcount and
411e1bfb
AM
2821 init_offset to NULL.
2822 (ppc64_elf_copy_indirect_symbol): Copy got and plt info. Don't call
2823 _bfd_elf_link_hash_copy_indirect, rather insert relevant code from
2824 there.
2825 (update_local_sym_info, update_plt_info): New functions.
2826 (ppc64_elf_check_relocs): Use them. Handle TLS relocs. Adjust GOT
2827 handling to use got.glist rather than got.refcount. Likewise for PLT.
2828 (ppc64_elf_gc_sweep_hook): Handle TLS relocs, new GOT and PLT lists.
2829 (func_desc_adjust): Adjust for new PLT list.
2830 (ppc64_elf_adjust_dynamic_symbol): Likewise.
2831 (get_sym_h, get_tls_type): New functions.
2832 (ppc64_elf_edit_opd): Remove unused variable. Use get_sym_h.
2833 (ppc64_elf_tls_optimize): New function.
2834 (allocate_dynrelocs): Adjust for new PLT and GOT lists. Allocate
2835 TLS relocs.
2836 (ppc64_elf_size_dynamic_sections): Likewise.
2837 (ppc_type_of_stub): Adjust for new PLT list.
2838 (ppc_build_one_stub): Likewise.
2839 (ppc64_elf_size_stubs): Likewise. Use get_sym_h. Treat __tls_get_addr
2840 calls specially.
2841 (ppc64_elf_relocate_section): Adjust for new GOT and PLT lists. Handle
2842 TLS relocs. Report local syms using bfd_elf_local_sym_name. Don't
2843 init GOT entries that have a reloc. Generate GOT relocs here..
2844 (ppc64_elf_finish_dynamic_symbol): ..not here. Adjust for PLT list.
2845 * elf64-ppc.h (ppc64_elf_tls_optimize): Declare.
2846
0cca5f05
AS
28472003-02-04 Andreas Schwab <schwab@suse.de>
2848
2849 * elf32-m68k.c (elf_m68k_hash_entry): Define.
2850 (elf_m68k_link_hash_traverse): Remove.
2851 (elf_m68k_link_hash_newfunc): Use struct bfd_hash_entry and
2852 elf_m68k_hash_entry instead of struct elf_m68k_link_hash_entry to
2853 reduce casting.
2854 (elf_m68k_check_relocs): Use elf_m68k_hash_entry instead of
2855 casting.
2856 (elf_m68k_size_dynamic_sections): Use elf_link_hash_traverse
2857 instead of elf_m68k_link_hash_traverse.
2858 (elf_m68k_discard_copies): Change first parameter to pointer to
2859 struct elf_link_hash_entry and use elf_m68k_hash_entry when struct
2860 elf_m68k_link_hash_entry is needed.
2861
5cab59f6
AM
28622003-02-04 Alan Modra <amodra@bigpond.net.au>
2863
2864 * elf-bfd.h (struct got_entry, struct plt_entry): Forward declare.
2865 (struct elf_link_hash_entry): Add "glist" and "plist" fields to
2866 "got" union, and declare as gotplt_union. Use gotplt_uinion for
2867 "plt" field.
2868 (struct elf_link_hash_table): Make "init_refcount" a gotplt_union.
2869 Add "init_offset" field.
2870 (struct elf_obj_tdata <local_got>): Add "struct got_entry **" to union.
2871 (elf_local_got_ents): Declare.
2872 * elf.c (_bfd_elf_link_hash_newfunc): Adjust initialization of "got"
2873 and "plt".
2874 (_bfd_elf_link_hash_hide_symbol): Use "init_offset".
2875 (_bfd_elf_link_hash_table_init): Set "init_offset".
2876 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set init_refcount
2877 from init_offset.
2878 (elf_adjust_dynamic_symbol): Set plt and got offsets using init_offset.
2879
2880 * elf.c (bfd_elf_local_sym_name): Split out from..
2881 (group_signature): ..here.
2882 * elf-bfd.h (bfd_elf_local_sym_name): Declare.
2883
68bfbfcc
AM
28842003-02-04 Alan Modra <amodra@bigpond.net.au>
2885
2886 * elf-bfd.h (enum elf_link_info_type): Remove.
2887 (struct bfd_elf_section_data): Move sec_info_type, use_rela_p fields
2888 to struct sec. Remove linkonce_p field.
2889 (elf_linkonce_p): Delete.
2890 (elf_discarded_section): Update for sec_info_type change.
2891 * section.c (struct sec): Add sec_info_type, use_rela_p, has_tls_reloc,
2892 flag11, flag12, flag13, flag14, flag15, flag16, flag20, flag24.
2893 (ELF_INFO_TYPE_NONE): Define.
2894 (ELF_INFO_TYPE_STABS): Define.
2895 (ELF_INFO_TYPE_MERGE): Define.
2896 (ELF_INFO_TYPE_EH_FRAME): Define.
2897 (ELF_INFO_TYPE_JUST_SYMS): Define.
2898 (STD_SECTION): Update struct sec initializer.
2899 * ecoff.c (bfd_debug_section): Likewise.
2900 * elf.c: Likewise. Update occurrences of sec_info_type and use_rela_p.
2901 * elflink.h: Likewise.
2902 * elf-eh-frame.c: Likewise.
2903 * elf64-alpha.c: Likewise.
2904 * elfxx-ia64.c: Likewise.
2905 * elfxx-mips.c: Likewise.
2906 * bfd-in2.h: Regenerate.
2907
2908 * elf32-sparc.c (sec_do_relax): Use elf_section_data macro rather than
2909 referring to used_by_bfd.
2910 * elf64-sparc.c (sec_do_relax): Likewise.
2911 * elf64-mmix.c (mmix_elf_section_data): Likewise.
2912 * elfxx-mips.c (mips_elf_section_data): Likewise.
2913 * ieee.c (ieee_slurp_section_data): Use ieee_per_section macro.
2914 (ieee_get_section_contents): Likewise.
2915 (ieee_new_section_hook): Formatting.
2916 (ieee_canonicalize_reloc): Remove commented out code.
2917 * mmo.c (mmo_section_data): Define. Use throughout file.
2918 * oasys.c (oasys_get_section_contents): Use oasys_per_section macro.
2919
31f7ba04
NC
29202003-01-31 Graydon Hoare <graydon@redhat.com>
2921
2922 * Makefile.am (opncls.lo): Add dependency upon libiberty.h.
2923 * Makefile.in: Regenerate.
2924 * opncls.c (calc_crc32, get_debug_link_info,
2925 seperate_debug_file_exists, find_seperate_debug_file): New
2926 internal functions.
2927 (bfd_follow_gnu_debuglink): New function. Follow the pointer
2928 contained inside a .gnu_debuglink section.
2929 * bfd-in2.h: Regenerate.
2930
38985a1c
AO
29312003-01-29 Alexandre Oliva <aoliva@redhat.com>
2932
2933 * elfxx-mips.c (mips_elf_got_entry_hash): Don't dereference
2934 entry->abfd when it's NULL.
2935
4bb9a95f
AO
29362003-01-27 Alexandre Oliva <aoliva@redhat.com>
2937
2938 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Handle
2939 _bfd_elf_section_offset returning -2 the same way as -1.
2940
f4416af6
AO
2941 * elfxx-mips.c (mips_elf_multi_got): New function.
2942 (struct mips_got_entry): Make symndx and gotidx signed. Moved
2943 addend into union along with address and link hash entry.
2944 (struct mips_got_info): Added bfd2got and next.
2945 (struct mips_elf_hash_sort_data): Added max_unref_got_dynindx.
2946 (mips_elf_got_section, mips_elf_create_got_section): Use
2947 SEC_EXCLUDE bit to tell whether we really need the got
2948 section. Take boolean arguments to disregard an excluded
2949 section, or to create it as excluded. Adjust all callers.
2950 Use mips_elf_got_section all over.
2951 (mips_elf_local_got_index, mips_elf_got_page,
2952 mips_elf_got16_entry): Take input bfd as argument, and pass it
2953 on to mips_elf_create_local_got_entry.
2954 (mips_elf_global_got_index, mips_elf_create_local_got_entry):
2955 Take input bfd as argument, and manage entries in the
2956 appropriate GOT.
2957 (mips_elf_got_offset_from_index): Take input bfd as argument,
2958 and use it to adjust the GP offset of the bfd.
2959 (mips_elf_sort_hash_table, mips_elf_sort_hash_table_f): Move
2960 unreferenced GOT entries of global symbols to the end.
2961 (mips_elf_record_global_got_symbol): Take input bfd as
2962 argument. Add entries to the master GOT hash table.
2963 (struct mips_elf_bfd2got_hash): New.
2964 (struct mips_elf_got_per_bfd_arg): New.
2965 (struct mips_elf_set_global_got_offset_arg): New.
2966 (mips_elf_hash_bfd_vma, mips_elf_multi_got_entry_hash,
2967 mips_elf_multi_got_entry_eq, mips_elf_bfd2got_entry_hash,
2968 mips_elf_bfd2got_entry_eq, mips_elf_make_got_per_bfd,
2969 mips_elf_merge_gots, mips_elf_set_global_got_offset,
2970 mips_elf_resolve_final_got_entry,
2971 mips_elf_resolve_final_got_entries, mips_elf_adjust_gp,
2972 mips_elf_got_for_ibfd): New functions.
2973 (ELF_MIPS_GP_OFFSET): Don't depend on SGI_COMPAT.
2974 (MIPS_ELF_GOT_MAX_SIZE): New macro.
2975 (STUB_LW): Generate 64-bit stub regardless of SGI_COMPAT.
2976 (mips_elf_got_entry_hash): Take new fields into account. Use
2977 mips_elf_hash_bfd_vma.
2978 (mips_elf_got_entry_eq): Take new fields into account.
2979 (mips_elf_create_got_section): Initialize new fields.
2980 (mips_elf_calculate_relocation): Pass input_bfd to functions
2981 that now take it. Adjust gp for the input_bfd.
2982 (mips_elf_allocate_dynamic_relocation,
2983 mips_elf_create_dynamic_relocation,
2984 _bfd_mips_elf_create_dynamic_sections): Use...
2985 (mips_elf_rel_dyn_section): New function. Borrow code from...
2986 (_bfd_mips_elf_check_relocs): Pass input_bfd to functions that
2987 now take it. Create the got section if needed, even if
2988 excluded, before recording a global got symbol. Move some
2989 code to...
2990 (mips_elf_record_local_got_symbol): New fn.
2991 (_bfd_mips_elf_size_dynamic_sections): Disable combreloc.
2992 Compute multi-got global entries offsets. Move GOT code to...
2993 (_bfd_mips_elf_always_size_sections): Call mips_elf_multi_got
2994 if the GOT is too big.
2995 (_bfd_mips_elf_finish_dynamic_symbol): Set got entry of
2996 undefweak symbol to zero. Generate dynamic relocations for
2997 non-primary GOT entries for global symbols.
2998 (_bfd_mips_elf_finish_dynamic_sections): Handle multi-got
2999 case. Generate dynamic relocations for local got entries.
3000 Sort dynamic relocations on N64 too, using...
3001 (sort_dynamic_relocs_64): New fns.
3002 (_bfd_mips_elf_hide_symbol): Adjust multi-got counters.
3003 (_bfd_mips_elf_merge_private_bfd_data): Ignore EF_MIPS_XGOT.
3004
52b69c9e
AO
30052003-01-27 Alexandre Oliva <aoliva@redhat.com>
3006
3007 * bfd.c (struct _bfd): Added id field.
3008 * opncls.c (_bfd_id_counter): New static variable.
3009 (_bfd_new_bfd): Use it.
3010 * bfd-in2.h: Rebuilt.
3011
71e5db1c
AM
30122003-01-25 Alan Modra <amodra@bigpond.net.au>
3013
3014 * elf32-sparc.c (bfd_elf32_new_section_hook): Define.
3015
b9734f35
JJ
30162003-01-25 Jakub Jelinek <jakub@redhat.com>
3017
3018 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Add TLS relocs.
3019 (elf32_sparc_rev32_howto): New variable.
3020 (sparc_reloc_map): Add TLS relocs.
3021 (elf32_sparc_reloc_type_lookup, elf32_sparc_info_to_howto):
3022 Handle REV32.
3023 (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc, elf32_sparc_mkobject):
3024 New functions.
3025 (struct elf32_sparc_dyn_relocs, struct elf32_sparc_link_hash_entry,
3026 struct elf32_sparc_link_hash_table):
3027 New structures.
3028 (elf32_sparc_tdata, elf32_sparc_local_got_tls_type,
3029 elf32_sparc_hash_table): Define.
3030 (link_hash_newfunc, elf32_sparc_link_hash_table_create,
3031 create_got_section, elf32_sparc_create_dynamic_sections,
3032 elf32_sparc_copy_indirect_symbol, elf32_sparc_tls_transition): New
3033 functions.
3034 (elf32_sparc_check_relocs): Handle TLS relocs. Add dynamic reloc
3035 reference counting.
3036 (elf32_sparc_gc_sweep_hook): Likewise.
3037 (elf32_sparc_adjust_dynamic_symbol): Likewise.
3038 (elf32_sparc_size_dynamic_sections): Likewise.
3039 (elf32_sparc_relocate_section): Likewise.
3040 (allocate_dynrelocs, readonly_dynrelocs, dtpoff_base, tpoff):
3041 New functions.
3042 (elf32_sparc_object_p): Allocate backend private object data.
3043 (bfd_elf32_bfd_link_hash_table_create,
3044 elf_backend_copy_indirect_symbol, bfd_elf32_mkobject,
3045 elf_backend_can_refcount): Define.
3046 (elf_backend_create_dynamic_sections): Define to
3047 elf32_sparc_create_dynamic_sections.
3048 * reloc.c: Add SPARC TLS relocs.
3049 * bfd-in2.h, libbfd.h: Rebuilt.
3050 * elf64-sparc.c (sparc64_elf_howto_table): Add TLS relocs.
3051 (sparc_reloc_map): Likewise.
3052
69fc87f1
MS
30532003-01-24 Martin Schwidefsky <schwidefsky@de.ibm.com>
3054
3055 * bfd-in2.h: Regenerate.
3056 * elf32-s390.c (elf_s390_mkobject, elf_s390_tls_transition,
3057 s390_tls_reloc, dtpoff_base, tpoff, invalid_tls_insn): New functions.
3058 (elf_howto_table): Add TLS relocs.
3059 (elf_s390_reloc_type_lookup): Likewise.
3060 (elf_s390_link_hash_entry): Add tls_type.
3061 (elf_s390_hash_entry, elf_s390_obj_tdata, elf_s390_local_got_tls_type):
3062 New macros.
3063 (elf_s390_link_hash_table): Add tls_ldm_got.
3064 (link_hash_newfunc): Initialize tls_type.
3065 (elf_s390_link_hash_table_create): Initialize refcount of tls_ldm_got.
3066 (elf_s390_copy_indirect_symbol): Copy tls_type information.
3067 (elf_s390_check_relocs): Support TLS relocs.
3068 (elf_s390_gc_sweep_hook): Likewise.
3069 (allocate_dynrelocs): Likewise.
3070 (elf_s390_size_dynamic_sections): Likewise.
3071 (elf_s390_relocate_section): Likewise.
3072 (elf_s390_finish_dynamic_symbol): Likewise.
3073 (bfd_elf32_mkobject): Define for TLS.
3074 * elf64-s390.c: Same changes as for elf32-s390.c.
3075 * libbfd.h: Regenerate.
3076 * reloc.c: Add s390 TLS relocations.
3077
c5d1701e 30782003-01-24 Charles Lepple <clepple@ghz.cc>
9aa4e505
NC
3079
3080 * aclocal.m4: Fix name of --enable-install-libbfd switch.
3081
5177500f
NC
30822003-01-23 Nick Clifton <nickc@redhat.com>
3083
3084 * Add sh2e support:
5177500f 3085 2002-04-02 Elena Zannoni <ezannoni@redhat.com>
9b5ecbd0
AM
3086 * archures.c (bfd_mach_sh2e): Added.
3087 * bfd-in2.h: Rebuilt.
3088 * cpu-sh.c (arch_info_struct): Added SH2e.
3089 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle EF_SH2E.
5177500f 3090
f0abc2a1
AM
30912003-01-23 Alan Modra <amodra@bigpond.net.au>
3092
3093 * elf-bfd.h (struct bfd_elf_section_data): Remove tdata. Change
3094 dynindx to an int. Rearrange for better packing.
3095 * elf.c (_bfd_elf_new_section_hook): Don't alloc if already done.
3096 * elf32-mips.c (bfd_elf32_new_section_hook): Define.
3097 * elf32-sh64.h: New. Split out from include/elf/sh.h.
3098 (struct _sh64_elf_section_data): New struct.
3099 (sh64_elf_section_data): Don't dereference sh64_info (was tdata).
3100 * elf32-sh64-com.c: Include elf32-sh64.h.
3101 * elf32-sh64.c: Likewise.
3102 (sh64_elf_new_section_hook): New function.
3103 (bfd_elf32_new_section_hook): Define.
3104 (sh64_elf_fake_sections): Adjust for sh64_elf_section_data change.
3105 (sh64_bfd_elf_copy_private_section_data): Likewise.
3106 (sh64_elf_final_write_processing): Likewise.
3107 * elf32-sparc.c (struct elf32_sparc_section_data): New.
3108 (elf32_sparc_new_section_hook): New function.
3109 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
3110 (sec_do_relax): Define.
3111 (elf32_sparc_relax_section): Adjust to use sec_do_relax.
3112 (elf32_sparc_relocate_section): Likewise.
3113 * elf64-mips.c (bfd_elf64_new_section_hook): Define.
3114 * elf64-mmix.c (struct _mmix_elf_section_data): New.
3115 (mmix_elf_section_data): Define. Use throughout file.
3116 (mmix_elf_new_section_hook): New function.
3117 (bfd_elf64_new_section_hook): Define.
3118 * elf64-ppc.c (struct _ppc64_elf_section_data): New.
3119 (ppc64_elf_section_data): Define. Use throughout.
3120 (ppc64_elf_new_section_hook): New function.
3121 (bfd_elf64_new_section_hook): Define.
3122 * elf64-sparc.c (struct sparc64_elf_section_data): New.
3123 (sparc64_elf_new_section_hook): New function.
3124 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
3125 (sec_do_relax): Define.
3126 (sparc64_elf_relax_section): Adjust to use sec_do_relax.
3127 (sparc64_elf_relocate_section): Likewise.
3128 (bfd_elf64_new_section_hook): Define.
3129 * elfn32-mips.c (bfd_elf32_new_section_hook): Define.
3130 * elfxx-mips.c (struct _mips_elf_section_data): New.
3131 (mips_elf_section_data): Define. Use throughout.
3132 (_bfd_mips_elf_new_section_hook): New function.
3133 (mips_elf_create_got_section): Don't alloc used_by_bfd.
3134 * elfxx-mips.h (_bfd_mips_elf_new_section_hook): Declare.
3135 * elfxx-target.h (bfd_elfNN_new_section_hook): Add #ifndef.
3136 * Makefile.am: Run "make dep-am".
3137 * Makefile.in: Regenerate.
3138
cc03ec80
RH
31392003-01-21 Richard Henderson <rth@redhat.com>
3140
3141 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_PLT_LOC): New.
3142 (struct alpha_elf_link_hash_entry): Add plt_old_section, plt_old_value.
3143 (elf64_alpha_adjust_dynamic_symbol): Set them.
3144 (elf64_alpha_size_plt_section_1): Reset them when plt entry removed.
3145 (elf64_alpha_relax_tls_get_addr): Handle LDM relocs. Frob the
3146 symbol index when relaxing LDM to TPREL.
3147 (elf64_alpha_relax_section): Likewise. Allow relaxation of GD
3148 relocs, even if the target isn't locally defined.
3149 (elf64_alpha_check_relocs): Frob LDM reloc symndx to zero.
3150 (elf64_alpha_relocate_section): Likewise. Force TP-relative
3151 relocs vs symndx 0 to the tp base.
3152
da896d3f
NC
31532003-01-21 Fabio Alemagna <falemagn@aros.org>
3154
3155 * config.bfd: Handle i[3456]86-*-aros*.
3156
7fce784e
AS
31572003-01-21 Andreas Schwab <schwab@suse.de>
3158
3159 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Define.
3160 (struct ppc_elf_link_hash_entry): Define.
3161 (ppc_elf_hash_entry): New function.
3162 (struct ppc_elf_link_hash_table): Define.
3163 (ppc_elf_hash_table): New function.
3164 (ppc_elf_link_hash_newfunc): New function.
3165 (ppc_elf_link_hash_table_create): New function.
3166 (ppc_elf_copy_indirect_symbol): New function.
3167 (allocate_dynrelocs): New function.
3168 (readonly_dynrelocs): New function.
3169 (ppc_elf_size_dynamic_sections): Allocate space for dynamic
3170 relocs and determine DT_TEXTREL.
3171 (ppc_elf_check_relocs): Don't do that here, just count the
3172 dynamic relocs.
3173 (ppc_elf_gc_sweep_hook): Discard any dynamic relocs against the
3174 removed section.
3175 (bfd_elf32_bfd_link_hash_table_create): Define.
3176 (elf_backend_copy_indirect_symbol): Define.
3177
1bbc9cec
RH
31782003-01-21 Richard Henderson <rth@redhat.com>
3179
3180 * elf64-alpha.c (alpha_dynamic_entries_for_reloc): GOTTPREL and
3181 TPREL also get a reloc if shared. Remove SREL support.
3182 (elf64_alpha_emit_dynrel): New.
acc990f2 3183 (elf64_alpha_relocate_section): Use it. Resolve dynamic TPREL
1bbc9cec
RH
3184 and GOTTPREL relocs to local symbols against the tp base.
3185 (elf64_alpha_finish_dynamic_symbol): Use elf64_alpha_emit_dynrel.
3186
3187 * elf64-alpha.c (elf64_alpha_relax_got_load): Decrement got
3188 use count before clobbering r_type.
3189 (elf64_alpha_relax_tls_get_addr): Don't use pos[1] if insn
3190 ordering would mean dataflow inspection is necessary.
3191
0da35f8b
SS
31922003-01-20 Svein E. Seldal <Svein.Seldal@solidas.com>
3193
3194 * coffcode.h (coff_set_flags): Added get/set arch hooks.
acc990f2 3195
571fe01f
NC
31962003-01-20 Fabio Alemagna <falemagn@aros.org>
3197
3198 * elf32-sh.c: Treat elfNN_bed like other macros defined in
3199 elfxx-target.h and #undef it before #define'ing it.
3200 * elf32-i386.c: Likewise.
acc990f2
AM
3201 * elf32-sh64.c: Likewise.
3202 * elf64-alpha.c: Likewise.
3203 * elf64-sh64.c: Likewise.
571fe01f 3204
5236c819
MS
32052003-01-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
3206
3207 * bfd-in2.h: Regenerate.
3208 * elf32-s390.c (elf_s390_adjust_gotplt): New prototype.
3209 (elf_howto_table): Rename R_390_GOTOFF to R_390_GOTOFF32. Add
3210 R_390_GOTOFF16, R_390_GOTOFF64, R_390_GOTPLT12, R_390_GOTPLT16,
3211 R_390_GOTPLT32, R_390_GOTPLT64, R_390_GOTPLTENT, R_390_PLTOFF16,
3212 R_390_PLTOFF32 and R_390_PLTOFF64.
3213 (elf_s390_reloc_type_lookup): Likewise.
3214 (struct elf_s390_link_hash_entry): Add gotplt_refcount to keep track
3215 of GOTPLT references to a function.
3216 (link_hash_newfunc): Initialize gotplt_refcount.
3217 (elf_s390_check_relocs): Move allocation of local_got_refcounts array
3218 and creation of the got section out of the main switch. Add support
3219 for the gotoff, gotplt and pltoff relocations.
3220 (elf_s390_gc_sweep_hook): Add reference counting for gotoff, gotplt
3221 and pltoff.
3222 (elf_s390_adjust_gotplt): New function.
3223 (elf_s390_adjust_dynamic_symbol): Adjust gotplt refcount for removed
3224 plt entries.
3225 (allocate_dynrelocs): Add comment.
3226 (elf_s390_relocate_section): Change r_type to unsigned. Add support
3227 for gotoff, gotplt and pltoff relocations.
3228 * elf64-s390.c: Same changes as for elf32-s390.c.
3229 * libbfd.h: Regenerate.
3230 * reloc.c: Add BFD_RELOC_390_GOTOFF64, BFD_RELOC_390_GOTPLT12,
3231 BFD_RELOC_390_GOTPLT16, BFD_RELOC_390_GOTPLT32, BFD_RELOC_390_GOTPLT64,
3232 BFD_RELOC_390_GOTPLTENT, BFD_RELOC_390_PLTOFF16, BFD_RELOC_390_PLTOFF32
3233 and BFD_RELOC_390_PLTOFF64.
3234
a823975a
JJ
32352003-01-18 Jakub Jelinek <jakub@redhat.com>
3236
3237 * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle
3238 R_IA64_TPREL64[LM]SB against non-global symbol properly.
3239
b3dfd7fe
JJ
32402003-01-16 Jakub Jelinek <jakub@redhat.com>
3241
3242 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add
3243 self_dtpmod_done and self_dtpmod_offset.
3244 (allocate_global_data_got): Only use one got entry for all
3245 dtpmod relocs against local symbols.
3246 (allocate_dynrel_entries): Only need .rela.got entry for
3247 dtpmod against global symbol.
3248 (elfNN_ia64_size_dynamic_sections): Initialize self_dtpmod_offset.
3249 Reserve space in .rela.got for the local dtpmod entry.
3250 (set_got_entry): Initialize the common local dtpmod .got entry.
3251 (elfNN_ia64_relocate_section): Handle R_IA_64_DTPREL64LSB
3252 and R_IA_64_DTPREL64MSB.
3253
04c9666a
AM
32542003-01-16 Alan Modra <amodra@bigpond.net.au>
3255
3256 * elf64-ppc.c: Include elf/ppc64.h rather than elf/ppc.h.
3257 (R_PPC_*): Rename all occurrences to R_PPC64_*.
3258 (R_PPC64_ADDR30): Rename all occurrences to R_PPC64_REL30.
3259 (enum elf_ppc_reloc_type): Ditto to enum elf_ppc64_reloc_type.
3260 (ppc64_elf_gc_sweep_hook): Handle R_PPC64_REL30 along with other
3261 relative relocs, not with absolute ones.
3262 * Makefile.am: Run "make dep-am".
3263 * Makefile.in: Regenerate.
3264 * po/SRC-POTFILES.in: Regenerate.
3265
c87f1ff7
AS
32662003-01-15 Andreas Schwab <schwab@suse.de>
3267
3268 * elf32-ppc.c (ppc_elf_check_relocs): Don't set DF_TEXTREL for a
3269 relocation against a non-allocated readonly section.
3270
86bbe32f
AM
32712003-01-10 Alan Modra <amodra@bigpond.net.au>
3272
3273 * elf32-ppc.c (ppc_elf_relocate_section): Adjust addend for GOT16_HA.
3274 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. PLTGOT16_HA too.
3275
32d95f29
KD
32762002-01-08 Klee Dienes <kdienes@apple.com>
3277
3278 * Makefile.am (ALL_MACHINES): Use cpu-msp430.lo, not cpu-msp430.c.
3279 (BFD32_BACKENDS): Use elf32-msp430.lo, not elf32-msp430.c.
3280 * Makefile.in: Regenerate.
acc990f2 3281
ab7d0aa0
AO
32822003-01-08 Alexandre Oliva <aoliva@redhat.com>
3283
3284 * elfn32-mips.c (prev_reloc_section): New.
3285 (GET_RELOC_ADDEND): Use it. Parenthesize macro arguments.
3286 (SET_RELOC_ADDEND): Parenthesize macro argument.
3287
95d0f04a
DA
32882003-01-07 John David Anglin <dave.anglin@nrc.gc.ca>
3289
3290 * elf32-hppa.c (final_link_relocate): For all DP relative relocations,
3291 adjust addil instructions if the symbol has no section.
3292
5c9e189c
DD
32932003-01-07 DJ Delorie <dj@redhat.com>
3294
3295 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make REL_12 not
3296 partial_inplace.
3297
3e829b4a
AS
32982003-01-07 Andreas Schwab <schwab@suse.de>
3299
3300 * elf32-m68k.c (elf_m68k_check_relocs): Don't set DF_TEXTREL for
3301 PC relative relocations.
3302 (elf_m68k_discard_copies): Set it here instead.
3303
a75473eb
SC
33042002-01-02 Ben Elliston <bje@redhat.com>
3305 Jeff Johnston <jjohnstn@redhat.com>
3306
3307 * Makefile.am (ALL_MACHINES): Add cpu-iq2000.lo.
3308 (ALL_MACHINES_CFILES): Add cpu-iq2000.c.
3309 (BFD32_BACKENDS): Add elf32-iq2000.lo.
3310 (BFD32_BACKENDS_CFILES): Add elf32-iq2000.c.
3311 (cpu-iq2000.lo): New target.
3312 * Makefile.in: Regenerate.
3313 * config.bfd: Handle iq2000-*-elf.
3314 * archures.c (bfd_architecture): Add bfd_{arch,mach}_iq2000.
3315 (bfd_archures_list): Add bfd_iq2000_arch.
3316 * configure.in: Handle bfd_elf32_iq2000_vec.
3317 * configure: Regenerate.
acc990f2 3318 * reloc.c: Add BFD_RELOC_IQ2000_OFFSET_16, BFD_RELOC_IQ2000_OFFSET_21,
a75473eb
SC
3319 and BFD_RELOC_IQ2000_UHI16.
3320 * targets.c (bfd_elf32_iq2000_vec): Declare.
3321 (bfd_target_vector): Add bfd_elf32_iq2000_vec.
3322 * elf.c (prep_headers): Set e_machine to EM_IQ2000.
3323 * cpu-iq2000.c: New file.
3324 * elf32-iq2000.c: Likewise.
3325 * libbfd.h: Regenerate.
3326 * bfd-in2.h: Likewise.
3327
64543e1a
RS
33282003-01-02 Richard Sandiford <rsandifo@redhat.com>
3329
3330 * elfxx-mips.c: Include libiberty.h.
3331 (elf_mips_isa, _bfd_mips_elf_mach_extends_p): Remove.
3332 (mips_set_isa_flags): New function, split out from...
3333 (_bfd_mips_elf_final_write_processing): ...here. Only call
3334 mips_set_isa_flags if the EF_MIPS_MACH bits are clear.
3335 (mips_mach_extensions): New array.
3336 (mips_32bit_flags_p): New function.
3337 (_bfd_mips_elf_merge_private_bfd_data): Rework architecture checks.
3338 Use mips_32bit_flags_p to check if one binary is 32-bit and the
3339 other is 64-bit. When adopting IBFD's architecture, adopt the
3340 bfd_mach as well as the flags.
3341
4852a44e
NC
33422003-01-02 Nick Kelsey <nickk@ubicom.com>
3343
3344 * elf32-ip2k.c: Re-work of linker relaxation code for the ip2k to
3345 fix internal errors, fix bad code generation, fix incorrect stabs
3346 information, and improve ability to eliminate redundant page
3347 instructions. Added code to ip2k_final_link_relocate to self-verify
3348 the linker relaxation. Fix formatting problems.
3349
af7ee8bf
CD
33502002-12-30 Chris Demetriou <cgd@broadcom.com>
3351
3352 * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mipsisa32r2 case.
3353 * archures.c (bfd_mach_mipsisa32r2): New define.
3354 * bfd-in2.h: Regenerate.
3355 * cpu-mips.c (I_mipsisa32r2): New enum value.
3356 (arch_info_struct): Add entry for I_mipsisa32r2.
3357 * elfxx-mips.c (elf_mips_isa, _bfd_elf_mips_mach)
3358 (_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_32R2.
3359 (_bfd_mips_elf_final_write_processing): Add
3360 bfd_mach_mipsisa32r2 case.
3361 (_bfd_mips_elf_merge_private_bfd_data): Handle merging of
3362 binaries marked as using MIPS32 Release 2.
3363
2469cfa2
NC
33642002-12-30 Dmitry Diky <diwil@mail.ru>
3365
3366 * Makefile.am: Add msp430 target.
3367 * configure.in: Likewise.
3368 * Makefile.in: Regenerate.
3369 * configure: Regenerate.
3370 * archures.c: Add msp430 architecture vector.
3371 * config.bfd: Likewise.
3372 * reloc.c: Add msp430 relocs.
3373 * targets.c: Add msp320 target.
3374 * cpu-msp430.c: New file: msp430 cpu detection.
3375 * elf32-msp430.c: New file: msp430 reloc processing.
3376 * bfd-in2.h: Regenerate.
3377 * libbfd.h: Regenerate.
3378
eecdbe52
JJ
33792002-12-28 Jakub Jelinek <jakub@redhat.com>
3380
3381 * elf.c (elf_sort_sections): Don't reorder .tbss.
3382 (assign_file_positions_for_segments): Only adjust off/voff
3383 for increased alignment in PT_LOAD or PT_NOTE segment,
3384 but adjust p_filesz for .tbss too. in PT_LOAD consider
3385 .tbss to have zero memory size.
3386 (copy_private_bfd_data) [SECTION_SIZE]: Define.
3387 [IS_CONTAINED_BY_VMA, IS_CONTAINED_BY_LMA]: Use it.
3388 [INCLUDE_SECTION_IN_SEGMENT]: Only put SHF_TLS sections
3389 into PT_TLS segment. Never put SHF_TLS sections in
3390 segments other than PT_TLS or PT_LOAD.
3391
3392 * elf64-alpha.c (elf64_alpha_finish_dynamic_sections): Clear .plt
3393 sh_entsize.
3394
213e90f4
DD
33952002-12-23 DJ Delorie <dj@redhat.com>
3396
3397 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Fix logic reversal.
3398
75828352
AM
33992002-12-23 Alan Modra <amodra@bigpond.net.au>
3400
3401 * elflink.h (elf_link_output_extsym): Heed strip_discarded.
3402
312b768e
NC
34032002-12-23 Nick Clifton <nickc@redhat.com>
3404
3405 * archures.c (bfd_arch_get_compatible): Add third parameter
3406 'accept_unknowns'. Only accept unknown format BFDs if
3407 accept_unknowns is true, or if the format is "binary".
acc990f2 3408 * bfd-in2.h: Regenerate.
312b768e 3409
63222ec9
NC
34102002-12-21 Nick Clifton <nickc@redhat.com>
3411
3412 * coff-arm.c (coff_arm_relocate_section): Disable WINCE workaround
3413 that subtracted 8 from pc relative relocations.
3414
19852a2a
KH
34152002-12-20 Kazu Hirata <kazu@cs.umass.edu>
3416
3417 * coff-h8300.c: Fix comment typos.
3418 * coffcode.h: Likewise.
3419 * cpu-cris.c: Likewise.
3420 * elf32-vax.c: Likewise.
3421 * genlink.h: Likewise.
3422 * linker.c: Likewise.
3423 * som.c: Likewise.
3424 * tekhex.c: Likewise.
3425 * vms-misc.c: Likewise.
3426
5fd63999
DD
34272002-12-20 DJ Delorie <dj@redhat.com>
3428
3429 * reloc.c: Add BFD_RELOC_XSTORMY16_12.
3430 * libbfd.h: Regenerate.
3431 * bfd-in2.h: Regenerate.
3432 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_12.
3433 (xstormy16_reloc_map): Add R_XSTORMY16_12.
acc990f2 3434
4ee79850
KH
34352002-12-19 Kazu Hirata <kazu@cs.umass.edu>
3436
3437 * doc/bfdint.texi: Fix typos.
3438
66e25bab
AM
34392002-12-20 Paul Eggert <eggert@twinsun.com>
3440
3441 Port to POSIX 1003.1-2001.
3442 * acinclude.m4 (AM_INSTALL_LIBBFD): Do not rely on "test -o".
3443 * configure.in (build-warnings): Likewise.
3444 (Horrible hacks to build DLLs on Windows): Do not rely on "tail -1".
3445 * aclocal.m4: Regenerate.
3446 * config.in: Regenerate.
3447 * configure: Regenerate.
3448
7dc77aaa
AM
34492002-12-19 Alan Modra <amodra@bigpond.net.au>
3450
0171ee92
AM
3451 * coff-h8300.c: Include libiberty.h.
3452 (h8300_reloc16_extra_cases): Check the hash table creator before
3453 referencing h8300 specific fields. Stash the hash table pointer
3454 in a local var. Comment typo fixes.
3455 (h8300_bfd_link_add_symbols): Likewise.
3456
1049f94e 3457 * reloc.c (struct reloc_howto_struct): Revise src_mask and
7dc77aaa
AM
3458 dst_mask comments.
3459 * bfd-in2.h: Regenerate.
3460
47388f4c
AM
34612002-12-18 Alan Modra <amodra@bigpond.net.au>
3462
3463 * elf32-ppc.c (ppc_elf_relocate_section): Reorganize dynamic reloc
3464 code a little. Comment on dynamic relocs against section symbols.
3465
1b3e3744
AM
34662002-12-17 Roger Sayle <roger@eyesopen.com>
3467
3468 * configure.host (ia64-*-hpux*): Support 64 bit targets using
3469 the HP compiler's "long long".
3470
46f2b541
DD
34712002-12-16 Andrew MacLeod <amacleod@redhat.com>
3472
3473 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_LO16
3474 and R_XSTORMY16_HI16) howto entries.
3475 (xstormy16_reloc_map): Map R_XSTORMY16_{LO,HI}16 to BFD_RELOC_{LO,HI}16.
1b3e3744 3476 (xstormy16_info_to_howto_rela): Use R_XSTORMY16_GNU_VTINHERIT to
46f2b541
DD
3477 determine the start of the second reloc table.
3478
af738ea7
NC
34792002-12-16 Nathan Tallent <eraxxon@alumni.rice.edu>
3480
3481 * ecofflink.c: Fix the reading of the debugging information
3482 of Tru64/Alpha binaries that are produced by recent Compaq
3483 compilers.
3484 (mk_fdrtab): Fix error in creating the FDR (file descriptor)
3485 table.
3486 (lookup_line): Because of the strange information sometimes
3487 generated by Compaq's recent compilers, change how the FDR
3488 table is searched so that PDRs (procedure descriptors) are
3489 correctly found. Note that this change is really more of a hack;
3490 however, I have included extensive documentation as to why
3491 this is the best solution short of an extensive rewrite or
3492 another hack.
3493 (fdrtab_lookup): Add comments to explain the algorithm.
3494
5354b572
AO
34952002-12-12 Alexandre Oliva <aoliva@redhat.com>
3496
3497 * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Reorder
3498 initializers to match struct declaration.
3499
ab3acfbe
AM
35002002-12-12 Alan Modra <amodra@bigpond.net.au>
3501
3502 * dwarf2.c (comp_unit_contains_address): Comment typo fix.
3503 * elf.c (get_program_header_size): Likewise.
3504 * elf32-m32r.c (m32r_elf_lo16_reloc): Likewise.
3505 (m32r_elf_generic_reloc): Likewise.
3506 * elf32-ppc.c (ppc_elf_howto_init): Likewise.
3507 * elflink.h (elf_bfd_discard_info): Likewise.
3508
6348e046
AM
35092002-12-12 Alan Modra <amodra@bigpond.net.au>
3510
3511 * elf32-i386.c (elf_i386_finish_dynamic_sections): Add output_offset
3512 to DT_JMPREL. Use srelplt input section size for DT_PLTRELSZ and
3513 DT_RELSZ adjustment, not output section. Avoid writing tags when
3514 unchanged. Don't assume linker script is sane, adjust DT_REL too.
3515 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Just use raw
3516 size of srelplt for DT_PLTRELSZ. Use srelplt input section size for
3517 DT_RELASZ adjustment, not output section. Avoid writing tags when
3518 unchanged. Adjust DT_RELA.
3519 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Tweaks for better
3520 formatting. Avoid writing tags when unchanged. Adjust DT_RELA.
3521
2e7a68a8
AO
35222002-12-12 Alexandre Oliva <aoliva@redhat.com>
3523
3524 * elfxx-mips.c (mips_elf_calculate_relocation): Don't divide
3525 addend by 4.
3526
b15e6682
AO
35272002-12-12 Alexandre Oliva <aoliva@redhat.com>
3528
3529 * elfxx-mips.c (struct mips_got_entry): New.
3530 (struct mips_got_info): Added got_entries field.
3531 (mips_elf_got_entry_hash, mips_elf_got_entry_eq): New functions.
3532 (mips_elf_local_got_index, mips_elf_got_page,
3533 mips_elf_got16_entry): Re-implement in terms of new...
3534 (mips_elf_create_local_got_entry): Rewrite to use got_entries.
3535 Change return type.
3536 (mips_elf_highest): Warning clean-up.
3537 (mips_elf_create_got_section): Initialize got_entries.
3538 (_bfd_mips_elf_check_relocs): Use got_entries to estimate
3539 local got size.
3540 (_bfd_mips_elf_size_dynamic_sections): Do not account for
3541 GOT_PAGE entries, since we now reuse GOT16 entries.
3542
e6af3a53
NC
35432002-12-10 Jason Thorpe <thorpej@wasabisystems.com>
3544
3545 * aoutx.h (set_section_contents): Allow an otherwise unrepresentable
3546 read-only section that lies after .text and before .data to be
3547 written into the output file and included in a_text.
3548 (translate_to_native_sym_flags): If an otherwise unrepresentable
3549 section was merged with .text, convert its symbols to N_TEXT
3550 symbols.
3551 * libaout.h (aout_section_merge_with_text_p): New macro.
3552
cf3d882d
AM
35532002-12-08 Alan Modra <amodra@bigpond.net.au>
3554
3555 * bfd-in.h: Comment typo fix. Formatting.
3556 * bfd-in2.h: Regenerate.
3557 * coff64-rs6000.c (xcoff64_openr_next_archived_file): Warning fix.
3558 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): Prototype.
3559 * elf64-mmix.c (mmix_dump_bpo_gregs): Warning fix.
3560
2f9bd3f6
RH
35612002-12-05 Richard Henderson <rth@redhat.com>
3562
3563 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21BI.
3564 Only send PCREL21B though the plt. Fix installed reloc type.
3565 (elfNN_ia64_relocate_section): Give error for dynamic reloc
3566 against PCREL22 or PCREL64I; clean up error messages for
3567 branch relocs.
3568
d0112f73
KB
35692002-12-04 Kevin Buettner <kevinb@redhat.com>
3570
3571 * elf64-mips.c (elf64_mips_grok_prstatus, elf64_mips_grok_psinfo):
3572 New functions.
3573 (elf_backend_grok_prstatus, elf_backend_grok_psinfo): Define.
3574
c10d9d8f
JW
35752002-12-04 David Mosberger <davidm@hpl.hp.com>
3576
3577 * cpu-ia64-opc.c: Add operand constant "ar.csd".
3578
d48770d4
L
35792002-12-04 H.J. Lu <hjl@gnu.org>
3580
3581 * elfxx-ia64.c (get_local_sym_hash): Use section ID instead of
3582 BFD address when constructing local name.
3583
b6152c34
AS
35842002-12-04 Andreas Schwab <schwab@suse.de>
3585
3586 * elf32-m68k.c (struct elf_m68k_link_hash_table): Add sym_sec
3587 member.
3588 (elf_m68k_link_hash_table_create): Initialize it.
3589 (elf_m68k_check_relocs): Handle symbols that are forced to be
3590 local due to visibility changes.
3591 (elf_m68k_adjust_dynamic_symbol): Likewise.
3592 (elf_m68k_size_dynamic_sections): Likewise.
3593 (elf_m68k_discard_copies): Likewise.
3594 (elf_m68k_relocate_section): Likewise.
3595
73374ef1
AM
35962002-12-04 Alan Modra <amodra@bigpond.net.au>
3597
3598 * elf64-ppc.c (ppc64_elf_edit_opd): Correct typo.
3599
c5c1944d
AM
36002002-12-04 Alan Modra <amodra@bigpond.net.au>
3601
3602 * srec.c (srec_write_symbols): Restore '$' prefix to address
3603 accidentally removed in 2002-04-04 change.
3604 (srec_get_symtab): Use 0 instead of `(long) FALSE'.
3605
e1a9cb8e
NC
36062002-12-03 Nick Clifton <nickc@redhat.com>
3607
3608 * elf32-ppc.c (apuinfo_list_init): New function.
73374ef1
AM
3609 (apuinfo_list_add): New function: Add a value to the list.
3610 (apuinfo_list_length): New function: Return the number of
3611 values on the list.
3612 (apuinfo_list_element): New function: Return a value on the
3613 list.
3614 (apuinfo_list_finish): New function: Free the resources used
3615 by the list.
3616 (ppc_elf_begin_write_processing): New function. Scan the
3617 input bfds for apuinfo sections.
3618 (ppc_elf_write_section): New function: Delay the creation of
3619 the contents of an apuinfo section in an output bfd.
3620 (ppc_elf_final_write_processing): New function. Create the
3621 contents of an apuinfo section in an output bfd.
3622 (elf_backend_begin_write_processing): Define.
3623 (elf_backend_final_write_processing): Define.
3624 (elf_backend_write_section): Define.
e1a9cb8e 3625
a823923b
RH
36262002-12-03 Richard Henderson <rth@redhat.com>
3627
3628 * cpu-ia64-opc.c (elf64_ia64_operands): Add ldxmov entry.
3629
30491647
SC
36302002-12-01 Stephane Carrez <stcarrez@nerim.fr>
3631
3632 Fix PR savannah/1417:
3633 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Don't adjust
3634 branch if it goes to the start of the deleted region.
3635
bc7c6a90
SC
36362002-12-01 Stephane Carrez <stcarrez@nerim.fr>
3637
3638 * bfd-in2.h (bfd_mach_m6812): Rebuild.
3639 * archures.c (bfd_mach_m6812_default, bfd_mach_m6812,
3640 bfd_mach_m6812s): Declare.
3641
3642 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): New function.
3643 (_bfd_m68hc12_elf_set_private_flags): Call it.
3644 (_bfd_m68hc12_elf_print_private_bfd_data): Report processor version.
3645 (_bfd_m68hc12_elf_merge_private_bfd_data): Merge the flags and
3646 report microcontroller incompatibilities (HC12 vs HCS12).
3647 (elf_backend_object_p): Update.
3648
b34976b6
AM
36492002-11-30 Alan Modra <amodra@bigpond.net.au>
3650
3651 * bfd-in.h (TRUE_FALSE_ALREADY_DEFINED, BFD_TRUE_FALSE): Delete.
3652 (enum bfd_boolean, boolean): Delete.
3653 (bfd_boolean): Typedef to an int.
3654 (FALSE, TRUE): Define.
3655 * aix386-core.c, aix5ppc-core.c, aout-adobe.c, aout-arm.c, aout-cris.c,
3656 aout-encap.c, aout-ns32k.c, aout-target.h, aout-tic30.c, aoutf1.h,
3657 aoutx.h, archive.c, archive64.c, archures.c, bfd-in.h, bfd.c, bfdwin.c,
3658 binary.c, bout.c, cache.c, cisco-core.c, coff-a29k.c, coff-alpha.c,
3659 coff-apollo.c, coff-arm.c, coff-aux.c, coff-h8300.c, coff-h8500.c,
3660 coff-i386.c, coff-i860.c, coff-i960.c, coff-ia64.c, coff-m68k.c,
3661 coff-m88k.c, coff-mcore.c, coff-mips.c, coff-or32.c, coff-ppc.c,
3662 coff-rs6000.c, coff-sh.c, coff-sparc.c, coff-stgo32.c, coff-tic30.c,
3663 coff-tic4x.c, coff-tic54x.c, coff-tic80.c, coff-w65.c, coff-we32k.c,
3664 coff-z8k.c, coff64-rs6000.c, coffcode.h, coffgen.c, cofflink.c,
3665 corefile.c, cpu-a29k.c, cpu-alpha.c, cpu-arc.c, cpu-arm.c, cpu-avr.c,
3666 cpu-cris.c, cpu-d10v.c, cpu-d30v.c, cpu-dlx.c, cpu-fr30.c, cpu-frv.c,
3667 cpu-h8300.c, cpu-h8500.c, cpu-hppa.c, cpu-i370.c, cpu-i386.c,
3668 cpu-i860.c, cpu-i960.c, cpu-ia64.c, cpu-ip2k.c, cpu-m10200.c,
3669 cpu-m10300.c, cpu-m32r.c, cpu-m68hc11.c, cpu-m68hc12.c, cpu-m68k.c,
3670 cpu-m88k.c, cpu-mcore.c, cpu-mips.c, cpu-mmix.c, cpu-ns32k.c,
3671 cpu-openrisc.c, cpu-or32.c, cpu-pdp11.c, cpu-pj.c, cpu-powerpc.c,
3672 cpu-rs6000.c, cpu-s390.c, cpu-sh.c, cpu-sparc.c, cpu-tic30.c,
3673 cpu-tic4x.c, cpu-tic54x.c, cpu-tic80.c, cpu-v850.c, cpu-vax.c,
3674 cpu-w65.c, cpu-we32k.c, cpu-xstormy16.c, cpu-z8k.c, dwarf1.c,
3675 dwarf2.c, ecoff.c, ecofflink.c, efi-app-ia32.c, efi-app-ia64.c,
3676 elf-bfd.h, elf-eh-frame.c, elf-hppa.h, elf-m10200.c, elf-m10300.c,
3677 elf-strtab.c, elf.c, elf32-arc.c, elf32-arm.h, elf32-avr.c,
3678 elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c, elf32-fr30.c,
3679 elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c, elf32-hppa.h,
3680 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
3681 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
3682 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
3683 elf32-pj.c, elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-sh64-com.c,
3684 elf32-sh64.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
3685 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
3686 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-ppc.h, elf64-s390.c,
3687 elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c,
3688 elfarm-oabi.c, elfcode.h, elfcore.h, elflink.c, elflink.h,
3689 elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c, elfxx-mips.h,
3690 elfxx-target.h, format.c, freebsd.h, genlink.h, hash.c, hp300hpux.c,
3691 hppabsd-core.c, hpux-core.c, i386aout.c, i386linux.c, i386lynx.c,
3692 i386mach3.c, i386msdos.c, i386os9k.c, ieee.c, ihex.c, irix-core.c,
3693 libaout.h, libbfd-in.h, libbfd.c, libcoff-in.h, libecoff.h, libieee.h,
3694 libnlm.h, liboasys.h, libpei.h, libxcoff.h, linker.c, lynx-core.c,
3695 m68klinux.c, m68klynx.c, mach-o.c, mach-o.h, merge.c, mipsbsd.c,
3696 mmo.c, netbsd-core.c, netbsd.h, nlm.c, nlm32-alpha.c, nlm32-i386.c,
3697 nlm32-ppc.c, nlm32-sparc.c, nlmcode.h, oasys.c, opncls.c, osf-core.c,
3698 pc532-mach.c, pdp11.c, pe-arm.c, pe-i386.c, pe-mcore.c, pe-mips.c,
3699 pe-sh.c, peXXigen.c, pef.c, pei-arm.c, pei-i386.c, pei-mcore.c,
3700 pei-mips.c, pei-sh.c, peicode.h, ppcboot.c, ptrace-core.c, reloc.c,
3701 reloc16.c, riscix.c, rs6000-core.c, sco5-core.c, section.c, simple.c,
3702 som.c, som.h, sparclinux.c, sparclynx.c, srec.c, stabs.c, sunos.c,
73374ef1 3703 syms.c, targets.c, tekhex.c, ticoff.h, trad-core.c, versados.c,
b34976b6
AM
3704 vms-gsd.c, vms-hdr.c, vms-misc.c, vms-tir.c, vms.c, vms.h,
3705 xcoff-target.h, xcofflink.c, xsym.c, xsym.h: Replace boolean with
3706 bfd_boolean, true with TRUE, false with FALSE. Simplify comparisons
3707 of bfd_boolean vars with TRUE/FALSE. Formatting.
3708 * bfd-in2.h, libbfd.h, libcoff.h: Regenerate
3709
947216bf
AM
37102002-11-28 Alan Modra <amodra@bigpond.net.au>
3711
3712 * elf-bfd.h: Replace occurrences of Elf32_Internal_* and
3713 Elf64_Internal_* with Elf_Internal_*. Replace Elf_Internal_Rel
3714 with Elf_Internal_Rela.
3715 * elf-hppa.h, elf-m10200.c, elf-m10300.c, elf32-arc.c, elf32-arm.h,
3716 elf32-avr.c, elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c,
3717 elf32-fr30.c, elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c,
3718 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
3719 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
3720 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
3721 elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-v850.c, elf32-vax.c,
3722 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
3723 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
3724 elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c, elfarm-oabi.c,
3725 elfcode.h, elflink.h, elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c: Ditto.
3726 * elf-hppa.h (elf_hppa_internal_shdr): Delete. Use Elf_Internal_Shdr
3727 throughout instead.
3728 * elf.c (_bfd_elf_no_info_to_howto_rel): Delete.
3729 * elfcode.h (elf_swap_reloca_in): Pass source operand as a bfd_byte *.
3730 Remove INLINE keyword.
3731 (elf_swap_reloc_in): Likewise. Also clear r_addend.
3732 (elf_swap_reloc_out, elf_swap_reloca_out): Pass destination operand
3733 as a bfd_byte *.
3734 (elf_write_relocs): Consolidate REL and RELA code.
3735 (elf_slurp_reloc_table_from_section): Simplify REL code.
3736 (NAME(_bfd_elf,size_info)): Populate reloc swap entries.
3737 * elf-bfd.h (MAX_INT_RELS_PER_EXT_REL): Define.
3738 * elflink.h (elf_link_read_relocs_from_section): Consolidate REL and
3739 RELA code.
3740 (elf_link_adjust_relocs): Likewise. Don't malloc space for temp
3741 reloc array, use a fixed size of MAX_INT_RELS_PER_EXT_REL.
3742 (elf_link_output_relocs): Likewise.
3743 (elf_reloc_link_order): Likewise.
3744 (elf_finish_pointer_linker_section): Likewise.
3745 (struct elf_link_sort_rela): Remove union.
3746 (elf_link_sort_cmp1): Update to suit.
3747 (elf_link_sort_cmp2): Here too.
3748 (elf_link_sort_relocs): Consolidate REL and RELA code. Fix memory
3749 over-allocation for int_rels_per_ext_rel != 1 case.
3750 * elf32-arm.h: Update all bfd_elf32_swap_reloc_out calls.
3751 * elf32-i386.c: Likewise.
3752 * elf32-cris.c: Likewise for bfd_elf32_swap_reloca_out.
3753 * elf32-hppa.c, elf32-i370.c, elf32-m68k.c, elf32-ppc.c, elf32-s390.c,
3754 elf32-sh.c, elf32-vax.c, elfxx-mips.c: Likewise.
3755 * elf64-alpha.c: Likewise for bfd_elf64_swap_reloca_out.
3756 * elf64-hppa.c, elf64-mips.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
3757 elf64-sparc.c, elf64-x86-64.c: Likewise.
3758 * elfxx-ia64.c: Likewise for bfd_elfNN_swap_reloca_out.
3759 * elfxx-mips.c (sort_dynamic_relocs): Likewise for
3760 bfd_elf32_swap_reloc_in.
3761
3762 * elf32-arm.h: Update elf32_arm_info_to_howto calls.
3763 * elf32-mips.c: Likewise for mips_info_to_howto_rel.
3764 (mips_elf64_swap_reloc_in): Zero r_addend.
3765 (mips_elf64_be_swap_reloc_in): Likewise.
3766 (mips_elf64_slurp_one_reloc_table): Simplify.
3767
3768 * elf64-alpha.c (alpha_elf_size_info): Populate reloc swap entries.
3769 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
3770 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
3771
1448fa32
KK
37722002-11-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3773
3774 * elf32-sh.c (sh_elf_relocate_section): Don't complain about
73374ef1 3775 unresolved debugging relocs in dynamic applications.
1448fa32
KK
3776 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
3777
73722af0
AM
37782002-11-26 Alan Modra <amodra@bigpond.net.au>
3779
3780 * elf-eh-frame.c (ENSURE_NO_RELOCS): Disregard R_*_NONE relocs.
3781 (_bfd_elf_discard_section_eh_frame): Don't discard duplicate CIEs
3782 on a relocatable link. Comment typos.
3783 * elf.c (_bfd_elf_link_hash_newfunc): Assign elements of structure
3784 in the order they are declared. Clear elf_hash_value too.
3785 (_bfd_elf_link_hash_table_init): Likewise assign in order. Clear
3786 eh_info and tls_segment.
3787 * elflink.h (elf_link_input_bfd <emit_relocs>): Keep reloc offsets
3788 sorted when discarding relocs by turning them into R_*_NONE.
3789
3790 * libbfd.c (warn_deprecated): Comment spelling.
3791 * po/SRC-POTFILES.in: Regenerate.
3792
7c25b72c
RH
37932002-11-21 Richard Henderson <rth@redhat.com>
3794
3795 * elflink.h (elf_link_add_object_symbols): Don't overwrite the
3796 arch's st_other bits when merging visibilities.
3797 (elf_link_output_extsym): Tidy clearing of visibility field.
3798
dc12c51f
AM
37992002-11-21 Alan Modra <amodra@bigpond.net.au>
3800
3801 * coff-mcore.c (SWAP_IN_RELOC_OFFSET): Define.
3802 (SWAP_OUT_RELOC_OFFSET): Define.
3803
963f13ec
AO
38042002-11-20 Alexandre Oliva <aoliva@redhat.com>
3805
3806 * elf.c (_bfd_elf_link_hash_table_init): Make sure
3807 can_refcount is properly extended to the type of
3808 init_refcount.
3809
ee6423ed
AO
38102002-11-19 Alexandre Oliva <aoliva@redhat.com>
3811
4ffba85c
AO
3812 * elfxx-mips.c (MIPS_RELOC_RELA_P): New macro.
3813 (_bfd_mips_elf_relocate_section): Use it.
3814
ee6423ed
AO
3815 * elfxx-mips.c (MNAME): New macro.
3816 (_bfd_mips_elf_check_relocs): Use it.
3817 (_bfd_mips_elf_discard_info): Likewise.
3818 (_bfd_mips_elf_final_link): Likewise.
3819
cdcf6e38
AM
38202002-11-19 Alan Modra <amodra@bigpond.net.au>
3821
3822 * elf64-ppc.c (ppc64_elf_edit_opd): When deleting relocs, adjust
3823 rel_hdr.sh_size too.
3824
93509525
KD
38252002-11-18 Klee Dienes <kdienes@apple.com>
3826
3827 * Makefile.am (BFD32_LIBS): Add bfdwin.lo, bfdio.lo.
3828 (BFD32_LIBS_CFILES): Add bfdwin.c, bfdio.c.
3829 (BFD_H_FILES): Add bfdwin.c, bfdio.c.
3830 (LIBBFD_H_FILES): Add bfdwin.c, bfdio.c.
3831 Add dependencies for bfdwin.c, bfdio.c.
3832 * bfd.c: Remove bfd_get_mtime, bfd_get_size.
3833 * libbfd.c: Remove real_read, bfd_bread, _bfd_window_internal,
3834 bfd_init_window, bfd_free_window, bfd_get_file_window, bfd_bwrite,
3835 bfd_tell, bfd_flush, bfd_stat, bfd_seek.
3836 * bfdio.c: New file. Contains real_read, bfd_bread, bfd_write,
3837 bfd_tell, bfd_flush, bfd_stat, bfd_seek, bfd_ge_mtime,
3838 bfd_get_size (moved from libbfd.c and bfd.c).
3839 * bfdwin.c New file. Contains _bfd_window_internal,
3840 bfd_init_window, bfd_free_window, bfd_get_file_window (moved from
3841 libbfd.c and bfd.c).
3842 * po/SRC-POTFILES.in: Regenerate.
3843 * po/bfd.pot: Regenerate.
3844 * libbfd.h: Regenerate.
3845 * bfd-in2.h: Regenerate.
3846 * aclocal.m4: Regenerate.
3847 * Makefile.in: Regenerate.
3848 * configure: Regenerate.
3849
3ae41454
AM
38502002-11-18 Klee Dienes <kdienes@apple.com>
3851
3852 * bfd.c (bfd_preserve_save): Don't zero BFD_IN_MEMORY.
3853
e514ac71
NC
38542002-11-15 Kazu Hirata <kazu@cs.umass.edu>
3855
3856 * coff-h8300.c (h8300_reloc16_estimate): Do not optimize away
3857 jsr after a short jump.
3858 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
3859
eddc4f81
KD
38602002-11-15 Klee Dienes <kdienes@apple.com>
3861
3862 * pef.c (bfd_pef_convert_architecture): Move declaration of
3863 ARCH_POWERPC and ARCH_M68K to the start of the function.
3864
51908eee
SS
38652002-11-14 Svein E. Seldal <Svein.Seldal@solidas.com>
3866
3867 * coff-tic4x.c (tic4x_howto_table): Formatting fixup
3868
3416d2e7
HPN
38692002-11-14 Hans-Peter Nilsson <hp@bitrange.com>
3870
3871 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs):
3872 For bpo_gregs_section->contents, allocate _raw_size, not
3873 _cooked_size.
3874
b1c58715
AM
38752002-11-13 Klee Dienes <kdienes@apple.com>
3876
3877 * config.bfd: Add entries for powerpc-*-darwin and cousins.
3878
077ca68b
L
38792002-11-13 H.J. Lu <hjl@gnu.org>
3880
3881 * elfcode.h (elf_object_p): Don't restore abfd->arch_info.
3882
e84d6fca
AM
38832002-11-13 Klee Dienes <kdienes@apple.com>
3884 Alan Modra <amodra@bigpond.net.au>
3885
3886 * bfd.c (struct bfd_preserve): New.
3887 (bfd_preserve_save): New function.
3888 (bfd_preserve_restore): Ditto.
3889 (bfd_preserve_finish): Ditto.
3890 * bfd-in2.h: Regenerate.
3891 * mach-o.c: Formatting.
3892 (bfd_mach_o_scan_read_symtab_symbol): Make "value" unsigned.
3893 (bfd_mach_o_object_p): Use bfd_preserve_save/restore/finish.
3894 (bfd_mach_o_core_p): Ditto.
3895 (bfd_mach_o_scan): Pass in mdata.
3896 * mach-o.h (bfd_mach_o_scan): Update prototype.
3897 * pef.c: Formatting.
3898 (bfd_pef_object_p): Use bfd_preserve_save/restore/finish.
3899 (bfd_pef_xlib_object_p): Ditto.
3900 (bfd_pef_scan): Pass in mdata. Move version check to bfd_pef_object_p.
3901 * pef.h (bfd_pef_scan): Update prototype.
3902 * xsym.c: Formatting, K&R fixes.
3903 (bfd_sym_object_p): Use bfd_preserve_save/restore/finish.
3904 (bfd_sym_scan): New function split out from bfd_sym_object_p.
3905 * xsym.h (bfd_sym_scan): Declare.
3906 * elfcode.h (elf_object_p): Use bfd_preserve_save/restore/finish.
a7f84125 3907 * elfcore.h (elf_core_file_p): Likewise.
e84d6fca
AM
3908 * targets.c (_bfd_target_vector): Revert 2002-11-08 change.
3909
cd24c222
NC
39102002-11-12 Nick Clifton <nickc@redhat.com>
3911
3912 * po/da.po: Updated Danish translation.
3913
99eb2ac8
AM
39142002-11-12 Alan Modra <amodra@bigpond.net.au>
3915
d6fe2dc1
AM
3916 * elflink.h (elf_link_add_object_symbols): Optimize stabs for
3917 relocatable link too.
3918 (elf_link_input_bfd): When emitting relocs, adjust offsets for
3919 eh_frame and stab sections. Zap deleted relocs.
3920 (elf_reloc_symbol_deleted_p): Return true for zero r_symndx.
3921 (elf_bfd_discard_info): Run for relocatable link too.
3922 * elf64-ppc.c (ppc64_elf_edit_opd): Rename from edit_opd. Make global.
3923 Handle ld -r case.
3924 (ppc64_elf_size_dynamic_sections): Don't call edit_opd from here.
3925 * elf64-ppc.h (ppc64_elf_edit_opd): Declare.
3926
126495ed
AM
3927 * elf-bfd.h (struct cie_header): Move from elf_eh-frame.c.
3928 (struct cie, struct eh_cie_fde, struct eh_frame_sec_info): Likewise.
3929 (struct eh_frame_array_ent, struct eh_frame_hdr_info): Likewise.
3930 (enum elf_link_info_type): Remove ELF_INFO_TYPE_EH_FRAME_HDR.
3931 (struct eh_frame_hdr_info): Add "hdr_sec", remove "split".
3932 (struct elf_link_hash_table): Add eh_info.
3933 (struct elf_obj_tdata): Change eh_frame_hdr to an asection *.
3934 (_bfd_elf_discard_section_eh_frame): Update prototype.
3935 (_bfd_elf_discard_section_eh_frame_hdr): Likewise.
3936 (_bfd_elf_write_section_eh_frame): Likewise.
3937 (_bfd_elf_write_section_eh_frame_hdr): Likewise.
3938 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Remove "ehdrsec"
3939 param. Get "hdr_info" from link hash table.
3940 (_bfd_elf_discard_section_eh_frame_hdr): Remove "sec" param. Get
3941 header section from link hash table. Save header section to elf_tdata.
3942 (_bfd_elf_maybe_strip_eh_frame_hdr): Remove local "sec". Use
3943 header section from link hash table. Don't alloc hdr_info. Clear
3944 hdr_sec instead of setting "strip".
3945 (_bfd_elf_eh_frame_section_offset): Formatting.
3946 (_bfd_elf_write_section_eh_frame): Remove "ehdrsec", add "info" param.
3947 Get header section from link hash table.
3948 (_bfd_elf_write_section_eh_frame_hdr): Remove "sec", add "info" param.
3949 Get header section from link hash table.
3950 * elf.c (map_sections_to_segments): Use cached eh_frame_hdr.
3951 (get_program_header_size): Likewise.
3952 (_bfd_elf_section_offset): Formatting.
3953 * elflink.h (elf_link_create_dynamic_sections): Stash eh frame header
3954 section pointer in link hash table.
3955 (elf_bfd_final_link): Adjust _bfd_elf_write_section_eh_frame_hdr
3956 and _bfd_elf_write_section_eh_frame calls. Update comment about
3957 eh_frame entries.
3958 (elf_bfd_discard_info): Adjust _bfd_elf_discard_section_eh_frame and
3959 _bfd_elf_discard_section_eh_frame_hdr calls. Remove "ehdr".
3960
3961 * po/SRC-POTFILES.in: Regenerate.
3962
99eb2ac8
AM
3963 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't zero
3964 relocs for discarded FDEs. Remove dead code.
3965 (_bfd_elf_write_section_eh_frame_hdr): Remove dead code.
3966 * elflink.h (elf_bfd_discard_info): Don't save edited relocs.
3967 Tidy conditions under which stabs are edited. Formatting.
3968 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
3969 from discarded relocs.
3970 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Add reloc output
3971 section adjustments after testing magic values.
3972
7c319a27
AM
39732002-11-12 Thomas Moestl <tmm@FreeBSD.org>
3974
3975 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Correct
3976 references to large plt symbols.
3977
a95a4550
AM
39782002-11-12 Klee Dienes <kdienes@apple.com>
3979
3980 * mach-o.c (bfd_mach_o_scan_read_thread): Don't re-use 'i' when
3981 looking for an unused section name.
3982
bc7eab72
KH
39832002-11-11 Kazu Hirata <kazu@cs.umass.edu>
3984
3985 * coff-h8300.c: Fix formatting.
3986 * elf32-h8300.c: Likewise.
3987 * reloc16.c: Likewise.
3988
52585bb8
AM
39892002-11-09 Jeroen Dobbelaere <jeroen.dobbelaere@acunia.com>
3990
3991 * elf32-arm.h (elf32_arm_size_dynamic_sections): Don't strip output
3992 section when dynamic section unused; _bfd_strip_section_from_output
3993 instead.
3994
9f632188
AM
39952002-11-08 Alan Modra <amodra@bigpond.net.au>
3996
207b304b
AM
3997 * targets.c (_bfd_target_vector): Disable pef_vec, pef_xlib_vec
3998 and sym_vec.
3b029f65 3999
9f632188
AM
4000 * dwarf2.c: Revert last change.
4001
ec4530b5
NC
40022002-11-07 Michal Ludvig <mludvig@suse.cz>
4003
9b5ecbd0 4004 * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
ec4530b5
NC
4005 _bfd_dwarf2_find_nearest_line): Use
4006 bfd_simple_get_relocated_section_contents() instead of
4007 bfd_get_section_contents().
4008 * reloc.c (bfd_perform_relocation): Add sanity check.
4009 * simple.c (simple_get_relocated_section_contents): If the section
4010 does not have any relocs associated with it, just return the
4011 unadjusted contents.
4012
205cfeb0
HPN
40132002-11-07 Hans-Peter Nilsson <hp@axis.com>
4014
4015 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOT,
4016 case R_CRIS_32_GOT>: Correct test for filling in constant .got
4017 contents, enabling for a non-DSO, for symbols defined in the
4018 program with --export-dynamic.
4019
87e226ce
AM
40202002-11-07 Alan Modra <amodra@bigpond.net.au>
4021
4022 * elf64-ppc.c: Comment typo fixes.
4023 (ppc64_elf_merge_private_bfd_data): Allow BFD_ENDIAN_UNKNOWN input.
4024
235c4794
NC
40252002-11-07 Nick Clifton <nickc@redhat.com>
4026
4027 * po/da.po: Updated Danish translation.
4028
49179469
AO
40292002-11-06 Alexandre Oliva <aoliva@redhat.com>
4030
4031 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Generate
4032 exactly three internal relocs per external reloc. Set reloc_count
4033 to the external reloc count.
4034
246178f2
NC
40352002-11-06 Klee Dienes <kdienes@apple.com>
4036
3ae41454 4037 * coff-stgo32.c (stub_bytes): Mark as const.
246178f2
NC
4038 Fix comment formatting.
4039
3af9a47b
NC
40402002-11-06 Klee Dienes <kdienes@apple.com>
4041
3ae41454 4042 * Makefile.am (BFD32_BACKENDS): Add mach-o.lo, pef.lo, and
3af9a47b
NC
4043 xsym.lo.
4044 (BFD32_BACKENDS_CFILES): Add mach-o.c, pef.c, and xsym.c.
4045 (SOURCE_HFILES): Add mach-o.h, pef.h, pef-traceback.h, xsym.h
4046 * archures.c (enum bfd_architecture): Add bfd_arch_m98k.
4047 * bfd.c (struct bfd): Add private data for mach-o, pef, and sym.
4048 * targets.c (enum bfd_flavour): Add flavours for mach-o, pef, and
4049 sym.
3ae41454 4050 (_bfd_target_vector): Add target vectors for mach-o, pef, and sym.
3af9a47b
NC
4051 * Makefile.in: Regenerate.
4052 * doc/Makefile.in: Regenerate.
3ae41454 4053 * bfd-in2.h: Regenerate.
3af9a47b
NC
4054 * xsym.c: New file. Contains support for the Apple/Metrowerks
4055 xSYM debugging format.
4056 * xsym.h: New file.
4057 * pef.c: New file. Contains support for the Apple Code Fragment
4058 Manager Preferred Executable Format
4059 * pef.h: New file.
4060 * pef-traceback.h: New file. Contains support for parsing PowerPC
4061 traceback tables as used by PEF executables (and perhaps other
4062 systems as well).
3ae41454 4063 * mach-o.c: New file. Contains support for the Mach-O object file
3af9a47b
NC
4064 format.
4065 * mach-o.h: New file.
4066 * mach-o-target.c: New file. Declares the mach-o targets
4067 themselves. Included three times by mach-o.c; each time with a
4068 different set of macros set.
3ae41454 4069
b6821651 40702002-11-06 Graeme Peterson <gp@qnx.com>
911b232a
AM
4071
4072 * Makefile.am: Remove entries for elf32-qnx.[ch].
4073 * Makefile.in: Regenerate.
4074 * config.bfd: Change arm-nto to use bfd_elf32_{big|little}arm_vec,
4075 ppc-nto to use bfd_elf32_powerpc{le}_vec, sh-nto to use
4076 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
4077 * configure.in: Remove support for bfd_elf32_sh{l}qnx_vec,
4078 bfd_elf32_powerpc{le}qnx_vec, bfd_elf32_{big|little}armqnx_vec,
4079 and bfd_elf32_i386qnx_vec, and removed elf32-qnx.lo from other targets.
4080 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
4081 * configure: Regenerate.
4082 * elf32-qnx.c: Remove.
4083 * elf32-qnx.h: Remove.
4084 * elf.c: Remove calls to QNX specific set_nonloadable_filepos,
4085 is_contained_by_filepos, and copy_private_bfd_data_p.
ad12c1c5
AM
4086 * elf-bfd.h (struct elf_backend_data): Remove set_nonloadable_filepos,
4087 is_contained_by_filepos, and copy_private_bfd_data_p.
911b232a
AM
4088 * elf32-i386.c: Remove QNX extended bfd support.
4089 * elf32-ppc.c: Remove QNX extended bfd support.
4090 * elf32-sh.c: Remove QNX extended bfd support.
4091 * elfarm-nabi.c: Remove QNX extended bfd support.
4092 * targets.c: Remove qnx vectors.
4093 * elfxx-target.h (elf_backend_set_nonloadable_filepos): Remove
4094 (elf_backend_is_contained_by_filepos): Remove.
4095 (elf_backend_copy_private_bfd_data_p): Remove.
4096 * po/SRC-POTFILES.in: Regenerate.
4097
b6821651
AM
40982002-11-06 David O'Brien <obrien@FreeBSD.org>
4099 Alan Modra <amodra@bigpond.net.au>
4100
4101 * elf64-sparc.c (sparc64_elf_relocate_section): Adjust addend of
4102 dynamic relocs against section symbols for the output section vma.
4103
41042002-11-05 Alan Modra <amodra@bigpond.net.au>
4105
4106 * elf32-arm.h (t2a1_push_insn, t2a2_ldr_insn, t2a3_mov_insn,
4107 t2a4_bx_insn, t2a5_pop_insn, t2a6_bx_insn): Remove.
4108
08f74004
AM
41092002-11-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4110 Alan Modra <amodra@bigpond.net.au>
4111
4112 * config.bfd (sh-*-linux*): Use bfd_elf*_sh64*lin_vec as sh64
4113 vectors in target_selvecs.
4114 (shle-*-netbsdelf*): Use bfd_elf*_sh64*nbsd_vec as sh64 vectors
4115 in target_selvecs.
4116 (sh-*-netbsdelf*): Likewise.
4117 * configure.in (assocvecs): New variable. Handle assocvecs like
4118 selvecs.
4119 * configure: Regenerate.
4120 * format.c (bfd_check_format_matches): Store bfd_target pointers
4121 in matching_vector instead of target names. Select first target
4122 from bfd_associated_vector that matches a list of ambiguous targets.
4123 * targets.c (_bfd_associated_vector): New array.
4124 (bfd_associated_vector): New variable.
4125 (_bfd_target_vector): Add bfd_elf*_sh64*lin_vec.
4126 * libbfd-in.h (bfd_associated_vector): Declare.
4127 * libbfd.h: Regenerate.
4128
89117aab
AM
41292002-11-05 Elias Athanasopoulos <eathan@otenet.gr>
4130
4131 * vms-gsd.c (_bfd_vms_write_gsd): Check that symbol->udata.p is
4132 non-NULL before dereferencing.
4133
5e9aae3e
KK
41342002-11-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4135
4136 * vms.c (vms_object_p): Restore the start address when returning
4137 NULL.
4138
c97e73dd
AM
41392002-11-04 Alan Modra <amodra@bigpond.net.au>
4140 Hans-Peter Nilsson <hp@axis.com>
4141
4142 * elflink.h (struct elf_final_link_info): Add shndxbuf_size.
4143 (elf_bfd_final_link): Don't bother zeroing symtab_hdr fields.
4144 Set up a larger symshndxbuf, and write it out. Free it on
4145 exit rather than freeing symbuf twice. Correct section index
4146 on output section symbol loop.
4147 (elf_link_output_sym): Accumulate symbol extension section
4148 indices, reallocating symshndxbuf rather than writing it out.
4149 (elf_link_flush_output_syms): Don't flush symshndxbuf.
4150 * elf.c (assign_section_numbers): Init i_shdrp to all zero.
4151 Use bfd_zalloc to clear i_shdrp[0] too.
4152
3463048e
SC
41532002-11-03 Stephen Clarke <stephen.clarke@earthling.net>
4154
4155 * elf32-sh64-com.c (sh64_address_in_cranges): Use
4156 _raw_size of cranges section if _cooked_size not yet set.
4157
63a23799
HPN
41582002-11-03 Hans-Peter Nilsson <hp@axis.com>
4159
4160 * elf32-v850.c (v850_elf_relax_delete_bytes): Correct parameters
4161 for bfd_elf32_swap_symbol_out.
4162
e68cc12e
DB
41632002-10-31 David O'Brien <obrien@FreeBSD.org>
4164
4165 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't mix
4166 signed and unsigned in comparison.
4167
db4b6d01
DJ
41682002-10-30 Daniel Jacobowitz <drow@mvista.com>
4169
4170 * coffcode.h: Remove extraneous '\'.
4171
840f0243
L
41722002-10-28 H.J. Lu <hjl@gnu.org>
4173
4174 * Makefile.am (targets.lo): Depend on Makefile instead of
4175 config.status.
4176 (archures.lo): Likewise.
4177 * Makefile.in: Regenerated.
4178
05a7e2db
JT
41792002-10-25 Jason Thorpe <thorpej@wasabisystems.com>
4180
4181 * config.bfd (mips*el-*-netbsd*, mips*-*-netbsd*): Add
4182 bfd_elf64_bigmips_vec and bfd_elf64_littlemips_vec to
4183 targ_selvecs.
4184
a0087177
JW
41852002-10-25 Jim Wilson <wilson@redhat.com>
4186
4187 * elf64-sh64.c (sh_elf64_relocate_section): Call
4188 _bfd_elf_rela_local_sym. Handle relocs against STT_SECTION symbol
4189 of SHF_MERGE section.
4190
8718ac9c
HPN
41912002-10-25 Hans-Peter Nilsson <hp@axis.com>
4192
4193 * simple.c: Correct placement of ATTRIBUTE_UNUSED.
4194
d45913a0
DA
41952002-10-24 John David Anglin <dave@hiauly1.hia.nrc.ca>
4196
4197 * aoutx.h (NAME(aout,swap_ext_reloc_in)): Cast bytes->r_index to
4198 unsigned int. Cast RELOC_BASE10, RELOC_BASE13 and RELOC_BASE22 to
4199 unsigned int.
4200 (NAME(aout,final_link)): Cast enum used in assignment.
4201 (aout_link_write_symbols): Cast enums in comparisons, int values to
4202 boolean, enums in assignments to int.
4203 (aout_link_input_section_std): Cast rel->r_index to unsigned int.
3dab13f6
AM
4204 (aout_link_input_section_ext): Likewise. Cast enums used in
4205 comparisons with unsigned ints.
d45913a0
DA
4206 (aout_link_reloc_link_order): Cast enum to int in assignment.
4207 * archive.c (_bfd_generic_read_ar_hdr_mag): Cast result of memchr
4208 calls to char *.
4209 * bfd-in.h (bfd_set_section_vma): Cast enum true to unsigned int in
4210 assignment.
4211 * bfd-in2.h (bfd_set_section_vma): Likewise.
4212 * bfd.c (bfd_record_phdr): Cast enums in assignments.
4213 * binary.c (bfd_alloc): Cast enum to long.
4214 * coffgen.c (_bfd_coff_is_local_label_name): Cast return to boolean.
4215 * dwarf2.c (read_abbrevs): Add casts to enum types.
4216 (read_attribute_value): Likewise.
4217 (arange_add): Cast result of bfd_zalloc call.
4218 (comp_unit_contains_address): Return true and false.
4219 (comp_unit_find_nearest_line): Cast return to boolean.
4220 * format.c (bfd_check_format_matches, bfd_set_format): Likewise.
4221 * gen-aout.c: define macro '_' if not defined.
4222 * libbfd.c (bfd_realloc): Cast malloc and realloc to PTR.
4223 (bfd_bwrite): Cast bfd_realloc to bfd_byte *.
4224 (bfd_write_bigendian_4byte_int): Cast return to boolean.
4225 (bfd_seek): Cast bfd_realloc to bfd_byte *.
4226 (bfd_generic_is_local_label_name): Cast return to boolean.
4227 * libcoff.h (_bfd_coff_adjust_symndx): Remove extraneous '\'.
4228 * linker.c (_bfd_link_hash_newfunc): Cast bfd_hash_allocate result to
4229 struct bfd_hash_entry *.
4230 (_bfd_generic_link_hash_newfunc): likewise.
4231 (_bfd_generic_final_link): Cast enum to unsigned int.
4232 * merge.c (sec_merge_emit): Cast return to boolean.
4233 (merge_strings): Add casts to const unsigned char *.
4234 * reloc.c (bfd_get_reloc_code_name): Cast enums in comparison to int.
4235 (bfd_generic_get_relocated_section_content): Cast enum to unsigned int.
3dab13f6
AM
4236 * section.c (bfd_section_hash_newfunc): Cast bfd_hash_allocate result
4237 to struct bfd_hash_entry *.
d45913a0
DA
4238 (bfd_set_section_content): Add cast to PTR in comparison.
4239 * simple.c (simple_dummy_warning, simple_dummy_undefined_symbol,
4240 simple_dummy_reloc_overflow, simple_dummy_reloc_dangerous,
4241 simple_dummy_unattached_reloc,
4242 bfd_simple_get_relocated_section_contents): Add K&R declarations and
4243 function definitions.
4244 * srec.c (S3Forced): Initialize to false.
4245 (srec_get_symtab): Cast return value from bfd_alloc to asymbol *.
4246 * stabs.c (_bfd_link_section_stabs): Cast enum to int in comparisons.
4247 (_bfd_discard_section_stabs): Likewise. Also cast return to boolean.
4248 * syms.c (bfd_is_undefined_symclass): Cast return to boolean.
4249 (_bfd_stab_section_find_nearest_line): Cast enum to bfd_byte in
4250 comparisons.
4251
475c2a7e
JJ
42522002-10-23 Jakub Jelinek <jakub@redhat.com>
4253
4254 * elf64-alpha.c (elf64_alpha_check_relocs): Only put maybe_dynamic
4255 relocs into shared lib non-allocated reloc sections.
4256
e82ce529
AM
42572002-10-23 Nathan Tallent <eraxxon@alumni.rice.edu>
4258
4259 * dwarf2.c (add_line_info): Ensure that the line_info_table is
4260 sorted even when given an out-of-order line sequence.
4261 (lookup_address_in_line_info_table): When an exact VMA match is
4262 not found, return line information with the closest VMA.
4263
f2482cb2
NC
42642002-10-23 Ross Alexander <ross.alexander@uk.neceur.com>
4265
4266 * elf64-hppa.c: Force DT_FLAGS to always be set. Required by
4267 HPUX 11.00 patch PHSS_26559.
4268
c1fd6598
AO
42692002-10-22 Alexandre Oliva <aoliva@redhat.com>
4270
4271 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Don't move
4272 the options section into a separate section unless IRIX 6
4273 compatibility is enabled.
4274
033fd5f9
AO
42752002-10-22 Alexandre Oliva <aoliva@redhat.com>
4276
4277 * elflink.h (struct elf_link_sort_rela): Turn rel and rela
4278 into arrays.
4279 (elf_link_sort_cmp1, elf_link_sort_cmp2): Adjust.
4280 (elf_link_sort_relocs): Likewise. Take int_rels_per_ext_rel
4281 into account.
4282 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Compose
4283 R_MIPS_REL32 with R_MIPS64 if ABI_64_P.
4284
ef485c01
AM
42852002-10-21 Graeme Peterson <gp@qnx.com>
4286
4287 * targets.c (_bfd_target_vector): Add missing qnx vectors.
4288
b50afec9
AM
42892002-10-21 Alan Modra <amodra@bigpond.net.au>
4290
4291 * targets.c (bfd_target_list): Don't return the default target twice.
4292
5fe39cae
AM
42932002-10-21 Elias Athanasopoulos <eathan@otenet.gr>
4294
4295 * archive.c (_bfd_archive_bsd_update_armap_timestamp): Replace
4296 perror with bfd_perror.
4297
5d603aa9
L
42982002-10-19 H.J. Lu <hjl@gnu.org>
4299
4300 * elflink.h (elf_link_add_object_symbols): Correctly handle
4301 DT_RPATH and DT_RUNPATH.
4302
e377ab71
MK
43032002-10-19 Mark Kettenis <kettenis@gnu.org>
4304
4305 * elf.c (elfcore_grok_note): Fix recognition on NT_PRXFPREG notes.
4306
0d09fec6
DC
43072002-10-17 Denis Chertykov <denisc@overta.ru>
4308
4309 * elf32-ip2k.c (ELF_MACHINE_ALT1): Define alternate machine code
4310 for ip2k port.
4311
acf8aed4
AM
43122002-10-17 Alan Modra <amodra@bigpond.net.au>
4313
4314 * elfxx-target.h (USE_REL): Don't define as 1.
4315 * elf32-arm.h (USE_REL): Provide a default define of 0.
4316 Use #if rather than #ifdef when testing USE_REL.
4317 * elf32-m32r.c: Likewise.
4318
4319 * elf32-arc.c (USE_REL): Define as 1.
4320 * elf32-d10v.c (USE_REL): Likewise.
4321 * elf32-m32r.c (USE_REL): Likewise.
4322 * elf32-m68hc11.c (USE_REL): Likewise.
4323 * elf32-m68hc12.c (USE_REL): Likewise.
4324 * elf32-or32.c (USE_REL): Likewise.
4325 * elfarm-nabi.c (USE_REL): Likewise.
4326
f52d1d64
JJ
43272002-10-16 Jakub Jelinek <jakub@redhat.com>
4328
4329 * config.bfd (s390-*-linux*): Add targ64_selvecs.
4330 (s390x-*-linux*): Add targ_selvecs.
4331
2bc3c89a
AM
43322002-10-16 Alan Modra <amodra@bigpond.net.au>
4333
4334 * Makefile.am (BFD32_BACKENDS): Remove elfarmqnx-nabi.lo,
5fe39cae 4335 elf32-i386-fbsd.lo, elf32-i386qnx.lo, elf32-ppcqnx.lo,
2bc3c89a
AM
4336 elf32-sh-lin.lo, elf32-sh64-lin.lo, elf32-sh-nbsd.lo,
4337 elf32-sh64-nbsd.lo, elf32-shqnx.lo. Add elf32-qnx.lo.
4338 (BFD32_BACKENDS_CFILES): Likewise for corresponding C files.
4339 (BFD64_BACKENDS): Remove elf64-sh64-lin.lo, elf64-sh64-nbsd.lo.
4340 (BFD64_BACKENDS_CFILES): Likewise for corresponding C files.
4341 (SOURCE_HFILES): Add elf32-qnx.h.
4342 (BUILD_HFILES): Add bfdver.h.
4343 Run "make dep-am".
4344 * Makefile.in: Regenerate.
4345 * configure.in Update bfd vector dependencies.
4346 * configure: Regenerate.
4347 * elf32-i386-fbsd.c: Delete. Move code to elf32-i386.c.
4348 * elf32-i386qnx.c: Likewise.
4349 * elf32-ppcqnx.c: Delete. Move code to elf32-ppc.c.
4350 * elf32-sh-nbsd.c: Delete. Move code to elf32-sh.c.
4351 * elf32-sh-lin.c: Likewise.
4352 * elf32-shqnx.c: Likewise.
4353 * elf32-sh64-lin.c: Delete. Move code to elf32-sh64.c.
4354 * elf32-sh64-nbsd.c: Likewise.
4355 * elf64-sh64-lin.c: Delete. Move code to elf64-sh64.c.
4356 * elf64-sh64-nbsd.c: Likewise.
4357 * elfarmqnx-nabi.c: Delete. Move code to elfarm-nabi.c.
4358 * elf32-arm.h (ELF_MAXPAGESIZE): Always define.
4359 * elf32-i386.c: Remove ELF_ARCH and ELF32_I386_C_INCLUDED tests.
4360 * elf32-ppc.c: Remove ELF32_PPC_C_INCLUDED tests.
4361 * elf32-qnx.h (elf_backend_set_nonloadable_filepos): Always define.
4362 (elf_backend_is_contained_by_filepos): Likewise.
4363 (elf_backend_copy_private_bfd_data_p): Likewise.
4364 Globalize and move functions to..
4365 * elf32-qnx.c: ..here. New file.
4366 * elf32-sh.c: Remove ELF_ARCH and ELF32_SH_C_INCLUDED tests. Don't
4367 emit target vectors when INCLUDE_SHMEDIA.
4368 * elf32-sh64.c: Remove ELF_ARCH test. Move TARGET_* etc. defines to
4369 end of file.
4370 * elf64-sh64.c: Remove ELF_ARCH test.
4371 * elfarm-nabi.c: Remove ELFARM_NABI_C_INCLUDED test.
4372 * po/BLD-POTFILES.in: Regenerate.
4373 * po/SRC-POTFILES.in: Regenerate.
4374
90c9df85
AM
43752002-10-16 Alan Modra <amodra@bigpond.net.au>
4376
366f2964
AM
4377 * elflink.h (elf_link_add_object_symbols): Error out on dynamic objects
4378 loaded with --just-symbols.
4379
90c9df85
AM
4380 * elf32-i386qnx.c (TARGET_LITTLE_NAME): Define.
4381 * elf32-ppcqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
4382 * elf32-shqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
4383 * elfarmqnx-nabi.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
4384
2238051f
RH
43852002-10-15 Richard Henderson <rth@redhat.com>
4386
4387 * Makefile.am (BFD64_BACKENDS): Remove elf64-alpha-fbsd.
4388 (BFD64_BACKENDS_CFILES): Likewise.
4389 * configure.in (bfd_elf64_alpha_freebsd_vec): Use elf64-alpha.
4390 * elf64-alpha-fbsd.c: Remove file, move code ...
4391 * elf64-alpha.c: ... here.
4392 * Makefile.in, configure: Rebuild.
4393
64e04ecd
RH
43942002-10-14 Richard Henderson <rth@redhat.com>
4395
4396 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: Increment
4397 VALUE, not ADDEND.
4398
396a6083
SC
43992002-10-14 Stephen Clarke <stephen.clarke@superh.com>
4400
4401 * elf32-sh.c (elf_sh_link_hash_entry): Replace
4402 datalabel_got_offset with union of datalabel_got
4403 offset and refcount.
4404 (sh_elf_link_hash_newfunc): Initialize datalabel_got.refcount.
4405 (allocate_dynrelocs): Delete unnecessary code for
4406 STT_DATALABEL type. Create entry in got for
4407 datalabel version of symbol if datalabel_got.refcount > 0.
4408 (sh_elf_relocate_section): Use datalabel_got union.
4409 (sh_elf_gc_sweep_hook): Pull common code to initialize
4410 h and eh out of switch statement. Declare seen_stt_datalabel.
4411 Initialize it. Decrement datalabel_got.refcount for
4412 got relocs when seen_stt_datalabel is true.
4413 Decrement local_got_refcounts entry for datalabel got relocs
4414 of local symbols.
4415 (sh_elf_copy_indirect_symbol): Copy datalabel_got field over.
4416 (sh_elf_check_relocs): Declare seen_stt_datalabel.
4417 Initialize it. When seen_stt_datalabel is true, increment
4418 datalabel_got refcount rather than got.refcount.
4419 (sh_elf_finish_dynamic_symbol): Create relocs to
4420 initialize got entry for datalabel version of symbol.
4421
6a0735ef
AM
44222002-10-14 Alan Modra <amodra@bigpond.net.au>
4423
4424 * Makefile.am: Run "make dep-am".
4425 (BFD_H_FILES): Remove version.h.
4426 * bfd-in.h (BFD_VERSION, BFD_VERSION_DATE, BFD_VERSION_STRING): Move..
4427 * version.h: ..to here.
4428 * configure.in (bfd_version_date): Remove.
4429 (AC_OUTPUT): Make bfdver.h from version.h.
4430 * bfd.c: #include "bfdver.h".
4431 * vms-hdr.c: Likewise.
4432 * Makefile.in: Regenerate.
4433 * bfd-in2.h: Regenerate.
4434 * configure: Regenerate.
4435 * po/SRC-POTFILES.in: Regenerate.
4436
686e4055
AM
44372002-10-14 Alan Modra <amodra@bigpond.net.au>
4438
4439 * archures.c (bfd_mach_i386_i386, bfd_mach_i386_i8086,
4440 bfd_mach_i386_i386_intel_syntax, bfd_mach_x86_64,
4441 bfd_mach_x86_64_intel_syntax bfd_mach_ppc, bfd_mach_ppc64,
4442 bfd_mach_rs6k, bfd_mach_d10v, bfd_mach_sh, bfd_mach_v850,
4443 bfd_mach_arc_5, bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8,
4444 bfd_mach_m32r, bfd_mach_frv, bfd_mach_frvsimple,
4445 bfd_mach_ia64_elf64, bfd_mach_ia64_elf32,
4446 bfd_mach_ip2022, bfd_mach_ip2022ext,
4447 bfd_mach_s390_31, bfd_mach_s390_64, bfd_mach_xstormy16): Renumber.
4448 * bfd-in2.h: Regenerate.
4449
019dca2b
KK
44502002-10-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4451
4452 * config.bfd (sh*eb-*-linux*, sh*-*-linux*): Add the alternative
4453 endian vector to targ_selvecs.
4454
bce03d3d
AO
44552002-10-13 Alexandre Oliva <aoliva@redhat.com>
4456
4457 * elfxx-mips.c (mips_elf_calculate_relocation): Take
4458 save_addend argument. Don't apply the 32-bit mask to a
4459 GPREL32 value if it's to be used in another relocation. Don't
4460 use forced-check computation of local_p to decide whether to
4461 add gp0 to GPREL16 value. Don't use only the lowest 16 bits
4462 of the addend of a non-in-place GPREL16 relocation.
4463 (_bfd_mips_elf_relocate_section): Pass use_saved_addend_p to
4464 mips_elf_calculate_relocation().
4465
9b691193
SC
44662002-10-12 Stephane Carrez <stcarrez@nerim.fr>
4467
4468 * elf32-m68hc11.c (m68hc11_elf_relax_section): Don't treat relocs
4469 with symbols in other sections if we relaxed something; the sections
4470 output offsets must be re-computed before.
4471
1f4c5b47
SC
44722002-10-12 Stephane Carrez <stcarrez@nerim.fr>
4473
4474 * elf32-m68hc11.c (m68hc11_elf_relax_section): Update symbols
4475 handling to use Elf_Internal_Sym.
4476 (m68hc11_elf_relax_delete_bytes): Likewise.
4477
5dc97655
KK
44782002-10-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4479
4480 * elf32-sh.c (sh_elf_optimized_tls_reloc, sh_elf_mkobject,
4481 sh_elf_object_p, dtpoff_base): New functions.
4482 (sh_elf_howto_table): Add TLS relocs.
4483 (sh_reloc_map): Likewise.
4484 (sh_elf_info_to_howto): Support TLS relocs.
4485 (elf_sh_link_hash_entry): Add tls_type and tls_tpoff32.
4486 (sh_elf_hash_entry, sh_elf_tdata, sh_elf_local_got_tls_type):
4487 New macros.
4488 (sh_elf_obj_tdata): New.
4489 (elf_sh_link_hash_table): Add tls_ldm_got.
4490 (sh_elf_link_hash_table_create): Clear refcount of tls_ldm_got.
4491 (allocate_dynrelocs): Support TLS relocs.
4492 (sh_elf_size_dynamic_sections): Likewise.
4493 (sh_elf_relocate_section): Support TLS relocs. Don't try to find
4494 .rela.got section when found already. Return false after printing
4495 error about unresolvable relocation.
4496 (sh_elf_gc_sweep_hook): Support TLS relocs.
4497 (sh_elf_check_relocs): Likewise.
4498 (sh_elf_finish_dynamic_symbol): Likewise.
4499 (bfd_elf32_mkobject, elf_backend_object_p): Define for TLS case.
4500 * reloc.c: Add SH TLS relocs.
4501 * bfd-in2.h, libbfd.h: Regenerate.
4502
6a0735ef
AM
45032002-10-11 Daniel Jacobowitz <drow@mvista.com>
4504
4505 * Makefile.in: Regenerated.
4506
af39267e
DJ
45072002-10-11 Daniel Jacobowitz <drow@mvista.com>
4508
4509 * Makefile.am: Run dep-am.
6a0735ef 4510 (BFD_H_DEP): Add simple.c and linker.c.
af39267e
DJ
4511 (BFD32_LIBS): Add simple.lo.
4512 (BFD32_LIBS_CFILES): Add simple.c.
4513 * Makefile.in: Regenerated.
4514 * bfd-in2.h: Regenerated.
4515 * simple.c: New file.
4516
0be617ce
AM
45172002-10-11 Alan Modra <amodra@bigpond.net.au>
4518
14a793b2
AM
4519 * coff-arm.c (record_arm_to_thumb_glue): Avoid type-punned pointers.
4520 (record_thumb_to_arm_glue): Likewise.
4521 * ecoff.c (ecoff_link_add_externals): Likewise.
4522 * elf32-arm.h (record_arm_to_thumb_glue): Likewise.
4523 (record_thumb_to_arm_glue): Likewise.
4524 * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
4525 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
4526 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
4527 * elf64-alpha.c (elf64_alpha_create_dynamic_sections): Likewise.
4528 * elf64-ppc.c (func_desc_adjust): Likewise.
4529 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
4530 (sh64_elf64_create_dynamic_sections): Likewise.
4531 * elflink.c (_bfd_elf_create_got_section): Likewise.
4532 (_bfd_elf_create_dynamic_sections): Likewise.
4533 (_bfd_elf_create_linker_section): Likewise.
4534 * elflink.h (elf_add_default_symbol): Likewise.
4535 (elf_link_create_dynamic_sections): Likewise.
4536 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
4537 * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Likewise.
4538 * elfxx-mips.c (mips_elf_create_got_section): Likewise.
4539 (_bfd_mips_elf_add_symbol_hook): Likewise.
4540 (_bfd_mips_elf_create_dynamic_sections): Likewise.
4541 * linker.c (generic_link_add_symbol_list): Likewise.
4542 * xcofflink.c (xcoff_link_add_symbols): Likewise.
4543
4544 * elfxx-ia64.c (oor_brl, oor_ip): Conditionally define.
4545
0be617ce 4546 * elf64-ppc.c (edit_opd): Only zero opd syms when function is
7f6a7663 4547 completely removed. Correct local sym adjustment.
0be617ce 4548
0a4ef3f4
SC
45492002-10-10 Stephen Clarke <stephen.clarke@superh.com>
4550
4551 * elf32-sh.c (elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
4552 Correct mistake in calculation of address of .got.
4553 * elf64-sh64.c (elf_sh64_pic_plt_entry_be,
4554 elf_sh64_pic_plt_entry_le): Likewise.
4555
efacd36e
SC
45562002-10-09 Richard Shann <richard.shann@superh.com>
4557 Stephen Clarke <stephen.clarke@superh.com>
4558
4559 * Makefile.am: Add entries for elf32-sh64-lin.c and
4560 elf64-sh64-lin.c. Regenerate.
4561 * Makefile.in: Regenerate.
9b5ecbd0 4562 * config.bfd: Change sh64eb-*-linux* and sh64-*-linux*
efacd36e
SC
4563 to use sh64 vectors rather than sh vectors.
4564 * configure.in: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
4565 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
4566 * configure: Regenerate.
4567 * elf32-sh64-lin.c: New file.
4568 * elf64-sh64-lin.c: New file.
4569 * targets.c: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
5fe39cae
AM
4570 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
4571
299bf759
L
45722002-10-08 H.J. Lu <hjl@gnu.org>
4573
4574 * elf32-i386.c (elf_i386_relocate_section): Re-arrange the
4575 IE->LE transition for R_386_TLS_IE.
4576
51020317
AM
45772002-10-08 Alan Modra <amodra@bigpond.net.au>
4578
4579 * elf64-ppc.c (edit_opd): Correct test for discarded sections.
4580
a8fcf378
NC
45812002-10-07 Mark Elbrecht <snowball3@softhome.net>
4582
51020317
AM
4583 * cofflink.c (mark_relocs): Don't mark relocations in excluded
4584 sections.
a8fcf378 4585
a16d5acb
AM
45862002-10-07 Alan Modra <amodra@bigpond.net.au>
4587
a6b511bd
AM
4588 * elflink.h (elf_link_input_bfd): Remove BFD_VERSION_DATE dependent
4589 code.
4590
a16d5acb
AM
4591 * elf64-ppc.c (ppc64_elf_build_stubs): Increment .glink indx.
4592
7c4a37eb
AM
45932002-10-06 Alan Modra <amodra@bigpond.net.au>
4594
4595 * opncls.c: Formatting.
4596 (_bfd_new_bfd): Use a smaller section hash table.
4597
7c4ca42d
AO
45982002-10-05 Alexandre Oliva <aoliva@redhat.com>
4599
4600 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Set the type
4601 of the other two relocations packed with a REL32 to NONE.
4602
4989d792
SC
46032002-10-02 Stephen Clarke <stephen.clarke@superh.com>
4604
4605 * elf32-sh.c (elf_sh_link_hash_entry): Add gotplt_refcount.
4606 (sh_elf_link_hash_newfunc): Initialize it.
4607 (allocate_dynrelocs): Transfer gotplt refs from plt.refcount
4608 to got.refcount for symbols that are forced local or when
4609 we have direct got refs.
4610 (sh_elf_gc_sweep_hook): Adjust gotplt_refcount. Use it
4611 to correctly adjust got.refcount and plt.refcount.
4612 (sh_elf_copy_indirect_symbol): Copy gotplt_refcount across.
4613 (sh_elf_check_relocs): Increment gotplt_refcount.
51020317 4614
7c445aa3
JJ
46152002-10-01 Jakub Jelinek <jakub@redhat.com>
4616
4617 * elf32-i386.c (elf_i386_relocate_section): Fix
4618 movl foo@indntpoff, %eax IE->LE transition.
4619
abcf1d52
JJ
46202002-10-01 Jakub Jelinek <jakub@redhat.com>
4621
4622 * elf64-x86-64.c (elf64_x86_64_relocate_section): Change TLSGD
4623 sequence and its transitions.
4624
a45bb67d
JJ
46252002-10-01 Jakub Jelinek <jakub@redhat.com>
4626
4627 * elf32-i386.c (elf_i386_relocate_section): Resolve R_386_TLS_LDO_32
4628 to st_value + addend in non-code sections.
4629 * elf64-x86-64.c (elf64_x86_64_relocate_section): Resolve
4630 R_X86_64_DTPOFF32 to st_value + addend in non-code sections.
4631
00707a0e 46322002-09-30 Gavin Romig-Koch <gavin@redhat.com>
51020317
AM
4633 Ken Raeburn <raeburn@cygnus.com>
4634 Aldy Hernandez <aldyh@redhat.com>
4635 Eric Christopher <echristo@redhat.com>
4636 Richard Sandiford <rsandifo@redhat.com>
00707a0e
RS
4637
4638 * archures.c (bfd_mach_mips4120, bfd_mach_mips5400): New.
4639 (bfd_mach_mips5500): New.
4640 * cpu-mips.c (I_mips4120, I_mips5400, I_mips5500): New.
4641 (arch_info_struct): Add corresponding entries here.
4642 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_4120,
4643 E_MIPS_MACH_5400 and E_MIPS_MACH_5500.
4644 (_bfd_mips_elf_final_write_processing): Handle bfd_mach_mips4120,
4645 bfd_mach_mips5400 and bfd_mach_mips5500.
4646 (_bfd_mips_elf_mach_extends_p): New function.
4647 (_bfd_mips_elf_merge_private_bfd_data): Use it to help merge
4648 the EF_MIPS_MACH flags.
4649 * bfd-in2.h: Regenerate.
4650
624f0b25
JT
46512002-09-28 Jason Thorpe <thorpej@wasabisystems.com>
4652
4653 * elf32-vax.c (elf_vax_size_dynamic_section): Don't strip
4654 .got sections.
4655
b89fe0ee
AM
46562002-09-28 Alan Modra <amodra@bigpond.net.au>
4657
4658 * elf.c (map_sections_to_segments): Correct test for start of
4659 writable section in the same page as end of read-only section.
4660
b29635ba
JT
46612002-09-27 Matt Thomas <matt@3am-software.com>
4662
4663 * elf32-vax.c (elf_vax_check_relocs): Remove unused
4664 local_got_refcounts usage. Remove allocation of got slot.
4665 (elf_vax_gc_sweep_hook): Remove unused local_got_refcounts usage.
4666 Remove de-allocation of got slot.
4667 (elf_vax_size_dynamic_section): Fix some indentation. Add hash
4668 traversal for elf_vax_instantiate_got_entries. Allow empty .got
4669 sections to be GC'ed.
4670 (elf_vax_instantiate_got_entries): New function.
4671 (elf_vax_relocate_section): Simplify R_VAX_GOT32 handling. Remove
4672 tests that are now handled by elf_vax_instantiate_got_entries.
4673 Assert GOT entry falls within .got section size. Remove redundant
4674 comparisions. Fix comments.
4675
bffbf940
JJ
46762002-09-27 Jakub Jelinek <jakub@redhat.com>
4677
4678 * reloc.c: Add x86-64 TLS relocs.
4679 * bfd-in2.h, libbfd.h: Rebuilt.
4680 * elf64-x86-64.c (x86_64_elf_howto): Fix size fields for 32-bit
4681 relocs. Add TLS relocs.
4682 (x86_64_reloc_map): Add TLS relocs.
4683 (elf64_x86_64_info_to_howto): Adjust for added TLS relocs.
4684 (struct elf64_x86_64_link_hash_entry): Add tls_type field.
4685 (GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD, GOT_TLS_IE): Define.
4686 (elf64_x86_64_hash_entry): Define.
4687 (struct elf64_x86_64_obj_tdata): New.
4688 (elf64_x86_64_tdata, elf64_x86_64_local_got_tls_type): Define.
4689 (struct elf64_x86_64_link_hash_table): Add tls_ld_got.
4690 (link_hash_newfunc): Initialize tls_type.
4691 (elf64_x86_64_link_hash_table_create): Initialize tls_ld_got.
4692 (elf64_x86_64_copy_indirect_symbol): Swap tls_type if necessary.
4693 (elf64_x86_64_mkobject): New.
4694 (elf64_x86_64_elf_object_p): Allocate struct elf64_x86_64_obj_tdata.
4695 (elf64_x86_64_tls_transition): New.
4696 (elf64_x86_64_check_relocs): Add r_type variable and use it.
4697 Handle TLS relocs.
4698 (elf64_x86_64_gc_sweep_hook): Handle TLS relocs.
4699 (allocate_dynrelocs): Allocate GOT space for TLS relocs.
4700 (elf64_x86_64_size_dynamic_sections): Likewise.
4701 (dtpoff_base, tpoff): New.
4702 (elf64_x86_64_relocate_section): Handle TLS relocs.
4703 (elf64_x86_64_finish_dynamic_symbol): Only handle non-TLS GOT
4704 entries.
4705 (bfd_elf64_mkobject): Define.
4706
4707 * elf32-i386.c (elf_i386_check_relocs) [R_386_TLS_LE]: Set
4708 DF_STATIC_TLS if shared.
4709
14366460
TS
47102002-09-26 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4711
4712 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Don't emit unneeded
4713 empty relocation sections.
4714
9f951329
AM
47152002-09-26 Alan Modra <amodra@bigpond.net.au>
4716
4717 * elf64-ppc.c (ppc_build_one_stub): Don't build glink stubs here.
4718 (ppc64_elf_build_stubs): Build them here instead.
4719
6b3ac709
JJ
47202002-09-24 Jakub Jelinek <jakub@redhat.com>
4721
4722 * elf32-sparc.c (elf32_sparc_relocate_section): Put R_SPARC_RELATIVE
4723 addend into r_addend, not *r_offset.
4724 (elf32_sparc_finish_dynamic_symbol): Likewise.
4725 * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Clear xword at
4726 R_SPARC_RELATIVE's r_offset.
4727
e2f6d277
NC
47282002-09-23 Nathan Tallent <eraxxon@alumni.rice.edu>
4729
4730 * dwarf2.c (decode_line_info): Update to correctly decode
4731 the (non-standard DWARF2) out-of-order address sequences
4732 generated by the Intel C++ 6.0 compiler for ia64-Linux.
4733
f3961b2b
DD
47342002-09-23 Mark Elbrecht <snowball3@softhome.net>
4735
4736 * config.bfd: For DJGPP targets, match with any cpu and any machine.
4737
ad34bc37
AM
47382002-09-23 Alan Modra <amodra@bigpond.net.au>
4739
4740 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Zero relocs
4741 for discarded FDEs. Remove redundant assignment.
4742 * elflink.h (elf_bfd_discard_info): Save edited relocs.
4743
82988bff
L
47442002-09-22 H.J. Lu <hjl@gnu.org>
4745
4746 * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Don't merge
4747 the relocation count between different .reloc sections.
4748
5ad8645c
AM
47492002-09-21 Alan Modra <amodra@bigpond.net.au>
4750
5f819128
AM
4751 * elf32-ppc.c (ppc_elf_relocate_section): Allow ".sbss.*" and
4752 ".sdata.*" for R_PPC_SDAREL16, ".sbss2*" and ".sdata2*" for
4753 R_PPC_EMB_SDA2REL. Similarly for R_PPC_EMB_SDA21 and
4754 R_PPC_EMB_RELSDA.
4755
5ad8645c
AM
4756 * elfcode.h (elf_slurp_reloc_table_from_section): Make "symcount"
4757 unsigned. Move "symcount" assignment out of loop.
4758 * Makefile.am: Run "make dep-am".
4759 * Makefile.in: Regenerate.
4760 * configure: Regenerate.
4761 * po/SRC-POTFILES.in: Regnerate.
4762
75936555
NC
47632002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
4764
4765 * dwarf2.c (_bfd_dwarf2_find_nearest_line): If address length is
4766 zero, set it to 8 for (non-standard) 64-bit DWARF2 formats
4767 (e.g. IRIX64).
4768
2243deae
L
47692002-09-19 Jakub Jelinek <jakub@redhat.com>
4770
4771 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Clear .got word
4772 even if generating R_PPC_RELATIVE reloc.
4773 (ppc_elf_relocate_section): Make sure relocation is performed
4774 if skip == -2. Clear memory at r_offset when creating dynamic
4775 relocation.
4776
37e55690
JJ
47772002-09-19 Jakub Jelinek <jakub@redhat.com>
4778
4779 * reloc.c (BFD_RELOC_386_TLS_TPOFF, BFD_RELOC_386_TLS_IE,
4780 BFD_RELOC_386_TLS_GOTIE): Add.
4781 * bfd-in2.h, libbfd.h: Rebuilt.
4782 * elf32-i386.c (elf_howto_table): Add R_386_TLS_TPOFF, R_386_TLS_IE
4783 and R_386_TLS_GOTIE.
4784 (elf_i386_reloc_type_lookup): Handle it.
4785 (struct elf_i386_link_hash_entry): Change tls_type type to unsigned
4786 char instead of enum, change GOT_* into defines.
4787 (GOT_TLS_IE_POS, GOT_TLS_IE_NEG, GOT_TLS_IE_BOTH): Define.
4788 (elf_i386_tls_transition): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
4789 (elf_i386_check_relocs): Likewise. Avoid crash if local symbol is
4790 accessed both as normal and TLS symbol. Move R_386_TLS_LDM and
4791 R_386_PLT32 cases so that R_386_TLS_IE can fall through.
4792 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
4793 (elf_i386_gc_sweep_hook): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
4794 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
4795 (allocate_dynrelocs): Allocate 2 .got and 2 .rel.got entries if
4796 tls_type is GOT_TLS_IE_BOTH.
4797 (elf_i386_size_dynamic_sections): Likewise.
4798 (elf_i386_relocate_section): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
4799 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
4800 (elf_i386_finish_dynamic_symbol): Use tls_type & GOT_TLS_IE to catch
4801 all 4 GOT_TLS_* TLS types.
4802
8e67855b
NC
48032002-09-19 Nick Clifton <nickc@redhat.com>
4804
4805 * elflink.h (elf_fix_symbol_flags): When examining weak symbols,
4806 follow indirect links.
4807
1c59ba3f
NC
48082002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
4809
4810 * ecoffswap.h (ecoff_swap_pdr_in) <isym, iline>: Update to
4811 correctly sign-extend 32-bit ECOFF null values (0xffffffff, -1)
4812 on 64 bit machines.
4813 (ecoff_swap_sym_in) <iss>: Likewise.
0e327d91
NC
4814 * ecoff.c (_bfd_ecoff_slurp_symbolic_info): Fix error reading
4815 ECOFF information: 'ioptMax' refers to the actual *size*
4816 of the optimization symtab, not the number of entries.
1c59ba3f 4817
9d7404b7
NC
48182002-09-19 Daniel Jacobowitz <drow@mvista.com>
4819
4820 * elf32-arm.h (elf32_arm_adjust_dynamic_symbol): Update
4821 ELF_LINK_HASH_NEEDS_PLT logic.
4822
05a487dc
DJ
48232002-09-18 Daniel Jacobowitz <drow@mvista.com>
4824
4825 * elfcode.h (elf_slurp_reloc_table_from_section): Check
4826 correct relocation count.
4827
1f70368c
DJ
48282002-09-17 Daniel Jacobowitz <drow@mvista.com>
4829
4830 * bfd-in.h (bfd_get_dynamic_symcount): Define.
4831 * bfd.c (struct _bfd): Add dynsymcount.
4832 * bfd-in2.h: Regenerated.
4833 * elf.c (_bfd_elf_canonicalize_dynamic_symtab): Set
4834 abfd->dynsymcount.
4835 * elfcode.h (elf_slurp_reloc_table_from_section): Check
4836 for overflow.
4837
51020317 48382002-09-17 Stan Cox <scox@redhat.com>
a902ee94
SC
4839
4840 * elf64-mips.c (mips_elf64_be_swap_reloca_out): Handle type2 and type3.
4841 (mips_elf64_final_gp): Don't make up gp value.
4842 * elfn32-mips.c (mips_elf_final_gp): Likewise.
4843 * elfxx-mips.c (_bfd_mips_elf_final_link): Always create
4844 .MIPS.options/.options section.
4845
290062cc
DB
48462002-09-17 David O'Brien <obrien@FreeBSD.org>
4847
4848 * elf32-i386-fbsd.c: Always label using the EI_OSABI method.
4849 It is benign for FreeBSD < 4.1. Minor reformatting.
4850 * elf64-alpha-fbsd.c: Likewise.
4851
c5c1f40c
JJ
48522002-09-17 Jakub Jelinek <jakub@redhat.com>
4853
ca1eb0ba
JJ
4854 * elf32-i386.c (elf_i386_relocate_section) [R_386_TLS_TPOFF32]: Negate
4855 addend.
c5c1f40c 4856
562ace6b
AM
48572002-09-17 Alan Modra <amodra@bigpond.net.au>
4858
4859 * elf64-alpha.c (alpha_elf_size_info): Make static.
4860
5af6ead6
AM
48612002-09-17 Svein E. Seldal <Svein.Seldal@solidas.com>
4862
4863 * coff-tic4x.c: Add function declarations and ATTRIBUTE_UNUSED.
4864 * cpu-tic4x.c: Ditto.
4865
cb9512fc
TS
48662002-09-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4867
4868 * elf64-mips.c (define elf_backend_ignore_discarded_relocs): Remove
4869 duplicate define.
4870
4ada7262
DB
48712002-09-16 Bruno Haible <bruno@clisp.org>
4872
4873 * elf32-i386.c: Don't defined ELF_ARCH etc. if this file is included
4874 by a target variant implementation.
4875 * elf64-alpha.c: Likewise.
4876 * elf32-i386-fbsd.c: New file.
4877 * elf64-alpha-fbsd.c: New file.
4878 * targets.c: Support bfd_elf32_i386_freebsd_vec and
4879 bfd_elf64_alpha_freebsd_vec.
4880 * configure.in: Accept the vectors bfd_elf32_i386_freebsd_vec,
4881 bfd_elf64_alpha_freebsd_vec.
4882 * Makefile.am (BFD32_BACKENDS): Add elf32-i386-fbsd.lo.
4883 (BFD32_BACKENDS_CFILES): Add elf32-i386-fbsd.c.
4884 (BFD64_BACKENDS): Add elf64-alpha-fbsd.lo.
4885 (BFD64_BACKENDS_CFILES): Add elf64-alpha-fbsd.c.
4886 (elf32-i386-fbsd.lo, elf64-alpha-fbsd.lo): Add dependencies.
4887 * config.bfd: For FreeBSD targets, set targ_defvec to a FreeBSD
4888 specific targets. Define OLD_FREEBSD_ABI_LABEL if appropriate.
4889
6a30718d
JJ
48902002-09-12 Jakub Jelinek <jakub@redhat.com>
4891
4892 * elf32-i386.c (dtpoff_base, tpoff): Don't crash if tls_segment is
4893 NULL.
4894 (elf_i386_relocate_section): Return false after printing error about
4895 unresolvable relocation.
4896
6cf9e9fe
NC
48972002-09-12 Nick Clifton <nickc@redhat.com>
4898
4899 * elf32-arm.h (elf32_arm_final_link_relocate): Fix handling of
4900 R_ARM_THM_PC11.
4901
10f469bf
DJ
49022002-09-11 Jeffrey Law <law@redhat.com>
4903
4904 * elf32-h8300.c (elf32_h8_relax_section): Fix typo.
4905
dc43ada5
NC
49062002-09-11 Andrew Haley <aph@cambridge.redhat.com>
4907
4908 * elf.c (_bfd_elf_find_nearest_line): Check functionname_ptr and
4909 line_ptr before deciding we've found a symbol.
4910
e09f4395
NC
49112002-09-11 Nick Clifton <nickc@redhat.com>
4912
4913 * po/da.po: New Danish translation file.
4914 * configure.in (LINGUAS): Add 'da'.
4915 * configure: Regenerate.
4916
b3018b5f
NC
49172002-09-10 Michael Snyder <msnyder@redhat.com>
4918
4919 * irix-core.c (do_sections, do_sections64): New functions.
51020317 4920 (irix_core_core_file_p): Call new functions do_sections,
b3018b5f
NC
4921 do_sections64, depending on corefile (32-bit or 64-bit).
4922
2f21f25e
RH
49232002-09-09 Richard Henderson <rth@redhat.com>
4924
4925 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21M
4926 and PCREL21F like PCREL21B.
4927
28b94e7c
KB
49282002-09-04 Kevin Buettner <kevinb@redhat.com>
4929
51020317
AM
4930 * config.bfd (mips*-*-irix6*): Add new ABI vectors. Make n32 default
4931 vector.
28b94e7c 4932
5cec6941
NC
49332002-09-02 Nick Clifton <nickc@redhat.com>
4934
4935 * elf32-v850.c (v850_elf_final_link_relocate): Use helpful
4936 names instead of cryptically overloaded bfd_reloc error
4937 codes.
4938 (v850_elf_relocate_section): Likewise.
4939 (v850_elf_relax_section): Replace caching of external symbols
4940 with caching of internal symbols obtained from calling
4941 bfd_elf_get_elf_syms().
51020317 4942 Fixup problems with freeing cached allocated memory blocks.
5cec6941 4943
3b77b1d5
AM
49442002-09-02 Alan Modra <amodra@bigpond.net.au>
4945
638524b5
AM
4946 * cpu-pj.c (scan_mach, compatible, arch_info_struct): Remove.
4947 (bfd_pj_arch): Use bfd_default_scan.
4948 * cpu-v850.c (scan): Remove.
4949 (N): Use bfd_default_scan.
4950 * cpu-z8k.c (scan_mach): Remove.
4951 (arch_info_struct, bfd_z8k_arch): Reorganize so that the default is
4952 first. Use bfd_default_scan.
4953
250d94fd
AM
4954 * ecoff.c (_bfd_ecoff_set_arch_mach_hook): Don't use hard-coded
4955 bfd_mach constants.
4956 (ecoff_get_magic): Likewise.
4957 * elf32-v850.c (v850_elf_object_p): Likewise.
4958 (v850_elf_final_write_processing): Likewise.
4959 * mipsbsd.c (MY(set_arch_mach)): Likewise.
4960 (MY(write_object_contents)): Likewise.
4961 * coff64-rs6000.c (xcoff64_write_object_contents): Likewise.
4962 * coffcode.h (coff_write_object_contents): Likewise.
4963 (coff_set_arch_mach_hook): Add comment describing machine == 0.
4964 Remove unnecessary "machine" assignments.
4965 (coff_write_relocs): Test for the absolute section sym by testing
4966 section and flags.
4967
3b77b1d5
AM
4968 * aoutx.h (NAME(aout,machine_type)): Recognize bfd_mach_i386_i386
4969 and bfd_mach_i386_i386_intel_syntax.
250d94fd 4970 * pdp11.c (NAME(aout,machine_type)): Likewise.
3b77b1d5 4971
e5b45b83
DA
49722002-08-30 John David Anglin <dave@hiauly1.hia.nrc.ca>
4973
4974 * bfd-in.h (align_power): Cast constants to bfd_vma type.
4975 * bfd-in2.h (align_power): Likewise.
4976
37f45cf8
AM
49772002-08-30 Alan Modra <amodra@bigpond.net.au>
4978
4979 * Makefile.am: Run "make dep-am".
4980 * Makefile.in: Regenerate.
4981
4982 * cpu-avr.c (compatible): Don't use hard-coded mach constants.
4983 * cpu-powerpc.c (powerpc_compatible): Likewise.
4984 * cpu-rs6000.c (rs6000_compatible): Likewise.
4985
86aba9db
NC
49862002-08-28 Catherine Moore <clm@redhat.com>
4987
9b5ecbd0 4988 * elf32-v850.c (v850_elf_reloc_map): Add new relocs.
86aba9db
NC
4989 (v850-elf-reloc): Don't resolve pc relative relocs.
4990 (v850_elf_ignore_reloc): New routine.
4991 (v850_elf_final_link_relocate): Handle new relocs.
4992 (v850_elf_relax_delete_bytes ): New routine.
4993 (v850_elf_relax_section): New routine.
4994 (bfd_elf32_bfd_relax_section): Define.
4995 (HOWTO): New entries for new relocs.
4996 * reloc.c (BFD_RELOC_V850_LONGCALL): New reloc.
4997 (BFD_RELOC_V850_LONGJUMP): New reloc.
4998 (BFD_RELOC_V850_ALIGN): New reloc.
4999 * archures.c: Remove redundant v850ea architecture.
5000 * cpu-v850.c: Remove redundant v850ea support.
5001 * libbfd.h: Regenerate.
5002 * bfd-in2.h: Regenerated.
5003
026df7c5
NC
50042002-08-28 Svein E. Seldal <Svein.Seldal@solidas.com>
5005
5006 * config.bfd: Add tic4x-*-*coff* and c4x-*-*coff* target.
5007 * configure.in: Add tic4x_coff vector files.
5008 * configure: Regenerate.
5009 * Makefile.am: Add tic4x target.
5010 * Makefile.in: Regenerate.
5011
50122002-08-27 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
5013
5014 * archures.c: Add the BFD arch type tic4x.
5015 * bfd-in.h: Add BFD_IN_MEMORY flag.
5016 * coff-tic4x.c: New file.
5017 * coffswap.h (coff_swap_sym_out): Add preadjuster.
5018 * cpu-tic4x.c: New file.
5019 * targets.c: Added tic4x- in list of xvecs.
5020 * ticoff.h: New file.
5021 * bfd-in2.h: Regenerate.
5022
88f7bcd5
NC
50232002-08-27 Adam Nemet <anemet@lnxw.com>
5024
5025 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Set the last
5026 bit of DT_INIT and DT_FINI for Thumb functions.
5027
c8e48751
AM
50282002-08-26 Alan Modra <amodra@bigpond.net.au>
5029
5030 * coffcode.h (coff_set_arch_mach_hook): Handle W65MAGIC.
5031
2846975a
AM
50322002-08-26 Alan Modra <amodra@bigpond.net.au>
5033
5034 * aoutx.h (NAME(aout,reloc_type_lookup)): Handle BFD_RELOC_8.
5035
067653c5
AM
50362002-08-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5037
5038 * elf32-sh.c (sh_elf_copy_indirect_symbol): New.
5039 (create_got_section, allocate_dynrelocs, readonly_dynrelocs):
5040 Likewise.
5041 (struct elf_sh_pcrel_relocs_copied): Removed.
5042 (struct elf_sh_dyn_relocs): New.
5043 (struct elf_sh_link_hash_entry): Replace pcrel_relocs_copied
5044 field with dyn_relocs.
5045 (struct elf_sh_link_hash_table): Add short-cuts to get dynamic
5046 sections and sym_sec.
5047 (sh_elf_link_hash_newfunc): Clear dyn_relocs.
5048 (sh_elf_link_hash_table_create): Clear shorts-cuts and sym_sec.
5049 (sh_elf_create_dynamic_sections): Use create_got_section instead
5050 of _bfd_elf_create_got_section.
5051 (sh_elf_check_relocs): Likewise.
5052 (sh_elf_create_dynamic_sections): Use short-cuts to the dynamic
5053 sections.
5054 (sh_elf_adjust_dynamic_symbol, sh_elf_size_dynamic_sections,
5055 sh_elf_relocate_section, sh_elf_check_relocs,
5056 sh_elf_finish_dynamic_symbol, sh_elf_finish_dynamic_sections):
5057 Likewise.
5058 (sh_elf_adjust_dynamic_symbol): Handle nocopyreloc. Keep the
5059 dynamic relocations and avoiding the copy relocation when we
5060 didn't find any dynamic relocations in the section which has
5061 contents or is read-only.
5062 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
5063 (sh_elf_size_dynamic_sections): Don't reset the size of
5064 .rela.got section even if dynamic_sections_created flag is off.
5065 Don't use sh_elf_discard_copies. Scan all input bfd and use
5066 allocate_dynrelocs. Call readonly_dynrelocs to determine
5067 whether we need DT_TEXTREL.
5068 (sh_elf_adjust_dynamic_symbol): Use plt.refcount to determine
5069 whether the symbol was never referred to.
5070 (sh_elf_relocate_section): Use WILL_CALL_FINISH_DYNAMIC_SYMBOL.
5071 (sh_elf_gc_sweep_hook): Fill with the real sweep function.
5072 (sh_elf_check_relocs): Call create_got_section if the short-cut
5073 to .got is null. Increment reference counters only instead of
5074 allocating space on dynamic sections here. Don't conditionalize
5075 uninitialized got.offset value when marking the symbol as a
5076 global offset table entry. Keep relocations for symbols satisfied
5077 by a dynamic library to avoid copy relocations for the symbol.
5078 Set dynobj field of an elf hash table if needed.
5079 (sh_elf_finish_dynamic_sections): Handle null section pointer
5080 correctly.
5081 (elf_backend_copy_indirect_symbol): Defined.
5082 (elf_backend_can_refcount): Defined.
5083
7e326afc
NC
50842002-08-23 Nick Clifton <nickc@redhat.com>
5085
5086 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Undo
5087 previous change. Add comment explaining why.
5088
c8614e8e
AM
50892002-08-23 Stephen Clarke <stephen.clarke@superh.com>
5090
5091 * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le): Copy
5092 contents of .got.plt[2] to tr0, not address of .got.plt.
5093 (sh_elf_finish_dynamic_symbol): Do not apply GOT_BIAS when
5094 patching absolute plt entry. For shmedia plt entry, set bottom bit
5095 of branch to plt0 as this is a branch to an shmedia instruction.
5096 * elf64-sh64.c (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le):
5097 Copy contents of .got.plt[2] to tr0, not address of .got.plt.
5098 (elf_sh64_plt_entry_be, elf_sh64_plt_entry_le): Use ptrel to
5099 branch to plt0.
5100 (sh64_elf64_finish_dynamic_symbol): Do not apply GOT_BIAS when
5101 patching absolute plt entry. For shmedia plt entry, branch to
5102 plt0 is now ptrel, so use relative offset. Set bottom bit of
5103 branch target as it is a branch to an shmedia instruction.
5104
3b587c71
AM
51052002-08-23 Stephen Clarke <stephen.clarke@superh.com>,
5106 Richard Shann <richard.shann@superh.com>
5107
5108 * elf32-sh.c (sh_elf_finish_dynamic_sections): Set LSB of DT_INIT
5109 value if .init is an SHmedia function. Similarly for DT_FINI.
5110 * elf64-sh64.c (sh64_elf64_finish_dynamic_sections): Likewise.
51020317 5111
957dcaa8
AM
51122002-08-23 Stephen Clarke <stephen.clarke@superh.com>
5113
3b587c71 5114 * elf32-sh.c (sh_elf_size_dynamic_sections): Zero initialize
957dcaa8 5115 dynamic section.
3b587c71 5116 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
957dcaa8 5117
a4263c47
NC
51182002-08-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5119
5120 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use a simple
51020317 5121 byte read when reading the return address register column.
a4263c47 5122
db4ed121
NC
51232002-08-22 Nick Clifton <nickc@redhat.com>
5124
5125 * config.bfd: Add powepc64-*-*bsd* target.
5126
ed71e111
NC
51272002-08-22 Graeme Peterson <gp@qnx.com>
5128
5129 * Makefile.am: Add entries for elf32-shqnx.c
5130 * Makefile.in: Regenerate.
5131 * config.bfd: Add support sh-*-nto* target.
5132 * configure.in: Add support for bfd_elf32_sh{l}qnx_vec.
5133 * configure: Regenerate.
5134 * elf32-qnx.h: Changed typo "elf_i386qnx_*" to "elf_qnx_*" .
5135 * elf32-sh.c: Do not include elf32-target.h if
5136 ELF32_SH_C_INCLUDED is defined.
5137 * elf32-shqnx.c: New file: Support for QNX.
5138 * targets.c: Add bfd_elf32_sh{l}qnx_vec.
5139
0ab72ee2
NC
51402002-08-22 Nick Clifton <nickc@redhat.com>
5141
75c83283
NC
5142 * po/tr.po: Updated Turkish translation.
5143
0ab72ee2
NC
5144 * syms.c (_bfd_generic_read_minisymbols): Set bfd_error if the
5145 symbols are not read.
5146
56780f18
AM
51472002-08-22 Alan Modra <amodra@bigpond.net.au>
5148
5149 * elf32-m68hc11.c: Formatting fixes.
5150 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
5151 * elf32-m68hc12.c: Formatting fixes.
5152 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
5153
b48fa14c
AM
51542002-08-22 Alan Modra <amodra@bigpond.net.au>
5155
a7c71b0c
AM
5156 * coff-rs6000.c (rs6000coff_vec <object_flags>): Add SEC_CODE and
5157 SEC_DATA.
5158 (pmac_xcoff_vec): Likewise.
5159 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
5160 (aix5coff64_vec): Likewise.
5161
56780f18
AM
51622002-08-22 Alan Modra <amodra@bigpond.net.au>
5163
b48fa14c
AM
5164 * elf-bfd.h (struct elf_backend_data): Add struct elf_backend_data
5165 param to elf_backend_copy_indirect_symbol.
5166 (_bfd_elf_link_hash_copy_indirect): Likewise.
5167 * elflink.h (elf_add_default_symbol, elf_fix_symbol_flags): Adjust
5168 calls to copy_indirect_symbol.
5169 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
5170 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
5171 * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
5172 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
5173 * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
5174 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
5175 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
5176 * elfxx-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
5177 * elfxx-mips.h (_bfd_mips_elf_copy_indirect_symbol): Likewise.
5178 * elf.c (_bfd_elf_link_hash_copy_indirect): Likewise. Properly
5179 test refcounts for "used" values.
5180
8c2ab17d
AM
51812002-08-21 John David Anglin <dave@hiauly1.hia.nrc.ca>
5182
5183 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Add PARAMS to
5184 argument declaration.
5185
d62b1198 51862002-08-19 Elena Zannoni <ezannoni@redhat.com>
51020317
AM
5187
5188 * archures.c (bfd_mach_ppc_e500): Added.
5189 * bfd-in2.h: Rebuilt.
d62b1198
EZ
5190 * cpu-powerpc.c (bfd_powerpc_archs): Added e500.
5191
9f88ba09
AM
51922002-08-19 Alan Modra <amodra@bigpond.net.au>
5193
5194 * elf32-m68hc12.c (elf_backend_can_gc_sections): False.
5195
df622259
AC
51962002-08-17 Andrew Cagney <ac131313@redhat.com>
5197
5198 * elf.c (bfd_elf_get_elf_syms): Change type of `esym' to
51020317 5199 `bfd_byte'.
df622259 5200
44c410de
SC
52012002-08-17 Stan Cox <scox@redhat.com>
5202
5203 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Use the
5204 IRIX 6 segment layout for NEWABI.
5205
4972a8e9
SC
52062002-08-16 Stephen Clarke <stephen.clarke@superh.com>
5207
1049f94e 5208 * elf32-sh.c (sh_elf_gc_mark_hook): For sh64, skip indirect
4972a8e9 5209 symbols when looking for section referred to by a relocation.
1049f94e 5210 * elf64-sh.c (sh_elf64_gc_mark_hook): Likewise.
51020317 5211
c5cd6d62
AM
52122002-08-15 Alan Modra <amodra@bigpond.net.au>
5213
5214 * elf32-i370.c: Move reloc enum to include/elf/i370.h.
5215
0741c7be
HPN
52162002-08-15 Hans-Peter Nilsson <hp@axis.com>
5217
5218 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Add
5219 missing check for whether the symbol is referenced by DSO before
5220 unexporting it as an unneeded dynamic symbol.
5221
e8d5d179
L
52222002-08-14 H.J. Lu <hjl@gnu.org>
5223
5224 * libbfd.h: Regenerate.
5225
e9229007
L
52262002-08-14 H.J. Lu <hjl@gnu.org>
5227
5228 * config.bfd: Always add 64bit vectors to 32bit Linux/mips.
5229
1fd03b5a
SC
52302002-08-14 Stephane Carrez <stcarrez@nerim.fr>
5231
5232 * elf32-m68hc11.c (m68hc11_relax_group): New to relax group of
5233 instructions.
5234 (m68hc11_direct_relax): New to define table of relaxable instructions.
5235 (find_relaxable_insn): New, find a relaxable insn.
5236 (compare_reloc): New to compare two relocs.
5237 (m68hc11_elf_relax_section): New, relax text sections.
5238 (m68hc11_elf_relax_delete_bytes): New, delete bytes and adjust branchs.
5239 (elf32_m68hc11_check_relocs): New function for GC support.
5240 (elf32_m68hc11_relocate_section): New function for GC support.
5241 (bfd_elf32_bfd_relax_section): Define to support linker relaxation.
5242 (elf_backend_check_relocs): Likewise.
5243 (elf_backend_relocate_section): Likewise.
5244
c828c771
L
52452002-08-13 H.J. Lu <hjl@gnu.org>
5246
5247 * elflink.h (NAME(bfd_elf,size_dynamic_sections): Don't count
5248 definitions in shared objects when checking symbol with
5249 undefined version.
5250
9b701e44
SC
52512002-08-13 Stephane Carrez <stcarrez@nerim.fr>
5252
5253 * elf32-m68hc11.c (elf32_m68hc11_gc_mark_hook): New for section GC.
5254 (elf32_m68hc11_gc_sweep_hook): Likewise.
5255 (elf_backend_gc_mark_hook): Define for GC section support.
5256 (elf_backend_gc_sweep_hook): Likewise.
5257 (elf_backend_can_gc_sections): Likewise.
5258
5259 * elf32-m68hc12.c: Likewise.
5260
96405e3c
SC
52612002-08-13 Stephane Carrez <stcarrez@nerim.fr>
5262
5263 * elf32-m68hc11.c (_bfd_m68hc11_elf_print_private_bfd_data): New.
5264 (_bfd_m68hc11_elf_merge_private_bfd_data): New function.
5265 (_bfd_m68hc11_elf_set_private_flags): New function.
5266 Use them to set/check/print ELF flags specific to 68HC11.
5267
5268 * elf32-m68hc12.c (_bfd_m68hc12_elf_print_private_bfd_data): New.
5269 (_bfd_m68hc12_elf_merge_private_bfd_data): New function.
5270 (_bfd_m68hc12_elf_set_private_flags): New function.
5271 Use them to set/check/print ELF flags specific to 68HC12.
5272
dae78fb0
SC
52732002-08-13 Stephane Carrez <stcarrez@nerim.fr>
5274
5275 * elf32-m68hc11.c (elf_m68hc11_howto_table): Add the new relocs;
5276 fix masks for PC-rel relocs.
5277 (m68hc11_elf_ignore_reloc): New function.
5278
5279 * elf32-m68hc12.c (m68hc12_elf_special_reloc): New to handle specific
5280 68HC12 banked addressing relocs.
5281 (m68hc12_phys_addr): New to compute physical address of banked memory.
5282 (m68hc12_phys_page): Likewise for page.
5283 (m68hc12_addr_is_banked): New to see if address is in banked area.
5284 (elf_m68hc12_howto_table): Add new relocs and rename to xx12.
5285
3dbfec86
SC
52862002-08-13 Stephane Carrez <stcarrez@nerim.fr>
5287
5288 * reloc.c (BFD_RELOC_M68HC11_RL_JUMP, BFD_RELOC_M68HC11_RL_GROUP,
5289 BFD_RELOC_M68HC11_LO16, BFD_RELOC_M68HC11_PAGE,
5290 BFD_RELOC_M68HC11_24): New relocs for 68HC11/68HC12.
5291 * bfd-in2.h: Regenerate.
5292
871da94f
L
52932002-08-12 H.J. Lu <hjl@gnu.org>
5294
5295 * elflink.h (elf_add_default_symbol): Preserve section across
5296 elf_merge_symbol.
5297
59bc061d
NC
52982002-08-09 Graeme Peterson <gp@qnx.com>
5299
51020317 5300 * Makefile.am: Add entries for elf32-ppcqnx.c, and add
59bc061d
NC
5301 elf32-qnx.h dependency to elfarmqnx-nabi.c and elf32-i386qnx.c.
5302 * Makefile.in: Regenerate.
5303 * config.bfd: Add support for powerpc{le}-*-nto targets.
5304 * configure.in: Add support for bfd_elf32_powerpc{le}qnx_vec.
5305 * configure: Regenerate.
5306 * elf32-i386qnx.c: Moved backend functions into a QNX specific
5307 common file "elf32-qnx.h", and now include that file.
5308 * elf32-qnx.h: New file: QNX specific common elf backend.
5309 * elf32-ppc.c: Do not include elf32-target.h if
5310 ELF32_PPC_C_INCLUDED is defined.
5311 * elf32-ppcqnx.c: New file: Support for QNX.
5312 * elfarmqnx-nabi.c: Include elf32-qnx.h for qnx elf backend.
5313 * targets.c: Add bfd_elf32_powerpc{le}qnx_vec.
5314
2b692c59
NC
53152002-08-09 Nick Clifton <nickc@redhat.com>
5316
5317 * po/sv.po: Updated Swedish translation.
5318
d0c7ff07
TS
53192002-08-09 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5320
5321 * elfxx-mips.c (mips_elf_global_got_index): Avoid segfault if
5322 g->global_gotsym is NULL.
5323
d8bbe778
L
53242002-08-08 H.J. Lu <hjl@gnu.org>
5325
c5cd6d62 5326 * elflink.h (elf_add_default_symbol): Don't warn if a definition
d8bbe778
L
5327 overrides an indirect versioned symbol.
5328
c366c25e
JJ
53292002-08-08 Jakub Jelinek <jakub@redhat.com>
5330
5331 * elf32-i386.c (elf_i386_relocate_section): Fill in proper addend
5332 for R_386_TLS_TPOFF32 relocs against symndx 0.
5333
31941635
L
53342002-08-07 H.J. Lu <hjl@gnu.org>
5335
5336 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Check symbol
5337 with undefined version if needed.
5338 (elf_link_assign_sym_version): Match a default symbol with a
5339 version without definition. No need to hide the default
5340 definition separately.
5341
0f3bd64f
AM
53422002-08-08 Alan Modra <amodra@bigpond.net.au>
5343
7330fb86
AM
5344 * elflink.h (elf_link_output_extsym): Don't output symbols from
5345 SEC_EXCLUDE sections.
5346
0f3bd64f
AM
5347 * aoutx.h (aout_link_write_symbols): Correct handling of warning syms.
5348
a4aa0fb7
AM
53492002-08-07 Alan Modra <amodra@bigpond.net.au>
5350
5351 * elf64-ppc.c (edit_opd): Arrange to drop symbols for discarded .opd
5352 entries.
5353
34ea4a36
TS
53542002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5355
5356 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Cast signedness
5357 mismatch.
5358
141ff970
TS
53592002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5360
5361 * elfxx-mips.c (ABI_64_P): Remove superfluous check.
5362
28458e7e
TS
53632002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5364
5365 * elf32-mips.c (mips_reloc_map): Fix typo.
5366
0121a3da
AM
53672002-08-06 Alan Modra <amodra@bigpond.net.au>
5368
5369 * xcofflink.c (xcoff_write_global_symbol): Set n_scnum for abs_section.
5370
d006db6c
AM
53712002-08-06 Alan Modra <amodra@bigpond.net.au>
5372
5373 * elf64-ppc.c (ppc64_elf_howto_raw): Zero all src_mask entries.
5374
8ea80f08
AM
53752002-08-06 Alan Modra <amodra@bigpond.net.au>
5376
2a52da53
AM
5377 * libxcoff.h: Use PARAMS on function declarations.
5378 * coff-rs6000.c (xcoff_generate_rtinit): Simplify size calc.
5379 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
5380
8ea80f08
AM
5381 * coff-rs6000.c: (xcoff_rtype2howto): Don't place reloc address in
5382 addend.
5383 * coff64-rs6000.c: (xcoff64_rtype2howto): Likewise.
5384
cf9ab45b
AM
53852002-08-06 Alan Modra <amodra@bigpond.net.au>
5386
5387 * coff-rs6000.c: Formatting fixes.
5388 (xcoff_calculate_relocation): Use PARAMS in declaration.
5389 (xcoff_complain_overflow): Likewise.
5390 (xcoff_ppc_relocate_section): Use old-style function pointer call.
5391 (bfd_xcoff_backend_data): Remove useless comments.
5392 (rs6000coff_vec): Likewise.
5393 (bfd_pmac_xcoff_backend_data): Likewise.
5394 (pmac_xcoff_vec): Likewise.
8ea80f08 5395
cf9ab45b
AM
5396 * coff64-rs6000.c: Formatting fixes.
5397 (xcoff64_calculate_relocation): Use PARAMS in declaration.
5398 (xcoff64_ppc_relocate_section): Use old-style function pointer call.
5399 (bfd_xcoff_backend_data): Remove useless comments.
5400 (rs6000coff64_vec): Likewise.
5401 (bfd_xcoff_aix5_backend_data): Likewise.
5402 (aix5coff64_vec): Likewise.
5403
48bfecdd
AM
54042002-08-06 Alan Modra <amodra@bigpond.net.au>
5405
a78eab4e
AM
5406 * coff-rs6000.c (xcoff_howto_table): Revert some of last change to
5407 mask entries. Use complain_overflow_dont for R_REF.
5408 (xcoff_reloc_type_ba): Revert last change.
5409 (xcoff_reloc_type_br): Likewise.
5410 (xcoff_reloc_type_crel): Likewise.
5411 (xcoff_ppc_relocate_section): Likewise.
5412 * coff64-rs6000.c (xcoff64_reloc_type_br): Likewise.
5413 (xcoff64_ppc_relocate_section): Likewise.
5414 (xcoff64_howto_table): Revert some of last change to mask entries.
5415 Use complain_overflow_dont for R_REF.
5416
48bfecdd
AM
5417 * coff-rs6000.c (xcoff_howto_table): Fix src_mask entries. Make all
5418 relocs with bitsize == 16 have size = 1.
5419 (xcoff_reloc_type_ba): Correct src_mask and dst_mask adjustment.
5420 (xcoff_reloc_type_br): Likewise.
5421 (xcoff_reloc_type_crel): Likewise.
5422 (xcoff_ppc_relocate_section): Set up src_mask and dst_mask correctly.
5423 * coff64-rs6000.c (xcoff64_reloc_type_br): Correct src_mask and
5424 dst_mask adjustment.
5425 (xcoff64_ppc_relocate_section): Set up src_mask and dst_mask correctly.
5426 (xcoff64_howto_table): Fix src_mask entries. Make all relocs with
5427 bitsize == 16 have size = 1.
5428
fd13ed0c
DC
54292002-08-01 Denis Chertykov <denisc@overta.ru>
5430
5431 * elf32-ip2k.c: Processor manufacturer changed to Ubicom.
5432 (struct misc): New field isymbuf. All free_* fields removed.
5433 (symbol_value): Pass in internal syms. No need to swap syms in.
5434 (ip2k_elf_relax_section): Use bfd_elf_get_elf_syms. Properly free
5435 possibly cached info.
5436 (tidyup_after_error): Removed.
5437 (ip2k_elf_relax_section_pass1): Don't use removed fields of struct
5438 misc. Use new field.
5439 (adjust_all_relocations): Use internal syms. No need to swap syms
5440 in and out.
5441 (add_page_insn): Don't use removed fields of struct misc.
5442
24a1ba0f
NC
54432002-08-01 Nick Clifton <nickc@redhat.com>
5444
5445 * elf32-arm.h: Revert previous delta.
5446
a6903459
NC
54472002-08-01 Nick Clifton <nickc@redhat.com>
5448
5449 * configure.in (AM_INIT_AUTOMAKE): Bump version number.
5450 * configure: Regenerate.
5451
39a2a3eb
L
54522002-07-31 H.J. Lu <hjl@gnu.org>
5453
5454 * config.bfd: Add x86-64 vector to Linux/i386 if 64bit BFD is
5455 selected.
5456
a0dfa6a8
L
54572002-07-31 H.J. Lu <hjl@gnu.org>
5458
5459 * config.bfd: Add n32 vectors to 32bit Linux/mips if 64bit BFD
5460 is selected.
5461
cd67d266
JJ
54622002-07-31 Jakub Jelinek <jakub@redhat.com>
5463
5464 * elf32-i386.c (elf_i386_copy_indirect_symbol): Swap tls_type
5465 if _bfd_elf_link_hash_copy_indirect will swap got.refcount.
5466
4eb6b71c
NC
54672002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
5468
5469 * cpu-ns32k.c (_bfd_ns32k_put_immdeiate, _bfd_ns32k_get_immediate):
5470 There is no 8 byte relocation type for this architecture.
5471 (do_ns32k_reloc): Use bfd_vma instead of native types.
5472 (bfd_ns32k_put_immediate, _bfd_ns32k_relocate_contents) put_data
5473 returns void.
5474 (_bfd_ns32k_put_displacement): Don't check for overflow. We can
5475 rely on generic code to do that.
5476 * aout-ns32k.c (howto_table): Add appropriate overflow detection
5477 to all table entries.
5478 (_bfd_ns32k_relocate_contents): put_data returns void.
5479 * ns32k.h: (_bfd_ns32k_put_displacement, _bfd_ns32k_put_immediate)
5480 (_bfd_do_ns32k_reloc_contents): Fix prototypes. put data functions
5481 return void.
5482
f7c33884
NC
54832002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
5484
5485 * aoutx.h (aout_link_check_ar_symbols): Whether to include an
5486 archive object is target dependant.
5487
8f64befb
NC
54882002-07-31 Adam Nemet <anemet@lnxw.com>
5489
5490 * elf32-arm.h (ARM_PLT_ENTRY_SIZE): Rename PLT_ENTRY_SIZE.
5491 (THUMB_PLT_ENTRY_SIZE): New macro.
5492 (PLT_ENTRY_SIZE): Return the appropriate *_PLT_ENTRY_SIZE.
5493 (elf32_arm_plt0_entry): Rename PLT_ENTRY_SIZE to
5494 ARM_PLT_ENTRY_SIZE.
5495 (elf32_arm_plt_entry): Likewise.
5496 (elf_backend_plt_header_size): Likewise.
5497 (elf32_thumb_plt0_entry): New global.
5498 (elf32_arm_finish_dynamic_sections): Use it. Put Thumb entries
5499 into .plt.thumb.
5500 (elf32_thumb_plt_entry): New global.
5501 (elf32_arm_finish_dynamic_symbol): Use it. Use .thumb.plt for
5502 Thumb entries. Set the bottom bit of the corresponding GOT entry
5503 for a Thumb PLT entry.
5504 (struct elf32_arm_plt_entry_info): New structure.
5505 (struct elf32_arm_link_hash_entry, plt_info): New member of this
5506 type.
5507 (elf32_arm_link_hash_newfunc): Initialize new member.
5508 (elf32_arm_final_link_relocate, R_ARM_THM_PC22 case): Handle
5509 relocations against the PLT.
5510 (elf32_arm_check_relocs, case R_ARM_PLT32 case): Set
5511 first_rel_type if this is the first time we encounter the symbol.
5512 (elf32_arm_check_relocs, case R_ARM_THM_PC22 case): New case.
5513 Determine if relocation needs a PLT entry. Set first_rel_type if
5514 this is the first time we encounter the symbol
5515 (elf32_arm_adjust_dynamic_symbol): Create PLT entries for Thumb
5516 functions as well.
5517 (elf32_arm_size_dynamic_sections): Handle .plt.thumb like .plt.
5518 (elf32_arm_create_dynamic_sections): New function. Create the
5519 .plt.thumb section.
5520 (elf_backend_create_dynamic_sections): Call it.
5521
47badb7b
NC
55222002-07-31 Nick Clifton <nickc@redhat.com>
5523
5524 * bfd.c (bfd_alt_mach_code): Rename parameter 'index' to
5525 'alternative' in order to avoid shadowing global symbol of the
5526 same name.
5527 * bfd-in2.h: Regenerate.
5528 * libbfd.h: Regenerate.
5529 * libcoff.h: Regenerate.
5530
8a397dad
TS
55312002-07-31 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5532
5533 * Makefile.am: Add n32 ABI support.
5534 * Makefile.in: Regenerate.
5535 * config.bfd: Add n32 vectors to mips64*-*-linux* targets. Treat 64
5536 bit vectors for mips*-*-linux targets as optional.
5537 * configure.in: Add n32 ABI vectors.
5538 * configure: Regenerate.
5539 * elf32-mips.c (mips_elf32_object_p): Reject n32 ABI files.
5540 * elfn32-mips.c: New file, n32 ABI support.
5541 * targets.c: Add n32 ABI vectors.
5542
7e392df6 55432002-07-30 Graeme Peterson <gp@qnx.com>
83e1617e 5544
7e392df6
NC
5545 * elfarmqnx-nabi.c: New file: Support for QNX.
5546 * config.bfd: Add support for arm-*-nto target.
5547 * configure.in: Add support for bfd_elf32_{big|little}armqnx_vec.
5548 * configure: Regenerate.
5549 * Makefile.am: Add entries for elfarmqnx-nabi.c.
5550 * Makefile.in: Regenerate.
5551 * elf32-arm.h (ELF_MAXPAGESIZE): Do not define if already defined.
5552 Do not define global function if ELFARM_NABI_C_INCLUDED is defined.
5553 * elfarm-nabi.c: Do not include elf32-arm.h if
5554 ELFARM_NABI_C_INCLUDED is defined.
5555 * targets.c: Add bfd_elf32_{big|little}armqnx_vec.
7330fb86 5556
7e392df6 55572002-07-30 Nick Clifton <nickc@redhat.com>
7330fb86 5558
83e1617e
NC
5559 * po/sv.po: Updated Swedish translation.
5560
704afa60
JJ
55612002-07-30 Jakub Jelinek <jakub@redhat.com>
5562
5563 * elf.c (elf_fake_sections): Fix up .tbss sh_size and sh_type.
5564
487e54f2
AM
55652002-07-30 Alan Modra <amodra@bigpond.net.au>
5566
5567 * aoutx.h (some_aout_object_p): Clean up tdata properly on error.
5568 * archive.c (bfd_generic_archive_p): Likewise.
5569 * coff-rs6000.c (_bfd_xcoff_archive_p): Likewise.
5570 (_bfd_xcoff_archive_p): Use bfd_scan_vma in place of strtol.
5571 * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
5572 (xcoff64_archive_p): Likewise.
5573 (xcoff64_openr_next_archived_file): Likewise.
5574 (xcoff64_archive_p): Clean up tdata properly on error.
5575 * coffgen.c (coff_real_object_p): Likewise.
5576 (coff_object_p): Release filehdr and opthdr.
5577 * ecoff.c (_bfd_ecoff_archive_p): Clean up tdata properly on error.
5578 * ieee.c (ieee_archive_p): Likewise.
5579 * ihex.c (ihex_object_p): Likewise.
5580 (ihex_mkobject): Always allocate tdata.
5581 * peicode.h (pe_ILF_object_p): Release bfd_alloc'd buffer on error.
5582 * srec.c (srec_mkobject): Always allocate tdata.
5583 (srec_object_p): Clean up tdata properly on error.
5584 (symbolsrec_object_p): Likewise.
5585 * versados.c (versados_object_p): Likewise.
5586 * vms-misc.c (_bfd_vms_get_record): Use bfd_malloc instead of malloc,
5587 and bfd_realloc instead of realloc.
5588 (add_new_contents): Use bfd_alloc instead of bfd_malloc for sections.
5589 * vms.c (vms_initialize): Always allocate tdata. Use bfd_alloc in
5590 place of bfd_malloc, simplifying error freeing. Free hash table too.
5591 (vms_object_p): Clean up tdata on error.
5592 (vms_mkobject): Don't complain on stderr if vms_initialize fails.
5593 (vms_close_and_cleanup): Adjust for bfd_alloc use.
5594
9d46020e
AM
55952002-07-30 Alan Modra <amodra@bigpond.net.au>
5596
5597 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set e_flags.
5598
fb39dac1
RS
55992002-07-26 Chris Demetriou <cgd@broadcom.com>
5600
5601 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Merge ASE
5602 flags into resulting BFD.
5603
7a624474
AM
56042002-07-26 Alan Modra <amodra@bigpond.net.au>
5605
5606 From John Reiser <jreiser@BitWagon.com>
5607 * elf32-i386.c (elf_i386_link_hash_table_create): Clear
5608 tls_ldm_got.refcount.
5609
a4382ec6
TS
56102002-07-25 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5611
5612 * elf64-mips.c: Update TODO comment.
5613 (mips_elf64_higher_reloc,mips_elf64_highest_reloc,
5614 mips_elf64_gprel16_reloca): Remove prototypes.
5615 (mips16_jump_reloc,mips16_gprel_reloc): Add functions.
5616 (UNUSED_RELOC): Replace by EMPTY_RELOC.
5617 (mips_elf64_howto_table_rel): Use special R_MIPS_HI16 handling. Remove
5618 wrong comments. Remove disfunctional support of R_MIPS_HIGHER and
5619 R_MIPS_HIGHEST.
5620 (mips_elf64_howto_table_rela): Fix handling of R_MIPS_GPREL16 and
5621 R_MIPS_GOT16. Remove wrong comments.
5622 (elf_mips16_jump_howto,elf_mips16_gprel_howto,
5623 elf_mips_gnu_vtinherit_howto,elf_mips_gnu_vtentry_howto): New, code
5624 from elf32-mips.c.
5625 (mips_elf64_hi16_reloc): Fix formatting.
5626 (mips_elf64_higher_reloc,mips_elf64_highest_reloc): Remove.
5627 (mips_elf64_got16_reloc): Fix formatting. Remove superfluous code.
5628 Better comment. Fall back to R_MIPS_GOT_DISP instead of abort().
5629 (mips_elf64_gprel16_reloc): Make static. Add check for
5630 partial_inplace.
5631 (mips_elf64_gprel16_reloca): Remove.
5632 (mips_elf64_literal_reloc): New function.
5633 (mips_elf64_gprel32_reloc): Fix formatting.
5634 (mips_elf64_shift6_reloc): Fix comment. Make static.
5635 (mips16_jump_reloc,mips16_gprel_reloc): New functions, code from
5636 elf32-mips.c.
5637 (elf_reloc_map,mips_reloc_map): New mapping table, similiar as in
5638 elf32-mips.c
5639 (bfd_elf64_bfd_reloc_type_lookup): Use the mapping table. Enable GNU
5640 specific relocations.
5641 (mips_elf64_rtype_to_howto): Enable GNU specific relocations.
5642 (mips_elf64_object_p): Invert logic to check for SGI-ish ABI.
5643 (ELF_MAXPAGESIZE): Add comment.
5644
219576a4
NC
56452002-07-25 Nick Clifton <nickc@redhat.com>
5646
5647 * po/sv.po: Updated Swedish translation.
5648 * po/es.po: Updated Spanish translation.
5649 * po/fr.po: Updated French translation.
5650
8c58d23b
AM
56512002-07-25 Alan Modra <amodra@bigpond.net.au>
5652
5653 * elf-bfd.h (_bfd_elf32_link_record_local_dynamic_symbol): Define
5654 as elf_link_record_local_dynamic_symbol.
5655 (_bfd_elf64_link_record_local_dynamic_symbol): Likewise.
5656 (elf_link_record_local_dynamic_symbol): Declare. Now returns int.
5657 * elflink.h (elf_link_record_local_dynamic_symbol): Move to..
5658 * elflink.c: .. here. Use bfd_elf_get_elf_syms. Check whether an
5659 attempt is made to record a symbol in a discarded section, and
5660 return `2' in that case.
5661
ff3063f5
NC
56622002-07-24 Nick Clifton <nickc@redhat.com>
5663
5664 * po/sv.po: Updated Swedish translation.
5665 * po/es.po: Updated Spanish translation.
5666
f0fe0e16
AM
56672002-07-23 Alan Modra <amodra@bigpond.net.au>
5668
c1fb5f8a
AM
5669 * po/SRC-POTFILES.in: Regenerate.
5670
f0fe0e16
AM
5671 * elf-hppa.h (elf_hppa_relocate_section): If relocatable, return
5672 immediately. Remove code handling relocatable linking.
5673 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
5674 * elf32-cris.c (cris_elf_relocate_section): Likewise.
5675 * elf32-fr30.c (elf32_frv_relocate_section): Likewise.
de2d743e 5676 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
f0fe0e16
AM
5677 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
5678 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
5679 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
5680 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
5681 * elf32-v850.c (v850_elf_relocate_section): Likewise.
5682 * elf32-vax.c (elf_vax_relocate_section): Likewise.
5683 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
5684 * elf32-avr.c (elf_backend_rela_normal): Define.
5685 * elf32-cris.c: Likewise.
5686 * elf32-fr30.c: Likewise.
de2d743e 5687 * elf32-frv.c: Likewise.
f0fe0e16
AM
5688 * elf32-h8300.c: Likewise.
5689 * elf32-hppa.c: Likewise.
5690 * elf32-ip2k.c: Likewise.
5691 * elf32-sparc.c: Likewise.
5692 * elf32-v850.c: Likewise.
5693 * elf32-vax.c: Likewise.
5694 * elf64-hppa.c: Likewise.
5695 * elf64-sparc.c: Likewise.
5696 * elf32-fr30.c (elf32_frv_relocate_section): Edit comment.
de2d743e 5697 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
f0fe0e16
AM
5698 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
5699 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
5700 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
5701 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
5702 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
5703 * elf-m10200.c (USE_RELA): Don't define.
5704 * elf-m10300.c: Likewise.
de2d743e 5705 * elfarm-oabi.c: Likewise.
f0fe0e16
AM
5706 * elf32-i370.c: Likewise.
5707 * elf32-ip2k.c: Likewise.
5708 * elf32-m68k.c: Likewise.
5709 * elf32-mcore.c: Likewise.
5710 * elf32-ppc.c: Likewise.
5711 * elf32-s390.c: Likewise.
5712 * elf32-vax.c: Likewise.
5713 * elf64-ppc.c: Likewise.
5714 * elf64-s390.c: Likewise.
5715 * elf64-x86-64.c: Likewise.
5716 * elfxx-ia64.c: Likewise.
5717 * elf32-avr.c (USE_REL): Don't undef.
5718 * elf32-ip2k.c: Likewise.
5719
5e8d7549
NC
57202002-07-23 Nick Clifton <nickc@redhat.com>
5721
5722 * elf-bfd.h (struct elf_backend_data): Add new bitfield
5723 'want_p_paddr_set_to_zero'.
5724 * elfxx-target.h: Set default value for want_p_paddr_set_to_zero
5725 to false;
5726 * elfxx-ia64.c: Set want_p_paddr_set_zero for HPUX target.
5727 * elf.c (copy_private_bfd_data): Test want_p_paddr_set_zero.
5728
9e12c7db
NC
57292002-07-23 Gabor Keresztfalvi <keresztg@mail.com>
5730
5731 * nlmcode.h (nlm_swap_auxiliary_headers_out): Swapped the order of
5732 the MeSsAgEs and CoPyRiGhT tags to make >=NW4.x NLM loaders to
5733 show the Copyright string.
5734 Minor formatting tidy ups.
5735
0461a601
NC
57362002-07-23 Nick Clifton <nickc@redhat.com>
5737
ff3063f5
NC
5738 * po/fr.po: Updated French translation.
5739 * po/sv.po: Updated Swedish translation.
0461a601 5740
fad2542d
AM
57412002-07-23 Alan Modra <amodra@bigpond.net.au>
5742
5743 * elflink.h (elf_link_input_bfd): Don't change internal symbols
5744 when outputting relocs.
5745
c0647bfc
JT
57462002-07-20 Jason Thorpe <thorpej@wasabisystems.com>
5747
5748 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only insert
5749 DT_PLTGOT into the dynamic section if there is a PLT.
5750
d01414a5
TS
57512002-07-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5752
5753 * elfxx-mips.c (_bfd_mips_elf_discard_info): New function, code from
5754 elf32-mips.c.
5755 (_bfd_mips_elf_write_section): Likewise.
5756 * elfxx-mips.h (_bfd_mips_elf_discard_info): New prototype.
5757 (_bfd_mips_elf_write_section): Likewise.
5758 * elf32-mips.c (elf32_mips_discard_info): Move to elfxx-mips.c.
5759 (elf32_mips_write_section): Likewise.
5760 * elf64-mips.c (_bfd_mips_elf_ignore_discarded_relocs): Use it.
5761 (_bfd_mips_elf_write_section): Likewise.
5762
40c97fc6
AM
57632002-07-19 Alan Modra <amodra@bigpond.net.au>
5764
5765 * elfxx-ia64.c: (elfNN_ia64_modify_segment_map): Properly scan
5766 PT_IA_64_UNWIND segments for a given section.
5767
58378160
L
57682002-07-17 H.J. Lu <hjl@gnu.org>
5769
5770 * Makefile.am: Fix a typo.
5771 * Makefile.in: Regenerate.
5772
cf88bb9f
NC
57732002-07-15 Denis Chertykov <denisc@overta.ru>
5774 Frank Ch. Eigler <fche@redhat.com>
5775 Ben Elliston <bje@redhat.com>
5776 Alan Lehotsky <alehotsky@cygnus.com>
5777 John Healy <jhealy@redhat.com>
5778 Graham Stott <grahams@redhat.com>
5779 Jeff Johnston <jjohnstn@redhat.com>
5780
5781 * Makefile.am: Add support for ip2k.
5782 * Makefile.in: Regenerate.
5783 * doc/Makefile.in: Regenerate.
5784 * archures.c: Add support for ip2k.
5785 * config.bfd: Add support for ip2k.
5786 * configure.in: Add support for ip2k.
5787 * configure: Regenerate.
5788 * reloc.c: Add support for ip2k.
5789 * targets.c: Add support for ip2k.
5790 * bfd-in2.h: Regenerate.
5791 * libbfd.h: Regenerate.
5792 * cpu-ip2k.c: New file.
5793 * elf32-ip2k.c: New file.
5794
0dafd5f6
RE
57952002-07-17 Ian Rickards <irickard@arm.com>
5796
40c97fc6 5797 * dwarf2.c (concat_filename): If we can't establish the directory
0dafd5f6
RE
5798 just return the filename.
5799
36b08f12
AM
58002002-07-16 Moritz Jodeit <moritz@jodeit.org>
5801
5802 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Correct order of memset args.
5803
58821868
AM
58042002-07-16 Alan Modra <amodra@bigpond.net.au>
5805
5806 * elflink.h: Formatting fixes, tidy prototypes.
5807 (elf_link_assign_sym_version): Move common code out of loop.
5808
c89583f8
AM
58092002-07-16 Alan Modra <amodra@bigpond.net.au>
5810
5811 * elflink.h (elf_link_input_bfd): Don't call reloc_emitter when
5812 reloc section size is zero. Correct reloc output location.
5813
ba94744e
AM
58142002-07-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
5815
5816 * elf-hppa.h (elf_hppa_reloc_final_type): Use R_PARISC_PCREL16F as
5817 the final type for the e_fsel selector when generating PA2.0W code.
5818 (elf_hppa_relocate_insn): Provide support for PA2.0W 16-bit format 1
5819 relocations.
5820
96a94295
L
58212002-07-14 H.J. Lu <hjl@gnu.org>
5822
5823 * elflink.h (elf_link_assign_sym_version): Hide the default
5824 definition if there is a hidden versioned definition.
5825
6849c52f
HPN
58262002-07-12 Hans-Peter Nilsson <hp@axis.com>
5827
5828 * elf32-cris.c (cris_elf_relocate_section): Drop nonsensical
5829 dynamic reference test in assertion when initializing GOT with
5830 static contents. Just assert that there are either no dynamic
5831 sections, the symbol is defined in the regular objects or that the
5832 symbol is undef weak. Tweak comment.
5833 (elf_cris_finish_dynamic_symbol): Emit .got reloc for a program
5834 only if the symbol isn't defined in the program and isn't undef
5835 weak.
5836 (elf_cris_adjust_dynamic_symbol): Simplify condition for getting
5837 rid of PLT entry: only do it if the symbol isn't defined in a DSO.
5838 When doing so, clear ELF_LINK_HASH_NEEDS_PLT. Tweak comments.
5839 (elf_cris_discard_excess_program_dynamics): Don't consider
5840 ELF_LINK_HASH_REF_DYNAMIC when omitting .got runtime relocs.
5841
239e1f3a
AM
58422002-07-11 Alan Modra <amodra@bigpond.net.au>
5843
5844 * elf32-i386.c (elf_i386_relocate_section): Don't complain about
5845 unresolved debugging relocs in dynamic applications.
5846 * elf32-s390.c (elf_s390_relocate_section): Likewise.
5847 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
5848 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
5849 * elf64-s390.c (elf_s390_relocate_section): Likewise.
5850 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
5851 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
5852
2f6d9989
AM
58532002-07-10 Alan Modra <amodra@bigpond.net.au>
5854
f5e87a1d
AM
5855 * elf64-ppc.c (ONES): Define.
5856 (ppc64_elf_howto_table): Use ONES here to avoid warnings. Fill in
5857 missing src_mask fields. Tweak R_PPC64_NONE, R_PPC64_COPY. Fill
5858 in missing dst_mask fields on R_PPC64_PLT32, R_PPC64_PLTREL32.
5859
2f6d9989
AM
5860 * elf64-ppc.c (ppc64_elf_get_symbol_info): Delete.
5861 (ppc64_elf_set_private_flags): Delete.
5862 (ppc64_elf_section_from_shdr): Delete.
5863 (ppc64_elf_merge_private_bfd_data): Remove flag checking/merging code.
5864 (ppc64_elf_fake_sections): Delete.
5865 (bfd_elf64_bfd_set_private_flags): Don't define.
5866 (bfd_elf64_get_symbol_info): Likewise.
5867 (elf_backend_section_from_shdr): Likewise.
5868 (elf_backend_fake_sections): Likewise.
5869
0594c12d
AM
58702002-07-10 Marco Walther <Marco.Walther@sun.com>
5871
5872 * elf.c: (assign_section_numbers) Set sh_entsize for .stab only
5873 when not already set.
5874 * elf64-sparc.c: (sparc64_elf_fake_sections): New function.
5875 (elf_backend_fake_sections): Define.
5876
699cb9b8
AM
58772002-07-10 Alan Modra <amodra@bigpond.net.au>
5878
5879 * merge.c (_bfd_merge_section): Remove redundant output_section check.
5880 Formatting.
5881 (_bfd_merge_sections): Don't set SEC_EXCLUDE on unused sections.
5882
0a4787a0
HPN
58832002-07-09 Hans-Peter Nilsson <hp@axis.com>
5884
5885 * elf32-cris.c (cris_elf_relocate_section): Move sanity-check for
5886 NULL sym_hashes to just before use.
5887 <case R_CRIS_32_GOTREL>: In test for local symbol, accept also
5888 symbol with non-default visibility.
5889 <case R_CRIS_32_GOTREL, case R_CRIS_32_PLT_GOTREL>: Ditto.
5890 <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
5891 Ditto.
5892 (cris_elf_gc_sweep_hook): Only decrease h->plt.refcount for
5893 symbol with non-default visibility.
5894 (cris_elf_check_relocs): At tests for local symbol before
5895 increasing h->plt.refcount, also check for non-default
5896 visibility. Ditto when checking for local symbol to eliminate
5897 pc-relative runtime relocs.
5898
aecc8f8a
AM
58992002-07-08 Alan Modra <amodra@bigpond.net.au>
5900
5901 * elf.c: Formatting.
5902 (IS_SOLARIS_PT_INTERP): Add p_paddr and p_memsz checks.
5903 (INCLUDE_SECTION_IN_SEGMENT): Remove IS_SOLARIS_PT_INTERP.
5904 (copy_private_bfd_data): Set p_vaddr on broken Solaris PT_INTERP
5905 segments.
5906
e9168c1e
MM
59072002-07-07 Mark Mitchell <mark@codesourcery.com>
5908 Alan Modra <amodra@bigpond.net.au>
5909
5910 * cofflink.c (_bfd_coff_final_link): On PE COFF systems, take into
5911 account the impact of relocation count overflow when computing
5912 section offsets.
5913 * coffcode.h (coff_write_relocs): Use obj_pe when deciding whether
5914 or not to apply the PE COFF reloc overflow handling. Fix a
5915 fencepost error in deciding whether or not to use that technique.
5916
6cdc0ccc
AM
59172002-07-07 Alan Modra <amodra@bigpond.net.au>
5918
5919 * elf-bfd.h (struct elf_reloc_cookie): Remove locsym_shndx,
5920 change type of locsyms.
5921 (bfd_elf_get_elf_syms): Declare.
5922 * elf.c (bfd_elf_get_elf_syms): New function.
5923 (group_signature): Use bfd_elf_get_elf_syms.
5924 (bfd_section_from_r_symndx): Likewise.
5925 * elfcode.h (elf_slurp_symbol_table): Likewise.
5926 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
5927 (elf_link_add_object_symbols): Likewise. Reorganise to increase
5928 locality of various data structures. Properly free internal relocs.
5929 (elf_bfd_final_link): Properly free internal relocs.
5930 (elf_link_check_versioned_symbol): Use bfd_elf_get_elf_syms.
5931 (elf_link_input_bfd): Likewise.
5932 (elf_gc_mark): Likewise. Properly free internal relocs.
5933 (elf_gc_sweep): Properly free internal relocs.
5934 (elf_reloc_symbol_deleted_p): No need to swap syms in.
5935 (elf_bfd_discard_info): Use bfd_elf_get_elf_syms. Properly free
5936 internal relocs.
5937 * elf-m10200.c (mn10200_elf_relax_section): Use bfd_elf_get_elf_syms.
5938 Properly free possibly cached info.
5939 (mn10200_elf_relax_delete_bytes): Remove symbol swapping code.
5940 (mn10200_elf_symbol_address_p): Pass in internal syms. Remove
5941 symbol swapping code.
5942 (mn10200_elf_get_relocated_section_contents): Use bfd_elf_get_elf_syms.
5943 Properly free possibly cached info.
5944 * elf-m10300.c (mn10300_elf_relax_section): As above for elf-m10200.c.
5945 (mn10300_elf_relax_delete_bytes): Likewise.
5946 (mn10300_elf_symbol_address_p): Likewise.
5947 (mn10300_elf_get_relocated_section_contents): Likewise.
5948 * elf32-h8300.c (elf32_h8_relax_section): As above for elf-m10200.c.
5949 (elf32_h8_relax_delete_bytes): Likewise.
5950 (elf32_h8_symbol_address_p): Likewise.
5951 (elf32_h8_get_relocated_section_contents): Likewise.
5952 * elf32-m32r.c (m32r_elf_relax_section): As above for elf-m10200.c.
5953 (m32r_elf_relax_delete_bytes): Likewise.
5954 (m32r_elf_get_relocated_section_contents): Likewise.
5955 * elf32-sh.c (sh_elf_reloc_loop): Free section contents using
5956 elf_section_data to determine whether cached.
5957 (sh_elf_relax_section): As above for elf-m10200.c.
5958 (sh_elf_relax_delete_bytes): Likewise.
5959 (sh_elf_get_relocated_section_contents): Likewise.
5960 * elf32-xstormy16.c (xstormy16_elf_relax_section): As above.
5961 * elf64-alpha.c (elf64_alpha_relax_section): As above. Also delay
5962 reading of local syms.
5963 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
5964 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): As above.
5965 * elfxx-ia64.c (elfNN_ia64_relax_section): As above.
5966 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Properly free internal
5967 relocs.
5968 * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Properly
5969 free internal relocs and section contents. Don't read symbols.
5970 * elf32-hppa.c (get_local_syms): Use bfd_elf_get_elf_syms.
5971 (elf32_hppa_size_stubs): Don't free local syms.
5972 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Delay
5973 reading of local syms. Use bfd_elf_get_elf_syms. Properly free
5974 possibly cached info.
5975 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
5976 * elf64-hppa.c (elf64_hppa_check_relocs): Use bfd_elf_get_elf_syms.
5977 * elf64-ppc.c (struct ppc_link_hash_table): Delete bfd_count and
5978 all_local_syms.
5979 (get_local_syms): Delete function.
5980 (edit_opd): Use bfd_elf_get_elf_syms. Free on error exit. Cache
5981 on exit.
5982 (ppc64_elf_size_stubs): Use bfd_elf_get_elf_syms. Free/cache on exit.
5983
b3212001
JW
59842002-07-05 Jim Wilson <wilson@redhat.com>
5985
5986 * syms.c (decode_section_type): New.
5987 (bfd_decode_symclass): Call decode_section_type.
5988
894bb1ee
JJ
59892002-07-04 Jakub Jelinek <jakub@redhat.com>
5990
5991 * merge.c (_bfd_merged_section_offset): Avoid accessing byte before
5992 section content start.
5993 Reported by Michael Schumacher <mike@hightec-rt.com>.
5994
bc0ba537
AM
59952002-07-04 Alan Modra <amodra@bigpond.net.au>
5996
9b5ecbd0 5997 * section.c (_bfd_strip_section_from_output): Remove unnecessary
bc0ba537
AM
5998 link order code. Don't actually remove the output section here;
5999 Just set a flag for the linker to do so.
6000 * elflink.c (_bfd_elf_link_renumber_dynsyms): Test for removed
6001 sections when setting up output section dynsyms.
6002
797fc050
AM
60032002-07-04 Alan Modra <amodra@bigpond.net.au>
6004
6005 * elflink.h (elf_link_add_object_symbols): Revert 1999-09-02 hpux
6006 fudge.
6007 * elf.c (bfd_section_from_shdr): Work around broken hpux shared
6008 libs here instead.
6009
99881371
MS
60102002-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
6011
6012 * elf64-s390.c (create_got_section): Set .got section alignment to
6013 8 bytes.
6014 (elf_s390_check_relocs): Set .rela.dyn section alignment to 8 bytes.
6015
47d9a591
AM
60162002-07-02 Alan Modra <amodra@bigpond.net.au>
6017
6018 * elf.c (_bfd_elf_reloc_type_class): Fix comment grammar.
6019
179d3252
JT
60202002-07-01 Matt Thomas <matt@3am-software.com>
6021
6022 * elf32-vax.c (elf32_vax_print_private_bfd_data): Change EF_*
6023 to EF_VAX_*.
6024
4a14403c
TS
60252002-07-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6026
6027 * elfxx-mips.c (ABI_64_P): Fix comment.
6028 (MIPS_ELF_OPTIONS_SECTION_NAME,MIPS_ELF_STUB_SECTION_NAME): Use the
6029 new section names for N64 ABI.
6030 (mips_elf_output_extsym): No special _gp_disp handling for NewABI.
6031 (mips_elf_calculate_relocation): Code formatting.
6032 (mips_elf_create_dynamic_relocation): Likewise.
6033 (_bfd_mips_elf_fake_sections): IRIX6 needs this hack, too.
6034 (_bfd_mips_elf_size_dynamic_sections): Handle GOT_PAGE for any NewABI.
6035 (_bfd_mips_elf_relocate_section): No special handling for R_MIPS_64
6036 in any NewABI.
6037 (_bfd_mips_elf_finish_dynamic_symbol): No special _gp_disp handling
6038 for NewABI.
6039 (_bfd_mips_elf_modify_segment_map): Handle any N64 ABI.
6040 (_bfd_mips_elf_gc_sweep_hook): NewABI GOT relocs should be handled
6041 here, too.
6042
607c0e09
AS
60432002-07-01 Andreas Schwab <schwab@suse.de>
6044
6045 * elf64-x86-64.c (elf64_x86_64_relocate_section): Only convert
6046 R_X86_64_64 to R_X86_64_RELATIVE.
6047
ba26fd96
AM
60482002-07-01 John David Anglin <dave@hiauly1.hia.nrc.ca>
6049
6050 * vaxbsd.c: New BFD backend for VAX BSD and Ultrix.
6051 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Add new backend.
6052 Run "make dep-am".
6053 * config.bfd (vax-*-bsd* | vax-*-ultrix*): Use vaxbsd_vec instead of
6054 host_aout_vec.
6055 * configure.in (vaxbsd_vec): Add.
6056 * targets.c (vaxbsd_vec): Add.
6057 * Makefile.in: Rebuild.
6058 * configure: Rebuild.
6059 * po/SRC-POTFILES.in: Rebuild.
6060
1e2f5b6e
AM
60612002-07-01 Alan Modra <amodra@bigpond.net.au>
6062
6063 * elflink.h (elf_gc_mark): Pass in the section whose relocs we are
6064 examining to gc_mark_hook, rather than the bfd.
6065 (elf_gc_sections): Adjust.
6066 * elf-bfd.h (struct elf_backend_data <gc_mark_hook>): Likewise.
6067 * elf-m10300.c (mn10300_elf_gc_mark_hook): Likewise.
6068 * elf32-arm.h (elf32_arm_gc_mark_hook): Likewise.
6069 * elf32-avr.c (elf32_avr_gc_mark_hook): Likewise.
6070 * elf32-cris.c (cris_elf_gc_mark_hook): Likewise.
6071 * elf32-d10v.c (elf32_d10v_gc_mark_hook): Likewise.
6072 * elf32-fr30.c (fr30_elf_gc_mark_hook): Likewise.
6073 * elf32-hppa.c (elf32_hppa_gc_mark_hook): Likewise.
6074 * elf32-i386.c (elf_i386_gc_mark_hook): Likewise.
6075 * elf32-m32r.c (m32r_elf_gc_mark_hook): Likewise.
6076 * elf32-m68k.c (elf_m68k_gc_mark_hook): Likewise.
6077 * elf32-mcore.c (mcore_elf_gc_mark_hook): Likewise.
6078 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Likewise.
6079 * elf32-ppc.c (ppc_elf_gc_mark_hook): Likewise.
6080 * elf32-s390.c (elf_s390_gc_mark_hook): Likewise.
6081 * elf32-sh.c (sh_elf_gc_mark_hook): Likewise.
6082 * elf32-sparc.c (elf32_sparc_gc_mark_hook): Likewise.
6083 * elf32-v850.c (v850_elf_gc_mark_hook): Likewise.
6084 * elf32-vax.c (elf_vax_gc_mark_hook): Likewise.
6085 * elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Likewise.
6086 * elf64-mmix.c (mmix_elf_gc_mark_hook): Likewise.
6087 * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
6088 * elf64-s390.c (elf_s390_gc_mark_hook): Likewise.
6089 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
6090 * elfxx-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise.
6091 * elfxx-mips.h (_bfd_mips_elf_gc_mark_hook): Likewise.
6092 * elf64-x86-64.c (elf64_x86_64_gc_mark_hook): Likewise.
6093 * elf32-frv.c (elf32_frv_gc_mark_hook): Likewise. Also remove
6094 redundant local sym tests.
6095 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_entry.
6096 (link_hash_newfunc): Init is_entry.
6097 (ppc64_elf_copy_indirect_symbol): Copy is_entry.
6098 (ppc64_elf_link_hash_table_create): Init all_local_syms.
6099 (create_linkage_sections): Use bfd_make_section_anyway rather than
6100 bfd_make_section.
6101 (ppc64_elf_mark_entry_syms): New function.
6102 (ppc64_elf_check_relocs): Don't bother testing elf_bad_symtab. Set
6103 up opd entry to function section map.
6104 (ppc64_elf_gc_mark_hook): Special case opd section relocs, and
6105 relocs that reference the opd section.
6106 (edit_opd): New function.
6107 (ppc64_elf_size_dynamic_sections): Call get_local_syms and edit_opd.
6108 (ppc64_elf_setup_section_lists): Don't calculate htab->bfd_count here.
6109 (get_local_syms): Do so here. Exit if we already have local syms.
6110 Remove bogus comment imported from elf32-hppa.c. Don't attempt to
6111 read local syms on non-ELF input.
6112 (ppc64_elf_size_stubs): Call _bfd_elf64_link_read_relocs rather
6113 than duplicating it's function here. Adjust free of internal
6114 relocs to suit.
6115 (ppc64_elf_relocate_section): Adjust local syms in opd section.
6116 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Declare.
6117 * elf32-hppa.c (elf32_hppa_size_stubs): Call
6118 _bfd_elf32_link_read_relocs rather than duplicating it's function
6119 here. Adjust free of internal relocs to suit.
6120
1b71fb54
AJ
61212002-07-01 Andreas Jaeger <aj@suse.de>
6122
6123 * elf64-x86-64.c (elf64_x86_64_check_relocs): Certain relocations
6124 are not allowed in shared libs code, enforce -fPIC.
6125
8d28f606
HPN
61262002-06-29 Hans-Peter Nilsson <hp@bitrange.com>
6127
6128 * mmo.c (mmo_write_loc_chunk): Don't eliminate leading and
6129 trailing zero-sequences when there's previous left-over data.
6130
5ac81c74
JL
61312002-06-27 John David Anglin <dave@hiauly1.hia.nrc.ca>
6132
6133 * elf64-hppa.c (elf64_hppa_reloc_type_class): New function.
6134 (elf64_hppa_finish_dynamic_sections): Check other_rel_sec, dlt_rel_sec
6135 and opd_rel_sec in order for starting rela section. Check _raw_size.
6136 (elf_backend_reloc_type_class): Define.
6137
91a4d569
AM
61382002-06-27 Kevin Buettner <kevinb@redhat.com>
6139
6140 * dwarf2.c (decode_line_info): Handle older, non-standard, 64-bit
6141 DWARF2 formats.
6142
feee612b
AM
61432002-06-27 Alan Modra <amodra@bigpond.net.au>
6144
6145 * cpu-powerpc.c: Comment on ordering of arch_info.
6146 * elf32-ppc.c (ppc_elf_object_p): New function.
6147 (elf_backend_object_p): Define.
6148 * elf64-ppc.c (ppc64_elf_object_p): New function.
6149 (elf_backend_object_p): Define.
6150
a4e6cefc
JT
61512002-06-26 Jason Thorpe <thorpej@wasabisystems.com>
6152
6153 * configure.in (vax-*-netbsd*): Set COREFILE to netbsd-core.lo.
6154 * configure: Regenerate.
6155
dae2dd0d
NC
61562002-06-25 Jason Eckhardt <jle@rice.edu>
6157
6158 * dwarf2.c (decode_line_info): Check unit->addr_size
6159 to read in the proper number of prologue bytes.
6160
680f9d5c
NC
61612002-06-25 Nick Clifton <nickc@cambridge.redhat.com>
6162
6163 * config.bfd (powerpc-*-aix5*): Only create a selvecs for
6164 aix5coff64_vec if 64-bit bfd support has been enabled.
91a4d569
AM
6165 (powerpc64-*-aix5*): Only define if 64-bit bfd support has
6166 been enabled.
dae2dd0d 6167
680f9d5c
NC
6168 * targets.c (_bfd_target_vector[]): Only include
6169 aix5coff64_vec if 64-bit bfd support has been enabled.
6170
d4c88bbb
AM
61712002-06-25 Alan Modra <amodra@bigpond.net.au>
6172
6173 * elf64-ppc.c (ppc_add_stub): Replace strcpy/strncpy with memcpy.
6174 * elf32-hppa.c (hppa_add_stub): Likewise.
6175 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
6176 * elflink.h (elf_add_default_symbol): Fix comment typo.
6177 (elf_add_default_symbol): Replace strcpy and strncpy with memcpy.
6178 (elf_link_add_object_symbols): Likewise.
6179 (elf_link_assign_sym_version): Likewise.
6180 * hash.c (bfd_hash_lookup): Likewise.
6181 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
6182 * section.c (bfd_get_unique_section_name): Likewise.
6183 * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
6184 * elf.c (_bfd_elf_make_section_from_phdr): Likewise.
6185 (assign_section_numbers): Likewise.
6186 (_bfd_elfcore_make_pseudosection): Likewise.
6187 (elfcore_grok_lwpstatus): Likewise.
6188 (elfcore_grok_win32pstatus): Likewise.
6189 (elfcore_write_note): Constify input params. Use PTR instead of
6190 void *. Include terminating NUL in namesz. Correct padding.
6191 Support NULL "name" param. Use memcpy instead of strcpy.
6192 (elfcore_write_prpsinfo): Constify input params.
6193 (elfcore_write_prstatus): Likewise. Use PTR instead of void *.
6194 (elfcore_write_lwpstatus): Likewise.
6195 (elfcore_write_pstatus): Likewise.
6196 (elfcore_write_prfpreg): Likewise.
6197 (elfcore_write_prxfpreg): Likewise.
6198 * elf-bfd.h (elfcore_write_note): Update declaration.
6199 (elfcore_write_prpsinfo): Likewise.
6200 (elfcore_write_prstatus): Likewise.
6201 (elfcore_write_pstatus): Likewise.
6202 (elfcore_write_prfpreg): Likewise.
6203 (elfcore_write_prxfpreg): Likewise.
6204 (elfcore_write_lwpstatus): Likewise.
6205
b0ac09d2
NC
62062002-06-25 Jason Eckhardt <jle@rice.edu>
6207
6208 * ecoff.c (ecoff_set_symbol_info): Set BSF_FUNCTION for
6209 symbols of type stProc and stStaticProc.
6210
62112002-06-25 Nick Clifton <nickc@redhat.com>
6212
6213 * ecoff.c: VArious formatting fixes.
6214
021d6096
AM
62152002-06-25 Alan Modra <amodra@bigpond.net.au>
6216
6217 * coff-rs6000.c (xcoff_generate_rtinit): Fix typo.
6218
82e51918
AM
62192002-06-25 Alan Modra <amodra@bigpond.net.au>
6220
6221 * aout-adobe.c: Don't compare against "true" or "false.
6222 * aout-target.h: Likewise.
6223 * aoutx.h: Likewise.
6224 * archive.c: Likewise.
6225 * bout.c: Likewise.
6226 * cache.c: Likewise.
6227 * coff-a29k.c: Likewise.
6228 * coff-alpha.c: Likewise.
6229 * coff-i386.c: Likewise.
6230 * coff-mips.c: Likewise.
6231 * coff-or32.c: Likewise.
6232 * coff64-rs6000.c: Likewise.
6233 * coffcode.h: Likewise.
6234 * coffgen.c: Likewise.
6235 * cpu-ns32k.c: Likewise.
6236 * ecoff.c: Likewise.
6237 * ecofflink.c: Likewise.
6238 * elf.c: Likewise.
6239 * elf32-arm.h: Likewise.
6240 * elf32-cris.c: Likewise.
6241 * elf32-d30v.c: Likewise.
6242 * elf32-i386.c: Likewise.
6243 * elf32-mcore.c: Likewise.
6244 * elf32-ppc.c: Likewise.
6245 * elf32-sh.c: Likewise.
6246 * elf32-sh64.c: Likewise.
6247 * elf32-v850.c: Likewise.
6248 * elf64-alpha.c: Likewise.
6249 * elf64-sh64.c: Likewise.
6250 * elfcode.h: Likewise.
6251 * elfcore.h: Likewise.
6252 * elflink.h: Likewise.
6253 * elfxx-mips.c: Likewise.
6254 * i386os9k.c: Likewise.
6255 * ieee.c: Likewise.
6256 * libbfd.c: Likewise.
6257 * linker.c: Likewise.
6258 * mmo.c: Likewise.
6259 * nlm32-alpha.c: Likewise.
6260 * nlm32-i386.c: Likewise.
6261 * nlm32-ppc.c: Likewise.
6262 * nlm32-sparc.c: Likewise.
6263 * nlmcode.h: Likewise.
6264 * oasys.c: Likewise.
6265 * pdp11.c: Likewise.
6266 * peicode.h: Likewise.
6267 * reloc.c: Likewise.
6268 * som.c: Likewise.
6269 * srec.c: Likewise.
6270 * tekhex.c: Likewise.
6271 * vms.c: Likewise.
6272 * xcofflink.c: Likewise.
6273 * elf64-sparc.c: Edit comment to not use "== false".
6274
6275 * aoutf1.h: Don't use "? true : false".
6276 * ecoff.c: Likewise.
6277 * format.c: Likewise.
6278 * ieee.c: Likewise.
6279 * linker.c: Likewise.
6280 * mmo.c: Likewise.
6281 * oasys.c: Likewise.
6282
48fc70a2
AM
62832002-06-23 H.J. Lu <hjl@gnu.org>
6284
6285 * elflink.h (elf_link_add_archive_symbols): For the default
6286 version, check references with only one `@' first.
6287
47b7c2db
AM
62882002-06-23 John David Anglin <dave@hiauly1.hia.nrc.ca>
6289
6290 * elf64-hppa.c (elf64_hppa_mark_milli_and_exported_functions): New
6291 function.
9b5ecbd0 6292 (allocate_global_data_dlt): Don't add millicode symbols to dynamic
47b7c2db
AM
6293 symbol table.
6294 (allocate_global_data_opd, allocate_dynrel_entries): Likewise.
6295 (elf64_hppa_size_dynamic_sections): Revise to use
6296 elf64_hppa_mark_milli_and_exported_functions.
6297 (elf64_hppa_finish_dynamic_symbol): Remove code to keep millicode
6298 symbols out of dynamic symbol table.
6299
f5d44ba0
AM
63002002-06-23 Alan Modra <amodra@bigpond.net.au>
6301
bb3fff1e
AM
6302 * Makefile.in: Regenerate.
6303 * libbfd.h: Regenerate.
6304 * bfd-in2.h: Regenerate.
6305 * configure: Regenerate.
6306 * po/SRC-POTFILES.in: Regenerate.
6307
f5d44ba0
AM
6308 * elflink.h: Comment typo fixes.
6309
63102002-06-23 H.J. Lu <hjl@gnu.org>
6311
6312 * elf-bfd.h (elf_link_loaded_list): New structure.
6313 (elf_link_hash_table): Add "loaded".
6314 * elf.c (_bfd_elf_link_hash_table_init): Initialize "loaded".
6315 * elflink.h (elf_link_check_versioned_symbol): New function.
6316 (elf_link_output_extsym): Call elf_link_check_versioned_symbol.
6317
cc36acdf
NC
63182002-06-19 Nick Clifton <nickc@cambridge.redhat.com>
6319
6320 * elflink.h (size_dynamic_sections): If the target does not
f5d44ba0 6321 support an ELF style hash table, return true, indicating that
cc36acdf
NC
6322 nothing needed to be done, rather than false, indicating that the
6323 section's size could not be computed.
6324
4e5ba5b7
DB
63252002-06-18 Dave Brolley <brolley@redhat.com>
6326
6327 From Catherine Moore, Michael Meissner, Dave Brolley:
6328 * po/SRC-POTFILES.in: Add cpu-frv.c and elf32-frv.c
6329 * targets.c: Support bfd_elf32_frv_vec.
6330 * reloc.c: Add FRV relocs.
6331 * configure.in: Add support for bfd-elf32-frv-vec.
6332 * config.bfd (targ_cpu): Add support for frv-*-elf.
6333 * archures.c: Add frv arch and machines.
6334 * Makefile.am (ALL_MACHINES): Add cpu-frv.lo.
6335 (ALL_MACHINES_CFILES): Add cpu-frv.c.
6336 (BFD32_BACKENDS): Add elf32-frv.lo.
6337 (BFD32_BACKENDS_CFILES): Add elf32-frv.c
6338 (cpu-frv.lo): New target.
6339 (elf32-frv.lo): New target.
6340 * cpu-frv.c: New file.
6341 * elf32-frv.c: New file.
6342
7ece0d85
JJ
63432002-06-18 Jakub Jelinek <jakub@redhat.com>
6344
6345 * elfcode.h (elf_object_p): Sanity check eh_shoff == 0 implies
6346 e_shnum == 0.
6347 Only read the first section header if e_shoff is non-zero.
6348 Don't consider e_shstrndx if there are no sections.
6349
57fb03ac
TR
63502002-06-17 Tom Rix <trix@redhat.com>
6351
6352 * elf32-d10v.c (elf_d10v_howto_table): Change R_D10V_10_PCREL_R,
f5d44ba0 6353 R_D10V_10_PCREL_L and R_D10V_18_PCREL to use
57fb03ac
TR
6354 complain_overflow_bitfield.
6355
341ca622
AM
63562002-06-17 Alan Modra <amodra@bigpond.net.au>
6357
767e34d1
AM
6358 * opncls.c (bfd_openr): Remove redundant bfd_set_error.
6359 (bfd_fdopenr): Likewise.
6360 (bfd_openstreamr): Likewise.
6361 (bfd_openw): Likewise.
6362
341ca622
AM
6363 * targets.c: Sort target vecs.
6364 (_bfd_target_vector): Add aix5coff64_vec, bfd_elf32_sh64_vec,
6365 bfd_elf32_sh64l_vec, bfd_elf32_sh64lnbsd_vec,
6366 bfd_elf32_sh64nbsd_vec, bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec,
6367 bfd_elf64_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec.
6368 * configure.in: Sort target vecs. Add m88kmach3_vec.
6369 * configure: Regenerate.
6370
dfbbae4c
HPN
63712002-06-16 Hans-Peter Nilsson <hp@bitrange.com>
6372
6373 * elf64-mmix.c (bpo_reloc_request_sort_fn): Use member
6374 bpo_reloc_no to break sort order ties, not address of items.
6375
d663e1cd
JL
63762002-06-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
6377
6378 * elf-hppa.h (elf_hppa_final_link): Fix formatting in comment.
6379 Skip excluded sections in determing __gp value.
6380 (elf_hppa_final_link_relocate): Use the symbol's address in
6381 R_PARISC_FPTR64 relocations that don't need an opd entry.
6382 * elf64-hppa.c (allocate_dynrel_entries): Simplify code.
6383 (elf64_hppa_finalize_dynreloc): Likewise.
6384 (elf64_hppa_size_dynamic_sections): Move comments and fix typo.
6385 (elf64_hppa_finish_dynamic_symbol): Break up assert.
6386
a8295218
NC
63872002-06-14 Sergey Grigoriev <serge@leopold.Physik.Uni-Augsburg.DE>
6388
6389 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
6390 alignment for .bss, .data and .text sections so that sse and sse2
6391 code will work.
6392 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
6393
63942002-06013 J"orn Rennecke <joern.rennecke@superh.com>
5d9b5481
JR
6395
6396 config.bfd: Add support for sh[1234]l*-*-elf* | sh3el*-*-elf*,
6397 sh[1234]*-elf*.
6398
3db4b612
JL
63992002-06-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
6400
2cb69dd3
JL
6401 * elflink.h (elf_bfd_final_link): Improve error handling for missing
6402 dynamic sections.
6403
3db4b612
JL
6404 * elf64-hppa.c (allocate_global_data_opd): We don't need an opd entry
6405 for a symbol that has no output section.
6406 (allocate_dynrel_entries): Correct comment.
6407 (elf64_hppa_finalize_dynreloc): Likewise. Don't create an opd entry
6408 unless we want one.
6409 (elf64_hppa_finalize_opd): Prevent segfault if dyn_h is NULL.
6410 (elf64_hppa_finalize_dlt): Likewise. Prevent segfault for symbols
6411 with no section. Remove unnecessary parentheses.
6412
f3813499
TR
64132002-06-11 Tom Rix <trix@redhat.com>
6414
6415 * coffcode.h (coff_compute_section_file_positions): Add data
6416 section to AIX loader alignment check.
6417
f5d44ba0 6418 * coff-rs6000.c (_bfd_xcoff_mkobject): Set default text section
f3813499
TR
6419 alignment to 4 bytes.
6420 (_bfd_xcoff_copy_private_bfd_data): Use text and data alignment
6421 power accessor macro.
6422 (do_shared_object_padding): Remove invalid assertion.
6423
0ebaf185
RS
64242002-06-10 Richard Sandiford <rsandifo@redhat.com>
6425
6426 * section.c (_bfd_strip_section_from_output): Set SEC_EXCLUDE
6427 for removed output sections.
6428
ebe3e2d1
NC
64292002-06-10 Geoffrey Keating <geoffk@redhat.com>
6430
6431 * merge.c (merge_strings): Use htab_create_alloc with calloc, not
6432 htab_alloc.
6433 * elf-strtab.c (_bfd_elf_strtab_finalize): Likewise.
6434
0b14c2aa
L
64352002-06-08 H.J. Lu <hjl@gnu.org>
6436
6437 * elf.c (copy_private_bfd_data): Don't cast to bfd_size_type to
6438 work around a long long bug in gcc 2.96 on mips.
6439
3c2bfad6
JT
64402002-06-08 Jason Thorpe <thorpej@wasabisystems.com>
6441
6442 * Makefile.am (BFD32_BACKENDS): Add vax1knetbsd.lo.
6443 (BFD32_BACKENDS_CFILES): Add vax1knetbsd.c.
6444 Regenerate dependency lists.
6445 * Makefile.in: Regenerate.
6446 * config.bfd (vax-*-netbsdelf*, vax-*-netbsdaout*): Add
6447 vax1knetbsd_vec to targ_selvecs.
6448 * configure.in: Add vax1knetbsd_vec.
6449 * configure: Regenerate.
6450 * targets.c (_bfd_target_vector): Add vax1knetbsd_vec.
6451 * vax1knetbsd.c: New file.
6452 * vaxnetbsd.c: Update copyright years.
6453 (TARGET_PAGE_SIZE): Set to 0x1000.
6454 (DEFAULT_MID): Set to M_VAX4K_NETBSD.
6455
91149be3
JT
64562002-06-08 Matt Thomas <matt@3am-software.com>
6457
6458 * libaout.h (enum machine_type): Add M_VAX4K_NETBSD.
6459
21e15248
AM
64602002-06-08 Alan Modra <amodra@bigpond.net.au>
6461
6462 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Make static.
6463
986b7daa
AM
64642002-06-08 Alan Modra <amodra@bigpond.net.au>
6465
e90b95f6
AM
6466 * Makefile.am: Run "make dep-am".
6467 * Makefile.in: Regenerate.
6468
3f9c735e
AM
6469 * armnetbsd.c: Replace CONST with const.
6470 * corefile.c: Likewise.
6471 * elf32-dlx.c: Likewise.
6472 * elf64-mips.c: Likewise.
6473 * mmo.c: Likewise.
6474 * ns32knetbsd.c: Likewise.
6475
986b7daa
AM
6476 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Check the hash
6477 table is elf64-sparc.
6478
5a659663
TS
64792002-06-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6480
6481 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Simplify code.
6482 Fix RELA addends to get not shifted in the result. Don't do special
6483 handling of R_MIPS_64 for NewABI.
6484
9bab7074
AM
64852002-06-07 Alan Modra <amodra@bigpond.net.au>
6486
6487 * aoutx.h (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
6488 (NAME(aout,slurp_reloc_table)): Likewise.
6489 * coff-mips.c (mips_relax_section): Use bfd_zalloc.
6490 * coff-rs6000.c (xcoff_write_armap_big): Use bfd_zmalloc.
6491 (xcoff_write_archive_contents_big): Likewise.
6492 (xcoff_generate_rtinit): Likewise.
6493 (xcoff_generate_rtinit): Likewise, and check error return.
6494 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
6495 * coffgen.c (coff_section_symbol): Use bfd_zalloc.
6496 (coff_get_normalized_symtab): Likewise.
6497 (coff_make_empty_symbol): Likewise.
6498 (bfd_coff_set_symbol_class): Likewise.
6499 * cofflink.c (coff_link_add_symbols): Likewise.
6500 * ecoff.c (_bfd_ecoff_make_empty_symbol): Likewise.
6501 * ecofflink.c (ecoff_write_shuffle): Use bfd_zmalloc.
6502 (bfd_ecoff_write_accumulated_debug): Likewise.
6503 * elf64-alpha.c (get_got_entry): Use bfd_zalloc.
6504 * i386linux.c (bfd_i386linux_size_dynamic_sections): Likewise.
6505 * i386lynx.c (NAME(lynx,slurp_reloc_table)): Use bfd_zmalloc.
6506 * ieee.c (do_with_relocs): Use bfd_zalloc.
6507 * m68klinux.c (bfd_m68klinux_size_dynamic_sections): Likewise.
6508 * pdp11.c (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
6509 (NAME(aout,slurp_reloc_table)): Likewise.
6510 (NAME(aout,squirt_out_relocs)): Don't memset when zalloc'd.
6511 * reloc16.c (bfd_coff_reloc16_relax_section): Use bfd_zmalloc.
6512 * som.c (som_build_and_write_symbol_table): Likewise.
6513 (som_slurp_string_table): Likewise.
6514 (som_slurp_symbol_table): Likewise.
6515 (som_bfd_ar_write_symbol_stuff): Likewise.
6516 * sparclinux.c (bfd_sparclinux_size_dynamic_sections): Use bfd_zalloc.
6517 * sunos.c (bfd_sunos_size_dynamic_sections): Likewise.
6518 * tekhex.c (find_chunk): Likewise. Get rid of unused "sname".
6519 * vms-gsd.c (_bfd_vms_slurp_gsd): Use bfd_zmalloc.
6520 * xcofflink.c (xcoff_link_add_symbols): Use bfd_zalloc/bfd_zmalloc.
6521
1126897b
AM
65222002-06-07 Alan Modra <amodra@bigpond.net.au>
6523
6524 * elf-bfd.h (struct bfd_elf_section_data <group_name>): Replace with
6525 "group" union.
6526 (elf_group_name): Update.
6527 (elf_group_id): Define.
6528 (bfd_elf_set_group_contents): Declare.
6529 * elf.c (elf_fake_sections): Qualify use of elf_group_name.
6530 (set_group_contents): Rename to bfd_elf_set_group_contents. Remove
6531 ATTRIBUTE_UNUSED from failedptrarg. If elf_group_id is set, use
6532 that sym for the signature.
6533 (_bfd_elf_compute_section_file_positions): Don't call
6534 set_group_contents for "ld -r" case.
6535 (swap_out_syms): Use bfd_zalloc.
6536 * elflink.h (elf_link_add_archive_symbols): Likewise.
6537 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
6538 (elf_bfd_final_link): Call bfd_elf_set_group_contents.
6539
3fad3c7c
AM
65402002-06-07 Alan Modra <amodra@bigpond.net.au>
6541
6542 * elf64-ppc.c (ppc64_elf_relocate_section): Allow unresolved
6543 relocs in opd for non-shared too.
6544
10f469bf 65452002-06-06 Jeffrey Law <law@redhat.com>
76f99c63
JL
6546
6547 * elf32-h8300.c (elf32_h8_relax_section): Ignore uninteresting
6548 relocations.
6549
7217313c
NC
65502002-06-06 Nick Clifton <nickc@cambridge.redhat.com>
6551
6552 * merge.c: Include libiberty.h.
6553 * elf-strtab.c: Include libiberty.h.
6554
6cb22815
AM
65552002-06-06 Elias Athanasopoulos <eathan@otenet.gr>
6556
6557 * peXXigen.c (pe_print_idata): Remove unused variable.
6558
1ed89aa9
NC
65592002-06-06 David Heine <dlheine@tensilica.com>
6560
6561 * elf.c (assign_file_positions_for_segments): Remove unallocated
6562 sections from the section to segment mapping for PT_LOAD segments.
6563 Update comment about empty loadable segments.
6564
644c4c80
RS
65652002-06-06 Richard Sandiford <rsandifo@redhat.com>
6566
6567 * stabs.c (_bfd_link_section_stabs): Check that the symbol offset
6568 is within the .stabstr section.
6569
f8ecb12b
AM
65702002-06-06 Alan Modra <amodra@bigpond.net.au>
6571
6572 * elf-bfd.h (struct elf_size_info <swap_symbol_in>): Function args
6573 are "const PTR", not "const PTR *".
6574 (bfd_elf32_swap_symbol_in): Likewise.
6575 (bfd_elf64_swap_symbol_in): Likewise.
6576 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR.
6577 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
6578 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
6579 (elf_link_add_object_symbols): Likewise.
6580 (elf_link_record_local_dynamic_symbol): Likewise.
6581 (elf_link_input_bfd): Likewise.
6582 (elf_gc_mark): Likewise.
6583 (elf_reloc_symbol_deleted_p): Likewise.
6584 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
6585 (mn10200_elf_relax_delete_bytes): Likewise.
6586 (mn10200_elf_symbol_address_p): Likewise.
6587 (mn10200_elf_get_relocated_section_contents): Likewise.
6588 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
6589 (mn10300_elf_relax_section): Likewise.
6590 (mn10300_elf_relax_delete_bytes): Likewise.
6591 (mn10300_elf_symbol_address_p): Likewise.
6592 (mn10300_elf_get_relocated_section_contents): Likewise.
6593 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
6594 (elf32_h8_relax_delete_bytes): Likewise.
6595 (elf32_h8_symbol_address_p): Likewise.
6596 (elf32_h8_get_relocated_section_contents): Likewise.
6597 * elf32-hppa.c (get_local_syms): Likewise.
6598 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
6599 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
6600 * elf32-sh.c (sh_elf_relax_section): Likewise.
6601 (sh_elf_relax_delete_bytes): Likewise.
6602 (sh_elf_get_relocated_section_contents): Likewise.
6603 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
6604 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
6605 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
6606 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
6607 * elf64-ppc.c (get_local_syms): Likewise.
6608 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
6609 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
6610
1ed89aa9 66112002-06-05 J"orn Rennecke <joern.rennecke@superh.com>
7a33bc10
JR
6612
6613 * config.bfd (sh64l*-*-elf*, shl*-*-elf*): New configurations.
6614
73ff0d56
AM
66152002-06-05 Alan Modra <amodra@bigpond.net.au>
6616
9dce4196
AM
6617 * elf.c (group_signature): Swap in the whole symbol, and handle
6618 extracting section symbol names.
6619 (setup_group): Add comment.
6620 (set_group_contents): When called from objcopy or ld, arrange for
6621 section contents to be written. Write group member output section
6622 indices to allow objcopy to reorganize sections.
6623 (_bfd_elf_copy_private_section_data): Copy group info.
6624
73ff0d56
AM
6625 * elf-bfd.h (struct elf_size_info): Add swap_symbol_in field.
6626 (bfd_elf32_swap_symbol_in): Update prototype.
6627 (bfd_elf64_swap_symbol_in): Likewise.
6628 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR *.
6629 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
6630 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
6631 (elf_link_add_object_symbols): Likewise.
6632 (elf_link_record_local_dynamic_symbol): Likewise.
6633 (elf_link_input_bfd): Likewise.
6634 (elf_gc_mark): Likewise.
6635 (elf_reloc_symbol_deleted_p): Likewise.
6636 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
6637 (mn10200_elf_relax_delete_bytes): Likewise.
6638 (mn10200_elf_symbol_address_p): Likewise.
6639 (mn10200_elf_get_relocated_section_contents): Likewise.
6640 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
6641 (mn10300_elf_relax_section): Likewise.
6642 (mn10300_elf_relax_delete_bytes): Likewise.
6643 (mn10300_elf_symbol_address_p): Likewise.
6644 (mn10300_elf_get_relocated_section_contents): Likewise.
6645 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
6646 (elf32_h8_relax_delete_bytes): Likewise.
6647 (elf32_h8_symbol_address_p): Likewise.
6648 (elf32_h8_get_relocated_section_contents): Likewise.
6649 * elf32-hppa.c (get_local_syms): Likewise.
6650 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
6651 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
6652 * elf32-sh.c (sh_elf_relax_section): Likewise.
6653 (sh_elf_relax_delete_bytes): Likewise.
6654 (sh_elf_get_relocated_section_contents): Likewise.
6655 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
6656 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
6657 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
6658 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
6659 * elf64-ppc.c (get_local_syms): Likewise.
6660 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
6661 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
6662 * elfcode.h (NAME(_bfd_elf,size_info)): Update initialiser.
6663 * elf64-alpha.c (alpha_elf_size_info): Likewise.
6664 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
6665 * elf64-mips.c (mips_elf64_size_info): Likewise.
6666 * elf64-s390.c (s390_elf64_size_info): Likewise.
6667 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
6668
53bfd6b4
MR
66692002-06-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
6670
6671 * elf32-mips.c (elf32_mips_ignore_discarded_relocs): Move to...
6672 elfxx-mips.c (_bfd_mips_elf_ignore_discarded_relocs): ... here.
6673 elf64-mips.c (elf_backend_ignore_discarded_relocs): Use
6674 _bfd_mips_elf_ignore_discarded_relocs.
6675 elfxx-mips.h (_bfd_mips_elf_ignore_discarded_relocs): Declare.
6676
d4df96e6
L
66772002-06-05 H.J. Lu <hjl@gnu.org>
6678
6679 * elfxx-mips.c (mips_elf_calculate_relocation): Call
6680 _bfd_elf_rel_local_sym for STT_SECTION relocations against
6681 the SEC_MERGE section.
6682
e61463e1
AM
66832002-06-05 Alan Modra <amodra@bigpond.net.au>
6684
3cac74d0
AM
6685 * coff-alpha.c: Update copyright date.
6686 * coff-mips.c: Likewise.
6687 * xcoff-target.h: Likewise.
6688
e61463e1
AM
6689 * bfd-in.h: Remove "taken from the source" comment.
6690 * libbfd-in.h: Likewise.
6691 * libcoff-in.h: Likewise.
6692 * bfd-in2.h: Regenerate.
6693 * libbfd.h: Regenerate.
6694 * libcoff.h: Regenerate.
6695
6696 * elf.c (bfd_elf_discard_group): Return true.
6697 * elf-bfd.h (bfd_elf_discard_group): Declare.
6698 * bfd-in.h (bfd_elf_discard_group): Don't declare here.
6699 * section.c (bfd_discard_group): Rename to bfd_generic_discard_group.
6700 * bfd.c (bfd_discard_group): Define.
6701 * targets.c (struct bfd_target): Add _bfd_discard_group.
6702 (BFD_JUMP_TABLE_LINK): Here too.
6703 * libbfd-in.h (_bfd_nolink_bfd_discard_group): Define.
6704 * aout-adobe.c (aout_32_bfd_discard_group): Define.
6705 * aout-target.h (MY_bfd_discard_group): Define.
6706 * aout-tic30.c (MY_bfd_discard_group): Define.
6707 * binary.c (binary_bfd_discard_group): Define.
6708 * bout.c (b_out_bfd_discard_group): Define.
6709 * coff-alpha.c (_bfd_ecoff_bfd_discard_group): Define.
6710 * coffcode.h (coff_bfd_discard_group): Define.
6711 * coff-mips.c (_bfd_ecoff_bfd_discard_group): Define.
6712 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Define.
6713 * i386msdos.c (msdos_bfd_discard_group): Define.
6714 * i386os9k.c (os9k_bfd_discard_group): Define.
6715 * ieee.c (ieee_bfd_discard_group): Define.
6716 * ihex.c (ihex_bfd_discard_group): Define.
6717 * mmo.c (mmo_bfd_discard_group): Define.
6718 * nlm-target.h (nlm_bfd_discard_group): Define.
6719 * oasys.c (oasys_bfd_discard_group): Define.
6720 * ppcboot.c (ppcboot_bfd_discard_group): Define.
6721 * som.c (som_bfd_discard_group): Define.
6722 * srec.c (srec_bfd_discard_group): Define.
6723 * tekhex.c (tekhex_bfd_discard_group): Define.
6724 * versados.c (versados_bfd_discard_group): Define.
6725 * vms.c (vms_bfd_discard_group): Define.
6726 * xcoff-target.h (_bfd_xcoff_bfd_discard_group): Define.
6727 * coff64-rs6000.c (rs6000coff64_vec): Update initialiser.
6728 (aix5coff64_vec): Likewise.
6729 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Likewise.
6730
9cba27b2
JT
67312002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
6732
6733 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-com.lo.
6734 (BFD32_BACKENDS_CFILES): Add elf32-sh64-com.c.
6735 (elf32-sh64-com.lo): New dependency list.
6736 * Makefile.in: Regenerate.
6737 * configure.in (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec)
6738 (bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec): Add
6739 elf32-sh64-com.lo.
6740 * configure: Regenerate.
6741 * elf32-sh64.c (sh64_address_in_cranges)
6742 (sh64_get_contents_type, sh64_address_is_shmedia): Move to...
6743 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb):
6744 (crange_bsearch_cmpl): Prepend _bfd_sh64_ to name and move to...
6745 * elf32-sh64-com.c: ...here. New file.
6746
8d2c33be
AM
67472002-06-04 Alan Modra <amodra@bigpond.net.au>
6748
6749 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Remove
6750 ATTRIBUTE_UNUSED on used params.
6751 * elf32-vax.c (elf_vax_gc_mark_hook): Remove unnecessary checks
6752 before calling bfd_section_from_elf_index on local syms.
6753 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
6754
5b0e55b6
JT
67552002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
6756
6757 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-nbsd.lo.
6758 (BFD32_BACKENDS_CFILES): Add elf32-sh64-nbsd.c.
6759 (BFD64_BACKENDS): Add elf64-sh64-nbsd.lo.
6760 (BFD64_BACKENDS_CFILES): Add elf64-sh64-nbsd.c.
6761 (elf32-sh64-nbsd.lo, elf64-sh64-nbsd.lo): New rules.
6762 * Makefile.in: Regenerate.
6763 * config.bfd (sh5le-*-netbsd*, sh5-*-netbsd*, sh64le-*-netbsd*)
6764 (sh64-*-netbsd*): New targets.
6765 * configure.in: Add bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec,
6766 bfd_elf64_sh64nbsd_vec, and bfd_elf64_sh64lnbsd_vec.
6767 * configure: Regenerate.
6768 * elf32-sh64-nbsd.c: New file.
6769 * elf64-sh64-nbsd.c: New file.
6770 * targets.c: Add extern decls for bfd_elf32_sh64nbsd_vec,
6771 bfd_elf32_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec, and
6772 bfd_elf64_sh64lnbsd_vec.
6773
b885599b
AM
67742002-06-04 Alan Modra <amodra@bigpond.net.au>
6775
6776 * elf.c (setup_group): Set SEC_LINK_ONCE on GRP_COMDAT groups.
6777 (bfd_section_from_shdr): Likewise. Set section name of group
6778 sections from signature.
6779 (group_signature): Split out from setup_group. Ensure symbol table
6780 is available.
6781 (bfd_elf_discard_group): New function.
6782 (_bfd_elf_make_section_from_shdr): Don't set SEC_LINK_ONCE on
6783 .gnu.linkonce* sections if they are members of a group.
6784 (set_group_contents): Set GRP_COMDAT flag.
6785 * section.c (bfd_discard_group): New function.
6786 * bfd-in.h (bfd_elf_discard_group): Declare.
6787 * bfd-in2.h: Regenerate.
6788 * elf-bfd.h (struct bfd_elf_section_data): Add linkonce_p field.
6789 (elf_linkonce_p): Define.
6790
90937f86
AM
67912002-06-04 Alan Modra <amodra@bigpond.net.au>
6792
6793 * elf.c (bfd_section_from_shdr): Make "name" const.
6794 * elf-bfd.h (elf_backend_section_from_shdr): Likewise.
6795 * elf32-i370.c (i370_elf_section_from_shdr): Likewise.
6796 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
6797 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
6798 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
6799 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
6800 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
6801 * elf64-ppc.c (ppc64_elf_section_from_shdr): Likewise.
6802 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
6803 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
6804 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
6805
cf6fb9ce
MR
68062002-06-03 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
6807
6808 * elfxx-mips.c (ABI_64_P): Use backend's data to determine the
6809 ABI.
6810
cedb70c5
KH
68112002-06-02 Kazu Hirata <kazu@cs.umass.edu>
6812
6813 * elf32-arc.c: Fix formatting.
6814 * elf32-arm.h: Likewise.
6815 * elf32-cris.c: Likewise.
6816 * elf32-dlx.c: Likewise.
6817 * elf32-hppa.c: Likewise.
6818 * elf32-i386.c: Likewise.
6819 * elf32-i386qnx.c: Likewise.
6820 * elf32-or32.c: Likewise.
6821 * elf32-s390.c: Likewise.
6822 * elf32-sh64.c: Likewise.
6823 * elf32-vax.c: Likewise.
6824 * elf32-xstormy16.c: Likewise.
6825 * elf64-alpha.c: Likewise.
6826 * elf64-mmix.c: Likewise.
6827 * elf64-ppc.c: Likewise.
6828 * elf64-s390.c: Likewise.
6829 * elf64-sh64.c: Likewise.
6830 * elf64-x86-64.c: Likewise.
6831
048d873d
RH
68322002-06-02 Richard Henderson <rth@redhat.com>
6833
6834 * elf64-alpha.c (elf64_alpha_relocate_section): Don't dereference
6835 null when there are no got entries for a symbol.
6836 (elf64_alpha_relax_find_tls_segment): Rearrange to avoid
6837 uninitialized variable warning.
6838
4a67a098
RH
68392002-06-01 Richard Henderson <rth@redhat.com>
6840
6841 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Don't test for
6842 undefined symbols here.
6843 (elf64_alpha_relax_section): Do it here. Also test for not
6844 defined in the current module.
6845 (elf64_alpha_relocate_section_r): Split out of ...
6846 (elf64_alpha_relocate_section): ... here. Don't dereference
6847 NULL when looking up local got entries.
6848
f44f99a5
RH
68492002-06-01 Richard Henderson <rth@redhat.com>
6850
6851 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Reject undefined
6852 symbols from JSR relaxation.
6853 (elf64_alpha_size_plt_section_1): New.
6854 (elf64_alpha_calc_dynrel_sizes): Split out .rela.got bits ...
6855 (elf64_alpha_size_rela_got_1): ... here.
6856 (elf64_alpha_size_dynamic_sections): Split out .rela.got bits ...
6857 (elf64_alpha_size_rela_got_section): ... here.
6858 (elf64_alpha_size_plt_section): New.
6859 (elf64_alpha_relax_section): Call them.
6860 (elf64_alpha_size_got_sections): Remove output_bfd arg.
6861 (elf64_alpha_finish_dynamic_symbol): Check gotent use_count.
6862
9e756d64
RH
68632002-06-01 Richard Henderson <rth@redhat.com>
6864
6865 * elf64-alpha.c (alpha_get_dtprel_base, alpha_get_tprel_base): New.
6866 (elf64_alpha_relocate_section): Use them. Reject LE TLS relocs
6867 in shared libraries. Fix DTPRELHI and TPRELHI value.
6868 (INSN_ADDQ, INSN_RDUNIQ): New.
6869 (struct alpha_relax_info): Add symtab_hdr, tls_segment, first_gotent.
6870 (elf64_alpha_relax_with_lituse): Return boolean. Remove irelend
6871 argument. Reject dynamic symbols. Use LITUSE symbolic constants.
6872 (elf64_alpha_relax_got_load): Rename from relax_without_lituse.
6873 Handle GOTDTPREL and GOTTPREL relocations.
6874 (elf64_alpha_relax_gprelhilo): New.
6875 (elf64_alpha_relax_tls_get_addr): New.
6876 (elf64_alpha_relax_find_tls_segment): New.
6877 (elf64_alpha_relax_section): Handle TLS relocations.
6878 (ALPHA_ELF_LINK_HASH_TLS_IE): New.
6879 (elf64_alpha_check_relocs): Set it.
6880
c853d7f6
RH
68812002-06-01 Richard Henderson <rth@redhat.com>
6882
b646261c
RH
6883 * elf64-alpha.c (elf64_alpha_relax_section): Don't store computed gp.
6884
c853d7f6
RH
6885 * elf64-alpha.c (elf64_alpha_check_relocs): Fix typo on maybe_dynamic
6886 check; don't suppress dynamic relocs for non-allocated sections.
6887
d7e41a96
RH
6888 * elf64-alpha.c: Remove dead code.
6889
5f333394
AM
68902002-05-31 Alan Modra <amodra@bigpond.net.au>
6891
08e0ee05
AM
6892 * bfd-in2.h: Regenerate.
6893 * libbfd.h: Regenerate.
6894 * po/SRC-POTFILES.in: Regenerate.
6895
5f333394
AM
6896 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate
6897 space for bss .plt.
6898
caf47ea6
AM
68992002-05-31 Graeme Peterson <gp@qnx.com>
6900
6901 * Makefile.am (BFD32_BACKENDS): Add elf32-i386qnx.lo.
6902 (BFD32_BACKENDS_CFILES): Add elf32-i386qnx.c.
6903 Run "make dep-am".
6904 * Makefile.in: Regenerate.
6905 * config.bfd: Add i[3456]86-*-nto-qnx* support.
6906 * configure.in: Add bfd_elf32_i386qnx_vec support.
6907 * configure: Regenerate.
6908 * elf-bfd.h (struct elf_backend_data): Add set_nonloadable_filepos,
6909 is_contained_by_filepos, and copy_private_bfd_data_p.
6910 * elf.c (assign_file_positions_for_segments): Call backend
6911 set_nonloadable_filepos. Fix non-K&R call to _bfd_error_handler.
6912 (IS_CONTAINED_BY_FILEPOS): Define.
6913 (INCLUDE_SECTION_IN_SEGMENT): Also test IS_CONTAINED_BY_FILEPOS.
6914 (copy_private_bfd_data): Use IS_CONTAINED_BY_FILEPOS. Typo fix.
6915 Fix non-K&R call to _bfd_error_handler.
6916 (_bfd_elf_copy_private_section_data): Use backend
6917 copy_private_bfd_data_p.
6918 * elf32-i386.c: Don't include elfxx-target.h when
6919 ELF32_I386_C_INCLUDED is defined.
6920 * elf32-i386qnx.c: New QNX elf backend file.
6921 * elfxx-target.h: Add elf_backend_set_nonloadable_filepos,
6922 elf_backend_is_contained_by_filepos, and
6923 elf_backend_do_copy_private_bfd_data.
6924 * targets.c: Add bfd_target bfd_elf32_i386qnx_vec.
6925
5bc56484
AM
69262002-05-31 Alan Modra <amodra@bigpond.net.au>
6927
6928 * elfarm-oabi.c (bfd_elf32_arm_add_glue_sections_to_bfd): Define.
6929 Move other similar defines to start of file.
6930
1b164155
TR
69312002-05-30 Tom Rix <trix@redhat.com>
6932
6933 * coff-rs6000.c (xcoff_rtype2howto): Handle 16 bit R_RBA.
6934 * coff64-rs6000.c (xcoff64_rtype2howto): Same.
6935
3765b1be
RH
69362002-05-30 Richard Henderson <rth@redhat.com>
6937
6938 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_TLSGD,
6939 ALPHA_ELF_LINK_HASH_LU_TLSLDM, ALPHA_ELF_LINK_HASH_LU_FUNC): New.
6940 (ALPHA_ELF_GOT_ENTRY_RELOCS_DONE): Remove.
6941 (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Remove.
6942 (struct alpha_elf_got_entry): Add reloc_type, reloc_done, reloc_xlated.
6943 (struct alpha_elf_obj_tdata): Rename total_got_entries and
6944 n_local_got_entries to total_got_size and local_got_size.
6945 (elf64_alpha_howto, elf64_alpha_reloc_map): Update for TLS relocs.
6946 (alpha_got_entry_size): New.
6947 (elf64_alpha_relax_with_lituse): Use it.
6948 (elf64_alpha_relax_without_lituse): Likewise.
6949 (MAX_GOT_SIZE): Rename from MAX_GOT_ENTRIES.
6950 (get_got_entry): New.
6951 (elf64_alpha_check_relocs): Handle TLS relocs. Reorganize.
6952 (elf64_alpha_adjust_dynamic_symbol): Test LU_FUNC as a mask.
6953 (elf64_alpha_merge_ind_symbols): Check gotent->reloc_type.
6954 (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots): Likewise.
6955 (elf64_alpha_calc_got_offsets_for_symbol): Use alpha_got_entry_size.
6956 (elf64_alpha_calc_got_offsets): Likewise.
6957 (alpha_dynamic_entries_for_reloc): New.
6958 (elf64_alpha_calc_dynrel_sizes): Use it.
6959 (elf64_alpha_size_dynamic_sections): Likewise.
6960 (elf64_alpha_relocate_section): Handle TLS relocations.
6961 * reloc.c: Add Alpha TLS relocations.
6962 * bfd-in2.h, libbfd.h: Rebuild.
6963
5e226794
NC
69642002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
6965
6966 * peXXigen.c (pe_print_idata): Remove double printed
6967 import table lines; add Bound-To comment.
6968
90ace9e9
JT
69692002-05-29 Matt Thomas <matt@3am-software.com>
6970
6971 * Makefile.am (BFD32_BACKENDS): Add elf32-vax.lo.
6972 (BFD32_BACKENDS_CFILES): Add elf32-vax.c.
6973 (elf32-vax.lo): New rule.
6974 * Makefile.in: Regenerate.
6975 * configure.in (bfd_elf32_vax_vec)
6976 (vaxnetbsd_vec): New vectors.
6977 * configure: Regenerate.
6978 * config.bfd (vax-*-netbsdelf*)
6979 (vax-*-netbsdaout*)
6980 (vax-*-netbsd*): New targets.
6981 * elf32-vax.c: New file.
6982 * reloc.c: Add VAX relocations.
6983 * bfd-in2.h: Regenerate.
6984 * targets.c (_bfd_target_vector): Add bfd_elf32_vax_vec.
6985
4a253e81
JT
69862002-05-29 Jason Thorpe <thorpej@wasabisystems.com>
6987
6988 * config.bfd (arm-*-netbsd*): Add bfd_elf32_littlearm_vec
6989 and bfd_elf32_bigarm_vec to targ_selvecs.
6990
6e7c73dd
CF
69912002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
6992
6993 * peXXigen.c (pe_print_idata): Fix seg faults on printing import tables
6994 with auto-imported symbols.
6995
8afb0e02
NC
69962002-05-29 Adam Nemet <anemet@lnxw.com>
6997
6998 * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Don't add glue
6999 sections only record bfd.
9bab7074 7000 (bfd_elf32_arm_add_glue_sections_to_bfd): New function.
8afb0e02 7001 * bfd-in.h (bfd_elf32_arm_add_glue_sections_to_bfd): Declare it.
9bab7074 7002 * bfd-in2.h: Regenerate.
8afb0e02 7003
a95653f5
NC
70042002-05-28 Nick Clifton <nickc@cambridge.redhat.com>
7005
7006 * syms.c (_bfd_stab_section_find_nearest_line): Move
7007 declaration and initialisation of saw_line and saw_func out of
7008 for loop.
7009
7cdc5bba
AM
70102002-05-29 Alan Modra <amodra@bigpond.net.au>
7011
7012 * elf64-ppc.c (ppc64_elf_get_symbol_info): New function.
7013 (bfd_elf64_get_symbol_info): Define.
7014 * elfxx-target.h (bfd_elfNN_get_symbol_info): Only define if undef.
7015
4c7aad1c
AM
70162002-05-29 Andrey Volkov <avolkov@transas.com>
7017
7018 * cpu-h8300.c: Make default h8300 machine first in machine list.
7019
d172d4ba
NC
70202002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net>
7021
7022 * config.bfd: Added DLX configuraton.
7023 * Makefile.am: Added DLX configuraton.
7024 * configure.in: Added DLX configuraton.
7025 * archures.c: Add DLX architecure.
7026 * reloc.c: Add DLX relocs.
7027 * targets.c: Added DLX target vector.
7028 * configure: Regenerate.
7029 * Makefile.in: Regenreate.
7030 * bfd-in2.h: Regenreate.
7031 * elf32-dlx.c: New file: Support DLX target.
7032 * cpu-dlx.c: New file: Support DLX target.
7033
d1329ca3
AM
70342002-05-25 Alan Modra <amodra@bigpond.net.au>
7035
428d0de3
AM
7036 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Formatting.
7037
d1329ca3
AM
7038 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Revert last change.
7039 (ppc64_elf_check_relocs): Don't set up function descriptor symbol
7040 strings to point inside function code sym string.
7041 (func_desc_adjust): Likewise.
7042 (ppc64_elf_hide_symbol): Rewrite code to look up function code sym.
7043
3bab7989
ML
70442002-05-24 Michal Ludvig <mludvig@suse.cz>
7045
7046 * elf64-x86-64.c (elf64_x86_64_grok_prstatus): Added.
7047 (elf64_x86_64_grok_psinfo): Added.
7048
436e8db0
NC
70492002-05-24 TAMURA Kent <kent@netbsd.org>
7050
7051 * config.bfd: Add a target for i386-netbsdpe.
7052
ea1e4b0d
AM
70532002-05-24 Alan Modra <amodra@bigpond.net.au>
7054
7055 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy is_func
7056 and is_func_descriptor.
7057 (func_desc_adjust): Hide function code sym in shared libs unless
7058 there is a matching exported function descriptor sym.
7059
13ae64f3
JJ
70602002-05-23 Jakub Jelinek <jakub@redhat.com>
7061
7062 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_THREAD_LOCAL
7063 for symbols from SHF_TLS section.
7064 (_bfd_elf_print_private_bfd_data): Add PT_TLS.
7065 (elf_fake_sections): Set SHF_TLS for SEC_THREAD_LOCAL sections.
7066 (map_sections_to_segments): Build PT_TLS segment if necessary.
7067 (assign_file_positions_for_segments): Likewise.
7068 (get_program_header_size): Account for PT_TLS segment.
7069 (swap_out_syms): Set type of BSF_THREAD_LOCAL symbols and symbols from
7070 SEC_THREAD_LOCAL sections to STT_TLS.
7071 * reloc.c: Add 386 and IA-64 TLS relocs.
7072 * section.c (SEC_THREAD_LOCAL): Define.
7073 (SEC_CONSTRUCTOR_TEXT, SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS):
7074 Remove.
7075 * elflink.h (elf_link_add_object_symbols): Support .tcommon.
7076 (size_dynamic_sections): If DF_STATIC_TLS, set DF_FLAGS
7077 unconditionally.
7078 (struct elf_final_link_info): Add first_tls_sec.
7079 (elf_bfd_final_link): Set first_tls_sec.
7080 Compute elf_hash_table (info)->tls_segment.
7081 (elf_link_output_extsym): Handle STT_TLS symbols.
7082 (elf_link_input_bfd): Likewise.
7083 * syms.c (BSF_THREAD_LOCAL): Define.
7084 * bfd-in2.h: Rebuilt.
7085 * libbfd.h: Rebuilt.
7086 * elf32-i386.c (elf_i386_tls_transition, dtpoff_base, tpoff,
7087 elf_i386_mkobject, elf_i386_object_p): New functions.
7088 (elf_howto_table): Add TLS relocs.
7089 (elf_i386_reloc_type_lookup): Support TLS relocs.
7090 (elf_i386_info_to_howto_rel): Likewise.
7091 (struct elf_i386_link_hash_entry): Add tls_type.
7092 (struct elf_i386_obj_tdata): New.
7093 (elf_i386_hash_entry, elf_i386_tdata, elf_i386_local_got_tls_type):
7094 New macros.
7095 (struct elf_i386_link_hash_table): Add tls_ldm_got.
7096 (link_hash_newfunc): Clear tls_type.
7097 (elf_i386_check_relocs): Support TLS relocs.
7098 (elf_i386_gc_sweep_hook): Likewise.
7099 (allocate_dynrelocs): Likewise.
7100 (elf_i386_size_dynamic_sections): Likewise.
7101 (elf_i386_relocate_section): Likewise.
7102 (elf_i386_finish_dynamic_symbol): Likewise.
7103 (bfd_elf32_mkobject, elf_backend_object_p): Define.
7104 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add tprel_offset,
7105 dtpmod_offset, dtprel_offset, tprel_done, dtpmod_done, dtprel_done,
7106 want_tprel, want_dtpmod, want_dtprel.
7107 (elfNN_ia64_tprel_base, elfNN_ia64_dtprel_base): New functions.
7108 (ia64_howto_table): Add TLS relocs, rename R_IA64_LTOFF_TP22 to
7109 R_IA64_LTOFF_TPREL22.
7110 (elf_code_to_howto_index): Add TLS relocs.
7111 (elfNN_ia64_check_relocs): Support TLS relocs.
7112 (allocate_global_data_got): Account for TLS .got data.
7113 (allocate_dynrel_entries): Account for TLS dynamic relocations.
7114 (elfNN_ia64_install_value): Supprt TLS relocs.
7115 (set_got_entry): Support TLS relocs.
7116 (elfNN_ia64_relocate_section): Likewise.
7117
c62e1cc3
NC
71182002-05-23 Nick Clifton <nickc@cambridge.redhat.com>
7119
7120 * elf32-arm.h (elf32_arm_final_link_relocate): For the Thumb
7121 BLX reloc round the relocation up rather than down.
7122 * coff-arm.c (coff_arm_relocate_section): Likewise.
7123
c5a43a5d
L
71242002-05-21 H.J. Lu (hjl@gnu.org)
7125
7126 * linker.c (_bfd_generic_link_add_one_symbol): Allow multiple
7127 definition.
7128
afbe61cf
AM
71292002-05-22 Alan Modra <amodra@bigpond.net.au>
7130
7131 * elf64-ppc.c (ppc64_elf_size_stubs): Don't strip .branch_lt.
7132 (ppc64_elf_relocate_section): Handle unresolved relocs in opd.
7133
9c07fe7c
AM
71342002-05-22 Alan Modra <amodra@bigpond.net.au>
7135
7136 * elf64-ppc.c (ppc64_elf_relocate_section): Return false for
7137 unresolved relocs.
7138 (ppc64_elf_size_dynamic_sections): Check for splt NULL.
7139
21611032
TS
71402002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7141
c5cd6d62 7142 * bfd.c (bfd_get_arch_size): Remove bfd_set_error call for
21611032
TS
7143 non-ELF targets.
7144
41241523
TS
71452002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7146
7147 * elf-bfd.h (elf_backend_emit_relocs): Change prototype to return
7148 an error value.
7149 * elflink.h (elf_link_output_relocs): Likewise. Improve error message.
7150 return with false on error.
7151 (elf_link_input_bfd): Check reloc_emitter return value.
7152
658f2588
JT
71532002-05-21 Jason Thorpe <thorpej@wasabisystems.com>
7154
7155 * config.bfd (armeb-*-netbsdelf*): New target.
7156
c862ae31
AM
71572002-05-20 Alan Modra <amodra@bigpond.net.au>
7158
7159 * elf64-ppc.c (ppc_build_one_stub): Point undefined function syms
7160 at the plt call stub.
7161
6dd14845
TS
71622002-05-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7163
7164 * cpu-mips.c (mips_compatible): Don't try to check machine
7165 compatibility.
7166
a58d9c34
TR
71672002-05-18 Tom Rix <trix@redhat.com>
7168
9b5ecbd0 7169 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_out): Fix C_FILE auxent.
a58d9c34 7170
ef60b7ff
AM
71712002-05-17 Alan Modra <amodra@bigpond.net.au>
7172
7173 * elf64-ppc.c (ppc64_elf_info_to_howto): Formatting.
7174 (ppc64_elf_relocate_section): Don't warn about reloc overflow when
7175 we've already warned about an undefined symbol. Report more
7176 detail on reloc errors.
7177
a703a6ea
AM
71782002-05-17 Alan Modra <amodra@bigpond.net.au>
7179
7180 * acinclude.m4 (AM_INSTALL_LIBBFD): New.
7181 * configure.in: Invoke AM_INSTALL_LIBBFD.
7182 * Makefile.am (install-data-local): Revert 2002-05-13. Move to..
7183 (install_libbfd): .. New target.
7184 (uninstall_libbfd): Likewise.
7185 (install-bfdlibLTLIBRARIES): Likewise.
7186 (uninstall-bfdlibLTLIBRARIES): Likewise.
7187 (bfdlibdir): New.
7188 (bfdincludedir): New.
7189 (lib_LTLIBRARIES): Rename to bfdlib_LTLIBRARIES.
7190 * aclocal.m4: Regenerate.
7191 * configure: Regenerate.
7192 * Makefile.in: Regenerate.
7193
2c13d98b
NC
71942002-05-17 Stuart Balfour <sbalfour@cisco.com>
7195
7196 * hash.c (bfd_hash_lookup): Remove computation of len from inside
7197 hash loop.
7198
629936c5
NC
71992002-05-16 Nick Clifton <nickc@cambridge.redhat.com>
7200
7201 * config.bfd: Add targets for sh64-linux (little endian and
7202 big endian).
7203
e4cf60a8
NC
72042002-05-15 Laurent Pinchart <laurent.pinchart@skynet.be>
7205
7206 * peXXigen.c (pe_print_idata): Do not assume that the first thunk
7207 is located in the same section as the import table. Instead
7208 check, and if necessary load the section containing the thunk.
7209
d1e66cd4
NC
72102002-05-15 Nick Clifton <nickc@cambridge.redhat.com>
7211
7212 * aix5ppc-core.c (xcoff64_core_p): Replace bfd_read with
ea1e4b0d
AM
7213 bfd_bread.
7214 (xcoff64_core_file_matches_executable_p): Replace bfd_read
7215 with bfd_bread.
d1e66cd4 7216
2d653fc7
AM
72172002-05-15 Alan Modra <amodra@bigpond.net.au>
7218
7219 * aix5ppc-core.c: Warning fixes.
7220 * aout-adobe.c (aout_32_bfd_link_just_syms): Define.
7221 * aout-target.h (MY_bfd_link_just_syms): Define.
7222 * aout-tic30.c (MY_bfd_link_just_syms): Define.
7223 * bfd.c (bfd_link_just_syms): Define.
7224 * binary.c (binary_bfd_link_just_syms): Define.
7225 * bout.c (b_out_bfd_link_just_syms): Define.
7226 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update initializer.
7227 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
7228 * coffcode.h (coff_bfd_link_just_syms): Define.
7229 * elf-bfd.h (enum elf_link_info_type): Add ELF_INFO_TYPE_JUST_SYMS.
7230 (elf_discarded_section): Check for ELF_INFO_TYPE_JUST_SYMS.
7231 (_bfd_elf_link_just_syms): Declare.
7232 * elf.c (_bfd_elf_link_just_syms): New function.
7233 * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Check that
7234 sections haven't already been discarded by the linker.
7235 * elflink.h (elf_link_add_object_symbols): Likewise for stab
7236 sections and SEC_MERGE sections.
7237 (elf_bfd_discard_info): Similarly here.
7238 * elfxx-target.h (bfd_elfNN_bfd_link_just_syms): Define.
7239 * i386msdos.c (msdos_bfd_link_just_syms): Define.
7240 * i386os9k.c (os9k_bfd_link_just_syms): Define.
7241 * ieee.c (ieee_bfd_link_just_syms): Define.
7242 * ihex.c (ihex_bfd_link_just_syms): Define.
7243 * libbfd-in.h (_bfd_nolink_bfd_link_just_syms): Define.
7244 (_bfd_generic_link_just_syms): Declare.
7245 * libecoff.h (_bfd_ecoff_bfd_link_just_syms): Define.
7246 * linker.c (_bfd_generic_link_just_syms): New function.
7247 * mmo.c (mmo_bfd_link_just_syms): Define.
7248 * nlm-target.h (nlm_bfd_link_just_syms): Define.
7249 * oasys.c (oasys_bfd_link_just_syms): Define.
7250 * ppcboot.c (ppcboot_bfd_link_just_syms): Define.
7251 * som.c (som_bfd_link_just_syms): Define.
7252 * srec.c (srec_bfd_link_just_syms): Define.
7253 * targets.c (struct bfd_target): Add _bfd_link_just_syms.
7254 (BFD_JUMP_TABLE_LINK): And here.
7255 * tekhex.c (tekhex_bfd_link_just_syms): Define.
7256 * versados.c (versados_bfd_link_just_syms): Define.
7257 * vms.c (vms_bfd_link_just_syms): Define.
7258 * libbfd.h: Regenerate.
7259 * bfd-in2.h: Regenerate.
7260
cb7394f2
TS
72612002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7262
7263 * elf32-mips.c: Remove superfluous definitions copied from
7264 elfxx-mips.c.
7265 (bfd_elf32_bigmips_vec,bfd_elf32_littlemips_vec): Use the
7266 SGIish vectors to check the special case.
7267 (mips_elf_hi16_reloc): Fix comment.
7268 (mips_elf_got16_reloc): Likewise.
7269 (_bfd_mips_elf32_gprel16_reloc): Likewise.
7270 (elf_reloc_map): Code cleanup.
7271 (mips_reloc_map): Add comment.
7272 (bfd_elf23_bfd_reloc_type_lookup): Code cleanup.
7273 (mips_elf32_rtype_to_howto): Likewise.
7274 (mips_elf32_discard_info): Likewise.
7275 (elf32_mips_irix_compat): Invert logic: Only SGIish vectors
7276 lead to IRIX compatibility now.
7277
8dc1a139
TS
72782002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7279
7280 * elfxx-mips.c: Call it IRIX, not Irix in comments.
7281
2051e1b5
JT
72822002-05-13 Jason Thorpe <thorpej@wasabisystems.com>
7283
7284 * config.bfd (shle-*-netbsdelf*): Add target which includes
7285 sh64 support.
7286
83954261
AM
72872002-05-13 David Edelsohn <edelsohn@gnu.org>
7288
7289 * configure.in: Revert 2002-04-07. Instead, auto-configure
7290 HAVE_ST_C_IMPL.
7291 * configure: Regenerate.
7292 * config.in: Regenerate.
7293 * rs6000-core.c (CNEW_IMPL): Guard use of c_impl with HAVE_ST_C_IMPL
7294 or AIX_5_CORE.
7295
a9bf1154
NC
72962002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
7297
7298 * configure.in (sparc*-*-openbsd*): Support sparc64-openbsd
7299 corefiles as well.2
7300 * configure: Regenerate.
7301
3129eb7a
AM
73022002-05-13 Alan Modra <amodra@bigpond.net.au>
7303
7304 * Makefile.am (install-data-local): Install headers to
7305 $(exec_prefix)/include.
7306 * Makefile.in: Regenerate.
7307
a9a32010
DJ
73082002-05-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
7309 Daniel Jacobowitz <drow@mvista.com>
7310
7311 * coff-sh.c (sh_reloc_map): Map to R_SH_IMM32 for non-PE. Don't
7312 map BFD_RELOC_RVA.
7313
73142002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
690cc98b
NC
7315
7316 * config.bfd (alpha*-*-openbsd*, sparc64*-*-openbsd*,
7317 hppa*-*-openbsd*): New targets.
7318 * configure.in (alpha*-*-openbsd*): Set COREFILE.
7319 * configure: Regenerate.
7320
f1f0d9ab
TR
73212002-05-10 Tom Rix <trix@redhat.com>
7322
ea1e4b0d 7323 * coff64-rs6000.c (xcoff64_reloc_type_br): New function for
f1f0d9ab
TR
7324 xcoff64_ppc_relocate_section.
7325 * coff-rs6000.c : Extern common xcoff_reloc_type functions.
7326 * libxcoff.h: Common xcoff_reloc_type function declaration.
7327
c432ba1a
AM
73282002-05-10 Alan Modra <amodra@bigpond.net.au>
7329
16a10388 7330 * elf32-i386.c (elf_i386_relocate_section): Remove overflow checks
90937f86 7331 added in 2002-05-09 commit.
16a10388 7332
c432ba1a
AM
7333 * elf32-hppa.c (elf32_hppa_size_stubs): Revert part of 2002-05-04,
7334 don't look for stubs on all undefined syms.
7335
4a335f3d
AM
73362002-05-09 Alan Modra <amodra@bigpond.net.au>
7337
8fc39d5d
AM
7338 * elf64-ppc.c (RA_REGISTER_MASK, RA_REGISTER_SHIFT): Delete.
7339 (ppc64_elf_howto_raw <R_PPC64_RELATIVE>): Not pc_relative or
7340 pcrel_offset.
7341
4a335f3d
AM
7342 * elf32-i386.c (elf_howto_table): Comments.
7343 (elf_i386_relocate_section): Handle more relocs for relocatable
7344 linking and against SEC_MERGE sections.
7345
41fcb14e
AM
73462002-05-08 Alan Modra <amodra@bigpond.net.au>
7347
7348 * elf32-ppc.c (ppc_elf_create_got): New function.
7349 (ppc_elf_create_dynamic_sections): Call ppc_elf_create_got before
ea1e4b0d 7350 _bfd_elf_create_dynamic_sections. Correct .plt flags.
41fcb14e
AM
7351 (ppc_elf_check_relocs): Use ppc_elf_create_got in place of
7352 _bfd_elf_create_got_section.
7353
b491616a
AM
73542002-05-07 Alan Modra <amodra@bigpond.net.au>
7355
7356 * elf-bfd.h (struct elf_backend_data): Add rela_normal.
7357 * elfxx-target.h (elf_backend_rela_normal): Define.
7358 (elfNN_bed): Init rela_normal.
7359 * elflink.h (elf_link_input_bfd <emit_relocs>): Handle adjustment
7360 for section symbols here if rela_normal. Simplify abs section test.
7361 * elf-m10200.c (mn10200_elf_relocate_section): If relocatable,
7362 return immediately. Remove code handling relocatable linking.
7363 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
7364 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
7365 * elf32-i370.c (i370_elf_relocate_section): Likewise.
7366 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
7367 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
7368 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
7369 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
7370 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
7371 * elf32-s390.c (elf_s390_relocate_section): Likewise.
7372 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
7373 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
7374 * elf64-s390.c (elf_s390_relocate_section): Likewise.
7375 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
7376 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
7377 * elf32-arm.h (elf32_arm_relocate_section): Likewise #ifndef USE_REL.
7378 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
7379 * elf-m10200.c (elf_backend_rela_normal): Define.
7380 * elf-m10300.c (elf_backend_rela_normal): Define.
7381 * elf32-fr30.c (elf_backend_rela_normal): Define.
7382 * elf32-i370.c (elf_backend_rela_normal): Define.
7383 * elf32-i860.c (elf_backend_rela_normal): Define.
7384 * elf32-m68k.c (elf_backend_rela_normal): Define.
7385 * elf32-mcore.c (elf_backend_rela_normal): Define.
7386 * elf32-openrisc.c (elf_backend_rela_normal): Define.
7387 * elf32-ppc.c (elf_backend_rela_normal): Define.
7388 * elf32-s390.c (elf_backend_rela_normal): Define.
7389 * elf32-xstormy16.c (elf_backend_rela_normal): Define.
7390 * elf64-ppc.c (elf_backend_rela_normal): Define.
7391 * elf64-s390.c (elf_backend_rela_normal): Define.
7392 * elf64-x86-64.c (elf_backend_rela_normal): Define.
7393 * elfxx-ia64.c (elf_backend_rela_normal): Define.
7394 * elf32-arm.h (elf_backend_rela_normal): Define #ifndef USE_REL.
7395 * elf32-m32r.c (elf_backend_rela_normal): Likewise.
7396
df212a7e
NC
73972002-05-06 Nick Clifton <nickc@cambridge.redhat.com>
7398
7399 * elf32-arm.h (elf32_arm_final_link_relocate): Convert
7400 'reloc_signed_max' and 'reloc_signed_min' into half-word offsets.
7401
3decf53c
AM
74022002-05-06 Alan Modra <amodra@bigpond.net.au>
7403
7404 * elflink.h (elf_link_input_bfd <emit_relocs>): Adjust r_offset
7405 when not relocatable. Fix reloc_emitter call for K&R.
7406
f46c2da6
AM
74072002-05-04 Alan Modra <amodra@bigpond.net.au>
7408
7409 * elf64-ppc.c (ppc64_elf_relocate_section): Reinstate code
7410 reloading local sym addend mistakenly removed in 2002-05-01 change.
7411
7412 * dwarf2.c (struct line_head): Make prologue_length a bfd_vma.
7413 (read_abbrevs): Change "offset" param to bfd_vma.
7414 (parse_comp_unit): Change "version" and addr_size to unsigned ints.
7415 Change "abbrev_offset" to bfd_vma.
7416 (read_indirect_string): Use correct conversion chars in error
7417 message format string, cast bfd_vma's to unsigned long.
7418 (read_abbrevs): Likewise.
7419 (read_attribute_value): Likewise.
7420 (decode_line_info): Likewise.
7421 (scan_unit_for_functions): Likewise.
7422 (parse_comp_unit): Likewise.
7423
59862849
TR
74242002-05-04 Tom Rix <trix@redhat.com>
7425
7426 * coffswap.h (coff_swap_reloc_in): Remove XCOFF support.
7427 (coff_swap_reloc_out): Same.
7428 * coff-rs6000.c: (xcoff_swap_reloc_in): Moved from coffswap.h.
7429 (xcoff_swap_reloc_out): Same.
7430 (xcoff_rtype2howto): Renamed from _bfd_xcoff_rtype2howto. Special
7431 case some 16 bit relocs. Add reloc value to output.
7432 (xcoff_howto_table): Remove 64 bit R_POS, add 16 bit
ea1e4b0d 7433 R_RBR. Improve names.
59862849
TR
7434 (_bfd_xcoff_reloc_type_lookup): Adjust for removal of 64 bit R_POS.
7435 (bfd_xcoff_backend_data): Update with new reloc swap names.
7436 (bfd_pmac_xcoff_backend_data) : Same.
7437 * coff64-rs6000.c: (xcoff64_swap_reloc_in): Moved from coffswap.h.
7438 (xcoff64_swap_reloc_out): Same.
ea1e4b0d 7439 (xcoff64_rtype2howto): Special case some 16 bit relocs and 32 bit
59862849 7440 R_POS. Add reloc value to output.
ea1e4b0d
AM
7441 (xcoff64_howto_table): Move 64 bit R_POS to first entry. Add 16
7442 bit R_RBR. Improve names, masks.
59862849
TR
7443 (xcoff64_reloc_type_lookup): Adjust for move of 64 bit R_POS.
7444 (bfd_xcoff_backend_data): Update with new reloc swap names.
7445 (bfd_xcoff_aix5_backend_data) : Same.
7446
b4655ea9
AM
74472002-05-04 Alan Modra <amodra@bigpond.net.au>
7448
7449 * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add
7450 bfd_count top_index, input_list, all_local_syms.
7451 (elf32_hppa_setup_section_lists): New function, split from
7452 elf32_hppa_size_stubs.
7453 (elf32_hppa_next_input_section): Likewise.
7454 (group_sections): Likewise.
7455 (get_local_syms): Likewise.
7456 (elf32_hppa_size_stubs): Adjust for split out functions. Look for
7457 stubs on undefined syms too.
7458 (elf32_hppa_set_gp): Use bfd_link_hash* instead of elf_link_hash*.
8fc39d5d 7459 Only access htab elf fields when we have an elf hash table.
b4655ea9
AM
7460 * elf32-hppa.h (elf32_hppa_setup_section_lists): Declare.
7461 (elf32_hppa_next_input_section): Declare.
7462
301e3139
AM
74632002-05-04 Bob Byrnes <byrnes@curl.com>
7464
7465 * opncls.c (_bfd_new_bfd_contained_in): Check return value of
7466 _bfd_new_bfd.
7467
7c5fcef7
L
74682002-05-03 H.J. Lu (hjl@gnu.org)
7469
7470 * elfxx-mips.c (mips_elf_link_hash_entry): Add forced_local.
7471 (mips_elf_link_hash_newfunc): Initialize forced_local to false.
7472 (mips_elf_record_global_got_symbol): Call _bfd_mips_elf_hide_symbol
7473 to hide a global symbol.
7474 (_bfd_mips_elf_hide_symbol): Return if forced_local is true. Set
ea1e4b0d 7475 forced_local to true.
7c5fcef7 7476
84de6048
RH
74772002-05-02 Richard Henderson <rth@redhat.com>
7478
7479 * elf64-alpha.c (elf64_alpha_relocate_section): Force relative relocs
7480 vs SHN_UNDEF to zero.
7481
805fc799
AM
74822002-05-02 Alan Modra <amodra@bigpond.net.au>
7483
c061c2d8
AM
7484 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_SECTOFF>): Change to a
7485 16 bit reloc.
7486 <R_PPC64_SECTOFF_DS>: Likewise.
7487 (ppc64_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
7488 SECTOFF reloc.
7489 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_SECTOFF>): Correct.
7490 (ppc_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
7491 SECTOFF reloc.
7492
805fc799
AM
7493 * elf64-ppc.c (ppc64_elf_addr16_ha_reloc): Delete.
7494 (ppc64_elf_ha_reloc): New function.
7495 (ppc64_elf_brtaken_reloc): New function.
7496 (ppc64_elf_sectoff_reloc): New function.
7497 (ppc64_elf_sectoff_ha_reloc): New function.
7498 (ppc64_elf_toc_reloc): New function.
7499 (ppc64_elf_toc_ha_reloc): New function.
7500 (ppc64_elf_toc64_reloc): New function.
7501 (ppc64_elf_unhandled_reloc): New function.
7502 (ppc64_elf_howto_raw): Use the above.
7503 <R_PPC64_RELATIVE>: Mark pc_relative, pcrel_offset.
7504 <R_PPC64_SECTOFF>: Not pc_relative or pcrel_offset. Fix dst_mask.
7505 <R_PPC64_SECTOFF_DS>: Likewise.
7506 (IS_ABSOLUTE_RELOC): Update.
7507 (struct ppc_link_hash_table): Add have_undefweak.
7508 (ppc64_elf_link_hash_table_create): Init.
7509 (func_desc_adjust): Set have_undefweak.
7510 (ppc64_elf_func_desc_adjust): Call func_desc_adjust earlier. Only
7511 add the .sfpr blr when have_undefweak.
7512 (ppc64_elf_setup_section_lists): Check hash table flavour.
7513 (ppc64_elf_next_input_section): Move output_section->owner test to
7514 ppc64elf.em.
7515 (ppc64_elf_set_toc): Rename to ppc64_elf_toc, remove info param
7516 and relocatable test. Return TOCstart and don't set elf_gp.
7517 (ppc64_elf_relocate_section): Correct BRTAKEN/BRNTAKEN branch
7518 offset calculation. Add assert on weak sym branch tweaks.
7519 * elf64-ppc.h (ppc64_elf_set_toc): Delete.
7520 (ppc64_elf_toc): Declare.
7521 (ppc64_elf_next_input_section): Update.
ea1e4b0d 7522
818c39a3
AM
75232002-05-01 Alan Modra <amodra@bigpond.net.au>
7524
7525 * syms.c (_bfd_stab_section_find_nearest_line): Don't bomb on NULL
7526 file_name.
7527
721956f4
AM
75282002-05-01 Alan Modra <amodra@bigpond.net.au>
7529
7530 * elf64-ppc.c (CROR_151515, CROR_313131): Define.
7531 (ppc64_elf_relocate_section): Use them. Don't look for plt calls
7532 on R_PPC64_ADDR24 relocs. Require a nop or no link reg on plt
7533 call branches. Correct undefined weak destination.
7534 (ppc64_elf_func_desc_adjust): Always create at least one blr in
7535 .sfpr, and correct case where either only savef* or restf* is
7536 needed.
7537
7538 Long branch stubs, multiple stub sections.
7539 * elf64-ppc.h (ppc64_elf_setup_section_lists): Declare.
7540 (ppc64_elf_next_input_section): Declare.
7541 * elf64-ppc.c: Move linker-only prototypes.
7542 (STUB_SUFFIX): Define.
7543 (enum ppc_stub_type): New.
7544 (struct ppc_stub_hash_entry): New.
7545 (struct ppc_branch_hash_entry): New.
7546 (struct ppc_link_hash_entry): Add stub_cache, oh.
7547 (struct ppc_link_hash_table): Add stub_hash_table etc. Remove
7548 sstub. Add sbrlt, srelbrlt, has_14bit_branch, stub_iteration.
7549 Rename plt_overflow to stub_error.
7550 (ppc_stub_hash_lookup): Define.
7551 (ppc_branch_hash_lookup): Define.
7552 (stub_hash_newfunc): New function.
7553 (branch_hash_newfunc): New function.
7554 (link_hash_newfunc): Init new fields.
7555 (ppc64_elf_link_hash_table_create): Likewise.
7556 (ppc64_elf_link_hash_table_free): New function.
7557 (ppc_stub_name): New function.
7558 (ppc_get_stub_entry): New function.
7559 (ppc_add_stub): New function.
7560 (create_linkage_sections): Use bfd_make_section_anyway. Create
7561 .branch_lt and .rela.branch_lt sections. Don't create .stub.
7562 (ppc64_elf_check_relocs): Set has_14bit_branch on R_PPC64_REL14*,
7563 and set up for plt call stubs. Link func and func desc syms.
7564 (ppc64_elf_gc_sweep_hook): Handle REL14* as per REL24.
7565 (func_desc_adjust): Avoid hash lookup when func desc sym available
7566 via shortcut, and set links when processing.
7567 (ppc64_elf_hide_symbol): Likewise.
7568 (allocate_dynrelocs): Don't allocate stub section here.
7569 (ppc64_elf_size_dynamic_sections): Handle sbrlt and srelbrlt.
7570 Remove sstub code.
7571 (ppc_type_of_stub): New function.
7572 (build_one_stub): Delete.
7573 (ppc_build_one_stub): New function.
7574 (ppc_size_one_stub): New function.
7575 (ppc64_elf_setup_section_lists): New function.
7576 (ppc64_elf_next_input_section): New function.
7577 (group_sections): New function.
7578 (get_local_syms): New function.
7579 (ppc64_elf_size_stubs): Rewrite.
7580 (ppc64_elf_build_stubs): Rewrite.
7581 (ppc64_elf_relocate_section): Look up stub entry for REL24
7582 relocs. Don't propagate REL14* to dynamic objects. Look for long
7583 branch stubs if REL14* or REL24 relocs won't reach.
7584 (bfd_elf64_bfd_link_hash_table_free): Define.
7585
09c2219b
MM
75862002-04-30 Mark Mitchell <mark@codesourcery.com>
7587
c5cd6d62 7588 * config.bfd: Add support for powerpc-*-windiss.
09c2219b 7589
07b678c0
TR
75902002-04-30 Tom Rix <trix@redhat.com>
7591
7592 * xcofflink.c (xcoff_link_add_symbols): Always copy undef C_EXT
7593 symbol names into the hash table.
7594
dbe341c6
TR
75952002-04-28 Tom Rix <trix@redhat.com>
7596
7597 * coff-rs6000.c (xcoff_calculate_relocation) : Function table for
ea1e4b0d 7598 calulating relocations.
dbe341c6 7599 (xcoff_complain_overflow) : Function table for relocation errors.
ea1e4b0d
AM
7600 (xcoff_ppc_relocate_section): Use relocation and complain function
7601 tables.
7602 (xcoff_complain_overflow_unsigned_func): New complain function.
dbe341c6
TR
7603 (xcoff_complain_overflow_signed_func): Same.
7604 (xcoff_complain_overflow_bitfield_func): Same.
7605 (xcoff_complain_overflow_dont_func): Same.
7606 (xcoff_reloc_type_crel): New recot function.
7607 (xcoff_reloc_type_br): Same.
7608 (xcoff_reloc_type_ba): Same.
7609 (xcoff_reloc_type_toc): Same.
7610 (xcoff_reloc_type_rel): Same.
7611 (xcoff_reloc_type_neg): Same.
7612 (xcoff_reloc_type_pos): Same.
7613 (xcoff_reloc_type_fail): Same.
7614 (xcoff_reloc_type_noop): Same.
7615 * libxcoff.h : Declare common parts for xcoff64.
7616 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Use relocation
ea1e4b0d 7617 and complain function tables.
dbe341c6 7618
985142a4
AM
76192002-04-28 Alan Modra <amodra@bigpond.net.au>
7620
7621 * elf64-x86-64.c (struct elf64_x86_64_dyn_relocs): Comment typo.
7622 * elf32-hppa.c (elf32_hppa_final_link): Formatting.
7623
eba91044
AM
76242002-04-26 Alan Modra <amodra@bigpond.net.au>
7625
e54fdaa5
AM
7626 * opncls.c (bfd_make_readable): Call bfd_section_list_clear.
7627 * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
7628
a50c1845
AM
7629 * elflink.h (elf_bfd_final_link): Ensure input bfd class is the
7630 same as the output before calling elf_link_input_bfd.
7631
eba91044
AM
7632 * coffcode.h (coff_compute_section_file_positions): Set
7633 section_tail after shuffling section list.
7634
3c25c5f6
NC
76352002-04-24 Christian Groessler <chris@groessler.org>
7636
7637 * coff-z8k.c (extra_case): Fix R_IMM32 relocations: The
7638 addresses are 23bit with a special layout, not plain 32bit
7639 values. Prevent relocation of immediate values.
7640
40d32fc6
CD
76412002-04-24 Chris G. Demetriou <cgd@broadcom.com>
7642
7643 * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): If MDMX or
7644 MIPS-16 ASE flags are set, print something to indicate that.
7645
067fa4a6
AM
76462002-04-23 Alan Modra <amodra@bigpond.net.au>
7647
7648 * elf32-hppa.c (hppa_type_of_stub): Correct and simplify condition
7649 under which a plt call stub is used.
7650 (final_link_relocate): Similarly.
7651 (allocate_plt_static): Clear h-plabel except when plt entry is
7652 exclusively used for a plabel.
7653 (allocate_dynrelocs): Use the above to simplify plt sizing.
7654 (struct elf32_hppa_link_hash_table): Add has_22bit_branch.
7655 (elf32_hppa_link_hash_table_create): Init.
7656 (BL22_RP): Define.
7657 (hppa_build_one_stub): Use BL22_RP if has_22bit_branch.
7658 (elf32_hppa_check_relocs): Set has_22bit_branch.
7659
7660 * elf32-hppa.c (elf32_hppa_check_relocs): Remove debug message.
7661 (final_link_relocate): Likewise.
7662
af40ce3c
JJ
76632002-04-22 Jakub Jelinek <jakub@redhat.com>
7664
7665 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't build
7666 search table if some FDE is DW_EH_PE_aligned encoded either.
7667 (_bfd_elf_write_section_eh_frame): Handle terminating FDE specially.
7668
09ae86c2
JJ
76692002-04-22 Richard Smith <richard@ex-parrot.com>
7670 Jakub Jelinek <jakub@redhat.com>
7671
7672 * elf-eh-frame.c (struct eh_cie_fde): Add per_encoding_relative.
7673 (_bfd_elf_discard_section_eh_frame): Set it for CIEs with pcrel
7674 encoded personality.
7675 (_bfd_elf_write_section_eh_frame): Adjust pcrel encoded personality
7676 for CIE/FDE removal.
7677
deeb2cd7
TR
76782002-04-20 Tom Rix <trix@redhat.com>
7679
7680 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Fix C_FILE auxent.
7681
99dc0092
AM
76822002-04-20 Alan Modra <amodra@bigpond.net.au>
7683
aa3d5824
AM
7684 * archures.c (bfd_lookup_arch): Move the list order comment..
7685 (struct bfd_arch_info): ..to where it belongs.
7686 * bfd-in2.h: Regenerate.
7687
99dc0092
AM
7688 * archures.c (bfd_lookup_arch): Add comment on list order.
7689 (bfd_default_set_arch_mach): Use bfd_lookup_arch.
7690 * cpu-powerpc.c (bfd_powerpc_archs): Re-order so that the default
7691 is always at head of list.
7692
7831a775
NC
76932002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
7694
7695 * coff-arm.c (coff_thumb_pcrel_12, coff_thumb_pcrel_9,
7696 insert_thumb_branch, record_thumb_to_arm_glue): Suppress
7697 definition of these functions for ARM_WINCE builds as they are
7698 not used.
ea1e4b0d 7699 (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET): Do not define
7831a775
NC
7700 for ARM_WINCE builds.
7701
77022002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
7703
ea1e4b0d 7704 * coff-arm.c (bfd_arm_process_before_allocation):
7831a775
NC
7705
77062002-04-17 J"orn Rennecke <joern.rennecke@superh.com>
a44d7f9c
JR
7707
7708 * cpu-sh.c (scan_mach): Delete.
7709 (arch_info_struct): Replace scan_mach with bfd_default_scan.
7710 (bfd_sh_arch): Likewise.
7711
3d8dbe36
NC
77122002-04-16 Nick Clifton <nickc@cambridge.redhat.com>
7713
7714 * ihex.c (ihex_write_object_contents): Fix check for records
7715 crossing 64K boundaries.
7716
4ab82700
AM
77172002-04-16 Alan Modra <amodra@bigpond.net.au>
7718
7719 * elf32-m32r.c (m32r_elf_add_symbol_hook): Check the hash table
7720 type rather than just assuming entries are ELF.
7721 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
7722 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
7723 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Likewise.
7724 * elf64-mmix.c (mmix_elf_add_symbol_hook): Use bfd_link_hash_entry
7725 rather than elf_link_hash_entry.
7726
036fe0fe
RH
77272002-04-15 Richard Henderson <rth@redhat.com>
7728
7729 * elf32-mips.c (mips_elf32_object_p): Revert 0404 fragment: allow
7730 n32 binaries.
7731
c4f3d130
NC
77322002-04-15 Michael Snyder <msnyder@redhat.com>
7733
7734 * opncls.c (bfd_close): Write contents if writeable.
7735 Minor formatting tidy-ups.
7736
4ab82700 77372002-04-15 Alan Modra <amodra@bigpond.net.au>
27242387
AM
7738
7739 * elf32-ppc.c (ppc_elf_add_symbol_hook): Check the hash table type.
7740
0c04d169
MS
77412002-04-12 Michael Snyder <msnyder@redhat.com>
7742
7743 * bfd-in.h (bfd_get_section_lma): New access macro.
7744 Minor white-space fix-up.
7745
89d4966f
AM
77462002-04-12 Alan Modra <amodra@bigpond.net.au>
7747
7748 * elf.c (prep_headers): Don't zero EI_OSABI, EI_ABIVERSION or
7749 header pad.
7750
8d0da3c2
DD
77512002-04-09 DJ Delorie <dj@redhat.com>
7752
7753 * elfarm-nabi.c (elf32_arm_howto_table): Fix ABS16 masks.
7754
05793179
NC
77552002-04-09 Casper S. Hornstrup <chorns@users.sourceforge.net>
7756
7757 * coffcode.h (coff_read_word): New.
7758 (coff_compute_checksum): New.
7759 (coff_apply_checksum): New.
7760 (coff_write_object_contents): Call coff_apply_checksum () to
7761 apply checksum to PE image.
7762
46fe4e66
AM
77632002-04-08 Randolph Chung <tausq@debian.org>
7764
7765 * elf32-hppa.c (hppa_unwind_entry_compare): Move to elf-hppa.h.
7766 (elf32_hppa_final_link): Split out sorting logic to..
7767 * elf-hppa.h (elf_hppa_sort_unwind): ..here.
7768 (elf_hppa_final_link): Call elf_hppa_sort_unwind.
7769
3b5b409c
AC
77702002-04-07 Andrew Cagney <ac131313@redhat.com>
7771
7772 * configure.in: Add missing ``|'' to powerpc-*-aix4.[4-9]*
7773 pattern.
7774 * configure: Re-generate.
7775
ac7b6ceb
AC
77762002-04-07 Andrew Cagney <ac131313@redhat.com>
7777
7778 * configure.in: Only define AIX_CORE_DUMPX_CORE when AIX version
7779 is greater or equal to 4.3.3.
7780 * configure: Regenerate.
7781 Fix PR gdb/344.
7782
44aa49bb
HPN
77832002-04-05 Hans-Peter Nilsson <hp@axis.com>
7784
7785 * elf32-cris.c (cris_elf_howto_table) <R_CRIS_16_PCREL,
7786 R_CRIS_32_PCREL>: Fix typo in name.
7787 (cris_elf_check_relocs): Always create .rela.got here when
7788 R_CRIS_16_GOTPLT or R_CRIS_32_GOTPLT is seen.
7789 (elf_cris_adjust_gotplt_to_got): Don't create .rela.got here;
7790 assume it's created.
7791
e2d34d7d
DJ
77922002-04-04 Daniel Jacobowitz <drow@mvista.com>
7793
7794 * aout-adobe.c (aout_32_bfd_link_hash_table_free): Define.
7795 * aout-target.h (MY_bfd_link_hash_table_free): Conditionally
7796 define.
7797 * aout-tic30.c (MY_bfd_link_hash_table_free): Likewise.
7798 * bfd.c (bfd_link_hash_table_free): Define.
7799 * binary.c (binary_bfd_link_hash_table_free): Define.
7800 * bout.c (b_out_bfd_link_hash_table_free): Define.
7801 * coff-rs6000.c (rs6000coff_vec): Include
7802 _bfd_generic_link_hash_table_free.
7803 (pmac_xcoff_vec): Likewise.
7804 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
7805 (aix5coff64_vec): Likewise.
7806 * coffcode.h (coff_bfd_link_hash_table_free): Conditionally define.
7807 * elf-m10300.c (elf32_mn10300_link_hash_table_free): New function.
7808 (bfd_elf32_bfd_link_hash_table_free): Define.
7809 * elf32-hppa.c (elf32_hppa_link_hash_table_free): New function.
7810 (bfd_elf32_bfd_link_hash_table_free): Define.
7811 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Conditionally
7812 define.
7813 * i386msdos.c (msdos_bfd_link_hash_table_free): Define.
7814 * i386os9k.c (os9k_bfd_link_hash_table_free): Define.
7815 * ieee.c (ieee_bfd_link_hash_table_free): Define.
7816 * ihex.c (ihex_bfd_link_hash_table_free): Define.
7817 * libbfd-in.h (_bfd_nolink_bfd_link_hash_table_free): Define.
7818 (_bfd_generic_link_hash_table_free): Add prototype.
7819 * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Add prototype.
7820 * libecoff.h (_bfd_ecoff_bfd_link_hash_table_free): Define.
7821 * linker.c (_bfd_generic_link_hash_table_free): New function.
7822 * mmo.c (mmo_bfd_link_hash_table_free): Define.
7823 * nlm-target.h (nlm_bfd_link_hash_table_free): Define.
7824 * oasys.c (oasys_bfd_link_hash_table_free): Define.
7825 * ppcboot.c (ppcboot_bfd_link_hash_table_free): Define.
7826 * som.c (som_bfd_link_hash_table_free): Define.
7827 * srec.c (srec_bfd_link_hash_table_free): Define.
7828 * tekhex.c (tekhex_bfd_link_hash_table_free): Define.
7829 * versados.c (versados_bfd_link_hash_table_free): Define.
7830 * vms.c (vms_bfd_link_hash_table_free): New function.
7831 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_free): New function.
7832
7833 * coff-arm.c (coff_arm_link_hash_table_create): Use bfd_malloc
7834 instead of bfd_alloc.
7835 * coff-h8300.c (h8300_coff_link_hash_table_create): Likewise.
7836 * coff-mcore.c (coff_mcore_link_hash_table_create): Likewise.
7837 * coff-ppc.c (ppc_coff_link_hash_table_create): Likewise.
7838 * cofflink.c (_bfd_coff_link_hash_table_create): Likewise.
7839 * ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
7840 * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise.
7841 * elf.c (_bfd_elf_link_hash_table_create): Likewise.
7842 * elf32-arm.h (elf32_arm_link_hash_table_create): Likewise.
7843 * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
7844 * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise.
7845 * elf32-i386.c (elf_i386_link_hash_table_create): Likewise.
7846 * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
7847 * elf32-s390.c (elf_s390_link_hash_table_create): Likewise.
7848 * elf32-sh.c (sh_elf_link_hash_table_create): Likewise.
7849 * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create): Likewise.
7850 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
7851 * elf64-s390.c (elf_s390_link_hash_table_create): Likewise.
7852 * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise.
7853 * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create): Likewise.
7854 * elf64-x86-64.c (elf64_x86_64_link_hash_table_create): Likewise.
7855 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
7856 * linker.c (_bfd_generic_link_hash_table_create): Likewise.
7857 * m68klinux.c (linux_link_hash_table_create): Likewise.
7858 * sparclinux.c (linux_link_hash_table_create): Likewise.
7859 * sunos.c (sunos_link_hash_table_create): Likewise.
7860 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise.
7861
7862 * targets.c: Add _bfd_link_hash_table_free to xvec.
7863
7864 * bfd-in2.h: Regenerate.
7865 * libbfd.h: Regenerate.
7866 * libcoff.h: Regenerate.
7867
830629ab
AM
78682002-04-04 Alan Modra <amodra@bigpond.net.au>
7869
7870 * dep-in.sed: Cope with absolute paths.
7871 * Makefile.am (dep.sed): Subst TOPDIR, and not INCDIR.
7872 Run "make dep-am".
7873 * Makefile.in: Regenerate.
7874 * coff-arm.c: Fix copyright date.
7875 * cpu-h8300.c: Likewise.
7876 * cpu-i370.c: Likewise.
7877 * cpu-s390.c: Likewise.
7878 * cpu-mips.c: Likewise.
7879 * po/SRC-POTFILES.in: Regenerate.
7880
c6e90b02
TS
78812002-04-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7882
7883 * Makefile.am: Add elfxx-mips.c to the known backends.
7884 (elf32-mips.lo): remove dependency to coff/external.h.
7885 * Makefile.in: Regenerate.
7886 * configure.in: Add elfxx-mips.lo to all vectors using elf32-mips.lo
7887 Remove elf32-mips.lo from 64 bit vectors. Update dependencies
7888 accordingly.
7889 * configure: Regenerate.
7890 * elf-bfd.h: Move all MIPS ELF specific prototypes to elfxx-mips.h.
7891 (irix_compat_t): IRIX compatibility level, moved from elf32-mips.c.
7892 (elf_backend_mips_irix_compat, elf_backend_mips_rtype_to_howto): New
7893 MIPS specific backend functions.
7894 * elf32-mips.c: Moved most code to elfxx-mips.c.
7895 (mips_elf_hi16_reloc): Rename from _bfd_mips_elf_hi16_reloc and make
7896 static.
7897 (mips_elf_lo16_reloc): Likewise, was _bfd_mips_elf_lo16_reloc.
7898 (mips_elf_got16_reloc): Likewise, was _bfd_mips_elf_got16_reloc.
7899 (mips_elf_gprel32_reloc): Likewise, was _bfd_mips_elf_gprel32_reloc.
7900 (mips_elf32_rtype_to_howto): Rename from mips_rtype_to_howto. Changed
7901 interface to allow selection of the right REL or RELA howto table.
7902 (mips_elf32_object_p): Rename from _bfd_mips_elf_object_p and made
7903 static. Let it refuse n32 objects.
7904 (elf32_mips_grok_prstatus): Rename from _bfd_elf32_mips_grok_prstatus.
7905 (elf32_mips_grok_psinfo): Rename from _bfd_elf32_mips_grok_psinfo.
7906 (elf32_mips_discard_info): Rename from _bfd_elf32_mips_discard_info.
7907 (elf32_mips_ignore_discarded_relocs): Rename from
7908 _bfd_elf32_mips_ignore_discarded_relocs.
7909 (elf32_mips_write_section): Rename from _bfd_elf32_mips_write_section.
7910 (elf32_mips_irix_compat): New function, replaces IRIX_COMPAT.
7911 (elf_mips_howto_table_rela): Remove.
7912 * elf64-mips.c: Moved most code to elfxx-mips.c.
7913 (bfd_elf64_bfd_reloc_type_lookup): Make static.
7914 (mips_elf64_rtype_to_howto): New function.
7915 (mips_elf64_object_p): Likewise.
7916 (elf64_mips_irix_compat): Likewise.
7917 * elfxx-mips.c: New file containing common code merged together from
7918 elf32-mips.c and elf64-mips.c.
7919 * elfxx-mips.h: New file containing MIPS specific prototypes from
7920 elf-bfd.h.
7921 * elfxx-target.h: Add handling for elf_backend_mips_irix_compat and
7922 elf_backend_mips_rtype_to_howto.
7923
d8dce692
AM
79242002-04-04 Alan Modra <amodra@bigpond.net.au>
7925
7926 * srec.c (MAXCHUNK, Chunk): Revise comments.
7927 (srec_write_record): Correct buffer size.
7928 (srec_write_header): Do without intermediate buffer.
7929 (srec_write_section): Validate Chunk.
7930 (srec_write_terminator): Pass NULL instead of dummy buffer.
7931 (srec_write_symbols): Pass file and symbol names directly to
7932 bfd_bwrite so sprintf won't overflow buffer.
7933
b88a866a
JJ
79342002-04-03 Jakub Jelinek <jakub@redhat.com>
7935
7936 * elf32-sparc.c (elf32_sparc_relocate_section): Don't emit dynamic
7937 PC relative relocs against hidden symbols.
7938 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7939
d7866f04
AM
79402002-04-03 Alan Modra <amodra@bigpond.net.au>
7941
7942 * elf.c (_bfd_elf_make_section_from_shdr): When setting section
7943 LMAs, loop over segments until p_vaddr and p_memsz specify an
7944 extent enclosing the section.
7945
9e81ee67
NC
79462002-04-02 Nick Clifton <nickc@cambridge.redhat.com>
7947
7948 * ihex.c (ihex_write_object_contents): Do not allow records to
7949 cross a 64K boundary - wrap if necessary.
7950
d2b64500
JT
79512002-04-01 Nathan Williams <nathanw@wasabisystems.com>
7952
7953 * elf.c (elfcore_netbsd_get_lwpid): Fix off-by-one error
7954 which caused the returned LWP ID to always be 0.
7955
e36f7d53
RH
79562002-04-01 Richard Henderson <rth@redhat.com>
7957
7958 * elf32-sparc.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
7959 (elf32_sparc_relocate_section): Use it to figure out when to
7960 initialize .got entries.
7961 * elf64-sparc.c: Similarly.
7962
e92d460e
AM
79632002-03-28 Alan Modra <amodra@bigpond.net.au>
7964
7965 * linker.c (link_action): Ignore duplicate warning syms.
7966 (_bfd_generic_link_write_global_symbol): Follow warning symbol link.
7967 * elflink.h (elf_adjust_dynstr_offsets): Likewise.
7968 (elf_adjust_dynamic_symbol): Likewise.
7969 (elf_export_symbol): Likewise.
7970 (elf_link_find_version_dependencies): Likewise.
7971 (elf_link_assign_sym_version): Likewise.
7972 (elf_link_sec_merge_syms): Likewise.
7973 (elf_link_output_extsym): Likewise.
7974 (elf_gc_sweep_symbol): Likewise.
7975 (elf_gc_propagate_vtable_entries_used): Likewise.
7976 (elf_gc_smash_unused_vtentry_relocs): Likewise.
7977 (elf_gc_allocate_got_offsets): Likewise.
7978 (elf_collect_hash_codes): Likewise.
7979 * elflink.c (elf_link_renumber_hash_table_dynsyms): Likewise.
7980 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
7981 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
7982 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
7983 * elf32-arm.h (elf32_arm_discard_copies): Likewise.
7984 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Likewise.
7985 (elf_cris_discard_excess_dso_dynamics): Likewise.
7986 * elf32-hppa.c (clobber_millicode_symbols): Likewise.
7987 (mark_PIC_calls): Likewise.
7988 (allocate_plt_static): Likewise.
7989 (allocate_dynrelocs): Likewise.
7990 (readonly_dynrelocs): Likewise.
7991 * elf32-i386.c (allocate_dynrelocs): Likewise.
7992 (readonly_dynrelocs): Likewise.
7993 * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
7994 * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
7995 * elf32-mips.c (mips_elf_output_extsym): Likewise.
7996 (mips_elf_sort_hash_table_f): Likewise.
7997 (mips_elf_check_mips16_stubs): Likewise.
7998 * elf32-s390.c (allocate_dynrelocs): Likewise.
7999 (readonly_dynrelocs): Likewise.
8000 * elf32-sh.c (sh_elf_discard_copies): Likewise.
8001 * elf32-xstormy16.c (xstormy16_relax_plt_check): Likewise.
8002 (xstormy16_relax_plt_realloc): Likewise.
8003 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
8004 (elf64_alpha_output_extsym): Likewise.
8005 * elf64-hppa.c (elf64_hppa_mark_exported_functions): Likewise.
8006 * elf64-mips.c (mips_elf64_sort_hash_table_f): Likewise.
8007 (mips_elf64_check_mips16_stubs): Likewise.
8008 (mips_elf64_output_extsym): Likewise.
8009 * elf64-ppc.c (func_desc_adjust): Likewise.
8010 (allocate_dynrelocs): Likewise.
8011 (readonly_dynrelocs): Likewise.
8012 * elf64-s390.c (allocate_dynrelocs): Likewise.
8013 (readonly_dynrelocs): Likewise.
8014 * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
8015 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
8016 (readonly_dynrelocs): Likewise.
8017 * elfxx-ia64.c (elfNN_ia64_global_dyn_sym_thunk): Likewise.
8018 * aoutx.h (aout_link_write_other_symbol): Likewise.
8019 * cofflink.c (_bfd_coff_write_task_globals): Likewise.
8020 (_bfd_coff_write_global_sym): Likewise.
8021 * i386linux.c (linux_tally_symbols): Likewise.
8022 * m68klinux.c (linux_tally_symbols): Likewise.
8023 * sparclinux.c (linux_tally_symbols): Likewise.
8024 * pdp11.c (aout_link_write_other_symbol): Likewise.
8025 * sunos.c (sunos_scan_dynamic_symbol): Likewise.
8026 * xcofflink.c (xcoff_build_ldsyms): Likewise.
8027 (xcoff_write_global_symbol): Likewise.
8028
8029 * cofflink.c (_bfd_coff_final_link): Formatting.
8030 * cpu-mips.c (mips_compatible): Make static, prototype.
8031 * elf32-i386.c (elf_i386_check_relocs): Formatting.
8032 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
8033 * elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
8034 * elf64-mips.c (mips_elf64_sort_hash_table): Likewise.
8035 (mips_elf64_final_link): Likewise.
8036 * elflink.h (elf_link_find_version_dependencies): Remove duplicate
8037 prototype.
8038
2106126f
NC
80392002-03-27 Nick Clifton <nickc@cambridge.redhat.com>
8040
8041 * coff-arm.c (SWAP_IN_RELOC_OFFSET): Define.
8042 (SWAP_OUT_RELOC_OFFSET): Define.
8043
b99d1833
AM
80442002-03-27 Gregory Steuck <greg@nest.cx>
8045
8046 * elf.c (_bfd_elf_get_symtab_upper_bound): Leave space for
8047 terminating NULL if empty symbol table.
8048 (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise.
8049
ad43ed4c
L
80502002-03-26 H.J. Lu (hjl@gnu.org)
8051
8052 * elflink.h (elf_link_input_bfd): Revert the last change since
8053 the gcc exception handling isn't fixed yet.
8054
3851fca4
L
80552002-03-26 H.J. Lu (hjl@gnu.org)
8056
8057 * elflink.h (elf_link_input_bfd): Complain about relocations
8058 against local symbols in discarded sections.
8059
b91afed7
AM
80602002-03-26 Alan Modra <amodra@bigpond.net.au>
8061
8062 * elflink.h (elf_gc_mark): Don't recurse into non-ELF sections.
8063
dba143ef
AM
80642002-03-23 Alan Modra <amodra@bigpond.net.au>
8065
8066 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
8067 section file offset for !SEC_LOAD sections.
8068
ee29b9fb
RE
80692002-03-21 Richard Earnshaw <rearnsha@arm.com>
8070
830629ab
AM
8071 * elf32-arm.h (elf32_arm_final_link_relocate <case R_ARM_GOTOFF>,
8072 <case R_ARM_GOT>): Handle relocations to Thumb functions.
ee29b9fb 8073
54327882
AM
80742002-03-21 Alan Modra <amodra@bigpond.net.au>
8075
8076 * coff64-rs6000.c (_bfd_xcoff64_put_symbol_name): Prototype.
8077 Whitespace changes.
8078 * archive.c: Update copyright date.
8079 * bfd-in2.h: Regenerate.
8080 * libbfd.h: Regenerate.
8081 * Makefile.am: Run "make dep-am"
8082 * Makefile.in: Regenerate.
8083 * po/SRC-POTFILES.in: Regenerate.
8084
1ee24f27
DJ
80852002-03-20 Daniel Jacobowitz <drow@mvista.com>
8086
8087 * dwarf2.c (struct funcinfo): Move up.
8088 (lookup_address_in_function_table): New argument function_ptr.
8089 Set it.
8090 (lookup_address_in_line_table): New argument function. If function
8091 is non-NULL, use it to handle ``addr'' before the first line note of
8092 the function.
8093 (comp_unit_find_nearest_line): Update and swap calls to
8094 lookup_address_in_function_table and lookup_address_in_line_table.
8095 * syms.c (_bfd_stab_section_find_nearest_line): Use the first
8096 N_SLINE encountered if we see an N_FUN before any N_SLINE.
8097
51b9608c
TR
80982002-03-20 Tom Rix <trix@redhat.com>
8099
ea1e4b0d 8100 * coff-rs6000.c (_bfd_xcoff_stat_arch_elt): Renamed from
51b9608c 8101 _bfd_xcoff_generic_stat_arch_elt. Fix format check.
9b5ecbd0 8102 * coff64-rs6000.c : Use _bfd_xcoff_stat_arch_elt.
51b9608c 8103
789c90aa
TR
81042002-03-19 Tom Rix <trix@redhat.com>
8105
ea1e4b0d 8106 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through all
789c90aa
TR
8107 dynamic objects in archives.
8108
1da54d81
HPN
81092002-03-19 Hans-Peter Nilsson <hp@bitrange.com>
8110
8111 * elflink.h (NAME(bfd_elf,record_link_assignment)): Don't set
8112 STT_NOTYPE symbols to STT_OBJECT.
8113
7831a775 81142002-03-18 Jan Hubicka <jh@suse.cz>
beb43bb9
JH
8115
8116 * cpu-i386.c (bfd_x86_64_arch): Rename to "i386:x86-64"
8117
eb1e0e80
NC
81182002-03-18 Tom Rix <trix@redhat.com>
8119
8120 * aix5ppc.core.c : New file for AIX 5 64 bit core support.
8121 * bfd-in.h : Add bfd_xcoff_ar_archive_set_magic declaration.
8122 * coff-rs6000 (do_pad) : New function for archive padding.
8123 (do_copy) : New function for object file copying in archives.
8124 (do_shared_object_padding) : New function for padding shared
8125 objects to their text section alignment in archives.
8126 (bfd_xcoff_ar_achive_set_magic) : Stub.
8127 (xcoff_write_armap_big) : Use do_copy and do_pad.
8128 (xcoff_write_archive_contents_big) : Use do_shared_object_padding,
8129 do_copy and do_pad.
8130 * coff64-rs6000.c (xcoff64_write_ojbect_contents) : Use
ea1e4b0d 8131 bfd_xcoff_magic_number.
eb1e0e80
NC
8132 (xcoff64_bad_format_hook) : New function for _bfd_bad_format_hook
8133 fop.
8134 (xcoff_backend_data_r) : Use xcoff64_bad_format_hook.
8135 (bfd_xcoff_aix5_backend_data) : New Aix 5 backend data.
8136 (aix5coff64_vec) : New Aix 5 target aix5coff64-rs6000.
8137 * rs6000-core.c : Update copyright date.
ea1e4b0d 8138 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Check for NULL
eb1e0e80
NC
8139 csectpp.
8140 * coffcode.h (coff_new_section_hook) : Use new accessor macros.
8141 (coff_set_arch_mach_hook) : Add Aix 5 U64_TOCMAGIC magic #.
8142 (coff_set_flags) : Use bfd_xcoff_magic_number.
8143 * libxcoff.h (bfd_xcoff_is_xcoff64): Add U64_TOCMAGIC.
8144 * configure.in : Add powerpc-*-aix5 and rs6000-*-aix5 support.
8145 * Makefile.am : Same.
8146 * config.bfd : Same.
8147 * targets.c : Same.
8148 * configure : Regnerate.
8149 * Makefile.in : Same.
8150 * bfd-in2.h : Same.
8151
a1c259a1
NC
81522002-03-18 Nick Clifton <nickc@cambridge.redhat.com>
8153
8154 * po/fr.po: Updated version.
8155
4dae1ae7
AM
81562002-03-18 Alan Modra <amodra@bigpond.net.au>
8157
8158 * libbfd.c (bfd_write_bigendian_4byte_int): Return true iff success.
8159 * libbfd.h: Regenerate.
8160 * archive.c (coff_write_armap): Pass on failures from
8161 bfd_write_bigendian_4byte_int.
8162
36b4f6e7
L
81632002-03-14 H.J. Lu <hjl@gnu.org>
8164
8165 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the BFD
8166 error to bfd_error_nonrepresentable_section for reinit_array
8167 section in DSO.
8168
a1aefc76
NC
81692002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
8170
a181be0a
NC
8171 * coffcode.h (coff_slurp_symbol_table): When adding BSF_WEAK flag,
8172 OR it in rather than replacing previously selected flags.
8173
a1aefc76
NC
8174 * elfxx-target.h (TARGET_BIG_SYM): Set ar_max_namelen to 15.
8175 (TARGET_LITTLE_SYM): Set ar_max_namelen to 15.
8176
c119f9b8
AM
81772002-03-14 Alan Modra <amodra@bigpond.net.au>
8178
8179 * cpu-mips.c (mips_compatible): New. Don't check bits_per_word.
8180 (N): Use the above.
8181 * elflink.h (elf_bfd_final_link): Revert last change. Instead,
8182 ensure reloc size matches before calling elf_link_input_bfd.
8183 Add an assert to check reloc size when counting output relocs.
8184
c295a511
NC
81852002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
8186
8187 * mmo.c (mmo_get_loc): Return NULL rather than false.
8188
9ce88e60
NC
81892002-03-13 Nick Clifton <nickc@cambridge.redhat.com>
8190
8191 * po/fr.po: Updated version.
8192
4ddafab0
AM
81932002-03-13 Alan Modra <amodra@bigpond.net.au>
8194
b74fa2cd
AM
8195 * archures.c (bfd_default_compatible): Test bits_per_word.
8196 * cpu-i386.c (i386_compatible): Remove. Replace occurrences with
8197 bfd_default_compatible.
8198 * cpu-i370.c (i370_compatible): Likewise.
8199 * cpu-sparc.c (sparc_compatible): Likewise.
8200 * cpu-h8300.c (compatible): Test in->arch == out->arch.
8201
40b829d4
AM
8202 * elflink.h: Formatting fixes.
8203 (elf_link_output_extsym): Merge undefined and undef weak cases.
8204
4ddafab0
AM
8205 * elflink.h (elf_bfd_final_link): Only call elf_link_input_bfd
8206 when word size of input matches output word size.
8207
dd53c801
AJ
82082002-03-12 Andreas Jaeger <aj@suse.de>
8209
8210 * cpu-i386.c (i386_compatible): New. Use it instead of
8211 bfd_default_compatible.
8212
aa066ac8
L
82132002-03-07 H.J. Lu (hjl@gnu.org)
8214
8215 * coff-sh.c (shcoff_reloc_map): Use bfd_reloc_code_real_type
8216 as the type for bfd_reloc_val.
8217
1bf42538
JL
82182002-03-05 John David Anglin <dave@hiauly1.hia.nrc.ca>
8219
8220 * elf-hppa.h (elf_hppa_is_dynamic_loader_symbol): New function.
8221 (elf_hppa_relocate_section): Ignore undefined dynamic loader symbols.
8222 (elf_hppa_final_link_relocate): Correct relocations for indirect
8223 references to local data through the DLT. Fix .opd creation for
8224 local symbols using R_PARISC_LTOFF_FPTR32 and R_PARISC_FPTR64
8225 relocations. Use e_lsel selector for R_PARISC_DLTIND21L,
8226 R_PARISC_LTOFF_FPTR21L and R_PARISC_LTOFF_TP21L as per
8227 "Processor-Specific ELF for PA_RISC, Version 1.43" document.
8228 Similarly, use e_rsel for DLT and LTOFF 'R' relocations.
8229 * elf32-hppa.c (final_link_relocate): Revise relocation selectors
8230 as per "Processor-Specific ELF for PA_RISC, Version 1.43" document.
8231
86eaf01e
JJ
82322002-03-05 Jakub Jelinek <jakub@redhat.com>
8233
8234 * merge.c (_bfd_merge_sections): Don't segfault if there
8235 is nothing to merge due to GC.
8236
c44233aa
AM
82372002-03-05 Alan Modra <amodra@bigpond.net.au>
8238
039cc25f
AM
8239 * elf32-hppa.c (clobber_millicode_symbols): Remove hack to keep
8240 symbols that have been forced local.
8241
c44233aa
AM
8242 * elflink.h (elf_bfd_final_link): Call elf_link_output_extsym
8243 to output forced local syms for non-shared link.
8244 (elf_link_output_extsym): Tweak condition for calling backend
8245 adjust_dynamic_symbol so that previous behaviour is kept.
8246 Whitespace changes throughout file.
8247
25e27870
L
82482002-03-04 H.J. Lu <hjl@gnu.org>
8249
8250 * elf.c (bfd_section_from_shdr): Handle special sections,
8251 .init_array, .fini_array and .preinit_array.
8252 (elf_fake_sections): Likewise.
8253
8254 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Create the
8255 DT entry only if the section is in output for .init_array,
8256 .fini_array and .preinit_array. Complain about .preinit_array
8257 section in DSO.
8258 (elf_bfd_final_link): Warn zero size for .init_array,
8259 .fini_array and .preinit_array sections.
8260
8261 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Remove
8262 SHT_INIT_ARRAY, SHT_FINI_ARRAY and SHT_PREINIT_ARRAY.
8263 (elfNN_ia64_fake_sections): Remove .init_array, .fini_array and
8264 .preinit_array.
8265
bb2a49f2
AM
82662002-03-04 Alan Modra <amodra@bigpond.net.au>
8267
8268 * configure.in (WIN32LIBADD): Don't eval PICFLAG assignment.
8269 * configure: Regenerate.
8270
38487e5e
TR
82712002-03-02 Tom Rix <trix@redhat.com>
8272
c44233aa
AM
8273 * coff64-rs6000.c (xcoff64_howto_table): Replace howto types with
8274 symbolic equiv.
38487e5e
TR
8275 * coff-rs6000.c (xcoff_howto_table): Same.
8276
30831527
RH
82772002-03-01 David Mosberger <davidm@hpl.hp.com>
8278
8279 * elflink.h (size_dynamic_sections): If section named
8280 ".preinit_array" exists, create DT_PREINIT_ARRAY and
8281 DT_PREINIT_ARRAYSZ entries in dynamic table. Analogously for
8282 ".init_array" and ".fini_array".
8283 (elf_bfd_final_link): Handle DT_PREINIT_ARRAYSZ, DT_INIT_ARRAYSZ,
8284 DT_FINI_ARRAYSZ, DT_PREINIT_ARRAY, DT_INIT_ARRAY, and
8285 DT_FINI_ARRAY.
8286
c8e5ddc8
AM
82872002-02-26 Andrew Macleod <amacleod@cygnus.com>
8288
8289 * elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local
8290 dynsyms.
8291
96e0dda4
AM
82922002-02-25 Alan Modra <amodra@bigpond.net.au>
8293
1c5b6bf8
AM
8294 * elf64-hppa.h: Update copyright date.
8295
96e0dda4
AM
8296 * elf64-ppc.c (ppc64_elf_check_relocs): Warning fix.
8297 (ppc64_elf_relocate_section): Don't generate power4 style branch
8298 hints for *_BRTAKEN and *_BRNTAKEN relocs.
8299
0fb19cbc
JJ
83002002-02-22 Jakub Jelinek <jakub@redhat.com>
8301
8302 * elf64-sh64.c (sh_elf64_relocate_section): Fix a typo from my
8303 last patch.
8304 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
8305
c434dee6
AJ
83062002-02-21 Andreas Jaeger <aj@suse.de>
8307
8308 * elf64-x86-64.c: Major rework that introduces all recent changes
8309 to the x86-64 backend. Get a closer match to elf32-i386.
8310 (struct elf64_x86_64_dyn_relocs): Rename from
8311 elf64_x86_64_pcrel_relocs_copied, add additional fields. Change
8312 all users.
8313 (struct elf64_x86_64_link_hash_table): Add short cuts to some
8314 sections.
8315 (link_hash_newfunc): Rename from elf64_x86_64_link_hash_newfunc,
8316 remove casts, initialize new hash members.
8317 (create_got_section): New.
8318 (elf64_x86_64_create_dynamic_sections): New.
8319 (elf64_x86_64_copy_indirect_symbol): New.
8320 (elf64_x86_64_check_relocs): Don't allocate space for dynamic
8321 relocs, .got or .relgot here but do it in allocate_dynrelocs.
8322 Reference count possible .plt and .got entries. Don't test input
8323 section SEC_READONLY here to try to avoid copy relocs, and keep
8324 dyn_relocs regardless of ELF_LINK_NON_GOT_REF. Don't set
8325 DF_TEXTREL here. Delay setting of variables until needed. Cache
8326 pointer to "sreloc" section in elf_section_data. Tweak condition
8327 under which .got created. Report files with bad relocation
8328 section names.
8329 (elf64_x86_64_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
8330 Reference count possible .plt entries. Don't deallocate .got and
8331 .relgot space here.
8332 (elf64_x86_64_adjust_dynamic_symbol): Handle nocopyreloc. Don't
8333 do copy reloc processing for weakdefs. Remove redundant casts and
8334 aborts. Delay setting of vars until needed. Move creation of
8335 dynamic symbols and allocation of .plt and .rela.plt to
8336 allocate_dynrelocs. Replace BFD_ASSERT with abort.
8337 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
8338 (allocate_dynrelocs): New.
8339 (readonly_dynrelocs): New.
8340 (elf64_x86_64_size_dynamic_sections): Call readonly_dynrelocs.
8341 Allocate space for dyn relocs. Replace BFD_ASSERT with abort.
8342 Zero out the dynamic allocated content space.
8343 (elf64_x86_64_discard_copies): Removed.
8344 (elf64_x86_64_relocate_section): Make use of dynamic section
8345 short-cuts. Localise vars, and delay setting. Better error
8346 reporting, replace BFD_ASSERT with abort. Check
8347 ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined in the
8348 regular object file and tread the weak definition as the normal
8349 one. Don't discard relocs for undefweak or undefined symbols and
8350 check !DEF_REGULAR as well as DEF_DYNAMIC in test for avoided copy
8351 relocs.
8352 (elf64_x86_64_finish_dynamic_symbol): Don't copy relocs for
8353 symbols that have been forced local. Use same test to decide if
8354 we can use a relative reloc for got as relocate_section. Expand
8355 SHN_UNDEF comment. Move expressions out of function calls.
8356 Replace BFD_ASSERT with abort.
8357 (bfd_elf64_bfd_final_link): Removed.
8358 (elf_backend_copy_indirect_symbol): Define.
8359
ff3a6ee3
TR
83602002-02-20 Tom Rix <trix@redhat.com>
8361
8362 * coff-rs6000.c (xcoff_howto_table): Add 16 bit R_BA.
8363 (_bfd_xcoff_reloc_type_lookup): Use it.
8364 * coff64-rs6000.c (xcoff64_howto_table): Same.
8365 (xcoff64_reloc_type_lookup): Same.
c434dee6 8366
a68d41fb
AM
83672002-02-20 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
8368
9b5ecbd0 8369 * osf-core.c (osf_core_vec): OSF/1 (Digital Unix) core files are
a68d41fb
AM
8370 little endian.
8371
befc3abb
MS
83722002-02-19 Martin Schwidefsky <schwidefsky@de.ibm.com>
8373
8374 * archures.c (bfd_mach_s390_esa): Rename to bfd_mach_s390_31.
8375 (bfd_mach_s390_esame): Rename to bfd_mach_s390_64.
8376 * bfd-in2.h: Regenerate.
8377 * cpu-s390.c (arch_info_struct): Use renamed architecture defines.
8378 Replace architecture name "s390" with "s390:31-bit" and "s390:esame"
8379 with "s390:64-bit".
8380 * elf32-s390.c (elf_howto_table): Add 32 bit pc relative relocations.
8381 (elf_s390_reloc_type_lookup): Likewise.
8382 (elf_s390_check_relocs): Likewise.
8383 (elf_s390_gc_sweep_hook): Likewise.
8384 (elf_s390_relocate_section): Likewise.
8385 (elf_s390_object_p): Use renamed architecture define.
8386 * elf64-s390.c (elf_s390_object_p): Use renamed architecture define.
8387
6eeeec9b
FCE
83882002-02-19 Frank Ch. Eigler <fche@redhat.com>
8389
8390 * syms.c (stt[]): Sorted. Added .init/.fini -> "t" mapping.
8391
0bb2d96a
JJ
83922002-02-19 Jakub Jelinek <jakub@redhat.com>
8393
8394 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Enable
8395 absptr -> pcrel optimization for shared libs.
8396 Only create minimal .eh_frame_hdr if absptr FDE encoding in shared
8397 library cannot be converted to pcrel.
8398 (_bfd_elf_eh_frame_section_offset): Return -2 if making absptr
8399 relative.
8400 * elf32-i386.c (elf_i386_relocate_section): If
8401 _bfd_elf_section_offset returned -2, skip, but make sure the
8402 relocation is installed.
8403 * elf32-arm.h (elf32_arm_final_link_relocate): Likewise.
8404 * elf32-cris.c (cris_elf_relocate_section): Likewise.
8405 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
8406 * elf32-i370.c (i370_elf_relocate_section): Likewise.
8407 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
8408 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
8409 * elf32-s390.c (elf_s390_relocate_section): Likewise.
8410 * elf32-sh.c (sh_elf_relocate_section): Likewise.
8411 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
8412 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
8413 * elf64-s390.c (elf_s390_relocate_section): Likewise.
8414 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
9b5ecbd0 8415 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
0bb2d96a
JJ
8416 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
8417 * elf64-alpha.c (elf64_alpha_relocate_section): Handle
8418 _bfd_elf_section_offset returning -2 the same way as -1.
8419 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
8420 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add FIXME
8421 and BFD_ASSERT.
8422 * elf64-mips.c (mips_elf64_create_dynamic_relocation): Likewise.
8423
69f284c7
TR
84242002-02-18 Tom Rix <trix@redhat.com>
8425
8426 * xcofflink.c (bfd_xcoff_link_gernate_rtinit): Add -brtl support.
8427 (bfd_xcoff_size_dynamic_sections): Same.
8428 * bfd-in.h (bfd_xcoff_link_generate_rtinit): Same.
8429 (bfd_xcoff_size_dynamic_sections): Same.
8430 * coff-rs6000.c (xcoff_generate_rtinit): Same.
8431 * coff-rs646000.c (xcoff64_generate_rtinit): Same.
8432 * libxcoff.h (struct xcoff_backend_data_rec): Same.
8433 * xcofflink.c (xcoff_build_ldsyms, xcoff_link_add_symbols): Clean.
8434 * bfd-in2.h: Regenerate.
8435
82bd7b59
AM
84362002-02-18 Alan Modra <amodra@bigpond.net.au>
8437
8438 * elf64-ppc.c (STFD_FR0_0R1, LFD_FR0_0R1, BLR): Define.
8439 (struct ppc_link_hash_table): Add sfpr.
8440 (ppc64_elf_link_hash_table_create): Init it.
8441 (ppc64_elf_create_dynamic_sections): Split creation of .stub and
8442 .glink out to..
8443 (create_linkage_sections): ..here. Make .sfpr too.
8444 (ppc64_elf_check_relocs): Call create_linkage_sections, and set
8445 dynobj early.
8446 (MIN_SAVE_FPR, MAX_SAVE_FPR): Define.
8447 (ppc64_elf_func_desc_adjust): Look for missing ._savef* and
8448 ._restf* functions, and create as needed.
8449 (func_desc_adjust): Only force_local for shared libs.
8450
ef1355e8
NC
84512002-02-18 David O'Brien <obrien@FreeBSD.org>
8452
8453 * configure.in: Bump version number post 2.12 branching.
8454 * configure: Regenerate.
8455
dfa36a69
HPN
84562002-02-17 Hans-Peter Nilsson <hp@bitrange.com>
8457
8458 * mmo.c: Correct and improve comments.
8459 (mmo_write_chunk): Store trailing byte in bfd buffer; don't
8460 zero-pad. Use input to fill up non-empty bfd buffer.
8461 (mmo_flush_chunk): New function.
8462 (mmo_write_loc_chunk): Add parameter last_vmap, all callers
8463 changed. Don't emit location specifier if VMA is same as
8464 *LAST_VMAP after omitting leading zero contents. Call
8465 mmo_flush_chunk before emitting location specifier.
8466 (mmo_write_loc_chunk_list): Call mmo_flush_chunk when finished
8467 with mmo_write_loc_chunk calls.
8468 (mmo_internal_write_section): Call mmo_flush_chunk after
8469 mmo_write_chunk.
8470 (mmo_write_symbols_and_terminator): Move :Main to first position
8471 in symbol array. Add faked one if it does not exist if there are
8472 other symbols. Don't add it if there are no symbols at all. Move
8473 out test for value of :Main from symbol loop. Rename table
8474 fakemain to maintable and variable mainsym to fakemain.
8475
ccf00ab6
RH
84762002-02-15 Richard Henderson <rth@redhat.com>
8477
8478 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: A target
8479 section with no got matches any got. Simplify error generaion.
8480
88eaccc2
AM
84812002-02-15 Alan Modra <amodra@bigpond.net.au>
8482
fd96f80f
AM
8483 Support arbitrary length fill patterns.
8484 * linker.c (bfd_new_link_order): Zero all fields with bfd_zalloc.
8485 (_bfd_default_link_order): Remove bfd_fill_link_order code.
8486 Call default_data_link_order.
8487 (default_fill_link_order): Delete.
8488 (default_data_link_order): New function.
8489 * elf32-mips.c (_bfd_mips_elf_final_link): Replace occurrences
8490 of bfd_fill_link_order with bfd_data_link_order.
8491 * elf64-alpha.c (elf64_alpha_final_link): Likewise.
8492 * elf64-mips.c (mips_elf64_final_link): Likewise.
8493
88eaccc2
AM
8494 * bfd.c (bfd_scan_vma): Clamp overflows to max bfd_vma value.
8495 Correct value returned in "end" for "0x<non-hex>".
8496
e2fd756b
NC
84972002-02-14 Nick Clifton <nickc@cambridge.redhat.com>
8498
8499 * cpu-arm.c (processors): Replace 'arch' field with 'mach'.
8500 (scan): Test against 'mach' field in info structure.
8501
edd29cf9
AM
85022002-02-14 Alan Modra <amodra@bigpond.net.au>
8503
8504 * elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD.
8505
1e30956e 85062002-02-14 Matt Fredette <fredette@netbsd.org>
76f57f3a
JT
8507
8508 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize
8509 EF_M68000.
8510
bf36db18
NC
85112002-02-13 Nick Clifton <nickc@cambridge.redhat.com>
8512
8513 * elf.c (_bfd_elf_make_section_from_shdr): Do not insist on
edd29cf9
AM
8514 non-zero physical addresses when adjusting the LMAs of new
8515 sections.
bf36db18 8516
189c6563
AM
85172002-02-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
8518
8519 * elf-hppa.h (elf_hppa_reloc_final_type): New function stripped
8520 from _bfd_elf_hppa_gen_reloc_type.
8521 (_bfd_elf_hppa_gen_reloc_type): Remove duplicate prototype.
8522 * elf32-hppa.h (elf32_hppa_reloc_final_type): Add protptype.
8523 * elf32-hppa.c: Include elf32-hppa.h before elf-hppa.h.
8524 * elf64-hppa.h (elf64_hppa_reloc_final_type): Add protptype.
8525
e948afaf
AO
85262002-02-12 Alexandre Oliva <aoliva@redhat.com>
8527
8528 * elf-m10300.c (mn10300_elf_relax_section): Skip section before
8529 loading its contents if there's nothing to do in it.
8530
19397422
AM
85312002-02-12 Alan Modra <amodra@bigpond.net.au>
8532
0ad3a73b
AM
8533 * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for crossing
8534 64k boundary.
8535
19397422
AM
8536 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Add dynamic
8537 DT_PPC64_OPD and DT_PPC64_OPDSZ tags.
8538 (ppc64_elf_finish_dynamic_sections): Set values for them.
8539
51316059
MS
85402002-02-11 Michael Snyder <msnyder@redhat.com>
8541
8542 * elf-bfd.h (elfcore_write_lwpstatus): Add prototype.
8543 * elf.c (elfcore_grok_pstatus): Add prototype.
8544 (elfcore_grok_lwpstatus): Add prototype.
8545 (elfcore_write_lwpstatus): New function.
8546 (elfcore_write_pstatus): Fix typo, eliminate unnecessary memcpy.
8547
518313c3
AO
85482002-02-11 Alexandre Oliva <aoliva@redhat.com>
8549
8550 * elf32-sh.c: Added missing prototypes.
8551 * elf32-sh64.c: Likewise.
8552 (sh_elf_align_loads): Mark unused args as such.
8553 * elf64-sh64.c: Added missing prototypes.
8554 (struct elf_sh64_link_hash_entry): Fix typo.
8555 (sh_elf64_relocate_section): Fix info argument passed to
8556 _bfd_elf_section_offset.
8557
2c73f9d8
AM
85582002-02-11 Alan Modra <amodra@bigpond.net.au>
8559
8560 * Makefile.am: "make dep-am".
8561 * Makefile.in: Regenerate.
8562 * aclocal.m4: Regenerate.
8563 * config.in: Regenerate.
8564 * configure: Regenerate.
8565
d426c6b0
DJ
85662002-02-10 Daniel Jacobowitz <drow@mvista.com>
8567
8568 * coff-rs6000.c (xcoff_generate_rtinit): Silence uninitialized
8569 variable warnings.
8570 * elf32-sh.c (sh_elf_relax_section): Silence signed/unsigned
8571 comparison warning.
8572 * trad-core.c (trad_unix_core_file_p): Silence pointer/integer
8573 cast warnings for the common case.
8574
e58ee0cd
HPN
85752002-02-10 Hans-Peter Nilsson <hp@bitrange.com>
8576
8577 * config.bfd (sh-*-linux*, sh-*-elf* | sh-*-rtemself*): Add sh64
8578 vectors.
8579 (sh-*-netbsdelf*): New, to trump sh*-*-netbsdelf* and add sh64
8580 vectors.
8581
7793f4d0
RH
85822002-02-09 Richard Henderson <rth@redhat.com>
8583
8584 * elf64-alpha.c (elf64_alpha_howto): Add R_ALPHA_BRSGP.
8585 (elf64_alpha_reloc_map, elf64_alpha_check_relocs): Likewise.
8586 (elf64_alpha_relocate_section): Likewise.
8587 * reloc.c (BFD_RELOC_ALPHA_BRSGP): New.
8588 * bfd-in2.h, libbfd.h: Rebuild.
8589
7e799044
HPN
85902002-02-09 Hans-Peter Nilsson <hp@bitrange.com>
8591
8592 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs): Check
8593 that base-plus-offset reloc accounting is consistent.
8594 (mmix_elf_relax_section): Keep base-plus-offset reloc accounting
8595 up to date for undefined symbols.
8596
027d73eb
EC
85972002-02-08 Eric Christopher <echristo@redhat.com>
8598
8599 From Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
8600
8601 * elf32-mips.c (_bfd_mips_elf_fake_sections): Don't create .rela
8602 sections for the O32 ABI.
8603
517662d4
CD
86042002-02-08 Chris Demetriou <cgd@broadcom.com>
8605
8606 * elf32-arm.h: Fix formatting of _("...").
8607 * elf32-d10v.c: Likewise.
8608 * elf32-m68k.c: Likewise.
8609 * elf32-mips.c: Likewise.
8610
5e37cc46
NC
86112002-02-08 Ivan Guzvinec <ivang@opencores.org>
8612
8613 * coff-or32.c: Fix compile time warning messages.
8614
fbca6ad9
AO
86152002-02-08 Alexandre Oliva <aoliva@redhat.com>
8616
8617 Contribute sh64-elf.
8618 2002-01-23 Alexandre Oliva <aoliva@redhat.com>
8619 * reloc.c (R_SH_GOTPLT32, R_SH_GOT_LOW16, R_SH_GOT_MEDLOW16,
8620 R_SH_GOT_MEDHI16, R_SH_GOT_HI16, R_SH_GOTPLT_LOW16,
8621 R_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_HI16,
8622 R_SH_PLT_LOW16, R_SH_PLT_MEDLOW16, R_SH_PLT_MEDHI16,
8623 R_SH_PLT_HI16, R_SH_GOTOFF_LOW16, R_SH_GOTOFF_MEDLOW16,
8624 R_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_HI16, R_SH_GOTPC_LOW16,
8625 R_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDHI16, R_SH_GOTPC_HI16,
8626 R_SH_GOT10BY4, R_SH_GOTPLT10BY4, R_SH_GOT10BY8, R_SH_GOTPLT10BY8,
8627 R_SH_COPY64, R_SH_GLOB_DAT64, R_SH_JMP_SLOT64, R_SH_RELATIVE64):
8628 New relocs.
8629 * libbfd.h, bfd-in2.h: Rebuilt.
8630 * elf32-sh.c (sh_elf_howto_table): Define new relocs.
8631 (sh_reloc_map): Map them.
8632 (PLT_ENTRY_SIZE, elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
8633 elf_sh_plt_entry_be, elf_sh_plt_entry_le, elf_sh_pic_plt_entry_be,
8634 elf_sh_pic_plt_entry_le, elf_sh_plt0_entry, elf_sh_plt_entry,
8635 elf_sh_pic_plt_entry, elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
8636 elf_sh_plt0_gotplt_offset, elf_sh_plt_temp_offset,
8637 elf_sh_plt_symbol_offset, elf_sh_plt_reloc_offset,
8638 movi_shori_putval) [INCLUDE_SHMEDIA]: New.
8639 (elf_sh_link_hash_entry) [INCLUDE_SHMEDIA]: Add
8640 datalabel_got_offset.
8641 (sh_elf_link_hash_newfunc): Initialize it.
8642 (sh_elf_relocate_section): Augment the scope of
9b5ecbd0 8643 seen_stt_datalabel. Introduce GOTPLT support. Extend GOTPC, PLT,
fbca6ad9
AO
8644 GOT and GOTOFF handling to new SHmedia relocation types. Support
8645 GOT_BIAS.
8646 (sh_elf_check_relocs): Likewise.
8647 (sh_elf_finish_dynamic_symbol) [TARGET_SHMEDIA]: Set up values in
8648 PLT entries using movi_shori_putval. Support GOT_BIAS.
8649 (sh_elf_finish_dynamic_sections): Likewise.
8650 * elf32-sh64.c (shmedia_prepare_reloc): Do not add addend to
8651 relocation, it's now done by the caller.
8652 (GOT_BIAS): New.
8653 * elf64-sh64.c (GOT_BIAS, PLT_ENTRY_SIZE, elf_sh64_sizeof_plt,
8654 elf_sh64_plt_plt0_offset, elf_sh64_plt0_gotplt_offset,
8655 elf_sh64_plt_temp_offset, elf_sh64_plt_symbol_offset,
8656 elf_sh64_plt_reloc_offset, ELF_DYNAMIC_INTERPRETER,
8657 elf_sh64_pcrel_relocs_copied, elf_sh64_link_hash_entry,
8658 elf_sh64_link_hash_table, sh64_elf64_link_hash_traverse,
8659 sh64_elf64_hash_table): New.
8660 (sh_elf64_howto_table): Introduce new relocs.
8661 (sh_elf64_info_to_howto): Accept new PIC relocs.
8662 (sh_elf64_relocate_section): Augment the scope of
8663 seen_stt_datalabel. Support new PIC relocs.
8664 (sh_elf64_check_relocs): Support new PIC relocs.
8665 (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le,
8666 elf_sh64_plt_entry_be, elf_sh64_plt_entry_le,
8667 elf_sh64_pic_plt_entry_be, elf_sh64_pic_plt_entry_le,
8668 elf_sh64_plt0_entry, elf_sh64_plt_entry, elf_sh64_pic_plt_entry,
8669 sh64_elf64_link_hash_newfunc, sh64_elf64_link_hash_table_create,
8670 movi_shori_putval, movi_3shori_putval,
8671 sh64_elf64_create_dynamic_sections,
8672 sh64_elf64_adjust_dynamic_symbol, sh64_elf64_discard_copies,
8673 sh64_elf64_size_dynamic_sections,
8674 sh64_elf64_finish_dynamic_symbol,
8675 sh64_elf64_finish_dynamic_sections): New.
8676 (elf_backend_create_dynamic-sections,
8677 bfd_elf64_bfd_link_hash_table_create,
8678 elf_backend_adjust_dynamic_symbol,
8679 elf_backend_size_dynamic_sections,
8680 elf_backend_finish_dynamic_symbol,
8681 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
8682 elf_backend_plt_readonly, elf_backend_want_plt_sym,
8683 elf_backend_got_header_size, elf_backend_plt_header_size):
8684 Define.
8685 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
8686 * elf32-sh.c: Renumbered and renamed some SH5 relocations to
8687 match official numbers and names; moved unmaching ones to the
8688 range 0xf2-0xff.
8689 * elf32-sh64.c, elf64-sh64.c: Likewise.
9b5ecbd0 8690 2001-03-12 DJ Delorie <dj@redhat.com>
fbca6ad9
AO
8691 * elf32-sh.c (sh_elf_relax_section): Don't relax SHmedia
8692 sections.
9b5ecbd0 8693 2001-03-12 DJ Delorie <dj@redhat.com>
fbca6ad9
AO
8694 * elf32-sh64.c (shmedia_prepare_reloc): Validate relocs that must
8695 be aligned.
8696 * elf64-sh64.c (sh_elf64_relocate_section): Ditto.
9b5ecbd0 8697 2001-01-14 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
8698 * elf32-sh64.c (bfd_elf32_bfd_copy_private_section_data): Define.
8699 (sh64_elf_fake_sections): Set type to SHT_SH5_CR_SORTED for a
8700 .cranges section with SEC_SORT_ENTRIES set.
8701 (sh64_backend_section_from_shdr): Set SEC_SORT_ENTRIES on an
8702 incoming sorted .cranges section.
8703 (sh64_bfd_elf_copy_private_section_data): New.
8704 (sh64_elf_final_write_processing): Only sort .cranges and modify
8705 start address if called by linker.
8706 2001-01-08 Ben Elliston <bje@redhat.com>
8707 * elf32-sh64.c (sh64_elf_final_write_processing): Activate
9b5ecbd0 8708 Hans-Peter Nilsson's set bit 0 patch from 2001-01-06.
fbca6ad9 8709 * elf64-sh64.c (sh64_elf64_final_write_processing): Ditto.
9b5ecbd0 8710 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
8711 * elf64-sh64.c (sh_elf64_howto_table): No open brace at start of
8712 line. Add comments before all entries.
8713 <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct and clarify describing
8714 comment.
8715 (sh_elf64_reloc): Correct head comment.
8716 (sh_elf64_relocate_section): Correct spacing.
8717 <relocating for a local symbol>: Do not honour STO_SH5_ISA32;
8718 instead call reloc_dangerous callback.
8719 <case R_SH_SHMEDIA_CODE>: New case.
8720 (sh_elf64_gc_mark_hook): Correct spacing.
8721 (sh_elf64_check_relocs): Ditto.
8722 * elf32-sh64.c (shmedia_prepare_reloc) <case R_SH_SHMEDIA_CODE>:
8723 New case.
8724 * elf32-sh.c: Correct #endif comments for #ifndef-wrapped
8725 functions.
8726 (sh_elf_howto_table) <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct,
8727 clarify describing comment. Add comments before all entries.
8728 (sh_elf_relocate_section) <relocating for a local symbol>: Do not
8729 honour STO_SH5_ISA32; instead call reloc_dangerous callback.
9b5ecbd0 8730 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
8731 Sort .cranges section in final link. Prepare to set bit 0 on
8732 entry address.
8733 * elf32-sh64.c (struct sh64_find_section_vma_data): New.
8734 (sh64_elf_link_output_symbol_hook): Fix typo in prototype.
8735 (sh64_elf_set_mach_from_flags): Set SEC_DEBUGGING on incoming
8736 .cranges section.
8737 (sh64_backend_section_from_shdr): New, to recognize
8738 SHT_SH5_CR_SORTED on incoming .cranges section.
8739 (elf_backend_section_from_shdr): Define.
8740 (sh64_elf_final_write_processing): Sort outgoing .cranges
8741 section. (New, temporarily disabled:) Set bit 0 on entry address
8742 according to ISA type.
8743 (sh64_find_section_for_address): New.
8744 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb,
8745 crange_bsearch_cmpl): Move here from opcodes/sh64-dis.c.
8746 (sh64_address_in_cranges): Move here from opcodes/sh64-dis.c. Use
8747 bfd_malloc, not xmalloc.
8748 (sh64_get_contents_type): Move here from opcodes/sh64-dis.c. Make
8749 global.
8750 * elf32-sh64.c (sh64_elf64_final_write_processing): New, (but
8751 temporarily disabled) setting bit 0 on entry address.
8752 (elf_backend_final_write_processing): Define.
9b5ecbd0 8753 2001-01-05 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
8754 * elf32-sh.c (sh_elf_howto_table) <R_SH_PT_16>: Adjust fields to
8755 be a proper relocation for PTA and PTB rather than a marker.
8756 <R_SH_IMMU5, R_SH_IMMS6, R_SH_IMMU6, R_SH_IMMS10, R_SH_IMMS10BY2,
8757 R_SH_IMMS10BY4, R_SH_IMMS10BY8, R_SH_IMMS16, R_SH_IMMU16,
8758 R_SH_IMM_LOW16, R_SH_IMM_LOW16_PCREL, R_SH_IMM_MEDLOW16,
8759 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16_PCREL,
8760 R_SH_IMM_HI16, R_SH_IMM_HI16_PCREL, R_SH_64, R_SH_64_PCREL>:
8761 Zero src_mask.
8762 * elf64-sh64.c: Ditto.
8763 (sh_elf64_relocate_section) <case R_SH_PT_16>: New case.
8764 * elf32-sh64.c: Include opcodes/sh64-opc.h
8765 (shmedia_prepare_reloc): Take a bfd_link_info pointer as first
8766 argument. Drop const qualifiers from "bfd *" and "bfd_byte *"
8767 parameters. No unused parameters. Caller changed.
8768 <case R_SH_PT_16>: New case.
8769 * Makefile.am (elf32-sh64.lo): Add dependency on sh64-opc.h.
8770 * Makefile.in: Regenerate.
9b5ecbd0 8771 2000-12-30 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
8772 * elf64-sh64.c (sh64_elf64_fake_sections): Set SHF_SH5_ISA32 for
8773 all code sections.
8774 (sh_elf64_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
8775 (sh64_elf_merge_private_data): Ditto.
8776 * elf32-sh64.c (sh64_elf_fake_sections): Use sh64_elf_section_data
8777 to access stored section flags.
8778 (sh64_elf_final_write_processing): Return immediately unless
8779 called by linker. Use sh64_elf_section_data (cranges) to get size
8780 of linker-generated cranges entries.
8781 (sh64_elf_copy_private_data): Add missing "return true".
8782 (sh64_elf_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
8783 (sh_elf64_merge_private_data): Ditto.
9b5ecbd0 8784 2000-12-19 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
8785 * elf64-sh64.c (sh64_elf64_fake_sections): New, copy of
8786 elf64-sh64.c:sh64_elf_fake_sections.
8787 (elf_backend_fake_sections): Define as sh64_elf64_fake_sections.
9b5ecbd0 8788 2000-12-18 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
8789 * elf32-sh64.c (sh64_elf_copy_private_data_internal): Delete.
8790 (sh64_elf_final_write_processing): New.
8791 (elf_backend_final_write_processing): Define.
8792 (sh64_elf_fake_sections): Get header flags from tdata field.
8793 (sh64_elf_copy_private_data): Do not call
8794 sh64_elf_copy_private_data_internal, just copy e_flags field.
8795 (sh64_elf_merge_private_data): Do not call
8796 sh64_elf_copy_private_data_internal.
9b5ecbd0 8797 2000-12-12 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
8798 Remove EF_SH64_ABI64, let ELF size make difference.
8799 Remove SH64-specific BFD section flag.
8800 * elf32-sh64.c (sh64_elf_fake_sections): Recognize section as
8801 containing SHmedia through elf_section_data (asect)->tdata
8802 non-zero, not using a BFD section flag.
8803 (sh64_elf_set_mach_from_flags): Don't recognize EF_SH64_ABI64.
8804 (sh64_elf_merge_private_data): Similar.
8805 (elf_backend_section_flags): Don't define.
8806 (sh64_elf_backend_section_flags): Delete.
8807 * elf64-sh64.c (sh_elf64_set_mach_from_flags): Recognize EF_SH64,
8808 not EF_SH64_ABI64.
8809 (sh_elf64_merge_private_data): Similar.
8810 * section.c (Section flags definitions): Don't define
8811 SEC_SH_ISA_SHMEDIA.
8812 (bfd-in2.h): Regenerate.
9b5ecbd0 8813 2000-12-09 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
8814 Make DataLabel references work with partial linking.
8815 * elf32-sh64.c: Fix formatting.
8816 (sh64_elf_link_output_symbol_hook): New.
8817 (elf_backend_link_output_symbol_hook): Define to
8818 sh64_elf_link_output_symbol_hook.
8819 (sh64_elf_add_symbol_hook): Make DataLabel symbol just global
8820 undefined if partial linking. Adjust sanity check.
8821 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): New.
8822 (elf_backend_link_output_symbol_hook): Define to
8823 sh64_elf64_link_output_symbol_hook.
8824 (sh64_elf64_add_symbol_hook): Make DataLabel symbol just global
8825 undefined if partial linking. Adjust sanity check.
9b5ecbd0 8826 2000-12-07 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
8827 Implement semantics for inter-file DataLabel references.
8828 * elf64-sh64.c (DATALABEL_SUFFIX): Define.
8829 (sh64_elf64_add_symbol_hook): New.
8830 (sh_elf64_relocate_section): If passing an indirect symbol with
8831 st_type STT_DATALABEL on the way to a symbol with st_other
8832 STO_SH5_ISA32, do not bitor 1 to the relocation.
8833 (elf_backend_add_symbol_hook): Define to
8834 sh64_elf64_add_symbol_hook.
8835 * elf64-sh32.c: Tweak comments.
8836 (DATALABEL_SUFFIX): Define.
8837 (sh64_elf_add_symbol_hook): New.
8838 (elf_backend_add_symbol_hook): Define to sh64_elf_add_symbol_hook.
8839 * elf32-sh.c (sh_elf_relocate_section): If passing an indirect
8840 symbol with st_type STT_DATALABEL on the way to a symbol with
8841 st_other STO_SH5_ISA32, do not bitor 1 to the relocation.
9b5ecbd0 8842 2000-12-05 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
8843 Pass through STT_DATALABEL.
8844 * elf32-sh64.c (sh64_elf_get_symbol_type): New.
8845 (elf_backend_get_symbol_type): Define.
8846 * elf64-sh64.c (sh64_elf64_get_symbol_type): New.
8847 (elf_backend_get_symbol_type): Define.
9b5ecbd0 8848 2000-11-30 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
8849 * elf32-sh64.c: Tweak comments.
8850 (sh64_elf_copy_private_data_internal): Add prototype.
8851 (bfd_elf32_bfd_set_private_flags): Define.
8852 (sh64_elf_copy_private_data_internal): Compare machine name, not
8853 textual BFD target name, to check whether to copy section flag
8854 SHF_SH5_ISA32.
8855 (sh64_elf_merge_private_data): Validize bfd_get_arch_size.
8856 Tweak section-contents-type-mismatch message.
8857 (shmedia_prepare_reloc): Add ATTRIBUTE_UNUSED markers.
8858 Validize reloc-types.
8859 * elf64-sh64.c: New file.
8860 * targets.c (bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec): Declare.
8861 * Makefile.am (BFD64_BACKENDS): Add elf64-sh64.lo.
8862 (BFD64_BACKENDS_CFILES): Add elf64-sh64.c.
8863 Regenerate dependencies.
8864 * Makefile.in: Regenerate.
8865 * config.bfd (sh64-*-elf*): Add bfd_elf64_sh64_vec and
8866 bfd_elf64_sh64l_vec.
8867 * configure.in: Handle bfd_elf64_sh64_vec and
8868 bfd_elf64_sh64l_vec.
8869 * configure: Regenerate.
8870 * po/POTFILES.in: Regenerate.
8871 * po/bfd.pot: Regenerate.
9b5ecbd0 8872 2000-11-29 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
8873 * elf32-sh64.c (sh64_elf_set_mach_from_flags): Do not recognize
8874 anything else but EF_SH64 and EF_SH64_ABI64.
8875 (sh64_elf_merge_private_data): Emit error for anything else but
8876 EF_SH64 and EF_SH64_ABI64.
8877 * config.bfd: Remove bfd_elf32_shblin_vec and bfd_elf32_shlin_vec
8878 from targ_selvecs.
8879 * configure.in: Add cofflink.lo to bfd_elf32_sh64_vec and
8880 bfd_elf32_sh64l_vec as a temporary measure.
8881 * configure: Regenerate.
9b5ecbd0 8882 2000-11-27 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
8883 * cpu-sh.c (arch_info_struct): Include sh5 item
8884 unconditionalized.
8885 * config.bfd (sh64-*-elf*): Do not set targ_cflags.
8886 Add targ_selvecs bfd_elf32_sh_vec, bfd_elf32_shl_vec,
8887 bfd_elf32_shblin_vec and bfd_elf32_shlin_vec.
8888 * elf32-sh64.c: Tweak comments.
8889 (sh64_elf_set_mach_from_flags): Recognize all machine flags that
8890 are proper subsets of SH64 as bfd_mach_sh5. Add EF_SH64_ABI64.
8891 (sh64_elf_copy_private_data_internal): Wrap long line.
8892 (sh64_elf_merge_private_data): Rewrite to allow objects from
8893 SH64 subsets to be linked together.
8894 (INCLUDE_SHMEDIA): Define.
8895 * elf32-sh.c (sh_elf_relocate_section) <local symbol>:
8896 Parenthesize plus-expression inside or-expression.
8897 <global symbol>: Ditto.
8898 (sh_elf_set_mach_from_flags): Remove code refusing
8899 deleted EF_SH64_32BIT_ABI flag.
9b5ecbd0 8900 2000-11-26 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
8901 * elf32-sh.c (sh_elf_howto_table) <R_SH_IMM_LOW16_PCREL,
8902 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16_PCREL,
8903 R_SH_IMM_HI16_PCREL, R_SH_64_PCREL>: Set pcrel_offset to true.
8904 (sh_elf_relocate_section) <local symbol>: Or 1 in
8905 calculation of relocation if sym->st_other & STO_SH5_ISA32.
8906 <global symbol>: Ditto if h->other & STO_SH5_ISA32.
8907 * elf32-sh64.c (shmedia_prepare_reloc): Add rel->r_addend to
8908 relocation.
9b5ecbd0 8909 2000-11-24 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
8910 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64.lo.
8911 (BFD32_BACKENDS_CFILES): Add elf32-sh64.c.
8912 Regenerate dependencies.
8913 * Makefile.in: Regenerate.
8914 * archures.c: Add bfd_mach_sh5.
8915 * config.bfd: Map targ_cpu sh* to bfd_sh_arch.
8916 Handle sh64-*-elf*. Set targ_cflags to -DINCLUDE_SHMEDIA.
8917 * configure.in: Handle bfd_elf32_sh64_vec and bfd_elf32_sh64l_vec.
8918 * configure: Regenerate.
8919 * reloc.c (BFD_RELOC_SH_SHMEDIA_CODE, BFD_RELOC_SH_IMMU5,
8920 BFD_RELOC_SH_IMMS6, BFD_RELOC_SH_IMMS6BY32, BFD_RELOC_SH_IMMU6,
8921 BFD_RELOC_SH_IMMS10, BFD_RELOC_SH_IMMS10BY2,
8922 BFD_RELOC_SH_IMMS10BY4, BFD_RELOC_SH_IMMS10BY8,
8923 BFD_RELOC_SH_IMMS16, BFD_RELOC_SH_IMMU16, BFD_RELOC_SH_IMM_LOW16,
8924 BFD_RELOC_SH_IMM_LOW16_PCREL, BFD_RELOC_SH_IMM_MEDLOW16,
8925 BFD_RELOC_SH_IMM_MEDLOW16_PCREL, BFD_RELOC_SH_IMM_MEDHI16,
8926 BFD_RELOC_SH_IMM_MEDHI16_PCREL, BFD_RELOC_SH_IMM_HI16,
8927 BFD_RELOC_SH_IMM_HI16_PCREL, BFD_RELOC_SH_PT_16): New relocations.
8928 * cpu-sh.c [INCLUDE_SHMEDIA] (arch_info_struct): Define and link
8929 in item for SH5.
8930 * elf32-sh.c [INCLUDE_SHMEDIA] (sh_elf_howto_table): Add howto items
8931 for SHmedia relocs.
8932 [INCLUDE_SHMEDIA] (sh_rel): Add mappings for SHmedia relocs.
8933 [INCLUDE_SHMEDIA] (sh_elf_relocate_section) [default]: Call
8934 shmedia_prepare_reloc, goto final_link_relocate if it returns
8935 non-zero, else fail as before.
8936 (sh_elf_set_mach_from_flags): Provide function only if not defined
8937 as macro. Do not recognize objects with EF_SH64_32BIT_ABI set.
8938 (sh_elf_set_private_flags): Provide function only if not defined
8939 as a macro.
8940 (sh_elf_copy_private_data): Similar.
8941 (sh_elf_merge_private_data): Similar.
8942 * section.c (SEC_SH_ISA_SHMEDIA): New.
8943 * targets.c (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec): Declare.
8944 * elf32-sh64.c: New file.
8945 * libbfd.h: Regenerate.
8946 * bfd-in2.h: Regenerate.
8947 * po/POTFILES.in: Regenerate.
8948 * po/bfd.pot: Regenerate.
8949 * bfd-in2.h: Regenerate.
8950 * libbfd.h: Regenerate.
8951
e108f470
DJ
89522002-02-07 Daniel Jacobowitz <drow@mvista.com>
8953
8954 * bfd-in.h: Update <stdbool.h> check to only see if <stdbool.h> has
8955 been included, not drag it in.
8956 * bfd-in2.h: Regenerate.
8957
259d18a3
L
89582002-02-06 H.J. Lu (hjl@gnu.org)
8959
8960 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Update
8961 the mach and ISA fields if necessary.
8962
f13b834e
NC
89632002-02-06 Nick Clifton <nickc@cambridge.redhat.com>
8964
8965 * coffcode.h (coff_set_arch_mach_hook): Select the highest known
8966 ARM architecture when an F_ARM_5 flag is detected, since we cannot
8967 be sure exactly which architecture this represents.
8968
82f6addb
NC
89692002-02-05 Nick Clifton <nickc@redhat.com>
8970
8971 * po/tr.po: Updated translation.
8972
899f54f5
AM
89732002-02-05 Alan Modra <amodra@bigpond.net.au>
8974
8975 From Jimi X <jimix@watson.ibm.com>
8976 * archures (bfd_mach_ppc64): Define.
8977 (bfd_powerpc_arch): Rename to bfd_powerpc_archs.
8978 (bfd_powerpc_arch): Define.
8979 * bfd-in2.h: Regenerate.
8980 * cpu-powerpc.c (arch_info_struct): Rename to bfd_powerpc_archs.
8981 (bfd_powerpc_arch): Move to tail of bfd_powerpc_archs.
8982 (bfd_powerpc_archs): Add default powerpc64 arch.
8983
248866a8
AM
89842002-02-05 Alan Modra <amodra@bigpond.net.au>
8985
8986 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Check for relocs
8987 against section syms in readonly sections. Don't do the global
8988 sym check if we find one.
8989 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
8990 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
0a6958db 8991 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
248866a8
AM
8992 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
8993 (elf_s390_grok_prstatus): Add missing prototype.
8994
4fa5c2a8
HPN
89952002-02-04 Hans-Peter Nilsson <hp@bitrange.com>
8996
8997 * elf64-mmix.c (mmix_dump_bpo_gregs): New function.
8998 (mmix_elf_check_common_relocs) <case R_MMIX_BASE_PLUS_OFFSET>:
8999 Call bfd_get_section_by_name only once. Initialize
9000 bpodata->n_bpo_relocs_this_section.
9001 (_bfd_mmix_prepare_linker_allocated_gregs): Remove comment
9002 referring to DSOs.
9003 (bpo_reloc_request_sort_fn): Don't use difference of values as
9004 return-value.
9005
537c972e
DB
90062002-02-02 David O'Brien <obrien@FreeBSD>
9007
9008 * configure.in: Tweak the FreeBSD 4.x recognition more. Only treat
9009 version 4.5 and later the same as 5-CURRENT.
9010 * configure: Re-generate.
9011
006336b8
JT
90122002-02-02 Jason Thorpe <thorpej@wasabisystems.com>
9013
9014 * config.bfd (hppa*-*-netbsd*): New target.
9015
6c571f00
PT
90162002-01-31 Philipp Thomas <pthomas@suse.de>
9017
19397422
AM
9018 * coff-arm.c (coff_arm_merge_private_bfd_data): Move ERROR
9019 to front of message. Unify messages with elf32-arm.h. Use
9020 commas where neccessary.
9021 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Use all upcase
9022 ERROR in messages. Unify messages with coff-arm.c. Correct
9023 VFP/FPA error message.
9024 (elf32_arm_print_private_bfd_data): Don't mark APCS-26 and
9025 APCS-32 for translation.
6c571f00 9026
930b4cb2
HPN
90272002-02-01 Hans-Peter Nilsson <hp@bitrange.com>
9028
9029 Perform on-demand global register allocation from
9030 R_MMIX_BASE_PLUS_OFFSET relocs.
9031 * elf64-mmix.c (struct bpo_reloc_section_info, struct
9032 bpo_reloc_request, struct bpo_greg_section_info): New.
9033 (mmix_elf_check_common_relocs, mmix_elf_gc_sweep_hook,
9034 bpo_reloc_request_sort_fn, mmix_elf_relax_section,
9035 _bfd_mmix_check_all_relocs,
9036 _bfd_mmix_prepare_linker_allocated_gregs,
9037 _bfd_mmix_finalize_linker_allocated_gregs): New functions.
9038 (elf_mmix_howto_table): Correct src_mask for most relocs.
9039 (mmix_elf_perform_relocation) <case R_MMIX_BASE_PLUS_OFFSET>: New
9040 case.
9041 (mmix_final_link_relocate) <case R_MMIX_BASE_PLUS_OFFSET>: New
9042 case. Fix typo in comment. New label do_mmix_reloc.
9043 (mmix_elf_check_relocs): Abuse bfd_link_info member base_file to
9044 store first object file with a base-plus-offset reloc. Call
9045 mmix_elf_check_common_relocs for the part common with mmo.
9046 (mmix_elf_final_link): Write out linker-allocated register
9047 contents section.
9048 (elf_backend_gc_sweep_hook): Define.
9049 (bfd_elf64_bfd_relax_section): Define.
9050
9051 * mmo.c: Don't include <ctype.h>
9052 (mmo_init): Correct init-once logic.
9053
3e36d993
TR
90542002-02-01 Tom Rix <trix@redhat.com>
9055
9056 * config.bfd: Conditionally support <aiaff> for pre AIX 4.3.
9057
ba323545
AM
90582002-02-01 Alan Modra <amodra@bigpond.net.au>
9059
9060 * Makefile.am: Run "make dep-am"
9061 * Makefile.in: Regenerate.
9062
012884d6
DB
90632002-01-31 David O'Brien <obrien@FreeBSD>
9064
9065 * configure.in: Recognize the differences in core files from FreeBSD
9066 4.{0,1} and later versions of 4.x. This treats 4.2+ the same as
9067 5-CURRENT.
9068 * configure: Regenerate.
9069
3b16e843
NC
90702002-01-31 Ivan Guzvinec <ivang@opencores.org>
9071
9072 * coff-or32.c: New file.
9073 * cpu-or32.c: New file.
9074 * elf32-or32.c: New file.
9075 * archures.c: Add support for or32.
9076 * targets.c: Add support for or32.
9077 * bfd-in2.h: Regenerate.
7dc0ab31 9078 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags,
3b16e843
NC
9079 coff_write_object_contents): Add support for or32.
9080 * config.bfd: Add target.
9081 * configure.in: Add support for or32.
9082 * configure: Regenerate.
9083 * Makefile.am: Add support for or32.
9084 * Makefile.in: Regenerate.
3b16e843
NC
9085 * po/SRC-POTFILES.in: Add or32 files.
9086 * po/bfd.pot: Regenerate.
7dc0ab31 9087
caf8ca8e
NC
90882002-01-31 Nick Clifton <nickc@cambridge.redhat.com>
9089 Don Lindsay <lindsayd@cisco.com>
9090
9091 * elf32-mips.c (mips_elf_calculate_relocation): Replace 'return
9092 false' with a return of a bfd_reloc_ error code.
9093
e5dfef09
HPN
90942002-01-31 Hans-Peter Nilsson <hp@axis.com>
9095
9096 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
9097 unexport unreferenced symbols when --export-dynamic. Call
9098 _bfd_elf_strtab_delref when unexporting.
9099
4e4770d0
DJ
91002002-01-30 Daniel Jacobowitz <drow@mvista.com>
9101
9102 * bfd-in.h: Include <stdbool.h> if it is available.
9103 * bfd-in2.h: Regenerated.
9104
e1fa50e7
AM
91052002-01-31 Alan Modra <amodra@bigpond.net.au>
9106
9107 * elf64-ppc.c (func_desc_adjust): STV_PROTECTED functions should
9108 not go via the plt.
9109
b5f79c76
NC
91102002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
9111
b5f79c76
NC
9112 * archures.c: Tidy up formatting of embedded comments.
9113 * bfd.c: Tidy up formatting of embedded comments.
7dc0ab31 9114 * bfd-in.h: Fix formatting of comments.
b5f79c76
NC
9115 * reloc.c: Tidy up formatting of ordinary & embedded comments.
9116 * section.c: Tidy up formatting of embedded comments.
9117 * syms.c: Tidy up formatting of embedded comments.
9118 * targets.c: Tidy up formatting of embedded comments.
9119
9120 * bfd-in2.h: Regenerate.
9121
ca09e32b
NC
91222002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
9123
9124 * vms-tir.c (cmd_name): New function.
9125 (tir_cmd_name): New function.
9126 (etir_sta, etir_sto, etir_opr, etir_stc): Use cmd_name().
9127 (tir_opr, tir_ctl, tir_cmd): use tir_cmd_name().
9128 Fix formatting.
7dc0ab31 9129
ca09e32b
NC
9130 * peXXigen.c (pe_print_idata): Rearrange message to aid in
9131 translation.
9b5ecbd0 9132 (pe_print_pdata): Rearrange message to aid in translation.
ca09e32b
NC
9133
9134 * libbfd.c (warn_deprecated): Rearrange error message to aid in
9135 translation.
9136
9137 * ihex.c (ihex_write_object_contents): Fix spelling typo.
9138
9139 * ieee.c (ieee_slurp_external_symbols): Remove spurious space.
9140
9141 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Rearrange error
9142 message to aid in translation.
9143
9144 * elf64-mmix.c (mmix_final_link_relocate): Rearrange error message
9145 to aid in translation.
9146
9147 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix typo.
9148
7dc0ab31 91492002-01-30 Philipp Thomas <pthomas@suse.de>
ae1a89b7
PT
9150
9151 * coff-arm.c, elf32-elf.h: Unify messages.
9152
05f64ac6
NC
91532002-01-30 Nick Clifton <nickc@redhat.com>
9154
9155 * po/sv.po: Updated translation.
9156
f5a3e38a
NC
91572002-01-30 Philipp Thomas <pthomas@suse.de>
9158
9159 * dwarf2.c (read_abbrev): Use full section name in error message.
9160 (decode_line_info): Likewise.
661a3fd4
NC
9161
9162 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Don't translate debugging
9163 message.
9164
d926e03d
AM
91652002-01-30 Alan Modra <amodra@bigpond.net.au>
9166
9167 * elf64-ppc.c (func_desc_adjust): Only provide missing function
9168 descriptor symbols for undefined function code syms. Clear
9169 ELF_LINK_NON_ELF so that they can stay weak.
9170
030d18fb 91712002-01-29 Chris Demetriou <cgd@broadcom.com>
7dc0ab31 9172 Mitch Lichtenberg <mpl@broadcom.com>
030d18fb
CD
9173
9174 * bfd-in.h (bfd_mips_elf32_create_embedded_relocs): New prototype.
9175 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): New function
9176 to handle 32-bit ELF embedded reloc (ld --embedded-relocs)
9177 generation.
9178 * bfd-in2.h: Regenerate.
9179
fcc76bea
CD
91802002-01-29 Chris Demetriou <cgd@broadcom.com>
9181
9182 * elf32-mips.c: Add additional comments about HI16 relocation
9183 processing.
9184 (_bfd_mips_elf_hi16_reloc): Don't subtract address here for
9185 pc-relative relocations. (Reverts change made on 2001-10-31.)
9186 (_bfd_mips_elf_lo16_reloc): Subtract address of LO16 part here
9187 for pc-relative relocations.
9188 (mips_elf_calculate_relocation): Add a comment about a kludge
9189 in the R_MIPS_GNU_REL_HI16 handling.
9190 (_bfd_mips_elf_relocate_section): Implement that kludge;
9191 adjust pc-relative HI16 relocation for difference in HI16 and
9192 LO16 addresses, since it can't easily be done in
9193 mips_elf_calculate_relocation.
9194
f9cd9119
MS
91952002-01-29 Martin Schwidefsky <schwidefsky@de.ibm.com>
9196
9197 * elf32-i386 (elf_i386_adjust_dynamic_symbol): Do not replace PLT32
9198 relocations with PC32 relocations for undefined or weak symbols.
9199 * elf32-s390 (elf_i386_adjust_dynamic_symbol): Likewise.
9200 * elf64-s390x (elf_i386_adjust_dynamic_symbol): Likewise.
9201
702248bb
JT
92022002-01-28 Jason Thorpe <thorpej@wasabisystems.com>
9203
9204 * elfcore.h (elf_core_file_p): Improve comment for last change.
9205
4867be41
DJ
92062002-01-27 Daniel Jacobowitz <drow@mvista.com>
9207
9208 * configure: Regenerated.
9209
a94cef6a
JT
92102002-01-27 Jason Thorpe <thorpej@wasabisystems.com>
9211
9212 * elfcore.h (elf_core_file_p): Set the machine architecture
9213 before processing the program headers.
9214
7562a296
HPN
92152002-01-26 Hans-Peter Nilsson <hp@bitrange.com>
9216
966abd70
HPN
9217 * configure.in <64-bit configuration>: If using gcc, check and
9218 emit error for egcs-1.1.2.
9219 * configure: Regenerate.
9220
e8eab623
NC
92212002-01-26 Egor Duda <deo@logos-m.ru>
9222
9223 * elf.c (elfcore_grok_win32pstatus): Copy only as much information
9224 as possible to avoid stack corruption.
9225
73896efb
RH
92262002-01-26 Richard Henderson <rth@redhat.com>
9227
9228 * elf64-alpha.c (elf64_alpha_check_relocs): Don't set reltext
9229 for non-allocated sections.
9230
92312002-01-25 Mark Kettenis <kettenis@gnu.org>
c106e334
MK
9232
9233 * elf.c (elfcore_write_prstatus): Make sure we pass the address of
9234 prstat.pr_reg even if it is a struct.
9235
73896efb 92362002-01-25 Steve Ellcey <sje@cup.hp.com>
254ed743 9237
c5cd6d62 9238 * elfxx-ia64.c: Reset AIX vector function overrides for HP-UX.
254ed743 9239
3d66c4f7
NC
92402002-01-25 Philipp Thomas <pthomas@suse.de>
9241
9242 * coffgen.c (coff_print_symbol): Don't mark info message
9243 for translation.
9244
9460ecda
NC
92452002-01-25 Nick Clifton <nickc@redhat.com>
9246
9247 * po/fr.po: Updated translation.
9248 * po/es.po: Updated translation.
9249
cc9ff76a
AM
92502002-01-25 Philipp Thomas <pthomas@suse.de>
9251
9252 * coff-alpha.c (alpha_relocate_section): Unify warning message
9253 for GP relative relocations without GP defined.
9254 * coff-mips.c (mips_relocate_section): Likewise.
9255
c68836a9
AM
92562002-01-25 Alan Modra <amodra@bigpond.net.au>
9257
9258 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Avoid
9259 unsigned overflow when new_offset < old_offset.
9260
e8eab623 92612002-01-24 Philipp Thomas <pthomas@suse.de>
391154e9
NC
9262
9263 * bfd.c (_bfd_abort): Fix typo.
9264
8ba89f17
RH
92652002-01-23 Richard Henderson <rth@redhat.com>
9266
9267 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't suppress
9268 plt entries for undefweak symbols.
9269
c6953948
NC
92702002-01-23 Steve Ellcey <sje@cup.hp.com>
9271
c5cd6d62 9272 * targets.c (bfd_elf32_ia64_hpux_big_vec): Add to DEFAULT_VECTOR.
c6953948
NC
9273 (bfd_elf64_ia64_hpux_big_vec): Ditto.
9274 (bfd_elf32_h8300_vec): Ditto.
9275
41bd81ab
AM
92762002-01-23 Alan Modra <amodra@bigpond.net.au>
9277
9278 * elf64-ppc.c: Remove stale part of ABI comment.
9279 (NO_OPD_RELOCS): Define.
9280 (ppc64_elf_check_relocs): Use it.
9281 (ppc64_elf_relocate_section): Here too.
9282 (build_one_stub): Don't point function syms at the stub. Instead,
9283 hijack plt.offset.
9284 (ppc64_elf_relocate_section): Check whether REL24 relocs should
9285 really go to the stub. Make all dynamic relocs in opd against
9286 locals.
9287 (ppc64_elf_finish_dynamic_symbol): Allow for non-standard use of
9288 plt.offset.
9289
f304919d
RH
92902002-01-22 Richard Henderson <rth@redhat.com>
9291
9292 * elf64-alpha.c (INSN_UNOP): Encode with RB as $sp.
9293
c0ef99a7
AM
92942002-01-22 Alan Modra <amodra@bigpond.net.au>
9295
60ee0d4a
AM
9296 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Correct sign of
9297 TOC_BASE_OFF adjustment.
9298
c0ef99a7
AM
9299 * Makefile.am: Run "make dep-am".
9300 * Makefile.in: Regenerate.
9301 * po/SRC-POTFILES.in: Regenerate.
9302
64328b46
AM
93032002-01-22 John David Anglin <dave@hiauly1.hia.nrc.ca>
9304
9305 * configure.host (hppa*64*-*-hpux*, hppa*64*-*-linux*): Add new
9306 host defines.
9307
59953665 93082002-01-21 Hans-Peter Nilsson <hp@axis.com>
58255df3
HPN
9309
9310 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GOTREL>:
9311 Check for and emit error if sgot is NULL at this point.
9312
9596feea
JT
93132002-01-21 Jason Thorpe <thorpej@wasabisystems.com>
9314
9315 * config.bfd (ia64*-*-netbsd*): New target.
9316
7b45c6e1
AM
93172002-01-21 Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
9318
9319 * som.c (som_write_space_strings): Comment typo fix.
9320
e5094212
AM
93212002-01-21 Alan Modra <amodra@bigpond.net.au>
9322
e86ce104
AM
9323 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_func and
9324 is_func_descriptor fields.
9325 (link_hash_newfunc): Init them.
9326 (ppc64_elf_check_relocs): Only R_PPC24_REL24 syms starting with a
9327 dot are candidates for plt entries. When processing .opd relocs,
9328 set function descriptor strings to point inside function code
9329 string, and set new ppc_link_hash_entry fields.
9330 (ppc64_elf_gc_sweep_hook): Don't sweep R_PPC64_REL24 relocs.
9331 (ppc64_elf_adjust_dynamic_symbol): Remove most code dealing with
9332 function descriptors. It's now done in..
9333 (func_desc_adjust): New.
9334 (ppc64_elf_func_desc_adjust): New.
9335 (define elf_backend_always_size_sections): Define.
9336 (ppc64_elf_hide_symbol): New.
9337 (define elf_backend_hide_symbol): Define.
9338 (allocate_dynrelocs): Remove code looking up function descriptors
9339 as that has been done earlier.
9340 (ppc64_elf_size_dynamic_sections): Use htab shortcut to elf hash
9341 table.
9342 (ppc64_elf_finish_dynamic_symbol): Likewise. Remove code looking
9343 up function descriptor.
9344 (build_one_stub): Look up the function code sym. Check for
9345 invalid plt offsets.
9346 (ppc64_elf_relocate_section): Tweak calls to undefined weak syms.
9347 Convert R_PPC64_TOC relocs to R_PPC64_RELATIVE in shared libs.
9348
e5094212
AM
9349 * elf-bfd.h (elf_backend_data <elf_backend_hide_symbol>): Add
9350 boolean param.
9351 (_bfd_elf_link_hash_hide_symbol): Likewise.
9352 * elflink.h (elf_link_add_object_symbols): Adjust call to
9353 elf_backend_hide_symbol.
9354 (elf_fix_symbol_flags): Likewise.
9355 (elf_link_assign_sym_version): Likewise. Use bfd_malloc rather
9356 than bfd_alloc.
9357 * elf.c (_bfd_elf_link_hash_hide_symbol): Add "force_local" param.
9358 Set ELF_LINK_FORCED_LOCAL and call _bfd_elf_strtab_delref.
9359 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
9360 (clobber_millicode_symbols): Adjust to suit new hide_symbol.
9361 * elf32-cris.c (elf_cris_hide_symbol): Add "force_local" param
9362 and adjust to suit.
9363 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise, and call
9364 _bfd_elf_link_hash_hide_symbol rather than duplicating code.
9365 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
9366
40b8271b
AM
93672002-01-18 Alan Modra <amodra@bigpond.net.au>
9368
9369 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Test for a
9370 dynamic function descriptor symbol, not the associated function
9371 symbol.
9372
55baa95b
EC
93732002-01-17 Eric Christopher <echristo@redhat.com>
9374
9375 * elf32-mips.c (mips_elf_calculate_relocation): Fix typo.
9376
328577ad
NC
93772002-01-17 Nick Clifton <nickc@cambridge.redhat.com>
9378
9379 * po/bfd.pot: Regenerate.
9380 * po/fr.po: Regenerate.
9381
af746e92
AM
93822002-01-17 Alan Modra <amodra@bigpond.net.au>
9383
9384 * elf-bfd.h (elf_backend_data <elf_backend_section_from_bfd_section>):
9385 Remove "Elf_Internal_Shdr *" param.
9386 (_bfd_mips_elf_section_from_bfd_section): Ditto.
9387 * elf32-mips.c (_bfd_mips_elf_section_from_bfd_section): Ditto.
9388 * elf32-m32r.c (_bfd_m32r_elf_section_from_bfd_section): Ditto.
9389 * elf32-v850.c (v850_elf_section_from_bfd_section): Ditto.
9390 * elf64-mmix.c (mmix_elf_section_from_bfd_section): Ditto.
9391 * elfxx-ia64.c (elfNN_hpux_backend_section_from_bfd_section): Ditto.
9392 * elf.c (_bfd_elf_section_from_bfd_section): Allow backend
9393 function to override special sections. Remove hdr arg from
9394 backend call, and don't loop.
9395
175e9962
EC
93962002-01-16 Eric Christopher <echristo@redhat.com>
9397
9398 * elf32-mips.c (mips_elf_calculate_relocation): Set require_jalxp
9399 on R_MIPS_26 and target is 16bit. Add R_MIPS16_GPREL to list of
9400 relocations requiring gp0 and gp.
9401
96a846ea
RE
94022002-01-16 Richard Earnshaw <rearnsha@arm.com>
9403
175e9962 9404 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle
96a846ea
RE
9405 EF_ARM_VFP_FLOAT.
9406 (elf32_arm_print_private_bfd_data): Likewise.
9407
af3ae48d
NC
94082002-01-16 Nick Clifton <nickc@cambridge.redhat.com>
9409
9410 * po/tr.po: Import new version.
9411
10ed1bba
AM
94122002-01-16 Alan Modra <amodra@bigpond.net.au>
9413
9414 * elf64-ppc.c (ppc64_elf_howto_raw): Remove stale FIXMEs.
9415 (ppc64_elf_reloc_type_lookup): Use proper CTOR reloc.
9416 (ORI_R0_R0_0): Correct.
9417
5d1634d7
AM
94182002-01-16 Alan Modra <amodra@bigpond.net.au>
9419
9420 * elflink.c (_bfd_elf_create_dynamic_sections): Don't set SEC_CODE
9421 when plt_not_loaded.
9422 * elf64-ppc.c (ppc64_elf_create_dynamic_sections): No need to
9423 clear .plt SEC_CODE here. Create .stub and correct .glink flags.
9424 (PLT_INITIAL_ENTRY_SIZE): Set to 24.
9425 (ppc64_elf_glink_code): Delete.
9426 (PPC64_ELF_GLINK_SIZE): Delete.
9427 (ADDIS_R12_R2, STD_R2_40R1, LD_R11_0R12, LD_R2_0R12, MTCTR_R11,
9428 BCTR, ADDIS_R12_R12_1, LD_R2_40R1, NOP, LI_R0_0, B_DOT, LIS_R0_0,
9429 ORI_R0_R0_0): Define.
9430 (PLT_CALL_STUB_SIZE, GLINK_CALL_STUB_SIZE): Define.
9431 (struct ppc_link_hash_table): Add sstub and plt_overflow.
9432 (ppc64_elf_link_hash_table_create): Init them.
9433 (ppc64_elf_check_relocs <R_PPC64_REL24>): Refcount .plt entry.
9434 Don't copy to shared lib.
9435 (ppc64_elf_check_relocs): Call bfd_set_error on errors.
9436 (ppc64_elf_gc_sweep_hook <R_PPC64_REL24>): Sweep plt refcount.
9437 (allocate_dynrelocs <plt>): Don't change function sym here. Make
9438 room for .stub and .glink code.
9439 (ppc64_elf_size_dynamic_sections): Handle .stub. Make entry for
9440 DT_PPC64_GLINK.
9441 (ppc64_elf_final_link): Rename to ppc64_elf_set_toc. Don't call
9442 bfd_elf64_bfd_final_link.
9443 (bfd_elf64_bfd_final_link): Don't define.
9444 (ppc64_elf_size_stubs): New.
9445 (build_plt_stub): New.
9446 (build_one_stub): New.
9447 (ppc64_elf_build_stubs): New.
9448 (ppc64_elf_relocate_section <toc relocs>): Remove assert.
9449 (ppc64_elf_relocate_section): Don't copy R_PPC64_REL24 relocs.
9450 (ppc64_elf_finish_dynamic_symbol): Don't build stubs here. Set
9451 DT_PPC64_GLINK entry. Tweak DT_PLTGOT, DT_JMPREL, DT_PLTRELSZ in
9452 case output sections not separate. Adjust DT_RELASZ to not
9453 include plt relocs. Set reserved got entry. Set got and plt
9454 entry size.
9455 (elf_backend_got_header_size): Set to 8.
9456 * elf64-ppc.h: New file.
9457
c601ffdb
AM
94582002-01-16 Alan Modra <amodra@bigpond.net.au>
9459
9460 * elf32-arm.h (elf32_arm_size_dynamic_sections): When removing
9461 sections, use bfd_section_list_remove.
9462 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
9463 * elflink.h (elf_link_add_object_symbols): When removing all
9464 sections, use bfd_section_list_clear.
9465
8fb4cb7f
NC
94662002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
9467
9468 * po/sv.po: New file: Swedish translation.
9469 * configure.in (ALL_LINGUAS): Add sv.
9470 * configure: Regenerate.
9471
d3c456e9
JJ
94722002-01-15 Jakub Jelinek <jakub@redhat.com>
9473
9474 * elflink.h (elf_link_input_bfd): Back out 2002-01-07 change.
9475 * elf.c (merge_sections_remove_hook): New function.
9476 (_bfd_elf_merge_sections): Pass it as 3rd argument to
9477 _bfd_merge_sections.
9478 * libbfd-in.h (_bfd_merge_sections): Add 3rd argument.
9479 * libbfd.h: Rebuilt.
9480 * merge.c (_bfd_merge_sections): Add remove_hook argument.
9481 Call remove_hook if a SEC_EXCLUDE section is encountered.
9482
1f7fd478
NC
94832002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
9484
9485 * elf32-xstormy16.c (xstormy16_reloc_map): Add new field 'table'.
9486 (xstormy16_reloc_map): Initialise new field with correct howto
9487 table.
9488 (xstormy16_reloc_type_lookup): Use 'table' field to locate correct
9489 howto entry.
9490
b87011e9
MS
94912002-01-10 Michael Snyder <msnyder@redhat.com>
9492
9493 * elf.c (elfcore_write_prstatus): Use long instead of pid_t;
9494 (elfcore_write_pstatus): Use long instead of pid_t;
9495 * elf-bfd.h: Change prototypes to use long instead of pid_t;
9496
175e9962 94972002-01-09 Jason Thorpe <thorpej@wasabisystems.com>
b4db1224
JT
9498
9499 * elf.c: Update copyright years.
9500 (elfcore_grok_netbsd_note): Use NT_NETBSDCORE_PROCINFO
9501 and NT_NETBSDCORE_FIRSTMACH. Improve a comment.
9502
7c76fa91
MS
95032002-01-08 Michael Snyder <msnyder@redhat.com>
9504
9505 Add capability to write corefile note sections, for gdb.
9506 * elf.c (elfcore_write_note): New function.
9507 (elfcore_write_prpsinfo): New function.
9508 (elfcore_write_prstatus): New function.
9509 (elfcore_write_pstatus): New function.
9510 (elfcore_write_prfpreg): New function.
9511 (elfcore_write_prxfpreg): New function.
97996af6 9512 * elf-bfd.h: Add prototypes for above functions.
7c76fa91 9513
e1fddb6b
AO
95142002-01-08 Alexandre Oliva <aoliva@redhat.com>
9515
9516 * elf.c (elf_fake_sections): Propagate errors from
9517 elf_backend_fake_section.
9518
8d05742f
JT
95192002-01-07 Jason Thorpe <thorpej@wasabisystems.com>
9520
9521 * Makefile.am (BFD32_BACKENDS): Add elf32-sh-nbsd.lo.
9522 (BFD32_BACKENDS_CFILES): Add elf32-sh-nbsd.c.
9523 (elf32-sh-nbsd.lo): New rule.
9524 * Makefile.in: Regenerate.
9525 * config.bfd (sh*le-*-netbsdelf*): New target.
9526 (sh*-*-netbsdelf*): New target.
9527 * configure.in: Include netbsd-core.lo for native sh*-*-netbsd*.
9528 (bfd_elf32_shnbsd_vec): New vector.
9529 (bfd_elf32_shlnbsd_vec): New vector.
9530 * configure: Regenerate.
9531 * elf32-sh-nbsd.c: New file.
9532 * targets.c: Update copyright years.
175e9962 9533 (_bfd_target_vector): Add bfd_elf32_shlnbsd_vec and
8d05742f
JT
9534 bfd_elf32_shnbsd_vec.
9535
1dba4cb4
AH
95362002-01-07 Aldy Hernandez <aldyh@redhat.com>
9537
9538 * coff-rs6000.c (READ20): Use bfd_scan_vma.
9539
47b22aef
GK
95402002-01-07 Geoffrey Keating <geoffk@redhat.com>
9541
9542 * elflink.h (elf_link_input_bfd): Don't ask for the merged offset
9543 of a symbol in a section that will be deleted.
9544
be2d1673
NC
95452002-01-07 Nick Clifton <nickc@cambridge.redhat.com>
9546
9547 * po/es.po: New file: Spanish translation.
9548 * configure.in (ALL_LINGUAS): Add es.
9549 * configure: Regenerate.
9550
d9cf1b54
AM
95512002-01-06 Steve Ellcey <sje@cup.hp.com>
9552
9553 * elfxx-ia64.c (is_unwind_section_name): Add target vector as
9554 argument so we can handle HP-UX specially.
9555 (elfNN_ia64_hpux_vec): New for use in is_unwind_section_name.
9556 (elfNN_hpux_backend_section_from_bfd_section): New for support
9557 of SHN_IA_64_ANSI_COMMON.
9558 (elfNN_ia64_relax_section): Add support for SHN_IA_64_ANSI_COMMON.
9559 (is_unwind_section_name): Add special HP-UX support.
9560 (elfNN_ia64_section_from_shdr): Add support for more sections.
9561 (elfNN_ia64_fake_sections): Modify is_unwind_section_name call and
9562 add support for more sections.
9563 (elfNN_ia64_additional_program_headers): Modify
9564 is_unwind_section_name call.
9565 (elfNN_ia64_modify_segment_map): Remove assumption that there is
9566 only one unwind section in segment.
9567
3f3c5c34
AM
95682002-01-06 Alan Modra <amodra@bigpond.net.au>
9569
9570 * syms.c (_bfd_generic_make_empty_symbol): New function.
9571 * libbfd-in.h (_bfd_nosymbols_make_empty_symbol): Define as
9572 _bfd_generic_make_empty_symbol.
9573 * libbfd.h: Regenerate.
9574 * bfd-in2.h: Regenerate.
9575 * hppabsd-core.c (hppabsd_core_make_empty_symbol): Delete function.
9576 (hppabsd_core_get_symtab_upper_bound): Don't define.
9577 (hppabsd_core_get_symtab): Likewise.
9578 (hppabsd_core_print_symbol): Likewise.
9579 (hppabsd_core_get_symbol_info): Likewise.
9580 (hppabsd_core_bfd_is_local_label_name): Likewise.
9581 (hppabsd_core_get_lineno): Likewise.
9582 (hppabsd_core_find_nearest_line): Likewise.
9583 (hppabsd_core_bfd_make_debug_symbol): Likewise.
9584 (hppabsd_core_read_minisymbols): Likewise.
9585 (hppabsd_core_minisymbol_to_symbol): Likewise.
9586 (hppabsd_core_vec): Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols).
9587 Formatting fixes.
9588 * hpux-core.c: Similarly.
9589 * irix-core.c: Similarly.
9590 * osf-core.c: Similarly.
9591 * sco5-core.c: Similarly.
9592 * binary.c (binary_make_empty_symbol): Remove function, define as
9593 _bfd_generic_make_empty_symbol.
9594 * ihex.c (ihex_make_empty_symbol): Likewise.
9595 * mmo.c (mmo_make_empty_symbol): Likewise.
9596 * ppcboot.c (ppcboot_make_empty_symbol): Likewise.
9597 * srec.c (srec_make_empty_symbol): Likewise.
9598 * versados.c (versados_make_empty_symbol): Likewise.
9599 * vms.c (_bfd_vms_make_empty_symbol): Remove.
9600 (vms_make_empty_symbol): Define as _bfd_generic_make_empty_symbol.
9601 * vms-gsd.c (_bfd_vms_slurp_gsd): Call bfd_make_empty_symbol
9602 rather than _bfd_vms_make_empty_symbol.
9603 * vms-misc.c (new_symbol): Likewise.
9604
3f0a7f7f
AM
96052002-01-05 Alan Modra <amodra@bigpond.net.au>
9606
9e7b37b3
AM
9607 * section.c (bfd_section_init): Remove unnecessary initialisations.
9608 (bfd_section_list_clear): New function.
9609 (bfd_section_list_remove, bfd_section_list_insert): New macros.
9610 (_bfd_strip_section_from_output): Use them.
9611 * coffcode.h (coff_set_alignment_hook): Likewise.
9612 * elf32-mips.c (_bfd_mips_elf_final_link): Likewise.
9613 * elf64-mips.c (mips_elf64_final_link): Likewise.
9614 * elf64-mmix.c (mmix_elf_final_link): Likewise.
9615 * sunos.c (sunos_add_dynamic_symbols): Likewise.
9616 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
9617 * bfd-in2.h: Regenerate.
9618
9619 * netbsd-core.c (netbsd_core_file_p): Use bfd_make_section_anyway
9620 rather than doing our own section handling. Clean up after errors
9621 with bfd_release and bfd_section_list_clear. Handle unexpected
9622 flags.
9623 * aoutf1.h (sunos4_core_file_p): Likewise.
9624 * aix386-core.c (aix386_core_file_p): Likewise.
9625 * cisco-core.c (cisco_core_file_validate): Likewise.
9626 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
9627 * trad-core.c (trad_unix_core_file_p): Likewise.
9628
9b5ecbd0 9629 * hppabsd-core.c (hppabsd_core_core_file_p): Clean up after errors
9e7b37b3
AM
9630 with bfd_release and bfd_section_list_clear.
9631 * hpux-core.c (hpux_core_core_file_p): Likewise.
9632 * irix-core.c (irix_core_core_file_p): Likewise.
9633 * lynx-core.c (lynx_core_file_p): Likewise.
9634 * osf-core.c (osf_core_core_file_p): Likewise.
9635 * rs6000-core.c (rs6000coff_core_p): Likewise.
9636 * sco5-core.c (sco5_core_file_p): Likewise.
9637
3f0a7f7f
AM
9638 * elf32-mips.c (_bfd_mips_elf_lo16_reloc): Simplify, and perform
9639 sign extension adjustments without conditionals.
9640
a3aa38ee
JJ
96412002-01-04 Jakub Jelinek <jakub@redhat.com>
9642
9643 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Don't crash if
9644 CIE at .eh_frame start is removed due to no FDEs referencing it.
9645
8a8b2d4b
AJ
96462002-01-04 Jason Thorpe <thorpej@wasabisystems.com>
9647
9648 * config.bfd (x86_64-*-netbsd*): New target.
9649 * configure.in (x86_64-*-netbsd*): Set COREFILE
9650 to netbsd-core.lo.
9651 * configure: Regenerated.
9652
04b5af89
TR
96532002-01-03 Tom Rix <trix@redhat.com>
9654
9655 * xcofflink.c (_bfd_xcoff_bfd_final_link): Update .pad section ordering
9656 for recent bfd_make_section_anyway change.
9657
51c5503b
NC
96582002-01-03 Nick Clifton <nickc@cambridge.redhat.com>
9659
9660 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
9661 R_ARM_THM_PC11 reloc.
9662
07f7c046
NC
96632002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
9664
9665 * configure.in (LINGUAS): Add ja.
9666 * configure: Regenerate.
9667 * po/ja.po: Import from translation project's web site.
9668
5eefb65f
NC
96692002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
9670
9671 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Reformat error
9672 messages to ease translation into other languages.
9673
39e90f10 9674For older changes see ChangeLog-0001
56882138
AM
9675\f
9676Local Variables:
9677mode: change-log
9678left-margin: 8
9679fill-column: 74
9680version-control: never
9681End:
This page took 0.646713 seconds and 4 git commands to generate.