Add support for the M32R2 processor.
[deliverable/binutils-gdb.git] / bfd / ChangeLog
1 2003-12-03 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
2
3 * archures.c (bfd_mach_m32r2): Add new machine type.
4 * bfd-in2.h: Regenerate.
5 * cpu-m32r.c : Add new machine type.
6 * elf32-m32r.c (m32r_elf_object_p, m32r_elf_final_write_processing,
7 m32r_elf_merge_private_bfd_data): Add support for new machine
8 type.
9
10 2003-12-03 Dave Airlie <airlied@linux.ie>
11
12 * config.bfd: Add vax-linux-gnu target.
13 * configure.in: Likewise.
14 * configure: Regenerate.
15
16 2003-12-03 Alan Modra <amodra@bigpond.net.au>
17
18 * ecoff.c (ecoff_link_add_archive_symbols): Update for renamed
19 bfd_link_hash_entry field "next" -> "und_next".
20 * linker.c (_bfd_link_hash_newfunc): Likewise.
21 (bfd_link_add_undef): Likewise.
22 (_bfd_generic_link_add_archive_symbols): Likewise.
23 (_bfd_generic_link_add_one_symbol): Likewise.
24 * xcofflink.c (xcoff_link_add_symbols): Likewise.
25
26 2003-12-02 Nick Clifton <nickc@redhat.com>
27
28 * configure.in (ALL_LINGUAS): Add ro.
29 * po/ro.po: New Romanian translation.
30
31 2003-12-02 Alan Modra <amodra@bigpond.net.au>
32
33 * Makefile.am: Run "make dep-am".
34 * Makefile.in: Regenerate.
35
36 2003-12-01 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
37
38 * coffcode.h (coff_compute_section_file_positions): Set page_size
39 to 1 instead of 0 in the case file alignment value is zero.
40
41 2003-12-01 Kazu Hirata <kazu@cs.umass.edu>
42
43 * coff-rs6000.c: Remove ARGSUSED and VARARGS.
44 * coff64-rs6000.c: Likewise.
45 * coffcode.h: Likewise.
46 * elf32-vax.c: Likewise.
47 * hash.c: Likewise.
48 * hppabsd-core.c: Likewise.
49 * hpux-core.c: Likewise.
50 * ihex.c: Likewise.
51 * netbsd-core.c: Likewise.
52 * osf-core.c: Likewise.
53 * pdp11.c: Likewise.
54 * ptrace-core.c: Likewise.
55 * sco5-core.c: Likewise.
56 * section.c: Likewise.
57 * sunos.c: Likewise.
58 * trad-core.c: Likewise.
59
60 2003-12-01 Alan Modra <amodra@bigpond.net.au>
61
62 * elf-bfd.h (is_elf_hash_table): Take hash tab rather than info arg.
63 * elf.c (_bfd_elf_merge_sections): Adjust to suit.
64 (_bfd_elf_link_just_syms): Likewise.
65 (bfd_elf_get_needed_list): Likewise.
66 (bfd_elf_get_runpath_list): Likewise.
67 (_bfd_elf_link_hash_copy_indirect): Remove unneeded parens.
68 * elf32-hppa.c (elf32_hppa_setup_section_lists): Don't check hash tab
69 creator flavour.
70 (elf32_hppa_set_gp): Look up output sections rather than using htab.
71 * elf32-i960.c: Comment fix. Formatting.
72 * elf32-m32r.c (m32r_elf_add_symbol_hook): Use is_elf_hash_table
73 rather than testing creator flavour.
74 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
75 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
76 * elflink.c (_bfd_elf_link_create_dynamic_sections): Adjust for
77 is_elf_hash_table change. Remove redundant test.
78 (bfd_elf_record_link_assignment): Use is_elf_hash_table rather than
79 testing creator flavour.
80 (elf_link_record_local_dynamic_symbol): Adjust for is_elf_hash_table.
81 (_bfd_elf_fix_symbol_flags): Likewise.
82 (_bfd_elf_adjust_dynamic_symbol): Likewise.
83 * elflink.h (elf_link_add_object_symbols): Likewise. Remove redundant
84 checks. Use is_elf_hash_table rather than testing creator flavour.
85 Use hash_table throughout in place of info->hash.
86 (elf_add_dynamic_entry): Adjust for is_elf_hash_table change.
87 (NAME(bfd_elf,size_dynamic_sections)): Likewise. Remove redundant
88 check.
89 (elf_bfd_final_link): Adjust for is_elf_hash_table change.
90 (elf_link_check_versioned_symbol): Use is_elf_hash_table rather than
91 testing creator flavour.
92 (elf_gc_sections): Add is_elf_hash_table check.
93 (elf_gc_common_finalize_got_offsets): Likewise.
94 (elf_bfd_discard_info): Adjust for is_elf_hash_table change. Remove
95 redundant check.
96 * elfxx-ia64.c (elfNN_ia64_relax_section): Use is_elf_hash_table
97 rather than testing creator flavour.
98
99 2003-11-28 Christian Groessler <chris@groessler.org>
100
101 * cpu-z8k.c: Convert to ISO C90.
102 * coff-z8k.c: Likewise.
103
104 2003-11-27 Alexandre Oliva <aoliva@redhat.com>
105
106 * elf-bfd.h (elf_backend_data::elf_backend_modify_segment_map):
107 Add link info argument.
108 * elf32-i370.c (elf_backend_modify_segment_map): Likewise.
109 * elf32-ppc.c (ppc_elf_modify_segment_map): Likewise.
110 * elf32-xtensa.c (elf_xtensa_modify_segment_map): Likewise.
111 * elf64-hppa.c (elf64_hppa_modify_segment_map): Likewise.
112 * elfxx-ia64.c (elfNN_ia64_modify_segment_map): Likewise.
113 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Likewise.
114 * elfxx-mips.h (_bfd_mips_elf_modify_segment_map): Likewise.
115 * elf.c (assign_file_positions_except_relocs,
116 assign_file_positions_for_segments): Likewise. Adjust calls.
117
118 2003-11-27 Mark Kettenis <kettenis@gnu.org>
119
120 * elf.c (elfcore_grok_netbsd_procinfo): Make a pseudosection out
121 of the note.
122
123 2003-11-26 Daniel Jacobowitz <drow@mvista.com>
124 Richard Sandiford <rsandifo@redhat.com>
125
126 * elfxx-mips.c (mips_elf_set_global_got_offset): Don't set no_fn_stub.
127 (mips_elf_set_no_stub): New function.
128 (mips_elf_multi_got): Call it.
129 (_bfd_mips_elf_finish_dynamic_symbol): If a relocation is needed for
130 a secondary GOT entry, create an R_MIPS_32 or R_MIPS_64 relocation and
131 use mips_elf_create_dynamic_relocation to deal with any compatibility
132 issues. Store the adjusted addend in the GOT slot.
133
134 2003-11-25 Mattias EngdegÄrd <mattias@virtutech.se>
135
136 * stabs.c (_bfd_link_section_stabs): Skip N_EXCL stabs when
137 procesing N_BINCL stabs.
138
139 2003-11-25 Alan Modra <amodra@bigpond.net.au>
140
141 * elf64-ppc.c (ppc_type_of_stub): Disallow stubs other than
142 ppc_stub_plt_call to symbols defined in shared libs.
143
144 2003-11-22 Jakub Jelinek <jakub@redhat.com>
145
146 * elf-bfd.h (ELF_LINK_POINTER_EQUALITY_NEEDED): Define new flag.
147 * elf.c (_bfd_elf_link_hash_copy_indirect): Copy it.
148 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
149 (elf_i386_check_relocs): Set it.
150 (elf_i386_finish_dynamic_symbol): If it is not set,
151 clear st_value of SHN_UNDEF symbol.
152
153 2003-11-20 Jim Blandy <jimb@redhat.com>
154
155 * cpu-powerpc.c (powerpc_compatible): Any ISA in the PowerPC
156 family is a superset of <bfd_arch_rs6000,bfd_mach_rs6k>.
157
158 2003-11-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
159
160 * elf32-s390.c (elf_s390_relocate_section): Don't recalculate symbol
161 section for reloc output and subtract the output section's address
162 from the addend when converting a relocation into one against a
163 section symbol.
164 * elf64-s390.c (elf_s390_relocate_section): Likewise.
165
166 2003-11-18 James E Wilson <wilson@specifixinc.com>
167
168 * elfxx-ia64.c (get_fptr): For fptr_rel, use dynobj not abfd.
169 (elfNN_ia64_size_dynamic_sections): When stripping sections, check
170 for ia64_info->rel_fptr_sec.
171
172 2003-11-18 Alan Modra <amodra@bigpond.net.au>
173
174 * elf64-ppc.c (toc_adjusting_stub_needed): Exit early if section
175 size is zero.
176
177 2003-11-17 Daniel Jacobowitz <drow@mvista.com>
178
179 * elf.c (_bfd_elf_link_hash_copy_indirect): Copy
180 ELF_LINK_HASH_NEEDS_PLT. Fix formatting.
181 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
182 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
183 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Likewise.
184 * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
185 * elf32-sh.c (sh_elf_copy_indirect_symbol): Likewise.
186 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
187 * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
188 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
189 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
190 * elf32-xtensa.c (elf_xtensa_copy_indirect_symbol): Remove.
191 (elf_backend_copy_indirect_symbol): Don't define.
192
193 2003-11-14 Daniel Jacobowitz <drow@mvista.com>
194
195 * elfxx-mips.c (mips_elf_merge_gots): Weaken assert for local
196 GOT entries.
197
198 2003-11-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
199
200 * elf32-s390.c (elf_s390_relocate_section): Only convert R_390_32
201 to R_390_RELATIVE. Convert the other relocations against local
202 symbols to relocations against the start of the section.
203 * elf64-s390.c (elf_s390_relocate_section): Only convert R_390_64
204 to R_390_RELATIVE. Convert the other relocations against local
205 symbols to relocations against the start of the section.
206
207 2003-11-11 Nick Clifton <nickc@redhat.com>
208
209 * elf-m10300.c (bfd_mn10300_elf_size_dynamic_sections): Use
210 info->executable not info->shared to decide if a .interp section
211 should be present.
212 * elf32-arm.h (elf32_arm_size_dynamic_sections): Likewise.
213 * elf32-cris.c (elf_cris_size_dynamic_sections): Likewise.
214 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
215 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
216 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
217 * elf32-vax.c (elf_vax_size_dynamic_sections): Likewise.
218 * elf32-xtensa.c (elf_xtensa_size_dynamic_sections): Likewise.
219 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
220 * elfxx-mips.c (_bfd_mips_size_dynamic_sections): Likewise.
221 * elflink.h (size_dynamic_sections): Likewise.
222
223 2003-11-10 Jonathan Wilson <jonwil@tpgi.com.au>
224
225 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Swap out tls pointer.
226 (_bfd_XXi_final_link_postscript): Look for __tks_used symbol. If
227 found initialise the tls data directory entry.
228
229 2003-11-07 Alan Modra <amodra@bigpond.net.au>
230
231 * elf32-ppc.c (ppc_elf_install_value): Delete.
232 (shared_stub_entry, stub_entry): Make them arrays of ints.
233 Remove initial branch.
234 (ppc_elf_relax_section): Write one branch around all trampolines
235 instead. Correct bogus R_PPC_PLTREL24 handling. Correct
236 branch range check. Only use shared_stub_entry when shared.
237 Test that branches can reach stubs. Write trampolines out at
238 end so that just one realloc is used. Handle little-endian
239 mode. Move relevant code from ppc_elf_install_value to here.
240 (ppc_elf_relocate_section): Move code handling RELAX32 from
241 ppc_elf_install_value to here.
242
243 2003-11-06 Alan Modra <amodra@bigpond.net.au>
244
245 * elf32-ppc.c (ppc_elf_howto_raw); Add entry for R_PPC_RELAX32PC.
246 (ppc_elf_install_value): Handle R_PPC_RELAX32PC. Merge duplicate
247 cases.
248 (shared_stub_entry): Correct opcode.
249 (ppc_elf_relax_section): Generate R_PPC_RELAX32PC relocs.
250 (ppc_elf_relocate_section): Handle them.
251
252 2003-11-05 Alan Modra <amodra@bigpond.net.au>
253
254 * elf.c (_bfd_elf_rela_local_sym): Accept asection **, and return
255 updated section in case of merged section.
256 * elf-bfd.h (_bfd_elf_rela_local_sym): Update declaration.
257 * elf-hppa.h (elf_hppa_relocate_section): Adjust call.
258 * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
259 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
260 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
261 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
262 * elf32-cris.c (cris_elf_relocate_section): Likewise.
263 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
264 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
265 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
266 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
267 * elf32-i370.c (i370_elf_relocate_section): Likewise.
268 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
269 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
270 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
271 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
272 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
273 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
274 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
275 * elf32-s390.c (elf_s390_relocate_section): Likewise.
276 * elf32-sh.c (sh_elf_relocate_section): Likewise.
277 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
278 * elf32-v850.c (v850_elf_relocate_section) Likewise.
279 * elf32-vax.c (elf_vax_relocate_section): Likewise.
280 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
281 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
282 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
283 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
284 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
285 * elf64-s390.c (elf_s390_relocate_section): Likewise.
286 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
287 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
288 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
289 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
290
291 * elf32-cris.c (cris_elf_relocate_section): Don't recalculate symbol
292 section for reloc output.
293 * elf32-i370.c (i370_elf_relocate_section): Likewise.
294 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
295 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
296 * elf32-vax.c (elf_vax_relocate_section): Likewise.
297 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
298 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
299
300 * elf32-ppc.c (ppc_elf_relocate_section): Don't recalculate everything
301 for R_PPC_RELAX32 reloc. Don't bother checking ppc_elf_install_value
302 return value.
303 * elf64-ppc.c (ppc64_elf_relocate_section <R_PPC64_TOC>): Sanity check
304 sec->id.
305
306 2003-11-05 Alan Modra <amodra@bigpond.net.au>
307
308 * elf32-d10v.c (extract_rel_addend, insert_rel_addend): New functions.
309 (elf32_d10v_relocate_section): Use them to handle -r reloc
310 adjustments, and in place of _bfd_elf_rela_local_sym.
311
312 * cpu-iq2000.c (arch_info_struct): Warning fix.
313
314 2003-11-05 Alan Modra <amodra@bigpond.net.au>
315
316 * elf32-hppa.c (ELIMINATE_COPY_RELOCS): Define.
317 (elf32_hppa_copy_indirect_symbol): Don't copy NON_GOT_REF on
318 weakdefs.
319 (elf32_hppa_check_relocs): Use ELIMINATE_COPY_RELOCS.
320 (elf32_hppa_adjust_dynamic_symbol): Likewise. Copy weakdef
321 NON_GOT_REF.
322 (allocate_dynrelocs): Use ELIMINATE_COPY_RELOCS and
323 SYMBOL_CALLS_LOCAL. Discard relocs for undef weak syms with
324 non-default visibility.
325 (elf32_hppa_relocate_section): Use ELIMINATE_COPY_RELOCS and
326 SYMBOL_CALLS_LOCAL.
327
328 2003-11-04 Alan Modra <amodra@bigpond.net.au>
329
330 * aout-target.h, aoutf1.h, bfdio.c, bfdwin.c: Update copyright date.
331 * coff-apollo.c, coff-sparc.c, coff-w65.c, coff-we32k.c: Ditto.
332 * coff-z8k.c, coffgen.c, cpu-frv.c, cpu-h8500.c, cpu-hppa.c: Ditto.
333 * cpu-ia64-opc.c, cpu-m10300.c, cpu-mips.c, cpu-msp430.c: Ditto.
334 * cpu-rs6000.c, cpu-z8k.c, efi-app-ia32.c, elf32-am33lin.c: Ditto.
335 * gen-aout.c, hash.c, hp300hpux.c, init.c, mach-o.c: Ditto.
336 * nlm-target.h, nlm.c, som.h, stabs.c, sysdep.h, xsym.h: Ditto.
337
338 * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Fix
339 "dereferencing type-punned pointer" warnings.
340
341 * aout-adobe.c (aout_adobe_set_section_contents): Constify location.
342 * aoutx.h (NAME(aout,set_section_contents)): Ditto.
343 * bfd-in2.h: Regenerate.
344 * binary.c (binary_set_section_contents): Ditto.
345 * bout.c (b_out_set_section_contents): Ditto.
346 * coff-tic54x.c (tic54x_set_section_contents): Ditto.
347 * coffcode.h (coff_set_section_contents): Ditto.
348 * ecoff.c (_bfd_ecoff_set_section_contents): Ditto.
349 * elf-bfd.h (_bfd_elf_set_section_contents): Ditto.
350 * elf.c (_bfd_elf_set_section_contents): Ditto.
351 * elfxx-mips.c (_bfd_mips_elf_set_section_contents): Ditto.
352 * elfxx-mips.h (_bfd_mips_elf_set_section_contents): Ditto.
353 * i386msdos.c (msdos_set_section_contents): Ditto.
354 * ieee.c (ieee_set_section_contents): Ditto.
355 * ihex.c (ihex_set_section_contents): Ditto.
356 * libaout.h (NAME(aout,set_section_contents)): Ditto.
357 * libbfd-in.h (_bfd_nowrite_set_section_contents): Ditto.
358 (_bfd_generic_set_section_contents): Ditto.
359 * libbfd.h: Regenerate.
360 * libbfd.c (_bfd_generic_set_section_contents): Ditto.
361 * libecoff.h (_bfd_ecoff_set_section_contents): Ditto.
362 * libnlm.h (nlmNAME(set_section_contents)): Ditto.
363 (struct nlm_backend_data <nlm_mangle_relocs>): Ditto.
364 * mmo.c (mmo_set_section_contents): Ditto.
365 * nlm32-alpha.c (nlm_alpha_mangle_relocs): Ditto.
366 * nlm32-i386.c (nlm_i386_mangle_relocs): Ditto.
367 * nlm32-ppc.c (nlm_powerpc_mangle_relocs): Ditto.
368 * nlm32-sparc.c (nlm_sparc_mangle_relocs): Ditto.
369 * nlmcode.h (nlm_set_section_contents): Ditto.
370 * oasys.c (oasys_set_section_contents): Ditto.
371 * pdp11.c (NAME(aout,set_section_contents)): Ditto.
372 * ppcboot.c (ppcboot_set_section_contents): Ditto.
373 * srec.c (srec_set_section_contents): Ditto.
374 * targets.c (BFD_JUMP_TABLE_WRITE <_bfd_set_section_contents>): Ditto.
375 * tekhex.c (tekhex_set_section_contents): Ditto.
376 (move_section_contents): Ditto.
377 * versados.c (versados_set_section_contents): Ditto.
378 * vms-misc.c (_bfd_save_vms_section): Ditto.
379 * vms.c (vms_set_section_contents): Ditto.
380 * vms.h (_bfd_save_vms_section): Ditto.
381
382 2003-11-04 Alan Modra <amodra@bigpond.net.au>
383
384 * elf64-ppc.c (ppc_size_one_stub): Size relbrlt. Accept info arg
385 rather than htab.
386 (ppc64_elf_size_stubs): Adjust ppc_size_one_stub traversal. Zero
387 relbrlt size.
388 (ppc64_elf_build_stubs): Allocate space for relbrlt.
389
390 2003-11-04 Alan Modra <amodra@bigpond.net.au>
391
392 * bfd-in.h (_bfd_elf_tls_setup): Declare.
393 * bfd-in2.h: Regenerate.
394 * elf-bfd.h (struct elf_link_tls_segment): Delete.
395 (struct elf_link_hash_table): Add tls_sec and tls_size.
396 * elf.c (_bfd_elf_link_hash_table_init): Init tls_sec and tls_size.
397 * elflink.c (_bfd_elf_tls_setup): New function.
398 * elflink.h (struct elf_final_link_info): Remove first_tls_sec.
399 (elf_bfd_final_link): Don't set first_tls_sec here. Update code
400 saving tls segment info, round segment size up.
401 (elf_link_output_extsym): Adjust code using tls segment info.
402 (elf_link_input_bfd): Likewise.
403 * elf32-i386.c (dtpoff_base, tpoff): Likewise.
404 * elf32-s390.c (dtpoff_base, tpoff): Likewise.
405 * elf32-sh.c (dtpoff_base, tpoff): Likewise.
406 * elf32-sparc.c (dtpoff_base, tpoff): Likewise.
407 * elf64-s390.c (dtpoff_base, tpoff): Likewise.
408 * elf64-x86-64.c (dtpoff_base, tpoff): Likewise.
409 * elfxx-ia64.c (elfNN_ia64_tprel_base): Likewise.
410 (elfNN_ia64_dtprel_base): Likewise.
411 * elf64-alpha.c (alpha_get_dtprel_base): Likewise.
412 (alpha_get_tprel_base): Likewise.
413 (struct alpha_relax_info): Remove tls_segment.
414 (elf64_alpha_relax_got_load): Adjust invocation of
415 alpha_get_dtprel_base and alpha_get_tprel_base.
416 (elf64_alpha_relax_tls_get_addr): Likewise.
417 (elf64_alpha_relax_section): Likewise.
418 (elf64_alpha_relocate_section): Likewise.
419 (elf64_alpha_relax_find_tls_segment): Delete.
420 * elf32-ppc.c (struct ppc_elf_link_hash_table): Remove tls_sec.
421 (ppc_elf_tls_setup): Call _bfd_elf_tls_setup. Return section.
422 (ppc_elf_relocate_section): Adjust to use elf.tls_sec.
423 * elf32-ppc.h (ppc_elf_tls_setup): Update.
424 * elf64-ppc.c (struct ppc_link_hash_table): Remove tls_sec.
425 (ppc64_elf_tls_setup): Call _bfd_elf_tls_setup. Return section.
426 (ppc64_elf_tls_optimize): Adjust to use elf.tls_sec.
427 (ppc64_elf_relocate_section): Likewise.
428 * elf64-ppc.h (ppc64_elf_tls_setup): Update.
429
430 2003-11-03 Daniel Jacobowitz <drow@mvista.com>
431
432 * elf-bfd.h (struct elf_backend_data): Remove plt_header_size.
433 * elf-m10300.c (elf_backend_plt_header_size): Don't define.
434 * elf32-arm.h (elf_backend_plt_header_size): Don't define.
435 * elf32-cris.c (elf_backend_plt_header_size): Don't define.
436 * elf32-i386.c (elf_backend_plt_header_size): Don't define.
437 * elf32-mips.c (elf_backend_plt_header_size): Don't define.
438 * elf32-ppc.c (elf_backend_plt_header_size): Don't define.
439 * elf32-s390.c (elf_backend_plt_header_size): Don't define.
440 * elf32-sh.c (elf_backend_plt_header_size): Don't define.
441 * elf32-sparc.c (elf_backend_plt_header_size): Don't define.
442 * elf64-alpha.c (elf_backend_plt_header_size): Don't define.
443 * elf64-hppa.c (elf_backend_plt_header_size): Don't define.
444 * elf64-mips.c (elf_backend_plt_header_size): Don't define.
445 * elf64-ppc.c (elf_backend_plt_header_size): Don't define.
446 * elf64-s390.c (elf_backend_plt_header_size): Don't define.
447 * elf64-sh64.c (elf_backend_plt_header_size): Don't define.
448 * elf64-sparc.c (elf_backend_plt_header_size): Don't define.
449 * elf64-x86-64.c (elf_backend_plt_header_size): Don't define.
450 * elfn32-mips.c (elf_backend_plt_header_size): Don't define.
451 * elfxx-ia64.c (elf_backend_plt_header_size): Don't define.
452 * elfxx-target.h (elf_backend_plt_header_size): Don't define
453 or include in target initializer.
454
455 2003-11-03 Andrew Cagney <cagney@redhat.com>
456
457 * section.c (bfd_set_section_contents): Make the "location" buffer
458 constant.
459 * bfd-in2.h: Re-generate.
460
461 2003-10-30 Andrew Cagney <cagney@redhat.com>
462
463 * syms.c: Replace "struct symbol_cache_entry" with "struct
464 bfd_symbol".
465 * vms.h, targets.c, section.c, reloc.c, peicode.h: Ditto.
466 * mipsbsd.c, elf.c, linker.c, elf-bfd.h, ecoff.c: Ditto.
467 * cpu-z8k.c, cpu-ns32k.c, cpu-h8500.c, bfd.c, bfd-in.h: Ditto.
468 * bfd-in2.h: Re-generate.
469
470 2003-10-30 Jakub Jelinek <jakub@redhat.com>
471
472 * elfxx-ia64.c: Include objalloc.h, hashtab.h.
473 (struct elfNN_ia64_local_hash_entry): Remove root. Add id and r_sym
474 fields.
475 (struct elfNN_ia64_local_hash_table): Remove.
476 (struct elfNN_ia64_link_hash_table): Change loc_hash_table's type
477 to htab_t. Add loc_hash_memory field.
478 (elfNN_ia64_local_hash_table_init, elfNN_ia64_new_loc_hash_entry):
479 Removed.
480 (elfNN_ia64_local_htab_hash, elfNN_ia64_local_htab_eq): New
481 functions.
482 (elfNN_ia64_hash_table_create): Use hashtab.h hashtable for
483 loc_hash_table. Initialize loc_hash_memory.
484 (elfNN_ia64_hash_table_free): New function.
485 (elfNN_ia64_local_hash_lookup): Remove.
486 (elfNN_ia64_local_dyn_sym_thunk): Change into htab_traverse
487 callback.
488 (elfNN_ia64_dyn_sym_traverse): Use htab_traverse.
489 (get_local_sym_hash): Use hashtab.h hashtable for loc_hash_table.
490 (bfd_elfNN_bfd_link_hash_table_free): Define.
491
492 2003-10-30 Alan Modra <amodra@bigpond.net.au>
493
494 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Modify versioned
495 symbol string in place.
496
497 2003-10-30 Jim Blandy <jimb@redhat.com>
498
499 * cpu-rs6000.c (rs6000_compatible): Check the correct arch_info
500 object's mach field: all PowerPC machines are supersets of the
501 original rs6000, but not later rs6000 machines.
502
503 2003-10-30 Alan Modra <amodra@bigpond.net.au>
504
505 * dwarf2.c (struct attribute): Delete "unsnd", "snd" and "addr".
506 Add "val" and "sval" fields.
507 (DW_STRING, DW_UNSND, DW_BLOCK, DW_SND, DW_ADDR): Delete.
508 (read_attribute_value): Expand and adjust DW_* occurrences.
509 (scan_unit_for_functions, parse_comp_unit): Likewise.
510
511 2003-10-30 Phil Edwards <phil@codesourcery.com>
512
513 * config.bfd (arm-*-vxworks): Remove separate stanza; merge with
514 other common ELF triples.
515 (i[3-7]86-*-vxworks): Change to ELF format.
516 (mips*-*-windiss): New triple, add to common MIPS/ELF stanza.
517 (sh-*-vxworks): New stanza.
518
519 2003-10-30 Lars Knoll <lars@trolltech.com>
520 Michael Matz <matz@suse.de>
521 Jakub Jelinek <jakub@redhat.com>
522 Alan Modra <amodra@bigpond.net.au>
523
524 * merge.c (struct sec_merge_sec_info): Update comment.
525 (struct sec_merge_hash_entry): Remove entsize.
526 (sec_merge_hash_lookup): Only adjust alignment when creating.
527 (sec_merge_emit): Remove register keyword.
528 (cmplengthentry, last4_eq, last_eq): Delete.
529 (strrevcmp, strrevcmp_align, is_suffix): New.
530 (merge_strings): Use them to implement fast suffix merging.
531 * elf-strtab.c (struct elf_strtab_hash_entry): Update comments.
532 Make "len" signed.
533 (_bfd_elf_strtab_add): Lose on >2G strings.
534 (_bfd_elf_strtab_emit): Don't emit strings with len < 0.
535 (cmplengthentry, last4_eq): Delete.
536 (strrevcmp, is_suffix): New.
537 (_bfd_elf_strtab_finalize): Rework to implement fast suffix merging.
538
539 2003-10-29 Daniel Jacobowitz <drow@mvista.com>
540
541 * elf32-arm.h (elf32_arm_final_link_relocate): Move check for
542 SEC_ALLOC.
543
544 2003-10-29 Philip Blundell <philb@gnu.org>
545
546 * elf32-arm.h (elf32_arm_plt0_entry, elf32_arm_plt_entry): New
547 code sequence.
548 (PLT_HEADER_SIZE): New.
549 (struct elf32_arm_pcrel_relocs_copied): Rename to ...
550 (struct elf32_arm_relocs_copied): ... this. Count both
551 pcrel and non-pcrel relocs. All uses updated.
552 (struct elf32_arm_link_hash_table): Add pointers to dynamic linker
553 sections and symbol/section mapping cache.
554 (create_got_section): New.
555 (elf32_arm_create_dynamic_sections): New.
556 (elf_backend_create_dynamic_sections): Use it.
557 (elf32_arm_final_link_relocate): Support garbage collection of relocs.
558 (elf32_arm_check_relocs): Likewise.
559 (elf32_arm_adjust_dynamic_symbol): Likewise.
560 (elf32_arm_copy_indirect_symbol): New.
561 (elf32_arm_link_hash_table_create): Initialise new fields.
562 (elf32_arm_gc_sweep_hook): Implement.
563 (elf32_arm_discard_copies): Delete.
564 (elf32_arm_finish_dynamic_symbol): Use new PLT code.
565 (elf32_arm_finish_dynamic_sections): Likewise.
566 (elf_backend_can_refcount): Define.
567 (elf_backend_copy_indirect_symbol): Likewise.
568 (elf_backend_plt_header_size): Set to PLT_HEADER_SIZE.
569
570 2003-10-29 Alan Modra <amodra@bigpond.net.au>
571
572 * elf64-ppc.c (elf_backend_grok_prstatus): Define.
573 (elf_backend_grok_psinfo): Define.
574 (ppc64_elf_grok_prstatus, ppc64_elf_grok_psinfo): New functions.
575
576 * elf.c (_bfd_elfcore_make_pseudosection): Allow multiple
577 sections with the same name.
578 (elfcore_grok_lwpstatus): Likewise.
579 (elfcore_grok_win32pstatus): Likewise.
580 (elfcore_grok_note): Likewise.
581 (elfcore_grok_nto_status): Likewise.
582 (elfcore_grok_nto_gregs): Likewise.
583
584 2003-10-27 Daniel Jacobowitz <drow@mvista.com>
585
586 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Never skip dynamic
587 objects.
588
589 2003-10-14 Richard Sandiford <rsandifo@redhat.com>
590
591 * elfxx-mips.c (mips_elf_create_got_section): Initialize global_gotno.
592
593 2003-10-24 H.J. Lu <hongjiu.lu@intel.com>
594
595 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Look up
596 hash table for real symbols.
597
598 2003-10-23 Michael Snyder <msnyder@redhat.com>
599
600 * section.c (asection): Fix typo in comment.
601
602 2003-10-23 Alan Modra <amodra@bigpond.net.au>
603
604 * elf64-ppc.c (get_tls_mask): Add toc_symndx param, save toc
605 reloc symbol index to it. Don't allow gd syms in shared libs
606 to be optimized.
607 (ppc64_elf_tls_optimize): Adjust get_tls_mask call.
608 (ppc64_elf_size_stubs): Likewise.
609 (ppc64_elf_relocate_section): Check that tls relocs are only used
610 with tls syms, and similarly for non-tls. Correct symbol used
611 when optimizing toc tls code.
612
613 2003-10-22 Nick Clifton <nickc@redhat.com>
614
615 * peicode.h (coff_swap_scnhdr_in): Only remove padding when
616 processing an executable.
617
618 2003-10-22 Jakub Jelinek <jakub@redhat.com>
619
620 * elflink.c (_bfd_elf_export_symbol): Adjust for globals and locals
621 field changes.
622 (_bfd_elf_link_assign_sym_version): Likewise.
623 * elflink.h (size_dynamic_sections): Likewise.
624
625 2003-10-21 Alexandre Oliva <aoliva@redhat.com>,
626 Michael Snyder <msnyder@redhat.com>
627
628 * archures.c (bfd_mach_sh4a, bfd_mach_sh4al_dsp, bfd_mach_sh4_nofpu,
629 bfd_mach_sh4a_nofpu): New machine types.
630 * bfd-in2.h: Rebuilt.
631 * cpu-sh.c (compatible): Remove unused function.
632 (SH4A_NEXT, SH4AL_DSP_NEXT, SH4_NOFPU_NEXT, SH4A_NOFPU_NEXT): New.
633 (arch_info_struct): Add sh4a, sh4al_dsp, sh4-nofpu and sh4a-nofpu.
634 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle them.
635
636 2003-10-21 Wouter van Heyst <wouter@vidicode.nl>
637
638 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Correct text
639 describing mismatched formats involving the Maverick FP type.
640
641 2003-10-21 Anil Paranjpe <anilp1@KPITCummins.com>
642
643 * binary.c (binary_object_p): Pass machine flag along with
644 architecture.
645
646 2003-10-21 Thorsten Brehm <brehm@gmx.net>
647
648 * archures.c (bfd_default_scan): Add support for mcf528x.
649 * ieee.c (ieee_write_processor): Likewise.
650
651 2003-10-21 Peter Barada <pbarada@mail.wm.sps.mot.com>
652 Bernardo Innocenti <bernie@develer.com>
653
654 * archures.c: Add MCF528x (MCFv4) support.
655 * bfd/cpu-m68k.c (arch_info_struct): Likewise.
656 * bfd-in2.h: Regenerate.
657
658 2003-10-20 Andrew Cagney <cagney@redhat.com>
659
660 * targets.c: Replace "struct sec" with "struct bfd_section"
661 * syms.c, sparclynx.c, section.c, opncls.c: Ditto.
662 * libcoff-in.h, libbfd-in.h, elfxx-target.h: Ditto.
663 * elf.c, coffgen.c, bfd.c, bfd-in.h, aoutf1.h: Ditto.
664 * aout-tic30.c, aout-target.h:
665 * bfd-in2.h, libcoff.h, libbfd.h: Regenerate.
666
667 2003-10-18 Hans-Peter Nilsson <hp@bitrange.com>
668
669 Support linker relaxation of new R_MMIX_PUSHJ_STUBBABLE relocs.
670 * elf64-mmix.c (MAX_PUSHJ_STUB_SIZE): New macro.
671 (struct _mmix_elf_section_data): New member pjs.
672 (mmix_set_relaxable_size, mmix_elf_get_section_contents): New
673 functions.
674 (elf_mmix_howto_table): New entry for R_MMIX_PUSHJ_STUBBABLE.
675 (mmix_reloc_map): Ditto.
676 (mmix_elf_relocate_section): Handle R_MMIX_PUSHJ_STUBBABLE.
677 (mmix_final_link_relocate, mmix_elf_check_common_relocs): Ditto.
678 (mmix_elf_perform_relocation): Ditto. Don't mark parameter addr
679 unused.
680 (mmix_elf_check_relocs): Move early return to after
681 mmix_elf_check_common_relocs call.
682 (mmix_elf_symbol_processing): Fix cut-and-pasto in head comment.
683 (_bfd_mmix_before_linker_allocation): Rename from
684 _bfd_mmix_prepare_linker_allocated_gregs. All referers changed.
685 Arrange to set the initial relaxable size of sections.
686 (_bfd_mmix_after_linker_allocation): Rename from
687 _bfd_mmix_finalize_linker_allocated_gregs.
688 (mmix_elf_relax_section): Relax a R_MMIX_PUSHJ_STUBBABLE reloc.
689 (bfd_elf64_get_section_contents): Define.
690 * reloc.c: Add ENUMX for BFD_RELOC_MMIX_PUSHJ_STUBBABLE.
691 * libbfd.h, bfd-in2.h: Regenerate.
692
693 * reloc.c (bfd_generic_relax_section): Default-set
694 section->_cooked_size here.
695 (bfd_generic_get_relocated_section_contents): Don't set it here.
696 Explain why.
697
698 2003-10-17 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
699
700 * elf32-hppa.c (elf32_hppa_relocate_section): Skip relocation if
701 output section has been discarded.
702
703 2003-10-17 Shrinivas Atre <shrinivasa@KPITCummins.com>
704
705 * coff-h8300.c (funcvec_hash_newfunc): Handle normal mode.
706 (h8300_reloc16_extra_cases): Likewise.
707 (h8300_bfd_link_add_symbols): Likewise.
708
709 2003-10-17 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
710
711 * cpu-h8300.c (h8300sxn_info_struct): Correct address size.
712 (h8300sn_info_struct): Likewise.
713 (h8300hn_info_struct): Likewise.
714
715 2003-10-16 Pavel Roskin <proski@gnu.org>
716
717 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Don't calculate image size
718 for sections which lack size info.
719
720 2003-10-17 Danny Smith <dannysmith@users.sourceforge.net>
721
722 * configure.host: Add __USE_MINGW_FSEEK to HDEFINES for
723 mingw32.
724
725 2003-10-16 H.J. Lu <hongjiu.lu@intel.com>
726
727 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Also warn
728 undefined patterns with '*'.
729
730 2003-10-16 H.J. Lu <hongjiu.lu@intel.com>
731
732 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't
733 use the last CIE from a different section.
734 (_bfd_elf_write_section_eh_frame): Don't pad beyond the raw
735 size of the output section.
736
737 2003-10-07 Roland McGrath <roland@redhat.com>
738
739 * elf.c (_bfd_elf_make_section_from_phdr): Set alignment_power of
740 new section from p_align header field.
741
742 2003-10-16 H.J. Lu <hongjiu.lu@intel.com>
743
744 * elf32-xtensa.c (xtensa_read_table_entries): The external size
745 of entry is 8 bytes.
746
747 2003-10-15 Andrew Cagney <cagney@redhat.com>
748
749 * targets.c (BFD_JUMP_TABLE_SYMBOLS): Replace NAME##_get_symtab
750 with NAME##_canonicalize_symtab.
751 * libcoff-in.h (coff_canonicalize_symtab): Update.
752 * xsym.h (bfd_sym_canonicalize_symtab): Update.
753 * elf-bfd.h (_bfd_elf_canonicalize_symtab): Update.
754 * coffgen.c (coff_canonicalize_symtab): Update.
755 * libbfd-in.h (_bfd_nosymbols_canonicalize_symtab): Update.
756 * libnlm.h (nlmNAME(canonicalize_symtab)): Update.
757 * ieee.c (ieee_vec): Update comment.
758 * libecoff.h (_bfd_ecoff_canonicalize_symtab): Update.
759 * mmo.c (mmo_canonicalize_symtab): Update.
760 * nlm-target.h (nlm_canonicalize_symtab): Update.
761 * nlmcode.h (nlm_canonicalize_symtab): Update.
762 * i386msdos.c (msdos_canonicalize_symtab): Update.
763 * hp300hpux.c (MY (canonicalize_symtab)): Update.
764 * oasys.c (oasys_canonicalize_symtab): Update.
765 * som.c (som_canonicalize_symtab): Update.
766 * pef.c (bfd_pef_canonicalize_symtab): Update.
767 * nlmcode.h (nlm_canonicalize_symtab): Update.
768 * xsym.c (bfd_sym_canonicalize_symtab): Update.
769 * vms.c (vms_canonicalize_symtab): Update.
770 * versados.c (versados_canonicalize_symtab): Update.
771 * mach-o.c (bfd_mach_o_canonicalize_symtab): Update.
772 * ieee.c (ieee_canonicalize_symtab): Update.
773 * pdp11.c (NAME(aout,canonicalize_symtab)): Update.
774 * reloc.c: Update comment.
775 * libaout.h (NAME(aout,canonicalize_symtab)): Update.
776 * coff64-rs6000.c (aix5coff64_vec): Update.
777 * coff64-rs6000.c (bfd_xcoff_aix5_backend_data): Update.
778 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update.
779 * aoutx.h (NAME(aout,canonicalize_symtab)): Update.
780 * elfxx-target.h (bfd_elfNN_canonicalize_symtab): Update.
781 * hp300hpux.c (MY_canonicalize_symtab): Update.
782 * ecoff.c (_bfd_ecoff_canonicalize_symtab): Update.
783 * aout-tic30.c (MY_canonicalize_symtab): Update.
784 * aout-target.h (MY_canonicalize_symtab): Update.
785 * ppcboot.c (ppcboot_canonicalize_symtab): Update.
786 * elf.c (_bfd_elf_canonicalize_symtab): Update.
787 * elfcode.h (elf_canonicalize_symtab): Update.
788 * ihex.c (ihex_canonicalize_symtab): Update.
789 * tekhex.c (tekhex_canonicalize_symtab): Update.
790 * binary.c (binary_canonicalize_symtab): Update.
791 * srec.c (srec_canonicalize_symtab): Update.
792
793 2003-10-15 Kazu Hirata <kazu@cs.umass.edu>
794
795 * elf32-h8300.c (elf_reloc_map): Fix a comment typo.
796
797 2003-10-15 Kaz Kojima <kkojima@rr.iij4u.or.jp>
798
799 * elf32-sh.c (sh_elf_relocate_section): Handle R_SH_IMM_*_PCREL
800 relocations.
801 (sh_elf_check_relocs): Likewise.
802
803 * elf32-sh64.c (elf_backend_merge_symbol_attribute): Define.
804 (sh64_elf_merge_symbol_attribute): New.
805 * elf64-sh64.c (elf_backend_merge_symbol_attribute): Define.
806 (sh64_elf64_merge_symbol_attribute): New.
807
808 2003-10-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
809
810 * elf-bfd.h (struct elf_backend_data): New function pointer member
811 elf_backend_merge_symbol_attribute.
812 * elflink.h (elf_link_add_object_symbols): Adjust call to
813 elf_backend_merge_symbol_attribute if the backend defined it.
814 * elfxx-target.h (elf_backend_merge_symbol_attribute): New macro.
815 (elfNN_bed): Add that to the initializer.
816
817 2003-10-14 Bob Wilson <bob.wilson@acm.org>
818
819 * elf32-xtensa.c (get_is_linkonce_section): Delete.
820 (xtensa_is_property_section, xtensa_is_littable_section): Use
821 XTENSA_INSN_SEC_NAME and XTENSA_LIT_SEC_NAME macros. Do not recognize
822 linkonce sections containing ".xt.insn" and ".xt.lit" substrings.
823 (xtensa_get_property_section_name): Check section name instead of
824 calling get_is_linkonce_section. Remove unused bfd parameter. Use
825 XTENSA_INSN_SEC_NAME and XTENSA_LIT_SEC_NAME macros. Never generate
826 linkonce section names by appending ".xt.insn" or ".xt.lit".
827 (xtensa_read_table_entries): Remove bfd argument in call to
828 xtensa_get_property_section_name. Free section name when done.
829 (elf_xtensa_combine_prop_entries): Free leaking table.
830
831 2003-10-13 Richard Sandiford <rsandifo@redht.com>
832
833 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Don't add
834 DT_MIPS_LIBLIST or DT_MIPS_CONFLICT entries.
835 (_bfd_mips_elf_finish_dynamic_symbol): Don't handle them. Don't
836 handle DT_MIPS_MSYM. Set DT_RELSZ based on the number of relocations
837 that were needed.
838 (_bfd_mips_elf_modify_segment_map): Fix placement of PT_MIPS_OPTIONS.
839 (_bfd_mips_elf_merge_private_bfd_data): Ignore EF_MIPS_UCODE.
840
841 2003-10-13 H.J. Lu <hongjiu.lu@intel.com>
842
843 * bfd-in.h (bfd_elf32_ia64_after_parse): New prototype.
844 (bfd_elf64_ia64_after_parse): Likewise.
845 * bfd-in2.h: Regenerated.
846
847 * elfxx-ia64.c (oor_ip): New.
848 (oor_branch_size): Likewise.
849 (bfd_elfNN_ia64_after_parse): Likewise.
850 (elfNN_ia64_relax_section): Use oor_ip if oor_branch_size
851 equals sizeof (oor_ip).
852
853 2003-10-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
854
855 * elf64-sh64.c (sh_elf64_relocate_section): Tidy up for the
856 renumbering of some relocation numbers.
857
858 2003-10-11 Alan Modra <amodra@bigpond.net.au>
859
860 * coff-sh.c: Move definition of MAP and guard more code with
861 COFF_IMAGE_WITH_PE.
862
863 * section.c (bfd_get_section_size_before_reloc): Ignore reloc_done.
864 * bfd-in2.h: Regenerate.
865
866 2003-10-10 H.J. Lu <hongjiu.lu@intel.com>
867
868 * Makefile.am: Run "make dep-am".
869 * Makefile.in: Regenerate.
870 * doc/Makefile.in: Likewise.
871
872 2003-10-09 H.J. Lu <hongjiu.lu@intel.com>
873
874 * cofflink.c: Include "safe-ctype.h".
875 (coff_link_add_symbols): Use ISDIGIT instead of isdigit.
876
877 2003-10-08 Dave Brolley <brolley@redhat.com>
878 On behalf of Michael Snyder <msnyder@redhat.com>
879
880 * archures.c: Add FRV fr550 machine.
881 * cpu-frv.c: Ditto.
882 * elf32-frv.c: Ditto.
883 * bfd-in2.h: Regenerate.
884
885 2003-10-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
886
887 * elfxx-mips.c (STUB_MOVE,STUB_LI16): Fix stub code
888 for non-SGI N64 ABI. Improve code consitency.
889
890 2003-10-07 Alexandre Oliva <aoliva@redhat.com>
891
892 * elf32-frv.c (elf32_frv_howto_table): Set R_FRV_LABEL16's
893 rightshift to 2.
894
895 2003-10-07 Nathan Sidwell <nathan@codesourcery.com>
896
897 * libbfd-in.h (_bfd_link_section_stabs): Add string offset
898 parameter.
899 * cofflink.c (coff_link_add_symbols): Deal with split stab
900 sections.
901 * elflink.h (elf_link_add_object_symbols): Deal with split stab
902 sections.
903 * stabs.c (_bfd_link_section_stabs): Add string offset parameter.
904 * libbfd.h: Regenerated.
905
906 * coffcode.h (coff_set_alignment_hook): With PE_COFF reloc
907 overflow, set reloc start position to after the count
908 reloc. Subtract one from num relocs. Give error on 0xffff relocs
909 and no overflow.
910 * cofflink.c (_bfd_coff_final_link): Deal with PE_COFF reloc
911 overflow.
912 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Do overflow if >=
913 0xffff.
914
915 2003-10-06 H.J. Lu <hongjiu.lu@intel.com>
916
917 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Pad the
918 last CIE/FDE if needed.
919
920 2003-10-06 Nick Clifton <nickc@redhat.com>
921
922 * targets.c (_bfd_target_vector): Include bfd_elf64_sparc_vec if
923 BFD64 is enabled.
924
925 2003-10-06 Matt Thomas <matt@3am-software.com>
926
927 * config.bfd: Move the hppa*-*-netbsd* case to the hppa*-*-linux* case.
928
929 2003-10-06 Robert Millan <robertmh@gnu.org>
930
931 * configure.in: Match GNU/KNetBSD with new knetbsd*-gnu triplet.
932 * config.bfd: Likewise.
933 * configure: Regenerate.
934
935 2003-10-04 Christian Groessler <chris@groessler.org>
936
937 * coff-z8k.c (extra_case): Fix displacement length check for R_JR
938 and R_CALLR.
939
940 2003-10-04 Stephane Carrez <stcarrez@nerim.fr>
941
942 * elf32-m68hc1x.c: Update to ISO C90; replace PTR with void*.
943 * elf32-m68hc11.c: Likewise.
944 * elf32-m68hc12.c: Likewise.
945 * elf32-m68hc1x.h: Likewise.
946
947 2003-10-04 Stephane Carrez <stcarrez@nerim.fr>
948
949 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Fix merge
950 of flags between HC12 and HCS12.
951
952 2003-10-04 Bryce McKinlay <bryce@mckinlay.net.nz>
953
954 * merge.c (_bfd_merge_sections): Set SEC_EXCLUDE flag on sections
955 which become empty after merging.
956
957 2003-09-30 Jakub Jelinek <jakub@redhat.com>
958
959 * elfxx-ia64.c (ia64_howto_table): Fix size of R_IA64_TPREL64[LM]SB,
960 R_IA64_DTPREL{32,64}[LM]SB and R_IA64_DTPMOD64[LM]SB.
961
962 2003-09-30 Chris Demetriou <cgd@broadcom.com>
963
964 * archures.c (bfd_mach_mipsisa64r2): New define.
965 * bfd-in2.h: Regenerate.
966 * aoutx.h (NAME(aout,machine_type)): Handle bfd_mach_mipsisa64r2.
967 * cpu-mips.c (I_mipsisa64r2): New enum value.
968 (arch_info_struct): Add entry for I_mipsisa64r2.
969 * elfxx-mips.c (_bfd_elf_mips_mach)
970 (_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_64R2.
971 (mips_set_isa_flags): Add bfd_mach_mipsisa64r2 case.
972 (mips_mach_extensions): Add entry for bfd_mach_mipsisa64r2.
973
974 2003-09-29 H.J. Lu <hongjiu.lu@intel.com>
975
976 * elfxx-ia64.c (elfNN_hpux_backend_symbol_processing): New.
977 Handle SHN_IA_64_ANSI_COMMON.
978 (elf_backend_section_from_bfd_section): Defined.
979
980 2003-09-26 H.J. Lu <hongjiu.lu@intel.com>
981
982 * elflink.c (elf_link_read_relocs_from_section): Add an argument
983 of a pointer to section. Check bad symbol index.
984 (_bfd_elf_link_read_relocs): Modify calls to
985 elf_link_read_relocs_from_section.
986
987 2003-09-23 DJ Delorie <dj@redhat.com>
988
989 * elf32-sh.c (sh_elf_howto_table): R_SH_SWITCH8,
990 R_SH_GNU_VTINHERIT, R_SH_GNU_VTENTRY,
991 R_SH_LOOP_START,R_SH_LOOP_END moved to "reserved" spaces,
992 R_SH_DIR16, R_SH_DIR8, R_SH_DIR8UL, R_SH_DIR8UW, R_SH_DIR8U,
993 R_SH_DIR8SW, R_SH_DIR8S, R_SH_DIR4UL, R_SH_DIR4UW, R_SH_DIR4U,
994 R_SH_PSHA, R_SH_PSHL added.
995 (sh_reloc_map): Add R_SH_DIR16 and R_SH_DIR8.
996 (sh_elf_relocate_section): Support new relocs.
997
998 2003-09-23 Bob Wilson <bob.wilson@acm.org>
999
1000 * elf32-xtensa.c (elf_xtensa_relocate_section): Fix typo that clobbered
1001 dynamic relocation offsets.
1002
1003 2003-09-23 Alan Modra <amodra@bigpond.net.au>
1004
1005 * simple.c (bfd_simple_get_relocated_section_contents): Free the
1006 hash table using _bfd_generic_link_hash_table_free.
1007
1008 2003-09-23 Alan Modra <amodra@bigpond.net.au>
1009
1010 * elf-bfd.h (struct bfd_elf_special_section): Remove "suffix". Change
1011 type of prefix_length and suffix_length to int. Rename "attributes"
1012 to "attr". Comment.
1013 (_bfd_elf_get_sec_type_attr): Update prototype.
1014 * elf.c (get_special_section): Rewrite.
1015 (_bfd_elf_get_sec_type_attr): Return struct rather than passing in
1016 attr and type pointers.
1017 (_bfd_elf_new_section_hook): Adjust for above.
1018 (special_sections): Merge suffix with prefix. Set
1019 prefix_length for all entries. Set suffix_length appropriately.
1020 * elf32-m32r.c (m32r_elf_special_sections): Likewise.
1021 * elf32-m68hc11.c (elf32_m68hc11_special_sections): Likewise.
1022 * elf32-m68hc12.c (elf32_m68hc12_special_sections): Likewise.
1023 * elf32-mcore.c (mcore_elf_special_sections): Likewise.
1024 * elf32-sh64.c (sh64_elf_special_sections): Likewise.
1025 * elf32-v850.c (v850_elf_special_sections): Likewise.
1026 * elf32-xtensa.c (elf_xtensa_special_sections): Likewise.
1027 * elf64-alpha.c (elf64_alpha_special_sections): Likewise.
1028 * elf64-hppa.c (elf64_hppa_special_sections): Likewise.
1029 * elf64-ppc.c (ppc64_elf_special_sections): Likewise.
1030 * elf64-sh64.c (sh64_elf64_special_sections): Likewise.
1031 * elfxx-ia64.c (elfNN_ia64_special_sections): Likewise.
1032 * elfxx-mips.c (_bfd_mips_elf_special_sections): Likewise.
1033 * elf32-ppc.c (ppc_elf_special_sections): Likewise. Fix .plt flags.
1034
1035 2003-09-21 Daniel Jacobowitz <drow@mvista.com>
1036
1037 * elf64-alpha.c (elf64_alpha_create_got_section): Initialize
1038 ->got if the section already exists.
1039
1040 2003-09-19 Nathan Sidwell <nathan@codesourcery.com>
1041
1042 * dwarf2.c (decode_line_info): Cope with an initially empty
1043 filename table.
1044
1045 2003-09-18 H.J. Lu <hongjiu.lu@intel.com>
1046
1047 * acinclude.m4: Include ../config/accross.m4.
1048 * aclocal.m4: Regenerated.
1049
1050 * configure.host (HOST_64BIT_TYPE): Remove if it is set to long
1051 or long long.
1052 (HOST_U_64BIT_TYPE): Remove if it is set to unsigned long long.
1053 (host64): Remove if HOST_64BIT_TYPE is set to long.
1054
1055 * configure.in (HOST_64BIT_TYPE): Set according to the size of
1056 long and long long.
1057 (HOST_U_64BIT_TYPE): Likewise.
1058 (host64): Likewise.
1059 * configure: Regenerated.
1060
1061 2003-09-19 Alan Modra <amodra@bigpond.net.au>
1062
1063 * elf.c (elfcore_write_note): Don't use sizeof(Elf_External_note)
1064 since some ABIs round up the size of the struct.
1065
1066 2003-09-18 H.J. Lu <hongjiu.lu@intel.com>
1067
1068 * elflink.c (_bfd_elf_merge_symbol): Allow type change if
1069 the old symbol is undefined and the new symbol is defined.
1070
1071 2003-09-18 Andreas Schwab <schwab@suse.de>
1072
1073 * simple.c (bfd_simple_get_relocated_section_contents): Use
1074 _bfd_generic_link_hash_table_create instead of
1075 bfd_link_hash_table_create.
1076
1077 2003-09-10 H.J. Lu <hongjiu.lu@intel.com>
1078
1079 * elfxx-ia64.c (elfNN_ia64_special_sections): Mark all sections
1080 started with ".sbss" or "".sdata" as SHF_IA_64_SHORT.
1081
1082 2003-09-10 John David Anglin <dave.anglin@nrc-cnrc.nrc.ca>
1083 Randolph Chung <randolph@tausq.org>
1084
1085 * elf32-hppa.c (struct elf32_hppa_link_hash_entry,
1086 hppa_link_hash_newfunc, hppa_build_one_stub,
1087 elf32_hppa_adjust_dynamic_symbol, mark_PIC_calls, allocate_plt_static,
1088 allocate_dynrelocs, elf32_hppa_size_dynamic_sections,
1089 elf32_hppa_finish_dynamic_symbol): Remove pic_call field and all code
1090 for generating import stubs for calls to statically linked PIC
1091 functions.
1092 (hppa_type_of_stub): Don't generate an import stub for calls to
1093 statically linked pic functions. Generate import stubs for calls
1094 in a shared object, to functions not in a regular file, and to
1095 defined weak functions. Add new argument INFO.
1096 (hppa_build_one_stub): Don't undef ADDIL_DP.
1097 (elf32_hppa_check_relocs): Don't set SEC_HAS_GOT_REF flag.
1098 (elf32_hppa_size_stubs): Pass info to hppa_type_of_stub.
1099 (final_link_relocate): Change all DLTIND relocs to DPREL relocs in a
1100 non-shared link. Convert instructions that use the the linkage table
1101 pointer, or a facsimile thereof, to use the global data pointer when
1102 the reloc has been changed.
1103
1104 2003-09-08 Joel Brobecker <brobecker@gnat.com>
1105
1106 * archures.c: Add new machine names for hppa.
1107 * bfd-in2.h: Regenerate.
1108 * cpu-hppa.c: Use the new machine names.
1109
1110 2003-09-06 Stephane Carrez <stcarrez@nerim.fr>
1111
1112 * elf32-m68hc1x.h (struct m68hc11_elf_link_hash_table): Remove
1113 all_local_syms member.
1114 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Use bfd_elf_get_elf_syms
1115 to get the local symbols.
1116
1117 2003-09-06 Stephane Carrez <stcarrez@nerim.fr>
1118
1119 * elf32-m68hc12.c (elf32_m68hc12_special_sections): New for hc11.
1120 (elf_backend_special_sections): Define.a
1121
1122 PR savannah/4950:
1123 * elf32-m68hc11.c (elf32_m68hc11_special_sections): The .vectors
1124 section is read-only.
1125
1126 2003-09-04 Nick Clifton <nickc@redhat.com>
1127
1128 * archures.c (bfd_mach_v850e1): Define.
1129 * bfd-in2.h: Regenerate.
1130 * cpu-v850.h (scan): Accept bfd_mach_v850e1.
1131 (arch_info_struct): Include an entry for bfd_mach_v850e1.
1132 * elf32-v850.c (v850_elf_object_p): Accept E_V850E1_ARCH flag.
1133 (v850_elf_final_write_processing): Accept bfd_mach_v850e1.
1134 (v850_elf_print_private_bfd_data): Interpret E_V850E1_ARCH flag.
1135 (v850_elf_merge_private_bfd_data): Allow v850e1 binaries to be
1136 linked with v850e binaries. Mark the output as v850e.
1137
1138 2003-09-03 Nick Clifton <nickc@redhat.com>
1139
1140 * cofflink.c (_bfd_coff_link_input_bfd): Do not skip section
1141 symbols that are used in relocs.
1142
1143 2003-08-30 Robert Millan <robertmh@gnu.org>
1144
1145 * configure.in: Match GNU/KFreeBSD with new kfreebsd*-gnu triplet.
1146 * config.bfd: Likewise.
1147 * configure: Regenerate.
1148
1149 2003-08-31 Christian Groessler <chris@groessler.org>
1150
1151 * elf32-i860.c (i860_howto_pc26_reloc): Finish relocation here
1152 instead of returning bfd_reloc_continue.
1153
1154 2003-08-31 Andreas Jaeger <aj@suse.de>
1155
1156 * merge.c: Update to ISO C90.
1157
1158 2003-08-27 Ian Lance Taylor <ian@airs.com>
1159
1160 * configure.in: Check for strtoull.
1161 * bfd.c (bfd_scan_vma): Use strtoull when available.
1162 * configure, config.in: Regenerate.
1163
1164 * configure.in: Define and substitute BFD_HOST_LONG_LONG.
1165 * bfd-in.h: Define BFD_HOST_LONG_LONG. Test it rather than
1166 __GNUC__ when deciding whether to use long long for
1167 BFD_HOST_64_BIT.
1168 * configure, Makefile.in, doc/Makefile.in, bfd-in2.h: Regenerate.
1169
1170 2003-08-27 Christian Groessler <chris@groessler.org>
1171
1172 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc,
1173 i860_howto_splitn_reloc, i860_howto_highadj_reloc): New
1174 functions.
1175 (elf32_i860_howto_table): Insert the new functions as
1176 'special_function's in the proper reloc type entries.
1177
1178 2003-08-27 Richard Sandiford <rsandifo@redhat.com>
1179
1180 * elf32-frv.c (elf32_frv_relocate_section): Use
1181 _bfd_elf_rela_local_sym.
1182
1183 2003-08-26 Michael Snyder <msnyder@redhat.com>
1184
1185 * cpu-frv.c: Remove unused enum.
1186
1187 2003-08-25 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
1188
1189 * reloc.c: Fix documentation for MIPS ELF relocations.
1190 libbfd.h: Regenerate.
1191 bfd-in2.h: Regenerate.
1192
1193 2003-08-24 Jason Eckhardt <jle@rice.edu>
1194
1195 * coff-i860.c (CALC_ADDEND): Define to be a no-op.
1196
1197 2003-08-24 Jason Eckhardt <jle@rice.edu>
1198
1199 * elf32-i860.c (elf32_i860_relocate_pc16): Subtract 4 and
1200 shift by 2 before storing the relocated value.
1201
1202 2003-08-23 Jason Eckhardt <jle@rice.edu>
1203
1204 * coff-i860.c (coff_i860_reloc_nyi): New function.
1205 (howto_table): Add entries for relocations PAIR, HIGHADJ, HIGH,
1206 LOWn, SPLITn, and BRADDR.
1207 (RTYPE2HOWTO): Check that the r_type is within the howto_table
1208 before trying to access the entry.
1209 (coff_i860_rtype_to_howto): Likewise.
1210 (coff_i860_reloc_type_lookup): New function.
1211 (i860_reloc_processing): New function.
1212 (coff_bfd_reloc_type_lookup): Define macro.
1213 (RELOC_PROCESSING): Define macro.
1214 Minor formatting adjustments.
1215
1216 2003-08-23 Alan Modra <amodra@bigpond.net.au>
1217
1218 * elflink.h (elf_link_add_object_symbols): Don't crash on NULL owner.
1219
1220 2003-08-22 H.J. Lu <hongjiu.lu@intel.com>
1221
1222 * elfxx-ia64.c (elfNN_ia64_create_dynamic_sections): Align the
1223 .got section at 8 bytes.
1224
1225 2003-08-21 Nick Clifton <nickc@redhat.com>
1226
1227 * cofflink.c: Update to ISO C90 and tidy up formatting.
1228
1229 2003-08-21 Randolph Chung <tausq@debian.org>
1230
1231 * elf32-hppa.c (elf32_hppa_object_p): For elf32-hppa-linux, objects
1232 can have OSABI=Linux or OSABI=SysV. Check for both.
1233 * elf64-hppa.c (elf64_hppa_object_p): Likewise.
1234
1235 2003-08-21 Nick Clifton <nickc@redhat.com>
1236
1237 * po/sv.po: Updated Swedish translation.
1238
1239 2003-08-20 Richard Sandiford <rsandifo@redhat.com>
1240
1241 * elf64-mips.c (elf_backend_copy_indirect_symbol): Define.
1242
1243 2003-08-20 Nick Clifton <nickc@redhat.com>
1244
1245 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): New macro used to
1246 replace some duplicated code in most elfxx-xxxx.c files. This
1247 version uses the new fields in bfd_link_info.
1248
1249 * elf-m10300.c (mn10300_elf_relocate_section): Use new macro.
1250 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
1251 * elf32-cris.c (cris_elf_relocate_section): Likewise.
1252 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
1253 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1254 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
1255 * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
1256 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1257 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1258 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1259 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1260 * elf32-vax.c (elf_vax_relocate_section): Likewise.
1261 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
1262 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
1263 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1264 * elf64-s390.c (elf_s390_relocate_section): Likewise.
1265 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1266 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1267 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
1268
1269 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols,
1270 elf_hppa_remark_useless_dynamic_symbols,
1271 elf_hppa_relocate_section): Use the new fields in
1272 bfd_link_info structure.
1273 * elf32-sh.c (sh_elf_relocate_section): Likewise.
1274 * elf64-alpha.c (elf64_alpha_check_relocs): Likewise.
1275 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
1276 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
1277 * elfxx-ia64.c (elfNN_ia64_check_relocs): Likewise.
1278 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
1279
1280 * elflink.h (elf_link_output_extsym): Fix test for reporting
1281 undefined symbols in shared libraries. Remove redundant test
1282 of shlib_undefined when reporting references to forced local
1283 symbols.
1284
1285 2003-08-18 Andreas Schwab <schwab@suse.de>
1286
1287 * libpei.h (bfd_pe_executable_p): Also recognize efi-app
1288 executables.
1289
1290 2003-08-17 Hans-Peter Nilsson <hp@bitrange.com>
1291
1292 * simple.c (bfd_simple_get_relocated_section_contents): Move
1293 reloc_done hack to before first bfd_section_size call. Change all
1294 returns to use new wrapper macro RETURN, restoring sec->reloc_done.
1295
1296 2003-08-16 Alan Modra <amodra@bigpond.net.au>
1297
1298 * elf64-ppc.c: Don't include elf/ppc.h.
1299
1300 2003-08-14 Richard Sandiford <rsandifo@redhat.com>
1301
1302 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Fix PT_DYNAMIC
1303 code to work with 64-bit bfds.
1304
1305 2003-08-14 Alan Modra <amodra@bigpond.net.au>
1306
1307 * dep-in.sed: Remove libintl.h.
1308 * Makefile.am (SRC-POTFILES.in, BLD-POTFILES.in): Unset LC_COLLATE.
1309 (POTFILES.in): Remove target.
1310 * Makefile.in: Regenerate.
1311
1312 2003-08-12 Alan Modra <amodra@bigpond.net.au>
1313
1314 * elf64-ppc.c (ppc64_elf_next_input_section): Update comment.
1315 (ppc64_elf_relocate_section): For zero sym R_PPC64_TOC relocs,
1316 use the function sym from the previous reloc.
1317
1318 2003-08-11 Jakub Jelinek <jakub@redhat.com>
1319
1320 * elf32-i386.c (elf_i386_relocate_section): Make undefined symbols
1321 fatal if -pie.
1322 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1323 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1324 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
1325 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1326 * elf64-s390.c (elf_s390_relocate_section): Likewise.
1327 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1328 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1329 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
1330 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1331 (ppc_elf_relocate_section) <case R_PPC_RELAX32>: Issue fatal error
1332 on undefined symbols if -pie.
1333 * elf32-sh.c (sh_elf_relocate_section): Likewise.
1334
1335 2003-08-11 Alan Modra <amodra@bigpond.net.au>
1336
1337 * elf64-ppc.c (ppc64_elf_relocate_section): Add special case for crt1.o
1338 branch to __libc_start_main.
1339
1340 2003-08-08 Dmitry Diky <diwil@mail.ru>
1341
1342 * archures.c: Add xW42 and xE42 parts. Sort MPU list according to
1343 gcc order.
1344 * cpu-msp430.c: Likewise.
1345 * elf32-msp430.c: Likewise.
1346 * bfd-in2.h: Regenerate.
1347
1348 2003-08-07 Alan Modra <amodra@bigpond.net.au>
1349
1350 * elfxx-target.h: Remove PTR cast.
1351 * targets.c (bfd_target): Make backend_data const void *.
1352 * elf-bfd.h: Constify all occurrences of struct elf_backend_data.
1353 * elf-m10300.c: Likewise.
1354 * elf.c: Likewise.
1355 * elf32-hppa.c: Likewise.
1356 * elf32-i386.c: Likewise.
1357 * elf32-m68hc1x.c: Likewise.
1358 * elf32-ppc.c: Likewise.
1359 * elf32-s390.c: Likewise.
1360 * elf32-sh.c: Likewise.
1361 * elf32-sh64.c: Likewise.
1362 * elf32-sparc.c: Likewise.
1363 * elf32-xtensa.c: Likewise.
1364 * elf64-mips.c: Likewise.
1365 * elf64-ppc.c: Likewise.
1366 * elf64-s390.c: Likewise.
1367 * elf64-sh64.c: Likewise.
1368 * elf64-sparc.c: Likewise.
1369 * elf64-x86-64.c: Likewise.
1370 * elfcode.h: Likewise.
1371 * elfcore.h: Likewise.
1372 * elflink.c: Likewise.
1373 * elflink.h: Likewise.
1374 * elfxx-ia64.c: Likewise.
1375 * elfxx-mips.c: Likewise.
1376 * elfxx-mips.h: Likewise.
1377 * elf.c (prep_headers): Remove useless check for null backend_data.
1378 * bfd-in2.h: Regenerate.
1379
1380 * elf-bfd.h: Remove PARAMS macro. Replace PTR with void *.
1381 (NAME): Use ## rather than CONCAT4 macro.
1382 * elfcode.h: Remove one remaining PARAMS macro.
1383 * elf-eh-frame.c: Convert to C90, remove unneeded casts and prototypes.
1384 * elf-strtab.c: Likewise.
1385 * elf-hppa.h: Likewise.
1386 * elf32-hppa.h: Likewise.
1387 * elf32-hppa.c: Likewise.
1388 (elf32_hppa_add_symbol_hook): Delete.
1389 (elf_backend_add_symbol_hook): Don't define.
1390 * libhppa.h: Convert to C90. Replace INLINE with inline.
1391
1392 2003-08-06 Alan Modra <amodra@bigpond.net.au>
1393
1394 * elf64-ppc.c (ppc_stub_name): Tweak names for better readability.
1395 (ppc64_elf_adjust_dynamic_symbol): Allow copy relocs against
1396 function descriptors, but warn.
1397 (ppc_build_one_stub): Remove a couple of vars. Move code creating
1398 stub syms so that we can avoid a stub sym if we already have a
1399 plt sym. Do not redefine an existing symbol.
1400 (ppc64_elf_build_stubs): When --emit-stub-syms, print a symbol for
1401 glink.
1402
1403 2003-08-06 Nick Clifton <nickc@redhat.com>
1404
1405 * po/fr.po: Updated French translation.
1406
1407 2003-08-06 Alan Modra <amodra@bigpond.net.au>
1408
1409 * elflink.c (_bfd_elf_create_dynamic_sections): Mark .dynbss with
1410 SEC_LINKER_CREATED.
1411
1412 2003-08-05 Daniel Jacobowitz <drow@mvista.com>
1413
1414 * elf32-arm.h (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
1415 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Use it.
1416
1417 2003-08-03 Jeff Muizelaar <muizelaar@rogers.com>
1418
1419 * coffcode.h (coff_slurp_line_table): Return with a warning
1420 message if the line number table could not be read.
1421
1422 2003-08-04 Nick Clifton <nickc@redhat.com>
1423
1424 * elflink.h (elf_link_add_object_symbols): Prepend "warning: "
1425 to messages produced for .gnu.warning.SYMBOL sections.
1426
1427 2003-08-04 Alan Modra <amodra@bigpond.net.au>
1428
1429 * elfcode.h: Convert to C90, remove unneeded casts and prototypes.
1430 * elfcore.h: Likewise.
1431 * elflink.c: Likewise.
1432 * elflink.h: Likewise.
1433 * elf.c (sym_is_global): Remove INLINE.
1434 (align_file_position): Replace INLINE with inline.
1435 * elfcode.h (elf_swap_dyn_in, elf_swap_dyn_out): Remove INLINE.
1436 (elf_file_p): Replace INLINE with inline.
1437
1438 2003-08-02 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1439
1440 * elf32-sh.c (sh_elf_check_relocs): Don't set DF_TEXTREL here.
1441
1442 2003-08-01 H.J. Lu <hongjiu.lu@intel.com>
1443
1444 * elfxx-ia64.c (get_got): Align the .got section at 8 bytes.
1445
1446 2003-08-01 H.J. Lu <hongjiu.lu@intel.com>
1447
1448 * elfxx-ia64.c (elfNN_ia64_finish_dynamic_symbol): Use
1449 ElfNN_External_Rela instead of Elf64_External_Rela.
1450
1451 2003-08-01 Nick Clifton <nickc@redhat.com>
1452
1453 * config.bfd: Add code to catch obsolete configurations and warn
1454 about them unless --enable-obsolete is used. Use this to mark
1455 vax-vms port as obsolete.
1456
1457 2003-07-30 Alan Modra <amodra@bigpond.net.au>
1458
1459 * elf32-ppc.c (ppc_elf_install_value): Tidy.
1460 (ppc_elf_relax_section): Remove dead code. Remove unnecessary casts.
1461 Formatting.
1462 * elfxx-target.h: Remove PARAMS macro. Formatting.
1463
1464 2003-07-30 Alan Modra <amodra@bigpond.net.au>
1465
1466 * elf.c (bfd_section_from_r_symndx): Test for SHN_UNDEF.
1467 * elf64-ppc.c (get_fdh): New function, split out from
1468 ppc64_elf_edit_opd.
1469 (ppc64_elf_check_relocs): Use get_fdh.
1470 (func_desc_adjust): Likewise. Tidy.
1471 (ppc64_elf_edit_opd): Tighten reloc checks. Free local_syms on error
1472 exit. Use get_fdh. Account for superfluous dynamic relocs.
1473 (ppc64_elf_relocate_section): Warning fix.
1474
1475 2003-07-30 Jason Eckhardt <jle@rice.edu>
1476
1477 * coff-i860.c: Convert to ISO C90. Remove superflous prototypes.
1478
1479 2003-07-30 Jason Eckhardt <jle@rice.edu>
1480
1481 * elf32-i860.c: Convert to ISO C90. Remove superflous prototypes.
1482
1483 2003-07-30 Randolph Chung <tausq@debian.org>
1484
1485 * elf-hppa.h (elf_hppa_relocate_section): Look up dyn_h for undefweak.
1486 * elf64-hppa.c (elf64_hppa_finalize_dlt): Check h->root.type.
1487
1488 2003-07-30 Alan Modra <amodra@bigpond.net.au>
1489
1490 * elf.c: Convert to C90, remove unnecessary prototypes and casts.
1491 Replace PTR with void *. Formatting.
1492 (_bfd_elf_assign_file_position_for_section): Remove INLINE.
1493 (make_mapping): Likewise.
1494
1495 2003-07-29 Alan Modra <amodra@bigpond.net.au>
1496
1497 * elf64-ppc.c (func_desc_adjust): Give linker created function
1498 descriptor symbols a size and type.
1499 (ppc64_elf_relocate_section): Correct lq insn test.
1500
1501 2003-07-28 Eric Christopher <echristo@redhat.com>
1502
1503 * elf32-ppc.c (R_PPC_RELAX32): New relocation.
1504 (ppc_elf_install_value): New function.
1505 (ppc_elf_sort_rela): Remove.
1506 (ppc_elf_relax_section): Rewrite. Remove old relaxation
1507 and replace with out of range branch stubs.
1508 (ppc_elf_relocate_section): Handle R_PPC_RELAX32.
1509
1510 2003-07-29 Alexandre Oliva <aoliva@redhat.com>
1511
1512 * elf-m10300.c (mn10300_elf_relax_section): Take symbol hash table
1513 from input_bfd.
1514
1515 2003-07-28 Alan Modra <amodra@bigpond.net.au>
1516
1517 * elf.c (special_sections): Set attributes for .got and .plt.
1518
1519 2003-07-27 Alan Modra <amodra@bigpond.net.au>
1520
1521 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Ensure no copy relocs
1522 on function descriptors.
1523 (ELIMINATE_COPY_RELOCS): Expand comment.
1524 (ppc64_elf_special_sections): Move. Don't include non-ppc64 sections.
1525 Do include ".toc1".
1526
1527 2003-07-25 H.J. Lu <hongjiu.lu@intel.com>
1528
1529 * elf.c (_bfd_elf_new_section_hook): Set the default section
1530 type to SHT_NULL.
1531 (elf_fake_sections): Set the section type based on asect->flags
1532 if it is SHT_NULL. Don't abort on processor specific section
1533 types.
1534
1535 2003-07-25 H.J. Lu <hongjiu.lu@intel.com>
1536
1537 * bfd-in2.h: Regenerated.
1538
1539 2003-07-25 H.J. Lu <hongjiu.lu@intel.com>
1540
1541 * elf-bfd.h (bfd_elf_special_section): New.
1542 (elf_backend_data): Add special_sections, a pointer to
1543 bfd_elf_special_section.
1544 (elf_section_type). New.
1545 (elf_section_flags): New.
1546 (_bfd_elf_get_sec_type_attr): New.
1547
1548 * elf.c (_bfd_elf_make_section_from_shdr): Always use the
1549 real section type/flags.
1550 (special_sections): New.
1551 (get_special_section): New.
1552 (_bfd_elf_get_sec_type_attr): New.
1553 (_bfd_elf_new_section_hook): Check special_section to set
1554 elf_section_type and elf_section_flags.
1555 (elf_fake_sections): Don't use section name to set ELF section
1556 data.
1557
1558 * elf32-m32r.c (m32r_elf_special_sections): New.
1559 (elf_backend_special_sections): Defined.
1560
1561 * elf32-m68hc11.c (elf32_m68hc11_special_sections): New.
1562 (elf_backend_special_sections): Defined.
1563
1564 * elf32-mcore.c (mcore_elf_special_sections): New.
1565 (elf_backend_special_sections): Defined.
1566
1567 * elf32-ppc.c (ppc_elf_special_sections): New.
1568 (elf_backend_special_sections): Defined.
1569
1570 * elf32-sh64.c (sh64_elf_special_sections): New.
1571 (elf_backend_special_sections): Defined.
1572
1573 * elf32-v850.c (v850_elf_special_sections): New.
1574 (elf_backend_special_sections): Defined.
1575
1576 * elf32-xtensa.c (elf_xtensa_special_sections): New.
1577 (elf_backend_special_sections): Defined.
1578
1579 * elf64-alpha.c (elf64_alpha_special_sections): New.
1580 (elf_backend_special_sections): Defined.
1581
1582 * elf64-hppa.c (elf64_hppa_special_sections): New.
1583 (elf_backend_special_sections): Defined.
1584
1585 * elf64-ppc.c (ppc64_elf_special_sections): New.
1586 (elf_backend_special_sections): Defined.
1587
1588 * elf64-sh64.c (sh64_elf64_special_sections): New.
1589 (elf_backend_special_sections): Defined.
1590
1591 * elfxx-ia64.c (elfNN_ia64_special_sections): New.
1592 (elf_backend_special_sections): Defined.
1593
1594 * elfxx-mips.c (_bfd_mips_elf_special_sections): New.
1595
1596 * elfxx-mips.h (_bfd_mips_elf_special_sections): New.
1597 (elf_backend_special_sections): Defined.
1598
1599 * elfxx-target.h (elf_backend_special_sections): New. Default
1600 to NULL.
1601 (elfNN_bed): Initialize special_sections.
1602
1603 * section.c (bfd_abs_section): Remove const.
1604 (bfd_und_section): Likewise.
1605 (bfd_com_section): Likewise.
1606 (bfd_ind_section): Likewise.
1607
1608 2003-07-24 Nick Clifton <nickc@redhat.com>
1609
1610 * coff-arm.c (EXTRA_S_FLAGS): Include SEC_CODE so that code
1611 sections are assigned the LOAD attribute.
1612
1613 2003-07-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1614
1615 * elf32-sh.c: Convert to C90. Replace PTR with void *.
1616 * elf32-sh64-com.c: Likewise.
1617 * elf32-sh64.c: Likewise.
1618 * elf32-sh64.h: Likewise.
1619 * elf64-sh64.c: Likewise.
1620
1621 2003-07-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1622
1623 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
1624 (allocate_dynrelocs): Likewise.
1625 (sh_elf_relocate_section): Likewise. Use SYMBOL_REFERENCES_LOCAL.
1626 (sh_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
1627
1628 2003-07-24 Nick Clifton <nickc@redhat.com>
1629
1630 * po/fr.po: Updated French translation.
1631
1632 2003-07-23 Bob Wilson <bob.wilson@acm.org>
1633
1634 * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Make inline and move
1635 near the beginning of the file. Swap order of arguments. Call
1636 _bfd_elf_dynamic_symbol_p with "ignore_protected" set to 0.
1637 (elf_xtensa_fix_refcounts): Adjust xtensa_elf_dynamic_symbol_p call.
1638 (elf_xtensa_relocate_section): Likewise.
1639 (shrink_dynamic_reloc_sections): Likewise.
1640
1641 2003-07-23 Bob Wilson <bob.wilson@acm.org>
1642
1643 * elf32-xtensa.c (plt_reloc_count): Fix typo in comment.
1644 (elf_xtensa_size_dynamic_sections): Use elf_discarded_section.
1645 (elf_xtensa_combine_prop_entries): Avoid returning non-zero without
1646 first printing an error message.
1647 (elf_xtensa_finish_dynamic_sections): Likewise.
1648 (elf_xtensa_discard_info_for_section): Adjust size of .got.loc when
1649 discarding literal table entries.
1650 (elf_xtensa_merge_private_bfd_data): Remove newline from error message.
1651 (elf_xtensa_do_asm_simplify): Likewise.
1652
1653 2003-07-23 Stephane Carrez <stcarrez@nerim.fr>
1654
1655 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Avoid crash when
1656 we have a local symbol in common section.
1657
1658 2003-07-22 H.J. Lu <hongjiu.lu@intel.com>
1659
1660 * elflink.c (_bfd_elf_dynamic_symbol_p): Don't return TRUE for
1661 weak symbols.
1662
1663 2003-07-22 Nick Clifton <nickc@redhat.com>
1664
1665 * coffcode.h (coff_slurp_symbol_table): Add C_TCSYM and C_ECOML to
1666 expected RS6000 storage classes.
1667
1668 2003-07-21 H.J. Lu <hongjiu.lu@intel.com>
1669
1670 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Mark
1671 output_bfd unused to silence gcc.
1672
1673 2003-07-21 Nick Clifton <nickc@redhat.com>
1674
1675 * po/sv.po: Updated Swedish translation.
1676
1677 2003-07-21 Alan Modra <amodra@bigpond.net.au>
1678
1679 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Use..
1680 (_bfd_elf_symbol_refs_local_p): ..this. Declare.
1681 * elflink.c (_bfd_elf_symbol_refs_local_p): New function.
1682 * elf32-i386.c (elf_i386_relocate_section): Remove h NULL test
1683 now done in _bfd_elf_symbol_refs_local_p.
1684 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1685 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1686 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1687
1688 2003-07-18 H.J. Lu <hongjiu.lu@intel.com>
1689
1690 * elflink.c (_bfd_elf_dynamic_symbol_p): Undo the last change.
1691
1692 2003-07-18 H.J. Lu <hongjiu.lu@intel.com>
1693
1694 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL): Fix a typo.
1695 (SYMBOL_CALLS_LOCAL): Likewise.
1696
1697 * elflink.c (_bfd_elf_dynamic_symbol_p): Return TRUE
1698 immediately if symbol isn't defined locally.
1699
1700 2003-07-18 Richard Henderson <rth@redhat.com>
1701
1702 * elflink.c (_bfd_elf_dynamic_symbol_p): New.
1703 * elf-bfd.h (_bfd_elf_dynamic_symbol_p): Declare it.
1704 (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Use it.
1705 * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Likewise.
1706 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
1707 * elf64-hppa.c (elf64_hppa_dynamic_symbol_p): Likewise.
1708 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Likewise.
1709 Update all callers to provide the relocation being resolved.
1710
1711 2003-07-17 Shaun Jackman <sjackman@pathwayconnect.com>
1712
1713 * config.bfd (arm-wince-pe): Add -DARM_COFF_BUGFIX to
1714 targ_cflags.
1715
1716 2003-07-17 Nick Clifton <nickc@redhat.com>
1717
1718 * po/es.po: New Spanish translation.
1719 * po/sv.po: New Swedish translation.
1720 * po/opcodes.pot: Regenerate.
1721
1722 2003-07-16 Richard Henderson <rth@redhat.com>
1723
1724 * config.bfd, configure.host, configure.in: Remove ia64-aix support.
1725 * elfxx-ia64.c, targets.c: Likewise.
1726
1727 2003-07-16 Richard Henderson <rth@redhat.com>
1728
1729 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Properly return false
1730 for symbols defined locally plus -Bsymbolic. Tidy logic.
1731
1732 2003-07-15 Richard Sandiford <rsandifo@redhat.com>
1733
1734 * archures.c (bfd_mach_mips7000): New.
1735 * bfd-in2.h: Regenerated.
1736 * cpu-mips.c (arch_info_struct): Add an entry for mips:7000.
1737 * elfxx-mips.c (mips_set_isa_flags): Handle bfd_mach_mips7000.
1738 (mips_mach_extensions): Add an entry for it.
1739
1740 2003-07-14 Nick Clifton <nickc@redhat.com>
1741
1742 * po/tr.po: Update with latest version.
1743 * po/SRC-POTFILES.in: Regenerate.
1744 * po/bfd.pot: Regenerate.
1745 * Makfile.in: Regenerate.
1746 * configure: Regenerate.
1747
1748 2003-07-12 Jeff Baker <jbaker@qnx.com>
1749
1750 * bfd/config.bfd (__QNXTARGET__): Define for Neutrino architectures.
1751 * bfd/elf32-arm.h (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1752 * bfd/elf32-sh.c (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1753 * bfd/elf32-ppc.c (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1754
1755 2003-07-12 Jeff Muizelaar <muizelaar@rogers.com>
1756
1757 * coffcode.h (coff_set_section_contents): Set the
1758 IMAGE_FILE_32BIT_MACHINE flag for PE targets.
1759
1760 2003-07-11 Richard Sandiford <rsandifo@redhat.com>
1761
1762 * bfd-in.h (bfd_h8300_pad_address): Declare.
1763 * bfd-in2.h: Regenerate.
1764 * cpu-h8300.c (bfd_h8300_pad_address): New function.
1765 * coff-h8300.c (h8300_reloc16_estimate): Use it to canonicalize
1766 addresses before checking whether they can be relaxed.
1767 (h8300_reloc16_extra_cases): Likewise for the R_MOVL2 sanity check.
1768 Don't complain about overflows in general 8-bit relocations.
1769 * elf32-h8300.c (elf32_h8_relax_section): Use bfd_h8300_pad_address.
1770 Fix handling of R_H8_DIR24A8.
1771
1772 2003-07-11 Richard Sandiford <rsandifo@redhat.com>
1773
1774 * elf32-h8300.c: Convert function prototypes and definitions
1775 to C90 syntax.
1776 * coff-h8300.c: Likewise.
1777 * cpu-h8300.c: Likewise.
1778
1779 2003-07-11 Alan Modra <amodra@bigpond.net.au>
1780
1781 * po/SRC-POTFILES.in: Regenerate.
1782 * po/bfd.pot: Likewise.
1783
1784 2003-07-10 Bob Wilson <bob.wilson@acm.org>
1785
1786 * elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Create new
1787 .got.loc section. Do not set SEC_ALLOC or SEC_LOAD flags for the
1788 .xt.lit.plt section.
1789 (elf_xtensa_size_dynamic_sections): Set size of the .got.loc section
1790 and allocate memory for it.
1791 (elf_xtensa_combine_prop_entries): Copy contents of .xt.lit output
1792 section to the .got.loc section.
1793 (elf_xtensa_finish_dynamic_sections): Fix up call to
1794 elf_xtensa_combine_prop_entries and set DT_XTENSA_GOT_LOC_OFF to
1795 the address of .got.loc.
1796 (relax_property_section): Shrink .got.loc to match changes in any
1797 literal table section.
1798 (xtensa_is_property_section): Change to match
1799 xtensa_get_property_section_name.
1800 (xtensa_is_littable_section): New.
1801
1802 2003-07-10 H.J. Lu <hongjiu.lu@intel.com>
1803
1804 * elfxx-ia64.c (IA64_HOWTO): Set dst_mask to -1 instead of
1805 -1LL.
1806
1807 2003-07-10 Alan Modra <amodra@bigpond.net.au>
1808
1809 * Makefile.am (BFD32_BACKENDS): Add elf32-am33lin.lo.
1810 (BFD32_BACKENDS_CFILES): elf32-am33lin.c not elf32-am33lin.lo.
1811 Run "make dep-am".
1812 * Makefile.in: Regenerate.
1813
1814 2003-07-10 Alexandre Oliva <aoliva@redhat.com>
1815
1816 2001-09-12 Alexandre Oliva <aoliva@redhat.com>
1817 * elf32-am33lin.c (ELF_MACHINE_CODE): Redefine to EM_MN10300.
1818 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10300.
1819 2001-06-02 Nick Clifton <nickc@cambridge.redhat.com>
1820 * elf32-am33lin.c: Rename global functions.
1821 2001-05-09 Alexandre Oliva <aoliva@redhat.com>
1822 * config.bfd (am33_2.0, am33_2.0-*-linux*): Added.
1823 * configure.in (bfd_elf32_am33lin_vec): Added.
1824 * Makefile.am (BFD32_BACKENDS): Added elf32-am33lin.lo.
1825 (elf32-am33lin.lo): List dependencies.
1826 * aclocal.m4, configure, Makefile.in: Rebuilt.
1827 * elf-m10300.c (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME,
1828 ELF_ARCH, ELF_MACHINE_CODE, ELF_MAXPAGESIZE): Define only if
1829 ELF_ARCH was not defined before.
1830 (elf_symbol_leading_char): Define if not defined.
1831 * elf32-am33lin.c: Override the definitions above.
1832 * targets.c (bfd_elf32_am33lin_vec): New.
1833
1834 2003-07-09 Alexandre Oliva <aoliva@redhat.com>
1835
1836 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
1837 * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Initialize
1838 pcrel_relocs_copied.
1839 2001-12-13 Alexandre Oliva <aoliva@redhat.com>
1840 * elf-m10300.c (ELF_DYNAMIC_INTERPRETER): Renamed from
1841 ld-linux.so.2 to ld.so.1.
1842 2001-10-10 Alexandre Oliva <aoliva@redhat.com>
1843 * elf-m10300.c (elf_mn10300_sizeof_plt0): New macro.
1844 (_bfd_mn10300_elf_adjust_dynamic_symbol): Use it.
1845 (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
1846 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Allocate
1847 .rela.* section contents with bfd_zalloc.
1848 2001-09-25 Alexandre Oliva <aoliva@redhat.com>
1849 * elf-m10300.c: Added declarations for functions missing them.
1850 Merge some shared-library changes from the i386 back-end. Use
1851 R_MN10300_RELATIVE instead of R_MN10300_PCREL32 and
1852 R_MN10300_GLOB_DAT instead of R_MN10300_32 where appropriate.
1853 (struct elf32_mn10300_link_hash_entry): Remove duplicates of
1854 members of elf_link_hash_entry. Adjusted references.
1855 (mn10300_elf_final_link_relocate): dynobj was already loaded
1856 into a local variable, use it.
1857 2001-09-21 Nick Clifton <nickc@cambridge.redhat.com>
1858 * elf-m10300.c: Add missing function prototypes.
1859 2001-08-24 Alexandre Oliva <aoliva@redhat.com>
1860 * elf-m10300.c (mn10300_elf_relocate_section): Don't compute
1861 relocation for dynamic relocations.
1862 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
1863 * reloc.c (BFD_RELOC_MN10300_GOTOFF24): New.
1864 * elf-m10300.c: Introduce GOTPC16, GOTOFF24, GOTOFF16 and
1865 PLT16, and rename GOTPC to GOTPC32 and GOTOFF to GOTOFF32.
1866 (_bfd_mn10300_elf_create_dynamic_sections): Move creation ot PLT...
1867 (_bfd_mn10300_elf_create_got_section): ... here, so that its
1868 adress is already known at the time we compute relaxations.
1869 (mn10300_elf_relax_section): Relax GOTPC32, GOTOFF32, GOT32
1870 and PLT32 to narrower relocations.
1871 * libbfd.h, bfd-in2.h: Rebuilt.
1872 2001-04-12 Alexandre Oliva <aoliva@redhat.com>
1873 * reloc.c (BFD_RELOC_MN10300_GOT32, BFD_RELOC_MN10300_GOT24,
1874 BFD_RELOC_MN10300_GOT16, BFD_RELOC_MN10300_COPY,
1875 BFD_RELOC_MN10300_GLOB_DAT, BFD_RELOC_MN10300_JMP_SLOT,
1876 BFD_RELOC_MN10300_RELATIVE): New relocs.
1877 * libbfd.h, bfd-in2.h: Rebuilt.
1878 * elf-m10300.c (struct elf_mn10300_pcrel_relocs_copied): New.
1879 (struct elf32_mn10300_link_hash_entry): Added DSO-related
1880 fields.
1881 (elf_mn10300_howto): Defined new relocation types.
1882 (mn10300_reloc_map): Map them.
1883 (_bfd_mn10300_elf_create_got_section): New fn.
1884 (mn10300_elf_check_relocs): Handle PIC relocs.
1885 (mn10300_elf_final_link_relocate): Likewise.
1886 (mn10300_elf_relocate_section): Handle DSOs.
1887 (PLT0_ENTRY_SIZE, PLT_ENTRY_SIZE, PIC_PLT_ENTRY_SIZE): New macros.
1888 (elf_mn10300_plt0_entry, elf_mn10300_plt_entry,
1889 elf_mn10300_pic_plt_entry): New.
1890 (elf_mn10300_sizeof_plt, elf_mn10300_plt_plt0_offset,
1891 elf_mn10300_plt0_linker_offset, elf_mn10300_plt0_gotid_offset,
1892 elf_mn10300_plt_temp_offset, elf_mn10300_plt_symbol_offset,
1893 elf_mn10300_plt_reloc_offset: New macros.
1894 (ELF_DYNAMIC_INTERPRETER): Likewise.
1895 (_bfd_mn10300_elf_create_dynamic_sections): New function.
1896 (_bfd_mn10300_elf_adjust_dynamic_symbol): Likewise.
1897 (_bfd_mn10300_elf_discard_copies): Likewise.
1898 (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
1899 (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
1900 (_bfd_mn10300_elf_finish_dynamic_sections): Likewise.
1901 (elf_backend_can_gc_sections,
1902 elf_backend_create_dynamic_sections,
1903 elf_backend_adjust_dynamic_sections,
1904 elf_backend_size_dynamic_sections,
1905 elf_backend_finish_dynamic_symbol,
1906 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
1907 elf_backend_plt_readonly, elf_backend_want_plt_sym,
1908 elf_backend_got_header_size, elf_backend_plt_header_size): New
1909 macros.
1910
1911 2003-07-09 Alexandre Oliva <aoliva@redhat.com>
1912
1913 2001-05-06 Alexandre Oliva <aoliva@redhat.com>
1914 * elf-m10300.c (compute_function_info): Account for AM33
1915 registers in `movm' when computing stack space for `call' when
1916 linking for AM33/2.0 link.
1917 2000-04-01 Alexandre Oliva <aoliva@cygnus.com>
1918 * archures.c (bfd_mach_am33_2): Renamed from bfd_mach_am332.
1919 * bfd-in2.h: Rebuilt.
1920 * cpu-m10300.c (bfd_am33_2_arch): Renamed from bfd_am332_arch.
1921 * elf-m10300.c: Updated.
1922 2000-03-31 Alexandre Oliva <aoliva@cygnus.com>
1923 * archures.c (bfd_mach_am332): Defined.
1924 * bfd-in2.h: Rebuilt.
1925 * cpu-m10300.c (bfd_am332_arch): Defined.
1926 (bfd_am33_arch): Chained with am33-2.
1927 * elf-m10300.c (elf_mn10300_mach): Handle am332.
1928 (_bfd_mn10300_elf_final_write_processing): Likewise.
1929
1930 2003-07-09 H.J. Lu <hongjiu.lu@intel.com>
1931
1932 * elfxx-ia64.c (IA64_HOWTO): Set dst_mask to -1LL.
1933
1934 2003-07-10 Alan Modra <amodra@bigpond.net.au>
1935
1936 * elf64-ppc.c (bfd_elf64_mkobject): Define.
1937 (struct ppc64_elf_obj_tdata): New.
1938 (ppc64_elf_tdata, ppc64_tlsld_got): Define.
1939 (ppc64_elf_mkobject): New function.
1940 (struct got_entry): Add "owner". Move "tls_type".
1941 (struct ppc_link_hash_table): Delete "relgot", "tlsld_got".
1942 (ppc64_elf_init_stub_bfd): New function.
1943 (create_got_section): Create header .got in dynobj. Create .got
1944 and .rela.got in each bfd. Stash pointers in ppc64_elf_obj_tdata.
1945 (ppc64_elf_create_dynamic_sections): Don't call create_got_section.
1946 Look for dynobj .got, and test it.
1947 (ppc64_elf_copy_indirect_symbol): Adjust for changed got.
1948 (update_local_sym_info): Likewise.
1949 (ppc64_elf_check_relocs): Likewise.
1950 (ppc64_elf_gc_sweep_hook): Likewise.
1951 (ppc64_elf_tls_optimize): Likewise.
1952 (allocate_dynrelocs): Likewise.
1953 (ppc64_elf_size_dynamic_sections): Likewise.
1954 (ppc64_elf_relocate_section): Likewise.
1955 (ppc64_elf_next_toc_section): Update comment.
1956 (toc_adjusting_stub_needed): Remove unneeded cast.
1957 (ppc64_elf_build_stubs): Check for stub sections in stub bfd by
1958 testing section flags.
1959 (ppc64_elf_build_stubs): Likewise.
1960 (ppc64_elf_size_stubs): Likewise. Remove stub_bfd param.
1961 (ppc64_elf_finish_dynamic_sections): Write out got sections.
1962 (func_desc_adjust): Copy over dynamic info for undef weaks.
1963 * elf64-ppc.h (ppc64_elf_init_stub_bfd): Declare.
1964 (ppc64_elf_size_stubs): Update prototype.
1965 * elflink.h (elf_link_sort_relocs): Use link_orders to find reldyn
1966 input sections rather than scanning dynobj.
1967
1968 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
1969
1970 * elfxx-mips.c (mips_elf_link_hash_entry): Remove min_dyn_reloc_index.
1971 (bfd_mips_elf_swap_msym_in, bfd_mips_elf_swap_msym_out): Delete.
1972 (mips_elf_create_msym_section): Delete.
1973 (mips_elf_create_dynamic_relocation): Don't set min_dyn_reloc_index.
1974 (_bfd_mips_elf_copy_indirect_symbol): Likewise.
1975 (_bfd_mips_elf_create_dynamic_sections): Don't create .msym.
1976 (_bfd_mips_elf_size_dynamic_sections): Don't calculate its size.
1977 (_bfd_mips_elf_size_dynamic_sections): Don't add DT_MIPS_MSYM.
1978 (_bfd_mips_elf_finish_dynamic_symbol): Don't add symbols to .msym.
1979 (_bfd_mips_elf_finish_dynamic_sections): Likewise.
1980
1981 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
1982
1983 * elfxx-mips.c (mips_elf_irix6_finish_dynamic_symbol): Make the
1984 symbols protected.
1985
1986 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
1987
1988 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Fix handling
1989 of relocations whose offset is -2.
1990
1991 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
1992
1993 * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): Treat
1994 forced-local symbols like other locals. Don't create relocations
1995 against STN_UNDEF in irix objects.
1996
1997 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
1998
1999 * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): In SGI-
2000 compatible objects, add the values of defined external symbols
2001 to the addend.
2002
2003 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
2004
2005 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Always
2006 initialize a GOT entry to the symbol's st_value.
2007
2008 2003-07-08 Alan Modra <amodra@bigpond.net.au>
2009
2010 * elf-bfd.h (struct elf_obj_tdata): Move linker_section_pointers..
2011 * elf32-ppc.c (struct ppc_elf_obj_tdata): ..to here. New.
2012 (ppc_elf_tdata): Define.
2013 (elf_local_ptr_offsets): Adjust.
2014 (ppc_elf_mkobject): New function.
2015 (bfd_elf32_mkobject): Define.
2016
2017 * elfcode.h (elf_object_p): Allocate tdata via _bfd_set_format.
2018 * elfcore.h (elf_core_file_p): Likewise.
2019 * section.c (bfd_section_init): Remove prototype.
2020
2021 2003-07-08 Alan Modra <amodra@bigpond.net.au>
2022
2023 * elf-bfd.h (struct elf_link_hash_entry): Remove linker_section_pointer
2024 field.
2025 (enum elf_linker_section_enum): Delete.
2026 (struct elf_linker_section): Delete.
2027 (struct elf_linker_section_pointers): Delete.
2028 (struct elf_obj_tdata): Remove #if 0 chunk. Remove linker_section.
2029 Make linker_section_pointers a void**.
2030 (elf_local_ptr_offsets, elf_linker_section): Don't define.
2031 * elf32-ppc.c (enum elf_linker_section_enum): New, cut-down version
2032 of old item in elf-bfd.h.
2033 (struct elf_linker_section): Likewise.
2034 (struct elf_linker_section_pointers): Likewise.
2035 (elf_local_ptr_offsets): Define.
2036 (struct ppc_elf_link_hash_entry): Add linker_section_pointer.
2037 (ppc_elf_link_hash_newfunc): Init it.
2038 (struct ppc_elf_link_hash_table): Add sbss.
2039 (ppc_elf_link_hash_table_create): zmalloc rather than clearing
2040 individual fields.
2041 (elf_create_linker_section): Fold into..
2042 (ppc_elf_create_linker_section): ..here. Remove hole_size code.
2043 Make rela section here if shared.
2044 (elf_find_pointer_linker_section): Pass lsect rather than enum.
2045 (elf_create_pointer_linker_section): Adjust. zalloc rather than
2046 clearing in a loop.
2047 (elf_finish_pointer_linker_section): Adjust. Don't make rela
2048 section here.
2049 (ppc_elf_check_relocs): Adjust.
2050 (ppc_elf_add_symbol_hook): Tighten hash creator test. Remove code
2051 creating .sbss by hand.
2052 * elf.c (_bfd_elf_link_hash_newfunc): Adjust.
2053
2054 2003-07-04 Jakub Jelinek <jakub@redhat.com>
2055
2056 * elf32-s390.c (elf_howto_table): Change R_390_GOT12 to
2057 complain_overflow_bitfield.
2058 * elf64-s390.c (elf_howto_table): Change R_390_GOT12 to
2059 complain_overflow_bitfield.
2060
2061 2003-07-04 Jakub Jelinek <jakub@redhat.com>
2062
2063 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Return
2064 true even if -pie.
2065
2066 2003-07-04 Jakub Jelinek <jakub@redhat.com>
2067
2068 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add rel_fptr_sec.
2069 (elfNN_ia64_dynamic_symbol_p): Change info->shared into
2070 !info->executable.
2071 (get_fptr): For -pie create .opd as writable section and create
2072 .rela.opd as well.
2073 (elfNN_ia64_check_relocs): Change info->shared into
2074 !info->executable.
2075 (allocate_fptr): Likewise.
2076 (allocate_dynrel_entries): Account for a relative reloc for -pie
2077 @fptr(). Don't account for a relative reloc if -pie want_ltoff_fptr
2078 for undefweak symbol. Account for an IPLT reloc in .rela.opd
2079 section if -pie.
2080 (set_got_entry): Don't create a relative reloc if -pie
2081 want_ltoff_fptr for undefweak symbol.
2082 (set_fptr_entry): Emit an IPLT reloc in .rela.opd for -pie.
2083 (elfNN_ia64_relocate_section): Emit a relative reloc for -pie
2084 @fptr().
2085
2086 * elfxx-ia64.c (elfNN_ia64_relocate_section): Issue undefined_symbol
2087 even if -pie.
2088 * elf32-i386.c (elf_i386_relocate_section): Likewise.
2089 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
2090 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
2091 * elf64-s390.c (elf_s390_relocate_section): Likewise.
2092 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
2093 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
2094 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
2095 * elf32-s390.c (elf_s390_relocate_section): Likewise.
2096 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2097
2098 2003-07-04 Paul Clarke <paulc@senet.com.au>
2099
2100 * elf32-h8300.c (R_H8_DIR32A16): Fix name field.
2101 (elf32_h8_relax_section) <R_H8_DIR16A8>: Adjust position of relocation.
2102 <R_H8_DIR32A16>: Fix type of relocation.
2103
2104 2003-07-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2105
2106 * elf32-sh.c (sh_elf_create_dynamic_sections): Return if dynamic
2107 sections were created already. Remove unnecessary tests of
2108 the previous change.
2109
2110 2003-07-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2111
2112 * elf32-sh.c (sh_elf_create_dynamic_sections): Don't call
2113 bfd_make_section for existing sections.
2114
2115 2003-07-04 Alan Modra <amodra@bigpond.net.au>
2116
2117 * elf32-sparc.c (elf32_sparc_check_relocs): Don't call
2118 create_got_section if we already have done so.
2119 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
2120 (sh_elf_check_relocs): Likewise.
2121 (sh_elf_adjust_dynamic_symbol): Delete "dynobj" var. Use
2122 htab->root.dynobj instead.
2123 (sh_elf_check_relocs): Likewise.
2124 (sh_elf_finish_dynamic_sections): Likewise.
2125
2126 * section.c (bfd_make_section): Return NULL for existing section.
2127
2128 2003-07-04 Alan Modra <amodra@bigpond.net.au>
2129
2130 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Don't call
2131 ppc_elf_create_got if we've already done so.
2132
2133 * elf-bfd.h (_bfd_elf_create_linker_section) Don't declare.
2134 (_bfd_elf_find_pointer_linker_section): Likewise.
2135 (bfd_elf32_create_pointer_linker_section): Likewise.
2136 (bfd_elf32_finish_pointer_linker_section): Likewise.
2137 (bfd_elf64_create_pointer_linker_section): Likewise.
2138 (bfd_elf64_finish_pointer_linker_section): Likewise.
2139 (_bfd_elf_make_linker_section_rela): Likewise.
2140 * elfcode.h (elf_create_pointer_linker_section): Don't define.
2141 (elf_finish_pointer_linker_section): Likewise.
2142 * elflink.c (_bfd_elf_make_linker_section_rela): Delete.
2143 (_bfd_elf_create_linker_section): Move this function..
2144 (_bfd_elf_find_pointer_linker_section): ..and this..
2145 * elflink.h (elf_create_pointer_linker_section): ..and this..
2146 (elf_finish_pointer_linker_section): ..and this..
2147 * elf32-ppc.c: ..to here, renaming to the following, and adjusting
2148 calls.
2149 (elf_create_linker_section): Convert to C90, tidy.
2150 (elf_find_pointer_linker_section): Likewise.
2151 (elf_create_pointer_linker_section): Likewise.
2152 (elf_finish_pointer_linker_section): Likewise.
2153 * elf32-i370.c: Delete #if 0 code.
2154
2155 2003-07-02 Alan Modra <amodra@bigpond.net.au>
2156
2157 * elf64-ppc.c (ppc64_elf_func_desc_adjust): Don't allow _savef* and
2158 _restf* to be satisfied by shared libs, and always force them local.
2159 (toc_adjusting_stub_needed): Avoid scanning linker created sections.
2160 Correct test for "bl".
2161 (ppc64_elf_relocate_section <R_PPC64_TLS>): Correct test for
2162 primary opcode 31.
2163
2164 2003-07-01 Martin Schwidefsky <schwidefsky@de.ibm.com>
2165
2166 * elf32-s390.c (s390_elf_ldisp_reloc): New prototype.
2167 (s390_tls_reloc): New function.
2168 (elf_howto_table): Add long displacement relocations R_390_20,
2169 R_390_GOT20, R_390_GOTPLT20 and R_390_TLS_GOTIE20.
2170 (elf_s390_reloc_type_lookup): Likewise.
2171 (elf_s390_check_relocs): Likewise.
2172 (elf_s390_gc_sweep_hook): Likewise.
2173 (elf_s390_relocate_section): Likewise.
2174 * elf64-s390.c: Same changes as for elf32-s390.c.
2175 * reloc.c: Add long displacement relocations BFD_RELOC_390_20,
2176 BFD_RELOC_390_GOT20, BFD_RELOC_390_GOTPLT20 and
2177 BFD_RELOC_390_TLS_GOTIE20.
2178 * bfd-in2.h: Regenerate.
2179 * libbfd.h: Likewise.
2180
2181 2003-06-30 Alan Modra <amodra@bigpond.net.au>
2182
2183 * cpu-ia64-opc.c (ext_imms_scaled): Don't sign extend using shifts.
2184 (ins_imms, ins_immsm1u4): Likewise. Warning fix.
2185
2186 2003-06-29 Alan Modra <amodra@bigpond.net.au>
2187
2188 * archive.c: Convert to C90, remove unnecessary prototypes and casts.
2189 Replace PTR with void *. Formatting.
2190 * archive64.c: Likewise.
2191 * archures.c: Likewise.
2192 * bfd-in.h: Likewise.
2193 * bfd.c: Likewise.
2194 * bfdio.c: Likewise.
2195 * bfdwin.c: Likewise.
2196 * cache.c: Likewise.
2197 * corefile.c: Likewise.
2198 * format.c: Likewise.
2199 * init.c: Likewise.
2200 * libbfd-in.h: Likewise.
2201 * libbfd.c: Likewise.
2202 * linker.c: Likewise.
2203 * opncls.c: Likewise.
2204 * reloc.c: Likewise.
2205 * section.c: Likewise.
2206 * simple.c: Likewise.
2207 * syms.c: Likewise.
2208 * targets.c: Likewise.
2209 * bfd-in2.h: Regenerate.
2210 * libbfd.h: Regenerate.
2211
2212 * ecoff.c (bfd_debug_section): Add missing kept_section initialization.
2213 * libbfd-in.h (_bfd_sh_align_load_span): Don't declare if defined.
2214 * libbfd.c (COERCE32, EIGHT_GAZILLION): Simplify.
2215 (bfd_getb64): Rewrite without parens.
2216 (bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
2217 * cache.c (insert, snip): Remove INLINE.
2218 * linker.c (bfd_link_add_undef): Likewise.
2219
2220 2003-06-29 Andreas Jaeger <aj@suse.de>
2221
2222 * elf64-x86-64.c: Convert to ISO C90 prototypes, remove
2223 unnecessary prototypes. Replace PTR with void *.
2224 (elf64_x86_64_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL to
2225 trim plt entries. Move undefweak non-default visibility test ...
2226 (allocate_dynrelocs): ... from here.
2227 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
2228 Change all callers.
2229 (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL. Use
2230 SYMBOL_REFERENCES_LOCAL for dynreloc check.
2231 (elf64_x86_64_relocate_section): Use SYMBOL_CALLS_LOCAL for
2232 dynreloc and .got relocs.
2233 (elf64_x86_64_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL
2234 for .got relocs.
2235
2236 2003-06-29 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2237
2238 * elfxx-mips.c: Allow lazy binding for R_MIPS_JALR.
2239
2240 2003-06-27 Nick Clifton <nickc@redhat.com>
2241
2242 * opncls.c (bfd_add_gnu_debuglink_section): Rename to
2243 bfd_add_gnu_debuglink_section and only create the section, do not
2244 fill in its contents.
2245 (bfd_fill_in_gnu_debuglink_section): New function. Fill in the
2246 contents of a .gnu-debuglink section.
2247 * bfd-in2.h: Regenerate.
2248
2249 2003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2250
2251 * elfxx-mips.c: Revert .got alignment to 2**4.
2252
2253 2003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2254
2255 * elf32-mips.c: Fix addend for _gp_disp special symbol.
2256
2257 2003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2258
2259 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Remove non-default
2260 relocation header setup.
2261
2262 2003-06-25 Alan Modra <amodra@bigpond.net.au>
2263
2264 * elf32-ppc.c (ppc_elf_howto_table): Remove unnecessary cast.
2265 (ppc_elf_reloc_type_lookup): Modify comment.
2266 (ppc_elf_info_to_howto): Ditto.
2267 (ppc_elf_relocate_section): Ditto.
2268 (ppc_elf_check_relocs): Call ppc_elf_howto_init.
2269
2270 2003-06-25 Alan Modra <amodra@bigpond.net.au>
2271
2272 * aout-ns32k.c: Correct spelling of "relocatable".
2273 * aoutx.h: Likewise.
2274 * bfd-in.h: Likewise.
2275 * bfd.c: Likewise.
2276 * bout.c: Likewise.
2277 * coff-a29k.c: Likewise.
2278 * coff-alpha.c: Likewise.
2279 * coff-arm.c: Likewise.
2280 * coff-i386.c: Likewise.
2281 * coff-i860.c: Likewise.
2282 * coff-i960.c: Likewise.
2283 * coff-m68k.c: Likewise.
2284 * coff-m88k.c: Likewise.
2285 * coff-mcore.c: Likewise.
2286 * coff-mips.c: Likewise.
2287 * coff-or32.c: Likewise.
2288 * coff-ppc.c: Likewise.
2289 * coff-rs6000.c: Likewise.
2290 * coff-sh.c: Likewise.
2291 * coff-tic80.c: Likewise.
2292 * coff64-rs6000.c: Likewise.
2293 * cofflink.c: Likewise.
2294 * cpu-ns32k.c: Likewise.
2295 * ecoff.c: Likewise.
2296 * ecofflink.c: Likewise.
2297 * elf-bfd.h: Likewise.
2298 * elf-eh-frame.c: Likewise.
2299 * elf-hppa.h: Likewise.
2300 * elf-m10200.c: Likewise.
2301 * elf-m10300.c: Likewise.
2302 * elf.c: Likewise.
2303 * elf32-arm.h: Likewise.
2304 * elf32-avr.c: Likewise.
2305 * elf32-cris.c: Likewise.
2306 * elf32-d10v.c: Likewise.
2307 * elf32-dlx.c: Likewise.
2308 * elf32-fr30.c: Likewise.
2309 * elf32-frv.c: Likewise.
2310 * elf32-h8300.c: Likewise.
2311 * elf32-hppa.c: Likewise.
2312 * elf32-i370.c: Likewise.
2313 * elf32-i386.c: Likewise.
2314 * elf32-i860.c: Likewise.
2315 * elf32-i960.c: Likewise.
2316 * elf32-ip2k.c: Likewise.
2317 * elf32-iq2000.c: Likewise.
2318 * elf32-m32r.c: Likewise.
2319 * elf32-m68hc11.c: Likewise.
2320 * elf32-m68hc1x.c: Likewise.
2321 * elf32-m68k.c: Likewise.
2322 * elf32-mcore.c: Likewise.
2323 * elf32-mips.c: Likewise.
2324 * elf32-msp430.c: Likewise.
2325 * elf32-openrisc.c: Likewise.
2326 * elf32-ppc.c: Likewise.
2327 * elf32-s390.c: Likewise.
2328 * elf32-sh.c: Likewise.
2329 * elf32-sh64.c: Likewise.
2330 * elf32-sparc.c: Likewise.
2331 * elf32-v850.c: Likewise.
2332 * elf32-vax.c: Likewise.
2333 * elf32-xstormy16.c: Likewise.
2334 * elf32-xtensa.c: Likewise.
2335 * elf64-alpha.c: Likewise.
2336 * elf64-hppa.c: Likewise.
2337 * elf64-mips.c: Likewise.
2338 * elf64-mmix.c: Likewise.
2339 * elf64-ppc.c: Likewise.
2340 * elf64-s390.c: Likewise.
2341 * elf64-sh64.c: Likewise.
2342 * elf64-sparc.c: Likewise.
2343 * elf64-x86-64.c: Likewise.
2344 * elfcode.h: Likewise.
2345 * elflink.h: Likewise.
2346 * elfn32-mips.c: Likewise.
2347 * elfxx-ia64.c: Likewise.
2348 * elfxx-mips.c: Likewise.
2349 * i386linux.c: Likewise.
2350 * ieee.c: Likewise.
2351 * libcoff-in.h: Likewise.
2352 * linker.c: Likewise.
2353 * m68klinux.c: Likewise.
2354 * pdp11.c: Likewise.
2355 * pe-mips.c: Likewise.
2356 * peXXigen.c: Likewise.
2357 * reloc.c: Likewise.
2358 * reloc16.c: Likewise.
2359 * sparclinux.c: Likewise.
2360 * sunos.c: Likewise.
2361 * syms.c: Likewise.
2362 * versados.c: Likewise.
2363 * vms.c: Likewise.
2364 * xcofflink.c: Likewise.
2365 * bfd-in2.h: Regenerate.
2366 * libcoff.h: Regenerate.
2367 * libbfd.h: Regenerate.
2368
2369 2003-06-24 Alan Modra <amodra@bigpond.net.au>
2370
2371 * elf32-ppc.c (ppc_elf_check_relocs): Report plt reloc against
2372 local sym errors.
2373
2374 * elf32-i386.c: Convert to C90 function definitions, remove unnecessary
2375 prototypes and casts. Replace PTR with void *. Formatting.
2376 * elf32-ppc.c: Likewise. Break long strings too.
2377 (ppc_elf_relax_section): Use enum elf_ppc_reloc_type for r_type.
2378 (ppc_elf_unhandled_reloc): Internationalize error message.
2379 * elf32-ppc.h: Remove PARAMS.
2380
2381 2003-06-23 Mark Mitchell <mark@codesourcery.com>
2382
2383 * elf32-ppc.c (ppc_elf_begin_write_processing): Use bytes to count
2384 APUinfo slots.
2385 (ppc_elf_final_write_processing): Likewise.
2386
2387 2003-06-23 H.J. Lu <hongjiu.lu@intel.com>
2388
2389 * elflink.h (elf_link_input_bfd): Check raw size when using
2390 kept_section to preserve debug information discarded by
2391 linkonce.
2392
2393 2003-06-20 Alan Modra <amodra@bigpond.net.au>
2394
2395 * elf64-ppc.c (struct ppc_link_hash_table): Add top_id.
2396 (ppc64_elf_setup_section_lists): Set it.
2397 (ppc64_elf_relocate_section): Check sym section id against top_id.
2398 (ppc_build_one_stub): Comment on top_id.
2399
2400 2003-06-20 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
2401
2402 * config.bfd: Add tic4x-*-rtems*.
2403
2404 2003-06-20 Alan Modra <amodra@bigpond.net.au>
2405
2406 * elf64-ppc.c: Convert to C90 function definitions, remove unnecessary
2407 prototypes and casts. Replace PTR with void *. Format copyright.
2408 Mention ABI links.
2409 (struct ppc_link_hash_table): Rename sgot, srelgot, splt, srelplt,
2410 sdynbss, srelbss, sglink, sbrlt and srelbrlt to got, relgot .. relbrlt.
2411 (ppc_type_of_stub): Make r_type an enum.
2412 (ppc64_elf_size_stubs): Likewise.
2413 * elf64-ppc.h: Remove PARAMS macro.
2414
2415 2003-06-19 Alan Modra <amodra@bigpond.net.au>
2416
2417 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Reinstate init of
2418 elf hash tab fields.
2419
2420 * elf64-ppc.c (ppc64_elf_reloc_type_lookup): Tidy prototype.
2421 (ppc64_elf_info_to_howto): Likewise.
2422 (ppc64_elf_build_stubs): Add "stats" param, and print statistics.
2423 * elf64-ppc.h (ppc64_elf_build_stubs): Adjust prototype.
2424
2425 2003-06-19 Alan Modra <amodra@bigpond.net.au>
2426
2427 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore R_SPARC_DISP32
2428 reloc overflow on discarded eh_frame entries.
2429
2430 2003-06-19 Alan Modra <amodra@bigpond.net.au>
2431
2432 * elf64-ppc.c (toc_adjusting_stub_needed): New function.
2433 (ppc64_elf_next_input_section): Use it here to set has_gp_reloc.
2434 Return error condition.
2435 (ppc64_elf_size_stubs): Restrict toc adjusting stubs to sections
2436 that have has_gp_reloc set.
2437 (struct ppc_link_hash_table): Add stub_count.
2438 (ppc_build_one_stub): Increment it.
2439 (ppc64_elf_link_hash_table_create): zmalloc rather than clearing
2440 individual fields.
2441 * elf64-ppc.h (ppc64_elf_next_input_section): Update prototype.
2442
2443 2003-06-18 Alan Modra <amodra@bigpond.net.au>
2444
2445 * elflink.h (elf_gc_record_vtentry): Revert last change. Correct
2446 size calculation from addend. Round size up.
2447
2448 2003-06-18 Hans-Peter Nilsson <hp@axis.com>
2449
2450 * elf32-cris.c (cris_elf_relocate_section) <case
2451 R_CRIS_32_GOTREL>: When linking a program, don't complain about a
2452 symbol from a normal object or an undefined weak symbol.
2453
2454 2003-06-18 Alan Modra <amodra@bigpond.net.au>
2455
2456 * elf64-ppc.c (ppc64_elf_relocate_section): Accept a symbol on
2457 R_PPC64_TOC relocs.
2458
2459 2003-06-17 H.J. Lu <hongjiu.lu@intel.com>
2460
2461 * section.c (struct sec): Put back kept_section.
2462 (STD_SECTION): Put back kept_section initialization.
2463 * bfd-in2.h: Regenerate.
2464
2465 * elflink.h (elf_link_input_bfd): Also check discarded linkonce
2466 sections for relocateable output. Use kept_section to preserve
2467 debug information discarded by linkonce.
2468
2469 2003-06-17 Roland McGrath <roland@redhat.com>
2470
2471 * elfxx-ia64.c (elfNN_ia64_relocate_section): Support
2472 segment-relative relocation between different segments.
2473
2474 2003-06-17 Alan Modra <amodra@bigpond.net.au>
2475
2476 * elf64-ppc.c (ppc64_elf_relocate_section): Do unaligned reloc
2477 optimizations earlier.
2478
2479 * elf64-ppc.c (struct ppc_link_hash_table): Reinstate top_index.
2480 Restore previous input_list type.
2481 (ppc64_elf_link_hash_table_create): Undo last change.
2482 (ppc64_elf_setup_section_lists): Reinstate code setting up input lists
2483 per output section, but don't bother with bfd_abs_section marker.
2484 (ppc64_elf_next_input_section): Adjust for multiple input section
2485 lists.
2486 (group_sections): Likewise.
2487
2488 2003-06-17 Jakub Jelinek <jakub@redhat.com>
2489
2490 * elf64-ppc.c (ppc64_elf_relocation_section): Ensure
2491 *r_offset == r_addend for RELATIVE relocs against .got.
2492
2493 2003-06-17 Alan Modra <amodra@bigpond.net.au>
2494
2495 * elf64-ppc.c (ppc64_elf_relocate_section): Optimize unaligned relocs.
2496
2497 2003-06-17 Nick Clifton <nickc@redhat.com>
2498
2499 * elflink.h (elf_gc_record_vtentry): Allocate an extra element
2500 in the vtable_entries_used array to allow for the accessing
2501 the largest element.
2502
2503 2003-06-17 Alan Modra <amodra@bigpond.net.au>
2504
2505 * elf64-ppc.c (struct ppc_link_hash_table): Remove top_index. Modify
2506 input_list.
2507 (ppc64_elf_link_hash_table_create): Init input_list here.
2508 (ppc64_elf_setup_section_lists): Remove code setting up input lists
2509 per output section. Set toc_off for abs and other standard sections.
2510 (ppc64_elf_reinit_toc): Don't set elf_gp on input bfds lacking a toc.
2511 (ppc64_elf_next_input_section): Adjust for single input section list.
2512 Don't set toc_curr from input bfds that haven't set elf_gp.
2513 (group_sections): Adjust for single input section list.
2514
2515 * elf64-ppc.c (ppc64_elf_relocate_section): Correct pcrel section zero.
2516
2517 2003-06-16 Alan Modra <amodra@bigpond.net.au>
2518
2519 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing toctprel
2520 tls, check that a TOC16_DS or TOC16_LO_DS reloc isn't pointing to a
2521 dtprel entry. Ensure TLS_LD DTPMOD reloc has a zero addend. Write
2522 got section for RELATIVE relocs. Fix wrong comment. Change condition
2523 under which dynamic relocs update the section contents.
2524
2525 2003-06-13 Robert Millan <zeratul2@wanadoo.es>
2526
2527 * config.bfd: Add i386-netbsd-gnu target.
2528
2529 2003-06-12 Nick Clifton <nickc@redhat.com>
2530
2531 * opncls.c (calc_crc32): Rename to
2532 bfd_calc_gnu_debuglink_crc32 and export.
2533 (GNU_DEBUGLINK): Define and use to replace occurrences of
2534 hard-coded ".gnu_debuglink" in the code.
2535 (get_debug_link_info): Prevent aborts by replacing call to
2536 xmalloc with a call to malloc.
2537 (find_separate_debug_file): Prevent aborts by replacing calls
2538 to xmalloc and xstrdup with calls to malloc and strdup.
2539 (bfd_add_gnu_debuglink): New function. Add a .gnu_debuglink
2540 section to a bfd.
2541 * bfd-in2.h: Regenerate.
2542
2543 2003-06-12 Federico G. Schwindt <fgsch@lodoss.net>
2544
2545 * config.bfd (i[3-7]86-*-openbsd[0-2].* | i[3-7]86-*-openbsd3.[0-3]):
2546 New target (was i[3-7]86-*-openbsd* before).
2547 (i[3-7]86-*-openbsd*): Change to use bfd_elf32_i386_vec.
2548 (vax-*-openbsd*): New target.
2549
2550 2003-06-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2551
2552 * elfxx-mips.c (MIPS_ELF_OPTIONS_SECTION_NAME): Use .MIPS.options
2553 for n32, too.
2554 (MIPS_ELF_STUB_SECTION_NAME): Use .MIPS.stubs for n32, too.
2555 (mips_elf_rel_dyn_section): Use appropriate section alignment.
2556 (mips_elf_create_got_section): Likewise.
2557 (_bfd_mips_elf_create_dynamic_sections): Likewise.
2558
2559 2003-06-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2560
2561 * elf32-mips.c (mips_elf_generic_reloc): New Function.
2562 (elf_mips_howto_table_rel): Use it.
2563 (gprel32_with_gp): Move prototype.
2564 (mips_elf_hi16_reloc): Check for ! BSF_LOCAL instead of zero addend.
2565 Use mips_elf_generic_reloc.
2566 (mips_elf_got16_reloc): Check for ! BSF_LOCAL instead of zero addend.
2567 Code cleanup.
2568 (_bfd_mips_elf32_gprel16_reloc): Check for ! BSF_LOCAL instead of
2569 zero addend.
2570 (mips_elf_gprel32_reloc): Likewise. Use the same GP assignment logic
2571 as in the other *_gprel*_reloc functions.
2572 (gprel32_with_gp): Handle partial_inplace properly.
2573 (mips32_64bit_reloc): Use mips_elf_generic_reloc.
2574 (mips16_gprel_reloc): Check for ! BSF_LOCAL instead of zero addend.
2575 Do addend handling directly instead of calling
2576 _bfd_mips_elf_gprel16_with_gp. Handle partial_inplace properly.
2577 * elf64-mips.c (mips_elf64_hi16_reloc): Check for ! BSF_LOCAL instead
2578 of zero addend. Handle partial_inplace properly.
2579 (mips_elf64_got16_reloc): Check for ! BSF_LOCAL instead of zero
2580 addend.
2581 (mips_elf64_gprel16_reloc): Likewise.
2582 (mips_elf64_literal_reloc): Likewise.
2583 (mips_elf64_gprel32_reloc): Likewise. Use the same GP assignment
2584 logic as in the other *_gprel*_reloc functions. Handle
2585 partial_inplace properly.
2586 (mips_elf64_shift6_reloc): Check for ! BSF_LOCAL instead of zero
2587 addend. Handle partial_inplace properly.
2588 (mips16_gprel_reloc): Likewise. Do addend handling directly instead
2589 of calling _bfd_mips_elf_gprel16_with_gp.
2590 * elfn32-mips.c (mips_elf_got16_reloc): Check for BSF_LOCAL.
2591 (mips_elf_gprel32_reloc): Check for ! BSF_LOCAL instead
2592 of zero addend.
2593 (mips_elf_shift6_reloc): Handle partial_inplace properly.
2594 (mips16_gprel_reloc): Likewise. Do addend handling directly instead
2595 of calling _bfd_mips_elf_gprel16_with_gp.
2596 * elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp): Handle
2597 partial_inplace properly. Fix wrong addend handling. Fix overflow
2598 check.
2599 (_bfd_mips_elf_sign_extend): Renamed from mips_elf_sign_extend and
2600 exported.
2601 (mips_elf_calculate_relocation): Use _bfd_mips_elf_sign_extend.
2602 (_bfd_mips_elf_relocate_section): Likewise.
2603 (mips_elf_create_dynamic_relocation): Update sec_info_type access.
2604 * elfxx-mips.h (_bfd_mips_relax_section): Fix prototype declaration.
2605 (_bfd_mips_elf_sign_extend): New prototype.
2606
2607 2003-06-11 Federico G. Schwindt <fgsch@lodoss.net>
2608
2609 * config.bfd (sparc-*-openbsd[0-2].* | sparc-*-openbsd3.[0-1]):
2610 New target (was sparc-*-openbsd* before).
2611 (sparc-*-openbsd*): Change to use bfd_elf32_sparc_vec.
2612
2613 * configure.in (vax-*-openbsd*): Set COREFILE to netbsd-core.lo.
2614 * configure: Regenerate.
2615
2616 2003-06-11 H.J. Lu <hongjiu.lu@intel.com>
2617
2618 * po/Make-in (DESTDIR): New.
2619 (install-data-yes): Support $(DESTDIR).
2620 (uninstall): Likewise.
2621
2622 2003-06-11 Alan Modra <amodra@bigpond.net.au>
2623
2624 * Makefile.am (config.status): Depend on version.h.
2625 Run "make dep-am".
2626 * Makefile.in: Regenerate.
2627 * po/SRC-POTFILES.in: Regenerate.
2628
2629 2003-06-10 Alan Modra <amodra@bigpond.net.au>
2630 Gary Hade <garyhade@us.ibm.com>
2631
2632 * elf64-ppc.c (ppc64_elf_relocate_section <*_DS>): Special case lq.
2633
2634 2003-06-10 Richard Sandiford <rsandifo@redhat.com>
2635
2636 * archures.c (bfd_mach_h8300sxn): New architecture.
2637 * bfd-in2.h: Regenerate.
2638 * cpu-h8300.c (h8300_scan): Check for 'sxn'.
2639 (h8300sxn_info_struct): New.
2640 (h8300sx_info_struct): Link to it.
2641 * elf32-h8300.c (elf32_h8_mach): Add h8300sxn case.
2642 (elf32_h8_final_write_processing): Likewise.
2643
2644 2003-06-08 Alan Modra <amodra@bigpond.net.au>
2645
2646 * elf64-ppc.c: Move TARGET_LITTLE_SYM and other macros used by
2647 elfxx-target.h so that we can use elf_backend_got_header_size.
2648 (ELF_MACHINE_ALT1, ELF_MACHINE_ALT2): Delete.
2649 (GLINK_CALL_STUB_SIZE): Modify. Define new glink call stub and
2650 associated macros.
2651 (ppc64_elf_howto_raw <GOT_TPREL16_DS, GOT_TPREL16_LO_DS>): Correct
2652 dst_mask.
2653 (enum ppc_stub_type): Add ppc_stub_long_branch_r2off and
2654 ppc_stub_plt_branch_r2off.
2655 (struct ppc_stub_hash_entry): Reorganize.
2656 (struct ppc_link_hash_table): Add no_multi_toc, multi_toc_needed,
2657 toc_curr, toc_off and emit_stub_syms.
2658 (ppc64_elf_link_hash_table_create): Init them.
2659 (ppc_stub_name): Correct string size.
2660 (ppc64_elf_check_relocs): Set has_gp_reloc on GOT and TOC relocs.
2661 (ppc64_elf_size_dynamic_sections): Set no_multi_toc if GOT entries
2662 used.
2663 (ppc_type_of_stub): Tweak root.type test.
2664 (build_plt_stub): Remove glink code. Adjust for insn macro changes.
2665 (ppc_size_one_stub): Handle ppc_stub_long_branch_r2off and
2666 ppc_stub_plt_branch_r2off.
2667 (ppc_build_one_stub): Likewise. Fix var shadowing. Correct addis,addi
2668 range test. Use toc_off to calculte r2 values. Handle emit_stub_syms.
2669 (ppc64_elf_setup_section_lists): Remove htab creator flavour test.
2670 Initialize elf_gp and toc_curr.
2671 (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): New functions.
2672 (ppc64_elf_next_input_section): Set toc_off.
2673 (group_sections): Ensure groups have the same TOC.
2674 (ppc64_elf_size_stubs): Check whether we need a TOC adjusting stub.
2675 (ppc64_elf_build_stubs): Add emit_stub_syms param, and stash in htab.
2676 Build new glink stub.
2677 (ppc64_elf_relocate_section): Handle multiple TOCs. Fix comments.
2678 (ppc64_elf_finish_dynamic_sections): Adjust DT_PPC64_GLINK.
2679 * elf64-ppc.h (ppc64_elf_build_stubs): Update prototype.
2680 (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): Declare.
2681 * section.c (struct sec): Rename flag12 to has_gp_reloc.
2682 (STD_SECTION): Update.
2683 * ecoff.c (bfd_debug_section): Update comment.
2684 * bfd-in2.h: Regenerate.
2685
2686 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
2687
2688 * elfcode.h (elf_slurp_reloc_table_from_section): Don't dereference
2689 NULL function pointers.
2690
2691 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
2692
2693 * simple.c (bfd_simple_get_relocated_section_contents): Call
2694 _bfd_generic_link_add_symbols instead of bfd_link_add_symbols.
2695
2696 2003-06-04 Svein E. Seldal <Svein.Seldal@solidas.com>
2697
2698 * coff-tic54x.c: Removed the ticoff0_bad_format_hook() and
2699 ticoff1_bad_format_hook() functions. Removed the coff0 and coff1
2700 swaptables.
2701 * coff-tic4x.c: Ditto
2702 * coffcode.h: Added extra arguments to CREATE_BIG_COFF_TARGET_VEC
2703 and CREATE_LITTLE_COFF_TARGET_VEC. Created the macro
2704 CREATE_BIGHDR_COFF_TARGET_VEC. Created the ticoff0_bad_format_hook(),
2705 ticoff1_bad_format_hook() functions. Created the coff0 and coff1
2706 swap tables.
2707 * coff-tic4x.c: Adopted new CREATE_xxx_COFF_TARGET_VEC macros.
2708 * coff-a29k.c: Append COFF_SWAP_TABLE argument
2709 * coff-apollo.c: Ditto
2710 * coff-arm.c: Ditto
2711 * coff-h8300.c: Ditto
2712 * coff-h8500.c: Ditto
2713 * coff-i960.c: Ditto
2714 * coff-m68k.c: Ditto
2715 * coff-m88k.c: Ditto
2716 * coff-mcore.c: Ditto
2717 * coff-sh.c: Ditto
2718 * coff-sparc.c: Ditto
2719 * coff-tic80.c: Ditto
2720 * coff-we32k.c: Ditto
2721 * coff-z8k.c: Ditto
2722 * coff-w65.c: Ditto
2723
2724 2003-06-04 Svein E. Seldal <Svein.Seldal@solidas.com>
2725
2726 * coff-tic4x.c (ticoff0_swap_table, ticoff1_swap_table): Fixed
2727 initialization bug
2728
2729 2003-06-03 Jakub Jelinek <jakub@redhat.com>
2730
2731 * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_STACK.
2732 (bfd_section_from_phdr): Likewise.
2733 (map_sections_to_segments): Create PT_GNU_STACK segment header.
2734 (get_program_header_size): Count with PT_GNU_STACK.
2735 * elf-bfd.h (struct elf_obj_tdata): Add stack_flags.
2736 * elflink.h (bfd_elfNN_size_dynamic_sections): Set stack_flags.
2737
2738 2003-06-03 H.J. Lu <hongjiu.lu@intel.com>
2739
2740 * elflink.h (elf_link_input_bfd): Call linker error_handler
2741 for discarded definitions.
2742
2743 2003-06-03 Elias Athanasopoulos <elathan@phys.uoa.gr>
2744
2745 * syms.c (decode_section_type): Return 'n' if section flags are
2746 SEC_HAS_CONTENTS && SEC_READONLY.
2747
2748 2003-06-03 Nick Clifton <nickc@redhat.com>
2749
2750 * elf32-v850.c (v850_elf_howto_t): Rename R_V850_32to
2751 R_V850_ABS32. Add entry for R_V850_REL32.
2752 (v850_elf_reloc_map): Likewise.
2753 (v850_elf_check_relocs): Likewise.
2754 (v850_elf_perform_relocation): Likewise.
2755 (v850_elf_final_link_relocate): Likewise. Include computation
2756 to make R_V850_REl32 pc-relative.
2757
2758 2003-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2759
2760 * elf32-sh.c (sh_elf_size_dynamic_sections): Create .interp section
2761 and DT_DEBUG dynamic tag even for position independent executables.
2762 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewize.
2763
2764 2003-06-02 Daniel Jacobowitz <drow@mvista.com>
2765
2766 * config.bfd: Move obsolete entries out of the range of the
2767 targmatch sed script.
2768
2769 2003-06-02 Daniel Jacobowitz <drow@mvista.com>
2770
2771 * config.bfd (mips*-dec-bsd*, mips*-*-pe*): Mark as obsolete.
2772
2773 2003-05-31 Jakub Jelinek <jakub@redhat.com>
2774
2775 * elf32-ppc.c (allocate_dynrelocs): Use single slot for first 8192
2776 plt entries, not just 8191.
2777
2778 2003-05-30 Daniel Jacobowitz <drow@mvista.com>
2779
2780 * elfxx-mips.c (_bfd_mips_elf_discard_info): Correct loop index.
2781 Reported by Ken Faiczak <kfaiczak@SANDVINE.com>.
2782
2783 2003-05-30 Ulrich Drepper <drepper@redhat.com>
2784 Jakub Jelinek <jakub@redhat.com>
2785
2786 * elflink.h (elf_link_add_object_symbols): Use !info->executable
2787 instead of info->shared where appropriate.
2788 (bfd_elfNN_size_dynamic_sections, elf_link_output_extsym): Likewise.
2789 * elflink.c (_bfd_elf_create_got_section): Likewise.
2790 (_bfd_elf_link_create_dynamic_sections): Likewise.
2791 (_bfd_elf_link_assign_sym_version): Likewise.
2792 * elf32-i386.c (elf_i386_size_dynamic_sections): Create .interp section
2793 and DT_DEBUG dynamic tag even for position independent executables.
2794 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
2795 * elf32-s390.c (elf_s390_size_dynamic_sections: Likewise.
2796 * elf64-ppc.c (ppc64_elf_size_dynamic_sections: Likewise.
2797 * elf64-s390.c (elf_s390_size_dynamic_sections: Likewise.
2798 * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections: Likewise.
2799 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections: Likewise.
2800 * elf32-sparc.c (elf32_sparc_size_dynamic_sections: Likewise.
2801 * elf64-alpha.c (elf64_alpha_size_dynamic_sections: Likewise.
2802 * elf64-sparc.c (sparc64_elf_size_dynamic_sections: Likewise.
2803
2804 2003-05-30 Kris Warkentin <kewarken@qnx.com>
2805
2806 * elf.c (elfcore_grok_nto_status): Only set lwpid for the active or
2807 signalled thread.
2808 (elfcore_grok_nto_gregs): Only make .reg section for the active thread.
2809
2810 2003-05-29 Nick Clifton <nickc@redhat.com>
2811
2812 * pef.c: Include "safe-ctype.h" instead of <ctype.h>.
2813 Tidy up formatting.
2814 * Makefile.am: Add dependency on safe-ctype.h.
2815 * Makefile.in: Regenerate.
2816
2817 2003-05-29 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2818
2819 * elfxx-mips.c: Don't force symbols local unconditionally.
2820
2821 2003-05-28 Alan Modra <amodra@bigpond.net.au>
2822
2823 * elf32-hppa.c (elf32_hppa_relocate_section): Delete bogus
2824 undefined_symbol call.
2825
2826 2003-05-27 Richard Sandiford <rsandifo@redhat.com>
2827
2828 * elfxx-mips.c (mips_elf_hash_sort_data): Fix formattting.
2829 (mips_elf_link_hash_table): Likewise.
2830
2831 2003-05-22 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2832
2833 * elf64-mips.c (elf_mips_gnu_rel16_s2): Add internally used
2834 R_MIPS_GNU_REL16_S2 support.
2835 (bfd_elf64_bfd_reloc_type_lookup): Use it.
2836 (mips_elf64_rtype_to_howto): Use it.
2837 * elfn32-mips.c (elf_mips_gnu_rel16_s2): Add internally used
2838 R_MIPS_GNU_REL16_S2 support.
2839 (bfd_elf32_bfd_reloc_type_lookup): Use it.
2840 (mips_elf_n32_rtype_to_howto): Use it.
2841
2842 2003-05-21 Stuart F. Downing <sdowning@fame.com>
2843
2844 * som.h: Define PA_2_0 before including a.out.h
2845
2846 2003-05-07 Eric Christopher <echristo@redhat.com>
2847 Alexandre Oliva <aoliva@redhat.com>
2848
2849 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Adjust
2850 pic tests, change to warning.
2851 (_bfd_mips_elf_final_link): Remove EF_MIPS_CPIC flag setting.
2852
2853 2003-05-21 Marcus Comstedt <marcus@mc.pp.se>
2854
2855 * config.bfd: Check for a target triplet of shl-...-netbsdelf as
2856 well as shle-...-netbsdelf. Remove duplicate entry.
2857
2858 2003-05-21 Nick Clifton <nickc@redhat.com>
2859
2860 * elf32-xstormy16.c (xstormy16_elf_howto_table): Fix dst_mask
2861 for X_STORMY16_REL_12 reloc.
2862
2863 * elf.c (bfd_elf_get_needed_list): Use is_elf_hash_table to check
2864 the type of the hash table in the bfd_link_info structure.
2865 (bfd_elf_get_runpath_list): Likewise.
2866
2867 2003-05-19 Roland McGrath <roland@redhat.com>
2868
2869 * elf.c (bfd_elf_bfd_from_remote_memory): New function.
2870 * bfd-in.h: Declare it.
2871 * bfd-in2.h: Regenerated.
2872 * elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): New function.
2873 * elf-bfd.h (struct elf_backend_data): New function pointer member
2874 elf_backend_bfd_from_remote_memory.
2875 (_bfd_elf32_bfd_from_remote_memory, _bfd_elf64_bfd_from_remote_memory):
2876 Declare them.
2877 * elfxx-target.h (elf_backend_bfd_from_remote_memory): New macro.
2878 (elfNN_bed): Add that to the initializer.
2879
2880 2003-05-15 Roland McGrath <roland@redhat.com>
2881
2882 * elf.c (elfcore_grok_note): Grok NT_AUXV note, make ".auxv" section.
2883
2884 2003-05-20 Jakub Jelinek <jakub@redhat.com>
2885
2886 * elflink.h (elf_link_output_extsym): Only issue error about !=
2887 STV_DEFAULT symbols if they are bfd_link_hash_undefined.
2888
2889 2003-05-20 H.J. Lu <hongjiu.lu@intel.com>
2890
2891 * elflink.c (_bfd_elf_merge_symbol): Check ELF_LINK_DYNAMIC_DEF
2892 when removing the old definition for symbols with non-default
2893 visibility.
2894
2895 2003-05-18 Jason Eckhardt <jle@rice.edu>
2896
2897 * elf32-i860.c (elf32_i860_relocate_highadj): Simplify calculation.
2898
2899 2003-05-17 Andreas Schwab <schwab@suse.de>
2900
2901 * elf32-m68k.c (elf_m68k_check_relocs): Cache reloc section in
2902 elf_section_data during processing of pc-relative and absolute
2903 relocations.
2904 (elf_m68k_relocate_section): Use the cached reloc section instead
2905 of computing it again. Fix handling of visibility. Don't modify
2906 addend when copying over a relocation into the output.
2907
2908 2003-05-17 Alan Modra <amodra@bigpond.net.au>
2909
2910 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
2911 to trim plt entries. Move undefweak non-default visibility test..
2912 (allocate_dynrelocs): ..from here.
2913 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't test
2914 dynamic_sections_created here. Update comment. Move undefweak
2915 non-default visibility test..
2916 (allocate_dynrelocs): ..from here. Fix comment.
2917 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
2918 to trim plt entries. Move undefweak non-default visibility test..
2919 (allocate_dynrelocs): ..from here. Fix comment.
2920 * elflink.h (elf_link_output_extsym): Compare ELF_ST_VISIBILITY with
2921 STV_DEFAULT rather than comparing with zero.
2922 * elflink.c (_bfd_elf_merge_symbol): Likewise.
2923 (_bfd_elf_fix_symbol_flags): Likewise. Format comment.
2924
2925 2003-05-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2926
2927 * bfd.c (_bfd_get_gp_value): Prevent illegal access for abfd null
2928 pointers.
2929 (_bfd_set_gp_value): Likewise.
2930
2931 2003-05-16 Michael Snyder <msnyder@redhat.com>
2932 From Bernd Schmidt <bernds@redhat.com>
2933 * archures.c (bfd_mach_h8300sx): New.
2934 * bfd-in2.h: Regenerate.
2935 * cpu-h8300.c (h8300_scan)): Add support for h8300sx.
2936 (h8300sx_info_struct): New.
2937 (h8300s_info_struct): Link to it.
2938 * elf32-h8300.c (elf32_h8_mach): Add support for h8300sx.
2939 (elf32_h8_final_write_processing): Likewise.
2940 (elf32_h8_relax_section): Likewise.
2941
2942 2003-05-16 Kelley Cook <kelleycook@wideopenwest.com>
2943
2944 * config.bfd: Accept i[3-7]86 variants.
2945 * configure.host: Likewise.
2946 * configure.in: Likewise.
2947 * configure: Regenerate.
2948
2949 2003-05-15 H.J. Lu <hongjiu.lu@intel.com>
2950
2951 * elflink.c (_bfd_elf_fix_symbol_flags): Also hide protected
2952 symbol.
2953
2954 2003-05-15 H.J. Lu <hongjiu.lu@intel.com>
2955
2956 * elflink.h (elf_link_check_versioned_symbol): Also allow
2957 the base version.
2958
2959 2003-05-15 Alan Modra <amodra@bigpond.net.au>
2960 H.J. Lu <hongjiu.lu@intel.com>
2961
2962 * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL.
2963 (elf_i386_relocate_section): Likewise.
2964 * elf32-ppc.c (allocate_dynrelocs): Likewise.
2965 (ppc_elf_relocate_section): Likewise.
2966 * elf64-ppc.c (allocate_dynrelocs): Likewise.
2967 (ppc64_elf_relocate_section): Likewise.
2968
2969 2003-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2970
2971 * elf32-mips.c (gprel32_with_gp): Remove useless N64 ABI case.
2972
2973 2003-05-13 Stephane Carrez <stcarrez@nerim.fr>
2974
2975 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Check for
2976 processor capability, allow merge of HC12 and HCS12 in some cases.
2977 (m68hc11_elf_hash_table_create): Use bfd_malloc instead of bfd_zalloc.
2978 * cpu-m68hc12.c (bfd_m68hc12s_arch): New struct.
2979 (bfd_m68hc12_arch): Link it.
2980 (scan_mach): New function.
2981
2982 2003-05-13 Andrew Haley <aph@redhat.com>
2983
2984 * elf.c (bfd_elf_hash): Mask lower 32 bits of hash.
2985
2986 2003-05-13 Alan Modra <amodra@bigpond.net.au>
2987 H.J. Lu <hongjiu.lu@intel.com>
2988
2989 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Move from
2990 elf32-ppc.c. Add ELF_LINK_FORCED_LOCAL check.
2991 * elf32-ppc.c: (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Delete.
2992 (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for dynreloc check.
2993 (ppc_elf_relocate_section): Likewise.
2994 * elf64-ppc.c (allocate_dynrelocs): Likewise.
2995 (ppc64_elf_relocate_section): Likewise. Use for .got relocs too.
2996 (ppc64_elf_adjust_dynamic_symbol): Don't assume symbols with .plt
2997 relocs need no other types.
2998 * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for
2999 dynreloc check.
3000 (elf_i386_relocate_section): Likewise. Use for .got relocs too.
3001 (elf_i386_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL for
3002 .got relocs.
3003
3004 2003-05-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3005
3006 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): For weak symbols,
3007 copy ELF_LINK_NON_GOT_REF from weakdef.
3008 (allocate_dynrelocs): For undef weak syms with non-default
3009 visibility, a) don't allocate plt entries, b) don't allocate
3010 .got relocs, c) discard dyn rel space
3011 (sh_elf_relocate_section): d) don't generate .got relocs, e)
3012 don't generate dynamic relocs.
3013 (sh_elf_copy_indirect_symbol): Don't copy ELF_LINK_NON_GOT_REF
3014 for weakdefs when symbol already adjusted.
3015
3016 2003-05-12 Nick Clifton <nickc@redhat.com>
3017
3018 * elf32-xstormy16.c (xstormy16_elf_howto_table): use 'bitfield'
3019 overflow detection for R_XSTORMY16_16 reloc.
3020
3021 2003-05-12 Paul Clarke <paulc@senet.com.au>
3022
3023 * elf32-h8300.c: Fix typo in name of R_H8_DIR8 reloc.
3024
3025 2003-05-11 Jason Eckhardt <jle@rice.edu>
3026
3027 * elf32-i860.c (elf32_i860_relocate_highadj): Properly
3028 adjust upper bits.
3029 (elf32_i860_relocate_splitn): Obtain upper 5 bits from the
3030 proper place.
3031 (elf32_i860_relocate_pc16): Obtain upper 5 bits from the
3032 proper place.
3033
3034 2003-05-11 Andreas Schwab <schwab@suse.de>
3035
3036 * elf32-m68k.c (elf_m68k_relocate_section): Replace ugly
3037 complicated tests for unresolvable relocs with a simple direct
3038 scheme using "unresolved_reloc" var. Report some detail on
3039 bfd_reloc_outofrange and similar errors.
3040
3041 2003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
3042
3043 * elf32-s390.c (allocate_dynrelocs, elf_s390_relocate_section):
3044 Fix WILL_CALL_FINISH_DYNAMIC_SYMBOL call.
3045 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
3046 * elf64-s390.c: Likewise.
3047
3048 2003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
3049
3050 * elf32-s390.c (ELIMINATE_COPY_RELOCS): Define as one.
3051 (elf_s390_adjust_dynamic_symbol): For weak symbols, copy
3052 ELF_LINK_NON_GOT_REF from weakdef.
3053 (elf_s390_copy_indirect_symbol): Test whether the weakdef sym has
3054 already been adjusted before treating it specially.
3055 * el64-s390.c: Likwise.
3056
3057 2003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
3058
3059 * elf32-s390.c (allocate_dynrelocs): For undef weak syms with
3060 non-default visibility, a) don't make them dynamic, b) discard
3061 space for dynamic relocs.
3062 (elf_s390_relocate_section): Initialize the GOT entries and skip
3063 R_390_{8,16,32}/R_390_PC{16,16DBL,32DBL,32} for weak undefined
3064 symbols with non-default visibility.
3065 * elf64-s390.c: Likewise.
3066
3067 2003-05-09 Alan Modra <amodra@bigpond.net.au>
3068
3069 * cpu-arm.c (arm_check_note): Warning fix.
3070 * elf32-iq2000.c (iq2000_elf_check_relocs): Warning fixes. Arrange
3071 to keep relocs if edited.
3072 (iq2000_elf_print_private_bfd_data): Return TRUE.
3073 * elfxx-ia64.c (elfNN_ia64_relax_section): Use ELFNN_R_SYM, not
3074 ELF64_R_SYM.
3075 (elfNN_ia64_relax_ldxmov): Warning fix.
3076 * xtensa-isa.c (xtensa_add_isa): Warning fix.
3077 * xtensa-modules.c (get_num_opcodes): Warning fix.
3078
3079 2003-05-09 Andrey Petrov <petrov@netbsd.org>
3080
3081 * elf.c (elf_fake_sections): Use correct cast for sh_name.
3082
3083 2003-05-09 Alan Modra <amodra@bigpond.net.au>
3084
3085 * elflink.c (_bfd_elf_link_create_dynamic_sections): Move from
3086 elflink.h. Replace LOG_FILE_ALIGN with bed->s->log_file_align.
3087 (_bfd_elf_create_dynamic_sections): Use bed->s->log_file_align.
3088 (bfd_elf_record_link_assignment): Move from elflink.h.
3089 (_bfd_elf_merge_symbol): Likewise.
3090 (_bfd_elf_add_default_symbol): Likewise.
3091 (_bfd_elf_export_symbol): Likewise.
3092 (_bfd_elf_link_find_version_dependencies): Likewise.
3093 (_bfd_elf_link_assign_sym_version): Likewise.
3094 (_bfd_elf_link_read_relocs): Likewise.
3095 (_bfd_elf_link_size_reloc_section): Likewise.
3096 (_bfd_elf_fix_symbol_flags): Likewise.
3097 (_bfd_elf_adjust_dynamic_symbol): Likewise.
3098 (_bfd_elf_link_sec_merge_syms): Likewise.
3099 (elf_link_read_relocs_from_section): Likewise. Use bed->s->sizeof_rel
3100 and bed->s->sizeof_rela.
3101 (_bfd_elf_link_output_relocs): Likewise.
3102 * elf-bfd.h (struct elf_size_info): Rename file_align to
3103 log_file_align.
3104 (struct elf_info_failed): Move from elflink.h.
3105 (struct elf_assign_sym_version_info): Likewise.
3106 (struct elf_find_verdep_info): Likewise.
3107 (_bfd_elf_create_dynamic_sections): Delete duplicate declaration.
3108 (_bfd_elf_merge_symbol, _bfd_elf_add_default_symbol,
3109 _bfd_elf_export_symbol, _bfd_elf_link_find_version_dependencies,
3110 _bfd_elf_link_assign_sym_version,
3111 _bfd_elf_link_create_dynamic_sections, _bfd_elf_link_read_relocs,
3112 _bfd_elf_link_size_reloc_section, _bfd_elf_link_output_relocs,
3113 _bfd_elf_fix_symbol_flags, _bfd_elf_adjust_dynamic_symbol,
3114 _bfd_elf_link_sec_merge_syms): Declare.
3115 (bfd_elf32_link_create_dynamic_sections): Don't declare.
3116 (_bfd_elf32_link_read_relocs): Likewise.
3117 (bfd_elf64_link_create_dynamic_sections): Likewise.
3118 (_bfd_elf64_link_read_relocs): Likewise.
3119 * elflink.h: Move lots o' stuff elsewhere.
3120 * bfd-in.h (bfd_elf32_record_link_assignment): Don't declare.
3121 (bfd_elf64_record_link_assignment): Likewise.
3122 (bfd_elf_record_link_assignment): Declare.
3123 * bfd-in2.h: Regenerate.
3124 * elfcode.h (elf_link_create_dynamic_sections): Don't declare.
3125 (NAME(_bfd_elf,size_info)): Adjust for log_file_align.
3126 * elf.c (_bfd_elf_init_reloc_shdr): Adjust for bed->s->log_file_align.
3127 (assign_file_positions_for_segments): Likewise.
3128 (assign_file_positions_except_relocs): Likewise.
3129 (swap_out_syms, elfcore_write_note): Likewise.
3130 * elf-m10200.c: Adjust for changed function names.
3131 * elf-m10300.c: Likewise.
3132 * elf32-arm.h: Likewise.
3133 * elf32-h8300.c: Likewise.
3134 * elf32-hppa.c: Likewise.
3135 * elf32-ip2k.c: Likewise.
3136 * elf32-m32r.c: Likewise.
3137 * elf32-m68hc11.c: Likewise.
3138 * elf32-m68hc1x.c: Likewise.
3139 * elf32-m68k.c: Likewise.
3140 * elf32-mips.c: Likewise.
3141 * elf32-ppc.c: Likewise.
3142 * elf32-sh.c: Likewise.
3143 * elf32-v850.c: Likewise.
3144 * elf32-xtensa.c: Likewise.
3145 * elf64-alpha.c: Likewise.
3146 * elf64-hppa.c: Likewise.
3147 * elf64-mmix.c: Likewise.
3148 * elf64-ppc.c: Likewise.
3149 * elf64-sh64.c: Likewise.
3150 * elfxx-ia64.c: Likewise.
3151 * elfxx-mips.c: Likewise.
3152 (MIPS_ELF_LOG_FILE_ALIGN): Use log_file_align.
3153 * elf64-alpha.c (alpha_elf_size_info): Adjust for log_file_align.
3154 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
3155 * elf64-mips.c (mips_elf64_size_info): Likewise.
3156 * elf64-s390.c (s390_elf64_size_info): Likewise.
3157 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
3158
3159 2003-05-08 H.J. Lu <hongjiu.lu@intel.com>
3160
3161 * elflink.h (elf_add_default_symbol): After skipping the
3162 unversioned symbol, go to non-default one.
3163
3164 2003-05-07 H.J. Lu <hongjiu.lu@intel.com>
3165
3166 * elfxx-ia64.c (_bfd_elf_link_hash_hide_symbol): Also clear the
3167 want_plt field.
3168 (elfNN_ia64_relocate_section): Don't do dynamic symbol lookup
3169 for symbols with non-default visibility.
3170
3171 2003-05-07 H.J. Lu <hongjiu.lu@intel.com>
3172
3173 * elflink.h (elf_link_check_versioned_symbol): Also handle the
3174 case that a DSO references a hidden symbol which may be
3175 satisfied by a versioned symbol in another DSO.
3176 (elf_link_output_extsym): Check versioned definition for hidden
3177 symbol referenced by a DSO.
3178
3179 2003-05-07 Nick Clifton <nickc@redhat.com>
3180
3181 * elf32-xstormy16.c (xstormy16_elf_howto_table): Reset
3182 R_XSTORMY16_16 reloc to ignore overflows.
3183
3184 2003-05-06 Alexandre Oliva <aoliva@redhat.com>
3185
3186 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Improve
3187 error message for mixing different-endian files. Check for ABI
3188 compatibility of input files with the selected emulation.
3189
3190 2003-05-05 Alan Modra <amodra@bigpond.net.au>
3191
3192 * elf32-i386.c (allocate_dynrelocs): For undef weak syms with
3193 non-default visibility, a) don't make them dynamic, b) discard
3194 space for dynamic relocs.
3195 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
3196
3197 * elf32-ppc.c (allocate_dynrelocs): For undef weak syms with
3198 non-default visibility, a) don't allocate plt entries, b) don't
3199 allocate .got relocs, c) discard dyn rel space,
3200 (ppc_elf_relocate_section): d) don't generate .got relocs, e)
3201 don't generate dynamic relocs.
3202 * elf64-ppc.c (allocate_dynrelocs): As above.
3203 (ppc64_elf_relocate_section): As above.
3204
3205 2003-05-05 Andreas Jaeger <aj@suse.de>
3206
3207 * elf64-x86-64.c (allocate_dynrelocs): Don't allocate dynamic
3208 relocation entries for weak undefined symbols with non-default
3209 visibility.
3210 (elf64_x86_64_relocate_section): Initialize the GOT entries and
3211 skip R_386_32/R_386_PC32 for weak undefined symbols with
3212 non-default visibility.
3213
3214 2003-05-04 H.J. Lu <hjl@gnu.org>
3215
3216 * elf32-i386.c (allocate_dynrelocs): Don't allocate dynamic
3217 relocation entries for weak undefined symbols with non-default
3218 visibility.
3219 (elf_i386_relocate_section): Initialize the GOT entries and
3220 skip R_386_32/R_386_PC32 for weak undefined symbols with
3221 non-default visibility.
3222
3223 * elfxx-ia64.c (allocate_fptr): Don't allocate function
3224 descriptors for weak undefined symbols with non-default
3225 visibility.
3226 (allocate_dynrel_entries): Don't allocate relocation entries
3227 for symbols resolved to 0.
3228 (set_got_entry): Don't install dynamic relocation for weak
3229 undefined symbols with non-default visibility.
3230 (set_pltoff_entry): Likewise.
3231
3232 * elflink.h (elf_fix_symbol_flags): Hide weak undefined symbols
3233 with non-default visibility.
3234 (elf_link_output_extsym): Don't make weak undefined symbols
3235 with non-default visibility dynamic.
3236
3237 2003-05-04 H.J. Lu <hjl@gnu.org>
3238
3239 * elflink.h (elf_merge_symbol): Correctly handle weak definition.
3240
3241 2003-05-04 H.J. Lu <hjl@gnu.org>
3242
3243 * elflink.h (elf_merge_symbol): Don't record a hidden/internal
3244 symbol dynamic. Check indirection when removing the old
3245 definition for symbols with non-default visibility.
3246 (elf_add_default_symbol): Skip when told by elf_merge_symbol.
3247
3248 2003-05-02 Nick Clifton <nickc@redhat.com>
3249
3250 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make the
3251 R_XSTORMY16_8 and R_XSTORMY16_16 relocs detect and complain about
3252 unsigned overflow.
3253
3254 2003-05-02 Andreas Jaeger <aj@suse.de>
3255
3256 * elf64-x86-64.c (elf_x86_64_copy_indirect_symbol): Don't copy
3257 ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
3258 (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
3259 (elf_x86_64_adjust_dynamic_symbol): For weak symbols, copy
3260 ELF_LINK_NON_GOT_REF from weakdef.
3261
3262 2003-05-02 Charles Lepple <clepple@ghz.cc>
3263 Nick Clifton <nickc@redhat.com>
3264
3265 * acinclude.m4: Fix name of --enable-install-libbfd switch.
3266 * aclocal.m4: Regenerate.
3267 * configure: Regenerate.
3268 * Makefile.in: Regenerate.
3269
3270 2003-05-01 Alan Modra <amodra@bigpond.net.au>
3271
3272 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Test whether the
3273 weakdef sym has already been adjusted before treating it specially.
3274 * elf32-i386.c (elf_i386_copy_indirect_symbol): Don't copy
3275 ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
3276 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
3277 (ppc64_elf_check_relocs): Set ELF_LINK_NON_GOT_REF.
3278
3279 2003-04-28 H.J. Lu <hjl@gnu.org>
3280
3281 * elfxx-ia64.c (elfNN_ia64_relax_section): Relax ldxmov during
3282 the relax finalize pass.
3283
3284 * section.c (struct sec): Add need_finalize_relax and remove
3285 flag11.
3286 (STD_SECTION): Update struct sec initializer.
3287 * bfd-in2.h: Regenerated.
3288
3289 2003-04-28 H.J. Lu <hjl@gnu.org>
3290
3291 * elflink.h (elf_merge_symbol): Call elf_backend_copy_indirect_symbol
3292 to copy any information related to dynamic linking when we flip
3293 the indirection.
3294
3295 2003-04-27 H.J. Lu <hjl@gnu.org>
3296
3297 * elf-bfd.h (ELF_LINK_DYNAMIC_DEF): New.
3298 (ELF_LINK_DYNAMIC_WEAK): New.
3299
3300 * elflink.h (elf_merge_symbol): Add one argument to indicate if
3301 a symbol should be skipped. Ignore definitions in dynamic
3302 objects for symbols with non-default visibility.
3303 (elf_add_default_symbol): Adjusted.
3304 (elf_link_add_object_symbols): Check if a symbol should be
3305 skipped. Don't merge the visibility field with the one from
3306 a dynamic object.
3307 (elf_link_check_versioned_symbol): Use undef_bfd.
3308 (elf_link_output_extsym): Warn if a forced local symbol is
3309 referenced from dynamic objects. Make non-weak undefined symbol
3310 with non-default visibility a fatal error.
3311
3312 2003-04-27 Daniel Jacobowitz <drow@mvista.com>
3313
3314 * configure.in: Bump version on HEAD to 2.14.90.
3315 * configure: Regenerated.
3316
3317 2003-04-26 Stephane Carrez <stcarrez@nerim.fr>
3318
3319 PR savannah/3331:
3320 * elf32-m68hc11.c (m68hc11_elf_relax_section): Clear prev_insn_group
3321 when we couldn't relax something.
3322
3323 2003-04-25 Alan Modra <amodra@bigpond.net.au>
3324
3325 * elflink.h (elf_merge_symbol): When we find a regular definition
3326 for an indirect symbol, flip the indirection so that the old
3327 direct symbol now points to the new definition.
3328
3329 2003-04-24 Roland McGrath <roland@redhat.com>
3330
3331 * elf.c (bfd_section_from_phdr): Map PT_GNU_EH_FRAME to "eh_frame_hdr".
3332
3333 2003-04-24 Alan Modra <amodra@bigpond.net.au>
3334
3335 * elf32-ppc.c: Formatting and comment fixes.
3336 (ELIMINATE_COPY_RELOCS): Move before ppc_elf_copy_indirect_symbol.
3337 (ppc_elf_copy_indirect_symbol): Copy flags here for weakdefs.
3338
3339 2003-04-24 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
3340
3341 * archures.c (bfd_mach_h8300hn, bfd_mach_h8300sn): Added.
3342 * bfd-in2.h: Rebuilt.
3343 * coff-h8300.c (BADMAG): Add check for H8300HNBADMAG & H8300SNBADMAG.
3344 * coffcode.h (coff_set_arch_mach_hook): Add case for H8300HNMAGIC
3345 & H8300SNMAGIC.
3346 (coff_set_flags): Add case for bfd_mach_h8300hn & bfd_mach_h8300sn.
3347 * cpu-h8300.c (h8300_scan): Handle h8300hn, h8300sn.
3348 (h8300sn_info_struct, h8300hn_info_struct): New.
3349 * elf32-h8300.c (elf32_h8_mach): Handle case for h8300hn & h8300sn
3350 (elf32_h8_final_write_processing): Likewise.
3351
3352 2003-04-23 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3353
3354 * elf32-sh.c (tpoff): New.
3355 (struct elf_sh_dyn_relocs): Remove tls_tpoff32.
3356 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
3357 (allocate_dynrelocs): Don't make unnecessary dynamic TLS
3358 relocations. Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses.
3359 (sh_elf_relocate_section): Likewise. Remove unnecessary tests.
3360 (dtpoff_base): Fix wrong indentation.
3361 (sh_elf_check_relocs): Don't set DF_STATIC_TLS flag with non-TLS
3362 relocations. Don't set tls_tpoff32 flag. Don't make unnecessary
3363 R_SH_TLS_TPOFF32 relocations.
3364
3365 2003-04-23 J"orn Rennecke <joern.rennecke@superh.com>
3366
3367 * archures.c (enum bfd_architecture): Amend comment to refer to SuperH.
3368 * cpu-sh.c: Likewise.
3369 * elf32-sh.c: Likewise.
3370 * reloc.c (bfd_reloc_code_real): Likewise.
3371 * elf32-sh64-com.c: Change comment to refer to SuperH.
3372 * elf32-sh64.c: Likewise.
3373 * elf64-sh64.c: Likewise.
3374 * bfd-in2.h (enum bfd_architecture): Regenerate.
3375
3376 2003-04-23 Alan Modra <amodra@bigpond.net.au>
3377
3378 From Julien LEMOINE <speedblue@debian.org>
3379 * elf32-i386.c (elf_i386_info_to_howto): Delete.
3380 (elf_info_to_howto): Define as elf_i386_info_to_howto_rel.
3381
3382 2003-04-22 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
3383
3384 * archures.c: Replace references to Mitsubishi M32R with references
3385 to Renesas M32R.
3386 * relocs.c: Likewise.
3387 * bfd-in2.h: Regenerate.
3388
3389 2003-04-21 Richard Henderson <rth@redhat.com>
3390
3391 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Return false for an
3392 executable when a symbol is defined both regular and dynamic.
3393
3394 2003-04-21 Stephane Carrez <stcarrez@nerim.fr>
3395
3396 * Makefile.am (BFD32_BACKENDS): Add elf32-m68hc1x.lo.
3397 (elf32-m68hc1x.lo): Update dependencies
3398 * configure.in: Add elf32-m68hc1x.lo.
3399 * configure: Rebuild.
3400 * Makefile.in: Rebuild.
3401
3402 2003-04-21 Stephane Carrez <stcarrez@nerim.fr>
3403
3404 * elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
3405 (m68hc11_elf_hash_table_create): New function.
3406 (elf32_m68hc11_link_hash_table_free): New function.
3407 (stub_hash_newfunc): New function.
3408 (m68hc11_add_stub): New function.
3409 (elf32_m68hc11_add_symbol_hook): New function.
3410 (elf32_m68hc11_setup_section_lists): New function.
3411 (elf32_m68hc11_next_input_section): New function.
3412 (elf32_m68hc11_size_stubs): New function.
3413 (elf32_m68hc11_build_stubs): New function.
3414 (m68hc11_get_relocation_value): New function.
3415 (elf32_m68hc11_relocate_section): Call the above to redirect
3416 some relocations to the trampoline code.
3417 (m68hc11_elf_export_one_stub): New function.
3418 (m68hc11_elf_set_symbol): New function.
3419 (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse.
3420 (m68hc11_elf_get_bank_parameters): Get parameters only when the info
3421 is not yet initialized.
3422
3423 * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
3424 (elf32_m68hc11_stub_hash_entry): New struct.
3425 (m68hc11_page_info): Add trampoline handler address.
3426 (m68hc11_elf_link_hash_table): Add stubs generation members.
3427 (elf32_m68hc11_add_symbol_hook): Declare.
3428 (elf32_m68hc11_setup_section_lists): Declare.
3429 (elf32_m68hc11_size_stubs): Declare.
3430 (elf32_m68hc11_build_stubs): Declare.
3431
3432 * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c.
3433 (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise.
3434 (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto.
3435 (_bfd_m68hc11_elf_set_private_flags): Ditto.
3436 (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto.
3437 (_bfd_m68hc11_elf_print_private_bfd_data): Ditto.
3438 (bfd_elf32_bfd_link_hash_table_create): Define.
3439 (elf_backend_add_symbol_hook): Define.
3440 (m68hc11_elf_bfd_link_hash_table_create): New function.
3441 (m68hc11_elf_build_one_stub): New function.
3442 (m68hc11_elf_size_one_stub): New function.
3443 (m68hc11_elf_bfd_link_hash_table_create): Install the above.
3444 (bfd_elf32_bfd_link_hash_table_create): Define.
3445
3446 * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove.
3447 (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked.
3448 (m68hc12_phys_addr): Ditto.
3449 (m68hc12_phys_page): Ditto.
3450 (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c.
3451 (elf32_m68hc11_gc_mark_hook): Likewise.
3452 (elf32_m68hc11_gc_sweep_hook): Likewise.
3453 (elf32_m68hc11_check_relocs): Likewise.
3454 (elf32_m68hc11_relocate_section): Likewise.
3455 (_bfd_m68hc12_elf_set_private_flags): Likewise.
3456 (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise.
3457 (_bfd_m68hc12_elf_print_private_bfd_data): Likewise.
3458 (m68hc12_elf_build_one_stub): New function.
3459 (m68hc12_elf_size_one_stub): New function.
3460 (m68hc12_elf_bfd_link_hash_table_create): New function, use the above.
3461 (elf_backend_add_symbol_hook): Define.
3462 (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
3463
3464 2003-04-18 Nick Clifton <nickc@redhat.com>
3465
3466 * format.c (bfd_check_format_matches): Only check associated
3467 vector if the matching_vector has been created.
3468
3469 2003-04-15 Alexandre Oliva <aoliva@redhat.com>
3470
3471 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Fix typo in
3472 2003-04-09's change.
3473
3474 2003-04-15 Brian Ford <ford@vss.fsi.com>
3475
3476 * peicode.h (coff_swap_scnhdr_in): If a section holds
3477 uninitialized data and is from an object file or from an
3478 executable image that has not initialized the s_size field, or if
3479 the physical size is padded, use the virtual size (stored in
3480 s_paddr) instead.
3481
3482 2003-04-15 H.J. Lu <hjl@gnu.org>
3483
3484 * elflink.h (elf_link_add_object_symbols): Properly report
3485 filename for alignment reduction.
3486
3487 2003-04-15 Rohit Kumar Srivastava <rohits@kpitcummins.com>
3488
3489 * archures.c: Replace occurrances of 'Hitachi' with 'Renesas'.
3490 * reloc.c: Likewise.
3491 * coff-h8300.c: Likewise.
3492 * coff-h8500.c: Likewise.
3493 * coff-sh.c: Likewise.
3494 * cpu-h8300.c: Likewise.
3495 * cpu-sh.c: Likewise.
3496 * elf32-h8300.c: Likewise.
3497 * elf32-sh.c: Likewise.
3498 * elf32-sh64-com.c: Likewise.
3499 * elf32-sh64.c: Likewise.
3500 * elf64-sh64.c: Likewise.
3501 * bfd-in2.h: Regenerate.
3502
3503 2003-04-14 H.J. Lu <hjl@gnu.org>
3504
3505 * elflink.h (elf_link_add_object_symbols): Maintain maximum
3506 alignment for common symbols. Warn reducing alignment for
3507 common symbols. Report old filename when symbol size changes.
3508
3509 2003-04-12 Alexandre Oliva <aoliva@redhat.com>
3510
3511 * elfxx-mips.c (mips_elf_calculate_relocation): Adjust two other
3512 occurrences of the same test changed in the previous patch.
3513 Optimize.
3514
3515 2003-04-11 Alexandre Oliva <aoliva@redhat.com>
3516
3517 * elfxx-mips.c (mips_elf_get_global_gotsym_index): New.
3518 (mips_elf_calculate_relocation): Decay GOT_PAGE/GOT_OFST to
3519 GOT_DISP/addend only if the symbol got a global GOT entry.
3520
3521 2003-04-10 Alexandre Oliva <aoliva@redhat.com>
3522
3523 * elfxx-mips.c (mips_elf_calculate_relocation): Decay
3524 GOT_PAGE/GOT_OFST referencing overridable symbol to
3525 GOT_DISP/addend.
3526 (_bfd_mips_elf_check_relocs): Handle GOT_PAGE referencing
3527 global symbol as GOT_DISP.
3528
3529 2003-04-10 Bob Wilson <bob.wilson@acm.org>
3530
3531 * elf32-xtensa.c (elf_xtensa_relocate_section): Don't continue to the
3532 next relocation on an undefined symbol.
3533
3534 2003-04-09 Richard Henderson <rth@redhat.com>
3535
3536 * elf64-alpha.c (elf64_alpha_relocate_section) <R_ALPHA_GPREL32>:
3537 Ignore relocations against r_symndx == 0.
3538
3539 2003-04-09 H.J. Lu <hjl@gnu.org>
3540
3541 * elf64-alpha.c (elf64_alpha_relocate_section): Don't return
3542 FALSE for undefined symbols.
3543 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
3544
3545 2003-04-09 Alexandre Oliva <aoliva@redhat.com>
3546
3547 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Try DWARF3-standard
3548 and IRIX-specific shift-to-64-bit 4-byte lengths before following
3549 addr_size.
3550
3551 2003-04-08 Alexandre Oliva <aoliva@redhat.com>
3552
3553 * elf32-mips.c (bfd_elf32_bfd_reloc_type_lookup): Detect (ctor)
3554 pointer size from ABI, not arch_bits_per_address.
3555
3556 2003-04-07 Kevin Buettner <kevinb@redhat.com>
3557
3558 * elfn32-mips.c (elf32_mips_grok_prstatus): Adjust core file related
3559 constants for n32 ABI.
3560
3561 2003-04-06 Andrew Cagney <cagney@redhat.com>
3562
3563 * simple.c (bfd_simple_get_relocated_section_contents): Disable
3564 free that leads to GDB vs BFD memory corruption.
3565
3566 2003-04-04 Stephane Carrez <stcarrez@nerim.fr>
3567
3568 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Also adjust
3569 symbols that mark the end of the section.
3570 (m68hc11_elf_relax_section): Use R_M68HC11_PCREL_8 relocs when
3571 converting to a relative branch so that the offset is computed after
3572 the relaxation; also relocate a jsr into a bsr if possible but don't
3573 relax them if they are to a far symbol as we need to call the
3574 trampoline code.
3575 (elf_m68hc11_howto_table): Set pcrel_offset to true.
3576
3577 2003-04-04 Svein E. Seldal <Svein.Seldal@solidas.com>
3578
3579 * archures.c: Namespace cleanup. Rename bfd_mach_c3x to
3580 bfd_mach_tic3x and bfd_mach_c4x to bfd_mach_tic4x
3581 * bfd-in2.h: Regenerate
3582 * coff-tic4x.c: Namespace cleanup. Replace s/c4x/tic4x/
3583 * cpu-tic4x.c: Ditto
3584
3585 2003-04-03 Nick Clifton <nickc@redhat.com>
3586
3587 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Compute ps and ss
3588 differently for object files and executables.
3589 * peicode.h (coff_swap_scnhdr_in): Only set the s_size field
3590 for object files or for executables who have not already
3591 initialised the field.
3592 * libpei.h (bfd_pe_executable_p): New macro. Return true if
3593 the PE format bfd is an executable.
3594
3595 2003-04-03 Alan Modra <amodra@bigpond.net.au>
3596
3597 * elf32-ppc.c (ppc_elf_check_relocs): Don't use SYMBOL_REFERENCES_LOCAL
3598 here as it's too early to reliably determine locality.
3599 (ppc_elf_gc_sweep_hook): Likewise.
3600 (SYMBOL_REFERENCES_LOCAL): Expand comment.
3601
3602 2003-04-02 Bob Wilson <bob.wilson@acm.org>
3603
3604 * xtensa-modules.c: Remove comment indicating that this is a
3605 generated file.
3606
3607 2003-04-02 Alan Modra <amodra@bigpond.net.au>
3608
3609 * elfxx-mips.c (_bfd_mips_elf_hide_symbol): Test for NULL dynobj.
3610
3611 2003-04-01 Bob Wilson <bob.wilson@acm.org>
3612
3613 * Makefile.am (ALL_MACHINES): Add cpu-xtensa.lo.
3614 (ALL_MACHINES_CFILES): Add cpu-xtensa.c.
3615 (BFD32_BACKENDS): Add elf32-xtensa.lo, xtensa-isa.lo, and
3616 xtensa-modules.lo.
3617 (BFD32_BACKENDS_CFILES): Add elf32-xtensa.c, xtensa-isa.c, and
3618 xtensa-modules.c.
3619 (cpu-xtensa.lo): New target.
3620 (elf32-xtensa.lo): Likewise.
3621 (xtensa-isa.lo): Likewise.
3622 (xtensa-modules.lo): Likewise.
3623 * Makefile.in: Regenerate.
3624 * archures.c (bfd_architecture): Add bfd_{arch,mach}_xtensa.
3625 (bfd_archures_list): Add bfd_xtensa_arch.
3626 * config.bfd: Handle xtensa-*-*.
3627 * configure.in: Handle bfd_elf32_xtensa_{le,be}_vec.
3628 * configure: Regenerate.
3629 * reloc.c: Add BFD_RELOC_XTENSA_{RTLD,GLOB_DAT,JMP_SLOT,RELATIVE,
3630 PLT,OP0,OP1,OP2,ASM_EXPAND,ASM_SIMPLIFY}.
3631 * targets.c (bfd_elf32_xtensa_be_vec): Declare.
3632 (bfd_elf32_xtensa_le_vec): Likewise.
3633 (bfd_target_vector): Add bfd_elf32_xtensa_{be,le}_vec.
3634 * cpu-xtensa.c: New file.
3635 * elf32-xtensa.c: Likewise.
3636 * xtensa-isa.c: Likewise.
3637 * xtensa-modules.c: Likewise.
3638 * libbfd.h: Regenerate.
3639 * bfd-in2.h: Likewise.
3640
3641 2003-04-01 Nick Clifton <nickc@redhat.com>
3642
3643 * archures.c (bfd_mach_arm_unknown): Define.
3644 * bfd-in.h (bfd_arm_merge_machines, bfd_arm+update_notes,
3645 bfd_arm_get_mach_from_notes): Prototype.
3646 * bfd-in2.h: Regenerate.
3647 * coff-arm.c (coff_arm_merge_private_bfd_data): Call
3648 bfd_arm_merge_machines.
3649 (coff_arm_final_link_postscript): Call bfd_arm_update_notes.
3650 * coffcode.h (coff_set_arch_mach_hook): Call
3651 bfd_arm_get_mach_from_notes.
3652 * coffgen.c (coff_real_object_p): Revert previous delta.
3653 * cpu_arm.c (arm_check_note): New function. Examine a note in a
3654 .note section.
3655 (bfd_arm_merge_machines): New function: Handle the merging of ARM
3656 binaries compiled for different architectures..
3657 (bfd_arm_update_notes): New function: Update an ARM note section.
3658 (bfd_arm_get_mach_from_notes): New function: Extract a bfd machine
3659 number from an ARM note section.
3660 * elf32-arm.h (elf32_arm_object_p): Use
3661 bfd_arm_get_mach_from_notes.
3662 (elf32_arm_merge_private_bfd_data): Use bfd_arm_merge_machines.
3663 (elf32_arm_final_write_processing): Use bfd_arm_update_notes.
3664
3665 2003-04-01 Ben Elliston <bje@wasabisystems.com>
3666
3667 * dwarf2.c (read_attribute_value): Correct typo in comment.
3668
3669 2003-04-01 Nick Clifton <nickc@redhat.com>
3670
3671 * dwarf2.c (concat_filename): Use bfd_malloc() and strdup()
3672 instead of concat().
3673 (decode_line_info): Only free filename if it is not NULL.
3674 (add_line_info): Make a copy of the filename when storing it into
3675 the info structure.
3676
3677 2003-03-31 Andreas Schwab <schwab@suse.de>
3678 Daniel Jacobowitz <drow@mvista.com>
3679
3680 * simple.c (bfd_simple_get_relocated_section_contents): Add
3681 parameter symbol_table. Optionally use it instead of the symbol
3682 table from the bfd. Save and restore output offsets and output
3683 sections around bfd_get_relocated_section_contents. Fix a memory
3684 leak.
3685 (simple_save_output_info, simple_restore_output_info): New
3686 functions.
3687 * bfd-in2.h: Regenerate.
3688 * dwarf2.c (read_abbrevs): Use
3689 bfd_simple_get_relocated_section_contents instead of
3690 bfd_get_section_contents.
3691 (decode_line_info): Likewise.
3692 (_bfd_dwarf2_find_nearest_line): Likewise. Don't call
3693 find_rela_addend.
3694 (find_rela_addend): Remove.
3695 * elfxx-ia64.c (elfNN_ia64_reloc): Weaken sanity check for
3696 debugging sections.
3697 (elfNN_ia64_hash_table_create): Create the hash table with malloc,
3698 not bfd_zalloc.
3699
3700 2003-03-31 David Heine <dlheine@suif.stanford.edu>
3701
3702 * aoutx.h (aout_link_hash_table_create): Use bfd_malloc instead of
3703 bfd_alloc.
3704 * dwarf2.c (concat_filename): Always allocate space for the
3705 returned filename.
3706 (decode_line_info): Free the allocated filename returned by
3707 concat_filename.
3708 * elf-eh-frame.c (bfd_elf_write_section_eh_frame): Fix memory leaks.
3709 * elf.c (copy_private_bfd_data): Likewise.
3710 (_bfd_elf_slurp_version_tables): Fix bug freeing contents pointer.
3711 * elflink.h (elf_link_sort_relocs): Fix memory leak.
3712 * format.c (bfd_check_format_matches): Likewise.
3713 * linker.c (bfd_generic_final_link): Likewise.
3714 * opncls.c (find_separate_debug_info): Likewise.
3715 * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
3716
3717 2003-03-28 H.J. Lu <hjl@gnu.org>
3718
3719 * elflink.h (elf_link_add_object_symbols): Correctly combine
3720 visibilities.
3721
3722 2003-03-27 Jakub Jelinek <jakub@redhat.com>
3723
3724 * elfxx-ia64.c (elfNN_ia64_relax_section): Reset self_dtpmod_offset
3725 to -1 before recomputing got offsets.
3726
3727 2003-03-26 Andreas Schwab <schwab@suse.de>
3728
3729 * elf32-m68k.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
3730 (elf_m68k_relocate_section): Use it to correctly handle symbols
3731 forced to be local.
3732 (elf_m68k_finish_dynamic_symbol): Emit RELATIVE reloc for got
3733 entries for symbols that are forced to be local.
3734
3735 2003-03-25 Alexandre Oliva <aoliva@redhat.com>
3736
3737 * elfxx-mips.c (_bfd_mips_relax_section): New function.
3738 * elfxx-mips.h (_bfd_mips_relax_section): Declare.
3739 * elfn32-mips.c, elf64-mips.c: Use it.
3740
3741 2003-03-25 Stan Cox <scox@redhat.com>
3742 Nick Clifton <nickc@redhat.com>
3743
3744 Contribute support for Intel's iWMMXt chip - an ARM variant:
3745
3746 * archures.c: Add bfd_mach_arm_iWMMXt.
3747 * reloc.c: Add BFD_RELOC_ARM_CP_OFF_IMM_S2.
3748 * bfd-in2.h: Regenerate.
3749 * libbfd.h: Regenerate.
3750 * coff-arm.c (coff_arm_merge_private_bfd_data): Allow iWMMXt
3751 object files to be linked with XScale ones.
3752 (coff_arm_final_link_postscript): Update note section.
3753 * coffcode.h (coff_set_arch_mach_hook): Handle note section.
3754 * coffgen.c (coff_real_object_p): Call bfd_coff_set_arch_mach_hook
3755 after identifying a coff binary.
3756 * cpu-arm.c (processors): Add iWMMXt.
3757 (arch_inf): Likewise.
3758 * elf32-arm.h (arm_object_p): Handle note section.
3759 (elf32_arm_merge_private_bfd_data): Allow iWMMXt object files to
3760 be linked with XScale ones.
3761 (elf32_arm_section_flags): New function: Set flags on note section.
3762 (elf32_arm_final_write_processing): Handle note section.
3763
3764 2003-03-21 DJ Delorie <dj@redhat.com>
3765
3766 * elf32-xstormy16.c (elf32_xstormy16_relocate_section): Call
3767 _bfd_elf_rela_local_sym.
3768
3769 2003-03-20 H.J. Lu <hjl@gnu.org>
3770
3771 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't try relax for
3772 non-ELF outputs.
3773
3774 2003-03-20 Nick Clifton <nickc@redhat.com>
3775
3776 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Initialise $idata2 and
3777 $idata5 in case bfd_coff_final_link is not called.
3778
3779 2003-03-19 Jakub Jelinek <jakub@redhat.com>
3780
3781 * elf64-sparc.c (struct sparc64_elf_section_data): Add reloc_count
3782 field.
3783 (canon_reloc_count): Define.
3784 (sparc64_elf_slurp_one_reloc_table, sparc64_elf_slurp_reloc_table,
3785 sparc64_elf_canonicalize_dynamic_reloc): Use it instead of
3786 reloc_count.
3787 (sparc64_elf_canonicalize_reloc): New routine.
3788 (bfd_elf64_canonicalize_reloc): Define.
3789
3790 2003-03-18 Jakub Jelinek <jakub@redhat.com>
3791
3792 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle relaxation
3793 againt mergeable sections. Take r_addend into account when caching
3794 trampolines.
3795
3796 2003-03-18 Richard Henderson <rth@redhat.com>
3797
3798 * elfxx-ia64.c (get_dyn_sym_info): Return NULL gracefully for
3799 local symbols that have no dyninfo.
3800
3801 2003-03-14 Gene Smith <gene.smith@siemens.com>
3802
3803 * ieee.c (ieee_write_expression): Handle the case where symbol is
3804 NULL.
3805 General formatting improvements.
3806
3807 2003-03-13 Nick Clifton <nickc@redhat.com>
3808
3809 * configure.in (LINGUAS): Add zh_CN.
3810 * configure: Regenerate.
3811 * po/zh_CN.po: New file.
3812
3813 2003-03-13 Elias Athanasopoulos <elathan@phys.uoa.gr>
3814
3815 * aout-cris.c (BYTES_IN_WORD): Don't define.
3816 aout-encap.c: Likewise.
3817 aout-ns32k.c: Likewise.
3818 aout-tic30.c: Likewise.
3819 hp300bsd.c: Likewise.
3820 i386aout.c: Likewise.
3821 i386dynix.c: Likewise.
3822 i386linux.c: Likewise.
3823 i386lynx.c: Likewise.
3824 i386mach3.c: Likewise.
3825 m68k4knetbsd.c: Likewise.
3826 m68klinux.c: Likewise.
3827 m68klynx.c: Likewise.
3828 m68knetbsd.c: Likewise.
3829 m88kmach3.c: Likewise.
3830 mipsbsd.c: Likewise.
3831 newsos3.c: Likewise.
3832 sparclinux.c: Likewise.
3833 sparclynx.c: Likewise.
3834 sparcnetbsd.c: Likewise.
3835 vaxbsd.c: Likewise. Fix comment formatting.
3836
3837 2003-03-12 Alexandre Oliva <aoliva@redhat.com>
3838
3839 * Reverted 2003-03-02's patch.
3840
3841 * elfxx-target.h (bfd_elfNN_canonicalize_reloc): Make it
3842 overridable.
3843 * elf64-mips.c (mips_elf64_canonicalize_reloc,
3844 mips_elf64_get_dynamic_reloc_upper_bound,
3845 mips_elf64_canonicalize_dynamic_reloc): New, adapted from elf.c.
3846 (bfd_elf64_get_canonicalize_reloc,
3847 bfd_elf64_get_dynamic_reloc_upper_bound,
3848 bfd_elf64_canonicalize_dynamic_reloc): Define.
3849 (mips_elf64_slurp_reloc_table): Support dynamic.
3850 (mips_elf64_slurp_one_reloc_table): Adjust.
3851
3852 2003-03-12 Nick Clifton <nickc@redhat.com>
3853
3854 * xsym.c (bfd_sym_fetch_type_information_table_entry): Change
3855 'index' to 'offset' in test for zero value.
3856
3857 2003-03-11 Alexandre Oliva <aoliva@redhat.com>
3858
3859 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Do not create
3860 dynamic relocations pointing to local or section symbols, use the
3861 NULL symbol instead. Document the choice to not emit an
3862 additional R_MIPS_64 relocation.
3863
3864 2003-03-11 Alan Modra <amodra@bigpond.net.au>
3865
3866 * elf32-ppc.c (ppc_elf_relocate_section): Subtract tls seg vma from
3867 zero index dynamic tls relocs generated for the GOT. Tidy code.
3868 Set "relocation" to 1 on DTPMOD32 relocs. Optimize HA adjustment.
3869 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
3870
3871 2003-03-07 Alan Modra <amodra@bigpond.net.au>
3872
3873 * elf32-ppc.c (ppc_elf_relocate_section): Don't look for a nop after
3874 a tls_get_addr call.
3875
3876 * elf32-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
3877 (ppc_elf_adjust_dynamic_symbol): For weak symbols, copy
3878 ELF_LINK_NON_GOT_REF from weakdef.
3879 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
3880 (ppc64_elf_adjust_dynamic_symbol): For weak symbols, copy
3881 ELF_LINK_NON_GOT_REF from weakdef.
3882 * elf32-i386.c (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
3883 (elf_i386_adjust_dynamic_symbol): For weak symbols, copy
3884 ELF_LINK_NON_GOT_REF from weakdef.
3885
3886 2003-03-06 Jakub Jelinek <jakub@redhat.com>
3887 Andrew Haley <aph@redhat.com>
3888
3889 * elflink.h (elf_bfd_discard_info): Don't process eh frames if
3890 output is relocateable.
3891
3892 2003-03-06 Steven Konopa <skonopa@kgo.csc.com>
3893
3894 * som.c (som_fixup_formats): Correct formats for R_AUX_UNWIND and
3895 R_COMMENT.
3896
3897 2003-03-06 Alan Modra <amodra@bigpond.net.au>
3898
3899 * elf32-ppc.c (ppc_elf_create_linker_section): Don't capitalize
3900 error messages.
3901 (ELIMINATE_COPY_RELOCS): Define to zero.
3902 (ppc_elf_relocate_section): Don't deref htab->tls_sec when calculating
3903 TLSLD relocs. Report reloc types on a number of errors. Optimize
3904 LOCAL24PC check for non-local syms. Don't capitalize error messages.
3905 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define to zero.
3906 (ppc64_elf_relocate_section): Don't deref htab->tls_sec when
3907 calculating TLSLD relocs. Report reloc types on a number of errors.
3908 Don't capitalize error messages.
3909
3910 2003-03-03 H.J. Lu <hjl@gnu.org>
3911
3912 * elfxx-ia64.c (USE_BRL): Removed.
3913 (oor_ip): Removed.
3914
3915 2003-03-03 J"orn Rennecke <joern.rennecke@superh.com>
3916
3917 * elf32-sh.c (sh_elf_howto_tab): Make R_SH_IND12W into an ordinary
3918 relocation (no special function), and make it non-partial_inplace.
3919 (sh_elf_relax_section): When creating a bsr, use a consistent value
3920 no matter if the symbol is extern or not; set addend to -4.
3921 Don't swap load / non-load instructions for SH4.
3922 (sh_elf_relax_delete_bytes): In R_SH_IND12W case, check the offset
3923 rather than if the symbol is external to determine if adjusting the
3924 offset makes sense. Adjust the addend too if appropriate.
3925 (sh_elf_relocate_section): In R_SH_IND12W, don't fiddle with the
3926 relocation.
3927
3928 2003-03-03 Nick Clifton <nickc@redhat.com>
3929
3930 * po/da.po: Installed latest translation.
3931
3932 2003-03-02 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3933
3934 * elf32-mips.c (elf_mips_howto_table_rel): Change definition of
3935 R_MIPS_PC16 to rightshift 2.
3936 (elf_reloc_map mips_reloc_map): Map to rightshifted BFD reloc.
3937 (bfd_elf32_bfd_reloc_type_lookup): Support
3938 BFD_RELOC_MIPSEMB_16_PCREL_S2.
3939 * elf64-mips.c (mips_elf64_howto_table_rel): Change definition of
3940 R_MIPS_PC16 to rightshift 2.
3941 (mips_elf64_howto_table_rela): Likewise.
3942 (mips_reloc_map): Map to rightshifted BFD reloc.
3943 * elfn32-mips.c: The same as in elf64-mips.c.
3944 * elfxx-mips.c (mips_elf_got_for_ibfd): Typo in comment.
3945 (mips_elf_calculate_relocation): Handle rightshifted addends for
3946 R_MIPS_PC16.
3947 * reloc.c (BFD_RELOC_MIPSEMB_16_PCREL_S2): New BFD relocation for
3948 MIPS Embedded PIC. Remove superfluous empty COMMENT.
3949 * libbfd.h: Regenerate.
3950 * bfd-in2.h: Regenerate.
3951
3952 2003-02-28 Richard Henderson <rth@redhat.com>
3953
3954 * elfxx-ia64.c (elfNN_ia64_relax_section): Correct bounds
3955 for ltoff22x relaxation.
3956
3957 2003-03-01 Alan Modra <amodra@bigpond.net.au>
3958
3959 * bfd-in.h (_bfd): Don't define.
3960 * bfd.c: Rename occurrences of "struct _bfd" to "struct bfd".
3961 * syms.c: Likewise.
3962 * bfd-in2.h: Regenerate.
3963
3964 2003-02-27 Richard Henderson <rth@redhat.com>
3965
3966 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add want_gotx;
3967 (elfNN_ia64_check_relocs): Set it.
3968 (allocate_global_data_got): Check it.
3969 (allocate_local_got): Likewise.
3970 (allocate_dynrel_entries): Likewise.
3971 (elfNN_ia64_relax_ldxmov): New.
3972 (elfNN_ia64_relax_section): Handle LTOFF22X, LDXMOV.
3973 (elfNN_ia64_choose_gp): Split out from ...
3974 (elfNN_ia64_final_link): ... here.
3975
3976 2003-02-27 Andrew Cagney <cagney@redhat.com>
3977
3978 * bfd.c (struct bfd): Rename "struct _bfd".
3979 * bfd-in.h: Update copyright.
3980 (struct bfd): Rename "struct _bfd".
3981 (_bfd): Define for backward compatibility.
3982 * bfd-in2.h: Regenerate.
3983
3984 2003-02-25 Alan Modra <amodra@bigpond.net.au>
3985
3986 * elflink.h (elf_bfd_final_link): Apportion reloc counts to rel_hdr
3987 and rel_hdr2 when initially counting input relocs rather than after
3988 creating output reloc sections.
3989 (elf_link_read_relocs_from_section): Don't abort with wrong reloc
3990 sizes.
3991
3992 * Makefile.am: Run "make dep-am".
3993 * Makefile.in: Regenerate.
3994
3995 2003-02-24 Kris Warkentin <kewarken@qnx.com>
3996
3997 * elf.c (elfcore_read_notes): Add check for QNX style core file.
3998 (elfcore_grog_nto_note): New function.
3999 (elfcore_grog_nto_gregs): New function.
4000 (elfcore_grog_nto_status): New function.
4001
4002 2003-02-24 Alan Modra <amodra@bigpond.net.au>
4003
4004 * elflink.c (_bfd_elf_create_got_section): Check existing .got
4005 section flags before concluding that we've already been called.
4006 Don't use register keyword.
4007 (_bfd_elf_create_dynamic_sections): Don't use register keyword.
4008 (_bfd_elf_create_linker_section): Formatting.
4009
4010 2003-02-20 jmc <jmc@prioris.mini.pw.edu.pl>
4011
4012 * coff-h8300.c: Fix typo: intial -> initial.
4013 * coff-ppc.c: Likewise.
4014
4015 2003-02-20 Alan Modra <amodra@bigpond.net.au>
4016
4017 * elf32-ppc.c: Formatting.
4018 (allocate_dynrelocs): LD and GD relocs against the same sym need
4019 separate GOT entries.
4020 (ppc_elf_relocate_section): Correct GOT handling for multiple GOT
4021 entries per symbol.
4022
4023 2003-02-19 Alan Modra <amodra@bigpond.net.au>
4024
4025 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Simplify dynamic reloc
4026 removal. Localize vars. Remove unnecessary dynobj test.
4027 * elf32-i386 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead
4028 of INFO.
4029 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
4030 and optimize.
4031 (elf_i386_relocate_section): Likewise.
4032 (elf_i386_gc_sweep_hook): Simplify dyn reloc removal. Localize vars.
4033 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
4034 * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
4035 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
4036 * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
4037 * elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise. Remove
4038 local_dynrel for section too. Don't touch HIPLT22, LOPLT10, PCPLT32
4039 or PCPLT10 relocs. Don't subtract twice on PLT32 relocs.
4040 Formatting.
4041
4042 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define.
4043 (ppc64_elf_check_relocs): Use it. Correct comment. Move SEC_ALLOC
4044 test.
4045 (ppc64_elf_adjust_dynamic_symbol): Use ELIMINATE_COPY_RELOCS.
4046 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
4047 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
4048 and optimize. Use ELIMINATE_COPY_RELOCS.
4049 (ppc64_elf_relocate_section): Likewise.
4050
4051 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Add pc_count field.
4052 (ppc_elf_copy_indirect_symbol): Copy pc_count field.
4053 (ELIMINATE_COPY_RELOCS): Define.
4054 (ppc_elf_adjust_dynamic_symbol): Convert copy relocs to dynamic.
4055 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
4056 (MUST_BE_DYN_RELOC): Define.
4057 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
4058 and optimize. Trim dyn_relocs.
4059 (ppc_elf_check_relocs): Don't generate dyn_relocs when we know they'll
4060 not be used. Do generate dyn_relocs for copy reloc avoidance. Keep
4061 track of pc_rel dyn relocs.
4062 (ppc_elf_relocate_section): Remove "will_become_local". Adjust
4063 WILL_CALL_FINISH_DYNAMIC_SYMBOL use. Trim dyn relocs as per
4064 allocate_dynrelocs. Don't recalculate "sec".
4065
4066 2003-02-18 Alan Modra <amodra@bigpond.net.au>
4067
4068 * elf32-ppc.c (ppc_elf_relocate_section): Remove unnecessary test.
4069 * elf64-ppc.c (ppc64_elf_tls_optimize): Decrement tlsld_got.refcount
4070 on invalid LD relocs.
4071 (allocate_dynrelocs): Invalid LD relocs don't use tlsld_got entry.
4072 (ppc64_elf_relocate_section): Unify new handling of LD relocs and
4073 tlsld_got entry. Use IS_PPC64_TLS_RELOC.
4074
4075 * elf32-ppc.h: New file.
4076 * elf32-ppc.c: Include elf32-ppc.h.
4077 (NOP, CROR_151515, CROR_313131, TP_OFFSET, DTP_OFFSET): Define.
4078 (struct ppc_elf_link_hash_entry): Rename "root" to "elf". Adjust uses.
4079 Add "tls_mask" field.
4080 (TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL, TLS_TLS, TLS_TPRELGD): Define.
4081 (struct ppc_elf_link_hash_table): Rename "root" to "elf". Adjust uses.
4082 Add got, relgot, plt, relplt, dynbss, relbss, dynsbss, relsbss,
4083 sdata, sdata2, tls_sec, tls_get_addr, tlsld_got fields.
4084 Make use of htab shortcuts throughout file.
4085 (ppc_elf_link_hash_newfunc): Init tls_mask field.
4086 (ppc_elf_link_hash_table_create): Init new fields.
4087 (ppc_elf_copy_indirect_symbol): Copy tls_mask.
4088 (ppc_elf_howto_raw): Add tls relocs.
4089 (ppc_elf_reloc_type_lookup): Handle them.
4090 (ppc_elf_unhandled_reloc): New function.
4091 (ppc_elf_create_got): Stash got section pointer in hash table,
4092 return status. Make .rela.got too.
4093 (ppc_elf_create_dynamic_sections): Stash section pointers in htab.
4094 (ppc_elf_adjust_dynamic_symbol): Only set up copy relocs when
4095 NON_GOT_REF set. Don't allocate space in .plt here..
4096 (allocate_dynrelocs): ..do so here instead, properly ref-counting and
4097 not allocating plt entries unnecessarily. Allocate got entries here.
4098 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
4099 (ppc_elf_size_dynamic_sections): Allocate local got entries. Pass
4100 "info" during allocate_dynrelocs hash traversal. Use htab section
4101 shortcuts rather than searching for named sections. Get rid of
4102 "plt" and "strip" booleans.
4103 (update_local_sym_info, bad_shared_reloc): New functions.
4104 (ppc_elf_check_relocs): Handle TLS relocs. Move .rela.got creation to
4105 ppc_elf_create_got. Don't mark got or plt reloc syms dynamic, do so
4106 in allocate_dynreloc. Use update_local_sym_info and bad_shared_reloc.
4107 Disallow R_PPC_EMB_RELSDA, R_PPC_EMB_NADDR32, R_PPC_EMB_NADDR16,
4108 R_PPC_EMB_NADDR16_LO, R_PPC_EMB_NADDR16_HI and R_PPC_EMB_NADDR16_HA
4109 in shared libs. R_PPC_PLTREL32 is a plt reloc too. Refcount all
4110 relocs that might use a plt entry. Set NON_GOT_REF too.
4111 Enumerate all do-nothing relocs.
4112 (ppc_elf_gc_sweep_hook): Simplify removal of dynrelocs. Handle
4113 tls relocs and all plt relocs.
4114 (ppc_elf_tls_setup, ppc_elf_tls_optimize): New functions.
4115 (ppc_elf_finish_dynamic_symbol): Don't build got entries here.
4116 (ppc_elf_finish_dynamic_sections): Rewrite tag code using htab
4117 shortcuts.
4118 (ppc_elf_relocate_section): Tidy. Handle TLS relocs. Use
4119 bfd_elf_local_sym_name. Simplify unresolved reloc code. Build got
4120 entries and got relocs here. Warn on non-zero got reloc addend.
4121 Split out branch taken/not taken reloc code into a separate switch
4122 and correct offset calculation. Allow BRTAKEN/BRNTAKEN dynamic relocs.
4123 Split out HA reloc adjustments to separate switch statement. Don't
4124 warn on reloc overflow if we've already warned about undefined.
4125 Don't rebuild sym name when reporting errors. Report all possible
4126 errors from _bfd_final_link_relocate.
4127 (bfd_elf32_bfd_final_link): Don't define.
4128
4129 2003-02-18 Alan Modra <amodra@bigpond.net.au>
4130
4131 * elf64-ppc.c (ppc64_elf_relocate_section): Don't init "r". Don't
4132 rebuild sym name when reporting errors.
4133
4134 2003-02-17 Nick Clifton <nickc@redhat.com>
4135
4136 * elflink.h (elf_link_output_extsym): Only check
4137 allow_shlib_undefined for shared libraries.
4138 * elf32-i386.c (elf_i386_relocate_section): Remove bogus check
4139 of allow_shlib_undefined.
4140 * elf32-cris.c (cris_elf_relocate_section): Likewise.
4141 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
4142 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
4143 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
4144 * elf32-s390.c (elf_s390_relocate_section): Likewise.
4145 * elf32-sh.c (sh_elf_relocate_section): Likewise.
4146 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
4147 * elf32-vax.c (elf_vax_relocate_section): Likewise.
4148 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
4149 * elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
4150 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
4151 * elf64-s390.c (elf_s390_relocate_section): Likewise.
4152 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
4153 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
4154 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
4155 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
4156
4157 2003-02-17 Nick Clifton <nickc@redhat.com>
4158
4159 * elf.c (SEGMENT_AFTER_SEGMENT): Add third parameter - the
4160 address field to use in the comparison.
4161 (SEGMENT_OVERLAPS): Check that LMAs overlap as well.
4162
4163 2003-02-14 Bob Wilson <bob.wilson@acm.org>
4164
4165 * elfcore.h (elf_core_file_p): Compare alternate machine codes for ELF
4166 backends when checking if the generic ELF target should be used.
4167
4168 * syms.c (_bfd_stab_section_find_nearest_line): For line number stabs
4169 outside of functions, treat values as absolute addresses.
4170
4171 * bfd.c: Change embedded documentation to use consistent indentation
4172 and to split up long lines. Change informal style of description
4173 for functions lacking real documentation.
4174 * coffcode.h: Break up long lines in embedded documentation.
4175 * format.c: Likewise.
4176 * targets.c: Likewise.
4177 * libcoff.h: Regenerate.
4178 * bfd-in2.h: Regenerate.
4179
4180 2003-02-14 Alan Modra <amodra@bigpond.net.au>
4181
4182 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Init tls_get_addr.
4183 (ppc64_elf_copy_indirect_symbol): Merge tls_mask too.
4184 (ppc64_elf_gc_sweep_hook): Simplify removal of dyn_relocs.
4185 (allocate_dynrelocs): Don't treat undefined and undefweak specially.
4186 (ppc_size_one_stub): Fix warning, and tighten plt entry check.
4187 (group_sections): Don't share a stub section if stubs are for a large
4188 section. Adjust comment.
4189 (ppc64_elf_size_stubs): Roughly double the size left for stubs if
4190 !stubs_always_before_branch.
4191 (ppc64_elf_relocate_section): Initialize tlsld GOT entry once. Don't
4192 treat undefined and undefweak specially when processing dyn relocs.
4193
4194 2003-02-13 Jakub Jelinek <jakub@redhat.com>
4195
4196 * elflink.h (elf_link_add_object_symbols): Handle .symver x, x@FOO.
4197
4198 2003-02-13 Nick Clifton <nickc@redhat.com>
4199
4200 * elf32-arm.h (elf32_thumb_to_arm_stub): Include section VMAs
4201 in computation of offset to insert into BL instruction.
4202
4203 2003-02-11 Uwe Stieber <uwe@wwws.de>
4204
4205 * config.bfd: Add support for kaOS as cross build target system.
4206
4207 2003-02-11 Alan Modra <amodra@bigpond.net.au>
4208
4209 * elf64-ppc.c (ppc64_elf_check_relocs): Match versioned
4210 .__tls_get_addr too.
4211 (ppc64_elf_tls_setup): Ensure cached tls_get_addr is not indirect.
4212
4213 2003-02-10 Kaz kojima <kkojima@rr.iij4u.or.jp>
4214
4215 * elf32-sh.c (elf_sh_dyn_relocs): Add tls_tpoff32 field.
4216 (elf_sh_link_hash_entry): Remove tls_tpoff32 field.
4217 (sh_elf_link_hash_newfunc): Remove the initialization of
4218 tls_tpoff32 field.
4219 (allocate_dynrelocs): Keep dyn_relocs if it includes the entry
4220 for which tls_tpoff32 flag is set.
4221 (sh_elf_relocate_section): Covert to LE only if the dyn_relocs
4222 of the symbol includes the entry matched with the input_section
4223 and having tls_tpoff32 flag on. When linking statically, set
4224 symbol index of R_SH_TLS_TPOFF32 relocation to zero if the symbol
4225 is defined in this executable.
4226 (sh_elf_check_relocs): Set tls_tpoff32 flag appropriately.
4227
4228 2003-02-10 Jakub Jelinek <jakub@redhat.com>
4229
4230 * elf32-s390.c (elf_s390_size_dynamic_sections): Set relocs to TRUE
4231 even if there is just non-empty .rela.plt.
4232
4233 2003-02-10 Nick Clifton <nickc@redhat.com>
4234
4235 * archures.c (bfd_mach_arm_ep9312): Define.
4236 * bfd-in2.h: Regenerate.
4237 * cpu-arm.c (processors[]): Add ep9312.
4238 (bfd_arm_arch): Add ep9312.
4239 * elf32-arm.h (elf32_arm_merge_private_data): Update error
4240 messages and add test for Maverick floating point support.
4241 (elf32_arm_print_private_bfd_data): Handle
4242 EF_ARM_MAVERICK_FLOAT flag.
4243 (elf32_arm_object_p): New function.
4244 (elf_backend_object_p): Define.
4245
4246 2003-02-10 Alan Modra <amodra@bigpond.net.au>
4247
4248 * elf64-ppc.c: Rename assorted occurrences of tls_type and similar
4249 variables, structure fields or function params to tls_mask or
4250 similar to better reflect usage.
4251 (struct got_entry): Comment.
4252 (struct ppc_link_hash_entry): Expand comment, and renumber TLS_*.
4253 (get_tls_mask): Rename from get_tls_type.
4254
4255 2003-02-09 Alan Modra <amodra@bigpond.net.au>
4256
4257 * elf64-ppc.c (TLS_GD_LD): Don't define..
4258 (TLS_GD): ..define this instead and update all uses.
4259 (TLS_TPRELGD): Define.
4260 (ppc64_elf_link_hash_table_create): Tweak initialization of
4261 init_refcount and init_offset.
4262 (ppc64_elf_check_relocs): Add one extra element to t_symndx array.
4263 Mark second slot of GD or LD toc entries.
4264 (get_tls_type): Return an int. Distinguish toc GD and LD entries
4265 from other tls types.
4266 (ppc64_elf_tls_setup): New function, split out from..
4267 (ppc64_elf_tls_optimize): ..here. Don't optimize when symbols are
4268 defined in a dynamic object. Fix LD optimization. Don't set TLS_TPREL
4269 on GD->IE optimization, use TLS_TPRELGD instead. Use get_tls_type
4270 return value to properly decide whether toc GD and LD entries can
4271 optimize away __tls_get_addr call. Check next reloc after DTPMOD64
4272 to determine GD or LD rather than looking at TLS_LD flag. Don't
4273 attempt to adjust got entry tls_type here..
4274 (allocate_dynrelocs): ..instead, adjust got entry tls_type here, and
4275 look for possible merges.
4276 (ppc64_elf_size_dynamic_sections): Adjust local got entries for
4277 optimization.
4278 (ppc64_elf_size_stubs): Tweak __tls_get_addr fudge.
4279 (ppc64_elf_relocate_section): Rename some vars to better reflect usage.
4280 Make use of return value from get_tls_type to properly detect GD and
4281 LD optimizations. Split tlsld/gd hi/ha from lo/ds case. Don't
4282 handle tls_get_addr removal when looking at REL24 relocs, do it when
4283 looking at the previous reloc. Check reloc after DTPMOD64 to determine
4284 GD or LD.
4285 * elf64-ppc.h (ppc64_elf_tls_setup): Declare.
4286
4287 2003-02-08 Alan Modra <amodra@bigpond.net.au>
4288
4289 * elf32-hppa.c (group_sections): Don't share a stub section if
4290 stubs are for a large section.
4291
4292 * elf32-hppa.c (elf32_hppa_size_stubs): Double the size left for
4293 stubs if !stubs_always_before_branch.
4294
4295 2003-02-07 Nick Clifton <nickc@redhat.com>
4296
4297 * elf.c (swap_out_syms): Generate an error message if an
4298 equivalent output section cannot be found for a symbol.
4299
4300 2003-02-07 Jakub Jelinek <jakub@redhat.com>
4301
4302 * elf64-alpha.c (elf64_alpha_relax_section): Don't crash if
4303 local_got_entries is NULL.
4304
4305 2003-02-06 Andreas Schwab <schwab@suse.de>
4306
4307 * elf-eh-frame.c (get_DW_EH_PE_signed): Define.
4308 (read_value): Add parameter is_signed, use signed extraction if
4309 the value is signed.
4310 (_bfd_elf_write_section_eh_frame): Pass signed flag of the
4311 encoding to read_value.
4312
4313 2003-02-06 Alan Modra <amodra@bigpond.net.au>
4314
4315 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy got and
4316 plt info when called to transfer weak sym info.
4317
4318 2003-02-05 Alan Modra <amodra@bigpond.net.au>
4319
4320 * reloc.c: Add PPC and PPC64 TLS relocs.
4321 * libbfd.h: Regenerate.
4322 * bfd-in2.h: Regenerate.
4323 * elf64-ppc.c (TP_OFFSET, DTP_OFFSET): Declare.
4324 (ppc64_elf_howto_raw): Add TLS howto's. Adjust R_PPC64_NONE to be
4325 against a 32 bit field.
4326 (ppc64_elf_reloc_type_lookup): Handle TLS relocs.
4327 (_ppc64_elf_section_data): Add t_symndx and comments.
4328 (ppc64_elf_section_data): Use elf_section_data macro.
4329 (ppc64_elf_new_section_hook): American spelling.
4330 (struct got_entry, struct plt_entry): New.
4331 (MUST_BE_DYN_RELOC): Rename from IS_ABSOLUTE_RELOC.
4332 (struct ppc_stub_hash_entry): Add "addend" field.
4333 (struct ppc_link_hash_entry): Add "tls_type".
4334 (TLS_TLS, TLS_GD_LD, TLS_LD, TLS_TPREL, TLS_DTPREL,
4335 TLS_EXPLICIT): Define.
4336 (struct ppc_link_hash_table): Add tls_sec, tls_get_addr, tlsld_got.
4337 (link_hash_newfunc): Init new fields.
4338 (ppc64_elf_link_hash_table_create): Likewise. Set init_refcount and
4339 init_offset to NULL.
4340 (ppc64_elf_copy_indirect_symbol): Copy got and plt info. Don't call
4341 _bfd_elf_link_hash_copy_indirect, rather insert relevant code from
4342 there.
4343 (update_local_sym_info, update_plt_info): New functions.
4344 (ppc64_elf_check_relocs): Use them. Handle TLS relocs. Adjust GOT
4345 handling to use got.glist rather than got.refcount. Likewise for PLT.
4346 (ppc64_elf_gc_sweep_hook): Handle TLS relocs, new GOT and PLT lists.
4347 (func_desc_adjust): Adjust for new PLT list.
4348 (ppc64_elf_adjust_dynamic_symbol): Likewise.
4349 (get_sym_h, get_tls_type): New functions.
4350 (ppc64_elf_edit_opd): Remove unused variable. Use get_sym_h.
4351 (ppc64_elf_tls_optimize): New function.
4352 (allocate_dynrelocs): Adjust for new PLT and GOT lists. Allocate
4353 TLS relocs.
4354 (ppc64_elf_size_dynamic_sections): Likewise.
4355 (ppc_type_of_stub): Adjust for new PLT list.
4356 (ppc_build_one_stub): Likewise.
4357 (ppc64_elf_size_stubs): Likewise. Use get_sym_h. Treat __tls_get_addr
4358 calls specially.
4359 (ppc64_elf_relocate_section): Adjust for new GOT and PLT lists. Handle
4360 TLS relocs. Report local syms using bfd_elf_local_sym_name. Don't
4361 init GOT entries that have a reloc. Generate GOT relocs here..
4362 (ppc64_elf_finish_dynamic_symbol): ..not here. Adjust for PLT list.
4363 * elf64-ppc.h (ppc64_elf_tls_optimize): Declare.
4364
4365 2003-02-04 Andreas Schwab <schwab@suse.de>
4366
4367 * elf32-m68k.c (elf_m68k_hash_entry): Define.
4368 (elf_m68k_link_hash_traverse): Remove.
4369 (elf_m68k_link_hash_newfunc): Use struct bfd_hash_entry and
4370 elf_m68k_hash_entry instead of struct elf_m68k_link_hash_entry to
4371 reduce casting.
4372 (elf_m68k_check_relocs): Use elf_m68k_hash_entry instead of
4373 casting.
4374 (elf_m68k_size_dynamic_sections): Use elf_link_hash_traverse
4375 instead of elf_m68k_link_hash_traverse.
4376 (elf_m68k_discard_copies): Change first parameter to pointer to
4377 struct elf_link_hash_entry and use elf_m68k_hash_entry when struct
4378 elf_m68k_link_hash_entry is needed.
4379
4380 2003-02-04 Alan Modra <amodra@bigpond.net.au>
4381
4382 * elf-bfd.h (struct got_entry, struct plt_entry): Forward declare.
4383 (struct elf_link_hash_entry): Add "glist" and "plist" fields to
4384 "got" union, and declare as gotplt_union. Use gotplt_uinion for
4385 "plt" field.
4386 (struct elf_link_hash_table): Make "init_refcount" a gotplt_union.
4387 Add "init_offset" field.
4388 (struct elf_obj_tdata <local_got>): Add "struct got_entry **" to union.
4389 (elf_local_got_ents): Declare.
4390 * elf.c (_bfd_elf_link_hash_newfunc): Adjust initialization of "got"
4391 and "plt".
4392 (_bfd_elf_link_hash_hide_symbol): Use "init_offset".
4393 (_bfd_elf_link_hash_table_init): Set "init_offset".
4394 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set init_refcount
4395 from init_offset.
4396 (elf_adjust_dynamic_symbol): Set plt and got offsets using init_offset.
4397
4398 * elf.c (bfd_elf_local_sym_name): Split out from..
4399 (group_signature): ..here.
4400 * elf-bfd.h (bfd_elf_local_sym_name): Declare.
4401
4402 2003-02-04 Alan Modra <amodra@bigpond.net.au>
4403
4404 * elf-bfd.h (enum elf_link_info_type): Remove.
4405 (struct bfd_elf_section_data): Move sec_info_type, use_rela_p fields
4406 to struct sec. Remove linkonce_p field.
4407 (elf_linkonce_p): Delete.
4408 (elf_discarded_section): Update for sec_info_type change.
4409 * section.c (struct sec): Add sec_info_type, use_rela_p, has_tls_reloc,
4410 flag11, flag12, flag13, flag14, flag15, flag16, flag20, flag24.
4411 (ELF_INFO_TYPE_NONE): Define.
4412 (ELF_INFO_TYPE_STABS): Define.
4413 (ELF_INFO_TYPE_MERGE): Define.
4414 (ELF_INFO_TYPE_EH_FRAME): Define.
4415 (ELF_INFO_TYPE_JUST_SYMS): Define.
4416 (STD_SECTION): Update struct sec initializer.
4417 * ecoff.c (bfd_debug_section): Likewise.
4418 * elf.c: Likewise. Update occurrences of sec_info_type and use_rela_p.
4419 * elflink.h: Likewise.
4420 * elf-eh-frame.c: Likewise.
4421 * elf64-alpha.c: Likewise.
4422 * elfxx-ia64.c: Likewise.
4423 * elfxx-mips.c: Likewise.
4424 * bfd-in2.h: Regenerate.
4425
4426 * elf32-sparc.c (sec_do_relax): Use elf_section_data macro rather than
4427 referring to used_by_bfd.
4428 * elf64-sparc.c (sec_do_relax): Likewise.
4429 * elf64-mmix.c (mmix_elf_section_data): Likewise.
4430 * elfxx-mips.c (mips_elf_section_data): Likewise.
4431 * ieee.c (ieee_slurp_section_data): Use ieee_per_section macro.
4432 (ieee_get_section_contents): Likewise.
4433 (ieee_new_section_hook): Formatting.
4434 (ieee_canonicalize_reloc): Remove commented out code.
4435 * mmo.c (mmo_section_data): Define. Use throughout file.
4436 * oasys.c (oasys_get_section_contents): Use oasys_per_section macro.
4437
4438 2003-01-31 Graydon Hoare <graydon@redhat.com>
4439
4440 * Makefile.am (opncls.lo): Add dependency upon libiberty.h.
4441 * Makefile.in: Regenerate.
4442 * opncls.c (calc_crc32, get_debug_link_info,
4443 seperate_debug_file_exists, find_seperate_debug_file): New
4444 internal functions.
4445 (bfd_follow_gnu_debuglink): New function. Follow the pointer
4446 contained inside a .gnu_debuglink section.
4447 * bfd-in2.h: Regenerate.
4448
4449 2003-01-29 Alexandre Oliva <aoliva@redhat.com>
4450
4451 * elfxx-mips.c (mips_elf_got_entry_hash): Don't dereference
4452 entry->abfd when it's NULL.
4453
4454 2003-01-27 Alexandre Oliva <aoliva@redhat.com>
4455
4456 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Handle
4457 _bfd_elf_section_offset returning -2 the same way as -1.
4458
4459 * elfxx-mips.c (mips_elf_multi_got): New function.
4460 (struct mips_got_entry): Make symndx and gotidx signed. Moved
4461 addend into union along with address and link hash entry.
4462 (struct mips_got_info): Added bfd2got and next.
4463 (struct mips_elf_hash_sort_data): Added max_unref_got_dynindx.
4464 (mips_elf_got_section, mips_elf_create_got_section): Use
4465 SEC_EXCLUDE bit to tell whether we really need the got
4466 section. Take boolean arguments to disregard an excluded
4467 section, or to create it as excluded. Adjust all callers.
4468 Use mips_elf_got_section all over.
4469 (mips_elf_local_got_index, mips_elf_got_page,
4470 mips_elf_got16_entry): Take input bfd as argument, and pass it
4471 on to mips_elf_create_local_got_entry.
4472 (mips_elf_global_got_index, mips_elf_create_local_got_entry):
4473 Take input bfd as argument, and manage entries in the
4474 appropriate GOT.
4475 (mips_elf_got_offset_from_index): Take input bfd as argument,
4476 and use it to adjust the GP offset of the bfd.
4477 (mips_elf_sort_hash_table, mips_elf_sort_hash_table_f): Move
4478 unreferenced GOT entries of global symbols to the end.
4479 (mips_elf_record_global_got_symbol): Take input bfd as
4480 argument. Add entries to the master GOT hash table.
4481 (struct mips_elf_bfd2got_hash): New.
4482 (struct mips_elf_got_per_bfd_arg): New.
4483 (struct mips_elf_set_global_got_offset_arg): New.
4484 (mips_elf_hash_bfd_vma, mips_elf_multi_got_entry_hash,
4485 mips_elf_multi_got_entry_eq, mips_elf_bfd2got_entry_hash,
4486 mips_elf_bfd2got_entry_eq, mips_elf_make_got_per_bfd,
4487 mips_elf_merge_gots, mips_elf_set_global_got_offset,
4488 mips_elf_resolve_final_got_entry,
4489 mips_elf_resolve_final_got_entries, mips_elf_adjust_gp,
4490 mips_elf_got_for_ibfd): New functions.
4491 (ELF_MIPS_GP_OFFSET): Don't depend on SGI_COMPAT.
4492 (MIPS_ELF_GOT_MAX_SIZE): New macro.
4493 (STUB_LW): Generate 64-bit stub regardless of SGI_COMPAT.
4494 (mips_elf_got_entry_hash): Take new fields into account. Use
4495 mips_elf_hash_bfd_vma.
4496 (mips_elf_got_entry_eq): Take new fields into account.
4497 (mips_elf_create_got_section): Initialize new fields.
4498 (mips_elf_calculate_relocation): Pass input_bfd to functions
4499 that now take it. Adjust gp for the input_bfd.
4500 (mips_elf_allocate_dynamic_relocation,
4501 mips_elf_create_dynamic_relocation,
4502 _bfd_mips_elf_create_dynamic_sections): Use...
4503 (mips_elf_rel_dyn_section): New function. Borrow code from...
4504 (_bfd_mips_elf_check_relocs): Pass input_bfd to functions that
4505 now take it. Create the got section if needed, even if
4506 excluded, before recording a global got symbol. Move some
4507 code to...
4508 (mips_elf_record_local_got_symbol): New fn.
4509 (_bfd_mips_elf_size_dynamic_sections): Disable combreloc.
4510 Compute multi-got global entries offsets. Move GOT code to...
4511 (_bfd_mips_elf_always_size_sections): Call mips_elf_multi_got
4512 if the GOT is too big.
4513 (_bfd_mips_elf_finish_dynamic_symbol): Set got entry of
4514 undefweak symbol to zero. Generate dynamic relocations for
4515 non-primary GOT entries for global symbols.
4516 (_bfd_mips_elf_finish_dynamic_sections): Handle multi-got
4517 case. Generate dynamic relocations for local got entries.
4518 Sort dynamic relocations on N64 too, using...
4519 (sort_dynamic_relocs_64): New fns.
4520 (_bfd_mips_elf_hide_symbol): Adjust multi-got counters.
4521 (_bfd_mips_elf_merge_private_bfd_data): Ignore EF_MIPS_XGOT.
4522
4523 2003-01-27 Alexandre Oliva <aoliva@redhat.com>
4524
4525 * bfd.c (struct _bfd): Added id field.
4526 * opncls.c (_bfd_id_counter): New static variable.
4527 (_bfd_new_bfd): Use it.
4528 * bfd-in2.h: Rebuilt.
4529
4530 2003-01-25 Alan Modra <amodra@bigpond.net.au>
4531
4532 * elf32-sparc.c (bfd_elf32_new_section_hook): Define.
4533
4534 2003-01-25 Jakub Jelinek <jakub@redhat.com>
4535
4536 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Add TLS relocs.
4537 (elf32_sparc_rev32_howto): New variable.
4538 (sparc_reloc_map): Add TLS relocs.
4539 (elf32_sparc_reloc_type_lookup, elf32_sparc_info_to_howto):
4540 Handle REV32.
4541 (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc, elf32_sparc_mkobject):
4542 New functions.
4543 (struct elf32_sparc_dyn_relocs, struct elf32_sparc_link_hash_entry,
4544 struct elf32_sparc_link_hash_table):
4545 New structures.
4546 (elf32_sparc_tdata, elf32_sparc_local_got_tls_type,
4547 elf32_sparc_hash_table): Define.
4548 (link_hash_newfunc, elf32_sparc_link_hash_table_create,
4549 create_got_section, elf32_sparc_create_dynamic_sections,
4550 elf32_sparc_copy_indirect_symbol, elf32_sparc_tls_transition): New
4551 functions.
4552 (elf32_sparc_check_relocs): Handle TLS relocs. Add dynamic reloc
4553 reference counting.
4554 (elf32_sparc_gc_sweep_hook): Likewise.
4555 (elf32_sparc_adjust_dynamic_symbol): Likewise.
4556 (elf32_sparc_size_dynamic_sections): Likewise.
4557 (elf32_sparc_relocate_section): Likewise.
4558 (allocate_dynrelocs, readonly_dynrelocs, dtpoff_base, tpoff):
4559 New functions.
4560 (elf32_sparc_object_p): Allocate backend private object data.
4561 (bfd_elf32_bfd_link_hash_table_create,
4562 elf_backend_copy_indirect_symbol, bfd_elf32_mkobject,
4563 elf_backend_can_refcount): Define.
4564 (elf_backend_create_dynamic_sections): Define to
4565 elf32_sparc_create_dynamic_sections.
4566 * reloc.c: Add SPARC TLS relocs.
4567 * bfd-in2.h, libbfd.h: Rebuilt.
4568 * elf64-sparc.c (sparc64_elf_howto_table): Add TLS relocs.
4569 (sparc_reloc_map): Likewise.
4570
4571 2003-01-24 Martin Schwidefsky <schwidefsky@de.ibm.com>
4572
4573 * bfd-in2.h: Regenerate.
4574 * elf32-s390.c (elf_s390_mkobject, elf_s390_tls_transition,
4575 s390_tls_reloc, dtpoff_base, tpoff, invalid_tls_insn): New functions.
4576 (elf_howto_table): Add TLS relocs.
4577 (elf_s390_reloc_type_lookup): Likewise.
4578 (elf_s390_link_hash_entry): Add tls_type.
4579 (elf_s390_hash_entry, elf_s390_obj_tdata, elf_s390_local_got_tls_type):
4580 New macros.
4581 (elf_s390_link_hash_table): Add tls_ldm_got.
4582 (link_hash_newfunc): Initialize tls_type.
4583 (elf_s390_link_hash_table_create): Initialize refcount of tls_ldm_got.
4584 (elf_s390_copy_indirect_symbol): Copy tls_type information.
4585 (elf_s390_check_relocs): Support TLS relocs.
4586 (elf_s390_gc_sweep_hook): Likewise.
4587 (allocate_dynrelocs): Likewise.
4588 (elf_s390_size_dynamic_sections): Likewise.
4589 (elf_s390_relocate_section): Likewise.
4590 (elf_s390_finish_dynamic_symbol): Likewise.
4591 (bfd_elf32_mkobject): Define for TLS.
4592 * elf64-s390.c: Same changes as for elf32-s390.c.
4593 * libbfd.h: Regenerate.
4594 * reloc.c: Add s390 TLS relocations.
4595
4596 2003-01-24 Charles Lepple <clepple@ghz.cc>
4597
4598 * aclocal.m4: Fix name of --enable-install-libbfd switch.
4599
4600 2003-01-23 Nick Clifton <nickc@redhat.com>
4601
4602 * Add sh2e support:
4603 2002-04-02 Elena Zannoni <ezannoni@redhat.com>
4604 * archures.c (bfd_mach_sh2e): Added.
4605 * bfd-in2.h: Rebuilt.
4606 * cpu-sh.c (arch_info_struct): Added SH2e.
4607 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle EF_SH2E.
4608
4609 2003-01-23 Alan Modra <amodra@bigpond.net.au>
4610
4611 * elf-bfd.h (struct bfd_elf_section_data): Remove tdata. Change
4612 dynindx to an int. Rearrange for better packing.
4613 * elf.c (_bfd_elf_new_section_hook): Don't alloc if already done.
4614 * elf32-mips.c (bfd_elf32_new_section_hook): Define.
4615 * elf32-sh64.h: New. Split out from include/elf/sh.h.
4616 (struct _sh64_elf_section_data): New struct.
4617 (sh64_elf_section_data): Don't dereference sh64_info (was tdata).
4618 * elf32-sh64-com.c: Include elf32-sh64.h.
4619 * elf32-sh64.c: Likewise.
4620 (sh64_elf_new_section_hook): New function.
4621 (bfd_elf32_new_section_hook): Define.
4622 (sh64_elf_fake_sections): Adjust for sh64_elf_section_data change.
4623 (sh64_bfd_elf_copy_private_section_data): Likewise.
4624 (sh64_elf_final_write_processing): Likewise.
4625 * elf32-sparc.c (struct elf32_sparc_section_data): New.
4626 (elf32_sparc_new_section_hook): New function.
4627 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
4628 (sec_do_relax): Define.
4629 (elf32_sparc_relax_section): Adjust to use sec_do_relax.
4630 (elf32_sparc_relocate_section): Likewise.
4631 * elf64-mips.c (bfd_elf64_new_section_hook): Define.
4632 * elf64-mmix.c (struct _mmix_elf_section_data): New.
4633 (mmix_elf_section_data): Define. Use throughout file.
4634 (mmix_elf_new_section_hook): New function.
4635 (bfd_elf64_new_section_hook): Define.
4636 * elf64-ppc.c (struct _ppc64_elf_section_data): New.
4637 (ppc64_elf_section_data): Define. Use throughout.
4638 (ppc64_elf_new_section_hook): New function.
4639 (bfd_elf64_new_section_hook): Define.
4640 * elf64-sparc.c (struct sparc64_elf_section_data): New.
4641 (sparc64_elf_new_section_hook): New function.
4642 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
4643 (sec_do_relax): Define.
4644 (sparc64_elf_relax_section): Adjust to use sec_do_relax.
4645 (sparc64_elf_relocate_section): Likewise.
4646 (bfd_elf64_new_section_hook): Define.
4647 * elfn32-mips.c (bfd_elf32_new_section_hook): Define.
4648 * elfxx-mips.c (struct _mips_elf_section_data): New.
4649 (mips_elf_section_data): Define. Use throughout.
4650 (_bfd_mips_elf_new_section_hook): New function.
4651 (mips_elf_create_got_section): Don't alloc used_by_bfd.
4652 * elfxx-mips.h (_bfd_mips_elf_new_section_hook): Declare.
4653 * elfxx-target.h (bfd_elfNN_new_section_hook): Add #ifndef.
4654 * Makefile.am: Run "make dep-am".
4655 * Makefile.in: Regenerate.
4656
4657 2003-01-21 Richard Henderson <rth@redhat.com>
4658
4659 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_PLT_LOC): New.
4660 (struct alpha_elf_link_hash_entry): Add plt_old_section, plt_old_value.
4661 (elf64_alpha_adjust_dynamic_symbol): Set them.
4662 (elf64_alpha_size_plt_section_1): Reset them when plt entry removed.
4663 (elf64_alpha_relax_tls_get_addr): Handle LDM relocs. Frob the
4664 symbol index when relaxing LDM to TPREL.
4665 (elf64_alpha_relax_section): Likewise. Allow relaxation of GD
4666 relocs, even if the target isn't locally defined.
4667 (elf64_alpha_check_relocs): Frob LDM reloc symndx to zero.
4668 (elf64_alpha_relocate_section): Likewise. Force TP-relative
4669 relocs vs symndx 0 to the tp base.
4670
4671 2003-01-21 Fabio Alemagna <falemagn@aros.org>
4672
4673 * config.bfd: Handle i[3456]86-*-aros*.
4674
4675 2003-01-21 Andreas Schwab <schwab@suse.de>
4676
4677 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Define.
4678 (struct ppc_elf_link_hash_entry): Define.
4679 (ppc_elf_hash_entry): New function.
4680 (struct ppc_elf_link_hash_table): Define.
4681 (ppc_elf_hash_table): New function.
4682 (ppc_elf_link_hash_newfunc): New function.
4683 (ppc_elf_link_hash_table_create): New function.
4684 (ppc_elf_copy_indirect_symbol): New function.
4685 (allocate_dynrelocs): New function.
4686 (readonly_dynrelocs): New function.
4687 (ppc_elf_size_dynamic_sections): Allocate space for dynamic
4688 relocs and determine DT_TEXTREL.
4689 (ppc_elf_check_relocs): Don't do that here, just count the
4690 dynamic relocs.
4691 (ppc_elf_gc_sweep_hook): Discard any dynamic relocs against the
4692 removed section.
4693 (bfd_elf32_bfd_link_hash_table_create): Define.
4694 (elf_backend_copy_indirect_symbol): Define.
4695
4696 2003-01-21 Richard Henderson <rth@redhat.com>
4697
4698 * elf64-alpha.c (alpha_dynamic_entries_for_reloc): GOTTPREL and
4699 TPREL also get a reloc if shared. Remove SREL support.
4700 (elf64_alpha_emit_dynrel): New.
4701 (elf64_alpha_relocate_section): Use it. Resolve dynamic TPREL
4702 and GOTTPREL relocs to local symbols against the tp base.
4703 (elf64_alpha_finish_dynamic_symbol): Use elf64_alpha_emit_dynrel.
4704
4705 * elf64-alpha.c (elf64_alpha_relax_got_load): Decrement got
4706 use count before clobbering r_type.
4707 (elf64_alpha_relax_tls_get_addr): Don't use pos[1] if insn
4708 ordering would mean dataflow inspection is necessary.
4709
4710 2003-01-20 Svein E. Seldal <Svein.Seldal@solidas.com>
4711
4712 * coffcode.h (coff_set_flags): Added get/set arch hooks.
4713
4714 2003-01-20 Fabio Alemagna <falemagn@aros.org>
4715
4716 * elf32-sh.c: Treat elfNN_bed like other macros defined in
4717 elfxx-target.h and #undef it before #define'ing it.
4718 * elf32-i386.c: Likewise.
4719 * elf32-sh64.c: Likewise.
4720 * elf64-alpha.c: Likewise.
4721 * elf64-sh64.c: Likewise.
4722
4723 2003-01-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
4724
4725 * bfd-in2.h: Regenerate.
4726 * elf32-s390.c (elf_s390_adjust_gotplt): New prototype.
4727 (elf_howto_table): Rename R_390_GOTOFF to R_390_GOTOFF32. Add
4728 R_390_GOTOFF16, R_390_GOTOFF64, R_390_GOTPLT12, R_390_GOTPLT16,
4729 R_390_GOTPLT32, R_390_GOTPLT64, R_390_GOTPLTENT, R_390_PLTOFF16,
4730 R_390_PLTOFF32 and R_390_PLTOFF64.
4731 (elf_s390_reloc_type_lookup): Likewise.
4732 (struct elf_s390_link_hash_entry): Add gotplt_refcount to keep track
4733 of GOTPLT references to a function.
4734 (link_hash_newfunc): Initialize gotplt_refcount.
4735 (elf_s390_check_relocs): Move allocation of local_got_refcounts array
4736 and creation of the got section out of the main switch. Add support
4737 for the gotoff, gotplt and pltoff relocations.
4738 (elf_s390_gc_sweep_hook): Add reference counting for gotoff, gotplt
4739 and pltoff.
4740 (elf_s390_adjust_gotplt): New function.
4741 (elf_s390_adjust_dynamic_symbol): Adjust gotplt refcount for removed
4742 plt entries.
4743 (allocate_dynrelocs): Add comment.
4744 (elf_s390_relocate_section): Change r_type to unsigned. Add support
4745 for gotoff, gotplt and pltoff relocations.
4746 * elf64-s390.c: Same changes as for elf32-s390.c.
4747 * libbfd.h: Regenerate.
4748 * reloc.c: Add BFD_RELOC_390_GOTOFF64, BFD_RELOC_390_GOTPLT12,
4749 BFD_RELOC_390_GOTPLT16, BFD_RELOC_390_GOTPLT32, BFD_RELOC_390_GOTPLT64,
4750 BFD_RELOC_390_GOTPLTENT, BFD_RELOC_390_PLTOFF16, BFD_RELOC_390_PLTOFF32
4751 and BFD_RELOC_390_PLTOFF64.
4752
4753 2003-01-18 Jakub Jelinek <jakub@redhat.com>
4754
4755 * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle
4756 R_IA64_TPREL64[LM]SB against non-global symbol properly.
4757
4758 2003-01-16 Jakub Jelinek <jakub@redhat.com>
4759
4760 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add
4761 self_dtpmod_done and self_dtpmod_offset.
4762 (allocate_global_data_got): Only use one got entry for all
4763 dtpmod relocs against local symbols.
4764 (allocate_dynrel_entries): Only need .rela.got entry for
4765 dtpmod against global symbol.
4766 (elfNN_ia64_size_dynamic_sections): Initialize self_dtpmod_offset.
4767 Reserve space in .rela.got for the local dtpmod entry.
4768 (set_got_entry): Initialize the common local dtpmod .got entry.
4769 (elfNN_ia64_relocate_section): Handle R_IA_64_DTPREL64LSB
4770 and R_IA_64_DTPREL64MSB.
4771
4772 2003-01-16 Alan Modra <amodra@bigpond.net.au>
4773
4774 * elf64-ppc.c: Include elf/ppc64.h rather than elf/ppc.h.
4775 (R_PPC_*): Rename all occurrences to R_PPC64_*.
4776 (R_PPC64_ADDR30): Rename all occurrences to R_PPC64_REL30.
4777 (enum elf_ppc_reloc_type): Ditto to enum elf_ppc64_reloc_type.
4778 (ppc64_elf_gc_sweep_hook): Handle R_PPC64_REL30 along with other
4779 relative relocs, not with absolute ones.
4780 * Makefile.am: Run "make dep-am".
4781 * Makefile.in: Regenerate.
4782 * po/SRC-POTFILES.in: Regenerate.
4783
4784 2003-01-15 Andreas Schwab <schwab@suse.de>
4785
4786 * elf32-ppc.c (ppc_elf_check_relocs): Don't set DF_TEXTREL for a
4787 relocation against a non-allocated readonly section.
4788
4789 2003-01-10 Alan Modra <amodra@bigpond.net.au>
4790
4791 * elf32-ppc.c (ppc_elf_relocate_section): Adjust addend for GOT16_HA.
4792 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. PLTGOT16_HA too.
4793
4794 2002-01-08 Klee Dienes <kdienes@apple.com>
4795
4796 * Makefile.am (ALL_MACHINES): Use cpu-msp430.lo, not cpu-msp430.c.
4797 (BFD32_BACKENDS): Use elf32-msp430.lo, not elf32-msp430.c.
4798 * Makefile.in: Regenerate.
4799
4800 2003-01-08 Alexandre Oliva <aoliva@redhat.com>
4801
4802 * elfn32-mips.c (prev_reloc_section): New.
4803 (GET_RELOC_ADDEND): Use it. Parenthesize macro arguments.
4804 (SET_RELOC_ADDEND): Parenthesize macro argument.
4805
4806 2003-01-07 John David Anglin <dave.anglin@nrc.gc.ca>
4807
4808 * elf32-hppa.c (final_link_relocate): For all DP relative relocations,
4809 adjust addil instructions if the symbol has no section.
4810
4811 2003-01-07 DJ Delorie <dj@redhat.com>
4812
4813 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make REL_12 not
4814 partial_inplace.
4815
4816 2003-01-07 Andreas Schwab <schwab@suse.de>
4817
4818 * elf32-m68k.c (elf_m68k_check_relocs): Don't set DF_TEXTREL for
4819 PC relative relocations.
4820 (elf_m68k_discard_copies): Set it here instead.
4821
4822 2002-01-02 Ben Elliston <bje@redhat.com>
4823 Jeff Johnston <jjohnstn@redhat.com>
4824
4825 * Makefile.am (ALL_MACHINES): Add cpu-iq2000.lo.
4826 (ALL_MACHINES_CFILES): Add cpu-iq2000.c.
4827 (BFD32_BACKENDS): Add elf32-iq2000.lo.
4828 (BFD32_BACKENDS_CFILES): Add elf32-iq2000.c.
4829 (cpu-iq2000.lo): New target.
4830 * Makefile.in: Regenerate.
4831 * config.bfd: Handle iq2000-*-elf.
4832 * archures.c (bfd_architecture): Add bfd_{arch,mach}_iq2000.
4833 (bfd_archures_list): Add bfd_iq2000_arch.
4834 * configure.in: Handle bfd_elf32_iq2000_vec.
4835 * configure: Regenerate.
4836 * reloc.c: Add BFD_RELOC_IQ2000_OFFSET_16, BFD_RELOC_IQ2000_OFFSET_21,
4837 and BFD_RELOC_IQ2000_UHI16.
4838 * targets.c (bfd_elf32_iq2000_vec): Declare.
4839 (bfd_target_vector): Add bfd_elf32_iq2000_vec.
4840 * elf.c (prep_headers): Set e_machine to EM_IQ2000.
4841 * cpu-iq2000.c: New file.
4842 * elf32-iq2000.c: Likewise.
4843 * libbfd.h: Regenerate.
4844 * bfd-in2.h: Likewise.
4845
4846 2003-01-02 Richard Sandiford <rsandifo@redhat.com>
4847
4848 * elfxx-mips.c: Include libiberty.h.
4849 (elf_mips_isa, _bfd_mips_elf_mach_extends_p): Remove.
4850 (mips_set_isa_flags): New function, split out from...
4851 (_bfd_mips_elf_final_write_processing): ...here. Only call
4852 mips_set_isa_flags if the EF_MIPS_MACH bits are clear.
4853 (mips_mach_extensions): New array.
4854 (mips_32bit_flags_p): New function.
4855 (_bfd_mips_elf_merge_private_bfd_data): Rework architecture checks.
4856 Use mips_32bit_flags_p to check if one binary is 32-bit and the
4857 other is 64-bit. When adopting IBFD's architecture, adopt the
4858 bfd_mach as well as the flags.
4859
4860 2003-01-02 Nick Kelsey <nickk@ubicom.com>
4861
4862 * elf32-ip2k.c: Re-work of linker relaxation code for the ip2k to
4863 fix internal errors, fix bad code generation, fix incorrect stabs
4864 information, and improve ability to eliminate redundant page
4865 instructions. Added code to ip2k_final_link_relocate to self-verify
4866 the linker relaxation. Fix formatting problems.
4867
4868 2002-12-30 Chris Demetriou <cgd@broadcom.com>
4869
4870 * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mipsisa32r2 case.
4871 * archures.c (bfd_mach_mipsisa32r2): New define.
4872 * bfd-in2.h: Regenerate.
4873 * cpu-mips.c (I_mipsisa32r2): New enum value.
4874 (arch_info_struct): Add entry for I_mipsisa32r2.
4875 * elfxx-mips.c (elf_mips_isa, _bfd_elf_mips_mach)
4876 (_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_32R2.
4877 (_bfd_mips_elf_final_write_processing): Add
4878 bfd_mach_mipsisa32r2 case.
4879 (_bfd_mips_elf_merge_private_bfd_data): Handle merging of
4880 binaries marked as using MIPS32 Release 2.
4881
4882 2002-12-30 Dmitry Diky <diwil@mail.ru>
4883
4884 * Makefile.am: Add msp430 target.
4885 * configure.in: Likewise.
4886 * Makefile.in: Regenerate.
4887 * configure: Regenerate.
4888 * archures.c: Add msp430 architecture vector.
4889 * config.bfd: Likewise.
4890 * reloc.c: Add msp430 relocs.
4891 * targets.c: Add msp320 target.
4892 * cpu-msp430.c: New file: msp430 cpu detection.
4893 * elf32-msp430.c: New file: msp430 reloc processing.
4894 * bfd-in2.h: Regenerate.
4895 * libbfd.h: Regenerate.
4896
4897 2002-12-28 Jakub Jelinek <jakub@redhat.com>
4898
4899 * elf.c (elf_sort_sections): Don't reorder .tbss.
4900 (assign_file_positions_for_segments): Only adjust off/voff
4901 for increased alignment in PT_LOAD or PT_NOTE segment,
4902 but adjust p_filesz for .tbss too. in PT_LOAD consider
4903 .tbss to have zero memory size.
4904 (copy_private_bfd_data) [SECTION_SIZE]: Define.
4905 [IS_CONTAINED_BY_VMA, IS_CONTAINED_BY_LMA]: Use it.
4906 [INCLUDE_SECTION_IN_SEGMENT]: Only put SHF_TLS sections
4907 into PT_TLS segment. Never put SHF_TLS sections in
4908 segments other than PT_TLS or PT_LOAD.
4909
4910 * elf64-alpha.c (elf64_alpha_finish_dynamic_sections): Clear .plt
4911 sh_entsize.
4912
4913 2002-12-23 DJ Delorie <dj@redhat.com>
4914
4915 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Fix logic reversal.
4916
4917 2002-12-23 Alan Modra <amodra@bigpond.net.au>
4918
4919 * elflink.h (elf_link_output_extsym): Heed strip_discarded.
4920
4921 2002-12-23 Nick Clifton <nickc@redhat.com>
4922
4923 * archures.c (bfd_arch_get_compatible): Add third parameter
4924 'accept_unknowns'. Only accept unknown format BFDs if
4925 accept_unknowns is true, or if the format is "binary".
4926 * bfd-in2.h: Regenerate.
4927
4928 2002-12-21 Nick Clifton <nickc@redhat.com>
4929
4930 * coff-arm.c (coff_arm_relocate_section): Disable WINCE workaround
4931 that subtracted 8 from pc relative relocations.
4932
4933 2002-12-20 Kazu Hirata <kazu@cs.umass.edu>
4934
4935 * coff-h8300.c: Fix comment typos.
4936 * coffcode.h: Likewise.
4937 * cpu-cris.c: Likewise.
4938 * elf32-vax.c: Likewise.
4939 * genlink.h: Likewise.
4940 * linker.c: Likewise.
4941 * som.c: Likewise.
4942 * tekhex.c: Likewise.
4943 * vms-misc.c: Likewise.
4944
4945 2002-12-20 DJ Delorie <dj@redhat.com>
4946
4947 * reloc.c: Add BFD_RELOC_XSTORMY16_12.
4948 * libbfd.h: Regenerate.
4949 * bfd-in2.h: Regenerate.
4950 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_12.
4951 (xstormy16_reloc_map): Add R_XSTORMY16_12.
4952
4953 2002-12-19 Kazu Hirata <kazu@cs.umass.edu>
4954
4955 * doc/bfdint.texi: Fix typos.
4956
4957 2002-12-20 Paul Eggert <eggert@twinsun.com>
4958
4959 Port to POSIX 1003.1-2001.
4960 * acinclude.m4 (AM_INSTALL_LIBBFD): Do not rely on "test -o".
4961 * configure.in (build-warnings): Likewise.
4962 (Horrible hacks to build DLLs on Windows): Do not rely on "tail -1".
4963 * aclocal.m4: Regenerate.
4964 * config.in: Regenerate.
4965 * configure: Regenerate.
4966
4967 2002-12-19 Alan Modra <amodra@bigpond.net.au>
4968
4969 * coff-h8300.c: Include libiberty.h.
4970 (h8300_reloc16_extra_cases): Check the hash table creator before
4971 referencing h8300 specific fields. Stash the hash table pointer
4972 in a local var. Comment typo fixes.
4973 (h8300_bfd_link_add_symbols): Likewise.
4974
4975 * reloc.c (struct reloc_howto_struct): Revise src_mask and
4976 dst_mask comments.
4977 * bfd-in2.h: Regenerate.
4978
4979 2002-12-18 Alan Modra <amodra@bigpond.net.au>
4980
4981 * elf32-ppc.c (ppc_elf_relocate_section): Reorganize dynamic reloc
4982 code a little. Comment on dynamic relocs against section symbols.
4983
4984 2002-12-17 Roger Sayle <roger@eyesopen.com>
4985
4986 * configure.host (ia64-*-hpux*): Support 64 bit targets using
4987 the HP compiler's "long long".
4988
4989 2002-12-16 Andrew MacLeod <amacleod@redhat.com>
4990
4991 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_LO16
4992 and R_XSTORMY16_HI16) howto entries.
4993 (xstormy16_reloc_map): Map R_XSTORMY16_{LO,HI}16 to BFD_RELOC_{LO,HI}16.
4994 (xstormy16_info_to_howto_rela): Use R_XSTORMY16_GNU_VTINHERIT to
4995 determine the start of the second reloc table.
4996
4997 2002-12-16 Nathan Tallent <eraxxon@alumni.rice.edu>
4998
4999 * ecofflink.c: Fix the reading of the debugging information
5000 of Tru64/Alpha binaries that are produced by recent Compaq
5001 compilers.
5002 (mk_fdrtab): Fix error in creating the FDR (file descriptor)
5003 table.
5004 (lookup_line): Because of the strange information sometimes
5005 generated by Compaq's recent compilers, change how the FDR
5006 table is searched so that PDRs (procedure descriptors) are
5007 correctly found. Note that this change is really more of a hack;
5008 however, I have included extensive documentation as to why
5009 this is the best solution short of an extensive rewrite or
5010 another hack.
5011 (fdrtab_lookup): Add comments to explain the algorithm.
5012
5013 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
5014
5015 * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Reorder
5016 initializers to match struct declaration.
5017
5018 2002-12-12 Alan Modra <amodra@bigpond.net.au>
5019
5020 * dwarf2.c (comp_unit_contains_address): Comment typo fix.
5021 * elf.c (get_program_header_size): Likewise.
5022 * elf32-m32r.c (m32r_elf_lo16_reloc): Likewise.
5023 (m32r_elf_generic_reloc): Likewise.
5024 * elf32-ppc.c (ppc_elf_howto_init): Likewise.
5025 * elflink.h (elf_bfd_discard_info): Likewise.
5026
5027 2002-12-12 Alan Modra <amodra@bigpond.net.au>
5028
5029 * elf32-i386.c (elf_i386_finish_dynamic_sections): Add output_offset
5030 to DT_JMPREL. Use srelplt input section size for DT_PLTRELSZ and
5031 DT_RELSZ adjustment, not output section. Avoid writing tags when
5032 unchanged. Don't assume linker script is sane, adjust DT_REL too.
5033 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Just use raw
5034 size of srelplt for DT_PLTRELSZ. Use srelplt input section size for
5035 DT_RELASZ adjustment, not output section. Avoid writing tags when
5036 unchanged. Adjust DT_RELA.
5037 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Tweaks for better
5038 formatting. Avoid writing tags when unchanged. Adjust DT_RELA.
5039
5040 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
5041
5042 * elfxx-mips.c (mips_elf_calculate_relocation): Don't divide
5043 addend by 4.
5044
5045 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
5046
5047 * elfxx-mips.c (struct mips_got_entry): New.
5048 (struct mips_got_info): Added got_entries field.
5049 (mips_elf_got_entry_hash, mips_elf_got_entry_eq): New functions.
5050 (mips_elf_local_got_index, mips_elf_got_page,
5051 mips_elf_got16_entry): Re-implement in terms of new...
5052 (mips_elf_create_local_got_entry): Rewrite to use got_entries.
5053 Change return type.
5054 (mips_elf_highest): Warning clean-up.
5055 (mips_elf_create_got_section): Initialize got_entries.
5056 (_bfd_mips_elf_check_relocs): Use got_entries to estimate
5057 local got size.
5058 (_bfd_mips_elf_size_dynamic_sections): Do not account for
5059 GOT_PAGE entries, since we now reuse GOT16 entries.
5060
5061 2002-12-10 Jason Thorpe <thorpej@wasabisystems.com>
5062
5063 * aoutx.h (set_section_contents): Allow an otherwise unrepresentable
5064 read-only section that lies after .text and before .data to be
5065 written into the output file and included in a_text.
5066 (translate_to_native_sym_flags): If an otherwise unrepresentable
5067 section was merged with .text, convert its symbols to N_TEXT
5068 symbols.
5069 * libaout.h (aout_section_merge_with_text_p): New macro.
5070
5071 2002-12-08 Alan Modra <amodra@bigpond.net.au>
5072
5073 * bfd-in.h: Comment typo fix. Formatting.
5074 * bfd-in2.h: Regenerate.
5075 * coff64-rs6000.c (xcoff64_openr_next_archived_file): Warning fix.
5076 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): Prototype.
5077 * elf64-mmix.c (mmix_dump_bpo_gregs): Warning fix.
5078
5079 2002-12-05 Richard Henderson <rth@redhat.com>
5080
5081 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21BI.
5082 Only send PCREL21B though the plt. Fix installed reloc type.
5083 (elfNN_ia64_relocate_section): Give error for dynamic reloc
5084 against PCREL22 or PCREL64I; clean up error messages for
5085 branch relocs.
5086
5087 2002-12-04 Kevin Buettner <kevinb@redhat.com>
5088
5089 * elf64-mips.c (elf64_mips_grok_prstatus, elf64_mips_grok_psinfo):
5090 New functions.
5091 (elf_backend_grok_prstatus, elf_backend_grok_psinfo): Define.
5092
5093 2002-12-04 David Mosberger <davidm@hpl.hp.com>
5094
5095 * cpu-ia64-opc.c: Add operand constant "ar.csd".
5096
5097 2002-12-04 H.J. Lu <hjl@gnu.org>
5098
5099 * elfxx-ia64.c (get_local_sym_hash): Use section ID instead of
5100 BFD address when constructing local name.
5101
5102 2002-12-04 Andreas Schwab <schwab@suse.de>
5103
5104 * elf32-m68k.c (struct elf_m68k_link_hash_table): Add sym_sec
5105 member.
5106 (elf_m68k_link_hash_table_create): Initialize it.
5107 (elf_m68k_check_relocs): Handle symbols that are forced to be
5108 local due to visibility changes.
5109 (elf_m68k_adjust_dynamic_symbol): Likewise.
5110 (elf_m68k_size_dynamic_sections): Likewise.
5111 (elf_m68k_discard_copies): Likewise.
5112 (elf_m68k_relocate_section): Likewise.
5113
5114 2002-12-04 Alan Modra <amodra@bigpond.net.au>
5115
5116 * elf64-ppc.c (ppc64_elf_edit_opd): Correct typo.
5117
5118 2002-12-04 Alan Modra <amodra@bigpond.net.au>
5119
5120 * srec.c (srec_write_symbols): Restore '$' prefix to address
5121 accidentally removed in 2002-04-04 change.
5122 (srec_get_symtab): Use 0 instead of `(long) FALSE'.
5123
5124 2002-12-03 Nick Clifton <nickc@redhat.com>
5125
5126 * elf32-ppc.c (apuinfo_list_init): New function.
5127 (apuinfo_list_add): New function: Add a value to the list.
5128 (apuinfo_list_length): New function: Return the number of
5129 values on the list.
5130 (apuinfo_list_element): New function: Return a value on the
5131 list.
5132 (apuinfo_list_finish): New function: Free the resources used
5133 by the list.
5134 (ppc_elf_begin_write_processing): New function. Scan the
5135 input bfds for apuinfo sections.
5136 (ppc_elf_write_section): New function: Delay the creation of
5137 the contents of an apuinfo section in an output bfd.
5138 (ppc_elf_final_write_processing): New function. Create the
5139 contents of an apuinfo section in an output bfd.
5140 (elf_backend_begin_write_processing): Define.
5141 (elf_backend_final_write_processing): Define.
5142 (elf_backend_write_section): Define.
5143
5144 2002-12-03 Richard Henderson <rth@redhat.com>
5145
5146 * cpu-ia64-opc.c (elf64_ia64_operands): Add ldxmov entry.
5147
5148 2002-12-01 Stephane Carrez <stcarrez@nerim.fr>
5149
5150 Fix PR savannah/1417:
5151 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Don't adjust
5152 branch if it goes to the start of the deleted region.
5153
5154 2002-12-01 Stephane Carrez <stcarrez@nerim.fr>
5155
5156 * bfd-in2.h (bfd_mach_m6812): Rebuild.
5157 * archures.c (bfd_mach_m6812_default, bfd_mach_m6812,
5158 bfd_mach_m6812s): Declare.
5159
5160 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): New function.
5161 (_bfd_m68hc12_elf_set_private_flags): Call it.
5162 (_bfd_m68hc12_elf_print_private_bfd_data): Report processor version.
5163 (_bfd_m68hc12_elf_merge_private_bfd_data): Merge the flags and
5164 report microcontroller incompatibilities (HC12 vs HCS12).
5165 (elf_backend_object_p): Update.
5166
5167 2002-11-30 Alan Modra <amodra@bigpond.net.au>
5168
5169 * bfd-in.h (TRUE_FALSE_ALREADY_DEFINED, BFD_TRUE_FALSE): Delete.
5170 (enum bfd_boolean, boolean): Delete.
5171 (bfd_boolean): Typedef to an int.
5172 (FALSE, TRUE): Define.
5173 * aix386-core.c, aix5ppc-core.c, aout-adobe.c, aout-arm.c, aout-cris.c,
5174 aout-encap.c, aout-ns32k.c, aout-target.h, aout-tic30.c, aoutf1.h,
5175 aoutx.h, archive.c, archive64.c, archures.c, bfd-in.h, bfd.c, bfdwin.c,
5176 binary.c, bout.c, cache.c, cisco-core.c, coff-a29k.c, coff-alpha.c,
5177 coff-apollo.c, coff-arm.c, coff-aux.c, coff-h8300.c, coff-h8500.c,
5178 coff-i386.c, coff-i860.c, coff-i960.c, coff-ia64.c, coff-m68k.c,
5179 coff-m88k.c, coff-mcore.c, coff-mips.c, coff-or32.c, coff-ppc.c,
5180 coff-rs6000.c, coff-sh.c, coff-sparc.c, coff-stgo32.c, coff-tic30.c,
5181 coff-tic4x.c, coff-tic54x.c, coff-tic80.c, coff-w65.c, coff-we32k.c,
5182 coff-z8k.c, coff64-rs6000.c, coffcode.h, coffgen.c, cofflink.c,
5183 corefile.c, cpu-a29k.c, cpu-alpha.c, cpu-arc.c, cpu-arm.c, cpu-avr.c,
5184 cpu-cris.c, cpu-d10v.c, cpu-d30v.c, cpu-dlx.c, cpu-fr30.c, cpu-frv.c,
5185 cpu-h8300.c, cpu-h8500.c, cpu-hppa.c, cpu-i370.c, cpu-i386.c,
5186 cpu-i860.c, cpu-i960.c, cpu-ia64.c, cpu-ip2k.c, cpu-m10200.c,
5187 cpu-m10300.c, cpu-m32r.c, cpu-m68hc11.c, cpu-m68hc12.c, cpu-m68k.c,
5188 cpu-m88k.c, cpu-mcore.c, cpu-mips.c, cpu-mmix.c, cpu-ns32k.c,
5189 cpu-openrisc.c, cpu-or32.c, cpu-pdp11.c, cpu-pj.c, cpu-powerpc.c,
5190 cpu-rs6000.c, cpu-s390.c, cpu-sh.c, cpu-sparc.c, cpu-tic30.c,
5191 cpu-tic4x.c, cpu-tic54x.c, cpu-tic80.c, cpu-v850.c, cpu-vax.c,
5192 cpu-w65.c, cpu-we32k.c, cpu-xstormy16.c, cpu-z8k.c, dwarf1.c,
5193 dwarf2.c, ecoff.c, ecofflink.c, efi-app-ia32.c, efi-app-ia64.c,
5194 elf-bfd.h, elf-eh-frame.c, elf-hppa.h, elf-m10200.c, elf-m10300.c,
5195 elf-strtab.c, elf.c, elf32-arc.c, elf32-arm.h, elf32-avr.c,
5196 elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c, elf32-fr30.c,
5197 elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c, elf32-hppa.h,
5198 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
5199 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
5200 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
5201 elf32-pj.c, elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-sh64-com.c,
5202 elf32-sh64.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
5203 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
5204 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-ppc.h, elf64-s390.c,
5205 elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c,
5206 elfarm-oabi.c, elfcode.h, elfcore.h, elflink.c, elflink.h,
5207 elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c, elfxx-mips.h,
5208 elfxx-target.h, format.c, freebsd.h, genlink.h, hash.c, hp300hpux.c,
5209 hppabsd-core.c, hpux-core.c, i386aout.c, i386linux.c, i386lynx.c,
5210 i386mach3.c, i386msdos.c, i386os9k.c, ieee.c, ihex.c, irix-core.c,
5211 libaout.h, libbfd-in.h, libbfd.c, libcoff-in.h, libecoff.h, libieee.h,
5212 libnlm.h, liboasys.h, libpei.h, libxcoff.h, linker.c, lynx-core.c,
5213 m68klinux.c, m68klynx.c, mach-o.c, mach-o.h, merge.c, mipsbsd.c,
5214 mmo.c, netbsd-core.c, netbsd.h, nlm.c, nlm32-alpha.c, nlm32-i386.c,
5215 nlm32-ppc.c, nlm32-sparc.c, nlmcode.h, oasys.c, opncls.c, osf-core.c,
5216 pc532-mach.c, pdp11.c, pe-arm.c, pe-i386.c, pe-mcore.c, pe-mips.c,
5217 pe-sh.c, peXXigen.c, pef.c, pei-arm.c, pei-i386.c, pei-mcore.c,
5218 pei-mips.c, pei-sh.c, peicode.h, ppcboot.c, ptrace-core.c, reloc.c,
5219 reloc16.c, riscix.c, rs6000-core.c, sco5-core.c, section.c, simple.c,
5220 som.c, som.h, sparclinux.c, sparclynx.c, srec.c, stabs.c, sunos.c,
5221 syms.c, targets.c, tekhex.c, ticoff.h, trad-core.c, versados.c,
5222 vms-gsd.c, vms-hdr.c, vms-misc.c, vms-tir.c, vms.c, vms.h,
5223 xcoff-target.h, xcofflink.c, xsym.c, xsym.h: Replace boolean with
5224 bfd_boolean, true with TRUE, false with FALSE. Simplify comparisons
5225 of bfd_boolean vars with TRUE/FALSE. Formatting.
5226 * bfd-in2.h, libbfd.h, libcoff.h: Regenerate
5227
5228 2002-11-28 Alan Modra <amodra@bigpond.net.au>
5229
5230 * elf-bfd.h: Replace occurrences of Elf32_Internal_* and
5231 Elf64_Internal_* with Elf_Internal_*. Replace Elf_Internal_Rel
5232 with Elf_Internal_Rela.
5233 * elf-hppa.h, elf-m10200.c, elf-m10300.c, elf32-arc.c, elf32-arm.h,
5234 elf32-avr.c, elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c,
5235 elf32-fr30.c, elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c,
5236 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
5237 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
5238 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
5239 elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-v850.c, elf32-vax.c,
5240 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
5241 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
5242 elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c, elfarm-oabi.c,
5243 elfcode.h, elflink.h, elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c: Ditto.
5244 * elf-hppa.h (elf_hppa_internal_shdr): Delete. Use Elf_Internal_Shdr
5245 throughout instead.
5246 * elf.c (_bfd_elf_no_info_to_howto_rel): Delete.
5247 * elfcode.h (elf_swap_reloca_in): Pass source operand as a bfd_byte *.
5248 Remove INLINE keyword.
5249 (elf_swap_reloc_in): Likewise. Also clear r_addend.
5250 (elf_swap_reloc_out, elf_swap_reloca_out): Pass destination operand
5251 as a bfd_byte *.
5252 (elf_write_relocs): Consolidate REL and RELA code.
5253 (elf_slurp_reloc_table_from_section): Simplify REL code.
5254 (NAME(_bfd_elf,size_info)): Populate reloc swap entries.
5255 * elf-bfd.h (MAX_INT_RELS_PER_EXT_REL): Define.
5256 * elflink.h (elf_link_read_relocs_from_section): Consolidate REL and
5257 RELA code.
5258 (elf_link_adjust_relocs): Likewise. Don't malloc space for temp
5259 reloc array, use a fixed size of MAX_INT_RELS_PER_EXT_REL.
5260 (elf_link_output_relocs): Likewise.
5261 (elf_reloc_link_order): Likewise.
5262 (elf_finish_pointer_linker_section): Likewise.
5263 (struct elf_link_sort_rela): Remove union.
5264 (elf_link_sort_cmp1): Update to suit.
5265 (elf_link_sort_cmp2): Here too.
5266 (elf_link_sort_relocs): Consolidate REL and RELA code. Fix memory
5267 over-allocation for int_rels_per_ext_rel != 1 case.
5268 * elf32-arm.h: Update all bfd_elf32_swap_reloc_out calls.
5269 * elf32-i386.c: Likewise.
5270 * elf32-cris.c: Likewise for bfd_elf32_swap_reloca_out.
5271 * elf32-hppa.c, elf32-i370.c, elf32-m68k.c, elf32-ppc.c, elf32-s390.c,
5272 elf32-sh.c, elf32-vax.c, elfxx-mips.c: Likewise.
5273 * elf64-alpha.c: Likewise for bfd_elf64_swap_reloca_out.
5274 * elf64-hppa.c, elf64-mips.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
5275 elf64-sparc.c, elf64-x86-64.c: Likewise.
5276 * elfxx-ia64.c: Likewise for bfd_elfNN_swap_reloca_out.
5277 * elfxx-mips.c (sort_dynamic_relocs): Likewise for
5278 bfd_elf32_swap_reloc_in.
5279
5280 * elf32-arm.h: Update elf32_arm_info_to_howto calls.
5281 * elf32-mips.c: Likewise for mips_info_to_howto_rel.
5282 (mips_elf64_swap_reloc_in): Zero r_addend.
5283 (mips_elf64_be_swap_reloc_in): Likewise.
5284 (mips_elf64_slurp_one_reloc_table): Simplify.
5285
5286 * elf64-alpha.c (alpha_elf_size_info): Populate reloc swap entries.
5287 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
5288 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
5289
5290 2002-11-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5291
5292 * elf32-sh.c (sh_elf_relocate_section): Don't complain about
5293 unresolved debugging relocs in dynamic applications.
5294 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
5295
5296 2002-11-26 Alan Modra <amodra@bigpond.net.au>
5297
5298 * elf-eh-frame.c (ENSURE_NO_RELOCS): Disregard R_*_NONE relocs.
5299 (_bfd_elf_discard_section_eh_frame): Don't discard duplicate CIEs
5300 on a relocatable link. Comment typos.
5301 * elf.c (_bfd_elf_link_hash_newfunc): Assign elements of structure
5302 in the order they are declared. Clear elf_hash_value too.
5303 (_bfd_elf_link_hash_table_init): Likewise assign in order. Clear
5304 eh_info and tls_segment.
5305 * elflink.h (elf_link_input_bfd <emit_relocs>): Keep reloc offsets
5306 sorted when discarding relocs by turning them into R_*_NONE.
5307
5308 * libbfd.c (warn_deprecated): Comment spelling.
5309 * po/SRC-POTFILES.in: Regenerate.
5310
5311 2002-11-21 Richard Henderson <rth@redhat.com>
5312
5313 * elflink.h (elf_link_add_object_symbols): Don't overwrite the
5314 arch's st_other bits when merging visibilities.
5315 (elf_link_output_extsym): Tidy clearing of visibility field.
5316
5317 2002-11-21 Alan Modra <amodra@bigpond.net.au>
5318
5319 * coff-mcore.c (SWAP_IN_RELOC_OFFSET): Define.
5320 (SWAP_OUT_RELOC_OFFSET): Define.
5321
5322 2002-11-20 Alexandre Oliva <aoliva@redhat.com>
5323
5324 * elf.c (_bfd_elf_link_hash_table_init): Make sure
5325 can_refcount is properly extended to the type of
5326 init_refcount.
5327
5328 2002-11-19 Alexandre Oliva <aoliva@redhat.com>
5329
5330 * elfxx-mips.c (MIPS_RELOC_RELA_P): New macro.
5331 (_bfd_mips_elf_relocate_section): Use it.
5332
5333 * elfxx-mips.c (MNAME): New macro.
5334 (_bfd_mips_elf_check_relocs): Use it.
5335 (_bfd_mips_elf_discard_info): Likewise.
5336 (_bfd_mips_elf_final_link): Likewise.
5337
5338 2002-11-19 Alan Modra <amodra@bigpond.net.au>
5339
5340 * elf64-ppc.c (ppc64_elf_edit_opd): When deleting relocs, adjust
5341 rel_hdr.sh_size too.
5342
5343 2002-11-18 Klee Dienes <kdienes@apple.com>
5344
5345 * Makefile.am (BFD32_LIBS): Add bfdwin.lo, bfdio.lo.
5346 (BFD32_LIBS_CFILES): Add bfdwin.c, bfdio.c.
5347 (BFD_H_FILES): Add bfdwin.c, bfdio.c.
5348 (LIBBFD_H_FILES): Add bfdwin.c, bfdio.c.
5349 Add dependencies for bfdwin.c, bfdio.c.
5350 * bfd.c: Remove bfd_get_mtime, bfd_get_size.
5351 * libbfd.c: Remove real_read, bfd_bread, _bfd_window_internal,
5352 bfd_init_window, bfd_free_window, bfd_get_file_window, bfd_bwrite,
5353 bfd_tell, bfd_flush, bfd_stat, bfd_seek.
5354 * bfdio.c: New file. Contains real_read, bfd_bread, bfd_write,
5355 bfd_tell, bfd_flush, bfd_stat, bfd_seek, bfd_ge_mtime,
5356 bfd_get_size (moved from libbfd.c and bfd.c).
5357 * bfdwin.c New file. Contains _bfd_window_internal,
5358 bfd_init_window, bfd_free_window, bfd_get_file_window (moved from
5359 libbfd.c and bfd.c).
5360 * po/SRC-POTFILES.in: Regenerate.
5361 * po/bfd.pot: Regenerate.
5362 * libbfd.h: Regenerate.
5363 * bfd-in2.h: Regenerate.
5364 * aclocal.m4: Regenerate.
5365 * Makefile.in: Regenerate.
5366 * configure: Regenerate.
5367
5368 2002-11-18 Klee Dienes <kdienes@apple.com>
5369
5370 * bfd.c (bfd_preserve_save): Don't zero BFD_IN_MEMORY.
5371
5372 2002-11-15 Kazu Hirata <kazu@cs.umass.edu>
5373
5374 * coff-h8300.c (h8300_reloc16_estimate): Do not optimize away
5375 jsr after a short jump.
5376 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
5377
5378 2002-11-15 Klee Dienes <kdienes@apple.com>
5379
5380 * pef.c (bfd_pef_convert_architecture): Move declaration of
5381 ARCH_POWERPC and ARCH_M68K to the start of the function.
5382
5383 2002-11-14 Svein E. Seldal <Svein.Seldal@solidas.com>
5384
5385 * coff-tic4x.c (tic4x_howto_table): Formatting fixup
5386
5387 2002-11-14 Hans-Peter Nilsson <hp@bitrange.com>
5388
5389 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs):
5390 For bpo_gregs_section->contents, allocate _raw_size, not
5391 _cooked_size.
5392
5393 2002-11-13 Klee Dienes <kdienes@apple.com>
5394
5395 * config.bfd: Add entries for powerpc-*-darwin and cousins.
5396
5397 2002-11-13 H.J. Lu <hjl@gnu.org>
5398
5399 * elfcode.h (elf_object_p): Don't restore abfd->arch_info.
5400
5401 2002-11-13 Klee Dienes <kdienes@apple.com>
5402 Alan Modra <amodra@bigpond.net.au>
5403
5404 * bfd.c (struct bfd_preserve): New.
5405 (bfd_preserve_save): New function.
5406 (bfd_preserve_restore): Ditto.
5407 (bfd_preserve_finish): Ditto.
5408 * bfd-in2.h: Regenerate.
5409 * mach-o.c: Formatting.
5410 (bfd_mach_o_scan_read_symtab_symbol): Make "value" unsigned.
5411 (bfd_mach_o_object_p): Use bfd_preserve_save/restore/finish.
5412 (bfd_mach_o_core_p): Ditto.
5413 (bfd_mach_o_scan): Pass in mdata.
5414 * mach-o.h (bfd_mach_o_scan): Update prototype.
5415 * pef.c: Formatting.
5416 (bfd_pef_object_p): Use bfd_preserve_save/restore/finish.
5417 (bfd_pef_xlib_object_p): Ditto.
5418 (bfd_pef_scan): Pass in mdata. Move version check to bfd_pef_object_p.
5419 * pef.h (bfd_pef_scan): Update prototype.
5420 * xsym.c: Formatting, K&R fixes.
5421 (bfd_sym_object_p): Use bfd_preserve_save/restore/finish.
5422 (bfd_sym_scan): New function split out from bfd_sym_object_p.
5423 * xsym.h (bfd_sym_scan): Declare.
5424 * elfcode.h (elf_object_p): Use bfd_preserve_save/restore/finish.
5425 * elfcore.h (elf_core_file_p): Likewise.
5426 * targets.c (_bfd_target_vector): Revert 2002-11-08 change.
5427
5428 2002-11-12 Nick Clifton <nickc@redhat.com>
5429
5430 * po/da.po: Updated Danish translation.
5431
5432 2002-11-12 Alan Modra <amodra@bigpond.net.au>
5433
5434 * elflink.h (elf_link_add_object_symbols): Optimize stabs for
5435 relocatable link too.
5436 (elf_link_input_bfd): When emitting relocs, adjust offsets for
5437 eh_frame and stab sections. Zap deleted relocs.
5438 (elf_reloc_symbol_deleted_p): Return true for zero r_symndx.
5439 (elf_bfd_discard_info): Run for relocatable link too.
5440 * elf64-ppc.c (ppc64_elf_edit_opd): Rename from edit_opd. Make global.
5441 Handle ld -r case.
5442 (ppc64_elf_size_dynamic_sections): Don't call edit_opd from here.
5443 * elf64-ppc.h (ppc64_elf_edit_opd): Declare.
5444
5445 * elf-bfd.h (struct cie_header): Move from elf_eh-frame.c.
5446 (struct cie, struct eh_cie_fde, struct eh_frame_sec_info): Likewise.
5447 (struct eh_frame_array_ent, struct eh_frame_hdr_info): Likewise.
5448 (enum elf_link_info_type): Remove ELF_INFO_TYPE_EH_FRAME_HDR.
5449 (struct eh_frame_hdr_info): Add "hdr_sec", remove "split".
5450 (struct elf_link_hash_table): Add eh_info.
5451 (struct elf_obj_tdata): Change eh_frame_hdr to an asection *.
5452 (_bfd_elf_discard_section_eh_frame): Update prototype.
5453 (_bfd_elf_discard_section_eh_frame_hdr): Likewise.
5454 (_bfd_elf_write_section_eh_frame): Likewise.
5455 (_bfd_elf_write_section_eh_frame_hdr): Likewise.
5456 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Remove "ehdrsec"
5457 param. Get "hdr_info" from link hash table.
5458 (_bfd_elf_discard_section_eh_frame_hdr): Remove "sec" param. Get
5459 header section from link hash table. Save header section to elf_tdata.
5460 (_bfd_elf_maybe_strip_eh_frame_hdr): Remove local "sec". Use
5461 header section from link hash table. Don't alloc hdr_info. Clear
5462 hdr_sec instead of setting "strip".
5463 (_bfd_elf_eh_frame_section_offset): Formatting.
5464 (_bfd_elf_write_section_eh_frame): Remove "ehdrsec", add "info" param.
5465 Get header section from link hash table.
5466 (_bfd_elf_write_section_eh_frame_hdr): Remove "sec", add "info" param.
5467 Get header section from link hash table.
5468 * elf.c (map_sections_to_segments): Use cached eh_frame_hdr.
5469 (get_program_header_size): Likewise.
5470 (_bfd_elf_section_offset): Formatting.
5471 * elflink.h (elf_link_create_dynamic_sections): Stash eh frame header
5472 section pointer in link hash table.
5473 (elf_bfd_final_link): Adjust _bfd_elf_write_section_eh_frame_hdr
5474 and _bfd_elf_write_section_eh_frame calls. Update comment about
5475 eh_frame entries.
5476 (elf_bfd_discard_info): Adjust _bfd_elf_discard_section_eh_frame and
5477 _bfd_elf_discard_section_eh_frame_hdr calls. Remove "ehdr".
5478
5479 * po/SRC-POTFILES.in: Regenerate.
5480
5481 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't zero
5482 relocs for discarded FDEs. Remove dead code.
5483 (_bfd_elf_write_section_eh_frame_hdr): Remove dead code.
5484 * elflink.h (elf_bfd_discard_info): Don't save edited relocs.
5485 Tidy conditions under which stabs are edited. Formatting.
5486 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
5487 from discarded relocs.
5488 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Add reloc output
5489 section adjustments after testing magic values.
5490
5491 2002-11-12 Thomas Moestl <tmm@FreeBSD.org>
5492
5493 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Correct
5494 references to large plt symbols.
5495
5496 2002-11-12 Klee Dienes <kdienes@apple.com>
5497
5498 * mach-o.c (bfd_mach_o_scan_read_thread): Don't re-use 'i' when
5499 looking for an unused section name.
5500
5501 2002-11-11 Kazu Hirata <kazu@cs.umass.edu>
5502
5503 * coff-h8300.c: Fix formatting.
5504 * elf32-h8300.c: Likewise.
5505 * reloc16.c: Likewise.
5506
5507 2002-11-09 Jeroen Dobbelaere <jeroen.dobbelaere@acunia.com>
5508
5509 * elf32-arm.h (elf32_arm_size_dynamic_sections): Don't strip output
5510 section when dynamic section unused; _bfd_strip_section_from_output
5511 instead.
5512
5513 2002-11-08 Alan Modra <amodra@bigpond.net.au>
5514
5515 * targets.c (_bfd_target_vector): Disable pef_vec, pef_xlib_vec
5516 and sym_vec.
5517
5518 * dwarf2.c: Revert last change.
5519
5520 2002-11-07 Michal Ludvig <mludvig@suse.cz>
5521
5522 * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
5523 _bfd_dwarf2_find_nearest_line): Use
5524 bfd_simple_get_relocated_section_contents() instead of
5525 bfd_get_section_contents().
5526 * reloc.c (bfd_perform_relocation): Add sanity check.
5527 * simple.c (simple_get_relocated_section_contents): If the section
5528 does not have any relocs associated with it, just return the
5529 unadjusted contents.
5530
5531 2002-11-07 Hans-Peter Nilsson <hp@axis.com>
5532
5533 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOT,
5534 case R_CRIS_32_GOT>: Correct test for filling in constant .got
5535 contents, enabling for a non-DSO, for symbols defined in the
5536 program with --export-dynamic.
5537
5538 2002-11-07 Alan Modra <amodra@bigpond.net.au>
5539
5540 * elf64-ppc.c: Comment typo fixes.
5541 (ppc64_elf_merge_private_bfd_data): Allow BFD_ENDIAN_UNKNOWN input.
5542
5543 2002-11-07 Nick Clifton <nickc@redhat.com>
5544
5545 * po/da.po: Updated Danish translation.
5546
5547 2002-11-06 Alexandre Oliva <aoliva@redhat.com>
5548
5549 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Generate
5550 exactly three internal relocs per external reloc. Set reloc_count
5551 to the external reloc count.
5552
5553 2002-11-06 Klee Dienes <kdienes@apple.com>
5554
5555 * coff-stgo32.c (stub_bytes): Mark as const.
5556 Fix comment formatting.
5557
5558 2002-11-06 Klee Dienes <kdienes@apple.com>
5559
5560 * Makefile.am (BFD32_BACKENDS): Add mach-o.lo, pef.lo, and
5561 xsym.lo.
5562 (BFD32_BACKENDS_CFILES): Add mach-o.c, pef.c, and xsym.c.
5563 (SOURCE_HFILES): Add mach-o.h, pef.h, pef-traceback.h, xsym.h
5564 * archures.c (enum bfd_architecture): Add bfd_arch_m98k.
5565 * bfd.c (struct bfd): Add private data for mach-o, pef, and sym.
5566 * targets.c (enum bfd_flavour): Add flavours for mach-o, pef, and
5567 sym.
5568 (_bfd_target_vector): Add target vectors for mach-o, pef, and sym.
5569 * Makefile.in: Regenerate.
5570 * doc/Makefile.in: Regenerate.
5571 * bfd-in2.h: Regenerate.
5572 * xsym.c: New file. Contains support for the Apple/Metrowerks
5573 xSYM debugging format.
5574 * xsym.h: New file.
5575 * pef.c: New file. Contains support for the Apple Code Fragment
5576 Manager Preferred Executable Format
5577 * pef.h: New file.
5578 * pef-traceback.h: New file. Contains support for parsing PowerPC
5579 traceback tables as used by PEF executables (and perhaps other
5580 systems as well).
5581 * mach-o.c: New file. Contains support for the Mach-O object file
5582 format.
5583 * mach-o.h: New file.
5584 * mach-o-target.c: New file. Declares the mach-o targets
5585 themselves. Included three times by mach-o.c; each time with a
5586 different set of macros set.
5587
5588 2002-11-06 Graeme Peterson <gp@qnx.com>
5589
5590 * Makefile.am: Remove entries for elf32-qnx.[ch].
5591 * Makefile.in: Regenerate.
5592 * config.bfd: Change arm-nto to use bfd_elf32_{big|little}arm_vec,
5593 ppc-nto to use bfd_elf32_powerpc{le}_vec, sh-nto to use
5594 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
5595 * configure.in: Remove support for bfd_elf32_sh{l}qnx_vec,
5596 bfd_elf32_powerpc{le}qnx_vec, bfd_elf32_{big|little}armqnx_vec,
5597 and bfd_elf32_i386qnx_vec, and removed elf32-qnx.lo from other targets.
5598 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
5599 * configure: Regenerate.
5600 * elf32-qnx.c: Remove.
5601 * elf32-qnx.h: Remove.
5602 * elf.c: Remove calls to QNX specific set_nonloadable_filepos,
5603 is_contained_by_filepos, and copy_private_bfd_data_p.
5604 * elf-bfd.h (struct elf_backend_data): Remove set_nonloadable_filepos,
5605 is_contained_by_filepos, and copy_private_bfd_data_p.
5606 * elf32-i386.c: Remove QNX extended bfd support.
5607 * elf32-ppc.c: Remove QNX extended bfd support.
5608 * elf32-sh.c: Remove QNX extended bfd support.
5609 * elfarm-nabi.c: Remove QNX extended bfd support.
5610 * targets.c: Remove qnx vectors.
5611 * elfxx-target.h (elf_backend_set_nonloadable_filepos): Remove
5612 (elf_backend_is_contained_by_filepos): Remove.
5613 (elf_backend_copy_private_bfd_data_p): Remove.
5614 * po/SRC-POTFILES.in: Regenerate.
5615
5616 2002-11-06 David O'Brien <obrien@FreeBSD.org>
5617 Alan Modra <amodra@bigpond.net.au>
5618
5619 * elf64-sparc.c (sparc64_elf_relocate_section): Adjust addend of
5620 dynamic relocs against section symbols for the output section vma.
5621
5622 2002-11-05 Alan Modra <amodra@bigpond.net.au>
5623
5624 * elf32-arm.h (t2a1_push_insn, t2a2_ldr_insn, t2a3_mov_insn,
5625 t2a4_bx_insn, t2a5_pop_insn, t2a6_bx_insn): Remove.
5626
5627 2002-11-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5628 Alan Modra <amodra@bigpond.net.au>
5629
5630 * config.bfd (sh-*-linux*): Use bfd_elf*_sh64*lin_vec as sh64
5631 vectors in target_selvecs.
5632 (shle-*-netbsdelf*): Use bfd_elf*_sh64*nbsd_vec as sh64 vectors
5633 in target_selvecs.
5634 (sh-*-netbsdelf*): Likewise.
5635 * configure.in (assocvecs): New variable. Handle assocvecs like
5636 selvecs.
5637 * configure: Regenerate.
5638 * format.c (bfd_check_format_matches): Store bfd_target pointers
5639 in matching_vector instead of target names. Select first target
5640 from bfd_associated_vector that matches a list of ambiguous targets.
5641 * targets.c (_bfd_associated_vector): New array.
5642 (bfd_associated_vector): New variable.
5643 (_bfd_target_vector): Add bfd_elf*_sh64*lin_vec.
5644 * libbfd-in.h (bfd_associated_vector): Declare.
5645 * libbfd.h: Regenerate.
5646
5647 2002-11-05 Elias Athanasopoulos <eathan@otenet.gr>
5648
5649 * vms-gsd.c (_bfd_vms_write_gsd): Check that symbol->udata.p is
5650 non-NULL before dereferencing.
5651
5652 2002-11-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5653
5654 * vms.c (vms_object_p): Restore the start address when returning
5655 NULL.
5656
5657 2002-11-04 Alan Modra <amodra@bigpond.net.au>
5658 Hans-Peter Nilsson <hp@axis.com>
5659
5660 * elflink.h (struct elf_final_link_info): Add shndxbuf_size.
5661 (elf_bfd_final_link): Don't bother zeroing symtab_hdr fields.
5662 Set up a larger symshndxbuf, and write it out. Free it on
5663 exit rather than freeing symbuf twice. Correct section index
5664 on output section symbol loop.
5665 (elf_link_output_sym): Accumulate symbol extension section
5666 indices, reallocating symshndxbuf rather than writing it out.
5667 (elf_link_flush_output_syms): Don't flush symshndxbuf.
5668 * elf.c (assign_section_numbers): Init i_shdrp to all zero.
5669 Use bfd_zalloc to clear i_shdrp[0] too.
5670
5671 2002-11-03 Stephen Clarke <stephen.clarke@earthling.net>
5672
5673 * elf32-sh64-com.c (sh64_address_in_cranges): Use
5674 _raw_size of cranges section if _cooked_size not yet set.
5675
5676 2002-11-03 Hans-Peter Nilsson <hp@axis.com>
5677
5678 * elf32-v850.c (v850_elf_relax_delete_bytes): Correct parameters
5679 for bfd_elf32_swap_symbol_out.
5680
5681 2002-10-31 David O'Brien <obrien@FreeBSD.org>
5682
5683 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't mix
5684 signed and unsigned in comparison.
5685
5686 2002-10-30 Daniel Jacobowitz <drow@mvista.com>
5687
5688 * coffcode.h: Remove extraneous '\'.
5689
5690 2002-10-28 H.J. Lu <hjl@gnu.org>
5691
5692 * Makefile.am (targets.lo): Depend on Makefile instead of
5693 config.status.
5694 (archures.lo): Likewise.
5695 * Makefile.in: Regenerated.
5696
5697 2002-10-25 Jason Thorpe <thorpej@wasabisystems.com>
5698
5699 * config.bfd (mips*el-*-netbsd*, mips*-*-netbsd*): Add
5700 bfd_elf64_bigmips_vec and bfd_elf64_littlemips_vec to
5701 targ_selvecs.
5702
5703 2002-10-25 Jim Wilson <wilson@redhat.com>
5704
5705 * elf64-sh64.c (sh_elf64_relocate_section): Call
5706 _bfd_elf_rela_local_sym. Handle relocs against STT_SECTION symbol
5707 of SHF_MERGE section.
5708
5709 2002-10-25 Hans-Peter Nilsson <hp@axis.com>
5710
5711 * simple.c: Correct placement of ATTRIBUTE_UNUSED.
5712
5713 2002-10-24 John David Anglin <dave@hiauly1.hia.nrc.ca>
5714
5715 * aoutx.h (NAME(aout,swap_ext_reloc_in)): Cast bytes->r_index to
5716 unsigned int. Cast RELOC_BASE10, RELOC_BASE13 and RELOC_BASE22 to
5717 unsigned int.
5718 (NAME(aout,final_link)): Cast enum used in assignment.
5719 (aout_link_write_symbols): Cast enums in comparisons, int values to
5720 boolean, enums in assignments to int.
5721 (aout_link_input_section_std): Cast rel->r_index to unsigned int.
5722 (aout_link_input_section_ext): Likewise. Cast enums used in
5723 comparisons with unsigned ints.
5724 (aout_link_reloc_link_order): Cast enum to int in assignment.
5725 * archive.c (_bfd_generic_read_ar_hdr_mag): Cast result of memchr
5726 calls to char *.
5727 * bfd-in.h (bfd_set_section_vma): Cast enum true to unsigned int in
5728 assignment.
5729 * bfd-in2.h (bfd_set_section_vma): Likewise.
5730 * bfd.c (bfd_record_phdr): Cast enums in assignments.
5731 * binary.c (bfd_alloc): Cast enum to long.
5732 * coffgen.c (_bfd_coff_is_local_label_name): Cast return to boolean.
5733 * dwarf2.c (read_abbrevs): Add casts to enum types.
5734 (read_attribute_value): Likewise.
5735 (arange_add): Cast result of bfd_zalloc call.
5736 (comp_unit_contains_address): Return true and false.
5737 (comp_unit_find_nearest_line): Cast return to boolean.
5738 * format.c (bfd_check_format_matches, bfd_set_format): Likewise.
5739 * gen-aout.c: define macro '_' if not defined.
5740 * libbfd.c (bfd_realloc): Cast malloc and realloc to PTR.
5741 (bfd_bwrite): Cast bfd_realloc to bfd_byte *.
5742 (bfd_write_bigendian_4byte_int): Cast return to boolean.
5743 (bfd_seek): Cast bfd_realloc to bfd_byte *.
5744 (bfd_generic_is_local_label_name): Cast return to boolean.
5745 * libcoff.h (_bfd_coff_adjust_symndx): Remove extraneous '\'.
5746 * linker.c (_bfd_link_hash_newfunc): Cast bfd_hash_allocate result to
5747 struct bfd_hash_entry *.
5748 (_bfd_generic_link_hash_newfunc): likewise.
5749 (_bfd_generic_final_link): Cast enum to unsigned int.
5750 * merge.c (sec_merge_emit): Cast return to boolean.
5751 (merge_strings): Add casts to const unsigned char *.
5752 * reloc.c (bfd_get_reloc_code_name): Cast enums in comparison to int.
5753 (bfd_generic_get_relocated_section_content): Cast enum to unsigned int.
5754 * section.c (bfd_section_hash_newfunc): Cast bfd_hash_allocate result
5755 to struct bfd_hash_entry *.
5756 (bfd_set_section_content): Add cast to PTR in comparison.
5757 * simple.c (simple_dummy_warning, simple_dummy_undefined_symbol,
5758 simple_dummy_reloc_overflow, simple_dummy_reloc_dangerous,
5759 simple_dummy_unattached_reloc,
5760 bfd_simple_get_relocated_section_contents): Add K&R declarations and
5761 function definitions.
5762 * srec.c (S3Forced): Initialize to false.
5763 (srec_get_symtab): Cast return value from bfd_alloc to asymbol *.
5764 * stabs.c (_bfd_link_section_stabs): Cast enum to int in comparisons.
5765 (_bfd_discard_section_stabs): Likewise. Also cast return to boolean.
5766 * syms.c (bfd_is_undefined_symclass): Cast return to boolean.
5767 (_bfd_stab_section_find_nearest_line): Cast enum to bfd_byte in
5768 comparisons.
5769
5770 2002-10-23 Jakub Jelinek <jakub@redhat.com>
5771
5772 * elf64-alpha.c (elf64_alpha_check_relocs): Only put maybe_dynamic
5773 relocs into shared lib non-allocated reloc sections.
5774
5775 2002-10-23 Nathan Tallent <eraxxon@alumni.rice.edu>
5776
5777 * dwarf2.c (add_line_info): Ensure that the line_info_table is
5778 sorted even when given an out-of-order line sequence.
5779 (lookup_address_in_line_info_table): When an exact VMA match is
5780 not found, return line information with the closest VMA.
5781
5782 2002-10-23 Ross Alexander <ross.alexander@uk.neceur.com>
5783
5784 * elf64-hppa.c: Force DT_FLAGS to always be set. Required by
5785 HPUX 11.00 patch PHSS_26559.
5786
5787 2002-10-22 Alexandre Oliva <aoliva@redhat.com>
5788
5789 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Don't move
5790 the options section into a separate section unless IRIX 6
5791 compatibility is enabled.
5792
5793 2002-10-22 Alexandre Oliva <aoliva@redhat.com>
5794
5795 * elflink.h (struct elf_link_sort_rela): Turn rel and rela
5796 into arrays.
5797 (elf_link_sort_cmp1, elf_link_sort_cmp2): Adjust.
5798 (elf_link_sort_relocs): Likewise. Take int_rels_per_ext_rel
5799 into account.
5800 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Compose
5801 R_MIPS_REL32 with R_MIPS64 if ABI_64_P.
5802
5803 2002-10-21 Graeme Peterson <gp@qnx.com>
5804
5805 * targets.c (_bfd_target_vector): Add missing qnx vectors.
5806
5807 2002-10-21 Alan Modra <amodra@bigpond.net.au>
5808
5809 * targets.c (bfd_target_list): Don't return the default target twice.
5810
5811 2002-10-21 Elias Athanasopoulos <eathan@otenet.gr>
5812
5813 * archive.c (_bfd_archive_bsd_update_armap_timestamp): Replace
5814 perror with bfd_perror.
5815
5816 2002-10-19 H.J. Lu <hjl@gnu.org>
5817
5818 * elflink.h (elf_link_add_object_symbols): Correctly handle
5819 DT_RPATH and DT_RUNPATH.
5820
5821 2002-10-19 Mark Kettenis <kettenis@gnu.org>
5822
5823 * elf.c (elfcore_grok_note): Fix recognition on NT_PRXFPREG notes.
5824
5825 2002-10-17 Denis Chertykov <denisc@overta.ru>
5826
5827 * elf32-ip2k.c (ELF_MACHINE_ALT1): Define alternate machine code
5828 for ip2k port.
5829
5830 2002-10-17 Alan Modra <amodra@bigpond.net.au>
5831
5832 * elfxx-target.h (USE_REL): Don't define as 1.
5833 * elf32-arm.h (USE_REL): Provide a default define of 0.
5834 Use #if rather than #ifdef when testing USE_REL.
5835 * elf32-m32r.c: Likewise.
5836
5837 * elf32-arc.c (USE_REL): Define as 1.
5838 * elf32-d10v.c (USE_REL): Likewise.
5839 * elf32-m32r.c (USE_REL): Likewise.
5840 * elf32-m68hc11.c (USE_REL): Likewise.
5841 * elf32-m68hc12.c (USE_REL): Likewise.
5842 * elf32-or32.c (USE_REL): Likewise.
5843 * elfarm-nabi.c (USE_REL): Likewise.
5844
5845 2002-10-16 Jakub Jelinek <jakub@redhat.com>
5846
5847 * config.bfd (s390-*-linux*): Add targ64_selvecs.
5848 (s390x-*-linux*): Add targ_selvecs.
5849
5850 2002-10-16 Alan Modra <amodra@bigpond.net.au>
5851
5852 * Makefile.am (BFD32_BACKENDS): Remove elfarmqnx-nabi.lo,
5853 elf32-i386-fbsd.lo, elf32-i386qnx.lo, elf32-ppcqnx.lo,
5854 elf32-sh-lin.lo, elf32-sh64-lin.lo, elf32-sh-nbsd.lo,
5855 elf32-sh64-nbsd.lo, elf32-shqnx.lo. Add elf32-qnx.lo.
5856 (BFD32_BACKENDS_CFILES): Likewise for corresponding C files.
5857 (BFD64_BACKENDS): Remove elf64-sh64-lin.lo, elf64-sh64-nbsd.lo.
5858 (BFD64_BACKENDS_CFILES): Likewise for corresponding C files.
5859 (SOURCE_HFILES): Add elf32-qnx.h.
5860 (BUILD_HFILES): Add bfdver.h.
5861 Run "make dep-am".
5862 * Makefile.in: Regenerate.
5863 * configure.in Update bfd vector dependencies.
5864 * configure: Regenerate.
5865 * elf32-i386-fbsd.c: Delete. Move code to elf32-i386.c.
5866 * elf32-i386qnx.c: Likewise.
5867 * elf32-ppcqnx.c: Delete. Move code to elf32-ppc.c.
5868 * elf32-sh-nbsd.c: Delete. Move code to elf32-sh.c.
5869 * elf32-sh-lin.c: Likewise.
5870 * elf32-shqnx.c: Likewise.
5871 * elf32-sh64-lin.c: Delete. Move code to elf32-sh64.c.
5872 * elf32-sh64-nbsd.c: Likewise.
5873 * elf64-sh64-lin.c: Delete. Move code to elf64-sh64.c.
5874 * elf64-sh64-nbsd.c: Likewise.
5875 * elfarmqnx-nabi.c: Delete. Move code to elfarm-nabi.c.
5876 * elf32-arm.h (ELF_MAXPAGESIZE): Always define.
5877 * elf32-i386.c: Remove ELF_ARCH and ELF32_I386_C_INCLUDED tests.
5878 * elf32-ppc.c: Remove ELF32_PPC_C_INCLUDED tests.
5879 * elf32-qnx.h (elf_backend_set_nonloadable_filepos): Always define.
5880 (elf_backend_is_contained_by_filepos): Likewise.
5881 (elf_backend_copy_private_bfd_data_p): Likewise.
5882 Globalize and move functions to..
5883 * elf32-qnx.c: ..here. New file.
5884 * elf32-sh.c: Remove ELF_ARCH and ELF32_SH_C_INCLUDED tests. Don't
5885 emit target vectors when INCLUDE_SHMEDIA.
5886 * elf32-sh64.c: Remove ELF_ARCH test. Move TARGET_* etc. defines to
5887 end of file.
5888 * elf64-sh64.c: Remove ELF_ARCH test.
5889 * elfarm-nabi.c: Remove ELFARM_NABI_C_INCLUDED test.
5890 * po/BLD-POTFILES.in: Regenerate.
5891 * po/SRC-POTFILES.in: Regenerate.
5892
5893 2002-10-16 Alan Modra <amodra@bigpond.net.au>
5894
5895 * elflink.h (elf_link_add_object_symbols): Error out on dynamic objects
5896 loaded with --just-symbols.
5897
5898 * elf32-i386qnx.c (TARGET_LITTLE_NAME): Define.
5899 * elf32-ppcqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
5900 * elf32-shqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
5901 * elfarmqnx-nabi.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
5902
5903 2002-10-15 Richard Henderson <rth@redhat.com>
5904
5905 * Makefile.am (BFD64_BACKENDS): Remove elf64-alpha-fbsd.
5906 (BFD64_BACKENDS_CFILES): Likewise.
5907 * configure.in (bfd_elf64_alpha_freebsd_vec): Use elf64-alpha.
5908 * elf64-alpha-fbsd.c: Remove file, move code ...
5909 * elf64-alpha.c: ... here.
5910 * Makefile.in, configure: Rebuild.
5911
5912 2002-10-14 Richard Henderson <rth@redhat.com>
5913
5914 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: Increment
5915 VALUE, not ADDEND.
5916
5917 2002-10-14 Stephen Clarke <stephen.clarke@superh.com>
5918
5919 * elf32-sh.c (elf_sh_link_hash_entry): Replace
5920 datalabel_got_offset with union of datalabel_got
5921 offset and refcount.
5922 (sh_elf_link_hash_newfunc): Initialize datalabel_got.refcount.
5923 (allocate_dynrelocs): Delete unnecessary code for
5924 STT_DATALABEL type. Create entry in got for
5925 datalabel version of symbol if datalabel_got.refcount > 0.
5926 (sh_elf_relocate_section): Use datalabel_got union.
5927 (sh_elf_gc_sweep_hook): Pull common code to initialize
5928 h and eh out of switch statement. Declare seen_stt_datalabel.
5929 Initialize it. Decrement datalabel_got.refcount for
5930 got relocs when seen_stt_datalabel is true.
5931 Decrement local_got_refcounts entry for datalabel got relocs
5932 of local symbols.
5933 (sh_elf_copy_indirect_symbol): Copy datalabel_got field over.
5934 (sh_elf_check_relocs): Declare seen_stt_datalabel.
5935 Initialize it. When seen_stt_datalabel is true, increment
5936 datalabel_got refcount rather than got.refcount.
5937 (sh_elf_finish_dynamic_symbol): Create relocs to
5938 initialize got entry for datalabel version of symbol.
5939
5940 2002-10-14 Alan Modra <amodra@bigpond.net.au>
5941
5942 * Makefile.am: Run "make dep-am".
5943 (BFD_H_FILES): Remove version.h.
5944 * bfd-in.h (BFD_VERSION, BFD_VERSION_DATE, BFD_VERSION_STRING): Move..
5945 * version.h: ..to here.
5946 * configure.in (bfd_version_date): Remove.
5947 (AC_OUTPUT): Make bfdver.h from version.h.
5948 * bfd.c: #include "bfdver.h".
5949 * vms-hdr.c: Likewise.
5950 * Makefile.in: Regenerate.
5951 * bfd-in2.h: Regenerate.
5952 * configure: Regenerate.
5953 * po/SRC-POTFILES.in: Regenerate.
5954
5955 2002-10-14 Alan Modra <amodra@bigpond.net.au>
5956
5957 * archures.c (bfd_mach_i386_i386, bfd_mach_i386_i8086,
5958 bfd_mach_i386_i386_intel_syntax, bfd_mach_x86_64,
5959 bfd_mach_x86_64_intel_syntax bfd_mach_ppc, bfd_mach_ppc64,
5960 bfd_mach_rs6k, bfd_mach_d10v, bfd_mach_sh, bfd_mach_v850,
5961 bfd_mach_arc_5, bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8,
5962 bfd_mach_m32r, bfd_mach_frv, bfd_mach_frvsimple,
5963 bfd_mach_ia64_elf64, bfd_mach_ia64_elf32,
5964 bfd_mach_ip2022, bfd_mach_ip2022ext,
5965 bfd_mach_s390_31, bfd_mach_s390_64, bfd_mach_xstormy16): Renumber.
5966 * bfd-in2.h: Regenerate.
5967
5968 2002-10-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5969
5970 * config.bfd (sh*eb-*-linux*, sh*-*-linux*): Add the alternative
5971 endian vector to targ_selvecs.
5972
5973 2002-10-13 Alexandre Oliva <aoliva@redhat.com>
5974
5975 * elfxx-mips.c (mips_elf_calculate_relocation): Take
5976 save_addend argument. Don't apply the 32-bit mask to a
5977 GPREL32 value if it's to be used in another relocation. Don't
5978 use forced-check computation of local_p to decide whether to
5979 add gp0 to GPREL16 value. Don't use only the lowest 16 bits
5980 of the addend of a non-in-place GPREL16 relocation.
5981 (_bfd_mips_elf_relocate_section): Pass use_saved_addend_p to
5982 mips_elf_calculate_relocation().
5983
5984 2002-10-12 Stephane Carrez <stcarrez@nerim.fr>
5985
5986 * elf32-m68hc11.c (m68hc11_elf_relax_section): Don't treat relocs
5987 with symbols in other sections if we relaxed something; the sections
5988 output offsets must be re-computed before.
5989
5990 2002-10-12 Stephane Carrez <stcarrez@nerim.fr>
5991
5992 * elf32-m68hc11.c (m68hc11_elf_relax_section): Update symbols
5993 handling to use Elf_Internal_Sym.
5994 (m68hc11_elf_relax_delete_bytes): Likewise.
5995
5996 2002-10-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5997
5998 * elf32-sh.c (sh_elf_optimized_tls_reloc, sh_elf_mkobject,
5999 sh_elf_object_p, dtpoff_base): New functions.
6000 (sh_elf_howto_table): Add TLS relocs.
6001 (sh_reloc_map): Likewise.
6002 (sh_elf_info_to_howto): Support TLS relocs.
6003 (elf_sh_link_hash_entry): Add tls_type and tls_tpoff32.
6004 (sh_elf_hash_entry, sh_elf_tdata, sh_elf_local_got_tls_type):
6005 New macros.
6006 (sh_elf_obj_tdata): New.
6007 (elf_sh_link_hash_table): Add tls_ldm_got.
6008 (sh_elf_link_hash_table_create): Clear refcount of tls_ldm_got.
6009 (allocate_dynrelocs): Support TLS relocs.
6010 (sh_elf_size_dynamic_sections): Likewise.
6011 (sh_elf_relocate_section): Support TLS relocs. Don't try to find
6012 .rela.got section when found already. Return false after printing
6013 error about unresolvable relocation.
6014 (sh_elf_gc_sweep_hook): Support TLS relocs.
6015 (sh_elf_check_relocs): Likewise.
6016 (sh_elf_finish_dynamic_symbol): Likewise.
6017 (bfd_elf32_mkobject, elf_backend_object_p): Define for TLS case.
6018 * reloc.c: Add SH TLS relocs.
6019 * bfd-in2.h, libbfd.h: Regenerate.
6020
6021 2002-10-11 Daniel Jacobowitz <drow@mvista.com>
6022
6023 * Makefile.in: Regenerated.
6024
6025 2002-10-11 Daniel Jacobowitz <drow@mvista.com>
6026
6027 * Makefile.am: Run dep-am.
6028 (BFD_H_DEP): Add simple.c and linker.c.
6029 (BFD32_LIBS): Add simple.lo.
6030 (BFD32_LIBS_CFILES): Add simple.c.
6031 * Makefile.in: Regenerated.
6032 * bfd-in2.h: Regenerated.
6033 * simple.c: New file.
6034
6035 2002-10-11 Alan Modra <amodra@bigpond.net.au>
6036
6037 * coff-arm.c (record_arm_to_thumb_glue): Avoid type-punned pointers.
6038 (record_thumb_to_arm_glue): Likewise.
6039 * ecoff.c (ecoff_link_add_externals): Likewise.
6040 * elf32-arm.h (record_arm_to_thumb_glue): Likewise.
6041 (record_thumb_to_arm_glue): Likewise.
6042 * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
6043 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
6044 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
6045 * elf64-alpha.c (elf64_alpha_create_dynamic_sections): Likewise.
6046 * elf64-ppc.c (func_desc_adjust): Likewise.
6047 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
6048 (sh64_elf64_create_dynamic_sections): Likewise.
6049 * elflink.c (_bfd_elf_create_got_section): Likewise.
6050 (_bfd_elf_create_dynamic_sections): Likewise.
6051 (_bfd_elf_create_linker_section): Likewise.
6052 * elflink.h (elf_add_default_symbol): Likewise.
6053 (elf_link_create_dynamic_sections): Likewise.
6054 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
6055 * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Likewise.
6056 * elfxx-mips.c (mips_elf_create_got_section): Likewise.
6057 (_bfd_mips_elf_add_symbol_hook): Likewise.
6058 (_bfd_mips_elf_create_dynamic_sections): Likewise.
6059 * linker.c (generic_link_add_symbol_list): Likewise.
6060 * xcofflink.c (xcoff_link_add_symbols): Likewise.
6061
6062 * elfxx-ia64.c (oor_brl, oor_ip): Conditionally define.
6063
6064 * elf64-ppc.c (edit_opd): Only zero opd syms when function is
6065 completely removed. Correct local sym adjustment.
6066
6067 2002-10-10 Stephen Clarke <stephen.clarke@superh.com>
6068
6069 * elf32-sh.c (elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
6070 Correct mistake in calculation of address of .got.
6071 * elf64-sh64.c (elf_sh64_pic_plt_entry_be,
6072 elf_sh64_pic_plt_entry_le): Likewise.
6073
6074 2002-10-09 Richard Shann <richard.shann@superh.com>
6075 Stephen Clarke <stephen.clarke@superh.com>
6076
6077 * Makefile.am: Add entries for elf32-sh64-lin.c and
6078 elf64-sh64-lin.c. Regenerate.
6079 * Makefile.in: Regenerate.
6080 * config.bfd: Change sh64eb-*-linux* and sh64-*-linux*
6081 to use sh64 vectors rather than sh vectors.
6082 * configure.in: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
6083 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
6084 * configure: Regenerate.
6085 * elf32-sh64-lin.c: New file.
6086 * elf64-sh64-lin.c: New file.
6087 * targets.c: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
6088 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
6089
6090 2002-10-08 H.J. Lu <hjl@gnu.org>
6091
6092 * elf32-i386.c (elf_i386_relocate_section): Re-arrange the
6093 IE->LE transition for R_386_TLS_IE.
6094
6095 2002-10-08 Alan Modra <amodra@bigpond.net.au>
6096
6097 * elf64-ppc.c (edit_opd): Correct test for discarded sections.
6098
6099 2002-10-07 Mark Elbrecht <snowball3@softhome.net>
6100
6101 * cofflink.c (mark_relocs): Don't mark relocations in excluded
6102 sections.
6103
6104 2002-10-07 Alan Modra <amodra@bigpond.net.au>
6105
6106 * elflink.h (elf_link_input_bfd): Remove BFD_VERSION_DATE dependent
6107 code.
6108
6109 * elf64-ppc.c (ppc64_elf_build_stubs): Increment .glink indx.
6110
6111 2002-10-06 Alan Modra <amodra@bigpond.net.au>
6112
6113 * opncls.c: Formatting.
6114 (_bfd_new_bfd): Use a smaller section hash table.
6115
6116 2002-10-05 Alexandre Oliva <aoliva@redhat.com>
6117
6118 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Set the type
6119 of the other two relocations packed with a REL32 to NONE.
6120
6121 2002-10-02 Stephen Clarke <stephen.clarke@superh.com>
6122
6123 * elf32-sh.c (elf_sh_link_hash_entry): Add gotplt_refcount.
6124 (sh_elf_link_hash_newfunc): Initialize it.
6125 (allocate_dynrelocs): Transfer gotplt refs from plt.refcount
6126 to got.refcount for symbols that are forced local or when
6127 we have direct got refs.
6128 (sh_elf_gc_sweep_hook): Adjust gotplt_refcount. Use it
6129 to correctly adjust got.refcount and plt.refcount.
6130 (sh_elf_copy_indirect_symbol): Copy gotplt_refcount across.
6131 (sh_elf_check_relocs): Increment gotplt_refcount.
6132
6133 2002-10-01 Jakub Jelinek <jakub@redhat.com>
6134
6135 * elf32-i386.c (elf_i386_relocate_section): Fix
6136 movl foo@indntpoff, %eax IE->LE transition.
6137
6138 2002-10-01 Jakub Jelinek <jakub@redhat.com>
6139
6140 * elf64-x86-64.c (elf64_x86_64_relocate_section): Change TLSGD
6141 sequence and its transitions.
6142
6143 2002-10-01 Jakub Jelinek <jakub@redhat.com>
6144
6145 * elf32-i386.c (elf_i386_relocate_section): Resolve R_386_TLS_LDO_32
6146 to st_value + addend in non-code sections.
6147 * elf64-x86-64.c (elf64_x86_64_relocate_section): Resolve
6148 R_X86_64_DTPOFF32 to st_value + addend in non-code sections.
6149
6150 2002-09-30 Gavin Romig-Koch <gavin@redhat.com>
6151 Ken Raeburn <raeburn@cygnus.com>
6152 Aldy Hernandez <aldyh@redhat.com>
6153 Eric Christopher <echristo@redhat.com>
6154 Richard Sandiford <rsandifo@redhat.com>
6155
6156 * archures.c (bfd_mach_mips4120, bfd_mach_mips5400): New.
6157 (bfd_mach_mips5500): New.
6158 * cpu-mips.c (I_mips4120, I_mips5400, I_mips5500): New.
6159 (arch_info_struct): Add corresponding entries here.
6160 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_4120,
6161 E_MIPS_MACH_5400 and E_MIPS_MACH_5500.
6162 (_bfd_mips_elf_final_write_processing): Handle bfd_mach_mips4120,
6163 bfd_mach_mips5400 and bfd_mach_mips5500.
6164 (_bfd_mips_elf_mach_extends_p): New function.
6165 (_bfd_mips_elf_merge_private_bfd_data): Use it to help merge
6166 the EF_MIPS_MACH flags.
6167 * bfd-in2.h: Regenerate.
6168
6169 2002-09-28 Jason Thorpe <thorpej@wasabisystems.com>
6170
6171 * elf32-vax.c (elf_vax_size_dynamic_section): Don't strip
6172 .got sections.
6173
6174 2002-09-28 Alan Modra <amodra@bigpond.net.au>
6175
6176 * elf.c (map_sections_to_segments): Correct test for start of
6177 writable section in the same page as end of read-only section.
6178
6179 2002-09-27 Matt Thomas <matt@3am-software.com>
6180
6181 * elf32-vax.c (elf_vax_check_relocs): Remove unused
6182 local_got_refcounts usage. Remove allocation of got slot.
6183 (elf_vax_gc_sweep_hook): Remove unused local_got_refcounts usage.
6184 Remove de-allocation of got slot.
6185 (elf_vax_size_dynamic_section): Fix some indentation. Add hash
6186 traversal for elf_vax_instantiate_got_entries. Allow empty .got
6187 sections to be GC'ed.
6188 (elf_vax_instantiate_got_entries): New function.
6189 (elf_vax_relocate_section): Simplify R_VAX_GOT32 handling. Remove
6190 tests that are now handled by elf_vax_instantiate_got_entries.
6191 Assert GOT entry falls within .got section size. Remove redundant
6192 comparisions. Fix comments.
6193
6194 2002-09-27 Jakub Jelinek <jakub@redhat.com>
6195
6196 * reloc.c: Add x86-64 TLS relocs.
6197 * bfd-in2.h, libbfd.h: Rebuilt.
6198 * elf64-x86-64.c (x86_64_elf_howto): Fix size fields for 32-bit
6199 relocs. Add TLS relocs.
6200 (x86_64_reloc_map): Add TLS relocs.
6201 (elf64_x86_64_info_to_howto): Adjust for added TLS relocs.
6202 (struct elf64_x86_64_link_hash_entry): Add tls_type field.
6203 (GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD, GOT_TLS_IE): Define.
6204 (elf64_x86_64_hash_entry): Define.
6205 (struct elf64_x86_64_obj_tdata): New.
6206 (elf64_x86_64_tdata, elf64_x86_64_local_got_tls_type): Define.
6207 (struct elf64_x86_64_link_hash_table): Add tls_ld_got.
6208 (link_hash_newfunc): Initialize tls_type.
6209 (elf64_x86_64_link_hash_table_create): Initialize tls_ld_got.
6210 (elf64_x86_64_copy_indirect_symbol): Swap tls_type if necessary.
6211 (elf64_x86_64_mkobject): New.
6212 (elf64_x86_64_elf_object_p): Allocate struct elf64_x86_64_obj_tdata.
6213 (elf64_x86_64_tls_transition): New.
6214 (elf64_x86_64_check_relocs): Add r_type variable and use it.
6215 Handle TLS relocs.
6216 (elf64_x86_64_gc_sweep_hook): Handle TLS relocs.
6217 (allocate_dynrelocs): Allocate GOT space for TLS relocs.
6218 (elf64_x86_64_size_dynamic_sections): Likewise.
6219 (dtpoff_base, tpoff): New.
6220 (elf64_x86_64_relocate_section): Handle TLS relocs.
6221 (elf64_x86_64_finish_dynamic_symbol): Only handle non-TLS GOT
6222 entries.
6223 (bfd_elf64_mkobject): Define.
6224
6225 * elf32-i386.c (elf_i386_check_relocs) [R_386_TLS_LE]: Set
6226 DF_STATIC_TLS if shared.
6227
6228 2002-09-26 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6229
6230 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Don't emit unneeded
6231 empty relocation sections.
6232
6233 2002-09-26 Alan Modra <amodra@bigpond.net.au>
6234
6235 * elf64-ppc.c (ppc_build_one_stub): Don't build glink stubs here.
6236 (ppc64_elf_build_stubs): Build them here instead.
6237
6238 2002-09-24 Jakub Jelinek <jakub@redhat.com>
6239
6240 * elf32-sparc.c (elf32_sparc_relocate_section): Put R_SPARC_RELATIVE
6241 addend into r_addend, not *r_offset.
6242 (elf32_sparc_finish_dynamic_symbol): Likewise.
6243 * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Clear xword at
6244 R_SPARC_RELATIVE's r_offset.
6245
6246 2002-09-23 Nathan Tallent <eraxxon@alumni.rice.edu>
6247
6248 * dwarf2.c (decode_line_info): Update to correctly decode
6249 the (non-standard DWARF2) out-of-order address sequences
6250 generated by the Intel C++ 6.0 compiler for ia64-Linux.
6251
6252 2002-09-23 Mark Elbrecht <snowball3@softhome.net>
6253
6254 * config.bfd: For DJGPP targets, match with any cpu and any machine.
6255
6256 2002-09-23 Alan Modra <amodra@bigpond.net.au>
6257
6258 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Zero relocs
6259 for discarded FDEs. Remove redundant assignment.
6260 * elflink.h (elf_bfd_discard_info): Save edited relocs.
6261
6262 2002-09-22 H.J. Lu <hjl@gnu.org>
6263
6264 * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Don't merge
6265 the relocation count between different .reloc sections.
6266
6267 2002-09-21 Alan Modra <amodra@bigpond.net.au>
6268
6269 * elf32-ppc.c (ppc_elf_relocate_section): Allow ".sbss.*" and
6270 ".sdata.*" for R_PPC_SDAREL16, ".sbss2*" and ".sdata2*" for
6271 R_PPC_EMB_SDA2REL. Similarly for R_PPC_EMB_SDA21 and
6272 R_PPC_EMB_RELSDA.
6273
6274 * elfcode.h (elf_slurp_reloc_table_from_section): Make "symcount"
6275 unsigned. Move "symcount" assignment out of loop.
6276 * Makefile.am: Run "make dep-am".
6277 * Makefile.in: Regenerate.
6278 * configure: Regenerate.
6279 * po/SRC-POTFILES.in: Regnerate.
6280
6281 2002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
6282
6283 * dwarf2.c (_bfd_dwarf2_find_nearest_line): If address length is
6284 zero, set it to 8 for (non-standard) 64-bit DWARF2 formats
6285 (e.g. IRIX64).
6286
6287 2002-09-19 Jakub Jelinek <jakub@redhat.com>
6288
6289 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Clear .got word
6290 even if generating R_PPC_RELATIVE reloc.
6291 (ppc_elf_relocate_section): Make sure relocation is performed
6292 if skip == -2. Clear memory at r_offset when creating dynamic
6293 relocation.
6294
6295 2002-09-19 Jakub Jelinek <jakub@redhat.com>
6296
6297 * reloc.c (BFD_RELOC_386_TLS_TPOFF, BFD_RELOC_386_TLS_IE,
6298 BFD_RELOC_386_TLS_GOTIE): Add.
6299 * bfd-in2.h, libbfd.h: Rebuilt.
6300 * elf32-i386.c (elf_howto_table): Add R_386_TLS_TPOFF, R_386_TLS_IE
6301 and R_386_TLS_GOTIE.
6302 (elf_i386_reloc_type_lookup): Handle it.
6303 (struct elf_i386_link_hash_entry): Change tls_type type to unsigned
6304 char instead of enum, change GOT_* into defines.
6305 (GOT_TLS_IE_POS, GOT_TLS_IE_NEG, GOT_TLS_IE_BOTH): Define.
6306 (elf_i386_tls_transition): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
6307 (elf_i386_check_relocs): Likewise. Avoid crash if local symbol is
6308 accessed both as normal and TLS symbol. Move R_386_TLS_LDM and
6309 R_386_PLT32 cases so that R_386_TLS_IE can fall through.
6310 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
6311 (elf_i386_gc_sweep_hook): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
6312 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
6313 (allocate_dynrelocs): Allocate 2 .got and 2 .rel.got entries if
6314 tls_type is GOT_TLS_IE_BOTH.
6315 (elf_i386_size_dynamic_sections): Likewise.
6316 (elf_i386_relocate_section): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
6317 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
6318 (elf_i386_finish_dynamic_symbol): Use tls_type & GOT_TLS_IE to catch
6319 all 4 GOT_TLS_* TLS types.
6320
6321 2002-09-19 Nick Clifton <nickc@redhat.com>
6322
6323 * elflink.h (elf_fix_symbol_flags): When examining weak symbols,
6324 follow indirect links.
6325
6326 2002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
6327
6328 * ecoffswap.h (ecoff_swap_pdr_in) <isym, iline>: Update to
6329 correctly sign-extend 32-bit ECOFF null values (0xffffffff, -1)
6330 on 64 bit machines.
6331 (ecoff_swap_sym_in) <iss>: Likewise.
6332 * ecoff.c (_bfd_ecoff_slurp_symbolic_info): Fix error reading
6333 ECOFF information: 'ioptMax' refers to the actual *size*
6334 of the optimization symtab, not the number of entries.
6335
6336 2002-09-19 Daniel Jacobowitz <drow@mvista.com>
6337
6338 * elf32-arm.h (elf32_arm_adjust_dynamic_symbol): Update
6339 ELF_LINK_HASH_NEEDS_PLT logic.
6340
6341 2002-09-18 Daniel Jacobowitz <drow@mvista.com>
6342
6343 * elfcode.h (elf_slurp_reloc_table_from_section): Check
6344 correct relocation count.
6345
6346 2002-09-17 Daniel Jacobowitz <drow@mvista.com>
6347
6348 * bfd-in.h (bfd_get_dynamic_symcount): Define.
6349 * bfd.c (struct _bfd): Add dynsymcount.
6350 * bfd-in2.h: Regenerated.
6351 * elf.c (_bfd_elf_canonicalize_dynamic_symtab): Set
6352 abfd->dynsymcount.
6353 * elfcode.h (elf_slurp_reloc_table_from_section): Check
6354 for overflow.
6355
6356 2002-09-17 Stan Cox <scox@redhat.com>
6357
6358 * elf64-mips.c (mips_elf64_be_swap_reloca_out): Handle type2 and type3.
6359 (mips_elf64_final_gp): Don't make up gp value.
6360 * elfn32-mips.c (mips_elf_final_gp): Likewise.
6361 * elfxx-mips.c (_bfd_mips_elf_final_link): Always create
6362 .MIPS.options/.options section.
6363
6364 2002-09-17 David O'Brien <obrien@FreeBSD.org>
6365
6366 * elf32-i386-fbsd.c: Always label using the EI_OSABI method.
6367 It is benign for FreeBSD < 4.1. Minor reformatting.
6368 * elf64-alpha-fbsd.c: Likewise.
6369
6370 2002-09-17 Jakub Jelinek <jakub@redhat.com>
6371
6372 * elf32-i386.c (elf_i386_relocate_section) [R_386_TLS_TPOFF32]: Negate
6373 addend.
6374
6375 2002-09-17 Alan Modra <amodra@bigpond.net.au>
6376
6377 * elf64-alpha.c (alpha_elf_size_info): Make static.
6378
6379 2002-09-17 Svein E. Seldal <Svein.Seldal@solidas.com>
6380
6381 * coff-tic4x.c: Add function declarations and ATTRIBUTE_UNUSED.
6382 * cpu-tic4x.c: Ditto.
6383
6384 2002-09-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6385
6386 * elf64-mips.c (define elf_backend_ignore_discarded_relocs): Remove
6387 duplicate define.
6388
6389 2002-09-16 Bruno Haible <bruno@clisp.org>
6390
6391 * elf32-i386.c: Don't defined ELF_ARCH etc. if this file is included
6392 by a target variant implementation.
6393 * elf64-alpha.c: Likewise.
6394 * elf32-i386-fbsd.c: New file.
6395 * elf64-alpha-fbsd.c: New file.
6396 * targets.c: Support bfd_elf32_i386_freebsd_vec and
6397 bfd_elf64_alpha_freebsd_vec.
6398 * configure.in: Accept the vectors bfd_elf32_i386_freebsd_vec,
6399 bfd_elf64_alpha_freebsd_vec.
6400 * Makefile.am (BFD32_BACKENDS): Add elf32-i386-fbsd.lo.
6401 (BFD32_BACKENDS_CFILES): Add elf32-i386-fbsd.c.
6402 (BFD64_BACKENDS): Add elf64-alpha-fbsd.lo.
6403 (BFD64_BACKENDS_CFILES): Add elf64-alpha-fbsd.c.
6404 (elf32-i386-fbsd.lo, elf64-alpha-fbsd.lo): Add dependencies.
6405 * config.bfd: For FreeBSD targets, set targ_defvec to a FreeBSD
6406 specific targets. Define OLD_FREEBSD_ABI_LABEL if appropriate.
6407
6408 2002-09-12 Jakub Jelinek <jakub@redhat.com>
6409
6410 * elf32-i386.c (dtpoff_base, tpoff): Don't crash if tls_segment is
6411 NULL.
6412 (elf_i386_relocate_section): Return false after printing error about
6413 unresolvable relocation.
6414
6415 2002-09-12 Nick Clifton <nickc@redhat.com>
6416
6417 * elf32-arm.h (elf32_arm_final_link_relocate): Fix handling of
6418 R_ARM_THM_PC11.
6419
6420 2002-09-11 Jeffrey Law <law@redhat.com>
6421
6422 * elf32-h8300.c (elf32_h8_relax_section): Fix typo.
6423
6424 2002-09-11 Andrew Haley <aph@cambridge.redhat.com>
6425
6426 * elf.c (_bfd_elf_find_nearest_line): Check functionname_ptr and
6427 line_ptr before deciding we've found a symbol.
6428
6429 2002-09-11 Nick Clifton <nickc@redhat.com>
6430
6431 * po/da.po: New Danish translation file.
6432 * configure.in (LINGUAS): Add 'da'.
6433 * configure: Regenerate.
6434
6435 2002-09-10 Michael Snyder <msnyder@redhat.com>
6436
6437 * irix-core.c (do_sections, do_sections64): New functions.
6438 (irix_core_core_file_p): Call new functions do_sections,
6439 do_sections64, depending on corefile (32-bit or 64-bit).
6440
6441 2002-09-09 Richard Henderson <rth@redhat.com>
6442
6443 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21M
6444 and PCREL21F like PCREL21B.
6445
6446 2002-09-04 Kevin Buettner <kevinb@redhat.com>
6447
6448 * config.bfd (mips*-*-irix6*): Add new ABI vectors. Make n32 default
6449 vector.
6450
6451 2002-09-02 Nick Clifton <nickc@redhat.com>
6452
6453 * elf32-v850.c (v850_elf_final_link_relocate): Use helpful
6454 names instead of cryptically overloaded bfd_reloc error
6455 codes.
6456 (v850_elf_relocate_section): Likewise.
6457 (v850_elf_relax_section): Replace caching of external symbols
6458 with caching of internal symbols obtained from calling
6459 bfd_elf_get_elf_syms().
6460 Fixup problems with freeing cached allocated memory blocks.
6461
6462 2002-09-02 Alan Modra <amodra@bigpond.net.au>
6463
6464 * cpu-pj.c (scan_mach, compatible, arch_info_struct): Remove.
6465 (bfd_pj_arch): Use bfd_default_scan.
6466 * cpu-v850.c (scan): Remove.
6467 (N): Use bfd_default_scan.
6468 * cpu-z8k.c (scan_mach): Remove.
6469 (arch_info_struct, bfd_z8k_arch): Reorganize so that the default is
6470 first. Use bfd_default_scan.
6471
6472 * ecoff.c (_bfd_ecoff_set_arch_mach_hook): Don't use hard-coded
6473 bfd_mach constants.
6474 (ecoff_get_magic): Likewise.
6475 * elf32-v850.c (v850_elf_object_p): Likewise.
6476 (v850_elf_final_write_processing): Likewise.
6477 * mipsbsd.c (MY(set_arch_mach)): Likewise.
6478 (MY(write_object_contents)): Likewise.
6479 * coff64-rs6000.c (xcoff64_write_object_contents): Likewise.
6480 * coffcode.h (coff_write_object_contents): Likewise.
6481 (coff_set_arch_mach_hook): Add comment describing machine == 0.
6482 Remove unnecessary "machine" assignments.
6483 (coff_write_relocs): Test for the absolute section sym by testing
6484 section and flags.
6485
6486 * aoutx.h (NAME(aout,machine_type)): Recognize bfd_mach_i386_i386
6487 and bfd_mach_i386_i386_intel_syntax.
6488 * pdp11.c (NAME(aout,machine_type)): Likewise.
6489
6490 2002-08-30 John David Anglin <dave@hiauly1.hia.nrc.ca>
6491
6492 * bfd-in.h (align_power): Cast constants to bfd_vma type.
6493 * bfd-in2.h (align_power): Likewise.
6494
6495 2002-08-30 Alan Modra <amodra@bigpond.net.au>
6496
6497 * Makefile.am: Run "make dep-am".
6498 * Makefile.in: Regenerate.
6499
6500 * cpu-avr.c (compatible): Don't use hard-coded mach constants.
6501 * cpu-powerpc.c (powerpc_compatible): Likewise.
6502 * cpu-rs6000.c (rs6000_compatible): Likewise.
6503
6504 2002-08-28 Catherine Moore <clm@redhat.com>
6505
6506 * elf32-v850.c (v850_elf_reloc_map): Add new relocs.
6507 (v850-elf-reloc): Don't resolve pc relative relocs.
6508 (v850_elf_ignore_reloc): New routine.
6509 (v850_elf_final_link_relocate): Handle new relocs.
6510 (v850_elf_relax_delete_bytes ): New routine.
6511 (v850_elf_relax_section): New routine.
6512 (bfd_elf32_bfd_relax_section): Define.
6513 (HOWTO): New entries for new relocs.
6514 * reloc.c (BFD_RELOC_V850_LONGCALL): New reloc.
6515 (BFD_RELOC_V850_LONGJUMP): New reloc.
6516 (BFD_RELOC_V850_ALIGN): New reloc.
6517 * archures.c: Remove redundant v850ea architecture.
6518 * cpu-v850.c: Remove redundant v850ea support.
6519 * libbfd.h: Regenerate.
6520 * bfd-in2.h: Regenerated.
6521
6522 2002-08-28 Svein E. Seldal <Svein.Seldal@solidas.com>
6523
6524 * config.bfd: Add tic4x-*-*coff* and c4x-*-*coff* target.
6525 * configure.in: Add tic4x_coff vector files.
6526 * configure: Regenerate.
6527 * Makefile.am: Add tic4x target.
6528 * Makefile.in: Regenerate.
6529
6530 2002-08-27 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
6531
6532 * archures.c: Add the BFD arch type tic4x.
6533 * bfd-in.h: Add BFD_IN_MEMORY flag.
6534 * coff-tic4x.c: New file.
6535 * coffswap.h (coff_swap_sym_out): Add preadjuster.
6536 * cpu-tic4x.c: New file.
6537 * targets.c: Added tic4x- in list of xvecs.
6538 * ticoff.h: New file.
6539 * bfd-in2.h: Regenerate.
6540
6541 2002-08-27 Adam Nemet <anemet@lnxw.com>
6542
6543 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Set the last
6544 bit of DT_INIT and DT_FINI for Thumb functions.
6545
6546 2002-08-26 Alan Modra <amodra@bigpond.net.au>
6547
6548 * coffcode.h (coff_set_arch_mach_hook): Handle W65MAGIC.
6549
6550 2002-08-26 Alan Modra <amodra@bigpond.net.au>
6551
6552 * aoutx.h (NAME(aout,reloc_type_lookup)): Handle BFD_RELOC_8.
6553
6554 2002-08-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6555
6556 * elf32-sh.c (sh_elf_copy_indirect_symbol): New.
6557 (create_got_section, allocate_dynrelocs, readonly_dynrelocs):
6558 Likewise.
6559 (struct elf_sh_pcrel_relocs_copied): Removed.
6560 (struct elf_sh_dyn_relocs): New.
6561 (struct elf_sh_link_hash_entry): Replace pcrel_relocs_copied
6562 field with dyn_relocs.
6563 (struct elf_sh_link_hash_table): Add short-cuts to get dynamic
6564 sections and sym_sec.
6565 (sh_elf_link_hash_newfunc): Clear dyn_relocs.
6566 (sh_elf_link_hash_table_create): Clear shorts-cuts and sym_sec.
6567 (sh_elf_create_dynamic_sections): Use create_got_section instead
6568 of _bfd_elf_create_got_section.
6569 (sh_elf_check_relocs): Likewise.
6570 (sh_elf_create_dynamic_sections): Use short-cuts to the dynamic
6571 sections.
6572 (sh_elf_adjust_dynamic_symbol, sh_elf_size_dynamic_sections,
6573 sh_elf_relocate_section, sh_elf_check_relocs,
6574 sh_elf_finish_dynamic_symbol, sh_elf_finish_dynamic_sections):
6575 Likewise.
6576 (sh_elf_adjust_dynamic_symbol): Handle nocopyreloc. Keep the
6577 dynamic relocations and avoiding the copy relocation when we
6578 didn't find any dynamic relocations in the section which has
6579 contents or is read-only.
6580 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
6581 (sh_elf_size_dynamic_sections): Don't reset the size of
6582 .rela.got section even if dynamic_sections_created flag is off.
6583 Don't use sh_elf_discard_copies. Scan all input bfd and use
6584 allocate_dynrelocs. Call readonly_dynrelocs to determine
6585 whether we need DT_TEXTREL.
6586 (sh_elf_adjust_dynamic_symbol): Use plt.refcount to determine
6587 whether the symbol was never referred to.
6588 (sh_elf_relocate_section): Use WILL_CALL_FINISH_DYNAMIC_SYMBOL.
6589 (sh_elf_gc_sweep_hook): Fill with the real sweep function.
6590 (sh_elf_check_relocs): Call create_got_section if the short-cut
6591 to .got is null. Increment reference counters only instead of
6592 allocating space on dynamic sections here. Don't conditionalize
6593 uninitialized got.offset value when marking the symbol as a
6594 global offset table entry. Keep relocations for symbols satisfied
6595 by a dynamic library to avoid copy relocations for the symbol.
6596 Set dynobj field of an elf hash table if needed.
6597 (sh_elf_finish_dynamic_sections): Handle null section pointer
6598 correctly.
6599 (elf_backend_copy_indirect_symbol): Defined.
6600 (elf_backend_can_refcount): Defined.
6601
6602 2002-08-23 Nick Clifton <nickc@redhat.com>
6603
6604 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Undo
6605 previous change. Add comment explaining why.
6606
6607 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>
6608
6609 * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le): Copy
6610 contents of .got.plt[2] to tr0, not address of .got.plt.
6611 (sh_elf_finish_dynamic_symbol): Do not apply GOT_BIAS when
6612 patching absolute plt entry. For shmedia plt entry, set bottom bit
6613 of branch to plt0 as this is a branch to an shmedia instruction.
6614 * elf64-sh64.c (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le):
6615 Copy contents of .got.plt[2] to tr0, not address of .got.plt.
6616 (elf_sh64_plt_entry_be, elf_sh64_plt_entry_le): Use ptrel to
6617 branch to plt0.
6618 (sh64_elf64_finish_dynamic_symbol): Do not apply GOT_BIAS when
6619 patching absolute plt entry. For shmedia plt entry, branch to
6620 plt0 is now ptrel, so use relative offset. Set bottom bit of
6621 branch target as it is a branch to an shmedia instruction.
6622
6623 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>,
6624 Richard Shann <richard.shann@superh.com>
6625
6626 * elf32-sh.c (sh_elf_finish_dynamic_sections): Set LSB of DT_INIT
6627 value if .init is an SHmedia function. Similarly for DT_FINI.
6628 * elf64-sh64.c (sh64_elf64_finish_dynamic_sections): Likewise.
6629
6630 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>
6631
6632 * elf32-sh.c (sh_elf_size_dynamic_sections): Zero initialize
6633 dynamic section.
6634 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
6635
6636 2002-08-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6637
6638 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use a simple
6639 byte read when reading the return address register column.
6640
6641 2002-08-22 Nick Clifton <nickc@redhat.com>
6642
6643 * config.bfd: Add powepc64-*-*bsd* target.
6644
6645 2002-08-22 Graeme Peterson <gp@qnx.com>
6646
6647 * Makefile.am: Add entries for elf32-shqnx.c
6648 * Makefile.in: Regenerate.
6649 * config.bfd: Add support sh-*-nto* target.
6650 * configure.in: Add support for bfd_elf32_sh{l}qnx_vec.
6651 * configure: Regenerate.
6652 * elf32-qnx.h: Changed typo "elf_i386qnx_*" to "elf_qnx_*" .
6653 * elf32-sh.c: Do not include elf32-target.h if
6654 ELF32_SH_C_INCLUDED is defined.
6655 * elf32-shqnx.c: New file: Support for QNX.
6656 * targets.c: Add bfd_elf32_sh{l}qnx_vec.
6657
6658 2002-08-22 Nick Clifton <nickc@redhat.com>
6659
6660 * po/tr.po: Updated Turkish translation.
6661
6662 * syms.c (_bfd_generic_read_minisymbols): Set bfd_error if the
6663 symbols are not read.
6664
6665 2002-08-22 Alan Modra <amodra@bigpond.net.au>
6666
6667 * elf32-m68hc11.c: Formatting fixes.
6668 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
6669 * elf32-m68hc12.c: Formatting fixes.
6670 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
6671
6672 2002-08-22 Alan Modra <amodra@bigpond.net.au>
6673
6674 * coff-rs6000.c (rs6000coff_vec <object_flags>): Add SEC_CODE and
6675 SEC_DATA.
6676 (pmac_xcoff_vec): Likewise.
6677 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
6678 (aix5coff64_vec): Likewise.
6679
6680 2002-08-22 Alan Modra <amodra@bigpond.net.au>
6681
6682 * elf-bfd.h (struct elf_backend_data): Add struct elf_backend_data
6683 param to elf_backend_copy_indirect_symbol.
6684 (_bfd_elf_link_hash_copy_indirect): Likewise.
6685 * elflink.h (elf_add_default_symbol, elf_fix_symbol_flags): Adjust
6686 calls to copy_indirect_symbol.
6687 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
6688 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
6689 * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
6690 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
6691 * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
6692 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
6693 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
6694 * elfxx-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
6695 * elfxx-mips.h (_bfd_mips_elf_copy_indirect_symbol): Likewise.
6696 * elf.c (_bfd_elf_link_hash_copy_indirect): Likewise. Properly
6697 test refcounts for "used" values.
6698
6699 2002-08-21 John David Anglin <dave@hiauly1.hia.nrc.ca>
6700
6701 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Add PARAMS to
6702 argument declaration.
6703
6704 2002-08-19 Elena Zannoni <ezannoni@redhat.com>
6705
6706 * archures.c (bfd_mach_ppc_e500): Added.
6707 * bfd-in2.h: Rebuilt.
6708 * cpu-powerpc.c (bfd_powerpc_archs): Added e500.
6709
6710 2002-08-19 Alan Modra <amodra@bigpond.net.au>
6711
6712 * elf32-m68hc12.c (elf_backend_can_gc_sections): False.
6713
6714 2002-08-17 Andrew Cagney <ac131313@redhat.com>
6715
6716 * elf.c (bfd_elf_get_elf_syms): Change type of `esym' to
6717 `bfd_byte'.
6718
6719 2002-08-17 Stan Cox <scox@redhat.com>
6720
6721 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Use the
6722 IRIX 6 segment layout for NEWABI.
6723
6724 2002-08-16 Stephen Clarke <stephen.clarke@superh.com>
6725
6726 * elf32-sh.c (sh_elf_gc_mark_hook): For sh64, skip indirect
6727 symbols when looking for section referred to by a relocation.
6728 * elf64-sh.c (sh_elf64_gc_mark_hook): Likewise.
6729
6730 2002-08-15 Alan Modra <amodra@bigpond.net.au>
6731
6732 * elf32-i370.c: Move reloc enum to include/elf/i370.h.
6733
6734 2002-08-15 Hans-Peter Nilsson <hp@axis.com>
6735
6736 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Add
6737 missing check for whether the symbol is referenced by DSO before
6738 unexporting it as an unneeded dynamic symbol.
6739
6740 2002-08-14 H.J. Lu <hjl@gnu.org>
6741
6742 * libbfd.h: Regenerate.
6743
6744 2002-08-14 H.J. Lu <hjl@gnu.org>
6745
6746 * config.bfd: Always add 64bit vectors to 32bit Linux/mips.
6747
6748 2002-08-14 Stephane Carrez <stcarrez@nerim.fr>
6749
6750 * elf32-m68hc11.c (m68hc11_relax_group): New to relax group of
6751 instructions.
6752 (m68hc11_direct_relax): New to define table of relaxable instructions.
6753 (find_relaxable_insn): New, find a relaxable insn.
6754 (compare_reloc): New to compare two relocs.
6755 (m68hc11_elf_relax_section): New, relax text sections.
6756 (m68hc11_elf_relax_delete_bytes): New, delete bytes and adjust branchs.
6757 (elf32_m68hc11_check_relocs): New function for GC support.
6758 (elf32_m68hc11_relocate_section): New function for GC support.
6759 (bfd_elf32_bfd_relax_section): Define to support linker relaxation.
6760 (elf_backend_check_relocs): Likewise.
6761 (elf_backend_relocate_section): Likewise.
6762
6763 2002-08-13 H.J. Lu <hjl@gnu.org>
6764
6765 * elflink.h (NAME(bfd_elf,size_dynamic_sections): Don't count
6766 definitions in shared objects when checking symbol with
6767 undefined version.
6768
6769 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6770
6771 * elf32-m68hc11.c (elf32_m68hc11_gc_mark_hook): New for section GC.
6772 (elf32_m68hc11_gc_sweep_hook): Likewise.
6773 (elf_backend_gc_mark_hook): Define for GC section support.
6774 (elf_backend_gc_sweep_hook): Likewise.
6775 (elf_backend_can_gc_sections): Likewise.
6776
6777 * elf32-m68hc12.c: Likewise.
6778
6779 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6780
6781 * elf32-m68hc11.c (_bfd_m68hc11_elf_print_private_bfd_data): New.
6782 (_bfd_m68hc11_elf_merge_private_bfd_data): New function.
6783 (_bfd_m68hc11_elf_set_private_flags): New function.
6784 Use them to set/check/print ELF flags specific to 68HC11.
6785
6786 * elf32-m68hc12.c (_bfd_m68hc12_elf_print_private_bfd_data): New.
6787 (_bfd_m68hc12_elf_merge_private_bfd_data): New function.
6788 (_bfd_m68hc12_elf_set_private_flags): New function.
6789 Use them to set/check/print ELF flags specific to 68HC12.
6790
6791 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6792
6793 * elf32-m68hc11.c (elf_m68hc11_howto_table): Add the new relocs;
6794 fix masks for PC-rel relocs.
6795 (m68hc11_elf_ignore_reloc): New function.
6796
6797 * elf32-m68hc12.c (m68hc12_elf_special_reloc): New to handle specific
6798 68HC12 banked addressing relocs.
6799 (m68hc12_phys_addr): New to compute physical address of banked memory.
6800 (m68hc12_phys_page): Likewise for page.
6801 (m68hc12_addr_is_banked): New to see if address is in banked area.
6802 (elf_m68hc12_howto_table): Add new relocs and rename to xx12.
6803
6804 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6805
6806 * reloc.c (BFD_RELOC_M68HC11_RL_JUMP, BFD_RELOC_M68HC11_RL_GROUP,
6807 BFD_RELOC_M68HC11_LO16, BFD_RELOC_M68HC11_PAGE,
6808 BFD_RELOC_M68HC11_24): New relocs for 68HC11/68HC12.
6809 * bfd-in2.h: Regenerate.
6810
6811 2002-08-12 H.J. Lu <hjl@gnu.org>
6812
6813 * elflink.h (elf_add_default_symbol): Preserve section across
6814 elf_merge_symbol.
6815
6816 2002-08-09 Graeme Peterson <gp@qnx.com>
6817
6818 * Makefile.am: Add entries for elf32-ppcqnx.c, and add
6819 elf32-qnx.h dependency to elfarmqnx-nabi.c and elf32-i386qnx.c.
6820 * Makefile.in: Regenerate.
6821 * config.bfd: Add support for powerpc{le}-*-nto targets.
6822 * configure.in: Add support for bfd_elf32_powerpc{le}qnx_vec.
6823 * configure: Regenerate.
6824 * elf32-i386qnx.c: Moved backend functions into a QNX specific
6825 common file "elf32-qnx.h", and now include that file.
6826 * elf32-qnx.h: New file: QNX specific common elf backend.
6827 * elf32-ppc.c: Do not include elf32-target.h if
6828 ELF32_PPC_C_INCLUDED is defined.
6829 * elf32-ppcqnx.c: New file: Support for QNX.
6830 * elfarmqnx-nabi.c: Include elf32-qnx.h for qnx elf backend.
6831 * targets.c: Add bfd_elf32_powerpc{le}qnx_vec.
6832
6833 2002-08-09 Nick Clifton <nickc@redhat.com>
6834
6835 * po/sv.po: Updated Swedish translation.
6836
6837 2002-08-09 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6838
6839 * elfxx-mips.c (mips_elf_global_got_index): Avoid segfault if
6840 g->global_gotsym is NULL.
6841
6842 2002-08-08 H.J. Lu <hjl@gnu.org>
6843
6844 * elflink.h (elf_add_default_symbol): Don't warn if a definition
6845 overrides an indirect versioned symbol.
6846
6847 2002-08-08 Jakub Jelinek <jakub@redhat.com>
6848
6849 * elf32-i386.c (elf_i386_relocate_section): Fill in proper addend
6850 for R_386_TLS_TPOFF32 relocs against symndx 0.
6851
6852 2002-08-07 H.J. Lu <hjl@gnu.org>
6853
6854 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Check symbol
6855 with undefined version if needed.
6856 (elf_link_assign_sym_version): Match a default symbol with a
6857 version without definition. No need to hide the default
6858 definition separately.
6859
6860 2002-08-08 Alan Modra <amodra@bigpond.net.au>
6861
6862 * elflink.h (elf_link_output_extsym): Don't output symbols from
6863 SEC_EXCLUDE sections.
6864
6865 * aoutx.h (aout_link_write_symbols): Correct handling of warning syms.
6866
6867 2002-08-07 Alan Modra <amodra@bigpond.net.au>
6868
6869 * elf64-ppc.c (edit_opd): Arrange to drop symbols for discarded .opd
6870 entries.
6871
6872 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6873
6874 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Cast signedness
6875 mismatch.
6876
6877 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6878
6879 * elfxx-mips.c (ABI_64_P): Remove superfluous check.
6880
6881 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6882
6883 * elf32-mips.c (mips_reloc_map): Fix typo.
6884
6885 2002-08-06 Alan Modra <amodra@bigpond.net.au>
6886
6887 * xcofflink.c (xcoff_write_global_symbol): Set n_scnum for abs_section.
6888
6889 2002-08-06 Alan Modra <amodra@bigpond.net.au>
6890
6891 * elf64-ppc.c (ppc64_elf_howto_raw): Zero all src_mask entries.
6892
6893 2002-08-06 Alan Modra <amodra@bigpond.net.au>
6894
6895 * libxcoff.h: Use PARAMS on function declarations.
6896 * coff-rs6000.c (xcoff_generate_rtinit): Simplify size calc.
6897 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
6898
6899 * coff-rs6000.c: (xcoff_rtype2howto): Don't place reloc address in
6900 addend.
6901 * coff64-rs6000.c: (xcoff64_rtype2howto): Likewise.
6902
6903 2002-08-06 Alan Modra <amodra@bigpond.net.au>
6904
6905 * coff-rs6000.c: Formatting fixes.
6906 (xcoff_calculate_relocation): Use PARAMS in declaration.
6907 (xcoff_complain_overflow): Likewise.
6908 (xcoff_ppc_relocate_section): Use old-style function pointer call.
6909 (bfd_xcoff_backend_data): Remove useless comments.
6910 (rs6000coff_vec): Likewise.
6911 (bfd_pmac_xcoff_backend_data): Likewise.
6912 (pmac_xcoff_vec): Likewise.
6913
6914 * coff64-rs6000.c: Formatting fixes.
6915 (xcoff64_calculate_relocation): Use PARAMS in declaration.
6916 (xcoff64_ppc_relocate_section): Use old-style function pointer call.
6917 (bfd_xcoff_backend_data): Remove useless comments.
6918 (rs6000coff64_vec): Likewise.
6919 (bfd_xcoff_aix5_backend_data): Likewise.
6920 (aix5coff64_vec): Likewise.
6921
6922 2002-08-06 Alan Modra <amodra@bigpond.net.au>
6923
6924 * coff-rs6000.c (xcoff_howto_table): Revert some of last change to
6925 mask entries. Use complain_overflow_dont for R_REF.
6926 (xcoff_reloc_type_ba): Revert last change.
6927 (xcoff_reloc_type_br): Likewise.
6928 (xcoff_reloc_type_crel): Likewise.
6929 (xcoff_ppc_relocate_section): Likewise.
6930 * coff64-rs6000.c (xcoff64_reloc_type_br): Likewise.
6931 (xcoff64_ppc_relocate_section): Likewise.
6932 (xcoff64_howto_table): Revert some of last change to mask entries.
6933 Use complain_overflow_dont for R_REF.
6934
6935 * coff-rs6000.c (xcoff_howto_table): Fix src_mask entries. Make all
6936 relocs with bitsize == 16 have size = 1.
6937 (xcoff_reloc_type_ba): Correct src_mask and dst_mask adjustment.
6938 (xcoff_reloc_type_br): Likewise.
6939 (xcoff_reloc_type_crel): Likewise.
6940 (xcoff_ppc_relocate_section): Set up src_mask and dst_mask correctly.
6941 * coff64-rs6000.c (xcoff64_reloc_type_br): Correct src_mask and
6942 dst_mask adjustment.
6943 (xcoff64_ppc_relocate_section): Set up src_mask and dst_mask correctly.
6944 (xcoff64_howto_table): Fix src_mask entries. Make all relocs with
6945 bitsize == 16 have size = 1.
6946
6947 2002-08-01 Denis Chertykov <denisc@overta.ru>
6948
6949 * elf32-ip2k.c: Processor manufacturer changed to Ubicom.
6950 (struct misc): New field isymbuf. All free_* fields removed.
6951 (symbol_value): Pass in internal syms. No need to swap syms in.
6952 (ip2k_elf_relax_section): Use bfd_elf_get_elf_syms. Properly free
6953 possibly cached info.
6954 (tidyup_after_error): Removed.
6955 (ip2k_elf_relax_section_pass1): Don't use removed fields of struct
6956 misc. Use new field.
6957 (adjust_all_relocations): Use internal syms. No need to swap syms
6958 in and out.
6959 (add_page_insn): Don't use removed fields of struct misc.
6960
6961 2002-08-01 Nick Clifton <nickc@redhat.com>
6962
6963 * elf32-arm.h: Revert previous delta.
6964
6965 2002-08-01 Nick Clifton <nickc@redhat.com>
6966
6967 * configure.in (AM_INIT_AUTOMAKE): Bump version number.
6968 * configure: Regenerate.
6969
6970 2002-07-31 H.J. Lu <hjl@gnu.org>
6971
6972 * config.bfd: Add x86-64 vector to Linux/i386 if 64bit BFD is
6973 selected.
6974
6975 2002-07-31 H.J. Lu <hjl@gnu.org>
6976
6977 * config.bfd: Add n32 vectors to 32bit Linux/mips if 64bit BFD
6978 is selected.
6979
6980 2002-07-31 Jakub Jelinek <jakub@redhat.com>
6981
6982 * elf32-i386.c (elf_i386_copy_indirect_symbol): Swap tls_type
6983 if _bfd_elf_link_hash_copy_indirect will swap got.refcount.
6984
6985 2002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
6986
6987 * cpu-ns32k.c (_bfd_ns32k_put_immdeiate, _bfd_ns32k_get_immediate):
6988 There is no 8 byte relocation type for this architecture.
6989 (do_ns32k_reloc): Use bfd_vma instead of native types.
6990 (bfd_ns32k_put_immediate, _bfd_ns32k_relocate_contents) put_data
6991 returns void.
6992 (_bfd_ns32k_put_displacement): Don't check for overflow. We can
6993 rely on generic code to do that.
6994 * aout-ns32k.c (howto_table): Add appropriate overflow detection
6995 to all table entries.
6996 (_bfd_ns32k_relocate_contents): put_data returns void.
6997 * ns32k.h: (_bfd_ns32k_put_displacement, _bfd_ns32k_put_immediate)
6998 (_bfd_do_ns32k_reloc_contents): Fix prototypes. put data functions
6999 return void.
7000
7001 2002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
7002
7003 * aoutx.h (aout_link_check_ar_symbols): Whether to include an
7004 archive object is target dependant.
7005
7006 2002-07-31 Adam Nemet <anemet@lnxw.com>
7007
7008 * elf32-arm.h (ARM_PLT_ENTRY_SIZE): Rename PLT_ENTRY_SIZE.
7009 (THUMB_PLT_ENTRY_SIZE): New macro.
7010 (PLT_ENTRY_SIZE): Return the appropriate *_PLT_ENTRY_SIZE.
7011 (elf32_arm_plt0_entry): Rename PLT_ENTRY_SIZE to
7012 ARM_PLT_ENTRY_SIZE.
7013 (elf32_arm_plt_entry): Likewise.
7014 (elf_backend_plt_header_size): Likewise.
7015 (elf32_thumb_plt0_entry): New global.
7016 (elf32_arm_finish_dynamic_sections): Use it. Put Thumb entries
7017 into .plt.thumb.
7018 (elf32_thumb_plt_entry): New global.
7019 (elf32_arm_finish_dynamic_symbol): Use it. Use .thumb.plt for
7020 Thumb entries. Set the bottom bit of the corresponding GOT entry
7021 for a Thumb PLT entry.
7022 (struct elf32_arm_plt_entry_info): New structure.
7023 (struct elf32_arm_link_hash_entry, plt_info): New member of this
7024 type.
7025 (elf32_arm_link_hash_newfunc): Initialize new member.
7026 (elf32_arm_final_link_relocate, R_ARM_THM_PC22 case): Handle
7027 relocations against the PLT.
7028 (elf32_arm_check_relocs, case R_ARM_PLT32 case): Set
7029 first_rel_type if this is the first time we encounter the symbol.
7030 (elf32_arm_check_relocs, case R_ARM_THM_PC22 case): New case.
7031 Determine if relocation needs a PLT entry. Set first_rel_type if
7032 this is the first time we encounter the symbol
7033 (elf32_arm_adjust_dynamic_symbol): Create PLT entries for Thumb
7034 functions as well.
7035 (elf32_arm_size_dynamic_sections): Handle .plt.thumb like .plt.
7036 (elf32_arm_create_dynamic_sections): New function. Create the
7037 .plt.thumb section.
7038 (elf_backend_create_dynamic_sections): Call it.
7039
7040 2002-07-31 Nick Clifton <nickc@redhat.com>
7041
7042 * bfd.c (bfd_alt_mach_code): Rename parameter 'index' to
7043 'alternative' in order to avoid shadowing global symbol of the
7044 same name.
7045 * bfd-in2.h: Regenerate.
7046 * libbfd.h: Regenerate.
7047 * libcoff.h: Regenerate.
7048
7049 2002-07-31 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7050
7051 * Makefile.am: Add n32 ABI support.
7052 * Makefile.in: Regenerate.
7053 * config.bfd: Add n32 vectors to mips64*-*-linux* targets. Treat 64
7054 bit vectors for mips*-*-linux targets as optional.
7055 * configure.in: Add n32 ABI vectors.
7056 * configure: Regenerate.
7057 * elf32-mips.c (mips_elf32_object_p): Reject n32 ABI files.
7058 * elfn32-mips.c: New file, n32 ABI support.
7059 * targets.c: Add n32 ABI vectors.
7060
7061 2002-07-30 Graeme Peterson <gp@qnx.com>
7062
7063 * elfarmqnx-nabi.c: New file: Support for QNX.
7064 * config.bfd: Add support for arm-*-nto target.
7065 * configure.in: Add support for bfd_elf32_{big|little}armqnx_vec.
7066 * configure: Regenerate.
7067 * Makefile.am: Add entries for elfarmqnx-nabi.c.
7068 * Makefile.in: Regenerate.
7069 * elf32-arm.h (ELF_MAXPAGESIZE): Do not define if already defined.
7070 Do not define global function if ELFARM_NABI_C_INCLUDED is defined.
7071 * elfarm-nabi.c: Do not include elf32-arm.h if
7072 ELFARM_NABI_C_INCLUDED is defined.
7073 * targets.c: Add bfd_elf32_{big|little}armqnx_vec.
7074
7075 2002-07-30 Nick Clifton <nickc@redhat.com>
7076
7077 * po/sv.po: Updated Swedish translation.
7078
7079 2002-07-30 Jakub Jelinek <jakub@redhat.com>
7080
7081 * elf.c (elf_fake_sections): Fix up .tbss sh_size and sh_type.
7082
7083 2002-07-30 Alan Modra <amodra@bigpond.net.au>
7084
7085 * aoutx.h (some_aout_object_p): Clean up tdata properly on error.
7086 * archive.c (bfd_generic_archive_p): Likewise.
7087 * coff-rs6000.c (_bfd_xcoff_archive_p): Likewise.
7088 (_bfd_xcoff_archive_p): Use bfd_scan_vma in place of strtol.
7089 * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
7090 (xcoff64_archive_p): Likewise.
7091 (xcoff64_openr_next_archived_file): Likewise.
7092 (xcoff64_archive_p): Clean up tdata properly on error.
7093 * coffgen.c (coff_real_object_p): Likewise.
7094 (coff_object_p): Release filehdr and opthdr.
7095 * ecoff.c (_bfd_ecoff_archive_p): Clean up tdata properly on error.
7096 * ieee.c (ieee_archive_p): Likewise.
7097 * ihex.c (ihex_object_p): Likewise.
7098 (ihex_mkobject): Always allocate tdata.
7099 * peicode.h (pe_ILF_object_p): Release bfd_alloc'd buffer on error.
7100 * srec.c (srec_mkobject): Always allocate tdata.
7101 (srec_object_p): Clean up tdata properly on error.
7102 (symbolsrec_object_p): Likewise.
7103 * versados.c (versados_object_p): Likewise.
7104 * vms-misc.c (_bfd_vms_get_record): Use bfd_malloc instead of malloc,
7105 and bfd_realloc instead of realloc.
7106 (add_new_contents): Use bfd_alloc instead of bfd_malloc for sections.
7107 * vms.c (vms_initialize): Always allocate tdata. Use bfd_alloc in
7108 place of bfd_malloc, simplifying error freeing. Free hash table too.
7109 (vms_object_p): Clean up tdata on error.
7110 (vms_mkobject): Don't complain on stderr if vms_initialize fails.
7111 (vms_close_and_cleanup): Adjust for bfd_alloc use.
7112
7113 2002-07-30 Alan Modra <amodra@bigpond.net.au>
7114
7115 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set e_flags.
7116
7117 2002-07-26 Chris Demetriou <cgd@broadcom.com>
7118
7119 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Merge ASE
7120 flags into resulting BFD.
7121
7122 2002-07-26 Alan Modra <amodra@bigpond.net.au>
7123
7124 From John Reiser <jreiser@BitWagon.com>
7125 * elf32-i386.c (elf_i386_link_hash_table_create): Clear
7126 tls_ldm_got.refcount.
7127
7128 2002-07-25 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7129
7130 * elf64-mips.c: Update TODO comment.
7131 (mips_elf64_higher_reloc,mips_elf64_highest_reloc,
7132 mips_elf64_gprel16_reloca): Remove prototypes.
7133 (mips16_jump_reloc,mips16_gprel_reloc): Add functions.
7134 (UNUSED_RELOC): Replace by EMPTY_RELOC.
7135 (mips_elf64_howto_table_rel): Use special R_MIPS_HI16 handling. Remove
7136 wrong comments. Remove disfunctional support of R_MIPS_HIGHER and
7137 R_MIPS_HIGHEST.
7138 (mips_elf64_howto_table_rela): Fix handling of R_MIPS_GPREL16 and
7139 R_MIPS_GOT16. Remove wrong comments.
7140 (elf_mips16_jump_howto,elf_mips16_gprel_howto,
7141 elf_mips_gnu_vtinherit_howto,elf_mips_gnu_vtentry_howto): New, code
7142 from elf32-mips.c.
7143 (mips_elf64_hi16_reloc): Fix formatting.
7144 (mips_elf64_higher_reloc,mips_elf64_highest_reloc): Remove.
7145 (mips_elf64_got16_reloc): Fix formatting. Remove superfluous code.
7146 Better comment. Fall back to R_MIPS_GOT_DISP instead of abort().
7147 (mips_elf64_gprel16_reloc): Make static. Add check for
7148 partial_inplace.
7149 (mips_elf64_gprel16_reloca): Remove.
7150 (mips_elf64_literal_reloc): New function.
7151 (mips_elf64_gprel32_reloc): Fix formatting.
7152 (mips_elf64_shift6_reloc): Fix comment. Make static.
7153 (mips16_jump_reloc,mips16_gprel_reloc): New functions, code from
7154 elf32-mips.c.
7155 (elf_reloc_map,mips_reloc_map): New mapping table, similiar as in
7156 elf32-mips.c
7157 (bfd_elf64_bfd_reloc_type_lookup): Use the mapping table. Enable GNU
7158 specific relocations.
7159 (mips_elf64_rtype_to_howto): Enable GNU specific relocations.
7160 (mips_elf64_object_p): Invert logic to check for SGI-ish ABI.
7161 (ELF_MAXPAGESIZE): Add comment.
7162
7163 2002-07-25 Nick Clifton <nickc@redhat.com>
7164
7165 * po/sv.po: Updated Swedish translation.
7166 * po/es.po: Updated Spanish translation.
7167 * po/fr.po: Updated French translation.
7168
7169 2002-07-25 Alan Modra <amodra@bigpond.net.au>
7170
7171 * elf-bfd.h (_bfd_elf32_link_record_local_dynamic_symbol): Define
7172 as elf_link_record_local_dynamic_symbol.
7173 (_bfd_elf64_link_record_local_dynamic_symbol): Likewise.
7174 (elf_link_record_local_dynamic_symbol): Declare. Now returns int.
7175 * elflink.h (elf_link_record_local_dynamic_symbol): Move to..
7176 * elflink.c: .. here. Use bfd_elf_get_elf_syms. Check whether an
7177 attempt is made to record a symbol in a discarded section, and
7178 return `2' in that case.
7179
7180 2002-07-24 Nick Clifton <nickc@redhat.com>
7181
7182 * po/sv.po: Updated Swedish translation.
7183 * po/es.po: Updated Spanish translation.
7184
7185 2002-07-23 Alan Modra <amodra@bigpond.net.au>
7186
7187 * po/SRC-POTFILES.in: Regenerate.
7188
7189 * elf-hppa.h (elf_hppa_relocate_section): If relocatable, return
7190 immediately. Remove code handling relocatable linking.
7191 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
7192 * elf32-cris.c (cris_elf_relocate_section): Likewise.
7193 * elf32-fr30.c (elf32_frv_relocate_section): Likewise.
7194 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
7195 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
7196 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
7197 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
7198 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
7199 * elf32-v850.c (v850_elf_relocate_section): Likewise.
7200 * elf32-vax.c (elf_vax_relocate_section): Likewise.
7201 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7202 * elf32-avr.c (elf_backend_rela_normal): Define.
7203 * elf32-cris.c: Likewise.
7204 * elf32-fr30.c: Likewise.
7205 * elf32-frv.c: Likewise.
7206 * elf32-h8300.c: Likewise.
7207 * elf32-hppa.c: Likewise.
7208 * elf32-ip2k.c: Likewise.
7209 * elf32-sparc.c: Likewise.
7210 * elf32-v850.c: Likewise.
7211 * elf32-vax.c: Likewise.
7212 * elf64-hppa.c: Likewise.
7213 * elf64-sparc.c: Likewise.
7214 * elf32-fr30.c (elf32_frv_relocate_section): Edit comment.
7215 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
7216 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
7217 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
7218 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
7219 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
7220 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
7221 * elf-m10200.c (USE_RELA): Don't define.
7222 * elf-m10300.c: Likewise.
7223 * elfarm-oabi.c: Likewise.
7224 * elf32-i370.c: Likewise.
7225 * elf32-ip2k.c: Likewise.
7226 * elf32-m68k.c: Likewise.
7227 * elf32-mcore.c: Likewise.
7228 * elf32-ppc.c: Likewise.
7229 * elf32-s390.c: Likewise.
7230 * elf32-vax.c: Likewise.
7231 * elf64-ppc.c: Likewise.
7232 * elf64-s390.c: Likewise.
7233 * elf64-x86-64.c: Likewise.
7234 * elfxx-ia64.c: Likewise.
7235 * elf32-avr.c (USE_REL): Don't undef.
7236 * elf32-ip2k.c: Likewise.
7237
7238 2002-07-23 Nick Clifton <nickc@redhat.com>
7239
7240 * elf-bfd.h (struct elf_backend_data): Add new bitfield
7241 'want_p_paddr_set_to_zero'.
7242 * elfxx-target.h: Set default value for want_p_paddr_set_to_zero
7243 to false;
7244 * elfxx-ia64.c: Set want_p_paddr_set_zero for HPUX target.
7245 * elf.c (copy_private_bfd_data): Test want_p_paddr_set_zero.
7246
7247 2002-07-23 Gabor Keresztfalvi <keresztg@mail.com>
7248
7249 * nlmcode.h (nlm_swap_auxiliary_headers_out): Swapped the order of
7250 the MeSsAgEs and CoPyRiGhT tags to make >=NW4.x NLM loaders to
7251 show the Copyright string.
7252 Minor formatting tidy ups.
7253
7254 2002-07-23 Nick Clifton <nickc@redhat.com>
7255
7256 * po/fr.po: Updated French translation.
7257 * po/sv.po: Updated Swedish translation.
7258
7259 2002-07-23 Alan Modra <amodra@bigpond.net.au>
7260
7261 * elflink.h (elf_link_input_bfd): Don't change internal symbols
7262 when outputting relocs.
7263
7264 2002-07-20 Jason Thorpe <thorpej@wasabisystems.com>
7265
7266 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only insert
7267 DT_PLTGOT into the dynamic section if there is a PLT.
7268
7269 2002-07-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7270
7271 * elfxx-mips.c (_bfd_mips_elf_discard_info): New function, code from
7272 elf32-mips.c.
7273 (_bfd_mips_elf_write_section): Likewise.
7274 * elfxx-mips.h (_bfd_mips_elf_discard_info): New prototype.
7275 (_bfd_mips_elf_write_section): Likewise.
7276 * elf32-mips.c (elf32_mips_discard_info): Move to elfxx-mips.c.
7277 (elf32_mips_write_section): Likewise.
7278 * elf64-mips.c (_bfd_mips_elf_ignore_discarded_relocs): Use it.
7279 (_bfd_mips_elf_write_section): Likewise.
7280
7281 2002-07-19 Alan Modra <amodra@bigpond.net.au>
7282
7283 * elfxx-ia64.c: (elfNN_ia64_modify_segment_map): Properly scan
7284 PT_IA_64_UNWIND segments for a given section.
7285
7286 2002-07-17 H.J. Lu <hjl@gnu.org>
7287
7288 * Makefile.am: Fix a typo.
7289 * Makefile.in: Regenerate.
7290
7291 2002-07-15 Denis Chertykov <denisc@overta.ru>
7292 Frank Ch. Eigler <fche@redhat.com>
7293 Ben Elliston <bje@redhat.com>
7294 Alan Lehotsky <alehotsky@cygnus.com>
7295 John Healy <jhealy@redhat.com>
7296 Graham Stott <grahams@redhat.com>
7297 Jeff Johnston <jjohnstn@redhat.com>
7298
7299 * Makefile.am: Add support for ip2k.
7300 * Makefile.in: Regenerate.
7301 * doc/Makefile.in: Regenerate.
7302 * archures.c: Add support for ip2k.
7303 * config.bfd: Add support for ip2k.
7304 * configure.in: Add support for ip2k.
7305 * configure: Regenerate.
7306 * reloc.c: Add support for ip2k.
7307 * targets.c: Add support for ip2k.
7308 * bfd-in2.h: Regenerate.
7309 * libbfd.h: Regenerate.
7310 * cpu-ip2k.c: New file.
7311 * elf32-ip2k.c: New file.
7312
7313 2002-07-17 Ian Rickards <irickard@arm.com>
7314
7315 * dwarf2.c (concat_filename): If we can't establish the directory
7316 just return the filename.
7317
7318 2002-07-16 Moritz Jodeit <moritz@jodeit.org>
7319
7320 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Correct order of memset args.
7321
7322 2002-07-16 Alan Modra <amodra@bigpond.net.au>
7323
7324 * elflink.h: Formatting fixes, tidy prototypes.
7325 (elf_link_assign_sym_version): Move common code out of loop.
7326
7327 2002-07-16 Alan Modra <amodra@bigpond.net.au>
7328
7329 * elflink.h (elf_link_input_bfd): Don't call reloc_emitter when
7330 reloc section size is zero. Correct reloc output location.
7331
7332 2002-07-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
7333
7334 * elf-hppa.h (elf_hppa_reloc_final_type): Use R_PARISC_PCREL16F as
7335 the final type for the e_fsel selector when generating PA2.0W code.
7336 (elf_hppa_relocate_insn): Provide support for PA2.0W 16-bit format 1
7337 relocations.
7338
7339 2002-07-14 H.J. Lu <hjl@gnu.org>
7340
7341 * elflink.h (elf_link_assign_sym_version): Hide the default
7342 definition if there is a hidden versioned definition.
7343
7344 2002-07-12 Hans-Peter Nilsson <hp@axis.com>
7345
7346 * elf32-cris.c (cris_elf_relocate_section): Drop nonsensical
7347 dynamic reference test in assertion when initializing GOT with
7348 static contents. Just assert that there are either no dynamic
7349 sections, the symbol is defined in the regular objects or that the
7350 symbol is undef weak. Tweak comment.
7351 (elf_cris_finish_dynamic_symbol): Emit .got reloc for a program
7352 only if the symbol isn't defined in the program and isn't undef
7353 weak.
7354 (elf_cris_adjust_dynamic_symbol): Simplify condition for getting
7355 rid of PLT entry: only do it if the symbol isn't defined in a DSO.
7356 When doing so, clear ELF_LINK_HASH_NEEDS_PLT. Tweak comments.
7357 (elf_cris_discard_excess_program_dynamics): Don't consider
7358 ELF_LINK_HASH_REF_DYNAMIC when omitting .got runtime relocs.
7359
7360 2002-07-11 Alan Modra <amodra@bigpond.net.au>
7361
7362 * elf32-i386.c (elf_i386_relocate_section): Don't complain about
7363 unresolved debugging relocs in dynamic applications.
7364 * elf32-s390.c (elf_s390_relocate_section): Likewise.
7365 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
7366 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
7367 * elf64-s390.c (elf_s390_relocate_section): Likewise.
7368 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7369 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
7370
7371 2002-07-10 Alan Modra <amodra@bigpond.net.au>
7372
7373 * elf64-ppc.c (ONES): Define.
7374 (ppc64_elf_howto_table): Use ONES here to avoid warnings. Fill in
7375 missing src_mask fields. Tweak R_PPC64_NONE, R_PPC64_COPY. Fill
7376 in missing dst_mask fields on R_PPC64_PLT32, R_PPC64_PLTREL32.
7377
7378 * elf64-ppc.c (ppc64_elf_get_symbol_info): Delete.
7379 (ppc64_elf_set_private_flags): Delete.
7380 (ppc64_elf_section_from_shdr): Delete.
7381 (ppc64_elf_merge_private_bfd_data): Remove flag checking/merging code.
7382 (ppc64_elf_fake_sections): Delete.
7383 (bfd_elf64_bfd_set_private_flags): Don't define.
7384 (bfd_elf64_get_symbol_info): Likewise.
7385 (elf_backend_section_from_shdr): Likewise.
7386 (elf_backend_fake_sections): Likewise.
7387
7388 2002-07-10 Marco Walther <Marco.Walther@sun.com>
7389
7390 * elf.c: (assign_section_numbers) Set sh_entsize for .stab only
7391 when not already set.
7392 * elf64-sparc.c: (sparc64_elf_fake_sections): New function.
7393 (elf_backend_fake_sections): Define.
7394
7395 2002-07-10 Alan Modra <amodra@bigpond.net.au>
7396
7397 * merge.c (_bfd_merge_section): Remove redundant output_section check.
7398 Formatting.
7399 (_bfd_merge_sections): Don't set SEC_EXCLUDE on unused sections.
7400
7401 2002-07-09 Hans-Peter Nilsson <hp@axis.com>
7402
7403 * elf32-cris.c (cris_elf_relocate_section): Move sanity-check for
7404 NULL sym_hashes to just before use.
7405 <case R_CRIS_32_GOTREL>: In test for local symbol, accept also
7406 symbol with non-default visibility.
7407 <case R_CRIS_32_GOTREL, case R_CRIS_32_PLT_GOTREL>: Ditto.
7408 <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
7409 Ditto.
7410 (cris_elf_gc_sweep_hook): Only decrease h->plt.refcount for
7411 symbol with non-default visibility.
7412 (cris_elf_check_relocs): At tests for local symbol before
7413 increasing h->plt.refcount, also check for non-default
7414 visibility. Ditto when checking for local symbol to eliminate
7415 pc-relative runtime relocs.
7416
7417 2002-07-08 Alan Modra <amodra@bigpond.net.au>
7418
7419 * elf.c: Formatting.
7420 (IS_SOLARIS_PT_INTERP): Add p_paddr and p_memsz checks.
7421 (INCLUDE_SECTION_IN_SEGMENT): Remove IS_SOLARIS_PT_INTERP.
7422 (copy_private_bfd_data): Set p_vaddr on broken Solaris PT_INTERP
7423 segments.
7424
7425 2002-07-07 Mark Mitchell <mark@codesourcery.com>
7426 Alan Modra <amodra@bigpond.net.au>
7427
7428 * cofflink.c (_bfd_coff_final_link): On PE COFF systems, take into
7429 account the impact of relocation count overflow when computing
7430 section offsets.
7431 * coffcode.h (coff_write_relocs): Use obj_pe when deciding whether
7432 or not to apply the PE COFF reloc overflow handling. Fix a
7433 fencepost error in deciding whether or not to use that technique.
7434
7435 2002-07-07 Alan Modra <amodra@bigpond.net.au>
7436
7437 * elf-bfd.h (struct elf_reloc_cookie): Remove locsym_shndx,
7438 change type of locsyms.
7439 (bfd_elf_get_elf_syms): Declare.
7440 * elf.c (bfd_elf_get_elf_syms): New function.
7441 (group_signature): Use bfd_elf_get_elf_syms.
7442 (bfd_section_from_r_symndx): Likewise.
7443 * elfcode.h (elf_slurp_symbol_table): Likewise.
7444 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
7445 (elf_link_add_object_symbols): Likewise. Reorganise to increase
7446 locality of various data structures. Properly free internal relocs.
7447 (elf_bfd_final_link): Properly free internal relocs.
7448 (elf_link_check_versioned_symbol): Use bfd_elf_get_elf_syms.
7449 (elf_link_input_bfd): Likewise.
7450 (elf_gc_mark): Likewise. Properly free internal relocs.
7451 (elf_gc_sweep): Properly free internal relocs.
7452 (elf_reloc_symbol_deleted_p): No need to swap syms in.
7453 (elf_bfd_discard_info): Use bfd_elf_get_elf_syms. Properly free
7454 internal relocs.
7455 * elf-m10200.c (mn10200_elf_relax_section): Use bfd_elf_get_elf_syms.
7456 Properly free possibly cached info.
7457 (mn10200_elf_relax_delete_bytes): Remove symbol swapping code.
7458 (mn10200_elf_symbol_address_p): Pass in internal syms. Remove
7459 symbol swapping code.
7460 (mn10200_elf_get_relocated_section_contents): Use bfd_elf_get_elf_syms.
7461 Properly free possibly cached info.
7462 * elf-m10300.c (mn10300_elf_relax_section): As above for elf-m10200.c.
7463 (mn10300_elf_relax_delete_bytes): Likewise.
7464 (mn10300_elf_symbol_address_p): Likewise.
7465 (mn10300_elf_get_relocated_section_contents): Likewise.
7466 * elf32-h8300.c (elf32_h8_relax_section): As above for elf-m10200.c.
7467 (elf32_h8_relax_delete_bytes): Likewise.
7468 (elf32_h8_symbol_address_p): Likewise.
7469 (elf32_h8_get_relocated_section_contents): Likewise.
7470 * elf32-m32r.c (m32r_elf_relax_section): As above for elf-m10200.c.
7471 (m32r_elf_relax_delete_bytes): Likewise.
7472 (m32r_elf_get_relocated_section_contents): Likewise.
7473 * elf32-sh.c (sh_elf_reloc_loop): Free section contents using
7474 elf_section_data to determine whether cached.
7475 (sh_elf_relax_section): As above for elf-m10200.c.
7476 (sh_elf_relax_delete_bytes): Likewise.
7477 (sh_elf_get_relocated_section_contents): Likewise.
7478 * elf32-xstormy16.c (xstormy16_elf_relax_section): As above.
7479 * elf64-alpha.c (elf64_alpha_relax_section): As above. Also delay
7480 reading of local syms.
7481 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
7482 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): As above.
7483 * elfxx-ia64.c (elfNN_ia64_relax_section): As above.
7484 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Properly free internal
7485 relocs.
7486 * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Properly
7487 free internal relocs and section contents. Don't read symbols.
7488 * elf32-hppa.c (get_local_syms): Use bfd_elf_get_elf_syms.
7489 (elf32_hppa_size_stubs): Don't free local syms.
7490 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Delay
7491 reading of local syms. Use bfd_elf_get_elf_syms. Properly free
7492 possibly cached info.
7493 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
7494 * elf64-hppa.c (elf64_hppa_check_relocs): Use bfd_elf_get_elf_syms.
7495 * elf64-ppc.c (struct ppc_link_hash_table): Delete bfd_count and
7496 all_local_syms.
7497 (get_local_syms): Delete function.
7498 (edit_opd): Use bfd_elf_get_elf_syms. Free on error exit. Cache
7499 on exit.
7500 (ppc64_elf_size_stubs): Use bfd_elf_get_elf_syms. Free/cache on exit.
7501
7502 2002-07-05 Jim Wilson <wilson@redhat.com>
7503
7504 * syms.c (decode_section_type): New.
7505 (bfd_decode_symclass): Call decode_section_type.
7506
7507 2002-07-04 Jakub Jelinek <jakub@redhat.com>
7508
7509 * merge.c (_bfd_merged_section_offset): Avoid accessing byte before
7510 section content start.
7511 Reported by Michael Schumacher <mike@hightec-rt.com>.
7512
7513 2002-07-04 Alan Modra <amodra@bigpond.net.au>
7514
7515 * section.c (_bfd_strip_section_from_output): Remove unnecessary
7516 link order code. Don't actually remove the output section here;
7517 Just set a flag for the linker to do so.
7518 * elflink.c (_bfd_elf_link_renumber_dynsyms): Test for removed
7519 sections when setting up output section dynsyms.
7520
7521 2002-07-04 Alan Modra <amodra@bigpond.net.au>
7522
7523 * elflink.h (elf_link_add_object_symbols): Revert 1999-09-02 hpux
7524 fudge.
7525 * elf.c (bfd_section_from_shdr): Work around broken hpux shared
7526 libs here instead.
7527
7528 2002-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
7529
7530 * elf64-s390.c (create_got_section): Set .got section alignment to
7531 8 bytes.
7532 (elf_s390_check_relocs): Set .rela.dyn section alignment to 8 bytes.
7533
7534 2002-07-02 Alan Modra <amodra@bigpond.net.au>
7535
7536 * elf.c (_bfd_elf_reloc_type_class): Fix comment grammar.
7537
7538 2002-07-01 Matt Thomas <matt@3am-software.com>
7539
7540 * elf32-vax.c (elf32_vax_print_private_bfd_data): Change EF_*
7541 to EF_VAX_*.
7542
7543 2002-07-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7544
7545 * elfxx-mips.c (ABI_64_P): Fix comment.
7546 (MIPS_ELF_OPTIONS_SECTION_NAME,MIPS_ELF_STUB_SECTION_NAME): Use the
7547 new section names for N64 ABI.
7548 (mips_elf_output_extsym): No special _gp_disp handling for NewABI.
7549 (mips_elf_calculate_relocation): Code formatting.
7550 (mips_elf_create_dynamic_relocation): Likewise.
7551 (_bfd_mips_elf_fake_sections): IRIX6 needs this hack, too.
7552 (_bfd_mips_elf_size_dynamic_sections): Handle GOT_PAGE for any NewABI.
7553 (_bfd_mips_elf_relocate_section): No special handling for R_MIPS_64
7554 in any NewABI.
7555 (_bfd_mips_elf_finish_dynamic_symbol): No special _gp_disp handling
7556 for NewABI.
7557 (_bfd_mips_elf_modify_segment_map): Handle any N64 ABI.
7558 (_bfd_mips_elf_gc_sweep_hook): NewABI GOT relocs should be handled
7559 here, too.
7560
7561 2002-07-01 Andreas Schwab <schwab@suse.de>
7562
7563 * elf64-x86-64.c (elf64_x86_64_relocate_section): Only convert
7564 R_X86_64_64 to R_X86_64_RELATIVE.
7565
7566 2002-07-01 John David Anglin <dave@hiauly1.hia.nrc.ca>
7567
7568 * vaxbsd.c: New BFD backend for VAX BSD and Ultrix.
7569 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Add new backend.
7570 Run "make dep-am".
7571 * config.bfd (vax-*-bsd* | vax-*-ultrix*): Use vaxbsd_vec instead of
7572 host_aout_vec.
7573 * configure.in (vaxbsd_vec): Add.
7574 * targets.c (vaxbsd_vec): Add.
7575 * Makefile.in: Rebuild.
7576 * configure: Rebuild.
7577 * po/SRC-POTFILES.in: Rebuild.
7578
7579 2002-07-01 Alan Modra <amodra@bigpond.net.au>
7580
7581 * elflink.h (elf_gc_mark): Pass in the section whose relocs we are
7582 examining to gc_mark_hook, rather than the bfd.
7583 (elf_gc_sections): Adjust.
7584 * elf-bfd.h (struct elf_backend_data <gc_mark_hook>): Likewise.
7585 * elf-m10300.c (mn10300_elf_gc_mark_hook): Likewise.
7586 * elf32-arm.h (elf32_arm_gc_mark_hook): Likewise.
7587 * elf32-avr.c (elf32_avr_gc_mark_hook): Likewise.
7588 * elf32-cris.c (cris_elf_gc_mark_hook): Likewise.
7589 * elf32-d10v.c (elf32_d10v_gc_mark_hook): Likewise.
7590 * elf32-fr30.c (fr30_elf_gc_mark_hook): Likewise.
7591 * elf32-hppa.c (elf32_hppa_gc_mark_hook): Likewise.
7592 * elf32-i386.c (elf_i386_gc_mark_hook): Likewise.
7593 * elf32-m32r.c (m32r_elf_gc_mark_hook): Likewise.
7594 * elf32-m68k.c (elf_m68k_gc_mark_hook): Likewise.
7595 * elf32-mcore.c (mcore_elf_gc_mark_hook): Likewise.
7596 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Likewise.
7597 * elf32-ppc.c (ppc_elf_gc_mark_hook): Likewise.
7598 * elf32-s390.c (elf_s390_gc_mark_hook): Likewise.
7599 * elf32-sh.c (sh_elf_gc_mark_hook): Likewise.
7600 * elf32-sparc.c (elf32_sparc_gc_mark_hook): Likewise.
7601 * elf32-v850.c (v850_elf_gc_mark_hook): Likewise.
7602 * elf32-vax.c (elf_vax_gc_mark_hook): Likewise.
7603 * elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Likewise.
7604 * elf64-mmix.c (mmix_elf_gc_mark_hook): Likewise.
7605 * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
7606 * elf64-s390.c (elf_s390_gc_mark_hook): Likewise.
7607 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
7608 * elfxx-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise.
7609 * elfxx-mips.h (_bfd_mips_elf_gc_mark_hook): Likewise.
7610 * elf64-x86-64.c (elf64_x86_64_gc_mark_hook): Likewise.
7611 * elf32-frv.c (elf32_frv_gc_mark_hook): Likewise. Also remove
7612 redundant local sym tests.
7613 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_entry.
7614 (link_hash_newfunc): Init is_entry.
7615 (ppc64_elf_copy_indirect_symbol): Copy is_entry.
7616 (ppc64_elf_link_hash_table_create): Init all_local_syms.
7617 (create_linkage_sections): Use bfd_make_section_anyway rather than
7618 bfd_make_section.
7619 (ppc64_elf_mark_entry_syms): New function.
7620 (ppc64_elf_check_relocs): Don't bother testing elf_bad_symtab. Set
7621 up opd entry to function section map.
7622 (ppc64_elf_gc_mark_hook): Special case opd section relocs, and
7623 relocs that reference the opd section.
7624 (edit_opd): New function.
7625 (ppc64_elf_size_dynamic_sections): Call get_local_syms and edit_opd.
7626 (ppc64_elf_setup_section_lists): Don't calculate htab->bfd_count here.
7627 (get_local_syms): Do so here. Exit if we already have local syms.
7628 Remove bogus comment imported from elf32-hppa.c. Don't attempt to
7629 read local syms on non-ELF input.
7630 (ppc64_elf_size_stubs): Call _bfd_elf64_link_read_relocs rather
7631 than duplicating it's function here. Adjust free of internal
7632 relocs to suit.
7633 (ppc64_elf_relocate_section): Adjust local syms in opd section.
7634 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Declare.
7635 * elf32-hppa.c (elf32_hppa_size_stubs): Call
7636 _bfd_elf32_link_read_relocs rather than duplicating it's function
7637 here. Adjust free of internal relocs to suit.
7638
7639 2002-07-01 Andreas Jaeger <aj@suse.de>
7640
7641 * elf64-x86-64.c (elf64_x86_64_check_relocs): Certain relocations
7642 are not allowed in shared libs code, enforce -fPIC.
7643
7644 2002-06-29 Hans-Peter Nilsson <hp@bitrange.com>
7645
7646 * mmo.c (mmo_write_loc_chunk): Don't eliminate leading and
7647 trailing zero-sequences when there's previous left-over data.
7648
7649 2002-06-27 John David Anglin <dave@hiauly1.hia.nrc.ca>
7650
7651 * elf64-hppa.c (elf64_hppa_reloc_type_class): New function.
7652 (elf64_hppa_finish_dynamic_sections): Check other_rel_sec, dlt_rel_sec
7653 and opd_rel_sec in order for starting rela section. Check _raw_size.
7654 (elf_backend_reloc_type_class): Define.
7655
7656 2002-06-27 Kevin Buettner <kevinb@redhat.com>
7657
7658 * dwarf2.c (decode_line_info): Handle older, non-standard, 64-bit
7659 DWARF2 formats.
7660
7661 2002-06-27 Alan Modra <amodra@bigpond.net.au>
7662
7663 * cpu-powerpc.c: Comment on ordering of arch_info.
7664 * elf32-ppc.c (ppc_elf_object_p): New function.
7665 (elf_backend_object_p): Define.
7666 * elf64-ppc.c (ppc64_elf_object_p): New function.
7667 (elf_backend_object_p): Define.
7668
7669 2002-06-26 Jason Thorpe <thorpej@wasabisystems.com>
7670
7671 * configure.in (vax-*-netbsd*): Set COREFILE to netbsd-core.lo.
7672 * configure: Regenerate.
7673
7674 2002-06-25 Jason Eckhardt <jle@rice.edu>
7675
7676 * dwarf2.c (decode_line_info): Check unit->addr_size
7677 to read in the proper number of prologue bytes.
7678
7679 2002-06-25 Nick Clifton <nickc@cambridge.redhat.com>
7680
7681 * config.bfd (powerpc-*-aix5*): Only create a selvecs for
7682 aix5coff64_vec if 64-bit bfd support has been enabled.
7683 (powerpc64-*-aix5*): Only define if 64-bit bfd support has
7684 been enabled.
7685
7686 * targets.c (_bfd_target_vector[]): Only include
7687 aix5coff64_vec if 64-bit bfd support has been enabled.
7688
7689 2002-06-25 Alan Modra <amodra@bigpond.net.au>
7690
7691 * elf64-ppc.c (ppc_add_stub): Replace strcpy/strncpy with memcpy.
7692 * elf32-hppa.c (hppa_add_stub): Likewise.
7693 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
7694 * elflink.h (elf_add_default_symbol): Fix comment typo.
7695 (elf_add_default_symbol): Replace strcpy and strncpy with memcpy.
7696 (elf_link_add_object_symbols): Likewise.
7697 (elf_link_assign_sym_version): Likewise.
7698 * hash.c (bfd_hash_lookup): Likewise.
7699 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
7700 * section.c (bfd_get_unique_section_name): Likewise.
7701 * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
7702 * elf.c (_bfd_elf_make_section_from_phdr): Likewise.
7703 (assign_section_numbers): Likewise.
7704 (_bfd_elfcore_make_pseudosection): Likewise.
7705 (elfcore_grok_lwpstatus): Likewise.
7706 (elfcore_grok_win32pstatus): Likewise.
7707 (elfcore_write_note): Constify input params. Use PTR instead of
7708 void *. Include terminating NUL in namesz. Correct padding.
7709 Support NULL "name" param. Use memcpy instead of strcpy.
7710 (elfcore_write_prpsinfo): Constify input params.
7711 (elfcore_write_prstatus): Likewise. Use PTR instead of void *.
7712 (elfcore_write_lwpstatus): Likewise.
7713 (elfcore_write_pstatus): Likewise.
7714 (elfcore_write_prfpreg): Likewise.
7715 (elfcore_write_prxfpreg): Likewise.
7716 * elf-bfd.h (elfcore_write_note): Update declaration.
7717 (elfcore_write_prpsinfo): Likewise.
7718 (elfcore_write_prstatus): Likewise.
7719 (elfcore_write_pstatus): Likewise.
7720 (elfcore_write_prfpreg): Likewise.
7721 (elfcore_write_prxfpreg): Likewise.
7722 (elfcore_write_lwpstatus): Likewise.
7723
7724 2002-06-25 Jason Eckhardt <jle@rice.edu>
7725
7726 * ecoff.c (ecoff_set_symbol_info): Set BSF_FUNCTION for
7727 symbols of type stProc and stStaticProc.
7728
7729 2002-06-25 Nick Clifton <nickc@redhat.com>
7730
7731 * ecoff.c: VArious formatting fixes.
7732
7733 2002-06-25 Alan Modra <amodra@bigpond.net.au>
7734
7735 * coff-rs6000.c (xcoff_generate_rtinit): Fix typo.
7736
7737 2002-06-25 Alan Modra <amodra@bigpond.net.au>
7738
7739 * aout-adobe.c: Don't compare against "true" or "false.
7740 * aout-target.h: Likewise.
7741 * aoutx.h: Likewise.
7742 * archive.c: Likewise.
7743 * bout.c: Likewise.
7744 * cache.c: Likewise.
7745 * coff-a29k.c: Likewise.
7746 * coff-alpha.c: Likewise.
7747 * coff-i386.c: Likewise.
7748 * coff-mips.c: Likewise.
7749 * coff-or32.c: Likewise.
7750 * coff64-rs6000.c: Likewise.
7751 * coffcode.h: Likewise.
7752 * coffgen.c: Likewise.
7753 * cpu-ns32k.c: Likewise.
7754 * ecoff.c: Likewise.
7755 * ecofflink.c: Likewise.
7756 * elf.c: Likewise.
7757 * elf32-arm.h: Likewise.
7758 * elf32-cris.c: Likewise.
7759 * elf32-d30v.c: Likewise.
7760 * elf32-i386.c: Likewise.
7761 * elf32-mcore.c: Likewise.
7762 * elf32-ppc.c: Likewise.
7763 * elf32-sh.c: Likewise.
7764 * elf32-sh64.c: Likewise.
7765 * elf32-v850.c: Likewise.
7766 * elf64-alpha.c: Likewise.
7767 * elf64-sh64.c: Likewise.
7768 * elfcode.h: Likewise.
7769 * elfcore.h: Likewise.
7770 * elflink.h: Likewise.
7771 * elfxx-mips.c: Likewise.
7772 * i386os9k.c: Likewise.
7773 * ieee.c: Likewise.
7774 * libbfd.c: Likewise.
7775 * linker.c: Likewise.
7776 * mmo.c: Likewise.
7777 * nlm32-alpha.c: Likewise.
7778 * nlm32-i386.c: Likewise.
7779 * nlm32-ppc.c: Likewise.
7780 * nlm32-sparc.c: Likewise.
7781 * nlmcode.h: Likewise.
7782 * oasys.c: Likewise.
7783 * pdp11.c: Likewise.
7784 * peicode.h: Likewise.
7785 * reloc.c: Likewise.
7786 * som.c: Likewise.
7787 * srec.c: Likewise.
7788 * tekhex.c: Likewise.
7789 * vms.c: Likewise.
7790 * xcofflink.c: Likewise.
7791 * elf64-sparc.c: Edit comment to not use "== false".
7792
7793 * aoutf1.h: Don't use "? true : false".
7794 * ecoff.c: Likewise.
7795 * format.c: Likewise.
7796 * ieee.c: Likewise.
7797 * linker.c: Likewise.
7798 * mmo.c: Likewise.
7799 * oasys.c: Likewise.
7800
7801 2002-06-23 H.J. Lu <hjl@gnu.org>
7802
7803 * elflink.h (elf_link_add_archive_symbols): For the default
7804 version, check references with only one `@' first.
7805
7806 2002-06-23 John David Anglin <dave@hiauly1.hia.nrc.ca>
7807
7808 * elf64-hppa.c (elf64_hppa_mark_milli_and_exported_functions): New
7809 function.
7810 (allocate_global_data_dlt): Don't add millicode symbols to dynamic
7811 symbol table.
7812 (allocate_global_data_opd, allocate_dynrel_entries): Likewise.
7813 (elf64_hppa_size_dynamic_sections): Revise to use
7814 elf64_hppa_mark_milli_and_exported_functions.
7815 (elf64_hppa_finish_dynamic_symbol): Remove code to keep millicode
7816 symbols out of dynamic symbol table.
7817
7818 2002-06-23 Alan Modra <amodra@bigpond.net.au>
7819
7820 * Makefile.in: Regenerate.
7821 * libbfd.h: Regenerate.
7822 * bfd-in2.h: Regenerate.
7823 * configure: Regenerate.
7824 * po/SRC-POTFILES.in: Regenerate.
7825
7826 * elflink.h: Comment typo fixes.
7827
7828 2002-06-23 H.J. Lu <hjl@gnu.org>
7829
7830 * elf-bfd.h (elf_link_loaded_list): New structure.
7831 (elf_link_hash_table): Add "loaded".
7832 * elf.c (_bfd_elf_link_hash_table_init): Initialize "loaded".
7833 * elflink.h (elf_link_check_versioned_symbol): New function.
7834 (elf_link_output_extsym): Call elf_link_check_versioned_symbol.
7835
7836 2002-06-19 Nick Clifton <nickc@cambridge.redhat.com>
7837
7838 * elflink.h (size_dynamic_sections): If the target does not
7839 support an ELF style hash table, return true, indicating that
7840 nothing needed to be done, rather than false, indicating that the
7841 section's size could not be computed.
7842
7843 2002-06-18 Dave Brolley <brolley@redhat.com>
7844
7845 From Catherine Moore, Michael Meissner, Dave Brolley:
7846 * po/SRC-POTFILES.in: Add cpu-frv.c and elf32-frv.c
7847 * targets.c: Support bfd_elf32_frv_vec.
7848 * reloc.c: Add FRV relocs.
7849 * configure.in: Add support for bfd-elf32-frv-vec.
7850 * config.bfd (targ_cpu): Add support for frv-*-elf.
7851 * archures.c: Add frv arch and machines.
7852 * Makefile.am (ALL_MACHINES): Add cpu-frv.lo.
7853 (ALL_MACHINES_CFILES): Add cpu-frv.c.
7854 (BFD32_BACKENDS): Add elf32-frv.lo.
7855 (BFD32_BACKENDS_CFILES): Add elf32-frv.c
7856 (cpu-frv.lo): New target.
7857 (elf32-frv.lo): New target.
7858 * cpu-frv.c: New file.
7859 * elf32-frv.c: New file.
7860
7861 2002-06-18 Jakub Jelinek <jakub@redhat.com>
7862
7863 * elfcode.h (elf_object_p): Sanity check eh_shoff == 0 implies
7864 e_shnum == 0.
7865 Only read the first section header if e_shoff is non-zero.
7866 Don't consider e_shstrndx if there are no sections.
7867
7868 2002-06-17 Tom Rix <trix@redhat.com>
7869
7870 * elf32-d10v.c (elf_d10v_howto_table): Change R_D10V_10_PCREL_R,
7871 R_D10V_10_PCREL_L and R_D10V_18_PCREL to use
7872 complain_overflow_bitfield.
7873
7874 2002-06-17 Alan Modra <amodra@bigpond.net.au>
7875
7876 * opncls.c (bfd_openr): Remove redundant bfd_set_error.
7877 (bfd_fdopenr): Likewise.
7878 (bfd_openstreamr): Likewise.
7879 (bfd_openw): Likewise.
7880
7881 * targets.c: Sort target vecs.
7882 (_bfd_target_vector): Add aix5coff64_vec, bfd_elf32_sh64_vec,
7883 bfd_elf32_sh64l_vec, bfd_elf32_sh64lnbsd_vec,
7884 bfd_elf32_sh64nbsd_vec, bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec,
7885 bfd_elf64_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec.
7886 * configure.in: Sort target vecs. Add m88kmach3_vec.
7887 * configure: Regenerate.
7888
7889 2002-06-16 Hans-Peter Nilsson <hp@bitrange.com>
7890
7891 * elf64-mmix.c (bpo_reloc_request_sort_fn): Use member
7892 bpo_reloc_no to break sort order ties, not address of items.
7893
7894 2002-06-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
7895
7896 * elf-hppa.h (elf_hppa_final_link): Fix formatting in comment.
7897 Skip excluded sections in determing __gp value.
7898 (elf_hppa_final_link_relocate): Use the symbol's address in
7899 R_PARISC_FPTR64 relocations that don't need an opd entry.
7900 * elf64-hppa.c (allocate_dynrel_entries): Simplify code.
7901 (elf64_hppa_finalize_dynreloc): Likewise.
7902 (elf64_hppa_size_dynamic_sections): Move comments and fix typo.
7903 (elf64_hppa_finish_dynamic_symbol): Break up assert.
7904
7905 2002-06-14 Sergey Grigoriev <serge@leopold.Physik.Uni-Augsburg.DE>
7906
7907 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
7908 alignment for .bss, .data and .text sections so that sse and sse2
7909 code will work.
7910 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
7911
7912 2002-06013 J"orn Rennecke <joern.rennecke@superh.com>
7913
7914 config.bfd: Add support for sh[1234]l*-*-elf* | sh3el*-*-elf*,
7915 sh[1234]*-elf*.
7916
7917 2002-06-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
7918
7919 * elflink.h (elf_bfd_final_link): Improve error handling for missing
7920 dynamic sections.
7921
7922 * elf64-hppa.c (allocate_global_data_opd): We don't need an opd entry
7923 for a symbol that has no output section.
7924 (allocate_dynrel_entries): Correct comment.
7925 (elf64_hppa_finalize_dynreloc): Likewise. Don't create an opd entry
7926 unless we want one.
7927 (elf64_hppa_finalize_opd): Prevent segfault if dyn_h is NULL.
7928 (elf64_hppa_finalize_dlt): Likewise. Prevent segfault for symbols
7929 with no section. Remove unnecessary parentheses.
7930
7931 2002-06-11 Tom Rix <trix@redhat.com>
7932
7933 * coffcode.h (coff_compute_section_file_positions): Add data
7934 section to AIX loader alignment check.
7935
7936 * coff-rs6000.c (_bfd_xcoff_mkobject): Set default text section
7937 alignment to 4 bytes.
7938 (_bfd_xcoff_copy_private_bfd_data): Use text and data alignment
7939 power accessor macro.
7940 (do_shared_object_padding): Remove invalid assertion.
7941
7942 2002-06-10 Richard Sandiford <rsandifo@redhat.com>
7943
7944 * section.c (_bfd_strip_section_from_output): Set SEC_EXCLUDE
7945 for removed output sections.
7946
7947 2002-06-10 Geoffrey Keating <geoffk@redhat.com>
7948
7949 * merge.c (merge_strings): Use htab_create_alloc with calloc, not
7950 htab_alloc.
7951 * elf-strtab.c (_bfd_elf_strtab_finalize): Likewise.
7952
7953 2002-06-08 H.J. Lu <hjl@gnu.org>
7954
7955 * elf.c (copy_private_bfd_data): Don't cast to bfd_size_type to
7956 work around a long long bug in gcc 2.96 on mips.
7957
7958 2002-06-08 Jason Thorpe <thorpej@wasabisystems.com>
7959
7960 * Makefile.am (BFD32_BACKENDS): Add vax1knetbsd.lo.
7961 (BFD32_BACKENDS_CFILES): Add vax1knetbsd.c.
7962 Regenerate dependency lists.
7963 * Makefile.in: Regenerate.
7964 * config.bfd (vax-*-netbsdelf*, vax-*-netbsdaout*): Add
7965 vax1knetbsd_vec to targ_selvecs.
7966 * configure.in: Add vax1knetbsd_vec.
7967 * configure: Regenerate.
7968 * targets.c (_bfd_target_vector): Add vax1knetbsd_vec.
7969 * vax1knetbsd.c: New file.
7970 * vaxnetbsd.c: Update copyright years.
7971 (TARGET_PAGE_SIZE): Set to 0x1000.
7972 (DEFAULT_MID): Set to M_VAX4K_NETBSD.
7973
7974 2002-06-08 Matt Thomas <matt@3am-software.com>
7975
7976 * libaout.h (enum machine_type): Add M_VAX4K_NETBSD.
7977
7978 2002-06-08 Alan Modra <amodra@bigpond.net.au>
7979
7980 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Make static.
7981
7982 2002-06-08 Alan Modra <amodra@bigpond.net.au>
7983
7984 * Makefile.am: Run "make dep-am".
7985 * Makefile.in: Regenerate.
7986
7987 * armnetbsd.c: Replace CONST with const.
7988 * corefile.c: Likewise.
7989 * elf32-dlx.c: Likewise.
7990 * elf64-mips.c: Likewise.
7991 * mmo.c: Likewise.
7992 * ns32knetbsd.c: Likewise.
7993
7994 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Check the hash
7995 table is elf64-sparc.
7996
7997 2002-06-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7998
7999 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Simplify code.
8000 Fix RELA addends to get not shifted in the result. Don't do special
8001 handling of R_MIPS_64 for NewABI.
8002
8003 2002-06-07 Alan Modra <amodra@bigpond.net.au>
8004
8005 * aoutx.h (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
8006 (NAME(aout,slurp_reloc_table)): Likewise.
8007 * coff-mips.c (mips_relax_section): Use bfd_zalloc.
8008 * coff-rs6000.c (xcoff_write_armap_big): Use bfd_zmalloc.
8009 (xcoff_write_archive_contents_big): Likewise.
8010 (xcoff_generate_rtinit): Likewise.
8011 (xcoff_generate_rtinit): Likewise, and check error return.
8012 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
8013 * coffgen.c (coff_section_symbol): Use bfd_zalloc.
8014 (coff_get_normalized_symtab): Likewise.
8015 (coff_make_empty_symbol): Likewise.
8016 (bfd_coff_set_symbol_class): Likewise.
8017 * cofflink.c (coff_link_add_symbols): Likewise.
8018 * ecoff.c (_bfd_ecoff_make_empty_symbol): Likewise.
8019 * ecofflink.c (ecoff_write_shuffle): Use bfd_zmalloc.
8020 (bfd_ecoff_write_accumulated_debug): Likewise.
8021 * elf64-alpha.c (get_got_entry): Use bfd_zalloc.
8022 * i386linux.c (bfd_i386linux_size_dynamic_sections): Likewise.
8023 * i386lynx.c (NAME(lynx,slurp_reloc_table)): Use bfd_zmalloc.
8024 * ieee.c (do_with_relocs): Use bfd_zalloc.
8025 * m68klinux.c (bfd_m68klinux_size_dynamic_sections): Likewise.
8026 * pdp11.c (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
8027 (NAME(aout,slurp_reloc_table)): Likewise.
8028 (NAME(aout,squirt_out_relocs)): Don't memset when zalloc'd.
8029 * reloc16.c (bfd_coff_reloc16_relax_section): Use bfd_zmalloc.
8030 * som.c (som_build_and_write_symbol_table): Likewise.
8031 (som_slurp_string_table): Likewise.
8032 (som_slurp_symbol_table): Likewise.
8033 (som_bfd_ar_write_symbol_stuff): Likewise.
8034 * sparclinux.c (bfd_sparclinux_size_dynamic_sections): Use bfd_zalloc.
8035 * sunos.c (bfd_sunos_size_dynamic_sections): Likewise.
8036 * tekhex.c (find_chunk): Likewise. Get rid of unused "sname".
8037 * vms-gsd.c (_bfd_vms_slurp_gsd): Use bfd_zmalloc.
8038 * xcofflink.c (xcoff_link_add_symbols): Use bfd_zalloc/bfd_zmalloc.
8039
8040 2002-06-07 Alan Modra <amodra@bigpond.net.au>
8041
8042 * elf-bfd.h (struct bfd_elf_section_data <group_name>): Replace with
8043 "group" union.
8044 (elf_group_name): Update.
8045 (elf_group_id): Define.
8046 (bfd_elf_set_group_contents): Declare.
8047 * elf.c (elf_fake_sections): Qualify use of elf_group_name.
8048 (set_group_contents): Rename to bfd_elf_set_group_contents. Remove
8049 ATTRIBUTE_UNUSED from failedptrarg. If elf_group_id is set, use
8050 that sym for the signature.
8051 (_bfd_elf_compute_section_file_positions): Don't call
8052 set_group_contents for "ld -r" case.
8053 (swap_out_syms): Use bfd_zalloc.
8054 * elflink.h (elf_link_add_archive_symbols): Likewise.
8055 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
8056 (elf_bfd_final_link): Call bfd_elf_set_group_contents.
8057
8058 2002-06-07 Alan Modra <amodra@bigpond.net.au>
8059
8060 * elf64-ppc.c (ppc64_elf_relocate_section): Allow unresolved
8061 relocs in opd for non-shared too.
8062
8063 2002-06-06 Jeffrey Law <law@redhat.com>
8064
8065 * elf32-h8300.c (elf32_h8_relax_section): Ignore uninteresting
8066 relocations.
8067
8068 2002-06-06 Nick Clifton <nickc@cambridge.redhat.com>
8069
8070 * merge.c: Include libiberty.h.
8071 * elf-strtab.c: Include libiberty.h.
8072
8073 2002-06-06 Elias Athanasopoulos <eathan@otenet.gr>
8074
8075 * peXXigen.c (pe_print_idata): Remove unused variable.
8076
8077 2002-06-06 David Heine <dlheine@tensilica.com>
8078
8079 * elf.c (assign_file_positions_for_segments): Remove unallocated
8080 sections from the section to segment mapping for PT_LOAD segments.
8081 Update comment about empty loadable segments.
8082
8083 2002-06-06 Richard Sandiford <rsandifo@redhat.com>
8084
8085 * stabs.c (_bfd_link_section_stabs): Check that the symbol offset
8086 is within the .stabstr section.
8087
8088 2002-06-06 Alan Modra <amodra@bigpond.net.au>
8089
8090 * elf-bfd.h (struct elf_size_info <swap_symbol_in>): Function args
8091 are "const PTR", not "const PTR *".
8092 (bfd_elf32_swap_symbol_in): Likewise.
8093 (bfd_elf64_swap_symbol_in): Likewise.
8094 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR.
8095 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
8096 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
8097 (elf_link_add_object_symbols): Likewise.
8098 (elf_link_record_local_dynamic_symbol): Likewise.
8099 (elf_link_input_bfd): Likewise.
8100 (elf_gc_mark): Likewise.
8101 (elf_reloc_symbol_deleted_p): Likewise.
8102 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
8103 (mn10200_elf_relax_delete_bytes): Likewise.
8104 (mn10200_elf_symbol_address_p): Likewise.
8105 (mn10200_elf_get_relocated_section_contents): Likewise.
8106 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
8107 (mn10300_elf_relax_section): Likewise.
8108 (mn10300_elf_relax_delete_bytes): Likewise.
8109 (mn10300_elf_symbol_address_p): Likewise.
8110 (mn10300_elf_get_relocated_section_contents): Likewise.
8111 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
8112 (elf32_h8_relax_delete_bytes): Likewise.
8113 (elf32_h8_symbol_address_p): Likewise.
8114 (elf32_h8_get_relocated_section_contents): Likewise.
8115 * elf32-hppa.c (get_local_syms): Likewise.
8116 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
8117 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
8118 * elf32-sh.c (sh_elf_relax_section): Likewise.
8119 (sh_elf_relax_delete_bytes): Likewise.
8120 (sh_elf_get_relocated_section_contents): Likewise.
8121 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
8122 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
8123 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
8124 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
8125 * elf64-ppc.c (get_local_syms): Likewise.
8126 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
8127 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
8128
8129 2002-06-05 J"orn Rennecke <joern.rennecke@superh.com>
8130
8131 * config.bfd (sh64l*-*-elf*, shl*-*-elf*): New configurations.
8132
8133 2002-06-05 Alan Modra <amodra@bigpond.net.au>
8134
8135 * elf.c (group_signature): Swap in the whole symbol, and handle
8136 extracting section symbol names.
8137 (setup_group): Add comment.
8138 (set_group_contents): When called from objcopy or ld, arrange for
8139 section contents to be written. Write group member output section
8140 indices to allow objcopy to reorganize sections.
8141 (_bfd_elf_copy_private_section_data): Copy group info.
8142
8143 * elf-bfd.h (struct elf_size_info): Add swap_symbol_in field.
8144 (bfd_elf32_swap_symbol_in): Update prototype.
8145 (bfd_elf64_swap_symbol_in): Likewise.
8146 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR *.
8147 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
8148 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
8149 (elf_link_add_object_symbols): Likewise.
8150 (elf_link_record_local_dynamic_symbol): Likewise.
8151 (elf_link_input_bfd): Likewise.
8152 (elf_gc_mark): Likewise.
8153 (elf_reloc_symbol_deleted_p): Likewise.
8154 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
8155 (mn10200_elf_relax_delete_bytes): Likewise.
8156 (mn10200_elf_symbol_address_p): Likewise.
8157 (mn10200_elf_get_relocated_section_contents): Likewise.
8158 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
8159 (mn10300_elf_relax_section): Likewise.
8160 (mn10300_elf_relax_delete_bytes): Likewise.
8161 (mn10300_elf_symbol_address_p): Likewise.
8162 (mn10300_elf_get_relocated_section_contents): Likewise.
8163 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
8164 (elf32_h8_relax_delete_bytes): Likewise.
8165 (elf32_h8_symbol_address_p): Likewise.
8166 (elf32_h8_get_relocated_section_contents): Likewise.
8167 * elf32-hppa.c (get_local_syms): Likewise.
8168 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
8169 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
8170 * elf32-sh.c (sh_elf_relax_section): Likewise.
8171 (sh_elf_relax_delete_bytes): Likewise.
8172 (sh_elf_get_relocated_section_contents): Likewise.
8173 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
8174 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
8175 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
8176 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
8177 * elf64-ppc.c (get_local_syms): Likewise.
8178 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
8179 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
8180 * elfcode.h (NAME(_bfd_elf,size_info)): Update initialiser.
8181 * elf64-alpha.c (alpha_elf_size_info): Likewise.
8182 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
8183 * elf64-mips.c (mips_elf64_size_info): Likewise.
8184 * elf64-s390.c (s390_elf64_size_info): Likewise.
8185 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
8186
8187 2002-06-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
8188
8189 * elf32-mips.c (elf32_mips_ignore_discarded_relocs): Move to...
8190 elfxx-mips.c (_bfd_mips_elf_ignore_discarded_relocs): ... here.
8191 elf64-mips.c (elf_backend_ignore_discarded_relocs): Use
8192 _bfd_mips_elf_ignore_discarded_relocs.
8193 elfxx-mips.h (_bfd_mips_elf_ignore_discarded_relocs): Declare.
8194
8195 2002-06-05 H.J. Lu <hjl@gnu.org>
8196
8197 * elfxx-mips.c (mips_elf_calculate_relocation): Call
8198 _bfd_elf_rel_local_sym for STT_SECTION relocations against
8199 the SEC_MERGE section.
8200
8201 2002-06-05 Alan Modra <amodra@bigpond.net.au>
8202
8203 * coff-alpha.c: Update copyright date.
8204 * coff-mips.c: Likewise.
8205 * xcoff-target.h: Likewise.
8206
8207 * bfd-in.h: Remove "taken from the source" comment.
8208 * libbfd-in.h: Likewise.
8209 * libcoff-in.h: Likewise.
8210 * bfd-in2.h: Regenerate.
8211 * libbfd.h: Regenerate.
8212 * libcoff.h: Regenerate.
8213
8214 * elf.c (bfd_elf_discard_group): Return true.
8215 * elf-bfd.h (bfd_elf_discard_group): Declare.
8216 * bfd-in.h (bfd_elf_discard_group): Don't declare here.
8217 * section.c (bfd_discard_group): Rename to bfd_generic_discard_group.
8218 * bfd.c (bfd_discard_group): Define.
8219 * targets.c (struct bfd_target): Add _bfd_discard_group.
8220 (BFD_JUMP_TABLE_LINK): Here too.
8221 * libbfd-in.h (_bfd_nolink_bfd_discard_group): Define.
8222 * aout-adobe.c (aout_32_bfd_discard_group): Define.
8223 * aout-target.h (MY_bfd_discard_group): Define.
8224 * aout-tic30.c (MY_bfd_discard_group): Define.
8225 * binary.c (binary_bfd_discard_group): Define.
8226 * bout.c (b_out_bfd_discard_group): Define.
8227 * coff-alpha.c (_bfd_ecoff_bfd_discard_group): Define.
8228 * coffcode.h (coff_bfd_discard_group): Define.
8229 * coff-mips.c (_bfd_ecoff_bfd_discard_group): Define.
8230 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Define.
8231 * i386msdos.c (msdos_bfd_discard_group): Define.
8232 * i386os9k.c (os9k_bfd_discard_group): Define.
8233 * ieee.c (ieee_bfd_discard_group): Define.
8234 * ihex.c (ihex_bfd_discard_group): Define.
8235 * mmo.c (mmo_bfd_discard_group): Define.
8236 * nlm-target.h (nlm_bfd_discard_group): Define.
8237 * oasys.c (oasys_bfd_discard_group): Define.
8238 * ppcboot.c (ppcboot_bfd_discard_group): Define.
8239 * som.c (som_bfd_discard_group): Define.
8240 * srec.c (srec_bfd_discard_group): Define.
8241 * tekhex.c (tekhex_bfd_discard_group): Define.
8242 * versados.c (versados_bfd_discard_group): Define.
8243 * vms.c (vms_bfd_discard_group): Define.
8244 * xcoff-target.h (_bfd_xcoff_bfd_discard_group): Define.
8245 * coff64-rs6000.c (rs6000coff64_vec): Update initialiser.
8246 (aix5coff64_vec): Likewise.
8247 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Likewise.
8248
8249 2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
8250
8251 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-com.lo.
8252 (BFD32_BACKENDS_CFILES): Add elf32-sh64-com.c.
8253 (elf32-sh64-com.lo): New dependency list.
8254 * Makefile.in: Regenerate.
8255 * configure.in (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec)
8256 (bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec): Add
8257 elf32-sh64-com.lo.
8258 * configure: Regenerate.
8259 * elf32-sh64.c (sh64_address_in_cranges)
8260 (sh64_get_contents_type, sh64_address_is_shmedia): Move to...
8261 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb):
8262 (crange_bsearch_cmpl): Prepend _bfd_sh64_ to name and move to...
8263 * elf32-sh64-com.c: ...here. New file.
8264
8265 2002-06-04 Alan Modra <amodra@bigpond.net.au>
8266
8267 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Remove
8268 ATTRIBUTE_UNUSED on used params.
8269 * elf32-vax.c (elf_vax_gc_mark_hook): Remove unnecessary checks
8270 before calling bfd_section_from_elf_index on local syms.
8271 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
8272
8273 2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
8274
8275 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-nbsd.lo.
8276 (BFD32_BACKENDS_CFILES): Add elf32-sh64-nbsd.c.
8277 (BFD64_BACKENDS): Add elf64-sh64-nbsd.lo.
8278 (BFD64_BACKENDS_CFILES): Add elf64-sh64-nbsd.c.
8279 (elf32-sh64-nbsd.lo, elf64-sh64-nbsd.lo): New rules.
8280 * Makefile.in: Regenerate.
8281 * config.bfd (sh5le-*-netbsd*, sh5-*-netbsd*, sh64le-*-netbsd*)
8282 (sh64-*-netbsd*): New targets.
8283 * configure.in: Add bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec,
8284 bfd_elf64_sh64nbsd_vec, and bfd_elf64_sh64lnbsd_vec.
8285 * configure: Regenerate.
8286 * elf32-sh64-nbsd.c: New file.
8287 * elf64-sh64-nbsd.c: New file.
8288 * targets.c: Add extern decls for bfd_elf32_sh64nbsd_vec,
8289 bfd_elf32_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec, and
8290 bfd_elf64_sh64lnbsd_vec.
8291
8292 2002-06-04 Alan Modra <amodra@bigpond.net.au>
8293
8294 * elf.c (setup_group): Set SEC_LINK_ONCE on GRP_COMDAT groups.
8295 (bfd_section_from_shdr): Likewise. Set section name of group
8296 sections from signature.
8297 (group_signature): Split out from setup_group. Ensure symbol table
8298 is available.
8299 (bfd_elf_discard_group): New function.
8300 (_bfd_elf_make_section_from_shdr): Don't set SEC_LINK_ONCE on
8301 .gnu.linkonce* sections if they are members of a group.
8302 (set_group_contents): Set GRP_COMDAT flag.
8303 * section.c (bfd_discard_group): New function.
8304 * bfd-in.h (bfd_elf_discard_group): Declare.
8305 * bfd-in2.h: Regenerate.
8306 * elf-bfd.h (struct bfd_elf_section_data): Add linkonce_p field.
8307 (elf_linkonce_p): Define.
8308
8309 2002-06-04 Alan Modra <amodra@bigpond.net.au>
8310
8311 * elf.c (bfd_section_from_shdr): Make "name" const.
8312 * elf-bfd.h (elf_backend_section_from_shdr): Likewise.
8313 * elf32-i370.c (i370_elf_section_from_shdr): Likewise.
8314 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
8315 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
8316 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
8317 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
8318 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
8319 * elf64-ppc.c (ppc64_elf_section_from_shdr): Likewise.
8320 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
8321 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
8322 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
8323
8324 2002-06-03 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
8325
8326 * elfxx-mips.c (ABI_64_P): Use backend's data to determine the
8327 ABI.
8328
8329 2002-06-02 Kazu Hirata <kazu@cs.umass.edu>
8330
8331 * elf32-arc.c: Fix formatting.
8332 * elf32-arm.h: Likewise.
8333 * elf32-cris.c: Likewise.
8334 * elf32-dlx.c: Likewise.
8335 * elf32-hppa.c: Likewise.
8336 * elf32-i386.c: Likewise.
8337 * elf32-i386qnx.c: Likewise.
8338 * elf32-or32.c: Likewise.
8339 * elf32-s390.c: Likewise.
8340 * elf32-sh64.c: Likewise.
8341 * elf32-vax.c: Likewise.
8342 * elf32-xstormy16.c: Likewise.
8343 * elf64-alpha.c: Likewise.
8344 * elf64-mmix.c: Likewise.
8345 * elf64-ppc.c: Likewise.
8346 * elf64-s390.c: Likewise.
8347 * elf64-sh64.c: Likewise.
8348 * elf64-x86-64.c: Likewise.
8349
8350 2002-06-02 Richard Henderson <rth@redhat.com>
8351
8352 * elf64-alpha.c (elf64_alpha_relocate_section): Don't dereference
8353 null when there are no got entries for a symbol.
8354 (elf64_alpha_relax_find_tls_segment): Rearrange to avoid
8355 uninitialized variable warning.
8356
8357 2002-06-01 Richard Henderson <rth@redhat.com>
8358
8359 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Don't test for
8360 undefined symbols here.
8361 (elf64_alpha_relax_section): Do it here. Also test for not
8362 defined in the current module.
8363 (elf64_alpha_relocate_section_r): Split out of ...
8364 (elf64_alpha_relocate_section): ... here. Don't dereference
8365 NULL when looking up local got entries.
8366
8367 2002-06-01 Richard Henderson <rth@redhat.com>
8368
8369 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Reject undefined
8370 symbols from JSR relaxation.
8371 (elf64_alpha_size_plt_section_1): New.
8372 (elf64_alpha_calc_dynrel_sizes): Split out .rela.got bits ...
8373 (elf64_alpha_size_rela_got_1): ... here.
8374 (elf64_alpha_size_dynamic_sections): Split out .rela.got bits ...
8375 (elf64_alpha_size_rela_got_section): ... here.
8376 (elf64_alpha_size_plt_section): New.
8377 (elf64_alpha_relax_section): Call them.
8378 (elf64_alpha_size_got_sections): Remove output_bfd arg.
8379 (elf64_alpha_finish_dynamic_symbol): Check gotent use_count.
8380
8381 2002-06-01 Richard Henderson <rth@redhat.com>
8382
8383 * elf64-alpha.c (alpha_get_dtprel_base, alpha_get_tprel_base): New.
8384 (elf64_alpha_relocate_section): Use them. Reject LE TLS relocs
8385 in shared libraries. Fix DTPRELHI and TPRELHI value.
8386 (INSN_ADDQ, INSN_RDUNIQ): New.
8387 (struct alpha_relax_info): Add symtab_hdr, tls_segment, first_gotent.
8388 (elf64_alpha_relax_with_lituse): Return boolean. Remove irelend
8389 argument. Reject dynamic symbols. Use LITUSE symbolic constants.
8390 (elf64_alpha_relax_got_load): Rename from relax_without_lituse.
8391 Handle GOTDTPREL and GOTTPREL relocations.
8392 (elf64_alpha_relax_gprelhilo): New.
8393 (elf64_alpha_relax_tls_get_addr): New.
8394 (elf64_alpha_relax_find_tls_segment): New.
8395 (elf64_alpha_relax_section): Handle TLS relocations.
8396 (ALPHA_ELF_LINK_HASH_TLS_IE): New.
8397 (elf64_alpha_check_relocs): Set it.
8398
8399 2002-06-01 Richard Henderson <rth@redhat.com>
8400
8401 * elf64-alpha.c (elf64_alpha_relax_section): Don't store computed gp.
8402
8403 * elf64-alpha.c (elf64_alpha_check_relocs): Fix typo on maybe_dynamic
8404 check; don't suppress dynamic relocs for non-allocated sections.
8405
8406 * elf64-alpha.c: Remove dead code.
8407
8408 2002-05-31 Alan Modra <amodra@bigpond.net.au>
8409
8410 * bfd-in2.h: Regenerate.
8411 * libbfd.h: Regenerate.
8412 * po/SRC-POTFILES.in: Regenerate.
8413
8414 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate
8415 space for bss .plt.
8416
8417 2002-05-31 Graeme Peterson <gp@qnx.com>
8418
8419 * Makefile.am (BFD32_BACKENDS): Add elf32-i386qnx.lo.
8420 (BFD32_BACKENDS_CFILES): Add elf32-i386qnx.c.
8421 Run "make dep-am".
8422 * Makefile.in: Regenerate.
8423 * config.bfd: Add i[3456]86-*-nto-qnx* support.
8424 * configure.in: Add bfd_elf32_i386qnx_vec support.
8425 * configure: Regenerate.
8426 * elf-bfd.h (struct elf_backend_data): Add set_nonloadable_filepos,
8427 is_contained_by_filepos, and copy_private_bfd_data_p.
8428 * elf.c (assign_file_positions_for_segments): Call backend
8429 set_nonloadable_filepos. Fix non-K&R call to _bfd_error_handler.
8430 (IS_CONTAINED_BY_FILEPOS): Define.
8431 (INCLUDE_SECTION_IN_SEGMENT): Also test IS_CONTAINED_BY_FILEPOS.
8432 (copy_private_bfd_data): Use IS_CONTAINED_BY_FILEPOS. Typo fix.
8433 Fix non-K&R call to _bfd_error_handler.
8434 (_bfd_elf_copy_private_section_data): Use backend
8435 copy_private_bfd_data_p.
8436 * elf32-i386.c: Don't include elfxx-target.h when
8437 ELF32_I386_C_INCLUDED is defined.
8438 * elf32-i386qnx.c: New QNX elf backend file.
8439 * elfxx-target.h: Add elf_backend_set_nonloadable_filepos,
8440 elf_backend_is_contained_by_filepos, and
8441 elf_backend_do_copy_private_bfd_data.
8442 * targets.c: Add bfd_target bfd_elf32_i386qnx_vec.
8443
8444 2002-05-31 Alan Modra <amodra@bigpond.net.au>
8445
8446 * elfarm-oabi.c (bfd_elf32_arm_add_glue_sections_to_bfd): Define.
8447 Move other similar defines to start of file.
8448
8449 2002-05-30 Tom Rix <trix@redhat.com>
8450
8451 * coff-rs6000.c (xcoff_rtype2howto): Handle 16 bit R_RBA.
8452 * coff64-rs6000.c (xcoff64_rtype2howto): Same.
8453
8454 2002-05-30 Richard Henderson <rth@redhat.com>
8455
8456 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_TLSGD,
8457 ALPHA_ELF_LINK_HASH_LU_TLSLDM, ALPHA_ELF_LINK_HASH_LU_FUNC): New.
8458 (ALPHA_ELF_GOT_ENTRY_RELOCS_DONE): Remove.
8459 (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Remove.
8460 (struct alpha_elf_got_entry): Add reloc_type, reloc_done, reloc_xlated.
8461 (struct alpha_elf_obj_tdata): Rename total_got_entries and
8462 n_local_got_entries to total_got_size and local_got_size.
8463 (elf64_alpha_howto, elf64_alpha_reloc_map): Update for TLS relocs.
8464 (alpha_got_entry_size): New.
8465 (elf64_alpha_relax_with_lituse): Use it.
8466 (elf64_alpha_relax_without_lituse): Likewise.
8467 (MAX_GOT_SIZE): Rename from MAX_GOT_ENTRIES.
8468 (get_got_entry): New.
8469 (elf64_alpha_check_relocs): Handle TLS relocs. Reorganize.
8470 (elf64_alpha_adjust_dynamic_symbol): Test LU_FUNC as a mask.
8471 (elf64_alpha_merge_ind_symbols): Check gotent->reloc_type.
8472 (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots): Likewise.
8473 (elf64_alpha_calc_got_offsets_for_symbol): Use alpha_got_entry_size.
8474 (elf64_alpha_calc_got_offsets): Likewise.
8475 (alpha_dynamic_entries_for_reloc): New.
8476 (elf64_alpha_calc_dynrel_sizes): Use it.
8477 (elf64_alpha_size_dynamic_sections): Likewise.
8478 (elf64_alpha_relocate_section): Handle TLS relocations.
8479 * reloc.c: Add Alpha TLS relocations.
8480 * bfd-in2.h, libbfd.h: Rebuild.
8481
8482 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
8483
8484 * peXXigen.c (pe_print_idata): Remove double printed
8485 import table lines; add Bound-To comment.
8486
8487 2002-05-29 Matt Thomas <matt@3am-software.com>
8488
8489 * Makefile.am (BFD32_BACKENDS): Add elf32-vax.lo.
8490 (BFD32_BACKENDS_CFILES): Add elf32-vax.c.
8491 (elf32-vax.lo): New rule.
8492 * Makefile.in: Regenerate.
8493 * configure.in (bfd_elf32_vax_vec)
8494 (vaxnetbsd_vec): New vectors.
8495 * configure: Regenerate.
8496 * config.bfd (vax-*-netbsdelf*)
8497 (vax-*-netbsdaout*)
8498 (vax-*-netbsd*): New targets.
8499 * elf32-vax.c: New file.
8500 * reloc.c: Add VAX relocations.
8501 * bfd-in2.h: Regenerate.
8502 * targets.c (_bfd_target_vector): Add bfd_elf32_vax_vec.
8503
8504 2002-05-29 Jason Thorpe <thorpej@wasabisystems.com>
8505
8506 * config.bfd (arm-*-netbsd*): Add bfd_elf32_littlearm_vec
8507 and bfd_elf32_bigarm_vec to targ_selvecs.
8508
8509 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
8510
8511 * peXXigen.c (pe_print_idata): Fix seg faults on printing import tables
8512 with auto-imported symbols.
8513
8514 2002-05-29 Adam Nemet <anemet@lnxw.com>
8515
8516 * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Don't add glue
8517 sections only record bfd.
8518 (bfd_elf32_arm_add_glue_sections_to_bfd): New function.
8519 * bfd-in.h (bfd_elf32_arm_add_glue_sections_to_bfd): Declare it.
8520 * bfd-in2.h: Regenerate.
8521
8522 2002-05-28 Nick Clifton <nickc@cambridge.redhat.com>
8523
8524 * syms.c (_bfd_stab_section_find_nearest_line): Move
8525 declaration and initialisation of saw_line and saw_func out of
8526 for loop.
8527
8528 2002-05-29 Alan Modra <amodra@bigpond.net.au>
8529
8530 * elf64-ppc.c (ppc64_elf_get_symbol_info): New function.
8531 (bfd_elf64_get_symbol_info): Define.
8532 * elfxx-target.h (bfd_elfNN_get_symbol_info): Only define if undef.
8533
8534 2002-05-29 Andrey Volkov <avolkov@transas.com>
8535
8536 * cpu-h8300.c: Make default h8300 machine first in machine list.
8537
8538 2002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net>
8539
8540 * config.bfd: Added DLX configuraton.
8541 * Makefile.am: Added DLX configuraton.
8542 * configure.in: Added DLX configuraton.
8543 * archures.c: Add DLX architecture.
8544 * reloc.c: Add DLX relocs.
8545 * targets.c: Added DLX target vector.
8546 * configure: Regenerate.
8547 * Makefile.in: Regenreate.
8548 * bfd-in2.h: Regenreate.
8549 * elf32-dlx.c: New file: Support DLX target.
8550 * cpu-dlx.c: New file: Support DLX target.
8551
8552 2002-05-25 Alan Modra <amodra@bigpond.net.au>
8553
8554 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Formatting.
8555
8556 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Revert last change.
8557 (ppc64_elf_check_relocs): Don't set up function descriptor symbol
8558 strings to point inside function code sym string.
8559 (func_desc_adjust): Likewise.
8560 (ppc64_elf_hide_symbol): Rewrite code to look up function code sym.
8561
8562 2002-05-24 Michal Ludvig <mludvig@suse.cz>
8563
8564 * elf64-x86-64.c (elf64_x86_64_grok_prstatus): Added.
8565 (elf64_x86_64_grok_psinfo): Added.
8566
8567 2002-05-24 TAMURA Kent <kent@netbsd.org>
8568
8569 * config.bfd: Add a target for i386-netbsdpe.
8570
8571 2002-05-24 Alan Modra <amodra@bigpond.net.au>
8572
8573 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy is_func
8574 and is_func_descriptor.
8575 (func_desc_adjust): Hide function code sym in shared libs unless
8576 there is a matching exported function descriptor sym.
8577
8578 2002-05-23 Jakub Jelinek <jakub@redhat.com>
8579
8580 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_THREAD_LOCAL
8581 for symbols from SHF_TLS section.
8582 (_bfd_elf_print_private_bfd_data): Add PT_TLS.
8583 (elf_fake_sections): Set SHF_TLS for SEC_THREAD_LOCAL sections.
8584 (map_sections_to_segments): Build PT_TLS segment if necessary.
8585 (assign_file_positions_for_segments): Likewise.
8586 (get_program_header_size): Account for PT_TLS segment.
8587 (swap_out_syms): Set type of BSF_THREAD_LOCAL symbols and symbols from
8588 SEC_THREAD_LOCAL sections to STT_TLS.
8589 * reloc.c: Add 386 and IA-64 TLS relocs.
8590 * section.c (SEC_THREAD_LOCAL): Define.
8591 (SEC_CONSTRUCTOR_TEXT, SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS):
8592 Remove.
8593 * elflink.h (elf_link_add_object_symbols): Support .tcommon.
8594 (size_dynamic_sections): If DF_STATIC_TLS, set DF_FLAGS
8595 unconditionally.
8596 (struct elf_final_link_info): Add first_tls_sec.
8597 (elf_bfd_final_link): Set first_tls_sec.
8598 Compute elf_hash_table (info)->tls_segment.
8599 (elf_link_output_extsym): Handle STT_TLS symbols.
8600 (elf_link_input_bfd): Likewise.
8601 * syms.c (BSF_THREAD_LOCAL): Define.
8602 * bfd-in2.h: Rebuilt.
8603 * libbfd.h: Rebuilt.
8604 * elf32-i386.c (elf_i386_tls_transition, dtpoff_base, tpoff,
8605 elf_i386_mkobject, elf_i386_object_p): New functions.
8606 (elf_howto_table): Add TLS relocs.
8607 (elf_i386_reloc_type_lookup): Support TLS relocs.
8608 (elf_i386_info_to_howto_rel): Likewise.
8609 (struct elf_i386_link_hash_entry): Add tls_type.
8610 (struct elf_i386_obj_tdata): New.
8611 (elf_i386_hash_entry, elf_i386_tdata, elf_i386_local_got_tls_type):
8612 New macros.
8613 (struct elf_i386_link_hash_table): Add tls_ldm_got.
8614 (link_hash_newfunc): Clear tls_type.
8615 (elf_i386_check_relocs): Support TLS relocs.
8616 (elf_i386_gc_sweep_hook): Likewise.
8617 (allocate_dynrelocs): Likewise.
8618 (elf_i386_size_dynamic_sections): Likewise.
8619 (elf_i386_relocate_section): Likewise.
8620 (elf_i386_finish_dynamic_symbol): Likewise.
8621 (bfd_elf32_mkobject, elf_backend_object_p): Define.
8622 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add tprel_offset,
8623 dtpmod_offset, dtprel_offset, tprel_done, dtpmod_done, dtprel_done,
8624 want_tprel, want_dtpmod, want_dtprel.
8625 (elfNN_ia64_tprel_base, elfNN_ia64_dtprel_base): New functions.
8626 (ia64_howto_table): Add TLS relocs, rename R_IA64_LTOFF_TP22 to
8627 R_IA64_LTOFF_TPREL22.
8628 (elf_code_to_howto_index): Add TLS relocs.
8629 (elfNN_ia64_check_relocs): Support TLS relocs.
8630 (allocate_global_data_got): Account for TLS .got data.
8631 (allocate_dynrel_entries): Account for TLS dynamic relocations.
8632 (elfNN_ia64_install_value): Supprt TLS relocs.
8633 (set_got_entry): Support TLS relocs.
8634 (elfNN_ia64_relocate_section): Likewise.
8635
8636 2002-05-23 Nick Clifton <nickc@cambridge.redhat.com>
8637
8638 * elf32-arm.h (elf32_arm_final_link_relocate): For the Thumb
8639 BLX reloc round the relocation up rather than down.
8640 * coff-arm.c (coff_arm_relocate_section): Likewise.
8641
8642 2002-05-21 H.J. Lu (hjl@gnu.org)
8643
8644 * linker.c (_bfd_generic_link_add_one_symbol): Allow multiple
8645 definition.
8646
8647 2002-05-22 Alan Modra <amodra@bigpond.net.au>
8648
8649 * elf64-ppc.c (ppc64_elf_size_stubs): Don't strip .branch_lt.
8650 (ppc64_elf_relocate_section): Handle unresolved relocs in opd.
8651
8652 2002-05-22 Alan Modra <amodra@bigpond.net.au>
8653
8654 * elf64-ppc.c (ppc64_elf_relocate_section): Return false for
8655 unresolved relocs.
8656 (ppc64_elf_size_dynamic_sections): Check for splt NULL.
8657
8658 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8659
8660 * bfd.c (bfd_get_arch_size): Remove bfd_set_error call for
8661 non-ELF targets.
8662
8663 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8664
8665 * elf-bfd.h (elf_backend_emit_relocs): Change prototype to return
8666 an error value.
8667 * elflink.h (elf_link_output_relocs): Likewise. Improve error message.
8668 return with false on error.
8669 (elf_link_input_bfd): Check reloc_emitter return value.
8670
8671 2002-05-21 Jason Thorpe <thorpej@wasabisystems.com>
8672
8673 * config.bfd (armeb-*-netbsdelf*): New target.
8674
8675 2002-05-20 Alan Modra <amodra@bigpond.net.au>
8676
8677 * elf64-ppc.c (ppc_build_one_stub): Point undefined function syms
8678 at the plt call stub.
8679
8680 2002-05-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8681
8682 * cpu-mips.c (mips_compatible): Don't try to check machine
8683 compatibility.
8684
8685 2002-05-18 Tom Rix <trix@redhat.com>
8686
8687 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_out): Fix C_FILE auxent.
8688
8689 2002-05-17 Alan Modra <amodra@bigpond.net.au>
8690
8691 * elf64-ppc.c (ppc64_elf_info_to_howto): Formatting.
8692 (ppc64_elf_relocate_section): Don't warn about reloc overflow when
8693 we've already warned about an undefined symbol. Report more
8694 detail on reloc errors.
8695
8696 2002-05-17 Alan Modra <amodra@bigpond.net.au>
8697
8698 * acinclude.m4 (AM_INSTALL_LIBBFD): New.
8699 * configure.in: Invoke AM_INSTALL_LIBBFD.
8700 * Makefile.am (install-data-local): Revert 2002-05-13. Move to..
8701 (install_libbfd): .. New target.
8702 (uninstall_libbfd): Likewise.
8703 (install-bfdlibLTLIBRARIES): Likewise.
8704 (uninstall-bfdlibLTLIBRARIES): Likewise.
8705 (bfdlibdir): New.
8706 (bfdincludedir): New.
8707 (lib_LTLIBRARIES): Rename to bfdlib_LTLIBRARIES.
8708 * aclocal.m4: Regenerate.
8709 * configure: Regenerate.
8710 * Makefile.in: Regenerate.
8711
8712 2002-05-17 Stuart Balfour <sbalfour@cisco.com>
8713
8714 * hash.c (bfd_hash_lookup): Remove computation of len from inside
8715 hash loop.
8716
8717 2002-05-16 Nick Clifton <nickc@cambridge.redhat.com>
8718
8719 * config.bfd: Add targets for sh64-linux (little endian and
8720 big endian).
8721
8722 2002-05-15 Laurent Pinchart <laurent.pinchart@skynet.be>
8723
8724 * peXXigen.c (pe_print_idata): Do not assume that the first thunk
8725 is located in the same section as the import table. Instead
8726 check, and if necessary load the section containing the thunk.
8727
8728 2002-05-15 Nick Clifton <nickc@cambridge.redhat.com>
8729
8730 * aix5ppc-core.c (xcoff64_core_p): Replace bfd_read with
8731 bfd_bread.
8732 (xcoff64_core_file_matches_executable_p): Replace bfd_read
8733 with bfd_bread.
8734
8735 2002-05-15 Alan Modra <amodra@bigpond.net.au>
8736
8737 * aix5ppc-core.c: Warning fixes.
8738 * aout-adobe.c (aout_32_bfd_link_just_syms): Define.
8739 * aout-target.h (MY_bfd_link_just_syms): Define.
8740 * aout-tic30.c (MY_bfd_link_just_syms): Define.
8741 * bfd.c (bfd_link_just_syms): Define.
8742 * binary.c (binary_bfd_link_just_syms): Define.
8743 * bout.c (b_out_bfd_link_just_syms): Define.
8744 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update initializer.
8745 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
8746 * coffcode.h (coff_bfd_link_just_syms): Define.
8747 * elf-bfd.h (enum elf_link_info_type): Add ELF_INFO_TYPE_JUST_SYMS.
8748 (elf_discarded_section): Check for ELF_INFO_TYPE_JUST_SYMS.
8749 (_bfd_elf_link_just_syms): Declare.
8750 * elf.c (_bfd_elf_link_just_syms): New function.
8751 * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Check that
8752 sections haven't already been discarded by the linker.
8753 * elflink.h (elf_link_add_object_symbols): Likewise for stab
8754 sections and SEC_MERGE sections.
8755 (elf_bfd_discard_info): Similarly here.
8756 * elfxx-target.h (bfd_elfNN_bfd_link_just_syms): Define.
8757 * i386msdos.c (msdos_bfd_link_just_syms): Define.
8758 * i386os9k.c (os9k_bfd_link_just_syms): Define.
8759 * ieee.c (ieee_bfd_link_just_syms): Define.
8760 * ihex.c (ihex_bfd_link_just_syms): Define.
8761 * libbfd-in.h (_bfd_nolink_bfd_link_just_syms): Define.
8762 (_bfd_generic_link_just_syms): Declare.
8763 * libecoff.h (_bfd_ecoff_bfd_link_just_syms): Define.
8764 * linker.c (_bfd_generic_link_just_syms): New function.
8765 * mmo.c (mmo_bfd_link_just_syms): Define.
8766 * nlm-target.h (nlm_bfd_link_just_syms): Define.
8767 * oasys.c (oasys_bfd_link_just_syms): Define.
8768 * ppcboot.c (ppcboot_bfd_link_just_syms): Define.
8769 * som.c (som_bfd_link_just_syms): Define.
8770 * srec.c (srec_bfd_link_just_syms): Define.
8771 * targets.c (struct bfd_target): Add _bfd_link_just_syms.
8772 (BFD_JUMP_TABLE_LINK): And here.
8773 * tekhex.c (tekhex_bfd_link_just_syms): Define.
8774 * versados.c (versados_bfd_link_just_syms): Define.
8775 * vms.c (vms_bfd_link_just_syms): Define.
8776 * libbfd.h: Regenerate.
8777 * bfd-in2.h: Regenerate.
8778
8779 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8780
8781 * elf32-mips.c: Remove superfluous definitions copied from
8782 elfxx-mips.c.
8783 (bfd_elf32_bigmips_vec,bfd_elf32_littlemips_vec): Use the
8784 SGIish vectors to check the special case.
8785 (mips_elf_hi16_reloc): Fix comment.
8786 (mips_elf_got16_reloc): Likewise.
8787 (_bfd_mips_elf32_gprel16_reloc): Likewise.
8788 (elf_reloc_map): Code cleanup.
8789 (mips_reloc_map): Add comment.
8790 (bfd_elf23_bfd_reloc_type_lookup): Code cleanup.
8791 (mips_elf32_rtype_to_howto): Likewise.
8792 (mips_elf32_discard_info): Likewise.
8793 (elf32_mips_irix_compat): Invert logic: Only SGIish vectors
8794 lead to IRIX compatibility now.
8795
8796 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8797
8798 * elfxx-mips.c: Call it IRIX, not Irix in comments.
8799
8800 2002-05-13 Jason Thorpe <thorpej@wasabisystems.com>
8801
8802 * config.bfd (shle-*-netbsdelf*): Add target which includes
8803 sh64 support.
8804
8805 2002-05-13 David Edelsohn <edelsohn@gnu.org>
8806
8807 * configure.in: Revert 2002-04-07. Instead, auto-configure
8808 HAVE_ST_C_IMPL.
8809 * configure: Regenerate.
8810 * config.in: Regenerate.
8811 * rs6000-core.c (CNEW_IMPL): Guard use of c_impl with HAVE_ST_C_IMPL
8812 or AIX_5_CORE.
8813
8814 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
8815
8816 * configure.in (sparc*-*-openbsd*): Support sparc64-openbsd
8817 corefiles as well.2
8818 * configure: Regenerate.
8819
8820 2002-05-13 Alan Modra <amodra@bigpond.net.au>
8821
8822 * Makefile.am (install-data-local): Install headers to
8823 $(exec_prefix)/include.
8824 * Makefile.in: Regenerate.
8825
8826 2002-05-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
8827 Daniel Jacobowitz <drow@mvista.com>
8828
8829 * coff-sh.c (sh_reloc_map): Map to R_SH_IMM32 for non-PE. Don't
8830 map BFD_RELOC_RVA.
8831
8832 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
8833
8834 * config.bfd (alpha*-*-openbsd*, sparc64*-*-openbsd*,
8835 hppa*-*-openbsd*): New targets.
8836 * configure.in (alpha*-*-openbsd*): Set COREFILE.
8837 * configure: Regenerate.
8838
8839 2002-05-10 Tom Rix <trix@redhat.com>
8840
8841 * coff64-rs6000.c (xcoff64_reloc_type_br): New function for
8842 xcoff64_ppc_relocate_section.
8843 * coff-rs6000.c : Extern common xcoff_reloc_type functions.
8844 * libxcoff.h: Common xcoff_reloc_type function declaration.
8845
8846 2002-05-10 Alan Modra <amodra@bigpond.net.au>
8847
8848 * elf32-i386.c (elf_i386_relocate_section): Remove overflow checks
8849 added in 2002-05-09 commit.
8850
8851 * elf32-hppa.c (elf32_hppa_size_stubs): Revert part of 2002-05-04,
8852 don't look for stubs on all undefined syms.
8853
8854 2002-05-09 Alan Modra <amodra@bigpond.net.au>
8855
8856 * elf64-ppc.c (RA_REGISTER_MASK, RA_REGISTER_SHIFT): Delete.
8857 (ppc64_elf_howto_raw <R_PPC64_RELATIVE>): Not pc_relative or
8858 pcrel_offset.
8859
8860 * elf32-i386.c (elf_howto_table): Comments.
8861 (elf_i386_relocate_section): Handle more relocs for relocatable
8862 linking and against SEC_MERGE sections.
8863
8864 2002-05-08 Alan Modra <amodra@bigpond.net.au>
8865
8866 * elf32-ppc.c (ppc_elf_create_got): New function.
8867 (ppc_elf_create_dynamic_sections): Call ppc_elf_create_got before
8868 _bfd_elf_create_dynamic_sections. Correct .plt flags.
8869 (ppc_elf_check_relocs): Use ppc_elf_create_got in place of
8870 _bfd_elf_create_got_section.
8871
8872 2002-05-07 Alan Modra <amodra@bigpond.net.au>
8873
8874 * elf-bfd.h (struct elf_backend_data): Add rela_normal.
8875 * elfxx-target.h (elf_backend_rela_normal): Define.
8876 (elfNN_bed): Init rela_normal.
8877 * elflink.h (elf_link_input_bfd <emit_relocs>): Handle adjustment
8878 for section symbols here if rela_normal. Simplify abs section test.
8879 * elf-m10200.c (mn10200_elf_relocate_section): If relocatable,
8880 return immediately. Remove code handling relocatable linking.
8881 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
8882 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
8883 * elf32-i370.c (i370_elf_relocate_section): Likewise.
8884 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
8885 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
8886 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
8887 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
8888 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
8889 * elf32-s390.c (elf_s390_relocate_section): Likewise.
8890 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
8891 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
8892 * elf64-s390.c (elf_s390_relocate_section): Likewise.
8893 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
8894 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
8895 * elf32-arm.h (elf32_arm_relocate_section): Likewise #ifndef USE_REL.
8896 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
8897 * elf-m10200.c (elf_backend_rela_normal): Define.
8898 * elf-m10300.c (elf_backend_rela_normal): Define.
8899 * elf32-fr30.c (elf_backend_rela_normal): Define.
8900 * elf32-i370.c (elf_backend_rela_normal): Define.
8901 * elf32-i860.c (elf_backend_rela_normal): Define.
8902 * elf32-m68k.c (elf_backend_rela_normal): Define.
8903 * elf32-mcore.c (elf_backend_rela_normal): Define.
8904 * elf32-openrisc.c (elf_backend_rela_normal): Define.
8905 * elf32-ppc.c (elf_backend_rela_normal): Define.
8906 * elf32-s390.c (elf_backend_rela_normal): Define.
8907 * elf32-xstormy16.c (elf_backend_rela_normal): Define.
8908 * elf64-ppc.c (elf_backend_rela_normal): Define.
8909 * elf64-s390.c (elf_backend_rela_normal): Define.
8910 * elf64-x86-64.c (elf_backend_rela_normal): Define.
8911 * elfxx-ia64.c (elf_backend_rela_normal): Define.
8912 * elf32-arm.h (elf_backend_rela_normal): Define #ifndef USE_REL.
8913 * elf32-m32r.c (elf_backend_rela_normal): Likewise.
8914
8915 2002-05-06 Nick Clifton <nickc@cambridge.redhat.com>
8916
8917 * elf32-arm.h (elf32_arm_final_link_relocate): Convert
8918 'reloc_signed_max' and 'reloc_signed_min' into half-word offsets.
8919
8920 2002-05-06 Alan Modra <amodra@bigpond.net.au>
8921
8922 * elflink.h (elf_link_input_bfd <emit_relocs>): Adjust r_offset
8923 when not relocatable. Fix reloc_emitter call for K&R.
8924
8925 2002-05-04 Alan Modra <amodra@bigpond.net.au>
8926
8927 * elf64-ppc.c (ppc64_elf_relocate_section): Reinstate code
8928 reloading local sym addend mistakenly removed in 2002-05-01 change.
8929
8930 * dwarf2.c (struct line_head): Make prologue_length a bfd_vma.
8931 (read_abbrevs): Change "offset" param to bfd_vma.
8932 (parse_comp_unit): Change "version" and addr_size to unsigned ints.
8933 Change "abbrev_offset" to bfd_vma.
8934 (read_indirect_string): Use correct conversion chars in error
8935 message format string, cast bfd_vma's to unsigned long.
8936 (read_abbrevs): Likewise.
8937 (read_attribute_value): Likewise.
8938 (decode_line_info): Likewise.
8939 (scan_unit_for_functions): Likewise.
8940 (parse_comp_unit): Likewise.
8941
8942 2002-05-04 Tom Rix <trix@redhat.com>
8943
8944 * coffswap.h (coff_swap_reloc_in): Remove XCOFF support.
8945 (coff_swap_reloc_out): Same.
8946 * coff-rs6000.c: (xcoff_swap_reloc_in): Moved from coffswap.h.
8947 (xcoff_swap_reloc_out): Same.
8948 (xcoff_rtype2howto): Renamed from _bfd_xcoff_rtype2howto. Special
8949 case some 16 bit relocs. Add reloc value to output.
8950 (xcoff_howto_table): Remove 64 bit R_POS, add 16 bit
8951 R_RBR. Improve names.
8952 (_bfd_xcoff_reloc_type_lookup): Adjust for removal of 64 bit R_POS.
8953 (bfd_xcoff_backend_data): Update with new reloc swap names.
8954 (bfd_pmac_xcoff_backend_data) : Same.
8955 * coff64-rs6000.c: (xcoff64_swap_reloc_in): Moved from coffswap.h.
8956 (xcoff64_swap_reloc_out): Same.
8957 (xcoff64_rtype2howto): Special case some 16 bit relocs and 32 bit
8958 R_POS. Add reloc value to output.
8959 (xcoff64_howto_table): Move 64 bit R_POS to first entry. Add 16
8960 bit R_RBR. Improve names, masks.
8961 (xcoff64_reloc_type_lookup): Adjust for move of 64 bit R_POS.
8962 (bfd_xcoff_backend_data): Update with new reloc swap names.
8963 (bfd_xcoff_aix5_backend_data) : Same.
8964
8965 2002-05-04 Alan Modra <amodra@bigpond.net.au>
8966
8967 * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add
8968 bfd_count top_index, input_list, all_local_syms.
8969 (elf32_hppa_setup_section_lists): New function, split from
8970 elf32_hppa_size_stubs.
8971 (elf32_hppa_next_input_section): Likewise.
8972 (group_sections): Likewise.
8973 (get_local_syms): Likewise.
8974 (elf32_hppa_size_stubs): Adjust for split out functions. Look for
8975 stubs on undefined syms too.
8976 (elf32_hppa_set_gp): Use bfd_link_hash* instead of elf_link_hash*.
8977 Only access htab elf fields when we have an elf hash table.
8978 * elf32-hppa.h (elf32_hppa_setup_section_lists): Declare.
8979 (elf32_hppa_next_input_section): Declare.
8980
8981 2002-05-04 Bob Byrnes <byrnes@curl.com>
8982
8983 * opncls.c (_bfd_new_bfd_contained_in): Check return value of
8984 _bfd_new_bfd.
8985
8986 2002-05-03 H.J. Lu (hjl@gnu.org)
8987
8988 * elfxx-mips.c (mips_elf_link_hash_entry): Add forced_local.
8989 (mips_elf_link_hash_newfunc): Initialize forced_local to false.
8990 (mips_elf_record_global_got_symbol): Call _bfd_mips_elf_hide_symbol
8991 to hide a global symbol.
8992 (_bfd_mips_elf_hide_symbol): Return if forced_local is true. Set
8993 forced_local to true.
8994
8995 2002-05-02 Richard Henderson <rth@redhat.com>
8996
8997 * elf64-alpha.c (elf64_alpha_relocate_section): Force relative relocs
8998 vs SHN_UNDEF to zero.
8999
9000 2002-05-02 Alan Modra <amodra@bigpond.net.au>
9001
9002 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_SECTOFF>): Change to a
9003 16 bit reloc.
9004 <R_PPC64_SECTOFF_DS>: Likewise.
9005 (ppc64_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
9006 SECTOFF reloc.
9007 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_SECTOFF>): Correct.
9008 (ppc_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
9009 SECTOFF reloc.
9010
9011 * elf64-ppc.c (ppc64_elf_addr16_ha_reloc): Delete.
9012 (ppc64_elf_ha_reloc): New function.
9013 (ppc64_elf_brtaken_reloc): New function.
9014 (ppc64_elf_sectoff_reloc): New function.
9015 (ppc64_elf_sectoff_ha_reloc): New function.
9016 (ppc64_elf_toc_reloc): New function.
9017 (ppc64_elf_toc_ha_reloc): New function.
9018 (ppc64_elf_toc64_reloc): New function.
9019 (ppc64_elf_unhandled_reloc): New function.
9020 (ppc64_elf_howto_raw): Use the above.
9021 <R_PPC64_RELATIVE>: Mark pc_relative, pcrel_offset.
9022 <R_PPC64_SECTOFF>: Not pc_relative or pcrel_offset. Fix dst_mask.
9023 <R_PPC64_SECTOFF_DS>: Likewise.
9024 (IS_ABSOLUTE_RELOC): Update.
9025 (struct ppc_link_hash_table): Add have_undefweak.
9026 (ppc64_elf_link_hash_table_create): Init.
9027 (func_desc_adjust): Set have_undefweak.
9028 (ppc64_elf_func_desc_adjust): Call func_desc_adjust earlier. Only
9029 add the .sfpr blr when have_undefweak.
9030 (ppc64_elf_setup_section_lists): Check hash table flavour.
9031 (ppc64_elf_next_input_section): Move output_section->owner test to
9032 ppc64elf.em.
9033 (ppc64_elf_set_toc): Rename to ppc64_elf_toc, remove info param
9034 and relocatable test. Return TOCstart and don't set elf_gp.
9035 (ppc64_elf_relocate_section): Correct BRTAKEN/BRNTAKEN branch
9036 offset calculation. Add assert on weak sym branch tweaks.
9037 * elf64-ppc.h (ppc64_elf_set_toc): Delete.
9038 (ppc64_elf_toc): Declare.
9039 (ppc64_elf_next_input_section): Update.
9040
9041 2002-05-01 Alan Modra <amodra@bigpond.net.au>
9042
9043 * syms.c (_bfd_stab_section_find_nearest_line): Don't bomb on NULL
9044 file_name.
9045
9046 2002-05-01 Alan Modra <amodra@bigpond.net.au>
9047
9048 * elf64-ppc.c (CROR_151515, CROR_313131): Define.
9049 (ppc64_elf_relocate_section): Use them. Don't look for plt calls
9050 on R_PPC64_ADDR24 relocs. Require a nop or no link reg on plt
9051 call branches. Correct undefined weak destination.
9052 (ppc64_elf_func_desc_adjust): Always create at least one blr in
9053 .sfpr, and correct case where either only savef* or restf* is
9054 needed.
9055
9056 Long branch stubs, multiple stub sections.
9057 * elf64-ppc.h (ppc64_elf_setup_section_lists): Declare.
9058 (ppc64_elf_next_input_section): Declare.
9059 * elf64-ppc.c: Move linker-only prototypes.
9060 (STUB_SUFFIX): Define.
9061 (enum ppc_stub_type): New.
9062 (struct ppc_stub_hash_entry): New.
9063 (struct ppc_branch_hash_entry): New.
9064 (struct ppc_link_hash_entry): Add stub_cache, oh.
9065 (struct ppc_link_hash_table): Add stub_hash_table etc. Remove
9066 sstub. Add sbrlt, srelbrlt, has_14bit_branch, stub_iteration.
9067 Rename plt_overflow to stub_error.
9068 (ppc_stub_hash_lookup): Define.
9069 (ppc_branch_hash_lookup): Define.
9070 (stub_hash_newfunc): New function.
9071 (branch_hash_newfunc): New function.
9072 (link_hash_newfunc): Init new fields.
9073 (ppc64_elf_link_hash_table_create): Likewise.
9074 (ppc64_elf_link_hash_table_free): New function.
9075 (ppc_stub_name): New function.
9076 (ppc_get_stub_entry): New function.
9077 (ppc_add_stub): New function.
9078 (create_linkage_sections): Use bfd_make_section_anyway. Create
9079 .branch_lt and .rela.branch_lt sections. Don't create .stub.
9080 (ppc64_elf_check_relocs): Set has_14bit_branch on R_PPC64_REL14*,
9081 and set up for plt call stubs. Link func and func desc syms.
9082 (ppc64_elf_gc_sweep_hook): Handle REL14* as per REL24.
9083 (func_desc_adjust): Avoid hash lookup when func desc sym available
9084 via shortcut, and set links when processing.
9085 (ppc64_elf_hide_symbol): Likewise.
9086 (allocate_dynrelocs): Don't allocate stub section here.
9087 (ppc64_elf_size_dynamic_sections): Handle sbrlt and srelbrlt.
9088 Remove sstub code.
9089 (ppc_type_of_stub): New function.
9090 (build_one_stub): Delete.
9091 (ppc_build_one_stub): New function.
9092 (ppc_size_one_stub): New function.
9093 (ppc64_elf_setup_section_lists): New function.
9094 (ppc64_elf_next_input_section): New function.
9095 (group_sections): New function.
9096 (get_local_syms): New function.
9097 (ppc64_elf_size_stubs): Rewrite.
9098 (ppc64_elf_build_stubs): Rewrite.
9099 (ppc64_elf_relocate_section): Look up stub entry for REL24
9100 relocs. Don't propagate REL14* to dynamic objects. Look for long
9101 branch stubs if REL14* or REL24 relocs won't reach.
9102 (bfd_elf64_bfd_link_hash_table_free): Define.
9103
9104 2002-04-30 Mark Mitchell <mark@codesourcery.com>
9105
9106 * config.bfd: Add support for powerpc-*-windiss.
9107
9108 2002-04-30 Tom Rix <trix@redhat.com>
9109
9110 * xcofflink.c (xcoff_link_add_symbols): Always copy undef C_EXT
9111 symbol names into the hash table.
9112
9113 2002-04-28 Tom Rix <trix@redhat.com>
9114
9115 * coff-rs6000.c (xcoff_calculate_relocation) : Function table for
9116 calulating relocations.
9117 (xcoff_complain_overflow) : Function table for relocation errors.
9118 (xcoff_ppc_relocate_section): Use relocation and complain function
9119 tables.
9120 (xcoff_complain_overflow_unsigned_func): New complain function.
9121 (xcoff_complain_overflow_signed_func): Same.
9122 (xcoff_complain_overflow_bitfield_func): Same.
9123 (xcoff_complain_overflow_dont_func): Same.
9124 (xcoff_reloc_type_crel): New recot function.
9125 (xcoff_reloc_type_br): Same.
9126 (xcoff_reloc_type_ba): Same.
9127 (xcoff_reloc_type_toc): Same.
9128 (xcoff_reloc_type_rel): Same.
9129 (xcoff_reloc_type_neg): Same.
9130 (xcoff_reloc_type_pos): Same.
9131 (xcoff_reloc_type_fail): Same.
9132 (xcoff_reloc_type_noop): Same.
9133 * libxcoff.h : Declare common parts for xcoff64.
9134 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Use relocation
9135 and complain function tables.
9136
9137 2002-04-28 Alan Modra <amodra@bigpond.net.au>
9138
9139 * elf64-x86-64.c (struct elf64_x86_64_dyn_relocs): Comment typo.
9140 * elf32-hppa.c (elf32_hppa_final_link): Formatting.
9141
9142 2002-04-26 Alan Modra <amodra@bigpond.net.au>
9143
9144 * opncls.c (bfd_make_readable): Call bfd_section_list_clear.
9145 * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
9146
9147 * elflink.h (elf_bfd_final_link): Ensure input bfd class is the
9148 same as the output before calling elf_link_input_bfd.
9149
9150 * coffcode.h (coff_compute_section_file_positions): Set
9151 section_tail after shuffling section list.
9152
9153 2002-04-24 Christian Groessler <chris@groessler.org>
9154
9155 * coff-z8k.c (extra_case): Fix R_IMM32 relocations: The
9156 addresses are 23bit with a special layout, not plain 32bit
9157 values. Prevent relocation of immediate values.
9158
9159 2002-04-24 Chris G. Demetriou <cgd@broadcom.com>
9160
9161 * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): If MDMX or
9162 MIPS-16 ASE flags are set, print something to indicate that.
9163
9164 2002-04-23 Alan Modra <amodra@bigpond.net.au>
9165
9166 * elf32-hppa.c (hppa_type_of_stub): Correct and simplify condition
9167 under which a plt call stub is used.
9168 (final_link_relocate): Similarly.
9169 (allocate_plt_static): Clear h-plabel except when plt entry is
9170 exclusively used for a plabel.
9171 (allocate_dynrelocs): Use the above to simplify plt sizing.
9172 (struct elf32_hppa_link_hash_table): Add has_22bit_branch.
9173 (elf32_hppa_link_hash_table_create): Init.
9174 (BL22_RP): Define.
9175 (hppa_build_one_stub): Use BL22_RP if has_22bit_branch.
9176 (elf32_hppa_check_relocs): Set has_22bit_branch.
9177
9178 * elf32-hppa.c (elf32_hppa_check_relocs): Remove debug message.
9179 (final_link_relocate): Likewise.
9180
9181 2002-04-22 Jakub Jelinek <jakub@redhat.com>
9182
9183 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't build
9184 search table if some FDE is DW_EH_PE_aligned encoded either.
9185 (_bfd_elf_write_section_eh_frame): Handle terminating FDE specially.
9186
9187 2002-04-22 Richard Smith <richard@ex-parrot.com>
9188 Jakub Jelinek <jakub@redhat.com>
9189
9190 * elf-eh-frame.c (struct eh_cie_fde): Add per_encoding_relative.
9191 (_bfd_elf_discard_section_eh_frame): Set it for CIEs with pcrel
9192 encoded personality.
9193 (_bfd_elf_write_section_eh_frame): Adjust pcrel encoded personality
9194 for CIE/FDE removal.
9195
9196 2002-04-20 Tom Rix <trix@redhat.com>
9197
9198 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Fix C_FILE auxent.
9199
9200 2002-04-20 Alan Modra <amodra@bigpond.net.au>
9201
9202 * archures.c (bfd_lookup_arch): Move the list order comment..
9203 (struct bfd_arch_info): ..to where it belongs.
9204 * bfd-in2.h: Regenerate.
9205
9206 * archures.c (bfd_lookup_arch): Add comment on list order.
9207 (bfd_default_set_arch_mach): Use bfd_lookup_arch.
9208 * cpu-powerpc.c (bfd_powerpc_archs): Re-order so that the default
9209 is always at head of list.
9210
9211 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
9212
9213 * coff-arm.c (coff_thumb_pcrel_12, coff_thumb_pcrel_9,
9214 insert_thumb_branch, record_thumb_to_arm_glue): Suppress
9215 definition of these functions for ARM_WINCE builds as they are
9216 not used.
9217 (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET): Do not define
9218 for ARM_WINCE builds.
9219
9220 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
9221
9222 * coff-arm.c (bfd_arm_process_before_allocation):
9223
9224 2002-04-17 J"orn Rennecke <joern.rennecke@superh.com>
9225
9226 * cpu-sh.c (scan_mach): Delete.
9227 (arch_info_struct): Replace scan_mach with bfd_default_scan.
9228 (bfd_sh_arch): Likewise.
9229
9230 2002-04-16 Nick Clifton <nickc@cambridge.redhat.com>
9231
9232 * ihex.c (ihex_write_object_contents): Fix check for records
9233 crossing 64K boundaries.
9234
9235 2002-04-16 Alan Modra <amodra@bigpond.net.au>
9236
9237 * elf32-m32r.c (m32r_elf_add_symbol_hook): Check the hash table
9238 type rather than just assuming entries are ELF.
9239 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
9240 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
9241 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Likewise.
9242 * elf64-mmix.c (mmix_elf_add_symbol_hook): Use bfd_link_hash_entry
9243 rather than elf_link_hash_entry.
9244
9245 2002-04-15 Richard Henderson <rth@redhat.com>
9246
9247 * elf32-mips.c (mips_elf32_object_p): Revert 0404 fragment: allow
9248 n32 binaries.
9249
9250 2002-04-15 Michael Snyder <msnyder@redhat.com>
9251
9252 * opncls.c (bfd_close): Write contents if writeable.
9253 Minor formatting tidy-ups.
9254
9255 2002-04-15 Alan Modra <amodra@bigpond.net.au>
9256
9257 * elf32-ppc.c (ppc_elf_add_symbol_hook): Check the hash table type.
9258
9259 2002-04-12 Michael Snyder <msnyder@redhat.com>
9260
9261 * bfd-in.h (bfd_get_section_lma): New access macro.
9262 Minor white-space fix-up.
9263
9264 2002-04-12 Alan Modra <amodra@bigpond.net.au>
9265
9266 * elf.c (prep_headers): Don't zero EI_OSABI, EI_ABIVERSION or
9267 header pad.
9268
9269 2002-04-09 DJ Delorie <dj@redhat.com>
9270
9271 * elfarm-nabi.c (elf32_arm_howto_table): Fix ABS16 masks.
9272
9273 2002-04-09 Casper S. Hornstrup <chorns@users.sourceforge.net>
9274
9275 * coffcode.h (coff_read_word): New.
9276 (coff_compute_checksum): New.
9277 (coff_apply_checksum): New.
9278 (coff_write_object_contents): Call coff_apply_checksum () to
9279 apply checksum to PE image.
9280
9281 2002-04-08 Randolph Chung <tausq@debian.org>
9282
9283 * elf32-hppa.c (hppa_unwind_entry_compare): Move to elf-hppa.h.
9284 (elf32_hppa_final_link): Split out sorting logic to..
9285 * elf-hppa.h (elf_hppa_sort_unwind): ..here.
9286 (elf_hppa_final_link): Call elf_hppa_sort_unwind.
9287
9288 2002-04-07 Andrew Cagney <ac131313@redhat.com>
9289
9290 * configure.in: Add missing ``|'' to powerpc-*-aix4.[4-9]*
9291 pattern.
9292 * configure: Re-generate.
9293
9294 2002-04-07 Andrew Cagney <ac131313@redhat.com>
9295
9296 * configure.in: Only define AIX_CORE_DUMPX_CORE when AIX version
9297 is greater or equal to 4.3.3.
9298 * configure: Regenerate.
9299 Fix PR gdb/344.
9300
9301 2002-04-05 Hans-Peter Nilsson <hp@axis.com>
9302
9303 * elf32-cris.c (cris_elf_howto_table) <R_CRIS_16_PCREL,
9304 R_CRIS_32_PCREL>: Fix typo in name.
9305 (cris_elf_check_relocs): Always create .rela.got here when
9306 R_CRIS_16_GOTPLT or R_CRIS_32_GOTPLT is seen.
9307 (elf_cris_adjust_gotplt_to_got): Don't create .rela.got here;
9308 assume it's created.
9309
9310 2002-04-04 Daniel Jacobowitz <drow@mvista.com>
9311
9312 * aout-adobe.c (aout_32_bfd_link_hash_table_free): Define.
9313 * aout-target.h (MY_bfd_link_hash_table_free): Conditionally
9314 define.
9315 * aout-tic30.c (MY_bfd_link_hash_table_free): Likewise.
9316 * bfd.c (bfd_link_hash_table_free): Define.
9317 * binary.c (binary_bfd_link_hash_table_free): Define.
9318 * bout.c (b_out_bfd_link_hash_table_free): Define.
9319 * coff-rs6000.c (rs6000coff_vec): Include
9320 _bfd_generic_link_hash_table_free.
9321 (pmac_xcoff_vec): Likewise.
9322 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
9323 (aix5coff64_vec): Likewise.
9324 * coffcode.h (coff_bfd_link_hash_table_free): Conditionally define.
9325 * elf-m10300.c (elf32_mn10300_link_hash_table_free): New function.
9326 (bfd_elf32_bfd_link_hash_table_free): Define.
9327 * elf32-hppa.c (elf32_hppa_link_hash_table_free): New function.
9328 (bfd_elf32_bfd_link_hash_table_free): Define.
9329 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Conditionally
9330 define.
9331 * i386msdos.c (msdos_bfd_link_hash_table_free): Define.
9332 * i386os9k.c (os9k_bfd_link_hash_table_free): Define.
9333 * ieee.c (ieee_bfd_link_hash_table_free): Define.
9334 * ihex.c (ihex_bfd_link_hash_table_free): Define.
9335 * libbfd-in.h (_bfd_nolink_bfd_link_hash_table_free): Define.
9336 (_bfd_generic_link_hash_table_free): Add prototype.
9337 * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Add prototype.
9338 * libecoff.h (_bfd_ecoff_bfd_link_hash_table_free): Define.
9339 * linker.c (_bfd_generic_link_hash_table_free): New function.
9340 * mmo.c (mmo_bfd_link_hash_table_free): Define.
9341 * nlm-target.h (nlm_bfd_link_hash_table_free): Define.
9342 * oasys.c (oasys_bfd_link_hash_table_free): Define.
9343 * ppcboot.c (ppcboot_bfd_link_hash_table_free): Define.
9344 * som.c (som_bfd_link_hash_table_free): Define.
9345 * srec.c (srec_bfd_link_hash_table_free): Define.
9346 * tekhex.c (tekhex_bfd_link_hash_table_free): Define.
9347 * versados.c (versados_bfd_link_hash_table_free): Define.
9348 * vms.c (vms_bfd_link_hash_table_free): New function.
9349 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_free): New function.
9350
9351 * coff-arm.c (coff_arm_link_hash_table_create): Use bfd_malloc
9352 instead of bfd_alloc.
9353 * coff-h8300.c (h8300_coff_link_hash_table_create): Likewise.
9354 * coff-mcore.c (coff_mcore_link_hash_table_create): Likewise.
9355 * coff-ppc.c (ppc_coff_link_hash_table_create): Likewise.
9356 * cofflink.c (_bfd_coff_link_hash_table_create): Likewise.
9357 * ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
9358 * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise.
9359 * elf.c (_bfd_elf_link_hash_table_create): Likewise.
9360 * elf32-arm.h (elf32_arm_link_hash_table_create): Likewise.
9361 * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
9362 * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise.
9363 * elf32-i386.c (elf_i386_link_hash_table_create): Likewise.
9364 * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
9365 * elf32-s390.c (elf_s390_link_hash_table_create): Likewise.
9366 * elf32-sh.c (sh_elf_link_hash_table_create): Likewise.
9367 * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create): Likewise.
9368 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
9369 * elf64-s390.c (elf_s390_link_hash_table_create): Likewise.
9370 * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise.
9371 * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create): Likewise.
9372 * elf64-x86-64.c (elf64_x86_64_link_hash_table_create): Likewise.
9373 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
9374 * linker.c (_bfd_generic_link_hash_table_create): Likewise.
9375 * m68klinux.c (linux_link_hash_table_create): Likewise.
9376 * sparclinux.c (linux_link_hash_table_create): Likewise.
9377 * sunos.c (sunos_link_hash_table_create): Likewise.
9378 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise.
9379
9380 * targets.c: Add _bfd_link_hash_table_free to xvec.
9381
9382 * bfd-in2.h: Regenerate.
9383 * libbfd.h: Regenerate.
9384 * libcoff.h: Regenerate.
9385
9386 2002-04-04 Alan Modra <amodra@bigpond.net.au>
9387
9388 * dep-in.sed: Cope with absolute paths.
9389 * Makefile.am (dep.sed): Subst TOPDIR, and not INCDIR.
9390 Run "make dep-am".
9391 * Makefile.in: Regenerate.
9392 * coff-arm.c: Fix copyright date.
9393 * cpu-h8300.c: Likewise.
9394 * cpu-i370.c: Likewise.
9395 * cpu-s390.c: Likewise.
9396 * cpu-mips.c: Likewise.
9397 * po/SRC-POTFILES.in: Regenerate.
9398
9399 2002-04-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
9400
9401 * Makefile.am: Add elfxx-mips.c to the known backends.
9402 (elf32-mips.lo): remove dependency to coff/external.h.
9403 * Makefile.in: Regenerate.
9404 * configure.in: Add elfxx-mips.lo to all vectors using elf32-mips.lo
9405 Remove elf32-mips.lo from 64 bit vectors. Update dependencies
9406 accordingly.
9407 * configure: Regenerate.
9408 * elf-bfd.h: Move all MIPS ELF specific prototypes to elfxx-mips.h.
9409 (irix_compat_t): IRIX compatibility level, moved from elf32-mips.c.
9410 (elf_backend_mips_irix_compat, elf_backend_mips_rtype_to_howto): New
9411 MIPS specific backend functions.
9412 * elf32-mips.c: Moved most code to elfxx-mips.c.
9413 (mips_elf_hi16_reloc): Rename from _bfd_mips_elf_hi16_reloc and make
9414 static.
9415 (mips_elf_lo16_reloc): Likewise, was _bfd_mips_elf_lo16_reloc.
9416 (mips_elf_got16_reloc): Likewise, was _bfd_mips_elf_got16_reloc.
9417 (mips_elf_gprel32_reloc): Likewise, was _bfd_mips_elf_gprel32_reloc.
9418 (mips_elf32_rtype_to_howto): Rename from mips_rtype_to_howto. Changed
9419 interface to allow selection of the right REL or RELA howto table.
9420 (mips_elf32_object_p): Rename from _bfd_mips_elf_object_p and made
9421 static. Let it refuse n32 objects.
9422 (elf32_mips_grok_prstatus): Rename from _bfd_elf32_mips_grok_prstatus.
9423 (elf32_mips_grok_psinfo): Rename from _bfd_elf32_mips_grok_psinfo.
9424 (elf32_mips_discard_info): Rename from _bfd_elf32_mips_discard_info.
9425 (elf32_mips_ignore_discarded_relocs): Rename from
9426 _bfd_elf32_mips_ignore_discarded_relocs.
9427 (elf32_mips_write_section): Rename from _bfd_elf32_mips_write_section.
9428 (elf32_mips_irix_compat): New function, replaces IRIX_COMPAT.
9429 (elf_mips_howto_table_rela): Remove.
9430 * elf64-mips.c: Moved most code to elfxx-mips.c.
9431 (bfd_elf64_bfd_reloc_type_lookup): Make static.
9432 (mips_elf64_rtype_to_howto): New function.
9433 (mips_elf64_object_p): Likewise.
9434 (elf64_mips_irix_compat): Likewise.
9435 * elfxx-mips.c: New file containing common code merged together from
9436 elf32-mips.c and elf64-mips.c.
9437 * elfxx-mips.h: New file containing MIPS specific prototypes from
9438 elf-bfd.h.
9439 * elfxx-target.h: Add handling for elf_backend_mips_irix_compat and
9440 elf_backend_mips_rtype_to_howto.
9441
9442 2002-04-04 Alan Modra <amodra@bigpond.net.au>
9443
9444 * srec.c (MAXCHUNK, Chunk): Revise comments.
9445 (srec_write_record): Correct buffer size.
9446 (srec_write_header): Do without intermediate buffer.
9447 (srec_write_section): Validate Chunk.
9448 (srec_write_terminator): Pass NULL instead of dummy buffer.
9449 (srec_write_symbols): Pass file and symbol names directly to
9450 bfd_bwrite so sprintf won't overflow buffer.
9451
9452 2002-04-03 Jakub Jelinek <jakub@redhat.com>
9453
9454 * elf32-sparc.c (elf32_sparc_relocate_section): Don't emit dynamic
9455 PC relative relocs against hidden symbols.
9456 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
9457
9458 2002-04-03 Alan Modra <amodra@bigpond.net.au>
9459
9460 * elf.c (_bfd_elf_make_section_from_shdr): When setting section
9461 LMAs, loop over segments until p_vaddr and p_memsz specify an
9462 extent enclosing the section.
9463
9464 2002-04-02 Nick Clifton <nickc@cambridge.redhat.com>
9465
9466 * ihex.c (ihex_write_object_contents): Do not allow records to
9467 cross a 64K boundary - wrap if necessary.
9468
9469 2002-04-01 Nathan Williams <nathanw@wasabisystems.com>
9470
9471 * elf.c (elfcore_netbsd_get_lwpid): Fix off-by-one error
9472 which caused the returned LWP ID to always be 0.
9473
9474 2002-04-01 Richard Henderson <rth@redhat.com>
9475
9476 * elf32-sparc.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
9477 (elf32_sparc_relocate_section): Use it to figure out when to
9478 initialize .got entries.
9479 * elf64-sparc.c: Similarly.
9480
9481 2002-03-28 Alan Modra <amodra@bigpond.net.au>
9482
9483 * linker.c (link_action): Ignore duplicate warning syms.
9484 (_bfd_generic_link_write_global_symbol): Follow warning symbol link.
9485 * elflink.h (elf_adjust_dynstr_offsets): Likewise.
9486 (elf_adjust_dynamic_symbol): Likewise.
9487 (elf_export_symbol): Likewise.
9488 (elf_link_find_version_dependencies): Likewise.
9489 (elf_link_assign_sym_version): Likewise.
9490 (elf_link_sec_merge_syms): Likewise.
9491 (elf_link_output_extsym): Likewise.
9492 (elf_gc_sweep_symbol): Likewise.
9493 (elf_gc_propagate_vtable_entries_used): Likewise.
9494 (elf_gc_smash_unused_vtentry_relocs): Likewise.
9495 (elf_gc_allocate_got_offsets): Likewise.
9496 (elf_collect_hash_codes): Likewise.
9497 * elflink.c (elf_link_renumber_hash_table_dynsyms): Likewise.
9498 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
9499 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
9500 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
9501 * elf32-arm.h (elf32_arm_discard_copies): Likewise.
9502 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Likewise.
9503 (elf_cris_discard_excess_dso_dynamics): Likewise.
9504 * elf32-hppa.c (clobber_millicode_symbols): Likewise.
9505 (mark_PIC_calls): Likewise.
9506 (allocate_plt_static): Likewise.
9507 (allocate_dynrelocs): Likewise.
9508 (readonly_dynrelocs): Likewise.
9509 * elf32-i386.c (allocate_dynrelocs): Likewise.
9510 (readonly_dynrelocs): Likewise.
9511 * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
9512 * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
9513 * elf32-mips.c (mips_elf_output_extsym): Likewise.
9514 (mips_elf_sort_hash_table_f): Likewise.
9515 (mips_elf_check_mips16_stubs): Likewise.
9516 * elf32-s390.c (allocate_dynrelocs): Likewise.
9517 (readonly_dynrelocs): Likewise.
9518 * elf32-sh.c (sh_elf_discard_copies): Likewise.
9519 * elf32-xstormy16.c (xstormy16_relax_plt_check): Likewise.
9520 (xstormy16_relax_plt_realloc): Likewise.
9521 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
9522 (elf64_alpha_output_extsym): Likewise.
9523 * elf64-hppa.c (elf64_hppa_mark_exported_functions): Likewise.
9524 * elf64-mips.c (mips_elf64_sort_hash_table_f): Likewise.
9525 (mips_elf64_check_mips16_stubs): Likewise.
9526 (mips_elf64_output_extsym): Likewise.
9527 * elf64-ppc.c (func_desc_adjust): Likewise.
9528 (allocate_dynrelocs): Likewise.
9529 (readonly_dynrelocs): Likewise.
9530 * elf64-s390.c (allocate_dynrelocs): Likewise.
9531 (readonly_dynrelocs): Likewise.
9532 * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
9533 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
9534 (readonly_dynrelocs): Likewise.
9535 * elfxx-ia64.c (elfNN_ia64_global_dyn_sym_thunk): Likewise.
9536 * aoutx.h (aout_link_write_other_symbol): Likewise.
9537 * cofflink.c (_bfd_coff_write_task_globals): Likewise.
9538 (_bfd_coff_write_global_sym): Likewise.
9539 * i386linux.c (linux_tally_symbols): Likewise.
9540 * m68klinux.c (linux_tally_symbols): Likewise.
9541 * sparclinux.c (linux_tally_symbols): Likewise.
9542 * pdp11.c (aout_link_write_other_symbol): Likewise.
9543 * sunos.c (sunos_scan_dynamic_symbol): Likewise.
9544 * xcofflink.c (xcoff_build_ldsyms): Likewise.
9545 (xcoff_write_global_symbol): Likewise.
9546
9547 * cofflink.c (_bfd_coff_final_link): Formatting.
9548 * cpu-mips.c (mips_compatible): Make static, prototype.
9549 * elf32-i386.c (elf_i386_check_relocs): Formatting.
9550 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
9551 * elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
9552 * elf64-mips.c (mips_elf64_sort_hash_table): Likewise.
9553 (mips_elf64_final_link): Likewise.
9554 * elflink.h (elf_link_find_version_dependencies): Remove duplicate
9555 prototype.
9556
9557 2002-03-27 Nick Clifton <nickc@cambridge.redhat.com>
9558
9559 * coff-arm.c (SWAP_IN_RELOC_OFFSET): Define.
9560 (SWAP_OUT_RELOC_OFFSET): Define.
9561
9562 2002-03-27 Gregory Steuck <greg@nest.cx>
9563
9564 * elf.c (_bfd_elf_get_symtab_upper_bound): Leave space for
9565 terminating NULL if empty symbol table.
9566 (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise.
9567
9568 2002-03-26 H.J. Lu (hjl@gnu.org)
9569
9570 * elflink.h (elf_link_input_bfd): Revert the last change since
9571 the gcc exception handling isn't fixed yet.
9572
9573 2002-03-26 H.J. Lu (hjl@gnu.org)
9574
9575 * elflink.h (elf_link_input_bfd): Complain about relocations
9576 against local symbols in discarded sections.
9577
9578 2002-03-26 Alan Modra <amodra@bigpond.net.au>
9579
9580 * elflink.h (elf_gc_mark): Don't recurse into non-ELF sections.
9581
9582 2002-03-23 Alan Modra <amodra@bigpond.net.au>
9583
9584 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
9585 section file offset for !SEC_LOAD sections.
9586
9587 2002-03-21 Richard Earnshaw <rearnsha@arm.com>
9588
9589 * elf32-arm.h (elf32_arm_final_link_relocate <case R_ARM_GOTOFF>,
9590 <case R_ARM_GOT>): Handle relocations to Thumb functions.
9591
9592 2002-03-21 Alan Modra <amodra@bigpond.net.au>
9593
9594 * coff64-rs6000.c (_bfd_xcoff64_put_symbol_name): Prototype.
9595 Whitespace changes.
9596 * archive.c: Update copyright date.
9597 * bfd-in2.h: Regenerate.
9598 * libbfd.h: Regenerate.
9599 * Makefile.am: Run "make dep-am"
9600 * Makefile.in: Regenerate.
9601 * po/SRC-POTFILES.in: Regenerate.
9602
9603 2002-03-20 Daniel Jacobowitz <drow@mvista.com>
9604
9605 * dwarf2.c (struct funcinfo): Move up.
9606 (lookup_address_in_function_table): New argument function_ptr.
9607 Set it.
9608 (lookup_address_in_line_table): New argument function. If function
9609 is non-NULL, use it to handle ``addr'' before the first line note of
9610 the function.
9611 (comp_unit_find_nearest_line): Update and swap calls to
9612 lookup_address_in_function_table and lookup_address_in_line_table.
9613 * syms.c (_bfd_stab_section_find_nearest_line): Use the first
9614 N_SLINE encountered if we see an N_FUN before any N_SLINE.
9615
9616 2002-03-20 Tom Rix <trix@redhat.com>
9617
9618 * coff-rs6000.c (_bfd_xcoff_stat_arch_elt): Renamed from
9619 _bfd_xcoff_generic_stat_arch_elt. Fix format check.
9620 * coff64-rs6000.c : Use _bfd_xcoff_stat_arch_elt.
9621
9622 2002-03-19 Tom Rix <trix@redhat.com>
9623
9624 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through all
9625 dynamic objects in archives.
9626
9627 2002-03-19 Hans-Peter Nilsson <hp@bitrange.com>
9628
9629 * elflink.h (NAME(bfd_elf,record_link_assignment)): Don't set
9630 STT_NOTYPE symbols to STT_OBJECT.
9631
9632 2002-03-18 Jan Hubicka <jh@suse.cz>
9633
9634 * cpu-i386.c (bfd_x86_64_arch): Rename to "i386:x86-64"
9635
9636 2002-03-18 Tom Rix <trix@redhat.com>
9637
9638 * aix5ppc.core.c : New file for AIX 5 64 bit core support.
9639 * bfd-in.h : Add bfd_xcoff_ar_archive_set_magic declaration.
9640 * coff-rs6000 (do_pad) : New function for archive padding.
9641 (do_copy) : New function for object file copying in archives.
9642 (do_shared_object_padding) : New function for padding shared
9643 objects to their text section alignment in archives.
9644 (bfd_xcoff_ar_achive_set_magic) : Stub.
9645 (xcoff_write_armap_big) : Use do_copy and do_pad.
9646 (xcoff_write_archive_contents_big) : Use do_shared_object_padding,
9647 do_copy and do_pad.
9648 * coff64-rs6000.c (xcoff64_write_ojbect_contents) : Use
9649 bfd_xcoff_magic_number.
9650 (xcoff64_bad_format_hook) : New function for _bfd_bad_format_hook
9651 fop.
9652 (xcoff_backend_data_r) : Use xcoff64_bad_format_hook.
9653 (bfd_xcoff_aix5_backend_data) : New Aix 5 backend data.
9654 (aix5coff64_vec) : New Aix 5 target aix5coff64-rs6000.
9655 * rs6000-core.c : Update copyright date.
9656 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Check for NULL
9657 csectpp.
9658 * coffcode.h (coff_new_section_hook) : Use new accessor macros.
9659 (coff_set_arch_mach_hook) : Add Aix 5 U64_TOCMAGIC magic #.
9660 (coff_set_flags) : Use bfd_xcoff_magic_number.
9661 * libxcoff.h (bfd_xcoff_is_xcoff64): Add U64_TOCMAGIC.
9662 * configure.in : Add powerpc-*-aix5 and rs6000-*-aix5 support.
9663 * Makefile.am : Same.
9664 * config.bfd : Same.
9665 * targets.c : Same.
9666 * configure : Regnerate.
9667 * Makefile.in : Same.
9668 * bfd-in2.h : Same.
9669
9670 2002-03-18 Nick Clifton <nickc@cambridge.redhat.com>
9671
9672 * po/fr.po: Updated version.
9673
9674 2002-03-18 Alan Modra <amodra@bigpond.net.au>
9675
9676 * libbfd.c (bfd_write_bigendian_4byte_int): Return true iff success.
9677 * libbfd.h: Regenerate.
9678 * archive.c (coff_write_armap): Pass on failures from
9679 bfd_write_bigendian_4byte_int.
9680
9681 2002-03-14 H.J. Lu <hjl@gnu.org>
9682
9683 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the BFD
9684 error to bfd_error_nonrepresentable_section for reinit_array
9685 section in DSO.
9686
9687 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
9688
9689 * coffcode.h (coff_slurp_symbol_table): When adding BSF_WEAK flag,
9690 OR it in rather than replacing previously selected flags.
9691
9692 * elfxx-target.h (TARGET_BIG_SYM): Set ar_max_namelen to 15.
9693 (TARGET_LITTLE_SYM): Set ar_max_namelen to 15.
9694
9695 2002-03-14 Alan Modra <amodra@bigpond.net.au>
9696
9697 * cpu-mips.c (mips_compatible): New. Don't check bits_per_word.
9698 (N): Use the above.
9699 * elflink.h (elf_bfd_final_link): Revert last change. Instead,
9700 ensure reloc size matches before calling elf_link_input_bfd.
9701 Add an assert to check reloc size when counting output relocs.
9702
9703 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
9704
9705 * mmo.c (mmo_get_loc): Return NULL rather than false.
9706
9707 2002-03-13 Nick Clifton <nickc@cambridge.redhat.com>
9708
9709 * po/fr.po: Updated version.
9710
9711 2002-03-13 Alan Modra <amodra@bigpond.net.au>
9712
9713 * archures.c (bfd_default_compatible): Test bits_per_word.
9714 * cpu-i386.c (i386_compatible): Remove. Replace occurrences with
9715 bfd_default_compatible.
9716 * cpu-i370.c (i370_compatible): Likewise.
9717 * cpu-sparc.c (sparc_compatible): Likewise.
9718 * cpu-h8300.c (compatible): Test in->arch == out->arch.
9719
9720 * elflink.h: Formatting fixes.
9721 (elf_link_output_extsym): Merge undefined and undef weak cases.
9722
9723 * elflink.h (elf_bfd_final_link): Only call elf_link_input_bfd
9724 when word size of input matches output word size.
9725
9726 2002-03-12 Andreas Jaeger <aj@suse.de>
9727
9728 * cpu-i386.c (i386_compatible): New. Use it instead of
9729 bfd_default_compatible.
9730
9731 2002-03-07 H.J. Lu (hjl@gnu.org)
9732
9733 * coff-sh.c (shcoff_reloc_map): Use bfd_reloc_code_real_type
9734 as the type for bfd_reloc_val.
9735
9736 2002-03-05 John David Anglin <dave@hiauly1.hia.nrc.ca>
9737
9738 * elf-hppa.h (elf_hppa_is_dynamic_loader_symbol): New function.
9739 (elf_hppa_relocate_section): Ignore undefined dynamic loader symbols.
9740 (elf_hppa_final_link_relocate): Correct relocations for indirect
9741 references to local data through the DLT. Fix .opd creation for
9742 local symbols using R_PARISC_LTOFF_FPTR32 and R_PARISC_FPTR64
9743 relocations. Use e_lsel selector for R_PARISC_DLTIND21L,
9744 R_PARISC_LTOFF_FPTR21L and R_PARISC_LTOFF_TP21L as per
9745 "Processor-Specific ELF for PA_RISC, Version 1.43" document.
9746 Similarly, use e_rsel for DLT and LTOFF 'R' relocations.
9747 * elf32-hppa.c (final_link_relocate): Revise relocation selectors
9748 as per "Processor-Specific ELF for PA_RISC, Version 1.43" document.
9749
9750 2002-03-05 Jakub Jelinek <jakub@redhat.com>
9751
9752 * merge.c (_bfd_merge_sections): Don't segfault if there
9753 is nothing to merge due to GC.
9754
9755 2002-03-05 Alan Modra <amodra@bigpond.net.au>
9756
9757 * elf32-hppa.c (clobber_millicode_symbols): Remove hack to keep
9758 symbols that have been forced local.
9759
9760 * elflink.h (elf_bfd_final_link): Call elf_link_output_extsym
9761 to output forced local syms for non-shared link.
9762 (elf_link_output_extsym): Tweak condition for calling backend
9763 adjust_dynamic_symbol so that previous behaviour is kept.
9764 Whitespace changes throughout file.
9765
9766 2002-03-04 H.J. Lu <hjl@gnu.org>
9767
9768 * elf.c (bfd_section_from_shdr): Handle special sections,
9769 .init_array, .fini_array and .preinit_array.
9770 (elf_fake_sections): Likewise.
9771
9772 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Create the
9773 DT entry only if the section is in output for .init_array,
9774 .fini_array and .preinit_array. Complain about .preinit_array
9775 section in DSO.
9776 (elf_bfd_final_link): Warn zero size for .init_array,
9777 .fini_array and .preinit_array sections.
9778
9779 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Remove
9780 SHT_INIT_ARRAY, SHT_FINI_ARRAY and SHT_PREINIT_ARRAY.
9781 (elfNN_ia64_fake_sections): Remove .init_array, .fini_array and
9782 .preinit_array.
9783
9784 2002-03-04 Alan Modra <amodra@bigpond.net.au>
9785
9786 * configure.in (WIN32LIBADD): Don't eval PICFLAG assignment.
9787 * configure: Regenerate.
9788
9789 2002-03-02 Tom Rix <trix@redhat.com>
9790
9791 * coff64-rs6000.c (xcoff64_howto_table): Replace howto types with
9792 symbolic equiv.
9793 * coff-rs6000.c (xcoff_howto_table): Same.
9794
9795 2002-03-01 David Mosberger <davidm@hpl.hp.com>
9796
9797 * elflink.h (size_dynamic_sections): If section named
9798 ".preinit_array" exists, create DT_PREINIT_ARRAY and
9799 DT_PREINIT_ARRAYSZ entries in dynamic table. Analogously for
9800 ".init_array" and ".fini_array".
9801 (elf_bfd_final_link): Handle DT_PREINIT_ARRAYSZ, DT_INIT_ARRAYSZ,
9802 DT_FINI_ARRAYSZ, DT_PREINIT_ARRAY, DT_INIT_ARRAY, and
9803 DT_FINI_ARRAY.
9804
9805 2002-02-26 Andrew Macleod <amacleod@cygnus.com>
9806
9807 * elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local
9808 dynsyms.
9809
9810 2002-02-25 Alan Modra <amodra@bigpond.net.au>
9811
9812 * elf64-hppa.h: Update copyright date.
9813
9814 * elf64-ppc.c (ppc64_elf_check_relocs): Warning fix.
9815 (ppc64_elf_relocate_section): Don't generate power4 style branch
9816 hints for *_BRTAKEN and *_BRNTAKEN relocs.
9817
9818 2002-02-22 Jakub Jelinek <jakub@redhat.com>
9819
9820 * elf64-sh64.c (sh_elf64_relocate_section): Fix a typo from my
9821 last patch.
9822 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
9823
9824 2002-02-21 Andreas Jaeger <aj@suse.de>
9825
9826 * elf64-x86-64.c: Major rework that introduces all recent changes
9827 to the x86-64 backend. Get a closer match to elf32-i386.
9828 (struct elf64_x86_64_dyn_relocs): Rename from
9829 elf64_x86_64_pcrel_relocs_copied, add additional fields. Change
9830 all users.
9831 (struct elf64_x86_64_link_hash_table): Add short cuts to some
9832 sections.
9833 (link_hash_newfunc): Rename from elf64_x86_64_link_hash_newfunc,
9834 remove casts, initialize new hash members.
9835 (create_got_section): New.
9836 (elf64_x86_64_create_dynamic_sections): New.
9837 (elf64_x86_64_copy_indirect_symbol): New.
9838 (elf64_x86_64_check_relocs): Don't allocate space for dynamic
9839 relocs, .got or .relgot here but do it in allocate_dynrelocs.
9840 Reference count possible .plt and .got entries. Don't test input
9841 section SEC_READONLY here to try to avoid copy relocs, and keep
9842 dyn_relocs regardless of ELF_LINK_NON_GOT_REF. Don't set
9843 DF_TEXTREL here. Delay setting of variables until needed. Cache
9844 pointer to "sreloc" section in elf_section_data. Tweak condition
9845 under which .got created. Report files with bad relocation
9846 section names.
9847 (elf64_x86_64_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
9848 Reference count possible .plt entries. Don't deallocate .got and
9849 .relgot space here.
9850 (elf64_x86_64_adjust_dynamic_symbol): Handle nocopyreloc. Don't
9851 do copy reloc processing for weakdefs. Remove redundant casts and
9852 aborts. Delay setting of vars until needed. Move creation of
9853 dynamic symbols and allocation of .plt and .rela.plt to
9854 allocate_dynrelocs. Replace BFD_ASSERT with abort.
9855 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
9856 (allocate_dynrelocs): New.
9857 (readonly_dynrelocs): New.
9858 (elf64_x86_64_size_dynamic_sections): Call readonly_dynrelocs.
9859 Allocate space for dyn relocs. Replace BFD_ASSERT with abort.
9860 Zero out the dynamic allocated content space.
9861 (elf64_x86_64_discard_copies): Removed.
9862 (elf64_x86_64_relocate_section): Make use of dynamic section
9863 short-cuts. Localise vars, and delay setting. Better error
9864 reporting, replace BFD_ASSERT with abort. Check
9865 ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined in the
9866 regular object file and tread the weak definition as the normal
9867 one. Don't discard relocs for undefweak or undefined symbols and
9868 check !DEF_REGULAR as well as DEF_DYNAMIC in test for avoided copy
9869 relocs.
9870 (elf64_x86_64_finish_dynamic_symbol): Don't copy relocs for
9871 symbols that have been forced local. Use same test to decide if
9872 we can use a relative reloc for got as relocate_section. Expand
9873 SHN_UNDEF comment. Move expressions out of function calls.
9874 Replace BFD_ASSERT with abort.
9875 (bfd_elf64_bfd_final_link): Removed.
9876 (elf_backend_copy_indirect_symbol): Define.
9877
9878 2002-02-20 Tom Rix <trix@redhat.com>
9879
9880 * coff-rs6000.c (xcoff_howto_table): Add 16 bit R_BA.
9881 (_bfd_xcoff_reloc_type_lookup): Use it.
9882 * coff64-rs6000.c (xcoff64_howto_table): Same.
9883 (xcoff64_reloc_type_lookup): Same.
9884
9885 2002-02-20 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
9886
9887 * osf-core.c (osf_core_vec): OSF/1 (Digital Unix) core files are
9888 little endian.
9889
9890 2002-02-19 Martin Schwidefsky <schwidefsky@de.ibm.com>
9891
9892 * archures.c (bfd_mach_s390_esa): Rename to bfd_mach_s390_31.
9893 (bfd_mach_s390_esame): Rename to bfd_mach_s390_64.
9894 * bfd-in2.h: Regenerate.
9895 * cpu-s390.c (arch_info_struct): Use renamed architecture defines.
9896 Replace architecture name "s390" with "s390:31-bit" and "s390:esame"
9897 with "s390:64-bit".
9898 * elf32-s390.c (elf_howto_table): Add 32 bit pc relative relocations.
9899 (elf_s390_reloc_type_lookup): Likewise.
9900 (elf_s390_check_relocs): Likewise.
9901 (elf_s390_gc_sweep_hook): Likewise.
9902 (elf_s390_relocate_section): Likewise.
9903 (elf_s390_object_p): Use renamed architecture define.
9904 * elf64-s390.c (elf_s390_object_p): Use renamed architecture define.
9905
9906 2002-02-19 Frank Ch. Eigler <fche@redhat.com>
9907
9908 * syms.c (stt[]): Sorted. Added .init/.fini -> "t" mapping.
9909
9910 2002-02-19 Jakub Jelinek <jakub@redhat.com>
9911
9912 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Enable
9913 absptr -> pcrel optimization for shared libs.
9914 Only create minimal .eh_frame_hdr if absptr FDE encoding in shared
9915 library cannot be converted to pcrel.
9916 (_bfd_elf_eh_frame_section_offset): Return -2 if making absptr
9917 relative.
9918 * elf32-i386.c (elf_i386_relocate_section): If
9919 _bfd_elf_section_offset returned -2, skip, but make sure the
9920 relocation is installed.
9921 * elf32-arm.h (elf32_arm_final_link_relocate): Likewise.
9922 * elf32-cris.c (cris_elf_relocate_section): Likewise.
9923 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
9924 * elf32-i370.c (i370_elf_relocate_section): Likewise.
9925 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
9926 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
9927 * elf32-s390.c (elf_s390_relocate_section): Likewise.
9928 * elf32-sh.c (sh_elf_relocate_section): Likewise.
9929 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
9930 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
9931 * elf64-s390.c (elf_s390_relocate_section): Likewise.
9932 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
9933 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
9934 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
9935 * elf64-alpha.c (elf64_alpha_relocate_section): Handle
9936 _bfd_elf_section_offset returning -2 the same way as -1.
9937 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
9938 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add FIXME
9939 and BFD_ASSERT.
9940 * elf64-mips.c (mips_elf64_create_dynamic_relocation): Likewise.
9941
9942 2002-02-18 Tom Rix <trix@redhat.com>
9943
9944 * xcofflink.c (bfd_xcoff_link_gernate_rtinit): Add -brtl support.
9945 (bfd_xcoff_size_dynamic_sections): Same.
9946 * bfd-in.h (bfd_xcoff_link_generate_rtinit): Same.
9947 (bfd_xcoff_size_dynamic_sections): Same.
9948 * coff-rs6000.c (xcoff_generate_rtinit): Same.
9949 * coff-rs646000.c (xcoff64_generate_rtinit): Same.
9950 * libxcoff.h (struct xcoff_backend_data_rec): Same.
9951 * xcofflink.c (xcoff_build_ldsyms, xcoff_link_add_symbols): Clean.
9952 * bfd-in2.h: Regenerate.
9953
9954 2002-02-18 Alan Modra <amodra@bigpond.net.au>
9955
9956 * elf64-ppc.c (STFD_FR0_0R1, LFD_FR0_0R1, BLR): Define.
9957 (struct ppc_link_hash_table): Add sfpr.
9958 (ppc64_elf_link_hash_table_create): Init it.
9959 (ppc64_elf_create_dynamic_sections): Split creation of .stub and
9960 .glink out to..
9961 (create_linkage_sections): ..here. Make .sfpr too.
9962 (ppc64_elf_check_relocs): Call create_linkage_sections, and set
9963 dynobj early.
9964 (MIN_SAVE_FPR, MAX_SAVE_FPR): Define.
9965 (ppc64_elf_func_desc_adjust): Look for missing ._savef* and
9966 ._restf* functions, and create as needed.
9967 (func_desc_adjust): Only force_local for shared libs.
9968
9969 2002-02-18 David O'Brien <obrien@FreeBSD.org>
9970
9971 * configure.in: Bump version number post 2.12 branching.
9972 * configure: Regenerate.
9973
9974 2002-02-17 Hans-Peter Nilsson <hp@bitrange.com>
9975
9976 * mmo.c: Correct and improve comments.
9977 (mmo_write_chunk): Store trailing byte in bfd buffer; don't
9978 zero-pad. Use input to fill up non-empty bfd buffer.
9979 (mmo_flush_chunk): New function.
9980 (mmo_write_loc_chunk): Add parameter last_vmap, all callers
9981 changed. Don't emit location specifier if VMA is same as
9982 *LAST_VMAP after omitting leading zero contents. Call
9983 mmo_flush_chunk before emitting location specifier.
9984 (mmo_write_loc_chunk_list): Call mmo_flush_chunk when finished
9985 with mmo_write_loc_chunk calls.
9986 (mmo_internal_write_section): Call mmo_flush_chunk after
9987 mmo_write_chunk.
9988 (mmo_write_symbols_and_terminator): Move :Main to first position
9989 in symbol array. Add faked one if it does not exist if there are
9990 other symbols. Don't add it if there are no symbols at all. Move
9991 out test for value of :Main from symbol loop. Rename table
9992 fakemain to maintable and variable mainsym to fakemain.
9993
9994 2002-02-15 Richard Henderson <rth@redhat.com>
9995
9996 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: A target
9997 section with no got matches any got. Simplify error generaion.
9998
9999 2002-02-15 Alan Modra <amodra@bigpond.net.au>
10000
10001 Support arbitrary length fill patterns.
10002 * linker.c (bfd_new_link_order): Zero all fields with bfd_zalloc.
10003 (_bfd_default_link_order): Remove bfd_fill_link_order code.
10004 Call default_data_link_order.
10005 (default_fill_link_order): Delete.
10006 (default_data_link_order): New function.
10007 * elf32-mips.c (_bfd_mips_elf_final_link): Replace occurrences
10008 of bfd_fill_link_order with bfd_data_link_order.
10009 * elf64-alpha.c (elf64_alpha_final_link): Likewise.
10010 * elf64-mips.c (mips_elf64_final_link): Likewise.
10011
10012 * bfd.c (bfd_scan_vma): Clamp overflows to max bfd_vma value.
10013 Correct value returned in "end" for "0x<non-hex>".
10014
10015 2002-02-14 Nick Clifton <nickc@cambridge.redhat.com>
10016
10017 * cpu-arm.c (processors): Replace 'arch' field with 'mach'.
10018 (scan): Test against 'mach' field in info structure.
10019
10020 2002-02-14 Alan Modra <amodra@bigpond.net.au>
10021
10022 * elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD.
10023
10024 2002-02-14 Matt Fredette <fredette@netbsd.org>
10025
10026 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize
10027 EF_M68000.
10028
10029 2002-02-13 Nick Clifton <nickc@cambridge.redhat.com>
10030
10031 * elf.c (_bfd_elf_make_section_from_shdr): Do not insist on
10032 non-zero physical addresses when adjusting the LMAs of new
10033 sections.
10034
10035 2002-02-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
10036
10037 * elf-hppa.h (elf_hppa_reloc_final_type): New function stripped
10038 from _bfd_elf_hppa_gen_reloc_type.
10039 (_bfd_elf_hppa_gen_reloc_type): Remove duplicate prototype.
10040 * elf32-hppa.h (elf32_hppa_reloc_final_type): Add protptype.
10041 * elf32-hppa.c: Include elf32-hppa.h before elf-hppa.h.
10042 * elf64-hppa.h (elf64_hppa_reloc_final_type): Add protptype.
10043
10044 2002-02-12 Alexandre Oliva <aoliva@redhat.com>
10045
10046 * elf-m10300.c (mn10300_elf_relax_section): Skip section before
10047 loading its contents if there's nothing to do in it.
10048
10049 2002-02-12 Alan Modra <amodra@bigpond.net.au>
10050
10051 * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for crossing
10052 64k boundary.
10053
10054 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Add dynamic
10055 DT_PPC64_OPD and DT_PPC64_OPDSZ tags.
10056 (ppc64_elf_finish_dynamic_sections): Set values for them.
10057
10058 2002-02-11 Michael Snyder <msnyder@redhat.com>
10059
10060 * elf-bfd.h (elfcore_write_lwpstatus): Add prototype.
10061 * elf.c (elfcore_grok_pstatus): Add prototype.
10062 (elfcore_grok_lwpstatus): Add prototype.
10063 (elfcore_write_lwpstatus): New function.
10064 (elfcore_write_pstatus): Fix typo, eliminate unnecessary memcpy.
10065
10066 2002-02-11 Alexandre Oliva <aoliva@redhat.com>
10067
10068 * elf32-sh.c: Added missing prototypes.
10069 * elf32-sh64.c: Likewise.
10070 (sh_elf_align_loads): Mark unused args as such.
10071 * elf64-sh64.c: Added missing prototypes.
10072 (struct elf_sh64_link_hash_entry): Fix typo.
10073 (sh_elf64_relocate_section): Fix info argument passed to
10074 _bfd_elf_section_offset.
10075
10076 2002-02-11 Alan Modra <amodra@bigpond.net.au>
10077
10078 * Makefile.am: "make dep-am".
10079 * Makefile.in: Regenerate.
10080 * aclocal.m4: Regenerate.
10081 * config.in: Regenerate.
10082 * configure: Regenerate.
10083
10084 2002-02-10 Daniel Jacobowitz <drow@mvista.com>
10085
10086 * coff-rs6000.c (xcoff_generate_rtinit): Silence uninitialized
10087 variable warnings.
10088 * elf32-sh.c (sh_elf_relax_section): Silence signed/unsigned
10089 comparison warning.
10090 * trad-core.c (trad_unix_core_file_p): Silence pointer/integer
10091 cast warnings for the common case.
10092
10093 2002-02-10 Hans-Peter Nilsson <hp@bitrange.com>
10094
10095 * config.bfd (sh-*-linux*, sh-*-elf* | sh-*-rtemself*): Add sh64
10096 vectors.
10097 (sh-*-netbsdelf*): New, to trump sh*-*-netbsdelf* and add sh64
10098 vectors.
10099
10100 2002-02-09 Richard Henderson <rth@redhat.com>
10101
10102 * elf64-alpha.c (elf64_alpha_howto): Add R_ALPHA_BRSGP.
10103 (elf64_alpha_reloc_map, elf64_alpha_check_relocs): Likewise.
10104 (elf64_alpha_relocate_section): Likewise.
10105 * reloc.c (BFD_RELOC_ALPHA_BRSGP): New.
10106 * bfd-in2.h, libbfd.h: Rebuild.
10107
10108 2002-02-09 Hans-Peter Nilsson <hp@bitrange.com>
10109
10110 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs): Check
10111 that base-plus-offset reloc accounting is consistent.
10112 (mmix_elf_relax_section): Keep base-plus-offset reloc accounting
10113 up to date for undefined symbols.
10114
10115 2002-02-08 Eric Christopher <echristo@redhat.com>
10116
10117 From Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
10118
10119 * elf32-mips.c (_bfd_mips_elf_fake_sections): Don't create .rela
10120 sections for the O32 ABI.
10121
10122 2002-02-08 Chris Demetriou <cgd@broadcom.com>
10123
10124 * elf32-arm.h: Fix formatting of _("...").
10125 * elf32-d10v.c: Likewise.
10126 * elf32-m68k.c: Likewise.
10127 * elf32-mips.c: Likewise.
10128
10129 2002-02-08 Ivan Guzvinec <ivang@opencores.org>
10130
10131 * coff-or32.c: Fix compile time warning messages.
10132
10133 2002-02-08 Alexandre Oliva <aoliva@redhat.com>
10134
10135 Contribute sh64-elf.
10136 2002-01-23 Alexandre Oliva <aoliva@redhat.com>
10137 * reloc.c (R_SH_GOTPLT32, R_SH_GOT_LOW16, R_SH_GOT_MEDLOW16,
10138 R_SH_GOT_MEDHI16, R_SH_GOT_HI16, R_SH_GOTPLT_LOW16,
10139 R_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_HI16,
10140 R_SH_PLT_LOW16, R_SH_PLT_MEDLOW16, R_SH_PLT_MEDHI16,
10141 R_SH_PLT_HI16, R_SH_GOTOFF_LOW16, R_SH_GOTOFF_MEDLOW16,
10142 R_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_HI16, R_SH_GOTPC_LOW16,
10143 R_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDHI16, R_SH_GOTPC_HI16,
10144 R_SH_GOT10BY4, R_SH_GOTPLT10BY4, R_SH_GOT10BY8, R_SH_GOTPLT10BY8,
10145 R_SH_COPY64, R_SH_GLOB_DAT64, R_SH_JMP_SLOT64, R_SH_RELATIVE64):
10146 New relocs.
10147 * libbfd.h, bfd-in2.h: Rebuilt.
10148 * elf32-sh.c (sh_elf_howto_table): Define new relocs.
10149 (sh_reloc_map): Map them.
10150 (PLT_ENTRY_SIZE, elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
10151 elf_sh_plt_entry_be, elf_sh_plt_entry_le, elf_sh_pic_plt_entry_be,
10152 elf_sh_pic_plt_entry_le, elf_sh_plt0_entry, elf_sh_plt_entry,
10153 elf_sh_pic_plt_entry, elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
10154 elf_sh_plt0_gotplt_offset, elf_sh_plt_temp_offset,
10155 elf_sh_plt_symbol_offset, elf_sh_plt_reloc_offset,
10156 movi_shori_putval) [INCLUDE_SHMEDIA]: New.
10157 (elf_sh_link_hash_entry) [INCLUDE_SHMEDIA]: Add
10158 datalabel_got_offset.
10159 (sh_elf_link_hash_newfunc): Initialize it.
10160 (sh_elf_relocate_section): Augment the scope of
10161 seen_stt_datalabel. Introduce GOTPLT support. Extend GOTPC, PLT,
10162 GOT and GOTOFF handling to new SHmedia relocation types. Support
10163 GOT_BIAS.
10164 (sh_elf_check_relocs): Likewise.
10165 (sh_elf_finish_dynamic_symbol) [TARGET_SHMEDIA]: Set up values in
10166 PLT entries using movi_shori_putval. Support GOT_BIAS.
10167 (sh_elf_finish_dynamic_sections): Likewise.
10168 * elf32-sh64.c (shmedia_prepare_reloc): Do not add addend to
10169 relocation, it's now done by the caller.
10170 (GOT_BIAS): New.
10171 * elf64-sh64.c (GOT_BIAS, PLT_ENTRY_SIZE, elf_sh64_sizeof_plt,
10172 elf_sh64_plt_plt0_offset, elf_sh64_plt0_gotplt_offset,
10173 elf_sh64_plt_temp_offset, elf_sh64_plt_symbol_offset,
10174 elf_sh64_plt_reloc_offset, ELF_DYNAMIC_INTERPRETER,
10175 elf_sh64_pcrel_relocs_copied, elf_sh64_link_hash_entry,
10176 elf_sh64_link_hash_table, sh64_elf64_link_hash_traverse,
10177 sh64_elf64_hash_table): New.
10178 (sh_elf64_howto_table): Introduce new relocs.
10179 (sh_elf64_info_to_howto): Accept new PIC relocs.
10180 (sh_elf64_relocate_section): Augment the scope of
10181 seen_stt_datalabel. Support new PIC relocs.
10182 (sh_elf64_check_relocs): Support new PIC relocs.
10183 (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le,
10184 elf_sh64_plt_entry_be, elf_sh64_plt_entry_le,
10185 elf_sh64_pic_plt_entry_be, elf_sh64_pic_plt_entry_le,
10186 elf_sh64_plt0_entry, elf_sh64_plt_entry, elf_sh64_pic_plt_entry,
10187 sh64_elf64_link_hash_newfunc, sh64_elf64_link_hash_table_create,
10188 movi_shori_putval, movi_3shori_putval,
10189 sh64_elf64_create_dynamic_sections,
10190 sh64_elf64_adjust_dynamic_symbol, sh64_elf64_discard_copies,
10191 sh64_elf64_size_dynamic_sections,
10192 sh64_elf64_finish_dynamic_symbol,
10193 sh64_elf64_finish_dynamic_sections): New.
10194 (elf_backend_create_dynamic-sections,
10195 bfd_elf64_bfd_link_hash_table_create,
10196 elf_backend_adjust_dynamic_symbol,
10197 elf_backend_size_dynamic_sections,
10198 elf_backend_finish_dynamic_symbol,
10199 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
10200 elf_backend_plt_readonly, elf_backend_want_plt_sym,
10201 elf_backend_got_header_size, elf_backend_plt_header_size):
10202 Define.
10203 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
10204 * elf32-sh.c: Renumbered and renamed some SH5 relocations to
10205 match official numbers and names; moved unmaching ones to the
10206 range 0xf2-0xff.
10207 * elf32-sh64.c, elf64-sh64.c: Likewise.
10208 2001-03-12 DJ Delorie <dj@redhat.com>
10209 * elf32-sh.c (sh_elf_relax_section): Don't relax SHmedia
10210 sections.
10211 2001-03-12 DJ Delorie <dj@redhat.com>
10212 * elf32-sh64.c (shmedia_prepare_reloc): Validate relocs that must
10213 be aligned.
10214 * elf64-sh64.c (sh_elf64_relocate_section): Ditto.
10215 2001-01-14 Hans-Peter Nilsson <hpn@cygnus.com>
10216 * elf32-sh64.c (bfd_elf32_bfd_copy_private_section_data): Define.
10217 (sh64_elf_fake_sections): Set type to SHT_SH5_CR_SORTED for a
10218 .cranges section with SEC_SORT_ENTRIES set.
10219 (sh64_backend_section_from_shdr): Set SEC_SORT_ENTRIES on an
10220 incoming sorted .cranges section.
10221 (sh64_bfd_elf_copy_private_section_data): New.
10222 (sh64_elf_final_write_processing): Only sort .cranges and modify
10223 start address if called by linker.
10224 2001-01-08 Ben Elliston <bje@redhat.com>
10225 * elf32-sh64.c (sh64_elf_final_write_processing): Activate
10226 Hans-Peter Nilsson's set bit 0 patch from 2001-01-06.
10227 * elf64-sh64.c (sh64_elf64_final_write_processing): Ditto.
10228 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
10229 * elf64-sh64.c (sh_elf64_howto_table): No open brace at start of
10230 line. Add comments before all entries.
10231 <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct and clarify describing
10232 comment.
10233 (sh_elf64_reloc): Correct head comment.
10234 (sh_elf64_relocate_section): Correct spacing.
10235 <relocating for a local symbol>: Do not honour STO_SH5_ISA32;
10236 instead call reloc_dangerous callback.
10237 <case R_SH_SHMEDIA_CODE>: New case.
10238 (sh_elf64_gc_mark_hook): Correct spacing.
10239 (sh_elf64_check_relocs): Ditto.
10240 * elf32-sh64.c (shmedia_prepare_reloc) <case R_SH_SHMEDIA_CODE>:
10241 New case.
10242 * elf32-sh.c: Correct #endif comments for #ifndef-wrapped
10243 functions.
10244 (sh_elf_howto_table) <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct,
10245 clarify describing comment. Add comments before all entries.
10246 (sh_elf_relocate_section) <relocating for a local symbol>: Do not
10247 honour STO_SH5_ISA32; instead call reloc_dangerous callback.
10248 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
10249 Sort .cranges section in final link. Prepare to set bit 0 on
10250 entry address.
10251 * elf32-sh64.c (struct sh64_find_section_vma_data): New.
10252 (sh64_elf_link_output_symbol_hook): Fix typo in prototype.
10253 (sh64_elf_set_mach_from_flags): Set SEC_DEBUGGING on incoming
10254 .cranges section.
10255 (sh64_backend_section_from_shdr): New, to recognize
10256 SHT_SH5_CR_SORTED on incoming .cranges section.
10257 (elf_backend_section_from_shdr): Define.
10258 (sh64_elf_final_write_processing): Sort outgoing .cranges
10259 section. (New, temporarily disabled:) Set bit 0 on entry address
10260 according to ISA type.
10261 (sh64_find_section_for_address): New.
10262 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb,
10263 crange_bsearch_cmpl): Move here from opcodes/sh64-dis.c.
10264 (sh64_address_in_cranges): Move here from opcodes/sh64-dis.c. Use
10265 bfd_malloc, not xmalloc.
10266 (sh64_get_contents_type): Move here from opcodes/sh64-dis.c. Make
10267 global.
10268 * elf32-sh64.c (sh64_elf64_final_write_processing): New, (but
10269 temporarily disabled) setting bit 0 on entry address.
10270 (elf_backend_final_write_processing): Define.
10271 2001-01-05 Hans-Peter Nilsson <hpn@cygnus.com>
10272 * elf32-sh.c (sh_elf_howto_table) <R_SH_PT_16>: Adjust fields to
10273 be a proper relocation for PTA and PTB rather than a marker.
10274 <R_SH_IMMU5, R_SH_IMMS6, R_SH_IMMU6, R_SH_IMMS10, R_SH_IMMS10BY2,
10275 R_SH_IMMS10BY4, R_SH_IMMS10BY8, R_SH_IMMS16, R_SH_IMMU16,
10276 R_SH_IMM_LOW16, R_SH_IMM_LOW16_PCREL, R_SH_IMM_MEDLOW16,
10277 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16_PCREL,
10278 R_SH_IMM_HI16, R_SH_IMM_HI16_PCREL, R_SH_64, R_SH_64_PCREL>:
10279 Zero src_mask.
10280 * elf64-sh64.c: Ditto.
10281 (sh_elf64_relocate_section) <case R_SH_PT_16>: New case.
10282 * elf32-sh64.c: Include opcodes/sh64-opc.h
10283 (shmedia_prepare_reloc): Take a bfd_link_info pointer as first
10284 argument. Drop const qualifiers from "bfd *" and "bfd_byte *"
10285 parameters. No unused parameters. Caller changed.
10286 <case R_SH_PT_16>: New case.
10287 * Makefile.am (elf32-sh64.lo): Add dependency on sh64-opc.h.
10288 * Makefile.in: Regenerate.
10289 2000-12-30 Hans-Peter Nilsson <hpn@cygnus.com>
10290 * elf64-sh64.c (sh64_elf64_fake_sections): Set SHF_SH5_ISA32 for
10291 all code sections.
10292 (sh_elf64_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
10293 (sh64_elf_merge_private_data): Ditto.
10294 * elf32-sh64.c (sh64_elf_fake_sections): Use sh64_elf_section_data
10295 to access stored section flags.
10296 (sh64_elf_final_write_processing): Return immediately unless
10297 called by linker. Use sh64_elf_section_data (cranges) to get size
10298 of linker-generated cranges entries.
10299 (sh64_elf_copy_private_data): Add missing "return true".
10300 (sh64_elf_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
10301 (sh_elf64_merge_private_data): Ditto.
10302 2000-12-19 Hans-Peter Nilsson <hpn@cygnus.com>
10303 * elf64-sh64.c (sh64_elf64_fake_sections): New, copy of
10304 elf64-sh64.c:sh64_elf_fake_sections.
10305 (elf_backend_fake_sections): Define as sh64_elf64_fake_sections.
10306 2000-12-18 Hans-Peter Nilsson <hpn@cygnus.com>
10307 * elf32-sh64.c (sh64_elf_copy_private_data_internal): Delete.
10308 (sh64_elf_final_write_processing): New.
10309 (elf_backend_final_write_processing): Define.
10310 (sh64_elf_fake_sections): Get header flags from tdata field.
10311 (sh64_elf_copy_private_data): Do not call
10312 sh64_elf_copy_private_data_internal, just copy e_flags field.
10313 (sh64_elf_merge_private_data): Do not call
10314 sh64_elf_copy_private_data_internal.
10315 2000-12-12 Hans-Peter Nilsson <hpn@cygnus.com>
10316 Remove EF_SH64_ABI64, let ELF size make difference.
10317 Remove SH64-specific BFD section flag.
10318 * elf32-sh64.c (sh64_elf_fake_sections): Recognize section as
10319 containing SHmedia through elf_section_data (asect)->tdata
10320 non-zero, not using a BFD section flag.
10321 (sh64_elf_set_mach_from_flags): Don't recognize EF_SH64_ABI64.
10322 (sh64_elf_merge_private_data): Similar.
10323 (elf_backend_section_flags): Don't define.
10324 (sh64_elf_backend_section_flags): Delete.
10325 * elf64-sh64.c (sh_elf64_set_mach_from_flags): Recognize EF_SH64,
10326 not EF_SH64_ABI64.
10327 (sh_elf64_merge_private_data): Similar.
10328 * section.c (Section flags definitions): Don't define
10329 SEC_SH_ISA_SHMEDIA.
10330 (bfd-in2.h): Regenerate.
10331 2000-12-09 Hans-Peter Nilsson <hpn@cygnus.com>
10332 Make DataLabel references work with partial linking.
10333 * elf32-sh64.c: Fix formatting.
10334 (sh64_elf_link_output_symbol_hook): New.
10335 (elf_backend_link_output_symbol_hook): Define to
10336 sh64_elf_link_output_symbol_hook.
10337 (sh64_elf_add_symbol_hook): Make DataLabel symbol just global
10338 undefined if partial linking. Adjust sanity check.
10339 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): New.
10340 (elf_backend_link_output_symbol_hook): Define to
10341 sh64_elf64_link_output_symbol_hook.
10342 (sh64_elf64_add_symbol_hook): Make DataLabel symbol just global
10343 undefined if partial linking. Adjust sanity check.
10344 2000-12-07 Hans-Peter Nilsson <hpn@cygnus.com>
10345 Implement semantics for inter-file DataLabel references.
10346 * elf64-sh64.c (DATALABEL_SUFFIX): Define.
10347 (sh64_elf64_add_symbol_hook): New.
10348 (sh_elf64_relocate_section): If passing an indirect symbol with
10349 st_type STT_DATALABEL on the way to a symbol with st_other
10350 STO_SH5_ISA32, do not bitor 1 to the relocation.
10351 (elf_backend_add_symbol_hook): Define to
10352 sh64_elf64_add_symbol_hook.
10353 * elf64-sh32.c: Tweak comments.
10354 (DATALABEL_SUFFIX): Define.
10355 (sh64_elf_add_symbol_hook): New.
10356 (elf_backend_add_symbol_hook): Define to sh64_elf_add_symbol_hook.
10357 * elf32-sh.c (sh_elf_relocate_section): If passing an indirect
10358 symbol with st_type STT_DATALABEL on the way to a symbol with
10359 st_other STO_SH5_ISA32, do not bitor 1 to the relocation.
10360 2000-12-05 Hans-Peter Nilsson <hpn@cygnus.com>
10361 Pass through STT_DATALABEL.
10362 * elf32-sh64.c (sh64_elf_get_symbol_type): New.
10363 (elf_backend_get_symbol_type): Define.
10364 * elf64-sh64.c (sh64_elf64_get_symbol_type): New.
10365 (elf_backend_get_symbol_type): Define.
10366 2000-11-30 Hans-Peter Nilsson <hpn@cygnus.com>
10367 * elf32-sh64.c: Tweak comments.
10368 (sh64_elf_copy_private_data_internal): Add prototype.
10369 (bfd_elf32_bfd_set_private_flags): Define.
10370 (sh64_elf_copy_private_data_internal): Compare machine name, not
10371 textual BFD target name, to check whether to copy section flag
10372 SHF_SH5_ISA32.
10373 (sh64_elf_merge_private_data): Validize bfd_get_arch_size.
10374 Tweak section-contents-type-mismatch message.
10375 (shmedia_prepare_reloc): Add ATTRIBUTE_UNUSED markers.
10376 Validize reloc-types.
10377 * elf64-sh64.c: New file.
10378 * targets.c (bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec): Declare.
10379 * Makefile.am (BFD64_BACKENDS): Add elf64-sh64.lo.
10380 (BFD64_BACKENDS_CFILES): Add elf64-sh64.c.
10381 Regenerate dependencies.
10382 * Makefile.in: Regenerate.
10383 * config.bfd (sh64-*-elf*): Add bfd_elf64_sh64_vec and
10384 bfd_elf64_sh64l_vec.
10385 * configure.in: Handle bfd_elf64_sh64_vec and
10386 bfd_elf64_sh64l_vec.
10387 * configure: Regenerate.
10388 * po/POTFILES.in: Regenerate.
10389 * po/bfd.pot: Regenerate.
10390 2000-11-29 Hans-Peter Nilsson <hpn@cygnus.com>
10391 * elf32-sh64.c (sh64_elf_set_mach_from_flags): Do not recognize
10392 anything else but EF_SH64 and EF_SH64_ABI64.
10393 (sh64_elf_merge_private_data): Emit error for anything else but
10394 EF_SH64 and EF_SH64_ABI64.
10395 * config.bfd: Remove bfd_elf32_shblin_vec and bfd_elf32_shlin_vec
10396 from targ_selvecs.
10397 * configure.in: Add cofflink.lo to bfd_elf32_sh64_vec and
10398 bfd_elf32_sh64l_vec as a temporary measure.
10399 * configure: Regenerate.
10400 2000-11-27 Hans-Peter Nilsson <hpn@cygnus.com>
10401 * cpu-sh.c (arch_info_struct): Include sh5 item
10402 unconditionalized.
10403 * config.bfd (sh64-*-elf*): Do not set targ_cflags.
10404 Add targ_selvecs bfd_elf32_sh_vec, bfd_elf32_shl_vec,
10405 bfd_elf32_shblin_vec and bfd_elf32_shlin_vec.
10406 * elf32-sh64.c: Tweak comments.
10407 (sh64_elf_set_mach_from_flags): Recognize all machine flags that
10408 are proper subsets of SH64 as bfd_mach_sh5. Add EF_SH64_ABI64.
10409 (sh64_elf_copy_private_data_internal): Wrap long line.
10410 (sh64_elf_merge_private_data): Rewrite to allow objects from
10411 SH64 subsets to be linked together.
10412 (INCLUDE_SHMEDIA): Define.
10413 * elf32-sh.c (sh_elf_relocate_section) <local symbol>:
10414 Parenthesize plus-expression inside or-expression.
10415 <global symbol>: Ditto.
10416 (sh_elf_set_mach_from_flags): Remove code refusing
10417 deleted EF_SH64_32BIT_ABI flag.
10418 2000-11-26 Hans-Peter Nilsson <hpn@cygnus.com>
10419 * elf32-sh.c (sh_elf_howto_table) <R_SH_IMM_LOW16_PCREL,
10420 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16_PCREL,
10421 R_SH_IMM_HI16_PCREL, R_SH_64_PCREL>: Set pcrel_offset to true.
10422 (sh_elf_relocate_section) <local symbol>: Or 1 in
10423 calculation of relocation if sym->st_other & STO_SH5_ISA32.
10424 <global symbol>: Ditto if h->other & STO_SH5_ISA32.
10425 * elf32-sh64.c (shmedia_prepare_reloc): Add rel->r_addend to
10426 relocation.
10427 2000-11-24 Hans-Peter Nilsson <hpn@cygnus.com>
10428 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64.lo.
10429 (BFD32_BACKENDS_CFILES): Add elf32-sh64.c.
10430 Regenerate dependencies.
10431 * Makefile.in: Regenerate.
10432 * archures.c: Add bfd_mach_sh5.
10433 * config.bfd: Map targ_cpu sh* to bfd_sh_arch.
10434 Handle sh64-*-elf*. Set targ_cflags to -DINCLUDE_SHMEDIA.
10435 * configure.in: Handle bfd_elf32_sh64_vec and bfd_elf32_sh64l_vec.
10436 * configure: Regenerate.
10437 * reloc.c (BFD_RELOC_SH_SHMEDIA_CODE, BFD_RELOC_SH_IMMU5,
10438 BFD_RELOC_SH_IMMS6, BFD_RELOC_SH_IMMS6BY32, BFD_RELOC_SH_IMMU6,
10439 BFD_RELOC_SH_IMMS10, BFD_RELOC_SH_IMMS10BY2,
10440 BFD_RELOC_SH_IMMS10BY4, BFD_RELOC_SH_IMMS10BY8,
10441 BFD_RELOC_SH_IMMS16, BFD_RELOC_SH_IMMU16, BFD_RELOC_SH_IMM_LOW16,
10442 BFD_RELOC_SH_IMM_LOW16_PCREL, BFD_RELOC_SH_IMM_MEDLOW16,
10443 BFD_RELOC_SH_IMM_MEDLOW16_PCREL, BFD_RELOC_SH_IMM_MEDHI16,
10444 BFD_RELOC_SH_IMM_MEDHI16_PCREL, BFD_RELOC_SH_IMM_HI16,
10445 BFD_RELOC_SH_IMM_HI16_PCREL, BFD_RELOC_SH_PT_16): New relocations.
10446 * cpu-sh.c [INCLUDE_SHMEDIA] (arch_info_struct): Define and link
10447 in item for SH5.
10448 * elf32-sh.c [INCLUDE_SHMEDIA] (sh_elf_howto_table): Add howto items
10449 for SHmedia relocs.
10450 [INCLUDE_SHMEDIA] (sh_rel): Add mappings for SHmedia relocs.
10451 [INCLUDE_SHMEDIA] (sh_elf_relocate_section) [default]: Call
10452 shmedia_prepare_reloc, goto final_link_relocate if it returns
10453 non-zero, else fail as before.
10454 (sh_elf_set_mach_from_flags): Provide function only if not defined
10455 as macro. Do not recognize objects with EF_SH64_32BIT_ABI set.
10456 (sh_elf_set_private_flags): Provide function only if not defined
10457 as a macro.
10458 (sh_elf_copy_private_data): Similar.
10459 (sh_elf_merge_private_data): Similar.
10460 * section.c (SEC_SH_ISA_SHMEDIA): New.
10461 * targets.c (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec): Declare.
10462 * elf32-sh64.c: New file.
10463 * libbfd.h: Regenerate.
10464 * bfd-in2.h: Regenerate.
10465 * po/POTFILES.in: Regenerate.
10466 * po/bfd.pot: Regenerate.
10467 * bfd-in2.h: Regenerate.
10468 * libbfd.h: Regenerate.
10469
10470 2002-02-07 Daniel Jacobowitz <drow@mvista.com>
10471
10472 * bfd-in.h: Update <stdbool.h> check to only see if <stdbool.h> has
10473 been included, not drag it in.
10474 * bfd-in2.h: Regenerate.
10475
10476 2002-02-06 H.J. Lu (hjl@gnu.org)
10477
10478 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Update
10479 the mach and ISA fields if necessary.
10480
10481 2002-02-06 Nick Clifton <nickc@cambridge.redhat.com>
10482
10483 * coffcode.h (coff_set_arch_mach_hook): Select the highest known
10484 ARM architecture when an F_ARM_5 flag is detected, since we cannot
10485 be sure exactly which architecture this represents.
10486
10487 2002-02-05 Nick Clifton <nickc@redhat.com>
10488
10489 * po/tr.po: Updated translation.
10490
10491 2002-02-05 Alan Modra <amodra@bigpond.net.au>
10492
10493 From Jimi X <jimix@watson.ibm.com>
10494 * archures (bfd_mach_ppc64): Define.
10495 (bfd_powerpc_arch): Rename to bfd_powerpc_archs.
10496 (bfd_powerpc_arch): Define.
10497 * bfd-in2.h: Regenerate.
10498 * cpu-powerpc.c (arch_info_struct): Rename to bfd_powerpc_archs.
10499 (bfd_powerpc_arch): Move to tail of bfd_powerpc_archs.
10500 (bfd_powerpc_archs): Add default powerpc64 arch.
10501
10502 2002-02-05 Alan Modra <amodra@bigpond.net.au>
10503
10504 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Check for relocs
10505 against section syms in readonly sections. Don't do the global
10506 sym check if we find one.
10507 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
10508 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
10509 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
10510 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
10511 (elf_s390_grok_prstatus): Add missing prototype.
10512
10513 2002-02-04 Hans-Peter Nilsson <hp@bitrange.com>
10514
10515 * elf64-mmix.c (mmix_dump_bpo_gregs): New function.
10516 (mmix_elf_check_common_relocs) <case R_MMIX_BASE_PLUS_OFFSET>:
10517 Call bfd_get_section_by_name only once. Initialize
10518 bpodata->n_bpo_relocs_this_section.
10519 (_bfd_mmix_prepare_linker_allocated_gregs): Remove comment
10520 referring to DSOs.
10521 (bpo_reloc_request_sort_fn): Don't use difference of values as
10522 return-value.
10523
10524 2002-02-02 David O'Brien <obrien@FreeBSD>
10525
10526 * configure.in: Tweak the FreeBSD 4.x recognition more. Only treat
10527 version 4.5 and later the same as 5-CURRENT.
10528 * configure: Re-generate.
10529
10530 2002-02-02 Jason Thorpe <thorpej@wasabisystems.com>
10531
10532 * config.bfd (hppa*-*-netbsd*): New target.
10533
10534 2002-01-31 Philipp Thomas <pthomas@suse.de>
10535
10536 * coff-arm.c (coff_arm_merge_private_bfd_data): Move ERROR
10537 to front of message. Unify messages with elf32-arm.h. Use
10538 commas where neccessary.
10539 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Use all upcase
10540 ERROR in messages. Unify messages with coff-arm.c. Correct
10541 VFP/FPA error message.
10542 (elf32_arm_print_private_bfd_data): Don't mark APCS-26 and
10543 APCS-32 for translation.
10544
10545 2002-02-01 Hans-Peter Nilsson <hp@bitrange.com>
10546
10547 Perform on-demand global register allocation from
10548 R_MMIX_BASE_PLUS_OFFSET relocs.
10549 * elf64-mmix.c (struct bpo_reloc_section_info, struct
10550 bpo_reloc_request, struct bpo_greg_section_info): New.
10551 (mmix_elf_check_common_relocs, mmix_elf_gc_sweep_hook,
10552 bpo_reloc_request_sort_fn, mmix_elf_relax_section,
10553 _bfd_mmix_check_all_relocs,
10554 _bfd_mmix_prepare_linker_allocated_gregs,
10555 _bfd_mmix_finalize_linker_allocated_gregs): New functions.
10556 (elf_mmix_howto_table): Correct src_mask for most relocs.
10557 (mmix_elf_perform_relocation) <case R_MMIX_BASE_PLUS_OFFSET>: New
10558 case.
10559 (mmix_final_link_relocate) <case R_MMIX_BASE_PLUS_OFFSET>: New
10560 case. Fix typo in comment. New label do_mmix_reloc.
10561 (mmix_elf_check_relocs): Abuse bfd_link_info member base_file to
10562 store first object file with a base-plus-offset reloc. Call
10563 mmix_elf_check_common_relocs for the part common with mmo.
10564 (mmix_elf_final_link): Write out linker-allocated register
10565 contents section.
10566 (elf_backend_gc_sweep_hook): Define.
10567 (bfd_elf64_bfd_relax_section): Define.
10568
10569 * mmo.c: Don't include <ctype.h>
10570 (mmo_init): Correct init-once logic.
10571
10572 2002-02-01 Tom Rix <trix@redhat.com>
10573
10574 * config.bfd: Conditionally support <aiaff> for pre AIX 4.3.
10575
10576 2002-02-01 Alan Modra <amodra@bigpond.net.au>
10577
10578 * Makefile.am: Run "make dep-am"
10579 * Makefile.in: Regenerate.
10580
10581 2002-01-31 David O'Brien <obrien@FreeBSD>
10582
10583 * configure.in: Recognize the differences in core files from FreeBSD
10584 4.{0,1} and later versions of 4.x. This treats 4.2+ the same as
10585 5-CURRENT.
10586 * configure: Regenerate.
10587
10588 2002-01-31 Ivan Guzvinec <ivang@opencores.org>
10589
10590 * coff-or32.c: New file.
10591 * cpu-or32.c: New file.
10592 * elf32-or32.c: New file.
10593 * archures.c: Add support for or32.
10594 * targets.c: Add support for or32.
10595 * bfd-in2.h: Regenerate.
10596 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags,
10597 coff_write_object_contents): Add support for or32.
10598 * config.bfd: Add target.
10599 * configure.in: Add support for or32.
10600 * configure: Regenerate.
10601 * Makefile.am: Add support for or32.
10602 * Makefile.in: Regenerate.
10603 * po/SRC-POTFILES.in: Add or32 files.
10604 * po/bfd.pot: Regenerate.
10605
10606 2002-01-31 Nick Clifton <nickc@cambridge.redhat.com>
10607 Don Lindsay <lindsayd@cisco.com>
10608
10609 * elf32-mips.c (mips_elf_calculate_relocation): Replace 'return
10610 false' with a return of a bfd_reloc_ error code.
10611
10612 2002-01-31 Hans-Peter Nilsson <hp@axis.com>
10613
10614 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
10615 unexport unreferenced symbols when --export-dynamic. Call
10616 _bfd_elf_strtab_delref when unexporting.
10617
10618 2002-01-30 Daniel Jacobowitz <drow@mvista.com>
10619
10620 * bfd-in.h: Include <stdbool.h> if it is available.
10621 * bfd-in2.h: Regenerated.
10622
10623 2002-01-31 Alan Modra <amodra@bigpond.net.au>
10624
10625 * elf64-ppc.c (func_desc_adjust): STV_PROTECTED functions should
10626 not go via the plt.
10627
10628 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
10629
10630 * archures.c: Tidy up formatting of embedded comments.
10631 * bfd.c: Tidy up formatting of embedded comments.
10632 * bfd-in.h: Fix formatting of comments.
10633 * reloc.c: Tidy up formatting of ordinary & embedded comments.
10634 * section.c: Tidy up formatting of embedded comments.
10635 * syms.c: Tidy up formatting of embedded comments.
10636 * targets.c: Tidy up formatting of embedded comments.
10637
10638 * bfd-in2.h: Regenerate.
10639
10640 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
10641
10642 * vms-tir.c (cmd_name): New function.
10643 (tir_cmd_name): New function.
10644 (etir_sta, etir_sto, etir_opr, etir_stc): Use cmd_name().
10645 (tir_opr, tir_ctl, tir_cmd): use tir_cmd_name().
10646 Fix formatting.
10647
10648 * peXXigen.c (pe_print_idata): Rearrange message to aid in
10649 translation.
10650 (pe_print_pdata): Rearrange message to aid in translation.
10651
10652 * libbfd.c (warn_deprecated): Rearrange error message to aid in
10653 translation.
10654
10655 * ihex.c (ihex_write_object_contents): Fix spelling typo.
10656
10657 * ieee.c (ieee_slurp_external_symbols): Remove spurious space.
10658
10659 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Rearrange error
10660 message to aid in translation.
10661
10662 * elf64-mmix.c (mmix_final_link_relocate): Rearrange error message
10663 to aid in translation.
10664
10665 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix typo.
10666
10667 2002-01-30 Philipp Thomas <pthomas@suse.de>
10668
10669 * coff-arm.c, elf32-elf.h: Unify messages.
10670
10671 2002-01-30 Nick Clifton <nickc@redhat.com>
10672
10673 * po/sv.po: Updated translation.
10674
10675 2002-01-30 Philipp Thomas <pthomas@suse.de>
10676
10677 * dwarf2.c (read_abbrev): Use full section name in error message.
10678 (decode_line_info): Likewise.
10679
10680 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Don't translate debugging
10681 message.
10682
10683 2002-01-30 Alan Modra <amodra@bigpond.net.au>
10684
10685 * elf64-ppc.c (func_desc_adjust): Only provide missing function
10686 descriptor symbols for undefined function code syms. Clear
10687 ELF_LINK_NON_ELF so that they can stay weak.
10688
10689 2002-01-29 Chris Demetriou <cgd@broadcom.com>
10690 Mitch Lichtenberg <mpl@broadcom.com>
10691
10692 * bfd-in.h (bfd_mips_elf32_create_embedded_relocs): New prototype.
10693 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): New function
10694 to handle 32-bit ELF embedded reloc (ld --embedded-relocs)
10695 generation.
10696 * bfd-in2.h: Regenerate.
10697
10698 2002-01-29 Chris Demetriou <cgd@broadcom.com>
10699
10700 * elf32-mips.c: Add additional comments about HI16 relocation
10701 processing.
10702 (_bfd_mips_elf_hi16_reloc): Don't subtract address here for
10703 pc-relative relocations. (Reverts change made on 2001-10-31.)
10704 (_bfd_mips_elf_lo16_reloc): Subtract address of LO16 part here
10705 for pc-relative relocations.
10706 (mips_elf_calculate_relocation): Add a comment about a kludge
10707 in the R_MIPS_GNU_REL_HI16 handling.
10708 (_bfd_mips_elf_relocate_section): Implement that kludge;
10709 adjust pc-relative HI16 relocation for difference in HI16 and
10710 LO16 addresses, since it can't easily be done in
10711 mips_elf_calculate_relocation.
10712
10713 2002-01-29 Martin Schwidefsky <schwidefsky@de.ibm.com>
10714
10715 * elf32-i386 (elf_i386_adjust_dynamic_symbol): Do not replace PLT32
10716 relocations with PC32 relocations for undefined or weak symbols.
10717 * elf32-s390 (elf_i386_adjust_dynamic_symbol): Likewise.
10718 * elf64-s390x (elf_i386_adjust_dynamic_symbol): Likewise.
10719
10720 2002-01-28 Jason Thorpe <thorpej@wasabisystems.com>
10721
10722 * elfcore.h (elf_core_file_p): Improve comment for last change.
10723
10724 2002-01-27 Daniel Jacobowitz <drow@mvista.com>
10725
10726 * configure: Regenerated.
10727
10728 2002-01-27 Jason Thorpe <thorpej@wasabisystems.com>
10729
10730 * elfcore.h (elf_core_file_p): Set the machine architecture
10731 before processing the program headers.
10732
10733 2002-01-26 Hans-Peter Nilsson <hp@bitrange.com>
10734
10735 * configure.in <64-bit configuration>: If using gcc, check and
10736 emit error for egcs-1.1.2.
10737 * configure: Regenerate.
10738
10739 2002-01-26 Egor Duda <deo@logos-m.ru>
10740
10741 * elf.c (elfcore_grok_win32pstatus): Copy only as much information
10742 as possible to avoid stack corruption.
10743
10744 2002-01-26 Richard Henderson <rth@redhat.com>
10745
10746 * elf64-alpha.c (elf64_alpha_check_relocs): Don't set reltext
10747 for non-allocated sections.
10748
10749 2002-01-25 Mark Kettenis <kettenis@gnu.org>
10750
10751 * elf.c (elfcore_write_prstatus): Make sure we pass the address of
10752 prstat.pr_reg even if it is a struct.
10753
10754 2002-01-25 Steve Ellcey <sje@cup.hp.com>
10755
10756 * elfxx-ia64.c: Reset AIX vector function overrides for HP-UX.
10757
10758 2002-01-25 Philipp Thomas <pthomas@suse.de>
10759
10760 * coffgen.c (coff_print_symbol): Don't mark info message
10761 for translation.
10762
10763 2002-01-25 Nick Clifton <nickc@redhat.com>
10764
10765 * po/fr.po: Updated translation.
10766 * po/es.po: Updated translation.
10767
10768 2002-01-25 Philipp Thomas <pthomas@suse.de>
10769
10770 * coff-alpha.c (alpha_relocate_section): Unify warning message
10771 for GP relative relocations without GP defined.
10772 * coff-mips.c (mips_relocate_section): Likewise.
10773
10774 2002-01-25 Alan Modra <amodra@bigpond.net.au>
10775
10776 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Avoid
10777 unsigned overflow when new_offset < old_offset.
10778
10779 2002-01-24 Philipp Thomas <pthomas@suse.de>
10780
10781 * bfd.c (_bfd_abort): Fix typo.
10782
10783 2002-01-23 Richard Henderson <rth@redhat.com>
10784
10785 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't suppress
10786 plt entries for undefweak symbols.
10787
10788 2002-01-23 Steve Ellcey <sje@cup.hp.com>
10789
10790 * targets.c (bfd_elf32_ia64_hpux_big_vec): Add to DEFAULT_VECTOR.
10791 (bfd_elf64_ia64_hpux_big_vec): Ditto.
10792 (bfd_elf32_h8300_vec): Ditto.
10793
10794 2002-01-23 Alan Modra <amodra@bigpond.net.au>
10795
10796 * elf64-ppc.c: Remove stale part of ABI comment.
10797 (NO_OPD_RELOCS): Define.
10798 (ppc64_elf_check_relocs): Use it.
10799 (ppc64_elf_relocate_section): Here too.
10800 (build_one_stub): Don't point function syms at the stub. Instead,
10801 hijack plt.offset.
10802 (ppc64_elf_relocate_section): Check whether REL24 relocs should
10803 really go to the stub. Make all dynamic relocs in opd against
10804 locals.
10805 (ppc64_elf_finish_dynamic_symbol): Allow for non-standard use of
10806 plt.offset.
10807
10808 2002-01-22 Richard Henderson <rth@redhat.com>
10809
10810 * elf64-alpha.c (INSN_UNOP): Encode with RB as $sp.
10811
10812 2002-01-22 Alan Modra <amodra@bigpond.net.au>
10813
10814 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Correct sign of
10815 TOC_BASE_OFF adjustment.
10816
10817 * Makefile.am: Run "make dep-am".
10818 * Makefile.in: Regenerate.
10819 * po/SRC-POTFILES.in: Regenerate.
10820
10821 2002-01-22 John David Anglin <dave@hiauly1.hia.nrc.ca>
10822
10823 * configure.host (hppa*64*-*-hpux*, hppa*64*-*-linux*): Add new
10824 host defines.
10825
10826 2002-01-21 Hans-Peter Nilsson <hp@axis.com>
10827
10828 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GOTREL>:
10829 Check for and emit error if sgot is NULL at this point.
10830
10831 2002-01-21 Jason Thorpe <thorpej@wasabisystems.com>
10832
10833 * config.bfd (ia64*-*-netbsd*): New target.
10834
10835 2002-01-21 Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
10836
10837 * som.c (som_write_space_strings): Comment typo fix.
10838
10839 2002-01-21 Alan Modra <amodra@bigpond.net.au>
10840
10841 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_func and
10842 is_func_descriptor fields.
10843 (link_hash_newfunc): Init them.
10844 (ppc64_elf_check_relocs): Only R_PPC24_REL24 syms starting with a
10845 dot are candidates for plt entries. When processing .opd relocs,
10846 set function descriptor strings to point inside function code
10847 string, and set new ppc_link_hash_entry fields.
10848 (ppc64_elf_gc_sweep_hook): Don't sweep R_PPC64_REL24 relocs.
10849 (ppc64_elf_adjust_dynamic_symbol): Remove most code dealing with
10850 function descriptors. It's now done in..
10851 (func_desc_adjust): New.
10852 (ppc64_elf_func_desc_adjust): New.
10853 (define elf_backend_always_size_sections): Define.
10854 (ppc64_elf_hide_symbol): New.
10855 (define elf_backend_hide_symbol): Define.
10856 (allocate_dynrelocs): Remove code looking up function descriptors
10857 as that has been done earlier.
10858 (ppc64_elf_size_dynamic_sections): Use htab shortcut to elf hash
10859 table.
10860 (ppc64_elf_finish_dynamic_symbol): Likewise. Remove code looking
10861 up function descriptor.
10862 (build_one_stub): Look up the function code sym. Check for
10863 invalid plt offsets.
10864 (ppc64_elf_relocate_section): Tweak calls to undefined weak syms.
10865 Convert R_PPC64_TOC relocs to R_PPC64_RELATIVE in shared libs.
10866
10867 * elf-bfd.h (elf_backend_data <elf_backend_hide_symbol>): Add
10868 boolean param.
10869 (_bfd_elf_link_hash_hide_symbol): Likewise.
10870 * elflink.h (elf_link_add_object_symbols): Adjust call to
10871 elf_backend_hide_symbol.
10872 (elf_fix_symbol_flags): Likewise.
10873 (elf_link_assign_sym_version): Likewise. Use bfd_malloc rather
10874 than bfd_alloc.
10875 * elf.c (_bfd_elf_link_hash_hide_symbol): Add "force_local" param.
10876 Set ELF_LINK_FORCED_LOCAL and call _bfd_elf_strtab_delref.
10877 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
10878 (clobber_millicode_symbols): Adjust to suit new hide_symbol.
10879 * elf32-cris.c (elf_cris_hide_symbol): Add "force_local" param
10880 and adjust to suit.
10881 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise, and call
10882 _bfd_elf_link_hash_hide_symbol rather than duplicating code.
10883 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
10884
10885 2002-01-18 Alan Modra <amodra@bigpond.net.au>
10886
10887 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Test for a
10888 dynamic function descriptor symbol, not the associated function
10889 symbol.
10890
10891 2002-01-17 Eric Christopher <echristo@redhat.com>
10892
10893 * elf32-mips.c (mips_elf_calculate_relocation): Fix typo.
10894
10895 2002-01-17 Nick Clifton <nickc@cambridge.redhat.com>
10896
10897 * po/bfd.pot: Regenerate.
10898 * po/fr.po: Regenerate.
10899
10900 2002-01-17 Alan Modra <amodra@bigpond.net.au>
10901
10902 * elf-bfd.h (elf_backend_data <elf_backend_section_from_bfd_section>):
10903 Remove "Elf_Internal_Shdr *" param.
10904 (_bfd_mips_elf_section_from_bfd_section): Ditto.
10905 * elf32-mips.c (_bfd_mips_elf_section_from_bfd_section): Ditto.
10906 * elf32-m32r.c (_bfd_m32r_elf_section_from_bfd_section): Ditto.
10907 * elf32-v850.c (v850_elf_section_from_bfd_section): Ditto.
10908 * elf64-mmix.c (mmix_elf_section_from_bfd_section): Ditto.
10909 * elfxx-ia64.c (elfNN_hpux_backend_section_from_bfd_section): Ditto.
10910 * elf.c (_bfd_elf_section_from_bfd_section): Allow backend
10911 function to override special sections. Remove hdr arg from
10912 backend call, and don't loop.
10913
10914 2002-01-16 Eric Christopher <echristo@redhat.com>
10915
10916 * elf32-mips.c (mips_elf_calculate_relocation): Set require_jalxp
10917 on R_MIPS_26 and target is 16bit. Add R_MIPS16_GPREL to list of
10918 relocations requiring gp0 and gp.
10919
10920 2002-01-16 Richard Earnshaw <rearnsha@arm.com>
10921
10922 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle
10923 EF_ARM_VFP_FLOAT.
10924 (elf32_arm_print_private_bfd_data): Likewise.
10925
10926 2002-01-16 Nick Clifton <nickc@cambridge.redhat.com>
10927
10928 * po/tr.po: Import new version.
10929
10930 2002-01-16 Alan Modra <amodra@bigpond.net.au>
10931
10932 * elf64-ppc.c (ppc64_elf_howto_raw): Remove stale FIXMEs.
10933 (ppc64_elf_reloc_type_lookup): Use proper CTOR reloc.
10934 (ORI_R0_R0_0): Correct.
10935
10936 2002-01-16 Alan Modra <amodra@bigpond.net.au>
10937
10938 * elflink.c (_bfd_elf_create_dynamic_sections): Don't set SEC_CODE
10939 when plt_not_loaded.
10940 * elf64-ppc.c (ppc64_elf_create_dynamic_sections): No need to
10941 clear .plt SEC_CODE here. Create .stub and correct .glink flags.
10942 (PLT_INITIAL_ENTRY_SIZE): Set to 24.
10943 (ppc64_elf_glink_code): Delete.
10944 (PPC64_ELF_GLINK_SIZE): Delete.
10945 (ADDIS_R12_R2, STD_R2_40R1, LD_R11_0R12, LD_R2_0R12, MTCTR_R11,
10946 BCTR, ADDIS_R12_R12_1, LD_R2_40R1, NOP, LI_R0_0, B_DOT, LIS_R0_0,
10947 ORI_R0_R0_0): Define.
10948 (PLT_CALL_STUB_SIZE, GLINK_CALL_STUB_SIZE): Define.
10949 (struct ppc_link_hash_table): Add sstub and plt_overflow.
10950 (ppc64_elf_link_hash_table_create): Init them.
10951 (ppc64_elf_check_relocs <R_PPC64_REL24>): Refcount .plt entry.
10952 Don't copy to shared lib.
10953 (ppc64_elf_check_relocs): Call bfd_set_error on errors.
10954 (ppc64_elf_gc_sweep_hook <R_PPC64_REL24>): Sweep plt refcount.
10955 (allocate_dynrelocs <plt>): Don't change function sym here. Make
10956 room for .stub and .glink code.
10957 (ppc64_elf_size_dynamic_sections): Handle .stub. Make entry for
10958 DT_PPC64_GLINK.
10959 (ppc64_elf_final_link): Rename to ppc64_elf_set_toc. Don't call
10960 bfd_elf64_bfd_final_link.
10961 (bfd_elf64_bfd_final_link): Don't define.
10962 (ppc64_elf_size_stubs): New.
10963 (build_plt_stub): New.
10964 (build_one_stub): New.
10965 (ppc64_elf_build_stubs): New.
10966 (ppc64_elf_relocate_section <toc relocs>): Remove assert.
10967 (ppc64_elf_relocate_section): Don't copy R_PPC64_REL24 relocs.
10968 (ppc64_elf_finish_dynamic_symbol): Don't build stubs here. Set
10969 DT_PPC64_GLINK entry. Tweak DT_PLTGOT, DT_JMPREL, DT_PLTRELSZ in
10970 case output sections not separate. Adjust DT_RELASZ to not
10971 include plt relocs. Set reserved got entry. Set got and plt
10972 entry size.
10973 (elf_backend_got_header_size): Set to 8.
10974 * elf64-ppc.h: New file.
10975
10976 2002-01-16 Alan Modra <amodra@bigpond.net.au>
10977
10978 * elf32-arm.h (elf32_arm_size_dynamic_sections): When removing
10979 sections, use bfd_section_list_remove.
10980 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
10981 * elflink.h (elf_link_add_object_symbols): When removing all
10982 sections, use bfd_section_list_clear.
10983
10984 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
10985
10986 * po/sv.po: New file: Swedish translation.
10987 * configure.in (ALL_LINGUAS): Add sv.
10988 * configure: Regenerate.
10989
10990 2002-01-15 Jakub Jelinek <jakub@redhat.com>
10991
10992 * elflink.h (elf_link_input_bfd): Back out 2002-01-07 change.
10993 * elf.c (merge_sections_remove_hook): New function.
10994 (_bfd_elf_merge_sections): Pass it as 3rd argument to
10995 _bfd_merge_sections.
10996 * libbfd-in.h (_bfd_merge_sections): Add 3rd argument.
10997 * libbfd.h: Rebuilt.
10998 * merge.c (_bfd_merge_sections): Add remove_hook argument.
10999 Call remove_hook if a SEC_EXCLUDE section is encountered.
11000
11001 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
11002
11003 * elf32-xstormy16.c (xstormy16_reloc_map): Add new field 'table'.
11004 (xstormy16_reloc_map): Initialise new field with correct howto
11005 table.
11006 (xstormy16_reloc_type_lookup): Use 'table' field to locate correct
11007 howto entry.
11008
11009 2002-01-10 Michael Snyder <msnyder@redhat.com>
11010
11011 * elf.c (elfcore_write_prstatus): Use long instead of pid_t;
11012 (elfcore_write_pstatus): Use long instead of pid_t;
11013 * elf-bfd.h: Change prototypes to use long instead of pid_t;
11014
11015 2002-01-09 Jason Thorpe <thorpej@wasabisystems.com>
11016
11017 * elf.c: Update copyright years.
11018 (elfcore_grok_netbsd_note): Use NT_NETBSDCORE_PROCINFO
11019 and NT_NETBSDCORE_FIRSTMACH. Improve a comment.
11020
11021 2002-01-08 Michael Snyder <msnyder@redhat.com>
11022
11023 Add capability to write corefile note sections, for gdb.
11024 * elf.c (elfcore_write_note): New function.
11025 (elfcore_write_prpsinfo): New function.
11026 (elfcore_write_prstatus): New function.
11027 (elfcore_write_pstatus): New function.
11028 (elfcore_write_prfpreg): New function.
11029 (elfcore_write_prxfpreg): New function.
11030 * elf-bfd.h: Add prototypes for above functions.
11031
11032 2002-01-08 Alexandre Oliva <aoliva@redhat.com>
11033
11034 * elf.c (elf_fake_sections): Propagate errors from
11035 elf_backend_fake_section.
11036
11037 2002-01-07 Jason Thorpe <thorpej@wasabisystems.com>
11038
11039 * Makefile.am (BFD32_BACKENDS): Add elf32-sh-nbsd.lo.
11040 (BFD32_BACKENDS_CFILES): Add elf32-sh-nbsd.c.
11041 (elf32-sh-nbsd.lo): New rule.
11042 * Makefile.in: Regenerate.
11043 * config.bfd (sh*le-*-netbsdelf*): New target.
11044 (sh*-*-netbsdelf*): New target.
11045 * configure.in: Include netbsd-core.lo for native sh*-*-netbsd*.
11046 (bfd_elf32_shnbsd_vec): New vector.
11047 (bfd_elf32_shlnbsd_vec): New vector.
11048 * configure: Regenerate.
11049 * elf32-sh-nbsd.c: New file.
11050 * targets.c: Update copyright years.
11051 (_bfd_target_vector): Add bfd_elf32_shlnbsd_vec and
11052 bfd_elf32_shnbsd_vec.
11053
11054 2002-01-07 Aldy Hernandez <aldyh@redhat.com>
11055
11056 * coff-rs6000.c (READ20): Use bfd_scan_vma.
11057
11058 2002-01-07 Geoffrey Keating <geoffk@redhat.com>
11059
11060 * elflink.h (elf_link_input_bfd): Don't ask for the merged offset
11061 of a symbol in a section that will be deleted.
11062
11063 2002-01-07 Nick Clifton <nickc@cambridge.redhat.com>
11064
11065 * po/es.po: New file: Spanish translation.
11066 * configure.in (ALL_LINGUAS): Add es.
11067 * configure: Regenerate.
11068
11069 2002-01-06 Steve Ellcey <sje@cup.hp.com>
11070
11071 * elfxx-ia64.c (is_unwind_section_name): Add target vector as
11072 argument so we can handle HP-UX specially.
11073 (elfNN_ia64_hpux_vec): New for use in is_unwind_section_name.
11074 (elfNN_hpux_backend_section_from_bfd_section): New for support
11075 of SHN_IA_64_ANSI_COMMON.
11076 (elfNN_ia64_relax_section): Add support for SHN_IA_64_ANSI_COMMON.
11077 (is_unwind_section_name): Add special HP-UX support.
11078 (elfNN_ia64_section_from_shdr): Add support for more sections.
11079 (elfNN_ia64_fake_sections): Modify is_unwind_section_name call and
11080 add support for more sections.
11081 (elfNN_ia64_additional_program_headers): Modify
11082 is_unwind_section_name call.
11083 (elfNN_ia64_modify_segment_map): Remove assumption that there is
11084 only one unwind section in segment.
11085
11086 2002-01-06 Alan Modra <amodra@bigpond.net.au>
11087
11088 * syms.c (_bfd_generic_make_empty_symbol): New function.
11089 * libbfd-in.h (_bfd_nosymbols_make_empty_symbol): Define as
11090 _bfd_generic_make_empty_symbol.
11091 * libbfd.h: Regenerate.
11092 * bfd-in2.h: Regenerate.
11093 * hppabsd-core.c (hppabsd_core_make_empty_symbol): Delete function.
11094 (hppabsd_core_get_symtab_upper_bound): Don't define.
11095 (hppabsd_core_get_symtab): Likewise.
11096 (hppabsd_core_print_symbol): Likewise.
11097 (hppabsd_core_get_symbol_info): Likewise.
11098 (hppabsd_core_bfd_is_local_label_name): Likewise.
11099 (hppabsd_core_get_lineno): Likewise.
11100 (hppabsd_core_find_nearest_line): Likewise.
11101 (hppabsd_core_bfd_make_debug_symbol): Likewise.
11102 (hppabsd_core_read_minisymbols): Likewise.
11103 (hppabsd_core_minisymbol_to_symbol): Likewise.
11104 (hppabsd_core_vec): Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols).
11105 Formatting fixes.
11106 * hpux-core.c: Similarly.
11107 * irix-core.c: Similarly.
11108 * osf-core.c: Similarly.
11109 * sco5-core.c: Similarly.
11110 * binary.c (binary_make_empty_symbol): Remove function, define as
11111 _bfd_generic_make_empty_symbol.
11112 * ihex.c (ihex_make_empty_symbol): Likewise.
11113 * mmo.c (mmo_make_empty_symbol): Likewise.
11114 * ppcboot.c (ppcboot_make_empty_symbol): Likewise.
11115 * srec.c (srec_make_empty_symbol): Likewise.
11116 * versados.c (versados_make_empty_symbol): Likewise.
11117 * vms.c (_bfd_vms_make_empty_symbol): Remove.
11118 (vms_make_empty_symbol): Define as _bfd_generic_make_empty_symbol.
11119 * vms-gsd.c (_bfd_vms_slurp_gsd): Call bfd_make_empty_symbol
11120 rather than _bfd_vms_make_empty_symbol.
11121 * vms-misc.c (new_symbol): Likewise.
11122
11123 2002-01-05 Alan Modra <amodra@bigpond.net.au>
11124
11125 * section.c (bfd_section_init): Remove unnecessary initialisations.
11126 (bfd_section_list_clear): New function.
11127 (bfd_section_list_remove, bfd_section_list_insert): New macros.
11128 (_bfd_strip_section_from_output): Use them.
11129 * coffcode.h (coff_set_alignment_hook): Likewise.
11130 * elf32-mips.c (_bfd_mips_elf_final_link): Likewise.
11131 * elf64-mips.c (mips_elf64_final_link): Likewise.
11132 * elf64-mmix.c (mmix_elf_final_link): Likewise.
11133 * sunos.c (sunos_add_dynamic_symbols): Likewise.
11134 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
11135 * bfd-in2.h: Regenerate.
11136
11137 * netbsd-core.c (netbsd_core_file_p): Use bfd_make_section_anyway
11138 rather than doing our own section handling. Clean up after errors
11139 with bfd_release and bfd_section_list_clear. Handle unexpected
11140 flags.
11141 * aoutf1.h (sunos4_core_file_p): Likewise.
11142 * aix386-core.c (aix386_core_file_p): Likewise.
11143 * cisco-core.c (cisco_core_file_validate): Likewise.
11144 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
11145 * trad-core.c (trad_unix_core_file_p): Likewise.
11146
11147 * hppabsd-core.c (hppabsd_core_core_file_p): Clean up after errors
11148 with bfd_release and bfd_section_list_clear.
11149 * hpux-core.c (hpux_core_core_file_p): Likewise.
11150 * irix-core.c (irix_core_core_file_p): Likewise.
11151 * lynx-core.c (lynx_core_file_p): Likewise.
11152 * osf-core.c (osf_core_core_file_p): Likewise.
11153 * rs6000-core.c (rs6000coff_core_p): Likewise.
11154 * sco5-core.c (sco5_core_file_p): Likewise.
11155
11156 * elf32-mips.c (_bfd_mips_elf_lo16_reloc): Simplify, and perform
11157 sign extension adjustments without conditionals.
11158
11159 2002-01-04 Jakub Jelinek <jakub@redhat.com>
11160
11161 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Don't crash if
11162 CIE at .eh_frame start is removed due to no FDEs referencing it.
11163
11164 2002-01-04 Jason Thorpe <thorpej@wasabisystems.com>
11165
11166 * config.bfd (x86_64-*-netbsd*): New target.
11167 * configure.in (x86_64-*-netbsd*): Set COREFILE
11168 to netbsd-core.lo.
11169 * configure: Regenerated.
11170
11171 2002-01-03 Tom Rix <trix@redhat.com>
11172
11173 * xcofflink.c (_bfd_xcoff_bfd_final_link): Update .pad section ordering
11174 for recent bfd_make_section_anyway change.
11175
11176 2002-01-03 Nick Clifton <nickc@cambridge.redhat.com>
11177
11178 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
11179 R_ARM_THM_PC11 reloc.
11180
11181 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
11182
11183 * configure.in (LINGUAS): Add ja.
11184 * configure: Regenerate.
11185 * po/ja.po: Import from translation project's web site.
11186
11187 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
11188
11189 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Reformat error
11190 messages to ease translation into other languages.
11191
11192 For older changes see ChangeLog-0001
11193 \f
11194 Local Variables:
11195 mode: change-log
11196 left-margin: 8
11197 fill-column: 74
11198 version-control: never
11199 End:
This page took 0.25641 seconds and 5 git commands to generate.