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