Fixes for use of ARM_26D reloc in arm-wince toolchain.
[binutils-gdb.git] / bfd / ChangeLog
1 2003-12-05 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
2
3 * coff-arm.c (aoutarm_std_reloc_howto [ARM_WINCE]): Set
4 partial_inplace for these relocs to FALSE for comptability with
5 the MS linker.
6 Remap ARM_26D relocation from 5 to 0. This fixes "bad fixup" error
7 generated by MS linker, and brings the relocation in line the MS
8 PE documentation.
9
10 2003-12-04 H.J. Lu <hongjiu.lu@intel.com>
11
12 * elf32-ppc.c (ppc_elf_relax_section): Don't check relax_finalizing.
13
14 2003-12-04 H.J. Lu <hongjiu.lu@intel.com>
15
16 * elfxx-ia64.c (elfNN_ia64_relax_section): Use the
17 need_relax_finalize field in link_info instead of
18 relax_finalizing to check if the relax finalize pass is being
19 done.
20
21 2003-12-04 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
22
23 * coff-arm.c (coff_arm_relocate_section, bfd_arm_process_before_allocation):
24 Change ARM26* to ARM_26* in comments to match definitions.
25 (coff_arm_adjust_symndx): Replace hard-coded constants with
26 appropriate definitions (ARM_26*).
27
28 2003-12-04 Alan Modra <amodra@bigpond.net.au>
29
30 * coff-i860.c (coff_i860_reloc_nyi): Return bfd_reloc_not_supported.
31 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Warning fixes.
32 (mn10300_elf_relax_section): Likewise.
33 * nlm32-alpha.c (ONES): Define.
34 (nlm32_alpha_howto_table): Use it to avoid warnings.
35
36 2003-12-04 Alan Modra <amodra@bigpond.net.au>
37
38 * elf32-i386.c (elf_i386_object_p): Delete.
39 (elf_backend_object_p): Don't define.
40 * elf32-s390.c (elf_s390_object_p): No need to alloc tdata here.
41 * elf32-sh.c (sh_elf_object_p): Likewise.
42 * elf32-sparc.c (elf32_sparc_object_p): Likewise.
43 * elf64-alpha.c (elf64_alpha_object_p): Likewise.
44 * elf64-s390.c (elf_s390_object_p): Likewise.
45 * elf64-x86-64.c (elf64_x86_64_elf_object_p): Likewise.
46
47 2003-12-03 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
48
49 * archures.c (bfd_mach_m32r2): Add new machine type.
50 * bfd-in2.h: Regenerate.
51 * cpu-m32r.c : Add new machine type.
52 * elf32-m32r.c (m32r_elf_object_p, m32r_elf_final_write_processing,
53 m32r_elf_merge_private_bfd_data): Add support for new machine
54 type.
55
56 2003-12-03 Dave Airlie <airlied@linux.ie>
57
58 * config.bfd: Add vax-linux-gnu target.
59 * configure.in: Likewise.
60 * configure: Regenerate.
61
62 2003-12-03 Alan Modra <amodra@bigpond.net.au>
63
64 * ecoff.c (ecoff_link_add_archive_symbols): Update for renamed
65 bfd_link_hash_entry field "next" -> "und_next".
66 * linker.c (_bfd_link_hash_newfunc): Likewise.
67 (bfd_link_add_undef): Likewise.
68 (_bfd_generic_link_add_archive_symbols): Likewise.
69 (_bfd_generic_link_add_one_symbol): Likewise.
70 * xcofflink.c (xcoff_link_add_symbols): Likewise.
71
72 2003-12-02 Nick Clifton <nickc@redhat.com>
73
74 * configure.in (ALL_LINGUAS): Add ro.
75 * po/ro.po: New Romanian translation.
76
77 2003-12-02 Alan Modra <amodra@bigpond.net.au>
78
79 * Makefile.am: Run "make dep-am".
80 * Makefile.in: Regenerate.
81
82 2003-12-01 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
83
84 * coffcode.h (coff_compute_section_file_positions): Set page_size
85 to 1 instead of 0 in the case file alignment value is zero.
86
87 2003-12-01 Kazu Hirata <kazu@cs.umass.edu>
88
89 * coff-rs6000.c: Remove ARGSUSED and VARARGS.
90 * coff64-rs6000.c: Likewise.
91 * coffcode.h: Likewise.
92 * elf32-vax.c: Likewise.
93 * hash.c: Likewise.
94 * hppabsd-core.c: Likewise.
95 * hpux-core.c: Likewise.
96 * ihex.c: Likewise.
97 * netbsd-core.c: Likewise.
98 * osf-core.c: Likewise.
99 * pdp11.c: Likewise.
100 * ptrace-core.c: Likewise.
101 * sco5-core.c: Likewise.
102 * section.c: Likewise.
103 * sunos.c: Likewise.
104 * trad-core.c: Likewise.
105
106 2003-12-01 Alan Modra <amodra@bigpond.net.au>
107
108 * elf-bfd.h (is_elf_hash_table): Take hash tab rather than info arg.
109 * elf.c (_bfd_elf_merge_sections): Adjust to suit.
110 (_bfd_elf_link_just_syms): Likewise.
111 (bfd_elf_get_needed_list): Likewise.
112 (bfd_elf_get_runpath_list): Likewise.
113 (_bfd_elf_link_hash_copy_indirect): Remove unneeded parens.
114 * elf32-hppa.c (elf32_hppa_setup_section_lists): Don't check hash tab
115 creator flavour.
116 (elf32_hppa_set_gp): Look up output sections rather than using htab.
117 * elf32-i960.c: Comment fix. Formatting.
118 * elf32-m32r.c (m32r_elf_add_symbol_hook): Use is_elf_hash_table
119 rather than testing creator flavour.
120 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
121 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
122 * elflink.c (_bfd_elf_link_create_dynamic_sections): Adjust for
123 is_elf_hash_table change. Remove redundant test.
124 (bfd_elf_record_link_assignment): Use is_elf_hash_table rather than
125 testing creator flavour.
126 (elf_link_record_local_dynamic_symbol): Adjust for is_elf_hash_table.
127 (_bfd_elf_fix_symbol_flags): Likewise.
128 (_bfd_elf_adjust_dynamic_symbol): Likewise.
129 * elflink.h (elf_link_add_object_symbols): Likewise. Remove redundant
130 checks. Use is_elf_hash_table rather than testing creator flavour.
131 Use hash_table throughout in place of info->hash.
132 (elf_add_dynamic_entry): Adjust for is_elf_hash_table change.
133 (NAME(bfd_elf,size_dynamic_sections)): Likewise. Remove redundant
134 check.
135 (elf_bfd_final_link): Adjust for is_elf_hash_table change.
136 (elf_link_check_versioned_symbol): Use is_elf_hash_table rather than
137 testing creator flavour.
138 (elf_gc_sections): Add is_elf_hash_table check.
139 (elf_gc_common_finalize_got_offsets): Likewise.
140 (elf_bfd_discard_info): Adjust for is_elf_hash_table change. Remove
141 redundant check.
142 * elfxx-ia64.c (elfNN_ia64_relax_section): Use is_elf_hash_table
143 rather than testing creator flavour.
144
145 2003-11-28 Christian Groessler <chris@groessler.org>
146
147 * cpu-z8k.c: Convert to ISO C90.
148 * coff-z8k.c: Likewise.
149
150 2003-11-27 Alexandre Oliva <aoliva@redhat.com>
151
152 * elf-bfd.h (elf_backend_data::elf_backend_modify_segment_map):
153 Add link info argument.
154 * elf32-i370.c (elf_backend_modify_segment_map): Likewise.
155 * elf32-ppc.c (ppc_elf_modify_segment_map): Likewise.
156 * elf32-xtensa.c (elf_xtensa_modify_segment_map): Likewise.
157 * elf64-hppa.c (elf64_hppa_modify_segment_map): Likewise.
158 * elfxx-ia64.c (elfNN_ia64_modify_segment_map): Likewise.
159 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Likewise.
160 * elfxx-mips.h (_bfd_mips_elf_modify_segment_map): Likewise.
161 * elf.c (assign_file_positions_except_relocs,
162 assign_file_positions_for_segments): Likewise. Adjust calls.
163
164 2003-11-27 Mark Kettenis <kettenis@gnu.org>
165
166 * elf.c (elfcore_grok_netbsd_procinfo): Make a pseudosection out
167 of the note.
168
169 2003-11-26 Daniel Jacobowitz <drow@mvista.com>
170 Richard Sandiford <rsandifo@redhat.com>
171
172 * elfxx-mips.c (mips_elf_set_global_got_offset): Don't set no_fn_stub.
173 (mips_elf_set_no_stub): New function.
174 (mips_elf_multi_got): Call it.
175 (_bfd_mips_elf_finish_dynamic_symbol): If a relocation is needed for
176 a secondary GOT entry, create an R_MIPS_32 or R_MIPS_64 relocation and
177 use mips_elf_create_dynamic_relocation to deal with any compatibility
178 issues. Store the adjusted addend in the GOT slot.
179
180 2003-11-25 Mattias EngdegÄrd <mattias@virtutech.se>
181
182 * stabs.c (_bfd_link_section_stabs): Skip N_EXCL stabs when
183 procesing N_BINCL stabs.
184
185 2003-11-25 Alan Modra <amodra@bigpond.net.au>
186
187 * elf64-ppc.c (ppc_type_of_stub): Disallow stubs other than
188 ppc_stub_plt_call to symbols defined in shared libs.
189
190 2003-11-22 Jakub Jelinek <jakub@redhat.com>
191
192 * elf-bfd.h (ELF_LINK_POINTER_EQUALITY_NEEDED): Define new flag.
193 * elf.c (_bfd_elf_link_hash_copy_indirect): Copy it.
194 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
195 (elf_i386_check_relocs): Set it.
196 (elf_i386_finish_dynamic_symbol): If it is not set,
197 clear st_value of SHN_UNDEF symbol.
198
199 2003-11-20 Jim Blandy <jimb@redhat.com>
200
201 * cpu-powerpc.c (powerpc_compatible): Any ISA in the PowerPC
202 family is a superset of <bfd_arch_rs6000,bfd_mach_rs6k>.
203
204 2003-11-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
205
206 * elf32-s390.c (elf_s390_relocate_section): Don't recalculate symbol
207 section for reloc output and subtract the output section's address
208 from the addend when converting a relocation into one against a
209 section symbol.
210 * elf64-s390.c (elf_s390_relocate_section): Likewise.
211
212 2003-11-18 James E Wilson <wilson@specifixinc.com>
213
214 * elfxx-ia64.c (get_fptr): For fptr_rel, use dynobj not abfd.
215 (elfNN_ia64_size_dynamic_sections): When stripping sections, check
216 for ia64_info->rel_fptr_sec.
217
218 2003-11-18 Alan Modra <amodra@bigpond.net.au>
219
220 * elf64-ppc.c (toc_adjusting_stub_needed): Exit early if section
221 size is zero.
222
223 2003-11-17 Daniel Jacobowitz <drow@mvista.com>
224
225 * elf.c (_bfd_elf_link_hash_copy_indirect): Copy
226 ELF_LINK_HASH_NEEDS_PLT. Fix formatting.
227 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
228 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
229 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Likewise.
230 * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
231 * elf32-sh.c (sh_elf_copy_indirect_symbol): Likewise.
232 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
233 * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
234 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
235 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
236 * elf32-xtensa.c (elf_xtensa_copy_indirect_symbol): Remove.
237 (elf_backend_copy_indirect_symbol): Don't define.
238
239 2003-11-14 Daniel Jacobowitz <drow@mvista.com>
240
241 * elfxx-mips.c (mips_elf_merge_gots): Weaken assert for local
242 GOT entries.
243
244 2003-11-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
245
246 * elf32-s390.c (elf_s390_relocate_section): Only convert R_390_32
247 to R_390_RELATIVE. Convert the other relocations against local
248 symbols to relocations against the start of the section.
249 * elf64-s390.c (elf_s390_relocate_section): Only convert R_390_64
250 to R_390_RELATIVE. Convert the other relocations against local
251 symbols to relocations against the start of the section.
252
253 2003-11-11 Nick Clifton <nickc@redhat.com>
254
255 * elf-m10300.c (bfd_mn10300_elf_size_dynamic_sections): Use
256 info->executable not info->shared to decide if a .interp section
257 should be present.
258 * elf32-arm.h (elf32_arm_size_dynamic_sections): Likewise.
259 * elf32-cris.c (elf_cris_size_dynamic_sections): Likewise.
260 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
261 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
262 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
263 * elf32-vax.c (elf_vax_size_dynamic_sections): Likewise.
264 * elf32-xtensa.c (elf_xtensa_size_dynamic_sections): Likewise.
265 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
266 * elfxx-mips.c (_bfd_mips_size_dynamic_sections): Likewise.
267 * elflink.h (size_dynamic_sections): Likewise.
268
269 2003-11-10 Jonathan Wilson <jonwil@tpgi.com.au>
270
271 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Swap out tls pointer.
272 (_bfd_XXi_final_link_postscript): Look for __tks_used symbol. If
273 found initialise the tls data directory entry.
274
275 2003-11-07 Alan Modra <amodra@bigpond.net.au>
276
277 * elf32-ppc.c (ppc_elf_install_value): Delete.
278 (shared_stub_entry, stub_entry): Make them arrays of ints.
279 Remove initial branch.
280 (ppc_elf_relax_section): Write one branch around all trampolines
281 instead. Correct bogus R_PPC_PLTREL24 handling. Correct
282 branch range check. Only use shared_stub_entry when shared.
283 Test that branches can reach stubs. Write trampolines out at
284 end so that just one realloc is used. Handle little-endian
285 mode. Move relevant code from ppc_elf_install_value to here.
286 (ppc_elf_relocate_section): Move code handling RELAX32 from
287 ppc_elf_install_value to here.
288
289 2003-11-06 Alan Modra <amodra@bigpond.net.au>
290
291 * elf32-ppc.c (ppc_elf_howto_raw); Add entry for R_PPC_RELAX32PC.
292 (ppc_elf_install_value): Handle R_PPC_RELAX32PC. Merge duplicate
293 cases.
294 (shared_stub_entry): Correct opcode.
295 (ppc_elf_relax_section): Generate R_PPC_RELAX32PC relocs.
296 (ppc_elf_relocate_section): Handle them.
297
298 2003-11-05 Alan Modra <amodra@bigpond.net.au>
299
300 * elf.c (_bfd_elf_rela_local_sym): Accept asection **, and return
301 updated section in case of merged section.
302 * elf-bfd.h (_bfd_elf_rela_local_sym): Update declaration.
303 * elf-hppa.h (elf_hppa_relocate_section): Adjust call.
304 * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
305 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
306 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
307 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
308 * elf32-cris.c (cris_elf_relocate_section): Likewise.
309 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
310 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
311 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
312 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
313 * elf32-i370.c (i370_elf_relocate_section): Likewise.
314 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
315 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
316 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
317 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
318 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
319 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
320 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
321 * elf32-s390.c (elf_s390_relocate_section): Likewise.
322 * elf32-sh.c (sh_elf_relocate_section): Likewise.
323 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
324 * elf32-v850.c (v850_elf_relocate_section) Likewise.
325 * elf32-vax.c (elf_vax_relocate_section): Likewise.
326 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
327 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
328 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
329 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
330 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
331 * elf64-s390.c (elf_s390_relocate_section): Likewise.
332 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
333 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
334 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
335 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
336
337 * elf32-cris.c (cris_elf_relocate_section): Don't recalculate symbol
338 section for reloc output.
339 * elf32-i370.c (i370_elf_relocate_section): Likewise.
340 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
341 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
342 * elf32-vax.c (elf_vax_relocate_section): Likewise.
343 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
344 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
345
346 * elf32-ppc.c (ppc_elf_relocate_section): Don't recalculate everything
347 for R_PPC_RELAX32 reloc. Don't bother checking ppc_elf_install_value
348 return value.
349 * elf64-ppc.c (ppc64_elf_relocate_section <R_PPC64_TOC>): Sanity check
350 sec->id.
351
352 2003-11-05 Alan Modra <amodra@bigpond.net.au>
353
354 * elf32-d10v.c (extract_rel_addend, insert_rel_addend): New functions.
355 (elf32_d10v_relocate_section): Use them to handle -r reloc
356 adjustments, and in place of _bfd_elf_rela_local_sym.
357
358 * cpu-iq2000.c (arch_info_struct): Warning fix.
359
360 2003-11-05 Alan Modra <amodra@bigpond.net.au>
361
362 * elf32-hppa.c (ELIMINATE_COPY_RELOCS): Define.
363 (elf32_hppa_copy_indirect_symbol): Don't copy NON_GOT_REF on
364 weakdefs.
365 (elf32_hppa_check_relocs): Use ELIMINATE_COPY_RELOCS.
366 (elf32_hppa_adjust_dynamic_symbol): Likewise. Copy weakdef
367 NON_GOT_REF.
368 (allocate_dynrelocs): Use ELIMINATE_COPY_RELOCS and
369 SYMBOL_CALLS_LOCAL. Discard relocs for undef weak syms with
370 non-default visibility.
371 (elf32_hppa_relocate_section): Use ELIMINATE_COPY_RELOCS and
372 SYMBOL_CALLS_LOCAL.
373
374 2003-11-04 Alan Modra <amodra@bigpond.net.au>
375
376 * aout-target.h, aoutf1.h, bfdio.c, bfdwin.c: Update copyright date.
377 * coff-apollo.c, coff-sparc.c, coff-w65.c, coff-we32k.c: Ditto.
378 * coff-z8k.c, coffgen.c, cpu-frv.c, cpu-h8500.c, cpu-hppa.c: Ditto.
379 * cpu-ia64-opc.c, cpu-m10300.c, cpu-mips.c, cpu-msp430.c: Ditto.
380 * cpu-rs6000.c, cpu-z8k.c, efi-app-ia32.c, elf32-am33lin.c: Ditto.
381 * gen-aout.c, hash.c, hp300hpux.c, init.c, mach-o.c: Ditto.
382 * nlm-target.h, nlm.c, som.h, stabs.c, sysdep.h, xsym.h: Ditto.
383
384 * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Fix
385 "dereferencing type-punned pointer" warnings.
386
387 * aout-adobe.c (aout_adobe_set_section_contents): Constify location.
388 * aoutx.h (NAME(aout,set_section_contents)): Ditto.
389 * bfd-in2.h: Regenerate.
390 * binary.c (binary_set_section_contents): Ditto.
391 * bout.c (b_out_set_section_contents): Ditto.
392 * coff-tic54x.c (tic54x_set_section_contents): Ditto.
393 * coffcode.h (coff_set_section_contents): Ditto.
394 * ecoff.c (_bfd_ecoff_set_section_contents): Ditto.
395 * elf-bfd.h (_bfd_elf_set_section_contents): Ditto.
396 * elf.c (_bfd_elf_set_section_contents): Ditto.
397 * elfxx-mips.c (_bfd_mips_elf_set_section_contents): Ditto.
398 * elfxx-mips.h (_bfd_mips_elf_set_section_contents): Ditto.
399 * i386msdos.c (msdos_set_section_contents): Ditto.
400 * ieee.c (ieee_set_section_contents): Ditto.
401 * ihex.c (ihex_set_section_contents): Ditto.
402 * libaout.h (NAME(aout,set_section_contents)): Ditto.
403 * libbfd-in.h (_bfd_nowrite_set_section_contents): Ditto.
404 (_bfd_generic_set_section_contents): Ditto.
405 * libbfd.h: Regenerate.
406 * libbfd.c (_bfd_generic_set_section_contents): Ditto.
407 * libecoff.h (_bfd_ecoff_set_section_contents): Ditto.
408 * libnlm.h (nlmNAME(set_section_contents)): Ditto.
409 (struct nlm_backend_data <nlm_mangle_relocs>): Ditto.
410 * mmo.c (mmo_set_section_contents): Ditto.
411 * nlm32-alpha.c (nlm_alpha_mangle_relocs): Ditto.
412 * nlm32-i386.c (nlm_i386_mangle_relocs): Ditto.
413 * nlm32-ppc.c (nlm_powerpc_mangle_relocs): Ditto.
414 * nlm32-sparc.c (nlm_sparc_mangle_relocs): Ditto.
415 * nlmcode.h (nlm_set_section_contents): Ditto.
416 * oasys.c (oasys_set_section_contents): Ditto.
417 * pdp11.c (NAME(aout,set_section_contents)): Ditto.
418 * ppcboot.c (ppcboot_set_section_contents): Ditto.
419 * srec.c (srec_set_section_contents): Ditto.
420 * targets.c (BFD_JUMP_TABLE_WRITE <_bfd_set_section_contents>): Ditto.
421 * tekhex.c (tekhex_set_section_contents): Ditto.
422 (move_section_contents): Ditto.
423 * versados.c (versados_set_section_contents): Ditto.
424 * vms-misc.c (_bfd_save_vms_section): Ditto.
425 * vms.c (vms_set_section_contents): Ditto.
426 * vms.h (_bfd_save_vms_section): Ditto.
427
428 2003-11-04 Alan Modra <amodra@bigpond.net.au>
429
430 * elf64-ppc.c (ppc_size_one_stub): Size relbrlt. Accept info arg
431 rather than htab.
432 (ppc64_elf_size_stubs): Adjust ppc_size_one_stub traversal. Zero
433 relbrlt size.
434 (ppc64_elf_build_stubs): Allocate space for relbrlt.
435
436 2003-11-04 Alan Modra <amodra@bigpond.net.au>
437
438 * bfd-in.h (_bfd_elf_tls_setup): Declare.
439 * bfd-in2.h: Regenerate.
440 * elf-bfd.h (struct elf_link_tls_segment): Delete.
441 (struct elf_link_hash_table): Add tls_sec and tls_size.
442 * elf.c (_bfd_elf_link_hash_table_init): Init tls_sec and tls_size.
443 * elflink.c (_bfd_elf_tls_setup): New function.
444 * elflink.h (struct elf_final_link_info): Remove first_tls_sec.
445 (elf_bfd_final_link): Don't set first_tls_sec here. Update code
446 saving tls segment info, round segment size up.
447 (elf_link_output_extsym): Adjust code using tls segment info.
448 (elf_link_input_bfd): Likewise.
449 * elf32-i386.c (dtpoff_base, tpoff): Likewise.
450 * elf32-s390.c (dtpoff_base, tpoff): Likewise.
451 * elf32-sh.c (dtpoff_base, tpoff): Likewise.
452 * elf32-sparc.c (dtpoff_base, tpoff): Likewise.
453 * elf64-s390.c (dtpoff_base, tpoff): Likewise.
454 * elf64-x86-64.c (dtpoff_base, tpoff): Likewise.
455 * elfxx-ia64.c (elfNN_ia64_tprel_base): Likewise.
456 (elfNN_ia64_dtprel_base): Likewise.
457 * elf64-alpha.c (alpha_get_dtprel_base): Likewise.
458 (alpha_get_tprel_base): Likewise.
459 (struct alpha_relax_info): Remove tls_segment.
460 (elf64_alpha_relax_got_load): Adjust invocation of
461 alpha_get_dtprel_base and alpha_get_tprel_base.
462 (elf64_alpha_relax_tls_get_addr): Likewise.
463 (elf64_alpha_relax_section): Likewise.
464 (elf64_alpha_relocate_section): Likewise.
465 (elf64_alpha_relax_find_tls_segment): Delete.
466 * elf32-ppc.c (struct ppc_elf_link_hash_table): Remove tls_sec.
467 (ppc_elf_tls_setup): Call _bfd_elf_tls_setup. Return section.
468 (ppc_elf_relocate_section): Adjust to use elf.tls_sec.
469 * elf32-ppc.h (ppc_elf_tls_setup): Update.
470 * elf64-ppc.c (struct ppc_link_hash_table): Remove tls_sec.
471 (ppc64_elf_tls_setup): Call _bfd_elf_tls_setup. Return section.
472 (ppc64_elf_tls_optimize): Adjust to use elf.tls_sec.
473 (ppc64_elf_relocate_section): Likewise.
474 * elf64-ppc.h (ppc64_elf_tls_setup): Update.
475
476 2003-11-03 Daniel Jacobowitz <drow@mvista.com>
477
478 * elf-bfd.h (struct elf_backend_data): Remove plt_header_size.
479 * elf-m10300.c (elf_backend_plt_header_size): Don't define.
480 * elf32-arm.h (elf_backend_plt_header_size): Don't define.
481 * elf32-cris.c (elf_backend_plt_header_size): Don't define.
482 * elf32-i386.c (elf_backend_plt_header_size): Don't define.
483 * elf32-mips.c (elf_backend_plt_header_size): Don't define.
484 * elf32-ppc.c (elf_backend_plt_header_size): Don't define.
485 * elf32-s390.c (elf_backend_plt_header_size): Don't define.
486 * elf32-sh.c (elf_backend_plt_header_size): Don't define.
487 * elf32-sparc.c (elf_backend_plt_header_size): Don't define.
488 * elf64-alpha.c (elf_backend_plt_header_size): Don't define.
489 * elf64-hppa.c (elf_backend_plt_header_size): Don't define.
490 * elf64-mips.c (elf_backend_plt_header_size): Don't define.
491 * elf64-ppc.c (elf_backend_plt_header_size): Don't define.
492 * elf64-s390.c (elf_backend_plt_header_size): Don't define.
493 * elf64-sh64.c (elf_backend_plt_header_size): Don't define.
494 * elf64-sparc.c (elf_backend_plt_header_size): Don't define.
495 * elf64-x86-64.c (elf_backend_plt_header_size): Don't define.
496 * elfn32-mips.c (elf_backend_plt_header_size): Don't define.
497 * elfxx-ia64.c (elf_backend_plt_header_size): Don't define.
498 * elfxx-target.h (elf_backend_plt_header_size): Don't define
499 or include in target initializer.
500
501 2003-11-03 Andrew Cagney <cagney@redhat.com>
502
503 * section.c (bfd_set_section_contents): Make the "location" buffer
504 constant.
505 * bfd-in2.h: Re-generate.
506
507 2003-10-30 Andrew Cagney <cagney@redhat.com>
508
509 * syms.c: Replace "struct symbol_cache_entry" with "struct
510 bfd_symbol".
511 * vms.h, targets.c, section.c, reloc.c, peicode.h: Ditto.
512 * mipsbsd.c, elf.c, linker.c, elf-bfd.h, ecoff.c: Ditto.
513 * cpu-z8k.c, cpu-ns32k.c, cpu-h8500.c, bfd.c, bfd-in.h: Ditto.
514 * bfd-in2.h: Re-generate.
515
516 2003-10-30 Jakub Jelinek <jakub@redhat.com>
517
518 * elfxx-ia64.c: Include objalloc.h, hashtab.h.
519 (struct elfNN_ia64_local_hash_entry): Remove root. Add id and r_sym
520 fields.
521 (struct elfNN_ia64_local_hash_table): Remove.
522 (struct elfNN_ia64_link_hash_table): Change loc_hash_table's type
523 to htab_t. Add loc_hash_memory field.
524 (elfNN_ia64_local_hash_table_init, elfNN_ia64_new_loc_hash_entry):
525 Removed.
526 (elfNN_ia64_local_htab_hash, elfNN_ia64_local_htab_eq): New
527 functions.
528 (elfNN_ia64_hash_table_create): Use hashtab.h hashtable for
529 loc_hash_table. Initialize loc_hash_memory.
530 (elfNN_ia64_hash_table_free): New function.
531 (elfNN_ia64_local_hash_lookup): Remove.
532 (elfNN_ia64_local_dyn_sym_thunk): Change into htab_traverse
533 callback.
534 (elfNN_ia64_dyn_sym_traverse): Use htab_traverse.
535 (get_local_sym_hash): Use hashtab.h hashtable for loc_hash_table.
536 (bfd_elfNN_bfd_link_hash_table_free): Define.
537
538 2003-10-30 Alan Modra <amodra@bigpond.net.au>
539
540 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Modify versioned
541 symbol string in place.
542
543 2003-10-30 Jim Blandy <jimb@redhat.com>
544
545 * cpu-rs6000.c (rs6000_compatible): Check the correct arch_info
546 object's mach field: all PowerPC machines are supersets of the
547 original rs6000, but not later rs6000 machines.
548
549 2003-10-30 Alan Modra <amodra@bigpond.net.au>
550
551 * dwarf2.c (struct attribute): Delete "unsnd", "snd" and "addr".
552 Add "val" and "sval" fields.
553 (DW_STRING, DW_UNSND, DW_BLOCK, DW_SND, DW_ADDR): Delete.
554 (read_attribute_value): Expand and adjust DW_* occurrences.
555 (scan_unit_for_functions, parse_comp_unit): Likewise.
556
557 2003-10-30 Phil Edwards <phil@codesourcery.com>
558
559 * config.bfd (arm-*-vxworks): Remove separate stanza; merge with
560 other common ELF triples.
561 (i[3-7]86-*-vxworks): Change to ELF format.
562 (mips*-*-windiss): New triple, add to common MIPS/ELF stanza.
563 (sh-*-vxworks): New stanza.
564
565 2003-10-30 Lars Knoll <lars@trolltech.com>
566 Michael Matz <matz@suse.de>
567 Jakub Jelinek <jakub@redhat.com>
568 Alan Modra <amodra@bigpond.net.au>
569
570 * merge.c (struct sec_merge_sec_info): Update comment.
571 (struct sec_merge_hash_entry): Remove entsize.
572 (sec_merge_hash_lookup): Only adjust alignment when creating.
573 (sec_merge_emit): Remove register keyword.
574 (cmplengthentry, last4_eq, last_eq): Delete.
575 (strrevcmp, strrevcmp_align, is_suffix): New.
576 (merge_strings): Use them to implement fast suffix merging.
577 * elf-strtab.c (struct elf_strtab_hash_entry): Update comments.
578 Make "len" signed.
579 (_bfd_elf_strtab_add): Lose on >2G strings.
580 (_bfd_elf_strtab_emit): Don't emit strings with len < 0.
581 (cmplengthentry, last4_eq): Delete.
582 (strrevcmp, is_suffix): New.
583 (_bfd_elf_strtab_finalize): Rework to implement fast suffix merging.
584
585 2003-10-29 Daniel Jacobowitz <drow@mvista.com>
586
587 * elf32-arm.h (elf32_arm_final_link_relocate): Move check for
588 SEC_ALLOC.
589
590 2003-10-29 Philip Blundell <philb@gnu.org>
591
592 * elf32-arm.h (elf32_arm_plt0_entry, elf32_arm_plt_entry): New
593 code sequence.
594 (PLT_HEADER_SIZE): New.
595 (struct elf32_arm_pcrel_relocs_copied): Rename to ...
596 (struct elf32_arm_relocs_copied): ... this. Count both
597 pcrel and non-pcrel relocs. All uses updated.
598 (struct elf32_arm_link_hash_table): Add pointers to dynamic linker
599 sections and symbol/section mapping cache.
600 (create_got_section): New.
601 (elf32_arm_create_dynamic_sections): New.
602 (elf_backend_create_dynamic_sections): Use it.
603 (elf32_arm_final_link_relocate): Support garbage collection of relocs.
604 (elf32_arm_check_relocs): Likewise.
605 (elf32_arm_adjust_dynamic_symbol): Likewise.
606 (elf32_arm_copy_indirect_symbol): New.
607 (elf32_arm_link_hash_table_create): Initialise new fields.
608 (elf32_arm_gc_sweep_hook): Implement.
609 (elf32_arm_discard_copies): Delete.
610 (elf32_arm_finish_dynamic_symbol): Use new PLT code.
611 (elf32_arm_finish_dynamic_sections): Likewise.
612 (elf_backend_can_refcount): Define.
613 (elf_backend_copy_indirect_symbol): Likewise.
614 (elf_backend_plt_header_size): Set to PLT_HEADER_SIZE.
615
616 2003-10-29 Alan Modra <amodra@bigpond.net.au>
617
618 * elf64-ppc.c (elf_backend_grok_prstatus): Define.
619 (elf_backend_grok_psinfo): Define.
620 (ppc64_elf_grok_prstatus, ppc64_elf_grok_psinfo): New functions.
621
622 * elf.c (_bfd_elfcore_make_pseudosection): Allow multiple
623 sections with the same name.
624 (elfcore_grok_lwpstatus): Likewise.
625 (elfcore_grok_win32pstatus): Likewise.
626 (elfcore_grok_note): Likewise.
627 (elfcore_grok_nto_status): Likewise.
628 (elfcore_grok_nto_gregs): Likewise.
629
630 2003-10-27 Daniel Jacobowitz <drow@mvista.com>
631
632 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Never skip dynamic
633 objects.
634
635 2003-10-14 Richard Sandiford <rsandifo@redhat.com>
636
637 * elfxx-mips.c (mips_elf_create_got_section): Initialize global_gotno.
638
639 2003-10-24 H.J. Lu <hongjiu.lu@intel.com>
640
641 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Look up
642 hash table for real symbols.
643
644 2003-10-23 Michael Snyder <msnyder@redhat.com>
645
646 * section.c (asection): Fix typo in comment.
647
648 2003-10-23 Alan Modra <amodra@bigpond.net.au>
649
650 * elf64-ppc.c (get_tls_mask): Add toc_symndx param, save toc
651 reloc symbol index to it. Don't allow gd syms in shared libs
652 to be optimized.
653 (ppc64_elf_tls_optimize): Adjust get_tls_mask call.
654 (ppc64_elf_size_stubs): Likewise.
655 (ppc64_elf_relocate_section): Check that tls relocs are only used
656 with tls syms, and similarly for non-tls. Correct symbol used
657 when optimizing toc tls code.
658
659 2003-10-22 Nick Clifton <nickc@redhat.com>
660
661 * peicode.h (coff_swap_scnhdr_in): Only remove padding when
662 processing an executable.
663
664 2003-10-22 Jakub Jelinek <jakub@redhat.com>
665
666 * elflink.c (_bfd_elf_export_symbol): Adjust for globals and locals
667 field changes.
668 (_bfd_elf_link_assign_sym_version): Likewise.
669 * elflink.h (size_dynamic_sections): Likewise.
670
671 2003-10-21 Alexandre Oliva <aoliva@redhat.com>,
672 Michael Snyder <msnyder@redhat.com>
673
674 * archures.c (bfd_mach_sh4a, bfd_mach_sh4al_dsp, bfd_mach_sh4_nofpu,
675 bfd_mach_sh4a_nofpu): New machine types.
676 * bfd-in2.h: Rebuilt.
677 * cpu-sh.c (compatible): Remove unused function.
678 (SH4A_NEXT, SH4AL_DSP_NEXT, SH4_NOFPU_NEXT, SH4A_NOFPU_NEXT): New.
679 (arch_info_struct): Add sh4a, sh4al_dsp, sh4-nofpu and sh4a-nofpu.
680 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle them.
681
682 2003-10-21 Wouter van Heyst <wouter@vidicode.nl>
683
684 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Correct text
685 describing mismatched formats involving the Maverick FP type.
686
687 2003-10-21 Anil Paranjpe <anilp1@KPITCummins.com>
688
689 * binary.c (binary_object_p): Pass machine flag along with
690 architecture.
691
692 2003-10-21 Thorsten Brehm <brehm@gmx.net>
693
694 * archures.c (bfd_default_scan): Add support for mcf528x.
695 * ieee.c (ieee_write_processor): Likewise.
696
697 2003-10-21 Peter Barada <pbarada@mail.wm.sps.mot.com>
698 Bernardo Innocenti <bernie@develer.com>
699
700 * archures.c: Add MCF528x (MCFv4) support.
701 * bfd/cpu-m68k.c (arch_info_struct): Likewise.
702 * bfd-in2.h: Regenerate.
703
704 2003-10-20 Andrew Cagney <cagney@redhat.com>
705
706 * targets.c: Replace "struct sec" with "struct bfd_section"
707 * syms.c, sparclynx.c, section.c, opncls.c: Ditto.
708 * libcoff-in.h, libbfd-in.h, elfxx-target.h: Ditto.
709 * elf.c, coffgen.c, bfd.c, bfd-in.h, aoutf1.h: Ditto.
710 * aout-tic30.c, aout-target.h:
711 * bfd-in2.h, libcoff.h, libbfd.h: Regenerate.
712
713 2003-10-18 Hans-Peter Nilsson <hp@bitrange.com>
714
715 Support linker relaxation of new R_MMIX_PUSHJ_STUBBABLE relocs.
716 * elf64-mmix.c (MAX_PUSHJ_STUB_SIZE): New macro.
717 (struct _mmix_elf_section_data): New member pjs.
718 (mmix_set_relaxable_size, mmix_elf_get_section_contents): New
719 functions.
720 (elf_mmix_howto_table): New entry for R_MMIX_PUSHJ_STUBBABLE.
721 (mmix_reloc_map): Ditto.
722 (mmix_elf_relocate_section): Handle R_MMIX_PUSHJ_STUBBABLE.
723 (mmix_final_link_relocate, mmix_elf_check_common_relocs): Ditto.
724 (mmix_elf_perform_relocation): Ditto. Don't mark parameter addr
725 unused.
726 (mmix_elf_check_relocs): Move early return to after
727 mmix_elf_check_common_relocs call.
728 (mmix_elf_symbol_processing): Fix cut-and-pasto in head comment.
729 (_bfd_mmix_before_linker_allocation): Rename from
730 _bfd_mmix_prepare_linker_allocated_gregs. All referers changed.
731 Arrange to set the initial relaxable size of sections.
732 (_bfd_mmix_after_linker_allocation): Rename from
733 _bfd_mmix_finalize_linker_allocated_gregs.
734 (mmix_elf_relax_section): Relax a R_MMIX_PUSHJ_STUBBABLE reloc.
735 (bfd_elf64_get_section_contents): Define.
736 * reloc.c: Add ENUMX for BFD_RELOC_MMIX_PUSHJ_STUBBABLE.
737 * libbfd.h, bfd-in2.h: Regenerate.
738
739 * reloc.c (bfd_generic_relax_section): Default-set
740 section->_cooked_size here.
741 (bfd_generic_get_relocated_section_contents): Don't set it here.
742 Explain why.
743
744 2003-10-17 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
745
746 * elf32-hppa.c (elf32_hppa_relocate_section): Skip relocation if
747 output section has been discarded.
748
749 2003-10-17 Shrinivas Atre <shrinivasa@KPITCummins.com>
750
751 * coff-h8300.c (funcvec_hash_newfunc): Handle normal mode.
752 (h8300_reloc16_extra_cases): Likewise.
753 (h8300_bfd_link_add_symbols): Likewise.
754
755 2003-10-17 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
756
757 * cpu-h8300.c (h8300sxn_info_struct): Correct address size.
758 (h8300sn_info_struct): Likewise.
759 (h8300hn_info_struct): Likewise.
760
761 2003-10-16 Pavel Roskin <proski@gnu.org>
762
763 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Don't calculate image size
764 for sections which lack size info.
765
766 2003-10-17 Danny Smith <dannysmith@users.sourceforge.net>
767
768 * configure.host: Add __USE_MINGW_FSEEK to HDEFINES for
769 mingw32.
770
771 2003-10-16 H.J. Lu <hongjiu.lu@intel.com>
772
773 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Also warn
774 undefined patterns with '*'.
775
776 2003-10-16 H.J. Lu <hongjiu.lu@intel.com>
777
778 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't
779 use the last CIE from a different section.
780 (_bfd_elf_write_section_eh_frame): Don't pad beyond the raw
781 size of the output section.
782
783 2003-10-07 Roland McGrath <roland@redhat.com>
784
785 * elf.c (_bfd_elf_make_section_from_phdr): Set alignment_power of
786 new section from p_align header field.
787
788 2003-10-16 H.J. Lu <hongjiu.lu@intel.com>
789
790 * elf32-xtensa.c (xtensa_read_table_entries): The external size
791 of entry is 8 bytes.
792
793 2003-10-15 Andrew Cagney <cagney@redhat.com>
794
795 * targets.c (BFD_JUMP_TABLE_SYMBOLS): Replace NAME##_get_symtab
796 with NAME##_canonicalize_symtab.
797 * libcoff-in.h (coff_canonicalize_symtab): Update.
798 * xsym.h (bfd_sym_canonicalize_symtab): Update.
799 * elf-bfd.h (_bfd_elf_canonicalize_symtab): Update.
800 * coffgen.c (coff_canonicalize_symtab): Update.
801 * libbfd-in.h (_bfd_nosymbols_canonicalize_symtab): Update.
802 * libnlm.h (nlmNAME(canonicalize_symtab)): Update.
803 * ieee.c (ieee_vec): Update comment.
804 * libecoff.h (_bfd_ecoff_canonicalize_symtab): Update.
805 * mmo.c (mmo_canonicalize_symtab): Update.
806 * nlm-target.h (nlm_canonicalize_symtab): Update.
807 * nlmcode.h (nlm_canonicalize_symtab): Update.
808 * i386msdos.c (msdos_canonicalize_symtab): Update.
809 * hp300hpux.c (MY (canonicalize_symtab)): Update.
810 * oasys.c (oasys_canonicalize_symtab): Update.
811 * som.c (som_canonicalize_symtab): Update.
812 * pef.c (bfd_pef_canonicalize_symtab): Update.
813 * nlmcode.h (nlm_canonicalize_symtab): Update.
814 * xsym.c (bfd_sym_canonicalize_symtab): Update.
815 * vms.c (vms_canonicalize_symtab): Update.
816 * versados.c (versados_canonicalize_symtab): Update.
817 * mach-o.c (bfd_mach_o_canonicalize_symtab): Update.
818 * ieee.c (ieee_canonicalize_symtab): Update.
819 * pdp11.c (NAME(aout,canonicalize_symtab)): Update.
820 * reloc.c: Update comment.
821 * libaout.h (NAME(aout,canonicalize_symtab)): Update.
822 * coff64-rs6000.c (aix5coff64_vec): Update.
823 * coff64-rs6000.c (bfd_xcoff_aix5_backend_data): Update.
824 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update.
825 * aoutx.h (NAME(aout,canonicalize_symtab)): Update.
826 * elfxx-target.h (bfd_elfNN_canonicalize_symtab): Update.
827 * hp300hpux.c (MY_canonicalize_symtab): Update.
828 * ecoff.c (_bfd_ecoff_canonicalize_symtab): Update.
829 * aout-tic30.c (MY_canonicalize_symtab): Update.
830 * aout-target.h (MY_canonicalize_symtab): Update.
831 * ppcboot.c (ppcboot_canonicalize_symtab): Update.
832 * elf.c (_bfd_elf_canonicalize_symtab): Update.
833 * elfcode.h (elf_canonicalize_symtab): Update.
834 * ihex.c (ihex_canonicalize_symtab): Update.
835 * tekhex.c (tekhex_canonicalize_symtab): Update.
836 * binary.c (binary_canonicalize_symtab): Update.
837 * srec.c (srec_canonicalize_symtab): Update.
838
839 2003-10-15 Kazu Hirata <kazu@cs.umass.edu>
840
841 * elf32-h8300.c (elf_reloc_map): Fix a comment typo.
842
843 2003-10-15 Kaz Kojima <kkojima@rr.iij4u.or.jp>
844
845 * elf32-sh.c (sh_elf_relocate_section): Handle R_SH_IMM_*_PCREL
846 relocations.
847 (sh_elf_check_relocs): Likewise.
848
849 * elf32-sh64.c (elf_backend_merge_symbol_attribute): Define.
850 (sh64_elf_merge_symbol_attribute): New.
851 * elf64-sh64.c (elf_backend_merge_symbol_attribute): Define.
852 (sh64_elf64_merge_symbol_attribute): New.
853
854 2003-10-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
855
856 * elf-bfd.h (struct elf_backend_data): New function pointer member
857 elf_backend_merge_symbol_attribute.
858 * elflink.h (elf_link_add_object_symbols): Adjust call to
859 elf_backend_merge_symbol_attribute if the backend defined it.
860 * elfxx-target.h (elf_backend_merge_symbol_attribute): New macro.
861 (elfNN_bed): Add that to the initializer.
862
863 2003-10-14 Bob Wilson <bob.wilson@acm.org>
864
865 * elf32-xtensa.c (get_is_linkonce_section): Delete.
866 (xtensa_is_property_section, xtensa_is_littable_section): Use
867 XTENSA_INSN_SEC_NAME and XTENSA_LIT_SEC_NAME macros. Do not recognize
868 linkonce sections containing ".xt.insn" and ".xt.lit" substrings.
869 (xtensa_get_property_section_name): Check section name instead of
870 calling get_is_linkonce_section. Remove unused bfd parameter. Use
871 XTENSA_INSN_SEC_NAME and XTENSA_LIT_SEC_NAME macros. Never generate
872 linkonce section names by appending ".xt.insn" or ".xt.lit".
873 (xtensa_read_table_entries): Remove bfd argument in call to
874 xtensa_get_property_section_name. Free section name when done.
875 (elf_xtensa_combine_prop_entries): Free leaking table.
876
877 2003-10-13 Richard Sandiford <rsandifo@redht.com>
878
879 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Don't add
880 DT_MIPS_LIBLIST or DT_MIPS_CONFLICT entries.
881 (_bfd_mips_elf_finish_dynamic_symbol): Don't handle them. Don't
882 handle DT_MIPS_MSYM. Set DT_RELSZ based on the number of relocations
883 that were needed.
884 (_bfd_mips_elf_modify_segment_map): Fix placement of PT_MIPS_OPTIONS.
885 (_bfd_mips_elf_merge_private_bfd_data): Ignore EF_MIPS_UCODE.
886
887 2003-10-13 H.J. Lu <hongjiu.lu@intel.com>
888
889 * bfd-in.h (bfd_elf32_ia64_after_parse): New prototype.
890 (bfd_elf64_ia64_after_parse): Likewise.
891 * bfd-in2.h: Regenerated.
892
893 * elfxx-ia64.c (oor_ip): New.
894 (oor_branch_size): Likewise.
895 (bfd_elfNN_ia64_after_parse): Likewise.
896 (elfNN_ia64_relax_section): Use oor_ip if oor_branch_size
897 equals sizeof (oor_ip).
898
899 2003-10-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
900
901 * elf64-sh64.c (sh_elf64_relocate_section): Tidy up for the
902 renumbering of some relocation numbers.
903
904 2003-10-11 Alan Modra <amodra@bigpond.net.au>
905
906 * coff-sh.c: Move definition of MAP and guard more code with
907 COFF_IMAGE_WITH_PE.
908
909 * section.c (bfd_get_section_size_before_reloc): Ignore reloc_done.
910 * bfd-in2.h: Regenerate.
911
912 2003-10-10 H.J. Lu <hongjiu.lu@intel.com>
913
914 * Makefile.am: Run "make dep-am".
915 * Makefile.in: Regenerate.
916 * doc/Makefile.in: Likewise.
917
918 2003-10-09 H.J. Lu <hongjiu.lu@intel.com>
919
920 * cofflink.c: Include "safe-ctype.h".
921 (coff_link_add_symbols): Use ISDIGIT instead of isdigit.
922
923 2003-10-08 Dave Brolley <brolley@redhat.com>
924 On behalf of Michael Snyder <msnyder@redhat.com>
925
926 * archures.c: Add FRV fr550 machine.
927 * cpu-frv.c: Ditto.
928 * elf32-frv.c: Ditto.
929 * bfd-in2.h: Regenerate.
930
931 2003-10-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
932
933 * elfxx-mips.c (STUB_MOVE,STUB_LI16): Fix stub code
934 for non-SGI N64 ABI. Improve code consitency.
935
936 2003-10-07 Alexandre Oliva <aoliva@redhat.com>
937
938 * elf32-frv.c (elf32_frv_howto_table): Set R_FRV_LABEL16's
939 rightshift to 2.
940
941 2003-10-07 Nathan Sidwell <nathan@codesourcery.com>
942
943 * libbfd-in.h (_bfd_link_section_stabs): Add string offset
944 parameter.
945 * cofflink.c (coff_link_add_symbols): Deal with split stab
946 sections.
947 * elflink.h (elf_link_add_object_symbols): Deal with split stab
948 sections.
949 * stabs.c (_bfd_link_section_stabs): Add string offset parameter.
950 * libbfd.h: Regenerated.
951
952 * coffcode.h (coff_set_alignment_hook): With PE_COFF reloc
953 overflow, set reloc start position to after the count
954 reloc. Subtract one from num relocs. Give error on 0xffff relocs
955 and no overflow.
956 * cofflink.c (_bfd_coff_final_link): Deal with PE_COFF reloc
957 overflow.
958 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Do overflow if >=
959 0xffff.
960
961 2003-10-06 H.J. Lu <hongjiu.lu@intel.com>
962
963 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Pad the
964 last CIE/FDE if needed.
965
966 2003-10-06 Nick Clifton <nickc@redhat.com>
967
968 * targets.c (_bfd_target_vector): Include bfd_elf64_sparc_vec if
969 BFD64 is enabled.
970
971 2003-10-06 Matt Thomas <matt@3am-software.com>
972
973 * config.bfd: Move the hppa*-*-netbsd* case to the hppa*-*-linux* case.
974
975 2003-10-06 Robert Millan <robertmh@gnu.org>
976
977 * configure.in: Match GNU/KNetBSD with new knetbsd*-gnu triplet.
978 * config.bfd: Likewise.
979 * configure: Regenerate.
980
981 2003-10-04 Christian Groessler <chris@groessler.org>
982
983 * coff-z8k.c (extra_case): Fix displacement length check for R_JR
984 and R_CALLR.
985
986 2003-10-04 Stephane Carrez <stcarrez@nerim.fr>
987
988 * elf32-m68hc1x.c: Update to ISO C90; replace PTR with void*.
989 * elf32-m68hc11.c: Likewise.
990 * elf32-m68hc12.c: Likewise.
991 * elf32-m68hc1x.h: Likewise.
992
993 2003-10-04 Stephane Carrez <stcarrez@nerim.fr>
994
995 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Fix merge
996 of flags between HC12 and HCS12.
997
998 2003-10-04 Bryce McKinlay <bryce@mckinlay.net.nz>
999
1000 * merge.c (_bfd_merge_sections): Set SEC_EXCLUDE flag on sections
1001 which become empty after merging.
1002
1003 2003-09-30 Jakub Jelinek <jakub@redhat.com>
1004
1005 * elfxx-ia64.c (ia64_howto_table): Fix size of R_IA64_TPREL64[LM]SB,
1006 R_IA64_DTPREL{32,64}[LM]SB and R_IA64_DTPMOD64[LM]SB.
1007
1008 2003-09-30 Chris Demetriou <cgd@broadcom.com>
1009
1010 * archures.c (bfd_mach_mipsisa64r2): New define.
1011 * bfd-in2.h: Regenerate.
1012 * aoutx.h (NAME(aout,machine_type)): Handle bfd_mach_mipsisa64r2.
1013 * cpu-mips.c (I_mipsisa64r2): New enum value.
1014 (arch_info_struct): Add entry for I_mipsisa64r2.
1015 * elfxx-mips.c (_bfd_elf_mips_mach)
1016 (_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_64R2.
1017 (mips_set_isa_flags): Add bfd_mach_mipsisa64r2 case.
1018 (mips_mach_extensions): Add entry for bfd_mach_mipsisa64r2.
1019
1020 2003-09-29 H.J. Lu <hongjiu.lu@intel.com>
1021
1022 * elfxx-ia64.c (elfNN_hpux_backend_symbol_processing): New.
1023 Handle SHN_IA_64_ANSI_COMMON.
1024 (elf_backend_section_from_bfd_section): Defined.
1025
1026 2003-09-26 H.J. Lu <hongjiu.lu@intel.com>
1027
1028 * elflink.c (elf_link_read_relocs_from_section): Add an argument
1029 of a pointer to section. Check bad symbol index.
1030 (_bfd_elf_link_read_relocs): Modify calls to
1031 elf_link_read_relocs_from_section.
1032
1033 2003-09-23 DJ Delorie <dj@redhat.com>
1034
1035 * elf32-sh.c (sh_elf_howto_table): R_SH_SWITCH8,
1036 R_SH_GNU_VTINHERIT, R_SH_GNU_VTENTRY,
1037 R_SH_LOOP_START,R_SH_LOOP_END moved to "reserved" spaces,
1038 R_SH_DIR16, R_SH_DIR8, R_SH_DIR8UL, R_SH_DIR8UW, R_SH_DIR8U,
1039 R_SH_DIR8SW, R_SH_DIR8S, R_SH_DIR4UL, R_SH_DIR4UW, R_SH_DIR4U,
1040 R_SH_PSHA, R_SH_PSHL added.
1041 (sh_reloc_map): Add R_SH_DIR16 and R_SH_DIR8.
1042 (sh_elf_relocate_section): Support new relocs.
1043
1044 2003-09-23 Bob Wilson <bob.wilson@acm.org>
1045
1046 * elf32-xtensa.c (elf_xtensa_relocate_section): Fix typo that clobbered
1047 dynamic relocation offsets.
1048
1049 2003-09-23 Alan Modra <amodra@bigpond.net.au>
1050
1051 * simple.c (bfd_simple_get_relocated_section_contents): Free the
1052 hash table using _bfd_generic_link_hash_table_free.
1053
1054 2003-09-23 Alan Modra <amodra@bigpond.net.au>
1055
1056 * elf-bfd.h (struct bfd_elf_special_section): Remove "suffix". Change
1057 type of prefix_length and suffix_length to int. Rename "attributes"
1058 to "attr". Comment.
1059 (_bfd_elf_get_sec_type_attr): Update prototype.
1060 * elf.c (get_special_section): Rewrite.
1061 (_bfd_elf_get_sec_type_attr): Return struct rather than passing in
1062 attr and type pointers.
1063 (_bfd_elf_new_section_hook): Adjust for above.
1064 (special_sections): Merge suffix with prefix. Set
1065 prefix_length for all entries. Set suffix_length appropriately.
1066 * elf32-m32r.c (m32r_elf_special_sections): Likewise.
1067 * elf32-m68hc11.c (elf32_m68hc11_special_sections): Likewise.
1068 * elf32-m68hc12.c (elf32_m68hc12_special_sections): Likewise.
1069 * elf32-mcore.c (mcore_elf_special_sections): Likewise.
1070 * elf32-sh64.c (sh64_elf_special_sections): Likewise.
1071 * elf32-v850.c (v850_elf_special_sections): Likewise.
1072 * elf32-xtensa.c (elf_xtensa_special_sections): Likewise.
1073 * elf64-alpha.c (elf64_alpha_special_sections): Likewise.
1074 * elf64-hppa.c (elf64_hppa_special_sections): Likewise.
1075 * elf64-ppc.c (ppc64_elf_special_sections): Likewise.
1076 * elf64-sh64.c (sh64_elf64_special_sections): Likewise.
1077 * elfxx-ia64.c (elfNN_ia64_special_sections): Likewise.
1078 * elfxx-mips.c (_bfd_mips_elf_special_sections): Likewise.
1079 * elf32-ppc.c (ppc_elf_special_sections): Likewise. Fix .plt flags.
1080
1081 2003-09-21 Daniel Jacobowitz <drow@mvista.com>
1082
1083 * elf64-alpha.c (elf64_alpha_create_got_section): Initialize
1084 ->got if the section already exists.
1085
1086 2003-09-19 Nathan Sidwell <nathan@codesourcery.com>
1087
1088 * dwarf2.c (decode_line_info): Cope with an initially empty
1089 filename table.
1090
1091 2003-09-18 H.J. Lu <hongjiu.lu@intel.com>
1092
1093 * acinclude.m4: Include ../config/accross.m4.
1094 * aclocal.m4: Regenerated.
1095
1096 * configure.host (HOST_64BIT_TYPE): Remove if it is set to long
1097 or long long.
1098 (HOST_U_64BIT_TYPE): Remove if it is set to unsigned long long.
1099 (host64): Remove if HOST_64BIT_TYPE is set to long.
1100
1101 * configure.in (HOST_64BIT_TYPE): Set according to the size of
1102 long and long long.
1103 (HOST_U_64BIT_TYPE): Likewise.
1104 (host64): Likewise.
1105 * configure: Regenerated.
1106
1107 2003-09-19 Alan Modra <amodra@bigpond.net.au>
1108
1109 * elf.c (elfcore_write_note): Don't use sizeof(Elf_External_note)
1110 since some ABIs round up the size of the struct.
1111
1112 2003-09-18 H.J. Lu <hongjiu.lu@intel.com>
1113
1114 * elflink.c (_bfd_elf_merge_symbol): Allow type change if
1115 the old symbol is undefined and the new symbol is defined.
1116
1117 2003-09-18 Andreas Schwab <schwab@suse.de>
1118
1119 * simple.c (bfd_simple_get_relocated_section_contents): Use
1120 _bfd_generic_link_hash_table_create instead of
1121 bfd_link_hash_table_create.
1122
1123 2003-09-10 H.J. Lu <hongjiu.lu@intel.com>
1124
1125 * elfxx-ia64.c (elfNN_ia64_special_sections): Mark all sections
1126 started with ".sbss" or "".sdata" as SHF_IA_64_SHORT.
1127
1128 2003-09-10 John David Anglin <dave.anglin@nrc-cnrc.nrc.ca>
1129 Randolph Chung <randolph@tausq.org>
1130
1131 * elf32-hppa.c (struct elf32_hppa_link_hash_entry,
1132 hppa_link_hash_newfunc, hppa_build_one_stub,
1133 elf32_hppa_adjust_dynamic_symbol, mark_PIC_calls, allocate_plt_static,
1134 allocate_dynrelocs, elf32_hppa_size_dynamic_sections,
1135 elf32_hppa_finish_dynamic_symbol): Remove pic_call field and all code
1136 for generating import stubs for calls to statically linked PIC
1137 functions.
1138 (hppa_type_of_stub): Don't generate an import stub for calls to
1139 statically linked pic functions. Generate import stubs for calls
1140 in a shared object, to functions not in a regular file, and to
1141 defined weak functions. Add new argument INFO.
1142 (hppa_build_one_stub): Don't undef ADDIL_DP.
1143 (elf32_hppa_check_relocs): Don't set SEC_HAS_GOT_REF flag.
1144 (elf32_hppa_size_stubs): Pass info to hppa_type_of_stub.
1145 (final_link_relocate): Change all DLTIND relocs to DPREL relocs in a
1146 non-shared link. Convert instructions that use the the linkage table
1147 pointer, or a facsimile thereof, to use the global data pointer when
1148 the reloc has been changed.
1149
1150 2003-09-08 Joel Brobecker <brobecker@gnat.com>
1151
1152 * archures.c: Add new machine names for hppa.
1153 * bfd-in2.h: Regenerate.
1154 * cpu-hppa.c: Use the new machine names.
1155
1156 2003-09-06 Stephane Carrez <stcarrez@nerim.fr>
1157
1158 * elf32-m68hc1x.h (struct m68hc11_elf_link_hash_table): Remove
1159 all_local_syms member.
1160 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Use bfd_elf_get_elf_syms
1161 to get the local symbols.
1162
1163 2003-09-06 Stephane Carrez <stcarrez@nerim.fr>
1164
1165 * elf32-m68hc12.c (elf32_m68hc12_special_sections): New for hc11.
1166 (elf_backend_special_sections): Define.a
1167
1168 PR savannah/4950:
1169 * elf32-m68hc11.c (elf32_m68hc11_special_sections): The .vectors
1170 section is read-only.
1171
1172 2003-09-04 Nick Clifton <nickc@redhat.com>
1173
1174 * archures.c (bfd_mach_v850e1): Define.
1175 * bfd-in2.h: Regenerate.
1176 * cpu-v850.h (scan): Accept bfd_mach_v850e1.
1177 (arch_info_struct): Include an entry for bfd_mach_v850e1.
1178 * elf32-v850.c (v850_elf_object_p): Accept E_V850E1_ARCH flag.
1179 (v850_elf_final_write_processing): Accept bfd_mach_v850e1.
1180 (v850_elf_print_private_bfd_data): Interpret E_V850E1_ARCH flag.
1181 (v850_elf_merge_private_bfd_data): Allow v850e1 binaries to be
1182 linked with v850e binaries. Mark the output as v850e.
1183
1184 2003-09-03 Nick Clifton <nickc@redhat.com>
1185
1186 * cofflink.c (_bfd_coff_link_input_bfd): Do not skip section
1187 symbols that are used in relocs.
1188
1189 2003-08-30 Robert Millan <robertmh@gnu.org>
1190
1191 * configure.in: Match GNU/KFreeBSD with new kfreebsd*-gnu triplet.
1192 * config.bfd: Likewise.
1193 * configure: Regenerate.
1194
1195 2003-08-31 Christian Groessler <chris@groessler.org>
1196
1197 * elf32-i860.c (i860_howto_pc26_reloc): Finish relocation here
1198 instead of returning bfd_reloc_continue.
1199
1200 2003-08-31 Andreas Jaeger <aj@suse.de>
1201
1202 * merge.c: Update to ISO C90.
1203
1204 2003-08-27 Ian Lance Taylor <ian@airs.com>
1205
1206 * configure.in: Check for strtoull.
1207 * bfd.c (bfd_scan_vma): Use strtoull when available.
1208 * configure, config.in: Regenerate.
1209
1210 * configure.in: Define and substitute BFD_HOST_LONG_LONG.
1211 * bfd-in.h: Define BFD_HOST_LONG_LONG. Test it rather than
1212 __GNUC__ when deciding whether to use long long for
1213 BFD_HOST_64_BIT.
1214 * configure, Makefile.in, doc/Makefile.in, bfd-in2.h: Regenerate.
1215
1216 2003-08-27 Christian Groessler <chris@groessler.org>
1217
1218 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc,
1219 i860_howto_splitn_reloc, i860_howto_highadj_reloc): New
1220 functions.
1221 (elf32_i860_howto_table): Insert the new functions as
1222 'special_function's in the proper reloc type entries.
1223
1224 2003-08-27 Richard Sandiford <rsandifo@redhat.com>
1225
1226 * elf32-frv.c (elf32_frv_relocate_section): Use
1227 _bfd_elf_rela_local_sym.
1228
1229 2003-08-26 Michael Snyder <msnyder@redhat.com>
1230
1231 * cpu-frv.c: Remove unused enum.
1232
1233 2003-08-25 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
1234
1235 * reloc.c: Fix documentation for MIPS ELF relocations.
1236 libbfd.h: Regenerate.
1237 bfd-in2.h: Regenerate.
1238
1239 2003-08-24 Jason Eckhardt <jle@rice.edu>
1240
1241 * coff-i860.c (CALC_ADDEND): Define to be a no-op.
1242
1243 2003-08-24 Jason Eckhardt <jle@rice.edu>
1244
1245 * elf32-i860.c (elf32_i860_relocate_pc16): Subtract 4 and
1246 shift by 2 before storing the relocated value.
1247
1248 2003-08-23 Jason Eckhardt <jle@rice.edu>
1249
1250 * coff-i860.c (coff_i860_reloc_nyi): New function.
1251 (howto_table): Add entries for relocations PAIR, HIGHADJ, HIGH,
1252 LOWn, SPLITn, and BRADDR.
1253 (RTYPE2HOWTO): Check that the r_type is within the howto_table
1254 before trying to access the entry.
1255 (coff_i860_rtype_to_howto): Likewise.
1256 (coff_i860_reloc_type_lookup): New function.
1257 (i860_reloc_processing): New function.
1258 (coff_bfd_reloc_type_lookup): Define macro.
1259 (RELOC_PROCESSING): Define macro.
1260 Minor formatting adjustments.
1261
1262 2003-08-23 Alan Modra <amodra@bigpond.net.au>
1263
1264 * elflink.h (elf_link_add_object_symbols): Don't crash on NULL owner.
1265
1266 2003-08-22 H.J. Lu <hongjiu.lu@intel.com>
1267
1268 * elfxx-ia64.c (elfNN_ia64_create_dynamic_sections): Align the
1269 .got section at 8 bytes.
1270
1271 2003-08-21 Nick Clifton <nickc@redhat.com>
1272
1273 * cofflink.c: Update to ISO C90 and tidy up formatting.
1274
1275 2003-08-21 Randolph Chung <tausq@debian.org>
1276
1277 * elf32-hppa.c (elf32_hppa_object_p): For elf32-hppa-linux, objects
1278 can have OSABI=Linux or OSABI=SysV. Check for both.
1279 * elf64-hppa.c (elf64_hppa_object_p): Likewise.
1280
1281 2003-08-21 Nick Clifton <nickc@redhat.com>
1282
1283 * po/sv.po: Updated Swedish translation.
1284
1285 2003-08-20 Richard Sandiford <rsandifo@redhat.com>
1286
1287 * elf64-mips.c (elf_backend_copy_indirect_symbol): Define.
1288
1289 2003-08-20 Nick Clifton <nickc@redhat.com>
1290
1291 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): New macro used to
1292 replace some duplicated code in most elfxx-xxxx.c files. This
1293 version uses the new fields in bfd_link_info.
1294
1295 * elf-m10300.c (mn10300_elf_relocate_section): Use new macro.
1296 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
1297 * elf32-cris.c (cris_elf_relocate_section): Likewise.
1298 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
1299 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1300 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
1301 * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
1302 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1303 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1304 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1305 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1306 * elf32-vax.c (elf_vax_relocate_section): Likewise.
1307 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
1308 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
1309 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1310 * elf64-s390.c (elf_s390_relocate_section): Likewise.
1311 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1312 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1313 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
1314
1315 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols,
1316 elf_hppa_remark_useless_dynamic_symbols,
1317 elf_hppa_relocate_section): Use the new fields in
1318 bfd_link_info structure.
1319 * elf32-sh.c (sh_elf_relocate_section): Likewise.
1320 * elf64-alpha.c (elf64_alpha_check_relocs): Likewise.
1321 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
1322 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
1323 * elfxx-ia64.c (elfNN_ia64_check_relocs): Likewise.
1324 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
1325
1326 * elflink.h (elf_link_output_extsym): Fix test for reporting
1327 undefined symbols in shared libraries. Remove redundant test
1328 of shlib_undefined when reporting references to forced local
1329 symbols.
1330
1331 2003-08-18 Andreas Schwab <schwab@suse.de>
1332
1333 * libpei.h (bfd_pe_executable_p): Also recognize efi-app
1334 executables.
1335
1336 2003-08-17 Hans-Peter Nilsson <hp@bitrange.com>
1337
1338 * simple.c (bfd_simple_get_relocated_section_contents): Move
1339 reloc_done hack to before first bfd_section_size call. Change all
1340 returns to use new wrapper macro RETURN, restoring sec->reloc_done.
1341
1342 2003-08-16 Alan Modra <amodra@bigpond.net.au>
1343
1344 * elf64-ppc.c: Don't include elf/ppc.h.
1345
1346 2003-08-14 Richard Sandiford <rsandifo@redhat.com>
1347
1348 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Fix PT_DYNAMIC
1349 code to work with 64-bit bfds.
1350
1351 2003-08-14 Alan Modra <amodra@bigpond.net.au>
1352
1353 * dep-in.sed: Remove libintl.h.
1354 * Makefile.am (SRC-POTFILES.in, BLD-POTFILES.in): Unset LC_COLLATE.
1355 (POTFILES.in): Remove target.
1356 * Makefile.in: Regenerate.
1357
1358 2003-08-12 Alan Modra <amodra@bigpond.net.au>
1359
1360 * elf64-ppc.c (ppc64_elf_next_input_section): Update comment.
1361 (ppc64_elf_relocate_section): For zero sym R_PPC64_TOC relocs,
1362 use the function sym from the previous reloc.
1363
1364 2003-08-11 Jakub Jelinek <jakub@redhat.com>
1365
1366 * elf32-i386.c (elf_i386_relocate_section): Make undefined symbols
1367 fatal if -pie.
1368 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1369 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1370 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
1371 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1372 * elf64-s390.c (elf_s390_relocate_section): Likewise.
1373 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1374 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1375 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
1376 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1377 (ppc_elf_relocate_section) <case R_PPC_RELAX32>: Issue fatal error
1378 on undefined symbols if -pie.
1379 * elf32-sh.c (sh_elf_relocate_section): Likewise.
1380
1381 2003-08-11 Alan Modra <amodra@bigpond.net.au>
1382
1383 * elf64-ppc.c (ppc64_elf_relocate_section): Add special case for crt1.o
1384 branch to __libc_start_main.
1385
1386 2003-08-08 Dmitry Diky <diwil@mail.ru>
1387
1388 * archures.c: Add xW42 and xE42 parts. Sort MPU list according to
1389 gcc order.
1390 * cpu-msp430.c: Likewise.
1391 * elf32-msp430.c: Likewise.
1392 * bfd-in2.h: Regenerate.
1393
1394 2003-08-07 Alan Modra <amodra@bigpond.net.au>
1395
1396 * elfxx-target.h: Remove PTR cast.
1397 * targets.c (bfd_target): Make backend_data const void *.
1398 * elf-bfd.h: Constify all occurrences of struct elf_backend_data.
1399 * elf-m10300.c: Likewise.
1400 * elf.c: Likewise.
1401 * elf32-hppa.c: Likewise.
1402 * elf32-i386.c: Likewise.
1403 * elf32-m68hc1x.c: Likewise.
1404 * elf32-ppc.c: Likewise.
1405 * elf32-s390.c: Likewise.
1406 * elf32-sh.c: Likewise.
1407 * elf32-sh64.c: Likewise.
1408 * elf32-sparc.c: Likewise.
1409 * elf32-xtensa.c: Likewise.
1410 * elf64-mips.c: Likewise.
1411 * elf64-ppc.c: Likewise.
1412 * elf64-s390.c: Likewise.
1413 * elf64-sh64.c: Likewise.
1414 * elf64-sparc.c: Likewise.
1415 * elf64-x86-64.c: Likewise.
1416 * elfcode.h: Likewise.
1417 * elfcore.h: Likewise.
1418 * elflink.c: Likewise.
1419 * elflink.h: Likewise.
1420 * elfxx-ia64.c: Likewise.
1421 * elfxx-mips.c: Likewise.
1422 * elfxx-mips.h: Likewise.
1423 * elf.c (prep_headers): Remove useless check for null backend_data.
1424 * bfd-in2.h: Regenerate.
1425
1426 * elf-bfd.h: Remove PARAMS macro. Replace PTR with void *.
1427 (NAME): Use ## rather than CONCAT4 macro.
1428 * elfcode.h: Remove one remaining PARAMS macro.
1429 * elf-eh-frame.c: Convert to C90, remove unneeded casts and prototypes.
1430 * elf-strtab.c: Likewise.
1431 * elf-hppa.h: Likewise.
1432 * elf32-hppa.h: Likewise.
1433 * elf32-hppa.c: Likewise.
1434 (elf32_hppa_add_symbol_hook): Delete.
1435 (elf_backend_add_symbol_hook): Don't define.
1436 * libhppa.h: Convert to C90. Replace INLINE with inline.
1437
1438 2003-08-06 Alan Modra <amodra@bigpond.net.au>
1439
1440 * elf64-ppc.c (ppc_stub_name): Tweak names for better readability.
1441 (ppc64_elf_adjust_dynamic_symbol): Allow copy relocs against
1442 function descriptors, but warn.
1443 (ppc_build_one_stub): Remove a couple of vars. Move code creating
1444 stub syms so that we can avoid a stub sym if we already have a
1445 plt sym. Do not redefine an existing symbol.
1446 (ppc64_elf_build_stubs): When --emit-stub-syms, print a symbol for
1447 glink.
1448
1449 2003-08-06 Nick Clifton <nickc@redhat.com>
1450
1451 * po/fr.po: Updated French translation.
1452
1453 2003-08-06 Alan Modra <amodra@bigpond.net.au>
1454
1455 * elflink.c (_bfd_elf_create_dynamic_sections): Mark .dynbss with
1456 SEC_LINKER_CREATED.
1457
1458 2003-08-05 Daniel Jacobowitz <drow@mvista.com>
1459
1460 * elf32-arm.h (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
1461 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Use it.
1462
1463 2003-08-03 Jeff Muizelaar <muizelaar@rogers.com>
1464
1465 * coffcode.h (coff_slurp_line_table): Return with a warning
1466 message if the line number table could not be read.
1467
1468 2003-08-04 Nick Clifton <nickc@redhat.com>
1469
1470 * elflink.h (elf_link_add_object_symbols): Prepend "warning: "
1471 to messages produced for .gnu.warning.SYMBOL sections.
1472
1473 2003-08-04 Alan Modra <amodra@bigpond.net.au>
1474
1475 * elfcode.h: Convert to C90, remove unneeded casts and prototypes.
1476 * elfcore.h: Likewise.
1477 * elflink.c: Likewise.
1478 * elflink.h: Likewise.
1479 * elf.c (sym_is_global): Remove INLINE.
1480 (align_file_position): Replace INLINE with inline.
1481 * elfcode.h (elf_swap_dyn_in, elf_swap_dyn_out): Remove INLINE.
1482 (elf_file_p): Replace INLINE with inline.
1483
1484 2003-08-02 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1485
1486 * elf32-sh.c (sh_elf_check_relocs): Don't set DF_TEXTREL here.
1487
1488 2003-08-01 H.J. Lu <hongjiu.lu@intel.com>
1489
1490 * elfxx-ia64.c (get_got): Align the .got section at 8 bytes.
1491
1492 2003-08-01 H.J. Lu <hongjiu.lu@intel.com>
1493
1494 * elfxx-ia64.c (elfNN_ia64_finish_dynamic_symbol): Use
1495 ElfNN_External_Rela instead of Elf64_External_Rela.
1496
1497 2003-08-01 Nick Clifton <nickc@redhat.com>
1498
1499 * config.bfd: Add code to catch obsolete configurations and warn
1500 about them unless --enable-obsolete is used. Use this to mark
1501 vax-vms port as obsolete.
1502
1503 2003-07-30 Alan Modra <amodra@bigpond.net.au>
1504
1505 * elf32-ppc.c (ppc_elf_install_value): Tidy.
1506 (ppc_elf_relax_section): Remove dead code. Remove unnecessary casts.
1507 Formatting.
1508 * elfxx-target.h: Remove PARAMS macro. Formatting.
1509
1510 2003-07-30 Alan Modra <amodra@bigpond.net.au>
1511
1512 * elf.c (bfd_section_from_r_symndx): Test for SHN_UNDEF.
1513 * elf64-ppc.c (get_fdh): New function, split out from
1514 ppc64_elf_edit_opd.
1515 (ppc64_elf_check_relocs): Use get_fdh.
1516 (func_desc_adjust): Likewise. Tidy.
1517 (ppc64_elf_edit_opd): Tighten reloc checks. Free local_syms on error
1518 exit. Use get_fdh. Account for superfluous dynamic relocs.
1519 (ppc64_elf_relocate_section): Warning fix.
1520
1521 2003-07-30 Jason Eckhardt <jle@rice.edu>
1522
1523 * coff-i860.c: Convert to ISO C90. Remove superflous prototypes.
1524
1525 2003-07-30 Jason Eckhardt <jle@rice.edu>
1526
1527 * elf32-i860.c: Convert to ISO C90. Remove superflous prototypes.
1528
1529 2003-07-30 Randolph Chung <tausq@debian.org>
1530
1531 * elf-hppa.h (elf_hppa_relocate_section): Look up dyn_h for undefweak.
1532 * elf64-hppa.c (elf64_hppa_finalize_dlt): Check h->root.type.
1533
1534 2003-07-30 Alan Modra <amodra@bigpond.net.au>
1535
1536 * elf.c: Convert to C90, remove unnecessary prototypes and casts.
1537 Replace PTR with void *. Formatting.
1538 (_bfd_elf_assign_file_position_for_section): Remove INLINE.
1539 (make_mapping): Likewise.
1540
1541 2003-07-29 Alan Modra <amodra@bigpond.net.au>
1542
1543 * elf64-ppc.c (func_desc_adjust): Give linker created function
1544 descriptor symbols a size and type.
1545 (ppc64_elf_relocate_section): Correct lq insn test.
1546
1547 2003-07-28 Eric Christopher <echristo@redhat.com>
1548
1549 * elf32-ppc.c (R_PPC_RELAX32): New relocation.
1550 (ppc_elf_install_value): New function.
1551 (ppc_elf_sort_rela): Remove.
1552 (ppc_elf_relax_section): Rewrite. Remove old relaxation
1553 and replace with out of range branch stubs.
1554 (ppc_elf_relocate_section): Handle R_PPC_RELAX32.
1555
1556 2003-07-29 Alexandre Oliva <aoliva@redhat.com>
1557
1558 * elf-m10300.c (mn10300_elf_relax_section): Take symbol hash table
1559 from input_bfd.
1560
1561 2003-07-28 Alan Modra <amodra@bigpond.net.au>
1562
1563 * elf.c (special_sections): Set attributes for .got and .plt.
1564
1565 2003-07-27 Alan Modra <amodra@bigpond.net.au>
1566
1567 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Ensure no copy relocs
1568 on function descriptors.
1569 (ELIMINATE_COPY_RELOCS): Expand comment.
1570 (ppc64_elf_special_sections): Move. Don't include non-ppc64 sections.
1571 Do include ".toc1".
1572
1573 2003-07-25 H.J. Lu <hongjiu.lu@intel.com>
1574
1575 * elf.c (_bfd_elf_new_section_hook): Set the default section
1576 type to SHT_NULL.
1577 (elf_fake_sections): Set the section type based on asect->flags
1578 if it is SHT_NULL. Don't abort on processor specific section
1579 types.
1580
1581 2003-07-25 H.J. Lu <hongjiu.lu@intel.com>
1582
1583 * bfd-in2.h: Regenerated.
1584
1585 2003-07-25 H.J. Lu <hongjiu.lu@intel.com>
1586
1587 * elf-bfd.h (bfd_elf_special_section): New.
1588 (elf_backend_data): Add special_sections, a pointer to
1589 bfd_elf_special_section.
1590 (elf_section_type). New.
1591 (elf_section_flags): New.
1592 (_bfd_elf_get_sec_type_attr): New.
1593
1594 * elf.c (_bfd_elf_make_section_from_shdr): Always use the
1595 real section type/flags.
1596 (special_sections): New.
1597 (get_special_section): New.
1598 (_bfd_elf_get_sec_type_attr): New.
1599 (_bfd_elf_new_section_hook): Check special_section to set
1600 elf_section_type and elf_section_flags.
1601 (elf_fake_sections): Don't use section name to set ELF section
1602 data.
1603
1604 * elf32-m32r.c (m32r_elf_special_sections): New.
1605 (elf_backend_special_sections): Defined.
1606
1607 * elf32-m68hc11.c (elf32_m68hc11_special_sections): New.
1608 (elf_backend_special_sections): Defined.
1609
1610 * elf32-mcore.c (mcore_elf_special_sections): New.
1611 (elf_backend_special_sections): Defined.
1612
1613 * elf32-ppc.c (ppc_elf_special_sections): New.
1614 (elf_backend_special_sections): Defined.
1615
1616 * elf32-sh64.c (sh64_elf_special_sections): New.
1617 (elf_backend_special_sections): Defined.
1618
1619 * elf32-v850.c (v850_elf_special_sections): New.
1620 (elf_backend_special_sections): Defined.
1621
1622 * elf32-xtensa.c (elf_xtensa_special_sections): New.
1623 (elf_backend_special_sections): Defined.
1624
1625 * elf64-alpha.c (elf64_alpha_special_sections): New.
1626 (elf_backend_special_sections): Defined.
1627
1628 * elf64-hppa.c (elf64_hppa_special_sections): New.
1629 (elf_backend_special_sections): Defined.
1630
1631 * elf64-ppc.c (ppc64_elf_special_sections): New.
1632 (elf_backend_special_sections): Defined.
1633
1634 * elf64-sh64.c (sh64_elf64_special_sections): New.
1635 (elf_backend_special_sections): Defined.
1636
1637 * elfxx-ia64.c (elfNN_ia64_special_sections): New.
1638 (elf_backend_special_sections): Defined.
1639
1640 * elfxx-mips.c (_bfd_mips_elf_special_sections): New.
1641
1642 * elfxx-mips.h (_bfd_mips_elf_special_sections): New.
1643 (elf_backend_special_sections): Defined.
1644
1645 * elfxx-target.h (elf_backend_special_sections): New. Default
1646 to NULL.
1647 (elfNN_bed): Initialize special_sections.
1648
1649 * section.c (bfd_abs_section): Remove const.
1650 (bfd_und_section): Likewise.
1651 (bfd_com_section): Likewise.
1652 (bfd_ind_section): Likewise.
1653
1654 2003-07-24 Nick Clifton <nickc@redhat.com>
1655
1656 * coff-arm.c (EXTRA_S_FLAGS): Include SEC_CODE so that code
1657 sections are assigned the LOAD attribute.
1658
1659 2003-07-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1660
1661 * elf32-sh.c: Convert to C90. Replace PTR with void *.
1662 * elf32-sh64-com.c: Likewise.
1663 * elf32-sh64.c: Likewise.
1664 * elf32-sh64.h: Likewise.
1665 * elf64-sh64.c: Likewise.
1666
1667 2003-07-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1668
1669 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
1670 (allocate_dynrelocs): Likewise.
1671 (sh_elf_relocate_section): Likewise. Use SYMBOL_REFERENCES_LOCAL.
1672 (sh_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
1673
1674 2003-07-24 Nick Clifton <nickc@redhat.com>
1675
1676 * po/fr.po: Updated French translation.
1677
1678 2003-07-23 Bob Wilson <bob.wilson@acm.org>
1679
1680 * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Make inline and move
1681 near the beginning of the file. Swap order of arguments. Call
1682 _bfd_elf_dynamic_symbol_p with "ignore_protected" set to 0.
1683 (elf_xtensa_fix_refcounts): Adjust xtensa_elf_dynamic_symbol_p call.
1684 (elf_xtensa_relocate_section): Likewise.
1685 (shrink_dynamic_reloc_sections): Likewise.
1686
1687 2003-07-23 Bob Wilson <bob.wilson@acm.org>
1688
1689 * elf32-xtensa.c (plt_reloc_count): Fix typo in comment.
1690 (elf_xtensa_size_dynamic_sections): Use elf_discarded_section.
1691 (elf_xtensa_combine_prop_entries): Avoid returning non-zero without
1692 first printing an error message.
1693 (elf_xtensa_finish_dynamic_sections): Likewise.
1694 (elf_xtensa_discard_info_for_section): Adjust size of .got.loc when
1695 discarding literal table entries.
1696 (elf_xtensa_merge_private_bfd_data): Remove newline from error message.
1697 (elf_xtensa_do_asm_simplify): Likewise.
1698
1699 2003-07-23 Stephane Carrez <stcarrez@nerim.fr>
1700
1701 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Avoid crash when
1702 we have a local symbol in common section.
1703
1704 2003-07-22 H.J. Lu <hongjiu.lu@intel.com>
1705
1706 * elflink.c (_bfd_elf_dynamic_symbol_p): Don't return TRUE for
1707 weak symbols.
1708
1709 2003-07-22 Nick Clifton <nickc@redhat.com>
1710
1711 * coffcode.h (coff_slurp_symbol_table): Add C_TCSYM and C_ECOML to
1712 expected RS6000 storage classes.
1713
1714 2003-07-21 H.J. Lu <hongjiu.lu@intel.com>
1715
1716 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Mark
1717 output_bfd unused to silence gcc.
1718
1719 2003-07-21 Nick Clifton <nickc@redhat.com>
1720
1721 * po/sv.po: Updated Swedish translation.
1722
1723 2003-07-21 Alan Modra <amodra@bigpond.net.au>
1724
1725 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Use..
1726 (_bfd_elf_symbol_refs_local_p): ..this. Declare.
1727 * elflink.c (_bfd_elf_symbol_refs_local_p): New function.
1728 * elf32-i386.c (elf_i386_relocate_section): Remove h NULL test
1729 now done in _bfd_elf_symbol_refs_local_p.
1730 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1731 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1732 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1733
1734 2003-07-18 H.J. Lu <hongjiu.lu@intel.com>
1735
1736 * elflink.c (_bfd_elf_dynamic_symbol_p): Undo the last change.
1737
1738 2003-07-18 H.J. Lu <hongjiu.lu@intel.com>
1739
1740 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL): Fix a typo.
1741 (SYMBOL_CALLS_LOCAL): Likewise.
1742
1743 * elflink.c (_bfd_elf_dynamic_symbol_p): Return TRUE
1744 immediately if symbol isn't defined locally.
1745
1746 2003-07-18 Richard Henderson <rth@redhat.com>
1747
1748 * elflink.c (_bfd_elf_dynamic_symbol_p): New.
1749 * elf-bfd.h (_bfd_elf_dynamic_symbol_p): Declare it.
1750 (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Use it.
1751 * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Likewise.
1752 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
1753 * elf64-hppa.c (elf64_hppa_dynamic_symbol_p): Likewise.
1754 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Likewise.
1755 Update all callers to provide the relocation being resolved.
1756
1757 2003-07-17 Shaun Jackman <sjackman@pathwayconnect.com>
1758
1759 * config.bfd (arm-wince-pe): Add -DARM_COFF_BUGFIX to
1760 targ_cflags.
1761
1762 2003-07-17 Nick Clifton <nickc@redhat.com>
1763
1764 * po/es.po: New Spanish translation.
1765 * po/sv.po: New Swedish translation.
1766 * po/opcodes.pot: Regenerate.
1767
1768 2003-07-16 Richard Henderson <rth@redhat.com>
1769
1770 * config.bfd, configure.host, configure.in: Remove ia64-aix support.
1771 * elfxx-ia64.c, targets.c: Likewise.
1772
1773 2003-07-16 Richard Henderson <rth@redhat.com>
1774
1775 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Properly return false
1776 for symbols defined locally plus -Bsymbolic. Tidy logic.
1777
1778 2003-07-15 Richard Sandiford <rsandifo@redhat.com>
1779
1780 * archures.c (bfd_mach_mips7000): New.
1781 * bfd-in2.h: Regenerated.
1782 * cpu-mips.c (arch_info_struct): Add an entry for mips:7000.
1783 * elfxx-mips.c (mips_set_isa_flags): Handle bfd_mach_mips7000.
1784 (mips_mach_extensions): Add an entry for it.
1785
1786 2003-07-14 Nick Clifton <nickc@redhat.com>
1787
1788 * po/tr.po: Update with latest version.
1789 * po/SRC-POTFILES.in: Regenerate.
1790 * po/bfd.pot: Regenerate.
1791 * Makfile.in: Regenerate.
1792 * configure: Regenerate.
1793
1794 2003-07-12 Jeff Baker <jbaker@qnx.com>
1795
1796 * bfd/config.bfd (__QNXTARGET__): Define for Neutrino architectures.
1797 * bfd/elf32-arm.h (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1798 * bfd/elf32-sh.c (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1799 * bfd/elf32-ppc.c (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1800
1801 2003-07-12 Jeff Muizelaar <muizelaar@rogers.com>
1802
1803 * coffcode.h (coff_set_section_contents): Set the
1804 IMAGE_FILE_32BIT_MACHINE flag for PE targets.
1805
1806 2003-07-11 Richard Sandiford <rsandifo@redhat.com>
1807
1808 * bfd-in.h (bfd_h8300_pad_address): Declare.
1809 * bfd-in2.h: Regenerate.
1810 * cpu-h8300.c (bfd_h8300_pad_address): New function.
1811 * coff-h8300.c (h8300_reloc16_estimate): Use it to canonicalize
1812 addresses before checking whether they can be relaxed.
1813 (h8300_reloc16_extra_cases): Likewise for the R_MOVL2 sanity check.
1814 Don't complain about overflows in general 8-bit relocations.
1815 * elf32-h8300.c (elf32_h8_relax_section): Use bfd_h8300_pad_address.
1816 Fix handling of R_H8_DIR24A8.
1817
1818 2003-07-11 Richard Sandiford <rsandifo@redhat.com>
1819
1820 * elf32-h8300.c: Convert function prototypes and definitions
1821 to C90 syntax.
1822 * coff-h8300.c: Likewise.
1823 * cpu-h8300.c: Likewise.
1824
1825 2003-07-11 Alan Modra <amodra@bigpond.net.au>
1826
1827 * po/SRC-POTFILES.in: Regenerate.
1828 * po/bfd.pot: Likewise.
1829
1830 2003-07-10 Bob Wilson <bob.wilson@acm.org>
1831
1832 * elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Create new
1833 .got.loc section. Do not set SEC_ALLOC or SEC_LOAD flags for the
1834 .xt.lit.plt section.
1835 (elf_xtensa_size_dynamic_sections): Set size of the .got.loc section
1836 and allocate memory for it.
1837 (elf_xtensa_combine_prop_entries): Copy contents of .xt.lit output
1838 section to the .got.loc section.
1839 (elf_xtensa_finish_dynamic_sections): Fix up call to
1840 elf_xtensa_combine_prop_entries and set DT_XTENSA_GOT_LOC_OFF to
1841 the address of .got.loc.
1842 (relax_property_section): Shrink .got.loc to match changes in any
1843 literal table section.
1844 (xtensa_is_property_section): Change to match
1845 xtensa_get_property_section_name.
1846 (xtensa_is_littable_section): New.
1847
1848 2003-07-10 H.J. Lu <hongjiu.lu@intel.com>
1849
1850 * elfxx-ia64.c (IA64_HOWTO): Set dst_mask to -1 instead of
1851 -1LL.
1852
1853 2003-07-10 Alan Modra <amodra@bigpond.net.au>
1854
1855 * Makefile.am (BFD32_BACKENDS): Add elf32-am33lin.lo.
1856 (BFD32_BACKENDS_CFILES): elf32-am33lin.c not elf32-am33lin.lo.
1857 Run "make dep-am".
1858 * Makefile.in: Regenerate.
1859
1860 2003-07-10 Alexandre Oliva <aoliva@redhat.com>
1861
1862 2001-09-12 Alexandre Oliva <aoliva@redhat.com>
1863 * elf32-am33lin.c (ELF_MACHINE_CODE): Redefine to EM_MN10300.
1864 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10300.
1865 2001-06-02 Nick Clifton <nickc@cambridge.redhat.com>
1866 * elf32-am33lin.c: Rename global functions.
1867 2001-05-09 Alexandre Oliva <aoliva@redhat.com>
1868 * config.bfd (am33_2.0, am33_2.0-*-linux*): Added.
1869 * configure.in (bfd_elf32_am33lin_vec): Added.
1870 * Makefile.am (BFD32_BACKENDS): Added elf32-am33lin.lo.
1871 (elf32-am33lin.lo): List dependencies.
1872 * aclocal.m4, configure, Makefile.in: Rebuilt.
1873 * elf-m10300.c (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME,
1874 ELF_ARCH, ELF_MACHINE_CODE, ELF_MAXPAGESIZE): Define only if
1875 ELF_ARCH was not defined before.
1876 (elf_symbol_leading_char): Define if not defined.
1877 * elf32-am33lin.c: Override the definitions above.
1878 * targets.c (bfd_elf32_am33lin_vec): New.
1879
1880 2003-07-09 Alexandre Oliva <aoliva@redhat.com>
1881
1882 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
1883 * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Initialize
1884 pcrel_relocs_copied.
1885 2001-12-13 Alexandre Oliva <aoliva@redhat.com>
1886 * elf-m10300.c (ELF_DYNAMIC_INTERPRETER): Renamed from
1887 ld-linux.so.2 to ld.so.1.
1888 2001-10-10 Alexandre Oliva <aoliva@redhat.com>
1889 * elf-m10300.c (elf_mn10300_sizeof_plt0): New macro.
1890 (_bfd_mn10300_elf_adjust_dynamic_symbol): Use it.
1891 (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
1892 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Allocate
1893 .rela.* section contents with bfd_zalloc.
1894 2001-09-25 Alexandre Oliva <aoliva@redhat.com>
1895 * elf-m10300.c: Added declarations for functions missing them.
1896 Merge some shared-library changes from the i386 back-end. Use
1897 R_MN10300_RELATIVE instead of R_MN10300_PCREL32 and
1898 R_MN10300_GLOB_DAT instead of R_MN10300_32 where appropriate.
1899 (struct elf32_mn10300_link_hash_entry): Remove duplicates of
1900 members of elf_link_hash_entry. Adjusted references.
1901 (mn10300_elf_final_link_relocate): dynobj was already loaded
1902 into a local variable, use it.
1903 2001-09-21 Nick Clifton <nickc@cambridge.redhat.com>
1904 * elf-m10300.c: Add missing function prototypes.
1905 2001-08-24 Alexandre Oliva <aoliva@redhat.com>
1906 * elf-m10300.c (mn10300_elf_relocate_section): Don't compute
1907 relocation for dynamic relocations.
1908 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
1909 * reloc.c (BFD_RELOC_MN10300_GOTOFF24): New.
1910 * elf-m10300.c: Introduce GOTPC16, GOTOFF24, GOTOFF16 and
1911 PLT16, and rename GOTPC to GOTPC32 and GOTOFF to GOTOFF32.
1912 (_bfd_mn10300_elf_create_dynamic_sections): Move creation ot PLT...
1913 (_bfd_mn10300_elf_create_got_section): ... here, so that its
1914 adress is already known at the time we compute relaxations.
1915 (mn10300_elf_relax_section): Relax GOTPC32, GOTOFF32, GOT32
1916 and PLT32 to narrower relocations.
1917 * libbfd.h, bfd-in2.h: Rebuilt.
1918 2001-04-12 Alexandre Oliva <aoliva@redhat.com>
1919 * reloc.c (BFD_RELOC_MN10300_GOT32, BFD_RELOC_MN10300_GOT24,
1920 BFD_RELOC_MN10300_GOT16, BFD_RELOC_MN10300_COPY,
1921 BFD_RELOC_MN10300_GLOB_DAT, BFD_RELOC_MN10300_JMP_SLOT,
1922 BFD_RELOC_MN10300_RELATIVE): New relocs.
1923 * libbfd.h, bfd-in2.h: Rebuilt.
1924 * elf-m10300.c (struct elf_mn10300_pcrel_relocs_copied): New.
1925 (struct elf32_mn10300_link_hash_entry): Added DSO-related
1926 fields.
1927 (elf_mn10300_howto): Defined new relocation types.
1928 (mn10300_reloc_map): Map them.
1929 (_bfd_mn10300_elf_create_got_section): New fn.
1930 (mn10300_elf_check_relocs): Handle PIC relocs.
1931 (mn10300_elf_final_link_relocate): Likewise.
1932 (mn10300_elf_relocate_section): Handle DSOs.
1933 (PLT0_ENTRY_SIZE, PLT_ENTRY_SIZE, PIC_PLT_ENTRY_SIZE): New macros.
1934 (elf_mn10300_plt0_entry, elf_mn10300_plt_entry,
1935 elf_mn10300_pic_plt_entry): New.
1936 (elf_mn10300_sizeof_plt, elf_mn10300_plt_plt0_offset,
1937 elf_mn10300_plt0_linker_offset, elf_mn10300_plt0_gotid_offset,
1938 elf_mn10300_plt_temp_offset, elf_mn10300_plt_symbol_offset,
1939 elf_mn10300_plt_reloc_offset: New macros.
1940 (ELF_DYNAMIC_INTERPRETER): Likewise.
1941 (_bfd_mn10300_elf_create_dynamic_sections): New function.
1942 (_bfd_mn10300_elf_adjust_dynamic_symbol): Likewise.
1943 (_bfd_mn10300_elf_discard_copies): Likewise.
1944 (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
1945 (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
1946 (_bfd_mn10300_elf_finish_dynamic_sections): Likewise.
1947 (elf_backend_can_gc_sections,
1948 elf_backend_create_dynamic_sections,
1949 elf_backend_adjust_dynamic_sections,
1950 elf_backend_size_dynamic_sections,
1951 elf_backend_finish_dynamic_symbol,
1952 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
1953 elf_backend_plt_readonly, elf_backend_want_plt_sym,
1954 elf_backend_got_header_size, elf_backend_plt_header_size): New
1955 macros.
1956
1957 2003-07-09 Alexandre Oliva <aoliva@redhat.com>
1958
1959 2001-05-06 Alexandre Oliva <aoliva@redhat.com>
1960 * elf-m10300.c (compute_function_info): Account for AM33
1961 registers in `movm' when computing stack space for `call' when
1962 linking for AM33/2.0 link.
1963 2000-04-01 Alexandre Oliva <aoliva@cygnus.com>
1964 * archures.c (bfd_mach_am33_2): Renamed from bfd_mach_am332.
1965 * bfd-in2.h: Rebuilt.
1966 * cpu-m10300.c (bfd_am33_2_arch): Renamed from bfd_am332_arch.
1967 * elf-m10300.c: Updated.
1968 2000-03-31 Alexandre Oliva <aoliva@cygnus.com>
1969 * archures.c (bfd_mach_am332): Defined.
1970 * bfd-in2.h: Rebuilt.
1971 * cpu-m10300.c (bfd_am332_arch): Defined.
1972 (bfd_am33_arch): Chained with am33-2.
1973 * elf-m10300.c (elf_mn10300_mach): Handle am332.
1974 (_bfd_mn10300_elf_final_write_processing): Likewise.
1975
1976 2003-07-09 H.J. Lu <hongjiu.lu@intel.com>
1977
1978 * elfxx-ia64.c (IA64_HOWTO): Set dst_mask to -1LL.
1979
1980 2003-07-10 Alan Modra <amodra@bigpond.net.au>
1981
1982 * elf64-ppc.c (bfd_elf64_mkobject): Define.
1983 (struct ppc64_elf_obj_tdata): New.
1984 (ppc64_elf_tdata, ppc64_tlsld_got): Define.
1985 (ppc64_elf_mkobject): New function.
1986 (struct got_entry): Add "owner". Move "tls_type".
1987 (struct ppc_link_hash_table): Delete "relgot", "tlsld_got".
1988 (ppc64_elf_init_stub_bfd): New function.
1989 (create_got_section): Create header .got in dynobj. Create .got
1990 and .rela.got in each bfd. Stash pointers in ppc64_elf_obj_tdata.
1991 (ppc64_elf_create_dynamic_sections): Don't call create_got_section.
1992 Look for dynobj .got, and test it.
1993 (ppc64_elf_copy_indirect_symbol): Adjust for changed got.
1994 (update_local_sym_info): Likewise.
1995 (ppc64_elf_check_relocs): Likewise.
1996 (ppc64_elf_gc_sweep_hook): Likewise.
1997 (ppc64_elf_tls_optimize): Likewise.
1998 (allocate_dynrelocs): Likewise.
1999 (ppc64_elf_size_dynamic_sections): Likewise.
2000 (ppc64_elf_relocate_section): Likewise.
2001 (ppc64_elf_next_toc_section): Update comment.
2002 (toc_adjusting_stub_needed): Remove unneeded cast.
2003 (ppc64_elf_build_stubs): Check for stub sections in stub bfd by
2004 testing section flags.
2005 (ppc64_elf_build_stubs): Likewise.
2006 (ppc64_elf_size_stubs): Likewise. Remove stub_bfd param.
2007 (ppc64_elf_finish_dynamic_sections): Write out got sections.
2008 (func_desc_adjust): Copy over dynamic info for undef weaks.
2009 * elf64-ppc.h (ppc64_elf_init_stub_bfd): Declare.
2010 (ppc64_elf_size_stubs): Update prototype.
2011 * elflink.h (elf_link_sort_relocs): Use link_orders to find reldyn
2012 input sections rather than scanning dynobj.
2013
2014 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
2015
2016 * elfxx-mips.c (mips_elf_link_hash_entry): Remove min_dyn_reloc_index.
2017 (bfd_mips_elf_swap_msym_in, bfd_mips_elf_swap_msym_out): Delete.
2018 (mips_elf_create_msym_section): Delete.
2019 (mips_elf_create_dynamic_relocation): Don't set min_dyn_reloc_index.
2020 (_bfd_mips_elf_copy_indirect_symbol): Likewise.
2021 (_bfd_mips_elf_create_dynamic_sections): Don't create .msym.
2022 (_bfd_mips_elf_size_dynamic_sections): Don't calculate its size.
2023 (_bfd_mips_elf_size_dynamic_sections): Don't add DT_MIPS_MSYM.
2024 (_bfd_mips_elf_finish_dynamic_symbol): Don't add symbols to .msym.
2025 (_bfd_mips_elf_finish_dynamic_sections): Likewise.
2026
2027 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
2028
2029 * elfxx-mips.c (mips_elf_irix6_finish_dynamic_symbol): Make the
2030 symbols protected.
2031
2032 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
2033
2034 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Fix handling
2035 of relocations whose offset is -2.
2036
2037 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
2038
2039 * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): Treat
2040 forced-local symbols like other locals. Don't create relocations
2041 against STN_UNDEF in irix objects.
2042
2043 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
2044
2045 * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): In SGI-
2046 compatible objects, add the values of defined external symbols
2047 to the addend.
2048
2049 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
2050
2051 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Always
2052 initialize a GOT entry to the symbol's st_value.
2053
2054 2003-07-08 Alan Modra <amodra@bigpond.net.au>
2055
2056 * elf-bfd.h (struct elf_obj_tdata): Move linker_section_pointers..
2057 * elf32-ppc.c (struct ppc_elf_obj_tdata): ..to here. New.
2058 (ppc_elf_tdata): Define.
2059 (elf_local_ptr_offsets): Adjust.
2060 (ppc_elf_mkobject): New function.
2061 (bfd_elf32_mkobject): Define.
2062
2063 * elfcode.h (elf_object_p): Allocate tdata via _bfd_set_format.
2064 * elfcore.h (elf_core_file_p): Likewise.
2065 * section.c (bfd_section_init): Remove prototype.
2066
2067 2003-07-08 Alan Modra <amodra@bigpond.net.au>
2068
2069 * elf-bfd.h (struct elf_link_hash_entry): Remove linker_section_pointer
2070 field.
2071 (enum elf_linker_section_enum): Delete.
2072 (struct elf_linker_section): Delete.
2073 (struct elf_linker_section_pointers): Delete.
2074 (struct elf_obj_tdata): Remove #if 0 chunk. Remove linker_section.
2075 Make linker_section_pointers a void**.
2076 (elf_local_ptr_offsets, elf_linker_section): Don't define.
2077 * elf32-ppc.c (enum elf_linker_section_enum): New, cut-down version
2078 of old item in elf-bfd.h.
2079 (struct elf_linker_section): Likewise.
2080 (struct elf_linker_section_pointers): Likewise.
2081 (elf_local_ptr_offsets): Define.
2082 (struct ppc_elf_link_hash_entry): Add linker_section_pointer.
2083 (ppc_elf_link_hash_newfunc): Init it.
2084 (struct ppc_elf_link_hash_table): Add sbss.
2085 (ppc_elf_link_hash_table_create): zmalloc rather than clearing
2086 individual fields.
2087 (elf_create_linker_section): Fold into..
2088 (ppc_elf_create_linker_section): ..here. Remove hole_size code.
2089 Make rela section here if shared.
2090 (elf_find_pointer_linker_section): Pass lsect rather than enum.
2091 (elf_create_pointer_linker_section): Adjust. zalloc rather than
2092 clearing in a loop.
2093 (elf_finish_pointer_linker_section): Adjust. Don't make rela
2094 section here.
2095 (ppc_elf_check_relocs): Adjust.
2096 (ppc_elf_add_symbol_hook): Tighten hash creator test. Remove code
2097 creating .sbss by hand.
2098 * elf.c (_bfd_elf_link_hash_newfunc): Adjust.
2099
2100 2003-07-04 Jakub Jelinek <jakub@redhat.com>
2101
2102 * elf32-s390.c (elf_howto_table): Change R_390_GOT12 to
2103 complain_overflow_bitfield.
2104 * elf64-s390.c (elf_howto_table): Change R_390_GOT12 to
2105 complain_overflow_bitfield.
2106
2107 2003-07-04 Jakub Jelinek <jakub@redhat.com>
2108
2109 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Return
2110 true even if -pie.
2111
2112 2003-07-04 Jakub Jelinek <jakub@redhat.com>
2113
2114 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add rel_fptr_sec.
2115 (elfNN_ia64_dynamic_symbol_p): Change info->shared into
2116 !info->executable.
2117 (get_fptr): For -pie create .opd as writable section and create
2118 .rela.opd as well.
2119 (elfNN_ia64_check_relocs): Change info->shared into
2120 !info->executable.
2121 (allocate_fptr): Likewise.
2122 (allocate_dynrel_entries): Account for a relative reloc for -pie
2123 @fptr(). Don't account for a relative reloc if -pie want_ltoff_fptr
2124 for undefweak symbol. Account for an IPLT reloc in .rela.opd
2125 section if -pie.
2126 (set_got_entry): Don't create a relative reloc if -pie
2127 want_ltoff_fptr for undefweak symbol.
2128 (set_fptr_entry): Emit an IPLT reloc in .rela.opd for -pie.
2129 (elfNN_ia64_relocate_section): Emit a relative reloc for -pie
2130 @fptr().
2131
2132 * elfxx-ia64.c (elfNN_ia64_relocate_section): Issue undefined_symbol
2133 even if -pie.
2134 * elf32-i386.c (elf_i386_relocate_section): Likewise.
2135 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
2136 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
2137 * elf64-s390.c (elf_s390_relocate_section): Likewise.
2138 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
2139 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
2140 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
2141 * elf32-s390.c (elf_s390_relocate_section): Likewise.
2142 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2143
2144 2003-07-04 Paul Clarke <paulc@senet.com.au>
2145
2146 * elf32-h8300.c (R_H8_DIR32A16): Fix name field.
2147 (elf32_h8_relax_section) <R_H8_DIR16A8>: Adjust position of relocation.
2148 <R_H8_DIR32A16>: Fix type of relocation.
2149
2150 2003-07-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2151
2152 * elf32-sh.c (sh_elf_create_dynamic_sections): Return if dynamic
2153 sections were created already. Remove unnecessary tests of
2154 the previous change.
2155
2156 2003-07-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2157
2158 * elf32-sh.c (sh_elf_create_dynamic_sections): Don't call
2159 bfd_make_section for existing sections.
2160
2161 2003-07-04 Alan Modra <amodra@bigpond.net.au>
2162
2163 * elf32-sparc.c (elf32_sparc_check_relocs): Don't call
2164 create_got_section if we already have done so.
2165 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
2166 (sh_elf_check_relocs): Likewise.
2167 (sh_elf_adjust_dynamic_symbol): Delete "dynobj" var. Use
2168 htab->root.dynobj instead.
2169 (sh_elf_check_relocs): Likewise.
2170 (sh_elf_finish_dynamic_sections): Likewise.
2171
2172 * section.c (bfd_make_section): Return NULL for existing section.
2173
2174 2003-07-04 Alan Modra <amodra@bigpond.net.au>
2175
2176 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Don't call
2177 ppc_elf_create_got if we've already done so.
2178
2179 * elf-bfd.h (_bfd_elf_create_linker_section) Don't declare.
2180 (_bfd_elf_find_pointer_linker_section): Likewise.
2181 (bfd_elf32_create_pointer_linker_section): Likewise.
2182 (bfd_elf32_finish_pointer_linker_section): Likewise.
2183 (bfd_elf64_create_pointer_linker_section): Likewise.
2184 (bfd_elf64_finish_pointer_linker_section): Likewise.
2185 (_bfd_elf_make_linker_section_rela): Likewise.
2186 * elfcode.h (elf_create_pointer_linker_section): Don't define.
2187 (elf_finish_pointer_linker_section): Likewise.
2188 * elflink.c (_bfd_elf_make_linker_section_rela): Delete.
2189 (_bfd_elf_create_linker_section): Move this function..
2190 (_bfd_elf_find_pointer_linker_section): ..and this..
2191 * elflink.h (elf_create_pointer_linker_section): ..and this..
2192 (elf_finish_pointer_linker_section): ..and this..
2193 * elf32-ppc.c: ..to here, renaming to the following, and adjusting
2194 calls.
2195 (elf_create_linker_section): Convert to C90, tidy.
2196 (elf_find_pointer_linker_section): Likewise.
2197 (elf_create_pointer_linker_section): Likewise.
2198 (elf_finish_pointer_linker_section): Likewise.
2199 * elf32-i370.c: Delete #if 0 code.
2200
2201 2003-07-02 Alan Modra <amodra@bigpond.net.au>
2202
2203 * elf64-ppc.c (ppc64_elf_func_desc_adjust): Don't allow _savef* and
2204 _restf* to be satisfied by shared libs, and always force them local.
2205 (toc_adjusting_stub_needed): Avoid scanning linker created sections.
2206 Correct test for "bl".
2207 (ppc64_elf_relocate_section <R_PPC64_TLS>): Correct test for
2208 primary opcode 31.
2209
2210 2003-07-01 Martin Schwidefsky <schwidefsky@de.ibm.com>
2211
2212 * elf32-s390.c (s390_elf_ldisp_reloc): New prototype.
2213 (s390_tls_reloc): New function.
2214 (elf_howto_table): Add long displacement relocations R_390_20,
2215 R_390_GOT20, R_390_GOTPLT20 and R_390_TLS_GOTIE20.
2216 (elf_s390_reloc_type_lookup): Likewise.
2217 (elf_s390_check_relocs): Likewise.
2218 (elf_s390_gc_sweep_hook): Likewise.
2219 (elf_s390_relocate_section): Likewise.
2220 * elf64-s390.c: Same changes as for elf32-s390.c.
2221 * reloc.c: Add long displacement relocations BFD_RELOC_390_20,
2222 BFD_RELOC_390_GOT20, BFD_RELOC_390_GOTPLT20 and
2223 BFD_RELOC_390_TLS_GOTIE20.
2224 * bfd-in2.h: Regenerate.
2225 * libbfd.h: Likewise.
2226
2227 2003-06-30 Alan Modra <amodra@bigpond.net.au>
2228
2229 * cpu-ia64-opc.c (ext_imms_scaled): Don't sign extend using shifts.
2230 (ins_imms, ins_immsm1u4): Likewise. Warning fix.
2231
2232 2003-06-29 Alan Modra <amodra@bigpond.net.au>
2233
2234 * archive.c: Convert to C90, remove unnecessary prototypes and casts.
2235 Replace PTR with void *. Formatting.
2236 * archive64.c: Likewise.
2237 * archures.c: Likewise.
2238 * bfd-in.h: Likewise.
2239 * bfd.c: Likewise.
2240 * bfdio.c: Likewise.
2241 * bfdwin.c: Likewise.
2242 * cache.c: Likewise.
2243 * corefile.c: Likewise.
2244 * format.c: Likewise.
2245 * init.c: Likewise.
2246 * libbfd-in.h: Likewise.
2247 * libbfd.c: Likewise.
2248 * linker.c: Likewise.
2249 * opncls.c: Likewise.
2250 * reloc.c: Likewise.
2251 * section.c: Likewise.
2252 * simple.c: Likewise.
2253 * syms.c: Likewise.
2254 * targets.c: Likewise.
2255 * bfd-in2.h: Regenerate.
2256 * libbfd.h: Regenerate.
2257
2258 * ecoff.c (bfd_debug_section): Add missing kept_section initialization.
2259 * libbfd-in.h (_bfd_sh_align_load_span): Don't declare if defined.
2260 * libbfd.c (COERCE32, EIGHT_GAZILLION): Simplify.
2261 (bfd_getb64): Rewrite without parens.
2262 (bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
2263 * cache.c (insert, snip): Remove INLINE.
2264 * linker.c (bfd_link_add_undef): Likewise.
2265
2266 2003-06-29 Andreas Jaeger <aj@suse.de>
2267
2268 * elf64-x86-64.c: Convert to ISO C90 prototypes, remove
2269 unnecessary prototypes. Replace PTR with void *.
2270 (elf64_x86_64_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL to
2271 trim plt entries. Move undefweak non-default visibility test ...
2272 (allocate_dynrelocs): ... from here.
2273 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
2274 Change all callers.
2275 (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL. Use
2276 SYMBOL_REFERENCES_LOCAL for dynreloc check.
2277 (elf64_x86_64_relocate_section): Use SYMBOL_CALLS_LOCAL for
2278 dynreloc and .got relocs.
2279 (elf64_x86_64_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL
2280 for .got relocs.
2281
2282 2003-06-29 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2283
2284 * elfxx-mips.c: Allow lazy binding for R_MIPS_JALR.
2285
2286 2003-06-27 Nick Clifton <nickc@redhat.com>
2287
2288 * opncls.c (bfd_add_gnu_debuglink_section): Rename to
2289 bfd_add_gnu_debuglink_section and only create the section, do not
2290 fill in its contents.
2291 (bfd_fill_in_gnu_debuglink_section): New function. Fill in the
2292 contents of a .gnu-debuglink section.
2293 * bfd-in2.h: Regenerate.
2294
2295 2003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2296
2297 * elfxx-mips.c: Revert .got alignment to 2**4.
2298
2299 2003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2300
2301 * elf32-mips.c: Fix addend for _gp_disp special symbol.
2302
2303 2003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2304
2305 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Remove non-default
2306 relocation header setup.
2307
2308 2003-06-25 Alan Modra <amodra@bigpond.net.au>
2309
2310 * elf32-ppc.c (ppc_elf_howto_table): Remove unnecessary cast.
2311 (ppc_elf_reloc_type_lookup): Modify comment.
2312 (ppc_elf_info_to_howto): Ditto.
2313 (ppc_elf_relocate_section): Ditto.
2314 (ppc_elf_check_relocs): Call ppc_elf_howto_init.
2315
2316 2003-06-25 Alan Modra <amodra@bigpond.net.au>
2317
2318 * aout-ns32k.c: Correct spelling of "relocatable".
2319 * aoutx.h: Likewise.
2320 * bfd-in.h: Likewise.
2321 * bfd.c: Likewise.
2322 * bout.c: Likewise.
2323 * coff-a29k.c: Likewise.
2324 * coff-alpha.c: Likewise.
2325 * coff-arm.c: Likewise.
2326 * coff-i386.c: Likewise.
2327 * coff-i860.c: Likewise.
2328 * coff-i960.c: Likewise.
2329 * coff-m68k.c: Likewise.
2330 * coff-m88k.c: Likewise.
2331 * coff-mcore.c: Likewise.
2332 * coff-mips.c: Likewise.
2333 * coff-or32.c: Likewise.
2334 * coff-ppc.c: Likewise.
2335 * coff-rs6000.c: Likewise.
2336 * coff-sh.c: Likewise.
2337 * coff-tic80.c: Likewise.
2338 * coff64-rs6000.c: Likewise.
2339 * cofflink.c: Likewise.
2340 * cpu-ns32k.c: Likewise.
2341 * ecoff.c: Likewise.
2342 * ecofflink.c: Likewise.
2343 * elf-bfd.h: Likewise.
2344 * elf-eh-frame.c: Likewise.
2345 * elf-hppa.h: Likewise.
2346 * elf-m10200.c: Likewise.
2347 * elf-m10300.c: Likewise.
2348 * elf.c: Likewise.
2349 * elf32-arm.h: Likewise.
2350 * elf32-avr.c: Likewise.
2351 * elf32-cris.c: Likewise.
2352 * elf32-d10v.c: Likewise.
2353 * elf32-dlx.c: Likewise.
2354 * elf32-fr30.c: Likewise.
2355 * elf32-frv.c: Likewise.
2356 * elf32-h8300.c: Likewise.
2357 * elf32-hppa.c: Likewise.
2358 * elf32-i370.c: Likewise.
2359 * elf32-i386.c: Likewise.
2360 * elf32-i860.c: Likewise.
2361 * elf32-i960.c: Likewise.
2362 * elf32-ip2k.c: Likewise.
2363 * elf32-iq2000.c: Likewise.
2364 * elf32-m32r.c: Likewise.
2365 * elf32-m68hc11.c: Likewise.
2366 * elf32-m68hc1x.c: Likewise.
2367 * elf32-m68k.c: Likewise.
2368 * elf32-mcore.c: Likewise.
2369 * elf32-mips.c: Likewise.
2370 * elf32-msp430.c: Likewise.
2371 * elf32-openrisc.c: Likewise.
2372 * elf32-ppc.c: Likewise.
2373 * elf32-s390.c: Likewise.
2374 * elf32-sh.c: Likewise.
2375 * elf32-sh64.c: Likewise.
2376 * elf32-sparc.c: Likewise.
2377 * elf32-v850.c: Likewise.
2378 * elf32-vax.c: Likewise.
2379 * elf32-xstormy16.c: Likewise.
2380 * elf32-xtensa.c: Likewise.
2381 * elf64-alpha.c: Likewise.
2382 * elf64-hppa.c: Likewise.
2383 * elf64-mips.c: Likewise.
2384 * elf64-mmix.c: Likewise.
2385 * elf64-ppc.c: Likewise.
2386 * elf64-s390.c: Likewise.
2387 * elf64-sh64.c: Likewise.
2388 * elf64-sparc.c: Likewise.
2389 * elf64-x86-64.c: Likewise.
2390 * elfcode.h: Likewise.
2391 * elflink.h: Likewise.
2392 * elfn32-mips.c: Likewise.
2393 * elfxx-ia64.c: Likewise.
2394 * elfxx-mips.c: Likewise.
2395 * i386linux.c: Likewise.
2396 * ieee.c: Likewise.
2397 * libcoff-in.h: Likewise.
2398 * linker.c: Likewise.
2399 * m68klinux.c: Likewise.
2400 * pdp11.c: Likewise.
2401 * pe-mips.c: Likewise.
2402 * peXXigen.c: Likewise.
2403 * reloc.c: Likewise.
2404 * reloc16.c: Likewise.
2405 * sparclinux.c: Likewise.
2406 * sunos.c: Likewise.
2407 * syms.c: Likewise.
2408 * versados.c: Likewise.
2409 * vms.c: Likewise.
2410 * xcofflink.c: Likewise.
2411 * bfd-in2.h: Regenerate.
2412 * libcoff.h: Regenerate.
2413 * libbfd.h: Regenerate.
2414
2415 2003-06-24 Alan Modra <amodra@bigpond.net.au>
2416
2417 * elf32-ppc.c (ppc_elf_check_relocs): Report plt reloc against
2418 local sym errors.
2419
2420 * elf32-i386.c: Convert to C90 function definitions, remove unnecessary
2421 prototypes and casts. Replace PTR with void *. Formatting.
2422 * elf32-ppc.c: Likewise. Break long strings too.
2423 (ppc_elf_relax_section): Use enum elf_ppc_reloc_type for r_type.
2424 (ppc_elf_unhandled_reloc): Internationalize error message.
2425 * elf32-ppc.h: Remove PARAMS.
2426
2427 2003-06-23 Mark Mitchell <mark@codesourcery.com>
2428
2429 * elf32-ppc.c (ppc_elf_begin_write_processing): Use bytes to count
2430 APUinfo slots.
2431 (ppc_elf_final_write_processing): Likewise.
2432
2433 2003-06-23 H.J. Lu <hongjiu.lu@intel.com>
2434
2435 * elflink.h (elf_link_input_bfd): Check raw size when using
2436 kept_section to preserve debug information discarded by
2437 linkonce.
2438
2439 2003-06-20 Alan Modra <amodra@bigpond.net.au>
2440
2441 * elf64-ppc.c (struct ppc_link_hash_table): Add top_id.
2442 (ppc64_elf_setup_section_lists): Set it.
2443 (ppc64_elf_relocate_section): Check sym section id against top_id.
2444 (ppc_build_one_stub): Comment on top_id.
2445
2446 2003-06-20 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
2447
2448 * config.bfd: Add tic4x-*-rtems*.
2449
2450 2003-06-20 Alan Modra <amodra@bigpond.net.au>
2451
2452 * elf64-ppc.c: Convert to C90 function definitions, remove unnecessary
2453 prototypes and casts. Replace PTR with void *. Format copyright.
2454 Mention ABI links.
2455 (struct ppc_link_hash_table): Rename sgot, srelgot, splt, srelplt,
2456 sdynbss, srelbss, sglink, sbrlt and srelbrlt to got, relgot .. relbrlt.
2457 (ppc_type_of_stub): Make r_type an enum.
2458 (ppc64_elf_size_stubs): Likewise.
2459 * elf64-ppc.h: Remove PARAMS macro.
2460
2461 2003-06-19 Alan Modra <amodra@bigpond.net.au>
2462
2463 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Reinstate init of
2464 elf hash tab fields.
2465
2466 * elf64-ppc.c (ppc64_elf_reloc_type_lookup): Tidy prototype.
2467 (ppc64_elf_info_to_howto): Likewise.
2468 (ppc64_elf_build_stubs): Add "stats" param, and print statistics.
2469 * elf64-ppc.h (ppc64_elf_build_stubs): Adjust prototype.
2470
2471 2003-06-19 Alan Modra <amodra@bigpond.net.au>
2472
2473 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore R_SPARC_DISP32
2474 reloc overflow on discarded eh_frame entries.
2475
2476 2003-06-19 Alan Modra <amodra@bigpond.net.au>
2477
2478 * elf64-ppc.c (toc_adjusting_stub_needed): New function.
2479 (ppc64_elf_next_input_section): Use it here to set has_gp_reloc.
2480 Return error condition.
2481 (ppc64_elf_size_stubs): Restrict toc adjusting stubs to sections
2482 that have has_gp_reloc set.
2483 (struct ppc_link_hash_table): Add stub_count.
2484 (ppc_build_one_stub): Increment it.
2485 (ppc64_elf_link_hash_table_create): zmalloc rather than clearing
2486 individual fields.
2487 * elf64-ppc.h (ppc64_elf_next_input_section): Update prototype.
2488
2489 2003-06-18 Alan Modra <amodra@bigpond.net.au>
2490
2491 * elflink.h (elf_gc_record_vtentry): Revert last change. Correct
2492 size calculation from addend. Round size up.
2493
2494 2003-06-18 Hans-Peter Nilsson <hp@axis.com>
2495
2496 * elf32-cris.c (cris_elf_relocate_section) <case
2497 R_CRIS_32_GOTREL>: When linking a program, don't complain about a
2498 symbol from a normal object or an undefined weak symbol.
2499
2500 2003-06-18 Alan Modra <amodra@bigpond.net.au>
2501
2502 * elf64-ppc.c (ppc64_elf_relocate_section): Accept a symbol on
2503 R_PPC64_TOC relocs.
2504
2505 2003-06-17 H.J. Lu <hongjiu.lu@intel.com>
2506
2507 * section.c (struct sec): Put back kept_section.
2508 (STD_SECTION): Put back kept_section initialization.
2509 * bfd-in2.h: Regenerate.
2510
2511 * elflink.h (elf_link_input_bfd): Also check discarded linkonce
2512 sections for relocateable output. Use kept_section to preserve
2513 debug information discarded by linkonce.
2514
2515 2003-06-17 Roland McGrath <roland@redhat.com>
2516
2517 * elfxx-ia64.c (elfNN_ia64_relocate_section): Support
2518 segment-relative relocation between different segments.
2519
2520 2003-06-17 Alan Modra <amodra@bigpond.net.au>
2521
2522 * elf64-ppc.c (ppc64_elf_relocate_section): Do unaligned reloc
2523 optimizations earlier.
2524
2525 * elf64-ppc.c (struct ppc_link_hash_table): Reinstate top_index.
2526 Restore previous input_list type.
2527 (ppc64_elf_link_hash_table_create): Undo last change.
2528 (ppc64_elf_setup_section_lists): Reinstate code setting up input lists
2529 per output section, but don't bother with bfd_abs_section marker.
2530 (ppc64_elf_next_input_section): Adjust for multiple input section
2531 lists.
2532 (group_sections): Likewise.
2533
2534 2003-06-17 Jakub Jelinek <jakub@redhat.com>
2535
2536 * elf64-ppc.c (ppc64_elf_relocation_section): Ensure
2537 *r_offset == r_addend for RELATIVE relocs against .got.
2538
2539 2003-06-17 Alan Modra <amodra@bigpond.net.au>
2540
2541 * elf64-ppc.c (ppc64_elf_relocate_section): Optimize unaligned relocs.
2542
2543 2003-06-17 Nick Clifton <nickc@redhat.com>
2544
2545 * elflink.h (elf_gc_record_vtentry): Allocate an extra element
2546 in the vtable_entries_used array to allow for the accessing
2547 the largest element.
2548
2549 2003-06-17 Alan Modra <amodra@bigpond.net.au>
2550
2551 * elf64-ppc.c (struct ppc_link_hash_table): Remove top_index. Modify
2552 input_list.
2553 (ppc64_elf_link_hash_table_create): Init input_list here.
2554 (ppc64_elf_setup_section_lists): Remove code setting up input lists
2555 per output section. Set toc_off for abs and other standard sections.
2556 (ppc64_elf_reinit_toc): Don't set elf_gp on input bfds lacking a toc.
2557 (ppc64_elf_next_input_section): Adjust for single input section list.
2558 Don't set toc_curr from input bfds that haven't set elf_gp.
2559 (group_sections): Adjust for single input section list.
2560
2561 * elf64-ppc.c (ppc64_elf_relocate_section): Correct pcrel section zero.
2562
2563 2003-06-16 Alan Modra <amodra@bigpond.net.au>
2564
2565 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing toctprel
2566 tls, check that a TOC16_DS or TOC16_LO_DS reloc isn't pointing to a
2567 dtprel entry. Ensure TLS_LD DTPMOD reloc has a zero addend. Write
2568 got section for RELATIVE relocs. Fix wrong comment. Change condition
2569 under which dynamic relocs update the section contents.
2570
2571 2003-06-13 Robert Millan <zeratul2@wanadoo.es>
2572
2573 * config.bfd: Add i386-netbsd-gnu target.
2574
2575 2003-06-12 Nick Clifton <nickc@redhat.com>
2576
2577 * opncls.c (calc_crc32): Rename to
2578 bfd_calc_gnu_debuglink_crc32 and export.
2579 (GNU_DEBUGLINK): Define and use to replace occurrences of
2580 hard-coded ".gnu_debuglink" in the code.
2581 (get_debug_link_info): Prevent aborts by replacing call to
2582 xmalloc with a call to malloc.
2583 (find_separate_debug_file): Prevent aborts by replacing calls
2584 to xmalloc and xstrdup with calls to malloc and strdup.
2585 (bfd_add_gnu_debuglink): New function. Add a .gnu_debuglink
2586 section to a bfd.
2587 * bfd-in2.h: Regenerate.
2588
2589 2003-06-12 Federico G. Schwindt <fgsch@lodoss.net>
2590
2591 * config.bfd (i[3-7]86-*-openbsd[0-2].* | i[3-7]86-*-openbsd3.[0-3]):
2592 New target (was i[3-7]86-*-openbsd* before).
2593 (i[3-7]86-*-openbsd*): Change to use bfd_elf32_i386_vec.
2594 (vax-*-openbsd*): New target.
2595
2596 2003-06-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2597
2598 * elfxx-mips.c (MIPS_ELF_OPTIONS_SECTION_NAME): Use .MIPS.options
2599 for n32, too.
2600 (MIPS_ELF_STUB_SECTION_NAME): Use .MIPS.stubs for n32, too.
2601 (mips_elf_rel_dyn_section): Use appropriate section alignment.
2602 (mips_elf_create_got_section): Likewise.
2603 (_bfd_mips_elf_create_dynamic_sections): Likewise.
2604
2605 2003-06-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2606
2607 * elf32-mips.c (mips_elf_generic_reloc): New Function.
2608 (elf_mips_howto_table_rel): Use it.
2609 (gprel32_with_gp): Move prototype.
2610 (mips_elf_hi16_reloc): Check for ! BSF_LOCAL instead of zero addend.
2611 Use mips_elf_generic_reloc.
2612 (mips_elf_got16_reloc): Check for ! BSF_LOCAL instead of zero addend.
2613 Code cleanup.
2614 (_bfd_mips_elf32_gprel16_reloc): Check for ! BSF_LOCAL instead of
2615 zero addend.
2616 (mips_elf_gprel32_reloc): Likewise. Use the same GP assignment logic
2617 as in the other *_gprel*_reloc functions.
2618 (gprel32_with_gp): Handle partial_inplace properly.
2619 (mips32_64bit_reloc): Use mips_elf_generic_reloc.
2620 (mips16_gprel_reloc): Check for ! BSF_LOCAL instead of zero addend.
2621 Do addend handling directly instead of calling
2622 _bfd_mips_elf_gprel16_with_gp. Handle partial_inplace properly.
2623 * elf64-mips.c (mips_elf64_hi16_reloc): Check for ! BSF_LOCAL instead
2624 of zero addend. Handle partial_inplace properly.
2625 (mips_elf64_got16_reloc): Check for ! BSF_LOCAL instead of zero
2626 addend.
2627 (mips_elf64_gprel16_reloc): Likewise.
2628 (mips_elf64_literal_reloc): Likewise.
2629 (mips_elf64_gprel32_reloc): Likewise. Use the same GP assignment
2630 logic as in the other *_gprel*_reloc functions. Handle
2631 partial_inplace properly.
2632 (mips_elf64_shift6_reloc): Check for ! BSF_LOCAL instead of zero
2633 addend. Handle partial_inplace properly.
2634 (mips16_gprel_reloc): Likewise. Do addend handling directly instead
2635 of calling _bfd_mips_elf_gprel16_with_gp.
2636 * elfn32-mips.c (mips_elf_got16_reloc): Check for BSF_LOCAL.
2637 (mips_elf_gprel32_reloc): Check for ! BSF_LOCAL instead
2638 of zero addend.
2639 (mips_elf_shift6_reloc): Handle partial_inplace properly.
2640 (mips16_gprel_reloc): Likewise. Do addend handling directly instead
2641 of calling _bfd_mips_elf_gprel16_with_gp.
2642 * elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp): Handle
2643 partial_inplace properly. Fix wrong addend handling. Fix overflow
2644 check.
2645 (_bfd_mips_elf_sign_extend): Renamed from mips_elf_sign_extend and
2646 exported.
2647 (mips_elf_calculate_relocation): Use _bfd_mips_elf_sign_extend.
2648 (_bfd_mips_elf_relocate_section): Likewise.
2649 (mips_elf_create_dynamic_relocation): Update sec_info_type access.
2650 * elfxx-mips.h (_bfd_mips_relax_section): Fix prototype declaration.
2651 (_bfd_mips_elf_sign_extend): New prototype.
2652
2653 2003-06-11 Federico G. Schwindt <fgsch@lodoss.net>
2654
2655 * config.bfd (sparc-*-openbsd[0-2].* | sparc-*-openbsd3.[0-1]):
2656 New target (was sparc-*-openbsd* before).
2657 (sparc-*-openbsd*): Change to use bfd_elf32_sparc_vec.
2658
2659 * configure.in (vax-*-openbsd*): Set COREFILE to netbsd-core.lo.
2660 * configure: Regenerate.
2661
2662 2003-06-11 H.J. Lu <hongjiu.lu@intel.com>
2663
2664 * po/Make-in (DESTDIR): New.
2665 (install-data-yes): Support $(DESTDIR).
2666 (uninstall): Likewise.
2667
2668 2003-06-11 Alan Modra <amodra@bigpond.net.au>
2669
2670 * Makefile.am (config.status): Depend on version.h.
2671 Run "make dep-am".
2672 * Makefile.in: Regenerate.
2673 * po/SRC-POTFILES.in: Regenerate.
2674
2675 2003-06-10 Alan Modra <amodra@bigpond.net.au>
2676 Gary Hade <garyhade@us.ibm.com>
2677
2678 * elf64-ppc.c (ppc64_elf_relocate_section <*_DS>): Special case lq.
2679
2680 2003-06-10 Richard Sandiford <rsandifo@redhat.com>
2681
2682 * archures.c (bfd_mach_h8300sxn): New architecture.
2683 * bfd-in2.h: Regenerate.
2684 * cpu-h8300.c (h8300_scan): Check for 'sxn'.
2685 (h8300sxn_info_struct): New.
2686 (h8300sx_info_struct): Link to it.
2687 * elf32-h8300.c (elf32_h8_mach): Add h8300sxn case.
2688 (elf32_h8_final_write_processing): Likewise.
2689
2690 2003-06-08 Alan Modra <amodra@bigpond.net.au>
2691
2692 * elf64-ppc.c: Move TARGET_LITTLE_SYM and other macros used by
2693 elfxx-target.h so that we can use elf_backend_got_header_size.
2694 (ELF_MACHINE_ALT1, ELF_MACHINE_ALT2): Delete.
2695 (GLINK_CALL_STUB_SIZE): Modify. Define new glink call stub and
2696 associated macros.
2697 (ppc64_elf_howto_raw <GOT_TPREL16_DS, GOT_TPREL16_LO_DS>): Correct
2698 dst_mask.
2699 (enum ppc_stub_type): Add ppc_stub_long_branch_r2off and
2700 ppc_stub_plt_branch_r2off.
2701 (struct ppc_stub_hash_entry): Reorganize.
2702 (struct ppc_link_hash_table): Add no_multi_toc, multi_toc_needed,
2703 toc_curr, toc_off and emit_stub_syms.
2704 (ppc64_elf_link_hash_table_create): Init them.
2705 (ppc_stub_name): Correct string size.
2706 (ppc64_elf_check_relocs): Set has_gp_reloc on GOT and TOC relocs.
2707 (ppc64_elf_size_dynamic_sections): Set no_multi_toc if GOT entries
2708 used.
2709 (ppc_type_of_stub): Tweak root.type test.
2710 (build_plt_stub): Remove glink code. Adjust for insn macro changes.
2711 (ppc_size_one_stub): Handle ppc_stub_long_branch_r2off and
2712 ppc_stub_plt_branch_r2off.
2713 (ppc_build_one_stub): Likewise. Fix var shadowing. Correct addis,addi
2714 range test. Use toc_off to calculte r2 values. Handle emit_stub_syms.
2715 (ppc64_elf_setup_section_lists): Remove htab creator flavour test.
2716 Initialize elf_gp and toc_curr.
2717 (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): New functions.
2718 (ppc64_elf_next_input_section): Set toc_off.
2719 (group_sections): Ensure groups have the same TOC.
2720 (ppc64_elf_size_stubs): Check whether we need a TOC adjusting stub.
2721 (ppc64_elf_build_stubs): Add emit_stub_syms param, and stash in htab.
2722 Build new glink stub.
2723 (ppc64_elf_relocate_section): Handle multiple TOCs. Fix comments.
2724 (ppc64_elf_finish_dynamic_sections): Adjust DT_PPC64_GLINK.
2725 * elf64-ppc.h (ppc64_elf_build_stubs): Update prototype.
2726 (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): Declare.
2727 * section.c (struct sec): Rename flag12 to has_gp_reloc.
2728 (STD_SECTION): Update.
2729 * ecoff.c (bfd_debug_section): Update comment.
2730 * bfd-in2.h: Regenerate.
2731
2732 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
2733
2734 * elfcode.h (elf_slurp_reloc_table_from_section): Don't dereference
2735 NULL function pointers.
2736
2737 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
2738
2739 * simple.c (bfd_simple_get_relocated_section_contents): Call
2740 _bfd_generic_link_add_symbols instead of bfd_link_add_symbols.
2741
2742 2003-06-04 Svein E. Seldal <Svein.Seldal@solidas.com>
2743
2744 * coff-tic54x.c: Removed the ticoff0_bad_format_hook() and
2745 ticoff1_bad_format_hook() functions. Removed the coff0 and coff1
2746 swaptables.
2747 * coff-tic4x.c: Ditto
2748 * coffcode.h: Added extra arguments to CREATE_BIG_COFF_TARGET_VEC
2749 and CREATE_LITTLE_COFF_TARGET_VEC. Created the macro
2750 CREATE_BIGHDR_COFF_TARGET_VEC. Created the ticoff0_bad_format_hook(),
2751 ticoff1_bad_format_hook() functions. Created the coff0 and coff1
2752 swap tables.
2753 * coff-tic4x.c: Adopted new CREATE_xxx_COFF_TARGET_VEC macros.
2754 * coff-a29k.c: Append COFF_SWAP_TABLE argument
2755 * coff-apollo.c: Ditto
2756 * coff-arm.c: Ditto
2757 * coff-h8300.c: Ditto
2758 * coff-h8500.c: Ditto
2759 * coff-i960.c: Ditto
2760 * coff-m68k.c: Ditto
2761 * coff-m88k.c: Ditto
2762 * coff-mcore.c: Ditto
2763 * coff-sh.c: Ditto
2764 * coff-sparc.c: Ditto
2765 * coff-tic80.c: Ditto
2766 * coff-we32k.c: Ditto
2767 * coff-z8k.c: Ditto
2768 * coff-w65.c: Ditto
2769
2770 2003-06-04 Svein E. Seldal <Svein.Seldal@solidas.com>
2771
2772 * coff-tic4x.c (ticoff0_swap_table, ticoff1_swap_table): Fixed
2773 initialization bug
2774
2775 2003-06-03 Jakub Jelinek <jakub@redhat.com>
2776
2777 * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_STACK.
2778 (bfd_section_from_phdr): Likewise.
2779 (map_sections_to_segments): Create PT_GNU_STACK segment header.
2780 (get_program_header_size): Count with PT_GNU_STACK.
2781 * elf-bfd.h (struct elf_obj_tdata): Add stack_flags.
2782 * elflink.h (bfd_elfNN_size_dynamic_sections): Set stack_flags.
2783
2784 2003-06-03 H.J. Lu <hongjiu.lu@intel.com>
2785
2786 * elflink.h (elf_link_input_bfd): Call linker error_handler
2787 for discarded definitions.
2788
2789 2003-06-03 Elias Athanasopoulos <elathan@phys.uoa.gr>
2790
2791 * syms.c (decode_section_type): Return 'n' if section flags are
2792 SEC_HAS_CONTENTS && SEC_READONLY.
2793
2794 2003-06-03 Nick Clifton <nickc@redhat.com>
2795
2796 * elf32-v850.c (v850_elf_howto_t): Rename R_V850_32to
2797 R_V850_ABS32. Add entry for R_V850_REL32.
2798 (v850_elf_reloc_map): Likewise.
2799 (v850_elf_check_relocs): Likewise.
2800 (v850_elf_perform_relocation): Likewise.
2801 (v850_elf_final_link_relocate): Likewise. Include computation
2802 to make R_V850_REl32 pc-relative.
2803
2804 2003-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2805
2806 * elf32-sh.c (sh_elf_size_dynamic_sections): Create .interp section
2807 and DT_DEBUG dynamic tag even for position independent executables.
2808 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewize.
2809
2810 2003-06-02 Daniel Jacobowitz <drow@mvista.com>
2811
2812 * config.bfd: Move obsolete entries out of the range of the
2813 targmatch sed script.
2814
2815 2003-06-02 Daniel Jacobowitz <drow@mvista.com>
2816
2817 * config.bfd (mips*-dec-bsd*, mips*-*-pe*): Mark as obsolete.
2818
2819 2003-05-31 Jakub Jelinek <jakub@redhat.com>
2820
2821 * elf32-ppc.c (allocate_dynrelocs): Use single slot for first 8192
2822 plt entries, not just 8191.
2823
2824 2003-05-30 Daniel Jacobowitz <drow@mvista.com>
2825
2826 * elfxx-mips.c (_bfd_mips_elf_discard_info): Correct loop index.
2827 Reported by Ken Faiczak <kfaiczak@SANDVINE.com>.
2828
2829 2003-05-30 Ulrich Drepper <drepper@redhat.com>
2830 Jakub Jelinek <jakub@redhat.com>
2831
2832 * elflink.h (elf_link_add_object_symbols): Use !info->executable
2833 instead of info->shared where appropriate.
2834 (bfd_elfNN_size_dynamic_sections, elf_link_output_extsym): Likewise.
2835 * elflink.c (_bfd_elf_create_got_section): Likewise.
2836 (_bfd_elf_link_create_dynamic_sections): Likewise.
2837 (_bfd_elf_link_assign_sym_version): Likewise.
2838 * elf32-i386.c (elf_i386_size_dynamic_sections): Create .interp section
2839 and DT_DEBUG dynamic tag even for position independent executables.
2840 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
2841 * elf32-s390.c (elf_s390_size_dynamic_sections: Likewise.
2842 * elf64-ppc.c (ppc64_elf_size_dynamic_sections: Likewise.
2843 * elf64-s390.c (elf_s390_size_dynamic_sections: Likewise.
2844 * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections: Likewise.
2845 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections: Likewise.
2846 * elf32-sparc.c (elf32_sparc_size_dynamic_sections: Likewise.
2847 * elf64-alpha.c (elf64_alpha_size_dynamic_sections: Likewise.
2848 * elf64-sparc.c (sparc64_elf_size_dynamic_sections: Likewise.
2849
2850 2003-05-30 Kris Warkentin <kewarken@qnx.com>
2851
2852 * elf.c (elfcore_grok_nto_status): Only set lwpid for the active or
2853 signalled thread.
2854 (elfcore_grok_nto_gregs): Only make .reg section for the active thread.
2855
2856 2003-05-29 Nick Clifton <nickc@redhat.com>
2857
2858 * pef.c: Include "safe-ctype.h" instead of <ctype.h>.
2859 Tidy up formatting.
2860 * Makefile.am: Add dependency on safe-ctype.h.
2861 * Makefile.in: Regenerate.
2862
2863 2003-05-29 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2864
2865 * elfxx-mips.c: Don't force symbols local unconditionally.
2866
2867 2003-05-28 Alan Modra <amodra@bigpond.net.au>
2868
2869 * elf32-hppa.c (elf32_hppa_relocate_section): Delete bogus
2870 undefined_symbol call.
2871
2872 2003-05-27 Richard Sandiford <rsandifo@redhat.com>
2873
2874 * elfxx-mips.c (mips_elf_hash_sort_data): Fix formattting.
2875 (mips_elf_link_hash_table): Likewise.
2876
2877 2003-05-22 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2878
2879 * elf64-mips.c (elf_mips_gnu_rel16_s2): Add internally used
2880 R_MIPS_GNU_REL16_S2 support.
2881 (bfd_elf64_bfd_reloc_type_lookup): Use it.
2882 (mips_elf64_rtype_to_howto): Use it.
2883 * elfn32-mips.c (elf_mips_gnu_rel16_s2): Add internally used
2884 R_MIPS_GNU_REL16_S2 support.
2885 (bfd_elf32_bfd_reloc_type_lookup): Use it.
2886 (mips_elf_n32_rtype_to_howto): Use it.
2887
2888 2003-05-21 Stuart F. Downing <sdowning@fame.com>
2889
2890 * som.h: Define PA_2_0 before including a.out.h
2891
2892 2003-05-07 Eric Christopher <echristo@redhat.com>
2893 Alexandre Oliva <aoliva@redhat.com>
2894
2895 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Adjust
2896 pic tests, change to warning.
2897 (_bfd_mips_elf_final_link): Remove EF_MIPS_CPIC flag setting.
2898
2899 2003-05-21 Marcus Comstedt <marcus@mc.pp.se>
2900
2901 * config.bfd: Check for a target triplet of shl-...-netbsdelf as
2902 well as shle-...-netbsdelf. Remove duplicate entry.
2903
2904 2003-05-21 Nick Clifton <nickc@redhat.com>
2905
2906 * elf32-xstormy16.c (xstormy16_elf_howto_table): Fix dst_mask
2907 for X_STORMY16_REL_12 reloc.
2908
2909 * elf.c (bfd_elf_get_needed_list): Use is_elf_hash_table to check
2910 the type of the hash table in the bfd_link_info structure.
2911 (bfd_elf_get_runpath_list): Likewise.
2912
2913 2003-05-19 Roland McGrath <roland@redhat.com>
2914
2915 * elf.c (bfd_elf_bfd_from_remote_memory): New function.
2916 * bfd-in.h: Declare it.
2917 * bfd-in2.h: Regenerated.
2918 * elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): New function.
2919 * elf-bfd.h (struct elf_backend_data): New function pointer member
2920 elf_backend_bfd_from_remote_memory.
2921 (_bfd_elf32_bfd_from_remote_memory, _bfd_elf64_bfd_from_remote_memory):
2922 Declare them.
2923 * elfxx-target.h (elf_backend_bfd_from_remote_memory): New macro.
2924 (elfNN_bed): Add that to the initializer.
2925
2926 2003-05-15 Roland McGrath <roland@redhat.com>
2927
2928 * elf.c (elfcore_grok_note): Grok NT_AUXV note, make ".auxv" section.
2929
2930 2003-05-20 Jakub Jelinek <jakub@redhat.com>
2931
2932 * elflink.h (elf_link_output_extsym): Only issue error about !=
2933 STV_DEFAULT symbols if they are bfd_link_hash_undefined.
2934
2935 2003-05-20 H.J. Lu <hongjiu.lu@intel.com>
2936
2937 * elflink.c (_bfd_elf_merge_symbol): Check ELF_LINK_DYNAMIC_DEF
2938 when removing the old definition for symbols with non-default
2939 visibility.
2940
2941 2003-05-18 Jason Eckhardt <jle@rice.edu>
2942
2943 * elf32-i860.c (elf32_i860_relocate_highadj): Simplify calculation.
2944
2945 2003-05-17 Andreas Schwab <schwab@suse.de>
2946
2947 * elf32-m68k.c (elf_m68k_check_relocs): Cache reloc section in
2948 elf_section_data during processing of pc-relative and absolute
2949 relocations.
2950 (elf_m68k_relocate_section): Use the cached reloc section instead
2951 of computing it again. Fix handling of visibility. Don't modify
2952 addend when copying over a relocation into the output.
2953
2954 2003-05-17 Alan Modra <amodra@bigpond.net.au>
2955
2956 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
2957 to trim plt entries. Move undefweak non-default visibility test..
2958 (allocate_dynrelocs): ..from here.
2959 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't test
2960 dynamic_sections_created here. Update comment. Move undefweak
2961 non-default visibility test..
2962 (allocate_dynrelocs): ..from here. Fix comment.
2963 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
2964 to trim plt entries. Move undefweak non-default visibility test..
2965 (allocate_dynrelocs): ..from here. Fix comment.
2966 * elflink.h (elf_link_output_extsym): Compare ELF_ST_VISIBILITY with
2967 STV_DEFAULT rather than comparing with zero.
2968 * elflink.c (_bfd_elf_merge_symbol): Likewise.
2969 (_bfd_elf_fix_symbol_flags): Likewise. Format comment.
2970
2971 2003-05-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2972
2973 * bfd.c (_bfd_get_gp_value): Prevent illegal access for abfd null
2974 pointers.
2975 (_bfd_set_gp_value): Likewise.
2976
2977 2003-05-16 Michael Snyder <msnyder@redhat.com>
2978 From Bernd Schmidt <bernds@redhat.com>
2979 * archures.c (bfd_mach_h8300sx): New.
2980 * bfd-in2.h: Regenerate.
2981 * cpu-h8300.c (h8300_scan)): Add support for h8300sx.
2982 (h8300sx_info_struct): New.
2983 (h8300s_info_struct): Link to it.
2984 * elf32-h8300.c (elf32_h8_mach): Add support for h8300sx.
2985 (elf32_h8_final_write_processing): Likewise.
2986 (elf32_h8_relax_section): Likewise.
2987
2988 2003-05-16 Kelley Cook <kelleycook@wideopenwest.com>
2989
2990 * config.bfd: Accept i[3-7]86 variants.
2991 * configure.host: Likewise.
2992 * configure.in: Likewise.
2993 * configure: Regenerate.
2994
2995 2003-05-15 H.J. Lu <hongjiu.lu@intel.com>
2996
2997 * elflink.c (_bfd_elf_fix_symbol_flags): Also hide protected
2998 symbol.
2999
3000 2003-05-15 H.J. Lu <hongjiu.lu@intel.com>
3001
3002 * elflink.h (elf_link_check_versioned_symbol): Also allow
3003 the base version.
3004
3005 2003-05-15 Alan Modra <amodra@bigpond.net.au>
3006 H.J. Lu <hongjiu.lu@intel.com>
3007
3008 * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL.
3009 (elf_i386_relocate_section): Likewise.
3010 * elf32-ppc.c (allocate_dynrelocs): Likewise.
3011 (ppc_elf_relocate_section): Likewise.
3012 * elf64-ppc.c (allocate_dynrelocs): Likewise.
3013 (ppc64_elf_relocate_section): Likewise.
3014
3015 2003-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3016
3017 * elf32-mips.c (gprel32_with_gp): Remove useless N64 ABI case.
3018
3019 2003-05-13 Stephane Carrez <stcarrez@nerim.fr>
3020
3021 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Check for
3022 processor capability, allow merge of HC12 and HCS12 in some cases.
3023 (m68hc11_elf_hash_table_create): Use bfd_malloc instead of bfd_zalloc.
3024 * cpu-m68hc12.c (bfd_m68hc12s_arch): New struct.
3025 (bfd_m68hc12_arch): Link it.
3026 (scan_mach): New function.
3027
3028 2003-05-13 Andrew Haley <aph@redhat.com>
3029
3030 * elf.c (bfd_elf_hash): Mask lower 32 bits of hash.
3031
3032 2003-05-13 Alan Modra <amodra@bigpond.net.au>
3033 H.J. Lu <hongjiu.lu@intel.com>
3034
3035 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Move from
3036 elf32-ppc.c. Add ELF_LINK_FORCED_LOCAL check.
3037 * elf32-ppc.c: (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Delete.
3038 (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for dynreloc check.
3039 (ppc_elf_relocate_section): Likewise.
3040 * elf64-ppc.c (allocate_dynrelocs): Likewise.
3041 (ppc64_elf_relocate_section): Likewise. Use for .got relocs too.
3042 (ppc64_elf_adjust_dynamic_symbol): Don't assume symbols with .plt
3043 relocs need no other types.
3044 * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for
3045 dynreloc check.
3046 (elf_i386_relocate_section): Likewise. Use for .got relocs too.
3047 (elf_i386_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL for
3048 .got relocs.
3049
3050 2003-05-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3051
3052 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): For weak symbols,
3053 copy ELF_LINK_NON_GOT_REF from weakdef.
3054 (allocate_dynrelocs): For undef weak syms with non-default
3055 visibility, a) don't allocate plt entries, b) don't allocate
3056 .got relocs, c) discard dyn rel space
3057 (sh_elf_relocate_section): d) don't generate .got relocs, e)
3058 don't generate dynamic relocs.
3059 (sh_elf_copy_indirect_symbol): Don't copy ELF_LINK_NON_GOT_REF
3060 for weakdefs when symbol already adjusted.
3061
3062 2003-05-12 Nick Clifton <nickc@redhat.com>
3063
3064 * elf32-xstormy16.c (xstormy16_elf_howto_table): use 'bitfield'
3065 overflow detection for R_XSTORMY16_16 reloc.
3066
3067 2003-05-12 Paul Clarke <paulc@senet.com.au>
3068
3069 * elf32-h8300.c: Fix typo in name of R_H8_DIR8 reloc.
3070
3071 2003-05-11 Jason Eckhardt <jle@rice.edu>
3072
3073 * elf32-i860.c (elf32_i860_relocate_highadj): Properly
3074 adjust upper bits.
3075 (elf32_i860_relocate_splitn): Obtain upper 5 bits from the
3076 proper place.
3077 (elf32_i860_relocate_pc16): Obtain upper 5 bits from the
3078 proper place.
3079
3080 2003-05-11 Andreas Schwab <schwab@suse.de>
3081
3082 * elf32-m68k.c (elf_m68k_relocate_section): Replace ugly
3083 complicated tests for unresolvable relocs with a simple direct
3084 scheme using "unresolved_reloc" var. Report some detail on
3085 bfd_reloc_outofrange and similar errors.
3086
3087 2003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
3088
3089 * elf32-s390.c (allocate_dynrelocs, elf_s390_relocate_section):
3090 Fix WILL_CALL_FINISH_DYNAMIC_SYMBOL call.
3091 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
3092 * elf64-s390.c: Likewise.
3093
3094 2003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
3095
3096 * elf32-s390.c (ELIMINATE_COPY_RELOCS): Define as one.
3097 (elf_s390_adjust_dynamic_symbol): For weak symbols, copy
3098 ELF_LINK_NON_GOT_REF from weakdef.
3099 (elf_s390_copy_indirect_symbol): Test whether the weakdef sym has
3100 already been adjusted before treating it specially.
3101 * el64-s390.c: Likwise.
3102
3103 2003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
3104
3105 * elf32-s390.c (allocate_dynrelocs): For undef weak syms with
3106 non-default visibility, a) don't make them dynamic, b) discard
3107 space for dynamic relocs.
3108 (elf_s390_relocate_section): Initialize the GOT entries and skip
3109 R_390_{8,16,32}/R_390_PC{16,16DBL,32DBL,32} for weak undefined
3110 symbols with non-default visibility.
3111 * elf64-s390.c: Likewise.
3112
3113 2003-05-09 Alan Modra <amodra@bigpond.net.au>
3114
3115 * cpu-arm.c (arm_check_note): Warning fix.
3116 * elf32-iq2000.c (iq2000_elf_check_relocs): Warning fixes. Arrange
3117 to keep relocs if edited.
3118 (iq2000_elf_print_private_bfd_data): Return TRUE.
3119 * elfxx-ia64.c (elfNN_ia64_relax_section): Use ELFNN_R_SYM, not
3120 ELF64_R_SYM.
3121 (elfNN_ia64_relax_ldxmov): Warning fix.
3122 * xtensa-isa.c (xtensa_add_isa): Warning fix.
3123 * xtensa-modules.c (get_num_opcodes): Warning fix.
3124
3125 2003-05-09 Andrey Petrov <petrov@netbsd.org>
3126
3127 * elf.c (elf_fake_sections): Use correct cast for sh_name.
3128
3129 2003-05-09 Alan Modra <amodra@bigpond.net.au>
3130
3131 * elflink.c (_bfd_elf_link_create_dynamic_sections): Move from
3132 elflink.h. Replace LOG_FILE_ALIGN with bed->s->log_file_align.
3133 (_bfd_elf_create_dynamic_sections): Use bed->s->log_file_align.
3134 (bfd_elf_record_link_assignment): Move from elflink.h.
3135 (_bfd_elf_merge_symbol): Likewise.
3136 (_bfd_elf_add_default_symbol): Likewise.
3137 (_bfd_elf_export_symbol): Likewise.
3138 (_bfd_elf_link_find_version_dependencies): Likewise.
3139 (_bfd_elf_link_assign_sym_version): Likewise.
3140 (_bfd_elf_link_read_relocs): Likewise.
3141 (_bfd_elf_link_size_reloc_section): Likewise.
3142 (_bfd_elf_fix_symbol_flags): Likewise.
3143 (_bfd_elf_adjust_dynamic_symbol): Likewise.
3144 (_bfd_elf_link_sec_merge_syms): Likewise.
3145 (elf_link_read_relocs_from_section): Likewise. Use bed->s->sizeof_rel
3146 and bed->s->sizeof_rela.
3147 (_bfd_elf_link_output_relocs): Likewise.
3148 * elf-bfd.h (struct elf_size_info): Rename file_align to
3149 log_file_align.
3150 (struct elf_info_failed): Move from elflink.h.
3151 (struct elf_assign_sym_version_info): Likewise.
3152 (struct elf_find_verdep_info): Likewise.
3153 (_bfd_elf_create_dynamic_sections): Delete duplicate declaration.
3154 (_bfd_elf_merge_symbol, _bfd_elf_add_default_symbol,
3155 _bfd_elf_export_symbol, _bfd_elf_link_find_version_dependencies,
3156 _bfd_elf_link_assign_sym_version,
3157 _bfd_elf_link_create_dynamic_sections, _bfd_elf_link_read_relocs,
3158 _bfd_elf_link_size_reloc_section, _bfd_elf_link_output_relocs,
3159 _bfd_elf_fix_symbol_flags, _bfd_elf_adjust_dynamic_symbol,
3160 _bfd_elf_link_sec_merge_syms): Declare.
3161 (bfd_elf32_link_create_dynamic_sections): Don't declare.
3162 (_bfd_elf32_link_read_relocs): Likewise.
3163 (bfd_elf64_link_create_dynamic_sections): Likewise.
3164 (_bfd_elf64_link_read_relocs): Likewise.
3165 * elflink.h: Move lots o' stuff elsewhere.
3166 * bfd-in.h (bfd_elf32_record_link_assignment): Don't declare.
3167 (bfd_elf64_record_link_assignment): Likewise.
3168 (bfd_elf_record_link_assignment): Declare.
3169 * bfd-in2.h: Regenerate.
3170 * elfcode.h (elf_link_create_dynamic_sections): Don't declare.
3171 (NAME(_bfd_elf,size_info)): Adjust for log_file_align.
3172 * elf.c (_bfd_elf_init_reloc_shdr): Adjust for bed->s->log_file_align.
3173 (assign_file_positions_for_segments): Likewise.
3174 (assign_file_positions_except_relocs): Likewise.
3175 (swap_out_syms, elfcore_write_note): Likewise.
3176 * elf-m10200.c: Adjust for changed function names.
3177 * elf-m10300.c: Likewise.
3178 * elf32-arm.h: Likewise.
3179 * elf32-h8300.c: Likewise.
3180 * elf32-hppa.c: Likewise.
3181 * elf32-ip2k.c: Likewise.
3182 * elf32-m32r.c: Likewise.
3183 * elf32-m68hc11.c: Likewise.
3184 * elf32-m68hc1x.c: Likewise.
3185 * elf32-m68k.c: Likewise.
3186 * elf32-mips.c: Likewise.
3187 * elf32-ppc.c: Likewise.
3188 * elf32-sh.c: Likewise.
3189 * elf32-v850.c: Likewise.
3190 * elf32-xtensa.c: Likewise.
3191 * elf64-alpha.c: Likewise.
3192 * elf64-hppa.c: Likewise.
3193 * elf64-mmix.c: Likewise.
3194 * elf64-ppc.c: Likewise.
3195 * elf64-sh64.c: Likewise.
3196 * elfxx-ia64.c: Likewise.
3197 * elfxx-mips.c: Likewise.
3198 (MIPS_ELF_LOG_FILE_ALIGN): Use log_file_align.
3199 * elf64-alpha.c (alpha_elf_size_info): Adjust for log_file_align.
3200 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
3201 * elf64-mips.c (mips_elf64_size_info): Likewise.
3202 * elf64-s390.c (s390_elf64_size_info): Likewise.
3203 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
3204
3205 2003-05-08 H.J. Lu <hongjiu.lu@intel.com>
3206
3207 * elflink.h (elf_add_default_symbol): After skipping the
3208 unversioned symbol, go to non-default one.
3209
3210 2003-05-07 H.J. Lu <hongjiu.lu@intel.com>
3211
3212 * elfxx-ia64.c (_bfd_elf_link_hash_hide_symbol): Also clear the
3213 want_plt field.
3214 (elfNN_ia64_relocate_section): Don't do dynamic symbol lookup
3215 for symbols with non-default visibility.
3216
3217 2003-05-07 H.J. Lu <hongjiu.lu@intel.com>
3218
3219 * elflink.h (elf_link_check_versioned_symbol): Also handle the
3220 case that a DSO references a hidden symbol which may be
3221 satisfied by a versioned symbol in another DSO.
3222 (elf_link_output_extsym): Check versioned definition for hidden
3223 symbol referenced by a DSO.
3224
3225 2003-05-07 Nick Clifton <nickc@redhat.com>
3226
3227 * elf32-xstormy16.c (xstormy16_elf_howto_table): Reset
3228 R_XSTORMY16_16 reloc to ignore overflows.
3229
3230 2003-05-06 Alexandre Oliva <aoliva@redhat.com>
3231
3232 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Improve
3233 error message for mixing different-endian files. Check for ABI
3234 compatibility of input files with the selected emulation.
3235
3236 2003-05-05 Alan Modra <amodra@bigpond.net.au>
3237
3238 * elf32-i386.c (allocate_dynrelocs): For undef weak syms with
3239 non-default visibility, a) don't make them dynamic, b) discard
3240 space for dynamic relocs.
3241 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
3242
3243 * elf32-ppc.c (allocate_dynrelocs): For undef weak syms with
3244 non-default visibility, a) don't allocate plt entries, b) don't
3245 allocate .got relocs, c) discard dyn rel space,
3246 (ppc_elf_relocate_section): d) don't generate .got relocs, e)
3247 don't generate dynamic relocs.
3248 * elf64-ppc.c (allocate_dynrelocs): As above.
3249 (ppc64_elf_relocate_section): As above.
3250
3251 2003-05-05 Andreas Jaeger <aj@suse.de>
3252
3253 * elf64-x86-64.c (allocate_dynrelocs): Don't allocate dynamic
3254 relocation entries for weak undefined symbols with non-default
3255 visibility.
3256 (elf64_x86_64_relocate_section): Initialize the GOT entries and
3257 skip R_386_32/R_386_PC32 for weak undefined symbols with
3258 non-default visibility.
3259
3260 2003-05-04 H.J. Lu <hjl@gnu.org>
3261
3262 * elf32-i386.c (allocate_dynrelocs): Don't allocate dynamic
3263 relocation entries for weak undefined symbols with non-default
3264 visibility.
3265 (elf_i386_relocate_section): Initialize the GOT entries and
3266 skip R_386_32/R_386_PC32 for weak undefined symbols with
3267 non-default visibility.
3268
3269 * elfxx-ia64.c (allocate_fptr): Don't allocate function
3270 descriptors for weak undefined symbols with non-default
3271 visibility.
3272 (allocate_dynrel_entries): Don't allocate relocation entries
3273 for symbols resolved to 0.
3274 (set_got_entry): Don't install dynamic relocation for weak
3275 undefined symbols with non-default visibility.
3276 (set_pltoff_entry): Likewise.
3277
3278 * elflink.h (elf_fix_symbol_flags): Hide weak undefined symbols
3279 with non-default visibility.
3280 (elf_link_output_extsym): Don't make weak undefined symbols
3281 with non-default visibility dynamic.
3282
3283 2003-05-04 H.J. Lu <hjl@gnu.org>
3284
3285 * elflink.h (elf_merge_symbol): Correctly handle weak definition.
3286
3287 2003-05-04 H.J. Lu <hjl@gnu.org>
3288
3289 * elflink.h (elf_merge_symbol): Don't record a hidden/internal
3290 symbol dynamic. Check indirection when removing the old
3291 definition for symbols with non-default visibility.
3292 (elf_add_default_symbol): Skip when told by elf_merge_symbol.
3293
3294 2003-05-02 Nick Clifton <nickc@redhat.com>
3295
3296 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make the
3297 R_XSTORMY16_8 and R_XSTORMY16_16 relocs detect and complain about
3298 unsigned overflow.
3299
3300 2003-05-02 Andreas Jaeger <aj@suse.de>
3301
3302 * elf64-x86-64.c (elf_x86_64_copy_indirect_symbol): Don't copy
3303 ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
3304 (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
3305 (elf_x86_64_adjust_dynamic_symbol): For weak symbols, copy
3306 ELF_LINK_NON_GOT_REF from weakdef.
3307
3308 2003-05-02 Charles Lepple <clepple@ghz.cc>
3309 Nick Clifton <nickc@redhat.com>
3310
3311 * acinclude.m4: Fix name of --enable-install-libbfd switch.
3312 * aclocal.m4: Regenerate.
3313 * configure: Regenerate.
3314 * Makefile.in: Regenerate.
3315
3316 2003-05-01 Alan Modra <amodra@bigpond.net.au>
3317
3318 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Test whether the
3319 weakdef sym has already been adjusted before treating it specially.
3320 * elf32-i386.c (elf_i386_copy_indirect_symbol): Don't copy
3321 ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
3322 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
3323 (ppc64_elf_check_relocs): Set ELF_LINK_NON_GOT_REF.
3324
3325 2003-04-28 H.J. Lu <hjl@gnu.org>
3326
3327 * elfxx-ia64.c (elfNN_ia64_relax_section): Relax ldxmov during
3328 the relax finalize pass.
3329
3330 * section.c (struct sec): Add need_finalize_relax and remove
3331 flag11.
3332 (STD_SECTION): Update struct sec initializer.
3333 * bfd-in2.h: Regenerated.
3334
3335 2003-04-28 H.J. Lu <hjl@gnu.org>
3336
3337 * elflink.h (elf_merge_symbol): Call elf_backend_copy_indirect_symbol
3338 to copy any information related to dynamic linking when we flip
3339 the indirection.
3340
3341 2003-04-27 H.J. Lu <hjl@gnu.org>
3342
3343 * elf-bfd.h (ELF_LINK_DYNAMIC_DEF): New.
3344 (ELF_LINK_DYNAMIC_WEAK): New.
3345
3346 * elflink.h (elf_merge_symbol): Add one argument to indicate if
3347 a symbol should be skipped. Ignore definitions in dynamic
3348 objects for symbols with non-default visibility.
3349 (elf_add_default_symbol): Adjusted.
3350 (elf_link_add_object_symbols): Check if a symbol should be
3351 skipped. Don't merge the visibility field with the one from
3352 a dynamic object.
3353 (elf_link_check_versioned_symbol): Use undef_bfd.
3354 (elf_link_output_extsym): Warn if a forced local symbol is
3355 referenced from dynamic objects. Make non-weak undefined symbol
3356 with non-default visibility a fatal error.
3357
3358 2003-04-27 Daniel Jacobowitz <drow@mvista.com>
3359
3360 * configure.in: Bump version on HEAD to 2.14.90.
3361 * configure: Regenerated.
3362
3363 2003-04-26 Stephane Carrez <stcarrez@nerim.fr>
3364
3365 PR savannah/3331:
3366 * elf32-m68hc11.c (m68hc11_elf_relax_section): Clear prev_insn_group
3367 when we couldn't relax something.
3368
3369 2003-04-25 Alan Modra <amodra@bigpond.net.au>
3370
3371 * elflink.h (elf_merge_symbol): When we find a regular definition
3372 for an indirect symbol, flip the indirection so that the old
3373 direct symbol now points to the new definition.
3374
3375 2003-04-24 Roland McGrath <roland@redhat.com>
3376
3377 * elf.c (bfd_section_from_phdr): Map PT_GNU_EH_FRAME to "eh_frame_hdr".
3378
3379 2003-04-24 Alan Modra <amodra@bigpond.net.au>
3380
3381 * elf32-ppc.c: Formatting and comment fixes.
3382 (ELIMINATE_COPY_RELOCS): Move before ppc_elf_copy_indirect_symbol.
3383 (ppc_elf_copy_indirect_symbol): Copy flags here for weakdefs.
3384
3385 2003-04-24 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
3386
3387 * archures.c (bfd_mach_h8300hn, bfd_mach_h8300sn): Added.
3388 * bfd-in2.h: Rebuilt.
3389 * coff-h8300.c (BADMAG): Add check for H8300HNBADMAG & H8300SNBADMAG.
3390 * coffcode.h (coff_set_arch_mach_hook): Add case for H8300HNMAGIC
3391 & H8300SNMAGIC.
3392 (coff_set_flags): Add case for bfd_mach_h8300hn & bfd_mach_h8300sn.
3393 * cpu-h8300.c (h8300_scan): Handle h8300hn, h8300sn.
3394 (h8300sn_info_struct, h8300hn_info_struct): New.
3395 * elf32-h8300.c (elf32_h8_mach): Handle case for h8300hn & h8300sn
3396 (elf32_h8_final_write_processing): Likewise.
3397
3398 2003-04-23 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3399
3400 * elf32-sh.c (tpoff): New.
3401 (struct elf_sh_dyn_relocs): Remove tls_tpoff32.
3402 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
3403 (allocate_dynrelocs): Don't make unnecessary dynamic TLS
3404 relocations. Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses.
3405 (sh_elf_relocate_section): Likewise. Remove unnecessary tests.
3406 (dtpoff_base): Fix wrong indentation.
3407 (sh_elf_check_relocs): Don't set DF_STATIC_TLS flag with non-TLS
3408 relocations. Don't set tls_tpoff32 flag. Don't make unnecessary
3409 R_SH_TLS_TPOFF32 relocations.
3410
3411 2003-04-23 J"orn Rennecke <joern.rennecke@superh.com>
3412
3413 * archures.c (enum bfd_architecture): Amend comment to refer to SuperH.
3414 * cpu-sh.c: Likewise.
3415 * elf32-sh.c: Likewise.
3416 * reloc.c (bfd_reloc_code_real): Likewise.
3417 * elf32-sh64-com.c: Change comment to refer to SuperH.
3418 * elf32-sh64.c: Likewise.
3419 * elf64-sh64.c: Likewise.
3420 * bfd-in2.h (enum bfd_architecture): Regenerate.
3421
3422 2003-04-23 Alan Modra <amodra@bigpond.net.au>
3423
3424 From Julien LEMOINE <speedblue@debian.org>
3425 * elf32-i386.c (elf_i386_info_to_howto): Delete.
3426 (elf_info_to_howto): Define as elf_i386_info_to_howto_rel.
3427
3428 2003-04-22 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
3429
3430 * archures.c: Replace references to Mitsubishi M32R with references
3431 to Renesas M32R.
3432 * relocs.c: Likewise.
3433 * bfd-in2.h: Regenerate.
3434
3435 2003-04-21 Richard Henderson <rth@redhat.com>
3436
3437 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Return false for an
3438 executable when a symbol is defined both regular and dynamic.
3439
3440 2003-04-21 Stephane Carrez <stcarrez@nerim.fr>
3441
3442 * Makefile.am (BFD32_BACKENDS): Add elf32-m68hc1x.lo.
3443 (elf32-m68hc1x.lo): Update dependencies
3444 * configure.in: Add elf32-m68hc1x.lo.
3445 * configure: Rebuild.
3446 * Makefile.in: Rebuild.
3447
3448 2003-04-21 Stephane Carrez <stcarrez@nerim.fr>
3449
3450 * elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
3451 (m68hc11_elf_hash_table_create): New function.
3452 (elf32_m68hc11_link_hash_table_free): New function.
3453 (stub_hash_newfunc): New function.
3454 (m68hc11_add_stub): New function.
3455 (elf32_m68hc11_add_symbol_hook): New function.
3456 (elf32_m68hc11_setup_section_lists): New function.
3457 (elf32_m68hc11_next_input_section): New function.
3458 (elf32_m68hc11_size_stubs): New function.
3459 (elf32_m68hc11_build_stubs): New function.
3460 (m68hc11_get_relocation_value): New function.
3461 (elf32_m68hc11_relocate_section): Call the above to redirect
3462 some relocations to the trampoline code.
3463 (m68hc11_elf_export_one_stub): New function.
3464 (m68hc11_elf_set_symbol): New function.
3465 (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse.
3466 (m68hc11_elf_get_bank_parameters): Get parameters only when the info
3467 is not yet initialized.
3468
3469 * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
3470 (elf32_m68hc11_stub_hash_entry): New struct.
3471 (m68hc11_page_info): Add trampoline handler address.
3472 (m68hc11_elf_link_hash_table): Add stubs generation members.
3473 (elf32_m68hc11_add_symbol_hook): Declare.
3474 (elf32_m68hc11_setup_section_lists): Declare.
3475 (elf32_m68hc11_size_stubs): Declare.
3476 (elf32_m68hc11_build_stubs): Declare.
3477
3478 * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c.
3479 (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise.
3480 (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto.
3481 (_bfd_m68hc11_elf_set_private_flags): Ditto.
3482 (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto.
3483 (_bfd_m68hc11_elf_print_private_bfd_data): Ditto.
3484 (bfd_elf32_bfd_link_hash_table_create): Define.
3485 (elf_backend_add_symbol_hook): Define.
3486 (m68hc11_elf_bfd_link_hash_table_create): New function.
3487 (m68hc11_elf_build_one_stub): New function.
3488 (m68hc11_elf_size_one_stub): New function.
3489 (m68hc11_elf_bfd_link_hash_table_create): Install the above.
3490 (bfd_elf32_bfd_link_hash_table_create): Define.
3491
3492 * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove.
3493 (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked.
3494 (m68hc12_phys_addr): Ditto.
3495 (m68hc12_phys_page): Ditto.
3496 (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c.
3497 (elf32_m68hc11_gc_mark_hook): Likewise.
3498 (elf32_m68hc11_gc_sweep_hook): Likewise.
3499 (elf32_m68hc11_check_relocs): Likewise.
3500 (elf32_m68hc11_relocate_section): Likewise.
3501 (_bfd_m68hc12_elf_set_private_flags): Likewise.
3502 (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise.
3503 (_bfd_m68hc12_elf_print_private_bfd_data): Likewise.
3504 (m68hc12_elf_build_one_stub): New function.
3505 (m68hc12_elf_size_one_stub): New function.
3506 (m68hc12_elf_bfd_link_hash_table_create): New function, use the above.
3507 (elf_backend_add_symbol_hook): Define.
3508 (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
3509
3510 2003-04-18 Nick Clifton <nickc@redhat.com>
3511
3512 * format.c (bfd_check_format_matches): Only check associated
3513 vector if the matching_vector has been created.
3514
3515 2003-04-15 Alexandre Oliva <aoliva@redhat.com>
3516
3517 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Fix typo in
3518 2003-04-09's change.
3519
3520 2003-04-15 Brian Ford <ford@vss.fsi.com>
3521
3522 * peicode.h (coff_swap_scnhdr_in): If a section holds
3523 uninitialized data and is from an object file or from an
3524 executable image that has not initialized the s_size field, or if
3525 the physical size is padded, use the virtual size (stored in
3526 s_paddr) instead.
3527
3528 2003-04-15 H.J. Lu <hjl@gnu.org>
3529
3530 * elflink.h (elf_link_add_object_symbols): Properly report
3531 filename for alignment reduction.
3532
3533 2003-04-15 Rohit Kumar Srivastava <rohits@kpitcummins.com>
3534
3535 * archures.c: Replace occurrances of 'Hitachi' with 'Renesas'.
3536 * reloc.c: Likewise.
3537 * coff-h8300.c: Likewise.
3538 * coff-h8500.c: Likewise.
3539 * coff-sh.c: Likewise.
3540 * cpu-h8300.c: Likewise.
3541 * cpu-sh.c: Likewise.
3542 * elf32-h8300.c: Likewise.
3543 * elf32-sh.c: Likewise.
3544 * elf32-sh64-com.c: Likewise.
3545 * elf32-sh64.c: Likewise.
3546 * elf64-sh64.c: Likewise.
3547 * bfd-in2.h: Regenerate.
3548
3549 2003-04-14 H.J. Lu <hjl@gnu.org>
3550
3551 * elflink.h (elf_link_add_object_symbols): Maintain maximum
3552 alignment for common symbols. Warn reducing alignment for
3553 common symbols. Report old filename when symbol size changes.
3554
3555 2003-04-12 Alexandre Oliva <aoliva@redhat.com>
3556
3557 * elfxx-mips.c (mips_elf_calculate_relocation): Adjust two other
3558 occurrences of the same test changed in the previous patch.
3559 Optimize.
3560
3561 2003-04-11 Alexandre Oliva <aoliva@redhat.com>
3562
3563 * elfxx-mips.c (mips_elf_get_global_gotsym_index): New.
3564 (mips_elf_calculate_relocation): Decay GOT_PAGE/GOT_OFST to
3565 GOT_DISP/addend only if the symbol got a global GOT entry.
3566
3567 2003-04-10 Alexandre Oliva <aoliva@redhat.com>
3568
3569 * elfxx-mips.c (mips_elf_calculate_relocation): Decay
3570 GOT_PAGE/GOT_OFST referencing overridable symbol to
3571 GOT_DISP/addend.
3572 (_bfd_mips_elf_check_relocs): Handle GOT_PAGE referencing
3573 global symbol as GOT_DISP.
3574
3575 2003-04-10 Bob Wilson <bob.wilson@acm.org>
3576
3577 * elf32-xtensa.c (elf_xtensa_relocate_section): Don't continue to the
3578 next relocation on an undefined symbol.
3579
3580 2003-04-09 Richard Henderson <rth@redhat.com>
3581
3582 * elf64-alpha.c (elf64_alpha_relocate_section) <R_ALPHA_GPREL32>:
3583 Ignore relocations against r_symndx == 0.
3584
3585 2003-04-09 H.J. Lu <hjl@gnu.org>
3586
3587 * elf64-alpha.c (elf64_alpha_relocate_section): Don't return
3588 FALSE for undefined symbols.
3589 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
3590
3591 2003-04-09 Alexandre Oliva <aoliva@redhat.com>
3592
3593 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Try DWARF3-standard
3594 and IRIX-specific shift-to-64-bit 4-byte lengths before following
3595 addr_size.
3596
3597 2003-04-08 Alexandre Oliva <aoliva@redhat.com>
3598
3599 * elf32-mips.c (bfd_elf32_bfd_reloc_type_lookup): Detect (ctor)
3600 pointer size from ABI, not arch_bits_per_address.
3601
3602 2003-04-07 Kevin Buettner <kevinb@redhat.com>
3603
3604 * elfn32-mips.c (elf32_mips_grok_prstatus): Adjust core file related
3605 constants for n32 ABI.
3606
3607 2003-04-06 Andrew Cagney <cagney@redhat.com>
3608
3609 * simple.c (bfd_simple_get_relocated_section_contents): Disable
3610 free that leads to GDB vs BFD memory corruption.
3611
3612 2003-04-04 Stephane Carrez <stcarrez@nerim.fr>
3613
3614 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Also adjust
3615 symbols that mark the end of the section.
3616 (m68hc11_elf_relax_section): Use R_M68HC11_PCREL_8 relocs when
3617 converting to a relative branch so that the offset is computed after
3618 the relaxation; also relocate a jsr into a bsr if possible but don't
3619 relax them if they are to a far symbol as we need to call the
3620 trampoline code.
3621 (elf_m68hc11_howto_table): Set pcrel_offset to true.
3622
3623 2003-04-04 Svein E. Seldal <Svein.Seldal@solidas.com>
3624
3625 * archures.c: Namespace cleanup. Rename bfd_mach_c3x to
3626 bfd_mach_tic3x and bfd_mach_c4x to bfd_mach_tic4x
3627 * bfd-in2.h: Regenerate
3628 * coff-tic4x.c: Namespace cleanup. Replace s/c4x/tic4x/
3629 * cpu-tic4x.c: Ditto
3630
3631 2003-04-03 Nick Clifton <nickc@redhat.com>
3632
3633 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Compute ps and ss
3634 differently for object files and executables.
3635 * peicode.h (coff_swap_scnhdr_in): Only set the s_size field
3636 for object files or for executables who have not already
3637 initialised the field.
3638 * libpei.h (bfd_pe_executable_p): New macro. Return true if
3639 the PE format bfd is an executable.
3640
3641 2003-04-03 Alan Modra <amodra@bigpond.net.au>
3642
3643 * elf32-ppc.c (ppc_elf_check_relocs): Don't use SYMBOL_REFERENCES_LOCAL
3644 here as it's too early to reliably determine locality.
3645 (ppc_elf_gc_sweep_hook): Likewise.
3646 (SYMBOL_REFERENCES_LOCAL): Expand comment.
3647
3648 2003-04-02 Bob Wilson <bob.wilson@acm.org>
3649
3650 * xtensa-modules.c: Remove comment indicating that this is a
3651 generated file.
3652
3653 2003-04-02 Alan Modra <amodra@bigpond.net.au>
3654
3655 * elfxx-mips.c (_bfd_mips_elf_hide_symbol): Test for NULL dynobj.
3656
3657 2003-04-01 Bob Wilson <bob.wilson@acm.org>
3658
3659 * Makefile.am (ALL_MACHINES): Add cpu-xtensa.lo.
3660 (ALL_MACHINES_CFILES): Add cpu-xtensa.c.
3661 (BFD32_BACKENDS): Add elf32-xtensa.lo, xtensa-isa.lo, and
3662 xtensa-modules.lo.
3663 (BFD32_BACKENDS_CFILES): Add elf32-xtensa.c, xtensa-isa.c, and
3664 xtensa-modules.c.
3665 (cpu-xtensa.lo): New target.
3666 (elf32-xtensa.lo): Likewise.
3667 (xtensa-isa.lo): Likewise.
3668 (xtensa-modules.lo): Likewise.
3669 * Makefile.in: Regenerate.
3670 * archures.c (bfd_architecture): Add bfd_{arch,mach}_xtensa.
3671 (bfd_archures_list): Add bfd_xtensa_arch.
3672 * config.bfd: Handle xtensa-*-*.
3673 * configure.in: Handle bfd_elf32_xtensa_{le,be}_vec.
3674 * configure: Regenerate.
3675 * reloc.c: Add BFD_RELOC_XTENSA_{RTLD,GLOB_DAT,JMP_SLOT,RELATIVE,
3676 PLT,OP0,OP1,OP2,ASM_EXPAND,ASM_SIMPLIFY}.
3677 * targets.c (bfd_elf32_xtensa_be_vec): Declare.
3678 (bfd_elf32_xtensa_le_vec): Likewise.
3679 (bfd_target_vector): Add bfd_elf32_xtensa_{be,le}_vec.
3680 * cpu-xtensa.c: New file.
3681 * elf32-xtensa.c: Likewise.
3682 * xtensa-isa.c: Likewise.
3683 * xtensa-modules.c: Likewise.
3684 * libbfd.h: Regenerate.
3685 * bfd-in2.h: Likewise.
3686
3687 2003-04-01 Nick Clifton <nickc@redhat.com>
3688
3689 * archures.c (bfd_mach_arm_unknown): Define.
3690 * bfd-in.h (bfd_arm_merge_machines, bfd_arm+update_notes,
3691 bfd_arm_get_mach_from_notes): Prototype.
3692 * bfd-in2.h: Regenerate.
3693 * coff-arm.c (coff_arm_merge_private_bfd_data): Call
3694 bfd_arm_merge_machines.
3695 (coff_arm_final_link_postscript): Call bfd_arm_update_notes.
3696 * coffcode.h (coff_set_arch_mach_hook): Call
3697 bfd_arm_get_mach_from_notes.
3698 * coffgen.c (coff_real_object_p): Revert previous delta.
3699 * cpu_arm.c (arm_check_note): New function. Examine a note in a
3700 .note section.
3701 (bfd_arm_merge_machines): New function: Handle the merging of ARM
3702 binaries compiled for different architectures..
3703 (bfd_arm_update_notes): New function: Update an ARM note section.
3704 (bfd_arm_get_mach_from_notes): New function: Extract a bfd machine
3705 number from an ARM note section.
3706 * elf32-arm.h (elf32_arm_object_p): Use
3707 bfd_arm_get_mach_from_notes.
3708 (elf32_arm_merge_private_bfd_data): Use bfd_arm_merge_machines.
3709 (elf32_arm_final_write_processing): Use bfd_arm_update_notes.
3710
3711 2003-04-01 Ben Elliston <bje@wasabisystems.com>
3712
3713 * dwarf2.c (read_attribute_value): Correct typo in comment.
3714
3715 2003-04-01 Nick Clifton <nickc@redhat.com>
3716
3717 * dwarf2.c (concat_filename): Use bfd_malloc() and strdup()
3718 instead of concat().
3719 (decode_line_info): Only free filename if it is not NULL.
3720 (add_line_info): Make a copy of the filename when storing it into
3721 the info structure.
3722
3723 2003-03-31 Andreas Schwab <schwab@suse.de>
3724 Daniel Jacobowitz <drow@mvista.com>
3725
3726 * simple.c (bfd_simple_get_relocated_section_contents): Add
3727 parameter symbol_table. Optionally use it instead of the symbol
3728 table from the bfd. Save and restore output offsets and output
3729 sections around bfd_get_relocated_section_contents. Fix a memory
3730 leak.
3731 (simple_save_output_info, simple_restore_output_info): New
3732 functions.
3733 * bfd-in2.h: Regenerate.
3734 * dwarf2.c (read_abbrevs): Use
3735 bfd_simple_get_relocated_section_contents instead of
3736 bfd_get_section_contents.
3737 (decode_line_info): Likewise.
3738 (_bfd_dwarf2_find_nearest_line): Likewise. Don't call
3739 find_rela_addend.
3740 (find_rela_addend): Remove.
3741 * elfxx-ia64.c (elfNN_ia64_reloc): Weaken sanity check for
3742 debugging sections.
3743 (elfNN_ia64_hash_table_create): Create the hash table with malloc,
3744 not bfd_zalloc.
3745
3746 2003-03-31 David Heine <dlheine@suif.stanford.edu>
3747
3748 * aoutx.h (aout_link_hash_table_create): Use bfd_malloc instead of
3749 bfd_alloc.
3750 * dwarf2.c (concat_filename): Always allocate space for the
3751 returned filename.
3752 (decode_line_info): Free the allocated filename returned by
3753 concat_filename.
3754 * elf-eh-frame.c (bfd_elf_write_section_eh_frame): Fix memory leaks.
3755 * elf.c (copy_private_bfd_data): Likewise.
3756 (_bfd_elf_slurp_version_tables): Fix bug freeing contents pointer.
3757 * elflink.h (elf_link_sort_relocs): Fix memory leak.
3758 * format.c (bfd_check_format_matches): Likewise.
3759 * linker.c (bfd_generic_final_link): Likewise.
3760 * opncls.c (find_separate_debug_info): Likewise.
3761 * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
3762
3763 2003-03-28 H.J. Lu <hjl@gnu.org>
3764
3765 * elflink.h (elf_link_add_object_symbols): Correctly combine
3766 visibilities.
3767
3768 2003-03-27 Jakub Jelinek <jakub@redhat.com>
3769
3770 * elfxx-ia64.c (elfNN_ia64_relax_section): Reset self_dtpmod_offset
3771 to -1 before recomputing got offsets.
3772
3773 2003-03-26 Andreas Schwab <schwab@suse.de>
3774
3775 * elf32-m68k.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
3776 (elf_m68k_relocate_section): Use it to correctly handle symbols
3777 forced to be local.
3778 (elf_m68k_finish_dynamic_symbol): Emit RELATIVE reloc for got
3779 entries for symbols that are forced to be local.
3780
3781 2003-03-25 Alexandre Oliva <aoliva@redhat.com>
3782
3783 * elfxx-mips.c (_bfd_mips_relax_section): New function.
3784 * elfxx-mips.h (_bfd_mips_relax_section): Declare.
3785 * elfn32-mips.c, elf64-mips.c: Use it.
3786
3787 2003-03-25 Stan Cox <scox@redhat.com>
3788 Nick Clifton <nickc@redhat.com>
3789
3790 Contribute support for Intel's iWMMXt chip - an ARM variant:
3791
3792 * archures.c: Add bfd_mach_arm_iWMMXt.
3793 * reloc.c: Add BFD_RELOC_ARM_CP_OFF_IMM_S2.
3794 * bfd-in2.h: Regenerate.
3795 * libbfd.h: Regenerate.
3796 * coff-arm.c (coff_arm_merge_private_bfd_data): Allow iWMMXt
3797 object files to be linked with XScale ones.
3798 (coff_arm_final_link_postscript): Update note section.
3799 * coffcode.h (coff_set_arch_mach_hook): Handle note section.
3800 * coffgen.c (coff_real_object_p): Call bfd_coff_set_arch_mach_hook
3801 after identifying a coff binary.
3802 * cpu-arm.c (processors): Add iWMMXt.
3803 (arch_inf): Likewise.
3804 * elf32-arm.h (arm_object_p): Handle note section.
3805 (elf32_arm_merge_private_bfd_data): Allow iWMMXt object files to
3806 be linked with XScale ones.
3807 (elf32_arm_section_flags): New function: Set flags on note section.
3808 (elf32_arm_final_write_processing): Handle note section.
3809
3810 2003-03-21 DJ Delorie <dj@redhat.com>
3811
3812 * elf32-xstormy16.c (elf32_xstormy16_relocate_section): Call
3813 _bfd_elf_rela_local_sym.
3814
3815 2003-03-20 H.J. Lu <hjl@gnu.org>
3816
3817 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't try relax for
3818 non-ELF outputs.
3819
3820 2003-03-20 Nick Clifton <nickc@redhat.com>
3821
3822 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Initialise $idata2 and
3823 $idata5 in case bfd_coff_final_link is not called.
3824
3825 2003-03-19 Jakub Jelinek <jakub@redhat.com>
3826
3827 * elf64-sparc.c (struct sparc64_elf_section_data): Add reloc_count
3828 field.
3829 (canon_reloc_count): Define.
3830 (sparc64_elf_slurp_one_reloc_table, sparc64_elf_slurp_reloc_table,
3831 sparc64_elf_canonicalize_dynamic_reloc): Use it instead of
3832 reloc_count.
3833 (sparc64_elf_canonicalize_reloc): New routine.
3834 (bfd_elf64_canonicalize_reloc): Define.
3835
3836 2003-03-18 Jakub Jelinek <jakub@redhat.com>
3837
3838 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle relaxation
3839 againt mergeable sections. Take r_addend into account when caching
3840 trampolines.
3841
3842 2003-03-18 Richard Henderson <rth@redhat.com>
3843
3844 * elfxx-ia64.c (get_dyn_sym_info): Return NULL gracefully for
3845 local symbols that have no dyninfo.
3846
3847 2003-03-14 Gene Smith <gene.smith@siemens.com>
3848
3849 * ieee.c (ieee_write_expression): Handle the case where symbol is
3850 NULL.
3851 General formatting improvements.
3852
3853 2003-03-13 Nick Clifton <nickc@redhat.com>
3854
3855 * configure.in (LINGUAS): Add zh_CN.
3856 * configure: Regenerate.
3857 * po/zh_CN.po: New file.
3858
3859 2003-03-13 Elias Athanasopoulos <elathan@phys.uoa.gr>
3860
3861 * aout-cris.c (BYTES_IN_WORD): Don't define.
3862 aout-encap.c: Likewise.
3863 aout-ns32k.c: Likewise.
3864 aout-tic30.c: Likewise.
3865 hp300bsd.c: Likewise.
3866 i386aout.c: Likewise.
3867 i386dynix.c: Likewise.
3868 i386linux.c: Likewise.
3869 i386lynx.c: Likewise.
3870 i386mach3.c: Likewise.
3871 m68k4knetbsd.c: Likewise.
3872 m68klinux.c: Likewise.
3873 m68klynx.c: Likewise.
3874 m68knetbsd.c: Likewise.
3875 m88kmach3.c: Likewise.
3876 mipsbsd.c: Likewise.
3877 newsos3.c: Likewise.
3878 sparclinux.c: Likewise.
3879 sparclynx.c: Likewise.
3880 sparcnetbsd.c: Likewise.
3881 vaxbsd.c: Likewise. Fix comment formatting.
3882
3883 2003-03-12 Alexandre Oliva <aoliva@redhat.com>
3884
3885 * Reverted 2003-03-02's patch.
3886
3887 * elfxx-target.h (bfd_elfNN_canonicalize_reloc): Make it
3888 overridable.
3889 * elf64-mips.c (mips_elf64_canonicalize_reloc,
3890 mips_elf64_get_dynamic_reloc_upper_bound,
3891 mips_elf64_canonicalize_dynamic_reloc): New, adapted from elf.c.
3892 (bfd_elf64_get_canonicalize_reloc,
3893 bfd_elf64_get_dynamic_reloc_upper_bound,
3894 bfd_elf64_canonicalize_dynamic_reloc): Define.
3895 (mips_elf64_slurp_reloc_table): Support dynamic.
3896 (mips_elf64_slurp_one_reloc_table): Adjust.
3897
3898 2003-03-12 Nick Clifton <nickc@redhat.com>
3899
3900 * xsym.c (bfd_sym_fetch_type_information_table_entry): Change
3901 'index' to 'offset' in test for zero value.
3902
3903 2003-03-11 Alexandre Oliva <aoliva@redhat.com>
3904
3905 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Do not create
3906 dynamic relocations pointing to local or section symbols, use the
3907 NULL symbol instead. Document the choice to not emit an
3908 additional R_MIPS_64 relocation.
3909
3910 2003-03-11 Alan Modra <amodra@bigpond.net.au>
3911
3912 * elf32-ppc.c (ppc_elf_relocate_section): Subtract tls seg vma from
3913 zero index dynamic tls relocs generated for the GOT. Tidy code.
3914 Set "relocation" to 1 on DTPMOD32 relocs. Optimize HA adjustment.
3915 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
3916
3917 2003-03-07 Alan Modra <amodra@bigpond.net.au>
3918
3919 * elf32-ppc.c (ppc_elf_relocate_section): Don't look for a nop after
3920 a tls_get_addr call.
3921
3922 * elf32-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
3923 (ppc_elf_adjust_dynamic_symbol): For weak symbols, copy
3924 ELF_LINK_NON_GOT_REF from weakdef.
3925 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
3926 (ppc64_elf_adjust_dynamic_symbol): For weak symbols, copy
3927 ELF_LINK_NON_GOT_REF from weakdef.
3928 * elf32-i386.c (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
3929 (elf_i386_adjust_dynamic_symbol): For weak symbols, copy
3930 ELF_LINK_NON_GOT_REF from weakdef.
3931
3932 2003-03-06 Jakub Jelinek <jakub@redhat.com>
3933 Andrew Haley <aph@redhat.com>
3934
3935 * elflink.h (elf_bfd_discard_info): Don't process eh frames if
3936 output is relocateable.
3937
3938 2003-03-06 Steven Konopa <skonopa@kgo.csc.com>
3939
3940 * som.c (som_fixup_formats): Correct formats for R_AUX_UNWIND and
3941 R_COMMENT.
3942
3943 2003-03-06 Alan Modra <amodra@bigpond.net.au>
3944
3945 * elf32-ppc.c (ppc_elf_create_linker_section): Don't capitalize
3946 error messages.
3947 (ELIMINATE_COPY_RELOCS): Define to zero.
3948 (ppc_elf_relocate_section): Don't deref htab->tls_sec when calculating
3949 TLSLD relocs. Report reloc types on a number of errors. Optimize
3950 LOCAL24PC check for non-local syms. Don't capitalize error messages.
3951 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define to zero.
3952 (ppc64_elf_relocate_section): Don't deref htab->tls_sec when
3953 calculating TLSLD relocs. Report reloc types on a number of errors.
3954 Don't capitalize error messages.
3955
3956 2003-03-03 H.J. Lu <hjl@gnu.org>
3957
3958 * elfxx-ia64.c (USE_BRL): Removed.
3959 (oor_ip): Removed.
3960
3961 2003-03-03 J"orn Rennecke <joern.rennecke@superh.com>
3962
3963 * elf32-sh.c (sh_elf_howto_tab): Make R_SH_IND12W into an ordinary
3964 relocation (no special function), and make it non-partial_inplace.
3965 (sh_elf_relax_section): When creating a bsr, use a consistent value
3966 no matter if the symbol is extern or not; set addend to -4.
3967 Don't swap load / non-load instructions for SH4.
3968 (sh_elf_relax_delete_bytes): In R_SH_IND12W case, check the offset
3969 rather than if the symbol is external to determine if adjusting the
3970 offset makes sense. Adjust the addend too if appropriate.
3971 (sh_elf_relocate_section): In R_SH_IND12W, don't fiddle with the
3972 relocation.
3973
3974 2003-03-03 Nick Clifton <nickc@redhat.com>
3975
3976 * po/da.po: Installed latest translation.
3977
3978 2003-03-02 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3979
3980 * elf32-mips.c (elf_mips_howto_table_rel): Change definition of
3981 R_MIPS_PC16 to rightshift 2.
3982 (elf_reloc_map mips_reloc_map): Map to rightshifted BFD reloc.
3983 (bfd_elf32_bfd_reloc_type_lookup): Support
3984 BFD_RELOC_MIPSEMB_16_PCREL_S2.
3985 * elf64-mips.c (mips_elf64_howto_table_rel): Change definition of
3986 R_MIPS_PC16 to rightshift 2.
3987 (mips_elf64_howto_table_rela): Likewise.
3988 (mips_reloc_map): Map to rightshifted BFD reloc.
3989 * elfn32-mips.c: The same as in elf64-mips.c.
3990 * elfxx-mips.c (mips_elf_got_for_ibfd): Typo in comment.
3991 (mips_elf_calculate_relocation): Handle rightshifted addends for
3992 R_MIPS_PC16.
3993 * reloc.c (BFD_RELOC_MIPSEMB_16_PCREL_S2): New BFD relocation for
3994 MIPS Embedded PIC. Remove superfluous empty COMMENT.
3995 * libbfd.h: Regenerate.
3996 * bfd-in2.h: Regenerate.
3997
3998 2003-02-28 Richard Henderson <rth@redhat.com>
3999
4000 * elfxx-ia64.c (elfNN_ia64_relax_section): Correct bounds
4001 for ltoff22x relaxation.
4002
4003 2003-03-01 Alan Modra <amodra@bigpond.net.au>
4004
4005 * bfd-in.h (_bfd): Don't define.
4006 * bfd.c: Rename occurrences of "struct _bfd" to "struct bfd".
4007 * syms.c: Likewise.
4008 * bfd-in2.h: Regenerate.
4009
4010 2003-02-27 Richard Henderson <rth@redhat.com>
4011
4012 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add want_gotx;
4013 (elfNN_ia64_check_relocs): Set it.
4014 (allocate_global_data_got): Check it.
4015 (allocate_local_got): Likewise.
4016 (allocate_dynrel_entries): Likewise.
4017 (elfNN_ia64_relax_ldxmov): New.
4018 (elfNN_ia64_relax_section): Handle LTOFF22X, LDXMOV.
4019 (elfNN_ia64_choose_gp): Split out from ...
4020 (elfNN_ia64_final_link): ... here.
4021
4022 2003-02-27 Andrew Cagney <cagney@redhat.com>
4023
4024 * bfd.c (struct bfd): Rename "struct _bfd".
4025 * bfd-in.h: Update copyright.
4026 (struct bfd): Rename "struct _bfd".
4027 (_bfd): Define for backward compatibility.
4028 * bfd-in2.h: Regenerate.
4029
4030 2003-02-25 Alan Modra <amodra@bigpond.net.au>
4031
4032 * elflink.h (elf_bfd_final_link): Apportion reloc counts to rel_hdr
4033 and rel_hdr2 when initially counting input relocs rather than after
4034 creating output reloc sections.
4035 (elf_link_read_relocs_from_section): Don't abort with wrong reloc
4036 sizes.
4037
4038 * Makefile.am: Run "make dep-am".
4039 * Makefile.in: Regenerate.
4040
4041 2003-02-24 Kris Warkentin <kewarken@qnx.com>
4042
4043 * elf.c (elfcore_read_notes): Add check for QNX style core file.
4044 (elfcore_grog_nto_note): New function.
4045 (elfcore_grog_nto_gregs): New function.
4046 (elfcore_grog_nto_status): New function.
4047
4048 2003-02-24 Alan Modra <amodra@bigpond.net.au>
4049
4050 * elflink.c (_bfd_elf_create_got_section): Check existing .got
4051 section flags before concluding that we've already been called.
4052 Don't use register keyword.
4053 (_bfd_elf_create_dynamic_sections): Don't use register keyword.
4054 (_bfd_elf_create_linker_section): Formatting.
4055
4056 2003-02-20 jmc <jmc@prioris.mini.pw.edu.pl>
4057
4058 * coff-h8300.c: Fix typo: intial -> initial.
4059 * coff-ppc.c: Likewise.
4060
4061 2003-02-20 Alan Modra <amodra@bigpond.net.au>
4062
4063 * elf32-ppc.c: Formatting.
4064 (allocate_dynrelocs): LD and GD relocs against the same sym need
4065 separate GOT entries.
4066 (ppc_elf_relocate_section): Correct GOT handling for multiple GOT
4067 entries per symbol.
4068
4069 2003-02-19 Alan Modra <amodra@bigpond.net.au>
4070
4071 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Simplify dynamic reloc
4072 removal. Localize vars. Remove unnecessary dynobj test.
4073 * elf32-i386 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead
4074 of INFO.
4075 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
4076 and optimize.
4077 (elf_i386_relocate_section): Likewise.
4078 (elf_i386_gc_sweep_hook): Simplify dyn reloc removal. Localize vars.
4079 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
4080 * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
4081 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
4082 * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
4083 * elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise. Remove
4084 local_dynrel for section too. Don't touch HIPLT22, LOPLT10, PCPLT32
4085 or PCPLT10 relocs. Don't subtract twice on PLT32 relocs.
4086 Formatting.
4087
4088 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define.
4089 (ppc64_elf_check_relocs): Use it. Correct comment. Move SEC_ALLOC
4090 test.
4091 (ppc64_elf_adjust_dynamic_symbol): Use ELIMINATE_COPY_RELOCS.
4092 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
4093 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
4094 and optimize. Use ELIMINATE_COPY_RELOCS.
4095 (ppc64_elf_relocate_section): Likewise.
4096
4097 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Add pc_count field.
4098 (ppc_elf_copy_indirect_symbol): Copy pc_count field.
4099 (ELIMINATE_COPY_RELOCS): Define.
4100 (ppc_elf_adjust_dynamic_symbol): Convert copy relocs to dynamic.
4101 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
4102 (MUST_BE_DYN_RELOC): Define.
4103 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
4104 and optimize. Trim dyn_relocs.
4105 (ppc_elf_check_relocs): Don't generate dyn_relocs when we know they'll
4106 not be used. Do generate dyn_relocs for copy reloc avoidance. Keep
4107 track of pc_rel dyn relocs.
4108 (ppc_elf_relocate_section): Remove "will_become_local". Adjust
4109 WILL_CALL_FINISH_DYNAMIC_SYMBOL use. Trim dyn relocs as per
4110 allocate_dynrelocs. Don't recalculate "sec".
4111
4112 2003-02-18 Alan Modra <amodra@bigpond.net.au>
4113
4114 * elf32-ppc.c (ppc_elf_relocate_section): Remove unnecessary test.
4115 * elf64-ppc.c (ppc64_elf_tls_optimize): Decrement tlsld_got.refcount
4116 on invalid LD relocs.
4117 (allocate_dynrelocs): Invalid LD relocs don't use tlsld_got entry.
4118 (ppc64_elf_relocate_section): Unify new handling of LD relocs and
4119 tlsld_got entry. Use IS_PPC64_TLS_RELOC.
4120
4121 * elf32-ppc.h: New file.
4122 * elf32-ppc.c: Include elf32-ppc.h.
4123 (NOP, CROR_151515, CROR_313131, TP_OFFSET, DTP_OFFSET): Define.
4124 (struct ppc_elf_link_hash_entry): Rename "root" to "elf". Adjust uses.
4125 Add "tls_mask" field.
4126 (TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL, TLS_TLS, TLS_TPRELGD): Define.
4127 (struct ppc_elf_link_hash_table): Rename "root" to "elf". Adjust uses.
4128 Add got, relgot, plt, relplt, dynbss, relbss, dynsbss, relsbss,
4129 sdata, sdata2, tls_sec, tls_get_addr, tlsld_got fields.
4130 Make use of htab shortcuts throughout file.
4131 (ppc_elf_link_hash_newfunc): Init tls_mask field.
4132 (ppc_elf_link_hash_table_create): Init new fields.
4133 (ppc_elf_copy_indirect_symbol): Copy tls_mask.
4134 (ppc_elf_howto_raw): Add tls relocs.
4135 (ppc_elf_reloc_type_lookup): Handle them.
4136 (ppc_elf_unhandled_reloc): New function.
4137 (ppc_elf_create_got): Stash got section pointer in hash table,
4138 return status. Make .rela.got too.
4139 (ppc_elf_create_dynamic_sections): Stash section pointers in htab.
4140 (ppc_elf_adjust_dynamic_symbol): Only set up copy relocs when
4141 NON_GOT_REF set. Don't allocate space in .plt here..
4142 (allocate_dynrelocs): ..do so here instead, properly ref-counting and
4143 not allocating plt entries unnecessarily. Allocate got entries here.
4144 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
4145 (ppc_elf_size_dynamic_sections): Allocate local got entries. Pass
4146 "info" during allocate_dynrelocs hash traversal. Use htab section
4147 shortcuts rather than searching for named sections. Get rid of
4148 "plt" and "strip" booleans.
4149 (update_local_sym_info, bad_shared_reloc): New functions.
4150 (ppc_elf_check_relocs): Handle TLS relocs. Move .rela.got creation to
4151 ppc_elf_create_got. Don't mark got or plt reloc syms dynamic, do so
4152 in allocate_dynreloc. Use update_local_sym_info and bad_shared_reloc.
4153 Disallow R_PPC_EMB_RELSDA, R_PPC_EMB_NADDR32, R_PPC_EMB_NADDR16,
4154 R_PPC_EMB_NADDR16_LO, R_PPC_EMB_NADDR16_HI and R_PPC_EMB_NADDR16_HA
4155 in shared libs. R_PPC_PLTREL32 is a plt reloc too. Refcount all
4156 relocs that might use a plt entry. Set NON_GOT_REF too.
4157 Enumerate all do-nothing relocs.
4158 (ppc_elf_gc_sweep_hook): Simplify removal of dynrelocs. Handle
4159 tls relocs and all plt relocs.
4160 (ppc_elf_tls_setup, ppc_elf_tls_optimize): New functions.
4161 (ppc_elf_finish_dynamic_symbol): Don't build got entries here.
4162 (ppc_elf_finish_dynamic_sections): Rewrite tag code using htab
4163 shortcuts.
4164 (ppc_elf_relocate_section): Tidy. Handle TLS relocs. Use
4165 bfd_elf_local_sym_name. Simplify unresolved reloc code. Build got
4166 entries and got relocs here. Warn on non-zero got reloc addend.
4167 Split out branch taken/not taken reloc code into a separate switch
4168 and correct offset calculation. Allow BRTAKEN/BRNTAKEN dynamic relocs.
4169 Split out HA reloc adjustments to separate switch statement. Don't
4170 warn on reloc overflow if we've already warned about undefined.
4171 Don't rebuild sym name when reporting errors. Report all possible
4172 errors from _bfd_final_link_relocate.
4173 (bfd_elf32_bfd_final_link): Don't define.
4174
4175 2003-02-18 Alan Modra <amodra@bigpond.net.au>
4176
4177 * elf64-ppc.c (ppc64_elf_relocate_section): Don't init "r". Don't
4178 rebuild sym name when reporting errors.
4179
4180 2003-02-17 Nick Clifton <nickc@redhat.com>
4181
4182 * elflink.h (elf_link_output_extsym): Only check
4183 allow_shlib_undefined for shared libraries.
4184 * elf32-i386.c (elf_i386_relocate_section): Remove bogus check
4185 of allow_shlib_undefined.
4186 * elf32-cris.c (cris_elf_relocate_section): Likewise.
4187 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
4188 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
4189 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
4190 * elf32-s390.c (elf_s390_relocate_section): Likewise.
4191 * elf32-sh.c (sh_elf_relocate_section): Likewise.
4192 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
4193 * elf32-vax.c (elf_vax_relocate_section): Likewise.
4194 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
4195 * elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
4196 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
4197 * elf64-s390.c (elf_s390_relocate_section): Likewise.
4198 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
4199 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
4200 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
4201 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
4202
4203 2003-02-17 Nick Clifton <nickc@redhat.com>
4204
4205 * elf.c (SEGMENT_AFTER_SEGMENT): Add third parameter - the
4206 address field to use in the comparison.
4207 (SEGMENT_OVERLAPS): Check that LMAs overlap as well.
4208
4209 2003-02-14 Bob Wilson <bob.wilson@acm.org>
4210
4211 * elfcore.h (elf_core_file_p): Compare alternate machine codes for ELF
4212 backends when checking if the generic ELF target should be used.
4213
4214 * syms.c (_bfd_stab_section_find_nearest_line): For line number stabs
4215 outside of functions, treat values as absolute addresses.
4216
4217 * bfd.c: Change embedded documentation to use consistent indentation
4218 and to split up long lines. Change informal style of description
4219 for functions lacking real documentation.
4220 * coffcode.h: Break up long lines in embedded documentation.
4221 * format.c: Likewise.
4222 * targets.c: Likewise.
4223 * libcoff.h: Regenerate.
4224 * bfd-in2.h: Regenerate.
4225
4226 2003-02-14 Alan Modra <amodra@bigpond.net.au>
4227
4228 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Init tls_get_addr.
4229 (ppc64_elf_copy_indirect_symbol): Merge tls_mask too.
4230 (ppc64_elf_gc_sweep_hook): Simplify removal of dyn_relocs.
4231 (allocate_dynrelocs): Don't treat undefined and undefweak specially.
4232 (ppc_size_one_stub): Fix warning, and tighten plt entry check.
4233 (group_sections): Don't share a stub section if stubs are for a large
4234 section. Adjust comment.
4235 (ppc64_elf_size_stubs): Roughly double the size left for stubs if
4236 !stubs_always_before_branch.
4237 (ppc64_elf_relocate_section): Initialize tlsld GOT entry once. Don't
4238 treat undefined and undefweak specially when processing dyn relocs.
4239
4240 2003-02-13 Jakub Jelinek <jakub@redhat.com>
4241
4242 * elflink.h (elf_link_add_object_symbols): Handle .symver x, x@FOO.
4243
4244 2003-02-13 Nick Clifton <nickc@redhat.com>
4245
4246 * elf32-arm.h (elf32_thumb_to_arm_stub): Include section VMAs
4247 in computation of offset to insert into BL instruction.
4248
4249 2003-02-11 Uwe Stieber <uwe@wwws.de>
4250
4251 * config.bfd: Add support for kaOS as cross build target system.
4252
4253 2003-02-11 Alan Modra <amodra@bigpond.net.au>
4254
4255 * elf64-ppc.c (ppc64_elf_check_relocs): Match versioned
4256 .__tls_get_addr too.
4257 (ppc64_elf_tls_setup): Ensure cached tls_get_addr is not indirect.
4258
4259 2003-02-10 Kaz kojima <kkojima@rr.iij4u.or.jp>
4260
4261 * elf32-sh.c (elf_sh_dyn_relocs): Add tls_tpoff32 field.
4262 (elf_sh_link_hash_entry): Remove tls_tpoff32 field.
4263 (sh_elf_link_hash_newfunc): Remove the initialization of
4264 tls_tpoff32 field.
4265 (allocate_dynrelocs): Keep dyn_relocs if it includes the entry
4266 for which tls_tpoff32 flag is set.
4267 (sh_elf_relocate_section): Covert to LE only if the dyn_relocs
4268 of the symbol includes the entry matched with the input_section
4269 and having tls_tpoff32 flag on. When linking statically, set
4270 symbol index of R_SH_TLS_TPOFF32 relocation to zero if the symbol
4271 is defined in this executable.
4272 (sh_elf_check_relocs): Set tls_tpoff32 flag appropriately.
4273
4274 2003-02-10 Jakub Jelinek <jakub@redhat.com>
4275
4276 * elf32-s390.c (elf_s390_size_dynamic_sections): Set relocs to TRUE
4277 even if there is just non-empty .rela.plt.
4278
4279 2003-02-10 Nick Clifton <nickc@redhat.com>
4280
4281 * archures.c (bfd_mach_arm_ep9312): Define.
4282 * bfd-in2.h: Regenerate.
4283 * cpu-arm.c (processors[]): Add ep9312.
4284 (bfd_arm_arch): Add ep9312.
4285 * elf32-arm.h (elf32_arm_merge_private_data): Update error
4286 messages and add test for Maverick floating point support.
4287 (elf32_arm_print_private_bfd_data): Handle
4288 EF_ARM_MAVERICK_FLOAT flag.
4289 (elf32_arm_object_p): New function.
4290 (elf_backend_object_p): Define.
4291
4292 2003-02-10 Alan Modra <amodra@bigpond.net.au>
4293
4294 * elf64-ppc.c: Rename assorted occurrences of tls_type and similar
4295 variables, structure fields or function params to tls_mask or
4296 similar to better reflect usage.
4297 (struct got_entry): Comment.
4298 (struct ppc_link_hash_entry): Expand comment, and renumber TLS_*.
4299 (get_tls_mask): Rename from get_tls_type.
4300
4301 2003-02-09 Alan Modra <amodra@bigpond.net.au>
4302
4303 * elf64-ppc.c (TLS_GD_LD): Don't define..
4304 (TLS_GD): ..define this instead and update all uses.
4305 (TLS_TPRELGD): Define.
4306 (ppc64_elf_link_hash_table_create): Tweak initialization of
4307 init_refcount and init_offset.
4308 (ppc64_elf_check_relocs): Add one extra element to t_symndx array.
4309 Mark second slot of GD or LD toc entries.
4310 (get_tls_type): Return an int. Distinguish toc GD and LD entries
4311 from other tls types.
4312 (ppc64_elf_tls_setup): New function, split out from..
4313 (ppc64_elf_tls_optimize): ..here. Don't optimize when symbols are
4314 defined in a dynamic object. Fix LD optimization. Don't set TLS_TPREL
4315 on GD->IE optimization, use TLS_TPRELGD instead. Use get_tls_type
4316 return value to properly decide whether toc GD and LD entries can
4317 optimize away __tls_get_addr call. Check next reloc after DTPMOD64
4318 to determine GD or LD rather than looking at TLS_LD flag. Don't
4319 attempt to adjust got entry tls_type here..
4320 (allocate_dynrelocs): ..instead, adjust got entry tls_type here, and
4321 look for possible merges.
4322 (ppc64_elf_size_dynamic_sections): Adjust local got entries for
4323 optimization.
4324 (ppc64_elf_size_stubs): Tweak __tls_get_addr fudge.
4325 (ppc64_elf_relocate_section): Rename some vars to better reflect usage.
4326 Make use of return value from get_tls_type to properly detect GD and
4327 LD optimizations. Split tlsld/gd hi/ha from lo/ds case. Don't
4328 handle tls_get_addr removal when looking at REL24 relocs, do it when
4329 looking at the previous reloc. Check reloc after DTPMOD64 to determine
4330 GD or LD.
4331 * elf64-ppc.h (ppc64_elf_tls_setup): Declare.
4332
4333 2003-02-08 Alan Modra <amodra@bigpond.net.au>
4334
4335 * elf32-hppa.c (group_sections): Don't share a stub section if
4336 stubs are for a large section.
4337
4338 * elf32-hppa.c (elf32_hppa_size_stubs): Double the size left for
4339 stubs if !stubs_always_before_branch.
4340
4341 2003-02-07 Nick Clifton <nickc@redhat.com>
4342
4343 * elf.c (swap_out_syms): Generate an error message if an
4344 equivalent output section cannot be found for a symbol.
4345
4346 2003-02-07 Jakub Jelinek <jakub@redhat.com>
4347
4348 * elf64-alpha.c (elf64_alpha_relax_section): Don't crash if
4349 local_got_entries is NULL.
4350
4351 2003-02-06 Andreas Schwab <schwab@suse.de>
4352
4353 * elf-eh-frame.c (get_DW_EH_PE_signed): Define.
4354 (read_value): Add parameter is_signed, use signed extraction if
4355 the value is signed.
4356 (_bfd_elf_write_section_eh_frame): Pass signed flag of the
4357 encoding to read_value.
4358
4359 2003-02-06 Alan Modra <amodra@bigpond.net.au>
4360
4361 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy got and
4362 plt info when called to transfer weak sym info.
4363
4364 2003-02-05 Alan Modra <amodra@bigpond.net.au>
4365
4366 * reloc.c: Add PPC and PPC64 TLS relocs.
4367 * libbfd.h: Regenerate.
4368 * bfd-in2.h: Regenerate.
4369 * elf64-ppc.c (TP_OFFSET, DTP_OFFSET): Declare.
4370 (ppc64_elf_howto_raw): Add TLS howto's. Adjust R_PPC64_NONE to be
4371 against a 32 bit field.
4372 (ppc64_elf_reloc_type_lookup): Handle TLS relocs.
4373 (_ppc64_elf_section_data): Add t_symndx and comments.
4374 (ppc64_elf_section_data): Use elf_section_data macro.
4375 (ppc64_elf_new_section_hook): American spelling.
4376 (struct got_entry, struct plt_entry): New.
4377 (MUST_BE_DYN_RELOC): Rename from IS_ABSOLUTE_RELOC.
4378 (struct ppc_stub_hash_entry): Add "addend" field.
4379 (struct ppc_link_hash_entry): Add "tls_type".
4380 (TLS_TLS, TLS_GD_LD, TLS_LD, TLS_TPREL, TLS_DTPREL,
4381 TLS_EXPLICIT): Define.
4382 (struct ppc_link_hash_table): Add tls_sec, tls_get_addr, tlsld_got.
4383 (link_hash_newfunc): Init new fields.
4384 (ppc64_elf_link_hash_table_create): Likewise. Set init_refcount and
4385 init_offset to NULL.
4386 (ppc64_elf_copy_indirect_symbol): Copy got and plt info. Don't call
4387 _bfd_elf_link_hash_copy_indirect, rather insert relevant code from
4388 there.
4389 (update_local_sym_info, update_plt_info): New functions.
4390 (ppc64_elf_check_relocs): Use them. Handle TLS relocs. Adjust GOT
4391 handling to use got.glist rather than got.refcount. Likewise for PLT.
4392 (ppc64_elf_gc_sweep_hook): Handle TLS relocs, new GOT and PLT lists.
4393 (func_desc_adjust): Adjust for new PLT list.
4394 (ppc64_elf_adjust_dynamic_symbol): Likewise.
4395 (get_sym_h, get_tls_type): New functions.
4396 (ppc64_elf_edit_opd): Remove unused variable. Use get_sym_h.
4397 (ppc64_elf_tls_optimize): New function.
4398 (allocate_dynrelocs): Adjust for new PLT and GOT lists. Allocate
4399 TLS relocs.
4400 (ppc64_elf_size_dynamic_sections): Likewise.
4401 (ppc_type_of_stub): Adjust for new PLT list.
4402 (ppc_build_one_stub): Likewise.
4403 (ppc64_elf_size_stubs): Likewise. Use get_sym_h. Treat __tls_get_addr
4404 calls specially.
4405 (ppc64_elf_relocate_section): Adjust for new GOT and PLT lists. Handle
4406 TLS relocs. Report local syms using bfd_elf_local_sym_name. Don't
4407 init GOT entries that have a reloc. Generate GOT relocs here..
4408 (ppc64_elf_finish_dynamic_symbol): ..not here. Adjust for PLT list.
4409 * elf64-ppc.h (ppc64_elf_tls_optimize): Declare.
4410
4411 2003-02-04 Andreas Schwab <schwab@suse.de>
4412
4413 * elf32-m68k.c (elf_m68k_hash_entry): Define.
4414 (elf_m68k_link_hash_traverse): Remove.
4415 (elf_m68k_link_hash_newfunc): Use struct bfd_hash_entry and
4416 elf_m68k_hash_entry instead of struct elf_m68k_link_hash_entry to
4417 reduce casting.
4418 (elf_m68k_check_relocs): Use elf_m68k_hash_entry instead of
4419 casting.
4420 (elf_m68k_size_dynamic_sections): Use elf_link_hash_traverse
4421 instead of elf_m68k_link_hash_traverse.
4422 (elf_m68k_discard_copies): Change first parameter to pointer to
4423 struct elf_link_hash_entry and use elf_m68k_hash_entry when struct
4424 elf_m68k_link_hash_entry is needed.
4425
4426 2003-02-04 Alan Modra <amodra@bigpond.net.au>
4427
4428 * elf-bfd.h (struct got_entry, struct plt_entry): Forward declare.
4429 (struct elf_link_hash_entry): Add "glist" and "plist" fields to
4430 "got" union, and declare as gotplt_union. Use gotplt_uinion for
4431 "plt" field.
4432 (struct elf_link_hash_table): Make "init_refcount" a gotplt_union.
4433 Add "init_offset" field.
4434 (struct elf_obj_tdata <local_got>): Add "struct got_entry **" to union.
4435 (elf_local_got_ents): Declare.
4436 * elf.c (_bfd_elf_link_hash_newfunc): Adjust initialization of "got"
4437 and "plt".
4438 (_bfd_elf_link_hash_hide_symbol): Use "init_offset".
4439 (_bfd_elf_link_hash_table_init): Set "init_offset".
4440 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set init_refcount
4441 from init_offset.
4442 (elf_adjust_dynamic_symbol): Set plt and got offsets using init_offset.
4443
4444 * elf.c (bfd_elf_local_sym_name): Split out from..
4445 (group_signature): ..here.
4446 * elf-bfd.h (bfd_elf_local_sym_name): Declare.
4447
4448 2003-02-04 Alan Modra <amodra@bigpond.net.au>
4449
4450 * elf-bfd.h (enum elf_link_info_type): Remove.
4451 (struct bfd_elf_section_data): Move sec_info_type, use_rela_p fields
4452 to struct sec. Remove linkonce_p field.
4453 (elf_linkonce_p): Delete.
4454 (elf_discarded_section): Update for sec_info_type change.
4455 * section.c (struct sec): Add sec_info_type, use_rela_p, has_tls_reloc,
4456 flag11, flag12, flag13, flag14, flag15, flag16, flag20, flag24.
4457 (ELF_INFO_TYPE_NONE): Define.
4458 (ELF_INFO_TYPE_STABS): Define.
4459 (ELF_INFO_TYPE_MERGE): Define.
4460 (ELF_INFO_TYPE_EH_FRAME): Define.
4461 (ELF_INFO_TYPE_JUST_SYMS): Define.
4462 (STD_SECTION): Update struct sec initializer.
4463 * ecoff.c (bfd_debug_section): Likewise.
4464 * elf.c: Likewise. Update occurrences of sec_info_type and use_rela_p.
4465 * elflink.h: Likewise.
4466 * elf-eh-frame.c: Likewise.
4467 * elf64-alpha.c: Likewise.
4468 * elfxx-ia64.c: Likewise.
4469 * elfxx-mips.c: Likewise.
4470 * bfd-in2.h: Regenerate.
4471
4472 * elf32-sparc.c (sec_do_relax): Use elf_section_data macro rather than
4473 referring to used_by_bfd.
4474 * elf64-sparc.c (sec_do_relax): Likewise.
4475 * elf64-mmix.c (mmix_elf_section_data): Likewise.
4476 * elfxx-mips.c (mips_elf_section_data): Likewise.
4477 * ieee.c (ieee_slurp_section_data): Use ieee_per_section macro.
4478 (ieee_get_section_contents): Likewise.
4479 (ieee_new_section_hook): Formatting.
4480 (ieee_canonicalize_reloc): Remove commented out code.
4481 * mmo.c (mmo_section_data): Define. Use throughout file.
4482 * oasys.c (oasys_get_section_contents): Use oasys_per_section macro.
4483
4484 2003-01-31 Graydon Hoare <graydon@redhat.com>
4485
4486 * Makefile.am (opncls.lo): Add dependency upon libiberty.h.
4487 * Makefile.in: Regenerate.
4488 * opncls.c (calc_crc32, get_debug_link_info,
4489 seperate_debug_file_exists, find_seperate_debug_file): New
4490 internal functions.
4491 (bfd_follow_gnu_debuglink): New function. Follow the pointer
4492 contained inside a .gnu_debuglink section.
4493 * bfd-in2.h: Regenerate.
4494
4495 2003-01-29 Alexandre Oliva <aoliva@redhat.com>
4496
4497 * elfxx-mips.c (mips_elf_got_entry_hash): Don't dereference
4498 entry->abfd when it's NULL.
4499
4500 2003-01-27 Alexandre Oliva <aoliva@redhat.com>
4501
4502 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Handle
4503 _bfd_elf_section_offset returning -2 the same way as -1.
4504
4505 * elfxx-mips.c (mips_elf_multi_got): New function.
4506 (struct mips_got_entry): Make symndx and gotidx signed. Moved
4507 addend into union along with address and link hash entry.
4508 (struct mips_got_info): Added bfd2got and next.
4509 (struct mips_elf_hash_sort_data): Added max_unref_got_dynindx.
4510 (mips_elf_got_section, mips_elf_create_got_section): Use
4511 SEC_EXCLUDE bit to tell whether we really need the got
4512 section. Take boolean arguments to disregard an excluded
4513 section, or to create it as excluded. Adjust all callers.
4514 Use mips_elf_got_section all over.
4515 (mips_elf_local_got_index, mips_elf_got_page,
4516 mips_elf_got16_entry): Take input bfd as argument, and pass it
4517 on to mips_elf_create_local_got_entry.
4518 (mips_elf_global_got_index, mips_elf_create_local_got_entry):
4519 Take input bfd as argument, and manage entries in the
4520 appropriate GOT.
4521 (mips_elf_got_offset_from_index): Take input bfd as argument,
4522 and use it to adjust the GP offset of the bfd.
4523 (mips_elf_sort_hash_table, mips_elf_sort_hash_table_f): Move
4524 unreferenced GOT entries of global symbols to the end.
4525 (mips_elf_record_global_got_symbol): Take input bfd as
4526 argument. Add entries to the master GOT hash table.
4527 (struct mips_elf_bfd2got_hash): New.
4528 (struct mips_elf_got_per_bfd_arg): New.
4529 (struct mips_elf_set_global_got_offset_arg): New.
4530 (mips_elf_hash_bfd_vma, mips_elf_multi_got_entry_hash,
4531 mips_elf_multi_got_entry_eq, mips_elf_bfd2got_entry_hash,
4532 mips_elf_bfd2got_entry_eq, mips_elf_make_got_per_bfd,
4533 mips_elf_merge_gots, mips_elf_set_global_got_offset,
4534 mips_elf_resolve_final_got_entry,
4535 mips_elf_resolve_final_got_entries, mips_elf_adjust_gp,
4536 mips_elf_got_for_ibfd): New functions.
4537 (ELF_MIPS_GP_OFFSET): Don't depend on SGI_COMPAT.
4538 (MIPS_ELF_GOT_MAX_SIZE): New macro.
4539 (STUB_LW): Generate 64-bit stub regardless of SGI_COMPAT.
4540 (mips_elf_got_entry_hash): Take new fields into account. Use
4541 mips_elf_hash_bfd_vma.
4542 (mips_elf_got_entry_eq): Take new fields into account.
4543 (mips_elf_create_got_section): Initialize new fields.
4544 (mips_elf_calculate_relocation): Pass input_bfd to functions
4545 that now take it. Adjust gp for the input_bfd.
4546 (mips_elf_allocate_dynamic_relocation,
4547 mips_elf_create_dynamic_relocation,
4548 _bfd_mips_elf_create_dynamic_sections): Use...
4549 (mips_elf_rel_dyn_section): New function. Borrow code from...
4550 (_bfd_mips_elf_check_relocs): Pass input_bfd to functions that
4551 now take it. Create the got section if needed, even if
4552 excluded, before recording a global got symbol. Move some
4553 code to...
4554 (mips_elf_record_local_got_symbol): New fn.
4555 (_bfd_mips_elf_size_dynamic_sections): Disable combreloc.
4556 Compute multi-got global entries offsets. Move GOT code to...
4557 (_bfd_mips_elf_always_size_sections): Call mips_elf_multi_got
4558 if the GOT is too big.
4559 (_bfd_mips_elf_finish_dynamic_symbol): Set got entry of
4560 undefweak symbol to zero. Generate dynamic relocations for
4561 non-primary GOT entries for global symbols.
4562 (_bfd_mips_elf_finish_dynamic_sections): Handle multi-got
4563 case. Generate dynamic relocations for local got entries.
4564 Sort dynamic relocations on N64 too, using...
4565 (sort_dynamic_relocs_64): New fns.
4566 (_bfd_mips_elf_hide_symbol): Adjust multi-got counters.
4567 (_bfd_mips_elf_merge_private_bfd_data): Ignore EF_MIPS_XGOT.
4568
4569 2003-01-27 Alexandre Oliva <aoliva@redhat.com>
4570
4571 * bfd.c (struct _bfd): Added id field.
4572 * opncls.c (_bfd_id_counter): New static variable.
4573 (_bfd_new_bfd): Use it.
4574 * bfd-in2.h: Rebuilt.
4575
4576 2003-01-25 Alan Modra <amodra@bigpond.net.au>
4577
4578 * elf32-sparc.c (bfd_elf32_new_section_hook): Define.
4579
4580 2003-01-25 Jakub Jelinek <jakub@redhat.com>
4581
4582 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Add TLS relocs.
4583 (elf32_sparc_rev32_howto): New variable.
4584 (sparc_reloc_map): Add TLS relocs.
4585 (elf32_sparc_reloc_type_lookup, elf32_sparc_info_to_howto):
4586 Handle REV32.
4587 (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc, elf32_sparc_mkobject):
4588 New functions.
4589 (struct elf32_sparc_dyn_relocs, struct elf32_sparc_link_hash_entry,
4590 struct elf32_sparc_link_hash_table):
4591 New structures.
4592 (elf32_sparc_tdata, elf32_sparc_local_got_tls_type,
4593 elf32_sparc_hash_table): Define.
4594 (link_hash_newfunc, elf32_sparc_link_hash_table_create,
4595 create_got_section, elf32_sparc_create_dynamic_sections,
4596 elf32_sparc_copy_indirect_symbol, elf32_sparc_tls_transition): New
4597 functions.
4598 (elf32_sparc_check_relocs): Handle TLS relocs. Add dynamic reloc
4599 reference counting.
4600 (elf32_sparc_gc_sweep_hook): Likewise.
4601 (elf32_sparc_adjust_dynamic_symbol): Likewise.
4602 (elf32_sparc_size_dynamic_sections): Likewise.
4603 (elf32_sparc_relocate_section): Likewise.
4604 (allocate_dynrelocs, readonly_dynrelocs, dtpoff_base, tpoff):
4605 New functions.
4606 (elf32_sparc_object_p): Allocate backend private object data.
4607 (bfd_elf32_bfd_link_hash_table_create,
4608 elf_backend_copy_indirect_symbol, bfd_elf32_mkobject,
4609 elf_backend_can_refcount): Define.
4610 (elf_backend_create_dynamic_sections): Define to
4611 elf32_sparc_create_dynamic_sections.
4612 * reloc.c: Add SPARC TLS relocs.
4613 * bfd-in2.h, libbfd.h: Rebuilt.
4614 * elf64-sparc.c (sparc64_elf_howto_table): Add TLS relocs.
4615 (sparc_reloc_map): Likewise.
4616
4617 2003-01-24 Martin Schwidefsky <schwidefsky@de.ibm.com>
4618
4619 * bfd-in2.h: Regenerate.
4620 * elf32-s390.c (elf_s390_mkobject, elf_s390_tls_transition,
4621 s390_tls_reloc, dtpoff_base, tpoff, invalid_tls_insn): New functions.
4622 (elf_howto_table): Add TLS relocs.
4623 (elf_s390_reloc_type_lookup): Likewise.
4624 (elf_s390_link_hash_entry): Add tls_type.
4625 (elf_s390_hash_entry, elf_s390_obj_tdata, elf_s390_local_got_tls_type):
4626 New macros.
4627 (elf_s390_link_hash_table): Add tls_ldm_got.
4628 (link_hash_newfunc): Initialize tls_type.
4629 (elf_s390_link_hash_table_create): Initialize refcount of tls_ldm_got.
4630 (elf_s390_copy_indirect_symbol): Copy tls_type information.
4631 (elf_s390_check_relocs): Support TLS relocs.
4632 (elf_s390_gc_sweep_hook): Likewise.
4633 (allocate_dynrelocs): Likewise.
4634 (elf_s390_size_dynamic_sections): Likewise.
4635 (elf_s390_relocate_section): Likewise.
4636 (elf_s390_finish_dynamic_symbol): Likewise.
4637 (bfd_elf32_mkobject): Define for TLS.
4638 * elf64-s390.c: Same changes as for elf32-s390.c.
4639 * libbfd.h: Regenerate.
4640 * reloc.c: Add s390 TLS relocations.
4641
4642 2003-01-24 Charles Lepple <clepple@ghz.cc>
4643
4644 * aclocal.m4: Fix name of --enable-install-libbfd switch.
4645
4646 2003-01-23 Nick Clifton <nickc@redhat.com>
4647
4648 * Add sh2e support:
4649 2002-04-02 Elena Zannoni <ezannoni@redhat.com>
4650 * archures.c (bfd_mach_sh2e): Added.
4651 * bfd-in2.h: Rebuilt.
4652 * cpu-sh.c (arch_info_struct): Added SH2e.
4653 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle EF_SH2E.
4654
4655 2003-01-23 Alan Modra <amodra@bigpond.net.au>
4656
4657 * elf-bfd.h (struct bfd_elf_section_data): Remove tdata. Change
4658 dynindx to an int. Rearrange for better packing.
4659 * elf.c (_bfd_elf_new_section_hook): Don't alloc if already done.
4660 * elf32-mips.c (bfd_elf32_new_section_hook): Define.
4661 * elf32-sh64.h: New. Split out from include/elf/sh.h.
4662 (struct _sh64_elf_section_data): New struct.
4663 (sh64_elf_section_data): Don't dereference sh64_info (was tdata).
4664 * elf32-sh64-com.c: Include elf32-sh64.h.
4665 * elf32-sh64.c: Likewise.
4666 (sh64_elf_new_section_hook): New function.
4667 (bfd_elf32_new_section_hook): Define.
4668 (sh64_elf_fake_sections): Adjust for sh64_elf_section_data change.
4669 (sh64_bfd_elf_copy_private_section_data): Likewise.
4670 (sh64_elf_final_write_processing): Likewise.
4671 * elf32-sparc.c (struct elf32_sparc_section_data): New.
4672 (elf32_sparc_new_section_hook): New function.
4673 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
4674 (sec_do_relax): Define.
4675 (elf32_sparc_relax_section): Adjust to use sec_do_relax.
4676 (elf32_sparc_relocate_section): Likewise.
4677 * elf64-mips.c (bfd_elf64_new_section_hook): Define.
4678 * elf64-mmix.c (struct _mmix_elf_section_data): New.
4679 (mmix_elf_section_data): Define. Use throughout file.
4680 (mmix_elf_new_section_hook): New function.
4681 (bfd_elf64_new_section_hook): Define.
4682 * elf64-ppc.c (struct _ppc64_elf_section_data): New.
4683 (ppc64_elf_section_data): Define. Use throughout.
4684 (ppc64_elf_new_section_hook): New function.
4685 (bfd_elf64_new_section_hook): Define.
4686 * elf64-sparc.c (struct sparc64_elf_section_data): New.
4687 (sparc64_elf_new_section_hook): New function.
4688 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
4689 (sec_do_relax): Define.
4690 (sparc64_elf_relax_section): Adjust to use sec_do_relax.
4691 (sparc64_elf_relocate_section): Likewise.
4692 (bfd_elf64_new_section_hook): Define.
4693 * elfn32-mips.c (bfd_elf32_new_section_hook): Define.
4694 * elfxx-mips.c (struct _mips_elf_section_data): New.
4695 (mips_elf_section_data): Define. Use throughout.
4696 (_bfd_mips_elf_new_section_hook): New function.
4697 (mips_elf_create_got_section): Don't alloc used_by_bfd.
4698 * elfxx-mips.h (_bfd_mips_elf_new_section_hook): Declare.
4699 * elfxx-target.h (bfd_elfNN_new_section_hook): Add #ifndef.
4700 * Makefile.am: Run "make dep-am".
4701 * Makefile.in: Regenerate.
4702
4703 2003-01-21 Richard Henderson <rth@redhat.com>
4704
4705 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_PLT_LOC): New.
4706 (struct alpha_elf_link_hash_entry): Add plt_old_section, plt_old_value.
4707 (elf64_alpha_adjust_dynamic_symbol): Set them.
4708 (elf64_alpha_size_plt_section_1): Reset them when plt entry removed.
4709 (elf64_alpha_relax_tls_get_addr): Handle LDM relocs. Frob the
4710 symbol index when relaxing LDM to TPREL.
4711 (elf64_alpha_relax_section): Likewise. Allow relaxation of GD
4712 relocs, even if the target isn't locally defined.
4713 (elf64_alpha_check_relocs): Frob LDM reloc symndx to zero.
4714 (elf64_alpha_relocate_section): Likewise. Force TP-relative
4715 relocs vs symndx 0 to the tp base.
4716
4717 2003-01-21 Fabio Alemagna <falemagn@aros.org>
4718
4719 * config.bfd: Handle i[3456]86-*-aros*.
4720
4721 2003-01-21 Andreas Schwab <schwab@suse.de>
4722
4723 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Define.
4724 (struct ppc_elf_link_hash_entry): Define.
4725 (ppc_elf_hash_entry): New function.
4726 (struct ppc_elf_link_hash_table): Define.
4727 (ppc_elf_hash_table): New function.
4728 (ppc_elf_link_hash_newfunc): New function.
4729 (ppc_elf_link_hash_table_create): New function.
4730 (ppc_elf_copy_indirect_symbol): New function.
4731 (allocate_dynrelocs): New function.
4732 (readonly_dynrelocs): New function.
4733 (ppc_elf_size_dynamic_sections): Allocate space for dynamic
4734 relocs and determine DT_TEXTREL.
4735 (ppc_elf_check_relocs): Don't do that here, just count the
4736 dynamic relocs.
4737 (ppc_elf_gc_sweep_hook): Discard any dynamic relocs against the
4738 removed section.
4739 (bfd_elf32_bfd_link_hash_table_create): Define.
4740 (elf_backend_copy_indirect_symbol): Define.
4741
4742 2003-01-21 Richard Henderson <rth@redhat.com>
4743
4744 * elf64-alpha.c (alpha_dynamic_entries_for_reloc): GOTTPREL and
4745 TPREL also get a reloc if shared. Remove SREL support.
4746 (elf64_alpha_emit_dynrel): New.
4747 (elf64_alpha_relocate_section): Use it. Resolve dynamic TPREL
4748 and GOTTPREL relocs to local symbols against the tp base.
4749 (elf64_alpha_finish_dynamic_symbol): Use elf64_alpha_emit_dynrel.
4750
4751 * elf64-alpha.c (elf64_alpha_relax_got_load): Decrement got
4752 use count before clobbering r_type.
4753 (elf64_alpha_relax_tls_get_addr): Don't use pos[1] if insn
4754 ordering would mean dataflow inspection is necessary.
4755
4756 2003-01-20 Svein E. Seldal <Svein.Seldal@solidas.com>
4757
4758 * coffcode.h (coff_set_flags): Added get/set arch hooks.
4759
4760 2003-01-20 Fabio Alemagna <falemagn@aros.org>
4761
4762 * elf32-sh.c: Treat elfNN_bed like other macros defined in
4763 elfxx-target.h and #undef it before #define'ing it.
4764 * elf32-i386.c: Likewise.
4765 * elf32-sh64.c: Likewise.
4766 * elf64-alpha.c: Likewise.
4767 * elf64-sh64.c: Likewise.
4768
4769 2003-01-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
4770
4771 * bfd-in2.h: Regenerate.
4772 * elf32-s390.c (elf_s390_adjust_gotplt): New prototype.
4773 (elf_howto_table): Rename R_390_GOTOFF to R_390_GOTOFF32. Add
4774 R_390_GOTOFF16, R_390_GOTOFF64, R_390_GOTPLT12, R_390_GOTPLT16,
4775 R_390_GOTPLT32, R_390_GOTPLT64, R_390_GOTPLTENT, R_390_PLTOFF16,
4776 R_390_PLTOFF32 and R_390_PLTOFF64.
4777 (elf_s390_reloc_type_lookup): Likewise.
4778 (struct elf_s390_link_hash_entry): Add gotplt_refcount to keep track
4779 of GOTPLT references to a function.
4780 (link_hash_newfunc): Initialize gotplt_refcount.
4781 (elf_s390_check_relocs): Move allocation of local_got_refcounts array
4782 and creation of the got section out of the main switch. Add support
4783 for the gotoff, gotplt and pltoff relocations.
4784 (elf_s390_gc_sweep_hook): Add reference counting for gotoff, gotplt
4785 and pltoff.
4786 (elf_s390_adjust_gotplt): New function.
4787 (elf_s390_adjust_dynamic_symbol): Adjust gotplt refcount for removed
4788 plt entries.
4789 (allocate_dynrelocs): Add comment.
4790 (elf_s390_relocate_section): Change r_type to unsigned. Add support
4791 for gotoff, gotplt and pltoff relocations.
4792 * elf64-s390.c: Same changes as for elf32-s390.c.
4793 * libbfd.h: Regenerate.
4794 * reloc.c: Add BFD_RELOC_390_GOTOFF64, BFD_RELOC_390_GOTPLT12,
4795 BFD_RELOC_390_GOTPLT16, BFD_RELOC_390_GOTPLT32, BFD_RELOC_390_GOTPLT64,
4796 BFD_RELOC_390_GOTPLTENT, BFD_RELOC_390_PLTOFF16, BFD_RELOC_390_PLTOFF32
4797 and BFD_RELOC_390_PLTOFF64.
4798
4799 2003-01-18 Jakub Jelinek <jakub@redhat.com>
4800
4801 * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle
4802 R_IA64_TPREL64[LM]SB against non-global symbol properly.
4803
4804 2003-01-16 Jakub Jelinek <jakub@redhat.com>
4805
4806 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add
4807 self_dtpmod_done and self_dtpmod_offset.
4808 (allocate_global_data_got): Only use one got entry for all
4809 dtpmod relocs against local symbols.
4810 (allocate_dynrel_entries): Only need .rela.got entry for
4811 dtpmod against global symbol.
4812 (elfNN_ia64_size_dynamic_sections): Initialize self_dtpmod_offset.
4813 Reserve space in .rela.got for the local dtpmod entry.
4814 (set_got_entry): Initialize the common local dtpmod .got entry.
4815 (elfNN_ia64_relocate_section): Handle R_IA_64_DTPREL64LSB
4816 and R_IA_64_DTPREL64MSB.
4817
4818 2003-01-16 Alan Modra <amodra@bigpond.net.au>
4819
4820 * elf64-ppc.c: Include elf/ppc64.h rather than elf/ppc.h.
4821 (R_PPC_*): Rename all occurrences to R_PPC64_*.
4822 (R_PPC64_ADDR30): Rename all occurrences to R_PPC64_REL30.
4823 (enum elf_ppc_reloc_type): Ditto to enum elf_ppc64_reloc_type.
4824 (ppc64_elf_gc_sweep_hook): Handle R_PPC64_REL30 along with other
4825 relative relocs, not with absolute ones.
4826 * Makefile.am: Run "make dep-am".
4827 * Makefile.in: Regenerate.
4828 * po/SRC-POTFILES.in: Regenerate.
4829
4830 2003-01-15 Andreas Schwab <schwab@suse.de>
4831
4832 * elf32-ppc.c (ppc_elf_check_relocs): Don't set DF_TEXTREL for a
4833 relocation against a non-allocated readonly section.
4834
4835 2003-01-10 Alan Modra <amodra@bigpond.net.au>
4836
4837 * elf32-ppc.c (ppc_elf_relocate_section): Adjust addend for GOT16_HA.
4838 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. PLTGOT16_HA too.
4839
4840 2002-01-08 Klee Dienes <kdienes@apple.com>
4841
4842 * Makefile.am (ALL_MACHINES): Use cpu-msp430.lo, not cpu-msp430.c.
4843 (BFD32_BACKENDS): Use elf32-msp430.lo, not elf32-msp430.c.
4844 * Makefile.in: Regenerate.
4845
4846 2003-01-08 Alexandre Oliva <aoliva@redhat.com>
4847
4848 * elfn32-mips.c (prev_reloc_section): New.
4849 (GET_RELOC_ADDEND): Use it. Parenthesize macro arguments.
4850 (SET_RELOC_ADDEND): Parenthesize macro argument.
4851
4852 2003-01-07 John David Anglin <dave.anglin@nrc.gc.ca>
4853
4854 * elf32-hppa.c (final_link_relocate): For all DP relative relocations,
4855 adjust addil instructions if the symbol has no section.
4856
4857 2003-01-07 DJ Delorie <dj@redhat.com>
4858
4859 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make REL_12 not
4860 partial_inplace.
4861
4862 2003-01-07 Andreas Schwab <schwab@suse.de>
4863
4864 * elf32-m68k.c (elf_m68k_check_relocs): Don't set DF_TEXTREL for
4865 PC relative relocations.
4866 (elf_m68k_discard_copies): Set it here instead.
4867
4868 2002-01-02 Ben Elliston <bje@redhat.com>
4869 Jeff Johnston <jjohnstn@redhat.com>
4870
4871 * Makefile.am (ALL_MACHINES): Add cpu-iq2000.lo.
4872 (ALL_MACHINES_CFILES): Add cpu-iq2000.c.
4873 (BFD32_BACKENDS): Add elf32-iq2000.lo.
4874 (BFD32_BACKENDS_CFILES): Add elf32-iq2000.c.
4875 (cpu-iq2000.lo): New target.
4876 * Makefile.in: Regenerate.
4877 * config.bfd: Handle iq2000-*-elf.
4878 * archures.c (bfd_architecture): Add bfd_{arch,mach}_iq2000.
4879 (bfd_archures_list): Add bfd_iq2000_arch.
4880 * configure.in: Handle bfd_elf32_iq2000_vec.
4881 * configure: Regenerate.
4882 * reloc.c: Add BFD_RELOC_IQ2000_OFFSET_16, BFD_RELOC_IQ2000_OFFSET_21,
4883 and BFD_RELOC_IQ2000_UHI16.
4884 * targets.c (bfd_elf32_iq2000_vec): Declare.
4885 (bfd_target_vector): Add bfd_elf32_iq2000_vec.
4886 * elf.c (prep_headers): Set e_machine to EM_IQ2000.
4887 * cpu-iq2000.c: New file.
4888 * elf32-iq2000.c: Likewise.
4889 * libbfd.h: Regenerate.
4890 * bfd-in2.h: Likewise.
4891
4892 2003-01-02 Richard Sandiford <rsandifo@redhat.com>
4893
4894 * elfxx-mips.c: Include libiberty.h.
4895 (elf_mips_isa, _bfd_mips_elf_mach_extends_p): Remove.
4896 (mips_set_isa_flags): New function, split out from...
4897 (_bfd_mips_elf_final_write_processing): ...here. Only call
4898 mips_set_isa_flags if the EF_MIPS_MACH bits are clear.
4899 (mips_mach_extensions): New array.
4900 (mips_32bit_flags_p): New function.
4901 (_bfd_mips_elf_merge_private_bfd_data): Rework architecture checks.
4902 Use mips_32bit_flags_p to check if one binary is 32-bit and the
4903 other is 64-bit. When adopting IBFD's architecture, adopt the
4904 bfd_mach as well as the flags.
4905
4906 2003-01-02 Nick Kelsey <nickk@ubicom.com>
4907
4908 * elf32-ip2k.c: Re-work of linker relaxation code for the ip2k to
4909 fix internal errors, fix bad code generation, fix incorrect stabs
4910 information, and improve ability to eliminate redundant page
4911 instructions. Added code to ip2k_final_link_relocate to self-verify
4912 the linker relaxation. Fix formatting problems.
4913
4914 2002-12-30 Chris Demetriou <cgd@broadcom.com>
4915
4916 * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mipsisa32r2 case.
4917 * archures.c (bfd_mach_mipsisa32r2): New define.
4918 * bfd-in2.h: Regenerate.
4919 * cpu-mips.c (I_mipsisa32r2): New enum value.
4920 (arch_info_struct): Add entry for I_mipsisa32r2.
4921 * elfxx-mips.c (elf_mips_isa, _bfd_elf_mips_mach)
4922 (_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_32R2.
4923 (_bfd_mips_elf_final_write_processing): Add
4924 bfd_mach_mipsisa32r2 case.
4925 (_bfd_mips_elf_merge_private_bfd_data): Handle merging of
4926 binaries marked as using MIPS32 Release 2.
4927
4928 2002-12-30 Dmitry Diky <diwil@mail.ru>
4929
4930 * Makefile.am: Add msp430 target.
4931 * configure.in: Likewise.
4932 * Makefile.in: Regenerate.
4933 * configure: Regenerate.
4934 * archures.c: Add msp430 architecture vector.
4935 * config.bfd: Likewise.
4936 * reloc.c: Add msp430 relocs.
4937 * targets.c: Add msp320 target.
4938 * cpu-msp430.c: New file: msp430 cpu detection.
4939 * elf32-msp430.c: New file: msp430 reloc processing.
4940 * bfd-in2.h: Regenerate.
4941 * libbfd.h: Regenerate.
4942
4943 2002-12-28 Jakub Jelinek <jakub@redhat.com>
4944
4945 * elf.c (elf_sort_sections): Don't reorder .tbss.
4946 (assign_file_positions_for_segments): Only adjust off/voff
4947 for increased alignment in PT_LOAD or PT_NOTE segment,
4948 but adjust p_filesz for .tbss too. in PT_LOAD consider
4949 .tbss to have zero memory size.
4950 (copy_private_bfd_data) [SECTION_SIZE]: Define.
4951 [IS_CONTAINED_BY_VMA, IS_CONTAINED_BY_LMA]: Use it.
4952 [INCLUDE_SECTION_IN_SEGMENT]: Only put SHF_TLS sections
4953 into PT_TLS segment. Never put SHF_TLS sections in
4954 segments other than PT_TLS or PT_LOAD.
4955
4956 * elf64-alpha.c (elf64_alpha_finish_dynamic_sections): Clear .plt
4957 sh_entsize.
4958
4959 2002-12-23 DJ Delorie <dj@redhat.com>
4960
4961 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Fix logic reversal.
4962
4963 2002-12-23 Alan Modra <amodra@bigpond.net.au>
4964
4965 * elflink.h (elf_link_output_extsym): Heed strip_discarded.
4966
4967 2002-12-23 Nick Clifton <nickc@redhat.com>
4968
4969 * archures.c (bfd_arch_get_compatible): Add third parameter
4970 'accept_unknowns'. Only accept unknown format BFDs if
4971 accept_unknowns is true, or if the format is "binary".
4972 * bfd-in2.h: Regenerate.
4973
4974 2002-12-21 Nick Clifton <nickc@redhat.com>
4975
4976 * coff-arm.c (coff_arm_relocate_section): Disable WINCE workaround
4977 that subtracted 8 from pc relative relocations.
4978
4979 2002-12-20 Kazu Hirata <kazu@cs.umass.edu>
4980
4981 * coff-h8300.c: Fix comment typos.
4982 * coffcode.h: Likewise.
4983 * cpu-cris.c: Likewise.
4984 * elf32-vax.c: Likewise.
4985 * genlink.h: Likewise.
4986 * linker.c: Likewise.
4987 * som.c: Likewise.
4988 * tekhex.c: Likewise.
4989 * vms-misc.c: Likewise.
4990
4991 2002-12-20 DJ Delorie <dj@redhat.com>
4992
4993 * reloc.c: Add BFD_RELOC_XSTORMY16_12.
4994 * libbfd.h: Regenerate.
4995 * bfd-in2.h: Regenerate.
4996 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_12.
4997 (xstormy16_reloc_map): Add R_XSTORMY16_12.
4998
4999 2002-12-19 Kazu Hirata <kazu@cs.umass.edu>
5000
5001 * doc/bfdint.texi: Fix typos.
5002
5003 2002-12-20 Paul Eggert <eggert@twinsun.com>
5004
5005 Port to POSIX 1003.1-2001.
5006 * acinclude.m4 (AM_INSTALL_LIBBFD): Do not rely on "test -o".
5007 * configure.in (build-warnings): Likewise.
5008 (Horrible hacks to build DLLs on Windows): Do not rely on "tail -1".
5009 * aclocal.m4: Regenerate.
5010 * config.in: Regenerate.
5011 * configure: Regenerate.
5012
5013 2002-12-19 Alan Modra <amodra@bigpond.net.au>
5014
5015 * coff-h8300.c: Include libiberty.h.
5016 (h8300_reloc16_extra_cases): Check the hash table creator before
5017 referencing h8300 specific fields. Stash the hash table pointer
5018 in a local var. Comment typo fixes.
5019 (h8300_bfd_link_add_symbols): Likewise.
5020
5021 * reloc.c (struct reloc_howto_struct): Revise src_mask and
5022 dst_mask comments.
5023 * bfd-in2.h: Regenerate.
5024
5025 2002-12-18 Alan Modra <amodra@bigpond.net.au>
5026
5027 * elf32-ppc.c (ppc_elf_relocate_section): Reorganize dynamic reloc
5028 code a little. Comment on dynamic relocs against section symbols.
5029
5030 2002-12-17 Roger Sayle <roger@eyesopen.com>
5031
5032 * configure.host (ia64-*-hpux*): Support 64 bit targets using
5033 the HP compiler's "long long".
5034
5035 2002-12-16 Andrew MacLeod <amacleod@redhat.com>
5036
5037 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_LO16
5038 and R_XSTORMY16_HI16) howto entries.
5039 (xstormy16_reloc_map): Map R_XSTORMY16_{LO,HI}16 to BFD_RELOC_{LO,HI}16.
5040 (xstormy16_info_to_howto_rela): Use R_XSTORMY16_GNU_VTINHERIT to
5041 determine the start of the second reloc table.
5042
5043 2002-12-16 Nathan Tallent <eraxxon@alumni.rice.edu>
5044
5045 * ecofflink.c: Fix the reading of the debugging information
5046 of Tru64/Alpha binaries that are produced by recent Compaq
5047 compilers.
5048 (mk_fdrtab): Fix error in creating the FDR (file descriptor)
5049 table.
5050 (lookup_line): Because of the strange information sometimes
5051 generated by Compaq's recent compilers, change how the FDR
5052 table is searched so that PDRs (procedure descriptors) are
5053 correctly found. Note that this change is really more of a hack;
5054 however, I have included extensive documentation as to why
5055 this is the best solution short of an extensive rewrite or
5056 another hack.
5057 (fdrtab_lookup): Add comments to explain the algorithm.
5058
5059 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
5060
5061 * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Reorder
5062 initializers to match struct declaration.
5063
5064 2002-12-12 Alan Modra <amodra@bigpond.net.au>
5065
5066 * dwarf2.c (comp_unit_contains_address): Comment typo fix.
5067 * elf.c (get_program_header_size): Likewise.
5068 * elf32-m32r.c (m32r_elf_lo16_reloc): Likewise.
5069 (m32r_elf_generic_reloc): Likewise.
5070 * elf32-ppc.c (ppc_elf_howto_init): Likewise.
5071 * elflink.h (elf_bfd_discard_info): Likewise.
5072
5073 2002-12-12 Alan Modra <amodra@bigpond.net.au>
5074
5075 * elf32-i386.c (elf_i386_finish_dynamic_sections): Add output_offset
5076 to DT_JMPREL. Use srelplt input section size for DT_PLTRELSZ and
5077 DT_RELSZ adjustment, not output section. Avoid writing tags when
5078 unchanged. Don't assume linker script is sane, adjust DT_REL too.
5079 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Just use raw
5080 size of srelplt for DT_PLTRELSZ. Use srelplt input section size for
5081 DT_RELASZ adjustment, not output section. Avoid writing tags when
5082 unchanged. Adjust DT_RELA.
5083 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Tweaks for better
5084 formatting. Avoid writing tags when unchanged. Adjust DT_RELA.
5085
5086 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
5087
5088 * elfxx-mips.c (mips_elf_calculate_relocation): Don't divide
5089 addend by 4.
5090
5091 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
5092
5093 * elfxx-mips.c (struct mips_got_entry): New.
5094 (struct mips_got_info): Added got_entries field.
5095 (mips_elf_got_entry_hash, mips_elf_got_entry_eq): New functions.
5096 (mips_elf_local_got_index, mips_elf_got_page,
5097 mips_elf_got16_entry): Re-implement in terms of new...
5098 (mips_elf_create_local_got_entry): Rewrite to use got_entries.
5099 Change return type.
5100 (mips_elf_highest): Warning clean-up.
5101 (mips_elf_create_got_section): Initialize got_entries.
5102 (_bfd_mips_elf_check_relocs): Use got_entries to estimate
5103 local got size.
5104 (_bfd_mips_elf_size_dynamic_sections): Do not account for
5105 GOT_PAGE entries, since we now reuse GOT16 entries.
5106
5107 2002-12-10 Jason Thorpe <thorpej@wasabisystems.com>
5108
5109 * aoutx.h (set_section_contents): Allow an otherwise unrepresentable
5110 read-only section that lies after .text and before .data to be
5111 written into the output file and included in a_text.
5112 (translate_to_native_sym_flags): If an otherwise unrepresentable
5113 section was merged with .text, convert its symbols to N_TEXT
5114 symbols.
5115 * libaout.h (aout_section_merge_with_text_p): New macro.
5116
5117 2002-12-08 Alan Modra <amodra@bigpond.net.au>
5118
5119 * bfd-in.h: Comment typo fix. Formatting.
5120 * bfd-in2.h: Regenerate.
5121 * coff64-rs6000.c (xcoff64_openr_next_archived_file): Warning fix.
5122 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): Prototype.
5123 * elf64-mmix.c (mmix_dump_bpo_gregs): Warning fix.
5124
5125 2002-12-05 Richard Henderson <rth@redhat.com>
5126
5127 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21BI.
5128 Only send PCREL21B though the plt. Fix installed reloc type.
5129 (elfNN_ia64_relocate_section): Give error for dynamic reloc
5130 against PCREL22 or PCREL64I; clean up error messages for
5131 branch relocs.
5132
5133 2002-12-04 Kevin Buettner <kevinb@redhat.com>
5134
5135 * elf64-mips.c (elf64_mips_grok_prstatus, elf64_mips_grok_psinfo):
5136 New functions.
5137 (elf_backend_grok_prstatus, elf_backend_grok_psinfo): Define.
5138
5139 2002-12-04 David Mosberger <davidm@hpl.hp.com>
5140
5141 * cpu-ia64-opc.c: Add operand constant "ar.csd".
5142
5143 2002-12-04 H.J. Lu <hjl@gnu.org>
5144
5145 * elfxx-ia64.c (get_local_sym_hash): Use section ID instead of
5146 BFD address when constructing local name.
5147
5148 2002-12-04 Andreas Schwab <schwab@suse.de>
5149
5150 * elf32-m68k.c (struct elf_m68k_link_hash_table): Add sym_sec
5151 member.
5152 (elf_m68k_link_hash_table_create): Initialize it.
5153 (elf_m68k_check_relocs): Handle symbols that are forced to be
5154 local due to visibility changes.
5155 (elf_m68k_adjust_dynamic_symbol): Likewise.
5156 (elf_m68k_size_dynamic_sections): Likewise.
5157 (elf_m68k_discard_copies): Likewise.
5158 (elf_m68k_relocate_section): Likewise.
5159
5160 2002-12-04 Alan Modra <amodra@bigpond.net.au>
5161
5162 * elf64-ppc.c (ppc64_elf_edit_opd): Correct typo.
5163
5164 2002-12-04 Alan Modra <amodra@bigpond.net.au>
5165
5166 * srec.c (srec_write_symbols): Restore '$' prefix to address
5167 accidentally removed in 2002-04-04 change.
5168 (srec_get_symtab): Use 0 instead of `(long) FALSE'.
5169
5170 2002-12-03 Nick Clifton <nickc@redhat.com>
5171
5172 * elf32-ppc.c (apuinfo_list_init): New function.
5173 (apuinfo_list_add): New function: Add a value to the list.
5174 (apuinfo_list_length): New function: Return the number of
5175 values on the list.
5176 (apuinfo_list_element): New function: Return a value on the
5177 list.
5178 (apuinfo_list_finish): New function: Free the resources used
5179 by the list.
5180 (ppc_elf_begin_write_processing): New function. Scan the
5181 input bfds for apuinfo sections.
5182 (ppc_elf_write_section): New function: Delay the creation of
5183 the contents of an apuinfo section in an output bfd.
5184 (ppc_elf_final_write_processing): New function. Create the
5185 contents of an apuinfo section in an output bfd.
5186 (elf_backend_begin_write_processing): Define.
5187 (elf_backend_final_write_processing): Define.
5188 (elf_backend_write_section): Define.
5189
5190 2002-12-03 Richard Henderson <rth@redhat.com>
5191
5192 * cpu-ia64-opc.c (elf64_ia64_operands): Add ldxmov entry.
5193
5194 2002-12-01 Stephane Carrez <stcarrez@nerim.fr>
5195
5196 Fix PR savannah/1417:
5197 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Don't adjust
5198 branch if it goes to the start of the deleted region.
5199
5200 2002-12-01 Stephane Carrez <stcarrez@nerim.fr>
5201
5202 * bfd-in2.h (bfd_mach_m6812): Rebuild.
5203 * archures.c (bfd_mach_m6812_default, bfd_mach_m6812,
5204 bfd_mach_m6812s): Declare.
5205
5206 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): New function.
5207 (_bfd_m68hc12_elf_set_private_flags): Call it.
5208 (_bfd_m68hc12_elf_print_private_bfd_data): Report processor version.
5209 (_bfd_m68hc12_elf_merge_private_bfd_data): Merge the flags and
5210 report microcontroller incompatibilities (HC12 vs HCS12).
5211 (elf_backend_object_p): Update.
5212
5213 2002-11-30 Alan Modra <amodra@bigpond.net.au>
5214
5215 * bfd-in.h (TRUE_FALSE_ALREADY_DEFINED, BFD_TRUE_FALSE): Delete.
5216 (enum bfd_boolean, boolean): Delete.
5217 (bfd_boolean): Typedef to an int.
5218 (FALSE, TRUE): Define.
5219 * aix386-core.c, aix5ppc-core.c, aout-adobe.c, aout-arm.c, aout-cris.c,
5220 aout-encap.c, aout-ns32k.c, aout-target.h, aout-tic30.c, aoutf1.h,
5221 aoutx.h, archive.c, archive64.c, archures.c, bfd-in.h, bfd.c, bfdwin.c,
5222 binary.c, bout.c, cache.c, cisco-core.c, coff-a29k.c, coff-alpha.c,
5223 coff-apollo.c, coff-arm.c, coff-aux.c, coff-h8300.c, coff-h8500.c,
5224 coff-i386.c, coff-i860.c, coff-i960.c, coff-ia64.c, coff-m68k.c,
5225 coff-m88k.c, coff-mcore.c, coff-mips.c, coff-or32.c, coff-ppc.c,
5226 coff-rs6000.c, coff-sh.c, coff-sparc.c, coff-stgo32.c, coff-tic30.c,
5227 coff-tic4x.c, coff-tic54x.c, coff-tic80.c, coff-w65.c, coff-we32k.c,
5228 coff-z8k.c, coff64-rs6000.c, coffcode.h, coffgen.c, cofflink.c,
5229 corefile.c, cpu-a29k.c, cpu-alpha.c, cpu-arc.c, cpu-arm.c, cpu-avr.c,
5230 cpu-cris.c, cpu-d10v.c, cpu-d30v.c, cpu-dlx.c, cpu-fr30.c, cpu-frv.c,
5231 cpu-h8300.c, cpu-h8500.c, cpu-hppa.c, cpu-i370.c, cpu-i386.c,
5232 cpu-i860.c, cpu-i960.c, cpu-ia64.c, cpu-ip2k.c, cpu-m10200.c,
5233 cpu-m10300.c, cpu-m32r.c, cpu-m68hc11.c, cpu-m68hc12.c, cpu-m68k.c,
5234 cpu-m88k.c, cpu-mcore.c, cpu-mips.c, cpu-mmix.c, cpu-ns32k.c,
5235 cpu-openrisc.c, cpu-or32.c, cpu-pdp11.c, cpu-pj.c, cpu-powerpc.c,
5236 cpu-rs6000.c, cpu-s390.c, cpu-sh.c, cpu-sparc.c, cpu-tic30.c,
5237 cpu-tic4x.c, cpu-tic54x.c, cpu-tic80.c, cpu-v850.c, cpu-vax.c,
5238 cpu-w65.c, cpu-we32k.c, cpu-xstormy16.c, cpu-z8k.c, dwarf1.c,
5239 dwarf2.c, ecoff.c, ecofflink.c, efi-app-ia32.c, efi-app-ia64.c,
5240 elf-bfd.h, elf-eh-frame.c, elf-hppa.h, elf-m10200.c, elf-m10300.c,
5241 elf-strtab.c, elf.c, elf32-arc.c, elf32-arm.h, elf32-avr.c,
5242 elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c, elf32-fr30.c,
5243 elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c, elf32-hppa.h,
5244 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
5245 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
5246 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
5247 elf32-pj.c, elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-sh64-com.c,
5248 elf32-sh64.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
5249 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
5250 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-ppc.h, elf64-s390.c,
5251 elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c,
5252 elfarm-oabi.c, elfcode.h, elfcore.h, elflink.c, elflink.h,
5253 elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c, elfxx-mips.h,
5254 elfxx-target.h, format.c, freebsd.h, genlink.h, hash.c, hp300hpux.c,
5255 hppabsd-core.c, hpux-core.c, i386aout.c, i386linux.c, i386lynx.c,
5256 i386mach3.c, i386msdos.c, i386os9k.c, ieee.c, ihex.c, irix-core.c,
5257 libaout.h, libbfd-in.h, libbfd.c, libcoff-in.h, libecoff.h, libieee.h,
5258 libnlm.h, liboasys.h, libpei.h, libxcoff.h, linker.c, lynx-core.c,
5259 m68klinux.c, m68klynx.c, mach-o.c, mach-o.h, merge.c, mipsbsd.c,
5260 mmo.c, netbsd-core.c, netbsd.h, nlm.c, nlm32-alpha.c, nlm32-i386.c,
5261 nlm32-ppc.c, nlm32-sparc.c, nlmcode.h, oasys.c, opncls.c, osf-core.c,
5262 pc532-mach.c, pdp11.c, pe-arm.c, pe-i386.c, pe-mcore.c, pe-mips.c,
5263 pe-sh.c, peXXigen.c, pef.c, pei-arm.c, pei-i386.c, pei-mcore.c,
5264 pei-mips.c, pei-sh.c, peicode.h, ppcboot.c, ptrace-core.c, reloc.c,
5265 reloc16.c, riscix.c, rs6000-core.c, sco5-core.c, section.c, simple.c,
5266 som.c, som.h, sparclinux.c, sparclynx.c, srec.c, stabs.c, sunos.c,
5267 syms.c, targets.c, tekhex.c, ticoff.h, trad-core.c, versados.c,
5268 vms-gsd.c, vms-hdr.c, vms-misc.c, vms-tir.c, vms.c, vms.h,
5269 xcoff-target.h, xcofflink.c, xsym.c, xsym.h: Replace boolean with
5270 bfd_boolean, true with TRUE, false with FALSE. Simplify comparisons
5271 of bfd_boolean vars with TRUE/FALSE. Formatting.
5272 * bfd-in2.h, libbfd.h, libcoff.h: Regenerate
5273
5274 2002-11-28 Alan Modra <amodra@bigpond.net.au>
5275
5276 * elf-bfd.h: Replace occurrences of Elf32_Internal_* and
5277 Elf64_Internal_* with Elf_Internal_*. Replace Elf_Internal_Rel
5278 with Elf_Internal_Rela.
5279 * elf-hppa.h, elf-m10200.c, elf-m10300.c, elf32-arc.c, elf32-arm.h,
5280 elf32-avr.c, elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c,
5281 elf32-fr30.c, elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c,
5282 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
5283 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
5284 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
5285 elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-v850.c, elf32-vax.c,
5286 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
5287 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
5288 elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c, elfarm-oabi.c,
5289 elfcode.h, elflink.h, elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c: Ditto.
5290 * elf-hppa.h (elf_hppa_internal_shdr): Delete. Use Elf_Internal_Shdr
5291 throughout instead.
5292 * elf.c (_bfd_elf_no_info_to_howto_rel): Delete.
5293 * elfcode.h (elf_swap_reloca_in): Pass source operand as a bfd_byte *.
5294 Remove INLINE keyword.
5295 (elf_swap_reloc_in): Likewise. Also clear r_addend.
5296 (elf_swap_reloc_out, elf_swap_reloca_out): Pass destination operand
5297 as a bfd_byte *.
5298 (elf_write_relocs): Consolidate REL and RELA code.
5299 (elf_slurp_reloc_table_from_section): Simplify REL code.
5300 (NAME(_bfd_elf,size_info)): Populate reloc swap entries.
5301 * elf-bfd.h (MAX_INT_RELS_PER_EXT_REL): Define.
5302 * elflink.h (elf_link_read_relocs_from_section): Consolidate REL and
5303 RELA code.
5304 (elf_link_adjust_relocs): Likewise. Don't malloc space for temp
5305 reloc array, use a fixed size of MAX_INT_RELS_PER_EXT_REL.
5306 (elf_link_output_relocs): Likewise.
5307 (elf_reloc_link_order): Likewise.
5308 (elf_finish_pointer_linker_section): Likewise.
5309 (struct elf_link_sort_rela): Remove union.
5310 (elf_link_sort_cmp1): Update to suit.
5311 (elf_link_sort_cmp2): Here too.
5312 (elf_link_sort_relocs): Consolidate REL and RELA code. Fix memory
5313 over-allocation for int_rels_per_ext_rel != 1 case.
5314 * elf32-arm.h: Update all bfd_elf32_swap_reloc_out calls.
5315 * elf32-i386.c: Likewise.
5316 * elf32-cris.c: Likewise for bfd_elf32_swap_reloca_out.
5317 * elf32-hppa.c, elf32-i370.c, elf32-m68k.c, elf32-ppc.c, elf32-s390.c,
5318 elf32-sh.c, elf32-vax.c, elfxx-mips.c: Likewise.
5319 * elf64-alpha.c: Likewise for bfd_elf64_swap_reloca_out.
5320 * elf64-hppa.c, elf64-mips.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
5321 elf64-sparc.c, elf64-x86-64.c: Likewise.
5322 * elfxx-ia64.c: Likewise for bfd_elfNN_swap_reloca_out.
5323 * elfxx-mips.c (sort_dynamic_relocs): Likewise for
5324 bfd_elf32_swap_reloc_in.
5325
5326 * elf32-arm.h: Update elf32_arm_info_to_howto calls.
5327 * elf32-mips.c: Likewise for mips_info_to_howto_rel.
5328 (mips_elf64_swap_reloc_in): Zero r_addend.
5329 (mips_elf64_be_swap_reloc_in): Likewise.
5330 (mips_elf64_slurp_one_reloc_table): Simplify.
5331
5332 * elf64-alpha.c (alpha_elf_size_info): Populate reloc swap entries.
5333 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
5334 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
5335
5336 2002-11-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5337
5338 * elf32-sh.c (sh_elf_relocate_section): Don't complain about
5339 unresolved debugging relocs in dynamic applications.
5340 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
5341
5342 2002-11-26 Alan Modra <amodra@bigpond.net.au>
5343
5344 * elf-eh-frame.c (ENSURE_NO_RELOCS): Disregard R_*_NONE relocs.
5345 (_bfd_elf_discard_section_eh_frame): Don't discard duplicate CIEs
5346 on a relocatable link. Comment typos.
5347 * elf.c (_bfd_elf_link_hash_newfunc): Assign elements of structure
5348 in the order they are declared. Clear elf_hash_value too.
5349 (_bfd_elf_link_hash_table_init): Likewise assign in order. Clear
5350 eh_info and tls_segment.
5351 * elflink.h (elf_link_input_bfd <emit_relocs>): Keep reloc offsets
5352 sorted when discarding relocs by turning them into R_*_NONE.
5353
5354 * libbfd.c (warn_deprecated): Comment spelling.
5355 * po/SRC-POTFILES.in: Regenerate.
5356
5357 2002-11-21 Richard Henderson <rth@redhat.com>
5358
5359 * elflink.h (elf_link_add_object_symbols): Don't overwrite the
5360 arch's st_other bits when merging visibilities.
5361 (elf_link_output_extsym): Tidy clearing of visibility field.
5362
5363 2002-11-21 Alan Modra <amodra@bigpond.net.au>
5364
5365 * coff-mcore.c (SWAP_IN_RELOC_OFFSET): Define.
5366 (SWAP_OUT_RELOC_OFFSET): Define.
5367
5368 2002-11-20 Alexandre Oliva <aoliva@redhat.com>
5369
5370 * elf.c (_bfd_elf_link_hash_table_init): Make sure
5371 can_refcount is properly extended to the type of
5372 init_refcount.
5373
5374 2002-11-19 Alexandre Oliva <aoliva@redhat.com>
5375
5376 * elfxx-mips.c (MIPS_RELOC_RELA_P): New macro.
5377 (_bfd_mips_elf_relocate_section): Use it.
5378
5379 * elfxx-mips.c (MNAME): New macro.
5380 (_bfd_mips_elf_check_relocs): Use it.
5381 (_bfd_mips_elf_discard_info): Likewise.
5382 (_bfd_mips_elf_final_link): Likewise.
5383
5384 2002-11-19 Alan Modra <amodra@bigpond.net.au>
5385
5386 * elf64-ppc.c (ppc64_elf_edit_opd): When deleting relocs, adjust
5387 rel_hdr.sh_size too.
5388
5389 2002-11-18 Klee Dienes <kdienes@apple.com>
5390
5391 * Makefile.am (BFD32_LIBS): Add bfdwin.lo, bfdio.lo.
5392 (BFD32_LIBS_CFILES): Add bfdwin.c, bfdio.c.
5393 (BFD_H_FILES): Add bfdwin.c, bfdio.c.
5394 (LIBBFD_H_FILES): Add bfdwin.c, bfdio.c.
5395 Add dependencies for bfdwin.c, bfdio.c.
5396 * bfd.c: Remove bfd_get_mtime, bfd_get_size.
5397 * libbfd.c: Remove real_read, bfd_bread, _bfd_window_internal,
5398 bfd_init_window, bfd_free_window, bfd_get_file_window, bfd_bwrite,
5399 bfd_tell, bfd_flush, bfd_stat, bfd_seek.
5400 * bfdio.c: New file. Contains real_read, bfd_bread, bfd_write,
5401 bfd_tell, bfd_flush, bfd_stat, bfd_seek, bfd_ge_mtime,
5402 bfd_get_size (moved from libbfd.c and bfd.c).
5403 * bfdwin.c New file. Contains _bfd_window_internal,
5404 bfd_init_window, bfd_free_window, bfd_get_file_window (moved from
5405 libbfd.c and bfd.c).
5406 * po/SRC-POTFILES.in: Regenerate.
5407 * po/bfd.pot: Regenerate.
5408 * libbfd.h: Regenerate.
5409 * bfd-in2.h: Regenerate.
5410 * aclocal.m4: Regenerate.
5411 * Makefile.in: Regenerate.
5412 * configure: Regenerate.
5413
5414 2002-11-18 Klee Dienes <kdienes@apple.com>
5415
5416 * bfd.c (bfd_preserve_save): Don't zero BFD_IN_MEMORY.
5417
5418 2002-11-15 Kazu Hirata <kazu@cs.umass.edu>
5419
5420 * coff-h8300.c (h8300_reloc16_estimate): Do not optimize away
5421 jsr after a short jump.
5422 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
5423
5424 2002-11-15 Klee Dienes <kdienes@apple.com>
5425
5426 * pef.c (bfd_pef_convert_architecture): Move declaration of
5427 ARCH_POWERPC and ARCH_M68K to the start of the function.
5428
5429 2002-11-14 Svein E. Seldal <Svein.Seldal@solidas.com>
5430
5431 * coff-tic4x.c (tic4x_howto_table): Formatting fixup
5432
5433 2002-11-14 Hans-Peter Nilsson <hp@bitrange.com>
5434
5435 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs):
5436 For bpo_gregs_section->contents, allocate _raw_size, not
5437 _cooked_size.
5438
5439 2002-11-13 Klee Dienes <kdienes@apple.com>
5440
5441 * config.bfd: Add entries for powerpc-*-darwin and cousins.
5442
5443 2002-11-13 H.J. Lu <hjl@gnu.org>
5444
5445 * elfcode.h (elf_object_p): Don't restore abfd->arch_info.
5446
5447 2002-11-13 Klee Dienes <kdienes@apple.com>
5448 Alan Modra <amodra@bigpond.net.au>
5449
5450 * bfd.c (struct bfd_preserve): New.
5451 (bfd_preserve_save): New function.
5452 (bfd_preserve_restore): Ditto.
5453 (bfd_preserve_finish): Ditto.
5454 * bfd-in2.h: Regenerate.
5455 * mach-o.c: Formatting.
5456 (bfd_mach_o_scan_read_symtab_symbol): Make "value" unsigned.
5457 (bfd_mach_o_object_p): Use bfd_preserve_save/restore/finish.
5458 (bfd_mach_o_core_p): Ditto.
5459 (bfd_mach_o_scan): Pass in mdata.
5460 * mach-o.h (bfd_mach_o_scan): Update prototype.
5461 * pef.c: Formatting.
5462 (bfd_pef_object_p): Use bfd_preserve_save/restore/finish.
5463 (bfd_pef_xlib_object_p): Ditto.
5464 (bfd_pef_scan): Pass in mdata. Move version check to bfd_pef_object_p.
5465 * pef.h (bfd_pef_scan): Update prototype.
5466 * xsym.c: Formatting, K&R fixes.
5467 (bfd_sym_object_p): Use bfd_preserve_save/restore/finish.
5468 (bfd_sym_scan): New function split out from bfd_sym_object_p.
5469 * xsym.h (bfd_sym_scan): Declare.
5470 * elfcode.h (elf_object_p): Use bfd_preserve_save/restore/finish.
5471 * elfcore.h (elf_core_file_p): Likewise.
5472 * targets.c (_bfd_target_vector): Revert 2002-11-08 change.
5473
5474 2002-11-12 Nick Clifton <nickc@redhat.com>
5475
5476 * po/da.po: Updated Danish translation.
5477
5478 2002-11-12 Alan Modra <amodra@bigpond.net.au>
5479
5480 * elflink.h (elf_link_add_object_symbols): Optimize stabs for
5481 relocatable link too.
5482 (elf_link_input_bfd): When emitting relocs, adjust offsets for
5483 eh_frame and stab sections. Zap deleted relocs.
5484 (elf_reloc_symbol_deleted_p): Return true for zero r_symndx.
5485 (elf_bfd_discard_info): Run for relocatable link too.
5486 * elf64-ppc.c (ppc64_elf_edit_opd): Rename from edit_opd. Make global.
5487 Handle ld -r case.
5488 (ppc64_elf_size_dynamic_sections): Don't call edit_opd from here.
5489 * elf64-ppc.h (ppc64_elf_edit_opd): Declare.
5490
5491 * elf-bfd.h (struct cie_header): Move from elf_eh-frame.c.
5492 (struct cie, struct eh_cie_fde, struct eh_frame_sec_info): Likewise.
5493 (struct eh_frame_array_ent, struct eh_frame_hdr_info): Likewise.
5494 (enum elf_link_info_type): Remove ELF_INFO_TYPE_EH_FRAME_HDR.
5495 (struct eh_frame_hdr_info): Add "hdr_sec", remove "split".
5496 (struct elf_link_hash_table): Add eh_info.
5497 (struct elf_obj_tdata): Change eh_frame_hdr to an asection *.
5498 (_bfd_elf_discard_section_eh_frame): Update prototype.
5499 (_bfd_elf_discard_section_eh_frame_hdr): Likewise.
5500 (_bfd_elf_write_section_eh_frame): Likewise.
5501 (_bfd_elf_write_section_eh_frame_hdr): Likewise.
5502 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Remove "ehdrsec"
5503 param. Get "hdr_info" from link hash table.
5504 (_bfd_elf_discard_section_eh_frame_hdr): Remove "sec" param. Get
5505 header section from link hash table. Save header section to elf_tdata.
5506 (_bfd_elf_maybe_strip_eh_frame_hdr): Remove local "sec". Use
5507 header section from link hash table. Don't alloc hdr_info. Clear
5508 hdr_sec instead of setting "strip".
5509 (_bfd_elf_eh_frame_section_offset): Formatting.
5510 (_bfd_elf_write_section_eh_frame): Remove "ehdrsec", add "info" param.
5511 Get header section from link hash table.
5512 (_bfd_elf_write_section_eh_frame_hdr): Remove "sec", add "info" param.
5513 Get header section from link hash table.
5514 * elf.c (map_sections_to_segments): Use cached eh_frame_hdr.
5515 (get_program_header_size): Likewise.
5516 (_bfd_elf_section_offset): Formatting.
5517 * elflink.h (elf_link_create_dynamic_sections): Stash eh frame header
5518 section pointer in link hash table.
5519 (elf_bfd_final_link): Adjust _bfd_elf_write_section_eh_frame_hdr
5520 and _bfd_elf_write_section_eh_frame calls. Update comment about
5521 eh_frame entries.
5522 (elf_bfd_discard_info): Adjust _bfd_elf_discard_section_eh_frame and
5523 _bfd_elf_discard_section_eh_frame_hdr calls. Remove "ehdr".
5524
5525 * po/SRC-POTFILES.in: Regenerate.
5526
5527 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't zero
5528 relocs for discarded FDEs. Remove dead code.
5529 (_bfd_elf_write_section_eh_frame_hdr): Remove dead code.
5530 * elflink.h (elf_bfd_discard_info): Don't save edited relocs.
5531 Tidy conditions under which stabs are edited. Formatting.
5532 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
5533 from discarded relocs.
5534 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Add reloc output
5535 section adjustments after testing magic values.
5536
5537 2002-11-12 Thomas Moestl <tmm@FreeBSD.org>
5538
5539 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Correct
5540 references to large plt symbols.
5541
5542 2002-11-12 Klee Dienes <kdienes@apple.com>
5543
5544 * mach-o.c (bfd_mach_o_scan_read_thread): Don't re-use 'i' when
5545 looking for an unused section name.
5546
5547 2002-11-11 Kazu Hirata <kazu@cs.umass.edu>
5548
5549 * coff-h8300.c: Fix formatting.
5550 * elf32-h8300.c: Likewise.
5551 * reloc16.c: Likewise.
5552
5553 2002-11-09 Jeroen Dobbelaere <jeroen.dobbelaere@acunia.com>
5554
5555 * elf32-arm.h (elf32_arm_size_dynamic_sections): Don't strip output
5556 section when dynamic section unused; _bfd_strip_section_from_output
5557 instead.
5558
5559 2002-11-08 Alan Modra <amodra@bigpond.net.au>
5560
5561 * targets.c (_bfd_target_vector): Disable pef_vec, pef_xlib_vec
5562 and sym_vec.
5563
5564 * dwarf2.c: Revert last change.
5565
5566 2002-11-07 Michal Ludvig <mludvig@suse.cz>
5567
5568 * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
5569 _bfd_dwarf2_find_nearest_line): Use
5570 bfd_simple_get_relocated_section_contents() instead of
5571 bfd_get_section_contents().
5572 * reloc.c (bfd_perform_relocation): Add sanity check.
5573 * simple.c (simple_get_relocated_section_contents): If the section
5574 does not have any relocs associated with it, just return the
5575 unadjusted contents.
5576
5577 2002-11-07 Hans-Peter Nilsson <hp@axis.com>
5578
5579 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOT,
5580 case R_CRIS_32_GOT>: Correct test for filling in constant .got
5581 contents, enabling for a non-DSO, for symbols defined in the
5582 program with --export-dynamic.
5583
5584 2002-11-07 Alan Modra <amodra@bigpond.net.au>
5585
5586 * elf64-ppc.c: Comment typo fixes.
5587 (ppc64_elf_merge_private_bfd_data): Allow BFD_ENDIAN_UNKNOWN input.
5588
5589 2002-11-07 Nick Clifton <nickc@redhat.com>
5590
5591 * po/da.po: Updated Danish translation.
5592
5593 2002-11-06 Alexandre Oliva <aoliva@redhat.com>
5594
5595 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Generate
5596 exactly three internal relocs per external reloc. Set reloc_count
5597 to the external reloc count.
5598
5599 2002-11-06 Klee Dienes <kdienes@apple.com>
5600
5601 * coff-stgo32.c (stub_bytes): Mark as const.
5602 Fix comment formatting.
5603
5604 2002-11-06 Klee Dienes <kdienes@apple.com>
5605
5606 * Makefile.am (BFD32_BACKENDS): Add mach-o.lo, pef.lo, and
5607 xsym.lo.
5608 (BFD32_BACKENDS_CFILES): Add mach-o.c, pef.c, and xsym.c.
5609 (SOURCE_HFILES): Add mach-o.h, pef.h, pef-traceback.h, xsym.h
5610 * archures.c (enum bfd_architecture): Add bfd_arch_m98k.
5611 * bfd.c (struct bfd): Add private data for mach-o, pef, and sym.
5612 * targets.c (enum bfd_flavour): Add flavours for mach-o, pef, and
5613 sym.
5614 (_bfd_target_vector): Add target vectors for mach-o, pef, and sym.
5615 * Makefile.in: Regenerate.
5616 * doc/Makefile.in: Regenerate.
5617 * bfd-in2.h: Regenerate.
5618 * xsym.c: New file. Contains support for the Apple/Metrowerks
5619 xSYM debugging format.
5620 * xsym.h: New file.
5621 * pef.c: New file. Contains support for the Apple Code Fragment
5622 Manager Preferred Executable Format
5623 * pef.h: New file.
5624 * pef-traceback.h: New file. Contains support for parsing PowerPC
5625 traceback tables as used by PEF executables (and perhaps other
5626 systems as well).
5627 * mach-o.c: New file. Contains support for the Mach-O object file
5628 format.
5629 * mach-o.h: New file.
5630 * mach-o-target.c: New file. Declares the mach-o targets
5631 themselves. Included three times by mach-o.c; each time with a
5632 different set of macros set.
5633
5634 2002-11-06 Graeme Peterson <gp@qnx.com>
5635
5636 * Makefile.am: Remove entries for elf32-qnx.[ch].
5637 * Makefile.in: Regenerate.
5638 * config.bfd: Change arm-nto to use bfd_elf32_{big|little}arm_vec,
5639 ppc-nto to use bfd_elf32_powerpc{le}_vec, sh-nto to use
5640 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
5641 * configure.in: Remove support for bfd_elf32_sh{l}qnx_vec,
5642 bfd_elf32_powerpc{le}qnx_vec, bfd_elf32_{big|little}armqnx_vec,
5643 and bfd_elf32_i386qnx_vec, and removed elf32-qnx.lo from other targets.
5644 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
5645 * configure: Regenerate.
5646 * elf32-qnx.c: Remove.
5647 * elf32-qnx.h: Remove.
5648 * elf.c: Remove calls to QNX specific set_nonloadable_filepos,
5649 is_contained_by_filepos, and copy_private_bfd_data_p.
5650 * elf-bfd.h (struct elf_backend_data): Remove set_nonloadable_filepos,
5651 is_contained_by_filepos, and copy_private_bfd_data_p.
5652 * elf32-i386.c: Remove QNX extended bfd support.
5653 * elf32-ppc.c: Remove QNX extended bfd support.
5654 * elf32-sh.c: Remove QNX extended bfd support.
5655 * elfarm-nabi.c: Remove QNX extended bfd support.
5656 * targets.c: Remove qnx vectors.
5657 * elfxx-target.h (elf_backend_set_nonloadable_filepos): Remove
5658 (elf_backend_is_contained_by_filepos): Remove.
5659 (elf_backend_copy_private_bfd_data_p): Remove.
5660 * po/SRC-POTFILES.in: Regenerate.
5661
5662 2002-11-06 David O'Brien <obrien@FreeBSD.org>
5663 Alan Modra <amodra@bigpond.net.au>
5664
5665 * elf64-sparc.c (sparc64_elf_relocate_section): Adjust addend of
5666 dynamic relocs against section symbols for the output section vma.
5667
5668 2002-11-05 Alan Modra <amodra@bigpond.net.au>
5669
5670 * elf32-arm.h (t2a1_push_insn, t2a2_ldr_insn, t2a3_mov_insn,
5671 t2a4_bx_insn, t2a5_pop_insn, t2a6_bx_insn): Remove.
5672
5673 2002-11-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5674 Alan Modra <amodra@bigpond.net.au>
5675
5676 * config.bfd (sh-*-linux*): Use bfd_elf*_sh64*lin_vec as sh64
5677 vectors in target_selvecs.
5678 (shle-*-netbsdelf*): Use bfd_elf*_sh64*nbsd_vec as sh64 vectors
5679 in target_selvecs.
5680 (sh-*-netbsdelf*): Likewise.
5681 * configure.in (assocvecs): New variable. Handle assocvecs like
5682 selvecs.
5683 * configure: Regenerate.
5684 * format.c (bfd_check_format_matches): Store bfd_target pointers
5685 in matching_vector instead of target names. Select first target
5686 from bfd_associated_vector that matches a list of ambiguous targets.
5687 * targets.c (_bfd_associated_vector): New array.
5688 (bfd_associated_vector): New variable.
5689 (_bfd_target_vector): Add bfd_elf*_sh64*lin_vec.
5690 * libbfd-in.h (bfd_associated_vector): Declare.
5691 * libbfd.h: Regenerate.
5692
5693 2002-11-05 Elias Athanasopoulos <eathan@otenet.gr>
5694
5695 * vms-gsd.c (_bfd_vms_write_gsd): Check that symbol->udata.p is
5696 non-NULL before dereferencing.
5697
5698 2002-11-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5699
5700 * vms.c (vms_object_p): Restore the start address when returning
5701 NULL.
5702
5703 2002-11-04 Alan Modra <amodra@bigpond.net.au>
5704 Hans-Peter Nilsson <hp@axis.com>
5705
5706 * elflink.h (struct elf_final_link_info): Add shndxbuf_size.
5707 (elf_bfd_final_link): Don't bother zeroing symtab_hdr fields.
5708 Set up a larger symshndxbuf, and write it out. Free it on
5709 exit rather than freeing symbuf twice. Correct section index
5710 on output section symbol loop.
5711 (elf_link_output_sym): Accumulate symbol extension section
5712 indices, reallocating symshndxbuf rather than writing it out.
5713 (elf_link_flush_output_syms): Don't flush symshndxbuf.
5714 * elf.c (assign_section_numbers): Init i_shdrp to all zero.
5715 Use bfd_zalloc to clear i_shdrp[0] too.
5716
5717 2002-11-03 Stephen Clarke <stephen.clarke@earthling.net>
5718
5719 * elf32-sh64-com.c (sh64_address_in_cranges): Use
5720 _raw_size of cranges section if _cooked_size not yet set.
5721
5722 2002-11-03 Hans-Peter Nilsson <hp@axis.com>
5723
5724 * elf32-v850.c (v850_elf_relax_delete_bytes): Correct parameters
5725 for bfd_elf32_swap_symbol_out.
5726
5727 2002-10-31 David O'Brien <obrien@FreeBSD.org>
5728
5729 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't mix
5730 signed and unsigned in comparison.
5731
5732 2002-10-30 Daniel Jacobowitz <drow@mvista.com>
5733
5734 * coffcode.h: Remove extraneous '\'.
5735
5736 2002-10-28 H.J. Lu <hjl@gnu.org>
5737
5738 * Makefile.am (targets.lo): Depend on Makefile instead of
5739 config.status.
5740 (archures.lo): Likewise.
5741 * Makefile.in: Regenerated.
5742
5743 2002-10-25 Jason Thorpe <thorpej@wasabisystems.com>
5744
5745 * config.bfd (mips*el-*-netbsd*, mips*-*-netbsd*): Add
5746 bfd_elf64_bigmips_vec and bfd_elf64_littlemips_vec to
5747 targ_selvecs.
5748
5749 2002-10-25 Jim Wilson <wilson@redhat.com>
5750
5751 * elf64-sh64.c (sh_elf64_relocate_section): Call
5752 _bfd_elf_rela_local_sym. Handle relocs against STT_SECTION symbol
5753 of SHF_MERGE section.
5754
5755 2002-10-25 Hans-Peter Nilsson <hp@axis.com>
5756
5757 * simple.c: Correct placement of ATTRIBUTE_UNUSED.
5758
5759 2002-10-24 John David Anglin <dave@hiauly1.hia.nrc.ca>
5760
5761 * aoutx.h (NAME(aout,swap_ext_reloc_in)): Cast bytes->r_index to
5762 unsigned int. Cast RELOC_BASE10, RELOC_BASE13 and RELOC_BASE22 to
5763 unsigned int.
5764 (NAME(aout,final_link)): Cast enum used in assignment.
5765 (aout_link_write_symbols): Cast enums in comparisons, int values to
5766 boolean, enums in assignments to int.
5767 (aout_link_input_section_std): Cast rel->r_index to unsigned int.
5768 (aout_link_input_section_ext): Likewise. Cast enums used in
5769 comparisons with unsigned ints.
5770 (aout_link_reloc_link_order): Cast enum to int in assignment.
5771 * archive.c (_bfd_generic_read_ar_hdr_mag): Cast result of memchr
5772 calls to char *.
5773 * bfd-in.h (bfd_set_section_vma): Cast enum true to unsigned int in
5774 assignment.
5775 * bfd-in2.h (bfd_set_section_vma): Likewise.
5776 * bfd.c (bfd_record_phdr): Cast enums in assignments.
5777 * binary.c (bfd_alloc): Cast enum to long.
5778 * coffgen.c (_bfd_coff_is_local_label_name): Cast return to boolean.
5779 * dwarf2.c (read_abbrevs): Add casts to enum types.
5780 (read_attribute_value): Likewise.
5781 (arange_add): Cast result of bfd_zalloc call.
5782 (comp_unit_contains_address): Return true and false.
5783 (comp_unit_find_nearest_line): Cast return to boolean.
5784 * format.c (bfd_check_format_matches, bfd_set_format): Likewise.
5785 * gen-aout.c: define macro '_' if not defined.
5786 * libbfd.c (bfd_realloc): Cast malloc and realloc to PTR.
5787 (bfd_bwrite): Cast bfd_realloc to bfd_byte *.
5788 (bfd_write_bigendian_4byte_int): Cast return to boolean.
5789 (bfd_seek): Cast bfd_realloc to bfd_byte *.
5790 (bfd_generic_is_local_label_name): Cast return to boolean.
5791 * libcoff.h (_bfd_coff_adjust_symndx): Remove extraneous '\'.
5792 * linker.c (_bfd_link_hash_newfunc): Cast bfd_hash_allocate result to
5793 struct bfd_hash_entry *.
5794 (_bfd_generic_link_hash_newfunc): likewise.
5795 (_bfd_generic_final_link): Cast enum to unsigned int.
5796 * merge.c (sec_merge_emit): Cast return to boolean.
5797 (merge_strings): Add casts to const unsigned char *.
5798 * reloc.c (bfd_get_reloc_code_name): Cast enums in comparison to int.
5799 (bfd_generic_get_relocated_section_content): Cast enum to unsigned int.
5800 * section.c (bfd_section_hash_newfunc): Cast bfd_hash_allocate result
5801 to struct bfd_hash_entry *.
5802 (bfd_set_section_content): Add cast to PTR in comparison.
5803 * simple.c (simple_dummy_warning, simple_dummy_undefined_symbol,
5804 simple_dummy_reloc_overflow, simple_dummy_reloc_dangerous,
5805 simple_dummy_unattached_reloc,
5806 bfd_simple_get_relocated_section_contents): Add K&R declarations and
5807 function definitions.
5808 * srec.c (S3Forced): Initialize to false.
5809 (srec_get_symtab): Cast return value from bfd_alloc to asymbol *.
5810 * stabs.c (_bfd_link_section_stabs): Cast enum to int in comparisons.
5811 (_bfd_discard_section_stabs): Likewise. Also cast return to boolean.
5812 * syms.c (bfd_is_undefined_symclass): Cast return to boolean.
5813 (_bfd_stab_section_find_nearest_line): Cast enum to bfd_byte in
5814 comparisons.
5815
5816 2002-10-23 Jakub Jelinek <jakub@redhat.com>
5817
5818 * elf64-alpha.c (elf64_alpha_check_relocs): Only put maybe_dynamic
5819 relocs into shared lib non-allocated reloc sections.
5820
5821 2002-10-23 Nathan Tallent <eraxxon@alumni.rice.edu>
5822
5823 * dwarf2.c (add_line_info): Ensure that the line_info_table is
5824 sorted even when given an out-of-order line sequence.
5825 (lookup_address_in_line_info_table): When an exact VMA match is
5826 not found, return line information with the closest VMA.
5827
5828 2002-10-23 Ross Alexander <ross.alexander@uk.neceur.com>
5829
5830 * elf64-hppa.c: Force DT_FLAGS to always be set. Required by
5831 HPUX 11.00 patch PHSS_26559.
5832
5833 2002-10-22 Alexandre Oliva <aoliva@redhat.com>
5834
5835 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Don't move
5836 the options section into a separate section unless IRIX 6
5837 compatibility is enabled.
5838
5839 2002-10-22 Alexandre Oliva <aoliva@redhat.com>
5840
5841 * elflink.h (struct elf_link_sort_rela): Turn rel and rela
5842 into arrays.
5843 (elf_link_sort_cmp1, elf_link_sort_cmp2): Adjust.
5844 (elf_link_sort_relocs): Likewise. Take int_rels_per_ext_rel
5845 into account.
5846 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Compose
5847 R_MIPS_REL32 with R_MIPS64 if ABI_64_P.
5848
5849 2002-10-21 Graeme Peterson <gp@qnx.com>
5850
5851 * targets.c (_bfd_target_vector): Add missing qnx vectors.
5852
5853 2002-10-21 Alan Modra <amodra@bigpond.net.au>
5854
5855 * targets.c (bfd_target_list): Don't return the default target twice.
5856
5857 2002-10-21 Elias Athanasopoulos <eathan@otenet.gr>
5858
5859 * archive.c (_bfd_archive_bsd_update_armap_timestamp): Replace
5860 perror with bfd_perror.
5861
5862 2002-10-19 H.J. Lu <hjl@gnu.org>
5863
5864 * elflink.h (elf_link_add_object_symbols): Correctly handle
5865 DT_RPATH and DT_RUNPATH.
5866
5867 2002-10-19 Mark Kettenis <kettenis@gnu.org>
5868
5869 * elf.c (elfcore_grok_note): Fix recognition on NT_PRXFPREG notes.
5870
5871 2002-10-17 Denis Chertykov <denisc@overta.ru>
5872
5873 * elf32-ip2k.c (ELF_MACHINE_ALT1): Define alternate machine code
5874 for ip2k port.
5875
5876 2002-10-17 Alan Modra <amodra@bigpond.net.au>
5877
5878 * elfxx-target.h (USE_REL): Don't define as 1.
5879 * elf32-arm.h (USE_REL): Provide a default define of 0.
5880 Use #if rather than #ifdef when testing USE_REL.
5881 * elf32-m32r.c: Likewise.
5882
5883 * elf32-arc.c (USE_REL): Define as 1.
5884 * elf32-d10v.c (USE_REL): Likewise.
5885 * elf32-m32r.c (USE_REL): Likewise.
5886 * elf32-m68hc11.c (USE_REL): Likewise.
5887 * elf32-m68hc12.c (USE_REL): Likewise.
5888 * elf32-or32.c (USE_REL): Likewise.
5889 * elfarm-nabi.c (USE_REL): Likewise.
5890
5891 2002-10-16 Jakub Jelinek <jakub@redhat.com>
5892
5893 * config.bfd (s390-*-linux*): Add targ64_selvecs.
5894 (s390x-*-linux*): Add targ_selvecs.
5895
5896 2002-10-16 Alan Modra <amodra@bigpond.net.au>
5897
5898 * Makefile.am (BFD32_BACKENDS): Remove elfarmqnx-nabi.lo,
5899 elf32-i386-fbsd.lo, elf32-i386qnx.lo, elf32-ppcqnx.lo,
5900 elf32-sh-lin.lo, elf32-sh64-lin.lo, elf32-sh-nbsd.lo,
5901 elf32-sh64-nbsd.lo, elf32-shqnx.lo. Add elf32-qnx.lo.
5902 (BFD32_BACKENDS_CFILES): Likewise for corresponding C files.
5903 (BFD64_BACKENDS): Remove elf64-sh64-lin.lo, elf64-sh64-nbsd.lo.
5904 (BFD64_BACKENDS_CFILES): Likewise for corresponding C files.
5905 (SOURCE_HFILES): Add elf32-qnx.h.
5906 (BUILD_HFILES): Add bfdver.h.
5907 Run "make dep-am".
5908 * Makefile.in: Regenerate.
5909 * configure.in Update bfd vector dependencies.
5910 * configure: Regenerate.
5911 * elf32-i386-fbsd.c: Delete. Move code to elf32-i386.c.
5912 * elf32-i386qnx.c: Likewise.
5913 * elf32-ppcqnx.c: Delete. Move code to elf32-ppc.c.
5914 * elf32-sh-nbsd.c: Delete. Move code to elf32-sh.c.
5915 * elf32-sh-lin.c: Likewise.
5916 * elf32-shqnx.c: Likewise.
5917 * elf32-sh64-lin.c: Delete. Move code to elf32-sh64.c.
5918 * elf32-sh64-nbsd.c: Likewise.
5919 * elf64-sh64-lin.c: Delete. Move code to elf64-sh64.c.
5920 * elf64-sh64-nbsd.c: Likewise.
5921 * elfarmqnx-nabi.c: Delete. Move code to elfarm-nabi.c.
5922 * elf32-arm.h (ELF_MAXPAGESIZE): Always define.
5923 * elf32-i386.c: Remove ELF_ARCH and ELF32_I386_C_INCLUDED tests.
5924 * elf32-ppc.c: Remove ELF32_PPC_C_INCLUDED tests.
5925 * elf32-qnx.h (elf_backend_set_nonloadable_filepos): Always define.
5926 (elf_backend_is_contained_by_filepos): Likewise.
5927 (elf_backend_copy_private_bfd_data_p): Likewise.
5928 Globalize and move functions to..
5929 * elf32-qnx.c: ..here. New file.
5930 * elf32-sh.c: Remove ELF_ARCH and ELF32_SH_C_INCLUDED tests. Don't
5931 emit target vectors when INCLUDE_SHMEDIA.
5932 * elf32-sh64.c: Remove ELF_ARCH test. Move TARGET_* etc. defines to
5933 end of file.
5934 * elf64-sh64.c: Remove ELF_ARCH test.
5935 * elfarm-nabi.c: Remove ELFARM_NABI_C_INCLUDED test.
5936 * po/BLD-POTFILES.in: Regenerate.
5937 * po/SRC-POTFILES.in: Regenerate.
5938
5939 2002-10-16 Alan Modra <amodra@bigpond.net.au>
5940
5941 * elflink.h (elf_link_add_object_symbols): Error out on dynamic objects
5942 loaded with --just-symbols.
5943
5944 * elf32-i386qnx.c (TARGET_LITTLE_NAME): Define.
5945 * elf32-ppcqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
5946 * elf32-shqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
5947 * elfarmqnx-nabi.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
5948
5949 2002-10-15 Richard Henderson <rth@redhat.com>
5950
5951 * Makefile.am (BFD64_BACKENDS): Remove elf64-alpha-fbsd.
5952 (BFD64_BACKENDS_CFILES): Likewise.
5953 * configure.in (bfd_elf64_alpha_freebsd_vec): Use elf64-alpha.
5954 * elf64-alpha-fbsd.c: Remove file, move code ...
5955 * elf64-alpha.c: ... here.
5956 * Makefile.in, configure: Rebuild.
5957
5958 2002-10-14 Richard Henderson <rth@redhat.com>
5959
5960 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: Increment
5961 VALUE, not ADDEND.
5962
5963 2002-10-14 Stephen Clarke <stephen.clarke@superh.com>
5964
5965 * elf32-sh.c (elf_sh_link_hash_entry): Replace
5966 datalabel_got_offset with union of datalabel_got
5967 offset and refcount.
5968 (sh_elf_link_hash_newfunc): Initialize datalabel_got.refcount.
5969 (allocate_dynrelocs): Delete unnecessary code for
5970 STT_DATALABEL type. Create entry in got for
5971 datalabel version of symbol if datalabel_got.refcount > 0.
5972 (sh_elf_relocate_section): Use datalabel_got union.
5973 (sh_elf_gc_sweep_hook): Pull common code to initialize
5974 h and eh out of switch statement. Declare seen_stt_datalabel.
5975 Initialize it. Decrement datalabel_got.refcount for
5976 got relocs when seen_stt_datalabel is true.
5977 Decrement local_got_refcounts entry for datalabel got relocs
5978 of local symbols.
5979 (sh_elf_copy_indirect_symbol): Copy datalabel_got field over.
5980 (sh_elf_check_relocs): Declare seen_stt_datalabel.
5981 Initialize it. When seen_stt_datalabel is true, increment
5982 datalabel_got refcount rather than got.refcount.
5983 (sh_elf_finish_dynamic_symbol): Create relocs to
5984 initialize got entry for datalabel version of symbol.
5985
5986 2002-10-14 Alan Modra <amodra@bigpond.net.au>
5987
5988 * Makefile.am: Run "make dep-am".
5989 (BFD_H_FILES): Remove version.h.
5990 * bfd-in.h (BFD_VERSION, BFD_VERSION_DATE, BFD_VERSION_STRING): Move..
5991 * version.h: ..to here.
5992 * configure.in (bfd_version_date): Remove.
5993 (AC_OUTPUT): Make bfdver.h from version.h.
5994 * bfd.c: #include "bfdver.h".
5995 * vms-hdr.c: Likewise.
5996 * Makefile.in: Regenerate.
5997 * bfd-in2.h: Regenerate.
5998 * configure: Regenerate.
5999 * po/SRC-POTFILES.in: Regenerate.
6000
6001 2002-10-14 Alan Modra <amodra@bigpond.net.au>
6002
6003 * archures.c (bfd_mach_i386_i386, bfd_mach_i386_i8086,
6004 bfd_mach_i386_i386_intel_syntax, bfd_mach_x86_64,
6005 bfd_mach_x86_64_intel_syntax bfd_mach_ppc, bfd_mach_ppc64,
6006 bfd_mach_rs6k, bfd_mach_d10v, bfd_mach_sh, bfd_mach_v850,
6007 bfd_mach_arc_5, bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8,
6008 bfd_mach_m32r, bfd_mach_frv, bfd_mach_frvsimple,
6009 bfd_mach_ia64_elf64, bfd_mach_ia64_elf32,
6010 bfd_mach_ip2022, bfd_mach_ip2022ext,
6011 bfd_mach_s390_31, bfd_mach_s390_64, bfd_mach_xstormy16): Renumber.
6012 * bfd-in2.h: Regenerate.
6013
6014 2002-10-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6015
6016 * config.bfd (sh*eb-*-linux*, sh*-*-linux*): Add the alternative
6017 endian vector to targ_selvecs.
6018
6019 2002-10-13 Alexandre Oliva <aoliva@redhat.com>
6020
6021 * elfxx-mips.c (mips_elf_calculate_relocation): Take
6022 save_addend argument. Don't apply the 32-bit mask to a
6023 GPREL32 value if it's to be used in another relocation. Don't
6024 use forced-check computation of local_p to decide whether to
6025 add gp0 to GPREL16 value. Don't use only the lowest 16 bits
6026 of the addend of a non-in-place GPREL16 relocation.
6027 (_bfd_mips_elf_relocate_section): Pass use_saved_addend_p to
6028 mips_elf_calculate_relocation().
6029
6030 2002-10-12 Stephane Carrez <stcarrez@nerim.fr>
6031
6032 * elf32-m68hc11.c (m68hc11_elf_relax_section): Don't treat relocs
6033 with symbols in other sections if we relaxed something; the sections
6034 output offsets must be re-computed before.
6035
6036 2002-10-12 Stephane Carrez <stcarrez@nerim.fr>
6037
6038 * elf32-m68hc11.c (m68hc11_elf_relax_section): Update symbols
6039 handling to use Elf_Internal_Sym.
6040 (m68hc11_elf_relax_delete_bytes): Likewise.
6041
6042 2002-10-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6043
6044 * elf32-sh.c (sh_elf_optimized_tls_reloc, sh_elf_mkobject,
6045 sh_elf_object_p, dtpoff_base): New functions.
6046 (sh_elf_howto_table): Add TLS relocs.
6047 (sh_reloc_map): Likewise.
6048 (sh_elf_info_to_howto): Support TLS relocs.
6049 (elf_sh_link_hash_entry): Add tls_type and tls_tpoff32.
6050 (sh_elf_hash_entry, sh_elf_tdata, sh_elf_local_got_tls_type):
6051 New macros.
6052 (sh_elf_obj_tdata): New.
6053 (elf_sh_link_hash_table): Add tls_ldm_got.
6054 (sh_elf_link_hash_table_create): Clear refcount of tls_ldm_got.
6055 (allocate_dynrelocs): Support TLS relocs.
6056 (sh_elf_size_dynamic_sections): Likewise.
6057 (sh_elf_relocate_section): Support TLS relocs. Don't try to find
6058 .rela.got section when found already. Return false after printing
6059 error about unresolvable relocation.
6060 (sh_elf_gc_sweep_hook): Support TLS relocs.
6061 (sh_elf_check_relocs): Likewise.
6062 (sh_elf_finish_dynamic_symbol): Likewise.
6063 (bfd_elf32_mkobject, elf_backend_object_p): Define for TLS case.
6064 * reloc.c: Add SH TLS relocs.
6065 * bfd-in2.h, libbfd.h: Regenerate.
6066
6067 2002-10-11 Daniel Jacobowitz <drow@mvista.com>
6068
6069 * Makefile.in: Regenerated.
6070
6071 2002-10-11 Daniel Jacobowitz <drow@mvista.com>
6072
6073 * Makefile.am: Run dep-am.
6074 (BFD_H_DEP): Add simple.c and linker.c.
6075 (BFD32_LIBS): Add simple.lo.
6076 (BFD32_LIBS_CFILES): Add simple.c.
6077 * Makefile.in: Regenerated.
6078 * bfd-in2.h: Regenerated.
6079 * simple.c: New file.
6080
6081 2002-10-11 Alan Modra <amodra@bigpond.net.au>
6082
6083 * coff-arm.c (record_arm_to_thumb_glue): Avoid type-punned pointers.
6084 (record_thumb_to_arm_glue): Likewise.
6085 * ecoff.c (ecoff_link_add_externals): Likewise.
6086 * elf32-arm.h (record_arm_to_thumb_glue): Likewise.
6087 (record_thumb_to_arm_glue): Likewise.
6088 * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
6089 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
6090 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
6091 * elf64-alpha.c (elf64_alpha_create_dynamic_sections): Likewise.
6092 * elf64-ppc.c (func_desc_adjust): Likewise.
6093 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
6094 (sh64_elf64_create_dynamic_sections): Likewise.
6095 * elflink.c (_bfd_elf_create_got_section): Likewise.
6096 (_bfd_elf_create_dynamic_sections): Likewise.
6097 (_bfd_elf_create_linker_section): Likewise.
6098 * elflink.h (elf_add_default_symbol): Likewise.
6099 (elf_link_create_dynamic_sections): Likewise.
6100 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
6101 * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Likewise.
6102 * elfxx-mips.c (mips_elf_create_got_section): Likewise.
6103 (_bfd_mips_elf_add_symbol_hook): Likewise.
6104 (_bfd_mips_elf_create_dynamic_sections): Likewise.
6105 * linker.c (generic_link_add_symbol_list): Likewise.
6106 * xcofflink.c (xcoff_link_add_symbols): Likewise.
6107
6108 * elfxx-ia64.c (oor_brl, oor_ip): Conditionally define.
6109
6110 * elf64-ppc.c (edit_opd): Only zero opd syms when function is
6111 completely removed. Correct local sym adjustment.
6112
6113 2002-10-10 Stephen Clarke <stephen.clarke@superh.com>
6114
6115 * elf32-sh.c (elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
6116 Correct mistake in calculation of address of .got.
6117 * elf64-sh64.c (elf_sh64_pic_plt_entry_be,
6118 elf_sh64_pic_plt_entry_le): Likewise.
6119
6120 2002-10-09 Richard Shann <richard.shann@superh.com>
6121 Stephen Clarke <stephen.clarke@superh.com>
6122
6123 * Makefile.am: Add entries for elf32-sh64-lin.c and
6124 elf64-sh64-lin.c. Regenerate.
6125 * Makefile.in: Regenerate.
6126 * config.bfd: Change sh64eb-*-linux* and sh64-*-linux*
6127 to use sh64 vectors rather than sh vectors.
6128 * configure.in: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
6129 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
6130 * configure: Regenerate.
6131 * elf32-sh64-lin.c: New file.
6132 * elf64-sh64-lin.c: New file.
6133 * targets.c: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
6134 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
6135
6136 2002-10-08 H.J. Lu <hjl@gnu.org>
6137
6138 * elf32-i386.c (elf_i386_relocate_section): Re-arrange the
6139 IE->LE transition for R_386_TLS_IE.
6140
6141 2002-10-08 Alan Modra <amodra@bigpond.net.au>
6142
6143 * elf64-ppc.c (edit_opd): Correct test for discarded sections.
6144
6145 2002-10-07 Mark Elbrecht <snowball3@softhome.net>
6146
6147 * cofflink.c (mark_relocs): Don't mark relocations in excluded
6148 sections.
6149
6150 2002-10-07 Alan Modra <amodra@bigpond.net.au>
6151
6152 * elflink.h (elf_link_input_bfd): Remove BFD_VERSION_DATE dependent
6153 code.
6154
6155 * elf64-ppc.c (ppc64_elf_build_stubs): Increment .glink indx.
6156
6157 2002-10-06 Alan Modra <amodra@bigpond.net.au>
6158
6159 * opncls.c: Formatting.
6160 (_bfd_new_bfd): Use a smaller section hash table.
6161
6162 2002-10-05 Alexandre Oliva <aoliva@redhat.com>
6163
6164 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Set the type
6165 of the other two relocations packed with a REL32 to NONE.
6166
6167 2002-10-02 Stephen Clarke <stephen.clarke@superh.com>
6168
6169 * elf32-sh.c (elf_sh_link_hash_entry): Add gotplt_refcount.
6170 (sh_elf_link_hash_newfunc): Initialize it.
6171 (allocate_dynrelocs): Transfer gotplt refs from plt.refcount
6172 to got.refcount for symbols that are forced local or when
6173 we have direct got refs.
6174 (sh_elf_gc_sweep_hook): Adjust gotplt_refcount. Use it
6175 to correctly adjust got.refcount and plt.refcount.
6176 (sh_elf_copy_indirect_symbol): Copy gotplt_refcount across.
6177 (sh_elf_check_relocs): Increment gotplt_refcount.
6178
6179 2002-10-01 Jakub Jelinek <jakub@redhat.com>
6180
6181 * elf32-i386.c (elf_i386_relocate_section): Fix
6182 movl foo@indntpoff, %eax IE->LE transition.
6183
6184 2002-10-01 Jakub Jelinek <jakub@redhat.com>
6185
6186 * elf64-x86-64.c (elf64_x86_64_relocate_section): Change TLSGD
6187 sequence and its transitions.
6188
6189 2002-10-01 Jakub Jelinek <jakub@redhat.com>
6190
6191 * elf32-i386.c (elf_i386_relocate_section): Resolve R_386_TLS_LDO_32
6192 to st_value + addend in non-code sections.
6193 * elf64-x86-64.c (elf64_x86_64_relocate_section): Resolve
6194 R_X86_64_DTPOFF32 to st_value + addend in non-code sections.
6195
6196 2002-09-30 Gavin Romig-Koch <gavin@redhat.com>
6197 Ken Raeburn <raeburn@cygnus.com>
6198 Aldy Hernandez <aldyh@redhat.com>
6199 Eric Christopher <echristo@redhat.com>
6200 Richard Sandiford <rsandifo@redhat.com>
6201
6202 * archures.c (bfd_mach_mips4120, bfd_mach_mips5400): New.
6203 (bfd_mach_mips5500): New.
6204 * cpu-mips.c (I_mips4120, I_mips5400, I_mips5500): New.
6205 (arch_info_struct): Add corresponding entries here.
6206 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_4120,
6207 E_MIPS_MACH_5400 and E_MIPS_MACH_5500.
6208 (_bfd_mips_elf_final_write_processing): Handle bfd_mach_mips4120,
6209 bfd_mach_mips5400 and bfd_mach_mips5500.
6210 (_bfd_mips_elf_mach_extends_p): New function.
6211 (_bfd_mips_elf_merge_private_bfd_data): Use it to help merge
6212 the EF_MIPS_MACH flags.
6213 * bfd-in2.h: Regenerate.
6214
6215 2002-09-28 Jason Thorpe <thorpej@wasabisystems.com>
6216
6217 * elf32-vax.c (elf_vax_size_dynamic_section): Don't strip
6218 .got sections.
6219
6220 2002-09-28 Alan Modra <amodra@bigpond.net.au>
6221
6222 * elf.c (map_sections_to_segments): Correct test for start of
6223 writable section in the same page as end of read-only section.
6224
6225 2002-09-27 Matt Thomas <matt@3am-software.com>
6226
6227 * elf32-vax.c (elf_vax_check_relocs): Remove unused
6228 local_got_refcounts usage. Remove allocation of got slot.
6229 (elf_vax_gc_sweep_hook): Remove unused local_got_refcounts usage.
6230 Remove de-allocation of got slot.
6231 (elf_vax_size_dynamic_section): Fix some indentation. Add hash
6232 traversal for elf_vax_instantiate_got_entries. Allow empty .got
6233 sections to be GC'ed.
6234 (elf_vax_instantiate_got_entries): New function.
6235 (elf_vax_relocate_section): Simplify R_VAX_GOT32 handling. Remove
6236 tests that are now handled by elf_vax_instantiate_got_entries.
6237 Assert GOT entry falls within .got section size. Remove redundant
6238 comparisions. Fix comments.
6239
6240 2002-09-27 Jakub Jelinek <jakub@redhat.com>
6241
6242 * reloc.c: Add x86-64 TLS relocs.
6243 * bfd-in2.h, libbfd.h: Rebuilt.
6244 * elf64-x86-64.c (x86_64_elf_howto): Fix size fields for 32-bit
6245 relocs. Add TLS relocs.
6246 (x86_64_reloc_map): Add TLS relocs.
6247 (elf64_x86_64_info_to_howto): Adjust for added TLS relocs.
6248 (struct elf64_x86_64_link_hash_entry): Add tls_type field.
6249 (GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD, GOT_TLS_IE): Define.
6250 (elf64_x86_64_hash_entry): Define.
6251 (struct elf64_x86_64_obj_tdata): New.
6252 (elf64_x86_64_tdata, elf64_x86_64_local_got_tls_type): Define.
6253 (struct elf64_x86_64_link_hash_table): Add tls_ld_got.
6254 (link_hash_newfunc): Initialize tls_type.
6255 (elf64_x86_64_link_hash_table_create): Initialize tls_ld_got.
6256 (elf64_x86_64_copy_indirect_symbol): Swap tls_type if necessary.
6257 (elf64_x86_64_mkobject): New.
6258 (elf64_x86_64_elf_object_p): Allocate struct elf64_x86_64_obj_tdata.
6259 (elf64_x86_64_tls_transition): New.
6260 (elf64_x86_64_check_relocs): Add r_type variable and use it.
6261 Handle TLS relocs.
6262 (elf64_x86_64_gc_sweep_hook): Handle TLS relocs.
6263 (allocate_dynrelocs): Allocate GOT space for TLS relocs.
6264 (elf64_x86_64_size_dynamic_sections): Likewise.
6265 (dtpoff_base, tpoff): New.
6266 (elf64_x86_64_relocate_section): Handle TLS relocs.
6267 (elf64_x86_64_finish_dynamic_symbol): Only handle non-TLS GOT
6268 entries.
6269 (bfd_elf64_mkobject): Define.
6270
6271 * elf32-i386.c (elf_i386_check_relocs) [R_386_TLS_LE]: Set
6272 DF_STATIC_TLS if shared.
6273
6274 2002-09-26 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6275
6276 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Don't emit unneeded
6277 empty relocation sections.
6278
6279 2002-09-26 Alan Modra <amodra@bigpond.net.au>
6280
6281 * elf64-ppc.c (ppc_build_one_stub): Don't build glink stubs here.
6282 (ppc64_elf_build_stubs): Build them here instead.
6283
6284 2002-09-24 Jakub Jelinek <jakub@redhat.com>
6285
6286 * elf32-sparc.c (elf32_sparc_relocate_section): Put R_SPARC_RELATIVE
6287 addend into r_addend, not *r_offset.
6288 (elf32_sparc_finish_dynamic_symbol): Likewise.
6289 * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Clear xword at
6290 R_SPARC_RELATIVE's r_offset.
6291
6292 2002-09-23 Nathan Tallent <eraxxon@alumni.rice.edu>
6293
6294 * dwarf2.c (decode_line_info): Update to correctly decode
6295 the (non-standard DWARF2) out-of-order address sequences
6296 generated by the Intel C++ 6.0 compiler for ia64-Linux.
6297
6298 2002-09-23 Mark Elbrecht <snowball3@softhome.net>
6299
6300 * config.bfd: For DJGPP targets, match with any cpu and any machine.
6301
6302 2002-09-23 Alan Modra <amodra@bigpond.net.au>
6303
6304 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Zero relocs
6305 for discarded FDEs. Remove redundant assignment.
6306 * elflink.h (elf_bfd_discard_info): Save edited relocs.
6307
6308 2002-09-22 H.J. Lu <hjl@gnu.org>
6309
6310 * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Don't merge
6311 the relocation count between different .reloc sections.
6312
6313 2002-09-21 Alan Modra <amodra@bigpond.net.au>
6314
6315 * elf32-ppc.c (ppc_elf_relocate_section): Allow ".sbss.*" and
6316 ".sdata.*" for R_PPC_SDAREL16, ".sbss2*" and ".sdata2*" for
6317 R_PPC_EMB_SDA2REL. Similarly for R_PPC_EMB_SDA21 and
6318 R_PPC_EMB_RELSDA.
6319
6320 * elfcode.h (elf_slurp_reloc_table_from_section): Make "symcount"
6321 unsigned. Move "symcount" assignment out of loop.
6322 * Makefile.am: Run "make dep-am".
6323 * Makefile.in: Regenerate.
6324 * configure: Regenerate.
6325 * po/SRC-POTFILES.in: Regnerate.
6326
6327 2002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
6328
6329 * dwarf2.c (_bfd_dwarf2_find_nearest_line): If address length is
6330 zero, set it to 8 for (non-standard) 64-bit DWARF2 formats
6331 (e.g. IRIX64).
6332
6333 2002-09-19 Jakub Jelinek <jakub@redhat.com>
6334
6335 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Clear .got word
6336 even if generating R_PPC_RELATIVE reloc.
6337 (ppc_elf_relocate_section): Make sure relocation is performed
6338 if skip == -2. Clear memory at r_offset when creating dynamic
6339 relocation.
6340
6341 2002-09-19 Jakub Jelinek <jakub@redhat.com>
6342
6343 * reloc.c (BFD_RELOC_386_TLS_TPOFF, BFD_RELOC_386_TLS_IE,
6344 BFD_RELOC_386_TLS_GOTIE): Add.
6345 * bfd-in2.h, libbfd.h: Rebuilt.
6346 * elf32-i386.c (elf_howto_table): Add R_386_TLS_TPOFF, R_386_TLS_IE
6347 and R_386_TLS_GOTIE.
6348 (elf_i386_reloc_type_lookup): Handle it.
6349 (struct elf_i386_link_hash_entry): Change tls_type type to unsigned
6350 char instead of enum, change GOT_* into defines.
6351 (GOT_TLS_IE_POS, GOT_TLS_IE_NEG, GOT_TLS_IE_BOTH): Define.
6352 (elf_i386_tls_transition): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
6353 (elf_i386_check_relocs): Likewise. Avoid crash if local symbol is
6354 accessed both as normal and TLS symbol. Move R_386_TLS_LDM and
6355 R_386_PLT32 cases so that R_386_TLS_IE can fall through.
6356 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
6357 (elf_i386_gc_sweep_hook): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
6358 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
6359 (allocate_dynrelocs): Allocate 2 .got and 2 .rel.got entries if
6360 tls_type is GOT_TLS_IE_BOTH.
6361 (elf_i386_size_dynamic_sections): Likewise.
6362 (elf_i386_relocate_section): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
6363 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
6364 (elf_i386_finish_dynamic_symbol): Use tls_type & GOT_TLS_IE to catch
6365 all 4 GOT_TLS_* TLS types.
6366
6367 2002-09-19 Nick Clifton <nickc@redhat.com>
6368
6369 * elflink.h (elf_fix_symbol_flags): When examining weak symbols,
6370 follow indirect links.
6371
6372 2002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
6373
6374 * ecoffswap.h (ecoff_swap_pdr_in) <isym, iline>: Update to
6375 correctly sign-extend 32-bit ECOFF null values (0xffffffff, -1)
6376 on 64 bit machines.
6377 (ecoff_swap_sym_in) <iss>: Likewise.
6378 * ecoff.c (_bfd_ecoff_slurp_symbolic_info): Fix error reading
6379 ECOFF information: 'ioptMax' refers to the actual *size*
6380 of the optimization symtab, not the number of entries.
6381
6382 2002-09-19 Daniel Jacobowitz <drow@mvista.com>
6383
6384 * elf32-arm.h (elf32_arm_adjust_dynamic_symbol): Update
6385 ELF_LINK_HASH_NEEDS_PLT logic.
6386
6387 2002-09-18 Daniel Jacobowitz <drow@mvista.com>
6388
6389 * elfcode.h (elf_slurp_reloc_table_from_section): Check
6390 correct relocation count.
6391
6392 2002-09-17 Daniel Jacobowitz <drow@mvista.com>
6393
6394 * bfd-in.h (bfd_get_dynamic_symcount): Define.
6395 * bfd.c (struct _bfd): Add dynsymcount.
6396 * bfd-in2.h: Regenerated.
6397 * elf.c (_bfd_elf_canonicalize_dynamic_symtab): Set
6398 abfd->dynsymcount.
6399 * elfcode.h (elf_slurp_reloc_table_from_section): Check
6400 for overflow.
6401
6402 2002-09-17 Stan Cox <scox@redhat.com>
6403
6404 * elf64-mips.c (mips_elf64_be_swap_reloca_out): Handle type2 and type3.
6405 (mips_elf64_final_gp): Don't make up gp value.
6406 * elfn32-mips.c (mips_elf_final_gp): Likewise.
6407 * elfxx-mips.c (_bfd_mips_elf_final_link): Always create
6408 .MIPS.options/.options section.
6409
6410 2002-09-17 David O'Brien <obrien@FreeBSD.org>
6411
6412 * elf32-i386-fbsd.c: Always label using the EI_OSABI method.
6413 It is benign for FreeBSD < 4.1. Minor reformatting.
6414 * elf64-alpha-fbsd.c: Likewise.
6415
6416 2002-09-17 Jakub Jelinek <jakub@redhat.com>
6417
6418 * elf32-i386.c (elf_i386_relocate_section) [R_386_TLS_TPOFF32]: Negate
6419 addend.
6420
6421 2002-09-17 Alan Modra <amodra@bigpond.net.au>
6422
6423 * elf64-alpha.c (alpha_elf_size_info): Make static.
6424
6425 2002-09-17 Svein E. Seldal <Svein.Seldal@solidas.com>
6426
6427 * coff-tic4x.c: Add function declarations and ATTRIBUTE_UNUSED.
6428 * cpu-tic4x.c: Ditto.
6429
6430 2002-09-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6431
6432 * elf64-mips.c (define elf_backend_ignore_discarded_relocs): Remove
6433 duplicate define.
6434
6435 2002-09-16 Bruno Haible <bruno@clisp.org>
6436
6437 * elf32-i386.c: Don't defined ELF_ARCH etc. if this file is included
6438 by a target variant implementation.
6439 * elf64-alpha.c: Likewise.
6440 * elf32-i386-fbsd.c: New file.
6441 * elf64-alpha-fbsd.c: New file.
6442 * targets.c: Support bfd_elf32_i386_freebsd_vec and
6443 bfd_elf64_alpha_freebsd_vec.
6444 * configure.in: Accept the vectors bfd_elf32_i386_freebsd_vec,
6445 bfd_elf64_alpha_freebsd_vec.
6446 * Makefile.am (BFD32_BACKENDS): Add elf32-i386-fbsd.lo.
6447 (BFD32_BACKENDS_CFILES): Add elf32-i386-fbsd.c.
6448 (BFD64_BACKENDS): Add elf64-alpha-fbsd.lo.
6449 (BFD64_BACKENDS_CFILES): Add elf64-alpha-fbsd.c.
6450 (elf32-i386-fbsd.lo, elf64-alpha-fbsd.lo): Add dependencies.
6451 * config.bfd: For FreeBSD targets, set targ_defvec to a FreeBSD
6452 specific targets. Define OLD_FREEBSD_ABI_LABEL if appropriate.
6453
6454 2002-09-12 Jakub Jelinek <jakub@redhat.com>
6455
6456 * elf32-i386.c (dtpoff_base, tpoff): Don't crash if tls_segment is
6457 NULL.
6458 (elf_i386_relocate_section): Return false after printing error about
6459 unresolvable relocation.
6460
6461 2002-09-12 Nick Clifton <nickc@redhat.com>
6462
6463 * elf32-arm.h (elf32_arm_final_link_relocate): Fix handling of
6464 R_ARM_THM_PC11.
6465
6466 2002-09-11 Jeffrey Law <law@redhat.com>
6467
6468 * elf32-h8300.c (elf32_h8_relax_section): Fix typo.
6469
6470 2002-09-11 Andrew Haley <aph@cambridge.redhat.com>
6471
6472 * elf.c (_bfd_elf_find_nearest_line): Check functionname_ptr and
6473 line_ptr before deciding we've found a symbol.
6474
6475 2002-09-11 Nick Clifton <nickc@redhat.com>
6476
6477 * po/da.po: New Danish translation file.
6478 * configure.in (LINGUAS): Add 'da'.
6479 * configure: Regenerate.
6480
6481 2002-09-10 Michael Snyder <msnyder@redhat.com>
6482
6483 * irix-core.c (do_sections, do_sections64): New functions.
6484 (irix_core_core_file_p): Call new functions do_sections,
6485 do_sections64, depending on corefile (32-bit or 64-bit).
6486
6487 2002-09-09 Richard Henderson <rth@redhat.com>
6488
6489 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21M
6490 and PCREL21F like PCREL21B.
6491
6492 2002-09-04 Kevin Buettner <kevinb@redhat.com>
6493
6494 * config.bfd (mips*-*-irix6*): Add new ABI vectors. Make n32 default
6495 vector.
6496
6497 2002-09-02 Nick Clifton <nickc@redhat.com>
6498
6499 * elf32-v850.c (v850_elf_final_link_relocate): Use helpful
6500 names instead of cryptically overloaded bfd_reloc error
6501 codes.
6502 (v850_elf_relocate_section): Likewise.
6503 (v850_elf_relax_section): Replace caching of external symbols
6504 with caching of internal symbols obtained from calling
6505 bfd_elf_get_elf_syms().
6506 Fixup problems with freeing cached allocated memory blocks.
6507
6508 2002-09-02 Alan Modra <amodra@bigpond.net.au>
6509
6510 * cpu-pj.c (scan_mach, compatible, arch_info_struct): Remove.
6511 (bfd_pj_arch): Use bfd_default_scan.
6512 * cpu-v850.c (scan): Remove.
6513 (N): Use bfd_default_scan.
6514 * cpu-z8k.c (scan_mach): Remove.
6515 (arch_info_struct, bfd_z8k_arch): Reorganize so that the default is
6516 first. Use bfd_default_scan.
6517
6518 * ecoff.c (_bfd_ecoff_set_arch_mach_hook): Don't use hard-coded
6519 bfd_mach constants.
6520 (ecoff_get_magic): Likewise.
6521 * elf32-v850.c (v850_elf_object_p): Likewise.
6522 (v850_elf_final_write_processing): Likewise.
6523 * mipsbsd.c (MY(set_arch_mach)): Likewise.
6524 (MY(write_object_contents)): Likewise.
6525 * coff64-rs6000.c (xcoff64_write_object_contents): Likewise.
6526 * coffcode.h (coff_write_object_contents): Likewise.
6527 (coff_set_arch_mach_hook): Add comment describing machine == 0.
6528 Remove unnecessary "machine" assignments.
6529 (coff_write_relocs): Test for the absolute section sym by testing
6530 section and flags.
6531
6532 * aoutx.h (NAME(aout,machine_type)): Recognize bfd_mach_i386_i386
6533 and bfd_mach_i386_i386_intel_syntax.
6534 * pdp11.c (NAME(aout,machine_type)): Likewise.
6535
6536 2002-08-30 John David Anglin <dave@hiauly1.hia.nrc.ca>
6537
6538 * bfd-in.h (align_power): Cast constants to bfd_vma type.
6539 * bfd-in2.h (align_power): Likewise.
6540
6541 2002-08-30 Alan Modra <amodra@bigpond.net.au>
6542
6543 * Makefile.am: Run "make dep-am".
6544 * Makefile.in: Regenerate.
6545
6546 * cpu-avr.c (compatible): Don't use hard-coded mach constants.
6547 * cpu-powerpc.c (powerpc_compatible): Likewise.
6548 * cpu-rs6000.c (rs6000_compatible): Likewise.
6549
6550 2002-08-28 Catherine Moore <clm@redhat.com>
6551
6552 * elf32-v850.c (v850_elf_reloc_map): Add new relocs.
6553 (v850-elf-reloc): Don't resolve pc relative relocs.
6554 (v850_elf_ignore_reloc): New routine.
6555 (v850_elf_final_link_relocate): Handle new relocs.
6556 (v850_elf_relax_delete_bytes ): New routine.
6557 (v850_elf_relax_section): New routine.
6558 (bfd_elf32_bfd_relax_section): Define.
6559 (HOWTO): New entries for new relocs.
6560 * reloc.c (BFD_RELOC_V850_LONGCALL): New reloc.
6561 (BFD_RELOC_V850_LONGJUMP): New reloc.
6562 (BFD_RELOC_V850_ALIGN): New reloc.
6563 * archures.c: Remove redundant v850ea architecture.
6564 * cpu-v850.c: Remove redundant v850ea support.
6565 * libbfd.h: Regenerate.
6566 * bfd-in2.h: Regenerated.
6567
6568 2002-08-28 Svein E. Seldal <Svein.Seldal@solidas.com>
6569
6570 * config.bfd: Add tic4x-*-*coff* and c4x-*-*coff* target.
6571 * configure.in: Add tic4x_coff vector files.
6572 * configure: Regenerate.
6573 * Makefile.am: Add tic4x target.
6574 * Makefile.in: Regenerate.
6575
6576 2002-08-27 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
6577
6578 * archures.c: Add the BFD arch type tic4x.
6579 * bfd-in.h: Add BFD_IN_MEMORY flag.
6580 * coff-tic4x.c: New file.
6581 * coffswap.h (coff_swap_sym_out): Add preadjuster.
6582 * cpu-tic4x.c: New file.
6583 * targets.c: Added tic4x- in list of xvecs.
6584 * ticoff.h: New file.
6585 * bfd-in2.h: Regenerate.
6586
6587 2002-08-27 Adam Nemet <anemet@lnxw.com>
6588
6589 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Set the last
6590 bit of DT_INIT and DT_FINI for Thumb functions.
6591
6592 2002-08-26 Alan Modra <amodra@bigpond.net.au>
6593
6594 * coffcode.h (coff_set_arch_mach_hook): Handle W65MAGIC.
6595
6596 2002-08-26 Alan Modra <amodra@bigpond.net.au>
6597
6598 * aoutx.h (NAME(aout,reloc_type_lookup)): Handle BFD_RELOC_8.
6599
6600 2002-08-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6601
6602 * elf32-sh.c (sh_elf_copy_indirect_symbol): New.
6603 (create_got_section, allocate_dynrelocs, readonly_dynrelocs):
6604 Likewise.
6605 (struct elf_sh_pcrel_relocs_copied): Removed.
6606 (struct elf_sh_dyn_relocs): New.
6607 (struct elf_sh_link_hash_entry): Replace pcrel_relocs_copied
6608 field with dyn_relocs.
6609 (struct elf_sh_link_hash_table): Add short-cuts to get dynamic
6610 sections and sym_sec.
6611 (sh_elf_link_hash_newfunc): Clear dyn_relocs.
6612 (sh_elf_link_hash_table_create): Clear shorts-cuts and sym_sec.
6613 (sh_elf_create_dynamic_sections): Use create_got_section instead
6614 of _bfd_elf_create_got_section.
6615 (sh_elf_check_relocs): Likewise.
6616 (sh_elf_create_dynamic_sections): Use short-cuts to the dynamic
6617 sections.
6618 (sh_elf_adjust_dynamic_symbol, sh_elf_size_dynamic_sections,
6619 sh_elf_relocate_section, sh_elf_check_relocs,
6620 sh_elf_finish_dynamic_symbol, sh_elf_finish_dynamic_sections):
6621 Likewise.
6622 (sh_elf_adjust_dynamic_symbol): Handle nocopyreloc. Keep the
6623 dynamic relocations and avoiding the copy relocation when we
6624 didn't find any dynamic relocations in the section which has
6625 contents or is read-only.
6626 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
6627 (sh_elf_size_dynamic_sections): Don't reset the size of
6628 .rela.got section even if dynamic_sections_created flag is off.
6629 Don't use sh_elf_discard_copies. Scan all input bfd and use
6630 allocate_dynrelocs. Call readonly_dynrelocs to determine
6631 whether we need DT_TEXTREL.
6632 (sh_elf_adjust_dynamic_symbol): Use plt.refcount to determine
6633 whether the symbol was never referred to.
6634 (sh_elf_relocate_section): Use WILL_CALL_FINISH_DYNAMIC_SYMBOL.
6635 (sh_elf_gc_sweep_hook): Fill with the real sweep function.
6636 (sh_elf_check_relocs): Call create_got_section if the short-cut
6637 to .got is null. Increment reference counters only instead of
6638 allocating space on dynamic sections here. Don't conditionalize
6639 uninitialized got.offset value when marking the symbol as a
6640 global offset table entry. Keep relocations for symbols satisfied
6641 by a dynamic library to avoid copy relocations for the symbol.
6642 Set dynobj field of an elf hash table if needed.
6643 (sh_elf_finish_dynamic_sections): Handle null section pointer
6644 correctly.
6645 (elf_backend_copy_indirect_symbol): Defined.
6646 (elf_backend_can_refcount): Defined.
6647
6648 2002-08-23 Nick Clifton <nickc@redhat.com>
6649
6650 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Undo
6651 previous change. Add comment explaining why.
6652
6653 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>
6654
6655 * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le): Copy
6656 contents of .got.plt[2] to tr0, not address of .got.plt.
6657 (sh_elf_finish_dynamic_symbol): Do not apply GOT_BIAS when
6658 patching absolute plt entry. For shmedia plt entry, set bottom bit
6659 of branch to plt0 as this is a branch to an shmedia instruction.
6660 * elf64-sh64.c (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le):
6661 Copy contents of .got.plt[2] to tr0, not address of .got.plt.
6662 (elf_sh64_plt_entry_be, elf_sh64_plt_entry_le): Use ptrel to
6663 branch to plt0.
6664 (sh64_elf64_finish_dynamic_symbol): Do not apply GOT_BIAS when
6665 patching absolute plt entry. For shmedia plt entry, branch to
6666 plt0 is now ptrel, so use relative offset. Set bottom bit of
6667 branch target as it is a branch to an shmedia instruction.
6668
6669 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>,
6670 Richard Shann <richard.shann@superh.com>
6671
6672 * elf32-sh.c (sh_elf_finish_dynamic_sections): Set LSB of DT_INIT
6673 value if .init is an SHmedia function. Similarly for DT_FINI.
6674 * elf64-sh64.c (sh64_elf64_finish_dynamic_sections): Likewise.
6675
6676 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>
6677
6678 * elf32-sh.c (sh_elf_size_dynamic_sections): Zero initialize
6679 dynamic section.
6680 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
6681
6682 2002-08-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6683
6684 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use a simple
6685 byte read when reading the return address register column.
6686
6687 2002-08-22 Nick Clifton <nickc@redhat.com>
6688
6689 * config.bfd: Add powepc64-*-*bsd* target.
6690
6691 2002-08-22 Graeme Peterson <gp@qnx.com>
6692
6693 * Makefile.am: Add entries for elf32-shqnx.c
6694 * Makefile.in: Regenerate.
6695 * config.bfd: Add support sh-*-nto* target.
6696 * configure.in: Add support for bfd_elf32_sh{l}qnx_vec.
6697 * configure: Regenerate.
6698 * elf32-qnx.h: Changed typo "elf_i386qnx_*" to "elf_qnx_*" .
6699 * elf32-sh.c: Do not include elf32-target.h if
6700 ELF32_SH_C_INCLUDED is defined.
6701 * elf32-shqnx.c: New file: Support for QNX.
6702 * targets.c: Add bfd_elf32_sh{l}qnx_vec.
6703
6704 2002-08-22 Nick Clifton <nickc@redhat.com>
6705
6706 * po/tr.po: Updated Turkish translation.
6707
6708 * syms.c (_bfd_generic_read_minisymbols): Set bfd_error if the
6709 symbols are not read.
6710
6711 2002-08-22 Alan Modra <amodra@bigpond.net.au>
6712
6713 * elf32-m68hc11.c: Formatting fixes.
6714 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
6715 * elf32-m68hc12.c: Formatting fixes.
6716 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
6717
6718 2002-08-22 Alan Modra <amodra@bigpond.net.au>
6719
6720 * coff-rs6000.c (rs6000coff_vec <object_flags>): Add SEC_CODE and
6721 SEC_DATA.
6722 (pmac_xcoff_vec): Likewise.
6723 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
6724 (aix5coff64_vec): Likewise.
6725
6726 2002-08-22 Alan Modra <amodra@bigpond.net.au>
6727
6728 * elf-bfd.h (struct elf_backend_data): Add struct elf_backend_data
6729 param to elf_backend_copy_indirect_symbol.
6730 (_bfd_elf_link_hash_copy_indirect): Likewise.
6731 * elflink.h (elf_add_default_symbol, elf_fix_symbol_flags): Adjust
6732 calls to copy_indirect_symbol.
6733 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
6734 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
6735 * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
6736 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
6737 * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
6738 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
6739 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
6740 * elfxx-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
6741 * elfxx-mips.h (_bfd_mips_elf_copy_indirect_symbol): Likewise.
6742 * elf.c (_bfd_elf_link_hash_copy_indirect): Likewise. Properly
6743 test refcounts for "used" values.
6744
6745 2002-08-21 John David Anglin <dave@hiauly1.hia.nrc.ca>
6746
6747 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Add PARAMS to
6748 argument declaration.
6749
6750 2002-08-19 Elena Zannoni <ezannoni@redhat.com>
6751
6752 * archures.c (bfd_mach_ppc_e500): Added.
6753 * bfd-in2.h: Rebuilt.
6754 * cpu-powerpc.c (bfd_powerpc_archs): Added e500.
6755
6756 2002-08-19 Alan Modra <amodra@bigpond.net.au>
6757
6758 * elf32-m68hc12.c (elf_backend_can_gc_sections): False.
6759
6760 2002-08-17 Andrew Cagney <ac131313@redhat.com>
6761
6762 * elf.c (bfd_elf_get_elf_syms): Change type of `esym' to
6763 `bfd_byte'.
6764
6765 2002-08-17 Stan Cox <scox@redhat.com>
6766
6767 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Use the
6768 IRIX 6 segment layout for NEWABI.
6769
6770 2002-08-16 Stephen Clarke <stephen.clarke@superh.com>
6771
6772 * elf32-sh.c (sh_elf_gc_mark_hook): For sh64, skip indirect
6773 symbols when looking for section referred to by a relocation.
6774 * elf64-sh.c (sh_elf64_gc_mark_hook): Likewise.
6775
6776 2002-08-15 Alan Modra <amodra@bigpond.net.au>
6777
6778 * elf32-i370.c: Move reloc enum to include/elf/i370.h.
6779
6780 2002-08-15 Hans-Peter Nilsson <hp@axis.com>
6781
6782 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Add
6783 missing check for whether the symbol is referenced by DSO before
6784 unexporting it as an unneeded dynamic symbol.
6785
6786 2002-08-14 H.J. Lu <hjl@gnu.org>
6787
6788 * libbfd.h: Regenerate.
6789
6790 2002-08-14 H.J. Lu <hjl@gnu.org>
6791
6792 * config.bfd: Always add 64bit vectors to 32bit Linux/mips.
6793
6794 2002-08-14 Stephane Carrez <stcarrez@nerim.fr>
6795
6796 * elf32-m68hc11.c (m68hc11_relax_group): New to relax group of
6797 instructions.
6798 (m68hc11_direct_relax): New to define table of relaxable instructions.
6799 (find_relaxable_insn): New, find a relaxable insn.
6800 (compare_reloc): New to compare two relocs.
6801 (m68hc11_elf_relax_section): New, relax text sections.
6802 (m68hc11_elf_relax_delete_bytes): New, delete bytes and adjust branchs.
6803 (elf32_m68hc11_check_relocs): New function for GC support.
6804 (elf32_m68hc11_relocate_section): New function for GC support.
6805 (bfd_elf32_bfd_relax_section): Define to support linker relaxation.
6806 (elf_backend_check_relocs): Likewise.
6807 (elf_backend_relocate_section): Likewise.
6808
6809 2002-08-13 H.J. Lu <hjl@gnu.org>
6810
6811 * elflink.h (NAME(bfd_elf,size_dynamic_sections): Don't count
6812 definitions in shared objects when checking symbol with
6813 undefined version.
6814
6815 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6816
6817 * elf32-m68hc11.c (elf32_m68hc11_gc_mark_hook): New for section GC.
6818 (elf32_m68hc11_gc_sweep_hook): Likewise.
6819 (elf_backend_gc_mark_hook): Define for GC section support.
6820 (elf_backend_gc_sweep_hook): Likewise.
6821 (elf_backend_can_gc_sections): Likewise.
6822
6823 * elf32-m68hc12.c: Likewise.
6824
6825 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6826
6827 * elf32-m68hc11.c (_bfd_m68hc11_elf_print_private_bfd_data): New.
6828 (_bfd_m68hc11_elf_merge_private_bfd_data): New function.
6829 (_bfd_m68hc11_elf_set_private_flags): New function.
6830 Use them to set/check/print ELF flags specific to 68HC11.
6831
6832 * elf32-m68hc12.c (_bfd_m68hc12_elf_print_private_bfd_data): New.
6833 (_bfd_m68hc12_elf_merge_private_bfd_data): New function.
6834 (_bfd_m68hc12_elf_set_private_flags): New function.
6835 Use them to set/check/print ELF flags specific to 68HC12.
6836
6837 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6838
6839 * elf32-m68hc11.c (elf_m68hc11_howto_table): Add the new relocs;
6840 fix masks for PC-rel relocs.
6841 (m68hc11_elf_ignore_reloc): New function.
6842
6843 * elf32-m68hc12.c (m68hc12_elf_special_reloc): New to handle specific
6844 68HC12 banked addressing relocs.
6845 (m68hc12_phys_addr): New to compute physical address of banked memory.
6846 (m68hc12_phys_page): Likewise for page.
6847 (m68hc12_addr_is_banked): New to see if address is in banked area.
6848 (elf_m68hc12_howto_table): Add new relocs and rename to xx12.
6849
6850 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6851
6852 * reloc.c (BFD_RELOC_M68HC11_RL_JUMP, BFD_RELOC_M68HC11_RL_GROUP,
6853 BFD_RELOC_M68HC11_LO16, BFD_RELOC_M68HC11_PAGE,
6854 BFD_RELOC_M68HC11_24): New relocs for 68HC11/68HC12.
6855 * bfd-in2.h: Regenerate.
6856
6857 2002-08-12 H.J. Lu <hjl@gnu.org>
6858
6859 * elflink.h (elf_add_default_symbol): Preserve section across
6860 elf_merge_symbol.
6861
6862 2002-08-09 Graeme Peterson <gp@qnx.com>
6863
6864 * Makefile.am: Add entries for elf32-ppcqnx.c, and add
6865 elf32-qnx.h dependency to elfarmqnx-nabi.c and elf32-i386qnx.c.
6866 * Makefile.in: Regenerate.
6867 * config.bfd: Add support for powerpc{le}-*-nto targets.
6868 * configure.in: Add support for bfd_elf32_powerpc{le}qnx_vec.
6869 * configure: Regenerate.
6870 * elf32-i386qnx.c: Moved backend functions into a QNX specific
6871 common file "elf32-qnx.h", and now include that file.
6872 * elf32-qnx.h: New file: QNX specific common elf backend.
6873 * elf32-ppc.c: Do not include elf32-target.h if
6874 ELF32_PPC_C_INCLUDED is defined.
6875 * elf32-ppcqnx.c: New file: Support for QNX.
6876 * elfarmqnx-nabi.c: Include elf32-qnx.h for qnx elf backend.
6877 * targets.c: Add bfd_elf32_powerpc{le}qnx_vec.
6878
6879 2002-08-09 Nick Clifton <nickc@redhat.com>
6880
6881 * po/sv.po: Updated Swedish translation.
6882
6883 2002-08-09 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6884
6885 * elfxx-mips.c (mips_elf_global_got_index): Avoid segfault if
6886 g->global_gotsym is NULL.
6887
6888 2002-08-08 H.J. Lu <hjl@gnu.org>
6889
6890 * elflink.h (elf_add_default_symbol): Don't warn if a definition
6891 overrides an indirect versioned symbol.
6892
6893 2002-08-08 Jakub Jelinek <jakub@redhat.com>
6894
6895 * elf32-i386.c (elf_i386_relocate_section): Fill in proper addend
6896 for R_386_TLS_TPOFF32 relocs against symndx 0.
6897
6898 2002-08-07 H.J. Lu <hjl@gnu.org>
6899
6900 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Check symbol
6901 with undefined version if needed.
6902 (elf_link_assign_sym_version): Match a default symbol with a
6903 version without definition. No need to hide the default
6904 definition separately.
6905
6906 2002-08-08 Alan Modra <amodra@bigpond.net.au>
6907
6908 * elflink.h (elf_link_output_extsym): Don't output symbols from
6909 SEC_EXCLUDE sections.
6910
6911 * aoutx.h (aout_link_write_symbols): Correct handling of warning syms.
6912
6913 2002-08-07 Alan Modra <amodra@bigpond.net.au>
6914
6915 * elf64-ppc.c (edit_opd): Arrange to drop symbols for discarded .opd
6916 entries.
6917
6918 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6919
6920 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Cast signedness
6921 mismatch.
6922
6923 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6924
6925 * elfxx-mips.c (ABI_64_P): Remove superfluous check.
6926
6927 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6928
6929 * elf32-mips.c (mips_reloc_map): Fix typo.
6930
6931 2002-08-06 Alan Modra <amodra@bigpond.net.au>
6932
6933 * xcofflink.c (xcoff_write_global_symbol): Set n_scnum for abs_section.
6934
6935 2002-08-06 Alan Modra <amodra@bigpond.net.au>
6936
6937 * elf64-ppc.c (ppc64_elf_howto_raw): Zero all src_mask entries.
6938
6939 2002-08-06 Alan Modra <amodra@bigpond.net.au>
6940
6941 * libxcoff.h: Use PARAMS on function declarations.
6942 * coff-rs6000.c (xcoff_generate_rtinit): Simplify size calc.
6943 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
6944
6945 * coff-rs6000.c: (xcoff_rtype2howto): Don't place reloc address in
6946 addend.
6947 * coff64-rs6000.c: (xcoff64_rtype2howto): Likewise.
6948
6949 2002-08-06 Alan Modra <amodra@bigpond.net.au>
6950
6951 * coff-rs6000.c: Formatting fixes.
6952 (xcoff_calculate_relocation): Use PARAMS in declaration.
6953 (xcoff_complain_overflow): Likewise.
6954 (xcoff_ppc_relocate_section): Use old-style function pointer call.
6955 (bfd_xcoff_backend_data): Remove useless comments.
6956 (rs6000coff_vec): Likewise.
6957 (bfd_pmac_xcoff_backend_data): Likewise.
6958 (pmac_xcoff_vec): Likewise.
6959
6960 * coff64-rs6000.c: Formatting fixes.
6961 (xcoff64_calculate_relocation): Use PARAMS in declaration.
6962 (xcoff64_ppc_relocate_section): Use old-style function pointer call.
6963 (bfd_xcoff_backend_data): Remove useless comments.
6964 (rs6000coff64_vec): Likewise.
6965 (bfd_xcoff_aix5_backend_data): Likewise.
6966 (aix5coff64_vec): Likewise.
6967
6968 2002-08-06 Alan Modra <amodra@bigpond.net.au>
6969
6970 * coff-rs6000.c (xcoff_howto_table): Revert some of last change to
6971 mask entries. Use complain_overflow_dont for R_REF.
6972 (xcoff_reloc_type_ba): Revert last change.
6973 (xcoff_reloc_type_br): Likewise.
6974 (xcoff_reloc_type_crel): Likewise.
6975 (xcoff_ppc_relocate_section): Likewise.
6976 * coff64-rs6000.c (xcoff64_reloc_type_br): Likewise.
6977 (xcoff64_ppc_relocate_section): Likewise.
6978 (xcoff64_howto_table): Revert some of last change to mask entries.
6979 Use complain_overflow_dont for R_REF.
6980
6981 * coff-rs6000.c (xcoff_howto_table): Fix src_mask entries. Make all
6982 relocs with bitsize == 16 have size = 1.
6983 (xcoff_reloc_type_ba): Correct src_mask and dst_mask adjustment.
6984 (xcoff_reloc_type_br): Likewise.
6985 (xcoff_reloc_type_crel): Likewise.
6986 (xcoff_ppc_relocate_section): Set up src_mask and dst_mask correctly.
6987 * coff64-rs6000.c (xcoff64_reloc_type_br): Correct src_mask and
6988 dst_mask adjustment.
6989 (xcoff64_ppc_relocate_section): Set up src_mask and dst_mask correctly.
6990 (xcoff64_howto_table): Fix src_mask entries. Make all relocs with
6991 bitsize == 16 have size = 1.
6992
6993 2002-08-01 Denis Chertykov <denisc@overta.ru>
6994
6995 * elf32-ip2k.c: Processor manufacturer changed to Ubicom.
6996 (struct misc): New field isymbuf. All free_* fields removed.
6997 (symbol_value): Pass in internal syms. No need to swap syms in.
6998 (ip2k_elf_relax_section): Use bfd_elf_get_elf_syms. Properly free
6999 possibly cached info.
7000 (tidyup_after_error): Removed.
7001 (ip2k_elf_relax_section_pass1): Don't use removed fields of struct
7002 misc. Use new field.
7003 (adjust_all_relocations): Use internal syms. No need to swap syms
7004 in and out.
7005 (add_page_insn): Don't use removed fields of struct misc.
7006
7007 2002-08-01 Nick Clifton <nickc@redhat.com>
7008
7009 * elf32-arm.h: Revert previous delta.
7010
7011 2002-08-01 Nick Clifton <nickc@redhat.com>
7012
7013 * configure.in (AM_INIT_AUTOMAKE): Bump version number.
7014 * configure: Regenerate.
7015
7016 2002-07-31 H.J. Lu <hjl@gnu.org>
7017
7018 * config.bfd: Add x86-64 vector to Linux/i386 if 64bit BFD is
7019 selected.
7020
7021 2002-07-31 H.J. Lu <hjl@gnu.org>
7022
7023 * config.bfd: Add n32 vectors to 32bit Linux/mips if 64bit BFD
7024 is selected.
7025
7026 2002-07-31 Jakub Jelinek <jakub@redhat.com>
7027
7028 * elf32-i386.c (elf_i386_copy_indirect_symbol): Swap tls_type
7029 if _bfd_elf_link_hash_copy_indirect will swap got.refcount.
7030
7031 2002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
7032
7033 * cpu-ns32k.c (_bfd_ns32k_put_immdeiate, _bfd_ns32k_get_immediate):
7034 There is no 8 byte relocation type for this architecture.
7035 (do_ns32k_reloc): Use bfd_vma instead of native types.
7036 (bfd_ns32k_put_immediate, _bfd_ns32k_relocate_contents) put_data
7037 returns void.
7038 (_bfd_ns32k_put_displacement): Don't check for overflow. We can
7039 rely on generic code to do that.
7040 * aout-ns32k.c (howto_table): Add appropriate overflow detection
7041 to all table entries.
7042 (_bfd_ns32k_relocate_contents): put_data returns void.
7043 * ns32k.h: (_bfd_ns32k_put_displacement, _bfd_ns32k_put_immediate)
7044 (_bfd_do_ns32k_reloc_contents): Fix prototypes. put data functions
7045 return void.
7046
7047 2002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
7048
7049 * aoutx.h (aout_link_check_ar_symbols): Whether to include an
7050 archive object is target dependant.
7051
7052 2002-07-31 Adam Nemet <anemet@lnxw.com>
7053
7054 * elf32-arm.h (ARM_PLT_ENTRY_SIZE): Rename PLT_ENTRY_SIZE.
7055 (THUMB_PLT_ENTRY_SIZE): New macro.
7056 (PLT_ENTRY_SIZE): Return the appropriate *_PLT_ENTRY_SIZE.
7057 (elf32_arm_plt0_entry): Rename PLT_ENTRY_SIZE to
7058 ARM_PLT_ENTRY_SIZE.
7059 (elf32_arm_plt_entry): Likewise.
7060 (elf_backend_plt_header_size): Likewise.
7061 (elf32_thumb_plt0_entry): New global.
7062 (elf32_arm_finish_dynamic_sections): Use it. Put Thumb entries
7063 into .plt.thumb.
7064 (elf32_thumb_plt_entry): New global.
7065 (elf32_arm_finish_dynamic_symbol): Use it. Use .thumb.plt for
7066 Thumb entries. Set the bottom bit of the corresponding GOT entry
7067 for a Thumb PLT entry.
7068 (struct elf32_arm_plt_entry_info): New structure.
7069 (struct elf32_arm_link_hash_entry, plt_info): New member of this
7070 type.
7071 (elf32_arm_link_hash_newfunc): Initialize new member.
7072 (elf32_arm_final_link_relocate, R_ARM_THM_PC22 case): Handle
7073 relocations against the PLT.
7074 (elf32_arm_check_relocs, case R_ARM_PLT32 case): Set
7075 first_rel_type if this is the first time we encounter the symbol.
7076 (elf32_arm_check_relocs, case R_ARM_THM_PC22 case): New case.
7077 Determine if relocation needs a PLT entry. Set first_rel_type if
7078 this is the first time we encounter the symbol
7079 (elf32_arm_adjust_dynamic_symbol): Create PLT entries for Thumb
7080 functions as well.
7081 (elf32_arm_size_dynamic_sections): Handle .plt.thumb like .plt.
7082 (elf32_arm_create_dynamic_sections): New function. Create the
7083 .plt.thumb section.
7084 (elf_backend_create_dynamic_sections): Call it.
7085
7086 2002-07-31 Nick Clifton <nickc@redhat.com>
7087
7088 * bfd.c (bfd_alt_mach_code): Rename parameter 'index' to
7089 'alternative' in order to avoid shadowing global symbol of the
7090 same name.
7091 * bfd-in2.h: Regenerate.
7092 * libbfd.h: Regenerate.
7093 * libcoff.h: Regenerate.
7094
7095 2002-07-31 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7096
7097 * Makefile.am: Add n32 ABI support.
7098 * Makefile.in: Regenerate.
7099 * config.bfd: Add n32 vectors to mips64*-*-linux* targets. Treat 64
7100 bit vectors for mips*-*-linux targets as optional.
7101 * configure.in: Add n32 ABI vectors.
7102 * configure: Regenerate.
7103 * elf32-mips.c (mips_elf32_object_p): Reject n32 ABI files.
7104 * elfn32-mips.c: New file, n32 ABI support.
7105 * targets.c: Add n32 ABI vectors.
7106
7107 2002-07-30 Graeme Peterson <gp@qnx.com>
7108
7109 * elfarmqnx-nabi.c: New file: Support for QNX.
7110 * config.bfd: Add support for arm-*-nto target.
7111 * configure.in: Add support for bfd_elf32_{big|little}armqnx_vec.
7112 * configure: Regenerate.
7113 * Makefile.am: Add entries for elfarmqnx-nabi.c.
7114 * Makefile.in: Regenerate.
7115 * elf32-arm.h (ELF_MAXPAGESIZE): Do not define if already defined.
7116 Do not define global function if ELFARM_NABI_C_INCLUDED is defined.
7117 * elfarm-nabi.c: Do not include elf32-arm.h if
7118 ELFARM_NABI_C_INCLUDED is defined.
7119 * targets.c: Add bfd_elf32_{big|little}armqnx_vec.
7120
7121 2002-07-30 Nick Clifton <nickc@redhat.com>
7122
7123 * po/sv.po: Updated Swedish translation.
7124
7125 2002-07-30 Jakub Jelinek <jakub@redhat.com>
7126
7127 * elf.c (elf_fake_sections): Fix up .tbss sh_size and sh_type.
7128
7129 2002-07-30 Alan Modra <amodra@bigpond.net.au>
7130
7131 * aoutx.h (some_aout_object_p): Clean up tdata properly on error.
7132 * archive.c (bfd_generic_archive_p): Likewise.
7133 * coff-rs6000.c (_bfd_xcoff_archive_p): Likewise.
7134 (_bfd_xcoff_archive_p): Use bfd_scan_vma in place of strtol.
7135 * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
7136 (xcoff64_archive_p): Likewise.
7137 (xcoff64_openr_next_archived_file): Likewise.
7138 (xcoff64_archive_p): Clean up tdata properly on error.
7139 * coffgen.c (coff_real_object_p): Likewise.
7140 (coff_object_p): Release filehdr and opthdr.
7141 * ecoff.c (_bfd_ecoff_archive_p): Clean up tdata properly on error.
7142 * ieee.c (ieee_archive_p): Likewise.
7143 * ihex.c (ihex_object_p): Likewise.
7144 (ihex_mkobject): Always allocate tdata.
7145 * peicode.h (pe_ILF_object_p): Release bfd_alloc'd buffer on error.
7146 * srec.c (srec_mkobject): Always allocate tdata.
7147 (srec_object_p): Clean up tdata properly on error.
7148 (symbolsrec_object_p): Likewise.
7149 * versados.c (versados_object_p): Likewise.
7150 * vms-misc.c (_bfd_vms_get_record): Use bfd_malloc instead of malloc,
7151 and bfd_realloc instead of realloc.
7152 (add_new_contents): Use bfd_alloc instead of bfd_malloc for sections.
7153 * vms.c (vms_initialize): Always allocate tdata. Use bfd_alloc in
7154 place of bfd_malloc, simplifying error freeing. Free hash table too.
7155 (vms_object_p): Clean up tdata on error.
7156 (vms_mkobject): Don't complain on stderr if vms_initialize fails.
7157 (vms_close_and_cleanup): Adjust for bfd_alloc use.
7158
7159 2002-07-30 Alan Modra <amodra@bigpond.net.au>
7160
7161 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set e_flags.
7162
7163 2002-07-26 Chris Demetriou <cgd@broadcom.com>
7164
7165 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Merge ASE
7166 flags into resulting BFD.
7167
7168 2002-07-26 Alan Modra <amodra@bigpond.net.au>
7169
7170 From John Reiser <jreiser@BitWagon.com>
7171 * elf32-i386.c (elf_i386_link_hash_table_create): Clear
7172 tls_ldm_got.refcount.
7173
7174 2002-07-25 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7175
7176 * elf64-mips.c: Update TODO comment.
7177 (mips_elf64_higher_reloc,mips_elf64_highest_reloc,
7178 mips_elf64_gprel16_reloca): Remove prototypes.
7179 (mips16_jump_reloc,mips16_gprel_reloc): Add functions.
7180 (UNUSED_RELOC): Replace by EMPTY_RELOC.
7181 (mips_elf64_howto_table_rel): Use special R_MIPS_HI16 handling. Remove
7182 wrong comments. Remove disfunctional support of R_MIPS_HIGHER and
7183 R_MIPS_HIGHEST.
7184 (mips_elf64_howto_table_rela): Fix handling of R_MIPS_GPREL16 and
7185 R_MIPS_GOT16. Remove wrong comments.
7186 (elf_mips16_jump_howto,elf_mips16_gprel_howto,
7187 elf_mips_gnu_vtinherit_howto,elf_mips_gnu_vtentry_howto): New, code
7188 from elf32-mips.c.
7189 (mips_elf64_hi16_reloc): Fix formatting.
7190 (mips_elf64_higher_reloc,mips_elf64_highest_reloc): Remove.
7191 (mips_elf64_got16_reloc): Fix formatting. Remove superfluous code.
7192 Better comment. Fall back to R_MIPS_GOT_DISP instead of abort().
7193 (mips_elf64_gprel16_reloc): Make static. Add check for
7194 partial_inplace.
7195 (mips_elf64_gprel16_reloca): Remove.
7196 (mips_elf64_literal_reloc): New function.
7197 (mips_elf64_gprel32_reloc): Fix formatting.
7198 (mips_elf64_shift6_reloc): Fix comment. Make static.
7199 (mips16_jump_reloc,mips16_gprel_reloc): New functions, code from
7200 elf32-mips.c.
7201 (elf_reloc_map,mips_reloc_map): New mapping table, similiar as in
7202 elf32-mips.c
7203 (bfd_elf64_bfd_reloc_type_lookup): Use the mapping table. Enable GNU
7204 specific relocations.
7205 (mips_elf64_rtype_to_howto): Enable GNU specific relocations.
7206 (mips_elf64_object_p): Invert logic to check for SGI-ish ABI.
7207 (ELF_MAXPAGESIZE): Add comment.
7208
7209 2002-07-25 Nick Clifton <nickc@redhat.com>
7210
7211 * po/sv.po: Updated Swedish translation.
7212 * po/es.po: Updated Spanish translation.
7213 * po/fr.po: Updated French translation.
7214
7215 2002-07-25 Alan Modra <amodra@bigpond.net.au>
7216
7217 * elf-bfd.h (_bfd_elf32_link_record_local_dynamic_symbol): Define
7218 as elf_link_record_local_dynamic_symbol.
7219 (_bfd_elf64_link_record_local_dynamic_symbol): Likewise.
7220 (elf_link_record_local_dynamic_symbol): Declare. Now returns int.
7221 * elflink.h (elf_link_record_local_dynamic_symbol): Move to..
7222 * elflink.c: .. here. Use bfd_elf_get_elf_syms. Check whether an
7223 attempt is made to record a symbol in a discarded section, and
7224 return `2' in that case.
7225
7226 2002-07-24 Nick Clifton <nickc@redhat.com>
7227
7228 * po/sv.po: Updated Swedish translation.
7229 * po/es.po: Updated Spanish translation.
7230
7231 2002-07-23 Alan Modra <amodra@bigpond.net.au>
7232
7233 * po/SRC-POTFILES.in: Regenerate.
7234
7235 * elf-hppa.h (elf_hppa_relocate_section): If relocatable, return
7236 immediately. Remove code handling relocatable linking.
7237 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
7238 * elf32-cris.c (cris_elf_relocate_section): Likewise.
7239 * elf32-fr30.c (elf32_frv_relocate_section): Likewise.
7240 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
7241 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
7242 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
7243 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
7244 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
7245 * elf32-v850.c (v850_elf_relocate_section): Likewise.
7246 * elf32-vax.c (elf_vax_relocate_section): Likewise.
7247 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7248 * elf32-avr.c (elf_backend_rela_normal): Define.
7249 * elf32-cris.c: Likewise.
7250 * elf32-fr30.c: Likewise.
7251 * elf32-frv.c: Likewise.
7252 * elf32-h8300.c: Likewise.
7253 * elf32-hppa.c: Likewise.
7254 * elf32-ip2k.c: Likewise.
7255 * elf32-sparc.c: Likewise.
7256 * elf32-v850.c: Likewise.
7257 * elf32-vax.c: Likewise.
7258 * elf64-hppa.c: Likewise.
7259 * elf64-sparc.c: Likewise.
7260 * elf32-fr30.c (elf32_frv_relocate_section): Edit comment.
7261 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
7262 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
7263 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
7264 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
7265 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
7266 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
7267 * elf-m10200.c (USE_RELA): Don't define.
7268 * elf-m10300.c: Likewise.
7269 * elfarm-oabi.c: Likewise.
7270 * elf32-i370.c: Likewise.
7271 * elf32-ip2k.c: Likewise.
7272 * elf32-m68k.c: Likewise.
7273 * elf32-mcore.c: Likewise.
7274 * elf32-ppc.c: Likewise.
7275 * elf32-s390.c: Likewise.
7276 * elf32-vax.c: Likewise.
7277 * elf64-ppc.c: Likewise.
7278 * elf64-s390.c: Likewise.
7279 * elf64-x86-64.c: Likewise.
7280 * elfxx-ia64.c: Likewise.
7281 * elf32-avr.c (USE_REL): Don't undef.
7282 * elf32-ip2k.c: Likewise.
7283
7284 2002-07-23 Nick Clifton <nickc@redhat.com>
7285
7286 * elf-bfd.h (struct elf_backend_data): Add new bitfield
7287 'want_p_paddr_set_to_zero'.
7288 * elfxx-target.h: Set default value for want_p_paddr_set_to_zero
7289 to false;
7290 * elfxx-ia64.c: Set want_p_paddr_set_zero for HPUX target.
7291 * elf.c (copy_private_bfd_data): Test want_p_paddr_set_zero.
7292
7293 2002-07-23 Gabor Keresztfalvi <keresztg@mail.com>
7294
7295 * nlmcode.h (nlm_swap_auxiliary_headers_out): Swapped the order of
7296 the MeSsAgEs and CoPyRiGhT tags to make >=NW4.x NLM loaders to
7297 show the Copyright string.
7298 Minor formatting tidy ups.
7299
7300 2002-07-23 Nick Clifton <nickc@redhat.com>
7301
7302 * po/fr.po: Updated French translation.
7303 * po/sv.po: Updated Swedish translation.
7304
7305 2002-07-23 Alan Modra <amodra@bigpond.net.au>
7306
7307 * elflink.h (elf_link_input_bfd): Don't change internal symbols
7308 when outputting relocs.
7309
7310 2002-07-20 Jason Thorpe <thorpej@wasabisystems.com>
7311
7312 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only insert
7313 DT_PLTGOT into the dynamic section if there is a PLT.
7314
7315 2002-07-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7316
7317 * elfxx-mips.c (_bfd_mips_elf_discard_info): New function, code from
7318 elf32-mips.c.
7319 (_bfd_mips_elf_write_section): Likewise.
7320 * elfxx-mips.h (_bfd_mips_elf_discard_info): New prototype.
7321 (_bfd_mips_elf_write_section): Likewise.
7322 * elf32-mips.c (elf32_mips_discard_info): Move to elfxx-mips.c.
7323 (elf32_mips_write_section): Likewise.
7324 * elf64-mips.c (_bfd_mips_elf_ignore_discarded_relocs): Use it.
7325 (_bfd_mips_elf_write_section): Likewise.
7326
7327 2002-07-19 Alan Modra <amodra@bigpond.net.au>
7328
7329 * elfxx-ia64.c: (elfNN_ia64_modify_segment_map): Properly scan
7330 PT_IA_64_UNWIND segments for a given section.
7331
7332 2002-07-17 H.J. Lu <hjl@gnu.org>
7333
7334 * Makefile.am: Fix a typo.
7335 * Makefile.in: Regenerate.
7336
7337 2002-07-15 Denis Chertykov <denisc@overta.ru>
7338 Frank Ch. Eigler <fche@redhat.com>
7339 Ben Elliston <bje@redhat.com>
7340 Alan Lehotsky <alehotsky@cygnus.com>
7341 John Healy <jhealy@redhat.com>
7342 Graham Stott <grahams@redhat.com>
7343 Jeff Johnston <jjohnstn@redhat.com>
7344
7345 * Makefile.am: Add support for ip2k.
7346 * Makefile.in: Regenerate.
7347 * doc/Makefile.in: Regenerate.
7348 * archures.c: Add support for ip2k.
7349 * config.bfd: Add support for ip2k.
7350 * configure.in: Add support for ip2k.
7351 * configure: Regenerate.
7352 * reloc.c: Add support for ip2k.
7353 * targets.c: Add support for ip2k.
7354 * bfd-in2.h: Regenerate.
7355 * libbfd.h: Regenerate.
7356 * cpu-ip2k.c: New file.
7357 * elf32-ip2k.c: New file.
7358
7359 2002-07-17 Ian Rickards <irickard@arm.com>
7360
7361 * dwarf2.c (concat_filename): If we can't establish the directory
7362 just return the filename.
7363
7364 2002-07-16 Moritz Jodeit <moritz@jodeit.org>
7365
7366 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Correct order of memset args.
7367
7368 2002-07-16 Alan Modra <amodra@bigpond.net.au>
7369
7370 * elflink.h: Formatting fixes, tidy prototypes.
7371 (elf_link_assign_sym_version): Move common code out of loop.
7372
7373 2002-07-16 Alan Modra <amodra@bigpond.net.au>
7374
7375 * elflink.h (elf_link_input_bfd): Don't call reloc_emitter when
7376 reloc section size is zero. Correct reloc output location.
7377
7378 2002-07-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
7379
7380 * elf-hppa.h (elf_hppa_reloc_final_type): Use R_PARISC_PCREL16F as
7381 the final type for the e_fsel selector when generating PA2.0W code.
7382 (elf_hppa_relocate_insn): Provide support for PA2.0W 16-bit format 1
7383 relocations.
7384
7385 2002-07-14 H.J. Lu <hjl@gnu.org>
7386
7387 * elflink.h (elf_link_assign_sym_version): Hide the default
7388 definition if there is a hidden versioned definition.
7389
7390 2002-07-12 Hans-Peter Nilsson <hp@axis.com>
7391
7392 * elf32-cris.c (cris_elf_relocate_section): Drop nonsensical
7393 dynamic reference test in assertion when initializing GOT with
7394 static contents. Just assert that there are either no dynamic
7395 sections, the symbol is defined in the regular objects or that the
7396 symbol is undef weak. Tweak comment.
7397 (elf_cris_finish_dynamic_symbol): Emit .got reloc for a program
7398 only if the symbol isn't defined in the program and isn't undef
7399 weak.
7400 (elf_cris_adjust_dynamic_symbol): Simplify condition for getting
7401 rid of PLT entry: only do it if the symbol isn't defined in a DSO.
7402 When doing so, clear ELF_LINK_HASH_NEEDS_PLT. Tweak comments.
7403 (elf_cris_discard_excess_program_dynamics): Don't consider
7404 ELF_LINK_HASH_REF_DYNAMIC when omitting .got runtime relocs.
7405
7406 2002-07-11 Alan Modra <amodra@bigpond.net.au>
7407
7408 * elf32-i386.c (elf_i386_relocate_section): Don't complain about
7409 unresolved debugging relocs in dynamic applications.
7410 * elf32-s390.c (elf_s390_relocate_section): Likewise.
7411 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
7412 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
7413 * elf64-s390.c (elf_s390_relocate_section): Likewise.
7414 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7415 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
7416
7417 2002-07-10 Alan Modra <amodra@bigpond.net.au>
7418
7419 * elf64-ppc.c (ONES): Define.
7420 (ppc64_elf_howto_table): Use ONES here to avoid warnings. Fill in
7421 missing src_mask fields. Tweak R_PPC64_NONE, R_PPC64_COPY. Fill
7422 in missing dst_mask fields on R_PPC64_PLT32, R_PPC64_PLTREL32.
7423
7424 * elf64-ppc.c (ppc64_elf_get_symbol_info): Delete.
7425 (ppc64_elf_set_private_flags): Delete.
7426 (ppc64_elf_section_from_shdr): Delete.
7427 (ppc64_elf_merge_private_bfd_data): Remove flag checking/merging code.
7428 (ppc64_elf_fake_sections): Delete.
7429 (bfd_elf64_bfd_set_private_flags): Don't define.
7430 (bfd_elf64_get_symbol_info): Likewise.
7431 (elf_backend_section_from_shdr): Likewise.
7432 (elf_backend_fake_sections): Likewise.
7433
7434 2002-07-10 Marco Walther <Marco.Walther@sun.com>
7435
7436 * elf.c: (assign_section_numbers) Set sh_entsize for .stab only
7437 when not already set.
7438 * elf64-sparc.c: (sparc64_elf_fake_sections): New function.
7439 (elf_backend_fake_sections): Define.
7440
7441 2002-07-10 Alan Modra <amodra@bigpond.net.au>
7442
7443 * merge.c (_bfd_merge_section): Remove redundant output_section check.
7444 Formatting.
7445 (_bfd_merge_sections): Don't set SEC_EXCLUDE on unused sections.
7446
7447 2002-07-09 Hans-Peter Nilsson <hp@axis.com>
7448
7449 * elf32-cris.c (cris_elf_relocate_section): Move sanity-check for
7450 NULL sym_hashes to just before use.
7451 <case R_CRIS_32_GOTREL>: In test for local symbol, accept also
7452 symbol with non-default visibility.
7453 <case R_CRIS_32_GOTREL, case R_CRIS_32_PLT_GOTREL>: Ditto.
7454 <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
7455 Ditto.
7456 (cris_elf_gc_sweep_hook): Only decrease h->plt.refcount for
7457 symbol with non-default visibility.
7458 (cris_elf_check_relocs): At tests for local symbol before
7459 increasing h->plt.refcount, also check for non-default
7460 visibility. Ditto when checking for local symbol to eliminate
7461 pc-relative runtime relocs.
7462
7463 2002-07-08 Alan Modra <amodra@bigpond.net.au>
7464
7465 * elf.c: Formatting.
7466 (IS_SOLARIS_PT_INTERP): Add p_paddr and p_memsz checks.
7467 (INCLUDE_SECTION_IN_SEGMENT): Remove IS_SOLARIS_PT_INTERP.
7468 (copy_private_bfd_data): Set p_vaddr on broken Solaris PT_INTERP
7469 segments.
7470
7471 2002-07-07 Mark Mitchell <mark@codesourcery.com>
7472 Alan Modra <amodra@bigpond.net.au>
7473
7474 * cofflink.c (_bfd_coff_final_link): On PE COFF systems, take into
7475 account the impact of relocation count overflow when computing
7476 section offsets.
7477 * coffcode.h (coff_write_relocs): Use obj_pe when deciding whether
7478 or not to apply the PE COFF reloc overflow handling. Fix a
7479 fencepost error in deciding whether or not to use that technique.
7480
7481 2002-07-07 Alan Modra <amodra@bigpond.net.au>
7482
7483 * elf-bfd.h (struct elf_reloc_cookie): Remove locsym_shndx,
7484 change type of locsyms.
7485 (bfd_elf_get_elf_syms): Declare.
7486 * elf.c (bfd_elf_get_elf_syms): New function.
7487 (group_signature): Use bfd_elf_get_elf_syms.
7488 (bfd_section_from_r_symndx): Likewise.
7489 * elfcode.h (elf_slurp_symbol_table): Likewise.
7490 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
7491 (elf_link_add_object_symbols): Likewise. Reorganise to increase
7492 locality of various data structures. Properly free internal relocs.
7493 (elf_bfd_final_link): Properly free internal relocs.
7494 (elf_link_check_versioned_symbol): Use bfd_elf_get_elf_syms.
7495 (elf_link_input_bfd): Likewise.
7496 (elf_gc_mark): Likewise. Properly free internal relocs.
7497 (elf_gc_sweep): Properly free internal relocs.
7498 (elf_reloc_symbol_deleted_p): No need to swap syms in.
7499 (elf_bfd_discard_info): Use bfd_elf_get_elf_syms. Properly free
7500 internal relocs.
7501 * elf-m10200.c (mn10200_elf_relax_section): Use bfd_elf_get_elf_syms.
7502 Properly free possibly cached info.
7503 (mn10200_elf_relax_delete_bytes): Remove symbol swapping code.
7504 (mn10200_elf_symbol_address_p): Pass in internal syms. Remove
7505 symbol swapping code.
7506 (mn10200_elf_get_relocated_section_contents): Use bfd_elf_get_elf_syms.
7507 Properly free possibly cached info.
7508 * elf-m10300.c (mn10300_elf_relax_section): As above for elf-m10200.c.
7509 (mn10300_elf_relax_delete_bytes): Likewise.
7510 (mn10300_elf_symbol_address_p): Likewise.
7511 (mn10300_elf_get_relocated_section_contents): Likewise.
7512 * elf32-h8300.c (elf32_h8_relax_section): As above for elf-m10200.c.
7513 (elf32_h8_relax_delete_bytes): Likewise.
7514 (elf32_h8_symbol_address_p): Likewise.
7515 (elf32_h8_get_relocated_section_contents): Likewise.
7516 * elf32-m32r.c (m32r_elf_relax_section): As above for elf-m10200.c.
7517 (m32r_elf_relax_delete_bytes): Likewise.
7518 (m32r_elf_get_relocated_section_contents): Likewise.
7519 * elf32-sh.c (sh_elf_reloc_loop): Free section contents using
7520 elf_section_data to determine whether cached.
7521 (sh_elf_relax_section): As above for elf-m10200.c.
7522 (sh_elf_relax_delete_bytes): Likewise.
7523 (sh_elf_get_relocated_section_contents): Likewise.
7524 * elf32-xstormy16.c (xstormy16_elf_relax_section): As above.
7525 * elf64-alpha.c (elf64_alpha_relax_section): As above. Also delay
7526 reading of local syms.
7527 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
7528 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): As above.
7529 * elfxx-ia64.c (elfNN_ia64_relax_section): As above.
7530 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Properly free internal
7531 relocs.
7532 * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Properly
7533 free internal relocs and section contents. Don't read symbols.
7534 * elf32-hppa.c (get_local_syms): Use bfd_elf_get_elf_syms.
7535 (elf32_hppa_size_stubs): Don't free local syms.
7536 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Delay
7537 reading of local syms. Use bfd_elf_get_elf_syms. Properly free
7538 possibly cached info.
7539 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
7540 * elf64-hppa.c (elf64_hppa_check_relocs): Use bfd_elf_get_elf_syms.
7541 * elf64-ppc.c (struct ppc_link_hash_table): Delete bfd_count and
7542 all_local_syms.
7543 (get_local_syms): Delete function.
7544 (edit_opd): Use bfd_elf_get_elf_syms. Free on error exit. Cache
7545 on exit.
7546 (ppc64_elf_size_stubs): Use bfd_elf_get_elf_syms. Free/cache on exit.
7547
7548 2002-07-05 Jim Wilson <wilson@redhat.com>
7549
7550 * syms.c (decode_section_type): New.
7551 (bfd_decode_symclass): Call decode_section_type.
7552
7553 2002-07-04 Jakub Jelinek <jakub@redhat.com>
7554
7555 * merge.c (_bfd_merged_section_offset): Avoid accessing byte before
7556 section content start.
7557 Reported by Michael Schumacher <mike@hightec-rt.com>.
7558
7559 2002-07-04 Alan Modra <amodra@bigpond.net.au>
7560
7561 * section.c (_bfd_strip_section_from_output): Remove unnecessary
7562 link order code. Don't actually remove the output section here;
7563 Just set a flag for the linker to do so.
7564 * elflink.c (_bfd_elf_link_renumber_dynsyms): Test for removed
7565 sections when setting up output section dynsyms.
7566
7567 2002-07-04 Alan Modra <amodra@bigpond.net.au>
7568
7569 * elflink.h (elf_link_add_object_symbols): Revert 1999-09-02 hpux
7570 fudge.
7571 * elf.c (bfd_section_from_shdr): Work around broken hpux shared
7572 libs here instead.
7573
7574 2002-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
7575
7576 * elf64-s390.c (create_got_section): Set .got section alignment to
7577 8 bytes.
7578 (elf_s390_check_relocs): Set .rela.dyn section alignment to 8 bytes.
7579
7580 2002-07-02 Alan Modra <amodra@bigpond.net.au>
7581
7582 * elf.c (_bfd_elf_reloc_type_class): Fix comment grammar.
7583
7584 2002-07-01 Matt Thomas <matt@3am-software.com>
7585
7586 * elf32-vax.c (elf32_vax_print_private_bfd_data): Change EF_*
7587 to EF_VAX_*.
7588
7589 2002-07-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7590
7591 * elfxx-mips.c (ABI_64_P): Fix comment.
7592 (MIPS_ELF_OPTIONS_SECTION_NAME,MIPS_ELF_STUB_SECTION_NAME): Use the
7593 new section names for N64 ABI.
7594 (mips_elf_output_extsym): No special _gp_disp handling for NewABI.
7595 (mips_elf_calculate_relocation): Code formatting.
7596 (mips_elf_create_dynamic_relocation): Likewise.
7597 (_bfd_mips_elf_fake_sections): IRIX6 needs this hack, too.
7598 (_bfd_mips_elf_size_dynamic_sections): Handle GOT_PAGE for any NewABI.
7599 (_bfd_mips_elf_relocate_section): No special handling for R_MIPS_64
7600 in any NewABI.
7601 (_bfd_mips_elf_finish_dynamic_symbol): No special _gp_disp handling
7602 for NewABI.
7603 (_bfd_mips_elf_modify_segment_map): Handle any N64 ABI.
7604 (_bfd_mips_elf_gc_sweep_hook): NewABI GOT relocs should be handled
7605 here, too.
7606
7607 2002-07-01 Andreas Schwab <schwab@suse.de>
7608
7609 * elf64-x86-64.c (elf64_x86_64_relocate_section): Only convert
7610 R_X86_64_64 to R_X86_64_RELATIVE.
7611
7612 2002-07-01 John David Anglin <dave@hiauly1.hia.nrc.ca>
7613
7614 * vaxbsd.c: New BFD backend for VAX BSD and Ultrix.
7615 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Add new backend.
7616 Run "make dep-am".
7617 * config.bfd (vax-*-bsd* | vax-*-ultrix*): Use vaxbsd_vec instead of
7618 host_aout_vec.
7619 * configure.in (vaxbsd_vec): Add.
7620 * targets.c (vaxbsd_vec): Add.
7621 * Makefile.in: Rebuild.
7622 * configure: Rebuild.
7623 * po/SRC-POTFILES.in: Rebuild.
7624
7625 2002-07-01 Alan Modra <amodra@bigpond.net.au>
7626
7627 * elflink.h (elf_gc_mark): Pass in the section whose relocs we are
7628 examining to gc_mark_hook, rather than the bfd.
7629 (elf_gc_sections): Adjust.
7630 * elf-bfd.h (struct elf_backend_data <gc_mark_hook>): Likewise.
7631 * elf-m10300.c (mn10300_elf_gc_mark_hook): Likewise.
7632 * elf32-arm.h (elf32_arm_gc_mark_hook): Likewise.
7633 * elf32-avr.c (elf32_avr_gc_mark_hook): Likewise.
7634 * elf32-cris.c (cris_elf_gc_mark_hook): Likewise.
7635 * elf32-d10v.c (elf32_d10v_gc_mark_hook): Likewise.
7636 * elf32-fr30.c (fr30_elf_gc_mark_hook): Likewise.
7637 * elf32-hppa.c (elf32_hppa_gc_mark_hook): Likewise.
7638 * elf32-i386.c (elf_i386_gc_mark_hook): Likewise.
7639 * elf32-m32r.c (m32r_elf_gc_mark_hook): Likewise.
7640 * elf32-m68k.c (elf_m68k_gc_mark_hook): Likewise.
7641 * elf32-mcore.c (mcore_elf_gc_mark_hook): Likewise.
7642 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Likewise.
7643 * elf32-ppc.c (ppc_elf_gc_mark_hook): Likewise.
7644 * elf32-s390.c (elf_s390_gc_mark_hook): Likewise.
7645 * elf32-sh.c (sh_elf_gc_mark_hook): Likewise.
7646 * elf32-sparc.c (elf32_sparc_gc_mark_hook): Likewise.
7647 * elf32-v850.c (v850_elf_gc_mark_hook): Likewise.
7648 * elf32-vax.c (elf_vax_gc_mark_hook): Likewise.
7649 * elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Likewise.
7650 * elf64-mmix.c (mmix_elf_gc_mark_hook): Likewise.
7651 * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
7652 * elf64-s390.c (elf_s390_gc_mark_hook): Likewise.
7653 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
7654 * elfxx-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise.
7655 * elfxx-mips.h (_bfd_mips_elf_gc_mark_hook): Likewise.
7656 * elf64-x86-64.c (elf64_x86_64_gc_mark_hook): Likewise.
7657 * elf32-frv.c (elf32_frv_gc_mark_hook): Likewise. Also remove
7658 redundant local sym tests.
7659 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_entry.
7660 (link_hash_newfunc): Init is_entry.
7661 (ppc64_elf_copy_indirect_symbol): Copy is_entry.
7662 (ppc64_elf_link_hash_table_create): Init all_local_syms.
7663 (create_linkage_sections): Use bfd_make_section_anyway rather than
7664 bfd_make_section.
7665 (ppc64_elf_mark_entry_syms): New function.
7666 (ppc64_elf_check_relocs): Don't bother testing elf_bad_symtab. Set
7667 up opd entry to function section map.
7668 (ppc64_elf_gc_mark_hook): Special case opd section relocs, and
7669 relocs that reference the opd section.
7670 (edit_opd): New function.
7671 (ppc64_elf_size_dynamic_sections): Call get_local_syms and edit_opd.
7672 (ppc64_elf_setup_section_lists): Don't calculate htab->bfd_count here.
7673 (get_local_syms): Do so here. Exit if we already have local syms.
7674 Remove bogus comment imported from elf32-hppa.c. Don't attempt to
7675 read local syms on non-ELF input.
7676 (ppc64_elf_size_stubs): Call _bfd_elf64_link_read_relocs rather
7677 than duplicating it's function here. Adjust free of internal
7678 relocs to suit.
7679 (ppc64_elf_relocate_section): Adjust local syms in opd section.
7680 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Declare.
7681 * elf32-hppa.c (elf32_hppa_size_stubs): Call
7682 _bfd_elf32_link_read_relocs rather than duplicating it's function
7683 here. Adjust free of internal relocs to suit.
7684
7685 2002-07-01 Andreas Jaeger <aj@suse.de>
7686
7687 * elf64-x86-64.c (elf64_x86_64_check_relocs): Certain relocations
7688 are not allowed in shared libs code, enforce -fPIC.
7689
7690 2002-06-29 Hans-Peter Nilsson <hp@bitrange.com>
7691
7692 * mmo.c (mmo_write_loc_chunk): Don't eliminate leading and
7693 trailing zero-sequences when there's previous left-over data.
7694
7695 2002-06-27 John David Anglin <dave@hiauly1.hia.nrc.ca>
7696
7697 * elf64-hppa.c (elf64_hppa_reloc_type_class): New function.
7698 (elf64_hppa_finish_dynamic_sections): Check other_rel_sec, dlt_rel_sec
7699 and opd_rel_sec in order for starting rela section. Check _raw_size.
7700 (elf_backend_reloc_type_class): Define.
7701
7702 2002-06-27 Kevin Buettner <kevinb@redhat.com>
7703
7704 * dwarf2.c (decode_line_info): Handle older, non-standard, 64-bit
7705 DWARF2 formats.
7706
7707 2002-06-27 Alan Modra <amodra@bigpond.net.au>
7708
7709 * cpu-powerpc.c: Comment on ordering of arch_info.
7710 * elf32-ppc.c (ppc_elf_object_p): New function.
7711 (elf_backend_object_p): Define.
7712 * elf64-ppc.c (ppc64_elf_object_p): New function.
7713 (elf_backend_object_p): Define.
7714
7715 2002-06-26 Jason Thorpe <thorpej@wasabisystems.com>
7716
7717 * configure.in (vax-*-netbsd*): Set COREFILE to netbsd-core.lo.
7718 * configure: Regenerate.
7719
7720 2002-06-25 Jason Eckhardt <jle@rice.edu>
7721
7722 * dwarf2.c (decode_line_info): Check unit->addr_size
7723 to read in the proper number of prologue bytes.
7724
7725 2002-06-25 Nick Clifton <nickc@cambridge.redhat.com>
7726
7727 * config.bfd (powerpc-*-aix5*): Only create a selvecs for
7728 aix5coff64_vec if 64-bit bfd support has been enabled.
7729 (powerpc64-*-aix5*): Only define if 64-bit bfd support has
7730 been enabled.
7731
7732 * targets.c (_bfd_target_vector[]): Only include
7733 aix5coff64_vec if 64-bit bfd support has been enabled.
7734
7735 2002-06-25 Alan Modra <amodra@bigpond.net.au>
7736
7737 * elf64-ppc.c (ppc_add_stub): Replace strcpy/strncpy with memcpy.
7738 * elf32-hppa.c (hppa_add_stub): Likewise.
7739 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
7740 * elflink.h (elf_add_default_symbol): Fix comment typo.
7741 (elf_add_default_symbol): Replace strcpy and strncpy with memcpy.
7742 (elf_link_add_object_symbols): Likewise.
7743 (elf_link_assign_sym_version): Likewise.
7744 * hash.c (bfd_hash_lookup): Likewise.
7745 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
7746 * section.c (bfd_get_unique_section_name): Likewise.
7747 * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
7748 * elf.c (_bfd_elf_make_section_from_phdr): Likewise.
7749 (assign_section_numbers): Likewise.
7750 (_bfd_elfcore_make_pseudosection): Likewise.
7751 (elfcore_grok_lwpstatus): Likewise.
7752 (elfcore_grok_win32pstatus): Likewise.
7753 (elfcore_write_note): Constify input params. Use PTR instead of
7754 void *. Include terminating NUL in namesz. Correct padding.
7755 Support NULL "name" param. Use memcpy instead of strcpy.
7756 (elfcore_write_prpsinfo): Constify input params.
7757 (elfcore_write_prstatus): Likewise. Use PTR instead of void *.
7758 (elfcore_write_lwpstatus): Likewise.
7759 (elfcore_write_pstatus): Likewise.
7760 (elfcore_write_prfpreg): Likewise.
7761 (elfcore_write_prxfpreg): Likewise.
7762 * elf-bfd.h (elfcore_write_note): Update declaration.
7763 (elfcore_write_prpsinfo): Likewise.
7764 (elfcore_write_prstatus): Likewise.
7765 (elfcore_write_pstatus): Likewise.
7766 (elfcore_write_prfpreg): Likewise.
7767 (elfcore_write_prxfpreg): Likewise.
7768 (elfcore_write_lwpstatus): Likewise.
7769
7770 2002-06-25 Jason Eckhardt <jle@rice.edu>
7771
7772 * ecoff.c (ecoff_set_symbol_info): Set BSF_FUNCTION for
7773 symbols of type stProc and stStaticProc.
7774
7775 2002-06-25 Nick Clifton <nickc@redhat.com>
7776
7777 * ecoff.c: VArious formatting fixes.
7778
7779 2002-06-25 Alan Modra <amodra@bigpond.net.au>
7780
7781 * coff-rs6000.c (xcoff_generate_rtinit): Fix typo.
7782
7783 2002-06-25 Alan Modra <amodra@bigpond.net.au>
7784
7785 * aout-adobe.c: Don't compare against "true" or "false.
7786 * aout-target.h: Likewise.
7787 * aoutx.h: Likewise.
7788 * archive.c: Likewise.
7789 * bout.c: Likewise.
7790 * cache.c: Likewise.
7791 * coff-a29k.c: Likewise.
7792 * coff-alpha.c: Likewise.
7793 * coff-i386.c: Likewise.
7794 * coff-mips.c: Likewise.
7795 * coff-or32.c: Likewise.
7796 * coff64-rs6000.c: Likewise.
7797 * coffcode.h: Likewise.
7798 * coffgen.c: Likewise.
7799 * cpu-ns32k.c: Likewise.
7800 * ecoff.c: Likewise.
7801 * ecofflink.c: Likewise.
7802 * elf.c: Likewise.
7803 * elf32-arm.h: Likewise.
7804 * elf32-cris.c: Likewise.
7805 * elf32-d30v.c: Likewise.
7806 * elf32-i386.c: Likewise.
7807 * elf32-mcore.c: Likewise.
7808 * elf32-ppc.c: Likewise.
7809 * elf32-sh.c: Likewise.
7810 * elf32-sh64.c: Likewise.
7811 * elf32-v850.c: Likewise.
7812 * elf64-alpha.c: Likewise.
7813 * elf64-sh64.c: Likewise.
7814 * elfcode.h: Likewise.
7815 * elfcore.h: Likewise.
7816 * elflink.h: Likewise.
7817 * elfxx-mips.c: Likewise.
7818 * i386os9k.c: Likewise.
7819 * ieee.c: Likewise.
7820 * libbfd.c: Likewise.
7821 * linker.c: Likewise.
7822 * mmo.c: Likewise.
7823 * nlm32-alpha.c: Likewise.
7824 * nlm32-i386.c: Likewise.
7825 * nlm32-ppc.c: Likewise.
7826 * nlm32-sparc.c: Likewise.
7827 * nlmcode.h: Likewise.
7828 * oasys.c: Likewise.
7829 * pdp11.c: Likewise.
7830 * peicode.h: Likewise.
7831 * reloc.c: Likewise.
7832 * som.c: Likewise.
7833 * srec.c: Likewise.
7834 * tekhex.c: Likewise.
7835 * vms.c: Likewise.
7836 * xcofflink.c: Likewise.
7837 * elf64-sparc.c: Edit comment to not use "== false".
7838
7839 * aoutf1.h: Don't use "? true : false".
7840 * ecoff.c: Likewise.
7841 * format.c: Likewise.
7842 * ieee.c: Likewise.
7843 * linker.c: Likewise.
7844 * mmo.c: Likewise.
7845 * oasys.c: Likewise.
7846
7847 2002-06-23 H.J. Lu <hjl@gnu.org>
7848
7849 * elflink.h (elf_link_add_archive_symbols): For the default
7850 version, check references with only one `@' first.
7851
7852 2002-06-23 John David Anglin <dave@hiauly1.hia.nrc.ca>
7853
7854 * elf64-hppa.c (elf64_hppa_mark_milli_and_exported_functions): New
7855 function.
7856 (allocate_global_data_dlt): Don't add millicode symbols to dynamic
7857 symbol table.
7858 (allocate_global_data_opd, allocate_dynrel_entries): Likewise.
7859 (elf64_hppa_size_dynamic_sections): Revise to use
7860 elf64_hppa_mark_milli_and_exported_functions.
7861 (elf64_hppa_finish_dynamic_symbol): Remove code to keep millicode
7862 symbols out of dynamic symbol table.
7863
7864 2002-06-23 Alan Modra <amodra@bigpond.net.au>
7865
7866 * Makefile.in: Regenerate.
7867 * libbfd.h: Regenerate.
7868 * bfd-in2.h: Regenerate.
7869 * configure: Regenerate.
7870 * po/SRC-POTFILES.in: Regenerate.
7871
7872 * elflink.h: Comment typo fixes.
7873
7874 2002-06-23 H.J. Lu <hjl@gnu.org>
7875
7876 * elf-bfd.h (elf_link_loaded_list): New structure.
7877 (elf_link_hash_table): Add "loaded".
7878 * elf.c (_bfd_elf_link_hash_table_init): Initialize "loaded".
7879 * elflink.h (elf_link_check_versioned_symbol): New function.
7880 (elf_link_output_extsym): Call elf_link_check_versioned_symbol.
7881
7882 2002-06-19 Nick Clifton <nickc@cambridge.redhat.com>
7883
7884 * elflink.h (size_dynamic_sections): If the target does not
7885 support an ELF style hash table, return true, indicating that
7886 nothing needed to be done, rather than false, indicating that the
7887 section's size could not be computed.
7888
7889 2002-06-18 Dave Brolley <brolley@redhat.com>
7890
7891 From Catherine Moore, Michael Meissner, Dave Brolley:
7892 * po/SRC-POTFILES.in: Add cpu-frv.c and elf32-frv.c
7893 * targets.c: Support bfd_elf32_frv_vec.
7894 * reloc.c: Add FRV relocs.
7895 * configure.in: Add support for bfd-elf32-frv-vec.
7896 * config.bfd (targ_cpu): Add support for frv-*-elf.
7897 * archures.c: Add frv arch and machines.
7898 * Makefile.am (ALL_MACHINES): Add cpu-frv.lo.
7899 (ALL_MACHINES_CFILES): Add cpu-frv.c.
7900 (BFD32_BACKENDS): Add elf32-frv.lo.
7901 (BFD32_BACKENDS_CFILES): Add elf32-frv.c
7902 (cpu-frv.lo): New target.
7903 (elf32-frv.lo): New target.
7904 * cpu-frv.c: New file.
7905 * elf32-frv.c: New file.
7906
7907 2002-06-18 Jakub Jelinek <jakub@redhat.com>
7908
7909 * elfcode.h (elf_object_p): Sanity check eh_shoff == 0 implies
7910 e_shnum == 0.
7911 Only read the first section header if e_shoff is non-zero.
7912 Don't consider e_shstrndx if there are no sections.
7913
7914 2002-06-17 Tom Rix <trix@redhat.com>
7915
7916 * elf32-d10v.c (elf_d10v_howto_table): Change R_D10V_10_PCREL_R,
7917 R_D10V_10_PCREL_L and R_D10V_18_PCREL to use
7918 complain_overflow_bitfield.
7919
7920 2002-06-17 Alan Modra <amodra@bigpond.net.au>
7921
7922 * opncls.c (bfd_openr): Remove redundant bfd_set_error.
7923 (bfd_fdopenr): Likewise.
7924 (bfd_openstreamr): Likewise.
7925 (bfd_openw): Likewise.
7926
7927 * targets.c: Sort target vecs.
7928 (_bfd_target_vector): Add aix5coff64_vec, bfd_elf32_sh64_vec,
7929 bfd_elf32_sh64l_vec, bfd_elf32_sh64lnbsd_vec,
7930 bfd_elf32_sh64nbsd_vec, bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec,
7931 bfd_elf64_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec.
7932 * configure.in: Sort target vecs. Add m88kmach3_vec.
7933 * configure: Regenerate.
7934
7935 2002-06-16 Hans-Peter Nilsson <hp@bitrange.com>
7936
7937 * elf64-mmix.c (bpo_reloc_request_sort_fn): Use member
7938 bpo_reloc_no to break sort order ties, not address of items.
7939
7940 2002-06-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
7941
7942 * elf-hppa.h (elf_hppa_final_link): Fix formatting in comment.
7943 Skip excluded sections in determing __gp value.
7944 (elf_hppa_final_link_relocate): Use the symbol's address in
7945 R_PARISC_FPTR64 relocations that don't need an opd entry.
7946 * elf64-hppa.c (allocate_dynrel_entries): Simplify code.
7947 (elf64_hppa_finalize_dynreloc): Likewise.
7948 (elf64_hppa_size_dynamic_sections): Move comments and fix typo.
7949 (elf64_hppa_finish_dynamic_symbol): Break up assert.
7950
7951 2002-06-14 Sergey Grigoriev <serge@leopold.Physik.Uni-Augsburg.DE>
7952
7953 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
7954 alignment for .bss, .data and .text sections so that sse and sse2
7955 code will work.
7956 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
7957
7958 2002-06013 J"orn Rennecke <joern.rennecke@superh.com>
7959
7960 config.bfd: Add support for sh[1234]l*-*-elf* | sh3el*-*-elf*,
7961 sh[1234]*-elf*.
7962
7963 2002-06-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
7964
7965 * elflink.h (elf_bfd_final_link): Improve error handling for missing
7966 dynamic sections.
7967
7968 * elf64-hppa.c (allocate_global_data_opd): We don't need an opd entry
7969 for a symbol that has no output section.
7970 (allocate_dynrel_entries): Correct comment.
7971 (elf64_hppa_finalize_dynreloc): Likewise. Don't create an opd entry
7972 unless we want one.
7973 (elf64_hppa_finalize_opd): Prevent segfault if dyn_h is NULL.
7974 (elf64_hppa_finalize_dlt): Likewise. Prevent segfault for symbols
7975 with no section. Remove unnecessary parentheses.
7976
7977 2002-06-11 Tom Rix <trix@redhat.com>
7978
7979 * coffcode.h (coff_compute_section_file_positions): Add data
7980 section to AIX loader alignment check.
7981
7982 * coff-rs6000.c (_bfd_xcoff_mkobject): Set default text section
7983 alignment to 4 bytes.
7984 (_bfd_xcoff_copy_private_bfd_data): Use text and data alignment
7985 power accessor macro.
7986 (do_shared_object_padding): Remove invalid assertion.
7987
7988 2002-06-10 Richard Sandiford <rsandifo@redhat.com>
7989
7990 * section.c (_bfd_strip_section_from_output): Set SEC_EXCLUDE
7991 for removed output sections.
7992
7993 2002-06-10 Geoffrey Keating <geoffk@redhat.com>
7994
7995 * merge.c (merge_strings): Use htab_create_alloc with calloc, not
7996 htab_alloc.
7997 * elf-strtab.c (_bfd_elf_strtab_finalize): Likewise.
7998
7999 2002-06-08 H.J. Lu <hjl@gnu.org>
8000
8001 * elf.c (copy_private_bfd_data): Don't cast to bfd_size_type to
8002 work around a long long bug in gcc 2.96 on mips.
8003
8004 2002-06-08 Jason Thorpe <thorpej@wasabisystems.com>
8005
8006 * Makefile.am (BFD32_BACKENDS): Add vax1knetbsd.lo.
8007 (BFD32_BACKENDS_CFILES): Add vax1knetbsd.c.
8008 Regenerate dependency lists.
8009 * Makefile.in: Regenerate.
8010 * config.bfd (vax-*-netbsdelf*, vax-*-netbsdaout*): Add
8011 vax1knetbsd_vec to targ_selvecs.
8012 * configure.in: Add vax1knetbsd_vec.
8013 * configure: Regenerate.
8014 * targets.c (_bfd_target_vector): Add vax1knetbsd_vec.
8015 * vax1knetbsd.c: New file.
8016 * vaxnetbsd.c: Update copyright years.
8017 (TARGET_PAGE_SIZE): Set to 0x1000.
8018 (DEFAULT_MID): Set to M_VAX4K_NETBSD.
8019
8020 2002-06-08 Matt Thomas <matt@3am-software.com>
8021
8022 * libaout.h (enum machine_type): Add M_VAX4K_NETBSD.
8023
8024 2002-06-08 Alan Modra <amodra@bigpond.net.au>
8025
8026 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Make static.
8027
8028 2002-06-08 Alan Modra <amodra@bigpond.net.au>
8029
8030 * Makefile.am: Run "make dep-am".
8031 * Makefile.in: Regenerate.
8032
8033 * armnetbsd.c: Replace CONST with const.
8034 * corefile.c: Likewise.
8035 * elf32-dlx.c: Likewise.
8036 * elf64-mips.c: Likewise.
8037 * mmo.c: Likewise.
8038 * ns32knetbsd.c: Likewise.
8039
8040 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Check the hash
8041 table is elf64-sparc.
8042
8043 2002-06-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8044
8045 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Simplify code.
8046 Fix RELA addends to get not shifted in the result. Don't do special
8047 handling of R_MIPS_64 for NewABI.
8048
8049 2002-06-07 Alan Modra <amodra@bigpond.net.au>
8050
8051 * aoutx.h (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
8052 (NAME(aout,slurp_reloc_table)): Likewise.
8053 * coff-mips.c (mips_relax_section): Use bfd_zalloc.
8054 * coff-rs6000.c (xcoff_write_armap_big): Use bfd_zmalloc.
8055 (xcoff_write_archive_contents_big): Likewise.
8056 (xcoff_generate_rtinit): Likewise.
8057 (xcoff_generate_rtinit): Likewise, and check error return.
8058 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
8059 * coffgen.c (coff_section_symbol): Use bfd_zalloc.
8060 (coff_get_normalized_symtab): Likewise.
8061 (coff_make_empty_symbol): Likewise.
8062 (bfd_coff_set_symbol_class): Likewise.
8063 * cofflink.c (coff_link_add_symbols): Likewise.
8064 * ecoff.c (_bfd_ecoff_make_empty_symbol): Likewise.
8065 * ecofflink.c (ecoff_write_shuffle): Use bfd_zmalloc.
8066 (bfd_ecoff_write_accumulated_debug): Likewise.
8067 * elf64-alpha.c (get_got_entry): Use bfd_zalloc.
8068 * i386linux.c (bfd_i386linux_size_dynamic_sections): Likewise.
8069 * i386lynx.c (NAME(lynx,slurp_reloc_table)): Use bfd_zmalloc.
8070 * ieee.c (do_with_relocs): Use bfd_zalloc.
8071 * m68klinux.c (bfd_m68klinux_size_dynamic_sections): Likewise.
8072 * pdp11.c (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
8073 (NAME(aout,slurp_reloc_table)): Likewise.
8074 (NAME(aout,squirt_out_relocs)): Don't memset when zalloc'd.
8075 * reloc16.c (bfd_coff_reloc16_relax_section): Use bfd_zmalloc.
8076 * som.c (som_build_and_write_symbol_table): Likewise.
8077 (som_slurp_string_table): Likewise.
8078 (som_slurp_symbol_table): Likewise.
8079 (som_bfd_ar_write_symbol_stuff): Likewise.
8080 * sparclinux.c (bfd_sparclinux_size_dynamic_sections): Use bfd_zalloc.
8081 * sunos.c (bfd_sunos_size_dynamic_sections): Likewise.
8082 * tekhex.c (find_chunk): Likewise. Get rid of unused "sname".
8083 * vms-gsd.c (_bfd_vms_slurp_gsd): Use bfd_zmalloc.
8084 * xcofflink.c (xcoff_link_add_symbols): Use bfd_zalloc/bfd_zmalloc.
8085
8086 2002-06-07 Alan Modra <amodra@bigpond.net.au>
8087
8088 * elf-bfd.h (struct bfd_elf_section_data <group_name>): Replace with
8089 "group" union.
8090 (elf_group_name): Update.
8091 (elf_group_id): Define.
8092 (bfd_elf_set_group_contents): Declare.
8093 * elf.c (elf_fake_sections): Qualify use of elf_group_name.
8094 (set_group_contents): Rename to bfd_elf_set_group_contents. Remove
8095 ATTRIBUTE_UNUSED from failedptrarg. If elf_group_id is set, use
8096 that sym for the signature.
8097 (_bfd_elf_compute_section_file_positions): Don't call
8098 set_group_contents for "ld -r" case.
8099 (swap_out_syms): Use bfd_zalloc.
8100 * elflink.h (elf_link_add_archive_symbols): Likewise.
8101 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
8102 (elf_bfd_final_link): Call bfd_elf_set_group_contents.
8103
8104 2002-06-07 Alan Modra <amodra@bigpond.net.au>
8105
8106 * elf64-ppc.c (ppc64_elf_relocate_section): Allow unresolved
8107 relocs in opd for non-shared too.
8108
8109 2002-06-06 Jeffrey Law <law@redhat.com>
8110
8111 * elf32-h8300.c (elf32_h8_relax_section): Ignore uninteresting
8112 relocations.
8113
8114 2002-06-06 Nick Clifton <nickc@cambridge.redhat.com>
8115
8116 * merge.c: Include libiberty.h.
8117 * elf-strtab.c: Include libiberty.h.
8118
8119 2002-06-06 Elias Athanasopoulos <eathan@otenet.gr>
8120
8121 * peXXigen.c (pe_print_idata): Remove unused variable.
8122
8123 2002-06-06 David Heine <dlheine@tensilica.com>
8124
8125 * elf.c (assign_file_positions_for_segments): Remove unallocated
8126 sections from the section to segment mapping for PT_LOAD segments.
8127 Update comment about empty loadable segments.
8128
8129 2002-06-06 Richard Sandiford <rsandifo@redhat.com>
8130
8131 * stabs.c (_bfd_link_section_stabs): Check that the symbol offset
8132 is within the .stabstr section.
8133
8134 2002-06-06 Alan Modra <amodra@bigpond.net.au>
8135
8136 * elf-bfd.h (struct elf_size_info <swap_symbol_in>): Function args
8137 are "const PTR", not "const PTR *".
8138 (bfd_elf32_swap_symbol_in): Likewise.
8139 (bfd_elf64_swap_symbol_in): Likewise.
8140 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR.
8141 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
8142 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
8143 (elf_link_add_object_symbols): Likewise.
8144 (elf_link_record_local_dynamic_symbol): Likewise.
8145 (elf_link_input_bfd): Likewise.
8146 (elf_gc_mark): Likewise.
8147 (elf_reloc_symbol_deleted_p): Likewise.
8148 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
8149 (mn10200_elf_relax_delete_bytes): Likewise.
8150 (mn10200_elf_symbol_address_p): Likewise.
8151 (mn10200_elf_get_relocated_section_contents): Likewise.
8152 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
8153 (mn10300_elf_relax_section): Likewise.
8154 (mn10300_elf_relax_delete_bytes): Likewise.
8155 (mn10300_elf_symbol_address_p): Likewise.
8156 (mn10300_elf_get_relocated_section_contents): Likewise.
8157 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
8158 (elf32_h8_relax_delete_bytes): Likewise.
8159 (elf32_h8_symbol_address_p): Likewise.
8160 (elf32_h8_get_relocated_section_contents): Likewise.
8161 * elf32-hppa.c (get_local_syms): Likewise.
8162 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
8163 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
8164 * elf32-sh.c (sh_elf_relax_section): Likewise.
8165 (sh_elf_relax_delete_bytes): Likewise.
8166 (sh_elf_get_relocated_section_contents): Likewise.
8167 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
8168 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
8169 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
8170 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
8171 * elf64-ppc.c (get_local_syms): Likewise.
8172 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
8173 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
8174
8175 2002-06-05 J"orn Rennecke <joern.rennecke@superh.com>
8176
8177 * config.bfd (sh64l*-*-elf*, shl*-*-elf*): New configurations.
8178
8179 2002-06-05 Alan Modra <amodra@bigpond.net.au>
8180
8181 * elf.c (group_signature): Swap in the whole symbol, and handle
8182 extracting section symbol names.
8183 (setup_group): Add comment.
8184 (set_group_contents): When called from objcopy or ld, arrange for
8185 section contents to be written. Write group member output section
8186 indices to allow objcopy to reorganize sections.
8187 (_bfd_elf_copy_private_section_data): Copy group info.
8188
8189 * elf-bfd.h (struct elf_size_info): Add swap_symbol_in field.
8190 (bfd_elf32_swap_symbol_in): Update prototype.
8191 (bfd_elf64_swap_symbol_in): Likewise.
8192 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR *.
8193 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
8194 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
8195 (elf_link_add_object_symbols): Likewise.
8196 (elf_link_record_local_dynamic_symbol): Likewise.
8197 (elf_link_input_bfd): Likewise.
8198 (elf_gc_mark): Likewise.
8199 (elf_reloc_symbol_deleted_p): Likewise.
8200 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
8201 (mn10200_elf_relax_delete_bytes): Likewise.
8202 (mn10200_elf_symbol_address_p): Likewise.
8203 (mn10200_elf_get_relocated_section_contents): Likewise.
8204 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
8205 (mn10300_elf_relax_section): Likewise.
8206 (mn10300_elf_relax_delete_bytes): Likewise.
8207 (mn10300_elf_symbol_address_p): Likewise.
8208 (mn10300_elf_get_relocated_section_contents): Likewise.
8209 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
8210 (elf32_h8_relax_delete_bytes): Likewise.
8211 (elf32_h8_symbol_address_p): Likewise.
8212 (elf32_h8_get_relocated_section_contents): Likewise.
8213 * elf32-hppa.c (get_local_syms): Likewise.
8214 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
8215 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
8216 * elf32-sh.c (sh_elf_relax_section): Likewise.
8217 (sh_elf_relax_delete_bytes): Likewise.
8218 (sh_elf_get_relocated_section_contents): Likewise.
8219 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
8220 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
8221 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
8222 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
8223 * elf64-ppc.c (get_local_syms): Likewise.
8224 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
8225 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
8226 * elfcode.h (NAME(_bfd_elf,size_info)): Update initialiser.
8227 * elf64-alpha.c (alpha_elf_size_info): Likewise.
8228 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
8229 * elf64-mips.c (mips_elf64_size_info): Likewise.
8230 * elf64-s390.c (s390_elf64_size_info): Likewise.
8231 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
8232
8233 2002-06-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
8234
8235 * elf32-mips.c (elf32_mips_ignore_discarded_relocs): Move to...
8236 elfxx-mips.c (_bfd_mips_elf_ignore_discarded_relocs): ... here.
8237 elf64-mips.c (elf_backend_ignore_discarded_relocs): Use
8238 _bfd_mips_elf_ignore_discarded_relocs.
8239 elfxx-mips.h (_bfd_mips_elf_ignore_discarded_relocs): Declare.
8240
8241 2002-06-05 H.J. Lu <hjl@gnu.org>
8242
8243 * elfxx-mips.c (mips_elf_calculate_relocation): Call
8244 _bfd_elf_rel_local_sym for STT_SECTION relocations against
8245 the SEC_MERGE section.
8246
8247 2002-06-05 Alan Modra <amodra@bigpond.net.au>
8248
8249 * coff-alpha.c: Update copyright date.
8250 * coff-mips.c: Likewise.
8251 * xcoff-target.h: Likewise.
8252
8253 * bfd-in.h: Remove "taken from the source" comment.
8254 * libbfd-in.h: Likewise.
8255 * libcoff-in.h: Likewise.
8256 * bfd-in2.h: Regenerate.
8257 * libbfd.h: Regenerate.
8258 * libcoff.h: Regenerate.
8259
8260 * elf.c (bfd_elf_discard_group): Return true.
8261 * elf-bfd.h (bfd_elf_discard_group): Declare.
8262 * bfd-in.h (bfd_elf_discard_group): Don't declare here.
8263 * section.c (bfd_discard_group): Rename to bfd_generic_discard_group.
8264 * bfd.c (bfd_discard_group): Define.
8265 * targets.c (struct bfd_target): Add _bfd_discard_group.
8266 (BFD_JUMP_TABLE_LINK): Here too.
8267 * libbfd-in.h (_bfd_nolink_bfd_discard_group): Define.
8268 * aout-adobe.c (aout_32_bfd_discard_group): Define.
8269 * aout-target.h (MY_bfd_discard_group): Define.
8270 * aout-tic30.c (MY_bfd_discard_group): Define.
8271 * binary.c (binary_bfd_discard_group): Define.
8272 * bout.c (b_out_bfd_discard_group): Define.
8273 * coff-alpha.c (_bfd_ecoff_bfd_discard_group): Define.
8274 * coffcode.h (coff_bfd_discard_group): Define.
8275 * coff-mips.c (_bfd_ecoff_bfd_discard_group): Define.
8276 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Define.
8277 * i386msdos.c (msdos_bfd_discard_group): Define.
8278 * i386os9k.c (os9k_bfd_discard_group): Define.
8279 * ieee.c (ieee_bfd_discard_group): Define.
8280 * ihex.c (ihex_bfd_discard_group): Define.
8281 * mmo.c (mmo_bfd_discard_group): Define.
8282 * nlm-target.h (nlm_bfd_discard_group): Define.
8283 * oasys.c (oasys_bfd_discard_group): Define.
8284 * ppcboot.c (ppcboot_bfd_discard_group): Define.
8285 * som.c (som_bfd_discard_group): Define.
8286 * srec.c (srec_bfd_discard_group): Define.
8287 * tekhex.c (tekhex_bfd_discard_group): Define.
8288 * versados.c (versados_bfd_discard_group): Define.
8289 * vms.c (vms_bfd_discard_group): Define.
8290 * xcoff-target.h (_bfd_xcoff_bfd_discard_group): Define.
8291 * coff64-rs6000.c (rs6000coff64_vec): Update initialiser.
8292 (aix5coff64_vec): Likewise.
8293 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Likewise.
8294
8295 2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
8296
8297 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-com.lo.
8298 (BFD32_BACKENDS_CFILES): Add elf32-sh64-com.c.
8299 (elf32-sh64-com.lo): New dependency list.
8300 * Makefile.in: Regenerate.
8301 * configure.in (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec)
8302 (bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec): Add
8303 elf32-sh64-com.lo.
8304 * configure: Regenerate.
8305 * elf32-sh64.c (sh64_address_in_cranges)
8306 (sh64_get_contents_type, sh64_address_is_shmedia): Move to...
8307 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb):
8308 (crange_bsearch_cmpl): Prepend _bfd_sh64_ to name and move to...
8309 * elf32-sh64-com.c: ...here. New file.
8310
8311 2002-06-04 Alan Modra <amodra@bigpond.net.au>
8312
8313 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Remove
8314 ATTRIBUTE_UNUSED on used params.
8315 * elf32-vax.c (elf_vax_gc_mark_hook): Remove unnecessary checks
8316 before calling bfd_section_from_elf_index on local syms.
8317 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
8318
8319 2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
8320
8321 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-nbsd.lo.
8322 (BFD32_BACKENDS_CFILES): Add elf32-sh64-nbsd.c.
8323 (BFD64_BACKENDS): Add elf64-sh64-nbsd.lo.
8324 (BFD64_BACKENDS_CFILES): Add elf64-sh64-nbsd.c.
8325 (elf32-sh64-nbsd.lo, elf64-sh64-nbsd.lo): New rules.
8326 * Makefile.in: Regenerate.
8327 * config.bfd (sh5le-*-netbsd*, sh5-*-netbsd*, sh64le-*-netbsd*)
8328 (sh64-*-netbsd*): New targets.
8329 * configure.in: Add bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec,
8330 bfd_elf64_sh64nbsd_vec, and bfd_elf64_sh64lnbsd_vec.
8331 * configure: Regenerate.
8332 * elf32-sh64-nbsd.c: New file.
8333 * elf64-sh64-nbsd.c: New file.
8334 * targets.c: Add extern decls for bfd_elf32_sh64nbsd_vec,
8335 bfd_elf32_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec, and
8336 bfd_elf64_sh64lnbsd_vec.
8337
8338 2002-06-04 Alan Modra <amodra@bigpond.net.au>
8339
8340 * elf.c (setup_group): Set SEC_LINK_ONCE on GRP_COMDAT groups.
8341 (bfd_section_from_shdr): Likewise. Set section name of group
8342 sections from signature.
8343 (group_signature): Split out from setup_group. Ensure symbol table
8344 is available.
8345 (bfd_elf_discard_group): New function.
8346 (_bfd_elf_make_section_from_shdr): Don't set SEC_LINK_ONCE on
8347 .gnu.linkonce* sections if they are members of a group.
8348 (set_group_contents): Set GRP_COMDAT flag.
8349 * section.c (bfd_discard_group): New function.
8350 * bfd-in.h (bfd_elf_discard_group): Declare.
8351 * bfd-in2.h: Regenerate.
8352 * elf-bfd.h (struct bfd_elf_section_data): Add linkonce_p field.
8353 (elf_linkonce_p): Define.
8354
8355 2002-06-04 Alan Modra <amodra@bigpond.net.au>
8356
8357 * elf.c (bfd_section_from_shdr): Make "name" const.
8358 * elf-bfd.h (elf_backend_section_from_shdr): Likewise.
8359 * elf32-i370.c (i370_elf_section_from_shdr): Likewise.
8360 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
8361 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
8362 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
8363 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
8364 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
8365 * elf64-ppc.c (ppc64_elf_section_from_shdr): Likewise.
8366 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
8367 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
8368 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
8369
8370 2002-06-03 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
8371
8372 * elfxx-mips.c (ABI_64_P): Use backend's data to determine the
8373 ABI.
8374
8375 2002-06-02 Kazu Hirata <kazu@cs.umass.edu>
8376
8377 * elf32-arc.c: Fix formatting.
8378 * elf32-arm.h: Likewise.
8379 * elf32-cris.c: Likewise.
8380 * elf32-dlx.c: Likewise.
8381 * elf32-hppa.c: Likewise.
8382 * elf32-i386.c: Likewise.
8383 * elf32-i386qnx.c: Likewise.
8384 * elf32-or32.c: Likewise.
8385 * elf32-s390.c: Likewise.
8386 * elf32-sh64.c: Likewise.
8387 * elf32-vax.c: Likewise.
8388 * elf32-xstormy16.c: Likewise.
8389 * elf64-alpha.c: Likewise.
8390 * elf64-mmix.c: Likewise.
8391 * elf64-ppc.c: Likewise.
8392 * elf64-s390.c: Likewise.
8393 * elf64-sh64.c: Likewise.
8394 * elf64-x86-64.c: Likewise.
8395
8396 2002-06-02 Richard Henderson <rth@redhat.com>
8397
8398 * elf64-alpha.c (elf64_alpha_relocate_section): Don't dereference
8399 null when there are no got entries for a symbol.
8400 (elf64_alpha_relax_find_tls_segment): Rearrange to avoid
8401 uninitialized variable warning.
8402
8403 2002-06-01 Richard Henderson <rth@redhat.com>
8404
8405 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Don't test for
8406 undefined symbols here.
8407 (elf64_alpha_relax_section): Do it here. Also test for not
8408 defined in the current module.
8409 (elf64_alpha_relocate_section_r): Split out of ...
8410 (elf64_alpha_relocate_section): ... here. Don't dereference
8411 NULL when looking up local got entries.
8412
8413 2002-06-01 Richard Henderson <rth@redhat.com>
8414
8415 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Reject undefined
8416 symbols from JSR relaxation.
8417 (elf64_alpha_size_plt_section_1): New.
8418 (elf64_alpha_calc_dynrel_sizes): Split out .rela.got bits ...
8419 (elf64_alpha_size_rela_got_1): ... here.
8420 (elf64_alpha_size_dynamic_sections): Split out .rela.got bits ...
8421 (elf64_alpha_size_rela_got_section): ... here.
8422 (elf64_alpha_size_plt_section): New.
8423 (elf64_alpha_relax_section): Call them.
8424 (elf64_alpha_size_got_sections): Remove output_bfd arg.
8425 (elf64_alpha_finish_dynamic_symbol): Check gotent use_count.
8426
8427 2002-06-01 Richard Henderson <rth@redhat.com>
8428
8429 * elf64-alpha.c (alpha_get_dtprel_base, alpha_get_tprel_base): New.
8430 (elf64_alpha_relocate_section): Use them. Reject LE TLS relocs
8431 in shared libraries. Fix DTPRELHI and TPRELHI value.
8432 (INSN_ADDQ, INSN_RDUNIQ): New.
8433 (struct alpha_relax_info): Add symtab_hdr, tls_segment, first_gotent.
8434 (elf64_alpha_relax_with_lituse): Return boolean. Remove irelend
8435 argument. Reject dynamic symbols. Use LITUSE symbolic constants.
8436 (elf64_alpha_relax_got_load): Rename from relax_without_lituse.
8437 Handle GOTDTPREL and GOTTPREL relocations.
8438 (elf64_alpha_relax_gprelhilo): New.
8439 (elf64_alpha_relax_tls_get_addr): New.
8440 (elf64_alpha_relax_find_tls_segment): New.
8441 (elf64_alpha_relax_section): Handle TLS relocations.
8442 (ALPHA_ELF_LINK_HASH_TLS_IE): New.
8443 (elf64_alpha_check_relocs): Set it.
8444
8445 2002-06-01 Richard Henderson <rth@redhat.com>
8446
8447 * elf64-alpha.c (elf64_alpha_relax_section): Don't store computed gp.
8448
8449 * elf64-alpha.c (elf64_alpha_check_relocs): Fix typo on maybe_dynamic
8450 check; don't suppress dynamic relocs for non-allocated sections.
8451
8452 * elf64-alpha.c: Remove dead code.
8453
8454 2002-05-31 Alan Modra <amodra@bigpond.net.au>
8455
8456 * bfd-in2.h: Regenerate.
8457 * libbfd.h: Regenerate.
8458 * po/SRC-POTFILES.in: Regenerate.
8459
8460 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate
8461 space for bss .plt.
8462
8463 2002-05-31 Graeme Peterson <gp@qnx.com>
8464
8465 * Makefile.am (BFD32_BACKENDS): Add elf32-i386qnx.lo.
8466 (BFD32_BACKENDS_CFILES): Add elf32-i386qnx.c.
8467 Run "make dep-am".
8468 * Makefile.in: Regenerate.
8469 * config.bfd: Add i[3456]86-*-nto-qnx* support.
8470 * configure.in: Add bfd_elf32_i386qnx_vec support.
8471 * configure: Regenerate.
8472 * elf-bfd.h (struct elf_backend_data): Add set_nonloadable_filepos,
8473 is_contained_by_filepos, and copy_private_bfd_data_p.
8474 * elf.c (assign_file_positions_for_segments): Call backend
8475 set_nonloadable_filepos. Fix non-K&R call to _bfd_error_handler.
8476 (IS_CONTAINED_BY_FILEPOS): Define.
8477 (INCLUDE_SECTION_IN_SEGMENT): Also test IS_CONTAINED_BY_FILEPOS.
8478 (copy_private_bfd_data): Use IS_CONTAINED_BY_FILEPOS. Typo fix.
8479 Fix non-K&R call to _bfd_error_handler.
8480 (_bfd_elf_copy_private_section_data): Use backend
8481 copy_private_bfd_data_p.
8482 * elf32-i386.c: Don't include elfxx-target.h when
8483 ELF32_I386_C_INCLUDED is defined.
8484 * elf32-i386qnx.c: New QNX elf backend file.
8485 * elfxx-target.h: Add elf_backend_set_nonloadable_filepos,
8486 elf_backend_is_contained_by_filepos, and
8487 elf_backend_do_copy_private_bfd_data.
8488 * targets.c: Add bfd_target bfd_elf32_i386qnx_vec.
8489
8490 2002-05-31 Alan Modra <amodra@bigpond.net.au>
8491
8492 * elfarm-oabi.c (bfd_elf32_arm_add_glue_sections_to_bfd): Define.
8493 Move other similar defines to start of file.
8494
8495 2002-05-30 Tom Rix <trix@redhat.com>
8496
8497 * coff-rs6000.c (xcoff_rtype2howto): Handle 16 bit R_RBA.
8498 * coff64-rs6000.c (xcoff64_rtype2howto): Same.
8499
8500 2002-05-30 Richard Henderson <rth@redhat.com>
8501
8502 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_TLSGD,
8503 ALPHA_ELF_LINK_HASH_LU_TLSLDM, ALPHA_ELF_LINK_HASH_LU_FUNC): New.
8504 (ALPHA_ELF_GOT_ENTRY_RELOCS_DONE): Remove.
8505 (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Remove.
8506 (struct alpha_elf_got_entry): Add reloc_type, reloc_done, reloc_xlated.
8507 (struct alpha_elf_obj_tdata): Rename total_got_entries and
8508 n_local_got_entries to total_got_size and local_got_size.
8509 (elf64_alpha_howto, elf64_alpha_reloc_map): Update for TLS relocs.
8510 (alpha_got_entry_size): New.
8511 (elf64_alpha_relax_with_lituse): Use it.
8512 (elf64_alpha_relax_without_lituse): Likewise.
8513 (MAX_GOT_SIZE): Rename from MAX_GOT_ENTRIES.
8514 (get_got_entry): New.
8515 (elf64_alpha_check_relocs): Handle TLS relocs. Reorganize.
8516 (elf64_alpha_adjust_dynamic_symbol): Test LU_FUNC as a mask.
8517 (elf64_alpha_merge_ind_symbols): Check gotent->reloc_type.
8518 (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots): Likewise.
8519 (elf64_alpha_calc_got_offsets_for_symbol): Use alpha_got_entry_size.
8520 (elf64_alpha_calc_got_offsets): Likewise.
8521 (alpha_dynamic_entries_for_reloc): New.
8522 (elf64_alpha_calc_dynrel_sizes): Use it.
8523 (elf64_alpha_size_dynamic_sections): Likewise.
8524 (elf64_alpha_relocate_section): Handle TLS relocations.
8525 * reloc.c: Add Alpha TLS relocations.
8526 * bfd-in2.h, libbfd.h: Rebuild.
8527
8528 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
8529
8530 * peXXigen.c (pe_print_idata): Remove double printed
8531 import table lines; add Bound-To comment.
8532
8533 2002-05-29 Matt Thomas <matt@3am-software.com>
8534
8535 * Makefile.am (BFD32_BACKENDS): Add elf32-vax.lo.
8536 (BFD32_BACKENDS_CFILES): Add elf32-vax.c.
8537 (elf32-vax.lo): New rule.
8538 * Makefile.in: Regenerate.
8539 * configure.in (bfd_elf32_vax_vec)
8540 (vaxnetbsd_vec): New vectors.
8541 * configure: Regenerate.
8542 * config.bfd (vax-*-netbsdelf*)
8543 (vax-*-netbsdaout*)
8544 (vax-*-netbsd*): New targets.
8545 * elf32-vax.c: New file.
8546 * reloc.c: Add VAX relocations.
8547 * bfd-in2.h: Regenerate.
8548 * targets.c (_bfd_target_vector): Add bfd_elf32_vax_vec.
8549
8550 2002-05-29 Jason Thorpe <thorpej@wasabisystems.com>
8551
8552 * config.bfd (arm-*-netbsd*): Add bfd_elf32_littlearm_vec
8553 and bfd_elf32_bigarm_vec to targ_selvecs.
8554
8555 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
8556
8557 * peXXigen.c (pe_print_idata): Fix seg faults on printing import tables
8558 with auto-imported symbols.
8559
8560 2002-05-29 Adam Nemet <anemet@lnxw.com>
8561
8562 * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Don't add glue
8563 sections only record bfd.
8564 (bfd_elf32_arm_add_glue_sections_to_bfd): New function.
8565 * bfd-in.h (bfd_elf32_arm_add_glue_sections_to_bfd): Declare it.
8566 * bfd-in2.h: Regenerate.
8567
8568 2002-05-28 Nick Clifton <nickc@cambridge.redhat.com>
8569
8570 * syms.c (_bfd_stab_section_find_nearest_line): Move
8571 declaration and initialisation of saw_line and saw_func out of
8572 for loop.
8573
8574 2002-05-29 Alan Modra <amodra@bigpond.net.au>
8575
8576 * elf64-ppc.c (ppc64_elf_get_symbol_info): New function.
8577 (bfd_elf64_get_symbol_info): Define.
8578 * elfxx-target.h (bfd_elfNN_get_symbol_info): Only define if undef.
8579
8580 2002-05-29 Andrey Volkov <avolkov@transas.com>
8581
8582 * cpu-h8300.c: Make default h8300 machine first in machine list.
8583
8584 2002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net>
8585
8586 * config.bfd: Added DLX configuraton.
8587 * Makefile.am: Added DLX configuraton.
8588 * configure.in: Added DLX configuraton.
8589 * archures.c: Add DLX architecture.
8590 * reloc.c: Add DLX relocs.
8591 * targets.c: Added DLX target vector.
8592 * configure: Regenerate.
8593 * Makefile.in: Regenreate.
8594 * bfd-in2.h: Regenreate.
8595 * elf32-dlx.c: New file: Support DLX target.
8596 * cpu-dlx.c: New file: Support DLX target.
8597
8598 2002-05-25 Alan Modra <amodra@bigpond.net.au>
8599
8600 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Formatting.
8601
8602 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Revert last change.
8603 (ppc64_elf_check_relocs): Don't set up function descriptor symbol
8604 strings to point inside function code sym string.
8605 (func_desc_adjust): Likewise.
8606 (ppc64_elf_hide_symbol): Rewrite code to look up function code sym.
8607
8608 2002-05-24 Michal Ludvig <mludvig@suse.cz>
8609
8610 * elf64-x86-64.c (elf64_x86_64_grok_prstatus): Added.
8611 (elf64_x86_64_grok_psinfo): Added.
8612
8613 2002-05-24 TAMURA Kent <kent@netbsd.org>
8614
8615 * config.bfd: Add a target for i386-netbsdpe.
8616
8617 2002-05-24 Alan Modra <amodra@bigpond.net.au>
8618
8619 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy is_func
8620 and is_func_descriptor.
8621 (func_desc_adjust): Hide function code sym in shared libs unless
8622 there is a matching exported function descriptor sym.
8623
8624 2002-05-23 Jakub Jelinek <jakub@redhat.com>
8625
8626 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_THREAD_LOCAL
8627 for symbols from SHF_TLS section.
8628 (_bfd_elf_print_private_bfd_data): Add PT_TLS.
8629 (elf_fake_sections): Set SHF_TLS for SEC_THREAD_LOCAL sections.
8630 (map_sections_to_segments): Build PT_TLS segment if necessary.
8631 (assign_file_positions_for_segments): Likewise.
8632 (get_program_header_size): Account for PT_TLS segment.
8633 (swap_out_syms): Set type of BSF_THREAD_LOCAL symbols and symbols from
8634 SEC_THREAD_LOCAL sections to STT_TLS.
8635 * reloc.c: Add 386 and IA-64 TLS relocs.
8636 * section.c (SEC_THREAD_LOCAL): Define.
8637 (SEC_CONSTRUCTOR_TEXT, SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS):
8638 Remove.
8639 * elflink.h (elf_link_add_object_symbols): Support .tcommon.
8640 (size_dynamic_sections): If DF_STATIC_TLS, set DF_FLAGS
8641 unconditionally.
8642 (struct elf_final_link_info): Add first_tls_sec.
8643 (elf_bfd_final_link): Set first_tls_sec.
8644 Compute elf_hash_table (info)->tls_segment.
8645 (elf_link_output_extsym): Handle STT_TLS symbols.
8646 (elf_link_input_bfd): Likewise.
8647 * syms.c (BSF_THREAD_LOCAL): Define.
8648 * bfd-in2.h: Rebuilt.
8649 * libbfd.h: Rebuilt.
8650 * elf32-i386.c (elf_i386_tls_transition, dtpoff_base, tpoff,
8651 elf_i386_mkobject, elf_i386_object_p): New functions.
8652 (elf_howto_table): Add TLS relocs.
8653 (elf_i386_reloc_type_lookup): Support TLS relocs.
8654 (elf_i386_info_to_howto_rel): Likewise.
8655 (struct elf_i386_link_hash_entry): Add tls_type.
8656 (struct elf_i386_obj_tdata): New.
8657 (elf_i386_hash_entry, elf_i386_tdata, elf_i386_local_got_tls_type):
8658 New macros.
8659 (struct elf_i386_link_hash_table): Add tls_ldm_got.
8660 (link_hash_newfunc): Clear tls_type.
8661 (elf_i386_check_relocs): Support TLS relocs.
8662 (elf_i386_gc_sweep_hook): Likewise.
8663 (allocate_dynrelocs): Likewise.
8664 (elf_i386_size_dynamic_sections): Likewise.
8665 (elf_i386_relocate_section): Likewise.
8666 (elf_i386_finish_dynamic_symbol): Likewise.
8667 (bfd_elf32_mkobject, elf_backend_object_p): Define.
8668 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add tprel_offset,
8669 dtpmod_offset, dtprel_offset, tprel_done, dtpmod_done, dtprel_done,
8670 want_tprel, want_dtpmod, want_dtprel.
8671 (elfNN_ia64_tprel_base, elfNN_ia64_dtprel_base): New functions.
8672 (ia64_howto_table): Add TLS relocs, rename R_IA64_LTOFF_TP22 to
8673 R_IA64_LTOFF_TPREL22.
8674 (elf_code_to_howto_index): Add TLS relocs.
8675 (elfNN_ia64_check_relocs): Support TLS relocs.
8676 (allocate_global_data_got): Account for TLS .got data.
8677 (allocate_dynrel_entries): Account for TLS dynamic relocations.
8678 (elfNN_ia64_install_value): Supprt TLS relocs.
8679 (set_got_entry): Support TLS relocs.
8680 (elfNN_ia64_relocate_section): Likewise.
8681
8682 2002-05-23 Nick Clifton <nickc@cambridge.redhat.com>
8683
8684 * elf32-arm.h (elf32_arm_final_link_relocate): For the Thumb
8685 BLX reloc round the relocation up rather than down.
8686 * coff-arm.c (coff_arm_relocate_section): Likewise.
8687
8688 2002-05-21 H.J. Lu (hjl@gnu.org)
8689
8690 * linker.c (_bfd_generic_link_add_one_symbol): Allow multiple
8691 definition.
8692
8693 2002-05-22 Alan Modra <amodra@bigpond.net.au>
8694
8695 * elf64-ppc.c (ppc64_elf_size_stubs): Don't strip .branch_lt.
8696 (ppc64_elf_relocate_section): Handle unresolved relocs in opd.
8697
8698 2002-05-22 Alan Modra <amodra@bigpond.net.au>
8699
8700 * elf64-ppc.c (ppc64_elf_relocate_section): Return false for
8701 unresolved relocs.
8702 (ppc64_elf_size_dynamic_sections): Check for splt NULL.
8703
8704 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8705
8706 * bfd.c (bfd_get_arch_size): Remove bfd_set_error call for
8707 non-ELF targets.
8708
8709 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8710
8711 * elf-bfd.h (elf_backend_emit_relocs): Change prototype to return
8712 an error value.
8713 * elflink.h (elf_link_output_relocs): Likewise. Improve error message.
8714 return with false on error.
8715 (elf_link_input_bfd): Check reloc_emitter return value.
8716
8717 2002-05-21 Jason Thorpe <thorpej@wasabisystems.com>
8718
8719 * config.bfd (armeb-*-netbsdelf*): New target.
8720
8721 2002-05-20 Alan Modra <amodra@bigpond.net.au>
8722
8723 * elf64-ppc.c (ppc_build_one_stub): Point undefined function syms
8724 at the plt call stub.
8725
8726 2002-05-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8727
8728 * cpu-mips.c (mips_compatible): Don't try to check machine
8729 compatibility.
8730
8731 2002-05-18 Tom Rix <trix@redhat.com>
8732
8733 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_out): Fix C_FILE auxent.
8734
8735 2002-05-17 Alan Modra <amodra@bigpond.net.au>
8736
8737 * elf64-ppc.c (ppc64_elf_info_to_howto): Formatting.
8738 (ppc64_elf_relocate_section): Don't warn about reloc overflow when
8739 we've already warned about an undefined symbol. Report more
8740 detail on reloc errors.
8741
8742 2002-05-17 Alan Modra <amodra@bigpond.net.au>
8743
8744 * acinclude.m4 (AM_INSTALL_LIBBFD): New.
8745 * configure.in: Invoke AM_INSTALL_LIBBFD.
8746 * Makefile.am (install-data-local): Revert 2002-05-13. Move to..
8747 (install_libbfd): .. New target.
8748 (uninstall_libbfd): Likewise.
8749 (install-bfdlibLTLIBRARIES): Likewise.
8750 (uninstall-bfdlibLTLIBRARIES): Likewise.
8751 (bfdlibdir): New.
8752 (bfdincludedir): New.
8753 (lib_LTLIBRARIES): Rename to bfdlib_LTLIBRARIES.
8754 * aclocal.m4: Regenerate.
8755 * configure: Regenerate.
8756 * Makefile.in: Regenerate.
8757
8758 2002-05-17 Stuart Balfour <sbalfour@cisco.com>
8759
8760 * hash.c (bfd_hash_lookup): Remove computation of len from inside
8761 hash loop.
8762
8763 2002-05-16 Nick Clifton <nickc@cambridge.redhat.com>
8764
8765 * config.bfd: Add targets for sh64-linux (little endian and
8766 big endian).
8767
8768 2002-05-15 Laurent Pinchart <laurent.pinchart@skynet.be>
8769
8770 * peXXigen.c (pe_print_idata): Do not assume that the first thunk
8771 is located in the same section as the import table. Instead
8772 check, and if necessary load the section containing the thunk.
8773
8774 2002-05-15 Nick Clifton <nickc@cambridge.redhat.com>
8775
8776 * aix5ppc-core.c (xcoff64_core_p): Replace bfd_read with
8777 bfd_bread.
8778 (xcoff64_core_file_matches_executable_p): Replace bfd_read
8779 with bfd_bread.
8780
8781 2002-05-15 Alan Modra <amodra@bigpond.net.au>
8782
8783 * aix5ppc-core.c: Warning fixes.
8784 * aout-adobe.c (aout_32_bfd_link_just_syms): Define.
8785 * aout-target.h (MY_bfd_link_just_syms): Define.
8786 * aout-tic30.c (MY_bfd_link_just_syms): Define.
8787 * bfd.c (bfd_link_just_syms): Define.
8788 * binary.c (binary_bfd_link_just_syms): Define.
8789 * bout.c (b_out_bfd_link_just_syms): Define.
8790 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update initializer.
8791 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
8792 * coffcode.h (coff_bfd_link_just_syms): Define.
8793 * elf-bfd.h (enum elf_link_info_type): Add ELF_INFO_TYPE_JUST_SYMS.
8794 (elf_discarded_section): Check for ELF_INFO_TYPE_JUST_SYMS.
8795 (_bfd_elf_link_just_syms): Declare.
8796 * elf.c (_bfd_elf_link_just_syms): New function.
8797 * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Check that
8798 sections haven't already been discarded by the linker.
8799 * elflink.h (elf_link_add_object_symbols): Likewise for stab
8800 sections and SEC_MERGE sections.
8801 (elf_bfd_discard_info): Similarly here.
8802 * elfxx-target.h (bfd_elfNN_bfd_link_just_syms): Define.
8803 * i386msdos.c (msdos_bfd_link_just_syms): Define.
8804 * i386os9k.c (os9k_bfd_link_just_syms): Define.
8805 * ieee.c (ieee_bfd_link_just_syms): Define.
8806 * ihex.c (ihex_bfd_link_just_syms): Define.
8807 * libbfd-in.h (_bfd_nolink_bfd_link_just_syms): Define.
8808 (_bfd_generic_link_just_syms): Declare.
8809 * libecoff.h (_bfd_ecoff_bfd_link_just_syms): Define.
8810 * linker.c (_bfd_generic_link_just_syms): New function.
8811 * mmo.c (mmo_bfd_link_just_syms): Define.
8812 * nlm-target.h (nlm_bfd_link_just_syms): Define.
8813 * oasys.c (oasys_bfd_link_just_syms): Define.
8814 * ppcboot.c (ppcboot_bfd_link_just_syms): Define.
8815 * som.c (som_bfd_link_just_syms): Define.
8816 * srec.c (srec_bfd_link_just_syms): Define.
8817 * targets.c (struct bfd_target): Add _bfd_link_just_syms.
8818 (BFD_JUMP_TABLE_LINK): And here.
8819 * tekhex.c (tekhex_bfd_link_just_syms): Define.
8820 * versados.c (versados_bfd_link_just_syms): Define.
8821 * vms.c (vms_bfd_link_just_syms): Define.
8822 * libbfd.h: Regenerate.
8823 * bfd-in2.h: Regenerate.
8824
8825 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8826
8827 * elf32-mips.c: Remove superfluous definitions copied from
8828 elfxx-mips.c.
8829 (bfd_elf32_bigmips_vec,bfd_elf32_littlemips_vec): Use the
8830 SGIish vectors to check the special case.
8831 (mips_elf_hi16_reloc): Fix comment.
8832 (mips_elf_got16_reloc): Likewise.
8833 (_bfd_mips_elf32_gprel16_reloc): Likewise.
8834 (elf_reloc_map): Code cleanup.
8835 (mips_reloc_map): Add comment.
8836 (bfd_elf23_bfd_reloc_type_lookup): Code cleanup.
8837 (mips_elf32_rtype_to_howto): Likewise.
8838 (mips_elf32_discard_info): Likewise.
8839 (elf32_mips_irix_compat): Invert logic: Only SGIish vectors
8840 lead to IRIX compatibility now.
8841
8842 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8843
8844 * elfxx-mips.c: Call it IRIX, not Irix in comments.
8845
8846 2002-05-13 Jason Thorpe <thorpej@wasabisystems.com>
8847
8848 * config.bfd (shle-*-netbsdelf*): Add target which includes
8849 sh64 support.
8850
8851 2002-05-13 David Edelsohn <edelsohn@gnu.org>
8852
8853 * configure.in: Revert 2002-04-07. Instead, auto-configure
8854 HAVE_ST_C_IMPL.
8855 * configure: Regenerate.
8856 * config.in: Regenerate.
8857 * rs6000-core.c (CNEW_IMPL): Guard use of c_impl with HAVE_ST_C_IMPL
8858 or AIX_5_CORE.
8859
8860 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
8861
8862 * configure.in (sparc*-*-openbsd*): Support sparc64-openbsd
8863 corefiles as well.2
8864 * configure: Regenerate.
8865
8866 2002-05-13 Alan Modra <amodra@bigpond.net.au>
8867
8868 * Makefile.am (install-data-local): Install headers to
8869 $(exec_prefix)/include.
8870 * Makefile.in: Regenerate.
8871
8872 2002-05-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
8873 Daniel Jacobowitz <drow@mvista.com>
8874
8875 * coff-sh.c (sh_reloc_map): Map to R_SH_IMM32 for non-PE. Don't
8876 map BFD_RELOC_RVA.
8877
8878 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
8879
8880 * config.bfd (alpha*-*-openbsd*, sparc64*-*-openbsd*,
8881 hppa*-*-openbsd*): New targets.
8882 * configure.in (alpha*-*-openbsd*): Set COREFILE.
8883 * configure: Regenerate.
8884
8885 2002-05-10 Tom Rix <trix@redhat.com>
8886
8887 * coff64-rs6000.c (xcoff64_reloc_type_br): New function for
8888 xcoff64_ppc_relocate_section.
8889 * coff-rs6000.c : Extern common xcoff_reloc_type functions.
8890 * libxcoff.h: Common xcoff_reloc_type function declaration.
8891
8892 2002-05-10 Alan Modra <amodra@bigpond.net.au>
8893
8894 * elf32-i386.c (elf_i386_relocate_section): Remove overflow checks
8895 added in 2002-05-09 commit.
8896
8897 * elf32-hppa.c (elf32_hppa_size_stubs): Revert part of 2002-05-04,
8898 don't look for stubs on all undefined syms.
8899
8900 2002-05-09 Alan Modra <amodra@bigpond.net.au>
8901
8902 * elf64-ppc.c (RA_REGISTER_MASK, RA_REGISTER_SHIFT): Delete.
8903 (ppc64_elf_howto_raw <R_PPC64_RELATIVE>): Not pc_relative or
8904 pcrel_offset.
8905
8906 * elf32-i386.c (elf_howto_table): Comments.
8907 (elf_i386_relocate_section): Handle more relocs for relocatable
8908 linking and against SEC_MERGE sections.
8909
8910 2002-05-08 Alan Modra <amodra@bigpond.net.au>
8911
8912 * elf32-ppc.c (ppc_elf_create_got): New function.
8913 (ppc_elf_create_dynamic_sections): Call ppc_elf_create_got before
8914 _bfd_elf_create_dynamic_sections. Correct .plt flags.
8915 (ppc_elf_check_relocs): Use ppc_elf_create_got in place of
8916 _bfd_elf_create_got_section.
8917
8918 2002-05-07 Alan Modra <amodra@bigpond.net.au>
8919
8920 * elf-bfd.h (struct elf_backend_data): Add rela_normal.
8921 * elfxx-target.h (elf_backend_rela_normal): Define.
8922 (elfNN_bed): Init rela_normal.
8923 * elflink.h (elf_link_input_bfd <emit_relocs>): Handle adjustment
8924 for section symbols here if rela_normal. Simplify abs section test.
8925 * elf-m10200.c (mn10200_elf_relocate_section): If relocatable,
8926 return immediately. Remove code handling relocatable linking.
8927 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
8928 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
8929 * elf32-i370.c (i370_elf_relocate_section): Likewise.
8930 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
8931 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
8932 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
8933 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
8934 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
8935 * elf32-s390.c (elf_s390_relocate_section): Likewise.
8936 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
8937 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
8938 * elf64-s390.c (elf_s390_relocate_section): Likewise.
8939 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
8940 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
8941 * elf32-arm.h (elf32_arm_relocate_section): Likewise #ifndef USE_REL.
8942 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
8943 * elf-m10200.c (elf_backend_rela_normal): Define.
8944 * elf-m10300.c (elf_backend_rela_normal): Define.
8945 * elf32-fr30.c (elf_backend_rela_normal): Define.
8946 * elf32-i370.c (elf_backend_rela_normal): Define.
8947 * elf32-i860.c (elf_backend_rela_normal): Define.
8948 * elf32-m68k.c (elf_backend_rela_normal): Define.
8949 * elf32-mcore.c (elf_backend_rela_normal): Define.
8950 * elf32-openrisc.c (elf_backend_rela_normal): Define.
8951 * elf32-ppc.c (elf_backend_rela_normal): Define.
8952 * elf32-s390.c (elf_backend_rela_normal): Define.
8953 * elf32-xstormy16.c (elf_backend_rela_normal): Define.
8954 * elf64-ppc.c (elf_backend_rela_normal): Define.
8955 * elf64-s390.c (elf_backend_rela_normal): Define.
8956 * elf64-x86-64.c (elf_backend_rela_normal): Define.
8957 * elfxx-ia64.c (elf_backend_rela_normal): Define.
8958 * elf32-arm.h (elf_backend_rela_normal): Define #ifndef USE_REL.
8959 * elf32-m32r.c (elf_backend_rela_normal): Likewise.
8960
8961 2002-05-06 Nick Clifton <nickc@cambridge.redhat.com>
8962
8963 * elf32-arm.h (elf32_arm_final_link_relocate): Convert
8964 'reloc_signed_max' and 'reloc_signed_min' into half-word offsets.
8965
8966 2002-05-06 Alan Modra <amodra@bigpond.net.au>
8967
8968 * elflink.h (elf_link_input_bfd <emit_relocs>): Adjust r_offset
8969 when not relocatable. Fix reloc_emitter call for K&R.
8970
8971 2002-05-04 Alan Modra <amodra@bigpond.net.au>
8972
8973 * elf64-ppc.c (ppc64_elf_relocate_section): Reinstate code
8974 reloading local sym addend mistakenly removed in 2002-05-01 change.
8975
8976 * dwarf2.c (struct line_head): Make prologue_length a bfd_vma.
8977 (read_abbrevs): Change "offset" param to bfd_vma.
8978 (parse_comp_unit): Change "version" and addr_size to unsigned ints.
8979 Change "abbrev_offset" to bfd_vma.
8980 (read_indirect_string): Use correct conversion chars in error
8981 message format string, cast bfd_vma's to unsigned long.
8982 (read_abbrevs): Likewise.
8983 (read_attribute_value): Likewise.
8984 (decode_line_info): Likewise.
8985 (scan_unit_for_functions): Likewise.
8986 (parse_comp_unit): Likewise.
8987
8988 2002-05-04 Tom Rix <trix@redhat.com>
8989
8990 * coffswap.h (coff_swap_reloc_in): Remove XCOFF support.
8991 (coff_swap_reloc_out): Same.
8992 * coff-rs6000.c: (xcoff_swap_reloc_in): Moved from coffswap.h.
8993 (xcoff_swap_reloc_out): Same.
8994 (xcoff_rtype2howto): Renamed from _bfd_xcoff_rtype2howto. Special
8995 case some 16 bit relocs. Add reloc value to output.
8996 (xcoff_howto_table): Remove 64 bit R_POS, add 16 bit
8997 R_RBR. Improve names.
8998 (_bfd_xcoff_reloc_type_lookup): Adjust for removal of 64 bit R_POS.
8999 (bfd_xcoff_backend_data): Update with new reloc swap names.
9000 (bfd_pmac_xcoff_backend_data) : Same.
9001 * coff64-rs6000.c: (xcoff64_swap_reloc_in): Moved from coffswap.h.
9002 (xcoff64_swap_reloc_out): Same.
9003 (xcoff64_rtype2howto): Special case some 16 bit relocs and 32 bit
9004 R_POS. Add reloc value to output.
9005 (xcoff64_howto_table): Move 64 bit R_POS to first entry. Add 16
9006 bit R_RBR. Improve names, masks.
9007 (xcoff64_reloc_type_lookup): Adjust for move of 64 bit R_POS.
9008 (bfd_xcoff_backend_data): Update with new reloc swap names.
9009 (bfd_xcoff_aix5_backend_data) : Same.
9010
9011 2002-05-04 Alan Modra <amodra@bigpond.net.au>
9012
9013 * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add
9014 bfd_count top_index, input_list, all_local_syms.
9015 (elf32_hppa_setup_section_lists): New function, split from
9016 elf32_hppa_size_stubs.
9017 (elf32_hppa_next_input_section): Likewise.
9018 (group_sections): Likewise.
9019 (get_local_syms): Likewise.
9020 (elf32_hppa_size_stubs): Adjust for split out functions. Look for
9021 stubs on undefined syms too.
9022 (elf32_hppa_set_gp): Use bfd_link_hash* instead of elf_link_hash*.
9023 Only access htab elf fields when we have an elf hash table.
9024 * elf32-hppa.h (elf32_hppa_setup_section_lists): Declare.
9025 (elf32_hppa_next_input_section): Declare.
9026
9027 2002-05-04 Bob Byrnes <byrnes@curl.com>
9028
9029 * opncls.c (_bfd_new_bfd_contained_in): Check return value of
9030 _bfd_new_bfd.
9031
9032 2002-05-03 H.J. Lu (hjl@gnu.org)
9033
9034 * elfxx-mips.c (mips_elf_link_hash_entry): Add forced_local.
9035 (mips_elf_link_hash_newfunc): Initialize forced_local to false.
9036 (mips_elf_record_global_got_symbol): Call _bfd_mips_elf_hide_symbol
9037 to hide a global symbol.
9038 (_bfd_mips_elf_hide_symbol): Return if forced_local is true. Set
9039 forced_local to true.
9040
9041 2002-05-02 Richard Henderson <rth@redhat.com>
9042
9043 * elf64-alpha.c (elf64_alpha_relocate_section): Force relative relocs
9044 vs SHN_UNDEF to zero.
9045
9046 2002-05-02 Alan Modra <amodra@bigpond.net.au>
9047
9048 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_SECTOFF>): Change to a
9049 16 bit reloc.
9050 <R_PPC64_SECTOFF_DS>: Likewise.
9051 (ppc64_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
9052 SECTOFF reloc.
9053 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_SECTOFF>): Correct.
9054 (ppc_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
9055 SECTOFF reloc.
9056
9057 * elf64-ppc.c (ppc64_elf_addr16_ha_reloc): Delete.
9058 (ppc64_elf_ha_reloc): New function.
9059 (ppc64_elf_brtaken_reloc): New function.
9060 (ppc64_elf_sectoff_reloc): New function.
9061 (ppc64_elf_sectoff_ha_reloc): New function.
9062 (ppc64_elf_toc_reloc): New function.
9063 (ppc64_elf_toc_ha_reloc): New function.
9064 (ppc64_elf_toc64_reloc): New function.
9065 (ppc64_elf_unhandled_reloc): New function.
9066 (ppc64_elf_howto_raw): Use the above.
9067 <R_PPC64_RELATIVE>: Mark pc_relative, pcrel_offset.
9068 <R_PPC64_SECTOFF>: Not pc_relative or pcrel_offset. Fix dst_mask.
9069 <R_PPC64_SECTOFF_DS>: Likewise.
9070 (IS_ABSOLUTE_RELOC): Update.
9071 (struct ppc_link_hash_table): Add have_undefweak.
9072 (ppc64_elf_link_hash_table_create): Init.
9073 (func_desc_adjust): Set have_undefweak.
9074 (ppc64_elf_func_desc_adjust): Call func_desc_adjust earlier. Only
9075 add the .sfpr blr when have_undefweak.
9076 (ppc64_elf_setup_section_lists): Check hash table flavour.
9077 (ppc64_elf_next_input_section): Move output_section->owner test to
9078 ppc64elf.em.
9079 (ppc64_elf_set_toc): Rename to ppc64_elf_toc, remove info param
9080 and relocatable test. Return TOCstart and don't set elf_gp.
9081 (ppc64_elf_relocate_section): Correct BRTAKEN/BRNTAKEN branch
9082 offset calculation. Add assert on weak sym branch tweaks.
9083 * elf64-ppc.h (ppc64_elf_set_toc): Delete.
9084 (ppc64_elf_toc): Declare.
9085 (ppc64_elf_next_input_section): Update.
9086
9087 2002-05-01 Alan Modra <amodra@bigpond.net.au>
9088
9089 * syms.c (_bfd_stab_section_find_nearest_line): Don't bomb on NULL
9090 file_name.
9091
9092 2002-05-01 Alan Modra <amodra@bigpond.net.au>
9093
9094 * elf64-ppc.c (CROR_151515, CROR_313131): Define.
9095 (ppc64_elf_relocate_section): Use them. Don't look for plt calls
9096 on R_PPC64_ADDR24 relocs. Require a nop or no link reg on plt
9097 call branches. Correct undefined weak destination.
9098 (ppc64_elf_func_desc_adjust): Always create at least one blr in
9099 .sfpr, and correct case where either only savef* or restf* is
9100 needed.
9101
9102 Long branch stubs, multiple stub sections.
9103 * elf64-ppc.h (ppc64_elf_setup_section_lists): Declare.
9104 (ppc64_elf_next_input_section): Declare.
9105 * elf64-ppc.c: Move linker-only prototypes.
9106 (STUB_SUFFIX): Define.
9107 (enum ppc_stub_type): New.
9108 (struct ppc_stub_hash_entry): New.
9109 (struct ppc_branch_hash_entry): New.
9110 (struct ppc_link_hash_entry): Add stub_cache, oh.
9111 (struct ppc_link_hash_table): Add stub_hash_table etc. Remove
9112 sstub. Add sbrlt, srelbrlt, has_14bit_branch, stub_iteration.
9113 Rename plt_overflow to stub_error.
9114 (ppc_stub_hash_lookup): Define.
9115 (ppc_branch_hash_lookup): Define.
9116 (stub_hash_newfunc): New function.
9117 (branch_hash_newfunc): New function.
9118 (link_hash_newfunc): Init new fields.
9119 (ppc64_elf_link_hash_table_create): Likewise.
9120 (ppc64_elf_link_hash_table_free): New function.
9121 (ppc_stub_name): New function.
9122 (ppc_get_stub_entry): New function.
9123 (ppc_add_stub): New function.
9124 (create_linkage_sections): Use bfd_make_section_anyway. Create
9125 .branch_lt and .rela.branch_lt sections. Don't create .stub.
9126 (ppc64_elf_check_relocs): Set has_14bit_branch on R_PPC64_REL14*,
9127 and set up for plt call stubs. Link func and func desc syms.
9128 (ppc64_elf_gc_sweep_hook): Handle REL14* as per REL24.
9129 (func_desc_adjust): Avoid hash lookup when func desc sym available
9130 via shortcut, and set links when processing.
9131 (ppc64_elf_hide_symbol): Likewise.
9132 (allocate_dynrelocs): Don't allocate stub section here.
9133 (ppc64_elf_size_dynamic_sections): Handle sbrlt and srelbrlt.
9134 Remove sstub code.
9135 (ppc_type_of_stub): New function.
9136 (build_one_stub): Delete.
9137 (ppc_build_one_stub): New function.
9138 (ppc_size_one_stub): New function.
9139 (ppc64_elf_setup_section_lists): New function.
9140 (ppc64_elf_next_input_section): New function.
9141 (group_sections): New function.
9142 (get_local_syms): New function.
9143 (ppc64_elf_size_stubs): Rewrite.
9144 (ppc64_elf_build_stubs): Rewrite.
9145 (ppc64_elf_relocate_section): Look up stub entry for REL24
9146 relocs. Don't propagate REL14* to dynamic objects. Look for long
9147 branch stubs if REL14* or REL24 relocs won't reach.
9148 (bfd_elf64_bfd_link_hash_table_free): Define.
9149
9150 2002-04-30 Mark Mitchell <mark@codesourcery.com>
9151
9152 * config.bfd: Add support for powerpc-*-windiss.
9153
9154 2002-04-30 Tom Rix <trix@redhat.com>
9155
9156 * xcofflink.c (xcoff_link_add_symbols): Always copy undef C_EXT
9157 symbol names into the hash table.
9158
9159 2002-04-28 Tom Rix <trix@redhat.com>
9160
9161 * coff-rs6000.c (xcoff_calculate_relocation) : Function table for
9162 calulating relocations.
9163 (xcoff_complain_overflow) : Function table for relocation errors.
9164 (xcoff_ppc_relocate_section): Use relocation and complain function
9165 tables.
9166 (xcoff_complain_overflow_unsigned_func): New complain function.
9167 (xcoff_complain_overflow_signed_func): Same.
9168 (xcoff_complain_overflow_bitfield_func): Same.
9169 (xcoff_complain_overflow_dont_func): Same.
9170 (xcoff_reloc_type_crel): New recot function.
9171 (xcoff_reloc_type_br): Same.
9172 (xcoff_reloc_type_ba): Same.
9173 (xcoff_reloc_type_toc): Same.
9174 (xcoff_reloc_type_rel): Same.
9175 (xcoff_reloc_type_neg): Same.
9176 (xcoff_reloc_type_pos): Same.
9177 (xcoff_reloc_type_fail): Same.
9178 (xcoff_reloc_type_noop): Same.
9179 * libxcoff.h : Declare common parts for xcoff64.
9180 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Use relocation
9181 and complain function tables.
9182
9183 2002-04-28 Alan Modra <amodra@bigpond.net.au>
9184
9185 * elf64-x86-64.c (struct elf64_x86_64_dyn_relocs): Comment typo.
9186 * elf32-hppa.c (elf32_hppa_final_link): Formatting.
9187
9188 2002-04-26 Alan Modra <amodra@bigpond.net.au>
9189
9190 * opncls.c (bfd_make_readable): Call bfd_section_list_clear.
9191 * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
9192
9193 * elflink.h (elf_bfd_final_link): Ensure input bfd class is the
9194 same as the output before calling elf_link_input_bfd.
9195
9196 * coffcode.h (coff_compute_section_file_positions): Set
9197 section_tail after shuffling section list.
9198
9199 2002-04-24 Christian Groessler <chris@groessler.org>
9200
9201 * coff-z8k.c (extra_case): Fix R_IMM32 relocations: The
9202 addresses are 23bit with a special layout, not plain 32bit
9203 values. Prevent relocation of immediate values.
9204
9205 2002-04-24 Chris G. Demetriou <cgd@broadcom.com>
9206
9207 * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): If MDMX or
9208 MIPS-16 ASE flags are set, print something to indicate that.
9209
9210 2002-04-23 Alan Modra <amodra@bigpond.net.au>
9211
9212 * elf32-hppa.c (hppa_type_of_stub): Correct and simplify condition
9213 under which a plt call stub is used.
9214 (final_link_relocate): Similarly.
9215 (allocate_plt_static): Clear h-plabel except when plt entry is
9216 exclusively used for a plabel.
9217 (allocate_dynrelocs): Use the above to simplify plt sizing.
9218 (struct elf32_hppa_link_hash_table): Add has_22bit_branch.
9219 (elf32_hppa_link_hash_table_create): Init.
9220 (BL22_RP): Define.
9221 (hppa_build_one_stub): Use BL22_RP if has_22bit_branch.
9222 (elf32_hppa_check_relocs): Set has_22bit_branch.
9223
9224 * elf32-hppa.c (elf32_hppa_check_relocs): Remove debug message.
9225 (final_link_relocate): Likewise.
9226
9227 2002-04-22 Jakub Jelinek <jakub@redhat.com>
9228
9229 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't build
9230 search table if some FDE is DW_EH_PE_aligned encoded either.
9231 (_bfd_elf_write_section_eh_frame): Handle terminating FDE specially.
9232
9233 2002-04-22 Richard Smith <richard@ex-parrot.com>
9234 Jakub Jelinek <jakub@redhat.com>
9235
9236 * elf-eh-frame.c (struct eh_cie_fde): Add per_encoding_relative.
9237 (_bfd_elf_discard_section_eh_frame): Set it for CIEs with pcrel
9238 encoded personality.
9239 (_bfd_elf_write_section_eh_frame): Adjust pcrel encoded personality
9240 for CIE/FDE removal.
9241
9242 2002-04-20 Tom Rix <trix@redhat.com>
9243
9244 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Fix C_FILE auxent.
9245
9246 2002-04-20 Alan Modra <amodra@bigpond.net.au>
9247
9248 * archures.c (bfd_lookup_arch): Move the list order comment..
9249 (struct bfd_arch_info): ..to where it belongs.
9250 * bfd-in2.h: Regenerate.
9251
9252 * archures.c (bfd_lookup_arch): Add comment on list order.
9253 (bfd_default_set_arch_mach): Use bfd_lookup_arch.
9254 * cpu-powerpc.c (bfd_powerpc_archs): Re-order so that the default
9255 is always at head of list.
9256
9257 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
9258
9259 * coff-arm.c (coff_thumb_pcrel_12, coff_thumb_pcrel_9,
9260 insert_thumb_branch, record_thumb_to_arm_glue): Suppress
9261 definition of these functions for ARM_WINCE builds as they are
9262 not used.
9263 (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET): Do not define
9264 for ARM_WINCE builds.
9265
9266 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
9267
9268 * coff-arm.c (bfd_arm_process_before_allocation):
9269
9270 2002-04-17 J"orn Rennecke <joern.rennecke@superh.com>
9271
9272 * cpu-sh.c (scan_mach): Delete.
9273 (arch_info_struct): Replace scan_mach with bfd_default_scan.
9274 (bfd_sh_arch): Likewise.
9275
9276 2002-04-16 Nick Clifton <nickc@cambridge.redhat.com>
9277
9278 * ihex.c (ihex_write_object_contents): Fix check for records
9279 crossing 64K boundaries.
9280
9281 2002-04-16 Alan Modra <amodra@bigpond.net.au>
9282
9283 * elf32-m32r.c (m32r_elf_add_symbol_hook): Check the hash table
9284 type rather than just assuming entries are ELF.
9285 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
9286 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
9287 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Likewise.
9288 * elf64-mmix.c (mmix_elf_add_symbol_hook): Use bfd_link_hash_entry
9289 rather than elf_link_hash_entry.
9290
9291 2002-04-15 Richard Henderson <rth@redhat.com>
9292
9293 * elf32-mips.c (mips_elf32_object_p): Revert 0404 fragment: allow
9294 n32 binaries.
9295
9296 2002-04-15 Michael Snyder <msnyder@redhat.com>
9297
9298 * opncls.c (bfd_close): Write contents if writeable.
9299 Minor formatting tidy-ups.
9300
9301 2002-04-15 Alan Modra <amodra@bigpond.net.au>
9302
9303 * elf32-ppc.c (ppc_elf_add_symbol_hook): Check the hash table type.
9304
9305 2002-04-12 Michael Snyder <msnyder@redhat.com>
9306
9307 * bfd-in.h (bfd_get_section_lma): New access macro.
9308 Minor white-space fix-up.
9309
9310 2002-04-12 Alan Modra <amodra@bigpond.net.au>
9311
9312 * elf.c (prep_headers): Don't zero EI_OSABI, EI_ABIVERSION or
9313 header pad.
9314
9315 2002-04-09 DJ Delorie <dj@redhat.com>
9316
9317 * elfarm-nabi.c (elf32_arm_howto_table): Fix ABS16 masks.
9318
9319 2002-04-09 Casper S. Hornstrup <chorns@users.sourceforge.net>
9320
9321 * coffcode.h (coff_read_word): New.
9322 (coff_compute_checksum): New.
9323 (coff_apply_checksum): New.
9324 (coff_write_object_contents): Call coff_apply_checksum () to
9325 apply checksum to PE image.
9326
9327 2002-04-08 Randolph Chung <tausq@debian.org>
9328
9329 * elf32-hppa.c (hppa_unwind_entry_compare): Move to elf-hppa.h.
9330 (elf32_hppa_final_link): Split out sorting logic to..
9331 * elf-hppa.h (elf_hppa_sort_unwind): ..here.
9332 (elf_hppa_final_link): Call elf_hppa_sort_unwind.
9333
9334 2002-04-07 Andrew Cagney <ac131313@redhat.com>
9335
9336 * configure.in: Add missing ``|'' to powerpc-*-aix4.[4-9]*
9337 pattern.
9338 * configure: Re-generate.
9339
9340 2002-04-07 Andrew Cagney <ac131313@redhat.com>
9341
9342 * configure.in: Only define AIX_CORE_DUMPX_CORE when AIX version
9343 is greater or equal to 4.3.3.
9344 * configure: Regenerate.
9345 Fix PR gdb/344.
9346
9347 2002-04-05 Hans-Peter Nilsson <hp@axis.com>
9348
9349 * elf32-cris.c (cris_elf_howto_table) <R_CRIS_16_PCREL,
9350 R_CRIS_32_PCREL>: Fix typo in name.
9351 (cris_elf_check_relocs): Always create .rela.got here when
9352 R_CRIS_16_GOTPLT or R_CRIS_32_GOTPLT is seen.
9353 (elf_cris_adjust_gotplt_to_got): Don't create .rela.got here;
9354 assume it's created.
9355
9356 2002-04-04 Daniel Jacobowitz <drow@mvista.com>
9357
9358 * aout-adobe.c (aout_32_bfd_link_hash_table_free): Define.
9359 * aout-target.h (MY_bfd_link_hash_table_free): Conditionally
9360 define.
9361 * aout-tic30.c (MY_bfd_link_hash_table_free): Likewise.
9362 * bfd.c (bfd_link_hash_table_free): Define.
9363 * binary.c (binary_bfd_link_hash_table_free): Define.
9364 * bout.c (b_out_bfd_link_hash_table_free): Define.
9365 * coff-rs6000.c (rs6000coff_vec): Include
9366 _bfd_generic_link_hash_table_free.
9367 (pmac_xcoff_vec): Likewise.
9368 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
9369 (aix5coff64_vec): Likewise.
9370 * coffcode.h (coff_bfd_link_hash_table_free): Conditionally define.
9371 * elf-m10300.c (elf32_mn10300_link_hash_table_free): New function.
9372 (bfd_elf32_bfd_link_hash_table_free): Define.
9373 * elf32-hppa.c (elf32_hppa_link_hash_table_free): New function.
9374 (bfd_elf32_bfd_link_hash_table_free): Define.
9375 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Conditionally
9376 define.
9377 * i386msdos.c (msdos_bfd_link_hash_table_free): Define.
9378 * i386os9k.c (os9k_bfd_link_hash_table_free): Define.
9379 * ieee.c (ieee_bfd_link_hash_table_free): Define.
9380 * ihex.c (ihex_bfd_link_hash_table_free): Define.
9381 * libbfd-in.h (_bfd_nolink_bfd_link_hash_table_free): Define.
9382 (_bfd_generic_link_hash_table_free): Add prototype.
9383 * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Add prototype.
9384 * libecoff.h (_bfd_ecoff_bfd_link_hash_table_free): Define.
9385 * linker.c (_bfd_generic_link_hash_table_free): New function.
9386 * mmo.c (mmo_bfd_link_hash_table_free): Define.
9387 * nlm-target.h (nlm_bfd_link_hash_table_free): Define.
9388 * oasys.c (oasys_bfd_link_hash_table_free): Define.
9389 * ppcboot.c (ppcboot_bfd_link_hash_table_free): Define.
9390 * som.c (som_bfd_link_hash_table_free): Define.
9391 * srec.c (srec_bfd_link_hash_table_free): Define.
9392 * tekhex.c (tekhex_bfd_link_hash_table_free): Define.
9393 * versados.c (versados_bfd_link_hash_table_free): Define.
9394 * vms.c (vms_bfd_link_hash_table_free): New function.
9395 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_free): New function.
9396
9397 * coff-arm.c (coff_arm_link_hash_table_create): Use bfd_malloc
9398 instead of bfd_alloc.
9399 * coff-h8300.c (h8300_coff_link_hash_table_create): Likewise.
9400 * coff-mcore.c (coff_mcore_link_hash_table_create): Likewise.
9401 * coff-ppc.c (ppc_coff_link_hash_table_create): Likewise.
9402 * cofflink.c (_bfd_coff_link_hash_table_create): Likewise.
9403 * ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
9404 * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise.
9405 * elf.c (_bfd_elf_link_hash_table_create): Likewise.
9406 * elf32-arm.h (elf32_arm_link_hash_table_create): Likewise.
9407 * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
9408 * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise.
9409 * elf32-i386.c (elf_i386_link_hash_table_create): Likewise.
9410 * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
9411 * elf32-s390.c (elf_s390_link_hash_table_create): Likewise.
9412 * elf32-sh.c (sh_elf_link_hash_table_create): Likewise.
9413 * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create): Likewise.
9414 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
9415 * elf64-s390.c (elf_s390_link_hash_table_create): Likewise.
9416 * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise.
9417 * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create): Likewise.
9418 * elf64-x86-64.c (elf64_x86_64_link_hash_table_create): Likewise.
9419 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
9420 * linker.c (_bfd_generic_link_hash_table_create): Likewise.
9421 * m68klinux.c (linux_link_hash_table_create): Likewise.
9422 * sparclinux.c (linux_link_hash_table_create): Likewise.
9423 * sunos.c (sunos_link_hash_table_create): Likewise.
9424 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise.
9425
9426 * targets.c: Add _bfd_link_hash_table_free to xvec.
9427
9428 * bfd-in2.h: Regenerate.
9429 * libbfd.h: Regenerate.
9430 * libcoff.h: Regenerate.
9431
9432 2002-04-04 Alan Modra <amodra@bigpond.net.au>
9433
9434 * dep-in.sed: Cope with absolute paths.
9435 * Makefile.am (dep.sed): Subst TOPDIR, and not INCDIR.
9436 Run "make dep-am".
9437 * Makefile.in: Regenerate.
9438 * coff-arm.c: Fix copyright date.
9439 * cpu-h8300.c: Likewise.
9440 * cpu-i370.c: Likewise.
9441 * cpu-s390.c: Likewise.
9442 * cpu-mips.c: Likewise.
9443 * po/SRC-POTFILES.in: Regenerate.
9444
9445 2002-04-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
9446
9447 * Makefile.am: Add elfxx-mips.c to the known backends.
9448 (elf32-mips.lo): remove dependency to coff/external.h.
9449 * Makefile.in: Regenerate.
9450 * configure.in: Add elfxx-mips.lo to all vectors using elf32-mips.lo
9451 Remove elf32-mips.lo from 64 bit vectors. Update dependencies
9452 accordingly.
9453 * configure: Regenerate.
9454 * elf-bfd.h: Move all MIPS ELF specific prototypes to elfxx-mips.h.
9455 (irix_compat_t): IRIX compatibility level, moved from elf32-mips.c.
9456 (elf_backend_mips_irix_compat, elf_backend_mips_rtype_to_howto): New
9457 MIPS specific backend functions.
9458 * elf32-mips.c: Moved most code to elfxx-mips.c.
9459 (mips_elf_hi16_reloc): Rename from _bfd_mips_elf_hi16_reloc and make
9460 static.
9461 (mips_elf_lo16_reloc): Likewise, was _bfd_mips_elf_lo16_reloc.
9462 (mips_elf_got16_reloc): Likewise, was _bfd_mips_elf_got16_reloc.
9463 (mips_elf_gprel32_reloc): Likewise, was _bfd_mips_elf_gprel32_reloc.
9464 (mips_elf32_rtype_to_howto): Rename from mips_rtype_to_howto. Changed
9465 interface to allow selection of the right REL or RELA howto table.
9466 (mips_elf32_object_p): Rename from _bfd_mips_elf_object_p and made
9467 static. Let it refuse n32 objects.
9468 (elf32_mips_grok_prstatus): Rename from _bfd_elf32_mips_grok_prstatus.
9469 (elf32_mips_grok_psinfo): Rename from _bfd_elf32_mips_grok_psinfo.
9470 (elf32_mips_discard_info): Rename from _bfd_elf32_mips_discard_info.
9471 (elf32_mips_ignore_discarded_relocs): Rename from
9472 _bfd_elf32_mips_ignore_discarded_relocs.
9473 (elf32_mips_write_section): Rename from _bfd_elf32_mips_write_section.
9474 (elf32_mips_irix_compat): New function, replaces IRIX_COMPAT.
9475 (elf_mips_howto_table_rela): Remove.
9476 * elf64-mips.c: Moved most code to elfxx-mips.c.
9477 (bfd_elf64_bfd_reloc_type_lookup): Make static.
9478 (mips_elf64_rtype_to_howto): New function.
9479 (mips_elf64_object_p): Likewise.
9480 (elf64_mips_irix_compat): Likewise.
9481 * elfxx-mips.c: New file containing common code merged together from
9482 elf32-mips.c and elf64-mips.c.
9483 * elfxx-mips.h: New file containing MIPS specific prototypes from
9484 elf-bfd.h.
9485 * elfxx-target.h: Add handling for elf_backend_mips_irix_compat and
9486 elf_backend_mips_rtype_to_howto.
9487
9488 2002-04-04 Alan Modra <amodra@bigpond.net.au>
9489
9490 * srec.c (MAXCHUNK, Chunk): Revise comments.
9491 (srec_write_record): Correct buffer size.
9492 (srec_write_header): Do without intermediate buffer.
9493 (srec_write_section): Validate Chunk.
9494 (srec_write_terminator): Pass NULL instead of dummy buffer.
9495 (srec_write_symbols): Pass file and symbol names directly to
9496 bfd_bwrite so sprintf won't overflow buffer.
9497
9498 2002-04-03 Jakub Jelinek <jakub@redhat.com>
9499
9500 * elf32-sparc.c (elf32_sparc_relocate_section): Don't emit dynamic
9501 PC relative relocs against hidden symbols.
9502 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
9503
9504 2002-04-03 Alan Modra <amodra@bigpond.net.au>
9505
9506 * elf.c (_bfd_elf_make_section_from_shdr): When setting section
9507 LMAs, loop over segments until p_vaddr and p_memsz specify an
9508 extent enclosing the section.
9509
9510 2002-04-02 Nick Clifton <nickc@cambridge.redhat.com>
9511
9512 * ihex.c (ihex_write_object_contents): Do not allow records to
9513 cross a 64K boundary - wrap if necessary.
9514
9515 2002-04-01 Nathan Williams <nathanw@wasabisystems.com>
9516
9517 * elf.c (elfcore_netbsd_get_lwpid): Fix off-by-one error
9518 which caused the returned LWP ID to always be 0.
9519
9520 2002-04-01 Richard Henderson <rth@redhat.com>
9521
9522 * elf32-sparc.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
9523 (elf32_sparc_relocate_section): Use it to figure out when to
9524 initialize .got entries.
9525 * elf64-sparc.c: Similarly.
9526
9527 2002-03-28 Alan Modra <amodra@bigpond.net.au>
9528
9529 * linker.c (link_action): Ignore duplicate warning syms.
9530 (_bfd_generic_link_write_global_symbol): Follow warning symbol link.
9531 * elflink.h (elf_adjust_dynstr_offsets): Likewise.
9532 (elf_adjust_dynamic_symbol): Likewise.
9533 (elf_export_symbol): Likewise.
9534 (elf_link_find_version_dependencies): Likewise.
9535 (elf_link_assign_sym_version): Likewise.
9536 (elf_link_sec_merge_syms): Likewise.
9537 (elf_link_output_extsym): Likewise.
9538 (elf_gc_sweep_symbol): Likewise.
9539 (elf_gc_propagate_vtable_entries_used): Likewise.
9540 (elf_gc_smash_unused_vtentry_relocs): Likewise.
9541 (elf_gc_allocate_got_offsets): Likewise.
9542 (elf_collect_hash_codes): Likewise.
9543 * elflink.c (elf_link_renumber_hash_table_dynsyms): Likewise.
9544 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
9545 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
9546 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
9547 * elf32-arm.h (elf32_arm_discard_copies): Likewise.
9548 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Likewise.
9549 (elf_cris_discard_excess_dso_dynamics): Likewise.
9550 * elf32-hppa.c (clobber_millicode_symbols): Likewise.
9551 (mark_PIC_calls): Likewise.
9552 (allocate_plt_static): Likewise.
9553 (allocate_dynrelocs): Likewise.
9554 (readonly_dynrelocs): Likewise.
9555 * elf32-i386.c (allocate_dynrelocs): Likewise.
9556 (readonly_dynrelocs): Likewise.
9557 * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
9558 * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
9559 * elf32-mips.c (mips_elf_output_extsym): Likewise.
9560 (mips_elf_sort_hash_table_f): Likewise.
9561 (mips_elf_check_mips16_stubs): Likewise.
9562 * elf32-s390.c (allocate_dynrelocs): Likewise.
9563 (readonly_dynrelocs): Likewise.
9564 * elf32-sh.c (sh_elf_discard_copies): Likewise.
9565 * elf32-xstormy16.c (xstormy16_relax_plt_check): Likewise.
9566 (xstormy16_relax_plt_realloc): Likewise.
9567 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
9568 (elf64_alpha_output_extsym): Likewise.
9569 * elf64-hppa.c (elf64_hppa_mark_exported_functions): Likewise.
9570 * elf64-mips.c (mips_elf64_sort_hash_table_f): Likewise.
9571 (mips_elf64_check_mips16_stubs): Likewise.
9572 (mips_elf64_output_extsym): Likewise.
9573 * elf64-ppc.c (func_desc_adjust): Likewise.
9574 (allocate_dynrelocs): Likewise.
9575 (readonly_dynrelocs): Likewise.
9576 * elf64-s390.c (allocate_dynrelocs): Likewise.
9577 (readonly_dynrelocs): Likewise.
9578 * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
9579 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
9580 (readonly_dynrelocs): Likewise.
9581 * elfxx-ia64.c (elfNN_ia64_global_dyn_sym_thunk): Likewise.
9582 * aoutx.h (aout_link_write_other_symbol): Likewise.
9583 * cofflink.c (_bfd_coff_write_task_globals): Likewise.
9584 (_bfd_coff_write_global_sym): Likewise.
9585 * i386linux.c (linux_tally_symbols): Likewise.
9586 * m68klinux.c (linux_tally_symbols): Likewise.
9587 * sparclinux.c (linux_tally_symbols): Likewise.
9588 * pdp11.c (aout_link_write_other_symbol): Likewise.
9589 * sunos.c (sunos_scan_dynamic_symbol): Likewise.
9590 * xcofflink.c (xcoff_build_ldsyms): Likewise.
9591 (xcoff_write_global_symbol): Likewise.
9592
9593 * cofflink.c (_bfd_coff_final_link): Formatting.
9594 * cpu-mips.c (mips_compatible): Make static, prototype.
9595 * elf32-i386.c (elf_i386_check_relocs): Formatting.
9596 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
9597 * elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
9598 * elf64-mips.c (mips_elf64_sort_hash_table): Likewise.
9599 (mips_elf64_final_link): Likewise.
9600 * elflink.h (elf_link_find_version_dependencies): Remove duplicate
9601 prototype.
9602
9603 2002-03-27 Nick Clifton <nickc@cambridge.redhat.com>
9604
9605 * coff-arm.c (SWAP_IN_RELOC_OFFSET): Define.
9606 (SWAP_OUT_RELOC_OFFSET): Define.
9607
9608 2002-03-27 Gregory Steuck <greg@nest.cx>
9609
9610 * elf.c (_bfd_elf_get_symtab_upper_bound): Leave space for
9611 terminating NULL if empty symbol table.
9612 (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise.
9613
9614 2002-03-26 H.J. Lu (hjl@gnu.org)
9615
9616 * elflink.h (elf_link_input_bfd): Revert the last change since
9617 the gcc exception handling isn't fixed yet.
9618
9619 2002-03-26 H.J. Lu (hjl@gnu.org)
9620
9621 * elflink.h (elf_link_input_bfd): Complain about relocations
9622 against local symbols in discarded sections.
9623
9624 2002-03-26 Alan Modra <amodra@bigpond.net.au>
9625
9626 * elflink.h (elf_gc_mark): Don't recurse into non-ELF sections.
9627
9628 2002-03-23 Alan Modra <amodra@bigpond.net.au>
9629
9630 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
9631 section file offset for !SEC_LOAD sections.
9632
9633 2002-03-21 Richard Earnshaw <rearnsha@arm.com>
9634
9635 * elf32-arm.h (elf32_arm_final_link_relocate <case R_ARM_GOTOFF>,
9636 <case R_ARM_GOT>): Handle relocations to Thumb functions.
9637
9638 2002-03-21 Alan Modra <amodra@bigpond.net.au>
9639
9640 * coff64-rs6000.c (_bfd_xcoff64_put_symbol_name): Prototype.
9641 Whitespace changes.
9642 * archive.c: Update copyright date.
9643 * bfd-in2.h: Regenerate.
9644 * libbfd.h: Regenerate.
9645 * Makefile.am: Run "make dep-am"
9646 * Makefile.in: Regenerate.
9647 * po/SRC-POTFILES.in: Regenerate.
9648
9649 2002-03-20 Daniel Jacobowitz <drow@mvista.com>
9650
9651 * dwarf2.c (struct funcinfo): Move up.
9652 (lookup_address_in_function_table): New argument function_ptr.
9653 Set it.
9654 (lookup_address_in_line_table): New argument function. If function
9655 is non-NULL, use it to handle ``addr'' before the first line note of
9656 the function.
9657 (comp_unit_find_nearest_line): Update and swap calls to
9658 lookup_address_in_function_table and lookup_address_in_line_table.
9659 * syms.c (_bfd_stab_section_find_nearest_line): Use the first
9660 N_SLINE encountered if we see an N_FUN before any N_SLINE.
9661
9662 2002-03-20 Tom Rix <trix@redhat.com>
9663
9664 * coff-rs6000.c (_bfd_xcoff_stat_arch_elt): Renamed from
9665 _bfd_xcoff_generic_stat_arch_elt. Fix format check.
9666 * coff64-rs6000.c : Use _bfd_xcoff_stat_arch_elt.
9667
9668 2002-03-19 Tom Rix <trix@redhat.com>
9669
9670 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through all
9671 dynamic objects in archives.
9672
9673 2002-03-19 Hans-Peter Nilsson <hp@bitrange.com>
9674
9675 * elflink.h (NAME(bfd_elf,record_link_assignment)): Don't set
9676 STT_NOTYPE symbols to STT_OBJECT.
9677
9678 2002-03-18 Jan Hubicka <jh@suse.cz>
9679
9680 * cpu-i386.c (bfd_x86_64_arch): Rename to "i386:x86-64"
9681
9682 2002-03-18 Tom Rix <trix@redhat.com>
9683
9684 * aix5ppc.core.c : New file for AIX 5 64 bit core support.
9685 * bfd-in.h : Add bfd_xcoff_ar_archive_set_magic declaration.
9686 * coff-rs6000 (do_pad) : New function for archive padding.
9687 (do_copy) : New function for object file copying in archives.
9688 (do_shared_object_padding) : New function for padding shared
9689 objects to their text section alignment in archives.
9690 (bfd_xcoff_ar_achive_set_magic) : Stub.
9691 (xcoff_write_armap_big) : Use do_copy and do_pad.
9692 (xcoff_write_archive_contents_big) : Use do_shared_object_padding,
9693 do_copy and do_pad.
9694 * coff64-rs6000.c (xcoff64_write_ojbect_contents) : Use
9695 bfd_xcoff_magic_number.
9696 (xcoff64_bad_format_hook) : New function for _bfd_bad_format_hook
9697 fop.
9698 (xcoff_backend_data_r) : Use xcoff64_bad_format_hook.
9699 (bfd_xcoff_aix5_backend_data) : New Aix 5 backend data.
9700 (aix5coff64_vec) : New Aix 5 target aix5coff64-rs6000.
9701 * rs6000-core.c : Update copyright date.
9702 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Check for NULL
9703 csectpp.
9704 * coffcode.h (coff_new_section_hook) : Use new accessor macros.
9705 (coff_set_arch_mach_hook) : Add Aix 5 U64_TOCMAGIC magic #.
9706 (coff_set_flags) : Use bfd_xcoff_magic_number.
9707 * libxcoff.h (bfd_xcoff_is_xcoff64): Add U64_TOCMAGIC.
9708 * configure.in : Add powerpc-*-aix5 and rs6000-*-aix5 support.
9709 * Makefile.am : Same.
9710 * config.bfd : Same.
9711 * targets.c : Same.
9712 * configure : Regnerate.
9713 * Makefile.in : Same.
9714 * bfd-in2.h : Same.
9715
9716 2002-03-18 Nick Clifton <nickc@cambridge.redhat.com>
9717
9718 * po/fr.po: Updated version.
9719
9720 2002-03-18 Alan Modra <amodra@bigpond.net.au>
9721
9722 * libbfd.c (bfd_write_bigendian_4byte_int): Return true iff success.
9723 * libbfd.h: Regenerate.
9724 * archive.c (coff_write_armap): Pass on failures from
9725 bfd_write_bigendian_4byte_int.
9726
9727 2002-03-14 H.J. Lu <hjl@gnu.org>
9728
9729 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the BFD
9730 error to bfd_error_nonrepresentable_section for reinit_array
9731 section in DSO.
9732
9733 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
9734
9735 * coffcode.h (coff_slurp_symbol_table): When adding BSF_WEAK flag,
9736 OR it in rather than replacing previously selected flags.
9737
9738 * elfxx-target.h (TARGET_BIG_SYM): Set ar_max_namelen to 15.
9739 (TARGET_LITTLE_SYM): Set ar_max_namelen to 15.
9740
9741 2002-03-14 Alan Modra <amodra@bigpond.net.au>
9742
9743 * cpu-mips.c (mips_compatible): New. Don't check bits_per_word.
9744 (N): Use the above.
9745 * elflink.h (elf_bfd_final_link): Revert last change. Instead,
9746 ensure reloc size matches before calling elf_link_input_bfd.
9747 Add an assert to check reloc size when counting output relocs.
9748
9749 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
9750
9751 * mmo.c (mmo_get_loc): Return NULL rather than false.
9752
9753 2002-03-13 Nick Clifton <nickc@cambridge.redhat.com>
9754
9755 * po/fr.po: Updated version.
9756
9757 2002-03-13 Alan Modra <amodra@bigpond.net.au>
9758
9759 * archures.c (bfd_default_compatible): Test bits_per_word.
9760 * cpu-i386.c (i386_compatible): Remove. Replace occurrences with
9761 bfd_default_compatible.
9762 * cpu-i370.c (i370_compatible): Likewise.
9763 * cpu-sparc.c (sparc_compatible): Likewise.
9764 * cpu-h8300.c (compatible): Test in->arch == out->arch.
9765
9766 * elflink.h: Formatting fixes.
9767 (elf_link_output_extsym): Merge undefined and undef weak cases.
9768
9769 * elflink.h (elf_bfd_final_link): Only call elf_link_input_bfd
9770 when word size of input matches output word size.
9771
9772 2002-03-12 Andreas Jaeger <aj@suse.de>
9773
9774 * cpu-i386.c (i386_compatible): New. Use it instead of
9775 bfd_default_compatible.
9776
9777 2002-03-07 H.J. Lu (hjl@gnu.org)
9778
9779 * coff-sh.c (shcoff_reloc_map): Use bfd_reloc_code_real_type
9780 as the type for bfd_reloc_val.
9781
9782 2002-03-05 John David Anglin <dave@hiauly1.hia.nrc.ca>
9783
9784 * elf-hppa.h (elf_hppa_is_dynamic_loader_symbol): New function.
9785 (elf_hppa_relocate_section): Ignore undefined dynamic loader symbols.
9786 (elf_hppa_final_link_relocate): Correct relocations for indirect
9787 references to local data through the DLT. Fix .opd creation for
9788 local symbols using R_PARISC_LTOFF_FPTR32 and R_PARISC_FPTR64
9789 relocations. Use e_lsel selector for R_PARISC_DLTIND21L,
9790 R_PARISC_LTOFF_FPTR21L and R_PARISC_LTOFF_TP21L as per
9791 "Processor-Specific ELF for PA_RISC, Version 1.43" document.
9792 Similarly, use e_rsel for DLT and LTOFF 'R' relocations.
9793 * elf32-hppa.c (final_link_relocate): Revise relocation selectors
9794 as per "Processor-Specific ELF for PA_RISC, Version 1.43" document.
9795
9796 2002-03-05 Jakub Jelinek <jakub@redhat.com>
9797
9798 * merge.c (_bfd_merge_sections): Don't segfault if there
9799 is nothing to merge due to GC.
9800
9801 2002-03-05 Alan Modra <amodra@bigpond.net.au>
9802
9803 * elf32-hppa.c (clobber_millicode_symbols): Remove hack to keep
9804 symbols that have been forced local.
9805
9806 * elflink.h (elf_bfd_final_link): Call elf_link_output_extsym
9807 to output forced local syms for non-shared link.
9808 (elf_link_output_extsym): Tweak condition for calling backend
9809 adjust_dynamic_symbol so that previous behaviour is kept.
9810 Whitespace changes throughout file.
9811
9812 2002-03-04 H.J. Lu <hjl@gnu.org>
9813
9814 * elf.c (bfd_section_from_shdr): Handle special sections,
9815 .init_array, .fini_array and .preinit_array.
9816 (elf_fake_sections): Likewise.
9817
9818 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Create the
9819 DT entry only if the section is in output for .init_array,
9820 .fini_array and .preinit_array. Complain about .preinit_array
9821 section in DSO.
9822 (elf_bfd_final_link): Warn zero size for .init_array,
9823 .fini_array and .preinit_array sections.
9824
9825 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Remove
9826 SHT_INIT_ARRAY, SHT_FINI_ARRAY and SHT_PREINIT_ARRAY.
9827 (elfNN_ia64_fake_sections): Remove .init_array, .fini_array and
9828 .preinit_array.
9829
9830 2002-03-04 Alan Modra <amodra@bigpond.net.au>
9831
9832 * configure.in (WIN32LIBADD): Don't eval PICFLAG assignment.
9833 * configure: Regenerate.
9834
9835 2002-03-02 Tom Rix <trix@redhat.com>
9836
9837 * coff64-rs6000.c (xcoff64_howto_table): Replace howto types with
9838 symbolic equiv.
9839 * coff-rs6000.c (xcoff_howto_table): Same.
9840
9841 2002-03-01 David Mosberger <davidm@hpl.hp.com>
9842
9843 * elflink.h (size_dynamic_sections): If section named
9844 ".preinit_array" exists, create DT_PREINIT_ARRAY and
9845 DT_PREINIT_ARRAYSZ entries in dynamic table. Analogously for
9846 ".init_array" and ".fini_array".
9847 (elf_bfd_final_link): Handle DT_PREINIT_ARRAYSZ, DT_INIT_ARRAYSZ,
9848 DT_FINI_ARRAYSZ, DT_PREINIT_ARRAY, DT_INIT_ARRAY, and
9849 DT_FINI_ARRAY.
9850
9851 2002-02-26 Andrew Macleod <amacleod@cygnus.com>
9852
9853 * elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local
9854 dynsyms.
9855
9856 2002-02-25 Alan Modra <amodra@bigpond.net.au>
9857
9858 * elf64-hppa.h: Update copyright date.
9859
9860 * elf64-ppc.c (ppc64_elf_check_relocs): Warning fix.
9861 (ppc64_elf_relocate_section): Don't generate power4 style branch
9862 hints for *_BRTAKEN and *_BRNTAKEN relocs.
9863
9864 2002-02-22 Jakub Jelinek <jakub@redhat.com>
9865
9866 * elf64-sh64.c (sh_elf64_relocate_section): Fix a typo from my
9867 last patch.
9868 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
9869
9870 2002-02-21 Andreas Jaeger <aj@suse.de>
9871
9872 * elf64-x86-64.c: Major rework that introduces all recent changes
9873 to the x86-64 backend. Get a closer match to elf32-i386.
9874 (struct elf64_x86_64_dyn_relocs): Rename from
9875 elf64_x86_64_pcrel_relocs_copied, add additional fields. Change
9876 all users.
9877 (struct elf64_x86_64_link_hash_table): Add short cuts to some
9878 sections.
9879 (link_hash_newfunc): Rename from elf64_x86_64_link_hash_newfunc,
9880 remove casts, initialize new hash members.
9881 (create_got_section): New.
9882 (elf64_x86_64_create_dynamic_sections): New.
9883 (elf64_x86_64_copy_indirect_symbol): New.
9884 (elf64_x86_64_check_relocs): Don't allocate space for dynamic
9885 relocs, .got or .relgot here but do it in allocate_dynrelocs.
9886 Reference count possible .plt and .got entries. Don't test input
9887 section SEC_READONLY here to try to avoid copy relocs, and keep
9888 dyn_relocs regardless of ELF_LINK_NON_GOT_REF. Don't set
9889 DF_TEXTREL here. Delay setting of variables until needed. Cache
9890 pointer to "sreloc" section in elf_section_data. Tweak condition
9891 under which .got created. Report files with bad relocation
9892 section names.
9893 (elf64_x86_64_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
9894 Reference count possible .plt entries. Don't deallocate .got and
9895 .relgot space here.
9896 (elf64_x86_64_adjust_dynamic_symbol): Handle nocopyreloc. Don't
9897 do copy reloc processing for weakdefs. Remove redundant casts and
9898 aborts. Delay setting of vars until needed. Move creation of
9899 dynamic symbols and allocation of .plt and .rela.plt to
9900 allocate_dynrelocs. Replace BFD_ASSERT with abort.
9901 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
9902 (allocate_dynrelocs): New.
9903 (readonly_dynrelocs): New.
9904 (elf64_x86_64_size_dynamic_sections): Call readonly_dynrelocs.
9905 Allocate space for dyn relocs. Replace BFD_ASSERT with abort.
9906 Zero out the dynamic allocated content space.
9907 (elf64_x86_64_discard_copies): Removed.
9908 (elf64_x86_64_relocate_section): Make use of dynamic section
9909 short-cuts. Localise vars, and delay setting. Better error
9910 reporting, replace BFD_ASSERT with abort. Check
9911 ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined in the
9912 regular object file and tread the weak definition as the normal
9913 one. Don't discard relocs for undefweak or undefined symbols and
9914 check !DEF_REGULAR as well as DEF_DYNAMIC in test for avoided copy
9915 relocs.
9916 (elf64_x86_64_finish_dynamic_symbol): Don't copy relocs for
9917 symbols that have been forced local. Use same test to decide if
9918 we can use a relative reloc for got as relocate_section. Expand
9919 SHN_UNDEF comment. Move expressions out of function calls.
9920 Replace BFD_ASSERT with abort.
9921 (bfd_elf64_bfd_final_link): Removed.
9922 (elf_backend_copy_indirect_symbol): Define.
9923
9924 2002-02-20 Tom Rix <trix@redhat.com>
9925
9926 * coff-rs6000.c (xcoff_howto_table): Add 16 bit R_BA.
9927 (_bfd_xcoff_reloc_type_lookup): Use it.
9928 * coff64-rs6000.c (xcoff64_howto_table): Same.
9929 (xcoff64_reloc_type_lookup): Same.
9930
9931 2002-02-20 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
9932
9933 * osf-core.c (osf_core_vec): OSF/1 (Digital Unix) core files are
9934 little endian.
9935
9936 2002-02-19 Martin Schwidefsky <schwidefsky@de.ibm.com>
9937
9938 * archures.c (bfd_mach_s390_esa): Rename to bfd_mach_s390_31.
9939 (bfd_mach_s390_esame): Rename to bfd_mach_s390_64.
9940 * bfd-in2.h: Regenerate.
9941 * cpu-s390.c (arch_info_struct): Use renamed architecture defines.
9942 Replace architecture name "s390" with "s390:31-bit" and "s390:esame"
9943 with "s390:64-bit".
9944 * elf32-s390.c (elf_howto_table): Add 32 bit pc relative relocations.
9945 (elf_s390_reloc_type_lookup): Likewise.
9946 (elf_s390_check_relocs): Likewise.
9947 (elf_s390_gc_sweep_hook): Likewise.
9948 (elf_s390_relocate_section): Likewise.
9949 (elf_s390_object_p): Use renamed architecture define.
9950 * elf64-s390.c (elf_s390_object_p): Use renamed architecture define.
9951
9952 2002-02-19 Frank Ch. Eigler <fche@redhat.com>
9953
9954 * syms.c (stt[]): Sorted. Added .init/.fini -> "t" mapping.
9955
9956 2002-02-19 Jakub Jelinek <jakub@redhat.com>
9957
9958 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Enable
9959 absptr -> pcrel optimization for shared libs.
9960 Only create minimal .eh_frame_hdr if absptr FDE encoding in shared
9961 library cannot be converted to pcrel.
9962 (_bfd_elf_eh_frame_section_offset): Return -2 if making absptr
9963 relative.
9964 * elf32-i386.c (elf_i386_relocate_section): If
9965 _bfd_elf_section_offset returned -2, skip, but make sure the
9966 relocation is installed.
9967 * elf32-arm.h (elf32_arm_final_link_relocate): Likewise.
9968 * elf32-cris.c (cris_elf_relocate_section): Likewise.
9969 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
9970 * elf32-i370.c (i370_elf_relocate_section): Likewise.
9971 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
9972 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
9973 * elf32-s390.c (elf_s390_relocate_section): Likewise.
9974 * elf32-sh.c (sh_elf_relocate_section): Likewise.
9975 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
9976 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
9977 * elf64-s390.c (elf_s390_relocate_section): Likewise.
9978 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
9979 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
9980 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
9981 * elf64-alpha.c (elf64_alpha_relocate_section): Handle
9982 _bfd_elf_section_offset returning -2 the same way as -1.
9983 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
9984 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add FIXME
9985 and BFD_ASSERT.
9986 * elf64-mips.c (mips_elf64_create_dynamic_relocation): Likewise.
9987
9988 2002-02-18 Tom Rix <trix@redhat.com>
9989
9990 * xcofflink.c (bfd_xcoff_link_gernate_rtinit): Add -brtl support.
9991 (bfd_xcoff_size_dynamic_sections): Same.
9992 * bfd-in.h (bfd_xcoff_link_generate_rtinit): Same.
9993 (bfd_xcoff_size_dynamic_sections): Same.
9994 * coff-rs6000.c (xcoff_generate_rtinit): Same.
9995 * coff-rs646000.c (xcoff64_generate_rtinit): Same.
9996 * libxcoff.h (struct xcoff_backend_data_rec): Same.
9997 * xcofflink.c (xcoff_build_ldsyms, xcoff_link_add_symbols): Clean.
9998 * bfd-in2.h: Regenerate.
9999
10000 2002-02-18 Alan Modra <amodra@bigpond.net.au>
10001
10002 * elf64-ppc.c (STFD_FR0_0R1, LFD_FR0_0R1, BLR): Define.
10003 (struct ppc_link_hash_table): Add sfpr.
10004 (ppc64_elf_link_hash_table_create): Init it.
10005 (ppc64_elf_create_dynamic_sections): Split creation of .stub and
10006 .glink out to..
10007 (create_linkage_sections): ..here. Make .sfpr too.
10008 (ppc64_elf_check_relocs): Call create_linkage_sections, and set
10009 dynobj early.
10010 (MIN_SAVE_FPR, MAX_SAVE_FPR): Define.
10011 (ppc64_elf_func_desc_adjust): Look for missing ._savef* and
10012 ._restf* functions, and create as needed.
10013 (func_desc_adjust): Only force_local for shared libs.
10014
10015 2002-02-18 David O'Brien <obrien@FreeBSD.org>
10016
10017 * configure.in: Bump version number post 2.12 branching.
10018 * configure: Regenerate.
10019
10020 2002-02-17 Hans-Peter Nilsson <hp@bitrange.com>
10021
10022 * mmo.c: Correct and improve comments.
10023 (mmo_write_chunk): Store trailing byte in bfd buffer; don't
10024 zero-pad. Use input to fill up non-empty bfd buffer.
10025 (mmo_flush_chunk): New function.
10026 (mmo_write_loc_chunk): Add parameter last_vmap, all callers
10027 changed. Don't emit location specifier if VMA is same as
10028 *LAST_VMAP after omitting leading zero contents. Call
10029 mmo_flush_chunk before emitting location specifier.
10030 (mmo_write_loc_chunk_list): Call mmo_flush_chunk when finished
10031 with mmo_write_loc_chunk calls.
10032 (mmo_internal_write_section): Call mmo_flush_chunk after
10033 mmo_write_chunk.
10034 (mmo_write_symbols_and_terminator): Move :Main to first position
10035 in symbol array. Add faked one if it does not exist if there are
10036 other symbols. Don't add it if there are no symbols at all. Move
10037 out test for value of :Main from symbol loop. Rename table
10038 fakemain to maintable and variable mainsym to fakemain.
10039
10040 2002-02-15 Richard Henderson <rth@redhat.com>
10041
10042 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: A target
10043 section with no got matches any got. Simplify error generaion.
10044
10045 2002-02-15 Alan Modra <amodra@bigpond.net.au>
10046
10047 Support arbitrary length fill patterns.
10048 * linker.c (bfd_new_link_order): Zero all fields with bfd_zalloc.
10049 (_bfd_default_link_order): Remove bfd_fill_link_order code.
10050 Call default_data_link_order.
10051 (default_fill_link_order): Delete.
10052 (default_data_link_order): New function.
10053 * elf32-mips.c (_bfd_mips_elf_final_link): Replace occurrences
10054 of bfd_fill_link_order with bfd_data_link_order.
10055 * elf64-alpha.c (elf64_alpha_final_link): Likewise.
10056 * elf64-mips.c (mips_elf64_final_link): Likewise.
10057
10058 * bfd.c (bfd_scan_vma): Clamp overflows to max bfd_vma value.
10059 Correct value returned in "end" for "0x<non-hex>".
10060
10061 2002-02-14 Nick Clifton <nickc@cambridge.redhat.com>
10062
10063 * cpu-arm.c (processors): Replace 'arch' field with 'mach'.
10064 (scan): Test against 'mach' field in info structure.
10065
10066 2002-02-14 Alan Modra <amodra@bigpond.net.au>
10067
10068 * elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD.
10069
10070 2002-02-14 Matt Fredette <fredette@netbsd.org>
10071
10072 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize
10073 EF_M68000.
10074
10075 2002-02-13 Nick Clifton <nickc@cambridge.redhat.com>
10076
10077 * elf.c (_bfd_elf_make_section_from_shdr): Do not insist on
10078 non-zero physical addresses when adjusting the LMAs of new
10079 sections.
10080
10081 2002-02-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
10082
10083 * elf-hppa.h (elf_hppa_reloc_final_type): New function stripped
10084 from _bfd_elf_hppa_gen_reloc_type.
10085 (_bfd_elf_hppa_gen_reloc_type): Remove duplicate prototype.
10086 * elf32-hppa.h (elf32_hppa_reloc_final_type): Add protptype.
10087 * elf32-hppa.c: Include elf32-hppa.h before elf-hppa.h.
10088 * elf64-hppa.h (elf64_hppa_reloc_final_type): Add protptype.
10089
10090 2002-02-12 Alexandre Oliva <aoliva@redhat.com>
10091
10092 * elf-m10300.c (mn10300_elf_relax_section): Skip section before
10093 loading its contents if there's nothing to do in it.
10094
10095 2002-02-12 Alan Modra <amodra@bigpond.net.au>
10096
10097 * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for crossing
10098 64k boundary.
10099
10100 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Add dynamic
10101 DT_PPC64_OPD and DT_PPC64_OPDSZ tags.
10102 (ppc64_elf_finish_dynamic_sections): Set values for them.
10103
10104 2002-02-11 Michael Snyder <msnyder@redhat.com>
10105
10106 * elf-bfd.h (elfcore_write_lwpstatus): Add prototype.
10107 * elf.c (elfcore_grok_pstatus): Add prototype.
10108 (elfcore_grok_lwpstatus): Add prototype.
10109 (elfcore_write_lwpstatus): New function.
10110 (elfcore_write_pstatus): Fix typo, eliminate unnecessary memcpy.
10111
10112 2002-02-11 Alexandre Oliva <aoliva@redhat.com>
10113
10114 * elf32-sh.c: Added missing prototypes.
10115 * elf32-sh64.c: Likewise.
10116 (sh_elf_align_loads): Mark unused args as such.
10117 * elf64-sh64.c: Added missing prototypes.
10118 (struct elf_sh64_link_hash_entry): Fix typo.
10119 (sh_elf64_relocate_section): Fix info argument passed to
10120 _bfd_elf_section_offset.
10121
10122 2002-02-11 Alan Modra <amodra@bigpond.net.au>
10123
10124 * Makefile.am: "make dep-am".
10125 * Makefile.in: Regenerate.
10126 * aclocal.m4: Regenerate.
10127 * config.in: Regenerate.
10128 * configure: Regenerate.
10129
10130 2002-02-10 Daniel Jacobowitz <drow@mvista.com>
10131
10132 * coff-rs6000.c (xcoff_generate_rtinit): Silence uninitialized
10133 variable warnings.
10134 * elf32-sh.c (sh_elf_relax_section): Silence signed/unsigned
10135 comparison warning.
10136 * trad-core.c (trad_unix_core_file_p): Silence pointer/integer
10137 cast warnings for the common case.
10138
10139 2002-02-10 Hans-Peter Nilsson <hp@bitrange.com>
10140
10141 * config.bfd (sh-*-linux*, sh-*-elf* | sh-*-rtemself*): Add sh64
10142 vectors.
10143 (sh-*-netbsdelf*): New, to trump sh*-*-netbsdelf* and add sh64
10144 vectors.
10145
10146 2002-02-09 Richard Henderson <rth@redhat.com>
10147
10148 * elf64-alpha.c (elf64_alpha_howto): Add R_ALPHA_BRSGP.
10149 (elf64_alpha_reloc_map, elf64_alpha_check_relocs): Likewise.
10150 (elf64_alpha_relocate_section): Likewise.
10151 * reloc.c (BFD_RELOC_ALPHA_BRSGP): New.
10152 * bfd-in2.h, libbfd.h: Rebuild.
10153
10154 2002-02-09 Hans-Peter Nilsson <hp@bitrange.com>
10155
10156 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs): Check
10157 that base-plus-offset reloc accounting is consistent.
10158 (mmix_elf_relax_section): Keep base-plus-offset reloc accounting
10159 up to date for undefined symbols.
10160
10161 2002-02-08 Eric Christopher <echristo@redhat.com>
10162
10163 From Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
10164
10165 * elf32-mips.c (_bfd_mips_elf_fake_sections): Don't create .rela
10166 sections for the O32 ABI.
10167
10168 2002-02-08 Chris Demetriou <cgd@broadcom.com>
10169
10170 * elf32-arm.h: Fix formatting of _("...").
10171 * elf32-d10v.c: Likewise.
10172 * elf32-m68k.c: Likewise.
10173 * elf32-mips.c: Likewise.
10174
10175 2002-02-08 Ivan Guzvinec <ivang@opencores.org>
10176
10177 * coff-or32.c: Fix compile time warning messages.
10178
10179 2002-02-08 Alexandre Oliva <aoliva@redhat.com>
10180
10181 Contribute sh64-elf.
10182 2002-01-23 Alexandre Oliva <aoliva@redhat.com>
10183 * reloc.c (R_SH_GOTPLT32, R_SH_GOT_LOW16, R_SH_GOT_MEDLOW16,
10184 R_SH_GOT_MEDHI16, R_SH_GOT_HI16, R_SH_GOTPLT_LOW16,
10185 R_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_HI16,
10186 R_SH_PLT_LOW16, R_SH_PLT_MEDLOW16, R_SH_PLT_MEDHI16,
10187 R_SH_PLT_HI16, R_SH_GOTOFF_LOW16, R_SH_GOTOFF_MEDLOW16,
10188 R_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_HI16, R_SH_GOTPC_LOW16,
10189 R_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDHI16, R_SH_GOTPC_HI16,
10190 R_SH_GOT10BY4, R_SH_GOTPLT10BY4, R_SH_GOT10BY8, R_SH_GOTPLT10BY8,
10191 R_SH_COPY64, R_SH_GLOB_DAT64, R_SH_JMP_SLOT64, R_SH_RELATIVE64):
10192 New relocs.
10193 * libbfd.h, bfd-in2.h: Rebuilt.
10194 * elf32-sh.c (sh_elf_howto_table): Define new relocs.
10195 (sh_reloc_map): Map them.
10196 (PLT_ENTRY_SIZE, elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
10197 elf_sh_plt_entry_be, elf_sh_plt_entry_le, elf_sh_pic_plt_entry_be,
10198 elf_sh_pic_plt_entry_le, elf_sh_plt0_entry, elf_sh_plt_entry,
10199 elf_sh_pic_plt_entry, elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
10200 elf_sh_plt0_gotplt_offset, elf_sh_plt_temp_offset,
10201 elf_sh_plt_symbol_offset, elf_sh_plt_reloc_offset,
10202 movi_shori_putval) [INCLUDE_SHMEDIA]: New.
10203 (elf_sh_link_hash_entry) [INCLUDE_SHMEDIA]: Add
10204 datalabel_got_offset.
10205 (sh_elf_link_hash_newfunc): Initialize it.
10206 (sh_elf_relocate_section): Augment the scope of
10207 seen_stt_datalabel. Introduce GOTPLT support. Extend GOTPC, PLT,
10208 GOT and GOTOFF handling to new SHmedia relocation types. Support
10209 GOT_BIAS.
10210 (sh_elf_check_relocs): Likewise.
10211 (sh_elf_finish_dynamic_symbol) [TARGET_SHMEDIA]: Set up values in
10212 PLT entries using movi_shori_putval. Support GOT_BIAS.
10213 (sh_elf_finish_dynamic_sections): Likewise.
10214 * elf32-sh64.c (shmedia_prepare_reloc): Do not add addend to
10215 relocation, it's now done by the caller.
10216 (GOT_BIAS): New.
10217 * elf64-sh64.c (GOT_BIAS, PLT_ENTRY_SIZE, elf_sh64_sizeof_plt,
10218 elf_sh64_plt_plt0_offset, elf_sh64_plt0_gotplt_offset,
10219 elf_sh64_plt_temp_offset, elf_sh64_plt_symbol_offset,
10220 elf_sh64_plt_reloc_offset, ELF_DYNAMIC_INTERPRETER,
10221 elf_sh64_pcrel_relocs_copied, elf_sh64_link_hash_entry,
10222 elf_sh64_link_hash_table, sh64_elf64_link_hash_traverse,
10223 sh64_elf64_hash_table): New.
10224 (sh_elf64_howto_table): Introduce new relocs.
10225 (sh_elf64_info_to_howto): Accept new PIC relocs.
10226 (sh_elf64_relocate_section): Augment the scope of
10227 seen_stt_datalabel. Support new PIC relocs.
10228 (sh_elf64_check_relocs): Support new PIC relocs.
10229 (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le,
10230 elf_sh64_plt_entry_be, elf_sh64_plt_entry_le,
10231 elf_sh64_pic_plt_entry_be, elf_sh64_pic_plt_entry_le,
10232 elf_sh64_plt0_entry, elf_sh64_plt_entry, elf_sh64_pic_plt_entry,
10233 sh64_elf64_link_hash_newfunc, sh64_elf64_link_hash_table_create,
10234 movi_shori_putval, movi_3shori_putval,
10235 sh64_elf64_create_dynamic_sections,
10236 sh64_elf64_adjust_dynamic_symbol, sh64_elf64_discard_copies,
10237 sh64_elf64_size_dynamic_sections,
10238 sh64_elf64_finish_dynamic_symbol,
10239 sh64_elf64_finish_dynamic_sections): New.
10240 (elf_backend_create_dynamic-sections,
10241 bfd_elf64_bfd_link_hash_table_create,
10242 elf_backend_adjust_dynamic_symbol,
10243 elf_backend_size_dynamic_sections,
10244 elf_backend_finish_dynamic_symbol,
10245 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
10246 elf_backend_plt_readonly, elf_backend_want_plt_sym,
10247 elf_backend_got_header_size, elf_backend_plt_header_size):
10248 Define.
10249 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
10250 * elf32-sh.c: Renumbered and renamed some SH5 relocations to
10251 match official numbers and names; moved unmaching ones to the
10252 range 0xf2-0xff.
10253 * elf32-sh64.c, elf64-sh64.c: Likewise.
10254 2001-03-12 DJ Delorie <dj@redhat.com>
10255 * elf32-sh.c (sh_elf_relax_section): Don't relax SHmedia
10256 sections.
10257 2001-03-12 DJ Delorie <dj@redhat.com>
10258 * elf32-sh64.c (shmedia_prepare_reloc): Validate relocs that must
10259 be aligned.
10260 * elf64-sh64.c (sh_elf64_relocate_section): Ditto.
10261 2001-01-14 Hans-Peter Nilsson <hpn@cygnus.com>
10262 * elf32-sh64.c (bfd_elf32_bfd_copy_private_section_data): Define.
10263 (sh64_elf_fake_sections): Set type to SHT_SH5_CR_SORTED for a
10264 .cranges section with SEC_SORT_ENTRIES set.
10265 (sh64_backend_section_from_shdr): Set SEC_SORT_ENTRIES on an
10266 incoming sorted .cranges section.
10267 (sh64_bfd_elf_copy_private_section_data): New.
10268 (sh64_elf_final_write_processing): Only sort .cranges and modify
10269 start address if called by linker.
10270 2001-01-08 Ben Elliston <bje@redhat.com>
10271 * elf32-sh64.c (sh64_elf_final_write_processing): Activate
10272 Hans-Peter Nilsson's set bit 0 patch from 2001-01-06.
10273 * elf64-sh64.c (sh64_elf64_final_write_processing): Ditto.
10274 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
10275 * elf64-sh64.c (sh_elf64_howto_table): No open brace at start of
10276 line. Add comments before all entries.
10277 <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct and clarify describing
10278 comment.
10279 (sh_elf64_reloc): Correct head comment.
10280 (sh_elf64_relocate_section): Correct spacing.
10281 <relocating for a local symbol>: Do not honour STO_SH5_ISA32;
10282 instead call reloc_dangerous callback.
10283 <case R_SH_SHMEDIA_CODE>: New case.
10284 (sh_elf64_gc_mark_hook): Correct spacing.
10285 (sh_elf64_check_relocs): Ditto.
10286 * elf32-sh64.c (shmedia_prepare_reloc) <case R_SH_SHMEDIA_CODE>:
10287 New case.
10288 * elf32-sh.c: Correct #endif comments for #ifndef-wrapped
10289 functions.
10290 (sh_elf_howto_table) <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct,
10291 clarify describing comment. Add comments before all entries.
10292 (sh_elf_relocate_section) <relocating for a local symbol>: Do not
10293 honour STO_SH5_ISA32; instead call reloc_dangerous callback.
10294 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
10295 Sort .cranges section in final link. Prepare to set bit 0 on
10296 entry address.
10297 * elf32-sh64.c (struct sh64_find_section_vma_data): New.
10298 (sh64_elf_link_output_symbol_hook): Fix typo in prototype.
10299 (sh64_elf_set_mach_from_flags): Set SEC_DEBUGGING on incoming
10300 .cranges section.
10301 (sh64_backend_section_from_shdr): New, to recognize
10302 SHT_SH5_CR_SORTED on incoming .cranges section.
10303 (elf_backend_section_from_shdr): Define.
10304 (sh64_elf_final_write_processing): Sort outgoing .cranges
10305 section. (New, temporarily disabled:) Set bit 0 on entry address
10306 according to ISA type.
10307 (sh64_find_section_for_address): New.
10308 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb,
10309 crange_bsearch_cmpl): Move here from opcodes/sh64-dis.c.
10310 (sh64_address_in_cranges): Move here from opcodes/sh64-dis.c. Use
10311 bfd_malloc, not xmalloc.
10312 (sh64_get_contents_type): Move here from opcodes/sh64-dis.c. Make
10313 global.
10314 * elf32-sh64.c (sh64_elf64_final_write_processing): New, (but
10315 temporarily disabled) setting bit 0 on entry address.
10316 (elf_backend_final_write_processing): Define.
10317 2001-01-05 Hans-Peter Nilsson <hpn@cygnus.com>
10318 * elf32-sh.c (sh_elf_howto_table) <R_SH_PT_16>: Adjust fields to
10319 be a proper relocation for PTA and PTB rather than a marker.
10320 <R_SH_IMMU5, R_SH_IMMS6, R_SH_IMMU6, R_SH_IMMS10, R_SH_IMMS10BY2,
10321 R_SH_IMMS10BY4, R_SH_IMMS10BY8, R_SH_IMMS16, R_SH_IMMU16,
10322 R_SH_IMM_LOW16, R_SH_IMM_LOW16_PCREL, R_SH_IMM_MEDLOW16,
10323 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16_PCREL,
10324 R_SH_IMM_HI16, R_SH_IMM_HI16_PCREL, R_SH_64, R_SH_64_PCREL>:
10325 Zero src_mask.
10326 * elf64-sh64.c: Ditto.
10327 (sh_elf64_relocate_section) <case R_SH_PT_16>: New case.
10328 * elf32-sh64.c: Include opcodes/sh64-opc.h
10329 (shmedia_prepare_reloc): Take a bfd_link_info pointer as first
10330 argument. Drop const qualifiers from "bfd *" and "bfd_byte *"
10331 parameters. No unused parameters. Caller changed.
10332 <case R_SH_PT_16>: New case.
10333 * Makefile.am (elf32-sh64.lo): Add dependency on sh64-opc.h.
10334 * Makefile.in: Regenerate.
10335 2000-12-30 Hans-Peter Nilsson <hpn@cygnus.com>
10336 * elf64-sh64.c (sh64_elf64_fake_sections): Set SHF_SH5_ISA32 for
10337 all code sections.
10338 (sh_elf64_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
10339 (sh64_elf_merge_private_data): Ditto.
10340 * elf32-sh64.c (sh64_elf_fake_sections): Use sh64_elf_section_data
10341 to access stored section flags.
10342 (sh64_elf_final_write_processing): Return immediately unless
10343 called by linker. Use sh64_elf_section_data (cranges) to get size
10344 of linker-generated cranges entries.
10345 (sh64_elf_copy_private_data): Add missing "return true".
10346 (sh64_elf_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
10347 (sh_elf64_merge_private_data): Ditto.
10348 2000-12-19 Hans-Peter Nilsson <hpn@cygnus.com>
10349 * elf64-sh64.c (sh64_elf64_fake_sections): New, copy of
10350 elf64-sh64.c:sh64_elf_fake_sections.
10351 (elf_backend_fake_sections): Define as sh64_elf64_fake_sections.
10352 2000-12-18 Hans-Peter Nilsson <hpn@cygnus.com>
10353 * elf32-sh64.c (sh64_elf_copy_private_data_internal): Delete.
10354 (sh64_elf_final_write_processing): New.
10355 (elf_backend_final_write_processing): Define.
10356 (sh64_elf_fake_sections): Get header flags from tdata field.
10357 (sh64_elf_copy_private_data): Do not call
10358 sh64_elf_copy_private_data_internal, just copy e_flags field.
10359 (sh64_elf_merge_private_data): Do not call
10360 sh64_elf_copy_private_data_internal.
10361 2000-12-12 Hans-Peter Nilsson <hpn@cygnus.com>
10362 Remove EF_SH64_ABI64, let ELF size make difference.
10363 Remove SH64-specific BFD section flag.
10364 * elf32-sh64.c (sh64_elf_fake_sections): Recognize section as
10365 containing SHmedia through elf_section_data (asect)->tdata
10366 non-zero, not using a BFD section flag.
10367 (sh64_elf_set_mach_from_flags): Don't recognize EF_SH64_ABI64.
10368 (sh64_elf_merge_private_data): Similar.
10369 (elf_backend_section_flags): Don't define.
10370 (sh64_elf_backend_section_flags): Delete.
10371 * elf64-sh64.c (sh_elf64_set_mach_from_flags): Recognize EF_SH64,
10372 not EF_SH64_ABI64.
10373 (sh_elf64_merge_private_data): Similar.
10374 * section.c (Section flags definitions): Don't define
10375 SEC_SH_ISA_SHMEDIA.
10376 (bfd-in2.h): Regenerate.
10377 2000-12-09 Hans-Peter Nilsson <hpn@cygnus.com>
10378 Make DataLabel references work with partial linking.
10379 * elf32-sh64.c: Fix formatting.
10380 (sh64_elf_link_output_symbol_hook): New.
10381 (elf_backend_link_output_symbol_hook): Define to
10382 sh64_elf_link_output_symbol_hook.
10383 (sh64_elf_add_symbol_hook): Make DataLabel symbol just global
10384 undefined if partial linking. Adjust sanity check.
10385 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): New.
10386 (elf_backend_link_output_symbol_hook): Define to
10387 sh64_elf64_link_output_symbol_hook.
10388 (sh64_elf64_add_symbol_hook): Make DataLabel symbol just global
10389 undefined if partial linking. Adjust sanity check.
10390 2000-12-07 Hans-Peter Nilsson <hpn@cygnus.com>
10391 Implement semantics for inter-file DataLabel references.
10392 * elf64-sh64.c (DATALABEL_SUFFIX): Define.
10393 (sh64_elf64_add_symbol_hook): New.
10394 (sh_elf64_relocate_section): If passing an indirect symbol with
10395 st_type STT_DATALABEL on the way to a symbol with st_other
10396 STO_SH5_ISA32, do not bitor 1 to the relocation.
10397 (elf_backend_add_symbol_hook): Define to
10398 sh64_elf64_add_symbol_hook.
10399 * elf64-sh32.c: Tweak comments.
10400 (DATALABEL_SUFFIX): Define.
10401 (sh64_elf_add_symbol_hook): New.
10402 (elf_backend_add_symbol_hook): Define to sh64_elf_add_symbol_hook.
10403 * elf32-sh.c (sh_elf_relocate_section): If passing an indirect
10404 symbol with st_type STT_DATALABEL on the way to a symbol with
10405 st_other STO_SH5_ISA32, do not bitor 1 to the relocation.
10406 2000-12-05 Hans-Peter Nilsson <hpn@cygnus.com>
10407 Pass through STT_DATALABEL.
10408 * elf32-sh64.c (sh64_elf_get_symbol_type): New.
10409 (elf_backend_get_symbol_type): Define.
10410 * elf64-sh64.c (sh64_elf64_get_symbol_type): New.
10411 (elf_backend_get_symbol_type): Define.
10412 2000-11-30 Hans-Peter Nilsson <hpn@cygnus.com>
10413 * elf32-sh64.c: Tweak comments.
10414 (sh64_elf_copy_private_data_internal): Add prototype.
10415 (bfd_elf32_bfd_set_private_flags): Define.
10416 (sh64_elf_copy_private_data_internal): Compare machine name, not
10417 textual BFD target name, to check whether to copy section flag
10418 SHF_SH5_ISA32.
10419 (sh64_elf_merge_private_data): Validize bfd_get_arch_size.
10420 Tweak section-contents-type-mismatch message.
10421 (shmedia_prepare_reloc): Add ATTRIBUTE_UNUSED markers.
10422 Validize reloc-types.
10423 * elf64-sh64.c: New file.
10424 * targets.c (bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec): Declare.
10425 * Makefile.am (BFD64_BACKENDS): Add elf64-sh64.lo.
10426 (BFD64_BACKENDS_CFILES): Add elf64-sh64.c.
10427 Regenerate dependencies.
10428 * Makefile.in: Regenerate.
10429 * config.bfd (sh64-*-elf*): Add bfd_elf64_sh64_vec and
10430 bfd_elf64_sh64l_vec.
10431 * configure.in: Handle bfd_elf64_sh64_vec and
10432 bfd_elf64_sh64l_vec.
10433 * configure: Regenerate.
10434 * po/POTFILES.in: Regenerate.
10435 * po/bfd.pot: Regenerate.
10436 2000-11-29 Hans-Peter Nilsson <hpn@cygnus.com>
10437 * elf32-sh64.c (sh64_elf_set_mach_from_flags): Do not recognize
10438 anything else but EF_SH64 and EF_SH64_ABI64.
10439 (sh64_elf_merge_private_data): Emit error for anything else but
10440 EF_SH64 and EF_SH64_ABI64.
10441 * config.bfd: Remove bfd_elf32_shblin_vec and bfd_elf32_shlin_vec
10442 from targ_selvecs.
10443 * configure.in: Add cofflink.lo to bfd_elf32_sh64_vec and
10444 bfd_elf32_sh64l_vec as a temporary measure.
10445 * configure: Regenerate.
10446 2000-11-27 Hans-Peter Nilsson <hpn@cygnus.com>
10447 * cpu-sh.c (arch_info_struct): Include sh5 item
10448 unconditionalized.
10449 * config.bfd (sh64-*-elf*): Do not set targ_cflags.
10450 Add targ_selvecs bfd_elf32_sh_vec, bfd_elf32_shl_vec,
10451 bfd_elf32_shblin_vec and bfd_elf32_shlin_vec.
10452 * elf32-sh64.c: Tweak comments.
10453 (sh64_elf_set_mach_from_flags): Recognize all machine flags that
10454 are proper subsets of SH64 as bfd_mach_sh5. Add EF_SH64_ABI64.
10455 (sh64_elf_copy_private_data_internal): Wrap long line.
10456 (sh64_elf_merge_private_data): Rewrite to allow objects from
10457 SH64 subsets to be linked together.
10458 (INCLUDE_SHMEDIA): Define.
10459 * elf32-sh.c (sh_elf_relocate_section) <local symbol>:
10460 Parenthesize plus-expression inside or-expression.
10461 <global symbol>: Ditto.
10462 (sh_elf_set_mach_from_flags): Remove code refusing
10463 deleted EF_SH64_32BIT_ABI flag.
10464 2000-11-26 Hans-Peter Nilsson <hpn@cygnus.com>
10465 * elf32-sh.c (sh_elf_howto_table) <R_SH_IMM_LOW16_PCREL,
10466 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16_PCREL,
10467 R_SH_IMM_HI16_PCREL, R_SH_64_PCREL>: Set pcrel_offset to true.
10468 (sh_elf_relocate_section) <local symbol>: Or 1 in
10469 calculation of relocation if sym->st_other & STO_SH5_ISA32.
10470 <global symbol>: Ditto if h->other & STO_SH5_ISA32.
10471 * elf32-sh64.c (shmedia_prepare_reloc): Add rel->r_addend to
10472 relocation.
10473 2000-11-24 Hans-Peter Nilsson <hpn@cygnus.com>
10474 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64.lo.
10475 (BFD32_BACKENDS_CFILES): Add elf32-sh64.c.
10476 Regenerate dependencies.
10477 * Makefile.in: Regenerate.
10478 * archures.c: Add bfd_mach_sh5.
10479 * config.bfd: Map targ_cpu sh* to bfd_sh_arch.
10480 Handle sh64-*-elf*. Set targ_cflags to -DINCLUDE_SHMEDIA.
10481 * configure.in: Handle bfd_elf32_sh64_vec and bfd_elf32_sh64l_vec.
10482 * configure: Regenerate.
10483 * reloc.c (BFD_RELOC_SH_SHMEDIA_CODE, BFD_RELOC_SH_IMMU5,
10484 BFD_RELOC_SH_IMMS6, BFD_RELOC_SH_IMMS6BY32, BFD_RELOC_SH_IMMU6,
10485 BFD_RELOC_SH_IMMS10, BFD_RELOC_SH_IMMS10BY2,
10486 BFD_RELOC_SH_IMMS10BY4, BFD_RELOC_SH_IMMS10BY8,
10487 BFD_RELOC_SH_IMMS16, BFD_RELOC_SH_IMMU16, BFD_RELOC_SH_IMM_LOW16,
10488 BFD_RELOC_SH_IMM_LOW16_PCREL, BFD_RELOC_SH_IMM_MEDLOW16,
10489 BFD_RELOC_SH_IMM_MEDLOW16_PCREL, BFD_RELOC_SH_IMM_MEDHI16,
10490 BFD_RELOC_SH_IMM_MEDHI16_PCREL, BFD_RELOC_SH_IMM_HI16,
10491 BFD_RELOC_SH_IMM_HI16_PCREL, BFD_RELOC_SH_PT_16): New relocations.
10492 * cpu-sh.c [INCLUDE_SHMEDIA] (arch_info_struct): Define and link
10493 in item for SH5.
10494 * elf32-sh.c [INCLUDE_SHMEDIA] (sh_elf_howto_table): Add howto items
10495 for SHmedia relocs.
10496 [INCLUDE_SHMEDIA] (sh_rel): Add mappings for SHmedia relocs.
10497 [INCLUDE_SHMEDIA] (sh_elf_relocate_section) [default]: Call
10498 shmedia_prepare_reloc, goto final_link_relocate if it returns
10499 non-zero, else fail as before.
10500 (sh_elf_set_mach_from_flags): Provide function only if not defined
10501 as macro. Do not recognize objects with EF_SH64_32BIT_ABI set.
10502 (sh_elf_set_private_flags): Provide function only if not defined
10503 as a macro.
10504 (sh_elf_copy_private_data): Similar.
10505 (sh_elf_merge_private_data): Similar.
10506 * section.c (SEC_SH_ISA_SHMEDIA): New.
10507 * targets.c (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec): Declare.
10508 * elf32-sh64.c: New file.
10509 * libbfd.h: Regenerate.
10510 * bfd-in2.h: Regenerate.
10511 * po/POTFILES.in: Regenerate.
10512 * po/bfd.pot: Regenerate.
10513 * bfd-in2.h: Regenerate.
10514 * libbfd.h: Regenerate.
10515
10516 2002-02-07 Daniel Jacobowitz <drow@mvista.com>
10517
10518 * bfd-in.h: Update <stdbool.h> check to only see if <stdbool.h> has
10519 been included, not drag it in.
10520 * bfd-in2.h: Regenerate.
10521
10522 2002-02-06 H.J. Lu (hjl@gnu.org)
10523
10524 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Update
10525 the mach and ISA fields if necessary.
10526
10527 2002-02-06 Nick Clifton <nickc@cambridge.redhat.com>
10528
10529 * coffcode.h (coff_set_arch_mach_hook): Select the highest known
10530 ARM architecture when an F_ARM_5 flag is detected, since we cannot
10531 be sure exactly which architecture this represents.
10532
10533 2002-02-05 Nick Clifton <nickc@redhat.com>
10534
10535 * po/tr.po: Updated translation.
10536
10537 2002-02-05 Alan Modra <amodra@bigpond.net.au>
10538
10539 From Jimi X <jimix@watson.ibm.com>
10540 * archures (bfd_mach_ppc64): Define.
10541 (bfd_powerpc_arch): Rename to bfd_powerpc_archs.
10542 (bfd_powerpc_arch): Define.
10543 * bfd-in2.h: Regenerate.
10544 * cpu-powerpc.c (arch_info_struct): Rename to bfd_powerpc_archs.
10545 (bfd_powerpc_arch): Move to tail of bfd_powerpc_archs.
10546 (bfd_powerpc_archs): Add default powerpc64 arch.
10547
10548 2002-02-05 Alan Modra <amodra@bigpond.net.au>
10549
10550 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Check for relocs
10551 against section syms in readonly sections. Don't do the global
10552 sym check if we find one.
10553 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
10554 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
10555 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
10556 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
10557 (elf_s390_grok_prstatus): Add missing prototype.
10558
10559 2002-02-04 Hans-Peter Nilsson <hp@bitrange.com>
10560
10561 * elf64-mmix.c (mmix_dump_bpo_gregs): New function.
10562 (mmix_elf_check_common_relocs) <case R_MMIX_BASE_PLUS_OFFSET>:
10563 Call bfd_get_section_by_name only once. Initialize
10564 bpodata->n_bpo_relocs_this_section.
10565 (_bfd_mmix_prepare_linker_allocated_gregs): Remove comment
10566 referring to DSOs.
10567 (bpo_reloc_request_sort_fn): Don't use difference of values as
10568 return-value.
10569
10570 2002-02-02 David O'Brien <obrien@FreeBSD>
10571
10572 * configure.in: Tweak the FreeBSD 4.x recognition more. Only treat
10573 version 4.5 and later the same as 5-CURRENT.
10574 * configure: Re-generate.
10575
10576 2002-02-02 Jason Thorpe <thorpej@wasabisystems.com>
10577
10578 * config.bfd (hppa*-*-netbsd*): New target.
10579
10580 2002-01-31 Philipp Thomas <pthomas@suse.de>
10581
10582 * coff-arm.c (coff_arm_merge_private_bfd_data): Move ERROR
10583 to front of message. Unify messages with elf32-arm.h. Use
10584 commas where neccessary.
10585 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Use all upcase
10586 ERROR in messages. Unify messages with coff-arm.c. Correct
10587 VFP/FPA error message.
10588 (elf32_arm_print_private_bfd_data): Don't mark APCS-26 and
10589 APCS-32 for translation.
10590
10591 2002-02-01 Hans-Peter Nilsson <hp@bitrange.com>
10592
10593 Perform on-demand global register allocation from
10594 R_MMIX_BASE_PLUS_OFFSET relocs.
10595 * elf64-mmix.c (struct bpo_reloc_section_info, struct
10596 bpo_reloc_request, struct bpo_greg_section_info): New.
10597 (mmix_elf_check_common_relocs, mmix_elf_gc_sweep_hook,
10598 bpo_reloc_request_sort_fn, mmix_elf_relax_section,
10599 _bfd_mmix_check_all_relocs,
10600 _bfd_mmix_prepare_linker_allocated_gregs,
10601 _bfd_mmix_finalize_linker_allocated_gregs): New functions.
10602 (elf_mmix_howto_table): Correct src_mask for most relocs.
10603 (mmix_elf_perform_relocation) <case R_MMIX_BASE_PLUS_OFFSET>: New
10604 case.
10605 (mmix_final_link_relocate) <case R_MMIX_BASE_PLUS_OFFSET>: New
10606 case. Fix typo in comment. New label do_mmix_reloc.
10607 (mmix_elf_check_relocs): Abuse bfd_link_info member base_file to
10608 store first object file with a base-plus-offset reloc. Call
10609 mmix_elf_check_common_relocs for the part common with mmo.
10610 (mmix_elf_final_link): Write out linker-allocated register
10611 contents section.
10612 (elf_backend_gc_sweep_hook): Define.
10613 (bfd_elf64_bfd_relax_section): Define.
10614
10615 * mmo.c: Don't include <ctype.h>
10616 (mmo_init): Correct init-once logic.
10617
10618 2002-02-01 Tom Rix <trix@redhat.com>
10619
10620 * config.bfd: Conditionally support <aiaff> for pre AIX 4.3.
10621
10622 2002-02-01 Alan Modra <amodra@bigpond.net.au>
10623
10624 * Makefile.am: Run "make dep-am"
10625 * Makefile.in: Regenerate.
10626
10627 2002-01-31 David O'Brien <obrien@FreeBSD>
10628
10629 * configure.in: Recognize the differences in core files from FreeBSD
10630 4.{0,1} and later versions of 4.x. This treats 4.2+ the same as
10631 5-CURRENT.
10632 * configure: Regenerate.
10633
10634 2002-01-31 Ivan Guzvinec <ivang@opencores.org>
10635
10636 * coff-or32.c: New file.
10637 * cpu-or32.c: New file.
10638 * elf32-or32.c: New file.
10639 * archures.c: Add support for or32.
10640 * targets.c: Add support for or32.
10641 * bfd-in2.h: Regenerate.
10642 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags,
10643 coff_write_object_contents): Add support for or32.
10644 * config.bfd: Add target.
10645 * configure.in: Add support for or32.
10646 * configure: Regenerate.
10647 * Makefile.am: Add support for or32.
10648 * Makefile.in: Regenerate.
10649 * po/SRC-POTFILES.in: Add or32 files.
10650 * po/bfd.pot: Regenerate.
10651
10652 2002-01-31 Nick Clifton <nickc@cambridge.redhat.com>
10653 Don Lindsay <lindsayd@cisco.com>
10654
10655 * elf32-mips.c (mips_elf_calculate_relocation): Replace 'return
10656 false' with a return of a bfd_reloc_ error code.
10657
10658 2002-01-31 Hans-Peter Nilsson <hp@axis.com>
10659
10660 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
10661 unexport unreferenced symbols when --export-dynamic. Call
10662 _bfd_elf_strtab_delref when unexporting.
10663
10664 2002-01-30 Daniel Jacobowitz <drow@mvista.com>
10665
10666 * bfd-in.h: Include <stdbool.h> if it is available.
10667 * bfd-in2.h: Regenerated.
10668
10669 2002-01-31 Alan Modra <amodra@bigpond.net.au>
10670
10671 * elf64-ppc.c (func_desc_adjust): STV_PROTECTED functions should
10672 not go via the plt.
10673
10674 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
10675
10676 * archures.c: Tidy up formatting of embedded comments.
10677 * bfd.c: Tidy up formatting of embedded comments.
10678 * bfd-in.h: Fix formatting of comments.
10679 * reloc.c: Tidy up formatting of ordinary & embedded comments.
10680 * section.c: Tidy up formatting of embedded comments.
10681 * syms.c: Tidy up formatting of embedded comments.
10682 * targets.c: Tidy up formatting of embedded comments.
10683
10684 * bfd-in2.h: Regenerate.
10685
10686 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
10687
10688 * vms-tir.c (cmd_name): New function.
10689 (tir_cmd_name): New function.
10690 (etir_sta, etir_sto, etir_opr, etir_stc): Use cmd_name().
10691 (tir_opr, tir_ctl, tir_cmd): use tir_cmd_name().
10692 Fix formatting.
10693
10694 * peXXigen.c (pe_print_idata): Rearrange message to aid in
10695 translation.
10696 (pe_print_pdata): Rearrange message to aid in translation.
10697
10698 * libbfd.c (warn_deprecated): Rearrange error message to aid in
10699 translation.
10700
10701 * ihex.c (ihex_write_object_contents): Fix spelling typo.
10702
10703 * ieee.c (ieee_slurp_external_symbols): Remove spurious space.
10704
10705 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Rearrange error
10706 message to aid in translation.
10707
10708 * elf64-mmix.c (mmix_final_link_relocate): Rearrange error message
10709 to aid in translation.
10710
10711 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix typo.
10712
10713 2002-01-30 Philipp Thomas <pthomas@suse.de>
10714
10715 * coff-arm.c, elf32-elf.h: Unify messages.
10716
10717 2002-01-30 Nick Clifton <nickc@redhat.com>
10718
10719 * po/sv.po: Updated translation.
10720
10721 2002-01-30 Philipp Thomas <pthomas@suse.de>
10722
10723 * dwarf2.c (read_abbrev): Use full section name in error message.
10724 (decode_line_info): Likewise.
10725
10726 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Don't translate debugging
10727 message.
10728
10729 2002-01-30 Alan Modra <amodra@bigpond.net.au>
10730
10731 * elf64-ppc.c (func_desc_adjust): Only provide missing function
10732 descriptor symbols for undefined function code syms. Clear
10733 ELF_LINK_NON_ELF so that they can stay weak.
10734
10735 2002-01-29 Chris Demetriou <cgd@broadcom.com>
10736 Mitch Lichtenberg <mpl@broadcom.com>
10737
10738 * bfd-in.h (bfd_mips_elf32_create_embedded_relocs): New prototype.
10739 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): New function
10740 to handle 32-bit ELF embedded reloc (ld --embedded-relocs)
10741 generation.
10742 * bfd-in2.h: Regenerate.
10743
10744 2002-01-29 Chris Demetriou <cgd@broadcom.com>
10745
10746 * elf32-mips.c: Add additional comments about HI16 relocation
10747 processing.
10748 (_bfd_mips_elf_hi16_reloc): Don't subtract address here for
10749 pc-relative relocations. (Reverts change made on 2001-10-31.)
10750 (_bfd_mips_elf_lo16_reloc): Subtract address of LO16 part here
10751 for pc-relative relocations.
10752 (mips_elf_calculate_relocation): Add a comment about a kludge
10753 in the R_MIPS_GNU_REL_HI16 handling.
10754 (_bfd_mips_elf_relocate_section): Implement that kludge;
10755 adjust pc-relative HI16 relocation for difference in HI16 and
10756 LO16 addresses, since it can't easily be done in
10757 mips_elf_calculate_relocation.
10758
10759 2002-01-29 Martin Schwidefsky <schwidefsky@de.ibm.com>
10760
10761 * elf32-i386 (elf_i386_adjust_dynamic_symbol): Do not replace PLT32
10762 relocations with PC32 relocations for undefined or weak symbols.
10763 * elf32-s390 (elf_i386_adjust_dynamic_symbol): Likewise.
10764 * elf64-s390x (elf_i386_adjust_dynamic_symbol): Likewise.
10765
10766 2002-01-28 Jason Thorpe <thorpej@wasabisystems.com>
10767
10768 * elfcore.h (elf_core_file_p): Improve comment for last change.
10769
10770 2002-01-27 Daniel Jacobowitz <drow@mvista.com>
10771
10772 * configure: Regenerated.
10773
10774 2002-01-27 Jason Thorpe <thorpej@wasabisystems.com>
10775
10776 * elfcore.h (elf_core_file_p): Set the machine architecture
10777 before processing the program headers.
10778
10779 2002-01-26 Hans-Peter Nilsson <hp@bitrange.com>
10780
10781 * configure.in <64-bit configuration>: If using gcc, check and
10782 emit error for egcs-1.1.2.
10783 * configure: Regenerate.
10784
10785 2002-01-26 Egor Duda <deo@logos-m.ru>
10786
10787 * elf.c (elfcore_grok_win32pstatus): Copy only as much information
10788 as possible to avoid stack corruption.
10789
10790 2002-01-26 Richard Henderson <rth@redhat.com>
10791
10792 * elf64-alpha.c (elf64_alpha_check_relocs): Don't set reltext
10793 for non-allocated sections.
10794
10795 2002-01-25 Mark Kettenis <kettenis@gnu.org>
10796
10797 * elf.c (elfcore_write_prstatus): Make sure we pass the address of
10798 prstat.pr_reg even if it is a struct.
10799
10800 2002-01-25 Steve Ellcey <sje@cup.hp.com>
10801
10802 * elfxx-ia64.c: Reset AIX vector function overrides for HP-UX.
10803
10804 2002-01-25 Philipp Thomas <pthomas@suse.de>
10805
10806 * coffgen.c (coff_print_symbol): Don't mark info message
10807 for translation.
10808
10809 2002-01-25 Nick Clifton <nickc@redhat.com>
10810
10811 * po/fr.po: Updated translation.
10812 * po/es.po: Updated translation.
10813
10814 2002-01-25 Philipp Thomas <pthomas@suse.de>
10815
10816 * coff-alpha.c (alpha_relocate_section): Unify warning message
10817 for GP relative relocations without GP defined.
10818 * coff-mips.c (mips_relocate_section): Likewise.
10819
10820 2002-01-25 Alan Modra <amodra@bigpond.net.au>
10821
10822 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Avoid
10823 unsigned overflow when new_offset < old_offset.
10824
10825 2002-01-24 Philipp Thomas <pthomas@suse.de>
10826
10827 * bfd.c (_bfd_abort): Fix typo.
10828
10829 2002-01-23 Richard Henderson <rth@redhat.com>
10830
10831 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't suppress
10832 plt entries for undefweak symbols.
10833
10834 2002-01-23 Steve Ellcey <sje@cup.hp.com>
10835
10836 * targets.c (bfd_elf32_ia64_hpux_big_vec): Add to DEFAULT_VECTOR.
10837 (bfd_elf64_ia64_hpux_big_vec): Ditto.
10838 (bfd_elf32_h8300_vec): Ditto.
10839
10840 2002-01-23 Alan Modra <amodra@bigpond.net.au>
10841
10842 * elf64-ppc.c: Remove stale part of ABI comment.
10843 (NO_OPD_RELOCS): Define.
10844 (ppc64_elf_check_relocs): Use it.
10845 (ppc64_elf_relocate_section): Here too.
10846 (build_one_stub): Don't point function syms at the stub. Instead,
10847 hijack plt.offset.
10848 (ppc64_elf_relocate_section): Check whether REL24 relocs should
10849 really go to the stub. Make all dynamic relocs in opd against
10850 locals.
10851 (ppc64_elf_finish_dynamic_symbol): Allow for non-standard use of
10852 plt.offset.
10853
10854 2002-01-22 Richard Henderson <rth@redhat.com>
10855
10856 * elf64-alpha.c (INSN_UNOP): Encode with RB as $sp.
10857
10858 2002-01-22 Alan Modra <amodra@bigpond.net.au>
10859
10860 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Correct sign of
10861 TOC_BASE_OFF adjustment.
10862
10863 * Makefile.am: Run "make dep-am".
10864 * Makefile.in: Regenerate.
10865 * po/SRC-POTFILES.in: Regenerate.
10866
10867 2002-01-22 John David Anglin <dave@hiauly1.hia.nrc.ca>
10868
10869 * configure.host (hppa*64*-*-hpux*, hppa*64*-*-linux*): Add new
10870 host defines.
10871
10872 2002-01-21 Hans-Peter Nilsson <hp@axis.com>
10873
10874 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GOTREL>:
10875 Check for and emit error if sgot is NULL at this point.
10876
10877 2002-01-21 Jason Thorpe <thorpej@wasabisystems.com>
10878
10879 * config.bfd (ia64*-*-netbsd*): New target.
10880
10881 2002-01-21 Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
10882
10883 * som.c (som_write_space_strings): Comment typo fix.
10884
10885 2002-01-21 Alan Modra <amodra@bigpond.net.au>
10886
10887 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_func and
10888 is_func_descriptor fields.
10889 (link_hash_newfunc): Init them.
10890 (ppc64_elf_check_relocs): Only R_PPC24_REL24 syms starting with a
10891 dot are candidates for plt entries. When processing .opd relocs,
10892 set function descriptor strings to point inside function code
10893 string, and set new ppc_link_hash_entry fields.
10894 (ppc64_elf_gc_sweep_hook): Don't sweep R_PPC64_REL24 relocs.
10895 (ppc64_elf_adjust_dynamic_symbol): Remove most code dealing with
10896 function descriptors. It's now done in..
10897 (func_desc_adjust): New.
10898 (ppc64_elf_func_desc_adjust): New.
10899 (define elf_backend_always_size_sections): Define.
10900 (ppc64_elf_hide_symbol): New.
10901 (define elf_backend_hide_symbol): Define.
10902 (allocate_dynrelocs): Remove code looking up function descriptors
10903 as that has been done earlier.
10904 (ppc64_elf_size_dynamic_sections): Use htab shortcut to elf hash
10905 table.
10906 (ppc64_elf_finish_dynamic_symbol): Likewise. Remove code looking
10907 up function descriptor.
10908 (build_one_stub): Look up the function code sym. Check for
10909 invalid plt offsets.
10910 (ppc64_elf_relocate_section): Tweak calls to undefined weak syms.
10911 Convert R_PPC64_TOC relocs to R_PPC64_RELATIVE in shared libs.
10912
10913 * elf-bfd.h (elf_backend_data <elf_backend_hide_symbol>): Add
10914 boolean param.
10915 (_bfd_elf_link_hash_hide_symbol): Likewise.
10916 * elflink.h (elf_link_add_object_symbols): Adjust call to
10917 elf_backend_hide_symbol.
10918 (elf_fix_symbol_flags): Likewise.
10919 (elf_link_assign_sym_version): Likewise. Use bfd_malloc rather
10920 than bfd_alloc.
10921 * elf.c (_bfd_elf_link_hash_hide_symbol): Add "force_local" param.
10922 Set ELF_LINK_FORCED_LOCAL and call _bfd_elf_strtab_delref.
10923 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
10924 (clobber_millicode_symbols): Adjust to suit new hide_symbol.
10925 * elf32-cris.c (elf_cris_hide_symbol): Add "force_local" param
10926 and adjust to suit.
10927 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise, and call
10928 _bfd_elf_link_hash_hide_symbol rather than duplicating code.
10929 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
10930
10931 2002-01-18 Alan Modra <amodra@bigpond.net.au>
10932
10933 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Test for a
10934 dynamic function descriptor symbol, not the associated function
10935 symbol.
10936
10937 2002-01-17 Eric Christopher <echristo@redhat.com>
10938
10939 * elf32-mips.c (mips_elf_calculate_relocation): Fix typo.
10940
10941 2002-01-17 Nick Clifton <nickc@cambridge.redhat.com>
10942
10943 * po/bfd.pot: Regenerate.
10944 * po/fr.po: Regenerate.
10945
10946 2002-01-17 Alan Modra <amodra@bigpond.net.au>
10947
10948 * elf-bfd.h (elf_backend_data <elf_backend_section_from_bfd_section>):
10949 Remove "Elf_Internal_Shdr *" param.
10950 (_bfd_mips_elf_section_from_bfd_section): Ditto.
10951 * elf32-mips.c (_bfd_mips_elf_section_from_bfd_section): Ditto.
10952 * elf32-m32r.c (_bfd_m32r_elf_section_from_bfd_section): Ditto.
10953 * elf32-v850.c (v850_elf_section_from_bfd_section): Ditto.
10954 * elf64-mmix.c (mmix_elf_section_from_bfd_section): Ditto.
10955 * elfxx-ia64.c (elfNN_hpux_backend_section_from_bfd_section): Ditto.
10956 * elf.c (_bfd_elf_section_from_bfd_section): Allow backend
10957 function to override special sections. Remove hdr arg from
10958 backend call, and don't loop.
10959
10960 2002-01-16 Eric Christopher <echristo@redhat.com>
10961
10962 * elf32-mips.c (mips_elf_calculate_relocation): Set require_jalxp
10963 on R_MIPS_26 and target is 16bit. Add R_MIPS16_GPREL to list of
10964 relocations requiring gp0 and gp.
10965
10966 2002-01-16 Richard Earnshaw <rearnsha@arm.com>
10967
10968 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle
10969 EF_ARM_VFP_FLOAT.
10970 (elf32_arm_print_private_bfd_data): Likewise.
10971
10972 2002-01-16 Nick Clifton <nickc@cambridge.redhat.com>
10973
10974 * po/tr.po: Import new version.
10975
10976 2002-01-16 Alan Modra <amodra@bigpond.net.au>
10977
10978 * elf64-ppc.c (ppc64_elf_howto_raw): Remove stale FIXMEs.
10979 (ppc64_elf_reloc_type_lookup): Use proper CTOR reloc.
10980 (ORI_R0_R0_0): Correct.
10981
10982 2002-01-16 Alan Modra <amodra@bigpond.net.au>
10983
10984 * elflink.c (_bfd_elf_create_dynamic_sections): Don't set SEC_CODE
10985 when plt_not_loaded.
10986 * elf64-ppc.c (ppc64_elf_create_dynamic_sections): No need to
10987 clear .plt SEC_CODE here. Create .stub and correct .glink flags.
10988 (PLT_INITIAL_ENTRY_SIZE): Set to 24.
10989 (ppc64_elf_glink_code): Delete.
10990 (PPC64_ELF_GLINK_SIZE): Delete.
10991 (ADDIS_R12_R2, STD_R2_40R1, LD_R11_0R12, LD_R2_0R12, MTCTR_R11,
10992 BCTR, ADDIS_R12_R12_1, LD_R2_40R1, NOP, LI_R0_0, B_DOT, LIS_R0_0,
10993 ORI_R0_R0_0): Define.
10994 (PLT_CALL_STUB_SIZE, GLINK_CALL_STUB_SIZE): Define.
10995 (struct ppc_link_hash_table): Add sstub and plt_overflow.
10996 (ppc64_elf_link_hash_table_create): Init them.
10997 (ppc64_elf_check_relocs <R_PPC64_REL24>): Refcount .plt entry.
10998 Don't copy to shared lib.
10999 (ppc64_elf_check_relocs): Call bfd_set_error on errors.
11000 (ppc64_elf_gc_sweep_hook <R_PPC64_REL24>): Sweep plt refcount.
11001 (allocate_dynrelocs <plt>): Don't change function sym here. Make
11002 room for .stub and .glink code.
11003 (ppc64_elf_size_dynamic_sections): Handle .stub. Make entry for
11004 DT_PPC64_GLINK.
11005 (ppc64_elf_final_link): Rename to ppc64_elf_set_toc. Don't call
11006 bfd_elf64_bfd_final_link.
11007 (bfd_elf64_bfd_final_link): Don't define.
11008 (ppc64_elf_size_stubs): New.
11009 (build_plt_stub): New.
11010 (build_one_stub): New.
11011 (ppc64_elf_build_stubs): New.
11012 (ppc64_elf_relocate_section <toc relocs>): Remove assert.
11013 (ppc64_elf_relocate_section): Don't copy R_PPC64_REL24 relocs.
11014 (ppc64_elf_finish_dynamic_symbol): Don't build stubs here. Set
11015 DT_PPC64_GLINK entry. Tweak DT_PLTGOT, DT_JMPREL, DT_PLTRELSZ in
11016 case output sections not separate. Adjust DT_RELASZ to not
11017 include plt relocs. Set reserved got entry. Set got and plt
11018 entry size.
11019 (elf_backend_got_header_size): Set to 8.
11020 * elf64-ppc.h: New file.
11021
11022 2002-01-16 Alan Modra <amodra@bigpond.net.au>
11023
11024 * elf32-arm.h (elf32_arm_size_dynamic_sections): When removing
11025 sections, use bfd_section_list_remove.
11026 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
11027 * elflink.h (elf_link_add_object_symbols): When removing all
11028 sections, use bfd_section_list_clear.
11029
11030 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
11031
11032 * po/sv.po: New file: Swedish translation.
11033 * configure.in (ALL_LINGUAS): Add sv.
11034 * configure: Regenerate.
11035
11036 2002-01-15 Jakub Jelinek <jakub@redhat.com>
11037
11038 * elflink.h (elf_link_input_bfd): Back out 2002-01-07 change.
11039 * elf.c (merge_sections_remove_hook): New function.
11040 (_bfd_elf_merge_sections): Pass it as 3rd argument to
11041 _bfd_merge_sections.
11042 * libbfd-in.h (_bfd_merge_sections): Add 3rd argument.
11043 * libbfd.h: Rebuilt.
11044 * merge.c (_bfd_merge_sections): Add remove_hook argument.
11045 Call remove_hook if a SEC_EXCLUDE section is encountered.
11046
11047 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
11048
11049 * elf32-xstormy16.c (xstormy16_reloc_map): Add new field 'table'.
11050 (xstormy16_reloc_map): Initialise new field with correct howto
11051 table.
11052 (xstormy16_reloc_type_lookup): Use 'table' field to locate correct
11053 howto entry.
11054
11055 2002-01-10 Michael Snyder <msnyder@redhat.com>
11056
11057 * elf.c (elfcore_write_prstatus): Use long instead of pid_t;
11058 (elfcore_write_pstatus): Use long instead of pid_t;
11059 * elf-bfd.h: Change prototypes to use long instead of pid_t;
11060
11061 2002-01-09 Jason Thorpe <thorpej@wasabisystems.com>
11062
11063 * elf.c: Update copyright years.
11064 (elfcore_grok_netbsd_note): Use NT_NETBSDCORE_PROCINFO
11065 and NT_NETBSDCORE_FIRSTMACH. Improve a comment.
11066
11067 2002-01-08 Michael Snyder <msnyder@redhat.com>
11068
11069 Add capability to write corefile note sections, for gdb.
11070 * elf.c (elfcore_write_note): New function.
11071 (elfcore_write_prpsinfo): New function.
11072 (elfcore_write_prstatus): New function.
11073 (elfcore_write_pstatus): New function.
11074 (elfcore_write_prfpreg): New function.
11075 (elfcore_write_prxfpreg): New function.
11076 * elf-bfd.h: Add prototypes for above functions.
11077
11078 2002-01-08 Alexandre Oliva <aoliva@redhat.com>
11079
11080 * elf.c (elf_fake_sections): Propagate errors from
11081 elf_backend_fake_section.
11082
11083 2002-01-07 Jason Thorpe <thorpej@wasabisystems.com>
11084
11085 * Makefile.am (BFD32_BACKENDS): Add elf32-sh-nbsd.lo.
11086 (BFD32_BACKENDS_CFILES): Add elf32-sh-nbsd.c.
11087 (elf32-sh-nbsd.lo): New rule.
11088 * Makefile.in: Regenerate.
11089 * config.bfd (sh*le-*-netbsdelf*): New target.
11090 (sh*-*-netbsdelf*): New target.
11091 * configure.in: Include netbsd-core.lo for native sh*-*-netbsd*.
11092 (bfd_elf32_shnbsd_vec): New vector.
11093 (bfd_elf32_shlnbsd_vec): New vector.
11094 * configure: Regenerate.
11095 * elf32-sh-nbsd.c: New file.
11096 * targets.c: Update copyright years.
11097 (_bfd_target_vector): Add bfd_elf32_shlnbsd_vec and
11098 bfd_elf32_shnbsd_vec.
11099
11100 2002-01-07 Aldy Hernandez <aldyh@redhat.com>
11101
11102 * coff-rs6000.c (READ20): Use bfd_scan_vma.
11103
11104 2002-01-07 Geoffrey Keating <geoffk@redhat.com>
11105
11106 * elflink.h (elf_link_input_bfd): Don't ask for the merged offset
11107 of a symbol in a section that will be deleted.
11108
11109 2002-01-07 Nick Clifton <nickc@cambridge.redhat.com>
11110
11111 * po/es.po: New file: Spanish translation.
11112 * configure.in (ALL_LINGUAS): Add es.
11113 * configure: Regenerate.
11114
11115 2002-01-06 Steve Ellcey <sje@cup.hp.com>
11116
11117 * elfxx-ia64.c (is_unwind_section_name): Add target vector as
11118 argument so we can handle HP-UX specially.
11119 (elfNN_ia64_hpux_vec): New for use in is_unwind_section_name.
11120 (elfNN_hpux_backend_section_from_bfd_section): New for support
11121 of SHN_IA_64_ANSI_COMMON.
11122 (elfNN_ia64_relax_section): Add support for SHN_IA_64_ANSI_COMMON.
11123 (is_unwind_section_name): Add special HP-UX support.
11124 (elfNN_ia64_section_from_shdr): Add support for more sections.
11125 (elfNN_ia64_fake_sections): Modify is_unwind_section_name call and
11126 add support for more sections.
11127 (elfNN_ia64_additional_program_headers): Modify
11128 is_unwind_section_name call.
11129 (elfNN_ia64_modify_segment_map): Remove assumption that there is
11130 only one unwind section in segment.
11131
11132 2002-01-06 Alan Modra <amodra@bigpond.net.au>
11133
11134 * syms.c (_bfd_generic_make_empty_symbol): New function.
11135 * libbfd-in.h (_bfd_nosymbols_make_empty_symbol): Define as
11136 _bfd_generic_make_empty_symbol.
11137 * libbfd.h: Regenerate.
11138 * bfd-in2.h: Regenerate.
11139 * hppabsd-core.c (hppabsd_core_make_empty_symbol): Delete function.
11140 (hppabsd_core_get_symtab_upper_bound): Don't define.
11141 (hppabsd_core_get_symtab): Likewise.
11142 (hppabsd_core_print_symbol): Likewise.
11143 (hppabsd_core_get_symbol_info): Likewise.
11144 (hppabsd_core_bfd_is_local_label_name): Likewise.
11145 (hppabsd_core_get_lineno): Likewise.
11146 (hppabsd_core_find_nearest_line): Likewise.
11147 (hppabsd_core_bfd_make_debug_symbol): Likewise.
11148 (hppabsd_core_read_minisymbols): Likewise.
11149 (hppabsd_core_minisymbol_to_symbol): Likewise.
11150 (hppabsd_core_vec): Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols).
11151 Formatting fixes.
11152 * hpux-core.c: Similarly.
11153 * irix-core.c: Similarly.
11154 * osf-core.c: Similarly.
11155 * sco5-core.c: Similarly.
11156 * binary.c (binary_make_empty_symbol): Remove function, define as
11157 _bfd_generic_make_empty_symbol.
11158 * ihex.c (ihex_make_empty_symbol): Likewise.
11159 * mmo.c (mmo_make_empty_symbol): Likewise.
11160 * ppcboot.c (ppcboot_make_empty_symbol): Likewise.
11161 * srec.c (srec_make_empty_symbol): Likewise.
11162 * versados.c (versados_make_empty_symbol): Likewise.
11163 * vms.c (_bfd_vms_make_empty_symbol): Remove.
11164 (vms_make_empty_symbol): Define as _bfd_generic_make_empty_symbol.
11165 * vms-gsd.c (_bfd_vms_slurp_gsd): Call bfd_make_empty_symbol
11166 rather than _bfd_vms_make_empty_symbol.
11167 * vms-misc.c (new_symbol): Likewise.
11168
11169 2002-01-05 Alan Modra <amodra@bigpond.net.au>
11170
11171 * section.c (bfd_section_init): Remove unnecessary initialisations.
11172 (bfd_section_list_clear): New function.
11173 (bfd_section_list_remove, bfd_section_list_insert): New macros.
11174 (_bfd_strip_section_from_output): Use them.
11175 * coffcode.h (coff_set_alignment_hook): Likewise.
11176 * elf32-mips.c (_bfd_mips_elf_final_link): Likewise.
11177 * elf64-mips.c (mips_elf64_final_link): Likewise.
11178 * elf64-mmix.c (mmix_elf_final_link): Likewise.
11179 * sunos.c (sunos_add_dynamic_symbols): Likewise.
11180 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
11181 * bfd-in2.h: Regenerate.
11182
11183 * netbsd-core.c (netbsd_core_file_p): Use bfd_make_section_anyway
11184 rather than doing our own section handling. Clean up after errors
11185 with bfd_release and bfd_section_list_clear. Handle unexpected
11186 flags.
11187 * aoutf1.h (sunos4_core_file_p): Likewise.
11188 * aix386-core.c (aix386_core_file_p): Likewise.
11189 * cisco-core.c (cisco_core_file_validate): Likewise.
11190 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
11191 * trad-core.c (trad_unix_core_file_p): Likewise.
11192
11193 * hppabsd-core.c (hppabsd_core_core_file_p): Clean up after errors
11194 with bfd_release and bfd_section_list_clear.
11195 * hpux-core.c (hpux_core_core_file_p): Likewise.
11196 * irix-core.c (irix_core_core_file_p): Likewise.
11197 * lynx-core.c (lynx_core_file_p): Likewise.
11198 * osf-core.c (osf_core_core_file_p): Likewise.
11199 * rs6000-core.c (rs6000coff_core_p): Likewise.
11200 * sco5-core.c (sco5_core_file_p): Likewise.
11201
11202 * elf32-mips.c (_bfd_mips_elf_lo16_reloc): Simplify, and perform
11203 sign extension adjustments without conditionals.
11204
11205 2002-01-04 Jakub Jelinek <jakub@redhat.com>
11206
11207 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Don't crash if
11208 CIE at .eh_frame start is removed due to no FDEs referencing it.
11209
11210 2002-01-04 Jason Thorpe <thorpej@wasabisystems.com>
11211
11212 * config.bfd (x86_64-*-netbsd*): New target.
11213 * configure.in (x86_64-*-netbsd*): Set COREFILE
11214 to netbsd-core.lo.
11215 * configure: Regenerated.
11216
11217 2002-01-03 Tom Rix <trix@redhat.com>
11218
11219 * xcofflink.c (_bfd_xcoff_bfd_final_link): Update .pad section ordering
11220 for recent bfd_make_section_anyway change.
11221
11222 2002-01-03 Nick Clifton <nickc@cambridge.redhat.com>
11223
11224 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
11225 R_ARM_THM_PC11 reloc.
11226
11227 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
11228
11229 * configure.in (LINGUAS): Add ja.
11230 * configure: Regenerate.
11231 * po/ja.po: Import from translation project's web site.
11232
11233 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
11234
11235 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Reformat error
11236 messages to ease translation into other languages.
11237
11238 For older changes see ChangeLog-0001
11239 \f
11240 Local Variables:
11241 mode: change-log
11242 left-margin: 8
11243 fill-column: 74
11244 version-control: never
11245 End: