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