Change ARM26* to ARM_26* in comments to match definitions.
[binutils-gdb.git] / bfd / ChangeLog
1 2003-12-04 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
2
3 * coff-arm.c (coff_arm_relocate_section, bfd_arm_process_before_allocation):
4 Change ARM26* to ARM_26* in comments to match definitions.
5 (coff_arm_adjust_symndx): Replace hard-coded constants with
6 appropriate definitions (ARM_26*).
7
8 2003-12-04 Alan Modra <amodra@bigpond.net.au>
9
10 * coff-i860.c (coff_i860_reloc_nyi): Return bfd_reloc_not_supported.
11 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Warning fixes.
12 (mn10300_elf_relax_section): Likewise.
13 * nlm32-alpha.c (ONES): Define.
14 (nlm32_alpha_howto_table): Use it to avoid warnings.
15
16 2003-12-04 Alan Modra <amodra@bigpond.net.au>
17
18 * elf32-i386.c (elf_i386_object_p): Delete.
19 (elf_backend_object_p): Don't define.
20 * elf32-s390.c (elf_s390_object_p): No need to alloc tdata here.
21 * elf32-sh.c (sh_elf_object_p): Likewise.
22 * elf32-sparc.c (elf32_sparc_object_p): Likewise.
23 * elf64-alpha.c (elf64_alpha_object_p): Likewise.
24 * elf64-s390.c (elf_s390_object_p): Likewise.
25 * elf64-x86-64.c (elf64_x86_64_elf_object_p): Likewise.
26
27 2003-12-03 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
28
29 * archures.c (bfd_mach_m32r2): Add new machine type.
30 * bfd-in2.h: Regenerate.
31 * cpu-m32r.c : Add new machine type.
32 * elf32-m32r.c (m32r_elf_object_p, m32r_elf_final_write_processing,
33 m32r_elf_merge_private_bfd_data): Add support for new machine
34 type.
35
36 2003-12-03 Dave Airlie <airlied@linux.ie>
37
38 * config.bfd: Add vax-linux-gnu target.
39 * configure.in: Likewise.
40 * configure: Regenerate.
41
42 2003-12-03 Alan Modra <amodra@bigpond.net.au>
43
44 * ecoff.c (ecoff_link_add_archive_symbols): Update for renamed
45 bfd_link_hash_entry field "next" -> "und_next".
46 * linker.c (_bfd_link_hash_newfunc): Likewise.
47 (bfd_link_add_undef): Likewise.
48 (_bfd_generic_link_add_archive_symbols): Likewise.
49 (_bfd_generic_link_add_one_symbol): Likewise.
50 * xcofflink.c (xcoff_link_add_symbols): Likewise.
51
52 2003-12-02 Nick Clifton <nickc@redhat.com>
53
54 * configure.in (ALL_LINGUAS): Add ro.
55 * po/ro.po: New Romanian translation.
56
57 2003-12-02 Alan Modra <amodra@bigpond.net.au>
58
59 * Makefile.am: Run "make dep-am".
60 * Makefile.in: Regenerate.
61
62 2003-12-01 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
63
64 * coffcode.h (coff_compute_section_file_positions): Set page_size
65 to 1 instead of 0 in the case file alignment value is zero.
66
67 2003-12-01 Kazu Hirata <kazu@cs.umass.edu>
68
69 * coff-rs6000.c: Remove ARGSUSED and VARARGS.
70 * coff64-rs6000.c: Likewise.
71 * coffcode.h: Likewise.
72 * elf32-vax.c: Likewise.
73 * hash.c: Likewise.
74 * hppabsd-core.c: Likewise.
75 * hpux-core.c: Likewise.
76 * ihex.c: Likewise.
77 * netbsd-core.c: Likewise.
78 * osf-core.c: Likewise.
79 * pdp11.c: Likewise.
80 * ptrace-core.c: Likewise.
81 * sco5-core.c: Likewise.
82 * section.c: Likewise.
83 * sunos.c: Likewise.
84 * trad-core.c: Likewise.
85
86 2003-12-01 Alan Modra <amodra@bigpond.net.au>
87
88 * elf-bfd.h (is_elf_hash_table): Take hash tab rather than info arg.
89 * elf.c (_bfd_elf_merge_sections): Adjust to suit.
90 (_bfd_elf_link_just_syms): Likewise.
91 (bfd_elf_get_needed_list): Likewise.
92 (bfd_elf_get_runpath_list): Likewise.
93 (_bfd_elf_link_hash_copy_indirect): Remove unneeded parens.
94 * elf32-hppa.c (elf32_hppa_setup_section_lists): Don't check hash tab
95 creator flavour.
96 (elf32_hppa_set_gp): Look up output sections rather than using htab.
97 * elf32-i960.c: Comment fix. Formatting.
98 * elf32-m32r.c (m32r_elf_add_symbol_hook): Use is_elf_hash_table
99 rather than testing creator flavour.
100 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
101 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
102 * elflink.c (_bfd_elf_link_create_dynamic_sections): Adjust for
103 is_elf_hash_table change. Remove redundant test.
104 (bfd_elf_record_link_assignment): Use is_elf_hash_table rather than
105 testing creator flavour.
106 (elf_link_record_local_dynamic_symbol): Adjust for is_elf_hash_table.
107 (_bfd_elf_fix_symbol_flags): Likewise.
108 (_bfd_elf_adjust_dynamic_symbol): Likewise.
109 * elflink.h (elf_link_add_object_symbols): Likewise. Remove redundant
110 checks. Use is_elf_hash_table rather than testing creator flavour.
111 Use hash_table throughout in place of info->hash.
112 (elf_add_dynamic_entry): Adjust for is_elf_hash_table change.
113 (NAME(bfd_elf,size_dynamic_sections)): Likewise. Remove redundant
114 check.
115 (elf_bfd_final_link): Adjust for is_elf_hash_table change.
116 (elf_link_check_versioned_symbol): Use is_elf_hash_table rather than
117 testing creator flavour.
118 (elf_gc_sections): Add is_elf_hash_table check.
119 (elf_gc_common_finalize_got_offsets): Likewise.
120 (elf_bfd_discard_info): Adjust for is_elf_hash_table change. Remove
121 redundant check.
122 * elfxx-ia64.c (elfNN_ia64_relax_section): Use is_elf_hash_table
123 rather than testing creator flavour.
124
125 2003-11-28 Christian Groessler <chris@groessler.org>
126
127 * cpu-z8k.c: Convert to ISO C90.
128 * coff-z8k.c: Likewise.
129
130 2003-11-27 Alexandre Oliva <aoliva@redhat.com>
131
132 * elf-bfd.h (elf_backend_data::elf_backend_modify_segment_map):
133 Add link info argument.
134 * elf32-i370.c (elf_backend_modify_segment_map): Likewise.
135 * elf32-ppc.c (ppc_elf_modify_segment_map): Likewise.
136 * elf32-xtensa.c (elf_xtensa_modify_segment_map): Likewise.
137 * elf64-hppa.c (elf64_hppa_modify_segment_map): Likewise.
138 * elfxx-ia64.c (elfNN_ia64_modify_segment_map): Likewise.
139 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Likewise.
140 * elfxx-mips.h (_bfd_mips_elf_modify_segment_map): Likewise.
141 * elf.c (assign_file_positions_except_relocs,
142 assign_file_positions_for_segments): Likewise. Adjust calls.
143
144 2003-11-27 Mark Kettenis <kettenis@gnu.org>
145
146 * elf.c (elfcore_grok_netbsd_procinfo): Make a pseudosection out
147 of the note.
148
149 2003-11-26 Daniel Jacobowitz <drow@mvista.com>
150 Richard Sandiford <rsandifo@redhat.com>
151
152 * elfxx-mips.c (mips_elf_set_global_got_offset): Don't set no_fn_stub.
153 (mips_elf_set_no_stub): New function.
154 (mips_elf_multi_got): Call it.
155 (_bfd_mips_elf_finish_dynamic_symbol): If a relocation is needed for
156 a secondary GOT entry, create an R_MIPS_32 or R_MIPS_64 relocation and
157 use mips_elf_create_dynamic_relocation to deal with any compatibility
158 issues. Store the adjusted addend in the GOT slot.
159
160 2003-11-25 Mattias EngdegÄrd <mattias@virtutech.se>
161
162 * stabs.c (_bfd_link_section_stabs): Skip N_EXCL stabs when
163 procesing N_BINCL stabs.
164
165 2003-11-25 Alan Modra <amodra@bigpond.net.au>
166
167 * elf64-ppc.c (ppc_type_of_stub): Disallow stubs other than
168 ppc_stub_plt_call to symbols defined in shared libs.
169
170 2003-11-22 Jakub Jelinek <jakub@redhat.com>
171
172 * elf-bfd.h (ELF_LINK_POINTER_EQUALITY_NEEDED): Define new flag.
173 * elf.c (_bfd_elf_link_hash_copy_indirect): Copy it.
174 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
175 (elf_i386_check_relocs): Set it.
176 (elf_i386_finish_dynamic_symbol): If it is not set,
177 clear st_value of SHN_UNDEF symbol.
178
179 2003-11-20 Jim Blandy <jimb@redhat.com>
180
181 * cpu-powerpc.c (powerpc_compatible): Any ISA in the PowerPC
182 family is a superset of <bfd_arch_rs6000,bfd_mach_rs6k>.
183
184 2003-11-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
185
186 * elf32-s390.c (elf_s390_relocate_section): Don't recalculate symbol
187 section for reloc output and subtract the output section's address
188 from the addend when converting a relocation into one against a
189 section symbol.
190 * elf64-s390.c (elf_s390_relocate_section): Likewise.
191
192 2003-11-18 James E Wilson <wilson@specifixinc.com>
193
194 * elfxx-ia64.c (get_fptr): For fptr_rel, use dynobj not abfd.
195 (elfNN_ia64_size_dynamic_sections): When stripping sections, check
196 for ia64_info->rel_fptr_sec.
197
198 2003-11-18 Alan Modra <amodra@bigpond.net.au>
199
200 * elf64-ppc.c (toc_adjusting_stub_needed): Exit early if section
201 size is zero.
202
203 2003-11-17 Daniel Jacobowitz <drow@mvista.com>
204
205 * elf.c (_bfd_elf_link_hash_copy_indirect): Copy
206 ELF_LINK_HASH_NEEDS_PLT. Fix formatting.
207 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
208 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
209 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Likewise.
210 * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
211 * elf32-sh.c (sh_elf_copy_indirect_symbol): Likewise.
212 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
213 * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
214 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
215 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
216 * elf32-xtensa.c (elf_xtensa_copy_indirect_symbol): Remove.
217 (elf_backend_copy_indirect_symbol): Don't define.
218
219 2003-11-14 Daniel Jacobowitz <drow@mvista.com>
220
221 * elfxx-mips.c (mips_elf_merge_gots): Weaken assert for local
222 GOT entries.
223
224 2003-11-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
225
226 * elf32-s390.c (elf_s390_relocate_section): Only convert R_390_32
227 to R_390_RELATIVE. Convert the other relocations against local
228 symbols to relocations against the start of the section.
229 * elf64-s390.c (elf_s390_relocate_section): Only convert R_390_64
230 to R_390_RELATIVE. Convert the other relocations against local
231 symbols to relocations against the start of the section.
232
233 2003-11-11 Nick Clifton <nickc@redhat.com>
234
235 * elf-m10300.c (bfd_mn10300_elf_size_dynamic_sections): Use
236 info->executable not info->shared to decide if a .interp section
237 should be present.
238 * elf32-arm.h (elf32_arm_size_dynamic_sections): Likewise.
239 * elf32-cris.c (elf_cris_size_dynamic_sections): Likewise.
240 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
241 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
242 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
243 * elf32-vax.c (elf_vax_size_dynamic_sections): Likewise.
244 * elf32-xtensa.c (elf_xtensa_size_dynamic_sections): Likewise.
245 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
246 * elfxx-mips.c (_bfd_mips_size_dynamic_sections): Likewise.
247 * elflink.h (size_dynamic_sections): Likewise.
248
249 2003-11-10 Jonathan Wilson <jonwil@tpgi.com.au>
250
251 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Swap out tls pointer.
252 (_bfd_XXi_final_link_postscript): Look for __tks_used symbol. If
253 found initialise the tls data directory entry.
254
255 2003-11-07 Alan Modra <amodra@bigpond.net.au>
256
257 * elf32-ppc.c (ppc_elf_install_value): Delete.
258 (shared_stub_entry, stub_entry): Make them arrays of ints.
259 Remove initial branch.
260 (ppc_elf_relax_section): Write one branch around all trampolines
261 instead. Correct bogus R_PPC_PLTREL24 handling. Correct
262 branch range check. Only use shared_stub_entry when shared.
263 Test that branches can reach stubs. Write trampolines out at
264 end so that just one realloc is used. Handle little-endian
265 mode. Move relevant code from ppc_elf_install_value to here.
266 (ppc_elf_relocate_section): Move code handling RELAX32 from
267 ppc_elf_install_value to here.
268
269 2003-11-06 Alan Modra <amodra@bigpond.net.au>
270
271 * elf32-ppc.c (ppc_elf_howto_raw); Add entry for R_PPC_RELAX32PC.
272 (ppc_elf_install_value): Handle R_PPC_RELAX32PC. Merge duplicate
273 cases.
274 (shared_stub_entry): Correct opcode.
275 (ppc_elf_relax_section): Generate R_PPC_RELAX32PC relocs.
276 (ppc_elf_relocate_section): Handle them.
277
278 2003-11-05 Alan Modra <amodra@bigpond.net.au>
279
280 * elf.c (_bfd_elf_rela_local_sym): Accept asection **, and return
281 updated section in case of merged section.
282 * elf-bfd.h (_bfd_elf_rela_local_sym): Update declaration.
283 * elf-hppa.h (elf_hppa_relocate_section): Adjust call.
284 * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
285 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
286 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
287 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
288 * elf32-cris.c (cris_elf_relocate_section): Likewise.
289 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
290 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
291 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
292 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
293 * elf32-i370.c (i370_elf_relocate_section): Likewise.
294 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
295 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
296 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
297 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
298 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
299 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
300 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
301 * elf32-s390.c (elf_s390_relocate_section): Likewise.
302 * elf32-sh.c (sh_elf_relocate_section): Likewise.
303 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
304 * elf32-v850.c (v850_elf_relocate_section) Likewise.
305 * elf32-vax.c (elf_vax_relocate_section): Likewise.
306 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
307 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
308 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
309 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
310 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
311 * elf64-s390.c (elf_s390_relocate_section): Likewise.
312 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
313 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
314 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
315 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
316
317 * elf32-cris.c (cris_elf_relocate_section): Don't recalculate symbol
318 section for reloc output.
319 * elf32-i370.c (i370_elf_relocate_section): Likewise.
320 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
321 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
322 * elf32-vax.c (elf_vax_relocate_section): Likewise.
323 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
324 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
325
326 * elf32-ppc.c (ppc_elf_relocate_section): Don't recalculate everything
327 for R_PPC_RELAX32 reloc. Don't bother checking ppc_elf_install_value
328 return value.
329 * elf64-ppc.c (ppc64_elf_relocate_section <R_PPC64_TOC>): Sanity check
330 sec->id.
331
332 2003-11-05 Alan Modra <amodra@bigpond.net.au>
333
334 * elf32-d10v.c (extract_rel_addend, insert_rel_addend): New functions.
335 (elf32_d10v_relocate_section): Use them to handle -r reloc
336 adjustments, and in place of _bfd_elf_rela_local_sym.
337
338 * cpu-iq2000.c (arch_info_struct): Warning fix.
339
340 2003-11-05 Alan Modra <amodra@bigpond.net.au>
341
342 * elf32-hppa.c (ELIMINATE_COPY_RELOCS): Define.
343 (elf32_hppa_copy_indirect_symbol): Don't copy NON_GOT_REF on
344 weakdefs.
345 (elf32_hppa_check_relocs): Use ELIMINATE_COPY_RELOCS.
346 (elf32_hppa_adjust_dynamic_symbol): Likewise. Copy weakdef
347 NON_GOT_REF.
348 (allocate_dynrelocs): Use ELIMINATE_COPY_RELOCS and
349 SYMBOL_CALLS_LOCAL. Discard relocs for undef weak syms with
350 non-default visibility.
351 (elf32_hppa_relocate_section): Use ELIMINATE_COPY_RELOCS and
352 SYMBOL_CALLS_LOCAL.
353
354 2003-11-04 Alan Modra <amodra@bigpond.net.au>
355
356 * aout-target.h, aoutf1.h, bfdio.c, bfdwin.c: Update copyright date.
357 * coff-apollo.c, coff-sparc.c, coff-w65.c, coff-we32k.c: Ditto.
358 * coff-z8k.c, coffgen.c, cpu-frv.c, cpu-h8500.c, cpu-hppa.c: Ditto.
359 * cpu-ia64-opc.c, cpu-m10300.c, cpu-mips.c, cpu-msp430.c: Ditto.
360 * cpu-rs6000.c, cpu-z8k.c, efi-app-ia32.c, elf32-am33lin.c: Ditto.
361 * gen-aout.c, hash.c, hp300hpux.c, init.c, mach-o.c: Ditto.
362 * nlm-target.h, nlm.c, som.h, stabs.c, sysdep.h, xsym.h: Ditto.
363
364 * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Fix
365 "dereferencing type-punned pointer" warnings.
366
367 * aout-adobe.c (aout_adobe_set_section_contents): Constify location.
368 * aoutx.h (NAME(aout,set_section_contents)): Ditto.
369 * bfd-in2.h: Regenerate.
370 * binary.c (binary_set_section_contents): Ditto.
371 * bout.c (b_out_set_section_contents): Ditto.
372 * coff-tic54x.c (tic54x_set_section_contents): Ditto.
373 * coffcode.h (coff_set_section_contents): Ditto.
374 * ecoff.c (_bfd_ecoff_set_section_contents): Ditto.
375 * elf-bfd.h (_bfd_elf_set_section_contents): Ditto.
376 * elf.c (_bfd_elf_set_section_contents): Ditto.
377 * elfxx-mips.c (_bfd_mips_elf_set_section_contents): Ditto.
378 * elfxx-mips.h (_bfd_mips_elf_set_section_contents): Ditto.
379 * i386msdos.c (msdos_set_section_contents): Ditto.
380 * ieee.c (ieee_set_section_contents): Ditto.
381 * ihex.c (ihex_set_section_contents): Ditto.
382 * libaout.h (NAME(aout,set_section_contents)): Ditto.
383 * libbfd-in.h (_bfd_nowrite_set_section_contents): Ditto.
384 (_bfd_generic_set_section_contents): Ditto.
385 * libbfd.h: Regenerate.
386 * libbfd.c (_bfd_generic_set_section_contents): Ditto.
387 * libecoff.h (_bfd_ecoff_set_section_contents): Ditto.
388 * libnlm.h (nlmNAME(set_section_contents)): Ditto.
389 (struct nlm_backend_data <nlm_mangle_relocs>): Ditto.
390 * mmo.c (mmo_set_section_contents): Ditto.
391 * nlm32-alpha.c (nlm_alpha_mangle_relocs): Ditto.
392 * nlm32-i386.c (nlm_i386_mangle_relocs): Ditto.
393 * nlm32-ppc.c (nlm_powerpc_mangle_relocs): Ditto.
394 * nlm32-sparc.c (nlm_sparc_mangle_relocs): Ditto.
395 * nlmcode.h (nlm_set_section_contents): Ditto.
396 * oasys.c (oasys_set_section_contents): Ditto.
397 * pdp11.c (NAME(aout,set_section_contents)): Ditto.
398 * ppcboot.c (ppcboot_set_section_contents): Ditto.
399 * srec.c (srec_set_section_contents): Ditto.
400 * targets.c (BFD_JUMP_TABLE_WRITE <_bfd_set_section_contents>): Ditto.
401 * tekhex.c (tekhex_set_section_contents): Ditto.
402 (move_section_contents): Ditto.
403 * versados.c (versados_set_section_contents): Ditto.
404 * vms-misc.c (_bfd_save_vms_section): Ditto.
405 * vms.c (vms_set_section_contents): Ditto.
406 * vms.h (_bfd_save_vms_section): Ditto.
407
408 2003-11-04 Alan Modra <amodra@bigpond.net.au>
409
410 * elf64-ppc.c (ppc_size_one_stub): Size relbrlt. Accept info arg
411 rather than htab.
412 (ppc64_elf_size_stubs): Adjust ppc_size_one_stub traversal. Zero
413 relbrlt size.
414 (ppc64_elf_build_stubs): Allocate space for relbrlt.
415
416 2003-11-04 Alan Modra <amodra@bigpond.net.au>
417
418 * bfd-in.h (_bfd_elf_tls_setup): Declare.
419 * bfd-in2.h: Regenerate.
420 * elf-bfd.h (struct elf_link_tls_segment): Delete.
421 (struct elf_link_hash_table): Add tls_sec and tls_size.
422 * elf.c (_bfd_elf_link_hash_table_init): Init tls_sec and tls_size.
423 * elflink.c (_bfd_elf_tls_setup): New function.
424 * elflink.h (struct elf_final_link_info): Remove first_tls_sec.
425 (elf_bfd_final_link): Don't set first_tls_sec here. Update code
426 saving tls segment info, round segment size up.
427 (elf_link_output_extsym): Adjust code using tls segment info.
428 (elf_link_input_bfd): Likewise.
429 * elf32-i386.c (dtpoff_base, tpoff): Likewise.
430 * elf32-s390.c (dtpoff_base, tpoff): Likewise.
431 * elf32-sh.c (dtpoff_base, tpoff): Likewise.
432 * elf32-sparc.c (dtpoff_base, tpoff): Likewise.
433 * elf64-s390.c (dtpoff_base, tpoff): Likewise.
434 * elf64-x86-64.c (dtpoff_base, tpoff): Likewise.
435 * elfxx-ia64.c (elfNN_ia64_tprel_base): Likewise.
436 (elfNN_ia64_dtprel_base): Likewise.
437 * elf64-alpha.c (alpha_get_dtprel_base): Likewise.
438 (alpha_get_tprel_base): Likewise.
439 (struct alpha_relax_info): Remove tls_segment.
440 (elf64_alpha_relax_got_load): Adjust invocation of
441 alpha_get_dtprel_base and alpha_get_tprel_base.
442 (elf64_alpha_relax_tls_get_addr): Likewise.
443 (elf64_alpha_relax_section): Likewise.
444 (elf64_alpha_relocate_section): Likewise.
445 (elf64_alpha_relax_find_tls_segment): Delete.
446 * elf32-ppc.c (struct ppc_elf_link_hash_table): Remove tls_sec.
447 (ppc_elf_tls_setup): Call _bfd_elf_tls_setup. Return section.
448 (ppc_elf_relocate_section): Adjust to use elf.tls_sec.
449 * elf32-ppc.h (ppc_elf_tls_setup): Update.
450 * elf64-ppc.c (struct ppc_link_hash_table): Remove tls_sec.
451 (ppc64_elf_tls_setup): Call _bfd_elf_tls_setup. Return section.
452 (ppc64_elf_tls_optimize): Adjust to use elf.tls_sec.
453 (ppc64_elf_relocate_section): Likewise.
454 * elf64-ppc.h (ppc64_elf_tls_setup): Update.
455
456 2003-11-03 Daniel Jacobowitz <drow@mvista.com>
457
458 * elf-bfd.h (struct elf_backend_data): Remove plt_header_size.
459 * elf-m10300.c (elf_backend_plt_header_size): Don't define.
460 * elf32-arm.h (elf_backend_plt_header_size): Don't define.
461 * elf32-cris.c (elf_backend_plt_header_size): Don't define.
462 * elf32-i386.c (elf_backend_plt_header_size): Don't define.
463 * elf32-mips.c (elf_backend_plt_header_size): Don't define.
464 * elf32-ppc.c (elf_backend_plt_header_size): Don't define.
465 * elf32-s390.c (elf_backend_plt_header_size): Don't define.
466 * elf32-sh.c (elf_backend_plt_header_size): Don't define.
467 * elf32-sparc.c (elf_backend_plt_header_size): Don't define.
468 * elf64-alpha.c (elf_backend_plt_header_size): Don't define.
469 * elf64-hppa.c (elf_backend_plt_header_size): Don't define.
470 * elf64-mips.c (elf_backend_plt_header_size): Don't define.
471 * elf64-ppc.c (elf_backend_plt_header_size): Don't define.
472 * elf64-s390.c (elf_backend_plt_header_size): Don't define.
473 * elf64-sh64.c (elf_backend_plt_header_size): Don't define.
474 * elf64-sparc.c (elf_backend_plt_header_size): Don't define.
475 * elf64-x86-64.c (elf_backend_plt_header_size): Don't define.
476 * elfn32-mips.c (elf_backend_plt_header_size): Don't define.
477 * elfxx-ia64.c (elf_backend_plt_header_size): Don't define.
478 * elfxx-target.h (elf_backend_plt_header_size): Don't define
479 or include in target initializer.
480
481 2003-11-03 Andrew Cagney <cagney@redhat.com>
482
483 * section.c (bfd_set_section_contents): Make the "location" buffer
484 constant.
485 * bfd-in2.h: Re-generate.
486
487 2003-10-30 Andrew Cagney <cagney@redhat.com>
488
489 * syms.c: Replace "struct symbol_cache_entry" with "struct
490 bfd_symbol".
491 * vms.h, targets.c, section.c, reloc.c, peicode.h: Ditto.
492 * mipsbsd.c, elf.c, linker.c, elf-bfd.h, ecoff.c: Ditto.
493 * cpu-z8k.c, cpu-ns32k.c, cpu-h8500.c, bfd.c, bfd-in.h: Ditto.
494 * bfd-in2.h: Re-generate.
495
496 2003-10-30 Jakub Jelinek <jakub@redhat.com>
497
498 * elfxx-ia64.c: Include objalloc.h, hashtab.h.
499 (struct elfNN_ia64_local_hash_entry): Remove root. Add id and r_sym
500 fields.
501 (struct elfNN_ia64_local_hash_table): Remove.
502 (struct elfNN_ia64_link_hash_table): Change loc_hash_table's type
503 to htab_t. Add loc_hash_memory field.
504 (elfNN_ia64_local_hash_table_init, elfNN_ia64_new_loc_hash_entry):
505 Removed.
506 (elfNN_ia64_local_htab_hash, elfNN_ia64_local_htab_eq): New
507 functions.
508 (elfNN_ia64_hash_table_create): Use hashtab.h hashtable for
509 loc_hash_table. Initialize loc_hash_memory.
510 (elfNN_ia64_hash_table_free): New function.
511 (elfNN_ia64_local_hash_lookup): Remove.
512 (elfNN_ia64_local_dyn_sym_thunk): Change into htab_traverse
513 callback.
514 (elfNN_ia64_dyn_sym_traverse): Use htab_traverse.
515 (get_local_sym_hash): Use hashtab.h hashtable for loc_hash_table.
516 (bfd_elfNN_bfd_link_hash_table_free): Define.
517
518 2003-10-30 Alan Modra <amodra@bigpond.net.au>
519
520 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Modify versioned
521 symbol string in place.
522
523 2003-10-30 Jim Blandy <jimb@redhat.com>
524
525 * cpu-rs6000.c (rs6000_compatible): Check the correct arch_info
526 object's mach field: all PowerPC machines are supersets of the
527 original rs6000, but not later rs6000 machines.
528
529 2003-10-30 Alan Modra <amodra@bigpond.net.au>
530
531 * dwarf2.c (struct attribute): Delete "unsnd", "snd" and "addr".
532 Add "val" and "sval" fields.
533 (DW_STRING, DW_UNSND, DW_BLOCK, DW_SND, DW_ADDR): Delete.
534 (read_attribute_value): Expand and adjust DW_* occurrences.
535 (scan_unit_for_functions, parse_comp_unit): Likewise.
536
537 2003-10-30 Phil Edwards <phil@codesourcery.com>
538
539 * config.bfd (arm-*-vxworks): Remove separate stanza; merge with
540 other common ELF triples.
541 (i[3-7]86-*-vxworks): Change to ELF format.
542 (mips*-*-windiss): New triple, add to common MIPS/ELF stanza.
543 (sh-*-vxworks): New stanza.
544
545 2003-10-30 Lars Knoll <lars@trolltech.com>
546 Michael Matz <matz@suse.de>
547 Jakub Jelinek <jakub@redhat.com>
548 Alan Modra <amodra@bigpond.net.au>
549
550 * merge.c (struct sec_merge_sec_info): Update comment.
551 (struct sec_merge_hash_entry): Remove entsize.
552 (sec_merge_hash_lookup): Only adjust alignment when creating.
553 (sec_merge_emit): Remove register keyword.
554 (cmplengthentry, last4_eq, last_eq): Delete.
555 (strrevcmp, strrevcmp_align, is_suffix): New.
556 (merge_strings): Use them to implement fast suffix merging.
557 * elf-strtab.c (struct elf_strtab_hash_entry): Update comments.
558 Make "len" signed.
559 (_bfd_elf_strtab_add): Lose on >2G strings.
560 (_bfd_elf_strtab_emit): Don't emit strings with len < 0.
561 (cmplengthentry, last4_eq): Delete.
562 (strrevcmp, is_suffix): New.
563 (_bfd_elf_strtab_finalize): Rework to implement fast suffix merging.
564
565 2003-10-29 Daniel Jacobowitz <drow@mvista.com>
566
567 * elf32-arm.h (elf32_arm_final_link_relocate): Move check for
568 SEC_ALLOC.
569
570 2003-10-29 Philip Blundell <philb@gnu.org>
571
572 * elf32-arm.h (elf32_arm_plt0_entry, elf32_arm_plt_entry): New
573 code sequence.
574 (PLT_HEADER_SIZE): New.
575 (struct elf32_arm_pcrel_relocs_copied): Rename to ...
576 (struct elf32_arm_relocs_copied): ... this. Count both
577 pcrel and non-pcrel relocs. All uses updated.
578 (struct elf32_arm_link_hash_table): Add pointers to dynamic linker
579 sections and symbol/section mapping cache.
580 (create_got_section): New.
581 (elf32_arm_create_dynamic_sections): New.
582 (elf_backend_create_dynamic_sections): Use it.
583 (elf32_arm_final_link_relocate): Support garbage collection of relocs.
584 (elf32_arm_check_relocs): Likewise.
585 (elf32_arm_adjust_dynamic_symbol): Likewise.
586 (elf32_arm_copy_indirect_symbol): New.
587 (elf32_arm_link_hash_table_create): Initialise new fields.
588 (elf32_arm_gc_sweep_hook): Implement.
589 (elf32_arm_discard_copies): Delete.
590 (elf32_arm_finish_dynamic_symbol): Use new PLT code.
591 (elf32_arm_finish_dynamic_sections): Likewise.
592 (elf_backend_can_refcount): Define.
593 (elf_backend_copy_indirect_symbol): Likewise.
594 (elf_backend_plt_header_size): Set to PLT_HEADER_SIZE.
595
596 2003-10-29 Alan Modra <amodra@bigpond.net.au>
597
598 * elf64-ppc.c (elf_backend_grok_prstatus): Define.
599 (elf_backend_grok_psinfo): Define.
600 (ppc64_elf_grok_prstatus, ppc64_elf_grok_psinfo): New functions.
601
602 * elf.c (_bfd_elfcore_make_pseudosection): Allow multiple
603 sections with the same name.
604 (elfcore_grok_lwpstatus): Likewise.
605 (elfcore_grok_win32pstatus): Likewise.
606 (elfcore_grok_note): Likewise.
607 (elfcore_grok_nto_status): Likewise.
608 (elfcore_grok_nto_gregs): Likewise.
609
610 2003-10-27 Daniel Jacobowitz <drow@mvista.com>
611
612 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Never skip dynamic
613 objects.
614
615 2003-10-14 Richard Sandiford <rsandifo@redhat.com>
616
617 * elfxx-mips.c (mips_elf_create_got_section): Initialize global_gotno.
618
619 2003-10-24 H.J. Lu <hongjiu.lu@intel.com>
620
621 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Look up
622 hash table for real symbols.
623
624 2003-10-23 Michael Snyder <msnyder@redhat.com>
625
626 * section.c (asection): Fix typo in comment.
627
628 2003-10-23 Alan Modra <amodra@bigpond.net.au>
629
630 * elf64-ppc.c (get_tls_mask): Add toc_symndx param, save toc
631 reloc symbol index to it. Don't allow gd syms in shared libs
632 to be optimized.
633 (ppc64_elf_tls_optimize): Adjust get_tls_mask call.
634 (ppc64_elf_size_stubs): Likewise.
635 (ppc64_elf_relocate_section): Check that tls relocs are only used
636 with tls syms, and similarly for non-tls. Correct symbol used
637 when optimizing toc tls code.
638
639 2003-10-22 Nick Clifton <nickc@redhat.com>
640
641 * peicode.h (coff_swap_scnhdr_in): Only remove padding when
642 processing an executable.
643
644 2003-10-22 Jakub Jelinek <jakub@redhat.com>
645
646 * elflink.c (_bfd_elf_export_symbol): Adjust for globals and locals
647 field changes.
648 (_bfd_elf_link_assign_sym_version): Likewise.
649 * elflink.h (size_dynamic_sections): Likewise.
650
651 2003-10-21 Alexandre Oliva <aoliva@redhat.com>,
652 Michael Snyder <msnyder@redhat.com>
653
654 * archures.c (bfd_mach_sh4a, bfd_mach_sh4al_dsp, bfd_mach_sh4_nofpu,
655 bfd_mach_sh4a_nofpu): New machine types.
656 * bfd-in2.h: Rebuilt.
657 * cpu-sh.c (compatible): Remove unused function.
658 (SH4A_NEXT, SH4AL_DSP_NEXT, SH4_NOFPU_NEXT, SH4A_NOFPU_NEXT): New.
659 (arch_info_struct): Add sh4a, sh4al_dsp, sh4-nofpu and sh4a-nofpu.
660 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle them.
661
662 2003-10-21 Wouter van Heyst <wouter@vidicode.nl>
663
664 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Correct text
665 describing mismatched formats involving the Maverick FP type.
666
667 2003-10-21 Anil Paranjpe <anilp1@KPITCummins.com>
668
669 * binary.c (binary_object_p): Pass machine flag along with
670 architecture.
671
672 2003-10-21 Thorsten Brehm <brehm@gmx.net>
673
674 * archures.c (bfd_default_scan): Add support for mcf528x.
675 * ieee.c (ieee_write_processor): Likewise.
676
677 2003-10-21 Peter Barada <pbarada@mail.wm.sps.mot.com>
678 Bernardo Innocenti <bernie@develer.com>
679
680 * archures.c: Add MCF528x (MCFv4) support.
681 * bfd/cpu-m68k.c (arch_info_struct): Likewise.
682 * bfd-in2.h: Regenerate.
683
684 2003-10-20 Andrew Cagney <cagney@redhat.com>
685
686 * targets.c: Replace "struct sec" with "struct bfd_section"
687 * syms.c, sparclynx.c, section.c, opncls.c: Ditto.
688 * libcoff-in.h, libbfd-in.h, elfxx-target.h: Ditto.
689 * elf.c, coffgen.c, bfd.c, bfd-in.h, aoutf1.h: Ditto.
690 * aout-tic30.c, aout-target.h:
691 * bfd-in2.h, libcoff.h, libbfd.h: Regenerate.
692
693 2003-10-18 Hans-Peter Nilsson <hp@bitrange.com>
694
695 Support linker relaxation of new R_MMIX_PUSHJ_STUBBABLE relocs.
696 * elf64-mmix.c (MAX_PUSHJ_STUB_SIZE): New macro.
697 (struct _mmix_elf_section_data): New member pjs.
698 (mmix_set_relaxable_size, mmix_elf_get_section_contents): New
699 functions.
700 (elf_mmix_howto_table): New entry for R_MMIX_PUSHJ_STUBBABLE.
701 (mmix_reloc_map): Ditto.
702 (mmix_elf_relocate_section): Handle R_MMIX_PUSHJ_STUBBABLE.
703 (mmix_final_link_relocate, mmix_elf_check_common_relocs): Ditto.
704 (mmix_elf_perform_relocation): Ditto. Don't mark parameter addr
705 unused.
706 (mmix_elf_check_relocs): Move early return to after
707 mmix_elf_check_common_relocs call.
708 (mmix_elf_symbol_processing): Fix cut-and-pasto in head comment.
709 (_bfd_mmix_before_linker_allocation): Rename from
710 _bfd_mmix_prepare_linker_allocated_gregs. All referers changed.
711 Arrange to set the initial relaxable size of sections.
712 (_bfd_mmix_after_linker_allocation): Rename from
713 _bfd_mmix_finalize_linker_allocated_gregs.
714 (mmix_elf_relax_section): Relax a R_MMIX_PUSHJ_STUBBABLE reloc.
715 (bfd_elf64_get_section_contents): Define.
716 * reloc.c: Add ENUMX for BFD_RELOC_MMIX_PUSHJ_STUBBABLE.
717 * libbfd.h, bfd-in2.h: Regenerate.
718
719 * reloc.c (bfd_generic_relax_section): Default-set
720 section->_cooked_size here.
721 (bfd_generic_get_relocated_section_contents): Don't set it here.
722 Explain why.
723
724 2003-10-17 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
725
726 * elf32-hppa.c (elf32_hppa_relocate_section): Skip relocation if
727 output section has been discarded.
728
729 2003-10-17 Shrinivas Atre <shrinivasa@KPITCummins.com>
730
731 * coff-h8300.c (funcvec_hash_newfunc): Handle normal mode.
732 (h8300_reloc16_extra_cases): Likewise.
733 (h8300_bfd_link_add_symbols): Likewise.
734
735 2003-10-17 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
736
737 * cpu-h8300.c (h8300sxn_info_struct): Correct address size.
738 (h8300sn_info_struct): Likewise.
739 (h8300hn_info_struct): Likewise.
740
741 2003-10-16 Pavel Roskin <proski@gnu.org>
742
743 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Don't calculate image size
744 for sections which lack size info.
745
746 2003-10-17 Danny Smith <dannysmith@users.sourceforge.net>
747
748 * configure.host: Add __USE_MINGW_FSEEK to HDEFINES for
749 mingw32.
750
751 2003-10-16 H.J. Lu <hongjiu.lu@intel.com>
752
753 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Also warn
754 undefined patterns with '*'.
755
756 2003-10-16 H.J. Lu <hongjiu.lu@intel.com>
757
758 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't
759 use the last CIE from a different section.
760 (_bfd_elf_write_section_eh_frame): Don't pad beyond the raw
761 size of the output section.
762
763 2003-10-07 Roland McGrath <roland@redhat.com>
764
765 * elf.c (_bfd_elf_make_section_from_phdr): Set alignment_power of
766 new section from p_align header field.
767
768 2003-10-16 H.J. Lu <hongjiu.lu@intel.com>
769
770 * elf32-xtensa.c (xtensa_read_table_entries): The external size
771 of entry is 8 bytes.
772
773 2003-10-15 Andrew Cagney <cagney@redhat.com>
774
775 * targets.c (BFD_JUMP_TABLE_SYMBOLS): Replace NAME##_get_symtab
776 with NAME##_canonicalize_symtab.
777 * libcoff-in.h (coff_canonicalize_symtab): Update.
778 * xsym.h (bfd_sym_canonicalize_symtab): Update.
779 * elf-bfd.h (_bfd_elf_canonicalize_symtab): Update.
780 * coffgen.c (coff_canonicalize_symtab): Update.
781 * libbfd-in.h (_bfd_nosymbols_canonicalize_symtab): Update.
782 * libnlm.h (nlmNAME(canonicalize_symtab)): Update.
783 * ieee.c (ieee_vec): Update comment.
784 * libecoff.h (_bfd_ecoff_canonicalize_symtab): Update.
785 * mmo.c (mmo_canonicalize_symtab): Update.
786 * nlm-target.h (nlm_canonicalize_symtab): Update.
787 * nlmcode.h (nlm_canonicalize_symtab): Update.
788 * i386msdos.c (msdos_canonicalize_symtab): Update.
789 * hp300hpux.c (MY (canonicalize_symtab)): Update.
790 * oasys.c (oasys_canonicalize_symtab): Update.
791 * som.c (som_canonicalize_symtab): Update.
792 * pef.c (bfd_pef_canonicalize_symtab): Update.
793 * nlmcode.h (nlm_canonicalize_symtab): Update.
794 * xsym.c (bfd_sym_canonicalize_symtab): Update.
795 * vms.c (vms_canonicalize_symtab): Update.
796 * versados.c (versados_canonicalize_symtab): Update.
797 * mach-o.c (bfd_mach_o_canonicalize_symtab): Update.
798 * ieee.c (ieee_canonicalize_symtab): Update.
799 * pdp11.c (NAME(aout,canonicalize_symtab)): Update.
800 * reloc.c: Update comment.
801 * libaout.h (NAME(aout,canonicalize_symtab)): Update.
802 * coff64-rs6000.c (aix5coff64_vec): Update.
803 * coff64-rs6000.c (bfd_xcoff_aix5_backend_data): Update.
804 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update.
805 * aoutx.h (NAME(aout,canonicalize_symtab)): Update.
806 * elfxx-target.h (bfd_elfNN_canonicalize_symtab): Update.
807 * hp300hpux.c (MY_canonicalize_symtab): Update.
808 * ecoff.c (_bfd_ecoff_canonicalize_symtab): Update.
809 * aout-tic30.c (MY_canonicalize_symtab): Update.
810 * aout-target.h (MY_canonicalize_symtab): Update.
811 * ppcboot.c (ppcboot_canonicalize_symtab): Update.
812 * elf.c (_bfd_elf_canonicalize_symtab): Update.
813 * elfcode.h (elf_canonicalize_symtab): Update.
814 * ihex.c (ihex_canonicalize_symtab): Update.
815 * tekhex.c (tekhex_canonicalize_symtab): Update.
816 * binary.c (binary_canonicalize_symtab): Update.
817 * srec.c (srec_canonicalize_symtab): Update.
818
819 2003-10-15 Kazu Hirata <kazu@cs.umass.edu>
820
821 * elf32-h8300.c (elf_reloc_map): Fix a comment typo.
822
823 2003-10-15 Kaz Kojima <kkojima@rr.iij4u.or.jp>
824
825 * elf32-sh.c (sh_elf_relocate_section): Handle R_SH_IMM_*_PCREL
826 relocations.
827 (sh_elf_check_relocs): Likewise.
828
829 * elf32-sh64.c (elf_backend_merge_symbol_attribute): Define.
830 (sh64_elf_merge_symbol_attribute): New.
831 * elf64-sh64.c (elf_backend_merge_symbol_attribute): Define.
832 (sh64_elf64_merge_symbol_attribute): New.
833
834 2003-10-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
835
836 * elf-bfd.h (struct elf_backend_data): New function pointer member
837 elf_backend_merge_symbol_attribute.
838 * elflink.h (elf_link_add_object_symbols): Adjust call to
839 elf_backend_merge_symbol_attribute if the backend defined it.
840 * elfxx-target.h (elf_backend_merge_symbol_attribute): New macro.
841 (elfNN_bed): Add that to the initializer.
842
843 2003-10-14 Bob Wilson <bob.wilson@acm.org>
844
845 * elf32-xtensa.c (get_is_linkonce_section): Delete.
846 (xtensa_is_property_section, xtensa_is_littable_section): Use
847 XTENSA_INSN_SEC_NAME and XTENSA_LIT_SEC_NAME macros. Do not recognize
848 linkonce sections containing ".xt.insn" and ".xt.lit" substrings.
849 (xtensa_get_property_section_name): Check section name instead of
850 calling get_is_linkonce_section. Remove unused bfd parameter. Use
851 XTENSA_INSN_SEC_NAME and XTENSA_LIT_SEC_NAME macros. Never generate
852 linkonce section names by appending ".xt.insn" or ".xt.lit".
853 (xtensa_read_table_entries): Remove bfd argument in call to
854 xtensa_get_property_section_name. Free section name when done.
855 (elf_xtensa_combine_prop_entries): Free leaking table.
856
857 2003-10-13 Richard Sandiford <rsandifo@redht.com>
858
859 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Don't add
860 DT_MIPS_LIBLIST or DT_MIPS_CONFLICT entries.
861 (_bfd_mips_elf_finish_dynamic_symbol): Don't handle them. Don't
862 handle DT_MIPS_MSYM. Set DT_RELSZ based on the number of relocations
863 that were needed.
864 (_bfd_mips_elf_modify_segment_map): Fix placement of PT_MIPS_OPTIONS.
865 (_bfd_mips_elf_merge_private_bfd_data): Ignore EF_MIPS_UCODE.
866
867 2003-10-13 H.J. Lu <hongjiu.lu@intel.com>
868
869 * bfd-in.h (bfd_elf32_ia64_after_parse): New prototype.
870 (bfd_elf64_ia64_after_parse): Likewise.
871 * bfd-in2.h: Regenerated.
872
873 * elfxx-ia64.c (oor_ip): New.
874 (oor_branch_size): Likewise.
875 (bfd_elfNN_ia64_after_parse): Likewise.
876 (elfNN_ia64_relax_section): Use oor_ip if oor_branch_size
877 equals sizeof (oor_ip).
878
879 2003-10-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
880
881 * elf64-sh64.c (sh_elf64_relocate_section): Tidy up for the
882 renumbering of some relocation numbers.
883
884 2003-10-11 Alan Modra <amodra@bigpond.net.au>
885
886 * coff-sh.c: Move definition of MAP and guard more code with
887 COFF_IMAGE_WITH_PE.
888
889 * section.c (bfd_get_section_size_before_reloc): Ignore reloc_done.
890 * bfd-in2.h: Regenerate.
891
892 2003-10-10 H.J. Lu <hongjiu.lu@intel.com>
893
894 * Makefile.am: Run "make dep-am".
895 * Makefile.in: Regenerate.
896 * doc/Makefile.in: Likewise.
897
898 2003-10-09 H.J. Lu <hongjiu.lu@intel.com>
899
900 * cofflink.c: Include "safe-ctype.h".
901 (coff_link_add_symbols): Use ISDIGIT instead of isdigit.
902
903 2003-10-08 Dave Brolley <brolley@redhat.com>
904 On behalf of Michael Snyder <msnyder@redhat.com>
905
906 * archures.c: Add FRV fr550 machine.
907 * cpu-frv.c: Ditto.
908 * elf32-frv.c: Ditto.
909 * bfd-in2.h: Regenerate.
910
911 2003-10-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
912
913 * elfxx-mips.c (STUB_MOVE,STUB_LI16): Fix stub code
914 for non-SGI N64 ABI. Improve code consitency.
915
916 2003-10-07 Alexandre Oliva <aoliva@redhat.com>
917
918 * elf32-frv.c (elf32_frv_howto_table): Set R_FRV_LABEL16's
919 rightshift to 2.
920
921 2003-10-07 Nathan Sidwell <nathan@codesourcery.com>
922
923 * libbfd-in.h (_bfd_link_section_stabs): Add string offset
924 parameter.
925 * cofflink.c (coff_link_add_symbols): Deal with split stab
926 sections.
927 * elflink.h (elf_link_add_object_symbols): Deal with split stab
928 sections.
929 * stabs.c (_bfd_link_section_stabs): Add string offset parameter.
930 * libbfd.h: Regenerated.
931
932 * coffcode.h (coff_set_alignment_hook): With PE_COFF reloc
933 overflow, set reloc start position to after the count
934 reloc. Subtract one from num relocs. Give error on 0xffff relocs
935 and no overflow.
936 * cofflink.c (_bfd_coff_final_link): Deal with PE_COFF reloc
937 overflow.
938 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Do overflow if >=
939 0xffff.
940
941 2003-10-06 H.J. Lu <hongjiu.lu@intel.com>
942
943 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Pad the
944 last CIE/FDE if needed.
945
946 2003-10-06 Nick Clifton <nickc@redhat.com>
947
948 * targets.c (_bfd_target_vector): Include bfd_elf64_sparc_vec if
949 BFD64 is enabled.
950
951 2003-10-06 Matt Thomas <matt@3am-software.com>
952
953 * config.bfd: Move the hppa*-*-netbsd* case to the hppa*-*-linux* case.
954
955 2003-10-06 Robert Millan <robertmh@gnu.org>
956
957 * configure.in: Match GNU/KNetBSD with new knetbsd*-gnu triplet.
958 * config.bfd: Likewise.
959 * configure: Regenerate.
960
961 2003-10-04 Christian Groessler <chris@groessler.org>
962
963 * coff-z8k.c (extra_case): Fix displacement length check for R_JR
964 and R_CALLR.
965
966 2003-10-04 Stephane Carrez <stcarrez@nerim.fr>
967
968 * elf32-m68hc1x.c: Update to ISO C90; replace PTR with void*.
969 * elf32-m68hc11.c: Likewise.
970 * elf32-m68hc12.c: Likewise.
971 * elf32-m68hc1x.h: Likewise.
972
973 2003-10-04 Stephane Carrez <stcarrez@nerim.fr>
974
975 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Fix merge
976 of flags between HC12 and HCS12.
977
978 2003-10-04 Bryce McKinlay <bryce@mckinlay.net.nz>
979
980 * merge.c (_bfd_merge_sections): Set SEC_EXCLUDE flag on sections
981 which become empty after merging.
982
983 2003-09-30 Jakub Jelinek <jakub@redhat.com>
984
985 * elfxx-ia64.c (ia64_howto_table): Fix size of R_IA64_TPREL64[LM]SB,
986 R_IA64_DTPREL{32,64}[LM]SB and R_IA64_DTPMOD64[LM]SB.
987
988 2003-09-30 Chris Demetriou <cgd@broadcom.com>
989
990 * archures.c (bfd_mach_mipsisa64r2): New define.
991 * bfd-in2.h: Regenerate.
992 * aoutx.h (NAME(aout,machine_type)): Handle bfd_mach_mipsisa64r2.
993 * cpu-mips.c (I_mipsisa64r2): New enum value.
994 (arch_info_struct): Add entry for I_mipsisa64r2.
995 * elfxx-mips.c (_bfd_elf_mips_mach)
996 (_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_64R2.
997 (mips_set_isa_flags): Add bfd_mach_mipsisa64r2 case.
998 (mips_mach_extensions): Add entry for bfd_mach_mipsisa64r2.
999
1000 2003-09-29 H.J. Lu <hongjiu.lu@intel.com>
1001
1002 * elfxx-ia64.c (elfNN_hpux_backend_symbol_processing): New.
1003 Handle SHN_IA_64_ANSI_COMMON.
1004 (elf_backend_section_from_bfd_section): Defined.
1005
1006 2003-09-26 H.J. Lu <hongjiu.lu@intel.com>
1007
1008 * elflink.c (elf_link_read_relocs_from_section): Add an argument
1009 of a pointer to section. Check bad symbol index.
1010 (_bfd_elf_link_read_relocs): Modify calls to
1011 elf_link_read_relocs_from_section.
1012
1013 2003-09-23 DJ Delorie <dj@redhat.com>
1014
1015 * elf32-sh.c (sh_elf_howto_table): R_SH_SWITCH8,
1016 R_SH_GNU_VTINHERIT, R_SH_GNU_VTENTRY,
1017 R_SH_LOOP_START,R_SH_LOOP_END moved to "reserved" spaces,
1018 R_SH_DIR16, R_SH_DIR8, R_SH_DIR8UL, R_SH_DIR8UW, R_SH_DIR8U,
1019 R_SH_DIR8SW, R_SH_DIR8S, R_SH_DIR4UL, R_SH_DIR4UW, R_SH_DIR4U,
1020 R_SH_PSHA, R_SH_PSHL added.
1021 (sh_reloc_map): Add R_SH_DIR16 and R_SH_DIR8.
1022 (sh_elf_relocate_section): Support new relocs.
1023
1024 2003-09-23 Bob Wilson <bob.wilson@acm.org>
1025
1026 * elf32-xtensa.c (elf_xtensa_relocate_section): Fix typo that clobbered
1027 dynamic relocation offsets.
1028
1029 2003-09-23 Alan Modra <amodra@bigpond.net.au>
1030
1031 * simple.c (bfd_simple_get_relocated_section_contents): Free the
1032 hash table using _bfd_generic_link_hash_table_free.
1033
1034 2003-09-23 Alan Modra <amodra@bigpond.net.au>
1035
1036 * elf-bfd.h (struct bfd_elf_special_section): Remove "suffix". Change
1037 type of prefix_length and suffix_length to int. Rename "attributes"
1038 to "attr". Comment.
1039 (_bfd_elf_get_sec_type_attr): Update prototype.
1040 * elf.c (get_special_section): Rewrite.
1041 (_bfd_elf_get_sec_type_attr): Return struct rather than passing in
1042 attr and type pointers.
1043 (_bfd_elf_new_section_hook): Adjust for above.
1044 (special_sections): Merge suffix with prefix. Set
1045 prefix_length for all entries. Set suffix_length appropriately.
1046 * elf32-m32r.c (m32r_elf_special_sections): Likewise.
1047 * elf32-m68hc11.c (elf32_m68hc11_special_sections): Likewise.
1048 * elf32-m68hc12.c (elf32_m68hc12_special_sections): Likewise.
1049 * elf32-mcore.c (mcore_elf_special_sections): Likewise.
1050 * elf32-sh64.c (sh64_elf_special_sections): Likewise.
1051 * elf32-v850.c (v850_elf_special_sections): Likewise.
1052 * elf32-xtensa.c (elf_xtensa_special_sections): Likewise.
1053 * elf64-alpha.c (elf64_alpha_special_sections): Likewise.
1054 * elf64-hppa.c (elf64_hppa_special_sections): Likewise.
1055 * elf64-ppc.c (ppc64_elf_special_sections): Likewise.
1056 * elf64-sh64.c (sh64_elf64_special_sections): Likewise.
1057 * elfxx-ia64.c (elfNN_ia64_special_sections): Likewise.
1058 * elfxx-mips.c (_bfd_mips_elf_special_sections): Likewise.
1059 * elf32-ppc.c (ppc_elf_special_sections): Likewise. Fix .plt flags.
1060
1061 2003-09-21 Daniel Jacobowitz <drow@mvista.com>
1062
1063 * elf64-alpha.c (elf64_alpha_create_got_section): Initialize
1064 ->got if the section already exists.
1065
1066 2003-09-19 Nathan Sidwell <nathan@codesourcery.com>
1067
1068 * dwarf2.c (decode_line_info): Cope with an initially empty
1069 filename table.
1070
1071 2003-09-18 H.J. Lu <hongjiu.lu@intel.com>
1072
1073 * acinclude.m4: Include ../config/accross.m4.
1074 * aclocal.m4: Regenerated.
1075
1076 * configure.host (HOST_64BIT_TYPE): Remove if it is set to long
1077 or long long.
1078 (HOST_U_64BIT_TYPE): Remove if it is set to unsigned long long.
1079 (host64): Remove if HOST_64BIT_TYPE is set to long.
1080
1081 * configure.in (HOST_64BIT_TYPE): Set according to the size of
1082 long and long long.
1083 (HOST_U_64BIT_TYPE): Likewise.
1084 (host64): Likewise.
1085 * configure: Regenerated.
1086
1087 2003-09-19 Alan Modra <amodra@bigpond.net.au>
1088
1089 * elf.c (elfcore_write_note): Don't use sizeof(Elf_External_note)
1090 since some ABIs round up the size of the struct.
1091
1092 2003-09-18 H.J. Lu <hongjiu.lu@intel.com>
1093
1094 * elflink.c (_bfd_elf_merge_symbol): Allow type change if
1095 the old symbol is undefined and the new symbol is defined.
1096
1097 2003-09-18 Andreas Schwab <schwab@suse.de>
1098
1099 * simple.c (bfd_simple_get_relocated_section_contents): Use
1100 _bfd_generic_link_hash_table_create instead of
1101 bfd_link_hash_table_create.
1102
1103 2003-09-10 H.J. Lu <hongjiu.lu@intel.com>
1104
1105 * elfxx-ia64.c (elfNN_ia64_special_sections): Mark all sections
1106 started with ".sbss" or "".sdata" as SHF_IA_64_SHORT.
1107
1108 2003-09-10 John David Anglin <dave.anglin@nrc-cnrc.nrc.ca>
1109 Randolph Chung <randolph@tausq.org>
1110
1111 * elf32-hppa.c (struct elf32_hppa_link_hash_entry,
1112 hppa_link_hash_newfunc, hppa_build_one_stub,
1113 elf32_hppa_adjust_dynamic_symbol, mark_PIC_calls, allocate_plt_static,
1114 allocate_dynrelocs, elf32_hppa_size_dynamic_sections,
1115 elf32_hppa_finish_dynamic_symbol): Remove pic_call field and all code
1116 for generating import stubs for calls to statically linked PIC
1117 functions.
1118 (hppa_type_of_stub): Don't generate an import stub for calls to
1119 statically linked pic functions. Generate import stubs for calls
1120 in a shared object, to functions not in a regular file, and to
1121 defined weak functions. Add new argument INFO.
1122 (hppa_build_one_stub): Don't undef ADDIL_DP.
1123 (elf32_hppa_check_relocs): Don't set SEC_HAS_GOT_REF flag.
1124 (elf32_hppa_size_stubs): Pass info to hppa_type_of_stub.
1125 (final_link_relocate): Change all DLTIND relocs to DPREL relocs in a
1126 non-shared link. Convert instructions that use the the linkage table
1127 pointer, or a facsimile thereof, to use the global data pointer when
1128 the reloc has been changed.
1129
1130 2003-09-08 Joel Brobecker <brobecker@gnat.com>
1131
1132 * archures.c: Add new machine names for hppa.
1133 * bfd-in2.h: Regenerate.
1134 * cpu-hppa.c: Use the new machine names.
1135
1136 2003-09-06 Stephane Carrez <stcarrez@nerim.fr>
1137
1138 * elf32-m68hc1x.h (struct m68hc11_elf_link_hash_table): Remove
1139 all_local_syms member.
1140 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Use bfd_elf_get_elf_syms
1141 to get the local symbols.
1142
1143 2003-09-06 Stephane Carrez <stcarrez@nerim.fr>
1144
1145 * elf32-m68hc12.c (elf32_m68hc12_special_sections): New for hc11.
1146 (elf_backend_special_sections): Define.a
1147
1148 PR savannah/4950:
1149 * elf32-m68hc11.c (elf32_m68hc11_special_sections): The .vectors
1150 section is read-only.
1151
1152 2003-09-04 Nick Clifton <nickc@redhat.com>
1153
1154 * archures.c (bfd_mach_v850e1): Define.
1155 * bfd-in2.h: Regenerate.
1156 * cpu-v850.h (scan): Accept bfd_mach_v850e1.
1157 (arch_info_struct): Include an entry for bfd_mach_v850e1.
1158 * elf32-v850.c (v850_elf_object_p): Accept E_V850E1_ARCH flag.
1159 (v850_elf_final_write_processing): Accept bfd_mach_v850e1.
1160 (v850_elf_print_private_bfd_data): Interpret E_V850E1_ARCH flag.
1161 (v850_elf_merge_private_bfd_data): Allow v850e1 binaries to be
1162 linked with v850e binaries. Mark the output as v850e.
1163
1164 2003-09-03 Nick Clifton <nickc@redhat.com>
1165
1166 * cofflink.c (_bfd_coff_link_input_bfd): Do not skip section
1167 symbols that are used in relocs.
1168
1169 2003-08-30 Robert Millan <robertmh@gnu.org>
1170
1171 * configure.in: Match GNU/KFreeBSD with new kfreebsd*-gnu triplet.
1172 * config.bfd: Likewise.
1173 * configure: Regenerate.
1174
1175 2003-08-31 Christian Groessler <chris@groessler.org>
1176
1177 * elf32-i860.c (i860_howto_pc26_reloc): Finish relocation here
1178 instead of returning bfd_reloc_continue.
1179
1180 2003-08-31 Andreas Jaeger <aj@suse.de>
1181
1182 * merge.c: Update to ISO C90.
1183
1184 2003-08-27 Ian Lance Taylor <ian@airs.com>
1185
1186 * configure.in: Check for strtoull.
1187 * bfd.c (bfd_scan_vma): Use strtoull when available.
1188 * configure, config.in: Regenerate.
1189
1190 * configure.in: Define and substitute BFD_HOST_LONG_LONG.
1191 * bfd-in.h: Define BFD_HOST_LONG_LONG. Test it rather than
1192 __GNUC__ when deciding whether to use long long for
1193 BFD_HOST_64_BIT.
1194 * configure, Makefile.in, doc/Makefile.in, bfd-in2.h: Regenerate.
1195
1196 2003-08-27 Christian Groessler <chris@groessler.org>
1197
1198 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc,
1199 i860_howto_splitn_reloc, i860_howto_highadj_reloc): New
1200 functions.
1201 (elf32_i860_howto_table): Insert the new functions as
1202 'special_function's in the proper reloc type entries.
1203
1204 2003-08-27 Richard Sandiford <rsandifo@redhat.com>
1205
1206 * elf32-frv.c (elf32_frv_relocate_section): Use
1207 _bfd_elf_rela_local_sym.
1208
1209 2003-08-26 Michael Snyder <msnyder@redhat.com>
1210
1211 * cpu-frv.c: Remove unused enum.
1212
1213 2003-08-25 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
1214
1215 * reloc.c: Fix documentation for MIPS ELF relocations.
1216 libbfd.h: Regenerate.
1217 bfd-in2.h: Regenerate.
1218
1219 2003-08-24 Jason Eckhardt <jle@rice.edu>
1220
1221 * coff-i860.c (CALC_ADDEND): Define to be a no-op.
1222
1223 2003-08-24 Jason Eckhardt <jle@rice.edu>
1224
1225 * elf32-i860.c (elf32_i860_relocate_pc16): Subtract 4 and
1226 shift by 2 before storing the relocated value.
1227
1228 2003-08-23 Jason Eckhardt <jle@rice.edu>
1229
1230 * coff-i860.c (coff_i860_reloc_nyi): New function.
1231 (howto_table): Add entries for relocations PAIR, HIGHADJ, HIGH,
1232 LOWn, SPLITn, and BRADDR.
1233 (RTYPE2HOWTO): Check that the r_type is within the howto_table
1234 before trying to access the entry.
1235 (coff_i860_rtype_to_howto): Likewise.
1236 (coff_i860_reloc_type_lookup): New function.
1237 (i860_reloc_processing): New function.
1238 (coff_bfd_reloc_type_lookup): Define macro.
1239 (RELOC_PROCESSING): Define macro.
1240 Minor formatting adjustments.
1241
1242 2003-08-23 Alan Modra <amodra@bigpond.net.au>
1243
1244 * elflink.h (elf_link_add_object_symbols): Don't crash on NULL owner.
1245
1246 2003-08-22 H.J. Lu <hongjiu.lu@intel.com>
1247
1248 * elfxx-ia64.c (elfNN_ia64_create_dynamic_sections): Align the
1249 .got section at 8 bytes.
1250
1251 2003-08-21 Nick Clifton <nickc@redhat.com>
1252
1253 * cofflink.c: Update to ISO C90 and tidy up formatting.
1254
1255 2003-08-21 Randolph Chung <tausq@debian.org>
1256
1257 * elf32-hppa.c (elf32_hppa_object_p): For elf32-hppa-linux, objects
1258 can have OSABI=Linux or OSABI=SysV. Check for both.
1259 * elf64-hppa.c (elf64_hppa_object_p): Likewise.
1260
1261 2003-08-21 Nick Clifton <nickc@redhat.com>
1262
1263 * po/sv.po: Updated Swedish translation.
1264
1265 2003-08-20 Richard Sandiford <rsandifo@redhat.com>
1266
1267 * elf64-mips.c (elf_backend_copy_indirect_symbol): Define.
1268
1269 2003-08-20 Nick Clifton <nickc@redhat.com>
1270
1271 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): New macro used to
1272 replace some duplicated code in most elfxx-xxxx.c files. This
1273 version uses the new fields in bfd_link_info.
1274
1275 * elf-m10300.c (mn10300_elf_relocate_section): Use new macro.
1276 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
1277 * elf32-cris.c (cris_elf_relocate_section): Likewise.
1278 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
1279 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1280 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
1281 * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
1282 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1283 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1284 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1285 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1286 * elf32-vax.c (elf_vax_relocate_section): Likewise.
1287 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
1288 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
1289 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1290 * elf64-s390.c (elf_s390_relocate_section): Likewise.
1291 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1292 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1293 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
1294
1295 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols,
1296 elf_hppa_remark_useless_dynamic_symbols,
1297 elf_hppa_relocate_section): Use the new fields in
1298 bfd_link_info structure.
1299 * elf32-sh.c (sh_elf_relocate_section): Likewise.
1300 * elf64-alpha.c (elf64_alpha_check_relocs): Likewise.
1301 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
1302 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
1303 * elfxx-ia64.c (elfNN_ia64_check_relocs): Likewise.
1304 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
1305
1306 * elflink.h (elf_link_output_extsym): Fix test for reporting
1307 undefined symbols in shared libraries. Remove redundant test
1308 of shlib_undefined when reporting references to forced local
1309 symbols.
1310
1311 2003-08-18 Andreas Schwab <schwab@suse.de>
1312
1313 * libpei.h (bfd_pe_executable_p): Also recognize efi-app
1314 executables.
1315
1316 2003-08-17 Hans-Peter Nilsson <hp@bitrange.com>
1317
1318 * simple.c (bfd_simple_get_relocated_section_contents): Move
1319 reloc_done hack to before first bfd_section_size call. Change all
1320 returns to use new wrapper macro RETURN, restoring sec->reloc_done.
1321
1322 2003-08-16 Alan Modra <amodra@bigpond.net.au>
1323
1324 * elf64-ppc.c: Don't include elf/ppc.h.
1325
1326 2003-08-14 Richard Sandiford <rsandifo@redhat.com>
1327
1328 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Fix PT_DYNAMIC
1329 code to work with 64-bit bfds.
1330
1331 2003-08-14 Alan Modra <amodra@bigpond.net.au>
1332
1333 * dep-in.sed: Remove libintl.h.
1334 * Makefile.am (SRC-POTFILES.in, BLD-POTFILES.in): Unset LC_COLLATE.
1335 (POTFILES.in): Remove target.
1336 * Makefile.in: Regenerate.
1337
1338 2003-08-12 Alan Modra <amodra@bigpond.net.au>
1339
1340 * elf64-ppc.c (ppc64_elf_next_input_section): Update comment.
1341 (ppc64_elf_relocate_section): For zero sym R_PPC64_TOC relocs,
1342 use the function sym from the previous reloc.
1343
1344 2003-08-11 Jakub Jelinek <jakub@redhat.com>
1345
1346 * elf32-i386.c (elf_i386_relocate_section): Make undefined symbols
1347 fatal if -pie.
1348 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1349 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1350 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
1351 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1352 * elf64-s390.c (elf_s390_relocate_section): Likewise.
1353 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1354 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1355 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
1356 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1357 (ppc_elf_relocate_section) <case R_PPC_RELAX32>: Issue fatal error
1358 on undefined symbols if -pie.
1359 * elf32-sh.c (sh_elf_relocate_section): Likewise.
1360
1361 2003-08-11 Alan Modra <amodra@bigpond.net.au>
1362
1363 * elf64-ppc.c (ppc64_elf_relocate_section): Add special case for crt1.o
1364 branch to __libc_start_main.
1365
1366 2003-08-08 Dmitry Diky <diwil@mail.ru>
1367
1368 * archures.c: Add xW42 and xE42 parts. Sort MPU list according to
1369 gcc order.
1370 * cpu-msp430.c: Likewise.
1371 * elf32-msp430.c: Likewise.
1372 * bfd-in2.h: Regenerate.
1373
1374 2003-08-07 Alan Modra <amodra@bigpond.net.au>
1375
1376 * elfxx-target.h: Remove PTR cast.
1377 * targets.c (bfd_target): Make backend_data const void *.
1378 * elf-bfd.h: Constify all occurrences of struct elf_backend_data.
1379 * elf-m10300.c: Likewise.
1380 * elf.c: Likewise.
1381 * elf32-hppa.c: Likewise.
1382 * elf32-i386.c: Likewise.
1383 * elf32-m68hc1x.c: Likewise.
1384 * elf32-ppc.c: Likewise.
1385 * elf32-s390.c: Likewise.
1386 * elf32-sh.c: Likewise.
1387 * elf32-sh64.c: Likewise.
1388 * elf32-sparc.c: Likewise.
1389 * elf32-xtensa.c: Likewise.
1390 * elf64-mips.c: Likewise.
1391 * elf64-ppc.c: Likewise.
1392 * elf64-s390.c: Likewise.
1393 * elf64-sh64.c: Likewise.
1394 * elf64-sparc.c: Likewise.
1395 * elf64-x86-64.c: Likewise.
1396 * elfcode.h: Likewise.
1397 * elfcore.h: Likewise.
1398 * elflink.c: Likewise.
1399 * elflink.h: Likewise.
1400 * elfxx-ia64.c: Likewise.
1401 * elfxx-mips.c: Likewise.
1402 * elfxx-mips.h: Likewise.
1403 * elf.c (prep_headers): Remove useless check for null backend_data.
1404 * bfd-in2.h: Regenerate.
1405
1406 * elf-bfd.h: Remove PARAMS macro. Replace PTR with void *.
1407 (NAME): Use ## rather than CONCAT4 macro.
1408 * elfcode.h: Remove one remaining PARAMS macro.
1409 * elf-eh-frame.c: Convert to C90, remove unneeded casts and prototypes.
1410 * elf-strtab.c: Likewise.
1411 * elf-hppa.h: Likewise.
1412 * elf32-hppa.h: Likewise.
1413 * elf32-hppa.c: Likewise.
1414 (elf32_hppa_add_symbol_hook): Delete.
1415 (elf_backend_add_symbol_hook): Don't define.
1416 * libhppa.h: Convert to C90. Replace INLINE with inline.
1417
1418 2003-08-06 Alan Modra <amodra@bigpond.net.au>
1419
1420 * elf64-ppc.c (ppc_stub_name): Tweak names for better readability.
1421 (ppc64_elf_adjust_dynamic_symbol): Allow copy relocs against
1422 function descriptors, but warn.
1423 (ppc_build_one_stub): Remove a couple of vars. Move code creating
1424 stub syms so that we can avoid a stub sym if we already have a
1425 plt sym. Do not redefine an existing symbol.
1426 (ppc64_elf_build_stubs): When --emit-stub-syms, print a symbol for
1427 glink.
1428
1429 2003-08-06 Nick Clifton <nickc@redhat.com>
1430
1431 * po/fr.po: Updated French translation.
1432
1433 2003-08-06 Alan Modra <amodra@bigpond.net.au>
1434
1435 * elflink.c (_bfd_elf_create_dynamic_sections): Mark .dynbss with
1436 SEC_LINKER_CREATED.
1437
1438 2003-08-05 Daniel Jacobowitz <drow@mvista.com>
1439
1440 * elf32-arm.h (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
1441 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Use it.
1442
1443 2003-08-03 Jeff Muizelaar <muizelaar@rogers.com>
1444
1445 * coffcode.h (coff_slurp_line_table): Return with a warning
1446 message if the line number table could not be read.
1447
1448 2003-08-04 Nick Clifton <nickc@redhat.com>
1449
1450 * elflink.h (elf_link_add_object_symbols): Prepend "warning: "
1451 to messages produced for .gnu.warning.SYMBOL sections.
1452
1453 2003-08-04 Alan Modra <amodra@bigpond.net.au>
1454
1455 * elfcode.h: Convert to C90, remove unneeded casts and prototypes.
1456 * elfcore.h: Likewise.
1457 * elflink.c: Likewise.
1458 * elflink.h: Likewise.
1459 * elf.c (sym_is_global): Remove INLINE.
1460 (align_file_position): Replace INLINE with inline.
1461 * elfcode.h (elf_swap_dyn_in, elf_swap_dyn_out): Remove INLINE.
1462 (elf_file_p): Replace INLINE with inline.
1463
1464 2003-08-02 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1465
1466 * elf32-sh.c (sh_elf_check_relocs): Don't set DF_TEXTREL here.
1467
1468 2003-08-01 H.J. Lu <hongjiu.lu@intel.com>
1469
1470 * elfxx-ia64.c (get_got): Align the .got section at 8 bytes.
1471
1472 2003-08-01 H.J. Lu <hongjiu.lu@intel.com>
1473
1474 * elfxx-ia64.c (elfNN_ia64_finish_dynamic_symbol): Use
1475 ElfNN_External_Rela instead of Elf64_External_Rela.
1476
1477 2003-08-01 Nick Clifton <nickc@redhat.com>
1478
1479 * config.bfd: Add code to catch obsolete configurations and warn
1480 about them unless --enable-obsolete is used. Use this to mark
1481 vax-vms port as obsolete.
1482
1483 2003-07-30 Alan Modra <amodra@bigpond.net.au>
1484
1485 * elf32-ppc.c (ppc_elf_install_value): Tidy.
1486 (ppc_elf_relax_section): Remove dead code. Remove unnecessary casts.
1487 Formatting.
1488 * elfxx-target.h: Remove PARAMS macro. Formatting.
1489
1490 2003-07-30 Alan Modra <amodra@bigpond.net.au>
1491
1492 * elf.c (bfd_section_from_r_symndx): Test for SHN_UNDEF.
1493 * elf64-ppc.c (get_fdh): New function, split out from
1494 ppc64_elf_edit_opd.
1495 (ppc64_elf_check_relocs): Use get_fdh.
1496 (func_desc_adjust): Likewise. Tidy.
1497 (ppc64_elf_edit_opd): Tighten reloc checks. Free local_syms on error
1498 exit. Use get_fdh. Account for superfluous dynamic relocs.
1499 (ppc64_elf_relocate_section): Warning fix.
1500
1501 2003-07-30 Jason Eckhardt <jle@rice.edu>
1502
1503 * coff-i860.c: Convert to ISO C90. Remove superflous prototypes.
1504
1505 2003-07-30 Jason Eckhardt <jle@rice.edu>
1506
1507 * elf32-i860.c: Convert to ISO C90. Remove superflous prototypes.
1508
1509 2003-07-30 Randolph Chung <tausq@debian.org>
1510
1511 * elf-hppa.h (elf_hppa_relocate_section): Look up dyn_h for undefweak.
1512 * elf64-hppa.c (elf64_hppa_finalize_dlt): Check h->root.type.
1513
1514 2003-07-30 Alan Modra <amodra@bigpond.net.au>
1515
1516 * elf.c: Convert to C90, remove unnecessary prototypes and casts.
1517 Replace PTR with void *. Formatting.
1518 (_bfd_elf_assign_file_position_for_section): Remove INLINE.
1519 (make_mapping): Likewise.
1520
1521 2003-07-29 Alan Modra <amodra@bigpond.net.au>
1522
1523 * elf64-ppc.c (func_desc_adjust): Give linker created function
1524 descriptor symbols a size and type.
1525 (ppc64_elf_relocate_section): Correct lq insn test.
1526
1527 2003-07-28 Eric Christopher <echristo@redhat.com>
1528
1529 * elf32-ppc.c (R_PPC_RELAX32): New relocation.
1530 (ppc_elf_install_value): New function.
1531 (ppc_elf_sort_rela): Remove.
1532 (ppc_elf_relax_section): Rewrite. Remove old relaxation
1533 and replace with out of range branch stubs.
1534 (ppc_elf_relocate_section): Handle R_PPC_RELAX32.
1535
1536 2003-07-29 Alexandre Oliva <aoliva@redhat.com>
1537
1538 * elf-m10300.c (mn10300_elf_relax_section): Take symbol hash table
1539 from input_bfd.
1540
1541 2003-07-28 Alan Modra <amodra@bigpond.net.au>
1542
1543 * elf.c (special_sections): Set attributes for .got and .plt.
1544
1545 2003-07-27 Alan Modra <amodra@bigpond.net.au>
1546
1547 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Ensure no copy relocs
1548 on function descriptors.
1549 (ELIMINATE_COPY_RELOCS): Expand comment.
1550 (ppc64_elf_special_sections): Move. Don't include non-ppc64 sections.
1551 Do include ".toc1".
1552
1553 2003-07-25 H.J. Lu <hongjiu.lu@intel.com>
1554
1555 * elf.c (_bfd_elf_new_section_hook): Set the default section
1556 type to SHT_NULL.
1557 (elf_fake_sections): Set the section type based on asect->flags
1558 if it is SHT_NULL. Don't abort on processor specific section
1559 types.
1560
1561 2003-07-25 H.J. Lu <hongjiu.lu@intel.com>
1562
1563 * bfd-in2.h: Regenerated.
1564
1565 2003-07-25 H.J. Lu <hongjiu.lu@intel.com>
1566
1567 * elf-bfd.h (bfd_elf_special_section): New.
1568 (elf_backend_data): Add special_sections, a pointer to
1569 bfd_elf_special_section.
1570 (elf_section_type). New.
1571 (elf_section_flags): New.
1572 (_bfd_elf_get_sec_type_attr): New.
1573
1574 * elf.c (_bfd_elf_make_section_from_shdr): Always use the
1575 real section type/flags.
1576 (special_sections): New.
1577 (get_special_section): New.
1578 (_bfd_elf_get_sec_type_attr): New.
1579 (_bfd_elf_new_section_hook): Check special_section to set
1580 elf_section_type and elf_section_flags.
1581 (elf_fake_sections): Don't use section name to set ELF section
1582 data.
1583
1584 * elf32-m32r.c (m32r_elf_special_sections): New.
1585 (elf_backend_special_sections): Defined.
1586
1587 * elf32-m68hc11.c (elf32_m68hc11_special_sections): New.
1588 (elf_backend_special_sections): Defined.
1589
1590 * elf32-mcore.c (mcore_elf_special_sections): New.
1591 (elf_backend_special_sections): Defined.
1592
1593 * elf32-ppc.c (ppc_elf_special_sections): New.
1594 (elf_backend_special_sections): Defined.
1595
1596 * elf32-sh64.c (sh64_elf_special_sections): New.
1597 (elf_backend_special_sections): Defined.
1598
1599 * elf32-v850.c (v850_elf_special_sections): New.
1600 (elf_backend_special_sections): Defined.
1601
1602 * elf32-xtensa.c (elf_xtensa_special_sections): New.
1603 (elf_backend_special_sections): Defined.
1604
1605 * elf64-alpha.c (elf64_alpha_special_sections): New.
1606 (elf_backend_special_sections): Defined.
1607
1608 * elf64-hppa.c (elf64_hppa_special_sections): New.
1609 (elf_backend_special_sections): Defined.
1610
1611 * elf64-ppc.c (ppc64_elf_special_sections): New.
1612 (elf_backend_special_sections): Defined.
1613
1614 * elf64-sh64.c (sh64_elf64_special_sections): New.
1615 (elf_backend_special_sections): Defined.
1616
1617 * elfxx-ia64.c (elfNN_ia64_special_sections): New.
1618 (elf_backend_special_sections): Defined.
1619
1620 * elfxx-mips.c (_bfd_mips_elf_special_sections): New.
1621
1622 * elfxx-mips.h (_bfd_mips_elf_special_sections): New.
1623 (elf_backend_special_sections): Defined.
1624
1625 * elfxx-target.h (elf_backend_special_sections): New. Default
1626 to NULL.
1627 (elfNN_bed): Initialize special_sections.
1628
1629 * section.c (bfd_abs_section): Remove const.
1630 (bfd_und_section): Likewise.
1631 (bfd_com_section): Likewise.
1632 (bfd_ind_section): Likewise.
1633
1634 2003-07-24 Nick Clifton <nickc@redhat.com>
1635
1636 * coff-arm.c (EXTRA_S_FLAGS): Include SEC_CODE so that code
1637 sections are assigned the LOAD attribute.
1638
1639 2003-07-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1640
1641 * elf32-sh.c: Convert to C90. Replace PTR with void *.
1642 * elf32-sh64-com.c: Likewise.
1643 * elf32-sh64.c: Likewise.
1644 * elf32-sh64.h: Likewise.
1645 * elf64-sh64.c: Likewise.
1646
1647 2003-07-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1648
1649 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
1650 (allocate_dynrelocs): Likewise.
1651 (sh_elf_relocate_section): Likewise. Use SYMBOL_REFERENCES_LOCAL.
1652 (sh_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
1653
1654 2003-07-24 Nick Clifton <nickc@redhat.com>
1655
1656 * po/fr.po: Updated French translation.
1657
1658 2003-07-23 Bob Wilson <bob.wilson@acm.org>
1659
1660 * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Make inline and move
1661 near the beginning of the file. Swap order of arguments. Call
1662 _bfd_elf_dynamic_symbol_p with "ignore_protected" set to 0.
1663 (elf_xtensa_fix_refcounts): Adjust xtensa_elf_dynamic_symbol_p call.
1664 (elf_xtensa_relocate_section): Likewise.
1665 (shrink_dynamic_reloc_sections): Likewise.
1666
1667 2003-07-23 Bob Wilson <bob.wilson@acm.org>
1668
1669 * elf32-xtensa.c (plt_reloc_count): Fix typo in comment.
1670 (elf_xtensa_size_dynamic_sections): Use elf_discarded_section.
1671 (elf_xtensa_combine_prop_entries): Avoid returning non-zero without
1672 first printing an error message.
1673 (elf_xtensa_finish_dynamic_sections): Likewise.
1674 (elf_xtensa_discard_info_for_section): Adjust size of .got.loc when
1675 discarding literal table entries.
1676 (elf_xtensa_merge_private_bfd_data): Remove newline from error message.
1677 (elf_xtensa_do_asm_simplify): Likewise.
1678
1679 2003-07-23 Stephane Carrez <stcarrez@nerim.fr>
1680
1681 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Avoid crash when
1682 we have a local symbol in common section.
1683
1684 2003-07-22 H.J. Lu <hongjiu.lu@intel.com>
1685
1686 * elflink.c (_bfd_elf_dynamic_symbol_p): Don't return TRUE for
1687 weak symbols.
1688
1689 2003-07-22 Nick Clifton <nickc@redhat.com>
1690
1691 * coffcode.h (coff_slurp_symbol_table): Add C_TCSYM and C_ECOML to
1692 expected RS6000 storage classes.
1693
1694 2003-07-21 H.J. Lu <hongjiu.lu@intel.com>
1695
1696 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Mark
1697 output_bfd unused to silence gcc.
1698
1699 2003-07-21 Nick Clifton <nickc@redhat.com>
1700
1701 * po/sv.po: Updated Swedish translation.
1702
1703 2003-07-21 Alan Modra <amodra@bigpond.net.au>
1704
1705 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Use..
1706 (_bfd_elf_symbol_refs_local_p): ..this. Declare.
1707 * elflink.c (_bfd_elf_symbol_refs_local_p): New function.
1708 * elf32-i386.c (elf_i386_relocate_section): Remove h NULL test
1709 now done in _bfd_elf_symbol_refs_local_p.
1710 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1711 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1712 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1713
1714 2003-07-18 H.J. Lu <hongjiu.lu@intel.com>
1715
1716 * elflink.c (_bfd_elf_dynamic_symbol_p): Undo the last change.
1717
1718 2003-07-18 H.J. Lu <hongjiu.lu@intel.com>
1719
1720 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL): Fix a typo.
1721 (SYMBOL_CALLS_LOCAL): Likewise.
1722
1723 * elflink.c (_bfd_elf_dynamic_symbol_p): Return TRUE
1724 immediately if symbol isn't defined locally.
1725
1726 2003-07-18 Richard Henderson <rth@redhat.com>
1727
1728 * elflink.c (_bfd_elf_dynamic_symbol_p): New.
1729 * elf-bfd.h (_bfd_elf_dynamic_symbol_p): Declare it.
1730 (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Use it.
1731 * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Likewise.
1732 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
1733 * elf64-hppa.c (elf64_hppa_dynamic_symbol_p): Likewise.
1734 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Likewise.
1735 Update all callers to provide the relocation being resolved.
1736
1737 2003-07-17 Shaun Jackman <sjackman@pathwayconnect.com>
1738
1739 * config.bfd (arm-wince-pe): Add -DARM_COFF_BUGFIX to
1740 targ_cflags.
1741
1742 2003-07-17 Nick Clifton <nickc@redhat.com>
1743
1744 * po/es.po: New Spanish translation.
1745 * po/sv.po: New Swedish translation.
1746 * po/opcodes.pot: Regenerate.
1747
1748 2003-07-16 Richard Henderson <rth@redhat.com>
1749
1750 * config.bfd, configure.host, configure.in: Remove ia64-aix support.
1751 * elfxx-ia64.c, targets.c: Likewise.
1752
1753 2003-07-16 Richard Henderson <rth@redhat.com>
1754
1755 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Properly return false
1756 for symbols defined locally plus -Bsymbolic. Tidy logic.
1757
1758 2003-07-15 Richard Sandiford <rsandifo@redhat.com>
1759
1760 * archures.c (bfd_mach_mips7000): New.
1761 * bfd-in2.h: Regenerated.
1762 * cpu-mips.c (arch_info_struct): Add an entry for mips:7000.
1763 * elfxx-mips.c (mips_set_isa_flags): Handle bfd_mach_mips7000.
1764 (mips_mach_extensions): Add an entry for it.
1765
1766 2003-07-14 Nick Clifton <nickc@redhat.com>
1767
1768 * po/tr.po: Update with latest version.
1769 * po/SRC-POTFILES.in: Regenerate.
1770 * po/bfd.pot: Regenerate.
1771 * Makfile.in: Regenerate.
1772 * configure: Regenerate.
1773
1774 2003-07-12 Jeff Baker <jbaker@qnx.com>
1775
1776 * bfd/config.bfd (__QNXTARGET__): Define for Neutrino architectures.
1777 * bfd/elf32-arm.h (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1778 * bfd/elf32-sh.c (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1779 * bfd/elf32-ppc.c (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1780
1781 2003-07-12 Jeff Muizelaar <muizelaar@rogers.com>
1782
1783 * coffcode.h (coff_set_section_contents): Set the
1784 IMAGE_FILE_32BIT_MACHINE flag for PE targets.
1785
1786 2003-07-11 Richard Sandiford <rsandifo@redhat.com>
1787
1788 * bfd-in.h (bfd_h8300_pad_address): Declare.
1789 * bfd-in2.h: Regenerate.
1790 * cpu-h8300.c (bfd_h8300_pad_address): New function.
1791 * coff-h8300.c (h8300_reloc16_estimate): Use it to canonicalize
1792 addresses before checking whether they can be relaxed.
1793 (h8300_reloc16_extra_cases): Likewise for the R_MOVL2 sanity check.
1794 Don't complain about overflows in general 8-bit relocations.
1795 * elf32-h8300.c (elf32_h8_relax_section): Use bfd_h8300_pad_address.
1796 Fix handling of R_H8_DIR24A8.
1797
1798 2003-07-11 Richard Sandiford <rsandifo@redhat.com>
1799
1800 * elf32-h8300.c: Convert function prototypes and definitions
1801 to C90 syntax.
1802 * coff-h8300.c: Likewise.
1803 * cpu-h8300.c: Likewise.
1804
1805 2003-07-11 Alan Modra <amodra@bigpond.net.au>
1806
1807 * po/SRC-POTFILES.in: Regenerate.
1808 * po/bfd.pot: Likewise.
1809
1810 2003-07-10 Bob Wilson <bob.wilson@acm.org>
1811
1812 * elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Create new
1813 .got.loc section. Do not set SEC_ALLOC or SEC_LOAD flags for the
1814 .xt.lit.plt section.
1815 (elf_xtensa_size_dynamic_sections): Set size of the .got.loc section
1816 and allocate memory for it.
1817 (elf_xtensa_combine_prop_entries): Copy contents of .xt.lit output
1818 section to the .got.loc section.
1819 (elf_xtensa_finish_dynamic_sections): Fix up call to
1820 elf_xtensa_combine_prop_entries and set DT_XTENSA_GOT_LOC_OFF to
1821 the address of .got.loc.
1822 (relax_property_section): Shrink .got.loc to match changes in any
1823 literal table section.
1824 (xtensa_is_property_section): Change to match
1825 xtensa_get_property_section_name.
1826 (xtensa_is_littable_section): New.
1827
1828 2003-07-10 H.J. Lu <hongjiu.lu@intel.com>
1829
1830 * elfxx-ia64.c (IA64_HOWTO): Set dst_mask to -1 instead of
1831 -1LL.
1832
1833 2003-07-10 Alan Modra <amodra@bigpond.net.au>
1834
1835 * Makefile.am (BFD32_BACKENDS): Add elf32-am33lin.lo.
1836 (BFD32_BACKENDS_CFILES): elf32-am33lin.c not elf32-am33lin.lo.
1837 Run "make dep-am".
1838 * Makefile.in: Regenerate.
1839
1840 2003-07-10 Alexandre Oliva <aoliva@redhat.com>
1841
1842 2001-09-12 Alexandre Oliva <aoliva@redhat.com>
1843 * elf32-am33lin.c (ELF_MACHINE_CODE): Redefine to EM_MN10300.
1844 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10300.
1845 2001-06-02 Nick Clifton <nickc@cambridge.redhat.com>
1846 * elf32-am33lin.c: Rename global functions.
1847 2001-05-09 Alexandre Oliva <aoliva@redhat.com>
1848 * config.bfd (am33_2.0, am33_2.0-*-linux*): Added.
1849 * configure.in (bfd_elf32_am33lin_vec): Added.
1850 * Makefile.am (BFD32_BACKENDS): Added elf32-am33lin.lo.
1851 (elf32-am33lin.lo): List dependencies.
1852 * aclocal.m4, configure, Makefile.in: Rebuilt.
1853 * elf-m10300.c (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME,
1854 ELF_ARCH, ELF_MACHINE_CODE, ELF_MAXPAGESIZE): Define only if
1855 ELF_ARCH was not defined before.
1856 (elf_symbol_leading_char): Define if not defined.
1857 * elf32-am33lin.c: Override the definitions above.
1858 * targets.c (bfd_elf32_am33lin_vec): New.
1859
1860 2003-07-09 Alexandre Oliva <aoliva@redhat.com>
1861
1862 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
1863 * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Initialize
1864 pcrel_relocs_copied.
1865 2001-12-13 Alexandre Oliva <aoliva@redhat.com>
1866 * elf-m10300.c (ELF_DYNAMIC_INTERPRETER): Renamed from
1867 ld-linux.so.2 to ld.so.1.
1868 2001-10-10 Alexandre Oliva <aoliva@redhat.com>
1869 * elf-m10300.c (elf_mn10300_sizeof_plt0): New macro.
1870 (_bfd_mn10300_elf_adjust_dynamic_symbol): Use it.
1871 (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
1872 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Allocate
1873 .rela.* section contents with bfd_zalloc.
1874 2001-09-25 Alexandre Oliva <aoliva@redhat.com>
1875 * elf-m10300.c: Added declarations for functions missing them.
1876 Merge some shared-library changes from the i386 back-end. Use
1877 R_MN10300_RELATIVE instead of R_MN10300_PCREL32 and
1878 R_MN10300_GLOB_DAT instead of R_MN10300_32 where appropriate.
1879 (struct elf32_mn10300_link_hash_entry): Remove duplicates of
1880 members of elf_link_hash_entry. Adjusted references.
1881 (mn10300_elf_final_link_relocate): dynobj was already loaded
1882 into a local variable, use it.
1883 2001-09-21 Nick Clifton <nickc@cambridge.redhat.com>
1884 * elf-m10300.c: Add missing function prototypes.
1885 2001-08-24 Alexandre Oliva <aoliva@redhat.com>
1886 * elf-m10300.c (mn10300_elf_relocate_section): Don't compute
1887 relocation for dynamic relocations.
1888 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
1889 * reloc.c (BFD_RELOC_MN10300_GOTOFF24): New.
1890 * elf-m10300.c: Introduce GOTPC16, GOTOFF24, GOTOFF16 and
1891 PLT16, and rename GOTPC to GOTPC32 and GOTOFF to GOTOFF32.
1892 (_bfd_mn10300_elf_create_dynamic_sections): Move creation ot PLT...
1893 (_bfd_mn10300_elf_create_got_section): ... here, so that its
1894 adress is already known at the time we compute relaxations.
1895 (mn10300_elf_relax_section): Relax GOTPC32, GOTOFF32, GOT32
1896 and PLT32 to narrower relocations.
1897 * libbfd.h, bfd-in2.h: Rebuilt.
1898 2001-04-12 Alexandre Oliva <aoliva@redhat.com>
1899 * reloc.c (BFD_RELOC_MN10300_GOT32, BFD_RELOC_MN10300_GOT24,
1900 BFD_RELOC_MN10300_GOT16, BFD_RELOC_MN10300_COPY,
1901 BFD_RELOC_MN10300_GLOB_DAT, BFD_RELOC_MN10300_JMP_SLOT,
1902 BFD_RELOC_MN10300_RELATIVE): New relocs.
1903 * libbfd.h, bfd-in2.h: Rebuilt.
1904 * elf-m10300.c (struct elf_mn10300_pcrel_relocs_copied): New.
1905 (struct elf32_mn10300_link_hash_entry): Added DSO-related
1906 fields.
1907 (elf_mn10300_howto): Defined new relocation types.
1908 (mn10300_reloc_map): Map them.
1909 (_bfd_mn10300_elf_create_got_section): New fn.
1910 (mn10300_elf_check_relocs): Handle PIC relocs.
1911 (mn10300_elf_final_link_relocate): Likewise.
1912 (mn10300_elf_relocate_section): Handle DSOs.
1913 (PLT0_ENTRY_SIZE, PLT_ENTRY_SIZE, PIC_PLT_ENTRY_SIZE): New macros.
1914 (elf_mn10300_plt0_entry, elf_mn10300_plt_entry,
1915 elf_mn10300_pic_plt_entry): New.
1916 (elf_mn10300_sizeof_plt, elf_mn10300_plt_plt0_offset,
1917 elf_mn10300_plt0_linker_offset, elf_mn10300_plt0_gotid_offset,
1918 elf_mn10300_plt_temp_offset, elf_mn10300_plt_symbol_offset,
1919 elf_mn10300_plt_reloc_offset: New macros.
1920 (ELF_DYNAMIC_INTERPRETER): Likewise.
1921 (_bfd_mn10300_elf_create_dynamic_sections): New function.
1922 (_bfd_mn10300_elf_adjust_dynamic_symbol): Likewise.
1923 (_bfd_mn10300_elf_discard_copies): Likewise.
1924 (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
1925 (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
1926 (_bfd_mn10300_elf_finish_dynamic_sections): Likewise.
1927 (elf_backend_can_gc_sections,
1928 elf_backend_create_dynamic_sections,
1929 elf_backend_adjust_dynamic_sections,
1930 elf_backend_size_dynamic_sections,
1931 elf_backend_finish_dynamic_symbol,
1932 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
1933 elf_backend_plt_readonly, elf_backend_want_plt_sym,
1934 elf_backend_got_header_size, elf_backend_plt_header_size): New
1935 macros.
1936
1937 2003-07-09 Alexandre Oliva <aoliva@redhat.com>
1938
1939 2001-05-06 Alexandre Oliva <aoliva@redhat.com>
1940 * elf-m10300.c (compute_function_info): Account for AM33
1941 registers in `movm' when computing stack space for `call' when
1942 linking for AM33/2.0 link.
1943 2000-04-01 Alexandre Oliva <aoliva@cygnus.com>
1944 * archures.c (bfd_mach_am33_2): Renamed from bfd_mach_am332.
1945 * bfd-in2.h: Rebuilt.
1946 * cpu-m10300.c (bfd_am33_2_arch): Renamed from bfd_am332_arch.
1947 * elf-m10300.c: Updated.
1948 2000-03-31 Alexandre Oliva <aoliva@cygnus.com>
1949 * archures.c (bfd_mach_am332): Defined.
1950 * bfd-in2.h: Rebuilt.
1951 * cpu-m10300.c (bfd_am332_arch): Defined.
1952 (bfd_am33_arch): Chained with am33-2.
1953 * elf-m10300.c (elf_mn10300_mach): Handle am332.
1954 (_bfd_mn10300_elf_final_write_processing): Likewise.
1955
1956 2003-07-09 H.J. Lu <hongjiu.lu@intel.com>
1957
1958 * elfxx-ia64.c (IA64_HOWTO): Set dst_mask to -1LL.
1959
1960 2003-07-10 Alan Modra <amodra@bigpond.net.au>
1961
1962 * elf64-ppc.c (bfd_elf64_mkobject): Define.
1963 (struct ppc64_elf_obj_tdata): New.
1964 (ppc64_elf_tdata, ppc64_tlsld_got): Define.
1965 (ppc64_elf_mkobject): New function.
1966 (struct got_entry): Add "owner". Move "tls_type".
1967 (struct ppc_link_hash_table): Delete "relgot", "tlsld_got".
1968 (ppc64_elf_init_stub_bfd): New function.
1969 (create_got_section): Create header .got in dynobj. Create .got
1970 and .rela.got in each bfd. Stash pointers in ppc64_elf_obj_tdata.
1971 (ppc64_elf_create_dynamic_sections): Don't call create_got_section.
1972 Look for dynobj .got, and test it.
1973 (ppc64_elf_copy_indirect_symbol): Adjust for changed got.
1974 (update_local_sym_info): Likewise.
1975 (ppc64_elf_check_relocs): Likewise.
1976 (ppc64_elf_gc_sweep_hook): Likewise.
1977 (ppc64_elf_tls_optimize): Likewise.
1978 (allocate_dynrelocs): Likewise.
1979 (ppc64_elf_size_dynamic_sections): Likewise.
1980 (ppc64_elf_relocate_section): Likewise.
1981 (ppc64_elf_next_toc_section): Update comment.
1982 (toc_adjusting_stub_needed): Remove unneeded cast.
1983 (ppc64_elf_build_stubs): Check for stub sections in stub bfd by
1984 testing section flags.
1985 (ppc64_elf_build_stubs): Likewise.
1986 (ppc64_elf_size_stubs): Likewise. Remove stub_bfd param.
1987 (ppc64_elf_finish_dynamic_sections): Write out got sections.
1988 (func_desc_adjust): Copy over dynamic info for undef weaks.
1989 * elf64-ppc.h (ppc64_elf_init_stub_bfd): Declare.
1990 (ppc64_elf_size_stubs): Update prototype.
1991 * elflink.h (elf_link_sort_relocs): Use link_orders to find reldyn
1992 input sections rather than scanning dynobj.
1993
1994 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
1995
1996 * elfxx-mips.c (mips_elf_link_hash_entry): Remove min_dyn_reloc_index.
1997 (bfd_mips_elf_swap_msym_in, bfd_mips_elf_swap_msym_out): Delete.
1998 (mips_elf_create_msym_section): Delete.
1999 (mips_elf_create_dynamic_relocation): Don't set min_dyn_reloc_index.
2000 (_bfd_mips_elf_copy_indirect_symbol): Likewise.
2001 (_bfd_mips_elf_create_dynamic_sections): Don't create .msym.
2002 (_bfd_mips_elf_size_dynamic_sections): Don't calculate its size.
2003 (_bfd_mips_elf_size_dynamic_sections): Don't add DT_MIPS_MSYM.
2004 (_bfd_mips_elf_finish_dynamic_symbol): Don't add symbols to .msym.
2005 (_bfd_mips_elf_finish_dynamic_sections): Likewise.
2006
2007 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
2008
2009 * elfxx-mips.c (mips_elf_irix6_finish_dynamic_symbol): Make the
2010 symbols protected.
2011
2012 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
2013
2014 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Fix handling
2015 of relocations whose offset is -2.
2016
2017 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
2018
2019 * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): Treat
2020 forced-local symbols like other locals. Don't create relocations
2021 against STN_UNDEF in irix objects.
2022
2023 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
2024
2025 * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): In SGI-
2026 compatible objects, add the values of defined external symbols
2027 to the addend.
2028
2029 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
2030
2031 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Always
2032 initialize a GOT entry to the symbol's st_value.
2033
2034 2003-07-08 Alan Modra <amodra@bigpond.net.au>
2035
2036 * elf-bfd.h (struct elf_obj_tdata): Move linker_section_pointers..
2037 * elf32-ppc.c (struct ppc_elf_obj_tdata): ..to here. New.
2038 (ppc_elf_tdata): Define.
2039 (elf_local_ptr_offsets): Adjust.
2040 (ppc_elf_mkobject): New function.
2041 (bfd_elf32_mkobject): Define.
2042
2043 * elfcode.h (elf_object_p): Allocate tdata via _bfd_set_format.
2044 * elfcore.h (elf_core_file_p): Likewise.
2045 * section.c (bfd_section_init): Remove prototype.
2046
2047 2003-07-08 Alan Modra <amodra@bigpond.net.au>
2048
2049 * elf-bfd.h (struct elf_link_hash_entry): Remove linker_section_pointer
2050 field.
2051 (enum elf_linker_section_enum): Delete.
2052 (struct elf_linker_section): Delete.
2053 (struct elf_linker_section_pointers): Delete.
2054 (struct elf_obj_tdata): Remove #if 0 chunk. Remove linker_section.
2055 Make linker_section_pointers a void**.
2056 (elf_local_ptr_offsets, elf_linker_section): Don't define.
2057 * elf32-ppc.c (enum elf_linker_section_enum): New, cut-down version
2058 of old item in elf-bfd.h.
2059 (struct elf_linker_section): Likewise.
2060 (struct elf_linker_section_pointers): Likewise.
2061 (elf_local_ptr_offsets): Define.
2062 (struct ppc_elf_link_hash_entry): Add linker_section_pointer.
2063 (ppc_elf_link_hash_newfunc): Init it.
2064 (struct ppc_elf_link_hash_table): Add sbss.
2065 (ppc_elf_link_hash_table_create): zmalloc rather than clearing
2066 individual fields.
2067 (elf_create_linker_section): Fold into..
2068 (ppc_elf_create_linker_section): ..here. Remove hole_size code.
2069 Make rela section here if shared.
2070 (elf_find_pointer_linker_section): Pass lsect rather than enum.
2071 (elf_create_pointer_linker_section): Adjust. zalloc rather than
2072 clearing in a loop.
2073 (elf_finish_pointer_linker_section): Adjust. Don't make rela
2074 section here.
2075 (ppc_elf_check_relocs): Adjust.
2076 (ppc_elf_add_symbol_hook): Tighten hash creator test. Remove code
2077 creating .sbss by hand.
2078 * elf.c (_bfd_elf_link_hash_newfunc): Adjust.
2079
2080 2003-07-04 Jakub Jelinek <jakub@redhat.com>
2081
2082 * elf32-s390.c (elf_howto_table): Change R_390_GOT12 to
2083 complain_overflow_bitfield.
2084 * elf64-s390.c (elf_howto_table): Change R_390_GOT12 to
2085 complain_overflow_bitfield.
2086
2087 2003-07-04 Jakub Jelinek <jakub@redhat.com>
2088
2089 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Return
2090 true even if -pie.
2091
2092 2003-07-04 Jakub Jelinek <jakub@redhat.com>
2093
2094 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add rel_fptr_sec.
2095 (elfNN_ia64_dynamic_symbol_p): Change info->shared into
2096 !info->executable.
2097 (get_fptr): For -pie create .opd as writable section and create
2098 .rela.opd as well.
2099 (elfNN_ia64_check_relocs): Change info->shared into
2100 !info->executable.
2101 (allocate_fptr): Likewise.
2102 (allocate_dynrel_entries): Account for a relative reloc for -pie
2103 @fptr(). Don't account for a relative reloc if -pie want_ltoff_fptr
2104 for undefweak symbol. Account for an IPLT reloc in .rela.opd
2105 section if -pie.
2106 (set_got_entry): Don't create a relative reloc if -pie
2107 want_ltoff_fptr for undefweak symbol.
2108 (set_fptr_entry): Emit an IPLT reloc in .rela.opd for -pie.
2109 (elfNN_ia64_relocate_section): Emit a relative reloc for -pie
2110 @fptr().
2111
2112 * elfxx-ia64.c (elfNN_ia64_relocate_section): Issue undefined_symbol
2113 even if -pie.
2114 * elf32-i386.c (elf_i386_relocate_section): Likewise.
2115 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
2116 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
2117 * elf64-s390.c (elf_s390_relocate_section): Likewise.
2118 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
2119 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
2120 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
2121 * elf32-s390.c (elf_s390_relocate_section): Likewise.
2122 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2123
2124 2003-07-04 Paul Clarke <paulc@senet.com.au>
2125
2126 * elf32-h8300.c (R_H8_DIR32A16): Fix name field.
2127 (elf32_h8_relax_section) <R_H8_DIR16A8>: Adjust position of relocation.
2128 <R_H8_DIR32A16>: Fix type of relocation.
2129
2130 2003-07-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2131
2132 * elf32-sh.c (sh_elf_create_dynamic_sections): Return if dynamic
2133 sections were created already. Remove unnecessary tests of
2134 the previous change.
2135
2136 2003-07-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2137
2138 * elf32-sh.c (sh_elf_create_dynamic_sections): Don't call
2139 bfd_make_section for existing sections.
2140
2141 2003-07-04 Alan Modra <amodra@bigpond.net.au>
2142
2143 * elf32-sparc.c (elf32_sparc_check_relocs): Don't call
2144 create_got_section if we already have done so.
2145 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
2146 (sh_elf_check_relocs): Likewise.
2147 (sh_elf_adjust_dynamic_symbol): Delete "dynobj" var. Use
2148 htab->root.dynobj instead.
2149 (sh_elf_check_relocs): Likewise.
2150 (sh_elf_finish_dynamic_sections): Likewise.
2151
2152 * section.c (bfd_make_section): Return NULL for existing section.
2153
2154 2003-07-04 Alan Modra <amodra@bigpond.net.au>
2155
2156 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Don't call
2157 ppc_elf_create_got if we've already done so.
2158
2159 * elf-bfd.h (_bfd_elf_create_linker_section) Don't declare.
2160 (_bfd_elf_find_pointer_linker_section): Likewise.
2161 (bfd_elf32_create_pointer_linker_section): Likewise.
2162 (bfd_elf32_finish_pointer_linker_section): Likewise.
2163 (bfd_elf64_create_pointer_linker_section): Likewise.
2164 (bfd_elf64_finish_pointer_linker_section): Likewise.
2165 (_bfd_elf_make_linker_section_rela): Likewise.
2166 * elfcode.h (elf_create_pointer_linker_section): Don't define.
2167 (elf_finish_pointer_linker_section): Likewise.
2168 * elflink.c (_bfd_elf_make_linker_section_rela): Delete.
2169 (_bfd_elf_create_linker_section): Move this function..
2170 (_bfd_elf_find_pointer_linker_section): ..and this..
2171 * elflink.h (elf_create_pointer_linker_section): ..and this..
2172 (elf_finish_pointer_linker_section): ..and this..
2173 * elf32-ppc.c: ..to here, renaming to the following, and adjusting
2174 calls.
2175 (elf_create_linker_section): Convert to C90, tidy.
2176 (elf_find_pointer_linker_section): Likewise.
2177 (elf_create_pointer_linker_section): Likewise.
2178 (elf_finish_pointer_linker_section): Likewise.
2179 * elf32-i370.c: Delete #if 0 code.
2180
2181 2003-07-02 Alan Modra <amodra@bigpond.net.au>
2182
2183 * elf64-ppc.c (ppc64_elf_func_desc_adjust): Don't allow _savef* and
2184 _restf* to be satisfied by shared libs, and always force them local.
2185 (toc_adjusting_stub_needed): Avoid scanning linker created sections.
2186 Correct test for "bl".
2187 (ppc64_elf_relocate_section <R_PPC64_TLS>): Correct test for
2188 primary opcode 31.
2189
2190 2003-07-01 Martin Schwidefsky <schwidefsky@de.ibm.com>
2191
2192 * elf32-s390.c (s390_elf_ldisp_reloc): New prototype.
2193 (s390_tls_reloc): New function.
2194 (elf_howto_table): Add long displacement relocations R_390_20,
2195 R_390_GOT20, R_390_GOTPLT20 and R_390_TLS_GOTIE20.
2196 (elf_s390_reloc_type_lookup): Likewise.
2197 (elf_s390_check_relocs): Likewise.
2198 (elf_s390_gc_sweep_hook): Likewise.
2199 (elf_s390_relocate_section): Likewise.
2200 * elf64-s390.c: Same changes as for elf32-s390.c.
2201 * reloc.c: Add long displacement relocations BFD_RELOC_390_20,
2202 BFD_RELOC_390_GOT20, BFD_RELOC_390_GOTPLT20 and
2203 BFD_RELOC_390_TLS_GOTIE20.
2204 * bfd-in2.h: Regenerate.
2205 * libbfd.h: Likewise.
2206
2207 2003-06-30 Alan Modra <amodra@bigpond.net.au>
2208
2209 * cpu-ia64-opc.c (ext_imms_scaled): Don't sign extend using shifts.
2210 (ins_imms, ins_immsm1u4): Likewise. Warning fix.
2211
2212 2003-06-29 Alan Modra <amodra@bigpond.net.au>
2213
2214 * archive.c: Convert to C90, remove unnecessary prototypes and casts.
2215 Replace PTR with void *. Formatting.
2216 * archive64.c: Likewise.
2217 * archures.c: Likewise.
2218 * bfd-in.h: Likewise.
2219 * bfd.c: Likewise.
2220 * bfdio.c: Likewise.
2221 * bfdwin.c: Likewise.
2222 * cache.c: Likewise.
2223 * corefile.c: Likewise.
2224 * format.c: Likewise.
2225 * init.c: Likewise.
2226 * libbfd-in.h: Likewise.
2227 * libbfd.c: Likewise.
2228 * linker.c: Likewise.
2229 * opncls.c: Likewise.
2230 * reloc.c: Likewise.
2231 * section.c: Likewise.
2232 * simple.c: Likewise.
2233 * syms.c: Likewise.
2234 * targets.c: Likewise.
2235 * bfd-in2.h: Regenerate.
2236 * libbfd.h: Regenerate.
2237
2238 * ecoff.c (bfd_debug_section): Add missing kept_section initialization.
2239 * libbfd-in.h (_bfd_sh_align_load_span): Don't declare if defined.
2240 * libbfd.c (COERCE32, EIGHT_GAZILLION): Simplify.
2241 (bfd_getb64): Rewrite without parens.
2242 (bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
2243 * cache.c (insert, snip): Remove INLINE.
2244 * linker.c (bfd_link_add_undef): Likewise.
2245
2246 2003-06-29 Andreas Jaeger <aj@suse.de>
2247
2248 * elf64-x86-64.c: Convert to ISO C90 prototypes, remove
2249 unnecessary prototypes. Replace PTR with void *.
2250 (elf64_x86_64_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL to
2251 trim plt entries. Move undefweak non-default visibility test ...
2252 (allocate_dynrelocs): ... from here.
2253 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
2254 Change all callers.
2255 (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL. Use
2256 SYMBOL_REFERENCES_LOCAL for dynreloc check.
2257 (elf64_x86_64_relocate_section): Use SYMBOL_CALLS_LOCAL for
2258 dynreloc and .got relocs.
2259 (elf64_x86_64_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL
2260 for .got relocs.
2261
2262 2003-06-29 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2263
2264 * elfxx-mips.c: Allow lazy binding for R_MIPS_JALR.
2265
2266 2003-06-27 Nick Clifton <nickc@redhat.com>
2267
2268 * opncls.c (bfd_add_gnu_debuglink_section): Rename to
2269 bfd_add_gnu_debuglink_section and only create the section, do not
2270 fill in its contents.
2271 (bfd_fill_in_gnu_debuglink_section): New function. Fill in the
2272 contents of a .gnu-debuglink section.
2273 * bfd-in2.h: Regenerate.
2274
2275 2003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2276
2277 * elfxx-mips.c: Revert .got alignment to 2**4.
2278
2279 2003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2280
2281 * elf32-mips.c: Fix addend for _gp_disp special symbol.
2282
2283 2003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2284
2285 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Remove non-default
2286 relocation header setup.
2287
2288 2003-06-25 Alan Modra <amodra@bigpond.net.au>
2289
2290 * elf32-ppc.c (ppc_elf_howto_table): Remove unnecessary cast.
2291 (ppc_elf_reloc_type_lookup): Modify comment.
2292 (ppc_elf_info_to_howto): Ditto.
2293 (ppc_elf_relocate_section): Ditto.
2294 (ppc_elf_check_relocs): Call ppc_elf_howto_init.
2295
2296 2003-06-25 Alan Modra <amodra@bigpond.net.au>
2297
2298 * aout-ns32k.c: Correct spelling of "relocatable".
2299 * aoutx.h: Likewise.
2300 * bfd-in.h: Likewise.
2301 * bfd.c: Likewise.
2302 * bout.c: Likewise.
2303 * coff-a29k.c: Likewise.
2304 * coff-alpha.c: Likewise.
2305 * coff-arm.c: Likewise.
2306 * coff-i386.c: Likewise.
2307 * coff-i860.c: Likewise.
2308 * coff-i960.c: Likewise.
2309 * coff-m68k.c: Likewise.
2310 * coff-m88k.c: Likewise.
2311 * coff-mcore.c: Likewise.
2312 * coff-mips.c: Likewise.
2313 * coff-or32.c: Likewise.
2314 * coff-ppc.c: Likewise.
2315 * coff-rs6000.c: Likewise.
2316 * coff-sh.c: Likewise.
2317 * coff-tic80.c: Likewise.
2318 * coff64-rs6000.c: Likewise.
2319 * cofflink.c: Likewise.
2320 * cpu-ns32k.c: Likewise.
2321 * ecoff.c: Likewise.
2322 * ecofflink.c: Likewise.
2323 * elf-bfd.h: Likewise.
2324 * elf-eh-frame.c: Likewise.
2325 * elf-hppa.h: Likewise.
2326 * elf-m10200.c: Likewise.
2327 * elf-m10300.c: Likewise.
2328 * elf.c: Likewise.
2329 * elf32-arm.h: Likewise.
2330 * elf32-avr.c: Likewise.
2331 * elf32-cris.c: Likewise.
2332 * elf32-d10v.c: Likewise.
2333 * elf32-dlx.c: Likewise.
2334 * elf32-fr30.c: Likewise.
2335 * elf32-frv.c: Likewise.
2336 * elf32-h8300.c: Likewise.
2337 * elf32-hppa.c: Likewise.
2338 * elf32-i370.c: Likewise.
2339 * elf32-i386.c: Likewise.
2340 * elf32-i860.c: Likewise.
2341 * elf32-i960.c: Likewise.
2342 * elf32-ip2k.c: Likewise.
2343 * elf32-iq2000.c: Likewise.
2344 * elf32-m32r.c: Likewise.
2345 * elf32-m68hc11.c: Likewise.
2346 * elf32-m68hc1x.c: Likewise.
2347 * elf32-m68k.c: Likewise.
2348 * elf32-mcore.c: Likewise.
2349 * elf32-mips.c: Likewise.
2350 * elf32-msp430.c: Likewise.
2351 * elf32-openrisc.c: Likewise.
2352 * elf32-ppc.c: Likewise.
2353 * elf32-s390.c: Likewise.
2354 * elf32-sh.c: Likewise.
2355 * elf32-sh64.c: Likewise.
2356 * elf32-sparc.c: Likewise.
2357 * elf32-v850.c: Likewise.
2358 * elf32-vax.c: Likewise.
2359 * elf32-xstormy16.c: Likewise.
2360 * elf32-xtensa.c: Likewise.
2361 * elf64-alpha.c: Likewise.
2362 * elf64-hppa.c: Likewise.
2363 * elf64-mips.c: Likewise.
2364 * elf64-mmix.c: Likewise.
2365 * elf64-ppc.c: Likewise.
2366 * elf64-s390.c: Likewise.
2367 * elf64-sh64.c: Likewise.
2368 * elf64-sparc.c: Likewise.
2369 * elf64-x86-64.c: Likewise.
2370 * elfcode.h: Likewise.
2371 * elflink.h: Likewise.
2372 * elfn32-mips.c: Likewise.
2373 * elfxx-ia64.c: Likewise.
2374 * elfxx-mips.c: Likewise.
2375 * i386linux.c: Likewise.
2376 * ieee.c: Likewise.
2377 * libcoff-in.h: Likewise.
2378 * linker.c: Likewise.
2379 * m68klinux.c: Likewise.
2380 * pdp11.c: Likewise.
2381 * pe-mips.c: Likewise.
2382 * peXXigen.c: Likewise.
2383 * reloc.c: Likewise.
2384 * reloc16.c: Likewise.
2385 * sparclinux.c: Likewise.
2386 * sunos.c: Likewise.
2387 * syms.c: Likewise.
2388 * versados.c: Likewise.
2389 * vms.c: Likewise.
2390 * xcofflink.c: Likewise.
2391 * bfd-in2.h: Regenerate.
2392 * libcoff.h: Regenerate.
2393 * libbfd.h: Regenerate.
2394
2395 2003-06-24 Alan Modra <amodra@bigpond.net.au>
2396
2397 * elf32-ppc.c (ppc_elf_check_relocs): Report plt reloc against
2398 local sym errors.
2399
2400 * elf32-i386.c: Convert to C90 function definitions, remove unnecessary
2401 prototypes and casts. Replace PTR with void *. Formatting.
2402 * elf32-ppc.c: Likewise. Break long strings too.
2403 (ppc_elf_relax_section): Use enum elf_ppc_reloc_type for r_type.
2404 (ppc_elf_unhandled_reloc): Internationalize error message.
2405 * elf32-ppc.h: Remove PARAMS.
2406
2407 2003-06-23 Mark Mitchell <mark@codesourcery.com>
2408
2409 * elf32-ppc.c (ppc_elf_begin_write_processing): Use bytes to count
2410 APUinfo slots.
2411 (ppc_elf_final_write_processing): Likewise.
2412
2413 2003-06-23 H.J. Lu <hongjiu.lu@intel.com>
2414
2415 * elflink.h (elf_link_input_bfd): Check raw size when using
2416 kept_section to preserve debug information discarded by
2417 linkonce.
2418
2419 2003-06-20 Alan Modra <amodra@bigpond.net.au>
2420
2421 * elf64-ppc.c (struct ppc_link_hash_table): Add top_id.
2422 (ppc64_elf_setup_section_lists): Set it.
2423 (ppc64_elf_relocate_section): Check sym section id against top_id.
2424 (ppc_build_one_stub): Comment on top_id.
2425
2426 2003-06-20 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
2427
2428 * config.bfd: Add tic4x-*-rtems*.
2429
2430 2003-06-20 Alan Modra <amodra@bigpond.net.au>
2431
2432 * elf64-ppc.c: Convert to C90 function definitions, remove unnecessary
2433 prototypes and casts. Replace PTR with void *. Format copyright.
2434 Mention ABI links.
2435 (struct ppc_link_hash_table): Rename sgot, srelgot, splt, srelplt,
2436 sdynbss, srelbss, sglink, sbrlt and srelbrlt to got, relgot .. relbrlt.
2437 (ppc_type_of_stub): Make r_type an enum.
2438 (ppc64_elf_size_stubs): Likewise.
2439 * elf64-ppc.h: Remove PARAMS macro.
2440
2441 2003-06-19 Alan Modra <amodra@bigpond.net.au>
2442
2443 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Reinstate init of
2444 elf hash tab fields.
2445
2446 * elf64-ppc.c (ppc64_elf_reloc_type_lookup): Tidy prototype.
2447 (ppc64_elf_info_to_howto): Likewise.
2448 (ppc64_elf_build_stubs): Add "stats" param, and print statistics.
2449 * elf64-ppc.h (ppc64_elf_build_stubs): Adjust prototype.
2450
2451 2003-06-19 Alan Modra <amodra@bigpond.net.au>
2452
2453 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore R_SPARC_DISP32
2454 reloc overflow on discarded eh_frame entries.
2455
2456 2003-06-19 Alan Modra <amodra@bigpond.net.au>
2457
2458 * elf64-ppc.c (toc_adjusting_stub_needed): New function.
2459 (ppc64_elf_next_input_section): Use it here to set has_gp_reloc.
2460 Return error condition.
2461 (ppc64_elf_size_stubs): Restrict toc adjusting stubs to sections
2462 that have has_gp_reloc set.
2463 (struct ppc_link_hash_table): Add stub_count.
2464 (ppc_build_one_stub): Increment it.
2465 (ppc64_elf_link_hash_table_create): zmalloc rather than clearing
2466 individual fields.
2467 * elf64-ppc.h (ppc64_elf_next_input_section): Update prototype.
2468
2469 2003-06-18 Alan Modra <amodra@bigpond.net.au>
2470
2471 * elflink.h (elf_gc_record_vtentry): Revert last change. Correct
2472 size calculation from addend. Round size up.
2473
2474 2003-06-18 Hans-Peter Nilsson <hp@axis.com>
2475
2476 * elf32-cris.c (cris_elf_relocate_section) <case
2477 R_CRIS_32_GOTREL>: When linking a program, don't complain about a
2478 symbol from a normal object or an undefined weak symbol.
2479
2480 2003-06-18 Alan Modra <amodra@bigpond.net.au>
2481
2482 * elf64-ppc.c (ppc64_elf_relocate_section): Accept a symbol on
2483 R_PPC64_TOC relocs.
2484
2485 2003-06-17 H.J. Lu <hongjiu.lu@intel.com>
2486
2487 * section.c (struct sec): Put back kept_section.
2488 (STD_SECTION): Put back kept_section initialization.
2489 * bfd-in2.h: Regenerate.
2490
2491 * elflink.h (elf_link_input_bfd): Also check discarded linkonce
2492 sections for relocateable output. Use kept_section to preserve
2493 debug information discarded by linkonce.
2494
2495 2003-06-17 Roland McGrath <roland@redhat.com>
2496
2497 * elfxx-ia64.c (elfNN_ia64_relocate_section): Support
2498 segment-relative relocation between different segments.
2499
2500 2003-06-17 Alan Modra <amodra@bigpond.net.au>
2501
2502 * elf64-ppc.c (ppc64_elf_relocate_section): Do unaligned reloc
2503 optimizations earlier.
2504
2505 * elf64-ppc.c (struct ppc_link_hash_table): Reinstate top_index.
2506 Restore previous input_list type.
2507 (ppc64_elf_link_hash_table_create): Undo last change.
2508 (ppc64_elf_setup_section_lists): Reinstate code setting up input lists
2509 per output section, but don't bother with bfd_abs_section marker.
2510 (ppc64_elf_next_input_section): Adjust for multiple input section
2511 lists.
2512 (group_sections): Likewise.
2513
2514 2003-06-17 Jakub Jelinek <jakub@redhat.com>
2515
2516 * elf64-ppc.c (ppc64_elf_relocation_section): Ensure
2517 *r_offset == r_addend for RELATIVE relocs against .got.
2518
2519 2003-06-17 Alan Modra <amodra@bigpond.net.au>
2520
2521 * elf64-ppc.c (ppc64_elf_relocate_section): Optimize unaligned relocs.
2522
2523 2003-06-17 Nick Clifton <nickc@redhat.com>
2524
2525 * elflink.h (elf_gc_record_vtentry): Allocate an extra element
2526 in the vtable_entries_used array to allow for the accessing
2527 the largest element.
2528
2529 2003-06-17 Alan Modra <amodra@bigpond.net.au>
2530
2531 * elf64-ppc.c (struct ppc_link_hash_table): Remove top_index. Modify
2532 input_list.
2533 (ppc64_elf_link_hash_table_create): Init input_list here.
2534 (ppc64_elf_setup_section_lists): Remove code setting up input lists
2535 per output section. Set toc_off for abs and other standard sections.
2536 (ppc64_elf_reinit_toc): Don't set elf_gp on input bfds lacking a toc.
2537 (ppc64_elf_next_input_section): Adjust for single input section list.
2538 Don't set toc_curr from input bfds that haven't set elf_gp.
2539 (group_sections): Adjust for single input section list.
2540
2541 * elf64-ppc.c (ppc64_elf_relocate_section): Correct pcrel section zero.
2542
2543 2003-06-16 Alan Modra <amodra@bigpond.net.au>
2544
2545 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing toctprel
2546 tls, check that a TOC16_DS or TOC16_LO_DS reloc isn't pointing to a
2547 dtprel entry. Ensure TLS_LD DTPMOD reloc has a zero addend. Write
2548 got section for RELATIVE relocs. Fix wrong comment. Change condition
2549 under which dynamic relocs update the section contents.
2550
2551 2003-06-13 Robert Millan <zeratul2@wanadoo.es>
2552
2553 * config.bfd: Add i386-netbsd-gnu target.
2554
2555 2003-06-12 Nick Clifton <nickc@redhat.com>
2556
2557 * opncls.c (calc_crc32): Rename to
2558 bfd_calc_gnu_debuglink_crc32 and export.
2559 (GNU_DEBUGLINK): Define and use to replace occurrences of
2560 hard-coded ".gnu_debuglink" in the code.
2561 (get_debug_link_info): Prevent aborts by replacing call to
2562 xmalloc with a call to malloc.
2563 (find_separate_debug_file): Prevent aborts by replacing calls
2564 to xmalloc and xstrdup with calls to malloc and strdup.
2565 (bfd_add_gnu_debuglink): New function. Add a .gnu_debuglink
2566 section to a bfd.
2567 * bfd-in2.h: Regenerate.
2568
2569 2003-06-12 Federico G. Schwindt <fgsch@lodoss.net>
2570
2571 * config.bfd (i[3-7]86-*-openbsd[0-2].* | i[3-7]86-*-openbsd3.[0-3]):
2572 New target (was i[3-7]86-*-openbsd* before).
2573 (i[3-7]86-*-openbsd*): Change to use bfd_elf32_i386_vec.
2574 (vax-*-openbsd*): New target.
2575
2576 2003-06-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2577
2578 * elfxx-mips.c (MIPS_ELF_OPTIONS_SECTION_NAME): Use .MIPS.options
2579 for n32, too.
2580 (MIPS_ELF_STUB_SECTION_NAME): Use .MIPS.stubs for n32, too.
2581 (mips_elf_rel_dyn_section): Use appropriate section alignment.
2582 (mips_elf_create_got_section): Likewise.
2583 (_bfd_mips_elf_create_dynamic_sections): Likewise.
2584
2585 2003-06-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2586
2587 * elf32-mips.c (mips_elf_generic_reloc): New Function.
2588 (elf_mips_howto_table_rel): Use it.
2589 (gprel32_with_gp): Move prototype.
2590 (mips_elf_hi16_reloc): Check for ! BSF_LOCAL instead of zero addend.
2591 Use mips_elf_generic_reloc.
2592 (mips_elf_got16_reloc): Check for ! BSF_LOCAL instead of zero addend.
2593 Code cleanup.
2594 (_bfd_mips_elf32_gprel16_reloc): Check for ! BSF_LOCAL instead of
2595 zero addend.
2596 (mips_elf_gprel32_reloc): Likewise. Use the same GP assignment logic
2597 as in the other *_gprel*_reloc functions.
2598 (gprel32_with_gp): Handle partial_inplace properly.
2599 (mips32_64bit_reloc): Use mips_elf_generic_reloc.
2600 (mips16_gprel_reloc): Check for ! BSF_LOCAL instead of zero addend.
2601 Do addend handling directly instead of calling
2602 _bfd_mips_elf_gprel16_with_gp. Handle partial_inplace properly.
2603 * elf64-mips.c (mips_elf64_hi16_reloc): Check for ! BSF_LOCAL instead
2604 of zero addend. Handle partial_inplace properly.
2605 (mips_elf64_got16_reloc): Check for ! BSF_LOCAL instead of zero
2606 addend.
2607 (mips_elf64_gprel16_reloc): Likewise.
2608 (mips_elf64_literal_reloc): Likewise.
2609 (mips_elf64_gprel32_reloc): Likewise. Use the same GP assignment
2610 logic as in the other *_gprel*_reloc functions. Handle
2611 partial_inplace properly.
2612 (mips_elf64_shift6_reloc): Check for ! BSF_LOCAL instead of zero
2613 addend. Handle partial_inplace properly.
2614 (mips16_gprel_reloc): Likewise. Do addend handling directly instead
2615 of calling _bfd_mips_elf_gprel16_with_gp.
2616 * elfn32-mips.c (mips_elf_got16_reloc): Check for BSF_LOCAL.
2617 (mips_elf_gprel32_reloc): Check for ! BSF_LOCAL instead
2618 of zero addend.
2619 (mips_elf_shift6_reloc): Handle partial_inplace properly.
2620 (mips16_gprel_reloc): Likewise. Do addend handling directly instead
2621 of calling _bfd_mips_elf_gprel16_with_gp.
2622 * elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp): Handle
2623 partial_inplace properly. Fix wrong addend handling. Fix overflow
2624 check.
2625 (_bfd_mips_elf_sign_extend): Renamed from mips_elf_sign_extend and
2626 exported.
2627 (mips_elf_calculate_relocation): Use _bfd_mips_elf_sign_extend.
2628 (_bfd_mips_elf_relocate_section): Likewise.
2629 (mips_elf_create_dynamic_relocation): Update sec_info_type access.
2630 * elfxx-mips.h (_bfd_mips_relax_section): Fix prototype declaration.
2631 (_bfd_mips_elf_sign_extend): New prototype.
2632
2633 2003-06-11 Federico G. Schwindt <fgsch@lodoss.net>
2634
2635 * config.bfd (sparc-*-openbsd[0-2].* | sparc-*-openbsd3.[0-1]):
2636 New target (was sparc-*-openbsd* before).
2637 (sparc-*-openbsd*): Change to use bfd_elf32_sparc_vec.
2638
2639 * configure.in (vax-*-openbsd*): Set COREFILE to netbsd-core.lo.
2640 * configure: Regenerate.
2641
2642 2003-06-11 H.J. Lu <hongjiu.lu@intel.com>
2643
2644 * po/Make-in (DESTDIR): New.
2645 (install-data-yes): Support $(DESTDIR).
2646 (uninstall): Likewise.
2647
2648 2003-06-11 Alan Modra <amodra@bigpond.net.au>
2649
2650 * Makefile.am (config.status): Depend on version.h.
2651 Run "make dep-am".
2652 * Makefile.in: Regenerate.
2653 * po/SRC-POTFILES.in: Regenerate.
2654
2655 2003-06-10 Alan Modra <amodra@bigpond.net.au>
2656 Gary Hade <garyhade@us.ibm.com>
2657
2658 * elf64-ppc.c (ppc64_elf_relocate_section <*_DS>): Special case lq.
2659
2660 2003-06-10 Richard Sandiford <rsandifo@redhat.com>
2661
2662 * archures.c (bfd_mach_h8300sxn): New architecture.
2663 * bfd-in2.h: Regenerate.
2664 * cpu-h8300.c (h8300_scan): Check for 'sxn'.
2665 (h8300sxn_info_struct): New.
2666 (h8300sx_info_struct): Link to it.
2667 * elf32-h8300.c (elf32_h8_mach): Add h8300sxn case.
2668 (elf32_h8_final_write_processing): Likewise.
2669
2670 2003-06-08 Alan Modra <amodra@bigpond.net.au>
2671
2672 * elf64-ppc.c: Move TARGET_LITTLE_SYM and other macros used by
2673 elfxx-target.h so that we can use elf_backend_got_header_size.
2674 (ELF_MACHINE_ALT1, ELF_MACHINE_ALT2): Delete.
2675 (GLINK_CALL_STUB_SIZE): Modify. Define new glink call stub and
2676 associated macros.
2677 (ppc64_elf_howto_raw <GOT_TPREL16_DS, GOT_TPREL16_LO_DS>): Correct
2678 dst_mask.
2679 (enum ppc_stub_type): Add ppc_stub_long_branch_r2off and
2680 ppc_stub_plt_branch_r2off.
2681 (struct ppc_stub_hash_entry): Reorganize.
2682 (struct ppc_link_hash_table): Add no_multi_toc, multi_toc_needed,
2683 toc_curr, toc_off and emit_stub_syms.
2684 (ppc64_elf_link_hash_table_create): Init them.
2685 (ppc_stub_name): Correct string size.
2686 (ppc64_elf_check_relocs): Set has_gp_reloc on GOT and TOC relocs.
2687 (ppc64_elf_size_dynamic_sections): Set no_multi_toc if GOT entries
2688 used.
2689 (ppc_type_of_stub): Tweak root.type test.
2690 (build_plt_stub): Remove glink code. Adjust for insn macro changes.
2691 (ppc_size_one_stub): Handle ppc_stub_long_branch_r2off and
2692 ppc_stub_plt_branch_r2off.
2693 (ppc_build_one_stub): Likewise. Fix var shadowing. Correct addis,addi
2694 range test. Use toc_off to calculte r2 values. Handle emit_stub_syms.
2695 (ppc64_elf_setup_section_lists): Remove htab creator flavour test.
2696 Initialize elf_gp and toc_curr.
2697 (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): New functions.
2698 (ppc64_elf_next_input_section): Set toc_off.
2699 (group_sections): Ensure groups have the same TOC.
2700 (ppc64_elf_size_stubs): Check whether we need a TOC adjusting stub.
2701 (ppc64_elf_build_stubs): Add emit_stub_syms param, and stash in htab.
2702 Build new glink stub.
2703 (ppc64_elf_relocate_section): Handle multiple TOCs. Fix comments.
2704 (ppc64_elf_finish_dynamic_sections): Adjust DT_PPC64_GLINK.
2705 * elf64-ppc.h (ppc64_elf_build_stubs): Update prototype.
2706 (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): Declare.
2707 * section.c (struct sec): Rename flag12 to has_gp_reloc.
2708 (STD_SECTION): Update.
2709 * ecoff.c (bfd_debug_section): Update comment.
2710 * bfd-in2.h: Regenerate.
2711
2712 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
2713
2714 * elfcode.h (elf_slurp_reloc_table_from_section): Don't dereference
2715 NULL function pointers.
2716
2717 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
2718
2719 * simple.c (bfd_simple_get_relocated_section_contents): Call
2720 _bfd_generic_link_add_symbols instead of bfd_link_add_symbols.
2721
2722 2003-06-04 Svein E. Seldal <Svein.Seldal@solidas.com>
2723
2724 * coff-tic54x.c: Removed the ticoff0_bad_format_hook() and
2725 ticoff1_bad_format_hook() functions. Removed the coff0 and coff1
2726 swaptables.
2727 * coff-tic4x.c: Ditto
2728 * coffcode.h: Added extra arguments to CREATE_BIG_COFF_TARGET_VEC
2729 and CREATE_LITTLE_COFF_TARGET_VEC. Created the macro
2730 CREATE_BIGHDR_COFF_TARGET_VEC. Created the ticoff0_bad_format_hook(),
2731 ticoff1_bad_format_hook() functions. Created the coff0 and coff1
2732 swap tables.
2733 * coff-tic4x.c: Adopted new CREATE_xxx_COFF_TARGET_VEC macros.
2734 * coff-a29k.c: Append COFF_SWAP_TABLE argument
2735 * coff-apollo.c: Ditto
2736 * coff-arm.c: Ditto
2737 * coff-h8300.c: Ditto
2738 * coff-h8500.c: Ditto
2739 * coff-i960.c: Ditto
2740 * coff-m68k.c: Ditto
2741 * coff-m88k.c: Ditto
2742 * coff-mcore.c: Ditto
2743 * coff-sh.c: Ditto
2744 * coff-sparc.c: Ditto
2745 * coff-tic80.c: Ditto
2746 * coff-we32k.c: Ditto
2747 * coff-z8k.c: Ditto
2748 * coff-w65.c: Ditto
2749
2750 2003-06-04 Svein E. Seldal <Svein.Seldal@solidas.com>
2751
2752 * coff-tic4x.c (ticoff0_swap_table, ticoff1_swap_table): Fixed
2753 initialization bug
2754
2755 2003-06-03 Jakub Jelinek <jakub@redhat.com>
2756
2757 * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_STACK.
2758 (bfd_section_from_phdr): Likewise.
2759 (map_sections_to_segments): Create PT_GNU_STACK segment header.
2760 (get_program_header_size): Count with PT_GNU_STACK.
2761 * elf-bfd.h (struct elf_obj_tdata): Add stack_flags.
2762 * elflink.h (bfd_elfNN_size_dynamic_sections): Set stack_flags.
2763
2764 2003-06-03 H.J. Lu <hongjiu.lu@intel.com>
2765
2766 * elflink.h (elf_link_input_bfd): Call linker error_handler
2767 for discarded definitions.
2768
2769 2003-06-03 Elias Athanasopoulos <elathan@phys.uoa.gr>
2770
2771 * syms.c (decode_section_type): Return 'n' if section flags are
2772 SEC_HAS_CONTENTS && SEC_READONLY.
2773
2774 2003-06-03 Nick Clifton <nickc@redhat.com>
2775
2776 * elf32-v850.c (v850_elf_howto_t): Rename R_V850_32to
2777 R_V850_ABS32. Add entry for R_V850_REL32.
2778 (v850_elf_reloc_map): Likewise.
2779 (v850_elf_check_relocs): Likewise.
2780 (v850_elf_perform_relocation): Likewise.
2781 (v850_elf_final_link_relocate): Likewise. Include computation
2782 to make R_V850_REl32 pc-relative.
2783
2784 2003-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2785
2786 * elf32-sh.c (sh_elf_size_dynamic_sections): Create .interp section
2787 and DT_DEBUG dynamic tag even for position independent executables.
2788 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewize.
2789
2790 2003-06-02 Daniel Jacobowitz <drow@mvista.com>
2791
2792 * config.bfd: Move obsolete entries out of the range of the
2793 targmatch sed script.
2794
2795 2003-06-02 Daniel Jacobowitz <drow@mvista.com>
2796
2797 * config.bfd (mips*-dec-bsd*, mips*-*-pe*): Mark as obsolete.
2798
2799 2003-05-31 Jakub Jelinek <jakub@redhat.com>
2800
2801 * elf32-ppc.c (allocate_dynrelocs): Use single slot for first 8192
2802 plt entries, not just 8191.
2803
2804 2003-05-30 Daniel Jacobowitz <drow@mvista.com>
2805
2806 * elfxx-mips.c (_bfd_mips_elf_discard_info): Correct loop index.
2807 Reported by Ken Faiczak <kfaiczak@SANDVINE.com>.
2808
2809 2003-05-30 Ulrich Drepper <drepper@redhat.com>
2810 Jakub Jelinek <jakub@redhat.com>
2811
2812 * elflink.h (elf_link_add_object_symbols): Use !info->executable
2813 instead of info->shared where appropriate.
2814 (bfd_elfNN_size_dynamic_sections, elf_link_output_extsym): Likewise.
2815 * elflink.c (_bfd_elf_create_got_section): Likewise.
2816 (_bfd_elf_link_create_dynamic_sections): Likewise.
2817 (_bfd_elf_link_assign_sym_version): Likewise.
2818 * elf32-i386.c (elf_i386_size_dynamic_sections): Create .interp section
2819 and DT_DEBUG dynamic tag even for position independent executables.
2820 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
2821 * elf32-s390.c (elf_s390_size_dynamic_sections: Likewise.
2822 * elf64-ppc.c (ppc64_elf_size_dynamic_sections: Likewise.
2823 * elf64-s390.c (elf_s390_size_dynamic_sections: Likewise.
2824 * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections: Likewise.
2825 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections: Likewise.
2826 * elf32-sparc.c (elf32_sparc_size_dynamic_sections: Likewise.
2827 * elf64-alpha.c (elf64_alpha_size_dynamic_sections: Likewise.
2828 * elf64-sparc.c (sparc64_elf_size_dynamic_sections: Likewise.
2829
2830 2003-05-30 Kris Warkentin <kewarken@qnx.com>
2831
2832 * elf.c (elfcore_grok_nto_status): Only set lwpid for the active or
2833 signalled thread.
2834 (elfcore_grok_nto_gregs): Only make .reg section for the active thread.
2835
2836 2003-05-29 Nick Clifton <nickc@redhat.com>
2837
2838 * pef.c: Include "safe-ctype.h" instead of <ctype.h>.
2839 Tidy up formatting.
2840 * Makefile.am: Add dependency on safe-ctype.h.
2841 * Makefile.in: Regenerate.
2842
2843 2003-05-29 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2844
2845 * elfxx-mips.c: Don't force symbols local unconditionally.
2846
2847 2003-05-28 Alan Modra <amodra@bigpond.net.au>
2848
2849 * elf32-hppa.c (elf32_hppa_relocate_section): Delete bogus
2850 undefined_symbol call.
2851
2852 2003-05-27 Richard Sandiford <rsandifo@redhat.com>
2853
2854 * elfxx-mips.c (mips_elf_hash_sort_data): Fix formattting.
2855 (mips_elf_link_hash_table): Likewise.
2856
2857 2003-05-22 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2858
2859 * elf64-mips.c (elf_mips_gnu_rel16_s2): Add internally used
2860 R_MIPS_GNU_REL16_S2 support.
2861 (bfd_elf64_bfd_reloc_type_lookup): Use it.
2862 (mips_elf64_rtype_to_howto): Use it.
2863 * elfn32-mips.c (elf_mips_gnu_rel16_s2): Add internally used
2864 R_MIPS_GNU_REL16_S2 support.
2865 (bfd_elf32_bfd_reloc_type_lookup): Use it.
2866 (mips_elf_n32_rtype_to_howto): Use it.
2867
2868 2003-05-21 Stuart F. Downing <sdowning@fame.com>
2869
2870 * som.h: Define PA_2_0 before including a.out.h
2871
2872 2003-05-07 Eric Christopher <echristo@redhat.com>
2873 Alexandre Oliva <aoliva@redhat.com>
2874
2875 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Adjust
2876 pic tests, change to warning.
2877 (_bfd_mips_elf_final_link): Remove EF_MIPS_CPIC flag setting.
2878
2879 2003-05-21 Marcus Comstedt <marcus@mc.pp.se>
2880
2881 * config.bfd: Check for a target triplet of shl-...-netbsdelf as
2882 well as shle-...-netbsdelf. Remove duplicate entry.
2883
2884 2003-05-21 Nick Clifton <nickc@redhat.com>
2885
2886 * elf32-xstormy16.c (xstormy16_elf_howto_table): Fix dst_mask
2887 for X_STORMY16_REL_12 reloc.
2888
2889 * elf.c (bfd_elf_get_needed_list): Use is_elf_hash_table to check
2890 the type of the hash table in the bfd_link_info structure.
2891 (bfd_elf_get_runpath_list): Likewise.
2892
2893 2003-05-19 Roland McGrath <roland@redhat.com>
2894
2895 * elf.c (bfd_elf_bfd_from_remote_memory): New function.
2896 * bfd-in.h: Declare it.
2897 * bfd-in2.h: Regenerated.
2898 * elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): New function.
2899 * elf-bfd.h (struct elf_backend_data): New function pointer member
2900 elf_backend_bfd_from_remote_memory.
2901 (_bfd_elf32_bfd_from_remote_memory, _bfd_elf64_bfd_from_remote_memory):
2902 Declare them.
2903 * elfxx-target.h (elf_backend_bfd_from_remote_memory): New macro.
2904 (elfNN_bed): Add that to the initializer.
2905
2906 2003-05-15 Roland McGrath <roland@redhat.com>
2907
2908 * elf.c (elfcore_grok_note): Grok NT_AUXV note, make ".auxv" section.
2909
2910 2003-05-20 Jakub Jelinek <jakub@redhat.com>
2911
2912 * elflink.h (elf_link_output_extsym): Only issue error about !=
2913 STV_DEFAULT symbols if they are bfd_link_hash_undefined.
2914
2915 2003-05-20 H.J. Lu <hongjiu.lu@intel.com>
2916
2917 * elflink.c (_bfd_elf_merge_symbol): Check ELF_LINK_DYNAMIC_DEF
2918 when removing the old definition for symbols with non-default
2919 visibility.
2920
2921 2003-05-18 Jason Eckhardt <jle@rice.edu>
2922
2923 * elf32-i860.c (elf32_i860_relocate_highadj): Simplify calculation.
2924
2925 2003-05-17 Andreas Schwab <schwab@suse.de>
2926
2927 * elf32-m68k.c (elf_m68k_check_relocs): Cache reloc section in
2928 elf_section_data during processing of pc-relative and absolute
2929 relocations.
2930 (elf_m68k_relocate_section): Use the cached reloc section instead
2931 of computing it again. Fix handling of visibility. Don't modify
2932 addend when copying over a relocation into the output.
2933
2934 2003-05-17 Alan Modra <amodra@bigpond.net.au>
2935
2936 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
2937 to trim plt entries. Move undefweak non-default visibility test..
2938 (allocate_dynrelocs): ..from here.
2939 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't test
2940 dynamic_sections_created here. Update comment. Move undefweak
2941 non-default visibility test..
2942 (allocate_dynrelocs): ..from here. Fix comment.
2943 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
2944 to trim plt entries. Move undefweak non-default visibility test..
2945 (allocate_dynrelocs): ..from here. Fix comment.
2946 * elflink.h (elf_link_output_extsym): Compare ELF_ST_VISIBILITY with
2947 STV_DEFAULT rather than comparing with zero.
2948 * elflink.c (_bfd_elf_merge_symbol): Likewise.
2949 (_bfd_elf_fix_symbol_flags): Likewise. Format comment.
2950
2951 2003-05-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2952
2953 * bfd.c (_bfd_get_gp_value): Prevent illegal access for abfd null
2954 pointers.
2955 (_bfd_set_gp_value): Likewise.
2956
2957 2003-05-16 Michael Snyder <msnyder@redhat.com>
2958 From Bernd Schmidt <bernds@redhat.com>
2959 * archures.c (bfd_mach_h8300sx): New.
2960 * bfd-in2.h: Regenerate.
2961 * cpu-h8300.c (h8300_scan)): Add support for h8300sx.
2962 (h8300sx_info_struct): New.
2963 (h8300s_info_struct): Link to it.
2964 * elf32-h8300.c (elf32_h8_mach): Add support for h8300sx.
2965 (elf32_h8_final_write_processing): Likewise.
2966 (elf32_h8_relax_section): Likewise.
2967
2968 2003-05-16 Kelley Cook <kelleycook@wideopenwest.com>
2969
2970 * config.bfd: Accept i[3-7]86 variants.
2971 * configure.host: Likewise.
2972 * configure.in: Likewise.
2973 * configure: Regenerate.
2974
2975 2003-05-15 H.J. Lu <hongjiu.lu@intel.com>
2976
2977 * elflink.c (_bfd_elf_fix_symbol_flags): Also hide protected
2978 symbol.
2979
2980 2003-05-15 H.J. Lu <hongjiu.lu@intel.com>
2981
2982 * elflink.h (elf_link_check_versioned_symbol): Also allow
2983 the base version.
2984
2985 2003-05-15 Alan Modra <amodra@bigpond.net.au>
2986 H.J. Lu <hongjiu.lu@intel.com>
2987
2988 * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL.
2989 (elf_i386_relocate_section): Likewise.
2990 * elf32-ppc.c (allocate_dynrelocs): Likewise.
2991 (ppc_elf_relocate_section): Likewise.
2992 * elf64-ppc.c (allocate_dynrelocs): Likewise.
2993 (ppc64_elf_relocate_section): Likewise.
2994
2995 2003-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2996
2997 * elf32-mips.c (gprel32_with_gp): Remove useless N64 ABI case.
2998
2999 2003-05-13 Stephane Carrez <stcarrez@nerim.fr>
3000
3001 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Check for
3002 processor capability, allow merge of HC12 and HCS12 in some cases.
3003 (m68hc11_elf_hash_table_create): Use bfd_malloc instead of bfd_zalloc.
3004 * cpu-m68hc12.c (bfd_m68hc12s_arch): New struct.
3005 (bfd_m68hc12_arch): Link it.
3006 (scan_mach): New function.
3007
3008 2003-05-13 Andrew Haley <aph@redhat.com>
3009
3010 * elf.c (bfd_elf_hash): Mask lower 32 bits of hash.
3011
3012 2003-05-13 Alan Modra <amodra@bigpond.net.au>
3013 H.J. Lu <hongjiu.lu@intel.com>
3014
3015 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Move from
3016 elf32-ppc.c. Add ELF_LINK_FORCED_LOCAL check.
3017 * elf32-ppc.c: (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Delete.
3018 (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for dynreloc check.
3019 (ppc_elf_relocate_section): Likewise.
3020 * elf64-ppc.c (allocate_dynrelocs): Likewise.
3021 (ppc64_elf_relocate_section): Likewise. Use for .got relocs too.
3022 (ppc64_elf_adjust_dynamic_symbol): Don't assume symbols with .plt
3023 relocs need no other types.
3024 * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for
3025 dynreloc check.
3026 (elf_i386_relocate_section): Likewise. Use for .got relocs too.
3027 (elf_i386_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL for
3028 .got relocs.
3029
3030 2003-05-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3031
3032 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): For weak symbols,
3033 copy ELF_LINK_NON_GOT_REF from weakdef.
3034 (allocate_dynrelocs): For undef weak syms with non-default
3035 visibility, a) don't allocate plt entries, b) don't allocate
3036 .got relocs, c) discard dyn rel space
3037 (sh_elf_relocate_section): d) don't generate .got relocs, e)
3038 don't generate dynamic relocs.
3039 (sh_elf_copy_indirect_symbol): Don't copy ELF_LINK_NON_GOT_REF
3040 for weakdefs when symbol already adjusted.
3041
3042 2003-05-12 Nick Clifton <nickc@redhat.com>
3043
3044 * elf32-xstormy16.c (xstormy16_elf_howto_table): use 'bitfield'
3045 overflow detection for R_XSTORMY16_16 reloc.
3046
3047 2003-05-12 Paul Clarke <paulc@senet.com.au>
3048
3049 * elf32-h8300.c: Fix typo in name of R_H8_DIR8 reloc.
3050
3051 2003-05-11 Jason Eckhardt <jle@rice.edu>
3052
3053 * elf32-i860.c (elf32_i860_relocate_highadj): Properly
3054 adjust upper bits.
3055 (elf32_i860_relocate_splitn): Obtain upper 5 bits from the
3056 proper place.
3057 (elf32_i860_relocate_pc16): Obtain upper 5 bits from the
3058 proper place.
3059
3060 2003-05-11 Andreas Schwab <schwab@suse.de>
3061
3062 * elf32-m68k.c (elf_m68k_relocate_section): Replace ugly
3063 complicated tests for unresolvable relocs with a simple direct
3064 scheme using "unresolved_reloc" var. Report some detail on
3065 bfd_reloc_outofrange and similar errors.
3066
3067 2003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
3068
3069 * elf32-s390.c (allocate_dynrelocs, elf_s390_relocate_section):
3070 Fix WILL_CALL_FINISH_DYNAMIC_SYMBOL call.
3071 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
3072 * elf64-s390.c: Likewise.
3073
3074 2003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
3075
3076 * elf32-s390.c (ELIMINATE_COPY_RELOCS): Define as one.
3077 (elf_s390_adjust_dynamic_symbol): For weak symbols, copy
3078 ELF_LINK_NON_GOT_REF from weakdef.
3079 (elf_s390_copy_indirect_symbol): Test whether the weakdef sym has
3080 already been adjusted before treating it specially.
3081 * el64-s390.c: Likwise.
3082
3083 2003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
3084
3085 * elf32-s390.c (allocate_dynrelocs): For undef weak syms with
3086 non-default visibility, a) don't make them dynamic, b) discard
3087 space for dynamic relocs.
3088 (elf_s390_relocate_section): Initialize the GOT entries and skip
3089 R_390_{8,16,32}/R_390_PC{16,16DBL,32DBL,32} for weak undefined
3090 symbols with non-default visibility.
3091 * elf64-s390.c: Likewise.
3092
3093 2003-05-09 Alan Modra <amodra@bigpond.net.au>
3094
3095 * cpu-arm.c (arm_check_note): Warning fix.
3096 * elf32-iq2000.c (iq2000_elf_check_relocs): Warning fixes. Arrange
3097 to keep relocs if edited.
3098 (iq2000_elf_print_private_bfd_data): Return TRUE.
3099 * elfxx-ia64.c (elfNN_ia64_relax_section): Use ELFNN_R_SYM, not
3100 ELF64_R_SYM.
3101 (elfNN_ia64_relax_ldxmov): Warning fix.
3102 * xtensa-isa.c (xtensa_add_isa): Warning fix.
3103 * xtensa-modules.c (get_num_opcodes): Warning fix.
3104
3105 2003-05-09 Andrey Petrov <petrov@netbsd.org>
3106
3107 * elf.c (elf_fake_sections): Use correct cast for sh_name.
3108
3109 2003-05-09 Alan Modra <amodra@bigpond.net.au>
3110
3111 * elflink.c (_bfd_elf_link_create_dynamic_sections): Move from
3112 elflink.h. Replace LOG_FILE_ALIGN with bed->s->log_file_align.
3113 (_bfd_elf_create_dynamic_sections): Use bed->s->log_file_align.
3114 (bfd_elf_record_link_assignment): Move from elflink.h.
3115 (_bfd_elf_merge_symbol): Likewise.
3116 (_bfd_elf_add_default_symbol): Likewise.
3117 (_bfd_elf_export_symbol): Likewise.
3118 (_bfd_elf_link_find_version_dependencies): Likewise.
3119 (_bfd_elf_link_assign_sym_version): Likewise.
3120 (_bfd_elf_link_read_relocs): Likewise.
3121 (_bfd_elf_link_size_reloc_section): Likewise.
3122 (_bfd_elf_fix_symbol_flags): Likewise.
3123 (_bfd_elf_adjust_dynamic_symbol): Likewise.
3124 (_bfd_elf_link_sec_merge_syms): Likewise.
3125 (elf_link_read_relocs_from_section): Likewise. Use bed->s->sizeof_rel
3126 and bed->s->sizeof_rela.
3127 (_bfd_elf_link_output_relocs): Likewise.
3128 * elf-bfd.h (struct elf_size_info): Rename file_align to
3129 log_file_align.
3130 (struct elf_info_failed): Move from elflink.h.
3131 (struct elf_assign_sym_version_info): Likewise.
3132 (struct elf_find_verdep_info): Likewise.
3133 (_bfd_elf_create_dynamic_sections): Delete duplicate declaration.
3134 (_bfd_elf_merge_symbol, _bfd_elf_add_default_symbol,
3135 _bfd_elf_export_symbol, _bfd_elf_link_find_version_dependencies,
3136 _bfd_elf_link_assign_sym_version,
3137 _bfd_elf_link_create_dynamic_sections, _bfd_elf_link_read_relocs,
3138 _bfd_elf_link_size_reloc_section, _bfd_elf_link_output_relocs,
3139 _bfd_elf_fix_symbol_flags, _bfd_elf_adjust_dynamic_symbol,
3140 _bfd_elf_link_sec_merge_syms): Declare.
3141 (bfd_elf32_link_create_dynamic_sections): Don't declare.
3142 (_bfd_elf32_link_read_relocs): Likewise.
3143 (bfd_elf64_link_create_dynamic_sections): Likewise.
3144 (_bfd_elf64_link_read_relocs): Likewise.
3145 * elflink.h: Move lots o' stuff elsewhere.
3146 * bfd-in.h (bfd_elf32_record_link_assignment): Don't declare.
3147 (bfd_elf64_record_link_assignment): Likewise.
3148 (bfd_elf_record_link_assignment): Declare.
3149 * bfd-in2.h: Regenerate.
3150 * elfcode.h (elf_link_create_dynamic_sections): Don't declare.
3151 (NAME(_bfd_elf,size_info)): Adjust for log_file_align.
3152 * elf.c (_bfd_elf_init_reloc_shdr): Adjust for bed->s->log_file_align.
3153 (assign_file_positions_for_segments): Likewise.
3154 (assign_file_positions_except_relocs): Likewise.
3155 (swap_out_syms, elfcore_write_note): Likewise.
3156 * elf-m10200.c: Adjust for changed function names.
3157 * elf-m10300.c: Likewise.
3158 * elf32-arm.h: Likewise.
3159 * elf32-h8300.c: Likewise.
3160 * elf32-hppa.c: Likewise.
3161 * elf32-ip2k.c: Likewise.
3162 * elf32-m32r.c: Likewise.
3163 * elf32-m68hc11.c: Likewise.
3164 * elf32-m68hc1x.c: Likewise.
3165 * elf32-m68k.c: Likewise.
3166 * elf32-mips.c: Likewise.
3167 * elf32-ppc.c: Likewise.
3168 * elf32-sh.c: Likewise.
3169 * elf32-v850.c: Likewise.
3170 * elf32-xtensa.c: Likewise.
3171 * elf64-alpha.c: Likewise.
3172 * elf64-hppa.c: Likewise.
3173 * elf64-mmix.c: Likewise.
3174 * elf64-ppc.c: Likewise.
3175 * elf64-sh64.c: Likewise.
3176 * elfxx-ia64.c: Likewise.
3177 * elfxx-mips.c: Likewise.
3178 (MIPS_ELF_LOG_FILE_ALIGN): Use log_file_align.
3179 * elf64-alpha.c (alpha_elf_size_info): Adjust for log_file_align.
3180 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
3181 * elf64-mips.c (mips_elf64_size_info): Likewise.
3182 * elf64-s390.c (s390_elf64_size_info): Likewise.
3183 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
3184
3185 2003-05-08 H.J. Lu <hongjiu.lu@intel.com>
3186
3187 * elflink.h (elf_add_default_symbol): After skipping the
3188 unversioned symbol, go to non-default one.
3189
3190 2003-05-07 H.J. Lu <hongjiu.lu@intel.com>
3191
3192 * elfxx-ia64.c (_bfd_elf_link_hash_hide_symbol): Also clear the
3193 want_plt field.
3194 (elfNN_ia64_relocate_section): Don't do dynamic symbol lookup
3195 for symbols with non-default visibility.
3196
3197 2003-05-07 H.J. Lu <hongjiu.lu@intel.com>
3198
3199 * elflink.h (elf_link_check_versioned_symbol): Also handle the
3200 case that a DSO references a hidden symbol which may be
3201 satisfied by a versioned symbol in another DSO.
3202 (elf_link_output_extsym): Check versioned definition for hidden
3203 symbol referenced by a DSO.
3204
3205 2003-05-07 Nick Clifton <nickc@redhat.com>
3206
3207 * elf32-xstormy16.c (xstormy16_elf_howto_table): Reset
3208 R_XSTORMY16_16 reloc to ignore overflows.
3209
3210 2003-05-06 Alexandre Oliva <aoliva@redhat.com>
3211
3212 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Improve
3213 error message for mixing different-endian files. Check for ABI
3214 compatibility of input files with the selected emulation.
3215
3216 2003-05-05 Alan Modra <amodra@bigpond.net.au>
3217
3218 * elf32-i386.c (allocate_dynrelocs): For undef weak syms with
3219 non-default visibility, a) don't make them dynamic, b) discard
3220 space for dynamic relocs.
3221 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
3222
3223 * elf32-ppc.c (allocate_dynrelocs): For undef weak syms with
3224 non-default visibility, a) don't allocate plt entries, b) don't
3225 allocate .got relocs, c) discard dyn rel space,
3226 (ppc_elf_relocate_section): d) don't generate .got relocs, e)
3227 don't generate dynamic relocs.
3228 * elf64-ppc.c (allocate_dynrelocs): As above.
3229 (ppc64_elf_relocate_section): As above.
3230
3231 2003-05-05 Andreas Jaeger <aj@suse.de>
3232
3233 * elf64-x86-64.c (allocate_dynrelocs): Don't allocate dynamic
3234 relocation entries for weak undefined symbols with non-default
3235 visibility.
3236 (elf64_x86_64_relocate_section): Initialize the GOT entries and
3237 skip R_386_32/R_386_PC32 for weak undefined symbols with
3238 non-default visibility.
3239
3240 2003-05-04 H.J. Lu <hjl@gnu.org>
3241
3242 * elf32-i386.c (allocate_dynrelocs): Don't allocate dynamic
3243 relocation entries for weak undefined symbols with non-default
3244 visibility.
3245 (elf_i386_relocate_section): Initialize the GOT entries and
3246 skip R_386_32/R_386_PC32 for weak undefined symbols with
3247 non-default visibility.
3248
3249 * elfxx-ia64.c (allocate_fptr): Don't allocate function
3250 descriptors for weak undefined symbols with non-default
3251 visibility.
3252 (allocate_dynrel_entries): Don't allocate relocation entries
3253 for symbols resolved to 0.
3254 (set_got_entry): Don't install dynamic relocation for weak
3255 undefined symbols with non-default visibility.
3256 (set_pltoff_entry): Likewise.
3257
3258 * elflink.h (elf_fix_symbol_flags): Hide weak undefined symbols
3259 with non-default visibility.
3260 (elf_link_output_extsym): Don't make weak undefined symbols
3261 with non-default visibility dynamic.
3262
3263 2003-05-04 H.J. Lu <hjl@gnu.org>
3264
3265 * elflink.h (elf_merge_symbol): Correctly handle weak definition.
3266
3267 2003-05-04 H.J. Lu <hjl@gnu.org>
3268
3269 * elflink.h (elf_merge_symbol): Don't record a hidden/internal
3270 symbol dynamic. Check indirection when removing the old
3271 definition for symbols with non-default visibility.
3272 (elf_add_default_symbol): Skip when told by elf_merge_symbol.
3273
3274 2003-05-02 Nick Clifton <nickc@redhat.com>
3275
3276 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make the
3277 R_XSTORMY16_8 and R_XSTORMY16_16 relocs detect and complain about
3278 unsigned overflow.
3279
3280 2003-05-02 Andreas Jaeger <aj@suse.de>
3281
3282 * elf64-x86-64.c (elf_x86_64_copy_indirect_symbol): Don't copy
3283 ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
3284 (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
3285 (elf_x86_64_adjust_dynamic_symbol): For weak symbols, copy
3286 ELF_LINK_NON_GOT_REF from weakdef.
3287
3288 2003-05-02 Charles Lepple <clepple@ghz.cc>
3289 Nick Clifton <nickc@redhat.com>
3290
3291 * acinclude.m4: Fix name of --enable-install-libbfd switch.
3292 * aclocal.m4: Regenerate.
3293 * configure: Regenerate.
3294 * Makefile.in: Regenerate.
3295
3296 2003-05-01 Alan Modra <amodra@bigpond.net.au>
3297
3298 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Test whether the
3299 weakdef sym has already been adjusted before treating it specially.
3300 * elf32-i386.c (elf_i386_copy_indirect_symbol): Don't copy
3301 ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
3302 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
3303 (ppc64_elf_check_relocs): Set ELF_LINK_NON_GOT_REF.
3304
3305 2003-04-28 H.J. Lu <hjl@gnu.org>
3306
3307 * elfxx-ia64.c (elfNN_ia64_relax_section): Relax ldxmov during
3308 the relax finalize pass.
3309
3310 * section.c (struct sec): Add need_finalize_relax and remove
3311 flag11.
3312 (STD_SECTION): Update struct sec initializer.
3313 * bfd-in2.h: Regenerated.
3314
3315 2003-04-28 H.J. Lu <hjl@gnu.org>
3316
3317 * elflink.h (elf_merge_symbol): Call elf_backend_copy_indirect_symbol
3318 to copy any information related to dynamic linking when we flip
3319 the indirection.
3320
3321 2003-04-27 H.J. Lu <hjl@gnu.org>
3322
3323 * elf-bfd.h (ELF_LINK_DYNAMIC_DEF): New.
3324 (ELF_LINK_DYNAMIC_WEAK): New.
3325
3326 * elflink.h (elf_merge_symbol): Add one argument to indicate if
3327 a symbol should be skipped. Ignore definitions in dynamic
3328 objects for symbols with non-default visibility.
3329 (elf_add_default_symbol): Adjusted.
3330 (elf_link_add_object_symbols): Check if a symbol should be
3331 skipped. Don't merge the visibility field with the one from
3332 a dynamic object.
3333 (elf_link_check_versioned_symbol): Use undef_bfd.
3334 (elf_link_output_extsym): Warn if a forced local symbol is
3335 referenced from dynamic objects. Make non-weak undefined symbol
3336 with non-default visibility a fatal error.
3337
3338 2003-04-27 Daniel Jacobowitz <drow@mvista.com>
3339
3340 * configure.in: Bump version on HEAD to 2.14.90.
3341 * configure: Regenerated.
3342
3343 2003-04-26 Stephane Carrez <stcarrez@nerim.fr>
3344
3345 PR savannah/3331:
3346 * elf32-m68hc11.c (m68hc11_elf_relax_section): Clear prev_insn_group
3347 when we couldn't relax something.
3348
3349 2003-04-25 Alan Modra <amodra@bigpond.net.au>
3350
3351 * elflink.h (elf_merge_symbol): When we find a regular definition
3352 for an indirect symbol, flip the indirection so that the old
3353 direct symbol now points to the new definition.
3354
3355 2003-04-24 Roland McGrath <roland@redhat.com>
3356
3357 * elf.c (bfd_section_from_phdr): Map PT_GNU_EH_FRAME to "eh_frame_hdr".
3358
3359 2003-04-24 Alan Modra <amodra@bigpond.net.au>
3360
3361 * elf32-ppc.c: Formatting and comment fixes.
3362 (ELIMINATE_COPY_RELOCS): Move before ppc_elf_copy_indirect_symbol.
3363 (ppc_elf_copy_indirect_symbol): Copy flags here for weakdefs.
3364
3365 2003-04-24 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
3366
3367 * archures.c (bfd_mach_h8300hn, bfd_mach_h8300sn): Added.
3368 * bfd-in2.h: Rebuilt.
3369 * coff-h8300.c (BADMAG): Add check for H8300HNBADMAG & H8300SNBADMAG.
3370 * coffcode.h (coff_set_arch_mach_hook): Add case for H8300HNMAGIC
3371 & H8300SNMAGIC.
3372 (coff_set_flags): Add case for bfd_mach_h8300hn & bfd_mach_h8300sn.
3373 * cpu-h8300.c (h8300_scan): Handle h8300hn, h8300sn.
3374 (h8300sn_info_struct, h8300hn_info_struct): New.
3375 * elf32-h8300.c (elf32_h8_mach): Handle case for h8300hn & h8300sn
3376 (elf32_h8_final_write_processing): Likewise.
3377
3378 2003-04-23 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3379
3380 * elf32-sh.c (tpoff): New.
3381 (struct elf_sh_dyn_relocs): Remove tls_tpoff32.
3382 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
3383 (allocate_dynrelocs): Don't make unnecessary dynamic TLS
3384 relocations. Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses.
3385 (sh_elf_relocate_section): Likewise. Remove unnecessary tests.
3386 (dtpoff_base): Fix wrong indentation.
3387 (sh_elf_check_relocs): Don't set DF_STATIC_TLS flag with non-TLS
3388 relocations. Don't set tls_tpoff32 flag. Don't make unnecessary
3389 R_SH_TLS_TPOFF32 relocations.
3390
3391 2003-04-23 J"orn Rennecke <joern.rennecke@superh.com>
3392
3393 * archures.c (enum bfd_architecture): Amend comment to refer to SuperH.
3394 * cpu-sh.c: Likewise.
3395 * elf32-sh.c: Likewise.
3396 * reloc.c (bfd_reloc_code_real): Likewise.
3397 * elf32-sh64-com.c: Change comment to refer to SuperH.
3398 * elf32-sh64.c: Likewise.
3399 * elf64-sh64.c: Likewise.
3400 * bfd-in2.h (enum bfd_architecture): Regenerate.
3401
3402 2003-04-23 Alan Modra <amodra@bigpond.net.au>
3403
3404 From Julien LEMOINE <speedblue@debian.org>
3405 * elf32-i386.c (elf_i386_info_to_howto): Delete.
3406 (elf_info_to_howto): Define as elf_i386_info_to_howto_rel.
3407
3408 2003-04-22 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
3409
3410 * archures.c: Replace references to Mitsubishi M32R with references
3411 to Renesas M32R.
3412 * relocs.c: Likewise.
3413 * bfd-in2.h: Regenerate.
3414
3415 2003-04-21 Richard Henderson <rth@redhat.com>
3416
3417 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Return false for an
3418 executable when a symbol is defined both regular and dynamic.
3419
3420 2003-04-21 Stephane Carrez <stcarrez@nerim.fr>
3421
3422 * Makefile.am (BFD32_BACKENDS): Add elf32-m68hc1x.lo.
3423 (elf32-m68hc1x.lo): Update dependencies
3424 * configure.in: Add elf32-m68hc1x.lo.
3425 * configure: Rebuild.
3426 * Makefile.in: Rebuild.
3427
3428 2003-04-21 Stephane Carrez <stcarrez@nerim.fr>
3429
3430 * elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
3431 (m68hc11_elf_hash_table_create): New function.
3432 (elf32_m68hc11_link_hash_table_free): New function.
3433 (stub_hash_newfunc): New function.
3434 (m68hc11_add_stub): New function.
3435 (elf32_m68hc11_add_symbol_hook): New function.
3436 (elf32_m68hc11_setup_section_lists): New function.
3437 (elf32_m68hc11_next_input_section): New function.
3438 (elf32_m68hc11_size_stubs): New function.
3439 (elf32_m68hc11_build_stubs): New function.
3440 (m68hc11_get_relocation_value): New function.
3441 (elf32_m68hc11_relocate_section): Call the above to redirect
3442 some relocations to the trampoline code.
3443 (m68hc11_elf_export_one_stub): New function.
3444 (m68hc11_elf_set_symbol): New function.
3445 (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse.
3446 (m68hc11_elf_get_bank_parameters): Get parameters only when the info
3447 is not yet initialized.
3448
3449 * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
3450 (elf32_m68hc11_stub_hash_entry): New struct.
3451 (m68hc11_page_info): Add trampoline handler address.
3452 (m68hc11_elf_link_hash_table): Add stubs generation members.
3453 (elf32_m68hc11_add_symbol_hook): Declare.
3454 (elf32_m68hc11_setup_section_lists): Declare.
3455 (elf32_m68hc11_size_stubs): Declare.
3456 (elf32_m68hc11_build_stubs): Declare.
3457
3458 * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c.
3459 (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise.
3460 (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto.
3461 (_bfd_m68hc11_elf_set_private_flags): Ditto.
3462 (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto.
3463 (_bfd_m68hc11_elf_print_private_bfd_data): Ditto.
3464 (bfd_elf32_bfd_link_hash_table_create): Define.
3465 (elf_backend_add_symbol_hook): Define.
3466 (m68hc11_elf_bfd_link_hash_table_create): New function.
3467 (m68hc11_elf_build_one_stub): New function.
3468 (m68hc11_elf_size_one_stub): New function.
3469 (m68hc11_elf_bfd_link_hash_table_create): Install the above.
3470 (bfd_elf32_bfd_link_hash_table_create): Define.
3471
3472 * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove.
3473 (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked.
3474 (m68hc12_phys_addr): Ditto.
3475 (m68hc12_phys_page): Ditto.
3476 (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c.
3477 (elf32_m68hc11_gc_mark_hook): Likewise.
3478 (elf32_m68hc11_gc_sweep_hook): Likewise.
3479 (elf32_m68hc11_check_relocs): Likewise.
3480 (elf32_m68hc11_relocate_section): Likewise.
3481 (_bfd_m68hc12_elf_set_private_flags): Likewise.
3482 (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise.
3483 (_bfd_m68hc12_elf_print_private_bfd_data): Likewise.
3484 (m68hc12_elf_build_one_stub): New function.
3485 (m68hc12_elf_size_one_stub): New function.
3486 (m68hc12_elf_bfd_link_hash_table_create): New function, use the above.
3487 (elf_backend_add_symbol_hook): Define.
3488 (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
3489
3490 2003-04-18 Nick Clifton <nickc@redhat.com>
3491
3492 * format.c (bfd_check_format_matches): Only check associated
3493 vector if the matching_vector has been created.
3494
3495 2003-04-15 Alexandre Oliva <aoliva@redhat.com>
3496
3497 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Fix typo in
3498 2003-04-09's change.
3499
3500 2003-04-15 Brian Ford <ford@vss.fsi.com>
3501
3502 * peicode.h (coff_swap_scnhdr_in): If a section holds
3503 uninitialized data and is from an object file or from an
3504 executable image that has not initialized the s_size field, or if
3505 the physical size is padded, use the virtual size (stored in
3506 s_paddr) instead.
3507
3508 2003-04-15 H.J. Lu <hjl@gnu.org>
3509
3510 * elflink.h (elf_link_add_object_symbols): Properly report
3511 filename for alignment reduction.
3512
3513 2003-04-15 Rohit Kumar Srivastava <rohits@kpitcummins.com>
3514
3515 * archures.c: Replace occurrances of 'Hitachi' with 'Renesas'.
3516 * reloc.c: Likewise.
3517 * coff-h8300.c: Likewise.
3518 * coff-h8500.c: Likewise.
3519 * coff-sh.c: Likewise.
3520 * cpu-h8300.c: Likewise.
3521 * cpu-sh.c: Likewise.
3522 * elf32-h8300.c: Likewise.
3523 * elf32-sh.c: Likewise.
3524 * elf32-sh64-com.c: Likewise.
3525 * elf32-sh64.c: Likewise.
3526 * elf64-sh64.c: Likewise.
3527 * bfd-in2.h: Regenerate.
3528
3529 2003-04-14 H.J. Lu <hjl@gnu.org>
3530
3531 * elflink.h (elf_link_add_object_symbols): Maintain maximum
3532 alignment for common symbols. Warn reducing alignment for
3533 common symbols. Report old filename when symbol size changes.
3534
3535 2003-04-12 Alexandre Oliva <aoliva@redhat.com>
3536
3537 * elfxx-mips.c (mips_elf_calculate_relocation): Adjust two other
3538 occurrences of the same test changed in the previous patch.
3539 Optimize.
3540
3541 2003-04-11 Alexandre Oliva <aoliva@redhat.com>
3542
3543 * elfxx-mips.c (mips_elf_get_global_gotsym_index): New.
3544 (mips_elf_calculate_relocation): Decay GOT_PAGE/GOT_OFST to
3545 GOT_DISP/addend only if the symbol got a global GOT entry.
3546
3547 2003-04-10 Alexandre Oliva <aoliva@redhat.com>
3548
3549 * elfxx-mips.c (mips_elf_calculate_relocation): Decay
3550 GOT_PAGE/GOT_OFST referencing overridable symbol to
3551 GOT_DISP/addend.
3552 (_bfd_mips_elf_check_relocs): Handle GOT_PAGE referencing
3553 global symbol as GOT_DISP.
3554
3555 2003-04-10 Bob Wilson <bob.wilson@acm.org>
3556
3557 * elf32-xtensa.c (elf_xtensa_relocate_section): Don't continue to the
3558 next relocation on an undefined symbol.
3559
3560 2003-04-09 Richard Henderson <rth@redhat.com>
3561
3562 * elf64-alpha.c (elf64_alpha_relocate_section) <R_ALPHA_GPREL32>:
3563 Ignore relocations against r_symndx == 0.
3564
3565 2003-04-09 H.J. Lu <hjl@gnu.org>
3566
3567 * elf64-alpha.c (elf64_alpha_relocate_section): Don't return
3568 FALSE for undefined symbols.
3569 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
3570
3571 2003-04-09 Alexandre Oliva <aoliva@redhat.com>
3572
3573 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Try DWARF3-standard
3574 and IRIX-specific shift-to-64-bit 4-byte lengths before following
3575 addr_size.
3576
3577 2003-04-08 Alexandre Oliva <aoliva@redhat.com>
3578
3579 * elf32-mips.c (bfd_elf32_bfd_reloc_type_lookup): Detect (ctor)
3580 pointer size from ABI, not arch_bits_per_address.
3581
3582 2003-04-07 Kevin Buettner <kevinb@redhat.com>
3583
3584 * elfn32-mips.c (elf32_mips_grok_prstatus): Adjust core file related
3585 constants for n32 ABI.
3586
3587 2003-04-06 Andrew Cagney <cagney@redhat.com>
3588
3589 * simple.c (bfd_simple_get_relocated_section_contents): Disable
3590 free that leads to GDB vs BFD memory corruption.
3591
3592 2003-04-04 Stephane Carrez <stcarrez@nerim.fr>
3593
3594 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Also adjust
3595 symbols that mark the end of the section.
3596 (m68hc11_elf_relax_section): Use R_M68HC11_PCREL_8 relocs when
3597 converting to a relative branch so that the offset is computed after
3598 the relaxation; also relocate a jsr into a bsr if possible but don't
3599 relax them if they are to a far symbol as we need to call the
3600 trampoline code.
3601 (elf_m68hc11_howto_table): Set pcrel_offset to true.
3602
3603 2003-04-04 Svein E. Seldal <Svein.Seldal@solidas.com>
3604
3605 * archures.c: Namespace cleanup. Rename bfd_mach_c3x to
3606 bfd_mach_tic3x and bfd_mach_c4x to bfd_mach_tic4x
3607 * bfd-in2.h: Regenerate
3608 * coff-tic4x.c: Namespace cleanup. Replace s/c4x/tic4x/
3609 * cpu-tic4x.c: Ditto
3610
3611 2003-04-03 Nick Clifton <nickc@redhat.com>
3612
3613 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Compute ps and ss
3614 differently for object files and executables.
3615 * peicode.h (coff_swap_scnhdr_in): Only set the s_size field
3616 for object files or for executables who have not already
3617 initialised the field.
3618 * libpei.h (bfd_pe_executable_p): New macro. Return true if
3619 the PE format bfd is an executable.
3620
3621 2003-04-03 Alan Modra <amodra@bigpond.net.au>
3622
3623 * elf32-ppc.c (ppc_elf_check_relocs): Don't use SYMBOL_REFERENCES_LOCAL
3624 here as it's too early to reliably determine locality.
3625 (ppc_elf_gc_sweep_hook): Likewise.
3626 (SYMBOL_REFERENCES_LOCAL): Expand comment.
3627
3628 2003-04-02 Bob Wilson <bob.wilson@acm.org>
3629
3630 * xtensa-modules.c: Remove comment indicating that this is a
3631 generated file.
3632
3633 2003-04-02 Alan Modra <amodra@bigpond.net.au>
3634
3635 * elfxx-mips.c (_bfd_mips_elf_hide_symbol): Test for NULL dynobj.
3636
3637 2003-04-01 Bob Wilson <bob.wilson@acm.org>
3638
3639 * Makefile.am (ALL_MACHINES): Add cpu-xtensa.lo.
3640 (ALL_MACHINES_CFILES): Add cpu-xtensa.c.
3641 (BFD32_BACKENDS): Add elf32-xtensa.lo, xtensa-isa.lo, and
3642 xtensa-modules.lo.
3643 (BFD32_BACKENDS_CFILES): Add elf32-xtensa.c, xtensa-isa.c, and
3644 xtensa-modules.c.
3645 (cpu-xtensa.lo): New target.
3646 (elf32-xtensa.lo): Likewise.
3647 (xtensa-isa.lo): Likewise.
3648 (xtensa-modules.lo): Likewise.
3649 * Makefile.in: Regenerate.
3650 * archures.c (bfd_architecture): Add bfd_{arch,mach}_xtensa.
3651 (bfd_archures_list): Add bfd_xtensa_arch.
3652 * config.bfd: Handle xtensa-*-*.
3653 * configure.in: Handle bfd_elf32_xtensa_{le,be}_vec.
3654 * configure: Regenerate.
3655 * reloc.c: Add BFD_RELOC_XTENSA_{RTLD,GLOB_DAT,JMP_SLOT,RELATIVE,
3656 PLT,OP0,OP1,OP2,ASM_EXPAND,ASM_SIMPLIFY}.
3657 * targets.c (bfd_elf32_xtensa_be_vec): Declare.
3658 (bfd_elf32_xtensa_le_vec): Likewise.
3659 (bfd_target_vector): Add bfd_elf32_xtensa_{be,le}_vec.
3660 * cpu-xtensa.c: New file.
3661 * elf32-xtensa.c: Likewise.
3662 * xtensa-isa.c: Likewise.
3663 * xtensa-modules.c: Likewise.
3664 * libbfd.h: Regenerate.
3665 * bfd-in2.h: Likewise.
3666
3667 2003-04-01 Nick Clifton <nickc@redhat.com>
3668
3669 * archures.c (bfd_mach_arm_unknown): Define.
3670 * bfd-in.h (bfd_arm_merge_machines, bfd_arm+update_notes,
3671 bfd_arm_get_mach_from_notes): Prototype.
3672 * bfd-in2.h: Regenerate.
3673 * coff-arm.c (coff_arm_merge_private_bfd_data): Call
3674 bfd_arm_merge_machines.
3675 (coff_arm_final_link_postscript): Call bfd_arm_update_notes.
3676 * coffcode.h (coff_set_arch_mach_hook): Call
3677 bfd_arm_get_mach_from_notes.
3678 * coffgen.c (coff_real_object_p): Revert previous delta.
3679 * cpu_arm.c (arm_check_note): New function. Examine a note in a
3680 .note section.
3681 (bfd_arm_merge_machines): New function: Handle the merging of ARM
3682 binaries compiled for different architectures..
3683 (bfd_arm_update_notes): New function: Update an ARM note section.
3684 (bfd_arm_get_mach_from_notes): New function: Extract a bfd machine
3685 number from an ARM note section.
3686 * elf32-arm.h (elf32_arm_object_p): Use
3687 bfd_arm_get_mach_from_notes.
3688 (elf32_arm_merge_private_bfd_data): Use bfd_arm_merge_machines.
3689 (elf32_arm_final_write_processing): Use bfd_arm_update_notes.
3690
3691 2003-04-01 Ben Elliston <bje@wasabisystems.com>
3692
3693 * dwarf2.c (read_attribute_value): Correct typo in comment.
3694
3695 2003-04-01 Nick Clifton <nickc@redhat.com>
3696
3697 * dwarf2.c (concat_filename): Use bfd_malloc() and strdup()
3698 instead of concat().
3699 (decode_line_info): Only free filename if it is not NULL.
3700 (add_line_info): Make a copy of the filename when storing it into
3701 the info structure.
3702
3703 2003-03-31 Andreas Schwab <schwab@suse.de>
3704 Daniel Jacobowitz <drow@mvista.com>
3705
3706 * simple.c (bfd_simple_get_relocated_section_contents): Add
3707 parameter symbol_table. Optionally use it instead of the symbol
3708 table from the bfd. Save and restore output offsets and output
3709 sections around bfd_get_relocated_section_contents. Fix a memory
3710 leak.
3711 (simple_save_output_info, simple_restore_output_info): New
3712 functions.
3713 * bfd-in2.h: Regenerate.
3714 * dwarf2.c (read_abbrevs): Use
3715 bfd_simple_get_relocated_section_contents instead of
3716 bfd_get_section_contents.
3717 (decode_line_info): Likewise.
3718 (_bfd_dwarf2_find_nearest_line): Likewise. Don't call
3719 find_rela_addend.
3720 (find_rela_addend): Remove.
3721 * elfxx-ia64.c (elfNN_ia64_reloc): Weaken sanity check for
3722 debugging sections.
3723 (elfNN_ia64_hash_table_create): Create the hash table with malloc,
3724 not bfd_zalloc.
3725
3726 2003-03-31 David Heine <dlheine@suif.stanford.edu>
3727
3728 * aoutx.h (aout_link_hash_table_create): Use bfd_malloc instead of
3729 bfd_alloc.
3730 * dwarf2.c (concat_filename): Always allocate space for the
3731 returned filename.
3732 (decode_line_info): Free the allocated filename returned by
3733 concat_filename.
3734 * elf-eh-frame.c (bfd_elf_write_section_eh_frame): Fix memory leaks.
3735 * elf.c (copy_private_bfd_data): Likewise.
3736 (_bfd_elf_slurp_version_tables): Fix bug freeing contents pointer.
3737 * elflink.h (elf_link_sort_relocs): Fix memory leak.
3738 * format.c (bfd_check_format_matches): Likewise.
3739 * linker.c (bfd_generic_final_link): Likewise.
3740 * opncls.c (find_separate_debug_info): Likewise.
3741 * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
3742
3743 2003-03-28 H.J. Lu <hjl@gnu.org>
3744
3745 * elflink.h (elf_link_add_object_symbols): Correctly combine
3746 visibilities.
3747
3748 2003-03-27 Jakub Jelinek <jakub@redhat.com>
3749
3750 * elfxx-ia64.c (elfNN_ia64_relax_section): Reset self_dtpmod_offset
3751 to -1 before recomputing got offsets.
3752
3753 2003-03-26 Andreas Schwab <schwab@suse.de>
3754
3755 * elf32-m68k.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
3756 (elf_m68k_relocate_section): Use it to correctly handle symbols
3757 forced to be local.
3758 (elf_m68k_finish_dynamic_symbol): Emit RELATIVE reloc for got
3759 entries for symbols that are forced to be local.
3760
3761 2003-03-25 Alexandre Oliva <aoliva@redhat.com>
3762
3763 * elfxx-mips.c (_bfd_mips_relax_section): New function.
3764 * elfxx-mips.h (_bfd_mips_relax_section): Declare.
3765 * elfn32-mips.c, elf64-mips.c: Use it.
3766
3767 2003-03-25 Stan Cox <scox@redhat.com>
3768 Nick Clifton <nickc@redhat.com>
3769
3770 Contribute support for Intel's iWMMXt chip - an ARM variant:
3771
3772 * archures.c: Add bfd_mach_arm_iWMMXt.
3773 * reloc.c: Add BFD_RELOC_ARM_CP_OFF_IMM_S2.
3774 * bfd-in2.h: Regenerate.
3775 * libbfd.h: Regenerate.
3776 * coff-arm.c (coff_arm_merge_private_bfd_data): Allow iWMMXt
3777 object files to be linked with XScale ones.
3778 (coff_arm_final_link_postscript): Update note section.
3779 * coffcode.h (coff_set_arch_mach_hook): Handle note section.
3780 * coffgen.c (coff_real_object_p): Call bfd_coff_set_arch_mach_hook
3781 after identifying a coff binary.
3782 * cpu-arm.c (processors): Add iWMMXt.
3783 (arch_inf): Likewise.
3784 * elf32-arm.h (arm_object_p): Handle note section.
3785 (elf32_arm_merge_private_bfd_data): Allow iWMMXt object files to
3786 be linked with XScale ones.
3787 (elf32_arm_section_flags): New function: Set flags on note section.
3788 (elf32_arm_final_write_processing): Handle note section.
3789
3790 2003-03-21 DJ Delorie <dj@redhat.com>
3791
3792 * elf32-xstormy16.c (elf32_xstormy16_relocate_section): Call
3793 _bfd_elf_rela_local_sym.
3794
3795 2003-03-20 H.J. Lu <hjl@gnu.org>
3796
3797 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't try relax for
3798 non-ELF outputs.
3799
3800 2003-03-20 Nick Clifton <nickc@redhat.com>
3801
3802 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Initialise $idata2 and
3803 $idata5 in case bfd_coff_final_link is not called.
3804
3805 2003-03-19 Jakub Jelinek <jakub@redhat.com>
3806
3807 * elf64-sparc.c (struct sparc64_elf_section_data): Add reloc_count
3808 field.
3809 (canon_reloc_count): Define.
3810 (sparc64_elf_slurp_one_reloc_table, sparc64_elf_slurp_reloc_table,
3811 sparc64_elf_canonicalize_dynamic_reloc): Use it instead of
3812 reloc_count.
3813 (sparc64_elf_canonicalize_reloc): New routine.
3814 (bfd_elf64_canonicalize_reloc): Define.
3815
3816 2003-03-18 Jakub Jelinek <jakub@redhat.com>
3817
3818 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle relaxation
3819 againt mergeable sections. Take r_addend into account when caching
3820 trampolines.
3821
3822 2003-03-18 Richard Henderson <rth@redhat.com>
3823
3824 * elfxx-ia64.c (get_dyn_sym_info): Return NULL gracefully for
3825 local symbols that have no dyninfo.
3826
3827 2003-03-14 Gene Smith <gene.smith@siemens.com>
3828
3829 * ieee.c (ieee_write_expression): Handle the case where symbol is
3830 NULL.
3831 General formatting improvements.
3832
3833 2003-03-13 Nick Clifton <nickc@redhat.com>
3834
3835 * configure.in (LINGUAS): Add zh_CN.
3836 * configure: Regenerate.
3837 * po/zh_CN.po: New file.
3838
3839 2003-03-13 Elias Athanasopoulos <elathan@phys.uoa.gr>
3840
3841 * aout-cris.c (BYTES_IN_WORD): Don't define.
3842 aout-encap.c: Likewise.
3843 aout-ns32k.c: Likewise.
3844 aout-tic30.c: Likewise.
3845 hp300bsd.c: Likewise.
3846 i386aout.c: Likewise.
3847 i386dynix.c: Likewise.
3848 i386linux.c: Likewise.
3849 i386lynx.c: Likewise.
3850 i386mach3.c: Likewise.
3851 m68k4knetbsd.c: Likewise.
3852 m68klinux.c: Likewise.
3853 m68klynx.c: Likewise.
3854 m68knetbsd.c: Likewise.
3855 m88kmach3.c: Likewise.
3856 mipsbsd.c: Likewise.
3857 newsos3.c: Likewise.
3858 sparclinux.c: Likewise.
3859 sparclynx.c: Likewise.
3860 sparcnetbsd.c: Likewise.
3861 vaxbsd.c: Likewise. Fix comment formatting.
3862
3863 2003-03-12 Alexandre Oliva <aoliva@redhat.com>
3864
3865 * Reverted 2003-03-02's patch.
3866
3867 * elfxx-target.h (bfd_elfNN_canonicalize_reloc): Make it
3868 overridable.
3869 * elf64-mips.c (mips_elf64_canonicalize_reloc,
3870 mips_elf64_get_dynamic_reloc_upper_bound,
3871 mips_elf64_canonicalize_dynamic_reloc): New, adapted from elf.c.
3872 (bfd_elf64_get_canonicalize_reloc,
3873 bfd_elf64_get_dynamic_reloc_upper_bound,
3874 bfd_elf64_canonicalize_dynamic_reloc): Define.
3875 (mips_elf64_slurp_reloc_table): Support dynamic.
3876 (mips_elf64_slurp_one_reloc_table): Adjust.
3877
3878 2003-03-12 Nick Clifton <nickc@redhat.com>
3879
3880 * xsym.c (bfd_sym_fetch_type_information_table_entry): Change
3881 'index' to 'offset' in test for zero value.
3882
3883 2003-03-11 Alexandre Oliva <aoliva@redhat.com>
3884
3885 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Do not create
3886 dynamic relocations pointing to local or section symbols, use the
3887 NULL symbol instead. Document the choice to not emit an
3888 additional R_MIPS_64 relocation.
3889
3890 2003-03-11 Alan Modra <amodra@bigpond.net.au>
3891
3892 * elf32-ppc.c (ppc_elf_relocate_section): Subtract tls seg vma from
3893 zero index dynamic tls relocs generated for the GOT. Tidy code.
3894 Set "relocation" to 1 on DTPMOD32 relocs. Optimize HA adjustment.
3895 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
3896
3897 2003-03-07 Alan Modra <amodra@bigpond.net.au>
3898
3899 * elf32-ppc.c (ppc_elf_relocate_section): Don't look for a nop after
3900 a tls_get_addr call.
3901
3902 * elf32-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
3903 (ppc_elf_adjust_dynamic_symbol): For weak symbols, copy
3904 ELF_LINK_NON_GOT_REF from weakdef.
3905 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
3906 (ppc64_elf_adjust_dynamic_symbol): For weak symbols, copy
3907 ELF_LINK_NON_GOT_REF from weakdef.
3908 * elf32-i386.c (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
3909 (elf_i386_adjust_dynamic_symbol): For weak symbols, copy
3910 ELF_LINK_NON_GOT_REF from weakdef.
3911
3912 2003-03-06 Jakub Jelinek <jakub@redhat.com>
3913 Andrew Haley <aph@redhat.com>
3914
3915 * elflink.h (elf_bfd_discard_info): Don't process eh frames if
3916 output is relocateable.
3917
3918 2003-03-06 Steven Konopa <skonopa@kgo.csc.com>
3919
3920 * som.c (som_fixup_formats): Correct formats for R_AUX_UNWIND and
3921 R_COMMENT.
3922
3923 2003-03-06 Alan Modra <amodra@bigpond.net.au>
3924
3925 * elf32-ppc.c (ppc_elf_create_linker_section): Don't capitalize
3926 error messages.
3927 (ELIMINATE_COPY_RELOCS): Define to zero.
3928 (ppc_elf_relocate_section): Don't deref htab->tls_sec when calculating
3929 TLSLD relocs. Report reloc types on a number of errors. Optimize
3930 LOCAL24PC check for non-local syms. Don't capitalize error messages.
3931 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define to zero.
3932 (ppc64_elf_relocate_section): Don't deref htab->tls_sec when
3933 calculating TLSLD relocs. Report reloc types on a number of errors.
3934 Don't capitalize error messages.
3935
3936 2003-03-03 H.J. Lu <hjl@gnu.org>
3937
3938 * elfxx-ia64.c (USE_BRL): Removed.
3939 (oor_ip): Removed.
3940
3941 2003-03-03 J"orn Rennecke <joern.rennecke@superh.com>
3942
3943 * elf32-sh.c (sh_elf_howto_tab): Make R_SH_IND12W into an ordinary
3944 relocation (no special function), and make it non-partial_inplace.
3945 (sh_elf_relax_section): When creating a bsr, use a consistent value
3946 no matter if the symbol is extern or not; set addend to -4.
3947 Don't swap load / non-load instructions for SH4.
3948 (sh_elf_relax_delete_bytes): In R_SH_IND12W case, check the offset
3949 rather than if the symbol is external to determine if adjusting the
3950 offset makes sense. Adjust the addend too if appropriate.
3951 (sh_elf_relocate_section): In R_SH_IND12W, don't fiddle with the
3952 relocation.
3953
3954 2003-03-03 Nick Clifton <nickc@redhat.com>
3955
3956 * po/da.po: Installed latest translation.
3957
3958 2003-03-02 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3959
3960 * elf32-mips.c (elf_mips_howto_table_rel): Change definition of
3961 R_MIPS_PC16 to rightshift 2.
3962 (elf_reloc_map mips_reloc_map): Map to rightshifted BFD reloc.
3963 (bfd_elf32_bfd_reloc_type_lookup): Support
3964 BFD_RELOC_MIPSEMB_16_PCREL_S2.
3965 * elf64-mips.c (mips_elf64_howto_table_rel): Change definition of
3966 R_MIPS_PC16 to rightshift 2.
3967 (mips_elf64_howto_table_rela): Likewise.
3968 (mips_reloc_map): Map to rightshifted BFD reloc.
3969 * elfn32-mips.c: The same as in elf64-mips.c.
3970 * elfxx-mips.c (mips_elf_got_for_ibfd): Typo in comment.
3971 (mips_elf_calculate_relocation): Handle rightshifted addends for
3972 R_MIPS_PC16.
3973 * reloc.c (BFD_RELOC_MIPSEMB_16_PCREL_S2): New BFD relocation for
3974 MIPS Embedded PIC. Remove superfluous empty COMMENT.
3975 * libbfd.h: Regenerate.
3976 * bfd-in2.h: Regenerate.
3977
3978 2003-02-28 Richard Henderson <rth@redhat.com>
3979
3980 * elfxx-ia64.c (elfNN_ia64_relax_section): Correct bounds
3981 for ltoff22x relaxation.
3982
3983 2003-03-01 Alan Modra <amodra@bigpond.net.au>
3984
3985 * bfd-in.h (_bfd): Don't define.
3986 * bfd.c: Rename occurrences of "struct _bfd" to "struct bfd".
3987 * syms.c: Likewise.
3988 * bfd-in2.h: Regenerate.
3989
3990 2003-02-27 Richard Henderson <rth@redhat.com>
3991
3992 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add want_gotx;
3993 (elfNN_ia64_check_relocs): Set it.
3994 (allocate_global_data_got): Check it.
3995 (allocate_local_got): Likewise.
3996 (allocate_dynrel_entries): Likewise.
3997 (elfNN_ia64_relax_ldxmov): New.
3998 (elfNN_ia64_relax_section): Handle LTOFF22X, LDXMOV.
3999 (elfNN_ia64_choose_gp): Split out from ...
4000 (elfNN_ia64_final_link): ... here.
4001
4002 2003-02-27 Andrew Cagney <cagney@redhat.com>
4003
4004 * bfd.c (struct bfd): Rename "struct _bfd".
4005 * bfd-in.h: Update copyright.
4006 (struct bfd): Rename "struct _bfd".
4007 (_bfd): Define for backward compatibility.
4008 * bfd-in2.h: Regenerate.
4009
4010 2003-02-25 Alan Modra <amodra@bigpond.net.au>
4011
4012 * elflink.h (elf_bfd_final_link): Apportion reloc counts to rel_hdr
4013 and rel_hdr2 when initially counting input relocs rather than after
4014 creating output reloc sections.
4015 (elf_link_read_relocs_from_section): Don't abort with wrong reloc
4016 sizes.
4017
4018 * Makefile.am: Run "make dep-am".
4019 * Makefile.in: Regenerate.
4020
4021 2003-02-24 Kris Warkentin <kewarken@qnx.com>
4022
4023 * elf.c (elfcore_read_notes): Add check for QNX style core file.
4024 (elfcore_grog_nto_note): New function.
4025 (elfcore_grog_nto_gregs): New function.
4026 (elfcore_grog_nto_status): New function.
4027
4028 2003-02-24 Alan Modra <amodra@bigpond.net.au>
4029
4030 * elflink.c (_bfd_elf_create_got_section): Check existing .got
4031 section flags before concluding that we've already been called.
4032 Don't use register keyword.
4033 (_bfd_elf_create_dynamic_sections): Don't use register keyword.
4034 (_bfd_elf_create_linker_section): Formatting.
4035
4036 2003-02-20 jmc <jmc@prioris.mini.pw.edu.pl>
4037
4038 * coff-h8300.c: Fix typo: intial -> initial.
4039 * coff-ppc.c: Likewise.
4040
4041 2003-02-20 Alan Modra <amodra@bigpond.net.au>
4042
4043 * elf32-ppc.c: Formatting.
4044 (allocate_dynrelocs): LD and GD relocs against the same sym need
4045 separate GOT entries.
4046 (ppc_elf_relocate_section): Correct GOT handling for multiple GOT
4047 entries per symbol.
4048
4049 2003-02-19 Alan Modra <amodra@bigpond.net.au>
4050
4051 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Simplify dynamic reloc
4052 removal. Localize vars. Remove unnecessary dynobj test.
4053 * elf32-i386 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead
4054 of INFO.
4055 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
4056 and optimize.
4057 (elf_i386_relocate_section): Likewise.
4058 (elf_i386_gc_sweep_hook): Simplify dyn reloc removal. Localize vars.
4059 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
4060 * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
4061 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
4062 * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
4063 * elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise. Remove
4064 local_dynrel for section too. Don't touch HIPLT22, LOPLT10, PCPLT32
4065 or PCPLT10 relocs. Don't subtract twice on PLT32 relocs.
4066 Formatting.
4067
4068 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define.
4069 (ppc64_elf_check_relocs): Use it. Correct comment. Move SEC_ALLOC
4070 test.
4071 (ppc64_elf_adjust_dynamic_symbol): Use ELIMINATE_COPY_RELOCS.
4072 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
4073 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
4074 and optimize. Use ELIMINATE_COPY_RELOCS.
4075 (ppc64_elf_relocate_section): Likewise.
4076
4077 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Add pc_count field.
4078 (ppc_elf_copy_indirect_symbol): Copy pc_count field.
4079 (ELIMINATE_COPY_RELOCS): Define.
4080 (ppc_elf_adjust_dynamic_symbol): Convert copy relocs to dynamic.
4081 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
4082 (MUST_BE_DYN_RELOC): Define.
4083 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
4084 and optimize. Trim dyn_relocs.
4085 (ppc_elf_check_relocs): Don't generate dyn_relocs when we know they'll
4086 not be used. Do generate dyn_relocs for copy reloc avoidance. Keep
4087 track of pc_rel dyn relocs.
4088 (ppc_elf_relocate_section): Remove "will_become_local". Adjust
4089 WILL_CALL_FINISH_DYNAMIC_SYMBOL use. Trim dyn relocs as per
4090 allocate_dynrelocs. Don't recalculate "sec".
4091
4092 2003-02-18 Alan Modra <amodra@bigpond.net.au>
4093
4094 * elf32-ppc.c (ppc_elf_relocate_section): Remove unnecessary test.
4095 * elf64-ppc.c (ppc64_elf_tls_optimize): Decrement tlsld_got.refcount
4096 on invalid LD relocs.
4097 (allocate_dynrelocs): Invalid LD relocs don't use tlsld_got entry.
4098 (ppc64_elf_relocate_section): Unify new handling of LD relocs and
4099 tlsld_got entry. Use IS_PPC64_TLS_RELOC.
4100
4101 * elf32-ppc.h: New file.
4102 * elf32-ppc.c: Include elf32-ppc.h.
4103 (NOP, CROR_151515, CROR_313131, TP_OFFSET, DTP_OFFSET): Define.
4104 (struct ppc_elf_link_hash_entry): Rename "root" to "elf". Adjust uses.
4105 Add "tls_mask" field.
4106 (TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL, TLS_TLS, TLS_TPRELGD): Define.
4107 (struct ppc_elf_link_hash_table): Rename "root" to "elf". Adjust uses.
4108 Add got, relgot, plt, relplt, dynbss, relbss, dynsbss, relsbss,
4109 sdata, sdata2, tls_sec, tls_get_addr, tlsld_got fields.
4110 Make use of htab shortcuts throughout file.
4111 (ppc_elf_link_hash_newfunc): Init tls_mask field.
4112 (ppc_elf_link_hash_table_create): Init new fields.
4113 (ppc_elf_copy_indirect_symbol): Copy tls_mask.
4114 (ppc_elf_howto_raw): Add tls relocs.
4115 (ppc_elf_reloc_type_lookup): Handle them.
4116 (ppc_elf_unhandled_reloc): New function.
4117 (ppc_elf_create_got): Stash got section pointer in hash table,
4118 return status. Make .rela.got too.
4119 (ppc_elf_create_dynamic_sections): Stash section pointers in htab.
4120 (ppc_elf_adjust_dynamic_symbol): Only set up copy relocs when
4121 NON_GOT_REF set. Don't allocate space in .plt here..
4122 (allocate_dynrelocs): ..do so here instead, properly ref-counting and
4123 not allocating plt entries unnecessarily. Allocate got entries here.
4124 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
4125 (ppc_elf_size_dynamic_sections): Allocate local got entries. Pass
4126 "info" during allocate_dynrelocs hash traversal. Use htab section
4127 shortcuts rather than searching for named sections. Get rid of
4128 "plt" and "strip" booleans.
4129 (update_local_sym_info, bad_shared_reloc): New functions.
4130 (ppc_elf_check_relocs): Handle TLS relocs. Move .rela.got creation to
4131 ppc_elf_create_got. Don't mark got or plt reloc syms dynamic, do so
4132 in allocate_dynreloc. Use update_local_sym_info and bad_shared_reloc.
4133 Disallow R_PPC_EMB_RELSDA, R_PPC_EMB_NADDR32, R_PPC_EMB_NADDR16,
4134 R_PPC_EMB_NADDR16_LO, R_PPC_EMB_NADDR16_HI and R_PPC_EMB_NADDR16_HA
4135 in shared libs. R_PPC_PLTREL32 is a plt reloc too. Refcount all
4136 relocs that might use a plt entry. Set NON_GOT_REF too.
4137 Enumerate all do-nothing relocs.
4138 (ppc_elf_gc_sweep_hook): Simplify removal of dynrelocs. Handle
4139 tls relocs and all plt relocs.
4140 (ppc_elf_tls_setup, ppc_elf_tls_optimize): New functions.
4141 (ppc_elf_finish_dynamic_symbol): Don't build got entries here.
4142 (ppc_elf_finish_dynamic_sections): Rewrite tag code using htab
4143 shortcuts.
4144 (ppc_elf_relocate_section): Tidy. Handle TLS relocs. Use
4145 bfd_elf_local_sym_name. Simplify unresolved reloc code. Build got
4146 entries and got relocs here. Warn on non-zero got reloc addend.
4147 Split out branch taken/not taken reloc code into a separate switch
4148 and correct offset calculation. Allow BRTAKEN/BRNTAKEN dynamic relocs.
4149 Split out HA reloc adjustments to separate switch statement. Don't
4150 warn on reloc overflow if we've already warned about undefined.
4151 Don't rebuild sym name when reporting errors. Report all possible
4152 errors from _bfd_final_link_relocate.
4153 (bfd_elf32_bfd_final_link): Don't define.
4154
4155 2003-02-18 Alan Modra <amodra@bigpond.net.au>
4156
4157 * elf64-ppc.c (ppc64_elf_relocate_section): Don't init "r". Don't
4158 rebuild sym name when reporting errors.
4159
4160 2003-02-17 Nick Clifton <nickc@redhat.com>
4161
4162 * elflink.h (elf_link_output_extsym): Only check
4163 allow_shlib_undefined for shared libraries.
4164 * elf32-i386.c (elf_i386_relocate_section): Remove bogus check
4165 of allow_shlib_undefined.
4166 * elf32-cris.c (cris_elf_relocate_section): Likewise.
4167 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
4168 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
4169 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
4170 * elf32-s390.c (elf_s390_relocate_section): Likewise.
4171 * elf32-sh.c (sh_elf_relocate_section): Likewise.
4172 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
4173 * elf32-vax.c (elf_vax_relocate_section): Likewise.
4174 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
4175 * elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
4176 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
4177 * elf64-s390.c (elf_s390_relocate_section): Likewise.
4178 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
4179 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
4180 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
4181 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
4182
4183 2003-02-17 Nick Clifton <nickc@redhat.com>
4184
4185 * elf.c (SEGMENT_AFTER_SEGMENT): Add third parameter - the
4186 address field to use in the comparison.
4187 (SEGMENT_OVERLAPS): Check that LMAs overlap as well.
4188
4189 2003-02-14 Bob Wilson <bob.wilson@acm.org>
4190
4191 * elfcore.h (elf_core_file_p): Compare alternate machine codes for ELF
4192 backends when checking if the generic ELF target should be used.
4193
4194 * syms.c (_bfd_stab_section_find_nearest_line): For line number stabs
4195 outside of functions, treat values as absolute addresses.
4196
4197 * bfd.c: Change embedded documentation to use consistent indentation
4198 and to split up long lines. Change informal style of description
4199 for functions lacking real documentation.
4200 * coffcode.h: Break up long lines in embedded documentation.
4201 * format.c: Likewise.
4202 * targets.c: Likewise.
4203 * libcoff.h: Regenerate.
4204 * bfd-in2.h: Regenerate.
4205
4206 2003-02-14 Alan Modra <amodra@bigpond.net.au>
4207
4208 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Init tls_get_addr.
4209 (ppc64_elf_copy_indirect_symbol): Merge tls_mask too.
4210 (ppc64_elf_gc_sweep_hook): Simplify removal of dyn_relocs.
4211 (allocate_dynrelocs): Don't treat undefined and undefweak specially.
4212 (ppc_size_one_stub): Fix warning, and tighten plt entry check.
4213 (group_sections): Don't share a stub section if stubs are for a large
4214 section. Adjust comment.
4215 (ppc64_elf_size_stubs): Roughly double the size left for stubs if
4216 !stubs_always_before_branch.
4217 (ppc64_elf_relocate_section): Initialize tlsld GOT entry once. Don't
4218 treat undefined and undefweak specially when processing dyn relocs.
4219
4220 2003-02-13 Jakub Jelinek <jakub@redhat.com>
4221
4222 * elflink.h (elf_link_add_object_symbols): Handle .symver x, x@FOO.
4223
4224 2003-02-13 Nick Clifton <nickc@redhat.com>
4225
4226 * elf32-arm.h (elf32_thumb_to_arm_stub): Include section VMAs
4227 in computation of offset to insert into BL instruction.
4228
4229 2003-02-11 Uwe Stieber <uwe@wwws.de>
4230
4231 * config.bfd: Add support for kaOS as cross build target system.
4232
4233 2003-02-11 Alan Modra <amodra@bigpond.net.au>
4234
4235 * elf64-ppc.c (ppc64_elf_check_relocs): Match versioned
4236 .__tls_get_addr too.
4237 (ppc64_elf_tls_setup): Ensure cached tls_get_addr is not indirect.
4238
4239 2003-02-10 Kaz kojima <kkojima@rr.iij4u.or.jp>
4240
4241 * elf32-sh.c (elf_sh_dyn_relocs): Add tls_tpoff32 field.
4242 (elf_sh_link_hash_entry): Remove tls_tpoff32 field.
4243 (sh_elf_link_hash_newfunc): Remove the initialization of
4244 tls_tpoff32 field.
4245 (allocate_dynrelocs): Keep dyn_relocs if it includes the entry
4246 for which tls_tpoff32 flag is set.
4247 (sh_elf_relocate_section): Covert to LE only if the dyn_relocs
4248 of the symbol includes the entry matched with the input_section
4249 and having tls_tpoff32 flag on. When linking statically, set
4250 symbol index of R_SH_TLS_TPOFF32 relocation to zero if the symbol
4251 is defined in this executable.
4252 (sh_elf_check_relocs): Set tls_tpoff32 flag appropriately.
4253
4254 2003-02-10 Jakub Jelinek <jakub@redhat.com>
4255
4256 * elf32-s390.c (elf_s390_size_dynamic_sections): Set relocs to TRUE
4257 even if there is just non-empty .rela.plt.
4258
4259 2003-02-10 Nick Clifton <nickc@redhat.com>
4260
4261 * archures.c (bfd_mach_arm_ep9312): Define.
4262 * bfd-in2.h: Regenerate.
4263 * cpu-arm.c (processors[]): Add ep9312.
4264 (bfd_arm_arch): Add ep9312.
4265 * elf32-arm.h (elf32_arm_merge_private_data): Update error
4266 messages and add test for Maverick floating point support.
4267 (elf32_arm_print_private_bfd_data): Handle
4268 EF_ARM_MAVERICK_FLOAT flag.
4269 (elf32_arm_object_p): New function.
4270 (elf_backend_object_p): Define.
4271
4272 2003-02-10 Alan Modra <amodra@bigpond.net.au>
4273
4274 * elf64-ppc.c: Rename assorted occurrences of tls_type and similar
4275 variables, structure fields or function params to tls_mask or
4276 similar to better reflect usage.
4277 (struct got_entry): Comment.
4278 (struct ppc_link_hash_entry): Expand comment, and renumber TLS_*.
4279 (get_tls_mask): Rename from get_tls_type.
4280
4281 2003-02-09 Alan Modra <amodra@bigpond.net.au>
4282
4283 * elf64-ppc.c (TLS_GD_LD): Don't define..
4284 (TLS_GD): ..define this instead and update all uses.
4285 (TLS_TPRELGD): Define.
4286 (ppc64_elf_link_hash_table_create): Tweak initialization of
4287 init_refcount and init_offset.
4288 (ppc64_elf_check_relocs): Add one extra element to t_symndx array.
4289 Mark second slot of GD or LD toc entries.
4290 (get_tls_type): Return an int. Distinguish toc GD and LD entries
4291 from other tls types.
4292 (ppc64_elf_tls_setup): New function, split out from..
4293 (ppc64_elf_tls_optimize): ..here. Don't optimize when symbols are
4294 defined in a dynamic object. Fix LD optimization. Don't set TLS_TPREL
4295 on GD->IE optimization, use TLS_TPRELGD instead. Use get_tls_type
4296 return value to properly decide whether toc GD and LD entries can
4297 optimize away __tls_get_addr call. Check next reloc after DTPMOD64
4298 to determine GD or LD rather than looking at TLS_LD flag. Don't
4299 attempt to adjust got entry tls_type here..
4300 (allocate_dynrelocs): ..instead, adjust got entry tls_type here, and
4301 look for possible merges.
4302 (ppc64_elf_size_dynamic_sections): Adjust local got entries for
4303 optimization.
4304 (ppc64_elf_size_stubs): Tweak __tls_get_addr fudge.
4305 (ppc64_elf_relocate_section): Rename some vars to better reflect usage.
4306 Make use of return value from get_tls_type to properly detect GD and
4307 LD optimizations. Split tlsld/gd hi/ha from lo/ds case. Don't
4308 handle tls_get_addr removal when looking at REL24 relocs, do it when
4309 looking at the previous reloc. Check reloc after DTPMOD64 to determine
4310 GD or LD.
4311 * elf64-ppc.h (ppc64_elf_tls_setup): Declare.
4312
4313 2003-02-08 Alan Modra <amodra@bigpond.net.au>
4314
4315 * elf32-hppa.c (group_sections): Don't share a stub section if
4316 stubs are for a large section.
4317
4318 * elf32-hppa.c (elf32_hppa_size_stubs): Double the size left for
4319 stubs if !stubs_always_before_branch.
4320
4321 2003-02-07 Nick Clifton <nickc@redhat.com>
4322
4323 * elf.c (swap_out_syms): Generate an error message if an
4324 equivalent output section cannot be found for a symbol.
4325
4326 2003-02-07 Jakub Jelinek <jakub@redhat.com>
4327
4328 * elf64-alpha.c (elf64_alpha_relax_section): Don't crash if
4329 local_got_entries is NULL.
4330
4331 2003-02-06 Andreas Schwab <schwab@suse.de>
4332
4333 * elf-eh-frame.c (get_DW_EH_PE_signed): Define.
4334 (read_value): Add parameter is_signed, use signed extraction if
4335 the value is signed.
4336 (_bfd_elf_write_section_eh_frame): Pass signed flag of the
4337 encoding to read_value.
4338
4339 2003-02-06 Alan Modra <amodra@bigpond.net.au>
4340
4341 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy got and
4342 plt info when called to transfer weak sym info.
4343
4344 2003-02-05 Alan Modra <amodra@bigpond.net.au>
4345
4346 * reloc.c: Add PPC and PPC64 TLS relocs.
4347 * libbfd.h: Regenerate.
4348 * bfd-in2.h: Regenerate.
4349 * elf64-ppc.c (TP_OFFSET, DTP_OFFSET): Declare.
4350 (ppc64_elf_howto_raw): Add TLS howto's. Adjust R_PPC64_NONE to be
4351 against a 32 bit field.
4352 (ppc64_elf_reloc_type_lookup): Handle TLS relocs.
4353 (_ppc64_elf_section_data): Add t_symndx and comments.
4354 (ppc64_elf_section_data): Use elf_section_data macro.
4355 (ppc64_elf_new_section_hook): American spelling.
4356 (struct got_entry, struct plt_entry): New.
4357 (MUST_BE_DYN_RELOC): Rename from IS_ABSOLUTE_RELOC.
4358 (struct ppc_stub_hash_entry): Add "addend" field.
4359 (struct ppc_link_hash_entry): Add "tls_type".
4360 (TLS_TLS, TLS_GD_LD, TLS_LD, TLS_TPREL, TLS_DTPREL,
4361 TLS_EXPLICIT): Define.
4362 (struct ppc_link_hash_table): Add tls_sec, tls_get_addr, tlsld_got.
4363 (link_hash_newfunc): Init new fields.
4364 (ppc64_elf_link_hash_table_create): Likewise. Set init_refcount and
4365 init_offset to NULL.
4366 (ppc64_elf_copy_indirect_symbol): Copy got and plt info. Don't call
4367 _bfd_elf_link_hash_copy_indirect, rather insert relevant code from
4368 there.
4369 (update_local_sym_info, update_plt_info): New functions.
4370 (ppc64_elf_check_relocs): Use them. Handle TLS relocs. Adjust GOT
4371 handling to use got.glist rather than got.refcount. Likewise for PLT.
4372 (ppc64_elf_gc_sweep_hook): Handle TLS relocs, new GOT and PLT lists.
4373 (func_desc_adjust): Adjust for new PLT list.
4374 (ppc64_elf_adjust_dynamic_symbol): Likewise.
4375 (get_sym_h, get_tls_type): New functions.
4376 (ppc64_elf_edit_opd): Remove unused variable. Use get_sym_h.
4377 (ppc64_elf_tls_optimize): New function.
4378 (allocate_dynrelocs): Adjust for new PLT and GOT lists. Allocate
4379 TLS relocs.
4380 (ppc64_elf_size_dynamic_sections): Likewise.
4381 (ppc_type_of_stub): Adjust for new PLT list.
4382 (ppc_build_one_stub): Likewise.
4383 (ppc64_elf_size_stubs): Likewise. Use get_sym_h. Treat __tls_get_addr
4384 calls specially.
4385 (ppc64_elf_relocate_section): Adjust for new GOT and PLT lists. Handle
4386 TLS relocs. Report local syms using bfd_elf_local_sym_name. Don't
4387 init GOT entries that have a reloc. Generate GOT relocs here..
4388 (ppc64_elf_finish_dynamic_symbol): ..not here. Adjust for PLT list.
4389 * elf64-ppc.h (ppc64_elf_tls_optimize): Declare.
4390
4391 2003-02-04 Andreas Schwab <schwab@suse.de>
4392
4393 * elf32-m68k.c (elf_m68k_hash_entry): Define.
4394 (elf_m68k_link_hash_traverse): Remove.
4395 (elf_m68k_link_hash_newfunc): Use struct bfd_hash_entry and
4396 elf_m68k_hash_entry instead of struct elf_m68k_link_hash_entry to
4397 reduce casting.
4398 (elf_m68k_check_relocs): Use elf_m68k_hash_entry instead of
4399 casting.
4400 (elf_m68k_size_dynamic_sections): Use elf_link_hash_traverse
4401 instead of elf_m68k_link_hash_traverse.
4402 (elf_m68k_discard_copies): Change first parameter to pointer to
4403 struct elf_link_hash_entry and use elf_m68k_hash_entry when struct
4404 elf_m68k_link_hash_entry is needed.
4405
4406 2003-02-04 Alan Modra <amodra@bigpond.net.au>
4407
4408 * elf-bfd.h (struct got_entry, struct plt_entry): Forward declare.
4409 (struct elf_link_hash_entry): Add "glist" and "plist" fields to
4410 "got" union, and declare as gotplt_union. Use gotplt_uinion for
4411 "plt" field.
4412 (struct elf_link_hash_table): Make "init_refcount" a gotplt_union.
4413 Add "init_offset" field.
4414 (struct elf_obj_tdata <local_got>): Add "struct got_entry **" to union.
4415 (elf_local_got_ents): Declare.
4416 * elf.c (_bfd_elf_link_hash_newfunc): Adjust initialization of "got"
4417 and "plt".
4418 (_bfd_elf_link_hash_hide_symbol): Use "init_offset".
4419 (_bfd_elf_link_hash_table_init): Set "init_offset".
4420 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set init_refcount
4421 from init_offset.
4422 (elf_adjust_dynamic_symbol): Set plt and got offsets using init_offset.
4423
4424 * elf.c (bfd_elf_local_sym_name): Split out from..
4425 (group_signature): ..here.
4426 * elf-bfd.h (bfd_elf_local_sym_name): Declare.
4427
4428 2003-02-04 Alan Modra <amodra@bigpond.net.au>
4429
4430 * elf-bfd.h (enum elf_link_info_type): Remove.
4431 (struct bfd_elf_section_data): Move sec_info_type, use_rela_p fields
4432 to struct sec. Remove linkonce_p field.
4433 (elf_linkonce_p): Delete.
4434 (elf_discarded_section): Update for sec_info_type change.
4435 * section.c (struct sec): Add sec_info_type, use_rela_p, has_tls_reloc,
4436 flag11, flag12, flag13, flag14, flag15, flag16, flag20, flag24.
4437 (ELF_INFO_TYPE_NONE): Define.
4438 (ELF_INFO_TYPE_STABS): Define.
4439 (ELF_INFO_TYPE_MERGE): Define.
4440 (ELF_INFO_TYPE_EH_FRAME): Define.
4441 (ELF_INFO_TYPE_JUST_SYMS): Define.
4442 (STD_SECTION): Update struct sec initializer.
4443 * ecoff.c (bfd_debug_section): Likewise.
4444 * elf.c: Likewise. Update occurrences of sec_info_type and use_rela_p.
4445 * elflink.h: Likewise.
4446 * elf-eh-frame.c: Likewise.
4447 * elf64-alpha.c: Likewise.
4448 * elfxx-ia64.c: Likewise.
4449 * elfxx-mips.c: Likewise.
4450 * bfd-in2.h: Regenerate.
4451
4452 * elf32-sparc.c (sec_do_relax): Use elf_section_data macro rather than
4453 referring to used_by_bfd.
4454 * elf64-sparc.c (sec_do_relax): Likewise.
4455 * elf64-mmix.c (mmix_elf_section_data): Likewise.
4456 * elfxx-mips.c (mips_elf_section_data): Likewise.
4457 * ieee.c (ieee_slurp_section_data): Use ieee_per_section macro.
4458 (ieee_get_section_contents): Likewise.
4459 (ieee_new_section_hook): Formatting.
4460 (ieee_canonicalize_reloc): Remove commented out code.
4461 * mmo.c (mmo_section_data): Define. Use throughout file.
4462 * oasys.c (oasys_get_section_contents): Use oasys_per_section macro.
4463
4464 2003-01-31 Graydon Hoare <graydon@redhat.com>
4465
4466 * Makefile.am (opncls.lo): Add dependency upon libiberty.h.
4467 * Makefile.in: Regenerate.
4468 * opncls.c (calc_crc32, get_debug_link_info,
4469 seperate_debug_file_exists, find_seperate_debug_file): New
4470 internal functions.
4471 (bfd_follow_gnu_debuglink): New function. Follow the pointer
4472 contained inside a .gnu_debuglink section.
4473 * bfd-in2.h: Regenerate.
4474
4475 2003-01-29 Alexandre Oliva <aoliva@redhat.com>
4476
4477 * elfxx-mips.c (mips_elf_got_entry_hash): Don't dereference
4478 entry->abfd when it's NULL.
4479
4480 2003-01-27 Alexandre Oliva <aoliva@redhat.com>
4481
4482 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Handle
4483 _bfd_elf_section_offset returning -2 the same way as -1.
4484
4485 * elfxx-mips.c (mips_elf_multi_got): New function.
4486 (struct mips_got_entry): Make symndx and gotidx signed. Moved
4487 addend into union along with address and link hash entry.
4488 (struct mips_got_info): Added bfd2got and next.
4489 (struct mips_elf_hash_sort_data): Added max_unref_got_dynindx.
4490 (mips_elf_got_section, mips_elf_create_got_section): Use
4491 SEC_EXCLUDE bit to tell whether we really need the got
4492 section. Take boolean arguments to disregard an excluded
4493 section, or to create it as excluded. Adjust all callers.
4494 Use mips_elf_got_section all over.
4495 (mips_elf_local_got_index, mips_elf_got_page,
4496 mips_elf_got16_entry): Take input bfd as argument, and pass it
4497 on to mips_elf_create_local_got_entry.
4498 (mips_elf_global_got_index, mips_elf_create_local_got_entry):
4499 Take input bfd as argument, and manage entries in the
4500 appropriate GOT.
4501 (mips_elf_got_offset_from_index): Take input bfd as argument,
4502 and use it to adjust the GP offset of the bfd.
4503 (mips_elf_sort_hash_table, mips_elf_sort_hash_table_f): Move
4504 unreferenced GOT entries of global symbols to the end.
4505 (mips_elf_record_global_got_symbol): Take input bfd as
4506 argument. Add entries to the master GOT hash table.
4507 (struct mips_elf_bfd2got_hash): New.
4508 (struct mips_elf_got_per_bfd_arg): New.
4509 (struct mips_elf_set_global_got_offset_arg): New.
4510 (mips_elf_hash_bfd_vma, mips_elf_multi_got_entry_hash,
4511 mips_elf_multi_got_entry_eq, mips_elf_bfd2got_entry_hash,
4512 mips_elf_bfd2got_entry_eq, mips_elf_make_got_per_bfd,
4513 mips_elf_merge_gots, mips_elf_set_global_got_offset,
4514 mips_elf_resolve_final_got_entry,
4515 mips_elf_resolve_final_got_entries, mips_elf_adjust_gp,
4516 mips_elf_got_for_ibfd): New functions.
4517 (ELF_MIPS_GP_OFFSET): Don't depend on SGI_COMPAT.
4518 (MIPS_ELF_GOT_MAX_SIZE): New macro.
4519 (STUB_LW): Generate 64-bit stub regardless of SGI_COMPAT.
4520 (mips_elf_got_entry_hash): Take new fields into account. Use
4521 mips_elf_hash_bfd_vma.
4522 (mips_elf_got_entry_eq): Take new fields into account.
4523 (mips_elf_create_got_section): Initialize new fields.
4524 (mips_elf_calculate_relocation): Pass input_bfd to functions
4525 that now take it. Adjust gp for the input_bfd.
4526 (mips_elf_allocate_dynamic_relocation,
4527 mips_elf_create_dynamic_relocation,
4528 _bfd_mips_elf_create_dynamic_sections): Use...
4529 (mips_elf_rel_dyn_section): New function. Borrow code from...
4530 (_bfd_mips_elf_check_relocs): Pass input_bfd to functions that
4531 now take it. Create the got section if needed, even if
4532 excluded, before recording a global got symbol. Move some
4533 code to...
4534 (mips_elf_record_local_got_symbol): New fn.
4535 (_bfd_mips_elf_size_dynamic_sections): Disable combreloc.
4536 Compute multi-got global entries offsets. Move GOT code to...
4537 (_bfd_mips_elf_always_size_sections): Call mips_elf_multi_got
4538 if the GOT is too big.
4539 (_bfd_mips_elf_finish_dynamic_symbol): Set got entry of
4540 undefweak symbol to zero. Generate dynamic relocations for
4541 non-primary GOT entries for global symbols.
4542 (_bfd_mips_elf_finish_dynamic_sections): Handle multi-got
4543 case. Generate dynamic relocations for local got entries.
4544 Sort dynamic relocations on N64 too, using...
4545 (sort_dynamic_relocs_64): New fns.
4546 (_bfd_mips_elf_hide_symbol): Adjust multi-got counters.
4547 (_bfd_mips_elf_merge_private_bfd_data): Ignore EF_MIPS_XGOT.
4548
4549 2003-01-27 Alexandre Oliva <aoliva@redhat.com>
4550
4551 * bfd.c (struct _bfd): Added id field.
4552 * opncls.c (_bfd_id_counter): New static variable.
4553 (_bfd_new_bfd): Use it.
4554 * bfd-in2.h: Rebuilt.
4555
4556 2003-01-25 Alan Modra <amodra@bigpond.net.au>
4557
4558 * elf32-sparc.c (bfd_elf32_new_section_hook): Define.
4559
4560 2003-01-25 Jakub Jelinek <jakub@redhat.com>
4561
4562 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Add TLS relocs.
4563 (elf32_sparc_rev32_howto): New variable.
4564 (sparc_reloc_map): Add TLS relocs.
4565 (elf32_sparc_reloc_type_lookup, elf32_sparc_info_to_howto):
4566 Handle REV32.
4567 (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc, elf32_sparc_mkobject):
4568 New functions.
4569 (struct elf32_sparc_dyn_relocs, struct elf32_sparc_link_hash_entry,
4570 struct elf32_sparc_link_hash_table):
4571 New structures.
4572 (elf32_sparc_tdata, elf32_sparc_local_got_tls_type,
4573 elf32_sparc_hash_table): Define.
4574 (link_hash_newfunc, elf32_sparc_link_hash_table_create,
4575 create_got_section, elf32_sparc_create_dynamic_sections,
4576 elf32_sparc_copy_indirect_symbol, elf32_sparc_tls_transition): New
4577 functions.
4578 (elf32_sparc_check_relocs): Handle TLS relocs. Add dynamic reloc
4579 reference counting.
4580 (elf32_sparc_gc_sweep_hook): Likewise.
4581 (elf32_sparc_adjust_dynamic_symbol): Likewise.
4582 (elf32_sparc_size_dynamic_sections): Likewise.
4583 (elf32_sparc_relocate_section): Likewise.
4584 (allocate_dynrelocs, readonly_dynrelocs, dtpoff_base, tpoff):
4585 New functions.
4586 (elf32_sparc_object_p): Allocate backend private object data.
4587 (bfd_elf32_bfd_link_hash_table_create,
4588 elf_backend_copy_indirect_symbol, bfd_elf32_mkobject,
4589 elf_backend_can_refcount): Define.
4590 (elf_backend_create_dynamic_sections): Define to
4591 elf32_sparc_create_dynamic_sections.
4592 * reloc.c: Add SPARC TLS relocs.
4593 * bfd-in2.h, libbfd.h: Rebuilt.
4594 * elf64-sparc.c (sparc64_elf_howto_table): Add TLS relocs.
4595 (sparc_reloc_map): Likewise.
4596
4597 2003-01-24 Martin Schwidefsky <schwidefsky@de.ibm.com>
4598
4599 * bfd-in2.h: Regenerate.
4600 * elf32-s390.c (elf_s390_mkobject, elf_s390_tls_transition,
4601 s390_tls_reloc, dtpoff_base, tpoff, invalid_tls_insn): New functions.
4602 (elf_howto_table): Add TLS relocs.
4603 (elf_s390_reloc_type_lookup): Likewise.
4604 (elf_s390_link_hash_entry): Add tls_type.
4605 (elf_s390_hash_entry, elf_s390_obj_tdata, elf_s390_local_got_tls_type):
4606 New macros.
4607 (elf_s390_link_hash_table): Add tls_ldm_got.
4608 (link_hash_newfunc): Initialize tls_type.
4609 (elf_s390_link_hash_table_create): Initialize refcount of tls_ldm_got.
4610 (elf_s390_copy_indirect_symbol): Copy tls_type information.
4611 (elf_s390_check_relocs): Support TLS relocs.
4612 (elf_s390_gc_sweep_hook): Likewise.
4613 (allocate_dynrelocs): Likewise.
4614 (elf_s390_size_dynamic_sections): Likewise.
4615 (elf_s390_relocate_section): Likewise.
4616 (elf_s390_finish_dynamic_symbol): Likewise.
4617 (bfd_elf32_mkobject): Define for TLS.
4618 * elf64-s390.c: Same changes as for elf32-s390.c.
4619 * libbfd.h: Regenerate.
4620 * reloc.c: Add s390 TLS relocations.
4621
4622 2003-01-24 Charles Lepple <clepple@ghz.cc>
4623
4624 * aclocal.m4: Fix name of --enable-install-libbfd switch.
4625
4626 2003-01-23 Nick Clifton <nickc@redhat.com>
4627
4628 * Add sh2e support:
4629 2002-04-02 Elena Zannoni <ezannoni@redhat.com>
4630 * archures.c (bfd_mach_sh2e): Added.
4631 * bfd-in2.h: Rebuilt.
4632 * cpu-sh.c (arch_info_struct): Added SH2e.
4633 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle EF_SH2E.
4634
4635 2003-01-23 Alan Modra <amodra@bigpond.net.au>
4636
4637 * elf-bfd.h (struct bfd_elf_section_data): Remove tdata. Change
4638 dynindx to an int. Rearrange for better packing.
4639 * elf.c (_bfd_elf_new_section_hook): Don't alloc if already done.
4640 * elf32-mips.c (bfd_elf32_new_section_hook): Define.
4641 * elf32-sh64.h: New. Split out from include/elf/sh.h.
4642 (struct _sh64_elf_section_data): New struct.
4643 (sh64_elf_section_data): Don't dereference sh64_info (was tdata).
4644 * elf32-sh64-com.c: Include elf32-sh64.h.
4645 * elf32-sh64.c: Likewise.
4646 (sh64_elf_new_section_hook): New function.
4647 (bfd_elf32_new_section_hook): Define.
4648 (sh64_elf_fake_sections): Adjust for sh64_elf_section_data change.
4649 (sh64_bfd_elf_copy_private_section_data): Likewise.
4650 (sh64_elf_final_write_processing): Likewise.
4651 * elf32-sparc.c (struct elf32_sparc_section_data): New.
4652 (elf32_sparc_new_section_hook): New function.
4653 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
4654 (sec_do_relax): Define.
4655 (elf32_sparc_relax_section): Adjust to use sec_do_relax.
4656 (elf32_sparc_relocate_section): Likewise.
4657 * elf64-mips.c (bfd_elf64_new_section_hook): Define.
4658 * elf64-mmix.c (struct _mmix_elf_section_data): New.
4659 (mmix_elf_section_data): Define. Use throughout file.
4660 (mmix_elf_new_section_hook): New function.
4661 (bfd_elf64_new_section_hook): Define.
4662 * elf64-ppc.c (struct _ppc64_elf_section_data): New.
4663 (ppc64_elf_section_data): Define. Use throughout.
4664 (ppc64_elf_new_section_hook): New function.
4665 (bfd_elf64_new_section_hook): Define.
4666 * elf64-sparc.c (struct sparc64_elf_section_data): New.
4667 (sparc64_elf_new_section_hook): New function.
4668 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
4669 (sec_do_relax): Define.
4670 (sparc64_elf_relax_section): Adjust to use sec_do_relax.
4671 (sparc64_elf_relocate_section): Likewise.
4672 (bfd_elf64_new_section_hook): Define.
4673 * elfn32-mips.c (bfd_elf32_new_section_hook): Define.
4674 * elfxx-mips.c (struct _mips_elf_section_data): New.
4675 (mips_elf_section_data): Define. Use throughout.
4676 (_bfd_mips_elf_new_section_hook): New function.
4677 (mips_elf_create_got_section): Don't alloc used_by_bfd.
4678 * elfxx-mips.h (_bfd_mips_elf_new_section_hook): Declare.
4679 * elfxx-target.h (bfd_elfNN_new_section_hook): Add #ifndef.
4680 * Makefile.am: Run "make dep-am".
4681 * Makefile.in: Regenerate.
4682
4683 2003-01-21 Richard Henderson <rth@redhat.com>
4684
4685 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_PLT_LOC): New.
4686 (struct alpha_elf_link_hash_entry): Add plt_old_section, plt_old_value.
4687 (elf64_alpha_adjust_dynamic_symbol): Set them.
4688 (elf64_alpha_size_plt_section_1): Reset them when plt entry removed.
4689 (elf64_alpha_relax_tls_get_addr): Handle LDM relocs. Frob the
4690 symbol index when relaxing LDM to TPREL.
4691 (elf64_alpha_relax_section): Likewise. Allow relaxation of GD
4692 relocs, even if the target isn't locally defined.
4693 (elf64_alpha_check_relocs): Frob LDM reloc symndx to zero.
4694 (elf64_alpha_relocate_section): Likewise. Force TP-relative
4695 relocs vs symndx 0 to the tp base.
4696
4697 2003-01-21 Fabio Alemagna <falemagn@aros.org>
4698
4699 * config.bfd: Handle i[3456]86-*-aros*.
4700
4701 2003-01-21 Andreas Schwab <schwab@suse.de>
4702
4703 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Define.
4704 (struct ppc_elf_link_hash_entry): Define.
4705 (ppc_elf_hash_entry): New function.
4706 (struct ppc_elf_link_hash_table): Define.
4707 (ppc_elf_hash_table): New function.
4708 (ppc_elf_link_hash_newfunc): New function.
4709 (ppc_elf_link_hash_table_create): New function.
4710 (ppc_elf_copy_indirect_symbol): New function.
4711 (allocate_dynrelocs): New function.
4712 (readonly_dynrelocs): New function.
4713 (ppc_elf_size_dynamic_sections): Allocate space for dynamic
4714 relocs and determine DT_TEXTREL.
4715 (ppc_elf_check_relocs): Don't do that here, just count the
4716 dynamic relocs.
4717 (ppc_elf_gc_sweep_hook): Discard any dynamic relocs against the
4718 removed section.
4719 (bfd_elf32_bfd_link_hash_table_create): Define.
4720 (elf_backend_copy_indirect_symbol): Define.
4721
4722 2003-01-21 Richard Henderson <rth@redhat.com>
4723
4724 * elf64-alpha.c (alpha_dynamic_entries_for_reloc): GOTTPREL and
4725 TPREL also get a reloc if shared. Remove SREL support.
4726 (elf64_alpha_emit_dynrel): New.
4727 (elf64_alpha_relocate_section): Use it. Resolve dynamic TPREL
4728 and GOTTPREL relocs to local symbols against the tp base.
4729 (elf64_alpha_finish_dynamic_symbol): Use elf64_alpha_emit_dynrel.
4730
4731 * elf64-alpha.c (elf64_alpha_relax_got_load): Decrement got
4732 use count before clobbering r_type.
4733 (elf64_alpha_relax_tls_get_addr): Don't use pos[1] if insn
4734 ordering would mean dataflow inspection is necessary.
4735
4736 2003-01-20 Svein E. Seldal <Svein.Seldal@solidas.com>
4737
4738 * coffcode.h (coff_set_flags): Added get/set arch hooks.
4739
4740 2003-01-20 Fabio Alemagna <falemagn@aros.org>
4741
4742 * elf32-sh.c: Treat elfNN_bed like other macros defined in
4743 elfxx-target.h and #undef it before #define'ing it.
4744 * elf32-i386.c: Likewise.
4745 * elf32-sh64.c: Likewise.
4746 * elf64-alpha.c: Likewise.
4747 * elf64-sh64.c: Likewise.
4748
4749 2003-01-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
4750
4751 * bfd-in2.h: Regenerate.
4752 * elf32-s390.c (elf_s390_adjust_gotplt): New prototype.
4753 (elf_howto_table): Rename R_390_GOTOFF to R_390_GOTOFF32. Add
4754 R_390_GOTOFF16, R_390_GOTOFF64, R_390_GOTPLT12, R_390_GOTPLT16,
4755 R_390_GOTPLT32, R_390_GOTPLT64, R_390_GOTPLTENT, R_390_PLTOFF16,
4756 R_390_PLTOFF32 and R_390_PLTOFF64.
4757 (elf_s390_reloc_type_lookup): Likewise.
4758 (struct elf_s390_link_hash_entry): Add gotplt_refcount to keep track
4759 of GOTPLT references to a function.
4760 (link_hash_newfunc): Initialize gotplt_refcount.
4761 (elf_s390_check_relocs): Move allocation of local_got_refcounts array
4762 and creation of the got section out of the main switch. Add support
4763 for the gotoff, gotplt and pltoff relocations.
4764 (elf_s390_gc_sweep_hook): Add reference counting for gotoff, gotplt
4765 and pltoff.
4766 (elf_s390_adjust_gotplt): New function.
4767 (elf_s390_adjust_dynamic_symbol): Adjust gotplt refcount for removed
4768 plt entries.
4769 (allocate_dynrelocs): Add comment.
4770 (elf_s390_relocate_section): Change r_type to unsigned. Add support
4771 for gotoff, gotplt and pltoff relocations.
4772 * elf64-s390.c: Same changes as for elf32-s390.c.
4773 * libbfd.h: Regenerate.
4774 * reloc.c: Add BFD_RELOC_390_GOTOFF64, BFD_RELOC_390_GOTPLT12,
4775 BFD_RELOC_390_GOTPLT16, BFD_RELOC_390_GOTPLT32, BFD_RELOC_390_GOTPLT64,
4776 BFD_RELOC_390_GOTPLTENT, BFD_RELOC_390_PLTOFF16, BFD_RELOC_390_PLTOFF32
4777 and BFD_RELOC_390_PLTOFF64.
4778
4779 2003-01-18 Jakub Jelinek <jakub@redhat.com>
4780
4781 * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle
4782 R_IA64_TPREL64[LM]SB against non-global symbol properly.
4783
4784 2003-01-16 Jakub Jelinek <jakub@redhat.com>
4785
4786 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add
4787 self_dtpmod_done and self_dtpmod_offset.
4788 (allocate_global_data_got): Only use one got entry for all
4789 dtpmod relocs against local symbols.
4790 (allocate_dynrel_entries): Only need .rela.got entry for
4791 dtpmod against global symbol.
4792 (elfNN_ia64_size_dynamic_sections): Initialize self_dtpmod_offset.
4793 Reserve space in .rela.got for the local dtpmod entry.
4794 (set_got_entry): Initialize the common local dtpmod .got entry.
4795 (elfNN_ia64_relocate_section): Handle R_IA_64_DTPREL64LSB
4796 and R_IA_64_DTPREL64MSB.
4797
4798 2003-01-16 Alan Modra <amodra@bigpond.net.au>
4799
4800 * elf64-ppc.c: Include elf/ppc64.h rather than elf/ppc.h.
4801 (R_PPC_*): Rename all occurrences to R_PPC64_*.
4802 (R_PPC64_ADDR30): Rename all occurrences to R_PPC64_REL30.
4803 (enum elf_ppc_reloc_type): Ditto to enum elf_ppc64_reloc_type.
4804 (ppc64_elf_gc_sweep_hook): Handle R_PPC64_REL30 along with other
4805 relative relocs, not with absolute ones.
4806 * Makefile.am: Run "make dep-am".
4807 * Makefile.in: Regenerate.
4808 * po/SRC-POTFILES.in: Regenerate.
4809
4810 2003-01-15 Andreas Schwab <schwab@suse.de>
4811
4812 * elf32-ppc.c (ppc_elf_check_relocs): Don't set DF_TEXTREL for a
4813 relocation against a non-allocated readonly section.
4814
4815 2003-01-10 Alan Modra <amodra@bigpond.net.au>
4816
4817 * elf32-ppc.c (ppc_elf_relocate_section): Adjust addend for GOT16_HA.
4818 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. PLTGOT16_HA too.
4819
4820 2002-01-08 Klee Dienes <kdienes@apple.com>
4821
4822 * Makefile.am (ALL_MACHINES): Use cpu-msp430.lo, not cpu-msp430.c.
4823 (BFD32_BACKENDS): Use elf32-msp430.lo, not elf32-msp430.c.
4824 * Makefile.in: Regenerate.
4825
4826 2003-01-08 Alexandre Oliva <aoliva@redhat.com>
4827
4828 * elfn32-mips.c (prev_reloc_section): New.
4829 (GET_RELOC_ADDEND): Use it. Parenthesize macro arguments.
4830 (SET_RELOC_ADDEND): Parenthesize macro argument.
4831
4832 2003-01-07 John David Anglin <dave.anglin@nrc.gc.ca>
4833
4834 * elf32-hppa.c (final_link_relocate): For all DP relative relocations,
4835 adjust addil instructions if the symbol has no section.
4836
4837 2003-01-07 DJ Delorie <dj@redhat.com>
4838
4839 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make REL_12 not
4840 partial_inplace.
4841
4842 2003-01-07 Andreas Schwab <schwab@suse.de>
4843
4844 * elf32-m68k.c (elf_m68k_check_relocs): Don't set DF_TEXTREL for
4845 PC relative relocations.
4846 (elf_m68k_discard_copies): Set it here instead.
4847
4848 2002-01-02 Ben Elliston <bje@redhat.com>
4849 Jeff Johnston <jjohnstn@redhat.com>
4850
4851 * Makefile.am (ALL_MACHINES): Add cpu-iq2000.lo.
4852 (ALL_MACHINES_CFILES): Add cpu-iq2000.c.
4853 (BFD32_BACKENDS): Add elf32-iq2000.lo.
4854 (BFD32_BACKENDS_CFILES): Add elf32-iq2000.c.
4855 (cpu-iq2000.lo): New target.
4856 * Makefile.in: Regenerate.
4857 * config.bfd: Handle iq2000-*-elf.
4858 * archures.c (bfd_architecture): Add bfd_{arch,mach}_iq2000.
4859 (bfd_archures_list): Add bfd_iq2000_arch.
4860 * configure.in: Handle bfd_elf32_iq2000_vec.
4861 * configure: Regenerate.
4862 * reloc.c: Add BFD_RELOC_IQ2000_OFFSET_16, BFD_RELOC_IQ2000_OFFSET_21,
4863 and BFD_RELOC_IQ2000_UHI16.
4864 * targets.c (bfd_elf32_iq2000_vec): Declare.
4865 (bfd_target_vector): Add bfd_elf32_iq2000_vec.
4866 * elf.c (prep_headers): Set e_machine to EM_IQ2000.
4867 * cpu-iq2000.c: New file.
4868 * elf32-iq2000.c: Likewise.
4869 * libbfd.h: Regenerate.
4870 * bfd-in2.h: Likewise.
4871
4872 2003-01-02 Richard Sandiford <rsandifo@redhat.com>
4873
4874 * elfxx-mips.c: Include libiberty.h.
4875 (elf_mips_isa, _bfd_mips_elf_mach_extends_p): Remove.
4876 (mips_set_isa_flags): New function, split out from...
4877 (_bfd_mips_elf_final_write_processing): ...here. Only call
4878 mips_set_isa_flags if the EF_MIPS_MACH bits are clear.
4879 (mips_mach_extensions): New array.
4880 (mips_32bit_flags_p): New function.
4881 (_bfd_mips_elf_merge_private_bfd_data): Rework architecture checks.
4882 Use mips_32bit_flags_p to check if one binary is 32-bit and the
4883 other is 64-bit. When adopting IBFD's architecture, adopt the
4884 bfd_mach as well as the flags.
4885
4886 2003-01-02 Nick Kelsey <nickk@ubicom.com>
4887
4888 * elf32-ip2k.c: Re-work of linker relaxation code for the ip2k to
4889 fix internal errors, fix bad code generation, fix incorrect stabs
4890 information, and improve ability to eliminate redundant page
4891 instructions. Added code to ip2k_final_link_relocate to self-verify
4892 the linker relaxation. Fix formatting problems.
4893
4894 2002-12-30 Chris Demetriou <cgd@broadcom.com>
4895
4896 * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mipsisa32r2 case.
4897 * archures.c (bfd_mach_mipsisa32r2): New define.
4898 * bfd-in2.h: Regenerate.
4899 * cpu-mips.c (I_mipsisa32r2): New enum value.
4900 (arch_info_struct): Add entry for I_mipsisa32r2.
4901 * elfxx-mips.c (elf_mips_isa, _bfd_elf_mips_mach)
4902 (_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_32R2.
4903 (_bfd_mips_elf_final_write_processing): Add
4904 bfd_mach_mipsisa32r2 case.
4905 (_bfd_mips_elf_merge_private_bfd_data): Handle merging of
4906 binaries marked as using MIPS32 Release 2.
4907
4908 2002-12-30 Dmitry Diky <diwil@mail.ru>
4909
4910 * Makefile.am: Add msp430 target.
4911 * configure.in: Likewise.
4912 * Makefile.in: Regenerate.
4913 * configure: Regenerate.
4914 * archures.c: Add msp430 architecture vector.
4915 * config.bfd: Likewise.
4916 * reloc.c: Add msp430 relocs.
4917 * targets.c: Add msp320 target.
4918 * cpu-msp430.c: New file: msp430 cpu detection.
4919 * elf32-msp430.c: New file: msp430 reloc processing.
4920 * bfd-in2.h: Regenerate.
4921 * libbfd.h: Regenerate.
4922
4923 2002-12-28 Jakub Jelinek <jakub@redhat.com>
4924
4925 * elf.c (elf_sort_sections): Don't reorder .tbss.
4926 (assign_file_positions_for_segments): Only adjust off/voff
4927 for increased alignment in PT_LOAD or PT_NOTE segment,
4928 but adjust p_filesz for .tbss too. in PT_LOAD consider
4929 .tbss to have zero memory size.
4930 (copy_private_bfd_data) [SECTION_SIZE]: Define.
4931 [IS_CONTAINED_BY_VMA, IS_CONTAINED_BY_LMA]: Use it.
4932 [INCLUDE_SECTION_IN_SEGMENT]: Only put SHF_TLS sections
4933 into PT_TLS segment. Never put SHF_TLS sections in
4934 segments other than PT_TLS or PT_LOAD.
4935
4936 * elf64-alpha.c (elf64_alpha_finish_dynamic_sections): Clear .plt
4937 sh_entsize.
4938
4939 2002-12-23 DJ Delorie <dj@redhat.com>
4940
4941 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Fix logic reversal.
4942
4943 2002-12-23 Alan Modra <amodra@bigpond.net.au>
4944
4945 * elflink.h (elf_link_output_extsym): Heed strip_discarded.
4946
4947 2002-12-23 Nick Clifton <nickc@redhat.com>
4948
4949 * archures.c (bfd_arch_get_compatible): Add third parameter
4950 'accept_unknowns'. Only accept unknown format BFDs if
4951 accept_unknowns is true, or if the format is "binary".
4952 * bfd-in2.h: Regenerate.
4953
4954 2002-12-21 Nick Clifton <nickc@redhat.com>
4955
4956 * coff-arm.c (coff_arm_relocate_section): Disable WINCE workaround
4957 that subtracted 8 from pc relative relocations.
4958
4959 2002-12-20 Kazu Hirata <kazu@cs.umass.edu>
4960
4961 * coff-h8300.c: Fix comment typos.
4962 * coffcode.h: Likewise.
4963 * cpu-cris.c: Likewise.
4964 * elf32-vax.c: Likewise.
4965 * genlink.h: Likewise.
4966 * linker.c: Likewise.
4967 * som.c: Likewise.
4968 * tekhex.c: Likewise.
4969 * vms-misc.c: Likewise.
4970
4971 2002-12-20 DJ Delorie <dj@redhat.com>
4972
4973 * reloc.c: Add BFD_RELOC_XSTORMY16_12.
4974 * libbfd.h: Regenerate.
4975 * bfd-in2.h: Regenerate.
4976 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_12.
4977 (xstormy16_reloc_map): Add R_XSTORMY16_12.
4978
4979 2002-12-19 Kazu Hirata <kazu@cs.umass.edu>
4980
4981 * doc/bfdint.texi: Fix typos.
4982
4983 2002-12-20 Paul Eggert <eggert@twinsun.com>
4984
4985 Port to POSIX 1003.1-2001.
4986 * acinclude.m4 (AM_INSTALL_LIBBFD): Do not rely on "test -o".
4987 * configure.in (build-warnings): Likewise.
4988 (Horrible hacks to build DLLs on Windows): Do not rely on "tail -1".
4989 * aclocal.m4: Regenerate.
4990 * config.in: Regenerate.
4991 * configure: Regenerate.
4992
4993 2002-12-19 Alan Modra <amodra@bigpond.net.au>
4994
4995 * coff-h8300.c: Include libiberty.h.
4996 (h8300_reloc16_extra_cases): Check the hash table creator before
4997 referencing h8300 specific fields. Stash the hash table pointer
4998 in a local var. Comment typo fixes.
4999 (h8300_bfd_link_add_symbols): Likewise.
5000
5001 * reloc.c (struct reloc_howto_struct): Revise src_mask and
5002 dst_mask comments.
5003 * bfd-in2.h: Regenerate.
5004
5005 2002-12-18 Alan Modra <amodra@bigpond.net.au>
5006
5007 * elf32-ppc.c (ppc_elf_relocate_section): Reorganize dynamic reloc
5008 code a little. Comment on dynamic relocs against section symbols.
5009
5010 2002-12-17 Roger Sayle <roger@eyesopen.com>
5011
5012 * configure.host (ia64-*-hpux*): Support 64 bit targets using
5013 the HP compiler's "long long".
5014
5015 2002-12-16 Andrew MacLeod <amacleod@redhat.com>
5016
5017 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_LO16
5018 and R_XSTORMY16_HI16) howto entries.
5019 (xstormy16_reloc_map): Map R_XSTORMY16_{LO,HI}16 to BFD_RELOC_{LO,HI}16.
5020 (xstormy16_info_to_howto_rela): Use R_XSTORMY16_GNU_VTINHERIT to
5021 determine the start of the second reloc table.
5022
5023 2002-12-16 Nathan Tallent <eraxxon@alumni.rice.edu>
5024
5025 * ecofflink.c: Fix the reading of the debugging information
5026 of Tru64/Alpha binaries that are produced by recent Compaq
5027 compilers.
5028 (mk_fdrtab): Fix error in creating the FDR (file descriptor)
5029 table.
5030 (lookup_line): Because of the strange information sometimes
5031 generated by Compaq's recent compilers, change how the FDR
5032 table is searched so that PDRs (procedure descriptors) are
5033 correctly found. Note that this change is really more of a hack;
5034 however, I have included extensive documentation as to why
5035 this is the best solution short of an extensive rewrite or
5036 another hack.
5037 (fdrtab_lookup): Add comments to explain the algorithm.
5038
5039 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
5040
5041 * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Reorder
5042 initializers to match struct declaration.
5043
5044 2002-12-12 Alan Modra <amodra@bigpond.net.au>
5045
5046 * dwarf2.c (comp_unit_contains_address): Comment typo fix.
5047 * elf.c (get_program_header_size): Likewise.
5048 * elf32-m32r.c (m32r_elf_lo16_reloc): Likewise.
5049 (m32r_elf_generic_reloc): Likewise.
5050 * elf32-ppc.c (ppc_elf_howto_init): Likewise.
5051 * elflink.h (elf_bfd_discard_info): Likewise.
5052
5053 2002-12-12 Alan Modra <amodra@bigpond.net.au>
5054
5055 * elf32-i386.c (elf_i386_finish_dynamic_sections): Add output_offset
5056 to DT_JMPREL. Use srelplt input section size for DT_PLTRELSZ and
5057 DT_RELSZ adjustment, not output section. Avoid writing tags when
5058 unchanged. Don't assume linker script is sane, adjust DT_REL too.
5059 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Just use raw
5060 size of srelplt for DT_PLTRELSZ. Use srelplt input section size for
5061 DT_RELASZ adjustment, not output section. Avoid writing tags when
5062 unchanged. Adjust DT_RELA.
5063 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Tweaks for better
5064 formatting. Avoid writing tags when unchanged. Adjust DT_RELA.
5065
5066 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
5067
5068 * elfxx-mips.c (mips_elf_calculate_relocation): Don't divide
5069 addend by 4.
5070
5071 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
5072
5073 * elfxx-mips.c (struct mips_got_entry): New.
5074 (struct mips_got_info): Added got_entries field.
5075 (mips_elf_got_entry_hash, mips_elf_got_entry_eq): New functions.
5076 (mips_elf_local_got_index, mips_elf_got_page,
5077 mips_elf_got16_entry): Re-implement in terms of new...
5078 (mips_elf_create_local_got_entry): Rewrite to use got_entries.
5079 Change return type.
5080 (mips_elf_highest): Warning clean-up.
5081 (mips_elf_create_got_section): Initialize got_entries.
5082 (_bfd_mips_elf_check_relocs): Use got_entries to estimate
5083 local got size.
5084 (_bfd_mips_elf_size_dynamic_sections): Do not account for
5085 GOT_PAGE entries, since we now reuse GOT16 entries.
5086
5087 2002-12-10 Jason Thorpe <thorpej@wasabisystems.com>
5088
5089 * aoutx.h (set_section_contents): Allow an otherwise unrepresentable
5090 read-only section that lies after .text and before .data to be
5091 written into the output file and included in a_text.
5092 (translate_to_native_sym_flags): If an otherwise unrepresentable
5093 section was merged with .text, convert its symbols to N_TEXT
5094 symbols.
5095 * libaout.h (aout_section_merge_with_text_p): New macro.
5096
5097 2002-12-08 Alan Modra <amodra@bigpond.net.au>
5098
5099 * bfd-in.h: Comment typo fix. Formatting.
5100 * bfd-in2.h: Regenerate.
5101 * coff64-rs6000.c (xcoff64_openr_next_archived_file): Warning fix.
5102 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): Prototype.
5103 * elf64-mmix.c (mmix_dump_bpo_gregs): Warning fix.
5104
5105 2002-12-05 Richard Henderson <rth@redhat.com>
5106
5107 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21BI.
5108 Only send PCREL21B though the plt. Fix installed reloc type.
5109 (elfNN_ia64_relocate_section): Give error for dynamic reloc
5110 against PCREL22 or PCREL64I; clean up error messages for
5111 branch relocs.
5112
5113 2002-12-04 Kevin Buettner <kevinb@redhat.com>
5114
5115 * elf64-mips.c (elf64_mips_grok_prstatus, elf64_mips_grok_psinfo):
5116 New functions.
5117 (elf_backend_grok_prstatus, elf_backend_grok_psinfo): Define.
5118
5119 2002-12-04 David Mosberger <davidm@hpl.hp.com>
5120
5121 * cpu-ia64-opc.c: Add operand constant "ar.csd".
5122
5123 2002-12-04 H.J. Lu <hjl@gnu.org>
5124
5125 * elfxx-ia64.c (get_local_sym_hash): Use section ID instead of
5126 BFD address when constructing local name.
5127
5128 2002-12-04 Andreas Schwab <schwab@suse.de>
5129
5130 * elf32-m68k.c (struct elf_m68k_link_hash_table): Add sym_sec
5131 member.
5132 (elf_m68k_link_hash_table_create): Initialize it.
5133 (elf_m68k_check_relocs): Handle symbols that are forced to be
5134 local due to visibility changes.
5135 (elf_m68k_adjust_dynamic_symbol): Likewise.
5136 (elf_m68k_size_dynamic_sections): Likewise.
5137 (elf_m68k_discard_copies): Likewise.
5138 (elf_m68k_relocate_section): Likewise.
5139
5140 2002-12-04 Alan Modra <amodra@bigpond.net.au>
5141
5142 * elf64-ppc.c (ppc64_elf_edit_opd): Correct typo.
5143
5144 2002-12-04 Alan Modra <amodra@bigpond.net.au>
5145
5146 * srec.c (srec_write_symbols): Restore '$' prefix to address
5147 accidentally removed in 2002-04-04 change.
5148 (srec_get_symtab): Use 0 instead of `(long) FALSE'.
5149
5150 2002-12-03 Nick Clifton <nickc@redhat.com>
5151
5152 * elf32-ppc.c (apuinfo_list_init): New function.
5153 (apuinfo_list_add): New function: Add a value to the list.
5154 (apuinfo_list_length): New function: Return the number of
5155 values on the list.
5156 (apuinfo_list_element): New function: Return a value on the
5157 list.
5158 (apuinfo_list_finish): New function: Free the resources used
5159 by the list.
5160 (ppc_elf_begin_write_processing): New function. Scan the
5161 input bfds for apuinfo sections.
5162 (ppc_elf_write_section): New function: Delay the creation of
5163 the contents of an apuinfo section in an output bfd.
5164 (ppc_elf_final_write_processing): New function. Create the
5165 contents of an apuinfo section in an output bfd.
5166 (elf_backend_begin_write_processing): Define.
5167 (elf_backend_final_write_processing): Define.
5168 (elf_backend_write_section): Define.
5169
5170 2002-12-03 Richard Henderson <rth@redhat.com>
5171
5172 * cpu-ia64-opc.c (elf64_ia64_operands): Add ldxmov entry.
5173
5174 2002-12-01 Stephane Carrez <stcarrez@nerim.fr>
5175
5176 Fix PR savannah/1417:
5177 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Don't adjust
5178 branch if it goes to the start of the deleted region.
5179
5180 2002-12-01 Stephane Carrez <stcarrez@nerim.fr>
5181
5182 * bfd-in2.h (bfd_mach_m6812): Rebuild.
5183 * archures.c (bfd_mach_m6812_default, bfd_mach_m6812,
5184 bfd_mach_m6812s): Declare.
5185
5186 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): New function.
5187 (_bfd_m68hc12_elf_set_private_flags): Call it.
5188 (_bfd_m68hc12_elf_print_private_bfd_data): Report processor version.
5189 (_bfd_m68hc12_elf_merge_private_bfd_data): Merge the flags and
5190 report microcontroller incompatibilities (HC12 vs HCS12).
5191 (elf_backend_object_p): Update.
5192
5193 2002-11-30 Alan Modra <amodra@bigpond.net.au>
5194
5195 * bfd-in.h (TRUE_FALSE_ALREADY_DEFINED, BFD_TRUE_FALSE): Delete.
5196 (enum bfd_boolean, boolean): Delete.
5197 (bfd_boolean): Typedef to an int.
5198 (FALSE, TRUE): Define.
5199 * aix386-core.c, aix5ppc-core.c, aout-adobe.c, aout-arm.c, aout-cris.c,
5200 aout-encap.c, aout-ns32k.c, aout-target.h, aout-tic30.c, aoutf1.h,
5201 aoutx.h, archive.c, archive64.c, archures.c, bfd-in.h, bfd.c, bfdwin.c,
5202 binary.c, bout.c, cache.c, cisco-core.c, coff-a29k.c, coff-alpha.c,
5203 coff-apollo.c, coff-arm.c, coff-aux.c, coff-h8300.c, coff-h8500.c,
5204 coff-i386.c, coff-i860.c, coff-i960.c, coff-ia64.c, coff-m68k.c,
5205 coff-m88k.c, coff-mcore.c, coff-mips.c, coff-or32.c, coff-ppc.c,
5206 coff-rs6000.c, coff-sh.c, coff-sparc.c, coff-stgo32.c, coff-tic30.c,
5207 coff-tic4x.c, coff-tic54x.c, coff-tic80.c, coff-w65.c, coff-we32k.c,
5208 coff-z8k.c, coff64-rs6000.c, coffcode.h, coffgen.c, cofflink.c,
5209 corefile.c, cpu-a29k.c, cpu-alpha.c, cpu-arc.c, cpu-arm.c, cpu-avr.c,
5210 cpu-cris.c, cpu-d10v.c, cpu-d30v.c, cpu-dlx.c, cpu-fr30.c, cpu-frv.c,
5211 cpu-h8300.c, cpu-h8500.c, cpu-hppa.c, cpu-i370.c, cpu-i386.c,
5212 cpu-i860.c, cpu-i960.c, cpu-ia64.c, cpu-ip2k.c, cpu-m10200.c,
5213 cpu-m10300.c, cpu-m32r.c, cpu-m68hc11.c, cpu-m68hc12.c, cpu-m68k.c,
5214 cpu-m88k.c, cpu-mcore.c, cpu-mips.c, cpu-mmix.c, cpu-ns32k.c,
5215 cpu-openrisc.c, cpu-or32.c, cpu-pdp11.c, cpu-pj.c, cpu-powerpc.c,
5216 cpu-rs6000.c, cpu-s390.c, cpu-sh.c, cpu-sparc.c, cpu-tic30.c,
5217 cpu-tic4x.c, cpu-tic54x.c, cpu-tic80.c, cpu-v850.c, cpu-vax.c,
5218 cpu-w65.c, cpu-we32k.c, cpu-xstormy16.c, cpu-z8k.c, dwarf1.c,
5219 dwarf2.c, ecoff.c, ecofflink.c, efi-app-ia32.c, efi-app-ia64.c,
5220 elf-bfd.h, elf-eh-frame.c, elf-hppa.h, elf-m10200.c, elf-m10300.c,
5221 elf-strtab.c, elf.c, elf32-arc.c, elf32-arm.h, elf32-avr.c,
5222 elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c, elf32-fr30.c,
5223 elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c, elf32-hppa.h,
5224 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
5225 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
5226 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
5227 elf32-pj.c, elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-sh64-com.c,
5228 elf32-sh64.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
5229 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
5230 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-ppc.h, elf64-s390.c,
5231 elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c,
5232 elfarm-oabi.c, elfcode.h, elfcore.h, elflink.c, elflink.h,
5233 elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c, elfxx-mips.h,
5234 elfxx-target.h, format.c, freebsd.h, genlink.h, hash.c, hp300hpux.c,
5235 hppabsd-core.c, hpux-core.c, i386aout.c, i386linux.c, i386lynx.c,
5236 i386mach3.c, i386msdos.c, i386os9k.c, ieee.c, ihex.c, irix-core.c,
5237 libaout.h, libbfd-in.h, libbfd.c, libcoff-in.h, libecoff.h, libieee.h,
5238 libnlm.h, liboasys.h, libpei.h, libxcoff.h, linker.c, lynx-core.c,
5239 m68klinux.c, m68klynx.c, mach-o.c, mach-o.h, merge.c, mipsbsd.c,
5240 mmo.c, netbsd-core.c, netbsd.h, nlm.c, nlm32-alpha.c, nlm32-i386.c,
5241 nlm32-ppc.c, nlm32-sparc.c, nlmcode.h, oasys.c, opncls.c, osf-core.c,
5242 pc532-mach.c, pdp11.c, pe-arm.c, pe-i386.c, pe-mcore.c, pe-mips.c,
5243 pe-sh.c, peXXigen.c, pef.c, pei-arm.c, pei-i386.c, pei-mcore.c,
5244 pei-mips.c, pei-sh.c, peicode.h, ppcboot.c, ptrace-core.c, reloc.c,
5245 reloc16.c, riscix.c, rs6000-core.c, sco5-core.c, section.c, simple.c,
5246 som.c, som.h, sparclinux.c, sparclynx.c, srec.c, stabs.c, sunos.c,
5247 syms.c, targets.c, tekhex.c, ticoff.h, trad-core.c, versados.c,
5248 vms-gsd.c, vms-hdr.c, vms-misc.c, vms-tir.c, vms.c, vms.h,
5249 xcoff-target.h, xcofflink.c, xsym.c, xsym.h: Replace boolean with
5250 bfd_boolean, true with TRUE, false with FALSE. Simplify comparisons
5251 of bfd_boolean vars with TRUE/FALSE. Formatting.
5252 * bfd-in2.h, libbfd.h, libcoff.h: Regenerate
5253
5254 2002-11-28 Alan Modra <amodra@bigpond.net.au>
5255
5256 * elf-bfd.h: Replace occurrences of Elf32_Internal_* and
5257 Elf64_Internal_* with Elf_Internal_*. Replace Elf_Internal_Rel
5258 with Elf_Internal_Rela.
5259 * elf-hppa.h, elf-m10200.c, elf-m10300.c, elf32-arc.c, elf32-arm.h,
5260 elf32-avr.c, elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c,
5261 elf32-fr30.c, elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c,
5262 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
5263 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
5264 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
5265 elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-v850.c, elf32-vax.c,
5266 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
5267 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
5268 elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c, elfarm-oabi.c,
5269 elfcode.h, elflink.h, elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c: Ditto.
5270 * elf-hppa.h (elf_hppa_internal_shdr): Delete. Use Elf_Internal_Shdr
5271 throughout instead.
5272 * elf.c (_bfd_elf_no_info_to_howto_rel): Delete.
5273 * elfcode.h (elf_swap_reloca_in): Pass source operand as a bfd_byte *.
5274 Remove INLINE keyword.
5275 (elf_swap_reloc_in): Likewise. Also clear r_addend.
5276 (elf_swap_reloc_out, elf_swap_reloca_out): Pass destination operand
5277 as a bfd_byte *.
5278 (elf_write_relocs): Consolidate REL and RELA code.
5279 (elf_slurp_reloc_table_from_section): Simplify REL code.
5280 (NAME(_bfd_elf,size_info)): Populate reloc swap entries.
5281 * elf-bfd.h (MAX_INT_RELS_PER_EXT_REL): Define.
5282 * elflink.h (elf_link_read_relocs_from_section): Consolidate REL and
5283 RELA code.
5284 (elf_link_adjust_relocs): Likewise. Don't malloc space for temp
5285 reloc array, use a fixed size of MAX_INT_RELS_PER_EXT_REL.
5286 (elf_link_output_relocs): Likewise.
5287 (elf_reloc_link_order): Likewise.
5288 (elf_finish_pointer_linker_section): Likewise.
5289 (struct elf_link_sort_rela): Remove union.
5290 (elf_link_sort_cmp1): Update to suit.
5291 (elf_link_sort_cmp2): Here too.
5292 (elf_link_sort_relocs): Consolidate REL and RELA code. Fix memory
5293 over-allocation for int_rels_per_ext_rel != 1 case.
5294 * elf32-arm.h: Update all bfd_elf32_swap_reloc_out calls.
5295 * elf32-i386.c: Likewise.
5296 * elf32-cris.c: Likewise for bfd_elf32_swap_reloca_out.
5297 * elf32-hppa.c, elf32-i370.c, elf32-m68k.c, elf32-ppc.c, elf32-s390.c,
5298 elf32-sh.c, elf32-vax.c, elfxx-mips.c: Likewise.
5299 * elf64-alpha.c: Likewise for bfd_elf64_swap_reloca_out.
5300 * elf64-hppa.c, elf64-mips.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
5301 elf64-sparc.c, elf64-x86-64.c: Likewise.
5302 * elfxx-ia64.c: Likewise for bfd_elfNN_swap_reloca_out.
5303 * elfxx-mips.c (sort_dynamic_relocs): Likewise for
5304 bfd_elf32_swap_reloc_in.
5305
5306 * elf32-arm.h: Update elf32_arm_info_to_howto calls.
5307 * elf32-mips.c: Likewise for mips_info_to_howto_rel.
5308 (mips_elf64_swap_reloc_in): Zero r_addend.
5309 (mips_elf64_be_swap_reloc_in): Likewise.
5310 (mips_elf64_slurp_one_reloc_table): Simplify.
5311
5312 * elf64-alpha.c (alpha_elf_size_info): Populate reloc swap entries.
5313 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
5314 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
5315
5316 2002-11-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5317
5318 * elf32-sh.c (sh_elf_relocate_section): Don't complain about
5319 unresolved debugging relocs in dynamic applications.
5320 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
5321
5322 2002-11-26 Alan Modra <amodra@bigpond.net.au>
5323
5324 * elf-eh-frame.c (ENSURE_NO_RELOCS): Disregard R_*_NONE relocs.
5325 (_bfd_elf_discard_section_eh_frame): Don't discard duplicate CIEs
5326 on a relocatable link. Comment typos.
5327 * elf.c (_bfd_elf_link_hash_newfunc): Assign elements of structure
5328 in the order they are declared. Clear elf_hash_value too.
5329 (_bfd_elf_link_hash_table_init): Likewise assign in order. Clear
5330 eh_info and tls_segment.
5331 * elflink.h (elf_link_input_bfd <emit_relocs>): Keep reloc offsets
5332 sorted when discarding relocs by turning them into R_*_NONE.
5333
5334 * libbfd.c (warn_deprecated): Comment spelling.
5335 * po/SRC-POTFILES.in: Regenerate.
5336
5337 2002-11-21 Richard Henderson <rth@redhat.com>
5338
5339 * elflink.h (elf_link_add_object_symbols): Don't overwrite the
5340 arch's st_other bits when merging visibilities.
5341 (elf_link_output_extsym): Tidy clearing of visibility field.
5342
5343 2002-11-21 Alan Modra <amodra@bigpond.net.au>
5344
5345 * coff-mcore.c (SWAP_IN_RELOC_OFFSET): Define.
5346 (SWAP_OUT_RELOC_OFFSET): Define.
5347
5348 2002-11-20 Alexandre Oliva <aoliva@redhat.com>
5349
5350 * elf.c (_bfd_elf_link_hash_table_init): Make sure
5351 can_refcount is properly extended to the type of
5352 init_refcount.
5353
5354 2002-11-19 Alexandre Oliva <aoliva@redhat.com>
5355
5356 * elfxx-mips.c (MIPS_RELOC_RELA_P): New macro.
5357 (_bfd_mips_elf_relocate_section): Use it.
5358
5359 * elfxx-mips.c (MNAME): New macro.
5360 (_bfd_mips_elf_check_relocs): Use it.
5361 (_bfd_mips_elf_discard_info): Likewise.
5362 (_bfd_mips_elf_final_link): Likewise.
5363
5364 2002-11-19 Alan Modra <amodra@bigpond.net.au>
5365
5366 * elf64-ppc.c (ppc64_elf_edit_opd): When deleting relocs, adjust
5367 rel_hdr.sh_size too.
5368
5369 2002-11-18 Klee Dienes <kdienes@apple.com>
5370
5371 * Makefile.am (BFD32_LIBS): Add bfdwin.lo, bfdio.lo.
5372 (BFD32_LIBS_CFILES): Add bfdwin.c, bfdio.c.
5373 (BFD_H_FILES): Add bfdwin.c, bfdio.c.
5374 (LIBBFD_H_FILES): Add bfdwin.c, bfdio.c.
5375 Add dependencies for bfdwin.c, bfdio.c.
5376 * bfd.c: Remove bfd_get_mtime, bfd_get_size.
5377 * libbfd.c: Remove real_read, bfd_bread, _bfd_window_internal,
5378 bfd_init_window, bfd_free_window, bfd_get_file_window, bfd_bwrite,
5379 bfd_tell, bfd_flush, bfd_stat, bfd_seek.
5380 * bfdio.c: New file. Contains real_read, bfd_bread, bfd_write,
5381 bfd_tell, bfd_flush, bfd_stat, bfd_seek, bfd_ge_mtime,
5382 bfd_get_size (moved from libbfd.c and bfd.c).
5383 * bfdwin.c New file. Contains _bfd_window_internal,
5384 bfd_init_window, bfd_free_window, bfd_get_file_window (moved from
5385 libbfd.c and bfd.c).
5386 * po/SRC-POTFILES.in: Regenerate.
5387 * po/bfd.pot: Regenerate.
5388 * libbfd.h: Regenerate.
5389 * bfd-in2.h: Regenerate.
5390 * aclocal.m4: Regenerate.
5391 * Makefile.in: Regenerate.
5392 * configure: Regenerate.
5393
5394 2002-11-18 Klee Dienes <kdienes@apple.com>
5395
5396 * bfd.c (bfd_preserve_save): Don't zero BFD_IN_MEMORY.
5397
5398 2002-11-15 Kazu Hirata <kazu@cs.umass.edu>
5399
5400 * coff-h8300.c (h8300_reloc16_estimate): Do not optimize away
5401 jsr after a short jump.
5402 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
5403
5404 2002-11-15 Klee Dienes <kdienes@apple.com>
5405
5406 * pef.c (bfd_pef_convert_architecture): Move declaration of
5407 ARCH_POWERPC and ARCH_M68K to the start of the function.
5408
5409 2002-11-14 Svein E. Seldal <Svein.Seldal@solidas.com>
5410
5411 * coff-tic4x.c (tic4x_howto_table): Formatting fixup
5412
5413 2002-11-14 Hans-Peter Nilsson <hp@bitrange.com>
5414
5415 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs):
5416 For bpo_gregs_section->contents, allocate _raw_size, not
5417 _cooked_size.
5418
5419 2002-11-13 Klee Dienes <kdienes@apple.com>
5420
5421 * config.bfd: Add entries for powerpc-*-darwin and cousins.
5422
5423 2002-11-13 H.J. Lu <hjl@gnu.org>
5424
5425 * elfcode.h (elf_object_p): Don't restore abfd->arch_info.
5426
5427 2002-11-13 Klee Dienes <kdienes@apple.com>
5428 Alan Modra <amodra@bigpond.net.au>
5429
5430 * bfd.c (struct bfd_preserve): New.
5431 (bfd_preserve_save): New function.
5432 (bfd_preserve_restore): Ditto.
5433 (bfd_preserve_finish): Ditto.
5434 * bfd-in2.h: Regenerate.
5435 * mach-o.c: Formatting.
5436 (bfd_mach_o_scan_read_symtab_symbol): Make "value" unsigned.
5437 (bfd_mach_o_object_p): Use bfd_preserve_save/restore/finish.
5438 (bfd_mach_o_core_p): Ditto.
5439 (bfd_mach_o_scan): Pass in mdata.
5440 * mach-o.h (bfd_mach_o_scan): Update prototype.
5441 * pef.c: Formatting.
5442 (bfd_pef_object_p): Use bfd_preserve_save/restore/finish.
5443 (bfd_pef_xlib_object_p): Ditto.
5444 (bfd_pef_scan): Pass in mdata. Move version check to bfd_pef_object_p.
5445 * pef.h (bfd_pef_scan): Update prototype.
5446 * xsym.c: Formatting, K&R fixes.
5447 (bfd_sym_object_p): Use bfd_preserve_save/restore/finish.
5448 (bfd_sym_scan): New function split out from bfd_sym_object_p.
5449 * xsym.h (bfd_sym_scan): Declare.
5450 * elfcode.h (elf_object_p): Use bfd_preserve_save/restore/finish.
5451 * elfcore.h (elf_core_file_p): Likewise.
5452 * targets.c (_bfd_target_vector): Revert 2002-11-08 change.
5453
5454 2002-11-12 Nick Clifton <nickc@redhat.com>
5455
5456 * po/da.po: Updated Danish translation.
5457
5458 2002-11-12 Alan Modra <amodra@bigpond.net.au>
5459
5460 * elflink.h (elf_link_add_object_symbols): Optimize stabs for
5461 relocatable link too.
5462 (elf_link_input_bfd): When emitting relocs, adjust offsets for
5463 eh_frame and stab sections. Zap deleted relocs.
5464 (elf_reloc_symbol_deleted_p): Return true for zero r_symndx.
5465 (elf_bfd_discard_info): Run for relocatable link too.
5466 * elf64-ppc.c (ppc64_elf_edit_opd): Rename from edit_opd. Make global.
5467 Handle ld -r case.
5468 (ppc64_elf_size_dynamic_sections): Don't call edit_opd from here.
5469 * elf64-ppc.h (ppc64_elf_edit_opd): Declare.
5470
5471 * elf-bfd.h (struct cie_header): Move from elf_eh-frame.c.
5472 (struct cie, struct eh_cie_fde, struct eh_frame_sec_info): Likewise.
5473 (struct eh_frame_array_ent, struct eh_frame_hdr_info): Likewise.
5474 (enum elf_link_info_type): Remove ELF_INFO_TYPE_EH_FRAME_HDR.
5475 (struct eh_frame_hdr_info): Add "hdr_sec", remove "split".
5476 (struct elf_link_hash_table): Add eh_info.
5477 (struct elf_obj_tdata): Change eh_frame_hdr to an asection *.
5478 (_bfd_elf_discard_section_eh_frame): Update prototype.
5479 (_bfd_elf_discard_section_eh_frame_hdr): Likewise.
5480 (_bfd_elf_write_section_eh_frame): Likewise.
5481 (_bfd_elf_write_section_eh_frame_hdr): Likewise.
5482 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Remove "ehdrsec"
5483 param. Get "hdr_info" from link hash table.
5484 (_bfd_elf_discard_section_eh_frame_hdr): Remove "sec" param. Get
5485 header section from link hash table. Save header section to elf_tdata.
5486 (_bfd_elf_maybe_strip_eh_frame_hdr): Remove local "sec". Use
5487 header section from link hash table. Don't alloc hdr_info. Clear
5488 hdr_sec instead of setting "strip".
5489 (_bfd_elf_eh_frame_section_offset): Formatting.
5490 (_bfd_elf_write_section_eh_frame): Remove "ehdrsec", add "info" param.
5491 Get header section from link hash table.
5492 (_bfd_elf_write_section_eh_frame_hdr): Remove "sec", add "info" param.
5493 Get header section from link hash table.
5494 * elf.c (map_sections_to_segments): Use cached eh_frame_hdr.
5495 (get_program_header_size): Likewise.
5496 (_bfd_elf_section_offset): Formatting.
5497 * elflink.h (elf_link_create_dynamic_sections): Stash eh frame header
5498 section pointer in link hash table.
5499 (elf_bfd_final_link): Adjust _bfd_elf_write_section_eh_frame_hdr
5500 and _bfd_elf_write_section_eh_frame calls. Update comment about
5501 eh_frame entries.
5502 (elf_bfd_discard_info): Adjust _bfd_elf_discard_section_eh_frame and
5503 _bfd_elf_discard_section_eh_frame_hdr calls. Remove "ehdr".
5504
5505 * po/SRC-POTFILES.in: Regenerate.
5506
5507 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't zero
5508 relocs for discarded FDEs. Remove dead code.
5509 (_bfd_elf_write_section_eh_frame_hdr): Remove dead code.
5510 * elflink.h (elf_bfd_discard_info): Don't save edited relocs.
5511 Tidy conditions under which stabs are edited. Formatting.
5512 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
5513 from discarded relocs.
5514 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Add reloc output
5515 section adjustments after testing magic values.
5516
5517 2002-11-12 Thomas Moestl <tmm@FreeBSD.org>
5518
5519 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Correct
5520 references to large plt symbols.
5521
5522 2002-11-12 Klee Dienes <kdienes@apple.com>
5523
5524 * mach-o.c (bfd_mach_o_scan_read_thread): Don't re-use 'i' when
5525 looking for an unused section name.
5526
5527 2002-11-11 Kazu Hirata <kazu@cs.umass.edu>
5528
5529 * coff-h8300.c: Fix formatting.
5530 * elf32-h8300.c: Likewise.
5531 * reloc16.c: Likewise.
5532
5533 2002-11-09 Jeroen Dobbelaere <jeroen.dobbelaere@acunia.com>
5534
5535 * elf32-arm.h (elf32_arm_size_dynamic_sections): Don't strip output
5536 section when dynamic section unused; _bfd_strip_section_from_output
5537 instead.
5538
5539 2002-11-08 Alan Modra <amodra@bigpond.net.au>
5540
5541 * targets.c (_bfd_target_vector): Disable pef_vec, pef_xlib_vec
5542 and sym_vec.
5543
5544 * dwarf2.c: Revert last change.
5545
5546 2002-11-07 Michal Ludvig <mludvig@suse.cz>
5547
5548 * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
5549 _bfd_dwarf2_find_nearest_line): Use
5550 bfd_simple_get_relocated_section_contents() instead of
5551 bfd_get_section_contents().
5552 * reloc.c (bfd_perform_relocation): Add sanity check.
5553 * simple.c (simple_get_relocated_section_contents): If the section
5554 does not have any relocs associated with it, just return the
5555 unadjusted contents.
5556
5557 2002-11-07 Hans-Peter Nilsson <hp@axis.com>
5558
5559 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOT,
5560 case R_CRIS_32_GOT>: Correct test for filling in constant .got
5561 contents, enabling for a non-DSO, for symbols defined in the
5562 program with --export-dynamic.
5563
5564 2002-11-07 Alan Modra <amodra@bigpond.net.au>
5565
5566 * elf64-ppc.c: Comment typo fixes.
5567 (ppc64_elf_merge_private_bfd_data): Allow BFD_ENDIAN_UNKNOWN input.
5568
5569 2002-11-07 Nick Clifton <nickc@redhat.com>
5570
5571 * po/da.po: Updated Danish translation.
5572
5573 2002-11-06 Alexandre Oliva <aoliva@redhat.com>
5574
5575 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Generate
5576 exactly three internal relocs per external reloc. Set reloc_count
5577 to the external reloc count.
5578
5579 2002-11-06 Klee Dienes <kdienes@apple.com>
5580
5581 * coff-stgo32.c (stub_bytes): Mark as const.
5582 Fix comment formatting.
5583
5584 2002-11-06 Klee Dienes <kdienes@apple.com>
5585
5586 * Makefile.am (BFD32_BACKENDS): Add mach-o.lo, pef.lo, and
5587 xsym.lo.
5588 (BFD32_BACKENDS_CFILES): Add mach-o.c, pef.c, and xsym.c.
5589 (SOURCE_HFILES): Add mach-o.h, pef.h, pef-traceback.h, xsym.h
5590 * archures.c (enum bfd_architecture): Add bfd_arch_m98k.
5591 * bfd.c (struct bfd): Add private data for mach-o, pef, and sym.
5592 * targets.c (enum bfd_flavour): Add flavours for mach-o, pef, and
5593 sym.
5594 (_bfd_target_vector): Add target vectors for mach-o, pef, and sym.
5595 * Makefile.in: Regenerate.
5596 * doc/Makefile.in: Regenerate.
5597 * bfd-in2.h: Regenerate.
5598 * xsym.c: New file. Contains support for the Apple/Metrowerks
5599 xSYM debugging format.
5600 * xsym.h: New file.
5601 * pef.c: New file. Contains support for the Apple Code Fragment
5602 Manager Preferred Executable Format
5603 * pef.h: New file.
5604 * pef-traceback.h: New file. Contains support for parsing PowerPC
5605 traceback tables as used by PEF executables (and perhaps other
5606 systems as well).
5607 * mach-o.c: New file. Contains support for the Mach-O object file
5608 format.
5609 * mach-o.h: New file.
5610 * mach-o-target.c: New file. Declares the mach-o targets
5611 themselves. Included three times by mach-o.c; each time with a
5612 different set of macros set.
5613
5614 2002-11-06 Graeme Peterson <gp@qnx.com>
5615
5616 * Makefile.am: Remove entries for elf32-qnx.[ch].
5617 * Makefile.in: Regenerate.
5618 * config.bfd: Change arm-nto to use bfd_elf32_{big|little}arm_vec,
5619 ppc-nto to use bfd_elf32_powerpc{le}_vec, sh-nto to use
5620 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
5621 * configure.in: Remove support for bfd_elf32_sh{l}qnx_vec,
5622 bfd_elf32_powerpc{le}qnx_vec, bfd_elf32_{big|little}armqnx_vec,
5623 and bfd_elf32_i386qnx_vec, and removed elf32-qnx.lo from other targets.
5624 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
5625 * configure: Regenerate.
5626 * elf32-qnx.c: Remove.
5627 * elf32-qnx.h: Remove.
5628 * elf.c: Remove calls to QNX specific set_nonloadable_filepos,
5629 is_contained_by_filepos, and copy_private_bfd_data_p.
5630 * elf-bfd.h (struct elf_backend_data): Remove set_nonloadable_filepos,
5631 is_contained_by_filepos, and copy_private_bfd_data_p.
5632 * elf32-i386.c: Remove QNX extended bfd support.
5633 * elf32-ppc.c: Remove QNX extended bfd support.
5634 * elf32-sh.c: Remove QNX extended bfd support.
5635 * elfarm-nabi.c: Remove QNX extended bfd support.
5636 * targets.c: Remove qnx vectors.
5637 * elfxx-target.h (elf_backend_set_nonloadable_filepos): Remove
5638 (elf_backend_is_contained_by_filepos): Remove.
5639 (elf_backend_copy_private_bfd_data_p): Remove.
5640 * po/SRC-POTFILES.in: Regenerate.
5641
5642 2002-11-06 David O'Brien <obrien@FreeBSD.org>
5643 Alan Modra <amodra@bigpond.net.au>
5644
5645 * elf64-sparc.c (sparc64_elf_relocate_section): Adjust addend of
5646 dynamic relocs against section symbols for the output section vma.
5647
5648 2002-11-05 Alan Modra <amodra@bigpond.net.au>
5649
5650 * elf32-arm.h (t2a1_push_insn, t2a2_ldr_insn, t2a3_mov_insn,
5651 t2a4_bx_insn, t2a5_pop_insn, t2a6_bx_insn): Remove.
5652
5653 2002-11-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5654 Alan Modra <amodra@bigpond.net.au>
5655
5656 * config.bfd (sh-*-linux*): Use bfd_elf*_sh64*lin_vec as sh64
5657 vectors in target_selvecs.
5658 (shle-*-netbsdelf*): Use bfd_elf*_sh64*nbsd_vec as sh64 vectors
5659 in target_selvecs.
5660 (sh-*-netbsdelf*): Likewise.
5661 * configure.in (assocvecs): New variable. Handle assocvecs like
5662 selvecs.
5663 * configure: Regenerate.
5664 * format.c (bfd_check_format_matches): Store bfd_target pointers
5665 in matching_vector instead of target names. Select first target
5666 from bfd_associated_vector that matches a list of ambiguous targets.
5667 * targets.c (_bfd_associated_vector): New array.
5668 (bfd_associated_vector): New variable.
5669 (_bfd_target_vector): Add bfd_elf*_sh64*lin_vec.
5670 * libbfd-in.h (bfd_associated_vector): Declare.
5671 * libbfd.h: Regenerate.
5672
5673 2002-11-05 Elias Athanasopoulos <eathan@otenet.gr>
5674
5675 * vms-gsd.c (_bfd_vms_write_gsd): Check that symbol->udata.p is
5676 non-NULL before dereferencing.
5677
5678 2002-11-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5679
5680 * vms.c (vms_object_p): Restore the start address when returning
5681 NULL.
5682
5683 2002-11-04 Alan Modra <amodra@bigpond.net.au>
5684 Hans-Peter Nilsson <hp@axis.com>
5685
5686 * elflink.h (struct elf_final_link_info): Add shndxbuf_size.
5687 (elf_bfd_final_link): Don't bother zeroing symtab_hdr fields.
5688 Set up a larger symshndxbuf, and write it out. Free it on
5689 exit rather than freeing symbuf twice. Correct section index
5690 on output section symbol loop.
5691 (elf_link_output_sym): Accumulate symbol extension section
5692 indices, reallocating symshndxbuf rather than writing it out.
5693 (elf_link_flush_output_syms): Don't flush symshndxbuf.
5694 * elf.c (assign_section_numbers): Init i_shdrp to all zero.
5695 Use bfd_zalloc to clear i_shdrp[0] too.
5696
5697 2002-11-03 Stephen Clarke <stephen.clarke@earthling.net>
5698
5699 * elf32-sh64-com.c (sh64_address_in_cranges): Use
5700 _raw_size of cranges section if _cooked_size not yet set.
5701
5702 2002-11-03 Hans-Peter Nilsson <hp@axis.com>
5703
5704 * elf32-v850.c (v850_elf_relax_delete_bytes): Correct parameters
5705 for bfd_elf32_swap_symbol_out.
5706
5707 2002-10-31 David O'Brien <obrien@FreeBSD.org>
5708
5709 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't mix
5710 signed and unsigned in comparison.
5711
5712 2002-10-30 Daniel Jacobowitz <drow@mvista.com>
5713
5714 * coffcode.h: Remove extraneous '\'.
5715
5716 2002-10-28 H.J. Lu <hjl@gnu.org>
5717
5718 * Makefile.am (targets.lo): Depend on Makefile instead of
5719 config.status.
5720 (archures.lo): Likewise.
5721 * Makefile.in: Regenerated.
5722
5723 2002-10-25 Jason Thorpe <thorpej@wasabisystems.com>
5724
5725 * config.bfd (mips*el-*-netbsd*, mips*-*-netbsd*): Add
5726 bfd_elf64_bigmips_vec and bfd_elf64_littlemips_vec to
5727 targ_selvecs.
5728
5729 2002-10-25 Jim Wilson <wilson@redhat.com>
5730
5731 * elf64-sh64.c (sh_elf64_relocate_section): Call
5732 _bfd_elf_rela_local_sym. Handle relocs against STT_SECTION symbol
5733 of SHF_MERGE section.
5734
5735 2002-10-25 Hans-Peter Nilsson <hp@axis.com>
5736
5737 * simple.c: Correct placement of ATTRIBUTE_UNUSED.
5738
5739 2002-10-24 John David Anglin <dave@hiauly1.hia.nrc.ca>
5740
5741 * aoutx.h (NAME(aout,swap_ext_reloc_in)): Cast bytes->r_index to
5742 unsigned int. Cast RELOC_BASE10, RELOC_BASE13 and RELOC_BASE22 to
5743 unsigned int.
5744 (NAME(aout,final_link)): Cast enum used in assignment.
5745 (aout_link_write_symbols): Cast enums in comparisons, int values to
5746 boolean, enums in assignments to int.
5747 (aout_link_input_section_std): Cast rel->r_index to unsigned int.
5748 (aout_link_input_section_ext): Likewise. Cast enums used in
5749 comparisons with unsigned ints.
5750 (aout_link_reloc_link_order): Cast enum to int in assignment.
5751 * archive.c (_bfd_generic_read_ar_hdr_mag): Cast result of memchr
5752 calls to char *.
5753 * bfd-in.h (bfd_set_section_vma): Cast enum true to unsigned int in
5754 assignment.
5755 * bfd-in2.h (bfd_set_section_vma): Likewise.
5756 * bfd.c (bfd_record_phdr): Cast enums in assignments.
5757 * binary.c (bfd_alloc): Cast enum to long.
5758 * coffgen.c (_bfd_coff_is_local_label_name): Cast return to boolean.
5759 * dwarf2.c (read_abbrevs): Add casts to enum types.
5760 (read_attribute_value): Likewise.
5761 (arange_add): Cast result of bfd_zalloc call.
5762 (comp_unit_contains_address): Return true and false.
5763 (comp_unit_find_nearest_line): Cast return to boolean.
5764 * format.c (bfd_check_format_matches, bfd_set_format): Likewise.
5765 * gen-aout.c: define macro '_' if not defined.
5766 * libbfd.c (bfd_realloc): Cast malloc and realloc to PTR.
5767 (bfd_bwrite): Cast bfd_realloc to bfd_byte *.
5768 (bfd_write_bigendian_4byte_int): Cast return to boolean.
5769 (bfd_seek): Cast bfd_realloc to bfd_byte *.
5770 (bfd_generic_is_local_label_name): Cast return to boolean.
5771 * libcoff.h (_bfd_coff_adjust_symndx): Remove extraneous '\'.
5772 * linker.c (_bfd_link_hash_newfunc): Cast bfd_hash_allocate result to
5773 struct bfd_hash_entry *.
5774 (_bfd_generic_link_hash_newfunc): likewise.
5775 (_bfd_generic_final_link): Cast enum to unsigned int.
5776 * merge.c (sec_merge_emit): Cast return to boolean.
5777 (merge_strings): Add casts to const unsigned char *.
5778 * reloc.c (bfd_get_reloc_code_name): Cast enums in comparison to int.
5779 (bfd_generic_get_relocated_section_content): Cast enum to unsigned int.
5780 * section.c (bfd_section_hash_newfunc): Cast bfd_hash_allocate result
5781 to struct bfd_hash_entry *.
5782 (bfd_set_section_content): Add cast to PTR in comparison.
5783 * simple.c (simple_dummy_warning, simple_dummy_undefined_symbol,
5784 simple_dummy_reloc_overflow, simple_dummy_reloc_dangerous,
5785 simple_dummy_unattached_reloc,
5786 bfd_simple_get_relocated_section_contents): Add K&R declarations and
5787 function definitions.
5788 * srec.c (S3Forced): Initialize to false.
5789 (srec_get_symtab): Cast return value from bfd_alloc to asymbol *.
5790 * stabs.c (_bfd_link_section_stabs): Cast enum to int in comparisons.
5791 (_bfd_discard_section_stabs): Likewise. Also cast return to boolean.
5792 * syms.c (bfd_is_undefined_symclass): Cast return to boolean.
5793 (_bfd_stab_section_find_nearest_line): Cast enum to bfd_byte in
5794 comparisons.
5795
5796 2002-10-23 Jakub Jelinek <jakub@redhat.com>
5797
5798 * elf64-alpha.c (elf64_alpha_check_relocs): Only put maybe_dynamic
5799 relocs into shared lib non-allocated reloc sections.
5800
5801 2002-10-23 Nathan Tallent <eraxxon@alumni.rice.edu>
5802
5803 * dwarf2.c (add_line_info): Ensure that the line_info_table is
5804 sorted even when given an out-of-order line sequence.
5805 (lookup_address_in_line_info_table): When an exact VMA match is
5806 not found, return line information with the closest VMA.
5807
5808 2002-10-23 Ross Alexander <ross.alexander@uk.neceur.com>
5809
5810 * elf64-hppa.c: Force DT_FLAGS to always be set. Required by
5811 HPUX 11.00 patch PHSS_26559.
5812
5813 2002-10-22 Alexandre Oliva <aoliva@redhat.com>
5814
5815 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Don't move
5816 the options section into a separate section unless IRIX 6
5817 compatibility is enabled.
5818
5819 2002-10-22 Alexandre Oliva <aoliva@redhat.com>
5820
5821 * elflink.h (struct elf_link_sort_rela): Turn rel and rela
5822 into arrays.
5823 (elf_link_sort_cmp1, elf_link_sort_cmp2): Adjust.
5824 (elf_link_sort_relocs): Likewise. Take int_rels_per_ext_rel
5825 into account.
5826 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Compose
5827 R_MIPS_REL32 with R_MIPS64 if ABI_64_P.
5828
5829 2002-10-21 Graeme Peterson <gp@qnx.com>
5830
5831 * targets.c (_bfd_target_vector): Add missing qnx vectors.
5832
5833 2002-10-21 Alan Modra <amodra@bigpond.net.au>
5834
5835 * targets.c (bfd_target_list): Don't return the default target twice.
5836
5837 2002-10-21 Elias Athanasopoulos <eathan@otenet.gr>
5838
5839 * archive.c (_bfd_archive_bsd_update_armap_timestamp): Replace
5840 perror with bfd_perror.
5841
5842 2002-10-19 H.J. Lu <hjl@gnu.org>
5843
5844 * elflink.h (elf_link_add_object_symbols): Correctly handle
5845 DT_RPATH and DT_RUNPATH.
5846
5847 2002-10-19 Mark Kettenis <kettenis@gnu.org>
5848
5849 * elf.c (elfcore_grok_note): Fix recognition on NT_PRXFPREG notes.
5850
5851 2002-10-17 Denis Chertykov <denisc@overta.ru>
5852
5853 * elf32-ip2k.c (ELF_MACHINE_ALT1): Define alternate machine code
5854 for ip2k port.
5855
5856 2002-10-17 Alan Modra <amodra@bigpond.net.au>
5857
5858 * elfxx-target.h (USE_REL): Don't define as 1.
5859 * elf32-arm.h (USE_REL): Provide a default define of 0.
5860 Use #if rather than #ifdef when testing USE_REL.
5861 * elf32-m32r.c: Likewise.
5862
5863 * elf32-arc.c (USE_REL): Define as 1.
5864 * elf32-d10v.c (USE_REL): Likewise.
5865 * elf32-m32r.c (USE_REL): Likewise.
5866 * elf32-m68hc11.c (USE_REL): Likewise.
5867 * elf32-m68hc12.c (USE_REL): Likewise.
5868 * elf32-or32.c (USE_REL): Likewise.
5869 * elfarm-nabi.c (USE_REL): Likewise.
5870
5871 2002-10-16 Jakub Jelinek <jakub@redhat.com>
5872
5873 * config.bfd (s390-*-linux*): Add targ64_selvecs.
5874 (s390x-*-linux*): Add targ_selvecs.
5875
5876 2002-10-16 Alan Modra <amodra@bigpond.net.au>
5877
5878 * Makefile.am (BFD32_BACKENDS): Remove elfarmqnx-nabi.lo,
5879 elf32-i386-fbsd.lo, elf32-i386qnx.lo, elf32-ppcqnx.lo,
5880 elf32-sh-lin.lo, elf32-sh64-lin.lo, elf32-sh-nbsd.lo,
5881 elf32-sh64-nbsd.lo, elf32-shqnx.lo. Add elf32-qnx.lo.
5882 (BFD32_BACKENDS_CFILES): Likewise for corresponding C files.
5883 (BFD64_BACKENDS): Remove elf64-sh64-lin.lo, elf64-sh64-nbsd.lo.
5884 (BFD64_BACKENDS_CFILES): Likewise for corresponding C files.
5885 (SOURCE_HFILES): Add elf32-qnx.h.
5886 (BUILD_HFILES): Add bfdver.h.
5887 Run "make dep-am".
5888 * Makefile.in: Regenerate.
5889 * configure.in Update bfd vector dependencies.
5890 * configure: Regenerate.
5891 * elf32-i386-fbsd.c: Delete. Move code to elf32-i386.c.
5892 * elf32-i386qnx.c: Likewise.
5893 * elf32-ppcqnx.c: Delete. Move code to elf32-ppc.c.
5894 * elf32-sh-nbsd.c: Delete. Move code to elf32-sh.c.
5895 * elf32-sh-lin.c: Likewise.
5896 * elf32-shqnx.c: Likewise.
5897 * elf32-sh64-lin.c: Delete. Move code to elf32-sh64.c.
5898 * elf32-sh64-nbsd.c: Likewise.
5899 * elf64-sh64-lin.c: Delete. Move code to elf64-sh64.c.
5900 * elf64-sh64-nbsd.c: Likewise.
5901 * elfarmqnx-nabi.c: Delete. Move code to elfarm-nabi.c.
5902 * elf32-arm.h (ELF_MAXPAGESIZE): Always define.
5903 * elf32-i386.c: Remove ELF_ARCH and ELF32_I386_C_INCLUDED tests.
5904 * elf32-ppc.c: Remove ELF32_PPC_C_INCLUDED tests.
5905 * elf32-qnx.h (elf_backend_set_nonloadable_filepos): Always define.
5906 (elf_backend_is_contained_by_filepos): Likewise.
5907 (elf_backend_copy_private_bfd_data_p): Likewise.
5908 Globalize and move functions to..
5909 * elf32-qnx.c: ..here. New file.
5910 * elf32-sh.c: Remove ELF_ARCH and ELF32_SH_C_INCLUDED tests. Don't
5911 emit target vectors when INCLUDE_SHMEDIA.
5912 * elf32-sh64.c: Remove ELF_ARCH test. Move TARGET_* etc. defines to
5913 end of file.
5914 * elf64-sh64.c: Remove ELF_ARCH test.
5915 * elfarm-nabi.c: Remove ELFARM_NABI_C_INCLUDED test.
5916 * po/BLD-POTFILES.in: Regenerate.
5917 * po/SRC-POTFILES.in: Regenerate.
5918
5919 2002-10-16 Alan Modra <amodra@bigpond.net.au>
5920
5921 * elflink.h (elf_link_add_object_symbols): Error out on dynamic objects
5922 loaded with --just-symbols.
5923
5924 * elf32-i386qnx.c (TARGET_LITTLE_NAME): Define.
5925 * elf32-ppcqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
5926 * elf32-shqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
5927 * elfarmqnx-nabi.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
5928
5929 2002-10-15 Richard Henderson <rth@redhat.com>
5930
5931 * Makefile.am (BFD64_BACKENDS): Remove elf64-alpha-fbsd.
5932 (BFD64_BACKENDS_CFILES): Likewise.
5933 * configure.in (bfd_elf64_alpha_freebsd_vec): Use elf64-alpha.
5934 * elf64-alpha-fbsd.c: Remove file, move code ...
5935 * elf64-alpha.c: ... here.
5936 * Makefile.in, configure: Rebuild.
5937
5938 2002-10-14 Richard Henderson <rth@redhat.com>
5939
5940 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: Increment
5941 VALUE, not ADDEND.
5942
5943 2002-10-14 Stephen Clarke <stephen.clarke@superh.com>
5944
5945 * elf32-sh.c (elf_sh_link_hash_entry): Replace
5946 datalabel_got_offset with union of datalabel_got
5947 offset and refcount.
5948 (sh_elf_link_hash_newfunc): Initialize datalabel_got.refcount.
5949 (allocate_dynrelocs): Delete unnecessary code for
5950 STT_DATALABEL type. Create entry in got for
5951 datalabel version of symbol if datalabel_got.refcount > 0.
5952 (sh_elf_relocate_section): Use datalabel_got union.
5953 (sh_elf_gc_sweep_hook): Pull common code to initialize
5954 h and eh out of switch statement. Declare seen_stt_datalabel.
5955 Initialize it. Decrement datalabel_got.refcount for
5956 got relocs when seen_stt_datalabel is true.
5957 Decrement local_got_refcounts entry for datalabel got relocs
5958 of local symbols.
5959 (sh_elf_copy_indirect_symbol): Copy datalabel_got field over.
5960 (sh_elf_check_relocs): Declare seen_stt_datalabel.
5961 Initialize it. When seen_stt_datalabel is true, increment
5962 datalabel_got refcount rather than got.refcount.
5963 (sh_elf_finish_dynamic_symbol): Create relocs to
5964 initialize got entry for datalabel version of symbol.
5965
5966 2002-10-14 Alan Modra <amodra@bigpond.net.au>
5967
5968 * Makefile.am: Run "make dep-am".
5969 (BFD_H_FILES): Remove version.h.
5970 * bfd-in.h (BFD_VERSION, BFD_VERSION_DATE, BFD_VERSION_STRING): Move..
5971 * version.h: ..to here.
5972 * configure.in (bfd_version_date): Remove.
5973 (AC_OUTPUT): Make bfdver.h from version.h.
5974 * bfd.c: #include "bfdver.h".
5975 * vms-hdr.c: Likewise.
5976 * Makefile.in: Regenerate.
5977 * bfd-in2.h: Regenerate.
5978 * configure: Regenerate.
5979 * po/SRC-POTFILES.in: Regenerate.
5980
5981 2002-10-14 Alan Modra <amodra@bigpond.net.au>
5982
5983 * archures.c (bfd_mach_i386_i386, bfd_mach_i386_i8086,
5984 bfd_mach_i386_i386_intel_syntax, bfd_mach_x86_64,
5985 bfd_mach_x86_64_intel_syntax bfd_mach_ppc, bfd_mach_ppc64,
5986 bfd_mach_rs6k, bfd_mach_d10v, bfd_mach_sh, bfd_mach_v850,
5987 bfd_mach_arc_5, bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8,
5988 bfd_mach_m32r, bfd_mach_frv, bfd_mach_frvsimple,
5989 bfd_mach_ia64_elf64, bfd_mach_ia64_elf32,
5990 bfd_mach_ip2022, bfd_mach_ip2022ext,
5991 bfd_mach_s390_31, bfd_mach_s390_64, bfd_mach_xstormy16): Renumber.
5992 * bfd-in2.h: Regenerate.
5993
5994 2002-10-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5995
5996 * config.bfd (sh*eb-*-linux*, sh*-*-linux*): Add the alternative
5997 endian vector to targ_selvecs.
5998
5999 2002-10-13 Alexandre Oliva <aoliva@redhat.com>
6000
6001 * elfxx-mips.c (mips_elf_calculate_relocation): Take
6002 save_addend argument. Don't apply the 32-bit mask to a
6003 GPREL32 value if it's to be used in another relocation. Don't
6004 use forced-check computation of local_p to decide whether to
6005 add gp0 to GPREL16 value. Don't use only the lowest 16 bits
6006 of the addend of a non-in-place GPREL16 relocation.
6007 (_bfd_mips_elf_relocate_section): Pass use_saved_addend_p to
6008 mips_elf_calculate_relocation().
6009
6010 2002-10-12 Stephane Carrez <stcarrez@nerim.fr>
6011
6012 * elf32-m68hc11.c (m68hc11_elf_relax_section): Don't treat relocs
6013 with symbols in other sections if we relaxed something; the sections
6014 output offsets must be re-computed before.
6015
6016 2002-10-12 Stephane Carrez <stcarrez@nerim.fr>
6017
6018 * elf32-m68hc11.c (m68hc11_elf_relax_section): Update symbols
6019 handling to use Elf_Internal_Sym.
6020 (m68hc11_elf_relax_delete_bytes): Likewise.
6021
6022 2002-10-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6023
6024 * elf32-sh.c (sh_elf_optimized_tls_reloc, sh_elf_mkobject,
6025 sh_elf_object_p, dtpoff_base): New functions.
6026 (sh_elf_howto_table): Add TLS relocs.
6027 (sh_reloc_map): Likewise.
6028 (sh_elf_info_to_howto): Support TLS relocs.
6029 (elf_sh_link_hash_entry): Add tls_type and tls_tpoff32.
6030 (sh_elf_hash_entry, sh_elf_tdata, sh_elf_local_got_tls_type):
6031 New macros.
6032 (sh_elf_obj_tdata): New.
6033 (elf_sh_link_hash_table): Add tls_ldm_got.
6034 (sh_elf_link_hash_table_create): Clear refcount of tls_ldm_got.
6035 (allocate_dynrelocs): Support TLS relocs.
6036 (sh_elf_size_dynamic_sections): Likewise.
6037 (sh_elf_relocate_section): Support TLS relocs. Don't try to find
6038 .rela.got section when found already. Return false after printing
6039 error about unresolvable relocation.
6040 (sh_elf_gc_sweep_hook): Support TLS relocs.
6041 (sh_elf_check_relocs): Likewise.
6042 (sh_elf_finish_dynamic_symbol): Likewise.
6043 (bfd_elf32_mkobject, elf_backend_object_p): Define for TLS case.
6044 * reloc.c: Add SH TLS relocs.
6045 * bfd-in2.h, libbfd.h: Regenerate.
6046
6047 2002-10-11 Daniel Jacobowitz <drow@mvista.com>
6048
6049 * Makefile.in: Regenerated.
6050
6051 2002-10-11 Daniel Jacobowitz <drow@mvista.com>
6052
6053 * Makefile.am: Run dep-am.
6054 (BFD_H_DEP): Add simple.c and linker.c.
6055 (BFD32_LIBS): Add simple.lo.
6056 (BFD32_LIBS_CFILES): Add simple.c.
6057 * Makefile.in: Regenerated.
6058 * bfd-in2.h: Regenerated.
6059 * simple.c: New file.
6060
6061 2002-10-11 Alan Modra <amodra@bigpond.net.au>
6062
6063 * coff-arm.c (record_arm_to_thumb_glue): Avoid type-punned pointers.
6064 (record_thumb_to_arm_glue): Likewise.
6065 * ecoff.c (ecoff_link_add_externals): Likewise.
6066 * elf32-arm.h (record_arm_to_thumb_glue): Likewise.
6067 (record_thumb_to_arm_glue): Likewise.
6068 * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
6069 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
6070 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
6071 * elf64-alpha.c (elf64_alpha_create_dynamic_sections): Likewise.
6072 * elf64-ppc.c (func_desc_adjust): Likewise.
6073 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
6074 (sh64_elf64_create_dynamic_sections): Likewise.
6075 * elflink.c (_bfd_elf_create_got_section): Likewise.
6076 (_bfd_elf_create_dynamic_sections): Likewise.
6077 (_bfd_elf_create_linker_section): Likewise.
6078 * elflink.h (elf_add_default_symbol): Likewise.
6079 (elf_link_create_dynamic_sections): Likewise.
6080 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
6081 * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Likewise.
6082 * elfxx-mips.c (mips_elf_create_got_section): Likewise.
6083 (_bfd_mips_elf_add_symbol_hook): Likewise.
6084 (_bfd_mips_elf_create_dynamic_sections): Likewise.
6085 * linker.c (generic_link_add_symbol_list): Likewise.
6086 * xcofflink.c (xcoff_link_add_symbols): Likewise.
6087
6088 * elfxx-ia64.c (oor_brl, oor_ip): Conditionally define.
6089
6090 * elf64-ppc.c (edit_opd): Only zero opd syms when function is
6091 completely removed. Correct local sym adjustment.
6092
6093 2002-10-10 Stephen Clarke <stephen.clarke@superh.com>
6094
6095 * elf32-sh.c (elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
6096 Correct mistake in calculation of address of .got.
6097 * elf64-sh64.c (elf_sh64_pic_plt_entry_be,
6098 elf_sh64_pic_plt_entry_le): Likewise.
6099
6100 2002-10-09 Richard Shann <richard.shann@superh.com>
6101 Stephen Clarke <stephen.clarke@superh.com>
6102
6103 * Makefile.am: Add entries for elf32-sh64-lin.c and
6104 elf64-sh64-lin.c. Regenerate.
6105 * Makefile.in: Regenerate.
6106 * config.bfd: Change sh64eb-*-linux* and sh64-*-linux*
6107 to use sh64 vectors rather than sh vectors.
6108 * configure.in: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
6109 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
6110 * configure: Regenerate.
6111 * elf32-sh64-lin.c: New file.
6112 * elf64-sh64-lin.c: New file.
6113 * targets.c: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
6114 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
6115
6116 2002-10-08 H.J. Lu <hjl@gnu.org>
6117
6118 * elf32-i386.c (elf_i386_relocate_section): Re-arrange the
6119 IE->LE transition for R_386_TLS_IE.
6120
6121 2002-10-08 Alan Modra <amodra@bigpond.net.au>
6122
6123 * elf64-ppc.c (edit_opd): Correct test for discarded sections.
6124
6125 2002-10-07 Mark Elbrecht <snowball3@softhome.net>
6126
6127 * cofflink.c (mark_relocs): Don't mark relocations in excluded
6128 sections.
6129
6130 2002-10-07 Alan Modra <amodra@bigpond.net.au>
6131
6132 * elflink.h (elf_link_input_bfd): Remove BFD_VERSION_DATE dependent
6133 code.
6134
6135 * elf64-ppc.c (ppc64_elf_build_stubs): Increment .glink indx.
6136
6137 2002-10-06 Alan Modra <amodra@bigpond.net.au>
6138
6139 * opncls.c: Formatting.
6140 (_bfd_new_bfd): Use a smaller section hash table.
6141
6142 2002-10-05 Alexandre Oliva <aoliva@redhat.com>
6143
6144 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Set the type
6145 of the other two relocations packed with a REL32 to NONE.
6146
6147 2002-10-02 Stephen Clarke <stephen.clarke@superh.com>
6148
6149 * elf32-sh.c (elf_sh_link_hash_entry): Add gotplt_refcount.
6150 (sh_elf_link_hash_newfunc): Initialize it.
6151 (allocate_dynrelocs): Transfer gotplt refs from plt.refcount
6152 to got.refcount for symbols that are forced local or when
6153 we have direct got refs.
6154 (sh_elf_gc_sweep_hook): Adjust gotplt_refcount. Use it
6155 to correctly adjust got.refcount and plt.refcount.
6156 (sh_elf_copy_indirect_symbol): Copy gotplt_refcount across.
6157 (sh_elf_check_relocs): Increment gotplt_refcount.
6158
6159 2002-10-01 Jakub Jelinek <jakub@redhat.com>
6160
6161 * elf32-i386.c (elf_i386_relocate_section): Fix
6162 movl foo@indntpoff, %eax IE->LE transition.
6163
6164 2002-10-01 Jakub Jelinek <jakub@redhat.com>
6165
6166 * elf64-x86-64.c (elf64_x86_64_relocate_section): Change TLSGD
6167 sequence and its transitions.
6168
6169 2002-10-01 Jakub Jelinek <jakub@redhat.com>
6170
6171 * elf32-i386.c (elf_i386_relocate_section): Resolve R_386_TLS_LDO_32
6172 to st_value + addend in non-code sections.
6173 * elf64-x86-64.c (elf64_x86_64_relocate_section): Resolve
6174 R_X86_64_DTPOFF32 to st_value + addend in non-code sections.
6175
6176 2002-09-30 Gavin Romig-Koch <gavin@redhat.com>
6177 Ken Raeburn <raeburn@cygnus.com>
6178 Aldy Hernandez <aldyh@redhat.com>
6179 Eric Christopher <echristo@redhat.com>
6180 Richard Sandiford <rsandifo@redhat.com>
6181
6182 * archures.c (bfd_mach_mips4120, bfd_mach_mips5400): New.
6183 (bfd_mach_mips5500): New.
6184 * cpu-mips.c (I_mips4120, I_mips5400, I_mips5500): New.
6185 (arch_info_struct): Add corresponding entries here.
6186 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_4120,
6187 E_MIPS_MACH_5400 and E_MIPS_MACH_5500.
6188 (_bfd_mips_elf_final_write_processing): Handle bfd_mach_mips4120,
6189 bfd_mach_mips5400 and bfd_mach_mips5500.
6190 (_bfd_mips_elf_mach_extends_p): New function.
6191 (_bfd_mips_elf_merge_private_bfd_data): Use it to help merge
6192 the EF_MIPS_MACH flags.
6193 * bfd-in2.h: Regenerate.
6194
6195 2002-09-28 Jason Thorpe <thorpej@wasabisystems.com>
6196
6197 * elf32-vax.c (elf_vax_size_dynamic_section): Don't strip
6198 .got sections.
6199
6200 2002-09-28 Alan Modra <amodra@bigpond.net.au>
6201
6202 * elf.c (map_sections_to_segments): Correct test for start of
6203 writable section in the same page as end of read-only section.
6204
6205 2002-09-27 Matt Thomas <matt@3am-software.com>
6206
6207 * elf32-vax.c (elf_vax_check_relocs): Remove unused
6208 local_got_refcounts usage. Remove allocation of got slot.
6209 (elf_vax_gc_sweep_hook): Remove unused local_got_refcounts usage.
6210 Remove de-allocation of got slot.
6211 (elf_vax_size_dynamic_section): Fix some indentation. Add hash
6212 traversal for elf_vax_instantiate_got_entries. Allow empty .got
6213 sections to be GC'ed.
6214 (elf_vax_instantiate_got_entries): New function.
6215 (elf_vax_relocate_section): Simplify R_VAX_GOT32 handling. Remove
6216 tests that are now handled by elf_vax_instantiate_got_entries.
6217 Assert GOT entry falls within .got section size. Remove redundant
6218 comparisions. Fix comments.
6219
6220 2002-09-27 Jakub Jelinek <jakub@redhat.com>
6221
6222 * reloc.c: Add x86-64 TLS relocs.
6223 * bfd-in2.h, libbfd.h: Rebuilt.
6224 * elf64-x86-64.c (x86_64_elf_howto): Fix size fields for 32-bit
6225 relocs. Add TLS relocs.
6226 (x86_64_reloc_map): Add TLS relocs.
6227 (elf64_x86_64_info_to_howto): Adjust for added TLS relocs.
6228 (struct elf64_x86_64_link_hash_entry): Add tls_type field.
6229 (GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD, GOT_TLS_IE): Define.
6230 (elf64_x86_64_hash_entry): Define.
6231 (struct elf64_x86_64_obj_tdata): New.
6232 (elf64_x86_64_tdata, elf64_x86_64_local_got_tls_type): Define.
6233 (struct elf64_x86_64_link_hash_table): Add tls_ld_got.
6234 (link_hash_newfunc): Initialize tls_type.
6235 (elf64_x86_64_link_hash_table_create): Initialize tls_ld_got.
6236 (elf64_x86_64_copy_indirect_symbol): Swap tls_type if necessary.
6237 (elf64_x86_64_mkobject): New.
6238 (elf64_x86_64_elf_object_p): Allocate struct elf64_x86_64_obj_tdata.
6239 (elf64_x86_64_tls_transition): New.
6240 (elf64_x86_64_check_relocs): Add r_type variable and use it.
6241 Handle TLS relocs.
6242 (elf64_x86_64_gc_sweep_hook): Handle TLS relocs.
6243 (allocate_dynrelocs): Allocate GOT space for TLS relocs.
6244 (elf64_x86_64_size_dynamic_sections): Likewise.
6245 (dtpoff_base, tpoff): New.
6246 (elf64_x86_64_relocate_section): Handle TLS relocs.
6247 (elf64_x86_64_finish_dynamic_symbol): Only handle non-TLS GOT
6248 entries.
6249 (bfd_elf64_mkobject): Define.
6250
6251 * elf32-i386.c (elf_i386_check_relocs) [R_386_TLS_LE]: Set
6252 DF_STATIC_TLS if shared.
6253
6254 2002-09-26 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6255
6256 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Don't emit unneeded
6257 empty relocation sections.
6258
6259 2002-09-26 Alan Modra <amodra@bigpond.net.au>
6260
6261 * elf64-ppc.c (ppc_build_one_stub): Don't build glink stubs here.
6262 (ppc64_elf_build_stubs): Build them here instead.
6263
6264 2002-09-24 Jakub Jelinek <jakub@redhat.com>
6265
6266 * elf32-sparc.c (elf32_sparc_relocate_section): Put R_SPARC_RELATIVE
6267 addend into r_addend, not *r_offset.
6268 (elf32_sparc_finish_dynamic_symbol): Likewise.
6269 * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Clear xword at
6270 R_SPARC_RELATIVE's r_offset.
6271
6272 2002-09-23 Nathan Tallent <eraxxon@alumni.rice.edu>
6273
6274 * dwarf2.c (decode_line_info): Update to correctly decode
6275 the (non-standard DWARF2) out-of-order address sequences
6276 generated by the Intel C++ 6.0 compiler for ia64-Linux.
6277
6278 2002-09-23 Mark Elbrecht <snowball3@softhome.net>
6279
6280 * config.bfd: For DJGPP targets, match with any cpu and any machine.
6281
6282 2002-09-23 Alan Modra <amodra@bigpond.net.au>
6283
6284 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Zero relocs
6285 for discarded FDEs. Remove redundant assignment.
6286 * elflink.h (elf_bfd_discard_info): Save edited relocs.
6287
6288 2002-09-22 H.J. Lu <hjl@gnu.org>
6289
6290 * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Don't merge
6291 the relocation count between different .reloc sections.
6292
6293 2002-09-21 Alan Modra <amodra@bigpond.net.au>
6294
6295 * elf32-ppc.c (ppc_elf_relocate_section): Allow ".sbss.*" and
6296 ".sdata.*" for R_PPC_SDAREL16, ".sbss2*" and ".sdata2*" for
6297 R_PPC_EMB_SDA2REL. Similarly for R_PPC_EMB_SDA21 and
6298 R_PPC_EMB_RELSDA.
6299
6300 * elfcode.h (elf_slurp_reloc_table_from_section): Make "symcount"
6301 unsigned. Move "symcount" assignment out of loop.
6302 * Makefile.am: Run "make dep-am".
6303 * Makefile.in: Regenerate.
6304 * configure: Regenerate.
6305 * po/SRC-POTFILES.in: Regnerate.
6306
6307 2002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
6308
6309 * dwarf2.c (_bfd_dwarf2_find_nearest_line): If address length is
6310 zero, set it to 8 for (non-standard) 64-bit DWARF2 formats
6311 (e.g. IRIX64).
6312
6313 2002-09-19 Jakub Jelinek <jakub@redhat.com>
6314
6315 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Clear .got word
6316 even if generating R_PPC_RELATIVE reloc.
6317 (ppc_elf_relocate_section): Make sure relocation is performed
6318 if skip == -2. Clear memory at r_offset when creating dynamic
6319 relocation.
6320
6321 2002-09-19 Jakub Jelinek <jakub@redhat.com>
6322
6323 * reloc.c (BFD_RELOC_386_TLS_TPOFF, BFD_RELOC_386_TLS_IE,
6324 BFD_RELOC_386_TLS_GOTIE): Add.
6325 * bfd-in2.h, libbfd.h: Rebuilt.
6326 * elf32-i386.c (elf_howto_table): Add R_386_TLS_TPOFF, R_386_TLS_IE
6327 and R_386_TLS_GOTIE.
6328 (elf_i386_reloc_type_lookup): Handle it.
6329 (struct elf_i386_link_hash_entry): Change tls_type type to unsigned
6330 char instead of enum, change GOT_* into defines.
6331 (GOT_TLS_IE_POS, GOT_TLS_IE_NEG, GOT_TLS_IE_BOTH): Define.
6332 (elf_i386_tls_transition): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
6333 (elf_i386_check_relocs): Likewise. Avoid crash if local symbol is
6334 accessed both as normal and TLS symbol. Move R_386_TLS_LDM and
6335 R_386_PLT32 cases so that R_386_TLS_IE can fall through.
6336 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
6337 (elf_i386_gc_sweep_hook): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
6338 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
6339 (allocate_dynrelocs): Allocate 2 .got and 2 .rel.got entries if
6340 tls_type is GOT_TLS_IE_BOTH.
6341 (elf_i386_size_dynamic_sections): Likewise.
6342 (elf_i386_relocate_section): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
6343 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
6344 (elf_i386_finish_dynamic_symbol): Use tls_type & GOT_TLS_IE to catch
6345 all 4 GOT_TLS_* TLS types.
6346
6347 2002-09-19 Nick Clifton <nickc@redhat.com>
6348
6349 * elflink.h (elf_fix_symbol_flags): When examining weak symbols,
6350 follow indirect links.
6351
6352 2002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
6353
6354 * ecoffswap.h (ecoff_swap_pdr_in) <isym, iline>: Update to
6355 correctly sign-extend 32-bit ECOFF null values (0xffffffff, -1)
6356 on 64 bit machines.
6357 (ecoff_swap_sym_in) <iss>: Likewise.
6358 * ecoff.c (_bfd_ecoff_slurp_symbolic_info): Fix error reading
6359 ECOFF information: 'ioptMax' refers to the actual *size*
6360 of the optimization symtab, not the number of entries.
6361
6362 2002-09-19 Daniel Jacobowitz <drow@mvista.com>
6363
6364 * elf32-arm.h (elf32_arm_adjust_dynamic_symbol): Update
6365 ELF_LINK_HASH_NEEDS_PLT logic.
6366
6367 2002-09-18 Daniel Jacobowitz <drow@mvista.com>
6368
6369 * elfcode.h (elf_slurp_reloc_table_from_section): Check
6370 correct relocation count.
6371
6372 2002-09-17 Daniel Jacobowitz <drow@mvista.com>
6373
6374 * bfd-in.h (bfd_get_dynamic_symcount): Define.
6375 * bfd.c (struct _bfd): Add dynsymcount.
6376 * bfd-in2.h: Regenerated.
6377 * elf.c (_bfd_elf_canonicalize_dynamic_symtab): Set
6378 abfd->dynsymcount.
6379 * elfcode.h (elf_slurp_reloc_table_from_section): Check
6380 for overflow.
6381
6382 2002-09-17 Stan Cox <scox@redhat.com>
6383
6384 * elf64-mips.c (mips_elf64_be_swap_reloca_out): Handle type2 and type3.
6385 (mips_elf64_final_gp): Don't make up gp value.
6386 * elfn32-mips.c (mips_elf_final_gp): Likewise.
6387 * elfxx-mips.c (_bfd_mips_elf_final_link): Always create
6388 .MIPS.options/.options section.
6389
6390 2002-09-17 David O'Brien <obrien@FreeBSD.org>
6391
6392 * elf32-i386-fbsd.c: Always label using the EI_OSABI method.
6393 It is benign for FreeBSD < 4.1. Minor reformatting.
6394 * elf64-alpha-fbsd.c: Likewise.
6395
6396 2002-09-17 Jakub Jelinek <jakub@redhat.com>
6397
6398 * elf32-i386.c (elf_i386_relocate_section) [R_386_TLS_TPOFF32]: Negate
6399 addend.
6400
6401 2002-09-17 Alan Modra <amodra@bigpond.net.au>
6402
6403 * elf64-alpha.c (alpha_elf_size_info): Make static.
6404
6405 2002-09-17 Svein E. Seldal <Svein.Seldal@solidas.com>
6406
6407 * coff-tic4x.c: Add function declarations and ATTRIBUTE_UNUSED.
6408 * cpu-tic4x.c: Ditto.
6409
6410 2002-09-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6411
6412 * elf64-mips.c (define elf_backend_ignore_discarded_relocs): Remove
6413 duplicate define.
6414
6415 2002-09-16 Bruno Haible <bruno@clisp.org>
6416
6417 * elf32-i386.c: Don't defined ELF_ARCH etc. if this file is included
6418 by a target variant implementation.
6419 * elf64-alpha.c: Likewise.
6420 * elf32-i386-fbsd.c: New file.
6421 * elf64-alpha-fbsd.c: New file.
6422 * targets.c: Support bfd_elf32_i386_freebsd_vec and
6423 bfd_elf64_alpha_freebsd_vec.
6424 * configure.in: Accept the vectors bfd_elf32_i386_freebsd_vec,
6425 bfd_elf64_alpha_freebsd_vec.
6426 * Makefile.am (BFD32_BACKENDS): Add elf32-i386-fbsd.lo.
6427 (BFD32_BACKENDS_CFILES): Add elf32-i386-fbsd.c.
6428 (BFD64_BACKENDS): Add elf64-alpha-fbsd.lo.
6429 (BFD64_BACKENDS_CFILES): Add elf64-alpha-fbsd.c.
6430 (elf32-i386-fbsd.lo, elf64-alpha-fbsd.lo): Add dependencies.
6431 * config.bfd: For FreeBSD targets, set targ_defvec to a FreeBSD
6432 specific targets. Define OLD_FREEBSD_ABI_LABEL if appropriate.
6433
6434 2002-09-12 Jakub Jelinek <jakub@redhat.com>
6435
6436 * elf32-i386.c (dtpoff_base, tpoff): Don't crash if tls_segment is
6437 NULL.
6438 (elf_i386_relocate_section): Return false after printing error about
6439 unresolvable relocation.
6440
6441 2002-09-12 Nick Clifton <nickc@redhat.com>
6442
6443 * elf32-arm.h (elf32_arm_final_link_relocate): Fix handling of
6444 R_ARM_THM_PC11.
6445
6446 2002-09-11 Jeffrey Law <law@redhat.com>
6447
6448 * elf32-h8300.c (elf32_h8_relax_section): Fix typo.
6449
6450 2002-09-11 Andrew Haley <aph@cambridge.redhat.com>
6451
6452 * elf.c (_bfd_elf_find_nearest_line): Check functionname_ptr and
6453 line_ptr before deciding we've found a symbol.
6454
6455 2002-09-11 Nick Clifton <nickc@redhat.com>
6456
6457 * po/da.po: New Danish translation file.
6458 * configure.in (LINGUAS): Add 'da'.
6459 * configure: Regenerate.
6460
6461 2002-09-10 Michael Snyder <msnyder@redhat.com>
6462
6463 * irix-core.c (do_sections, do_sections64): New functions.
6464 (irix_core_core_file_p): Call new functions do_sections,
6465 do_sections64, depending on corefile (32-bit or 64-bit).
6466
6467 2002-09-09 Richard Henderson <rth@redhat.com>
6468
6469 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21M
6470 and PCREL21F like PCREL21B.
6471
6472 2002-09-04 Kevin Buettner <kevinb@redhat.com>
6473
6474 * config.bfd (mips*-*-irix6*): Add new ABI vectors. Make n32 default
6475 vector.
6476
6477 2002-09-02 Nick Clifton <nickc@redhat.com>
6478
6479 * elf32-v850.c (v850_elf_final_link_relocate): Use helpful
6480 names instead of cryptically overloaded bfd_reloc error
6481 codes.
6482 (v850_elf_relocate_section): Likewise.
6483 (v850_elf_relax_section): Replace caching of external symbols
6484 with caching of internal symbols obtained from calling
6485 bfd_elf_get_elf_syms().
6486 Fixup problems with freeing cached allocated memory blocks.
6487
6488 2002-09-02 Alan Modra <amodra@bigpond.net.au>
6489
6490 * cpu-pj.c (scan_mach, compatible, arch_info_struct): Remove.
6491 (bfd_pj_arch): Use bfd_default_scan.
6492 * cpu-v850.c (scan): Remove.
6493 (N): Use bfd_default_scan.
6494 * cpu-z8k.c (scan_mach): Remove.
6495 (arch_info_struct, bfd_z8k_arch): Reorganize so that the default is
6496 first. Use bfd_default_scan.
6497
6498 * ecoff.c (_bfd_ecoff_set_arch_mach_hook): Don't use hard-coded
6499 bfd_mach constants.
6500 (ecoff_get_magic): Likewise.
6501 * elf32-v850.c (v850_elf_object_p): Likewise.
6502 (v850_elf_final_write_processing): Likewise.
6503 * mipsbsd.c (MY(set_arch_mach)): Likewise.
6504 (MY(write_object_contents)): Likewise.
6505 * coff64-rs6000.c (xcoff64_write_object_contents): Likewise.
6506 * coffcode.h (coff_write_object_contents): Likewise.
6507 (coff_set_arch_mach_hook): Add comment describing machine == 0.
6508 Remove unnecessary "machine" assignments.
6509 (coff_write_relocs): Test for the absolute section sym by testing
6510 section and flags.
6511
6512 * aoutx.h (NAME(aout,machine_type)): Recognize bfd_mach_i386_i386
6513 and bfd_mach_i386_i386_intel_syntax.
6514 * pdp11.c (NAME(aout,machine_type)): Likewise.
6515
6516 2002-08-30 John David Anglin <dave@hiauly1.hia.nrc.ca>
6517
6518 * bfd-in.h (align_power): Cast constants to bfd_vma type.
6519 * bfd-in2.h (align_power): Likewise.
6520
6521 2002-08-30 Alan Modra <amodra@bigpond.net.au>
6522
6523 * Makefile.am: Run "make dep-am".
6524 * Makefile.in: Regenerate.
6525
6526 * cpu-avr.c (compatible): Don't use hard-coded mach constants.
6527 * cpu-powerpc.c (powerpc_compatible): Likewise.
6528 * cpu-rs6000.c (rs6000_compatible): Likewise.
6529
6530 2002-08-28 Catherine Moore <clm@redhat.com>
6531
6532 * elf32-v850.c (v850_elf_reloc_map): Add new relocs.
6533 (v850-elf-reloc): Don't resolve pc relative relocs.
6534 (v850_elf_ignore_reloc): New routine.
6535 (v850_elf_final_link_relocate): Handle new relocs.
6536 (v850_elf_relax_delete_bytes ): New routine.
6537 (v850_elf_relax_section): New routine.
6538 (bfd_elf32_bfd_relax_section): Define.
6539 (HOWTO): New entries for new relocs.
6540 * reloc.c (BFD_RELOC_V850_LONGCALL): New reloc.
6541 (BFD_RELOC_V850_LONGJUMP): New reloc.
6542 (BFD_RELOC_V850_ALIGN): New reloc.
6543 * archures.c: Remove redundant v850ea architecture.
6544 * cpu-v850.c: Remove redundant v850ea support.
6545 * libbfd.h: Regenerate.
6546 * bfd-in2.h: Regenerated.
6547
6548 2002-08-28 Svein E. Seldal <Svein.Seldal@solidas.com>
6549
6550 * config.bfd: Add tic4x-*-*coff* and c4x-*-*coff* target.
6551 * configure.in: Add tic4x_coff vector files.
6552 * configure: Regenerate.
6553 * Makefile.am: Add tic4x target.
6554 * Makefile.in: Regenerate.
6555
6556 2002-08-27 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
6557
6558 * archures.c: Add the BFD arch type tic4x.
6559 * bfd-in.h: Add BFD_IN_MEMORY flag.
6560 * coff-tic4x.c: New file.
6561 * coffswap.h (coff_swap_sym_out): Add preadjuster.
6562 * cpu-tic4x.c: New file.
6563 * targets.c: Added tic4x- in list of xvecs.
6564 * ticoff.h: New file.
6565 * bfd-in2.h: Regenerate.
6566
6567 2002-08-27 Adam Nemet <anemet@lnxw.com>
6568
6569 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Set the last
6570 bit of DT_INIT and DT_FINI for Thumb functions.
6571
6572 2002-08-26 Alan Modra <amodra@bigpond.net.au>
6573
6574 * coffcode.h (coff_set_arch_mach_hook): Handle W65MAGIC.
6575
6576 2002-08-26 Alan Modra <amodra@bigpond.net.au>
6577
6578 * aoutx.h (NAME(aout,reloc_type_lookup)): Handle BFD_RELOC_8.
6579
6580 2002-08-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6581
6582 * elf32-sh.c (sh_elf_copy_indirect_symbol): New.
6583 (create_got_section, allocate_dynrelocs, readonly_dynrelocs):
6584 Likewise.
6585 (struct elf_sh_pcrel_relocs_copied): Removed.
6586 (struct elf_sh_dyn_relocs): New.
6587 (struct elf_sh_link_hash_entry): Replace pcrel_relocs_copied
6588 field with dyn_relocs.
6589 (struct elf_sh_link_hash_table): Add short-cuts to get dynamic
6590 sections and sym_sec.
6591 (sh_elf_link_hash_newfunc): Clear dyn_relocs.
6592 (sh_elf_link_hash_table_create): Clear shorts-cuts and sym_sec.
6593 (sh_elf_create_dynamic_sections): Use create_got_section instead
6594 of _bfd_elf_create_got_section.
6595 (sh_elf_check_relocs): Likewise.
6596 (sh_elf_create_dynamic_sections): Use short-cuts to the dynamic
6597 sections.
6598 (sh_elf_adjust_dynamic_symbol, sh_elf_size_dynamic_sections,
6599 sh_elf_relocate_section, sh_elf_check_relocs,
6600 sh_elf_finish_dynamic_symbol, sh_elf_finish_dynamic_sections):
6601 Likewise.
6602 (sh_elf_adjust_dynamic_symbol): Handle nocopyreloc. Keep the
6603 dynamic relocations and avoiding the copy relocation when we
6604 didn't find any dynamic relocations in the section which has
6605 contents or is read-only.
6606 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
6607 (sh_elf_size_dynamic_sections): Don't reset the size of
6608 .rela.got section even if dynamic_sections_created flag is off.
6609 Don't use sh_elf_discard_copies. Scan all input bfd and use
6610 allocate_dynrelocs. Call readonly_dynrelocs to determine
6611 whether we need DT_TEXTREL.
6612 (sh_elf_adjust_dynamic_symbol): Use plt.refcount to determine
6613 whether the symbol was never referred to.
6614 (sh_elf_relocate_section): Use WILL_CALL_FINISH_DYNAMIC_SYMBOL.
6615 (sh_elf_gc_sweep_hook): Fill with the real sweep function.
6616 (sh_elf_check_relocs): Call create_got_section if the short-cut
6617 to .got is null. Increment reference counters only instead of
6618 allocating space on dynamic sections here. Don't conditionalize
6619 uninitialized got.offset value when marking the symbol as a
6620 global offset table entry. Keep relocations for symbols satisfied
6621 by a dynamic library to avoid copy relocations for the symbol.
6622 Set dynobj field of an elf hash table if needed.
6623 (sh_elf_finish_dynamic_sections): Handle null section pointer
6624 correctly.
6625 (elf_backend_copy_indirect_symbol): Defined.
6626 (elf_backend_can_refcount): Defined.
6627
6628 2002-08-23 Nick Clifton <nickc@redhat.com>
6629
6630 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Undo
6631 previous change. Add comment explaining why.
6632
6633 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>
6634
6635 * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le): Copy
6636 contents of .got.plt[2] to tr0, not address of .got.plt.
6637 (sh_elf_finish_dynamic_symbol): Do not apply GOT_BIAS when
6638 patching absolute plt entry. For shmedia plt entry, set bottom bit
6639 of branch to plt0 as this is a branch to an shmedia instruction.
6640 * elf64-sh64.c (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le):
6641 Copy contents of .got.plt[2] to tr0, not address of .got.plt.
6642 (elf_sh64_plt_entry_be, elf_sh64_plt_entry_le): Use ptrel to
6643 branch to plt0.
6644 (sh64_elf64_finish_dynamic_symbol): Do not apply GOT_BIAS when
6645 patching absolute plt entry. For shmedia plt entry, branch to
6646 plt0 is now ptrel, so use relative offset. Set bottom bit of
6647 branch target as it is a branch to an shmedia instruction.
6648
6649 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>,
6650 Richard Shann <richard.shann@superh.com>
6651
6652 * elf32-sh.c (sh_elf_finish_dynamic_sections): Set LSB of DT_INIT
6653 value if .init is an SHmedia function. Similarly for DT_FINI.
6654 * elf64-sh64.c (sh64_elf64_finish_dynamic_sections): Likewise.
6655
6656 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>
6657
6658 * elf32-sh.c (sh_elf_size_dynamic_sections): Zero initialize
6659 dynamic section.
6660 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
6661
6662 2002-08-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6663
6664 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use a simple
6665 byte read when reading the return address register column.
6666
6667 2002-08-22 Nick Clifton <nickc@redhat.com>
6668
6669 * config.bfd: Add powepc64-*-*bsd* target.
6670
6671 2002-08-22 Graeme Peterson <gp@qnx.com>
6672
6673 * Makefile.am: Add entries for elf32-shqnx.c
6674 * Makefile.in: Regenerate.
6675 * config.bfd: Add support sh-*-nto* target.
6676 * configure.in: Add support for bfd_elf32_sh{l}qnx_vec.
6677 * configure: Regenerate.
6678 * elf32-qnx.h: Changed typo "elf_i386qnx_*" to "elf_qnx_*" .
6679 * elf32-sh.c: Do not include elf32-target.h if
6680 ELF32_SH_C_INCLUDED is defined.
6681 * elf32-shqnx.c: New file: Support for QNX.
6682 * targets.c: Add bfd_elf32_sh{l}qnx_vec.
6683
6684 2002-08-22 Nick Clifton <nickc@redhat.com>
6685
6686 * po/tr.po: Updated Turkish translation.
6687
6688 * syms.c (_bfd_generic_read_minisymbols): Set bfd_error if the
6689 symbols are not read.
6690
6691 2002-08-22 Alan Modra <amodra@bigpond.net.au>
6692
6693 * elf32-m68hc11.c: Formatting fixes.
6694 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
6695 * elf32-m68hc12.c: Formatting fixes.
6696 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
6697
6698 2002-08-22 Alan Modra <amodra@bigpond.net.au>
6699
6700 * coff-rs6000.c (rs6000coff_vec <object_flags>): Add SEC_CODE and
6701 SEC_DATA.
6702 (pmac_xcoff_vec): Likewise.
6703 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
6704 (aix5coff64_vec): Likewise.
6705
6706 2002-08-22 Alan Modra <amodra@bigpond.net.au>
6707
6708 * elf-bfd.h (struct elf_backend_data): Add struct elf_backend_data
6709 param to elf_backend_copy_indirect_symbol.
6710 (_bfd_elf_link_hash_copy_indirect): Likewise.
6711 * elflink.h (elf_add_default_symbol, elf_fix_symbol_flags): Adjust
6712 calls to copy_indirect_symbol.
6713 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
6714 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
6715 * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
6716 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
6717 * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
6718 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
6719 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
6720 * elfxx-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
6721 * elfxx-mips.h (_bfd_mips_elf_copy_indirect_symbol): Likewise.
6722 * elf.c (_bfd_elf_link_hash_copy_indirect): Likewise. Properly
6723 test refcounts for "used" values.
6724
6725 2002-08-21 John David Anglin <dave@hiauly1.hia.nrc.ca>
6726
6727 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Add PARAMS to
6728 argument declaration.
6729
6730 2002-08-19 Elena Zannoni <ezannoni@redhat.com>
6731
6732 * archures.c (bfd_mach_ppc_e500): Added.
6733 * bfd-in2.h: Rebuilt.
6734 * cpu-powerpc.c (bfd_powerpc_archs): Added e500.
6735
6736 2002-08-19 Alan Modra <amodra@bigpond.net.au>
6737
6738 * elf32-m68hc12.c (elf_backend_can_gc_sections): False.
6739
6740 2002-08-17 Andrew Cagney <ac131313@redhat.com>
6741
6742 * elf.c (bfd_elf_get_elf_syms): Change type of `esym' to
6743 `bfd_byte'.
6744
6745 2002-08-17 Stan Cox <scox@redhat.com>
6746
6747 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Use the
6748 IRIX 6 segment layout for NEWABI.
6749
6750 2002-08-16 Stephen Clarke <stephen.clarke@superh.com>
6751
6752 * elf32-sh.c (sh_elf_gc_mark_hook): For sh64, skip indirect
6753 symbols when looking for section referred to by a relocation.
6754 * elf64-sh.c (sh_elf64_gc_mark_hook): Likewise.
6755
6756 2002-08-15 Alan Modra <amodra@bigpond.net.au>
6757
6758 * elf32-i370.c: Move reloc enum to include/elf/i370.h.
6759
6760 2002-08-15 Hans-Peter Nilsson <hp@axis.com>
6761
6762 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Add
6763 missing check for whether the symbol is referenced by DSO before
6764 unexporting it as an unneeded dynamic symbol.
6765
6766 2002-08-14 H.J. Lu <hjl@gnu.org>
6767
6768 * libbfd.h: Regenerate.
6769
6770 2002-08-14 H.J. Lu <hjl@gnu.org>
6771
6772 * config.bfd: Always add 64bit vectors to 32bit Linux/mips.
6773
6774 2002-08-14 Stephane Carrez <stcarrez@nerim.fr>
6775
6776 * elf32-m68hc11.c (m68hc11_relax_group): New to relax group of
6777 instructions.
6778 (m68hc11_direct_relax): New to define table of relaxable instructions.
6779 (find_relaxable_insn): New, find a relaxable insn.
6780 (compare_reloc): New to compare two relocs.
6781 (m68hc11_elf_relax_section): New, relax text sections.
6782 (m68hc11_elf_relax_delete_bytes): New, delete bytes and adjust branchs.
6783 (elf32_m68hc11_check_relocs): New function for GC support.
6784 (elf32_m68hc11_relocate_section): New function for GC support.
6785 (bfd_elf32_bfd_relax_section): Define to support linker relaxation.
6786 (elf_backend_check_relocs): Likewise.
6787 (elf_backend_relocate_section): Likewise.
6788
6789 2002-08-13 H.J. Lu <hjl@gnu.org>
6790
6791 * elflink.h (NAME(bfd_elf,size_dynamic_sections): Don't count
6792 definitions in shared objects when checking symbol with
6793 undefined version.
6794
6795 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6796
6797 * elf32-m68hc11.c (elf32_m68hc11_gc_mark_hook): New for section GC.
6798 (elf32_m68hc11_gc_sweep_hook): Likewise.
6799 (elf_backend_gc_mark_hook): Define for GC section support.
6800 (elf_backend_gc_sweep_hook): Likewise.
6801 (elf_backend_can_gc_sections): Likewise.
6802
6803 * elf32-m68hc12.c: Likewise.
6804
6805 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6806
6807 * elf32-m68hc11.c (_bfd_m68hc11_elf_print_private_bfd_data): New.
6808 (_bfd_m68hc11_elf_merge_private_bfd_data): New function.
6809 (_bfd_m68hc11_elf_set_private_flags): New function.
6810 Use them to set/check/print ELF flags specific to 68HC11.
6811
6812 * elf32-m68hc12.c (_bfd_m68hc12_elf_print_private_bfd_data): New.
6813 (_bfd_m68hc12_elf_merge_private_bfd_data): New function.
6814 (_bfd_m68hc12_elf_set_private_flags): New function.
6815 Use them to set/check/print ELF flags specific to 68HC12.
6816
6817 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6818
6819 * elf32-m68hc11.c (elf_m68hc11_howto_table): Add the new relocs;
6820 fix masks for PC-rel relocs.
6821 (m68hc11_elf_ignore_reloc): New function.
6822
6823 * elf32-m68hc12.c (m68hc12_elf_special_reloc): New to handle specific
6824 68HC12 banked addressing relocs.
6825 (m68hc12_phys_addr): New to compute physical address of banked memory.
6826 (m68hc12_phys_page): Likewise for page.
6827 (m68hc12_addr_is_banked): New to see if address is in banked area.
6828 (elf_m68hc12_howto_table): Add new relocs and rename to xx12.
6829
6830 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6831
6832 * reloc.c (BFD_RELOC_M68HC11_RL_JUMP, BFD_RELOC_M68HC11_RL_GROUP,
6833 BFD_RELOC_M68HC11_LO16, BFD_RELOC_M68HC11_PAGE,
6834 BFD_RELOC_M68HC11_24): New relocs for 68HC11/68HC12.
6835 * bfd-in2.h: Regenerate.
6836
6837 2002-08-12 H.J. Lu <hjl@gnu.org>
6838
6839 * elflink.h (elf_add_default_symbol): Preserve section across
6840 elf_merge_symbol.
6841
6842 2002-08-09 Graeme Peterson <gp@qnx.com>
6843
6844 * Makefile.am: Add entries for elf32-ppcqnx.c, and add
6845 elf32-qnx.h dependency to elfarmqnx-nabi.c and elf32-i386qnx.c.
6846 * Makefile.in: Regenerate.
6847 * config.bfd: Add support for powerpc{le}-*-nto targets.
6848 * configure.in: Add support for bfd_elf32_powerpc{le}qnx_vec.
6849 * configure: Regenerate.
6850 * elf32-i386qnx.c: Moved backend functions into a QNX specific
6851 common file "elf32-qnx.h", and now include that file.
6852 * elf32-qnx.h: New file: QNX specific common elf backend.
6853 * elf32-ppc.c: Do not include elf32-target.h if
6854 ELF32_PPC_C_INCLUDED is defined.
6855 * elf32-ppcqnx.c: New file: Support for QNX.
6856 * elfarmqnx-nabi.c: Include elf32-qnx.h for qnx elf backend.
6857 * targets.c: Add bfd_elf32_powerpc{le}qnx_vec.
6858
6859 2002-08-09 Nick Clifton <nickc@redhat.com>
6860
6861 * po/sv.po: Updated Swedish translation.
6862
6863 2002-08-09 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6864
6865 * elfxx-mips.c (mips_elf_global_got_index): Avoid segfault if
6866 g->global_gotsym is NULL.
6867
6868 2002-08-08 H.J. Lu <hjl@gnu.org>
6869
6870 * elflink.h (elf_add_default_symbol): Don't warn if a definition
6871 overrides an indirect versioned symbol.
6872
6873 2002-08-08 Jakub Jelinek <jakub@redhat.com>
6874
6875 * elf32-i386.c (elf_i386_relocate_section): Fill in proper addend
6876 for R_386_TLS_TPOFF32 relocs against symndx 0.
6877
6878 2002-08-07 H.J. Lu <hjl@gnu.org>
6879
6880 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Check symbol
6881 with undefined version if needed.
6882 (elf_link_assign_sym_version): Match a default symbol with a
6883 version without definition. No need to hide the default
6884 definition separately.
6885
6886 2002-08-08 Alan Modra <amodra@bigpond.net.au>
6887
6888 * elflink.h (elf_link_output_extsym): Don't output symbols from
6889 SEC_EXCLUDE sections.
6890
6891 * aoutx.h (aout_link_write_symbols): Correct handling of warning syms.
6892
6893 2002-08-07 Alan Modra <amodra@bigpond.net.au>
6894
6895 * elf64-ppc.c (edit_opd): Arrange to drop symbols for discarded .opd
6896 entries.
6897
6898 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6899
6900 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Cast signedness
6901 mismatch.
6902
6903 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6904
6905 * elfxx-mips.c (ABI_64_P): Remove superfluous check.
6906
6907 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6908
6909 * elf32-mips.c (mips_reloc_map): Fix typo.
6910
6911 2002-08-06 Alan Modra <amodra@bigpond.net.au>
6912
6913 * xcofflink.c (xcoff_write_global_symbol): Set n_scnum for abs_section.
6914
6915 2002-08-06 Alan Modra <amodra@bigpond.net.au>
6916
6917 * elf64-ppc.c (ppc64_elf_howto_raw): Zero all src_mask entries.
6918
6919 2002-08-06 Alan Modra <amodra@bigpond.net.au>
6920
6921 * libxcoff.h: Use PARAMS on function declarations.
6922 * coff-rs6000.c (xcoff_generate_rtinit): Simplify size calc.
6923 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
6924
6925 * coff-rs6000.c: (xcoff_rtype2howto): Don't place reloc address in
6926 addend.
6927 * coff64-rs6000.c: (xcoff64_rtype2howto): Likewise.
6928
6929 2002-08-06 Alan Modra <amodra@bigpond.net.au>
6930
6931 * coff-rs6000.c: Formatting fixes.
6932 (xcoff_calculate_relocation): Use PARAMS in declaration.
6933 (xcoff_complain_overflow): Likewise.
6934 (xcoff_ppc_relocate_section): Use old-style function pointer call.
6935 (bfd_xcoff_backend_data): Remove useless comments.
6936 (rs6000coff_vec): Likewise.
6937 (bfd_pmac_xcoff_backend_data): Likewise.
6938 (pmac_xcoff_vec): Likewise.
6939
6940 * coff64-rs6000.c: Formatting fixes.
6941 (xcoff64_calculate_relocation): Use PARAMS in declaration.
6942 (xcoff64_ppc_relocate_section): Use old-style function pointer call.
6943 (bfd_xcoff_backend_data): Remove useless comments.
6944 (rs6000coff64_vec): Likewise.
6945 (bfd_xcoff_aix5_backend_data): Likewise.
6946 (aix5coff64_vec): Likewise.
6947
6948 2002-08-06 Alan Modra <amodra@bigpond.net.au>
6949
6950 * coff-rs6000.c (xcoff_howto_table): Revert some of last change to
6951 mask entries. Use complain_overflow_dont for R_REF.
6952 (xcoff_reloc_type_ba): Revert last change.
6953 (xcoff_reloc_type_br): Likewise.
6954 (xcoff_reloc_type_crel): Likewise.
6955 (xcoff_ppc_relocate_section): Likewise.
6956 * coff64-rs6000.c (xcoff64_reloc_type_br): Likewise.
6957 (xcoff64_ppc_relocate_section): Likewise.
6958 (xcoff64_howto_table): Revert some of last change to mask entries.
6959 Use complain_overflow_dont for R_REF.
6960
6961 * coff-rs6000.c (xcoff_howto_table): Fix src_mask entries. Make all
6962 relocs with bitsize == 16 have size = 1.
6963 (xcoff_reloc_type_ba): Correct src_mask and dst_mask adjustment.
6964 (xcoff_reloc_type_br): Likewise.
6965 (xcoff_reloc_type_crel): Likewise.
6966 (xcoff_ppc_relocate_section): Set up src_mask and dst_mask correctly.
6967 * coff64-rs6000.c (xcoff64_reloc_type_br): Correct src_mask and
6968 dst_mask adjustment.
6969 (xcoff64_ppc_relocate_section): Set up src_mask and dst_mask correctly.
6970 (xcoff64_howto_table): Fix src_mask entries. Make all relocs with
6971 bitsize == 16 have size = 1.
6972
6973 2002-08-01 Denis Chertykov <denisc@overta.ru>
6974
6975 * elf32-ip2k.c: Processor manufacturer changed to Ubicom.
6976 (struct misc): New field isymbuf. All free_* fields removed.
6977 (symbol_value): Pass in internal syms. No need to swap syms in.
6978 (ip2k_elf_relax_section): Use bfd_elf_get_elf_syms. Properly free
6979 possibly cached info.
6980 (tidyup_after_error): Removed.
6981 (ip2k_elf_relax_section_pass1): Don't use removed fields of struct
6982 misc. Use new field.
6983 (adjust_all_relocations): Use internal syms. No need to swap syms
6984 in and out.
6985 (add_page_insn): Don't use removed fields of struct misc.
6986
6987 2002-08-01 Nick Clifton <nickc@redhat.com>
6988
6989 * elf32-arm.h: Revert previous delta.
6990
6991 2002-08-01 Nick Clifton <nickc@redhat.com>
6992
6993 * configure.in (AM_INIT_AUTOMAKE): Bump version number.
6994 * configure: Regenerate.
6995
6996 2002-07-31 H.J. Lu <hjl@gnu.org>
6997
6998 * config.bfd: Add x86-64 vector to Linux/i386 if 64bit BFD is
6999 selected.
7000
7001 2002-07-31 H.J. Lu <hjl@gnu.org>
7002
7003 * config.bfd: Add n32 vectors to 32bit Linux/mips if 64bit BFD
7004 is selected.
7005
7006 2002-07-31 Jakub Jelinek <jakub@redhat.com>
7007
7008 * elf32-i386.c (elf_i386_copy_indirect_symbol): Swap tls_type
7009 if _bfd_elf_link_hash_copy_indirect will swap got.refcount.
7010
7011 2002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
7012
7013 * cpu-ns32k.c (_bfd_ns32k_put_immdeiate, _bfd_ns32k_get_immediate):
7014 There is no 8 byte relocation type for this architecture.
7015 (do_ns32k_reloc): Use bfd_vma instead of native types.
7016 (bfd_ns32k_put_immediate, _bfd_ns32k_relocate_contents) put_data
7017 returns void.
7018 (_bfd_ns32k_put_displacement): Don't check for overflow. We can
7019 rely on generic code to do that.
7020 * aout-ns32k.c (howto_table): Add appropriate overflow detection
7021 to all table entries.
7022 (_bfd_ns32k_relocate_contents): put_data returns void.
7023 * ns32k.h: (_bfd_ns32k_put_displacement, _bfd_ns32k_put_immediate)
7024 (_bfd_do_ns32k_reloc_contents): Fix prototypes. put data functions
7025 return void.
7026
7027 2002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
7028
7029 * aoutx.h (aout_link_check_ar_symbols): Whether to include an
7030 archive object is target dependant.
7031
7032 2002-07-31 Adam Nemet <anemet@lnxw.com>
7033
7034 * elf32-arm.h (ARM_PLT_ENTRY_SIZE): Rename PLT_ENTRY_SIZE.
7035 (THUMB_PLT_ENTRY_SIZE): New macro.
7036 (PLT_ENTRY_SIZE): Return the appropriate *_PLT_ENTRY_SIZE.
7037 (elf32_arm_plt0_entry): Rename PLT_ENTRY_SIZE to
7038 ARM_PLT_ENTRY_SIZE.
7039 (elf32_arm_plt_entry): Likewise.
7040 (elf_backend_plt_header_size): Likewise.
7041 (elf32_thumb_plt0_entry): New global.
7042 (elf32_arm_finish_dynamic_sections): Use it. Put Thumb entries
7043 into .plt.thumb.
7044 (elf32_thumb_plt_entry): New global.
7045 (elf32_arm_finish_dynamic_symbol): Use it. Use .thumb.plt for
7046 Thumb entries. Set the bottom bit of the corresponding GOT entry
7047 for a Thumb PLT entry.
7048 (struct elf32_arm_plt_entry_info): New structure.
7049 (struct elf32_arm_link_hash_entry, plt_info): New member of this
7050 type.
7051 (elf32_arm_link_hash_newfunc): Initialize new member.
7052 (elf32_arm_final_link_relocate, R_ARM_THM_PC22 case): Handle
7053 relocations against the PLT.
7054 (elf32_arm_check_relocs, case R_ARM_PLT32 case): Set
7055 first_rel_type if this is the first time we encounter the symbol.
7056 (elf32_arm_check_relocs, case R_ARM_THM_PC22 case): New case.
7057 Determine if relocation needs a PLT entry. Set first_rel_type if
7058 this is the first time we encounter the symbol
7059 (elf32_arm_adjust_dynamic_symbol): Create PLT entries for Thumb
7060 functions as well.
7061 (elf32_arm_size_dynamic_sections): Handle .plt.thumb like .plt.
7062 (elf32_arm_create_dynamic_sections): New function. Create the
7063 .plt.thumb section.
7064 (elf_backend_create_dynamic_sections): Call it.
7065
7066 2002-07-31 Nick Clifton <nickc@redhat.com>
7067
7068 * bfd.c (bfd_alt_mach_code): Rename parameter 'index' to
7069 'alternative' in order to avoid shadowing global symbol of the
7070 same name.
7071 * bfd-in2.h: Regenerate.
7072 * libbfd.h: Regenerate.
7073 * libcoff.h: Regenerate.
7074
7075 2002-07-31 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7076
7077 * Makefile.am: Add n32 ABI support.
7078 * Makefile.in: Regenerate.
7079 * config.bfd: Add n32 vectors to mips64*-*-linux* targets. Treat 64
7080 bit vectors for mips*-*-linux targets as optional.
7081 * configure.in: Add n32 ABI vectors.
7082 * configure: Regenerate.
7083 * elf32-mips.c (mips_elf32_object_p): Reject n32 ABI files.
7084 * elfn32-mips.c: New file, n32 ABI support.
7085 * targets.c: Add n32 ABI vectors.
7086
7087 2002-07-30 Graeme Peterson <gp@qnx.com>
7088
7089 * elfarmqnx-nabi.c: New file: Support for QNX.
7090 * config.bfd: Add support for arm-*-nto target.
7091 * configure.in: Add support for bfd_elf32_{big|little}armqnx_vec.
7092 * configure: Regenerate.
7093 * Makefile.am: Add entries for elfarmqnx-nabi.c.
7094 * Makefile.in: Regenerate.
7095 * elf32-arm.h (ELF_MAXPAGESIZE): Do not define if already defined.
7096 Do not define global function if ELFARM_NABI_C_INCLUDED is defined.
7097 * elfarm-nabi.c: Do not include elf32-arm.h if
7098 ELFARM_NABI_C_INCLUDED is defined.
7099 * targets.c: Add bfd_elf32_{big|little}armqnx_vec.
7100
7101 2002-07-30 Nick Clifton <nickc@redhat.com>
7102
7103 * po/sv.po: Updated Swedish translation.
7104
7105 2002-07-30 Jakub Jelinek <jakub@redhat.com>
7106
7107 * elf.c (elf_fake_sections): Fix up .tbss sh_size and sh_type.
7108
7109 2002-07-30 Alan Modra <amodra@bigpond.net.au>
7110
7111 * aoutx.h (some_aout_object_p): Clean up tdata properly on error.
7112 * archive.c (bfd_generic_archive_p): Likewise.
7113 * coff-rs6000.c (_bfd_xcoff_archive_p): Likewise.
7114 (_bfd_xcoff_archive_p): Use bfd_scan_vma in place of strtol.
7115 * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
7116 (xcoff64_archive_p): Likewise.
7117 (xcoff64_openr_next_archived_file): Likewise.
7118 (xcoff64_archive_p): Clean up tdata properly on error.
7119 * coffgen.c (coff_real_object_p): Likewise.
7120 (coff_object_p): Release filehdr and opthdr.
7121 * ecoff.c (_bfd_ecoff_archive_p): Clean up tdata properly on error.
7122 * ieee.c (ieee_archive_p): Likewise.
7123 * ihex.c (ihex_object_p): Likewise.
7124 (ihex_mkobject): Always allocate tdata.
7125 * peicode.h (pe_ILF_object_p): Release bfd_alloc'd buffer on error.
7126 * srec.c (srec_mkobject): Always allocate tdata.
7127 (srec_object_p): Clean up tdata properly on error.
7128 (symbolsrec_object_p): Likewise.
7129 * versados.c (versados_object_p): Likewise.
7130 * vms-misc.c (_bfd_vms_get_record): Use bfd_malloc instead of malloc,
7131 and bfd_realloc instead of realloc.
7132 (add_new_contents): Use bfd_alloc instead of bfd_malloc for sections.
7133 * vms.c (vms_initialize): Always allocate tdata. Use bfd_alloc in
7134 place of bfd_malloc, simplifying error freeing. Free hash table too.
7135 (vms_object_p): Clean up tdata on error.
7136 (vms_mkobject): Don't complain on stderr if vms_initialize fails.
7137 (vms_close_and_cleanup): Adjust for bfd_alloc use.
7138
7139 2002-07-30 Alan Modra <amodra@bigpond.net.au>
7140
7141 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set e_flags.
7142
7143 2002-07-26 Chris Demetriou <cgd@broadcom.com>
7144
7145 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Merge ASE
7146 flags into resulting BFD.
7147
7148 2002-07-26 Alan Modra <amodra@bigpond.net.au>
7149
7150 From John Reiser <jreiser@BitWagon.com>
7151 * elf32-i386.c (elf_i386_link_hash_table_create): Clear
7152 tls_ldm_got.refcount.
7153
7154 2002-07-25 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7155
7156 * elf64-mips.c: Update TODO comment.
7157 (mips_elf64_higher_reloc,mips_elf64_highest_reloc,
7158 mips_elf64_gprel16_reloca): Remove prototypes.
7159 (mips16_jump_reloc,mips16_gprel_reloc): Add functions.
7160 (UNUSED_RELOC): Replace by EMPTY_RELOC.
7161 (mips_elf64_howto_table_rel): Use special R_MIPS_HI16 handling. Remove
7162 wrong comments. Remove disfunctional support of R_MIPS_HIGHER and
7163 R_MIPS_HIGHEST.
7164 (mips_elf64_howto_table_rela): Fix handling of R_MIPS_GPREL16 and
7165 R_MIPS_GOT16. Remove wrong comments.
7166 (elf_mips16_jump_howto,elf_mips16_gprel_howto,
7167 elf_mips_gnu_vtinherit_howto,elf_mips_gnu_vtentry_howto): New, code
7168 from elf32-mips.c.
7169 (mips_elf64_hi16_reloc): Fix formatting.
7170 (mips_elf64_higher_reloc,mips_elf64_highest_reloc): Remove.
7171 (mips_elf64_got16_reloc): Fix formatting. Remove superfluous code.
7172 Better comment. Fall back to R_MIPS_GOT_DISP instead of abort().
7173 (mips_elf64_gprel16_reloc): Make static. Add check for
7174 partial_inplace.
7175 (mips_elf64_gprel16_reloca): Remove.
7176 (mips_elf64_literal_reloc): New function.
7177 (mips_elf64_gprel32_reloc): Fix formatting.
7178 (mips_elf64_shift6_reloc): Fix comment. Make static.
7179 (mips16_jump_reloc,mips16_gprel_reloc): New functions, code from
7180 elf32-mips.c.
7181 (elf_reloc_map,mips_reloc_map): New mapping table, similiar as in
7182 elf32-mips.c
7183 (bfd_elf64_bfd_reloc_type_lookup): Use the mapping table. Enable GNU
7184 specific relocations.
7185 (mips_elf64_rtype_to_howto): Enable GNU specific relocations.
7186 (mips_elf64_object_p): Invert logic to check for SGI-ish ABI.
7187 (ELF_MAXPAGESIZE): Add comment.
7188
7189 2002-07-25 Nick Clifton <nickc@redhat.com>
7190
7191 * po/sv.po: Updated Swedish translation.
7192 * po/es.po: Updated Spanish translation.
7193 * po/fr.po: Updated French translation.
7194
7195 2002-07-25 Alan Modra <amodra@bigpond.net.au>
7196
7197 * elf-bfd.h (_bfd_elf32_link_record_local_dynamic_symbol): Define
7198 as elf_link_record_local_dynamic_symbol.
7199 (_bfd_elf64_link_record_local_dynamic_symbol): Likewise.
7200 (elf_link_record_local_dynamic_symbol): Declare. Now returns int.
7201 * elflink.h (elf_link_record_local_dynamic_symbol): Move to..
7202 * elflink.c: .. here. Use bfd_elf_get_elf_syms. Check whether an
7203 attempt is made to record a symbol in a discarded section, and
7204 return `2' in that case.
7205
7206 2002-07-24 Nick Clifton <nickc@redhat.com>
7207
7208 * po/sv.po: Updated Swedish translation.
7209 * po/es.po: Updated Spanish translation.
7210
7211 2002-07-23 Alan Modra <amodra@bigpond.net.au>
7212
7213 * po/SRC-POTFILES.in: Regenerate.
7214
7215 * elf-hppa.h (elf_hppa_relocate_section): If relocatable, return
7216 immediately. Remove code handling relocatable linking.
7217 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
7218 * elf32-cris.c (cris_elf_relocate_section): Likewise.
7219 * elf32-fr30.c (elf32_frv_relocate_section): Likewise.
7220 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
7221 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
7222 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
7223 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
7224 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
7225 * elf32-v850.c (v850_elf_relocate_section): Likewise.
7226 * elf32-vax.c (elf_vax_relocate_section): Likewise.
7227 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7228 * elf32-avr.c (elf_backend_rela_normal): Define.
7229 * elf32-cris.c: Likewise.
7230 * elf32-fr30.c: Likewise.
7231 * elf32-frv.c: Likewise.
7232 * elf32-h8300.c: Likewise.
7233 * elf32-hppa.c: Likewise.
7234 * elf32-ip2k.c: Likewise.
7235 * elf32-sparc.c: Likewise.
7236 * elf32-v850.c: Likewise.
7237 * elf32-vax.c: Likewise.
7238 * elf64-hppa.c: Likewise.
7239 * elf64-sparc.c: Likewise.
7240 * elf32-fr30.c (elf32_frv_relocate_section): Edit comment.
7241 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
7242 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
7243 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
7244 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
7245 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
7246 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
7247 * elf-m10200.c (USE_RELA): Don't define.
7248 * elf-m10300.c: Likewise.
7249 * elfarm-oabi.c: Likewise.
7250 * elf32-i370.c: Likewise.
7251 * elf32-ip2k.c: Likewise.
7252 * elf32-m68k.c: Likewise.
7253 * elf32-mcore.c: Likewise.
7254 * elf32-ppc.c: Likewise.
7255 * elf32-s390.c: Likewise.
7256 * elf32-vax.c: Likewise.
7257 * elf64-ppc.c: Likewise.
7258 * elf64-s390.c: Likewise.
7259 * elf64-x86-64.c: Likewise.
7260 * elfxx-ia64.c: Likewise.
7261 * elf32-avr.c (USE_REL): Don't undef.
7262 * elf32-ip2k.c: Likewise.
7263
7264 2002-07-23 Nick Clifton <nickc@redhat.com>
7265
7266 * elf-bfd.h (struct elf_backend_data): Add new bitfield
7267 'want_p_paddr_set_to_zero'.
7268 * elfxx-target.h: Set default value for want_p_paddr_set_to_zero
7269 to false;
7270 * elfxx-ia64.c: Set want_p_paddr_set_zero for HPUX target.
7271 * elf.c (copy_private_bfd_data): Test want_p_paddr_set_zero.
7272
7273 2002-07-23 Gabor Keresztfalvi <keresztg@mail.com>
7274
7275 * nlmcode.h (nlm_swap_auxiliary_headers_out): Swapped the order of
7276 the MeSsAgEs and CoPyRiGhT tags to make >=NW4.x NLM loaders to
7277 show the Copyright string.
7278 Minor formatting tidy ups.
7279
7280 2002-07-23 Nick Clifton <nickc@redhat.com>
7281
7282 * po/fr.po: Updated French translation.
7283 * po/sv.po: Updated Swedish translation.
7284
7285 2002-07-23 Alan Modra <amodra@bigpond.net.au>
7286
7287 * elflink.h (elf_link_input_bfd): Don't change internal symbols
7288 when outputting relocs.
7289
7290 2002-07-20 Jason Thorpe <thorpej@wasabisystems.com>
7291
7292 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only insert
7293 DT_PLTGOT into the dynamic section if there is a PLT.
7294
7295 2002-07-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7296
7297 * elfxx-mips.c (_bfd_mips_elf_discard_info): New function, code from
7298 elf32-mips.c.
7299 (_bfd_mips_elf_write_section): Likewise.
7300 * elfxx-mips.h (_bfd_mips_elf_discard_info): New prototype.
7301 (_bfd_mips_elf_write_section): Likewise.
7302 * elf32-mips.c (elf32_mips_discard_info): Move to elfxx-mips.c.
7303 (elf32_mips_write_section): Likewise.
7304 * elf64-mips.c (_bfd_mips_elf_ignore_discarded_relocs): Use it.
7305 (_bfd_mips_elf_write_section): Likewise.
7306
7307 2002-07-19 Alan Modra <amodra@bigpond.net.au>
7308
7309 * elfxx-ia64.c: (elfNN_ia64_modify_segment_map): Properly scan
7310 PT_IA_64_UNWIND segments for a given section.
7311
7312 2002-07-17 H.J. Lu <hjl@gnu.org>
7313
7314 * Makefile.am: Fix a typo.
7315 * Makefile.in: Regenerate.
7316
7317 2002-07-15 Denis Chertykov <denisc@overta.ru>
7318 Frank Ch. Eigler <fche@redhat.com>
7319 Ben Elliston <bje@redhat.com>
7320 Alan Lehotsky <alehotsky@cygnus.com>
7321 John Healy <jhealy@redhat.com>
7322 Graham Stott <grahams@redhat.com>
7323 Jeff Johnston <jjohnstn@redhat.com>
7324
7325 * Makefile.am: Add support for ip2k.
7326 * Makefile.in: Regenerate.
7327 * doc/Makefile.in: Regenerate.
7328 * archures.c: Add support for ip2k.
7329 * config.bfd: Add support for ip2k.
7330 * configure.in: Add support for ip2k.
7331 * configure: Regenerate.
7332 * reloc.c: Add support for ip2k.
7333 * targets.c: Add support for ip2k.
7334 * bfd-in2.h: Regenerate.
7335 * libbfd.h: Regenerate.
7336 * cpu-ip2k.c: New file.
7337 * elf32-ip2k.c: New file.
7338
7339 2002-07-17 Ian Rickards <irickard@arm.com>
7340
7341 * dwarf2.c (concat_filename): If we can't establish the directory
7342 just return the filename.
7343
7344 2002-07-16 Moritz Jodeit <moritz@jodeit.org>
7345
7346 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Correct order of memset args.
7347
7348 2002-07-16 Alan Modra <amodra@bigpond.net.au>
7349
7350 * elflink.h: Formatting fixes, tidy prototypes.
7351 (elf_link_assign_sym_version): Move common code out of loop.
7352
7353 2002-07-16 Alan Modra <amodra@bigpond.net.au>
7354
7355 * elflink.h (elf_link_input_bfd): Don't call reloc_emitter when
7356 reloc section size is zero. Correct reloc output location.
7357
7358 2002-07-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
7359
7360 * elf-hppa.h (elf_hppa_reloc_final_type): Use R_PARISC_PCREL16F as
7361 the final type for the e_fsel selector when generating PA2.0W code.
7362 (elf_hppa_relocate_insn): Provide support for PA2.0W 16-bit format 1
7363 relocations.
7364
7365 2002-07-14 H.J. Lu <hjl@gnu.org>
7366
7367 * elflink.h (elf_link_assign_sym_version): Hide the default
7368 definition if there is a hidden versioned definition.
7369
7370 2002-07-12 Hans-Peter Nilsson <hp@axis.com>
7371
7372 * elf32-cris.c (cris_elf_relocate_section): Drop nonsensical
7373 dynamic reference test in assertion when initializing GOT with
7374 static contents. Just assert that there are either no dynamic
7375 sections, the symbol is defined in the regular objects or that the
7376 symbol is undef weak. Tweak comment.
7377 (elf_cris_finish_dynamic_symbol): Emit .got reloc for a program
7378 only if the symbol isn't defined in the program and isn't undef
7379 weak.
7380 (elf_cris_adjust_dynamic_symbol): Simplify condition for getting
7381 rid of PLT entry: only do it if the symbol isn't defined in a DSO.
7382 When doing so, clear ELF_LINK_HASH_NEEDS_PLT. Tweak comments.
7383 (elf_cris_discard_excess_program_dynamics): Don't consider
7384 ELF_LINK_HASH_REF_DYNAMIC when omitting .got runtime relocs.
7385
7386 2002-07-11 Alan Modra <amodra@bigpond.net.au>
7387
7388 * elf32-i386.c (elf_i386_relocate_section): Don't complain about
7389 unresolved debugging relocs in dynamic applications.
7390 * elf32-s390.c (elf_s390_relocate_section): Likewise.
7391 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
7392 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
7393 * elf64-s390.c (elf_s390_relocate_section): Likewise.
7394 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7395 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
7396
7397 2002-07-10 Alan Modra <amodra@bigpond.net.au>
7398
7399 * elf64-ppc.c (ONES): Define.
7400 (ppc64_elf_howto_table): Use ONES here to avoid warnings. Fill in
7401 missing src_mask fields. Tweak R_PPC64_NONE, R_PPC64_COPY. Fill
7402 in missing dst_mask fields on R_PPC64_PLT32, R_PPC64_PLTREL32.
7403
7404 * elf64-ppc.c (ppc64_elf_get_symbol_info): Delete.
7405 (ppc64_elf_set_private_flags): Delete.
7406 (ppc64_elf_section_from_shdr): Delete.
7407 (ppc64_elf_merge_private_bfd_data): Remove flag checking/merging code.
7408 (ppc64_elf_fake_sections): Delete.
7409 (bfd_elf64_bfd_set_private_flags): Don't define.
7410 (bfd_elf64_get_symbol_info): Likewise.
7411 (elf_backend_section_from_shdr): Likewise.
7412 (elf_backend_fake_sections): Likewise.
7413
7414 2002-07-10 Marco Walther <Marco.Walther@sun.com>
7415
7416 * elf.c: (assign_section_numbers) Set sh_entsize for .stab only
7417 when not already set.
7418 * elf64-sparc.c: (sparc64_elf_fake_sections): New function.
7419 (elf_backend_fake_sections): Define.
7420
7421 2002-07-10 Alan Modra <amodra@bigpond.net.au>
7422
7423 * merge.c (_bfd_merge_section): Remove redundant output_section check.
7424 Formatting.
7425 (_bfd_merge_sections): Don't set SEC_EXCLUDE on unused sections.
7426
7427 2002-07-09 Hans-Peter Nilsson <hp@axis.com>
7428
7429 * elf32-cris.c (cris_elf_relocate_section): Move sanity-check for
7430 NULL sym_hashes to just before use.
7431 <case R_CRIS_32_GOTREL>: In test for local symbol, accept also
7432 symbol with non-default visibility.
7433 <case R_CRIS_32_GOTREL, case R_CRIS_32_PLT_GOTREL>: Ditto.
7434 <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
7435 Ditto.
7436 (cris_elf_gc_sweep_hook): Only decrease h->plt.refcount for
7437 symbol with non-default visibility.
7438 (cris_elf_check_relocs): At tests for local symbol before
7439 increasing h->plt.refcount, also check for non-default
7440 visibility. Ditto when checking for local symbol to eliminate
7441 pc-relative runtime relocs.
7442
7443 2002-07-08 Alan Modra <amodra@bigpond.net.au>
7444
7445 * elf.c: Formatting.
7446 (IS_SOLARIS_PT_INTERP): Add p_paddr and p_memsz checks.
7447 (INCLUDE_SECTION_IN_SEGMENT): Remove IS_SOLARIS_PT_INTERP.
7448 (copy_private_bfd_data): Set p_vaddr on broken Solaris PT_INTERP
7449 segments.
7450
7451 2002-07-07 Mark Mitchell <mark@codesourcery.com>
7452 Alan Modra <amodra@bigpond.net.au>
7453
7454 * cofflink.c (_bfd_coff_final_link): On PE COFF systems, take into
7455 account the impact of relocation count overflow when computing
7456 section offsets.
7457 * coffcode.h (coff_write_relocs): Use obj_pe when deciding whether
7458 or not to apply the PE COFF reloc overflow handling. Fix a
7459 fencepost error in deciding whether or not to use that technique.
7460
7461 2002-07-07 Alan Modra <amodra@bigpond.net.au>
7462
7463 * elf-bfd.h (struct elf_reloc_cookie): Remove locsym_shndx,
7464 change type of locsyms.
7465 (bfd_elf_get_elf_syms): Declare.
7466 * elf.c (bfd_elf_get_elf_syms): New function.
7467 (group_signature): Use bfd_elf_get_elf_syms.
7468 (bfd_section_from_r_symndx): Likewise.
7469 * elfcode.h (elf_slurp_symbol_table): Likewise.
7470 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
7471 (elf_link_add_object_symbols): Likewise. Reorganise to increase
7472 locality of various data structures. Properly free internal relocs.
7473 (elf_bfd_final_link): Properly free internal relocs.
7474 (elf_link_check_versioned_symbol): Use bfd_elf_get_elf_syms.
7475 (elf_link_input_bfd): Likewise.
7476 (elf_gc_mark): Likewise. Properly free internal relocs.
7477 (elf_gc_sweep): Properly free internal relocs.
7478 (elf_reloc_symbol_deleted_p): No need to swap syms in.
7479 (elf_bfd_discard_info): Use bfd_elf_get_elf_syms. Properly free
7480 internal relocs.
7481 * elf-m10200.c (mn10200_elf_relax_section): Use bfd_elf_get_elf_syms.
7482 Properly free possibly cached info.
7483 (mn10200_elf_relax_delete_bytes): Remove symbol swapping code.
7484 (mn10200_elf_symbol_address_p): Pass in internal syms. Remove
7485 symbol swapping code.
7486 (mn10200_elf_get_relocated_section_contents): Use bfd_elf_get_elf_syms.
7487 Properly free possibly cached info.
7488 * elf-m10300.c (mn10300_elf_relax_section): As above for elf-m10200.c.
7489 (mn10300_elf_relax_delete_bytes): Likewise.
7490 (mn10300_elf_symbol_address_p): Likewise.
7491 (mn10300_elf_get_relocated_section_contents): Likewise.
7492 * elf32-h8300.c (elf32_h8_relax_section): As above for elf-m10200.c.
7493 (elf32_h8_relax_delete_bytes): Likewise.
7494 (elf32_h8_symbol_address_p): Likewise.
7495 (elf32_h8_get_relocated_section_contents): Likewise.
7496 * elf32-m32r.c (m32r_elf_relax_section): As above for elf-m10200.c.
7497 (m32r_elf_relax_delete_bytes): Likewise.
7498 (m32r_elf_get_relocated_section_contents): Likewise.
7499 * elf32-sh.c (sh_elf_reloc_loop): Free section contents using
7500 elf_section_data to determine whether cached.
7501 (sh_elf_relax_section): As above for elf-m10200.c.
7502 (sh_elf_relax_delete_bytes): Likewise.
7503 (sh_elf_get_relocated_section_contents): Likewise.
7504 * elf32-xstormy16.c (xstormy16_elf_relax_section): As above.
7505 * elf64-alpha.c (elf64_alpha_relax_section): As above. Also delay
7506 reading of local syms.
7507 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
7508 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): As above.
7509 * elfxx-ia64.c (elfNN_ia64_relax_section): As above.
7510 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Properly free internal
7511 relocs.
7512 * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Properly
7513 free internal relocs and section contents. Don't read symbols.
7514 * elf32-hppa.c (get_local_syms): Use bfd_elf_get_elf_syms.
7515 (elf32_hppa_size_stubs): Don't free local syms.
7516 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Delay
7517 reading of local syms. Use bfd_elf_get_elf_syms. Properly free
7518 possibly cached info.
7519 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
7520 * elf64-hppa.c (elf64_hppa_check_relocs): Use bfd_elf_get_elf_syms.
7521 * elf64-ppc.c (struct ppc_link_hash_table): Delete bfd_count and
7522 all_local_syms.
7523 (get_local_syms): Delete function.
7524 (edit_opd): Use bfd_elf_get_elf_syms. Free on error exit. Cache
7525 on exit.
7526 (ppc64_elf_size_stubs): Use bfd_elf_get_elf_syms. Free/cache on exit.
7527
7528 2002-07-05 Jim Wilson <wilson@redhat.com>
7529
7530 * syms.c (decode_section_type): New.
7531 (bfd_decode_symclass): Call decode_section_type.
7532
7533 2002-07-04 Jakub Jelinek <jakub@redhat.com>
7534
7535 * merge.c (_bfd_merged_section_offset): Avoid accessing byte before
7536 section content start.
7537 Reported by Michael Schumacher <mike@hightec-rt.com>.
7538
7539 2002-07-04 Alan Modra <amodra@bigpond.net.au>
7540
7541 * section.c (_bfd_strip_section_from_output): Remove unnecessary
7542 link order code. Don't actually remove the output section here;
7543 Just set a flag for the linker to do so.
7544 * elflink.c (_bfd_elf_link_renumber_dynsyms): Test for removed
7545 sections when setting up output section dynsyms.
7546
7547 2002-07-04 Alan Modra <amodra@bigpond.net.au>
7548
7549 * elflink.h (elf_link_add_object_symbols): Revert 1999-09-02 hpux
7550 fudge.
7551 * elf.c (bfd_section_from_shdr): Work around broken hpux shared
7552 libs here instead.
7553
7554 2002-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
7555
7556 * elf64-s390.c (create_got_section): Set .got section alignment to
7557 8 bytes.
7558 (elf_s390_check_relocs): Set .rela.dyn section alignment to 8 bytes.
7559
7560 2002-07-02 Alan Modra <amodra@bigpond.net.au>
7561
7562 * elf.c (_bfd_elf_reloc_type_class): Fix comment grammar.
7563
7564 2002-07-01 Matt Thomas <matt@3am-software.com>
7565
7566 * elf32-vax.c (elf32_vax_print_private_bfd_data): Change EF_*
7567 to EF_VAX_*.
7568
7569 2002-07-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7570
7571 * elfxx-mips.c (ABI_64_P): Fix comment.
7572 (MIPS_ELF_OPTIONS_SECTION_NAME,MIPS_ELF_STUB_SECTION_NAME): Use the
7573 new section names for N64 ABI.
7574 (mips_elf_output_extsym): No special _gp_disp handling for NewABI.
7575 (mips_elf_calculate_relocation): Code formatting.
7576 (mips_elf_create_dynamic_relocation): Likewise.
7577 (_bfd_mips_elf_fake_sections): IRIX6 needs this hack, too.
7578 (_bfd_mips_elf_size_dynamic_sections): Handle GOT_PAGE for any NewABI.
7579 (_bfd_mips_elf_relocate_section): No special handling for R_MIPS_64
7580 in any NewABI.
7581 (_bfd_mips_elf_finish_dynamic_symbol): No special _gp_disp handling
7582 for NewABI.
7583 (_bfd_mips_elf_modify_segment_map): Handle any N64 ABI.
7584 (_bfd_mips_elf_gc_sweep_hook): NewABI GOT relocs should be handled
7585 here, too.
7586
7587 2002-07-01 Andreas Schwab <schwab@suse.de>
7588
7589 * elf64-x86-64.c (elf64_x86_64_relocate_section): Only convert
7590 R_X86_64_64 to R_X86_64_RELATIVE.
7591
7592 2002-07-01 John David Anglin <dave@hiauly1.hia.nrc.ca>
7593
7594 * vaxbsd.c: New BFD backend for VAX BSD and Ultrix.
7595 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Add new backend.
7596 Run "make dep-am".
7597 * config.bfd (vax-*-bsd* | vax-*-ultrix*): Use vaxbsd_vec instead of
7598 host_aout_vec.
7599 * configure.in (vaxbsd_vec): Add.
7600 * targets.c (vaxbsd_vec): Add.
7601 * Makefile.in: Rebuild.
7602 * configure: Rebuild.
7603 * po/SRC-POTFILES.in: Rebuild.
7604
7605 2002-07-01 Alan Modra <amodra@bigpond.net.au>
7606
7607 * elflink.h (elf_gc_mark): Pass in the section whose relocs we are
7608 examining to gc_mark_hook, rather than the bfd.
7609 (elf_gc_sections): Adjust.
7610 * elf-bfd.h (struct elf_backend_data <gc_mark_hook>): Likewise.
7611 * elf-m10300.c (mn10300_elf_gc_mark_hook): Likewise.
7612 * elf32-arm.h (elf32_arm_gc_mark_hook): Likewise.
7613 * elf32-avr.c (elf32_avr_gc_mark_hook): Likewise.
7614 * elf32-cris.c (cris_elf_gc_mark_hook): Likewise.
7615 * elf32-d10v.c (elf32_d10v_gc_mark_hook): Likewise.
7616 * elf32-fr30.c (fr30_elf_gc_mark_hook): Likewise.
7617 * elf32-hppa.c (elf32_hppa_gc_mark_hook): Likewise.
7618 * elf32-i386.c (elf_i386_gc_mark_hook): Likewise.
7619 * elf32-m32r.c (m32r_elf_gc_mark_hook): Likewise.
7620 * elf32-m68k.c (elf_m68k_gc_mark_hook): Likewise.
7621 * elf32-mcore.c (mcore_elf_gc_mark_hook): Likewise.
7622 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Likewise.
7623 * elf32-ppc.c (ppc_elf_gc_mark_hook): Likewise.
7624 * elf32-s390.c (elf_s390_gc_mark_hook): Likewise.
7625 * elf32-sh.c (sh_elf_gc_mark_hook): Likewise.
7626 * elf32-sparc.c (elf32_sparc_gc_mark_hook): Likewise.
7627 * elf32-v850.c (v850_elf_gc_mark_hook): Likewise.
7628 * elf32-vax.c (elf_vax_gc_mark_hook): Likewise.
7629 * elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Likewise.
7630 * elf64-mmix.c (mmix_elf_gc_mark_hook): Likewise.
7631 * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
7632 * elf64-s390.c (elf_s390_gc_mark_hook): Likewise.
7633 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
7634 * elfxx-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise.
7635 * elfxx-mips.h (_bfd_mips_elf_gc_mark_hook): Likewise.
7636 * elf64-x86-64.c (elf64_x86_64_gc_mark_hook): Likewise.
7637 * elf32-frv.c (elf32_frv_gc_mark_hook): Likewise. Also remove
7638 redundant local sym tests.
7639 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_entry.
7640 (link_hash_newfunc): Init is_entry.
7641 (ppc64_elf_copy_indirect_symbol): Copy is_entry.
7642 (ppc64_elf_link_hash_table_create): Init all_local_syms.
7643 (create_linkage_sections): Use bfd_make_section_anyway rather than
7644 bfd_make_section.
7645 (ppc64_elf_mark_entry_syms): New function.
7646 (ppc64_elf_check_relocs): Don't bother testing elf_bad_symtab. Set
7647 up opd entry to function section map.
7648 (ppc64_elf_gc_mark_hook): Special case opd section relocs, and
7649 relocs that reference the opd section.
7650 (edit_opd): New function.
7651 (ppc64_elf_size_dynamic_sections): Call get_local_syms and edit_opd.
7652 (ppc64_elf_setup_section_lists): Don't calculate htab->bfd_count here.
7653 (get_local_syms): Do so here. Exit if we already have local syms.
7654 Remove bogus comment imported from elf32-hppa.c. Don't attempt to
7655 read local syms on non-ELF input.
7656 (ppc64_elf_size_stubs): Call _bfd_elf64_link_read_relocs rather
7657 than duplicating it's function here. Adjust free of internal
7658 relocs to suit.
7659 (ppc64_elf_relocate_section): Adjust local syms in opd section.
7660 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Declare.
7661 * elf32-hppa.c (elf32_hppa_size_stubs): Call
7662 _bfd_elf32_link_read_relocs rather than duplicating it's function
7663 here. Adjust free of internal relocs to suit.
7664
7665 2002-07-01 Andreas Jaeger <aj@suse.de>
7666
7667 * elf64-x86-64.c (elf64_x86_64_check_relocs): Certain relocations
7668 are not allowed in shared libs code, enforce -fPIC.
7669
7670 2002-06-29 Hans-Peter Nilsson <hp@bitrange.com>
7671
7672 * mmo.c (mmo_write_loc_chunk): Don't eliminate leading and
7673 trailing zero-sequences when there's previous left-over data.
7674
7675 2002-06-27 John David Anglin <dave@hiauly1.hia.nrc.ca>
7676
7677 * elf64-hppa.c (elf64_hppa_reloc_type_class): New function.
7678 (elf64_hppa_finish_dynamic_sections): Check other_rel_sec, dlt_rel_sec
7679 and opd_rel_sec in order for starting rela section. Check _raw_size.
7680 (elf_backend_reloc_type_class): Define.
7681
7682 2002-06-27 Kevin Buettner <kevinb@redhat.com>
7683
7684 * dwarf2.c (decode_line_info): Handle older, non-standard, 64-bit
7685 DWARF2 formats.
7686
7687 2002-06-27 Alan Modra <amodra@bigpond.net.au>
7688
7689 * cpu-powerpc.c: Comment on ordering of arch_info.
7690 * elf32-ppc.c (ppc_elf_object_p): New function.
7691 (elf_backend_object_p): Define.
7692 * elf64-ppc.c (ppc64_elf_object_p): New function.
7693 (elf_backend_object_p): Define.
7694
7695 2002-06-26 Jason Thorpe <thorpej@wasabisystems.com>
7696
7697 * configure.in (vax-*-netbsd*): Set COREFILE to netbsd-core.lo.
7698 * configure: Regenerate.
7699
7700 2002-06-25 Jason Eckhardt <jle@rice.edu>
7701
7702 * dwarf2.c (decode_line_info): Check unit->addr_size
7703 to read in the proper number of prologue bytes.
7704
7705 2002-06-25 Nick Clifton <nickc@cambridge.redhat.com>
7706
7707 * config.bfd (powerpc-*-aix5*): Only create a selvecs for
7708 aix5coff64_vec if 64-bit bfd support has been enabled.
7709 (powerpc64-*-aix5*): Only define if 64-bit bfd support has
7710 been enabled.
7711
7712 * targets.c (_bfd_target_vector[]): Only include
7713 aix5coff64_vec if 64-bit bfd support has been enabled.
7714
7715 2002-06-25 Alan Modra <amodra@bigpond.net.au>
7716
7717 * elf64-ppc.c (ppc_add_stub): Replace strcpy/strncpy with memcpy.
7718 * elf32-hppa.c (hppa_add_stub): Likewise.
7719 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
7720 * elflink.h (elf_add_default_symbol): Fix comment typo.
7721 (elf_add_default_symbol): Replace strcpy and strncpy with memcpy.
7722 (elf_link_add_object_symbols): Likewise.
7723 (elf_link_assign_sym_version): Likewise.
7724 * hash.c (bfd_hash_lookup): Likewise.
7725 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
7726 * section.c (bfd_get_unique_section_name): Likewise.
7727 * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
7728 * elf.c (_bfd_elf_make_section_from_phdr): Likewise.
7729 (assign_section_numbers): Likewise.
7730 (_bfd_elfcore_make_pseudosection): Likewise.
7731 (elfcore_grok_lwpstatus): Likewise.
7732 (elfcore_grok_win32pstatus): Likewise.
7733 (elfcore_write_note): Constify input params. Use PTR instead of
7734 void *. Include terminating NUL in namesz. Correct padding.
7735 Support NULL "name" param. Use memcpy instead of strcpy.
7736 (elfcore_write_prpsinfo): Constify input params.
7737 (elfcore_write_prstatus): Likewise. Use PTR instead of void *.
7738 (elfcore_write_lwpstatus): Likewise.
7739 (elfcore_write_pstatus): Likewise.
7740 (elfcore_write_prfpreg): Likewise.
7741 (elfcore_write_prxfpreg): Likewise.
7742 * elf-bfd.h (elfcore_write_note): Update declaration.
7743 (elfcore_write_prpsinfo): Likewise.
7744 (elfcore_write_prstatus): Likewise.
7745 (elfcore_write_pstatus): Likewise.
7746 (elfcore_write_prfpreg): Likewise.
7747 (elfcore_write_prxfpreg): Likewise.
7748 (elfcore_write_lwpstatus): Likewise.
7749
7750 2002-06-25 Jason Eckhardt <jle@rice.edu>
7751
7752 * ecoff.c (ecoff_set_symbol_info): Set BSF_FUNCTION for
7753 symbols of type stProc and stStaticProc.
7754
7755 2002-06-25 Nick Clifton <nickc@redhat.com>
7756
7757 * ecoff.c: VArious formatting fixes.
7758
7759 2002-06-25 Alan Modra <amodra@bigpond.net.au>
7760
7761 * coff-rs6000.c (xcoff_generate_rtinit): Fix typo.
7762
7763 2002-06-25 Alan Modra <amodra@bigpond.net.au>
7764
7765 * aout-adobe.c: Don't compare against "true" or "false.
7766 * aout-target.h: Likewise.
7767 * aoutx.h: Likewise.
7768 * archive.c: Likewise.
7769 * bout.c: Likewise.
7770 * cache.c: Likewise.
7771 * coff-a29k.c: Likewise.
7772 * coff-alpha.c: Likewise.
7773 * coff-i386.c: Likewise.
7774 * coff-mips.c: Likewise.
7775 * coff-or32.c: Likewise.
7776 * coff64-rs6000.c: Likewise.
7777 * coffcode.h: Likewise.
7778 * coffgen.c: Likewise.
7779 * cpu-ns32k.c: Likewise.
7780 * ecoff.c: Likewise.
7781 * ecofflink.c: Likewise.
7782 * elf.c: Likewise.
7783 * elf32-arm.h: Likewise.
7784 * elf32-cris.c: Likewise.
7785 * elf32-d30v.c: Likewise.
7786 * elf32-i386.c: Likewise.
7787 * elf32-mcore.c: Likewise.
7788 * elf32-ppc.c: Likewise.
7789 * elf32-sh.c: Likewise.
7790 * elf32-sh64.c: Likewise.
7791 * elf32-v850.c: Likewise.
7792 * elf64-alpha.c: Likewise.
7793 * elf64-sh64.c: Likewise.
7794 * elfcode.h: Likewise.
7795 * elfcore.h: Likewise.
7796 * elflink.h: Likewise.
7797 * elfxx-mips.c: Likewise.
7798 * i386os9k.c: Likewise.
7799 * ieee.c: Likewise.
7800 * libbfd.c: Likewise.
7801 * linker.c: Likewise.
7802 * mmo.c: Likewise.
7803 * nlm32-alpha.c: Likewise.
7804 * nlm32-i386.c: Likewise.
7805 * nlm32-ppc.c: Likewise.
7806 * nlm32-sparc.c: Likewise.
7807 * nlmcode.h: Likewise.
7808 * oasys.c: Likewise.
7809 * pdp11.c: Likewise.
7810 * peicode.h: Likewise.
7811 * reloc.c: Likewise.
7812 * som.c: Likewise.
7813 * srec.c: Likewise.
7814 * tekhex.c: Likewise.
7815 * vms.c: Likewise.
7816 * xcofflink.c: Likewise.
7817 * elf64-sparc.c: Edit comment to not use "== false".
7818
7819 * aoutf1.h: Don't use "? true : false".
7820 * ecoff.c: Likewise.
7821 * format.c: Likewise.
7822 * ieee.c: Likewise.
7823 * linker.c: Likewise.
7824 * mmo.c: Likewise.
7825 * oasys.c: Likewise.
7826
7827 2002-06-23 H.J. Lu <hjl@gnu.org>
7828
7829 * elflink.h (elf_link_add_archive_symbols): For the default
7830 version, check references with only one `@' first.
7831
7832 2002-06-23 John David Anglin <dave@hiauly1.hia.nrc.ca>
7833
7834 * elf64-hppa.c (elf64_hppa_mark_milli_and_exported_functions): New
7835 function.
7836 (allocate_global_data_dlt): Don't add millicode symbols to dynamic
7837 symbol table.
7838 (allocate_global_data_opd, allocate_dynrel_entries): Likewise.
7839 (elf64_hppa_size_dynamic_sections): Revise to use
7840 elf64_hppa_mark_milli_and_exported_functions.
7841 (elf64_hppa_finish_dynamic_symbol): Remove code to keep millicode
7842 symbols out of dynamic symbol table.
7843
7844 2002-06-23 Alan Modra <amodra@bigpond.net.au>
7845
7846 * Makefile.in: Regenerate.
7847 * libbfd.h: Regenerate.
7848 * bfd-in2.h: Regenerate.
7849 * configure: Regenerate.
7850 * po/SRC-POTFILES.in: Regenerate.
7851
7852 * elflink.h: Comment typo fixes.
7853
7854 2002-06-23 H.J. Lu <hjl@gnu.org>
7855
7856 * elf-bfd.h (elf_link_loaded_list): New structure.
7857 (elf_link_hash_table): Add "loaded".
7858 * elf.c (_bfd_elf_link_hash_table_init): Initialize "loaded".
7859 * elflink.h (elf_link_check_versioned_symbol): New function.
7860 (elf_link_output_extsym): Call elf_link_check_versioned_symbol.
7861
7862 2002-06-19 Nick Clifton <nickc@cambridge.redhat.com>
7863
7864 * elflink.h (size_dynamic_sections): If the target does not
7865 support an ELF style hash table, return true, indicating that
7866 nothing needed to be done, rather than false, indicating that the
7867 section's size could not be computed.
7868
7869 2002-06-18 Dave Brolley <brolley@redhat.com>
7870
7871 From Catherine Moore, Michael Meissner, Dave Brolley:
7872 * po/SRC-POTFILES.in: Add cpu-frv.c and elf32-frv.c
7873 * targets.c: Support bfd_elf32_frv_vec.
7874 * reloc.c: Add FRV relocs.
7875 * configure.in: Add support for bfd-elf32-frv-vec.
7876 * config.bfd (targ_cpu): Add support for frv-*-elf.
7877 * archures.c: Add frv arch and machines.
7878 * Makefile.am (ALL_MACHINES): Add cpu-frv.lo.
7879 (ALL_MACHINES_CFILES): Add cpu-frv.c.
7880 (BFD32_BACKENDS): Add elf32-frv.lo.
7881 (BFD32_BACKENDS_CFILES): Add elf32-frv.c
7882 (cpu-frv.lo): New target.
7883 (elf32-frv.lo): New target.
7884 * cpu-frv.c: New file.
7885 * elf32-frv.c: New file.
7886
7887 2002-06-18 Jakub Jelinek <jakub@redhat.com>
7888
7889 * elfcode.h (elf_object_p): Sanity check eh_shoff == 0 implies
7890 e_shnum == 0.
7891 Only read the first section header if e_shoff is non-zero.
7892 Don't consider e_shstrndx if there are no sections.
7893
7894 2002-06-17 Tom Rix <trix@redhat.com>
7895
7896 * elf32-d10v.c (elf_d10v_howto_table): Change R_D10V_10_PCREL_R,
7897 R_D10V_10_PCREL_L and R_D10V_18_PCREL to use
7898 complain_overflow_bitfield.
7899
7900 2002-06-17 Alan Modra <amodra@bigpond.net.au>
7901
7902 * opncls.c (bfd_openr): Remove redundant bfd_set_error.
7903 (bfd_fdopenr): Likewise.
7904 (bfd_openstreamr): Likewise.
7905 (bfd_openw): Likewise.
7906
7907 * targets.c: Sort target vecs.
7908 (_bfd_target_vector): Add aix5coff64_vec, bfd_elf32_sh64_vec,
7909 bfd_elf32_sh64l_vec, bfd_elf32_sh64lnbsd_vec,
7910 bfd_elf32_sh64nbsd_vec, bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec,
7911 bfd_elf64_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec.
7912 * configure.in: Sort target vecs. Add m88kmach3_vec.
7913 * configure: Regenerate.
7914
7915 2002-06-16 Hans-Peter Nilsson <hp@bitrange.com>
7916
7917 * elf64-mmix.c (bpo_reloc_request_sort_fn): Use member
7918 bpo_reloc_no to break sort order ties, not address of items.
7919
7920 2002-06-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
7921
7922 * elf-hppa.h (elf_hppa_final_link): Fix formatting in comment.
7923 Skip excluded sections in determing __gp value.
7924 (elf_hppa_final_link_relocate): Use the symbol's address in
7925 R_PARISC_FPTR64 relocations that don't need an opd entry.
7926 * elf64-hppa.c (allocate_dynrel_entries): Simplify code.
7927 (elf64_hppa_finalize_dynreloc): Likewise.
7928 (elf64_hppa_size_dynamic_sections): Move comments and fix typo.
7929 (elf64_hppa_finish_dynamic_symbol): Break up assert.
7930
7931 2002-06-14 Sergey Grigoriev <serge@leopold.Physik.Uni-Augsburg.DE>
7932
7933 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
7934 alignment for .bss, .data and .text sections so that sse and sse2
7935 code will work.
7936 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
7937
7938 2002-06013 J"orn Rennecke <joern.rennecke@superh.com>
7939
7940 config.bfd: Add support for sh[1234]l*-*-elf* | sh3el*-*-elf*,
7941 sh[1234]*-elf*.
7942
7943 2002-06-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
7944
7945 * elflink.h (elf_bfd_final_link): Improve error handling for missing
7946 dynamic sections.
7947
7948 * elf64-hppa.c (allocate_global_data_opd): We don't need an opd entry
7949 for a symbol that has no output section.
7950 (allocate_dynrel_entries): Correct comment.
7951 (elf64_hppa_finalize_dynreloc): Likewise. Don't create an opd entry
7952 unless we want one.
7953 (elf64_hppa_finalize_opd): Prevent segfault if dyn_h is NULL.
7954 (elf64_hppa_finalize_dlt): Likewise. Prevent segfault for symbols
7955 with no section. Remove unnecessary parentheses.
7956
7957 2002-06-11 Tom Rix <trix@redhat.com>
7958
7959 * coffcode.h (coff_compute_section_file_positions): Add data
7960 section to AIX loader alignment check.
7961
7962 * coff-rs6000.c (_bfd_xcoff_mkobject): Set default text section
7963 alignment to 4 bytes.
7964 (_bfd_xcoff_copy_private_bfd_data): Use text and data alignment
7965 power accessor macro.
7966 (do_shared_object_padding): Remove invalid assertion.
7967
7968 2002-06-10 Richard Sandiford <rsandifo@redhat.com>
7969
7970 * section.c (_bfd_strip_section_from_output): Set SEC_EXCLUDE
7971 for removed output sections.
7972
7973 2002-06-10 Geoffrey Keating <geoffk@redhat.com>
7974
7975 * merge.c (merge_strings): Use htab_create_alloc with calloc, not
7976 htab_alloc.
7977 * elf-strtab.c (_bfd_elf_strtab_finalize): Likewise.
7978
7979 2002-06-08 H.J. Lu <hjl@gnu.org>
7980
7981 * elf.c (copy_private_bfd_data): Don't cast to bfd_size_type to
7982 work around a long long bug in gcc 2.96 on mips.
7983
7984 2002-06-08 Jason Thorpe <thorpej@wasabisystems.com>
7985
7986 * Makefile.am (BFD32_BACKENDS): Add vax1knetbsd.lo.
7987 (BFD32_BACKENDS_CFILES): Add vax1knetbsd.c.
7988 Regenerate dependency lists.
7989 * Makefile.in: Regenerate.
7990 * config.bfd (vax-*-netbsdelf*, vax-*-netbsdaout*): Add
7991 vax1knetbsd_vec to targ_selvecs.
7992 * configure.in: Add vax1knetbsd_vec.
7993 * configure: Regenerate.
7994 * targets.c (_bfd_target_vector): Add vax1knetbsd_vec.
7995 * vax1knetbsd.c: New file.
7996 * vaxnetbsd.c: Update copyright years.
7997 (TARGET_PAGE_SIZE): Set to 0x1000.
7998 (DEFAULT_MID): Set to M_VAX4K_NETBSD.
7999
8000 2002-06-08 Matt Thomas <matt@3am-software.com>
8001
8002 * libaout.h (enum machine_type): Add M_VAX4K_NETBSD.
8003
8004 2002-06-08 Alan Modra <amodra@bigpond.net.au>
8005
8006 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Make static.
8007
8008 2002-06-08 Alan Modra <amodra@bigpond.net.au>
8009
8010 * Makefile.am: Run "make dep-am".
8011 * Makefile.in: Regenerate.
8012
8013 * armnetbsd.c: Replace CONST with const.
8014 * corefile.c: Likewise.
8015 * elf32-dlx.c: Likewise.
8016 * elf64-mips.c: Likewise.
8017 * mmo.c: Likewise.
8018 * ns32knetbsd.c: Likewise.
8019
8020 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Check the hash
8021 table is elf64-sparc.
8022
8023 2002-06-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8024
8025 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Simplify code.
8026 Fix RELA addends to get not shifted in the result. Don't do special
8027 handling of R_MIPS_64 for NewABI.
8028
8029 2002-06-07 Alan Modra <amodra@bigpond.net.au>
8030
8031 * aoutx.h (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
8032 (NAME(aout,slurp_reloc_table)): Likewise.
8033 * coff-mips.c (mips_relax_section): Use bfd_zalloc.
8034 * coff-rs6000.c (xcoff_write_armap_big): Use bfd_zmalloc.
8035 (xcoff_write_archive_contents_big): Likewise.
8036 (xcoff_generate_rtinit): Likewise.
8037 (xcoff_generate_rtinit): Likewise, and check error return.
8038 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
8039 * coffgen.c (coff_section_symbol): Use bfd_zalloc.
8040 (coff_get_normalized_symtab): Likewise.
8041 (coff_make_empty_symbol): Likewise.
8042 (bfd_coff_set_symbol_class): Likewise.
8043 * cofflink.c (coff_link_add_symbols): Likewise.
8044 * ecoff.c (_bfd_ecoff_make_empty_symbol): Likewise.
8045 * ecofflink.c (ecoff_write_shuffle): Use bfd_zmalloc.
8046 (bfd_ecoff_write_accumulated_debug): Likewise.
8047 * elf64-alpha.c (get_got_entry): Use bfd_zalloc.
8048 * i386linux.c (bfd_i386linux_size_dynamic_sections): Likewise.
8049 * i386lynx.c (NAME(lynx,slurp_reloc_table)): Use bfd_zmalloc.
8050 * ieee.c (do_with_relocs): Use bfd_zalloc.
8051 * m68klinux.c (bfd_m68klinux_size_dynamic_sections): Likewise.
8052 * pdp11.c (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
8053 (NAME(aout,slurp_reloc_table)): Likewise.
8054 (NAME(aout,squirt_out_relocs)): Don't memset when zalloc'd.
8055 * reloc16.c (bfd_coff_reloc16_relax_section): Use bfd_zmalloc.
8056 * som.c (som_build_and_write_symbol_table): Likewise.
8057 (som_slurp_string_table): Likewise.
8058 (som_slurp_symbol_table): Likewise.
8059 (som_bfd_ar_write_symbol_stuff): Likewise.
8060 * sparclinux.c (bfd_sparclinux_size_dynamic_sections): Use bfd_zalloc.
8061 * sunos.c (bfd_sunos_size_dynamic_sections): Likewise.
8062 * tekhex.c (find_chunk): Likewise. Get rid of unused "sname".
8063 * vms-gsd.c (_bfd_vms_slurp_gsd): Use bfd_zmalloc.
8064 * xcofflink.c (xcoff_link_add_symbols): Use bfd_zalloc/bfd_zmalloc.
8065
8066 2002-06-07 Alan Modra <amodra@bigpond.net.au>
8067
8068 * elf-bfd.h (struct bfd_elf_section_data <group_name>): Replace with
8069 "group" union.
8070 (elf_group_name): Update.
8071 (elf_group_id): Define.
8072 (bfd_elf_set_group_contents): Declare.
8073 * elf.c (elf_fake_sections): Qualify use of elf_group_name.
8074 (set_group_contents): Rename to bfd_elf_set_group_contents. Remove
8075 ATTRIBUTE_UNUSED from failedptrarg. If elf_group_id is set, use
8076 that sym for the signature.
8077 (_bfd_elf_compute_section_file_positions): Don't call
8078 set_group_contents for "ld -r" case.
8079 (swap_out_syms): Use bfd_zalloc.
8080 * elflink.h (elf_link_add_archive_symbols): Likewise.
8081 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
8082 (elf_bfd_final_link): Call bfd_elf_set_group_contents.
8083
8084 2002-06-07 Alan Modra <amodra@bigpond.net.au>
8085
8086 * elf64-ppc.c (ppc64_elf_relocate_section): Allow unresolved
8087 relocs in opd for non-shared too.
8088
8089 2002-06-06 Jeffrey Law <law@redhat.com>
8090
8091 * elf32-h8300.c (elf32_h8_relax_section): Ignore uninteresting
8092 relocations.
8093
8094 2002-06-06 Nick Clifton <nickc@cambridge.redhat.com>
8095
8096 * merge.c: Include libiberty.h.
8097 * elf-strtab.c: Include libiberty.h.
8098
8099 2002-06-06 Elias Athanasopoulos <eathan@otenet.gr>
8100
8101 * peXXigen.c (pe_print_idata): Remove unused variable.
8102
8103 2002-06-06 David Heine <dlheine@tensilica.com>
8104
8105 * elf.c (assign_file_positions_for_segments): Remove unallocated
8106 sections from the section to segment mapping for PT_LOAD segments.
8107 Update comment about empty loadable segments.
8108
8109 2002-06-06 Richard Sandiford <rsandifo@redhat.com>
8110
8111 * stabs.c (_bfd_link_section_stabs): Check that the symbol offset
8112 is within the .stabstr section.
8113
8114 2002-06-06 Alan Modra <amodra@bigpond.net.au>
8115
8116 * elf-bfd.h (struct elf_size_info <swap_symbol_in>): Function args
8117 are "const PTR", not "const PTR *".
8118 (bfd_elf32_swap_symbol_in): Likewise.
8119 (bfd_elf64_swap_symbol_in): Likewise.
8120 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR.
8121 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
8122 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
8123 (elf_link_add_object_symbols): Likewise.
8124 (elf_link_record_local_dynamic_symbol): Likewise.
8125 (elf_link_input_bfd): Likewise.
8126 (elf_gc_mark): Likewise.
8127 (elf_reloc_symbol_deleted_p): Likewise.
8128 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
8129 (mn10200_elf_relax_delete_bytes): Likewise.
8130 (mn10200_elf_symbol_address_p): Likewise.
8131 (mn10200_elf_get_relocated_section_contents): Likewise.
8132 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
8133 (mn10300_elf_relax_section): Likewise.
8134 (mn10300_elf_relax_delete_bytes): Likewise.
8135 (mn10300_elf_symbol_address_p): Likewise.
8136 (mn10300_elf_get_relocated_section_contents): Likewise.
8137 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
8138 (elf32_h8_relax_delete_bytes): Likewise.
8139 (elf32_h8_symbol_address_p): Likewise.
8140 (elf32_h8_get_relocated_section_contents): Likewise.
8141 * elf32-hppa.c (get_local_syms): Likewise.
8142 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
8143 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
8144 * elf32-sh.c (sh_elf_relax_section): Likewise.
8145 (sh_elf_relax_delete_bytes): Likewise.
8146 (sh_elf_get_relocated_section_contents): Likewise.
8147 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
8148 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
8149 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
8150 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
8151 * elf64-ppc.c (get_local_syms): Likewise.
8152 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
8153 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
8154
8155 2002-06-05 J"orn Rennecke <joern.rennecke@superh.com>
8156
8157 * config.bfd (sh64l*-*-elf*, shl*-*-elf*): New configurations.
8158
8159 2002-06-05 Alan Modra <amodra@bigpond.net.au>
8160
8161 * elf.c (group_signature): Swap in the whole symbol, and handle
8162 extracting section symbol names.
8163 (setup_group): Add comment.
8164 (set_group_contents): When called from objcopy or ld, arrange for
8165 section contents to be written. Write group member output section
8166 indices to allow objcopy to reorganize sections.
8167 (_bfd_elf_copy_private_section_data): Copy group info.
8168
8169 * elf-bfd.h (struct elf_size_info): Add swap_symbol_in field.
8170 (bfd_elf32_swap_symbol_in): Update prototype.
8171 (bfd_elf64_swap_symbol_in): Likewise.
8172 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR *.
8173 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
8174 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
8175 (elf_link_add_object_symbols): Likewise.
8176 (elf_link_record_local_dynamic_symbol): Likewise.
8177 (elf_link_input_bfd): Likewise.
8178 (elf_gc_mark): Likewise.
8179 (elf_reloc_symbol_deleted_p): Likewise.
8180 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
8181 (mn10200_elf_relax_delete_bytes): Likewise.
8182 (mn10200_elf_symbol_address_p): Likewise.
8183 (mn10200_elf_get_relocated_section_contents): Likewise.
8184 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
8185 (mn10300_elf_relax_section): Likewise.
8186 (mn10300_elf_relax_delete_bytes): Likewise.
8187 (mn10300_elf_symbol_address_p): Likewise.
8188 (mn10300_elf_get_relocated_section_contents): Likewise.
8189 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
8190 (elf32_h8_relax_delete_bytes): Likewise.
8191 (elf32_h8_symbol_address_p): Likewise.
8192 (elf32_h8_get_relocated_section_contents): Likewise.
8193 * elf32-hppa.c (get_local_syms): Likewise.
8194 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
8195 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
8196 * elf32-sh.c (sh_elf_relax_section): Likewise.
8197 (sh_elf_relax_delete_bytes): Likewise.
8198 (sh_elf_get_relocated_section_contents): Likewise.
8199 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
8200 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
8201 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
8202 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
8203 * elf64-ppc.c (get_local_syms): Likewise.
8204 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
8205 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
8206 * elfcode.h (NAME(_bfd_elf,size_info)): Update initialiser.
8207 * elf64-alpha.c (alpha_elf_size_info): Likewise.
8208 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
8209 * elf64-mips.c (mips_elf64_size_info): Likewise.
8210 * elf64-s390.c (s390_elf64_size_info): Likewise.
8211 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
8212
8213 2002-06-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
8214
8215 * elf32-mips.c (elf32_mips_ignore_discarded_relocs): Move to...
8216 elfxx-mips.c (_bfd_mips_elf_ignore_discarded_relocs): ... here.
8217 elf64-mips.c (elf_backend_ignore_discarded_relocs): Use
8218 _bfd_mips_elf_ignore_discarded_relocs.
8219 elfxx-mips.h (_bfd_mips_elf_ignore_discarded_relocs): Declare.
8220
8221 2002-06-05 H.J. Lu <hjl@gnu.org>
8222
8223 * elfxx-mips.c (mips_elf_calculate_relocation): Call
8224 _bfd_elf_rel_local_sym for STT_SECTION relocations against
8225 the SEC_MERGE section.
8226
8227 2002-06-05 Alan Modra <amodra@bigpond.net.au>
8228
8229 * coff-alpha.c: Update copyright date.
8230 * coff-mips.c: Likewise.
8231 * xcoff-target.h: Likewise.
8232
8233 * bfd-in.h: Remove "taken from the source" comment.
8234 * libbfd-in.h: Likewise.
8235 * libcoff-in.h: Likewise.
8236 * bfd-in2.h: Regenerate.
8237 * libbfd.h: Regenerate.
8238 * libcoff.h: Regenerate.
8239
8240 * elf.c (bfd_elf_discard_group): Return true.
8241 * elf-bfd.h (bfd_elf_discard_group): Declare.
8242 * bfd-in.h (bfd_elf_discard_group): Don't declare here.
8243 * section.c (bfd_discard_group): Rename to bfd_generic_discard_group.
8244 * bfd.c (bfd_discard_group): Define.
8245 * targets.c (struct bfd_target): Add _bfd_discard_group.
8246 (BFD_JUMP_TABLE_LINK): Here too.
8247 * libbfd-in.h (_bfd_nolink_bfd_discard_group): Define.
8248 * aout-adobe.c (aout_32_bfd_discard_group): Define.
8249 * aout-target.h (MY_bfd_discard_group): Define.
8250 * aout-tic30.c (MY_bfd_discard_group): Define.
8251 * binary.c (binary_bfd_discard_group): Define.
8252 * bout.c (b_out_bfd_discard_group): Define.
8253 * coff-alpha.c (_bfd_ecoff_bfd_discard_group): Define.
8254 * coffcode.h (coff_bfd_discard_group): Define.
8255 * coff-mips.c (_bfd_ecoff_bfd_discard_group): Define.
8256 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Define.
8257 * i386msdos.c (msdos_bfd_discard_group): Define.
8258 * i386os9k.c (os9k_bfd_discard_group): Define.
8259 * ieee.c (ieee_bfd_discard_group): Define.
8260 * ihex.c (ihex_bfd_discard_group): Define.
8261 * mmo.c (mmo_bfd_discard_group): Define.
8262 * nlm-target.h (nlm_bfd_discard_group): Define.
8263 * oasys.c (oasys_bfd_discard_group): Define.
8264 * ppcboot.c (ppcboot_bfd_discard_group): Define.
8265 * som.c (som_bfd_discard_group): Define.
8266 * srec.c (srec_bfd_discard_group): Define.
8267 * tekhex.c (tekhex_bfd_discard_group): Define.
8268 * versados.c (versados_bfd_discard_group): Define.
8269 * vms.c (vms_bfd_discard_group): Define.
8270 * xcoff-target.h (_bfd_xcoff_bfd_discard_group): Define.
8271 * coff64-rs6000.c (rs6000coff64_vec): Update initialiser.
8272 (aix5coff64_vec): Likewise.
8273 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Likewise.
8274
8275 2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
8276
8277 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-com.lo.
8278 (BFD32_BACKENDS_CFILES): Add elf32-sh64-com.c.
8279 (elf32-sh64-com.lo): New dependency list.
8280 * Makefile.in: Regenerate.
8281 * configure.in (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec)
8282 (bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec): Add
8283 elf32-sh64-com.lo.
8284 * configure: Regenerate.
8285 * elf32-sh64.c (sh64_address_in_cranges)
8286 (sh64_get_contents_type, sh64_address_is_shmedia): Move to...
8287 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb):
8288 (crange_bsearch_cmpl): Prepend _bfd_sh64_ to name and move to...
8289 * elf32-sh64-com.c: ...here. New file.
8290
8291 2002-06-04 Alan Modra <amodra@bigpond.net.au>
8292
8293 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Remove
8294 ATTRIBUTE_UNUSED on used params.
8295 * elf32-vax.c (elf_vax_gc_mark_hook): Remove unnecessary checks
8296 before calling bfd_section_from_elf_index on local syms.
8297 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
8298
8299 2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
8300
8301 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-nbsd.lo.
8302 (BFD32_BACKENDS_CFILES): Add elf32-sh64-nbsd.c.
8303 (BFD64_BACKENDS): Add elf64-sh64-nbsd.lo.
8304 (BFD64_BACKENDS_CFILES): Add elf64-sh64-nbsd.c.
8305 (elf32-sh64-nbsd.lo, elf64-sh64-nbsd.lo): New rules.
8306 * Makefile.in: Regenerate.
8307 * config.bfd (sh5le-*-netbsd*, sh5-*-netbsd*, sh64le-*-netbsd*)
8308 (sh64-*-netbsd*): New targets.
8309 * configure.in: Add bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec,
8310 bfd_elf64_sh64nbsd_vec, and bfd_elf64_sh64lnbsd_vec.
8311 * configure: Regenerate.
8312 * elf32-sh64-nbsd.c: New file.
8313 * elf64-sh64-nbsd.c: New file.
8314 * targets.c: Add extern decls for bfd_elf32_sh64nbsd_vec,
8315 bfd_elf32_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec, and
8316 bfd_elf64_sh64lnbsd_vec.
8317
8318 2002-06-04 Alan Modra <amodra@bigpond.net.au>
8319
8320 * elf.c (setup_group): Set SEC_LINK_ONCE on GRP_COMDAT groups.
8321 (bfd_section_from_shdr): Likewise. Set section name of group
8322 sections from signature.
8323 (group_signature): Split out from setup_group. Ensure symbol table
8324 is available.
8325 (bfd_elf_discard_group): New function.
8326 (_bfd_elf_make_section_from_shdr): Don't set SEC_LINK_ONCE on
8327 .gnu.linkonce* sections if they are members of a group.
8328 (set_group_contents): Set GRP_COMDAT flag.
8329 * section.c (bfd_discard_group): New function.
8330 * bfd-in.h (bfd_elf_discard_group): Declare.
8331 * bfd-in2.h: Regenerate.
8332 * elf-bfd.h (struct bfd_elf_section_data): Add linkonce_p field.
8333 (elf_linkonce_p): Define.
8334
8335 2002-06-04 Alan Modra <amodra@bigpond.net.au>
8336
8337 * elf.c (bfd_section_from_shdr): Make "name" const.
8338 * elf-bfd.h (elf_backend_section_from_shdr): Likewise.
8339 * elf32-i370.c (i370_elf_section_from_shdr): Likewise.
8340 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
8341 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
8342 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
8343 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
8344 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
8345 * elf64-ppc.c (ppc64_elf_section_from_shdr): Likewise.
8346 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
8347 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
8348 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
8349
8350 2002-06-03 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
8351
8352 * elfxx-mips.c (ABI_64_P): Use backend's data to determine the
8353 ABI.
8354
8355 2002-06-02 Kazu Hirata <kazu@cs.umass.edu>
8356
8357 * elf32-arc.c: Fix formatting.
8358 * elf32-arm.h: Likewise.
8359 * elf32-cris.c: Likewise.
8360 * elf32-dlx.c: Likewise.
8361 * elf32-hppa.c: Likewise.
8362 * elf32-i386.c: Likewise.
8363 * elf32-i386qnx.c: Likewise.
8364 * elf32-or32.c: Likewise.
8365 * elf32-s390.c: Likewise.
8366 * elf32-sh64.c: Likewise.
8367 * elf32-vax.c: Likewise.
8368 * elf32-xstormy16.c: Likewise.
8369 * elf64-alpha.c: Likewise.
8370 * elf64-mmix.c: Likewise.
8371 * elf64-ppc.c: Likewise.
8372 * elf64-s390.c: Likewise.
8373 * elf64-sh64.c: Likewise.
8374 * elf64-x86-64.c: Likewise.
8375
8376 2002-06-02 Richard Henderson <rth@redhat.com>
8377
8378 * elf64-alpha.c (elf64_alpha_relocate_section): Don't dereference
8379 null when there are no got entries for a symbol.
8380 (elf64_alpha_relax_find_tls_segment): Rearrange to avoid
8381 uninitialized variable warning.
8382
8383 2002-06-01 Richard Henderson <rth@redhat.com>
8384
8385 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Don't test for
8386 undefined symbols here.
8387 (elf64_alpha_relax_section): Do it here. Also test for not
8388 defined in the current module.
8389 (elf64_alpha_relocate_section_r): Split out of ...
8390 (elf64_alpha_relocate_section): ... here. Don't dereference
8391 NULL when looking up local got entries.
8392
8393 2002-06-01 Richard Henderson <rth@redhat.com>
8394
8395 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Reject undefined
8396 symbols from JSR relaxation.
8397 (elf64_alpha_size_plt_section_1): New.
8398 (elf64_alpha_calc_dynrel_sizes): Split out .rela.got bits ...
8399 (elf64_alpha_size_rela_got_1): ... here.
8400 (elf64_alpha_size_dynamic_sections): Split out .rela.got bits ...
8401 (elf64_alpha_size_rela_got_section): ... here.
8402 (elf64_alpha_size_plt_section): New.
8403 (elf64_alpha_relax_section): Call them.
8404 (elf64_alpha_size_got_sections): Remove output_bfd arg.
8405 (elf64_alpha_finish_dynamic_symbol): Check gotent use_count.
8406
8407 2002-06-01 Richard Henderson <rth@redhat.com>
8408
8409 * elf64-alpha.c (alpha_get_dtprel_base, alpha_get_tprel_base): New.
8410 (elf64_alpha_relocate_section): Use them. Reject LE TLS relocs
8411 in shared libraries. Fix DTPRELHI and TPRELHI value.
8412 (INSN_ADDQ, INSN_RDUNIQ): New.
8413 (struct alpha_relax_info): Add symtab_hdr, tls_segment, first_gotent.
8414 (elf64_alpha_relax_with_lituse): Return boolean. Remove irelend
8415 argument. Reject dynamic symbols. Use LITUSE symbolic constants.
8416 (elf64_alpha_relax_got_load): Rename from relax_without_lituse.
8417 Handle GOTDTPREL and GOTTPREL relocations.
8418 (elf64_alpha_relax_gprelhilo): New.
8419 (elf64_alpha_relax_tls_get_addr): New.
8420 (elf64_alpha_relax_find_tls_segment): New.
8421 (elf64_alpha_relax_section): Handle TLS relocations.
8422 (ALPHA_ELF_LINK_HASH_TLS_IE): New.
8423 (elf64_alpha_check_relocs): Set it.
8424
8425 2002-06-01 Richard Henderson <rth@redhat.com>
8426
8427 * elf64-alpha.c (elf64_alpha_relax_section): Don't store computed gp.
8428
8429 * elf64-alpha.c (elf64_alpha_check_relocs): Fix typo on maybe_dynamic
8430 check; don't suppress dynamic relocs for non-allocated sections.
8431
8432 * elf64-alpha.c: Remove dead code.
8433
8434 2002-05-31 Alan Modra <amodra@bigpond.net.au>
8435
8436 * bfd-in2.h: Regenerate.
8437 * libbfd.h: Regenerate.
8438 * po/SRC-POTFILES.in: Regenerate.
8439
8440 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate
8441 space for bss .plt.
8442
8443 2002-05-31 Graeme Peterson <gp@qnx.com>
8444
8445 * Makefile.am (BFD32_BACKENDS): Add elf32-i386qnx.lo.
8446 (BFD32_BACKENDS_CFILES): Add elf32-i386qnx.c.
8447 Run "make dep-am".
8448 * Makefile.in: Regenerate.
8449 * config.bfd: Add i[3456]86-*-nto-qnx* support.
8450 * configure.in: Add bfd_elf32_i386qnx_vec support.
8451 * configure: Regenerate.
8452 * elf-bfd.h (struct elf_backend_data): Add set_nonloadable_filepos,
8453 is_contained_by_filepos, and copy_private_bfd_data_p.
8454 * elf.c (assign_file_positions_for_segments): Call backend
8455 set_nonloadable_filepos. Fix non-K&R call to _bfd_error_handler.
8456 (IS_CONTAINED_BY_FILEPOS): Define.
8457 (INCLUDE_SECTION_IN_SEGMENT): Also test IS_CONTAINED_BY_FILEPOS.
8458 (copy_private_bfd_data): Use IS_CONTAINED_BY_FILEPOS. Typo fix.
8459 Fix non-K&R call to _bfd_error_handler.
8460 (_bfd_elf_copy_private_section_data): Use backend
8461 copy_private_bfd_data_p.
8462 * elf32-i386.c: Don't include elfxx-target.h when
8463 ELF32_I386_C_INCLUDED is defined.
8464 * elf32-i386qnx.c: New QNX elf backend file.
8465 * elfxx-target.h: Add elf_backend_set_nonloadable_filepos,
8466 elf_backend_is_contained_by_filepos, and
8467 elf_backend_do_copy_private_bfd_data.
8468 * targets.c: Add bfd_target bfd_elf32_i386qnx_vec.
8469
8470 2002-05-31 Alan Modra <amodra@bigpond.net.au>
8471
8472 * elfarm-oabi.c (bfd_elf32_arm_add_glue_sections_to_bfd): Define.
8473 Move other similar defines to start of file.
8474
8475 2002-05-30 Tom Rix <trix@redhat.com>
8476
8477 * coff-rs6000.c (xcoff_rtype2howto): Handle 16 bit R_RBA.
8478 * coff64-rs6000.c (xcoff64_rtype2howto): Same.
8479
8480 2002-05-30 Richard Henderson <rth@redhat.com>
8481
8482 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_TLSGD,
8483 ALPHA_ELF_LINK_HASH_LU_TLSLDM, ALPHA_ELF_LINK_HASH_LU_FUNC): New.
8484 (ALPHA_ELF_GOT_ENTRY_RELOCS_DONE): Remove.
8485 (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Remove.
8486 (struct alpha_elf_got_entry): Add reloc_type, reloc_done, reloc_xlated.
8487 (struct alpha_elf_obj_tdata): Rename total_got_entries and
8488 n_local_got_entries to total_got_size and local_got_size.
8489 (elf64_alpha_howto, elf64_alpha_reloc_map): Update for TLS relocs.
8490 (alpha_got_entry_size): New.
8491 (elf64_alpha_relax_with_lituse): Use it.
8492 (elf64_alpha_relax_without_lituse): Likewise.
8493 (MAX_GOT_SIZE): Rename from MAX_GOT_ENTRIES.
8494 (get_got_entry): New.
8495 (elf64_alpha_check_relocs): Handle TLS relocs. Reorganize.
8496 (elf64_alpha_adjust_dynamic_symbol): Test LU_FUNC as a mask.
8497 (elf64_alpha_merge_ind_symbols): Check gotent->reloc_type.
8498 (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots): Likewise.
8499 (elf64_alpha_calc_got_offsets_for_symbol): Use alpha_got_entry_size.
8500 (elf64_alpha_calc_got_offsets): Likewise.
8501 (alpha_dynamic_entries_for_reloc): New.
8502 (elf64_alpha_calc_dynrel_sizes): Use it.
8503 (elf64_alpha_size_dynamic_sections): Likewise.
8504 (elf64_alpha_relocate_section): Handle TLS relocations.
8505 * reloc.c: Add Alpha TLS relocations.
8506 * bfd-in2.h, libbfd.h: Rebuild.
8507
8508 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
8509
8510 * peXXigen.c (pe_print_idata): Remove double printed
8511 import table lines; add Bound-To comment.
8512
8513 2002-05-29 Matt Thomas <matt@3am-software.com>
8514
8515 * Makefile.am (BFD32_BACKENDS): Add elf32-vax.lo.
8516 (BFD32_BACKENDS_CFILES): Add elf32-vax.c.
8517 (elf32-vax.lo): New rule.
8518 * Makefile.in: Regenerate.
8519 * configure.in (bfd_elf32_vax_vec)
8520 (vaxnetbsd_vec): New vectors.
8521 * configure: Regenerate.
8522 * config.bfd (vax-*-netbsdelf*)
8523 (vax-*-netbsdaout*)
8524 (vax-*-netbsd*): New targets.
8525 * elf32-vax.c: New file.
8526 * reloc.c: Add VAX relocations.
8527 * bfd-in2.h: Regenerate.
8528 * targets.c (_bfd_target_vector): Add bfd_elf32_vax_vec.
8529
8530 2002-05-29 Jason Thorpe <thorpej@wasabisystems.com>
8531
8532 * config.bfd (arm-*-netbsd*): Add bfd_elf32_littlearm_vec
8533 and bfd_elf32_bigarm_vec to targ_selvecs.
8534
8535 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
8536
8537 * peXXigen.c (pe_print_idata): Fix seg faults on printing import tables
8538 with auto-imported symbols.
8539
8540 2002-05-29 Adam Nemet <anemet@lnxw.com>
8541
8542 * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Don't add glue
8543 sections only record bfd.
8544 (bfd_elf32_arm_add_glue_sections_to_bfd): New function.
8545 * bfd-in.h (bfd_elf32_arm_add_glue_sections_to_bfd): Declare it.
8546 * bfd-in2.h: Regenerate.
8547
8548 2002-05-28 Nick Clifton <nickc@cambridge.redhat.com>
8549
8550 * syms.c (_bfd_stab_section_find_nearest_line): Move
8551 declaration and initialisation of saw_line and saw_func out of
8552 for loop.
8553
8554 2002-05-29 Alan Modra <amodra@bigpond.net.au>
8555
8556 * elf64-ppc.c (ppc64_elf_get_symbol_info): New function.
8557 (bfd_elf64_get_symbol_info): Define.
8558 * elfxx-target.h (bfd_elfNN_get_symbol_info): Only define if undef.
8559
8560 2002-05-29 Andrey Volkov <avolkov@transas.com>
8561
8562 * cpu-h8300.c: Make default h8300 machine first in machine list.
8563
8564 2002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net>
8565
8566 * config.bfd: Added DLX configuraton.
8567 * Makefile.am: Added DLX configuraton.
8568 * configure.in: Added DLX configuraton.
8569 * archures.c: Add DLX architecture.
8570 * reloc.c: Add DLX relocs.
8571 * targets.c: Added DLX target vector.
8572 * configure: Regenerate.
8573 * Makefile.in: Regenreate.
8574 * bfd-in2.h: Regenreate.
8575 * elf32-dlx.c: New file: Support DLX target.
8576 * cpu-dlx.c: New file: Support DLX target.
8577
8578 2002-05-25 Alan Modra <amodra@bigpond.net.au>
8579
8580 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Formatting.
8581
8582 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Revert last change.
8583 (ppc64_elf_check_relocs): Don't set up function descriptor symbol
8584 strings to point inside function code sym string.
8585 (func_desc_adjust): Likewise.
8586 (ppc64_elf_hide_symbol): Rewrite code to look up function code sym.
8587
8588 2002-05-24 Michal Ludvig <mludvig@suse.cz>
8589
8590 * elf64-x86-64.c (elf64_x86_64_grok_prstatus): Added.
8591 (elf64_x86_64_grok_psinfo): Added.
8592
8593 2002-05-24 TAMURA Kent <kent@netbsd.org>
8594
8595 * config.bfd: Add a target for i386-netbsdpe.
8596
8597 2002-05-24 Alan Modra <amodra@bigpond.net.au>
8598
8599 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy is_func
8600 and is_func_descriptor.
8601 (func_desc_adjust): Hide function code sym in shared libs unless
8602 there is a matching exported function descriptor sym.
8603
8604 2002-05-23 Jakub Jelinek <jakub@redhat.com>
8605
8606 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_THREAD_LOCAL
8607 for symbols from SHF_TLS section.
8608 (_bfd_elf_print_private_bfd_data): Add PT_TLS.
8609 (elf_fake_sections): Set SHF_TLS for SEC_THREAD_LOCAL sections.
8610 (map_sections_to_segments): Build PT_TLS segment if necessary.
8611 (assign_file_positions_for_segments): Likewise.
8612 (get_program_header_size): Account for PT_TLS segment.
8613 (swap_out_syms): Set type of BSF_THREAD_LOCAL symbols and symbols from
8614 SEC_THREAD_LOCAL sections to STT_TLS.
8615 * reloc.c: Add 386 and IA-64 TLS relocs.
8616 * section.c (SEC_THREAD_LOCAL): Define.
8617 (SEC_CONSTRUCTOR_TEXT, SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS):
8618 Remove.
8619 * elflink.h (elf_link_add_object_symbols): Support .tcommon.
8620 (size_dynamic_sections): If DF_STATIC_TLS, set DF_FLAGS
8621 unconditionally.
8622 (struct elf_final_link_info): Add first_tls_sec.
8623 (elf_bfd_final_link): Set first_tls_sec.
8624 Compute elf_hash_table (info)->tls_segment.
8625 (elf_link_output_extsym): Handle STT_TLS symbols.
8626 (elf_link_input_bfd): Likewise.
8627 * syms.c (BSF_THREAD_LOCAL): Define.
8628 * bfd-in2.h: Rebuilt.
8629 * libbfd.h: Rebuilt.
8630 * elf32-i386.c (elf_i386_tls_transition, dtpoff_base, tpoff,
8631 elf_i386_mkobject, elf_i386_object_p): New functions.
8632 (elf_howto_table): Add TLS relocs.
8633 (elf_i386_reloc_type_lookup): Support TLS relocs.
8634 (elf_i386_info_to_howto_rel): Likewise.
8635 (struct elf_i386_link_hash_entry): Add tls_type.
8636 (struct elf_i386_obj_tdata): New.
8637 (elf_i386_hash_entry, elf_i386_tdata, elf_i386_local_got_tls_type):
8638 New macros.
8639 (struct elf_i386_link_hash_table): Add tls_ldm_got.
8640 (link_hash_newfunc): Clear tls_type.
8641 (elf_i386_check_relocs): Support TLS relocs.
8642 (elf_i386_gc_sweep_hook): Likewise.
8643 (allocate_dynrelocs): Likewise.
8644 (elf_i386_size_dynamic_sections): Likewise.
8645 (elf_i386_relocate_section): Likewise.
8646 (elf_i386_finish_dynamic_symbol): Likewise.
8647 (bfd_elf32_mkobject, elf_backend_object_p): Define.
8648 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add tprel_offset,
8649 dtpmod_offset, dtprel_offset, tprel_done, dtpmod_done, dtprel_done,
8650 want_tprel, want_dtpmod, want_dtprel.
8651 (elfNN_ia64_tprel_base, elfNN_ia64_dtprel_base): New functions.
8652 (ia64_howto_table): Add TLS relocs, rename R_IA64_LTOFF_TP22 to
8653 R_IA64_LTOFF_TPREL22.
8654 (elf_code_to_howto_index): Add TLS relocs.
8655 (elfNN_ia64_check_relocs): Support TLS relocs.
8656 (allocate_global_data_got): Account for TLS .got data.
8657 (allocate_dynrel_entries): Account for TLS dynamic relocations.
8658 (elfNN_ia64_install_value): Supprt TLS relocs.
8659 (set_got_entry): Support TLS relocs.
8660 (elfNN_ia64_relocate_section): Likewise.
8661
8662 2002-05-23 Nick Clifton <nickc@cambridge.redhat.com>
8663
8664 * elf32-arm.h (elf32_arm_final_link_relocate): For the Thumb
8665 BLX reloc round the relocation up rather than down.
8666 * coff-arm.c (coff_arm_relocate_section): Likewise.
8667
8668 2002-05-21 H.J. Lu (hjl@gnu.org)
8669
8670 * linker.c (_bfd_generic_link_add_one_symbol): Allow multiple
8671 definition.
8672
8673 2002-05-22 Alan Modra <amodra@bigpond.net.au>
8674
8675 * elf64-ppc.c (ppc64_elf_size_stubs): Don't strip .branch_lt.
8676 (ppc64_elf_relocate_section): Handle unresolved relocs in opd.
8677
8678 2002-05-22 Alan Modra <amodra@bigpond.net.au>
8679
8680 * elf64-ppc.c (ppc64_elf_relocate_section): Return false for
8681 unresolved relocs.
8682 (ppc64_elf_size_dynamic_sections): Check for splt NULL.
8683
8684 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8685
8686 * bfd.c (bfd_get_arch_size): Remove bfd_set_error call for
8687 non-ELF targets.
8688
8689 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8690
8691 * elf-bfd.h (elf_backend_emit_relocs): Change prototype to return
8692 an error value.
8693 * elflink.h (elf_link_output_relocs): Likewise. Improve error message.
8694 return with false on error.
8695 (elf_link_input_bfd): Check reloc_emitter return value.
8696
8697 2002-05-21 Jason Thorpe <thorpej@wasabisystems.com>
8698
8699 * config.bfd (armeb-*-netbsdelf*): New target.
8700
8701 2002-05-20 Alan Modra <amodra@bigpond.net.au>
8702
8703 * elf64-ppc.c (ppc_build_one_stub): Point undefined function syms
8704 at the plt call stub.
8705
8706 2002-05-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8707
8708 * cpu-mips.c (mips_compatible): Don't try to check machine
8709 compatibility.
8710
8711 2002-05-18 Tom Rix <trix@redhat.com>
8712
8713 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_out): Fix C_FILE auxent.
8714
8715 2002-05-17 Alan Modra <amodra@bigpond.net.au>
8716
8717 * elf64-ppc.c (ppc64_elf_info_to_howto): Formatting.
8718 (ppc64_elf_relocate_section): Don't warn about reloc overflow when
8719 we've already warned about an undefined symbol. Report more
8720 detail on reloc errors.
8721
8722 2002-05-17 Alan Modra <amodra@bigpond.net.au>
8723
8724 * acinclude.m4 (AM_INSTALL_LIBBFD): New.
8725 * configure.in: Invoke AM_INSTALL_LIBBFD.
8726 * Makefile.am (install-data-local): Revert 2002-05-13. Move to..
8727 (install_libbfd): .. New target.
8728 (uninstall_libbfd): Likewise.
8729 (install-bfdlibLTLIBRARIES): Likewise.
8730 (uninstall-bfdlibLTLIBRARIES): Likewise.
8731 (bfdlibdir): New.
8732 (bfdincludedir): New.
8733 (lib_LTLIBRARIES): Rename to bfdlib_LTLIBRARIES.
8734 * aclocal.m4: Regenerate.
8735 * configure: Regenerate.
8736 * Makefile.in: Regenerate.
8737
8738 2002-05-17 Stuart Balfour <sbalfour@cisco.com>
8739
8740 * hash.c (bfd_hash_lookup): Remove computation of len from inside
8741 hash loop.
8742
8743 2002-05-16 Nick Clifton <nickc@cambridge.redhat.com>
8744
8745 * config.bfd: Add targets for sh64-linux (little endian and
8746 big endian).
8747
8748 2002-05-15 Laurent Pinchart <laurent.pinchart@skynet.be>
8749
8750 * peXXigen.c (pe_print_idata): Do not assume that the first thunk
8751 is located in the same section as the import table. Instead
8752 check, and if necessary load the section containing the thunk.
8753
8754 2002-05-15 Nick Clifton <nickc@cambridge.redhat.com>
8755
8756 * aix5ppc-core.c (xcoff64_core_p): Replace bfd_read with
8757 bfd_bread.
8758 (xcoff64_core_file_matches_executable_p): Replace bfd_read
8759 with bfd_bread.
8760
8761 2002-05-15 Alan Modra <amodra@bigpond.net.au>
8762
8763 * aix5ppc-core.c: Warning fixes.
8764 * aout-adobe.c (aout_32_bfd_link_just_syms): Define.
8765 * aout-target.h (MY_bfd_link_just_syms): Define.
8766 * aout-tic30.c (MY_bfd_link_just_syms): Define.
8767 * bfd.c (bfd_link_just_syms): Define.
8768 * binary.c (binary_bfd_link_just_syms): Define.
8769 * bout.c (b_out_bfd_link_just_syms): Define.
8770 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update initializer.
8771 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
8772 * coffcode.h (coff_bfd_link_just_syms): Define.
8773 * elf-bfd.h (enum elf_link_info_type): Add ELF_INFO_TYPE_JUST_SYMS.
8774 (elf_discarded_section): Check for ELF_INFO_TYPE_JUST_SYMS.
8775 (_bfd_elf_link_just_syms): Declare.
8776 * elf.c (_bfd_elf_link_just_syms): New function.
8777 * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Check that
8778 sections haven't already been discarded by the linker.
8779 * elflink.h (elf_link_add_object_symbols): Likewise for stab
8780 sections and SEC_MERGE sections.
8781 (elf_bfd_discard_info): Similarly here.
8782 * elfxx-target.h (bfd_elfNN_bfd_link_just_syms): Define.
8783 * i386msdos.c (msdos_bfd_link_just_syms): Define.
8784 * i386os9k.c (os9k_bfd_link_just_syms): Define.
8785 * ieee.c (ieee_bfd_link_just_syms): Define.
8786 * ihex.c (ihex_bfd_link_just_syms): Define.
8787 * libbfd-in.h (_bfd_nolink_bfd_link_just_syms): Define.
8788 (_bfd_generic_link_just_syms): Declare.
8789 * libecoff.h (_bfd_ecoff_bfd_link_just_syms): Define.
8790 * linker.c (_bfd_generic_link_just_syms): New function.
8791 * mmo.c (mmo_bfd_link_just_syms): Define.
8792 * nlm-target.h (nlm_bfd_link_just_syms): Define.
8793 * oasys.c (oasys_bfd_link_just_syms): Define.
8794 * ppcboot.c (ppcboot_bfd_link_just_syms): Define.
8795 * som.c (som_bfd_link_just_syms): Define.
8796 * srec.c (srec_bfd_link_just_syms): Define.
8797 * targets.c (struct bfd_target): Add _bfd_link_just_syms.
8798 (BFD_JUMP_TABLE_LINK): And here.
8799 * tekhex.c (tekhex_bfd_link_just_syms): Define.
8800 * versados.c (versados_bfd_link_just_syms): Define.
8801 * vms.c (vms_bfd_link_just_syms): Define.
8802 * libbfd.h: Regenerate.
8803 * bfd-in2.h: Regenerate.
8804
8805 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8806
8807 * elf32-mips.c: Remove superfluous definitions copied from
8808 elfxx-mips.c.
8809 (bfd_elf32_bigmips_vec,bfd_elf32_littlemips_vec): Use the
8810 SGIish vectors to check the special case.
8811 (mips_elf_hi16_reloc): Fix comment.
8812 (mips_elf_got16_reloc): Likewise.
8813 (_bfd_mips_elf32_gprel16_reloc): Likewise.
8814 (elf_reloc_map): Code cleanup.
8815 (mips_reloc_map): Add comment.
8816 (bfd_elf23_bfd_reloc_type_lookup): Code cleanup.
8817 (mips_elf32_rtype_to_howto): Likewise.
8818 (mips_elf32_discard_info): Likewise.
8819 (elf32_mips_irix_compat): Invert logic: Only SGIish vectors
8820 lead to IRIX compatibility now.
8821
8822 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8823
8824 * elfxx-mips.c: Call it IRIX, not Irix in comments.
8825
8826 2002-05-13 Jason Thorpe <thorpej@wasabisystems.com>
8827
8828 * config.bfd (shle-*-netbsdelf*): Add target which includes
8829 sh64 support.
8830
8831 2002-05-13 David Edelsohn <edelsohn@gnu.org>
8832
8833 * configure.in: Revert 2002-04-07. Instead, auto-configure
8834 HAVE_ST_C_IMPL.
8835 * configure: Regenerate.
8836 * config.in: Regenerate.
8837 * rs6000-core.c (CNEW_IMPL): Guard use of c_impl with HAVE_ST_C_IMPL
8838 or AIX_5_CORE.
8839
8840 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
8841
8842 * configure.in (sparc*-*-openbsd*): Support sparc64-openbsd
8843 corefiles as well.2
8844 * configure: Regenerate.
8845
8846 2002-05-13 Alan Modra <amodra@bigpond.net.au>
8847
8848 * Makefile.am (install-data-local): Install headers to
8849 $(exec_prefix)/include.
8850 * Makefile.in: Regenerate.
8851
8852 2002-05-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
8853 Daniel Jacobowitz <drow@mvista.com>
8854
8855 * coff-sh.c (sh_reloc_map): Map to R_SH_IMM32 for non-PE. Don't
8856 map BFD_RELOC_RVA.
8857
8858 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
8859
8860 * config.bfd (alpha*-*-openbsd*, sparc64*-*-openbsd*,
8861 hppa*-*-openbsd*): New targets.
8862 * configure.in (alpha*-*-openbsd*): Set COREFILE.
8863 * configure: Regenerate.
8864
8865 2002-05-10 Tom Rix <trix@redhat.com>
8866
8867 * coff64-rs6000.c (xcoff64_reloc_type_br): New function for
8868 xcoff64_ppc_relocate_section.
8869 * coff-rs6000.c : Extern common xcoff_reloc_type functions.
8870 * libxcoff.h: Common xcoff_reloc_type function declaration.
8871
8872 2002-05-10 Alan Modra <amodra@bigpond.net.au>
8873
8874 * elf32-i386.c (elf_i386_relocate_section): Remove overflow checks
8875 added in 2002-05-09 commit.
8876
8877 * elf32-hppa.c (elf32_hppa_size_stubs): Revert part of 2002-05-04,
8878 don't look for stubs on all undefined syms.
8879
8880 2002-05-09 Alan Modra <amodra@bigpond.net.au>
8881
8882 * elf64-ppc.c (RA_REGISTER_MASK, RA_REGISTER_SHIFT): Delete.
8883 (ppc64_elf_howto_raw <R_PPC64_RELATIVE>): Not pc_relative or
8884 pcrel_offset.
8885
8886 * elf32-i386.c (elf_howto_table): Comments.
8887 (elf_i386_relocate_section): Handle more relocs for relocatable
8888 linking and against SEC_MERGE sections.
8889
8890 2002-05-08 Alan Modra <amodra@bigpond.net.au>
8891
8892 * elf32-ppc.c (ppc_elf_create_got): New function.
8893 (ppc_elf_create_dynamic_sections): Call ppc_elf_create_got before
8894 _bfd_elf_create_dynamic_sections. Correct .plt flags.
8895 (ppc_elf_check_relocs): Use ppc_elf_create_got in place of
8896 _bfd_elf_create_got_section.
8897
8898 2002-05-07 Alan Modra <amodra@bigpond.net.au>
8899
8900 * elf-bfd.h (struct elf_backend_data): Add rela_normal.
8901 * elfxx-target.h (elf_backend_rela_normal): Define.
8902 (elfNN_bed): Init rela_normal.
8903 * elflink.h (elf_link_input_bfd <emit_relocs>): Handle adjustment
8904 for section symbols here if rela_normal. Simplify abs section test.
8905 * elf-m10200.c (mn10200_elf_relocate_section): If relocatable,
8906 return immediately. Remove code handling relocatable linking.
8907 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
8908 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
8909 * elf32-i370.c (i370_elf_relocate_section): Likewise.
8910 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
8911 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
8912 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
8913 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
8914 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
8915 * elf32-s390.c (elf_s390_relocate_section): Likewise.
8916 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
8917 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
8918 * elf64-s390.c (elf_s390_relocate_section): Likewise.
8919 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
8920 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
8921 * elf32-arm.h (elf32_arm_relocate_section): Likewise #ifndef USE_REL.
8922 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
8923 * elf-m10200.c (elf_backend_rela_normal): Define.
8924 * elf-m10300.c (elf_backend_rela_normal): Define.
8925 * elf32-fr30.c (elf_backend_rela_normal): Define.
8926 * elf32-i370.c (elf_backend_rela_normal): Define.
8927 * elf32-i860.c (elf_backend_rela_normal): Define.
8928 * elf32-m68k.c (elf_backend_rela_normal): Define.
8929 * elf32-mcore.c (elf_backend_rela_normal): Define.
8930 * elf32-openrisc.c (elf_backend_rela_normal): Define.
8931 * elf32-ppc.c (elf_backend_rela_normal): Define.
8932 * elf32-s390.c (elf_backend_rela_normal): Define.
8933 * elf32-xstormy16.c (elf_backend_rela_normal): Define.
8934 * elf64-ppc.c (elf_backend_rela_normal): Define.
8935 * elf64-s390.c (elf_backend_rela_normal): Define.
8936 * elf64-x86-64.c (elf_backend_rela_normal): Define.
8937 * elfxx-ia64.c (elf_backend_rela_normal): Define.
8938 * elf32-arm.h (elf_backend_rela_normal): Define #ifndef USE_REL.
8939 * elf32-m32r.c (elf_backend_rela_normal): Likewise.
8940
8941 2002-05-06 Nick Clifton <nickc@cambridge.redhat.com>
8942
8943 * elf32-arm.h (elf32_arm_final_link_relocate): Convert
8944 'reloc_signed_max' and 'reloc_signed_min' into half-word offsets.
8945
8946 2002-05-06 Alan Modra <amodra@bigpond.net.au>
8947
8948 * elflink.h (elf_link_input_bfd <emit_relocs>): Adjust r_offset
8949 when not relocatable. Fix reloc_emitter call for K&R.
8950
8951 2002-05-04 Alan Modra <amodra@bigpond.net.au>
8952
8953 * elf64-ppc.c (ppc64_elf_relocate_section): Reinstate code
8954 reloading local sym addend mistakenly removed in 2002-05-01 change.
8955
8956 * dwarf2.c (struct line_head): Make prologue_length a bfd_vma.
8957 (read_abbrevs): Change "offset" param to bfd_vma.
8958 (parse_comp_unit): Change "version" and addr_size to unsigned ints.
8959 Change "abbrev_offset" to bfd_vma.
8960 (read_indirect_string): Use correct conversion chars in error
8961 message format string, cast bfd_vma's to unsigned long.
8962 (read_abbrevs): Likewise.
8963 (read_attribute_value): Likewise.
8964 (decode_line_info): Likewise.
8965 (scan_unit_for_functions): Likewise.
8966 (parse_comp_unit): Likewise.
8967
8968 2002-05-04 Tom Rix <trix@redhat.com>
8969
8970 * coffswap.h (coff_swap_reloc_in): Remove XCOFF support.
8971 (coff_swap_reloc_out): Same.
8972 * coff-rs6000.c: (xcoff_swap_reloc_in): Moved from coffswap.h.
8973 (xcoff_swap_reloc_out): Same.
8974 (xcoff_rtype2howto): Renamed from _bfd_xcoff_rtype2howto. Special
8975 case some 16 bit relocs. Add reloc value to output.
8976 (xcoff_howto_table): Remove 64 bit R_POS, add 16 bit
8977 R_RBR. Improve names.
8978 (_bfd_xcoff_reloc_type_lookup): Adjust for removal of 64 bit R_POS.
8979 (bfd_xcoff_backend_data): Update with new reloc swap names.
8980 (bfd_pmac_xcoff_backend_data) : Same.
8981 * coff64-rs6000.c: (xcoff64_swap_reloc_in): Moved from coffswap.h.
8982 (xcoff64_swap_reloc_out): Same.
8983 (xcoff64_rtype2howto): Special case some 16 bit relocs and 32 bit
8984 R_POS. Add reloc value to output.
8985 (xcoff64_howto_table): Move 64 bit R_POS to first entry. Add 16
8986 bit R_RBR. Improve names, masks.
8987 (xcoff64_reloc_type_lookup): Adjust for move of 64 bit R_POS.
8988 (bfd_xcoff_backend_data): Update with new reloc swap names.
8989 (bfd_xcoff_aix5_backend_data) : Same.
8990
8991 2002-05-04 Alan Modra <amodra@bigpond.net.au>
8992
8993 * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add
8994 bfd_count top_index, input_list, all_local_syms.
8995 (elf32_hppa_setup_section_lists): New function, split from
8996 elf32_hppa_size_stubs.
8997 (elf32_hppa_next_input_section): Likewise.
8998 (group_sections): Likewise.
8999 (get_local_syms): Likewise.
9000 (elf32_hppa_size_stubs): Adjust for split out functions. Look for
9001 stubs on undefined syms too.
9002 (elf32_hppa_set_gp): Use bfd_link_hash* instead of elf_link_hash*.
9003 Only access htab elf fields when we have an elf hash table.
9004 * elf32-hppa.h (elf32_hppa_setup_section_lists): Declare.
9005 (elf32_hppa_next_input_section): Declare.
9006
9007 2002-05-04 Bob Byrnes <byrnes@curl.com>
9008
9009 * opncls.c (_bfd_new_bfd_contained_in): Check return value of
9010 _bfd_new_bfd.
9011
9012 2002-05-03 H.J. Lu (hjl@gnu.org)
9013
9014 * elfxx-mips.c (mips_elf_link_hash_entry): Add forced_local.
9015 (mips_elf_link_hash_newfunc): Initialize forced_local to false.
9016 (mips_elf_record_global_got_symbol): Call _bfd_mips_elf_hide_symbol
9017 to hide a global symbol.
9018 (_bfd_mips_elf_hide_symbol): Return if forced_local is true. Set
9019 forced_local to true.
9020
9021 2002-05-02 Richard Henderson <rth@redhat.com>
9022
9023 * elf64-alpha.c (elf64_alpha_relocate_section): Force relative relocs
9024 vs SHN_UNDEF to zero.
9025
9026 2002-05-02 Alan Modra <amodra@bigpond.net.au>
9027
9028 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_SECTOFF>): Change to a
9029 16 bit reloc.
9030 <R_PPC64_SECTOFF_DS>: Likewise.
9031 (ppc64_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
9032 SECTOFF reloc.
9033 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_SECTOFF>): Correct.
9034 (ppc_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
9035 SECTOFF reloc.
9036
9037 * elf64-ppc.c (ppc64_elf_addr16_ha_reloc): Delete.
9038 (ppc64_elf_ha_reloc): New function.
9039 (ppc64_elf_brtaken_reloc): New function.
9040 (ppc64_elf_sectoff_reloc): New function.
9041 (ppc64_elf_sectoff_ha_reloc): New function.
9042 (ppc64_elf_toc_reloc): New function.
9043 (ppc64_elf_toc_ha_reloc): New function.
9044 (ppc64_elf_toc64_reloc): New function.
9045 (ppc64_elf_unhandled_reloc): New function.
9046 (ppc64_elf_howto_raw): Use the above.
9047 <R_PPC64_RELATIVE>: Mark pc_relative, pcrel_offset.
9048 <R_PPC64_SECTOFF>: Not pc_relative or pcrel_offset. Fix dst_mask.
9049 <R_PPC64_SECTOFF_DS>: Likewise.
9050 (IS_ABSOLUTE_RELOC): Update.
9051 (struct ppc_link_hash_table): Add have_undefweak.
9052 (ppc64_elf_link_hash_table_create): Init.
9053 (func_desc_adjust): Set have_undefweak.
9054 (ppc64_elf_func_desc_adjust): Call func_desc_adjust earlier. Only
9055 add the .sfpr blr when have_undefweak.
9056 (ppc64_elf_setup_section_lists): Check hash table flavour.
9057 (ppc64_elf_next_input_section): Move output_section->owner test to
9058 ppc64elf.em.
9059 (ppc64_elf_set_toc): Rename to ppc64_elf_toc, remove info param
9060 and relocatable test. Return TOCstart and don't set elf_gp.
9061 (ppc64_elf_relocate_section): Correct BRTAKEN/BRNTAKEN branch
9062 offset calculation. Add assert on weak sym branch tweaks.
9063 * elf64-ppc.h (ppc64_elf_set_toc): Delete.
9064 (ppc64_elf_toc): Declare.
9065 (ppc64_elf_next_input_section): Update.
9066
9067 2002-05-01 Alan Modra <amodra@bigpond.net.au>
9068
9069 * syms.c (_bfd_stab_section_find_nearest_line): Don't bomb on NULL
9070 file_name.
9071
9072 2002-05-01 Alan Modra <amodra@bigpond.net.au>
9073
9074 * elf64-ppc.c (CROR_151515, CROR_313131): Define.
9075 (ppc64_elf_relocate_section): Use them. Don't look for plt calls
9076 on R_PPC64_ADDR24 relocs. Require a nop or no link reg on plt
9077 call branches. Correct undefined weak destination.
9078 (ppc64_elf_func_desc_adjust): Always create at least one blr in
9079 .sfpr, and correct case where either only savef* or restf* is
9080 needed.
9081
9082 Long branch stubs, multiple stub sections.
9083 * elf64-ppc.h (ppc64_elf_setup_section_lists): Declare.
9084 (ppc64_elf_next_input_section): Declare.
9085 * elf64-ppc.c: Move linker-only prototypes.
9086 (STUB_SUFFIX): Define.
9087 (enum ppc_stub_type): New.
9088 (struct ppc_stub_hash_entry): New.
9089 (struct ppc_branch_hash_entry): New.
9090 (struct ppc_link_hash_entry): Add stub_cache, oh.
9091 (struct ppc_link_hash_table): Add stub_hash_table etc. Remove
9092 sstub. Add sbrlt, srelbrlt, has_14bit_branch, stub_iteration.
9093 Rename plt_overflow to stub_error.
9094 (ppc_stub_hash_lookup): Define.
9095 (ppc_branch_hash_lookup): Define.
9096 (stub_hash_newfunc): New function.
9097 (branch_hash_newfunc): New function.
9098 (link_hash_newfunc): Init new fields.
9099 (ppc64_elf_link_hash_table_create): Likewise.
9100 (ppc64_elf_link_hash_table_free): New function.
9101 (ppc_stub_name): New function.
9102 (ppc_get_stub_entry): New function.
9103 (ppc_add_stub): New function.
9104 (create_linkage_sections): Use bfd_make_section_anyway. Create
9105 .branch_lt and .rela.branch_lt sections. Don't create .stub.
9106 (ppc64_elf_check_relocs): Set has_14bit_branch on R_PPC64_REL14*,
9107 and set up for plt call stubs. Link func and func desc syms.
9108 (ppc64_elf_gc_sweep_hook): Handle REL14* as per REL24.
9109 (func_desc_adjust): Avoid hash lookup when func desc sym available
9110 via shortcut, and set links when processing.
9111 (ppc64_elf_hide_symbol): Likewise.
9112 (allocate_dynrelocs): Don't allocate stub section here.
9113 (ppc64_elf_size_dynamic_sections): Handle sbrlt and srelbrlt.
9114 Remove sstub code.
9115 (ppc_type_of_stub): New function.
9116 (build_one_stub): Delete.
9117 (ppc_build_one_stub): New function.
9118 (ppc_size_one_stub): New function.
9119 (ppc64_elf_setup_section_lists): New function.
9120 (ppc64_elf_next_input_section): New function.
9121 (group_sections): New function.
9122 (get_local_syms): New function.
9123 (ppc64_elf_size_stubs): Rewrite.
9124 (ppc64_elf_build_stubs): Rewrite.
9125 (ppc64_elf_relocate_section): Look up stub entry for REL24
9126 relocs. Don't propagate REL14* to dynamic objects. Look for long
9127 branch stubs if REL14* or REL24 relocs won't reach.
9128 (bfd_elf64_bfd_link_hash_table_free): Define.
9129
9130 2002-04-30 Mark Mitchell <mark@codesourcery.com>
9131
9132 * config.bfd: Add support for powerpc-*-windiss.
9133
9134 2002-04-30 Tom Rix <trix@redhat.com>
9135
9136 * xcofflink.c (xcoff_link_add_symbols): Always copy undef C_EXT
9137 symbol names into the hash table.
9138
9139 2002-04-28 Tom Rix <trix@redhat.com>
9140
9141 * coff-rs6000.c (xcoff_calculate_relocation) : Function table for
9142 calulating relocations.
9143 (xcoff_complain_overflow) : Function table for relocation errors.
9144 (xcoff_ppc_relocate_section): Use relocation and complain function
9145 tables.
9146 (xcoff_complain_overflow_unsigned_func): New complain function.
9147 (xcoff_complain_overflow_signed_func): Same.
9148 (xcoff_complain_overflow_bitfield_func): Same.
9149 (xcoff_complain_overflow_dont_func): Same.
9150 (xcoff_reloc_type_crel): New recot function.
9151 (xcoff_reloc_type_br): Same.
9152 (xcoff_reloc_type_ba): Same.
9153 (xcoff_reloc_type_toc): Same.
9154 (xcoff_reloc_type_rel): Same.
9155 (xcoff_reloc_type_neg): Same.
9156 (xcoff_reloc_type_pos): Same.
9157 (xcoff_reloc_type_fail): Same.
9158 (xcoff_reloc_type_noop): Same.
9159 * libxcoff.h : Declare common parts for xcoff64.
9160 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Use relocation
9161 and complain function tables.
9162
9163 2002-04-28 Alan Modra <amodra@bigpond.net.au>
9164
9165 * elf64-x86-64.c (struct elf64_x86_64_dyn_relocs): Comment typo.
9166 * elf32-hppa.c (elf32_hppa_final_link): Formatting.
9167
9168 2002-04-26 Alan Modra <amodra@bigpond.net.au>
9169
9170 * opncls.c (bfd_make_readable): Call bfd_section_list_clear.
9171 * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
9172
9173 * elflink.h (elf_bfd_final_link): Ensure input bfd class is the
9174 same as the output before calling elf_link_input_bfd.
9175
9176 * coffcode.h (coff_compute_section_file_positions): Set
9177 section_tail after shuffling section list.
9178
9179 2002-04-24 Christian Groessler <chris@groessler.org>
9180
9181 * coff-z8k.c (extra_case): Fix R_IMM32 relocations: The
9182 addresses are 23bit with a special layout, not plain 32bit
9183 values. Prevent relocation of immediate values.
9184
9185 2002-04-24 Chris G. Demetriou <cgd@broadcom.com>
9186
9187 * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): If MDMX or
9188 MIPS-16 ASE flags are set, print something to indicate that.
9189
9190 2002-04-23 Alan Modra <amodra@bigpond.net.au>
9191
9192 * elf32-hppa.c (hppa_type_of_stub): Correct and simplify condition
9193 under which a plt call stub is used.
9194 (final_link_relocate): Similarly.
9195 (allocate_plt_static): Clear h-plabel except when plt entry is
9196 exclusively used for a plabel.
9197 (allocate_dynrelocs): Use the above to simplify plt sizing.
9198 (struct elf32_hppa_link_hash_table): Add has_22bit_branch.
9199 (elf32_hppa_link_hash_table_create): Init.
9200 (BL22_RP): Define.
9201 (hppa_build_one_stub): Use BL22_RP if has_22bit_branch.
9202 (elf32_hppa_check_relocs): Set has_22bit_branch.
9203
9204 * elf32-hppa.c (elf32_hppa_check_relocs): Remove debug message.
9205 (final_link_relocate): Likewise.
9206
9207 2002-04-22 Jakub Jelinek <jakub@redhat.com>
9208
9209 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't build
9210 search table if some FDE is DW_EH_PE_aligned encoded either.
9211 (_bfd_elf_write_section_eh_frame): Handle terminating FDE specially.
9212
9213 2002-04-22 Richard Smith <richard@ex-parrot.com>
9214 Jakub Jelinek <jakub@redhat.com>
9215
9216 * elf-eh-frame.c (struct eh_cie_fde): Add per_encoding_relative.
9217 (_bfd_elf_discard_section_eh_frame): Set it for CIEs with pcrel
9218 encoded personality.
9219 (_bfd_elf_write_section_eh_frame): Adjust pcrel encoded personality
9220 for CIE/FDE removal.
9221
9222 2002-04-20 Tom Rix <trix@redhat.com>
9223
9224 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Fix C_FILE auxent.
9225
9226 2002-04-20 Alan Modra <amodra@bigpond.net.au>
9227
9228 * archures.c (bfd_lookup_arch): Move the list order comment..
9229 (struct bfd_arch_info): ..to where it belongs.
9230 * bfd-in2.h: Regenerate.
9231
9232 * archures.c (bfd_lookup_arch): Add comment on list order.
9233 (bfd_default_set_arch_mach): Use bfd_lookup_arch.
9234 * cpu-powerpc.c (bfd_powerpc_archs): Re-order so that the default
9235 is always at head of list.
9236
9237 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
9238
9239 * coff-arm.c (coff_thumb_pcrel_12, coff_thumb_pcrel_9,
9240 insert_thumb_branch, record_thumb_to_arm_glue): Suppress
9241 definition of these functions for ARM_WINCE builds as they are
9242 not used.
9243 (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET): Do not define
9244 for ARM_WINCE builds.
9245
9246 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
9247
9248 * coff-arm.c (bfd_arm_process_before_allocation):
9249
9250 2002-04-17 J"orn Rennecke <joern.rennecke@superh.com>
9251
9252 * cpu-sh.c (scan_mach): Delete.
9253 (arch_info_struct): Replace scan_mach with bfd_default_scan.
9254 (bfd_sh_arch): Likewise.
9255
9256 2002-04-16 Nick Clifton <nickc@cambridge.redhat.com>
9257
9258 * ihex.c (ihex_write_object_contents): Fix check for records
9259 crossing 64K boundaries.
9260
9261 2002-04-16 Alan Modra <amodra@bigpond.net.au>
9262
9263 * elf32-m32r.c (m32r_elf_add_symbol_hook): Check the hash table
9264 type rather than just assuming entries are ELF.
9265 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
9266 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
9267 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Likewise.
9268 * elf64-mmix.c (mmix_elf_add_symbol_hook): Use bfd_link_hash_entry
9269 rather than elf_link_hash_entry.
9270
9271 2002-04-15 Richard Henderson <rth@redhat.com>
9272
9273 * elf32-mips.c (mips_elf32_object_p): Revert 0404 fragment: allow
9274 n32 binaries.
9275
9276 2002-04-15 Michael Snyder <msnyder@redhat.com>
9277
9278 * opncls.c (bfd_close): Write contents if writeable.
9279 Minor formatting tidy-ups.
9280
9281 2002-04-15 Alan Modra <amodra@bigpond.net.au>
9282
9283 * elf32-ppc.c (ppc_elf_add_symbol_hook): Check the hash table type.
9284
9285 2002-04-12 Michael Snyder <msnyder@redhat.com>
9286
9287 * bfd-in.h (bfd_get_section_lma): New access macro.
9288 Minor white-space fix-up.
9289
9290 2002-04-12 Alan Modra <amodra@bigpond.net.au>
9291
9292 * elf.c (prep_headers): Don't zero EI_OSABI, EI_ABIVERSION or
9293 header pad.
9294
9295 2002-04-09 DJ Delorie <dj@redhat.com>
9296
9297 * elfarm-nabi.c (elf32_arm_howto_table): Fix ABS16 masks.
9298
9299 2002-04-09 Casper S. Hornstrup <chorns@users.sourceforge.net>
9300
9301 * coffcode.h (coff_read_word): New.
9302 (coff_compute_checksum): New.
9303 (coff_apply_checksum): New.
9304 (coff_write_object_contents): Call coff_apply_checksum () to
9305 apply checksum to PE image.
9306
9307 2002-04-08 Randolph Chung <tausq@debian.org>
9308
9309 * elf32-hppa.c (hppa_unwind_entry_compare): Move to elf-hppa.h.
9310 (elf32_hppa_final_link): Split out sorting logic to..
9311 * elf-hppa.h (elf_hppa_sort_unwind): ..here.
9312 (elf_hppa_final_link): Call elf_hppa_sort_unwind.
9313
9314 2002-04-07 Andrew Cagney <ac131313@redhat.com>
9315
9316 * configure.in: Add missing ``|'' to powerpc-*-aix4.[4-9]*
9317 pattern.
9318 * configure: Re-generate.
9319
9320 2002-04-07 Andrew Cagney <ac131313@redhat.com>
9321
9322 * configure.in: Only define AIX_CORE_DUMPX_CORE when AIX version
9323 is greater or equal to 4.3.3.
9324 * configure: Regenerate.
9325 Fix PR gdb/344.
9326
9327 2002-04-05 Hans-Peter Nilsson <hp@axis.com>
9328
9329 * elf32-cris.c (cris_elf_howto_table) <R_CRIS_16_PCREL,
9330 R_CRIS_32_PCREL>: Fix typo in name.
9331 (cris_elf_check_relocs): Always create .rela.got here when
9332 R_CRIS_16_GOTPLT or R_CRIS_32_GOTPLT is seen.
9333 (elf_cris_adjust_gotplt_to_got): Don't create .rela.got here;
9334 assume it's created.
9335
9336 2002-04-04 Daniel Jacobowitz <drow@mvista.com>
9337
9338 * aout-adobe.c (aout_32_bfd_link_hash_table_free): Define.
9339 * aout-target.h (MY_bfd_link_hash_table_free): Conditionally
9340 define.
9341 * aout-tic30.c (MY_bfd_link_hash_table_free): Likewise.
9342 * bfd.c (bfd_link_hash_table_free): Define.
9343 * binary.c (binary_bfd_link_hash_table_free): Define.
9344 * bout.c (b_out_bfd_link_hash_table_free): Define.
9345 * coff-rs6000.c (rs6000coff_vec): Include
9346 _bfd_generic_link_hash_table_free.
9347 (pmac_xcoff_vec): Likewise.
9348 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
9349 (aix5coff64_vec): Likewise.
9350 * coffcode.h (coff_bfd_link_hash_table_free): Conditionally define.
9351 * elf-m10300.c (elf32_mn10300_link_hash_table_free): New function.
9352 (bfd_elf32_bfd_link_hash_table_free): Define.
9353 * elf32-hppa.c (elf32_hppa_link_hash_table_free): New function.
9354 (bfd_elf32_bfd_link_hash_table_free): Define.
9355 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Conditionally
9356 define.
9357 * i386msdos.c (msdos_bfd_link_hash_table_free): Define.
9358 * i386os9k.c (os9k_bfd_link_hash_table_free): Define.
9359 * ieee.c (ieee_bfd_link_hash_table_free): Define.
9360 * ihex.c (ihex_bfd_link_hash_table_free): Define.
9361 * libbfd-in.h (_bfd_nolink_bfd_link_hash_table_free): Define.
9362 (_bfd_generic_link_hash_table_free): Add prototype.
9363 * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Add prototype.
9364 * libecoff.h (_bfd_ecoff_bfd_link_hash_table_free): Define.
9365 * linker.c (_bfd_generic_link_hash_table_free): New function.
9366 * mmo.c (mmo_bfd_link_hash_table_free): Define.
9367 * nlm-target.h (nlm_bfd_link_hash_table_free): Define.
9368 * oasys.c (oasys_bfd_link_hash_table_free): Define.
9369 * ppcboot.c (ppcboot_bfd_link_hash_table_free): Define.
9370 * som.c (som_bfd_link_hash_table_free): Define.
9371 * srec.c (srec_bfd_link_hash_table_free): Define.
9372 * tekhex.c (tekhex_bfd_link_hash_table_free): Define.
9373 * versados.c (versados_bfd_link_hash_table_free): Define.
9374 * vms.c (vms_bfd_link_hash_table_free): New function.
9375 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_free): New function.
9376
9377 * coff-arm.c (coff_arm_link_hash_table_create): Use bfd_malloc
9378 instead of bfd_alloc.
9379 * coff-h8300.c (h8300_coff_link_hash_table_create): Likewise.
9380 * coff-mcore.c (coff_mcore_link_hash_table_create): Likewise.
9381 * coff-ppc.c (ppc_coff_link_hash_table_create): Likewise.
9382 * cofflink.c (_bfd_coff_link_hash_table_create): Likewise.
9383 * ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
9384 * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise.
9385 * elf.c (_bfd_elf_link_hash_table_create): Likewise.
9386 * elf32-arm.h (elf32_arm_link_hash_table_create): Likewise.
9387 * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
9388 * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise.
9389 * elf32-i386.c (elf_i386_link_hash_table_create): Likewise.
9390 * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
9391 * elf32-s390.c (elf_s390_link_hash_table_create): Likewise.
9392 * elf32-sh.c (sh_elf_link_hash_table_create): Likewise.
9393 * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create): Likewise.
9394 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
9395 * elf64-s390.c (elf_s390_link_hash_table_create): Likewise.
9396 * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise.
9397 * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create): Likewise.
9398 * elf64-x86-64.c (elf64_x86_64_link_hash_table_create): Likewise.
9399 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
9400 * linker.c (_bfd_generic_link_hash_table_create): Likewise.
9401 * m68klinux.c (linux_link_hash_table_create): Likewise.
9402 * sparclinux.c (linux_link_hash_table_create): Likewise.
9403 * sunos.c (sunos_link_hash_table_create): Likewise.
9404 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise.
9405
9406 * targets.c: Add _bfd_link_hash_table_free to xvec.
9407
9408 * bfd-in2.h: Regenerate.
9409 * libbfd.h: Regenerate.
9410 * libcoff.h: Regenerate.
9411
9412 2002-04-04 Alan Modra <amodra@bigpond.net.au>
9413
9414 * dep-in.sed: Cope with absolute paths.
9415 * Makefile.am (dep.sed): Subst TOPDIR, and not INCDIR.
9416 Run "make dep-am".
9417 * Makefile.in: Regenerate.
9418 * coff-arm.c: Fix copyright date.
9419 * cpu-h8300.c: Likewise.
9420 * cpu-i370.c: Likewise.
9421 * cpu-s390.c: Likewise.
9422 * cpu-mips.c: Likewise.
9423 * po/SRC-POTFILES.in: Regenerate.
9424
9425 2002-04-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
9426
9427 * Makefile.am: Add elfxx-mips.c to the known backends.
9428 (elf32-mips.lo): remove dependency to coff/external.h.
9429 * Makefile.in: Regenerate.
9430 * configure.in: Add elfxx-mips.lo to all vectors using elf32-mips.lo
9431 Remove elf32-mips.lo from 64 bit vectors. Update dependencies
9432 accordingly.
9433 * configure: Regenerate.
9434 * elf-bfd.h: Move all MIPS ELF specific prototypes to elfxx-mips.h.
9435 (irix_compat_t): IRIX compatibility level, moved from elf32-mips.c.
9436 (elf_backend_mips_irix_compat, elf_backend_mips_rtype_to_howto): New
9437 MIPS specific backend functions.
9438 * elf32-mips.c: Moved most code to elfxx-mips.c.
9439 (mips_elf_hi16_reloc): Rename from _bfd_mips_elf_hi16_reloc and make
9440 static.
9441 (mips_elf_lo16_reloc): Likewise, was _bfd_mips_elf_lo16_reloc.
9442 (mips_elf_got16_reloc): Likewise, was _bfd_mips_elf_got16_reloc.
9443 (mips_elf_gprel32_reloc): Likewise, was _bfd_mips_elf_gprel32_reloc.
9444 (mips_elf32_rtype_to_howto): Rename from mips_rtype_to_howto. Changed
9445 interface to allow selection of the right REL or RELA howto table.
9446 (mips_elf32_object_p): Rename from _bfd_mips_elf_object_p and made
9447 static. Let it refuse n32 objects.
9448 (elf32_mips_grok_prstatus): Rename from _bfd_elf32_mips_grok_prstatus.
9449 (elf32_mips_grok_psinfo): Rename from _bfd_elf32_mips_grok_psinfo.
9450 (elf32_mips_discard_info): Rename from _bfd_elf32_mips_discard_info.
9451 (elf32_mips_ignore_discarded_relocs): Rename from
9452 _bfd_elf32_mips_ignore_discarded_relocs.
9453 (elf32_mips_write_section): Rename from _bfd_elf32_mips_write_section.
9454 (elf32_mips_irix_compat): New function, replaces IRIX_COMPAT.
9455 (elf_mips_howto_table_rela): Remove.
9456 * elf64-mips.c: Moved most code to elfxx-mips.c.
9457 (bfd_elf64_bfd_reloc_type_lookup): Make static.
9458 (mips_elf64_rtype_to_howto): New function.
9459 (mips_elf64_object_p): Likewise.
9460 (elf64_mips_irix_compat): Likewise.
9461 * elfxx-mips.c: New file containing common code merged together from
9462 elf32-mips.c and elf64-mips.c.
9463 * elfxx-mips.h: New file containing MIPS specific prototypes from
9464 elf-bfd.h.
9465 * elfxx-target.h: Add handling for elf_backend_mips_irix_compat and
9466 elf_backend_mips_rtype_to_howto.
9467
9468 2002-04-04 Alan Modra <amodra@bigpond.net.au>
9469
9470 * srec.c (MAXCHUNK, Chunk): Revise comments.
9471 (srec_write_record): Correct buffer size.
9472 (srec_write_header): Do without intermediate buffer.
9473 (srec_write_section): Validate Chunk.
9474 (srec_write_terminator): Pass NULL instead of dummy buffer.
9475 (srec_write_symbols): Pass file and symbol names directly to
9476 bfd_bwrite so sprintf won't overflow buffer.
9477
9478 2002-04-03 Jakub Jelinek <jakub@redhat.com>
9479
9480 * elf32-sparc.c (elf32_sparc_relocate_section): Don't emit dynamic
9481 PC relative relocs against hidden symbols.
9482 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
9483
9484 2002-04-03 Alan Modra <amodra@bigpond.net.au>
9485
9486 * elf.c (_bfd_elf_make_section_from_shdr): When setting section
9487 LMAs, loop over segments until p_vaddr and p_memsz specify an
9488 extent enclosing the section.
9489
9490 2002-04-02 Nick Clifton <nickc@cambridge.redhat.com>
9491
9492 * ihex.c (ihex_write_object_contents): Do not allow records to
9493 cross a 64K boundary - wrap if necessary.
9494
9495 2002-04-01 Nathan Williams <nathanw@wasabisystems.com>
9496
9497 * elf.c (elfcore_netbsd_get_lwpid): Fix off-by-one error
9498 which caused the returned LWP ID to always be 0.
9499
9500 2002-04-01 Richard Henderson <rth@redhat.com>
9501
9502 * elf32-sparc.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
9503 (elf32_sparc_relocate_section): Use it to figure out when to
9504 initialize .got entries.
9505 * elf64-sparc.c: Similarly.
9506
9507 2002-03-28 Alan Modra <amodra@bigpond.net.au>
9508
9509 * linker.c (link_action): Ignore duplicate warning syms.
9510 (_bfd_generic_link_write_global_symbol): Follow warning symbol link.
9511 * elflink.h (elf_adjust_dynstr_offsets): Likewise.
9512 (elf_adjust_dynamic_symbol): Likewise.
9513 (elf_export_symbol): Likewise.
9514 (elf_link_find_version_dependencies): Likewise.
9515 (elf_link_assign_sym_version): Likewise.
9516 (elf_link_sec_merge_syms): Likewise.
9517 (elf_link_output_extsym): Likewise.
9518 (elf_gc_sweep_symbol): Likewise.
9519 (elf_gc_propagate_vtable_entries_used): Likewise.
9520 (elf_gc_smash_unused_vtentry_relocs): Likewise.
9521 (elf_gc_allocate_got_offsets): Likewise.
9522 (elf_collect_hash_codes): Likewise.
9523 * elflink.c (elf_link_renumber_hash_table_dynsyms): Likewise.
9524 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
9525 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
9526 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
9527 * elf32-arm.h (elf32_arm_discard_copies): Likewise.
9528 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Likewise.
9529 (elf_cris_discard_excess_dso_dynamics): Likewise.
9530 * elf32-hppa.c (clobber_millicode_symbols): Likewise.
9531 (mark_PIC_calls): Likewise.
9532 (allocate_plt_static): Likewise.
9533 (allocate_dynrelocs): Likewise.
9534 (readonly_dynrelocs): Likewise.
9535 * elf32-i386.c (allocate_dynrelocs): Likewise.
9536 (readonly_dynrelocs): Likewise.
9537 * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
9538 * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
9539 * elf32-mips.c (mips_elf_output_extsym): Likewise.
9540 (mips_elf_sort_hash_table_f): Likewise.
9541 (mips_elf_check_mips16_stubs): Likewise.
9542 * elf32-s390.c (allocate_dynrelocs): Likewise.
9543 (readonly_dynrelocs): Likewise.
9544 * elf32-sh.c (sh_elf_discard_copies): Likewise.
9545 * elf32-xstormy16.c (xstormy16_relax_plt_check): Likewise.
9546 (xstormy16_relax_plt_realloc): Likewise.
9547 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
9548 (elf64_alpha_output_extsym): Likewise.
9549 * elf64-hppa.c (elf64_hppa_mark_exported_functions): Likewise.
9550 * elf64-mips.c (mips_elf64_sort_hash_table_f): Likewise.
9551 (mips_elf64_check_mips16_stubs): Likewise.
9552 (mips_elf64_output_extsym): Likewise.
9553 * elf64-ppc.c (func_desc_adjust): Likewise.
9554 (allocate_dynrelocs): Likewise.
9555 (readonly_dynrelocs): Likewise.
9556 * elf64-s390.c (allocate_dynrelocs): Likewise.
9557 (readonly_dynrelocs): Likewise.
9558 * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
9559 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
9560 (readonly_dynrelocs): Likewise.
9561 * elfxx-ia64.c (elfNN_ia64_global_dyn_sym_thunk): Likewise.
9562 * aoutx.h (aout_link_write_other_symbol): Likewise.
9563 * cofflink.c (_bfd_coff_write_task_globals): Likewise.
9564 (_bfd_coff_write_global_sym): Likewise.
9565 * i386linux.c (linux_tally_symbols): Likewise.
9566 * m68klinux.c (linux_tally_symbols): Likewise.
9567 * sparclinux.c (linux_tally_symbols): Likewise.
9568 * pdp11.c (aout_link_write_other_symbol): Likewise.
9569 * sunos.c (sunos_scan_dynamic_symbol): Likewise.
9570 * xcofflink.c (xcoff_build_ldsyms): Likewise.
9571 (xcoff_write_global_symbol): Likewise.
9572
9573 * cofflink.c (_bfd_coff_final_link): Formatting.
9574 * cpu-mips.c (mips_compatible): Make static, prototype.
9575 * elf32-i386.c (elf_i386_check_relocs): Formatting.
9576 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
9577 * elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
9578 * elf64-mips.c (mips_elf64_sort_hash_table): Likewise.
9579 (mips_elf64_final_link): Likewise.
9580 * elflink.h (elf_link_find_version_dependencies): Remove duplicate
9581 prototype.
9582
9583 2002-03-27 Nick Clifton <nickc@cambridge.redhat.com>
9584
9585 * coff-arm.c (SWAP_IN_RELOC_OFFSET): Define.
9586 (SWAP_OUT_RELOC_OFFSET): Define.
9587
9588 2002-03-27 Gregory Steuck <greg@nest.cx>
9589
9590 * elf.c (_bfd_elf_get_symtab_upper_bound): Leave space for
9591 terminating NULL if empty symbol table.
9592 (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise.
9593
9594 2002-03-26 H.J. Lu (hjl@gnu.org)
9595
9596 * elflink.h (elf_link_input_bfd): Revert the last change since
9597 the gcc exception handling isn't fixed yet.
9598
9599 2002-03-26 H.J. Lu (hjl@gnu.org)
9600
9601 * elflink.h (elf_link_input_bfd): Complain about relocations
9602 against local symbols in discarded sections.
9603
9604 2002-03-26 Alan Modra <amodra@bigpond.net.au>
9605
9606 * elflink.h (elf_gc_mark): Don't recurse into non-ELF sections.
9607
9608 2002-03-23 Alan Modra <amodra@bigpond.net.au>
9609
9610 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
9611 section file offset for !SEC_LOAD sections.
9612
9613 2002-03-21 Richard Earnshaw <rearnsha@arm.com>
9614
9615 * elf32-arm.h (elf32_arm_final_link_relocate <case R_ARM_GOTOFF>,
9616 <case R_ARM_GOT>): Handle relocations to Thumb functions.
9617
9618 2002-03-21 Alan Modra <amodra@bigpond.net.au>
9619
9620 * coff64-rs6000.c (_bfd_xcoff64_put_symbol_name): Prototype.
9621 Whitespace changes.
9622 * archive.c: Update copyright date.
9623 * bfd-in2.h: Regenerate.
9624 * libbfd.h: Regenerate.
9625 * Makefile.am: Run "make dep-am"
9626 * Makefile.in: Regenerate.
9627 * po/SRC-POTFILES.in: Regenerate.
9628
9629 2002-03-20 Daniel Jacobowitz <drow@mvista.com>
9630
9631 * dwarf2.c (struct funcinfo): Move up.
9632 (lookup_address_in_function_table): New argument function_ptr.
9633 Set it.
9634 (lookup_address_in_line_table): New argument function. If function
9635 is non-NULL, use it to handle ``addr'' before the first line note of
9636 the function.
9637 (comp_unit_find_nearest_line): Update and swap calls to
9638 lookup_address_in_function_table and lookup_address_in_line_table.
9639 * syms.c (_bfd_stab_section_find_nearest_line): Use the first
9640 N_SLINE encountered if we see an N_FUN before any N_SLINE.
9641
9642 2002-03-20 Tom Rix <trix@redhat.com>
9643
9644 * coff-rs6000.c (_bfd_xcoff_stat_arch_elt): Renamed from
9645 _bfd_xcoff_generic_stat_arch_elt. Fix format check.
9646 * coff64-rs6000.c : Use _bfd_xcoff_stat_arch_elt.
9647
9648 2002-03-19 Tom Rix <trix@redhat.com>
9649
9650 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through all
9651 dynamic objects in archives.
9652
9653 2002-03-19 Hans-Peter Nilsson <hp@bitrange.com>
9654
9655 * elflink.h (NAME(bfd_elf,record_link_assignment)): Don't set
9656 STT_NOTYPE symbols to STT_OBJECT.
9657
9658 2002-03-18 Jan Hubicka <jh@suse.cz>
9659
9660 * cpu-i386.c (bfd_x86_64_arch): Rename to "i386:x86-64"
9661
9662 2002-03-18 Tom Rix <trix@redhat.com>
9663
9664 * aix5ppc.core.c : New file for AIX 5 64 bit core support.
9665 * bfd-in.h : Add bfd_xcoff_ar_archive_set_magic declaration.
9666 * coff-rs6000 (do_pad) : New function for archive padding.
9667 (do_copy) : New function for object file copying in archives.
9668 (do_shared_object_padding) : New function for padding shared
9669 objects to their text section alignment in archives.
9670 (bfd_xcoff_ar_achive_set_magic) : Stub.
9671 (xcoff_write_armap_big) : Use do_copy and do_pad.
9672 (xcoff_write_archive_contents_big) : Use do_shared_object_padding,
9673 do_copy and do_pad.
9674 * coff64-rs6000.c (xcoff64_write_ojbect_contents) : Use
9675 bfd_xcoff_magic_number.
9676 (xcoff64_bad_format_hook) : New function for _bfd_bad_format_hook
9677 fop.
9678 (xcoff_backend_data_r) : Use xcoff64_bad_format_hook.
9679 (bfd_xcoff_aix5_backend_data) : New Aix 5 backend data.
9680 (aix5coff64_vec) : New Aix 5 target aix5coff64-rs6000.
9681 * rs6000-core.c : Update copyright date.
9682 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Check for NULL
9683 csectpp.
9684 * coffcode.h (coff_new_section_hook) : Use new accessor macros.
9685 (coff_set_arch_mach_hook) : Add Aix 5 U64_TOCMAGIC magic #.
9686 (coff_set_flags) : Use bfd_xcoff_magic_number.
9687 * libxcoff.h (bfd_xcoff_is_xcoff64): Add U64_TOCMAGIC.
9688 * configure.in : Add powerpc-*-aix5 and rs6000-*-aix5 support.
9689 * Makefile.am : Same.
9690 * config.bfd : Same.
9691 * targets.c : Same.
9692 * configure : Regnerate.
9693 * Makefile.in : Same.
9694 * bfd-in2.h : Same.
9695
9696 2002-03-18 Nick Clifton <nickc@cambridge.redhat.com>
9697
9698 * po/fr.po: Updated version.
9699
9700 2002-03-18 Alan Modra <amodra@bigpond.net.au>
9701
9702 * libbfd.c (bfd_write_bigendian_4byte_int): Return true iff success.
9703 * libbfd.h: Regenerate.
9704 * archive.c (coff_write_armap): Pass on failures from
9705 bfd_write_bigendian_4byte_int.
9706
9707 2002-03-14 H.J. Lu <hjl@gnu.org>
9708
9709 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the BFD
9710 error to bfd_error_nonrepresentable_section for reinit_array
9711 section in DSO.
9712
9713 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
9714
9715 * coffcode.h (coff_slurp_symbol_table): When adding BSF_WEAK flag,
9716 OR it in rather than replacing previously selected flags.
9717
9718 * elfxx-target.h (TARGET_BIG_SYM): Set ar_max_namelen to 15.
9719 (TARGET_LITTLE_SYM): Set ar_max_namelen to 15.
9720
9721 2002-03-14 Alan Modra <amodra@bigpond.net.au>
9722
9723 * cpu-mips.c (mips_compatible): New. Don't check bits_per_word.
9724 (N): Use the above.
9725 * elflink.h (elf_bfd_final_link): Revert last change. Instead,
9726 ensure reloc size matches before calling elf_link_input_bfd.
9727 Add an assert to check reloc size when counting output relocs.
9728
9729 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
9730
9731 * mmo.c (mmo_get_loc): Return NULL rather than false.
9732
9733 2002-03-13 Nick Clifton <nickc@cambridge.redhat.com>
9734
9735 * po/fr.po: Updated version.
9736
9737 2002-03-13 Alan Modra <amodra@bigpond.net.au>
9738
9739 * archures.c (bfd_default_compatible): Test bits_per_word.
9740 * cpu-i386.c (i386_compatible): Remove. Replace occurrences with
9741 bfd_default_compatible.
9742 * cpu-i370.c (i370_compatible): Likewise.
9743 * cpu-sparc.c (sparc_compatible): Likewise.
9744 * cpu-h8300.c (compatible): Test in->arch == out->arch.
9745
9746 * elflink.h: Formatting fixes.
9747 (elf_link_output_extsym): Merge undefined and undef weak cases.
9748
9749 * elflink.h (elf_bfd_final_link): Only call elf_link_input_bfd
9750 when word size of input matches output word size.
9751
9752 2002-03-12 Andreas Jaeger <aj@suse.de>
9753
9754 * cpu-i386.c (i386_compatible): New. Use it instead of
9755 bfd_default_compatible.
9756
9757 2002-03-07 H.J. Lu (hjl@gnu.org)
9758
9759 * coff-sh.c (shcoff_reloc_map): Use bfd_reloc_code_real_type
9760 as the type for bfd_reloc_val.
9761
9762 2002-03-05 John David Anglin <dave@hiauly1.hia.nrc.ca>
9763
9764 * elf-hppa.h (elf_hppa_is_dynamic_loader_symbol): New function.
9765 (elf_hppa_relocate_section): Ignore undefined dynamic loader symbols.
9766 (elf_hppa_final_link_relocate): Correct relocations for indirect
9767 references to local data through the DLT. Fix .opd creation for
9768 local symbols using R_PARISC_LTOFF_FPTR32 and R_PARISC_FPTR64
9769 relocations. Use e_lsel selector for R_PARISC_DLTIND21L,
9770 R_PARISC_LTOFF_FPTR21L and R_PARISC_LTOFF_TP21L as per
9771 "Processor-Specific ELF for PA_RISC, Version 1.43" document.
9772 Similarly, use e_rsel for DLT and LTOFF 'R' relocations.
9773 * elf32-hppa.c (final_link_relocate): Revise relocation selectors
9774 as per "Processor-Specific ELF for PA_RISC, Version 1.43" document.
9775
9776 2002-03-05 Jakub Jelinek <jakub@redhat.com>
9777
9778 * merge.c (_bfd_merge_sections): Don't segfault if there
9779 is nothing to merge due to GC.
9780
9781 2002-03-05 Alan Modra <amodra@bigpond.net.au>
9782
9783 * elf32-hppa.c (clobber_millicode_symbols): Remove hack to keep
9784 symbols that have been forced local.
9785
9786 * elflink.h (elf_bfd_final_link): Call elf_link_output_extsym
9787 to output forced local syms for non-shared link.
9788 (elf_link_output_extsym): Tweak condition for calling backend
9789 adjust_dynamic_symbol so that previous behaviour is kept.
9790 Whitespace changes throughout file.
9791
9792 2002-03-04 H.J. Lu <hjl@gnu.org>
9793
9794 * elf.c (bfd_section_from_shdr): Handle special sections,
9795 .init_array, .fini_array and .preinit_array.
9796 (elf_fake_sections): Likewise.
9797
9798 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Create the
9799 DT entry only if the section is in output for .init_array,
9800 .fini_array and .preinit_array. Complain about .preinit_array
9801 section in DSO.
9802 (elf_bfd_final_link): Warn zero size for .init_array,
9803 .fini_array and .preinit_array sections.
9804
9805 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Remove
9806 SHT_INIT_ARRAY, SHT_FINI_ARRAY and SHT_PREINIT_ARRAY.
9807 (elfNN_ia64_fake_sections): Remove .init_array, .fini_array and
9808 .preinit_array.
9809
9810 2002-03-04 Alan Modra <amodra@bigpond.net.au>
9811
9812 * configure.in (WIN32LIBADD): Don't eval PICFLAG assignment.
9813 * configure: Regenerate.
9814
9815 2002-03-02 Tom Rix <trix@redhat.com>
9816
9817 * coff64-rs6000.c (xcoff64_howto_table): Replace howto types with
9818 symbolic equiv.
9819 * coff-rs6000.c (xcoff_howto_table): Same.
9820
9821 2002-03-01 David Mosberger <davidm@hpl.hp.com>
9822
9823 * elflink.h (size_dynamic_sections): If section named
9824 ".preinit_array" exists, create DT_PREINIT_ARRAY and
9825 DT_PREINIT_ARRAYSZ entries in dynamic table. Analogously for
9826 ".init_array" and ".fini_array".
9827 (elf_bfd_final_link): Handle DT_PREINIT_ARRAYSZ, DT_INIT_ARRAYSZ,
9828 DT_FINI_ARRAYSZ, DT_PREINIT_ARRAY, DT_INIT_ARRAY, and
9829 DT_FINI_ARRAY.
9830
9831 2002-02-26 Andrew Macleod <amacleod@cygnus.com>
9832
9833 * elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local
9834 dynsyms.
9835
9836 2002-02-25 Alan Modra <amodra@bigpond.net.au>
9837
9838 * elf64-hppa.h: Update copyright date.
9839
9840 * elf64-ppc.c (ppc64_elf_check_relocs): Warning fix.
9841 (ppc64_elf_relocate_section): Don't generate power4 style branch
9842 hints for *_BRTAKEN and *_BRNTAKEN relocs.
9843
9844 2002-02-22 Jakub Jelinek <jakub@redhat.com>
9845
9846 * elf64-sh64.c (sh_elf64_relocate_section): Fix a typo from my
9847 last patch.
9848 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
9849
9850 2002-02-21 Andreas Jaeger <aj@suse.de>
9851
9852 * elf64-x86-64.c: Major rework that introduces all recent changes
9853 to the x86-64 backend. Get a closer match to elf32-i386.
9854 (struct elf64_x86_64_dyn_relocs): Rename from
9855 elf64_x86_64_pcrel_relocs_copied, add additional fields. Change
9856 all users.
9857 (struct elf64_x86_64_link_hash_table): Add short cuts to some
9858 sections.
9859 (link_hash_newfunc): Rename from elf64_x86_64_link_hash_newfunc,
9860 remove casts, initialize new hash members.
9861 (create_got_section): New.
9862 (elf64_x86_64_create_dynamic_sections): New.
9863 (elf64_x86_64_copy_indirect_symbol): New.
9864 (elf64_x86_64_check_relocs): Don't allocate space for dynamic
9865 relocs, .got or .relgot here but do it in allocate_dynrelocs.
9866 Reference count possible .plt and .got entries. Don't test input
9867 section SEC_READONLY here to try to avoid copy relocs, and keep
9868 dyn_relocs regardless of ELF_LINK_NON_GOT_REF. Don't set
9869 DF_TEXTREL here. Delay setting of variables until needed. Cache
9870 pointer to "sreloc" section in elf_section_data. Tweak condition
9871 under which .got created. Report files with bad relocation
9872 section names.
9873 (elf64_x86_64_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
9874 Reference count possible .plt entries. Don't deallocate .got and
9875 .relgot space here.
9876 (elf64_x86_64_adjust_dynamic_symbol): Handle nocopyreloc. Don't
9877 do copy reloc processing for weakdefs. Remove redundant casts and
9878 aborts. Delay setting of vars until needed. Move creation of
9879 dynamic symbols and allocation of .plt and .rela.plt to
9880 allocate_dynrelocs. Replace BFD_ASSERT with abort.
9881 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
9882 (allocate_dynrelocs): New.
9883 (readonly_dynrelocs): New.
9884 (elf64_x86_64_size_dynamic_sections): Call readonly_dynrelocs.
9885 Allocate space for dyn relocs. Replace BFD_ASSERT with abort.
9886 Zero out the dynamic allocated content space.
9887 (elf64_x86_64_discard_copies): Removed.
9888 (elf64_x86_64_relocate_section): Make use of dynamic section
9889 short-cuts. Localise vars, and delay setting. Better error
9890 reporting, replace BFD_ASSERT with abort. Check
9891 ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined in the
9892 regular object file and tread the weak definition as the normal
9893 one. Don't discard relocs for undefweak or undefined symbols and
9894 check !DEF_REGULAR as well as DEF_DYNAMIC in test for avoided copy
9895 relocs.
9896 (elf64_x86_64_finish_dynamic_symbol): Don't copy relocs for
9897 symbols that have been forced local. Use same test to decide if
9898 we can use a relative reloc for got as relocate_section. Expand
9899 SHN_UNDEF comment. Move expressions out of function calls.
9900 Replace BFD_ASSERT with abort.
9901 (bfd_elf64_bfd_final_link): Removed.
9902 (elf_backend_copy_indirect_symbol): Define.
9903
9904 2002-02-20 Tom Rix <trix@redhat.com>
9905
9906 * coff-rs6000.c (xcoff_howto_table): Add 16 bit R_BA.
9907 (_bfd_xcoff_reloc_type_lookup): Use it.
9908 * coff64-rs6000.c (xcoff64_howto_table): Same.
9909 (xcoff64_reloc_type_lookup): Same.
9910
9911 2002-02-20 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
9912
9913 * osf-core.c (osf_core_vec): OSF/1 (Digital Unix) core files are
9914 little endian.
9915
9916 2002-02-19 Martin Schwidefsky <schwidefsky@de.ibm.com>
9917
9918 * archures.c (bfd_mach_s390_esa): Rename to bfd_mach_s390_31.
9919 (bfd_mach_s390_esame): Rename to bfd_mach_s390_64.
9920 * bfd-in2.h: Regenerate.
9921 * cpu-s390.c (arch_info_struct): Use renamed architecture defines.
9922 Replace architecture name "s390" with "s390:31-bit" and "s390:esame"
9923 with "s390:64-bit".
9924 * elf32-s390.c (elf_howto_table): Add 32 bit pc relative relocations.
9925 (elf_s390_reloc_type_lookup): Likewise.
9926 (elf_s390_check_relocs): Likewise.
9927 (elf_s390_gc_sweep_hook): Likewise.
9928 (elf_s390_relocate_section): Likewise.
9929 (elf_s390_object_p): Use renamed architecture define.
9930 * elf64-s390.c (elf_s390_object_p): Use renamed architecture define.
9931
9932 2002-02-19 Frank Ch. Eigler <fche@redhat.com>
9933
9934 * syms.c (stt[]): Sorted. Added .init/.fini -> "t" mapping.
9935
9936 2002-02-19 Jakub Jelinek <jakub@redhat.com>
9937
9938 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Enable
9939 absptr -> pcrel optimization for shared libs.
9940 Only create minimal .eh_frame_hdr if absptr FDE encoding in shared
9941 library cannot be converted to pcrel.
9942 (_bfd_elf_eh_frame_section_offset): Return -2 if making absptr
9943 relative.
9944 * elf32-i386.c (elf_i386_relocate_section): If
9945 _bfd_elf_section_offset returned -2, skip, but make sure the
9946 relocation is installed.
9947 * elf32-arm.h (elf32_arm_final_link_relocate): Likewise.
9948 * elf32-cris.c (cris_elf_relocate_section): Likewise.
9949 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
9950 * elf32-i370.c (i370_elf_relocate_section): Likewise.
9951 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
9952 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
9953 * elf32-s390.c (elf_s390_relocate_section): Likewise.
9954 * elf32-sh.c (sh_elf_relocate_section): Likewise.
9955 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
9956 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
9957 * elf64-s390.c (elf_s390_relocate_section): Likewise.
9958 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
9959 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
9960 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
9961 * elf64-alpha.c (elf64_alpha_relocate_section): Handle
9962 _bfd_elf_section_offset returning -2 the same way as -1.
9963 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
9964 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add FIXME
9965 and BFD_ASSERT.
9966 * elf64-mips.c (mips_elf64_create_dynamic_relocation): Likewise.
9967
9968 2002-02-18 Tom Rix <trix@redhat.com>
9969
9970 * xcofflink.c (bfd_xcoff_link_gernate_rtinit): Add -brtl support.
9971 (bfd_xcoff_size_dynamic_sections): Same.
9972 * bfd-in.h (bfd_xcoff_link_generate_rtinit): Same.
9973 (bfd_xcoff_size_dynamic_sections): Same.
9974 * coff-rs6000.c (xcoff_generate_rtinit): Same.
9975 * coff-rs646000.c (xcoff64_generate_rtinit): Same.
9976 * libxcoff.h (struct xcoff_backend_data_rec): Same.
9977 * xcofflink.c (xcoff_build_ldsyms, xcoff_link_add_symbols): Clean.
9978 * bfd-in2.h: Regenerate.
9979
9980 2002-02-18 Alan Modra <amodra@bigpond.net.au>
9981
9982 * elf64-ppc.c (STFD_FR0_0R1, LFD_FR0_0R1, BLR): Define.
9983 (struct ppc_link_hash_table): Add sfpr.
9984 (ppc64_elf_link_hash_table_create): Init it.
9985 (ppc64_elf_create_dynamic_sections): Split creation of .stub and
9986 .glink out to..
9987 (create_linkage_sections): ..here. Make .sfpr too.
9988 (ppc64_elf_check_relocs): Call create_linkage_sections, and set
9989 dynobj early.
9990 (MIN_SAVE_FPR, MAX_SAVE_FPR): Define.
9991 (ppc64_elf_func_desc_adjust): Look for missing ._savef* and
9992 ._restf* functions, and create as needed.
9993 (func_desc_adjust): Only force_local for shared libs.
9994
9995 2002-02-18 David O'Brien <obrien@FreeBSD.org>
9996
9997 * configure.in: Bump version number post 2.12 branching.
9998 * configure: Regenerate.
9999
10000 2002-02-17 Hans-Peter Nilsson <hp@bitrange.com>
10001
10002 * mmo.c: Correct and improve comments.
10003 (mmo_write_chunk): Store trailing byte in bfd buffer; don't
10004 zero-pad. Use input to fill up non-empty bfd buffer.
10005 (mmo_flush_chunk): New function.
10006 (mmo_write_loc_chunk): Add parameter last_vmap, all callers
10007 changed. Don't emit location specifier if VMA is same as
10008 *LAST_VMAP after omitting leading zero contents. Call
10009 mmo_flush_chunk before emitting location specifier.
10010 (mmo_write_loc_chunk_list): Call mmo_flush_chunk when finished
10011 with mmo_write_loc_chunk calls.
10012 (mmo_internal_write_section): Call mmo_flush_chunk after
10013 mmo_write_chunk.
10014 (mmo_write_symbols_and_terminator): Move :Main to first position
10015 in symbol array. Add faked one if it does not exist if there are
10016 other symbols. Don't add it if there are no symbols at all. Move
10017 out test for value of :Main from symbol loop. Rename table
10018 fakemain to maintable and variable mainsym to fakemain.
10019
10020 2002-02-15 Richard Henderson <rth@redhat.com>
10021
10022 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: A target
10023 section with no got matches any got. Simplify error generaion.
10024
10025 2002-02-15 Alan Modra <amodra@bigpond.net.au>
10026
10027 Support arbitrary length fill patterns.
10028 * linker.c (bfd_new_link_order): Zero all fields with bfd_zalloc.
10029 (_bfd_default_link_order): Remove bfd_fill_link_order code.
10030 Call default_data_link_order.
10031 (default_fill_link_order): Delete.
10032 (default_data_link_order): New function.
10033 * elf32-mips.c (_bfd_mips_elf_final_link): Replace occurrences
10034 of bfd_fill_link_order with bfd_data_link_order.
10035 * elf64-alpha.c (elf64_alpha_final_link): Likewise.
10036 * elf64-mips.c (mips_elf64_final_link): Likewise.
10037
10038 * bfd.c (bfd_scan_vma): Clamp overflows to max bfd_vma value.
10039 Correct value returned in "end" for "0x<non-hex>".
10040
10041 2002-02-14 Nick Clifton <nickc@cambridge.redhat.com>
10042
10043 * cpu-arm.c (processors): Replace 'arch' field with 'mach'.
10044 (scan): Test against 'mach' field in info structure.
10045
10046 2002-02-14 Alan Modra <amodra@bigpond.net.au>
10047
10048 * elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD.
10049
10050 2002-02-14 Matt Fredette <fredette@netbsd.org>
10051
10052 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize
10053 EF_M68000.
10054
10055 2002-02-13 Nick Clifton <nickc@cambridge.redhat.com>
10056
10057 * elf.c (_bfd_elf_make_section_from_shdr): Do not insist on
10058 non-zero physical addresses when adjusting the LMAs of new
10059 sections.
10060
10061 2002-02-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
10062
10063 * elf-hppa.h (elf_hppa_reloc_final_type): New function stripped
10064 from _bfd_elf_hppa_gen_reloc_type.
10065 (_bfd_elf_hppa_gen_reloc_type): Remove duplicate prototype.
10066 * elf32-hppa.h (elf32_hppa_reloc_final_type): Add protptype.
10067 * elf32-hppa.c: Include elf32-hppa.h before elf-hppa.h.
10068 * elf64-hppa.h (elf64_hppa_reloc_final_type): Add protptype.
10069
10070 2002-02-12 Alexandre Oliva <aoliva@redhat.com>
10071
10072 * elf-m10300.c (mn10300_elf_relax_section): Skip section before
10073 loading its contents if there's nothing to do in it.
10074
10075 2002-02-12 Alan Modra <amodra@bigpond.net.au>
10076
10077 * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for crossing
10078 64k boundary.
10079
10080 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Add dynamic
10081 DT_PPC64_OPD and DT_PPC64_OPDSZ tags.
10082 (ppc64_elf_finish_dynamic_sections): Set values for them.
10083
10084 2002-02-11 Michael Snyder <msnyder@redhat.com>
10085
10086 * elf-bfd.h (elfcore_write_lwpstatus): Add prototype.
10087 * elf.c (elfcore_grok_pstatus): Add prototype.
10088 (elfcore_grok_lwpstatus): Add prototype.
10089 (elfcore_write_lwpstatus): New function.
10090 (elfcore_write_pstatus): Fix typo, eliminate unnecessary memcpy.
10091
10092 2002-02-11 Alexandre Oliva <aoliva@redhat.com>
10093
10094 * elf32-sh.c: Added missing prototypes.
10095 * elf32-sh64.c: Likewise.
10096 (sh_elf_align_loads): Mark unused args as such.
10097 * elf64-sh64.c: Added missing prototypes.
10098 (struct elf_sh64_link_hash_entry): Fix typo.
10099 (sh_elf64_relocate_section): Fix info argument passed to
10100 _bfd_elf_section_offset.
10101
10102 2002-02-11 Alan Modra <amodra@bigpond.net.au>
10103
10104 * Makefile.am: "make dep-am".
10105 * Makefile.in: Regenerate.
10106 * aclocal.m4: Regenerate.
10107 * config.in: Regenerate.
10108 * configure: Regenerate.
10109
10110 2002-02-10 Daniel Jacobowitz <drow@mvista.com>
10111
10112 * coff-rs6000.c (xcoff_generate_rtinit): Silence uninitialized
10113 variable warnings.
10114 * elf32-sh.c (sh_elf_relax_section): Silence signed/unsigned
10115 comparison warning.
10116 * trad-core.c (trad_unix_core_file_p): Silence pointer/integer
10117 cast warnings for the common case.
10118
10119 2002-02-10 Hans-Peter Nilsson <hp@bitrange.com>
10120
10121 * config.bfd (sh-*-linux*, sh-*-elf* | sh-*-rtemself*): Add sh64
10122 vectors.
10123 (sh-*-netbsdelf*): New, to trump sh*-*-netbsdelf* and add sh64
10124 vectors.
10125
10126 2002-02-09 Richard Henderson <rth@redhat.com>
10127
10128 * elf64-alpha.c (elf64_alpha_howto): Add R_ALPHA_BRSGP.
10129 (elf64_alpha_reloc_map, elf64_alpha_check_relocs): Likewise.
10130 (elf64_alpha_relocate_section): Likewise.
10131 * reloc.c (BFD_RELOC_ALPHA_BRSGP): New.
10132 * bfd-in2.h, libbfd.h: Rebuild.
10133
10134 2002-02-09 Hans-Peter Nilsson <hp@bitrange.com>
10135
10136 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs): Check
10137 that base-plus-offset reloc accounting is consistent.
10138 (mmix_elf_relax_section): Keep base-plus-offset reloc accounting
10139 up to date for undefined symbols.
10140
10141 2002-02-08 Eric Christopher <echristo@redhat.com>
10142
10143 From Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
10144
10145 * elf32-mips.c (_bfd_mips_elf_fake_sections): Don't create .rela
10146 sections for the O32 ABI.
10147
10148 2002-02-08 Chris Demetriou <cgd@broadcom.com>
10149
10150 * elf32-arm.h: Fix formatting of _("...").
10151 * elf32-d10v.c: Likewise.
10152 * elf32-m68k.c: Likewise.
10153 * elf32-mips.c: Likewise.
10154
10155 2002-02-08 Ivan Guzvinec <ivang@opencores.org>
10156
10157 * coff-or32.c: Fix compile time warning messages.
10158
10159 2002-02-08 Alexandre Oliva <aoliva@redhat.com>
10160
10161 Contribute sh64-elf.
10162 2002-01-23 Alexandre Oliva <aoliva@redhat.com>
10163 * reloc.c (R_SH_GOTPLT32, R_SH_GOT_LOW16, R_SH_GOT_MEDLOW16,
10164 R_SH_GOT_MEDHI16, R_SH_GOT_HI16, R_SH_GOTPLT_LOW16,
10165 R_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_HI16,
10166 R_SH_PLT_LOW16, R_SH_PLT_MEDLOW16, R_SH_PLT_MEDHI16,
10167 R_SH_PLT_HI16, R_SH_GOTOFF_LOW16, R_SH_GOTOFF_MEDLOW16,
10168 R_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_HI16, R_SH_GOTPC_LOW16,
10169 R_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDHI16, R_SH_GOTPC_HI16,
10170 R_SH_GOT10BY4, R_SH_GOTPLT10BY4, R_SH_GOT10BY8, R_SH_GOTPLT10BY8,
10171 R_SH_COPY64, R_SH_GLOB_DAT64, R_SH_JMP_SLOT64, R_SH_RELATIVE64):
10172 New relocs.
10173 * libbfd.h, bfd-in2.h: Rebuilt.
10174 * elf32-sh.c (sh_elf_howto_table): Define new relocs.
10175 (sh_reloc_map): Map them.
10176 (PLT_ENTRY_SIZE, elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
10177 elf_sh_plt_entry_be, elf_sh_plt_entry_le, elf_sh_pic_plt_entry_be,
10178 elf_sh_pic_plt_entry_le, elf_sh_plt0_entry, elf_sh_plt_entry,
10179 elf_sh_pic_plt_entry, elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
10180 elf_sh_plt0_gotplt_offset, elf_sh_plt_temp_offset,
10181 elf_sh_plt_symbol_offset, elf_sh_plt_reloc_offset,
10182 movi_shori_putval) [INCLUDE_SHMEDIA]: New.
10183 (elf_sh_link_hash_entry) [INCLUDE_SHMEDIA]: Add
10184 datalabel_got_offset.
10185 (sh_elf_link_hash_newfunc): Initialize it.
10186 (sh_elf_relocate_section): Augment the scope of
10187 seen_stt_datalabel. Introduce GOTPLT support. Extend GOTPC, PLT,
10188 GOT and GOTOFF handling to new SHmedia relocation types. Support
10189 GOT_BIAS.
10190 (sh_elf_check_relocs): Likewise.
10191 (sh_elf_finish_dynamic_symbol) [TARGET_SHMEDIA]: Set up values in
10192 PLT entries using movi_shori_putval. Support GOT_BIAS.
10193 (sh_elf_finish_dynamic_sections): Likewise.
10194 * elf32-sh64.c (shmedia_prepare_reloc): Do not add addend to
10195 relocation, it's now done by the caller.
10196 (GOT_BIAS): New.
10197 * elf64-sh64.c (GOT_BIAS, PLT_ENTRY_SIZE, elf_sh64_sizeof_plt,
10198 elf_sh64_plt_plt0_offset, elf_sh64_plt0_gotplt_offset,
10199 elf_sh64_plt_temp_offset, elf_sh64_plt_symbol_offset,
10200 elf_sh64_plt_reloc_offset, ELF_DYNAMIC_INTERPRETER,
10201 elf_sh64_pcrel_relocs_copied, elf_sh64_link_hash_entry,
10202 elf_sh64_link_hash_table, sh64_elf64_link_hash_traverse,
10203 sh64_elf64_hash_table): New.
10204 (sh_elf64_howto_table): Introduce new relocs.
10205 (sh_elf64_info_to_howto): Accept new PIC relocs.
10206 (sh_elf64_relocate_section): Augment the scope of
10207 seen_stt_datalabel. Support new PIC relocs.
10208 (sh_elf64_check_relocs): Support new PIC relocs.
10209 (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le,
10210 elf_sh64_plt_entry_be, elf_sh64_plt_entry_le,
10211 elf_sh64_pic_plt_entry_be, elf_sh64_pic_plt_entry_le,
10212 elf_sh64_plt0_entry, elf_sh64_plt_entry, elf_sh64_pic_plt_entry,
10213 sh64_elf64_link_hash_newfunc, sh64_elf64_link_hash_table_create,
10214 movi_shori_putval, movi_3shori_putval,
10215 sh64_elf64_create_dynamic_sections,
10216 sh64_elf64_adjust_dynamic_symbol, sh64_elf64_discard_copies,
10217 sh64_elf64_size_dynamic_sections,
10218 sh64_elf64_finish_dynamic_symbol,
10219 sh64_elf64_finish_dynamic_sections): New.
10220 (elf_backend_create_dynamic-sections,
10221 bfd_elf64_bfd_link_hash_table_create,
10222 elf_backend_adjust_dynamic_symbol,
10223 elf_backend_size_dynamic_sections,
10224 elf_backend_finish_dynamic_symbol,
10225 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
10226 elf_backend_plt_readonly, elf_backend_want_plt_sym,
10227 elf_backend_got_header_size, elf_backend_plt_header_size):
10228 Define.
10229 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
10230 * elf32-sh.c: Renumbered and renamed some SH5 relocations to
10231 match official numbers and names; moved unmaching ones to the
10232 range 0xf2-0xff.
10233 * elf32-sh64.c, elf64-sh64.c: Likewise.
10234 2001-03-12 DJ Delorie <dj@redhat.com>
10235 * elf32-sh.c (sh_elf_relax_section): Don't relax SHmedia
10236 sections.
10237 2001-03-12 DJ Delorie <dj@redhat.com>
10238 * elf32-sh64.c (shmedia_prepare_reloc): Validate relocs that must
10239 be aligned.
10240 * elf64-sh64.c (sh_elf64_relocate_section): Ditto.
10241 2001-01-14 Hans-Peter Nilsson <hpn@cygnus.com>
10242 * elf32-sh64.c (bfd_elf32_bfd_copy_private_section_data): Define.
10243 (sh64_elf_fake_sections): Set type to SHT_SH5_CR_SORTED for a
10244 .cranges section with SEC_SORT_ENTRIES set.
10245 (sh64_backend_section_from_shdr): Set SEC_SORT_ENTRIES on an
10246 incoming sorted .cranges section.
10247 (sh64_bfd_elf_copy_private_section_data): New.
10248 (sh64_elf_final_write_processing): Only sort .cranges and modify
10249 start address if called by linker.
10250 2001-01-08 Ben Elliston <bje@redhat.com>
10251 * elf32-sh64.c (sh64_elf_final_write_processing): Activate
10252 Hans-Peter Nilsson's set bit 0 patch from 2001-01-06.
10253 * elf64-sh64.c (sh64_elf64_final_write_processing): Ditto.
10254 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
10255 * elf64-sh64.c (sh_elf64_howto_table): No open brace at start of
10256 line. Add comments before all entries.
10257 <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct and clarify describing
10258 comment.
10259 (sh_elf64_reloc): Correct head comment.
10260 (sh_elf64_relocate_section): Correct spacing.
10261 <relocating for a local symbol>: Do not honour STO_SH5_ISA32;
10262 instead call reloc_dangerous callback.
10263 <case R_SH_SHMEDIA_CODE>: New case.
10264 (sh_elf64_gc_mark_hook): Correct spacing.
10265 (sh_elf64_check_relocs): Ditto.
10266 * elf32-sh64.c (shmedia_prepare_reloc) <case R_SH_SHMEDIA_CODE>:
10267 New case.
10268 * elf32-sh.c: Correct #endif comments for #ifndef-wrapped
10269 functions.
10270 (sh_elf_howto_table) <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct,
10271 clarify describing comment. Add comments before all entries.
10272 (sh_elf_relocate_section) <relocating for a local symbol>: Do not
10273 honour STO_SH5_ISA32; instead call reloc_dangerous callback.
10274 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
10275 Sort .cranges section in final link. Prepare to set bit 0 on
10276 entry address.
10277 * elf32-sh64.c (struct sh64_find_section_vma_data): New.
10278 (sh64_elf_link_output_symbol_hook): Fix typo in prototype.
10279 (sh64_elf_set_mach_from_flags): Set SEC_DEBUGGING on incoming
10280 .cranges section.
10281 (sh64_backend_section_from_shdr): New, to recognize
10282 SHT_SH5_CR_SORTED on incoming .cranges section.
10283 (elf_backend_section_from_shdr): Define.
10284 (sh64_elf_final_write_processing): Sort outgoing .cranges
10285 section. (New, temporarily disabled:) Set bit 0 on entry address
10286 according to ISA type.
10287 (sh64_find_section_for_address): New.
10288 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb,
10289 crange_bsearch_cmpl): Move here from opcodes/sh64-dis.c.
10290 (sh64_address_in_cranges): Move here from opcodes/sh64-dis.c. Use
10291 bfd_malloc, not xmalloc.
10292 (sh64_get_contents_type): Move here from opcodes/sh64-dis.c. Make
10293 global.
10294 * elf32-sh64.c (sh64_elf64_final_write_processing): New, (but
10295 temporarily disabled) setting bit 0 on entry address.
10296 (elf_backend_final_write_processing): Define.
10297 2001-01-05 Hans-Peter Nilsson <hpn@cygnus.com>
10298 * elf32-sh.c (sh_elf_howto_table) <R_SH_PT_16>: Adjust fields to
10299 be a proper relocation for PTA and PTB rather than a marker.
10300 <R_SH_IMMU5, R_SH_IMMS6, R_SH_IMMU6, R_SH_IMMS10, R_SH_IMMS10BY2,
10301 R_SH_IMMS10BY4, R_SH_IMMS10BY8, R_SH_IMMS16, R_SH_IMMU16,
10302 R_SH_IMM_LOW16, R_SH_IMM_LOW16_PCREL, R_SH_IMM_MEDLOW16,
10303 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16_PCREL,
10304 R_SH_IMM_HI16, R_SH_IMM_HI16_PCREL, R_SH_64, R_SH_64_PCREL>:
10305 Zero src_mask.
10306 * elf64-sh64.c: Ditto.
10307 (sh_elf64_relocate_section) <case R_SH_PT_16>: New case.
10308 * elf32-sh64.c: Include opcodes/sh64-opc.h
10309 (shmedia_prepare_reloc): Take a bfd_link_info pointer as first
10310 argument. Drop const qualifiers from "bfd *" and "bfd_byte *"
10311 parameters. No unused parameters. Caller changed.
10312 <case R_SH_PT_16>: New case.
10313 * Makefile.am (elf32-sh64.lo): Add dependency on sh64-opc.h.
10314 * Makefile.in: Regenerate.
10315 2000-12-30 Hans-Peter Nilsson <hpn@cygnus.com>
10316 * elf64-sh64.c (sh64_elf64_fake_sections): Set SHF_SH5_ISA32 for
10317 all code sections.
10318 (sh_elf64_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
10319 (sh64_elf_merge_private_data): Ditto.
10320 * elf32-sh64.c (sh64_elf_fake_sections): Use sh64_elf_section_data
10321 to access stored section flags.
10322 (sh64_elf_final_write_processing): Return immediately unless
10323 called by linker. Use sh64_elf_section_data (cranges) to get size
10324 of linker-generated cranges entries.
10325 (sh64_elf_copy_private_data): Add missing "return true".
10326 (sh64_elf_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
10327 (sh_elf64_merge_private_data): Ditto.
10328 2000-12-19 Hans-Peter Nilsson <hpn@cygnus.com>
10329 * elf64-sh64.c (sh64_elf64_fake_sections): New, copy of
10330 elf64-sh64.c:sh64_elf_fake_sections.
10331 (elf_backend_fake_sections): Define as sh64_elf64_fake_sections.
10332 2000-12-18 Hans-Peter Nilsson <hpn@cygnus.com>
10333 * elf32-sh64.c (sh64_elf_copy_private_data_internal): Delete.
10334 (sh64_elf_final_write_processing): New.
10335 (elf_backend_final_write_processing): Define.
10336 (sh64_elf_fake_sections): Get header flags from tdata field.
10337 (sh64_elf_copy_private_data): Do not call
10338 sh64_elf_copy_private_data_internal, just copy e_flags field.
10339 (sh64_elf_merge_private_data): Do not call
10340 sh64_elf_copy_private_data_internal.
10341 2000-12-12 Hans-Peter Nilsson <hpn@cygnus.com>
10342 Remove EF_SH64_ABI64, let ELF size make difference.
10343 Remove SH64-specific BFD section flag.
10344 * elf32-sh64.c (sh64_elf_fake_sections): Recognize section as
10345 containing SHmedia through elf_section_data (asect)->tdata
10346 non-zero, not using a BFD section flag.
10347 (sh64_elf_set_mach_from_flags): Don't recognize EF_SH64_ABI64.
10348 (sh64_elf_merge_private_data): Similar.
10349 (elf_backend_section_flags): Don't define.
10350 (sh64_elf_backend_section_flags): Delete.
10351 * elf64-sh64.c (sh_elf64_set_mach_from_flags): Recognize EF_SH64,
10352 not EF_SH64_ABI64.
10353 (sh_elf64_merge_private_data): Similar.
10354 * section.c (Section flags definitions): Don't define
10355 SEC_SH_ISA_SHMEDIA.
10356 (bfd-in2.h): Regenerate.
10357 2000-12-09 Hans-Peter Nilsson <hpn@cygnus.com>
10358 Make DataLabel references work with partial linking.
10359 * elf32-sh64.c: Fix formatting.
10360 (sh64_elf_link_output_symbol_hook): New.
10361 (elf_backend_link_output_symbol_hook): Define to
10362 sh64_elf_link_output_symbol_hook.
10363 (sh64_elf_add_symbol_hook): Make DataLabel symbol just global
10364 undefined if partial linking. Adjust sanity check.
10365 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): New.
10366 (elf_backend_link_output_symbol_hook): Define to
10367 sh64_elf64_link_output_symbol_hook.
10368 (sh64_elf64_add_symbol_hook): Make DataLabel symbol just global
10369 undefined if partial linking. Adjust sanity check.
10370 2000-12-07 Hans-Peter Nilsson <hpn@cygnus.com>
10371 Implement semantics for inter-file DataLabel references.
10372 * elf64-sh64.c (DATALABEL_SUFFIX): Define.
10373 (sh64_elf64_add_symbol_hook): New.
10374 (sh_elf64_relocate_section): If passing an indirect symbol with
10375 st_type STT_DATALABEL on the way to a symbol with st_other
10376 STO_SH5_ISA32, do not bitor 1 to the relocation.
10377 (elf_backend_add_symbol_hook): Define to
10378 sh64_elf64_add_symbol_hook.
10379 * elf64-sh32.c: Tweak comments.
10380 (DATALABEL_SUFFIX): Define.
10381 (sh64_elf_add_symbol_hook): New.
10382 (elf_backend_add_symbol_hook): Define to sh64_elf_add_symbol_hook.
10383 * elf32-sh.c (sh_elf_relocate_section): If passing an indirect
10384 symbol with st_type STT_DATALABEL on the way to a symbol with
10385 st_other STO_SH5_ISA32, do not bitor 1 to the relocation.
10386 2000-12-05 Hans-Peter Nilsson <hpn@cygnus.com>
10387 Pass through STT_DATALABEL.
10388 * elf32-sh64.c (sh64_elf_get_symbol_type): New.
10389 (elf_backend_get_symbol_type): Define.
10390 * elf64-sh64.c (sh64_elf64_get_symbol_type): New.
10391 (elf_backend_get_symbol_type): Define.
10392 2000-11-30 Hans-Peter Nilsson <hpn@cygnus.com>
10393 * elf32-sh64.c: Tweak comments.
10394 (sh64_elf_copy_private_data_internal): Add prototype.
10395 (bfd_elf32_bfd_set_private_flags): Define.
10396 (sh64_elf_copy_private_data_internal): Compare machine name, not
10397 textual BFD target name, to check whether to copy section flag
10398 SHF_SH5_ISA32.
10399 (sh64_elf_merge_private_data): Validize bfd_get_arch_size.
10400 Tweak section-contents-type-mismatch message.
10401 (shmedia_prepare_reloc): Add ATTRIBUTE_UNUSED markers.
10402 Validize reloc-types.
10403 * elf64-sh64.c: New file.
10404 * targets.c (bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec): Declare.
10405 * Makefile.am (BFD64_BACKENDS): Add elf64-sh64.lo.
10406 (BFD64_BACKENDS_CFILES): Add elf64-sh64.c.
10407 Regenerate dependencies.
10408 * Makefile.in: Regenerate.
10409 * config.bfd (sh64-*-elf*): Add bfd_elf64_sh64_vec and
10410 bfd_elf64_sh64l_vec.
10411 * configure.in: Handle bfd_elf64_sh64_vec and
10412 bfd_elf64_sh64l_vec.
10413 * configure: Regenerate.
10414 * po/POTFILES.in: Regenerate.
10415 * po/bfd.pot: Regenerate.
10416 2000-11-29 Hans-Peter Nilsson <hpn@cygnus.com>
10417 * elf32-sh64.c (sh64_elf_set_mach_from_flags): Do not recognize
10418 anything else but EF_SH64 and EF_SH64_ABI64.
10419 (sh64_elf_merge_private_data): Emit error for anything else but
10420 EF_SH64 and EF_SH64_ABI64.
10421 * config.bfd: Remove bfd_elf32_shblin_vec and bfd_elf32_shlin_vec
10422 from targ_selvecs.
10423 * configure.in: Add cofflink.lo to bfd_elf32_sh64_vec and
10424 bfd_elf32_sh64l_vec as a temporary measure.
10425 * configure: Regenerate.
10426 2000-11-27 Hans-Peter Nilsson <hpn@cygnus.com>
10427 * cpu-sh.c (arch_info_struct): Include sh5 item
10428 unconditionalized.
10429 * config.bfd (sh64-*-elf*): Do not set targ_cflags.
10430 Add targ_selvecs bfd_elf32_sh_vec, bfd_elf32_shl_vec,
10431 bfd_elf32_shblin_vec and bfd_elf32_shlin_vec.
10432 * elf32-sh64.c: Tweak comments.
10433 (sh64_elf_set_mach_from_flags): Recognize all machine flags that
10434 are proper subsets of SH64 as bfd_mach_sh5. Add EF_SH64_ABI64.
10435 (sh64_elf_copy_private_data_internal): Wrap long line.
10436 (sh64_elf_merge_private_data): Rewrite to allow objects from
10437 SH64 subsets to be linked together.
10438 (INCLUDE_SHMEDIA): Define.
10439 * elf32-sh.c (sh_elf_relocate_section) <local symbol>:
10440 Parenthesize plus-expression inside or-expression.
10441 <global symbol>: Ditto.
10442 (sh_elf_set_mach_from_flags): Remove code refusing
10443 deleted EF_SH64_32BIT_ABI flag.
10444 2000-11-26 Hans-Peter Nilsson <hpn@cygnus.com>
10445 * elf32-sh.c (sh_elf_howto_table) <R_SH_IMM_LOW16_PCREL,
10446 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16_PCREL,
10447 R_SH_IMM_HI16_PCREL, R_SH_64_PCREL>: Set pcrel_offset to true.
10448 (sh_elf_relocate_section) <local symbol>: Or 1 in
10449 calculation of relocation if sym->st_other & STO_SH5_ISA32.
10450 <global symbol>: Ditto if h->other & STO_SH5_ISA32.
10451 * elf32-sh64.c (shmedia_prepare_reloc): Add rel->r_addend to
10452 relocation.
10453 2000-11-24 Hans-Peter Nilsson <hpn@cygnus.com>
10454 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64.lo.
10455 (BFD32_BACKENDS_CFILES): Add elf32-sh64.c.
10456 Regenerate dependencies.
10457 * Makefile.in: Regenerate.
10458 * archures.c: Add bfd_mach_sh5.
10459 * config.bfd: Map targ_cpu sh* to bfd_sh_arch.
10460 Handle sh64-*-elf*. Set targ_cflags to -DINCLUDE_SHMEDIA.
10461 * configure.in: Handle bfd_elf32_sh64_vec and bfd_elf32_sh64l_vec.
10462 * configure: Regenerate.
10463 * reloc.c (BFD_RELOC_SH_SHMEDIA_CODE, BFD_RELOC_SH_IMMU5,
10464 BFD_RELOC_SH_IMMS6, BFD_RELOC_SH_IMMS6BY32, BFD_RELOC_SH_IMMU6,
10465 BFD_RELOC_SH_IMMS10, BFD_RELOC_SH_IMMS10BY2,
10466 BFD_RELOC_SH_IMMS10BY4, BFD_RELOC_SH_IMMS10BY8,
10467 BFD_RELOC_SH_IMMS16, BFD_RELOC_SH_IMMU16, BFD_RELOC_SH_IMM_LOW16,
10468 BFD_RELOC_SH_IMM_LOW16_PCREL, BFD_RELOC_SH_IMM_MEDLOW16,
10469 BFD_RELOC_SH_IMM_MEDLOW16_PCREL, BFD_RELOC_SH_IMM_MEDHI16,
10470 BFD_RELOC_SH_IMM_MEDHI16_PCREL, BFD_RELOC_SH_IMM_HI16,
10471 BFD_RELOC_SH_IMM_HI16_PCREL, BFD_RELOC_SH_PT_16): New relocations.
10472 * cpu-sh.c [INCLUDE_SHMEDIA] (arch_info_struct): Define and link
10473 in item for SH5.
10474 * elf32-sh.c [INCLUDE_SHMEDIA] (sh_elf_howto_table): Add howto items
10475 for SHmedia relocs.
10476 [INCLUDE_SHMEDIA] (sh_rel): Add mappings for SHmedia relocs.
10477 [INCLUDE_SHMEDIA] (sh_elf_relocate_section) [default]: Call
10478 shmedia_prepare_reloc, goto final_link_relocate if it returns
10479 non-zero, else fail as before.
10480 (sh_elf_set_mach_from_flags): Provide function only if not defined
10481 as macro. Do not recognize objects with EF_SH64_32BIT_ABI set.
10482 (sh_elf_set_private_flags): Provide function only if not defined
10483 as a macro.
10484 (sh_elf_copy_private_data): Similar.
10485 (sh_elf_merge_private_data): Similar.
10486 * section.c (SEC_SH_ISA_SHMEDIA): New.
10487 * targets.c (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec): Declare.
10488 * elf32-sh64.c: New file.
10489 * libbfd.h: Regenerate.
10490 * bfd-in2.h: Regenerate.
10491 * po/POTFILES.in: Regenerate.
10492 * po/bfd.pot: Regenerate.
10493 * bfd-in2.h: Regenerate.
10494 * libbfd.h: Regenerate.
10495
10496 2002-02-07 Daniel Jacobowitz <drow@mvista.com>
10497
10498 * bfd-in.h: Update <stdbool.h> check to only see if <stdbool.h> has
10499 been included, not drag it in.
10500 * bfd-in2.h: Regenerate.
10501
10502 2002-02-06 H.J. Lu (hjl@gnu.org)
10503
10504 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Update
10505 the mach and ISA fields if necessary.
10506
10507 2002-02-06 Nick Clifton <nickc@cambridge.redhat.com>
10508
10509 * coffcode.h (coff_set_arch_mach_hook): Select the highest known
10510 ARM architecture when an F_ARM_5 flag is detected, since we cannot
10511 be sure exactly which architecture this represents.
10512
10513 2002-02-05 Nick Clifton <nickc@redhat.com>
10514
10515 * po/tr.po: Updated translation.
10516
10517 2002-02-05 Alan Modra <amodra@bigpond.net.au>
10518
10519 From Jimi X <jimix@watson.ibm.com>
10520 * archures (bfd_mach_ppc64): Define.
10521 (bfd_powerpc_arch): Rename to bfd_powerpc_archs.
10522 (bfd_powerpc_arch): Define.
10523 * bfd-in2.h: Regenerate.
10524 * cpu-powerpc.c (arch_info_struct): Rename to bfd_powerpc_archs.
10525 (bfd_powerpc_arch): Move to tail of bfd_powerpc_archs.
10526 (bfd_powerpc_archs): Add default powerpc64 arch.
10527
10528 2002-02-05 Alan Modra <amodra@bigpond.net.au>
10529
10530 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Check for relocs
10531 against section syms in readonly sections. Don't do the global
10532 sym check if we find one.
10533 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
10534 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
10535 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
10536 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
10537 (elf_s390_grok_prstatus): Add missing prototype.
10538
10539 2002-02-04 Hans-Peter Nilsson <hp@bitrange.com>
10540
10541 * elf64-mmix.c (mmix_dump_bpo_gregs): New function.
10542 (mmix_elf_check_common_relocs) <case R_MMIX_BASE_PLUS_OFFSET>:
10543 Call bfd_get_section_by_name only once. Initialize
10544 bpodata->n_bpo_relocs_this_section.
10545 (_bfd_mmix_prepare_linker_allocated_gregs): Remove comment
10546 referring to DSOs.
10547 (bpo_reloc_request_sort_fn): Don't use difference of values as
10548 return-value.
10549
10550 2002-02-02 David O'Brien <obrien@FreeBSD>
10551
10552 * configure.in: Tweak the FreeBSD 4.x recognition more. Only treat
10553 version 4.5 and later the same as 5-CURRENT.
10554 * configure: Re-generate.
10555
10556 2002-02-02 Jason Thorpe <thorpej@wasabisystems.com>
10557
10558 * config.bfd (hppa*-*-netbsd*): New target.
10559
10560 2002-01-31 Philipp Thomas <pthomas@suse.de>
10561
10562 * coff-arm.c (coff_arm_merge_private_bfd_data): Move ERROR
10563 to front of message. Unify messages with elf32-arm.h. Use
10564 commas where neccessary.
10565 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Use all upcase
10566 ERROR in messages. Unify messages with coff-arm.c. Correct
10567 VFP/FPA error message.
10568 (elf32_arm_print_private_bfd_data): Don't mark APCS-26 and
10569 APCS-32 for translation.
10570
10571 2002-02-01 Hans-Peter Nilsson <hp@bitrange.com>
10572
10573 Perform on-demand global register allocation from
10574 R_MMIX_BASE_PLUS_OFFSET relocs.
10575 * elf64-mmix.c (struct bpo_reloc_section_info, struct
10576 bpo_reloc_request, struct bpo_greg_section_info): New.
10577 (mmix_elf_check_common_relocs, mmix_elf_gc_sweep_hook,
10578 bpo_reloc_request_sort_fn, mmix_elf_relax_section,
10579 _bfd_mmix_check_all_relocs,
10580 _bfd_mmix_prepare_linker_allocated_gregs,
10581 _bfd_mmix_finalize_linker_allocated_gregs): New functions.
10582 (elf_mmix_howto_table): Correct src_mask for most relocs.
10583 (mmix_elf_perform_relocation) <case R_MMIX_BASE_PLUS_OFFSET>: New
10584 case.
10585 (mmix_final_link_relocate) <case R_MMIX_BASE_PLUS_OFFSET>: New
10586 case. Fix typo in comment. New label do_mmix_reloc.
10587 (mmix_elf_check_relocs): Abuse bfd_link_info member base_file to
10588 store first object file with a base-plus-offset reloc. Call
10589 mmix_elf_check_common_relocs for the part common with mmo.
10590 (mmix_elf_final_link): Write out linker-allocated register
10591 contents section.
10592 (elf_backend_gc_sweep_hook): Define.
10593 (bfd_elf64_bfd_relax_section): Define.
10594
10595 * mmo.c: Don't include <ctype.h>
10596 (mmo_init): Correct init-once logic.
10597
10598 2002-02-01 Tom Rix <trix@redhat.com>
10599
10600 * config.bfd: Conditionally support <aiaff> for pre AIX 4.3.
10601
10602 2002-02-01 Alan Modra <amodra@bigpond.net.au>
10603
10604 * Makefile.am: Run "make dep-am"
10605 * Makefile.in: Regenerate.
10606
10607 2002-01-31 David O'Brien <obrien@FreeBSD>
10608
10609 * configure.in: Recognize the differences in core files from FreeBSD
10610 4.{0,1} and later versions of 4.x. This treats 4.2+ the same as
10611 5-CURRENT.
10612 * configure: Regenerate.
10613
10614 2002-01-31 Ivan Guzvinec <ivang@opencores.org>
10615
10616 * coff-or32.c: New file.
10617 * cpu-or32.c: New file.
10618 * elf32-or32.c: New file.
10619 * archures.c: Add support for or32.
10620 * targets.c: Add support for or32.
10621 * bfd-in2.h: Regenerate.
10622 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags,
10623 coff_write_object_contents): Add support for or32.
10624 * config.bfd: Add target.
10625 * configure.in: Add support for or32.
10626 * configure: Regenerate.
10627 * Makefile.am: Add support for or32.
10628 * Makefile.in: Regenerate.
10629 * po/SRC-POTFILES.in: Add or32 files.
10630 * po/bfd.pot: Regenerate.
10631
10632 2002-01-31 Nick Clifton <nickc@cambridge.redhat.com>
10633 Don Lindsay <lindsayd@cisco.com>
10634
10635 * elf32-mips.c (mips_elf_calculate_relocation): Replace 'return
10636 false' with a return of a bfd_reloc_ error code.
10637
10638 2002-01-31 Hans-Peter Nilsson <hp@axis.com>
10639
10640 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
10641 unexport unreferenced symbols when --export-dynamic. Call
10642 _bfd_elf_strtab_delref when unexporting.
10643
10644 2002-01-30 Daniel Jacobowitz <drow@mvista.com>
10645
10646 * bfd-in.h: Include <stdbool.h> if it is available.
10647 * bfd-in2.h: Regenerated.
10648
10649 2002-01-31 Alan Modra <amodra@bigpond.net.au>
10650
10651 * elf64-ppc.c (func_desc_adjust): STV_PROTECTED functions should
10652 not go via the plt.
10653
10654 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
10655
10656 * archures.c: Tidy up formatting of embedded comments.
10657 * bfd.c: Tidy up formatting of embedded comments.
10658 * bfd-in.h: Fix formatting of comments.
10659 * reloc.c: Tidy up formatting of ordinary & embedded comments.
10660 * section.c: Tidy up formatting of embedded comments.
10661 * syms.c: Tidy up formatting of embedded comments.
10662 * targets.c: Tidy up formatting of embedded comments.
10663
10664 * bfd-in2.h: Regenerate.
10665
10666 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
10667
10668 * vms-tir.c (cmd_name): New function.
10669 (tir_cmd_name): New function.
10670 (etir_sta, etir_sto, etir_opr, etir_stc): Use cmd_name().
10671 (tir_opr, tir_ctl, tir_cmd): use tir_cmd_name().
10672 Fix formatting.
10673
10674 * peXXigen.c (pe_print_idata): Rearrange message to aid in
10675 translation.
10676 (pe_print_pdata): Rearrange message to aid in translation.
10677
10678 * libbfd.c (warn_deprecated): Rearrange error message to aid in
10679 translation.
10680
10681 * ihex.c (ihex_write_object_contents): Fix spelling typo.
10682
10683 * ieee.c (ieee_slurp_external_symbols): Remove spurious space.
10684
10685 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Rearrange error
10686 message to aid in translation.
10687
10688 * elf64-mmix.c (mmix_final_link_relocate): Rearrange error message
10689 to aid in translation.
10690
10691 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix typo.
10692
10693 2002-01-30 Philipp Thomas <pthomas@suse.de>
10694
10695 * coff-arm.c, elf32-elf.h: Unify messages.
10696
10697 2002-01-30 Nick Clifton <nickc@redhat.com>
10698
10699 * po/sv.po: Updated translation.
10700
10701 2002-01-30 Philipp Thomas <pthomas@suse.de>
10702
10703 * dwarf2.c (read_abbrev): Use full section name in error message.
10704 (decode_line_info): Likewise.
10705
10706 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Don't translate debugging
10707 message.
10708
10709 2002-01-30 Alan Modra <amodra@bigpond.net.au>
10710
10711 * elf64-ppc.c (func_desc_adjust): Only provide missing function
10712 descriptor symbols for undefined function code syms. Clear
10713 ELF_LINK_NON_ELF so that they can stay weak.
10714
10715 2002-01-29 Chris Demetriou <cgd@broadcom.com>
10716 Mitch Lichtenberg <mpl@broadcom.com>
10717
10718 * bfd-in.h (bfd_mips_elf32_create_embedded_relocs): New prototype.
10719 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): New function
10720 to handle 32-bit ELF embedded reloc (ld --embedded-relocs)
10721 generation.
10722 * bfd-in2.h: Regenerate.
10723
10724 2002-01-29 Chris Demetriou <cgd@broadcom.com>
10725
10726 * elf32-mips.c: Add additional comments about HI16 relocation
10727 processing.
10728 (_bfd_mips_elf_hi16_reloc): Don't subtract address here for
10729 pc-relative relocations. (Reverts change made on 2001-10-31.)
10730 (_bfd_mips_elf_lo16_reloc): Subtract address of LO16 part here
10731 for pc-relative relocations.
10732 (mips_elf_calculate_relocation): Add a comment about a kludge
10733 in the R_MIPS_GNU_REL_HI16 handling.
10734 (_bfd_mips_elf_relocate_section): Implement that kludge;
10735 adjust pc-relative HI16 relocation for difference in HI16 and
10736 LO16 addresses, since it can't easily be done in
10737 mips_elf_calculate_relocation.
10738
10739 2002-01-29 Martin Schwidefsky <schwidefsky@de.ibm.com>
10740
10741 * elf32-i386 (elf_i386_adjust_dynamic_symbol): Do not replace PLT32
10742 relocations with PC32 relocations for undefined or weak symbols.
10743 * elf32-s390 (elf_i386_adjust_dynamic_symbol): Likewise.
10744 * elf64-s390x (elf_i386_adjust_dynamic_symbol): Likewise.
10745
10746 2002-01-28 Jason Thorpe <thorpej@wasabisystems.com>
10747
10748 * elfcore.h (elf_core_file_p): Improve comment for last change.
10749
10750 2002-01-27 Daniel Jacobowitz <drow@mvista.com>
10751
10752 * configure: Regenerated.
10753
10754 2002-01-27 Jason Thorpe <thorpej@wasabisystems.com>
10755
10756 * elfcore.h (elf_core_file_p): Set the machine architecture
10757 before processing the program headers.
10758
10759 2002-01-26 Hans-Peter Nilsson <hp@bitrange.com>
10760
10761 * configure.in <64-bit configuration>: If using gcc, check and
10762 emit error for egcs-1.1.2.
10763 * configure: Regenerate.
10764
10765 2002-01-26 Egor Duda <deo@logos-m.ru>
10766
10767 * elf.c (elfcore_grok_win32pstatus): Copy only as much information
10768 as possible to avoid stack corruption.
10769
10770 2002-01-26 Richard Henderson <rth@redhat.com>
10771
10772 * elf64-alpha.c (elf64_alpha_check_relocs): Don't set reltext
10773 for non-allocated sections.
10774
10775 2002-01-25 Mark Kettenis <kettenis@gnu.org>
10776
10777 * elf.c (elfcore_write_prstatus): Make sure we pass the address of
10778 prstat.pr_reg even if it is a struct.
10779
10780 2002-01-25 Steve Ellcey <sje@cup.hp.com>
10781
10782 * elfxx-ia64.c: Reset AIX vector function overrides for HP-UX.
10783
10784 2002-01-25 Philipp Thomas <pthomas@suse.de>
10785
10786 * coffgen.c (coff_print_symbol): Don't mark info message
10787 for translation.
10788
10789 2002-01-25 Nick Clifton <nickc@redhat.com>
10790
10791 * po/fr.po: Updated translation.
10792 * po/es.po: Updated translation.
10793
10794 2002-01-25 Philipp Thomas <pthomas@suse.de>
10795
10796 * coff-alpha.c (alpha_relocate_section): Unify warning message
10797 for GP relative relocations without GP defined.
10798 * coff-mips.c (mips_relocate_section): Likewise.
10799
10800 2002-01-25 Alan Modra <amodra@bigpond.net.au>
10801
10802 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Avoid
10803 unsigned overflow when new_offset < old_offset.
10804
10805 2002-01-24 Philipp Thomas <pthomas@suse.de>
10806
10807 * bfd.c (_bfd_abort): Fix typo.
10808
10809 2002-01-23 Richard Henderson <rth@redhat.com>
10810
10811 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't suppress
10812 plt entries for undefweak symbols.
10813
10814 2002-01-23 Steve Ellcey <sje@cup.hp.com>
10815
10816 * targets.c (bfd_elf32_ia64_hpux_big_vec): Add to DEFAULT_VECTOR.
10817 (bfd_elf64_ia64_hpux_big_vec): Ditto.
10818 (bfd_elf32_h8300_vec): Ditto.
10819
10820 2002-01-23 Alan Modra <amodra@bigpond.net.au>
10821
10822 * elf64-ppc.c: Remove stale part of ABI comment.
10823 (NO_OPD_RELOCS): Define.
10824 (ppc64_elf_check_relocs): Use it.
10825 (ppc64_elf_relocate_section): Here too.
10826 (build_one_stub): Don't point function syms at the stub. Instead,
10827 hijack plt.offset.
10828 (ppc64_elf_relocate_section): Check whether REL24 relocs should
10829 really go to the stub. Make all dynamic relocs in opd against
10830 locals.
10831 (ppc64_elf_finish_dynamic_symbol): Allow for non-standard use of
10832 plt.offset.
10833
10834 2002-01-22 Richard Henderson <rth@redhat.com>
10835
10836 * elf64-alpha.c (INSN_UNOP): Encode with RB as $sp.
10837
10838 2002-01-22 Alan Modra <amodra@bigpond.net.au>
10839
10840 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Correct sign of
10841 TOC_BASE_OFF adjustment.
10842
10843 * Makefile.am: Run "make dep-am".
10844 * Makefile.in: Regenerate.
10845 * po/SRC-POTFILES.in: Regenerate.
10846
10847 2002-01-22 John David Anglin <dave@hiauly1.hia.nrc.ca>
10848
10849 * configure.host (hppa*64*-*-hpux*, hppa*64*-*-linux*): Add new
10850 host defines.
10851
10852 2002-01-21 Hans-Peter Nilsson <hp@axis.com>
10853
10854 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GOTREL>:
10855 Check for and emit error if sgot is NULL at this point.
10856
10857 2002-01-21 Jason Thorpe <thorpej@wasabisystems.com>
10858
10859 * config.bfd (ia64*-*-netbsd*): New target.
10860
10861 2002-01-21 Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
10862
10863 * som.c (som_write_space_strings): Comment typo fix.
10864
10865 2002-01-21 Alan Modra <amodra@bigpond.net.au>
10866
10867 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_func and
10868 is_func_descriptor fields.
10869 (link_hash_newfunc): Init them.
10870 (ppc64_elf_check_relocs): Only R_PPC24_REL24 syms starting with a
10871 dot are candidates for plt entries. When processing .opd relocs,
10872 set function descriptor strings to point inside function code
10873 string, and set new ppc_link_hash_entry fields.
10874 (ppc64_elf_gc_sweep_hook): Don't sweep R_PPC64_REL24 relocs.
10875 (ppc64_elf_adjust_dynamic_symbol): Remove most code dealing with
10876 function descriptors. It's now done in..
10877 (func_desc_adjust): New.
10878 (ppc64_elf_func_desc_adjust): New.
10879 (define elf_backend_always_size_sections): Define.
10880 (ppc64_elf_hide_symbol): New.
10881 (define elf_backend_hide_symbol): Define.
10882 (allocate_dynrelocs): Remove code looking up function descriptors
10883 as that has been done earlier.
10884 (ppc64_elf_size_dynamic_sections): Use htab shortcut to elf hash
10885 table.
10886 (ppc64_elf_finish_dynamic_symbol): Likewise. Remove code looking
10887 up function descriptor.
10888 (build_one_stub): Look up the function code sym. Check for
10889 invalid plt offsets.
10890 (ppc64_elf_relocate_section): Tweak calls to undefined weak syms.
10891 Convert R_PPC64_TOC relocs to R_PPC64_RELATIVE in shared libs.
10892
10893 * elf-bfd.h (elf_backend_data <elf_backend_hide_symbol>): Add
10894 boolean param.
10895 (_bfd_elf_link_hash_hide_symbol): Likewise.
10896 * elflink.h (elf_link_add_object_symbols): Adjust call to
10897 elf_backend_hide_symbol.
10898 (elf_fix_symbol_flags): Likewise.
10899 (elf_link_assign_sym_version): Likewise. Use bfd_malloc rather
10900 than bfd_alloc.
10901 * elf.c (_bfd_elf_link_hash_hide_symbol): Add "force_local" param.
10902 Set ELF_LINK_FORCED_LOCAL and call _bfd_elf_strtab_delref.
10903 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
10904 (clobber_millicode_symbols): Adjust to suit new hide_symbol.
10905 * elf32-cris.c (elf_cris_hide_symbol): Add "force_local" param
10906 and adjust to suit.
10907 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise, and call
10908 _bfd_elf_link_hash_hide_symbol rather than duplicating code.
10909 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
10910
10911 2002-01-18 Alan Modra <amodra@bigpond.net.au>
10912
10913 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Test for a
10914 dynamic function descriptor symbol, not the associated function
10915 symbol.
10916
10917 2002-01-17 Eric Christopher <echristo@redhat.com>
10918
10919 * elf32-mips.c (mips_elf_calculate_relocation): Fix typo.
10920
10921 2002-01-17 Nick Clifton <nickc@cambridge.redhat.com>
10922
10923 * po/bfd.pot: Regenerate.
10924 * po/fr.po: Regenerate.
10925
10926 2002-01-17 Alan Modra <amodra@bigpond.net.au>
10927
10928 * elf-bfd.h (elf_backend_data <elf_backend_section_from_bfd_section>):
10929 Remove "Elf_Internal_Shdr *" param.
10930 (_bfd_mips_elf_section_from_bfd_section): Ditto.
10931 * elf32-mips.c (_bfd_mips_elf_section_from_bfd_section): Ditto.
10932 * elf32-m32r.c (_bfd_m32r_elf_section_from_bfd_section): Ditto.
10933 * elf32-v850.c (v850_elf_section_from_bfd_section): Ditto.
10934 * elf64-mmix.c (mmix_elf_section_from_bfd_section): Ditto.
10935 * elfxx-ia64.c (elfNN_hpux_backend_section_from_bfd_section): Ditto.
10936 * elf.c (_bfd_elf_section_from_bfd_section): Allow backend
10937 function to override special sections. Remove hdr arg from
10938 backend call, and don't loop.
10939
10940 2002-01-16 Eric Christopher <echristo@redhat.com>
10941
10942 * elf32-mips.c (mips_elf_calculate_relocation): Set require_jalxp
10943 on R_MIPS_26 and target is 16bit. Add R_MIPS16_GPREL to list of
10944 relocations requiring gp0 and gp.
10945
10946 2002-01-16 Richard Earnshaw <rearnsha@arm.com>
10947
10948 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle
10949 EF_ARM_VFP_FLOAT.
10950 (elf32_arm_print_private_bfd_data): Likewise.
10951
10952 2002-01-16 Nick Clifton <nickc@cambridge.redhat.com>
10953
10954 * po/tr.po: Import new version.
10955
10956 2002-01-16 Alan Modra <amodra@bigpond.net.au>
10957
10958 * elf64-ppc.c (ppc64_elf_howto_raw): Remove stale FIXMEs.
10959 (ppc64_elf_reloc_type_lookup): Use proper CTOR reloc.
10960 (ORI_R0_R0_0): Correct.
10961
10962 2002-01-16 Alan Modra <amodra@bigpond.net.au>
10963
10964 * elflink.c (_bfd_elf_create_dynamic_sections): Don't set SEC_CODE
10965 when plt_not_loaded.
10966 * elf64-ppc.c (ppc64_elf_create_dynamic_sections): No need to
10967 clear .plt SEC_CODE here. Create .stub and correct .glink flags.
10968 (PLT_INITIAL_ENTRY_SIZE): Set to 24.
10969 (ppc64_elf_glink_code): Delete.
10970 (PPC64_ELF_GLINK_SIZE): Delete.
10971 (ADDIS_R12_R2, STD_R2_40R1, LD_R11_0R12, LD_R2_0R12, MTCTR_R11,
10972 BCTR, ADDIS_R12_R12_1, LD_R2_40R1, NOP, LI_R0_0, B_DOT, LIS_R0_0,
10973 ORI_R0_R0_0): Define.
10974 (PLT_CALL_STUB_SIZE, GLINK_CALL_STUB_SIZE): Define.
10975 (struct ppc_link_hash_table): Add sstub and plt_overflow.
10976 (ppc64_elf_link_hash_table_create): Init them.
10977 (ppc64_elf_check_relocs <R_PPC64_REL24>): Refcount .plt entry.
10978 Don't copy to shared lib.
10979 (ppc64_elf_check_relocs): Call bfd_set_error on errors.
10980 (ppc64_elf_gc_sweep_hook <R_PPC64_REL24>): Sweep plt refcount.
10981 (allocate_dynrelocs <plt>): Don't change function sym here. Make
10982 room for .stub and .glink code.
10983 (ppc64_elf_size_dynamic_sections): Handle .stub. Make entry for
10984 DT_PPC64_GLINK.
10985 (ppc64_elf_final_link): Rename to ppc64_elf_set_toc. Don't call
10986 bfd_elf64_bfd_final_link.
10987 (bfd_elf64_bfd_final_link): Don't define.
10988 (ppc64_elf_size_stubs): New.
10989 (build_plt_stub): New.
10990 (build_one_stub): New.
10991 (ppc64_elf_build_stubs): New.
10992 (ppc64_elf_relocate_section <toc relocs>): Remove assert.
10993 (ppc64_elf_relocate_section): Don't copy R_PPC64_REL24 relocs.
10994 (ppc64_elf_finish_dynamic_symbol): Don't build stubs here. Set
10995 DT_PPC64_GLINK entry. Tweak DT_PLTGOT, DT_JMPREL, DT_PLTRELSZ in
10996 case output sections not separate. Adjust DT_RELASZ to not
10997 include plt relocs. Set reserved got entry. Set got and plt
10998 entry size.
10999 (elf_backend_got_header_size): Set to 8.
11000 * elf64-ppc.h: New file.
11001
11002 2002-01-16 Alan Modra <amodra@bigpond.net.au>
11003
11004 * elf32-arm.h (elf32_arm_size_dynamic_sections): When removing
11005 sections, use bfd_section_list_remove.
11006 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
11007 * elflink.h (elf_link_add_object_symbols): When removing all
11008 sections, use bfd_section_list_clear.
11009
11010 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
11011
11012 * po/sv.po: New file: Swedish translation.
11013 * configure.in (ALL_LINGUAS): Add sv.
11014 * configure: Regenerate.
11015
11016 2002-01-15 Jakub Jelinek <jakub@redhat.com>
11017
11018 * elflink.h (elf_link_input_bfd): Back out 2002-01-07 change.
11019 * elf.c (merge_sections_remove_hook): New function.
11020 (_bfd_elf_merge_sections): Pass it as 3rd argument to
11021 _bfd_merge_sections.
11022 * libbfd-in.h (_bfd_merge_sections): Add 3rd argument.
11023 * libbfd.h: Rebuilt.
11024 * merge.c (_bfd_merge_sections): Add remove_hook argument.
11025 Call remove_hook if a SEC_EXCLUDE section is encountered.
11026
11027 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
11028
11029 * elf32-xstormy16.c (xstormy16_reloc_map): Add new field 'table'.
11030 (xstormy16_reloc_map): Initialise new field with correct howto
11031 table.
11032 (xstormy16_reloc_type_lookup): Use 'table' field to locate correct
11033 howto entry.
11034
11035 2002-01-10 Michael Snyder <msnyder@redhat.com>
11036
11037 * elf.c (elfcore_write_prstatus): Use long instead of pid_t;
11038 (elfcore_write_pstatus): Use long instead of pid_t;
11039 * elf-bfd.h: Change prototypes to use long instead of pid_t;
11040
11041 2002-01-09 Jason Thorpe <thorpej@wasabisystems.com>
11042
11043 * elf.c: Update copyright years.
11044 (elfcore_grok_netbsd_note): Use NT_NETBSDCORE_PROCINFO
11045 and NT_NETBSDCORE_FIRSTMACH. Improve a comment.
11046
11047 2002-01-08 Michael Snyder <msnyder@redhat.com>
11048
11049 Add capability to write corefile note sections, for gdb.
11050 * elf.c (elfcore_write_note): New function.
11051 (elfcore_write_prpsinfo): New function.
11052 (elfcore_write_prstatus): New function.
11053 (elfcore_write_pstatus): New function.
11054 (elfcore_write_prfpreg): New function.
11055 (elfcore_write_prxfpreg): New function.
11056 * elf-bfd.h: Add prototypes for above functions.
11057
11058 2002-01-08 Alexandre Oliva <aoliva@redhat.com>
11059
11060 * elf.c (elf_fake_sections): Propagate errors from
11061 elf_backend_fake_section.
11062
11063 2002-01-07 Jason Thorpe <thorpej@wasabisystems.com>
11064
11065 * Makefile.am (BFD32_BACKENDS): Add elf32-sh-nbsd.lo.
11066 (BFD32_BACKENDS_CFILES): Add elf32-sh-nbsd.c.
11067 (elf32-sh-nbsd.lo): New rule.
11068 * Makefile.in: Regenerate.
11069 * config.bfd (sh*le-*-netbsdelf*): New target.
11070 (sh*-*-netbsdelf*): New target.
11071 * configure.in: Include netbsd-core.lo for native sh*-*-netbsd*.
11072 (bfd_elf32_shnbsd_vec): New vector.
11073 (bfd_elf32_shlnbsd_vec): New vector.
11074 * configure: Regenerate.
11075 * elf32-sh-nbsd.c: New file.
11076 * targets.c: Update copyright years.
11077 (_bfd_target_vector): Add bfd_elf32_shlnbsd_vec and
11078 bfd_elf32_shnbsd_vec.
11079
11080 2002-01-07 Aldy Hernandez <aldyh@redhat.com>
11081
11082 * coff-rs6000.c (READ20): Use bfd_scan_vma.
11083
11084 2002-01-07 Geoffrey Keating <geoffk@redhat.com>
11085
11086 * elflink.h (elf_link_input_bfd): Don't ask for the merged offset
11087 of a symbol in a section that will be deleted.
11088
11089 2002-01-07 Nick Clifton <nickc@cambridge.redhat.com>
11090
11091 * po/es.po: New file: Spanish translation.
11092 * configure.in (ALL_LINGUAS): Add es.
11093 * configure: Regenerate.
11094
11095 2002-01-06 Steve Ellcey <sje@cup.hp.com>
11096
11097 * elfxx-ia64.c (is_unwind_section_name): Add target vector as
11098 argument so we can handle HP-UX specially.
11099 (elfNN_ia64_hpux_vec): New for use in is_unwind_section_name.
11100 (elfNN_hpux_backend_section_from_bfd_section): New for support
11101 of SHN_IA_64_ANSI_COMMON.
11102 (elfNN_ia64_relax_section): Add support for SHN_IA_64_ANSI_COMMON.
11103 (is_unwind_section_name): Add special HP-UX support.
11104 (elfNN_ia64_section_from_shdr): Add support for more sections.
11105 (elfNN_ia64_fake_sections): Modify is_unwind_section_name call and
11106 add support for more sections.
11107 (elfNN_ia64_additional_program_headers): Modify
11108 is_unwind_section_name call.
11109 (elfNN_ia64_modify_segment_map): Remove assumption that there is
11110 only one unwind section in segment.
11111
11112 2002-01-06 Alan Modra <amodra@bigpond.net.au>
11113
11114 * syms.c (_bfd_generic_make_empty_symbol): New function.
11115 * libbfd-in.h (_bfd_nosymbols_make_empty_symbol): Define as
11116 _bfd_generic_make_empty_symbol.
11117 * libbfd.h: Regenerate.
11118 * bfd-in2.h: Regenerate.
11119 * hppabsd-core.c (hppabsd_core_make_empty_symbol): Delete function.
11120 (hppabsd_core_get_symtab_upper_bound): Don't define.
11121 (hppabsd_core_get_symtab): Likewise.
11122 (hppabsd_core_print_symbol): Likewise.
11123 (hppabsd_core_get_symbol_info): Likewise.
11124 (hppabsd_core_bfd_is_local_label_name): Likewise.
11125 (hppabsd_core_get_lineno): Likewise.
11126 (hppabsd_core_find_nearest_line): Likewise.
11127 (hppabsd_core_bfd_make_debug_symbol): Likewise.
11128 (hppabsd_core_read_minisymbols): Likewise.
11129 (hppabsd_core_minisymbol_to_symbol): Likewise.
11130 (hppabsd_core_vec): Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols).
11131 Formatting fixes.
11132 * hpux-core.c: Similarly.
11133 * irix-core.c: Similarly.
11134 * osf-core.c: Similarly.
11135 * sco5-core.c: Similarly.
11136 * binary.c (binary_make_empty_symbol): Remove function, define as
11137 _bfd_generic_make_empty_symbol.
11138 * ihex.c (ihex_make_empty_symbol): Likewise.
11139 * mmo.c (mmo_make_empty_symbol): Likewise.
11140 * ppcboot.c (ppcboot_make_empty_symbol): Likewise.
11141 * srec.c (srec_make_empty_symbol): Likewise.
11142 * versados.c (versados_make_empty_symbol): Likewise.
11143 * vms.c (_bfd_vms_make_empty_symbol): Remove.
11144 (vms_make_empty_symbol): Define as _bfd_generic_make_empty_symbol.
11145 * vms-gsd.c (_bfd_vms_slurp_gsd): Call bfd_make_empty_symbol
11146 rather than _bfd_vms_make_empty_symbol.
11147 * vms-misc.c (new_symbol): Likewise.
11148
11149 2002-01-05 Alan Modra <amodra@bigpond.net.au>
11150
11151 * section.c (bfd_section_init): Remove unnecessary initialisations.
11152 (bfd_section_list_clear): New function.
11153 (bfd_section_list_remove, bfd_section_list_insert): New macros.
11154 (_bfd_strip_section_from_output): Use them.
11155 * coffcode.h (coff_set_alignment_hook): Likewise.
11156 * elf32-mips.c (_bfd_mips_elf_final_link): Likewise.
11157 * elf64-mips.c (mips_elf64_final_link): Likewise.
11158 * elf64-mmix.c (mmix_elf_final_link): Likewise.
11159 * sunos.c (sunos_add_dynamic_symbols): Likewise.
11160 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
11161 * bfd-in2.h: Regenerate.
11162
11163 * netbsd-core.c (netbsd_core_file_p): Use bfd_make_section_anyway
11164 rather than doing our own section handling. Clean up after errors
11165 with bfd_release and bfd_section_list_clear. Handle unexpected
11166 flags.
11167 * aoutf1.h (sunos4_core_file_p): Likewise.
11168 * aix386-core.c (aix386_core_file_p): Likewise.
11169 * cisco-core.c (cisco_core_file_validate): Likewise.
11170 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
11171 * trad-core.c (trad_unix_core_file_p): Likewise.
11172
11173 * hppabsd-core.c (hppabsd_core_core_file_p): Clean up after errors
11174 with bfd_release and bfd_section_list_clear.
11175 * hpux-core.c (hpux_core_core_file_p): Likewise.
11176 * irix-core.c (irix_core_core_file_p): Likewise.
11177 * lynx-core.c (lynx_core_file_p): Likewise.
11178 * osf-core.c (osf_core_core_file_p): Likewise.
11179 * rs6000-core.c (rs6000coff_core_p): Likewise.
11180 * sco5-core.c (sco5_core_file_p): Likewise.
11181
11182 * elf32-mips.c (_bfd_mips_elf_lo16_reloc): Simplify, and perform
11183 sign extension adjustments without conditionals.
11184
11185 2002-01-04 Jakub Jelinek <jakub@redhat.com>
11186
11187 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Don't crash if
11188 CIE at .eh_frame start is removed due to no FDEs referencing it.
11189
11190 2002-01-04 Jason Thorpe <thorpej@wasabisystems.com>
11191
11192 * config.bfd (x86_64-*-netbsd*): New target.
11193 * configure.in (x86_64-*-netbsd*): Set COREFILE
11194 to netbsd-core.lo.
11195 * configure: Regenerated.
11196
11197 2002-01-03 Tom Rix <trix@redhat.com>
11198
11199 * xcofflink.c (_bfd_xcoff_bfd_final_link): Update .pad section ordering
11200 for recent bfd_make_section_anyway change.
11201
11202 2002-01-03 Nick Clifton <nickc@cambridge.redhat.com>
11203
11204 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
11205 R_ARM_THM_PC11 reloc.
11206
11207 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
11208
11209 * configure.in (LINGUAS): Add ja.
11210 * configure: Regenerate.
11211 * po/ja.po: Import from translation project's web site.
11212
11213 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
11214
11215 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Reformat error
11216 messages to ease translation into other languages.
11217
11218 For older changes see ChangeLog-0001
11219 \f
11220 Local Variables:
11221 mode: change-log
11222 left-margin: 8
11223 fill-column: 74
11224 version-control: never
11225 End: