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