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