2003-12-04 H.J. Lu <hongjiu.lu@intel.com>
[binutils-gdb.git] / bfd / ChangeLog
1 2003-12-04 H.J. Lu <hongjiu.lu@intel.com>
2
3 * elf32-ppc.c (ppc_elf_relax_section): Don't check relax_finalizing.
4
5 2003-12-04 H.J. Lu <hongjiu.lu@intel.com>
6
7 * elfxx-ia64.c (elfNN_ia64_relax_section): Use the
8 need_relax_finalize field in link_info instead of
9 relax_finalizing to check if the relax finalize pass is being
10 done.
11
12 2003-12-04 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
13
14 * coff-arm.c (coff_arm_relocate_section, bfd_arm_process_before_allocation):
15 Change ARM26* to ARM_26* in comments to match definitions.
16 (coff_arm_adjust_symndx): Replace hard-coded constants with
17 appropriate definitions (ARM_26*).
18
19 2003-12-04 Alan Modra <amodra@bigpond.net.au>
20
21 * coff-i860.c (coff_i860_reloc_nyi): Return bfd_reloc_not_supported.
22 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Warning fixes.
23 (mn10300_elf_relax_section): Likewise.
24 * nlm32-alpha.c (ONES): Define.
25 (nlm32_alpha_howto_table): Use it to avoid warnings.
26
27 2003-12-04 Alan Modra <amodra@bigpond.net.au>
28
29 * elf32-i386.c (elf_i386_object_p): Delete.
30 (elf_backend_object_p): Don't define.
31 * elf32-s390.c (elf_s390_object_p): No need to alloc tdata here.
32 * elf32-sh.c (sh_elf_object_p): Likewise.
33 * elf32-sparc.c (elf32_sparc_object_p): Likewise.
34 * elf64-alpha.c (elf64_alpha_object_p): Likewise.
35 * elf64-s390.c (elf_s390_object_p): Likewise.
36 * elf64-x86-64.c (elf64_x86_64_elf_object_p): Likewise.
37
38 2003-12-03 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
39
40 * archures.c (bfd_mach_m32r2): Add new machine type.
41 * bfd-in2.h: Regenerate.
42 * cpu-m32r.c : Add new machine type.
43 * elf32-m32r.c (m32r_elf_object_p, m32r_elf_final_write_processing,
44 m32r_elf_merge_private_bfd_data): Add support for new machine
45 type.
46
47 2003-12-03 Dave Airlie <airlied@linux.ie>
48
49 * config.bfd: Add vax-linux-gnu target.
50 * configure.in: Likewise.
51 * configure: Regenerate.
52
53 2003-12-03 Alan Modra <amodra@bigpond.net.au>
54
55 * ecoff.c (ecoff_link_add_archive_symbols): Update for renamed
56 bfd_link_hash_entry field "next" -> "und_next".
57 * linker.c (_bfd_link_hash_newfunc): Likewise.
58 (bfd_link_add_undef): Likewise.
59 (_bfd_generic_link_add_archive_symbols): Likewise.
60 (_bfd_generic_link_add_one_symbol): Likewise.
61 * xcofflink.c (xcoff_link_add_symbols): Likewise.
62
63 2003-12-02 Nick Clifton <nickc@redhat.com>
64
65 * configure.in (ALL_LINGUAS): Add ro.
66 * po/ro.po: New Romanian translation.
67
68 2003-12-02 Alan Modra <amodra@bigpond.net.au>
69
70 * Makefile.am: Run "make dep-am".
71 * Makefile.in: Regenerate.
72
73 2003-12-01 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
74
75 * coffcode.h (coff_compute_section_file_positions): Set page_size
76 to 1 instead of 0 in the case file alignment value is zero.
77
78 2003-12-01 Kazu Hirata <kazu@cs.umass.edu>
79
80 * coff-rs6000.c: Remove ARGSUSED and VARARGS.
81 * coff64-rs6000.c: Likewise.
82 * coffcode.h: Likewise.
83 * elf32-vax.c: Likewise.
84 * hash.c: Likewise.
85 * hppabsd-core.c: Likewise.
86 * hpux-core.c: Likewise.
87 * ihex.c: Likewise.
88 * netbsd-core.c: Likewise.
89 * osf-core.c: Likewise.
90 * pdp11.c: Likewise.
91 * ptrace-core.c: Likewise.
92 * sco5-core.c: Likewise.
93 * section.c: Likewise.
94 * sunos.c: Likewise.
95 * trad-core.c: Likewise.
96
97 2003-12-01 Alan Modra <amodra@bigpond.net.au>
98
99 * elf-bfd.h (is_elf_hash_table): Take hash tab rather than info arg.
100 * elf.c (_bfd_elf_merge_sections): Adjust to suit.
101 (_bfd_elf_link_just_syms): Likewise.
102 (bfd_elf_get_needed_list): Likewise.
103 (bfd_elf_get_runpath_list): Likewise.
104 (_bfd_elf_link_hash_copy_indirect): Remove unneeded parens.
105 * elf32-hppa.c (elf32_hppa_setup_section_lists): Don't check hash tab
106 creator flavour.
107 (elf32_hppa_set_gp): Look up output sections rather than using htab.
108 * elf32-i960.c: Comment fix. Formatting.
109 * elf32-m32r.c (m32r_elf_add_symbol_hook): Use is_elf_hash_table
110 rather than testing creator flavour.
111 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
112 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
113 * elflink.c (_bfd_elf_link_create_dynamic_sections): Adjust for
114 is_elf_hash_table change. Remove redundant test.
115 (bfd_elf_record_link_assignment): Use is_elf_hash_table rather than
116 testing creator flavour.
117 (elf_link_record_local_dynamic_symbol): Adjust for is_elf_hash_table.
118 (_bfd_elf_fix_symbol_flags): Likewise.
119 (_bfd_elf_adjust_dynamic_symbol): Likewise.
120 * elflink.h (elf_link_add_object_symbols): Likewise. Remove redundant
121 checks. Use is_elf_hash_table rather than testing creator flavour.
122 Use hash_table throughout in place of info->hash.
123 (elf_add_dynamic_entry): Adjust for is_elf_hash_table change.
124 (NAME(bfd_elf,size_dynamic_sections)): Likewise. Remove redundant
125 check.
126 (elf_bfd_final_link): Adjust for is_elf_hash_table change.
127 (elf_link_check_versioned_symbol): Use is_elf_hash_table rather than
128 testing creator flavour.
129 (elf_gc_sections): Add is_elf_hash_table check.
130 (elf_gc_common_finalize_got_offsets): Likewise.
131 (elf_bfd_discard_info): Adjust for is_elf_hash_table change. Remove
132 redundant check.
133 * elfxx-ia64.c (elfNN_ia64_relax_section): Use is_elf_hash_table
134 rather than testing creator flavour.
135
136 2003-11-28 Christian Groessler <chris@groessler.org>
137
138 * cpu-z8k.c: Convert to ISO C90.
139 * coff-z8k.c: Likewise.
140
141 2003-11-27 Alexandre Oliva <aoliva@redhat.com>
142
143 * elf-bfd.h (elf_backend_data::elf_backend_modify_segment_map):
144 Add link info argument.
145 * elf32-i370.c (elf_backend_modify_segment_map): Likewise.
146 * elf32-ppc.c (ppc_elf_modify_segment_map): Likewise.
147 * elf32-xtensa.c (elf_xtensa_modify_segment_map): Likewise.
148 * elf64-hppa.c (elf64_hppa_modify_segment_map): Likewise.
149 * elfxx-ia64.c (elfNN_ia64_modify_segment_map): Likewise.
150 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Likewise.
151 * elfxx-mips.h (_bfd_mips_elf_modify_segment_map): Likewise.
152 * elf.c (assign_file_positions_except_relocs,
153 assign_file_positions_for_segments): Likewise. Adjust calls.
154
155 2003-11-27 Mark Kettenis <kettenis@gnu.org>
156
157 * elf.c (elfcore_grok_netbsd_procinfo): Make a pseudosection out
158 of the note.
159
160 2003-11-26 Daniel Jacobowitz <drow@mvista.com>
161 Richard Sandiford <rsandifo@redhat.com>
162
163 * elfxx-mips.c (mips_elf_set_global_got_offset): Don't set no_fn_stub.
164 (mips_elf_set_no_stub): New function.
165 (mips_elf_multi_got): Call it.
166 (_bfd_mips_elf_finish_dynamic_symbol): If a relocation is needed for
167 a secondary GOT entry, create an R_MIPS_32 or R_MIPS_64 relocation and
168 use mips_elf_create_dynamic_relocation to deal with any compatibility
169 issues. Store the adjusted addend in the GOT slot.
170
171 2003-11-25 Mattias EngdegÄrd <mattias@virtutech.se>
172
173 * stabs.c (_bfd_link_section_stabs): Skip N_EXCL stabs when
174 procesing N_BINCL stabs.
175
176 2003-11-25 Alan Modra <amodra@bigpond.net.au>
177
178 * elf64-ppc.c (ppc_type_of_stub): Disallow stubs other than
179 ppc_stub_plt_call to symbols defined in shared libs.
180
181 2003-11-22 Jakub Jelinek <jakub@redhat.com>
182
183 * elf-bfd.h (ELF_LINK_POINTER_EQUALITY_NEEDED): Define new flag.
184 * elf.c (_bfd_elf_link_hash_copy_indirect): Copy it.
185 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
186 (elf_i386_check_relocs): Set it.
187 (elf_i386_finish_dynamic_symbol): If it is not set,
188 clear st_value of SHN_UNDEF symbol.
189
190 2003-11-20 Jim Blandy <jimb@redhat.com>
191
192 * cpu-powerpc.c (powerpc_compatible): Any ISA in the PowerPC
193 family is a superset of <bfd_arch_rs6000,bfd_mach_rs6k>.
194
195 2003-11-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
196
197 * elf32-s390.c (elf_s390_relocate_section): Don't recalculate symbol
198 section for reloc output and subtract the output section's address
199 from the addend when converting a relocation into one against a
200 section symbol.
201 * elf64-s390.c (elf_s390_relocate_section): Likewise.
202
203 2003-11-18 James E Wilson <wilson@specifixinc.com>
204
205 * elfxx-ia64.c (get_fptr): For fptr_rel, use dynobj not abfd.
206 (elfNN_ia64_size_dynamic_sections): When stripping sections, check
207 for ia64_info->rel_fptr_sec.
208
209 2003-11-18 Alan Modra <amodra@bigpond.net.au>
210
211 * elf64-ppc.c (toc_adjusting_stub_needed): Exit early if section
212 size is zero.
213
214 2003-11-17 Daniel Jacobowitz <drow@mvista.com>
215
216 * elf.c (_bfd_elf_link_hash_copy_indirect): Copy
217 ELF_LINK_HASH_NEEDS_PLT. Fix formatting.
218 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
219 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
220 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Likewise.
221 * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
222 * elf32-sh.c (sh_elf_copy_indirect_symbol): Likewise.
223 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
224 * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
225 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
226 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
227 * elf32-xtensa.c (elf_xtensa_copy_indirect_symbol): Remove.
228 (elf_backend_copy_indirect_symbol): Don't define.
229
230 2003-11-14 Daniel Jacobowitz <drow@mvista.com>
231
232 * elfxx-mips.c (mips_elf_merge_gots): Weaken assert for local
233 GOT entries.
234
235 2003-11-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
236
237 * elf32-s390.c (elf_s390_relocate_section): Only convert R_390_32
238 to R_390_RELATIVE. Convert the other relocations against local
239 symbols to relocations against the start of the section.
240 * elf64-s390.c (elf_s390_relocate_section): Only convert R_390_64
241 to R_390_RELATIVE. Convert the other relocations against local
242 symbols to relocations against the start of the section.
243
244 2003-11-11 Nick Clifton <nickc@redhat.com>
245
246 * elf-m10300.c (bfd_mn10300_elf_size_dynamic_sections): Use
247 info->executable not info->shared to decide if a .interp section
248 should be present.
249 * elf32-arm.h (elf32_arm_size_dynamic_sections): Likewise.
250 * elf32-cris.c (elf_cris_size_dynamic_sections): Likewise.
251 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
252 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
253 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
254 * elf32-vax.c (elf_vax_size_dynamic_sections): Likewise.
255 * elf32-xtensa.c (elf_xtensa_size_dynamic_sections): Likewise.
256 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
257 * elfxx-mips.c (_bfd_mips_size_dynamic_sections): Likewise.
258 * elflink.h (size_dynamic_sections): Likewise.
259
260 2003-11-10 Jonathan Wilson <jonwil@tpgi.com.au>
261
262 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Swap out tls pointer.
263 (_bfd_XXi_final_link_postscript): Look for __tks_used symbol. If
264 found initialise the tls data directory entry.
265
266 2003-11-07 Alan Modra <amodra@bigpond.net.au>
267
268 * elf32-ppc.c (ppc_elf_install_value): Delete.
269 (shared_stub_entry, stub_entry): Make them arrays of ints.
270 Remove initial branch.
271 (ppc_elf_relax_section): Write one branch around all trampolines
272 instead. Correct bogus R_PPC_PLTREL24 handling. Correct
273 branch range check. Only use shared_stub_entry when shared.
274 Test that branches can reach stubs. Write trampolines out at
275 end so that just one realloc is used. Handle little-endian
276 mode. Move relevant code from ppc_elf_install_value to here.
277 (ppc_elf_relocate_section): Move code handling RELAX32 from
278 ppc_elf_install_value to here.
279
280 2003-11-06 Alan Modra <amodra@bigpond.net.au>
281
282 * elf32-ppc.c (ppc_elf_howto_raw); Add entry for R_PPC_RELAX32PC.
283 (ppc_elf_install_value): Handle R_PPC_RELAX32PC. Merge duplicate
284 cases.
285 (shared_stub_entry): Correct opcode.
286 (ppc_elf_relax_section): Generate R_PPC_RELAX32PC relocs.
287 (ppc_elf_relocate_section): Handle them.
288
289 2003-11-05 Alan Modra <amodra@bigpond.net.au>
290
291 * elf.c (_bfd_elf_rela_local_sym): Accept asection **, and return
292 updated section in case of merged section.
293 * elf-bfd.h (_bfd_elf_rela_local_sym): Update declaration.
294 * elf-hppa.h (elf_hppa_relocate_section): Adjust call.
295 * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
296 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
297 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
298 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
299 * elf32-cris.c (cris_elf_relocate_section): Likewise.
300 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
301 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
302 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
303 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
304 * elf32-i370.c (i370_elf_relocate_section): Likewise.
305 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
306 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
307 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
308 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
309 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
310 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
311 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
312 * elf32-s390.c (elf_s390_relocate_section): Likewise.
313 * elf32-sh.c (sh_elf_relocate_section): Likewise.
314 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
315 * elf32-v850.c (v850_elf_relocate_section) Likewise.
316 * elf32-vax.c (elf_vax_relocate_section): Likewise.
317 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
318 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
319 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
320 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
321 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
322 * elf64-s390.c (elf_s390_relocate_section): Likewise.
323 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
324 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
325 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
326 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
327
328 * elf32-cris.c (cris_elf_relocate_section): Don't recalculate symbol
329 section for reloc output.
330 * elf32-i370.c (i370_elf_relocate_section): Likewise.
331 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
332 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
333 * elf32-vax.c (elf_vax_relocate_section): Likewise.
334 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
335 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
336
337 * elf32-ppc.c (ppc_elf_relocate_section): Don't recalculate everything
338 for R_PPC_RELAX32 reloc. Don't bother checking ppc_elf_install_value
339 return value.
340 * elf64-ppc.c (ppc64_elf_relocate_section <R_PPC64_TOC>): Sanity check
341 sec->id.
342
343 2003-11-05 Alan Modra <amodra@bigpond.net.au>
344
345 * elf32-d10v.c (extract_rel_addend, insert_rel_addend): New functions.
346 (elf32_d10v_relocate_section): Use them to handle -r reloc
347 adjustments, and in place of _bfd_elf_rela_local_sym.
348
349 * cpu-iq2000.c (arch_info_struct): Warning fix.
350
351 2003-11-05 Alan Modra <amodra@bigpond.net.au>
352
353 * elf32-hppa.c (ELIMINATE_COPY_RELOCS): Define.
354 (elf32_hppa_copy_indirect_symbol): Don't copy NON_GOT_REF on
355 weakdefs.
356 (elf32_hppa_check_relocs): Use ELIMINATE_COPY_RELOCS.
357 (elf32_hppa_adjust_dynamic_symbol): Likewise. Copy weakdef
358 NON_GOT_REF.
359 (allocate_dynrelocs): Use ELIMINATE_COPY_RELOCS and
360 SYMBOL_CALLS_LOCAL. Discard relocs for undef weak syms with
361 non-default visibility.
362 (elf32_hppa_relocate_section): Use ELIMINATE_COPY_RELOCS and
363 SYMBOL_CALLS_LOCAL.
364
365 2003-11-04 Alan Modra <amodra@bigpond.net.au>
366
367 * aout-target.h, aoutf1.h, bfdio.c, bfdwin.c: Update copyright date.
368 * coff-apollo.c, coff-sparc.c, coff-w65.c, coff-we32k.c: Ditto.
369 * coff-z8k.c, coffgen.c, cpu-frv.c, cpu-h8500.c, cpu-hppa.c: Ditto.
370 * cpu-ia64-opc.c, cpu-m10300.c, cpu-mips.c, cpu-msp430.c: Ditto.
371 * cpu-rs6000.c, cpu-z8k.c, efi-app-ia32.c, elf32-am33lin.c: Ditto.
372 * gen-aout.c, hash.c, hp300hpux.c, init.c, mach-o.c: Ditto.
373 * nlm-target.h, nlm.c, som.h, stabs.c, sysdep.h, xsym.h: Ditto.
374
375 * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Fix
376 "dereferencing type-punned pointer" warnings.
377
378 * aout-adobe.c (aout_adobe_set_section_contents): Constify location.
379 * aoutx.h (NAME(aout,set_section_contents)): Ditto.
380 * bfd-in2.h: Regenerate.
381 * binary.c (binary_set_section_contents): Ditto.
382 * bout.c (b_out_set_section_contents): Ditto.
383 * coff-tic54x.c (tic54x_set_section_contents): Ditto.
384 * coffcode.h (coff_set_section_contents): Ditto.
385 * ecoff.c (_bfd_ecoff_set_section_contents): Ditto.
386 * elf-bfd.h (_bfd_elf_set_section_contents): Ditto.
387 * elf.c (_bfd_elf_set_section_contents): Ditto.
388 * elfxx-mips.c (_bfd_mips_elf_set_section_contents): Ditto.
389 * elfxx-mips.h (_bfd_mips_elf_set_section_contents): Ditto.
390 * i386msdos.c (msdos_set_section_contents): Ditto.
391 * ieee.c (ieee_set_section_contents): Ditto.
392 * ihex.c (ihex_set_section_contents): Ditto.
393 * libaout.h (NAME(aout,set_section_contents)): Ditto.
394 * libbfd-in.h (_bfd_nowrite_set_section_contents): Ditto.
395 (_bfd_generic_set_section_contents): Ditto.
396 * libbfd.h: Regenerate.
397 * libbfd.c (_bfd_generic_set_section_contents): Ditto.
398 * libecoff.h (_bfd_ecoff_set_section_contents): Ditto.
399 * libnlm.h (nlmNAME(set_section_contents)): Ditto.
400 (struct nlm_backend_data <nlm_mangle_relocs>): Ditto.
401 * mmo.c (mmo_set_section_contents): Ditto.
402 * nlm32-alpha.c (nlm_alpha_mangle_relocs): Ditto.
403 * nlm32-i386.c (nlm_i386_mangle_relocs): Ditto.
404 * nlm32-ppc.c (nlm_powerpc_mangle_relocs): Ditto.
405 * nlm32-sparc.c (nlm_sparc_mangle_relocs): Ditto.
406 * nlmcode.h (nlm_set_section_contents): Ditto.
407 * oasys.c (oasys_set_section_contents): Ditto.
408 * pdp11.c (NAME(aout,set_section_contents)): Ditto.
409 * ppcboot.c (ppcboot_set_section_contents): Ditto.
410 * srec.c (srec_set_section_contents): Ditto.
411 * targets.c (BFD_JUMP_TABLE_WRITE <_bfd_set_section_contents>): Ditto.
412 * tekhex.c (tekhex_set_section_contents): Ditto.
413 (move_section_contents): Ditto.
414 * versados.c (versados_set_section_contents): Ditto.
415 * vms-misc.c (_bfd_save_vms_section): Ditto.
416 * vms.c (vms_set_section_contents): Ditto.
417 * vms.h (_bfd_save_vms_section): Ditto.
418
419 2003-11-04 Alan Modra <amodra@bigpond.net.au>
420
421 * elf64-ppc.c (ppc_size_one_stub): Size relbrlt. Accept info arg
422 rather than htab.
423 (ppc64_elf_size_stubs): Adjust ppc_size_one_stub traversal. Zero
424 relbrlt size.
425 (ppc64_elf_build_stubs): Allocate space for relbrlt.
426
427 2003-11-04 Alan Modra <amodra@bigpond.net.au>
428
429 * bfd-in.h (_bfd_elf_tls_setup): Declare.
430 * bfd-in2.h: Regenerate.
431 * elf-bfd.h (struct elf_link_tls_segment): Delete.
432 (struct elf_link_hash_table): Add tls_sec and tls_size.
433 * elf.c (_bfd_elf_link_hash_table_init): Init tls_sec and tls_size.
434 * elflink.c (_bfd_elf_tls_setup): New function.
435 * elflink.h (struct elf_final_link_info): Remove first_tls_sec.
436 (elf_bfd_final_link): Don't set first_tls_sec here. Update code
437 saving tls segment info, round segment size up.
438 (elf_link_output_extsym): Adjust code using tls segment info.
439 (elf_link_input_bfd): Likewise.
440 * elf32-i386.c (dtpoff_base, tpoff): Likewise.
441 * elf32-s390.c (dtpoff_base, tpoff): Likewise.
442 * elf32-sh.c (dtpoff_base, tpoff): Likewise.
443 * elf32-sparc.c (dtpoff_base, tpoff): Likewise.
444 * elf64-s390.c (dtpoff_base, tpoff): Likewise.
445 * elf64-x86-64.c (dtpoff_base, tpoff): Likewise.
446 * elfxx-ia64.c (elfNN_ia64_tprel_base): Likewise.
447 (elfNN_ia64_dtprel_base): Likewise.
448 * elf64-alpha.c (alpha_get_dtprel_base): Likewise.
449 (alpha_get_tprel_base): Likewise.
450 (struct alpha_relax_info): Remove tls_segment.
451 (elf64_alpha_relax_got_load): Adjust invocation of
452 alpha_get_dtprel_base and alpha_get_tprel_base.
453 (elf64_alpha_relax_tls_get_addr): Likewise.
454 (elf64_alpha_relax_section): Likewise.
455 (elf64_alpha_relocate_section): Likewise.
456 (elf64_alpha_relax_find_tls_segment): Delete.
457 * elf32-ppc.c (struct ppc_elf_link_hash_table): Remove tls_sec.
458 (ppc_elf_tls_setup): Call _bfd_elf_tls_setup. Return section.
459 (ppc_elf_relocate_section): Adjust to use elf.tls_sec.
460 * elf32-ppc.h (ppc_elf_tls_setup): Update.
461 * elf64-ppc.c (struct ppc_link_hash_table): Remove tls_sec.
462 (ppc64_elf_tls_setup): Call _bfd_elf_tls_setup. Return section.
463 (ppc64_elf_tls_optimize): Adjust to use elf.tls_sec.
464 (ppc64_elf_relocate_section): Likewise.
465 * elf64-ppc.h (ppc64_elf_tls_setup): Update.
466
467 2003-11-03 Daniel Jacobowitz <drow@mvista.com>
468
469 * elf-bfd.h (struct elf_backend_data): Remove plt_header_size.
470 * elf-m10300.c (elf_backend_plt_header_size): Don't define.
471 * elf32-arm.h (elf_backend_plt_header_size): Don't define.
472 * elf32-cris.c (elf_backend_plt_header_size): Don't define.
473 * elf32-i386.c (elf_backend_plt_header_size): Don't define.
474 * elf32-mips.c (elf_backend_plt_header_size): Don't define.
475 * elf32-ppc.c (elf_backend_plt_header_size): Don't define.
476 * elf32-s390.c (elf_backend_plt_header_size): Don't define.
477 * elf32-sh.c (elf_backend_plt_header_size): Don't define.
478 * elf32-sparc.c (elf_backend_plt_header_size): Don't define.
479 * elf64-alpha.c (elf_backend_plt_header_size): Don't define.
480 * elf64-hppa.c (elf_backend_plt_header_size): Don't define.
481 * elf64-mips.c (elf_backend_plt_header_size): Don't define.
482 * elf64-ppc.c (elf_backend_plt_header_size): Don't define.
483 * elf64-s390.c (elf_backend_plt_header_size): Don't define.
484 * elf64-sh64.c (elf_backend_plt_header_size): Don't define.
485 * elf64-sparc.c (elf_backend_plt_header_size): Don't define.
486 * elf64-x86-64.c (elf_backend_plt_header_size): Don't define.
487 * elfn32-mips.c (elf_backend_plt_header_size): Don't define.
488 * elfxx-ia64.c (elf_backend_plt_header_size): Don't define.
489 * elfxx-target.h (elf_backend_plt_header_size): Don't define
490 or include in target initializer.
491
492 2003-11-03 Andrew Cagney <cagney@redhat.com>
493
494 * section.c (bfd_set_section_contents): Make the "location" buffer
495 constant.
496 * bfd-in2.h: Re-generate.
497
498 2003-10-30 Andrew Cagney <cagney@redhat.com>
499
500 * syms.c: Replace "struct symbol_cache_entry" with "struct
501 bfd_symbol".
502 * vms.h, targets.c, section.c, reloc.c, peicode.h: Ditto.
503 * mipsbsd.c, elf.c, linker.c, elf-bfd.h, ecoff.c: Ditto.
504 * cpu-z8k.c, cpu-ns32k.c, cpu-h8500.c, bfd.c, bfd-in.h: Ditto.
505 * bfd-in2.h: Re-generate.
506
507 2003-10-30 Jakub Jelinek <jakub@redhat.com>
508
509 * elfxx-ia64.c: Include objalloc.h, hashtab.h.
510 (struct elfNN_ia64_local_hash_entry): Remove root. Add id and r_sym
511 fields.
512 (struct elfNN_ia64_local_hash_table): Remove.
513 (struct elfNN_ia64_link_hash_table): Change loc_hash_table's type
514 to htab_t. Add loc_hash_memory field.
515 (elfNN_ia64_local_hash_table_init, elfNN_ia64_new_loc_hash_entry):
516 Removed.
517 (elfNN_ia64_local_htab_hash, elfNN_ia64_local_htab_eq): New
518 functions.
519 (elfNN_ia64_hash_table_create): Use hashtab.h hashtable for
520 loc_hash_table. Initialize loc_hash_memory.
521 (elfNN_ia64_hash_table_free): New function.
522 (elfNN_ia64_local_hash_lookup): Remove.
523 (elfNN_ia64_local_dyn_sym_thunk): Change into htab_traverse
524 callback.
525 (elfNN_ia64_dyn_sym_traverse): Use htab_traverse.
526 (get_local_sym_hash): Use hashtab.h hashtable for loc_hash_table.
527 (bfd_elfNN_bfd_link_hash_table_free): Define.
528
529 2003-10-30 Alan Modra <amodra@bigpond.net.au>
530
531 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Modify versioned
532 symbol string in place.
533
534 2003-10-30 Jim Blandy <jimb@redhat.com>
535
536 * cpu-rs6000.c (rs6000_compatible): Check the correct arch_info
537 object's mach field: all PowerPC machines are supersets of the
538 original rs6000, but not later rs6000 machines.
539
540 2003-10-30 Alan Modra <amodra@bigpond.net.au>
541
542 * dwarf2.c (struct attribute): Delete "unsnd", "snd" and "addr".
543 Add "val" and "sval" fields.
544 (DW_STRING, DW_UNSND, DW_BLOCK, DW_SND, DW_ADDR): Delete.
545 (read_attribute_value): Expand and adjust DW_* occurrences.
546 (scan_unit_for_functions, parse_comp_unit): Likewise.
547
548 2003-10-30 Phil Edwards <phil@codesourcery.com>
549
550 * config.bfd (arm-*-vxworks): Remove separate stanza; merge with
551 other common ELF triples.
552 (i[3-7]86-*-vxworks): Change to ELF format.
553 (mips*-*-windiss): New triple, add to common MIPS/ELF stanza.
554 (sh-*-vxworks): New stanza.
555
556 2003-10-30 Lars Knoll <lars@trolltech.com>
557 Michael Matz <matz@suse.de>
558 Jakub Jelinek <jakub@redhat.com>
559 Alan Modra <amodra@bigpond.net.au>
560
561 * merge.c (struct sec_merge_sec_info): Update comment.
562 (struct sec_merge_hash_entry): Remove entsize.
563 (sec_merge_hash_lookup): Only adjust alignment when creating.
564 (sec_merge_emit): Remove register keyword.
565 (cmplengthentry, last4_eq, last_eq): Delete.
566 (strrevcmp, strrevcmp_align, is_suffix): New.
567 (merge_strings): Use them to implement fast suffix merging.
568 * elf-strtab.c (struct elf_strtab_hash_entry): Update comments.
569 Make "len" signed.
570 (_bfd_elf_strtab_add): Lose on >2G strings.
571 (_bfd_elf_strtab_emit): Don't emit strings with len < 0.
572 (cmplengthentry, last4_eq): Delete.
573 (strrevcmp, is_suffix): New.
574 (_bfd_elf_strtab_finalize): Rework to implement fast suffix merging.
575
576 2003-10-29 Daniel Jacobowitz <drow@mvista.com>
577
578 * elf32-arm.h (elf32_arm_final_link_relocate): Move check for
579 SEC_ALLOC.
580
581 2003-10-29 Philip Blundell <philb@gnu.org>
582
583 * elf32-arm.h (elf32_arm_plt0_entry, elf32_arm_plt_entry): New
584 code sequence.
585 (PLT_HEADER_SIZE): New.
586 (struct elf32_arm_pcrel_relocs_copied): Rename to ...
587 (struct elf32_arm_relocs_copied): ... this. Count both
588 pcrel and non-pcrel relocs. All uses updated.
589 (struct elf32_arm_link_hash_table): Add pointers to dynamic linker
590 sections and symbol/section mapping cache.
591 (create_got_section): New.
592 (elf32_arm_create_dynamic_sections): New.
593 (elf_backend_create_dynamic_sections): Use it.
594 (elf32_arm_final_link_relocate): Support garbage collection of relocs.
595 (elf32_arm_check_relocs): Likewise.
596 (elf32_arm_adjust_dynamic_symbol): Likewise.
597 (elf32_arm_copy_indirect_symbol): New.
598 (elf32_arm_link_hash_table_create): Initialise new fields.
599 (elf32_arm_gc_sweep_hook): Implement.
600 (elf32_arm_discard_copies): Delete.
601 (elf32_arm_finish_dynamic_symbol): Use new PLT code.
602 (elf32_arm_finish_dynamic_sections): Likewise.
603 (elf_backend_can_refcount): Define.
604 (elf_backend_copy_indirect_symbol): Likewise.
605 (elf_backend_plt_header_size): Set to PLT_HEADER_SIZE.
606
607 2003-10-29 Alan Modra <amodra@bigpond.net.au>
608
609 * elf64-ppc.c (elf_backend_grok_prstatus): Define.
610 (elf_backend_grok_psinfo): Define.
611 (ppc64_elf_grok_prstatus, ppc64_elf_grok_psinfo): New functions.
612
613 * elf.c (_bfd_elfcore_make_pseudosection): Allow multiple
614 sections with the same name.
615 (elfcore_grok_lwpstatus): Likewise.
616 (elfcore_grok_win32pstatus): Likewise.
617 (elfcore_grok_note): Likewise.
618 (elfcore_grok_nto_status): Likewise.
619 (elfcore_grok_nto_gregs): Likewise.
620
621 2003-10-27 Daniel Jacobowitz <drow@mvista.com>
622
623 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Never skip dynamic
624 objects.
625
626 2003-10-14 Richard Sandiford <rsandifo@redhat.com>
627
628 * elfxx-mips.c (mips_elf_create_got_section): Initialize global_gotno.
629
630 2003-10-24 H.J. Lu <hongjiu.lu@intel.com>
631
632 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Look up
633 hash table for real symbols.
634
635 2003-10-23 Michael Snyder <msnyder@redhat.com>
636
637 * section.c (asection): Fix typo in comment.
638
639 2003-10-23 Alan Modra <amodra@bigpond.net.au>
640
641 * elf64-ppc.c (get_tls_mask): Add toc_symndx param, save toc
642 reloc symbol index to it. Don't allow gd syms in shared libs
643 to be optimized.
644 (ppc64_elf_tls_optimize): Adjust get_tls_mask call.
645 (ppc64_elf_size_stubs): Likewise.
646 (ppc64_elf_relocate_section): Check that tls relocs are only used
647 with tls syms, and similarly for non-tls. Correct symbol used
648 when optimizing toc tls code.
649
650 2003-10-22 Nick Clifton <nickc@redhat.com>
651
652 * peicode.h (coff_swap_scnhdr_in): Only remove padding when
653 processing an executable.
654
655 2003-10-22 Jakub Jelinek <jakub@redhat.com>
656
657 * elflink.c (_bfd_elf_export_symbol): Adjust for globals and locals
658 field changes.
659 (_bfd_elf_link_assign_sym_version): Likewise.
660 * elflink.h (size_dynamic_sections): Likewise.
661
662 2003-10-21 Alexandre Oliva <aoliva@redhat.com>,
663 Michael Snyder <msnyder@redhat.com>
664
665 * archures.c (bfd_mach_sh4a, bfd_mach_sh4al_dsp, bfd_mach_sh4_nofpu,
666 bfd_mach_sh4a_nofpu): New machine types.
667 * bfd-in2.h: Rebuilt.
668 * cpu-sh.c (compatible): Remove unused function.
669 (SH4A_NEXT, SH4AL_DSP_NEXT, SH4_NOFPU_NEXT, SH4A_NOFPU_NEXT): New.
670 (arch_info_struct): Add sh4a, sh4al_dsp, sh4-nofpu and sh4a-nofpu.
671 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle them.
672
673 2003-10-21 Wouter van Heyst <wouter@vidicode.nl>
674
675 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Correct text
676 describing mismatched formats involving the Maverick FP type.
677
678 2003-10-21 Anil Paranjpe <anilp1@KPITCummins.com>
679
680 * binary.c (binary_object_p): Pass machine flag along with
681 architecture.
682
683 2003-10-21 Thorsten Brehm <brehm@gmx.net>
684
685 * archures.c (bfd_default_scan): Add support for mcf528x.
686 * ieee.c (ieee_write_processor): Likewise.
687
688 2003-10-21 Peter Barada <pbarada@mail.wm.sps.mot.com>
689 Bernardo Innocenti <bernie@develer.com>
690
691 * archures.c: Add MCF528x (MCFv4) support.
692 * bfd/cpu-m68k.c (arch_info_struct): Likewise.
693 * bfd-in2.h: Regenerate.
694
695 2003-10-20 Andrew Cagney <cagney@redhat.com>
696
697 * targets.c: Replace "struct sec" with "struct bfd_section"
698 * syms.c, sparclynx.c, section.c, opncls.c: Ditto.
699 * libcoff-in.h, libbfd-in.h, elfxx-target.h: Ditto.
700 * elf.c, coffgen.c, bfd.c, bfd-in.h, aoutf1.h: Ditto.
701 * aout-tic30.c, aout-target.h:
702 * bfd-in2.h, libcoff.h, libbfd.h: Regenerate.
703
704 2003-10-18 Hans-Peter Nilsson <hp@bitrange.com>
705
706 Support linker relaxation of new R_MMIX_PUSHJ_STUBBABLE relocs.
707 * elf64-mmix.c (MAX_PUSHJ_STUB_SIZE): New macro.
708 (struct _mmix_elf_section_data): New member pjs.
709 (mmix_set_relaxable_size, mmix_elf_get_section_contents): New
710 functions.
711 (elf_mmix_howto_table): New entry for R_MMIX_PUSHJ_STUBBABLE.
712 (mmix_reloc_map): Ditto.
713 (mmix_elf_relocate_section): Handle R_MMIX_PUSHJ_STUBBABLE.
714 (mmix_final_link_relocate, mmix_elf_check_common_relocs): Ditto.
715 (mmix_elf_perform_relocation): Ditto. Don't mark parameter addr
716 unused.
717 (mmix_elf_check_relocs): Move early return to after
718 mmix_elf_check_common_relocs call.
719 (mmix_elf_symbol_processing): Fix cut-and-pasto in head comment.
720 (_bfd_mmix_before_linker_allocation): Rename from
721 _bfd_mmix_prepare_linker_allocated_gregs. All referers changed.
722 Arrange to set the initial relaxable size of sections.
723 (_bfd_mmix_after_linker_allocation): Rename from
724 _bfd_mmix_finalize_linker_allocated_gregs.
725 (mmix_elf_relax_section): Relax a R_MMIX_PUSHJ_STUBBABLE reloc.
726 (bfd_elf64_get_section_contents): Define.
727 * reloc.c: Add ENUMX for BFD_RELOC_MMIX_PUSHJ_STUBBABLE.
728 * libbfd.h, bfd-in2.h: Regenerate.
729
730 * reloc.c (bfd_generic_relax_section): Default-set
731 section->_cooked_size here.
732 (bfd_generic_get_relocated_section_contents): Don't set it here.
733 Explain why.
734
735 2003-10-17 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
736
737 * elf32-hppa.c (elf32_hppa_relocate_section): Skip relocation if
738 output section has been discarded.
739
740 2003-10-17 Shrinivas Atre <shrinivasa@KPITCummins.com>
741
742 * coff-h8300.c (funcvec_hash_newfunc): Handle normal mode.
743 (h8300_reloc16_extra_cases): Likewise.
744 (h8300_bfd_link_add_symbols): Likewise.
745
746 2003-10-17 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
747
748 * cpu-h8300.c (h8300sxn_info_struct): Correct address size.
749 (h8300sn_info_struct): Likewise.
750 (h8300hn_info_struct): Likewise.
751
752 2003-10-16 Pavel Roskin <proski@gnu.org>
753
754 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Don't calculate image size
755 for sections which lack size info.
756
757 2003-10-17 Danny Smith <dannysmith@users.sourceforge.net>
758
759 * configure.host: Add __USE_MINGW_FSEEK to HDEFINES for
760 mingw32.
761
762 2003-10-16 H.J. Lu <hongjiu.lu@intel.com>
763
764 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Also warn
765 undefined patterns with '*'.
766
767 2003-10-16 H.J. Lu <hongjiu.lu@intel.com>
768
769 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't
770 use the last CIE from a different section.
771 (_bfd_elf_write_section_eh_frame): Don't pad beyond the raw
772 size of the output section.
773
774 2003-10-07 Roland McGrath <roland@redhat.com>
775
776 * elf.c (_bfd_elf_make_section_from_phdr): Set alignment_power of
777 new section from p_align header field.
778
779 2003-10-16 H.J. Lu <hongjiu.lu@intel.com>
780
781 * elf32-xtensa.c (xtensa_read_table_entries): The external size
782 of entry is 8 bytes.
783
784 2003-10-15 Andrew Cagney <cagney@redhat.com>
785
786 * targets.c (BFD_JUMP_TABLE_SYMBOLS): Replace NAME##_get_symtab
787 with NAME##_canonicalize_symtab.
788 * libcoff-in.h (coff_canonicalize_symtab): Update.
789 * xsym.h (bfd_sym_canonicalize_symtab): Update.
790 * elf-bfd.h (_bfd_elf_canonicalize_symtab): Update.
791 * coffgen.c (coff_canonicalize_symtab): Update.
792 * libbfd-in.h (_bfd_nosymbols_canonicalize_symtab): Update.
793 * libnlm.h (nlmNAME(canonicalize_symtab)): Update.
794 * ieee.c (ieee_vec): Update comment.
795 * libecoff.h (_bfd_ecoff_canonicalize_symtab): Update.
796 * mmo.c (mmo_canonicalize_symtab): Update.
797 * nlm-target.h (nlm_canonicalize_symtab): Update.
798 * nlmcode.h (nlm_canonicalize_symtab): Update.
799 * i386msdos.c (msdos_canonicalize_symtab): Update.
800 * hp300hpux.c (MY (canonicalize_symtab)): Update.
801 * oasys.c (oasys_canonicalize_symtab): Update.
802 * som.c (som_canonicalize_symtab): Update.
803 * pef.c (bfd_pef_canonicalize_symtab): Update.
804 * nlmcode.h (nlm_canonicalize_symtab): Update.
805 * xsym.c (bfd_sym_canonicalize_symtab): Update.
806 * vms.c (vms_canonicalize_symtab): Update.
807 * versados.c (versados_canonicalize_symtab): Update.
808 * mach-o.c (bfd_mach_o_canonicalize_symtab): Update.
809 * ieee.c (ieee_canonicalize_symtab): Update.
810 * pdp11.c (NAME(aout,canonicalize_symtab)): Update.
811 * reloc.c: Update comment.
812 * libaout.h (NAME(aout,canonicalize_symtab)): Update.
813 * coff64-rs6000.c (aix5coff64_vec): Update.
814 * coff64-rs6000.c (bfd_xcoff_aix5_backend_data): Update.
815 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update.
816 * aoutx.h (NAME(aout,canonicalize_symtab)): Update.
817 * elfxx-target.h (bfd_elfNN_canonicalize_symtab): Update.
818 * hp300hpux.c (MY_canonicalize_symtab): Update.
819 * ecoff.c (_bfd_ecoff_canonicalize_symtab): Update.
820 * aout-tic30.c (MY_canonicalize_symtab): Update.
821 * aout-target.h (MY_canonicalize_symtab): Update.
822 * ppcboot.c (ppcboot_canonicalize_symtab): Update.
823 * elf.c (_bfd_elf_canonicalize_symtab): Update.
824 * elfcode.h (elf_canonicalize_symtab): Update.
825 * ihex.c (ihex_canonicalize_symtab): Update.
826 * tekhex.c (tekhex_canonicalize_symtab): Update.
827 * binary.c (binary_canonicalize_symtab): Update.
828 * srec.c (srec_canonicalize_symtab): Update.
829
830 2003-10-15 Kazu Hirata <kazu@cs.umass.edu>
831
832 * elf32-h8300.c (elf_reloc_map): Fix a comment typo.
833
834 2003-10-15 Kaz Kojima <kkojima@rr.iij4u.or.jp>
835
836 * elf32-sh.c (sh_elf_relocate_section): Handle R_SH_IMM_*_PCREL
837 relocations.
838 (sh_elf_check_relocs): Likewise.
839
840 * elf32-sh64.c (elf_backend_merge_symbol_attribute): Define.
841 (sh64_elf_merge_symbol_attribute): New.
842 * elf64-sh64.c (elf_backend_merge_symbol_attribute): Define.
843 (sh64_elf64_merge_symbol_attribute): New.
844
845 2003-10-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
846
847 * elf-bfd.h (struct elf_backend_data): New function pointer member
848 elf_backend_merge_symbol_attribute.
849 * elflink.h (elf_link_add_object_symbols): Adjust call to
850 elf_backend_merge_symbol_attribute if the backend defined it.
851 * elfxx-target.h (elf_backend_merge_symbol_attribute): New macro.
852 (elfNN_bed): Add that to the initializer.
853
854 2003-10-14 Bob Wilson <bob.wilson@acm.org>
855
856 * elf32-xtensa.c (get_is_linkonce_section): Delete.
857 (xtensa_is_property_section, xtensa_is_littable_section): Use
858 XTENSA_INSN_SEC_NAME and XTENSA_LIT_SEC_NAME macros. Do not recognize
859 linkonce sections containing ".xt.insn" and ".xt.lit" substrings.
860 (xtensa_get_property_section_name): Check section name instead of
861 calling get_is_linkonce_section. Remove unused bfd parameter. Use
862 XTENSA_INSN_SEC_NAME and XTENSA_LIT_SEC_NAME macros. Never generate
863 linkonce section names by appending ".xt.insn" or ".xt.lit".
864 (xtensa_read_table_entries): Remove bfd argument in call to
865 xtensa_get_property_section_name. Free section name when done.
866 (elf_xtensa_combine_prop_entries): Free leaking table.
867
868 2003-10-13 Richard Sandiford <rsandifo@redht.com>
869
870 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Don't add
871 DT_MIPS_LIBLIST or DT_MIPS_CONFLICT entries.
872 (_bfd_mips_elf_finish_dynamic_symbol): Don't handle them. Don't
873 handle DT_MIPS_MSYM. Set DT_RELSZ based on the number of relocations
874 that were needed.
875 (_bfd_mips_elf_modify_segment_map): Fix placement of PT_MIPS_OPTIONS.
876 (_bfd_mips_elf_merge_private_bfd_data): Ignore EF_MIPS_UCODE.
877
878 2003-10-13 H.J. Lu <hongjiu.lu@intel.com>
879
880 * bfd-in.h (bfd_elf32_ia64_after_parse): New prototype.
881 (bfd_elf64_ia64_after_parse): Likewise.
882 * bfd-in2.h: Regenerated.
883
884 * elfxx-ia64.c (oor_ip): New.
885 (oor_branch_size): Likewise.
886 (bfd_elfNN_ia64_after_parse): Likewise.
887 (elfNN_ia64_relax_section): Use oor_ip if oor_branch_size
888 equals sizeof (oor_ip).
889
890 2003-10-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
891
892 * elf64-sh64.c (sh_elf64_relocate_section): Tidy up for the
893 renumbering of some relocation numbers.
894
895 2003-10-11 Alan Modra <amodra@bigpond.net.au>
896
897 * coff-sh.c: Move definition of MAP and guard more code with
898 COFF_IMAGE_WITH_PE.
899
900 * section.c (bfd_get_section_size_before_reloc): Ignore reloc_done.
901 * bfd-in2.h: Regenerate.
902
903 2003-10-10 H.J. Lu <hongjiu.lu@intel.com>
904
905 * Makefile.am: Run "make dep-am".
906 * Makefile.in: Regenerate.
907 * doc/Makefile.in: Likewise.
908
909 2003-10-09 H.J. Lu <hongjiu.lu@intel.com>
910
911 * cofflink.c: Include "safe-ctype.h".
912 (coff_link_add_symbols): Use ISDIGIT instead of isdigit.
913
914 2003-10-08 Dave Brolley <brolley@redhat.com>
915 On behalf of Michael Snyder <msnyder@redhat.com>
916
917 * archures.c: Add FRV fr550 machine.
918 * cpu-frv.c: Ditto.
919 * elf32-frv.c: Ditto.
920 * bfd-in2.h: Regenerate.
921
922 2003-10-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
923
924 * elfxx-mips.c (STUB_MOVE,STUB_LI16): Fix stub code
925 for non-SGI N64 ABI. Improve code consitency.
926
927 2003-10-07 Alexandre Oliva <aoliva@redhat.com>
928
929 * elf32-frv.c (elf32_frv_howto_table): Set R_FRV_LABEL16's
930 rightshift to 2.
931
932 2003-10-07 Nathan Sidwell <nathan@codesourcery.com>
933
934 * libbfd-in.h (_bfd_link_section_stabs): Add string offset
935 parameter.
936 * cofflink.c (coff_link_add_symbols): Deal with split stab
937 sections.
938 * elflink.h (elf_link_add_object_symbols): Deal with split stab
939 sections.
940 * stabs.c (_bfd_link_section_stabs): Add string offset parameter.
941 * libbfd.h: Regenerated.
942
943 * coffcode.h (coff_set_alignment_hook): With PE_COFF reloc
944 overflow, set reloc start position to after the count
945 reloc. Subtract one from num relocs. Give error on 0xffff relocs
946 and no overflow.
947 * cofflink.c (_bfd_coff_final_link): Deal with PE_COFF reloc
948 overflow.
949 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Do overflow if >=
950 0xffff.
951
952 2003-10-06 H.J. Lu <hongjiu.lu@intel.com>
953
954 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Pad the
955 last CIE/FDE if needed.
956
957 2003-10-06 Nick Clifton <nickc@redhat.com>
958
959 * targets.c (_bfd_target_vector): Include bfd_elf64_sparc_vec if
960 BFD64 is enabled.
961
962 2003-10-06 Matt Thomas <matt@3am-software.com>
963
964 * config.bfd: Move the hppa*-*-netbsd* case to the hppa*-*-linux* case.
965
966 2003-10-06 Robert Millan <robertmh@gnu.org>
967
968 * configure.in: Match GNU/KNetBSD with new knetbsd*-gnu triplet.
969 * config.bfd: Likewise.
970 * configure: Regenerate.
971
972 2003-10-04 Christian Groessler <chris@groessler.org>
973
974 * coff-z8k.c (extra_case): Fix displacement length check for R_JR
975 and R_CALLR.
976
977 2003-10-04 Stephane Carrez <stcarrez@nerim.fr>
978
979 * elf32-m68hc1x.c: Update to ISO C90; replace PTR with void*.
980 * elf32-m68hc11.c: Likewise.
981 * elf32-m68hc12.c: Likewise.
982 * elf32-m68hc1x.h: Likewise.
983
984 2003-10-04 Stephane Carrez <stcarrez@nerim.fr>
985
986 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Fix merge
987 of flags between HC12 and HCS12.
988
989 2003-10-04 Bryce McKinlay <bryce@mckinlay.net.nz>
990
991 * merge.c (_bfd_merge_sections): Set SEC_EXCLUDE flag on sections
992 which become empty after merging.
993
994 2003-09-30 Jakub Jelinek <jakub@redhat.com>
995
996 * elfxx-ia64.c (ia64_howto_table): Fix size of R_IA64_TPREL64[LM]SB,
997 R_IA64_DTPREL{32,64}[LM]SB and R_IA64_DTPMOD64[LM]SB.
998
999 2003-09-30 Chris Demetriou <cgd@broadcom.com>
1000
1001 * archures.c (bfd_mach_mipsisa64r2): New define.
1002 * bfd-in2.h: Regenerate.
1003 * aoutx.h (NAME(aout,machine_type)): Handle bfd_mach_mipsisa64r2.
1004 * cpu-mips.c (I_mipsisa64r2): New enum value.
1005 (arch_info_struct): Add entry for I_mipsisa64r2.
1006 * elfxx-mips.c (_bfd_elf_mips_mach)
1007 (_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_64R2.
1008 (mips_set_isa_flags): Add bfd_mach_mipsisa64r2 case.
1009 (mips_mach_extensions): Add entry for bfd_mach_mipsisa64r2.
1010
1011 2003-09-29 H.J. Lu <hongjiu.lu@intel.com>
1012
1013 * elfxx-ia64.c (elfNN_hpux_backend_symbol_processing): New.
1014 Handle SHN_IA_64_ANSI_COMMON.
1015 (elf_backend_section_from_bfd_section): Defined.
1016
1017 2003-09-26 H.J. Lu <hongjiu.lu@intel.com>
1018
1019 * elflink.c (elf_link_read_relocs_from_section): Add an argument
1020 of a pointer to section. Check bad symbol index.
1021 (_bfd_elf_link_read_relocs): Modify calls to
1022 elf_link_read_relocs_from_section.
1023
1024 2003-09-23 DJ Delorie <dj@redhat.com>
1025
1026 * elf32-sh.c (sh_elf_howto_table): R_SH_SWITCH8,
1027 R_SH_GNU_VTINHERIT, R_SH_GNU_VTENTRY,
1028 R_SH_LOOP_START,R_SH_LOOP_END moved to "reserved" spaces,
1029 R_SH_DIR16, R_SH_DIR8, R_SH_DIR8UL, R_SH_DIR8UW, R_SH_DIR8U,
1030 R_SH_DIR8SW, R_SH_DIR8S, R_SH_DIR4UL, R_SH_DIR4UW, R_SH_DIR4U,
1031 R_SH_PSHA, R_SH_PSHL added.
1032 (sh_reloc_map): Add R_SH_DIR16 and R_SH_DIR8.
1033 (sh_elf_relocate_section): Support new relocs.
1034
1035 2003-09-23 Bob Wilson <bob.wilson@acm.org>
1036
1037 * elf32-xtensa.c (elf_xtensa_relocate_section): Fix typo that clobbered
1038 dynamic relocation offsets.
1039
1040 2003-09-23 Alan Modra <amodra@bigpond.net.au>
1041
1042 * simple.c (bfd_simple_get_relocated_section_contents): Free the
1043 hash table using _bfd_generic_link_hash_table_free.
1044
1045 2003-09-23 Alan Modra <amodra@bigpond.net.au>
1046
1047 * elf-bfd.h (struct bfd_elf_special_section): Remove "suffix". Change
1048 type of prefix_length and suffix_length to int. Rename "attributes"
1049 to "attr". Comment.
1050 (_bfd_elf_get_sec_type_attr): Update prototype.
1051 * elf.c (get_special_section): Rewrite.
1052 (_bfd_elf_get_sec_type_attr): Return struct rather than passing in
1053 attr and type pointers.
1054 (_bfd_elf_new_section_hook): Adjust for above.
1055 (special_sections): Merge suffix with prefix. Set
1056 prefix_length for all entries. Set suffix_length appropriately.
1057 * elf32-m32r.c (m32r_elf_special_sections): Likewise.
1058 * elf32-m68hc11.c (elf32_m68hc11_special_sections): Likewise.
1059 * elf32-m68hc12.c (elf32_m68hc12_special_sections): Likewise.
1060 * elf32-mcore.c (mcore_elf_special_sections): Likewise.
1061 * elf32-sh64.c (sh64_elf_special_sections): Likewise.
1062 * elf32-v850.c (v850_elf_special_sections): Likewise.
1063 * elf32-xtensa.c (elf_xtensa_special_sections): Likewise.
1064 * elf64-alpha.c (elf64_alpha_special_sections): Likewise.
1065 * elf64-hppa.c (elf64_hppa_special_sections): Likewise.
1066 * elf64-ppc.c (ppc64_elf_special_sections): Likewise.
1067 * elf64-sh64.c (sh64_elf64_special_sections): Likewise.
1068 * elfxx-ia64.c (elfNN_ia64_special_sections): Likewise.
1069 * elfxx-mips.c (_bfd_mips_elf_special_sections): Likewise.
1070 * elf32-ppc.c (ppc_elf_special_sections): Likewise. Fix .plt flags.
1071
1072 2003-09-21 Daniel Jacobowitz <drow@mvista.com>
1073
1074 * elf64-alpha.c (elf64_alpha_create_got_section): Initialize
1075 ->got if the section already exists.
1076
1077 2003-09-19 Nathan Sidwell <nathan@codesourcery.com>
1078
1079 * dwarf2.c (decode_line_info): Cope with an initially empty
1080 filename table.
1081
1082 2003-09-18 H.J. Lu <hongjiu.lu@intel.com>
1083
1084 * acinclude.m4: Include ../config/accross.m4.
1085 * aclocal.m4: Regenerated.
1086
1087 * configure.host (HOST_64BIT_TYPE): Remove if it is set to long
1088 or long long.
1089 (HOST_U_64BIT_TYPE): Remove if it is set to unsigned long long.
1090 (host64): Remove if HOST_64BIT_TYPE is set to long.
1091
1092 * configure.in (HOST_64BIT_TYPE): Set according to the size of
1093 long and long long.
1094 (HOST_U_64BIT_TYPE): Likewise.
1095 (host64): Likewise.
1096 * configure: Regenerated.
1097
1098 2003-09-19 Alan Modra <amodra@bigpond.net.au>
1099
1100 * elf.c (elfcore_write_note): Don't use sizeof(Elf_External_note)
1101 since some ABIs round up the size of the struct.
1102
1103 2003-09-18 H.J. Lu <hongjiu.lu@intel.com>
1104
1105 * elflink.c (_bfd_elf_merge_symbol): Allow type change if
1106 the old symbol is undefined and the new symbol is defined.
1107
1108 2003-09-18 Andreas Schwab <schwab@suse.de>
1109
1110 * simple.c (bfd_simple_get_relocated_section_contents): Use
1111 _bfd_generic_link_hash_table_create instead of
1112 bfd_link_hash_table_create.
1113
1114 2003-09-10 H.J. Lu <hongjiu.lu@intel.com>
1115
1116 * elfxx-ia64.c (elfNN_ia64_special_sections): Mark all sections
1117 started with ".sbss" or "".sdata" as SHF_IA_64_SHORT.
1118
1119 2003-09-10 John David Anglin <dave.anglin@nrc-cnrc.nrc.ca>
1120 Randolph Chung <randolph@tausq.org>
1121
1122 * elf32-hppa.c (struct elf32_hppa_link_hash_entry,
1123 hppa_link_hash_newfunc, hppa_build_one_stub,
1124 elf32_hppa_adjust_dynamic_symbol, mark_PIC_calls, allocate_plt_static,
1125 allocate_dynrelocs, elf32_hppa_size_dynamic_sections,
1126 elf32_hppa_finish_dynamic_symbol): Remove pic_call field and all code
1127 for generating import stubs for calls to statically linked PIC
1128 functions.
1129 (hppa_type_of_stub): Don't generate an import stub for calls to
1130 statically linked pic functions. Generate import stubs for calls
1131 in a shared object, to functions not in a regular file, and to
1132 defined weak functions. Add new argument INFO.
1133 (hppa_build_one_stub): Don't undef ADDIL_DP.
1134 (elf32_hppa_check_relocs): Don't set SEC_HAS_GOT_REF flag.
1135 (elf32_hppa_size_stubs): Pass info to hppa_type_of_stub.
1136 (final_link_relocate): Change all DLTIND relocs to DPREL relocs in a
1137 non-shared link. Convert instructions that use the the linkage table
1138 pointer, or a facsimile thereof, to use the global data pointer when
1139 the reloc has been changed.
1140
1141 2003-09-08 Joel Brobecker <brobecker@gnat.com>
1142
1143 * archures.c: Add new machine names for hppa.
1144 * bfd-in2.h: Regenerate.
1145 * cpu-hppa.c: Use the new machine names.
1146
1147 2003-09-06 Stephane Carrez <stcarrez@nerim.fr>
1148
1149 * elf32-m68hc1x.h (struct m68hc11_elf_link_hash_table): Remove
1150 all_local_syms member.
1151 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Use bfd_elf_get_elf_syms
1152 to get the local symbols.
1153
1154 2003-09-06 Stephane Carrez <stcarrez@nerim.fr>
1155
1156 * elf32-m68hc12.c (elf32_m68hc12_special_sections): New for hc11.
1157 (elf_backend_special_sections): Define.a
1158
1159 PR savannah/4950:
1160 * elf32-m68hc11.c (elf32_m68hc11_special_sections): The .vectors
1161 section is read-only.
1162
1163 2003-09-04 Nick Clifton <nickc@redhat.com>
1164
1165 * archures.c (bfd_mach_v850e1): Define.
1166 * bfd-in2.h: Regenerate.
1167 * cpu-v850.h (scan): Accept bfd_mach_v850e1.
1168 (arch_info_struct): Include an entry for bfd_mach_v850e1.
1169 * elf32-v850.c (v850_elf_object_p): Accept E_V850E1_ARCH flag.
1170 (v850_elf_final_write_processing): Accept bfd_mach_v850e1.
1171 (v850_elf_print_private_bfd_data): Interpret E_V850E1_ARCH flag.
1172 (v850_elf_merge_private_bfd_data): Allow v850e1 binaries to be
1173 linked with v850e binaries. Mark the output as v850e.
1174
1175 2003-09-03 Nick Clifton <nickc@redhat.com>
1176
1177 * cofflink.c (_bfd_coff_link_input_bfd): Do not skip section
1178 symbols that are used in relocs.
1179
1180 2003-08-30 Robert Millan <robertmh@gnu.org>
1181
1182 * configure.in: Match GNU/KFreeBSD with new kfreebsd*-gnu triplet.
1183 * config.bfd: Likewise.
1184 * configure: Regenerate.
1185
1186 2003-08-31 Christian Groessler <chris@groessler.org>
1187
1188 * elf32-i860.c (i860_howto_pc26_reloc): Finish relocation here
1189 instead of returning bfd_reloc_continue.
1190
1191 2003-08-31 Andreas Jaeger <aj@suse.de>
1192
1193 * merge.c: Update to ISO C90.
1194
1195 2003-08-27 Ian Lance Taylor <ian@airs.com>
1196
1197 * configure.in: Check for strtoull.
1198 * bfd.c (bfd_scan_vma): Use strtoull when available.
1199 * configure, config.in: Regenerate.
1200
1201 * configure.in: Define and substitute BFD_HOST_LONG_LONG.
1202 * bfd-in.h: Define BFD_HOST_LONG_LONG. Test it rather than
1203 __GNUC__ when deciding whether to use long long for
1204 BFD_HOST_64_BIT.
1205 * configure, Makefile.in, doc/Makefile.in, bfd-in2.h: Regenerate.
1206
1207 2003-08-27 Christian Groessler <chris@groessler.org>
1208
1209 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc,
1210 i860_howto_splitn_reloc, i860_howto_highadj_reloc): New
1211 functions.
1212 (elf32_i860_howto_table): Insert the new functions as
1213 'special_function's in the proper reloc type entries.
1214
1215 2003-08-27 Richard Sandiford <rsandifo@redhat.com>
1216
1217 * elf32-frv.c (elf32_frv_relocate_section): Use
1218 _bfd_elf_rela_local_sym.
1219
1220 2003-08-26 Michael Snyder <msnyder@redhat.com>
1221
1222 * cpu-frv.c: Remove unused enum.
1223
1224 2003-08-25 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
1225
1226 * reloc.c: Fix documentation for MIPS ELF relocations.
1227 libbfd.h: Regenerate.
1228 bfd-in2.h: Regenerate.
1229
1230 2003-08-24 Jason Eckhardt <jle@rice.edu>
1231
1232 * coff-i860.c (CALC_ADDEND): Define to be a no-op.
1233
1234 2003-08-24 Jason Eckhardt <jle@rice.edu>
1235
1236 * elf32-i860.c (elf32_i860_relocate_pc16): Subtract 4 and
1237 shift by 2 before storing the relocated value.
1238
1239 2003-08-23 Jason Eckhardt <jle@rice.edu>
1240
1241 * coff-i860.c (coff_i860_reloc_nyi): New function.
1242 (howto_table): Add entries for relocations PAIR, HIGHADJ, HIGH,
1243 LOWn, SPLITn, and BRADDR.
1244 (RTYPE2HOWTO): Check that the r_type is within the howto_table
1245 before trying to access the entry.
1246 (coff_i860_rtype_to_howto): Likewise.
1247 (coff_i860_reloc_type_lookup): New function.
1248 (i860_reloc_processing): New function.
1249 (coff_bfd_reloc_type_lookup): Define macro.
1250 (RELOC_PROCESSING): Define macro.
1251 Minor formatting adjustments.
1252
1253 2003-08-23 Alan Modra <amodra@bigpond.net.au>
1254
1255 * elflink.h (elf_link_add_object_symbols): Don't crash on NULL owner.
1256
1257 2003-08-22 H.J. Lu <hongjiu.lu@intel.com>
1258
1259 * elfxx-ia64.c (elfNN_ia64_create_dynamic_sections): Align the
1260 .got section at 8 bytes.
1261
1262 2003-08-21 Nick Clifton <nickc@redhat.com>
1263
1264 * cofflink.c: Update to ISO C90 and tidy up formatting.
1265
1266 2003-08-21 Randolph Chung <tausq@debian.org>
1267
1268 * elf32-hppa.c (elf32_hppa_object_p): For elf32-hppa-linux, objects
1269 can have OSABI=Linux or OSABI=SysV. Check for both.
1270 * elf64-hppa.c (elf64_hppa_object_p): Likewise.
1271
1272 2003-08-21 Nick Clifton <nickc@redhat.com>
1273
1274 * po/sv.po: Updated Swedish translation.
1275
1276 2003-08-20 Richard Sandiford <rsandifo@redhat.com>
1277
1278 * elf64-mips.c (elf_backend_copy_indirect_symbol): Define.
1279
1280 2003-08-20 Nick Clifton <nickc@redhat.com>
1281
1282 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): New macro used to
1283 replace some duplicated code in most elfxx-xxxx.c files. This
1284 version uses the new fields in bfd_link_info.
1285
1286 * elf-m10300.c (mn10300_elf_relocate_section): Use new macro.
1287 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
1288 * elf32-cris.c (cris_elf_relocate_section): Likewise.
1289 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
1290 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1291 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
1292 * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
1293 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1294 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1295 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1296 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1297 * elf32-vax.c (elf_vax_relocate_section): Likewise.
1298 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
1299 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
1300 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1301 * elf64-s390.c (elf_s390_relocate_section): Likewise.
1302 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1303 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1304 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
1305
1306 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols,
1307 elf_hppa_remark_useless_dynamic_symbols,
1308 elf_hppa_relocate_section): Use the new fields in
1309 bfd_link_info structure.
1310 * elf32-sh.c (sh_elf_relocate_section): Likewise.
1311 * elf64-alpha.c (elf64_alpha_check_relocs): Likewise.
1312 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
1313 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
1314 * elfxx-ia64.c (elfNN_ia64_check_relocs): Likewise.
1315 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
1316
1317 * elflink.h (elf_link_output_extsym): Fix test for reporting
1318 undefined symbols in shared libraries. Remove redundant test
1319 of shlib_undefined when reporting references to forced local
1320 symbols.
1321
1322 2003-08-18 Andreas Schwab <schwab@suse.de>
1323
1324 * libpei.h (bfd_pe_executable_p): Also recognize efi-app
1325 executables.
1326
1327 2003-08-17 Hans-Peter Nilsson <hp@bitrange.com>
1328
1329 * simple.c (bfd_simple_get_relocated_section_contents): Move
1330 reloc_done hack to before first bfd_section_size call. Change all
1331 returns to use new wrapper macro RETURN, restoring sec->reloc_done.
1332
1333 2003-08-16 Alan Modra <amodra@bigpond.net.au>
1334
1335 * elf64-ppc.c: Don't include elf/ppc.h.
1336
1337 2003-08-14 Richard Sandiford <rsandifo@redhat.com>
1338
1339 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Fix PT_DYNAMIC
1340 code to work with 64-bit bfds.
1341
1342 2003-08-14 Alan Modra <amodra@bigpond.net.au>
1343
1344 * dep-in.sed: Remove libintl.h.
1345 * Makefile.am (SRC-POTFILES.in, BLD-POTFILES.in): Unset LC_COLLATE.
1346 (POTFILES.in): Remove target.
1347 * Makefile.in: Regenerate.
1348
1349 2003-08-12 Alan Modra <amodra@bigpond.net.au>
1350
1351 * elf64-ppc.c (ppc64_elf_next_input_section): Update comment.
1352 (ppc64_elf_relocate_section): For zero sym R_PPC64_TOC relocs,
1353 use the function sym from the previous reloc.
1354
1355 2003-08-11 Jakub Jelinek <jakub@redhat.com>
1356
1357 * elf32-i386.c (elf_i386_relocate_section): Make undefined symbols
1358 fatal if -pie.
1359 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1360 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1361 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
1362 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1363 * elf64-s390.c (elf_s390_relocate_section): Likewise.
1364 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1365 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1366 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
1367 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1368 (ppc_elf_relocate_section) <case R_PPC_RELAX32>: Issue fatal error
1369 on undefined symbols if -pie.
1370 * elf32-sh.c (sh_elf_relocate_section): Likewise.
1371
1372 2003-08-11 Alan Modra <amodra@bigpond.net.au>
1373
1374 * elf64-ppc.c (ppc64_elf_relocate_section): Add special case for crt1.o
1375 branch to __libc_start_main.
1376
1377 2003-08-08 Dmitry Diky <diwil@mail.ru>
1378
1379 * archures.c: Add xW42 and xE42 parts. Sort MPU list according to
1380 gcc order.
1381 * cpu-msp430.c: Likewise.
1382 * elf32-msp430.c: Likewise.
1383 * bfd-in2.h: Regenerate.
1384
1385 2003-08-07 Alan Modra <amodra@bigpond.net.au>
1386
1387 * elfxx-target.h: Remove PTR cast.
1388 * targets.c (bfd_target): Make backend_data const void *.
1389 * elf-bfd.h: Constify all occurrences of struct elf_backend_data.
1390 * elf-m10300.c: Likewise.
1391 * elf.c: Likewise.
1392 * elf32-hppa.c: Likewise.
1393 * elf32-i386.c: Likewise.
1394 * elf32-m68hc1x.c: Likewise.
1395 * elf32-ppc.c: Likewise.
1396 * elf32-s390.c: Likewise.
1397 * elf32-sh.c: Likewise.
1398 * elf32-sh64.c: Likewise.
1399 * elf32-sparc.c: Likewise.
1400 * elf32-xtensa.c: Likewise.
1401 * elf64-mips.c: Likewise.
1402 * elf64-ppc.c: Likewise.
1403 * elf64-s390.c: Likewise.
1404 * elf64-sh64.c: Likewise.
1405 * elf64-sparc.c: Likewise.
1406 * elf64-x86-64.c: Likewise.
1407 * elfcode.h: Likewise.
1408 * elfcore.h: Likewise.
1409 * elflink.c: Likewise.
1410 * elflink.h: Likewise.
1411 * elfxx-ia64.c: Likewise.
1412 * elfxx-mips.c: Likewise.
1413 * elfxx-mips.h: Likewise.
1414 * elf.c (prep_headers): Remove useless check for null backend_data.
1415 * bfd-in2.h: Regenerate.
1416
1417 * elf-bfd.h: Remove PARAMS macro. Replace PTR with void *.
1418 (NAME): Use ## rather than CONCAT4 macro.
1419 * elfcode.h: Remove one remaining PARAMS macro.
1420 * elf-eh-frame.c: Convert to C90, remove unneeded casts and prototypes.
1421 * elf-strtab.c: Likewise.
1422 * elf-hppa.h: Likewise.
1423 * elf32-hppa.h: Likewise.
1424 * elf32-hppa.c: Likewise.
1425 (elf32_hppa_add_symbol_hook): Delete.
1426 (elf_backend_add_symbol_hook): Don't define.
1427 * libhppa.h: Convert to C90. Replace INLINE with inline.
1428
1429 2003-08-06 Alan Modra <amodra@bigpond.net.au>
1430
1431 * elf64-ppc.c (ppc_stub_name): Tweak names for better readability.
1432 (ppc64_elf_adjust_dynamic_symbol): Allow copy relocs against
1433 function descriptors, but warn.
1434 (ppc_build_one_stub): Remove a couple of vars. Move code creating
1435 stub syms so that we can avoid a stub sym if we already have a
1436 plt sym. Do not redefine an existing symbol.
1437 (ppc64_elf_build_stubs): When --emit-stub-syms, print a symbol for
1438 glink.
1439
1440 2003-08-06 Nick Clifton <nickc@redhat.com>
1441
1442 * po/fr.po: Updated French translation.
1443
1444 2003-08-06 Alan Modra <amodra@bigpond.net.au>
1445
1446 * elflink.c (_bfd_elf_create_dynamic_sections): Mark .dynbss with
1447 SEC_LINKER_CREATED.
1448
1449 2003-08-05 Daniel Jacobowitz <drow@mvista.com>
1450
1451 * elf32-arm.h (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
1452 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Use it.
1453
1454 2003-08-03 Jeff Muizelaar <muizelaar@rogers.com>
1455
1456 * coffcode.h (coff_slurp_line_table): Return with a warning
1457 message if the line number table could not be read.
1458
1459 2003-08-04 Nick Clifton <nickc@redhat.com>
1460
1461 * elflink.h (elf_link_add_object_symbols): Prepend "warning: "
1462 to messages produced for .gnu.warning.SYMBOL sections.
1463
1464 2003-08-04 Alan Modra <amodra@bigpond.net.au>
1465
1466 * elfcode.h: Convert to C90, remove unneeded casts and prototypes.
1467 * elfcore.h: Likewise.
1468 * elflink.c: Likewise.
1469 * elflink.h: Likewise.
1470 * elf.c (sym_is_global): Remove INLINE.
1471 (align_file_position): Replace INLINE with inline.
1472 * elfcode.h (elf_swap_dyn_in, elf_swap_dyn_out): Remove INLINE.
1473 (elf_file_p): Replace INLINE with inline.
1474
1475 2003-08-02 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1476
1477 * elf32-sh.c (sh_elf_check_relocs): Don't set DF_TEXTREL here.
1478
1479 2003-08-01 H.J. Lu <hongjiu.lu@intel.com>
1480
1481 * elfxx-ia64.c (get_got): Align the .got section at 8 bytes.
1482
1483 2003-08-01 H.J. Lu <hongjiu.lu@intel.com>
1484
1485 * elfxx-ia64.c (elfNN_ia64_finish_dynamic_symbol): Use
1486 ElfNN_External_Rela instead of Elf64_External_Rela.
1487
1488 2003-08-01 Nick Clifton <nickc@redhat.com>
1489
1490 * config.bfd: Add code to catch obsolete configurations and warn
1491 about them unless --enable-obsolete is used. Use this to mark
1492 vax-vms port as obsolete.
1493
1494 2003-07-30 Alan Modra <amodra@bigpond.net.au>
1495
1496 * elf32-ppc.c (ppc_elf_install_value): Tidy.
1497 (ppc_elf_relax_section): Remove dead code. Remove unnecessary casts.
1498 Formatting.
1499 * elfxx-target.h: Remove PARAMS macro. Formatting.
1500
1501 2003-07-30 Alan Modra <amodra@bigpond.net.au>
1502
1503 * elf.c (bfd_section_from_r_symndx): Test for SHN_UNDEF.
1504 * elf64-ppc.c (get_fdh): New function, split out from
1505 ppc64_elf_edit_opd.
1506 (ppc64_elf_check_relocs): Use get_fdh.
1507 (func_desc_adjust): Likewise. Tidy.
1508 (ppc64_elf_edit_opd): Tighten reloc checks. Free local_syms on error
1509 exit. Use get_fdh. Account for superfluous dynamic relocs.
1510 (ppc64_elf_relocate_section): Warning fix.
1511
1512 2003-07-30 Jason Eckhardt <jle@rice.edu>
1513
1514 * coff-i860.c: Convert to ISO C90. Remove superflous prototypes.
1515
1516 2003-07-30 Jason Eckhardt <jle@rice.edu>
1517
1518 * elf32-i860.c: Convert to ISO C90. Remove superflous prototypes.
1519
1520 2003-07-30 Randolph Chung <tausq@debian.org>
1521
1522 * elf-hppa.h (elf_hppa_relocate_section): Look up dyn_h for undefweak.
1523 * elf64-hppa.c (elf64_hppa_finalize_dlt): Check h->root.type.
1524
1525 2003-07-30 Alan Modra <amodra@bigpond.net.au>
1526
1527 * elf.c: Convert to C90, remove unnecessary prototypes and casts.
1528 Replace PTR with void *. Formatting.
1529 (_bfd_elf_assign_file_position_for_section): Remove INLINE.
1530 (make_mapping): Likewise.
1531
1532 2003-07-29 Alan Modra <amodra@bigpond.net.au>
1533
1534 * elf64-ppc.c (func_desc_adjust): Give linker created function
1535 descriptor symbols a size and type.
1536 (ppc64_elf_relocate_section): Correct lq insn test.
1537
1538 2003-07-28 Eric Christopher <echristo@redhat.com>
1539
1540 * elf32-ppc.c (R_PPC_RELAX32): New relocation.
1541 (ppc_elf_install_value): New function.
1542 (ppc_elf_sort_rela): Remove.
1543 (ppc_elf_relax_section): Rewrite. Remove old relaxation
1544 and replace with out of range branch stubs.
1545 (ppc_elf_relocate_section): Handle R_PPC_RELAX32.
1546
1547 2003-07-29 Alexandre Oliva <aoliva@redhat.com>
1548
1549 * elf-m10300.c (mn10300_elf_relax_section): Take symbol hash table
1550 from input_bfd.
1551
1552 2003-07-28 Alan Modra <amodra@bigpond.net.au>
1553
1554 * elf.c (special_sections): Set attributes for .got and .plt.
1555
1556 2003-07-27 Alan Modra <amodra@bigpond.net.au>
1557
1558 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Ensure no copy relocs
1559 on function descriptors.
1560 (ELIMINATE_COPY_RELOCS): Expand comment.
1561 (ppc64_elf_special_sections): Move. Don't include non-ppc64 sections.
1562 Do include ".toc1".
1563
1564 2003-07-25 H.J. Lu <hongjiu.lu@intel.com>
1565
1566 * elf.c (_bfd_elf_new_section_hook): Set the default section
1567 type to SHT_NULL.
1568 (elf_fake_sections): Set the section type based on asect->flags
1569 if it is SHT_NULL. Don't abort on processor specific section
1570 types.
1571
1572 2003-07-25 H.J. Lu <hongjiu.lu@intel.com>
1573
1574 * bfd-in2.h: Regenerated.
1575
1576 2003-07-25 H.J. Lu <hongjiu.lu@intel.com>
1577
1578 * elf-bfd.h (bfd_elf_special_section): New.
1579 (elf_backend_data): Add special_sections, a pointer to
1580 bfd_elf_special_section.
1581 (elf_section_type). New.
1582 (elf_section_flags): New.
1583 (_bfd_elf_get_sec_type_attr): New.
1584
1585 * elf.c (_bfd_elf_make_section_from_shdr): Always use the
1586 real section type/flags.
1587 (special_sections): New.
1588 (get_special_section): New.
1589 (_bfd_elf_get_sec_type_attr): New.
1590 (_bfd_elf_new_section_hook): Check special_section to set
1591 elf_section_type and elf_section_flags.
1592 (elf_fake_sections): Don't use section name to set ELF section
1593 data.
1594
1595 * elf32-m32r.c (m32r_elf_special_sections): New.
1596 (elf_backend_special_sections): Defined.
1597
1598 * elf32-m68hc11.c (elf32_m68hc11_special_sections): New.
1599 (elf_backend_special_sections): Defined.
1600
1601 * elf32-mcore.c (mcore_elf_special_sections): New.
1602 (elf_backend_special_sections): Defined.
1603
1604 * elf32-ppc.c (ppc_elf_special_sections): New.
1605 (elf_backend_special_sections): Defined.
1606
1607 * elf32-sh64.c (sh64_elf_special_sections): New.
1608 (elf_backend_special_sections): Defined.
1609
1610 * elf32-v850.c (v850_elf_special_sections): New.
1611 (elf_backend_special_sections): Defined.
1612
1613 * elf32-xtensa.c (elf_xtensa_special_sections): New.
1614 (elf_backend_special_sections): Defined.
1615
1616 * elf64-alpha.c (elf64_alpha_special_sections): New.
1617 (elf_backend_special_sections): Defined.
1618
1619 * elf64-hppa.c (elf64_hppa_special_sections): New.
1620 (elf_backend_special_sections): Defined.
1621
1622 * elf64-ppc.c (ppc64_elf_special_sections): New.
1623 (elf_backend_special_sections): Defined.
1624
1625 * elf64-sh64.c (sh64_elf64_special_sections): New.
1626 (elf_backend_special_sections): Defined.
1627
1628 * elfxx-ia64.c (elfNN_ia64_special_sections): New.
1629 (elf_backend_special_sections): Defined.
1630
1631 * elfxx-mips.c (_bfd_mips_elf_special_sections): New.
1632
1633 * elfxx-mips.h (_bfd_mips_elf_special_sections): New.
1634 (elf_backend_special_sections): Defined.
1635
1636 * elfxx-target.h (elf_backend_special_sections): New. Default
1637 to NULL.
1638 (elfNN_bed): Initialize special_sections.
1639
1640 * section.c (bfd_abs_section): Remove const.
1641 (bfd_und_section): Likewise.
1642 (bfd_com_section): Likewise.
1643 (bfd_ind_section): Likewise.
1644
1645 2003-07-24 Nick Clifton <nickc@redhat.com>
1646
1647 * coff-arm.c (EXTRA_S_FLAGS): Include SEC_CODE so that code
1648 sections are assigned the LOAD attribute.
1649
1650 2003-07-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1651
1652 * elf32-sh.c: Convert to C90. Replace PTR with void *.
1653 * elf32-sh64-com.c: Likewise.
1654 * elf32-sh64.c: Likewise.
1655 * elf32-sh64.h: Likewise.
1656 * elf64-sh64.c: Likewise.
1657
1658 2003-07-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1659
1660 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
1661 (allocate_dynrelocs): Likewise.
1662 (sh_elf_relocate_section): Likewise. Use SYMBOL_REFERENCES_LOCAL.
1663 (sh_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
1664
1665 2003-07-24 Nick Clifton <nickc@redhat.com>
1666
1667 * po/fr.po: Updated French translation.
1668
1669 2003-07-23 Bob Wilson <bob.wilson@acm.org>
1670
1671 * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Make inline and move
1672 near the beginning of the file. Swap order of arguments. Call
1673 _bfd_elf_dynamic_symbol_p with "ignore_protected" set to 0.
1674 (elf_xtensa_fix_refcounts): Adjust xtensa_elf_dynamic_symbol_p call.
1675 (elf_xtensa_relocate_section): Likewise.
1676 (shrink_dynamic_reloc_sections): Likewise.
1677
1678 2003-07-23 Bob Wilson <bob.wilson@acm.org>
1679
1680 * elf32-xtensa.c (plt_reloc_count): Fix typo in comment.
1681 (elf_xtensa_size_dynamic_sections): Use elf_discarded_section.
1682 (elf_xtensa_combine_prop_entries): Avoid returning non-zero without
1683 first printing an error message.
1684 (elf_xtensa_finish_dynamic_sections): Likewise.
1685 (elf_xtensa_discard_info_for_section): Adjust size of .got.loc when
1686 discarding literal table entries.
1687 (elf_xtensa_merge_private_bfd_data): Remove newline from error message.
1688 (elf_xtensa_do_asm_simplify): Likewise.
1689
1690 2003-07-23 Stephane Carrez <stcarrez@nerim.fr>
1691
1692 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Avoid crash when
1693 we have a local symbol in common section.
1694
1695 2003-07-22 H.J. Lu <hongjiu.lu@intel.com>
1696
1697 * elflink.c (_bfd_elf_dynamic_symbol_p): Don't return TRUE for
1698 weak symbols.
1699
1700 2003-07-22 Nick Clifton <nickc@redhat.com>
1701
1702 * coffcode.h (coff_slurp_symbol_table): Add C_TCSYM and C_ECOML to
1703 expected RS6000 storage classes.
1704
1705 2003-07-21 H.J. Lu <hongjiu.lu@intel.com>
1706
1707 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Mark
1708 output_bfd unused to silence gcc.
1709
1710 2003-07-21 Nick Clifton <nickc@redhat.com>
1711
1712 * po/sv.po: Updated Swedish translation.
1713
1714 2003-07-21 Alan Modra <amodra@bigpond.net.au>
1715
1716 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Use..
1717 (_bfd_elf_symbol_refs_local_p): ..this. Declare.
1718 * elflink.c (_bfd_elf_symbol_refs_local_p): New function.
1719 * elf32-i386.c (elf_i386_relocate_section): Remove h NULL test
1720 now done in _bfd_elf_symbol_refs_local_p.
1721 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1722 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1723 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1724
1725 2003-07-18 H.J. Lu <hongjiu.lu@intel.com>
1726
1727 * elflink.c (_bfd_elf_dynamic_symbol_p): Undo the last change.
1728
1729 2003-07-18 H.J. Lu <hongjiu.lu@intel.com>
1730
1731 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL): Fix a typo.
1732 (SYMBOL_CALLS_LOCAL): Likewise.
1733
1734 * elflink.c (_bfd_elf_dynamic_symbol_p): Return TRUE
1735 immediately if symbol isn't defined locally.
1736
1737 2003-07-18 Richard Henderson <rth@redhat.com>
1738
1739 * elflink.c (_bfd_elf_dynamic_symbol_p): New.
1740 * elf-bfd.h (_bfd_elf_dynamic_symbol_p): Declare it.
1741 (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Use it.
1742 * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Likewise.
1743 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
1744 * elf64-hppa.c (elf64_hppa_dynamic_symbol_p): Likewise.
1745 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Likewise.
1746 Update all callers to provide the relocation being resolved.
1747
1748 2003-07-17 Shaun Jackman <sjackman@pathwayconnect.com>
1749
1750 * config.bfd (arm-wince-pe): Add -DARM_COFF_BUGFIX to
1751 targ_cflags.
1752
1753 2003-07-17 Nick Clifton <nickc@redhat.com>
1754
1755 * po/es.po: New Spanish translation.
1756 * po/sv.po: New Swedish translation.
1757 * po/opcodes.pot: Regenerate.
1758
1759 2003-07-16 Richard Henderson <rth@redhat.com>
1760
1761 * config.bfd, configure.host, configure.in: Remove ia64-aix support.
1762 * elfxx-ia64.c, targets.c: Likewise.
1763
1764 2003-07-16 Richard Henderson <rth@redhat.com>
1765
1766 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Properly return false
1767 for symbols defined locally plus -Bsymbolic. Tidy logic.
1768
1769 2003-07-15 Richard Sandiford <rsandifo@redhat.com>
1770
1771 * archures.c (bfd_mach_mips7000): New.
1772 * bfd-in2.h: Regenerated.
1773 * cpu-mips.c (arch_info_struct): Add an entry for mips:7000.
1774 * elfxx-mips.c (mips_set_isa_flags): Handle bfd_mach_mips7000.
1775 (mips_mach_extensions): Add an entry for it.
1776
1777 2003-07-14 Nick Clifton <nickc@redhat.com>
1778
1779 * po/tr.po: Update with latest version.
1780 * po/SRC-POTFILES.in: Regenerate.
1781 * po/bfd.pot: Regenerate.
1782 * Makfile.in: Regenerate.
1783 * configure: Regenerate.
1784
1785 2003-07-12 Jeff Baker <jbaker@qnx.com>
1786
1787 * bfd/config.bfd (__QNXTARGET__): Define for Neutrino architectures.
1788 * bfd/elf32-arm.h (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1789 * bfd/elf32-sh.c (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1790 * bfd/elf32-ppc.c (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1791
1792 2003-07-12 Jeff Muizelaar <muizelaar@rogers.com>
1793
1794 * coffcode.h (coff_set_section_contents): Set the
1795 IMAGE_FILE_32BIT_MACHINE flag for PE targets.
1796
1797 2003-07-11 Richard Sandiford <rsandifo@redhat.com>
1798
1799 * bfd-in.h (bfd_h8300_pad_address): Declare.
1800 * bfd-in2.h: Regenerate.
1801 * cpu-h8300.c (bfd_h8300_pad_address): New function.
1802 * coff-h8300.c (h8300_reloc16_estimate): Use it to canonicalize
1803 addresses before checking whether they can be relaxed.
1804 (h8300_reloc16_extra_cases): Likewise for the R_MOVL2 sanity check.
1805 Don't complain about overflows in general 8-bit relocations.
1806 * elf32-h8300.c (elf32_h8_relax_section): Use bfd_h8300_pad_address.
1807 Fix handling of R_H8_DIR24A8.
1808
1809 2003-07-11 Richard Sandiford <rsandifo@redhat.com>
1810
1811 * elf32-h8300.c: Convert function prototypes and definitions
1812 to C90 syntax.
1813 * coff-h8300.c: Likewise.
1814 * cpu-h8300.c: Likewise.
1815
1816 2003-07-11 Alan Modra <amodra@bigpond.net.au>
1817
1818 * po/SRC-POTFILES.in: Regenerate.
1819 * po/bfd.pot: Likewise.
1820
1821 2003-07-10 Bob Wilson <bob.wilson@acm.org>
1822
1823 * elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Create new
1824 .got.loc section. Do not set SEC_ALLOC or SEC_LOAD flags for the
1825 .xt.lit.plt section.
1826 (elf_xtensa_size_dynamic_sections): Set size of the .got.loc section
1827 and allocate memory for it.
1828 (elf_xtensa_combine_prop_entries): Copy contents of .xt.lit output
1829 section to the .got.loc section.
1830 (elf_xtensa_finish_dynamic_sections): Fix up call to
1831 elf_xtensa_combine_prop_entries and set DT_XTENSA_GOT_LOC_OFF to
1832 the address of .got.loc.
1833 (relax_property_section): Shrink .got.loc to match changes in any
1834 literal table section.
1835 (xtensa_is_property_section): Change to match
1836 xtensa_get_property_section_name.
1837 (xtensa_is_littable_section): New.
1838
1839 2003-07-10 H.J. Lu <hongjiu.lu@intel.com>
1840
1841 * elfxx-ia64.c (IA64_HOWTO): Set dst_mask to -1 instead of
1842 -1LL.
1843
1844 2003-07-10 Alan Modra <amodra@bigpond.net.au>
1845
1846 * Makefile.am (BFD32_BACKENDS): Add elf32-am33lin.lo.
1847 (BFD32_BACKENDS_CFILES): elf32-am33lin.c not elf32-am33lin.lo.
1848 Run "make dep-am".
1849 * Makefile.in: Regenerate.
1850
1851 2003-07-10 Alexandre Oliva <aoliva@redhat.com>
1852
1853 2001-09-12 Alexandre Oliva <aoliva@redhat.com>
1854 * elf32-am33lin.c (ELF_MACHINE_CODE): Redefine to EM_MN10300.
1855 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10300.
1856 2001-06-02 Nick Clifton <nickc@cambridge.redhat.com>
1857 * elf32-am33lin.c: Rename global functions.
1858 2001-05-09 Alexandre Oliva <aoliva@redhat.com>
1859 * config.bfd (am33_2.0, am33_2.0-*-linux*): Added.
1860 * configure.in (bfd_elf32_am33lin_vec): Added.
1861 * Makefile.am (BFD32_BACKENDS): Added elf32-am33lin.lo.
1862 (elf32-am33lin.lo): List dependencies.
1863 * aclocal.m4, configure, Makefile.in: Rebuilt.
1864 * elf-m10300.c (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME,
1865 ELF_ARCH, ELF_MACHINE_CODE, ELF_MAXPAGESIZE): Define only if
1866 ELF_ARCH was not defined before.
1867 (elf_symbol_leading_char): Define if not defined.
1868 * elf32-am33lin.c: Override the definitions above.
1869 * targets.c (bfd_elf32_am33lin_vec): New.
1870
1871 2003-07-09 Alexandre Oliva <aoliva@redhat.com>
1872
1873 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
1874 * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Initialize
1875 pcrel_relocs_copied.
1876 2001-12-13 Alexandre Oliva <aoliva@redhat.com>
1877 * elf-m10300.c (ELF_DYNAMIC_INTERPRETER): Renamed from
1878 ld-linux.so.2 to ld.so.1.
1879 2001-10-10 Alexandre Oliva <aoliva@redhat.com>
1880 * elf-m10300.c (elf_mn10300_sizeof_plt0): New macro.
1881 (_bfd_mn10300_elf_adjust_dynamic_symbol): Use it.
1882 (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
1883 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Allocate
1884 .rela.* section contents with bfd_zalloc.
1885 2001-09-25 Alexandre Oliva <aoliva@redhat.com>
1886 * elf-m10300.c: Added declarations for functions missing them.
1887 Merge some shared-library changes from the i386 back-end. Use
1888 R_MN10300_RELATIVE instead of R_MN10300_PCREL32 and
1889 R_MN10300_GLOB_DAT instead of R_MN10300_32 where appropriate.
1890 (struct elf32_mn10300_link_hash_entry): Remove duplicates of
1891 members of elf_link_hash_entry. Adjusted references.
1892 (mn10300_elf_final_link_relocate): dynobj was already loaded
1893 into a local variable, use it.
1894 2001-09-21 Nick Clifton <nickc@cambridge.redhat.com>
1895 * elf-m10300.c: Add missing function prototypes.
1896 2001-08-24 Alexandre Oliva <aoliva@redhat.com>
1897 * elf-m10300.c (mn10300_elf_relocate_section): Don't compute
1898 relocation for dynamic relocations.
1899 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
1900 * reloc.c (BFD_RELOC_MN10300_GOTOFF24): New.
1901 * elf-m10300.c: Introduce GOTPC16, GOTOFF24, GOTOFF16 and
1902 PLT16, and rename GOTPC to GOTPC32 and GOTOFF to GOTOFF32.
1903 (_bfd_mn10300_elf_create_dynamic_sections): Move creation ot PLT...
1904 (_bfd_mn10300_elf_create_got_section): ... here, so that its
1905 adress is already known at the time we compute relaxations.
1906 (mn10300_elf_relax_section): Relax GOTPC32, GOTOFF32, GOT32
1907 and PLT32 to narrower relocations.
1908 * libbfd.h, bfd-in2.h: Rebuilt.
1909 2001-04-12 Alexandre Oliva <aoliva@redhat.com>
1910 * reloc.c (BFD_RELOC_MN10300_GOT32, BFD_RELOC_MN10300_GOT24,
1911 BFD_RELOC_MN10300_GOT16, BFD_RELOC_MN10300_COPY,
1912 BFD_RELOC_MN10300_GLOB_DAT, BFD_RELOC_MN10300_JMP_SLOT,
1913 BFD_RELOC_MN10300_RELATIVE): New relocs.
1914 * libbfd.h, bfd-in2.h: Rebuilt.
1915 * elf-m10300.c (struct elf_mn10300_pcrel_relocs_copied): New.
1916 (struct elf32_mn10300_link_hash_entry): Added DSO-related
1917 fields.
1918 (elf_mn10300_howto): Defined new relocation types.
1919 (mn10300_reloc_map): Map them.
1920 (_bfd_mn10300_elf_create_got_section): New fn.
1921 (mn10300_elf_check_relocs): Handle PIC relocs.
1922 (mn10300_elf_final_link_relocate): Likewise.
1923 (mn10300_elf_relocate_section): Handle DSOs.
1924 (PLT0_ENTRY_SIZE, PLT_ENTRY_SIZE, PIC_PLT_ENTRY_SIZE): New macros.
1925 (elf_mn10300_plt0_entry, elf_mn10300_plt_entry,
1926 elf_mn10300_pic_plt_entry): New.
1927 (elf_mn10300_sizeof_plt, elf_mn10300_plt_plt0_offset,
1928 elf_mn10300_plt0_linker_offset, elf_mn10300_plt0_gotid_offset,
1929 elf_mn10300_plt_temp_offset, elf_mn10300_plt_symbol_offset,
1930 elf_mn10300_plt_reloc_offset: New macros.
1931 (ELF_DYNAMIC_INTERPRETER): Likewise.
1932 (_bfd_mn10300_elf_create_dynamic_sections): New function.
1933 (_bfd_mn10300_elf_adjust_dynamic_symbol): Likewise.
1934 (_bfd_mn10300_elf_discard_copies): Likewise.
1935 (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
1936 (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
1937 (_bfd_mn10300_elf_finish_dynamic_sections): Likewise.
1938 (elf_backend_can_gc_sections,
1939 elf_backend_create_dynamic_sections,
1940 elf_backend_adjust_dynamic_sections,
1941 elf_backend_size_dynamic_sections,
1942 elf_backend_finish_dynamic_symbol,
1943 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
1944 elf_backend_plt_readonly, elf_backend_want_plt_sym,
1945 elf_backend_got_header_size, elf_backend_plt_header_size): New
1946 macros.
1947
1948 2003-07-09 Alexandre Oliva <aoliva@redhat.com>
1949
1950 2001-05-06 Alexandre Oliva <aoliva@redhat.com>
1951 * elf-m10300.c (compute_function_info): Account for AM33
1952 registers in `movm' when computing stack space for `call' when
1953 linking for AM33/2.0 link.
1954 2000-04-01 Alexandre Oliva <aoliva@cygnus.com>
1955 * archures.c (bfd_mach_am33_2): Renamed from bfd_mach_am332.
1956 * bfd-in2.h: Rebuilt.
1957 * cpu-m10300.c (bfd_am33_2_arch): Renamed from bfd_am332_arch.
1958 * elf-m10300.c: Updated.
1959 2000-03-31 Alexandre Oliva <aoliva@cygnus.com>
1960 * archures.c (bfd_mach_am332): Defined.
1961 * bfd-in2.h: Rebuilt.
1962 * cpu-m10300.c (bfd_am332_arch): Defined.
1963 (bfd_am33_arch): Chained with am33-2.
1964 * elf-m10300.c (elf_mn10300_mach): Handle am332.
1965 (_bfd_mn10300_elf_final_write_processing): Likewise.
1966
1967 2003-07-09 H.J. Lu <hongjiu.lu@intel.com>
1968
1969 * elfxx-ia64.c (IA64_HOWTO): Set dst_mask to -1LL.
1970
1971 2003-07-10 Alan Modra <amodra@bigpond.net.au>
1972
1973 * elf64-ppc.c (bfd_elf64_mkobject): Define.
1974 (struct ppc64_elf_obj_tdata): New.
1975 (ppc64_elf_tdata, ppc64_tlsld_got): Define.
1976 (ppc64_elf_mkobject): New function.
1977 (struct got_entry): Add "owner". Move "tls_type".
1978 (struct ppc_link_hash_table): Delete "relgot", "tlsld_got".
1979 (ppc64_elf_init_stub_bfd): New function.
1980 (create_got_section): Create header .got in dynobj. Create .got
1981 and .rela.got in each bfd. Stash pointers in ppc64_elf_obj_tdata.
1982 (ppc64_elf_create_dynamic_sections): Don't call create_got_section.
1983 Look for dynobj .got, and test it.
1984 (ppc64_elf_copy_indirect_symbol): Adjust for changed got.
1985 (update_local_sym_info): Likewise.
1986 (ppc64_elf_check_relocs): Likewise.
1987 (ppc64_elf_gc_sweep_hook): Likewise.
1988 (ppc64_elf_tls_optimize): Likewise.
1989 (allocate_dynrelocs): Likewise.
1990 (ppc64_elf_size_dynamic_sections): Likewise.
1991 (ppc64_elf_relocate_section): Likewise.
1992 (ppc64_elf_next_toc_section): Update comment.
1993 (toc_adjusting_stub_needed): Remove unneeded cast.
1994 (ppc64_elf_build_stubs): Check for stub sections in stub bfd by
1995 testing section flags.
1996 (ppc64_elf_build_stubs): Likewise.
1997 (ppc64_elf_size_stubs): Likewise. Remove stub_bfd param.
1998 (ppc64_elf_finish_dynamic_sections): Write out got sections.
1999 (func_desc_adjust): Copy over dynamic info for undef weaks.
2000 * elf64-ppc.h (ppc64_elf_init_stub_bfd): Declare.
2001 (ppc64_elf_size_stubs): Update prototype.
2002 * elflink.h (elf_link_sort_relocs): Use link_orders to find reldyn
2003 input sections rather than scanning dynobj.
2004
2005 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
2006
2007 * elfxx-mips.c (mips_elf_link_hash_entry): Remove min_dyn_reloc_index.
2008 (bfd_mips_elf_swap_msym_in, bfd_mips_elf_swap_msym_out): Delete.
2009 (mips_elf_create_msym_section): Delete.
2010 (mips_elf_create_dynamic_relocation): Don't set min_dyn_reloc_index.
2011 (_bfd_mips_elf_copy_indirect_symbol): Likewise.
2012 (_bfd_mips_elf_create_dynamic_sections): Don't create .msym.
2013 (_bfd_mips_elf_size_dynamic_sections): Don't calculate its size.
2014 (_bfd_mips_elf_size_dynamic_sections): Don't add DT_MIPS_MSYM.
2015 (_bfd_mips_elf_finish_dynamic_symbol): Don't add symbols to .msym.
2016 (_bfd_mips_elf_finish_dynamic_sections): Likewise.
2017
2018 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
2019
2020 * elfxx-mips.c (mips_elf_irix6_finish_dynamic_symbol): Make the
2021 symbols protected.
2022
2023 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
2024
2025 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Fix handling
2026 of relocations whose offset is -2.
2027
2028 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
2029
2030 * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): Treat
2031 forced-local symbols like other locals. Don't create relocations
2032 against STN_UNDEF in irix objects.
2033
2034 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
2035
2036 * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): In SGI-
2037 compatible objects, add the values of defined external symbols
2038 to the addend.
2039
2040 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
2041
2042 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Always
2043 initialize a GOT entry to the symbol's st_value.
2044
2045 2003-07-08 Alan Modra <amodra@bigpond.net.au>
2046
2047 * elf-bfd.h (struct elf_obj_tdata): Move linker_section_pointers..
2048 * elf32-ppc.c (struct ppc_elf_obj_tdata): ..to here. New.
2049 (ppc_elf_tdata): Define.
2050 (elf_local_ptr_offsets): Adjust.
2051 (ppc_elf_mkobject): New function.
2052 (bfd_elf32_mkobject): Define.
2053
2054 * elfcode.h (elf_object_p): Allocate tdata via _bfd_set_format.
2055 * elfcore.h (elf_core_file_p): Likewise.
2056 * section.c (bfd_section_init): Remove prototype.
2057
2058 2003-07-08 Alan Modra <amodra@bigpond.net.au>
2059
2060 * elf-bfd.h (struct elf_link_hash_entry): Remove linker_section_pointer
2061 field.
2062 (enum elf_linker_section_enum): Delete.
2063 (struct elf_linker_section): Delete.
2064 (struct elf_linker_section_pointers): Delete.
2065 (struct elf_obj_tdata): Remove #if 0 chunk. Remove linker_section.
2066 Make linker_section_pointers a void**.
2067 (elf_local_ptr_offsets, elf_linker_section): Don't define.
2068 * elf32-ppc.c (enum elf_linker_section_enum): New, cut-down version
2069 of old item in elf-bfd.h.
2070 (struct elf_linker_section): Likewise.
2071 (struct elf_linker_section_pointers): Likewise.
2072 (elf_local_ptr_offsets): Define.
2073 (struct ppc_elf_link_hash_entry): Add linker_section_pointer.
2074 (ppc_elf_link_hash_newfunc): Init it.
2075 (struct ppc_elf_link_hash_table): Add sbss.
2076 (ppc_elf_link_hash_table_create): zmalloc rather than clearing
2077 individual fields.
2078 (elf_create_linker_section): Fold into..
2079 (ppc_elf_create_linker_section): ..here. Remove hole_size code.
2080 Make rela section here if shared.
2081 (elf_find_pointer_linker_section): Pass lsect rather than enum.
2082 (elf_create_pointer_linker_section): Adjust. zalloc rather than
2083 clearing in a loop.
2084 (elf_finish_pointer_linker_section): Adjust. Don't make rela
2085 section here.
2086 (ppc_elf_check_relocs): Adjust.
2087 (ppc_elf_add_symbol_hook): Tighten hash creator test. Remove code
2088 creating .sbss by hand.
2089 * elf.c (_bfd_elf_link_hash_newfunc): Adjust.
2090
2091 2003-07-04 Jakub Jelinek <jakub@redhat.com>
2092
2093 * elf32-s390.c (elf_howto_table): Change R_390_GOT12 to
2094 complain_overflow_bitfield.
2095 * elf64-s390.c (elf_howto_table): Change R_390_GOT12 to
2096 complain_overflow_bitfield.
2097
2098 2003-07-04 Jakub Jelinek <jakub@redhat.com>
2099
2100 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Return
2101 true even if -pie.
2102
2103 2003-07-04 Jakub Jelinek <jakub@redhat.com>
2104
2105 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add rel_fptr_sec.
2106 (elfNN_ia64_dynamic_symbol_p): Change info->shared into
2107 !info->executable.
2108 (get_fptr): For -pie create .opd as writable section and create
2109 .rela.opd as well.
2110 (elfNN_ia64_check_relocs): Change info->shared into
2111 !info->executable.
2112 (allocate_fptr): Likewise.
2113 (allocate_dynrel_entries): Account for a relative reloc for -pie
2114 @fptr(). Don't account for a relative reloc if -pie want_ltoff_fptr
2115 for undefweak symbol. Account for an IPLT reloc in .rela.opd
2116 section if -pie.
2117 (set_got_entry): Don't create a relative reloc if -pie
2118 want_ltoff_fptr for undefweak symbol.
2119 (set_fptr_entry): Emit an IPLT reloc in .rela.opd for -pie.
2120 (elfNN_ia64_relocate_section): Emit a relative reloc for -pie
2121 @fptr().
2122
2123 * elfxx-ia64.c (elfNN_ia64_relocate_section): Issue undefined_symbol
2124 even if -pie.
2125 * elf32-i386.c (elf_i386_relocate_section): Likewise.
2126 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
2127 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
2128 * elf64-s390.c (elf_s390_relocate_section): Likewise.
2129 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
2130 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
2131 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
2132 * elf32-s390.c (elf_s390_relocate_section): Likewise.
2133 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2134
2135 2003-07-04 Paul Clarke <paulc@senet.com.au>
2136
2137 * elf32-h8300.c (R_H8_DIR32A16): Fix name field.
2138 (elf32_h8_relax_section) <R_H8_DIR16A8>: Adjust position of relocation.
2139 <R_H8_DIR32A16>: Fix type of relocation.
2140
2141 2003-07-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2142
2143 * elf32-sh.c (sh_elf_create_dynamic_sections): Return if dynamic
2144 sections were created already. Remove unnecessary tests of
2145 the previous change.
2146
2147 2003-07-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2148
2149 * elf32-sh.c (sh_elf_create_dynamic_sections): Don't call
2150 bfd_make_section for existing sections.
2151
2152 2003-07-04 Alan Modra <amodra@bigpond.net.au>
2153
2154 * elf32-sparc.c (elf32_sparc_check_relocs): Don't call
2155 create_got_section if we already have done so.
2156 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
2157 (sh_elf_check_relocs): Likewise.
2158 (sh_elf_adjust_dynamic_symbol): Delete "dynobj" var. Use
2159 htab->root.dynobj instead.
2160 (sh_elf_check_relocs): Likewise.
2161 (sh_elf_finish_dynamic_sections): Likewise.
2162
2163 * section.c (bfd_make_section): Return NULL for existing section.
2164
2165 2003-07-04 Alan Modra <amodra@bigpond.net.au>
2166
2167 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Don't call
2168 ppc_elf_create_got if we've already done so.
2169
2170 * elf-bfd.h (_bfd_elf_create_linker_section) Don't declare.
2171 (_bfd_elf_find_pointer_linker_section): Likewise.
2172 (bfd_elf32_create_pointer_linker_section): Likewise.
2173 (bfd_elf32_finish_pointer_linker_section): Likewise.
2174 (bfd_elf64_create_pointer_linker_section): Likewise.
2175 (bfd_elf64_finish_pointer_linker_section): Likewise.
2176 (_bfd_elf_make_linker_section_rela): Likewise.
2177 * elfcode.h (elf_create_pointer_linker_section): Don't define.
2178 (elf_finish_pointer_linker_section): Likewise.
2179 * elflink.c (_bfd_elf_make_linker_section_rela): Delete.
2180 (_bfd_elf_create_linker_section): Move this function..
2181 (_bfd_elf_find_pointer_linker_section): ..and this..
2182 * elflink.h (elf_create_pointer_linker_section): ..and this..
2183 (elf_finish_pointer_linker_section): ..and this..
2184 * elf32-ppc.c: ..to here, renaming to the following, and adjusting
2185 calls.
2186 (elf_create_linker_section): Convert to C90, tidy.
2187 (elf_find_pointer_linker_section): Likewise.
2188 (elf_create_pointer_linker_section): Likewise.
2189 (elf_finish_pointer_linker_section): Likewise.
2190 * elf32-i370.c: Delete #if 0 code.
2191
2192 2003-07-02 Alan Modra <amodra@bigpond.net.au>
2193
2194 * elf64-ppc.c (ppc64_elf_func_desc_adjust): Don't allow _savef* and
2195 _restf* to be satisfied by shared libs, and always force them local.
2196 (toc_adjusting_stub_needed): Avoid scanning linker created sections.
2197 Correct test for "bl".
2198 (ppc64_elf_relocate_section <R_PPC64_TLS>): Correct test for
2199 primary opcode 31.
2200
2201 2003-07-01 Martin Schwidefsky <schwidefsky@de.ibm.com>
2202
2203 * elf32-s390.c (s390_elf_ldisp_reloc): New prototype.
2204 (s390_tls_reloc): New function.
2205 (elf_howto_table): Add long displacement relocations R_390_20,
2206 R_390_GOT20, R_390_GOTPLT20 and R_390_TLS_GOTIE20.
2207 (elf_s390_reloc_type_lookup): Likewise.
2208 (elf_s390_check_relocs): Likewise.
2209 (elf_s390_gc_sweep_hook): Likewise.
2210 (elf_s390_relocate_section): Likewise.
2211 * elf64-s390.c: Same changes as for elf32-s390.c.
2212 * reloc.c: Add long displacement relocations BFD_RELOC_390_20,
2213 BFD_RELOC_390_GOT20, BFD_RELOC_390_GOTPLT20 and
2214 BFD_RELOC_390_TLS_GOTIE20.
2215 * bfd-in2.h: Regenerate.
2216 * libbfd.h: Likewise.
2217
2218 2003-06-30 Alan Modra <amodra@bigpond.net.au>
2219
2220 * cpu-ia64-opc.c (ext_imms_scaled): Don't sign extend using shifts.
2221 (ins_imms, ins_immsm1u4): Likewise. Warning fix.
2222
2223 2003-06-29 Alan Modra <amodra@bigpond.net.au>
2224
2225 * archive.c: Convert to C90, remove unnecessary prototypes and casts.
2226 Replace PTR with void *. Formatting.
2227 * archive64.c: Likewise.
2228 * archures.c: Likewise.
2229 * bfd-in.h: Likewise.
2230 * bfd.c: Likewise.
2231 * bfdio.c: Likewise.
2232 * bfdwin.c: Likewise.
2233 * cache.c: Likewise.
2234 * corefile.c: Likewise.
2235 * format.c: Likewise.
2236 * init.c: Likewise.
2237 * libbfd-in.h: Likewise.
2238 * libbfd.c: Likewise.
2239 * linker.c: Likewise.
2240 * opncls.c: Likewise.
2241 * reloc.c: Likewise.
2242 * section.c: Likewise.
2243 * simple.c: Likewise.
2244 * syms.c: Likewise.
2245 * targets.c: Likewise.
2246 * bfd-in2.h: Regenerate.
2247 * libbfd.h: Regenerate.
2248
2249 * ecoff.c (bfd_debug_section): Add missing kept_section initialization.
2250 * libbfd-in.h (_bfd_sh_align_load_span): Don't declare if defined.
2251 * libbfd.c (COERCE32, EIGHT_GAZILLION): Simplify.
2252 (bfd_getb64): Rewrite without parens.
2253 (bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
2254 * cache.c (insert, snip): Remove INLINE.
2255 * linker.c (bfd_link_add_undef): Likewise.
2256
2257 2003-06-29 Andreas Jaeger <aj@suse.de>
2258
2259 * elf64-x86-64.c: Convert to ISO C90 prototypes, remove
2260 unnecessary prototypes. Replace PTR with void *.
2261 (elf64_x86_64_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL to
2262 trim plt entries. Move undefweak non-default visibility test ...
2263 (allocate_dynrelocs): ... from here.
2264 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
2265 Change all callers.
2266 (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL. Use
2267 SYMBOL_REFERENCES_LOCAL for dynreloc check.
2268 (elf64_x86_64_relocate_section): Use SYMBOL_CALLS_LOCAL for
2269 dynreloc and .got relocs.
2270 (elf64_x86_64_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL
2271 for .got relocs.
2272
2273 2003-06-29 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2274
2275 * elfxx-mips.c: Allow lazy binding for R_MIPS_JALR.
2276
2277 2003-06-27 Nick Clifton <nickc@redhat.com>
2278
2279 * opncls.c (bfd_add_gnu_debuglink_section): Rename to
2280 bfd_add_gnu_debuglink_section and only create the section, do not
2281 fill in its contents.
2282 (bfd_fill_in_gnu_debuglink_section): New function. Fill in the
2283 contents of a .gnu-debuglink section.
2284 * bfd-in2.h: Regenerate.
2285
2286 2003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2287
2288 * elfxx-mips.c: Revert .got alignment to 2**4.
2289
2290 2003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2291
2292 * elf32-mips.c: Fix addend for _gp_disp special symbol.
2293
2294 2003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2295
2296 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Remove non-default
2297 relocation header setup.
2298
2299 2003-06-25 Alan Modra <amodra@bigpond.net.au>
2300
2301 * elf32-ppc.c (ppc_elf_howto_table): Remove unnecessary cast.
2302 (ppc_elf_reloc_type_lookup): Modify comment.
2303 (ppc_elf_info_to_howto): Ditto.
2304 (ppc_elf_relocate_section): Ditto.
2305 (ppc_elf_check_relocs): Call ppc_elf_howto_init.
2306
2307 2003-06-25 Alan Modra <amodra@bigpond.net.au>
2308
2309 * aout-ns32k.c: Correct spelling of "relocatable".
2310 * aoutx.h: Likewise.
2311 * bfd-in.h: Likewise.
2312 * bfd.c: Likewise.
2313 * bout.c: Likewise.
2314 * coff-a29k.c: Likewise.
2315 * coff-alpha.c: Likewise.
2316 * coff-arm.c: Likewise.
2317 * coff-i386.c: Likewise.
2318 * coff-i860.c: Likewise.
2319 * coff-i960.c: Likewise.
2320 * coff-m68k.c: Likewise.
2321 * coff-m88k.c: Likewise.
2322 * coff-mcore.c: Likewise.
2323 * coff-mips.c: Likewise.
2324 * coff-or32.c: Likewise.
2325 * coff-ppc.c: Likewise.
2326 * coff-rs6000.c: Likewise.
2327 * coff-sh.c: Likewise.
2328 * coff-tic80.c: Likewise.
2329 * coff64-rs6000.c: Likewise.
2330 * cofflink.c: Likewise.
2331 * cpu-ns32k.c: Likewise.
2332 * ecoff.c: Likewise.
2333 * ecofflink.c: Likewise.
2334 * elf-bfd.h: Likewise.
2335 * elf-eh-frame.c: Likewise.
2336 * elf-hppa.h: Likewise.
2337 * elf-m10200.c: Likewise.
2338 * elf-m10300.c: Likewise.
2339 * elf.c: Likewise.
2340 * elf32-arm.h: Likewise.
2341 * elf32-avr.c: Likewise.
2342 * elf32-cris.c: Likewise.
2343 * elf32-d10v.c: Likewise.
2344 * elf32-dlx.c: Likewise.
2345 * elf32-fr30.c: Likewise.
2346 * elf32-frv.c: Likewise.
2347 * elf32-h8300.c: Likewise.
2348 * elf32-hppa.c: Likewise.
2349 * elf32-i370.c: Likewise.
2350 * elf32-i386.c: Likewise.
2351 * elf32-i860.c: Likewise.
2352 * elf32-i960.c: Likewise.
2353 * elf32-ip2k.c: Likewise.
2354 * elf32-iq2000.c: Likewise.
2355 * elf32-m32r.c: Likewise.
2356 * elf32-m68hc11.c: Likewise.
2357 * elf32-m68hc1x.c: Likewise.
2358 * elf32-m68k.c: Likewise.
2359 * elf32-mcore.c: Likewise.
2360 * elf32-mips.c: Likewise.
2361 * elf32-msp430.c: Likewise.
2362 * elf32-openrisc.c: Likewise.
2363 * elf32-ppc.c: Likewise.
2364 * elf32-s390.c: Likewise.
2365 * elf32-sh.c: Likewise.
2366 * elf32-sh64.c: Likewise.
2367 * elf32-sparc.c: Likewise.
2368 * elf32-v850.c: Likewise.
2369 * elf32-vax.c: Likewise.
2370 * elf32-xstormy16.c: Likewise.
2371 * elf32-xtensa.c: Likewise.
2372 * elf64-alpha.c: Likewise.
2373 * elf64-hppa.c: Likewise.
2374 * elf64-mips.c: Likewise.
2375 * elf64-mmix.c: Likewise.
2376 * elf64-ppc.c: Likewise.
2377 * elf64-s390.c: Likewise.
2378 * elf64-sh64.c: Likewise.
2379 * elf64-sparc.c: Likewise.
2380 * elf64-x86-64.c: Likewise.
2381 * elfcode.h: Likewise.
2382 * elflink.h: Likewise.
2383 * elfn32-mips.c: Likewise.
2384 * elfxx-ia64.c: Likewise.
2385 * elfxx-mips.c: Likewise.
2386 * i386linux.c: Likewise.
2387 * ieee.c: Likewise.
2388 * libcoff-in.h: Likewise.
2389 * linker.c: Likewise.
2390 * m68klinux.c: Likewise.
2391 * pdp11.c: Likewise.
2392 * pe-mips.c: Likewise.
2393 * peXXigen.c: Likewise.
2394 * reloc.c: Likewise.
2395 * reloc16.c: Likewise.
2396 * sparclinux.c: Likewise.
2397 * sunos.c: Likewise.
2398 * syms.c: Likewise.
2399 * versados.c: Likewise.
2400 * vms.c: Likewise.
2401 * xcofflink.c: Likewise.
2402 * bfd-in2.h: Regenerate.
2403 * libcoff.h: Regenerate.
2404 * libbfd.h: Regenerate.
2405
2406 2003-06-24 Alan Modra <amodra@bigpond.net.au>
2407
2408 * elf32-ppc.c (ppc_elf_check_relocs): Report plt reloc against
2409 local sym errors.
2410
2411 * elf32-i386.c: Convert to C90 function definitions, remove unnecessary
2412 prototypes and casts. Replace PTR with void *. Formatting.
2413 * elf32-ppc.c: Likewise. Break long strings too.
2414 (ppc_elf_relax_section): Use enum elf_ppc_reloc_type for r_type.
2415 (ppc_elf_unhandled_reloc): Internationalize error message.
2416 * elf32-ppc.h: Remove PARAMS.
2417
2418 2003-06-23 Mark Mitchell <mark@codesourcery.com>
2419
2420 * elf32-ppc.c (ppc_elf_begin_write_processing): Use bytes to count
2421 APUinfo slots.
2422 (ppc_elf_final_write_processing): Likewise.
2423
2424 2003-06-23 H.J. Lu <hongjiu.lu@intel.com>
2425
2426 * elflink.h (elf_link_input_bfd): Check raw size when using
2427 kept_section to preserve debug information discarded by
2428 linkonce.
2429
2430 2003-06-20 Alan Modra <amodra@bigpond.net.au>
2431
2432 * elf64-ppc.c (struct ppc_link_hash_table): Add top_id.
2433 (ppc64_elf_setup_section_lists): Set it.
2434 (ppc64_elf_relocate_section): Check sym section id against top_id.
2435 (ppc_build_one_stub): Comment on top_id.
2436
2437 2003-06-20 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
2438
2439 * config.bfd: Add tic4x-*-rtems*.
2440
2441 2003-06-20 Alan Modra <amodra@bigpond.net.au>
2442
2443 * elf64-ppc.c: Convert to C90 function definitions, remove unnecessary
2444 prototypes and casts. Replace PTR with void *. Format copyright.
2445 Mention ABI links.
2446 (struct ppc_link_hash_table): Rename sgot, srelgot, splt, srelplt,
2447 sdynbss, srelbss, sglink, sbrlt and srelbrlt to got, relgot .. relbrlt.
2448 (ppc_type_of_stub): Make r_type an enum.
2449 (ppc64_elf_size_stubs): Likewise.
2450 * elf64-ppc.h: Remove PARAMS macro.
2451
2452 2003-06-19 Alan Modra <amodra@bigpond.net.au>
2453
2454 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Reinstate init of
2455 elf hash tab fields.
2456
2457 * elf64-ppc.c (ppc64_elf_reloc_type_lookup): Tidy prototype.
2458 (ppc64_elf_info_to_howto): Likewise.
2459 (ppc64_elf_build_stubs): Add "stats" param, and print statistics.
2460 * elf64-ppc.h (ppc64_elf_build_stubs): Adjust prototype.
2461
2462 2003-06-19 Alan Modra <amodra@bigpond.net.au>
2463
2464 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore R_SPARC_DISP32
2465 reloc overflow on discarded eh_frame entries.
2466
2467 2003-06-19 Alan Modra <amodra@bigpond.net.au>
2468
2469 * elf64-ppc.c (toc_adjusting_stub_needed): New function.
2470 (ppc64_elf_next_input_section): Use it here to set has_gp_reloc.
2471 Return error condition.
2472 (ppc64_elf_size_stubs): Restrict toc adjusting stubs to sections
2473 that have has_gp_reloc set.
2474 (struct ppc_link_hash_table): Add stub_count.
2475 (ppc_build_one_stub): Increment it.
2476 (ppc64_elf_link_hash_table_create): zmalloc rather than clearing
2477 individual fields.
2478 * elf64-ppc.h (ppc64_elf_next_input_section): Update prototype.
2479
2480 2003-06-18 Alan Modra <amodra@bigpond.net.au>
2481
2482 * elflink.h (elf_gc_record_vtentry): Revert last change. Correct
2483 size calculation from addend. Round size up.
2484
2485 2003-06-18 Hans-Peter Nilsson <hp@axis.com>
2486
2487 * elf32-cris.c (cris_elf_relocate_section) <case
2488 R_CRIS_32_GOTREL>: When linking a program, don't complain about a
2489 symbol from a normal object or an undefined weak symbol.
2490
2491 2003-06-18 Alan Modra <amodra@bigpond.net.au>
2492
2493 * elf64-ppc.c (ppc64_elf_relocate_section): Accept a symbol on
2494 R_PPC64_TOC relocs.
2495
2496 2003-06-17 H.J. Lu <hongjiu.lu@intel.com>
2497
2498 * section.c (struct sec): Put back kept_section.
2499 (STD_SECTION): Put back kept_section initialization.
2500 * bfd-in2.h: Regenerate.
2501
2502 * elflink.h (elf_link_input_bfd): Also check discarded linkonce
2503 sections for relocateable output. Use kept_section to preserve
2504 debug information discarded by linkonce.
2505
2506 2003-06-17 Roland McGrath <roland@redhat.com>
2507
2508 * elfxx-ia64.c (elfNN_ia64_relocate_section): Support
2509 segment-relative relocation between different segments.
2510
2511 2003-06-17 Alan Modra <amodra@bigpond.net.au>
2512
2513 * elf64-ppc.c (ppc64_elf_relocate_section): Do unaligned reloc
2514 optimizations earlier.
2515
2516 * elf64-ppc.c (struct ppc_link_hash_table): Reinstate top_index.
2517 Restore previous input_list type.
2518 (ppc64_elf_link_hash_table_create): Undo last change.
2519 (ppc64_elf_setup_section_lists): Reinstate code setting up input lists
2520 per output section, but don't bother with bfd_abs_section marker.
2521 (ppc64_elf_next_input_section): Adjust for multiple input section
2522 lists.
2523 (group_sections): Likewise.
2524
2525 2003-06-17 Jakub Jelinek <jakub@redhat.com>
2526
2527 * elf64-ppc.c (ppc64_elf_relocation_section): Ensure
2528 *r_offset == r_addend for RELATIVE relocs against .got.
2529
2530 2003-06-17 Alan Modra <amodra@bigpond.net.au>
2531
2532 * elf64-ppc.c (ppc64_elf_relocate_section): Optimize unaligned relocs.
2533
2534 2003-06-17 Nick Clifton <nickc@redhat.com>
2535
2536 * elflink.h (elf_gc_record_vtentry): Allocate an extra element
2537 in the vtable_entries_used array to allow for the accessing
2538 the largest element.
2539
2540 2003-06-17 Alan Modra <amodra@bigpond.net.au>
2541
2542 * elf64-ppc.c (struct ppc_link_hash_table): Remove top_index. Modify
2543 input_list.
2544 (ppc64_elf_link_hash_table_create): Init input_list here.
2545 (ppc64_elf_setup_section_lists): Remove code setting up input lists
2546 per output section. Set toc_off for abs and other standard sections.
2547 (ppc64_elf_reinit_toc): Don't set elf_gp on input bfds lacking a toc.
2548 (ppc64_elf_next_input_section): Adjust for single input section list.
2549 Don't set toc_curr from input bfds that haven't set elf_gp.
2550 (group_sections): Adjust for single input section list.
2551
2552 * elf64-ppc.c (ppc64_elf_relocate_section): Correct pcrel section zero.
2553
2554 2003-06-16 Alan Modra <amodra@bigpond.net.au>
2555
2556 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing toctprel
2557 tls, check that a TOC16_DS or TOC16_LO_DS reloc isn't pointing to a
2558 dtprel entry. Ensure TLS_LD DTPMOD reloc has a zero addend. Write
2559 got section for RELATIVE relocs. Fix wrong comment. Change condition
2560 under which dynamic relocs update the section contents.
2561
2562 2003-06-13 Robert Millan <zeratul2@wanadoo.es>
2563
2564 * config.bfd: Add i386-netbsd-gnu target.
2565
2566 2003-06-12 Nick Clifton <nickc@redhat.com>
2567
2568 * opncls.c (calc_crc32): Rename to
2569 bfd_calc_gnu_debuglink_crc32 and export.
2570 (GNU_DEBUGLINK): Define and use to replace occurrences of
2571 hard-coded ".gnu_debuglink" in the code.
2572 (get_debug_link_info): Prevent aborts by replacing call to
2573 xmalloc with a call to malloc.
2574 (find_separate_debug_file): Prevent aborts by replacing calls
2575 to xmalloc and xstrdup with calls to malloc and strdup.
2576 (bfd_add_gnu_debuglink): New function. Add a .gnu_debuglink
2577 section to a bfd.
2578 * bfd-in2.h: Regenerate.
2579
2580 2003-06-12 Federico G. Schwindt <fgsch@lodoss.net>
2581
2582 * config.bfd (i[3-7]86-*-openbsd[0-2].* | i[3-7]86-*-openbsd3.[0-3]):
2583 New target (was i[3-7]86-*-openbsd* before).
2584 (i[3-7]86-*-openbsd*): Change to use bfd_elf32_i386_vec.
2585 (vax-*-openbsd*): New target.
2586
2587 2003-06-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2588
2589 * elfxx-mips.c (MIPS_ELF_OPTIONS_SECTION_NAME): Use .MIPS.options
2590 for n32, too.
2591 (MIPS_ELF_STUB_SECTION_NAME): Use .MIPS.stubs for n32, too.
2592 (mips_elf_rel_dyn_section): Use appropriate section alignment.
2593 (mips_elf_create_got_section): Likewise.
2594 (_bfd_mips_elf_create_dynamic_sections): Likewise.
2595
2596 2003-06-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2597
2598 * elf32-mips.c (mips_elf_generic_reloc): New Function.
2599 (elf_mips_howto_table_rel): Use it.
2600 (gprel32_with_gp): Move prototype.
2601 (mips_elf_hi16_reloc): Check for ! BSF_LOCAL instead of zero addend.
2602 Use mips_elf_generic_reloc.
2603 (mips_elf_got16_reloc): Check for ! BSF_LOCAL instead of zero addend.
2604 Code cleanup.
2605 (_bfd_mips_elf32_gprel16_reloc): Check for ! BSF_LOCAL instead of
2606 zero addend.
2607 (mips_elf_gprel32_reloc): Likewise. Use the same GP assignment logic
2608 as in the other *_gprel*_reloc functions.
2609 (gprel32_with_gp): Handle partial_inplace properly.
2610 (mips32_64bit_reloc): Use mips_elf_generic_reloc.
2611 (mips16_gprel_reloc): Check for ! BSF_LOCAL instead of zero addend.
2612 Do addend handling directly instead of calling
2613 _bfd_mips_elf_gprel16_with_gp. Handle partial_inplace properly.
2614 * elf64-mips.c (mips_elf64_hi16_reloc): Check for ! BSF_LOCAL instead
2615 of zero addend. Handle partial_inplace properly.
2616 (mips_elf64_got16_reloc): Check for ! BSF_LOCAL instead of zero
2617 addend.
2618 (mips_elf64_gprel16_reloc): Likewise.
2619 (mips_elf64_literal_reloc): Likewise.
2620 (mips_elf64_gprel32_reloc): Likewise. Use the same GP assignment
2621 logic as in the other *_gprel*_reloc functions. Handle
2622 partial_inplace properly.
2623 (mips_elf64_shift6_reloc): Check for ! BSF_LOCAL instead of zero
2624 addend. Handle partial_inplace properly.
2625 (mips16_gprel_reloc): Likewise. Do addend handling directly instead
2626 of calling _bfd_mips_elf_gprel16_with_gp.
2627 * elfn32-mips.c (mips_elf_got16_reloc): Check for BSF_LOCAL.
2628 (mips_elf_gprel32_reloc): Check for ! BSF_LOCAL instead
2629 of zero addend.
2630 (mips_elf_shift6_reloc): Handle partial_inplace properly.
2631 (mips16_gprel_reloc): Likewise. Do addend handling directly instead
2632 of calling _bfd_mips_elf_gprel16_with_gp.
2633 * elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp): Handle
2634 partial_inplace properly. Fix wrong addend handling. Fix overflow
2635 check.
2636 (_bfd_mips_elf_sign_extend): Renamed from mips_elf_sign_extend and
2637 exported.
2638 (mips_elf_calculate_relocation): Use _bfd_mips_elf_sign_extend.
2639 (_bfd_mips_elf_relocate_section): Likewise.
2640 (mips_elf_create_dynamic_relocation): Update sec_info_type access.
2641 * elfxx-mips.h (_bfd_mips_relax_section): Fix prototype declaration.
2642 (_bfd_mips_elf_sign_extend): New prototype.
2643
2644 2003-06-11 Federico G. Schwindt <fgsch@lodoss.net>
2645
2646 * config.bfd (sparc-*-openbsd[0-2].* | sparc-*-openbsd3.[0-1]):
2647 New target (was sparc-*-openbsd* before).
2648 (sparc-*-openbsd*): Change to use bfd_elf32_sparc_vec.
2649
2650 * configure.in (vax-*-openbsd*): Set COREFILE to netbsd-core.lo.
2651 * configure: Regenerate.
2652
2653 2003-06-11 H.J. Lu <hongjiu.lu@intel.com>
2654
2655 * po/Make-in (DESTDIR): New.
2656 (install-data-yes): Support $(DESTDIR).
2657 (uninstall): Likewise.
2658
2659 2003-06-11 Alan Modra <amodra@bigpond.net.au>
2660
2661 * Makefile.am (config.status): Depend on version.h.
2662 Run "make dep-am".
2663 * Makefile.in: Regenerate.
2664 * po/SRC-POTFILES.in: Regenerate.
2665
2666 2003-06-10 Alan Modra <amodra@bigpond.net.au>
2667 Gary Hade <garyhade@us.ibm.com>
2668
2669 * elf64-ppc.c (ppc64_elf_relocate_section <*_DS>): Special case lq.
2670
2671 2003-06-10 Richard Sandiford <rsandifo@redhat.com>
2672
2673 * archures.c (bfd_mach_h8300sxn): New architecture.
2674 * bfd-in2.h: Regenerate.
2675 * cpu-h8300.c (h8300_scan): Check for 'sxn'.
2676 (h8300sxn_info_struct): New.
2677 (h8300sx_info_struct): Link to it.
2678 * elf32-h8300.c (elf32_h8_mach): Add h8300sxn case.
2679 (elf32_h8_final_write_processing): Likewise.
2680
2681 2003-06-08 Alan Modra <amodra@bigpond.net.au>
2682
2683 * elf64-ppc.c: Move TARGET_LITTLE_SYM and other macros used by
2684 elfxx-target.h so that we can use elf_backend_got_header_size.
2685 (ELF_MACHINE_ALT1, ELF_MACHINE_ALT2): Delete.
2686 (GLINK_CALL_STUB_SIZE): Modify. Define new glink call stub and
2687 associated macros.
2688 (ppc64_elf_howto_raw <GOT_TPREL16_DS, GOT_TPREL16_LO_DS>): Correct
2689 dst_mask.
2690 (enum ppc_stub_type): Add ppc_stub_long_branch_r2off and
2691 ppc_stub_plt_branch_r2off.
2692 (struct ppc_stub_hash_entry): Reorganize.
2693 (struct ppc_link_hash_table): Add no_multi_toc, multi_toc_needed,
2694 toc_curr, toc_off and emit_stub_syms.
2695 (ppc64_elf_link_hash_table_create): Init them.
2696 (ppc_stub_name): Correct string size.
2697 (ppc64_elf_check_relocs): Set has_gp_reloc on GOT and TOC relocs.
2698 (ppc64_elf_size_dynamic_sections): Set no_multi_toc if GOT entries
2699 used.
2700 (ppc_type_of_stub): Tweak root.type test.
2701 (build_plt_stub): Remove glink code. Adjust for insn macro changes.
2702 (ppc_size_one_stub): Handle ppc_stub_long_branch_r2off and
2703 ppc_stub_plt_branch_r2off.
2704 (ppc_build_one_stub): Likewise. Fix var shadowing. Correct addis,addi
2705 range test. Use toc_off to calculte r2 values. Handle emit_stub_syms.
2706 (ppc64_elf_setup_section_lists): Remove htab creator flavour test.
2707 Initialize elf_gp and toc_curr.
2708 (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): New functions.
2709 (ppc64_elf_next_input_section): Set toc_off.
2710 (group_sections): Ensure groups have the same TOC.
2711 (ppc64_elf_size_stubs): Check whether we need a TOC adjusting stub.
2712 (ppc64_elf_build_stubs): Add emit_stub_syms param, and stash in htab.
2713 Build new glink stub.
2714 (ppc64_elf_relocate_section): Handle multiple TOCs. Fix comments.
2715 (ppc64_elf_finish_dynamic_sections): Adjust DT_PPC64_GLINK.
2716 * elf64-ppc.h (ppc64_elf_build_stubs): Update prototype.
2717 (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): Declare.
2718 * section.c (struct sec): Rename flag12 to has_gp_reloc.
2719 (STD_SECTION): Update.
2720 * ecoff.c (bfd_debug_section): Update comment.
2721 * bfd-in2.h: Regenerate.
2722
2723 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
2724
2725 * elfcode.h (elf_slurp_reloc_table_from_section): Don't dereference
2726 NULL function pointers.
2727
2728 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
2729
2730 * simple.c (bfd_simple_get_relocated_section_contents): Call
2731 _bfd_generic_link_add_symbols instead of bfd_link_add_symbols.
2732
2733 2003-06-04 Svein E. Seldal <Svein.Seldal@solidas.com>
2734
2735 * coff-tic54x.c: Removed the ticoff0_bad_format_hook() and
2736 ticoff1_bad_format_hook() functions. Removed the coff0 and coff1
2737 swaptables.
2738 * coff-tic4x.c: Ditto
2739 * coffcode.h: Added extra arguments to CREATE_BIG_COFF_TARGET_VEC
2740 and CREATE_LITTLE_COFF_TARGET_VEC. Created the macro
2741 CREATE_BIGHDR_COFF_TARGET_VEC. Created the ticoff0_bad_format_hook(),
2742 ticoff1_bad_format_hook() functions. Created the coff0 and coff1
2743 swap tables.
2744 * coff-tic4x.c: Adopted new CREATE_xxx_COFF_TARGET_VEC macros.
2745 * coff-a29k.c: Append COFF_SWAP_TABLE argument
2746 * coff-apollo.c: Ditto
2747 * coff-arm.c: Ditto
2748 * coff-h8300.c: Ditto
2749 * coff-h8500.c: Ditto
2750 * coff-i960.c: Ditto
2751 * coff-m68k.c: Ditto
2752 * coff-m88k.c: Ditto
2753 * coff-mcore.c: Ditto
2754 * coff-sh.c: Ditto
2755 * coff-sparc.c: Ditto
2756 * coff-tic80.c: Ditto
2757 * coff-we32k.c: Ditto
2758 * coff-z8k.c: Ditto
2759 * coff-w65.c: Ditto
2760
2761 2003-06-04 Svein E. Seldal <Svein.Seldal@solidas.com>
2762
2763 * coff-tic4x.c (ticoff0_swap_table, ticoff1_swap_table): Fixed
2764 initialization bug
2765
2766 2003-06-03 Jakub Jelinek <jakub@redhat.com>
2767
2768 * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_STACK.
2769 (bfd_section_from_phdr): Likewise.
2770 (map_sections_to_segments): Create PT_GNU_STACK segment header.
2771 (get_program_header_size): Count with PT_GNU_STACK.
2772 * elf-bfd.h (struct elf_obj_tdata): Add stack_flags.
2773 * elflink.h (bfd_elfNN_size_dynamic_sections): Set stack_flags.
2774
2775 2003-06-03 H.J. Lu <hongjiu.lu@intel.com>
2776
2777 * elflink.h (elf_link_input_bfd): Call linker error_handler
2778 for discarded definitions.
2779
2780 2003-06-03 Elias Athanasopoulos <elathan@phys.uoa.gr>
2781
2782 * syms.c (decode_section_type): Return 'n' if section flags are
2783 SEC_HAS_CONTENTS && SEC_READONLY.
2784
2785 2003-06-03 Nick Clifton <nickc@redhat.com>
2786
2787 * elf32-v850.c (v850_elf_howto_t): Rename R_V850_32to
2788 R_V850_ABS32. Add entry for R_V850_REL32.
2789 (v850_elf_reloc_map): Likewise.
2790 (v850_elf_check_relocs): Likewise.
2791 (v850_elf_perform_relocation): Likewise.
2792 (v850_elf_final_link_relocate): Likewise. Include computation
2793 to make R_V850_REl32 pc-relative.
2794
2795 2003-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2796
2797 * elf32-sh.c (sh_elf_size_dynamic_sections): Create .interp section
2798 and DT_DEBUG dynamic tag even for position independent executables.
2799 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewize.
2800
2801 2003-06-02 Daniel Jacobowitz <drow@mvista.com>
2802
2803 * config.bfd: Move obsolete entries out of the range of the
2804 targmatch sed script.
2805
2806 2003-06-02 Daniel Jacobowitz <drow@mvista.com>
2807
2808 * config.bfd (mips*-dec-bsd*, mips*-*-pe*): Mark as obsolete.
2809
2810 2003-05-31 Jakub Jelinek <jakub@redhat.com>
2811
2812 * elf32-ppc.c (allocate_dynrelocs): Use single slot for first 8192
2813 plt entries, not just 8191.
2814
2815 2003-05-30 Daniel Jacobowitz <drow@mvista.com>
2816
2817 * elfxx-mips.c (_bfd_mips_elf_discard_info): Correct loop index.
2818 Reported by Ken Faiczak <kfaiczak@SANDVINE.com>.
2819
2820 2003-05-30 Ulrich Drepper <drepper@redhat.com>
2821 Jakub Jelinek <jakub@redhat.com>
2822
2823 * elflink.h (elf_link_add_object_symbols): Use !info->executable
2824 instead of info->shared where appropriate.
2825 (bfd_elfNN_size_dynamic_sections, elf_link_output_extsym): Likewise.
2826 * elflink.c (_bfd_elf_create_got_section): Likewise.
2827 (_bfd_elf_link_create_dynamic_sections): Likewise.
2828 (_bfd_elf_link_assign_sym_version): Likewise.
2829 * elf32-i386.c (elf_i386_size_dynamic_sections): Create .interp section
2830 and DT_DEBUG dynamic tag even for position independent executables.
2831 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
2832 * elf32-s390.c (elf_s390_size_dynamic_sections: Likewise.
2833 * elf64-ppc.c (ppc64_elf_size_dynamic_sections: Likewise.
2834 * elf64-s390.c (elf_s390_size_dynamic_sections: Likewise.
2835 * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections: Likewise.
2836 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections: Likewise.
2837 * elf32-sparc.c (elf32_sparc_size_dynamic_sections: Likewise.
2838 * elf64-alpha.c (elf64_alpha_size_dynamic_sections: Likewise.
2839 * elf64-sparc.c (sparc64_elf_size_dynamic_sections: Likewise.
2840
2841 2003-05-30 Kris Warkentin <kewarken@qnx.com>
2842
2843 * elf.c (elfcore_grok_nto_status): Only set lwpid for the active or
2844 signalled thread.
2845 (elfcore_grok_nto_gregs): Only make .reg section for the active thread.
2846
2847 2003-05-29 Nick Clifton <nickc@redhat.com>
2848
2849 * pef.c: Include "safe-ctype.h" instead of <ctype.h>.
2850 Tidy up formatting.
2851 * Makefile.am: Add dependency on safe-ctype.h.
2852 * Makefile.in: Regenerate.
2853
2854 2003-05-29 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2855
2856 * elfxx-mips.c: Don't force symbols local unconditionally.
2857
2858 2003-05-28 Alan Modra <amodra@bigpond.net.au>
2859
2860 * elf32-hppa.c (elf32_hppa_relocate_section): Delete bogus
2861 undefined_symbol call.
2862
2863 2003-05-27 Richard Sandiford <rsandifo@redhat.com>
2864
2865 * elfxx-mips.c (mips_elf_hash_sort_data): Fix formattting.
2866 (mips_elf_link_hash_table): Likewise.
2867
2868 2003-05-22 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2869
2870 * elf64-mips.c (elf_mips_gnu_rel16_s2): Add internally used
2871 R_MIPS_GNU_REL16_S2 support.
2872 (bfd_elf64_bfd_reloc_type_lookup): Use it.
2873 (mips_elf64_rtype_to_howto): Use it.
2874 * elfn32-mips.c (elf_mips_gnu_rel16_s2): Add internally used
2875 R_MIPS_GNU_REL16_S2 support.
2876 (bfd_elf32_bfd_reloc_type_lookup): Use it.
2877 (mips_elf_n32_rtype_to_howto): Use it.
2878
2879 2003-05-21 Stuart F. Downing <sdowning@fame.com>
2880
2881 * som.h: Define PA_2_0 before including a.out.h
2882
2883 2003-05-07 Eric Christopher <echristo@redhat.com>
2884 Alexandre Oliva <aoliva@redhat.com>
2885
2886 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Adjust
2887 pic tests, change to warning.
2888 (_bfd_mips_elf_final_link): Remove EF_MIPS_CPIC flag setting.
2889
2890 2003-05-21 Marcus Comstedt <marcus@mc.pp.se>
2891
2892 * config.bfd: Check for a target triplet of shl-...-netbsdelf as
2893 well as shle-...-netbsdelf. Remove duplicate entry.
2894
2895 2003-05-21 Nick Clifton <nickc@redhat.com>
2896
2897 * elf32-xstormy16.c (xstormy16_elf_howto_table): Fix dst_mask
2898 for X_STORMY16_REL_12 reloc.
2899
2900 * elf.c (bfd_elf_get_needed_list): Use is_elf_hash_table to check
2901 the type of the hash table in the bfd_link_info structure.
2902 (bfd_elf_get_runpath_list): Likewise.
2903
2904 2003-05-19 Roland McGrath <roland@redhat.com>
2905
2906 * elf.c (bfd_elf_bfd_from_remote_memory): New function.
2907 * bfd-in.h: Declare it.
2908 * bfd-in2.h: Regenerated.
2909 * elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): New function.
2910 * elf-bfd.h (struct elf_backend_data): New function pointer member
2911 elf_backend_bfd_from_remote_memory.
2912 (_bfd_elf32_bfd_from_remote_memory, _bfd_elf64_bfd_from_remote_memory):
2913 Declare them.
2914 * elfxx-target.h (elf_backend_bfd_from_remote_memory): New macro.
2915 (elfNN_bed): Add that to the initializer.
2916
2917 2003-05-15 Roland McGrath <roland@redhat.com>
2918
2919 * elf.c (elfcore_grok_note): Grok NT_AUXV note, make ".auxv" section.
2920
2921 2003-05-20 Jakub Jelinek <jakub@redhat.com>
2922
2923 * elflink.h (elf_link_output_extsym): Only issue error about !=
2924 STV_DEFAULT symbols if they are bfd_link_hash_undefined.
2925
2926 2003-05-20 H.J. Lu <hongjiu.lu@intel.com>
2927
2928 * elflink.c (_bfd_elf_merge_symbol): Check ELF_LINK_DYNAMIC_DEF
2929 when removing the old definition for symbols with non-default
2930 visibility.
2931
2932 2003-05-18 Jason Eckhardt <jle@rice.edu>
2933
2934 * elf32-i860.c (elf32_i860_relocate_highadj): Simplify calculation.
2935
2936 2003-05-17 Andreas Schwab <schwab@suse.de>
2937
2938 * elf32-m68k.c (elf_m68k_check_relocs): Cache reloc section in
2939 elf_section_data during processing of pc-relative and absolute
2940 relocations.
2941 (elf_m68k_relocate_section): Use the cached reloc section instead
2942 of computing it again. Fix handling of visibility. Don't modify
2943 addend when copying over a relocation into the output.
2944
2945 2003-05-17 Alan Modra <amodra@bigpond.net.au>
2946
2947 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
2948 to trim plt entries. Move undefweak non-default visibility test..
2949 (allocate_dynrelocs): ..from here.
2950 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't test
2951 dynamic_sections_created here. Update comment. Move undefweak
2952 non-default visibility test..
2953 (allocate_dynrelocs): ..from here. Fix comment.
2954 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
2955 to trim plt entries. Move undefweak non-default visibility test..
2956 (allocate_dynrelocs): ..from here. Fix comment.
2957 * elflink.h (elf_link_output_extsym): Compare ELF_ST_VISIBILITY with
2958 STV_DEFAULT rather than comparing with zero.
2959 * elflink.c (_bfd_elf_merge_symbol): Likewise.
2960 (_bfd_elf_fix_symbol_flags): Likewise. Format comment.
2961
2962 2003-05-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2963
2964 * bfd.c (_bfd_get_gp_value): Prevent illegal access for abfd null
2965 pointers.
2966 (_bfd_set_gp_value): Likewise.
2967
2968 2003-05-16 Michael Snyder <msnyder@redhat.com>
2969 From Bernd Schmidt <bernds@redhat.com>
2970 * archures.c (bfd_mach_h8300sx): New.
2971 * bfd-in2.h: Regenerate.
2972 * cpu-h8300.c (h8300_scan)): Add support for h8300sx.
2973 (h8300sx_info_struct): New.
2974 (h8300s_info_struct): Link to it.
2975 * elf32-h8300.c (elf32_h8_mach): Add support for h8300sx.
2976 (elf32_h8_final_write_processing): Likewise.
2977 (elf32_h8_relax_section): Likewise.
2978
2979 2003-05-16 Kelley Cook <kelleycook@wideopenwest.com>
2980
2981 * config.bfd: Accept i[3-7]86 variants.
2982 * configure.host: Likewise.
2983 * configure.in: Likewise.
2984 * configure: Regenerate.
2985
2986 2003-05-15 H.J. Lu <hongjiu.lu@intel.com>
2987
2988 * elflink.c (_bfd_elf_fix_symbol_flags): Also hide protected
2989 symbol.
2990
2991 2003-05-15 H.J. Lu <hongjiu.lu@intel.com>
2992
2993 * elflink.h (elf_link_check_versioned_symbol): Also allow
2994 the base version.
2995
2996 2003-05-15 Alan Modra <amodra@bigpond.net.au>
2997 H.J. Lu <hongjiu.lu@intel.com>
2998
2999 * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL.
3000 (elf_i386_relocate_section): Likewise.
3001 * elf32-ppc.c (allocate_dynrelocs): Likewise.
3002 (ppc_elf_relocate_section): Likewise.
3003 * elf64-ppc.c (allocate_dynrelocs): Likewise.
3004 (ppc64_elf_relocate_section): Likewise.
3005
3006 2003-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3007
3008 * elf32-mips.c (gprel32_with_gp): Remove useless N64 ABI case.
3009
3010 2003-05-13 Stephane Carrez <stcarrez@nerim.fr>
3011
3012 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Check for
3013 processor capability, allow merge of HC12 and HCS12 in some cases.
3014 (m68hc11_elf_hash_table_create): Use bfd_malloc instead of bfd_zalloc.
3015 * cpu-m68hc12.c (bfd_m68hc12s_arch): New struct.
3016 (bfd_m68hc12_arch): Link it.
3017 (scan_mach): New function.
3018
3019 2003-05-13 Andrew Haley <aph@redhat.com>
3020
3021 * elf.c (bfd_elf_hash): Mask lower 32 bits of hash.
3022
3023 2003-05-13 Alan Modra <amodra@bigpond.net.au>
3024 H.J. Lu <hongjiu.lu@intel.com>
3025
3026 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Move from
3027 elf32-ppc.c. Add ELF_LINK_FORCED_LOCAL check.
3028 * elf32-ppc.c: (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Delete.
3029 (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for dynreloc check.
3030 (ppc_elf_relocate_section): Likewise.
3031 * elf64-ppc.c (allocate_dynrelocs): Likewise.
3032 (ppc64_elf_relocate_section): Likewise. Use for .got relocs too.
3033 (ppc64_elf_adjust_dynamic_symbol): Don't assume symbols with .plt
3034 relocs need no other types.
3035 * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for
3036 dynreloc check.
3037 (elf_i386_relocate_section): Likewise. Use for .got relocs too.
3038 (elf_i386_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL for
3039 .got relocs.
3040
3041 2003-05-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3042
3043 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): For weak symbols,
3044 copy ELF_LINK_NON_GOT_REF from weakdef.
3045 (allocate_dynrelocs): For undef weak syms with non-default
3046 visibility, a) don't allocate plt entries, b) don't allocate
3047 .got relocs, c) discard dyn rel space
3048 (sh_elf_relocate_section): d) don't generate .got relocs, e)
3049 don't generate dynamic relocs.
3050 (sh_elf_copy_indirect_symbol): Don't copy ELF_LINK_NON_GOT_REF
3051 for weakdefs when symbol already adjusted.
3052
3053 2003-05-12 Nick Clifton <nickc@redhat.com>
3054
3055 * elf32-xstormy16.c (xstormy16_elf_howto_table): use 'bitfield'
3056 overflow detection for R_XSTORMY16_16 reloc.
3057
3058 2003-05-12 Paul Clarke <paulc@senet.com.au>
3059
3060 * elf32-h8300.c: Fix typo in name of R_H8_DIR8 reloc.
3061
3062 2003-05-11 Jason Eckhardt <jle@rice.edu>
3063
3064 * elf32-i860.c (elf32_i860_relocate_highadj): Properly
3065 adjust upper bits.
3066 (elf32_i860_relocate_splitn): Obtain upper 5 bits from the
3067 proper place.
3068 (elf32_i860_relocate_pc16): Obtain upper 5 bits from the
3069 proper place.
3070
3071 2003-05-11 Andreas Schwab <schwab@suse.de>
3072
3073 * elf32-m68k.c (elf_m68k_relocate_section): Replace ugly
3074 complicated tests for unresolvable relocs with a simple direct
3075 scheme using "unresolved_reloc" var. Report some detail on
3076 bfd_reloc_outofrange and similar errors.
3077
3078 2003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
3079
3080 * elf32-s390.c (allocate_dynrelocs, elf_s390_relocate_section):
3081 Fix WILL_CALL_FINISH_DYNAMIC_SYMBOL call.
3082 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
3083 * elf64-s390.c: Likewise.
3084
3085 2003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
3086
3087 * elf32-s390.c (ELIMINATE_COPY_RELOCS): Define as one.
3088 (elf_s390_adjust_dynamic_symbol): For weak symbols, copy
3089 ELF_LINK_NON_GOT_REF from weakdef.
3090 (elf_s390_copy_indirect_symbol): Test whether the weakdef sym has
3091 already been adjusted before treating it specially.
3092 * el64-s390.c: Likwise.
3093
3094 2003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
3095
3096 * elf32-s390.c (allocate_dynrelocs): For undef weak syms with
3097 non-default visibility, a) don't make them dynamic, b) discard
3098 space for dynamic relocs.
3099 (elf_s390_relocate_section): Initialize the GOT entries and skip
3100 R_390_{8,16,32}/R_390_PC{16,16DBL,32DBL,32} for weak undefined
3101 symbols with non-default visibility.
3102 * elf64-s390.c: Likewise.
3103
3104 2003-05-09 Alan Modra <amodra@bigpond.net.au>
3105
3106 * cpu-arm.c (arm_check_note): Warning fix.
3107 * elf32-iq2000.c (iq2000_elf_check_relocs): Warning fixes. Arrange
3108 to keep relocs if edited.
3109 (iq2000_elf_print_private_bfd_data): Return TRUE.
3110 * elfxx-ia64.c (elfNN_ia64_relax_section): Use ELFNN_R_SYM, not
3111 ELF64_R_SYM.
3112 (elfNN_ia64_relax_ldxmov): Warning fix.
3113 * xtensa-isa.c (xtensa_add_isa): Warning fix.
3114 * xtensa-modules.c (get_num_opcodes): Warning fix.
3115
3116 2003-05-09 Andrey Petrov <petrov@netbsd.org>
3117
3118 * elf.c (elf_fake_sections): Use correct cast for sh_name.
3119
3120 2003-05-09 Alan Modra <amodra@bigpond.net.au>
3121
3122 * elflink.c (_bfd_elf_link_create_dynamic_sections): Move from
3123 elflink.h. Replace LOG_FILE_ALIGN with bed->s->log_file_align.
3124 (_bfd_elf_create_dynamic_sections): Use bed->s->log_file_align.
3125 (bfd_elf_record_link_assignment): Move from elflink.h.
3126 (_bfd_elf_merge_symbol): Likewise.
3127 (_bfd_elf_add_default_symbol): Likewise.
3128 (_bfd_elf_export_symbol): Likewise.
3129 (_bfd_elf_link_find_version_dependencies): Likewise.
3130 (_bfd_elf_link_assign_sym_version): Likewise.
3131 (_bfd_elf_link_read_relocs): Likewise.
3132 (_bfd_elf_link_size_reloc_section): Likewise.
3133 (_bfd_elf_fix_symbol_flags): Likewise.
3134 (_bfd_elf_adjust_dynamic_symbol): Likewise.
3135 (_bfd_elf_link_sec_merge_syms): Likewise.
3136 (elf_link_read_relocs_from_section): Likewise. Use bed->s->sizeof_rel
3137 and bed->s->sizeof_rela.
3138 (_bfd_elf_link_output_relocs): Likewise.
3139 * elf-bfd.h (struct elf_size_info): Rename file_align to
3140 log_file_align.
3141 (struct elf_info_failed): Move from elflink.h.
3142 (struct elf_assign_sym_version_info): Likewise.
3143 (struct elf_find_verdep_info): Likewise.
3144 (_bfd_elf_create_dynamic_sections): Delete duplicate declaration.
3145 (_bfd_elf_merge_symbol, _bfd_elf_add_default_symbol,
3146 _bfd_elf_export_symbol, _bfd_elf_link_find_version_dependencies,
3147 _bfd_elf_link_assign_sym_version,
3148 _bfd_elf_link_create_dynamic_sections, _bfd_elf_link_read_relocs,
3149 _bfd_elf_link_size_reloc_section, _bfd_elf_link_output_relocs,
3150 _bfd_elf_fix_symbol_flags, _bfd_elf_adjust_dynamic_symbol,
3151 _bfd_elf_link_sec_merge_syms): Declare.
3152 (bfd_elf32_link_create_dynamic_sections): Don't declare.
3153 (_bfd_elf32_link_read_relocs): Likewise.
3154 (bfd_elf64_link_create_dynamic_sections): Likewise.
3155 (_bfd_elf64_link_read_relocs): Likewise.
3156 * elflink.h: Move lots o' stuff elsewhere.
3157 * bfd-in.h (bfd_elf32_record_link_assignment): Don't declare.
3158 (bfd_elf64_record_link_assignment): Likewise.
3159 (bfd_elf_record_link_assignment): Declare.
3160 * bfd-in2.h: Regenerate.
3161 * elfcode.h (elf_link_create_dynamic_sections): Don't declare.
3162 (NAME(_bfd_elf,size_info)): Adjust for log_file_align.
3163 * elf.c (_bfd_elf_init_reloc_shdr): Adjust for bed->s->log_file_align.
3164 (assign_file_positions_for_segments): Likewise.
3165 (assign_file_positions_except_relocs): Likewise.
3166 (swap_out_syms, elfcore_write_note): Likewise.
3167 * elf-m10200.c: Adjust for changed function names.
3168 * elf-m10300.c: Likewise.
3169 * elf32-arm.h: Likewise.
3170 * elf32-h8300.c: Likewise.
3171 * elf32-hppa.c: Likewise.
3172 * elf32-ip2k.c: Likewise.
3173 * elf32-m32r.c: Likewise.
3174 * elf32-m68hc11.c: Likewise.
3175 * elf32-m68hc1x.c: Likewise.
3176 * elf32-m68k.c: Likewise.
3177 * elf32-mips.c: Likewise.
3178 * elf32-ppc.c: Likewise.
3179 * elf32-sh.c: Likewise.
3180 * elf32-v850.c: Likewise.
3181 * elf32-xtensa.c: Likewise.
3182 * elf64-alpha.c: Likewise.
3183 * elf64-hppa.c: Likewise.
3184 * elf64-mmix.c: Likewise.
3185 * elf64-ppc.c: Likewise.
3186 * elf64-sh64.c: Likewise.
3187 * elfxx-ia64.c: Likewise.
3188 * elfxx-mips.c: Likewise.
3189 (MIPS_ELF_LOG_FILE_ALIGN): Use log_file_align.
3190 * elf64-alpha.c (alpha_elf_size_info): Adjust for log_file_align.
3191 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
3192 * elf64-mips.c (mips_elf64_size_info): Likewise.
3193 * elf64-s390.c (s390_elf64_size_info): Likewise.
3194 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
3195
3196 2003-05-08 H.J. Lu <hongjiu.lu@intel.com>
3197
3198 * elflink.h (elf_add_default_symbol): After skipping the
3199 unversioned symbol, go to non-default one.
3200
3201 2003-05-07 H.J. Lu <hongjiu.lu@intel.com>
3202
3203 * elfxx-ia64.c (_bfd_elf_link_hash_hide_symbol): Also clear the
3204 want_plt field.
3205 (elfNN_ia64_relocate_section): Don't do dynamic symbol lookup
3206 for symbols with non-default visibility.
3207
3208 2003-05-07 H.J. Lu <hongjiu.lu@intel.com>
3209
3210 * elflink.h (elf_link_check_versioned_symbol): Also handle the
3211 case that a DSO references a hidden symbol which may be
3212 satisfied by a versioned symbol in another DSO.
3213 (elf_link_output_extsym): Check versioned definition for hidden
3214 symbol referenced by a DSO.
3215
3216 2003-05-07 Nick Clifton <nickc@redhat.com>
3217
3218 * elf32-xstormy16.c (xstormy16_elf_howto_table): Reset
3219 R_XSTORMY16_16 reloc to ignore overflows.
3220
3221 2003-05-06 Alexandre Oliva <aoliva@redhat.com>
3222
3223 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Improve
3224 error message for mixing different-endian files. Check for ABI
3225 compatibility of input files with the selected emulation.
3226
3227 2003-05-05 Alan Modra <amodra@bigpond.net.au>
3228
3229 * elf32-i386.c (allocate_dynrelocs): For undef weak syms with
3230 non-default visibility, a) don't make them dynamic, b) discard
3231 space for dynamic relocs.
3232 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
3233
3234 * elf32-ppc.c (allocate_dynrelocs): For undef weak syms with
3235 non-default visibility, a) don't allocate plt entries, b) don't
3236 allocate .got relocs, c) discard dyn rel space,
3237 (ppc_elf_relocate_section): d) don't generate .got relocs, e)
3238 don't generate dynamic relocs.
3239 * elf64-ppc.c (allocate_dynrelocs): As above.
3240 (ppc64_elf_relocate_section): As above.
3241
3242 2003-05-05 Andreas Jaeger <aj@suse.de>
3243
3244 * elf64-x86-64.c (allocate_dynrelocs): Don't allocate dynamic
3245 relocation entries for weak undefined symbols with non-default
3246 visibility.
3247 (elf64_x86_64_relocate_section): Initialize the GOT entries and
3248 skip R_386_32/R_386_PC32 for weak undefined symbols with
3249 non-default visibility.
3250
3251 2003-05-04 H.J. Lu <hjl@gnu.org>
3252
3253 * elf32-i386.c (allocate_dynrelocs): Don't allocate dynamic
3254 relocation entries for weak undefined symbols with non-default
3255 visibility.
3256 (elf_i386_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 * elfxx-ia64.c (allocate_fptr): Don't allocate function
3261 descriptors for weak undefined symbols with non-default
3262 visibility.
3263 (allocate_dynrel_entries): Don't allocate relocation entries
3264 for symbols resolved to 0.
3265 (set_got_entry): Don't install dynamic relocation for weak
3266 undefined symbols with non-default visibility.
3267 (set_pltoff_entry): Likewise.
3268
3269 * elflink.h (elf_fix_symbol_flags): Hide weak undefined symbols
3270 with non-default visibility.
3271 (elf_link_output_extsym): Don't make weak undefined symbols
3272 with non-default visibility dynamic.
3273
3274 2003-05-04 H.J. Lu <hjl@gnu.org>
3275
3276 * elflink.h (elf_merge_symbol): Correctly handle weak definition.
3277
3278 2003-05-04 H.J. Lu <hjl@gnu.org>
3279
3280 * elflink.h (elf_merge_symbol): Don't record a hidden/internal
3281 symbol dynamic. Check indirection when removing the old
3282 definition for symbols with non-default visibility.
3283 (elf_add_default_symbol): Skip when told by elf_merge_symbol.
3284
3285 2003-05-02 Nick Clifton <nickc@redhat.com>
3286
3287 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make the
3288 R_XSTORMY16_8 and R_XSTORMY16_16 relocs detect and complain about
3289 unsigned overflow.
3290
3291 2003-05-02 Andreas Jaeger <aj@suse.de>
3292
3293 * elf64-x86-64.c (elf_x86_64_copy_indirect_symbol): Don't copy
3294 ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
3295 (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
3296 (elf_x86_64_adjust_dynamic_symbol): For weak symbols, copy
3297 ELF_LINK_NON_GOT_REF from weakdef.
3298
3299 2003-05-02 Charles Lepple <clepple@ghz.cc>
3300 Nick Clifton <nickc@redhat.com>
3301
3302 * acinclude.m4: Fix name of --enable-install-libbfd switch.
3303 * aclocal.m4: Regenerate.
3304 * configure: Regenerate.
3305 * Makefile.in: Regenerate.
3306
3307 2003-05-01 Alan Modra <amodra@bigpond.net.au>
3308
3309 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Test whether the
3310 weakdef sym has already been adjusted before treating it specially.
3311 * elf32-i386.c (elf_i386_copy_indirect_symbol): Don't copy
3312 ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
3313 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
3314 (ppc64_elf_check_relocs): Set ELF_LINK_NON_GOT_REF.
3315
3316 2003-04-28 H.J. Lu <hjl@gnu.org>
3317
3318 * elfxx-ia64.c (elfNN_ia64_relax_section): Relax ldxmov during
3319 the relax finalize pass.
3320
3321 * section.c (struct sec): Add need_finalize_relax and remove
3322 flag11.
3323 (STD_SECTION): Update struct sec initializer.
3324 * bfd-in2.h: Regenerated.
3325
3326 2003-04-28 H.J. Lu <hjl@gnu.org>
3327
3328 * elflink.h (elf_merge_symbol): Call elf_backend_copy_indirect_symbol
3329 to copy any information related to dynamic linking when we flip
3330 the indirection.
3331
3332 2003-04-27 H.J. Lu <hjl@gnu.org>
3333
3334 * elf-bfd.h (ELF_LINK_DYNAMIC_DEF): New.
3335 (ELF_LINK_DYNAMIC_WEAK): New.
3336
3337 * elflink.h (elf_merge_symbol): Add one argument to indicate if
3338 a symbol should be skipped. Ignore definitions in dynamic
3339 objects for symbols with non-default visibility.
3340 (elf_add_default_symbol): Adjusted.
3341 (elf_link_add_object_symbols): Check if a symbol should be
3342 skipped. Don't merge the visibility field with the one from
3343 a dynamic object.
3344 (elf_link_check_versioned_symbol): Use undef_bfd.
3345 (elf_link_output_extsym): Warn if a forced local symbol is
3346 referenced from dynamic objects. Make non-weak undefined symbol
3347 with non-default visibility a fatal error.
3348
3349 2003-04-27 Daniel Jacobowitz <drow@mvista.com>
3350
3351 * configure.in: Bump version on HEAD to 2.14.90.
3352 * configure: Regenerated.
3353
3354 2003-04-26 Stephane Carrez <stcarrez@nerim.fr>
3355
3356 PR savannah/3331:
3357 * elf32-m68hc11.c (m68hc11_elf_relax_section): Clear prev_insn_group
3358 when we couldn't relax something.
3359
3360 2003-04-25 Alan Modra <amodra@bigpond.net.au>
3361
3362 * elflink.h (elf_merge_symbol): When we find a regular definition
3363 for an indirect symbol, flip the indirection so that the old
3364 direct symbol now points to the new definition.
3365
3366 2003-04-24 Roland McGrath <roland@redhat.com>
3367
3368 * elf.c (bfd_section_from_phdr): Map PT_GNU_EH_FRAME to "eh_frame_hdr".
3369
3370 2003-04-24 Alan Modra <amodra@bigpond.net.au>
3371
3372 * elf32-ppc.c: Formatting and comment fixes.
3373 (ELIMINATE_COPY_RELOCS): Move before ppc_elf_copy_indirect_symbol.
3374 (ppc_elf_copy_indirect_symbol): Copy flags here for weakdefs.
3375
3376 2003-04-24 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
3377
3378 * archures.c (bfd_mach_h8300hn, bfd_mach_h8300sn): Added.
3379 * bfd-in2.h: Rebuilt.
3380 * coff-h8300.c (BADMAG): Add check for H8300HNBADMAG & H8300SNBADMAG.
3381 * coffcode.h (coff_set_arch_mach_hook): Add case for H8300HNMAGIC
3382 & H8300SNMAGIC.
3383 (coff_set_flags): Add case for bfd_mach_h8300hn & bfd_mach_h8300sn.
3384 * cpu-h8300.c (h8300_scan): Handle h8300hn, h8300sn.
3385 (h8300sn_info_struct, h8300hn_info_struct): New.
3386 * elf32-h8300.c (elf32_h8_mach): Handle case for h8300hn & h8300sn
3387 (elf32_h8_final_write_processing): Likewise.
3388
3389 2003-04-23 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3390
3391 * elf32-sh.c (tpoff): New.
3392 (struct elf_sh_dyn_relocs): Remove tls_tpoff32.
3393 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
3394 (allocate_dynrelocs): Don't make unnecessary dynamic TLS
3395 relocations. Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses.
3396 (sh_elf_relocate_section): Likewise. Remove unnecessary tests.
3397 (dtpoff_base): Fix wrong indentation.
3398 (sh_elf_check_relocs): Don't set DF_STATIC_TLS flag with non-TLS
3399 relocations. Don't set tls_tpoff32 flag. Don't make unnecessary
3400 R_SH_TLS_TPOFF32 relocations.
3401
3402 2003-04-23 J"orn Rennecke <joern.rennecke@superh.com>
3403
3404 * archures.c (enum bfd_architecture): Amend comment to refer to SuperH.
3405 * cpu-sh.c: Likewise.
3406 * elf32-sh.c: Likewise.
3407 * reloc.c (bfd_reloc_code_real): Likewise.
3408 * elf32-sh64-com.c: Change comment to refer to SuperH.
3409 * elf32-sh64.c: Likewise.
3410 * elf64-sh64.c: Likewise.
3411 * bfd-in2.h (enum bfd_architecture): Regenerate.
3412
3413 2003-04-23 Alan Modra <amodra@bigpond.net.au>
3414
3415 From Julien LEMOINE <speedblue@debian.org>
3416 * elf32-i386.c (elf_i386_info_to_howto): Delete.
3417 (elf_info_to_howto): Define as elf_i386_info_to_howto_rel.
3418
3419 2003-04-22 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
3420
3421 * archures.c: Replace references to Mitsubishi M32R with references
3422 to Renesas M32R.
3423 * relocs.c: Likewise.
3424 * bfd-in2.h: Regenerate.
3425
3426 2003-04-21 Richard Henderson <rth@redhat.com>
3427
3428 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Return false for an
3429 executable when a symbol is defined both regular and dynamic.
3430
3431 2003-04-21 Stephane Carrez <stcarrez@nerim.fr>
3432
3433 * Makefile.am (BFD32_BACKENDS): Add elf32-m68hc1x.lo.
3434 (elf32-m68hc1x.lo): Update dependencies
3435 * configure.in: Add elf32-m68hc1x.lo.
3436 * configure: Rebuild.
3437 * Makefile.in: Rebuild.
3438
3439 2003-04-21 Stephane Carrez <stcarrez@nerim.fr>
3440
3441 * elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
3442 (m68hc11_elf_hash_table_create): New function.
3443 (elf32_m68hc11_link_hash_table_free): New function.
3444 (stub_hash_newfunc): New function.
3445 (m68hc11_add_stub): New function.
3446 (elf32_m68hc11_add_symbol_hook): New function.
3447 (elf32_m68hc11_setup_section_lists): New function.
3448 (elf32_m68hc11_next_input_section): New function.
3449 (elf32_m68hc11_size_stubs): New function.
3450 (elf32_m68hc11_build_stubs): New function.
3451 (m68hc11_get_relocation_value): New function.
3452 (elf32_m68hc11_relocate_section): Call the above to redirect
3453 some relocations to the trampoline code.
3454 (m68hc11_elf_export_one_stub): New function.
3455 (m68hc11_elf_set_symbol): New function.
3456 (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse.
3457 (m68hc11_elf_get_bank_parameters): Get parameters only when the info
3458 is not yet initialized.
3459
3460 * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
3461 (elf32_m68hc11_stub_hash_entry): New struct.
3462 (m68hc11_page_info): Add trampoline handler address.
3463 (m68hc11_elf_link_hash_table): Add stubs generation members.
3464 (elf32_m68hc11_add_symbol_hook): Declare.
3465 (elf32_m68hc11_setup_section_lists): Declare.
3466 (elf32_m68hc11_size_stubs): Declare.
3467 (elf32_m68hc11_build_stubs): Declare.
3468
3469 * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c.
3470 (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise.
3471 (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto.
3472 (_bfd_m68hc11_elf_set_private_flags): Ditto.
3473 (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto.
3474 (_bfd_m68hc11_elf_print_private_bfd_data): Ditto.
3475 (bfd_elf32_bfd_link_hash_table_create): Define.
3476 (elf_backend_add_symbol_hook): Define.
3477 (m68hc11_elf_bfd_link_hash_table_create): New function.
3478 (m68hc11_elf_build_one_stub): New function.
3479 (m68hc11_elf_size_one_stub): New function.
3480 (m68hc11_elf_bfd_link_hash_table_create): Install the above.
3481 (bfd_elf32_bfd_link_hash_table_create): Define.
3482
3483 * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove.
3484 (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked.
3485 (m68hc12_phys_addr): Ditto.
3486 (m68hc12_phys_page): Ditto.
3487 (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c.
3488 (elf32_m68hc11_gc_mark_hook): Likewise.
3489 (elf32_m68hc11_gc_sweep_hook): Likewise.
3490 (elf32_m68hc11_check_relocs): Likewise.
3491 (elf32_m68hc11_relocate_section): Likewise.
3492 (_bfd_m68hc12_elf_set_private_flags): Likewise.
3493 (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise.
3494 (_bfd_m68hc12_elf_print_private_bfd_data): Likewise.
3495 (m68hc12_elf_build_one_stub): New function.
3496 (m68hc12_elf_size_one_stub): New function.
3497 (m68hc12_elf_bfd_link_hash_table_create): New function, use the above.
3498 (elf_backend_add_symbol_hook): Define.
3499 (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
3500
3501 2003-04-18 Nick Clifton <nickc@redhat.com>
3502
3503 * format.c (bfd_check_format_matches): Only check associated
3504 vector if the matching_vector has been created.
3505
3506 2003-04-15 Alexandre Oliva <aoliva@redhat.com>
3507
3508 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Fix typo in
3509 2003-04-09's change.
3510
3511 2003-04-15 Brian Ford <ford@vss.fsi.com>
3512
3513 * peicode.h (coff_swap_scnhdr_in): If a section holds
3514 uninitialized data and is from an object file or from an
3515 executable image that has not initialized the s_size field, or if
3516 the physical size is padded, use the virtual size (stored in
3517 s_paddr) instead.
3518
3519 2003-04-15 H.J. Lu <hjl@gnu.org>
3520
3521 * elflink.h (elf_link_add_object_symbols): Properly report
3522 filename for alignment reduction.
3523
3524 2003-04-15 Rohit Kumar Srivastava <rohits@kpitcummins.com>
3525
3526 * archures.c: Replace occurrances of 'Hitachi' with 'Renesas'.
3527 * reloc.c: Likewise.
3528 * coff-h8300.c: Likewise.
3529 * coff-h8500.c: Likewise.
3530 * coff-sh.c: Likewise.
3531 * cpu-h8300.c: Likewise.
3532 * cpu-sh.c: Likewise.
3533 * elf32-h8300.c: Likewise.
3534 * elf32-sh.c: Likewise.
3535 * elf32-sh64-com.c: Likewise.
3536 * elf32-sh64.c: Likewise.
3537 * elf64-sh64.c: Likewise.
3538 * bfd-in2.h: Regenerate.
3539
3540 2003-04-14 H.J. Lu <hjl@gnu.org>
3541
3542 * elflink.h (elf_link_add_object_symbols): Maintain maximum
3543 alignment for common symbols. Warn reducing alignment for
3544 common symbols. Report old filename when symbol size changes.
3545
3546 2003-04-12 Alexandre Oliva <aoliva@redhat.com>
3547
3548 * elfxx-mips.c (mips_elf_calculate_relocation): Adjust two other
3549 occurrences of the same test changed in the previous patch.
3550 Optimize.
3551
3552 2003-04-11 Alexandre Oliva <aoliva@redhat.com>
3553
3554 * elfxx-mips.c (mips_elf_get_global_gotsym_index): New.
3555 (mips_elf_calculate_relocation): Decay GOT_PAGE/GOT_OFST to
3556 GOT_DISP/addend only if the symbol got a global GOT entry.
3557
3558 2003-04-10 Alexandre Oliva <aoliva@redhat.com>
3559
3560 * elfxx-mips.c (mips_elf_calculate_relocation): Decay
3561 GOT_PAGE/GOT_OFST referencing overridable symbol to
3562 GOT_DISP/addend.
3563 (_bfd_mips_elf_check_relocs): Handle GOT_PAGE referencing
3564 global symbol as GOT_DISP.
3565
3566 2003-04-10 Bob Wilson <bob.wilson@acm.org>
3567
3568 * elf32-xtensa.c (elf_xtensa_relocate_section): Don't continue to the
3569 next relocation on an undefined symbol.
3570
3571 2003-04-09 Richard Henderson <rth@redhat.com>
3572
3573 * elf64-alpha.c (elf64_alpha_relocate_section) <R_ALPHA_GPREL32>:
3574 Ignore relocations against r_symndx == 0.
3575
3576 2003-04-09 H.J. Lu <hjl@gnu.org>
3577
3578 * elf64-alpha.c (elf64_alpha_relocate_section): Don't return
3579 FALSE for undefined symbols.
3580 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
3581
3582 2003-04-09 Alexandre Oliva <aoliva@redhat.com>
3583
3584 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Try DWARF3-standard
3585 and IRIX-specific shift-to-64-bit 4-byte lengths before following
3586 addr_size.
3587
3588 2003-04-08 Alexandre Oliva <aoliva@redhat.com>
3589
3590 * elf32-mips.c (bfd_elf32_bfd_reloc_type_lookup): Detect (ctor)
3591 pointer size from ABI, not arch_bits_per_address.
3592
3593 2003-04-07 Kevin Buettner <kevinb@redhat.com>
3594
3595 * elfn32-mips.c (elf32_mips_grok_prstatus): Adjust core file related
3596 constants for n32 ABI.
3597
3598 2003-04-06 Andrew Cagney <cagney@redhat.com>
3599
3600 * simple.c (bfd_simple_get_relocated_section_contents): Disable
3601 free that leads to GDB vs BFD memory corruption.
3602
3603 2003-04-04 Stephane Carrez <stcarrez@nerim.fr>
3604
3605 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Also adjust
3606 symbols that mark the end of the section.
3607 (m68hc11_elf_relax_section): Use R_M68HC11_PCREL_8 relocs when
3608 converting to a relative branch so that the offset is computed after
3609 the relaxation; also relocate a jsr into a bsr if possible but don't
3610 relax them if they are to a far symbol as we need to call the
3611 trampoline code.
3612 (elf_m68hc11_howto_table): Set pcrel_offset to true.
3613
3614 2003-04-04 Svein E. Seldal <Svein.Seldal@solidas.com>
3615
3616 * archures.c: Namespace cleanup. Rename bfd_mach_c3x to
3617 bfd_mach_tic3x and bfd_mach_c4x to bfd_mach_tic4x
3618 * bfd-in2.h: Regenerate
3619 * coff-tic4x.c: Namespace cleanup. Replace s/c4x/tic4x/
3620 * cpu-tic4x.c: Ditto
3621
3622 2003-04-03 Nick Clifton <nickc@redhat.com>
3623
3624 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Compute ps and ss
3625 differently for object files and executables.
3626 * peicode.h (coff_swap_scnhdr_in): Only set the s_size field
3627 for object files or for executables who have not already
3628 initialised the field.
3629 * libpei.h (bfd_pe_executable_p): New macro. Return true if
3630 the PE format bfd is an executable.
3631
3632 2003-04-03 Alan Modra <amodra@bigpond.net.au>
3633
3634 * elf32-ppc.c (ppc_elf_check_relocs): Don't use SYMBOL_REFERENCES_LOCAL
3635 here as it's too early to reliably determine locality.
3636 (ppc_elf_gc_sweep_hook): Likewise.
3637 (SYMBOL_REFERENCES_LOCAL): Expand comment.
3638
3639 2003-04-02 Bob Wilson <bob.wilson@acm.org>
3640
3641 * xtensa-modules.c: Remove comment indicating that this is a
3642 generated file.
3643
3644 2003-04-02 Alan Modra <amodra@bigpond.net.au>
3645
3646 * elfxx-mips.c (_bfd_mips_elf_hide_symbol): Test for NULL dynobj.
3647
3648 2003-04-01 Bob Wilson <bob.wilson@acm.org>
3649
3650 * Makefile.am (ALL_MACHINES): Add cpu-xtensa.lo.
3651 (ALL_MACHINES_CFILES): Add cpu-xtensa.c.
3652 (BFD32_BACKENDS): Add elf32-xtensa.lo, xtensa-isa.lo, and
3653 xtensa-modules.lo.
3654 (BFD32_BACKENDS_CFILES): Add elf32-xtensa.c, xtensa-isa.c, and
3655 xtensa-modules.c.
3656 (cpu-xtensa.lo): New target.
3657 (elf32-xtensa.lo): Likewise.
3658 (xtensa-isa.lo): Likewise.
3659 (xtensa-modules.lo): Likewise.
3660 * Makefile.in: Regenerate.
3661 * archures.c (bfd_architecture): Add bfd_{arch,mach}_xtensa.
3662 (bfd_archures_list): Add bfd_xtensa_arch.
3663 * config.bfd: Handle xtensa-*-*.
3664 * configure.in: Handle bfd_elf32_xtensa_{le,be}_vec.
3665 * configure: Regenerate.
3666 * reloc.c: Add BFD_RELOC_XTENSA_{RTLD,GLOB_DAT,JMP_SLOT,RELATIVE,
3667 PLT,OP0,OP1,OP2,ASM_EXPAND,ASM_SIMPLIFY}.
3668 * targets.c (bfd_elf32_xtensa_be_vec): Declare.
3669 (bfd_elf32_xtensa_le_vec): Likewise.
3670 (bfd_target_vector): Add bfd_elf32_xtensa_{be,le}_vec.
3671 * cpu-xtensa.c: New file.
3672 * elf32-xtensa.c: Likewise.
3673 * xtensa-isa.c: Likewise.
3674 * xtensa-modules.c: Likewise.
3675 * libbfd.h: Regenerate.
3676 * bfd-in2.h: Likewise.
3677
3678 2003-04-01 Nick Clifton <nickc@redhat.com>
3679
3680 * archures.c (bfd_mach_arm_unknown): Define.
3681 * bfd-in.h (bfd_arm_merge_machines, bfd_arm+update_notes,
3682 bfd_arm_get_mach_from_notes): Prototype.
3683 * bfd-in2.h: Regenerate.
3684 * coff-arm.c (coff_arm_merge_private_bfd_data): Call
3685 bfd_arm_merge_machines.
3686 (coff_arm_final_link_postscript): Call bfd_arm_update_notes.
3687 * coffcode.h (coff_set_arch_mach_hook): Call
3688 bfd_arm_get_mach_from_notes.
3689 * coffgen.c (coff_real_object_p): Revert previous delta.
3690 * cpu_arm.c (arm_check_note): New function. Examine a note in a
3691 .note section.
3692 (bfd_arm_merge_machines): New function: Handle the merging of ARM
3693 binaries compiled for different architectures..
3694 (bfd_arm_update_notes): New function: Update an ARM note section.
3695 (bfd_arm_get_mach_from_notes): New function: Extract a bfd machine
3696 number from an ARM note section.
3697 * elf32-arm.h (elf32_arm_object_p): Use
3698 bfd_arm_get_mach_from_notes.
3699 (elf32_arm_merge_private_bfd_data): Use bfd_arm_merge_machines.
3700 (elf32_arm_final_write_processing): Use bfd_arm_update_notes.
3701
3702 2003-04-01 Ben Elliston <bje@wasabisystems.com>
3703
3704 * dwarf2.c (read_attribute_value): Correct typo in comment.
3705
3706 2003-04-01 Nick Clifton <nickc@redhat.com>
3707
3708 * dwarf2.c (concat_filename): Use bfd_malloc() and strdup()
3709 instead of concat().
3710 (decode_line_info): Only free filename if it is not NULL.
3711 (add_line_info): Make a copy of the filename when storing it into
3712 the info structure.
3713
3714 2003-03-31 Andreas Schwab <schwab@suse.de>
3715 Daniel Jacobowitz <drow@mvista.com>
3716
3717 * simple.c (bfd_simple_get_relocated_section_contents): Add
3718 parameter symbol_table. Optionally use it instead of the symbol
3719 table from the bfd. Save and restore output offsets and output
3720 sections around bfd_get_relocated_section_contents. Fix a memory
3721 leak.
3722 (simple_save_output_info, simple_restore_output_info): New
3723 functions.
3724 * bfd-in2.h: Regenerate.
3725 * dwarf2.c (read_abbrevs): Use
3726 bfd_simple_get_relocated_section_contents instead of
3727 bfd_get_section_contents.
3728 (decode_line_info): Likewise.
3729 (_bfd_dwarf2_find_nearest_line): Likewise. Don't call
3730 find_rela_addend.
3731 (find_rela_addend): Remove.
3732 * elfxx-ia64.c (elfNN_ia64_reloc): Weaken sanity check for
3733 debugging sections.
3734 (elfNN_ia64_hash_table_create): Create the hash table with malloc,
3735 not bfd_zalloc.
3736
3737 2003-03-31 David Heine <dlheine@suif.stanford.edu>
3738
3739 * aoutx.h (aout_link_hash_table_create): Use bfd_malloc instead of
3740 bfd_alloc.
3741 * dwarf2.c (concat_filename): Always allocate space for the
3742 returned filename.
3743 (decode_line_info): Free the allocated filename returned by
3744 concat_filename.
3745 * elf-eh-frame.c (bfd_elf_write_section_eh_frame): Fix memory leaks.
3746 * elf.c (copy_private_bfd_data): Likewise.
3747 (_bfd_elf_slurp_version_tables): Fix bug freeing contents pointer.
3748 * elflink.h (elf_link_sort_relocs): Fix memory leak.
3749 * format.c (bfd_check_format_matches): Likewise.
3750 * linker.c (bfd_generic_final_link): Likewise.
3751 * opncls.c (find_separate_debug_info): Likewise.
3752 * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
3753
3754 2003-03-28 H.J. Lu <hjl@gnu.org>
3755
3756 * elflink.h (elf_link_add_object_symbols): Correctly combine
3757 visibilities.
3758
3759 2003-03-27 Jakub Jelinek <jakub@redhat.com>
3760
3761 * elfxx-ia64.c (elfNN_ia64_relax_section): Reset self_dtpmod_offset
3762 to -1 before recomputing got offsets.
3763
3764 2003-03-26 Andreas Schwab <schwab@suse.de>
3765
3766 * elf32-m68k.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
3767 (elf_m68k_relocate_section): Use it to correctly handle symbols
3768 forced to be local.
3769 (elf_m68k_finish_dynamic_symbol): Emit RELATIVE reloc for got
3770 entries for symbols that are forced to be local.
3771
3772 2003-03-25 Alexandre Oliva <aoliva@redhat.com>
3773
3774 * elfxx-mips.c (_bfd_mips_relax_section): New function.
3775 * elfxx-mips.h (_bfd_mips_relax_section): Declare.
3776 * elfn32-mips.c, elf64-mips.c: Use it.
3777
3778 2003-03-25 Stan Cox <scox@redhat.com>
3779 Nick Clifton <nickc@redhat.com>
3780
3781 Contribute support for Intel's iWMMXt chip - an ARM variant:
3782
3783 * archures.c: Add bfd_mach_arm_iWMMXt.
3784 * reloc.c: Add BFD_RELOC_ARM_CP_OFF_IMM_S2.
3785 * bfd-in2.h: Regenerate.
3786 * libbfd.h: Regenerate.
3787 * coff-arm.c (coff_arm_merge_private_bfd_data): Allow iWMMXt
3788 object files to be linked with XScale ones.
3789 (coff_arm_final_link_postscript): Update note section.
3790 * coffcode.h (coff_set_arch_mach_hook): Handle note section.
3791 * coffgen.c (coff_real_object_p): Call bfd_coff_set_arch_mach_hook
3792 after identifying a coff binary.
3793 * cpu-arm.c (processors): Add iWMMXt.
3794 (arch_inf): Likewise.
3795 * elf32-arm.h (arm_object_p): Handle note section.
3796 (elf32_arm_merge_private_bfd_data): Allow iWMMXt object files to
3797 be linked with XScale ones.
3798 (elf32_arm_section_flags): New function: Set flags on note section.
3799 (elf32_arm_final_write_processing): Handle note section.
3800
3801 2003-03-21 DJ Delorie <dj@redhat.com>
3802
3803 * elf32-xstormy16.c (elf32_xstormy16_relocate_section): Call
3804 _bfd_elf_rela_local_sym.
3805
3806 2003-03-20 H.J. Lu <hjl@gnu.org>
3807
3808 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't try relax for
3809 non-ELF outputs.
3810
3811 2003-03-20 Nick Clifton <nickc@redhat.com>
3812
3813 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Initialise $idata2 and
3814 $idata5 in case bfd_coff_final_link is not called.
3815
3816 2003-03-19 Jakub Jelinek <jakub@redhat.com>
3817
3818 * elf64-sparc.c (struct sparc64_elf_section_data): Add reloc_count
3819 field.
3820 (canon_reloc_count): Define.
3821 (sparc64_elf_slurp_one_reloc_table, sparc64_elf_slurp_reloc_table,
3822 sparc64_elf_canonicalize_dynamic_reloc): Use it instead of
3823 reloc_count.
3824 (sparc64_elf_canonicalize_reloc): New routine.
3825 (bfd_elf64_canonicalize_reloc): Define.
3826
3827 2003-03-18 Jakub Jelinek <jakub@redhat.com>
3828
3829 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle relaxation
3830 againt mergeable sections. Take r_addend into account when caching
3831 trampolines.
3832
3833 2003-03-18 Richard Henderson <rth@redhat.com>
3834
3835 * elfxx-ia64.c (get_dyn_sym_info): Return NULL gracefully for
3836 local symbols that have no dyninfo.
3837
3838 2003-03-14 Gene Smith <gene.smith@siemens.com>
3839
3840 * ieee.c (ieee_write_expression): Handle the case where symbol is
3841 NULL.
3842 General formatting improvements.
3843
3844 2003-03-13 Nick Clifton <nickc@redhat.com>
3845
3846 * configure.in (LINGUAS): Add zh_CN.
3847 * configure: Regenerate.
3848 * po/zh_CN.po: New file.
3849
3850 2003-03-13 Elias Athanasopoulos <elathan@phys.uoa.gr>
3851
3852 * aout-cris.c (BYTES_IN_WORD): Don't define.
3853 aout-encap.c: Likewise.
3854 aout-ns32k.c: Likewise.
3855 aout-tic30.c: Likewise.
3856 hp300bsd.c: Likewise.
3857 i386aout.c: Likewise.
3858 i386dynix.c: Likewise.
3859 i386linux.c: Likewise.
3860 i386lynx.c: Likewise.
3861 i386mach3.c: Likewise.
3862 m68k4knetbsd.c: Likewise.
3863 m68klinux.c: Likewise.
3864 m68klynx.c: Likewise.
3865 m68knetbsd.c: Likewise.
3866 m88kmach3.c: Likewise.
3867 mipsbsd.c: Likewise.
3868 newsos3.c: Likewise.
3869 sparclinux.c: Likewise.
3870 sparclynx.c: Likewise.
3871 sparcnetbsd.c: Likewise.
3872 vaxbsd.c: Likewise. Fix comment formatting.
3873
3874 2003-03-12 Alexandre Oliva <aoliva@redhat.com>
3875
3876 * Reverted 2003-03-02's patch.
3877
3878 * elfxx-target.h (bfd_elfNN_canonicalize_reloc): Make it
3879 overridable.
3880 * elf64-mips.c (mips_elf64_canonicalize_reloc,
3881 mips_elf64_get_dynamic_reloc_upper_bound,
3882 mips_elf64_canonicalize_dynamic_reloc): New, adapted from elf.c.
3883 (bfd_elf64_get_canonicalize_reloc,
3884 bfd_elf64_get_dynamic_reloc_upper_bound,
3885 bfd_elf64_canonicalize_dynamic_reloc): Define.
3886 (mips_elf64_slurp_reloc_table): Support dynamic.
3887 (mips_elf64_slurp_one_reloc_table): Adjust.
3888
3889 2003-03-12 Nick Clifton <nickc@redhat.com>
3890
3891 * xsym.c (bfd_sym_fetch_type_information_table_entry): Change
3892 'index' to 'offset' in test for zero value.
3893
3894 2003-03-11 Alexandre Oliva <aoliva@redhat.com>
3895
3896 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Do not create
3897 dynamic relocations pointing to local or section symbols, use the
3898 NULL symbol instead. Document the choice to not emit an
3899 additional R_MIPS_64 relocation.
3900
3901 2003-03-11 Alan Modra <amodra@bigpond.net.au>
3902
3903 * elf32-ppc.c (ppc_elf_relocate_section): Subtract tls seg vma from
3904 zero index dynamic tls relocs generated for the GOT. Tidy code.
3905 Set "relocation" to 1 on DTPMOD32 relocs. Optimize HA adjustment.
3906 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
3907
3908 2003-03-07 Alan Modra <amodra@bigpond.net.au>
3909
3910 * elf32-ppc.c (ppc_elf_relocate_section): Don't look for a nop after
3911 a tls_get_addr call.
3912
3913 * elf32-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
3914 (ppc_elf_adjust_dynamic_symbol): For weak symbols, copy
3915 ELF_LINK_NON_GOT_REF from weakdef.
3916 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
3917 (ppc64_elf_adjust_dynamic_symbol): For weak symbols, copy
3918 ELF_LINK_NON_GOT_REF from weakdef.
3919 * elf32-i386.c (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
3920 (elf_i386_adjust_dynamic_symbol): For weak symbols, copy
3921 ELF_LINK_NON_GOT_REF from weakdef.
3922
3923 2003-03-06 Jakub Jelinek <jakub@redhat.com>
3924 Andrew Haley <aph@redhat.com>
3925
3926 * elflink.h (elf_bfd_discard_info): Don't process eh frames if
3927 output is relocateable.
3928
3929 2003-03-06 Steven Konopa <skonopa@kgo.csc.com>
3930
3931 * som.c (som_fixup_formats): Correct formats for R_AUX_UNWIND and
3932 R_COMMENT.
3933
3934 2003-03-06 Alan Modra <amodra@bigpond.net.au>
3935
3936 * elf32-ppc.c (ppc_elf_create_linker_section): Don't capitalize
3937 error messages.
3938 (ELIMINATE_COPY_RELOCS): Define to zero.
3939 (ppc_elf_relocate_section): Don't deref htab->tls_sec when calculating
3940 TLSLD relocs. Report reloc types on a number of errors. Optimize
3941 LOCAL24PC check for non-local syms. Don't capitalize error messages.
3942 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define to zero.
3943 (ppc64_elf_relocate_section): Don't deref htab->tls_sec when
3944 calculating TLSLD relocs. Report reloc types on a number of errors.
3945 Don't capitalize error messages.
3946
3947 2003-03-03 H.J. Lu <hjl@gnu.org>
3948
3949 * elfxx-ia64.c (USE_BRL): Removed.
3950 (oor_ip): Removed.
3951
3952 2003-03-03 J"orn Rennecke <joern.rennecke@superh.com>
3953
3954 * elf32-sh.c (sh_elf_howto_tab): Make R_SH_IND12W into an ordinary
3955 relocation (no special function), and make it non-partial_inplace.
3956 (sh_elf_relax_section): When creating a bsr, use a consistent value
3957 no matter if the symbol is extern or not; set addend to -4.
3958 Don't swap load / non-load instructions for SH4.
3959 (sh_elf_relax_delete_bytes): In R_SH_IND12W case, check the offset
3960 rather than if the symbol is external to determine if adjusting the
3961 offset makes sense. Adjust the addend too if appropriate.
3962 (sh_elf_relocate_section): In R_SH_IND12W, don't fiddle with the
3963 relocation.
3964
3965 2003-03-03 Nick Clifton <nickc@redhat.com>
3966
3967 * po/da.po: Installed latest translation.
3968
3969 2003-03-02 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3970
3971 * elf32-mips.c (elf_mips_howto_table_rel): Change definition of
3972 R_MIPS_PC16 to rightshift 2.
3973 (elf_reloc_map mips_reloc_map): Map to rightshifted BFD reloc.
3974 (bfd_elf32_bfd_reloc_type_lookup): Support
3975 BFD_RELOC_MIPSEMB_16_PCREL_S2.
3976 * elf64-mips.c (mips_elf64_howto_table_rel): Change definition of
3977 R_MIPS_PC16 to rightshift 2.
3978 (mips_elf64_howto_table_rela): Likewise.
3979 (mips_reloc_map): Map to rightshifted BFD reloc.
3980 * elfn32-mips.c: The same as in elf64-mips.c.
3981 * elfxx-mips.c (mips_elf_got_for_ibfd): Typo in comment.
3982 (mips_elf_calculate_relocation): Handle rightshifted addends for
3983 R_MIPS_PC16.
3984 * reloc.c (BFD_RELOC_MIPSEMB_16_PCREL_S2): New BFD relocation for
3985 MIPS Embedded PIC. Remove superfluous empty COMMENT.
3986 * libbfd.h: Regenerate.
3987 * bfd-in2.h: Regenerate.
3988
3989 2003-02-28 Richard Henderson <rth@redhat.com>
3990
3991 * elfxx-ia64.c (elfNN_ia64_relax_section): Correct bounds
3992 for ltoff22x relaxation.
3993
3994 2003-03-01 Alan Modra <amodra@bigpond.net.au>
3995
3996 * bfd-in.h (_bfd): Don't define.
3997 * bfd.c: Rename occurrences of "struct _bfd" to "struct bfd".
3998 * syms.c: Likewise.
3999 * bfd-in2.h: Regenerate.
4000
4001 2003-02-27 Richard Henderson <rth@redhat.com>
4002
4003 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add want_gotx;
4004 (elfNN_ia64_check_relocs): Set it.
4005 (allocate_global_data_got): Check it.
4006 (allocate_local_got): Likewise.
4007 (allocate_dynrel_entries): Likewise.
4008 (elfNN_ia64_relax_ldxmov): New.
4009 (elfNN_ia64_relax_section): Handle LTOFF22X, LDXMOV.
4010 (elfNN_ia64_choose_gp): Split out from ...
4011 (elfNN_ia64_final_link): ... here.
4012
4013 2003-02-27 Andrew Cagney <cagney@redhat.com>
4014
4015 * bfd.c (struct bfd): Rename "struct _bfd".
4016 * bfd-in.h: Update copyright.
4017 (struct bfd): Rename "struct _bfd".
4018 (_bfd): Define for backward compatibility.
4019 * bfd-in2.h: Regenerate.
4020
4021 2003-02-25 Alan Modra <amodra@bigpond.net.au>
4022
4023 * elflink.h (elf_bfd_final_link): Apportion reloc counts to rel_hdr
4024 and rel_hdr2 when initially counting input relocs rather than after
4025 creating output reloc sections.
4026 (elf_link_read_relocs_from_section): Don't abort with wrong reloc
4027 sizes.
4028
4029 * Makefile.am: Run "make dep-am".
4030 * Makefile.in: Regenerate.
4031
4032 2003-02-24 Kris Warkentin <kewarken@qnx.com>
4033
4034 * elf.c (elfcore_read_notes): Add check for QNX style core file.
4035 (elfcore_grog_nto_note): New function.
4036 (elfcore_grog_nto_gregs): New function.
4037 (elfcore_grog_nto_status): New function.
4038
4039 2003-02-24 Alan Modra <amodra@bigpond.net.au>
4040
4041 * elflink.c (_bfd_elf_create_got_section): Check existing .got
4042 section flags before concluding that we've already been called.
4043 Don't use register keyword.
4044 (_bfd_elf_create_dynamic_sections): Don't use register keyword.
4045 (_bfd_elf_create_linker_section): Formatting.
4046
4047 2003-02-20 jmc <jmc@prioris.mini.pw.edu.pl>
4048
4049 * coff-h8300.c: Fix typo: intial -> initial.
4050 * coff-ppc.c: Likewise.
4051
4052 2003-02-20 Alan Modra <amodra@bigpond.net.au>
4053
4054 * elf32-ppc.c: Formatting.
4055 (allocate_dynrelocs): LD and GD relocs against the same sym need
4056 separate GOT entries.
4057 (ppc_elf_relocate_section): Correct GOT handling for multiple GOT
4058 entries per symbol.
4059
4060 2003-02-19 Alan Modra <amodra@bigpond.net.au>
4061
4062 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Simplify dynamic reloc
4063 removal. Localize vars. Remove unnecessary dynobj test.
4064 * elf32-i386 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead
4065 of INFO.
4066 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
4067 and optimize.
4068 (elf_i386_relocate_section): Likewise.
4069 (elf_i386_gc_sweep_hook): Simplify dyn reloc removal. Localize vars.
4070 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
4071 * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
4072 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
4073 * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
4074 * elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise. Remove
4075 local_dynrel for section too. Don't touch HIPLT22, LOPLT10, PCPLT32
4076 or PCPLT10 relocs. Don't subtract twice on PLT32 relocs.
4077 Formatting.
4078
4079 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define.
4080 (ppc64_elf_check_relocs): Use it. Correct comment. Move SEC_ALLOC
4081 test.
4082 (ppc64_elf_adjust_dynamic_symbol): Use ELIMINATE_COPY_RELOCS.
4083 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
4084 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
4085 and optimize. Use ELIMINATE_COPY_RELOCS.
4086 (ppc64_elf_relocate_section): Likewise.
4087
4088 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Add pc_count field.
4089 (ppc_elf_copy_indirect_symbol): Copy pc_count field.
4090 (ELIMINATE_COPY_RELOCS): Define.
4091 (ppc_elf_adjust_dynamic_symbol): Convert copy relocs to dynamic.
4092 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
4093 (MUST_BE_DYN_RELOC): Define.
4094 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
4095 and optimize. Trim dyn_relocs.
4096 (ppc_elf_check_relocs): Don't generate dyn_relocs when we know they'll
4097 not be used. Do generate dyn_relocs for copy reloc avoidance. Keep
4098 track of pc_rel dyn relocs.
4099 (ppc_elf_relocate_section): Remove "will_become_local". Adjust
4100 WILL_CALL_FINISH_DYNAMIC_SYMBOL use. Trim dyn relocs as per
4101 allocate_dynrelocs. Don't recalculate "sec".
4102
4103 2003-02-18 Alan Modra <amodra@bigpond.net.au>
4104
4105 * elf32-ppc.c (ppc_elf_relocate_section): Remove unnecessary test.
4106 * elf64-ppc.c (ppc64_elf_tls_optimize): Decrement tlsld_got.refcount
4107 on invalid LD relocs.
4108 (allocate_dynrelocs): Invalid LD relocs don't use tlsld_got entry.
4109 (ppc64_elf_relocate_section): Unify new handling of LD relocs and
4110 tlsld_got entry. Use IS_PPC64_TLS_RELOC.
4111
4112 * elf32-ppc.h: New file.
4113 * elf32-ppc.c: Include elf32-ppc.h.
4114 (NOP, CROR_151515, CROR_313131, TP_OFFSET, DTP_OFFSET): Define.
4115 (struct ppc_elf_link_hash_entry): Rename "root" to "elf". Adjust uses.
4116 Add "tls_mask" field.
4117 (TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL, TLS_TLS, TLS_TPRELGD): Define.
4118 (struct ppc_elf_link_hash_table): Rename "root" to "elf". Adjust uses.
4119 Add got, relgot, plt, relplt, dynbss, relbss, dynsbss, relsbss,
4120 sdata, sdata2, tls_sec, tls_get_addr, tlsld_got fields.
4121 Make use of htab shortcuts throughout file.
4122 (ppc_elf_link_hash_newfunc): Init tls_mask field.
4123 (ppc_elf_link_hash_table_create): Init new fields.
4124 (ppc_elf_copy_indirect_symbol): Copy tls_mask.
4125 (ppc_elf_howto_raw): Add tls relocs.
4126 (ppc_elf_reloc_type_lookup): Handle them.
4127 (ppc_elf_unhandled_reloc): New function.
4128 (ppc_elf_create_got): Stash got section pointer in hash table,
4129 return status. Make .rela.got too.
4130 (ppc_elf_create_dynamic_sections): Stash section pointers in htab.
4131 (ppc_elf_adjust_dynamic_symbol): Only set up copy relocs when
4132 NON_GOT_REF set. Don't allocate space in .plt here..
4133 (allocate_dynrelocs): ..do so here instead, properly ref-counting and
4134 not allocating plt entries unnecessarily. Allocate got entries here.
4135 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
4136 (ppc_elf_size_dynamic_sections): Allocate local got entries. Pass
4137 "info" during allocate_dynrelocs hash traversal. Use htab section
4138 shortcuts rather than searching for named sections. Get rid of
4139 "plt" and "strip" booleans.
4140 (update_local_sym_info, bad_shared_reloc): New functions.
4141 (ppc_elf_check_relocs): Handle TLS relocs. Move .rela.got creation to
4142 ppc_elf_create_got. Don't mark got or plt reloc syms dynamic, do so
4143 in allocate_dynreloc. Use update_local_sym_info and bad_shared_reloc.
4144 Disallow R_PPC_EMB_RELSDA, R_PPC_EMB_NADDR32, R_PPC_EMB_NADDR16,
4145 R_PPC_EMB_NADDR16_LO, R_PPC_EMB_NADDR16_HI and R_PPC_EMB_NADDR16_HA
4146 in shared libs. R_PPC_PLTREL32 is a plt reloc too. Refcount all
4147 relocs that might use a plt entry. Set NON_GOT_REF too.
4148 Enumerate all do-nothing relocs.
4149 (ppc_elf_gc_sweep_hook): Simplify removal of dynrelocs. Handle
4150 tls relocs and all plt relocs.
4151 (ppc_elf_tls_setup, ppc_elf_tls_optimize): New functions.
4152 (ppc_elf_finish_dynamic_symbol): Don't build got entries here.
4153 (ppc_elf_finish_dynamic_sections): Rewrite tag code using htab
4154 shortcuts.
4155 (ppc_elf_relocate_section): Tidy. Handle TLS relocs. Use
4156 bfd_elf_local_sym_name. Simplify unresolved reloc code. Build got
4157 entries and got relocs here. Warn on non-zero got reloc addend.
4158 Split out branch taken/not taken reloc code into a separate switch
4159 and correct offset calculation. Allow BRTAKEN/BRNTAKEN dynamic relocs.
4160 Split out HA reloc adjustments to separate switch statement. Don't
4161 warn on reloc overflow if we've already warned about undefined.
4162 Don't rebuild sym name when reporting errors. Report all possible
4163 errors from _bfd_final_link_relocate.
4164 (bfd_elf32_bfd_final_link): Don't define.
4165
4166 2003-02-18 Alan Modra <amodra@bigpond.net.au>
4167
4168 * elf64-ppc.c (ppc64_elf_relocate_section): Don't init "r". Don't
4169 rebuild sym name when reporting errors.
4170
4171 2003-02-17 Nick Clifton <nickc@redhat.com>
4172
4173 * elflink.h (elf_link_output_extsym): Only check
4174 allow_shlib_undefined for shared libraries.
4175 * elf32-i386.c (elf_i386_relocate_section): Remove bogus check
4176 of allow_shlib_undefined.
4177 * elf32-cris.c (cris_elf_relocate_section): Likewise.
4178 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
4179 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
4180 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
4181 * elf32-s390.c (elf_s390_relocate_section): Likewise.
4182 * elf32-sh.c (sh_elf_relocate_section): Likewise.
4183 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
4184 * elf32-vax.c (elf_vax_relocate_section): Likewise.
4185 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
4186 * elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
4187 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
4188 * elf64-s390.c (elf_s390_relocate_section): Likewise.
4189 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
4190 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
4191 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
4192 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
4193
4194 2003-02-17 Nick Clifton <nickc@redhat.com>
4195
4196 * elf.c (SEGMENT_AFTER_SEGMENT): Add third parameter - the
4197 address field to use in the comparison.
4198 (SEGMENT_OVERLAPS): Check that LMAs overlap as well.
4199
4200 2003-02-14 Bob Wilson <bob.wilson@acm.org>
4201
4202 * elfcore.h (elf_core_file_p): Compare alternate machine codes for ELF
4203 backends when checking if the generic ELF target should be used.
4204
4205 * syms.c (_bfd_stab_section_find_nearest_line): For line number stabs
4206 outside of functions, treat values as absolute addresses.
4207
4208 * bfd.c: Change embedded documentation to use consistent indentation
4209 and to split up long lines. Change informal style of description
4210 for functions lacking real documentation.
4211 * coffcode.h: Break up long lines in embedded documentation.
4212 * format.c: Likewise.
4213 * targets.c: Likewise.
4214 * libcoff.h: Regenerate.
4215 * bfd-in2.h: Regenerate.
4216
4217 2003-02-14 Alan Modra <amodra@bigpond.net.au>
4218
4219 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Init tls_get_addr.
4220 (ppc64_elf_copy_indirect_symbol): Merge tls_mask too.
4221 (ppc64_elf_gc_sweep_hook): Simplify removal of dyn_relocs.
4222 (allocate_dynrelocs): Don't treat undefined and undefweak specially.
4223 (ppc_size_one_stub): Fix warning, and tighten plt entry check.
4224 (group_sections): Don't share a stub section if stubs are for a large
4225 section. Adjust comment.
4226 (ppc64_elf_size_stubs): Roughly double the size left for stubs if
4227 !stubs_always_before_branch.
4228 (ppc64_elf_relocate_section): Initialize tlsld GOT entry once. Don't
4229 treat undefined and undefweak specially when processing dyn relocs.
4230
4231 2003-02-13 Jakub Jelinek <jakub@redhat.com>
4232
4233 * elflink.h (elf_link_add_object_symbols): Handle .symver x, x@FOO.
4234
4235 2003-02-13 Nick Clifton <nickc@redhat.com>
4236
4237 * elf32-arm.h (elf32_thumb_to_arm_stub): Include section VMAs
4238 in computation of offset to insert into BL instruction.
4239
4240 2003-02-11 Uwe Stieber <uwe@wwws.de>
4241
4242 * config.bfd: Add support for kaOS as cross build target system.
4243
4244 2003-02-11 Alan Modra <amodra@bigpond.net.au>
4245
4246 * elf64-ppc.c (ppc64_elf_check_relocs): Match versioned
4247 .__tls_get_addr too.
4248 (ppc64_elf_tls_setup): Ensure cached tls_get_addr is not indirect.
4249
4250 2003-02-10 Kaz kojima <kkojima@rr.iij4u.or.jp>
4251
4252 * elf32-sh.c (elf_sh_dyn_relocs): Add tls_tpoff32 field.
4253 (elf_sh_link_hash_entry): Remove tls_tpoff32 field.
4254 (sh_elf_link_hash_newfunc): Remove the initialization of
4255 tls_tpoff32 field.
4256 (allocate_dynrelocs): Keep dyn_relocs if it includes the entry
4257 for which tls_tpoff32 flag is set.
4258 (sh_elf_relocate_section): Covert to LE only if the dyn_relocs
4259 of the symbol includes the entry matched with the input_section
4260 and having tls_tpoff32 flag on. When linking statically, set
4261 symbol index of R_SH_TLS_TPOFF32 relocation to zero if the symbol
4262 is defined in this executable.
4263 (sh_elf_check_relocs): Set tls_tpoff32 flag appropriately.
4264
4265 2003-02-10 Jakub Jelinek <jakub@redhat.com>
4266
4267 * elf32-s390.c (elf_s390_size_dynamic_sections): Set relocs to TRUE
4268 even if there is just non-empty .rela.plt.
4269
4270 2003-02-10 Nick Clifton <nickc@redhat.com>
4271
4272 * archures.c (bfd_mach_arm_ep9312): Define.
4273 * bfd-in2.h: Regenerate.
4274 * cpu-arm.c (processors[]): Add ep9312.
4275 (bfd_arm_arch): Add ep9312.
4276 * elf32-arm.h (elf32_arm_merge_private_data): Update error
4277 messages and add test for Maverick floating point support.
4278 (elf32_arm_print_private_bfd_data): Handle
4279 EF_ARM_MAVERICK_FLOAT flag.
4280 (elf32_arm_object_p): New function.
4281 (elf_backend_object_p): Define.
4282
4283 2003-02-10 Alan Modra <amodra@bigpond.net.au>
4284
4285 * elf64-ppc.c: Rename assorted occurrences of tls_type and similar
4286 variables, structure fields or function params to tls_mask or
4287 similar to better reflect usage.
4288 (struct got_entry): Comment.
4289 (struct ppc_link_hash_entry): Expand comment, and renumber TLS_*.
4290 (get_tls_mask): Rename from get_tls_type.
4291
4292 2003-02-09 Alan Modra <amodra@bigpond.net.au>
4293
4294 * elf64-ppc.c (TLS_GD_LD): Don't define..
4295 (TLS_GD): ..define this instead and update all uses.
4296 (TLS_TPRELGD): Define.
4297 (ppc64_elf_link_hash_table_create): Tweak initialization of
4298 init_refcount and init_offset.
4299 (ppc64_elf_check_relocs): Add one extra element to t_symndx array.
4300 Mark second slot of GD or LD toc entries.
4301 (get_tls_type): Return an int. Distinguish toc GD and LD entries
4302 from other tls types.
4303 (ppc64_elf_tls_setup): New function, split out from..
4304 (ppc64_elf_tls_optimize): ..here. Don't optimize when symbols are
4305 defined in a dynamic object. Fix LD optimization. Don't set TLS_TPREL
4306 on GD->IE optimization, use TLS_TPRELGD instead. Use get_tls_type
4307 return value to properly decide whether toc GD and LD entries can
4308 optimize away __tls_get_addr call. Check next reloc after DTPMOD64
4309 to determine GD or LD rather than looking at TLS_LD flag. Don't
4310 attempt to adjust got entry tls_type here..
4311 (allocate_dynrelocs): ..instead, adjust got entry tls_type here, and
4312 look for possible merges.
4313 (ppc64_elf_size_dynamic_sections): Adjust local got entries for
4314 optimization.
4315 (ppc64_elf_size_stubs): Tweak __tls_get_addr fudge.
4316 (ppc64_elf_relocate_section): Rename some vars to better reflect usage.
4317 Make use of return value from get_tls_type to properly detect GD and
4318 LD optimizations. Split tlsld/gd hi/ha from lo/ds case. Don't
4319 handle tls_get_addr removal when looking at REL24 relocs, do it when
4320 looking at the previous reloc. Check reloc after DTPMOD64 to determine
4321 GD or LD.
4322 * elf64-ppc.h (ppc64_elf_tls_setup): Declare.
4323
4324 2003-02-08 Alan Modra <amodra@bigpond.net.au>
4325
4326 * elf32-hppa.c (group_sections): Don't share a stub section if
4327 stubs are for a large section.
4328
4329 * elf32-hppa.c (elf32_hppa_size_stubs): Double the size left for
4330 stubs if !stubs_always_before_branch.
4331
4332 2003-02-07 Nick Clifton <nickc@redhat.com>
4333
4334 * elf.c (swap_out_syms): Generate an error message if an
4335 equivalent output section cannot be found for a symbol.
4336
4337 2003-02-07 Jakub Jelinek <jakub@redhat.com>
4338
4339 * elf64-alpha.c (elf64_alpha_relax_section): Don't crash if
4340 local_got_entries is NULL.
4341
4342 2003-02-06 Andreas Schwab <schwab@suse.de>
4343
4344 * elf-eh-frame.c (get_DW_EH_PE_signed): Define.
4345 (read_value): Add parameter is_signed, use signed extraction if
4346 the value is signed.
4347 (_bfd_elf_write_section_eh_frame): Pass signed flag of the
4348 encoding to read_value.
4349
4350 2003-02-06 Alan Modra <amodra@bigpond.net.au>
4351
4352 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy got and
4353 plt info when called to transfer weak sym info.
4354
4355 2003-02-05 Alan Modra <amodra@bigpond.net.au>
4356
4357 * reloc.c: Add PPC and PPC64 TLS relocs.
4358 * libbfd.h: Regenerate.
4359 * bfd-in2.h: Regenerate.
4360 * elf64-ppc.c (TP_OFFSET, DTP_OFFSET): Declare.
4361 (ppc64_elf_howto_raw): Add TLS howto's. Adjust R_PPC64_NONE to be
4362 against a 32 bit field.
4363 (ppc64_elf_reloc_type_lookup): Handle TLS relocs.
4364 (_ppc64_elf_section_data): Add t_symndx and comments.
4365 (ppc64_elf_section_data): Use elf_section_data macro.
4366 (ppc64_elf_new_section_hook): American spelling.
4367 (struct got_entry, struct plt_entry): New.
4368 (MUST_BE_DYN_RELOC): Rename from IS_ABSOLUTE_RELOC.
4369 (struct ppc_stub_hash_entry): Add "addend" field.
4370 (struct ppc_link_hash_entry): Add "tls_type".
4371 (TLS_TLS, TLS_GD_LD, TLS_LD, TLS_TPREL, TLS_DTPREL,
4372 TLS_EXPLICIT): Define.
4373 (struct ppc_link_hash_table): Add tls_sec, tls_get_addr, tlsld_got.
4374 (link_hash_newfunc): Init new fields.
4375 (ppc64_elf_link_hash_table_create): Likewise. Set init_refcount and
4376 init_offset to NULL.
4377 (ppc64_elf_copy_indirect_symbol): Copy got and plt info. Don't call
4378 _bfd_elf_link_hash_copy_indirect, rather insert relevant code from
4379 there.
4380 (update_local_sym_info, update_plt_info): New functions.
4381 (ppc64_elf_check_relocs): Use them. Handle TLS relocs. Adjust GOT
4382 handling to use got.glist rather than got.refcount. Likewise for PLT.
4383 (ppc64_elf_gc_sweep_hook): Handle TLS relocs, new GOT and PLT lists.
4384 (func_desc_adjust): Adjust for new PLT list.
4385 (ppc64_elf_adjust_dynamic_symbol): Likewise.
4386 (get_sym_h, get_tls_type): New functions.
4387 (ppc64_elf_edit_opd): Remove unused variable. Use get_sym_h.
4388 (ppc64_elf_tls_optimize): New function.
4389 (allocate_dynrelocs): Adjust for new PLT and GOT lists. Allocate
4390 TLS relocs.
4391 (ppc64_elf_size_dynamic_sections): Likewise.
4392 (ppc_type_of_stub): Adjust for new PLT list.
4393 (ppc_build_one_stub): Likewise.
4394 (ppc64_elf_size_stubs): Likewise. Use get_sym_h. Treat __tls_get_addr
4395 calls specially.
4396 (ppc64_elf_relocate_section): Adjust for new GOT and PLT lists. Handle
4397 TLS relocs. Report local syms using bfd_elf_local_sym_name. Don't
4398 init GOT entries that have a reloc. Generate GOT relocs here..
4399 (ppc64_elf_finish_dynamic_symbol): ..not here. Adjust for PLT list.
4400 * elf64-ppc.h (ppc64_elf_tls_optimize): Declare.
4401
4402 2003-02-04 Andreas Schwab <schwab@suse.de>
4403
4404 * elf32-m68k.c (elf_m68k_hash_entry): Define.
4405 (elf_m68k_link_hash_traverse): Remove.
4406 (elf_m68k_link_hash_newfunc): Use struct bfd_hash_entry and
4407 elf_m68k_hash_entry instead of struct elf_m68k_link_hash_entry to
4408 reduce casting.
4409 (elf_m68k_check_relocs): Use elf_m68k_hash_entry instead of
4410 casting.
4411 (elf_m68k_size_dynamic_sections): Use elf_link_hash_traverse
4412 instead of elf_m68k_link_hash_traverse.
4413 (elf_m68k_discard_copies): Change first parameter to pointer to
4414 struct elf_link_hash_entry and use elf_m68k_hash_entry when struct
4415 elf_m68k_link_hash_entry is needed.
4416
4417 2003-02-04 Alan Modra <amodra@bigpond.net.au>
4418
4419 * elf-bfd.h (struct got_entry, struct plt_entry): Forward declare.
4420 (struct elf_link_hash_entry): Add "glist" and "plist" fields to
4421 "got" union, and declare as gotplt_union. Use gotplt_uinion for
4422 "plt" field.
4423 (struct elf_link_hash_table): Make "init_refcount" a gotplt_union.
4424 Add "init_offset" field.
4425 (struct elf_obj_tdata <local_got>): Add "struct got_entry **" to union.
4426 (elf_local_got_ents): Declare.
4427 * elf.c (_bfd_elf_link_hash_newfunc): Adjust initialization of "got"
4428 and "plt".
4429 (_bfd_elf_link_hash_hide_symbol): Use "init_offset".
4430 (_bfd_elf_link_hash_table_init): Set "init_offset".
4431 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set init_refcount
4432 from init_offset.
4433 (elf_adjust_dynamic_symbol): Set plt and got offsets using init_offset.
4434
4435 * elf.c (bfd_elf_local_sym_name): Split out from..
4436 (group_signature): ..here.
4437 * elf-bfd.h (bfd_elf_local_sym_name): Declare.
4438
4439 2003-02-04 Alan Modra <amodra@bigpond.net.au>
4440
4441 * elf-bfd.h (enum elf_link_info_type): Remove.
4442 (struct bfd_elf_section_data): Move sec_info_type, use_rela_p fields
4443 to struct sec. Remove linkonce_p field.
4444 (elf_linkonce_p): Delete.
4445 (elf_discarded_section): Update for sec_info_type change.
4446 * section.c (struct sec): Add sec_info_type, use_rela_p, has_tls_reloc,
4447 flag11, flag12, flag13, flag14, flag15, flag16, flag20, flag24.
4448 (ELF_INFO_TYPE_NONE): Define.
4449 (ELF_INFO_TYPE_STABS): Define.
4450 (ELF_INFO_TYPE_MERGE): Define.
4451 (ELF_INFO_TYPE_EH_FRAME): Define.
4452 (ELF_INFO_TYPE_JUST_SYMS): Define.
4453 (STD_SECTION): Update struct sec initializer.
4454 * ecoff.c (bfd_debug_section): Likewise.
4455 * elf.c: Likewise. Update occurrences of sec_info_type and use_rela_p.
4456 * elflink.h: Likewise.
4457 * elf-eh-frame.c: Likewise.
4458 * elf64-alpha.c: Likewise.
4459 * elfxx-ia64.c: Likewise.
4460 * elfxx-mips.c: Likewise.
4461 * bfd-in2.h: Regenerate.
4462
4463 * elf32-sparc.c (sec_do_relax): Use elf_section_data macro rather than
4464 referring to used_by_bfd.
4465 * elf64-sparc.c (sec_do_relax): Likewise.
4466 * elf64-mmix.c (mmix_elf_section_data): Likewise.
4467 * elfxx-mips.c (mips_elf_section_data): Likewise.
4468 * ieee.c (ieee_slurp_section_data): Use ieee_per_section macro.
4469 (ieee_get_section_contents): Likewise.
4470 (ieee_new_section_hook): Formatting.
4471 (ieee_canonicalize_reloc): Remove commented out code.
4472 * mmo.c (mmo_section_data): Define. Use throughout file.
4473 * oasys.c (oasys_get_section_contents): Use oasys_per_section macro.
4474
4475 2003-01-31 Graydon Hoare <graydon@redhat.com>
4476
4477 * Makefile.am (opncls.lo): Add dependency upon libiberty.h.
4478 * Makefile.in: Regenerate.
4479 * opncls.c (calc_crc32, get_debug_link_info,
4480 seperate_debug_file_exists, find_seperate_debug_file): New
4481 internal functions.
4482 (bfd_follow_gnu_debuglink): New function. Follow the pointer
4483 contained inside a .gnu_debuglink section.
4484 * bfd-in2.h: Regenerate.
4485
4486 2003-01-29 Alexandre Oliva <aoliva@redhat.com>
4487
4488 * elfxx-mips.c (mips_elf_got_entry_hash): Don't dereference
4489 entry->abfd when it's NULL.
4490
4491 2003-01-27 Alexandre Oliva <aoliva@redhat.com>
4492
4493 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Handle
4494 _bfd_elf_section_offset returning -2 the same way as -1.
4495
4496 * elfxx-mips.c (mips_elf_multi_got): New function.
4497 (struct mips_got_entry): Make symndx and gotidx signed. Moved
4498 addend into union along with address and link hash entry.
4499 (struct mips_got_info): Added bfd2got and next.
4500 (struct mips_elf_hash_sort_data): Added max_unref_got_dynindx.
4501 (mips_elf_got_section, mips_elf_create_got_section): Use
4502 SEC_EXCLUDE bit to tell whether we really need the got
4503 section. Take boolean arguments to disregard an excluded
4504 section, or to create it as excluded. Adjust all callers.
4505 Use mips_elf_got_section all over.
4506 (mips_elf_local_got_index, mips_elf_got_page,
4507 mips_elf_got16_entry): Take input bfd as argument, and pass it
4508 on to mips_elf_create_local_got_entry.
4509 (mips_elf_global_got_index, mips_elf_create_local_got_entry):
4510 Take input bfd as argument, and manage entries in the
4511 appropriate GOT.
4512 (mips_elf_got_offset_from_index): Take input bfd as argument,
4513 and use it to adjust the GP offset of the bfd.
4514 (mips_elf_sort_hash_table, mips_elf_sort_hash_table_f): Move
4515 unreferenced GOT entries of global symbols to the end.
4516 (mips_elf_record_global_got_symbol): Take input bfd as
4517 argument. Add entries to the master GOT hash table.
4518 (struct mips_elf_bfd2got_hash): New.
4519 (struct mips_elf_got_per_bfd_arg): New.
4520 (struct mips_elf_set_global_got_offset_arg): New.
4521 (mips_elf_hash_bfd_vma, mips_elf_multi_got_entry_hash,
4522 mips_elf_multi_got_entry_eq, mips_elf_bfd2got_entry_hash,
4523 mips_elf_bfd2got_entry_eq, mips_elf_make_got_per_bfd,
4524 mips_elf_merge_gots, mips_elf_set_global_got_offset,
4525 mips_elf_resolve_final_got_entry,
4526 mips_elf_resolve_final_got_entries, mips_elf_adjust_gp,
4527 mips_elf_got_for_ibfd): New functions.
4528 (ELF_MIPS_GP_OFFSET): Don't depend on SGI_COMPAT.
4529 (MIPS_ELF_GOT_MAX_SIZE): New macro.
4530 (STUB_LW): Generate 64-bit stub regardless of SGI_COMPAT.
4531 (mips_elf_got_entry_hash): Take new fields into account. Use
4532 mips_elf_hash_bfd_vma.
4533 (mips_elf_got_entry_eq): Take new fields into account.
4534 (mips_elf_create_got_section): Initialize new fields.
4535 (mips_elf_calculate_relocation): Pass input_bfd to functions
4536 that now take it. Adjust gp for the input_bfd.
4537 (mips_elf_allocate_dynamic_relocation,
4538 mips_elf_create_dynamic_relocation,
4539 _bfd_mips_elf_create_dynamic_sections): Use...
4540 (mips_elf_rel_dyn_section): New function. Borrow code from...
4541 (_bfd_mips_elf_check_relocs): Pass input_bfd to functions that
4542 now take it. Create the got section if needed, even if
4543 excluded, before recording a global got symbol. Move some
4544 code to...
4545 (mips_elf_record_local_got_symbol): New fn.
4546 (_bfd_mips_elf_size_dynamic_sections): Disable combreloc.
4547 Compute multi-got global entries offsets. Move GOT code to...
4548 (_bfd_mips_elf_always_size_sections): Call mips_elf_multi_got
4549 if the GOT is too big.
4550 (_bfd_mips_elf_finish_dynamic_symbol): Set got entry of
4551 undefweak symbol to zero. Generate dynamic relocations for
4552 non-primary GOT entries for global symbols.
4553 (_bfd_mips_elf_finish_dynamic_sections): Handle multi-got
4554 case. Generate dynamic relocations for local got entries.
4555 Sort dynamic relocations on N64 too, using...
4556 (sort_dynamic_relocs_64): New fns.
4557 (_bfd_mips_elf_hide_symbol): Adjust multi-got counters.
4558 (_bfd_mips_elf_merge_private_bfd_data): Ignore EF_MIPS_XGOT.
4559
4560 2003-01-27 Alexandre Oliva <aoliva@redhat.com>
4561
4562 * bfd.c (struct _bfd): Added id field.
4563 * opncls.c (_bfd_id_counter): New static variable.
4564 (_bfd_new_bfd): Use it.
4565 * bfd-in2.h: Rebuilt.
4566
4567 2003-01-25 Alan Modra <amodra@bigpond.net.au>
4568
4569 * elf32-sparc.c (bfd_elf32_new_section_hook): Define.
4570
4571 2003-01-25 Jakub Jelinek <jakub@redhat.com>
4572
4573 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Add TLS relocs.
4574 (elf32_sparc_rev32_howto): New variable.
4575 (sparc_reloc_map): Add TLS relocs.
4576 (elf32_sparc_reloc_type_lookup, elf32_sparc_info_to_howto):
4577 Handle REV32.
4578 (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc, elf32_sparc_mkobject):
4579 New functions.
4580 (struct elf32_sparc_dyn_relocs, struct elf32_sparc_link_hash_entry,
4581 struct elf32_sparc_link_hash_table):
4582 New structures.
4583 (elf32_sparc_tdata, elf32_sparc_local_got_tls_type,
4584 elf32_sparc_hash_table): Define.
4585 (link_hash_newfunc, elf32_sparc_link_hash_table_create,
4586 create_got_section, elf32_sparc_create_dynamic_sections,
4587 elf32_sparc_copy_indirect_symbol, elf32_sparc_tls_transition): New
4588 functions.
4589 (elf32_sparc_check_relocs): Handle TLS relocs. Add dynamic reloc
4590 reference counting.
4591 (elf32_sparc_gc_sweep_hook): Likewise.
4592 (elf32_sparc_adjust_dynamic_symbol): Likewise.
4593 (elf32_sparc_size_dynamic_sections): Likewise.
4594 (elf32_sparc_relocate_section): Likewise.
4595 (allocate_dynrelocs, readonly_dynrelocs, dtpoff_base, tpoff):
4596 New functions.
4597 (elf32_sparc_object_p): Allocate backend private object data.
4598 (bfd_elf32_bfd_link_hash_table_create,
4599 elf_backend_copy_indirect_symbol, bfd_elf32_mkobject,
4600 elf_backend_can_refcount): Define.
4601 (elf_backend_create_dynamic_sections): Define to
4602 elf32_sparc_create_dynamic_sections.
4603 * reloc.c: Add SPARC TLS relocs.
4604 * bfd-in2.h, libbfd.h: Rebuilt.
4605 * elf64-sparc.c (sparc64_elf_howto_table): Add TLS relocs.
4606 (sparc_reloc_map): Likewise.
4607
4608 2003-01-24 Martin Schwidefsky <schwidefsky@de.ibm.com>
4609
4610 * bfd-in2.h: Regenerate.
4611 * elf32-s390.c (elf_s390_mkobject, elf_s390_tls_transition,
4612 s390_tls_reloc, dtpoff_base, tpoff, invalid_tls_insn): New functions.
4613 (elf_howto_table): Add TLS relocs.
4614 (elf_s390_reloc_type_lookup): Likewise.
4615 (elf_s390_link_hash_entry): Add tls_type.
4616 (elf_s390_hash_entry, elf_s390_obj_tdata, elf_s390_local_got_tls_type):
4617 New macros.
4618 (elf_s390_link_hash_table): Add tls_ldm_got.
4619 (link_hash_newfunc): Initialize tls_type.
4620 (elf_s390_link_hash_table_create): Initialize refcount of tls_ldm_got.
4621 (elf_s390_copy_indirect_symbol): Copy tls_type information.
4622 (elf_s390_check_relocs): Support TLS relocs.
4623 (elf_s390_gc_sweep_hook): Likewise.
4624 (allocate_dynrelocs): Likewise.
4625 (elf_s390_size_dynamic_sections): Likewise.
4626 (elf_s390_relocate_section): Likewise.
4627 (elf_s390_finish_dynamic_symbol): Likewise.
4628 (bfd_elf32_mkobject): Define for TLS.
4629 * elf64-s390.c: Same changes as for elf32-s390.c.
4630 * libbfd.h: Regenerate.
4631 * reloc.c: Add s390 TLS relocations.
4632
4633 2003-01-24 Charles Lepple <clepple@ghz.cc>
4634
4635 * aclocal.m4: Fix name of --enable-install-libbfd switch.
4636
4637 2003-01-23 Nick Clifton <nickc@redhat.com>
4638
4639 * Add sh2e support:
4640 2002-04-02 Elena Zannoni <ezannoni@redhat.com>
4641 * archures.c (bfd_mach_sh2e): Added.
4642 * bfd-in2.h: Rebuilt.
4643 * cpu-sh.c (arch_info_struct): Added SH2e.
4644 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle EF_SH2E.
4645
4646 2003-01-23 Alan Modra <amodra@bigpond.net.au>
4647
4648 * elf-bfd.h (struct bfd_elf_section_data): Remove tdata. Change
4649 dynindx to an int. Rearrange for better packing.
4650 * elf.c (_bfd_elf_new_section_hook): Don't alloc if already done.
4651 * elf32-mips.c (bfd_elf32_new_section_hook): Define.
4652 * elf32-sh64.h: New. Split out from include/elf/sh.h.
4653 (struct _sh64_elf_section_data): New struct.
4654 (sh64_elf_section_data): Don't dereference sh64_info (was tdata).
4655 * elf32-sh64-com.c: Include elf32-sh64.h.
4656 * elf32-sh64.c: Likewise.
4657 (sh64_elf_new_section_hook): New function.
4658 (bfd_elf32_new_section_hook): Define.
4659 (sh64_elf_fake_sections): Adjust for sh64_elf_section_data change.
4660 (sh64_bfd_elf_copy_private_section_data): Likewise.
4661 (sh64_elf_final_write_processing): Likewise.
4662 * elf32-sparc.c (struct elf32_sparc_section_data): New.
4663 (elf32_sparc_new_section_hook): New function.
4664 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
4665 (sec_do_relax): Define.
4666 (elf32_sparc_relax_section): Adjust to use sec_do_relax.
4667 (elf32_sparc_relocate_section): Likewise.
4668 * elf64-mips.c (bfd_elf64_new_section_hook): Define.
4669 * elf64-mmix.c (struct _mmix_elf_section_data): New.
4670 (mmix_elf_section_data): Define. Use throughout file.
4671 (mmix_elf_new_section_hook): New function.
4672 (bfd_elf64_new_section_hook): Define.
4673 * elf64-ppc.c (struct _ppc64_elf_section_data): New.
4674 (ppc64_elf_section_data): Define. Use throughout.
4675 (ppc64_elf_new_section_hook): New function.
4676 (bfd_elf64_new_section_hook): Define.
4677 * elf64-sparc.c (struct sparc64_elf_section_data): New.
4678 (sparc64_elf_new_section_hook): New function.
4679 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
4680 (sec_do_relax): Define.
4681 (sparc64_elf_relax_section): Adjust to use sec_do_relax.
4682 (sparc64_elf_relocate_section): Likewise.
4683 (bfd_elf64_new_section_hook): Define.
4684 * elfn32-mips.c (bfd_elf32_new_section_hook): Define.
4685 * elfxx-mips.c (struct _mips_elf_section_data): New.
4686 (mips_elf_section_data): Define. Use throughout.
4687 (_bfd_mips_elf_new_section_hook): New function.
4688 (mips_elf_create_got_section): Don't alloc used_by_bfd.
4689 * elfxx-mips.h (_bfd_mips_elf_new_section_hook): Declare.
4690 * elfxx-target.h (bfd_elfNN_new_section_hook): Add #ifndef.
4691 * Makefile.am: Run "make dep-am".
4692 * Makefile.in: Regenerate.
4693
4694 2003-01-21 Richard Henderson <rth@redhat.com>
4695
4696 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_PLT_LOC): New.
4697 (struct alpha_elf_link_hash_entry): Add plt_old_section, plt_old_value.
4698 (elf64_alpha_adjust_dynamic_symbol): Set them.
4699 (elf64_alpha_size_plt_section_1): Reset them when plt entry removed.
4700 (elf64_alpha_relax_tls_get_addr): Handle LDM relocs. Frob the
4701 symbol index when relaxing LDM to TPREL.
4702 (elf64_alpha_relax_section): Likewise. Allow relaxation of GD
4703 relocs, even if the target isn't locally defined.
4704 (elf64_alpha_check_relocs): Frob LDM reloc symndx to zero.
4705 (elf64_alpha_relocate_section): Likewise. Force TP-relative
4706 relocs vs symndx 0 to the tp base.
4707
4708 2003-01-21 Fabio Alemagna <falemagn@aros.org>
4709
4710 * config.bfd: Handle i[3456]86-*-aros*.
4711
4712 2003-01-21 Andreas Schwab <schwab@suse.de>
4713
4714 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Define.
4715 (struct ppc_elf_link_hash_entry): Define.
4716 (ppc_elf_hash_entry): New function.
4717 (struct ppc_elf_link_hash_table): Define.
4718 (ppc_elf_hash_table): New function.
4719 (ppc_elf_link_hash_newfunc): New function.
4720 (ppc_elf_link_hash_table_create): New function.
4721 (ppc_elf_copy_indirect_symbol): New function.
4722 (allocate_dynrelocs): New function.
4723 (readonly_dynrelocs): New function.
4724 (ppc_elf_size_dynamic_sections): Allocate space for dynamic
4725 relocs and determine DT_TEXTREL.
4726 (ppc_elf_check_relocs): Don't do that here, just count the
4727 dynamic relocs.
4728 (ppc_elf_gc_sweep_hook): Discard any dynamic relocs against the
4729 removed section.
4730 (bfd_elf32_bfd_link_hash_table_create): Define.
4731 (elf_backend_copy_indirect_symbol): Define.
4732
4733 2003-01-21 Richard Henderson <rth@redhat.com>
4734
4735 * elf64-alpha.c (alpha_dynamic_entries_for_reloc): GOTTPREL and
4736 TPREL also get a reloc if shared. Remove SREL support.
4737 (elf64_alpha_emit_dynrel): New.
4738 (elf64_alpha_relocate_section): Use it. Resolve dynamic TPREL
4739 and GOTTPREL relocs to local symbols against the tp base.
4740 (elf64_alpha_finish_dynamic_symbol): Use elf64_alpha_emit_dynrel.
4741
4742 * elf64-alpha.c (elf64_alpha_relax_got_load): Decrement got
4743 use count before clobbering r_type.
4744 (elf64_alpha_relax_tls_get_addr): Don't use pos[1] if insn
4745 ordering would mean dataflow inspection is necessary.
4746
4747 2003-01-20 Svein E. Seldal <Svein.Seldal@solidas.com>
4748
4749 * coffcode.h (coff_set_flags): Added get/set arch hooks.
4750
4751 2003-01-20 Fabio Alemagna <falemagn@aros.org>
4752
4753 * elf32-sh.c: Treat elfNN_bed like other macros defined in
4754 elfxx-target.h and #undef it before #define'ing it.
4755 * elf32-i386.c: Likewise.
4756 * elf32-sh64.c: Likewise.
4757 * elf64-alpha.c: Likewise.
4758 * elf64-sh64.c: Likewise.
4759
4760 2003-01-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
4761
4762 * bfd-in2.h: Regenerate.
4763 * elf32-s390.c (elf_s390_adjust_gotplt): New prototype.
4764 (elf_howto_table): Rename R_390_GOTOFF to R_390_GOTOFF32. Add
4765 R_390_GOTOFF16, R_390_GOTOFF64, R_390_GOTPLT12, R_390_GOTPLT16,
4766 R_390_GOTPLT32, R_390_GOTPLT64, R_390_GOTPLTENT, R_390_PLTOFF16,
4767 R_390_PLTOFF32 and R_390_PLTOFF64.
4768 (elf_s390_reloc_type_lookup): Likewise.
4769 (struct elf_s390_link_hash_entry): Add gotplt_refcount to keep track
4770 of GOTPLT references to a function.
4771 (link_hash_newfunc): Initialize gotplt_refcount.
4772 (elf_s390_check_relocs): Move allocation of local_got_refcounts array
4773 and creation of the got section out of the main switch. Add support
4774 for the gotoff, gotplt and pltoff relocations.
4775 (elf_s390_gc_sweep_hook): Add reference counting for gotoff, gotplt
4776 and pltoff.
4777 (elf_s390_adjust_gotplt): New function.
4778 (elf_s390_adjust_dynamic_symbol): Adjust gotplt refcount for removed
4779 plt entries.
4780 (allocate_dynrelocs): Add comment.
4781 (elf_s390_relocate_section): Change r_type to unsigned. Add support
4782 for gotoff, gotplt and pltoff relocations.
4783 * elf64-s390.c: Same changes as for elf32-s390.c.
4784 * libbfd.h: Regenerate.
4785 * reloc.c: Add BFD_RELOC_390_GOTOFF64, BFD_RELOC_390_GOTPLT12,
4786 BFD_RELOC_390_GOTPLT16, BFD_RELOC_390_GOTPLT32, BFD_RELOC_390_GOTPLT64,
4787 BFD_RELOC_390_GOTPLTENT, BFD_RELOC_390_PLTOFF16, BFD_RELOC_390_PLTOFF32
4788 and BFD_RELOC_390_PLTOFF64.
4789
4790 2003-01-18 Jakub Jelinek <jakub@redhat.com>
4791
4792 * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle
4793 R_IA64_TPREL64[LM]SB against non-global symbol properly.
4794
4795 2003-01-16 Jakub Jelinek <jakub@redhat.com>
4796
4797 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add
4798 self_dtpmod_done and self_dtpmod_offset.
4799 (allocate_global_data_got): Only use one got entry for all
4800 dtpmod relocs against local symbols.
4801 (allocate_dynrel_entries): Only need .rela.got entry for
4802 dtpmod against global symbol.
4803 (elfNN_ia64_size_dynamic_sections): Initialize self_dtpmod_offset.
4804 Reserve space in .rela.got for the local dtpmod entry.
4805 (set_got_entry): Initialize the common local dtpmod .got entry.
4806 (elfNN_ia64_relocate_section): Handle R_IA_64_DTPREL64LSB
4807 and R_IA_64_DTPREL64MSB.
4808
4809 2003-01-16 Alan Modra <amodra@bigpond.net.au>
4810
4811 * elf64-ppc.c: Include elf/ppc64.h rather than elf/ppc.h.
4812 (R_PPC_*): Rename all occurrences to R_PPC64_*.
4813 (R_PPC64_ADDR30): Rename all occurrences to R_PPC64_REL30.
4814 (enum elf_ppc_reloc_type): Ditto to enum elf_ppc64_reloc_type.
4815 (ppc64_elf_gc_sweep_hook): Handle R_PPC64_REL30 along with other
4816 relative relocs, not with absolute ones.
4817 * Makefile.am: Run "make dep-am".
4818 * Makefile.in: Regenerate.
4819 * po/SRC-POTFILES.in: Regenerate.
4820
4821 2003-01-15 Andreas Schwab <schwab@suse.de>
4822
4823 * elf32-ppc.c (ppc_elf_check_relocs): Don't set DF_TEXTREL for a
4824 relocation against a non-allocated readonly section.
4825
4826 2003-01-10 Alan Modra <amodra@bigpond.net.au>
4827
4828 * elf32-ppc.c (ppc_elf_relocate_section): Adjust addend for GOT16_HA.
4829 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. PLTGOT16_HA too.
4830
4831 2002-01-08 Klee Dienes <kdienes@apple.com>
4832
4833 * Makefile.am (ALL_MACHINES): Use cpu-msp430.lo, not cpu-msp430.c.
4834 (BFD32_BACKENDS): Use elf32-msp430.lo, not elf32-msp430.c.
4835 * Makefile.in: Regenerate.
4836
4837 2003-01-08 Alexandre Oliva <aoliva@redhat.com>
4838
4839 * elfn32-mips.c (prev_reloc_section): New.
4840 (GET_RELOC_ADDEND): Use it. Parenthesize macro arguments.
4841 (SET_RELOC_ADDEND): Parenthesize macro argument.
4842
4843 2003-01-07 John David Anglin <dave.anglin@nrc.gc.ca>
4844
4845 * elf32-hppa.c (final_link_relocate): For all DP relative relocations,
4846 adjust addil instructions if the symbol has no section.
4847
4848 2003-01-07 DJ Delorie <dj@redhat.com>
4849
4850 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make REL_12 not
4851 partial_inplace.
4852
4853 2003-01-07 Andreas Schwab <schwab@suse.de>
4854
4855 * elf32-m68k.c (elf_m68k_check_relocs): Don't set DF_TEXTREL for
4856 PC relative relocations.
4857 (elf_m68k_discard_copies): Set it here instead.
4858
4859 2002-01-02 Ben Elliston <bje@redhat.com>
4860 Jeff Johnston <jjohnstn@redhat.com>
4861
4862 * Makefile.am (ALL_MACHINES): Add cpu-iq2000.lo.
4863 (ALL_MACHINES_CFILES): Add cpu-iq2000.c.
4864 (BFD32_BACKENDS): Add elf32-iq2000.lo.
4865 (BFD32_BACKENDS_CFILES): Add elf32-iq2000.c.
4866 (cpu-iq2000.lo): New target.
4867 * Makefile.in: Regenerate.
4868 * config.bfd: Handle iq2000-*-elf.
4869 * archures.c (bfd_architecture): Add bfd_{arch,mach}_iq2000.
4870 (bfd_archures_list): Add bfd_iq2000_arch.
4871 * configure.in: Handle bfd_elf32_iq2000_vec.
4872 * configure: Regenerate.
4873 * reloc.c: Add BFD_RELOC_IQ2000_OFFSET_16, BFD_RELOC_IQ2000_OFFSET_21,
4874 and BFD_RELOC_IQ2000_UHI16.
4875 * targets.c (bfd_elf32_iq2000_vec): Declare.
4876 (bfd_target_vector): Add bfd_elf32_iq2000_vec.
4877 * elf.c (prep_headers): Set e_machine to EM_IQ2000.
4878 * cpu-iq2000.c: New file.
4879 * elf32-iq2000.c: Likewise.
4880 * libbfd.h: Regenerate.
4881 * bfd-in2.h: Likewise.
4882
4883 2003-01-02 Richard Sandiford <rsandifo@redhat.com>
4884
4885 * elfxx-mips.c: Include libiberty.h.
4886 (elf_mips_isa, _bfd_mips_elf_mach_extends_p): Remove.
4887 (mips_set_isa_flags): New function, split out from...
4888 (_bfd_mips_elf_final_write_processing): ...here. Only call
4889 mips_set_isa_flags if the EF_MIPS_MACH bits are clear.
4890 (mips_mach_extensions): New array.
4891 (mips_32bit_flags_p): New function.
4892 (_bfd_mips_elf_merge_private_bfd_data): Rework architecture checks.
4893 Use mips_32bit_flags_p to check if one binary is 32-bit and the
4894 other is 64-bit. When adopting IBFD's architecture, adopt the
4895 bfd_mach as well as the flags.
4896
4897 2003-01-02 Nick Kelsey <nickk@ubicom.com>
4898
4899 * elf32-ip2k.c: Re-work of linker relaxation code for the ip2k to
4900 fix internal errors, fix bad code generation, fix incorrect stabs
4901 information, and improve ability to eliminate redundant page
4902 instructions. Added code to ip2k_final_link_relocate to self-verify
4903 the linker relaxation. Fix formatting problems.
4904
4905 2002-12-30 Chris Demetriou <cgd@broadcom.com>
4906
4907 * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mipsisa32r2 case.
4908 * archures.c (bfd_mach_mipsisa32r2): New define.
4909 * bfd-in2.h: Regenerate.
4910 * cpu-mips.c (I_mipsisa32r2): New enum value.
4911 (arch_info_struct): Add entry for I_mipsisa32r2.
4912 * elfxx-mips.c (elf_mips_isa, _bfd_elf_mips_mach)
4913 (_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_32R2.
4914 (_bfd_mips_elf_final_write_processing): Add
4915 bfd_mach_mipsisa32r2 case.
4916 (_bfd_mips_elf_merge_private_bfd_data): Handle merging of
4917 binaries marked as using MIPS32 Release 2.
4918
4919 2002-12-30 Dmitry Diky <diwil@mail.ru>
4920
4921 * Makefile.am: Add msp430 target.
4922 * configure.in: Likewise.
4923 * Makefile.in: Regenerate.
4924 * configure: Regenerate.
4925 * archures.c: Add msp430 architecture vector.
4926 * config.bfd: Likewise.
4927 * reloc.c: Add msp430 relocs.
4928 * targets.c: Add msp320 target.
4929 * cpu-msp430.c: New file: msp430 cpu detection.
4930 * elf32-msp430.c: New file: msp430 reloc processing.
4931 * bfd-in2.h: Regenerate.
4932 * libbfd.h: Regenerate.
4933
4934 2002-12-28 Jakub Jelinek <jakub@redhat.com>
4935
4936 * elf.c (elf_sort_sections): Don't reorder .tbss.
4937 (assign_file_positions_for_segments): Only adjust off/voff
4938 for increased alignment in PT_LOAD or PT_NOTE segment,
4939 but adjust p_filesz for .tbss too. in PT_LOAD consider
4940 .tbss to have zero memory size.
4941 (copy_private_bfd_data) [SECTION_SIZE]: Define.
4942 [IS_CONTAINED_BY_VMA, IS_CONTAINED_BY_LMA]: Use it.
4943 [INCLUDE_SECTION_IN_SEGMENT]: Only put SHF_TLS sections
4944 into PT_TLS segment. Never put SHF_TLS sections in
4945 segments other than PT_TLS or PT_LOAD.
4946
4947 * elf64-alpha.c (elf64_alpha_finish_dynamic_sections): Clear .plt
4948 sh_entsize.
4949
4950 2002-12-23 DJ Delorie <dj@redhat.com>
4951
4952 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Fix logic reversal.
4953
4954 2002-12-23 Alan Modra <amodra@bigpond.net.au>
4955
4956 * elflink.h (elf_link_output_extsym): Heed strip_discarded.
4957
4958 2002-12-23 Nick Clifton <nickc@redhat.com>
4959
4960 * archures.c (bfd_arch_get_compatible): Add third parameter
4961 'accept_unknowns'. Only accept unknown format BFDs if
4962 accept_unknowns is true, or if the format is "binary".
4963 * bfd-in2.h: Regenerate.
4964
4965 2002-12-21 Nick Clifton <nickc@redhat.com>
4966
4967 * coff-arm.c (coff_arm_relocate_section): Disable WINCE workaround
4968 that subtracted 8 from pc relative relocations.
4969
4970 2002-12-20 Kazu Hirata <kazu@cs.umass.edu>
4971
4972 * coff-h8300.c: Fix comment typos.
4973 * coffcode.h: Likewise.
4974 * cpu-cris.c: Likewise.
4975 * elf32-vax.c: Likewise.
4976 * genlink.h: Likewise.
4977 * linker.c: Likewise.
4978 * som.c: Likewise.
4979 * tekhex.c: Likewise.
4980 * vms-misc.c: Likewise.
4981
4982 2002-12-20 DJ Delorie <dj@redhat.com>
4983
4984 * reloc.c: Add BFD_RELOC_XSTORMY16_12.
4985 * libbfd.h: Regenerate.
4986 * bfd-in2.h: Regenerate.
4987 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_12.
4988 (xstormy16_reloc_map): Add R_XSTORMY16_12.
4989
4990 2002-12-19 Kazu Hirata <kazu@cs.umass.edu>
4991
4992 * doc/bfdint.texi: Fix typos.
4993
4994 2002-12-20 Paul Eggert <eggert@twinsun.com>
4995
4996 Port to POSIX 1003.1-2001.
4997 * acinclude.m4 (AM_INSTALL_LIBBFD): Do not rely on "test -o".
4998 * configure.in (build-warnings): Likewise.
4999 (Horrible hacks to build DLLs on Windows): Do not rely on "tail -1".
5000 * aclocal.m4: Regenerate.
5001 * config.in: Regenerate.
5002 * configure: Regenerate.
5003
5004 2002-12-19 Alan Modra <amodra@bigpond.net.au>
5005
5006 * coff-h8300.c: Include libiberty.h.
5007 (h8300_reloc16_extra_cases): Check the hash table creator before
5008 referencing h8300 specific fields. Stash the hash table pointer
5009 in a local var. Comment typo fixes.
5010 (h8300_bfd_link_add_symbols): Likewise.
5011
5012 * reloc.c (struct reloc_howto_struct): Revise src_mask and
5013 dst_mask comments.
5014 * bfd-in2.h: Regenerate.
5015
5016 2002-12-18 Alan Modra <amodra@bigpond.net.au>
5017
5018 * elf32-ppc.c (ppc_elf_relocate_section): Reorganize dynamic reloc
5019 code a little. Comment on dynamic relocs against section symbols.
5020
5021 2002-12-17 Roger Sayle <roger@eyesopen.com>
5022
5023 * configure.host (ia64-*-hpux*): Support 64 bit targets using
5024 the HP compiler's "long long".
5025
5026 2002-12-16 Andrew MacLeod <amacleod@redhat.com>
5027
5028 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_LO16
5029 and R_XSTORMY16_HI16) howto entries.
5030 (xstormy16_reloc_map): Map R_XSTORMY16_{LO,HI}16 to BFD_RELOC_{LO,HI}16.
5031 (xstormy16_info_to_howto_rela): Use R_XSTORMY16_GNU_VTINHERIT to
5032 determine the start of the second reloc table.
5033
5034 2002-12-16 Nathan Tallent <eraxxon@alumni.rice.edu>
5035
5036 * ecofflink.c: Fix the reading of the debugging information
5037 of Tru64/Alpha binaries that are produced by recent Compaq
5038 compilers.
5039 (mk_fdrtab): Fix error in creating the FDR (file descriptor)
5040 table.
5041 (lookup_line): Because of the strange information sometimes
5042 generated by Compaq's recent compilers, change how the FDR
5043 table is searched so that PDRs (procedure descriptors) are
5044 correctly found. Note that this change is really more of a hack;
5045 however, I have included extensive documentation as to why
5046 this is the best solution short of an extensive rewrite or
5047 another hack.
5048 (fdrtab_lookup): Add comments to explain the algorithm.
5049
5050 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
5051
5052 * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Reorder
5053 initializers to match struct declaration.
5054
5055 2002-12-12 Alan Modra <amodra@bigpond.net.au>
5056
5057 * dwarf2.c (comp_unit_contains_address): Comment typo fix.
5058 * elf.c (get_program_header_size): Likewise.
5059 * elf32-m32r.c (m32r_elf_lo16_reloc): Likewise.
5060 (m32r_elf_generic_reloc): Likewise.
5061 * elf32-ppc.c (ppc_elf_howto_init): Likewise.
5062 * elflink.h (elf_bfd_discard_info): Likewise.
5063
5064 2002-12-12 Alan Modra <amodra@bigpond.net.au>
5065
5066 * elf32-i386.c (elf_i386_finish_dynamic_sections): Add output_offset
5067 to DT_JMPREL. Use srelplt input section size for DT_PLTRELSZ and
5068 DT_RELSZ adjustment, not output section. Avoid writing tags when
5069 unchanged. Don't assume linker script is sane, adjust DT_REL too.
5070 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Just use raw
5071 size of srelplt for DT_PLTRELSZ. Use srelplt input section size for
5072 DT_RELASZ adjustment, not output section. Avoid writing tags when
5073 unchanged. Adjust DT_RELA.
5074 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Tweaks for better
5075 formatting. Avoid writing tags when unchanged. Adjust DT_RELA.
5076
5077 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
5078
5079 * elfxx-mips.c (mips_elf_calculate_relocation): Don't divide
5080 addend by 4.
5081
5082 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
5083
5084 * elfxx-mips.c (struct mips_got_entry): New.
5085 (struct mips_got_info): Added got_entries field.
5086 (mips_elf_got_entry_hash, mips_elf_got_entry_eq): New functions.
5087 (mips_elf_local_got_index, mips_elf_got_page,
5088 mips_elf_got16_entry): Re-implement in terms of new...
5089 (mips_elf_create_local_got_entry): Rewrite to use got_entries.
5090 Change return type.
5091 (mips_elf_highest): Warning clean-up.
5092 (mips_elf_create_got_section): Initialize got_entries.
5093 (_bfd_mips_elf_check_relocs): Use got_entries to estimate
5094 local got size.
5095 (_bfd_mips_elf_size_dynamic_sections): Do not account for
5096 GOT_PAGE entries, since we now reuse GOT16 entries.
5097
5098 2002-12-10 Jason Thorpe <thorpej@wasabisystems.com>
5099
5100 * aoutx.h (set_section_contents): Allow an otherwise unrepresentable
5101 read-only section that lies after .text and before .data to be
5102 written into the output file and included in a_text.
5103 (translate_to_native_sym_flags): If an otherwise unrepresentable
5104 section was merged with .text, convert its symbols to N_TEXT
5105 symbols.
5106 * libaout.h (aout_section_merge_with_text_p): New macro.
5107
5108 2002-12-08 Alan Modra <amodra@bigpond.net.au>
5109
5110 * bfd-in.h: Comment typo fix. Formatting.
5111 * bfd-in2.h: Regenerate.
5112 * coff64-rs6000.c (xcoff64_openr_next_archived_file): Warning fix.
5113 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): Prototype.
5114 * elf64-mmix.c (mmix_dump_bpo_gregs): Warning fix.
5115
5116 2002-12-05 Richard Henderson <rth@redhat.com>
5117
5118 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21BI.
5119 Only send PCREL21B though the plt. Fix installed reloc type.
5120 (elfNN_ia64_relocate_section): Give error for dynamic reloc
5121 against PCREL22 or PCREL64I; clean up error messages for
5122 branch relocs.
5123
5124 2002-12-04 Kevin Buettner <kevinb@redhat.com>
5125
5126 * elf64-mips.c (elf64_mips_grok_prstatus, elf64_mips_grok_psinfo):
5127 New functions.
5128 (elf_backend_grok_prstatus, elf_backend_grok_psinfo): Define.
5129
5130 2002-12-04 David Mosberger <davidm@hpl.hp.com>
5131
5132 * cpu-ia64-opc.c: Add operand constant "ar.csd".
5133
5134 2002-12-04 H.J. Lu <hjl@gnu.org>
5135
5136 * elfxx-ia64.c (get_local_sym_hash): Use section ID instead of
5137 BFD address when constructing local name.
5138
5139 2002-12-04 Andreas Schwab <schwab@suse.de>
5140
5141 * elf32-m68k.c (struct elf_m68k_link_hash_table): Add sym_sec
5142 member.
5143 (elf_m68k_link_hash_table_create): Initialize it.
5144 (elf_m68k_check_relocs): Handle symbols that are forced to be
5145 local due to visibility changes.
5146 (elf_m68k_adjust_dynamic_symbol): Likewise.
5147 (elf_m68k_size_dynamic_sections): Likewise.
5148 (elf_m68k_discard_copies): Likewise.
5149 (elf_m68k_relocate_section): Likewise.
5150
5151 2002-12-04 Alan Modra <amodra@bigpond.net.au>
5152
5153 * elf64-ppc.c (ppc64_elf_edit_opd): Correct typo.
5154
5155 2002-12-04 Alan Modra <amodra@bigpond.net.au>
5156
5157 * srec.c (srec_write_symbols): Restore '$' prefix to address
5158 accidentally removed in 2002-04-04 change.
5159 (srec_get_symtab): Use 0 instead of `(long) FALSE'.
5160
5161 2002-12-03 Nick Clifton <nickc@redhat.com>
5162
5163 * elf32-ppc.c (apuinfo_list_init): New function.
5164 (apuinfo_list_add): New function: Add a value to the list.
5165 (apuinfo_list_length): New function: Return the number of
5166 values on the list.
5167 (apuinfo_list_element): New function: Return a value on the
5168 list.
5169 (apuinfo_list_finish): New function: Free the resources used
5170 by the list.
5171 (ppc_elf_begin_write_processing): New function. Scan the
5172 input bfds for apuinfo sections.
5173 (ppc_elf_write_section): New function: Delay the creation of
5174 the contents of an apuinfo section in an output bfd.
5175 (ppc_elf_final_write_processing): New function. Create the
5176 contents of an apuinfo section in an output bfd.
5177 (elf_backend_begin_write_processing): Define.
5178 (elf_backend_final_write_processing): Define.
5179 (elf_backend_write_section): Define.
5180
5181 2002-12-03 Richard Henderson <rth@redhat.com>
5182
5183 * cpu-ia64-opc.c (elf64_ia64_operands): Add ldxmov entry.
5184
5185 2002-12-01 Stephane Carrez <stcarrez@nerim.fr>
5186
5187 Fix PR savannah/1417:
5188 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Don't adjust
5189 branch if it goes to the start of the deleted region.
5190
5191 2002-12-01 Stephane Carrez <stcarrez@nerim.fr>
5192
5193 * bfd-in2.h (bfd_mach_m6812): Rebuild.
5194 * archures.c (bfd_mach_m6812_default, bfd_mach_m6812,
5195 bfd_mach_m6812s): Declare.
5196
5197 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): New function.
5198 (_bfd_m68hc12_elf_set_private_flags): Call it.
5199 (_bfd_m68hc12_elf_print_private_bfd_data): Report processor version.
5200 (_bfd_m68hc12_elf_merge_private_bfd_data): Merge the flags and
5201 report microcontroller incompatibilities (HC12 vs HCS12).
5202 (elf_backend_object_p): Update.
5203
5204 2002-11-30 Alan Modra <amodra@bigpond.net.au>
5205
5206 * bfd-in.h (TRUE_FALSE_ALREADY_DEFINED, BFD_TRUE_FALSE): Delete.
5207 (enum bfd_boolean, boolean): Delete.
5208 (bfd_boolean): Typedef to an int.
5209 (FALSE, TRUE): Define.
5210 * aix386-core.c, aix5ppc-core.c, aout-adobe.c, aout-arm.c, aout-cris.c,
5211 aout-encap.c, aout-ns32k.c, aout-target.h, aout-tic30.c, aoutf1.h,
5212 aoutx.h, archive.c, archive64.c, archures.c, bfd-in.h, bfd.c, bfdwin.c,
5213 binary.c, bout.c, cache.c, cisco-core.c, coff-a29k.c, coff-alpha.c,
5214 coff-apollo.c, coff-arm.c, coff-aux.c, coff-h8300.c, coff-h8500.c,
5215 coff-i386.c, coff-i860.c, coff-i960.c, coff-ia64.c, coff-m68k.c,
5216 coff-m88k.c, coff-mcore.c, coff-mips.c, coff-or32.c, coff-ppc.c,
5217 coff-rs6000.c, coff-sh.c, coff-sparc.c, coff-stgo32.c, coff-tic30.c,
5218 coff-tic4x.c, coff-tic54x.c, coff-tic80.c, coff-w65.c, coff-we32k.c,
5219 coff-z8k.c, coff64-rs6000.c, coffcode.h, coffgen.c, cofflink.c,
5220 corefile.c, cpu-a29k.c, cpu-alpha.c, cpu-arc.c, cpu-arm.c, cpu-avr.c,
5221 cpu-cris.c, cpu-d10v.c, cpu-d30v.c, cpu-dlx.c, cpu-fr30.c, cpu-frv.c,
5222 cpu-h8300.c, cpu-h8500.c, cpu-hppa.c, cpu-i370.c, cpu-i386.c,
5223 cpu-i860.c, cpu-i960.c, cpu-ia64.c, cpu-ip2k.c, cpu-m10200.c,
5224 cpu-m10300.c, cpu-m32r.c, cpu-m68hc11.c, cpu-m68hc12.c, cpu-m68k.c,
5225 cpu-m88k.c, cpu-mcore.c, cpu-mips.c, cpu-mmix.c, cpu-ns32k.c,
5226 cpu-openrisc.c, cpu-or32.c, cpu-pdp11.c, cpu-pj.c, cpu-powerpc.c,
5227 cpu-rs6000.c, cpu-s390.c, cpu-sh.c, cpu-sparc.c, cpu-tic30.c,
5228 cpu-tic4x.c, cpu-tic54x.c, cpu-tic80.c, cpu-v850.c, cpu-vax.c,
5229 cpu-w65.c, cpu-we32k.c, cpu-xstormy16.c, cpu-z8k.c, dwarf1.c,
5230 dwarf2.c, ecoff.c, ecofflink.c, efi-app-ia32.c, efi-app-ia64.c,
5231 elf-bfd.h, elf-eh-frame.c, elf-hppa.h, elf-m10200.c, elf-m10300.c,
5232 elf-strtab.c, elf.c, elf32-arc.c, elf32-arm.h, elf32-avr.c,
5233 elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c, elf32-fr30.c,
5234 elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c, elf32-hppa.h,
5235 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
5236 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
5237 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
5238 elf32-pj.c, elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-sh64-com.c,
5239 elf32-sh64.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
5240 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
5241 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-ppc.h, elf64-s390.c,
5242 elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c,
5243 elfarm-oabi.c, elfcode.h, elfcore.h, elflink.c, elflink.h,
5244 elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c, elfxx-mips.h,
5245 elfxx-target.h, format.c, freebsd.h, genlink.h, hash.c, hp300hpux.c,
5246 hppabsd-core.c, hpux-core.c, i386aout.c, i386linux.c, i386lynx.c,
5247 i386mach3.c, i386msdos.c, i386os9k.c, ieee.c, ihex.c, irix-core.c,
5248 libaout.h, libbfd-in.h, libbfd.c, libcoff-in.h, libecoff.h, libieee.h,
5249 libnlm.h, liboasys.h, libpei.h, libxcoff.h, linker.c, lynx-core.c,
5250 m68klinux.c, m68klynx.c, mach-o.c, mach-o.h, merge.c, mipsbsd.c,
5251 mmo.c, netbsd-core.c, netbsd.h, nlm.c, nlm32-alpha.c, nlm32-i386.c,
5252 nlm32-ppc.c, nlm32-sparc.c, nlmcode.h, oasys.c, opncls.c, osf-core.c,
5253 pc532-mach.c, pdp11.c, pe-arm.c, pe-i386.c, pe-mcore.c, pe-mips.c,
5254 pe-sh.c, peXXigen.c, pef.c, pei-arm.c, pei-i386.c, pei-mcore.c,
5255 pei-mips.c, pei-sh.c, peicode.h, ppcboot.c, ptrace-core.c, reloc.c,
5256 reloc16.c, riscix.c, rs6000-core.c, sco5-core.c, section.c, simple.c,
5257 som.c, som.h, sparclinux.c, sparclynx.c, srec.c, stabs.c, sunos.c,
5258 syms.c, targets.c, tekhex.c, ticoff.h, trad-core.c, versados.c,
5259 vms-gsd.c, vms-hdr.c, vms-misc.c, vms-tir.c, vms.c, vms.h,
5260 xcoff-target.h, xcofflink.c, xsym.c, xsym.h: Replace boolean with
5261 bfd_boolean, true with TRUE, false with FALSE. Simplify comparisons
5262 of bfd_boolean vars with TRUE/FALSE. Formatting.
5263 * bfd-in2.h, libbfd.h, libcoff.h: Regenerate
5264
5265 2002-11-28 Alan Modra <amodra@bigpond.net.au>
5266
5267 * elf-bfd.h: Replace occurrences of Elf32_Internal_* and
5268 Elf64_Internal_* with Elf_Internal_*. Replace Elf_Internal_Rel
5269 with Elf_Internal_Rela.
5270 * elf-hppa.h, elf-m10200.c, elf-m10300.c, elf32-arc.c, elf32-arm.h,
5271 elf32-avr.c, elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c,
5272 elf32-fr30.c, elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c,
5273 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
5274 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
5275 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
5276 elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-v850.c, elf32-vax.c,
5277 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
5278 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
5279 elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c, elfarm-oabi.c,
5280 elfcode.h, elflink.h, elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c: Ditto.
5281 * elf-hppa.h (elf_hppa_internal_shdr): Delete. Use Elf_Internal_Shdr
5282 throughout instead.
5283 * elf.c (_bfd_elf_no_info_to_howto_rel): Delete.
5284 * elfcode.h (elf_swap_reloca_in): Pass source operand as a bfd_byte *.
5285 Remove INLINE keyword.
5286 (elf_swap_reloc_in): Likewise. Also clear r_addend.
5287 (elf_swap_reloc_out, elf_swap_reloca_out): Pass destination operand
5288 as a bfd_byte *.
5289 (elf_write_relocs): Consolidate REL and RELA code.
5290 (elf_slurp_reloc_table_from_section): Simplify REL code.
5291 (NAME(_bfd_elf,size_info)): Populate reloc swap entries.
5292 * elf-bfd.h (MAX_INT_RELS_PER_EXT_REL): Define.
5293 * elflink.h (elf_link_read_relocs_from_section): Consolidate REL and
5294 RELA code.
5295 (elf_link_adjust_relocs): Likewise. Don't malloc space for temp
5296 reloc array, use a fixed size of MAX_INT_RELS_PER_EXT_REL.
5297 (elf_link_output_relocs): Likewise.
5298 (elf_reloc_link_order): Likewise.
5299 (elf_finish_pointer_linker_section): Likewise.
5300 (struct elf_link_sort_rela): Remove union.
5301 (elf_link_sort_cmp1): Update to suit.
5302 (elf_link_sort_cmp2): Here too.
5303 (elf_link_sort_relocs): Consolidate REL and RELA code. Fix memory
5304 over-allocation for int_rels_per_ext_rel != 1 case.
5305 * elf32-arm.h: Update all bfd_elf32_swap_reloc_out calls.
5306 * elf32-i386.c: Likewise.
5307 * elf32-cris.c: Likewise for bfd_elf32_swap_reloca_out.
5308 * elf32-hppa.c, elf32-i370.c, elf32-m68k.c, elf32-ppc.c, elf32-s390.c,
5309 elf32-sh.c, elf32-vax.c, elfxx-mips.c: Likewise.
5310 * elf64-alpha.c: Likewise for bfd_elf64_swap_reloca_out.
5311 * elf64-hppa.c, elf64-mips.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
5312 elf64-sparc.c, elf64-x86-64.c: Likewise.
5313 * elfxx-ia64.c: Likewise for bfd_elfNN_swap_reloca_out.
5314 * elfxx-mips.c (sort_dynamic_relocs): Likewise for
5315 bfd_elf32_swap_reloc_in.
5316
5317 * elf32-arm.h: Update elf32_arm_info_to_howto calls.
5318 * elf32-mips.c: Likewise for mips_info_to_howto_rel.
5319 (mips_elf64_swap_reloc_in): Zero r_addend.
5320 (mips_elf64_be_swap_reloc_in): Likewise.
5321 (mips_elf64_slurp_one_reloc_table): Simplify.
5322
5323 * elf64-alpha.c (alpha_elf_size_info): Populate reloc swap entries.
5324 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
5325 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
5326
5327 2002-11-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5328
5329 * elf32-sh.c (sh_elf_relocate_section): Don't complain about
5330 unresolved debugging relocs in dynamic applications.
5331 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
5332
5333 2002-11-26 Alan Modra <amodra@bigpond.net.au>
5334
5335 * elf-eh-frame.c (ENSURE_NO_RELOCS): Disregard R_*_NONE relocs.
5336 (_bfd_elf_discard_section_eh_frame): Don't discard duplicate CIEs
5337 on a relocatable link. Comment typos.
5338 * elf.c (_bfd_elf_link_hash_newfunc): Assign elements of structure
5339 in the order they are declared. Clear elf_hash_value too.
5340 (_bfd_elf_link_hash_table_init): Likewise assign in order. Clear
5341 eh_info and tls_segment.
5342 * elflink.h (elf_link_input_bfd <emit_relocs>): Keep reloc offsets
5343 sorted when discarding relocs by turning them into R_*_NONE.
5344
5345 * libbfd.c (warn_deprecated): Comment spelling.
5346 * po/SRC-POTFILES.in: Regenerate.
5347
5348 2002-11-21 Richard Henderson <rth@redhat.com>
5349
5350 * elflink.h (elf_link_add_object_symbols): Don't overwrite the
5351 arch's st_other bits when merging visibilities.
5352 (elf_link_output_extsym): Tidy clearing of visibility field.
5353
5354 2002-11-21 Alan Modra <amodra@bigpond.net.au>
5355
5356 * coff-mcore.c (SWAP_IN_RELOC_OFFSET): Define.
5357 (SWAP_OUT_RELOC_OFFSET): Define.
5358
5359 2002-11-20 Alexandre Oliva <aoliva@redhat.com>
5360
5361 * elf.c (_bfd_elf_link_hash_table_init): Make sure
5362 can_refcount is properly extended to the type of
5363 init_refcount.
5364
5365 2002-11-19 Alexandre Oliva <aoliva@redhat.com>
5366
5367 * elfxx-mips.c (MIPS_RELOC_RELA_P): New macro.
5368 (_bfd_mips_elf_relocate_section): Use it.
5369
5370 * elfxx-mips.c (MNAME): New macro.
5371 (_bfd_mips_elf_check_relocs): Use it.
5372 (_bfd_mips_elf_discard_info): Likewise.
5373 (_bfd_mips_elf_final_link): Likewise.
5374
5375 2002-11-19 Alan Modra <amodra@bigpond.net.au>
5376
5377 * elf64-ppc.c (ppc64_elf_edit_opd): When deleting relocs, adjust
5378 rel_hdr.sh_size too.
5379
5380 2002-11-18 Klee Dienes <kdienes@apple.com>
5381
5382 * Makefile.am (BFD32_LIBS): Add bfdwin.lo, bfdio.lo.
5383 (BFD32_LIBS_CFILES): Add bfdwin.c, bfdio.c.
5384 (BFD_H_FILES): Add bfdwin.c, bfdio.c.
5385 (LIBBFD_H_FILES): Add bfdwin.c, bfdio.c.
5386 Add dependencies for bfdwin.c, bfdio.c.
5387 * bfd.c: Remove bfd_get_mtime, bfd_get_size.
5388 * libbfd.c: Remove real_read, bfd_bread, _bfd_window_internal,
5389 bfd_init_window, bfd_free_window, bfd_get_file_window, bfd_bwrite,
5390 bfd_tell, bfd_flush, bfd_stat, bfd_seek.
5391 * bfdio.c: New file. Contains real_read, bfd_bread, bfd_write,
5392 bfd_tell, bfd_flush, bfd_stat, bfd_seek, bfd_ge_mtime,
5393 bfd_get_size (moved from libbfd.c and bfd.c).
5394 * bfdwin.c New file. Contains _bfd_window_internal,
5395 bfd_init_window, bfd_free_window, bfd_get_file_window (moved from
5396 libbfd.c and bfd.c).
5397 * po/SRC-POTFILES.in: Regenerate.
5398 * po/bfd.pot: Regenerate.
5399 * libbfd.h: Regenerate.
5400 * bfd-in2.h: Regenerate.
5401 * aclocal.m4: Regenerate.
5402 * Makefile.in: Regenerate.
5403 * configure: Regenerate.
5404
5405 2002-11-18 Klee Dienes <kdienes@apple.com>
5406
5407 * bfd.c (bfd_preserve_save): Don't zero BFD_IN_MEMORY.
5408
5409 2002-11-15 Kazu Hirata <kazu@cs.umass.edu>
5410
5411 * coff-h8300.c (h8300_reloc16_estimate): Do not optimize away
5412 jsr after a short jump.
5413 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
5414
5415 2002-11-15 Klee Dienes <kdienes@apple.com>
5416
5417 * pef.c (bfd_pef_convert_architecture): Move declaration of
5418 ARCH_POWERPC and ARCH_M68K to the start of the function.
5419
5420 2002-11-14 Svein E. Seldal <Svein.Seldal@solidas.com>
5421
5422 * coff-tic4x.c (tic4x_howto_table): Formatting fixup
5423
5424 2002-11-14 Hans-Peter Nilsson <hp@bitrange.com>
5425
5426 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs):
5427 For bpo_gregs_section->contents, allocate _raw_size, not
5428 _cooked_size.
5429
5430 2002-11-13 Klee Dienes <kdienes@apple.com>
5431
5432 * config.bfd: Add entries for powerpc-*-darwin and cousins.
5433
5434 2002-11-13 H.J. Lu <hjl@gnu.org>
5435
5436 * elfcode.h (elf_object_p): Don't restore abfd->arch_info.
5437
5438 2002-11-13 Klee Dienes <kdienes@apple.com>
5439 Alan Modra <amodra@bigpond.net.au>
5440
5441 * bfd.c (struct bfd_preserve): New.
5442 (bfd_preserve_save): New function.
5443 (bfd_preserve_restore): Ditto.
5444 (bfd_preserve_finish): Ditto.
5445 * bfd-in2.h: Regenerate.
5446 * mach-o.c: Formatting.
5447 (bfd_mach_o_scan_read_symtab_symbol): Make "value" unsigned.
5448 (bfd_mach_o_object_p): Use bfd_preserve_save/restore/finish.
5449 (bfd_mach_o_core_p): Ditto.
5450 (bfd_mach_o_scan): Pass in mdata.
5451 * mach-o.h (bfd_mach_o_scan): Update prototype.
5452 * pef.c: Formatting.
5453 (bfd_pef_object_p): Use bfd_preserve_save/restore/finish.
5454 (bfd_pef_xlib_object_p): Ditto.
5455 (bfd_pef_scan): Pass in mdata. Move version check to bfd_pef_object_p.
5456 * pef.h (bfd_pef_scan): Update prototype.
5457 * xsym.c: Formatting, K&R fixes.
5458 (bfd_sym_object_p): Use bfd_preserve_save/restore/finish.
5459 (bfd_sym_scan): New function split out from bfd_sym_object_p.
5460 * xsym.h (bfd_sym_scan): Declare.
5461 * elfcode.h (elf_object_p): Use bfd_preserve_save/restore/finish.
5462 * elfcore.h (elf_core_file_p): Likewise.
5463 * targets.c (_bfd_target_vector): Revert 2002-11-08 change.
5464
5465 2002-11-12 Nick Clifton <nickc@redhat.com>
5466
5467 * po/da.po: Updated Danish translation.
5468
5469 2002-11-12 Alan Modra <amodra@bigpond.net.au>
5470
5471 * elflink.h (elf_link_add_object_symbols): Optimize stabs for
5472 relocatable link too.
5473 (elf_link_input_bfd): When emitting relocs, adjust offsets for
5474 eh_frame and stab sections. Zap deleted relocs.
5475 (elf_reloc_symbol_deleted_p): Return true for zero r_symndx.
5476 (elf_bfd_discard_info): Run for relocatable link too.
5477 * elf64-ppc.c (ppc64_elf_edit_opd): Rename from edit_opd. Make global.
5478 Handle ld -r case.
5479 (ppc64_elf_size_dynamic_sections): Don't call edit_opd from here.
5480 * elf64-ppc.h (ppc64_elf_edit_opd): Declare.
5481
5482 * elf-bfd.h (struct cie_header): Move from elf_eh-frame.c.
5483 (struct cie, struct eh_cie_fde, struct eh_frame_sec_info): Likewise.
5484 (struct eh_frame_array_ent, struct eh_frame_hdr_info): Likewise.
5485 (enum elf_link_info_type): Remove ELF_INFO_TYPE_EH_FRAME_HDR.
5486 (struct eh_frame_hdr_info): Add "hdr_sec", remove "split".
5487 (struct elf_link_hash_table): Add eh_info.
5488 (struct elf_obj_tdata): Change eh_frame_hdr to an asection *.
5489 (_bfd_elf_discard_section_eh_frame): Update prototype.
5490 (_bfd_elf_discard_section_eh_frame_hdr): Likewise.
5491 (_bfd_elf_write_section_eh_frame): Likewise.
5492 (_bfd_elf_write_section_eh_frame_hdr): Likewise.
5493 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Remove "ehdrsec"
5494 param. Get "hdr_info" from link hash table.
5495 (_bfd_elf_discard_section_eh_frame_hdr): Remove "sec" param. Get
5496 header section from link hash table. Save header section to elf_tdata.
5497 (_bfd_elf_maybe_strip_eh_frame_hdr): Remove local "sec". Use
5498 header section from link hash table. Don't alloc hdr_info. Clear
5499 hdr_sec instead of setting "strip".
5500 (_bfd_elf_eh_frame_section_offset): Formatting.
5501 (_bfd_elf_write_section_eh_frame): Remove "ehdrsec", add "info" param.
5502 Get header section from link hash table.
5503 (_bfd_elf_write_section_eh_frame_hdr): Remove "sec", add "info" param.
5504 Get header section from link hash table.
5505 * elf.c (map_sections_to_segments): Use cached eh_frame_hdr.
5506 (get_program_header_size): Likewise.
5507 (_bfd_elf_section_offset): Formatting.
5508 * elflink.h (elf_link_create_dynamic_sections): Stash eh frame header
5509 section pointer in link hash table.
5510 (elf_bfd_final_link): Adjust _bfd_elf_write_section_eh_frame_hdr
5511 and _bfd_elf_write_section_eh_frame calls. Update comment about
5512 eh_frame entries.
5513 (elf_bfd_discard_info): Adjust _bfd_elf_discard_section_eh_frame and
5514 _bfd_elf_discard_section_eh_frame_hdr calls. Remove "ehdr".
5515
5516 * po/SRC-POTFILES.in: Regenerate.
5517
5518 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't zero
5519 relocs for discarded FDEs. Remove dead code.
5520 (_bfd_elf_write_section_eh_frame_hdr): Remove dead code.
5521 * elflink.h (elf_bfd_discard_info): Don't save edited relocs.
5522 Tidy conditions under which stabs are edited. Formatting.
5523 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
5524 from discarded relocs.
5525 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Add reloc output
5526 section adjustments after testing magic values.
5527
5528 2002-11-12 Thomas Moestl <tmm@FreeBSD.org>
5529
5530 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Correct
5531 references to large plt symbols.
5532
5533 2002-11-12 Klee Dienes <kdienes@apple.com>
5534
5535 * mach-o.c (bfd_mach_o_scan_read_thread): Don't re-use 'i' when
5536 looking for an unused section name.
5537
5538 2002-11-11 Kazu Hirata <kazu@cs.umass.edu>
5539
5540 * coff-h8300.c: Fix formatting.
5541 * elf32-h8300.c: Likewise.
5542 * reloc16.c: Likewise.
5543
5544 2002-11-09 Jeroen Dobbelaere <jeroen.dobbelaere@acunia.com>
5545
5546 * elf32-arm.h (elf32_arm_size_dynamic_sections): Don't strip output
5547 section when dynamic section unused; _bfd_strip_section_from_output
5548 instead.
5549
5550 2002-11-08 Alan Modra <amodra@bigpond.net.au>
5551
5552 * targets.c (_bfd_target_vector): Disable pef_vec, pef_xlib_vec
5553 and sym_vec.
5554
5555 * dwarf2.c: Revert last change.
5556
5557 2002-11-07 Michal Ludvig <mludvig@suse.cz>
5558
5559 * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
5560 _bfd_dwarf2_find_nearest_line): Use
5561 bfd_simple_get_relocated_section_contents() instead of
5562 bfd_get_section_contents().
5563 * reloc.c (bfd_perform_relocation): Add sanity check.
5564 * simple.c (simple_get_relocated_section_contents): If the section
5565 does not have any relocs associated with it, just return the
5566 unadjusted contents.
5567
5568 2002-11-07 Hans-Peter Nilsson <hp@axis.com>
5569
5570 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOT,
5571 case R_CRIS_32_GOT>: Correct test for filling in constant .got
5572 contents, enabling for a non-DSO, for symbols defined in the
5573 program with --export-dynamic.
5574
5575 2002-11-07 Alan Modra <amodra@bigpond.net.au>
5576
5577 * elf64-ppc.c: Comment typo fixes.
5578 (ppc64_elf_merge_private_bfd_data): Allow BFD_ENDIAN_UNKNOWN input.
5579
5580 2002-11-07 Nick Clifton <nickc@redhat.com>
5581
5582 * po/da.po: Updated Danish translation.
5583
5584 2002-11-06 Alexandre Oliva <aoliva@redhat.com>
5585
5586 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Generate
5587 exactly three internal relocs per external reloc. Set reloc_count
5588 to the external reloc count.
5589
5590 2002-11-06 Klee Dienes <kdienes@apple.com>
5591
5592 * coff-stgo32.c (stub_bytes): Mark as const.
5593 Fix comment formatting.
5594
5595 2002-11-06 Klee Dienes <kdienes@apple.com>
5596
5597 * Makefile.am (BFD32_BACKENDS): Add mach-o.lo, pef.lo, and
5598 xsym.lo.
5599 (BFD32_BACKENDS_CFILES): Add mach-o.c, pef.c, and xsym.c.
5600 (SOURCE_HFILES): Add mach-o.h, pef.h, pef-traceback.h, xsym.h
5601 * archures.c (enum bfd_architecture): Add bfd_arch_m98k.
5602 * bfd.c (struct bfd): Add private data for mach-o, pef, and sym.
5603 * targets.c (enum bfd_flavour): Add flavours for mach-o, pef, and
5604 sym.
5605 (_bfd_target_vector): Add target vectors for mach-o, pef, and sym.
5606 * Makefile.in: Regenerate.
5607 * doc/Makefile.in: Regenerate.
5608 * bfd-in2.h: Regenerate.
5609 * xsym.c: New file. Contains support for the Apple/Metrowerks
5610 xSYM debugging format.
5611 * xsym.h: New file.
5612 * pef.c: New file. Contains support for the Apple Code Fragment
5613 Manager Preferred Executable Format
5614 * pef.h: New file.
5615 * pef-traceback.h: New file. Contains support for parsing PowerPC
5616 traceback tables as used by PEF executables (and perhaps other
5617 systems as well).
5618 * mach-o.c: New file. Contains support for the Mach-O object file
5619 format.
5620 * mach-o.h: New file.
5621 * mach-o-target.c: New file. Declares the mach-o targets
5622 themselves. Included three times by mach-o.c; each time with a
5623 different set of macros set.
5624
5625 2002-11-06 Graeme Peterson <gp@qnx.com>
5626
5627 * Makefile.am: Remove entries for elf32-qnx.[ch].
5628 * Makefile.in: Regenerate.
5629 * config.bfd: Change arm-nto to use bfd_elf32_{big|little}arm_vec,
5630 ppc-nto to use bfd_elf32_powerpc{le}_vec, sh-nto to use
5631 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
5632 * configure.in: Remove support for bfd_elf32_sh{l}qnx_vec,
5633 bfd_elf32_powerpc{le}qnx_vec, bfd_elf32_{big|little}armqnx_vec,
5634 and bfd_elf32_i386qnx_vec, and removed elf32-qnx.lo from other targets.
5635 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
5636 * configure: Regenerate.
5637 * elf32-qnx.c: Remove.
5638 * elf32-qnx.h: Remove.
5639 * elf.c: Remove calls to QNX specific set_nonloadable_filepos,
5640 is_contained_by_filepos, and copy_private_bfd_data_p.
5641 * elf-bfd.h (struct elf_backend_data): Remove set_nonloadable_filepos,
5642 is_contained_by_filepos, and copy_private_bfd_data_p.
5643 * elf32-i386.c: Remove QNX extended bfd support.
5644 * elf32-ppc.c: Remove QNX extended bfd support.
5645 * elf32-sh.c: Remove QNX extended bfd support.
5646 * elfarm-nabi.c: Remove QNX extended bfd support.
5647 * targets.c: Remove qnx vectors.
5648 * elfxx-target.h (elf_backend_set_nonloadable_filepos): Remove
5649 (elf_backend_is_contained_by_filepos): Remove.
5650 (elf_backend_copy_private_bfd_data_p): Remove.
5651 * po/SRC-POTFILES.in: Regenerate.
5652
5653 2002-11-06 David O'Brien <obrien@FreeBSD.org>
5654 Alan Modra <amodra@bigpond.net.au>
5655
5656 * elf64-sparc.c (sparc64_elf_relocate_section): Adjust addend of
5657 dynamic relocs against section symbols for the output section vma.
5658
5659 2002-11-05 Alan Modra <amodra@bigpond.net.au>
5660
5661 * elf32-arm.h (t2a1_push_insn, t2a2_ldr_insn, t2a3_mov_insn,
5662 t2a4_bx_insn, t2a5_pop_insn, t2a6_bx_insn): Remove.
5663
5664 2002-11-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5665 Alan Modra <amodra@bigpond.net.au>
5666
5667 * config.bfd (sh-*-linux*): Use bfd_elf*_sh64*lin_vec as sh64
5668 vectors in target_selvecs.
5669 (shle-*-netbsdelf*): Use bfd_elf*_sh64*nbsd_vec as sh64 vectors
5670 in target_selvecs.
5671 (sh-*-netbsdelf*): Likewise.
5672 * configure.in (assocvecs): New variable. Handle assocvecs like
5673 selvecs.
5674 * configure: Regenerate.
5675 * format.c (bfd_check_format_matches): Store bfd_target pointers
5676 in matching_vector instead of target names. Select first target
5677 from bfd_associated_vector that matches a list of ambiguous targets.
5678 * targets.c (_bfd_associated_vector): New array.
5679 (bfd_associated_vector): New variable.
5680 (_bfd_target_vector): Add bfd_elf*_sh64*lin_vec.
5681 * libbfd-in.h (bfd_associated_vector): Declare.
5682 * libbfd.h: Regenerate.
5683
5684 2002-11-05 Elias Athanasopoulos <eathan@otenet.gr>
5685
5686 * vms-gsd.c (_bfd_vms_write_gsd): Check that symbol->udata.p is
5687 non-NULL before dereferencing.
5688
5689 2002-11-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5690
5691 * vms.c (vms_object_p): Restore the start address when returning
5692 NULL.
5693
5694 2002-11-04 Alan Modra <amodra@bigpond.net.au>
5695 Hans-Peter Nilsson <hp@axis.com>
5696
5697 * elflink.h (struct elf_final_link_info): Add shndxbuf_size.
5698 (elf_bfd_final_link): Don't bother zeroing symtab_hdr fields.
5699 Set up a larger symshndxbuf, and write it out. Free it on
5700 exit rather than freeing symbuf twice. Correct section index
5701 on output section symbol loop.
5702 (elf_link_output_sym): Accumulate symbol extension section
5703 indices, reallocating symshndxbuf rather than writing it out.
5704 (elf_link_flush_output_syms): Don't flush symshndxbuf.
5705 * elf.c (assign_section_numbers): Init i_shdrp to all zero.
5706 Use bfd_zalloc to clear i_shdrp[0] too.
5707
5708 2002-11-03 Stephen Clarke <stephen.clarke@earthling.net>
5709
5710 * elf32-sh64-com.c (sh64_address_in_cranges): Use
5711 _raw_size of cranges section if _cooked_size not yet set.
5712
5713 2002-11-03 Hans-Peter Nilsson <hp@axis.com>
5714
5715 * elf32-v850.c (v850_elf_relax_delete_bytes): Correct parameters
5716 for bfd_elf32_swap_symbol_out.
5717
5718 2002-10-31 David O'Brien <obrien@FreeBSD.org>
5719
5720 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't mix
5721 signed and unsigned in comparison.
5722
5723 2002-10-30 Daniel Jacobowitz <drow@mvista.com>
5724
5725 * coffcode.h: Remove extraneous '\'.
5726
5727 2002-10-28 H.J. Lu <hjl@gnu.org>
5728
5729 * Makefile.am (targets.lo): Depend on Makefile instead of
5730 config.status.
5731 (archures.lo): Likewise.
5732 * Makefile.in: Regenerated.
5733
5734 2002-10-25 Jason Thorpe <thorpej@wasabisystems.com>
5735
5736 * config.bfd (mips*el-*-netbsd*, mips*-*-netbsd*): Add
5737 bfd_elf64_bigmips_vec and bfd_elf64_littlemips_vec to
5738 targ_selvecs.
5739
5740 2002-10-25 Jim Wilson <wilson@redhat.com>
5741
5742 * elf64-sh64.c (sh_elf64_relocate_section): Call
5743 _bfd_elf_rela_local_sym. Handle relocs against STT_SECTION symbol
5744 of SHF_MERGE section.
5745
5746 2002-10-25 Hans-Peter Nilsson <hp@axis.com>
5747
5748 * simple.c: Correct placement of ATTRIBUTE_UNUSED.
5749
5750 2002-10-24 John David Anglin <dave@hiauly1.hia.nrc.ca>
5751
5752 * aoutx.h (NAME(aout,swap_ext_reloc_in)): Cast bytes->r_index to
5753 unsigned int. Cast RELOC_BASE10, RELOC_BASE13 and RELOC_BASE22 to
5754 unsigned int.
5755 (NAME(aout,final_link)): Cast enum used in assignment.
5756 (aout_link_write_symbols): Cast enums in comparisons, int values to
5757 boolean, enums in assignments to int.
5758 (aout_link_input_section_std): Cast rel->r_index to unsigned int.
5759 (aout_link_input_section_ext): Likewise. Cast enums used in
5760 comparisons with unsigned ints.
5761 (aout_link_reloc_link_order): Cast enum to int in assignment.
5762 * archive.c (_bfd_generic_read_ar_hdr_mag): Cast result of memchr
5763 calls to char *.
5764 * bfd-in.h (bfd_set_section_vma): Cast enum true to unsigned int in
5765 assignment.
5766 * bfd-in2.h (bfd_set_section_vma): Likewise.
5767 * bfd.c (bfd_record_phdr): Cast enums in assignments.
5768 * binary.c (bfd_alloc): Cast enum to long.
5769 * coffgen.c (_bfd_coff_is_local_label_name): Cast return to boolean.
5770 * dwarf2.c (read_abbrevs): Add casts to enum types.
5771 (read_attribute_value): Likewise.
5772 (arange_add): Cast result of bfd_zalloc call.
5773 (comp_unit_contains_address): Return true and false.
5774 (comp_unit_find_nearest_line): Cast return to boolean.
5775 * format.c (bfd_check_format_matches, bfd_set_format): Likewise.
5776 * gen-aout.c: define macro '_' if not defined.
5777 * libbfd.c (bfd_realloc): Cast malloc and realloc to PTR.
5778 (bfd_bwrite): Cast bfd_realloc to bfd_byte *.
5779 (bfd_write_bigendian_4byte_int): Cast return to boolean.
5780 (bfd_seek): Cast bfd_realloc to bfd_byte *.
5781 (bfd_generic_is_local_label_name): Cast return to boolean.
5782 * libcoff.h (_bfd_coff_adjust_symndx): Remove extraneous '\'.
5783 * linker.c (_bfd_link_hash_newfunc): Cast bfd_hash_allocate result to
5784 struct bfd_hash_entry *.
5785 (_bfd_generic_link_hash_newfunc): likewise.
5786 (_bfd_generic_final_link): Cast enum to unsigned int.
5787 * merge.c (sec_merge_emit): Cast return to boolean.
5788 (merge_strings): Add casts to const unsigned char *.
5789 * reloc.c (bfd_get_reloc_code_name): Cast enums in comparison to int.
5790 (bfd_generic_get_relocated_section_content): Cast enum to unsigned int.
5791 * section.c (bfd_section_hash_newfunc): Cast bfd_hash_allocate result
5792 to struct bfd_hash_entry *.
5793 (bfd_set_section_content): Add cast to PTR in comparison.
5794 * simple.c (simple_dummy_warning, simple_dummy_undefined_symbol,
5795 simple_dummy_reloc_overflow, simple_dummy_reloc_dangerous,
5796 simple_dummy_unattached_reloc,
5797 bfd_simple_get_relocated_section_contents): Add K&R declarations and
5798 function definitions.
5799 * srec.c (S3Forced): Initialize to false.
5800 (srec_get_symtab): Cast return value from bfd_alloc to asymbol *.
5801 * stabs.c (_bfd_link_section_stabs): Cast enum to int in comparisons.
5802 (_bfd_discard_section_stabs): Likewise. Also cast return to boolean.
5803 * syms.c (bfd_is_undefined_symclass): Cast return to boolean.
5804 (_bfd_stab_section_find_nearest_line): Cast enum to bfd_byte in
5805 comparisons.
5806
5807 2002-10-23 Jakub Jelinek <jakub@redhat.com>
5808
5809 * elf64-alpha.c (elf64_alpha_check_relocs): Only put maybe_dynamic
5810 relocs into shared lib non-allocated reloc sections.
5811
5812 2002-10-23 Nathan Tallent <eraxxon@alumni.rice.edu>
5813
5814 * dwarf2.c (add_line_info): Ensure that the line_info_table is
5815 sorted even when given an out-of-order line sequence.
5816 (lookup_address_in_line_info_table): When an exact VMA match is
5817 not found, return line information with the closest VMA.
5818
5819 2002-10-23 Ross Alexander <ross.alexander@uk.neceur.com>
5820
5821 * elf64-hppa.c: Force DT_FLAGS to always be set. Required by
5822 HPUX 11.00 patch PHSS_26559.
5823
5824 2002-10-22 Alexandre Oliva <aoliva@redhat.com>
5825
5826 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Don't move
5827 the options section into a separate section unless IRIX 6
5828 compatibility is enabled.
5829
5830 2002-10-22 Alexandre Oliva <aoliva@redhat.com>
5831
5832 * elflink.h (struct elf_link_sort_rela): Turn rel and rela
5833 into arrays.
5834 (elf_link_sort_cmp1, elf_link_sort_cmp2): Adjust.
5835 (elf_link_sort_relocs): Likewise. Take int_rels_per_ext_rel
5836 into account.
5837 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Compose
5838 R_MIPS_REL32 with R_MIPS64 if ABI_64_P.
5839
5840 2002-10-21 Graeme Peterson <gp@qnx.com>
5841
5842 * targets.c (_bfd_target_vector): Add missing qnx vectors.
5843
5844 2002-10-21 Alan Modra <amodra@bigpond.net.au>
5845
5846 * targets.c (bfd_target_list): Don't return the default target twice.
5847
5848 2002-10-21 Elias Athanasopoulos <eathan@otenet.gr>
5849
5850 * archive.c (_bfd_archive_bsd_update_armap_timestamp): Replace
5851 perror with bfd_perror.
5852
5853 2002-10-19 H.J. Lu <hjl@gnu.org>
5854
5855 * elflink.h (elf_link_add_object_symbols): Correctly handle
5856 DT_RPATH and DT_RUNPATH.
5857
5858 2002-10-19 Mark Kettenis <kettenis@gnu.org>
5859
5860 * elf.c (elfcore_grok_note): Fix recognition on NT_PRXFPREG notes.
5861
5862 2002-10-17 Denis Chertykov <denisc@overta.ru>
5863
5864 * elf32-ip2k.c (ELF_MACHINE_ALT1): Define alternate machine code
5865 for ip2k port.
5866
5867 2002-10-17 Alan Modra <amodra@bigpond.net.au>
5868
5869 * elfxx-target.h (USE_REL): Don't define as 1.
5870 * elf32-arm.h (USE_REL): Provide a default define of 0.
5871 Use #if rather than #ifdef when testing USE_REL.
5872 * elf32-m32r.c: Likewise.
5873
5874 * elf32-arc.c (USE_REL): Define as 1.
5875 * elf32-d10v.c (USE_REL): Likewise.
5876 * elf32-m32r.c (USE_REL): Likewise.
5877 * elf32-m68hc11.c (USE_REL): Likewise.
5878 * elf32-m68hc12.c (USE_REL): Likewise.
5879 * elf32-or32.c (USE_REL): Likewise.
5880 * elfarm-nabi.c (USE_REL): Likewise.
5881
5882 2002-10-16 Jakub Jelinek <jakub@redhat.com>
5883
5884 * config.bfd (s390-*-linux*): Add targ64_selvecs.
5885 (s390x-*-linux*): Add targ_selvecs.
5886
5887 2002-10-16 Alan Modra <amodra@bigpond.net.au>
5888
5889 * Makefile.am (BFD32_BACKENDS): Remove elfarmqnx-nabi.lo,
5890 elf32-i386-fbsd.lo, elf32-i386qnx.lo, elf32-ppcqnx.lo,
5891 elf32-sh-lin.lo, elf32-sh64-lin.lo, elf32-sh-nbsd.lo,
5892 elf32-sh64-nbsd.lo, elf32-shqnx.lo. Add elf32-qnx.lo.
5893 (BFD32_BACKENDS_CFILES): Likewise for corresponding C files.
5894 (BFD64_BACKENDS): Remove elf64-sh64-lin.lo, elf64-sh64-nbsd.lo.
5895 (BFD64_BACKENDS_CFILES): Likewise for corresponding C files.
5896 (SOURCE_HFILES): Add elf32-qnx.h.
5897 (BUILD_HFILES): Add bfdver.h.
5898 Run "make dep-am".
5899 * Makefile.in: Regenerate.
5900 * configure.in Update bfd vector dependencies.
5901 * configure: Regenerate.
5902 * elf32-i386-fbsd.c: Delete. Move code to elf32-i386.c.
5903 * elf32-i386qnx.c: Likewise.
5904 * elf32-ppcqnx.c: Delete. Move code to elf32-ppc.c.
5905 * elf32-sh-nbsd.c: Delete. Move code to elf32-sh.c.
5906 * elf32-sh-lin.c: Likewise.
5907 * elf32-shqnx.c: Likewise.
5908 * elf32-sh64-lin.c: Delete. Move code to elf32-sh64.c.
5909 * elf32-sh64-nbsd.c: Likewise.
5910 * elf64-sh64-lin.c: Delete. Move code to elf64-sh64.c.
5911 * elf64-sh64-nbsd.c: Likewise.
5912 * elfarmqnx-nabi.c: Delete. Move code to elfarm-nabi.c.
5913 * elf32-arm.h (ELF_MAXPAGESIZE): Always define.
5914 * elf32-i386.c: Remove ELF_ARCH and ELF32_I386_C_INCLUDED tests.
5915 * elf32-ppc.c: Remove ELF32_PPC_C_INCLUDED tests.
5916 * elf32-qnx.h (elf_backend_set_nonloadable_filepos): Always define.
5917 (elf_backend_is_contained_by_filepos): Likewise.
5918 (elf_backend_copy_private_bfd_data_p): Likewise.
5919 Globalize and move functions to..
5920 * elf32-qnx.c: ..here. New file.
5921 * elf32-sh.c: Remove ELF_ARCH and ELF32_SH_C_INCLUDED tests. Don't
5922 emit target vectors when INCLUDE_SHMEDIA.
5923 * elf32-sh64.c: Remove ELF_ARCH test. Move TARGET_* etc. defines to
5924 end of file.
5925 * elf64-sh64.c: Remove ELF_ARCH test.
5926 * elfarm-nabi.c: Remove ELFARM_NABI_C_INCLUDED test.
5927 * po/BLD-POTFILES.in: Regenerate.
5928 * po/SRC-POTFILES.in: Regenerate.
5929
5930 2002-10-16 Alan Modra <amodra@bigpond.net.au>
5931
5932 * elflink.h (elf_link_add_object_symbols): Error out on dynamic objects
5933 loaded with --just-symbols.
5934
5935 * elf32-i386qnx.c (TARGET_LITTLE_NAME): Define.
5936 * elf32-ppcqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
5937 * elf32-shqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
5938 * elfarmqnx-nabi.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
5939
5940 2002-10-15 Richard Henderson <rth@redhat.com>
5941
5942 * Makefile.am (BFD64_BACKENDS): Remove elf64-alpha-fbsd.
5943 (BFD64_BACKENDS_CFILES): Likewise.
5944 * configure.in (bfd_elf64_alpha_freebsd_vec): Use elf64-alpha.
5945 * elf64-alpha-fbsd.c: Remove file, move code ...
5946 * elf64-alpha.c: ... here.
5947 * Makefile.in, configure: Rebuild.
5948
5949 2002-10-14 Richard Henderson <rth@redhat.com>
5950
5951 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: Increment
5952 VALUE, not ADDEND.
5953
5954 2002-10-14 Stephen Clarke <stephen.clarke@superh.com>
5955
5956 * elf32-sh.c (elf_sh_link_hash_entry): Replace
5957 datalabel_got_offset with union of datalabel_got
5958 offset and refcount.
5959 (sh_elf_link_hash_newfunc): Initialize datalabel_got.refcount.
5960 (allocate_dynrelocs): Delete unnecessary code for
5961 STT_DATALABEL type. Create entry in got for
5962 datalabel version of symbol if datalabel_got.refcount > 0.
5963 (sh_elf_relocate_section): Use datalabel_got union.
5964 (sh_elf_gc_sweep_hook): Pull common code to initialize
5965 h and eh out of switch statement. Declare seen_stt_datalabel.
5966 Initialize it. Decrement datalabel_got.refcount for
5967 got relocs when seen_stt_datalabel is true.
5968 Decrement local_got_refcounts entry for datalabel got relocs
5969 of local symbols.
5970 (sh_elf_copy_indirect_symbol): Copy datalabel_got field over.
5971 (sh_elf_check_relocs): Declare seen_stt_datalabel.
5972 Initialize it. When seen_stt_datalabel is true, increment
5973 datalabel_got refcount rather than got.refcount.
5974 (sh_elf_finish_dynamic_symbol): Create relocs to
5975 initialize got entry for datalabel version of symbol.
5976
5977 2002-10-14 Alan Modra <amodra@bigpond.net.au>
5978
5979 * Makefile.am: Run "make dep-am".
5980 (BFD_H_FILES): Remove version.h.
5981 * bfd-in.h (BFD_VERSION, BFD_VERSION_DATE, BFD_VERSION_STRING): Move..
5982 * version.h: ..to here.
5983 * configure.in (bfd_version_date): Remove.
5984 (AC_OUTPUT): Make bfdver.h from version.h.
5985 * bfd.c: #include "bfdver.h".
5986 * vms-hdr.c: Likewise.
5987 * Makefile.in: Regenerate.
5988 * bfd-in2.h: Regenerate.
5989 * configure: Regenerate.
5990 * po/SRC-POTFILES.in: Regenerate.
5991
5992 2002-10-14 Alan Modra <amodra@bigpond.net.au>
5993
5994 * archures.c (bfd_mach_i386_i386, bfd_mach_i386_i8086,
5995 bfd_mach_i386_i386_intel_syntax, bfd_mach_x86_64,
5996 bfd_mach_x86_64_intel_syntax bfd_mach_ppc, bfd_mach_ppc64,
5997 bfd_mach_rs6k, bfd_mach_d10v, bfd_mach_sh, bfd_mach_v850,
5998 bfd_mach_arc_5, bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8,
5999 bfd_mach_m32r, bfd_mach_frv, bfd_mach_frvsimple,
6000 bfd_mach_ia64_elf64, bfd_mach_ia64_elf32,
6001 bfd_mach_ip2022, bfd_mach_ip2022ext,
6002 bfd_mach_s390_31, bfd_mach_s390_64, bfd_mach_xstormy16): Renumber.
6003 * bfd-in2.h: Regenerate.
6004
6005 2002-10-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6006
6007 * config.bfd (sh*eb-*-linux*, sh*-*-linux*): Add the alternative
6008 endian vector to targ_selvecs.
6009
6010 2002-10-13 Alexandre Oliva <aoliva@redhat.com>
6011
6012 * elfxx-mips.c (mips_elf_calculate_relocation): Take
6013 save_addend argument. Don't apply the 32-bit mask to a
6014 GPREL32 value if it's to be used in another relocation. Don't
6015 use forced-check computation of local_p to decide whether to
6016 add gp0 to GPREL16 value. Don't use only the lowest 16 bits
6017 of the addend of a non-in-place GPREL16 relocation.
6018 (_bfd_mips_elf_relocate_section): Pass use_saved_addend_p to
6019 mips_elf_calculate_relocation().
6020
6021 2002-10-12 Stephane Carrez <stcarrez@nerim.fr>
6022
6023 * elf32-m68hc11.c (m68hc11_elf_relax_section): Don't treat relocs
6024 with symbols in other sections if we relaxed something; the sections
6025 output offsets must be re-computed before.
6026
6027 2002-10-12 Stephane Carrez <stcarrez@nerim.fr>
6028
6029 * elf32-m68hc11.c (m68hc11_elf_relax_section): Update symbols
6030 handling to use Elf_Internal_Sym.
6031 (m68hc11_elf_relax_delete_bytes): Likewise.
6032
6033 2002-10-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6034
6035 * elf32-sh.c (sh_elf_optimized_tls_reloc, sh_elf_mkobject,
6036 sh_elf_object_p, dtpoff_base): New functions.
6037 (sh_elf_howto_table): Add TLS relocs.
6038 (sh_reloc_map): Likewise.
6039 (sh_elf_info_to_howto): Support TLS relocs.
6040 (elf_sh_link_hash_entry): Add tls_type and tls_tpoff32.
6041 (sh_elf_hash_entry, sh_elf_tdata, sh_elf_local_got_tls_type):
6042 New macros.
6043 (sh_elf_obj_tdata): New.
6044 (elf_sh_link_hash_table): Add tls_ldm_got.
6045 (sh_elf_link_hash_table_create): Clear refcount of tls_ldm_got.
6046 (allocate_dynrelocs): Support TLS relocs.
6047 (sh_elf_size_dynamic_sections): Likewise.
6048 (sh_elf_relocate_section): Support TLS relocs. Don't try to find
6049 .rela.got section when found already. Return false after printing
6050 error about unresolvable relocation.
6051 (sh_elf_gc_sweep_hook): Support TLS relocs.
6052 (sh_elf_check_relocs): Likewise.
6053 (sh_elf_finish_dynamic_symbol): Likewise.
6054 (bfd_elf32_mkobject, elf_backend_object_p): Define for TLS case.
6055 * reloc.c: Add SH TLS relocs.
6056 * bfd-in2.h, libbfd.h: Regenerate.
6057
6058 2002-10-11 Daniel Jacobowitz <drow@mvista.com>
6059
6060 * Makefile.in: Regenerated.
6061
6062 2002-10-11 Daniel Jacobowitz <drow@mvista.com>
6063
6064 * Makefile.am: Run dep-am.
6065 (BFD_H_DEP): Add simple.c and linker.c.
6066 (BFD32_LIBS): Add simple.lo.
6067 (BFD32_LIBS_CFILES): Add simple.c.
6068 * Makefile.in: Regenerated.
6069 * bfd-in2.h: Regenerated.
6070 * simple.c: New file.
6071
6072 2002-10-11 Alan Modra <amodra@bigpond.net.au>
6073
6074 * coff-arm.c (record_arm_to_thumb_glue): Avoid type-punned pointers.
6075 (record_thumb_to_arm_glue): Likewise.
6076 * ecoff.c (ecoff_link_add_externals): Likewise.
6077 * elf32-arm.h (record_arm_to_thumb_glue): Likewise.
6078 (record_thumb_to_arm_glue): Likewise.
6079 * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
6080 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
6081 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
6082 * elf64-alpha.c (elf64_alpha_create_dynamic_sections): Likewise.
6083 * elf64-ppc.c (func_desc_adjust): Likewise.
6084 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
6085 (sh64_elf64_create_dynamic_sections): Likewise.
6086 * elflink.c (_bfd_elf_create_got_section): Likewise.
6087 (_bfd_elf_create_dynamic_sections): Likewise.
6088 (_bfd_elf_create_linker_section): Likewise.
6089 * elflink.h (elf_add_default_symbol): Likewise.
6090 (elf_link_create_dynamic_sections): Likewise.
6091 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
6092 * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Likewise.
6093 * elfxx-mips.c (mips_elf_create_got_section): Likewise.
6094 (_bfd_mips_elf_add_symbol_hook): Likewise.
6095 (_bfd_mips_elf_create_dynamic_sections): Likewise.
6096 * linker.c (generic_link_add_symbol_list): Likewise.
6097 * xcofflink.c (xcoff_link_add_symbols): Likewise.
6098
6099 * elfxx-ia64.c (oor_brl, oor_ip): Conditionally define.
6100
6101 * elf64-ppc.c (edit_opd): Only zero opd syms when function is
6102 completely removed. Correct local sym adjustment.
6103
6104 2002-10-10 Stephen Clarke <stephen.clarke@superh.com>
6105
6106 * elf32-sh.c (elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
6107 Correct mistake in calculation of address of .got.
6108 * elf64-sh64.c (elf_sh64_pic_plt_entry_be,
6109 elf_sh64_pic_plt_entry_le): Likewise.
6110
6111 2002-10-09 Richard Shann <richard.shann@superh.com>
6112 Stephen Clarke <stephen.clarke@superh.com>
6113
6114 * Makefile.am: Add entries for elf32-sh64-lin.c and
6115 elf64-sh64-lin.c. Regenerate.
6116 * Makefile.in: Regenerate.
6117 * config.bfd: Change sh64eb-*-linux* and sh64-*-linux*
6118 to use sh64 vectors rather than sh vectors.
6119 * configure.in: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
6120 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
6121 * configure: Regenerate.
6122 * elf32-sh64-lin.c: New file.
6123 * elf64-sh64-lin.c: New file.
6124 * targets.c: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
6125 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
6126
6127 2002-10-08 H.J. Lu <hjl@gnu.org>
6128
6129 * elf32-i386.c (elf_i386_relocate_section): Re-arrange the
6130 IE->LE transition for R_386_TLS_IE.
6131
6132 2002-10-08 Alan Modra <amodra@bigpond.net.au>
6133
6134 * elf64-ppc.c (edit_opd): Correct test for discarded sections.
6135
6136 2002-10-07 Mark Elbrecht <snowball3@softhome.net>
6137
6138 * cofflink.c (mark_relocs): Don't mark relocations in excluded
6139 sections.
6140
6141 2002-10-07 Alan Modra <amodra@bigpond.net.au>
6142
6143 * elflink.h (elf_link_input_bfd): Remove BFD_VERSION_DATE dependent
6144 code.
6145
6146 * elf64-ppc.c (ppc64_elf_build_stubs): Increment .glink indx.
6147
6148 2002-10-06 Alan Modra <amodra@bigpond.net.au>
6149
6150 * opncls.c: Formatting.
6151 (_bfd_new_bfd): Use a smaller section hash table.
6152
6153 2002-10-05 Alexandre Oliva <aoliva@redhat.com>
6154
6155 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Set the type
6156 of the other two relocations packed with a REL32 to NONE.
6157
6158 2002-10-02 Stephen Clarke <stephen.clarke@superh.com>
6159
6160 * elf32-sh.c (elf_sh_link_hash_entry): Add gotplt_refcount.
6161 (sh_elf_link_hash_newfunc): Initialize it.
6162 (allocate_dynrelocs): Transfer gotplt refs from plt.refcount
6163 to got.refcount for symbols that are forced local or when
6164 we have direct got refs.
6165 (sh_elf_gc_sweep_hook): Adjust gotplt_refcount. Use it
6166 to correctly adjust got.refcount and plt.refcount.
6167 (sh_elf_copy_indirect_symbol): Copy gotplt_refcount across.
6168 (sh_elf_check_relocs): Increment gotplt_refcount.
6169
6170 2002-10-01 Jakub Jelinek <jakub@redhat.com>
6171
6172 * elf32-i386.c (elf_i386_relocate_section): Fix
6173 movl foo@indntpoff, %eax IE->LE transition.
6174
6175 2002-10-01 Jakub Jelinek <jakub@redhat.com>
6176
6177 * elf64-x86-64.c (elf64_x86_64_relocate_section): Change TLSGD
6178 sequence and its transitions.
6179
6180 2002-10-01 Jakub Jelinek <jakub@redhat.com>
6181
6182 * elf32-i386.c (elf_i386_relocate_section): Resolve R_386_TLS_LDO_32
6183 to st_value + addend in non-code sections.
6184 * elf64-x86-64.c (elf64_x86_64_relocate_section): Resolve
6185 R_X86_64_DTPOFF32 to st_value + addend in non-code sections.
6186
6187 2002-09-30 Gavin Romig-Koch <gavin@redhat.com>
6188 Ken Raeburn <raeburn@cygnus.com>
6189 Aldy Hernandez <aldyh@redhat.com>
6190 Eric Christopher <echristo@redhat.com>
6191 Richard Sandiford <rsandifo@redhat.com>
6192
6193 * archures.c (bfd_mach_mips4120, bfd_mach_mips5400): New.
6194 (bfd_mach_mips5500): New.
6195 * cpu-mips.c (I_mips4120, I_mips5400, I_mips5500): New.
6196 (arch_info_struct): Add corresponding entries here.
6197 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_4120,
6198 E_MIPS_MACH_5400 and E_MIPS_MACH_5500.
6199 (_bfd_mips_elf_final_write_processing): Handle bfd_mach_mips4120,
6200 bfd_mach_mips5400 and bfd_mach_mips5500.
6201 (_bfd_mips_elf_mach_extends_p): New function.
6202 (_bfd_mips_elf_merge_private_bfd_data): Use it to help merge
6203 the EF_MIPS_MACH flags.
6204 * bfd-in2.h: Regenerate.
6205
6206 2002-09-28 Jason Thorpe <thorpej@wasabisystems.com>
6207
6208 * elf32-vax.c (elf_vax_size_dynamic_section): Don't strip
6209 .got sections.
6210
6211 2002-09-28 Alan Modra <amodra@bigpond.net.au>
6212
6213 * elf.c (map_sections_to_segments): Correct test for start of
6214 writable section in the same page as end of read-only section.
6215
6216 2002-09-27 Matt Thomas <matt@3am-software.com>
6217
6218 * elf32-vax.c (elf_vax_check_relocs): Remove unused
6219 local_got_refcounts usage. Remove allocation of got slot.
6220 (elf_vax_gc_sweep_hook): Remove unused local_got_refcounts usage.
6221 Remove de-allocation of got slot.
6222 (elf_vax_size_dynamic_section): Fix some indentation. Add hash
6223 traversal for elf_vax_instantiate_got_entries. Allow empty .got
6224 sections to be GC'ed.
6225 (elf_vax_instantiate_got_entries): New function.
6226 (elf_vax_relocate_section): Simplify R_VAX_GOT32 handling. Remove
6227 tests that are now handled by elf_vax_instantiate_got_entries.
6228 Assert GOT entry falls within .got section size. Remove redundant
6229 comparisions. Fix comments.
6230
6231 2002-09-27 Jakub Jelinek <jakub@redhat.com>
6232
6233 * reloc.c: Add x86-64 TLS relocs.
6234 * bfd-in2.h, libbfd.h: Rebuilt.
6235 * elf64-x86-64.c (x86_64_elf_howto): Fix size fields for 32-bit
6236 relocs. Add TLS relocs.
6237 (x86_64_reloc_map): Add TLS relocs.
6238 (elf64_x86_64_info_to_howto): Adjust for added TLS relocs.
6239 (struct elf64_x86_64_link_hash_entry): Add tls_type field.
6240 (GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD, GOT_TLS_IE): Define.
6241 (elf64_x86_64_hash_entry): Define.
6242 (struct elf64_x86_64_obj_tdata): New.
6243 (elf64_x86_64_tdata, elf64_x86_64_local_got_tls_type): Define.
6244 (struct elf64_x86_64_link_hash_table): Add tls_ld_got.
6245 (link_hash_newfunc): Initialize tls_type.
6246 (elf64_x86_64_link_hash_table_create): Initialize tls_ld_got.
6247 (elf64_x86_64_copy_indirect_symbol): Swap tls_type if necessary.
6248 (elf64_x86_64_mkobject): New.
6249 (elf64_x86_64_elf_object_p): Allocate struct elf64_x86_64_obj_tdata.
6250 (elf64_x86_64_tls_transition): New.
6251 (elf64_x86_64_check_relocs): Add r_type variable and use it.
6252 Handle TLS relocs.
6253 (elf64_x86_64_gc_sweep_hook): Handle TLS relocs.
6254 (allocate_dynrelocs): Allocate GOT space for TLS relocs.
6255 (elf64_x86_64_size_dynamic_sections): Likewise.
6256 (dtpoff_base, tpoff): New.
6257 (elf64_x86_64_relocate_section): Handle TLS relocs.
6258 (elf64_x86_64_finish_dynamic_symbol): Only handle non-TLS GOT
6259 entries.
6260 (bfd_elf64_mkobject): Define.
6261
6262 * elf32-i386.c (elf_i386_check_relocs) [R_386_TLS_LE]: Set
6263 DF_STATIC_TLS if shared.
6264
6265 2002-09-26 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6266
6267 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Don't emit unneeded
6268 empty relocation sections.
6269
6270 2002-09-26 Alan Modra <amodra@bigpond.net.au>
6271
6272 * elf64-ppc.c (ppc_build_one_stub): Don't build glink stubs here.
6273 (ppc64_elf_build_stubs): Build them here instead.
6274
6275 2002-09-24 Jakub Jelinek <jakub@redhat.com>
6276
6277 * elf32-sparc.c (elf32_sparc_relocate_section): Put R_SPARC_RELATIVE
6278 addend into r_addend, not *r_offset.
6279 (elf32_sparc_finish_dynamic_symbol): Likewise.
6280 * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Clear xword at
6281 R_SPARC_RELATIVE's r_offset.
6282
6283 2002-09-23 Nathan Tallent <eraxxon@alumni.rice.edu>
6284
6285 * dwarf2.c (decode_line_info): Update to correctly decode
6286 the (non-standard DWARF2) out-of-order address sequences
6287 generated by the Intel C++ 6.0 compiler for ia64-Linux.
6288
6289 2002-09-23 Mark Elbrecht <snowball3@softhome.net>
6290
6291 * config.bfd: For DJGPP targets, match with any cpu and any machine.
6292
6293 2002-09-23 Alan Modra <amodra@bigpond.net.au>
6294
6295 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Zero relocs
6296 for discarded FDEs. Remove redundant assignment.
6297 * elflink.h (elf_bfd_discard_info): Save edited relocs.
6298
6299 2002-09-22 H.J. Lu <hjl@gnu.org>
6300
6301 * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Don't merge
6302 the relocation count between different .reloc sections.
6303
6304 2002-09-21 Alan Modra <amodra@bigpond.net.au>
6305
6306 * elf32-ppc.c (ppc_elf_relocate_section): Allow ".sbss.*" and
6307 ".sdata.*" for R_PPC_SDAREL16, ".sbss2*" and ".sdata2*" for
6308 R_PPC_EMB_SDA2REL. Similarly for R_PPC_EMB_SDA21 and
6309 R_PPC_EMB_RELSDA.
6310
6311 * elfcode.h (elf_slurp_reloc_table_from_section): Make "symcount"
6312 unsigned. Move "symcount" assignment out of loop.
6313 * Makefile.am: Run "make dep-am".
6314 * Makefile.in: Regenerate.
6315 * configure: Regenerate.
6316 * po/SRC-POTFILES.in: Regnerate.
6317
6318 2002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
6319
6320 * dwarf2.c (_bfd_dwarf2_find_nearest_line): If address length is
6321 zero, set it to 8 for (non-standard) 64-bit DWARF2 formats
6322 (e.g. IRIX64).
6323
6324 2002-09-19 Jakub Jelinek <jakub@redhat.com>
6325
6326 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Clear .got word
6327 even if generating R_PPC_RELATIVE reloc.
6328 (ppc_elf_relocate_section): Make sure relocation is performed
6329 if skip == -2. Clear memory at r_offset when creating dynamic
6330 relocation.
6331
6332 2002-09-19 Jakub Jelinek <jakub@redhat.com>
6333
6334 * reloc.c (BFD_RELOC_386_TLS_TPOFF, BFD_RELOC_386_TLS_IE,
6335 BFD_RELOC_386_TLS_GOTIE): Add.
6336 * bfd-in2.h, libbfd.h: Rebuilt.
6337 * elf32-i386.c (elf_howto_table): Add R_386_TLS_TPOFF, R_386_TLS_IE
6338 and R_386_TLS_GOTIE.
6339 (elf_i386_reloc_type_lookup): Handle it.
6340 (struct elf_i386_link_hash_entry): Change tls_type type to unsigned
6341 char instead of enum, change GOT_* into defines.
6342 (GOT_TLS_IE_POS, GOT_TLS_IE_NEG, GOT_TLS_IE_BOTH): Define.
6343 (elf_i386_tls_transition): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
6344 (elf_i386_check_relocs): Likewise. Avoid crash if local symbol is
6345 accessed both as normal and TLS symbol. Move R_386_TLS_LDM and
6346 R_386_PLT32 cases so that R_386_TLS_IE can fall through.
6347 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
6348 (elf_i386_gc_sweep_hook): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
6349 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
6350 (allocate_dynrelocs): Allocate 2 .got and 2 .rel.got entries if
6351 tls_type is GOT_TLS_IE_BOTH.
6352 (elf_i386_size_dynamic_sections): Likewise.
6353 (elf_i386_relocate_section): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
6354 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
6355 (elf_i386_finish_dynamic_symbol): Use tls_type & GOT_TLS_IE to catch
6356 all 4 GOT_TLS_* TLS types.
6357
6358 2002-09-19 Nick Clifton <nickc@redhat.com>
6359
6360 * elflink.h (elf_fix_symbol_flags): When examining weak symbols,
6361 follow indirect links.
6362
6363 2002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
6364
6365 * ecoffswap.h (ecoff_swap_pdr_in) <isym, iline>: Update to
6366 correctly sign-extend 32-bit ECOFF null values (0xffffffff, -1)
6367 on 64 bit machines.
6368 (ecoff_swap_sym_in) <iss>: Likewise.
6369 * ecoff.c (_bfd_ecoff_slurp_symbolic_info): Fix error reading
6370 ECOFF information: 'ioptMax' refers to the actual *size*
6371 of the optimization symtab, not the number of entries.
6372
6373 2002-09-19 Daniel Jacobowitz <drow@mvista.com>
6374
6375 * elf32-arm.h (elf32_arm_adjust_dynamic_symbol): Update
6376 ELF_LINK_HASH_NEEDS_PLT logic.
6377
6378 2002-09-18 Daniel Jacobowitz <drow@mvista.com>
6379
6380 * elfcode.h (elf_slurp_reloc_table_from_section): Check
6381 correct relocation count.
6382
6383 2002-09-17 Daniel Jacobowitz <drow@mvista.com>
6384
6385 * bfd-in.h (bfd_get_dynamic_symcount): Define.
6386 * bfd.c (struct _bfd): Add dynsymcount.
6387 * bfd-in2.h: Regenerated.
6388 * elf.c (_bfd_elf_canonicalize_dynamic_symtab): Set
6389 abfd->dynsymcount.
6390 * elfcode.h (elf_slurp_reloc_table_from_section): Check
6391 for overflow.
6392
6393 2002-09-17 Stan Cox <scox@redhat.com>
6394
6395 * elf64-mips.c (mips_elf64_be_swap_reloca_out): Handle type2 and type3.
6396 (mips_elf64_final_gp): Don't make up gp value.
6397 * elfn32-mips.c (mips_elf_final_gp): Likewise.
6398 * elfxx-mips.c (_bfd_mips_elf_final_link): Always create
6399 .MIPS.options/.options section.
6400
6401 2002-09-17 David O'Brien <obrien@FreeBSD.org>
6402
6403 * elf32-i386-fbsd.c: Always label using the EI_OSABI method.
6404 It is benign for FreeBSD < 4.1. Minor reformatting.
6405 * elf64-alpha-fbsd.c: Likewise.
6406
6407 2002-09-17 Jakub Jelinek <jakub@redhat.com>
6408
6409 * elf32-i386.c (elf_i386_relocate_section) [R_386_TLS_TPOFF32]: Negate
6410 addend.
6411
6412 2002-09-17 Alan Modra <amodra@bigpond.net.au>
6413
6414 * elf64-alpha.c (alpha_elf_size_info): Make static.
6415
6416 2002-09-17 Svein E. Seldal <Svein.Seldal@solidas.com>
6417
6418 * coff-tic4x.c: Add function declarations and ATTRIBUTE_UNUSED.
6419 * cpu-tic4x.c: Ditto.
6420
6421 2002-09-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6422
6423 * elf64-mips.c (define elf_backend_ignore_discarded_relocs): Remove
6424 duplicate define.
6425
6426 2002-09-16 Bruno Haible <bruno@clisp.org>
6427
6428 * elf32-i386.c: Don't defined ELF_ARCH etc. if this file is included
6429 by a target variant implementation.
6430 * elf64-alpha.c: Likewise.
6431 * elf32-i386-fbsd.c: New file.
6432 * elf64-alpha-fbsd.c: New file.
6433 * targets.c: Support bfd_elf32_i386_freebsd_vec and
6434 bfd_elf64_alpha_freebsd_vec.
6435 * configure.in: Accept the vectors bfd_elf32_i386_freebsd_vec,
6436 bfd_elf64_alpha_freebsd_vec.
6437 * Makefile.am (BFD32_BACKENDS): Add elf32-i386-fbsd.lo.
6438 (BFD32_BACKENDS_CFILES): Add elf32-i386-fbsd.c.
6439 (BFD64_BACKENDS): Add elf64-alpha-fbsd.lo.
6440 (BFD64_BACKENDS_CFILES): Add elf64-alpha-fbsd.c.
6441 (elf32-i386-fbsd.lo, elf64-alpha-fbsd.lo): Add dependencies.
6442 * config.bfd: For FreeBSD targets, set targ_defvec to a FreeBSD
6443 specific targets. Define OLD_FREEBSD_ABI_LABEL if appropriate.
6444
6445 2002-09-12 Jakub Jelinek <jakub@redhat.com>
6446
6447 * elf32-i386.c (dtpoff_base, tpoff): Don't crash if tls_segment is
6448 NULL.
6449 (elf_i386_relocate_section): Return false after printing error about
6450 unresolvable relocation.
6451
6452 2002-09-12 Nick Clifton <nickc@redhat.com>
6453
6454 * elf32-arm.h (elf32_arm_final_link_relocate): Fix handling of
6455 R_ARM_THM_PC11.
6456
6457 2002-09-11 Jeffrey Law <law@redhat.com>
6458
6459 * elf32-h8300.c (elf32_h8_relax_section): Fix typo.
6460
6461 2002-09-11 Andrew Haley <aph@cambridge.redhat.com>
6462
6463 * elf.c (_bfd_elf_find_nearest_line): Check functionname_ptr and
6464 line_ptr before deciding we've found a symbol.
6465
6466 2002-09-11 Nick Clifton <nickc@redhat.com>
6467
6468 * po/da.po: New Danish translation file.
6469 * configure.in (LINGUAS): Add 'da'.
6470 * configure: Regenerate.
6471
6472 2002-09-10 Michael Snyder <msnyder@redhat.com>
6473
6474 * irix-core.c (do_sections, do_sections64): New functions.
6475 (irix_core_core_file_p): Call new functions do_sections,
6476 do_sections64, depending on corefile (32-bit or 64-bit).
6477
6478 2002-09-09 Richard Henderson <rth@redhat.com>
6479
6480 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21M
6481 and PCREL21F like PCREL21B.
6482
6483 2002-09-04 Kevin Buettner <kevinb@redhat.com>
6484
6485 * config.bfd (mips*-*-irix6*): Add new ABI vectors. Make n32 default
6486 vector.
6487
6488 2002-09-02 Nick Clifton <nickc@redhat.com>
6489
6490 * elf32-v850.c (v850_elf_final_link_relocate): Use helpful
6491 names instead of cryptically overloaded bfd_reloc error
6492 codes.
6493 (v850_elf_relocate_section): Likewise.
6494 (v850_elf_relax_section): Replace caching of external symbols
6495 with caching of internal symbols obtained from calling
6496 bfd_elf_get_elf_syms().
6497 Fixup problems with freeing cached allocated memory blocks.
6498
6499 2002-09-02 Alan Modra <amodra@bigpond.net.au>
6500
6501 * cpu-pj.c (scan_mach, compatible, arch_info_struct): Remove.
6502 (bfd_pj_arch): Use bfd_default_scan.
6503 * cpu-v850.c (scan): Remove.
6504 (N): Use bfd_default_scan.
6505 * cpu-z8k.c (scan_mach): Remove.
6506 (arch_info_struct, bfd_z8k_arch): Reorganize so that the default is
6507 first. Use bfd_default_scan.
6508
6509 * ecoff.c (_bfd_ecoff_set_arch_mach_hook): Don't use hard-coded
6510 bfd_mach constants.
6511 (ecoff_get_magic): Likewise.
6512 * elf32-v850.c (v850_elf_object_p): Likewise.
6513 (v850_elf_final_write_processing): Likewise.
6514 * mipsbsd.c (MY(set_arch_mach)): Likewise.
6515 (MY(write_object_contents)): Likewise.
6516 * coff64-rs6000.c (xcoff64_write_object_contents): Likewise.
6517 * coffcode.h (coff_write_object_contents): Likewise.
6518 (coff_set_arch_mach_hook): Add comment describing machine == 0.
6519 Remove unnecessary "machine" assignments.
6520 (coff_write_relocs): Test for the absolute section sym by testing
6521 section and flags.
6522
6523 * aoutx.h (NAME(aout,machine_type)): Recognize bfd_mach_i386_i386
6524 and bfd_mach_i386_i386_intel_syntax.
6525 * pdp11.c (NAME(aout,machine_type)): Likewise.
6526
6527 2002-08-30 John David Anglin <dave@hiauly1.hia.nrc.ca>
6528
6529 * bfd-in.h (align_power): Cast constants to bfd_vma type.
6530 * bfd-in2.h (align_power): Likewise.
6531
6532 2002-08-30 Alan Modra <amodra@bigpond.net.au>
6533
6534 * Makefile.am: Run "make dep-am".
6535 * Makefile.in: Regenerate.
6536
6537 * cpu-avr.c (compatible): Don't use hard-coded mach constants.
6538 * cpu-powerpc.c (powerpc_compatible): Likewise.
6539 * cpu-rs6000.c (rs6000_compatible): Likewise.
6540
6541 2002-08-28 Catherine Moore <clm@redhat.com>
6542
6543 * elf32-v850.c (v850_elf_reloc_map): Add new relocs.
6544 (v850-elf-reloc): Don't resolve pc relative relocs.
6545 (v850_elf_ignore_reloc): New routine.
6546 (v850_elf_final_link_relocate): Handle new relocs.
6547 (v850_elf_relax_delete_bytes ): New routine.
6548 (v850_elf_relax_section): New routine.
6549 (bfd_elf32_bfd_relax_section): Define.
6550 (HOWTO): New entries for new relocs.
6551 * reloc.c (BFD_RELOC_V850_LONGCALL): New reloc.
6552 (BFD_RELOC_V850_LONGJUMP): New reloc.
6553 (BFD_RELOC_V850_ALIGN): New reloc.
6554 * archures.c: Remove redundant v850ea architecture.
6555 * cpu-v850.c: Remove redundant v850ea support.
6556 * libbfd.h: Regenerate.
6557 * bfd-in2.h: Regenerated.
6558
6559 2002-08-28 Svein E. Seldal <Svein.Seldal@solidas.com>
6560
6561 * config.bfd: Add tic4x-*-*coff* and c4x-*-*coff* target.
6562 * configure.in: Add tic4x_coff vector files.
6563 * configure: Regenerate.
6564 * Makefile.am: Add tic4x target.
6565 * Makefile.in: Regenerate.
6566
6567 2002-08-27 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
6568
6569 * archures.c: Add the BFD arch type tic4x.
6570 * bfd-in.h: Add BFD_IN_MEMORY flag.
6571 * coff-tic4x.c: New file.
6572 * coffswap.h (coff_swap_sym_out): Add preadjuster.
6573 * cpu-tic4x.c: New file.
6574 * targets.c: Added tic4x- in list of xvecs.
6575 * ticoff.h: New file.
6576 * bfd-in2.h: Regenerate.
6577
6578 2002-08-27 Adam Nemet <anemet@lnxw.com>
6579
6580 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Set the last
6581 bit of DT_INIT and DT_FINI for Thumb functions.
6582
6583 2002-08-26 Alan Modra <amodra@bigpond.net.au>
6584
6585 * coffcode.h (coff_set_arch_mach_hook): Handle W65MAGIC.
6586
6587 2002-08-26 Alan Modra <amodra@bigpond.net.au>
6588
6589 * aoutx.h (NAME(aout,reloc_type_lookup)): Handle BFD_RELOC_8.
6590
6591 2002-08-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6592
6593 * elf32-sh.c (sh_elf_copy_indirect_symbol): New.
6594 (create_got_section, allocate_dynrelocs, readonly_dynrelocs):
6595 Likewise.
6596 (struct elf_sh_pcrel_relocs_copied): Removed.
6597 (struct elf_sh_dyn_relocs): New.
6598 (struct elf_sh_link_hash_entry): Replace pcrel_relocs_copied
6599 field with dyn_relocs.
6600 (struct elf_sh_link_hash_table): Add short-cuts to get dynamic
6601 sections and sym_sec.
6602 (sh_elf_link_hash_newfunc): Clear dyn_relocs.
6603 (sh_elf_link_hash_table_create): Clear shorts-cuts and sym_sec.
6604 (sh_elf_create_dynamic_sections): Use create_got_section instead
6605 of _bfd_elf_create_got_section.
6606 (sh_elf_check_relocs): Likewise.
6607 (sh_elf_create_dynamic_sections): Use short-cuts to the dynamic
6608 sections.
6609 (sh_elf_adjust_dynamic_symbol, sh_elf_size_dynamic_sections,
6610 sh_elf_relocate_section, sh_elf_check_relocs,
6611 sh_elf_finish_dynamic_symbol, sh_elf_finish_dynamic_sections):
6612 Likewise.
6613 (sh_elf_adjust_dynamic_symbol): Handle nocopyreloc. Keep the
6614 dynamic relocations and avoiding the copy relocation when we
6615 didn't find any dynamic relocations in the section which has
6616 contents or is read-only.
6617 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
6618 (sh_elf_size_dynamic_sections): Don't reset the size of
6619 .rela.got section even if dynamic_sections_created flag is off.
6620 Don't use sh_elf_discard_copies. Scan all input bfd and use
6621 allocate_dynrelocs. Call readonly_dynrelocs to determine
6622 whether we need DT_TEXTREL.
6623 (sh_elf_adjust_dynamic_symbol): Use plt.refcount to determine
6624 whether the symbol was never referred to.
6625 (sh_elf_relocate_section): Use WILL_CALL_FINISH_DYNAMIC_SYMBOL.
6626 (sh_elf_gc_sweep_hook): Fill with the real sweep function.
6627 (sh_elf_check_relocs): Call create_got_section if the short-cut
6628 to .got is null. Increment reference counters only instead of
6629 allocating space on dynamic sections here. Don't conditionalize
6630 uninitialized got.offset value when marking the symbol as a
6631 global offset table entry. Keep relocations for symbols satisfied
6632 by a dynamic library to avoid copy relocations for the symbol.
6633 Set dynobj field of an elf hash table if needed.
6634 (sh_elf_finish_dynamic_sections): Handle null section pointer
6635 correctly.
6636 (elf_backend_copy_indirect_symbol): Defined.
6637 (elf_backend_can_refcount): Defined.
6638
6639 2002-08-23 Nick Clifton <nickc@redhat.com>
6640
6641 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Undo
6642 previous change. Add comment explaining why.
6643
6644 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>
6645
6646 * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le): Copy
6647 contents of .got.plt[2] to tr0, not address of .got.plt.
6648 (sh_elf_finish_dynamic_symbol): Do not apply GOT_BIAS when
6649 patching absolute plt entry. For shmedia plt entry, set bottom bit
6650 of branch to plt0 as this is a branch to an shmedia instruction.
6651 * elf64-sh64.c (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le):
6652 Copy contents of .got.plt[2] to tr0, not address of .got.plt.
6653 (elf_sh64_plt_entry_be, elf_sh64_plt_entry_le): Use ptrel to
6654 branch to plt0.
6655 (sh64_elf64_finish_dynamic_symbol): Do not apply GOT_BIAS when
6656 patching absolute plt entry. For shmedia plt entry, branch to
6657 plt0 is now ptrel, so use relative offset. Set bottom bit of
6658 branch target as it is a branch to an shmedia instruction.
6659
6660 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>,
6661 Richard Shann <richard.shann@superh.com>
6662
6663 * elf32-sh.c (sh_elf_finish_dynamic_sections): Set LSB of DT_INIT
6664 value if .init is an SHmedia function. Similarly for DT_FINI.
6665 * elf64-sh64.c (sh64_elf64_finish_dynamic_sections): Likewise.
6666
6667 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>
6668
6669 * elf32-sh.c (sh_elf_size_dynamic_sections): Zero initialize
6670 dynamic section.
6671 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
6672
6673 2002-08-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6674
6675 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use a simple
6676 byte read when reading the return address register column.
6677
6678 2002-08-22 Nick Clifton <nickc@redhat.com>
6679
6680 * config.bfd: Add powepc64-*-*bsd* target.
6681
6682 2002-08-22 Graeme Peterson <gp@qnx.com>
6683
6684 * Makefile.am: Add entries for elf32-shqnx.c
6685 * Makefile.in: Regenerate.
6686 * config.bfd: Add support sh-*-nto* target.
6687 * configure.in: Add support for bfd_elf32_sh{l}qnx_vec.
6688 * configure: Regenerate.
6689 * elf32-qnx.h: Changed typo "elf_i386qnx_*" to "elf_qnx_*" .
6690 * elf32-sh.c: Do not include elf32-target.h if
6691 ELF32_SH_C_INCLUDED is defined.
6692 * elf32-shqnx.c: New file: Support for QNX.
6693 * targets.c: Add bfd_elf32_sh{l}qnx_vec.
6694
6695 2002-08-22 Nick Clifton <nickc@redhat.com>
6696
6697 * po/tr.po: Updated Turkish translation.
6698
6699 * syms.c (_bfd_generic_read_minisymbols): Set bfd_error if the
6700 symbols are not read.
6701
6702 2002-08-22 Alan Modra <amodra@bigpond.net.au>
6703
6704 * elf32-m68hc11.c: Formatting fixes.
6705 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
6706 * elf32-m68hc12.c: Formatting fixes.
6707 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
6708
6709 2002-08-22 Alan Modra <amodra@bigpond.net.au>
6710
6711 * coff-rs6000.c (rs6000coff_vec <object_flags>): Add SEC_CODE and
6712 SEC_DATA.
6713 (pmac_xcoff_vec): Likewise.
6714 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
6715 (aix5coff64_vec): Likewise.
6716
6717 2002-08-22 Alan Modra <amodra@bigpond.net.au>
6718
6719 * elf-bfd.h (struct elf_backend_data): Add struct elf_backend_data
6720 param to elf_backend_copy_indirect_symbol.
6721 (_bfd_elf_link_hash_copy_indirect): Likewise.
6722 * elflink.h (elf_add_default_symbol, elf_fix_symbol_flags): Adjust
6723 calls to copy_indirect_symbol.
6724 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
6725 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
6726 * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
6727 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
6728 * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
6729 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
6730 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
6731 * elfxx-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
6732 * elfxx-mips.h (_bfd_mips_elf_copy_indirect_symbol): Likewise.
6733 * elf.c (_bfd_elf_link_hash_copy_indirect): Likewise. Properly
6734 test refcounts for "used" values.
6735
6736 2002-08-21 John David Anglin <dave@hiauly1.hia.nrc.ca>
6737
6738 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Add PARAMS to
6739 argument declaration.
6740
6741 2002-08-19 Elena Zannoni <ezannoni@redhat.com>
6742
6743 * archures.c (bfd_mach_ppc_e500): Added.
6744 * bfd-in2.h: Rebuilt.
6745 * cpu-powerpc.c (bfd_powerpc_archs): Added e500.
6746
6747 2002-08-19 Alan Modra <amodra@bigpond.net.au>
6748
6749 * elf32-m68hc12.c (elf_backend_can_gc_sections): False.
6750
6751 2002-08-17 Andrew Cagney <ac131313@redhat.com>
6752
6753 * elf.c (bfd_elf_get_elf_syms): Change type of `esym' to
6754 `bfd_byte'.
6755
6756 2002-08-17 Stan Cox <scox@redhat.com>
6757
6758 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Use the
6759 IRIX 6 segment layout for NEWABI.
6760
6761 2002-08-16 Stephen Clarke <stephen.clarke@superh.com>
6762
6763 * elf32-sh.c (sh_elf_gc_mark_hook): For sh64, skip indirect
6764 symbols when looking for section referred to by a relocation.
6765 * elf64-sh.c (sh_elf64_gc_mark_hook): Likewise.
6766
6767 2002-08-15 Alan Modra <amodra@bigpond.net.au>
6768
6769 * elf32-i370.c: Move reloc enum to include/elf/i370.h.
6770
6771 2002-08-15 Hans-Peter Nilsson <hp@axis.com>
6772
6773 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Add
6774 missing check for whether the symbol is referenced by DSO before
6775 unexporting it as an unneeded dynamic symbol.
6776
6777 2002-08-14 H.J. Lu <hjl@gnu.org>
6778
6779 * libbfd.h: Regenerate.
6780
6781 2002-08-14 H.J. Lu <hjl@gnu.org>
6782
6783 * config.bfd: Always add 64bit vectors to 32bit Linux/mips.
6784
6785 2002-08-14 Stephane Carrez <stcarrez@nerim.fr>
6786
6787 * elf32-m68hc11.c (m68hc11_relax_group): New to relax group of
6788 instructions.
6789 (m68hc11_direct_relax): New to define table of relaxable instructions.
6790 (find_relaxable_insn): New, find a relaxable insn.
6791 (compare_reloc): New to compare two relocs.
6792 (m68hc11_elf_relax_section): New, relax text sections.
6793 (m68hc11_elf_relax_delete_bytes): New, delete bytes and adjust branchs.
6794 (elf32_m68hc11_check_relocs): New function for GC support.
6795 (elf32_m68hc11_relocate_section): New function for GC support.
6796 (bfd_elf32_bfd_relax_section): Define to support linker relaxation.
6797 (elf_backend_check_relocs): Likewise.
6798 (elf_backend_relocate_section): Likewise.
6799
6800 2002-08-13 H.J. Lu <hjl@gnu.org>
6801
6802 * elflink.h (NAME(bfd_elf,size_dynamic_sections): Don't count
6803 definitions in shared objects when checking symbol with
6804 undefined version.
6805
6806 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6807
6808 * elf32-m68hc11.c (elf32_m68hc11_gc_mark_hook): New for section GC.
6809 (elf32_m68hc11_gc_sweep_hook): Likewise.
6810 (elf_backend_gc_mark_hook): Define for GC section support.
6811 (elf_backend_gc_sweep_hook): Likewise.
6812 (elf_backend_can_gc_sections): Likewise.
6813
6814 * elf32-m68hc12.c: Likewise.
6815
6816 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6817
6818 * elf32-m68hc11.c (_bfd_m68hc11_elf_print_private_bfd_data): New.
6819 (_bfd_m68hc11_elf_merge_private_bfd_data): New function.
6820 (_bfd_m68hc11_elf_set_private_flags): New function.
6821 Use them to set/check/print ELF flags specific to 68HC11.
6822
6823 * elf32-m68hc12.c (_bfd_m68hc12_elf_print_private_bfd_data): New.
6824 (_bfd_m68hc12_elf_merge_private_bfd_data): New function.
6825 (_bfd_m68hc12_elf_set_private_flags): New function.
6826 Use them to set/check/print ELF flags specific to 68HC12.
6827
6828 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6829
6830 * elf32-m68hc11.c (elf_m68hc11_howto_table): Add the new relocs;
6831 fix masks for PC-rel relocs.
6832 (m68hc11_elf_ignore_reloc): New function.
6833
6834 * elf32-m68hc12.c (m68hc12_elf_special_reloc): New to handle specific
6835 68HC12 banked addressing relocs.
6836 (m68hc12_phys_addr): New to compute physical address of banked memory.
6837 (m68hc12_phys_page): Likewise for page.
6838 (m68hc12_addr_is_banked): New to see if address is in banked area.
6839 (elf_m68hc12_howto_table): Add new relocs and rename to xx12.
6840
6841 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6842
6843 * reloc.c (BFD_RELOC_M68HC11_RL_JUMP, BFD_RELOC_M68HC11_RL_GROUP,
6844 BFD_RELOC_M68HC11_LO16, BFD_RELOC_M68HC11_PAGE,
6845 BFD_RELOC_M68HC11_24): New relocs for 68HC11/68HC12.
6846 * bfd-in2.h: Regenerate.
6847
6848 2002-08-12 H.J. Lu <hjl@gnu.org>
6849
6850 * elflink.h (elf_add_default_symbol): Preserve section across
6851 elf_merge_symbol.
6852
6853 2002-08-09 Graeme Peterson <gp@qnx.com>
6854
6855 * Makefile.am: Add entries for elf32-ppcqnx.c, and add
6856 elf32-qnx.h dependency to elfarmqnx-nabi.c and elf32-i386qnx.c.
6857 * Makefile.in: Regenerate.
6858 * config.bfd: Add support for powerpc{le}-*-nto targets.
6859 * configure.in: Add support for bfd_elf32_powerpc{le}qnx_vec.
6860 * configure: Regenerate.
6861 * elf32-i386qnx.c: Moved backend functions into a QNX specific
6862 common file "elf32-qnx.h", and now include that file.
6863 * elf32-qnx.h: New file: QNX specific common elf backend.
6864 * elf32-ppc.c: Do not include elf32-target.h if
6865 ELF32_PPC_C_INCLUDED is defined.
6866 * elf32-ppcqnx.c: New file: Support for QNX.
6867 * elfarmqnx-nabi.c: Include elf32-qnx.h for qnx elf backend.
6868 * targets.c: Add bfd_elf32_powerpc{le}qnx_vec.
6869
6870 2002-08-09 Nick Clifton <nickc@redhat.com>
6871
6872 * po/sv.po: Updated Swedish translation.
6873
6874 2002-08-09 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6875
6876 * elfxx-mips.c (mips_elf_global_got_index): Avoid segfault if
6877 g->global_gotsym is NULL.
6878
6879 2002-08-08 H.J. Lu <hjl@gnu.org>
6880
6881 * elflink.h (elf_add_default_symbol): Don't warn if a definition
6882 overrides an indirect versioned symbol.
6883
6884 2002-08-08 Jakub Jelinek <jakub@redhat.com>
6885
6886 * elf32-i386.c (elf_i386_relocate_section): Fill in proper addend
6887 for R_386_TLS_TPOFF32 relocs against symndx 0.
6888
6889 2002-08-07 H.J. Lu <hjl@gnu.org>
6890
6891 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Check symbol
6892 with undefined version if needed.
6893 (elf_link_assign_sym_version): Match a default symbol with a
6894 version without definition. No need to hide the default
6895 definition separately.
6896
6897 2002-08-08 Alan Modra <amodra@bigpond.net.au>
6898
6899 * elflink.h (elf_link_output_extsym): Don't output symbols from
6900 SEC_EXCLUDE sections.
6901
6902 * aoutx.h (aout_link_write_symbols): Correct handling of warning syms.
6903
6904 2002-08-07 Alan Modra <amodra@bigpond.net.au>
6905
6906 * elf64-ppc.c (edit_opd): Arrange to drop symbols for discarded .opd
6907 entries.
6908
6909 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6910
6911 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Cast signedness
6912 mismatch.
6913
6914 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6915
6916 * elfxx-mips.c (ABI_64_P): Remove superfluous check.
6917
6918 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6919
6920 * elf32-mips.c (mips_reloc_map): Fix typo.
6921
6922 2002-08-06 Alan Modra <amodra@bigpond.net.au>
6923
6924 * xcofflink.c (xcoff_write_global_symbol): Set n_scnum for abs_section.
6925
6926 2002-08-06 Alan Modra <amodra@bigpond.net.au>
6927
6928 * elf64-ppc.c (ppc64_elf_howto_raw): Zero all src_mask entries.
6929
6930 2002-08-06 Alan Modra <amodra@bigpond.net.au>
6931
6932 * libxcoff.h: Use PARAMS on function declarations.
6933 * coff-rs6000.c (xcoff_generate_rtinit): Simplify size calc.
6934 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
6935
6936 * coff-rs6000.c: (xcoff_rtype2howto): Don't place reloc address in
6937 addend.
6938 * coff64-rs6000.c: (xcoff64_rtype2howto): Likewise.
6939
6940 2002-08-06 Alan Modra <amodra@bigpond.net.au>
6941
6942 * coff-rs6000.c: Formatting fixes.
6943 (xcoff_calculate_relocation): Use PARAMS in declaration.
6944 (xcoff_complain_overflow): Likewise.
6945 (xcoff_ppc_relocate_section): Use old-style function pointer call.
6946 (bfd_xcoff_backend_data): Remove useless comments.
6947 (rs6000coff_vec): Likewise.
6948 (bfd_pmac_xcoff_backend_data): Likewise.
6949 (pmac_xcoff_vec): Likewise.
6950
6951 * coff64-rs6000.c: Formatting fixes.
6952 (xcoff64_calculate_relocation): Use PARAMS in declaration.
6953 (xcoff64_ppc_relocate_section): Use old-style function pointer call.
6954 (bfd_xcoff_backend_data): Remove useless comments.
6955 (rs6000coff64_vec): Likewise.
6956 (bfd_xcoff_aix5_backend_data): Likewise.
6957 (aix5coff64_vec): Likewise.
6958
6959 2002-08-06 Alan Modra <amodra@bigpond.net.au>
6960
6961 * coff-rs6000.c (xcoff_howto_table): Revert some of last change to
6962 mask entries. Use complain_overflow_dont for R_REF.
6963 (xcoff_reloc_type_ba): Revert last change.
6964 (xcoff_reloc_type_br): Likewise.
6965 (xcoff_reloc_type_crel): Likewise.
6966 (xcoff_ppc_relocate_section): Likewise.
6967 * coff64-rs6000.c (xcoff64_reloc_type_br): Likewise.
6968 (xcoff64_ppc_relocate_section): Likewise.
6969 (xcoff64_howto_table): Revert some of last change to mask entries.
6970 Use complain_overflow_dont for R_REF.
6971
6972 * coff-rs6000.c (xcoff_howto_table): Fix src_mask entries. Make all
6973 relocs with bitsize == 16 have size = 1.
6974 (xcoff_reloc_type_ba): Correct src_mask and dst_mask adjustment.
6975 (xcoff_reloc_type_br): Likewise.
6976 (xcoff_reloc_type_crel): Likewise.
6977 (xcoff_ppc_relocate_section): Set up src_mask and dst_mask correctly.
6978 * coff64-rs6000.c (xcoff64_reloc_type_br): Correct src_mask and
6979 dst_mask adjustment.
6980 (xcoff64_ppc_relocate_section): Set up src_mask and dst_mask correctly.
6981 (xcoff64_howto_table): Fix src_mask entries. Make all relocs with
6982 bitsize == 16 have size = 1.
6983
6984 2002-08-01 Denis Chertykov <denisc@overta.ru>
6985
6986 * elf32-ip2k.c: Processor manufacturer changed to Ubicom.
6987 (struct misc): New field isymbuf. All free_* fields removed.
6988 (symbol_value): Pass in internal syms. No need to swap syms in.
6989 (ip2k_elf_relax_section): Use bfd_elf_get_elf_syms. Properly free
6990 possibly cached info.
6991 (tidyup_after_error): Removed.
6992 (ip2k_elf_relax_section_pass1): Don't use removed fields of struct
6993 misc. Use new field.
6994 (adjust_all_relocations): Use internal syms. No need to swap syms
6995 in and out.
6996 (add_page_insn): Don't use removed fields of struct misc.
6997
6998 2002-08-01 Nick Clifton <nickc@redhat.com>
6999
7000 * elf32-arm.h: Revert previous delta.
7001
7002 2002-08-01 Nick Clifton <nickc@redhat.com>
7003
7004 * configure.in (AM_INIT_AUTOMAKE): Bump version number.
7005 * configure: Regenerate.
7006
7007 2002-07-31 H.J. Lu <hjl@gnu.org>
7008
7009 * config.bfd: Add x86-64 vector to Linux/i386 if 64bit BFD is
7010 selected.
7011
7012 2002-07-31 H.J. Lu <hjl@gnu.org>
7013
7014 * config.bfd: Add n32 vectors to 32bit Linux/mips if 64bit BFD
7015 is selected.
7016
7017 2002-07-31 Jakub Jelinek <jakub@redhat.com>
7018
7019 * elf32-i386.c (elf_i386_copy_indirect_symbol): Swap tls_type
7020 if _bfd_elf_link_hash_copy_indirect will swap got.refcount.
7021
7022 2002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
7023
7024 * cpu-ns32k.c (_bfd_ns32k_put_immdeiate, _bfd_ns32k_get_immediate):
7025 There is no 8 byte relocation type for this architecture.
7026 (do_ns32k_reloc): Use bfd_vma instead of native types.
7027 (bfd_ns32k_put_immediate, _bfd_ns32k_relocate_contents) put_data
7028 returns void.
7029 (_bfd_ns32k_put_displacement): Don't check for overflow. We can
7030 rely on generic code to do that.
7031 * aout-ns32k.c (howto_table): Add appropriate overflow detection
7032 to all table entries.
7033 (_bfd_ns32k_relocate_contents): put_data returns void.
7034 * ns32k.h: (_bfd_ns32k_put_displacement, _bfd_ns32k_put_immediate)
7035 (_bfd_do_ns32k_reloc_contents): Fix prototypes. put data functions
7036 return void.
7037
7038 2002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
7039
7040 * aoutx.h (aout_link_check_ar_symbols): Whether to include an
7041 archive object is target dependant.
7042
7043 2002-07-31 Adam Nemet <anemet@lnxw.com>
7044
7045 * elf32-arm.h (ARM_PLT_ENTRY_SIZE): Rename PLT_ENTRY_SIZE.
7046 (THUMB_PLT_ENTRY_SIZE): New macro.
7047 (PLT_ENTRY_SIZE): Return the appropriate *_PLT_ENTRY_SIZE.
7048 (elf32_arm_plt0_entry): Rename PLT_ENTRY_SIZE to
7049 ARM_PLT_ENTRY_SIZE.
7050 (elf32_arm_plt_entry): Likewise.
7051 (elf_backend_plt_header_size): Likewise.
7052 (elf32_thumb_plt0_entry): New global.
7053 (elf32_arm_finish_dynamic_sections): Use it. Put Thumb entries
7054 into .plt.thumb.
7055 (elf32_thumb_plt_entry): New global.
7056 (elf32_arm_finish_dynamic_symbol): Use it. Use .thumb.plt for
7057 Thumb entries. Set the bottom bit of the corresponding GOT entry
7058 for a Thumb PLT entry.
7059 (struct elf32_arm_plt_entry_info): New structure.
7060 (struct elf32_arm_link_hash_entry, plt_info): New member of this
7061 type.
7062 (elf32_arm_link_hash_newfunc): Initialize new member.
7063 (elf32_arm_final_link_relocate, R_ARM_THM_PC22 case): Handle
7064 relocations against the PLT.
7065 (elf32_arm_check_relocs, case R_ARM_PLT32 case): Set
7066 first_rel_type if this is the first time we encounter the symbol.
7067 (elf32_arm_check_relocs, case R_ARM_THM_PC22 case): New case.
7068 Determine if relocation needs a PLT entry. Set first_rel_type if
7069 this is the first time we encounter the symbol
7070 (elf32_arm_adjust_dynamic_symbol): Create PLT entries for Thumb
7071 functions as well.
7072 (elf32_arm_size_dynamic_sections): Handle .plt.thumb like .plt.
7073 (elf32_arm_create_dynamic_sections): New function. Create the
7074 .plt.thumb section.
7075 (elf_backend_create_dynamic_sections): Call it.
7076
7077 2002-07-31 Nick Clifton <nickc@redhat.com>
7078
7079 * bfd.c (bfd_alt_mach_code): Rename parameter 'index' to
7080 'alternative' in order to avoid shadowing global symbol of the
7081 same name.
7082 * bfd-in2.h: Regenerate.
7083 * libbfd.h: Regenerate.
7084 * libcoff.h: Regenerate.
7085
7086 2002-07-31 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7087
7088 * Makefile.am: Add n32 ABI support.
7089 * Makefile.in: Regenerate.
7090 * config.bfd: Add n32 vectors to mips64*-*-linux* targets. Treat 64
7091 bit vectors for mips*-*-linux targets as optional.
7092 * configure.in: Add n32 ABI vectors.
7093 * configure: Regenerate.
7094 * elf32-mips.c (mips_elf32_object_p): Reject n32 ABI files.
7095 * elfn32-mips.c: New file, n32 ABI support.
7096 * targets.c: Add n32 ABI vectors.
7097
7098 2002-07-30 Graeme Peterson <gp@qnx.com>
7099
7100 * elfarmqnx-nabi.c: New file: Support for QNX.
7101 * config.bfd: Add support for arm-*-nto target.
7102 * configure.in: Add support for bfd_elf32_{big|little}armqnx_vec.
7103 * configure: Regenerate.
7104 * Makefile.am: Add entries for elfarmqnx-nabi.c.
7105 * Makefile.in: Regenerate.
7106 * elf32-arm.h (ELF_MAXPAGESIZE): Do not define if already defined.
7107 Do not define global function if ELFARM_NABI_C_INCLUDED is defined.
7108 * elfarm-nabi.c: Do not include elf32-arm.h if
7109 ELFARM_NABI_C_INCLUDED is defined.
7110 * targets.c: Add bfd_elf32_{big|little}armqnx_vec.
7111
7112 2002-07-30 Nick Clifton <nickc@redhat.com>
7113
7114 * po/sv.po: Updated Swedish translation.
7115
7116 2002-07-30 Jakub Jelinek <jakub@redhat.com>
7117
7118 * elf.c (elf_fake_sections): Fix up .tbss sh_size and sh_type.
7119
7120 2002-07-30 Alan Modra <amodra@bigpond.net.au>
7121
7122 * aoutx.h (some_aout_object_p): Clean up tdata properly on error.
7123 * archive.c (bfd_generic_archive_p): Likewise.
7124 * coff-rs6000.c (_bfd_xcoff_archive_p): Likewise.
7125 (_bfd_xcoff_archive_p): Use bfd_scan_vma in place of strtol.
7126 * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
7127 (xcoff64_archive_p): Likewise.
7128 (xcoff64_openr_next_archived_file): Likewise.
7129 (xcoff64_archive_p): Clean up tdata properly on error.
7130 * coffgen.c (coff_real_object_p): Likewise.
7131 (coff_object_p): Release filehdr and opthdr.
7132 * ecoff.c (_bfd_ecoff_archive_p): Clean up tdata properly on error.
7133 * ieee.c (ieee_archive_p): Likewise.
7134 * ihex.c (ihex_object_p): Likewise.
7135 (ihex_mkobject): Always allocate tdata.
7136 * peicode.h (pe_ILF_object_p): Release bfd_alloc'd buffer on error.
7137 * srec.c (srec_mkobject): Always allocate tdata.
7138 (srec_object_p): Clean up tdata properly on error.
7139 (symbolsrec_object_p): Likewise.
7140 * versados.c (versados_object_p): Likewise.
7141 * vms-misc.c (_bfd_vms_get_record): Use bfd_malloc instead of malloc,
7142 and bfd_realloc instead of realloc.
7143 (add_new_contents): Use bfd_alloc instead of bfd_malloc for sections.
7144 * vms.c (vms_initialize): Always allocate tdata. Use bfd_alloc in
7145 place of bfd_malloc, simplifying error freeing. Free hash table too.
7146 (vms_object_p): Clean up tdata on error.
7147 (vms_mkobject): Don't complain on stderr if vms_initialize fails.
7148 (vms_close_and_cleanup): Adjust for bfd_alloc use.
7149
7150 2002-07-30 Alan Modra <amodra@bigpond.net.au>
7151
7152 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set e_flags.
7153
7154 2002-07-26 Chris Demetriou <cgd@broadcom.com>
7155
7156 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Merge ASE
7157 flags into resulting BFD.
7158
7159 2002-07-26 Alan Modra <amodra@bigpond.net.au>
7160
7161 From John Reiser <jreiser@BitWagon.com>
7162 * elf32-i386.c (elf_i386_link_hash_table_create): Clear
7163 tls_ldm_got.refcount.
7164
7165 2002-07-25 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7166
7167 * elf64-mips.c: Update TODO comment.
7168 (mips_elf64_higher_reloc,mips_elf64_highest_reloc,
7169 mips_elf64_gprel16_reloca): Remove prototypes.
7170 (mips16_jump_reloc,mips16_gprel_reloc): Add functions.
7171 (UNUSED_RELOC): Replace by EMPTY_RELOC.
7172 (mips_elf64_howto_table_rel): Use special R_MIPS_HI16 handling. Remove
7173 wrong comments. Remove disfunctional support of R_MIPS_HIGHER and
7174 R_MIPS_HIGHEST.
7175 (mips_elf64_howto_table_rela): Fix handling of R_MIPS_GPREL16 and
7176 R_MIPS_GOT16. Remove wrong comments.
7177 (elf_mips16_jump_howto,elf_mips16_gprel_howto,
7178 elf_mips_gnu_vtinherit_howto,elf_mips_gnu_vtentry_howto): New, code
7179 from elf32-mips.c.
7180 (mips_elf64_hi16_reloc): Fix formatting.
7181 (mips_elf64_higher_reloc,mips_elf64_highest_reloc): Remove.
7182 (mips_elf64_got16_reloc): Fix formatting. Remove superfluous code.
7183 Better comment. Fall back to R_MIPS_GOT_DISP instead of abort().
7184 (mips_elf64_gprel16_reloc): Make static. Add check for
7185 partial_inplace.
7186 (mips_elf64_gprel16_reloca): Remove.
7187 (mips_elf64_literal_reloc): New function.
7188 (mips_elf64_gprel32_reloc): Fix formatting.
7189 (mips_elf64_shift6_reloc): Fix comment. Make static.
7190 (mips16_jump_reloc,mips16_gprel_reloc): New functions, code from
7191 elf32-mips.c.
7192 (elf_reloc_map,mips_reloc_map): New mapping table, similiar as in
7193 elf32-mips.c
7194 (bfd_elf64_bfd_reloc_type_lookup): Use the mapping table. Enable GNU
7195 specific relocations.
7196 (mips_elf64_rtype_to_howto): Enable GNU specific relocations.
7197 (mips_elf64_object_p): Invert logic to check for SGI-ish ABI.
7198 (ELF_MAXPAGESIZE): Add comment.
7199
7200 2002-07-25 Nick Clifton <nickc@redhat.com>
7201
7202 * po/sv.po: Updated Swedish translation.
7203 * po/es.po: Updated Spanish translation.
7204 * po/fr.po: Updated French translation.
7205
7206 2002-07-25 Alan Modra <amodra@bigpond.net.au>
7207
7208 * elf-bfd.h (_bfd_elf32_link_record_local_dynamic_symbol): Define
7209 as elf_link_record_local_dynamic_symbol.
7210 (_bfd_elf64_link_record_local_dynamic_symbol): Likewise.
7211 (elf_link_record_local_dynamic_symbol): Declare. Now returns int.
7212 * elflink.h (elf_link_record_local_dynamic_symbol): Move to..
7213 * elflink.c: .. here. Use bfd_elf_get_elf_syms. Check whether an
7214 attempt is made to record a symbol in a discarded section, and
7215 return `2' in that case.
7216
7217 2002-07-24 Nick Clifton <nickc@redhat.com>
7218
7219 * po/sv.po: Updated Swedish translation.
7220 * po/es.po: Updated Spanish translation.
7221
7222 2002-07-23 Alan Modra <amodra@bigpond.net.au>
7223
7224 * po/SRC-POTFILES.in: Regenerate.
7225
7226 * elf-hppa.h (elf_hppa_relocate_section): If relocatable, return
7227 immediately. Remove code handling relocatable linking.
7228 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
7229 * elf32-cris.c (cris_elf_relocate_section): Likewise.
7230 * elf32-fr30.c (elf32_frv_relocate_section): Likewise.
7231 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
7232 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
7233 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
7234 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
7235 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
7236 * elf32-v850.c (v850_elf_relocate_section): Likewise.
7237 * elf32-vax.c (elf_vax_relocate_section): Likewise.
7238 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7239 * elf32-avr.c (elf_backend_rela_normal): Define.
7240 * elf32-cris.c: Likewise.
7241 * elf32-fr30.c: Likewise.
7242 * elf32-frv.c: Likewise.
7243 * elf32-h8300.c: Likewise.
7244 * elf32-hppa.c: Likewise.
7245 * elf32-ip2k.c: Likewise.
7246 * elf32-sparc.c: Likewise.
7247 * elf32-v850.c: Likewise.
7248 * elf32-vax.c: Likewise.
7249 * elf64-hppa.c: Likewise.
7250 * elf64-sparc.c: Likewise.
7251 * elf32-fr30.c (elf32_frv_relocate_section): Edit comment.
7252 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
7253 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
7254 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
7255 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
7256 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
7257 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
7258 * elf-m10200.c (USE_RELA): Don't define.
7259 * elf-m10300.c: Likewise.
7260 * elfarm-oabi.c: Likewise.
7261 * elf32-i370.c: Likewise.
7262 * elf32-ip2k.c: Likewise.
7263 * elf32-m68k.c: Likewise.
7264 * elf32-mcore.c: Likewise.
7265 * elf32-ppc.c: Likewise.
7266 * elf32-s390.c: Likewise.
7267 * elf32-vax.c: Likewise.
7268 * elf64-ppc.c: Likewise.
7269 * elf64-s390.c: Likewise.
7270 * elf64-x86-64.c: Likewise.
7271 * elfxx-ia64.c: Likewise.
7272 * elf32-avr.c (USE_REL): Don't undef.
7273 * elf32-ip2k.c: Likewise.
7274
7275 2002-07-23 Nick Clifton <nickc@redhat.com>
7276
7277 * elf-bfd.h (struct elf_backend_data): Add new bitfield
7278 'want_p_paddr_set_to_zero'.
7279 * elfxx-target.h: Set default value for want_p_paddr_set_to_zero
7280 to false;
7281 * elfxx-ia64.c: Set want_p_paddr_set_zero for HPUX target.
7282 * elf.c (copy_private_bfd_data): Test want_p_paddr_set_zero.
7283
7284 2002-07-23 Gabor Keresztfalvi <keresztg@mail.com>
7285
7286 * nlmcode.h (nlm_swap_auxiliary_headers_out): Swapped the order of
7287 the MeSsAgEs and CoPyRiGhT tags to make >=NW4.x NLM loaders to
7288 show the Copyright string.
7289 Minor formatting tidy ups.
7290
7291 2002-07-23 Nick Clifton <nickc@redhat.com>
7292
7293 * po/fr.po: Updated French translation.
7294 * po/sv.po: Updated Swedish translation.
7295
7296 2002-07-23 Alan Modra <amodra@bigpond.net.au>
7297
7298 * elflink.h (elf_link_input_bfd): Don't change internal symbols
7299 when outputting relocs.
7300
7301 2002-07-20 Jason Thorpe <thorpej@wasabisystems.com>
7302
7303 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only insert
7304 DT_PLTGOT into the dynamic section if there is a PLT.
7305
7306 2002-07-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7307
7308 * elfxx-mips.c (_bfd_mips_elf_discard_info): New function, code from
7309 elf32-mips.c.
7310 (_bfd_mips_elf_write_section): Likewise.
7311 * elfxx-mips.h (_bfd_mips_elf_discard_info): New prototype.
7312 (_bfd_mips_elf_write_section): Likewise.
7313 * elf32-mips.c (elf32_mips_discard_info): Move to elfxx-mips.c.
7314 (elf32_mips_write_section): Likewise.
7315 * elf64-mips.c (_bfd_mips_elf_ignore_discarded_relocs): Use it.
7316 (_bfd_mips_elf_write_section): Likewise.
7317
7318 2002-07-19 Alan Modra <amodra@bigpond.net.au>
7319
7320 * elfxx-ia64.c: (elfNN_ia64_modify_segment_map): Properly scan
7321 PT_IA_64_UNWIND segments for a given section.
7322
7323 2002-07-17 H.J. Lu <hjl@gnu.org>
7324
7325 * Makefile.am: Fix a typo.
7326 * Makefile.in: Regenerate.
7327
7328 2002-07-15 Denis Chertykov <denisc@overta.ru>
7329 Frank Ch. Eigler <fche@redhat.com>
7330 Ben Elliston <bje@redhat.com>
7331 Alan Lehotsky <alehotsky@cygnus.com>
7332 John Healy <jhealy@redhat.com>
7333 Graham Stott <grahams@redhat.com>
7334 Jeff Johnston <jjohnstn@redhat.com>
7335
7336 * Makefile.am: Add support for ip2k.
7337 * Makefile.in: Regenerate.
7338 * doc/Makefile.in: Regenerate.
7339 * archures.c: Add support for ip2k.
7340 * config.bfd: Add support for ip2k.
7341 * configure.in: Add support for ip2k.
7342 * configure: Regenerate.
7343 * reloc.c: Add support for ip2k.
7344 * targets.c: Add support for ip2k.
7345 * bfd-in2.h: Regenerate.
7346 * libbfd.h: Regenerate.
7347 * cpu-ip2k.c: New file.
7348 * elf32-ip2k.c: New file.
7349
7350 2002-07-17 Ian Rickards <irickard@arm.com>
7351
7352 * dwarf2.c (concat_filename): If we can't establish the directory
7353 just return the filename.
7354
7355 2002-07-16 Moritz Jodeit <moritz@jodeit.org>
7356
7357 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Correct order of memset args.
7358
7359 2002-07-16 Alan Modra <amodra@bigpond.net.au>
7360
7361 * elflink.h: Formatting fixes, tidy prototypes.
7362 (elf_link_assign_sym_version): Move common code out of loop.
7363
7364 2002-07-16 Alan Modra <amodra@bigpond.net.au>
7365
7366 * elflink.h (elf_link_input_bfd): Don't call reloc_emitter when
7367 reloc section size is zero. Correct reloc output location.
7368
7369 2002-07-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
7370
7371 * elf-hppa.h (elf_hppa_reloc_final_type): Use R_PARISC_PCREL16F as
7372 the final type for the e_fsel selector when generating PA2.0W code.
7373 (elf_hppa_relocate_insn): Provide support for PA2.0W 16-bit format 1
7374 relocations.
7375
7376 2002-07-14 H.J. Lu <hjl@gnu.org>
7377
7378 * elflink.h (elf_link_assign_sym_version): Hide the default
7379 definition if there is a hidden versioned definition.
7380
7381 2002-07-12 Hans-Peter Nilsson <hp@axis.com>
7382
7383 * elf32-cris.c (cris_elf_relocate_section): Drop nonsensical
7384 dynamic reference test in assertion when initializing GOT with
7385 static contents. Just assert that there are either no dynamic
7386 sections, the symbol is defined in the regular objects or that the
7387 symbol is undef weak. Tweak comment.
7388 (elf_cris_finish_dynamic_symbol): Emit .got reloc for a program
7389 only if the symbol isn't defined in the program and isn't undef
7390 weak.
7391 (elf_cris_adjust_dynamic_symbol): Simplify condition for getting
7392 rid of PLT entry: only do it if the symbol isn't defined in a DSO.
7393 When doing so, clear ELF_LINK_HASH_NEEDS_PLT. Tweak comments.
7394 (elf_cris_discard_excess_program_dynamics): Don't consider
7395 ELF_LINK_HASH_REF_DYNAMIC when omitting .got runtime relocs.
7396
7397 2002-07-11 Alan Modra <amodra@bigpond.net.au>
7398
7399 * elf32-i386.c (elf_i386_relocate_section): Don't complain about
7400 unresolved debugging relocs in dynamic applications.
7401 * elf32-s390.c (elf_s390_relocate_section): Likewise.
7402 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
7403 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
7404 * elf64-s390.c (elf_s390_relocate_section): Likewise.
7405 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7406 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
7407
7408 2002-07-10 Alan Modra <amodra@bigpond.net.au>
7409
7410 * elf64-ppc.c (ONES): Define.
7411 (ppc64_elf_howto_table): Use ONES here to avoid warnings. Fill in
7412 missing src_mask fields. Tweak R_PPC64_NONE, R_PPC64_COPY. Fill
7413 in missing dst_mask fields on R_PPC64_PLT32, R_PPC64_PLTREL32.
7414
7415 * elf64-ppc.c (ppc64_elf_get_symbol_info): Delete.
7416 (ppc64_elf_set_private_flags): Delete.
7417 (ppc64_elf_section_from_shdr): Delete.
7418 (ppc64_elf_merge_private_bfd_data): Remove flag checking/merging code.
7419 (ppc64_elf_fake_sections): Delete.
7420 (bfd_elf64_bfd_set_private_flags): Don't define.
7421 (bfd_elf64_get_symbol_info): Likewise.
7422 (elf_backend_section_from_shdr): Likewise.
7423 (elf_backend_fake_sections): Likewise.
7424
7425 2002-07-10 Marco Walther <Marco.Walther@sun.com>
7426
7427 * elf.c: (assign_section_numbers) Set sh_entsize for .stab only
7428 when not already set.
7429 * elf64-sparc.c: (sparc64_elf_fake_sections): New function.
7430 (elf_backend_fake_sections): Define.
7431
7432 2002-07-10 Alan Modra <amodra@bigpond.net.au>
7433
7434 * merge.c (_bfd_merge_section): Remove redundant output_section check.
7435 Formatting.
7436 (_bfd_merge_sections): Don't set SEC_EXCLUDE on unused sections.
7437
7438 2002-07-09 Hans-Peter Nilsson <hp@axis.com>
7439
7440 * elf32-cris.c (cris_elf_relocate_section): Move sanity-check for
7441 NULL sym_hashes to just before use.
7442 <case R_CRIS_32_GOTREL>: In test for local symbol, accept also
7443 symbol with non-default visibility.
7444 <case R_CRIS_32_GOTREL, case R_CRIS_32_PLT_GOTREL>: Ditto.
7445 <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
7446 Ditto.
7447 (cris_elf_gc_sweep_hook): Only decrease h->plt.refcount for
7448 symbol with non-default visibility.
7449 (cris_elf_check_relocs): At tests for local symbol before
7450 increasing h->plt.refcount, also check for non-default
7451 visibility. Ditto when checking for local symbol to eliminate
7452 pc-relative runtime relocs.
7453
7454 2002-07-08 Alan Modra <amodra@bigpond.net.au>
7455
7456 * elf.c: Formatting.
7457 (IS_SOLARIS_PT_INTERP): Add p_paddr and p_memsz checks.
7458 (INCLUDE_SECTION_IN_SEGMENT): Remove IS_SOLARIS_PT_INTERP.
7459 (copy_private_bfd_data): Set p_vaddr on broken Solaris PT_INTERP
7460 segments.
7461
7462 2002-07-07 Mark Mitchell <mark@codesourcery.com>
7463 Alan Modra <amodra@bigpond.net.au>
7464
7465 * cofflink.c (_bfd_coff_final_link): On PE COFF systems, take into
7466 account the impact of relocation count overflow when computing
7467 section offsets.
7468 * coffcode.h (coff_write_relocs): Use obj_pe when deciding whether
7469 or not to apply the PE COFF reloc overflow handling. Fix a
7470 fencepost error in deciding whether or not to use that technique.
7471
7472 2002-07-07 Alan Modra <amodra@bigpond.net.au>
7473
7474 * elf-bfd.h (struct elf_reloc_cookie): Remove locsym_shndx,
7475 change type of locsyms.
7476 (bfd_elf_get_elf_syms): Declare.
7477 * elf.c (bfd_elf_get_elf_syms): New function.
7478 (group_signature): Use bfd_elf_get_elf_syms.
7479 (bfd_section_from_r_symndx): Likewise.
7480 * elfcode.h (elf_slurp_symbol_table): Likewise.
7481 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
7482 (elf_link_add_object_symbols): Likewise. Reorganise to increase
7483 locality of various data structures. Properly free internal relocs.
7484 (elf_bfd_final_link): Properly free internal relocs.
7485 (elf_link_check_versioned_symbol): Use bfd_elf_get_elf_syms.
7486 (elf_link_input_bfd): Likewise.
7487 (elf_gc_mark): Likewise. Properly free internal relocs.
7488 (elf_gc_sweep): Properly free internal relocs.
7489 (elf_reloc_symbol_deleted_p): No need to swap syms in.
7490 (elf_bfd_discard_info): Use bfd_elf_get_elf_syms. Properly free
7491 internal relocs.
7492 * elf-m10200.c (mn10200_elf_relax_section): Use bfd_elf_get_elf_syms.
7493 Properly free possibly cached info.
7494 (mn10200_elf_relax_delete_bytes): Remove symbol swapping code.
7495 (mn10200_elf_symbol_address_p): Pass in internal syms. Remove
7496 symbol swapping code.
7497 (mn10200_elf_get_relocated_section_contents): Use bfd_elf_get_elf_syms.
7498 Properly free possibly cached info.
7499 * elf-m10300.c (mn10300_elf_relax_section): As above for elf-m10200.c.
7500 (mn10300_elf_relax_delete_bytes): Likewise.
7501 (mn10300_elf_symbol_address_p): Likewise.
7502 (mn10300_elf_get_relocated_section_contents): Likewise.
7503 * elf32-h8300.c (elf32_h8_relax_section): As above for elf-m10200.c.
7504 (elf32_h8_relax_delete_bytes): Likewise.
7505 (elf32_h8_symbol_address_p): Likewise.
7506 (elf32_h8_get_relocated_section_contents): Likewise.
7507 * elf32-m32r.c (m32r_elf_relax_section): As above for elf-m10200.c.
7508 (m32r_elf_relax_delete_bytes): Likewise.
7509 (m32r_elf_get_relocated_section_contents): Likewise.
7510 * elf32-sh.c (sh_elf_reloc_loop): Free section contents using
7511 elf_section_data to determine whether cached.
7512 (sh_elf_relax_section): As above for elf-m10200.c.
7513 (sh_elf_relax_delete_bytes): Likewise.
7514 (sh_elf_get_relocated_section_contents): Likewise.
7515 * elf32-xstormy16.c (xstormy16_elf_relax_section): As above.
7516 * elf64-alpha.c (elf64_alpha_relax_section): As above. Also delay
7517 reading of local syms.
7518 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
7519 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): As above.
7520 * elfxx-ia64.c (elfNN_ia64_relax_section): As above.
7521 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Properly free internal
7522 relocs.
7523 * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Properly
7524 free internal relocs and section contents. Don't read symbols.
7525 * elf32-hppa.c (get_local_syms): Use bfd_elf_get_elf_syms.
7526 (elf32_hppa_size_stubs): Don't free local syms.
7527 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Delay
7528 reading of local syms. Use bfd_elf_get_elf_syms. Properly free
7529 possibly cached info.
7530 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
7531 * elf64-hppa.c (elf64_hppa_check_relocs): Use bfd_elf_get_elf_syms.
7532 * elf64-ppc.c (struct ppc_link_hash_table): Delete bfd_count and
7533 all_local_syms.
7534 (get_local_syms): Delete function.
7535 (edit_opd): Use bfd_elf_get_elf_syms. Free on error exit. Cache
7536 on exit.
7537 (ppc64_elf_size_stubs): Use bfd_elf_get_elf_syms. Free/cache on exit.
7538
7539 2002-07-05 Jim Wilson <wilson@redhat.com>
7540
7541 * syms.c (decode_section_type): New.
7542 (bfd_decode_symclass): Call decode_section_type.
7543
7544 2002-07-04 Jakub Jelinek <jakub@redhat.com>
7545
7546 * merge.c (_bfd_merged_section_offset): Avoid accessing byte before
7547 section content start.
7548 Reported by Michael Schumacher <mike@hightec-rt.com>.
7549
7550 2002-07-04 Alan Modra <amodra@bigpond.net.au>
7551
7552 * section.c (_bfd_strip_section_from_output): Remove unnecessary
7553 link order code. Don't actually remove the output section here;
7554 Just set a flag for the linker to do so.
7555 * elflink.c (_bfd_elf_link_renumber_dynsyms): Test for removed
7556 sections when setting up output section dynsyms.
7557
7558 2002-07-04 Alan Modra <amodra@bigpond.net.au>
7559
7560 * elflink.h (elf_link_add_object_symbols): Revert 1999-09-02 hpux
7561 fudge.
7562 * elf.c (bfd_section_from_shdr): Work around broken hpux shared
7563 libs here instead.
7564
7565 2002-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
7566
7567 * elf64-s390.c (create_got_section): Set .got section alignment to
7568 8 bytes.
7569 (elf_s390_check_relocs): Set .rela.dyn section alignment to 8 bytes.
7570
7571 2002-07-02 Alan Modra <amodra@bigpond.net.au>
7572
7573 * elf.c (_bfd_elf_reloc_type_class): Fix comment grammar.
7574
7575 2002-07-01 Matt Thomas <matt@3am-software.com>
7576
7577 * elf32-vax.c (elf32_vax_print_private_bfd_data): Change EF_*
7578 to EF_VAX_*.
7579
7580 2002-07-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7581
7582 * elfxx-mips.c (ABI_64_P): Fix comment.
7583 (MIPS_ELF_OPTIONS_SECTION_NAME,MIPS_ELF_STUB_SECTION_NAME): Use the
7584 new section names for N64 ABI.
7585 (mips_elf_output_extsym): No special _gp_disp handling for NewABI.
7586 (mips_elf_calculate_relocation): Code formatting.
7587 (mips_elf_create_dynamic_relocation): Likewise.
7588 (_bfd_mips_elf_fake_sections): IRIX6 needs this hack, too.
7589 (_bfd_mips_elf_size_dynamic_sections): Handle GOT_PAGE for any NewABI.
7590 (_bfd_mips_elf_relocate_section): No special handling for R_MIPS_64
7591 in any NewABI.
7592 (_bfd_mips_elf_finish_dynamic_symbol): No special _gp_disp handling
7593 for NewABI.
7594 (_bfd_mips_elf_modify_segment_map): Handle any N64 ABI.
7595 (_bfd_mips_elf_gc_sweep_hook): NewABI GOT relocs should be handled
7596 here, too.
7597
7598 2002-07-01 Andreas Schwab <schwab@suse.de>
7599
7600 * elf64-x86-64.c (elf64_x86_64_relocate_section): Only convert
7601 R_X86_64_64 to R_X86_64_RELATIVE.
7602
7603 2002-07-01 John David Anglin <dave@hiauly1.hia.nrc.ca>
7604
7605 * vaxbsd.c: New BFD backend for VAX BSD and Ultrix.
7606 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Add new backend.
7607 Run "make dep-am".
7608 * config.bfd (vax-*-bsd* | vax-*-ultrix*): Use vaxbsd_vec instead of
7609 host_aout_vec.
7610 * configure.in (vaxbsd_vec): Add.
7611 * targets.c (vaxbsd_vec): Add.
7612 * Makefile.in: Rebuild.
7613 * configure: Rebuild.
7614 * po/SRC-POTFILES.in: Rebuild.
7615
7616 2002-07-01 Alan Modra <amodra@bigpond.net.au>
7617
7618 * elflink.h (elf_gc_mark): Pass in the section whose relocs we are
7619 examining to gc_mark_hook, rather than the bfd.
7620 (elf_gc_sections): Adjust.
7621 * elf-bfd.h (struct elf_backend_data <gc_mark_hook>): Likewise.
7622 * elf-m10300.c (mn10300_elf_gc_mark_hook): Likewise.
7623 * elf32-arm.h (elf32_arm_gc_mark_hook): Likewise.
7624 * elf32-avr.c (elf32_avr_gc_mark_hook): Likewise.
7625 * elf32-cris.c (cris_elf_gc_mark_hook): Likewise.
7626 * elf32-d10v.c (elf32_d10v_gc_mark_hook): Likewise.
7627 * elf32-fr30.c (fr30_elf_gc_mark_hook): Likewise.
7628 * elf32-hppa.c (elf32_hppa_gc_mark_hook): Likewise.
7629 * elf32-i386.c (elf_i386_gc_mark_hook): Likewise.
7630 * elf32-m32r.c (m32r_elf_gc_mark_hook): Likewise.
7631 * elf32-m68k.c (elf_m68k_gc_mark_hook): Likewise.
7632 * elf32-mcore.c (mcore_elf_gc_mark_hook): Likewise.
7633 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Likewise.
7634 * elf32-ppc.c (ppc_elf_gc_mark_hook): Likewise.
7635 * elf32-s390.c (elf_s390_gc_mark_hook): Likewise.
7636 * elf32-sh.c (sh_elf_gc_mark_hook): Likewise.
7637 * elf32-sparc.c (elf32_sparc_gc_mark_hook): Likewise.
7638 * elf32-v850.c (v850_elf_gc_mark_hook): Likewise.
7639 * elf32-vax.c (elf_vax_gc_mark_hook): Likewise.
7640 * elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Likewise.
7641 * elf64-mmix.c (mmix_elf_gc_mark_hook): Likewise.
7642 * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
7643 * elf64-s390.c (elf_s390_gc_mark_hook): Likewise.
7644 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
7645 * elfxx-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise.
7646 * elfxx-mips.h (_bfd_mips_elf_gc_mark_hook): Likewise.
7647 * elf64-x86-64.c (elf64_x86_64_gc_mark_hook): Likewise.
7648 * elf32-frv.c (elf32_frv_gc_mark_hook): Likewise. Also remove
7649 redundant local sym tests.
7650 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_entry.
7651 (link_hash_newfunc): Init is_entry.
7652 (ppc64_elf_copy_indirect_symbol): Copy is_entry.
7653 (ppc64_elf_link_hash_table_create): Init all_local_syms.
7654 (create_linkage_sections): Use bfd_make_section_anyway rather than
7655 bfd_make_section.
7656 (ppc64_elf_mark_entry_syms): New function.
7657 (ppc64_elf_check_relocs): Don't bother testing elf_bad_symtab. Set
7658 up opd entry to function section map.
7659 (ppc64_elf_gc_mark_hook): Special case opd section relocs, and
7660 relocs that reference the opd section.
7661 (edit_opd): New function.
7662 (ppc64_elf_size_dynamic_sections): Call get_local_syms and edit_opd.
7663 (ppc64_elf_setup_section_lists): Don't calculate htab->bfd_count here.
7664 (get_local_syms): Do so here. Exit if we already have local syms.
7665 Remove bogus comment imported from elf32-hppa.c. Don't attempt to
7666 read local syms on non-ELF input.
7667 (ppc64_elf_size_stubs): Call _bfd_elf64_link_read_relocs rather
7668 than duplicating it's function here. Adjust free of internal
7669 relocs to suit.
7670 (ppc64_elf_relocate_section): Adjust local syms in opd section.
7671 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Declare.
7672 * elf32-hppa.c (elf32_hppa_size_stubs): Call
7673 _bfd_elf32_link_read_relocs rather than duplicating it's function
7674 here. Adjust free of internal relocs to suit.
7675
7676 2002-07-01 Andreas Jaeger <aj@suse.de>
7677
7678 * elf64-x86-64.c (elf64_x86_64_check_relocs): Certain relocations
7679 are not allowed in shared libs code, enforce -fPIC.
7680
7681 2002-06-29 Hans-Peter Nilsson <hp@bitrange.com>
7682
7683 * mmo.c (mmo_write_loc_chunk): Don't eliminate leading and
7684 trailing zero-sequences when there's previous left-over data.
7685
7686 2002-06-27 John David Anglin <dave@hiauly1.hia.nrc.ca>
7687
7688 * elf64-hppa.c (elf64_hppa_reloc_type_class): New function.
7689 (elf64_hppa_finish_dynamic_sections): Check other_rel_sec, dlt_rel_sec
7690 and opd_rel_sec in order for starting rela section. Check _raw_size.
7691 (elf_backend_reloc_type_class): Define.
7692
7693 2002-06-27 Kevin Buettner <kevinb@redhat.com>
7694
7695 * dwarf2.c (decode_line_info): Handle older, non-standard, 64-bit
7696 DWARF2 formats.
7697
7698 2002-06-27 Alan Modra <amodra@bigpond.net.au>
7699
7700 * cpu-powerpc.c: Comment on ordering of arch_info.
7701 * elf32-ppc.c (ppc_elf_object_p): New function.
7702 (elf_backend_object_p): Define.
7703 * elf64-ppc.c (ppc64_elf_object_p): New function.
7704 (elf_backend_object_p): Define.
7705
7706 2002-06-26 Jason Thorpe <thorpej@wasabisystems.com>
7707
7708 * configure.in (vax-*-netbsd*): Set COREFILE to netbsd-core.lo.
7709 * configure: Regenerate.
7710
7711 2002-06-25 Jason Eckhardt <jle@rice.edu>
7712
7713 * dwarf2.c (decode_line_info): Check unit->addr_size
7714 to read in the proper number of prologue bytes.
7715
7716 2002-06-25 Nick Clifton <nickc@cambridge.redhat.com>
7717
7718 * config.bfd (powerpc-*-aix5*): Only create a selvecs for
7719 aix5coff64_vec if 64-bit bfd support has been enabled.
7720 (powerpc64-*-aix5*): Only define if 64-bit bfd support has
7721 been enabled.
7722
7723 * targets.c (_bfd_target_vector[]): Only include
7724 aix5coff64_vec if 64-bit bfd support has been enabled.
7725
7726 2002-06-25 Alan Modra <amodra@bigpond.net.au>
7727
7728 * elf64-ppc.c (ppc_add_stub): Replace strcpy/strncpy with memcpy.
7729 * elf32-hppa.c (hppa_add_stub): Likewise.
7730 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
7731 * elflink.h (elf_add_default_symbol): Fix comment typo.
7732 (elf_add_default_symbol): Replace strcpy and strncpy with memcpy.
7733 (elf_link_add_object_symbols): Likewise.
7734 (elf_link_assign_sym_version): Likewise.
7735 * hash.c (bfd_hash_lookup): Likewise.
7736 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
7737 * section.c (bfd_get_unique_section_name): Likewise.
7738 * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
7739 * elf.c (_bfd_elf_make_section_from_phdr): Likewise.
7740 (assign_section_numbers): Likewise.
7741 (_bfd_elfcore_make_pseudosection): Likewise.
7742 (elfcore_grok_lwpstatus): Likewise.
7743 (elfcore_grok_win32pstatus): Likewise.
7744 (elfcore_write_note): Constify input params. Use PTR instead of
7745 void *. Include terminating NUL in namesz. Correct padding.
7746 Support NULL "name" param. Use memcpy instead of strcpy.
7747 (elfcore_write_prpsinfo): Constify input params.
7748 (elfcore_write_prstatus): Likewise. Use PTR instead of void *.
7749 (elfcore_write_lwpstatus): Likewise.
7750 (elfcore_write_pstatus): Likewise.
7751 (elfcore_write_prfpreg): Likewise.
7752 (elfcore_write_prxfpreg): Likewise.
7753 * elf-bfd.h (elfcore_write_note): Update declaration.
7754 (elfcore_write_prpsinfo): Likewise.
7755 (elfcore_write_prstatus): Likewise.
7756 (elfcore_write_pstatus): Likewise.
7757 (elfcore_write_prfpreg): Likewise.
7758 (elfcore_write_prxfpreg): Likewise.
7759 (elfcore_write_lwpstatus): Likewise.
7760
7761 2002-06-25 Jason Eckhardt <jle@rice.edu>
7762
7763 * ecoff.c (ecoff_set_symbol_info): Set BSF_FUNCTION for
7764 symbols of type stProc and stStaticProc.
7765
7766 2002-06-25 Nick Clifton <nickc@redhat.com>
7767
7768 * ecoff.c: VArious formatting fixes.
7769
7770 2002-06-25 Alan Modra <amodra@bigpond.net.au>
7771
7772 * coff-rs6000.c (xcoff_generate_rtinit): Fix typo.
7773
7774 2002-06-25 Alan Modra <amodra@bigpond.net.au>
7775
7776 * aout-adobe.c: Don't compare against "true" or "false.
7777 * aout-target.h: Likewise.
7778 * aoutx.h: Likewise.
7779 * archive.c: Likewise.
7780 * bout.c: Likewise.
7781 * cache.c: Likewise.
7782 * coff-a29k.c: Likewise.
7783 * coff-alpha.c: Likewise.
7784 * coff-i386.c: Likewise.
7785 * coff-mips.c: Likewise.
7786 * coff-or32.c: Likewise.
7787 * coff64-rs6000.c: Likewise.
7788 * coffcode.h: Likewise.
7789 * coffgen.c: Likewise.
7790 * cpu-ns32k.c: Likewise.
7791 * ecoff.c: Likewise.
7792 * ecofflink.c: Likewise.
7793 * elf.c: Likewise.
7794 * elf32-arm.h: Likewise.
7795 * elf32-cris.c: Likewise.
7796 * elf32-d30v.c: Likewise.
7797 * elf32-i386.c: Likewise.
7798 * elf32-mcore.c: Likewise.
7799 * elf32-ppc.c: Likewise.
7800 * elf32-sh.c: Likewise.
7801 * elf32-sh64.c: Likewise.
7802 * elf32-v850.c: Likewise.
7803 * elf64-alpha.c: Likewise.
7804 * elf64-sh64.c: Likewise.
7805 * elfcode.h: Likewise.
7806 * elfcore.h: Likewise.
7807 * elflink.h: Likewise.
7808 * elfxx-mips.c: Likewise.
7809 * i386os9k.c: Likewise.
7810 * ieee.c: Likewise.
7811 * libbfd.c: Likewise.
7812 * linker.c: Likewise.
7813 * mmo.c: Likewise.
7814 * nlm32-alpha.c: Likewise.
7815 * nlm32-i386.c: Likewise.
7816 * nlm32-ppc.c: Likewise.
7817 * nlm32-sparc.c: Likewise.
7818 * nlmcode.h: Likewise.
7819 * oasys.c: Likewise.
7820 * pdp11.c: Likewise.
7821 * peicode.h: Likewise.
7822 * reloc.c: Likewise.
7823 * som.c: Likewise.
7824 * srec.c: Likewise.
7825 * tekhex.c: Likewise.
7826 * vms.c: Likewise.
7827 * xcofflink.c: Likewise.
7828 * elf64-sparc.c: Edit comment to not use "== false".
7829
7830 * aoutf1.h: Don't use "? true : false".
7831 * ecoff.c: Likewise.
7832 * format.c: Likewise.
7833 * ieee.c: Likewise.
7834 * linker.c: Likewise.
7835 * mmo.c: Likewise.
7836 * oasys.c: Likewise.
7837
7838 2002-06-23 H.J. Lu <hjl@gnu.org>
7839
7840 * elflink.h (elf_link_add_archive_symbols): For the default
7841 version, check references with only one `@' first.
7842
7843 2002-06-23 John David Anglin <dave@hiauly1.hia.nrc.ca>
7844
7845 * elf64-hppa.c (elf64_hppa_mark_milli_and_exported_functions): New
7846 function.
7847 (allocate_global_data_dlt): Don't add millicode symbols to dynamic
7848 symbol table.
7849 (allocate_global_data_opd, allocate_dynrel_entries): Likewise.
7850 (elf64_hppa_size_dynamic_sections): Revise to use
7851 elf64_hppa_mark_milli_and_exported_functions.
7852 (elf64_hppa_finish_dynamic_symbol): Remove code to keep millicode
7853 symbols out of dynamic symbol table.
7854
7855 2002-06-23 Alan Modra <amodra@bigpond.net.au>
7856
7857 * Makefile.in: Regenerate.
7858 * libbfd.h: Regenerate.
7859 * bfd-in2.h: Regenerate.
7860 * configure: Regenerate.
7861 * po/SRC-POTFILES.in: Regenerate.
7862
7863 * elflink.h: Comment typo fixes.
7864
7865 2002-06-23 H.J. Lu <hjl@gnu.org>
7866
7867 * elf-bfd.h (elf_link_loaded_list): New structure.
7868 (elf_link_hash_table): Add "loaded".
7869 * elf.c (_bfd_elf_link_hash_table_init): Initialize "loaded".
7870 * elflink.h (elf_link_check_versioned_symbol): New function.
7871 (elf_link_output_extsym): Call elf_link_check_versioned_symbol.
7872
7873 2002-06-19 Nick Clifton <nickc@cambridge.redhat.com>
7874
7875 * elflink.h (size_dynamic_sections): If the target does not
7876 support an ELF style hash table, return true, indicating that
7877 nothing needed to be done, rather than false, indicating that the
7878 section's size could not be computed.
7879
7880 2002-06-18 Dave Brolley <brolley@redhat.com>
7881
7882 From Catherine Moore, Michael Meissner, Dave Brolley:
7883 * po/SRC-POTFILES.in: Add cpu-frv.c and elf32-frv.c
7884 * targets.c: Support bfd_elf32_frv_vec.
7885 * reloc.c: Add FRV relocs.
7886 * configure.in: Add support for bfd-elf32-frv-vec.
7887 * config.bfd (targ_cpu): Add support for frv-*-elf.
7888 * archures.c: Add frv arch and machines.
7889 * Makefile.am (ALL_MACHINES): Add cpu-frv.lo.
7890 (ALL_MACHINES_CFILES): Add cpu-frv.c.
7891 (BFD32_BACKENDS): Add elf32-frv.lo.
7892 (BFD32_BACKENDS_CFILES): Add elf32-frv.c
7893 (cpu-frv.lo): New target.
7894 (elf32-frv.lo): New target.
7895 * cpu-frv.c: New file.
7896 * elf32-frv.c: New file.
7897
7898 2002-06-18 Jakub Jelinek <jakub@redhat.com>
7899
7900 * elfcode.h (elf_object_p): Sanity check eh_shoff == 0 implies
7901 e_shnum == 0.
7902 Only read the first section header if e_shoff is non-zero.
7903 Don't consider e_shstrndx if there are no sections.
7904
7905 2002-06-17 Tom Rix <trix@redhat.com>
7906
7907 * elf32-d10v.c (elf_d10v_howto_table): Change R_D10V_10_PCREL_R,
7908 R_D10V_10_PCREL_L and R_D10V_18_PCREL to use
7909 complain_overflow_bitfield.
7910
7911 2002-06-17 Alan Modra <amodra@bigpond.net.au>
7912
7913 * opncls.c (bfd_openr): Remove redundant bfd_set_error.
7914 (bfd_fdopenr): Likewise.
7915 (bfd_openstreamr): Likewise.
7916 (bfd_openw): Likewise.
7917
7918 * targets.c: Sort target vecs.
7919 (_bfd_target_vector): Add aix5coff64_vec, bfd_elf32_sh64_vec,
7920 bfd_elf32_sh64l_vec, bfd_elf32_sh64lnbsd_vec,
7921 bfd_elf32_sh64nbsd_vec, bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec,
7922 bfd_elf64_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec.
7923 * configure.in: Sort target vecs. Add m88kmach3_vec.
7924 * configure: Regenerate.
7925
7926 2002-06-16 Hans-Peter Nilsson <hp@bitrange.com>
7927
7928 * elf64-mmix.c (bpo_reloc_request_sort_fn): Use member
7929 bpo_reloc_no to break sort order ties, not address of items.
7930
7931 2002-06-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
7932
7933 * elf-hppa.h (elf_hppa_final_link): Fix formatting in comment.
7934 Skip excluded sections in determing __gp value.
7935 (elf_hppa_final_link_relocate): Use the symbol's address in
7936 R_PARISC_FPTR64 relocations that don't need an opd entry.
7937 * elf64-hppa.c (allocate_dynrel_entries): Simplify code.
7938 (elf64_hppa_finalize_dynreloc): Likewise.
7939 (elf64_hppa_size_dynamic_sections): Move comments and fix typo.
7940 (elf64_hppa_finish_dynamic_symbol): Break up assert.
7941
7942 2002-06-14 Sergey Grigoriev <serge@leopold.Physik.Uni-Augsburg.DE>
7943
7944 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
7945 alignment for .bss, .data and .text sections so that sse and sse2
7946 code will work.
7947 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
7948
7949 2002-06013 J"orn Rennecke <joern.rennecke@superh.com>
7950
7951 config.bfd: Add support for sh[1234]l*-*-elf* | sh3el*-*-elf*,
7952 sh[1234]*-elf*.
7953
7954 2002-06-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
7955
7956 * elflink.h (elf_bfd_final_link): Improve error handling for missing
7957 dynamic sections.
7958
7959 * elf64-hppa.c (allocate_global_data_opd): We don't need an opd entry
7960 for a symbol that has no output section.
7961 (allocate_dynrel_entries): Correct comment.
7962 (elf64_hppa_finalize_dynreloc): Likewise. Don't create an opd entry
7963 unless we want one.
7964 (elf64_hppa_finalize_opd): Prevent segfault if dyn_h is NULL.
7965 (elf64_hppa_finalize_dlt): Likewise. Prevent segfault for symbols
7966 with no section. Remove unnecessary parentheses.
7967
7968 2002-06-11 Tom Rix <trix@redhat.com>
7969
7970 * coffcode.h (coff_compute_section_file_positions): Add data
7971 section to AIX loader alignment check.
7972
7973 * coff-rs6000.c (_bfd_xcoff_mkobject): Set default text section
7974 alignment to 4 bytes.
7975 (_bfd_xcoff_copy_private_bfd_data): Use text and data alignment
7976 power accessor macro.
7977 (do_shared_object_padding): Remove invalid assertion.
7978
7979 2002-06-10 Richard Sandiford <rsandifo@redhat.com>
7980
7981 * section.c (_bfd_strip_section_from_output): Set SEC_EXCLUDE
7982 for removed output sections.
7983
7984 2002-06-10 Geoffrey Keating <geoffk@redhat.com>
7985
7986 * merge.c (merge_strings): Use htab_create_alloc with calloc, not
7987 htab_alloc.
7988 * elf-strtab.c (_bfd_elf_strtab_finalize): Likewise.
7989
7990 2002-06-08 H.J. Lu <hjl@gnu.org>
7991
7992 * elf.c (copy_private_bfd_data): Don't cast to bfd_size_type to
7993 work around a long long bug in gcc 2.96 on mips.
7994
7995 2002-06-08 Jason Thorpe <thorpej@wasabisystems.com>
7996
7997 * Makefile.am (BFD32_BACKENDS): Add vax1knetbsd.lo.
7998 (BFD32_BACKENDS_CFILES): Add vax1knetbsd.c.
7999 Regenerate dependency lists.
8000 * Makefile.in: Regenerate.
8001 * config.bfd (vax-*-netbsdelf*, vax-*-netbsdaout*): Add
8002 vax1knetbsd_vec to targ_selvecs.
8003 * configure.in: Add vax1knetbsd_vec.
8004 * configure: Regenerate.
8005 * targets.c (_bfd_target_vector): Add vax1knetbsd_vec.
8006 * vax1knetbsd.c: New file.
8007 * vaxnetbsd.c: Update copyright years.
8008 (TARGET_PAGE_SIZE): Set to 0x1000.
8009 (DEFAULT_MID): Set to M_VAX4K_NETBSD.
8010
8011 2002-06-08 Matt Thomas <matt@3am-software.com>
8012
8013 * libaout.h (enum machine_type): Add M_VAX4K_NETBSD.
8014
8015 2002-06-08 Alan Modra <amodra@bigpond.net.au>
8016
8017 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Make static.
8018
8019 2002-06-08 Alan Modra <amodra@bigpond.net.au>
8020
8021 * Makefile.am: Run "make dep-am".
8022 * Makefile.in: Regenerate.
8023
8024 * armnetbsd.c: Replace CONST with const.
8025 * corefile.c: Likewise.
8026 * elf32-dlx.c: Likewise.
8027 * elf64-mips.c: Likewise.
8028 * mmo.c: Likewise.
8029 * ns32knetbsd.c: Likewise.
8030
8031 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Check the hash
8032 table is elf64-sparc.
8033
8034 2002-06-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8035
8036 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Simplify code.
8037 Fix RELA addends to get not shifted in the result. Don't do special
8038 handling of R_MIPS_64 for NewABI.
8039
8040 2002-06-07 Alan Modra <amodra@bigpond.net.au>
8041
8042 * aoutx.h (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
8043 (NAME(aout,slurp_reloc_table)): Likewise.
8044 * coff-mips.c (mips_relax_section): Use bfd_zalloc.
8045 * coff-rs6000.c (xcoff_write_armap_big): Use bfd_zmalloc.
8046 (xcoff_write_archive_contents_big): Likewise.
8047 (xcoff_generate_rtinit): Likewise.
8048 (xcoff_generate_rtinit): Likewise, and check error return.
8049 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
8050 * coffgen.c (coff_section_symbol): Use bfd_zalloc.
8051 (coff_get_normalized_symtab): Likewise.
8052 (coff_make_empty_symbol): Likewise.
8053 (bfd_coff_set_symbol_class): Likewise.
8054 * cofflink.c (coff_link_add_symbols): Likewise.
8055 * ecoff.c (_bfd_ecoff_make_empty_symbol): Likewise.
8056 * ecofflink.c (ecoff_write_shuffle): Use bfd_zmalloc.
8057 (bfd_ecoff_write_accumulated_debug): Likewise.
8058 * elf64-alpha.c (get_got_entry): Use bfd_zalloc.
8059 * i386linux.c (bfd_i386linux_size_dynamic_sections): Likewise.
8060 * i386lynx.c (NAME(lynx,slurp_reloc_table)): Use bfd_zmalloc.
8061 * ieee.c (do_with_relocs): Use bfd_zalloc.
8062 * m68klinux.c (bfd_m68klinux_size_dynamic_sections): Likewise.
8063 * pdp11.c (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
8064 (NAME(aout,slurp_reloc_table)): Likewise.
8065 (NAME(aout,squirt_out_relocs)): Don't memset when zalloc'd.
8066 * reloc16.c (bfd_coff_reloc16_relax_section): Use bfd_zmalloc.
8067 * som.c (som_build_and_write_symbol_table): Likewise.
8068 (som_slurp_string_table): Likewise.
8069 (som_slurp_symbol_table): Likewise.
8070 (som_bfd_ar_write_symbol_stuff): Likewise.
8071 * sparclinux.c (bfd_sparclinux_size_dynamic_sections): Use bfd_zalloc.
8072 * sunos.c (bfd_sunos_size_dynamic_sections): Likewise.
8073 * tekhex.c (find_chunk): Likewise. Get rid of unused "sname".
8074 * vms-gsd.c (_bfd_vms_slurp_gsd): Use bfd_zmalloc.
8075 * xcofflink.c (xcoff_link_add_symbols): Use bfd_zalloc/bfd_zmalloc.
8076
8077 2002-06-07 Alan Modra <amodra@bigpond.net.au>
8078
8079 * elf-bfd.h (struct bfd_elf_section_data <group_name>): Replace with
8080 "group" union.
8081 (elf_group_name): Update.
8082 (elf_group_id): Define.
8083 (bfd_elf_set_group_contents): Declare.
8084 * elf.c (elf_fake_sections): Qualify use of elf_group_name.
8085 (set_group_contents): Rename to bfd_elf_set_group_contents. Remove
8086 ATTRIBUTE_UNUSED from failedptrarg. If elf_group_id is set, use
8087 that sym for the signature.
8088 (_bfd_elf_compute_section_file_positions): Don't call
8089 set_group_contents for "ld -r" case.
8090 (swap_out_syms): Use bfd_zalloc.
8091 * elflink.h (elf_link_add_archive_symbols): Likewise.
8092 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
8093 (elf_bfd_final_link): Call bfd_elf_set_group_contents.
8094
8095 2002-06-07 Alan Modra <amodra@bigpond.net.au>
8096
8097 * elf64-ppc.c (ppc64_elf_relocate_section): Allow unresolved
8098 relocs in opd for non-shared too.
8099
8100 2002-06-06 Jeffrey Law <law@redhat.com>
8101
8102 * elf32-h8300.c (elf32_h8_relax_section): Ignore uninteresting
8103 relocations.
8104
8105 2002-06-06 Nick Clifton <nickc@cambridge.redhat.com>
8106
8107 * merge.c: Include libiberty.h.
8108 * elf-strtab.c: Include libiberty.h.
8109
8110 2002-06-06 Elias Athanasopoulos <eathan@otenet.gr>
8111
8112 * peXXigen.c (pe_print_idata): Remove unused variable.
8113
8114 2002-06-06 David Heine <dlheine@tensilica.com>
8115
8116 * elf.c (assign_file_positions_for_segments): Remove unallocated
8117 sections from the section to segment mapping for PT_LOAD segments.
8118 Update comment about empty loadable segments.
8119
8120 2002-06-06 Richard Sandiford <rsandifo@redhat.com>
8121
8122 * stabs.c (_bfd_link_section_stabs): Check that the symbol offset
8123 is within the .stabstr section.
8124
8125 2002-06-06 Alan Modra <amodra@bigpond.net.au>
8126
8127 * elf-bfd.h (struct elf_size_info <swap_symbol_in>): Function args
8128 are "const PTR", not "const PTR *".
8129 (bfd_elf32_swap_symbol_in): Likewise.
8130 (bfd_elf64_swap_symbol_in): Likewise.
8131 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR.
8132 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
8133 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
8134 (elf_link_add_object_symbols): Likewise.
8135 (elf_link_record_local_dynamic_symbol): Likewise.
8136 (elf_link_input_bfd): Likewise.
8137 (elf_gc_mark): Likewise.
8138 (elf_reloc_symbol_deleted_p): Likewise.
8139 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
8140 (mn10200_elf_relax_delete_bytes): Likewise.
8141 (mn10200_elf_symbol_address_p): Likewise.
8142 (mn10200_elf_get_relocated_section_contents): Likewise.
8143 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
8144 (mn10300_elf_relax_section): Likewise.
8145 (mn10300_elf_relax_delete_bytes): Likewise.
8146 (mn10300_elf_symbol_address_p): Likewise.
8147 (mn10300_elf_get_relocated_section_contents): Likewise.
8148 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
8149 (elf32_h8_relax_delete_bytes): Likewise.
8150 (elf32_h8_symbol_address_p): Likewise.
8151 (elf32_h8_get_relocated_section_contents): Likewise.
8152 * elf32-hppa.c (get_local_syms): Likewise.
8153 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
8154 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
8155 * elf32-sh.c (sh_elf_relax_section): Likewise.
8156 (sh_elf_relax_delete_bytes): Likewise.
8157 (sh_elf_get_relocated_section_contents): Likewise.
8158 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
8159 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
8160 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
8161 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
8162 * elf64-ppc.c (get_local_syms): Likewise.
8163 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
8164 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
8165
8166 2002-06-05 J"orn Rennecke <joern.rennecke@superh.com>
8167
8168 * config.bfd (sh64l*-*-elf*, shl*-*-elf*): New configurations.
8169
8170 2002-06-05 Alan Modra <amodra@bigpond.net.au>
8171
8172 * elf.c (group_signature): Swap in the whole symbol, and handle
8173 extracting section symbol names.
8174 (setup_group): Add comment.
8175 (set_group_contents): When called from objcopy or ld, arrange for
8176 section contents to be written. Write group member output section
8177 indices to allow objcopy to reorganize sections.
8178 (_bfd_elf_copy_private_section_data): Copy group info.
8179
8180 * elf-bfd.h (struct elf_size_info): Add swap_symbol_in field.
8181 (bfd_elf32_swap_symbol_in): Update prototype.
8182 (bfd_elf64_swap_symbol_in): Likewise.
8183 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR *.
8184 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
8185 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
8186 (elf_link_add_object_symbols): Likewise.
8187 (elf_link_record_local_dynamic_symbol): Likewise.
8188 (elf_link_input_bfd): Likewise.
8189 (elf_gc_mark): Likewise.
8190 (elf_reloc_symbol_deleted_p): Likewise.
8191 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
8192 (mn10200_elf_relax_delete_bytes): Likewise.
8193 (mn10200_elf_symbol_address_p): Likewise.
8194 (mn10200_elf_get_relocated_section_contents): Likewise.
8195 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
8196 (mn10300_elf_relax_section): Likewise.
8197 (mn10300_elf_relax_delete_bytes): Likewise.
8198 (mn10300_elf_symbol_address_p): Likewise.
8199 (mn10300_elf_get_relocated_section_contents): Likewise.
8200 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
8201 (elf32_h8_relax_delete_bytes): Likewise.
8202 (elf32_h8_symbol_address_p): Likewise.
8203 (elf32_h8_get_relocated_section_contents): Likewise.
8204 * elf32-hppa.c (get_local_syms): Likewise.
8205 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
8206 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
8207 * elf32-sh.c (sh_elf_relax_section): Likewise.
8208 (sh_elf_relax_delete_bytes): Likewise.
8209 (sh_elf_get_relocated_section_contents): Likewise.
8210 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
8211 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
8212 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
8213 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
8214 * elf64-ppc.c (get_local_syms): Likewise.
8215 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
8216 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
8217 * elfcode.h (NAME(_bfd_elf,size_info)): Update initialiser.
8218 * elf64-alpha.c (alpha_elf_size_info): Likewise.
8219 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
8220 * elf64-mips.c (mips_elf64_size_info): Likewise.
8221 * elf64-s390.c (s390_elf64_size_info): Likewise.
8222 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
8223
8224 2002-06-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
8225
8226 * elf32-mips.c (elf32_mips_ignore_discarded_relocs): Move to...
8227 elfxx-mips.c (_bfd_mips_elf_ignore_discarded_relocs): ... here.
8228 elf64-mips.c (elf_backend_ignore_discarded_relocs): Use
8229 _bfd_mips_elf_ignore_discarded_relocs.
8230 elfxx-mips.h (_bfd_mips_elf_ignore_discarded_relocs): Declare.
8231
8232 2002-06-05 H.J. Lu <hjl@gnu.org>
8233
8234 * elfxx-mips.c (mips_elf_calculate_relocation): Call
8235 _bfd_elf_rel_local_sym for STT_SECTION relocations against
8236 the SEC_MERGE section.
8237
8238 2002-06-05 Alan Modra <amodra@bigpond.net.au>
8239
8240 * coff-alpha.c: Update copyright date.
8241 * coff-mips.c: Likewise.
8242 * xcoff-target.h: Likewise.
8243
8244 * bfd-in.h: Remove "taken from the source" comment.
8245 * libbfd-in.h: Likewise.
8246 * libcoff-in.h: Likewise.
8247 * bfd-in2.h: Regenerate.
8248 * libbfd.h: Regenerate.
8249 * libcoff.h: Regenerate.
8250
8251 * elf.c (bfd_elf_discard_group): Return true.
8252 * elf-bfd.h (bfd_elf_discard_group): Declare.
8253 * bfd-in.h (bfd_elf_discard_group): Don't declare here.
8254 * section.c (bfd_discard_group): Rename to bfd_generic_discard_group.
8255 * bfd.c (bfd_discard_group): Define.
8256 * targets.c (struct bfd_target): Add _bfd_discard_group.
8257 (BFD_JUMP_TABLE_LINK): Here too.
8258 * libbfd-in.h (_bfd_nolink_bfd_discard_group): Define.
8259 * aout-adobe.c (aout_32_bfd_discard_group): Define.
8260 * aout-target.h (MY_bfd_discard_group): Define.
8261 * aout-tic30.c (MY_bfd_discard_group): Define.
8262 * binary.c (binary_bfd_discard_group): Define.
8263 * bout.c (b_out_bfd_discard_group): Define.
8264 * coff-alpha.c (_bfd_ecoff_bfd_discard_group): Define.
8265 * coffcode.h (coff_bfd_discard_group): Define.
8266 * coff-mips.c (_bfd_ecoff_bfd_discard_group): Define.
8267 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Define.
8268 * i386msdos.c (msdos_bfd_discard_group): Define.
8269 * i386os9k.c (os9k_bfd_discard_group): Define.
8270 * ieee.c (ieee_bfd_discard_group): Define.
8271 * ihex.c (ihex_bfd_discard_group): Define.
8272 * mmo.c (mmo_bfd_discard_group): Define.
8273 * nlm-target.h (nlm_bfd_discard_group): Define.
8274 * oasys.c (oasys_bfd_discard_group): Define.
8275 * ppcboot.c (ppcboot_bfd_discard_group): Define.
8276 * som.c (som_bfd_discard_group): Define.
8277 * srec.c (srec_bfd_discard_group): Define.
8278 * tekhex.c (tekhex_bfd_discard_group): Define.
8279 * versados.c (versados_bfd_discard_group): Define.
8280 * vms.c (vms_bfd_discard_group): Define.
8281 * xcoff-target.h (_bfd_xcoff_bfd_discard_group): Define.
8282 * coff64-rs6000.c (rs6000coff64_vec): Update initialiser.
8283 (aix5coff64_vec): Likewise.
8284 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Likewise.
8285
8286 2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
8287
8288 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-com.lo.
8289 (BFD32_BACKENDS_CFILES): Add elf32-sh64-com.c.
8290 (elf32-sh64-com.lo): New dependency list.
8291 * Makefile.in: Regenerate.
8292 * configure.in (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec)
8293 (bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec): Add
8294 elf32-sh64-com.lo.
8295 * configure: Regenerate.
8296 * elf32-sh64.c (sh64_address_in_cranges)
8297 (sh64_get_contents_type, sh64_address_is_shmedia): Move to...
8298 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb):
8299 (crange_bsearch_cmpl): Prepend _bfd_sh64_ to name and move to...
8300 * elf32-sh64-com.c: ...here. New file.
8301
8302 2002-06-04 Alan Modra <amodra@bigpond.net.au>
8303
8304 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Remove
8305 ATTRIBUTE_UNUSED on used params.
8306 * elf32-vax.c (elf_vax_gc_mark_hook): Remove unnecessary checks
8307 before calling bfd_section_from_elf_index on local syms.
8308 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
8309
8310 2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
8311
8312 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-nbsd.lo.
8313 (BFD32_BACKENDS_CFILES): Add elf32-sh64-nbsd.c.
8314 (BFD64_BACKENDS): Add elf64-sh64-nbsd.lo.
8315 (BFD64_BACKENDS_CFILES): Add elf64-sh64-nbsd.c.
8316 (elf32-sh64-nbsd.lo, elf64-sh64-nbsd.lo): New rules.
8317 * Makefile.in: Regenerate.
8318 * config.bfd (sh5le-*-netbsd*, sh5-*-netbsd*, sh64le-*-netbsd*)
8319 (sh64-*-netbsd*): New targets.
8320 * configure.in: Add bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec,
8321 bfd_elf64_sh64nbsd_vec, and bfd_elf64_sh64lnbsd_vec.
8322 * configure: Regenerate.
8323 * elf32-sh64-nbsd.c: New file.
8324 * elf64-sh64-nbsd.c: New file.
8325 * targets.c: Add extern decls for bfd_elf32_sh64nbsd_vec,
8326 bfd_elf32_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec, and
8327 bfd_elf64_sh64lnbsd_vec.
8328
8329 2002-06-04 Alan Modra <amodra@bigpond.net.au>
8330
8331 * elf.c (setup_group): Set SEC_LINK_ONCE on GRP_COMDAT groups.
8332 (bfd_section_from_shdr): Likewise. Set section name of group
8333 sections from signature.
8334 (group_signature): Split out from setup_group. Ensure symbol table
8335 is available.
8336 (bfd_elf_discard_group): New function.
8337 (_bfd_elf_make_section_from_shdr): Don't set SEC_LINK_ONCE on
8338 .gnu.linkonce* sections if they are members of a group.
8339 (set_group_contents): Set GRP_COMDAT flag.
8340 * section.c (bfd_discard_group): New function.
8341 * bfd-in.h (bfd_elf_discard_group): Declare.
8342 * bfd-in2.h: Regenerate.
8343 * elf-bfd.h (struct bfd_elf_section_data): Add linkonce_p field.
8344 (elf_linkonce_p): Define.
8345
8346 2002-06-04 Alan Modra <amodra@bigpond.net.au>
8347
8348 * elf.c (bfd_section_from_shdr): Make "name" const.
8349 * elf-bfd.h (elf_backend_section_from_shdr): Likewise.
8350 * elf32-i370.c (i370_elf_section_from_shdr): Likewise.
8351 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
8352 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
8353 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
8354 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
8355 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
8356 * elf64-ppc.c (ppc64_elf_section_from_shdr): Likewise.
8357 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
8358 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
8359 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
8360
8361 2002-06-03 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
8362
8363 * elfxx-mips.c (ABI_64_P): Use backend's data to determine the
8364 ABI.
8365
8366 2002-06-02 Kazu Hirata <kazu@cs.umass.edu>
8367
8368 * elf32-arc.c: Fix formatting.
8369 * elf32-arm.h: Likewise.
8370 * elf32-cris.c: Likewise.
8371 * elf32-dlx.c: Likewise.
8372 * elf32-hppa.c: Likewise.
8373 * elf32-i386.c: Likewise.
8374 * elf32-i386qnx.c: Likewise.
8375 * elf32-or32.c: Likewise.
8376 * elf32-s390.c: Likewise.
8377 * elf32-sh64.c: Likewise.
8378 * elf32-vax.c: Likewise.
8379 * elf32-xstormy16.c: Likewise.
8380 * elf64-alpha.c: Likewise.
8381 * elf64-mmix.c: Likewise.
8382 * elf64-ppc.c: Likewise.
8383 * elf64-s390.c: Likewise.
8384 * elf64-sh64.c: Likewise.
8385 * elf64-x86-64.c: Likewise.
8386
8387 2002-06-02 Richard Henderson <rth@redhat.com>
8388
8389 * elf64-alpha.c (elf64_alpha_relocate_section): Don't dereference
8390 null when there are no got entries for a symbol.
8391 (elf64_alpha_relax_find_tls_segment): Rearrange to avoid
8392 uninitialized variable warning.
8393
8394 2002-06-01 Richard Henderson <rth@redhat.com>
8395
8396 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Don't test for
8397 undefined symbols here.
8398 (elf64_alpha_relax_section): Do it here. Also test for not
8399 defined in the current module.
8400 (elf64_alpha_relocate_section_r): Split out of ...
8401 (elf64_alpha_relocate_section): ... here. Don't dereference
8402 NULL when looking up local got entries.
8403
8404 2002-06-01 Richard Henderson <rth@redhat.com>
8405
8406 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Reject undefined
8407 symbols from JSR relaxation.
8408 (elf64_alpha_size_plt_section_1): New.
8409 (elf64_alpha_calc_dynrel_sizes): Split out .rela.got bits ...
8410 (elf64_alpha_size_rela_got_1): ... here.
8411 (elf64_alpha_size_dynamic_sections): Split out .rela.got bits ...
8412 (elf64_alpha_size_rela_got_section): ... here.
8413 (elf64_alpha_size_plt_section): New.
8414 (elf64_alpha_relax_section): Call them.
8415 (elf64_alpha_size_got_sections): Remove output_bfd arg.
8416 (elf64_alpha_finish_dynamic_symbol): Check gotent use_count.
8417
8418 2002-06-01 Richard Henderson <rth@redhat.com>
8419
8420 * elf64-alpha.c (alpha_get_dtprel_base, alpha_get_tprel_base): New.
8421 (elf64_alpha_relocate_section): Use them. Reject LE TLS relocs
8422 in shared libraries. Fix DTPRELHI and TPRELHI value.
8423 (INSN_ADDQ, INSN_RDUNIQ): New.
8424 (struct alpha_relax_info): Add symtab_hdr, tls_segment, first_gotent.
8425 (elf64_alpha_relax_with_lituse): Return boolean. Remove irelend
8426 argument. Reject dynamic symbols. Use LITUSE symbolic constants.
8427 (elf64_alpha_relax_got_load): Rename from relax_without_lituse.
8428 Handle GOTDTPREL and GOTTPREL relocations.
8429 (elf64_alpha_relax_gprelhilo): New.
8430 (elf64_alpha_relax_tls_get_addr): New.
8431 (elf64_alpha_relax_find_tls_segment): New.
8432 (elf64_alpha_relax_section): Handle TLS relocations.
8433 (ALPHA_ELF_LINK_HASH_TLS_IE): New.
8434 (elf64_alpha_check_relocs): Set it.
8435
8436 2002-06-01 Richard Henderson <rth@redhat.com>
8437
8438 * elf64-alpha.c (elf64_alpha_relax_section): Don't store computed gp.
8439
8440 * elf64-alpha.c (elf64_alpha_check_relocs): Fix typo on maybe_dynamic
8441 check; don't suppress dynamic relocs for non-allocated sections.
8442
8443 * elf64-alpha.c: Remove dead code.
8444
8445 2002-05-31 Alan Modra <amodra@bigpond.net.au>
8446
8447 * bfd-in2.h: Regenerate.
8448 * libbfd.h: Regenerate.
8449 * po/SRC-POTFILES.in: Regenerate.
8450
8451 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate
8452 space for bss .plt.
8453
8454 2002-05-31 Graeme Peterson <gp@qnx.com>
8455
8456 * Makefile.am (BFD32_BACKENDS): Add elf32-i386qnx.lo.
8457 (BFD32_BACKENDS_CFILES): Add elf32-i386qnx.c.
8458 Run "make dep-am".
8459 * Makefile.in: Regenerate.
8460 * config.bfd: Add i[3456]86-*-nto-qnx* support.
8461 * configure.in: Add bfd_elf32_i386qnx_vec support.
8462 * configure: Regenerate.
8463 * elf-bfd.h (struct elf_backend_data): Add set_nonloadable_filepos,
8464 is_contained_by_filepos, and copy_private_bfd_data_p.
8465 * elf.c (assign_file_positions_for_segments): Call backend
8466 set_nonloadable_filepos. Fix non-K&R call to _bfd_error_handler.
8467 (IS_CONTAINED_BY_FILEPOS): Define.
8468 (INCLUDE_SECTION_IN_SEGMENT): Also test IS_CONTAINED_BY_FILEPOS.
8469 (copy_private_bfd_data): Use IS_CONTAINED_BY_FILEPOS. Typo fix.
8470 Fix non-K&R call to _bfd_error_handler.
8471 (_bfd_elf_copy_private_section_data): Use backend
8472 copy_private_bfd_data_p.
8473 * elf32-i386.c: Don't include elfxx-target.h when
8474 ELF32_I386_C_INCLUDED is defined.
8475 * elf32-i386qnx.c: New QNX elf backend file.
8476 * elfxx-target.h: Add elf_backend_set_nonloadable_filepos,
8477 elf_backend_is_contained_by_filepos, and
8478 elf_backend_do_copy_private_bfd_data.
8479 * targets.c: Add bfd_target bfd_elf32_i386qnx_vec.
8480
8481 2002-05-31 Alan Modra <amodra@bigpond.net.au>
8482
8483 * elfarm-oabi.c (bfd_elf32_arm_add_glue_sections_to_bfd): Define.
8484 Move other similar defines to start of file.
8485
8486 2002-05-30 Tom Rix <trix@redhat.com>
8487
8488 * coff-rs6000.c (xcoff_rtype2howto): Handle 16 bit R_RBA.
8489 * coff64-rs6000.c (xcoff64_rtype2howto): Same.
8490
8491 2002-05-30 Richard Henderson <rth@redhat.com>
8492
8493 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_TLSGD,
8494 ALPHA_ELF_LINK_HASH_LU_TLSLDM, ALPHA_ELF_LINK_HASH_LU_FUNC): New.
8495 (ALPHA_ELF_GOT_ENTRY_RELOCS_DONE): Remove.
8496 (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Remove.
8497 (struct alpha_elf_got_entry): Add reloc_type, reloc_done, reloc_xlated.
8498 (struct alpha_elf_obj_tdata): Rename total_got_entries and
8499 n_local_got_entries to total_got_size and local_got_size.
8500 (elf64_alpha_howto, elf64_alpha_reloc_map): Update for TLS relocs.
8501 (alpha_got_entry_size): New.
8502 (elf64_alpha_relax_with_lituse): Use it.
8503 (elf64_alpha_relax_without_lituse): Likewise.
8504 (MAX_GOT_SIZE): Rename from MAX_GOT_ENTRIES.
8505 (get_got_entry): New.
8506 (elf64_alpha_check_relocs): Handle TLS relocs. Reorganize.
8507 (elf64_alpha_adjust_dynamic_symbol): Test LU_FUNC as a mask.
8508 (elf64_alpha_merge_ind_symbols): Check gotent->reloc_type.
8509 (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots): Likewise.
8510 (elf64_alpha_calc_got_offsets_for_symbol): Use alpha_got_entry_size.
8511 (elf64_alpha_calc_got_offsets): Likewise.
8512 (alpha_dynamic_entries_for_reloc): New.
8513 (elf64_alpha_calc_dynrel_sizes): Use it.
8514 (elf64_alpha_size_dynamic_sections): Likewise.
8515 (elf64_alpha_relocate_section): Handle TLS relocations.
8516 * reloc.c: Add Alpha TLS relocations.
8517 * bfd-in2.h, libbfd.h: Rebuild.
8518
8519 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
8520
8521 * peXXigen.c (pe_print_idata): Remove double printed
8522 import table lines; add Bound-To comment.
8523
8524 2002-05-29 Matt Thomas <matt@3am-software.com>
8525
8526 * Makefile.am (BFD32_BACKENDS): Add elf32-vax.lo.
8527 (BFD32_BACKENDS_CFILES): Add elf32-vax.c.
8528 (elf32-vax.lo): New rule.
8529 * Makefile.in: Regenerate.
8530 * configure.in (bfd_elf32_vax_vec)
8531 (vaxnetbsd_vec): New vectors.
8532 * configure: Regenerate.
8533 * config.bfd (vax-*-netbsdelf*)
8534 (vax-*-netbsdaout*)
8535 (vax-*-netbsd*): New targets.
8536 * elf32-vax.c: New file.
8537 * reloc.c: Add VAX relocations.
8538 * bfd-in2.h: Regenerate.
8539 * targets.c (_bfd_target_vector): Add bfd_elf32_vax_vec.
8540
8541 2002-05-29 Jason Thorpe <thorpej@wasabisystems.com>
8542
8543 * config.bfd (arm-*-netbsd*): Add bfd_elf32_littlearm_vec
8544 and bfd_elf32_bigarm_vec to targ_selvecs.
8545
8546 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
8547
8548 * peXXigen.c (pe_print_idata): Fix seg faults on printing import tables
8549 with auto-imported symbols.
8550
8551 2002-05-29 Adam Nemet <anemet@lnxw.com>
8552
8553 * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Don't add glue
8554 sections only record bfd.
8555 (bfd_elf32_arm_add_glue_sections_to_bfd): New function.
8556 * bfd-in.h (bfd_elf32_arm_add_glue_sections_to_bfd): Declare it.
8557 * bfd-in2.h: Regenerate.
8558
8559 2002-05-28 Nick Clifton <nickc@cambridge.redhat.com>
8560
8561 * syms.c (_bfd_stab_section_find_nearest_line): Move
8562 declaration and initialisation of saw_line and saw_func out of
8563 for loop.
8564
8565 2002-05-29 Alan Modra <amodra@bigpond.net.au>
8566
8567 * elf64-ppc.c (ppc64_elf_get_symbol_info): New function.
8568 (bfd_elf64_get_symbol_info): Define.
8569 * elfxx-target.h (bfd_elfNN_get_symbol_info): Only define if undef.
8570
8571 2002-05-29 Andrey Volkov <avolkov@transas.com>
8572
8573 * cpu-h8300.c: Make default h8300 machine first in machine list.
8574
8575 2002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net>
8576
8577 * config.bfd: Added DLX configuraton.
8578 * Makefile.am: Added DLX configuraton.
8579 * configure.in: Added DLX configuraton.
8580 * archures.c: Add DLX architecture.
8581 * reloc.c: Add DLX relocs.
8582 * targets.c: Added DLX target vector.
8583 * configure: Regenerate.
8584 * Makefile.in: Regenreate.
8585 * bfd-in2.h: Regenreate.
8586 * elf32-dlx.c: New file: Support DLX target.
8587 * cpu-dlx.c: New file: Support DLX target.
8588
8589 2002-05-25 Alan Modra <amodra@bigpond.net.au>
8590
8591 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Formatting.
8592
8593 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Revert last change.
8594 (ppc64_elf_check_relocs): Don't set up function descriptor symbol
8595 strings to point inside function code sym string.
8596 (func_desc_adjust): Likewise.
8597 (ppc64_elf_hide_symbol): Rewrite code to look up function code sym.
8598
8599 2002-05-24 Michal Ludvig <mludvig@suse.cz>
8600
8601 * elf64-x86-64.c (elf64_x86_64_grok_prstatus): Added.
8602 (elf64_x86_64_grok_psinfo): Added.
8603
8604 2002-05-24 TAMURA Kent <kent@netbsd.org>
8605
8606 * config.bfd: Add a target for i386-netbsdpe.
8607
8608 2002-05-24 Alan Modra <amodra@bigpond.net.au>
8609
8610 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy is_func
8611 and is_func_descriptor.
8612 (func_desc_adjust): Hide function code sym in shared libs unless
8613 there is a matching exported function descriptor sym.
8614
8615 2002-05-23 Jakub Jelinek <jakub@redhat.com>
8616
8617 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_THREAD_LOCAL
8618 for symbols from SHF_TLS section.
8619 (_bfd_elf_print_private_bfd_data): Add PT_TLS.
8620 (elf_fake_sections): Set SHF_TLS for SEC_THREAD_LOCAL sections.
8621 (map_sections_to_segments): Build PT_TLS segment if necessary.
8622 (assign_file_positions_for_segments): Likewise.
8623 (get_program_header_size): Account for PT_TLS segment.
8624 (swap_out_syms): Set type of BSF_THREAD_LOCAL symbols and symbols from
8625 SEC_THREAD_LOCAL sections to STT_TLS.
8626 * reloc.c: Add 386 and IA-64 TLS relocs.
8627 * section.c (SEC_THREAD_LOCAL): Define.
8628 (SEC_CONSTRUCTOR_TEXT, SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS):
8629 Remove.
8630 * elflink.h (elf_link_add_object_symbols): Support .tcommon.
8631 (size_dynamic_sections): If DF_STATIC_TLS, set DF_FLAGS
8632 unconditionally.
8633 (struct elf_final_link_info): Add first_tls_sec.
8634 (elf_bfd_final_link): Set first_tls_sec.
8635 Compute elf_hash_table (info)->tls_segment.
8636 (elf_link_output_extsym): Handle STT_TLS symbols.
8637 (elf_link_input_bfd): Likewise.
8638 * syms.c (BSF_THREAD_LOCAL): Define.
8639 * bfd-in2.h: Rebuilt.
8640 * libbfd.h: Rebuilt.
8641 * elf32-i386.c (elf_i386_tls_transition, dtpoff_base, tpoff,
8642 elf_i386_mkobject, elf_i386_object_p): New functions.
8643 (elf_howto_table): Add TLS relocs.
8644 (elf_i386_reloc_type_lookup): Support TLS relocs.
8645 (elf_i386_info_to_howto_rel): Likewise.
8646 (struct elf_i386_link_hash_entry): Add tls_type.
8647 (struct elf_i386_obj_tdata): New.
8648 (elf_i386_hash_entry, elf_i386_tdata, elf_i386_local_got_tls_type):
8649 New macros.
8650 (struct elf_i386_link_hash_table): Add tls_ldm_got.
8651 (link_hash_newfunc): Clear tls_type.
8652 (elf_i386_check_relocs): Support TLS relocs.
8653 (elf_i386_gc_sweep_hook): Likewise.
8654 (allocate_dynrelocs): Likewise.
8655 (elf_i386_size_dynamic_sections): Likewise.
8656 (elf_i386_relocate_section): Likewise.
8657 (elf_i386_finish_dynamic_symbol): Likewise.
8658 (bfd_elf32_mkobject, elf_backend_object_p): Define.
8659 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add tprel_offset,
8660 dtpmod_offset, dtprel_offset, tprel_done, dtpmod_done, dtprel_done,
8661 want_tprel, want_dtpmod, want_dtprel.
8662 (elfNN_ia64_tprel_base, elfNN_ia64_dtprel_base): New functions.
8663 (ia64_howto_table): Add TLS relocs, rename R_IA64_LTOFF_TP22 to
8664 R_IA64_LTOFF_TPREL22.
8665 (elf_code_to_howto_index): Add TLS relocs.
8666 (elfNN_ia64_check_relocs): Support TLS relocs.
8667 (allocate_global_data_got): Account for TLS .got data.
8668 (allocate_dynrel_entries): Account for TLS dynamic relocations.
8669 (elfNN_ia64_install_value): Supprt TLS relocs.
8670 (set_got_entry): Support TLS relocs.
8671 (elfNN_ia64_relocate_section): Likewise.
8672
8673 2002-05-23 Nick Clifton <nickc@cambridge.redhat.com>
8674
8675 * elf32-arm.h (elf32_arm_final_link_relocate): For the Thumb
8676 BLX reloc round the relocation up rather than down.
8677 * coff-arm.c (coff_arm_relocate_section): Likewise.
8678
8679 2002-05-21 H.J. Lu (hjl@gnu.org)
8680
8681 * linker.c (_bfd_generic_link_add_one_symbol): Allow multiple
8682 definition.
8683
8684 2002-05-22 Alan Modra <amodra@bigpond.net.au>
8685
8686 * elf64-ppc.c (ppc64_elf_size_stubs): Don't strip .branch_lt.
8687 (ppc64_elf_relocate_section): Handle unresolved relocs in opd.
8688
8689 2002-05-22 Alan Modra <amodra@bigpond.net.au>
8690
8691 * elf64-ppc.c (ppc64_elf_relocate_section): Return false for
8692 unresolved relocs.
8693 (ppc64_elf_size_dynamic_sections): Check for splt NULL.
8694
8695 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8696
8697 * bfd.c (bfd_get_arch_size): Remove bfd_set_error call for
8698 non-ELF targets.
8699
8700 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8701
8702 * elf-bfd.h (elf_backend_emit_relocs): Change prototype to return
8703 an error value.
8704 * elflink.h (elf_link_output_relocs): Likewise. Improve error message.
8705 return with false on error.
8706 (elf_link_input_bfd): Check reloc_emitter return value.
8707
8708 2002-05-21 Jason Thorpe <thorpej@wasabisystems.com>
8709
8710 * config.bfd (armeb-*-netbsdelf*): New target.
8711
8712 2002-05-20 Alan Modra <amodra@bigpond.net.au>
8713
8714 * elf64-ppc.c (ppc_build_one_stub): Point undefined function syms
8715 at the plt call stub.
8716
8717 2002-05-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8718
8719 * cpu-mips.c (mips_compatible): Don't try to check machine
8720 compatibility.
8721
8722 2002-05-18 Tom Rix <trix@redhat.com>
8723
8724 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_out): Fix C_FILE auxent.
8725
8726 2002-05-17 Alan Modra <amodra@bigpond.net.au>
8727
8728 * elf64-ppc.c (ppc64_elf_info_to_howto): Formatting.
8729 (ppc64_elf_relocate_section): Don't warn about reloc overflow when
8730 we've already warned about an undefined symbol. Report more
8731 detail on reloc errors.
8732
8733 2002-05-17 Alan Modra <amodra@bigpond.net.au>
8734
8735 * acinclude.m4 (AM_INSTALL_LIBBFD): New.
8736 * configure.in: Invoke AM_INSTALL_LIBBFD.
8737 * Makefile.am (install-data-local): Revert 2002-05-13. Move to..
8738 (install_libbfd): .. New target.
8739 (uninstall_libbfd): Likewise.
8740 (install-bfdlibLTLIBRARIES): Likewise.
8741 (uninstall-bfdlibLTLIBRARIES): Likewise.
8742 (bfdlibdir): New.
8743 (bfdincludedir): New.
8744 (lib_LTLIBRARIES): Rename to bfdlib_LTLIBRARIES.
8745 * aclocal.m4: Regenerate.
8746 * configure: Regenerate.
8747 * Makefile.in: Regenerate.
8748
8749 2002-05-17 Stuart Balfour <sbalfour@cisco.com>
8750
8751 * hash.c (bfd_hash_lookup): Remove computation of len from inside
8752 hash loop.
8753
8754 2002-05-16 Nick Clifton <nickc@cambridge.redhat.com>
8755
8756 * config.bfd: Add targets for sh64-linux (little endian and
8757 big endian).
8758
8759 2002-05-15 Laurent Pinchart <laurent.pinchart@skynet.be>
8760
8761 * peXXigen.c (pe_print_idata): Do not assume that the first thunk
8762 is located in the same section as the import table. Instead
8763 check, and if necessary load the section containing the thunk.
8764
8765 2002-05-15 Nick Clifton <nickc@cambridge.redhat.com>
8766
8767 * aix5ppc-core.c (xcoff64_core_p): Replace bfd_read with
8768 bfd_bread.
8769 (xcoff64_core_file_matches_executable_p): Replace bfd_read
8770 with bfd_bread.
8771
8772 2002-05-15 Alan Modra <amodra@bigpond.net.au>
8773
8774 * aix5ppc-core.c: Warning fixes.
8775 * aout-adobe.c (aout_32_bfd_link_just_syms): Define.
8776 * aout-target.h (MY_bfd_link_just_syms): Define.
8777 * aout-tic30.c (MY_bfd_link_just_syms): Define.
8778 * bfd.c (bfd_link_just_syms): Define.
8779 * binary.c (binary_bfd_link_just_syms): Define.
8780 * bout.c (b_out_bfd_link_just_syms): Define.
8781 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update initializer.
8782 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
8783 * coffcode.h (coff_bfd_link_just_syms): Define.
8784 * elf-bfd.h (enum elf_link_info_type): Add ELF_INFO_TYPE_JUST_SYMS.
8785 (elf_discarded_section): Check for ELF_INFO_TYPE_JUST_SYMS.
8786 (_bfd_elf_link_just_syms): Declare.
8787 * elf.c (_bfd_elf_link_just_syms): New function.
8788 * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Check that
8789 sections haven't already been discarded by the linker.
8790 * elflink.h (elf_link_add_object_symbols): Likewise for stab
8791 sections and SEC_MERGE sections.
8792 (elf_bfd_discard_info): Similarly here.
8793 * elfxx-target.h (bfd_elfNN_bfd_link_just_syms): Define.
8794 * i386msdos.c (msdos_bfd_link_just_syms): Define.
8795 * i386os9k.c (os9k_bfd_link_just_syms): Define.
8796 * ieee.c (ieee_bfd_link_just_syms): Define.
8797 * ihex.c (ihex_bfd_link_just_syms): Define.
8798 * libbfd-in.h (_bfd_nolink_bfd_link_just_syms): Define.
8799 (_bfd_generic_link_just_syms): Declare.
8800 * libecoff.h (_bfd_ecoff_bfd_link_just_syms): Define.
8801 * linker.c (_bfd_generic_link_just_syms): New function.
8802 * mmo.c (mmo_bfd_link_just_syms): Define.
8803 * nlm-target.h (nlm_bfd_link_just_syms): Define.
8804 * oasys.c (oasys_bfd_link_just_syms): Define.
8805 * ppcboot.c (ppcboot_bfd_link_just_syms): Define.
8806 * som.c (som_bfd_link_just_syms): Define.
8807 * srec.c (srec_bfd_link_just_syms): Define.
8808 * targets.c (struct bfd_target): Add _bfd_link_just_syms.
8809 (BFD_JUMP_TABLE_LINK): And here.
8810 * tekhex.c (tekhex_bfd_link_just_syms): Define.
8811 * versados.c (versados_bfd_link_just_syms): Define.
8812 * vms.c (vms_bfd_link_just_syms): Define.
8813 * libbfd.h: Regenerate.
8814 * bfd-in2.h: Regenerate.
8815
8816 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8817
8818 * elf32-mips.c: Remove superfluous definitions copied from
8819 elfxx-mips.c.
8820 (bfd_elf32_bigmips_vec,bfd_elf32_littlemips_vec): Use the
8821 SGIish vectors to check the special case.
8822 (mips_elf_hi16_reloc): Fix comment.
8823 (mips_elf_got16_reloc): Likewise.
8824 (_bfd_mips_elf32_gprel16_reloc): Likewise.
8825 (elf_reloc_map): Code cleanup.
8826 (mips_reloc_map): Add comment.
8827 (bfd_elf23_bfd_reloc_type_lookup): Code cleanup.
8828 (mips_elf32_rtype_to_howto): Likewise.
8829 (mips_elf32_discard_info): Likewise.
8830 (elf32_mips_irix_compat): Invert logic: Only SGIish vectors
8831 lead to IRIX compatibility now.
8832
8833 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8834
8835 * elfxx-mips.c: Call it IRIX, not Irix in comments.
8836
8837 2002-05-13 Jason Thorpe <thorpej@wasabisystems.com>
8838
8839 * config.bfd (shle-*-netbsdelf*): Add target which includes
8840 sh64 support.
8841
8842 2002-05-13 David Edelsohn <edelsohn@gnu.org>
8843
8844 * configure.in: Revert 2002-04-07. Instead, auto-configure
8845 HAVE_ST_C_IMPL.
8846 * configure: Regenerate.
8847 * config.in: Regenerate.
8848 * rs6000-core.c (CNEW_IMPL): Guard use of c_impl with HAVE_ST_C_IMPL
8849 or AIX_5_CORE.
8850
8851 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
8852
8853 * configure.in (sparc*-*-openbsd*): Support sparc64-openbsd
8854 corefiles as well.2
8855 * configure: Regenerate.
8856
8857 2002-05-13 Alan Modra <amodra@bigpond.net.au>
8858
8859 * Makefile.am (install-data-local): Install headers to
8860 $(exec_prefix)/include.
8861 * Makefile.in: Regenerate.
8862
8863 2002-05-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
8864 Daniel Jacobowitz <drow@mvista.com>
8865
8866 * coff-sh.c (sh_reloc_map): Map to R_SH_IMM32 for non-PE. Don't
8867 map BFD_RELOC_RVA.
8868
8869 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
8870
8871 * config.bfd (alpha*-*-openbsd*, sparc64*-*-openbsd*,
8872 hppa*-*-openbsd*): New targets.
8873 * configure.in (alpha*-*-openbsd*): Set COREFILE.
8874 * configure: Regenerate.
8875
8876 2002-05-10 Tom Rix <trix@redhat.com>
8877
8878 * coff64-rs6000.c (xcoff64_reloc_type_br): New function for
8879 xcoff64_ppc_relocate_section.
8880 * coff-rs6000.c : Extern common xcoff_reloc_type functions.
8881 * libxcoff.h: Common xcoff_reloc_type function declaration.
8882
8883 2002-05-10 Alan Modra <amodra@bigpond.net.au>
8884
8885 * elf32-i386.c (elf_i386_relocate_section): Remove overflow checks
8886 added in 2002-05-09 commit.
8887
8888 * elf32-hppa.c (elf32_hppa_size_stubs): Revert part of 2002-05-04,
8889 don't look for stubs on all undefined syms.
8890
8891 2002-05-09 Alan Modra <amodra@bigpond.net.au>
8892
8893 * elf64-ppc.c (RA_REGISTER_MASK, RA_REGISTER_SHIFT): Delete.
8894 (ppc64_elf_howto_raw <R_PPC64_RELATIVE>): Not pc_relative or
8895 pcrel_offset.
8896
8897 * elf32-i386.c (elf_howto_table): Comments.
8898 (elf_i386_relocate_section): Handle more relocs for relocatable
8899 linking and against SEC_MERGE sections.
8900
8901 2002-05-08 Alan Modra <amodra@bigpond.net.au>
8902
8903 * elf32-ppc.c (ppc_elf_create_got): New function.
8904 (ppc_elf_create_dynamic_sections): Call ppc_elf_create_got before
8905 _bfd_elf_create_dynamic_sections. Correct .plt flags.
8906 (ppc_elf_check_relocs): Use ppc_elf_create_got in place of
8907 _bfd_elf_create_got_section.
8908
8909 2002-05-07 Alan Modra <amodra@bigpond.net.au>
8910
8911 * elf-bfd.h (struct elf_backend_data): Add rela_normal.
8912 * elfxx-target.h (elf_backend_rela_normal): Define.
8913 (elfNN_bed): Init rela_normal.
8914 * elflink.h (elf_link_input_bfd <emit_relocs>): Handle adjustment
8915 for section symbols here if rela_normal. Simplify abs section test.
8916 * elf-m10200.c (mn10200_elf_relocate_section): If relocatable,
8917 return immediately. Remove code handling relocatable linking.
8918 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
8919 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
8920 * elf32-i370.c (i370_elf_relocate_section): Likewise.
8921 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
8922 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
8923 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
8924 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
8925 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
8926 * elf32-s390.c (elf_s390_relocate_section): Likewise.
8927 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
8928 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
8929 * elf64-s390.c (elf_s390_relocate_section): Likewise.
8930 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
8931 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
8932 * elf32-arm.h (elf32_arm_relocate_section): Likewise #ifndef USE_REL.
8933 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
8934 * elf-m10200.c (elf_backend_rela_normal): Define.
8935 * elf-m10300.c (elf_backend_rela_normal): Define.
8936 * elf32-fr30.c (elf_backend_rela_normal): Define.
8937 * elf32-i370.c (elf_backend_rela_normal): Define.
8938 * elf32-i860.c (elf_backend_rela_normal): Define.
8939 * elf32-m68k.c (elf_backend_rela_normal): Define.
8940 * elf32-mcore.c (elf_backend_rela_normal): Define.
8941 * elf32-openrisc.c (elf_backend_rela_normal): Define.
8942 * elf32-ppc.c (elf_backend_rela_normal): Define.
8943 * elf32-s390.c (elf_backend_rela_normal): Define.
8944 * elf32-xstormy16.c (elf_backend_rela_normal): Define.
8945 * elf64-ppc.c (elf_backend_rela_normal): Define.
8946 * elf64-s390.c (elf_backend_rela_normal): Define.
8947 * elf64-x86-64.c (elf_backend_rela_normal): Define.
8948 * elfxx-ia64.c (elf_backend_rela_normal): Define.
8949 * elf32-arm.h (elf_backend_rela_normal): Define #ifndef USE_REL.
8950 * elf32-m32r.c (elf_backend_rela_normal): Likewise.
8951
8952 2002-05-06 Nick Clifton <nickc@cambridge.redhat.com>
8953
8954 * elf32-arm.h (elf32_arm_final_link_relocate): Convert
8955 'reloc_signed_max' and 'reloc_signed_min' into half-word offsets.
8956
8957 2002-05-06 Alan Modra <amodra@bigpond.net.au>
8958
8959 * elflink.h (elf_link_input_bfd <emit_relocs>): Adjust r_offset
8960 when not relocatable. Fix reloc_emitter call for K&R.
8961
8962 2002-05-04 Alan Modra <amodra@bigpond.net.au>
8963
8964 * elf64-ppc.c (ppc64_elf_relocate_section): Reinstate code
8965 reloading local sym addend mistakenly removed in 2002-05-01 change.
8966
8967 * dwarf2.c (struct line_head): Make prologue_length a bfd_vma.
8968 (read_abbrevs): Change "offset" param to bfd_vma.
8969 (parse_comp_unit): Change "version" and addr_size to unsigned ints.
8970 Change "abbrev_offset" to bfd_vma.
8971 (read_indirect_string): Use correct conversion chars in error
8972 message format string, cast bfd_vma's to unsigned long.
8973 (read_abbrevs): Likewise.
8974 (read_attribute_value): Likewise.
8975 (decode_line_info): Likewise.
8976 (scan_unit_for_functions): Likewise.
8977 (parse_comp_unit): Likewise.
8978
8979 2002-05-04 Tom Rix <trix@redhat.com>
8980
8981 * coffswap.h (coff_swap_reloc_in): Remove XCOFF support.
8982 (coff_swap_reloc_out): Same.
8983 * coff-rs6000.c: (xcoff_swap_reloc_in): Moved from coffswap.h.
8984 (xcoff_swap_reloc_out): Same.
8985 (xcoff_rtype2howto): Renamed from _bfd_xcoff_rtype2howto. Special
8986 case some 16 bit relocs. Add reloc value to output.
8987 (xcoff_howto_table): Remove 64 bit R_POS, add 16 bit
8988 R_RBR. Improve names.
8989 (_bfd_xcoff_reloc_type_lookup): Adjust for removal of 64 bit R_POS.
8990 (bfd_xcoff_backend_data): Update with new reloc swap names.
8991 (bfd_pmac_xcoff_backend_data) : Same.
8992 * coff64-rs6000.c: (xcoff64_swap_reloc_in): Moved from coffswap.h.
8993 (xcoff64_swap_reloc_out): Same.
8994 (xcoff64_rtype2howto): Special case some 16 bit relocs and 32 bit
8995 R_POS. Add reloc value to output.
8996 (xcoff64_howto_table): Move 64 bit R_POS to first entry. Add 16
8997 bit R_RBR. Improve names, masks.
8998 (xcoff64_reloc_type_lookup): Adjust for move of 64 bit R_POS.
8999 (bfd_xcoff_backend_data): Update with new reloc swap names.
9000 (bfd_xcoff_aix5_backend_data) : Same.
9001
9002 2002-05-04 Alan Modra <amodra@bigpond.net.au>
9003
9004 * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add
9005 bfd_count top_index, input_list, all_local_syms.
9006 (elf32_hppa_setup_section_lists): New function, split from
9007 elf32_hppa_size_stubs.
9008 (elf32_hppa_next_input_section): Likewise.
9009 (group_sections): Likewise.
9010 (get_local_syms): Likewise.
9011 (elf32_hppa_size_stubs): Adjust for split out functions. Look for
9012 stubs on undefined syms too.
9013 (elf32_hppa_set_gp): Use bfd_link_hash* instead of elf_link_hash*.
9014 Only access htab elf fields when we have an elf hash table.
9015 * elf32-hppa.h (elf32_hppa_setup_section_lists): Declare.
9016 (elf32_hppa_next_input_section): Declare.
9017
9018 2002-05-04 Bob Byrnes <byrnes@curl.com>
9019
9020 * opncls.c (_bfd_new_bfd_contained_in): Check return value of
9021 _bfd_new_bfd.
9022
9023 2002-05-03 H.J. Lu (hjl@gnu.org)
9024
9025 * elfxx-mips.c (mips_elf_link_hash_entry): Add forced_local.
9026 (mips_elf_link_hash_newfunc): Initialize forced_local to false.
9027 (mips_elf_record_global_got_symbol): Call _bfd_mips_elf_hide_symbol
9028 to hide a global symbol.
9029 (_bfd_mips_elf_hide_symbol): Return if forced_local is true. Set
9030 forced_local to true.
9031
9032 2002-05-02 Richard Henderson <rth@redhat.com>
9033
9034 * elf64-alpha.c (elf64_alpha_relocate_section): Force relative relocs
9035 vs SHN_UNDEF to zero.
9036
9037 2002-05-02 Alan Modra <amodra@bigpond.net.au>
9038
9039 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_SECTOFF>): Change to a
9040 16 bit reloc.
9041 <R_PPC64_SECTOFF_DS>: Likewise.
9042 (ppc64_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
9043 SECTOFF reloc.
9044 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_SECTOFF>): Correct.
9045 (ppc_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
9046 SECTOFF reloc.
9047
9048 * elf64-ppc.c (ppc64_elf_addr16_ha_reloc): Delete.
9049 (ppc64_elf_ha_reloc): New function.
9050 (ppc64_elf_brtaken_reloc): New function.
9051 (ppc64_elf_sectoff_reloc): New function.
9052 (ppc64_elf_sectoff_ha_reloc): New function.
9053 (ppc64_elf_toc_reloc): New function.
9054 (ppc64_elf_toc_ha_reloc): New function.
9055 (ppc64_elf_toc64_reloc): New function.
9056 (ppc64_elf_unhandled_reloc): New function.
9057 (ppc64_elf_howto_raw): Use the above.
9058 <R_PPC64_RELATIVE>: Mark pc_relative, pcrel_offset.
9059 <R_PPC64_SECTOFF>: Not pc_relative or pcrel_offset. Fix dst_mask.
9060 <R_PPC64_SECTOFF_DS>: Likewise.
9061 (IS_ABSOLUTE_RELOC): Update.
9062 (struct ppc_link_hash_table): Add have_undefweak.
9063 (ppc64_elf_link_hash_table_create): Init.
9064 (func_desc_adjust): Set have_undefweak.
9065 (ppc64_elf_func_desc_adjust): Call func_desc_adjust earlier. Only
9066 add the .sfpr blr when have_undefweak.
9067 (ppc64_elf_setup_section_lists): Check hash table flavour.
9068 (ppc64_elf_next_input_section): Move output_section->owner test to
9069 ppc64elf.em.
9070 (ppc64_elf_set_toc): Rename to ppc64_elf_toc, remove info param
9071 and relocatable test. Return TOCstart and don't set elf_gp.
9072 (ppc64_elf_relocate_section): Correct BRTAKEN/BRNTAKEN branch
9073 offset calculation. Add assert on weak sym branch tweaks.
9074 * elf64-ppc.h (ppc64_elf_set_toc): Delete.
9075 (ppc64_elf_toc): Declare.
9076 (ppc64_elf_next_input_section): Update.
9077
9078 2002-05-01 Alan Modra <amodra@bigpond.net.au>
9079
9080 * syms.c (_bfd_stab_section_find_nearest_line): Don't bomb on NULL
9081 file_name.
9082
9083 2002-05-01 Alan Modra <amodra@bigpond.net.au>
9084
9085 * elf64-ppc.c (CROR_151515, CROR_313131): Define.
9086 (ppc64_elf_relocate_section): Use them. Don't look for plt calls
9087 on R_PPC64_ADDR24 relocs. Require a nop or no link reg on plt
9088 call branches. Correct undefined weak destination.
9089 (ppc64_elf_func_desc_adjust): Always create at least one blr in
9090 .sfpr, and correct case where either only savef* or restf* is
9091 needed.
9092
9093 Long branch stubs, multiple stub sections.
9094 * elf64-ppc.h (ppc64_elf_setup_section_lists): Declare.
9095 (ppc64_elf_next_input_section): Declare.
9096 * elf64-ppc.c: Move linker-only prototypes.
9097 (STUB_SUFFIX): Define.
9098 (enum ppc_stub_type): New.
9099 (struct ppc_stub_hash_entry): New.
9100 (struct ppc_branch_hash_entry): New.
9101 (struct ppc_link_hash_entry): Add stub_cache, oh.
9102 (struct ppc_link_hash_table): Add stub_hash_table etc. Remove
9103 sstub. Add sbrlt, srelbrlt, has_14bit_branch, stub_iteration.
9104 Rename plt_overflow to stub_error.
9105 (ppc_stub_hash_lookup): Define.
9106 (ppc_branch_hash_lookup): Define.
9107 (stub_hash_newfunc): New function.
9108 (branch_hash_newfunc): New function.
9109 (link_hash_newfunc): Init new fields.
9110 (ppc64_elf_link_hash_table_create): Likewise.
9111 (ppc64_elf_link_hash_table_free): New function.
9112 (ppc_stub_name): New function.
9113 (ppc_get_stub_entry): New function.
9114 (ppc_add_stub): New function.
9115 (create_linkage_sections): Use bfd_make_section_anyway. Create
9116 .branch_lt and .rela.branch_lt sections. Don't create .stub.
9117 (ppc64_elf_check_relocs): Set has_14bit_branch on R_PPC64_REL14*,
9118 and set up for plt call stubs. Link func and func desc syms.
9119 (ppc64_elf_gc_sweep_hook): Handle REL14* as per REL24.
9120 (func_desc_adjust): Avoid hash lookup when func desc sym available
9121 via shortcut, and set links when processing.
9122 (ppc64_elf_hide_symbol): Likewise.
9123 (allocate_dynrelocs): Don't allocate stub section here.
9124 (ppc64_elf_size_dynamic_sections): Handle sbrlt and srelbrlt.
9125 Remove sstub code.
9126 (ppc_type_of_stub): New function.
9127 (build_one_stub): Delete.
9128 (ppc_build_one_stub): New function.
9129 (ppc_size_one_stub): New function.
9130 (ppc64_elf_setup_section_lists): New function.
9131 (ppc64_elf_next_input_section): New function.
9132 (group_sections): New function.
9133 (get_local_syms): New function.
9134 (ppc64_elf_size_stubs): Rewrite.
9135 (ppc64_elf_build_stubs): Rewrite.
9136 (ppc64_elf_relocate_section): Look up stub entry for REL24
9137 relocs. Don't propagate REL14* to dynamic objects. Look for long
9138 branch stubs if REL14* or REL24 relocs won't reach.
9139 (bfd_elf64_bfd_link_hash_table_free): Define.
9140
9141 2002-04-30 Mark Mitchell <mark@codesourcery.com>
9142
9143 * config.bfd: Add support for powerpc-*-windiss.
9144
9145 2002-04-30 Tom Rix <trix@redhat.com>
9146
9147 * xcofflink.c (xcoff_link_add_symbols): Always copy undef C_EXT
9148 symbol names into the hash table.
9149
9150 2002-04-28 Tom Rix <trix@redhat.com>
9151
9152 * coff-rs6000.c (xcoff_calculate_relocation) : Function table for
9153 calulating relocations.
9154 (xcoff_complain_overflow) : Function table for relocation errors.
9155 (xcoff_ppc_relocate_section): Use relocation and complain function
9156 tables.
9157 (xcoff_complain_overflow_unsigned_func): New complain function.
9158 (xcoff_complain_overflow_signed_func): Same.
9159 (xcoff_complain_overflow_bitfield_func): Same.
9160 (xcoff_complain_overflow_dont_func): Same.
9161 (xcoff_reloc_type_crel): New recot function.
9162 (xcoff_reloc_type_br): Same.
9163 (xcoff_reloc_type_ba): Same.
9164 (xcoff_reloc_type_toc): Same.
9165 (xcoff_reloc_type_rel): Same.
9166 (xcoff_reloc_type_neg): Same.
9167 (xcoff_reloc_type_pos): Same.
9168 (xcoff_reloc_type_fail): Same.
9169 (xcoff_reloc_type_noop): Same.
9170 * libxcoff.h : Declare common parts for xcoff64.
9171 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Use relocation
9172 and complain function tables.
9173
9174 2002-04-28 Alan Modra <amodra@bigpond.net.au>
9175
9176 * elf64-x86-64.c (struct elf64_x86_64_dyn_relocs): Comment typo.
9177 * elf32-hppa.c (elf32_hppa_final_link): Formatting.
9178
9179 2002-04-26 Alan Modra <amodra@bigpond.net.au>
9180
9181 * opncls.c (bfd_make_readable): Call bfd_section_list_clear.
9182 * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
9183
9184 * elflink.h (elf_bfd_final_link): Ensure input bfd class is the
9185 same as the output before calling elf_link_input_bfd.
9186
9187 * coffcode.h (coff_compute_section_file_positions): Set
9188 section_tail after shuffling section list.
9189
9190 2002-04-24 Christian Groessler <chris@groessler.org>
9191
9192 * coff-z8k.c (extra_case): Fix R_IMM32 relocations: The
9193 addresses are 23bit with a special layout, not plain 32bit
9194 values. Prevent relocation of immediate values.
9195
9196 2002-04-24 Chris G. Demetriou <cgd@broadcom.com>
9197
9198 * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): If MDMX or
9199 MIPS-16 ASE flags are set, print something to indicate that.
9200
9201 2002-04-23 Alan Modra <amodra@bigpond.net.au>
9202
9203 * elf32-hppa.c (hppa_type_of_stub): Correct and simplify condition
9204 under which a plt call stub is used.
9205 (final_link_relocate): Similarly.
9206 (allocate_plt_static): Clear h-plabel except when plt entry is
9207 exclusively used for a plabel.
9208 (allocate_dynrelocs): Use the above to simplify plt sizing.
9209 (struct elf32_hppa_link_hash_table): Add has_22bit_branch.
9210 (elf32_hppa_link_hash_table_create): Init.
9211 (BL22_RP): Define.
9212 (hppa_build_one_stub): Use BL22_RP if has_22bit_branch.
9213 (elf32_hppa_check_relocs): Set has_22bit_branch.
9214
9215 * elf32-hppa.c (elf32_hppa_check_relocs): Remove debug message.
9216 (final_link_relocate): Likewise.
9217
9218 2002-04-22 Jakub Jelinek <jakub@redhat.com>
9219
9220 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't build
9221 search table if some FDE is DW_EH_PE_aligned encoded either.
9222 (_bfd_elf_write_section_eh_frame): Handle terminating FDE specially.
9223
9224 2002-04-22 Richard Smith <richard@ex-parrot.com>
9225 Jakub Jelinek <jakub@redhat.com>
9226
9227 * elf-eh-frame.c (struct eh_cie_fde): Add per_encoding_relative.
9228 (_bfd_elf_discard_section_eh_frame): Set it for CIEs with pcrel
9229 encoded personality.
9230 (_bfd_elf_write_section_eh_frame): Adjust pcrel encoded personality
9231 for CIE/FDE removal.
9232
9233 2002-04-20 Tom Rix <trix@redhat.com>
9234
9235 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Fix C_FILE auxent.
9236
9237 2002-04-20 Alan Modra <amodra@bigpond.net.au>
9238
9239 * archures.c (bfd_lookup_arch): Move the list order comment..
9240 (struct bfd_arch_info): ..to where it belongs.
9241 * bfd-in2.h: Regenerate.
9242
9243 * archures.c (bfd_lookup_arch): Add comment on list order.
9244 (bfd_default_set_arch_mach): Use bfd_lookup_arch.
9245 * cpu-powerpc.c (bfd_powerpc_archs): Re-order so that the default
9246 is always at head of list.
9247
9248 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
9249
9250 * coff-arm.c (coff_thumb_pcrel_12, coff_thumb_pcrel_9,
9251 insert_thumb_branch, record_thumb_to_arm_glue): Suppress
9252 definition of these functions for ARM_WINCE builds as they are
9253 not used.
9254 (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET): Do not define
9255 for ARM_WINCE builds.
9256
9257 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
9258
9259 * coff-arm.c (bfd_arm_process_before_allocation):
9260
9261 2002-04-17 J"orn Rennecke <joern.rennecke@superh.com>
9262
9263 * cpu-sh.c (scan_mach): Delete.
9264 (arch_info_struct): Replace scan_mach with bfd_default_scan.
9265 (bfd_sh_arch): Likewise.
9266
9267 2002-04-16 Nick Clifton <nickc@cambridge.redhat.com>
9268
9269 * ihex.c (ihex_write_object_contents): Fix check for records
9270 crossing 64K boundaries.
9271
9272 2002-04-16 Alan Modra <amodra@bigpond.net.au>
9273
9274 * elf32-m32r.c (m32r_elf_add_symbol_hook): Check the hash table
9275 type rather than just assuming entries are ELF.
9276 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
9277 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
9278 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Likewise.
9279 * elf64-mmix.c (mmix_elf_add_symbol_hook): Use bfd_link_hash_entry
9280 rather than elf_link_hash_entry.
9281
9282 2002-04-15 Richard Henderson <rth@redhat.com>
9283
9284 * elf32-mips.c (mips_elf32_object_p): Revert 0404 fragment: allow
9285 n32 binaries.
9286
9287 2002-04-15 Michael Snyder <msnyder@redhat.com>
9288
9289 * opncls.c (bfd_close): Write contents if writeable.
9290 Minor formatting tidy-ups.
9291
9292 2002-04-15 Alan Modra <amodra@bigpond.net.au>
9293
9294 * elf32-ppc.c (ppc_elf_add_symbol_hook): Check the hash table type.
9295
9296 2002-04-12 Michael Snyder <msnyder@redhat.com>
9297
9298 * bfd-in.h (bfd_get_section_lma): New access macro.
9299 Minor white-space fix-up.
9300
9301 2002-04-12 Alan Modra <amodra@bigpond.net.au>
9302
9303 * elf.c (prep_headers): Don't zero EI_OSABI, EI_ABIVERSION or
9304 header pad.
9305
9306 2002-04-09 DJ Delorie <dj@redhat.com>
9307
9308 * elfarm-nabi.c (elf32_arm_howto_table): Fix ABS16 masks.
9309
9310 2002-04-09 Casper S. Hornstrup <chorns@users.sourceforge.net>
9311
9312 * coffcode.h (coff_read_word): New.
9313 (coff_compute_checksum): New.
9314 (coff_apply_checksum): New.
9315 (coff_write_object_contents): Call coff_apply_checksum () to
9316 apply checksum to PE image.
9317
9318 2002-04-08 Randolph Chung <tausq@debian.org>
9319
9320 * elf32-hppa.c (hppa_unwind_entry_compare): Move to elf-hppa.h.
9321 (elf32_hppa_final_link): Split out sorting logic to..
9322 * elf-hppa.h (elf_hppa_sort_unwind): ..here.
9323 (elf_hppa_final_link): Call elf_hppa_sort_unwind.
9324
9325 2002-04-07 Andrew Cagney <ac131313@redhat.com>
9326
9327 * configure.in: Add missing ``|'' to powerpc-*-aix4.[4-9]*
9328 pattern.
9329 * configure: Re-generate.
9330
9331 2002-04-07 Andrew Cagney <ac131313@redhat.com>
9332
9333 * configure.in: Only define AIX_CORE_DUMPX_CORE when AIX version
9334 is greater or equal to 4.3.3.
9335 * configure: Regenerate.
9336 Fix PR gdb/344.
9337
9338 2002-04-05 Hans-Peter Nilsson <hp@axis.com>
9339
9340 * elf32-cris.c (cris_elf_howto_table) <R_CRIS_16_PCREL,
9341 R_CRIS_32_PCREL>: Fix typo in name.
9342 (cris_elf_check_relocs): Always create .rela.got here when
9343 R_CRIS_16_GOTPLT or R_CRIS_32_GOTPLT is seen.
9344 (elf_cris_adjust_gotplt_to_got): Don't create .rela.got here;
9345 assume it's created.
9346
9347 2002-04-04 Daniel Jacobowitz <drow@mvista.com>
9348
9349 * aout-adobe.c (aout_32_bfd_link_hash_table_free): Define.
9350 * aout-target.h (MY_bfd_link_hash_table_free): Conditionally
9351 define.
9352 * aout-tic30.c (MY_bfd_link_hash_table_free): Likewise.
9353 * bfd.c (bfd_link_hash_table_free): Define.
9354 * binary.c (binary_bfd_link_hash_table_free): Define.
9355 * bout.c (b_out_bfd_link_hash_table_free): Define.
9356 * coff-rs6000.c (rs6000coff_vec): Include
9357 _bfd_generic_link_hash_table_free.
9358 (pmac_xcoff_vec): Likewise.
9359 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
9360 (aix5coff64_vec): Likewise.
9361 * coffcode.h (coff_bfd_link_hash_table_free): Conditionally define.
9362 * elf-m10300.c (elf32_mn10300_link_hash_table_free): New function.
9363 (bfd_elf32_bfd_link_hash_table_free): Define.
9364 * elf32-hppa.c (elf32_hppa_link_hash_table_free): New function.
9365 (bfd_elf32_bfd_link_hash_table_free): Define.
9366 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Conditionally
9367 define.
9368 * i386msdos.c (msdos_bfd_link_hash_table_free): Define.
9369 * i386os9k.c (os9k_bfd_link_hash_table_free): Define.
9370 * ieee.c (ieee_bfd_link_hash_table_free): Define.
9371 * ihex.c (ihex_bfd_link_hash_table_free): Define.
9372 * libbfd-in.h (_bfd_nolink_bfd_link_hash_table_free): Define.
9373 (_bfd_generic_link_hash_table_free): Add prototype.
9374 * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Add prototype.
9375 * libecoff.h (_bfd_ecoff_bfd_link_hash_table_free): Define.
9376 * linker.c (_bfd_generic_link_hash_table_free): New function.
9377 * mmo.c (mmo_bfd_link_hash_table_free): Define.
9378 * nlm-target.h (nlm_bfd_link_hash_table_free): Define.
9379 * oasys.c (oasys_bfd_link_hash_table_free): Define.
9380 * ppcboot.c (ppcboot_bfd_link_hash_table_free): Define.
9381 * som.c (som_bfd_link_hash_table_free): Define.
9382 * srec.c (srec_bfd_link_hash_table_free): Define.
9383 * tekhex.c (tekhex_bfd_link_hash_table_free): Define.
9384 * versados.c (versados_bfd_link_hash_table_free): Define.
9385 * vms.c (vms_bfd_link_hash_table_free): New function.
9386 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_free): New function.
9387
9388 * coff-arm.c (coff_arm_link_hash_table_create): Use bfd_malloc
9389 instead of bfd_alloc.
9390 * coff-h8300.c (h8300_coff_link_hash_table_create): Likewise.
9391 * coff-mcore.c (coff_mcore_link_hash_table_create): Likewise.
9392 * coff-ppc.c (ppc_coff_link_hash_table_create): Likewise.
9393 * cofflink.c (_bfd_coff_link_hash_table_create): Likewise.
9394 * ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
9395 * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise.
9396 * elf.c (_bfd_elf_link_hash_table_create): Likewise.
9397 * elf32-arm.h (elf32_arm_link_hash_table_create): Likewise.
9398 * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
9399 * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise.
9400 * elf32-i386.c (elf_i386_link_hash_table_create): Likewise.
9401 * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
9402 * elf32-s390.c (elf_s390_link_hash_table_create): Likewise.
9403 * elf32-sh.c (sh_elf_link_hash_table_create): Likewise.
9404 * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create): Likewise.
9405 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
9406 * elf64-s390.c (elf_s390_link_hash_table_create): Likewise.
9407 * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise.
9408 * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create): Likewise.
9409 * elf64-x86-64.c (elf64_x86_64_link_hash_table_create): Likewise.
9410 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
9411 * linker.c (_bfd_generic_link_hash_table_create): Likewise.
9412 * m68klinux.c (linux_link_hash_table_create): Likewise.
9413 * sparclinux.c (linux_link_hash_table_create): Likewise.
9414 * sunos.c (sunos_link_hash_table_create): Likewise.
9415 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise.
9416
9417 * targets.c: Add _bfd_link_hash_table_free to xvec.
9418
9419 * bfd-in2.h: Regenerate.
9420 * libbfd.h: Regenerate.
9421 * libcoff.h: Regenerate.
9422
9423 2002-04-04 Alan Modra <amodra@bigpond.net.au>
9424
9425 * dep-in.sed: Cope with absolute paths.
9426 * Makefile.am (dep.sed): Subst TOPDIR, and not INCDIR.
9427 Run "make dep-am".
9428 * Makefile.in: Regenerate.
9429 * coff-arm.c: Fix copyright date.
9430 * cpu-h8300.c: Likewise.
9431 * cpu-i370.c: Likewise.
9432 * cpu-s390.c: Likewise.
9433 * cpu-mips.c: Likewise.
9434 * po/SRC-POTFILES.in: Regenerate.
9435
9436 2002-04-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
9437
9438 * Makefile.am: Add elfxx-mips.c to the known backends.
9439 (elf32-mips.lo): remove dependency to coff/external.h.
9440 * Makefile.in: Regenerate.
9441 * configure.in: Add elfxx-mips.lo to all vectors using elf32-mips.lo
9442 Remove elf32-mips.lo from 64 bit vectors. Update dependencies
9443 accordingly.
9444 * configure: Regenerate.
9445 * elf-bfd.h: Move all MIPS ELF specific prototypes to elfxx-mips.h.
9446 (irix_compat_t): IRIX compatibility level, moved from elf32-mips.c.
9447 (elf_backend_mips_irix_compat, elf_backend_mips_rtype_to_howto): New
9448 MIPS specific backend functions.
9449 * elf32-mips.c: Moved most code to elfxx-mips.c.
9450 (mips_elf_hi16_reloc): Rename from _bfd_mips_elf_hi16_reloc and make
9451 static.
9452 (mips_elf_lo16_reloc): Likewise, was _bfd_mips_elf_lo16_reloc.
9453 (mips_elf_got16_reloc): Likewise, was _bfd_mips_elf_got16_reloc.
9454 (mips_elf_gprel32_reloc): Likewise, was _bfd_mips_elf_gprel32_reloc.
9455 (mips_elf32_rtype_to_howto): Rename from mips_rtype_to_howto. Changed
9456 interface to allow selection of the right REL or RELA howto table.
9457 (mips_elf32_object_p): Rename from _bfd_mips_elf_object_p and made
9458 static. Let it refuse n32 objects.
9459 (elf32_mips_grok_prstatus): Rename from _bfd_elf32_mips_grok_prstatus.
9460 (elf32_mips_grok_psinfo): Rename from _bfd_elf32_mips_grok_psinfo.
9461 (elf32_mips_discard_info): Rename from _bfd_elf32_mips_discard_info.
9462 (elf32_mips_ignore_discarded_relocs): Rename from
9463 _bfd_elf32_mips_ignore_discarded_relocs.
9464 (elf32_mips_write_section): Rename from _bfd_elf32_mips_write_section.
9465 (elf32_mips_irix_compat): New function, replaces IRIX_COMPAT.
9466 (elf_mips_howto_table_rela): Remove.
9467 * elf64-mips.c: Moved most code to elfxx-mips.c.
9468 (bfd_elf64_bfd_reloc_type_lookup): Make static.
9469 (mips_elf64_rtype_to_howto): New function.
9470 (mips_elf64_object_p): Likewise.
9471 (elf64_mips_irix_compat): Likewise.
9472 * elfxx-mips.c: New file containing common code merged together from
9473 elf32-mips.c and elf64-mips.c.
9474 * elfxx-mips.h: New file containing MIPS specific prototypes from
9475 elf-bfd.h.
9476 * elfxx-target.h: Add handling for elf_backend_mips_irix_compat and
9477 elf_backend_mips_rtype_to_howto.
9478
9479 2002-04-04 Alan Modra <amodra@bigpond.net.au>
9480
9481 * srec.c (MAXCHUNK, Chunk): Revise comments.
9482 (srec_write_record): Correct buffer size.
9483 (srec_write_header): Do without intermediate buffer.
9484 (srec_write_section): Validate Chunk.
9485 (srec_write_terminator): Pass NULL instead of dummy buffer.
9486 (srec_write_symbols): Pass file and symbol names directly to
9487 bfd_bwrite so sprintf won't overflow buffer.
9488
9489 2002-04-03 Jakub Jelinek <jakub@redhat.com>
9490
9491 * elf32-sparc.c (elf32_sparc_relocate_section): Don't emit dynamic
9492 PC relative relocs against hidden symbols.
9493 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
9494
9495 2002-04-03 Alan Modra <amodra@bigpond.net.au>
9496
9497 * elf.c (_bfd_elf_make_section_from_shdr): When setting section
9498 LMAs, loop over segments until p_vaddr and p_memsz specify an
9499 extent enclosing the section.
9500
9501 2002-04-02 Nick Clifton <nickc@cambridge.redhat.com>
9502
9503 * ihex.c (ihex_write_object_contents): Do not allow records to
9504 cross a 64K boundary - wrap if necessary.
9505
9506 2002-04-01 Nathan Williams <nathanw@wasabisystems.com>
9507
9508 * elf.c (elfcore_netbsd_get_lwpid): Fix off-by-one error
9509 which caused the returned LWP ID to always be 0.
9510
9511 2002-04-01 Richard Henderson <rth@redhat.com>
9512
9513 * elf32-sparc.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
9514 (elf32_sparc_relocate_section): Use it to figure out when to
9515 initialize .got entries.
9516 * elf64-sparc.c: Similarly.
9517
9518 2002-03-28 Alan Modra <amodra@bigpond.net.au>
9519
9520 * linker.c (link_action): Ignore duplicate warning syms.
9521 (_bfd_generic_link_write_global_symbol): Follow warning symbol link.
9522 * elflink.h (elf_adjust_dynstr_offsets): Likewise.
9523 (elf_adjust_dynamic_symbol): Likewise.
9524 (elf_export_symbol): Likewise.
9525 (elf_link_find_version_dependencies): Likewise.
9526 (elf_link_assign_sym_version): Likewise.
9527 (elf_link_sec_merge_syms): Likewise.
9528 (elf_link_output_extsym): Likewise.
9529 (elf_gc_sweep_symbol): Likewise.
9530 (elf_gc_propagate_vtable_entries_used): Likewise.
9531 (elf_gc_smash_unused_vtentry_relocs): Likewise.
9532 (elf_gc_allocate_got_offsets): Likewise.
9533 (elf_collect_hash_codes): Likewise.
9534 * elflink.c (elf_link_renumber_hash_table_dynsyms): Likewise.
9535 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
9536 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
9537 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
9538 * elf32-arm.h (elf32_arm_discard_copies): Likewise.
9539 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Likewise.
9540 (elf_cris_discard_excess_dso_dynamics): Likewise.
9541 * elf32-hppa.c (clobber_millicode_symbols): Likewise.
9542 (mark_PIC_calls): Likewise.
9543 (allocate_plt_static): Likewise.
9544 (allocate_dynrelocs): Likewise.
9545 (readonly_dynrelocs): Likewise.
9546 * elf32-i386.c (allocate_dynrelocs): Likewise.
9547 (readonly_dynrelocs): Likewise.
9548 * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
9549 * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
9550 * elf32-mips.c (mips_elf_output_extsym): Likewise.
9551 (mips_elf_sort_hash_table_f): Likewise.
9552 (mips_elf_check_mips16_stubs): Likewise.
9553 * elf32-s390.c (allocate_dynrelocs): Likewise.
9554 (readonly_dynrelocs): Likewise.
9555 * elf32-sh.c (sh_elf_discard_copies): Likewise.
9556 * elf32-xstormy16.c (xstormy16_relax_plt_check): Likewise.
9557 (xstormy16_relax_plt_realloc): Likewise.
9558 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
9559 (elf64_alpha_output_extsym): Likewise.
9560 * elf64-hppa.c (elf64_hppa_mark_exported_functions): Likewise.
9561 * elf64-mips.c (mips_elf64_sort_hash_table_f): Likewise.
9562 (mips_elf64_check_mips16_stubs): Likewise.
9563 (mips_elf64_output_extsym): Likewise.
9564 * elf64-ppc.c (func_desc_adjust): Likewise.
9565 (allocate_dynrelocs): Likewise.
9566 (readonly_dynrelocs): Likewise.
9567 * elf64-s390.c (allocate_dynrelocs): Likewise.
9568 (readonly_dynrelocs): Likewise.
9569 * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
9570 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
9571 (readonly_dynrelocs): Likewise.
9572 * elfxx-ia64.c (elfNN_ia64_global_dyn_sym_thunk): Likewise.
9573 * aoutx.h (aout_link_write_other_symbol): Likewise.
9574 * cofflink.c (_bfd_coff_write_task_globals): Likewise.
9575 (_bfd_coff_write_global_sym): Likewise.
9576 * i386linux.c (linux_tally_symbols): Likewise.
9577 * m68klinux.c (linux_tally_symbols): Likewise.
9578 * sparclinux.c (linux_tally_symbols): Likewise.
9579 * pdp11.c (aout_link_write_other_symbol): Likewise.
9580 * sunos.c (sunos_scan_dynamic_symbol): Likewise.
9581 * xcofflink.c (xcoff_build_ldsyms): Likewise.
9582 (xcoff_write_global_symbol): Likewise.
9583
9584 * cofflink.c (_bfd_coff_final_link): Formatting.
9585 * cpu-mips.c (mips_compatible): Make static, prototype.
9586 * elf32-i386.c (elf_i386_check_relocs): Formatting.
9587 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
9588 * elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
9589 * elf64-mips.c (mips_elf64_sort_hash_table): Likewise.
9590 (mips_elf64_final_link): Likewise.
9591 * elflink.h (elf_link_find_version_dependencies): Remove duplicate
9592 prototype.
9593
9594 2002-03-27 Nick Clifton <nickc@cambridge.redhat.com>
9595
9596 * coff-arm.c (SWAP_IN_RELOC_OFFSET): Define.
9597 (SWAP_OUT_RELOC_OFFSET): Define.
9598
9599 2002-03-27 Gregory Steuck <greg@nest.cx>
9600
9601 * elf.c (_bfd_elf_get_symtab_upper_bound): Leave space for
9602 terminating NULL if empty symbol table.
9603 (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise.
9604
9605 2002-03-26 H.J. Lu (hjl@gnu.org)
9606
9607 * elflink.h (elf_link_input_bfd): Revert the last change since
9608 the gcc exception handling isn't fixed yet.
9609
9610 2002-03-26 H.J. Lu (hjl@gnu.org)
9611
9612 * elflink.h (elf_link_input_bfd): Complain about relocations
9613 against local symbols in discarded sections.
9614
9615 2002-03-26 Alan Modra <amodra@bigpond.net.au>
9616
9617 * elflink.h (elf_gc_mark): Don't recurse into non-ELF sections.
9618
9619 2002-03-23 Alan Modra <amodra@bigpond.net.au>
9620
9621 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
9622 section file offset for !SEC_LOAD sections.
9623
9624 2002-03-21 Richard Earnshaw <rearnsha@arm.com>
9625
9626 * elf32-arm.h (elf32_arm_final_link_relocate <case R_ARM_GOTOFF>,
9627 <case R_ARM_GOT>): Handle relocations to Thumb functions.
9628
9629 2002-03-21 Alan Modra <amodra@bigpond.net.au>
9630
9631 * coff64-rs6000.c (_bfd_xcoff64_put_symbol_name): Prototype.
9632 Whitespace changes.
9633 * archive.c: Update copyright date.
9634 * bfd-in2.h: Regenerate.
9635 * libbfd.h: Regenerate.
9636 * Makefile.am: Run "make dep-am"
9637 * Makefile.in: Regenerate.
9638 * po/SRC-POTFILES.in: Regenerate.
9639
9640 2002-03-20 Daniel Jacobowitz <drow@mvista.com>
9641
9642 * dwarf2.c (struct funcinfo): Move up.
9643 (lookup_address_in_function_table): New argument function_ptr.
9644 Set it.
9645 (lookup_address_in_line_table): New argument function. If function
9646 is non-NULL, use it to handle ``addr'' before the first line note of
9647 the function.
9648 (comp_unit_find_nearest_line): Update and swap calls to
9649 lookup_address_in_function_table and lookup_address_in_line_table.
9650 * syms.c (_bfd_stab_section_find_nearest_line): Use the first
9651 N_SLINE encountered if we see an N_FUN before any N_SLINE.
9652
9653 2002-03-20 Tom Rix <trix@redhat.com>
9654
9655 * coff-rs6000.c (_bfd_xcoff_stat_arch_elt): Renamed from
9656 _bfd_xcoff_generic_stat_arch_elt. Fix format check.
9657 * coff64-rs6000.c : Use _bfd_xcoff_stat_arch_elt.
9658
9659 2002-03-19 Tom Rix <trix@redhat.com>
9660
9661 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through all
9662 dynamic objects in archives.
9663
9664 2002-03-19 Hans-Peter Nilsson <hp@bitrange.com>
9665
9666 * elflink.h (NAME(bfd_elf,record_link_assignment)): Don't set
9667 STT_NOTYPE symbols to STT_OBJECT.
9668
9669 2002-03-18 Jan Hubicka <jh@suse.cz>
9670
9671 * cpu-i386.c (bfd_x86_64_arch): Rename to "i386:x86-64"
9672
9673 2002-03-18 Tom Rix <trix@redhat.com>
9674
9675 * aix5ppc.core.c : New file for AIX 5 64 bit core support.
9676 * bfd-in.h : Add bfd_xcoff_ar_archive_set_magic declaration.
9677 * coff-rs6000 (do_pad) : New function for archive padding.
9678 (do_copy) : New function for object file copying in archives.
9679 (do_shared_object_padding) : New function for padding shared
9680 objects to their text section alignment in archives.
9681 (bfd_xcoff_ar_achive_set_magic) : Stub.
9682 (xcoff_write_armap_big) : Use do_copy and do_pad.
9683 (xcoff_write_archive_contents_big) : Use do_shared_object_padding,
9684 do_copy and do_pad.
9685 * coff64-rs6000.c (xcoff64_write_ojbect_contents) : Use
9686 bfd_xcoff_magic_number.
9687 (xcoff64_bad_format_hook) : New function for _bfd_bad_format_hook
9688 fop.
9689 (xcoff_backend_data_r) : Use xcoff64_bad_format_hook.
9690 (bfd_xcoff_aix5_backend_data) : New Aix 5 backend data.
9691 (aix5coff64_vec) : New Aix 5 target aix5coff64-rs6000.
9692 * rs6000-core.c : Update copyright date.
9693 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Check for NULL
9694 csectpp.
9695 * coffcode.h (coff_new_section_hook) : Use new accessor macros.
9696 (coff_set_arch_mach_hook) : Add Aix 5 U64_TOCMAGIC magic #.
9697 (coff_set_flags) : Use bfd_xcoff_magic_number.
9698 * libxcoff.h (bfd_xcoff_is_xcoff64): Add U64_TOCMAGIC.
9699 * configure.in : Add powerpc-*-aix5 and rs6000-*-aix5 support.
9700 * Makefile.am : Same.
9701 * config.bfd : Same.
9702 * targets.c : Same.
9703 * configure : Regnerate.
9704 * Makefile.in : Same.
9705 * bfd-in2.h : Same.
9706
9707 2002-03-18 Nick Clifton <nickc@cambridge.redhat.com>
9708
9709 * po/fr.po: Updated version.
9710
9711 2002-03-18 Alan Modra <amodra@bigpond.net.au>
9712
9713 * libbfd.c (bfd_write_bigendian_4byte_int): Return true iff success.
9714 * libbfd.h: Regenerate.
9715 * archive.c (coff_write_armap): Pass on failures from
9716 bfd_write_bigendian_4byte_int.
9717
9718 2002-03-14 H.J. Lu <hjl@gnu.org>
9719
9720 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the BFD
9721 error to bfd_error_nonrepresentable_section for reinit_array
9722 section in DSO.
9723
9724 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
9725
9726 * coffcode.h (coff_slurp_symbol_table): When adding BSF_WEAK flag,
9727 OR it in rather than replacing previously selected flags.
9728
9729 * elfxx-target.h (TARGET_BIG_SYM): Set ar_max_namelen to 15.
9730 (TARGET_LITTLE_SYM): Set ar_max_namelen to 15.
9731
9732 2002-03-14 Alan Modra <amodra@bigpond.net.au>
9733
9734 * cpu-mips.c (mips_compatible): New. Don't check bits_per_word.
9735 (N): Use the above.
9736 * elflink.h (elf_bfd_final_link): Revert last change. Instead,
9737 ensure reloc size matches before calling elf_link_input_bfd.
9738 Add an assert to check reloc size when counting output relocs.
9739
9740 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
9741
9742 * mmo.c (mmo_get_loc): Return NULL rather than false.
9743
9744 2002-03-13 Nick Clifton <nickc@cambridge.redhat.com>
9745
9746 * po/fr.po: Updated version.
9747
9748 2002-03-13 Alan Modra <amodra@bigpond.net.au>
9749
9750 * archures.c (bfd_default_compatible): Test bits_per_word.
9751 * cpu-i386.c (i386_compatible): Remove. Replace occurrences with
9752 bfd_default_compatible.
9753 * cpu-i370.c (i370_compatible): Likewise.
9754 * cpu-sparc.c (sparc_compatible): Likewise.
9755 * cpu-h8300.c (compatible): Test in->arch == out->arch.
9756
9757 * elflink.h: Formatting fixes.
9758 (elf_link_output_extsym): Merge undefined and undef weak cases.
9759
9760 * elflink.h (elf_bfd_final_link): Only call elf_link_input_bfd
9761 when word size of input matches output word size.
9762
9763 2002-03-12 Andreas Jaeger <aj@suse.de>
9764
9765 * cpu-i386.c (i386_compatible): New. Use it instead of
9766 bfd_default_compatible.
9767
9768 2002-03-07 H.J. Lu (hjl@gnu.org)
9769
9770 * coff-sh.c (shcoff_reloc_map): Use bfd_reloc_code_real_type
9771 as the type for bfd_reloc_val.
9772
9773 2002-03-05 John David Anglin <dave@hiauly1.hia.nrc.ca>
9774
9775 * elf-hppa.h (elf_hppa_is_dynamic_loader_symbol): New function.
9776 (elf_hppa_relocate_section): Ignore undefined dynamic loader symbols.
9777 (elf_hppa_final_link_relocate): Correct relocations for indirect
9778 references to local data through the DLT. Fix .opd creation for
9779 local symbols using R_PARISC_LTOFF_FPTR32 and R_PARISC_FPTR64
9780 relocations. Use e_lsel selector for R_PARISC_DLTIND21L,
9781 R_PARISC_LTOFF_FPTR21L and R_PARISC_LTOFF_TP21L as per
9782 "Processor-Specific ELF for PA_RISC, Version 1.43" document.
9783 Similarly, use e_rsel for DLT and LTOFF 'R' relocations.
9784 * elf32-hppa.c (final_link_relocate): Revise relocation selectors
9785 as per "Processor-Specific ELF for PA_RISC, Version 1.43" document.
9786
9787 2002-03-05 Jakub Jelinek <jakub@redhat.com>
9788
9789 * merge.c (_bfd_merge_sections): Don't segfault if there
9790 is nothing to merge due to GC.
9791
9792 2002-03-05 Alan Modra <amodra@bigpond.net.au>
9793
9794 * elf32-hppa.c (clobber_millicode_symbols): Remove hack to keep
9795 symbols that have been forced local.
9796
9797 * elflink.h (elf_bfd_final_link): Call elf_link_output_extsym
9798 to output forced local syms for non-shared link.
9799 (elf_link_output_extsym): Tweak condition for calling backend
9800 adjust_dynamic_symbol so that previous behaviour is kept.
9801 Whitespace changes throughout file.
9802
9803 2002-03-04 H.J. Lu <hjl@gnu.org>
9804
9805 * elf.c (bfd_section_from_shdr): Handle special sections,
9806 .init_array, .fini_array and .preinit_array.
9807 (elf_fake_sections): Likewise.
9808
9809 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Create the
9810 DT entry only if the section is in output for .init_array,
9811 .fini_array and .preinit_array. Complain about .preinit_array
9812 section in DSO.
9813 (elf_bfd_final_link): Warn zero size for .init_array,
9814 .fini_array and .preinit_array sections.
9815
9816 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Remove
9817 SHT_INIT_ARRAY, SHT_FINI_ARRAY and SHT_PREINIT_ARRAY.
9818 (elfNN_ia64_fake_sections): Remove .init_array, .fini_array and
9819 .preinit_array.
9820
9821 2002-03-04 Alan Modra <amodra@bigpond.net.au>
9822
9823 * configure.in (WIN32LIBADD): Don't eval PICFLAG assignment.
9824 * configure: Regenerate.
9825
9826 2002-03-02 Tom Rix <trix@redhat.com>
9827
9828 * coff64-rs6000.c (xcoff64_howto_table): Replace howto types with
9829 symbolic equiv.
9830 * coff-rs6000.c (xcoff_howto_table): Same.
9831
9832 2002-03-01 David Mosberger <davidm@hpl.hp.com>
9833
9834 * elflink.h (size_dynamic_sections): If section named
9835 ".preinit_array" exists, create DT_PREINIT_ARRAY and
9836 DT_PREINIT_ARRAYSZ entries in dynamic table. Analogously for
9837 ".init_array" and ".fini_array".
9838 (elf_bfd_final_link): Handle DT_PREINIT_ARRAYSZ, DT_INIT_ARRAYSZ,
9839 DT_FINI_ARRAYSZ, DT_PREINIT_ARRAY, DT_INIT_ARRAY, and
9840 DT_FINI_ARRAY.
9841
9842 2002-02-26 Andrew Macleod <amacleod@cygnus.com>
9843
9844 * elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local
9845 dynsyms.
9846
9847 2002-02-25 Alan Modra <amodra@bigpond.net.au>
9848
9849 * elf64-hppa.h: Update copyright date.
9850
9851 * elf64-ppc.c (ppc64_elf_check_relocs): Warning fix.
9852 (ppc64_elf_relocate_section): Don't generate power4 style branch
9853 hints for *_BRTAKEN and *_BRNTAKEN relocs.
9854
9855 2002-02-22 Jakub Jelinek <jakub@redhat.com>
9856
9857 * elf64-sh64.c (sh_elf64_relocate_section): Fix a typo from my
9858 last patch.
9859 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
9860
9861 2002-02-21 Andreas Jaeger <aj@suse.de>
9862
9863 * elf64-x86-64.c: Major rework that introduces all recent changes
9864 to the x86-64 backend. Get a closer match to elf32-i386.
9865 (struct elf64_x86_64_dyn_relocs): Rename from
9866 elf64_x86_64_pcrel_relocs_copied, add additional fields. Change
9867 all users.
9868 (struct elf64_x86_64_link_hash_table): Add short cuts to some
9869 sections.
9870 (link_hash_newfunc): Rename from elf64_x86_64_link_hash_newfunc,
9871 remove casts, initialize new hash members.
9872 (create_got_section): New.
9873 (elf64_x86_64_create_dynamic_sections): New.
9874 (elf64_x86_64_copy_indirect_symbol): New.
9875 (elf64_x86_64_check_relocs): Don't allocate space for dynamic
9876 relocs, .got or .relgot here but do it in allocate_dynrelocs.
9877 Reference count possible .plt and .got entries. Don't test input
9878 section SEC_READONLY here to try to avoid copy relocs, and keep
9879 dyn_relocs regardless of ELF_LINK_NON_GOT_REF. Don't set
9880 DF_TEXTREL here. Delay setting of variables until needed. Cache
9881 pointer to "sreloc" section in elf_section_data. Tweak condition
9882 under which .got created. Report files with bad relocation
9883 section names.
9884 (elf64_x86_64_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
9885 Reference count possible .plt entries. Don't deallocate .got and
9886 .relgot space here.
9887 (elf64_x86_64_adjust_dynamic_symbol): Handle nocopyreloc. Don't
9888 do copy reloc processing for weakdefs. Remove redundant casts and
9889 aborts. Delay setting of vars until needed. Move creation of
9890 dynamic symbols and allocation of .plt and .rela.plt to
9891 allocate_dynrelocs. Replace BFD_ASSERT with abort.
9892 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
9893 (allocate_dynrelocs): New.
9894 (readonly_dynrelocs): New.
9895 (elf64_x86_64_size_dynamic_sections): Call readonly_dynrelocs.
9896 Allocate space for dyn relocs. Replace BFD_ASSERT with abort.
9897 Zero out the dynamic allocated content space.
9898 (elf64_x86_64_discard_copies): Removed.
9899 (elf64_x86_64_relocate_section): Make use of dynamic section
9900 short-cuts. Localise vars, and delay setting. Better error
9901 reporting, replace BFD_ASSERT with abort. Check
9902 ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined in the
9903 regular object file and tread the weak definition as the normal
9904 one. Don't discard relocs for undefweak or undefined symbols and
9905 check !DEF_REGULAR as well as DEF_DYNAMIC in test for avoided copy
9906 relocs.
9907 (elf64_x86_64_finish_dynamic_symbol): Don't copy relocs for
9908 symbols that have been forced local. Use same test to decide if
9909 we can use a relative reloc for got as relocate_section. Expand
9910 SHN_UNDEF comment. Move expressions out of function calls.
9911 Replace BFD_ASSERT with abort.
9912 (bfd_elf64_bfd_final_link): Removed.
9913 (elf_backend_copy_indirect_symbol): Define.
9914
9915 2002-02-20 Tom Rix <trix@redhat.com>
9916
9917 * coff-rs6000.c (xcoff_howto_table): Add 16 bit R_BA.
9918 (_bfd_xcoff_reloc_type_lookup): Use it.
9919 * coff64-rs6000.c (xcoff64_howto_table): Same.
9920 (xcoff64_reloc_type_lookup): Same.
9921
9922 2002-02-20 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
9923
9924 * osf-core.c (osf_core_vec): OSF/1 (Digital Unix) core files are
9925 little endian.
9926
9927 2002-02-19 Martin Schwidefsky <schwidefsky@de.ibm.com>
9928
9929 * archures.c (bfd_mach_s390_esa): Rename to bfd_mach_s390_31.
9930 (bfd_mach_s390_esame): Rename to bfd_mach_s390_64.
9931 * bfd-in2.h: Regenerate.
9932 * cpu-s390.c (arch_info_struct): Use renamed architecture defines.
9933 Replace architecture name "s390" with "s390:31-bit" and "s390:esame"
9934 with "s390:64-bit".
9935 * elf32-s390.c (elf_howto_table): Add 32 bit pc relative relocations.
9936 (elf_s390_reloc_type_lookup): Likewise.
9937 (elf_s390_check_relocs): Likewise.
9938 (elf_s390_gc_sweep_hook): Likewise.
9939 (elf_s390_relocate_section): Likewise.
9940 (elf_s390_object_p): Use renamed architecture define.
9941 * elf64-s390.c (elf_s390_object_p): Use renamed architecture define.
9942
9943 2002-02-19 Frank Ch. Eigler <fche@redhat.com>
9944
9945 * syms.c (stt[]): Sorted. Added .init/.fini -> "t" mapping.
9946
9947 2002-02-19 Jakub Jelinek <jakub@redhat.com>
9948
9949 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Enable
9950 absptr -> pcrel optimization for shared libs.
9951 Only create minimal .eh_frame_hdr if absptr FDE encoding in shared
9952 library cannot be converted to pcrel.
9953 (_bfd_elf_eh_frame_section_offset): Return -2 if making absptr
9954 relative.
9955 * elf32-i386.c (elf_i386_relocate_section): If
9956 _bfd_elf_section_offset returned -2, skip, but make sure the
9957 relocation is installed.
9958 * elf32-arm.h (elf32_arm_final_link_relocate): Likewise.
9959 * elf32-cris.c (cris_elf_relocate_section): Likewise.
9960 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
9961 * elf32-i370.c (i370_elf_relocate_section): Likewise.
9962 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
9963 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
9964 * elf32-s390.c (elf_s390_relocate_section): Likewise.
9965 * elf32-sh.c (sh_elf_relocate_section): Likewise.
9966 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
9967 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
9968 * elf64-s390.c (elf_s390_relocate_section): Likewise.
9969 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
9970 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
9971 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
9972 * elf64-alpha.c (elf64_alpha_relocate_section): Handle
9973 _bfd_elf_section_offset returning -2 the same way as -1.
9974 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
9975 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add FIXME
9976 and BFD_ASSERT.
9977 * elf64-mips.c (mips_elf64_create_dynamic_relocation): Likewise.
9978
9979 2002-02-18 Tom Rix <trix@redhat.com>
9980
9981 * xcofflink.c (bfd_xcoff_link_gernate_rtinit): Add -brtl support.
9982 (bfd_xcoff_size_dynamic_sections): Same.
9983 * bfd-in.h (bfd_xcoff_link_generate_rtinit): Same.
9984 (bfd_xcoff_size_dynamic_sections): Same.
9985 * coff-rs6000.c (xcoff_generate_rtinit): Same.
9986 * coff-rs646000.c (xcoff64_generate_rtinit): Same.
9987 * libxcoff.h (struct xcoff_backend_data_rec): Same.
9988 * xcofflink.c (xcoff_build_ldsyms, xcoff_link_add_symbols): Clean.
9989 * bfd-in2.h: Regenerate.
9990
9991 2002-02-18 Alan Modra <amodra@bigpond.net.au>
9992
9993 * elf64-ppc.c (STFD_FR0_0R1, LFD_FR0_0R1, BLR): Define.
9994 (struct ppc_link_hash_table): Add sfpr.
9995 (ppc64_elf_link_hash_table_create): Init it.
9996 (ppc64_elf_create_dynamic_sections): Split creation of .stub and
9997 .glink out to..
9998 (create_linkage_sections): ..here. Make .sfpr too.
9999 (ppc64_elf_check_relocs): Call create_linkage_sections, and set
10000 dynobj early.
10001 (MIN_SAVE_FPR, MAX_SAVE_FPR): Define.
10002 (ppc64_elf_func_desc_adjust): Look for missing ._savef* and
10003 ._restf* functions, and create as needed.
10004 (func_desc_adjust): Only force_local for shared libs.
10005
10006 2002-02-18 David O'Brien <obrien@FreeBSD.org>
10007
10008 * configure.in: Bump version number post 2.12 branching.
10009 * configure: Regenerate.
10010
10011 2002-02-17 Hans-Peter Nilsson <hp@bitrange.com>
10012
10013 * mmo.c: Correct and improve comments.
10014 (mmo_write_chunk): Store trailing byte in bfd buffer; don't
10015 zero-pad. Use input to fill up non-empty bfd buffer.
10016 (mmo_flush_chunk): New function.
10017 (mmo_write_loc_chunk): Add parameter last_vmap, all callers
10018 changed. Don't emit location specifier if VMA is same as
10019 *LAST_VMAP after omitting leading zero contents. Call
10020 mmo_flush_chunk before emitting location specifier.
10021 (mmo_write_loc_chunk_list): Call mmo_flush_chunk when finished
10022 with mmo_write_loc_chunk calls.
10023 (mmo_internal_write_section): Call mmo_flush_chunk after
10024 mmo_write_chunk.
10025 (mmo_write_symbols_and_terminator): Move :Main to first position
10026 in symbol array. Add faked one if it does not exist if there are
10027 other symbols. Don't add it if there are no symbols at all. Move
10028 out test for value of :Main from symbol loop. Rename table
10029 fakemain to maintable and variable mainsym to fakemain.
10030
10031 2002-02-15 Richard Henderson <rth@redhat.com>
10032
10033 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: A target
10034 section with no got matches any got. Simplify error generaion.
10035
10036 2002-02-15 Alan Modra <amodra@bigpond.net.au>
10037
10038 Support arbitrary length fill patterns.
10039 * linker.c (bfd_new_link_order): Zero all fields with bfd_zalloc.
10040 (_bfd_default_link_order): Remove bfd_fill_link_order code.
10041 Call default_data_link_order.
10042 (default_fill_link_order): Delete.
10043 (default_data_link_order): New function.
10044 * elf32-mips.c (_bfd_mips_elf_final_link): Replace occurrences
10045 of bfd_fill_link_order with bfd_data_link_order.
10046 * elf64-alpha.c (elf64_alpha_final_link): Likewise.
10047 * elf64-mips.c (mips_elf64_final_link): Likewise.
10048
10049 * bfd.c (bfd_scan_vma): Clamp overflows to max bfd_vma value.
10050 Correct value returned in "end" for "0x<non-hex>".
10051
10052 2002-02-14 Nick Clifton <nickc@cambridge.redhat.com>
10053
10054 * cpu-arm.c (processors): Replace 'arch' field with 'mach'.
10055 (scan): Test against 'mach' field in info structure.
10056
10057 2002-02-14 Alan Modra <amodra@bigpond.net.au>
10058
10059 * elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD.
10060
10061 2002-02-14 Matt Fredette <fredette@netbsd.org>
10062
10063 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize
10064 EF_M68000.
10065
10066 2002-02-13 Nick Clifton <nickc@cambridge.redhat.com>
10067
10068 * elf.c (_bfd_elf_make_section_from_shdr): Do not insist on
10069 non-zero physical addresses when adjusting the LMAs of new
10070 sections.
10071
10072 2002-02-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
10073
10074 * elf-hppa.h (elf_hppa_reloc_final_type): New function stripped
10075 from _bfd_elf_hppa_gen_reloc_type.
10076 (_bfd_elf_hppa_gen_reloc_type): Remove duplicate prototype.
10077 * elf32-hppa.h (elf32_hppa_reloc_final_type): Add protptype.
10078 * elf32-hppa.c: Include elf32-hppa.h before elf-hppa.h.
10079 * elf64-hppa.h (elf64_hppa_reloc_final_type): Add protptype.
10080
10081 2002-02-12 Alexandre Oliva <aoliva@redhat.com>
10082
10083 * elf-m10300.c (mn10300_elf_relax_section): Skip section before
10084 loading its contents if there's nothing to do in it.
10085
10086 2002-02-12 Alan Modra <amodra@bigpond.net.au>
10087
10088 * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for crossing
10089 64k boundary.
10090
10091 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Add dynamic
10092 DT_PPC64_OPD and DT_PPC64_OPDSZ tags.
10093 (ppc64_elf_finish_dynamic_sections): Set values for them.
10094
10095 2002-02-11 Michael Snyder <msnyder@redhat.com>
10096
10097 * elf-bfd.h (elfcore_write_lwpstatus): Add prototype.
10098 * elf.c (elfcore_grok_pstatus): Add prototype.
10099 (elfcore_grok_lwpstatus): Add prototype.
10100 (elfcore_write_lwpstatus): New function.
10101 (elfcore_write_pstatus): Fix typo, eliminate unnecessary memcpy.
10102
10103 2002-02-11 Alexandre Oliva <aoliva@redhat.com>
10104
10105 * elf32-sh.c: Added missing prototypes.
10106 * elf32-sh64.c: Likewise.
10107 (sh_elf_align_loads): Mark unused args as such.
10108 * elf64-sh64.c: Added missing prototypes.
10109 (struct elf_sh64_link_hash_entry): Fix typo.
10110 (sh_elf64_relocate_section): Fix info argument passed to
10111 _bfd_elf_section_offset.
10112
10113 2002-02-11 Alan Modra <amodra@bigpond.net.au>
10114
10115 * Makefile.am: "make dep-am".
10116 * Makefile.in: Regenerate.
10117 * aclocal.m4: Regenerate.
10118 * config.in: Regenerate.
10119 * configure: Regenerate.
10120
10121 2002-02-10 Daniel Jacobowitz <drow@mvista.com>
10122
10123 * coff-rs6000.c (xcoff_generate_rtinit): Silence uninitialized
10124 variable warnings.
10125 * elf32-sh.c (sh_elf_relax_section): Silence signed/unsigned
10126 comparison warning.
10127 * trad-core.c (trad_unix_core_file_p): Silence pointer/integer
10128 cast warnings for the common case.
10129
10130 2002-02-10 Hans-Peter Nilsson <hp@bitrange.com>
10131
10132 * config.bfd (sh-*-linux*, sh-*-elf* | sh-*-rtemself*): Add sh64
10133 vectors.
10134 (sh-*-netbsdelf*): New, to trump sh*-*-netbsdelf* and add sh64
10135 vectors.
10136
10137 2002-02-09 Richard Henderson <rth@redhat.com>
10138
10139 * elf64-alpha.c (elf64_alpha_howto): Add R_ALPHA_BRSGP.
10140 (elf64_alpha_reloc_map, elf64_alpha_check_relocs): Likewise.
10141 (elf64_alpha_relocate_section): Likewise.
10142 * reloc.c (BFD_RELOC_ALPHA_BRSGP): New.
10143 * bfd-in2.h, libbfd.h: Rebuild.
10144
10145 2002-02-09 Hans-Peter Nilsson <hp@bitrange.com>
10146
10147 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs): Check
10148 that base-plus-offset reloc accounting is consistent.
10149 (mmix_elf_relax_section): Keep base-plus-offset reloc accounting
10150 up to date for undefined symbols.
10151
10152 2002-02-08 Eric Christopher <echristo@redhat.com>
10153
10154 From Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
10155
10156 * elf32-mips.c (_bfd_mips_elf_fake_sections): Don't create .rela
10157 sections for the O32 ABI.
10158
10159 2002-02-08 Chris Demetriou <cgd@broadcom.com>
10160
10161 * elf32-arm.h: Fix formatting of _("...").
10162 * elf32-d10v.c: Likewise.
10163 * elf32-m68k.c: Likewise.
10164 * elf32-mips.c: Likewise.
10165
10166 2002-02-08 Ivan Guzvinec <ivang@opencores.org>
10167
10168 * coff-or32.c: Fix compile time warning messages.
10169
10170 2002-02-08 Alexandre Oliva <aoliva@redhat.com>
10171
10172 Contribute sh64-elf.
10173 2002-01-23 Alexandre Oliva <aoliva@redhat.com>
10174 * reloc.c (R_SH_GOTPLT32, R_SH_GOT_LOW16, R_SH_GOT_MEDLOW16,
10175 R_SH_GOT_MEDHI16, R_SH_GOT_HI16, R_SH_GOTPLT_LOW16,
10176 R_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_HI16,
10177 R_SH_PLT_LOW16, R_SH_PLT_MEDLOW16, R_SH_PLT_MEDHI16,
10178 R_SH_PLT_HI16, R_SH_GOTOFF_LOW16, R_SH_GOTOFF_MEDLOW16,
10179 R_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_HI16, R_SH_GOTPC_LOW16,
10180 R_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDHI16, R_SH_GOTPC_HI16,
10181 R_SH_GOT10BY4, R_SH_GOTPLT10BY4, R_SH_GOT10BY8, R_SH_GOTPLT10BY8,
10182 R_SH_COPY64, R_SH_GLOB_DAT64, R_SH_JMP_SLOT64, R_SH_RELATIVE64):
10183 New relocs.
10184 * libbfd.h, bfd-in2.h: Rebuilt.
10185 * elf32-sh.c (sh_elf_howto_table): Define new relocs.
10186 (sh_reloc_map): Map them.
10187 (PLT_ENTRY_SIZE, elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
10188 elf_sh_plt_entry_be, elf_sh_plt_entry_le, elf_sh_pic_plt_entry_be,
10189 elf_sh_pic_plt_entry_le, elf_sh_plt0_entry, elf_sh_plt_entry,
10190 elf_sh_pic_plt_entry, elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
10191 elf_sh_plt0_gotplt_offset, elf_sh_plt_temp_offset,
10192 elf_sh_plt_symbol_offset, elf_sh_plt_reloc_offset,
10193 movi_shori_putval) [INCLUDE_SHMEDIA]: New.
10194 (elf_sh_link_hash_entry) [INCLUDE_SHMEDIA]: Add
10195 datalabel_got_offset.
10196 (sh_elf_link_hash_newfunc): Initialize it.
10197 (sh_elf_relocate_section): Augment the scope of
10198 seen_stt_datalabel. Introduce GOTPLT support. Extend GOTPC, PLT,
10199 GOT and GOTOFF handling to new SHmedia relocation types. Support
10200 GOT_BIAS.
10201 (sh_elf_check_relocs): Likewise.
10202 (sh_elf_finish_dynamic_symbol) [TARGET_SHMEDIA]: Set up values in
10203 PLT entries using movi_shori_putval. Support GOT_BIAS.
10204 (sh_elf_finish_dynamic_sections): Likewise.
10205 * elf32-sh64.c (shmedia_prepare_reloc): Do not add addend to
10206 relocation, it's now done by the caller.
10207 (GOT_BIAS): New.
10208 * elf64-sh64.c (GOT_BIAS, PLT_ENTRY_SIZE, elf_sh64_sizeof_plt,
10209 elf_sh64_plt_plt0_offset, elf_sh64_plt0_gotplt_offset,
10210 elf_sh64_plt_temp_offset, elf_sh64_plt_symbol_offset,
10211 elf_sh64_plt_reloc_offset, ELF_DYNAMIC_INTERPRETER,
10212 elf_sh64_pcrel_relocs_copied, elf_sh64_link_hash_entry,
10213 elf_sh64_link_hash_table, sh64_elf64_link_hash_traverse,
10214 sh64_elf64_hash_table): New.
10215 (sh_elf64_howto_table): Introduce new relocs.
10216 (sh_elf64_info_to_howto): Accept new PIC relocs.
10217 (sh_elf64_relocate_section): Augment the scope of
10218 seen_stt_datalabel. Support new PIC relocs.
10219 (sh_elf64_check_relocs): Support new PIC relocs.
10220 (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le,
10221 elf_sh64_plt_entry_be, elf_sh64_plt_entry_le,
10222 elf_sh64_pic_plt_entry_be, elf_sh64_pic_plt_entry_le,
10223 elf_sh64_plt0_entry, elf_sh64_plt_entry, elf_sh64_pic_plt_entry,
10224 sh64_elf64_link_hash_newfunc, sh64_elf64_link_hash_table_create,
10225 movi_shori_putval, movi_3shori_putval,
10226 sh64_elf64_create_dynamic_sections,
10227 sh64_elf64_adjust_dynamic_symbol, sh64_elf64_discard_copies,
10228 sh64_elf64_size_dynamic_sections,
10229 sh64_elf64_finish_dynamic_symbol,
10230 sh64_elf64_finish_dynamic_sections): New.
10231 (elf_backend_create_dynamic-sections,
10232 bfd_elf64_bfd_link_hash_table_create,
10233 elf_backend_adjust_dynamic_symbol,
10234 elf_backend_size_dynamic_sections,
10235 elf_backend_finish_dynamic_symbol,
10236 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
10237 elf_backend_plt_readonly, elf_backend_want_plt_sym,
10238 elf_backend_got_header_size, elf_backend_plt_header_size):
10239 Define.
10240 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
10241 * elf32-sh.c: Renumbered and renamed some SH5 relocations to
10242 match official numbers and names; moved unmaching ones to the
10243 range 0xf2-0xff.
10244 * elf32-sh64.c, elf64-sh64.c: Likewise.
10245 2001-03-12 DJ Delorie <dj@redhat.com>
10246 * elf32-sh.c (sh_elf_relax_section): Don't relax SHmedia
10247 sections.
10248 2001-03-12 DJ Delorie <dj@redhat.com>
10249 * elf32-sh64.c (shmedia_prepare_reloc): Validate relocs that must
10250 be aligned.
10251 * elf64-sh64.c (sh_elf64_relocate_section): Ditto.
10252 2001-01-14 Hans-Peter Nilsson <hpn@cygnus.com>
10253 * elf32-sh64.c (bfd_elf32_bfd_copy_private_section_data): Define.
10254 (sh64_elf_fake_sections): Set type to SHT_SH5_CR_SORTED for a
10255 .cranges section with SEC_SORT_ENTRIES set.
10256 (sh64_backend_section_from_shdr): Set SEC_SORT_ENTRIES on an
10257 incoming sorted .cranges section.
10258 (sh64_bfd_elf_copy_private_section_data): New.
10259 (sh64_elf_final_write_processing): Only sort .cranges and modify
10260 start address if called by linker.
10261 2001-01-08 Ben Elliston <bje@redhat.com>
10262 * elf32-sh64.c (sh64_elf_final_write_processing): Activate
10263 Hans-Peter Nilsson's set bit 0 patch from 2001-01-06.
10264 * elf64-sh64.c (sh64_elf64_final_write_processing): Ditto.
10265 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
10266 * elf64-sh64.c (sh_elf64_howto_table): No open brace at start of
10267 line. Add comments before all entries.
10268 <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct and clarify describing
10269 comment.
10270 (sh_elf64_reloc): Correct head comment.
10271 (sh_elf64_relocate_section): Correct spacing.
10272 <relocating for a local symbol>: Do not honour STO_SH5_ISA32;
10273 instead call reloc_dangerous callback.
10274 <case R_SH_SHMEDIA_CODE>: New case.
10275 (sh_elf64_gc_mark_hook): Correct spacing.
10276 (sh_elf64_check_relocs): Ditto.
10277 * elf32-sh64.c (shmedia_prepare_reloc) <case R_SH_SHMEDIA_CODE>:
10278 New case.
10279 * elf32-sh.c: Correct #endif comments for #ifndef-wrapped
10280 functions.
10281 (sh_elf_howto_table) <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct,
10282 clarify describing comment. Add comments before all entries.
10283 (sh_elf_relocate_section) <relocating for a local symbol>: Do not
10284 honour STO_SH5_ISA32; instead call reloc_dangerous callback.
10285 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
10286 Sort .cranges section in final link. Prepare to set bit 0 on
10287 entry address.
10288 * elf32-sh64.c (struct sh64_find_section_vma_data): New.
10289 (sh64_elf_link_output_symbol_hook): Fix typo in prototype.
10290 (sh64_elf_set_mach_from_flags): Set SEC_DEBUGGING on incoming
10291 .cranges section.
10292 (sh64_backend_section_from_shdr): New, to recognize
10293 SHT_SH5_CR_SORTED on incoming .cranges section.
10294 (elf_backend_section_from_shdr): Define.
10295 (sh64_elf_final_write_processing): Sort outgoing .cranges
10296 section. (New, temporarily disabled:) Set bit 0 on entry address
10297 according to ISA type.
10298 (sh64_find_section_for_address): New.
10299 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb,
10300 crange_bsearch_cmpl): Move here from opcodes/sh64-dis.c.
10301 (sh64_address_in_cranges): Move here from opcodes/sh64-dis.c. Use
10302 bfd_malloc, not xmalloc.
10303 (sh64_get_contents_type): Move here from opcodes/sh64-dis.c. Make
10304 global.
10305 * elf32-sh64.c (sh64_elf64_final_write_processing): New, (but
10306 temporarily disabled) setting bit 0 on entry address.
10307 (elf_backend_final_write_processing): Define.
10308 2001-01-05 Hans-Peter Nilsson <hpn@cygnus.com>
10309 * elf32-sh.c (sh_elf_howto_table) <R_SH_PT_16>: Adjust fields to
10310 be a proper relocation for PTA and PTB rather than a marker.
10311 <R_SH_IMMU5, R_SH_IMMS6, R_SH_IMMU6, R_SH_IMMS10, R_SH_IMMS10BY2,
10312 R_SH_IMMS10BY4, R_SH_IMMS10BY8, R_SH_IMMS16, R_SH_IMMU16,
10313 R_SH_IMM_LOW16, R_SH_IMM_LOW16_PCREL, R_SH_IMM_MEDLOW16,
10314 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16_PCREL,
10315 R_SH_IMM_HI16, R_SH_IMM_HI16_PCREL, R_SH_64, R_SH_64_PCREL>:
10316 Zero src_mask.
10317 * elf64-sh64.c: Ditto.
10318 (sh_elf64_relocate_section) <case R_SH_PT_16>: New case.
10319 * elf32-sh64.c: Include opcodes/sh64-opc.h
10320 (shmedia_prepare_reloc): Take a bfd_link_info pointer as first
10321 argument. Drop const qualifiers from "bfd *" and "bfd_byte *"
10322 parameters. No unused parameters. Caller changed.
10323 <case R_SH_PT_16>: New case.
10324 * Makefile.am (elf32-sh64.lo): Add dependency on sh64-opc.h.
10325 * Makefile.in: Regenerate.
10326 2000-12-30 Hans-Peter Nilsson <hpn@cygnus.com>
10327 * elf64-sh64.c (sh64_elf64_fake_sections): Set SHF_SH5_ISA32 for
10328 all code sections.
10329 (sh_elf64_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
10330 (sh64_elf_merge_private_data): Ditto.
10331 * elf32-sh64.c (sh64_elf_fake_sections): Use sh64_elf_section_data
10332 to access stored section flags.
10333 (sh64_elf_final_write_processing): Return immediately unless
10334 called by linker. Use sh64_elf_section_data (cranges) to get size
10335 of linker-generated cranges entries.
10336 (sh64_elf_copy_private_data): Add missing "return true".
10337 (sh64_elf_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
10338 (sh_elf64_merge_private_data): Ditto.
10339 2000-12-19 Hans-Peter Nilsson <hpn@cygnus.com>
10340 * elf64-sh64.c (sh64_elf64_fake_sections): New, copy of
10341 elf64-sh64.c:sh64_elf_fake_sections.
10342 (elf_backend_fake_sections): Define as sh64_elf64_fake_sections.
10343 2000-12-18 Hans-Peter Nilsson <hpn@cygnus.com>
10344 * elf32-sh64.c (sh64_elf_copy_private_data_internal): Delete.
10345 (sh64_elf_final_write_processing): New.
10346 (elf_backend_final_write_processing): Define.
10347 (sh64_elf_fake_sections): Get header flags from tdata field.
10348 (sh64_elf_copy_private_data): Do not call
10349 sh64_elf_copy_private_data_internal, just copy e_flags field.
10350 (sh64_elf_merge_private_data): Do not call
10351 sh64_elf_copy_private_data_internal.
10352 2000-12-12 Hans-Peter Nilsson <hpn@cygnus.com>
10353 Remove EF_SH64_ABI64, let ELF size make difference.
10354 Remove SH64-specific BFD section flag.
10355 * elf32-sh64.c (sh64_elf_fake_sections): Recognize section as
10356 containing SHmedia through elf_section_data (asect)->tdata
10357 non-zero, not using a BFD section flag.
10358 (sh64_elf_set_mach_from_flags): Don't recognize EF_SH64_ABI64.
10359 (sh64_elf_merge_private_data): Similar.
10360 (elf_backend_section_flags): Don't define.
10361 (sh64_elf_backend_section_flags): Delete.
10362 * elf64-sh64.c (sh_elf64_set_mach_from_flags): Recognize EF_SH64,
10363 not EF_SH64_ABI64.
10364 (sh_elf64_merge_private_data): Similar.
10365 * section.c (Section flags definitions): Don't define
10366 SEC_SH_ISA_SHMEDIA.
10367 (bfd-in2.h): Regenerate.
10368 2000-12-09 Hans-Peter Nilsson <hpn@cygnus.com>
10369 Make DataLabel references work with partial linking.
10370 * elf32-sh64.c: Fix formatting.
10371 (sh64_elf_link_output_symbol_hook): New.
10372 (elf_backend_link_output_symbol_hook): Define to
10373 sh64_elf_link_output_symbol_hook.
10374 (sh64_elf_add_symbol_hook): Make DataLabel symbol just global
10375 undefined if partial linking. Adjust sanity check.
10376 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): New.
10377 (elf_backend_link_output_symbol_hook): Define to
10378 sh64_elf64_link_output_symbol_hook.
10379 (sh64_elf64_add_symbol_hook): Make DataLabel symbol just global
10380 undefined if partial linking. Adjust sanity check.
10381 2000-12-07 Hans-Peter Nilsson <hpn@cygnus.com>
10382 Implement semantics for inter-file DataLabel references.
10383 * elf64-sh64.c (DATALABEL_SUFFIX): Define.
10384 (sh64_elf64_add_symbol_hook): New.
10385 (sh_elf64_relocate_section): If passing an indirect symbol with
10386 st_type STT_DATALABEL on the way to a symbol with st_other
10387 STO_SH5_ISA32, do not bitor 1 to the relocation.
10388 (elf_backend_add_symbol_hook): Define to
10389 sh64_elf64_add_symbol_hook.
10390 * elf64-sh32.c: Tweak comments.
10391 (DATALABEL_SUFFIX): Define.
10392 (sh64_elf_add_symbol_hook): New.
10393 (elf_backend_add_symbol_hook): Define to sh64_elf_add_symbol_hook.
10394 * elf32-sh.c (sh_elf_relocate_section): If passing an indirect
10395 symbol with st_type STT_DATALABEL on the way to a symbol with
10396 st_other STO_SH5_ISA32, do not bitor 1 to the relocation.
10397 2000-12-05 Hans-Peter Nilsson <hpn@cygnus.com>
10398 Pass through STT_DATALABEL.
10399 * elf32-sh64.c (sh64_elf_get_symbol_type): New.
10400 (elf_backend_get_symbol_type): Define.
10401 * elf64-sh64.c (sh64_elf64_get_symbol_type): New.
10402 (elf_backend_get_symbol_type): Define.
10403 2000-11-30 Hans-Peter Nilsson <hpn@cygnus.com>
10404 * elf32-sh64.c: Tweak comments.
10405 (sh64_elf_copy_private_data_internal): Add prototype.
10406 (bfd_elf32_bfd_set_private_flags): Define.
10407 (sh64_elf_copy_private_data_internal): Compare machine name, not
10408 textual BFD target name, to check whether to copy section flag
10409 SHF_SH5_ISA32.
10410 (sh64_elf_merge_private_data): Validize bfd_get_arch_size.
10411 Tweak section-contents-type-mismatch message.
10412 (shmedia_prepare_reloc): Add ATTRIBUTE_UNUSED markers.
10413 Validize reloc-types.
10414 * elf64-sh64.c: New file.
10415 * targets.c (bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec): Declare.
10416 * Makefile.am (BFD64_BACKENDS): Add elf64-sh64.lo.
10417 (BFD64_BACKENDS_CFILES): Add elf64-sh64.c.
10418 Regenerate dependencies.
10419 * Makefile.in: Regenerate.
10420 * config.bfd (sh64-*-elf*): Add bfd_elf64_sh64_vec and
10421 bfd_elf64_sh64l_vec.
10422 * configure.in: Handle bfd_elf64_sh64_vec and
10423 bfd_elf64_sh64l_vec.
10424 * configure: Regenerate.
10425 * po/POTFILES.in: Regenerate.
10426 * po/bfd.pot: Regenerate.
10427 2000-11-29 Hans-Peter Nilsson <hpn@cygnus.com>
10428 * elf32-sh64.c (sh64_elf_set_mach_from_flags): Do not recognize
10429 anything else but EF_SH64 and EF_SH64_ABI64.
10430 (sh64_elf_merge_private_data): Emit error for anything else but
10431 EF_SH64 and EF_SH64_ABI64.
10432 * config.bfd: Remove bfd_elf32_shblin_vec and bfd_elf32_shlin_vec
10433 from targ_selvecs.
10434 * configure.in: Add cofflink.lo to bfd_elf32_sh64_vec and
10435 bfd_elf32_sh64l_vec as a temporary measure.
10436 * configure: Regenerate.
10437 2000-11-27 Hans-Peter Nilsson <hpn@cygnus.com>
10438 * cpu-sh.c (arch_info_struct): Include sh5 item
10439 unconditionalized.
10440 * config.bfd (sh64-*-elf*): Do not set targ_cflags.
10441 Add targ_selvecs bfd_elf32_sh_vec, bfd_elf32_shl_vec,
10442 bfd_elf32_shblin_vec and bfd_elf32_shlin_vec.
10443 * elf32-sh64.c: Tweak comments.
10444 (sh64_elf_set_mach_from_flags): Recognize all machine flags that
10445 are proper subsets of SH64 as bfd_mach_sh5. Add EF_SH64_ABI64.
10446 (sh64_elf_copy_private_data_internal): Wrap long line.
10447 (sh64_elf_merge_private_data): Rewrite to allow objects from
10448 SH64 subsets to be linked together.
10449 (INCLUDE_SHMEDIA): Define.
10450 * elf32-sh.c (sh_elf_relocate_section) <local symbol>:
10451 Parenthesize plus-expression inside or-expression.
10452 <global symbol>: Ditto.
10453 (sh_elf_set_mach_from_flags): Remove code refusing
10454 deleted EF_SH64_32BIT_ABI flag.
10455 2000-11-26 Hans-Peter Nilsson <hpn@cygnus.com>
10456 * elf32-sh.c (sh_elf_howto_table) <R_SH_IMM_LOW16_PCREL,
10457 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16_PCREL,
10458 R_SH_IMM_HI16_PCREL, R_SH_64_PCREL>: Set pcrel_offset to true.
10459 (sh_elf_relocate_section) <local symbol>: Or 1 in
10460 calculation of relocation if sym->st_other & STO_SH5_ISA32.
10461 <global symbol>: Ditto if h->other & STO_SH5_ISA32.
10462 * elf32-sh64.c (shmedia_prepare_reloc): Add rel->r_addend to
10463 relocation.
10464 2000-11-24 Hans-Peter Nilsson <hpn@cygnus.com>
10465 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64.lo.
10466 (BFD32_BACKENDS_CFILES): Add elf32-sh64.c.
10467 Regenerate dependencies.
10468 * Makefile.in: Regenerate.
10469 * archures.c: Add bfd_mach_sh5.
10470 * config.bfd: Map targ_cpu sh* to bfd_sh_arch.
10471 Handle sh64-*-elf*. Set targ_cflags to -DINCLUDE_SHMEDIA.
10472 * configure.in: Handle bfd_elf32_sh64_vec and bfd_elf32_sh64l_vec.
10473 * configure: Regenerate.
10474 * reloc.c (BFD_RELOC_SH_SHMEDIA_CODE, BFD_RELOC_SH_IMMU5,
10475 BFD_RELOC_SH_IMMS6, BFD_RELOC_SH_IMMS6BY32, BFD_RELOC_SH_IMMU6,
10476 BFD_RELOC_SH_IMMS10, BFD_RELOC_SH_IMMS10BY2,
10477 BFD_RELOC_SH_IMMS10BY4, BFD_RELOC_SH_IMMS10BY8,
10478 BFD_RELOC_SH_IMMS16, BFD_RELOC_SH_IMMU16, BFD_RELOC_SH_IMM_LOW16,
10479 BFD_RELOC_SH_IMM_LOW16_PCREL, BFD_RELOC_SH_IMM_MEDLOW16,
10480 BFD_RELOC_SH_IMM_MEDLOW16_PCREL, BFD_RELOC_SH_IMM_MEDHI16,
10481 BFD_RELOC_SH_IMM_MEDHI16_PCREL, BFD_RELOC_SH_IMM_HI16,
10482 BFD_RELOC_SH_IMM_HI16_PCREL, BFD_RELOC_SH_PT_16): New relocations.
10483 * cpu-sh.c [INCLUDE_SHMEDIA] (arch_info_struct): Define and link
10484 in item for SH5.
10485 * elf32-sh.c [INCLUDE_SHMEDIA] (sh_elf_howto_table): Add howto items
10486 for SHmedia relocs.
10487 [INCLUDE_SHMEDIA] (sh_rel): Add mappings for SHmedia relocs.
10488 [INCLUDE_SHMEDIA] (sh_elf_relocate_section) [default]: Call
10489 shmedia_prepare_reloc, goto final_link_relocate if it returns
10490 non-zero, else fail as before.
10491 (sh_elf_set_mach_from_flags): Provide function only if not defined
10492 as macro. Do not recognize objects with EF_SH64_32BIT_ABI set.
10493 (sh_elf_set_private_flags): Provide function only if not defined
10494 as a macro.
10495 (sh_elf_copy_private_data): Similar.
10496 (sh_elf_merge_private_data): Similar.
10497 * section.c (SEC_SH_ISA_SHMEDIA): New.
10498 * targets.c (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec): Declare.
10499 * elf32-sh64.c: New file.
10500 * libbfd.h: Regenerate.
10501 * bfd-in2.h: Regenerate.
10502 * po/POTFILES.in: Regenerate.
10503 * po/bfd.pot: Regenerate.
10504 * bfd-in2.h: Regenerate.
10505 * libbfd.h: Regenerate.
10506
10507 2002-02-07 Daniel Jacobowitz <drow@mvista.com>
10508
10509 * bfd-in.h: Update <stdbool.h> check to only see if <stdbool.h> has
10510 been included, not drag it in.
10511 * bfd-in2.h: Regenerate.
10512
10513 2002-02-06 H.J. Lu (hjl@gnu.org)
10514
10515 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Update
10516 the mach and ISA fields if necessary.
10517
10518 2002-02-06 Nick Clifton <nickc@cambridge.redhat.com>
10519
10520 * coffcode.h (coff_set_arch_mach_hook): Select the highest known
10521 ARM architecture when an F_ARM_5 flag is detected, since we cannot
10522 be sure exactly which architecture this represents.
10523
10524 2002-02-05 Nick Clifton <nickc@redhat.com>
10525
10526 * po/tr.po: Updated translation.
10527
10528 2002-02-05 Alan Modra <amodra@bigpond.net.au>
10529
10530 From Jimi X <jimix@watson.ibm.com>
10531 * archures (bfd_mach_ppc64): Define.
10532 (bfd_powerpc_arch): Rename to bfd_powerpc_archs.
10533 (bfd_powerpc_arch): Define.
10534 * bfd-in2.h: Regenerate.
10535 * cpu-powerpc.c (arch_info_struct): Rename to bfd_powerpc_archs.
10536 (bfd_powerpc_arch): Move to tail of bfd_powerpc_archs.
10537 (bfd_powerpc_archs): Add default powerpc64 arch.
10538
10539 2002-02-05 Alan Modra <amodra@bigpond.net.au>
10540
10541 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Check for relocs
10542 against section syms in readonly sections. Don't do the global
10543 sym check if we find one.
10544 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
10545 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
10546 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
10547 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
10548 (elf_s390_grok_prstatus): Add missing prototype.
10549
10550 2002-02-04 Hans-Peter Nilsson <hp@bitrange.com>
10551
10552 * elf64-mmix.c (mmix_dump_bpo_gregs): New function.
10553 (mmix_elf_check_common_relocs) <case R_MMIX_BASE_PLUS_OFFSET>:
10554 Call bfd_get_section_by_name only once. Initialize
10555 bpodata->n_bpo_relocs_this_section.
10556 (_bfd_mmix_prepare_linker_allocated_gregs): Remove comment
10557 referring to DSOs.
10558 (bpo_reloc_request_sort_fn): Don't use difference of values as
10559 return-value.
10560
10561 2002-02-02 David O'Brien <obrien@FreeBSD>
10562
10563 * configure.in: Tweak the FreeBSD 4.x recognition more. Only treat
10564 version 4.5 and later the same as 5-CURRENT.
10565 * configure: Re-generate.
10566
10567 2002-02-02 Jason Thorpe <thorpej@wasabisystems.com>
10568
10569 * config.bfd (hppa*-*-netbsd*): New target.
10570
10571 2002-01-31 Philipp Thomas <pthomas@suse.de>
10572
10573 * coff-arm.c (coff_arm_merge_private_bfd_data): Move ERROR
10574 to front of message. Unify messages with elf32-arm.h. Use
10575 commas where neccessary.
10576 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Use all upcase
10577 ERROR in messages. Unify messages with coff-arm.c. Correct
10578 VFP/FPA error message.
10579 (elf32_arm_print_private_bfd_data): Don't mark APCS-26 and
10580 APCS-32 for translation.
10581
10582 2002-02-01 Hans-Peter Nilsson <hp@bitrange.com>
10583
10584 Perform on-demand global register allocation from
10585 R_MMIX_BASE_PLUS_OFFSET relocs.
10586 * elf64-mmix.c (struct bpo_reloc_section_info, struct
10587 bpo_reloc_request, struct bpo_greg_section_info): New.
10588 (mmix_elf_check_common_relocs, mmix_elf_gc_sweep_hook,
10589 bpo_reloc_request_sort_fn, mmix_elf_relax_section,
10590 _bfd_mmix_check_all_relocs,
10591 _bfd_mmix_prepare_linker_allocated_gregs,
10592 _bfd_mmix_finalize_linker_allocated_gregs): New functions.
10593 (elf_mmix_howto_table): Correct src_mask for most relocs.
10594 (mmix_elf_perform_relocation) <case R_MMIX_BASE_PLUS_OFFSET>: New
10595 case.
10596 (mmix_final_link_relocate) <case R_MMIX_BASE_PLUS_OFFSET>: New
10597 case. Fix typo in comment. New label do_mmix_reloc.
10598 (mmix_elf_check_relocs): Abuse bfd_link_info member base_file to
10599 store first object file with a base-plus-offset reloc. Call
10600 mmix_elf_check_common_relocs for the part common with mmo.
10601 (mmix_elf_final_link): Write out linker-allocated register
10602 contents section.
10603 (elf_backend_gc_sweep_hook): Define.
10604 (bfd_elf64_bfd_relax_section): Define.
10605
10606 * mmo.c: Don't include <ctype.h>
10607 (mmo_init): Correct init-once logic.
10608
10609 2002-02-01 Tom Rix <trix@redhat.com>
10610
10611 * config.bfd: Conditionally support <aiaff> for pre AIX 4.3.
10612
10613 2002-02-01 Alan Modra <amodra@bigpond.net.au>
10614
10615 * Makefile.am: Run "make dep-am"
10616 * Makefile.in: Regenerate.
10617
10618 2002-01-31 David O'Brien <obrien@FreeBSD>
10619
10620 * configure.in: Recognize the differences in core files from FreeBSD
10621 4.{0,1} and later versions of 4.x. This treats 4.2+ the same as
10622 5-CURRENT.
10623 * configure: Regenerate.
10624
10625 2002-01-31 Ivan Guzvinec <ivang@opencores.org>
10626
10627 * coff-or32.c: New file.
10628 * cpu-or32.c: New file.
10629 * elf32-or32.c: New file.
10630 * archures.c: Add support for or32.
10631 * targets.c: Add support for or32.
10632 * bfd-in2.h: Regenerate.
10633 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags,
10634 coff_write_object_contents): Add support for or32.
10635 * config.bfd: Add target.
10636 * configure.in: Add support for or32.
10637 * configure: Regenerate.
10638 * Makefile.am: Add support for or32.
10639 * Makefile.in: Regenerate.
10640 * po/SRC-POTFILES.in: Add or32 files.
10641 * po/bfd.pot: Regenerate.
10642
10643 2002-01-31 Nick Clifton <nickc@cambridge.redhat.com>
10644 Don Lindsay <lindsayd@cisco.com>
10645
10646 * elf32-mips.c (mips_elf_calculate_relocation): Replace 'return
10647 false' with a return of a bfd_reloc_ error code.
10648
10649 2002-01-31 Hans-Peter Nilsson <hp@axis.com>
10650
10651 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
10652 unexport unreferenced symbols when --export-dynamic. Call
10653 _bfd_elf_strtab_delref when unexporting.
10654
10655 2002-01-30 Daniel Jacobowitz <drow@mvista.com>
10656
10657 * bfd-in.h: Include <stdbool.h> if it is available.
10658 * bfd-in2.h: Regenerated.
10659
10660 2002-01-31 Alan Modra <amodra@bigpond.net.au>
10661
10662 * elf64-ppc.c (func_desc_adjust): STV_PROTECTED functions should
10663 not go via the plt.
10664
10665 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
10666
10667 * archures.c: Tidy up formatting of embedded comments.
10668 * bfd.c: Tidy up formatting of embedded comments.
10669 * bfd-in.h: Fix formatting of comments.
10670 * reloc.c: Tidy up formatting of ordinary & embedded comments.
10671 * section.c: Tidy up formatting of embedded comments.
10672 * syms.c: Tidy up formatting of embedded comments.
10673 * targets.c: Tidy up formatting of embedded comments.
10674
10675 * bfd-in2.h: Regenerate.
10676
10677 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
10678
10679 * vms-tir.c (cmd_name): New function.
10680 (tir_cmd_name): New function.
10681 (etir_sta, etir_sto, etir_opr, etir_stc): Use cmd_name().
10682 (tir_opr, tir_ctl, tir_cmd): use tir_cmd_name().
10683 Fix formatting.
10684
10685 * peXXigen.c (pe_print_idata): Rearrange message to aid in
10686 translation.
10687 (pe_print_pdata): Rearrange message to aid in translation.
10688
10689 * libbfd.c (warn_deprecated): Rearrange error message to aid in
10690 translation.
10691
10692 * ihex.c (ihex_write_object_contents): Fix spelling typo.
10693
10694 * ieee.c (ieee_slurp_external_symbols): Remove spurious space.
10695
10696 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Rearrange error
10697 message to aid in translation.
10698
10699 * elf64-mmix.c (mmix_final_link_relocate): Rearrange error message
10700 to aid in translation.
10701
10702 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix typo.
10703
10704 2002-01-30 Philipp Thomas <pthomas@suse.de>
10705
10706 * coff-arm.c, elf32-elf.h: Unify messages.
10707
10708 2002-01-30 Nick Clifton <nickc@redhat.com>
10709
10710 * po/sv.po: Updated translation.
10711
10712 2002-01-30 Philipp Thomas <pthomas@suse.de>
10713
10714 * dwarf2.c (read_abbrev): Use full section name in error message.
10715 (decode_line_info): Likewise.
10716
10717 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Don't translate debugging
10718 message.
10719
10720 2002-01-30 Alan Modra <amodra@bigpond.net.au>
10721
10722 * elf64-ppc.c (func_desc_adjust): Only provide missing function
10723 descriptor symbols for undefined function code syms. Clear
10724 ELF_LINK_NON_ELF so that they can stay weak.
10725
10726 2002-01-29 Chris Demetriou <cgd@broadcom.com>
10727 Mitch Lichtenberg <mpl@broadcom.com>
10728
10729 * bfd-in.h (bfd_mips_elf32_create_embedded_relocs): New prototype.
10730 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): New function
10731 to handle 32-bit ELF embedded reloc (ld --embedded-relocs)
10732 generation.
10733 * bfd-in2.h: Regenerate.
10734
10735 2002-01-29 Chris Demetriou <cgd@broadcom.com>
10736
10737 * elf32-mips.c: Add additional comments about HI16 relocation
10738 processing.
10739 (_bfd_mips_elf_hi16_reloc): Don't subtract address here for
10740 pc-relative relocations. (Reverts change made on 2001-10-31.)
10741 (_bfd_mips_elf_lo16_reloc): Subtract address of LO16 part here
10742 for pc-relative relocations.
10743 (mips_elf_calculate_relocation): Add a comment about a kludge
10744 in the R_MIPS_GNU_REL_HI16 handling.
10745 (_bfd_mips_elf_relocate_section): Implement that kludge;
10746 adjust pc-relative HI16 relocation for difference in HI16 and
10747 LO16 addresses, since it can't easily be done in
10748 mips_elf_calculate_relocation.
10749
10750 2002-01-29 Martin Schwidefsky <schwidefsky@de.ibm.com>
10751
10752 * elf32-i386 (elf_i386_adjust_dynamic_symbol): Do not replace PLT32
10753 relocations with PC32 relocations for undefined or weak symbols.
10754 * elf32-s390 (elf_i386_adjust_dynamic_symbol): Likewise.
10755 * elf64-s390x (elf_i386_adjust_dynamic_symbol): Likewise.
10756
10757 2002-01-28 Jason Thorpe <thorpej@wasabisystems.com>
10758
10759 * elfcore.h (elf_core_file_p): Improve comment for last change.
10760
10761 2002-01-27 Daniel Jacobowitz <drow@mvista.com>
10762
10763 * configure: Regenerated.
10764
10765 2002-01-27 Jason Thorpe <thorpej@wasabisystems.com>
10766
10767 * elfcore.h (elf_core_file_p): Set the machine architecture
10768 before processing the program headers.
10769
10770 2002-01-26 Hans-Peter Nilsson <hp@bitrange.com>
10771
10772 * configure.in <64-bit configuration>: If using gcc, check and
10773 emit error for egcs-1.1.2.
10774 * configure: Regenerate.
10775
10776 2002-01-26 Egor Duda <deo@logos-m.ru>
10777
10778 * elf.c (elfcore_grok_win32pstatus): Copy only as much information
10779 as possible to avoid stack corruption.
10780
10781 2002-01-26 Richard Henderson <rth@redhat.com>
10782
10783 * elf64-alpha.c (elf64_alpha_check_relocs): Don't set reltext
10784 for non-allocated sections.
10785
10786 2002-01-25 Mark Kettenis <kettenis@gnu.org>
10787
10788 * elf.c (elfcore_write_prstatus): Make sure we pass the address of
10789 prstat.pr_reg even if it is a struct.
10790
10791 2002-01-25 Steve Ellcey <sje@cup.hp.com>
10792
10793 * elfxx-ia64.c: Reset AIX vector function overrides for HP-UX.
10794
10795 2002-01-25 Philipp Thomas <pthomas@suse.de>
10796
10797 * coffgen.c (coff_print_symbol): Don't mark info message
10798 for translation.
10799
10800 2002-01-25 Nick Clifton <nickc@redhat.com>
10801
10802 * po/fr.po: Updated translation.
10803 * po/es.po: Updated translation.
10804
10805 2002-01-25 Philipp Thomas <pthomas@suse.de>
10806
10807 * coff-alpha.c (alpha_relocate_section): Unify warning message
10808 for GP relative relocations without GP defined.
10809 * coff-mips.c (mips_relocate_section): Likewise.
10810
10811 2002-01-25 Alan Modra <amodra@bigpond.net.au>
10812
10813 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Avoid
10814 unsigned overflow when new_offset < old_offset.
10815
10816 2002-01-24 Philipp Thomas <pthomas@suse.de>
10817
10818 * bfd.c (_bfd_abort): Fix typo.
10819
10820 2002-01-23 Richard Henderson <rth@redhat.com>
10821
10822 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't suppress
10823 plt entries for undefweak symbols.
10824
10825 2002-01-23 Steve Ellcey <sje@cup.hp.com>
10826
10827 * targets.c (bfd_elf32_ia64_hpux_big_vec): Add to DEFAULT_VECTOR.
10828 (bfd_elf64_ia64_hpux_big_vec): Ditto.
10829 (bfd_elf32_h8300_vec): Ditto.
10830
10831 2002-01-23 Alan Modra <amodra@bigpond.net.au>
10832
10833 * elf64-ppc.c: Remove stale part of ABI comment.
10834 (NO_OPD_RELOCS): Define.
10835 (ppc64_elf_check_relocs): Use it.
10836 (ppc64_elf_relocate_section): Here too.
10837 (build_one_stub): Don't point function syms at the stub. Instead,
10838 hijack plt.offset.
10839 (ppc64_elf_relocate_section): Check whether REL24 relocs should
10840 really go to the stub. Make all dynamic relocs in opd against
10841 locals.
10842 (ppc64_elf_finish_dynamic_symbol): Allow for non-standard use of
10843 plt.offset.
10844
10845 2002-01-22 Richard Henderson <rth@redhat.com>
10846
10847 * elf64-alpha.c (INSN_UNOP): Encode with RB as $sp.
10848
10849 2002-01-22 Alan Modra <amodra@bigpond.net.au>
10850
10851 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Correct sign of
10852 TOC_BASE_OFF adjustment.
10853
10854 * Makefile.am: Run "make dep-am".
10855 * Makefile.in: Regenerate.
10856 * po/SRC-POTFILES.in: Regenerate.
10857
10858 2002-01-22 John David Anglin <dave@hiauly1.hia.nrc.ca>
10859
10860 * configure.host (hppa*64*-*-hpux*, hppa*64*-*-linux*): Add new
10861 host defines.
10862
10863 2002-01-21 Hans-Peter Nilsson <hp@axis.com>
10864
10865 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GOTREL>:
10866 Check for and emit error if sgot is NULL at this point.
10867
10868 2002-01-21 Jason Thorpe <thorpej@wasabisystems.com>
10869
10870 * config.bfd (ia64*-*-netbsd*): New target.
10871
10872 2002-01-21 Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
10873
10874 * som.c (som_write_space_strings): Comment typo fix.
10875
10876 2002-01-21 Alan Modra <amodra@bigpond.net.au>
10877
10878 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_func and
10879 is_func_descriptor fields.
10880 (link_hash_newfunc): Init them.
10881 (ppc64_elf_check_relocs): Only R_PPC24_REL24 syms starting with a
10882 dot are candidates for plt entries. When processing .opd relocs,
10883 set function descriptor strings to point inside function code
10884 string, and set new ppc_link_hash_entry fields.
10885 (ppc64_elf_gc_sweep_hook): Don't sweep R_PPC64_REL24 relocs.
10886 (ppc64_elf_adjust_dynamic_symbol): Remove most code dealing with
10887 function descriptors. It's now done in..
10888 (func_desc_adjust): New.
10889 (ppc64_elf_func_desc_adjust): New.
10890 (define elf_backend_always_size_sections): Define.
10891 (ppc64_elf_hide_symbol): New.
10892 (define elf_backend_hide_symbol): Define.
10893 (allocate_dynrelocs): Remove code looking up function descriptors
10894 as that has been done earlier.
10895 (ppc64_elf_size_dynamic_sections): Use htab shortcut to elf hash
10896 table.
10897 (ppc64_elf_finish_dynamic_symbol): Likewise. Remove code looking
10898 up function descriptor.
10899 (build_one_stub): Look up the function code sym. Check for
10900 invalid plt offsets.
10901 (ppc64_elf_relocate_section): Tweak calls to undefined weak syms.
10902 Convert R_PPC64_TOC relocs to R_PPC64_RELATIVE in shared libs.
10903
10904 * elf-bfd.h (elf_backend_data <elf_backend_hide_symbol>): Add
10905 boolean param.
10906 (_bfd_elf_link_hash_hide_symbol): Likewise.
10907 * elflink.h (elf_link_add_object_symbols): Adjust call to
10908 elf_backend_hide_symbol.
10909 (elf_fix_symbol_flags): Likewise.
10910 (elf_link_assign_sym_version): Likewise. Use bfd_malloc rather
10911 than bfd_alloc.
10912 * elf.c (_bfd_elf_link_hash_hide_symbol): Add "force_local" param.
10913 Set ELF_LINK_FORCED_LOCAL and call _bfd_elf_strtab_delref.
10914 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
10915 (clobber_millicode_symbols): Adjust to suit new hide_symbol.
10916 * elf32-cris.c (elf_cris_hide_symbol): Add "force_local" param
10917 and adjust to suit.
10918 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise, and call
10919 _bfd_elf_link_hash_hide_symbol rather than duplicating code.
10920 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
10921
10922 2002-01-18 Alan Modra <amodra@bigpond.net.au>
10923
10924 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Test for a
10925 dynamic function descriptor symbol, not the associated function
10926 symbol.
10927
10928 2002-01-17 Eric Christopher <echristo@redhat.com>
10929
10930 * elf32-mips.c (mips_elf_calculate_relocation): Fix typo.
10931
10932 2002-01-17 Nick Clifton <nickc@cambridge.redhat.com>
10933
10934 * po/bfd.pot: Regenerate.
10935 * po/fr.po: Regenerate.
10936
10937 2002-01-17 Alan Modra <amodra@bigpond.net.au>
10938
10939 * elf-bfd.h (elf_backend_data <elf_backend_section_from_bfd_section>):
10940 Remove "Elf_Internal_Shdr *" param.
10941 (_bfd_mips_elf_section_from_bfd_section): Ditto.
10942 * elf32-mips.c (_bfd_mips_elf_section_from_bfd_section): Ditto.
10943 * elf32-m32r.c (_bfd_m32r_elf_section_from_bfd_section): Ditto.
10944 * elf32-v850.c (v850_elf_section_from_bfd_section): Ditto.
10945 * elf64-mmix.c (mmix_elf_section_from_bfd_section): Ditto.
10946 * elfxx-ia64.c (elfNN_hpux_backend_section_from_bfd_section): Ditto.
10947 * elf.c (_bfd_elf_section_from_bfd_section): Allow backend
10948 function to override special sections. Remove hdr arg from
10949 backend call, and don't loop.
10950
10951 2002-01-16 Eric Christopher <echristo@redhat.com>
10952
10953 * elf32-mips.c (mips_elf_calculate_relocation): Set require_jalxp
10954 on R_MIPS_26 and target is 16bit. Add R_MIPS16_GPREL to list of
10955 relocations requiring gp0 and gp.
10956
10957 2002-01-16 Richard Earnshaw <rearnsha@arm.com>
10958
10959 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle
10960 EF_ARM_VFP_FLOAT.
10961 (elf32_arm_print_private_bfd_data): Likewise.
10962
10963 2002-01-16 Nick Clifton <nickc@cambridge.redhat.com>
10964
10965 * po/tr.po: Import new version.
10966
10967 2002-01-16 Alan Modra <amodra@bigpond.net.au>
10968
10969 * elf64-ppc.c (ppc64_elf_howto_raw): Remove stale FIXMEs.
10970 (ppc64_elf_reloc_type_lookup): Use proper CTOR reloc.
10971 (ORI_R0_R0_0): Correct.
10972
10973 2002-01-16 Alan Modra <amodra@bigpond.net.au>
10974
10975 * elflink.c (_bfd_elf_create_dynamic_sections): Don't set SEC_CODE
10976 when plt_not_loaded.
10977 * elf64-ppc.c (ppc64_elf_create_dynamic_sections): No need to
10978 clear .plt SEC_CODE here. Create .stub and correct .glink flags.
10979 (PLT_INITIAL_ENTRY_SIZE): Set to 24.
10980 (ppc64_elf_glink_code): Delete.
10981 (PPC64_ELF_GLINK_SIZE): Delete.
10982 (ADDIS_R12_R2, STD_R2_40R1, LD_R11_0R12, LD_R2_0R12, MTCTR_R11,
10983 BCTR, ADDIS_R12_R12_1, LD_R2_40R1, NOP, LI_R0_0, B_DOT, LIS_R0_0,
10984 ORI_R0_R0_0): Define.
10985 (PLT_CALL_STUB_SIZE, GLINK_CALL_STUB_SIZE): Define.
10986 (struct ppc_link_hash_table): Add sstub and plt_overflow.
10987 (ppc64_elf_link_hash_table_create): Init them.
10988 (ppc64_elf_check_relocs <R_PPC64_REL24>): Refcount .plt entry.
10989 Don't copy to shared lib.
10990 (ppc64_elf_check_relocs): Call bfd_set_error on errors.
10991 (ppc64_elf_gc_sweep_hook <R_PPC64_REL24>): Sweep plt refcount.
10992 (allocate_dynrelocs <plt>): Don't change function sym here. Make
10993 room for .stub and .glink code.
10994 (ppc64_elf_size_dynamic_sections): Handle .stub. Make entry for
10995 DT_PPC64_GLINK.
10996 (ppc64_elf_final_link): Rename to ppc64_elf_set_toc. Don't call
10997 bfd_elf64_bfd_final_link.
10998 (bfd_elf64_bfd_final_link): Don't define.
10999 (ppc64_elf_size_stubs): New.
11000 (build_plt_stub): New.
11001 (build_one_stub): New.
11002 (ppc64_elf_build_stubs): New.
11003 (ppc64_elf_relocate_section <toc relocs>): Remove assert.
11004 (ppc64_elf_relocate_section): Don't copy R_PPC64_REL24 relocs.
11005 (ppc64_elf_finish_dynamic_symbol): Don't build stubs here. Set
11006 DT_PPC64_GLINK entry. Tweak DT_PLTGOT, DT_JMPREL, DT_PLTRELSZ in
11007 case output sections not separate. Adjust DT_RELASZ to not
11008 include plt relocs. Set reserved got entry. Set got and plt
11009 entry size.
11010 (elf_backend_got_header_size): Set to 8.
11011 * elf64-ppc.h: New file.
11012
11013 2002-01-16 Alan Modra <amodra@bigpond.net.au>
11014
11015 * elf32-arm.h (elf32_arm_size_dynamic_sections): When removing
11016 sections, use bfd_section_list_remove.
11017 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
11018 * elflink.h (elf_link_add_object_symbols): When removing all
11019 sections, use bfd_section_list_clear.
11020
11021 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
11022
11023 * po/sv.po: New file: Swedish translation.
11024 * configure.in (ALL_LINGUAS): Add sv.
11025 * configure: Regenerate.
11026
11027 2002-01-15 Jakub Jelinek <jakub@redhat.com>
11028
11029 * elflink.h (elf_link_input_bfd): Back out 2002-01-07 change.
11030 * elf.c (merge_sections_remove_hook): New function.
11031 (_bfd_elf_merge_sections): Pass it as 3rd argument to
11032 _bfd_merge_sections.
11033 * libbfd-in.h (_bfd_merge_sections): Add 3rd argument.
11034 * libbfd.h: Rebuilt.
11035 * merge.c (_bfd_merge_sections): Add remove_hook argument.
11036 Call remove_hook if a SEC_EXCLUDE section is encountered.
11037
11038 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
11039
11040 * elf32-xstormy16.c (xstormy16_reloc_map): Add new field 'table'.
11041 (xstormy16_reloc_map): Initialise new field with correct howto
11042 table.
11043 (xstormy16_reloc_type_lookup): Use 'table' field to locate correct
11044 howto entry.
11045
11046 2002-01-10 Michael Snyder <msnyder@redhat.com>
11047
11048 * elf.c (elfcore_write_prstatus): Use long instead of pid_t;
11049 (elfcore_write_pstatus): Use long instead of pid_t;
11050 * elf-bfd.h: Change prototypes to use long instead of pid_t;
11051
11052 2002-01-09 Jason Thorpe <thorpej@wasabisystems.com>
11053
11054 * elf.c: Update copyright years.
11055 (elfcore_grok_netbsd_note): Use NT_NETBSDCORE_PROCINFO
11056 and NT_NETBSDCORE_FIRSTMACH. Improve a comment.
11057
11058 2002-01-08 Michael Snyder <msnyder@redhat.com>
11059
11060 Add capability to write corefile note sections, for gdb.
11061 * elf.c (elfcore_write_note): New function.
11062 (elfcore_write_prpsinfo): New function.
11063 (elfcore_write_prstatus): New function.
11064 (elfcore_write_pstatus): New function.
11065 (elfcore_write_prfpreg): New function.
11066 (elfcore_write_prxfpreg): New function.
11067 * elf-bfd.h: Add prototypes for above functions.
11068
11069 2002-01-08 Alexandre Oliva <aoliva@redhat.com>
11070
11071 * elf.c (elf_fake_sections): Propagate errors from
11072 elf_backend_fake_section.
11073
11074 2002-01-07 Jason Thorpe <thorpej@wasabisystems.com>
11075
11076 * Makefile.am (BFD32_BACKENDS): Add elf32-sh-nbsd.lo.
11077 (BFD32_BACKENDS_CFILES): Add elf32-sh-nbsd.c.
11078 (elf32-sh-nbsd.lo): New rule.
11079 * Makefile.in: Regenerate.
11080 * config.bfd (sh*le-*-netbsdelf*): New target.
11081 (sh*-*-netbsdelf*): New target.
11082 * configure.in: Include netbsd-core.lo for native sh*-*-netbsd*.
11083 (bfd_elf32_shnbsd_vec): New vector.
11084 (bfd_elf32_shlnbsd_vec): New vector.
11085 * configure: Regenerate.
11086 * elf32-sh-nbsd.c: New file.
11087 * targets.c: Update copyright years.
11088 (_bfd_target_vector): Add bfd_elf32_shlnbsd_vec and
11089 bfd_elf32_shnbsd_vec.
11090
11091 2002-01-07 Aldy Hernandez <aldyh@redhat.com>
11092
11093 * coff-rs6000.c (READ20): Use bfd_scan_vma.
11094
11095 2002-01-07 Geoffrey Keating <geoffk@redhat.com>
11096
11097 * elflink.h (elf_link_input_bfd): Don't ask for the merged offset
11098 of a symbol in a section that will be deleted.
11099
11100 2002-01-07 Nick Clifton <nickc@cambridge.redhat.com>
11101
11102 * po/es.po: New file: Spanish translation.
11103 * configure.in (ALL_LINGUAS): Add es.
11104 * configure: Regenerate.
11105
11106 2002-01-06 Steve Ellcey <sje@cup.hp.com>
11107
11108 * elfxx-ia64.c (is_unwind_section_name): Add target vector as
11109 argument so we can handle HP-UX specially.
11110 (elfNN_ia64_hpux_vec): New for use in is_unwind_section_name.
11111 (elfNN_hpux_backend_section_from_bfd_section): New for support
11112 of SHN_IA_64_ANSI_COMMON.
11113 (elfNN_ia64_relax_section): Add support for SHN_IA_64_ANSI_COMMON.
11114 (is_unwind_section_name): Add special HP-UX support.
11115 (elfNN_ia64_section_from_shdr): Add support for more sections.
11116 (elfNN_ia64_fake_sections): Modify is_unwind_section_name call and
11117 add support for more sections.
11118 (elfNN_ia64_additional_program_headers): Modify
11119 is_unwind_section_name call.
11120 (elfNN_ia64_modify_segment_map): Remove assumption that there is
11121 only one unwind section in segment.
11122
11123 2002-01-06 Alan Modra <amodra@bigpond.net.au>
11124
11125 * syms.c (_bfd_generic_make_empty_symbol): New function.
11126 * libbfd-in.h (_bfd_nosymbols_make_empty_symbol): Define as
11127 _bfd_generic_make_empty_symbol.
11128 * libbfd.h: Regenerate.
11129 * bfd-in2.h: Regenerate.
11130 * hppabsd-core.c (hppabsd_core_make_empty_symbol): Delete function.
11131 (hppabsd_core_get_symtab_upper_bound): Don't define.
11132 (hppabsd_core_get_symtab): Likewise.
11133 (hppabsd_core_print_symbol): Likewise.
11134 (hppabsd_core_get_symbol_info): Likewise.
11135 (hppabsd_core_bfd_is_local_label_name): Likewise.
11136 (hppabsd_core_get_lineno): Likewise.
11137 (hppabsd_core_find_nearest_line): Likewise.
11138 (hppabsd_core_bfd_make_debug_symbol): Likewise.
11139 (hppabsd_core_read_minisymbols): Likewise.
11140 (hppabsd_core_minisymbol_to_symbol): Likewise.
11141 (hppabsd_core_vec): Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols).
11142 Formatting fixes.
11143 * hpux-core.c: Similarly.
11144 * irix-core.c: Similarly.
11145 * osf-core.c: Similarly.
11146 * sco5-core.c: Similarly.
11147 * binary.c (binary_make_empty_symbol): Remove function, define as
11148 _bfd_generic_make_empty_symbol.
11149 * ihex.c (ihex_make_empty_symbol): Likewise.
11150 * mmo.c (mmo_make_empty_symbol): Likewise.
11151 * ppcboot.c (ppcboot_make_empty_symbol): Likewise.
11152 * srec.c (srec_make_empty_symbol): Likewise.
11153 * versados.c (versados_make_empty_symbol): Likewise.
11154 * vms.c (_bfd_vms_make_empty_symbol): Remove.
11155 (vms_make_empty_symbol): Define as _bfd_generic_make_empty_symbol.
11156 * vms-gsd.c (_bfd_vms_slurp_gsd): Call bfd_make_empty_symbol
11157 rather than _bfd_vms_make_empty_symbol.
11158 * vms-misc.c (new_symbol): Likewise.
11159
11160 2002-01-05 Alan Modra <amodra@bigpond.net.au>
11161
11162 * section.c (bfd_section_init): Remove unnecessary initialisations.
11163 (bfd_section_list_clear): New function.
11164 (bfd_section_list_remove, bfd_section_list_insert): New macros.
11165 (_bfd_strip_section_from_output): Use them.
11166 * coffcode.h (coff_set_alignment_hook): Likewise.
11167 * elf32-mips.c (_bfd_mips_elf_final_link): Likewise.
11168 * elf64-mips.c (mips_elf64_final_link): Likewise.
11169 * elf64-mmix.c (mmix_elf_final_link): Likewise.
11170 * sunos.c (sunos_add_dynamic_symbols): Likewise.
11171 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
11172 * bfd-in2.h: Regenerate.
11173
11174 * netbsd-core.c (netbsd_core_file_p): Use bfd_make_section_anyway
11175 rather than doing our own section handling. Clean up after errors
11176 with bfd_release and bfd_section_list_clear. Handle unexpected
11177 flags.
11178 * aoutf1.h (sunos4_core_file_p): Likewise.
11179 * aix386-core.c (aix386_core_file_p): Likewise.
11180 * cisco-core.c (cisco_core_file_validate): Likewise.
11181 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
11182 * trad-core.c (trad_unix_core_file_p): Likewise.
11183
11184 * hppabsd-core.c (hppabsd_core_core_file_p): Clean up after errors
11185 with bfd_release and bfd_section_list_clear.
11186 * hpux-core.c (hpux_core_core_file_p): Likewise.
11187 * irix-core.c (irix_core_core_file_p): Likewise.
11188 * lynx-core.c (lynx_core_file_p): Likewise.
11189 * osf-core.c (osf_core_core_file_p): Likewise.
11190 * rs6000-core.c (rs6000coff_core_p): Likewise.
11191 * sco5-core.c (sco5_core_file_p): Likewise.
11192
11193 * elf32-mips.c (_bfd_mips_elf_lo16_reloc): Simplify, and perform
11194 sign extension adjustments without conditionals.
11195
11196 2002-01-04 Jakub Jelinek <jakub@redhat.com>
11197
11198 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Don't crash if
11199 CIE at .eh_frame start is removed due to no FDEs referencing it.
11200
11201 2002-01-04 Jason Thorpe <thorpej@wasabisystems.com>
11202
11203 * config.bfd (x86_64-*-netbsd*): New target.
11204 * configure.in (x86_64-*-netbsd*): Set COREFILE
11205 to netbsd-core.lo.
11206 * configure: Regenerated.
11207
11208 2002-01-03 Tom Rix <trix@redhat.com>
11209
11210 * xcofflink.c (_bfd_xcoff_bfd_final_link): Update .pad section ordering
11211 for recent bfd_make_section_anyway change.
11212
11213 2002-01-03 Nick Clifton <nickc@cambridge.redhat.com>
11214
11215 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
11216 R_ARM_THM_PC11 reloc.
11217
11218 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
11219
11220 * configure.in (LINGUAS): Add ja.
11221 * configure: Regenerate.
11222 * po/ja.po: Import from translation project's web site.
11223
11224 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
11225
11226 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Reformat error
11227 messages to ease translation into other languages.
11228
11229 For older changes see ChangeLog-0001
11230 \f
11231 Local Variables:
11232 mode: change-log
11233 left-margin: 8
11234 fill-column: 74
11235 version-control: never
11236 End: