bfd/
[binutils-gdb.git] / bfd / ChangeLog
1 2003-12-04 H.J. Lu <hongjiu.lu@intel.com>
2
3 * elfxx-ia64.c (elfNN_ia64_relax_section): Use the
4 need_relax_finalize field in link_info instead of
5 relax_finalizing to check if the relax finalize pass is being
6 done.
7
8 2003-12-04 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
9
10 * coff-arm.c (coff_arm_relocate_section, bfd_arm_process_before_allocation):
11 Change ARM26* to ARM_26* in comments to match definitions.
12 (coff_arm_adjust_symndx): Replace hard-coded constants with
13 appropriate definitions (ARM_26*).
14
15 2003-12-04 Alan Modra <amodra@bigpond.net.au>
16
17 * coff-i860.c (coff_i860_reloc_nyi): Return bfd_reloc_not_supported.
18 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Warning fixes.
19 (mn10300_elf_relax_section): Likewise.
20 * nlm32-alpha.c (ONES): Define.
21 (nlm32_alpha_howto_table): Use it to avoid warnings.
22
23 2003-12-04 Alan Modra <amodra@bigpond.net.au>
24
25 * elf32-i386.c (elf_i386_object_p): Delete.
26 (elf_backend_object_p): Don't define.
27 * elf32-s390.c (elf_s390_object_p): No need to alloc tdata here.
28 * elf32-sh.c (sh_elf_object_p): Likewise.
29 * elf32-sparc.c (elf32_sparc_object_p): Likewise.
30 * elf64-alpha.c (elf64_alpha_object_p): Likewise.
31 * elf64-s390.c (elf_s390_object_p): Likewise.
32 * elf64-x86-64.c (elf64_x86_64_elf_object_p): Likewise.
33
34 2003-12-03 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
35
36 * archures.c (bfd_mach_m32r2): Add new machine type.
37 * bfd-in2.h: Regenerate.
38 * cpu-m32r.c : Add new machine type.
39 * elf32-m32r.c (m32r_elf_object_p, m32r_elf_final_write_processing,
40 m32r_elf_merge_private_bfd_data): Add support for new machine
41 type.
42
43 2003-12-03 Dave Airlie <airlied@linux.ie>
44
45 * config.bfd: Add vax-linux-gnu target.
46 * configure.in: Likewise.
47 * configure: Regenerate.
48
49 2003-12-03 Alan Modra <amodra@bigpond.net.au>
50
51 * ecoff.c (ecoff_link_add_archive_symbols): Update for renamed
52 bfd_link_hash_entry field "next" -> "und_next".
53 * linker.c (_bfd_link_hash_newfunc): Likewise.
54 (bfd_link_add_undef): Likewise.
55 (_bfd_generic_link_add_archive_symbols): Likewise.
56 (_bfd_generic_link_add_one_symbol): Likewise.
57 * xcofflink.c (xcoff_link_add_symbols): Likewise.
58
59 2003-12-02 Nick Clifton <nickc@redhat.com>
60
61 * configure.in (ALL_LINGUAS): Add ro.
62 * po/ro.po: New Romanian translation.
63
64 2003-12-02 Alan Modra <amodra@bigpond.net.au>
65
66 * Makefile.am: Run "make dep-am".
67 * Makefile.in: Regenerate.
68
69 2003-12-01 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
70
71 * coffcode.h (coff_compute_section_file_positions): Set page_size
72 to 1 instead of 0 in the case file alignment value is zero.
73
74 2003-12-01 Kazu Hirata <kazu@cs.umass.edu>
75
76 * coff-rs6000.c: Remove ARGSUSED and VARARGS.
77 * coff64-rs6000.c: Likewise.
78 * coffcode.h: Likewise.
79 * elf32-vax.c: Likewise.
80 * hash.c: Likewise.
81 * hppabsd-core.c: Likewise.
82 * hpux-core.c: Likewise.
83 * ihex.c: Likewise.
84 * netbsd-core.c: Likewise.
85 * osf-core.c: Likewise.
86 * pdp11.c: Likewise.
87 * ptrace-core.c: Likewise.
88 * sco5-core.c: Likewise.
89 * section.c: Likewise.
90 * sunos.c: Likewise.
91 * trad-core.c: Likewise.
92
93 2003-12-01 Alan Modra <amodra@bigpond.net.au>
94
95 * elf-bfd.h (is_elf_hash_table): Take hash tab rather than info arg.
96 * elf.c (_bfd_elf_merge_sections): Adjust to suit.
97 (_bfd_elf_link_just_syms): Likewise.
98 (bfd_elf_get_needed_list): Likewise.
99 (bfd_elf_get_runpath_list): Likewise.
100 (_bfd_elf_link_hash_copy_indirect): Remove unneeded parens.
101 * elf32-hppa.c (elf32_hppa_setup_section_lists): Don't check hash tab
102 creator flavour.
103 (elf32_hppa_set_gp): Look up output sections rather than using htab.
104 * elf32-i960.c: Comment fix. Formatting.
105 * elf32-m32r.c (m32r_elf_add_symbol_hook): Use is_elf_hash_table
106 rather than testing creator flavour.
107 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
108 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
109 * elflink.c (_bfd_elf_link_create_dynamic_sections): Adjust for
110 is_elf_hash_table change. Remove redundant test.
111 (bfd_elf_record_link_assignment): Use is_elf_hash_table rather than
112 testing creator flavour.
113 (elf_link_record_local_dynamic_symbol): Adjust for is_elf_hash_table.
114 (_bfd_elf_fix_symbol_flags): Likewise.
115 (_bfd_elf_adjust_dynamic_symbol): Likewise.
116 * elflink.h (elf_link_add_object_symbols): Likewise. Remove redundant
117 checks. Use is_elf_hash_table rather than testing creator flavour.
118 Use hash_table throughout in place of info->hash.
119 (elf_add_dynamic_entry): Adjust for is_elf_hash_table change.
120 (NAME(bfd_elf,size_dynamic_sections)): Likewise. Remove redundant
121 check.
122 (elf_bfd_final_link): Adjust for is_elf_hash_table change.
123 (elf_link_check_versioned_symbol): Use is_elf_hash_table rather than
124 testing creator flavour.
125 (elf_gc_sections): Add is_elf_hash_table check.
126 (elf_gc_common_finalize_got_offsets): Likewise.
127 (elf_bfd_discard_info): Adjust for is_elf_hash_table change. Remove
128 redundant check.
129 * elfxx-ia64.c (elfNN_ia64_relax_section): Use is_elf_hash_table
130 rather than testing creator flavour.
131
132 2003-11-28 Christian Groessler <chris@groessler.org>
133
134 * cpu-z8k.c: Convert to ISO C90.
135 * coff-z8k.c: Likewise.
136
137 2003-11-27 Alexandre Oliva <aoliva@redhat.com>
138
139 * elf-bfd.h (elf_backend_data::elf_backend_modify_segment_map):
140 Add link info argument.
141 * elf32-i370.c (elf_backend_modify_segment_map): Likewise.
142 * elf32-ppc.c (ppc_elf_modify_segment_map): Likewise.
143 * elf32-xtensa.c (elf_xtensa_modify_segment_map): Likewise.
144 * elf64-hppa.c (elf64_hppa_modify_segment_map): Likewise.
145 * elfxx-ia64.c (elfNN_ia64_modify_segment_map): Likewise.
146 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Likewise.
147 * elfxx-mips.h (_bfd_mips_elf_modify_segment_map): Likewise.
148 * elf.c (assign_file_positions_except_relocs,
149 assign_file_positions_for_segments): Likewise. Adjust calls.
150
151 2003-11-27 Mark Kettenis <kettenis@gnu.org>
152
153 * elf.c (elfcore_grok_netbsd_procinfo): Make a pseudosection out
154 of the note.
155
156 2003-11-26 Daniel Jacobowitz <drow@mvista.com>
157 Richard Sandiford <rsandifo@redhat.com>
158
159 * elfxx-mips.c (mips_elf_set_global_got_offset): Don't set no_fn_stub.
160 (mips_elf_set_no_stub): New function.
161 (mips_elf_multi_got): Call it.
162 (_bfd_mips_elf_finish_dynamic_symbol): If a relocation is needed for
163 a secondary GOT entry, create an R_MIPS_32 or R_MIPS_64 relocation and
164 use mips_elf_create_dynamic_relocation to deal with any compatibility
165 issues. Store the adjusted addend in the GOT slot.
166
167 2003-11-25 Mattias EngdegÄrd <mattias@virtutech.se>
168
169 * stabs.c (_bfd_link_section_stabs): Skip N_EXCL stabs when
170 procesing N_BINCL stabs.
171
172 2003-11-25 Alan Modra <amodra@bigpond.net.au>
173
174 * elf64-ppc.c (ppc_type_of_stub): Disallow stubs other than
175 ppc_stub_plt_call to symbols defined in shared libs.
176
177 2003-11-22 Jakub Jelinek <jakub@redhat.com>
178
179 * elf-bfd.h (ELF_LINK_POINTER_EQUALITY_NEEDED): Define new flag.
180 * elf.c (_bfd_elf_link_hash_copy_indirect): Copy it.
181 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
182 (elf_i386_check_relocs): Set it.
183 (elf_i386_finish_dynamic_symbol): If it is not set,
184 clear st_value of SHN_UNDEF symbol.
185
186 2003-11-20 Jim Blandy <jimb@redhat.com>
187
188 * cpu-powerpc.c (powerpc_compatible): Any ISA in the PowerPC
189 family is a superset of <bfd_arch_rs6000,bfd_mach_rs6k>.
190
191 2003-11-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
192
193 * elf32-s390.c (elf_s390_relocate_section): Don't recalculate symbol
194 section for reloc output and subtract the output section's address
195 from the addend when converting a relocation into one against a
196 section symbol.
197 * elf64-s390.c (elf_s390_relocate_section): Likewise.
198
199 2003-11-18 James E Wilson <wilson@specifixinc.com>
200
201 * elfxx-ia64.c (get_fptr): For fptr_rel, use dynobj not abfd.
202 (elfNN_ia64_size_dynamic_sections): When stripping sections, check
203 for ia64_info->rel_fptr_sec.
204
205 2003-11-18 Alan Modra <amodra@bigpond.net.au>
206
207 * elf64-ppc.c (toc_adjusting_stub_needed): Exit early if section
208 size is zero.
209
210 2003-11-17 Daniel Jacobowitz <drow@mvista.com>
211
212 * elf.c (_bfd_elf_link_hash_copy_indirect): Copy
213 ELF_LINK_HASH_NEEDS_PLT. Fix formatting.
214 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
215 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
216 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Likewise.
217 * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
218 * elf32-sh.c (sh_elf_copy_indirect_symbol): Likewise.
219 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
220 * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
221 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
222 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
223 * elf32-xtensa.c (elf_xtensa_copy_indirect_symbol): Remove.
224 (elf_backend_copy_indirect_symbol): Don't define.
225
226 2003-11-14 Daniel Jacobowitz <drow@mvista.com>
227
228 * elfxx-mips.c (mips_elf_merge_gots): Weaken assert for local
229 GOT entries.
230
231 2003-11-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
232
233 * elf32-s390.c (elf_s390_relocate_section): Only convert R_390_32
234 to R_390_RELATIVE. Convert the other relocations against local
235 symbols to relocations against the start of the section.
236 * elf64-s390.c (elf_s390_relocate_section): Only convert R_390_64
237 to R_390_RELATIVE. Convert the other relocations against local
238 symbols to relocations against the start of the section.
239
240 2003-11-11 Nick Clifton <nickc@redhat.com>
241
242 * elf-m10300.c (bfd_mn10300_elf_size_dynamic_sections): Use
243 info->executable not info->shared to decide if a .interp section
244 should be present.
245 * elf32-arm.h (elf32_arm_size_dynamic_sections): Likewise.
246 * elf32-cris.c (elf_cris_size_dynamic_sections): Likewise.
247 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
248 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
249 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
250 * elf32-vax.c (elf_vax_size_dynamic_sections): Likewise.
251 * elf32-xtensa.c (elf_xtensa_size_dynamic_sections): Likewise.
252 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
253 * elfxx-mips.c (_bfd_mips_size_dynamic_sections): Likewise.
254 * elflink.h (size_dynamic_sections): Likewise.
255
256 2003-11-10 Jonathan Wilson <jonwil@tpgi.com.au>
257
258 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Swap out tls pointer.
259 (_bfd_XXi_final_link_postscript): Look for __tks_used symbol. If
260 found initialise the tls data directory entry.
261
262 2003-11-07 Alan Modra <amodra@bigpond.net.au>
263
264 * elf32-ppc.c (ppc_elf_install_value): Delete.
265 (shared_stub_entry, stub_entry): Make them arrays of ints.
266 Remove initial branch.
267 (ppc_elf_relax_section): Write one branch around all trampolines
268 instead. Correct bogus R_PPC_PLTREL24 handling. Correct
269 branch range check. Only use shared_stub_entry when shared.
270 Test that branches can reach stubs. Write trampolines out at
271 end so that just one realloc is used. Handle little-endian
272 mode. Move relevant code from ppc_elf_install_value to here.
273 (ppc_elf_relocate_section): Move code handling RELAX32 from
274 ppc_elf_install_value to here.
275
276 2003-11-06 Alan Modra <amodra@bigpond.net.au>
277
278 * elf32-ppc.c (ppc_elf_howto_raw); Add entry for R_PPC_RELAX32PC.
279 (ppc_elf_install_value): Handle R_PPC_RELAX32PC. Merge duplicate
280 cases.
281 (shared_stub_entry): Correct opcode.
282 (ppc_elf_relax_section): Generate R_PPC_RELAX32PC relocs.
283 (ppc_elf_relocate_section): Handle them.
284
285 2003-11-05 Alan Modra <amodra@bigpond.net.au>
286
287 * elf.c (_bfd_elf_rela_local_sym): Accept asection **, and return
288 updated section in case of merged section.
289 * elf-bfd.h (_bfd_elf_rela_local_sym): Update declaration.
290 * elf-hppa.h (elf_hppa_relocate_section): Adjust call.
291 * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
292 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
293 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
294 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
295 * elf32-cris.c (cris_elf_relocate_section): Likewise.
296 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
297 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
298 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
299 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
300 * elf32-i370.c (i370_elf_relocate_section): Likewise.
301 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
302 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
303 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
304 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
305 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
306 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
307 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
308 * elf32-s390.c (elf_s390_relocate_section): Likewise.
309 * elf32-sh.c (sh_elf_relocate_section): Likewise.
310 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
311 * elf32-v850.c (v850_elf_relocate_section) Likewise.
312 * elf32-vax.c (elf_vax_relocate_section): Likewise.
313 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
314 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
315 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
316 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
317 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
318 * elf64-s390.c (elf_s390_relocate_section): Likewise.
319 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
320 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
321 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
322 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
323
324 * elf32-cris.c (cris_elf_relocate_section): Don't recalculate symbol
325 section for reloc output.
326 * elf32-i370.c (i370_elf_relocate_section): Likewise.
327 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
328 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
329 * elf32-vax.c (elf_vax_relocate_section): Likewise.
330 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
331 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
332
333 * elf32-ppc.c (ppc_elf_relocate_section): Don't recalculate everything
334 for R_PPC_RELAX32 reloc. Don't bother checking ppc_elf_install_value
335 return value.
336 * elf64-ppc.c (ppc64_elf_relocate_section <R_PPC64_TOC>): Sanity check
337 sec->id.
338
339 2003-11-05 Alan Modra <amodra@bigpond.net.au>
340
341 * elf32-d10v.c (extract_rel_addend, insert_rel_addend): New functions.
342 (elf32_d10v_relocate_section): Use them to handle -r reloc
343 adjustments, and in place of _bfd_elf_rela_local_sym.
344
345 * cpu-iq2000.c (arch_info_struct): Warning fix.
346
347 2003-11-05 Alan Modra <amodra@bigpond.net.au>
348
349 * elf32-hppa.c (ELIMINATE_COPY_RELOCS): Define.
350 (elf32_hppa_copy_indirect_symbol): Don't copy NON_GOT_REF on
351 weakdefs.
352 (elf32_hppa_check_relocs): Use ELIMINATE_COPY_RELOCS.
353 (elf32_hppa_adjust_dynamic_symbol): Likewise. Copy weakdef
354 NON_GOT_REF.
355 (allocate_dynrelocs): Use ELIMINATE_COPY_RELOCS and
356 SYMBOL_CALLS_LOCAL. Discard relocs for undef weak syms with
357 non-default visibility.
358 (elf32_hppa_relocate_section): Use ELIMINATE_COPY_RELOCS and
359 SYMBOL_CALLS_LOCAL.
360
361 2003-11-04 Alan Modra <amodra@bigpond.net.au>
362
363 * aout-target.h, aoutf1.h, bfdio.c, bfdwin.c: Update copyright date.
364 * coff-apollo.c, coff-sparc.c, coff-w65.c, coff-we32k.c: Ditto.
365 * coff-z8k.c, coffgen.c, cpu-frv.c, cpu-h8500.c, cpu-hppa.c: Ditto.
366 * cpu-ia64-opc.c, cpu-m10300.c, cpu-mips.c, cpu-msp430.c: Ditto.
367 * cpu-rs6000.c, cpu-z8k.c, efi-app-ia32.c, elf32-am33lin.c: Ditto.
368 * gen-aout.c, hash.c, hp300hpux.c, init.c, mach-o.c: Ditto.
369 * nlm-target.h, nlm.c, som.h, stabs.c, sysdep.h, xsym.h: Ditto.
370
371 * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Fix
372 "dereferencing type-punned pointer" warnings.
373
374 * aout-adobe.c (aout_adobe_set_section_contents): Constify location.
375 * aoutx.h (NAME(aout,set_section_contents)): Ditto.
376 * bfd-in2.h: Regenerate.
377 * binary.c (binary_set_section_contents): Ditto.
378 * bout.c (b_out_set_section_contents): Ditto.
379 * coff-tic54x.c (tic54x_set_section_contents): Ditto.
380 * coffcode.h (coff_set_section_contents): Ditto.
381 * ecoff.c (_bfd_ecoff_set_section_contents): Ditto.
382 * elf-bfd.h (_bfd_elf_set_section_contents): Ditto.
383 * elf.c (_bfd_elf_set_section_contents): Ditto.
384 * elfxx-mips.c (_bfd_mips_elf_set_section_contents): Ditto.
385 * elfxx-mips.h (_bfd_mips_elf_set_section_contents): Ditto.
386 * i386msdos.c (msdos_set_section_contents): Ditto.
387 * ieee.c (ieee_set_section_contents): Ditto.
388 * ihex.c (ihex_set_section_contents): Ditto.
389 * libaout.h (NAME(aout,set_section_contents)): Ditto.
390 * libbfd-in.h (_bfd_nowrite_set_section_contents): Ditto.
391 (_bfd_generic_set_section_contents): Ditto.
392 * libbfd.h: Regenerate.
393 * libbfd.c (_bfd_generic_set_section_contents): Ditto.
394 * libecoff.h (_bfd_ecoff_set_section_contents): Ditto.
395 * libnlm.h (nlmNAME(set_section_contents)): Ditto.
396 (struct nlm_backend_data <nlm_mangle_relocs>): Ditto.
397 * mmo.c (mmo_set_section_contents): Ditto.
398 * nlm32-alpha.c (nlm_alpha_mangle_relocs): Ditto.
399 * nlm32-i386.c (nlm_i386_mangle_relocs): Ditto.
400 * nlm32-ppc.c (nlm_powerpc_mangle_relocs): Ditto.
401 * nlm32-sparc.c (nlm_sparc_mangle_relocs): Ditto.
402 * nlmcode.h (nlm_set_section_contents): Ditto.
403 * oasys.c (oasys_set_section_contents): Ditto.
404 * pdp11.c (NAME(aout,set_section_contents)): Ditto.
405 * ppcboot.c (ppcboot_set_section_contents): Ditto.
406 * srec.c (srec_set_section_contents): Ditto.
407 * targets.c (BFD_JUMP_TABLE_WRITE <_bfd_set_section_contents>): Ditto.
408 * tekhex.c (tekhex_set_section_contents): Ditto.
409 (move_section_contents): Ditto.
410 * versados.c (versados_set_section_contents): Ditto.
411 * vms-misc.c (_bfd_save_vms_section): Ditto.
412 * vms.c (vms_set_section_contents): Ditto.
413 * vms.h (_bfd_save_vms_section): Ditto.
414
415 2003-11-04 Alan Modra <amodra@bigpond.net.au>
416
417 * elf64-ppc.c (ppc_size_one_stub): Size relbrlt. Accept info arg
418 rather than htab.
419 (ppc64_elf_size_stubs): Adjust ppc_size_one_stub traversal. Zero
420 relbrlt size.
421 (ppc64_elf_build_stubs): Allocate space for relbrlt.
422
423 2003-11-04 Alan Modra <amodra@bigpond.net.au>
424
425 * bfd-in.h (_bfd_elf_tls_setup): Declare.
426 * bfd-in2.h: Regenerate.
427 * elf-bfd.h (struct elf_link_tls_segment): Delete.
428 (struct elf_link_hash_table): Add tls_sec and tls_size.
429 * elf.c (_bfd_elf_link_hash_table_init): Init tls_sec and tls_size.
430 * elflink.c (_bfd_elf_tls_setup): New function.
431 * elflink.h (struct elf_final_link_info): Remove first_tls_sec.
432 (elf_bfd_final_link): Don't set first_tls_sec here. Update code
433 saving tls segment info, round segment size up.
434 (elf_link_output_extsym): Adjust code using tls segment info.
435 (elf_link_input_bfd): Likewise.
436 * elf32-i386.c (dtpoff_base, tpoff): Likewise.
437 * elf32-s390.c (dtpoff_base, tpoff): Likewise.
438 * elf32-sh.c (dtpoff_base, tpoff): Likewise.
439 * elf32-sparc.c (dtpoff_base, tpoff): Likewise.
440 * elf64-s390.c (dtpoff_base, tpoff): Likewise.
441 * elf64-x86-64.c (dtpoff_base, tpoff): Likewise.
442 * elfxx-ia64.c (elfNN_ia64_tprel_base): Likewise.
443 (elfNN_ia64_dtprel_base): Likewise.
444 * elf64-alpha.c (alpha_get_dtprel_base): Likewise.
445 (alpha_get_tprel_base): Likewise.
446 (struct alpha_relax_info): Remove tls_segment.
447 (elf64_alpha_relax_got_load): Adjust invocation of
448 alpha_get_dtprel_base and alpha_get_tprel_base.
449 (elf64_alpha_relax_tls_get_addr): Likewise.
450 (elf64_alpha_relax_section): Likewise.
451 (elf64_alpha_relocate_section): Likewise.
452 (elf64_alpha_relax_find_tls_segment): Delete.
453 * elf32-ppc.c (struct ppc_elf_link_hash_table): Remove tls_sec.
454 (ppc_elf_tls_setup): Call _bfd_elf_tls_setup. Return section.
455 (ppc_elf_relocate_section): Adjust to use elf.tls_sec.
456 * elf32-ppc.h (ppc_elf_tls_setup): Update.
457 * elf64-ppc.c (struct ppc_link_hash_table): Remove tls_sec.
458 (ppc64_elf_tls_setup): Call _bfd_elf_tls_setup. Return section.
459 (ppc64_elf_tls_optimize): Adjust to use elf.tls_sec.
460 (ppc64_elf_relocate_section): Likewise.
461 * elf64-ppc.h (ppc64_elf_tls_setup): Update.
462
463 2003-11-03 Daniel Jacobowitz <drow@mvista.com>
464
465 * elf-bfd.h (struct elf_backend_data): Remove plt_header_size.
466 * elf-m10300.c (elf_backend_plt_header_size): Don't define.
467 * elf32-arm.h (elf_backend_plt_header_size): Don't define.
468 * elf32-cris.c (elf_backend_plt_header_size): Don't define.
469 * elf32-i386.c (elf_backend_plt_header_size): Don't define.
470 * elf32-mips.c (elf_backend_plt_header_size): Don't define.
471 * elf32-ppc.c (elf_backend_plt_header_size): Don't define.
472 * elf32-s390.c (elf_backend_plt_header_size): Don't define.
473 * elf32-sh.c (elf_backend_plt_header_size): Don't define.
474 * elf32-sparc.c (elf_backend_plt_header_size): Don't define.
475 * elf64-alpha.c (elf_backend_plt_header_size): Don't define.
476 * elf64-hppa.c (elf_backend_plt_header_size): Don't define.
477 * elf64-mips.c (elf_backend_plt_header_size): Don't define.
478 * elf64-ppc.c (elf_backend_plt_header_size): Don't define.
479 * elf64-s390.c (elf_backend_plt_header_size): Don't define.
480 * elf64-sh64.c (elf_backend_plt_header_size): Don't define.
481 * elf64-sparc.c (elf_backend_plt_header_size): Don't define.
482 * elf64-x86-64.c (elf_backend_plt_header_size): Don't define.
483 * elfn32-mips.c (elf_backend_plt_header_size): Don't define.
484 * elfxx-ia64.c (elf_backend_plt_header_size): Don't define.
485 * elfxx-target.h (elf_backend_plt_header_size): Don't define
486 or include in target initializer.
487
488 2003-11-03 Andrew Cagney <cagney@redhat.com>
489
490 * section.c (bfd_set_section_contents): Make the "location" buffer
491 constant.
492 * bfd-in2.h: Re-generate.
493
494 2003-10-30 Andrew Cagney <cagney@redhat.com>
495
496 * syms.c: Replace "struct symbol_cache_entry" with "struct
497 bfd_symbol".
498 * vms.h, targets.c, section.c, reloc.c, peicode.h: Ditto.
499 * mipsbsd.c, elf.c, linker.c, elf-bfd.h, ecoff.c: Ditto.
500 * cpu-z8k.c, cpu-ns32k.c, cpu-h8500.c, bfd.c, bfd-in.h: Ditto.
501 * bfd-in2.h: Re-generate.
502
503 2003-10-30 Jakub Jelinek <jakub@redhat.com>
504
505 * elfxx-ia64.c: Include objalloc.h, hashtab.h.
506 (struct elfNN_ia64_local_hash_entry): Remove root. Add id and r_sym
507 fields.
508 (struct elfNN_ia64_local_hash_table): Remove.
509 (struct elfNN_ia64_link_hash_table): Change loc_hash_table's type
510 to htab_t. Add loc_hash_memory field.
511 (elfNN_ia64_local_hash_table_init, elfNN_ia64_new_loc_hash_entry):
512 Removed.
513 (elfNN_ia64_local_htab_hash, elfNN_ia64_local_htab_eq): New
514 functions.
515 (elfNN_ia64_hash_table_create): Use hashtab.h hashtable for
516 loc_hash_table. Initialize loc_hash_memory.
517 (elfNN_ia64_hash_table_free): New function.
518 (elfNN_ia64_local_hash_lookup): Remove.
519 (elfNN_ia64_local_dyn_sym_thunk): Change into htab_traverse
520 callback.
521 (elfNN_ia64_dyn_sym_traverse): Use htab_traverse.
522 (get_local_sym_hash): Use hashtab.h hashtable for loc_hash_table.
523 (bfd_elfNN_bfd_link_hash_table_free): Define.
524
525 2003-10-30 Alan Modra <amodra@bigpond.net.au>
526
527 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Modify versioned
528 symbol string in place.
529
530 2003-10-30 Jim Blandy <jimb@redhat.com>
531
532 * cpu-rs6000.c (rs6000_compatible): Check the correct arch_info
533 object's mach field: all PowerPC machines are supersets of the
534 original rs6000, but not later rs6000 machines.
535
536 2003-10-30 Alan Modra <amodra@bigpond.net.au>
537
538 * dwarf2.c (struct attribute): Delete "unsnd", "snd" and "addr".
539 Add "val" and "sval" fields.
540 (DW_STRING, DW_UNSND, DW_BLOCK, DW_SND, DW_ADDR): Delete.
541 (read_attribute_value): Expand and adjust DW_* occurrences.
542 (scan_unit_for_functions, parse_comp_unit): Likewise.
543
544 2003-10-30 Phil Edwards <phil@codesourcery.com>
545
546 * config.bfd (arm-*-vxworks): Remove separate stanza; merge with
547 other common ELF triples.
548 (i[3-7]86-*-vxworks): Change to ELF format.
549 (mips*-*-windiss): New triple, add to common MIPS/ELF stanza.
550 (sh-*-vxworks): New stanza.
551
552 2003-10-30 Lars Knoll <lars@trolltech.com>
553 Michael Matz <matz@suse.de>
554 Jakub Jelinek <jakub@redhat.com>
555 Alan Modra <amodra@bigpond.net.au>
556
557 * merge.c (struct sec_merge_sec_info): Update comment.
558 (struct sec_merge_hash_entry): Remove entsize.
559 (sec_merge_hash_lookup): Only adjust alignment when creating.
560 (sec_merge_emit): Remove register keyword.
561 (cmplengthentry, last4_eq, last_eq): Delete.
562 (strrevcmp, strrevcmp_align, is_suffix): New.
563 (merge_strings): Use them to implement fast suffix merging.
564 * elf-strtab.c (struct elf_strtab_hash_entry): Update comments.
565 Make "len" signed.
566 (_bfd_elf_strtab_add): Lose on >2G strings.
567 (_bfd_elf_strtab_emit): Don't emit strings with len < 0.
568 (cmplengthentry, last4_eq): Delete.
569 (strrevcmp, is_suffix): New.
570 (_bfd_elf_strtab_finalize): Rework to implement fast suffix merging.
571
572 2003-10-29 Daniel Jacobowitz <drow@mvista.com>
573
574 * elf32-arm.h (elf32_arm_final_link_relocate): Move check for
575 SEC_ALLOC.
576
577 2003-10-29 Philip Blundell <philb@gnu.org>
578
579 * elf32-arm.h (elf32_arm_plt0_entry, elf32_arm_plt_entry): New
580 code sequence.
581 (PLT_HEADER_SIZE): New.
582 (struct elf32_arm_pcrel_relocs_copied): Rename to ...
583 (struct elf32_arm_relocs_copied): ... this. Count both
584 pcrel and non-pcrel relocs. All uses updated.
585 (struct elf32_arm_link_hash_table): Add pointers to dynamic linker
586 sections and symbol/section mapping cache.
587 (create_got_section): New.
588 (elf32_arm_create_dynamic_sections): New.
589 (elf_backend_create_dynamic_sections): Use it.
590 (elf32_arm_final_link_relocate): Support garbage collection of relocs.
591 (elf32_arm_check_relocs): Likewise.
592 (elf32_arm_adjust_dynamic_symbol): Likewise.
593 (elf32_arm_copy_indirect_symbol): New.
594 (elf32_arm_link_hash_table_create): Initialise new fields.
595 (elf32_arm_gc_sweep_hook): Implement.
596 (elf32_arm_discard_copies): Delete.
597 (elf32_arm_finish_dynamic_symbol): Use new PLT code.
598 (elf32_arm_finish_dynamic_sections): Likewise.
599 (elf_backend_can_refcount): Define.
600 (elf_backend_copy_indirect_symbol): Likewise.
601 (elf_backend_plt_header_size): Set to PLT_HEADER_SIZE.
602
603 2003-10-29 Alan Modra <amodra@bigpond.net.au>
604
605 * elf64-ppc.c (elf_backend_grok_prstatus): Define.
606 (elf_backend_grok_psinfo): Define.
607 (ppc64_elf_grok_prstatus, ppc64_elf_grok_psinfo): New functions.
608
609 * elf.c (_bfd_elfcore_make_pseudosection): Allow multiple
610 sections with the same name.
611 (elfcore_grok_lwpstatus): Likewise.
612 (elfcore_grok_win32pstatus): Likewise.
613 (elfcore_grok_note): Likewise.
614 (elfcore_grok_nto_status): Likewise.
615 (elfcore_grok_nto_gregs): Likewise.
616
617 2003-10-27 Daniel Jacobowitz <drow@mvista.com>
618
619 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Never skip dynamic
620 objects.
621
622 2003-10-14 Richard Sandiford <rsandifo@redhat.com>
623
624 * elfxx-mips.c (mips_elf_create_got_section): Initialize global_gotno.
625
626 2003-10-24 H.J. Lu <hongjiu.lu@intel.com>
627
628 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Look up
629 hash table for real symbols.
630
631 2003-10-23 Michael Snyder <msnyder@redhat.com>
632
633 * section.c (asection): Fix typo in comment.
634
635 2003-10-23 Alan Modra <amodra@bigpond.net.au>
636
637 * elf64-ppc.c (get_tls_mask): Add toc_symndx param, save toc
638 reloc symbol index to it. Don't allow gd syms in shared libs
639 to be optimized.
640 (ppc64_elf_tls_optimize): Adjust get_tls_mask call.
641 (ppc64_elf_size_stubs): Likewise.
642 (ppc64_elf_relocate_section): Check that tls relocs are only used
643 with tls syms, and similarly for non-tls. Correct symbol used
644 when optimizing toc tls code.
645
646 2003-10-22 Nick Clifton <nickc@redhat.com>
647
648 * peicode.h (coff_swap_scnhdr_in): Only remove padding when
649 processing an executable.
650
651 2003-10-22 Jakub Jelinek <jakub@redhat.com>
652
653 * elflink.c (_bfd_elf_export_symbol): Adjust for globals and locals
654 field changes.
655 (_bfd_elf_link_assign_sym_version): Likewise.
656 * elflink.h (size_dynamic_sections): Likewise.
657
658 2003-10-21 Alexandre Oliva <aoliva@redhat.com>,
659 Michael Snyder <msnyder@redhat.com>
660
661 * archures.c (bfd_mach_sh4a, bfd_mach_sh4al_dsp, bfd_mach_sh4_nofpu,
662 bfd_mach_sh4a_nofpu): New machine types.
663 * bfd-in2.h: Rebuilt.
664 * cpu-sh.c (compatible): Remove unused function.
665 (SH4A_NEXT, SH4AL_DSP_NEXT, SH4_NOFPU_NEXT, SH4A_NOFPU_NEXT): New.
666 (arch_info_struct): Add sh4a, sh4al_dsp, sh4-nofpu and sh4a-nofpu.
667 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle them.
668
669 2003-10-21 Wouter van Heyst <wouter@vidicode.nl>
670
671 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Correct text
672 describing mismatched formats involving the Maverick FP type.
673
674 2003-10-21 Anil Paranjpe <anilp1@KPITCummins.com>
675
676 * binary.c (binary_object_p): Pass machine flag along with
677 architecture.
678
679 2003-10-21 Thorsten Brehm <brehm@gmx.net>
680
681 * archures.c (bfd_default_scan): Add support for mcf528x.
682 * ieee.c (ieee_write_processor): Likewise.
683
684 2003-10-21 Peter Barada <pbarada@mail.wm.sps.mot.com>
685 Bernardo Innocenti <bernie@develer.com>
686
687 * archures.c: Add MCF528x (MCFv4) support.
688 * bfd/cpu-m68k.c (arch_info_struct): Likewise.
689 * bfd-in2.h: Regenerate.
690
691 2003-10-20 Andrew Cagney <cagney@redhat.com>
692
693 * targets.c: Replace "struct sec" with "struct bfd_section"
694 * syms.c, sparclynx.c, section.c, opncls.c: Ditto.
695 * libcoff-in.h, libbfd-in.h, elfxx-target.h: Ditto.
696 * elf.c, coffgen.c, bfd.c, bfd-in.h, aoutf1.h: Ditto.
697 * aout-tic30.c, aout-target.h:
698 * bfd-in2.h, libcoff.h, libbfd.h: Regenerate.
699
700 2003-10-18 Hans-Peter Nilsson <hp@bitrange.com>
701
702 Support linker relaxation of new R_MMIX_PUSHJ_STUBBABLE relocs.
703 * elf64-mmix.c (MAX_PUSHJ_STUB_SIZE): New macro.
704 (struct _mmix_elf_section_data): New member pjs.
705 (mmix_set_relaxable_size, mmix_elf_get_section_contents): New
706 functions.
707 (elf_mmix_howto_table): New entry for R_MMIX_PUSHJ_STUBBABLE.
708 (mmix_reloc_map): Ditto.
709 (mmix_elf_relocate_section): Handle R_MMIX_PUSHJ_STUBBABLE.
710 (mmix_final_link_relocate, mmix_elf_check_common_relocs): Ditto.
711 (mmix_elf_perform_relocation): Ditto. Don't mark parameter addr
712 unused.
713 (mmix_elf_check_relocs): Move early return to after
714 mmix_elf_check_common_relocs call.
715 (mmix_elf_symbol_processing): Fix cut-and-pasto in head comment.
716 (_bfd_mmix_before_linker_allocation): Rename from
717 _bfd_mmix_prepare_linker_allocated_gregs. All referers changed.
718 Arrange to set the initial relaxable size of sections.
719 (_bfd_mmix_after_linker_allocation): Rename from
720 _bfd_mmix_finalize_linker_allocated_gregs.
721 (mmix_elf_relax_section): Relax a R_MMIX_PUSHJ_STUBBABLE reloc.
722 (bfd_elf64_get_section_contents): Define.
723 * reloc.c: Add ENUMX for BFD_RELOC_MMIX_PUSHJ_STUBBABLE.
724 * libbfd.h, bfd-in2.h: Regenerate.
725
726 * reloc.c (bfd_generic_relax_section): Default-set
727 section->_cooked_size here.
728 (bfd_generic_get_relocated_section_contents): Don't set it here.
729 Explain why.
730
731 2003-10-17 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
732
733 * elf32-hppa.c (elf32_hppa_relocate_section): Skip relocation if
734 output section has been discarded.
735
736 2003-10-17 Shrinivas Atre <shrinivasa@KPITCummins.com>
737
738 * coff-h8300.c (funcvec_hash_newfunc): Handle normal mode.
739 (h8300_reloc16_extra_cases): Likewise.
740 (h8300_bfd_link_add_symbols): Likewise.
741
742 2003-10-17 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
743
744 * cpu-h8300.c (h8300sxn_info_struct): Correct address size.
745 (h8300sn_info_struct): Likewise.
746 (h8300hn_info_struct): Likewise.
747
748 2003-10-16 Pavel Roskin <proski@gnu.org>
749
750 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Don't calculate image size
751 for sections which lack size info.
752
753 2003-10-17 Danny Smith <dannysmith@users.sourceforge.net>
754
755 * configure.host: Add __USE_MINGW_FSEEK to HDEFINES for
756 mingw32.
757
758 2003-10-16 H.J. Lu <hongjiu.lu@intel.com>
759
760 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Also warn
761 undefined patterns with '*'.
762
763 2003-10-16 H.J. Lu <hongjiu.lu@intel.com>
764
765 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't
766 use the last CIE from a different section.
767 (_bfd_elf_write_section_eh_frame): Don't pad beyond the raw
768 size of the output section.
769
770 2003-10-07 Roland McGrath <roland@redhat.com>
771
772 * elf.c (_bfd_elf_make_section_from_phdr): Set alignment_power of
773 new section from p_align header field.
774
775 2003-10-16 H.J. Lu <hongjiu.lu@intel.com>
776
777 * elf32-xtensa.c (xtensa_read_table_entries): The external size
778 of entry is 8 bytes.
779
780 2003-10-15 Andrew Cagney <cagney@redhat.com>
781
782 * targets.c (BFD_JUMP_TABLE_SYMBOLS): Replace NAME##_get_symtab
783 with NAME##_canonicalize_symtab.
784 * libcoff-in.h (coff_canonicalize_symtab): Update.
785 * xsym.h (bfd_sym_canonicalize_symtab): Update.
786 * elf-bfd.h (_bfd_elf_canonicalize_symtab): Update.
787 * coffgen.c (coff_canonicalize_symtab): Update.
788 * libbfd-in.h (_bfd_nosymbols_canonicalize_symtab): Update.
789 * libnlm.h (nlmNAME(canonicalize_symtab)): Update.
790 * ieee.c (ieee_vec): Update comment.
791 * libecoff.h (_bfd_ecoff_canonicalize_symtab): Update.
792 * mmo.c (mmo_canonicalize_symtab): Update.
793 * nlm-target.h (nlm_canonicalize_symtab): Update.
794 * nlmcode.h (nlm_canonicalize_symtab): Update.
795 * i386msdos.c (msdos_canonicalize_symtab): Update.
796 * hp300hpux.c (MY (canonicalize_symtab)): Update.
797 * oasys.c (oasys_canonicalize_symtab): Update.
798 * som.c (som_canonicalize_symtab): Update.
799 * pef.c (bfd_pef_canonicalize_symtab): Update.
800 * nlmcode.h (nlm_canonicalize_symtab): Update.
801 * xsym.c (bfd_sym_canonicalize_symtab): Update.
802 * vms.c (vms_canonicalize_symtab): Update.
803 * versados.c (versados_canonicalize_symtab): Update.
804 * mach-o.c (bfd_mach_o_canonicalize_symtab): Update.
805 * ieee.c (ieee_canonicalize_symtab): Update.
806 * pdp11.c (NAME(aout,canonicalize_symtab)): Update.
807 * reloc.c: Update comment.
808 * libaout.h (NAME(aout,canonicalize_symtab)): Update.
809 * coff64-rs6000.c (aix5coff64_vec): Update.
810 * coff64-rs6000.c (bfd_xcoff_aix5_backend_data): Update.
811 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update.
812 * aoutx.h (NAME(aout,canonicalize_symtab)): Update.
813 * elfxx-target.h (bfd_elfNN_canonicalize_symtab): Update.
814 * hp300hpux.c (MY_canonicalize_symtab): Update.
815 * ecoff.c (_bfd_ecoff_canonicalize_symtab): Update.
816 * aout-tic30.c (MY_canonicalize_symtab): Update.
817 * aout-target.h (MY_canonicalize_symtab): Update.
818 * ppcboot.c (ppcboot_canonicalize_symtab): Update.
819 * elf.c (_bfd_elf_canonicalize_symtab): Update.
820 * elfcode.h (elf_canonicalize_symtab): Update.
821 * ihex.c (ihex_canonicalize_symtab): Update.
822 * tekhex.c (tekhex_canonicalize_symtab): Update.
823 * binary.c (binary_canonicalize_symtab): Update.
824 * srec.c (srec_canonicalize_symtab): Update.
825
826 2003-10-15 Kazu Hirata <kazu@cs.umass.edu>
827
828 * elf32-h8300.c (elf_reloc_map): Fix a comment typo.
829
830 2003-10-15 Kaz Kojima <kkojima@rr.iij4u.or.jp>
831
832 * elf32-sh.c (sh_elf_relocate_section): Handle R_SH_IMM_*_PCREL
833 relocations.
834 (sh_elf_check_relocs): Likewise.
835
836 * elf32-sh64.c (elf_backend_merge_symbol_attribute): Define.
837 (sh64_elf_merge_symbol_attribute): New.
838 * elf64-sh64.c (elf_backend_merge_symbol_attribute): Define.
839 (sh64_elf64_merge_symbol_attribute): New.
840
841 2003-10-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
842
843 * elf-bfd.h (struct elf_backend_data): New function pointer member
844 elf_backend_merge_symbol_attribute.
845 * elflink.h (elf_link_add_object_symbols): Adjust call to
846 elf_backend_merge_symbol_attribute if the backend defined it.
847 * elfxx-target.h (elf_backend_merge_symbol_attribute): New macro.
848 (elfNN_bed): Add that to the initializer.
849
850 2003-10-14 Bob Wilson <bob.wilson@acm.org>
851
852 * elf32-xtensa.c (get_is_linkonce_section): Delete.
853 (xtensa_is_property_section, xtensa_is_littable_section): Use
854 XTENSA_INSN_SEC_NAME and XTENSA_LIT_SEC_NAME macros. Do not recognize
855 linkonce sections containing ".xt.insn" and ".xt.lit" substrings.
856 (xtensa_get_property_section_name): Check section name instead of
857 calling get_is_linkonce_section. Remove unused bfd parameter. Use
858 XTENSA_INSN_SEC_NAME and XTENSA_LIT_SEC_NAME macros. Never generate
859 linkonce section names by appending ".xt.insn" or ".xt.lit".
860 (xtensa_read_table_entries): Remove bfd argument in call to
861 xtensa_get_property_section_name. Free section name when done.
862 (elf_xtensa_combine_prop_entries): Free leaking table.
863
864 2003-10-13 Richard Sandiford <rsandifo@redht.com>
865
866 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Don't add
867 DT_MIPS_LIBLIST or DT_MIPS_CONFLICT entries.
868 (_bfd_mips_elf_finish_dynamic_symbol): Don't handle them. Don't
869 handle DT_MIPS_MSYM. Set DT_RELSZ based on the number of relocations
870 that were needed.
871 (_bfd_mips_elf_modify_segment_map): Fix placement of PT_MIPS_OPTIONS.
872 (_bfd_mips_elf_merge_private_bfd_data): Ignore EF_MIPS_UCODE.
873
874 2003-10-13 H.J. Lu <hongjiu.lu@intel.com>
875
876 * bfd-in.h (bfd_elf32_ia64_after_parse): New prototype.
877 (bfd_elf64_ia64_after_parse): Likewise.
878 * bfd-in2.h: Regenerated.
879
880 * elfxx-ia64.c (oor_ip): New.
881 (oor_branch_size): Likewise.
882 (bfd_elfNN_ia64_after_parse): Likewise.
883 (elfNN_ia64_relax_section): Use oor_ip if oor_branch_size
884 equals sizeof (oor_ip).
885
886 2003-10-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
887
888 * elf64-sh64.c (sh_elf64_relocate_section): Tidy up for the
889 renumbering of some relocation numbers.
890
891 2003-10-11 Alan Modra <amodra@bigpond.net.au>
892
893 * coff-sh.c: Move definition of MAP and guard more code with
894 COFF_IMAGE_WITH_PE.
895
896 * section.c (bfd_get_section_size_before_reloc): Ignore reloc_done.
897 * bfd-in2.h: Regenerate.
898
899 2003-10-10 H.J. Lu <hongjiu.lu@intel.com>
900
901 * Makefile.am: Run "make dep-am".
902 * Makefile.in: Regenerate.
903 * doc/Makefile.in: Likewise.
904
905 2003-10-09 H.J. Lu <hongjiu.lu@intel.com>
906
907 * cofflink.c: Include "safe-ctype.h".
908 (coff_link_add_symbols): Use ISDIGIT instead of isdigit.
909
910 2003-10-08 Dave Brolley <brolley@redhat.com>
911 On behalf of Michael Snyder <msnyder@redhat.com>
912
913 * archures.c: Add FRV fr550 machine.
914 * cpu-frv.c: Ditto.
915 * elf32-frv.c: Ditto.
916 * bfd-in2.h: Regenerate.
917
918 2003-10-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
919
920 * elfxx-mips.c (STUB_MOVE,STUB_LI16): Fix stub code
921 for non-SGI N64 ABI. Improve code consitency.
922
923 2003-10-07 Alexandre Oliva <aoliva@redhat.com>
924
925 * elf32-frv.c (elf32_frv_howto_table): Set R_FRV_LABEL16's
926 rightshift to 2.
927
928 2003-10-07 Nathan Sidwell <nathan@codesourcery.com>
929
930 * libbfd-in.h (_bfd_link_section_stabs): Add string offset
931 parameter.
932 * cofflink.c (coff_link_add_symbols): Deal with split stab
933 sections.
934 * elflink.h (elf_link_add_object_symbols): Deal with split stab
935 sections.
936 * stabs.c (_bfd_link_section_stabs): Add string offset parameter.
937 * libbfd.h: Regenerated.
938
939 * coffcode.h (coff_set_alignment_hook): With PE_COFF reloc
940 overflow, set reloc start position to after the count
941 reloc. Subtract one from num relocs. Give error on 0xffff relocs
942 and no overflow.
943 * cofflink.c (_bfd_coff_final_link): Deal with PE_COFF reloc
944 overflow.
945 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Do overflow if >=
946 0xffff.
947
948 2003-10-06 H.J. Lu <hongjiu.lu@intel.com>
949
950 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Pad the
951 last CIE/FDE if needed.
952
953 2003-10-06 Nick Clifton <nickc@redhat.com>
954
955 * targets.c (_bfd_target_vector): Include bfd_elf64_sparc_vec if
956 BFD64 is enabled.
957
958 2003-10-06 Matt Thomas <matt@3am-software.com>
959
960 * config.bfd: Move the hppa*-*-netbsd* case to the hppa*-*-linux* case.
961
962 2003-10-06 Robert Millan <robertmh@gnu.org>
963
964 * configure.in: Match GNU/KNetBSD with new knetbsd*-gnu triplet.
965 * config.bfd: Likewise.
966 * configure: Regenerate.
967
968 2003-10-04 Christian Groessler <chris@groessler.org>
969
970 * coff-z8k.c (extra_case): Fix displacement length check for R_JR
971 and R_CALLR.
972
973 2003-10-04 Stephane Carrez <stcarrez@nerim.fr>
974
975 * elf32-m68hc1x.c: Update to ISO C90; replace PTR with void*.
976 * elf32-m68hc11.c: Likewise.
977 * elf32-m68hc12.c: Likewise.
978 * elf32-m68hc1x.h: Likewise.
979
980 2003-10-04 Stephane Carrez <stcarrez@nerim.fr>
981
982 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Fix merge
983 of flags between HC12 and HCS12.
984
985 2003-10-04 Bryce McKinlay <bryce@mckinlay.net.nz>
986
987 * merge.c (_bfd_merge_sections): Set SEC_EXCLUDE flag on sections
988 which become empty after merging.
989
990 2003-09-30 Jakub Jelinek <jakub@redhat.com>
991
992 * elfxx-ia64.c (ia64_howto_table): Fix size of R_IA64_TPREL64[LM]SB,
993 R_IA64_DTPREL{32,64}[LM]SB and R_IA64_DTPMOD64[LM]SB.
994
995 2003-09-30 Chris Demetriou <cgd@broadcom.com>
996
997 * archures.c (bfd_mach_mipsisa64r2): New define.
998 * bfd-in2.h: Regenerate.
999 * aoutx.h (NAME(aout,machine_type)): Handle bfd_mach_mipsisa64r2.
1000 * cpu-mips.c (I_mipsisa64r2): New enum value.
1001 (arch_info_struct): Add entry for I_mipsisa64r2.
1002 * elfxx-mips.c (_bfd_elf_mips_mach)
1003 (_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_64R2.
1004 (mips_set_isa_flags): Add bfd_mach_mipsisa64r2 case.
1005 (mips_mach_extensions): Add entry for bfd_mach_mipsisa64r2.
1006
1007 2003-09-29 H.J. Lu <hongjiu.lu@intel.com>
1008
1009 * elfxx-ia64.c (elfNN_hpux_backend_symbol_processing): New.
1010 Handle SHN_IA_64_ANSI_COMMON.
1011 (elf_backend_section_from_bfd_section): Defined.
1012
1013 2003-09-26 H.J. Lu <hongjiu.lu@intel.com>
1014
1015 * elflink.c (elf_link_read_relocs_from_section): Add an argument
1016 of a pointer to section. Check bad symbol index.
1017 (_bfd_elf_link_read_relocs): Modify calls to
1018 elf_link_read_relocs_from_section.
1019
1020 2003-09-23 DJ Delorie <dj@redhat.com>
1021
1022 * elf32-sh.c (sh_elf_howto_table): R_SH_SWITCH8,
1023 R_SH_GNU_VTINHERIT, R_SH_GNU_VTENTRY,
1024 R_SH_LOOP_START,R_SH_LOOP_END moved to "reserved" spaces,
1025 R_SH_DIR16, R_SH_DIR8, R_SH_DIR8UL, R_SH_DIR8UW, R_SH_DIR8U,
1026 R_SH_DIR8SW, R_SH_DIR8S, R_SH_DIR4UL, R_SH_DIR4UW, R_SH_DIR4U,
1027 R_SH_PSHA, R_SH_PSHL added.
1028 (sh_reloc_map): Add R_SH_DIR16 and R_SH_DIR8.
1029 (sh_elf_relocate_section): Support new relocs.
1030
1031 2003-09-23 Bob Wilson <bob.wilson@acm.org>
1032
1033 * elf32-xtensa.c (elf_xtensa_relocate_section): Fix typo that clobbered
1034 dynamic relocation offsets.
1035
1036 2003-09-23 Alan Modra <amodra@bigpond.net.au>
1037
1038 * simple.c (bfd_simple_get_relocated_section_contents): Free the
1039 hash table using _bfd_generic_link_hash_table_free.
1040
1041 2003-09-23 Alan Modra <amodra@bigpond.net.au>
1042
1043 * elf-bfd.h (struct bfd_elf_special_section): Remove "suffix". Change
1044 type of prefix_length and suffix_length to int. Rename "attributes"
1045 to "attr". Comment.
1046 (_bfd_elf_get_sec_type_attr): Update prototype.
1047 * elf.c (get_special_section): Rewrite.
1048 (_bfd_elf_get_sec_type_attr): Return struct rather than passing in
1049 attr and type pointers.
1050 (_bfd_elf_new_section_hook): Adjust for above.
1051 (special_sections): Merge suffix with prefix. Set
1052 prefix_length for all entries. Set suffix_length appropriately.
1053 * elf32-m32r.c (m32r_elf_special_sections): Likewise.
1054 * elf32-m68hc11.c (elf32_m68hc11_special_sections): Likewise.
1055 * elf32-m68hc12.c (elf32_m68hc12_special_sections): Likewise.
1056 * elf32-mcore.c (mcore_elf_special_sections): Likewise.
1057 * elf32-sh64.c (sh64_elf_special_sections): Likewise.
1058 * elf32-v850.c (v850_elf_special_sections): Likewise.
1059 * elf32-xtensa.c (elf_xtensa_special_sections): Likewise.
1060 * elf64-alpha.c (elf64_alpha_special_sections): Likewise.
1061 * elf64-hppa.c (elf64_hppa_special_sections): Likewise.
1062 * elf64-ppc.c (ppc64_elf_special_sections): Likewise.
1063 * elf64-sh64.c (sh64_elf64_special_sections): Likewise.
1064 * elfxx-ia64.c (elfNN_ia64_special_sections): Likewise.
1065 * elfxx-mips.c (_bfd_mips_elf_special_sections): Likewise.
1066 * elf32-ppc.c (ppc_elf_special_sections): Likewise. Fix .plt flags.
1067
1068 2003-09-21 Daniel Jacobowitz <drow@mvista.com>
1069
1070 * elf64-alpha.c (elf64_alpha_create_got_section): Initialize
1071 ->got if the section already exists.
1072
1073 2003-09-19 Nathan Sidwell <nathan@codesourcery.com>
1074
1075 * dwarf2.c (decode_line_info): Cope with an initially empty
1076 filename table.
1077
1078 2003-09-18 H.J. Lu <hongjiu.lu@intel.com>
1079
1080 * acinclude.m4: Include ../config/accross.m4.
1081 * aclocal.m4: Regenerated.
1082
1083 * configure.host (HOST_64BIT_TYPE): Remove if it is set to long
1084 or long long.
1085 (HOST_U_64BIT_TYPE): Remove if it is set to unsigned long long.
1086 (host64): Remove if HOST_64BIT_TYPE is set to long.
1087
1088 * configure.in (HOST_64BIT_TYPE): Set according to the size of
1089 long and long long.
1090 (HOST_U_64BIT_TYPE): Likewise.
1091 (host64): Likewise.
1092 * configure: Regenerated.
1093
1094 2003-09-19 Alan Modra <amodra@bigpond.net.au>
1095
1096 * elf.c (elfcore_write_note): Don't use sizeof(Elf_External_note)
1097 since some ABIs round up the size of the struct.
1098
1099 2003-09-18 H.J. Lu <hongjiu.lu@intel.com>
1100
1101 * elflink.c (_bfd_elf_merge_symbol): Allow type change if
1102 the old symbol is undefined and the new symbol is defined.
1103
1104 2003-09-18 Andreas Schwab <schwab@suse.de>
1105
1106 * simple.c (bfd_simple_get_relocated_section_contents): Use
1107 _bfd_generic_link_hash_table_create instead of
1108 bfd_link_hash_table_create.
1109
1110 2003-09-10 H.J. Lu <hongjiu.lu@intel.com>
1111
1112 * elfxx-ia64.c (elfNN_ia64_special_sections): Mark all sections
1113 started with ".sbss" or "".sdata" as SHF_IA_64_SHORT.
1114
1115 2003-09-10 John David Anglin <dave.anglin@nrc-cnrc.nrc.ca>
1116 Randolph Chung <randolph@tausq.org>
1117
1118 * elf32-hppa.c (struct elf32_hppa_link_hash_entry,
1119 hppa_link_hash_newfunc, hppa_build_one_stub,
1120 elf32_hppa_adjust_dynamic_symbol, mark_PIC_calls, allocate_plt_static,
1121 allocate_dynrelocs, elf32_hppa_size_dynamic_sections,
1122 elf32_hppa_finish_dynamic_symbol): Remove pic_call field and all code
1123 for generating import stubs for calls to statically linked PIC
1124 functions.
1125 (hppa_type_of_stub): Don't generate an import stub for calls to
1126 statically linked pic functions. Generate import stubs for calls
1127 in a shared object, to functions not in a regular file, and to
1128 defined weak functions. Add new argument INFO.
1129 (hppa_build_one_stub): Don't undef ADDIL_DP.
1130 (elf32_hppa_check_relocs): Don't set SEC_HAS_GOT_REF flag.
1131 (elf32_hppa_size_stubs): Pass info to hppa_type_of_stub.
1132 (final_link_relocate): Change all DLTIND relocs to DPREL relocs in a
1133 non-shared link. Convert instructions that use the the linkage table
1134 pointer, or a facsimile thereof, to use the global data pointer when
1135 the reloc has been changed.
1136
1137 2003-09-08 Joel Brobecker <brobecker@gnat.com>
1138
1139 * archures.c: Add new machine names for hppa.
1140 * bfd-in2.h: Regenerate.
1141 * cpu-hppa.c: Use the new machine names.
1142
1143 2003-09-06 Stephane Carrez <stcarrez@nerim.fr>
1144
1145 * elf32-m68hc1x.h (struct m68hc11_elf_link_hash_table): Remove
1146 all_local_syms member.
1147 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Use bfd_elf_get_elf_syms
1148 to get the local symbols.
1149
1150 2003-09-06 Stephane Carrez <stcarrez@nerim.fr>
1151
1152 * elf32-m68hc12.c (elf32_m68hc12_special_sections): New for hc11.
1153 (elf_backend_special_sections): Define.a
1154
1155 PR savannah/4950:
1156 * elf32-m68hc11.c (elf32_m68hc11_special_sections): The .vectors
1157 section is read-only.
1158
1159 2003-09-04 Nick Clifton <nickc@redhat.com>
1160
1161 * archures.c (bfd_mach_v850e1): Define.
1162 * bfd-in2.h: Regenerate.
1163 * cpu-v850.h (scan): Accept bfd_mach_v850e1.
1164 (arch_info_struct): Include an entry for bfd_mach_v850e1.
1165 * elf32-v850.c (v850_elf_object_p): Accept E_V850E1_ARCH flag.
1166 (v850_elf_final_write_processing): Accept bfd_mach_v850e1.
1167 (v850_elf_print_private_bfd_data): Interpret E_V850E1_ARCH flag.
1168 (v850_elf_merge_private_bfd_data): Allow v850e1 binaries to be
1169 linked with v850e binaries. Mark the output as v850e.
1170
1171 2003-09-03 Nick Clifton <nickc@redhat.com>
1172
1173 * cofflink.c (_bfd_coff_link_input_bfd): Do not skip section
1174 symbols that are used in relocs.
1175
1176 2003-08-30 Robert Millan <robertmh@gnu.org>
1177
1178 * configure.in: Match GNU/KFreeBSD with new kfreebsd*-gnu triplet.
1179 * config.bfd: Likewise.
1180 * configure: Regenerate.
1181
1182 2003-08-31 Christian Groessler <chris@groessler.org>
1183
1184 * elf32-i860.c (i860_howto_pc26_reloc): Finish relocation here
1185 instead of returning bfd_reloc_continue.
1186
1187 2003-08-31 Andreas Jaeger <aj@suse.de>
1188
1189 * merge.c: Update to ISO C90.
1190
1191 2003-08-27 Ian Lance Taylor <ian@airs.com>
1192
1193 * configure.in: Check for strtoull.
1194 * bfd.c (bfd_scan_vma): Use strtoull when available.
1195 * configure, config.in: Regenerate.
1196
1197 * configure.in: Define and substitute BFD_HOST_LONG_LONG.
1198 * bfd-in.h: Define BFD_HOST_LONG_LONG. Test it rather than
1199 __GNUC__ when deciding whether to use long long for
1200 BFD_HOST_64_BIT.
1201 * configure, Makefile.in, doc/Makefile.in, bfd-in2.h: Regenerate.
1202
1203 2003-08-27 Christian Groessler <chris@groessler.org>
1204
1205 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc,
1206 i860_howto_splitn_reloc, i860_howto_highadj_reloc): New
1207 functions.
1208 (elf32_i860_howto_table): Insert the new functions as
1209 'special_function's in the proper reloc type entries.
1210
1211 2003-08-27 Richard Sandiford <rsandifo@redhat.com>
1212
1213 * elf32-frv.c (elf32_frv_relocate_section): Use
1214 _bfd_elf_rela_local_sym.
1215
1216 2003-08-26 Michael Snyder <msnyder@redhat.com>
1217
1218 * cpu-frv.c: Remove unused enum.
1219
1220 2003-08-25 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
1221
1222 * reloc.c: Fix documentation for MIPS ELF relocations.
1223 libbfd.h: Regenerate.
1224 bfd-in2.h: Regenerate.
1225
1226 2003-08-24 Jason Eckhardt <jle@rice.edu>
1227
1228 * coff-i860.c (CALC_ADDEND): Define to be a no-op.
1229
1230 2003-08-24 Jason Eckhardt <jle@rice.edu>
1231
1232 * elf32-i860.c (elf32_i860_relocate_pc16): Subtract 4 and
1233 shift by 2 before storing the relocated value.
1234
1235 2003-08-23 Jason Eckhardt <jle@rice.edu>
1236
1237 * coff-i860.c (coff_i860_reloc_nyi): New function.
1238 (howto_table): Add entries for relocations PAIR, HIGHADJ, HIGH,
1239 LOWn, SPLITn, and BRADDR.
1240 (RTYPE2HOWTO): Check that the r_type is within the howto_table
1241 before trying to access the entry.
1242 (coff_i860_rtype_to_howto): Likewise.
1243 (coff_i860_reloc_type_lookup): New function.
1244 (i860_reloc_processing): New function.
1245 (coff_bfd_reloc_type_lookup): Define macro.
1246 (RELOC_PROCESSING): Define macro.
1247 Minor formatting adjustments.
1248
1249 2003-08-23 Alan Modra <amodra@bigpond.net.au>
1250
1251 * elflink.h (elf_link_add_object_symbols): Don't crash on NULL owner.
1252
1253 2003-08-22 H.J. Lu <hongjiu.lu@intel.com>
1254
1255 * elfxx-ia64.c (elfNN_ia64_create_dynamic_sections): Align the
1256 .got section at 8 bytes.
1257
1258 2003-08-21 Nick Clifton <nickc@redhat.com>
1259
1260 * cofflink.c: Update to ISO C90 and tidy up formatting.
1261
1262 2003-08-21 Randolph Chung <tausq@debian.org>
1263
1264 * elf32-hppa.c (elf32_hppa_object_p): For elf32-hppa-linux, objects
1265 can have OSABI=Linux or OSABI=SysV. Check for both.
1266 * elf64-hppa.c (elf64_hppa_object_p): Likewise.
1267
1268 2003-08-21 Nick Clifton <nickc@redhat.com>
1269
1270 * po/sv.po: Updated Swedish translation.
1271
1272 2003-08-20 Richard Sandiford <rsandifo@redhat.com>
1273
1274 * elf64-mips.c (elf_backend_copy_indirect_symbol): Define.
1275
1276 2003-08-20 Nick Clifton <nickc@redhat.com>
1277
1278 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): New macro used to
1279 replace some duplicated code in most elfxx-xxxx.c files. This
1280 version uses the new fields in bfd_link_info.
1281
1282 * elf-m10300.c (mn10300_elf_relocate_section): Use new macro.
1283 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
1284 * elf32-cris.c (cris_elf_relocate_section): Likewise.
1285 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
1286 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1287 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
1288 * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
1289 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1290 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1291 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1292 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1293 * elf32-vax.c (elf_vax_relocate_section): Likewise.
1294 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
1295 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
1296 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1297 * elf64-s390.c (elf_s390_relocate_section): Likewise.
1298 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1299 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1300 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
1301
1302 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols,
1303 elf_hppa_remark_useless_dynamic_symbols,
1304 elf_hppa_relocate_section): Use the new fields in
1305 bfd_link_info structure.
1306 * elf32-sh.c (sh_elf_relocate_section): Likewise.
1307 * elf64-alpha.c (elf64_alpha_check_relocs): Likewise.
1308 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
1309 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
1310 * elfxx-ia64.c (elfNN_ia64_check_relocs): Likewise.
1311 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
1312
1313 * elflink.h (elf_link_output_extsym): Fix test for reporting
1314 undefined symbols in shared libraries. Remove redundant test
1315 of shlib_undefined when reporting references to forced local
1316 symbols.
1317
1318 2003-08-18 Andreas Schwab <schwab@suse.de>
1319
1320 * libpei.h (bfd_pe_executable_p): Also recognize efi-app
1321 executables.
1322
1323 2003-08-17 Hans-Peter Nilsson <hp@bitrange.com>
1324
1325 * simple.c (bfd_simple_get_relocated_section_contents): Move
1326 reloc_done hack to before first bfd_section_size call. Change all
1327 returns to use new wrapper macro RETURN, restoring sec->reloc_done.
1328
1329 2003-08-16 Alan Modra <amodra@bigpond.net.au>
1330
1331 * elf64-ppc.c: Don't include elf/ppc.h.
1332
1333 2003-08-14 Richard Sandiford <rsandifo@redhat.com>
1334
1335 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Fix PT_DYNAMIC
1336 code to work with 64-bit bfds.
1337
1338 2003-08-14 Alan Modra <amodra@bigpond.net.au>
1339
1340 * dep-in.sed: Remove libintl.h.
1341 * Makefile.am (SRC-POTFILES.in, BLD-POTFILES.in): Unset LC_COLLATE.
1342 (POTFILES.in): Remove target.
1343 * Makefile.in: Regenerate.
1344
1345 2003-08-12 Alan Modra <amodra@bigpond.net.au>
1346
1347 * elf64-ppc.c (ppc64_elf_next_input_section): Update comment.
1348 (ppc64_elf_relocate_section): For zero sym R_PPC64_TOC relocs,
1349 use the function sym from the previous reloc.
1350
1351 2003-08-11 Jakub Jelinek <jakub@redhat.com>
1352
1353 * elf32-i386.c (elf_i386_relocate_section): Make undefined symbols
1354 fatal if -pie.
1355 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1356 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1357 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
1358 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1359 * elf64-s390.c (elf_s390_relocate_section): Likewise.
1360 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1361 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1362 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
1363 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1364 (ppc_elf_relocate_section) <case R_PPC_RELAX32>: Issue fatal error
1365 on undefined symbols if -pie.
1366 * elf32-sh.c (sh_elf_relocate_section): Likewise.
1367
1368 2003-08-11 Alan Modra <amodra@bigpond.net.au>
1369
1370 * elf64-ppc.c (ppc64_elf_relocate_section): Add special case for crt1.o
1371 branch to __libc_start_main.
1372
1373 2003-08-08 Dmitry Diky <diwil@mail.ru>
1374
1375 * archures.c: Add xW42 and xE42 parts. Sort MPU list according to
1376 gcc order.
1377 * cpu-msp430.c: Likewise.
1378 * elf32-msp430.c: Likewise.
1379 * bfd-in2.h: Regenerate.
1380
1381 2003-08-07 Alan Modra <amodra@bigpond.net.au>
1382
1383 * elfxx-target.h: Remove PTR cast.
1384 * targets.c (bfd_target): Make backend_data const void *.
1385 * elf-bfd.h: Constify all occurrences of struct elf_backend_data.
1386 * elf-m10300.c: Likewise.
1387 * elf.c: Likewise.
1388 * elf32-hppa.c: Likewise.
1389 * elf32-i386.c: Likewise.
1390 * elf32-m68hc1x.c: Likewise.
1391 * elf32-ppc.c: Likewise.
1392 * elf32-s390.c: Likewise.
1393 * elf32-sh.c: Likewise.
1394 * elf32-sh64.c: Likewise.
1395 * elf32-sparc.c: Likewise.
1396 * elf32-xtensa.c: Likewise.
1397 * elf64-mips.c: Likewise.
1398 * elf64-ppc.c: Likewise.
1399 * elf64-s390.c: Likewise.
1400 * elf64-sh64.c: Likewise.
1401 * elf64-sparc.c: Likewise.
1402 * elf64-x86-64.c: Likewise.
1403 * elfcode.h: Likewise.
1404 * elfcore.h: Likewise.
1405 * elflink.c: Likewise.
1406 * elflink.h: Likewise.
1407 * elfxx-ia64.c: Likewise.
1408 * elfxx-mips.c: Likewise.
1409 * elfxx-mips.h: Likewise.
1410 * elf.c (prep_headers): Remove useless check for null backend_data.
1411 * bfd-in2.h: Regenerate.
1412
1413 * elf-bfd.h: Remove PARAMS macro. Replace PTR with void *.
1414 (NAME): Use ## rather than CONCAT4 macro.
1415 * elfcode.h: Remove one remaining PARAMS macro.
1416 * elf-eh-frame.c: Convert to C90, remove unneeded casts and prototypes.
1417 * elf-strtab.c: Likewise.
1418 * elf-hppa.h: Likewise.
1419 * elf32-hppa.h: Likewise.
1420 * elf32-hppa.c: Likewise.
1421 (elf32_hppa_add_symbol_hook): Delete.
1422 (elf_backend_add_symbol_hook): Don't define.
1423 * libhppa.h: Convert to C90. Replace INLINE with inline.
1424
1425 2003-08-06 Alan Modra <amodra@bigpond.net.au>
1426
1427 * elf64-ppc.c (ppc_stub_name): Tweak names for better readability.
1428 (ppc64_elf_adjust_dynamic_symbol): Allow copy relocs against
1429 function descriptors, but warn.
1430 (ppc_build_one_stub): Remove a couple of vars. Move code creating
1431 stub syms so that we can avoid a stub sym if we already have a
1432 plt sym. Do not redefine an existing symbol.
1433 (ppc64_elf_build_stubs): When --emit-stub-syms, print a symbol for
1434 glink.
1435
1436 2003-08-06 Nick Clifton <nickc@redhat.com>
1437
1438 * po/fr.po: Updated French translation.
1439
1440 2003-08-06 Alan Modra <amodra@bigpond.net.au>
1441
1442 * elflink.c (_bfd_elf_create_dynamic_sections): Mark .dynbss with
1443 SEC_LINKER_CREATED.
1444
1445 2003-08-05 Daniel Jacobowitz <drow@mvista.com>
1446
1447 * elf32-arm.h (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
1448 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Use it.
1449
1450 2003-08-03 Jeff Muizelaar <muizelaar@rogers.com>
1451
1452 * coffcode.h (coff_slurp_line_table): Return with a warning
1453 message if the line number table could not be read.
1454
1455 2003-08-04 Nick Clifton <nickc@redhat.com>
1456
1457 * elflink.h (elf_link_add_object_symbols): Prepend "warning: "
1458 to messages produced for .gnu.warning.SYMBOL sections.
1459
1460 2003-08-04 Alan Modra <amodra@bigpond.net.au>
1461
1462 * elfcode.h: Convert to C90, remove unneeded casts and prototypes.
1463 * elfcore.h: Likewise.
1464 * elflink.c: Likewise.
1465 * elflink.h: Likewise.
1466 * elf.c (sym_is_global): Remove INLINE.
1467 (align_file_position): Replace INLINE with inline.
1468 * elfcode.h (elf_swap_dyn_in, elf_swap_dyn_out): Remove INLINE.
1469 (elf_file_p): Replace INLINE with inline.
1470
1471 2003-08-02 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1472
1473 * elf32-sh.c (sh_elf_check_relocs): Don't set DF_TEXTREL here.
1474
1475 2003-08-01 H.J. Lu <hongjiu.lu@intel.com>
1476
1477 * elfxx-ia64.c (get_got): Align the .got section at 8 bytes.
1478
1479 2003-08-01 H.J. Lu <hongjiu.lu@intel.com>
1480
1481 * elfxx-ia64.c (elfNN_ia64_finish_dynamic_symbol): Use
1482 ElfNN_External_Rela instead of Elf64_External_Rela.
1483
1484 2003-08-01 Nick Clifton <nickc@redhat.com>
1485
1486 * config.bfd: Add code to catch obsolete configurations and warn
1487 about them unless --enable-obsolete is used. Use this to mark
1488 vax-vms port as obsolete.
1489
1490 2003-07-30 Alan Modra <amodra@bigpond.net.au>
1491
1492 * elf32-ppc.c (ppc_elf_install_value): Tidy.
1493 (ppc_elf_relax_section): Remove dead code. Remove unnecessary casts.
1494 Formatting.
1495 * elfxx-target.h: Remove PARAMS macro. Formatting.
1496
1497 2003-07-30 Alan Modra <amodra@bigpond.net.au>
1498
1499 * elf.c (bfd_section_from_r_symndx): Test for SHN_UNDEF.
1500 * elf64-ppc.c (get_fdh): New function, split out from
1501 ppc64_elf_edit_opd.
1502 (ppc64_elf_check_relocs): Use get_fdh.
1503 (func_desc_adjust): Likewise. Tidy.
1504 (ppc64_elf_edit_opd): Tighten reloc checks. Free local_syms on error
1505 exit. Use get_fdh. Account for superfluous dynamic relocs.
1506 (ppc64_elf_relocate_section): Warning fix.
1507
1508 2003-07-30 Jason Eckhardt <jle@rice.edu>
1509
1510 * coff-i860.c: Convert to ISO C90. Remove superflous prototypes.
1511
1512 2003-07-30 Jason Eckhardt <jle@rice.edu>
1513
1514 * elf32-i860.c: Convert to ISO C90. Remove superflous prototypes.
1515
1516 2003-07-30 Randolph Chung <tausq@debian.org>
1517
1518 * elf-hppa.h (elf_hppa_relocate_section): Look up dyn_h for undefweak.
1519 * elf64-hppa.c (elf64_hppa_finalize_dlt): Check h->root.type.
1520
1521 2003-07-30 Alan Modra <amodra@bigpond.net.au>
1522
1523 * elf.c: Convert to C90, remove unnecessary prototypes and casts.
1524 Replace PTR with void *. Formatting.
1525 (_bfd_elf_assign_file_position_for_section): Remove INLINE.
1526 (make_mapping): Likewise.
1527
1528 2003-07-29 Alan Modra <amodra@bigpond.net.au>
1529
1530 * elf64-ppc.c (func_desc_adjust): Give linker created function
1531 descriptor symbols a size and type.
1532 (ppc64_elf_relocate_section): Correct lq insn test.
1533
1534 2003-07-28 Eric Christopher <echristo@redhat.com>
1535
1536 * elf32-ppc.c (R_PPC_RELAX32): New relocation.
1537 (ppc_elf_install_value): New function.
1538 (ppc_elf_sort_rela): Remove.
1539 (ppc_elf_relax_section): Rewrite. Remove old relaxation
1540 and replace with out of range branch stubs.
1541 (ppc_elf_relocate_section): Handle R_PPC_RELAX32.
1542
1543 2003-07-29 Alexandre Oliva <aoliva@redhat.com>
1544
1545 * elf-m10300.c (mn10300_elf_relax_section): Take symbol hash table
1546 from input_bfd.
1547
1548 2003-07-28 Alan Modra <amodra@bigpond.net.au>
1549
1550 * elf.c (special_sections): Set attributes for .got and .plt.
1551
1552 2003-07-27 Alan Modra <amodra@bigpond.net.au>
1553
1554 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Ensure no copy relocs
1555 on function descriptors.
1556 (ELIMINATE_COPY_RELOCS): Expand comment.
1557 (ppc64_elf_special_sections): Move. Don't include non-ppc64 sections.
1558 Do include ".toc1".
1559
1560 2003-07-25 H.J. Lu <hongjiu.lu@intel.com>
1561
1562 * elf.c (_bfd_elf_new_section_hook): Set the default section
1563 type to SHT_NULL.
1564 (elf_fake_sections): Set the section type based on asect->flags
1565 if it is SHT_NULL. Don't abort on processor specific section
1566 types.
1567
1568 2003-07-25 H.J. Lu <hongjiu.lu@intel.com>
1569
1570 * bfd-in2.h: Regenerated.
1571
1572 2003-07-25 H.J. Lu <hongjiu.lu@intel.com>
1573
1574 * elf-bfd.h (bfd_elf_special_section): New.
1575 (elf_backend_data): Add special_sections, a pointer to
1576 bfd_elf_special_section.
1577 (elf_section_type). New.
1578 (elf_section_flags): New.
1579 (_bfd_elf_get_sec_type_attr): New.
1580
1581 * elf.c (_bfd_elf_make_section_from_shdr): Always use the
1582 real section type/flags.
1583 (special_sections): New.
1584 (get_special_section): New.
1585 (_bfd_elf_get_sec_type_attr): New.
1586 (_bfd_elf_new_section_hook): Check special_section to set
1587 elf_section_type and elf_section_flags.
1588 (elf_fake_sections): Don't use section name to set ELF section
1589 data.
1590
1591 * elf32-m32r.c (m32r_elf_special_sections): New.
1592 (elf_backend_special_sections): Defined.
1593
1594 * elf32-m68hc11.c (elf32_m68hc11_special_sections): New.
1595 (elf_backend_special_sections): Defined.
1596
1597 * elf32-mcore.c (mcore_elf_special_sections): New.
1598 (elf_backend_special_sections): Defined.
1599
1600 * elf32-ppc.c (ppc_elf_special_sections): New.
1601 (elf_backend_special_sections): Defined.
1602
1603 * elf32-sh64.c (sh64_elf_special_sections): New.
1604 (elf_backend_special_sections): Defined.
1605
1606 * elf32-v850.c (v850_elf_special_sections): New.
1607 (elf_backend_special_sections): Defined.
1608
1609 * elf32-xtensa.c (elf_xtensa_special_sections): New.
1610 (elf_backend_special_sections): Defined.
1611
1612 * elf64-alpha.c (elf64_alpha_special_sections): New.
1613 (elf_backend_special_sections): Defined.
1614
1615 * elf64-hppa.c (elf64_hppa_special_sections): New.
1616 (elf_backend_special_sections): Defined.
1617
1618 * elf64-ppc.c (ppc64_elf_special_sections): New.
1619 (elf_backend_special_sections): Defined.
1620
1621 * elf64-sh64.c (sh64_elf64_special_sections): New.
1622 (elf_backend_special_sections): Defined.
1623
1624 * elfxx-ia64.c (elfNN_ia64_special_sections): New.
1625 (elf_backend_special_sections): Defined.
1626
1627 * elfxx-mips.c (_bfd_mips_elf_special_sections): New.
1628
1629 * elfxx-mips.h (_bfd_mips_elf_special_sections): New.
1630 (elf_backend_special_sections): Defined.
1631
1632 * elfxx-target.h (elf_backend_special_sections): New. Default
1633 to NULL.
1634 (elfNN_bed): Initialize special_sections.
1635
1636 * section.c (bfd_abs_section): Remove const.
1637 (bfd_und_section): Likewise.
1638 (bfd_com_section): Likewise.
1639 (bfd_ind_section): Likewise.
1640
1641 2003-07-24 Nick Clifton <nickc@redhat.com>
1642
1643 * coff-arm.c (EXTRA_S_FLAGS): Include SEC_CODE so that code
1644 sections are assigned the LOAD attribute.
1645
1646 2003-07-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1647
1648 * elf32-sh.c: Convert to C90. Replace PTR with void *.
1649 * elf32-sh64-com.c: Likewise.
1650 * elf32-sh64.c: Likewise.
1651 * elf32-sh64.h: Likewise.
1652 * elf64-sh64.c: Likewise.
1653
1654 2003-07-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1655
1656 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
1657 (allocate_dynrelocs): Likewise.
1658 (sh_elf_relocate_section): Likewise. Use SYMBOL_REFERENCES_LOCAL.
1659 (sh_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
1660
1661 2003-07-24 Nick Clifton <nickc@redhat.com>
1662
1663 * po/fr.po: Updated French translation.
1664
1665 2003-07-23 Bob Wilson <bob.wilson@acm.org>
1666
1667 * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Make inline and move
1668 near the beginning of the file. Swap order of arguments. Call
1669 _bfd_elf_dynamic_symbol_p with "ignore_protected" set to 0.
1670 (elf_xtensa_fix_refcounts): Adjust xtensa_elf_dynamic_symbol_p call.
1671 (elf_xtensa_relocate_section): Likewise.
1672 (shrink_dynamic_reloc_sections): Likewise.
1673
1674 2003-07-23 Bob Wilson <bob.wilson@acm.org>
1675
1676 * elf32-xtensa.c (plt_reloc_count): Fix typo in comment.
1677 (elf_xtensa_size_dynamic_sections): Use elf_discarded_section.
1678 (elf_xtensa_combine_prop_entries): Avoid returning non-zero without
1679 first printing an error message.
1680 (elf_xtensa_finish_dynamic_sections): Likewise.
1681 (elf_xtensa_discard_info_for_section): Adjust size of .got.loc when
1682 discarding literal table entries.
1683 (elf_xtensa_merge_private_bfd_data): Remove newline from error message.
1684 (elf_xtensa_do_asm_simplify): Likewise.
1685
1686 2003-07-23 Stephane Carrez <stcarrez@nerim.fr>
1687
1688 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Avoid crash when
1689 we have a local symbol in common section.
1690
1691 2003-07-22 H.J. Lu <hongjiu.lu@intel.com>
1692
1693 * elflink.c (_bfd_elf_dynamic_symbol_p): Don't return TRUE for
1694 weak symbols.
1695
1696 2003-07-22 Nick Clifton <nickc@redhat.com>
1697
1698 * coffcode.h (coff_slurp_symbol_table): Add C_TCSYM and C_ECOML to
1699 expected RS6000 storage classes.
1700
1701 2003-07-21 H.J. Lu <hongjiu.lu@intel.com>
1702
1703 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Mark
1704 output_bfd unused to silence gcc.
1705
1706 2003-07-21 Nick Clifton <nickc@redhat.com>
1707
1708 * po/sv.po: Updated Swedish translation.
1709
1710 2003-07-21 Alan Modra <amodra@bigpond.net.au>
1711
1712 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Use..
1713 (_bfd_elf_symbol_refs_local_p): ..this. Declare.
1714 * elflink.c (_bfd_elf_symbol_refs_local_p): New function.
1715 * elf32-i386.c (elf_i386_relocate_section): Remove h NULL test
1716 now done in _bfd_elf_symbol_refs_local_p.
1717 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1718 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1719 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1720
1721 2003-07-18 H.J. Lu <hongjiu.lu@intel.com>
1722
1723 * elflink.c (_bfd_elf_dynamic_symbol_p): Undo the last change.
1724
1725 2003-07-18 H.J. Lu <hongjiu.lu@intel.com>
1726
1727 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL): Fix a typo.
1728 (SYMBOL_CALLS_LOCAL): Likewise.
1729
1730 * elflink.c (_bfd_elf_dynamic_symbol_p): Return TRUE
1731 immediately if symbol isn't defined locally.
1732
1733 2003-07-18 Richard Henderson <rth@redhat.com>
1734
1735 * elflink.c (_bfd_elf_dynamic_symbol_p): New.
1736 * elf-bfd.h (_bfd_elf_dynamic_symbol_p): Declare it.
1737 (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Use it.
1738 * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Likewise.
1739 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
1740 * elf64-hppa.c (elf64_hppa_dynamic_symbol_p): Likewise.
1741 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Likewise.
1742 Update all callers to provide the relocation being resolved.
1743
1744 2003-07-17 Shaun Jackman <sjackman@pathwayconnect.com>
1745
1746 * config.bfd (arm-wince-pe): Add -DARM_COFF_BUGFIX to
1747 targ_cflags.
1748
1749 2003-07-17 Nick Clifton <nickc@redhat.com>
1750
1751 * po/es.po: New Spanish translation.
1752 * po/sv.po: New Swedish translation.
1753 * po/opcodes.pot: Regenerate.
1754
1755 2003-07-16 Richard Henderson <rth@redhat.com>
1756
1757 * config.bfd, configure.host, configure.in: Remove ia64-aix support.
1758 * elfxx-ia64.c, targets.c: Likewise.
1759
1760 2003-07-16 Richard Henderson <rth@redhat.com>
1761
1762 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Properly return false
1763 for symbols defined locally plus -Bsymbolic. Tidy logic.
1764
1765 2003-07-15 Richard Sandiford <rsandifo@redhat.com>
1766
1767 * archures.c (bfd_mach_mips7000): New.
1768 * bfd-in2.h: Regenerated.
1769 * cpu-mips.c (arch_info_struct): Add an entry for mips:7000.
1770 * elfxx-mips.c (mips_set_isa_flags): Handle bfd_mach_mips7000.
1771 (mips_mach_extensions): Add an entry for it.
1772
1773 2003-07-14 Nick Clifton <nickc@redhat.com>
1774
1775 * po/tr.po: Update with latest version.
1776 * po/SRC-POTFILES.in: Regenerate.
1777 * po/bfd.pot: Regenerate.
1778 * Makfile.in: Regenerate.
1779 * configure: Regenerate.
1780
1781 2003-07-12 Jeff Baker <jbaker@qnx.com>
1782
1783 * bfd/config.bfd (__QNXTARGET__): Define for Neutrino architectures.
1784 * bfd/elf32-arm.h (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1785 * bfd/elf32-sh.c (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1786 * bfd/elf32-ppc.c (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1787
1788 2003-07-12 Jeff Muizelaar <muizelaar@rogers.com>
1789
1790 * coffcode.h (coff_set_section_contents): Set the
1791 IMAGE_FILE_32BIT_MACHINE flag for PE targets.
1792
1793 2003-07-11 Richard Sandiford <rsandifo@redhat.com>
1794
1795 * bfd-in.h (bfd_h8300_pad_address): Declare.
1796 * bfd-in2.h: Regenerate.
1797 * cpu-h8300.c (bfd_h8300_pad_address): New function.
1798 * coff-h8300.c (h8300_reloc16_estimate): Use it to canonicalize
1799 addresses before checking whether they can be relaxed.
1800 (h8300_reloc16_extra_cases): Likewise for the R_MOVL2 sanity check.
1801 Don't complain about overflows in general 8-bit relocations.
1802 * elf32-h8300.c (elf32_h8_relax_section): Use bfd_h8300_pad_address.
1803 Fix handling of R_H8_DIR24A8.
1804
1805 2003-07-11 Richard Sandiford <rsandifo@redhat.com>
1806
1807 * elf32-h8300.c: Convert function prototypes and definitions
1808 to C90 syntax.
1809 * coff-h8300.c: Likewise.
1810 * cpu-h8300.c: Likewise.
1811
1812 2003-07-11 Alan Modra <amodra@bigpond.net.au>
1813
1814 * po/SRC-POTFILES.in: Regenerate.
1815 * po/bfd.pot: Likewise.
1816
1817 2003-07-10 Bob Wilson <bob.wilson@acm.org>
1818
1819 * elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Create new
1820 .got.loc section. Do not set SEC_ALLOC or SEC_LOAD flags for the
1821 .xt.lit.plt section.
1822 (elf_xtensa_size_dynamic_sections): Set size of the .got.loc section
1823 and allocate memory for it.
1824 (elf_xtensa_combine_prop_entries): Copy contents of .xt.lit output
1825 section to the .got.loc section.
1826 (elf_xtensa_finish_dynamic_sections): Fix up call to
1827 elf_xtensa_combine_prop_entries and set DT_XTENSA_GOT_LOC_OFF to
1828 the address of .got.loc.
1829 (relax_property_section): Shrink .got.loc to match changes in any
1830 literal table section.
1831 (xtensa_is_property_section): Change to match
1832 xtensa_get_property_section_name.
1833 (xtensa_is_littable_section): New.
1834
1835 2003-07-10 H.J. Lu <hongjiu.lu@intel.com>
1836
1837 * elfxx-ia64.c (IA64_HOWTO): Set dst_mask to -1 instead of
1838 -1LL.
1839
1840 2003-07-10 Alan Modra <amodra@bigpond.net.au>
1841
1842 * Makefile.am (BFD32_BACKENDS): Add elf32-am33lin.lo.
1843 (BFD32_BACKENDS_CFILES): elf32-am33lin.c not elf32-am33lin.lo.
1844 Run "make dep-am".
1845 * Makefile.in: Regenerate.
1846
1847 2003-07-10 Alexandre Oliva <aoliva@redhat.com>
1848
1849 2001-09-12 Alexandre Oliva <aoliva@redhat.com>
1850 * elf32-am33lin.c (ELF_MACHINE_CODE): Redefine to EM_MN10300.
1851 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10300.
1852 2001-06-02 Nick Clifton <nickc@cambridge.redhat.com>
1853 * elf32-am33lin.c: Rename global functions.
1854 2001-05-09 Alexandre Oliva <aoliva@redhat.com>
1855 * config.bfd (am33_2.0, am33_2.0-*-linux*): Added.
1856 * configure.in (bfd_elf32_am33lin_vec): Added.
1857 * Makefile.am (BFD32_BACKENDS): Added elf32-am33lin.lo.
1858 (elf32-am33lin.lo): List dependencies.
1859 * aclocal.m4, configure, Makefile.in: Rebuilt.
1860 * elf-m10300.c (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME,
1861 ELF_ARCH, ELF_MACHINE_CODE, ELF_MAXPAGESIZE): Define only if
1862 ELF_ARCH was not defined before.
1863 (elf_symbol_leading_char): Define if not defined.
1864 * elf32-am33lin.c: Override the definitions above.
1865 * targets.c (bfd_elf32_am33lin_vec): New.
1866
1867 2003-07-09 Alexandre Oliva <aoliva@redhat.com>
1868
1869 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
1870 * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Initialize
1871 pcrel_relocs_copied.
1872 2001-12-13 Alexandre Oliva <aoliva@redhat.com>
1873 * elf-m10300.c (ELF_DYNAMIC_INTERPRETER): Renamed from
1874 ld-linux.so.2 to ld.so.1.
1875 2001-10-10 Alexandre Oliva <aoliva@redhat.com>
1876 * elf-m10300.c (elf_mn10300_sizeof_plt0): New macro.
1877 (_bfd_mn10300_elf_adjust_dynamic_symbol): Use it.
1878 (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
1879 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Allocate
1880 .rela.* section contents with bfd_zalloc.
1881 2001-09-25 Alexandre Oliva <aoliva@redhat.com>
1882 * elf-m10300.c: Added declarations for functions missing them.
1883 Merge some shared-library changes from the i386 back-end. Use
1884 R_MN10300_RELATIVE instead of R_MN10300_PCREL32 and
1885 R_MN10300_GLOB_DAT instead of R_MN10300_32 where appropriate.
1886 (struct elf32_mn10300_link_hash_entry): Remove duplicates of
1887 members of elf_link_hash_entry. Adjusted references.
1888 (mn10300_elf_final_link_relocate): dynobj was already loaded
1889 into a local variable, use it.
1890 2001-09-21 Nick Clifton <nickc@cambridge.redhat.com>
1891 * elf-m10300.c: Add missing function prototypes.
1892 2001-08-24 Alexandre Oliva <aoliva@redhat.com>
1893 * elf-m10300.c (mn10300_elf_relocate_section): Don't compute
1894 relocation for dynamic relocations.
1895 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
1896 * reloc.c (BFD_RELOC_MN10300_GOTOFF24): New.
1897 * elf-m10300.c: Introduce GOTPC16, GOTOFF24, GOTOFF16 and
1898 PLT16, and rename GOTPC to GOTPC32 and GOTOFF to GOTOFF32.
1899 (_bfd_mn10300_elf_create_dynamic_sections): Move creation ot PLT...
1900 (_bfd_mn10300_elf_create_got_section): ... here, so that its
1901 adress is already known at the time we compute relaxations.
1902 (mn10300_elf_relax_section): Relax GOTPC32, GOTOFF32, GOT32
1903 and PLT32 to narrower relocations.
1904 * libbfd.h, bfd-in2.h: Rebuilt.
1905 2001-04-12 Alexandre Oliva <aoliva@redhat.com>
1906 * reloc.c (BFD_RELOC_MN10300_GOT32, BFD_RELOC_MN10300_GOT24,
1907 BFD_RELOC_MN10300_GOT16, BFD_RELOC_MN10300_COPY,
1908 BFD_RELOC_MN10300_GLOB_DAT, BFD_RELOC_MN10300_JMP_SLOT,
1909 BFD_RELOC_MN10300_RELATIVE): New relocs.
1910 * libbfd.h, bfd-in2.h: Rebuilt.
1911 * elf-m10300.c (struct elf_mn10300_pcrel_relocs_copied): New.
1912 (struct elf32_mn10300_link_hash_entry): Added DSO-related
1913 fields.
1914 (elf_mn10300_howto): Defined new relocation types.
1915 (mn10300_reloc_map): Map them.
1916 (_bfd_mn10300_elf_create_got_section): New fn.
1917 (mn10300_elf_check_relocs): Handle PIC relocs.
1918 (mn10300_elf_final_link_relocate): Likewise.
1919 (mn10300_elf_relocate_section): Handle DSOs.
1920 (PLT0_ENTRY_SIZE, PLT_ENTRY_SIZE, PIC_PLT_ENTRY_SIZE): New macros.
1921 (elf_mn10300_plt0_entry, elf_mn10300_plt_entry,
1922 elf_mn10300_pic_plt_entry): New.
1923 (elf_mn10300_sizeof_plt, elf_mn10300_plt_plt0_offset,
1924 elf_mn10300_plt0_linker_offset, elf_mn10300_plt0_gotid_offset,
1925 elf_mn10300_plt_temp_offset, elf_mn10300_plt_symbol_offset,
1926 elf_mn10300_plt_reloc_offset: New macros.
1927 (ELF_DYNAMIC_INTERPRETER): Likewise.
1928 (_bfd_mn10300_elf_create_dynamic_sections): New function.
1929 (_bfd_mn10300_elf_adjust_dynamic_symbol): Likewise.
1930 (_bfd_mn10300_elf_discard_copies): Likewise.
1931 (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
1932 (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
1933 (_bfd_mn10300_elf_finish_dynamic_sections): Likewise.
1934 (elf_backend_can_gc_sections,
1935 elf_backend_create_dynamic_sections,
1936 elf_backend_adjust_dynamic_sections,
1937 elf_backend_size_dynamic_sections,
1938 elf_backend_finish_dynamic_symbol,
1939 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
1940 elf_backend_plt_readonly, elf_backend_want_plt_sym,
1941 elf_backend_got_header_size, elf_backend_plt_header_size): New
1942 macros.
1943
1944 2003-07-09 Alexandre Oliva <aoliva@redhat.com>
1945
1946 2001-05-06 Alexandre Oliva <aoliva@redhat.com>
1947 * elf-m10300.c (compute_function_info): Account for AM33
1948 registers in `movm' when computing stack space for `call' when
1949 linking for AM33/2.0 link.
1950 2000-04-01 Alexandre Oliva <aoliva@cygnus.com>
1951 * archures.c (bfd_mach_am33_2): Renamed from bfd_mach_am332.
1952 * bfd-in2.h: Rebuilt.
1953 * cpu-m10300.c (bfd_am33_2_arch): Renamed from bfd_am332_arch.
1954 * elf-m10300.c: Updated.
1955 2000-03-31 Alexandre Oliva <aoliva@cygnus.com>
1956 * archures.c (bfd_mach_am332): Defined.
1957 * bfd-in2.h: Rebuilt.
1958 * cpu-m10300.c (bfd_am332_arch): Defined.
1959 (bfd_am33_arch): Chained with am33-2.
1960 * elf-m10300.c (elf_mn10300_mach): Handle am332.
1961 (_bfd_mn10300_elf_final_write_processing): Likewise.
1962
1963 2003-07-09 H.J. Lu <hongjiu.lu@intel.com>
1964
1965 * elfxx-ia64.c (IA64_HOWTO): Set dst_mask to -1LL.
1966
1967 2003-07-10 Alan Modra <amodra@bigpond.net.au>
1968
1969 * elf64-ppc.c (bfd_elf64_mkobject): Define.
1970 (struct ppc64_elf_obj_tdata): New.
1971 (ppc64_elf_tdata, ppc64_tlsld_got): Define.
1972 (ppc64_elf_mkobject): New function.
1973 (struct got_entry): Add "owner". Move "tls_type".
1974 (struct ppc_link_hash_table): Delete "relgot", "tlsld_got".
1975 (ppc64_elf_init_stub_bfd): New function.
1976 (create_got_section): Create header .got in dynobj. Create .got
1977 and .rela.got in each bfd. Stash pointers in ppc64_elf_obj_tdata.
1978 (ppc64_elf_create_dynamic_sections): Don't call create_got_section.
1979 Look for dynobj .got, and test it.
1980 (ppc64_elf_copy_indirect_symbol): Adjust for changed got.
1981 (update_local_sym_info): Likewise.
1982 (ppc64_elf_check_relocs): Likewise.
1983 (ppc64_elf_gc_sweep_hook): Likewise.
1984 (ppc64_elf_tls_optimize): Likewise.
1985 (allocate_dynrelocs): Likewise.
1986 (ppc64_elf_size_dynamic_sections): Likewise.
1987 (ppc64_elf_relocate_section): Likewise.
1988 (ppc64_elf_next_toc_section): Update comment.
1989 (toc_adjusting_stub_needed): Remove unneeded cast.
1990 (ppc64_elf_build_stubs): Check for stub sections in stub bfd by
1991 testing section flags.
1992 (ppc64_elf_build_stubs): Likewise.
1993 (ppc64_elf_size_stubs): Likewise. Remove stub_bfd param.
1994 (ppc64_elf_finish_dynamic_sections): Write out got sections.
1995 (func_desc_adjust): Copy over dynamic info for undef weaks.
1996 * elf64-ppc.h (ppc64_elf_init_stub_bfd): Declare.
1997 (ppc64_elf_size_stubs): Update prototype.
1998 * elflink.h (elf_link_sort_relocs): Use link_orders to find reldyn
1999 input sections rather than scanning dynobj.
2000
2001 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
2002
2003 * elfxx-mips.c (mips_elf_link_hash_entry): Remove min_dyn_reloc_index.
2004 (bfd_mips_elf_swap_msym_in, bfd_mips_elf_swap_msym_out): Delete.
2005 (mips_elf_create_msym_section): Delete.
2006 (mips_elf_create_dynamic_relocation): Don't set min_dyn_reloc_index.
2007 (_bfd_mips_elf_copy_indirect_symbol): Likewise.
2008 (_bfd_mips_elf_create_dynamic_sections): Don't create .msym.
2009 (_bfd_mips_elf_size_dynamic_sections): Don't calculate its size.
2010 (_bfd_mips_elf_size_dynamic_sections): Don't add DT_MIPS_MSYM.
2011 (_bfd_mips_elf_finish_dynamic_symbol): Don't add symbols to .msym.
2012 (_bfd_mips_elf_finish_dynamic_sections): Likewise.
2013
2014 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
2015
2016 * elfxx-mips.c (mips_elf_irix6_finish_dynamic_symbol): Make the
2017 symbols protected.
2018
2019 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
2020
2021 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Fix handling
2022 of relocations whose offset is -2.
2023
2024 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
2025
2026 * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): Treat
2027 forced-local symbols like other locals. Don't create relocations
2028 against STN_UNDEF in irix objects.
2029
2030 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
2031
2032 * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): In SGI-
2033 compatible objects, add the values of defined external symbols
2034 to the addend.
2035
2036 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
2037
2038 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Always
2039 initialize a GOT entry to the symbol's st_value.
2040
2041 2003-07-08 Alan Modra <amodra@bigpond.net.au>
2042
2043 * elf-bfd.h (struct elf_obj_tdata): Move linker_section_pointers..
2044 * elf32-ppc.c (struct ppc_elf_obj_tdata): ..to here. New.
2045 (ppc_elf_tdata): Define.
2046 (elf_local_ptr_offsets): Adjust.
2047 (ppc_elf_mkobject): New function.
2048 (bfd_elf32_mkobject): Define.
2049
2050 * elfcode.h (elf_object_p): Allocate tdata via _bfd_set_format.
2051 * elfcore.h (elf_core_file_p): Likewise.
2052 * section.c (bfd_section_init): Remove prototype.
2053
2054 2003-07-08 Alan Modra <amodra@bigpond.net.au>
2055
2056 * elf-bfd.h (struct elf_link_hash_entry): Remove linker_section_pointer
2057 field.
2058 (enum elf_linker_section_enum): Delete.
2059 (struct elf_linker_section): Delete.
2060 (struct elf_linker_section_pointers): Delete.
2061 (struct elf_obj_tdata): Remove #if 0 chunk. Remove linker_section.
2062 Make linker_section_pointers a void**.
2063 (elf_local_ptr_offsets, elf_linker_section): Don't define.
2064 * elf32-ppc.c (enum elf_linker_section_enum): New, cut-down version
2065 of old item in elf-bfd.h.
2066 (struct elf_linker_section): Likewise.
2067 (struct elf_linker_section_pointers): Likewise.
2068 (elf_local_ptr_offsets): Define.
2069 (struct ppc_elf_link_hash_entry): Add linker_section_pointer.
2070 (ppc_elf_link_hash_newfunc): Init it.
2071 (struct ppc_elf_link_hash_table): Add sbss.
2072 (ppc_elf_link_hash_table_create): zmalloc rather than clearing
2073 individual fields.
2074 (elf_create_linker_section): Fold into..
2075 (ppc_elf_create_linker_section): ..here. Remove hole_size code.
2076 Make rela section here if shared.
2077 (elf_find_pointer_linker_section): Pass lsect rather than enum.
2078 (elf_create_pointer_linker_section): Adjust. zalloc rather than
2079 clearing in a loop.
2080 (elf_finish_pointer_linker_section): Adjust. Don't make rela
2081 section here.
2082 (ppc_elf_check_relocs): Adjust.
2083 (ppc_elf_add_symbol_hook): Tighten hash creator test. Remove code
2084 creating .sbss by hand.
2085 * elf.c (_bfd_elf_link_hash_newfunc): Adjust.
2086
2087 2003-07-04 Jakub Jelinek <jakub@redhat.com>
2088
2089 * elf32-s390.c (elf_howto_table): Change R_390_GOT12 to
2090 complain_overflow_bitfield.
2091 * elf64-s390.c (elf_howto_table): Change R_390_GOT12 to
2092 complain_overflow_bitfield.
2093
2094 2003-07-04 Jakub Jelinek <jakub@redhat.com>
2095
2096 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Return
2097 true even if -pie.
2098
2099 2003-07-04 Jakub Jelinek <jakub@redhat.com>
2100
2101 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add rel_fptr_sec.
2102 (elfNN_ia64_dynamic_symbol_p): Change info->shared into
2103 !info->executable.
2104 (get_fptr): For -pie create .opd as writable section and create
2105 .rela.opd as well.
2106 (elfNN_ia64_check_relocs): Change info->shared into
2107 !info->executable.
2108 (allocate_fptr): Likewise.
2109 (allocate_dynrel_entries): Account for a relative reloc for -pie
2110 @fptr(). Don't account for a relative reloc if -pie want_ltoff_fptr
2111 for undefweak symbol. Account for an IPLT reloc in .rela.opd
2112 section if -pie.
2113 (set_got_entry): Don't create a relative reloc if -pie
2114 want_ltoff_fptr for undefweak symbol.
2115 (set_fptr_entry): Emit an IPLT reloc in .rela.opd for -pie.
2116 (elfNN_ia64_relocate_section): Emit a relative reloc for -pie
2117 @fptr().
2118
2119 * elfxx-ia64.c (elfNN_ia64_relocate_section): Issue undefined_symbol
2120 even if -pie.
2121 * elf32-i386.c (elf_i386_relocate_section): Likewise.
2122 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
2123 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
2124 * elf64-s390.c (elf_s390_relocate_section): Likewise.
2125 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
2126 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
2127 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
2128 * elf32-s390.c (elf_s390_relocate_section): Likewise.
2129 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2130
2131 2003-07-04 Paul Clarke <paulc@senet.com.au>
2132
2133 * elf32-h8300.c (R_H8_DIR32A16): Fix name field.
2134 (elf32_h8_relax_section) <R_H8_DIR16A8>: Adjust position of relocation.
2135 <R_H8_DIR32A16>: Fix type of relocation.
2136
2137 2003-07-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2138
2139 * elf32-sh.c (sh_elf_create_dynamic_sections): Return if dynamic
2140 sections were created already. Remove unnecessary tests of
2141 the previous change.
2142
2143 2003-07-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2144
2145 * elf32-sh.c (sh_elf_create_dynamic_sections): Don't call
2146 bfd_make_section for existing sections.
2147
2148 2003-07-04 Alan Modra <amodra@bigpond.net.au>
2149
2150 * elf32-sparc.c (elf32_sparc_check_relocs): Don't call
2151 create_got_section if we already have done so.
2152 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
2153 (sh_elf_check_relocs): Likewise.
2154 (sh_elf_adjust_dynamic_symbol): Delete "dynobj" var. Use
2155 htab->root.dynobj instead.
2156 (sh_elf_check_relocs): Likewise.
2157 (sh_elf_finish_dynamic_sections): Likewise.
2158
2159 * section.c (bfd_make_section): Return NULL for existing section.
2160
2161 2003-07-04 Alan Modra <amodra@bigpond.net.au>
2162
2163 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Don't call
2164 ppc_elf_create_got if we've already done so.
2165
2166 * elf-bfd.h (_bfd_elf_create_linker_section) Don't declare.
2167 (_bfd_elf_find_pointer_linker_section): Likewise.
2168 (bfd_elf32_create_pointer_linker_section): Likewise.
2169 (bfd_elf32_finish_pointer_linker_section): Likewise.
2170 (bfd_elf64_create_pointer_linker_section): Likewise.
2171 (bfd_elf64_finish_pointer_linker_section): Likewise.
2172 (_bfd_elf_make_linker_section_rela): Likewise.
2173 * elfcode.h (elf_create_pointer_linker_section): Don't define.
2174 (elf_finish_pointer_linker_section): Likewise.
2175 * elflink.c (_bfd_elf_make_linker_section_rela): Delete.
2176 (_bfd_elf_create_linker_section): Move this function..
2177 (_bfd_elf_find_pointer_linker_section): ..and this..
2178 * elflink.h (elf_create_pointer_linker_section): ..and this..
2179 (elf_finish_pointer_linker_section): ..and this..
2180 * elf32-ppc.c: ..to here, renaming to the following, and adjusting
2181 calls.
2182 (elf_create_linker_section): Convert to C90, tidy.
2183 (elf_find_pointer_linker_section): Likewise.
2184 (elf_create_pointer_linker_section): Likewise.
2185 (elf_finish_pointer_linker_section): Likewise.
2186 * elf32-i370.c: Delete #if 0 code.
2187
2188 2003-07-02 Alan Modra <amodra@bigpond.net.au>
2189
2190 * elf64-ppc.c (ppc64_elf_func_desc_adjust): Don't allow _savef* and
2191 _restf* to be satisfied by shared libs, and always force them local.
2192 (toc_adjusting_stub_needed): Avoid scanning linker created sections.
2193 Correct test for "bl".
2194 (ppc64_elf_relocate_section <R_PPC64_TLS>): Correct test for
2195 primary opcode 31.
2196
2197 2003-07-01 Martin Schwidefsky <schwidefsky@de.ibm.com>
2198
2199 * elf32-s390.c (s390_elf_ldisp_reloc): New prototype.
2200 (s390_tls_reloc): New function.
2201 (elf_howto_table): Add long displacement relocations R_390_20,
2202 R_390_GOT20, R_390_GOTPLT20 and R_390_TLS_GOTIE20.
2203 (elf_s390_reloc_type_lookup): Likewise.
2204 (elf_s390_check_relocs): Likewise.
2205 (elf_s390_gc_sweep_hook): Likewise.
2206 (elf_s390_relocate_section): Likewise.
2207 * elf64-s390.c: Same changes as for elf32-s390.c.
2208 * reloc.c: Add long displacement relocations BFD_RELOC_390_20,
2209 BFD_RELOC_390_GOT20, BFD_RELOC_390_GOTPLT20 and
2210 BFD_RELOC_390_TLS_GOTIE20.
2211 * bfd-in2.h: Regenerate.
2212 * libbfd.h: Likewise.
2213
2214 2003-06-30 Alan Modra <amodra@bigpond.net.au>
2215
2216 * cpu-ia64-opc.c (ext_imms_scaled): Don't sign extend using shifts.
2217 (ins_imms, ins_immsm1u4): Likewise. Warning fix.
2218
2219 2003-06-29 Alan Modra <amodra@bigpond.net.au>
2220
2221 * archive.c: Convert to C90, remove unnecessary prototypes and casts.
2222 Replace PTR with void *. Formatting.
2223 * archive64.c: Likewise.
2224 * archures.c: Likewise.
2225 * bfd-in.h: Likewise.
2226 * bfd.c: Likewise.
2227 * bfdio.c: Likewise.
2228 * bfdwin.c: Likewise.
2229 * cache.c: Likewise.
2230 * corefile.c: Likewise.
2231 * format.c: Likewise.
2232 * init.c: Likewise.
2233 * libbfd-in.h: Likewise.
2234 * libbfd.c: Likewise.
2235 * linker.c: Likewise.
2236 * opncls.c: Likewise.
2237 * reloc.c: Likewise.
2238 * section.c: Likewise.
2239 * simple.c: Likewise.
2240 * syms.c: Likewise.
2241 * targets.c: Likewise.
2242 * bfd-in2.h: Regenerate.
2243 * libbfd.h: Regenerate.
2244
2245 * ecoff.c (bfd_debug_section): Add missing kept_section initialization.
2246 * libbfd-in.h (_bfd_sh_align_load_span): Don't declare if defined.
2247 * libbfd.c (COERCE32, EIGHT_GAZILLION): Simplify.
2248 (bfd_getb64): Rewrite without parens.
2249 (bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
2250 * cache.c (insert, snip): Remove INLINE.
2251 * linker.c (bfd_link_add_undef): Likewise.
2252
2253 2003-06-29 Andreas Jaeger <aj@suse.de>
2254
2255 * elf64-x86-64.c: Convert to ISO C90 prototypes, remove
2256 unnecessary prototypes. Replace PTR with void *.
2257 (elf64_x86_64_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL to
2258 trim plt entries. Move undefweak non-default visibility test ...
2259 (allocate_dynrelocs): ... from here.
2260 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
2261 Change all callers.
2262 (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL. Use
2263 SYMBOL_REFERENCES_LOCAL for dynreloc check.
2264 (elf64_x86_64_relocate_section): Use SYMBOL_CALLS_LOCAL for
2265 dynreloc and .got relocs.
2266 (elf64_x86_64_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL
2267 for .got relocs.
2268
2269 2003-06-29 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2270
2271 * elfxx-mips.c: Allow lazy binding for R_MIPS_JALR.
2272
2273 2003-06-27 Nick Clifton <nickc@redhat.com>
2274
2275 * opncls.c (bfd_add_gnu_debuglink_section): Rename to
2276 bfd_add_gnu_debuglink_section and only create the section, do not
2277 fill in its contents.
2278 (bfd_fill_in_gnu_debuglink_section): New function. Fill in the
2279 contents of a .gnu-debuglink section.
2280 * bfd-in2.h: Regenerate.
2281
2282 2003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2283
2284 * elfxx-mips.c: Revert .got alignment to 2**4.
2285
2286 2003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2287
2288 * elf32-mips.c: Fix addend for _gp_disp special symbol.
2289
2290 2003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2291
2292 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Remove non-default
2293 relocation header setup.
2294
2295 2003-06-25 Alan Modra <amodra@bigpond.net.au>
2296
2297 * elf32-ppc.c (ppc_elf_howto_table): Remove unnecessary cast.
2298 (ppc_elf_reloc_type_lookup): Modify comment.
2299 (ppc_elf_info_to_howto): Ditto.
2300 (ppc_elf_relocate_section): Ditto.
2301 (ppc_elf_check_relocs): Call ppc_elf_howto_init.
2302
2303 2003-06-25 Alan Modra <amodra@bigpond.net.au>
2304
2305 * aout-ns32k.c: Correct spelling of "relocatable".
2306 * aoutx.h: Likewise.
2307 * bfd-in.h: Likewise.
2308 * bfd.c: Likewise.
2309 * bout.c: Likewise.
2310 * coff-a29k.c: Likewise.
2311 * coff-alpha.c: Likewise.
2312 * coff-arm.c: Likewise.
2313 * coff-i386.c: Likewise.
2314 * coff-i860.c: Likewise.
2315 * coff-i960.c: Likewise.
2316 * coff-m68k.c: Likewise.
2317 * coff-m88k.c: Likewise.
2318 * coff-mcore.c: Likewise.
2319 * coff-mips.c: Likewise.
2320 * coff-or32.c: Likewise.
2321 * coff-ppc.c: Likewise.
2322 * coff-rs6000.c: Likewise.
2323 * coff-sh.c: Likewise.
2324 * coff-tic80.c: Likewise.
2325 * coff64-rs6000.c: Likewise.
2326 * cofflink.c: Likewise.
2327 * cpu-ns32k.c: Likewise.
2328 * ecoff.c: Likewise.
2329 * ecofflink.c: Likewise.
2330 * elf-bfd.h: Likewise.
2331 * elf-eh-frame.c: Likewise.
2332 * elf-hppa.h: Likewise.
2333 * elf-m10200.c: Likewise.
2334 * elf-m10300.c: Likewise.
2335 * elf.c: Likewise.
2336 * elf32-arm.h: Likewise.
2337 * elf32-avr.c: Likewise.
2338 * elf32-cris.c: Likewise.
2339 * elf32-d10v.c: Likewise.
2340 * elf32-dlx.c: Likewise.
2341 * elf32-fr30.c: Likewise.
2342 * elf32-frv.c: Likewise.
2343 * elf32-h8300.c: Likewise.
2344 * elf32-hppa.c: Likewise.
2345 * elf32-i370.c: Likewise.
2346 * elf32-i386.c: Likewise.
2347 * elf32-i860.c: Likewise.
2348 * elf32-i960.c: Likewise.
2349 * elf32-ip2k.c: Likewise.
2350 * elf32-iq2000.c: Likewise.
2351 * elf32-m32r.c: Likewise.
2352 * elf32-m68hc11.c: Likewise.
2353 * elf32-m68hc1x.c: Likewise.
2354 * elf32-m68k.c: Likewise.
2355 * elf32-mcore.c: Likewise.
2356 * elf32-mips.c: Likewise.
2357 * elf32-msp430.c: Likewise.
2358 * elf32-openrisc.c: Likewise.
2359 * elf32-ppc.c: Likewise.
2360 * elf32-s390.c: Likewise.
2361 * elf32-sh.c: Likewise.
2362 * elf32-sh64.c: Likewise.
2363 * elf32-sparc.c: Likewise.
2364 * elf32-v850.c: Likewise.
2365 * elf32-vax.c: Likewise.
2366 * elf32-xstormy16.c: Likewise.
2367 * elf32-xtensa.c: Likewise.
2368 * elf64-alpha.c: Likewise.
2369 * elf64-hppa.c: Likewise.
2370 * elf64-mips.c: Likewise.
2371 * elf64-mmix.c: Likewise.
2372 * elf64-ppc.c: Likewise.
2373 * elf64-s390.c: Likewise.
2374 * elf64-sh64.c: Likewise.
2375 * elf64-sparc.c: Likewise.
2376 * elf64-x86-64.c: Likewise.
2377 * elfcode.h: Likewise.
2378 * elflink.h: Likewise.
2379 * elfn32-mips.c: Likewise.
2380 * elfxx-ia64.c: Likewise.
2381 * elfxx-mips.c: Likewise.
2382 * i386linux.c: Likewise.
2383 * ieee.c: Likewise.
2384 * libcoff-in.h: Likewise.
2385 * linker.c: Likewise.
2386 * m68klinux.c: Likewise.
2387 * pdp11.c: Likewise.
2388 * pe-mips.c: Likewise.
2389 * peXXigen.c: Likewise.
2390 * reloc.c: Likewise.
2391 * reloc16.c: Likewise.
2392 * sparclinux.c: Likewise.
2393 * sunos.c: Likewise.
2394 * syms.c: Likewise.
2395 * versados.c: Likewise.
2396 * vms.c: Likewise.
2397 * xcofflink.c: Likewise.
2398 * bfd-in2.h: Regenerate.
2399 * libcoff.h: Regenerate.
2400 * libbfd.h: Regenerate.
2401
2402 2003-06-24 Alan Modra <amodra@bigpond.net.au>
2403
2404 * elf32-ppc.c (ppc_elf_check_relocs): Report plt reloc against
2405 local sym errors.
2406
2407 * elf32-i386.c: Convert to C90 function definitions, remove unnecessary
2408 prototypes and casts. Replace PTR with void *. Formatting.
2409 * elf32-ppc.c: Likewise. Break long strings too.
2410 (ppc_elf_relax_section): Use enum elf_ppc_reloc_type for r_type.
2411 (ppc_elf_unhandled_reloc): Internationalize error message.
2412 * elf32-ppc.h: Remove PARAMS.
2413
2414 2003-06-23 Mark Mitchell <mark@codesourcery.com>
2415
2416 * elf32-ppc.c (ppc_elf_begin_write_processing): Use bytes to count
2417 APUinfo slots.
2418 (ppc_elf_final_write_processing): Likewise.
2419
2420 2003-06-23 H.J. Lu <hongjiu.lu@intel.com>
2421
2422 * elflink.h (elf_link_input_bfd): Check raw size when using
2423 kept_section to preserve debug information discarded by
2424 linkonce.
2425
2426 2003-06-20 Alan Modra <amodra@bigpond.net.au>
2427
2428 * elf64-ppc.c (struct ppc_link_hash_table): Add top_id.
2429 (ppc64_elf_setup_section_lists): Set it.
2430 (ppc64_elf_relocate_section): Check sym section id against top_id.
2431 (ppc_build_one_stub): Comment on top_id.
2432
2433 2003-06-20 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
2434
2435 * config.bfd: Add tic4x-*-rtems*.
2436
2437 2003-06-20 Alan Modra <amodra@bigpond.net.au>
2438
2439 * elf64-ppc.c: Convert to C90 function definitions, remove unnecessary
2440 prototypes and casts. Replace PTR with void *. Format copyright.
2441 Mention ABI links.
2442 (struct ppc_link_hash_table): Rename sgot, srelgot, splt, srelplt,
2443 sdynbss, srelbss, sglink, sbrlt and srelbrlt to got, relgot .. relbrlt.
2444 (ppc_type_of_stub): Make r_type an enum.
2445 (ppc64_elf_size_stubs): Likewise.
2446 * elf64-ppc.h: Remove PARAMS macro.
2447
2448 2003-06-19 Alan Modra <amodra@bigpond.net.au>
2449
2450 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Reinstate init of
2451 elf hash tab fields.
2452
2453 * elf64-ppc.c (ppc64_elf_reloc_type_lookup): Tidy prototype.
2454 (ppc64_elf_info_to_howto): Likewise.
2455 (ppc64_elf_build_stubs): Add "stats" param, and print statistics.
2456 * elf64-ppc.h (ppc64_elf_build_stubs): Adjust prototype.
2457
2458 2003-06-19 Alan Modra <amodra@bigpond.net.au>
2459
2460 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore R_SPARC_DISP32
2461 reloc overflow on discarded eh_frame entries.
2462
2463 2003-06-19 Alan Modra <amodra@bigpond.net.au>
2464
2465 * elf64-ppc.c (toc_adjusting_stub_needed): New function.
2466 (ppc64_elf_next_input_section): Use it here to set has_gp_reloc.
2467 Return error condition.
2468 (ppc64_elf_size_stubs): Restrict toc adjusting stubs to sections
2469 that have has_gp_reloc set.
2470 (struct ppc_link_hash_table): Add stub_count.
2471 (ppc_build_one_stub): Increment it.
2472 (ppc64_elf_link_hash_table_create): zmalloc rather than clearing
2473 individual fields.
2474 * elf64-ppc.h (ppc64_elf_next_input_section): Update prototype.
2475
2476 2003-06-18 Alan Modra <amodra@bigpond.net.au>
2477
2478 * elflink.h (elf_gc_record_vtentry): Revert last change. Correct
2479 size calculation from addend. Round size up.
2480
2481 2003-06-18 Hans-Peter Nilsson <hp@axis.com>
2482
2483 * elf32-cris.c (cris_elf_relocate_section) <case
2484 R_CRIS_32_GOTREL>: When linking a program, don't complain about a
2485 symbol from a normal object or an undefined weak symbol.
2486
2487 2003-06-18 Alan Modra <amodra@bigpond.net.au>
2488
2489 * elf64-ppc.c (ppc64_elf_relocate_section): Accept a symbol on
2490 R_PPC64_TOC relocs.
2491
2492 2003-06-17 H.J. Lu <hongjiu.lu@intel.com>
2493
2494 * section.c (struct sec): Put back kept_section.
2495 (STD_SECTION): Put back kept_section initialization.
2496 * bfd-in2.h: Regenerate.
2497
2498 * elflink.h (elf_link_input_bfd): Also check discarded linkonce
2499 sections for relocateable output. Use kept_section to preserve
2500 debug information discarded by linkonce.
2501
2502 2003-06-17 Roland McGrath <roland@redhat.com>
2503
2504 * elfxx-ia64.c (elfNN_ia64_relocate_section): Support
2505 segment-relative relocation between different segments.
2506
2507 2003-06-17 Alan Modra <amodra@bigpond.net.au>
2508
2509 * elf64-ppc.c (ppc64_elf_relocate_section): Do unaligned reloc
2510 optimizations earlier.
2511
2512 * elf64-ppc.c (struct ppc_link_hash_table): Reinstate top_index.
2513 Restore previous input_list type.
2514 (ppc64_elf_link_hash_table_create): Undo last change.
2515 (ppc64_elf_setup_section_lists): Reinstate code setting up input lists
2516 per output section, but don't bother with bfd_abs_section marker.
2517 (ppc64_elf_next_input_section): Adjust for multiple input section
2518 lists.
2519 (group_sections): Likewise.
2520
2521 2003-06-17 Jakub Jelinek <jakub@redhat.com>
2522
2523 * elf64-ppc.c (ppc64_elf_relocation_section): Ensure
2524 *r_offset == r_addend for RELATIVE relocs against .got.
2525
2526 2003-06-17 Alan Modra <amodra@bigpond.net.au>
2527
2528 * elf64-ppc.c (ppc64_elf_relocate_section): Optimize unaligned relocs.
2529
2530 2003-06-17 Nick Clifton <nickc@redhat.com>
2531
2532 * elflink.h (elf_gc_record_vtentry): Allocate an extra element
2533 in the vtable_entries_used array to allow for the accessing
2534 the largest element.
2535
2536 2003-06-17 Alan Modra <amodra@bigpond.net.au>
2537
2538 * elf64-ppc.c (struct ppc_link_hash_table): Remove top_index. Modify
2539 input_list.
2540 (ppc64_elf_link_hash_table_create): Init input_list here.
2541 (ppc64_elf_setup_section_lists): Remove code setting up input lists
2542 per output section. Set toc_off for abs and other standard sections.
2543 (ppc64_elf_reinit_toc): Don't set elf_gp on input bfds lacking a toc.
2544 (ppc64_elf_next_input_section): Adjust for single input section list.
2545 Don't set toc_curr from input bfds that haven't set elf_gp.
2546 (group_sections): Adjust for single input section list.
2547
2548 * elf64-ppc.c (ppc64_elf_relocate_section): Correct pcrel section zero.
2549
2550 2003-06-16 Alan Modra <amodra@bigpond.net.au>
2551
2552 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing toctprel
2553 tls, check that a TOC16_DS or TOC16_LO_DS reloc isn't pointing to a
2554 dtprel entry. Ensure TLS_LD DTPMOD reloc has a zero addend. Write
2555 got section for RELATIVE relocs. Fix wrong comment. Change condition
2556 under which dynamic relocs update the section contents.
2557
2558 2003-06-13 Robert Millan <zeratul2@wanadoo.es>
2559
2560 * config.bfd: Add i386-netbsd-gnu target.
2561
2562 2003-06-12 Nick Clifton <nickc@redhat.com>
2563
2564 * opncls.c (calc_crc32): Rename to
2565 bfd_calc_gnu_debuglink_crc32 and export.
2566 (GNU_DEBUGLINK): Define and use to replace occurrences of
2567 hard-coded ".gnu_debuglink" in the code.
2568 (get_debug_link_info): Prevent aborts by replacing call to
2569 xmalloc with a call to malloc.
2570 (find_separate_debug_file): Prevent aborts by replacing calls
2571 to xmalloc and xstrdup with calls to malloc and strdup.
2572 (bfd_add_gnu_debuglink): New function. Add a .gnu_debuglink
2573 section to a bfd.
2574 * bfd-in2.h: Regenerate.
2575
2576 2003-06-12 Federico G. Schwindt <fgsch@lodoss.net>
2577
2578 * config.bfd (i[3-7]86-*-openbsd[0-2].* | i[3-7]86-*-openbsd3.[0-3]):
2579 New target (was i[3-7]86-*-openbsd* before).
2580 (i[3-7]86-*-openbsd*): Change to use bfd_elf32_i386_vec.
2581 (vax-*-openbsd*): New target.
2582
2583 2003-06-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2584
2585 * elfxx-mips.c (MIPS_ELF_OPTIONS_SECTION_NAME): Use .MIPS.options
2586 for n32, too.
2587 (MIPS_ELF_STUB_SECTION_NAME): Use .MIPS.stubs for n32, too.
2588 (mips_elf_rel_dyn_section): Use appropriate section alignment.
2589 (mips_elf_create_got_section): Likewise.
2590 (_bfd_mips_elf_create_dynamic_sections): Likewise.
2591
2592 2003-06-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2593
2594 * elf32-mips.c (mips_elf_generic_reloc): New Function.
2595 (elf_mips_howto_table_rel): Use it.
2596 (gprel32_with_gp): Move prototype.
2597 (mips_elf_hi16_reloc): Check for ! BSF_LOCAL instead of zero addend.
2598 Use mips_elf_generic_reloc.
2599 (mips_elf_got16_reloc): Check for ! BSF_LOCAL instead of zero addend.
2600 Code cleanup.
2601 (_bfd_mips_elf32_gprel16_reloc): Check for ! BSF_LOCAL instead of
2602 zero addend.
2603 (mips_elf_gprel32_reloc): Likewise. Use the same GP assignment logic
2604 as in the other *_gprel*_reloc functions.
2605 (gprel32_with_gp): Handle partial_inplace properly.
2606 (mips32_64bit_reloc): Use mips_elf_generic_reloc.
2607 (mips16_gprel_reloc): Check for ! BSF_LOCAL instead of zero addend.
2608 Do addend handling directly instead of calling
2609 _bfd_mips_elf_gprel16_with_gp. Handle partial_inplace properly.
2610 * elf64-mips.c (mips_elf64_hi16_reloc): Check for ! BSF_LOCAL instead
2611 of zero addend. Handle partial_inplace properly.
2612 (mips_elf64_got16_reloc): Check for ! BSF_LOCAL instead of zero
2613 addend.
2614 (mips_elf64_gprel16_reloc): Likewise.
2615 (mips_elf64_literal_reloc): Likewise.
2616 (mips_elf64_gprel32_reloc): Likewise. Use the same GP assignment
2617 logic as in the other *_gprel*_reloc functions. Handle
2618 partial_inplace properly.
2619 (mips_elf64_shift6_reloc): Check for ! BSF_LOCAL instead of zero
2620 addend. Handle partial_inplace properly.
2621 (mips16_gprel_reloc): Likewise. Do addend handling directly instead
2622 of calling _bfd_mips_elf_gprel16_with_gp.
2623 * elfn32-mips.c (mips_elf_got16_reloc): Check for BSF_LOCAL.
2624 (mips_elf_gprel32_reloc): Check for ! BSF_LOCAL instead
2625 of zero addend.
2626 (mips_elf_shift6_reloc): Handle partial_inplace properly.
2627 (mips16_gprel_reloc): Likewise. Do addend handling directly instead
2628 of calling _bfd_mips_elf_gprel16_with_gp.
2629 * elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp): Handle
2630 partial_inplace properly. Fix wrong addend handling. Fix overflow
2631 check.
2632 (_bfd_mips_elf_sign_extend): Renamed from mips_elf_sign_extend and
2633 exported.
2634 (mips_elf_calculate_relocation): Use _bfd_mips_elf_sign_extend.
2635 (_bfd_mips_elf_relocate_section): Likewise.
2636 (mips_elf_create_dynamic_relocation): Update sec_info_type access.
2637 * elfxx-mips.h (_bfd_mips_relax_section): Fix prototype declaration.
2638 (_bfd_mips_elf_sign_extend): New prototype.
2639
2640 2003-06-11 Federico G. Schwindt <fgsch@lodoss.net>
2641
2642 * config.bfd (sparc-*-openbsd[0-2].* | sparc-*-openbsd3.[0-1]):
2643 New target (was sparc-*-openbsd* before).
2644 (sparc-*-openbsd*): Change to use bfd_elf32_sparc_vec.
2645
2646 * configure.in (vax-*-openbsd*): Set COREFILE to netbsd-core.lo.
2647 * configure: Regenerate.
2648
2649 2003-06-11 H.J. Lu <hongjiu.lu@intel.com>
2650
2651 * po/Make-in (DESTDIR): New.
2652 (install-data-yes): Support $(DESTDIR).
2653 (uninstall): Likewise.
2654
2655 2003-06-11 Alan Modra <amodra@bigpond.net.au>
2656
2657 * Makefile.am (config.status): Depend on version.h.
2658 Run "make dep-am".
2659 * Makefile.in: Regenerate.
2660 * po/SRC-POTFILES.in: Regenerate.
2661
2662 2003-06-10 Alan Modra <amodra@bigpond.net.au>
2663 Gary Hade <garyhade@us.ibm.com>
2664
2665 * elf64-ppc.c (ppc64_elf_relocate_section <*_DS>): Special case lq.
2666
2667 2003-06-10 Richard Sandiford <rsandifo@redhat.com>
2668
2669 * archures.c (bfd_mach_h8300sxn): New architecture.
2670 * bfd-in2.h: Regenerate.
2671 * cpu-h8300.c (h8300_scan): Check for 'sxn'.
2672 (h8300sxn_info_struct): New.
2673 (h8300sx_info_struct): Link to it.
2674 * elf32-h8300.c (elf32_h8_mach): Add h8300sxn case.
2675 (elf32_h8_final_write_processing): Likewise.
2676
2677 2003-06-08 Alan Modra <amodra@bigpond.net.au>
2678
2679 * elf64-ppc.c: Move TARGET_LITTLE_SYM and other macros used by
2680 elfxx-target.h so that we can use elf_backend_got_header_size.
2681 (ELF_MACHINE_ALT1, ELF_MACHINE_ALT2): Delete.
2682 (GLINK_CALL_STUB_SIZE): Modify. Define new glink call stub and
2683 associated macros.
2684 (ppc64_elf_howto_raw <GOT_TPREL16_DS, GOT_TPREL16_LO_DS>): Correct
2685 dst_mask.
2686 (enum ppc_stub_type): Add ppc_stub_long_branch_r2off and
2687 ppc_stub_plt_branch_r2off.
2688 (struct ppc_stub_hash_entry): Reorganize.
2689 (struct ppc_link_hash_table): Add no_multi_toc, multi_toc_needed,
2690 toc_curr, toc_off and emit_stub_syms.
2691 (ppc64_elf_link_hash_table_create): Init them.
2692 (ppc_stub_name): Correct string size.
2693 (ppc64_elf_check_relocs): Set has_gp_reloc on GOT and TOC relocs.
2694 (ppc64_elf_size_dynamic_sections): Set no_multi_toc if GOT entries
2695 used.
2696 (ppc_type_of_stub): Tweak root.type test.
2697 (build_plt_stub): Remove glink code. Adjust for insn macro changes.
2698 (ppc_size_one_stub): Handle ppc_stub_long_branch_r2off and
2699 ppc_stub_plt_branch_r2off.
2700 (ppc_build_one_stub): Likewise. Fix var shadowing. Correct addis,addi
2701 range test. Use toc_off to calculte r2 values. Handle emit_stub_syms.
2702 (ppc64_elf_setup_section_lists): Remove htab creator flavour test.
2703 Initialize elf_gp and toc_curr.
2704 (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): New functions.
2705 (ppc64_elf_next_input_section): Set toc_off.
2706 (group_sections): Ensure groups have the same TOC.
2707 (ppc64_elf_size_stubs): Check whether we need a TOC adjusting stub.
2708 (ppc64_elf_build_stubs): Add emit_stub_syms param, and stash in htab.
2709 Build new glink stub.
2710 (ppc64_elf_relocate_section): Handle multiple TOCs. Fix comments.
2711 (ppc64_elf_finish_dynamic_sections): Adjust DT_PPC64_GLINK.
2712 * elf64-ppc.h (ppc64_elf_build_stubs): Update prototype.
2713 (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): Declare.
2714 * section.c (struct sec): Rename flag12 to has_gp_reloc.
2715 (STD_SECTION): Update.
2716 * ecoff.c (bfd_debug_section): Update comment.
2717 * bfd-in2.h: Regenerate.
2718
2719 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
2720
2721 * elfcode.h (elf_slurp_reloc_table_from_section): Don't dereference
2722 NULL function pointers.
2723
2724 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
2725
2726 * simple.c (bfd_simple_get_relocated_section_contents): Call
2727 _bfd_generic_link_add_symbols instead of bfd_link_add_symbols.
2728
2729 2003-06-04 Svein E. Seldal <Svein.Seldal@solidas.com>
2730
2731 * coff-tic54x.c: Removed the ticoff0_bad_format_hook() and
2732 ticoff1_bad_format_hook() functions. Removed the coff0 and coff1
2733 swaptables.
2734 * coff-tic4x.c: Ditto
2735 * coffcode.h: Added extra arguments to CREATE_BIG_COFF_TARGET_VEC
2736 and CREATE_LITTLE_COFF_TARGET_VEC. Created the macro
2737 CREATE_BIGHDR_COFF_TARGET_VEC. Created the ticoff0_bad_format_hook(),
2738 ticoff1_bad_format_hook() functions. Created the coff0 and coff1
2739 swap tables.
2740 * coff-tic4x.c: Adopted new CREATE_xxx_COFF_TARGET_VEC macros.
2741 * coff-a29k.c: Append COFF_SWAP_TABLE argument
2742 * coff-apollo.c: Ditto
2743 * coff-arm.c: Ditto
2744 * coff-h8300.c: Ditto
2745 * coff-h8500.c: Ditto
2746 * coff-i960.c: Ditto
2747 * coff-m68k.c: Ditto
2748 * coff-m88k.c: Ditto
2749 * coff-mcore.c: Ditto
2750 * coff-sh.c: Ditto
2751 * coff-sparc.c: Ditto
2752 * coff-tic80.c: Ditto
2753 * coff-we32k.c: Ditto
2754 * coff-z8k.c: Ditto
2755 * coff-w65.c: Ditto
2756
2757 2003-06-04 Svein E. Seldal <Svein.Seldal@solidas.com>
2758
2759 * coff-tic4x.c (ticoff0_swap_table, ticoff1_swap_table): Fixed
2760 initialization bug
2761
2762 2003-06-03 Jakub Jelinek <jakub@redhat.com>
2763
2764 * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_STACK.
2765 (bfd_section_from_phdr): Likewise.
2766 (map_sections_to_segments): Create PT_GNU_STACK segment header.
2767 (get_program_header_size): Count with PT_GNU_STACK.
2768 * elf-bfd.h (struct elf_obj_tdata): Add stack_flags.
2769 * elflink.h (bfd_elfNN_size_dynamic_sections): Set stack_flags.
2770
2771 2003-06-03 H.J. Lu <hongjiu.lu@intel.com>
2772
2773 * elflink.h (elf_link_input_bfd): Call linker error_handler
2774 for discarded definitions.
2775
2776 2003-06-03 Elias Athanasopoulos <elathan@phys.uoa.gr>
2777
2778 * syms.c (decode_section_type): Return 'n' if section flags are
2779 SEC_HAS_CONTENTS && SEC_READONLY.
2780
2781 2003-06-03 Nick Clifton <nickc@redhat.com>
2782
2783 * elf32-v850.c (v850_elf_howto_t): Rename R_V850_32to
2784 R_V850_ABS32. Add entry for R_V850_REL32.
2785 (v850_elf_reloc_map): Likewise.
2786 (v850_elf_check_relocs): Likewise.
2787 (v850_elf_perform_relocation): Likewise.
2788 (v850_elf_final_link_relocate): Likewise. Include computation
2789 to make R_V850_REl32 pc-relative.
2790
2791 2003-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2792
2793 * elf32-sh.c (sh_elf_size_dynamic_sections): Create .interp section
2794 and DT_DEBUG dynamic tag even for position independent executables.
2795 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewize.
2796
2797 2003-06-02 Daniel Jacobowitz <drow@mvista.com>
2798
2799 * config.bfd: Move obsolete entries out of the range of the
2800 targmatch sed script.
2801
2802 2003-06-02 Daniel Jacobowitz <drow@mvista.com>
2803
2804 * config.bfd (mips*-dec-bsd*, mips*-*-pe*): Mark as obsolete.
2805
2806 2003-05-31 Jakub Jelinek <jakub@redhat.com>
2807
2808 * elf32-ppc.c (allocate_dynrelocs): Use single slot for first 8192
2809 plt entries, not just 8191.
2810
2811 2003-05-30 Daniel Jacobowitz <drow@mvista.com>
2812
2813 * elfxx-mips.c (_bfd_mips_elf_discard_info): Correct loop index.
2814 Reported by Ken Faiczak <kfaiczak@SANDVINE.com>.
2815
2816 2003-05-30 Ulrich Drepper <drepper@redhat.com>
2817 Jakub Jelinek <jakub@redhat.com>
2818
2819 * elflink.h (elf_link_add_object_symbols): Use !info->executable
2820 instead of info->shared where appropriate.
2821 (bfd_elfNN_size_dynamic_sections, elf_link_output_extsym): Likewise.
2822 * elflink.c (_bfd_elf_create_got_section): Likewise.
2823 (_bfd_elf_link_create_dynamic_sections): Likewise.
2824 (_bfd_elf_link_assign_sym_version): Likewise.
2825 * elf32-i386.c (elf_i386_size_dynamic_sections): Create .interp section
2826 and DT_DEBUG dynamic tag even for position independent executables.
2827 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
2828 * elf32-s390.c (elf_s390_size_dynamic_sections: Likewise.
2829 * elf64-ppc.c (ppc64_elf_size_dynamic_sections: Likewise.
2830 * elf64-s390.c (elf_s390_size_dynamic_sections: Likewise.
2831 * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections: Likewise.
2832 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections: Likewise.
2833 * elf32-sparc.c (elf32_sparc_size_dynamic_sections: Likewise.
2834 * elf64-alpha.c (elf64_alpha_size_dynamic_sections: Likewise.
2835 * elf64-sparc.c (sparc64_elf_size_dynamic_sections: Likewise.
2836
2837 2003-05-30 Kris Warkentin <kewarken@qnx.com>
2838
2839 * elf.c (elfcore_grok_nto_status): Only set lwpid for the active or
2840 signalled thread.
2841 (elfcore_grok_nto_gregs): Only make .reg section for the active thread.
2842
2843 2003-05-29 Nick Clifton <nickc@redhat.com>
2844
2845 * pef.c: Include "safe-ctype.h" instead of <ctype.h>.
2846 Tidy up formatting.
2847 * Makefile.am: Add dependency on safe-ctype.h.
2848 * Makefile.in: Regenerate.
2849
2850 2003-05-29 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2851
2852 * elfxx-mips.c: Don't force symbols local unconditionally.
2853
2854 2003-05-28 Alan Modra <amodra@bigpond.net.au>
2855
2856 * elf32-hppa.c (elf32_hppa_relocate_section): Delete bogus
2857 undefined_symbol call.
2858
2859 2003-05-27 Richard Sandiford <rsandifo@redhat.com>
2860
2861 * elfxx-mips.c (mips_elf_hash_sort_data): Fix formattting.
2862 (mips_elf_link_hash_table): Likewise.
2863
2864 2003-05-22 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2865
2866 * elf64-mips.c (elf_mips_gnu_rel16_s2): Add internally used
2867 R_MIPS_GNU_REL16_S2 support.
2868 (bfd_elf64_bfd_reloc_type_lookup): Use it.
2869 (mips_elf64_rtype_to_howto): Use it.
2870 * elfn32-mips.c (elf_mips_gnu_rel16_s2): Add internally used
2871 R_MIPS_GNU_REL16_S2 support.
2872 (bfd_elf32_bfd_reloc_type_lookup): Use it.
2873 (mips_elf_n32_rtype_to_howto): Use it.
2874
2875 2003-05-21 Stuart F. Downing <sdowning@fame.com>
2876
2877 * som.h: Define PA_2_0 before including a.out.h
2878
2879 2003-05-07 Eric Christopher <echristo@redhat.com>
2880 Alexandre Oliva <aoliva@redhat.com>
2881
2882 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Adjust
2883 pic tests, change to warning.
2884 (_bfd_mips_elf_final_link): Remove EF_MIPS_CPIC flag setting.
2885
2886 2003-05-21 Marcus Comstedt <marcus@mc.pp.se>
2887
2888 * config.bfd: Check for a target triplet of shl-...-netbsdelf as
2889 well as shle-...-netbsdelf. Remove duplicate entry.
2890
2891 2003-05-21 Nick Clifton <nickc@redhat.com>
2892
2893 * elf32-xstormy16.c (xstormy16_elf_howto_table): Fix dst_mask
2894 for X_STORMY16_REL_12 reloc.
2895
2896 * elf.c (bfd_elf_get_needed_list): Use is_elf_hash_table to check
2897 the type of the hash table in the bfd_link_info structure.
2898 (bfd_elf_get_runpath_list): Likewise.
2899
2900 2003-05-19 Roland McGrath <roland@redhat.com>
2901
2902 * elf.c (bfd_elf_bfd_from_remote_memory): New function.
2903 * bfd-in.h: Declare it.
2904 * bfd-in2.h: Regenerated.
2905 * elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): New function.
2906 * elf-bfd.h (struct elf_backend_data): New function pointer member
2907 elf_backend_bfd_from_remote_memory.
2908 (_bfd_elf32_bfd_from_remote_memory, _bfd_elf64_bfd_from_remote_memory):
2909 Declare them.
2910 * elfxx-target.h (elf_backend_bfd_from_remote_memory): New macro.
2911 (elfNN_bed): Add that to the initializer.
2912
2913 2003-05-15 Roland McGrath <roland@redhat.com>
2914
2915 * elf.c (elfcore_grok_note): Grok NT_AUXV note, make ".auxv" section.
2916
2917 2003-05-20 Jakub Jelinek <jakub@redhat.com>
2918
2919 * elflink.h (elf_link_output_extsym): Only issue error about !=
2920 STV_DEFAULT symbols if they are bfd_link_hash_undefined.
2921
2922 2003-05-20 H.J. Lu <hongjiu.lu@intel.com>
2923
2924 * elflink.c (_bfd_elf_merge_symbol): Check ELF_LINK_DYNAMIC_DEF
2925 when removing the old definition for symbols with non-default
2926 visibility.
2927
2928 2003-05-18 Jason Eckhardt <jle@rice.edu>
2929
2930 * elf32-i860.c (elf32_i860_relocate_highadj): Simplify calculation.
2931
2932 2003-05-17 Andreas Schwab <schwab@suse.de>
2933
2934 * elf32-m68k.c (elf_m68k_check_relocs): Cache reloc section in
2935 elf_section_data during processing of pc-relative and absolute
2936 relocations.
2937 (elf_m68k_relocate_section): Use the cached reloc section instead
2938 of computing it again. Fix handling of visibility. Don't modify
2939 addend when copying over a relocation into the output.
2940
2941 2003-05-17 Alan Modra <amodra@bigpond.net.au>
2942
2943 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
2944 to trim plt entries. Move undefweak non-default visibility test..
2945 (allocate_dynrelocs): ..from here.
2946 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't test
2947 dynamic_sections_created here. Update comment. Move undefweak
2948 non-default visibility test..
2949 (allocate_dynrelocs): ..from here. Fix comment.
2950 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
2951 to trim plt entries. Move undefweak non-default visibility test..
2952 (allocate_dynrelocs): ..from here. Fix comment.
2953 * elflink.h (elf_link_output_extsym): Compare ELF_ST_VISIBILITY with
2954 STV_DEFAULT rather than comparing with zero.
2955 * elflink.c (_bfd_elf_merge_symbol): Likewise.
2956 (_bfd_elf_fix_symbol_flags): Likewise. Format comment.
2957
2958 2003-05-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2959
2960 * bfd.c (_bfd_get_gp_value): Prevent illegal access for abfd null
2961 pointers.
2962 (_bfd_set_gp_value): Likewise.
2963
2964 2003-05-16 Michael Snyder <msnyder@redhat.com>
2965 From Bernd Schmidt <bernds@redhat.com>
2966 * archures.c (bfd_mach_h8300sx): New.
2967 * bfd-in2.h: Regenerate.
2968 * cpu-h8300.c (h8300_scan)): Add support for h8300sx.
2969 (h8300sx_info_struct): New.
2970 (h8300s_info_struct): Link to it.
2971 * elf32-h8300.c (elf32_h8_mach): Add support for h8300sx.
2972 (elf32_h8_final_write_processing): Likewise.
2973 (elf32_h8_relax_section): Likewise.
2974
2975 2003-05-16 Kelley Cook <kelleycook@wideopenwest.com>
2976
2977 * config.bfd: Accept i[3-7]86 variants.
2978 * configure.host: Likewise.
2979 * configure.in: Likewise.
2980 * configure: Regenerate.
2981
2982 2003-05-15 H.J. Lu <hongjiu.lu@intel.com>
2983
2984 * elflink.c (_bfd_elf_fix_symbol_flags): Also hide protected
2985 symbol.
2986
2987 2003-05-15 H.J. Lu <hongjiu.lu@intel.com>
2988
2989 * elflink.h (elf_link_check_versioned_symbol): Also allow
2990 the base version.
2991
2992 2003-05-15 Alan Modra <amodra@bigpond.net.au>
2993 H.J. Lu <hongjiu.lu@intel.com>
2994
2995 * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL.
2996 (elf_i386_relocate_section): Likewise.
2997 * elf32-ppc.c (allocate_dynrelocs): Likewise.
2998 (ppc_elf_relocate_section): Likewise.
2999 * elf64-ppc.c (allocate_dynrelocs): Likewise.
3000 (ppc64_elf_relocate_section): Likewise.
3001
3002 2003-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3003
3004 * elf32-mips.c (gprel32_with_gp): Remove useless N64 ABI case.
3005
3006 2003-05-13 Stephane Carrez <stcarrez@nerim.fr>
3007
3008 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Check for
3009 processor capability, allow merge of HC12 and HCS12 in some cases.
3010 (m68hc11_elf_hash_table_create): Use bfd_malloc instead of bfd_zalloc.
3011 * cpu-m68hc12.c (bfd_m68hc12s_arch): New struct.
3012 (bfd_m68hc12_arch): Link it.
3013 (scan_mach): New function.
3014
3015 2003-05-13 Andrew Haley <aph@redhat.com>
3016
3017 * elf.c (bfd_elf_hash): Mask lower 32 bits of hash.
3018
3019 2003-05-13 Alan Modra <amodra@bigpond.net.au>
3020 H.J. Lu <hongjiu.lu@intel.com>
3021
3022 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Move from
3023 elf32-ppc.c. Add ELF_LINK_FORCED_LOCAL check.
3024 * elf32-ppc.c: (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Delete.
3025 (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for dynreloc check.
3026 (ppc_elf_relocate_section): Likewise.
3027 * elf64-ppc.c (allocate_dynrelocs): Likewise.
3028 (ppc64_elf_relocate_section): Likewise. Use for .got relocs too.
3029 (ppc64_elf_adjust_dynamic_symbol): Don't assume symbols with .plt
3030 relocs need no other types.
3031 * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for
3032 dynreloc check.
3033 (elf_i386_relocate_section): Likewise. Use for .got relocs too.
3034 (elf_i386_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL for
3035 .got relocs.
3036
3037 2003-05-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3038
3039 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): For weak symbols,
3040 copy ELF_LINK_NON_GOT_REF from weakdef.
3041 (allocate_dynrelocs): For undef weak syms with non-default
3042 visibility, a) don't allocate plt entries, b) don't allocate
3043 .got relocs, c) discard dyn rel space
3044 (sh_elf_relocate_section): d) don't generate .got relocs, e)
3045 don't generate dynamic relocs.
3046 (sh_elf_copy_indirect_symbol): Don't copy ELF_LINK_NON_GOT_REF
3047 for weakdefs when symbol already adjusted.
3048
3049 2003-05-12 Nick Clifton <nickc@redhat.com>
3050
3051 * elf32-xstormy16.c (xstormy16_elf_howto_table): use 'bitfield'
3052 overflow detection for R_XSTORMY16_16 reloc.
3053
3054 2003-05-12 Paul Clarke <paulc@senet.com.au>
3055
3056 * elf32-h8300.c: Fix typo in name of R_H8_DIR8 reloc.
3057
3058 2003-05-11 Jason Eckhardt <jle@rice.edu>
3059
3060 * elf32-i860.c (elf32_i860_relocate_highadj): Properly
3061 adjust upper bits.
3062 (elf32_i860_relocate_splitn): Obtain upper 5 bits from the
3063 proper place.
3064 (elf32_i860_relocate_pc16): Obtain upper 5 bits from the
3065 proper place.
3066
3067 2003-05-11 Andreas Schwab <schwab@suse.de>
3068
3069 * elf32-m68k.c (elf_m68k_relocate_section): Replace ugly
3070 complicated tests for unresolvable relocs with a simple direct
3071 scheme using "unresolved_reloc" var. Report some detail on
3072 bfd_reloc_outofrange and similar errors.
3073
3074 2003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
3075
3076 * elf32-s390.c (allocate_dynrelocs, elf_s390_relocate_section):
3077 Fix WILL_CALL_FINISH_DYNAMIC_SYMBOL call.
3078 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
3079 * elf64-s390.c: Likewise.
3080
3081 2003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
3082
3083 * elf32-s390.c (ELIMINATE_COPY_RELOCS): Define as one.
3084 (elf_s390_adjust_dynamic_symbol): For weak symbols, copy
3085 ELF_LINK_NON_GOT_REF from weakdef.
3086 (elf_s390_copy_indirect_symbol): Test whether the weakdef sym has
3087 already been adjusted before treating it specially.
3088 * el64-s390.c: Likwise.
3089
3090 2003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
3091
3092 * elf32-s390.c (allocate_dynrelocs): For undef weak syms with
3093 non-default visibility, a) don't make them dynamic, b) discard
3094 space for dynamic relocs.
3095 (elf_s390_relocate_section): Initialize the GOT entries and skip
3096 R_390_{8,16,32}/R_390_PC{16,16DBL,32DBL,32} for weak undefined
3097 symbols with non-default visibility.
3098 * elf64-s390.c: Likewise.
3099
3100 2003-05-09 Alan Modra <amodra@bigpond.net.au>
3101
3102 * cpu-arm.c (arm_check_note): Warning fix.
3103 * elf32-iq2000.c (iq2000_elf_check_relocs): Warning fixes. Arrange
3104 to keep relocs if edited.
3105 (iq2000_elf_print_private_bfd_data): Return TRUE.
3106 * elfxx-ia64.c (elfNN_ia64_relax_section): Use ELFNN_R_SYM, not
3107 ELF64_R_SYM.
3108 (elfNN_ia64_relax_ldxmov): Warning fix.
3109 * xtensa-isa.c (xtensa_add_isa): Warning fix.
3110 * xtensa-modules.c (get_num_opcodes): Warning fix.
3111
3112 2003-05-09 Andrey Petrov <petrov@netbsd.org>
3113
3114 * elf.c (elf_fake_sections): Use correct cast for sh_name.
3115
3116 2003-05-09 Alan Modra <amodra@bigpond.net.au>
3117
3118 * elflink.c (_bfd_elf_link_create_dynamic_sections): Move from
3119 elflink.h. Replace LOG_FILE_ALIGN with bed->s->log_file_align.
3120 (_bfd_elf_create_dynamic_sections): Use bed->s->log_file_align.
3121 (bfd_elf_record_link_assignment): Move from elflink.h.
3122 (_bfd_elf_merge_symbol): Likewise.
3123 (_bfd_elf_add_default_symbol): Likewise.
3124 (_bfd_elf_export_symbol): Likewise.
3125 (_bfd_elf_link_find_version_dependencies): Likewise.
3126 (_bfd_elf_link_assign_sym_version): Likewise.
3127 (_bfd_elf_link_read_relocs): Likewise.
3128 (_bfd_elf_link_size_reloc_section): Likewise.
3129 (_bfd_elf_fix_symbol_flags): Likewise.
3130 (_bfd_elf_adjust_dynamic_symbol): Likewise.
3131 (_bfd_elf_link_sec_merge_syms): Likewise.
3132 (elf_link_read_relocs_from_section): Likewise. Use bed->s->sizeof_rel
3133 and bed->s->sizeof_rela.
3134 (_bfd_elf_link_output_relocs): Likewise.
3135 * elf-bfd.h (struct elf_size_info): Rename file_align to
3136 log_file_align.
3137 (struct elf_info_failed): Move from elflink.h.
3138 (struct elf_assign_sym_version_info): Likewise.
3139 (struct elf_find_verdep_info): Likewise.
3140 (_bfd_elf_create_dynamic_sections): Delete duplicate declaration.
3141 (_bfd_elf_merge_symbol, _bfd_elf_add_default_symbol,
3142 _bfd_elf_export_symbol, _bfd_elf_link_find_version_dependencies,
3143 _bfd_elf_link_assign_sym_version,
3144 _bfd_elf_link_create_dynamic_sections, _bfd_elf_link_read_relocs,
3145 _bfd_elf_link_size_reloc_section, _bfd_elf_link_output_relocs,
3146 _bfd_elf_fix_symbol_flags, _bfd_elf_adjust_dynamic_symbol,
3147 _bfd_elf_link_sec_merge_syms): Declare.
3148 (bfd_elf32_link_create_dynamic_sections): Don't declare.
3149 (_bfd_elf32_link_read_relocs): Likewise.
3150 (bfd_elf64_link_create_dynamic_sections): Likewise.
3151 (_bfd_elf64_link_read_relocs): Likewise.
3152 * elflink.h: Move lots o' stuff elsewhere.
3153 * bfd-in.h (bfd_elf32_record_link_assignment): Don't declare.
3154 (bfd_elf64_record_link_assignment): Likewise.
3155 (bfd_elf_record_link_assignment): Declare.
3156 * bfd-in2.h: Regenerate.
3157 * elfcode.h (elf_link_create_dynamic_sections): Don't declare.
3158 (NAME(_bfd_elf,size_info)): Adjust for log_file_align.
3159 * elf.c (_bfd_elf_init_reloc_shdr): Adjust for bed->s->log_file_align.
3160 (assign_file_positions_for_segments): Likewise.
3161 (assign_file_positions_except_relocs): Likewise.
3162 (swap_out_syms, elfcore_write_note): Likewise.
3163 * elf-m10200.c: Adjust for changed function names.
3164 * elf-m10300.c: Likewise.
3165 * elf32-arm.h: Likewise.
3166 * elf32-h8300.c: Likewise.
3167 * elf32-hppa.c: Likewise.
3168 * elf32-ip2k.c: Likewise.
3169 * elf32-m32r.c: Likewise.
3170 * elf32-m68hc11.c: Likewise.
3171 * elf32-m68hc1x.c: Likewise.
3172 * elf32-m68k.c: Likewise.
3173 * elf32-mips.c: Likewise.
3174 * elf32-ppc.c: Likewise.
3175 * elf32-sh.c: Likewise.
3176 * elf32-v850.c: Likewise.
3177 * elf32-xtensa.c: Likewise.
3178 * elf64-alpha.c: Likewise.
3179 * elf64-hppa.c: Likewise.
3180 * elf64-mmix.c: Likewise.
3181 * elf64-ppc.c: Likewise.
3182 * elf64-sh64.c: Likewise.
3183 * elfxx-ia64.c: Likewise.
3184 * elfxx-mips.c: Likewise.
3185 (MIPS_ELF_LOG_FILE_ALIGN): Use log_file_align.
3186 * elf64-alpha.c (alpha_elf_size_info): Adjust for log_file_align.
3187 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
3188 * elf64-mips.c (mips_elf64_size_info): Likewise.
3189 * elf64-s390.c (s390_elf64_size_info): Likewise.
3190 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
3191
3192 2003-05-08 H.J. Lu <hongjiu.lu@intel.com>
3193
3194 * elflink.h (elf_add_default_symbol): After skipping the
3195 unversioned symbol, go to non-default one.
3196
3197 2003-05-07 H.J. Lu <hongjiu.lu@intel.com>
3198
3199 * elfxx-ia64.c (_bfd_elf_link_hash_hide_symbol): Also clear the
3200 want_plt field.
3201 (elfNN_ia64_relocate_section): Don't do dynamic symbol lookup
3202 for symbols with non-default visibility.
3203
3204 2003-05-07 H.J. Lu <hongjiu.lu@intel.com>
3205
3206 * elflink.h (elf_link_check_versioned_symbol): Also handle the
3207 case that a DSO references a hidden symbol which may be
3208 satisfied by a versioned symbol in another DSO.
3209 (elf_link_output_extsym): Check versioned definition for hidden
3210 symbol referenced by a DSO.
3211
3212 2003-05-07 Nick Clifton <nickc@redhat.com>
3213
3214 * elf32-xstormy16.c (xstormy16_elf_howto_table): Reset
3215 R_XSTORMY16_16 reloc to ignore overflows.
3216
3217 2003-05-06 Alexandre Oliva <aoliva@redhat.com>
3218
3219 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Improve
3220 error message for mixing different-endian files. Check for ABI
3221 compatibility of input files with the selected emulation.
3222
3223 2003-05-05 Alan Modra <amodra@bigpond.net.au>
3224
3225 * elf32-i386.c (allocate_dynrelocs): For undef weak syms with
3226 non-default visibility, a) don't make them dynamic, b) discard
3227 space for dynamic relocs.
3228 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
3229
3230 * elf32-ppc.c (allocate_dynrelocs): For undef weak syms with
3231 non-default visibility, a) don't allocate plt entries, b) don't
3232 allocate .got relocs, c) discard dyn rel space,
3233 (ppc_elf_relocate_section): d) don't generate .got relocs, e)
3234 don't generate dynamic relocs.
3235 * elf64-ppc.c (allocate_dynrelocs): As above.
3236 (ppc64_elf_relocate_section): As above.
3237
3238 2003-05-05 Andreas Jaeger <aj@suse.de>
3239
3240 * elf64-x86-64.c (allocate_dynrelocs): Don't allocate dynamic
3241 relocation entries for weak undefined symbols with non-default
3242 visibility.
3243 (elf64_x86_64_relocate_section): Initialize the GOT entries and
3244 skip R_386_32/R_386_PC32 for weak undefined symbols with
3245 non-default visibility.
3246
3247 2003-05-04 H.J. Lu <hjl@gnu.org>
3248
3249 * elf32-i386.c (allocate_dynrelocs): Don't allocate dynamic
3250 relocation entries for weak undefined symbols with non-default
3251 visibility.
3252 (elf_i386_relocate_section): Initialize the GOT entries and
3253 skip R_386_32/R_386_PC32 for weak undefined symbols with
3254 non-default visibility.
3255
3256 * elfxx-ia64.c (allocate_fptr): Don't allocate function
3257 descriptors for weak undefined symbols with non-default
3258 visibility.
3259 (allocate_dynrel_entries): Don't allocate relocation entries
3260 for symbols resolved to 0.
3261 (set_got_entry): Don't install dynamic relocation for weak
3262 undefined symbols with non-default visibility.
3263 (set_pltoff_entry): Likewise.
3264
3265 * elflink.h (elf_fix_symbol_flags): Hide weak undefined symbols
3266 with non-default visibility.
3267 (elf_link_output_extsym): Don't make weak undefined symbols
3268 with non-default visibility dynamic.
3269
3270 2003-05-04 H.J. Lu <hjl@gnu.org>
3271
3272 * elflink.h (elf_merge_symbol): Correctly handle weak definition.
3273
3274 2003-05-04 H.J. Lu <hjl@gnu.org>
3275
3276 * elflink.h (elf_merge_symbol): Don't record a hidden/internal
3277 symbol dynamic. Check indirection when removing the old
3278 definition for symbols with non-default visibility.
3279 (elf_add_default_symbol): Skip when told by elf_merge_symbol.
3280
3281 2003-05-02 Nick Clifton <nickc@redhat.com>
3282
3283 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make the
3284 R_XSTORMY16_8 and R_XSTORMY16_16 relocs detect and complain about
3285 unsigned overflow.
3286
3287 2003-05-02 Andreas Jaeger <aj@suse.de>
3288
3289 * elf64-x86-64.c (elf_x86_64_copy_indirect_symbol): Don't copy
3290 ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
3291 (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
3292 (elf_x86_64_adjust_dynamic_symbol): For weak symbols, copy
3293 ELF_LINK_NON_GOT_REF from weakdef.
3294
3295 2003-05-02 Charles Lepple <clepple@ghz.cc>
3296 Nick Clifton <nickc@redhat.com>
3297
3298 * acinclude.m4: Fix name of --enable-install-libbfd switch.
3299 * aclocal.m4: Regenerate.
3300 * configure: Regenerate.
3301 * Makefile.in: Regenerate.
3302
3303 2003-05-01 Alan Modra <amodra@bigpond.net.au>
3304
3305 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Test whether the
3306 weakdef sym has already been adjusted before treating it specially.
3307 * elf32-i386.c (elf_i386_copy_indirect_symbol): Don't copy
3308 ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
3309 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
3310 (ppc64_elf_check_relocs): Set ELF_LINK_NON_GOT_REF.
3311
3312 2003-04-28 H.J. Lu <hjl@gnu.org>
3313
3314 * elfxx-ia64.c (elfNN_ia64_relax_section): Relax ldxmov during
3315 the relax finalize pass.
3316
3317 * section.c (struct sec): Add need_finalize_relax and remove
3318 flag11.
3319 (STD_SECTION): Update struct sec initializer.
3320 * bfd-in2.h: Regenerated.
3321
3322 2003-04-28 H.J. Lu <hjl@gnu.org>
3323
3324 * elflink.h (elf_merge_symbol): Call elf_backend_copy_indirect_symbol
3325 to copy any information related to dynamic linking when we flip
3326 the indirection.
3327
3328 2003-04-27 H.J. Lu <hjl@gnu.org>
3329
3330 * elf-bfd.h (ELF_LINK_DYNAMIC_DEF): New.
3331 (ELF_LINK_DYNAMIC_WEAK): New.
3332
3333 * elflink.h (elf_merge_symbol): Add one argument to indicate if
3334 a symbol should be skipped. Ignore definitions in dynamic
3335 objects for symbols with non-default visibility.
3336 (elf_add_default_symbol): Adjusted.
3337 (elf_link_add_object_symbols): Check if a symbol should be
3338 skipped. Don't merge the visibility field with the one from
3339 a dynamic object.
3340 (elf_link_check_versioned_symbol): Use undef_bfd.
3341 (elf_link_output_extsym): Warn if a forced local symbol is
3342 referenced from dynamic objects. Make non-weak undefined symbol
3343 with non-default visibility a fatal error.
3344
3345 2003-04-27 Daniel Jacobowitz <drow@mvista.com>
3346
3347 * configure.in: Bump version on HEAD to 2.14.90.
3348 * configure: Regenerated.
3349
3350 2003-04-26 Stephane Carrez <stcarrez@nerim.fr>
3351
3352 PR savannah/3331:
3353 * elf32-m68hc11.c (m68hc11_elf_relax_section): Clear prev_insn_group
3354 when we couldn't relax something.
3355
3356 2003-04-25 Alan Modra <amodra@bigpond.net.au>
3357
3358 * elflink.h (elf_merge_symbol): When we find a regular definition
3359 for an indirect symbol, flip the indirection so that the old
3360 direct symbol now points to the new definition.
3361
3362 2003-04-24 Roland McGrath <roland@redhat.com>
3363
3364 * elf.c (bfd_section_from_phdr): Map PT_GNU_EH_FRAME to "eh_frame_hdr".
3365
3366 2003-04-24 Alan Modra <amodra@bigpond.net.au>
3367
3368 * elf32-ppc.c: Formatting and comment fixes.
3369 (ELIMINATE_COPY_RELOCS): Move before ppc_elf_copy_indirect_symbol.
3370 (ppc_elf_copy_indirect_symbol): Copy flags here for weakdefs.
3371
3372 2003-04-24 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
3373
3374 * archures.c (bfd_mach_h8300hn, bfd_mach_h8300sn): Added.
3375 * bfd-in2.h: Rebuilt.
3376 * coff-h8300.c (BADMAG): Add check for H8300HNBADMAG & H8300SNBADMAG.
3377 * coffcode.h (coff_set_arch_mach_hook): Add case for H8300HNMAGIC
3378 & H8300SNMAGIC.
3379 (coff_set_flags): Add case for bfd_mach_h8300hn & bfd_mach_h8300sn.
3380 * cpu-h8300.c (h8300_scan): Handle h8300hn, h8300sn.
3381 (h8300sn_info_struct, h8300hn_info_struct): New.
3382 * elf32-h8300.c (elf32_h8_mach): Handle case for h8300hn & h8300sn
3383 (elf32_h8_final_write_processing): Likewise.
3384
3385 2003-04-23 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3386
3387 * elf32-sh.c (tpoff): New.
3388 (struct elf_sh_dyn_relocs): Remove tls_tpoff32.
3389 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
3390 (allocate_dynrelocs): Don't make unnecessary dynamic TLS
3391 relocations. Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses.
3392 (sh_elf_relocate_section): Likewise. Remove unnecessary tests.
3393 (dtpoff_base): Fix wrong indentation.
3394 (sh_elf_check_relocs): Don't set DF_STATIC_TLS flag with non-TLS
3395 relocations. Don't set tls_tpoff32 flag. Don't make unnecessary
3396 R_SH_TLS_TPOFF32 relocations.
3397
3398 2003-04-23 J"orn Rennecke <joern.rennecke@superh.com>
3399
3400 * archures.c (enum bfd_architecture): Amend comment to refer to SuperH.
3401 * cpu-sh.c: Likewise.
3402 * elf32-sh.c: Likewise.
3403 * reloc.c (bfd_reloc_code_real): Likewise.
3404 * elf32-sh64-com.c: Change comment to refer to SuperH.
3405 * elf32-sh64.c: Likewise.
3406 * elf64-sh64.c: Likewise.
3407 * bfd-in2.h (enum bfd_architecture): Regenerate.
3408
3409 2003-04-23 Alan Modra <amodra@bigpond.net.au>
3410
3411 From Julien LEMOINE <speedblue@debian.org>
3412 * elf32-i386.c (elf_i386_info_to_howto): Delete.
3413 (elf_info_to_howto): Define as elf_i386_info_to_howto_rel.
3414
3415 2003-04-22 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
3416
3417 * archures.c: Replace references to Mitsubishi M32R with references
3418 to Renesas M32R.
3419 * relocs.c: Likewise.
3420 * bfd-in2.h: Regenerate.
3421
3422 2003-04-21 Richard Henderson <rth@redhat.com>
3423
3424 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Return false for an
3425 executable when a symbol is defined both regular and dynamic.
3426
3427 2003-04-21 Stephane Carrez <stcarrez@nerim.fr>
3428
3429 * Makefile.am (BFD32_BACKENDS): Add elf32-m68hc1x.lo.
3430 (elf32-m68hc1x.lo): Update dependencies
3431 * configure.in: Add elf32-m68hc1x.lo.
3432 * configure: Rebuild.
3433 * Makefile.in: Rebuild.
3434
3435 2003-04-21 Stephane Carrez <stcarrez@nerim.fr>
3436
3437 * elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
3438 (m68hc11_elf_hash_table_create): New function.
3439 (elf32_m68hc11_link_hash_table_free): New function.
3440 (stub_hash_newfunc): New function.
3441 (m68hc11_add_stub): New function.
3442 (elf32_m68hc11_add_symbol_hook): New function.
3443 (elf32_m68hc11_setup_section_lists): New function.
3444 (elf32_m68hc11_next_input_section): New function.
3445 (elf32_m68hc11_size_stubs): New function.
3446 (elf32_m68hc11_build_stubs): New function.
3447 (m68hc11_get_relocation_value): New function.
3448 (elf32_m68hc11_relocate_section): Call the above to redirect
3449 some relocations to the trampoline code.
3450 (m68hc11_elf_export_one_stub): New function.
3451 (m68hc11_elf_set_symbol): New function.
3452 (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse.
3453 (m68hc11_elf_get_bank_parameters): Get parameters only when the info
3454 is not yet initialized.
3455
3456 * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
3457 (elf32_m68hc11_stub_hash_entry): New struct.
3458 (m68hc11_page_info): Add trampoline handler address.
3459 (m68hc11_elf_link_hash_table): Add stubs generation members.
3460 (elf32_m68hc11_add_symbol_hook): Declare.
3461 (elf32_m68hc11_setup_section_lists): Declare.
3462 (elf32_m68hc11_size_stubs): Declare.
3463 (elf32_m68hc11_build_stubs): Declare.
3464
3465 * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c.
3466 (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise.
3467 (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto.
3468 (_bfd_m68hc11_elf_set_private_flags): Ditto.
3469 (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto.
3470 (_bfd_m68hc11_elf_print_private_bfd_data): Ditto.
3471 (bfd_elf32_bfd_link_hash_table_create): Define.
3472 (elf_backend_add_symbol_hook): Define.
3473 (m68hc11_elf_bfd_link_hash_table_create): New function.
3474 (m68hc11_elf_build_one_stub): New function.
3475 (m68hc11_elf_size_one_stub): New function.
3476 (m68hc11_elf_bfd_link_hash_table_create): Install the above.
3477 (bfd_elf32_bfd_link_hash_table_create): Define.
3478
3479 * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove.
3480 (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked.
3481 (m68hc12_phys_addr): Ditto.
3482 (m68hc12_phys_page): Ditto.
3483 (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c.
3484 (elf32_m68hc11_gc_mark_hook): Likewise.
3485 (elf32_m68hc11_gc_sweep_hook): Likewise.
3486 (elf32_m68hc11_check_relocs): Likewise.
3487 (elf32_m68hc11_relocate_section): Likewise.
3488 (_bfd_m68hc12_elf_set_private_flags): Likewise.
3489 (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise.
3490 (_bfd_m68hc12_elf_print_private_bfd_data): Likewise.
3491 (m68hc12_elf_build_one_stub): New function.
3492 (m68hc12_elf_size_one_stub): New function.
3493 (m68hc12_elf_bfd_link_hash_table_create): New function, use the above.
3494 (elf_backend_add_symbol_hook): Define.
3495 (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
3496
3497 2003-04-18 Nick Clifton <nickc@redhat.com>
3498
3499 * format.c (bfd_check_format_matches): Only check associated
3500 vector if the matching_vector has been created.
3501
3502 2003-04-15 Alexandre Oliva <aoliva@redhat.com>
3503
3504 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Fix typo in
3505 2003-04-09's change.
3506
3507 2003-04-15 Brian Ford <ford@vss.fsi.com>
3508
3509 * peicode.h (coff_swap_scnhdr_in): If a section holds
3510 uninitialized data and is from an object file or from an
3511 executable image that has not initialized the s_size field, or if
3512 the physical size is padded, use the virtual size (stored in
3513 s_paddr) instead.
3514
3515 2003-04-15 H.J. Lu <hjl@gnu.org>
3516
3517 * elflink.h (elf_link_add_object_symbols): Properly report
3518 filename for alignment reduction.
3519
3520 2003-04-15 Rohit Kumar Srivastava <rohits@kpitcummins.com>
3521
3522 * archures.c: Replace occurrances of 'Hitachi' with 'Renesas'.
3523 * reloc.c: Likewise.
3524 * coff-h8300.c: Likewise.
3525 * coff-h8500.c: Likewise.
3526 * coff-sh.c: Likewise.
3527 * cpu-h8300.c: Likewise.
3528 * cpu-sh.c: Likewise.
3529 * elf32-h8300.c: Likewise.
3530 * elf32-sh.c: Likewise.
3531 * elf32-sh64-com.c: Likewise.
3532 * elf32-sh64.c: Likewise.
3533 * elf64-sh64.c: Likewise.
3534 * bfd-in2.h: Regenerate.
3535
3536 2003-04-14 H.J. Lu <hjl@gnu.org>
3537
3538 * elflink.h (elf_link_add_object_symbols): Maintain maximum
3539 alignment for common symbols. Warn reducing alignment for
3540 common symbols. Report old filename when symbol size changes.
3541
3542 2003-04-12 Alexandre Oliva <aoliva@redhat.com>
3543
3544 * elfxx-mips.c (mips_elf_calculate_relocation): Adjust two other
3545 occurrences of the same test changed in the previous patch.
3546 Optimize.
3547
3548 2003-04-11 Alexandre Oliva <aoliva@redhat.com>
3549
3550 * elfxx-mips.c (mips_elf_get_global_gotsym_index): New.
3551 (mips_elf_calculate_relocation): Decay GOT_PAGE/GOT_OFST to
3552 GOT_DISP/addend only if the symbol got a global GOT entry.
3553
3554 2003-04-10 Alexandre Oliva <aoliva@redhat.com>
3555
3556 * elfxx-mips.c (mips_elf_calculate_relocation): Decay
3557 GOT_PAGE/GOT_OFST referencing overridable symbol to
3558 GOT_DISP/addend.
3559 (_bfd_mips_elf_check_relocs): Handle GOT_PAGE referencing
3560 global symbol as GOT_DISP.
3561
3562 2003-04-10 Bob Wilson <bob.wilson@acm.org>
3563
3564 * elf32-xtensa.c (elf_xtensa_relocate_section): Don't continue to the
3565 next relocation on an undefined symbol.
3566
3567 2003-04-09 Richard Henderson <rth@redhat.com>
3568
3569 * elf64-alpha.c (elf64_alpha_relocate_section) <R_ALPHA_GPREL32>:
3570 Ignore relocations against r_symndx == 0.
3571
3572 2003-04-09 H.J. Lu <hjl@gnu.org>
3573
3574 * elf64-alpha.c (elf64_alpha_relocate_section): Don't return
3575 FALSE for undefined symbols.
3576 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
3577
3578 2003-04-09 Alexandre Oliva <aoliva@redhat.com>
3579
3580 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Try DWARF3-standard
3581 and IRIX-specific shift-to-64-bit 4-byte lengths before following
3582 addr_size.
3583
3584 2003-04-08 Alexandre Oliva <aoliva@redhat.com>
3585
3586 * elf32-mips.c (bfd_elf32_bfd_reloc_type_lookup): Detect (ctor)
3587 pointer size from ABI, not arch_bits_per_address.
3588
3589 2003-04-07 Kevin Buettner <kevinb@redhat.com>
3590
3591 * elfn32-mips.c (elf32_mips_grok_prstatus): Adjust core file related
3592 constants for n32 ABI.
3593
3594 2003-04-06 Andrew Cagney <cagney@redhat.com>
3595
3596 * simple.c (bfd_simple_get_relocated_section_contents): Disable
3597 free that leads to GDB vs BFD memory corruption.
3598
3599 2003-04-04 Stephane Carrez <stcarrez@nerim.fr>
3600
3601 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Also adjust
3602 symbols that mark the end of the section.
3603 (m68hc11_elf_relax_section): Use R_M68HC11_PCREL_8 relocs when
3604 converting to a relative branch so that the offset is computed after
3605 the relaxation; also relocate a jsr into a bsr if possible but don't
3606 relax them if they are to a far symbol as we need to call the
3607 trampoline code.
3608 (elf_m68hc11_howto_table): Set pcrel_offset to true.
3609
3610 2003-04-04 Svein E. Seldal <Svein.Seldal@solidas.com>
3611
3612 * archures.c: Namespace cleanup. Rename bfd_mach_c3x to
3613 bfd_mach_tic3x and bfd_mach_c4x to bfd_mach_tic4x
3614 * bfd-in2.h: Regenerate
3615 * coff-tic4x.c: Namespace cleanup. Replace s/c4x/tic4x/
3616 * cpu-tic4x.c: Ditto
3617
3618 2003-04-03 Nick Clifton <nickc@redhat.com>
3619
3620 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Compute ps and ss
3621 differently for object files and executables.
3622 * peicode.h (coff_swap_scnhdr_in): Only set the s_size field
3623 for object files or for executables who have not already
3624 initialised the field.
3625 * libpei.h (bfd_pe_executable_p): New macro. Return true if
3626 the PE format bfd is an executable.
3627
3628 2003-04-03 Alan Modra <amodra@bigpond.net.au>
3629
3630 * elf32-ppc.c (ppc_elf_check_relocs): Don't use SYMBOL_REFERENCES_LOCAL
3631 here as it's too early to reliably determine locality.
3632 (ppc_elf_gc_sweep_hook): Likewise.
3633 (SYMBOL_REFERENCES_LOCAL): Expand comment.
3634
3635 2003-04-02 Bob Wilson <bob.wilson@acm.org>
3636
3637 * xtensa-modules.c: Remove comment indicating that this is a
3638 generated file.
3639
3640 2003-04-02 Alan Modra <amodra@bigpond.net.au>
3641
3642 * elfxx-mips.c (_bfd_mips_elf_hide_symbol): Test for NULL dynobj.
3643
3644 2003-04-01 Bob Wilson <bob.wilson@acm.org>
3645
3646 * Makefile.am (ALL_MACHINES): Add cpu-xtensa.lo.
3647 (ALL_MACHINES_CFILES): Add cpu-xtensa.c.
3648 (BFD32_BACKENDS): Add elf32-xtensa.lo, xtensa-isa.lo, and
3649 xtensa-modules.lo.
3650 (BFD32_BACKENDS_CFILES): Add elf32-xtensa.c, xtensa-isa.c, and
3651 xtensa-modules.c.
3652 (cpu-xtensa.lo): New target.
3653 (elf32-xtensa.lo): Likewise.
3654 (xtensa-isa.lo): Likewise.
3655 (xtensa-modules.lo): Likewise.
3656 * Makefile.in: Regenerate.
3657 * archures.c (bfd_architecture): Add bfd_{arch,mach}_xtensa.
3658 (bfd_archures_list): Add bfd_xtensa_arch.
3659 * config.bfd: Handle xtensa-*-*.
3660 * configure.in: Handle bfd_elf32_xtensa_{le,be}_vec.
3661 * configure: Regenerate.
3662 * reloc.c: Add BFD_RELOC_XTENSA_{RTLD,GLOB_DAT,JMP_SLOT,RELATIVE,
3663 PLT,OP0,OP1,OP2,ASM_EXPAND,ASM_SIMPLIFY}.
3664 * targets.c (bfd_elf32_xtensa_be_vec): Declare.
3665 (bfd_elf32_xtensa_le_vec): Likewise.
3666 (bfd_target_vector): Add bfd_elf32_xtensa_{be,le}_vec.
3667 * cpu-xtensa.c: New file.
3668 * elf32-xtensa.c: Likewise.
3669 * xtensa-isa.c: Likewise.
3670 * xtensa-modules.c: Likewise.
3671 * libbfd.h: Regenerate.
3672 * bfd-in2.h: Likewise.
3673
3674 2003-04-01 Nick Clifton <nickc@redhat.com>
3675
3676 * archures.c (bfd_mach_arm_unknown): Define.
3677 * bfd-in.h (bfd_arm_merge_machines, bfd_arm+update_notes,
3678 bfd_arm_get_mach_from_notes): Prototype.
3679 * bfd-in2.h: Regenerate.
3680 * coff-arm.c (coff_arm_merge_private_bfd_data): Call
3681 bfd_arm_merge_machines.
3682 (coff_arm_final_link_postscript): Call bfd_arm_update_notes.
3683 * coffcode.h (coff_set_arch_mach_hook): Call
3684 bfd_arm_get_mach_from_notes.
3685 * coffgen.c (coff_real_object_p): Revert previous delta.
3686 * cpu_arm.c (arm_check_note): New function. Examine a note in a
3687 .note section.
3688 (bfd_arm_merge_machines): New function: Handle the merging of ARM
3689 binaries compiled for different architectures..
3690 (bfd_arm_update_notes): New function: Update an ARM note section.
3691 (bfd_arm_get_mach_from_notes): New function: Extract a bfd machine
3692 number from an ARM note section.
3693 * elf32-arm.h (elf32_arm_object_p): Use
3694 bfd_arm_get_mach_from_notes.
3695 (elf32_arm_merge_private_bfd_data): Use bfd_arm_merge_machines.
3696 (elf32_arm_final_write_processing): Use bfd_arm_update_notes.
3697
3698 2003-04-01 Ben Elliston <bje@wasabisystems.com>
3699
3700 * dwarf2.c (read_attribute_value): Correct typo in comment.
3701
3702 2003-04-01 Nick Clifton <nickc@redhat.com>
3703
3704 * dwarf2.c (concat_filename): Use bfd_malloc() and strdup()
3705 instead of concat().
3706 (decode_line_info): Only free filename if it is not NULL.
3707 (add_line_info): Make a copy of the filename when storing it into
3708 the info structure.
3709
3710 2003-03-31 Andreas Schwab <schwab@suse.de>
3711 Daniel Jacobowitz <drow@mvista.com>
3712
3713 * simple.c (bfd_simple_get_relocated_section_contents): Add
3714 parameter symbol_table. Optionally use it instead of the symbol
3715 table from the bfd. Save and restore output offsets and output
3716 sections around bfd_get_relocated_section_contents. Fix a memory
3717 leak.
3718 (simple_save_output_info, simple_restore_output_info): New
3719 functions.
3720 * bfd-in2.h: Regenerate.
3721 * dwarf2.c (read_abbrevs): Use
3722 bfd_simple_get_relocated_section_contents instead of
3723 bfd_get_section_contents.
3724 (decode_line_info): Likewise.
3725 (_bfd_dwarf2_find_nearest_line): Likewise. Don't call
3726 find_rela_addend.
3727 (find_rela_addend): Remove.
3728 * elfxx-ia64.c (elfNN_ia64_reloc): Weaken sanity check for
3729 debugging sections.
3730 (elfNN_ia64_hash_table_create): Create the hash table with malloc,
3731 not bfd_zalloc.
3732
3733 2003-03-31 David Heine <dlheine@suif.stanford.edu>
3734
3735 * aoutx.h (aout_link_hash_table_create): Use bfd_malloc instead of
3736 bfd_alloc.
3737 * dwarf2.c (concat_filename): Always allocate space for the
3738 returned filename.
3739 (decode_line_info): Free the allocated filename returned by
3740 concat_filename.
3741 * elf-eh-frame.c (bfd_elf_write_section_eh_frame): Fix memory leaks.
3742 * elf.c (copy_private_bfd_data): Likewise.
3743 (_bfd_elf_slurp_version_tables): Fix bug freeing contents pointer.
3744 * elflink.h (elf_link_sort_relocs): Fix memory leak.
3745 * format.c (bfd_check_format_matches): Likewise.
3746 * linker.c (bfd_generic_final_link): Likewise.
3747 * opncls.c (find_separate_debug_info): Likewise.
3748 * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
3749
3750 2003-03-28 H.J. Lu <hjl@gnu.org>
3751
3752 * elflink.h (elf_link_add_object_symbols): Correctly combine
3753 visibilities.
3754
3755 2003-03-27 Jakub Jelinek <jakub@redhat.com>
3756
3757 * elfxx-ia64.c (elfNN_ia64_relax_section): Reset self_dtpmod_offset
3758 to -1 before recomputing got offsets.
3759
3760 2003-03-26 Andreas Schwab <schwab@suse.de>
3761
3762 * elf32-m68k.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
3763 (elf_m68k_relocate_section): Use it to correctly handle symbols
3764 forced to be local.
3765 (elf_m68k_finish_dynamic_symbol): Emit RELATIVE reloc for got
3766 entries for symbols that are forced to be local.
3767
3768 2003-03-25 Alexandre Oliva <aoliva@redhat.com>
3769
3770 * elfxx-mips.c (_bfd_mips_relax_section): New function.
3771 * elfxx-mips.h (_bfd_mips_relax_section): Declare.
3772 * elfn32-mips.c, elf64-mips.c: Use it.
3773
3774 2003-03-25 Stan Cox <scox@redhat.com>
3775 Nick Clifton <nickc@redhat.com>
3776
3777 Contribute support for Intel's iWMMXt chip - an ARM variant:
3778
3779 * archures.c: Add bfd_mach_arm_iWMMXt.
3780 * reloc.c: Add BFD_RELOC_ARM_CP_OFF_IMM_S2.
3781 * bfd-in2.h: Regenerate.
3782 * libbfd.h: Regenerate.
3783 * coff-arm.c (coff_arm_merge_private_bfd_data): Allow iWMMXt
3784 object files to be linked with XScale ones.
3785 (coff_arm_final_link_postscript): Update note section.
3786 * coffcode.h (coff_set_arch_mach_hook): Handle note section.
3787 * coffgen.c (coff_real_object_p): Call bfd_coff_set_arch_mach_hook
3788 after identifying a coff binary.
3789 * cpu-arm.c (processors): Add iWMMXt.
3790 (arch_inf): Likewise.
3791 * elf32-arm.h (arm_object_p): Handle note section.
3792 (elf32_arm_merge_private_bfd_data): Allow iWMMXt object files to
3793 be linked with XScale ones.
3794 (elf32_arm_section_flags): New function: Set flags on note section.
3795 (elf32_arm_final_write_processing): Handle note section.
3796
3797 2003-03-21 DJ Delorie <dj@redhat.com>
3798
3799 * elf32-xstormy16.c (elf32_xstormy16_relocate_section): Call
3800 _bfd_elf_rela_local_sym.
3801
3802 2003-03-20 H.J. Lu <hjl@gnu.org>
3803
3804 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't try relax for
3805 non-ELF outputs.
3806
3807 2003-03-20 Nick Clifton <nickc@redhat.com>
3808
3809 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Initialise $idata2 and
3810 $idata5 in case bfd_coff_final_link is not called.
3811
3812 2003-03-19 Jakub Jelinek <jakub@redhat.com>
3813
3814 * elf64-sparc.c (struct sparc64_elf_section_data): Add reloc_count
3815 field.
3816 (canon_reloc_count): Define.
3817 (sparc64_elf_slurp_one_reloc_table, sparc64_elf_slurp_reloc_table,
3818 sparc64_elf_canonicalize_dynamic_reloc): Use it instead of
3819 reloc_count.
3820 (sparc64_elf_canonicalize_reloc): New routine.
3821 (bfd_elf64_canonicalize_reloc): Define.
3822
3823 2003-03-18 Jakub Jelinek <jakub@redhat.com>
3824
3825 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle relaxation
3826 againt mergeable sections. Take r_addend into account when caching
3827 trampolines.
3828
3829 2003-03-18 Richard Henderson <rth@redhat.com>
3830
3831 * elfxx-ia64.c (get_dyn_sym_info): Return NULL gracefully for
3832 local symbols that have no dyninfo.
3833
3834 2003-03-14 Gene Smith <gene.smith@siemens.com>
3835
3836 * ieee.c (ieee_write_expression): Handle the case where symbol is
3837 NULL.
3838 General formatting improvements.
3839
3840 2003-03-13 Nick Clifton <nickc@redhat.com>
3841
3842 * configure.in (LINGUAS): Add zh_CN.
3843 * configure: Regenerate.
3844 * po/zh_CN.po: New file.
3845
3846 2003-03-13 Elias Athanasopoulos <elathan@phys.uoa.gr>
3847
3848 * aout-cris.c (BYTES_IN_WORD): Don't define.
3849 aout-encap.c: Likewise.
3850 aout-ns32k.c: Likewise.
3851 aout-tic30.c: Likewise.
3852 hp300bsd.c: Likewise.
3853 i386aout.c: Likewise.
3854 i386dynix.c: Likewise.
3855 i386linux.c: Likewise.
3856 i386lynx.c: Likewise.
3857 i386mach3.c: Likewise.
3858 m68k4knetbsd.c: Likewise.
3859 m68klinux.c: Likewise.
3860 m68klynx.c: Likewise.
3861 m68knetbsd.c: Likewise.
3862 m88kmach3.c: Likewise.
3863 mipsbsd.c: Likewise.
3864 newsos3.c: Likewise.
3865 sparclinux.c: Likewise.
3866 sparclynx.c: Likewise.
3867 sparcnetbsd.c: Likewise.
3868 vaxbsd.c: Likewise. Fix comment formatting.
3869
3870 2003-03-12 Alexandre Oliva <aoliva@redhat.com>
3871
3872 * Reverted 2003-03-02's patch.
3873
3874 * elfxx-target.h (bfd_elfNN_canonicalize_reloc): Make it
3875 overridable.
3876 * elf64-mips.c (mips_elf64_canonicalize_reloc,
3877 mips_elf64_get_dynamic_reloc_upper_bound,
3878 mips_elf64_canonicalize_dynamic_reloc): New, adapted from elf.c.
3879 (bfd_elf64_get_canonicalize_reloc,
3880 bfd_elf64_get_dynamic_reloc_upper_bound,
3881 bfd_elf64_canonicalize_dynamic_reloc): Define.
3882 (mips_elf64_slurp_reloc_table): Support dynamic.
3883 (mips_elf64_slurp_one_reloc_table): Adjust.
3884
3885 2003-03-12 Nick Clifton <nickc@redhat.com>
3886
3887 * xsym.c (bfd_sym_fetch_type_information_table_entry): Change
3888 'index' to 'offset' in test for zero value.
3889
3890 2003-03-11 Alexandre Oliva <aoliva@redhat.com>
3891
3892 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Do not create
3893 dynamic relocations pointing to local or section symbols, use the
3894 NULL symbol instead. Document the choice to not emit an
3895 additional R_MIPS_64 relocation.
3896
3897 2003-03-11 Alan Modra <amodra@bigpond.net.au>
3898
3899 * elf32-ppc.c (ppc_elf_relocate_section): Subtract tls seg vma from
3900 zero index dynamic tls relocs generated for the GOT. Tidy code.
3901 Set "relocation" to 1 on DTPMOD32 relocs. Optimize HA adjustment.
3902 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
3903
3904 2003-03-07 Alan Modra <amodra@bigpond.net.au>
3905
3906 * elf32-ppc.c (ppc_elf_relocate_section): Don't look for a nop after
3907 a tls_get_addr call.
3908
3909 * elf32-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
3910 (ppc_elf_adjust_dynamic_symbol): For weak symbols, copy
3911 ELF_LINK_NON_GOT_REF from weakdef.
3912 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
3913 (ppc64_elf_adjust_dynamic_symbol): For weak symbols, copy
3914 ELF_LINK_NON_GOT_REF from weakdef.
3915 * elf32-i386.c (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
3916 (elf_i386_adjust_dynamic_symbol): For weak symbols, copy
3917 ELF_LINK_NON_GOT_REF from weakdef.
3918
3919 2003-03-06 Jakub Jelinek <jakub@redhat.com>
3920 Andrew Haley <aph@redhat.com>
3921
3922 * elflink.h (elf_bfd_discard_info): Don't process eh frames if
3923 output is relocateable.
3924
3925 2003-03-06 Steven Konopa <skonopa@kgo.csc.com>
3926
3927 * som.c (som_fixup_formats): Correct formats for R_AUX_UNWIND and
3928 R_COMMENT.
3929
3930 2003-03-06 Alan Modra <amodra@bigpond.net.au>
3931
3932 * elf32-ppc.c (ppc_elf_create_linker_section): Don't capitalize
3933 error messages.
3934 (ELIMINATE_COPY_RELOCS): Define to zero.
3935 (ppc_elf_relocate_section): Don't deref htab->tls_sec when calculating
3936 TLSLD relocs. Report reloc types on a number of errors. Optimize
3937 LOCAL24PC check for non-local syms. Don't capitalize error messages.
3938 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define to zero.
3939 (ppc64_elf_relocate_section): Don't deref htab->tls_sec when
3940 calculating TLSLD relocs. Report reloc types on a number of errors.
3941 Don't capitalize error messages.
3942
3943 2003-03-03 H.J. Lu <hjl@gnu.org>
3944
3945 * elfxx-ia64.c (USE_BRL): Removed.
3946 (oor_ip): Removed.
3947
3948 2003-03-03 J"orn Rennecke <joern.rennecke@superh.com>
3949
3950 * elf32-sh.c (sh_elf_howto_tab): Make R_SH_IND12W into an ordinary
3951 relocation (no special function), and make it non-partial_inplace.
3952 (sh_elf_relax_section): When creating a bsr, use a consistent value
3953 no matter if the symbol is extern or not; set addend to -4.
3954 Don't swap load / non-load instructions for SH4.
3955 (sh_elf_relax_delete_bytes): In R_SH_IND12W case, check the offset
3956 rather than if the symbol is external to determine if adjusting the
3957 offset makes sense. Adjust the addend too if appropriate.
3958 (sh_elf_relocate_section): In R_SH_IND12W, don't fiddle with the
3959 relocation.
3960
3961 2003-03-03 Nick Clifton <nickc@redhat.com>
3962
3963 * po/da.po: Installed latest translation.
3964
3965 2003-03-02 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3966
3967 * elf32-mips.c (elf_mips_howto_table_rel): Change definition of
3968 R_MIPS_PC16 to rightshift 2.
3969 (elf_reloc_map mips_reloc_map): Map to rightshifted BFD reloc.
3970 (bfd_elf32_bfd_reloc_type_lookup): Support
3971 BFD_RELOC_MIPSEMB_16_PCREL_S2.
3972 * elf64-mips.c (mips_elf64_howto_table_rel): Change definition of
3973 R_MIPS_PC16 to rightshift 2.
3974 (mips_elf64_howto_table_rela): Likewise.
3975 (mips_reloc_map): Map to rightshifted BFD reloc.
3976 * elfn32-mips.c: The same as in elf64-mips.c.
3977 * elfxx-mips.c (mips_elf_got_for_ibfd): Typo in comment.
3978 (mips_elf_calculate_relocation): Handle rightshifted addends for
3979 R_MIPS_PC16.
3980 * reloc.c (BFD_RELOC_MIPSEMB_16_PCREL_S2): New BFD relocation for
3981 MIPS Embedded PIC. Remove superfluous empty COMMENT.
3982 * libbfd.h: Regenerate.
3983 * bfd-in2.h: Regenerate.
3984
3985 2003-02-28 Richard Henderson <rth@redhat.com>
3986
3987 * elfxx-ia64.c (elfNN_ia64_relax_section): Correct bounds
3988 for ltoff22x relaxation.
3989
3990 2003-03-01 Alan Modra <amodra@bigpond.net.au>
3991
3992 * bfd-in.h (_bfd): Don't define.
3993 * bfd.c: Rename occurrences of "struct _bfd" to "struct bfd".
3994 * syms.c: Likewise.
3995 * bfd-in2.h: Regenerate.
3996
3997 2003-02-27 Richard Henderson <rth@redhat.com>
3998
3999 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add want_gotx;
4000 (elfNN_ia64_check_relocs): Set it.
4001 (allocate_global_data_got): Check it.
4002 (allocate_local_got): Likewise.
4003 (allocate_dynrel_entries): Likewise.
4004 (elfNN_ia64_relax_ldxmov): New.
4005 (elfNN_ia64_relax_section): Handle LTOFF22X, LDXMOV.
4006 (elfNN_ia64_choose_gp): Split out from ...
4007 (elfNN_ia64_final_link): ... here.
4008
4009 2003-02-27 Andrew Cagney <cagney@redhat.com>
4010
4011 * bfd.c (struct bfd): Rename "struct _bfd".
4012 * bfd-in.h: Update copyright.
4013 (struct bfd): Rename "struct _bfd".
4014 (_bfd): Define for backward compatibility.
4015 * bfd-in2.h: Regenerate.
4016
4017 2003-02-25 Alan Modra <amodra@bigpond.net.au>
4018
4019 * elflink.h (elf_bfd_final_link): Apportion reloc counts to rel_hdr
4020 and rel_hdr2 when initially counting input relocs rather than after
4021 creating output reloc sections.
4022 (elf_link_read_relocs_from_section): Don't abort with wrong reloc
4023 sizes.
4024
4025 * Makefile.am: Run "make dep-am".
4026 * Makefile.in: Regenerate.
4027
4028 2003-02-24 Kris Warkentin <kewarken@qnx.com>
4029
4030 * elf.c (elfcore_read_notes): Add check for QNX style core file.
4031 (elfcore_grog_nto_note): New function.
4032 (elfcore_grog_nto_gregs): New function.
4033 (elfcore_grog_nto_status): New function.
4034
4035 2003-02-24 Alan Modra <amodra@bigpond.net.au>
4036
4037 * elflink.c (_bfd_elf_create_got_section): Check existing .got
4038 section flags before concluding that we've already been called.
4039 Don't use register keyword.
4040 (_bfd_elf_create_dynamic_sections): Don't use register keyword.
4041 (_bfd_elf_create_linker_section): Formatting.
4042
4043 2003-02-20 jmc <jmc@prioris.mini.pw.edu.pl>
4044
4045 * coff-h8300.c: Fix typo: intial -> initial.
4046 * coff-ppc.c: Likewise.
4047
4048 2003-02-20 Alan Modra <amodra@bigpond.net.au>
4049
4050 * elf32-ppc.c: Formatting.
4051 (allocate_dynrelocs): LD and GD relocs against the same sym need
4052 separate GOT entries.
4053 (ppc_elf_relocate_section): Correct GOT handling for multiple GOT
4054 entries per symbol.
4055
4056 2003-02-19 Alan Modra <amodra@bigpond.net.au>
4057
4058 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Simplify dynamic reloc
4059 removal. Localize vars. Remove unnecessary dynobj test.
4060 * elf32-i386 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead
4061 of INFO.
4062 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
4063 and optimize.
4064 (elf_i386_relocate_section): Likewise.
4065 (elf_i386_gc_sweep_hook): Simplify dyn reloc removal. Localize vars.
4066 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
4067 * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
4068 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
4069 * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
4070 * elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise. Remove
4071 local_dynrel for section too. Don't touch HIPLT22, LOPLT10, PCPLT32
4072 or PCPLT10 relocs. Don't subtract twice on PLT32 relocs.
4073 Formatting.
4074
4075 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define.
4076 (ppc64_elf_check_relocs): Use it. Correct comment. Move SEC_ALLOC
4077 test.
4078 (ppc64_elf_adjust_dynamic_symbol): Use ELIMINATE_COPY_RELOCS.
4079 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
4080 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
4081 and optimize. Use ELIMINATE_COPY_RELOCS.
4082 (ppc64_elf_relocate_section): Likewise.
4083
4084 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Add pc_count field.
4085 (ppc_elf_copy_indirect_symbol): Copy pc_count field.
4086 (ELIMINATE_COPY_RELOCS): Define.
4087 (ppc_elf_adjust_dynamic_symbol): Convert copy relocs to dynamic.
4088 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
4089 (MUST_BE_DYN_RELOC): Define.
4090 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
4091 and optimize. Trim dyn_relocs.
4092 (ppc_elf_check_relocs): Don't generate dyn_relocs when we know they'll
4093 not be used. Do generate dyn_relocs for copy reloc avoidance. Keep
4094 track of pc_rel dyn relocs.
4095 (ppc_elf_relocate_section): Remove "will_become_local". Adjust
4096 WILL_CALL_FINISH_DYNAMIC_SYMBOL use. Trim dyn relocs as per
4097 allocate_dynrelocs. Don't recalculate "sec".
4098
4099 2003-02-18 Alan Modra <amodra@bigpond.net.au>
4100
4101 * elf32-ppc.c (ppc_elf_relocate_section): Remove unnecessary test.
4102 * elf64-ppc.c (ppc64_elf_tls_optimize): Decrement tlsld_got.refcount
4103 on invalid LD relocs.
4104 (allocate_dynrelocs): Invalid LD relocs don't use tlsld_got entry.
4105 (ppc64_elf_relocate_section): Unify new handling of LD relocs and
4106 tlsld_got entry. Use IS_PPC64_TLS_RELOC.
4107
4108 * elf32-ppc.h: New file.
4109 * elf32-ppc.c: Include elf32-ppc.h.
4110 (NOP, CROR_151515, CROR_313131, TP_OFFSET, DTP_OFFSET): Define.
4111 (struct ppc_elf_link_hash_entry): Rename "root" to "elf". Adjust uses.
4112 Add "tls_mask" field.
4113 (TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL, TLS_TLS, TLS_TPRELGD): Define.
4114 (struct ppc_elf_link_hash_table): Rename "root" to "elf". Adjust uses.
4115 Add got, relgot, plt, relplt, dynbss, relbss, dynsbss, relsbss,
4116 sdata, sdata2, tls_sec, tls_get_addr, tlsld_got fields.
4117 Make use of htab shortcuts throughout file.
4118 (ppc_elf_link_hash_newfunc): Init tls_mask field.
4119 (ppc_elf_link_hash_table_create): Init new fields.
4120 (ppc_elf_copy_indirect_symbol): Copy tls_mask.
4121 (ppc_elf_howto_raw): Add tls relocs.
4122 (ppc_elf_reloc_type_lookup): Handle them.
4123 (ppc_elf_unhandled_reloc): New function.
4124 (ppc_elf_create_got): Stash got section pointer in hash table,
4125 return status. Make .rela.got too.
4126 (ppc_elf_create_dynamic_sections): Stash section pointers in htab.
4127 (ppc_elf_adjust_dynamic_symbol): Only set up copy relocs when
4128 NON_GOT_REF set. Don't allocate space in .plt here..
4129 (allocate_dynrelocs): ..do so here instead, properly ref-counting and
4130 not allocating plt entries unnecessarily. Allocate got entries here.
4131 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
4132 (ppc_elf_size_dynamic_sections): Allocate local got entries. Pass
4133 "info" during allocate_dynrelocs hash traversal. Use htab section
4134 shortcuts rather than searching for named sections. Get rid of
4135 "plt" and "strip" booleans.
4136 (update_local_sym_info, bad_shared_reloc): New functions.
4137 (ppc_elf_check_relocs): Handle TLS relocs. Move .rela.got creation to
4138 ppc_elf_create_got. Don't mark got or plt reloc syms dynamic, do so
4139 in allocate_dynreloc. Use update_local_sym_info and bad_shared_reloc.
4140 Disallow R_PPC_EMB_RELSDA, R_PPC_EMB_NADDR32, R_PPC_EMB_NADDR16,
4141 R_PPC_EMB_NADDR16_LO, R_PPC_EMB_NADDR16_HI and R_PPC_EMB_NADDR16_HA
4142 in shared libs. R_PPC_PLTREL32 is a plt reloc too. Refcount all
4143 relocs that might use a plt entry. Set NON_GOT_REF too.
4144 Enumerate all do-nothing relocs.
4145 (ppc_elf_gc_sweep_hook): Simplify removal of dynrelocs. Handle
4146 tls relocs and all plt relocs.
4147 (ppc_elf_tls_setup, ppc_elf_tls_optimize): New functions.
4148 (ppc_elf_finish_dynamic_symbol): Don't build got entries here.
4149 (ppc_elf_finish_dynamic_sections): Rewrite tag code using htab
4150 shortcuts.
4151 (ppc_elf_relocate_section): Tidy. Handle TLS relocs. Use
4152 bfd_elf_local_sym_name. Simplify unresolved reloc code. Build got
4153 entries and got relocs here. Warn on non-zero got reloc addend.
4154 Split out branch taken/not taken reloc code into a separate switch
4155 and correct offset calculation. Allow BRTAKEN/BRNTAKEN dynamic relocs.
4156 Split out HA reloc adjustments to separate switch statement. Don't
4157 warn on reloc overflow if we've already warned about undefined.
4158 Don't rebuild sym name when reporting errors. Report all possible
4159 errors from _bfd_final_link_relocate.
4160 (bfd_elf32_bfd_final_link): Don't define.
4161
4162 2003-02-18 Alan Modra <amodra@bigpond.net.au>
4163
4164 * elf64-ppc.c (ppc64_elf_relocate_section): Don't init "r". Don't
4165 rebuild sym name when reporting errors.
4166
4167 2003-02-17 Nick Clifton <nickc@redhat.com>
4168
4169 * elflink.h (elf_link_output_extsym): Only check
4170 allow_shlib_undefined for shared libraries.
4171 * elf32-i386.c (elf_i386_relocate_section): Remove bogus check
4172 of allow_shlib_undefined.
4173 * elf32-cris.c (cris_elf_relocate_section): Likewise.
4174 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
4175 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
4176 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
4177 * elf32-s390.c (elf_s390_relocate_section): Likewise.
4178 * elf32-sh.c (sh_elf_relocate_section): Likewise.
4179 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
4180 * elf32-vax.c (elf_vax_relocate_section): Likewise.
4181 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
4182 * elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
4183 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
4184 * elf64-s390.c (elf_s390_relocate_section): Likewise.
4185 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
4186 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
4187 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
4188 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
4189
4190 2003-02-17 Nick Clifton <nickc@redhat.com>
4191
4192 * elf.c (SEGMENT_AFTER_SEGMENT): Add third parameter - the
4193 address field to use in the comparison.
4194 (SEGMENT_OVERLAPS): Check that LMAs overlap as well.
4195
4196 2003-02-14 Bob Wilson <bob.wilson@acm.org>
4197
4198 * elfcore.h (elf_core_file_p): Compare alternate machine codes for ELF
4199 backends when checking if the generic ELF target should be used.
4200
4201 * syms.c (_bfd_stab_section_find_nearest_line): For line number stabs
4202 outside of functions, treat values as absolute addresses.
4203
4204 * bfd.c: Change embedded documentation to use consistent indentation
4205 and to split up long lines. Change informal style of description
4206 for functions lacking real documentation.
4207 * coffcode.h: Break up long lines in embedded documentation.
4208 * format.c: Likewise.
4209 * targets.c: Likewise.
4210 * libcoff.h: Regenerate.
4211 * bfd-in2.h: Regenerate.
4212
4213 2003-02-14 Alan Modra <amodra@bigpond.net.au>
4214
4215 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Init tls_get_addr.
4216 (ppc64_elf_copy_indirect_symbol): Merge tls_mask too.
4217 (ppc64_elf_gc_sweep_hook): Simplify removal of dyn_relocs.
4218 (allocate_dynrelocs): Don't treat undefined and undefweak specially.
4219 (ppc_size_one_stub): Fix warning, and tighten plt entry check.
4220 (group_sections): Don't share a stub section if stubs are for a large
4221 section. Adjust comment.
4222 (ppc64_elf_size_stubs): Roughly double the size left for stubs if
4223 !stubs_always_before_branch.
4224 (ppc64_elf_relocate_section): Initialize tlsld GOT entry once. Don't
4225 treat undefined and undefweak specially when processing dyn relocs.
4226
4227 2003-02-13 Jakub Jelinek <jakub@redhat.com>
4228
4229 * elflink.h (elf_link_add_object_symbols): Handle .symver x, x@FOO.
4230
4231 2003-02-13 Nick Clifton <nickc@redhat.com>
4232
4233 * elf32-arm.h (elf32_thumb_to_arm_stub): Include section VMAs
4234 in computation of offset to insert into BL instruction.
4235
4236 2003-02-11 Uwe Stieber <uwe@wwws.de>
4237
4238 * config.bfd: Add support for kaOS as cross build target system.
4239
4240 2003-02-11 Alan Modra <amodra@bigpond.net.au>
4241
4242 * elf64-ppc.c (ppc64_elf_check_relocs): Match versioned
4243 .__tls_get_addr too.
4244 (ppc64_elf_tls_setup): Ensure cached tls_get_addr is not indirect.
4245
4246 2003-02-10 Kaz kojima <kkojima@rr.iij4u.or.jp>
4247
4248 * elf32-sh.c (elf_sh_dyn_relocs): Add tls_tpoff32 field.
4249 (elf_sh_link_hash_entry): Remove tls_tpoff32 field.
4250 (sh_elf_link_hash_newfunc): Remove the initialization of
4251 tls_tpoff32 field.
4252 (allocate_dynrelocs): Keep dyn_relocs if it includes the entry
4253 for which tls_tpoff32 flag is set.
4254 (sh_elf_relocate_section): Covert to LE only if the dyn_relocs
4255 of the symbol includes the entry matched with the input_section
4256 and having tls_tpoff32 flag on. When linking statically, set
4257 symbol index of R_SH_TLS_TPOFF32 relocation to zero if the symbol
4258 is defined in this executable.
4259 (sh_elf_check_relocs): Set tls_tpoff32 flag appropriately.
4260
4261 2003-02-10 Jakub Jelinek <jakub@redhat.com>
4262
4263 * elf32-s390.c (elf_s390_size_dynamic_sections): Set relocs to TRUE
4264 even if there is just non-empty .rela.plt.
4265
4266 2003-02-10 Nick Clifton <nickc@redhat.com>
4267
4268 * archures.c (bfd_mach_arm_ep9312): Define.
4269 * bfd-in2.h: Regenerate.
4270 * cpu-arm.c (processors[]): Add ep9312.
4271 (bfd_arm_arch): Add ep9312.
4272 * elf32-arm.h (elf32_arm_merge_private_data): Update error
4273 messages and add test for Maverick floating point support.
4274 (elf32_arm_print_private_bfd_data): Handle
4275 EF_ARM_MAVERICK_FLOAT flag.
4276 (elf32_arm_object_p): New function.
4277 (elf_backend_object_p): Define.
4278
4279 2003-02-10 Alan Modra <amodra@bigpond.net.au>
4280
4281 * elf64-ppc.c: Rename assorted occurrences of tls_type and similar
4282 variables, structure fields or function params to tls_mask or
4283 similar to better reflect usage.
4284 (struct got_entry): Comment.
4285 (struct ppc_link_hash_entry): Expand comment, and renumber TLS_*.
4286 (get_tls_mask): Rename from get_tls_type.
4287
4288 2003-02-09 Alan Modra <amodra@bigpond.net.au>
4289
4290 * elf64-ppc.c (TLS_GD_LD): Don't define..
4291 (TLS_GD): ..define this instead and update all uses.
4292 (TLS_TPRELGD): Define.
4293 (ppc64_elf_link_hash_table_create): Tweak initialization of
4294 init_refcount and init_offset.
4295 (ppc64_elf_check_relocs): Add one extra element to t_symndx array.
4296 Mark second slot of GD or LD toc entries.
4297 (get_tls_type): Return an int. Distinguish toc GD and LD entries
4298 from other tls types.
4299 (ppc64_elf_tls_setup): New function, split out from..
4300 (ppc64_elf_tls_optimize): ..here. Don't optimize when symbols are
4301 defined in a dynamic object. Fix LD optimization. Don't set TLS_TPREL
4302 on GD->IE optimization, use TLS_TPRELGD instead. Use get_tls_type
4303 return value to properly decide whether toc GD and LD entries can
4304 optimize away __tls_get_addr call. Check next reloc after DTPMOD64
4305 to determine GD or LD rather than looking at TLS_LD flag. Don't
4306 attempt to adjust got entry tls_type here..
4307 (allocate_dynrelocs): ..instead, adjust got entry tls_type here, and
4308 look for possible merges.
4309 (ppc64_elf_size_dynamic_sections): Adjust local got entries for
4310 optimization.
4311 (ppc64_elf_size_stubs): Tweak __tls_get_addr fudge.
4312 (ppc64_elf_relocate_section): Rename some vars to better reflect usage.
4313 Make use of return value from get_tls_type to properly detect GD and
4314 LD optimizations. Split tlsld/gd hi/ha from lo/ds case. Don't
4315 handle tls_get_addr removal when looking at REL24 relocs, do it when
4316 looking at the previous reloc. Check reloc after DTPMOD64 to determine
4317 GD or LD.
4318 * elf64-ppc.h (ppc64_elf_tls_setup): Declare.
4319
4320 2003-02-08 Alan Modra <amodra@bigpond.net.au>
4321
4322 * elf32-hppa.c (group_sections): Don't share a stub section if
4323 stubs are for a large section.
4324
4325 * elf32-hppa.c (elf32_hppa_size_stubs): Double the size left for
4326 stubs if !stubs_always_before_branch.
4327
4328 2003-02-07 Nick Clifton <nickc@redhat.com>
4329
4330 * elf.c (swap_out_syms): Generate an error message if an
4331 equivalent output section cannot be found for a symbol.
4332
4333 2003-02-07 Jakub Jelinek <jakub@redhat.com>
4334
4335 * elf64-alpha.c (elf64_alpha_relax_section): Don't crash if
4336 local_got_entries is NULL.
4337
4338 2003-02-06 Andreas Schwab <schwab@suse.de>
4339
4340 * elf-eh-frame.c (get_DW_EH_PE_signed): Define.
4341 (read_value): Add parameter is_signed, use signed extraction if
4342 the value is signed.
4343 (_bfd_elf_write_section_eh_frame): Pass signed flag of the
4344 encoding to read_value.
4345
4346 2003-02-06 Alan Modra <amodra@bigpond.net.au>
4347
4348 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy got and
4349 plt info when called to transfer weak sym info.
4350
4351 2003-02-05 Alan Modra <amodra@bigpond.net.au>
4352
4353 * reloc.c: Add PPC and PPC64 TLS relocs.
4354 * libbfd.h: Regenerate.
4355 * bfd-in2.h: Regenerate.
4356 * elf64-ppc.c (TP_OFFSET, DTP_OFFSET): Declare.
4357 (ppc64_elf_howto_raw): Add TLS howto's. Adjust R_PPC64_NONE to be
4358 against a 32 bit field.
4359 (ppc64_elf_reloc_type_lookup): Handle TLS relocs.
4360 (_ppc64_elf_section_data): Add t_symndx and comments.
4361 (ppc64_elf_section_data): Use elf_section_data macro.
4362 (ppc64_elf_new_section_hook): American spelling.
4363 (struct got_entry, struct plt_entry): New.
4364 (MUST_BE_DYN_RELOC): Rename from IS_ABSOLUTE_RELOC.
4365 (struct ppc_stub_hash_entry): Add "addend" field.
4366 (struct ppc_link_hash_entry): Add "tls_type".
4367 (TLS_TLS, TLS_GD_LD, TLS_LD, TLS_TPREL, TLS_DTPREL,
4368 TLS_EXPLICIT): Define.
4369 (struct ppc_link_hash_table): Add tls_sec, tls_get_addr, tlsld_got.
4370 (link_hash_newfunc): Init new fields.
4371 (ppc64_elf_link_hash_table_create): Likewise. Set init_refcount and
4372 init_offset to NULL.
4373 (ppc64_elf_copy_indirect_symbol): Copy got and plt info. Don't call
4374 _bfd_elf_link_hash_copy_indirect, rather insert relevant code from
4375 there.
4376 (update_local_sym_info, update_plt_info): New functions.
4377 (ppc64_elf_check_relocs): Use them. Handle TLS relocs. Adjust GOT
4378 handling to use got.glist rather than got.refcount. Likewise for PLT.
4379 (ppc64_elf_gc_sweep_hook): Handle TLS relocs, new GOT and PLT lists.
4380 (func_desc_adjust): Adjust for new PLT list.
4381 (ppc64_elf_adjust_dynamic_symbol): Likewise.
4382 (get_sym_h, get_tls_type): New functions.
4383 (ppc64_elf_edit_opd): Remove unused variable. Use get_sym_h.
4384 (ppc64_elf_tls_optimize): New function.
4385 (allocate_dynrelocs): Adjust for new PLT and GOT lists. Allocate
4386 TLS relocs.
4387 (ppc64_elf_size_dynamic_sections): Likewise.
4388 (ppc_type_of_stub): Adjust for new PLT list.
4389 (ppc_build_one_stub): Likewise.
4390 (ppc64_elf_size_stubs): Likewise. Use get_sym_h. Treat __tls_get_addr
4391 calls specially.
4392 (ppc64_elf_relocate_section): Adjust for new GOT and PLT lists. Handle
4393 TLS relocs. Report local syms using bfd_elf_local_sym_name. Don't
4394 init GOT entries that have a reloc. Generate GOT relocs here..
4395 (ppc64_elf_finish_dynamic_symbol): ..not here. Adjust for PLT list.
4396 * elf64-ppc.h (ppc64_elf_tls_optimize): Declare.
4397
4398 2003-02-04 Andreas Schwab <schwab@suse.de>
4399
4400 * elf32-m68k.c (elf_m68k_hash_entry): Define.
4401 (elf_m68k_link_hash_traverse): Remove.
4402 (elf_m68k_link_hash_newfunc): Use struct bfd_hash_entry and
4403 elf_m68k_hash_entry instead of struct elf_m68k_link_hash_entry to
4404 reduce casting.
4405 (elf_m68k_check_relocs): Use elf_m68k_hash_entry instead of
4406 casting.
4407 (elf_m68k_size_dynamic_sections): Use elf_link_hash_traverse
4408 instead of elf_m68k_link_hash_traverse.
4409 (elf_m68k_discard_copies): Change first parameter to pointer to
4410 struct elf_link_hash_entry and use elf_m68k_hash_entry when struct
4411 elf_m68k_link_hash_entry is needed.
4412
4413 2003-02-04 Alan Modra <amodra@bigpond.net.au>
4414
4415 * elf-bfd.h (struct got_entry, struct plt_entry): Forward declare.
4416 (struct elf_link_hash_entry): Add "glist" and "plist" fields to
4417 "got" union, and declare as gotplt_union. Use gotplt_uinion for
4418 "plt" field.
4419 (struct elf_link_hash_table): Make "init_refcount" a gotplt_union.
4420 Add "init_offset" field.
4421 (struct elf_obj_tdata <local_got>): Add "struct got_entry **" to union.
4422 (elf_local_got_ents): Declare.
4423 * elf.c (_bfd_elf_link_hash_newfunc): Adjust initialization of "got"
4424 and "plt".
4425 (_bfd_elf_link_hash_hide_symbol): Use "init_offset".
4426 (_bfd_elf_link_hash_table_init): Set "init_offset".
4427 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set init_refcount
4428 from init_offset.
4429 (elf_adjust_dynamic_symbol): Set plt and got offsets using init_offset.
4430
4431 * elf.c (bfd_elf_local_sym_name): Split out from..
4432 (group_signature): ..here.
4433 * elf-bfd.h (bfd_elf_local_sym_name): Declare.
4434
4435 2003-02-04 Alan Modra <amodra@bigpond.net.au>
4436
4437 * elf-bfd.h (enum elf_link_info_type): Remove.
4438 (struct bfd_elf_section_data): Move sec_info_type, use_rela_p fields
4439 to struct sec. Remove linkonce_p field.
4440 (elf_linkonce_p): Delete.
4441 (elf_discarded_section): Update for sec_info_type change.
4442 * section.c (struct sec): Add sec_info_type, use_rela_p, has_tls_reloc,
4443 flag11, flag12, flag13, flag14, flag15, flag16, flag20, flag24.
4444 (ELF_INFO_TYPE_NONE): Define.
4445 (ELF_INFO_TYPE_STABS): Define.
4446 (ELF_INFO_TYPE_MERGE): Define.
4447 (ELF_INFO_TYPE_EH_FRAME): Define.
4448 (ELF_INFO_TYPE_JUST_SYMS): Define.
4449 (STD_SECTION): Update struct sec initializer.
4450 * ecoff.c (bfd_debug_section): Likewise.
4451 * elf.c: Likewise. Update occurrences of sec_info_type and use_rela_p.
4452 * elflink.h: Likewise.
4453 * elf-eh-frame.c: Likewise.
4454 * elf64-alpha.c: Likewise.
4455 * elfxx-ia64.c: Likewise.
4456 * elfxx-mips.c: Likewise.
4457 * bfd-in2.h: Regenerate.
4458
4459 * elf32-sparc.c (sec_do_relax): Use elf_section_data macro rather than
4460 referring to used_by_bfd.
4461 * elf64-sparc.c (sec_do_relax): Likewise.
4462 * elf64-mmix.c (mmix_elf_section_data): Likewise.
4463 * elfxx-mips.c (mips_elf_section_data): Likewise.
4464 * ieee.c (ieee_slurp_section_data): Use ieee_per_section macro.
4465 (ieee_get_section_contents): Likewise.
4466 (ieee_new_section_hook): Formatting.
4467 (ieee_canonicalize_reloc): Remove commented out code.
4468 * mmo.c (mmo_section_data): Define. Use throughout file.
4469 * oasys.c (oasys_get_section_contents): Use oasys_per_section macro.
4470
4471 2003-01-31 Graydon Hoare <graydon@redhat.com>
4472
4473 * Makefile.am (opncls.lo): Add dependency upon libiberty.h.
4474 * Makefile.in: Regenerate.
4475 * opncls.c (calc_crc32, get_debug_link_info,
4476 seperate_debug_file_exists, find_seperate_debug_file): New
4477 internal functions.
4478 (bfd_follow_gnu_debuglink): New function. Follow the pointer
4479 contained inside a .gnu_debuglink section.
4480 * bfd-in2.h: Regenerate.
4481
4482 2003-01-29 Alexandre Oliva <aoliva@redhat.com>
4483
4484 * elfxx-mips.c (mips_elf_got_entry_hash): Don't dereference
4485 entry->abfd when it's NULL.
4486
4487 2003-01-27 Alexandre Oliva <aoliva@redhat.com>
4488
4489 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Handle
4490 _bfd_elf_section_offset returning -2 the same way as -1.
4491
4492 * elfxx-mips.c (mips_elf_multi_got): New function.
4493 (struct mips_got_entry): Make symndx and gotidx signed. Moved
4494 addend into union along with address and link hash entry.
4495 (struct mips_got_info): Added bfd2got and next.
4496 (struct mips_elf_hash_sort_data): Added max_unref_got_dynindx.
4497 (mips_elf_got_section, mips_elf_create_got_section): Use
4498 SEC_EXCLUDE bit to tell whether we really need the got
4499 section. Take boolean arguments to disregard an excluded
4500 section, or to create it as excluded. Adjust all callers.
4501 Use mips_elf_got_section all over.
4502 (mips_elf_local_got_index, mips_elf_got_page,
4503 mips_elf_got16_entry): Take input bfd as argument, and pass it
4504 on to mips_elf_create_local_got_entry.
4505 (mips_elf_global_got_index, mips_elf_create_local_got_entry):
4506 Take input bfd as argument, and manage entries in the
4507 appropriate GOT.
4508 (mips_elf_got_offset_from_index): Take input bfd as argument,
4509 and use it to adjust the GP offset of the bfd.
4510 (mips_elf_sort_hash_table, mips_elf_sort_hash_table_f): Move
4511 unreferenced GOT entries of global symbols to the end.
4512 (mips_elf_record_global_got_symbol): Take input bfd as
4513 argument. Add entries to the master GOT hash table.
4514 (struct mips_elf_bfd2got_hash): New.
4515 (struct mips_elf_got_per_bfd_arg): New.
4516 (struct mips_elf_set_global_got_offset_arg): New.
4517 (mips_elf_hash_bfd_vma, mips_elf_multi_got_entry_hash,
4518 mips_elf_multi_got_entry_eq, mips_elf_bfd2got_entry_hash,
4519 mips_elf_bfd2got_entry_eq, mips_elf_make_got_per_bfd,
4520 mips_elf_merge_gots, mips_elf_set_global_got_offset,
4521 mips_elf_resolve_final_got_entry,
4522 mips_elf_resolve_final_got_entries, mips_elf_adjust_gp,
4523 mips_elf_got_for_ibfd): New functions.
4524 (ELF_MIPS_GP_OFFSET): Don't depend on SGI_COMPAT.
4525 (MIPS_ELF_GOT_MAX_SIZE): New macro.
4526 (STUB_LW): Generate 64-bit stub regardless of SGI_COMPAT.
4527 (mips_elf_got_entry_hash): Take new fields into account. Use
4528 mips_elf_hash_bfd_vma.
4529 (mips_elf_got_entry_eq): Take new fields into account.
4530 (mips_elf_create_got_section): Initialize new fields.
4531 (mips_elf_calculate_relocation): Pass input_bfd to functions
4532 that now take it. Adjust gp for the input_bfd.
4533 (mips_elf_allocate_dynamic_relocation,
4534 mips_elf_create_dynamic_relocation,
4535 _bfd_mips_elf_create_dynamic_sections): Use...
4536 (mips_elf_rel_dyn_section): New function. Borrow code from...
4537 (_bfd_mips_elf_check_relocs): Pass input_bfd to functions that
4538 now take it. Create the got section if needed, even if
4539 excluded, before recording a global got symbol. Move some
4540 code to...
4541 (mips_elf_record_local_got_symbol): New fn.
4542 (_bfd_mips_elf_size_dynamic_sections): Disable combreloc.
4543 Compute multi-got global entries offsets. Move GOT code to...
4544 (_bfd_mips_elf_always_size_sections): Call mips_elf_multi_got
4545 if the GOT is too big.
4546 (_bfd_mips_elf_finish_dynamic_symbol): Set got entry of
4547 undefweak symbol to zero. Generate dynamic relocations for
4548 non-primary GOT entries for global symbols.
4549 (_bfd_mips_elf_finish_dynamic_sections): Handle multi-got
4550 case. Generate dynamic relocations for local got entries.
4551 Sort dynamic relocations on N64 too, using...
4552 (sort_dynamic_relocs_64): New fns.
4553 (_bfd_mips_elf_hide_symbol): Adjust multi-got counters.
4554 (_bfd_mips_elf_merge_private_bfd_data): Ignore EF_MIPS_XGOT.
4555
4556 2003-01-27 Alexandre Oliva <aoliva@redhat.com>
4557
4558 * bfd.c (struct _bfd): Added id field.
4559 * opncls.c (_bfd_id_counter): New static variable.
4560 (_bfd_new_bfd): Use it.
4561 * bfd-in2.h: Rebuilt.
4562
4563 2003-01-25 Alan Modra <amodra@bigpond.net.au>
4564
4565 * elf32-sparc.c (bfd_elf32_new_section_hook): Define.
4566
4567 2003-01-25 Jakub Jelinek <jakub@redhat.com>
4568
4569 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Add TLS relocs.
4570 (elf32_sparc_rev32_howto): New variable.
4571 (sparc_reloc_map): Add TLS relocs.
4572 (elf32_sparc_reloc_type_lookup, elf32_sparc_info_to_howto):
4573 Handle REV32.
4574 (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc, elf32_sparc_mkobject):
4575 New functions.
4576 (struct elf32_sparc_dyn_relocs, struct elf32_sparc_link_hash_entry,
4577 struct elf32_sparc_link_hash_table):
4578 New structures.
4579 (elf32_sparc_tdata, elf32_sparc_local_got_tls_type,
4580 elf32_sparc_hash_table): Define.
4581 (link_hash_newfunc, elf32_sparc_link_hash_table_create,
4582 create_got_section, elf32_sparc_create_dynamic_sections,
4583 elf32_sparc_copy_indirect_symbol, elf32_sparc_tls_transition): New
4584 functions.
4585 (elf32_sparc_check_relocs): Handle TLS relocs. Add dynamic reloc
4586 reference counting.
4587 (elf32_sparc_gc_sweep_hook): Likewise.
4588 (elf32_sparc_adjust_dynamic_symbol): Likewise.
4589 (elf32_sparc_size_dynamic_sections): Likewise.
4590 (elf32_sparc_relocate_section): Likewise.
4591 (allocate_dynrelocs, readonly_dynrelocs, dtpoff_base, tpoff):
4592 New functions.
4593 (elf32_sparc_object_p): Allocate backend private object data.
4594 (bfd_elf32_bfd_link_hash_table_create,
4595 elf_backend_copy_indirect_symbol, bfd_elf32_mkobject,
4596 elf_backend_can_refcount): Define.
4597 (elf_backend_create_dynamic_sections): Define to
4598 elf32_sparc_create_dynamic_sections.
4599 * reloc.c: Add SPARC TLS relocs.
4600 * bfd-in2.h, libbfd.h: Rebuilt.
4601 * elf64-sparc.c (sparc64_elf_howto_table): Add TLS relocs.
4602 (sparc_reloc_map): Likewise.
4603
4604 2003-01-24 Martin Schwidefsky <schwidefsky@de.ibm.com>
4605
4606 * bfd-in2.h: Regenerate.
4607 * elf32-s390.c (elf_s390_mkobject, elf_s390_tls_transition,
4608 s390_tls_reloc, dtpoff_base, tpoff, invalid_tls_insn): New functions.
4609 (elf_howto_table): Add TLS relocs.
4610 (elf_s390_reloc_type_lookup): Likewise.
4611 (elf_s390_link_hash_entry): Add tls_type.
4612 (elf_s390_hash_entry, elf_s390_obj_tdata, elf_s390_local_got_tls_type):
4613 New macros.
4614 (elf_s390_link_hash_table): Add tls_ldm_got.
4615 (link_hash_newfunc): Initialize tls_type.
4616 (elf_s390_link_hash_table_create): Initialize refcount of tls_ldm_got.
4617 (elf_s390_copy_indirect_symbol): Copy tls_type information.
4618 (elf_s390_check_relocs): Support TLS relocs.
4619 (elf_s390_gc_sweep_hook): Likewise.
4620 (allocate_dynrelocs): Likewise.
4621 (elf_s390_size_dynamic_sections): Likewise.
4622 (elf_s390_relocate_section): Likewise.
4623 (elf_s390_finish_dynamic_symbol): Likewise.
4624 (bfd_elf32_mkobject): Define for TLS.
4625 * elf64-s390.c: Same changes as for elf32-s390.c.
4626 * libbfd.h: Regenerate.
4627 * reloc.c: Add s390 TLS relocations.
4628
4629 2003-01-24 Charles Lepple <clepple@ghz.cc>
4630
4631 * aclocal.m4: Fix name of --enable-install-libbfd switch.
4632
4633 2003-01-23 Nick Clifton <nickc@redhat.com>
4634
4635 * Add sh2e support:
4636 2002-04-02 Elena Zannoni <ezannoni@redhat.com>
4637 * archures.c (bfd_mach_sh2e): Added.
4638 * bfd-in2.h: Rebuilt.
4639 * cpu-sh.c (arch_info_struct): Added SH2e.
4640 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle EF_SH2E.
4641
4642 2003-01-23 Alan Modra <amodra@bigpond.net.au>
4643
4644 * elf-bfd.h (struct bfd_elf_section_data): Remove tdata. Change
4645 dynindx to an int. Rearrange for better packing.
4646 * elf.c (_bfd_elf_new_section_hook): Don't alloc if already done.
4647 * elf32-mips.c (bfd_elf32_new_section_hook): Define.
4648 * elf32-sh64.h: New. Split out from include/elf/sh.h.
4649 (struct _sh64_elf_section_data): New struct.
4650 (sh64_elf_section_data): Don't dereference sh64_info (was tdata).
4651 * elf32-sh64-com.c: Include elf32-sh64.h.
4652 * elf32-sh64.c: Likewise.
4653 (sh64_elf_new_section_hook): New function.
4654 (bfd_elf32_new_section_hook): Define.
4655 (sh64_elf_fake_sections): Adjust for sh64_elf_section_data change.
4656 (sh64_bfd_elf_copy_private_section_data): Likewise.
4657 (sh64_elf_final_write_processing): Likewise.
4658 * elf32-sparc.c (struct elf32_sparc_section_data): New.
4659 (elf32_sparc_new_section_hook): New function.
4660 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
4661 (sec_do_relax): Define.
4662 (elf32_sparc_relax_section): Adjust to use sec_do_relax.
4663 (elf32_sparc_relocate_section): Likewise.
4664 * elf64-mips.c (bfd_elf64_new_section_hook): Define.
4665 * elf64-mmix.c (struct _mmix_elf_section_data): New.
4666 (mmix_elf_section_data): Define. Use throughout file.
4667 (mmix_elf_new_section_hook): New function.
4668 (bfd_elf64_new_section_hook): Define.
4669 * elf64-ppc.c (struct _ppc64_elf_section_data): New.
4670 (ppc64_elf_section_data): Define. Use throughout.
4671 (ppc64_elf_new_section_hook): New function.
4672 (bfd_elf64_new_section_hook): Define.
4673 * elf64-sparc.c (struct sparc64_elf_section_data): New.
4674 (sparc64_elf_new_section_hook): New function.
4675 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
4676 (sec_do_relax): Define.
4677 (sparc64_elf_relax_section): Adjust to use sec_do_relax.
4678 (sparc64_elf_relocate_section): Likewise.
4679 (bfd_elf64_new_section_hook): Define.
4680 * elfn32-mips.c (bfd_elf32_new_section_hook): Define.
4681 * elfxx-mips.c (struct _mips_elf_section_data): New.
4682 (mips_elf_section_data): Define. Use throughout.
4683 (_bfd_mips_elf_new_section_hook): New function.
4684 (mips_elf_create_got_section): Don't alloc used_by_bfd.
4685 * elfxx-mips.h (_bfd_mips_elf_new_section_hook): Declare.
4686 * elfxx-target.h (bfd_elfNN_new_section_hook): Add #ifndef.
4687 * Makefile.am: Run "make dep-am".
4688 * Makefile.in: Regenerate.
4689
4690 2003-01-21 Richard Henderson <rth@redhat.com>
4691
4692 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_PLT_LOC): New.
4693 (struct alpha_elf_link_hash_entry): Add plt_old_section, plt_old_value.
4694 (elf64_alpha_adjust_dynamic_symbol): Set them.
4695 (elf64_alpha_size_plt_section_1): Reset them when plt entry removed.
4696 (elf64_alpha_relax_tls_get_addr): Handle LDM relocs. Frob the
4697 symbol index when relaxing LDM to TPREL.
4698 (elf64_alpha_relax_section): Likewise. Allow relaxation of GD
4699 relocs, even if the target isn't locally defined.
4700 (elf64_alpha_check_relocs): Frob LDM reloc symndx to zero.
4701 (elf64_alpha_relocate_section): Likewise. Force TP-relative
4702 relocs vs symndx 0 to the tp base.
4703
4704 2003-01-21 Fabio Alemagna <falemagn@aros.org>
4705
4706 * config.bfd: Handle i[3456]86-*-aros*.
4707
4708 2003-01-21 Andreas Schwab <schwab@suse.de>
4709
4710 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Define.
4711 (struct ppc_elf_link_hash_entry): Define.
4712 (ppc_elf_hash_entry): New function.
4713 (struct ppc_elf_link_hash_table): Define.
4714 (ppc_elf_hash_table): New function.
4715 (ppc_elf_link_hash_newfunc): New function.
4716 (ppc_elf_link_hash_table_create): New function.
4717 (ppc_elf_copy_indirect_symbol): New function.
4718 (allocate_dynrelocs): New function.
4719 (readonly_dynrelocs): New function.
4720 (ppc_elf_size_dynamic_sections): Allocate space for dynamic
4721 relocs and determine DT_TEXTREL.
4722 (ppc_elf_check_relocs): Don't do that here, just count the
4723 dynamic relocs.
4724 (ppc_elf_gc_sweep_hook): Discard any dynamic relocs against the
4725 removed section.
4726 (bfd_elf32_bfd_link_hash_table_create): Define.
4727 (elf_backend_copy_indirect_symbol): Define.
4728
4729 2003-01-21 Richard Henderson <rth@redhat.com>
4730
4731 * elf64-alpha.c (alpha_dynamic_entries_for_reloc): GOTTPREL and
4732 TPREL also get a reloc if shared. Remove SREL support.
4733 (elf64_alpha_emit_dynrel): New.
4734 (elf64_alpha_relocate_section): Use it. Resolve dynamic TPREL
4735 and GOTTPREL relocs to local symbols against the tp base.
4736 (elf64_alpha_finish_dynamic_symbol): Use elf64_alpha_emit_dynrel.
4737
4738 * elf64-alpha.c (elf64_alpha_relax_got_load): Decrement got
4739 use count before clobbering r_type.
4740 (elf64_alpha_relax_tls_get_addr): Don't use pos[1] if insn
4741 ordering would mean dataflow inspection is necessary.
4742
4743 2003-01-20 Svein E. Seldal <Svein.Seldal@solidas.com>
4744
4745 * coffcode.h (coff_set_flags): Added get/set arch hooks.
4746
4747 2003-01-20 Fabio Alemagna <falemagn@aros.org>
4748
4749 * elf32-sh.c: Treat elfNN_bed like other macros defined in
4750 elfxx-target.h and #undef it before #define'ing it.
4751 * elf32-i386.c: Likewise.
4752 * elf32-sh64.c: Likewise.
4753 * elf64-alpha.c: Likewise.
4754 * elf64-sh64.c: Likewise.
4755
4756 2003-01-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
4757
4758 * bfd-in2.h: Regenerate.
4759 * elf32-s390.c (elf_s390_adjust_gotplt): New prototype.
4760 (elf_howto_table): Rename R_390_GOTOFF to R_390_GOTOFF32. Add
4761 R_390_GOTOFF16, R_390_GOTOFF64, R_390_GOTPLT12, R_390_GOTPLT16,
4762 R_390_GOTPLT32, R_390_GOTPLT64, R_390_GOTPLTENT, R_390_PLTOFF16,
4763 R_390_PLTOFF32 and R_390_PLTOFF64.
4764 (elf_s390_reloc_type_lookup): Likewise.
4765 (struct elf_s390_link_hash_entry): Add gotplt_refcount to keep track
4766 of GOTPLT references to a function.
4767 (link_hash_newfunc): Initialize gotplt_refcount.
4768 (elf_s390_check_relocs): Move allocation of local_got_refcounts array
4769 and creation of the got section out of the main switch. Add support
4770 for the gotoff, gotplt and pltoff relocations.
4771 (elf_s390_gc_sweep_hook): Add reference counting for gotoff, gotplt
4772 and pltoff.
4773 (elf_s390_adjust_gotplt): New function.
4774 (elf_s390_adjust_dynamic_symbol): Adjust gotplt refcount for removed
4775 plt entries.
4776 (allocate_dynrelocs): Add comment.
4777 (elf_s390_relocate_section): Change r_type to unsigned. Add support
4778 for gotoff, gotplt and pltoff relocations.
4779 * elf64-s390.c: Same changes as for elf32-s390.c.
4780 * libbfd.h: Regenerate.
4781 * reloc.c: Add BFD_RELOC_390_GOTOFF64, BFD_RELOC_390_GOTPLT12,
4782 BFD_RELOC_390_GOTPLT16, BFD_RELOC_390_GOTPLT32, BFD_RELOC_390_GOTPLT64,
4783 BFD_RELOC_390_GOTPLTENT, BFD_RELOC_390_PLTOFF16, BFD_RELOC_390_PLTOFF32
4784 and BFD_RELOC_390_PLTOFF64.
4785
4786 2003-01-18 Jakub Jelinek <jakub@redhat.com>
4787
4788 * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle
4789 R_IA64_TPREL64[LM]SB against non-global symbol properly.
4790
4791 2003-01-16 Jakub Jelinek <jakub@redhat.com>
4792
4793 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add
4794 self_dtpmod_done and self_dtpmod_offset.
4795 (allocate_global_data_got): Only use one got entry for all
4796 dtpmod relocs against local symbols.
4797 (allocate_dynrel_entries): Only need .rela.got entry for
4798 dtpmod against global symbol.
4799 (elfNN_ia64_size_dynamic_sections): Initialize self_dtpmod_offset.
4800 Reserve space in .rela.got for the local dtpmod entry.
4801 (set_got_entry): Initialize the common local dtpmod .got entry.
4802 (elfNN_ia64_relocate_section): Handle R_IA_64_DTPREL64LSB
4803 and R_IA_64_DTPREL64MSB.
4804
4805 2003-01-16 Alan Modra <amodra@bigpond.net.au>
4806
4807 * elf64-ppc.c: Include elf/ppc64.h rather than elf/ppc.h.
4808 (R_PPC_*): Rename all occurrences to R_PPC64_*.
4809 (R_PPC64_ADDR30): Rename all occurrences to R_PPC64_REL30.
4810 (enum elf_ppc_reloc_type): Ditto to enum elf_ppc64_reloc_type.
4811 (ppc64_elf_gc_sweep_hook): Handle R_PPC64_REL30 along with other
4812 relative relocs, not with absolute ones.
4813 * Makefile.am: Run "make dep-am".
4814 * Makefile.in: Regenerate.
4815 * po/SRC-POTFILES.in: Regenerate.
4816
4817 2003-01-15 Andreas Schwab <schwab@suse.de>
4818
4819 * elf32-ppc.c (ppc_elf_check_relocs): Don't set DF_TEXTREL for a
4820 relocation against a non-allocated readonly section.
4821
4822 2003-01-10 Alan Modra <amodra@bigpond.net.au>
4823
4824 * elf32-ppc.c (ppc_elf_relocate_section): Adjust addend for GOT16_HA.
4825 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. PLTGOT16_HA too.
4826
4827 2002-01-08 Klee Dienes <kdienes@apple.com>
4828
4829 * Makefile.am (ALL_MACHINES): Use cpu-msp430.lo, not cpu-msp430.c.
4830 (BFD32_BACKENDS): Use elf32-msp430.lo, not elf32-msp430.c.
4831 * Makefile.in: Regenerate.
4832
4833 2003-01-08 Alexandre Oliva <aoliva@redhat.com>
4834
4835 * elfn32-mips.c (prev_reloc_section): New.
4836 (GET_RELOC_ADDEND): Use it. Parenthesize macro arguments.
4837 (SET_RELOC_ADDEND): Parenthesize macro argument.
4838
4839 2003-01-07 John David Anglin <dave.anglin@nrc.gc.ca>
4840
4841 * elf32-hppa.c (final_link_relocate): For all DP relative relocations,
4842 adjust addil instructions if the symbol has no section.
4843
4844 2003-01-07 DJ Delorie <dj@redhat.com>
4845
4846 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make REL_12 not
4847 partial_inplace.
4848
4849 2003-01-07 Andreas Schwab <schwab@suse.de>
4850
4851 * elf32-m68k.c (elf_m68k_check_relocs): Don't set DF_TEXTREL for
4852 PC relative relocations.
4853 (elf_m68k_discard_copies): Set it here instead.
4854
4855 2002-01-02 Ben Elliston <bje@redhat.com>
4856 Jeff Johnston <jjohnstn@redhat.com>
4857
4858 * Makefile.am (ALL_MACHINES): Add cpu-iq2000.lo.
4859 (ALL_MACHINES_CFILES): Add cpu-iq2000.c.
4860 (BFD32_BACKENDS): Add elf32-iq2000.lo.
4861 (BFD32_BACKENDS_CFILES): Add elf32-iq2000.c.
4862 (cpu-iq2000.lo): New target.
4863 * Makefile.in: Regenerate.
4864 * config.bfd: Handle iq2000-*-elf.
4865 * archures.c (bfd_architecture): Add bfd_{arch,mach}_iq2000.
4866 (bfd_archures_list): Add bfd_iq2000_arch.
4867 * configure.in: Handle bfd_elf32_iq2000_vec.
4868 * configure: Regenerate.
4869 * reloc.c: Add BFD_RELOC_IQ2000_OFFSET_16, BFD_RELOC_IQ2000_OFFSET_21,
4870 and BFD_RELOC_IQ2000_UHI16.
4871 * targets.c (bfd_elf32_iq2000_vec): Declare.
4872 (bfd_target_vector): Add bfd_elf32_iq2000_vec.
4873 * elf.c (prep_headers): Set e_machine to EM_IQ2000.
4874 * cpu-iq2000.c: New file.
4875 * elf32-iq2000.c: Likewise.
4876 * libbfd.h: Regenerate.
4877 * bfd-in2.h: Likewise.
4878
4879 2003-01-02 Richard Sandiford <rsandifo@redhat.com>
4880
4881 * elfxx-mips.c: Include libiberty.h.
4882 (elf_mips_isa, _bfd_mips_elf_mach_extends_p): Remove.
4883 (mips_set_isa_flags): New function, split out from...
4884 (_bfd_mips_elf_final_write_processing): ...here. Only call
4885 mips_set_isa_flags if the EF_MIPS_MACH bits are clear.
4886 (mips_mach_extensions): New array.
4887 (mips_32bit_flags_p): New function.
4888 (_bfd_mips_elf_merge_private_bfd_data): Rework architecture checks.
4889 Use mips_32bit_flags_p to check if one binary is 32-bit and the
4890 other is 64-bit. When adopting IBFD's architecture, adopt the
4891 bfd_mach as well as the flags.
4892
4893 2003-01-02 Nick Kelsey <nickk@ubicom.com>
4894
4895 * elf32-ip2k.c: Re-work of linker relaxation code for the ip2k to
4896 fix internal errors, fix bad code generation, fix incorrect stabs
4897 information, and improve ability to eliminate redundant page
4898 instructions. Added code to ip2k_final_link_relocate to self-verify
4899 the linker relaxation. Fix formatting problems.
4900
4901 2002-12-30 Chris Demetriou <cgd@broadcom.com>
4902
4903 * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mipsisa32r2 case.
4904 * archures.c (bfd_mach_mipsisa32r2): New define.
4905 * bfd-in2.h: Regenerate.
4906 * cpu-mips.c (I_mipsisa32r2): New enum value.
4907 (arch_info_struct): Add entry for I_mipsisa32r2.
4908 * elfxx-mips.c (elf_mips_isa, _bfd_elf_mips_mach)
4909 (_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_32R2.
4910 (_bfd_mips_elf_final_write_processing): Add
4911 bfd_mach_mipsisa32r2 case.
4912 (_bfd_mips_elf_merge_private_bfd_data): Handle merging of
4913 binaries marked as using MIPS32 Release 2.
4914
4915 2002-12-30 Dmitry Diky <diwil@mail.ru>
4916
4917 * Makefile.am: Add msp430 target.
4918 * configure.in: Likewise.
4919 * Makefile.in: Regenerate.
4920 * configure: Regenerate.
4921 * archures.c: Add msp430 architecture vector.
4922 * config.bfd: Likewise.
4923 * reloc.c: Add msp430 relocs.
4924 * targets.c: Add msp320 target.
4925 * cpu-msp430.c: New file: msp430 cpu detection.
4926 * elf32-msp430.c: New file: msp430 reloc processing.
4927 * bfd-in2.h: Regenerate.
4928 * libbfd.h: Regenerate.
4929
4930 2002-12-28 Jakub Jelinek <jakub@redhat.com>
4931
4932 * elf.c (elf_sort_sections): Don't reorder .tbss.
4933 (assign_file_positions_for_segments): Only adjust off/voff
4934 for increased alignment in PT_LOAD or PT_NOTE segment,
4935 but adjust p_filesz for .tbss too. in PT_LOAD consider
4936 .tbss to have zero memory size.
4937 (copy_private_bfd_data) [SECTION_SIZE]: Define.
4938 [IS_CONTAINED_BY_VMA, IS_CONTAINED_BY_LMA]: Use it.
4939 [INCLUDE_SECTION_IN_SEGMENT]: Only put SHF_TLS sections
4940 into PT_TLS segment. Never put SHF_TLS sections in
4941 segments other than PT_TLS or PT_LOAD.
4942
4943 * elf64-alpha.c (elf64_alpha_finish_dynamic_sections): Clear .plt
4944 sh_entsize.
4945
4946 2002-12-23 DJ Delorie <dj@redhat.com>
4947
4948 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Fix logic reversal.
4949
4950 2002-12-23 Alan Modra <amodra@bigpond.net.au>
4951
4952 * elflink.h (elf_link_output_extsym): Heed strip_discarded.
4953
4954 2002-12-23 Nick Clifton <nickc@redhat.com>
4955
4956 * archures.c (bfd_arch_get_compatible): Add third parameter
4957 'accept_unknowns'. Only accept unknown format BFDs if
4958 accept_unknowns is true, or if the format is "binary".
4959 * bfd-in2.h: Regenerate.
4960
4961 2002-12-21 Nick Clifton <nickc@redhat.com>
4962
4963 * coff-arm.c (coff_arm_relocate_section): Disable WINCE workaround
4964 that subtracted 8 from pc relative relocations.
4965
4966 2002-12-20 Kazu Hirata <kazu@cs.umass.edu>
4967
4968 * coff-h8300.c: Fix comment typos.
4969 * coffcode.h: Likewise.
4970 * cpu-cris.c: Likewise.
4971 * elf32-vax.c: Likewise.
4972 * genlink.h: Likewise.
4973 * linker.c: Likewise.
4974 * som.c: Likewise.
4975 * tekhex.c: Likewise.
4976 * vms-misc.c: Likewise.
4977
4978 2002-12-20 DJ Delorie <dj@redhat.com>
4979
4980 * reloc.c: Add BFD_RELOC_XSTORMY16_12.
4981 * libbfd.h: Regenerate.
4982 * bfd-in2.h: Regenerate.
4983 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_12.
4984 (xstormy16_reloc_map): Add R_XSTORMY16_12.
4985
4986 2002-12-19 Kazu Hirata <kazu@cs.umass.edu>
4987
4988 * doc/bfdint.texi: Fix typos.
4989
4990 2002-12-20 Paul Eggert <eggert@twinsun.com>
4991
4992 Port to POSIX 1003.1-2001.
4993 * acinclude.m4 (AM_INSTALL_LIBBFD): Do not rely on "test -o".
4994 * configure.in (build-warnings): Likewise.
4995 (Horrible hacks to build DLLs on Windows): Do not rely on "tail -1".
4996 * aclocal.m4: Regenerate.
4997 * config.in: Regenerate.
4998 * configure: Regenerate.
4999
5000 2002-12-19 Alan Modra <amodra@bigpond.net.au>
5001
5002 * coff-h8300.c: Include libiberty.h.
5003 (h8300_reloc16_extra_cases): Check the hash table creator before
5004 referencing h8300 specific fields. Stash the hash table pointer
5005 in a local var. Comment typo fixes.
5006 (h8300_bfd_link_add_symbols): Likewise.
5007
5008 * reloc.c (struct reloc_howto_struct): Revise src_mask and
5009 dst_mask comments.
5010 * bfd-in2.h: Regenerate.
5011
5012 2002-12-18 Alan Modra <amodra@bigpond.net.au>
5013
5014 * elf32-ppc.c (ppc_elf_relocate_section): Reorganize dynamic reloc
5015 code a little. Comment on dynamic relocs against section symbols.
5016
5017 2002-12-17 Roger Sayle <roger@eyesopen.com>
5018
5019 * configure.host (ia64-*-hpux*): Support 64 bit targets using
5020 the HP compiler's "long long".
5021
5022 2002-12-16 Andrew MacLeod <amacleod@redhat.com>
5023
5024 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_LO16
5025 and R_XSTORMY16_HI16) howto entries.
5026 (xstormy16_reloc_map): Map R_XSTORMY16_{LO,HI}16 to BFD_RELOC_{LO,HI}16.
5027 (xstormy16_info_to_howto_rela): Use R_XSTORMY16_GNU_VTINHERIT to
5028 determine the start of the second reloc table.
5029
5030 2002-12-16 Nathan Tallent <eraxxon@alumni.rice.edu>
5031
5032 * ecofflink.c: Fix the reading of the debugging information
5033 of Tru64/Alpha binaries that are produced by recent Compaq
5034 compilers.
5035 (mk_fdrtab): Fix error in creating the FDR (file descriptor)
5036 table.
5037 (lookup_line): Because of the strange information sometimes
5038 generated by Compaq's recent compilers, change how the FDR
5039 table is searched so that PDRs (procedure descriptors) are
5040 correctly found. Note that this change is really more of a hack;
5041 however, I have included extensive documentation as to why
5042 this is the best solution short of an extensive rewrite or
5043 another hack.
5044 (fdrtab_lookup): Add comments to explain the algorithm.
5045
5046 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
5047
5048 * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Reorder
5049 initializers to match struct declaration.
5050
5051 2002-12-12 Alan Modra <amodra@bigpond.net.au>
5052
5053 * dwarf2.c (comp_unit_contains_address): Comment typo fix.
5054 * elf.c (get_program_header_size): Likewise.
5055 * elf32-m32r.c (m32r_elf_lo16_reloc): Likewise.
5056 (m32r_elf_generic_reloc): Likewise.
5057 * elf32-ppc.c (ppc_elf_howto_init): Likewise.
5058 * elflink.h (elf_bfd_discard_info): Likewise.
5059
5060 2002-12-12 Alan Modra <amodra@bigpond.net.au>
5061
5062 * elf32-i386.c (elf_i386_finish_dynamic_sections): Add output_offset
5063 to DT_JMPREL. Use srelplt input section size for DT_PLTRELSZ and
5064 DT_RELSZ adjustment, not output section. Avoid writing tags when
5065 unchanged. Don't assume linker script is sane, adjust DT_REL too.
5066 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Just use raw
5067 size of srelplt for DT_PLTRELSZ. Use srelplt input section size for
5068 DT_RELASZ adjustment, not output section. Avoid writing tags when
5069 unchanged. Adjust DT_RELA.
5070 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Tweaks for better
5071 formatting. Avoid writing tags when unchanged. Adjust DT_RELA.
5072
5073 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
5074
5075 * elfxx-mips.c (mips_elf_calculate_relocation): Don't divide
5076 addend by 4.
5077
5078 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
5079
5080 * elfxx-mips.c (struct mips_got_entry): New.
5081 (struct mips_got_info): Added got_entries field.
5082 (mips_elf_got_entry_hash, mips_elf_got_entry_eq): New functions.
5083 (mips_elf_local_got_index, mips_elf_got_page,
5084 mips_elf_got16_entry): Re-implement in terms of new...
5085 (mips_elf_create_local_got_entry): Rewrite to use got_entries.
5086 Change return type.
5087 (mips_elf_highest): Warning clean-up.
5088 (mips_elf_create_got_section): Initialize got_entries.
5089 (_bfd_mips_elf_check_relocs): Use got_entries to estimate
5090 local got size.
5091 (_bfd_mips_elf_size_dynamic_sections): Do not account for
5092 GOT_PAGE entries, since we now reuse GOT16 entries.
5093
5094 2002-12-10 Jason Thorpe <thorpej@wasabisystems.com>
5095
5096 * aoutx.h (set_section_contents): Allow an otherwise unrepresentable
5097 read-only section that lies after .text and before .data to be
5098 written into the output file and included in a_text.
5099 (translate_to_native_sym_flags): If an otherwise unrepresentable
5100 section was merged with .text, convert its symbols to N_TEXT
5101 symbols.
5102 * libaout.h (aout_section_merge_with_text_p): New macro.
5103
5104 2002-12-08 Alan Modra <amodra@bigpond.net.au>
5105
5106 * bfd-in.h: Comment typo fix. Formatting.
5107 * bfd-in2.h: Regenerate.
5108 * coff64-rs6000.c (xcoff64_openr_next_archived_file): Warning fix.
5109 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): Prototype.
5110 * elf64-mmix.c (mmix_dump_bpo_gregs): Warning fix.
5111
5112 2002-12-05 Richard Henderson <rth@redhat.com>
5113
5114 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21BI.
5115 Only send PCREL21B though the plt. Fix installed reloc type.
5116 (elfNN_ia64_relocate_section): Give error for dynamic reloc
5117 against PCREL22 or PCREL64I; clean up error messages for
5118 branch relocs.
5119
5120 2002-12-04 Kevin Buettner <kevinb@redhat.com>
5121
5122 * elf64-mips.c (elf64_mips_grok_prstatus, elf64_mips_grok_psinfo):
5123 New functions.
5124 (elf_backend_grok_prstatus, elf_backend_grok_psinfo): Define.
5125
5126 2002-12-04 David Mosberger <davidm@hpl.hp.com>
5127
5128 * cpu-ia64-opc.c: Add operand constant "ar.csd".
5129
5130 2002-12-04 H.J. Lu <hjl@gnu.org>
5131
5132 * elfxx-ia64.c (get_local_sym_hash): Use section ID instead of
5133 BFD address when constructing local name.
5134
5135 2002-12-04 Andreas Schwab <schwab@suse.de>
5136
5137 * elf32-m68k.c (struct elf_m68k_link_hash_table): Add sym_sec
5138 member.
5139 (elf_m68k_link_hash_table_create): Initialize it.
5140 (elf_m68k_check_relocs): Handle symbols that are forced to be
5141 local due to visibility changes.
5142 (elf_m68k_adjust_dynamic_symbol): Likewise.
5143 (elf_m68k_size_dynamic_sections): Likewise.
5144 (elf_m68k_discard_copies): Likewise.
5145 (elf_m68k_relocate_section): Likewise.
5146
5147 2002-12-04 Alan Modra <amodra@bigpond.net.au>
5148
5149 * elf64-ppc.c (ppc64_elf_edit_opd): Correct typo.
5150
5151 2002-12-04 Alan Modra <amodra@bigpond.net.au>
5152
5153 * srec.c (srec_write_symbols): Restore '$' prefix to address
5154 accidentally removed in 2002-04-04 change.
5155 (srec_get_symtab): Use 0 instead of `(long) FALSE'.
5156
5157 2002-12-03 Nick Clifton <nickc@redhat.com>
5158
5159 * elf32-ppc.c (apuinfo_list_init): New function.
5160 (apuinfo_list_add): New function: Add a value to the list.
5161 (apuinfo_list_length): New function: Return the number of
5162 values on the list.
5163 (apuinfo_list_element): New function: Return a value on the
5164 list.
5165 (apuinfo_list_finish): New function: Free the resources used
5166 by the list.
5167 (ppc_elf_begin_write_processing): New function. Scan the
5168 input bfds for apuinfo sections.
5169 (ppc_elf_write_section): New function: Delay the creation of
5170 the contents of an apuinfo section in an output bfd.
5171 (ppc_elf_final_write_processing): New function. Create the
5172 contents of an apuinfo section in an output bfd.
5173 (elf_backend_begin_write_processing): Define.
5174 (elf_backend_final_write_processing): Define.
5175 (elf_backend_write_section): Define.
5176
5177 2002-12-03 Richard Henderson <rth@redhat.com>
5178
5179 * cpu-ia64-opc.c (elf64_ia64_operands): Add ldxmov entry.
5180
5181 2002-12-01 Stephane Carrez <stcarrez@nerim.fr>
5182
5183 Fix PR savannah/1417:
5184 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Don't adjust
5185 branch if it goes to the start of the deleted region.
5186
5187 2002-12-01 Stephane Carrez <stcarrez@nerim.fr>
5188
5189 * bfd-in2.h (bfd_mach_m6812): Rebuild.
5190 * archures.c (bfd_mach_m6812_default, bfd_mach_m6812,
5191 bfd_mach_m6812s): Declare.
5192
5193 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): New function.
5194 (_bfd_m68hc12_elf_set_private_flags): Call it.
5195 (_bfd_m68hc12_elf_print_private_bfd_data): Report processor version.
5196 (_bfd_m68hc12_elf_merge_private_bfd_data): Merge the flags and
5197 report microcontroller incompatibilities (HC12 vs HCS12).
5198 (elf_backend_object_p): Update.
5199
5200 2002-11-30 Alan Modra <amodra@bigpond.net.au>
5201
5202 * bfd-in.h (TRUE_FALSE_ALREADY_DEFINED, BFD_TRUE_FALSE): Delete.
5203 (enum bfd_boolean, boolean): Delete.
5204 (bfd_boolean): Typedef to an int.
5205 (FALSE, TRUE): Define.
5206 * aix386-core.c, aix5ppc-core.c, aout-adobe.c, aout-arm.c, aout-cris.c,
5207 aout-encap.c, aout-ns32k.c, aout-target.h, aout-tic30.c, aoutf1.h,
5208 aoutx.h, archive.c, archive64.c, archures.c, bfd-in.h, bfd.c, bfdwin.c,
5209 binary.c, bout.c, cache.c, cisco-core.c, coff-a29k.c, coff-alpha.c,
5210 coff-apollo.c, coff-arm.c, coff-aux.c, coff-h8300.c, coff-h8500.c,
5211 coff-i386.c, coff-i860.c, coff-i960.c, coff-ia64.c, coff-m68k.c,
5212 coff-m88k.c, coff-mcore.c, coff-mips.c, coff-or32.c, coff-ppc.c,
5213 coff-rs6000.c, coff-sh.c, coff-sparc.c, coff-stgo32.c, coff-tic30.c,
5214 coff-tic4x.c, coff-tic54x.c, coff-tic80.c, coff-w65.c, coff-we32k.c,
5215 coff-z8k.c, coff64-rs6000.c, coffcode.h, coffgen.c, cofflink.c,
5216 corefile.c, cpu-a29k.c, cpu-alpha.c, cpu-arc.c, cpu-arm.c, cpu-avr.c,
5217 cpu-cris.c, cpu-d10v.c, cpu-d30v.c, cpu-dlx.c, cpu-fr30.c, cpu-frv.c,
5218 cpu-h8300.c, cpu-h8500.c, cpu-hppa.c, cpu-i370.c, cpu-i386.c,
5219 cpu-i860.c, cpu-i960.c, cpu-ia64.c, cpu-ip2k.c, cpu-m10200.c,
5220 cpu-m10300.c, cpu-m32r.c, cpu-m68hc11.c, cpu-m68hc12.c, cpu-m68k.c,
5221 cpu-m88k.c, cpu-mcore.c, cpu-mips.c, cpu-mmix.c, cpu-ns32k.c,
5222 cpu-openrisc.c, cpu-or32.c, cpu-pdp11.c, cpu-pj.c, cpu-powerpc.c,
5223 cpu-rs6000.c, cpu-s390.c, cpu-sh.c, cpu-sparc.c, cpu-tic30.c,
5224 cpu-tic4x.c, cpu-tic54x.c, cpu-tic80.c, cpu-v850.c, cpu-vax.c,
5225 cpu-w65.c, cpu-we32k.c, cpu-xstormy16.c, cpu-z8k.c, dwarf1.c,
5226 dwarf2.c, ecoff.c, ecofflink.c, efi-app-ia32.c, efi-app-ia64.c,
5227 elf-bfd.h, elf-eh-frame.c, elf-hppa.h, elf-m10200.c, elf-m10300.c,
5228 elf-strtab.c, elf.c, elf32-arc.c, elf32-arm.h, elf32-avr.c,
5229 elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c, elf32-fr30.c,
5230 elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c, elf32-hppa.h,
5231 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
5232 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
5233 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
5234 elf32-pj.c, elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-sh64-com.c,
5235 elf32-sh64.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
5236 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
5237 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-ppc.h, elf64-s390.c,
5238 elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c,
5239 elfarm-oabi.c, elfcode.h, elfcore.h, elflink.c, elflink.h,
5240 elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c, elfxx-mips.h,
5241 elfxx-target.h, format.c, freebsd.h, genlink.h, hash.c, hp300hpux.c,
5242 hppabsd-core.c, hpux-core.c, i386aout.c, i386linux.c, i386lynx.c,
5243 i386mach3.c, i386msdos.c, i386os9k.c, ieee.c, ihex.c, irix-core.c,
5244 libaout.h, libbfd-in.h, libbfd.c, libcoff-in.h, libecoff.h, libieee.h,
5245 libnlm.h, liboasys.h, libpei.h, libxcoff.h, linker.c, lynx-core.c,
5246 m68klinux.c, m68klynx.c, mach-o.c, mach-o.h, merge.c, mipsbsd.c,
5247 mmo.c, netbsd-core.c, netbsd.h, nlm.c, nlm32-alpha.c, nlm32-i386.c,
5248 nlm32-ppc.c, nlm32-sparc.c, nlmcode.h, oasys.c, opncls.c, osf-core.c,
5249 pc532-mach.c, pdp11.c, pe-arm.c, pe-i386.c, pe-mcore.c, pe-mips.c,
5250 pe-sh.c, peXXigen.c, pef.c, pei-arm.c, pei-i386.c, pei-mcore.c,
5251 pei-mips.c, pei-sh.c, peicode.h, ppcboot.c, ptrace-core.c, reloc.c,
5252 reloc16.c, riscix.c, rs6000-core.c, sco5-core.c, section.c, simple.c,
5253 som.c, som.h, sparclinux.c, sparclynx.c, srec.c, stabs.c, sunos.c,
5254 syms.c, targets.c, tekhex.c, ticoff.h, trad-core.c, versados.c,
5255 vms-gsd.c, vms-hdr.c, vms-misc.c, vms-tir.c, vms.c, vms.h,
5256 xcoff-target.h, xcofflink.c, xsym.c, xsym.h: Replace boolean with
5257 bfd_boolean, true with TRUE, false with FALSE. Simplify comparisons
5258 of bfd_boolean vars with TRUE/FALSE. Formatting.
5259 * bfd-in2.h, libbfd.h, libcoff.h: Regenerate
5260
5261 2002-11-28 Alan Modra <amodra@bigpond.net.au>
5262
5263 * elf-bfd.h: Replace occurrences of Elf32_Internal_* and
5264 Elf64_Internal_* with Elf_Internal_*. Replace Elf_Internal_Rel
5265 with Elf_Internal_Rela.
5266 * elf-hppa.h, elf-m10200.c, elf-m10300.c, elf32-arc.c, elf32-arm.h,
5267 elf32-avr.c, elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c,
5268 elf32-fr30.c, elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c,
5269 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
5270 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
5271 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
5272 elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-v850.c, elf32-vax.c,
5273 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
5274 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
5275 elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c, elfarm-oabi.c,
5276 elfcode.h, elflink.h, elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c: Ditto.
5277 * elf-hppa.h (elf_hppa_internal_shdr): Delete. Use Elf_Internal_Shdr
5278 throughout instead.
5279 * elf.c (_bfd_elf_no_info_to_howto_rel): Delete.
5280 * elfcode.h (elf_swap_reloca_in): Pass source operand as a bfd_byte *.
5281 Remove INLINE keyword.
5282 (elf_swap_reloc_in): Likewise. Also clear r_addend.
5283 (elf_swap_reloc_out, elf_swap_reloca_out): Pass destination operand
5284 as a bfd_byte *.
5285 (elf_write_relocs): Consolidate REL and RELA code.
5286 (elf_slurp_reloc_table_from_section): Simplify REL code.
5287 (NAME(_bfd_elf,size_info)): Populate reloc swap entries.
5288 * elf-bfd.h (MAX_INT_RELS_PER_EXT_REL): Define.
5289 * elflink.h (elf_link_read_relocs_from_section): Consolidate REL and
5290 RELA code.
5291 (elf_link_adjust_relocs): Likewise. Don't malloc space for temp
5292 reloc array, use a fixed size of MAX_INT_RELS_PER_EXT_REL.
5293 (elf_link_output_relocs): Likewise.
5294 (elf_reloc_link_order): Likewise.
5295 (elf_finish_pointer_linker_section): Likewise.
5296 (struct elf_link_sort_rela): Remove union.
5297 (elf_link_sort_cmp1): Update to suit.
5298 (elf_link_sort_cmp2): Here too.
5299 (elf_link_sort_relocs): Consolidate REL and RELA code. Fix memory
5300 over-allocation for int_rels_per_ext_rel != 1 case.
5301 * elf32-arm.h: Update all bfd_elf32_swap_reloc_out calls.
5302 * elf32-i386.c: Likewise.
5303 * elf32-cris.c: Likewise for bfd_elf32_swap_reloca_out.
5304 * elf32-hppa.c, elf32-i370.c, elf32-m68k.c, elf32-ppc.c, elf32-s390.c,
5305 elf32-sh.c, elf32-vax.c, elfxx-mips.c: Likewise.
5306 * elf64-alpha.c: Likewise for bfd_elf64_swap_reloca_out.
5307 * elf64-hppa.c, elf64-mips.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
5308 elf64-sparc.c, elf64-x86-64.c: Likewise.
5309 * elfxx-ia64.c: Likewise for bfd_elfNN_swap_reloca_out.
5310 * elfxx-mips.c (sort_dynamic_relocs): Likewise for
5311 bfd_elf32_swap_reloc_in.
5312
5313 * elf32-arm.h: Update elf32_arm_info_to_howto calls.
5314 * elf32-mips.c: Likewise for mips_info_to_howto_rel.
5315 (mips_elf64_swap_reloc_in): Zero r_addend.
5316 (mips_elf64_be_swap_reloc_in): Likewise.
5317 (mips_elf64_slurp_one_reloc_table): Simplify.
5318
5319 * elf64-alpha.c (alpha_elf_size_info): Populate reloc swap entries.
5320 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
5321 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
5322
5323 2002-11-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5324
5325 * elf32-sh.c (sh_elf_relocate_section): Don't complain about
5326 unresolved debugging relocs in dynamic applications.
5327 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
5328
5329 2002-11-26 Alan Modra <amodra@bigpond.net.au>
5330
5331 * elf-eh-frame.c (ENSURE_NO_RELOCS): Disregard R_*_NONE relocs.
5332 (_bfd_elf_discard_section_eh_frame): Don't discard duplicate CIEs
5333 on a relocatable link. Comment typos.
5334 * elf.c (_bfd_elf_link_hash_newfunc): Assign elements of structure
5335 in the order they are declared. Clear elf_hash_value too.
5336 (_bfd_elf_link_hash_table_init): Likewise assign in order. Clear
5337 eh_info and tls_segment.
5338 * elflink.h (elf_link_input_bfd <emit_relocs>): Keep reloc offsets
5339 sorted when discarding relocs by turning them into R_*_NONE.
5340
5341 * libbfd.c (warn_deprecated): Comment spelling.
5342 * po/SRC-POTFILES.in: Regenerate.
5343
5344 2002-11-21 Richard Henderson <rth@redhat.com>
5345
5346 * elflink.h (elf_link_add_object_symbols): Don't overwrite the
5347 arch's st_other bits when merging visibilities.
5348 (elf_link_output_extsym): Tidy clearing of visibility field.
5349
5350 2002-11-21 Alan Modra <amodra@bigpond.net.au>
5351
5352 * coff-mcore.c (SWAP_IN_RELOC_OFFSET): Define.
5353 (SWAP_OUT_RELOC_OFFSET): Define.
5354
5355 2002-11-20 Alexandre Oliva <aoliva@redhat.com>
5356
5357 * elf.c (_bfd_elf_link_hash_table_init): Make sure
5358 can_refcount is properly extended to the type of
5359 init_refcount.
5360
5361 2002-11-19 Alexandre Oliva <aoliva@redhat.com>
5362
5363 * elfxx-mips.c (MIPS_RELOC_RELA_P): New macro.
5364 (_bfd_mips_elf_relocate_section): Use it.
5365
5366 * elfxx-mips.c (MNAME): New macro.
5367 (_bfd_mips_elf_check_relocs): Use it.
5368 (_bfd_mips_elf_discard_info): Likewise.
5369 (_bfd_mips_elf_final_link): Likewise.
5370
5371 2002-11-19 Alan Modra <amodra@bigpond.net.au>
5372
5373 * elf64-ppc.c (ppc64_elf_edit_opd): When deleting relocs, adjust
5374 rel_hdr.sh_size too.
5375
5376 2002-11-18 Klee Dienes <kdienes@apple.com>
5377
5378 * Makefile.am (BFD32_LIBS): Add bfdwin.lo, bfdio.lo.
5379 (BFD32_LIBS_CFILES): Add bfdwin.c, bfdio.c.
5380 (BFD_H_FILES): Add bfdwin.c, bfdio.c.
5381 (LIBBFD_H_FILES): Add bfdwin.c, bfdio.c.
5382 Add dependencies for bfdwin.c, bfdio.c.
5383 * bfd.c: Remove bfd_get_mtime, bfd_get_size.
5384 * libbfd.c: Remove real_read, bfd_bread, _bfd_window_internal,
5385 bfd_init_window, bfd_free_window, bfd_get_file_window, bfd_bwrite,
5386 bfd_tell, bfd_flush, bfd_stat, bfd_seek.
5387 * bfdio.c: New file. Contains real_read, bfd_bread, bfd_write,
5388 bfd_tell, bfd_flush, bfd_stat, bfd_seek, bfd_ge_mtime,
5389 bfd_get_size (moved from libbfd.c and bfd.c).
5390 * bfdwin.c New file. Contains _bfd_window_internal,
5391 bfd_init_window, bfd_free_window, bfd_get_file_window (moved from
5392 libbfd.c and bfd.c).
5393 * po/SRC-POTFILES.in: Regenerate.
5394 * po/bfd.pot: Regenerate.
5395 * libbfd.h: Regenerate.
5396 * bfd-in2.h: Regenerate.
5397 * aclocal.m4: Regenerate.
5398 * Makefile.in: Regenerate.
5399 * configure: Regenerate.
5400
5401 2002-11-18 Klee Dienes <kdienes@apple.com>
5402
5403 * bfd.c (bfd_preserve_save): Don't zero BFD_IN_MEMORY.
5404
5405 2002-11-15 Kazu Hirata <kazu@cs.umass.edu>
5406
5407 * coff-h8300.c (h8300_reloc16_estimate): Do not optimize away
5408 jsr after a short jump.
5409 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
5410
5411 2002-11-15 Klee Dienes <kdienes@apple.com>
5412
5413 * pef.c (bfd_pef_convert_architecture): Move declaration of
5414 ARCH_POWERPC and ARCH_M68K to the start of the function.
5415
5416 2002-11-14 Svein E. Seldal <Svein.Seldal@solidas.com>
5417
5418 * coff-tic4x.c (tic4x_howto_table): Formatting fixup
5419
5420 2002-11-14 Hans-Peter Nilsson <hp@bitrange.com>
5421
5422 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs):
5423 For bpo_gregs_section->contents, allocate _raw_size, not
5424 _cooked_size.
5425
5426 2002-11-13 Klee Dienes <kdienes@apple.com>
5427
5428 * config.bfd: Add entries for powerpc-*-darwin and cousins.
5429
5430 2002-11-13 H.J. Lu <hjl@gnu.org>
5431
5432 * elfcode.h (elf_object_p): Don't restore abfd->arch_info.
5433
5434 2002-11-13 Klee Dienes <kdienes@apple.com>
5435 Alan Modra <amodra@bigpond.net.au>
5436
5437 * bfd.c (struct bfd_preserve): New.
5438 (bfd_preserve_save): New function.
5439 (bfd_preserve_restore): Ditto.
5440 (bfd_preserve_finish): Ditto.
5441 * bfd-in2.h: Regenerate.
5442 * mach-o.c: Formatting.
5443 (bfd_mach_o_scan_read_symtab_symbol): Make "value" unsigned.
5444 (bfd_mach_o_object_p): Use bfd_preserve_save/restore/finish.
5445 (bfd_mach_o_core_p): Ditto.
5446 (bfd_mach_o_scan): Pass in mdata.
5447 * mach-o.h (bfd_mach_o_scan): Update prototype.
5448 * pef.c: Formatting.
5449 (bfd_pef_object_p): Use bfd_preserve_save/restore/finish.
5450 (bfd_pef_xlib_object_p): Ditto.
5451 (bfd_pef_scan): Pass in mdata. Move version check to bfd_pef_object_p.
5452 * pef.h (bfd_pef_scan): Update prototype.
5453 * xsym.c: Formatting, K&R fixes.
5454 (bfd_sym_object_p): Use bfd_preserve_save/restore/finish.
5455 (bfd_sym_scan): New function split out from bfd_sym_object_p.
5456 * xsym.h (bfd_sym_scan): Declare.
5457 * elfcode.h (elf_object_p): Use bfd_preserve_save/restore/finish.
5458 * elfcore.h (elf_core_file_p): Likewise.
5459 * targets.c (_bfd_target_vector): Revert 2002-11-08 change.
5460
5461 2002-11-12 Nick Clifton <nickc@redhat.com>
5462
5463 * po/da.po: Updated Danish translation.
5464
5465 2002-11-12 Alan Modra <amodra@bigpond.net.au>
5466
5467 * elflink.h (elf_link_add_object_symbols): Optimize stabs for
5468 relocatable link too.
5469 (elf_link_input_bfd): When emitting relocs, adjust offsets for
5470 eh_frame and stab sections. Zap deleted relocs.
5471 (elf_reloc_symbol_deleted_p): Return true for zero r_symndx.
5472 (elf_bfd_discard_info): Run for relocatable link too.
5473 * elf64-ppc.c (ppc64_elf_edit_opd): Rename from edit_opd. Make global.
5474 Handle ld -r case.
5475 (ppc64_elf_size_dynamic_sections): Don't call edit_opd from here.
5476 * elf64-ppc.h (ppc64_elf_edit_opd): Declare.
5477
5478 * elf-bfd.h (struct cie_header): Move from elf_eh-frame.c.
5479 (struct cie, struct eh_cie_fde, struct eh_frame_sec_info): Likewise.
5480 (struct eh_frame_array_ent, struct eh_frame_hdr_info): Likewise.
5481 (enum elf_link_info_type): Remove ELF_INFO_TYPE_EH_FRAME_HDR.
5482 (struct eh_frame_hdr_info): Add "hdr_sec", remove "split".
5483 (struct elf_link_hash_table): Add eh_info.
5484 (struct elf_obj_tdata): Change eh_frame_hdr to an asection *.
5485 (_bfd_elf_discard_section_eh_frame): Update prototype.
5486 (_bfd_elf_discard_section_eh_frame_hdr): Likewise.
5487 (_bfd_elf_write_section_eh_frame): Likewise.
5488 (_bfd_elf_write_section_eh_frame_hdr): Likewise.
5489 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Remove "ehdrsec"
5490 param. Get "hdr_info" from link hash table.
5491 (_bfd_elf_discard_section_eh_frame_hdr): Remove "sec" param. Get
5492 header section from link hash table. Save header section to elf_tdata.
5493 (_bfd_elf_maybe_strip_eh_frame_hdr): Remove local "sec". Use
5494 header section from link hash table. Don't alloc hdr_info. Clear
5495 hdr_sec instead of setting "strip".
5496 (_bfd_elf_eh_frame_section_offset): Formatting.
5497 (_bfd_elf_write_section_eh_frame): Remove "ehdrsec", add "info" param.
5498 Get header section from link hash table.
5499 (_bfd_elf_write_section_eh_frame_hdr): Remove "sec", add "info" param.
5500 Get header section from link hash table.
5501 * elf.c (map_sections_to_segments): Use cached eh_frame_hdr.
5502 (get_program_header_size): Likewise.
5503 (_bfd_elf_section_offset): Formatting.
5504 * elflink.h (elf_link_create_dynamic_sections): Stash eh frame header
5505 section pointer in link hash table.
5506 (elf_bfd_final_link): Adjust _bfd_elf_write_section_eh_frame_hdr
5507 and _bfd_elf_write_section_eh_frame calls. Update comment about
5508 eh_frame entries.
5509 (elf_bfd_discard_info): Adjust _bfd_elf_discard_section_eh_frame and
5510 _bfd_elf_discard_section_eh_frame_hdr calls. Remove "ehdr".
5511
5512 * po/SRC-POTFILES.in: Regenerate.
5513
5514 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't zero
5515 relocs for discarded FDEs. Remove dead code.
5516 (_bfd_elf_write_section_eh_frame_hdr): Remove dead code.
5517 * elflink.h (elf_bfd_discard_info): Don't save edited relocs.
5518 Tidy conditions under which stabs are edited. Formatting.
5519 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
5520 from discarded relocs.
5521 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Add reloc output
5522 section adjustments after testing magic values.
5523
5524 2002-11-12 Thomas Moestl <tmm@FreeBSD.org>
5525
5526 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Correct
5527 references to large plt symbols.
5528
5529 2002-11-12 Klee Dienes <kdienes@apple.com>
5530
5531 * mach-o.c (bfd_mach_o_scan_read_thread): Don't re-use 'i' when
5532 looking for an unused section name.
5533
5534 2002-11-11 Kazu Hirata <kazu@cs.umass.edu>
5535
5536 * coff-h8300.c: Fix formatting.
5537 * elf32-h8300.c: Likewise.
5538 * reloc16.c: Likewise.
5539
5540 2002-11-09 Jeroen Dobbelaere <jeroen.dobbelaere@acunia.com>
5541
5542 * elf32-arm.h (elf32_arm_size_dynamic_sections): Don't strip output
5543 section when dynamic section unused; _bfd_strip_section_from_output
5544 instead.
5545
5546 2002-11-08 Alan Modra <amodra@bigpond.net.au>
5547
5548 * targets.c (_bfd_target_vector): Disable pef_vec, pef_xlib_vec
5549 and sym_vec.
5550
5551 * dwarf2.c: Revert last change.
5552
5553 2002-11-07 Michal Ludvig <mludvig@suse.cz>
5554
5555 * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
5556 _bfd_dwarf2_find_nearest_line): Use
5557 bfd_simple_get_relocated_section_contents() instead of
5558 bfd_get_section_contents().
5559 * reloc.c (bfd_perform_relocation): Add sanity check.
5560 * simple.c (simple_get_relocated_section_contents): If the section
5561 does not have any relocs associated with it, just return the
5562 unadjusted contents.
5563
5564 2002-11-07 Hans-Peter Nilsson <hp@axis.com>
5565
5566 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOT,
5567 case R_CRIS_32_GOT>: Correct test for filling in constant .got
5568 contents, enabling for a non-DSO, for symbols defined in the
5569 program with --export-dynamic.
5570
5571 2002-11-07 Alan Modra <amodra@bigpond.net.au>
5572
5573 * elf64-ppc.c: Comment typo fixes.
5574 (ppc64_elf_merge_private_bfd_data): Allow BFD_ENDIAN_UNKNOWN input.
5575
5576 2002-11-07 Nick Clifton <nickc@redhat.com>
5577
5578 * po/da.po: Updated Danish translation.
5579
5580 2002-11-06 Alexandre Oliva <aoliva@redhat.com>
5581
5582 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Generate
5583 exactly three internal relocs per external reloc. Set reloc_count
5584 to the external reloc count.
5585
5586 2002-11-06 Klee Dienes <kdienes@apple.com>
5587
5588 * coff-stgo32.c (stub_bytes): Mark as const.
5589 Fix comment formatting.
5590
5591 2002-11-06 Klee Dienes <kdienes@apple.com>
5592
5593 * Makefile.am (BFD32_BACKENDS): Add mach-o.lo, pef.lo, and
5594 xsym.lo.
5595 (BFD32_BACKENDS_CFILES): Add mach-o.c, pef.c, and xsym.c.
5596 (SOURCE_HFILES): Add mach-o.h, pef.h, pef-traceback.h, xsym.h
5597 * archures.c (enum bfd_architecture): Add bfd_arch_m98k.
5598 * bfd.c (struct bfd): Add private data for mach-o, pef, and sym.
5599 * targets.c (enum bfd_flavour): Add flavours for mach-o, pef, and
5600 sym.
5601 (_bfd_target_vector): Add target vectors for mach-o, pef, and sym.
5602 * Makefile.in: Regenerate.
5603 * doc/Makefile.in: Regenerate.
5604 * bfd-in2.h: Regenerate.
5605 * xsym.c: New file. Contains support for the Apple/Metrowerks
5606 xSYM debugging format.
5607 * xsym.h: New file.
5608 * pef.c: New file. Contains support for the Apple Code Fragment
5609 Manager Preferred Executable Format
5610 * pef.h: New file.
5611 * pef-traceback.h: New file. Contains support for parsing PowerPC
5612 traceback tables as used by PEF executables (and perhaps other
5613 systems as well).
5614 * mach-o.c: New file. Contains support for the Mach-O object file
5615 format.
5616 * mach-o.h: New file.
5617 * mach-o-target.c: New file. Declares the mach-o targets
5618 themselves. Included three times by mach-o.c; each time with a
5619 different set of macros set.
5620
5621 2002-11-06 Graeme Peterson <gp@qnx.com>
5622
5623 * Makefile.am: Remove entries for elf32-qnx.[ch].
5624 * Makefile.in: Regenerate.
5625 * config.bfd: Change arm-nto to use bfd_elf32_{big|little}arm_vec,
5626 ppc-nto to use bfd_elf32_powerpc{le}_vec, sh-nto to use
5627 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
5628 * configure.in: Remove support for bfd_elf32_sh{l}qnx_vec,
5629 bfd_elf32_powerpc{le}qnx_vec, bfd_elf32_{big|little}armqnx_vec,
5630 and bfd_elf32_i386qnx_vec, and removed elf32-qnx.lo from other targets.
5631 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
5632 * configure: Regenerate.
5633 * elf32-qnx.c: Remove.
5634 * elf32-qnx.h: Remove.
5635 * elf.c: Remove calls to QNX specific set_nonloadable_filepos,
5636 is_contained_by_filepos, and copy_private_bfd_data_p.
5637 * elf-bfd.h (struct elf_backend_data): Remove set_nonloadable_filepos,
5638 is_contained_by_filepos, and copy_private_bfd_data_p.
5639 * elf32-i386.c: Remove QNX extended bfd support.
5640 * elf32-ppc.c: Remove QNX extended bfd support.
5641 * elf32-sh.c: Remove QNX extended bfd support.
5642 * elfarm-nabi.c: Remove QNX extended bfd support.
5643 * targets.c: Remove qnx vectors.
5644 * elfxx-target.h (elf_backend_set_nonloadable_filepos): Remove
5645 (elf_backend_is_contained_by_filepos): Remove.
5646 (elf_backend_copy_private_bfd_data_p): Remove.
5647 * po/SRC-POTFILES.in: Regenerate.
5648
5649 2002-11-06 David O'Brien <obrien@FreeBSD.org>
5650 Alan Modra <amodra@bigpond.net.au>
5651
5652 * elf64-sparc.c (sparc64_elf_relocate_section): Adjust addend of
5653 dynamic relocs against section symbols for the output section vma.
5654
5655 2002-11-05 Alan Modra <amodra@bigpond.net.au>
5656
5657 * elf32-arm.h (t2a1_push_insn, t2a2_ldr_insn, t2a3_mov_insn,
5658 t2a4_bx_insn, t2a5_pop_insn, t2a6_bx_insn): Remove.
5659
5660 2002-11-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5661 Alan Modra <amodra@bigpond.net.au>
5662
5663 * config.bfd (sh-*-linux*): Use bfd_elf*_sh64*lin_vec as sh64
5664 vectors in target_selvecs.
5665 (shle-*-netbsdelf*): Use bfd_elf*_sh64*nbsd_vec as sh64 vectors
5666 in target_selvecs.
5667 (sh-*-netbsdelf*): Likewise.
5668 * configure.in (assocvecs): New variable. Handle assocvecs like
5669 selvecs.
5670 * configure: Regenerate.
5671 * format.c (bfd_check_format_matches): Store bfd_target pointers
5672 in matching_vector instead of target names. Select first target
5673 from bfd_associated_vector that matches a list of ambiguous targets.
5674 * targets.c (_bfd_associated_vector): New array.
5675 (bfd_associated_vector): New variable.
5676 (_bfd_target_vector): Add bfd_elf*_sh64*lin_vec.
5677 * libbfd-in.h (bfd_associated_vector): Declare.
5678 * libbfd.h: Regenerate.
5679
5680 2002-11-05 Elias Athanasopoulos <eathan@otenet.gr>
5681
5682 * vms-gsd.c (_bfd_vms_write_gsd): Check that symbol->udata.p is
5683 non-NULL before dereferencing.
5684
5685 2002-11-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5686
5687 * vms.c (vms_object_p): Restore the start address when returning
5688 NULL.
5689
5690 2002-11-04 Alan Modra <amodra@bigpond.net.au>
5691 Hans-Peter Nilsson <hp@axis.com>
5692
5693 * elflink.h (struct elf_final_link_info): Add shndxbuf_size.
5694 (elf_bfd_final_link): Don't bother zeroing symtab_hdr fields.
5695 Set up a larger symshndxbuf, and write it out. Free it on
5696 exit rather than freeing symbuf twice. Correct section index
5697 on output section symbol loop.
5698 (elf_link_output_sym): Accumulate symbol extension section
5699 indices, reallocating symshndxbuf rather than writing it out.
5700 (elf_link_flush_output_syms): Don't flush symshndxbuf.
5701 * elf.c (assign_section_numbers): Init i_shdrp to all zero.
5702 Use bfd_zalloc to clear i_shdrp[0] too.
5703
5704 2002-11-03 Stephen Clarke <stephen.clarke@earthling.net>
5705
5706 * elf32-sh64-com.c (sh64_address_in_cranges): Use
5707 _raw_size of cranges section if _cooked_size not yet set.
5708
5709 2002-11-03 Hans-Peter Nilsson <hp@axis.com>
5710
5711 * elf32-v850.c (v850_elf_relax_delete_bytes): Correct parameters
5712 for bfd_elf32_swap_symbol_out.
5713
5714 2002-10-31 David O'Brien <obrien@FreeBSD.org>
5715
5716 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't mix
5717 signed and unsigned in comparison.
5718
5719 2002-10-30 Daniel Jacobowitz <drow@mvista.com>
5720
5721 * coffcode.h: Remove extraneous '\'.
5722
5723 2002-10-28 H.J. Lu <hjl@gnu.org>
5724
5725 * Makefile.am (targets.lo): Depend on Makefile instead of
5726 config.status.
5727 (archures.lo): Likewise.
5728 * Makefile.in: Regenerated.
5729
5730 2002-10-25 Jason Thorpe <thorpej@wasabisystems.com>
5731
5732 * config.bfd (mips*el-*-netbsd*, mips*-*-netbsd*): Add
5733 bfd_elf64_bigmips_vec and bfd_elf64_littlemips_vec to
5734 targ_selvecs.
5735
5736 2002-10-25 Jim Wilson <wilson@redhat.com>
5737
5738 * elf64-sh64.c (sh_elf64_relocate_section): Call
5739 _bfd_elf_rela_local_sym. Handle relocs against STT_SECTION symbol
5740 of SHF_MERGE section.
5741
5742 2002-10-25 Hans-Peter Nilsson <hp@axis.com>
5743
5744 * simple.c: Correct placement of ATTRIBUTE_UNUSED.
5745
5746 2002-10-24 John David Anglin <dave@hiauly1.hia.nrc.ca>
5747
5748 * aoutx.h (NAME(aout,swap_ext_reloc_in)): Cast bytes->r_index to
5749 unsigned int. Cast RELOC_BASE10, RELOC_BASE13 and RELOC_BASE22 to
5750 unsigned int.
5751 (NAME(aout,final_link)): Cast enum used in assignment.
5752 (aout_link_write_symbols): Cast enums in comparisons, int values to
5753 boolean, enums in assignments to int.
5754 (aout_link_input_section_std): Cast rel->r_index to unsigned int.
5755 (aout_link_input_section_ext): Likewise. Cast enums used in
5756 comparisons with unsigned ints.
5757 (aout_link_reloc_link_order): Cast enum to int in assignment.
5758 * archive.c (_bfd_generic_read_ar_hdr_mag): Cast result of memchr
5759 calls to char *.
5760 * bfd-in.h (bfd_set_section_vma): Cast enum true to unsigned int in
5761 assignment.
5762 * bfd-in2.h (bfd_set_section_vma): Likewise.
5763 * bfd.c (bfd_record_phdr): Cast enums in assignments.
5764 * binary.c (bfd_alloc): Cast enum to long.
5765 * coffgen.c (_bfd_coff_is_local_label_name): Cast return to boolean.
5766 * dwarf2.c (read_abbrevs): Add casts to enum types.
5767 (read_attribute_value): Likewise.
5768 (arange_add): Cast result of bfd_zalloc call.
5769 (comp_unit_contains_address): Return true and false.
5770 (comp_unit_find_nearest_line): Cast return to boolean.
5771 * format.c (bfd_check_format_matches, bfd_set_format): Likewise.
5772 * gen-aout.c: define macro '_' if not defined.
5773 * libbfd.c (bfd_realloc): Cast malloc and realloc to PTR.
5774 (bfd_bwrite): Cast bfd_realloc to bfd_byte *.
5775 (bfd_write_bigendian_4byte_int): Cast return to boolean.
5776 (bfd_seek): Cast bfd_realloc to bfd_byte *.
5777 (bfd_generic_is_local_label_name): Cast return to boolean.
5778 * libcoff.h (_bfd_coff_adjust_symndx): Remove extraneous '\'.
5779 * linker.c (_bfd_link_hash_newfunc): Cast bfd_hash_allocate result to
5780 struct bfd_hash_entry *.
5781 (_bfd_generic_link_hash_newfunc): likewise.
5782 (_bfd_generic_final_link): Cast enum to unsigned int.
5783 * merge.c (sec_merge_emit): Cast return to boolean.
5784 (merge_strings): Add casts to const unsigned char *.
5785 * reloc.c (bfd_get_reloc_code_name): Cast enums in comparison to int.
5786 (bfd_generic_get_relocated_section_content): Cast enum to unsigned int.
5787 * section.c (bfd_section_hash_newfunc): Cast bfd_hash_allocate result
5788 to struct bfd_hash_entry *.
5789 (bfd_set_section_content): Add cast to PTR in comparison.
5790 * simple.c (simple_dummy_warning, simple_dummy_undefined_symbol,
5791 simple_dummy_reloc_overflow, simple_dummy_reloc_dangerous,
5792 simple_dummy_unattached_reloc,
5793 bfd_simple_get_relocated_section_contents): Add K&R declarations and
5794 function definitions.
5795 * srec.c (S3Forced): Initialize to false.
5796 (srec_get_symtab): Cast return value from bfd_alloc to asymbol *.
5797 * stabs.c (_bfd_link_section_stabs): Cast enum to int in comparisons.
5798 (_bfd_discard_section_stabs): Likewise. Also cast return to boolean.
5799 * syms.c (bfd_is_undefined_symclass): Cast return to boolean.
5800 (_bfd_stab_section_find_nearest_line): Cast enum to bfd_byte in
5801 comparisons.
5802
5803 2002-10-23 Jakub Jelinek <jakub@redhat.com>
5804
5805 * elf64-alpha.c (elf64_alpha_check_relocs): Only put maybe_dynamic
5806 relocs into shared lib non-allocated reloc sections.
5807
5808 2002-10-23 Nathan Tallent <eraxxon@alumni.rice.edu>
5809
5810 * dwarf2.c (add_line_info): Ensure that the line_info_table is
5811 sorted even when given an out-of-order line sequence.
5812 (lookup_address_in_line_info_table): When an exact VMA match is
5813 not found, return line information with the closest VMA.
5814
5815 2002-10-23 Ross Alexander <ross.alexander@uk.neceur.com>
5816
5817 * elf64-hppa.c: Force DT_FLAGS to always be set. Required by
5818 HPUX 11.00 patch PHSS_26559.
5819
5820 2002-10-22 Alexandre Oliva <aoliva@redhat.com>
5821
5822 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Don't move
5823 the options section into a separate section unless IRIX 6
5824 compatibility is enabled.
5825
5826 2002-10-22 Alexandre Oliva <aoliva@redhat.com>
5827
5828 * elflink.h (struct elf_link_sort_rela): Turn rel and rela
5829 into arrays.
5830 (elf_link_sort_cmp1, elf_link_sort_cmp2): Adjust.
5831 (elf_link_sort_relocs): Likewise. Take int_rels_per_ext_rel
5832 into account.
5833 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Compose
5834 R_MIPS_REL32 with R_MIPS64 if ABI_64_P.
5835
5836 2002-10-21 Graeme Peterson <gp@qnx.com>
5837
5838 * targets.c (_bfd_target_vector): Add missing qnx vectors.
5839
5840 2002-10-21 Alan Modra <amodra@bigpond.net.au>
5841
5842 * targets.c (bfd_target_list): Don't return the default target twice.
5843
5844 2002-10-21 Elias Athanasopoulos <eathan@otenet.gr>
5845
5846 * archive.c (_bfd_archive_bsd_update_armap_timestamp): Replace
5847 perror with bfd_perror.
5848
5849 2002-10-19 H.J. Lu <hjl@gnu.org>
5850
5851 * elflink.h (elf_link_add_object_symbols): Correctly handle
5852 DT_RPATH and DT_RUNPATH.
5853
5854 2002-10-19 Mark Kettenis <kettenis@gnu.org>
5855
5856 * elf.c (elfcore_grok_note): Fix recognition on NT_PRXFPREG notes.
5857
5858 2002-10-17 Denis Chertykov <denisc@overta.ru>
5859
5860 * elf32-ip2k.c (ELF_MACHINE_ALT1): Define alternate machine code
5861 for ip2k port.
5862
5863 2002-10-17 Alan Modra <amodra@bigpond.net.au>
5864
5865 * elfxx-target.h (USE_REL): Don't define as 1.
5866 * elf32-arm.h (USE_REL): Provide a default define of 0.
5867 Use #if rather than #ifdef when testing USE_REL.
5868 * elf32-m32r.c: Likewise.
5869
5870 * elf32-arc.c (USE_REL): Define as 1.
5871 * elf32-d10v.c (USE_REL): Likewise.
5872 * elf32-m32r.c (USE_REL): Likewise.
5873 * elf32-m68hc11.c (USE_REL): Likewise.
5874 * elf32-m68hc12.c (USE_REL): Likewise.
5875 * elf32-or32.c (USE_REL): Likewise.
5876 * elfarm-nabi.c (USE_REL): Likewise.
5877
5878 2002-10-16 Jakub Jelinek <jakub@redhat.com>
5879
5880 * config.bfd (s390-*-linux*): Add targ64_selvecs.
5881 (s390x-*-linux*): Add targ_selvecs.
5882
5883 2002-10-16 Alan Modra <amodra@bigpond.net.au>
5884
5885 * Makefile.am (BFD32_BACKENDS): Remove elfarmqnx-nabi.lo,
5886 elf32-i386-fbsd.lo, elf32-i386qnx.lo, elf32-ppcqnx.lo,
5887 elf32-sh-lin.lo, elf32-sh64-lin.lo, elf32-sh-nbsd.lo,
5888 elf32-sh64-nbsd.lo, elf32-shqnx.lo. Add elf32-qnx.lo.
5889 (BFD32_BACKENDS_CFILES): Likewise for corresponding C files.
5890 (BFD64_BACKENDS): Remove elf64-sh64-lin.lo, elf64-sh64-nbsd.lo.
5891 (BFD64_BACKENDS_CFILES): Likewise for corresponding C files.
5892 (SOURCE_HFILES): Add elf32-qnx.h.
5893 (BUILD_HFILES): Add bfdver.h.
5894 Run "make dep-am".
5895 * Makefile.in: Regenerate.
5896 * configure.in Update bfd vector dependencies.
5897 * configure: Regenerate.
5898 * elf32-i386-fbsd.c: Delete. Move code to elf32-i386.c.
5899 * elf32-i386qnx.c: Likewise.
5900 * elf32-ppcqnx.c: Delete. Move code to elf32-ppc.c.
5901 * elf32-sh-nbsd.c: Delete. Move code to elf32-sh.c.
5902 * elf32-sh-lin.c: Likewise.
5903 * elf32-shqnx.c: Likewise.
5904 * elf32-sh64-lin.c: Delete. Move code to elf32-sh64.c.
5905 * elf32-sh64-nbsd.c: Likewise.
5906 * elf64-sh64-lin.c: Delete. Move code to elf64-sh64.c.
5907 * elf64-sh64-nbsd.c: Likewise.
5908 * elfarmqnx-nabi.c: Delete. Move code to elfarm-nabi.c.
5909 * elf32-arm.h (ELF_MAXPAGESIZE): Always define.
5910 * elf32-i386.c: Remove ELF_ARCH and ELF32_I386_C_INCLUDED tests.
5911 * elf32-ppc.c: Remove ELF32_PPC_C_INCLUDED tests.
5912 * elf32-qnx.h (elf_backend_set_nonloadable_filepos): Always define.
5913 (elf_backend_is_contained_by_filepos): Likewise.
5914 (elf_backend_copy_private_bfd_data_p): Likewise.
5915 Globalize and move functions to..
5916 * elf32-qnx.c: ..here. New file.
5917 * elf32-sh.c: Remove ELF_ARCH and ELF32_SH_C_INCLUDED tests. Don't
5918 emit target vectors when INCLUDE_SHMEDIA.
5919 * elf32-sh64.c: Remove ELF_ARCH test. Move TARGET_* etc. defines to
5920 end of file.
5921 * elf64-sh64.c: Remove ELF_ARCH test.
5922 * elfarm-nabi.c: Remove ELFARM_NABI_C_INCLUDED test.
5923 * po/BLD-POTFILES.in: Regenerate.
5924 * po/SRC-POTFILES.in: Regenerate.
5925
5926 2002-10-16 Alan Modra <amodra@bigpond.net.au>
5927
5928 * elflink.h (elf_link_add_object_symbols): Error out on dynamic objects
5929 loaded with --just-symbols.
5930
5931 * elf32-i386qnx.c (TARGET_LITTLE_NAME): Define.
5932 * elf32-ppcqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
5933 * elf32-shqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
5934 * elfarmqnx-nabi.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
5935
5936 2002-10-15 Richard Henderson <rth@redhat.com>
5937
5938 * Makefile.am (BFD64_BACKENDS): Remove elf64-alpha-fbsd.
5939 (BFD64_BACKENDS_CFILES): Likewise.
5940 * configure.in (bfd_elf64_alpha_freebsd_vec): Use elf64-alpha.
5941 * elf64-alpha-fbsd.c: Remove file, move code ...
5942 * elf64-alpha.c: ... here.
5943 * Makefile.in, configure: Rebuild.
5944
5945 2002-10-14 Richard Henderson <rth@redhat.com>
5946
5947 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: Increment
5948 VALUE, not ADDEND.
5949
5950 2002-10-14 Stephen Clarke <stephen.clarke@superh.com>
5951
5952 * elf32-sh.c (elf_sh_link_hash_entry): Replace
5953 datalabel_got_offset with union of datalabel_got
5954 offset and refcount.
5955 (sh_elf_link_hash_newfunc): Initialize datalabel_got.refcount.
5956 (allocate_dynrelocs): Delete unnecessary code for
5957 STT_DATALABEL type. Create entry in got for
5958 datalabel version of symbol if datalabel_got.refcount > 0.
5959 (sh_elf_relocate_section): Use datalabel_got union.
5960 (sh_elf_gc_sweep_hook): Pull common code to initialize
5961 h and eh out of switch statement. Declare seen_stt_datalabel.
5962 Initialize it. Decrement datalabel_got.refcount for
5963 got relocs when seen_stt_datalabel is true.
5964 Decrement local_got_refcounts entry for datalabel got relocs
5965 of local symbols.
5966 (sh_elf_copy_indirect_symbol): Copy datalabel_got field over.
5967 (sh_elf_check_relocs): Declare seen_stt_datalabel.
5968 Initialize it. When seen_stt_datalabel is true, increment
5969 datalabel_got refcount rather than got.refcount.
5970 (sh_elf_finish_dynamic_symbol): Create relocs to
5971 initialize got entry for datalabel version of symbol.
5972
5973 2002-10-14 Alan Modra <amodra@bigpond.net.au>
5974
5975 * Makefile.am: Run "make dep-am".
5976 (BFD_H_FILES): Remove version.h.
5977 * bfd-in.h (BFD_VERSION, BFD_VERSION_DATE, BFD_VERSION_STRING): Move..
5978 * version.h: ..to here.
5979 * configure.in (bfd_version_date): Remove.
5980 (AC_OUTPUT): Make bfdver.h from version.h.
5981 * bfd.c: #include "bfdver.h".
5982 * vms-hdr.c: Likewise.
5983 * Makefile.in: Regenerate.
5984 * bfd-in2.h: Regenerate.
5985 * configure: Regenerate.
5986 * po/SRC-POTFILES.in: Regenerate.
5987
5988 2002-10-14 Alan Modra <amodra@bigpond.net.au>
5989
5990 * archures.c (bfd_mach_i386_i386, bfd_mach_i386_i8086,
5991 bfd_mach_i386_i386_intel_syntax, bfd_mach_x86_64,
5992 bfd_mach_x86_64_intel_syntax bfd_mach_ppc, bfd_mach_ppc64,
5993 bfd_mach_rs6k, bfd_mach_d10v, bfd_mach_sh, bfd_mach_v850,
5994 bfd_mach_arc_5, bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8,
5995 bfd_mach_m32r, bfd_mach_frv, bfd_mach_frvsimple,
5996 bfd_mach_ia64_elf64, bfd_mach_ia64_elf32,
5997 bfd_mach_ip2022, bfd_mach_ip2022ext,
5998 bfd_mach_s390_31, bfd_mach_s390_64, bfd_mach_xstormy16): Renumber.
5999 * bfd-in2.h: Regenerate.
6000
6001 2002-10-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6002
6003 * config.bfd (sh*eb-*-linux*, sh*-*-linux*): Add the alternative
6004 endian vector to targ_selvecs.
6005
6006 2002-10-13 Alexandre Oliva <aoliva@redhat.com>
6007
6008 * elfxx-mips.c (mips_elf_calculate_relocation): Take
6009 save_addend argument. Don't apply the 32-bit mask to a
6010 GPREL32 value if it's to be used in another relocation. Don't
6011 use forced-check computation of local_p to decide whether to
6012 add gp0 to GPREL16 value. Don't use only the lowest 16 bits
6013 of the addend of a non-in-place GPREL16 relocation.
6014 (_bfd_mips_elf_relocate_section): Pass use_saved_addend_p to
6015 mips_elf_calculate_relocation().
6016
6017 2002-10-12 Stephane Carrez <stcarrez@nerim.fr>
6018
6019 * elf32-m68hc11.c (m68hc11_elf_relax_section): Don't treat relocs
6020 with symbols in other sections if we relaxed something; the sections
6021 output offsets must be re-computed before.
6022
6023 2002-10-12 Stephane Carrez <stcarrez@nerim.fr>
6024
6025 * elf32-m68hc11.c (m68hc11_elf_relax_section): Update symbols
6026 handling to use Elf_Internal_Sym.
6027 (m68hc11_elf_relax_delete_bytes): Likewise.
6028
6029 2002-10-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6030
6031 * elf32-sh.c (sh_elf_optimized_tls_reloc, sh_elf_mkobject,
6032 sh_elf_object_p, dtpoff_base): New functions.
6033 (sh_elf_howto_table): Add TLS relocs.
6034 (sh_reloc_map): Likewise.
6035 (sh_elf_info_to_howto): Support TLS relocs.
6036 (elf_sh_link_hash_entry): Add tls_type and tls_tpoff32.
6037 (sh_elf_hash_entry, sh_elf_tdata, sh_elf_local_got_tls_type):
6038 New macros.
6039 (sh_elf_obj_tdata): New.
6040 (elf_sh_link_hash_table): Add tls_ldm_got.
6041 (sh_elf_link_hash_table_create): Clear refcount of tls_ldm_got.
6042 (allocate_dynrelocs): Support TLS relocs.
6043 (sh_elf_size_dynamic_sections): Likewise.
6044 (sh_elf_relocate_section): Support TLS relocs. Don't try to find
6045 .rela.got section when found already. Return false after printing
6046 error about unresolvable relocation.
6047 (sh_elf_gc_sweep_hook): Support TLS relocs.
6048 (sh_elf_check_relocs): Likewise.
6049 (sh_elf_finish_dynamic_symbol): Likewise.
6050 (bfd_elf32_mkobject, elf_backend_object_p): Define for TLS case.
6051 * reloc.c: Add SH TLS relocs.
6052 * bfd-in2.h, libbfd.h: Regenerate.
6053
6054 2002-10-11 Daniel Jacobowitz <drow@mvista.com>
6055
6056 * Makefile.in: Regenerated.
6057
6058 2002-10-11 Daniel Jacobowitz <drow@mvista.com>
6059
6060 * Makefile.am: Run dep-am.
6061 (BFD_H_DEP): Add simple.c and linker.c.
6062 (BFD32_LIBS): Add simple.lo.
6063 (BFD32_LIBS_CFILES): Add simple.c.
6064 * Makefile.in: Regenerated.
6065 * bfd-in2.h: Regenerated.
6066 * simple.c: New file.
6067
6068 2002-10-11 Alan Modra <amodra@bigpond.net.au>
6069
6070 * coff-arm.c (record_arm_to_thumb_glue): Avoid type-punned pointers.
6071 (record_thumb_to_arm_glue): Likewise.
6072 * ecoff.c (ecoff_link_add_externals): Likewise.
6073 * elf32-arm.h (record_arm_to_thumb_glue): Likewise.
6074 (record_thumb_to_arm_glue): Likewise.
6075 * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
6076 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
6077 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
6078 * elf64-alpha.c (elf64_alpha_create_dynamic_sections): Likewise.
6079 * elf64-ppc.c (func_desc_adjust): Likewise.
6080 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
6081 (sh64_elf64_create_dynamic_sections): Likewise.
6082 * elflink.c (_bfd_elf_create_got_section): Likewise.
6083 (_bfd_elf_create_dynamic_sections): Likewise.
6084 (_bfd_elf_create_linker_section): Likewise.
6085 * elflink.h (elf_add_default_symbol): Likewise.
6086 (elf_link_create_dynamic_sections): Likewise.
6087 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
6088 * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Likewise.
6089 * elfxx-mips.c (mips_elf_create_got_section): Likewise.
6090 (_bfd_mips_elf_add_symbol_hook): Likewise.
6091 (_bfd_mips_elf_create_dynamic_sections): Likewise.
6092 * linker.c (generic_link_add_symbol_list): Likewise.
6093 * xcofflink.c (xcoff_link_add_symbols): Likewise.
6094
6095 * elfxx-ia64.c (oor_brl, oor_ip): Conditionally define.
6096
6097 * elf64-ppc.c (edit_opd): Only zero opd syms when function is
6098 completely removed. Correct local sym adjustment.
6099
6100 2002-10-10 Stephen Clarke <stephen.clarke@superh.com>
6101
6102 * elf32-sh.c (elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
6103 Correct mistake in calculation of address of .got.
6104 * elf64-sh64.c (elf_sh64_pic_plt_entry_be,
6105 elf_sh64_pic_plt_entry_le): Likewise.
6106
6107 2002-10-09 Richard Shann <richard.shann@superh.com>
6108 Stephen Clarke <stephen.clarke@superh.com>
6109
6110 * Makefile.am: Add entries for elf32-sh64-lin.c and
6111 elf64-sh64-lin.c. Regenerate.
6112 * Makefile.in: Regenerate.
6113 * config.bfd: Change sh64eb-*-linux* and sh64-*-linux*
6114 to use sh64 vectors rather than sh vectors.
6115 * configure.in: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
6116 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
6117 * configure: Regenerate.
6118 * elf32-sh64-lin.c: New file.
6119 * elf64-sh64-lin.c: New file.
6120 * targets.c: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
6121 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
6122
6123 2002-10-08 H.J. Lu <hjl@gnu.org>
6124
6125 * elf32-i386.c (elf_i386_relocate_section): Re-arrange the
6126 IE->LE transition for R_386_TLS_IE.
6127
6128 2002-10-08 Alan Modra <amodra@bigpond.net.au>
6129
6130 * elf64-ppc.c (edit_opd): Correct test for discarded sections.
6131
6132 2002-10-07 Mark Elbrecht <snowball3@softhome.net>
6133
6134 * cofflink.c (mark_relocs): Don't mark relocations in excluded
6135 sections.
6136
6137 2002-10-07 Alan Modra <amodra@bigpond.net.au>
6138
6139 * elflink.h (elf_link_input_bfd): Remove BFD_VERSION_DATE dependent
6140 code.
6141
6142 * elf64-ppc.c (ppc64_elf_build_stubs): Increment .glink indx.
6143
6144 2002-10-06 Alan Modra <amodra@bigpond.net.au>
6145
6146 * opncls.c: Formatting.
6147 (_bfd_new_bfd): Use a smaller section hash table.
6148
6149 2002-10-05 Alexandre Oliva <aoliva@redhat.com>
6150
6151 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Set the type
6152 of the other two relocations packed with a REL32 to NONE.
6153
6154 2002-10-02 Stephen Clarke <stephen.clarke@superh.com>
6155
6156 * elf32-sh.c (elf_sh_link_hash_entry): Add gotplt_refcount.
6157 (sh_elf_link_hash_newfunc): Initialize it.
6158 (allocate_dynrelocs): Transfer gotplt refs from plt.refcount
6159 to got.refcount for symbols that are forced local or when
6160 we have direct got refs.
6161 (sh_elf_gc_sweep_hook): Adjust gotplt_refcount. Use it
6162 to correctly adjust got.refcount and plt.refcount.
6163 (sh_elf_copy_indirect_symbol): Copy gotplt_refcount across.
6164 (sh_elf_check_relocs): Increment gotplt_refcount.
6165
6166 2002-10-01 Jakub Jelinek <jakub@redhat.com>
6167
6168 * elf32-i386.c (elf_i386_relocate_section): Fix
6169 movl foo@indntpoff, %eax IE->LE transition.
6170
6171 2002-10-01 Jakub Jelinek <jakub@redhat.com>
6172
6173 * elf64-x86-64.c (elf64_x86_64_relocate_section): Change TLSGD
6174 sequence and its transitions.
6175
6176 2002-10-01 Jakub Jelinek <jakub@redhat.com>
6177
6178 * elf32-i386.c (elf_i386_relocate_section): Resolve R_386_TLS_LDO_32
6179 to st_value + addend in non-code sections.
6180 * elf64-x86-64.c (elf64_x86_64_relocate_section): Resolve
6181 R_X86_64_DTPOFF32 to st_value + addend in non-code sections.
6182
6183 2002-09-30 Gavin Romig-Koch <gavin@redhat.com>
6184 Ken Raeburn <raeburn@cygnus.com>
6185 Aldy Hernandez <aldyh@redhat.com>
6186 Eric Christopher <echristo@redhat.com>
6187 Richard Sandiford <rsandifo@redhat.com>
6188
6189 * archures.c (bfd_mach_mips4120, bfd_mach_mips5400): New.
6190 (bfd_mach_mips5500): New.
6191 * cpu-mips.c (I_mips4120, I_mips5400, I_mips5500): New.
6192 (arch_info_struct): Add corresponding entries here.
6193 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_4120,
6194 E_MIPS_MACH_5400 and E_MIPS_MACH_5500.
6195 (_bfd_mips_elf_final_write_processing): Handle bfd_mach_mips4120,
6196 bfd_mach_mips5400 and bfd_mach_mips5500.
6197 (_bfd_mips_elf_mach_extends_p): New function.
6198 (_bfd_mips_elf_merge_private_bfd_data): Use it to help merge
6199 the EF_MIPS_MACH flags.
6200 * bfd-in2.h: Regenerate.
6201
6202 2002-09-28 Jason Thorpe <thorpej@wasabisystems.com>
6203
6204 * elf32-vax.c (elf_vax_size_dynamic_section): Don't strip
6205 .got sections.
6206
6207 2002-09-28 Alan Modra <amodra@bigpond.net.au>
6208
6209 * elf.c (map_sections_to_segments): Correct test for start of
6210 writable section in the same page as end of read-only section.
6211
6212 2002-09-27 Matt Thomas <matt@3am-software.com>
6213
6214 * elf32-vax.c (elf_vax_check_relocs): Remove unused
6215 local_got_refcounts usage. Remove allocation of got slot.
6216 (elf_vax_gc_sweep_hook): Remove unused local_got_refcounts usage.
6217 Remove de-allocation of got slot.
6218 (elf_vax_size_dynamic_section): Fix some indentation. Add hash
6219 traversal for elf_vax_instantiate_got_entries. Allow empty .got
6220 sections to be GC'ed.
6221 (elf_vax_instantiate_got_entries): New function.
6222 (elf_vax_relocate_section): Simplify R_VAX_GOT32 handling. Remove
6223 tests that are now handled by elf_vax_instantiate_got_entries.
6224 Assert GOT entry falls within .got section size. Remove redundant
6225 comparisions. Fix comments.
6226
6227 2002-09-27 Jakub Jelinek <jakub@redhat.com>
6228
6229 * reloc.c: Add x86-64 TLS relocs.
6230 * bfd-in2.h, libbfd.h: Rebuilt.
6231 * elf64-x86-64.c (x86_64_elf_howto): Fix size fields for 32-bit
6232 relocs. Add TLS relocs.
6233 (x86_64_reloc_map): Add TLS relocs.
6234 (elf64_x86_64_info_to_howto): Adjust for added TLS relocs.
6235 (struct elf64_x86_64_link_hash_entry): Add tls_type field.
6236 (GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD, GOT_TLS_IE): Define.
6237 (elf64_x86_64_hash_entry): Define.
6238 (struct elf64_x86_64_obj_tdata): New.
6239 (elf64_x86_64_tdata, elf64_x86_64_local_got_tls_type): Define.
6240 (struct elf64_x86_64_link_hash_table): Add tls_ld_got.
6241 (link_hash_newfunc): Initialize tls_type.
6242 (elf64_x86_64_link_hash_table_create): Initialize tls_ld_got.
6243 (elf64_x86_64_copy_indirect_symbol): Swap tls_type if necessary.
6244 (elf64_x86_64_mkobject): New.
6245 (elf64_x86_64_elf_object_p): Allocate struct elf64_x86_64_obj_tdata.
6246 (elf64_x86_64_tls_transition): New.
6247 (elf64_x86_64_check_relocs): Add r_type variable and use it.
6248 Handle TLS relocs.
6249 (elf64_x86_64_gc_sweep_hook): Handle TLS relocs.
6250 (allocate_dynrelocs): Allocate GOT space for TLS relocs.
6251 (elf64_x86_64_size_dynamic_sections): Likewise.
6252 (dtpoff_base, tpoff): New.
6253 (elf64_x86_64_relocate_section): Handle TLS relocs.
6254 (elf64_x86_64_finish_dynamic_symbol): Only handle non-TLS GOT
6255 entries.
6256 (bfd_elf64_mkobject): Define.
6257
6258 * elf32-i386.c (elf_i386_check_relocs) [R_386_TLS_LE]: Set
6259 DF_STATIC_TLS if shared.
6260
6261 2002-09-26 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6262
6263 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Don't emit unneeded
6264 empty relocation sections.
6265
6266 2002-09-26 Alan Modra <amodra@bigpond.net.au>
6267
6268 * elf64-ppc.c (ppc_build_one_stub): Don't build glink stubs here.
6269 (ppc64_elf_build_stubs): Build them here instead.
6270
6271 2002-09-24 Jakub Jelinek <jakub@redhat.com>
6272
6273 * elf32-sparc.c (elf32_sparc_relocate_section): Put R_SPARC_RELATIVE
6274 addend into r_addend, not *r_offset.
6275 (elf32_sparc_finish_dynamic_symbol): Likewise.
6276 * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Clear xword at
6277 R_SPARC_RELATIVE's r_offset.
6278
6279 2002-09-23 Nathan Tallent <eraxxon@alumni.rice.edu>
6280
6281 * dwarf2.c (decode_line_info): Update to correctly decode
6282 the (non-standard DWARF2) out-of-order address sequences
6283 generated by the Intel C++ 6.0 compiler for ia64-Linux.
6284
6285 2002-09-23 Mark Elbrecht <snowball3@softhome.net>
6286
6287 * config.bfd: For DJGPP targets, match with any cpu and any machine.
6288
6289 2002-09-23 Alan Modra <amodra@bigpond.net.au>
6290
6291 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Zero relocs
6292 for discarded FDEs. Remove redundant assignment.
6293 * elflink.h (elf_bfd_discard_info): Save edited relocs.
6294
6295 2002-09-22 H.J. Lu <hjl@gnu.org>
6296
6297 * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Don't merge
6298 the relocation count between different .reloc sections.
6299
6300 2002-09-21 Alan Modra <amodra@bigpond.net.au>
6301
6302 * elf32-ppc.c (ppc_elf_relocate_section): Allow ".sbss.*" and
6303 ".sdata.*" for R_PPC_SDAREL16, ".sbss2*" and ".sdata2*" for
6304 R_PPC_EMB_SDA2REL. Similarly for R_PPC_EMB_SDA21 and
6305 R_PPC_EMB_RELSDA.
6306
6307 * elfcode.h (elf_slurp_reloc_table_from_section): Make "symcount"
6308 unsigned. Move "symcount" assignment out of loop.
6309 * Makefile.am: Run "make dep-am".
6310 * Makefile.in: Regenerate.
6311 * configure: Regenerate.
6312 * po/SRC-POTFILES.in: Regnerate.
6313
6314 2002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
6315
6316 * dwarf2.c (_bfd_dwarf2_find_nearest_line): If address length is
6317 zero, set it to 8 for (non-standard) 64-bit DWARF2 formats
6318 (e.g. IRIX64).
6319
6320 2002-09-19 Jakub Jelinek <jakub@redhat.com>
6321
6322 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Clear .got word
6323 even if generating R_PPC_RELATIVE reloc.
6324 (ppc_elf_relocate_section): Make sure relocation is performed
6325 if skip == -2. Clear memory at r_offset when creating dynamic
6326 relocation.
6327
6328 2002-09-19 Jakub Jelinek <jakub@redhat.com>
6329
6330 * reloc.c (BFD_RELOC_386_TLS_TPOFF, BFD_RELOC_386_TLS_IE,
6331 BFD_RELOC_386_TLS_GOTIE): Add.
6332 * bfd-in2.h, libbfd.h: Rebuilt.
6333 * elf32-i386.c (elf_howto_table): Add R_386_TLS_TPOFF, R_386_TLS_IE
6334 and R_386_TLS_GOTIE.
6335 (elf_i386_reloc_type_lookup): Handle it.
6336 (struct elf_i386_link_hash_entry): Change tls_type type to unsigned
6337 char instead of enum, change GOT_* into defines.
6338 (GOT_TLS_IE_POS, GOT_TLS_IE_NEG, GOT_TLS_IE_BOTH): Define.
6339 (elf_i386_tls_transition): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
6340 (elf_i386_check_relocs): Likewise. Avoid crash if local symbol is
6341 accessed both as normal and TLS symbol. Move R_386_TLS_LDM and
6342 R_386_PLT32 cases so that R_386_TLS_IE can fall through.
6343 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
6344 (elf_i386_gc_sweep_hook): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
6345 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
6346 (allocate_dynrelocs): Allocate 2 .got and 2 .rel.got entries if
6347 tls_type is GOT_TLS_IE_BOTH.
6348 (elf_i386_size_dynamic_sections): Likewise.
6349 (elf_i386_relocate_section): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
6350 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
6351 (elf_i386_finish_dynamic_symbol): Use tls_type & GOT_TLS_IE to catch
6352 all 4 GOT_TLS_* TLS types.
6353
6354 2002-09-19 Nick Clifton <nickc@redhat.com>
6355
6356 * elflink.h (elf_fix_symbol_flags): When examining weak symbols,
6357 follow indirect links.
6358
6359 2002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
6360
6361 * ecoffswap.h (ecoff_swap_pdr_in) <isym, iline>: Update to
6362 correctly sign-extend 32-bit ECOFF null values (0xffffffff, -1)
6363 on 64 bit machines.
6364 (ecoff_swap_sym_in) <iss>: Likewise.
6365 * ecoff.c (_bfd_ecoff_slurp_symbolic_info): Fix error reading
6366 ECOFF information: 'ioptMax' refers to the actual *size*
6367 of the optimization symtab, not the number of entries.
6368
6369 2002-09-19 Daniel Jacobowitz <drow@mvista.com>
6370
6371 * elf32-arm.h (elf32_arm_adjust_dynamic_symbol): Update
6372 ELF_LINK_HASH_NEEDS_PLT logic.
6373
6374 2002-09-18 Daniel Jacobowitz <drow@mvista.com>
6375
6376 * elfcode.h (elf_slurp_reloc_table_from_section): Check
6377 correct relocation count.
6378
6379 2002-09-17 Daniel Jacobowitz <drow@mvista.com>
6380
6381 * bfd-in.h (bfd_get_dynamic_symcount): Define.
6382 * bfd.c (struct _bfd): Add dynsymcount.
6383 * bfd-in2.h: Regenerated.
6384 * elf.c (_bfd_elf_canonicalize_dynamic_symtab): Set
6385 abfd->dynsymcount.
6386 * elfcode.h (elf_slurp_reloc_table_from_section): Check
6387 for overflow.
6388
6389 2002-09-17 Stan Cox <scox@redhat.com>
6390
6391 * elf64-mips.c (mips_elf64_be_swap_reloca_out): Handle type2 and type3.
6392 (mips_elf64_final_gp): Don't make up gp value.
6393 * elfn32-mips.c (mips_elf_final_gp): Likewise.
6394 * elfxx-mips.c (_bfd_mips_elf_final_link): Always create
6395 .MIPS.options/.options section.
6396
6397 2002-09-17 David O'Brien <obrien@FreeBSD.org>
6398
6399 * elf32-i386-fbsd.c: Always label using the EI_OSABI method.
6400 It is benign for FreeBSD < 4.1. Minor reformatting.
6401 * elf64-alpha-fbsd.c: Likewise.
6402
6403 2002-09-17 Jakub Jelinek <jakub@redhat.com>
6404
6405 * elf32-i386.c (elf_i386_relocate_section) [R_386_TLS_TPOFF32]: Negate
6406 addend.
6407
6408 2002-09-17 Alan Modra <amodra@bigpond.net.au>
6409
6410 * elf64-alpha.c (alpha_elf_size_info): Make static.
6411
6412 2002-09-17 Svein E. Seldal <Svein.Seldal@solidas.com>
6413
6414 * coff-tic4x.c: Add function declarations and ATTRIBUTE_UNUSED.
6415 * cpu-tic4x.c: Ditto.
6416
6417 2002-09-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6418
6419 * elf64-mips.c (define elf_backend_ignore_discarded_relocs): Remove
6420 duplicate define.
6421
6422 2002-09-16 Bruno Haible <bruno@clisp.org>
6423
6424 * elf32-i386.c: Don't defined ELF_ARCH etc. if this file is included
6425 by a target variant implementation.
6426 * elf64-alpha.c: Likewise.
6427 * elf32-i386-fbsd.c: New file.
6428 * elf64-alpha-fbsd.c: New file.
6429 * targets.c: Support bfd_elf32_i386_freebsd_vec and
6430 bfd_elf64_alpha_freebsd_vec.
6431 * configure.in: Accept the vectors bfd_elf32_i386_freebsd_vec,
6432 bfd_elf64_alpha_freebsd_vec.
6433 * Makefile.am (BFD32_BACKENDS): Add elf32-i386-fbsd.lo.
6434 (BFD32_BACKENDS_CFILES): Add elf32-i386-fbsd.c.
6435 (BFD64_BACKENDS): Add elf64-alpha-fbsd.lo.
6436 (BFD64_BACKENDS_CFILES): Add elf64-alpha-fbsd.c.
6437 (elf32-i386-fbsd.lo, elf64-alpha-fbsd.lo): Add dependencies.
6438 * config.bfd: For FreeBSD targets, set targ_defvec to a FreeBSD
6439 specific targets. Define OLD_FREEBSD_ABI_LABEL if appropriate.
6440
6441 2002-09-12 Jakub Jelinek <jakub@redhat.com>
6442
6443 * elf32-i386.c (dtpoff_base, tpoff): Don't crash if tls_segment is
6444 NULL.
6445 (elf_i386_relocate_section): Return false after printing error about
6446 unresolvable relocation.
6447
6448 2002-09-12 Nick Clifton <nickc@redhat.com>
6449
6450 * elf32-arm.h (elf32_arm_final_link_relocate): Fix handling of
6451 R_ARM_THM_PC11.
6452
6453 2002-09-11 Jeffrey Law <law@redhat.com>
6454
6455 * elf32-h8300.c (elf32_h8_relax_section): Fix typo.
6456
6457 2002-09-11 Andrew Haley <aph@cambridge.redhat.com>
6458
6459 * elf.c (_bfd_elf_find_nearest_line): Check functionname_ptr and
6460 line_ptr before deciding we've found a symbol.
6461
6462 2002-09-11 Nick Clifton <nickc@redhat.com>
6463
6464 * po/da.po: New Danish translation file.
6465 * configure.in (LINGUAS): Add 'da'.
6466 * configure: Regenerate.
6467
6468 2002-09-10 Michael Snyder <msnyder@redhat.com>
6469
6470 * irix-core.c (do_sections, do_sections64): New functions.
6471 (irix_core_core_file_p): Call new functions do_sections,
6472 do_sections64, depending on corefile (32-bit or 64-bit).
6473
6474 2002-09-09 Richard Henderson <rth@redhat.com>
6475
6476 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21M
6477 and PCREL21F like PCREL21B.
6478
6479 2002-09-04 Kevin Buettner <kevinb@redhat.com>
6480
6481 * config.bfd (mips*-*-irix6*): Add new ABI vectors. Make n32 default
6482 vector.
6483
6484 2002-09-02 Nick Clifton <nickc@redhat.com>
6485
6486 * elf32-v850.c (v850_elf_final_link_relocate): Use helpful
6487 names instead of cryptically overloaded bfd_reloc error
6488 codes.
6489 (v850_elf_relocate_section): Likewise.
6490 (v850_elf_relax_section): Replace caching of external symbols
6491 with caching of internal symbols obtained from calling
6492 bfd_elf_get_elf_syms().
6493 Fixup problems with freeing cached allocated memory blocks.
6494
6495 2002-09-02 Alan Modra <amodra@bigpond.net.au>
6496
6497 * cpu-pj.c (scan_mach, compatible, arch_info_struct): Remove.
6498 (bfd_pj_arch): Use bfd_default_scan.
6499 * cpu-v850.c (scan): Remove.
6500 (N): Use bfd_default_scan.
6501 * cpu-z8k.c (scan_mach): Remove.
6502 (arch_info_struct, bfd_z8k_arch): Reorganize so that the default is
6503 first. Use bfd_default_scan.
6504
6505 * ecoff.c (_bfd_ecoff_set_arch_mach_hook): Don't use hard-coded
6506 bfd_mach constants.
6507 (ecoff_get_magic): Likewise.
6508 * elf32-v850.c (v850_elf_object_p): Likewise.
6509 (v850_elf_final_write_processing): Likewise.
6510 * mipsbsd.c (MY(set_arch_mach)): Likewise.
6511 (MY(write_object_contents)): Likewise.
6512 * coff64-rs6000.c (xcoff64_write_object_contents): Likewise.
6513 * coffcode.h (coff_write_object_contents): Likewise.
6514 (coff_set_arch_mach_hook): Add comment describing machine == 0.
6515 Remove unnecessary "machine" assignments.
6516 (coff_write_relocs): Test for the absolute section sym by testing
6517 section and flags.
6518
6519 * aoutx.h (NAME(aout,machine_type)): Recognize bfd_mach_i386_i386
6520 and bfd_mach_i386_i386_intel_syntax.
6521 * pdp11.c (NAME(aout,machine_type)): Likewise.
6522
6523 2002-08-30 John David Anglin <dave@hiauly1.hia.nrc.ca>
6524
6525 * bfd-in.h (align_power): Cast constants to bfd_vma type.
6526 * bfd-in2.h (align_power): Likewise.
6527
6528 2002-08-30 Alan Modra <amodra@bigpond.net.au>
6529
6530 * Makefile.am: Run "make dep-am".
6531 * Makefile.in: Regenerate.
6532
6533 * cpu-avr.c (compatible): Don't use hard-coded mach constants.
6534 * cpu-powerpc.c (powerpc_compatible): Likewise.
6535 * cpu-rs6000.c (rs6000_compatible): Likewise.
6536
6537 2002-08-28 Catherine Moore <clm@redhat.com>
6538
6539 * elf32-v850.c (v850_elf_reloc_map): Add new relocs.
6540 (v850-elf-reloc): Don't resolve pc relative relocs.
6541 (v850_elf_ignore_reloc): New routine.
6542 (v850_elf_final_link_relocate): Handle new relocs.
6543 (v850_elf_relax_delete_bytes ): New routine.
6544 (v850_elf_relax_section): New routine.
6545 (bfd_elf32_bfd_relax_section): Define.
6546 (HOWTO): New entries for new relocs.
6547 * reloc.c (BFD_RELOC_V850_LONGCALL): New reloc.
6548 (BFD_RELOC_V850_LONGJUMP): New reloc.
6549 (BFD_RELOC_V850_ALIGN): New reloc.
6550 * archures.c: Remove redundant v850ea architecture.
6551 * cpu-v850.c: Remove redundant v850ea support.
6552 * libbfd.h: Regenerate.
6553 * bfd-in2.h: Regenerated.
6554
6555 2002-08-28 Svein E. Seldal <Svein.Seldal@solidas.com>
6556
6557 * config.bfd: Add tic4x-*-*coff* and c4x-*-*coff* target.
6558 * configure.in: Add tic4x_coff vector files.
6559 * configure: Regenerate.
6560 * Makefile.am: Add tic4x target.
6561 * Makefile.in: Regenerate.
6562
6563 2002-08-27 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
6564
6565 * archures.c: Add the BFD arch type tic4x.
6566 * bfd-in.h: Add BFD_IN_MEMORY flag.
6567 * coff-tic4x.c: New file.
6568 * coffswap.h (coff_swap_sym_out): Add preadjuster.
6569 * cpu-tic4x.c: New file.
6570 * targets.c: Added tic4x- in list of xvecs.
6571 * ticoff.h: New file.
6572 * bfd-in2.h: Regenerate.
6573
6574 2002-08-27 Adam Nemet <anemet@lnxw.com>
6575
6576 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Set the last
6577 bit of DT_INIT and DT_FINI for Thumb functions.
6578
6579 2002-08-26 Alan Modra <amodra@bigpond.net.au>
6580
6581 * coffcode.h (coff_set_arch_mach_hook): Handle W65MAGIC.
6582
6583 2002-08-26 Alan Modra <amodra@bigpond.net.au>
6584
6585 * aoutx.h (NAME(aout,reloc_type_lookup)): Handle BFD_RELOC_8.
6586
6587 2002-08-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6588
6589 * elf32-sh.c (sh_elf_copy_indirect_symbol): New.
6590 (create_got_section, allocate_dynrelocs, readonly_dynrelocs):
6591 Likewise.
6592 (struct elf_sh_pcrel_relocs_copied): Removed.
6593 (struct elf_sh_dyn_relocs): New.
6594 (struct elf_sh_link_hash_entry): Replace pcrel_relocs_copied
6595 field with dyn_relocs.
6596 (struct elf_sh_link_hash_table): Add short-cuts to get dynamic
6597 sections and sym_sec.
6598 (sh_elf_link_hash_newfunc): Clear dyn_relocs.
6599 (sh_elf_link_hash_table_create): Clear shorts-cuts and sym_sec.
6600 (sh_elf_create_dynamic_sections): Use create_got_section instead
6601 of _bfd_elf_create_got_section.
6602 (sh_elf_check_relocs): Likewise.
6603 (sh_elf_create_dynamic_sections): Use short-cuts to the dynamic
6604 sections.
6605 (sh_elf_adjust_dynamic_symbol, sh_elf_size_dynamic_sections,
6606 sh_elf_relocate_section, sh_elf_check_relocs,
6607 sh_elf_finish_dynamic_symbol, sh_elf_finish_dynamic_sections):
6608 Likewise.
6609 (sh_elf_adjust_dynamic_symbol): Handle nocopyreloc. Keep the
6610 dynamic relocations and avoiding the copy relocation when we
6611 didn't find any dynamic relocations in the section which has
6612 contents or is read-only.
6613 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
6614 (sh_elf_size_dynamic_sections): Don't reset the size of
6615 .rela.got section even if dynamic_sections_created flag is off.
6616 Don't use sh_elf_discard_copies. Scan all input bfd and use
6617 allocate_dynrelocs. Call readonly_dynrelocs to determine
6618 whether we need DT_TEXTREL.
6619 (sh_elf_adjust_dynamic_symbol): Use plt.refcount to determine
6620 whether the symbol was never referred to.
6621 (sh_elf_relocate_section): Use WILL_CALL_FINISH_DYNAMIC_SYMBOL.
6622 (sh_elf_gc_sweep_hook): Fill with the real sweep function.
6623 (sh_elf_check_relocs): Call create_got_section if the short-cut
6624 to .got is null. Increment reference counters only instead of
6625 allocating space on dynamic sections here. Don't conditionalize
6626 uninitialized got.offset value when marking the symbol as a
6627 global offset table entry. Keep relocations for symbols satisfied
6628 by a dynamic library to avoid copy relocations for the symbol.
6629 Set dynobj field of an elf hash table if needed.
6630 (sh_elf_finish_dynamic_sections): Handle null section pointer
6631 correctly.
6632 (elf_backend_copy_indirect_symbol): Defined.
6633 (elf_backend_can_refcount): Defined.
6634
6635 2002-08-23 Nick Clifton <nickc@redhat.com>
6636
6637 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Undo
6638 previous change. Add comment explaining why.
6639
6640 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>
6641
6642 * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le): Copy
6643 contents of .got.plt[2] to tr0, not address of .got.plt.
6644 (sh_elf_finish_dynamic_symbol): Do not apply GOT_BIAS when
6645 patching absolute plt entry. For shmedia plt entry, set bottom bit
6646 of branch to plt0 as this is a branch to an shmedia instruction.
6647 * elf64-sh64.c (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le):
6648 Copy contents of .got.plt[2] to tr0, not address of .got.plt.
6649 (elf_sh64_plt_entry_be, elf_sh64_plt_entry_le): Use ptrel to
6650 branch to plt0.
6651 (sh64_elf64_finish_dynamic_symbol): Do not apply GOT_BIAS when
6652 patching absolute plt entry. For shmedia plt entry, branch to
6653 plt0 is now ptrel, so use relative offset. Set bottom bit of
6654 branch target as it is a branch to an shmedia instruction.
6655
6656 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>,
6657 Richard Shann <richard.shann@superh.com>
6658
6659 * elf32-sh.c (sh_elf_finish_dynamic_sections): Set LSB of DT_INIT
6660 value if .init is an SHmedia function. Similarly for DT_FINI.
6661 * elf64-sh64.c (sh64_elf64_finish_dynamic_sections): Likewise.
6662
6663 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>
6664
6665 * elf32-sh.c (sh_elf_size_dynamic_sections): Zero initialize
6666 dynamic section.
6667 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
6668
6669 2002-08-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6670
6671 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use a simple
6672 byte read when reading the return address register column.
6673
6674 2002-08-22 Nick Clifton <nickc@redhat.com>
6675
6676 * config.bfd: Add powepc64-*-*bsd* target.
6677
6678 2002-08-22 Graeme Peterson <gp@qnx.com>
6679
6680 * Makefile.am: Add entries for elf32-shqnx.c
6681 * Makefile.in: Regenerate.
6682 * config.bfd: Add support sh-*-nto* target.
6683 * configure.in: Add support for bfd_elf32_sh{l}qnx_vec.
6684 * configure: Regenerate.
6685 * elf32-qnx.h: Changed typo "elf_i386qnx_*" to "elf_qnx_*" .
6686 * elf32-sh.c: Do not include elf32-target.h if
6687 ELF32_SH_C_INCLUDED is defined.
6688 * elf32-shqnx.c: New file: Support for QNX.
6689 * targets.c: Add bfd_elf32_sh{l}qnx_vec.
6690
6691 2002-08-22 Nick Clifton <nickc@redhat.com>
6692
6693 * po/tr.po: Updated Turkish translation.
6694
6695 * syms.c (_bfd_generic_read_minisymbols): Set bfd_error if the
6696 symbols are not read.
6697
6698 2002-08-22 Alan Modra <amodra@bigpond.net.au>
6699
6700 * elf32-m68hc11.c: Formatting fixes.
6701 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
6702 * elf32-m68hc12.c: Formatting fixes.
6703 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
6704
6705 2002-08-22 Alan Modra <amodra@bigpond.net.au>
6706
6707 * coff-rs6000.c (rs6000coff_vec <object_flags>): Add SEC_CODE and
6708 SEC_DATA.
6709 (pmac_xcoff_vec): Likewise.
6710 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
6711 (aix5coff64_vec): Likewise.
6712
6713 2002-08-22 Alan Modra <amodra@bigpond.net.au>
6714
6715 * elf-bfd.h (struct elf_backend_data): Add struct elf_backend_data
6716 param to elf_backend_copy_indirect_symbol.
6717 (_bfd_elf_link_hash_copy_indirect): Likewise.
6718 * elflink.h (elf_add_default_symbol, elf_fix_symbol_flags): Adjust
6719 calls to copy_indirect_symbol.
6720 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
6721 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
6722 * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
6723 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
6724 * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
6725 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
6726 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
6727 * elfxx-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
6728 * elfxx-mips.h (_bfd_mips_elf_copy_indirect_symbol): Likewise.
6729 * elf.c (_bfd_elf_link_hash_copy_indirect): Likewise. Properly
6730 test refcounts for "used" values.
6731
6732 2002-08-21 John David Anglin <dave@hiauly1.hia.nrc.ca>
6733
6734 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Add PARAMS to
6735 argument declaration.
6736
6737 2002-08-19 Elena Zannoni <ezannoni@redhat.com>
6738
6739 * archures.c (bfd_mach_ppc_e500): Added.
6740 * bfd-in2.h: Rebuilt.
6741 * cpu-powerpc.c (bfd_powerpc_archs): Added e500.
6742
6743 2002-08-19 Alan Modra <amodra@bigpond.net.au>
6744
6745 * elf32-m68hc12.c (elf_backend_can_gc_sections): False.
6746
6747 2002-08-17 Andrew Cagney <ac131313@redhat.com>
6748
6749 * elf.c (bfd_elf_get_elf_syms): Change type of `esym' to
6750 `bfd_byte'.
6751
6752 2002-08-17 Stan Cox <scox@redhat.com>
6753
6754 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Use the
6755 IRIX 6 segment layout for NEWABI.
6756
6757 2002-08-16 Stephen Clarke <stephen.clarke@superh.com>
6758
6759 * elf32-sh.c (sh_elf_gc_mark_hook): For sh64, skip indirect
6760 symbols when looking for section referred to by a relocation.
6761 * elf64-sh.c (sh_elf64_gc_mark_hook): Likewise.
6762
6763 2002-08-15 Alan Modra <amodra@bigpond.net.au>
6764
6765 * elf32-i370.c: Move reloc enum to include/elf/i370.h.
6766
6767 2002-08-15 Hans-Peter Nilsson <hp@axis.com>
6768
6769 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Add
6770 missing check for whether the symbol is referenced by DSO before
6771 unexporting it as an unneeded dynamic symbol.
6772
6773 2002-08-14 H.J. Lu <hjl@gnu.org>
6774
6775 * libbfd.h: Regenerate.
6776
6777 2002-08-14 H.J. Lu <hjl@gnu.org>
6778
6779 * config.bfd: Always add 64bit vectors to 32bit Linux/mips.
6780
6781 2002-08-14 Stephane Carrez <stcarrez@nerim.fr>
6782
6783 * elf32-m68hc11.c (m68hc11_relax_group): New to relax group of
6784 instructions.
6785 (m68hc11_direct_relax): New to define table of relaxable instructions.
6786 (find_relaxable_insn): New, find a relaxable insn.
6787 (compare_reloc): New to compare two relocs.
6788 (m68hc11_elf_relax_section): New, relax text sections.
6789 (m68hc11_elf_relax_delete_bytes): New, delete bytes and adjust branchs.
6790 (elf32_m68hc11_check_relocs): New function for GC support.
6791 (elf32_m68hc11_relocate_section): New function for GC support.
6792 (bfd_elf32_bfd_relax_section): Define to support linker relaxation.
6793 (elf_backend_check_relocs): Likewise.
6794 (elf_backend_relocate_section): Likewise.
6795
6796 2002-08-13 H.J. Lu <hjl@gnu.org>
6797
6798 * elflink.h (NAME(bfd_elf,size_dynamic_sections): Don't count
6799 definitions in shared objects when checking symbol with
6800 undefined version.
6801
6802 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6803
6804 * elf32-m68hc11.c (elf32_m68hc11_gc_mark_hook): New for section GC.
6805 (elf32_m68hc11_gc_sweep_hook): Likewise.
6806 (elf_backend_gc_mark_hook): Define for GC section support.
6807 (elf_backend_gc_sweep_hook): Likewise.
6808 (elf_backend_can_gc_sections): Likewise.
6809
6810 * elf32-m68hc12.c: Likewise.
6811
6812 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6813
6814 * elf32-m68hc11.c (_bfd_m68hc11_elf_print_private_bfd_data): New.
6815 (_bfd_m68hc11_elf_merge_private_bfd_data): New function.
6816 (_bfd_m68hc11_elf_set_private_flags): New function.
6817 Use them to set/check/print ELF flags specific to 68HC11.
6818
6819 * elf32-m68hc12.c (_bfd_m68hc12_elf_print_private_bfd_data): New.
6820 (_bfd_m68hc12_elf_merge_private_bfd_data): New function.
6821 (_bfd_m68hc12_elf_set_private_flags): New function.
6822 Use them to set/check/print ELF flags specific to 68HC12.
6823
6824 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6825
6826 * elf32-m68hc11.c (elf_m68hc11_howto_table): Add the new relocs;
6827 fix masks for PC-rel relocs.
6828 (m68hc11_elf_ignore_reloc): New function.
6829
6830 * elf32-m68hc12.c (m68hc12_elf_special_reloc): New to handle specific
6831 68HC12 banked addressing relocs.
6832 (m68hc12_phys_addr): New to compute physical address of banked memory.
6833 (m68hc12_phys_page): Likewise for page.
6834 (m68hc12_addr_is_banked): New to see if address is in banked area.
6835 (elf_m68hc12_howto_table): Add new relocs and rename to xx12.
6836
6837 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6838
6839 * reloc.c (BFD_RELOC_M68HC11_RL_JUMP, BFD_RELOC_M68HC11_RL_GROUP,
6840 BFD_RELOC_M68HC11_LO16, BFD_RELOC_M68HC11_PAGE,
6841 BFD_RELOC_M68HC11_24): New relocs for 68HC11/68HC12.
6842 * bfd-in2.h: Regenerate.
6843
6844 2002-08-12 H.J. Lu <hjl@gnu.org>
6845
6846 * elflink.h (elf_add_default_symbol): Preserve section across
6847 elf_merge_symbol.
6848
6849 2002-08-09 Graeme Peterson <gp@qnx.com>
6850
6851 * Makefile.am: Add entries for elf32-ppcqnx.c, and add
6852 elf32-qnx.h dependency to elfarmqnx-nabi.c and elf32-i386qnx.c.
6853 * Makefile.in: Regenerate.
6854 * config.bfd: Add support for powerpc{le}-*-nto targets.
6855 * configure.in: Add support for bfd_elf32_powerpc{le}qnx_vec.
6856 * configure: Regenerate.
6857 * elf32-i386qnx.c: Moved backend functions into a QNX specific
6858 common file "elf32-qnx.h", and now include that file.
6859 * elf32-qnx.h: New file: QNX specific common elf backend.
6860 * elf32-ppc.c: Do not include elf32-target.h if
6861 ELF32_PPC_C_INCLUDED is defined.
6862 * elf32-ppcqnx.c: New file: Support for QNX.
6863 * elfarmqnx-nabi.c: Include elf32-qnx.h for qnx elf backend.
6864 * targets.c: Add bfd_elf32_powerpc{le}qnx_vec.
6865
6866 2002-08-09 Nick Clifton <nickc@redhat.com>
6867
6868 * po/sv.po: Updated Swedish translation.
6869
6870 2002-08-09 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6871
6872 * elfxx-mips.c (mips_elf_global_got_index): Avoid segfault if
6873 g->global_gotsym is NULL.
6874
6875 2002-08-08 H.J. Lu <hjl@gnu.org>
6876
6877 * elflink.h (elf_add_default_symbol): Don't warn if a definition
6878 overrides an indirect versioned symbol.
6879
6880 2002-08-08 Jakub Jelinek <jakub@redhat.com>
6881
6882 * elf32-i386.c (elf_i386_relocate_section): Fill in proper addend
6883 for R_386_TLS_TPOFF32 relocs against symndx 0.
6884
6885 2002-08-07 H.J. Lu <hjl@gnu.org>
6886
6887 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Check symbol
6888 with undefined version if needed.
6889 (elf_link_assign_sym_version): Match a default symbol with a
6890 version without definition. No need to hide the default
6891 definition separately.
6892
6893 2002-08-08 Alan Modra <amodra@bigpond.net.au>
6894
6895 * elflink.h (elf_link_output_extsym): Don't output symbols from
6896 SEC_EXCLUDE sections.
6897
6898 * aoutx.h (aout_link_write_symbols): Correct handling of warning syms.
6899
6900 2002-08-07 Alan Modra <amodra@bigpond.net.au>
6901
6902 * elf64-ppc.c (edit_opd): Arrange to drop symbols for discarded .opd
6903 entries.
6904
6905 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6906
6907 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Cast signedness
6908 mismatch.
6909
6910 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6911
6912 * elfxx-mips.c (ABI_64_P): Remove superfluous check.
6913
6914 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6915
6916 * elf32-mips.c (mips_reloc_map): Fix typo.
6917
6918 2002-08-06 Alan Modra <amodra@bigpond.net.au>
6919
6920 * xcofflink.c (xcoff_write_global_symbol): Set n_scnum for abs_section.
6921
6922 2002-08-06 Alan Modra <amodra@bigpond.net.au>
6923
6924 * elf64-ppc.c (ppc64_elf_howto_raw): Zero all src_mask entries.
6925
6926 2002-08-06 Alan Modra <amodra@bigpond.net.au>
6927
6928 * libxcoff.h: Use PARAMS on function declarations.
6929 * coff-rs6000.c (xcoff_generate_rtinit): Simplify size calc.
6930 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
6931
6932 * coff-rs6000.c: (xcoff_rtype2howto): Don't place reloc address in
6933 addend.
6934 * coff64-rs6000.c: (xcoff64_rtype2howto): Likewise.
6935
6936 2002-08-06 Alan Modra <amodra@bigpond.net.au>
6937
6938 * coff-rs6000.c: Formatting fixes.
6939 (xcoff_calculate_relocation): Use PARAMS in declaration.
6940 (xcoff_complain_overflow): Likewise.
6941 (xcoff_ppc_relocate_section): Use old-style function pointer call.
6942 (bfd_xcoff_backend_data): Remove useless comments.
6943 (rs6000coff_vec): Likewise.
6944 (bfd_pmac_xcoff_backend_data): Likewise.
6945 (pmac_xcoff_vec): Likewise.
6946
6947 * coff64-rs6000.c: Formatting fixes.
6948 (xcoff64_calculate_relocation): Use PARAMS in declaration.
6949 (xcoff64_ppc_relocate_section): Use old-style function pointer call.
6950 (bfd_xcoff_backend_data): Remove useless comments.
6951 (rs6000coff64_vec): Likewise.
6952 (bfd_xcoff_aix5_backend_data): Likewise.
6953 (aix5coff64_vec): Likewise.
6954
6955 2002-08-06 Alan Modra <amodra@bigpond.net.au>
6956
6957 * coff-rs6000.c (xcoff_howto_table): Revert some of last change to
6958 mask entries. Use complain_overflow_dont for R_REF.
6959 (xcoff_reloc_type_ba): Revert last change.
6960 (xcoff_reloc_type_br): Likewise.
6961 (xcoff_reloc_type_crel): Likewise.
6962 (xcoff_ppc_relocate_section): Likewise.
6963 * coff64-rs6000.c (xcoff64_reloc_type_br): Likewise.
6964 (xcoff64_ppc_relocate_section): Likewise.
6965 (xcoff64_howto_table): Revert some of last change to mask entries.
6966 Use complain_overflow_dont for R_REF.
6967
6968 * coff-rs6000.c (xcoff_howto_table): Fix src_mask entries. Make all
6969 relocs with bitsize == 16 have size = 1.
6970 (xcoff_reloc_type_ba): Correct src_mask and dst_mask adjustment.
6971 (xcoff_reloc_type_br): Likewise.
6972 (xcoff_reloc_type_crel): Likewise.
6973 (xcoff_ppc_relocate_section): Set up src_mask and dst_mask correctly.
6974 * coff64-rs6000.c (xcoff64_reloc_type_br): Correct src_mask and
6975 dst_mask adjustment.
6976 (xcoff64_ppc_relocate_section): Set up src_mask and dst_mask correctly.
6977 (xcoff64_howto_table): Fix src_mask entries. Make all relocs with
6978 bitsize == 16 have size = 1.
6979
6980 2002-08-01 Denis Chertykov <denisc@overta.ru>
6981
6982 * elf32-ip2k.c: Processor manufacturer changed to Ubicom.
6983 (struct misc): New field isymbuf. All free_* fields removed.
6984 (symbol_value): Pass in internal syms. No need to swap syms in.
6985 (ip2k_elf_relax_section): Use bfd_elf_get_elf_syms. Properly free
6986 possibly cached info.
6987 (tidyup_after_error): Removed.
6988 (ip2k_elf_relax_section_pass1): Don't use removed fields of struct
6989 misc. Use new field.
6990 (adjust_all_relocations): Use internal syms. No need to swap syms
6991 in and out.
6992 (add_page_insn): Don't use removed fields of struct misc.
6993
6994 2002-08-01 Nick Clifton <nickc@redhat.com>
6995
6996 * elf32-arm.h: Revert previous delta.
6997
6998 2002-08-01 Nick Clifton <nickc@redhat.com>
6999
7000 * configure.in (AM_INIT_AUTOMAKE): Bump version number.
7001 * configure: Regenerate.
7002
7003 2002-07-31 H.J. Lu <hjl@gnu.org>
7004
7005 * config.bfd: Add x86-64 vector to Linux/i386 if 64bit BFD is
7006 selected.
7007
7008 2002-07-31 H.J. Lu <hjl@gnu.org>
7009
7010 * config.bfd: Add n32 vectors to 32bit Linux/mips if 64bit BFD
7011 is selected.
7012
7013 2002-07-31 Jakub Jelinek <jakub@redhat.com>
7014
7015 * elf32-i386.c (elf_i386_copy_indirect_symbol): Swap tls_type
7016 if _bfd_elf_link_hash_copy_indirect will swap got.refcount.
7017
7018 2002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
7019
7020 * cpu-ns32k.c (_bfd_ns32k_put_immdeiate, _bfd_ns32k_get_immediate):
7021 There is no 8 byte relocation type for this architecture.
7022 (do_ns32k_reloc): Use bfd_vma instead of native types.
7023 (bfd_ns32k_put_immediate, _bfd_ns32k_relocate_contents) put_data
7024 returns void.
7025 (_bfd_ns32k_put_displacement): Don't check for overflow. We can
7026 rely on generic code to do that.
7027 * aout-ns32k.c (howto_table): Add appropriate overflow detection
7028 to all table entries.
7029 (_bfd_ns32k_relocate_contents): put_data returns void.
7030 * ns32k.h: (_bfd_ns32k_put_displacement, _bfd_ns32k_put_immediate)
7031 (_bfd_do_ns32k_reloc_contents): Fix prototypes. put data functions
7032 return void.
7033
7034 2002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
7035
7036 * aoutx.h (aout_link_check_ar_symbols): Whether to include an
7037 archive object is target dependant.
7038
7039 2002-07-31 Adam Nemet <anemet@lnxw.com>
7040
7041 * elf32-arm.h (ARM_PLT_ENTRY_SIZE): Rename PLT_ENTRY_SIZE.
7042 (THUMB_PLT_ENTRY_SIZE): New macro.
7043 (PLT_ENTRY_SIZE): Return the appropriate *_PLT_ENTRY_SIZE.
7044 (elf32_arm_plt0_entry): Rename PLT_ENTRY_SIZE to
7045 ARM_PLT_ENTRY_SIZE.
7046 (elf32_arm_plt_entry): Likewise.
7047 (elf_backend_plt_header_size): Likewise.
7048 (elf32_thumb_plt0_entry): New global.
7049 (elf32_arm_finish_dynamic_sections): Use it. Put Thumb entries
7050 into .plt.thumb.
7051 (elf32_thumb_plt_entry): New global.
7052 (elf32_arm_finish_dynamic_symbol): Use it. Use .thumb.plt for
7053 Thumb entries. Set the bottom bit of the corresponding GOT entry
7054 for a Thumb PLT entry.
7055 (struct elf32_arm_plt_entry_info): New structure.
7056 (struct elf32_arm_link_hash_entry, plt_info): New member of this
7057 type.
7058 (elf32_arm_link_hash_newfunc): Initialize new member.
7059 (elf32_arm_final_link_relocate, R_ARM_THM_PC22 case): Handle
7060 relocations against the PLT.
7061 (elf32_arm_check_relocs, case R_ARM_PLT32 case): Set
7062 first_rel_type if this is the first time we encounter the symbol.
7063 (elf32_arm_check_relocs, case R_ARM_THM_PC22 case): New case.
7064 Determine if relocation needs a PLT entry. Set first_rel_type if
7065 this is the first time we encounter the symbol
7066 (elf32_arm_adjust_dynamic_symbol): Create PLT entries for Thumb
7067 functions as well.
7068 (elf32_arm_size_dynamic_sections): Handle .plt.thumb like .plt.
7069 (elf32_arm_create_dynamic_sections): New function. Create the
7070 .plt.thumb section.
7071 (elf_backend_create_dynamic_sections): Call it.
7072
7073 2002-07-31 Nick Clifton <nickc@redhat.com>
7074
7075 * bfd.c (bfd_alt_mach_code): Rename parameter 'index' to
7076 'alternative' in order to avoid shadowing global symbol of the
7077 same name.
7078 * bfd-in2.h: Regenerate.
7079 * libbfd.h: Regenerate.
7080 * libcoff.h: Regenerate.
7081
7082 2002-07-31 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7083
7084 * Makefile.am: Add n32 ABI support.
7085 * Makefile.in: Regenerate.
7086 * config.bfd: Add n32 vectors to mips64*-*-linux* targets. Treat 64
7087 bit vectors for mips*-*-linux targets as optional.
7088 * configure.in: Add n32 ABI vectors.
7089 * configure: Regenerate.
7090 * elf32-mips.c (mips_elf32_object_p): Reject n32 ABI files.
7091 * elfn32-mips.c: New file, n32 ABI support.
7092 * targets.c: Add n32 ABI vectors.
7093
7094 2002-07-30 Graeme Peterson <gp@qnx.com>
7095
7096 * elfarmqnx-nabi.c: New file: Support for QNX.
7097 * config.bfd: Add support for arm-*-nto target.
7098 * configure.in: Add support for bfd_elf32_{big|little}armqnx_vec.
7099 * configure: Regenerate.
7100 * Makefile.am: Add entries for elfarmqnx-nabi.c.
7101 * Makefile.in: Regenerate.
7102 * elf32-arm.h (ELF_MAXPAGESIZE): Do not define if already defined.
7103 Do not define global function if ELFARM_NABI_C_INCLUDED is defined.
7104 * elfarm-nabi.c: Do not include elf32-arm.h if
7105 ELFARM_NABI_C_INCLUDED is defined.
7106 * targets.c: Add bfd_elf32_{big|little}armqnx_vec.
7107
7108 2002-07-30 Nick Clifton <nickc@redhat.com>
7109
7110 * po/sv.po: Updated Swedish translation.
7111
7112 2002-07-30 Jakub Jelinek <jakub@redhat.com>
7113
7114 * elf.c (elf_fake_sections): Fix up .tbss sh_size and sh_type.
7115
7116 2002-07-30 Alan Modra <amodra@bigpond.net.au>
7117
7118 * aoutx.h (some_aout_object_p): Clean up tdata properly on error.
7119 * archive.c (bfd_generic_archive_p): Likewise.
7120 * coff-rs6000.c (_bfd_xcoff_archive_p): Likewise.
7121 (_bfd_xcoff_archive_p): Use bfd_scan_vma in place of strtol.
7122 * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
7123 (xcoff64_archive_p): Likewise.
7124 (xcoff64_openr_next_archived_file): Likewise.
7125 (xcoff64_archive_p): Clean up tdata properly on error.
7126 * coffgen.c (coff_real_object_p): Likewise.
7127 (coff_object_p): Release filehdr and opthdr.
7128 * ecoff.c (_bfd_ecoff_archive_p): Clean up tdata properly on error.
7129 * ieee.c (ieee_archive_p): Likewise.
7130 * ihex.c (ihex_object_p): Likewise.
7131 (ihex_mkobject): Always allocate tdata.
7132 * peicode.h (pe_ILF_object_p): Release bfd_alloc'd buffer on error.
7133 * srec.c (srec_mkobject): Always allocate tdata.
7134 (srec_object_p): Clean up tdata properly on error.
7135 (symbolsrec_object_p): Likewise.
7136 * versados.c (versados_object_p): Likewise.
7137 * vms-misc.c (_bfd_vms_get_record): Use bfd_malloc instead of malloc,
7138 and bfd_realloc instead of realloc.
7139 (add_new_contents): Use bfd_alloc instead of bfd_malloc for sections.
7140 * vms.c (vms_initialize): Always allocate tdata. Use bfd_alloc in
7141 place of bfd_malloc, simplifying error freeing. Free hash table too.
7142 (vms_object_p): Clean up tdata on error.
7143 (vms_mkobject): Don't complain on stderr if vms_initialize fails.
7144 (vms_close_and_cleanup): Adjust for bfd_alloc use.
7145
7146 2002-07-30 Alan Modra <amodra@bigpond.net.au>
7147
7148 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set e_flags.
7149
7150 2002-07-26 Chris Demetriou <cgd@broadcom.com>
7151
7152 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Merge ASE
7153 flags into resulting BFD.
7154
7155 2002-07-26 Alan Modra <amodra@bigpond.net.au>
7156
7157 From John Reiser <jreiser@BitWagon.com>
7158 * elf32-i386.c (elf_i386_link_hash_table_create): Clear
7159 tls_ldm_got.refcount.
7160
7161 2002-07-25 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7162
7163 * elf64-mips.c: Update TODO comment.
7164 (mips_elf64_higher_reloc,mips_elf64_highest_reloc,
7165 mips_elf64_gprel16_reloca): Remove prototypes.
7166 (mips16_jump_reloc,mips16_gprel_reloc): Add functions.
7167 (UNUSED_RELOC): Replace by EMPTY_RELOC.
7168 (mips_elf64_howto_table_rel): Use special R_MIPS_HI16 handling. Remove
7169 wrong comments. Remove disfunctional support of R_MIPS_HIGHER and
7170 R_MIPS_HIGHEST.
7171 (mips_elf64_howto_table_rela): Fix handling of R_MIPS_GPREL16 and
7172 R_MIPS_GOT16. Remove wrong comments.
7173 (elf_mips16_jump_howto,elf_mips16_gprel_howto,
7174 elf_mips_gnu_vtinherit_howto,elf_mips_gnu_vtentry_howto): New, code
7175 from elf32-mips.c.
7176 (mips_elf64_hi16_reloc): Fix formatting.
7177 (mips_elf64_higher_reloc,mips_elf64_highest_reloc): Remove.
7178 (mips_elf64_got16_reloc): Fix formatting. Remove superfluous code.
7179 Better comment. Fall back to R_MIPS_GOT_DISP instead of abort().
7180 (mips_elf64_gprel16_reloc): Make static. Add check for
7181 partial_inplace.
7182 (mips_elf64_gprel16_reloca): Remove.
7183 (mips_elf64_literal_reloc): New function.
7184 (mips_elf64_gprel32_reloc): Fix formatting.
7185 (mips_elf64_shift6_reloc): Fix comment. Make static.
7186 (mips16_jump_reloc,mips16_gprel_reloc): New functions, code from
7187 elf32-mips.c.
7188 (elf_reloc_map,mips_reloc_map): New mapping table, similiar as in
7189 elf32-mips.c
7190 (bfd_elf64_bfd_reloc_type_lookup): Use the mapping table. Enable GNU
7191 specific relocations.
7192 (mips_elf64_rtype_to_howto): Enable GNU specific relocations.
7193 (mips_elf64_object_p): Invert logic to check for SGI-ish ABI.
7194 (ELF_MAXPAGESIZE): Add comment.
7195
7196 2002-07-25 Nick Clifton <nickc@redhat.com>
7197
7198 * po/sv.po: Updated Swedish translation.
7199 * po/es.po: Updated Spanish translation.
7200 * po/fr.po: Updated French translation.
7201
7202 2002-07-25 Alan Modra <amodra@bigpond.net.au>
7203
7204 * elf-bfd.h (_bfd_elf32_link_record_local_dynamic_symbol): Define
7205 as elf_link_record_local_dynamic_symbol.
7206 (_bfd_elf64_link_record_local_dynamic_symbol): Likewise.
7207 (elf_link_record_local_dynamic_symbol): Declare. Now returns int.
7208 * elflink.h (elf_link_record_local_dynamic_symbol): Move to..
7209 * elflink.c: .. here. Use bfd_elf_get_elf_syms. Check whether an
7210 attempt is made to record a symbol in a discarded section, and
7211 return `2' in that case.
7212
7213 2002-07-24 Nick Clifton <nickc@redhat.com>
7214
7215 * po/sv.po: Updated Swedish translation.
7216 * po/es.po: Updated Spanish translation.
7217
7218 2002-07-23 Alan Modra <amodra@bigpond.net.au>
7219
7220 * po/SRC-POTFILES.in: Regenerate.
7221
7222 * elf-hppa.h (elf_hppa_relocate_section): If relocatable, return
7223 immediately. Remove code handling relocatable linking.
7224 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
7225 * elf32-cris.c (cris_elf_relocate_section): Likewise.
7226 * elf32-fr30.c (elf32_frv_relocate_section): Likewise.
7227 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
7228 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
7229 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
7230 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
7231 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
7232 * elf32-v850.c (v850_elf_relocate_section): Likewise.
7233 * elf32-vax.c (elf_vax_relocate_section): Likewise.
7234 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7235 * elf32-avr.c (elf_backend_rela_normal): Define.
7236 * elf32-cris.c: Likewise.
7237 * elf32-fr30.c: Likewise.
7238 * elf32-frv.c: Likewise.
7239 * elf32-h8300.c: Likewise.
7240 * elf32-hppa.c: Likewise.
7241 * elf32-ip2k.c: Likewise.
7242 * elf32-sparc.c: Likewise.
7243 * elf32-v850.c: Likewise.
7244 * elf32-vax.c: Likewise.
7245 * elf64-hppa.c: Likewise.
7246 * elf64-sparc.c: Likewise.
7247 * elf32-fr30.c (elf32_frv_relocate_section): Edit comment.
7248 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
7249 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
7250 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
7251 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
7252 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
7253 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
7254 * elf-m10200.c (USE_RELA): Don't define.
7255 * elf-m10300.c: Likewise.
7256 * elfarm-oabi.c: Likewise.
7257 * elf32-i370.c: Likewise.
7258 * elf32-ip2k.c: Likewise.
7259 * elf32-m68k.c: Likewise.
7260 * elf32-mcore.c: Likewise.
7261 * elf32-ppc.c: Likewise.
7262 * elf32-s390.c: Likewise.
7263 * elf32-vax.c: Likewise.
7264 * elf64-ppc.c: Likewise.
7265 * elf64-s390.c: Likewise.
7266 * elf64-x86-64.c: Likewise.
7267 * elfxx-ia64.c: Likewise.
7268 * elf32-avr.c (USE_REL): Don't undef.
7269 * elf32-ip2k.c: Likewise.
7270
7271 2002-07-23 Nick Clifton <nickc@redhat.com>
7272
7273 * elf-bfd.h (struct elf_backend_data): Add new bitfield
7274 'want_p_paddr_set_to_zero'.
7275 * elfxx-target.h: Set default value for want_p_paddr_set_to_zero
7276 to false;
7277 * elfxx-ia64.c: Set want_p_paddr_set_zero for HPUX target.
7278 * elf.c (copy_private_bfd_data): Test want_p_paddr_set_zero.
7279
7280 2002-07-23 Gabor Keresztfalvi <keresztg@mail.com>
7281
7282 * nlmcode.h (nlm_swap_auxiliary_headers_out): Swapped the order of
7283 the MeSsAgEs and CoPyRiGhT tags to make >=NW4.x NLM loaders to
7284 show the Copyright string.
7285 Minor formatting tidy ups.
7286
7287 2002-07-23 Nick Clifton <nickc@redhat.com>
7288
7289 * po/fr.po: Updated French translation.
7290 * po/sv.po: Updated Swedish translation.
7291
7292 2002-07-23 Alan Modra <amodra@bigpond.net.au>
7293
7294 * elflink.h (elf_link_input_bfd): Don't change internal symbols
7295 when outputting relocs.
7296
7297 2002-07-20 Jason Thorpe <thorpej@wasabisystems.com>
7298
7299 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only insert
7300 DT_PLTGOT into the dynamic section if there is a PLT.
7301
7302 2002-07-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7303
7304 * elfxx-mips.c (_bfd_mips_elf_discard_info): New function, code from
7305 elf32-mips.c.
7306 (_bfd_mips_elf_write_section): Likewise.
7307 * elfxx-mips.h (_bfd_mips_elf_discard_info): New prototype.
7308 (_bfd_mips_elf_write_section): Likewise.
7309 * elf32-mips.c (elf32_mips_discard_info): Move to elfxx-mips.c.
7310 (elf32_mips_write_section): Likewise.
7311 * elf64-mips.c (_bfd_mips_elf_ignore_discarded_relocs): Use it.
7312 (_bfd_mips_elf_write_section): Likewise.
7313
7314 2002-07-19 Alan Modra <amodra@bigpond.net.au>
7315
7316 * elfxx-ia64.c: (elfNN_ia64_modify_segment_map): Properly scan
7317 PT_IA_64_UNWIND segments for a given section.
7318
7319 2002-07-17 H.J. Lu <hjl@gnu.org>
7320
7321 * Makefile.am: Fix a typo.
7322 * Makefile.in: Regenerate.
7323
7324 2002-07-15 Denis Chertykov <denisc@overta.ru>
7325 Frank Ch. Eigler <fche@redhat.com>
7326 Ben Elliston <bje@redhat.com>
7327 Alan Lehotsky <alehotsky@cygnus.com>
7328 John Healy <jhealy@redhat.com>
7329 Graham Stott <grahams@redhat.com>
7330 Jeff Johnston <jjohnstn@redhat.com>
7331
7332 * Makefile.am: Add support for ip2k.
7333 * Makefile.in: Regenerate.
7334 * doc/Makefile.in: Regenerate.
7335 * archures.c: Add support for ip2k.
7336 * config.bfd: Add support for ip2k.
7337 * configure.in: Add support for ip2k.
7338 * configure: Regenerate.
7339 * reloc.c: Add support for ip2k.
7340 * targets.c: Add support for ip2k.
7341 * bfd-in2.h: Regenerate.
7342 * libbfd.h: Regenerate.
7343 * cpu-ip2k.c: New file.
7344 * elf32-ip2k.c: New file.
7345
7346 2002-07-17 Ian Rickards <irickard@arm.com>
7347
7348 * dwarf2.c (concat_filename): If we can't establish the directory
7349 just return the filename.
7350
7351 2002-07-16 Moritz Jodeit <moritz@jodeit.org>
7352
7353 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Correct order of memset args.
7354
7355 2002-07-16 Alan Modra <amodra@bigpond.net.au>
7356
7357 * elflink.h: Formatting fixes, tidy prototypes.
7358 (elf_link_assign_sym_version): Move common code out of loop.
7359
7360 2002-07-16 Alan Modra <amodra@bigpond.net.au>
7361
7362 * elflink.h (elf_link_input_bfd): Don't call reloc_emitter when
7363 reloc section size is zero. Correct reloc output location.
7364
7365 2002-07-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
7366
7367 * elf-hppa.h (elf_hppa_reloc_final_type): Use R_PARISC_PCREL16F as
7368 the final type for the e_fsel selector when generating PA2.0W code.
7369 (elf_hppa_relocate_insn): Provide support for PA2.0W 16-bit format 1
7370 relocations.
7371
7372 2002-07-14 H.J. Lu <hjl@gnu.org>
7373
7374 * elflink.h (elf_link_assign_sym_version): Hide the default
7375 definition if there is a hidden versioned definition.
7376
7377 2002-07-12 Hans-Peter Nilsson <hp@axis.com>
7378
7379 * elf32-cris.c (cris_elf_relocate_section): Drop nonsensical
7380 dynamic reference test in assertion when initializing GOT with
7381 static contents. Just assert that there are either no dynamic
7382 sections, the symbol is defined in the regular objects or that the
7383 symbol is undef weak. Tweak comment.
7384 (elf_cris_finish_dynamic_symbol): Emit .got reloc for a program
7385 only if the symbol isn't defined in the program and isn't undef
7386 weak.
7387 (elf_cris_adjust_dynamic_symbol): Simplify condition for getting
7388 rid of PLT entry: only do it if the symbol isn't defined in a DSO.
7389 When doing so, clear ELF_LINK_HASH_NEEDS_PLT. Tweak comments.
7390 (elf_cris_discard_excess_program_dynamics): Don't consider
7391 ELF_LINK_HASH_REF_DYNAMIC when omitting .got runtime relocs.
7392
7393 2002-07-11 Alan Modra <amodra@bigpond.net.au>
7394
7395 * elf32-i386.c (elf_i386_relocate_section): Don't complain about
7396 unresolved debugging relocs in dynamic applications.
7397 * elf32-s390.c (elf_s390_relocate_section): Likewise.
7398 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
7399 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
7400 * elf64-s390.c (elf_s390_relocate_section): Likewise.
7401 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7402 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
7403
7404 2002-07-10 Alan Modra <amodra@bigpond.net.au>
7405
7406 * elf64-ppc.c (ONES): Define.
7407 (ppc64_elf_howto_table): Use ONES here to avoid warnings. Fill in
7408 missing src_mask fields. Tweak R_PPC64_NONE, R_PPC64_COPY. Fill
7409 in missing dst_mask fields on R_PPC64_PLT32, R_PPC64_PLTREL32.
7410
7411 * elf64-ppc.c (ppc64_elf_get_symbol_info): Delete.
7412 (ppc64_elf_set_private_flags): Delete.
7413 (ppc64_elf_section_from_shdr): Delete.
7414 (ppc64_elf_merge_private_bfd_data): Remove flag checking/merging code.
7415 (ppc64_elf_fake_sections): Delete.
7416 (bfd_elf64_bfd_set_private_flags): Don't define.
7417 (bfd_elf64_get_symbol_info): Likewise.
7418 (elf_backend_section_from_shdr): Likewise.
7419 (elf_backend_fake_sections): Likewise.
7420
7421 2002-07-10 Marco Walther <Marco.Walther@sun.com>
7422
7423 * elf.c: (assign_section_numbers) Set sh_entsize for .stab only
7424 when not already set.
7425 * elf64-sparc.c: (sparc64_elf_fake_sections): New function.
7426 (elf_backend_fake_sections): Define.
7427
7428 2002-07-10 Alan Modra <amodra@bigpond.net.au>
7429
7430 * merge.c (_bfd_merge_section): Remove redundant output_section check.
7431 Formatting.
7432 (_bfd_merge_sections): Don't set SEC_EXCLUDE on unused sections.
7433
7434 2002-07-09 Hans-Peter Nilsson <hp@axis.com>
7435
7436 * elf32-cris.c (cris_elf_relocate_section): Move sanity-check for
7437 NULL sym_hashes to just before use.
7438 <case R_CRIS_32_GOTREL>: In test for local symbol, accept also
7439 symbol with non-default visibility.
7440 <case R_CRIS_32_GOTREL, case R_CRIS_32_PLT_GOTREL>: Ditto.
7441 <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
7442 Ditto.
7443 (cris_elf_gc_sweep_hook): Only decrease h->plt.refcount for
7444 symbol with non-default visibility.
7445 (cris_elf_check_relocs): At tests for local symbol before
7446 increasing h->plt.refcount, also check for non-default
7447 visibility. Ditto when checking for local symbol to eliminate
7448 pc-relative runtime relocs.
7449
7450 2002-07-08 Alan Modra <amodra@bigpond.net.au>
7451
7452 * elf.c: Formatting.
7453 (IS_SOLARIS_PT_INTERP): Add p_paddr and p_memsz checks.
7454 (INCLUDE_SECTION_IN_SEGMENT): Remove IS_SOLARIS_PT_INTERP.
7455 (copy_private_bfd_data): Set p_vaddr on broken Solaris PT_INTERP
7456 segments.
7457
7458 2002-07-07 Mark Mitchell <mark@codesourcery.com>
7459 Alan Modra <amodra@bigpond.net.au>
7460
7461 * cofflink.c (_bfd_coff_final_link): On PE COFF systems, take into
7462 account the impact of relocation count overflow when computing
7463 section offsets.
7464 * coffcode.h (coff_write_relocs): Use obj_pe when deciding whether
7465 or not to apply the PE COFF reloc overflow handling. Fix a
7466 fencepost error in deciding whether or not to use that technique.
7467
7468 2002-07-07 Alan Modra <amodra@bigpond.net.au>
7469
7470 * elf-bfd.h (struct elf_reloc_cookie): Remove locsym_shndx,
7471 change type of locsyms.
7472 (bfd_elf_get_elf_syms): Declare.
7473 * elf.c (bfd_elf_get_elf_syms): New function.
7474 (group_signature): Use bfd_elf_get_elf_syms.
7475 (bfd_section_from_r_symndx): Likewise.
7476 * elfcode.h (elf_slurp_symbol_table): Likewise.
7477 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
7478 (elf_link_add_object_symbols): Likewise. Reorganise to increase
7479 locality of various data structures. Properly free internal relocs.
7480 (elf_bfd_final_link): Properly free internal relocs.
7481 (elf_link_check_versioned_symbol): Use bfd_elf_get_elf_syms.
7482 (elf_link_input_bfd): Likewise.
7483 (elf_gc_mark): Likewise. Properly free internal relocs.
7484 (elf_gc_sweep): Properly free internal relocs.
7485 (elf_reloc_symbol_deleted_p): No need to swap syms in.
7486 (elf_bfd_discard_info): Use bfd_elf_get_elf_syms. Properly free
7487 internal relocs.
7488 * elf-m10200.c (mn10200_elf_relax_section): Use bfd_elf_get_elf_syms.
7489 Properly free possibly cached info.
7490 (mn10200_elf_relax_delete_bytes): Remove symbol swapping code.
7491 (mn10200_elf_symbol_address_p): Pass in internal syms. Remove
7492 symbol swapping code.
7493 (mn10200_elf_get_relocated_section_contents): Use bfd_elf_get_elf_syms.
7494 Properly free possibly cached info.
7495 * elf-m10300.c (mn10300_elf_relax_section): As above for elf-m10200.c.
7496 (mn10300_elf_relax_delete_bytes): Likewise.
7497 (mn10300_elf_symbol_address_p): Likewise.
7498 (mn10300_elf_get_relocated_section_contents): Likewise.
7499 * elf32-h8300.c (elf32_h8_relax_section): As above for elf-m10200.c.
7500 (elf32_h8_relax_delete_bytes): Likewise.
7501 (elf32_h8_symbol_address_p): Likewise.
7502 (elf32_h8_get_relocated_section_contents): Likewise.
7503 * elf32-m32r.c (m32r_elf_relax_section): As above for elf-m10200.c.
7504 (m32r_elf_relax_delete_bytes): Likewise.
7505 (m32r_elf_get_relocated_section_contents): Likewise.
7506 * elf32-sh.c (sh_elf_reloc_loop): Free section contents using
7507 elf_section_data to determine whether cached.
7508 (sh_elf_relax_section): As above for elf-m10200.c.
7509 (sh_elf_relax_delete_bytes): Likewise.
7510 (sh_elf_get_relocated_section_contents): Likewise.
7511 * elf32-xstormy16.c (xstormy16_elf_relax_section): As above.
7512 * elf64-alpha.c (elf64_alpha_relax_section): As above. Also delay
7513 reading of local syms.
7514 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
7515 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): As above.
7516 * elfxx-ia64.c (elfNN_ia64_relax_section): As above.
7517 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Properly free internal
7518 relocs.
7519 * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Properly
7520 free internal relocs and section contents. Don't read symbols.
7521 * elf32-hppa.c (get_local_syms): Use bfd_elf_get_elf_syms.
7522 (elf32_hppa_size_stubs): Don't free local syms.
7523 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Delay
7524 reading of local syms. Use bfd_elf_get_elf_syms. Properly free
7525 possibly cached info.
7526 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
7527 * elf64-hppa.c (elf64_hppa_check_relocs): Use bfd_elf_get_elf_syms.
7528 * elf64-ppc.c (struct ppc_link_hash_table): Delete bfd_count and
7529 all_local_syms.
7530 (get_local_syms): Delete function.
7531 (edit_opd): Use bfd_elf_get_elf_syms. Free on error exit. Cache
7532 on exit.
7533 (ppc64_elf_size_stubs): Use bfd_elf_get_elf_syms. Free/cache on exit.
7534
7535 2002-07-05 Jim Wilson <wilson@redhat.com>
7536
7537 * syms.c (decode_section_type): New.
7538 (bfd_decode_symclass): Call decode_section_type.
7539
7540 2002-07-04 Jakub Jelinek <jakub@redhat.com>
7541
7542 * merge.c (_bfd_merged_section_offset): Avoid accessing byte before
7543 section content start.
7544 Reported by Michael Schumacher <mike@hightec-rt.com>.
7545
7546 2002-07-04 Alan Modra <amodra@bigpond.net.au>
7547
7548 * section.c (_bfd_strip_section_from_output): Remove unnecessary
7549 link order code. Don't actually remove the output section here;
7550 Just set a flag for the linker to do so.
7551 * elflink.c (_bfd_elf_link_renumber_dynsyms): Test for removed
7552 sections when setting up output section dynsyms.
7553
7554 2002-07-04 Alan Modra <amodra@bigpond.net.au>
7555
7556 * elflink.h (elf_link_add_object_symbols): Revert 1999-09-02 hpux
7557 fudge.
7558 * elf.c (bfd_section_from_shdr): Work around broken hpux shared
7559 libs here instead.
7560
7561 2002-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
7562
7563 * elf64-s390.c (create_got_section): Set .got section alignment to
7564 8 bytes.
7565 (elf_s390_check_relocs): Set .rela.dyn section alignment to 8 bytes.
7566
7567 2002-07-02 Alan Modra <amodra@bigpond.net.au>
7568
7569 * elf.c (_bfd_elf_reloc_type_class): Fix comment grammar.
7570
7571 2002-07-01 Matt Thomas <matt@3am-software.com>
7572
7573 * elf32-vax.c (elf32_vax_print_private_bfd_data): Change EF_*
7574 to EF_VAX_*.
7575
7576 2002-07-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7577
7578 * elfxx-mips.c (ABI_64_P): Fix comment.
7579 (MIPS_ELF_OPTIONS_SECTION_NAME,MIPS_ELF_STUB_SECTION_NAME): Use the
7580 new section names for N64 ABI.
7581 (mips_elf_output_extsym): No special _gp_disp handling for NewABI.
7582 (mips_elf_calculate_relocation): Code formatting.
7583 (mips_elf_create_dynamic_relocation): Likewise.
7584 (_bfd_mips_elf_fake_sections): IRIX6 needs this hack, too.
7585 (_bfd_mips_elf_size_dynamic_sections): Handle GOT_PAGE for any NewABI.
7586 (_bfd_mips_elf_relocate_section): No special handling for R_MIPS_64
7587 in any NewABI.
7588 (_bfd_mips_elf_finish_dynamic_symbol): No special _gp_disp handling
7589 for NewABI.
7590 (_bfd_mips_elf_modify_segment_map): Handle any N64 ABI.
7591 (_bfd_mips_elf_gc_sweep_hook): NewABI GOT relocs should be handled
7592 here, too.
7593
7594 2002-07-01 Andreas Schwab <schwab@suse.de>
7595
7596 * elf64-x86-64.c (elf64_x86_64_relocate_section): Only convert
7597 R_X86_64_64 to R_X86_64_RELATIVE.
7598
7599 2002-07-01 John David Anglin <dave@hiauly1.hia.nrc.ca>
7600
7601 * vaxbsd.c: New BFD backend for VAX BSD and Ultrix.
7602 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Add new backend.
7603 Run "make dep-am".
7604 * config.bfd (vax-*-bsd* | vax-*-ultrix*): Use vaxbsd_vec instead of
7605 host_aout_vec.
7606 * configure.in (vaxbsd_vec): Add.
7607 * targets.c (vaxbsd_vec): Add.
7608 * Makefile.in: Rebuild.
7609 * configure: Rebuild.
7610 * po/SRC-POTFILES.in: Rebuild.
7611
7612 2002-07-01 Alan Modra <amodra@bigpond.net.au>
7613
7614 * elflink.h (elf_gc_mark): Pass in the section whose relocs we are
7615 examining to gc_mark_hook, rather than the bfd.
7616 (elf_gc_sections): Adjust.
7617 * elf-bfd.h (struct elf_backend_data <gc_mark_hook>): Likewise.
7618 * elf-m10300.c (mn10300_elf_gc_mark_hook): Likewise.
7619 * elf32-arm.h (elf32_arm_gc_mark_hook): Likewise.
7620 * elf32-avr.c (elf32_avr_gc_mark_hook): Likewise.
7621 * elf32-cris.c (cris_elf_gc_mark_hook): Likewise.
7622 * elf32-d10v.c (elf32_d10v_gc_mark_hook): Likewise.
7623 * elf32-fr30.c (fr30_elf_gc_mark_hook): Likewise.
7624 * elf32-hppa.c (elf32_hppa_gc_mark_hook): Likewise.
7625 * elf32-i386.c (elf_i386_gc_mark_hook): Likewise.
7626 * elf32-m32r.c (m32r_elf_gc_mark_hook): Likewise.
7627 * elf32-m68k.c (elf_m68k_gc_mark_hook): Likewise.
7628 * elf32-mcore.c (mcore_elf_gc_mark_hook): Likewise.
7629 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Likewise.
7630 * elf32-ppc.c (ppc_elf_gc_mark_hook): Likewise.
7631 * elf32-s390.c (elf_s390_gc_mark_hook): Likewise.
7632 * elf32-sh.c (sh_elf_gc_mark_hook): Likewise.
7633 * elf32-sparc.c (elf32_sparc_gc_mark_hook): Likewise.
7634 * elf32-v850.c (v850_elf_gc_mark_hook): Likewise.
7635 * elf32-vax.c (elf_vax_gc_mark_hook): Likewise.
7636 * elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Likewise.
7637 * elf64-mmix.c (mmix_elf_gc_mark_hook): Likewise.
7638 * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
7639 * elf64-s390.c (elf_s390_gc_mark_hook): Likewise.
7640 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
7641 * elfxx-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise.
7642 * elfxx-mips.h (_bfd_mips_elf_gc_mark_hook): Likewise.
7643 * elf64-x86-64.c (elf64_x86_64_gc_mark_hook): Likewise.
7644 * elf32-frv.c (elf32_frv_gc_mark_hook): Likewise. Also remove
7645 redundant local sym tests.
7646 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_entry.
7647 (link_hash_newfunc): Init is_entry.
7648 (ppc64_elf_copy_indirect_symbol): Copy is_entry.
7649 (ppc64_elf_link_hash_table_create): Init all_local_syms.
7650 (create_linkage_sections): Use bfd_make_section_anyway rather than
7651 bfd_make_section.
7652 (ppc64_elf_mark_entry_syms): New function.
7653 (ppc64_elf_check_relocs): Don't bother testing elf_bad_symtab. Set
7654 up opd entry to function section map.
7655 (ppc64_elf_gc_mark_hook): Special case opd section relocs, and
7656 relocs that reference the opd section.
7657 (edit_opd): New function.
7658 (ppc64_elf_size_dynamic_sections): Call get_local_syms and edit_opd.
7659 (ppc64_elf_setup_section_lists): Don't calculate htab->bfd_count here.
7660 (get_local_syms): Do so here. Exit if we already have local syms.
7661 Remove bogus comment imported from elf32-hppa.c. Don't attempt to
7662 read local syms on non-ELF input.
7663 (ppc64_elf_size_stubs): Call _bfd_elf64_link_read_relocs rather
7664 than duplicating it's function here. Adjust free of internal
7665 relocs to suit.
7666 (ppc64_elf_relocate_section): Adjust local syms in opd section.
7667 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Declare.
7668 * elf32-hppa.c (elf32_hppa_size_stubs): Call
7669 _bfd_elf32_link_read_relocs rather than duplicating it's function
7670 here. Adjust free of internal relocs to suit.
7671
7672 2002-07-01 Andreas Jaeger <aj@suse.de>
7673
7674 * elf64-x86-64.c (elf64_x86_64_check_relocs): Certain relocations
7675 are not allowed in shared libs code, enforce -fPIC.
7676
7677 2002-06-29 Hans-Peter Nilsson <hp@bitrange.com>
7678
7679 * mmo.c (mmo_write_loc_chunk): Don't eliminate leading and
7680 trailing zero-sequences when there's previous left-over data.
7681
7682 2002-06-27 John David Anglin <dave@hiauly1.hia.nrc.ca>
7683
7684 * elf64-hppa.c (elf64_hppa_reloc_type_class): New function.
7685 (elf64_hppa_finish_dynamic_sections): Check other_rel_sec, dlt_rel_sec
7686 and opd_rel_sec in order for starting rela section. Check _raw_size.
7687 (elf_backend_reloc_type_class): Define.
7688
7689 2002-06-27 Kevin Buettner <kevinb@redhat.com>
7690
7691 * dwarf2.c (decode_line_info): Handle older, non-standard, 64-bit
7692 DWARF2 formats.
7693
7694 2002-06-27 Alan Modra <amodra@bigpond.net.au>
7695
7696 * cpu-powerpc.c: Comment on ordering of arch_info.
7697 * elf32-ppc.c (ppc_elf_object_p): New function.
7698 (elf_backend_object_p): Define.
7699 * elf64-ppc.c (ppc64_elf_object_p): New function.
7700 (elf_backend_object_p): Define.
7701
7702 2002-06-26 Jason Thorpe <thorpej@wasabisystems.com>
7703
7704 * configure.in (vax-*-netbsd*): Set COREFILE to netbsd-core.lo.
7705 * configure: Regenerate.
7706
7707 2002-06-25 Jason Eckhardt <jle@rice.edu>
7708
7709 * dwarf2.c (decode_line_info): Check unit->addr_size
7710 to read in the proper number of prologue bytes.
7711
7712 2002-06-25 Nick Clifton <nickc@cambridge.redhat.com>
7713
7714 * config.bfd (powerpc-*-aix5*): Only create a selvecs for
7715 aix5coff64_vec if 64-bit bfd support has been enabled.
7716 (powerpc64-*-aix5*): Only define if 64-bit bfd support has
7717 been enabled.
7718
7719 * targets.c (_bfd_target_vector[]): Only include
7720 aix5coff64_vec if 64-bit bfd support has been enabled.
7721
7722 2002-06-25 Alan Modra <amodra@bigpond.net.au>
7723
7724 * elf64-ppc.c (ppc_add_stub): Replace strcpy/strncpy with memcpy.
7725 * elf32-hppa.c (hppa_add_stub): Likewise.
7726 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
7727 * elflink.h (elf_add_default_symbol): Fix comment typo.
7728 (elf_add_default_symbol): Replace strcpy and strncpy with memcpy.
7729 (elf_link_add_object_symbols): Likewise.
7730 (elf_link_assign_sym_version): Likewise.
7731 * hash.c (bfd_hash_lookup): Likewise.
7732 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
7733 * section.c (bfd_get_unique_section_name): Likewise.
7734 * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
7735 * elf.c (_bfd_elf_make_section_from_phdr): Likewise.
7736 (assign_section_numbers): Likewise.
7737 (_bfd_elfcore_make_pseudosection): Likewise.
7738 (elfcore_grok_lwpstatus): Likewise.
7739 (elfcore_grok_win32pstatus): Likewise.
7740 (elfcore_write_note): Constify input params. Use PTR instead of
7741 void *. Include terminating NUL in namesz. Correct padding.
7742 Support NULL "name" param. Use memcpy instead of strcpy.
7743 (elfcore_write_prpsinfo): Constify input params.
7744 (elfcore_write_prstatus): Likewise. Use PTR instead of void *.
7745 (elfcore_write_lwpstatus): Likewise.
7746 (elfcore_write_pstatus): Likewise.
7747 (elfcore_write_prfpreg): Likewise.
7748 (elfcore_write_prxfpreg): Likewise.
7749 * elf-bfd.h (elfcore_write_note): Update declaration.
7750 (elfcore_write_prpsinfo): Likewise.
7751 (elfcore_write_prstatus): Likewise.
7752 (elfcore_write_pstatus): Likewise.
7753 (elfcore_write_prfpreg): Likewise.
7754 (elfcore_write_prxfpreg): Likewise.
7755 (elfcore_write_lwpstatus): Likewise.
7756
7757 2002-06-25 Jason Eckhardt <jle@rice.edu>
7758
7759 * ecoff.c (ecoff_set_symbol_info): Set BSF_FUNCTION for
7760 symbols of type stProc and stStaticProc.
7761
7762 2002-06-25 Nick Clifton <nickc@redhat.com>
7763
7764 * ecoff.c: VArious formatting fixes.
7765
7766 2002-06-25 Alan Modra <amodra@bigpond.net.au>
7767
7768 * coff-rs6000.c (xcoff_generate_rtinit): Fix typo.
7769
7770 2002-06-25 Alan Modra <amodra@bigpond.net.au>
7771
7772 * aout-adobe.c: Don't compare against "true" or "false.
7773 * aout-target.h: Likewise.
7774 * aoutx.h: Likewise.
7775 * archive.c: Likewise.
7776 * bout.c: Likewise.
7777 * cache.c: Likewise.
7778 * coff-a29k.c: Likewise.
7779 * coff-alpha.c: Likewise.
7780 * coff-i386.c: Likewise.
7781 * coff-mips.c: Likewise.
7782 * coff-or32.c: Likewise.
7783 * coff64-rs6000.c: Likewise.
7784 * coffcode.h: Likewise.
7785 * coffgen.c: Likewise.
7786 * cpu-ns32k.c: Likewise.
7787 * ecoff.c: Likewise.
7788 * ecofflink.c: Likewise.
7789 * elf.c: Likewise.
7790 * elf32-arm.h: Likewise.
7791 * elf32-cris.c: Likewise.
7792 * elf32-d30v.c: Likewise.
7793 * elf32-i386.c: Likewise.
7794 * elf32-mcore.c: Likewise.
7795 * elf32-ppc.c: Likewise.
7796 * elf32-sh.c: Likewise.
7797 * elf32-sh64.c: Likewise.
7798 * elf32-v850.c: Likewise.
7799 * elf64-alpha.c: Likewise.
7800 * elf64-sh64.c: Likewise.
7801 * elfcode.h: Likewise.
7802 * elfcore.h: Likewise.
7803 * elflink.h: Likewise.
7804 * elfxx-mips.c: Likewise.
7805 * i386os9k.c: Likewise.
7806 * ieee.c: Likewise.
7807 * libbfd.c: Likewise.
7808 * linker.c: Likewise.
7809 * mmo.c: Likewise.
7810 * nlm32-alpha.c: Likewise.
7811 * nlm32-i386.c: Likewise.
7812 * nlm32-ppc.c: Likewise.
7813 * nlm32-sparc.c: Likewise.
7814 * nlmcode.h: Likewise.
7815 * oasys.c: Likewise.
7816 * pdp11.c: Likewise.
7817 * peicode.h: Likewise.
7818 * reloc.c: Likewise.
7819 * som.c: Likewise.
7820 * srec.c: Likewise.
7821 * tekhex.c: Likewise.
7822 * vms.c: Likewise.
7823 * xcofflink.c: Likewise.
7824 * elf64-sparc.c: Edit comment to not use "== false".
7825
7826 * aoutf1.h: Don't use "? true : false".
7827 * ecoff.c: Likewise.
7828 * format.c: Likewise.
7829 * ieee.c: Likewise.
7830 * linker.c: Likewise.
7831 * mmo.c: Likewise.
7832 * oasys.c: Likewise.
7833
7834 2002-06-23 H.J. Lu <hjl@gnu.org>
7835
7836 * elflink.h (elf_link_add_archive_symbols): For the default
7837 version, check references with only one `@' first.
7838
7839 2002-06-23 John David Anglin <dave@hiauly1.hia.nrc.ca>
7840
7841 * elf64-hppa.c (elf64_hppa_mark_milli_and_exported_functions): New
7842 function.
7843 (allocate_global_data_dlt): Don't add millicode symbols to dynamic
7844 symbol table.
7845 (allocate_global_data_opd, allocate_dynrel_entries): Likewise.
7846 (elf64_hppa_size_dynamic_sections): Revise to use
7847 elf64_hppa_mark_milli_and_exported_functions.
7848 (elf64_hppa_finish_dynamic_symbol): Remove code to keep millicode
7849 symbols out of dynamic symbol table.
7850
7851 2002-06-23 Alan Modra <amodra@bigpond.net.au>
7852
7853 * Makefile.in: Regenerate.
7854 * libbfd.h: Regenerate.
7855 * bfd-in2.h: Regenerate.
7856 * configure: Regenerate.
7857 * po/SRC-POTFILES.in: Regenerate.
7858
7859 * elflink.h: Comment typo fixes.
7860
7861 2002-06-23 H.J. Lu <hjl@gnu.org>
7862
7863 * elf-bfd.h (elf_link_loaded_list): New structure.
7864 (elf_link_hash_table): Add "loaded".
7865 * elf.c (_bfd_elf_link_hash_table_init): Initialize "loaded".
7866 * elflink.h (elf_link_check_versioned_symbol): New function.
7867 (elf_link_output_extsym): Call elf_link_check_versioned_symbol.
7868
7869 2002-06-19 Nick Clifton <nickc@cambridge.redhat.com>
7870
7871 * elflink.h (size_dynamic_sections): If the target does not
7872 support an ELF style hash table, return true, indicating that
7873 nothing needed to be done, rather than false, indicating that the
7874 section's size could not be computed.
7875
7876 2002-06-18 Dave Brolley <brolley@redhat.com>
7877
7878 From Catherine Moore, Michael Meissner, Dave Brolley:
7879 * po/SRC-POTFILES.in: Add cpu-frv.c and elf32-frv.c
7880 * targets.c: Support bfd_elf32_frv_vec.
7881 * reloc.c: Add FRV relocs.
7882 * configure.in: Add support for bfd-elf32-frv-vec.
7883 * config.bfd (targ_cpu): Add support for frv-*-elf.
7884 * archures.c: Add frv arch and machines.
7885 * Makefile.am (ALL_MACHINES): Add cpu-frv.lo.
7886 (ALL_MACHINES_CFILES): Add cpu-frv.c.
7887 (BFD32_BACKENDS): Add elf32-frv.lo.
7888 (BFD32_BACKENDS_CFILES): Add elf32-frv.c
7889 (cpu-frv.lo): New target.
7890 (elf32-frv.lo): New target.
7891 * cpu-frv.c: New file.
7892 * elf32-frv.c: New file.
7893
7894 2002-06-18 Jakub Jelinek <jakub@redhat.com>
7895
7896 * elfcode.h (elf_object_p): Sanity check eh_shoff == 0 implies
7897 e_shnum == 0.
7898 Only read the first section header if e_shoff is non-zero.
7899 Don't consider e_shstrndx if there are no sections.
7900
7901 2002-06-17 Tom Rix <trix@redhat.com>
7902
7903 * elf32-d10v.c (elf_d10v_howto_table): Change R_D10V_10_PCREL_R,
7904 R_D10V_10_PCREL_L and R_D10V_18_PCREL to use
7905 complain_overflow_bitfield.
7906
7907 2002-06-17 Alan Modra <amodra@bigpond.net.au>
7908
7909 * opncls.c (bfd_openr): Remove redundant bfd_set_error.
7910 (bfd_fdopenr): Likewise.
7911 (bfd_openstreamr): Likewise.
7912 (bfd_openw): Likewise.
7913
7914 * targets.c: Sort target vecs.
7915 (_bfd_target_vector): Add aix5coff64_vec, bfd_elf32_sh64_vec,
7916 bfd_elf32_sh64l_vec, bfd_elf32_sh64lnbsd_vec,
7917 bfd_elf32_sh64nbsd_vec, bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec,
7918 bfd_elf64_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec.
7919 * configure.in: Sort target vecs. Add m88kmach3_vec.
7920 * configure: Regenerate.
7921
7922 2002-06-16 Hans-Peter Nilsson <hp@bitrange.com>
7923
7924 * elf64-mmix.c (bpo_reloc_request_sort_fn): Use member
7925 bpo_reloc_no to break sort order ties, not address of items.
7926
7927 2002-06-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
7928
7929 * elf-hppa.h (elf_hppa_final_link): Fix formatting in comment.
7930 Skip excluded sections in determing __gp value.
7931 (elf_hppa_final_link_relocate): Use the symbol's address in
7932 R_PARISC_FPTR64 relocations that don't need an opd entry.
7933 * elf64-hppa.c (allocate_dynrel_entries): Simplify code.
7934 (elf64_hppa_finalize_dynreloc): Likewise.
7935 (elf64_hppa_size_dynamic_sections): Move comments and fix typo.
7936 (elf64_hppa_finish_dynamic_symbol): Break up assert.
7937
7938 2002-06-14 Sergey Grigoriev <serge@leopold.Physik.Uni-Augsburg.DE>
7939
7940 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
7941 alignment for .bss, .data and .text sections so that sse and sse2
7942 code will work.
7943 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
7944
7945 2002-06013 J"orn Rennecke <joern.rennecke@superh.com>
7946
7947 config.bfd: Add support for sh[1234]l*-*-elf* | sh3el*-*-elf*,
7948 sh[1234]*-elf*.
7949
7950 2002-06-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
7951
7952 * elflink.h (elf_bfd_final_link): Improve error handling for missing
7953 dynamic sections.
7954
7955 * elf64-hppa.c (allocate_global_data_opd): We don't need an opd entry
7956 for a symbol that has no output section.
7957 (allocate_dynrel_entries): Correct comment.
7958 (elf64_hppa_finalize_dynreloc): Likewise. Don't create an opd entry
7959 unless we want one.
7960 (elf64_hppa_finalize_opd): Prevent segfault if dyn_h is NULL.
7961 (elf64_hppa_finalize_dlt): Likewise. Prevent segfault for symbols
7962 with no section. Remove unnecessary parentheses.
7963
7964 2002-06-11 Tom Rix <trix@redhat.com>
7965
7966 * coffcode.h (coff_compute_section_file_positions): Add data
7967 section to AIX loader alignment check.
7968
7969 * coff-rs6000.c (_bfd_xcoff_mkobject): Set default text section
7970 alignment to 4 bytes.
7971 (_bfd_xcoff_copy_private_bfd_data): Use text and data alignment
7972 power accessor macro.
7973 (do_shared_object_padding): Remove invalid assertion.
7974
7975 2002-06-10 Richard Sandiford <rsandifo@redhat.com>
7976
7977 * section.c (_bfd_strip_section_from_output): Set SEC_EXCLUDE
7978 for removed output sections.
7979
7980 2002-06-10 Geoffrey Keating <geoffk@redhat.com>
7981
7982 * merge.c (merge_strings): Use htab_create_alloc with calloc, not
7983 htab_alloc.
7984 * elf-strtab.c (_bfd_elf_strtab_finalize): Likewise.
7985
7986 2002-06-08 H.J. Lu <hjl@gnu.org>
7987
7988 * elf.c (copy_private_bfd_data): Don't cast to bfd_size_type to
7989 work around a long long bug in gcc 2.96 on mips.
7990
7991 2002-06-08 Jason Thorpe <thorpej@wasabisystems.com>
7992
7993 * Makefile.am (BFD32_BACKENDS): Add vax1knetbsd.lo.
7994 (BFD32_BACKENDS_CFILES): Add vax1knetbsd.c.
7995 Regenerate dependency lists.
7996 * Makefile.in: Regenerate.
7997 * config.bfd (vax-*-netbsdelf*, vax-*-netbsdaout*): Add
7998 vax1knetbsd_vec to targ_selvecs.
7999 * configure.in: Add vax1knetbsd_vec.
8000 * configure: Regenerate.
8001 * targets.c (_bfd_target_vector): Add vax1knetbsd_vec.
8002 * vax1knetbsd.c: New file.
8003 * vaxnetbsd.c: Update copyright years.
8004 (TARGET_PAGE_SIZE): Set to 0x1000.
8005 (DEFAULT_MID): Set to M_VAX4K_NETBSD.
8006
8007 2002-06-08 Matt Thomas <matt@3am-software.com>
8008
8009 * libaout.h (enum machine_type): Add M_VAX4K_NETBSD.
8010
8011 2002-06-08 Alan Modra <amodra@bigpond.net.au>
8012
8013 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Make static.
8014
8015 2002-06-08 Alan Modra <amodra@bigpond.net.au>
8016
8017 * Makefile.am: Run "make dep-am".
8018 * Makefile.in: Regenerate.
8019
8020 * armnetbsd.c: Replace CONST with const.
8021 * corefile.c: Likewise.
8022 * elf32-dlx.c: Likewise.
8023 * elf64-mips.c: Likewise.
8024 * mmo.c: Likewise.
8025 * ns32knetbsd.c: Likewise.
8026
8027 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Check the hash
8028 table is elf64-sparc.
8029
8030 2002-06-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8031
8032 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Simplify code.
8033 Fix RELA addends to get not shifted in the result. Don't do special
8034 handling of R_MIPS_64 for NewABI.
8035
8036 2002-06-07 Alan Modra <amodra@bigpond.net.au>
8037
8038 * aoutx.h (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
8039 (NAME(aout,slurp_reloc_table)): Likewise.
8040 * coff-mips.c (mips_relax_section): Use bfd_zalloc.
8041 * coff-rs6000.c (xcoff_write_armap_big): Use bfd_zmalloc.
8042 (xcoff_write_archive_contents_big): Likewise.
8043 (xcoff_generate_rtinit): Likewise.
8044 (xcoff_generate_rtinit): Likewise, and check error return.
8045 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
8046 * coffgen.c (coff_section_symbol): Use bfd_zalloc.
8047 (coff_get_normalized_symtab): Likewise.
8048 (coff_make_empty_symbol): Likewise.
8049 (bfd_coff_set_symbol_class): Likewise.
8050 * cofflink.c (coff_link_add_symbols): Likewise.
8051 * ecoff.c (_bfd_ecoff_make_empty_symbol): Likewise.
8052 * ecofflink.c (ecoff_write_shuffle): Use bfd_zmalloc.
8053 (bfd_ecoff_write_accumulated_debug): Likewise.
8054 * elf64-alpha.c (get_got_entry): Use bfd_zalloc.
8055 * i386linux.c (bfd_i386linux_size_dynamic_sections): Likewise.
8056 * i386lynx.c (NAME(lynx,slurp_reloc_table)): Use bfd_zmalloc.
8057 * ieee.c (do_with_relocs): Use bfd_zalloc.
8058 * m68klinux.c (bfd_m68klinux_size_dynamic_sections): Likewise.
8059 * pdp11.c (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
8060 (NAME(aout,slurp_reloc_table)): Likewise.
8061 (NAME(aout,squirt_out_relocs)): Don't memset when zalloc'd.
8062 * reloc16.c (bfd_coff_reloc16_relax_section): Use bfd_zmalloc.
8063 * som.c (som_build_and_write_symbol_table): Likewise.
8064 (som_slurp_string_table): Likewise.
8065 (som_slurp_symbol_table): Likewise.
8066 (som_bfd_ar_write_symbol_stuff): Likewise.
8067 * sparclinux.c (bfd_sparclinux_size_dynamic_sections): Use bfd_zalloc.
8068 * sunos.c (bfd_sunos_size_dynamic_sections): Likewise.
8069 * tekhex.c (find_chunk): Likewise. Get rid of unused "sname".
8070 * vms-gsd.c (_bfd_vms_slurp_gsd): Use bfd_zmalloc.
8071 * xcofflink.c (xcoff_link_add_symbols): Use bfd_zalloc/bfd_zmalloc.
8072
8073 2002-06-07 Alan Modra <amodra@bigpond.net.au>
8074
8075 * elf-bfd.h (struct bfd_elf_section_data <group_name>): Replace with
8076 "group" union.
8077 (elf_group_name): Update.
8078 (elf_group_id): Define.
8079 (bfd_elf_set_group_contents): Declare.
8080 * elf.c (elf_fake_sections): Qualify use of elf_group_name.
8081 (set_group_contents): Rename to bfd_elf_set_group_contents. Remove
8082 ATTRIBUTE_UNUSED from failedptrarg. If elf_group_id is set, use
8083 that sym for the signature.
8084 (_bfd_elf_compute_section_file_positions): Don't call
8085 set_group_contents for "ld -r" case.
8086 (swap_out_syms): Use bfd_zalloc.
8087 * elflink.h (elf_link_add_archive_symbols): Likewise.
8088 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
8089 (elf_bfd_final_link): Call bfd_elf_set_group_contents.
8090
8091 2002-06-07 Alan Modra <amodra@bigpond.net.au>
8092
8093 * elf64-ppc.c (ppc64_elf_relocate_section): Allow unresolved
8094 relocs in opd for non-shared too.
8095
8096 2002-06-06 Jeffrey Law <law@redhat.com>
8097
8098 * elf32-h8300.c (elf32_h8_relax_section): Ignore uninteresting
8099 relocations.
8100
8101 2002-06-06 Nick Clifton <nickc@cambridge.redhat.com>
8102
8103 * merge.c: Include libiberty.h.
8104 * elf-strtab.c: Include libiberty.h.
8105
8106 2002-06-06 Elias Athanasopoulos <eathan@otenet.gr>
8107
8108 * peXXigen.c (pe_print_idata): Remove unused variable.
8109
8110 2002-06-06 David Heine <dlheine@tensilica.com>
8111
8112 * elf.c (assign_file_positions_for_segments): Remove unallocated
8113 sections from the section to segment mapping for PT_LOAD segments.
8114 Update comment about empty loadable segments.
8115
8116 2002-06-06 Richard Sandiford <rsandifo@redhat.com>
8117
8118 * stabs.c (_bfd_link_section_stabs): Check that the symbol offset
8119 is within the .stabstr section.
8120
8121 2002-06-06 Alan Modra <amodra@bigpond.net.au>
8122
8123 * elf-bfd.h (struct elf_size_info <swap_symbol_in>): Function args
8124 are "const PTR", not "const PTR *".
8125 (bfd_elf32_swap_symbol_in): Likewise.
8126 (bfd_elf64_swap_symbol_in): Likewise.
8127 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR.
8128 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
8129 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
8130 (elf_link_add_object_symbols): Likewise.
8131 (elf_link_record_local_dynamic_symbol): Likewise.
8132 (elf_link_input_bfd): Likewise.
8133 (elf_gc_mark): Likewise.
8134 (elf_reloc_symbol_deleted_p): Likewise.
8135 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
8136 (mn10200_elf_relax_delete_bytes): Likewise.
8137 (mn10200_elf_symbol_address_p): Likewise.
8138 (mn10200_elf_get_relocated_section_contents): Likewise.
8139 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
8140 (mn10300_elf_relax_section): Likewise.
8141 (mn10300_elf_relax_delete_bytes): Likewise.
8142 (mn10300_elf_symbol_address_p): Likewise.
8143 (mn10300_elf_get_relocated_section_contents): Likewise.
8144 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
8145 (elf32_h8_relax_delete_bytes): Likewise.
8146 (elf32_h8_symbol_address_p): Likewise.
8147 (elf32_h8_get_relocated_section_contents): Likewise.
8148 * elf32-hppa.c (get_local_syms): Likewise.
8149 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
8150 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
8151 * elf32-sh.c (sh_elf_relax_section): Likewise.
8152 (sh_elf_relax_delete_bytes): Likewise.
8153 (sh_elf_get_relocated_section_contents): Likewise.
8154 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
8155 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
8156 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
8157 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
8158 * elf64-ppc.c (get_local_syms): Likewise.
8159 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
8160 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
8161
8162 2002-06-05 J"orn Rennecke <joern.rennecke@superh.com>
8163
8164 * config.bfd (sh64l*-*-elf*, shl*-*-elf*): New configurations.
8165
8166 2002-06-05 Alan Modra <amodra@bigpond.net.au>
8167
8168 * elf.c (group_signature): Swap in the whole symbol, and handle
8169 extracting section symbol names.
8170 (setup_group): Add comment.
8171 (set_group_contents): When called from objcopy or ld, arrange for
8172 section contents to be written. Write group member output section
8173 indices to allow objcopy to reorganize sections.
8174 (_bfd_elf_copy_private_section_data): Copy group info.
8175
8176 * elf-bfd.h (struct elf_size_info): Add swap_symbol_in field.
8177 (bfd_elf32_swap_symbol_in): Update prototype.
8178 (bfd_elf64_swap_symbol_in): Likewise.
8179 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR *.
8180 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
8181 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
8182 (elf_link_add_object_symbols): Likewise.
8183 (elf_link_record_local_dynamic_symbol): Likewise.
8184 (elf_link_input_bfd): Likewise.
8185 (elf_gc_mark): Likewise.
8186 (elf_reloc_symbol_deleted_p): Likewise.
8187 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
8188 (mn10200_elf_relax_delete_bytes): Likewise.
8189 (mn10200_elf_symbol_address_p): Likewise.
8190 (mn10200_elf_get_relocated_section_contents): Likewise.
8191 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
8192 (mn10300_elf_relax_section): Likewise.
8193 (mn10300_elf_relax_delete_bytes): Likewise.
8194 (mn10300_elf_symbol_address_p): Likewise.
8195 (mn10300_elf_get_relocated_section_contents): Likewise.
8196 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
8197 (elf32_h8_relax_delete_bytes): Likewise.
8198 (elf32_h8_symbol_address_p): Likewise.
8199 (elf32_h8_get_relocated_section_contents): Likewise.
8200 * elf32-hppa.c (get_local_syms): Likewise.
8201 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
8202 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
8203 * elf32-sh.c (sh_elf_relax_section): Likewise.
8204 (sh_elf_relax_delete_bytes): Likewise.
8205 (sh_elf_get_relocated_section_contents): Likewise.
8206 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
8207 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
8208 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
8209 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
8210 * elf64-ppc.c (get_local_syms): Likewise.
8211 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
8212 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
8213 * elfcode.h (NAME(_bfd_elf,size_info)): Update initialiser.
8214 * elf64-alpha.c (alpha_elf_size_info): Likewise.
8215 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
8216 * elf64-mips.c (mips_elf64_size_info): Likewise.
8217 * elf64-s390.c (s390_elf64_size_info): Likewise.
8218 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
8219
8220 2002-06-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
8221
8222 * elf32-mips.c (elf32_mips_ignore_discarded_relocs): Move to...
8223 elfxx-mips.c (_bfd_mips_elf_ignore_discarded_relocs): ... here.
8224 elf64-mips.c (elf_backend_ignore_discarded_relocs): Use
8225 _bfd_mips_elf_ignore_discarded_relocs.
8226 elfxx-mips.h (_bfd_mips_elf_ignore_discarded_relocs): Declare.
8227
8228 2002-06-05 H.J. Lu <hjl@gnu.org>
8229
8230 * elfxx-mips.c (mips_elf_calculate_relocation): Call
8231 _bfd_elf_rel_local_sym for STT_SECTION relocations against
8232 the SEC_MERGE section.
8233
8234 2002-06-05 Alan Modra <amodra@bigpond.net.au>
8235
8236 * coff-alpha.c: Update copyright date.
8237 * coff-mips.c: Likewise.
8238 * xcoff-target.h: Likewise.
8239
8240 * bfd-in.h: Remove "taken from the source" comment.
8241 * libbfd-in.h: Likewise.
8242 * libcoff-in.h: Likewise.
8243 * bfd-in2.h: Regenerate.
8244 * libbfd.h: Regenerate.
8245 * libcoff.h: Regenerate.
8246
8247 * elf.c (bfd_elf_discard_group): Return true.
8248 * elf-bfd.h (bfd_elf_discard_group): Declare.
8249 * bfd-in.h (bfd_elf_discard_group): Don't declare here.
8250 * section.c (bfd_discard_group): Rename to bfd_generic_discard_group.
8251 * bfd.c (bfd_discard_group): Define.
8252 * targets.c (struct bfd_target): Add _bfd_discard_group.
8253 (BFD_JUMP_TABLE_LINK): Here too.
8254 * libbfd-in.h (_bfd_nolink_bfd_discard_group): Define.
8255 * aout-adobe.c (aout_32_bfd_discard_group): Define.
8256 * aout-target.h (MY_bfd_discard_group): Define.
8257 * aout-tic30.c (MY_bfd_discard_group): Define.
8258 * binary.c (binary_bfd_discard_group): Define.
8259 * bout.c (b_out_bfd_discard_group): Define.
8260 * coff-alpha.c (_bfd_ecoff_bfd_discard_group): Define.
8261 * coffcode.h (coff_bfd_discard_group): Define.
8262 * coff-mips.c (_bfd_ecoff_bfd_discard_group): Define.
8263 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Define.
8264 * i386msdos.c (msdos_bfd_discard_group): Define.
8265 * i386os9k.c (os9k_bfd_discard_group): Define.
8266 * ieee.c (ieee_bfd_discard_group): Define.
8267 * ihex.c (ihex_bfd_discard_group): Define.
8268 * mmo.c (mmo_bfd_discard_group): Define.
8269 * nlm-target.h (nlm_bfd_discard_group): Define.
8270 * oasys.c (oasys_bfd_discard_group): Define.
8271 * ppcboot.c (ppcboot_bfd_discard_group): Define.
8272 * som.c (som_bfd_discard_group): Define.
8273 * srec.c (srec_bfd_discard_group): Define.
8274 * tekhex.c (tekhex_bfd_discard_group): Define.
8275 * versados.c (versados_bfd_discard_group): Define.
8276 * vms.c (vms_bfd_discard_group): Define.
8277 * xcoff-target.h (_bfd_xcoff_bfd_discard_group): Define.
8278 * coff64-rs6000.c (rs6000coff64_vec): Update initialiser.
8279 (aix5coff64_vec): Likewise.
8280 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Likewise.
8281
8282 2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
8283
8284 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-com.lo.
8285 (BFD32_BACKENDS_CFILES): Add elf32-sh64-com.c.
8286 (elf32-sh64-com.lo): New dependency list.
8287 * Makefile.in: Regenerate.
8288 * configure.in (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec)
8289 (bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec): Add
8290 elf32-sh64-com.lo.
8291 * configure: Regenerate.
8292 * elf32-sh64.c (sh64_address_in_cranges)
8293 (sh64_get_contents_type, sh64_address_is_shmedia): Move to...
8294 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb):
8295 (crange_bsearch_cmpl): Prepend _bfd_sh64_ to name and move to...
8296 * elf32-sh64-com.c: ...here. New file.
8297
8298 2002-06-04 Alan Modra <amodra@bigpond.net.au>
8299
8300 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Remove
8301 ATTRIBUTE_UNUSED on used params.
8302 * elf32-vax.c (elf_vax_gc_mark_hook): Remove unnecessary checks
8303 before calling bfd_section_from_elf_index on local syms.
8304 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
8305
8306 2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
8307
8308 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-nbsd.lo.
8309 (BFD32_BACKENDS_CFILES): Add elf32-sh64-nbsd.c.
8310 (BFD64_BACKENDS): Add elf64-sh64-nbsd.lo.
8311 (BFD64_BACKENDS_CFILES): Add elf64-sh64-nbsd.c.
8312 (elf32-sh64-nbsd.lo, elf64-sh64-nbsd.lo): New rules.
8313 * Makefile.in: Regenerate.
8314 * config.bfd (sh5le-*-netbsd*, sh5-*-netbsd*, sh64le-*-netbsd*)
8315 (sh64-*-netbsd*): New targets.
8316 * configure.in: Add bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec,
8317 bfd_elf64_sh64nbsd_vec, and bfd_elf64_sh64lnbsd_vec.
8318 * configure: Regenerate.
8319 * elf32-sh64-nbsd.c: New file.
8320 * elf64-sh64-nbsd.c: New file.
8321 * targets.c: Add extern decls for bfd_elf32_sh64nbsd_vec,
8322 bfd_elf32_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec, and
8323 bfd_elf64_sh64lnbsd_vec.
8324
8325 2002-06-04 Alan Modra <amodra@bigpond.net.au>
8326
8327 * elf.c (setup_group): Set SEC_LINK_ONCE on GRP_COMDAT groups.
8328 (bfd_section_from_shdr): Likewise. Set section name of group
8329 sections from signature.
8330 (group_signature): Split out from setup_group. Ensure symbol table
8331 is available.
8332 (bfd_elf_discard_group): New function.
8333 (_bfd_elf_make_section_from_shdr): Don't set SEC_LINK_ONCE on
8334 .gnu.linkonce* sections if they are members of a group.
8335 (set_group_contents): Set GRP_COMDAT flag.
8336 * section.c (bfd_discard_group): New function.
8337 * bfd-in.h (bfd_elf_discard_group): Declare.
8338 * bfd-in2.h: Regenerate.
8339 * elf-bfd.h (struct bfd_elf_section_data): Add linkonce_p field.
8340 (elf_linkonce_p): Define.
8341
8342 2002-06-04 Alan Modra <amodra@bigpond.net.au>
8343
8344 * elf.c (bfd_section_from_shdr): Make "name" const.
8345 * elf-bfd.h (elf_backend_section_from_shdr): Likewise.
8346 * elf32-i370.c (i370_elf_section_from_shdr): Likewise.
8347 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
8348 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
8349 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
8350 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
8351 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
8352 * elf64-ppc.c (ppc64_elf_section_from_shdr): Likewise.
8353 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
8354 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
8355 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
8356
8357 2002-06-03 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
8358
8359 * elfxx-mips.c (ABI_64_P): Use backend's data to determine the
8360 ABI.
8361
8362 2002-06-02 Kazu Hirata <kazu@cs.umass.edu>
8363
8364 * elf32-arc.c: Fix formatting.
8365 * elf32-arm.h: Likewise.
8366 * elf32-cris.c: Likewise.
8367 * elf32-dlx.c: Likewise.
8368 * elf32-hppa.c: Likewise.
8369 * elf32-i386.c: Likewise.
8370 * elf32-i386qnx.c: Likewise.
8371 * elf32-or32.c: Likewise.
8372 * elf32-s390.c: Likewise.
8373 * elf32-sh64.c: Likewise.
8374 * elf32-vax.c: Likewise.
8375 * elf32-xstormy16.c: Likewise.
8376 * elf64-alpha.c: Likewise.
8377 * elf64-mmix.c: Likewise.
8378 * elf64-ppc.c: Likewise.
8379 * elf64-s390.c: Likewise.
8380 * elf64-sh64.c: Likewise.
8381 * elf64-x86-64.c: Likewise.
8382
8383 2002-06-02 Richard Henderson <rth@redhat.com>
8384
8385 * elf64-alpha.c (elf64_alpha_relocate_section): Don't dereference
8386 null when there are no got entries for a symbol.
8387 (elf64_alpha_relax_find_tls_segment): Rearrange to avoid
8388 uninitialized variable warning.
8389
8390 2002-06-01 Richard Henderson <rth@redhat.com>
8391
8392 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Don't test for
8393 undefined symbols here.
8394 (elf64_alpha_relax_section): Do it here. Also test for not
8395 defined in the current module.
8396 (elf64_alpha_relocate_section_r): Split out of ...
8397 (elf64_alpha_relocate_section): ... here. Don't dereference
8398 NULL when looking up local got entries.
8399
8400 2002-06-01 Richard Henderson <rth@redhat.com>
8401
8402 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Reject undefined
8403 symbols from JSR relaxation.
8404 (elf64_alpha_size_plt_section_1): New.
8405 (elf64_alpha_calc_dynrel_sizes): Split out .rela.got bits ...
8406 (elf64_alpha_size_rela_got_1): ... here.
8407 (elf64_alpha_size_dynamic_sections): Split out .rela.got bits ...
8408 (elf64_alpha_size_rela_got_section): ... here.
8409 (elf64_alpha_size_plt_section): New.
8410 (elf64_alpha_relax_section): Call them.
8411 (elf64_alpha_size_got_sections): Remove output_bfd arg.
8412 (elf64_alpha_finish_dynamic_symbol): Check gotent use_count.
8413
8414 2002-06-01 Richard Henderson <rth@redhat.com>
8415
8416 * elf64-alpha.c (alpha_get_dtprel_base, alpha_get_tprel_base): New.
8417 (elf64_alpha_relocate_section): Use them. Reject LE TLS relocs
8418 in shared libraries. Fix DTPRELHI and TPRELHI value.
8419 (INSN_ADDQ, INSN_RDUNIQ): New.
8420 (struct alpha_relax_info): Add symtab_hdr, tls_segment, first_gotent.
8421 (elf64_alpha_relax_with_lituse): Return boolean. Remove irelend
8422 argument. Reject dynamic symbols. Use LITUSE symbolic constants.
8423 (elf64_alpha_relax_got_load): Rename from relax_without_lituse.
8424 Handle GOTDTPREL and GOTTPREL relocations.
8425 (elf64_alpha_relax_gprelhilo): New.
8426 (elf64_alpha_relax_tls_get_addr): New.
8427 (elf64_alpha_relax_find_tls_segment): New.
8428 (elf64_alpha_relax_section): Handle TLS relocations.
8429 (ALPHA_ELF_LINK_HASH_TLS_IE): New.
8430 (elf64_alpha_check_relocs): Set it.
8431
8432 2002-06-01 Richard Henderson <rth@redhat.com>
8433
8434 * elf64-alpha.c (elf64_alpha_relax_section): Don't store computed gp.
8435
8436 * elf64-alpha.c (elf64_alpha_check_relocs): Fix typo on maybe_dynamic
8437 check; don't suppress dynamic relocs for non-allocated sections.
8438
8439 * elf64-alpha.c: Remove dead code.
8440
8441 2002-05-31 Alan Modra <amodra@bigpond.net.au>
8442
8443 * bfd-in2.h: Regenerate.
8444 * libbfd.h: Regenerate.
8445 * po/SRC-POTFILES.in: Regenerate.
8446
8447 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate
8448 space for bss .plt.
8449
8450 2002-05-31 Graeme Peterson <gp@qnx.com>
8451
8452 * Makefile.am (BFD32_BACKENDS): Add elf32-i386qnx.lo.
8453 (BFD32_BACKENDS_CFILES): Add elf32-i386qnx.c.
8454 Run "make dep-am".
8455 * Makefile.in: Regenerate.
8456 * config.bfd: Add i[3456]86-*-nto-qnx* support.
8457 * configure.in: Add bfd_elf32_i386qnx_vec support.
8458 * configure: Regenerate.
8459 * elf-bfd.h (struct elf_backend_data): Add set_nonloadable_filepos,
8460 is_contained_by_filepos, and copy_private_bfd_data_p.
8461 * elf.c (assign_file_positions_for_segments): Call backend
8462 set_nonloadable_filepos. Fix non-K&R call to _bfd_error_handler.
8463 (IS_CONTAINED_BY_FILEPOS): Define.
8464 (INCLUDE_SECTION_IN_SEGMENT): Also test IS_CONTAINED_BY_FILEPOS.
8465 (copy_private_bfd_data): Use IS_CONTAINED_BY_FILEPOS. Typo fix.
8466 Fix non-K&R call to _bfd_error_handler.
8467 (_bfd_elf_copy_private_section_data): Use backend
8468 copy_private_bfd_data_p.
8469 * elf32-i386.c: Don't include elfxx-target.h when
8470 ELF32_I386_C_INCLUDED is defined.
8471 * elf32-i386qnx.c: New QNX elf backend file.
8472 * elfxx-target.h: Add elf_backend_set_nonloadable_filepos,
8473 elf_backend_is_contained_by_filepos, and
8474 elf_backend_do_copy_private_bfd_data.
8475 * targets.c: Add bfd_target bfd_elf32_i386qnx_vec.
8476
8477 2002-05-31 Alan Modra <amodra@bigpond.net.au>
8478
8479 * elfarm-oabi.c (bfd_elf32_arm_add_glue_sections_to_bfd): Define.
8480 Move other similar defines to start of file.
8481
8482 2002-05-30 Tom Rix <trix@redhat.com>
8483
8484 * coff-rs6000.c (xcoff_rtype2howto): Handle 16 bit R_RBA.
8485 * coff64-rs6000.c (xcoff64_rtype2howto): Same.
8486
8487 2002-05-30 Richard Henderson <rth@redhat.com>
8488
8489 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_TLSGD,
8490 ALPHA_ELF_LINK_HASH_LU_TLSLDM, ALPHA_ELF_LINK_HASH_LU_FUNC): New.
8491 (ALPHA_ELF_GOT_ENTRY_RELOCS_DONE): Remove.
8492 (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Remove.
8493 (struct alpha_elf_got_entry): Add reloc_type, reloc_done, reloc_xlated.
8494 (struct alpha_elf_obj_tdata): Rename total_got_entries and
8495 n_local_got_entries to total_got_size and local_got_size.
8496 (elf64_alpha_howto, elf64_alpha_reloc_map): Update for TLS relocs.
8497 (alpha_got_entry_size): New.
8498 (elf64_alpha_relax_with_lituse): Use it.
8499 (elf64_alpha_relax_without_lituse): Likewise.
8500 (MAX_GOT_SIZE): Rename from MAX_GOT_ENTRIES.
8501 (get_got_entry): New.
8502 (elf64_alpha_check_relocs): Handle TLS relocs. Reorganize.
8503 (elf64_alpha_adjust_dynamic_symbol): Test LU_FUNC as a mask.
8504 (elf64_alpha_merge_ind_symbols): Check gotent->reloc_type.
8505 (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots): Likewise.
8506 (elf64_alpha_calc_got_offsets_for_symbol): Use alpha_got_entry_size.
8507 (elf64_alpha_calc_got_offsets): Likewise.
8508 (alpha_dynamic_entries_for_reloc): New.
8509 (elf64_alpha_calc_dynrel_sizes): Use it.
8510 (elf64_alpha_size_dynamic_sections): Likewise.
8511 (elf64_alpha_relocate_section): Handle TLS relocations.
8512 * reloc.c: Add Alpha TLS relocations.
8513 * bfd-in2.h, libbfd.h: Rebuild.
8514
8515 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
8516
8517 * peXXigen.c (pe_print_idata): Remove double printed
8518 import table lines; add Bound-To comment.
8519
8520 2002-05-29 Matt Thomas <matt@3am-software.com>
8521
8522 * Makefile.am (BFD32_BACKENDS): Add elf32-vax.lo.
8523 (BFD32_BACKENDS_CFILES): Add elf32-vax.c.
8524 (elf32-vax.lo): New rule.
8525 * Makefile.in: Regenerate.
8526 * configure.in (bfd_elf32_vax_vec)
8527 (vaxnetbsd_vec): New vectors.
8528 * configure: Regenerate.
8529 * config.bfd (vax-*-netbsdelf*)
8530 (vax-*-netbsdaout*)
8531 (vax-*-netbsd*): New targets.
8532 * elf32-vax.c: New file.
8533 * reloc.c: Add VAX relocations.
8534 * bfd-in2.h: Regenerate.
8535 * targets.c (_bfd_target_vector): Add bfd_elf32_vax_vec.
8536
8537 2002-05-29 Jason Thorpe <thorpej@wasabisystems.com>
8538
8539 * config.bfd (arm-*-netbsd*): Add bfd_elf32_littlearm_vec
8540 and bfd_elf32_bigarm_vec to targ_selvecs.
8541
8542 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
8543
8544 * peXXigen.c (pe_print_idata): Fix seg faults on printing import tables
8545 with auto-imported symbols.
8546
8547 2002-05-29 Adam Nemet <anemet@lnxw.com>
8548
8549 * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Don't add glue
8550 sections only record bfd.
8551 (bfd_elf32_arm_add_glue_sections_to_bfd): New function.
8552 * bfd-in.h (bfd_elf32_arm_add_glue_sections_to_bfd): Declare it.
8553 * bfd-in2.h: Regenerate.
8554
8555 2002-05-28 Nick Clifton <nickc@cambridge.redhat.com>
8556
8557 * syms.c (_bfd_stab_section_find_nearest_line): Move
8558 declaration and initialisation of saw_line and saw_func out of
8559 for loop.
8560
8561 2002-05-29 Alan Modra <amodra@bigpond.net.au>
8562
8563 * elf64-ppc.c (ppc64_elf_get_symbol_info): New function.
8564 (bfd_elf64_get_symbol_info): Define.
8565 * elfxx-target.h (bfd_elfNN_get_symbol_info): Only define if undef.
8566
8567 2002-05-29 Andrey Volkov <avolkov@transas.com>
8568
8569 * cpu-h8300.c: Make default h8300 machine first in machine list.
8570
8571 2002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net>
8572
8573 * config.bfd: Added DLX configuraton.
8574 * Makefile.am: Added DLX configuraton.
8575 * configure.in: Added DLX configuraton.
8576 * archures.c: Add DLX architecture.
8577 * reloc.c: Add DLX relocs.
8578 * targets.c: Added DLX target vector.
8579 * configure: Regenerate.
8580 * Makefile.in: Regenreate.
8581 * bfd-in2.h: Regenreate.
8582 * elf32-dlx.c: New file: Support DLX target.
8583 * cpu-dlx.c: New file: Support DLX target.
8584
8585 2002-05-25 Alan Modra <amodra@bigpond.net.au>
8586
8587 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Formatting.
8588
8589 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Revert last change.
8590 (ppc64_elf_check_relocs): Don't set up function descriptor symbol
8591 strings to point inside function code sym string.
8592 (func_desc_adjust): Likewise.
8593 (ppc64_elf_hide_symbol): Rewrite code to look up function code sym.
8594
8595 2002-05-24 Michal Ludvig <mludvig@suse.cz>
8596
8597 * elf64-x86-64.c (elf64_x86_64_grok_prstatus): Added.
8598 (elf64_x86_64_grok_psinfo): Added.
8599
8600 2002-05-24 TAMURA Kent <kent@netbsd.org>
8601
8602 * config.bfd: Add a target for i386-netbsdpe.
8603
8604 2002-05-24 Alan Modra <amodra@bigpond.net.au>
8605
8606 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy is_func
8607 and is_func_descriptor.
8608 (func_desc_adjust): Hide function code sym in shared libs unless
8609 there is a matching exported function descriptor sym.
8610
8611 2002-05-23 Jakub Jelinek <jakub@redhat.com>
8612
8613 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_THREAD_LOCAL
8614 for symbols from SHF_TLS section.
8615 (_bfd_elf_print_private_bfd_data): Add PT_TLS.
8616 (elf_fake_sections): Set SHF_TLS for SEC_THREAD_LOCAL sections.
8617 (map_sections_to_segments): Build PT_TLS segment if necessary.
8618 (assign_file_positions_for_segments): Likewise.
8619 (get_program_header_size): Account for PT_TLS segment.
8620 (swap_out_syms): Set type of BSF_THREAD_LOCAL symbols and symbols from
8621 SEC_THREAD_LOCAL sections to STT_TLS.
8622 * reloc.c: Add 386 and IA-64 TLS relocs.
8623 * section.c (SEC_THREAD_LOCAL): Define.
8624 (SEC_CONSTRUCTOR_TEXT, SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS):
8625 Remove.
8626 * elflink.h (elf_link_add_object_symbols): Support .tcommon.
8627 (size_dynamic_sections): If DF_STATIC_TLS, set DF_FLAGS
8628 unconditionally.
8629 (struct elf_final_link_info): Add first_tls_sec.
8630 (elf_bfd_final_link): Set first_tls_sec.
8631 Compute elf_hash_table (info)->tls_segment.
8632 (elf_link_output_extsym): Handle STT_TLS symbols.
8633 (elf_link_input_bfd): Likewise.
8634 * syms.c (BSF_THREAD_LOCAL): Define.
8635 * bfd-in2.h: Rebuilt.
8636 * libbfd.h: Rebuilt.
8637 * elf32-i386.c (elf_i386_tls_transition, dtpoff_base, tpoff,
8638 elf_i386_mkobject, elf_i386_object_p): New functions.
8639 (elf_howto_table): Add TLS relocs.
8640 (elf_i386_reloc_type_lookup): Support TLS relocs.
8641 (elf_i386_info_to_howto_rel): Likewise.
8642 (struct elf_i386_link_hash_entry): Add tls_type.
8643 (struct elf_i386_obj_tdata): New.
8644 (elf_i386_hash_entry, elf_i386_tdata, elf_i386_local_got_tls_type):
8645 New macros.
8646 (struct elf_i386_link_hash_table): Add tls_ldm_got.
8647 (link_hash_newfunc): Clear tls_type.
8648 (elf_i386_check_relocs): Support TLS relocs.
8649 (elf_i386_gc_sweep_hook): Likewise.
8650 (allocate_dynrelocs): Likewise.
8651 (elf_i386_size_dynamic_sections): Likewise.
8652 (elf_i386_relocate_section): Likewise.
8653 (elf_i386_finish_dynamic_symbol): Likewise.
8654 (bfd_elf32_mkobject, elf_backend_object_p): Define.
8655 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add tprel_offset,
8656 dtpmod_offset, dtprel_offset, tprel_done, dtpmod_done, dtprel_done,
8657 want_tprel, want_dtpmod, want_dtprel.
8658 (elfNN_ia64_tprel_base, elfNN_ia64_dtprel_base): New functions.
8659 (ia64_howto_table): Add TLS relocs, rename R_IA64_LTOFF_TP22 to
8660 R_IA64_LTOFF_TPREL22.
8661 (elf_code_to_howto_index): Add TLS relocs.
8662 (elfNN_ia64_check_relocs): Support TLS relocs.
8663 (allocate_global_data_got): Account for TLS .got data.
8664 (allocate_dynrel_entries): Account for TLS dynamic relocations.
8665 (elfNN_ia64_install_value): Supprt TLS relocs.
8666 (set_got_entry): Support TLS relocs.
8667 (elfNN_ia64_relocate_section): Likewise.
8668
8669 2002-05-23 Nick Clifton <nickc@cambridge.redhat.com>
8670
8671 * elf32-arm.h (elf32_arm_final_link_relocate): For the Thumb
8672 BLX reloc round the relocation up rather than down.
8673 * coff-arm.c (coff_arm_relocate_section): Likewise.
8674
8675 2002-05-21 H.J. Lu (hjl@gnu.org)
8676
8677 * linker.c (_bfd_generic_link_add_one_symbol): Allow multiple
8678 definition.
8679
8680 2002-05-22 Alan Modra <amodra@bigpond.net.au>
8681
8682 * elf64-ppc.c (ppc64_elf_size_stubs): Don't strip .branch_lt.
8683 (ppc64_elf_relocate_section): Handle unresolved relocs in opd.
8684
8685 2002-05-22 Alan Modra <amodra@bigpond.net.au>
8686
8687 * elf64-ppc.c (ppc64_elf_relocate_section): Return false for
8688 unresolved relocs.
8689 (ppc64_elf_size_dynamic_sections): Check for splt NULL.
8690
8691 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8692
8693 * bfd.c (bfd_get_arch_size): Remove bfd_set_error call for
8694 non-ELF targets.
8695
8696 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8697
8698 * elf-bfd.h (elf_backend_emit_relocs): Change prototype to return
8699 an error value.
8700 * elflink.h (elf_link_output_relocs): Likewise. Improve error message.
8701 return with false on error.
8702 (elf_link_input_bfd): Check reloc_emitter return value.
8703
8704 2002-05-21 Jason Thorpe <thorpej@wasabisystems.com>
8705
8706 * config.bfd (armeb-*-netbsdelf*): New target.
8707
8708 2002-05-20 Alan Modra <amodra@bigpond.net.au>
8709
8710 * elf64-ppc.c (ppc_build_one_stub): Point undefined function syms
8711 at the plt call stub.
8712
8713 2002-05-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8714
8715 * cpu-mips.c (mips_compatible): Don't try to check machine
8716 compatibility.
8717
8718 2002-05-18 Tom Rix <trix@redhat.com>
8719
8720 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_out): Fix C_FILE auxent.
8721
8722 2002-05-17 Alan Modra <amodra@bigpond.net.au>
8723
8724 * elf64-ppc.c (ppc64_elf_info_to_howto): Formatting.
8725 (ppc64_elf_relocate_section): Don't warn about reloc overflow when
8726 we've already warned about an undefined symbol. Report more
8727 detail on reloc errors.
8728
8729 2002-05-17 Alan Modra <amodra@bigpond.net.au>
8730
8731 * acinclude.m4 (AM_INSTALL_LIBBFD): New.
8732 * configure.in: Invoke AM_INSTALL_LIBBFD.
8733 * Makefile.am (install-data-local): Revert 2002-05-13. Move to..
8734 (install_libbfd): .. New target.
8735 (uninstall_libbfd): Likewise.
8736 (install-bfdlibLTLIBRARIES): Likewise.
8737 (uninstall-bfdlibLTLIBRARIES): Likewise.
8738 (bfdlibdir): New.
8739 (bfdincludedir): New.
8740 (lib_LTLIBRARIES): Rename to bfdlib_LTLIBRARIES.
8741 * aclocal.m4: Regenerate.
8742 * configure: Regenerate.
8743 * Makefile.in: Regenerate.
8744
8745 2002-05-17 Stuart Balfour <sbalfour@cisco.com>
8746
8747 * hash.c (bfd_hash_lookup): Remove computation of len from inside
8748 hash loop.
8749
8750 2002-05-16 Nick Clifton <nickc@cambridge.redhat.com>
8751
8752 * config.bfd: Add targets for sh64-linux (little endian and
8753 big endian).
8754
8755 2002-05-15 Laurent Pinchart <laurent.pinchart@skynet.be>
8756
8757 * peXXigen.c (pe_print_idata): Do not assume that the first thunk
8758 is located in the same section as the import table. Instead
8759 check, and if necessary load the section containing the thunk.
8760
8761 2002-05-15 Nick Clifton <nickc@cambridge.redhat.com>
8762
8763 * aix5ppc-core.c (xcoff64_core_p): Replace bfd_read with
8764 bfd_bread.
8765 (xcoff64_core_file_matches_executable_p): Replace bfd_read
8766 with bfd_bread.
8767
8768 2002-05-15 Alan Modra <amodra@bigpond.net.au>
8769
8770 * aix5ppc-core.c: Warning fixes.
8771 * aout-adobe.c (aout_32_bfd_link_just_syms): Define.
8772 * aout-target.h (MY_bfd_link_just_syms): Define.
8773 * aout-tic30.c (MY_bfd_link_just_syms): Define.
8774 * bfd.c (bfd_link_just_syms): Define.
8775 * binary.c (binary_bfd_link_just_syms): Define.
8776 * bout.c (b_out_bfd_link_just_syms): Define.
8777 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update initializer.
8778 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
8779 * coffcode.h (coff_bfd_link_just_syms): Define.
8780 * elf-bfd.h (enum elf_link_info_type): Add ELF_INFO_TYPE_JUST_SYMS.
8781 (elf_discarded_section): Check for ELF_INFO_TYPE_JUST_SYMS.
8782 (_bfd_elf_link_just_syms): Declare.
8783 * elf.c (_bfd_elf_link_just_syms): New function.
8784 * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Check that
8785 sections haven't already been discarded by the linker.
8786 * elflink.h (elf_link_add_object_symbols): Likewise for stab
8787 sections and SEC_MERGE sections.
8788 (elf_bfd_discard_info): Similarly here.
8789 * elfxx-target.h (bfd_elfNN_bfd_link_just_syms): Define.
8790 * i386msdos.c (msdos_bfd_link_just_syms): Define.
8791 * i386os9k.c (os9k_bfd_link_just_syms): Define.
8792 * ieee.c (ieee_bfd_link_just_syms): Define.
8793 * ihex.c (ihex_bfd_link_just_syms): Define.
8794 * libbfd-in.h (_bfd_nolink_bfd_link_just_syms): Define.
8795 (_bfd_generic_link_just_syms): Declare.
8796 * libecoff.h (_bfd_ecoff_bfd_link_just_syms): Define.
8797 * linker.c (_bfd_generic_link_just_syms): New function.
8798 * mmo.c (mmo_bfd_link_just_syms): Define.
8799 * nlm-target.h (nlm_bfd_link_just_syms): Define.
8800 * oasys.c (oasys_bfd_link_just_syms): Define.
8801 * ppcboot.c (ppcboot_bfd_link_just_syms): Define.
8802 * som.c (som_bfd_link_just_syms): Define.
8803 * srec.c (srec_bfd_link_just_syms): Define.
8804 * targets.c (struct bfd_target): Add _bfd_link_just_syms.
8805 (BFD_JUMP_TABLE_LINK): And here.
8806 * tekhex.c (tekhex_bfd_link_just_syms): Define.
8807 * versados.c (versados_bfd_link_just_syms): Define.
8808 * vms.c (vms_bfd_link_just_syms): Define.
8809 * libbfd.h: Regenerate.
8810 * bfd-in2.h: Regenerate.
8811
8812 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8813
8814 * elf32-mips.c: Remove superfluous definitions copied from
8815 elfxx-mips.c.
8816 (bfd_elf32_bigmips_vec,bfd_elf32_littlemips_vec): Use the
8817 SGIish vectors to check the special case.
8818 (mips_elf_hi16_reloc): Fix comment.
8819 (mips_elf_got16_reloc): Likewise.
8820 (_bfd_mips_elf32_gprel16_reloc): Likewise.
8821 (elf_reloc_map): Code cleanup.
8822 (mips_reloc_map): Add comment.
8823 (bfd_elf23_bfd_reloc_type_lookup): Code cleanup.
8824 (mips_elf32_rtype_to_howto): Likewise.
8825 (mips_elf32_discard_info): Likewise.
8826 (elf32_mips_irix_compat): Invert logic: Only SGIish vectors
8827 lead to IRIX compatibility now.
8828
8829 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8830
8831 * elfxx-mips.c: Call it IRIX, not Irix in comments.
8832
8833 2002-05-13 Jason Thorpe <thorpej@wasabisystems.com>
8834
8835 * config.bfd (shle-*-netbsdelf*): Add target which includes
8836 sh64 support.
8837
8838 2002-05-13 David Edelsohn <edelsohn@gnu.org>
8839
8840 * configure.in: Revert 2002-04-07. Instead, auto-configure
8841 HAVE_ST_C_IMPL.
8842 * configure: Regenerate.
8843 * config.in: Regenerate.
8844 * rs6000-core.c (CNEW_IMPL): Guard use of c_impl with HAVE_ST_C_IMPL
8845 or AIX_5_CORE.
8846
8847 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
8848
8849 * configure.in (sparc*-*-openbsd*): Support sparc64-openbsd
8850 corefiles as well.2
8851 * configure: Regenerate.
8852
8853 2002-05-13 Alan Modra <amodra@bigpond.net.au>
8854
8855 * Makefile.am (install-data-local): Install headers to
8856 $(exec_prefix)/include.
8857 * Makefile.in: Regenerate.
8858
8859 2002-05-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
8860 Daniel Jacobowitz <drow@mvista.com>
8861
8862 * coff-sh.c (sh_reloc_map): Map to R_SH_IMM32 for non-PE. Don't
8863 map BFD_RELOC_RVA.
8864
8865 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
8866
8867 * config.bfd (alpha*-*-openbsd*, sparc64*-*-openbsd*,
8868 hppa*-*-openbsd*): New targets.
8869 * configure.in (alpha*-*-openbsd*): Set COREFILE.
8870 * configure: Regenerate.
8871
8872 2002-05-10 Tom Rix <trix@redhat.com>
8873
8874 * coff64-rs6000.c (xcoff64_reloc_type_br): New function for
8875 xcoff64_ppc_relocate_section.
8876 * coff-rs6000.c : Extern common xcoff_reloc_type functions.
8877 * libxcoff.h: Common xcoff_reloc_type function declaration.
8878
8879 2002-05-10 Alan Modra <amodra@bigpond.net.au>
8880
8881 * elf32-i386.c (elf_i386_relocate_section): Remove overflow checks
8882 added in 2002-05-09 commit.
8883
8884 * elf32-hppa.c (elf32_hppa_size_stubs): Revert part of 2002-05-04,
8885 don't look for stubs on all undefined syms.
8886
8887 2002-05-09 Alan Modra <amodra@bigpond.net.au>
8888
8889 * elf64-ppc.c (RA_REGISTER_MASK, RA_REGISTER_SHIFT): Delete.
8890 (ppc64_elf_howto_raw <R_PPC64_RELATIVE>): Not pc_relative or
8891 pcrel_offset.
8892
8893 * elf32-i386.c (elf_howto_table): Comments.
8894 (elf_i386_relocate_section): Handle more relocs for relocatable
8895 linking and against SEC_MERGE sections.
8896
8897 2002-05-08 Alan Modra <amodra@bigpond.net.au>
8898
8899 * elf32-ppc.c (ppc_elf_create_got): New function.
8900 (ppc_elf_create_dynamic_sections): Call ppc_elf_create_got before
8901 _bfd_elf_create_dynamic_sections. Correct .plt flags.
8902 (ppc_elf_check_relocs): Use ppc_elf_create_got in place of
8903 _bfd_elf_create_got_section.
8904
8905 2002-05-07 Alan Modra <amodra@bigpond.net.au>
8906
8907 * elf-bfd.h (struct elf_backend_data): Add rela_normal.
8908 * elfxx-target.h (elf_backend_rela_normal): Define.
8909 (elfNN_bed): Init rela_normal.
8910 * elflink.h (elf_link_input_bfd <emit_relocs>): Handle adjustment
8911 for section symbols here if rela_normal. Simplify abs section test.
8912 * elf-m10200.c (mn10200_elf_relocate_section): If relocatable,
8913 return immediately. Remove code handling relocatable linking.
8914 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
8915 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
8916 * elf32-i370.c (i370_elf_relocate_section): Likewise.
8917 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
8918 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
8919 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
8920 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
8921 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
8922 * elf32-s390.c (elf_s390_relocate_section): Likewise.
8923 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
8924 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
8925 * elf64-s390.c (elf_s390_relocate_section): Likewise.
8926 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
8927 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
8928 * elf32-arm.h (elf32_arm_relocate_section): Likewise #ifndef USE_REL.
8929 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
8930 * elf-m10200.c (elf_backend_rela_normal): Define.
8931 * elf-m10300.c (elf_backend_rela_normal): Define.
8932 * elf32-fr30.c (elf_backend_rela_normal): Define.
8933 * elf32-i370.c (elf_backend_rela_normal): Define.
8934 * elf32-i860.c (elf_backend_rela_normal): Define.
8935 * elf32-m68k.c (elf_backend_rela_normal): Define.
8936 * elf32-mcore.c (elf_backend_rela_normal): Define.
8937 * elf32-openrisc.c (elf_backend_rela_normal): Define.
8938 * elf32-ppc.c (elf_backend_rela_normal): Define.
8939 * elf32-s390.c (elf_backend_rela_normal): Define.
8940 * elf32-xstormy16.c (elf_backend_rela_normal): Define.
8941 * elf64-ppc.c (elf_backend_rela_normal): Define.
8942 * elf64-s390.c (elf_backend_rela_normal): Define.
8943 * elf64-x86-64.c (elf_backend_rela_normal): Define.
8944 * elfxx-ia64.c (elf_backend_rela_normal): Define.
8945 * elf32-arm.h (elf_backend_rela_normal): Define #ifndef USE_REL.
8946 * elf32-m32r.c (elf_backend_rela_normal): Likewise.
8947
8948 2002-05-06 Nick Clifton <nickc@cambridge.redhat.com>
8949
8950 * elf32-arm.h (elf32_arm_final_link_relocate): Convert
8951 'reloc_signed_max' and 'reloc_signed_min' into half-word offsets.
8952
8953 2002-05-06 Alan Modra <amodra@bigpond.net.au>
8954
8955 * elflink.h (elf_link_input_bfd <emit_relocs>): Adjust r_offset
8956 when not relocatable. Fix reloc_emitter call for K&R.
8957
8958 2002-05-04 Alan Modra <amodra@bigpond.net.au>
8959
8960 * elf64-ppc.c (ppc64_elf_relocate_section): Reinstate code
8961 reloading local sym addend mistakenly removed in 2002-05-01 change.
8962
8963 * dwarf2.c (struct line_head): Make prologue_length a bfd_vma.
8964 (read_abbrevs): Change "offset" param to bfd_vma.
8965 (parse_comp_unit): Change "version" and addr_size to unsigned ints.
8966 Change "abbrev_offset" to bfd_vma.
8967 (read_indirect_string): Use correct conversion chars in error
8968 message format string, cast bfd_vma's to unsigned long.
8969 (read_abbrevs): Likewise.
8970 (read_attribute_value): Likewise.
8971 (decode_line_info): Likewise.
8972 (scan_unit_for_functions): Likewise.
8973 (parse_comp_unit): Likewise.
8974
8975 2002-05-04 Tom Rix <trix@redhat.com>
8976
8977 * coffswap.h (coff_swap_reloc_in): Remove XCOFF support.
8978 (coff_swap_reloc_out): Same.
8979 * coff-rs6000.c: (xcoff_swap_reloc_in): Moved from coffswap.h.
8980 (xcoff_swap_reloc_out): Same.
8981 (xcoff_rtype2howto): Renamed from _bfd_xcoff_rtype2howto. Special
8982 case some 16 bit relocs. Add reloc value to output.
8983 (xcoff_howto_table): Remove 64 bit R_POS, add 16 bit
8984 R_RBR. Improve names.
8985 (_bfd_xcoff_reloc_type_lookup): Adjust for removal of 64 bit R_POS.
8986 (bfd_xcoff_backend_data): Update with new reloc swap names.
8987 (bfd_pmac_xcoff_backend_data) : Same.
8988 * coff64-rs6000.c: (xcoff64_swap_reloc_in): Moved from coffswap.h.
8989 (xcoff64_swap_reloc_out): Same.
8990 (xcoff64_rtype2howto): Special case some 16 bit relocs and 32 bit
8991 R_POS. Add reloc value to output.
8992 (xcoff64_howto_table): Move 64 bit R_POS to first entry. Add 16
8993 bit R_RBR. Improve names, masks.
8994 (xcoff64_reloc_type_lookup): Adjust for move of 64 bit R_POS.
8995 (bfd_xcoff_backend_data): Update with new reloc swap names.
8996 (bfd_xcoff_aix5_backend_data) : Same.
8997
8998 2002-05-04 Alan Modra <amodra@bigpond.net.au>
8999
9000 * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add
9001 bfd_count top_index, input_list, all_local_syms.
9002 (elf32_hppa_setup_section_lists): New function, split from
9003 elf32_hppa_size_stubs.
9004 (elf32_hppa_next_input_section): Likewise.
9005 (group_sections): Likewise.
9006 (get_local_syms): Likewise.
9007 (elf32_hppa_size_stubs): Adjust for split out functions. Look for
9008 stubs on undefined syms too.
9009 (elf32_hppa_set_gp): Use bfd_link_hash* instead of elf_link_hash*.
9010 Only access htab elf fields when we have an elf hash table.
9011 * elf32-hppa.h (elf32_hppa_setup_section_lists): Declare.
9012 (elf32_hppa_next_input_section): Declare.
9013
9014 2002-05-04 Bob Byrnes <byrnes@curl.com>
9015
9016 * opncls.c (_bfd_new_bfd_contained_in): Check return value of
9017 _bfd_new_bfd.
9018
9019 2002-05-03 H.J. Lu (hjl@gnu.org)
9020
9021 * elfxx-mips.c (mips_elf_link_hash_entry): Add forced_local.
9022 (mips_elf_link_hash_newfunc): Initialize forced_local to false.
9023 (mips_elf_record_global_got_symbol): Call _bfd_mips_elf_hide_symbol
9024 to hide a global symbol.
9025 (_bfd_mips_elf_hide_symbol): Return if forced_local is true. Set
9026 forced_local to true.
9027
9028 2002-05-02 Richard Henderson <rth@redhat.com>
9029
9030 * elf64-alpha.c (elf64_alpha_relocate_section): Force relative relocs
9031 vs SHN_UNDEF to zero.
9032
9033 2002-05-02 Alan Modra <amodra@bigpond.net.au>
9034
9035 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_SECTOFF>): Change to a
9036 16 bit reloc.
9037 <R_PPC64_SECTOFF_DS>: Likewise.
9038 (ppc64_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
9039 SECTOFF reloc.
9040 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_SECTOFF>): Correct.
9041 (ppc_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
9042 SECTOFF reloc.
9043
9044 * elf64-ppc.c (ppc64_elf_addr16_ha_reloc): Delete.
9045 (ppc64_elf_ha_reloc): New function.
9046 (ppc64_elf_brtaken_reloc): New function.
9047 (ppc64_elf_sectoff_reloc): New function.
9048 (ppc64_elf_sectoff_ha_reloc): New function.
9049 (ppc64_elf_toc_reloc): New function.
9050 (ppc64_elf_toc_ha_reloc): New function.
9051 (ppc64_elf_toc64_reloc): New function.
9052 (ppc64_elf_unhandled_reloc): New function.
9053 (ppc64_elf_howto_raw): Use the above.
9054 <R_PPC64_RELATIVE>: Mark pc_relative, pcrel_offset.
9055 <R_PPC64_SECTOFF>: Not pc_relative or pcrel_offset. Fix dst_mask.
9056 <R_PPC64_SECTOFF_DS>: Likewise.
9057 (IS_ABSOLUTE_RELOC): Update.
9058 (struct ppc_link_hash_table): Add have_undefweak.
9059 (ppc64_elf_link_hash_table_create): Init.
9060 (func_desc_adjust): Set have_undefweak.
9061 (ppc64_elf_func_desc_adjust): Call func_desc_adjust earlier. Only
9062 add the .sfpr blr when have_undefweak.
9063 (ppc64_elf_setup_section_lists): Check hash table flavour.
9064 (ppc64_elf_next_input_section): Move output_section->owner test to
9065 ppc64elf.em.
9066 (ppc64_elf_set_toc): Rename to ppc64_elf_toc, remove info param
9067 and relocatable test. Return TOCstart and don't set elf_gp.
9068 (ppc64_elf_relocate_section): Correct BRTAKEN/BRNTAKEN branch
9069 offset calculation. Add assert on weak sym branch tweaks.
9070 * elf64-ppc.h (ppc64_elf_set_toc): Delete.
9071 (ppc64_elf_toc): Declare.
9072 (ppc64_elf_next_input_section): Update.
9073
9074 2002-05-01 Alan Modra <amodra@bigpond.net.au>
9075
9076 * syms.c (_bfd_stab_section_find_nearest_line): Don't bomb on NULL
9077 file_name.
9078
9079 2002-05-01 Alan Modra <amodra@bigpond.net.au>
9080
9081 * elf64-ppc.c (CROR_151515, CROR_313131): Define.
9082 (ppc64_elf_relocate_section): Use them. Don't look for plt calls
9083 on R_PPC64_ADDR24 relocs. Require a nop or no link reg on plt
9084 call branches. Correct undefined weak destination.
9085 (ppc64_elf_func_desc_adjust): Always create at least one blr in
9086 .sfpr, and correct case where either only savef* or restf* is
9087 needed.
9088
9089 Long branch stubs, multiple stub sections.
9090 * elf64-ppc.h (ppc64_elf_setup_section_lists): Declare.
9091 (ppc64_elf_next_input_section): Declare.
9092 * elf64-ppc.c: Move linker-only prototypes.
9093 (STUB_SUFFIX): Define.
9094 (enum ppc_stub_type): New.
9095 (struct ppc_stub_hash_entry): New.
9096 (struct ppc_branch_hash_entry): New.
9097 (struct ppc_link_hash_entry): Add stub_cache, oh.
9098 (struct ppc_link_hash_table): Add stub_hash_table etc. Remove
9099 sstub. Add sbrlt, srelbrlt, has_14bit_branch, stub_iteration.
9100 Rename plt_overflow to stub_error.
9101 (ppc_stub_hash_lookup): Define.
9102 (ppc_branch_hash_lookup): Define.
9103 (stub_hash_newfunc): New function.
9104 (branch_hash_newfunc): New function.
9105 (link_hash_newfunc): Init new fields.
9106 (ppc64_elf_link_hash_table_create): Likewise.
9107 (ppc64_elf_link_hash_table_free): New function.
9108 (ppc_stub_name): New function.
9109 (ppc_get_stub_entry): New function.
9110 (ppc_add_stub): New function.
9111 (create_linkage_sections): Use bfd_make_section_anyway. Create
9112 .branch_lt and .rela.branch_lt sections. Don't create .stub.
9113 (ppc64_elf_check_relocs): Set has_14bit_branch on R_PPC64_REL14*,
9114 and set up for plt call stubs. Link func and func desc syms.
9115 (ppc64_elf_gc_sweep_hook): Handle REL14* as per REL24.
9116 (func_desc_adjust): Avoid hash lookup when func desc sym available
9117 via shortcut, and set links when processing.
9118 (ppc64_elf_hide_symbol): Likewise.
9119 (allocate_dynrelocs): Don't allocate stub section here.
9120 (ppc64_elf_size_dynamic_sections): Handle sbrlt and srelbrlt.
9121 Remove sstub code.
9122 (ppc_type_of_stub): New function.
9123 (build_one_stub): Delete.
9124 (ppc_build_one_stub): New function.
9125 (ppc_size_one_stub): New function.
9126 (ppc64_elf_setup_section_lists): New function.
9127 (ppc64_elf_next_input_section): New function.
9128 (group_sections): New function.
9129 (get_local_syms): New function.
9130 (ppc64_elf_size_stubs): Rewrite.
9131 (ppc64_elf_build_stubs): Rewrite.
9132 (ppc64_elf_relocate_section): Look up stub entry for REL24
9133 relocs. Don't propagate REL14* to dynamic objects. Look for long
9134 branch stubs if REL14* or REL24 relocs won't reach.
9135 (bfd_elf64_bfd_link_hash_table_free): Define.
9136
9137 2002-04-30 Mark Mitchell <mark@codesourcery.com>
9138
9139 * config.bfd: Add support for powerpc-*-windiss.
9140
9141 2002-04-30 Tom Rix <trix@redhat.com>
9142
9143 * xcofflink.c (xcoff_link_add_symbols): Always copy undef C_EXT
9144 symbol names into the hash table.
9145
9146 2002-04-28 Tom Rix <trix@redhat.com>
9147
9148 * coff-rs6000.c (xcoff_calculate_relocation) : Function table for
9149 calulating relocations.
9150 (xcoff_complain_overflow) : Function table for relocation errors.
9151 (xcoff_ppc_relocate_section): Use relocation and complain function
9152 tables.
9153 (xcoff_complain_overflow_unsigned_func): New complain function.
9154 (xcoff_complain_overflow_signed_func): Same.
9155 (xcoff_complain_overflow_bitfield_func): Same.
9156 (xcoff_complain_overflow_dont_func): Same.
9157 (xcoff_reloc_type_crel): New recot function.
9158 (xcoff_reloc_type_br): Same.
9159 (xcoff_reloc_type_ba): Same.
9160 (xcoff_reloc_type_toc): Same.
9161 (xcoff_reloc_type_rel): Same.
9162 (xcoff_reloc_type_neg): Same.
9163 (xcoff_reloc_type_pos): Same.
9164 (xcoff_reloc_type_fail): Same.
9165 (xcoff_reloc_type_noop): Same.
9166 * libxcoff.h : Declare common parts for xcoff64.
9167 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Use relocation
9168 and complain function tables.
9169
9170 2002-04-28 Alan Modra <amodra@bigpond.net.au>
9171
9172 * elf64-x86-64.c (struct elf64_x86_64_dyn_relocs): Comment typo.
9173 * elf32-hppa.c (elf32_hppa_final_link): Formatting.
9174
9175 2002-04-26 Alan Modra <amodra@bigpond.net.au>
9176
9177 * opncls.c (bfd_make_readable): Call bfd_section_list_clear.
9178 * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
9179
9180 * elflink.h (elf_bfd_final_link): Ensure input bfd class is the
9181 same as the output before calling elf_link_input_bfd.
9182
9183 * coffcode.h (coff_compute_section_file_positions): Set
9184 section_tail after shuffling section list.
9185
9186 2002-04-24 Christian Groessler <chris@groessler.org>
9187
9188 * coff-z8k.c (extra_case): Fix R_IMM32 relocations: The
9189 addresses are 23bit with a special layout, not plain 32bit
9190 values. Prevent relocation of immediate values.
9191
9192 2002-04-24 Chris G. Demetriou <cgd@broadcom.com>
9193
9194 * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): If MDMX or
9195 MIPS-16 ASE flags are set, print something to indicate that.
9196
9197 2002-04-23 Alan Modra <amodra@bigpond.net.au>
9198
9199 * elf32-hppa.c (hppa_type_of_stub): Correct and simplify condition
9200 under which a plt call stub is used.
9201 (final_link_relocate): Similarly.
9202 (allocate_plt_static): Clear h-plabel except when plt entry is
9203 exclusively used for a plabel.
9204 (allocate_dynrelocs): Use the above to simplify plt sizing.
9205 (struct elf32_hppa_link_hash_table): Add has_22bit_branch.
9206 (elf32_hppa_link_hash_table_create): Init.
9207 (BL22_RP): Define.
9208 (hppa_build_one_stub): Use BL22_RP if has_22bit_branch.
9209 (elf32_hppa_check_relocs): Set has_22bit_branch.
9210
9211 * elf32-hppa.c (elf32_hppa_check_relocs): Remove debug message.
9212 (final_link_relocate): Likewise.
9213
9214 2002-04-22 Jakub Jelinek <jakub@redhat.com>
9215
9216 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't build
9217 search table if some FDE is DW_EH_PE_aligned encoded either.
9218 (_bfd_elf_write_section_eh_frame): Handle terminating FDE specially.
9219
9220 2002-04-22 Richard Smith <richard@ex-parrot.com>
9221 Jakub Jelinek <jakub@redhat.com>
9222
9223 * elf-eh-frame.c (struct eh_cie_fde): Add per_encoding_relative.
9224 (_bfd_elf_discard_section_eh_frame): Set it for CIEs with pcrel
9225 encoded personality.
9226 (_bfd_elf_write_section_eh_frame): Adjust pcrel encoded personality
9227 for CIE/FDE removal.
9228
9229 2002-04-20 Tom Rix <trix@redhat.com>
9230
9231 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Fix C_FILE auxent.
9232
9233 2002-04-20 Alan Modra <amodra@bigpond.net.au>
9234
9235 * archures.c (bfd_lookup_arch): Move the list order comment..
9236 (struct bfd_arch_info): ..to where it belongs.
9237 * bfd-in2.h: Regenerate.
9238
9239 * archures.c (bfd_lookup_arch): Add comment on list order.
9240 (bfd_default_set_arch_mach): Use bfd_lookup_arch.
9241 * cpu-powerpc.c (bfd_powerpc_archs): Re-order so that the default
9242 is always at head of list.
9243
9244 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
9245
9246 * coff-arm.c (coff_thumb_pcrel_12, coff_thumb_pcrel_9,
9247 insert_thumb_branch, record_thumb_to_arm_glue): Suppress
9248 definition of these functions for ARM_WINCE builds as they are
9249 not used.
9250 (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET): Do not define
9251 for ARM_WINCE builds.
9252
9253 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
9254
9255 * coff-arm.c (bfd_arm_process_before_allocation):
9256
9257 2002-04-17 J"orn Rennecke <joern.rennecke@superh.com>
9258
9259 * cpu-sh.c (scan_mach): Delete.
9260 (arch_info_struct): Replace scan_mach with bfd_default_scan.
9261 (bfd_sh_arch): Likewise.
9262
9263 2002-04-16 Nick Clifton <nickc@cambridge.redhat.com>
9264
9265 * ihex.c (ihex_write_object_contents): Fix check for records
9266 crossing 64K boundaries.
9267
9268 2002-04-16 Alan Modra <amodra@bigpond.net.au>
9269
9270 * elf32-m32r.c (m32r_elf_add_symbol_hook): Check the hash table
9271 type rather than just assuming entries are ELF.
9272 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
9273 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
9274 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Likewise.
9275 * elf64-mmix.c (mmix_elf_add_symbol_hook): Use bfd_link_hash_entry
9276 rather than elf_link_hash_entry.
9277
9278 2002-04-15 Richard Henderson <rth@redhat.com>
9279
9280 * elf32-mips.c (mips_elf32_object_p): Revert 0404 fragment: allow
9281 n32 binaries.
9282
9283 2002-04-15 Michael Snyder <msnyder@redhat.com>
9284
9285 * opncls.c (bfd_close): Write contents if writeable.
9286 Minor formatting tidy-ups.
9287
9288 2002-04-15 Alan Modra <amodra@bigpond.net.au>
9289
9290 * elf32-ppc.c (ppc_elf_add_symbol_hook): Check the hash table type.
9291
9292 2002-04-12 Michael Snyder <msnyder@redhat.com>
9293
9294 * bfd-in.h (bfd_get_section_lma): New access macro.
9295 Minor white-space fix-up.
9296
9297 2002-04-12 Alan Modra <amodra@bigpond.net.au>
9298
9299 * elf.c (prep_headers): Don't zero EI_OSABI, EI_ABIVERSION or
9300 header pad.
9301
9302 2002-04-09 DJ Delorie <dj@redhat.com>
9303
9304 * elfarm-nabi.c (elf32_arm_howto_table): Fix ABS16 masks.
9305
9306 2002-04-09 Casper S. Hornstrup <chorns@users.sourceforge.net>
9307
9308 * coffcode.h (coff_read_word): New.
9309 (coff_compute_checksum): New.
9310 (coff_apply_checksum): New.
9311 (coff_write_object_contents): Call coff_apply_checksum () to
9312 apply checksum to PE image.
9313
9314 2002-04-08 Randolph Chung <tausq@debian.org>
9315
9316 * elf32-hppa.c (hppa_unwind_entry_compare): Move to elf-hppa.h.
9317 (elf32_hppa_final_link): Split out sorting logic to..
9318 * elf-hppa.h (elf_hppa_sort_unwind): ..here.
9319 (elf_hppa_final_link): Call elf_hppa_sort_unwind.
9320
9321 2002-04-07 Andrew Cagney <ac131313@redhat.com>
9322
9323 * configure.in: Add missing ``|'' to powerpc-*-aix4.[4-9]*
9324 pattern.
9325 * configure: Re-generate.
9326
9327 2002-04-07 Andrew Cagney <ac131313@redhat.com>
9328
9329 * configure.in: Only define AIX_CORE_DUMPX_CORE when AIX version
9330 is greater or equal to 4.3.3.
9331 * configure: Regenerate.
9332 Fix PR gdb/344.
9333
9334 2002-04-05 Hans-Peter Nilsson <hp@axis.com>
9335
9336 * elf32-cris.c (cris_elf_howto_table) <R_CRIS_16_PCREL,
9337 R_CRIS_32_PCREL>: Fix typo in name.
9338 (cris_elf_check_relocs): Always create .rela.got here when
9339 R_CRIS_16_GOTPLT or R_CRIS_32_GOTPLT is seen.
9340 (elf_cris_adjust_gotplt_to_got): Don't create .rela.got here;
9341 assume it's created.
9342
9343 2002-04-04 Daniel Jacobowitz <drow@mvista.com>
9344
9345 * aout-adobe.c (aout_32_bfd_link_hash_table_free): Define.
9346 * aout-target.h (MY_bfd_link_hash_table_free): Conditionally
9347 define.
9348 * aout-tic30.c (MY_bfd_link_hash_table_free): Likewise.
9349 * bfd.c (bfd_link_hash_table_free): Define.
9350 * binary.c (binary_bfd_link_hash_table_free): Define.
9351 * bout.c (b_out_bfd_link_hash_table_free): Define.
9352 * coff-rs6000.c (rs6000coff_vec): Include
9353 _bfd_generic_link_hash_table_free.
9354 (pmac_xcoff_vec): Likewise.
9355 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
9356 (aix5coff64_vec): Likewise.
9357 * coffcode.h (coff_bfd_link_hash_table_free): Conditionally define.
9358 * elf-m10300.c (elf32_mn10300_link_hash_table_free): New function.
9359 (bfd_elf32_bfd_link_hash_table_free): Define.
9360 * elf32-hppa.c (elf32_hppa_link_hash_table_free): New function.
9361 (bfd_elf32_bfd_link_hash_table_free): Define.
9362 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Conditionally
9363 define.
9364 * i386msdos.c (msdos_bfd_link_hash_table_free): Define.
9365 * i386os9k.c (os9k_bfd_link_hash_table_free): Define.
9366 * ieee.c (ieee_bfd_link_hash_table_free): Define.
9367 * ihex.c (ihex_bfd_link_hash_table_free): Define.
9368 * libbfd-in.h (_bfd_nolink_bfd_link_hash_table_free): Define.
9369 (_bfd_generic_link_hash_table_free): Add prototype.
9370 * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Add prototype.
9371 * libecoff.h (_bfd_ecoff_bfd_link_hash_table_free): Define.
9372 * linker.c (_bfd_generic_link_hash_table_free): New function.
9373 * mmo.c (mmo_bfd_link_hash_table_free): Define.
9374 * nlm-target.h (nlm_bfd_link_hash_table_free): Define.
9375 * oasys.c (oasys_bfd_link_hash_table_free): Define.
9376 * ppcboot.c (ppcboot_bfd_link_hash_table_free): Define.
9377 * som.c (som_bfd_link_hash_table_free): Define.
9378 * srec.c (srec_bfd_link_hash_table_free): Define.
9379 * tekhex.c (tekhex_bfd_link_hash_table_free): Define.
9380 * versados.c (versados_bfd_link_hash_table_free): Define.
9381 * vms.c (vms_bfd_link_hash_table_free): New function.
9382 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_free): New function.
9383
9384 * coff-arm.c (coff_arm_link_hash_table_create): Use bfd_malloc
9385 instead of bfd_alloc.
9386 * coff-h8300.c (h8300_coff_link_hash_table_create): Likewise.
9387 * coff-mcore.c (coff_mcore_link_hash_table_create): Likewise.
9388 * coff-ppc.c (ppc_coff_link_hash_table_create): Likewise.
9389 * cofflink.c (_bfd_coff_link_hash_table_create): Likewise.
9390 * ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
9391 * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise.
9392 * elf.c (_bfd_elf_link_hash_table_create): Likewise.
9393 * elf32-arm.h (elf32_arm_link_hash_table_create): Likewise.
9394 * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
9395 * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise.
9396 * elf32-i386.c (elf_i386_link_hash_table_create): Likewise.
9397 * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
9398 * elf32-s390.c (elf_s390_link_hash_table_create): Likewise.
9399 * elf32-sh.c (sh_elf_link_hash_table_create): Likewise.
9400 * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create): Likewise.
9401 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
9402 * elf64-s390.c (elf_s390_link_hash_table_create): Likewise.
9403 * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise.
9404 * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create): Likewise.
9405 * elf64-x86-64.c (elf64_x86_64_link_hash_table_create): Likewise.
9406 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
9407 * linker.c (_bfd_generic_link_hash_table_create): Likewise.
9408 * m68klinux.c (linux_link_hash_table_create): Likewise.
9409 * sparclinux.c (linux_link_hash_table_create): Likewise.
9410 * sunos.c (sunos_link_hash_table_create): Likewise.
9411 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise.
9412
9413 * targets.c: Add _bfd_link_hash_table_free to xvec.
9414
9415 * bfd-in2.h: Regenerate.
9416 * libbfd.h: Regenerate.
9417 * libcoff.h: Regenerate.
9418
9419 2002-04-04 Alan Modra <amodra@bigpond.net.au>
9420
9421 * dep-in.sed: Cope with absolute paths.
9422 * Makefile.am (dep.sed): Subst TOPDIR, and not INCDIR.
9423 Run "make dep-am".
9424 * Makefile.in: Regenerate.
9425 * coff-arm.c: Fix copyright date.
9426 * cpu-h8300.c: Likewise.
9427 * cpu-i370.c: Likewise.
9428 * cpu-s390.c: Likewise.
9429 * cpu-mips.c: Likewise.
9430 * po/SRC-POTFILES.in: Regenerate.
9431
9432 2002-04-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
9433
9434 * Makefile.am: Add elfxx-mips.c to the known backends.
9435 (elf32-mips.lo): remove dependency to coff/external.h.
9436 * Makefile.in: Regenerate.
9437 * configure.in: Add elfxx-mips.lo to all vectors using elf32-mips.lo
9438 Remove elf32-mips.lo from 64 bit vectors. Update dependencies
9439 accordingly.
9440 * configure: Regenerate.
9441 * elf-bfd.h: Move all MIPS ELF specific prototypes to elfxx-mips.h.
9442 (irix_compat_t): IRIX compatibility level, moved from elf32-mips.c.
9443 (elf_backend_mips_irix_compat, elf_backend_mips_rtype_to_howto): New
9444 MIPS specific backend functions.
9445 * elf32-mips.c: Moved most code to elfxx-mips.c.
9446 (mips_elf_hi16_reloc): Rename from _bfd_mips_elf_hi16_reloc and make
9447 static.
9448 (mips_elf_lo16_reloc): Likewise, was _bfd_mips_elf_lo16_reloc.
9449 (mips_elf_got16_reloc): Likewise, was _bfd_mips_elf_got16_reloc.
9450 (mips_elf_gprel32_reloc): Likewise, was _bfd_mips_elf_gprel32_reloc.
9451 (mips_elf32_rtype_to_howto): Rename from mips_rtype_to_howto. Changed
9452 interface to allow selection of the right REL or RELA howto table.
9453 (mips_elf32_object_p): Rename from _bfd_mips_elf_object_p and made
9454 static. Let it refuse n32 objects.
9455 (elf32_mips_grok_prstatus): Rename from _bfd_elf32_mips_grok_prstatus.
9456 (elf32_mips_grok_psinfo): Rename from _bfd_elf32_mips_grok_psinfo.
9457 (elf32_mips_discard_info): Rename from _bfd_elf32_mips_discard_info.
9458 (elf32_mips_ignore_discarded_relocs): Rename from
9459 _bfd_elf32_mips_ignore_discarded_relocs.
9460 (elf32_mips_write_section): Rename from _bfd_elf32_mips_write_section.
9461 (elf32_mips_irix_compat): New function, replaces IRIX_COMPAT.
9462 (elf_mips_howto_table_rela): Remove.
9463 * elf64-mips.c: Moved most code to elfxx-mips.c.
9464 (bfd_elf64_bfd_reloc_type_lookup): Make static.
9465 (mips_elf64_rtype_to_howto): New function.
9466 (mips_elf64_object_p): Likewise.
9467 (elf64_mips_irix_compat): Likewise.
9468 * elfxx-mips.c: New file containing common code merged together from
9469 elf32-mips.c and elf64-mips.c.
9470 * elfxx-mips.h: New file containing MIPS specific prototypes from
9471 elf-bfd.h.
9472 * elfxx-target.h: Add handling for elf_backend_mips_irix_compat and
9473 elf_backend_mips_rtype_to_howto.
9474
9475 2002-04-04 Alan Modra <amodra@bigpond.net.au>
9476
9477 * srec.c (MAXCHUNK, Chunk): Revise comments.
9478 (srec_write_record): Correct buffer size.
9479 (srec_write_header): Do without intermediate buffer.
9480 (srec_write_section): Validate Chunk.
9481 (srec_write_terminator): Pass NULL instead of dummy buffer.
9482 (srec_write_symbols): Pass file and symbol names directly to
9483 bfd_bwrite so sprintf won't overflow buffer.
9484
9485 2002-04-03 Jakub Jelinek <jakub@redhat.com>
9486
9487 * elf32-sparc.c (elf32_sparc_relocate_section): Don't emit dynamic
9488 PC relative relocs against hidden symbols.
9489 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
9490
9491 2002-04-03 Alan Modra <amodra@bigpond.net.au>
9492
9493 * elf.c (_bfd_elf_make_section_from_shdr): When setting section
9494 LMAs, loop over segments until p_vaddr and p_memsz specify an
9495 extent enclosing the section.
9496
9497 2002-04-02 Nick Clifton <nickc@cambridge.redhat.com>
9498
9499 * ihex.c (ihex_write_object_contents): Do not allow records to
9500 cross a 64K boundary - wrap if necessary.
9501
9502 2002-04-01 Nathan Williams <nathanw@wasabisystems.com>
9503
9504 * elf.c (elfcore_netbsd_get_lwpid): Fix off-by-one error
9505 which caused the returned LWP ID to always be 0.
9506
9507 2002-04-01 Richard Henderson <rth@redhat.com>
9508
9509 * elf32-sparc.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
9510 (elf32_sparc_relocate_section): Use it to figure out when to
9511 initialize .got entries.
9512 * elf64-sparc.c: Similarly.
9513
9514 2002-03-28 Alan Modra <amodra@bigpond.net.au>
9515
9516 * linker.c (link_action): Ignore duplicate warning syms.
9517 (_bfd_generic_link_write_global_symbol): Follow warning symbol link.
9518 * elflink.h (elf_adjust_dynstr_offsets): Likewise.
9519 (elf_adjust_dynamic_symbol): Likewise.
9520 (elf_export_symbol): Likewise.
9521 (elf_link_find_version_dependencies): Likewise.
9522 (elf_link_assign_sym_version): Likewise.
9523 (elf_link_sec_merge_syms): Likewise.
9524 (elf_link_output_extsym): Likewise.
9525 (elf_gc_sweep_symbol): Likewise.
9526 (elf_gc_propagate_vtable_entries_used): Likewise.
9527 (elf_gc_smash_unused_vtentry_relocs): Likewise.
9528 (elf_gc_allocate_got_offsets): Likewise.
9529 (elf_collect_hash_codes): Likewise.
9530 * elflink.c (elf_link_renumber_hash_table_dynsyms): Likewise.
9531 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
9532 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
9533 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
9534 * elf32-arm.h (elf32_arm_discard_copies): Likewise.
9535 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Likewise.
9536 (elf_cris_discard_excess_dso_dynamics): Likewise.
9537 * elf32-hppa.c (clobber_millicode_symbols): Likewise.
9538 (mark_PIC_calls): Likewise.
9539 (allocate_plt_static): Likewise.
9540 (allocate_dynrelocs): Likewise.
9541 (readonly_dynrelocs): Likewise.
9542 * elf32-i386.c (allocate_dynrelocs): Likewise.
9543 (readonly_dynrelocs): Likewise.
9544 * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
9545 * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
9546 * elf32-mips.c (mips_elf_output_extsym): Likewise.
9547 (mips_elf_sort_hash_table_f): Likewise.
9548 (mips_elf_check_mips16_stubs): Likewise.
9549 * elf32-s390.c (allocate_dynrelocs): Likewise.
9550 (readonly_dynrelocs): Likewise.
9551 * elf32-sh.c (sh_elf_discard_copies): Likewise.
9552 * elf32-xstormy16.c (xstormy16_relax_plt_check): Likewise.
9553 (xstormy16_relax_plt_realloc): Likewise.
9554 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
9555 (elf64_alpha_output_extsym): Likewise.
9556 * elf64-hppa.c (elf64_hppa_mark_exported_functions): Likewise.
9557 * elf64-mips.c (mips_elf64_sort_hash_table_f): Likewise.
9558 (mips_elf64_check_mips16_stubs): Likewise.
9559 (mips_elf64_output_extsym): Likewise.
9560 * elf64-ppc.c (func_desc_adjust): Likewise.
9561 (allocate_dynrelocs): Likewise.
9562 (readonly_dynrelocs): Likewise.
9563 * elf64-s390.c (allocate_dynrelocs): Likewise.
9564 (readonly_dynrelocs): Likewise.
9565 * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
9566 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
9567 (readonly_dynrelocs): Likewise.
9568 * elfxx-ia64.c (elfNN_ia64_global_dyn_sym_thunk): Likewise.
9569 * aoutx.h (aout_link_write_other_symbol): Likewise.
9570 * cofflink.c (_bfd_coff_write_task_globals): Likewise.
9571 (_bfd_coff_write_global_sym): Likewise.
9572 * i386linux.c (linux_tally_symbols): Likewise.
9573 * m68klinux.c (linux_tally_symbols): Likewise.
9574 * sparclinux.c (linux_tally_symbols): Likewise.
9575 * pdp11.c (aout_link_write_other_symbol): Likewise.
9576 * sunos.c (sunos_scan_dynamic_symbol): Likewise.
9577 * xcofflink.c (xcoff_build_ldsyms): Likewise.
9578 (xcoff_write_global_symbol): Likewise.
9579
9580 * cofflink.c (_bfd_coff_final_link): Formatting.
9581 * cpu-mips.c (mips_compatible): Make static, prototype.
9582 * elf32-i386.c (elf_i386_check_relocs): Formatting.
9583 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
9584 * elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
9585 * elf64-mips.c (mips_elf64_sort_hash_table): Likewise.
9586 (mips_elf64_final_link): Likewise.
9587 * elflink.h (elf_link_find_version_dependencies): Remove duplicate
9588 prototype.
9589
9590 2002-03-27 Nick Clifton <nickc@cambridge.redhat.com>
9591
9592 * coff-arm.c (SWAP_IN_RELOC_OFFSET): Define.
9593 (SWAP_OUT_RELOC_OFFSET): Define.
9594
9595 2002-03-27 Gregory Steuck <greg@nest.cx>
9596
9597 * elf.c (_bfd_elf_get_symtab_upper_bound): Leave space for
9598 terminating NULL if empty symbol table.
9599 (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise.
9600
9601 2002-03-26 H.J. Lu (hjl@gnu.org)
9602
9603 * elflink.h (elf_link_input_bfd): Revert the last change since
9604 the gcc exception handling isn't fixed yet.
9605
9606 2002-03-26 H.J. Lu (hjl@gnu.org)
9607
9608 * elflink.h (elf_link_input_bfd): Complain about relocations
9609 against local symbols in discarded sections.
9610
9611 2002-03-26 Alan Modra <amodra@bigpond.net.au>
9612
9613 * elflink.h (elf_gc_mark): Don't recurse into non-ELF sections.
9614
9615 2002-03-23 Alan Modra <amodra@bigpond.net.au>
9616
9617 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
9618 section file offset for !SEC_LOAD sections.
9619
9620 2002-03-21 Richard Earnshaw <rearnsha@arm.com>
9621
9622 * elf32-arm.h (elf32_arm_final_link_relocate <case R_ARM_GOTOFF>,
9623 <case R_ARM_GOT>): Handle relocations to Thumb functions.
9624
9625 2002-03-21 Alan Modra <amodra@bigpond.net.au>
9626
9627 * coff64-rs6000.c (_bfd_xcoff64_put_symbol_name): Prototype.
9628 Whitespace changes.
9629 * archive.c: Update copyright date.
9630 * bfd-in2.h: Regenerate.
9631 * libbfd.h: Regenerate.
9632 * Makefile.am: Run "make dep-am"
9633 * Makefile.in: Regenerate.
9634 * po/SRC-POTFILES.in: Regenerate.
9635
9636 2002-03-20 Daniel Jacobowitz <drow@mvista.com>
9637
9638 * dwarf2.c (struct funcinfo): Move up.
9639 (lookup_address_in_function_table): New argument function_ptr.
9640 Set it.
9641 (lookup_address_in_line_table): New argument function. If function
9642 is non-NULL, use it to handle ``addr'' before the first line note of
9643 the function.
9644 (comp_unit_find_nearest_line): Update and swap calls to
9645 lookup_address_in_function_table and lookup_address_in_line_table.
9646 * syms.c (_bfd_stab_section_find_nearest_line): Use the first
9647 N_SLINE encountered if we see an N_FUN before any N_SLINE.
9648
9649 2002-03-20 Tom Rix <trix@redhat.com>
9650
9651 * coff-rs6000.c (_bfd_xcoff_stat_arch_elt): Renamed from
9652 _bfd_xcoff_generic_stat_arch_elt. Fix format check.
9653 * coff64-rs6000.c : Use _bfd_xcoff_stat_arch_elt.
9654
9655 2002-03-19 Tom Rix <trix@redhat.com>
9656
9657 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through all
9658 dynamic objects in archives.
9659
9660 2002-03-19 Hans-Peter Nilsson <hp@bitrange.com>
9661
9662 * elflink.h (NAME(bfd_elf,record_link_assignment)): Don't set
9663 STT_NOTYPE symbols to STT_OBJECT.
9664
9665 2002-03-18 Jan Hubicka <jh@suse.cz>
9666
9667 * cpu-i386.c (bfd_x86_64_arch): Rename to "i386:x86-64"
9668
9669 2002-03-18 Tom Rix <trix@redhat.com>
9670
9671 * aix5ppc.core.c : New file for AIX 5 64 bit core support.
9672 * bfd-in.h : Add bfd_xcoff_ar_archive_set_magic declaration.
9673 * coff-rs6000 (do_pad) : New function for archive padding.
9674 (do_copy) : New function for object file copying in archives.
9675 (do_shared_object_padding) : New function for padding shared
9676 objects to their text section alignment in archives.
9677 (bfd_xcoff_ar_achive_set_magic) : Stub.
9678 (xcoff_write_armap_big) : Use do_copy and do_pad.
9679 (xcoff_write_archive_contents_big) : Use do_shared_object_padding,
9680 do_copy and do_pad.
9681 * coff64-rs6000.c (xcoff64_write_ojbect_contents) : Use
9682 bfd_xcoff_magic_number.
9683 (xcoff64_bad_format_hook) : New function for _bfd_bad_format_hook
9684 fop.
9685 (xcoff_backend_data_r) : Use xcoff64_bad_format_hook.
9686 (bfd_xcoff_aix5_backend_data) : New Aix 5 backend data.
9687 (aix5coff64_vec) : New Aix 5 target aix5coff64-rs6000.
9688 * rs6000-core.c : Update copyright date.
9689 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Check for NULL
9690 csectpp.
9691 * coffcode.h (coff_new_section_hook) : Use new accessor macros.
9692 (coff_set_arch_mach_hook) : Add Aix 5 U64_TOCMAGIC magic #.
9693 (coff_set_flags) : Use bfd_xcoff_magic_number.
9694 * libxcoff.h (bfd_xcoff_is_xcoff64): Add U64_TOCMAGIC.
9695 * configure.in : Add powerpc-*-aix5 and rs6000-*-aix5 support.
9696 * Makefile.am : Same.
9697 * config.bfd : Same.
9698 * targets.c : Same.
9699 * configure : Regnerate.
9700 * Makefile.in : Same.
9701 * bfd-in2.h : Same.
9702
9703 2002-03-18 Nick Clifton <nickc@cambridge.redhat.com>
9704
9705 * po/fr.po: Updated version.
9706
9707 2002-03-18 Alan Modra <amodra@bigpond.net.au>
9708
9709 * libbfd.c (bfd_write_bigendian_4byte_int): Return true iff success.
9710 * libbfd.h: Regenerate.
9711 * archive.c (coff_write_armap): Pass on failures from
9712 bfd_write_bigendian_4byte_int.
9713
9714 2002-03-14 H.J. Lu <hjl@gnu.org>
9715
9716 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the BFD
9717 error to bfd_error_nonrepresentable_section for reinit_array
9718 section in DSO.
9719
9720 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
9721
9722 * coffcode.h (coff_slurp_symbol_table): When adding BSF_WEAK flag,
9723 OR it in rather than replacing previously selected flags.
9724
9725 * elfxx-target.h (TARGET_BIG_SYM): Set ar_max_namelen to 15.
9726 (TARGET_LITTLE_SYM): Set ar_max_namelen to 15.
9727
9728 2002-03-14 Alan Modra <amodra@bigpond.net.au>
9729
9730 * cpu-mips.c (mips_compatible): New. Don't check bits_per_word.
9731 (N): Use the above.
9732 * elflink.h (elf_bfd_final_link): Revert last change. Instead,
9733 ensure reloc size matches before calling elf_link_input_bfd.
9734 Add an assert to check reloc size when counting output relocs.
9735
9736 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
9737
9738 * mmo.c (mmo_get_loc): Return NULL rather than false.
9739
9740 2002-03-13 Nick Clifton <nickc@cambridge.redhat.com>
9741
9742 * po/fr.po: Updated version.
9743
9744 2002-03-13 Alan Modra <amodra@bigpond.net.au>
9745
9746 * archures.c (bfd_default_compatible): Test bits_per_word.
9747 * cpu-i386.c (i386_compatible): Remove. Replace occurrences with
9748 bfd_default_compatible.
9749 * cpu-i370.c (i370_compatible): Likewise.
9750 * cpu-sparc.c (sparc_compatible): Likewise.
9751 * cpu-h8300.c (compatible): Test in->arch == out->arch.
9752
9753 * elflink.h: Formatting fixes.
9754 (elf_link_output_extsym): Merge undefined and undef weak cases.
9755
9756 * elflink.h (elf_bfd_final_link): Only call elf_link_input_bfd
9757 when word size of input matches output word size.
9758
9759 2002-03-12 Andreas Jaeger <aj@suse.de>
9760
9761 * cpu-i386.c (i386_compatible): New. Use it instead of
9762 bfd_default_compatible.
9763
9764 2002-03-07 H.J. Lu (hjl@gnu.org)
9765
9766 * coff-sh.c (shcoff_reloc_map): Use bfd_reloc_code_real_type
9767 as the type for bfd_reloc_val.
9768
9769 2002-03-05 John David Anglin <dave@hiauly1.hia.nrc.ca>
9770
9771 * elf-hppa.h (elf_hppa_is_dynamic_loader_symbol): New function.
9772 (elf_hppa_relocate_section): Ignore undefined dynamic loader symbols.
9773 (elf_hppa_final_link_relocate): Correct relocations for indirect
9774 references to local data through the DLT. Fix .opd creation for
9775 local symbols using R_PARISC_LTOFF_FPTR32 and R_PARISC_FPTR64
9776 relocations. Use e_lsel selector for R_PARISC_DLTIND21L,
9777 R_PARISC_LTOFF_FPTR21L and R_PARISC_LTOFF_TP21L as per
9778 "Processor-Specific ELF for PA_RISC, Version 1.43" document.
9779 Similarly, use e_rsel for DLT and LTOFF 'R' relocations.
9780 * elf32-hppa.c (final_link_relocate): Revise relocation selectors
9781 as per "Processor-Specific ELF for PA_RISC, Version 1.43" document.
9782
9783 2002-03-05 Jakub Jelinek <jakub@redhat.com>
9784
9785 * merge.c (_bfd_merge_sections): Don't segfault if there
9786 is nothing to merge due to GC.
9787
9788 2002-03-05 Alan Modra <amodra@bigpond.net.au>
9789
9790 * elf32-hppa.c (clobber_millicode_symbols): Remove hack to keep
9791 symbols that have been forced local.
9792
9793 * elflink.h (elf_bfd_final_link): Call elf_link_output_extsym
9794 to output forced local syms for non-shared link.
9795 (elf_link_output_extsym): Tweak condition for calling backend
9796 adjust_dynamic_symbol so that previous behaviour is kept.
9797 Whitespace changes throughout file.
9798
9799 2002-03-04 H.J. Lu <hjl@gnu.org>
9800
9801 * elf.c (bfd_section_from_shdr): Handle special sections,
9802 .init_array, .fini_array and .preinit_array.
9803 (elf_fake_sections): Likewise.
9804
9805 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Create the
9806 DT entry only if the section is in output for .init_array,
9807 .fini_array and .preinit_array. Complain about .preinit_array
9808 section in DSO.
9809 (elf_bfd_final_link): Warn zero size for .init_array,
9810 .fini_array and .preinit_array sections.
9811
9812 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Remove
9813 SHT_INIT_ARRAY, SHT_FINI_ARRAY and SHT_PREINIT_ARRAY.
9814 (elfNN_ia64_fake_sections): Remove .init_array, .fini_array and
9815 .preinit_array.
9816
9817 2002-03-04 Alan Modra <amodra@bigpond.net.au>
9818
9819 * configure.in (WIN32LIBADD): Don't eval PICFLAG assignment.
9820 * configure: Regenerate.
9821
9822 2002-03-02 Tom Rix <trix@redhat.com>
9823
9824 * coff64-rs6000.c (xcoff64_howto_table): Replace howto types with
9825 symbolic equiv.
9826 * coff-rs6000.c (xcoff_howto_table): Same.
9827
9828 2002-03-01 David Mosberger <davidm@hpl.hp.com>
9829
9830 * elflink.h (size_dynamic_sections): If section named
9831 ".preinit_array" exists, create DT_PREINIT_ARRAY and
9832 DT_PREINIT_ARRAYSZ entries in dynamic table. Analogously for
9833 ".init_array" and ".fini_array".
9834 (elf_bfd_final_link): Handle DT_PREINIT_ARRAYSZ, DT_INIT_ARRAYSZ,
9835 DT_FINI_ARRAYSZ, DT_PREINIT_ARRAY, DT_INIT_ARRAY, and
9836 DT_FINI_ARRAY.
9837
9838 2002-02-26 Andrew Macleod <amacleod@cygnus.com>
9839
9840 * elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local
9841 dynsyms.
9842
9843 2002-02-25 Alan Modra <amodra@bigpond.net.au>
9844
9845 * elf64-hppa.h: Update copyright date.
9846
9847 * elf64-ppc.c (ppc64_elf_check_relocs): Warning fix.
9848 (ppc64_elf_relocate_section): Don't generate power4 style branch
9849 hints for *_BRTAKEN and *_BRNTAKEN relocs.
9850
9851 2002-02-22 Jakub Jelinek <jakub@redhat.com>
9852
9853 * elf64-sh64.c (sh_elf64_relocate_section): Fix a typo from my
9854 last patch.
9855 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
9856
9857 2002-02-21 Andreas Jaeger <aj@suse.de>
9858
9859 * elf64-x86-64.c: Major rework that introduces all recent changes
9860 to the x86-64 backend. Get a closer match to elf32-i386.
9861 (struct elf64_x86_64_dyn_relocs): Rename from
9862 elf64_x86_64_pcrel_relocs_copied, add additional fields. Change
9863 all users.
9864 (struct elf64_x86_64_link_hash_table): Add short cuts to some
9865 sections.
9866 (link_hash_newfunc): Rename from elf64_x86_64_link_hash_newfunc,
9867 remove casts, initialize new hash members.
9868 (create_got_section): New.
9869 (elf64_x86_64_create_dynamic_sections): New.
9870 (elf64_x86_64_copy_indirect_symbol): New.
9871 (elf64_x86_64_check_relocs): Don't allocate space for dynamic
9872 relocs, .got or .relgot here but do it in allocate_dynrelocs.
9873 Reference count possible .plt and .got entries. Don't test input
9874 section SEC_READONLY here to try to avoid copy relocs, and keep
9875 dyn_relocs regardless of ELF_LINK_NON_GOT_REF. Don't set
9876 DF_TEXTREL here. Delay setting of variables until needed. Cache
9877 pointer to "sreloc" section in elf_section_data. Tweak condition
9878 under which .got created. Report files with bad relocation
9879 section names.
9880 (elf64_x86_64_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
9881 Reference count possible .plt entries. Don't deallocate .got and
9882 .relgot space here.
9883 (elf64_x86_64_adjust_dynamic_symbol): Handle nocopyreloc. Don't
9884 do copy reloc processing for weakdefs. Remove redundant casts and
9885 aborts. Delay setting of vars until needed. Move creation of
9886 dynamic symbols and allocation of .plt and .rela.plt to
9887 allocate_dynrelocs. Replace BFD_ASSERT with abort.
9888 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
9889 (allocate_dynrelocs): New.
9890 (readonly_dynrelocs): New.
9891 (elf64_x86_64_size_dynamic_sections): Call readonly_dynrelocs.
9892 Allocate space for dyn relocs. Replace BFD_ASSERT with abort.
9893 Zero out the dynamic allocated content space.
9894 (elf64_x86_64_discard_copies): Removed.
9895 (elf64_x86_64_relocate_section): Make use of dynamic section
9896 short-cuts. Localise vars, and delay setting. Better error
9897 reporting, replace BFD_ASSERT with abort. Check
9898 ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined in the
9899 regular object file and tread the weak definition as the normal
9900 one. Don't discard relocs for undefweak or undefined symbols and
9901 check !DEF_REGULAR as well as DEF_DYNAMIC in test for avoided copy
9902 relocs.
9903 (elf64_x86_64_finish_dynamic_symbol): Don't copy relocs for
9904 symbols that have been forced local. Use same test to decide if
9905 we can use a relative reloc for got as relocate_section. Expand
9906 SHN_UNDEF comment. Move expressions out of function calls.
9907 Replace BFD_ASSERT with abort.
9908 (bfd_elf64_bfd_final_link): Removed.
9909 (elf_backend_copy_indirect_symbol): Define.
9910
9911 2002-02-20 Tom Rix <trix@redhat.com>
9912
9913 * coff-rs6000.c (xcoff_howto_table): Add 16 bit R_BA.
9914 (_bfd_xcoff_reloc_type_lookup): Use it.
9915 * coff64-rs6000.c (xcoff64_howto_table): Same.
9916 (xcoff64_reloc_type_lookup): Same.
9917
9918 2002-02-20 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
9919
9920 * osf-core.c (osf_core_vec): OSF/1 (Digital Unix) core files are
9921 little endian.
9922
9923 2002-02-19 Martin Schwidefsky <schwidefsky@de.ibm.com>
9924
9925 * archures.c (bfd_mach_s390_esa): Rename to bfd_mach_s390_31.
9926 (bfd_mach_s390_esame): Rename to bfd_mach_s390_64.
9927 * bfd-in2.h: Regenerate.
9928 * cpu-s390.c (arch_info_struct): Use renamed architecture defines.
9929 Replace architecture name "s390" with "s390:31-bit" and "s390:esame"
9930 with "s390:64-bit".
9931 * elf32-s390.c (elf_howto_table): Add 32 bit pc relative relocations.
9932 (elf_s390_reloc_type_lookup): Likewise.
9933 (elf_s390_check_relocs): Likewise.
9934 (elf_s390_gc_sweep_hook): Likewise.
9935 (elf_s390_relocate_section): Likewise.
9936 (elf_s390_object_p): Use renamed architecture define.
9937 * elf64-s390.c (elf_s390_object_p): Use renamed architecture define.
9938
9939 2002-02-19 Frank Ch. Eigler <fche@redhat.com>
9940
9941 * syms.c (stt[]): Sorted. Added .init/.fini -> "t" mapping.
9942
9943 2002-02-19 Jakub Jelinek <jakub@redhat.com>
9944
9945 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Enable
9946 absptr -> pcrel optimization for shared libs.
9947 Only create minimal .eh_frame_hdr if absptr FDE encoding in shared
9948 library cannot be converted to pcrel.
9949 (_bfd_elf_eh_frame_section_offset): Return -2 if making absptr
9950 relative.
9951 * elf32-i386.c (elf_i386_relocate_section): If
9952 _bfd_elf_section_offset returned -2, skip, but make sure the
9953 relocation is installed.
9954 * elf32-arm.h (elf32_arm_final_link_relocate): Likewise.
9955 * elf32-cris.c (cris_elf_relocate_section): Likewise.
9956 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
9957 * elf32-i370.c (i370_elf_relocate_section): Likewise.
9958 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
9959 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
9960 * elf32-s390.c (elf_s390_relocate_section): Likewise.
9961 * elf32-sh.c (sh_elf_relocate_section): Likewise.
9962 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
9963 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
9964 * elf64-s390.c (elf_s390_relocate_section): Likewise.
9965 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
9966 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
9967 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
9968 * elf64-alpha.c (elf64_alpha_relocate_section): Handle
9969 _bfd_elf_section_offset returning -2 the same way as -1.
9970 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
9971 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add FIXME
9972 and BFD_ASSERT.
9973 * elf64-mips.c (mips_elf64_create_dynamic_relocation): Likewise.
9974
9975 2002-02-18 Tom Rix <trix@redhat.com>
9976
9977 * xcofflink.c (bfd_xcoff_link_gernate_rtinit): Add -brtl support.
9978 (bfd_xcoff_size_dynamic_sections): Same.
9979 * bfd-in.h (bfd_xcoff_link_generate_rtinit): Same.
9980 (bfd_xcoff_size_dynamic_sections): Same.
9981 * coff-rs6000.c (xcoff_generate_rtinit): Same.
9982 * coff-rs646000.c (xcoff64_generate_rtinit): Same.
9983 * libxcoff.h (struct xcoff_backend_data_rec): Same.
9984 * xcofflink.c (xcoff_build_ldsyms, xcoff_link_add_symbols): Clean.
9985 * bfd-in2.h: Regenerate.
9986
9987 2002-02-18 Alan Modra <amodra@bigpond.net.au>
9988
9989 * elf64-ppc.c (STFD_FR0_0R1, LFD_FR0_0R1, BLR): Define.
9990 (struct ppc_link_hash_table): Add sfpr.
9991 (ppc64_elf_link_hash_table_create): Init it.
9992 (ppc64_elf_create_dynamic_sections): Split creation of .stub and
9993 .glink out to..
9994 (create_linkage_sections): ..here. Make .sfpr too.
9995 (ppc64_elf_check_relocs): Call create_linkage_sections, and set
9996 dynobj early.
9997 (MIN_SAVE_FPR, MAX_SAVE_FPR): Define.
9998 (ppc64_elf_func_desc_adjust): Look for missing ._savef* and
9999 ._restf* functions, and create as needed.
10000 (func_desc_adjust): Only force_local for shared libs.
10001
10002 2002-02-18 David O'Brien <obrien@FreeBSD.org>
10003
10004 * configure.in: Bump version number post 2.12 branching.
10005 * configure: Regenerate.
10006
10007 2002-02-17 Hans-Peter Nilsson <hp@bitrange.com>
10008
10009 * mmo.c: Correct and improve comments.
10010 (mmo_write_chunk): Store trailing byte in bfd buffer; don't
10011 zero-pad. Use input to fill up non-empty bfd buffer.
10012 (mmo_flush_chunk): New function.
10013 (mmo_write_loc_chunk): Add parameter last_vmap, all callers
10014 changed. Don't emit location specifier if VMA is same as
10015 *LAST_VMAP after omitting leading zero contents. Call
10016 mmo_flush_chunk before emitting location specifier.
10017 (mmo_write_loc_chunk_list): Call mmo_flush_chunk when finished
10018 with mmo_write_loc_chunk calls.
10019 (mmo_internal_write_section): Call mmo_flush_chunk after
10020 mmo_write_chunk.
10021 (mmo_write_symbols_and_terminator): Move :Main to first position
10022 in symbol array. Add faked one if it does not exist if there are
10023 other symbols. Don't add it if there are no symbols at all. Move
10024 out test for value of :Main from symbol loop. Rename table
10025 fakemain to maintable and variable mainsym to fakemain.
10026
10027 2002-02-15 Richard Henderson <rth@redhat.com>
10028
10029 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: A target
10030 section with no got matches any got. Simplify error generaion.
10031
10032 2002-02-15 Alan Modra <amodra@bigpond.net.au>
10033
10034 Support arbitrary length fill patterns.
10035 * linker.c (bfd_new_link_order): Zero all fields with bfd_zalloc.
10036 (_bfd_default_link_order): Remove bfd_fill_link_order code.
10037 Call default_data_link_order.
10038 (default_fill_link_order): Delete.
10039 (default_data_link_order): New function.
10040 * elf32-mips.c (_bfd_mips_elf_final_link): Replace occurrences
10041 of bfd_fill_link_order with bfd_data_link_order.
10042 * elf64-alpha.c (elf64_alpha_final_link): Likewise.
10043 * elf64-mips.c (mips_elf64_final_link): Likewise.
10044
10045 * bfd.c (bfd_scan_vma): Clamp overflows to max bfd_vma value.
10046 Correct value returned in "end" for "0x<non-hex>".
10047
10048 2002-02-14 Nick Clifton <nickc@cambridge.redhat.com>
10049
10050 * cpu-arm.c (processors): Replace 'arch' field with 'mach'.
10051 (scan): Test against 'mach' field in info structure.
10052
10053 2002-02-14 Alan Modra <amodra@bigpond.net.au>
10054
10055 * elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD.
10056
10057 2002-02-14 Matt Fredette <fredette@netbsd.org>
10058
10059 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize
10060 EF_M68000.
10061
10062 2002-02-13 Nick Clifton <nickc@cambridge.redhat.com>
10063
10064 * elf.c (_bfd_elf_make_section_from_shdr): Do not insist on
10065 non-zero physical addresses when adjusting the LMAs of new
10066 sections.
10067
10068 2002-02-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
10069
10070 * elf-hppa.h (elf_hppa_reloc_final_type): New function stripped
10071 from _bfd_elf_hppa_gen_reloc_type.
10072 (_bfd_elf_hppa_gen_reloc_type): Remove duplicate prototype.
10073 * elf32-hppa.h (elf32_hppa_reloc_final_type): Add protptype.
10074 * elf32-hppa.c: Include elf32-hppa.h before elf-hppa.h.
10075 * elf64-hppa.h (elf64_hppa_reloc_final_type): Add protptype.
10076
10077 2002-02-12 Alexandre Oliva <aoliva@redhat.com>
10078
10079 * elf-m10300.c (mn10300_elf_relax_section): Skip section before
10080 loading its contents if there's nothing to do in it.
10081
10082 2002-02-12 Alan Modra <amodra@bigpond.net.au>
10083
10084 * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for crossing
10085 64k boundary.
10086
10087 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Add dynamic
10088 DT_PPC64_OPD and DT_PPC64_OPDSZ tags.
10089 (ppc64_elf_finish_dynamic_sections): Set values for them.
10090
10091 2002-02-11 Michael Snyder <msnyder@redhat.com>
10092
10093 * elf-bfd.h (elfcore_write_lwpstatus): Add prototype.
10094 * elf.c (elfcore_grok_pstatus): Add prototype.
10095 (elfcore_grok_lwpstatus): Add prototype.
10096 (elfcore_write_lwpstatus): New function.
10097 (elfcore_write_pstatus): Fix typo, eliminate unnecessary memcpy.
10098
10099 2002-02-11 Alexandre Oliva <aoliva@redhat.com>
10100
10101 * elf32-sh.c: Added missing prototypes.
10102 * elf32-sh64.c: Likewise.
10103 (sh_elf_align_loads): Mark unused args as such.
10104 * elf64-sh64.c: Added missing prototypes.
10105 (struct elf_sh64_link_hash_entry): Fix typo.
10106 (sh_elf64_relocate_section): Fix info argument passed to
10107 _bfd_elf_section_offset.
10108
10109 2002-02-11 Alan Modra <amodra@bigpond.net.au>
10110
10111 * Makefile.am: "make dep-am".
10112 * Makefile.in: Regenerate.
10113 * aclocal.m4: Regenerate.
10114 * config.in: Regenerate.
10115 * configure: Regenerate.
10116
10117 2002-02-10 Daniel Jacobowitz <drow@mvista.com>
10118
10119 * coff-rs6000.c (xcoff_generate_rtinit): Silence uninitialized
10120 variable warnings.
10121 * elf32-sh.c (sh_elf_relax_section): Silence signed/unsigned
10122 comparison warning.
10123 * trad-core.c (trad_unix_core_file_p): Silence pointer/integer
10124 cast warnings for the common case.
10125
10126 2002-02-10 Hans-Peter Nilsson <hp@bitrange.com>
10127
10128 * config.bfd (sh-*-linux*, sh-*-elf* | sh-*-rtemself*): Add sh64
10129 vectors.
10130 (sh-*-netbsdelf*): New, to trump sh*-*-netbsdelf* and add sh64
10131 vectors.
10132
10133 2002-02-09 Richard Henderson <rth@redhat.com>
10134
10135 * elf64-alpha.c (elf64_alpha_howto): Add R_ALPHA_BRSGP.
10136 (elf64_alpha_reloc_map, elf64_alpha_check_relocs): Likewise.
10137 (elf64_alpha_relocate_section): Likewise.
10138 * reloc.c (BFD_RELOC_ALPHA_BRSGP): New.
10139 * bfd-in2.h, libbfd.h: Rebuild.
10140
10141 2002-02-09 Hans-Peter Nilsson <hp@bitrange.com>
10142
10143 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs): Check
10144 that base-plus-offset reloc accounting is consistent.
10145 (mmix_elf_relax_section): Keep base-plus-offset reloc accounting
10146 up to date for undefined symbols.
10147
10148 2002-02-08 Eric Christopher <echristo@redhat.com>
10149
10150 From Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
10151
10152 * elf32-mips.c (_bfd_mips_elf_fake_sections): Don't create .rela
10153 sections for the O32 ABI.
10154
10155 2002-02-08 Chris Demetriou <cgd@broadcom.com>
10156
10157 * elf32-arm.h: Fix formatting of _("...").
10158 * elf32-d10v.c: Likewise.
10159 * elf32-m68k.c: Likewise.
10160 * elf32-mips.c: Likewise.
10161
10162 2002-02-08 Ivan Guzvinec <ivang@opencores.org>
10163
10164 * coff-or32.c: Fix compile time warning messages.
10165
10166 2002-02-08 Alexandre Oliva <aoliva@redhat.com>
10167
10168 Contribute sh64-elf.
10169 2002-01-23 Alexandre Oliva <aoliva@redhat.com>
10170 * reloc.c (R_SH_GOTPLT32, R_SH_GOT_LOW16, R_SH_GOT_MEDLOW16,
10171 R_SH_GOT_MEDHI16, R_SH_GOT_HI16, R_SH_GOTPLT_LOW16,
10172 R_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_HI16,
10173 R_SH_PLT_LOW16, R_SH_PLT_MEDLOW16, R_SH_PLT_MEDHI16,
10174 R_SH_PLT_HI16, R_SH_GOTOFF_LOW16, R_SH_GOTOFF_MEDLOW16,
10175 R_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_HI16, R_SH_GOTPC_LOW16,
10176 R_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDHI16, R_SH_GOTPC_HI16,
10177 R_SH_GOT10BY4, R_SH_GOTPLT10BY4, R_SH_GOT10BY8, R_SH_GOTPLT10BY8,
10178 R_SH_COPY64, R_SH_GLOB_DAT64, R_SH_JMP_SLOT64, R_SH_RELATIVE64):
10179 New relocs.
10180 * libbfd.h, bfd-in2.h: Rebuilt.
10181 * elf32-sh.c (sh_elf_howto_table): Define new relocs.
10182 (sh_reloc_map): Map them.
10183 (PLT_ENTRY_SIZE, elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
10184 elf_sh_plt_entry_be, elf_sh_plt_entry_le, elf_sh_pic_plt_entry_be,
10185 elf_sh_pic_plt_entry_le, elf_sh_plt0_entry, elf_sh_plt_entry,
10186 elf_sh_pic_plt_entry, elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
10187 elf_sh_plt0_gotplt_offset, elf_sh_plt_temp_offset,
10188 elf_sh_plt_symbol_offset, elf_sh_plt_reloc_offset,
10189 movi_shori_putval) [INCLUDE_SHMEDIA]: New.
10190 (elf_sh_link_hash_entry) [INCLUDE_SHMEDIA]: Add
10191 datalabel_got_offset.
10192 (sh_elf_link_hash_newfunc): Initialize it.
10193 (sh_elf_relocate_section): Augment the scope of
10194 seen_stt_datalabel. Introduce GOTPLT support. Extend GOTPC, PLT,
10195 GOT and GOTOFF handling to new SHmedia relocation types. Support
10196 GOT_BIAS.
10197 (sh_elf_check_relocs): Likewise.
10198 (sh_elf_finish_dynamic_symbol) [TARGET_SHMEDIA]: Set up values in
10199 PLT entries using movi_shori_putval. Support GOT_BIAS.
10200 (sh_elf_finish_dynamic_sections): Likewise.
10201 * elf32-sh64.c (shmedia_prepare_reloc): Do not add addend to
10202 relocation, it's now done by the caller.
10203 (GOT_BIAS): New.
10204 * elf64-sh64.c (GOT_BIAS, PLT_ENTRY_SIZE, elf_sh64_sizeof_plt,
10205 elf_sh64_plt_plt0_offset, elf_sh64_plt0_gotplt_offset,
10206 elf_sh64_plt_temp_offset, elf_sh64_plt_symbol_offset,
10207 elf_sh64_plt_reloc_offset, ELF_DYNAMIC_INTERPRETER,
10208 elf_sh64_pcrel_relocs_copied, elf_sh64_link_hash_entry,
10209 elf_sh64_link_hash_table, sh64_elf64_link_hash_traverse,
10210 sh64_elf64_hash_table): New.
10211 (sh_elf64_howto_table): Introduce new relocs.
10212 (sh_elf64_info_to_howto): Accept new PIC relocs.
10213 (sh_elf64_relocate_section): Augment the scope of
10214 seen_stt_datalabel. Support new PIC relocs.
10215 (sh_elf64_check_relocs): Support new PIC relocs.
10216 (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le,
10217 elf_sh64_plt_entry_be, elf_sh64_plt_entry_le,
10218 elf_sh64_pic_plt_entry_be, elf_sh64_pic_plt_entry_le,
10219 elf_sh64_plt0_entry, elf_sh64_plt_entry, elf_sh64_pic_plt_entry,
10220 sh64_elf64_link_hash_newfunc, sh64_elf64_link_hash_table_create,
10221 movi_shori_putval, movi_3shori_putval,
10222 sh64_elf64_create_dynamic_sections,
10223 sh64_elf64_adjust_dynamic_symbol, sh64_elf64_discard_copies,
10224 sh64_elf64_size_dynamic_sections,
10225 sh64_elf64_finish_dynamic_symbol,
10226 sh64_elf64_finish_dynamic_sections): New.
10227 (elf_backend_create_dynamic-sections,
10228 bfd_elf64_bfd_link_hash_table_create,
10229 elf_backend_adjust_dynamic_symbol,
10230 elf_backend_size_dynamic_sections,
10231 elf_backend_finish_dynamic_symbol,
10232 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
10233 elf_backend_plt_readonly, elf_backend_want_plt_sym,
10234 elf_backend_got_header_size, elf_backend_plt_header_size):
10235 Define.
10236 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
10237 * elf32-sh.c: Renumbered and renamed some SH5 relocations to
10238 match official numbers and names; moved unmaching ones to the
10239 range 0xf2-0xff.
10240 * elf32-sh64.c, elf64-sh64.c: Likewise.
10241 2001-03-12 DJ Delorie <dj@redhat.com>
10242 * elf32-sh.c (sh_elf_relax_section): Don't relax SHmedia
10243 sections.
10244 2001-03-12 DJ Delorie <dj@redhat.com>
10245 * elf32-sh64.c (shmedia_prepare_reloc): Validate relocs that must
10246 be aligned.
10247 * elf64-sh64.c (sh_elf64_relocate_section): Ditto.
10248 2001-01-14 Hans-Peter Nilsson <hpn@cygnus.com>
10249 * elf32-sh64.c (bfd_elf32_bfd_copy_private_section_data): Define.
10250 (sh64_elf_fake_sections): Set type to SHT_SH5_CR_SORTED for a
10251 .cranges section with SEC_SORT_ENTRIES set.
10252 (sh64_backend_section_from_shdr): Set SEC_SORT_ENTRIES on an
10253 incoming sorted .cranges section.
10254 (sh64_bfd_elf_copy_private_section_data): New.
10255 (sh64_elf_final_write_processing): Only sort .cranges and modify
10256 start address if called by linker.
10257 2001-01-08 Ben Elliston <bje@redhat.com>
10258 * elf32-sh64.c (sh64_elf_final_write_processing): Activate
10259 Hans-Peter Nilsson's set bit 0 patch from 2001-01-06.
10260 * elf64-sh64.c (sh64_elf64_final_write_processing): Ditto.
10261 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
10262 * elf64-sh64.c (sh_elf64_howto_table): No open brace at start of
10263 line. Add comments before all entries.
10264 <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct and clarify describing
10265 comment.
10266 (sh_elf64_reloc): Correct head comment.
10267 (sh_elf64_relocate_section): Correct spacing.
10268 <relocating for a local symbol>: Do not honour STO_SH5_ISA32;
10269 instead call reloc_dangerous callback.
10270 <case R_SH_SHMEDIA_CODE>: New case.
10271 (sh_elf64_gc_mark_hook): Correct spacing.
10272 (sh_elf64_check_relocs): Ditto.
10273 * elf32-sh64.c (shmedia_prepare_reloc) <case R_SH_SHMEDIA_CODE>:
10274 New case.
10275 * elf32-sh.c: Correct #endif comments for #ifndef-wrapped
10276 functions.
10277 (sh_elf_howto_table) <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct,
10278 clarify describing comment. Add comments before all entries.
10279 (sh_elf_relocate_section) <relocating for a local symbol>: Do not
10280 honour STO_SH5_ISA32; instead call reloc_dangerous callback.
10281 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
10282 Sort .cranges section in final link. Prepare to set bit 0 on
10283 entry address.
10284 * elf32-sh64.c (struct sh64_find_section_vma_data): New.
10285 (sh64_elf_link_output_symbol_hook): Fix typo in prototype.
10286 (sh64_elf_set_mach_from_flags): Set SEC_DEBUGGING on incoming
10287 .cranges section.
10288 (sh64_backend_section_from_shdr): New, to recognize
10289 SHT_SH5_CR_SORTED on incoming .cranges section.
10290 (elf_backend_section_from_shdr): Define.
10291 (sh64_elf_final_write_processing): Sort outgoing .cranges
10292 section. (New, temporarily disabled:) Set bit 0 on entry address
10293 according to ISA type.
10294 (sh64_find_section_for_address): New.
10295 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb,
10296 crange_bsearch_cmpl): Move here from opcodes/sh64-dis.c.
10297 (sh64_address_in_cranges): Move here from opcodes/sh64-dis.c. Use
10298 bfd_malloc, not xmalloc.
10299 (sh64_get_contents_type): Move here from opcodes/sh64-dis.c. Make
10300 global.
10301 * elf32-sh64.c (sh64_elf64_final_write_processing): New, (but
10302 temporarily disabled) setting bit 0 on entry address.
10303 (elf_backend_final_write_processing): Define.
10304 2001-01-05 Hans-Peter Nilsson <hpn@cygnus.com>
10305 * elf32-sh.c (sh_elf_howto_table) <R_SH_PT_16>: Adjust fields to
10306 be a proper relocation for PTA and PTB rather than a marker.
10307 <R_SH_IMMU5, R_SH_IMMS6, R_SH_IMMU6, R_SH_IMMS10, R_SH_IMMS10BY2,
10308 R_SH_IMMS10BY4, R_SH_IMMS10BY8, R_SH_IMMS16, R_SH_IMMU16,
10309 R_SH_IMM_LOW16, R_SH_IMM_LOW16_PCREL, R_SH_IMM_MEDLOW16,
10310 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16_PCREL,
10311 R_SH_IMM_HI16, R_SH_IMM_HI16_PCREL, R_SH_64, R_SH_64_PCREL>:
10312 Zero src_mask.
10313 * elf64-sh64.c: Ditto.
10314 (sh_elf64_relocate_section) <case R_SH_PT_16>: New case.
10315 * elf32-sh64.c: Include opcodes/sh64-opc.h
10316 (shmedia_prepare_reloc): Take a bfd_link_info pointer as first
10317 argument. Drop const qualifiers from "bfd *" and "bfd_byte *"
10318 parameters. No unused parameters. Caller changed.
10319 <case R_SH_PT_16>: New case.
10320 * Makefile.am (elf32-sh64.lo): Add dependency on sh64-opc.h.
10321 * Makefile.in: Regenerate.
10322 2000-12-30 Hans-Peter Nilsson <hpn@cygnus.com>
10323 * elf64-sh64.c (sh64_elf64_fake_sections): Set SHF_SH5_ISA32 for
10324 all code sections.
10325 (sh_elf64_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
10326 (sh64_elf_merge_private_data): Ditto.
10327 * elf32-sh64.c (sh64_elf_fake_sections): Use sh64_elf_section_data
10328 to access stored section flags.
10329 (sh64_elf_final_write_processing): Return immediately unless
10330 called by linker. Use sh64_elf_section_data (cranges) to get size
10331 of linker-generated cranges entries.
10332 (sh64_elf_copy_private_data): Add missing "return true".
10333 (sh64_elf_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
10334 (sh_elf64_merge_private_data): Ditto.
10335 2000-12-19 Hans-Peter Nilsson <hpn@cygnus.com>
10336 * elf64-sh64.c (sh64_elf64_fake_sections): New, copy of
10337 elf64-sh64.c:sh64_elf_fake_sections.
10338 (elf_backend_fake_sections): Define as sh64_elf64_fake_sections.
10339 2000-12-18 Hans-Peter Nilsson <hpn@cygnus.com>
10340 * elf32-sh64.c (sh64_elf_copy_private_data_internal): Delete.
10341 (sh64_elf_final_write_processing): New.
10342 (elf_backend_final_write_processing): Define.
10343 (sh64_elf_fake_sections): Get header flags from tdata field.
10344 (sh64_elf_copy_private_data): Do not call
10345 sh64_elf_copy_private_data_internal, just copy e_flags field.
10346 (sh64_elf_merge_private_data): Do not call
10347 sh64_elf_copy_private_data_internal.
10348 2000-12-12 Hans-Peter Nilsson <hpn@cygnus.com>
10349 Remove EF_SH64_ABI64, let ELF size make difference.
10350 Remove SH64-specific BFD section flag.
10351 * elf32-sh64.c (sh64_elf_fake_sections): Recognize section as
10352 containing SHmedia through elf_section_data (asect)->tdata
10353 non-zero, not using a BFD section flag.
10354 (sh64_elf_set_mach_from_flags): Don't recognize EF_SH64_ABI64.
10355 (sh64_elf_merge_private_data): Similar.
10356 (elf_backend_section_flags): Don't define.
10357 (sh64_elf_backend_section_flags): Delete.
10358 * elf64-sh64.c (sh_elf64_set_mach_from_flags): Recognize EF_SH64,
10359 not EF_SH64_ABI64.
10360 (sh_elf64_merge_private_data): Similar.
10361 * section.c (Section flags definitions): Don't define
10362 SEC_SH_ISA_SHMEDIA.
10363 (bfd-in2.h): Regenerate.
10364 2000-12-09 Hans-Peter Nilsson <hpn@cygnus.com>
10365 Make DataLabel references work with partial linking.
10366 * elf32-sh64.c: Fix formatting.
10367 (sh64_elf_link_output_symbol_hook): New.
10368 (elf_backend_link_output_symbol_hook): Define to
10369 sh64_elf_link_output_symbol_hook.
10370 (sh64_elf_add_symbol_hook): Make DataLabel symbol just global
10371 undefined if partial linking. Adjust sanity check.
10372 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): New.
10373 (elf_backend_link_output_symbol_hook): Define to
10374 sh64_elf64_link_output_symbol_hook.
10375 (sh64_elf64_add_symbol_hook): Make DataLabel symbol just global
10376 undefined if partial linking. Adjust sanity check.
10377 2000-12-07 Hans-Peter Nilsson <hpn@cygnus.com>
10378 Implement semantics for inter-file DataLabel references.
10379 * elf64-sh64.c (DATALABEL_SUFFIX): Define.
10380 (sh64_elf64_add_symbol_hook): New.
10381 (sh_elf64_relocate_section): If passing an indirect symbol with
10382 st_type STT_DATALABEL on the way to a symbol with st_other
10383 STO_SH5_ISA32, do not bitor 1 to the relocation.
10384 (elf_backend_add_symbol_hook): Define to
10385 sh64_elf64_add_symbol_hook.
10386 * elf64-sh32.c: Tweak comments.
10387 (DATALABEL_SUFFIX): Define.
10388 (sh64_elf_add_symbol_hook): New.
10389 (elf_backend_add_symbol_hook): Define to sh64_elf_add_symbol_hook.
10390 * elf32-sh.c (sh_elf_relocate_section): If passing an indirect
10391 symbol with st_type STT_DATALABEL on the way to a symbol with
10392 st_other STO_SH5_ISA32, do not bitor 1 to the relocation.
10393 2000-12-05 Hans-Peter Nilsson <hpn@cygnus.com>
10394 Pass through STT_DATALABEL.
10395 * elf32-sh64.c (sh64_elf_get_symbol_type): New.
10396 (elf_backend_get_symbol_type): Define.
10397 * elf64-sh64.c (sh64_elf64_get_symbol_type): New.
10398 (elf_backend_get_symbol_type): Define.
10399 2000-11-30 Hans-Peter Nilsson <hpn@cygnus.com>
10400 * elf32-sh64.c: Tweak comments.
10401 (sh64_elf_copy_private_data_internal): Add prototype.
10402 (bfd_elf32_bfd_set_private_flags): Define.
10403 (sh64_elf_copy_private_data_internal): Compare machine name, not
10404 textual BFD target name, to check whether to copy section flag
10405 SHF_SH5_ISA32.
10406 (sh64_elf_merge_private_data): Validize bfd_get_arch_size.
10407 Tweak section-contents-type-mismatch message.
10408 (shmedia_prepare_reloc): Add ATTRIBUTE_UNUSED markers.
10409 Validize reloc-types.
10410 * elf64-sh64.c: New file.
10411 * targets.c (bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec): Declare.
10412 * Makefile.am (BFD64_BACKENDS): Add elf64-sh64.lo.
10413 (BFD64_BACKENDS_CFILES): Add elf64-sh64.c.
10414 Regenerate dependencies.
10415 * Makefile.in: Regenerate.
10416 * config.bfd (sh64-*-elf*): Add bfd_elf64_sh64_vec and
10417 bfd_elf64_sh64l_vec.
10418 * configure.in: Handle bfd_elf64_sh64_vec and
10419 bfd_elf64_sh64l_vec.
10420 * configure: Regenerate.
10421 * po/POTFILES.in: Regenerate.
10422 * po/bfd.pot: Regenerate.
10423 2000-11-29 Hans-Peter Nilsson <hpn@cygnus.com>
10424 * elf32-sh64.c (sh64_elf_set_mach_from_flags): Do not recognize
10425 anything else but EF_SH64 and EF_SH64_ABI64.
10426 (sh64_elf_merge_private_data): Emit error for anything else but
10427 EF_SH64 and EF_SH64_ABI64.
10428 * config.bfd: Remove bfd_elf32_shblin_vec and bfd_elf32_shlin_vec
10429 from targ_selvecs.
10430 * configure.in: Add cofflink.lo to bfd_elf32_sh64_vec and
10431 bfd_elf32_sh64l_vec as a temporary measure.
10432 * configure: Regenerate.
10433 2000-11-27 Hans-Peter Nilsson <hpn@cygnus.com>
10434 * cpu-sh.c (arch_info_struct): Include sh5 item
10435 unconditionalized.
10436 * config.bfd (sh64-*-elf*): Do not set targ_cflags.
10437 Add targ_selvecs bfd_elf32_sh_vec, bfd_elf32_shl_vec,
10438 bfd_elf32_shblin_vec and bfd_elf32_shlin_vec.
10439 * elf32-sh64.c: Tweak comments.
10440 (sh64_elf_set_mach_from_flags): Recognize all machine flags that
10441 are proper subsets of SH64 as bfd_mach_sh5. Add EF_SH64_ABI64.
10442 (sh64_elf_copy_private_data_internal): Wrap long line.
10443 (sh64_elf_merge_private_data): Rewrite to allow objects from
10444 SH64 subsets to be linked together.
10445 (INCLUDE_SHMEDIA): Define.
10446 * elf32-sh.c (sh_elf_relocate_section) <local symbol>:
10447 Parenthesize plus-expression inside or-expression.
10448 <global symbol>: Ditto.
10449 (sh_elf_set_mach_from_flags): Remove code refusing
10450 deleted EF_SH64_32BIT_ABI flag.
10451 2000-11-26 Hans-Peter Nilsson <hpn@cygnus.com>
10452 * elf32-sh.c (sh_elf_howto_table) <R_SH_IMM_LOW16_PCREL,
10453 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16_PCREL,
10454 R_SH_IMM_HI16_PCREL, R_SH_64_PCREL>: Set pcrel_offset to true.
10455 (sh_elf_relocate_section) <local symbol>: Or 1 in
10456 calculation of relocation if sym->st_other & STO_SH5_ISA32.
10457 <global symbol>: Ditto if h->other & STO_SH5_ISA32.
10458 * elf32-sh64.c (shmedia_prepare_reloc): Add rel->r_addend to
10459 relocation.
10460 2000-11-24 Hans-Peter Nilsson <hpn@cygnus.com>
10461 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64.lo.
10462 (BFD32_BACKENDS_CFILES): Add elf32-sh64.c.
10463 Regenerate dependencies.
10464 * Makefile.in: Regenerate.
10465 * archures.c: Add bfd_mach_sh5.
10466 * config.bfd: Map targ_cpu sh* to bfd_sh_arch.
10467 Handle sh64-*-elf*. Set targ_cflags to -DINCLUDE_SHMEDIA.
10468 * configure.in: Handle bfd_elf32_sh64_vec and bfd_elf32_sh64l_vec.
10469 * configure: Regenerate.
10470 * reloc.c (BFD_RELOC_SH_SHMEDIA_CODE, BFD_RELOC_SH_IMMU5,
10471 BFD_RELOC_SH_IMMS6, BFD_RELOC_SH_IMMS6BY32, BFD_RELOC_SH_IMMU6,
10472 BFD_RELOC_SH_IMMS10, BFD_RELOC_SH_IMMS10BY2,
10473 BFD_RELOC_SH_IMMS10BY4, BFD_RELOC_SH_IMMS10BY8,
10474 BFD_RELOC_SH_IMMS16, BFD_RELOC_SH_IMMU16, BFD_RELOC_SH_IMM_LOW16,
10475 BFD_RELOC_SH_IMM_LOW16_PCREL, BFD_RELOC_SH_IMM_MEDLOW16,
10476 BFD_RELOC_SH_IMM_MEDLOW16_PCREL, BFD_RELOC_SH_IMM_MEDHI16,
10477 BFD_RELOC_SH_IMM_MEDHI16_PCREL, BFD_RELOC_SH_IMM_HI16,
10478 BFD_RELOC_SH_IMM_HI16_PCREL, BFD_RELOC_SH_PT_16): New relocations.
10479 * cpu-sh.c [INCLUDE_SHMEDIA] (arch_info_struct): Define and link
10480 in item for SH5.
10481 * elf32-sh.c [INCLUDE_SHMEDIA] (sh_elf_howto_table): Add howto items
10482 for SHmedia relocs.
10483 [INCLUDE_SHMEDIA] (sh_rel): Add mappings for SHmedia relocs.
10484 [INCLUDE_SHMEDIA] (sh_elf_relocate_section) [default]: Call
10485 shmedia_prepare_reloc, goto final_link_relocate if it returns
10486 non-zero, else fail as before.
10487 (sh_elf_set_mach_from_flags): Provide function only if not defined
10488 as macro. Do not recognize objects with EF_SH64_32BIT_ABI set.
10489 (sh_elf_set_private_flags): Provide function only if not defined
10490 as a macro.
10491 (sh_elf_copy_private_data): Similar.
10492 (sh_elf_merge_private_data): Similar.
10493 * section.c (SEC_SH_ISA_SHMEDIA): New.
10494 * targets.c (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec): Declare.
10495 * elf32-sh64.c: New file.
10496 * libbfd.h: Regenerate.
10497 * bfd-in2.h: Regenerate.
10498 * po/POTFILES.in: Regenerate.
10499 * po/bfd.pot: Regenerate.
10500 * bfd-in2.h: Regenerate.
10501 * libbfd.h: Regenerate.
10502
10503 2002-02-07 Daniel Jacobowitz <drow@mvista.com>
10504
10505 * bfd-in.h: Update <stdbool.h> check to only see if <stdbool.h> has
10506 been included, not drag it in.
10507 * bfd-in2.h: Regenerate.
10508
10509 2002-02-06 H.J. Lu (hjl@gnu.org)
10510
10511 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Update
10512 the mach and ISA fields if necessary.
10513
10514 2002-02-06 Nick Clifton <nickc@cambridge.redhat.com>
10515
10516 * coffcode.h (coff_set_arch_mach_hook): Select the highest known
10517 ARM architecture when an F_ARM_5 flag is detected, since we cannot
10518 be sure exactly which architecture this represents.
10519
10520 2002-02-05 Nick Clifton <nickc@redhat.com>
10521
10522 * po/tr.po: Updated translation.
10523
10524 2002-02-05 Alan Modra <amodra@bigpond.net.au>
10525
10526 From Jimi X <jimix@watson.ibm.com>
10527 * archures (bfd_mach_ppc64): Define.
10528 (bfd_powerpc_arch): Rename to bfd_powerpc_archs.
10529 (bfd_powerpc_arch): Define.
10530 * bfd-in2.h: Regenerate.
10531 * cpu-powerpc.c (arch_info_struct): Rename to bfd_powerpc_archs.
10532 (bfd_powerpc_arch): Move to tail of bfd_powerpc_archs.
10533 (bfd_powerpc_archs): Add default powerpc64 arch.
10534
10535 2002-02-05 Alan Modra <amodra@bigpond.net.au>
10536
10537 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Check for relocs
10538 against section syms in readonly sections. Don't do the global
10539 sym check if we find one.
10540 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
10541 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
10542 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
10543 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
10544 (elf_s390_grok_prstatus): Add missing prototype.
10545
10546 2002-02-04 Hans-Peter Nilsson <hp@bitrange.com>
10547
10548 * elf64-mmix.c (mmix_dump_bpo_gregs): New function.
10549 (mmix_elf_check_common_relocs) <case R_MMIX_BASE_PLUS_OFFSET>:
10550 Call bfd_get_section_by_name only once. Initialize
10551 bpodata->n_bpo_relocs_this_section.
10552 (_bfd_mmix_prepare_linker_allocated_gregs): Remove comment
10553 referring to DSOs.
10554 (bpo_reloc_request_sort_fn): Don't use difference of values as
10555 return-value.
10556
10557 2002-02-02 David O'Brien <obrien@FreeBSD>
10558
10559 * configure.in: Tweak the FreeBSD 4.x recognition more. Only treat
10560 version 4.5 and later the same as 5-CURRENT.
10561 * configure: Re-generate.
10562
10563 2002-02-02 Jason Thorpe <thorpej@wasabisystems.com>
10564
10565 * config.bfd (hppa*-*-netbsd*): New target.
10566
10567 2002-01-31 Philipp Thomas <pthomas@suse.de>
10568
10569 * coff-arm.c (coff_arm_merge_private_bfd_data): Move ERROR
10570 to front of message. Unify messages with elf32-arm.h. Use
10571 commas where neccessary.
10572 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Use all upcase
10573 ERROR in messages. Unify messages with coff-arm.c. Correct
10574 VFP/FPA error message.
10575 (elf32_arm_print_private_bfd_data): Don't mark APCS-26 and
10576 APCS-32 for translation.
10577
10578 2002-02-01 Hans-Peter Nilsson <hp@bitrange.com>
10579
10580 Perform on-demand global register allocation from
10581 R_MMIX_BASE_PLUS_OFFSET relocs.
10582 * elf64-mmix.c (struct bpo_reloc_section_info, struct
10583 bpo_reloc_request, struct bpo_greg_section_info): New.
10584 (mmix_elf_check_common_relocs, mmix_elf_gc_sweep_hook,
10585 bpo_reloc_request_sort_fn, mmix_elf_relax_section,
10586 _bfd_mmix_check_all_relocs,
10587 _bfd_mmix_prepare_linker_allocated_gregs,
10588 _bfd_mmix_finalize_linker_allocated_gregs): New functions.
10589 (elf_mmix_howto_table): Correct src_mask for most relocs.
10590 (mmix_elf_perform_relocation) <case R_MMIX_BASE_PLUS_OFFSET>: New
10591 case.
10592 (mmix_final_link_relocate) <case R_MMIX_BASE_PLUS_OFFSET>: New
10593 case. Fix typo in comment. New label do_mmix_reloc.
10594 (mmix_elf_check_relocs): Abuse bfd_link_info member base_file to
10595 store first object file with a base-plus-offset reloc. Call
10596 mmix_elf_check_common_relocs for the part common with mmo.
10597 (mmix_elf_final_link): Write out linker-allocated register
10598 contents section.
10599 (elf_backend_gc_sweep_hook): Define.
10600 (bfd_elf64_bfd_relax_section): Define.
10601
10602 * mmo.c: Don't include <ctype.h>
10603 (mmo_init): Correct init-once logic.
10604
10605 2002-02-01 Tom Rix <trix@redhat.com>
10606
10607 * config.bfd: Conditionally support <aiaff> for pre AIX 4.3.
10608
10609 2002-02-01 Alan Modra <amodra@bigpond.net.au>
10610
10611 * Makefile.am: Run "make dep-am"
10612 * Makefile.in: Regenerate.
10613
10614 2002-01-31 David O'Brien <obrien@FreeBSD>
10615
10616 * configure.in: Recognize the differences in core files from FreeBSD
10617 4.{0,1} and later versions of 4.x. This treats 4.2+ the same as
10618 5-CURRENT.
10619 * configure: Regenerate.
10620
10621 2002-01-31 Ivan Guzvinec <ivang@opencores.org>
10622
10623 * coff-or32.c: New file.
10624 * cpu-or32.c: New file.
10625 * elf32-or32.c: New file.
10626 * archures.c: Add support for or32.
10627 * targets.c: Add support for or32.
10628 * bfd-in2.h: Regenerate.
10629 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags,
10630 coff_write_object_contents): Add support for or32.
10631 * config.bfd: Add target.
10632 * configure.in: Add support for or32.
10633 * configure: Regenerate.
10634 * Makefile.am: Add support for or32.
10635 * Makefile.in: Regenerate.
10636 * po/SRC-POTFILES.in: Add or32 files.
10637 * po/bfd.pot: Regenerate.
10638
10639 2002-01-31 Nick Clifton <nickc@cambridge.redhat.com>
10640 Don Lindsay <lindsayd@cisco.com>
10641
10642 * elf32-mips.c (mips_elf_calculate_relocation): Replace 'return
10643 false' with a return of a bfd_reloc_ error code.
10644
10645 2002-01-31 Hans-Peter Nilsson <hp@axis.com>
10646
10647 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
10648 unexport unreferenced symbols when --export-dynamic. Call
10649 _bfd_elf_strtab_delref when unexporting.
10650
10651 2002-01-30 Daniel Jacobowitz <drow@mvista.com>
10652
10653 * bfd-in.h: Include <stdbool.h> if it is available.
10654 * bfd-in2.h: Regenerated.
10655
10656 2002-01-31 Alan Modra <amodra@bigpond.net.au>
10657
10658 * elf64-ppc.c (func_desc_adjust): STV_PROTECTED functions should
10659 not go via the plt.
10660
10661 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
10662
10663 * archures.c: Tidy up formatting of embedded comments.
10664 * bfd.c: Tidy up formatting of embedded comments.
10665 * bfd-in.h: Fix formatting of comments.
10666 * reloc.c: Tidy up formatting of ordinary & embedded comments.
10667 * section.c: Tidy up formatting of embedded comments.
10668 * syms.c: Tidy up formatting of embedded comments.
10669 * targets.c: Tidy up formatting of embedded comments.
10670
10671 * bfd-in2.h: Regenerate.
10672
10673 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
10674
10675 * vms-tir.c (cmd_name): New function.
10676 (tir_cmd_name): New function.
10677 (etir_sta, etir_sto, etir_opr, etir_stc): Use cmd_name().
10678 (tir_opr, tir_ctl, tir_cmd): use tir_cmd_name().
10679 Fix formatting.
10680
10681 * peXXigen.c (pe_print_idata): Rearrange message to aid in
10682 translation.
10683 (pe_print_pdata): Rearrange message to aid in translation.
10684
10685 * libbfd.c (warn_deprecated): Rearrange error message to aid in
10686 translation.
10687
10688 * ihex.c (ihex_write_object_contents): Fix spelling typo.
10689
10690 * ieee.c (ieee_slurp_external_symbols): Remove spurious space.
10691
10692 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Rearrange error
10693 message to aid in translation.
10694
10695 * elf64-mmix.c (mmix_final_link_relocate): Rearrange error message
10696 to aid in translation.
10697
10698 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix typo.
10699
10700 2002-01-30 Philipp Thomas <pthomas@suse.de>
10701
10702 * coff-arm.c, elf32-elf.h: Unify messages.
10703
10704 2002-01-30 Nick Clifton <nickc@redhat.com>
10705
10706 * po/sv.po: Updated translation.
10707
10708 2002-01-30 Philipp Thomas <pthomas@suse.de>
10709
10710 * dwarf2.c (read_abbrev): Use full section name in error message.
10711 (decode_line_info): Likewise.
10712
10713 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Don't translate debugging
10714 message.
10715
10716 2002-01-30 Alan Modra <amodra@bigpond.net.au>
10717
10718 * elf64-ppc.c (func_desc_adjust): Only provide missing function
10719 descriptor symbols for undefined function code syms. Clear
10720 ELF_LINK_NON_ELF so that they can stay weak.
10721
10722 2002-01-29 Chris Demetriou <cgd@broadcom.com>
10723 Mitch Lichtenberg <mpl@broadcom.com>
10724
10725 * bfd-in.h (bfd_mips_elf32_create_embedded_relocs): New prototype.
10726 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): New function
10727 to handle 32-bit ELF embedded reloc (ld --embedded-relocs)
10728 generation.
10729 * bfd-in2.h: Regenerate.
10730
10731 2002-01-29 Chris Demetriou <cgd@broadcom.com>
10732
10733 * elf32-mips.c: Add additional comments about HI16 relocation
10734 processing.
10735 (_bfd_mips_elf_hi16_reloc): Don't subtract address here for
10736 pc-relative relocations. (Reverts change made on 2001-10-31.)
10737 (_bfd_mips_elf_lo16_reloc): Subtract address of LO16 part here
10738 for pc-relative relocations.
10739 (mips_elf_calculate_relocation): Add a comment about a kludge
10740 in the R_MIPS_GNU_REL_HI16 handling.
10741 (_bfd_mips_elf_relocate_section): Implement that kludge;
10742 adjust pc-relative HI16 relocation for difference in HI16 and
10743 LO16 addresses, since it can't easily be done in
10744 mips_elf_calculate_relocation.
10745
10746 2002-01-29 Martin Schwidefsky <schwidefsky@de.ibm.com>
10747
10748 * elf32-i386 (elf_i386_adjust_dynamic_symbol): Do not replace PLT32
10749 relocations with PC32 relocations for undefined or weak symbols.
10750 * elf32-s390 (elf_i386_adjust_dynamic_symbol): Likewise.
10751 * elf64-s390x (elf_i386_adjust_dynamic_symbol): Likewise.
10752
10753 2002-01-28 Jason Thorpe <thorpej@wasabisystems.com>
10754
10755 * elfcore.h (elf_core_file_p): Improve comment for last change.
10756
10757 2002-01-27 Daniel Jacobowitz <drow@mvista.com>
10758
10759 * configure: Regenerated.
10760
10761 2002-01-27 Jason Thorpe <thorpej@wasabisystems.com>
10762
10763 * elfcore.h (elf_core_file_p): Set the machine architecture
10764 before processing the program headers.
10765
10766 2002-01-26 Hans-Peter Nilsson <hp@bitrange.com>
10767
10768 * configure.in <64-bit configuration>: If using gcc, check and
10769 emit error for egcs-1.1.2.
10770 * configure: Regenerate.
10771
10772 2002-01-26 Egor Duda <deo@logos-m.ru>
10773
10774 * elf.c (elfcore_grok_win32pstatus): Copy only as much information
10775 as possible to avoid stack corruption.
10776
10777 2002-01-26 Richard Henderson <rth@redhat.com>
10778
10779 * elf64-alpha.c (elf64_alpha_check_relocs): Don't set reltext
10780 for non-allocated sections.
10781
10782 2002-01-25 Mark Kettenis <kettenis@gnu.org>
10783
10784 * elf.c (elfcore_write_prstatus): Make sure we pass the address of
10785 prstat.pr_reg even if it is a struct.
10786
10787 2002-01-25 Steve Ellcey <sje@cup.hp.com>
10788
10789 * elfxx-ia64.c: Reset AIX vector function overrides for HP-UX.
10790
10791 2002-01-25 Philipp Thomas <pthomas@suse.de>
10792
10793 * coffgen.c (coff_print_symbol): Don't mark info message
10794 for translation.
10795
10796 2002-01-25 Nick Clifton <nickc@redhat.com>
10797
10798 * po/fr.po: Updated translation.
10799 * po/es.po: Updated translation.
10800
10801 2002-01-25 Philipp Thomas <pthomas@suse.de>
10802
10803 * coff-alpha.c (alpha_relocate_section): Unify warning message
10804 for GP relative relocations without GP defined.
10805 * coff-mips.c (mips_relocate_section): Likewise.
10806
10807 2002-01-25 Alan Modra <amodra@bigpond.net.au>
10808
10809 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Avoid
10810 unsigned overflow when new_offset < old_offset.
10811
10812 2002-01-24 Philipp Thomas <pthomas@suse.de>
10813
10814 * bfd.c (_bfd_abort): Fix typo.
10815
10816 2002-01-23 Richard Henderson <rth@redhat.com>
10817
10818 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't suppress
10819 plt entries for undefweak symbols.
10820
10821 2002-01-23 Steve Ellcey <sje@cup.hp.com>
10822
10823 * targets.c (bfd_elf32_ia64_hpux_big_vec): Add to DEFAULT_VECTOR.
10824 (bfd_elf64_ia64_hpux_big_vec): Ditto.
10825 (bfd_elf32_h8300_vec): Ditto.
10826
10827 2002-01-23 Alan Modra <amodra@bigpond.net.au>
10828
10829 * elf64-ppc.c: Remove stale part of ABI comment.
10830 (NO_OPD_RELOCS): Define.
10831 (ppc64_elf_check_relocs): Use it.
10832 (ppc64_elf_relocate_section): Here too.
10833 (build_one_stub): Don't point function syms at the stub. Instead,
10834 hijack plt.offset.
10835 (ppc64_elf_relocate_section): Check whether REL24 relocs should
10836 really go to the stub. Make all dynamic relocs in opd against
10837 locals.
10838 (ppc64_elf_finish_dynamic_symbol): Allow for non-standard use of
10839 plt.offset.
10840
10841 2002-01-22 Richard Henderson <rth@redhat.com>
10842
10843 * elf64-alpha.c (INSN_UNOP): Encode with RB as $sp.
10844
10845 2002-01-22 Alan Modra <amodra@bigpond.net.au>
10846
10847 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Correct sign of
10848 TOC_BASE_OFF adjustment.
10849
10850 * Makefile.am: Run "make dep-am".
10851 * Makefile.in: Regenerate.
10852 * po/SRC-POTFILES.in: Regenerate.
10853
10854 2002-01-22 John David Anglin <dave@hiauly1.hia.nrc.ca>
10855
10856 * configure.host (hppa*64*-*-hpux*, hppa*64*-*-linux*): Add new
10857 host defines.
10858
10859 2002-01-21 Hans-Peter Nilsson <hp@axis.com>
10860
10861 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GOTREL>:
10862 Check for and emit error if sgot is NULL at this point.
10863
10864 2002-01-21 Jason Thorpe <thorpej@wasabisystems.com>
10865
10866 * config.bfd (ia64*-*-netbsd*): New target.
10867
10868 2002-01-21 Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
10869
10870 * som.c (som_write_space_strings): Comment typo fix.
10871
10872 2002-01-21 Alan Modra <amodra@bigpond.net.au>
10873
10874 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_func and
10875 is_func_descriptor fields.
10876 (link_hash_newfunc): Init them.
10877 (ppc64_elf_check_relocs): Only R_PPC24_REL24 syms starting with a
10878 dot are candidates for plt entries. When processing .opd relocs,
10879 set function descriptor strings to point inside function code
10880 string, and set new ppc_link_hash_entry fields.
10881 (ppc64_elf_gc_sweep_hook): Don't sweep R_PPC64_REL24 relocs.
10882 (ppc64_elf_adjust_dynamic_symbol): Remove most code dealing with
10883 function descriptors. It's now done in..
10884 (func_desc_adjust): New.
10885 (ppc64_elf_func_desc_adjust): New.
10886 (define elf_backend_always_size_sections): Define.
10887 (ppc64_elf_hide_symbol): New.
10888 (define elf_backend_hide_symbol): Define.
10889 (allocate_dynrelocs): Remove code looking up function descriptors
10890 as that has been done earlier.
10891 (ppc64_elf_size_dynamic_sections): Use htab shortcut to elf hash
10892 table.
10893 (ppc64_elf_finish_dynamic_symbol): Likewise. Remove code looking
10894 up function descriptor.
10895 (build_one_stub): Look up the function code sym. Check for
10896 invalid plt offsets.
10897 (ppc64_elf_relocate_section): Tweak calls to undefined weak syms.
10898 Convert R_PPC64_TOC relocs to R_PPC64_RELATIVE in shared libs.
10899
10900 * elf-bfd.h (elf_backend_data <elf_backend_hide_symbol>): Add
10901 boolean param.
10902 (_bfd_elf_link_hash_hide_symbol): Likewise.
10903 * elflink.h (elf_link_add_object_symbols): Adjust call to
10904 elf_backend_hide_symbol.
10905 (elf_fix_symbol_flags): Likewise.
10906 (elf_link_assign_sym_version): Likewise. Use bfd_malloc rather
10907 than bfd_alloc.
10908 * elf.c (_bfd_elf_link_hash_hide_symbol): Add "force_local" param.
10909 Set ELF_LINK_FORCED_LOCAL and call _bfd_elf_strtab_delref.
10910 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
10911 (clobber_millicode_symbols): Adjust to suit new hide_symbol.
10912 * elf32-cris.c (elf_cris_hide_symbol): Add "force_local" param
10913 and adjust to suit.
10914 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise, and call
10915 _bfd_elf_link_hash_hide_symbol rather than duplicating code.
10916 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
10917
10918 2002-01-18 Alan Modra <amodra@bigpond.net.au>
10919
10920 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Test for a
10921 dynamic function descriptor symbol, not the associated function
10922 symbol.
10923
10924 2002-01-17 Eric Christopher <echristo@redhat.com>
10925
10926 * elf32-mips.c (mips_elf_calculate_relocation): Fix typo.
10927
10928 2002-01-17 Nick Clifton <nickc@cambridge.redhat.com>
10929
10930 * po/bfd.pot: Regenerate.
10931 * po/fr.po: Regenerate.
10932
10933 2002-01-17 Alan Modra <amodra@bigpond.net.au>
10934
10935 * elf-bfd.h (elf_backend_data <elf_backend_section_from_bfd_section>):
10936 Remove "Elf_Internal_Shdr *" param.
10937 (_bfd_mips_elf_section_from_bfd_section): Ditto.
10938 * elf32-mips.c (_bfd_mips_elf_section_from_bfd_section): Ditto.
10939 * elf32-m32r.c (_bfd_m32r_elf_section_from_bfd_section): Ditto.
10940 * elf32-v850.c (v850_elf_section_from_bfd_section): Ditto.
10941 * elf64-mmix.c (mmix_elf_section_from_bfd_section): Ditto.
10942 * elfxx-ia64.c (elfNN_hpux_backend_section_from_bfd_section): Ditto.
10943 * elf.c (_bfd_elf_section_from_bfd_section): Allow backend
10944 function to override special sections. Remove hdr arg from
10945 backend call, and don't loop.
10946
10947 2002-01-16 Eric Christopher <echristo@redhat.com>
10948
10949 * elf32-mips.c (mips_elf_calculate_relocation): Set require_jalxp
10950 on R_MIPS_26 and target is 16bit. Add R_MIPS16_GPREL to list of
10951 relocations requiring gp0 and gp.
10952
10953 2002-01-16 Richard Earnshaw <rearnsha@arm.com>
10954
10955 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle
10956 EF_ARM_VFP_FLOAT.
10957 (elf32_arm_print_private_bfd_data): Likewise.
10958
10959 2002-01-16 Nick Clifton <nickc@cambridge.redhat.com>
10960
10961 * po/tr.po: Import new version.
10962
10963 2002-01-16 Alan Modra <amodra@bigpond.net.au>
10964
10965 * elf64-ppc.c (ppc64_elf_howto_raw): Remove stale FIXMEs.
10966 (ppc64_elf_reloc_type_lookup): Use proper CTOR reloc.
10967 (ORI_R0_R0_0): Correct.
10968
10969 2002-01-16 Alan Modra <amodra@bigpond.net.au>
10970
10971 * elflink.c (_bfd_elf_create_dynamic_sections): Don't set SEC_CODE
10972 when plt_not_loaded.
10973 * elf64-ppc.c (ppc64_elf_create_dynamic_sections): No need to
10974 clear .plt SEC_CODE here. Create .stub and correct .glink flags.
10975 (PLT_INITIAL_ENTRY_SIZE): Set to 24.
10976 (ppc64_elf_glink_code): Delete.
10977 (PPC64_ELF_GLINK_SIZE): Delete.
10978 (ADDIS_R12_R2, STD_R2_40R1, LD_R11_0R12, LD_R2_0R12, MTCTR_R11,
10979 BCTR, ADDIS_R12_R12_1, LD_R2_40R1, NOP, LI_R0_0, B_DOT, LIS_R0_0,
10980 ORI_R0_R0_0): Define.
10981 (PLT_CALL_STUB_SIZE, GLINK_CALL_STUB_SIZE): Define.
10982 (struct ppc_link_hash_table): Add sstub and plt_overflow.
10983 (ppc64_elf_link_hash_table_create): Init them.
10984 (ppc64_elf_check_relocs <R_PPC64_REL24>): Refcount .plt entry.
10985 Don't copy to shared lib.
10986 (ppc64_elf_check_relocs): Call bfd_set_error on errors.
10987 (ppc64_elf_gc_sweep_hook <R_PPC64_REL24>): Sweep plt refcount.
10988 (allocate_dynrelocs <plt>): Don't change function sym here. Make
10989 room for .stub and .glink code.
10990 (ppc64_elf_size_dynamic_sections): Handle .stub. Make entry for
10991 DT_PPC64_GLINK.
10992 (ppc64_elf_final_link): Rename to ppc64_elf_set_toc. Don't call
10993 bfd_elf64_bfd_final_link.
10994 (bfd_elf64_bfd_final_link): Don't define.
10995 (ppc64_elf_size_stubs): New.
10996 (build_plt_stub): New.
10997 (build_one_stub): New.
10998 (ppc64_elf_build_stubs): New.
10999 (ppc64_elf_relocate_section <toc relocs>): Remove assert.
11000 (ppc64_elf_relocate_section): Don't copy R_PPC64_REL24 relocs.
11001 (ppc64_elf_finish_dynamic_symbol): Don't build stubs here. Set
11002 DT_PPC64_GLINK entry. Tweak DT_PLTGOT, DT_JMPREL, DT_PLTRELSZ in
11003 case output sections not separate. Adjust DT_RELASZ to not
11004 include plt relocs. Set reserved got entry. Set got and plt
11005 entry size.
11006 (elf_backend_got_header_size): Set to 8.
11007 * elf64-ppc.h: New file.
11008
11009 2002-01-16 Alan Modra <amodra@bigpond.net.au>
11010
11011 * elf32-arm.h (elf32_arm_size_dynamic_sections): When removing
11012 sections, use bfd_section_list_remove.
11013 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
11014 * elflink.h (elf_link_add_object_symbols): When removing all
11015 sections, use bfd_section_list_clear.
11016
11017 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
11018
11019 * po/sv.po: New file: Swedish translation.
11020 * configure.in (ALL_LINGUAS): Add sv.
11021 * configure: Regenerate.
11022
11023 2002-01-15 Jakub Jelinek <jakub@redhat.com>
11024
11025 * elflink.h (elf_link_input_bfd): Back out 2002-01-07 change.
11026 * elf.c (merge_sections_remove_hook): New function.
11027 (_bfd_elf_merge_sections): Pass it as 3rd argument to
11028 _bfd_merge_sections.
11029 * libbfd-in.h (_bfd_merge_sections): Add 3rd argument.
11030 * libbfd.h: Rebuilt.
11031 * merge.c (_bfd_merge_sections): Add remove_hook argument.
11032 Call remove_hook if a SEC_EXCLUDE section is encountered.
11033
11034 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
11035
11036 * elf32-xstormy16.c (xstormy16_reloc_map): Add new field 'table'.
11037 (xstormy16_reloc_map): Initialise new field with correct howto
11038 table.
11039 (xstormy16_reloc_type_lookup): Use 'table' field to locate correct
11040 howto entry.
11041
11042 2002-01-10 Michael Snyder <msnyder@redhat.com>
11043
11044 * elf.c (elfcore_write_prstatus): Use long instead of pid_t;
11045 (elfcore_write_pstatus): Use long instead of pid_t;
11046 * elf-bfd.h: Change prototypes to use long instead of pid_t;
11047
11048 2002-01-09 Jason Thorpe <thorpej@wasabisystems.com>
11049
11050 * elf.c: Update copyright years.
11051 (elfcore_grok_netbsd_note): Use NT_NETBSDCORE_PROCINFO
11052 and NT_NETBSDCORE_FIRSTMACH. Improve a comment.
11053
11054 2002-01-08 Michael Snyder <msnyder@redhat.com>
11055
11056 Add capability to write corefile note sections, for gdb.
11057 * elf.c (elfcore_write_note): New function.
11058 (elfcore_write_prpsinfo): New function.
11059 (elfcore_write_prstatus): New function.
11060 (elfcore_write_pstatus): New function.
11061 (elfcore_write_prfpreg): New function.
11062 (elfcore_write_prxfpreg): New function.
11063 * elf-bfd.h: Add prototypes for above functions.
11064
11065 2002-01-08 Alexandre Oliva <aoliva@redhat.com>
11066
11067 * elf.c (elf_fake_sections): Propagate errors from
11068 elf_backend_fake_section.
11069
11070 2002-01-07 Jason Thorpe <thorpej@wasabisystems.com>
11071
11072 * Makefile.am (BFD32_BACKENDS): Add elf32-sh-nbsd.lo.
11073 (BFD32_BACKENDS_CFILES): Add elf32-sh-nbsd.c.
11074 (elf32-sh-nbsd.lo): New rule.
11075 * Makefile.in: Regenerate.
11076 * config.bfd (sh*le-*-netbsdelf*): New target.
11077 (sh*-*-netbsdelf*): New target.
11078 * configure.in: Include netbsd-core.lo for native sh*-*-netbsd*.
11079 (bfd_elf32_shnbsd_vec): New vector.
11080 (bfd_elf32_shlnbsd_vec): New vector.
11081 * configure: Regenerate.
11082 * elf32-sh-nbsd.c: New file.
11083 * targets.c: Update copyright years.
11084 (_bfd_target_vector): Add bfd_elf32_shlnbsd_vec and
11085 bfd_elf32_shnbsd_vec.
11086
11087 2002-01-07 Aldy Hernandez <aldyh@redhat.com>
11088
11089 * coff-rs6000.c (READ20): Use bfd_scan_vma.
11090
11091 2002-01-07 Geoffrey Keating <geoffk@redhat.com>
11092
11093 * elflink.h (elf_link_input_bfd): Don't ask for the merged offset
11094 of a symbol in a section that will be deleted.
11095
11096 2002-01-07 Nick Clifton <nickc@cambridge.redhat.com>
11097
11098 * po/es.po: New file: Spanish translation.
11099 * configure.in (ALL_LINGUAS): Add es.
11100 * configure: Regenerate.
11101
11102 2002-01-06 Steve Ellcey <sje@cup.hp.com>
11103
11104 * elfxx-ia64.c (is_unwind_section_name): Add target vector as
11105 argument so we can handle HP-UX specially.
11106 (elfNN_ia64_hpux_vec): New for use in is_unwind_section_name.
11107 (elfNN_hpux_backend_section_from_bfd_section): New for support
11108 of SHN_IA_64_ANSI_COMMON.
11109 (elfNN_ia64_relax_section): Add support for SHN_IA_64_ANSI_COMMON.
11110 (is_unwind_section_name): Add special HP-UX support.
11111 (elfNN_ia64_section_from_shdr): Add support for more sections.
11112 (elfNN_ia64_fake_sections): Modify is_unwind_section_name call and
11113 add support for more sections.
11114 (elfNN_ia64_additional_program_headers): Modify
11115 is_unwind_section_name call.
11116 (elfNN_ia64_modify_segment_map): Remove assumption that there is
11117 only one unwind section in segment.
11118
11119 2002-01-06 Alan Modra <amodra@bigpond.net.au>
11120
11121 * syms.c (_bfd_generic_make_empty_symbol): New function.
11122 * libbfd-in.h (_bfd_nosymbols_make_empty_symbol): Define as
11123 _bfd_generic_make_empty_symbol.
11124 * libbfd.h: Regenerate.
11125 * bfd-in2.h: Regenerate.
11126 * hppabsd-core.c (hppabsd_core_make_empty_symbol): Delete function.
11127 (hppabsd_core_get_symtab_upper_bound): Don't define.
11128 (hppabsd_core_get_symtab): Likewise.
11129 (hppabsd_core_print_symbol): Likewise.
11130 (hppabsd_core_get_symbol_info): Likewise.
11131 (hppabsd_core_bfd_is_local_label_name): Likewise.
11132 (hppabsd_core_get_lineno): Likewise.
11133 (hppabsd_core_find_nearest_line): Likewise.
11134 (hppabsd_core_bfd_make_debug_symbol): Likewise.
11135 (hppabsd_core_read_minisymbols): Likewise.
11136 (hppabsd_core_minisymbol_to_symbol): Likewise.
11137 (hppabsd_core_vec): Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols).
11138 Formatting fixes.
11139 * hpux-core.c: Similarly.
11140 * irix-core.c: Similarly.
11141 * osf-core.c: Similarly.
11142 * sco5-core.c: Similarly.
11143 * binary.c (binary_make_empty_symbol): Remove function, define as
11144 _bfd_generic_make_empty_symbol.
11145 * ihex.c (ihex_make_empty_symbol): Likewise.
11146 * mmo.c (mmo_make_empty_symbol): Likewise.
11147 * ppcboot.c (ppcboot_make_empty_symbol): Likewise.
11148 * srec.c (srec_make_empty_symbol): Likewise.
11149 * versados.c (versados_make_empty_symbol): Likewise.
11150 * vms.c (_bfd_vms_make_empty_symbol): Remove.
11151 (vms_make_empty_symbol): Define as _bfd_generic_make_empty_symbol.
11152 * vms-gsd.c (_bfd_vms_slurp_gsd): Call bfd_make_empty_symbol
11153 rather than _bfd_vms_make_empty_symbol.
11154 * vms-misc.c (new_symbol): Likewise.
11155
11156 2002-01-05 Alan Modra <amodra@bigpond.net.au>
11157
11158 * section.c (bfd_section_init): Remove unnecessary initialisations.
11159 (bfd_section_list_clear): New function.
11160 (bfd_section_list_remove, bfd_section_list_insert): New macros.
11161 (_bfd_strip_section_from_output): Use them.
11162 * coffcode.h (coff_set_alignment_hook): Likewise.
11163 * elf32-mips.c (_bfd_mips_elf_final_link): Likewise.
11164 * elf64-mips.c (mips_elf64_final_link): Likewise.
11165 * elf64-mmix.c (mmix_elf_final_link): Likewise.
11166 * sunos.c (sunos_add_dynamic_symbols): Likewise.
11167 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
11168 * bfd-in2.h: Regenerate.
11169
11170 * netbsd-core.c (netbsd_core_file_p): Use bfd_make_section_anyway
11171 rather than doing our own section handling. Clean up after errors
11172 with bfd_release and bfd_section_list_clear. Handle unexpected
11173 flags.
11174 * aoutf1.h (sunos4_core_file_p): Likewise.
11175 * aix386-core.c (aix386_core_file_p): Likewise.
11176 * cisco-core.c (cisco_core_file_validate): Likewise.
11177 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
11178 * trad-core.c (trad_unix_core_file_p): Likewise.
11179
11180 * hppabsd-core.c (hppabsd_core_core_file_p): Clean up after errors
11181 with bfd_release and bfd_section_list_clear.
11182 * hpux-core.c (hpux_core_core_file_p): Likewise.
11183 * irix-core.c (irix_core_core_file_p): Likewise.
11184 * lynx-core.c (lynx_core_file_p): Likewise.
11185 * osf-core.c (osf_core_core_file_p): Likewise.
11186 * rs6000-core.c (rs6000coff_core_p): Likewise.
11187 * sco5-core.c (sco5_core_file_p): Likewise.
11188
11189 * elf32-mips.c (_bfd_mips_elf_lo16_reloc): Simplify, and perform
11190 sign extension adjustments without conditionals.
11191
11192 2002-01-04 Jakub Jelinek <jakub@redhat.com>
11193
11194 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Don't crash if
11195 CIE at .eh_frame start is removed due to no FDEs referencing it.
11196
11197 2002-01-04 Jason Thorpe <thorpej@wasabisystems.com>
11198
11199 * config.bfd (x86_64-*-netbsd*): New target.
11200 * configure.in (x86_64-*-netbsd*): Set COREFILE
11201 to netbsd-core.lo.
11202 * configure: Regenerated.
11203
11204 2002-01-03 Tom Rix <trix@redhat.com>
11205
11206 * xcofflink.c (_bfd_xcoff_bfd_final_link): Update .pad section ordering
11207 for recent bfd_make_section_anyway change.
11208
11209 2002-01-03 Nick Clifton <nickc@cambridge.redhat.com>
11210
11211 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
11212 R_ARM_THM_PC11 reloc.
11213
11214 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
11215
11216 * configure.in (LINGUAS): Add ja.
11217 * configure: Regenerate.
11218 * po/ja.po: Import from translation project's web site.
11219
11220 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
11221
11222 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Reformat error
11223 messages to ease translation into other languages.
11224
11225 For older changes see ChangeLog-0001
11226 \f
11227 Local Variables:
11228 mode: change-log
11229 left-margin: 8
11230 fill-column: 74
11231 version-control: never
11232 End: