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