Skip N_EXCL stabs when procesing N_BINCL stabs.
[deliverable/binutils-gdb.git] / bfd / ChangeLog
1 2003-11-25 Mattias EngdegÄrd <mattias@virtutech.se>
2
3 * stabs.c (_bfd_link_section_stabs): Skip N_EXCL stabs when
4 procesing N_BINCL stabs.
5
6 2003-11-25 Alan Modra <amodra@bigpond.net.au>
7
8 * elf64-ppc.c (ppc_type_of_stub): Disallow stubs other than
9 ppc_stub_plt_call to symbols defined in shared libs.
10
11 2003-11-22 Jakub Jelinek <jakub@redhat.com>
12
13 * elf-bfd.h (ELF_LINK_POINTER_EQUALITY_NEEDED): Define new flag.
14 * elf.c (_bfd_elf_link_hash_copy_indirect): Copy it.
15 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
16 (elf_i386_check_relocs): Set it.
17 (elf_i386_finish_dynamic_symbol): If it is not set,
18 clear st_value of SHN_UNDEF symbol.
19
20 2003-11-20 Jim Blandy <jimb@redhat.com>
21
22 * cpu-powerpc.c (powerpc_compatible): Any ISA in the PowerPC
23 family is a superset of <bfd_arch_rs6000,bfd_mach_rs6k>.
24
25 2003-11-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
26
27 * elf32-s390.c (elf_s390_relocate_section): Don't recalculate symbol
28 section for reloc output and subtract the output section's address
29 from the addend when converting a relocation into one against a
30 section symbol.
31 * elf64-s390.c (elf_s390_relocate_section): Likewise.
32
33 2003-11-18 James E Wilson <wilson@specifixinc.com>
34
35 * elfxx-ia64.c (get_fptr): For fptr_rel, use dynobj not abfd.
36 (elfNN_ia64_size_dynamic_sections): When stripping sections, check
37 for ia64_info->rel_fptr_sec.
38
39 2003-11-18 Alan Modra <amodra@bigpond.net.au>
40
41 * elf64-ppc.c (toc_adjusting_stub_needed): Exit early if section
42 size is zero.
43
44 2003-11-17 Daniel Jacobowitz <drow@mvista.com>
45
46 * elf.c (_bfd_elf_link_hash_copy_indirect): Copy
47 ELF_LINK_HASH_NEEDS_PLT. Fix formatting.
48 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
49 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
50 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Likewise.
51 * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
52 * elf32-sh.c (sh_elf_copy_indirect_symbol): Likewise.
53 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
54 * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
55 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
56 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
57 * elf32-xtensa.c (elf_xtensa_copy_indirect_symbol): Remove.
58 (elf_backend_copy_indirect_symbol): Don't define.
59
60 2003-11-14 Daniel Jacobowitz <drow@mvista.com>
61
62 * elfxx-mips.c (mips_elf_merge_gots): Weaken assert for local
63 GOT entries.
64
65 2003-11-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
66
67 * elf32-s390.c (elf_s390_relocate_section): Only convert R_390_32
68 to R_390_RELATIVE. Convert the other relocations against local
69 symbols to relocations against the start of the section.
70 * elf64-s390.c (elf_s390_relocate_section): Only convert R_390_64
71 to R_390_RELATIVE. Convert the other relocations against local
72 symbols to relocations against the start of the section.
73
74 2003-11-11 Nick Clifton <nickc@redhat.com>
75
76 * elf-m10300.c (bfd_mn10300_elf_size_dynamic_sections): Use
77 info->executable not info->shared to decide if a .interp section
78 should be present.
79 * elf32-arm.h (elf32_arm_size_dynamic_sections): Likewise.
80 * elf32-cris.c (elf_cris_size_dynamic_sections): Likewise.
81 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
82 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
83 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
84 * elf32-vax.c (elf_vax_size_dynamic_sections): Likewise.
85 * elf32-xtensa.c (elf_xtensa_size_dynamic_sections): Likewise.
86 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
87 * elfxx-mips.c (_bfd_mips_size_dynamic_sections): Likewise.
88 * elflink.h (size_dynamic_sections): Likewise.
89
90 2003-11-10 Jonathan Wilson <jonwil@tpgi.com.au>
91
92 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Swap out tls pointer.
93 (_bfd_XXi_final_link_postscript): Look for __tks_used symbol. If
94 found initialise the tls data directory entry.
95
96 2003-11-07 Alan Modra <amodra@bigpond.net.au>
97
98 * elf32-ppc.c (ppc_elf_install_value): Delete.
99 (shared_stub_entry, stub_entry): Make them arrays of ints.
100 Remove initial branch.
101 (ppc_elf_relax_section): Write one branch around all trampolines
102 instead. Correct bogus R_PPC_PLTREL24 handling. Correct
103 branch range check. Only use shared_stub_entry when shared.
104 Test that branches can reach stubs. Write trampolines out at
105 end so that just one realloc is used. Handle little-endian
106 mode. Move relevant code from ppc_elf_install_value to here.
107 (ppc_elf_relocate_section): Move code handling RELAX32 from
108 ppc_elf_install_value to here.
109
110 2003-11-06 Alan Modra <amodra@bigpond.net.au>
111
112 * elf32-ppc.c (ppc_elf_howto_raw); Add entry for R_PPC_RELAX32PC.
113 (ppc_elf_install_value): Handle R_PPC_RELAX32PC. Merge duplicate
114 cases.
115 (shared_stub_entry): Correct opcode.
116 (ppc_elf_relax_section): Generate R_PPC_RELAX32PC relocs.
117 (ppc_elf_relocate_section): Handle them.
118
119 2003-11-05 Alan Modra <amodra@bigpond.net.au>
120
121 * elf.c (_bfd_elf_rela_local_sym): Accept asection **, and return
122 updated section in case of merged section.
123 * elf-bfd.h (_bfd_elf_rela_local_sym): Update declaration.
124 * elf-hppa.h (elf_hppa_relocate_section): Adjust call.
125 * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
126 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
127 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
128 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
129 * elf32-cris.c (cris_elf_relocate_section): Likewise.
130 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
131 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
132 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
133 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
134 * elf32-i370.c (i370_elf_relocate_section): Likewise.
135 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
136 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
137 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
138 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
139 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
140 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
141 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
142 * elf32-s390.c (elf_s390_relocate_section): Likewise.
143 * elf32-sh.c (sh_elf_relocate_section): Likewise.
144 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
145 * elf32-v850.c (v850_elf_relocate_section) Likewise.
146 * elf32-vax.c (elf_vax_relocate_section): Likewise.
147 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
148 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
149 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
150 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
151 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
152 * elf64-s390.c (elf_s390_relocate_section): Likewise.
153 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
154 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
155 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
156 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
157
158 * elf32-cris.c (cris_elf_relocate_section): Don't recalculate symbol
159 section for reloc output.
160 * elf32-i370.c (i370_elf_relocate_section): Likewise.
161 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
162 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
163 * elf32-vax.c (elf_vax_relocate_section): Likewise.
164 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
165 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
166
167 * elf32-ppc.c (ppc_elf_relocate_section): Don't recalculate everything
168 for R_PPC_RELAX32 reloc. Don't bother checking ppc_elf_install_value
169 return value.
170 * elf64-ppc.c (ppc64_elf_relocate_section <R_PPC64_TOC>): Sanity check
171 sec->id.
172
173 2003-11-05 Alan Modra <amodra@bigpond.net.au>
174
175 * elf32-d10v.c (extract_rel_addend, insert_rel_addend): New functions.
176 (elf32_d10v_relocate_section): Use them to handle -r reloc
177 adjustments, and in place of _bfd_elf_rela_local_sym.
178
179 * cpu-iq2000.c (arch_info_struct): Warning fix.
180
181 2003-11-05 Alan Modra <amodra@bigpond.net.au>
182
183 * elf32-hppa.c (ELIMINATE_COPY_RELOCS): Define.
184 (elf32_hppa_copy_indirect_symbol): Don't copy NON_GOT_REF on
185 weakdefs.
186 (elf32_hppa_check_relocs): Use ELIMINATE_COPY_RELOCS.
187 (elf32_hppa_adjust_dynamic_symbol): Likewise. Copy weakdef
188 NON_GOT_REF.
189 (allocate_dynrelocs): Use ELIMINATE_COPY_RELOCS and
190 SYMBOL_CALLS_LOCAL. Discard relocs for undef weak syms with
191 non-default visibility.
192 (elf32_hppa_relocate_section): Use ELIMINATE_COPY_RELOCS and
193 SYMBOL_CALLS_LOCAL.
194
195 2003-11-04 Alan Modra <amodra@bigpond.net.au>
196
197 * aout-target.h, aoutf1.h, bfdio.c, bfdwin.c: Update copyright date.
198 * coff-apollo.c, coff-sparc.c, coff-w65.c, coff-we32k.c: Ditto.
199 * coff-z8k.c, coffgen.c, cpu-frv.c, cpu-h8500.c, cpu-hppa.c: Ditto.
200 * cpu-ia64-opc.c, cpu-m10300.c, cpu-mips.c, cpu-msp430.c: Ditto.
201 * cpu-rs6000.c, cpu-z8k.c, efi-app-ia32.c, elf32-am33lin.c: Ditto.
202 * gen-aout.c, hash.c, hp300hpux.c, init.c, mach-o.c: Ditto.
203 * nlm-target.h, nlm.c, som.h, stabs.c, sysdep.h, xsym.h: Ditto.
204
205 * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Fix
206 "dereferencing type-punned pointer" warnings.
207
208 * aout-adobe.c (aout_adobe_set_section_contents): Constify location.
209 * aoutx.h (NAME(aout,set_section_contents)): Ditto.
210 * bfd-in2.h: Regenerate.
211 * binary.c (binary_set_section_contents): Ditto.
212 * bout.c (b_out_set_section_contents): Ditto.
213 * coff-tic54x.c (tic54x_set_section_contents): Ditto.
214 * coffcode.h (coff_set_section_contents): Ditto.
215 * ecoff.c (_bfd_ecoff_set_section_contents): Ditto.
216 * elf-bfd.h (_bfd_elf_set_section_contents): Ditto.
217 * elf.c (_bfd_elf_set_section_contents): Ditto.
218 * elfxx-mips.c (_bfd_mips_elf_set_section_contents): Ditto.
219 * elfxx-mips.h (_bfd_mips_elf_set_section_contents): Ditto.
220 * i386msdos.c (msdos_set_section_contents): Ditto.
221 * ieee.c (ieee_set_section_contents): Ditto.
222 * ihex.c (ihex_set_section_contents): Ditto.
223 * libaout.h (NAME(aout,set_section_contents)): Ditto.
224 * libbfd-in.h (_bfd_nowrite_set_section_contents): Ditto.
225 (_bfd_generic_set_section_contents): Ditto.
226 * libbfd.h: Regenerate.
227 * libbfd.c (_bfd_generic_set_section_contents): Ditto.
228 * libecoff.h (_bfd_ecoff_set_section_contents): Ditto.
229 * libnlm.h (nlmNAME(set_section_contents)): Ditto.
230 (struct nlm_backend_data <nlm_mangle_relocs>): Ditto.
231 * mmo.c (mmo_set_section_contents): Ditto.
232 * nlm32-alpha.c (nlm_alpha_mangle_relocs): Ditto.
233 * nlm32-i386.c (nlm_i386_mangle_relocs): Ditto.
234 * nlm32-ppc.c (nlm_powerpc_mangle_relocs): Ditto.
235 * nlm32-sparc.c (nlm_sparc_mangle_relocs): Ditto.
236 * nlmcode.h (nlm_set_section_contents): Ditto.
237 * oasys.c (oasys_set_section_contents): Ditto.
238 * pdp11.c (NAME(aout,set_section_contents)): Ditto.
239 * ppcboot.c (ppcboot_set_section_contents): Ditto.
240 * srec.c (srec_set_section_contents): Ditto.
241 * targets.c (BFD_JUMP_TABLE_WRITE <_bfd_set_section_contents>): Ditto.
242 * tekhex.c (tekhex_set_section_contents): Ditto.
243 (move_section_contents): Ditto.
244 * versados.c (versados_set_section_contents): Ditto.
245 * vms-misc.c (_bfd_save_vms_section): Ditto.
246 * vms.c (vms_set_section_contents): Ditto.
247 * vms.h (_bfd_save_vms_section): Ditto.
248
249 2003-11-04 Alan Modra <amodra@bigpond.net.au>
250
251 * elf64-ppc.c (ppc_size_one_stub): Size relbrlt. Accept info arg
252 rather than htab.
253 (ppc64_elf_size_stubs): Adjust ppc_size_one_stub traversal. Zero
254 relbrlt size.
255 (ppc64_elf_build_stubs): Allocate space for relbrlt.
256
257 2003-11-04 Alan Modra <amodra@bigpond.net.au>
258
259 * bfd-in.h (_bfd_elf_tls_setup): Declare.
260 * bfd-in2.h: Regenerate.
261 * elf-bfd.h (struct elf_link_tls_segment): Delete.
262 (struct elf_link_hash_table): Add tls_sec and tls_size.
263 * elf.c (_bfd_elf_link_hash_table_init): Init tls_sec and tls_size.
264 * elflink.c (_bfd_elf_tls_setup): New function.
265 * elflink.h (struct elf_final_link_info): Remove first_tls_sec.
266 (elf_bfd_final_link): Don't set first_tls_sec here. Update code
267 saving tls segment info, round segment size up.
268 (elf_link_output_extsym): Adjust code using tls segment info.
269 (elf_link_input_bfd): Likewise.
270 * elf32-i386.c (dtpoff_base, tpoff): Likewise.
271 * elf32-s390.c (dtpoff_base, tpoff): Likewise.
272 * elf32-sh.c (dtpoff_base, tpoff): Likewise.
273 * elf32-sparc.c (dtpoff_base, tpoff): Likewise.
274 * elf64-s390.c (dtpoff_base, tpoff): Likewise.
275 * elf64-x86-64.c (dtpoff_base, tpoff): Likewise.
276 * elfxx-ia64.c (elfNN_ia64_tprel_base): Likewise.
277 (elfNN_ia64_dtprel_base): Likewise.
278 * elf64-alpha.c (alpha_get_dtprel_base): Likewise.
279 (alpha_get_tprel_base): Likewise.
280 (struct alpha_relax_info): Remove tls_segment.
281 (elf64_alpha_relax_got_load): Adjust invocation of
282 alpha_get_dtprel_base and alpha_get_tprel_base.
283 (elf64_alpha_relax_tls_get_addr): Likewise.
284 (elf64_alpha_relax_section): Likewise.
285 (elf64_alpha_relocate_section): Likewise.
286 (elf64_alpha_relax_find_tls_segment): Delete.
287 * elf32-ppc.c (struct ppc_elf_link_hash_table): Remove tls_sec.
288 (ppc_elf_tls_setup): Call _bfd_elf_tls_setup. Return section.
289 (ppc_elf_relocate_section): Adjust to use elf.tls_sec.
290 * elf32-ppc.h (ppc_elf_tls_setup): Update.
291 * elf64-ppc.c (struct ppc_link_hash_table): Remove tls_sec.
292 (ppc64_elf_tls_setup): Call _bfd_elf_tls_setup. Return section.
293 (ppc64_elf_tls_optimize): Adjust to use elf.tls_sec.
294 (ppc64_elf_relocate_section): Likewise.
295 * elf64-ppc.h (ppc64_elf_tls_setup): Update.
296
297 2003-11-03 Daniel Jacobowitz <drow@mvista.com>
298
299 * elf-bfd.h (struct elf_backend_data): Remove plt_header_size.
300 * elf-m10300.c (elf_backend_plt_header_size): Don't define.
301 * elf32-arm.h (elf_backend_plt_header_size): Don't define.
302 * elf32-cris.c (elf_backend_plt_header_size): Don't define.
303 * elf32-i386.c (elf_backend_plt_header_size): Don't define.
304 * elf32-mips.c (elf_backend_plt_header_size): Don't define.
305 * elf32-ppc.c (elf_backend_plt_header_size): Don't define.
306 * elf32-s390.c (elf_backend_plt_header_size): Don't define.
307 * elf32-sh.c (elf_backend_plt_header_size): Don't define.
308 * elf32-sparc.c (elf_backend_plt_header_size): Don't define.
309 * elf64-alpha.c (elf_backend_plt_header_size): Don't define.
310 * elf64-hppa.c (elf_backend_plt_header_size): Don't define.
311 * elf64-mips.c (elf_backend_plt_header_size): Don't define.
312 * elf64-ppc.c (elf_backend_plt_header_size): Don't define.
313 * elf64-s390.c (elf_backend_plt_header_size): Don't define.
314 * elf64-sh64.c (elf_backend_plt_header_size): Don't define.
315 * elf64-sparc.c (elf_backend_plt_header_size): Don't define.
316 * elf64-x86-64.c (elf_backend_plt_header_size): Don't define.
317 * elfn32-mips.c (elf_backend_plt_header_size): Don't define.
318 * elfxx-ia64.c (elf_backend_plt_header_size): Don't define.
319 * elfxx-target.h (elf_backend_plt_header_size): Don't define
320 or include in target initializer.
321
322 2003-11-03 Andrew Cagney <cagney@redhat.com>
323
324 * section.c (bfd_set_section_contents): Make the "location" buffer
325 constant.
326 * bfd-in2.h: Re-generate.
327
328 2003-10-30 Andrew Cagney <cagney@redhat.com>
329
330 * syms.c: Replace "struct symbol_cache_entry" with "struct
331 bfd_symbol".
332 * vms.h, targets.c, section.c, reloc.c, peicode.h: Ditto.
333 * mipsbsd.c, elf.c, linker.c, elf-bfd.h, ecoff.c: Ditto.
334 * cpu-z8k.c, cpu-ns32k.c, cpu-h8500.c, bfd.c, bfd-in.h: Ditto.
335 * bfd-in2.h: Re-generate.
336
337 2003-10-30 Jakub Jelinek <jakub@redhat.com>
338
339 * elfxx-ia64.c: Include objalloc.h, hashtab.h.
340 (struct elfNN_ia64_local_hash_entry): Remove root. Add id and r_sym
341 fields.
342 (struct elfNN_ia64_local_hash_table): Remove.
343 (struct elfNN_ia64_link_hash_table): Change loc_hash_table's type
344 to htab_t. Add loc_hash_memory field.
345 (elfNN_ia64_local_hash_table_init, elfNN_ia64_new_loc_hash_entry):
346 Removed.
347 (elfNN_ia64_local_htab_hash, elfNN_ia64_local_htab_eq): New
348 functions.
349 (elfNN_ia64_hash_table_create): Use hashtab.h hashtable for
350 loc_hash_table. Initialize loc_hash_memory.
351 (elfNN_ia64_hash_table_free): New function.
352 (elfNN_ia64_local_hash_lookup): Remove.
353 (elfNN_ia64_local_dyn_sym_thunk): Change into htab_traverse
354 callback.
355 (elfNN_ia64_dyn_sym_traverse): Use htab_traverse.
356 (get_local_sym_hash): Use hashtab.h hashtable for loc_hash_table.
357 (bfd_elfNN_bfd_link_hash_table_free): Define.
358
359 2003-10-30 Alan Modra <amodra@bigpond.net.au>
360
361 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Modify versioned
362 symbol string in place.
363
364 2003-10-30 Jim Blandy <jimb@redhat.com>
365
366 * cpu-rs6000.c (rs6000_compatible): Check the correct arch_info
367 object's mach field: all PowerPC machines are supersets of the
368 original rs6000, but not later rs6000 machines.
369
370 2003-10-30 Alan Modra <amodra@bigpond.net.au>
371
372 * dwarf2.c (struct attribute): Delete "unsnd", "snd" and "addr".
373 Add "val" and "sval" fields.
374 (DW_STRING, DW_UNSND, DW_BLOCK, DW_SND, DW_ADDR): Delete.
375 (read_attribute_value): Expand and adjust DW_* occurrences.
376 (scan_unit_for_functions, parse_comp_unit): Likewise.
377
378 2003-10-30 Phil Edwards <phil@codesourcery.com>
379
380 * config.bfd (arm-*-vxworks): Remove separate stanza; merge with
381 other common ELF triples.
382 (i[3-7]86-*-vxworks): Change to ELF format.
383 (mips*-*-windiss): New triple, add to common MIPS/ELF stanza.
384 (sh-*-vxworks): New stanza.
385
386 2003-10-30 Lars Knoll <lars@trolltech.com>
387 Michael Matz <matz@suse.de>
388 Jakub Jelinek <jakub@redhat.com>
389 Alan Modra <amodra@bigpond.net.au>
390
391 * merge.c (struct sec_merge_sec_info): Update comment.
392 (struct sec_merge_hash_entry): Remove entsize.
393 (sec_merge_hash_lookup): Only adjust alignment when creating.
394 (sec_merge_emit): Remove register keyword.
395 (cmplengthentry, last4_eq, last_eq): Delete.
396 (strrevcmp, strrevcmp_align, is_suffix): New.
397 (merge_strings): Use them to implement fast suffix merging.
398 * elf-strtab.c (struct elf_strtab_hash_entry): Update comments.
399 Make "len" signed.
400 (_bfd_elf_strtab_add): Lose on >2G strings.
401 (_bfd_elf_strtab_emit): Don't emit strings with len < 0.
402 (cmplengthentry, last4_eq): Delete.
403 (strrevcmp, is_suffix): New.
404 (_bfd_elf_strtab_finalize): Rework to implement fast suffix merging.
405
406 2003-10-29 Daniel Jacobowitz <drow@mvista.com>
407
408 * elf32-arm.h (elf32_arm_final_link_relocate): Move check for
409 SEC_ALLOC.
410
411 2003-10-29 Philip Blundell <philb@gnu.org>
412
413 * elf32-arm.h (elf32_arm_plt0_entry, elf32_arm_plt_entry): New
414 code sequence.
415 (PLT_HEADER_SIZE): New.
416 (struct elf32_arm_pcrel_relocs_copied): Rename to ...
417 (struct elf32_arm_relocs_copied): ... this. Count both
418 pcrel and non-pcrel relocs. All uses updated.
419 (struct elf32_arm_link_hash_table): Add pointers to dynamic linker
420 sections and symbol/section mapping cache.
421 (create_got_section): New.
422 (elf32_arm_create_dynamic_sections): New.
423 (elf_backend_create_dynamic_sections): Use it.
424 (elf32_arm_final_link_relocate): Support garbage collection of relocs.
425 (elf32_arm_check_relocs): Likewise.
426 (elf32_arm_adjust_dynamic_symbol): Likewise.
427 (elf32_arm_copy_indirect_symbol): New.
428 (elf32_arm_link_hash_table_create): Initialise new fields.
429 (elf32_arm_gc_sweep_hook): Implement.
430 (elf32_arm_discard_copies): Delete.
431 (elf32_arm_finish_dynamic_symbol): Use new PLT code.
432 (elf32_arm_finish_dynamic_sections): Likewise.
433 (elf_backend_can_refcount): Define.
434 (elf_backend_copy_indirect_symbol): Likewise.
435 (elf_backend_plt_header_size): Set to PLT_HEADER_SIZE.
436
437 2003-10-29 Alan Modra <amodra@bigpond.net.au>
438
439 * elf64-ppc.c (elf_backend_grok_prstatus): Define.
440 (elf_backend_grok_psinfo): Define.
441 (ppc64_elf_grok_prstatus, ppc64_elf_grok_psinfo): New functions.
442
443 * elf.c (_bfd_elfcore_make_pseudosection): Allow multiple
444 sections with the same name.
445 (elfcore_grok_lwpstatus): Likewise.
446 (elfcore_grok_win32pstatus): Likewise.
447 (elfcore_grok_note): Likewise.
448 (elfcore_grok_nto_status): Likewise.
449 (elfcore_grok_nto_gregs): Likewise.
450
451 2003-10-27 Daniel Jacobowitz <drow@mvista.com>
452
453 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Never skip dynamic
454 objects.
455
456 2003-10-14 Richard Sandiford <rsandifo@redhat.com>
457
458 * elfxx-mips.c (mips_elf_create_got_section): Initialize global_gotno.
459
460 2003-10-24 H.J. Lu <hongjiu.lu@intel.com>
461
462 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Look up
463 hash table for real symbols.
464
465 2003-10-23 Michael Snyder <msnyder@redhat.com>
466
467 * section.c (asection): Fix typo in comment.
468
469 2003-10-23 Alan Modra <amodra@bigpond.net.au>
470
471 * elf64-ppc.c (get_tls_mask): Add toc_symndx param, save toc
472 reloc symbol index to it. Don't allow gd syms in shared libs
473 to be optimized.
474 (ppc64_elf_tls_optimize): Adjust get_tls_mask call.
475 (ppc64_elf_size_stubs): Likewise.
476 (ppc64_elf_relocate_section): Check that tls relocs are only used
477 with tls syms, and similarly for non-tls. Correct symbol used
478 when optimizing toc tls code.
479
480 2003-10-22 Nick Clifton <nickc@redhat.com>
481
482 * peicode.h (coff_swap_scnhdr_in): Only remove padding when
483 processing an executable.
484
485 2003-10-22 Jakub Jelinek <jakub@redhat.com>
486
487 * elflink.c (_bfd_elf_export_symbol): Adjust for globals and locals
488 field changes.
489 (_bfd_elf_link_assign_sym_version): Likewise.
490 * elflink.h (size_dynamic_sections): Likewise.
491
492 2003-10-21 Alexandre Oliva <aoliva@redhat.com>,
493 Michael Snyder <msnyder@redhat.com>
494
495 * archures.c (bfd_mach_sh4a, bfd_mach_sh4al_dsp, bfd_mach_sh4_nofpu,
496 bfd_mach_sh4a_nofpu): New machine types.
497 * bfd-in2.h: Rebuilt.
498 * cpu-sh.c (compatible): Remove unused function.
499 (SH4A_NEXT, SH4AL_DSP_NEXT, SH4_NOFPU_NEXT, SH4A_NOFPU_NEXT): New.
500 (arch_info_struct): Add sh4a, sh4al_dsp, sh4-nofpu and sh4a-nofpu.
501 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle them.
502
503 2003-10-21 Wouter van Heyst <wouter@vidicode.nl>
504
505 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Correct text
506 describing mismatched formats involving the Maverick FP type.
507
508 2003-10-21 Anil Paranjpe <anilp1@KPITCummins.com>
509
510 * binary.c (binary_object_p): Pass machine flag along with
511 architecture.
512
513 2003-10-21 Thorsten Brehm <brehm@gmx.net>
514
515 * archures.c (bfd_default_scan): Add support for mcf528x.
516 * ieee.c (ieee_write_processor): Likewise.
517
518 2003-10-21 Peter Barada <pbarada@mail.wm.sps.mot.com>
519 Bernardo Innocenti <bernie@develer.com>
520
521 * archures.c: Add MCF528x (MCFv4) support.
522 * bfd/cpu-m68k.c (arch_info_struct): Likewise.
523 * bfd-in2.h: Regenerate.
524
525 2003-10-20 Andrew Cagney <cagney@redhat.com>
526
527 * targets.c: Replace "struct sec" with "struct bfd_section"
528 * syms.c, sparclynx.c, section.c, opncls.c: Ditto.
529 * libcoff-in.h, libbfd-in.h, elfxx-target.h: Ditto.
530 * elf.c, coffgen.c, bfd.c, bfd-in.h, aoutf1.h: Ditto.
531 * aout-tic30.c, aout-target.h:
532 * bfd-in2.h, libcoff.h, libbfd.h: Regenerate.
533
534 2003-10-18 Hans-Peter Nilsson <hp@bitrange.com>
535
536 Support linker relaxation of new R_MMIX_PUSHJ_STUBBABLE relocs.
537 * elf64-mmix.c (MAX_PUSHJ_STUB_SIZE): New macro.
538 (struct _mmix_elf_section_data): New member pjs.
539 (mmix_set_relaxable_size, mmix_elf_get_section_contents): New
540 functions.
541 (elf_mmix_howto_table): New entry for R_MMIX_PUSHJ_STUBBABLE.
542 (mmix_reloc_map): Ditto.
543 (mmix_elf_relocate_section): Handle R_MMIX_PUSHJ_STUBBABLE.
544 (mmix_final_link_relocate, mmix_elf_check_common_relocs): Ditto.
545 (mmix_elf_perform_relocation): Ditto. Don't mark parameter addr
546 unused.
547 (mmix_elf_check_relocs): Move early return to after
548 mmix_elf_check_common_relocs call.
549 (mmix_elf_symbol_processing): Fix cut-and-pasto in head comment.
550 (_bfd_mmix_before_linker_allocation): Rename from
551 _bfd_mmix_prepare_linker_allocated_gregs. All referers changed.
552 Arrange to set the initial relaxable size of sections.
553 (_bfd_mmix_after_linker_allocation): Rename from
554 _bfd_mmix_finalize_linker_allocated_gregs.
555 (mmix_elf_relax_section): Relax a R_MMIX_PUSHJ_STUBBABLE reloc.
556 (bfd_elf64_get_section_contents): Define.
557 * reloc.c: Add ENUMX for BFD_RELOC_MMIX_PUSHJ_STUBBABLE.
558 * libbfd.h, bfd-in2.h: Regenerate.
559
560 * reloc.c (bfd_generic_relax_section): Default-set
561 section->_cooked_size here.
562 (bfd_generic_get_relocated_section_contents): Don't set it here.
563 Explain why.
564
565 2003-10-17 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
566
567 * elf32-hppa.c (elf32_hppa_relocate_section): Skip relocation if
568 output section has been discarded.
569
570 2003-10-17 Shrinivas Atre <shrinivasa@KPITCummins.com>
571
572 * coff-h8300.c (funcvec_hash_newfunc): Handle normal mode.
573 (h8300_reloc16_extra_cases): Likewise.
574 (h8300_bfd_link_add_symbols): Likewise.
575
576 2003-10-17 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
577
578 * cpu-h8300.c (h8300sxn_info_struct): Correct address size.
579 (h8300sn_info_struct): Likewise.
580 (h8300hn_info_struct): Likewise.
581
582 2003-10-16 Pavel Roskin <proski@gnu.org>
583
584 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Don't calculate image size
585 for sections which lack size info.
586
587 2003-10-17 Danny Smith <dannysmith@users.sourceforge.net>
588
589 * configure.host: Add __USE_MINGW_FSEEK to HDEFINES for
590 mingw32.
591
592 2003-10-16 H.J. Lu <hongjiu.lu@intel.com>
593
594 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Also warn
595 undefined patterns with '*'.
596
597 2003-10-16 H.J. Lu <hongjiu.lu@intel.com>
598
599 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't
600 use the last CIE from a different section.
601 (_bfd_elf_write_section_eh_frame): Don't pad beyond the raw
602 size of the output section.
603
604 2003-10-07 Roland McGrath <roland@redhat.com>
605
606 * elf.c (_bfd_elf_make_section_from_phdr): Set alignment_power of
607 new section from p_align header field.
608
609 2003-10-16 H.J. Lu <hongjiu.lu@intel.com>
610
611 * elf32-xtensa.c (xtensa_read_table_entries): The external size
612 of entry is 8 bytes.
613
614 2003-10-15 Andrew Cagney <cagney@redhat.com>
615
616 * targets.c (BFD_JUMP_TABLE_SYMBOLS): Replace NAME##_get_symtab
617 with NAME##_canonicalize_symtab.
618 * libcoff-in.h (coff_canonicalize_symtab): Update.
619 * xsym.h (bfd_sym_canonicalize_symtab): Update.
620 * elf-bfd.h (_bfd_elf_canonicalize_symtab): Update.
621 * coffgen.c (coff_canonicalize_symtab): Update.
622 * libbfd-in.h (_bfd_nosymbols_canonicalize_symtab): Update.
623 * libnlm.h (nlmNAME(canonicalize_symtab)): Update.
624 * ieee.c (ieee_vec): Update comment.
625 * libecoff.h (_bfd_ecoff_canonicalize_symtab): Update.
626 * mmo.c (mmo_canonicalize_symtab): Update.
627 * nlm-target.h (nlm_canonicalize_symtab): Update.
628 * nlmcode.h (nlm_canonicalize_symtab): Update.
629 * i386msdos.c (msdos_canonicalize_symtab): Update.
630 * hp300hpux.c (MY (canonicalize_symtab)): Update.
631 * oasys.c (oasys_canonicalize_symtab): Update.
632 * som.c (som_canonicalize_symtab): Update.
633 * pef.c (bfd_pef_canonicalize_symtab): Update.
634 * nlmcode.h (nlm_canonicalize_symtab): Update.
635 * xsym.c (bfd_sym_canonicalize_symtab): Update.
636 * vms.c (vms_canonicalize_symtab): Update.
637 * versados.c (versados_canonicalize_symtab): Update.
638 * mach-o.c (bfd_mach_o_canonicalize_symtab): Update.
639 * ieee.c (ieee_canonicalize_symtab): Update.
640 * pdp11.c (NAME(aout,canonicalize_symtab)): Update.
641 * reloc.c: Update comment.
642 * libaout.h (NAME(aout,canonicalize_symtab)): Update.
643 * coff64-rs6000.c (aix5coff64_vec): Update.
644 * coff64-rs6000.c (bfd_xcoff_aix5_backend_data): Update.
645 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update.
646 * aoutx.h (NAME(aout,canonicalize_symtab)): Update.
647 * elfxx-target.h (bfd_elfNN_canonicalize_symtab): Update.
648 * hp300hpux.c (MY_canonicalize_symtab): Update.
649 * ecoff.c (_bfd_ecoff_canonicalize_symtab): Update.
650 * aout-tic30.c (MY_canonicalize_symtab): Update.
651 * aout-target.h (MY_canonicalize_symtab): Update.
652 * ppcboot.c (ppcboot_canonicalize_symtab): Update.
653 * elf.c (_bfd_elf_canonicalize_symtab): Update.
654 * elfcode.h (elf_canonicalize_symtab): Update.
655 * ihex.c (ihex_canonicalize_symtab): Update.
656 * tekhex.c (tekhex_canonicalize_symtab): Update.
657 * binary.c (binary_canonicalize_symtab): Update.
658 * srec.c (srec_canonicalize_symtab): Update.
659
660 2003-10-15 Kazu Hirata <kazu@cs.umass.edu>
661
662 * elf32-h8300.c (elf_reloc_map): Fix a comment typo.
663
664 2003-10-15 Kaz Kojima <kkojima@rr.iij4u.or.jp>
665
666 * elf32-sh.c (sh_elf_relocate_section): Handle R_SH_IMM_*_PCREL
667 relocations.
668 (sh_elf_check_relocs): Likewise.
669
670 * elf32-sh64.c (elf_backend_merge_symbol_attribute): Define.
671 (sh64_elf_merge_symbol_attribute): New.
672 * elf64-sh64.c (elf_backend_merge_symbol_attribute): Define.
673 (sh64_elf64_merge_symbol_attribute): New.
674
675 2003-10-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
676
677 * elf-bfd.h (struct elf_backend_data): New function pointer member
678 elf_backend_merge_symbol_attribute.
679 * elflink.h (elf_link_add_object_symbols): Adjust call to
680 elf_backend_merge_symbol_attribute if the backend defined it.
681 * elfxx-target.h (elf_backend_merge_symbol_attribute): New macro.
682 (elfNN_bed): Add that to the initializer.
683
684 2003-10-14 Bob Wilson <bob.wilson@acm.org>
685
686 * elf32-xtensa.c (get_is_linkonce_section): Delete.
687 (xtensa_is_property_section, xtensa_is_littable_section): Use
688 XTENSA_INSN_SEC_NAME and XTENSA_LIT_SEC_NAME macros. Do not recognize
689 linkonce sections containing ".xt.insn" and ".xt.lit" substrings.
690 (xtensa_get_property_section_name): Check section name instead of
691 calling get_is_linkonce_section. Remove unused bfd parameter. Use
692 XTENSA_INSN_SEC_NAME and XTENSA_LIT_SEC_NAME macros. Never generate
693 linkonce section names by appending ".xt.insn" or ".xt.lit".
694 (xtensa_read_table_entries): Remove bfd argument in call to
695 xtensa_get_property_section_name. Free section name when done.
696 (elf_xtensa_combine_prop_entries): Free leaking table.
697
698 2003-10-13 Richard Sandiford <rsandifo@redht.com>
699
700 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Don't add
701 DT_MIPS_LIBLIST or DT_MIPS_CONFLICT entries.
702 (_bfd_mips_elf_finish_dynamic_symbol): Don't handle them. Don't
703 handle DT_MIPS_MSYM. Set DT_RELSZ based on the number of relocations
704 that were needed.
705 (_bfd_mips_elf_modify_segment_map): Fix placement of PT_MIPS_OPTIONS.
706 (_bfd_mips_elf_merge_private_bfd_data): Ignore EF_MIPS_UCODE.
707
708 2003-10-13 H.J. Lu <hongjiu.lu@intel.com>
709
710 * bfd-in.h (bfd_elf32_ia64_after_parse): New prototype.
711 (bfd_elf64_ia64_after_parse): Likewise.
712 * bfd-in2.h: Regenerated.
713
714 * elfxx-ia64.c (oor_ip): New.
715 (oor_branch_size): Likewise.
716 (bfd_elfNN_ia64_after_parse): Likewise.
717 (elfNN_ia64_relax_section): Use oor_ip if oor_branch_size
718 equals sizeof (oor_ip).
719
720 2003-10-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
721
722 * elf64-sh64.c (sh_elf64_relocate_section): Tidy up for the
723 renumbering of some relocation numbers.
724
725 2003-10-11 Alan Modra <amodra@bigpond.net.au>
726
727 * coff-sh.c: Move definition of MAP and guard more code with
728 COFF_IMAGE_WITH_PE.
729
730 * section.c (bfd_get_section_size_before_reloc): Ignore reloc_done.
731 * bfd-in2.h: Regenerate.
732
733 2003-10-10 H.J. Lu <hongjiu.lu@intel.com>
734
735 * Makefile.am: Run "make dep-am".
736 * Makefile.in: Regenerate.
737 * doc/Makefile.in: Likewise.
738
739 2003-10-09 H.J. Lu <hongjiu.lu@intel.com>
740
741 * cofflink.c: Include "safe-ctype.h".
742 (coff_link_add_symbols): Use ISDIGIT instead of isdigit.
743
744 2003-10-08 Dave Brolley <brolley@redhat.com>
745 On behalf of Michael Snyder <msnyder@redhat.com>
746
747 * archures.c: Add FRV fr550 machine.
748 * cpu-frv.c: Ditto.
749 * elf32-frv.c: Ditto.
750 * bfd-in2.h: Regenerate.
751
752 2003-10-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
753
754 * elfxx-mips.c (STUB_MOVE,STUB_LI16): Fix stub code
755 for non-SGI N64 ABI. Improve code consitency.
756
757 2003-10-07 Alexandre Oliva <aoliva@redhat.com>
758
759 * elf32-frv.c (elf32_frv_howto_table): Set R_FRV_LABEL16's
760 rightshift to 2.
761
762 2003-10-07 Nathan Sidwell <nathan@codesourcery.com>
763
764 * libbfd-in.h (_bfd_link_section_stabs): Add string offset
765 parameter.
766 * cofflink.c (coff_link_add_symbols): Deal with split stab
767 sections.
768 * elflink.h (elf_link_add_object_symbols): Deal with split stab
769 sections.
770 * stabs.c (_bfd_link_section_stabs): Add string offset parameter.
771 * libbfd.h: Regenerated.
772
773 * coffcode.h (coff_set_alignment_hook): With PE_COFF reloc
774 overflow, set reloc start position to after the count
775 reloc. Subtract one from num relocs. Give error on 0xffff relocs
776 and no overflow.
777 * cofflink.c (_bfd_coff_final_link): Deal with PE_COFF reloc
778 overflow.
779 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Do overflow if >=
780 0xffff.
781
782 2003-10-06 H.J. Lu <hongjiu.lu@intel.com>
783
784 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Pad the
785 last CIE/FDE if needed.
786
787 2003-10-06 Nick Clifton <nickc@redhat.com>
788
789 * targets.c (_bfd_target_vector): Include bfd_elf64_sparc_vec if
790 BFD64 is enabled.
791
792 2003-10-06 Matt Thomas <matt@3am-software.com>
793
794 * config.bfd: Move the hppa*-*-netbsd* case to the hppa*-*-linux* case.
795
796 2003-10-06 Robert Millan <robertmh@gnu.org>
797
798 * configure.in: Match GNU/KNetBSD with new knetbsd*-gnu triplet.
799 * config.bfd: Likewise.
800 * configure: Regenerate.
801
802 2003-10-04 Christian Groessler <chris@groessler.org>
803
804 * coff-z8k.c (extra_case): Fix displacement length check for R_JR
805 and R_CALLR.
806
807 2003-10-04 Stephane Carrez <stcarrez@nerim.fr>
808
809 * elf32-m68hc1x.c: Update to ISO C90; replace PTR with void*.
810 * elf32-m68hc11.c: Likewise.
811 * elf32-m68hc12.c: Likewise.
812 * elf32-m68hc1x.h: Likewise.
813
814 2003-10-04 Stephane Carrez <stcarrez@nerim.fr>
815
816 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Fix merge
817 of flags between HC12 and HCS12.
818
819 2003-10-04 Bryce McKinlay <bryce@mckinlay.net.nz>
820
821 * merge.c (_bfd_merge_sections): Set SEC_EXCLUDE flag on sections
822 which become empty after merging.
823
824 2003-09-30 Jakub Jelinek <jakub@redhat.com>
825
826 * elfxx-ia64.c (ia64_howto_table): Fix size of R_IA64_TPREL64[LM]SB,
827 R_IA64_DTPREL{32,64}[LM]SB and R_IA64_DTPMOD64[LM]SB.
828
829 2003-09-30 Chris Demetriou <cgd@broadcom.com>
830
831 * archures.c (bfd_mach_mipsisa64r2): New define.
832 * bfd-in2.h: Regenerate.
833 * aoutx.h (NAME(aout,machine_type)): Handle bfd_mach_mipsisa64r2.
834 * cpu-mips.c (I_mipsisa64r2): New enum value.
835 (arch_info_struct): Add entry for I_mipsisa64r2.
836 * elfxx-mips.c (_bfd_elf_mips_mach)
837 (_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_64R2.
838 (mips_set_isa_flags): Add bfd_mach_mipsisa64r2 case.
839 (mips_mach_extensions): Add entry for bfd_mach_mipsisa64r2.
840
841 2003-09-29 H.J. Lu <hongjiu.lu@intel.com>
842
843 * elfxx-ia64.c (elfNN_hpux_backend_symbol_processing): New.
844 Handle SHN_IA_64_ANSI_COMMON.
845 (elf_backend_section_from_bfd_section): Defined.
846
847 2003-09-26 H.J. Lu <hongjiu.lu@intel.com>
848
849 * elflink.c (elf_link_read_relocs_from_section): Add an argument
850 of a pointer to section. Check bad symbol index.
851 (_bfd_elf_link_read_relocs): Modify calls to
852 elf_link_read_relocs_from_section.
853
854 2003-09-23 DJ Delorie <dj@redhat.com>
855
856 * elf32-sh.c (sh_elf_howto_table): R_SH_SWITCH8,
857 R_SH_GNU_VTINHERIT, R_SH_GNU_VTENTRY,
858 R_SH_LOOP_START,R_SH_LOOP_END moved to "reserved" spaces,
859 R_SH_DIR16, R_SH_DIR8, R_SH_DIR8UL, R_SH_DIR8UW, R_SH_DIR8U,
860 R_SH_DIR8SW, R_SH_DIR8S, R_SH_DIR4UL, R_SH_DIR4UW, R_SH_DIR4U,
861 R_SH_PSHA, R_SH_PSHL added.
862 (sh_reloc_map): Add R_SH_DIR16 and R_SH_DIR8.
863 (sh_elf_relocate_section): Support new relocs.
864
865 2003-09-23 Bob Wilson <bob.wilson@acm.org>
866
867 * elf32-xtensa.c (elf_xtensa_relocate_section): Fix typo that clobbered
868 dynamic relocation offsets.
869
870 2003-09-23 Alan Modra <amodra@bigpond.net.au>
871
872 * simple.c (bfd_simple_get_relocated_section_contents): Free the
873 hash table using _bfd_generic_link_hash_table_free.
874
875 2003-09-23 Alan Modra <amodra@bigpond.net.au>
876
877 * elf-bfd.h (struct bfd_elf_special_section): Remove "suffix". Change
878 type of prefix_length and suffix_length to int. Rename "attributes"
879 to "attr". Comment.
880 (_bfd_elf_get_sec_type_attr): Update prototype.
881 * elf.c (get_special_section): Rewrite.
882 (_bfd_elf_get_sec_type_attr): Return struct rather than passing in
883 attr and type pointers.
884 (_bfd_elf_new_section_hook): Adjust for above.
885 (special_sections): Merge suffix with prefix. Set
886 prefix_length for all entries. Set suffix_length appropriately.
887 * elf32-m32r.c (m32r_elf_special_sections): Likewise.
888 * elf32-m68hc11.c (elf32_m68hc11_special_sections): Likewise.
889 * elf32-m68hc12.c (elf32_m68hc12_special_sections): Likewise.
890 * elf32-mcore.c (mcore_elf_special_sections): Likewise.
891 * elf32-sh64.c (sh64_elf_special_sections): Likewise.
892 * elf32-v850.c (v850_elf_special_sections): Likewise.
893 * elf32-xtensa.c (elf_xtensa_special_sections): Likewise.
894 * elf64-alpha.c (elf64_alpha_special_sections): Likewise.
895 * elf64-hppa.c (elf64_hppa_special_sections): Likewise.
896 * elf64-ppc.c (ppc64_elf_special_sections): Likewise.
897 * elf64-sh64.c (sh64_elf64_special_sections): Likewise.
898 * elfxx-ia64.c (elfNN_ia64_special_sections): Likewise.
899 * elfxx-mips.c (_bfd_mips_elf_special_sections): Likewise.
900 * elf32-ppc.c (ppc_elf_special_sections): Likewise. Fix .plt flags.
901
902 2003-09-21 Daniel Jacobowitz <drow@mvista.com>
903
904 * elf64-alpha.c (elf64_alpha_create_got_section): Initialize
905 ->got if the section already exists.
906
907 2003-09-19 Nathan Sidwell <nathan@codesourcery.com>
908
909 * dwarf2.c (decode_line_info): Cope with an initially empty
910 filename table.
911
912 2003-09-18 H.J. Lu <hongjiu.lu@intel.com>
913
914 * acinclude.m4: Include ../config/accross.m4.
915 * aclocal.m4: Regenerated.
916
917 * configure.host (HOST_64BIT_TYPE): Remove if it is set to long
918 or long long.
919 (HOST_U_64BIT_TYPE): Remove if it is set to unsigned long long.
920 (host64): Remove if HOST_64BIT_TYPE is set to long.
921
922 * configure.in (HOST_64BIT_TYPE): Set according to the size of
923 long and long long.
924 (HOST_U_64BIT_TYPE): Likewise.
925 (host64): Likewise.
926 * configure: Regenerated.
927
928 2003-09-19 Alan Modra <amodra@bigpond.net.au>
929
930 * elf.c (elfcore_write_note): Don't use sizeof(Elf_External_note)
931 since some ABIs round up the size of the struct.
932
933 2003-09-18 H.J. Lu <hongjiu.lu@intel.com>
934
935 * elflink.c (_bfd_elf_merge_symbol): Allow type change if
936 the old symbol is undefined and the new symbol is defined.
937
938 2003-09-18 Andreas Schwab <schwab@suse.de>
939
940 * simple.c (bfd_simple_get_relocated_section_contents): Use
941 _bfd_generic_link_hash_table_create instead of
942 bfd_link_hash_table_create.
943
944 2003-09-10 H.J. Lu <hongjiu.lu@intel.com>
945
946 * elfxx-ia64.c (elfNN_ia64_special_sections): Mark all sections
947 started with ".sbss" or "".sdata" as SHF_IA_64_SHORT.
948
949 2003-09-10 John David Anglin <dave.anglin@nrc-cnrc.nrc.ca>
950 Randolph Chung <randolph@tausq.org>
951
952 * elf32-hppa.c (struct elf32_hppa_link_hash_entry,
953 hppa_link_hash_newfunc, hppa_build_one_stub,
954 elf32_hppa_adjust_dynamic_symbol, mark_PIC_calls, allocate_plt_static,
955 allocate_dynrelocs, elf32_hppa_size_dynamic_sections,
956 elf32_hppa_finish_dynamic_symbol): Remove pic_call field and all code
957 for generating import stubs for calls to statically linked PIC
958 functions.
959 (hppa_type_of_stub): Don't generate an import stub for calls to
960 statically linked pic functions. Generate import stubs for calls
961 in a shared object, to functions not in a regular file, and to
962 defined weak functions. Add new argument INFO.
963 (hppa_build_one_stub): Don't undef ADDIL_DP.
964 (elf32_hppa_check_relocs): Don't set SEC_HAS_GOT_REF flag.
965 (elf32_hppa_size_stubs): Pass info to hppa_type_of_stub.
966 (final_link_relocate): Change all DLTIND relocs to DPREL relocs in a
967 non-shared link. Convert instructions that use the the linkage table
968 pointer, or a facsimile thereof, to use the global data pointer when
969 the reloc has been changed.
970
971 2003-09-08 Joel Brobecker <brobecker@gnat.com>
972
973 * archures.c: Add new machine names for hppa.
974 * bfd-in2.h: Regenerate.
975 * cpu-hppa.c: Use the new machine names.
976
977 2003-09-06 Stephane Carrez <stcarrez@nerim.fr>
978
979 * elf32-m68hc1x.h (struct m68hc11_elf_link_hash_table): Remove
980 all_local_syms member.
981 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Use bfd_elf_get_elf_syms
982 to get the local symbols.
983
984 2003-09-06 Stephane Carrez <stcarrez@nerim.fr>
985
986 * elf32-m68hc12.c (elf32_m68hc12_special_sections): New for hc11.
987 (elf_backend_special_sections): Define.a
988
989 PR savannah/4950:
990 * elf32-m68hc11.c (elf32_m68hc11_special_sections): The .vectors
991 section is read-only.
992
993 2003-09-04 Nick Clifton <nickc@redhat.com>
994
995 * archures.c (bfd_mach_v850e1): Define.
996 * bfd-in2.h: Regenerate.
997 * cpu-v850.h (scan): Accept bfd_mach_v850e1.
998 (arch_info_struct): Include an entry for bfd_mach_v850e1.
999 * elf32-v850.c (v850_elf_object_p): Accept E_V850E1_ARCH flag.
1000 (v850_elf_final_write_processing): Accept bfd_mach_v850e1.
1001 (v850_elf_print_private_bfd_data): Interpret E_V850E1_ARCH flag.
1002 (v850_elf_merge_private_bfd_data): Allow v850e1 binaries to be
1003 linked with v850e binaries. Mark the output as v850e.
1004
1005 2003-09-03 Nick Clifton <nickc@redhat.com>
1006
1007 * cofflink.c (_bfd_coff_link_input_bfd): Do not skip section
1008 symbols that are used in relocs.
1009
1010 2003-08-30 Robert Millan <robertmh@gnu.org>
1011
1012 * configure.in: Match GNU/KFreeBSD with new kfreebsd*-gnu triplet.
1013 * config.bfd: Likewise.
1014 * configure: Regenerate.
1015
1016 2003-08-31 Christian Groessler <chris@groessler.org>
1017
1018 * elf32-i860.c (i860_howto_pc26_reloc): Finish relocation here
1019 instead of returning bfd_reloc_continue.
1020
1021 2003-08-31 Andreas Jaeger <aj@suse.de>
1022
1023 * merge.c: Update to ISO C90.
1024
1025 2003-08-27 Ian Lance Taylor <ian@airs.com>
1026
1027 * configure.in: Check for strtoull.
1028 * bfd.c (bfd_scan_vma): Use strtoull when available.
1029 * configure, config.in: Regenerate.
1030
1031 * configure.in: Define and substitute BFD_HOST_LONG_LONG.
1032 * bfd-in.h: Define BFD_HOST_LONG_LONG. Test it rather than
1033 __GNUC__ when deciding whether to use long long for
1034 BFD_HOST_64_BIT.
1035 * configure, Makefile.in, doc/Makefile.in, bfd-in2.h: Regenerate.
1036
1037 2003-08-27 Christian Groessler <chris@groessler.org>
1038
1039 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc,
1040 i860_howto_splitn_reloc, i860_howto_highadj_reloc): New
1041 functions.
1042 (elf32_i860_howto_table): Insert the new functions as
1043 'special_function's in the proper reloc type entries.
1044
1045 2003-08-27 Richard Sandiford <rsandifo@redhat.com>
1046
1047 * elf32-frv.c (elf32_frv_relocate_section): Use
1048 _bfd_elf_rela_local_sym.
1049
1050 2003-08-26 Michael Snyder <msnyder@redhat.com>
1051
1052 * cpu-frv.c: Remove unused enum.
1053
1054 2003-08-25 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
1055
1056 * reloc.c: Fix documentation for MIPS ELF relocations.
1057 libbfd.h: Regenerate.
1058 bfd-in2.h: Regenerate.
1059
1060 2003-08-24 Jason Eckhardt <jle@rice.edu>
1061
1062 * coff-i860.c (CALC_ADDEND): Define to be a no-op.
1063
1064 2003-08-24 Jason Eckhardt <jle@rice.edu>
1065
1066 * elf32-i860.c (elf32_i860_relocate_pc16): Subtract 4 and
1067 shift by 2 before storing the relocated value.
1068
1069 2003-08-23 Jason Eckhardt <jle@rice.edu>
1070
1071 * coff-i860.c (coff_i860_reloc_nyi): New function.
1072 (howto_table): Add entries for relocations PAIR, HIGHADJ, HIGH,
1073 LOWn, SPLITn, and BRADDR.
1074 (RTYPE2HOWTO): Check that the r_type is within the howto_table
1075 before trying to access the entry.
1076 (coff_i860_rtype_to_howto): Likewise.
1077 (coff_i860_reloc_type_lookup): New function.
1078 (i860_reloc_processing): New function.
1079 (coff_bfd_reloc_type_lookup): Define macro.
1080 (RELOC_PROCESSING): Define macro.
1081 Minor formatting adjustments.
1082
1083 2003-08-23 Alan Modra <amodra@bigpond.net.au>
1084
1085 * elflink.h (elf_link_add_object_symbols): Don't crash on NULL owner.
1086
1087 2003-08-22 H.J. Lu <hongjiu.lu@intel.com>
1088
1089 * elfxx-ia64.c (elfNN_ia64_create_dynamic_sections): Align the
1090 .got section at 8 bytes.
1091
1092 2003-08-21 Nick Clifton <nickc@redhat.com>
1093
1094 * cofflink.c: Update to ISO C90 and tidy up formatting.
1095
1096 2003-08-21 Randolph Chung <tausq@debian.org>
1097
1098 * elf32-hppa.c (elf32_hppa_object_p): For elf32-hppa-linux, objects
1099 can have OSABI=Linux or OSABI=SysV. Check for both.
1100 * elf64-hppa.c (elf64_hppa_object_p): Likewise.
1101
1102 2003-08-21 Nick Clifton <nickc@redhat.com>
1103
1104 * po/sv.po: Updated Swedish translation.
1105
1106 2003-08-20 Richard Sandiford <rsandifo@redhat.com>
1107
1108 * elf64-mips.c (elf_backend_copy_indirect_symbol): Define.
1109
1110 2003-08-20 Nick Clifton <nickc@redhat.com>
1111
1112 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): New macro used to
1113 replace some duplicated code in most elfxx-xxxx.c files. This
1114 version uses the new fields in bfd_link_info.
1115
1116 * elf-m10300.c (mn10300_elf_relocate_section): Use new macro.
1117 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
1118 * elf32-cris.c (cris_elf_relocate_section): Likewise.
1119 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
1120 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1121 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
1122 * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
1123 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1124 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1125 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1126 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1127 * elf32-vax.c (elf_vax_relocate_section): Likewise.
1128 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
1129 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
1130 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1131 * elf64-s390.c (elf_s390_relocate_section): Likewise.
1132 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1133 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1134 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
1135
1136 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols,
1137 elf_hppa_remark_useless_dynamic_symbols,
1138 elf_hppa_relocate_section): Use the new fields in
1139 bfd_link_info structure.
1140 * elf32-sh.c (sh_elf_relocate_section): Likewise.
1141 * elf64-alpha.c (elf64_alpha_check_relocs): Likewise.
1142 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
1143 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
1144 * elfxx-ia64.c (elfNN_ia64_check_relocs): Likewise.
1145 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
1146
1147 * elflink.h (elf_link_output_extsym): Fix test for reporting
1148 undefined symbols in shared libraries. Remove redundant test
1149 of shlib_undefined when reporting references to forced local
1150 symbols.
1151
1152 2003-08-18 Andreas Schwab <schwab@suse.de>
1153
1154 * libpei.h (bfd_pe_executable_p): Also recognize efi-app
1155 executables.
1156
1157 2003-08-17 Hans-Peter Nilsson <hp@bitrange.com>
1158
1159 * simple.c (bfd_simple_get_relocated_section_contents): Move
1160 reloc_done hack to before first bfd_section_size call. Change all
1161 returns to use new wrapper macro RETURN, restoring sec->reloc_done.
1162
1163 2003-08-16 Alan Modra <amodra@bigpond.net.au>
1164
1165 * elf64-ppc.c: Don't include elf/ppc.h.
1166
1167 2003-08-14 Richard Sandiford <rsandifo@redhat.com>
1168
1169 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Fix PT_DYNAMIC
1170 code to work with 64-bit bfds.
1171
1172 2003-08-14 Alan Modra <amodra@bigpond.net.au>
1173
1174 * dep-in.sed: Remove libintl.h.
1175 * Makefile.am (SRC-POTFILES.in, BLD-POTFILES.in): Unset LC_COLLATE.
1176 (POTFILES.in): Remove target.
1177 * Makefile.in: Regenerate.
1178
1179 2003-08-12 Alan Modra <amodra@bigpond.net.au>
1180
1181 * elf64-ppc.c (ppc64_elf_next_input_section): Update comment.
1182 (ppc64_elf_relocate_section): For zero sym R_PPC64_TOC relocs,
1183 use the function sym from the previous reloc.
1184
1185 2003-08-11 Jakub Jelinek <jakub@redhat.com>
1186
1187 * elf32-i386.c (elf_i386_relocate_section): Make undefined symbols
1188 fatal if -pie.
1189 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1190 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1191 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
1192 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1193 * elf64-s390.c (elf_s390_relocate_section): Likewise.
1194 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1195 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1196 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
1197 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1198 (ppc_elf_relocate_section) <case R_PPC_RELAX32>: Issue fatal error
1199 on undefined symbols if -pie.
1200 * elf32-sh.c (sh_elf_relocate_section): Likewise.
1201
1202 2003-08-11 Alan Modra <amodra@bigpond.net.au>
1203
1204 * elf64-ppc.c (ppc64_elf_relocate_section): Add special case for crt1.o
1205 branch to __libc_start_main.
1206
1207 2003-08-08 Dmitry Diky <diwil@mail.ru>
1208
1209 * archures.c: Add xW42 and xE42 parts. Sort MPU list according to
1210 gcc order.
1211 * cpu-msp430.c: Likewise.
1212 * elf32-msp430.c: Likewise.
1213 * bfd-in2.h: Regenerate.
1214
1215 2003-08-07 Alan Modra <amodra@bigpond.net.au>
1216
1217 * elfxx-target.h: Remove PTR cast.
1218 * targets.c (bfd_target): Make backend_data const void *.
1219 * elf-bfd.h: Constify all occurrences of struct elf_backend_data.
1220 * elf-m10300.c: Likewise.
1221 * elf.c: Likewise.
1222 * elf32-hppa.c: Likewise.
1223 * elf32-i386.c: Likewise.
1224 * elf32-m68hc1x.c: Likewise.
1225 * elf32-ppc.c: Likewise.
1226 * elf32-s390.c: Likewise.
1227 * elf32-sh.c: Likewise.
1228 * elf32-sh64.c: Likewise.
1229 * elf32-sparc.c: Likewise.
1230 * elf32-xtensa.c: Likewise.
1231 * elf64-mips.c: Likewise.
1232 * elf64-ppc.c: Likewise.
1233 * elf64-s390.c: Likewise.
1234 * elf64-sh64.c: Likewise.
1235 * elf64-sparc.c: Likewise.
1236 * elf64-x86-64.c: Likewise.
1237 * elfcode.h: Likewise.
1238 * elfcore.h: Likewise.
1239 * elflink.c: Likewise.
1240 * elflink.h: Likewise.
1241 * elfxx-ia64.c: Likewise.
1242 * elfxx-mips.c: Likewise.
1243 * elfxx-mips.h: Likewise.
1244 * elf.c (prep_headers): Remove useless check for null backend_data.
1245 * bfd-in2.h: Regenerate.
1246
1247 * elf-bfd.h: Remove PARAMS macro. Replace PTR with void *.
1248 (NAME): Use ## rather than CONCAT4 macro.
1249 * elfcode.h: Remove one remaining PARAMS macro.
1250 * elf-eh-frame.c: Convert to C90, remove unneeded casts and prototypes.
1251 * elf-strtab.c: Likewise.
1252 * elf-hppa.h: Likewise.
1253 * elf32-hppa.h: Likewise.
1254 * elf32-hppa.c: Likewise.
1255 (elf32_hppa_add_symbol_hook): Delete.
1256 (elf_backend_add_symbol_hook): Don't define.
1257 * libhppa.h: Convert to C90. Replace INLINE with inline.
1258
1259 2003-08-06 Alan Modra <amodra@bigpond.net.au>
1260
1261 * elf64-ppc.c (ppc_stub_name): Tweak names for better readability.
1262 (ppc64_elf_adjust_dynamic_symbol): Allow copy relocs against
1263 function descriptors, but warn.
1264 (ppc_build_one_stub): Remove a couple of vars. Move code creating
1265 stub syms so that we can avoid a stub sym if we already have a
1266 plt sym. Do not redefine an existing symbol.
1267 (ppc64_elf_build_stubs): When --emit-stub-syms, print a symbol for
1268 glink.
1269
1270 2003-08-06 Nick Clifton <nickc@redhat.com>
1271
1272 * po/fr.po: Updated French translation.
1273
1274 2003-08-06 Alan Modra <amodra@bigpond.net.au>
1275
1276 * elflink.c (_bfd_elf_create_dynamic_sections): Mark .dynbss with
1277 SEC_LINKER_CREATED.
1278
1279 2003-08-05 Daniel Jacobowitz <drow@mvista.com>
1280
1281 * elf32-arm.h (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
1282 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Use it.
1283
1284 2003-08-03 Jeff Muizelaar <muizelaar@rogers.com>
1285
1286 * coffcode.h (coff_slurp_line_table): Return with a warning
1287 message if the line number table could not be read.
1288
1289 2003-08-04 Nick Clifton <nickc@redhat.com>
1290
1291 * elflink.h (elf_link_add_object_symbols): Prepend "warning: "
1292 to messages produced for .gnu.warning.SYMBOL sections.
1293
1294 2003-08-04 Alan Modra <amodra@bigpond.net.au>
1295
1296 * elfcode.h: Convert to C90, remove unneeded casts and prototypes.
1297 * elfcore.h: Likewise.
1298 * elflink.c: Likewise.
1299 * elflink.h: Likewise.
1300 * elf.c (sym_is_global): Remove INLINE.
1301 (align_file_position): Replace INLINE with inline.
1302 * elfcode.h (elf_swap_dyn_in, elf_swap_dyn_out): Remove INLINE.
1303 (elf_file_p): Replace INLINE with inline.
1304
1305 2003-08-02 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1306
1307 * elf32-sh.c (sh_elf_check_relocs): Don't set DF_TEXTREL here.
1308
1309 2003-08-01 H.J. Lu <hongjiu.lu@intel.com>
1310
1311 * elfxx-ia64.c (get_got): Align the .got section at 8 bytes.
1312
1313 2003-08-01 H.J. Lu <hongjiu.lu@intel.com>
1314
1315 * elfxx-ia64.c (elfNN_ia64_finish_dynamic_symbol): Use
1316 ElfNN_External_Rela instead of Elf64_External_Rela.
1317
1318 2003-08-01 Nick Clifton <nickc@redhat.com>
1319
1320 * config.bfd: Add code to catch obsolete configurations and warn
1321 about them unless --enable-obsolete is used. Use this to mark
1322 vax-vms port as obsolete.
1323
1324 2003-07-30 Alan Modra <amodra@bigpond.net.au>
1325
1326 * elf32-ppc.c (ppc_elf_install_value): Tidy.
1327 (ppc_elf_relax_section): Remove dead code. Remove unnecessary casts.
1328 Formatting.
1329 * elfxx-target.h: Remove PARAMS macro. Formatting.
1330
1331 2003-07-30 Alan Modra <amodra@bigpond.net.au>
1332
1333 * elf.c (bfd_section_from_r_symndx): Test for SHN_UNDEF.
1334 * elf64-ppc.c (get_fdh): New function, split out from
1335 ppc64_elf_edit_opd.
1336 (ppc64_elf_check_relocs): Use get_fdh.
1337 (func_desc_adjust): Likewise. Tidy.
1338 (ppc64_elf_edit_opd): Tighten reloc checks. Free local_syms on error
1339 exit. Use get_fdh. Account for superfluous dynamic relocs.
1340 (ppc64_elf_relocate_section): Warning fix.
1341
1342 2003-07-30 Jason Eckhardt <jle@rice.edu>
1343
1344 * coff-i860.c: Convert to ISO C90. Remove superflous prototypes.
1345
1346 2003-07-30 Jason Eckhardt <jle@rice.edu>
1347
1348 * elf32-i860.c: Convert to ISO C90. Remove superflous prototypes.
1349
1350 2003-07-30 Randolph Chung <tausq@debian.org>
1351
1352 * elf-hppa.h (elf_hppa_relocate_section): Look up dyn_h for undefweak.
1353 * elf64-hppa.c (elf64_hppa_finalize_dlt): Check h->root.type.
1354
1355 2003-07-30 Alan Modra <amodra@bigpond.net.au>
1356
1357 * elf.c: Convert to C90, remove unnecessary prototypes and casts.
1358 Replace PTR with void *. Formatting.
1359 (_bfd_elf_assign_file_position_for_section): Remove INLINE.
1360 (make_mapping): Likewise.
1361
1362 2003-07-29 Alan Modra <amodra@bigpond.net.au>
1363
1364 * elf64-ppc.c (func_desc_adjust): Give linker created function
1365 descriptor symbols a size and type.
1366 (ppc64_elf_relocate_section): Correct lq insn test.
1367
1368 2003-07-28 Eric Christopher <echristo@redhat.com>
1369
1370 * elf32-ppc.c (R_PPC_RELAX32): New relocation.
1371 (ppc_elf_install_value): New function.
1372 (ppc_elf_sort_rela): Remove.
1373 (ppc_elf_relax_section): Rewrite. Remove old relaxation
1374 and replace with out of range branch stubs.
1375 (ppc_elf_relocate_section): Handle R_PPC_RELAX32.
1376
1377 2003-07-29 Alexandre Oliva <aoliva@redhat.com>
1378
1379 * elf-m10300.c (mn10300_elf_relax_section): Take symbol hash table
1380 from input_bfd.
1381
1382 2003-07-28 Alan Modra <amodra@bigpond.net.au>
1383
1384 * elf.c (special_sections): Set attributes for .got and .plt.
1385
1386 2003-07-27 Alan Modra <amodra@bigpond.net.au>
1387
1388 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Ensure no copy relocs
1389 on function descriptors.
1390 (ELIMINATE_COPY_RELOCS): Expand comment.
1391 (ppc64_elf_special_sections): Move. Don't include non-ppc64 sections.
1392 Do include ".toc1".
1393
1394 2003-07-25 H.J. Lu <hongjiu.lu@intel.com>
1395
1396 * elf.c (_bfd_elf_new_section_hook): Set the default section
1397 type to SHT_NULL.
1398 (elf_fake_sections): Set the section type based on asect->flags
1399 if it is SHT_NULL. Don't abort on processor specific section
1400 types.
1401
1402 2003-07-25 H.J. Lu <hongjiu.lu@intel.com>
1403
1404 * bfd-in2.h: Regenerated.
1405
1406 2003-07-25 H.J. Lu <hongjiu.lu@intel.com>
1407
1408 * elf-bfd.h (bfd_elf_special_section): New.
1409 (elf_backend_data): Add special_sections, a pointer to
1410 bfd_elf_special_section.
1411 (elf_section_type). New.
1412 (elf_section_flags): New.
1413 (_bfd_elf_get_sec_type_attr): New.
1414
1415 * elf.c (_bfd_elf_make_section_from_shdr): Always use the
1416 real section type/flags.
1417 (special_sections): New.
1418 (get_special_section): New.
1419 (_bfd_elf_get_sec_type_attr): New.
1420 (_bfd_elf_new_section_hook): Check special_section to set
1421 elf_section_type and elf_section_flags.
1422 (elf_fake_sections): Don't use section name to set ELF section
1423 data.
1424
1425 * elf32-m32r.c (m32r_elf_special_sections): New.
1426 (elf_backend_special_sections): Defined.
1427
1428 * elf32-m68hc11.c (elf32_m68hc11_special_sections): New.
1429 (elf_backend_special_sections): Defined.
1430
1431 * elf32-mcore.c (mcore_elf_special_sections): New.
1432 (elf_backend_special_sections): Defined.
1433
1434 * elf32-ppc.c (ppc_elf_special_sections): New.
1435 (elf_backend_special_sections): Defined.
1436
1437 * elf32-sh64.c (sh64_elf_special_sections): New.
1438 (elf_backend_special_sections): Defined.
1439
1440 * elf32-v850.c (v850_elf_special_sections): New.
1441 (elf_backend_special_sections): Defined.
1442
1443 * elf32-xtensa.c (elf_xtensa_special_sections): New.
1444 (elf_backend_special_sections): Defined.
1445
1446 * elf64-alpha.c (elf64_alpha_special_sections): New.
1447 (elf_backend_special_sections): Defined.
1448
1449 * elf64-hppa.c (elf64_hppa_special_sections): New.
1450 (elf_backend_special_sections): Defined.
1451
1452 * elf64-ppc.c (ppc64_elf_special_sections): New.
1453 (elf_backend_special_sections): Defined.
1454
1455 * elf64-sh64.c (sh64_elf64_special_sections): New.
1456 (elf_backend_special_sections): Defined.
1457
1458 * elfxx-ia64.c (elfNN_ia64_special_sections): New.
1459 (elf_backend_special_sections): Defined.
1460
1461 * elfxx-mips.c (_bfd_mips_elf_special_sections): New.
1462
1463 * elfxx-mips.h (_bfd_mips_elf_special_sections): New.
1464 (elf_backend_special_sections): Defined.
1465
1466 * elfxx-target.h (elf_backend_special_sections): New. Default
1467 to NULL.
1468 (elfNN_bed): Initialize special_sections.
1469
1470 * section.c (bfd_abs_section): Remove const.
1471 (bfd_und_section): Likewise.
1472 (bfd_com_section): Likewise.
1473 (bfd_ind_section): Likewise.
1474
1475 2003-07-24 Nick Clifton <nickc@redhat.com>
1476
1477 * coff-arm.c (EXTRA_S_FLAGS): Include SEC_CODE so that code
1478 sections are assigned the LOAD attribute.
1479
1480 2003-07-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1481
1482 * elf32-sh.c: Convert to C90. Replace PTR with void *.
1483 * elf32-sh64-com.c: Likewise.
1484 * elf32-sh64.c: Likewise.
1485 * elf32-sh64.h: Likewise.
1486 * elf64-sh64.c: Likewise.
1487
1488 2003-07-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1489
1490 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
1491 (allocate_dynrelocs): Likewise.
1492 (sh_elf_relocate_section): Likewise. Use SYMBOL_REFERENCES_LOCAL.
1493 (sh_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
1494
1495 2003-07-24 Nick Clifton <nickc@redhat.com>
1496
1497 * po/fr.po: Updated French translation.
1498
1499 2003-07-23 Bob Wilson <bob.wilson@acm.org>
1500
1501 * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Make inline and move
1502 near the beginning of the file. Swap order of arguments. Call
1503 _bfd_elf_dynamic_symbol_p with "ignore_protected" set to 0.
1504 (elf_xtensa_fix_refcounts): Adjust xtensa_elf_dynamic_symbol_p call.
1505 (elf_xtensa_relocate_section): Likewise.
1506 (shrink_dynamic_reloc_sections): Likewise.
1507
1508 2003-07-23 Bob Wilson <bob.wilson@acm.org>
1509
1510 * elf32-xtensa.c (plt_reloc_count): Fix typo in comment.
1511 (elf_xtensa_size_dynamic_sections): Use elf_discarded_section.
1512 (elf_xtensa_combine_prop_entries): Avoid returning non-zero without
1513 first printing an error message.
1514 (elf_xtensa_finish_dynamic_sections): Likewise.
1515 (elf_xtensa_discard_info_for_section): Adjust size of .got.loc when
1516 discarding literal table entries.
1517 (elf_xtensa_merge_private_bfd_data): Remove newline from error message.
1518 (elf_xtensa_do_asm_simplify): Likewise.
1519
1520 2003-07-23 Stephane Carrez <stcarrez@nerim.fr>
1521
1522 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Avoid crash when
1523 we have a local symbol in common section.
1524
1525 2003-07-22 H.J. Lu <hongjiu.lu@intel.com>
1526
1527 * elflink.c (_bfd_elf_dynamic_symbol_p): Don't return TRUE for
1528 weak symbols.
1529
1530 2003-07-22 Nick Clifton <nickc@redhat.com>
1531
1532 * coffcode.h (coff_slurp_symbol_table): Add C_TCSYM and C_ECOML to
1533 expected RS6000 storage classes.
1534
1535 2003-07-21 H.J. Lu <hongjiu.lu@intel.com>
1536
1537 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Mark
1538 output_bfd unused to silence gcc.
1539
1540 2003-07-21 Nick Clifton <nickc@redhat.com>
1541
1542 * po/sv.po: Updated Swedish translation.
1543
1544 2003-07-21 Alan Modra <amodra@bigpond.net.au>
1545
1546 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Use..
1547 (_bfd_elf_symbol_refs_local_p): ..this. Declare.
1548 * elflink.c (_bfd_elf_symbol_refs_local_p): New function.
1549 * elf32-i386.c (elf_i386_relocate_section): Remove h NULL test
1550 now done in _bfd_elf_symbol_refs_local_p.
1551 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1552 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1553 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1554
1555 2003-07-18 H.J. Lu <hongjiu.lu@intel.com>
1556
1557 * elflink.c (_bfd_elf_dynamic_symbol_p): Undo the last change.
1558
1559 2003-07-18 H.J. Lu <hongjiu.lu@intel.com>
1560
1561 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL): Fix a typo.
1562 (SYMBOL_CALLS_LOCAL): Likewise.
1563
1564 * elflink.c (_bfd_elf_dynamic_symbol_p): Return TRUE
1565 immediately if symbol isn't defined locally.
1566
1567 2003-07-18 Richard Henderson <rth@redhat.com>
1568
1569 * elflink.c (_bfd_elf_dynamic_symbol_p): New.
1570 * elf-bfd.h (_bfd_elf_dynamic_symbol_p): Declare it.
1571 (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Use it.
1572 * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Likewise.
1573 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
1574 * elf64-hppa.c (elf64_hppa_dynamic_symbol_p): Likewise.
1575 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Likewise.
1576 Update all callers to provide the relocation being resolved.
1577
1578 2003-07-17 Shaun Jackman <sjackman@pathwayconnect.com>
1579
1580 * config.bfd (arm-wince-pe): Add -DARM_COFF_BUGFIX to
1581 targ_cflags.
1582
1583 2003-07-17 Nick Clifton <nickc@redhat.com>
1584
1585 * po/es.po: New Spanish translation.
1586 * po/sv.po: New Swedish translation.
1587 * po/opcodes.pot: Regenerate.
1588
1589 2003-07-16 Richard Henderson <rth@redhat.com>
1590
1591 * config.bfd, configure.host, configure.in: Remove ia64-aix support.
1592 * elfxx-ia64.c, targets.c: Likewise.
1593
1594 2003-07-16 Richard Henderson <rth@redhat.com>
1595
1596 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Properly return false
1597 for symbols defined locally plus -Bsymbolic. Tidy logic.
1598
1599 2003-07-15 Richard Sandiford <rsandifo@redhat.com>
1600
1601 * archures.c (bfd_mach_mips7000): New.
1602 * bfd-in2.h: Regenerated.
1603 * cpu-mips.c (arch_info_struct): Add an entry for mips:7000.
1604 * elfxx-mips.c (mips_set_isa_flags): Handle bfd_mach_mips7000.
1605 (mips_mach_extensions): Add an entry for it.
1606
1607 2003-07-14 Nick Clifton <nickc@redhat.com>
1608
1609 * po/tr.po: Update with latest version.
1610 * po/SRC-POTFILES.in: Regenerate.
1611 * po/bfd.pot: Regenerate.
1612 * Makfile.in: Regenerate.
1613 * configure: Regenerate.
1614
1615 2003-07-12 Jeff Baker <jbaker@qnx.com>
1616
1617 * bfd/config.bfd (__QNXTARGET__): Define for Neutrino architectures.
1618 * bfd/elf32-arm.h (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1619 * bfd/elf32-sh.c (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1620 * bfd/elf32-ppc.c (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1621
1622 2003-07-12 Jeff Muizelaar <muizelaar@rogers.com>
1623
1624 * coffcode.h (coff_set_section_contents): Set the
1625 IMAGE_FILE_32BIT_MACHINE flag for PE targets.
1626
1627 2003-07-11 Richard Sandiford <rsandifo@redhat.com>
1628
1629 * bfd-in.h (bfd_h8300_pad_address): Declare.
1630 * bfd-in2.h: Regenerate.
1631 * cpu-h8300.c (bfd_h8300_pad_address): New function.
1632 * coff-h8300.c (h8300_reloc16_estimate): Use it to canonicalize
1633 addresses before checking whether they can be relaxed.
1634 (h8300_reloc16_extra_cases): Likewise for the R_MOVL2 sanity check.
1635 Don't complain about overflows in general 8-bit relocations.
1636 * elf32-h8300.c (elf32_h8_relax_section): Use bfd_h8300_pad_address.
1637 Fix handling of R_H8_DIR24A8.
1638
1639 2003-07-11 Richard Sandiford <rsandifo@redhat.com>
1640
1641 * elf32-h8300.c: Convert function prototypes and definitions
1642 to C90 syntax.
1643 * coff-h8300.c: Likewise.
1644 * cpu-h8300.c: Likewise.
1645
1646 2003-07-11 Alan Modra <amodra@bigpond.net.au>
1647
1648 * po/SRC-POTFILES.in: Regenerate.
1649 * po/bfd.pot: Likewise.
1650
1651 2003-07-10 Bob Wilson <bob.wilson@acm.org>
1652
1653 * elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Create new
1654 .got.loc section. Do not set SEC_ALLOC or SEC_LOAD flags for the
1655 .xt.lit.plt section.
1656 (elf_xtensa_size_dynamic_sections): Set size of the .got.loc section
1657 and allocate memory for it.
1658 (elf_xtensa_combine_prop_entries): Copy contents of .xt.lit output
1659 section to the .got.loc section.
1660 (elf_xtensa_finish_dynamic_sections): Fix up call to
1661 elf_xtensa_combine_prop_entries and set DT_XTENSA_GOT_LOC_OFF to
1662 the address of .got.loc.
1663 (relax_property_section): Shrink .got.loc to match changes in any
1664 literal table section.
1665 (xtensa_is_property_section): Change to match
1666 xtensa_get_property_section_name.
1667 (xtensa_is_littable_section): New.
1668
1669 2003-07-10 H.J. Lu <hongjiu.lu@intel.com>
1670
1671 * elfxx-ia64.c (IA64_HOWTO): Set dst_mask to -1 instead of
1672 -1LL.
1673
1674 2003-07-10 Alan Modra <amodra@bigpond.net.au>
1675
1676 * Makefile.am (BFD32_BACKENDS): Add elf32-am33lin.lo.
1677 (BFD32_BACKENDS_CFILES): elf32-am33lin.c not elf32-am33lin.lo.
1678 Run "make dep-am".
1679 * Makefile.in: Regenerate.
1680
1681 2003-07-10 Alexandre Oliva <aoliva@redhat.com>
1682
1683 2001-09-12 Alexandre Oliva <aoliva@redhat.com>
1684 * elf32-am33lin.c (ELF_MACHINE_CODE): Redefine to EM_MN10300.
1685 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10300.
1686 2001-06-02 Nick Clifton <nickc@cambridge.redhat.com>
1687 * elf32-am33lin.c: Rename global functions.
1688 2001-05-09 Alexandre Oliva <aoliva@redhat.com>
1689 * config.bfd (am33_2.0, am33_2.0-*-linux*): Added.
1690 * configure.in (bfd_elf32_am33lin_vec): Added.
1691 * Makefile.am (BFD32_BACKENDS): Added elf32-am33lin.lo.
1692 (elf32-am33lin.lo): List dependencies.
1693 * aclocal.m4, configure, Makefile.in: Rebuilt.
1694 * elf-m10300.c (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME,
1695 ELF_ARCH, ELF_MACHINE_CODE, ELF_MAXPAGESIZE): Define only if
1696 ELF_ARCH was not defined before.
1697 (elf_symbol_leading_char): Define if not defined.
1698 * elf32-am33lin.c: Override the definitions above.
1699 * targets.c (bfd_elf32_am33lin_vec): New.
1700
1701 2003-07-09 Alexandre Oliva <aoliva@redhat.com>
1702
1703 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
1704 * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Initialize
1705 pcrel_relocs_copied.
1706 2001-12-13 Alexandre Oliva <aoliva@redhat.com>
1707 * elf-m10300.c (ELF_DYNAMIC_INTERPRETER): Renamed from
1708 ld-linux.so.2 to ld.so.1.
1709 2001-10-10 Alexandre Oliva <aoliva@redhat.com>
1710 * elf-m10300.c (elf_mn10300_sizeof_plt0): New macro.
1711 (_bfd_mn10300_elf_adjust_dynamic_symbol): Use it.
1712 (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
1713 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Allocate
1714 .rela.* section contents with bfd_zalloc.
1715 2001-09-25 Alexandre Oliva <aoliva@redhat.com>
1716 * elf-m10300.c: Added declarations for functions missing them.
1717 Merge some shared-library changes from the i386 back-end. Use
1718 R_MN10300_RELATIVE instead of R_MN10300_PCREL32 and
1719 R_MN10300_GLOB_DAT instead of R_MN10300_32 where appropriate.
1720 (struct elf32_mn10300_link_hash_entry): Remove duplicates of
1721 members of elf_link_hash_entry. Adjusted references.
1722 (mn10300_elf_final_link_relocate): dynobj was already loaded
1723 into a local variable, use it.
1724 2001-09-21 Nick Clifton <nickc@cambridge.redhat.com>
1725 * elf-m10300.c: Add missing function prototypes.
1726 2001-08-24 Alexandre Oliva <aoliva@redhat.com>
1727 * elf-m10300.c (mn10300_elf_relocate_section): Don't compute
1728 relocation for dynamic relocations.
1729 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
1730 * reloc.c (BFD_RELOC_MN10300_GOTOFF24): New.
1731 * elf-m10300.c: Introduce GOTPC16, GOTOFF24, GOTOFF16 and
1732 PLT16, and rename GOTPC to GOTPC32 and GOTOFF to GOTOFF32.
1733 (_bfd_mn10300_elf_create_dynamic_sections): Move creation ot PLT...
1734 (_bfd_mn10300_elf_create_got_section): ... here, so that its
1735 adress is already known at the time we compute relaxations.
1736 (mn10300_elf_relax_section): Relax GOTPC32, GOTOFF32, GOT32
1737 and PLT32 to narrower relocations.
1738 * libbfd.h, bfd-in2.h: Rebuilt.
1739 2001-04-12 Alexandre Oliva <aoliva@redhat.com>
1740 * reloc.c (BFD_RELOC_MN10300_GOT32, BFD_RELOC_MN10300_GOT24,
1741 BFD_RELOC_MN10300_GOT16, BFD_RELOC_MN10300_COPY,
1742 BFD_RELOC_MN10300_GLOB_DAT, BFD_RELOC_MN10300_JMP_SLOT,
1743 BFD_RELOC_MN10300_RELATIVE): New relocs.
1744 * libbfd.h, bfd-in2.h: Rebuilt.
1745 * elf-m10300.c (struct elf_mn10300_pcrel_relocs_copied): New.
1746 (struct elf32_mn10300_link_hash_entry): Added DSO-related
1747 fields.
1748 (elf_mn10300_howto): Defined new relocation types.
1749 (mn10300_reloc_map): Map them.
1750 (_bfd_mn10300_elf_create_got_section): New fn.
1751 (mn10300_elf_check_relocs): Handle PIC relocs.
1752 (mn10300_elf_final_link_relocate): Likewise.
1753 (mn10300_elf_relocate_section): Handle DSOs.
1754 (PLT0_ENTRY_SIZE, PLT_ENTRY_SIZE, PIC_PLT_ENTRY_SIZE): New macros.
1755 (elf_mn10300_plt0_entry, elf_mn10300_plt_entry,
1756 elf_mn10300_pic_plt_entry): New.
1757 (elf_mn10300_sizeof_plt, elf_mn10300_plt_plt0_offset,
1758 elf_mn10300_plt0_linker_offset, elf_mn10300_plt0_gotid_offset,
1759 elf_mn10300_plt_temp_offset, elf_mn10300_plt_symbol_offset,
1760 elf_mn10300_plt_reloc_offset: New macros.
1761 (ELF_DYNAMIC_INTERPRETER): Likewise.
1762 (_bfd_mn10300_elf_create_dynamic_sections): New function.
1763 (_bfd_mn10300_elf_adjust_dynamic_symbol): Likewise.
1764 (_bfd_mn10300_elf_discard_copies): Likewise.
1765 (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
1766 (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
1767 (_bfd_mn10300_elf_finish_dynamic_sections): Likewise.
1768 (elf_backend_can_gc_sections,
1769 elf_backend_create_dynamic_sections,
1770 elf_backend_adjust_dynamic_sections,
1771 elf_backend_size_dynamic_sections,
1772 elf_backend_finish_dynamic_symbol,
1773 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
1774 elf_backend_plt_readonly, elf_backend_want_plt_sym,
1775 elf_backend_got_header_size, elf_backend_plt_header_size): New
1776 macros.
1777
1778 2003-07-09 Alexandre Oliva <aoliva@redhat.com>
1779
1780 2001-05-06 Alexandre Oliva <aoliva@redhat.com>
1781 * elf-m10300.c (compute_function_info): Account for AM33
1782 registers in `movm' when computing stack space for `call' when
1783 linking for AM33/2.0 link.
1784 2000-04-01 Alexandre Oliva <aoliva@cygnus.com>
1785 * archures.c (bfd_mach_am33_2): Renamed from bfd_mach_am332.
1786 * bfd-in2.h: Rebuilt.
1787 * cpu-m10300.c (bfd_am33_2_arch): Renamed from bfd_am332_arch.
1788 * elf-m10300.c: Updated.
1789 2000-03-31 Alexandre Oliva <aoliva@cygnus.com>
1790 * archures.c (bfd_mach_am332): Defined.
1791 * bfd-in2.h: Rebuilt.
1792 * cpu-m10300.c (bfd_am332_arch): Defined.
1793 (bfd_am33_arch): Chained with am33-2.
1794 * elf-m10300.c (elf_mn10300_mach): Handle am332.
1795 (_bfd_mn10300_elf_final_write_processing): Likewise.
1796
1797 2003-07-09 H.J. Lu <hongjiu.lu@intel.com>
1798
1799 * elfxx-ia64.c (IA64_HOWTO): Set dst_mask to -1LL.
1800
1801 2003-07-10 Alan Modra <amodra@bigpond.net.au>
1802
1803 * elf64-ppc.c (bfd_elf64_mkobject): Define.
1804 (struct ppc64_elf_obj_tdata): New.
1805 (ppc64_elf_tdata, ppc64_tlsld_got): Define.
1806 (ppc64_elf_mkobject): New function.
1807 (struct got_entry): Add "owner". Move "tls_type".
1808 (struct ppc_link_hash_table): Delete "relgot", "tlsld_got".
1809 (ppc64_elf_init_stub_bfd): New function.
1810 (create_got_section): Create header .got in dynobj. Create .got
1811 and .rela.got in each bfd. Stash pointers in ppc64_elf_obj_tdata.
1812 (ppc64_elf_create_dynamic_sections): Don't call create_got_section.
1813 Look for dynobj .got, and test it.
1814 (ppc64_elf_copy_indirect_symbol): Adjust for changed got.
1815 (update_local_sym_info): Likewise.
1816 (ppc64_elf_check_relocs): Likewise.
1817 (ppc64_elf_gc_sweep_hook): Likewise.
1818 (ppc64_elf_tls_optimize): Likewise.
1819 (allocate_dynrelocs): Likewise.
1820 (ppc64_elf_size_dynamic_sections): Likewise.
1821 (ppc64_elf_relocate_section): Likewise.
1822 (ppc64_elf_next_toc_section): Update comment.
1823 (toc_adjusting_stub_needed): Remove unneeded cast.
1824 (ppc64_elf_build_stubs): Check for stub sections in stub bfd by
1825 testing section flags.
1826 (ppc64_elf_build_stubs): Likewise.
1827 (ppc64_elf_size_stubs): Likewise. Remove stub_bfd param.
1828 (ppc64_elf_finish_dynamic_sections): Write out got sections.
1829 (func_desc_adjust): Copy over dynamic info for undef weaks.
1830 * elf64-ppc.h (ppc64_elf_init_stub_bfd): Declare.
1831 (ppc64_elf_size_stubs): Update prototype.
1832 * elflink.h (elf_link_sort_relocs): Use link_orders to find reldyn
1833 input sections rather than scanning dynobj.
1834
1835 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
1836
1837 * elfxx-mips.c (mips_elf_link_hash_entry): Remove min_dyn_reloc_index.
1838 (bfd_mips_elf_swap_msym_in, bfd_mips_elf_swap_msym_out): Delete.
1839 (mips_elf_create_msym_section): Delete.
1840 (mips_elf_create_dynamic_relocation): Don't set min_dyn_reloc_index.
1841 (_bfd_mips_elf_copy_indirect_symbol): Likewise.
1842 (_bfd_mips_elf_create_dynamic_sections): Don't create .msym.
1843 (_bfd_mips_elf_size_dynamic_sections): Don't calculate its size.
1844 (_bfd_mips_elf_size_dynamic_sections): Don't add DT_MIPS_MSYM.
1845 (_bfd_mips_elf_finish_dynamic_symbol): Don't add symbols to .msym.
1846 (_bfd_mips_elf_finish_dynamic_sections): Likewise.
1847
1848 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
1849
1850 * elfxx-mips.c (mips_elf_irix6_finish_dynamic_symbol): Make the
1851 symbols protected.
1852
1853 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
1854
1855 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Fix handling
1856 of relocations whose offset is -2.
1857
1858 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
1859
1860 * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): Treat
1861 forced-local symbols like other locals. Don't create relocations
1862 against STN_UNDEF in irix objects.
1863
1864 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
1865
1866 * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): In SGI-
1867 compatible objects, add the values of defined external symbols
1868 to the addend.
1869
1870 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
1871
1872 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Always
1873 initialize a GOT entry to the symbol's st_value.
1874
1875 2003-07-08 Alan Modra <amodra@bigpond.net.au>
1876
1877 * elf-bfd.h (struct elf_obj_tdata): Move linker_section_pointers..
1878 * elf32-ppc.c (struct ppc_elf_obj_tdata): ..to here. New.
1879 (ppc_elf_tdata): Define.
1880 (elf_local_ptr_offsets): Adjust.
1881 (ppc_elf_mkobject): New function.
1882 (bfd_elf32_mkobject): Define.
1883
1884 * elfcode.h (elf_object_p): Allocate tdata via _bfd_set_format.
1885 * elfcore.h (elf_core_file_p): Likewise.
1886 * section.c (bfd_section_init): Remove prototype.
1887
1888 2003-07-08 Alan Modra <amodra@bigpond.net.au>
1889
1890 * elf-bfd.h (struct elf_link_hash_entry): Remove linker_section_pointer
1891 field.
1892 (enum elf_linker_section_enum): Delete.
1893 (struct elf_linker_section): Delete.
1894 (struct elf_linker_section_pointers): Delete.
1895 (struct elf_obj_tdata): Remove #if 0 chunk. Remove linker_section.
1896 Make linker_section_pointers a void**.
1897 (elf_local_ptr_offsets, elf_linker_section): Don't define.
1898 * elf32-ppc.c (enum elf_linker_section_enum): New, cut-down version
1899 of old item in elf-bfd.h.
1900 (struct elf_linker_section): Likewise.
1901 (struct elf_linker_section_pointers): Likewise.
1902 (elf_local_ptr_offsets): Define.
1903 (struct ppc_elf_link_hash_entry): Add linker_section_pointer.
1904 (ppc_elf_link_hash_newfunc): Init it.
1905 (struct ppc_elf_link_hash_table): Add sbss.
1906 (ppc_elf_link_hash_table_create): zmalloc rather than clearing
1907 individual fields.
1908 (elf_create_linker_section): Fold into..
1909 (ppc_elf_create_linker_section): ..here. Remove hole_size code.
1910 Make rela section here if shared.
1911 (elf_find_pointer_linker_section): Pass lsect rather than enum.
1912 (elf_create_pointer_linker_section): Adjust. zalloc rather than
1913 clearing in a loop.
1914 (elf_finish_pointer_linker_section): Adjust. Don't make rela
1915 section here.
1916 (ppc_elf_check_relocs): Adjust.
1917 (ppc_elf_add_symbol_hook): Tighten hash creator test. Remove code
1918 creating .sbss by hand.
1919 * elf.c (_bfd_elf_link_hash_newfunc): Adjust.
1920
1921 2003-07-04 Jakub Jelinek <jakub@redhat.com>
1922
1923 * elf32-s390.c (elf_howto_table): Change R_390_GOT12 to
1924 complain_overflow_bitfield.
1925 * elf64-s390.c (elf_howto_table): Change R_390_GOT12 to
1926 complain_overflow_bitfield.
1927
1928 2003-07-04 Jakub Jelinek <jakub@redhat.com>
1929
1930 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Return
1931 true even if -pie.
1932
1933 2003-07-04 Jakub Jelinek <jakub@redhat.com>
1934
1935 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add rel_fptr_sec.
1936 (elfNN_ia64_dynamic_symbol_p): Change info->shared into
1937 !info->executable.
1938 (get_fptr): For -pie create .opd as writable section and create
1939 .rela.opd as well.
1940 (elfNN_ia64_check_relocs): Change info->shared into
1941 !info->executable.
1942 (allocate_fptr): Likewise.
1943 (allocate_dynrel_entries): Account for a relative reloc for -pie
1944 @fptr(). Don't account for a relative reloc if -pie want_ltoff_fptr
1945 for undefweak symbol. Account for an IPLT reloc in .rela.opd
1946 section if -pie.
1947 (set_got_entry): Don't create a relative reloc if -pie
1948 want_ltoff_fptr for undefweak symbol.
1949 (set_fptr_entry): Emit an IPLT reloc in .rela.opd for -pie.
1950 (elfNN_ia64_relocate_section): Emit a relative reloc for -pie
1951 @fptr().
1952
1953 * elfxx-ia64.c (elfNN_ia64_relocate_section): Issue undefined_symbol
1954 even if -pie.
1955 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1956 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1957 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1958 * elf64-s390.c (elf_s390_relocate_section): Likewise.
1959 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1960 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
1961 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1962 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1963 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1964
1965 2003-07-04 Paul Clarke <paulc@senet.com.au>
1966
1967 * elf32-h8300.c (R_H8_DIR32A16): Fix name field.
1968 (elf32_h8_relax_section) <R_H8_DIR16A8>: Adjust position of relocation.
1969 <R_H8_DIR32A16>: Fix type of relocation.
1970
1971 2003-07-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1972
1973 * elf32-sh.c (sh_elf_create_dynamic_sections): Return if dynamic
1974 sections were created already. Remove unnecessary tests of
1975 the previous change.
1976
1977 2003-07-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1978
1979 * elf32-sh.c (sh_elf_create_dynamic_sections): Don't call
1980 bfd_make_section for existing sections.
1981
1982 2003-07-04 Alan Modra <amodra@bigpond.net.au>
1983
1984 * elf32-sparc.c (elf32_sparc_check_relocs): Don't call
1985 create_got_section if we already have done so.
1986 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
1987 (sh_elf_check_relocs): Likewise.
1988 (sh_elf_adjust_dynamic_symbol): Delete "dynobj" var. Use
1989 htab->root.dynobj instead.
1990 (sh_elf_check_relocs): Likewise.
1991 (sh_elf_finish_dynamic_sections): Likewise.
1992
1993 * section.c (bfd_make_section): Return NULL for existing section.
1994
1995 2003-07-04 Alan Modra <amodra@bigpond.net.au>
1996
1997 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Don't call
1998 ppc_elf_create_got if we've already done so.
1999
2000 * elf-bfd.h (_bfd_elf_create_linker_section) Don't declare.
2001 (_bfd_elf_find_pointer_linker_section): Likewise.
2002 (bfd_elf32_create_pointer_linker_section): Likewise.
2003 (bfd_elf32_finish_pointer_linker_section): Likewise.
2004 (bfd_elf64_create_pointer_linker_section): Likewise.
2005 (bfd_elf64_finish_pointer_linker_section): Likewise.
2006 (_bfd_elf_make_linker_section_rela): Likewise.
2007 * elfcode.h (elf_create_pointer_linker_section): Don't define.
2008 (elf_finish_pointer_linker_section): Likewise.
2009 * elflink.c (_bfd_elf_make_linker_section_rela): Delete.
2010 (_bfd_elf_create_linker_section): Move this function..
2011 (_bfd_elf_find_pointer_linker_section): ..and this..
2012 * elflink.h (elf_create_pointer_linker_section): ..and this..
2013 (elf_finish_pointer_linker_section): ..and this..
2014 * elf32-ppc.c: ..to here, renaming to the following, and adjusting
2015 calls.
2016 (elf_create_linker_section): Convert to C90, tidy.
2017 (elf_find_pointer_linker_section): Likewise.
2018 (elf_create_pointer_linker_section): Likewise.
2019 (elf_finish_pointer_linker_section): Likewise.
2020 * elf32-i370.c: Delete #if 0 code.
2021
2022 2003-07-02 Alan Modra <amodra@bigpond.net.au>
2023
2024 * elf64-ppc.c (ppc64_elf_func_desc_adjust): Don't allow _savef* and
2025 _restf* to be satisfied by shared libs, and always force them local.
2026 (toc_adjusting_stub_needed): Avoid scanning linker created sections.
2027 Correct test for "bl".
2028 (ppc64_elf_relocate_section <R_PPC64_TLS>): Correct test for
2029 primary opcode 31.
2030
2031 2003-07-01 Martin Schwidefsky <schwidefsky@de.ibm.com>
2032
2033 * elf32-s390.c (s390_elf_ldisp_reloc): New prototype.
2034 (s390_tls_reloc): New function.
2035 (elf_howto_table): Add long displacement relocations R_390_20,
2036 R_390_GOT20, R_390_GOTPLT20 and R_390_TLS_GOTIE20.
2037 (elf_s390_reloc_type_lookup): Likewise.
2038 (elf_s390_check_relocs): Likewise.
2039 (elf_s390_gc_sweep_hook): Likewise.
2040 (elf_s390_relocate_section): Likewise.
2041 * elf64-s390.c: Same changes as for elf32-s390.c.
2042 * reloc.c: Add long displacement relocations BFD_RELOC_390_20,
2043 BFD_RELOC_390_GOT20, BFD_RELOC_390_GOTPLT20 and
2044 BFD_RELOC_390_TLS_GOTIE20.
2045 * bfd-in2.h: Regenerate.
2046 * libbfd.h: Likewise.
2047
2048 2003-06-30 Alan Modra <amodra@bigpond.net.au>
2049
2050 * cpu-ia64-opc.c (ext_imms_scaled): Don't sign extend using shifts.
2051 (ins_imms, ins_immsm1u4): Likewise. Warning fix.
2052
2053 2003-06-29 Alan Modra <amodra@bigpond.net.au>
2054
2055 * archive.c: Convert to C90, remove unnecessary prototypes and casts.
2056 Replace PTR with void *. Formatting.
2057 * archive64.c: Likewise.
2058 * archures.c: Likewise.
2059 * bfd-in.h: Likewise.
2060 * bfd.c: Likewise.
2061 * bfdio.c: Likewise.
2062 * bfdwin.c: Likewise.
2063 * cache.c: Likewise.
2064 * corefile.c: Likewise.
2065 * format.c: Likewise.
2066 * init.c: Likewise.
2067 * libbfd-in.h: Likewise.
2068 * libbfd.c: Likewise.
2069 * linker.c: Likewise.
2070 * opncls.c: Likewise.
2071 * reloc.c: Likewise.
2072 * section.c: Likewise.
2073 * simple.c: Likewise.
2074 * syms.c: Likewise.
2075 * targets.c: Likewise.
2076 * bfd-in2.h: Regenerate.
2077 * libbfd.h: Regenerate.
2078
2079 * ecoff.c (bfd_debug_section): Add missing kept_section initialization.
2080 * libbfd-in.h (_bfd_sh_align_load_span): Don't declare if defined.
2081 * libbfd.c (COERCE32, EIGHT_GAZILLION): Simplify.
2082 (bfd_getb64): Rewrite without parens.
2083 (bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
2084 * cache.c (insert, snip): Remove INLINE.
2085 * linker.c (bfd_link_add_undef): Likewise.
2086
2087 2003-06-29 Andreas Jaeger <aj@suse.de>
2088
2089 * elf64-x86-64.c: Convert to ISO C90 prototypes, remove
2090 unnecessary prototypes. Replace PTR with void *.
2091 (elf64_x86_64_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL to
2092 trim plt entries. Move undefweak non-default visibility test ...
2093 (allocate_dynrelocs): ... from here.
2094 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
2095 Change all callers.
2096 (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL. Use
2097 SYMBOL_REFERENCES_LOCAL for dynreloc check.
2098 (elf64_x86_64_relocate_section): Use SYMBOL_CALLS_LOCAL for
2099 dynreloc and .got relocs.
2100 (elf64_x86_64_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL
2101 for .got relocs.
2102
2103 2003-06-29 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2104
2105 * elfxx-mips.c: Allow lazy binding for R_MIPS_JALR.
2106
2107 2003-06-27 Nick Clifton <nickc@redhat.com>
2108
2109 * opncls.c (bfd_add_gnu_debuglink_section): Rename to
2110 bfd_add_gnu_debuglink_section and only create the section, do not
2111 fill in its contents.
2112 (bfd_fill_in_gnu_debuglink_section): New function. Fill in the
2113 contents of a .gnu-debuglink section.
2114 * bfd-in2.h: Regenerate.
2115
2116 2003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2117
2118 * elfxx-mips.c: Revert .got alignment to 2**4.
2119
2120 2003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2121
2122 * elf32-mips.c: Fix addend for _gp_disp special symbol.
2123
2124 2003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2125
2126 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Remove non-default
2127 relocation header setup.
2128
2129 2003-06-25 Alan Modra <amodra@bigpond.net.au>
2130
2131 * elf32-ppc.c (ppc_elf_howto_table): Remove unnecessary cast.
2132 (ppc_elf_reloc_type_lookup): Modify comment.
2133 (ppc_elf_info_to_howto): Ditto.
2134 (ppc_elf_relocate_section): Ditto.
2135 (ppc_elf_check_relocs): Call ppc_elf_howto_init.
2136
2137 2003-06-25 Alan Modra <amodra@bigpond.net.au>
2138
2139 * aout-ns32k.c: Correct spelling of "relocatable".
2140 * aoutx.h: Likewise.
2141 * bfd-in.h: Likewise.
2142 * bfd.c: Likewise.
2143 * bout.c: Likewise.
2144 * coff-a29k.c: Likewise.
2145 * coff-alpha.c: Likewise.
2146 * coff-arm.c: Likewise.
2147 * coff-i386.c: Likewise.
2148 * coff-i860.c: Likewise.
2149 * coff-i960.c: Likewise.
2150 * coff-m68k.c: Likewise.
2151 * coff-m88k.c: Likewise.
2152 * coff-mcore.c: Likewise.
2153 * coff-mips.c: Likewise.
2154 * coff-or32.c: Likewise.
2155 * coff-ppc.c: Likewise.
2156 * coff-rs6000.c: Likewise.
2157 * coff-sh.c: Likewise.
2158 * coff-tic80.c: Likewise.
2159 * coff64-rs6000.c: Likewise.
2160 * cofflink.c: Likewise.
2161 * cpu-ns32k.c: Likewise.
2162 * ecoff.c: Likewise.
2163 * ecofflink.c: Likewise.
2164 * elf-bfd.h: Likewise.
2165 * elf-eh-frame.c: Likewise.
2166 * elf-hppa.h: Likewise.
2167 * elf-m10200.c: Likewise.
2168 * elf-m10300.c: Likewise.
2169 * elf.c: Likewise.
2170 * elf32-arm.h: Likewise.
2171 * elf32-avr.c: Likewise.
2172 * elf32-cris.c: Likewise.
2173 * elf32-d10v.c: Likewise.
2174 * elf32-dlx.c: Likewise.
2175 * elf32-fr30.c: Likewise.
2176 * elf32-frv.c: Likewise.
2177 * elf32-h8300.c: Likewise.
2178 * elf32-hppa.c: Likewise.
2179 * elf32-i370.c: Likewise.
2180 * elf32-i386.c: Likewise.
2181 * elf32-i860.c: Likewise.
2182 * elf32-i960.c: Likewise.
2183 * elf32-ip2k.c: Likewise.
2184 * elf32-iq2000.c: Likewise.
2185 * elf32-m32r.c: Likewise.
2186 * elf32-m68hc11.c: Likewise.
2187 * elf32-m68hc1x.c: Likewise.
2188 * elf32-m68k.c: Likewise.
2189 * elf32-mcore.c: Likewise.
2190 * elf32-mips.c: Likewise.
2191 * elf32-msp430.c: Likewise.
2192 * elf32-openrisc.c: Likewise.
2193 * elf32-ppc.c: Likewise.
2194 * elf32-s390.c: Likewise.
2195 * elf32-sh.c: Likewise.
2196 * elf32-sh64.c: Likewise.
2197 * elf32-sparc.c: Likewise.
2198 * elf32-v850.c: Likewise.
2199 * elf32-vax.c: Likewise.
2200 * elf32-xstormy16.c: Likewise.
2201 * elf32-xtensa.c: Likewise.
2202 * elf64-alpha.c: Likewise.
2203 * elf64-hppa.c: Likewise.
2204 * elf64-mips.c: Likewise.
2205 * elf64-mmix.c: Likewise.
2206 * elf64-ppc.c: Likewise.
2207 * elf64-s390.c: Likewise.
2208 * elf64-sh64.c: Likewise.
2209 * elf64-sparc.c: Likewise.
2210 * elf64-x86-64.c: Likewise.
2211 * elfcode.h: Likewise.
2212 * elflink.h: Likewise.
2213 * elfn32-mips.c: Likewise.
2214 * elfxx-ia64.c: Likewise.
2215 * elfxx-mips.c: Likewise.
2216 * i386linux.c: Likewise.
2217 * ieee.c: Likewise.
2218 * libcoff-in.h: Likewise.
2219 * linker.c: Likewise.
2220 * m68klinux.c: Likewise.
2221 * pdp11.c: Likewise.
2222 * pe-mips.c: Likewise.
2223 * peXXigen.c: Likewise.
2224 * reloc.c: Likewise.
2225 * reloc16.c: Likewise.
2226 * sparclinux.c: Likewise.
2227 * sunos.c: Likewise.
2228 * syms.c: Likewise.
2229 * versados.c: Likewise.
2230 * vms.c: Likewise.
2231 * xcofflink.c: Likewise.
2232 * bfd-in2.h: Regenerate.
2233 * libcoff.h: Regenerate.
2234 * libbfd.h: Regenerate.
2235
2236 2003-06-24 Alan Modra <amodra@bigpond.net.au>
2237
2238 * elf32-ppc.c (ppc_elf_check_relocs): Report plt reloc against
2239 local sym errors.
2240
2241 * elf32-i386.c: Convert to C90 function definitions, remove unnecessary
2242 prototypes and casts. Replace PTR with void *. Formatting.
2243 * elf32-ppc.c: Likewise. Break long strings too.
2244 (ppc_elf_relax_section): Use enum elf_ppc_reloc_type for r_type.
2245 (ppc_elf_unhandled_reloc): Internationalize error message.
2246 * elf32-ppc.h: Remove PARAMS.
2247
2248 2003-06-23 Mark Mitchell <mark@codesourcery.com>
2249
2250 * elf32-ppc.c (ppc_elf_begin_write_processing): Use bytes to count
2251 APUinfo slots.
2252 (ppc_elf_final_write_processing): Likewise.
2253
2254 2003-06-23 H.J. Lu <hongjiu.lu@intel.com>
2255
2256 * elflink.h (elf_link_input_bfd): Check raw size when using
2257 kept_section to preserve debug information discarded by
2258 linkonce.
2259
2260 2003-06-20 Alan Modra <amodra@bigpond.net.au>
2261
2262 * elf64-ppc.c (struct ppc_link_hash_table): Add top_id.
2263 (ppc64_elf_setup_section_lists): Set it.
2264 (ppc64_elf_relocate_section): Check sym section id against top_id.
2265 (ppc_build_one_stub): Comment on top_id.
2266
2267 2003-06-20 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
2268
2269 * config.bfd: Add tic4x-*-rtems*.
2270
2271 2003-06-20 Alan Modra <amodra@bigpond.net.au>
2272
2273 * elf64-ppc.c: Convert to C90 function definitions, remove unnecessary
2274 prototypes and casts. Replace PTR with void *. Format copyright.
2275 Mention ABI links.
2276 (struct ppc_link_hash_table): Rename sgot, srelgot, splt, srelplt,
2277 sdynbss, srelbss, sglink, sbrlt and srelbrlt to got, relgot .. relbrlt.
2278 (ppc_type_of_stub): Make r_type an enum.
2279 (ppc64_elf_size_stubs): Likewise.
2280 * elf64-ppc.h: Remove PARAMS macro.
2281
2282 2003-06-19 Alan Modra <amodra@bigpond.net.au>
2283
2284 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Reinstate init of
2285 elf hash tab fields.
2286
2287 * elf64-ppc.c (ppc64_elf_reloc_type_lookup): Tidy prototype.
2288 (ppc64_elf_info_to_howto): Likewise.
2289 (ppc64_elf_build_stubs): Add "stats" param, and print statistics.
2290 * elf64-ppc.h (ppc64_elf_build_stubs): Adjust prototype.
2291
2292 2003-06-19 Alan Modra <amodra@bigpond.net.au>
2293
2294 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore R_SPARC_DISP32
2295 reloc overflow on discarded eh_frame entries.
2296
2297 2003-06-19 Alan Modra <amodra@bigpond.net.au>
2298
2299 * elf64-ppc.c (toc_adjusting_stub_needed): New function.
2300 (ppc64_elf_next_input_section): Use it here to set has_gp_reloc.
2301 Return error condition.
2302 (ppc64_elf_size_stubs): Restrict toc adjusting stubs to sections
2303 that have has_gp_reloc set.
2304 (struct ppc_link_hash_table): Add stub_count.
2305 (ppc_build_one_stub): Increment it.
2306 (ppc64_elf_link_hash_table_create): zmalloc rather than clearing
2307 individual fields.
2308 * elf64-ppc.h (ppc64_elf_next_input_section): Update prototype.
2309
2310 2003-06-18 Alan Modra <amodra@bigpond.net.au>
2311
2312 * elflink.h (elf_gc_record_vtentry): Revert last change. Correct
2313 size calculation from addend. Round size up.
2314
2315 2003-06-18 Hans-Peter Nilsson <hp@axis.com>
2316
2317 * elf32-cris.c (cris_elf_relocate_section) <case
2318 R_CRIS_32_GOTREL>: When linking a program, don't complain about a
2319 symbol from a normal object or an undefined weak symbol.
2320
2321 2003-06-18 Alan Modra <amodra@bigpond.net.au>
2322
2323 * elf64-ppc.c (ppc64_elf_relocate_section): Accept a symbol on
2324 R_PPC64_TOC relocs.
2325
2326 2003-06-17 H.J. Lu <hongjiu.lu@intel.com>
2327
2328 * section.c (struct sec): Put back kept_section.
2329 (STD_SECTION): Put back kept_section initialization.
2330 * bfd-in2.h: Regenerate.
2331
2332 * elflink.h (elf_link_input_bfd): Also check discarded linkonce
2333 sections for relocateable output. Use kept_section to preserve
2334 debug information discarded by linkonce.
2335
2336 2003-06-17 Roland McGrath <roland@redhat.com>
2337
2338 * elfxx-ia64.c (elfNN_ia64_relocate_section): Support
2339 segment-relative relocation between different segments.
2340
2341 2003-06-17 Alan Modra <amodra@bigpond.net.au>
2342
2343 * elf64-ppc.c (ppc64_elf_relocate_section): Do unaligned reloc
2344 optimizations earlier.
2345
2346 * elf64-ppc.c (struct ppc_link_hash_table): Reinstate top_index.
2347 Restore previous input_list type.
2348 (ppc64_elf_link_hash_table_create): Undo last change.
2349 (ppc64_elf_setup_section_lists): Reinstate code setting up input lists
2350 per output section, but don't bother with bfd_abs_section marker.
2351 (ppc64_elf_next_input_section): Adjust for multiple input section
2352 lists.
2353 (group_sections): Likewise.
2354
2355 2003-06-17 Jakub Jelinek <jakub@redhat.com>
2356
2357 * elf64-ppc.c (ppc64_elf_relocation_section): Ensure
2358 *r_offset == r_addend for RELATIVE relocs against .got.
2359
2360 2003-06-17 Alan Modra <amodra@bigpond.net.au>
2361
2362 * elf64-ppc.c (ppc64_elf_relocate_section): Optimize unaligned relocs.
2363
2364 2003-06-17 Nick Clifton <nickc@redhat.com>
2365
2366 * elflink.h (elf_gc_record_vtentry): Allocate an extra element
2367 in the vtable_entries_used array to allow for the accessing
2368 the largest element.
2369
2370 2003-06-17 Alan Modra <amodra@bigpond.net.au>
2371
2372 * elf64-ppc.c (struct ppc_link_hash_table): Remove top_index. Modify
2373 input_list.
2374 (ppc64_elf_link_hash_table_create): Init input_list here.
2375 (ppc64_elf_setup_section_lists): Remove code setting up input lists
2376 per output section. Set toc_off for abs and other standard sections.
2377 (ppc64_elf_reinit_toc): Don't set elf_gp on input bfds lacking a toc.
2378 (ppc64_elf_next_input_section): Adjust for single input section list.
2379 Don't set toc_curr from input bfds that haven't set elf_gp.
2380 (group_sections): Adjust for single input section list.
2381
2382 * elf64-ppc.c (ppc64_elf_relocate_section): Correct pcrel section zero.
2383
2384 2003-06-16 Alan Modra <amodra@bigpond.net.au>
2385
2386 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing toctprel
2387 tls, check that a TOC16_DS or TOC16_LO_DS reloc isn't pointing to a
2388 dtprel entry. Ensure TLS_LD DTPMOD reloc has a zero addend. Write
2389 got section for RELATIVE relocs. Fix wrong comment. Change condition
2390 under which dynamic relocs update the section contents.
2391
2392 2003-06-13 Robert Millan <zeratul2@wanadoo.es>
2393
2394 * config.bfd: Add i386-netbsd-gnu target.
2395
2396 2003-06-12 Nick Clifton <nickc@redhat.com>
2397
2398 * opncls.c (calc_crc32): Rename to
2399 bfd_calc_gnu_debuglink_crc32 and export.
2400 (GNU_DEBUGLINK): Define and use to replace occurrences of
2401 hard-coded ".gnu_debuglink" in the code.
2402 (get_debug_link_info): Prevent aborts by replacing call to
2403 xmalloc with a call to malloc.
2404 (find_separate_debug_file): Prevent aborts by replacing calls
2405 to xmalloc and xstrdup with calls to malloc and strdup.
2406 (bfd_add_gnu_debuglink): New function. Add a .gnu_debuglink
2407 section to a bfd.
2408 * bfd-in2.h: Regenerate.
2409
2410 2003-06-12 Federico G. Schwindt <fgsch@lodoss.net>
2411
2412 * config.bfd (i[3-7]86-*-openbsd[0-2].* | i[3-7]86-*-openbsd3.[0-3]):
2413 New target (was i[3-7]86-*-openbsd* before).
2414 (i[3-7]86-*-openbsd*): Change to use bfd_elf32_i386_vec.
2415 (vax-*-openbsd*): New target.
2416
2417 2003-06-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2418
2419 * elfxx-mips.c (MIPS_ELF_OPTIONS_SECTION_NAME): Use .MIPS.options
2420 for n32, too.
2421 (MIPS_ELF_STUB_SECTION_NAME): Use .MIPS.stubs for n32, too.
2422 (mips_elf_rel_dyn_section): Use appropriate section alignment.
2423 (mips_elf_create_got_section): Likewise.
2424 (_bfd_mips_elf_create_dynamic_sections): Likewise.
2425
2426 2003-06-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2427
2428 * elf32-mips.c (mips_elf_generic_reloc): New Function.
2429 (elf_mips_howto_table_rel): Use it.
2430 (gprel32_with_gp): Move prototype.
2431 (mips_elf_hi16_reloc): Check for ! BSF_LOCAL instead of zero addend.
2432 Use mips_elf_generic_reloc.
2433 (mips_elf_got16_reloc): Check for ! BSF_LOCAL instead of zero addend.
2434 Code cleanup.
2435 (_bfd_mips_elf32_gprel16_reloc): Check for ! BSF_LOCAL instead of
2436 zero addend.
2437 (mips_elf_gprel32_reloc): Likewise. Use the same GP assignment logic
2438 as in the other *_gprel*_reloc functions.
2439 (gprel32_with_gp): Handle partial_inplace properly.
2440 (mips32_64bit_reloc): Use mips_elf_generic_reloc.
2441 (mips16_gprel_reloc): Check for ! BSF_LOCAL instead of zero addend.
2442 Do addend handling directly instead of calling
2443 _bfd_mips_elf_gprel16_with_gp. Handle partial_inplace properly.
2444 * elf64-mips.c (mips_elf64_hi16_reloc): Check for ! BSF_LOCAL instead
2445 of zero addend. Handle partial_inplace properly.
2446 (mips_elf64_got16_reloc): Check for ! BSF_LOCAL instead of zero
2447 addend.
2448 (mips_elf64_gprel16_reloc): Likewise.
2449 (mips_elf64_literal_reloc): Likewise.
2450 (mips_elf64_gprel32_reloc): Likewise. Use the same GP assignment
2451 logic as in the other *_gprel*_reloc functions. Handle
2452 partial_inplace properly.
2453 (mips_elf64_shift6_reloc): Check for ! BSF_LOCAL instead of zero
2454 addend. Handle partial_inplace properly.
2455 (mips16_gprel_reloc): Likewise. Do addend handling directly instead
2456 of calling _bfd_mips_elf_gprel16_with_gp.
2457 * elfn32-mips.c (mips_elf_got16_reloc): Check for BSF_LOCAL.
2458 (mips_elf_gprel32_reloc): Check for ! BSF_LOCAL instead
2459 of zero addend.
2460 (mips_elf_shift6_reloc): Handle partial_inplace properly.
2461 (mips16_gprel_reloc): Likewise. Do addend handling directly instead
2462 of calling _bfd_mips_elf_gprel16_with_gp.
2463 * elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp): Handle
2464 partial_inplace properly. Fix wrong addend handling. Fix overflow
2465 check.
2466 (_bfd_mips_elf_sign_extend): Renamed from mips_elf_sign_extend and
2467 exported.
2468 (mips_elf_calculate_relocation): Use _bfd_mips_elf_sign_extend.
2469 (_bfd_mips_elf_relocate_section): Likewise.
2470 (mips_elf_create_dynamic_relocation): Update sec_info_type access.
2471 * elfxx-mips.h (_bfd_mips_relax_section): Fix prototype declaration.
2472 (_bfd_mips_elf_sign_extend): New prototype.
2473
2474 2003-06-11 Federico G. Schwindt <fgsch@lodoss.net>
2475
2476 * config.bfd (sparc-*-openbsd[0-2].* | sparc-*-openbsd3.[0-1]):
2477 New target (was sparc-*-openbsd* before).
2478 (sparc-*-openbsd*): Change to use bfd_elf32_sparc_vec.
2479
2480 * configure.in (vax-*-openbsd*): Set COREFILE to netbsd-core.lo.
2481 * configure: Regenerate.
2482
2483 2003-06-11 H.J. Lu <hongjiu.lu@intel.com>
2484
2485 * po/Make-in (DESTDIR): New.
2486 (install-data-yes): Support $(DESTDIR).
2487 (uninstall): Likewise.
2488
2489 2003-06-11 Alan Modra <amodra@bigpond.net.au>
2490
2491 * Makefile.am (config.status): Depend on version.h.
2492 Run "make dep-am".
2493 * Makefile.in: Regenerate.
2494 * po/SRC-POTFILES.in: Regenerate.
2495
2496 2003-06-10 Alan Modra <amodra@bigpond.net.au>
2497 Gary Hade <garyhade@us.ibm.com>
2498
2499 * elf64-ppc.c (ppc64_elf_relocate_section <*_DS>): Special case lq.
2500
2501 2003-06-10 Richard Sandiford <rsandifo@redhat.com>
2502
2503 * archures.c (bfd_mach_h8300sxn): New architecture.
2504 * bfd-in2.h: Regenerate.
2505 * cpu-h8300.c (h8300_scan): Check for 'sxn'.
2506 (h8300sxn_info_struct): New.
2507 (h8300sx_info_struct): Link to it.
2508 * elf32-h8300.c (elf32_h8_mach): Add h8300sxn case.
2509 (elf32_h8_final_write_processing): Likewise.
2510
2511 2003-06-08 Alan Modra <amodra@bigpond.net.au>
2512
2513 * elf64-ppc.c: Move TARGET_LITTLE_SYM and other macros used by
2514 elfxx-target.h so that we can use elf_backend_got_header_size.
2515 (ELF_MACHINE_ALT1, ELF_MACHINE_ALT2): Delete.
2516 (GLINK_CALL_STUB_SIZE): Modify. Define new glink call stub and
2517 associated macros.
2518 (ppc64_elf_howto_raw <GOT_TPREL16_DS, GOT_TPREL16_LO_DS>): Correct
2519 dst_mask.
2520 (enum ppc_stub_type): Add ppc_stub_long_branch_r2off and
2521 ppc_stub_plt_branch_r2off.
2522 (struct ppc_stub_hash_entry): Reorganize.
2523 (struct ppc_link_hash_table): Add no_multi_toc, multi_toc_needed,
2524 toc_curr, toc_off and emit_stub_syms.
2525 (ppc64_elf_link_hash_table_create): Init them.
2526 (ppc_stub_name): Correct string size.
2527 (ppc64_elf_check_relocs): Set has_gp_reloc on GOT and TOC relocs.
2528 (ppc64_elf_size_dynamic_sections): Set no_multi_toc if GOT entries
2529 used.
2530 (ppc_type_of_stub): Tweak root.type test.
2531 (build_plt_stub): Remove glink code. Adjust for insn macro changes.
2532 (ppc_size_one_stub): Handle ppc_stub_long_branch_r2off and
2533 ppc_stub_plt_branch_r2off.
2534 (ppc_build_one_stub): Likewise. Fix var shadowing. Correct addis,addi
2535 range test. Use toc_off to calculte r2 values. Handle emit_stub_syms.
2536 (ppc64_elf_setup_section_lists): Remove htab creator flavour test.
2537 Initialize elf_gp and toc_curr.
2538 (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): New functions.
2539 (ppc64_elf_next_input_section): Set toc_off.
2540 (group_sections): Ensure groups have the same TOC.
2541 (ppc64_elf_size_stubs): Check whether we need a TOC adjusting stub.
2542 (ppc64_elf_build_stubs): Add emit_stub_syms param, and stash in htab.
2543 Build new glink stub.
2544 (ppc64_elf_relocate_section): Handle multiple TOCs. Fix comments.
2545 (ppc64_elf_finish_dynamic_sections): Adjust DT_PPC64_GLINK.
2546 * elf64-ppc.h (ppc64_elf_build_stubs): Update prototype.
2547 (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): Declare.
2548 * section.c (struct sec): Rename flag12 to has_gp_reloc.
2549 (STD_SECTION): Update.
2550 * ecoff.c (bfd_debug_section): Update comment.
2551 * bfd-in2.h: Regenerate.
2552
2553 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
2554
2555 * elfcode.h (elf_slurp_reloc_table_from_section): Don't dereference
2556 NULL function pointers.
2557
2558 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
2559
2560 * simple.c (bfd_simple_get_relocated_section_contents): Call
2561 _bfd_generic_link_add_symbols instead of bfd_link_add_symbols.
2562
2563 2003-06-04 Svein E. Seldal <Svein.Seldal@solidas.com>
2564
2565 * coff-tic54x.c: Removed the ticoff0_bad_format_hook() and
2566 ticoff1_bad_format_hook() functions. Removed the coff0 and coff1
2567 swaptables.
2568 * coff-tic4x.c: Ditto
2569 * coffcode.h: Added extra arguments to CREATE_BIG_COFF_TARGET_VEC
2570 and CREATE_LITTLE_COFF_TARGET_VEC. Created the macro
2571 CREATE_BIGHDR_COFF_TARGET_VEC. Created the ticoff0_bad_format_hook(),
2572 ticoff1_bad_format_hook() functions. Created the coff0 and coff1
2573 swap tables.
2574 * coff-tic4x.c: Adopted new CREATE_xxx_COFF_TARGET_VEC macros.
2575 * coff-a29k.c: Append COFF_SWAP_TABLE argument
2576 * coff-apollo.c: Ditto
2577 * coff-arm.c: Ditto
2578 * coff-h8300.c: Ditto
2579 * coff-h8500.c: Ditto
2580 * coff-i960.c: Ditto
2581 * coff-m68k.c: Ditto
2582 * coff-m88k.c: Ditto
2583 * coff-mcore.c: Ditto
2584 * coff-sh.c: Ditto
2585 * coff-sparc.c: Ditto
2586 * coff-tic80.c: Ditto
2587 * coff-we32k.c: Ditto
2588 * coff-z8k.c: Ditto
2589 * coff-w65.c: Ditto
2590
2591 2003-06-04 Svein E. Seldal <Svein.Seldal@solidas.com>
2592
2593 * coff-tic4x.c (ticoff0_swap_table, ticoff1_swap_table): Fixed
2594 initialization bug
2595
2596 2003-06-03 Jakub Jelinek <jakub@redhat.com>
2597
2598 * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_STACK.
2599 (bfd_section_from_phdr): Likewise.
2600 (map_sections_to_segments): Create PT_GNU_STACK segment header.
2601 (get_program_header_size): Count with PT_GNU_STACK.
2602 * elf-bfd.h (struct elf_obj_tdata): Add stack_flags.
2603 * elflink.h (bfd_elfNN_size_dynamic_sections): Set stack_flags.
2604
2605 2003-06-03 H.J. Lu <hongjiu.lu@intel.com>
2606
2607 * elflink.h (elf_link_input_bfd): Call linker error_handler
2608 for discarded definitions.
2609
2610 2003-06-03 Elias Athanasopoulos <elathan@phys.uoa.gr>
2611
2612 * syms.c (decode_section_type): Return 'n' if section flags are
2613 SEC_HAS_CONTENTS && SEC_READONLY.
2614
2615 2003-06-03 Nick Clifton <nickc@redhat.com>
2616
2617 * elf32-v850.c (v850_elf_howto_t): Rename R_V850_32to
2618 R_V850_ABS32. Add entry for R_V850_REL32.
2619 (v850_elf_reloc_map): Likewise.
2620 (v850_elf_check_relocs): Likewise.
2621 (v850_elf_perform_relocation): Likewise.
2622 (v850_elf_final_link_relocate): Likewise. Include computation
2623 to make R_V850_REl32 pc-relative.
2624
2625 2003-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2626
2627 * elf32-sh.c (sh_elf_size_dynamic_sections): Create .interp section
2628 and DT_DEBUG dynamic tag even for position independent executables.
2629 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewize.
2630
2631 2003-06-02 Daniel Jacobowitz <drow@mvista.com>
2632
2633 * config.bfd: Move obsolete entries out of the range of the
2634 targmatch sed script.
2635
2636 2003-06-02 Daniel Jacobowitz <drow@mvista.com>
2637
2638 * config.bfd (mips*-dec-bsd*, mips*-*-pe*): Mark as obsolete.
2639
2640 2003-05-31 Jakub Jelinek <jakub@redhat.com>
2641
2642 * elf32-ppc.c (allocate_dynrelocs): Use single slot for first 8192
2643 plt entries, not just 8191.
2644
2645 2003-05-30 Daniel Jacobowitz <drow@mvista.com>
2646
2647 * elfxx-mips.c (_bfd_mips_elf_discard_info): Correct loop index.
2648 Reported by Ken Faiczak <kfaiczak@SANDVINE.com>.
2649
2650 2003-05-30 Ulrich Drepper <drepper@redhat.com>
2651 Jakub Jelinek <jakub@redhat.com>
2652
2653 * elflink.h (elf_link_add_object_symbols): Use !info->executable
2654 instead of info->shared where appropriate.
2655 (bfd_elfNN_size_dynamic_sections, elf_link_output_extsym): Likewise.
2656 * elflink.c (_bfd_elf_create_got_section): Likewise.
2657 (_bfd_elf_link_create_dynamic_sections): Likewise.
2658 (_bfd_elf_link_assign_sym_version): Likewise.
2659 * elf32-i386.c (elf_i386_size_dynamic_sections): Create .interp section
2660 and DT_DEBUG dynamic tag even for position independent executables.
2661 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
2662 * elf32-s390.c (elf_s390_size_dynamic_sections: Likewise.
2663 * elf64-ppc.c (ppc64_elf_size_dynamic_sections: Likewise.
2664 * elf64-s390.c (elf_s390_size_dynamic_sections: Likewise.
2665 * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections: Likewise.
2666 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections: Likewise.
2667 * elf32-sparc.c (elf32_sparc_size_dynamic_sections: Likewise.
2668 * elf64-alpha.c (elf64_alpha_size_dynamic_sections: Likewise.
2669 * elf64-sparc.c (sparc64_elf_size_dynamic_sections: Likewise.
2670
2671 2003-05-30 Kris Warkentin <kewarken@qnx.com>
2672
2673 * elf.c (elfcore_grok_nto_status): Only set lwpid for the active or
2674 signalled thread.
2675 (elfcore_grok_nto_gregs): Only make .reg section for the active thread.
2676
2677 2003-05-29 Nick Clifton <nickc@redhat.com>
2678
2679 * pef.c: Include "safe-ctype.h" instead of <ctype.h>.
2680 Tidy up formatting.
2681 * Makefile.am: Add dependency on safe-ctype.h.
2682 * Makefile.in: Regenerate.
2683
2684 2003-05-29 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2685
2686 * elfxx-mips.c: Don't force symbols local unconditionally.
2687
2688 2003-05-28 Alan Modra <amodra@bigpond.net.au>
2689
2690 * elf32-hppa.c (elf32_hppa_relocate_section): Delete bogus
2691 undefined_symbol call.
2692
2693 2003-05-27 Richard Sandiford <rsandifo@redhat.com>
2694
2695 * elfxx-mips.c (mips_elf_hash_sort_data): Fix formattting.
2696 (mips_elf_link_hash_table): Likewise.
2697
2698 2003-05-22 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2699
2700 * elf64-mips.c (elf_mips_gnu_rel16_s2): Add internally used
2701 R_MIPS_GNU_REL16_S2 support.
2702 (bfd_elf64_bfd_reloc_type_lookup): Use it.
2703 (mips_elf64_rtype_to_howto): Use it.
2704 * elfn32-mips.c (elf_mips_gnu_rel16_s2): Add internally used
2705 R_MIPS_GNU_REL16_S2 support.
2706 (bfd_elf32_bfd_reloc_type_lookup): Use it.
2707 (mips_elf_n32_rtype_to_howto): Use it.
2708
2709 2003-05-21 Stuart F. Downing <sdowning@fame.com>
2710
2711 * som.h: Define PA_2_0 before including a.out.h
2712
2713 2003-05-07 Eric Christopher <echristo@redhat.com>
2714 Alexandre Oliva <aoliva@redhat.com>
2715
2716 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Adjust
2717 pic tests, change to warning.
2718 (_bfd_mips_elf_final_link): Remove EF_MIPS_CPIC flag setting.
2719
2720 2003-05-21 Marcus Comstedt <marcus@mc.pp.se>
2721
2722 * config.bfd: Check for a target triplet of shl-...-netbsdelf as
2723 well as shle-...-netbsdelf. Remove duplicate entry.
2724
2725 2003-05-21 Nick Clifton <nickc@redhat.com>
2726
2727 * elf32-xstormy16.c (xstormy16_elf_howto_table): Fix dst_mask
2728 for X_STORMY16_REL_12 reloc.
2729
2730 * elf.c (bfd_elf_get_needed_list): Use is_elf_hash_table to check
2731 the type of the hash table in the bfd_link_info structure.
2732 (bfd_elf_get_runpath_list): Likewise.
2733
2734 2003-05-19 Roland McGrath <roland@redhat.com>
2735
2736 * elf.c (bfd_elf_bfd_from_remote_memory): New function.
2737 * bfd-in.h: Declare it.
2738 * bfd-in2.h: Regenerated.
2739 * elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): New function.
2740 * elf-bfd.h (struct elf_backend_data): New function pointer member
2741 elf_backend_bfd_from_remote_memory.
2742 (_bfd_elf32_bfd_from_remote_memory, _bfd_elf64_bfd_from_remote_memory):
2743 Declare them.
2744 * elfxx-target.h (elf_backend_bfd_from_remote_memory): New macro.
2745 (elfNN_bed): Add that to the initializer.
2746
2747 2003-05-15 Roland McGrath <roland@redhat.com>
2748
2749 * elf.c (elfcore_grok_note): Grok NT_AUXV note, make ".auxv" section.
2750
2751 2003-05-20 Jakub Jelinek <jakub@redhat.com>
2752
2753 * elflink.h (elf_link_output_extsym): Only issue error about !=
2754 STV_DEFAULT symbols if they are bfd_link_hash_undefined.
2755
2756 2003-05-20 H.J. Lu <hongjiu.lu@intel.com>
2757
2758 * elflink.c (_bfd_elf_merge_symbol): Check ELF_LINK_DYNAMIC_DEF
2759 when removing the old definition for symbols with non-default
2760 visibility.
2761
2762 2003-05-18 Jason Eckhardt <jle@rice.edu>
2763
2764 * elf32-i860.c (elf32_i860_relocate_highadj): Simplify calculation.
2765
2766 2003-05-17 Andreas Schwab <schwab@suse.de>
2767
2768 * elf32-m68k.c (elf_m68k_check_relocs): Cache reloc section in
2769 elf_section_data during processing of pc-relative and absolute
2770 relocations.
2771 (elf_m68k_relocate_section): Use the cached reloc section instead
2772 of computing it again. Fix handling of visibility. Don't modify
2773 addend when copying over a relocation into the output.
2774
2775 2003-05-17 Alan Modra <amodra@bigpond.net.au>
2776
2777 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
2778 to trim plt entries. Move undefweak non-default visibility test..
2779 (allocate_dynrelocs): ..from here.
2780 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't test
2781 dynamic_sections_created here. Update comment. Move undefweak
2782 non-default visibility test..
2783 (allocate_dynrelocs): ..from here. Fix comment.
2784 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
2785 to trim plt entries. Move undefweak non-default visibility test..
2786 (allocate_dynrelocs): ..from here. Fix comment.
2787 * elflink.h (elf_link_output_extsym): Compare ELF_ST_VISIBILITY with
2788 STV_DEFAULT rather than comparing with zero.
2789 * elflink.c (_bfd_elf_merge_symbol): Likewise.
2790 (_bfd_elf_fix_symbol_flags): Likewise. Format comment.
2791
2792 2003-05-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2793
2794 * bfd.c (_bfd_get_gp_value): Prevent illegal access for abfd null
2795 pointers.
2796 (_bfd_set_gp_value): Likewise.
2797
2798 2003-05-16 Michael Snyder <msnyder@redhat.com>
2799 From Bernd Schmidt <bernds@redhat.com>
2800 * archures.c (bfd_mach_h8300sx): New.
2801 * bfd-in2.h: Regenerate.
2802 * cpu-h8300.c (h8300_scan)): Add support for h8300sx.
2803 (h8300sx_info_struct): New.
2804 (h8300s_info_struct): Link to it.
2805 * elf32-h8300.c (elf32_h8_mach): Add support for h8300sx.
2806 (elf32_h8_final_write_processing): Likewise.
2807 (elf32_h8_relax_section): Likewise.
2808
2809 2003-05-16 Kelley Cook <kelleycook@wideopenwest.com>
2810
2811 * config.bfd: Accept i[3-7]86 variants.
2812 * configure.host: Likewise.
2813 * configure.in: Likewise.
2814 * configure: Regenerate.
2815
2816 2003-05-15 H.J. Lu <hongjiu.lu@intel.com>
2817
2818 * elflink.c (_bfd_elf_fix_symbol_flags): Also hide protected
2819 symbol.
2820
2821 2003-05-15 H.J. Lu <hongjiu.lu@intel.com>
2822
2823 * elflink.h (elf_link_check_versioned_symbol): Also allow
2824 the base version.
2825
2826 2003-05-15 Alan Modra <amodra@bigpond.net.au>
2827 H.J. Lu <hongjiu.lu@intel.com>
2828
2829 * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL.
2830 (elf_i386_relocate_section): Likewise.
2831 * elf32-ppc.c (allocate_dynrelocs): Likewise.
2832 (ppc_elf_relocate_section): Likewise.
2833 * elf64-ppc.c (allocate_dynrelocs): Likewise.
2834 (ppc64_elf_relocate_section): Likewise.
2835
2836 2003-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2837
2838 * elf32-mips.c (gprel32_with_gp): Remove useless N64 ABI case.
2839
2840 2003-05-13 Stephane Carrez <stcarrez@nerim.fr>
2841
2842 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Check for
2843 processor capability, allow merge of HC12 and HCS12 in some cases.
2844 (m68hc11_elf_hash_table_create): Use bfd_malloc instead of bfd_zalloc.
2845 * cpu-m68hc12.c (bfd_m68hc12s_arch): New struct.
2846 (bfd_m68hc12_arch): Link it.
2847 (scan_mach): New function.
2848
2849 2003-05-13 Andrew Haley <aph@redhat.com>
2850
2851 * elf.c (bfd_elf_hash): Mask lower 32 bits of hash.
2852
2853 2003-05-13 Alan Modra <amodra@bigpond.net.au>
2854 H.J. Lu <hongjiu.lu@intel.com>
2855
2856 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Move from
2857 elf32-ppc.c. Add ELF_LINK_FORCED_LOCAL check.
2858 * elf32-ppc.c: (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Delete.
2859 (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for dynreloc check.
2860 (ppc_elf_relocate_section): Likewise.
2861 * elf64-ppc.c (allocate_dynrelocs): Likewise.
2862 (ppc64_elf_relocate_section): Likewise. Use for .got relocs too.
2863 (ppc64_elf_adjust_dynamic_symbol): Don't assume symbols with .plt
2864 relocs need no other types.
2865 * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for
2866 dynreloc check.
2867 (elf_i386_relocate_section): Likewise. Use for .got relocs too.
2868 (elf_i386_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL for
2869 .got relocs.
2870
2871 2003-05-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2872
2873 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): For weak symbols,
2874 copy ELF_LINK_NON_GOT_REF from weakdef.
2875 (allocate_dynrelocs): For undef weak syms with non-default
2876 visibility, a) don't allocate plt entries, b) don't allocate
2877 .got relocs, c) discard dyn rel space
2878 (sh_elf_relocate_section): d) don't generate .got relocs, e)
2879 don't generate dynamic relocs.
2880 (sh_elf_copy_indirect_symbol): Don't copy ELF_LINK_NON_GOT_REF
2881 for weakdefs when symbol already adjusted.
2882
2883 2003-05-12 Nick Clifton <nickc@redhat.com>
2884
2885 * elf32-xstormy16.c (xstormy16_elf_howto_table): use 'bitfield'
2886 overflow detection for R_XSTORMY16_16 reloc.
2887
2888 2003-05-12 Paul Clarke <paulc@senet.com.au>
2889
2890 * elf32-h8300.c: Fix typo in name of R_H8_DIR8 reloc.
2891
2892 2003-05-11 Jason Eckhardt <jle@rice.edu>
2893
2894 * elf32-i860.c (elf32_i860_relocate_highadj): Properly
2895 adjust upper bits.
2896 (elf32_i860_relocate_splitn): Obtain upper 5 bits from the
2897 proper place.
2898 (elf32_i860_relocate_pc16): Obtain upper 5 bits from the
2899 proper place.
2900
2901 2003-05-11 Andreas Schwab <schwab@suse.de>
2902
2903 * elf32-m68k.c (elf_m68k_relocate_section): Replace ugly
2904 complicated tests for unresolvable relocs with a simple direct
2905 scheme using "unresolved_reloc" var. Report some detail on
2906 bfd_reloc_outofrange and similar errors.
2907
2908 2003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
2909
2910 * elf32-s390.c (allocate_dynrelocs, elf_s390_relocate_section):
2911 Fix WILL_CALL_FINISH_DYNAMIC_SYMBOL call.
2912 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
2913 * elf64-s390.c: Likewise.
2914
2915 2003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
2916
2917 * elf32-s390.c (ELIMINATE_COPY_RELOCS): Define as one.
2918 (elf_s390_adjust_dynamic_symbol): For weak symbols, copy
2919 ELF_LINK_NON_GOT_REF from weakdef.
2920 (elf_s390_copy_indirect_symbol): Test whether the weakdef sym has
2921 already been adjusted before treating it specially.
2922 * el64-s390.c: Likwise.
2923
2924 2003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
2925
2926 * elf32-s390.c (allocate_dynrelocs): For undef weak syms with
2927 non-default visibility, a) don't make them dynamic, b) discard
2928 space for dynamic relocs.
2929 (elf_s390_relocate_section): Initialize the GOT entries and skip
2930 R_390_{8,16,32}/R_390_PC{16,16DBL,32DBL,32} for weak undefined
2931 symbols with non-default visibility.
2932 * elf64-s390.c: Likewise.
2933
2934 2003-05-09 Alan Modra <amodra@bigpond.net.au>
2935
2936 * cpu-arm.c (arm_check_note): Warning fix.
2937 * elf32-iq2000.c (iq2000_elf_check_relocs): Warning fixes. Arrange
2938 to keep relocs if edited.
2939 (iq2000_elf_print_private_bfd_data): Return TRUE.
2940 * elfxx-ia64.c (elfNN_ia64_relax_section): Use ELFNN_R_SYM, not
2941 ELF64_R_SYM.
2942 (elfNN_ia64_relax_ldxmov): Warning fix.
2943 * xtensa-isa.c (xtensa_add_isa): Warning fix.
2944 * xtensa-modules.c (get_num_opcodes): Warning fix.
2945
2946 2003-05-09 Andrey Petrov <petrov@netbsd.org>
2947
2948 * elf.c (elf_fake_sections): Use correct cast for sh_name.
2949
2950 2003-05-09 Alan Modra <amodra@bigpond.net.au>
2951
2952 * elflink.c (_bfd_elf_link_create_dynamic_sections): Move from
2953 elflink.h. Replace LOG_FILE_ALIGN with bed->s->log_file_align.
2954 (_bfd_elf_create_dynamic_sections): Use bed->s->log_file_align.
2955 (bfd_elf_record_link_assignment): Move from elflink.h.
2956 (_bfd_elf_merge_symbol): Likewise.
2957 (_bfd_elf_add_default_symbol): Likewise.
2958 (_bfd_elf_export_symbol): Likewise.
2959 (_bfd_elf_link_find_version_dependencies): Likewise.
2960 (_bfd_elf_link_assign_sym_version): Likewise.
2961 (_bfd_elf_link_read_relocs): Likewise.
2962 (_bfd_elf_link_size_reloc_section): Likewise.
2963 (_bfd_elf_fix_symbol_flags): Likewise.
2964 (_bfd_elf_adjust_dynamic_symbol): Likewise.
2965 (_bfd_elf_link_sec_merge_syms): Likewise.
2966 (elf_link_read_relocs_from_section): Likewise. Use bed->s->sizeof_rel
2967 and bed->s->sizeof_rela.
2968 (_bfd_elf_link_output_relocs): Likewise.
2969 * elf-bfd.h (struct elf_size_info): Rename file_align to
2970 log_file_align.
2971 (struct elf_info_failed): Move from elflink.h.
2972 (struct elf_assign_sym_version_info): Likewise.
2973 (struct elf_find_verdep_info): Likewise.
2974 (_bfd_elf_create_dynamic_sections): Delete duplicate declaration.
2975 (_bfd_elf_merge_symbol, _bfd_elf_add_default_symbol,
2976 _bfd_elf_export_symbol, _bfd_elf_link_find_version_dependencies,
2977 _bfd_elf_link_assign_sym_version,
2978 _bfd_elf_link_create_dynamic_sections, _bfd_elf_link_read_relocs,
2979 _bfd_elf_link_size_reloc_section, _bfd_elf_link_output_relocs,
2980 _bfd_elf_fix_symbol_flags, _bfd_elf_adjust_dynamic_symbol,
2981 _bfd_elf_link_sec_merge_syms): Declare.
2982 (bfd_elf32_link_create_dynamic_sections): Don't declare.
2983 (_bfd_elf32_link_read_relocs): Likewise.
2984 (bfd_elf64_link_create_dynamic_sections): Likewise.
2985 (_bfd_elf64_link_read_relocs): Likewise.
2986 * elflink.h: Move lots o' stuff elsewhere.
2987 * bfd-in.h (bfd_elf32_record_link_assignment): Don't declare.
2988 (bfd_elf64_record_link_assignment): Likewise.
2989 (bfd_elf_record_link_assignment): Declare.
2990 * bfd-in2.h: Regenerate.
2991 * elfcode.h (elf_link_create_dynamic_sections): Don't declare.
2992 (NAME(_bfd_elf,size_info)): Adjust for log_file_align.
2993 * elf.c (_bfd_elf_init_reloc_shdr): Adjust for bed->s->log_file_align.
2994 (assign_file_positions_for_segments): Likewise.
2995 (assign_file_positions_except_relocs): Likewise.
2996 (swap_out_syms, elfcore_write_note): Likewise.
2997 * elf-m10200.c: Adjust for changed function names.
2998 * elf-m10300.c: Likewise.
2999 * elf32-arm.h: Likewise.
3000 * elf32-h8300.c: Likewise.
3001 * elf32-hppa.c: Likewise.
3002 * elf32-ip2k.c: Likewise.
3003 * elf32-m32r.c: Likewise.
3004 * elf32-m68hc11.c: Likewise.
3005 * elf32-m68hc1x.c: Likewise.
3006 * elf32-m68k.c: Likewise.
3007 * elf32-mips.c: Likewise.
3008 * elf32-ppc.c: Likewise.
3009 * elf32-sh.c: Likewise.
3010 * elf32-v850.c: Likewise.
3011 * elf32-xtensa.c: Likewise.
3012 * elf64-alpha.c: Likewise.
3013 * elf64-hppa.c: Likewise.
3014 * elf64-mmix.c: Likewise.
3015 * elf64-ppc.c: Likewise.
3016 * elf64-sh64.c: Likewise.
3017 * elfxx-ia64.c: Likewise.
3018 * elfxx-mips.c: Likewise.
3019 (MIPS_ELF_LOG_FILE_ALIGN): Use log_file_align.
3020 * elf64-alpha.c (alpha_elf_size_info): Adjust for log_file_align.
3021 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
3022 * elf64-mips.c (mips_elf64_size_info): Likewise.
3023 * elf64-s390.c (s390_elf64_size_info): Likewise.
3024 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
3025
3026 2003-05-08 H.J. Lu <hongjiu.lu@intel.com>
3027
3028 * elflink.h (elf_add_default_symbol): After skipping the
3029 unversioned symbol, go to non-default one.
3030
3031 2003-05-07 H.J. Lu <hongjiu.lu@intel.com>
3032
3033 * elfxx-ia64.c (_bfd_elf_link_hash_hide_symbol): Also clear the
3034 want_plt field.
3035 (elfNN_ia64_relocate_section): Don't do dynamic symbol lookup
3036 for symbols with non-default visibility.
3037
3038 2003-05-07 H.J. Lu <hongjiu.lu@intel.com>
3039
3040 * elflink.h (elf_link_check_versioned_symbol): Also handle the
3041 case that a DSO references a hidden symbol which may be
3042 satisfied by a versioned symbol in another DSO.
3043 (elf_link_output_extsym): Check versioned definition for hidden
3044 symbol referenced by a DSO.
3045
3046 2003-05-07 Nick Clifton <nickc@redhat.com>
3047
3048 * elf32-xstormy16.c (xstormy16_elf_howto_table): Reset
3049 R_XSTORMY16_16 reloc to ignore overflows.
3050
3051 2003-05-06 Alexandre Oliva <aoliva@redhat.com>
3052
3053 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Improve
3054 error message for mixing different-endian files. Check for ABI
3055 compatibility of input files with the selected emulation.
3056
3057 2003-05-05 Alan Modra <amodra@bigpond.net.au>
3058
3059 * elf32-i386.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 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
3063
3064 * elf32-ppc.c (allocate_dynrelocs): For undef weak syms with
3065 non-default visibility, a) don't allocate plt entries, b) don't
3066 allocate .got relocs, c) discard dyn rel space,
3067 (ppc_elf_relocate_section): d) don't generate .got relocs, e)
3068 don't generate dynamic relocs.
3069 * elf64-ppc.c (allocate_dynrelocs): As above.
3070 (ppc64_elf_relocate_section): As above.
3071
3072 2003-05-05 Andreas Jaeger <aj@suse.de>
3073
3074 * elf64-x86-64.c (allocate_dynrelocs): Don't allocate dynamic
3075 relocation entries for weak undefined symbols with non-default
3076 visibility.
3077 (elf64_x86_64_relocate_section): Initialize the GOT entries and
3078 skip R_386_32/R_386_PC32 for weak undefined symbols with
3079 non-default visibility.
3080
3081 2003-05-04 H.J. Lu <hjl@gnu.org>
3082
3083 * elf32-i386.c (allocate_dynrelocs): Don't allocate dynamic
3084 relocation entries for weak undefined symbols with non-default
3085 visibility.
3086 (elf_i386_relocate_section): Initialize the GOT entries and
3087 skip R_386_32/R_386_PC32 for weak undefined symbols with
3088 non-default visibility.
3089
3090 * elfxx-ia64.c (allocate_fptr): Don't allocate function
3091 descriptors for weak undefined symbols with non-default
3092 visibility.
3093 (allocate_dynrel_entries): Don't allocate relocation entries
3094 for symbols resolved to 0.
3095 (set_got_entry): Don't install dynamic relocation for weak
3096 undefined symbols with non-default visibility.
3097 (set_pltoff_entry): Likewise.
3098
3099 * elflink.h (elf_fix_symbol_flags): Hide weak undefined symbols
3100 with non-default visibility.
3101 (elf_link_output_extsym): Don't make weak undefined symbols
3102 with non-default visibility dynamic.
3103
3104 2003-05-04 H.J. Lu <hjl@gnu.org>
3105
3106 * elflink.h (elf_merge_symbol): Correctly handle weak definiton.
3107
3108 2003-05-04 H.J. Lu <hjl@gnu.org>
3109
3110 * elflink.h (elf_merge_symbol): Don't record a hidden/internal
3111 symbol dynamic. Check indirection when removing the old
3112 definition for symbols with non-default visibility.
3113 (elf_add_default_symbol): Skip when told by elf_merge_symbol.
3114
3115 2003-05-02 Nick Clifton <nickc@redhat.com>
3116
3117 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make the
3118 R_XSTORMY16_8 and R_XSTORMY16_16 relocs detect and complain about
3119 unsigned overflow.
3120
3121 2003-05-02 Andreas Jaeger <aj@suse.de>
3122
3123 * elf64-x86-64.c (elf_x86_64_copy_indirect_symbol): Don't copy
3124 ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
3125 (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
3126 (elf_x86_64_adjust_dynamic_symbol): For weak symbols, copy
3127 ELF_LINK_NON_GOT_REF from weakdef.
3128
3129 2003-05-02 Charles Lepple <clepple@ghz.cc>
3130 Nick Clifton <nickc@redhat.com>
3131
3132 * acinclude.m4: Fix name of --enable-install-libbfd switch.
3133 * aclocal.m4: Regenerate.
3134 * configure: Regenerate.
3135 * Makefile.in: Regenerate.
3136
3137 2003-05-01 Alan Modra <amodra@bigpond.net.au>
3138
3139 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Test whether the
3140 weakdef sym has already been adjusted before treating it specially.
3141 * elf32-i386.c (elf_i386_copy_indirect_symbol): Don't copy
3142 ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
3143 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
3144 (ppc64_elf_check_relocs): Set ELF_LINK_NON_GOT_REF.
3145
3146 2003-04-28 H.J. Lu <hjl@gnu.org>
3147
3148 * elfxx-ia64.c (elfNN_ia64_relax_section): Relax ldxmov during
3149 the relax finalize pass.
3150
3151 * section.c (struct sec): Add need_finalize_relax and remove
3152 flag11.
3153 (STD_SECTION): Update struct sec initializer.
3154 * bfd-in2.h: Regenerated.
3155
3156 2003-04-28 H.J. Lu <hjl@gnu.org>
3157
3158 * elflink.h (elf_merge_symbol): Call elf_backend_copy_indirect_symbol
3159 to copy any information related to dynamic linking when we flip
3160 the indirection.
3161
3162 2003-04-27 H.J. Lu <hjl@gnu.org>
3163
3164 * elf-bfd.h (ELF_LINK_DYNAMIC_DEF): New.
3165 (ELF_LINK_DYNAMIC_WEAK): New.
3166
3167 * elflink.h (elf_merge_symbol): Add one argument to indicate if
3168 a symbol should be skipped. Ignore definitions in dynamic
3169 objects for symbols with non-default visibility.
3170 (elf_add_default_symbol): Adjusted.
3171 (elf_link_add_object_symbols): Check if a symbol should be
3172 skipped. Don't merge the visibility field with the one from
3173 a dynamic object.
3174 (elf_link_check_versioned_symbol): Use undef_bfd.
3175 (elf_link_output_extsym): Warn if a forced local symbol is
3176 referenced from dynamic objects. Make non-weak undefined symbol
3177 with non-default visibility a fatal error.
3178
3179 2003-04-27 Daniel Jacobowitz <drow@mvista.com>
3180
3181 * configure.in: Bump version on HEAD to 2.14.90.
3182 * configure: Regenerated.
3183
3184 2003-04-26 Stephane Carrez <stcarrez@nerim.fr>
3185
3186 PR savannah/3331:
3187 * elf32-m68hc11.c (m68hc11_elf_relax_section): Clear prev_insn_group
3188 when we couldn't relax something.
3189
3190 2003-04-25 Alan Modra <amodra@bigpond.net.au>
3191
3192 * elflink.h (elf_merge_symbol): When we find a regular definition
3193 for an indirect symbol, flip the indirection so that the old
3194 direct symbol now points to the new definition.
3195
3196 2003-04-24 Roland McGrath <roland@redhat.com>
3197
3198 * elf.c (bfd_section_from_phdr): Map PT_GNU_EH_FRAME to "eh_frame_hdr".
3199
3200 2003-04-24 Alan Modra <amodra@bigpond.net.au>
3201
3202 * elf32-ppc.c: Formatting and comment fixes.
3203 (ELIMINATE_COPY_RELOCS): Move before ppc_elf_copy_indirect_symbol.
3204 (ppc_elf_copy_indirect_symbol): Copy flags here for weakdefs.
3205
3206 2003-04-24 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
3207
3208 * archures.c (bfd_mach_h8300hn, bfd_mach_h8300sn): Added.
3209 * bfd-in2.h: Rebuilt.
3210 * coff-h8300.c (BADMAG): Add check for H8300HNBADMAG & H8300SNBADMAG.
3211 * coffcode.h (coff_set_arch_mach_hook): Add case for H8300HNMAGIC
3212 & H8300SNMAGIC.
3213 (coff_set_flags): Add case for bfd_mach_h8300hn & bfd_mach_h8300sn.
3214 * cpu-h8300.c (h8300_scan): Handle h8300hn, h8300sn.
3215 (h8300sn_info_struct, h8300hn_info_struct): New.
3216 * elf32-h8300.c (elf32_h8_mach): Handle case for h8300hn & h8300sn
3217 (elf32_h8_final_write_processing): Likewise.
3218
3219 2003-04-23 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3220
3221 * elf32-sh.c (tpoff): New.
3222 (struct elf_sh_dyn_relocs): Remove tls_tpoff32.
3223 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
3224 (allocate_dynrelocs): Don't make unnecessary dynamic TLS
3225 relocations. Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses.
3226 (sh_elf_relocate_section): Likewise. Remove unnecessary tests.
3227 (dtpoff_base): Fix wrong indentation.
3228 (sh_elf_check_relocs): Don't set DF_STATIC_TLS flag with non-TLS
3229 relocations. Don't set tls_tpoff32 flag. Don't make unnecessary
3230 R_SH_TLS_TPOFF32 relocations.
3231
3232 2003-04-23 J"orn Rennecke <joern.rennecke@superh.com>
3233
3234 * archures.c (enum bfd_architecture): Amend comment to refer to SuperH.
3235 * cpu-sh.c: Likewise.
3236 * elf32-sh.c: Likewise.
3237 * reloc.c (bfd_reloc_code_real): Likewise.
3238 * elf32-sh64-com.c: Change comment to refer to SuperH.
3239 * elf32-sh64.c: Likewise.
3240 * elf64-sh64.c: Likewise.
3241 * bfd-in2.h (enum bfd_architecture): Regenerate.
3242
3243 2003-04-23 Alan Modra <amodra@bigpond.net.au>
3244
3245 From Julien LEMOINE <speedblue@debian.org>
3246 * elf32-i386.c (elf_i386_info_to_howto): Delete.
3247 (elf_info_to_howto): Define as elf_i386_info_to_howto_rel.
3248
3249 2003-04-22 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
3250
3251 * archures.c: Replace references to Mitsubishi M32R with references
3252 to Renesas M32R.
3253 * relocs.c: Likewise.
3254 * bfd-in2.h: Regenerate.
3255
3256 2003-04-21 Richard Henderson <rth@redhat.com>
3257
3258 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Return false for an
3259 executable when a symbol is defined both regular and dynamic.
3260
3261 2003-04-21 Stephane Carrez <stcarrez@nerim.fr>
3262
3263 * Makefile.am (BFD32_BACKENDS): Add elf32-m68hc1x.lo.
3264 (elf32-m68hc1x.lo): Update dependencies
3265 * configure.in: Add elf32-m68hc1x.lo.
3266 * configure: Rebuild.
3267 * Makefile.in: Rebuild.
3268
3269 2003-04-21 Stephane Carrez <stcarrez@nerim.fr>
3270
3271 * elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
3272 (m68hc11_elf_hash_table_create): New function.
3273 (elf32_m68hc11_link_hash_table_free): New function.
3274 (stub_hash_newfunc): New function.
3275 (m68hc11_add_stub): New function.
3276 (elf32_m68hc11_add_symbol_hook): New function.
3277 (elf32_m68hc11_setup_section_lists): New function.
3278 (elf32_m68hc11_next_input_section): New function.
3279 (elf32_m68hc11_size_stubs): New function.
3280 (elf32_m68hc11_build_stubs): New function.
3281 (m68hc11_get_relocation_value): New function.
3282 (elf32_m68hc11_relocate_section): Call the above to redirect
3283 some relocations to the trampoline code.
3284 (m68hc11_elf_export_one_stub): New function.
3285 (m68hc11_elf_set_symbol): New function.
3286 (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse.
3287 (m68hc11_elf_get_bank_parameters): Get parameters only when the info
3288 is not yet initialized.
3289
3290 * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
3291 (elf32_m68hc11_stub_hash_entry): New struct.
3292 (m68hc11_page_info): Add trampoline handler address.
3293 (m68hc11_elf_link_hash_table): Add stubs generation members.
3294 (elf32_m68hc11_add_symbol_hook): Declare.
3295 (elf32_m68hc11_setup_section_lists): Declare.
3296 (elf32_m68hc11_size_stubs): Declare.
3297 (elf32_m68hc11_build_stubs): Declare.
3298
3299 * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c.
3300 (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise.
3301 (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto.
3302 (_bfd_m68hc11_elf_set_private_flags): Ditto.
3303 (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto.
3304 (_bfd_m68hc11_elf_print_private_bfd_data): Ditto.
3305 (bfd_elf32_bfd_link_hash_table_create): Define.
3306 (elf_backend_add_symbol_hook): Define.
3307 (m68hc11_elf_bfd_link_hash_table_create): New function.
3308 (m68hc11_elf_build_one_stub): New function.
3309 (m68hc11_elf_size_one_stub): New function.
3310 (m68hc11_elf_bfd_link_hash_table_create): Install the above.
3311 (bfd_elf32_bfd_link_hash_table_create): Define.
3312
3313 * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove.
3314 (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked.
3315 (m68hc12_phys_addr): Ditto.
3316 (m68hc12_phys_page): Ditto.
3317 (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c.
3318 (elf32_m68hc11_gc_mark_hook): Likewise.
3319 (elf32_m68hc11_gc_sweep_hook): Likewise.
3320 (elf32_m68hc11_check_relocs): Likewise.
3321 (elf32_m68hc11_relocate_section): Likewise.
3322 (_bfd_m68hc12_elf_set_private_flags): Likewise.
3323 (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise.
3324 (_bfd_m68hc12_elf_print_private_bfd_data): Likewise.
3325 (m68hc12_elf_build_one_stub): New function.
3326 (m68hc12_elf_size_one_stub): New function.
3327 (m68hc12_elf_bfd_link_hash_table_create): New function, use the above.
3328 (elf_backend_add_symbol_hook): Define.
3329 (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
3330
3331 2003-04-18 Nick Clifton <nickc@redhat.com>
3332
3333 * format.c (bfd_check_format_matches): Only check associated
3334 vector if the matching_vector has been created.
3335
3336 2003-04-15 Alexandre Oliva <aoliva@redhat.com>
3337
3338 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Fix typo in
3339 2003-04-09's change.
3340
3341 2003-04-15 Brian Ford <ford@vss.fsi.com>
3342
3343 * peicode.h (coff_swap_scnhdr_in): If a section holds
3344 uninitialized data and is from an object file or from an
3345 executable image that has not initialized the s_size field, or if
3346 the physical size is padded, use the virtual size (stored in
3347 s_paddr) instead.
3348
3349 2003-04-15 H.J. Lu <hjl@gnu.org>
3350
3351 * elflink.h (elf_link_add_object_symbols): Properly report
3352 filename for alignment reduction.
3353
3354 2003-04-15 Rohit Kumar Srivastava <rohits@kpitcummins.com>
3355
3356 * archures.c: Replace occurrances of 'Hitachi' with 'Renesas'.
3357 * reloc.c: Likewise.
3358 * coff-h8300.c: Likewise.
3359 * coff-h8500.c: Likewise.
3360 * coff-sh.c: Likewise.
3361 * cpu-h8300.c: Likewise.
3362 * cpu-sh.c: Likewise.
3363 * elf32-h8300.c: Likewise.
3364 * elf32-sh.c: Likewise.
3365 * elf32-sh64-com.c: Likewise.
3366 * elf32-sh64.c: Likewise.
3367 * elf64-sh64.c: Likewise.
3368 * bfd-in2.h: Regenerate.
3369
3370 2003-04-14 H.J. Lu <hjl@gnu.org>
3371
3372 * elflink.h (elf_link_add_object_symbols): Maintain maximum
3373 alignment for common symbols. Warn reducing alignment for
3374 common symbols. Report old filename when symbol size changes.
3375
3376 2003-04-12 Alexandre Oliva <aoliva@redhat.com>
3377
3378 * elfxx-mips.c (mips_elf_calculate_relocation): Adjust two other
3379 occurrences of the same test changed in the previous patch.
3380 Optimize.
3381
3382 2003-04-11 Alexandre Oliva <aoliva@redhat.com>
3383
3384 * elfxx-mips.c (mips_elf_get_global_gotsym_index): New.
3385 (mips_elf_calculate_relocation): Decay GOT_PAGE/GOT_OFST to
3386 GOT_DISP/addend only if the symbol got a global GOT entry.
3387
3388 2003-04-10 Alexandre Oliva <aoliva@redhat.com>
3389
3390 * elfxx-mips.c (mips_elf_calculate_relocation): Decay
3391 GOT_PAGE/GOT_OFST referencing overridable symbol to
3392 GOT_DISP/addend.
3393 (_bfd_mips_elf_check_relocs): Handle GOT_PAGE referencing
3394 global symbol as GOT_DISP.
3395
3396 2003-04-10 Bob Wilson <bob.wilson@acm.org>
3397
3398 * elf32-xtensa.c (elf_xtensa_relocate_section): Don't continue to the
3399 next relocation on an undefined symbol.
3400
3401 2003-04-09 Richard Henderson <rth@redhat.com>
3402
3403 * elf64-alpha.c (elf64_alpha_relocate_section) <R_ALPHA_GPREL32>:
3404 Ignore relocations against r_symndx == 0.
3405
3406 2003-04-09 H.J. Lu <hjl@gnu.org>
3407
3408 * elf64-alpha.c (elf64_alpha_relocate_section): Don't return
3409 FALSE for undefined symbols.
3410 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
3411
3412 2003-04-09 Alexandre Oliva <aoliva@redhat.com>
3413
3414 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Try DWARF3-standard
3415 and IRIX-specific shift-to-64-bit 4-byte lengths before following
3416 addr_size.
3417
3418 2003-04-08 Alexandre Oliva <aoliva@redhat.com>
3419
3420 * elf32-mips.c (bfd_elf32_bfd_reloc_type_lookup): Detect (ctor)
3421 pointer size from ABI, not arch_bits_per_address.
3422
3423 2003-04-07 Kevin Buettner <kevinb@redhat.com>
3424
3425 * elfn32-mips.c (elf32_mips_grok_prstatus): Adjust core file related
3426 constants for n32 ABI.
3427
3428 2003-04-06 Andrew Cagney <cagney@redhat.com>
3429
3430 * simple.c (bfd_simple_get_relocated_section_contents): Disable
3431 free that leads to GDB vs BFD memory corruption.
3432
3433 2003-04-04 Stephane Carrez <stcarrez@nerim.fr>
3434
3435 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Also adjust
3436 symbols that mark the end of the section.
3437 (m68hc11_elf_relax_section): Use R_M68HC11_PCREL_8 relocs when
3438 converting to a relative branch so that the offset is computed after
3439 the relaxation; also relocate a jsr into a bsr if possible but don't
3440 relax them if they are to a far symbol as we need to call the
3441 trampoline code.
3442 (elf_m68hc11_howto_table): Set pcrel_offset to true.
3443
3444 2003-04-04 Svein E. Seldal <Svein.Seldal@solidas.com>
3445
3446 * archures.c: Namespace cleanup. Rename bfd_mach_c3x to
3447 bfd_mach_tic3x and bfd_mach_c4x to bfd_mach_tic4x
3448 * bfd-in2.h: Regenerate
3449 * coff-tic4x.c: Namespace cleanup. Replace s/c4x/tic4x/
3450 * cpu-tic4x.c: Ditto
3451
3452 2003-04-03 Nick Clifton <nickc@redhat.com>
3453
3454 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Compute ps and ss
3455 differently for object files and executables.
3456 * peicode.h (coff_swap_scnhdr_in): Only set the s_size field
3457 for object files or for executables who have not already
3458 initialised the field.
3459 * libpei.h (bfd_pe_executable_p): New macro. Return true if
3460 the PE format bfd is an executable.
3461
3462 2003-04-03 Alan Modra <amodra@bigpond.net.au>
3463
3464 * elf32-ppc.c (ppc_elf_check_relocs): Don't use SYMBOL_REFERENCES_LOCAL
3465 here as it's too early to reliably determine locality.
3466 (ppc_elf_gc_sweep_hook): Likewise.
3467 (SYMBOL_REFERENCES_LOCAL): Expand comment.
3468
3469 2003-04-02 Bob Wilson <bob.wilson@acm.org>
3470
3471 * xtensa-modules.c: Remove comment indicating that this is a
3472 generated file.
3473
3474 2003-04-02 Alan Modra <amodra@bigpond.net.au>
3475
3476 * elfxx-mips.c (_bfd_mips_elf_hide_symbol): Test for NULL dynobj.
3477
3478 2003-04-01 Bob Wilson <bob.wilson@acm.org>
3479
3480 * Makefile.am (ALL_MACHINES): Add cpu-xtensa.lo.
3481 (ALL_MACHINES_CFILES): Add cpu-xtensa.c.
3482 (BFD32_BACKENDS): Add elf32-xtensa.lo, xtensa-isa.lo, and
3483 xtensa-modules.lo.
3484 (BFD32_BACKENDS_CFILES): Add elf32-xtensa.c, xtensa-isa.c, and
3485 xtensa-modules.c.
3486 (cpu-xtensa.lo): New target.
3487 (elf32-xtensa.lo): Likewise.
3488 (xtensa-isa.lo): Likewise.
3489 (xtensa-modules.lo): Likewise.
3490 * Makefile.in: Regenerate.
3491 * archures.c (bfd_architecture): Add bfd_{arch,mach}_xtensa.
3492 (bfd_archures_list): Add bfd_xtensa_arch.
3493 * config.bfd: Handle xtensa-*-*.
3494 * configure.in: Handle bfd_elf32_xtensa_{le,be}_vec.
3495 * configure: Regenerate.
3496 * reloc.c: Add BFD_RELOC_XTENSA_{RTLD,GLOB_DAT,JMP_SLOT,RELATIVE,
3497 PLT,OP0,OP1,OP2,ASM_EXPAND,ASM_SIMPLIFY}.
3498 * targets.c (bfd_elf32_xtensa_be_vec): Declare.
3499 (bfd_elf32_xtensa_le_vec): Likewise.
3500 (bfd_target_vector): Add bfd_elf32_xtensa_{be,le}_vec.
3501 * cpu-xtensa.c: New file.
3502 * elf32-xtensa.c: Likewise.
3503 * xtensa-isa.c: Likewise.
3504 * xtensa-modules.c: Likewise.
3505 * libbfd.h: Regenerate.
3506 * bfd-in2.h: Likewise.
3507
3508 2003-04-01 Nick Clifton <nickc@redhat.com>
3509
3510 * archures.c (bfd_mach_arm_unknown): Define.
3511 * bfd-in.h (bfd_arm_merge_machines, bfd_arm+update_notes,
3512 bfd_arm_get_mach_from_notes): Prototype.
3513 * bfd-in2.h: Regenerate.
3514 * coff-arm.c (coff_arm_merge_private_bfd_data): Call
3515 bfd_arm_merge_machines.
3516 (coff_arm_final_link_postscript): Call bfd_arm_update_notes.
3517 * coffcode.h (coff_set_arch_mach_hook): Call
3518 bfd_arm_get_mach_from_notes.
3519 * coffgen.c (coff_real_object_p): Revert previous delta.
3520 * cpu_arm.c (arm_check_note): New function. Examine a note in a
3521 .note section.
3522 (bfd_arm_merge_machines): New function: Handle the merging of ARM
3523 binaries compiled for different architectures..
3524 (bfd_arm_update_notes): New function: Update an ARM note section.
3525 (bfd_arm_get_mach_from_notes): New function: Extract a bfd machine
3526 number from an ARM note section.
3527 * elf32-arm.h (elf32_arm_object_p): Use
3528 bfd_arm_get_mach_from_notes.
3529 (elf32_arm_merge_private_bfd_data): Use bfd_arm_merge_machines.
3530 (elf32_arm_final_write_processing): Use bfd_arm_update_notes.
3531
3532 2003-04-01 Ben Elliston <bje@wasabisystems.com>
3533
3534 * dwarf2.c (read_attribute_value): Correct typo in comment.
3535
3536 2003-04-01 Nick Clifton <nickc@redhat.com>
3537
3538 * dwarf2.c (concat_filename): Use bfd_malloc() and strdup()
3539 instead of concat().
3540 (decode_line_info): Only free filename if it is not NULL.
3541 (add_line_info): Make a copy of the filename when storing it into
3542 the info structure.
3543
3544 2003-03-31 Andreas Schwab <schwab@suse.de>
3545 Daniel Jacobowitz <drow@mvista.com>
3546
3547 * simple.c (bfd_simple_get_relocated_section_contents): Add
3548 parameter symbol_table. Optionally use it instead of the symbol
3549 table from the bfd. Save and restore output offsets and output
3550 sections around bfd_get_relocated_section_contents. Fix a memory
3551 leak.
3552 (simple_save_output_info, simple_restore_output_info): New
3553 functions.
3554 * bfd-in2.h: Regenerate.
3555 * dwarf2.c (read_abbrevs): Use
3556 bfd_simple_get_relocated_section_contents instead of
3557 bfd_get_section_contents.
3558 (decode_line_info): Likewise.
3559 (_bfd_dwarf2_find_nearest_line): Likewise. Don't call
3560 find_rela_addend.
3561 (find_rela_addend): Remove.
3562 * elfxx-ia64.c (elfNN_ia64_reloc): Weaken sanity check for
3563 debugging sections.
3564 (elfNN_ia64_hash_table_create): Create the hash table with malloc,
3565 not bfd_zalloc.
3566
3567 2003-03-31 David Heine <dlheine@suif.stanford.edu>
3568
3569 * aoutx.h (aout_link_hash_table_create): Use bfd_malloc instead of
3570 bfd_alloc.
3571 * dwarf2.c (concat_filename): Always allocate space for the
3572 returned filename.
3573 (decode_line_info): Free the allocated filename returned by
3574 concat_filename.
3575 * elf-eh-frame.c (bfd_elf_write_section_eh_frame): Fix memory leaks.
3576 * elf.c (copy_private_bfd_data): Likewise.
3577 (_bfd_elf_slurp_version_tables): Fix bug freeing contents pointer.
3578 * elflink.h (elf_link_sort_relocs): Fix memory leak.
3579 * format.c (bfd_check_format_matches): Likewise.
3580 * linker.c (bfd_generic_final_link): Likewise.
3581 * opncls.c (find_separate_debug_info): Likewise.
3582 * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
3583
3584 2003-03-28 H.J. Lu <hjl@gnu.org>
3585
3586 * elflink.h (elf_link_add_object_symbols): Correctly combine
3587 visibilities.
3588
3589 2003-03-27 Jakub Jelinek <jakub@redhat.com>
3590
3591 * elfxx-ia64.c (elfNN_ia64_relax_section): Reset self_dtpmod_offset
3592 to -1 before recomputing got offsets.
3593
3594 2003-03-26 Andreas Schwab <schwab@suse.de>
3595
3596 * elf32-m68k.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
3597 (elf_m68k_relocate_section): Use it to correctly handle symbols
3598 forced to be local.
3599 (elf_m68k_finish_dynamic_symbol): Emit RELATIVE reloc for got
3600 entries for symbols that are forced to be local.
3601
3602 2003-03-25 Alexandre Oliva <aoliva@redhat.com>
3603
3604 * elfxx-mips.c (_bfd_mips_relax_section): New function.
3605 * elfxx-mips.h (_bfd_mips_relax_section): Declare.
3606 * elfn32-mips.c, elf64-mips.c: Use it.
3607
3608 2003-03-25 Stan Cox <scox@redhat.com>
3609 Nick Clifton <nickc@redhat.com>
3610
3611 Contribute support for Intel's iWMMXt chip - an ARM variant:
3612
3613 * archures.c: Add bfd_mach_arm_iWMMXt.
3614 * reloc.c: Add BFD_RELOC_ARM_CP_OFF_IMM_S2.
3615 * bfd-in2.h: Regenerate.
3616 * libbfd.h: Regenerate.
3617 * coff-arm.c (coff_arm_merge_private_bfd_data): Allow iWMMXt
3618 object files to be linked with XScale ones.
3619 (coff_arm_final_link_postscript): Update note section.
3620 * coffcode.h (coff_set_arch_mach_hook): Handle note section.
3621 * coffgen.c (coff_real_object_p): Call bfd_coff_set_arch_mach_hook
3622 after identifying a coff binary.
3623 * cpu-arm.c (processors): Add iWMMXt.
3624 (arch_inf): Likewise.
3625 * elf32-arm.h (arm_object_p): Handle note section.
3626 (elf32_arm_merge_private_bfd_data): Allow iWMMXt object files to
3627 be linked with XScale ones.
3628 (elf32_arm_section_flags): New function: Set flags on note section.
3629 (elf32_arm_final_write_processing): Handle note section.
3630
3631 2003-03-21 DJ Delorie <dj@redhat.com>
3632
3633 * elf32-xstormy16.c (elf32_xstormy16_relocate_section): Call
3634 _bfd_elf_rela_local_sym.
3635
3636 2003-03-20 H.J. Lu <hjl@gnu.org>
3637
3638 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't try relax for
3639 non-ELF outputs.
3640
3641 2003-03-20 Nick Clifton <nickc@redhat.com>
3642
3643 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Initialise $idata2 and
3644 $idata5 in case bfd_coff_final_link is not called.
3645
3646 2003-03-19 Jakub Jelinek <jakub@redhat.com>
3647
3648 * elf64-sparc.c (struct sparc64_elf_section_data): Add reloc_count
3649 field.
3650 (canon_reloc_count): Define.
3651 (sparc64_elf_slurp_one_reloc_table, sparc64_elf_slurp_reloc_table,
3652 sparc64_elf_canonicalize_dynamic_reloc): Use it instead of
3653 reloc_count.
3654 (sparc64_elf_canonicalize_reloc): New routine.
3655 (bfd_elf64_canonicalize_reloc): Define.
3656
3657 2003-03-18 Jakub Jelinek <jakub@redhat.com>
3658
3659 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle relaxation
3660 againt mergeable sections. Take r_addend into account when caching
3661 trampolines.
3662
3663 2003-03-18 Richard Henderson <rth@redhat.com>
3664
3665 * elfxx-ia64.c (get_dyn_sym_info): Return NULL gracefully for
3666 local symbols that have no dyninfo.
3667
3668 2003-03-14 Gene Smith <gene.smith@siemens.com>
3669
3670 * ieee.c (ieee_write_expression): Handle the case where symbol is
3671 NULL.
3672 General formatting improvements.
3673
3674 2003-03-13 Nick Clifton <nickc@redhat.com>
3675
3676 * configure.in (LINGUAS): Add zh_CN.
3677 * configure: Regenerate.
3678 * po/zh_CN.po: New file.
3679
3680 2003-03-13 Elias Athanasopoulos <elathan@phys.uoa.gr>
3681
3682 * aout-cris.c (BYTES_IN_WORD): Don't define.
3683 aout-encap.c: Likewise.
3684 aout-ns32k.c: Likewise.
3685 aout-tic30.c: Likewise.
3686 hp300bsd.c: Likewise.
3687 i386aout.c: Likewise.
3688 i386dynix.c: Likewise.
3689 i386linux.c: Likewise.
3690 i386lynx.c: Likewise.
3691 i386mach3.c: Likewise.
3692 m68k4knetbsd.c: Likewise.
3693 m68klinux.c: Likewise.
3694 m68klynx.c: Likewise.
3695 m68knetbsd.c: Likewise.
3696 m88kmach3.c: Likewise.
3697 mipsbsd.c: Likewise.
3698 newsos3.c: Likewise.
3699 sparclinux.c: Likewise.
3700 sparclynx.c: Likewise.
3701 sparcnetbsd.c: Likewise.
3702 vaxbsd.c: Likewise. Fix comment formatting.
3703
3704 2003-03-12 Alexandre Oliva <aoliva@redhat.com>
3705
3706 * Reverted 2003-03-02's patch.
3707
3708 * elfxx-target.h (bfd_elfNN_canonicalize_reloc): Make it
3709 overridable.
3710 * elf64-mips.c (mips_elf64_canonicalize_reloc,
3711 mips_elf64_get_dynamic_reloc_upper_bound,
3712 mips_elf64_canonicalize_dynamic_reloc): New, adapted from elf.c.
3713 (bfd_elf64_get_canonicalize_reloc,
3714 bfd_elf64_get_dynamic_reloc_upper_bound,
3715 bfd_elf64_canonicalize_dynamic_reloc): Define.
3716 (mips_elf64_slurp_reloc_table): Support dynamic.
3717 (mips_elf64_slurp_one_reloc_table): Adjust.
3718
3719 2003-03-12 Nick Clifton <nickc@redhat.com>
3720
3721 * xsym.c (bfd_sym_fetch_type_information_table_entry): Change
3722 'index' to 'offset' in test for zero value.
3723
3724 2003-03-11 Alexandre Oliva <aoliva@redhat.com>
3725
3726 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Do not create
3727 dynamic relocations pointing to local or section symbols, use the
3728 NULL symbol instead. Document the choice to not emit an
3729 additional R_MIPS_64 relocation.
3730
3731 2003-03-11 Alan Modra <amodra@bigpond.net.au>
3732
3733 * elf32-ppc.c (ppc_elf_relocate_section): Subtract tls seg vma from
3734 zero index dynamic tls relocs generated for the GOT. Tidy code.
3735 Set "relocation" to 1 on DTPMOD32 relocs. Optimize HA adjustment.
3736 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
3737
3738 2003-03-07 Alan Modra <amodra@bigpond.net.au>
3739
3740 * elf32-ppc.c (ppc_elf_relocate_section): Don't look for a nop after
3741 a tls_get_addr call.
3742
3743 * elf32-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
3744 (ppc_elf_adjust_dynamic_symbol): For weak symbols, copy
3745 ELF_LINK_NON_GOT_REF from weakdef.
3746 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
3747 (ppc64_elf_adjust_dynamic_symbol): For weak symbols, copy
3748 ELF_LINK_NON_GOT_REF from weakdef.
3749 * elf32-i386.c (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
3750 (elf_i386_adjust_dynamic_symbol): For weak symbols, copy
3751 ELF_LINK_NON_GOT_REF from weakdef.
3752
3753 2003-03-06 Jakub Jelinek <jakub@redhat.com>
3754 Andrew Haley <aph@redhat.com>
3755
3756 * elflink.h (elf_bfd_discard_info): Don't process eh frames if
3757 output is relocateable.
3758
3759 2003-03-06 Steven Konopa <skonopa@kgo.csc.com>
3760
3761 * som.c (som_fixup_formats): Correct formats for R_AUX_UNWIND and
3762 R_COMMENT.
3763
3764 2003-03-06 Alan Modra <amodra@bigpond.net.au>
3765
3766 * elf32-ppc.c (ppc_elf_create_linker_section): Don't capitalize
3767 error messages.
3768 (ELIMINATE_COPY_RELOCS): Define to zero.
3769 (ppc_elf_relocate_section): Don't deref htab->tls_sec when calculating
3770 TLSLD relocs. Report reloc types on a number of errors. Optimize
3771 LOCAL24PC check for non-local syms. Don't capitalize error messages.
3772 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define to zero.
3773 (ppc64_elf_relocate_section): Don't deref htab->tls_sec when
3774 calculating TLSLD relocs. Report reloc types on a number of errors.
3775 Don't capitalize error messages.
3776
3777 2003-03-03 H.J. Lu <hjl@gnu.org>
3778
3779 * elfxx-ia64.c (USE_BRL): Removed.
3780 (oor_ip): Removed.
3781
3782 2003-03-03 J"orn Rennecke <joern.rennecke@superh.com>
3783
3784 * elf32-sh.c (sh_elf_howto_tab): Make R_SH_IND12W into an ordinary
3785 relocation (no special function), and make it non-partial_inplace.
3786 (sh_elf_relax_section): When creating a bsr, use a consistent value
3787 no matter if the symbol is extern or not; set addend to -4.
3788 Don't swap load / non-load instructions for SH4.
3789 (sh_elf_relax_delete_bytes): In R_SH_IND12W case, check the offset
3790 rather than if the symbol is external to determine if adjusting the
3791 offset makes sense. Adjust the addend too if appropriate.
3792 (sh_elf_relocate_section): In R_SH_IND12W, don't fiddle with the
3793 relocation.
3794
3795 2003-03-03 Nick Clifton <nickc@redhat.com>
3796
3797 * po/da.po: Installed latest translation.
3798
3799 2003-03-02 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3800
3801 * elf32-mips.c (elf_mips_howto_table_rel): Change definition of
3802 R_MIPS_PC16 to rightshift 2.
3803 (elf_reloc_map mips_reloc_map): Map to rightshifted BFD reloc.
3804 (bfd_elf32_bfd_reloc_type_lookup): Support
3805 BFD_RELOC_MIPSEMB_16_PCREL_S2.
3806 * elf64-mips.c (mips_elf64_howto_table_rel): Change definition of
3807 R_MIPS_PC16 to rightshift 2.
3808 (mips_elf64_howto_table_rela): Likewise.
3809 (mips_reloc_map): Map to rightshifted BFD reloc.
3810 * elfn32-mips.c: The same as in elf64-mips.c.
3811 * elfxx-mips.c (mips_elf_got_for_ibfd): Typo in comment.
3812 (mips_elf_calculate_relocation): Handle rightshifted addends for
3813 R_MIPS_PC16.
3814 * reloc.c (BFD_RELOC_MIPSEMB_16_PCREL_S2): New BFD relocation for
3815 MIPS Embedded PIC. Remove superfluous empty COMMENT.
3816 * libbfd.h: Regenerate.
3817 * bfd-in2.h: Regenerate.
3818
3819 2003-02-28 Richard Henderson <rth@redhat.com>
3820
3821 * elfxx-ia64.c (elfNN_ia64_relax_section): Correct bounds
3822 for ltoff22x relaxation.
3823
3824 2003-03-01 Alan Modra <amodra@bigpond.net.au>
3825
3826 * bfd-in.h (_bfd): Don't define.
3827 * bfd.c: Rename occurrences of "struct _bfd" to "struct bfd".
3828 * syms.c: Likewise.
3829 * bfd-in2.h: Regenerate.
3830
3831 2003-02-27 Richard Henderson <rth@redhat.com>
3832
3833 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add want_gotx;
3834 (elfNN_ia64_check_relocs): Set it.
3835 (allocate_global_data_got): Check it.
3836 (allocate_local_got): Likewise.
3837 (allocate_dynrel_entries): Likewise.
3838 (elfNN_ia64_relax_ldxmov): New.
3839 (elfNN_ia64_relax_section): Handle LTOFF22X, LDXMOV.
3840 (elfNN_ia64_choose_gp): Split out from ...
3841 (elfNN_ia64_final_link): ... here.
3842
3843 2003-02-27 Andrew Cagney <cagney@redhat.com>
3844
3845 * bfd.c (struct bfd): Rename "struct _bfd".
3846 * bfd-in.h: Update copyright.
3847 (struct bfd): Rename "struct _bfd".
3848 (_bfd): Define for backward compatibility.
3849 * bfd-in2.h: Regenerate.
3850
3851 2003-02-25 Alan Modra <amodra@bigpond.net.au>
3852
3853 * elflink.h (elf_bfd_final_link): Apportion reloc counts to rel_hdr
3854 and rel_hdr2 when initially counting input relocs rather than after
3855 creating output reloc sections.
3856 (elf_link_read_relocs_from_section): Don't abort with wrong reloc
3857 sizes.
3858
3859 * Makefile.am: Run "make dep-am".
3860 * Makefile.in: Regenerate.
3861
3862 2003-02-24 Kris Warkentin <kewarken@qnx.com>
3863
3864 * elf.c (elfcore_read_notes): Add check for QNX style core file.
3865 (elfcore_grog_nto_note): New function.
3866 (elfcore_grog_nto_gregs): New function.
3867 (elfcore_grog_nto_status): New function.
3868
3869 2003-02-24 Alan Modra <amodra@bigpond.net.au>
3870
3871 * elflink.c (_bfd_elf_create_got_section): Check existing .got
3872 section flags before concluding that we've already been called.
3873 Don't use register keyword.
3874 (_bfd_elf_create_dynamic_sections): Don't use register keyword.
3875 (_bfd_elf_create_linker_section): Formatting.
3876
3877 2003-02-20 jmc <jmc@prioris.mini.pw.edu.pl>
3878
3879 * coff-h8300.c: Fix typo: intial -> initial.
3880 * coff-ppc.c: Likewise.
3881
3882 2003-02-20 Alan Modra <amodra@bigpond.net.au>
3883
3884 * elf32-ppc.c: Formatting.
3885 (allocate_dynrelocs): LD and GD relocs against the same sym need
3886 separate GOT entries.
3887 (ppc_elf_relocate_section): Correct GOT handling for multiple GOT
3888 entries per symbol.
3889
3890 2003-02-19 Alan Modra <amodra@bigpond.net.au>
3891
3892 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Simplify dynamic reloc
3893 removal. Localize vars. Remove unnecessary dynobj test.
3894 * elf32-i386 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead
3895 of INFO.
3896 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
3897 and optimize.
3898 (elf_i386_relocate_section): Likewise.
3899 (elf_i386_gc_sweep_hook): Simplify dyn reloc removal. Localize vars.
3900 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
3901 * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
3902 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
3903 * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
3904 * elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise. Remove
3905 local_dynrel for section too. Don't touch HIPLT22, LOPLT10, PCPLT32
3906 or PCPLT10 relocs. Don't subtract twice on PLT32 relocs.
3907 Formatting.
3908
3909 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define.
3910 (ppc64_elf_check_relocs): Use it. Correct comment. Move SEC_ALLOC
3911 test.
3912 (ppc64_elf_adjust_dynamic_symbol): Use ELIMINATE_COPY_RELOCS.
3913 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
3914 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
3915 and optimize. Use ELIMINATE_COPY_RELOCS.
3916 (ppc64_elf_relocate_section): Likewise.
3917
3918 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Add pc_count field.
3919 (ppc_elf_copy_indirect_symbol): Copy pc_count field.
3920 (ELIMINATE_COPY_RELOCS): Define.
3921 (ppc_elf_adjust_dynamic_symbol): Convert copy relocs to dynamic.
3922 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
3923 (MUST_BE_DYN_RELOC): Define.
3924 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
3925 and optimize. Trim dyn_relocs.
3926 (ppc_elf_check_relocs): Don't generate dyn_relocs when we know they'll
3927 not be used. Do generate dyn_relocs for copy reloc avoidance. Keep
3928 track of pc_rel dyn relocs.
3929 (ppc_elf_relocate_section): Remove "will_become_local". Adjust
3930 WILL_CALL_FINISH_DYNAMIC_SYMBOL use. Trim dyn relocs as per
3931 allocate_dynrelocs. Don't recalculate "sec".
3932
3933 2003-02-18 Alan Modra <amodra@bigpond.net.au>
3934
3935 * elf32-ppc.c (ppc_elf_relocate_section): Remove unnecessary test.
3936 * elf64-ppc.c (ppc64_elf_tls_optimize): Decrement tlsld_got.refcount
3937 on invalid LD relocs.
3938 (allocate_dynrelocs): Invalid LD relocs don't use tlsld_got entry.
3939 (ppc64_elf_relocate_section): Unify new handling of LD relocs and
3940 tlsld_got entry. Use IS_PPC64_TLS_RELOC.
3941
3942 * elf32-ppc.h: New file.
3943 * elf32-ppc.c: Include elf32-ppc.h.
3944 (NOP, CROR_151515, CROR_313131, TP_OFFSET, DTP_OFFSET): Define.
3945 (struct ppc_elf_link_hash_entry): Rename "root" to "elf". Adjust uses.
3946 Add "tls_mask" field.
3947 (TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL, TLS_TLS, TLS_TPRELGD): Define.
3948 (struct ppc_elf_link_hash_table): Rename "root" to "elf". Adjust uses.
3949 Add got, relgot, plt, relplt, dynbss, relbss, dynsbss, relsbss,
3950 sdata, sdata2, tls_sec, tls_get_addr, tlsld_got fields.
3951 Make use of htab shortcuts throughout file.
3952 (ppc_elf_link_hash_newfunc): Init tls_mask field.
3953 (ppc_elf_link_hash_table_create): Init new fields.
3954 (ppc_elf_copy_indirect_symbol): Copy tls_mask.
3955 (ppc_elf_howto_raw): Add tls relocs.
3956 (ppc_elf_reloc_type_lookup): Handle them.
3957 (ppc_elf_unhandled_reloc): New function.
3958 (ppc_elf_create_got): Stash got section pointer in hash table,
3959 return status. Make .rela.got too.
3960 (ppc_elf_create_dynamic_sections): Stash section pointers in htab.
3961 (ppc_elf_adjust_dynamic_symbol): Only set up copy relocs when
3962 NON_GOT_REF set. Don't allocate space in .plt here..
3963 (allocate_dynrelocs): ..do so here instead, properly ref-counting and
3964 not allocating plt entries unnecessarily. Allocate got entries here.
3965 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
3966 (ppc_elf_size_dynamic_sections): Allocate local got entries. Pass
3967 "info" during allocate_dynrelocs hash traversal. Use htab section
3968 shortcuts rather than searching for named sections. Get rid of
3969 "plt" and "strip" booleans.
3970 (update_local_sym_info, bad_shared_reloc): New functions.
3971 (ppc_elf_check_relocs): Handle TLS relocs. Move .rela.got creation to
3972 ppc_elf_create_got. Don't mark got or plt reloc syms dynamic, do so
3973 in allocate_dynreloc. Use update_local_sym_info and bad_shared_reloc.
3974 Disallow R_PPC_EMB_RELSDA, R_PPC_EMB_NADDR32, R_PPC_EMB_NADDR16,
3975 R_PPC_EMB_NADDR16_LO, R_PPC_EMB_NADDR16_HI and R_PPC_EMB_NADDR16_HA
3976 in shared libs. R_PPC_PLTREL32 is a plt reloc too. Refcount all
3977 relocs that might use a plt entry. Set NON_GOT_REF too.
3978 Enumerate all do-nothing relocs.
3979 (ppc_elf_gc_sweep_hook): Simplify removal of dynrelocs. Handle
3980 tls relocs and all plt relocs.
3981 (ppc_elf_tls_setup, ppc_elf_tls_optimize): New functions.
3982 (ppc_elf_finish_dynamic_symbol): Don't build got entries here.
3983 (ppc_elf_finish_dynamic_sections): Rewrite tag code using htab
3984 shortcuts.
3985 (ppc_elf_relocate_section): Tidy. Handle TLS relocs. Use
3986 bfd_elf_local_sym_name. Simplify unresolved reloc code. Build got
3987 entries and got relocs here. Warn on non-zero got reloc addend.
3988 Split out branch taken/not taken reloc code into a separate switch
3989 and correct offset calculation. Allow BRTAKEN/BRNTAKEN dynamic relocs.
3990 Split out HA reloc adjustments to separate switch statement. Don't
3991 warn on reloc overflow if we've already warned about undefined.
3992 Don't rebuild sym name when reporting errors. Report all possible
3993 errors from _bfd_final_link_relocate.
3994 (bfd_elf32_bfd_final_link): Don't define.
3995
3996 2003-02-18 Alan Modra <amodra@bigpond.net.au>
3997
3998 * elf64-ppc.c (ppc64_elf_relocate_section): Don't init "r". Don't
3999 rebuild sym name when reporting errors.
4000
4001 2003-02-17 Nick Clifton <nickc@redhat.com>
4002
4003 * elflink.h (elf_link_output_extsym): Only check
4004 allow_shlib_undefined for shared libraries.
4005 * elf32-i386.c (elf_i386_relocate_section): Remove bogus check
4006 of allow_shlib_undefined.
4007 * elf32-cris.c (cris_elf_relocate_section): Likewise.
4008 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
4009 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
4010 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
4011 * elf32-s390.c (elf_s390_relocate_section): Likewise.
4012 * elf32-sh.c (sh_elf_relocate_section): Likewise.
4013 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
4014 * elf32-vax.c (elf_vax_relocate_section): Likewise.
4015 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
4016 * elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
4017 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
4018 * elf64-s390.c (elf_s390_relocate_section): Likewise.
4019 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
4020 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
4021 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
4022 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
4023
4024 2003-02-17 Nick Clifton <nickc@redhat.com>
4025
4026 * elf.c (SEGMENT_AFTER_SEGMENT): Add third parameter - the
4027 address field to use in the comparison.
4028 (SEGMENT_OVERLAPS): Check that LMAs overlap as well.
4029
4030 2003-02-14 Bob Wilson <bob.wilson@acm.org>
4031
4032 * elfcore.h (elf_core_file_p): Compare alternate machine codes for ELF
4033 backends when checking if the generic ELF target should be used.
4034
4035 * syms.c (_bfd_stab_section_find_nearest_line): For line number stabs
4036 outside of functions, treat values as absolute addresses.
4037
4038 * bfd.c: Change embedded documentation to use consistent indentation
4039 and to split up long lines. Change informal style of description
4040 for functions lacking real documentation.
4041 * coffcode.h: Break up long lines in embedded documentation.
4042 * format.c: Likewise.
4043 * targets.c: Likewise.
4044 * libcoff.h: Regenerate.
4045 * bfd-in2.h: Regenerate.
4046
4047 2003-02-14 Alan Modra <amodra@bigpond.net.au>
4048
4049 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Init tls_get_addr.
4050 (ppc64_elf_copy_indirect_symbol): Merge tls_mask too.
4051 (ppc64_elf_gc_sweep_hook): Simplify removal of dyn_relocs.
4052 (allocate_dynrelocs): Don't treat undefined and undefweak specially.
4053 (ppc_size_one_stub): Fix warning, and tighten plt entry check.
4054 (group_sections): Don't share a stub section if stubs are for a large
4055 section. Adjust comment.
4056 (ppc64_elf_size_stubs): Roughly double the size left for stubs if
4057 !stubs_always_before_branch.
4058 (ppc64_elf_relocate_section): Initialize tlsld GOT entry once. Don't
4059 treat undefined and undefweak specially when processing dyn relocs.
4060
4061 2003-02-13 Jakub Jelinek <jakub@redhat.com>
4062
4063 * elflink.h (elf_link_add_object_symbols): Handle .symver x, x@FOO.
4064
4065 2003-02-13 Nick Clifton <nickc@redhat.com>
4066
4067 * elf32-arm.h (elf32_thumb_to_arm_stub): Include section VMAs
4068 in computation of offset to insert into BL instruction.
4069
4070 2003-02-11 Uwe Stieber <uwe@wwws.de>
4071
4072 * config.bfd: Add support for kaOS as cross build target system.
4073
4074 2003-02-11 Alan Modra <amodra@bigpond.net.au>
4075
4076 * elf64-ppc.c (ppc64_elf_check_relocs): Match versioned
4077 .__tls_get_addr too.
4078 (ppc64_elf_tls_setup): Ensure cached tls_get_addr is not indirect.
4079
4080 2003-02-10 Kaz kojima <kkojima@rr.iij4u.or.jp>
4081
4082 * elf32-sh.c (elf_sh_dyn_relocs): Add tls_tpoff32 field.
4083 (elf_sh_link_hash_entry): Remove tls_tpoff32 field.
4084 (sh_elf_link_hash_newfunc): Remove the initialization of
4085 tls_tpoff32 field.
4086 (allocate_dynrelocs): Keep dyn_relocs if it includes the entry
4087 for which tls_tpoff32 flag is set.
4088 (sh_elf_relocate_section): Covert to LE only if the dyn_relocs
4089 of the symbol includes the entry matched with the input_section
4090 and having tls_tpoff32 flag on. When linking statically, set
4091 symbol index of R_SH_TLS_TPOFF32 relocation to zero if the symbol
4092 is defined in this executable.
4093 (sh_elf_check_relocs): Set tls_tpoff32 flag appropriately.
4094
4095 2003-02-10 Jakub Jelinek <jakub@redhat.com>
4096
4097 * elf32-s390.c (elf_s390_size_dynamic_sections): Set relocs to TRUE
4098 even if there is just non-empty .rela.plt.
4099
4100 2003-02-10 Nick Clifton <nickc@redhat.com>
4101
4102 * archures.c (bfd_mach_arm_ep9312): Define.
4103 * bfd-in2.h: Regenerate.
4104 * cpu-arm.c (processors[]): Add ep9312.
4105 (bfd_arm_arch): Add ep9312.
4106 * elf32-arm.h (elf32_arm_merge_private_data): Update error
4107 messages and add test for Maverick floating point support.
4108 (elf32_arm_print_private_bfd_data): Handle
4109 EF_ARM_MAVERICK_FLOAT flag.
4110 (elf32_arm_object_p): New function.
4111 (elf_backend_object_p): Define.
4112
4113 2003-02-10 Alan Modra <amodra@bigpond.net.au>
4114
4115 * elf64-ppc.c: Rename assorted occurrences of tls_type and similar
4116 variables, structure fields or function params to tls_mask or
4117 similar to better reflect usage.
4118 (struct got_entry): Comment.
4119 (struct ppc_link_hash_entry): Expand comment, and renumber TLS_*.
4120 (get_tls_mask): Rename from get_tls_type.
4121
4122 2003-02-09 Alan Modra <amodra@bigpond.net.au>
4123
4124 * elf64-ppc.c (TLS_GD_LD): Don't define..
4125 (TLS_GD): ..define this instead and update all uses.
4126 (TLS_TPRELGD): Define.
4127 (ppc64_elf_link_hash_table_create): Tweak initialization of
4128 init_refcount and init_offset.
4129 (ppc64_elf_check_relocs): Add one extra element to t_symndx array.
4130 Mark second slot of GD or LD toc entries.
4131 (get_tls_type): Return an int. Distinguish toc GD and LD entries
4132 from other tls types.
4133 (ppc64_elf_tls_setup): New function, split out from..
4134 (ppc64_elf_tls_optimize): ..here. Don't optimize when symbols are
4135 defined in a dynamic object. Fix LD optimization. Don't set TLS_TPREL
4136 on GD->IE optimization, use TLS_TPRELGD instead. Use get_tls_type
4137 return value to properly decide whether toc GD and LD entries can
4138 optimize away __tls_get_addr call. Check next reloc after DTPMOD64
4139 to determine GD or LD rather than looking at TLS_LD flag. Don't
4140 attempt to adjust got entry tls_type here..
4141 (allocate_dynrelocs): ..instead, adjust got entry tls_type here, and
4142 look for possible merges.
4143 (ppc64_elf_size_dynamic_sections): Adjust local got entries for
4144 optimization.
4145 (ppc64_elf_size_stubs): Tweak __tls_get_addr fudge.
4146 (ppc64_elf_relocate_section): Rename some vars to better reflect usage.
4147 Make use of return value from get_tls_type to properly detect GD and
4148 LD optimizations. Split tlsld/gd hi/ha from lo/ds case. Don't
4149 handle tls_get_addr removal when looking at REL24 relocs, do it when
4150 looking at the previous reloc. Check reloc after DTPMOD64 to determine
4151 GD or LD.
4152 * elf64-ppc.h (ppc64_elf_tls_setup): Declare.
4153
4154 2003-02-08 Alan Modra <amodra@bigpond.net.au>
4155
4156 * elf32-hppa.c (group_sections): Don't share a stub section if
4157 stubs are for a large section.
4158
4159 * elf32-hppa.c (elf32_hppa_size_stubs): Double the size left for
4160 stubs if !stubs_always_before_branch.
4161
4162 2003-02-07 Nick Clifton <nickc@redhat.com>
4163
4164 * elf.c (swap_out_syms): Generate an error message if an
4165 equivalent output section cannot be found for a symbol.
4166
4167 2003-02-07 Jakub Jelinek <jakub@redhat.com>
4168
4169 * elf64-alpha.c (elf64_alpha_relax_section): Don't crash if
4170 local_got_entries is NULL.
4171
4172 2003-02-06 Andreas Schwab <schwab@suse.de>
4173
4174 * elf-eh-frame.c (get_DW_EH_PE_signed): Define.
4175 (read_value): Add parameter is_signed, use signed extraction if
4176 the value is signed.
4177 (_bfd_elf_write_section_eh_frame): Pass signed flag of the
4178 encoding to read_value.
4179
4180 2003-02-06 Alan Modra <amodra@bigpond.net.au>
4181
4182 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy got and
4183 plt info when called to transfer weak sym info.
4184
4185 2003-02-05 Alan Modra <amodra@bigpond.net.au>
4186
4187 * reloc.c: Add PPC and PPC64 TLS relocs.
4188 * libbfd.h: Regenerate.
4189 * bfd-in2.h: Regenerate.
4190 * elf64-ppc.c (TP_OFFSET, DTP_OFFSET): Declare.
4191 (ppc64_elf_howto_raw): Add TLS howto's. Adjust R_PPC64_NONE to be
4192 against a 32 bit field.
4193 (ppc64_elf_reloc_type_lookup): Handle TLS relocs.
4194 (_ppc64_elf_section_data): Add t_symndx and comments.
4195 (ppc64_elf_section_data): Use elf_section_data macro.
4196 (ppc64_elf_new_section_hook): American spelling.
4197 (struct got_entry, struct plt_entry): New.
4198 (MUST_BE_DYN_RELOC): Rename from IS_ABSOLUTE_RELOC.
4199 (struct ppc_stub_hash_entry): Add "addend" field.
4200 (struct ppc_link_hash_entry): Add "tls_type".
4201 (TLS_TLS, TLS_GD_LD, TLS_LD, TLS_TPREL, TLS_DTPREL,
4202 TLS_EXPLICIT): Define.
4203 (struct ppc_link_hash_table): Add tls_sec, tls_get_addr, tlsld_got.
4204 (link_hash_newfunc): Init new fields.
4205 (ppc64_elf_link_hash_table_create): Likewise. Set init_refcount and
4206 init_offset to NULL.
4207 (ppc64_elf_copy_indirect_symbol): Copy got and plt info. Don't call
4208 _bfd_elf_link_hash_copy_indirect, rather insert relevant code from
4209 there.
4210 (update_local_sym_info, update_plt_info): New functions.
4211 (ppc64_elf_check_relocs): Use them. Handle TLS relocs. Adjust GOT
4212 handling to use got.glist rather than got.refcount. Likewise for PLT.
4213 (ppc64_elf_gc_sweep_hook): Handle TLS relocs, new GOT and PLT lists.
4214 (func_desc_adjust): Adjust for new PLT list.
4215 (ppc64_elf_adjust_dynamic_symbol): Likewise.
4216 (get_sym_h, get_tls_type): New functions.
4217 (ppc64_elf_edit_opd): Remove unused variable. Use get_sym_h.
4218 (ppc64_elf_tls_optimize): New function.
4219 (allocate_dynrelocs): Adjust for new PLT and GOT lists. Allocate
4220 TLS relocs.
4221 (ppc64_elf_size_dynamic_sections): Likewise.
4222 (ppc_type_of_stub): Adjust for new PLT list.
4223 (ppc_build_one_stub): Likewise.
4224 (ppc64_elf_size_stubs): Likewise. Use get_sym_h. Treat __tls_get_addr
4225 calls specially.
4226 (ppc64_elf_relocate_section): Adjust for new GOT and PLT lists. Handle
4227 TLS relocs. Report local syms using bfd_elf_local_sym_name. Don't
4228 init GOT entries that have a reloc. Generate GOT relocs here..
4229 (ppc64_elf_finish_dynamic_symbol): ..not here. Adjust for PLT list.
4230 * elf64-ppc.h (ppc64_elf_tls_optimize): Declare.
4231
4232 2003-02-04 Andreas Schwab <schwab@suse.de>
4233
4234 * elf32-m68k.c (elf_m68k_hash_entry): Define.
4235 (elf_m68k_link_hash_traverse): Remove.
4236 (elf_m68k_link_hash_newfunc): Use struct bfd_hash_entry and
4237 elf_m68k_hash_entry instead of struct elf_m68k_link_hash_entry to
4238 reduce casting.
4239 (elf_m68k_check_relocs): Use elf_m68k_hash_entry instead of
4240 casting.
4241 (elf_m68k_size_dynamic_sections): Use elf_link_hash_traverse
4242 instead of elf_m68k_link_hash_traverse.
4243 (elf_m68k_discard_copies): Change first parameter to pointer to
4244 struct elf_link_hash_entry and use elf_m68k_hash_entry when struct
4245 elf_m68k_link_hash_entry is needed.
4246
4247 2003-02-04 Alan Modra <amodra@bigpond.net.au>
4248
4249 * elf-bfd.h (struct got_entry, struct plt_entry): Forward declare.
4250 (struct elf_link_hash_entry): Add "glist" and "plist" fields to
4251 "got" union, and declare as gotplt_union. Use gotplt_uinion for
4252 "plt" field.
4253 (struct elf_link_hash_table): Make "init_refcount" a gotplt_union.
4254 Add "init_offset" field.
4255 (struct elf_obj_tdata <local_got>): Add "struct got_entry **" to union.
4256 (elf_local_got_ents): Declare.
4257 * elf.c (_bfd_elf_link_hash_newfunc): Adjust initialization of "got"
4258 and "plt".
4259 (_bfd_elf_link_hash_hide_symbol): Use "init_offset".
4260 (_bfd_elf_link_hash_table_init): Set "init_offset".
4261 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set init_refcount
4262 from init_offset.
4263 (elf_adjust_dynamic_symbol): Set plt and got offsets using init_offset.
4264
4265 * elf.c (bfd_elf_local_sym_name): Split out from..
4266 (group_signature): ..here.
4267 * elf-bfd.h (bfd_elf_local_sym_name): Declare.
4268
4269 2003-02-04 Alan Modra <amodra@bigpond.net.au>
4270
4271 * elf-bfd.h (enum elf_link_info_type): Remove.
4272 (struct bfd_elf_section_data): Move sec_info_type, use_rela_p fields
4273 to struct sec. Remove linkonce_p field.
4274 (elf_linkonce_p): Delete.
4275 (elf_discarded_section): Update for sec_info_type change.
4276 * section.c (struct sec): Add sec_info_type, use_rela_p, has_tls_reloc,
4277 flag11, flag12, flag13, flag14, flag15, flag16, flag20, flag24.
4278 (ELF_INFO_TYPE_NONE): Define.
4279 (ELF_INFO_TYPE_STABS): Define.
4280 (ELF_INFO_TYPE_MERGE): Define.
4281 (ELF_INFO_TYPE_EH_FRAME): Define.
4282 (ELF_INFO_TYPE_JUST_SYMS): Define.
4283 (STD_SECTION): Update struct sec initializer.
4284 * ecoff.c (bfd_debug_section): Likewise.
4285 * elf.c: Likewise. Update occurrences of sec_info_type and use_rela_p.
4286 * elflink.h: Likewise.
4287 * elf-eh-frame.c: Likewise.
4288 * elf64-alpha.c: Likewise.
4289 * elfxx-ia64.c: Likewise.
4290 * elfxx-mips.c: Likewise.
4291 * bfd-in2.h: Regenerate.
4292
4293 * elf32-sparc.c (sec_do_relax): Use elf_section_data macro rather than
4294 referring to used_by_bfd.
4295 * elf64-sparc.c (sec_do_relax): Likewise.
4296 * elf64-mmix.c (mmix_elf_section_data): Likewise.
4297 * elfxx-mips.c (mips_elf_section_data): Likewise.
4298 * ieee.c (ieee_slurp_section_data): Use ieee_per_section macro.
4299 (ieee_get_section_contents): Likewise.
4300 (ieee_new_section_hook): Formatting.
4301 (ieee_canonicalize_reloc): Remove commented out code.
4302 * mmo.c (mmo_section_data): Define. Use throughout file.
4303 * oasys.c (oasys_get_section_contents): Use oasys_per_section macro.
4304
4305 2003-01-31 Graydon Hoare <graydon@redhat.com>
4306
4307 * Makefile.am (opncls.lo): Add dependency upon libiberty.h.
4308 * Makefile.in: Regenerate.
4309 * opncls.c (calc_crc32, get_debug_link_info,
4310 seperate_debug_file_exists, find_seperate_debug_file): New
4311 internal functions.
4312 (bfd_follow_gnu_debuglink): New function. Follow the pointer
4313 contained inside a .gnu_debuglink section.
4314 * bfd-in2.h: Regenerate.
4315
4316 2003-01-29 Alexandre Oliva <aoliva@redhat.com>
4317
4318 * elfxx-mips.c (mips_elf_got_entry_hash): Don't dereference
4319 entry->abfd when it's NULL.
4320
4321 2003-01-27 Alexandre Oliva <aoliva@redhat.com>
4322
4323 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Handle
4324 _bfd_elf_section_offset returning -2 the same way as -1.
4325
4326 * elfxx-mips.c (mips_elf_multi_got): New function.
4327 (struct mips_got_entry): Make symndx and gotidx signed. Moved
4328 addend into union along with address and link hash entry.
4329 (struct mips_got_info): Added bfd2got and next.
4330 (struct mips_elf_hash_sort_data): Added max_unref_got_dynindx.
4331 (mips_elf_got_section, mips_elf_create_got_section): Use
4332 SEC_EXCLUDE bit to tell whether we really need the got
4333 section. Take boolean arguments to disregard an excluded
4334 section, or to create it as excluded. Adjust all callers.
4335 Use mips_elf_got_section all over.
4336 (mips_elf_local_got_index, mips_elf_got_page,
4337 mips_elf_got16_entry): Take input bfd as argument, and pass it
4338 on to mips_elf_create_local_got_entry.
4339 (mips_elf_global_got_index, mips_elf_create_local_got_entry):
4340 Take input bfd as argument, and manage entries in the
4341 appropriate GOT.
4342 (mips_elf_got_offset_from_index): Take input bfd as argument,
4343 and use it to adjust the GP offset of the bfd.
4344 (mips_elf_sort_hash_table, mips_elf_sort_hash_table_f): Move
4345 unreferenced GOT entries of global symbols to the end.
4346 (mips_elf_record_global_got_symbol): Take input bfd as
4347 argument. Add entries to the master GOT hash table.
4348 (struct mips_elf_bfd2got_hash): New.
4349 (struct mips_elf_got_per_bfd_arg): New.
4350 (struct mips_elf_set_global_got_offset_arg): New.
4351 (mips_elf_hash_bfd_vma, mips_elf_multi_got_entry_hash,
4352 mips_elf_multi_got_entry_eq, mips_elf_bfd2got_entry_hash,
4353 mips_elf_bfd2got_entry_eq, mips_elf_make_got_per_bfd,
4354 mips_elf_merge_gots, mips_elf_set_global_got_offset,
4355 mips_elf_resolve_final_got_entry,
4356 mips_elf_resolve_final_got_entries, mips_elf_adjust_gp,
4357 mips_elf_got_for_ibfd): New functions.
4358 (ELF_MIPS_GP_OFFSET): Don't depend on SGI_COMPAT.
4359 (MIPS_ELF_GOT_MAX_SIZE): New macro.
4360 (STUB_LW): Generate 64-bit stub regardless of SGI_COMPAT.
4361 (mips_elf_got_entry_hash): Take new fields into account. Use
4362 mips_elf_hash_bfd_vma.
4363 (mips_elf_got_entry_eq): Take new fields into account.
4364 (mips_elf_create_got_section): Initialize new fields.
4365 (mips_elf_calculate_relocation): Pass input_bfd to functions
4366 that now take it. Adjust gp for the input_bfd.
4367 (mips_elf_allocate_dynamic_relocation,
4368 mips_elf_create_dynamic_relocation,
4369 _bfd_mips_elf_create_dynamic_sections): Use...
4370 (mips_elf_rel_dyn_section): New function. Borrow code from...
4371 (_bfd_mips_elf_check_relocs): Pass input_bfd to functions that
4372 now take it. Create the got section if needed, even if
4373 excluded, before recording a global got symbol. Move some
4374 code to...
4375 (mips_elf_record_local_got_symbol): New fn.
4376 (_bfd_mips_elf_size_dynamic_sections): Disable combreloc.
4377 Compute multi-got global entries offsets. Move GOT code to...
4378 (_bfd_mips_elf_always_size_sections): Call mips_elf_multi_got
4379 if the GOT is too big.
4380 (_bfd_mips_elf_finish_dynamic_symbol): Set got entry of
4381 undefweak symbol to zero. Generate dynamic relocations for
4382 non-primary GOT entries for global symbols.
4383 (_bfd_mips_elf_finish_dynamic_sections): Handle multi-got
4384 case. Generate dynamic relocations for local got entries.
4385 Sort dynamic relocations on N64 too, using...
4386 (sort_dynamic_relocs_64): New fns.
4387 (_bfd_mips_elf_hide_symbol): Adjust multi-got counters.
4388 (_bfd_mips_elf_merge_private_bfd_data): Ignore EF_MIPS_XGOT.
4389
4390 2003-01-27 Alexandre Oliva <aoliva@redhat.com>
4391
4392 * bfd.c (struct _bfd): Added id field.
4393 * opncls.c (_bfd_id_counter): New static variable.
4394 (_bfd_new_bfd): Use it.
4395 * bfd-in2.h: Rebuilt.
4396
4397 2003-01-25 Alan Modra <amodra@bigpond.net.au>
4398
4399 * elf32-sparc.c (bfd_elf32_new_section_hook): Define.
4400
4401 2003-01-25 Jakub Jelinek <jakub@redhat.com>
4402
4403 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Add TLS relocs.
4404 (elf32_sparc_rev32_howto): New variable.
4405 (sparc_reloc_map): Add TLS relocs.
4406 (elf32_sparc_reloc_type_lookup, elf32_sparc_info_to_howto):
4407 Handle REV32.
4408 (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc, elf32_sparc_mkobject):
4409 New functions.
4410 (struct elf32_sparc_dyn_relocs, struct elf32_sparc_link_hash_entry,
4411 struct elf32_sparc_link_hash_table):
4412 New structures.
4413 (elf32_sparc_tdata, elf32_sparc_local_got_tls_type,
4414 elf32_sparc_hash_table): Define.
4415 (link_hash_newfunc, elf32_sparc_link_hash_table_create,
4416 create_got_section, elf32_sparc_create_dynamic_sections,
4417 elf32_sparc_copy_indirect_symbol, elf32_sparc_tls_transition): New
4418 functions.
4419 (elf32_sparc_check_relocs): Handle TLS relocs. Add dynamic reloc
4420 reference counting.
4421 (elf32_sparc_gc_sweep_hook): Likewise.
4422 (elf32_sparc_adjust_dynamic_symbol): Likewise.
4423 (elf32_sparc_size_dynamic_sections): Likewise.
4424 (elf32_sparc_relocate_section): Likewise.
4425 (allocate_dynrelocs, readonly_dynrelocs, dtpoff_base, tpoff):
4426 New functions.
4427 (elf32_sparc_object_p): Allocate backend private object data.
4428 (bfd_elf32_bfd_link_hash_table_create,
4429 elf_backend_copy_indirect_symbol, bfd_elf32_mkobject,
4430 elf_backend_can_refcount): Define.
4431 (elf_backend_create_dynamic_sections): Define to
4432 elf32_sparc_create_dynamic_sections.
4433 * reloc.c: Add SPARC TLS relocs.
4434 * bfd-in2.h, libbfd.h: Rebuilt.
4435 * elf64-sparc.c (sparc64_elf_howto_table): Add TLS relocs.
4436 (sparc_reloc_map): Likewise.
4437
4438 2003-01-24 Martin Schwidefsky <schwidefsky@de.ibm.com>
4439
4440 * bfd-in2.h: Regenerate.
4441 * elf32-s390.c (elf_s390_mkobject, elf_s390_tls_transition,
4442 s390_tls_reloc, dtpoff_base, tpoff, invalid_tls_insn): New functions.
4443 (elf_howto_table): Add TLS relocs.
4444 (elf_s390_reloc_type_lookup): Likewise.
4445 (elf_s390_link_hash_entry): Add tls_type.
4446 (elf_s390_hash_entry, elf_s390_obj_tdata, elf_s390_local_got_tls_type):
4447 New macros.
4448 (elf_s390_link_hash_table): Add tls_ldm_got.
4449 (link_hash_newfunc): Initialize tls_type.
4450 (elf_s390_link_hash_table_create): Initialize refcount of tls_ldm_got.
4451 (elf_s390_copy_indirect_symbol): Copy tls_type information.
4452 (elf_s390_check_relocs): Support TLS relocs.
4453 (elf_s390_gc_sweep_hook): Likewise.
4454 (allocate_dynrelocs): Likewise.
4455 (elf_s390_size_dynamic_sections): Likewise.
4456 (elf_s390_relocate_section): Likewise.
4457 (elf_s390_finish_dynamic_symbol): Likewise.
4458 (bfd_elf32_mkobject): Define for TLS.
4459 * elf64-s390.c: Same changes as for elf32-s390.c.
4460 * libbfd.h: Regenerate.
4461 * reloc.c: Add s390 TLS relocations.
4462
4463 2003-01-24 Charles Lepple <clepple@ghz.cc>
4464
4465 * aclocal.m4: Fix name of --enable-install-libbfd switch.
4466
4467 2003-01-23 Nick Clifton <nickc@redhat.com>
4468
4469 * Add sh2e support:
4470 2002-04-02 Elena Zannoni <ezannoni@redhat.com>
4471 * archures.c (bfd_mach_sh2e): Added.
4472 * bfd-in2.h: Rebuilt.
4473 * cpu-sh.c (arch_info_struct): Added SH2e.
4474 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle EF_SH2E.
4475
4476 2003-01-23 Alan Modra <amodra@bigpond.net.au>
4477
4478 * elf-bfd.h (struct bfd_elf_section_data): Remove tdata. Change
4479 dynindx to an int. Rearrange for better packing.
4480 * elf.c (_bfd_elf_new_section_hook): Don't alloc if already done.
4481 * elf32-mips.c (bfd_elf32_new_section_hook): Define.
4482 * elf32-sh64.h: New. Split out from include/elf/sh.h.
4483 (struct _sh64_elf_section_data): New struct.
4484 (sh64_elf_section_data): Don't dereference sh64_info (was tdata).
4485 * elf32-sh64-com.c: Include elf32-sh64.h.
4486 * elf32-sh64.c: Likewise.
4487 (sh64_elf_new_section_hook): New function.
4488 (bfd_elf32_new_section_hook): Define.
4489 (sh64_elf_fake_sections): Adjust for sh64_elf_section_data change.
4490 (sh64_bfd_elf_copy_private_section_data): Likewise.
4491 (sh64_elf_final_write_processing): Likewise.
4492 * elf32-sparc.c (struct elf32_sparc_section_data): New.
4493 (elf32_sparc_new_section_hook): New function.
4494 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
4495 (sec_do_relax): Define.
4496 (elf32_sparc_relax_section): Adjust to use sec_do_relax.
4497 (elf32_sparc_relocate_section): Likewise.
4498 * elf64-mips.c (bfd_elf64_new_section_hook): Define.
4499 * elf64-mmix.c (struct _mmix_elf_section_data): New.
4500 (mmix_elf_section_data): Define. Use throughout file.
4501 (mmix_elf_new_section_hook): New function.
4502 (bfd_elf64_new_section_hook): Define.
4503 * elf64-ppc.c (struct _ppc64_elf_section_data): New.
4504 (ppc64_elf_section_data): Define. Use throughout.
4505 (ppc64_elf_new_section_hook): New function.
4506 (bfd_elf64_new_section_hook): Define.
4507 * elf64-sparc.c (struct sparc64_elf_section_data): New.
4508 (sparc64_elf_new_section_hook): New function.
4509 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
4510 (sec_do_relax): Define.
4511 (sparc64_elf_relax_section): Adjust to use sec_do_relax.
4512 (sparc64_elf_relocate_section): Likewise.
4513 (bfd_elf64_new_section_hook): Define.
4514 * elfn32-mips.c (bfd_elf32_new_section_hook): Define.
4515 * elfxx-mips.c (struct _mips_elf_section_data): New.
4516 (mips_elf_section_data): Define. Use throughout.
4517 (_bfd_mips_elf_new_section_hook): New function.
4518 (mips_elf_create_got_section): Don't alloc used_by_bfd.
4519 * elfxx-mips.h (_bfd_mips_elf_new_section_hook): Declare.
4520 * elfxx-target.h (bfd_elfNN_new_section_hook): Add #ifndef.
4521 * Makefile.am: Run "make dep-am".
4522 * Makefile.in: Regenerate.
4523
4524 2003-01-21 Richard Henderson <rth@redhat.com>
4525
4526 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_PLT_LOC): New.
4527 (struct alpha_elf_link_hash_entry): Add plt_old_section, plt_old_value.
4528 (elf64_alpha_adjust_dynamic_symbol): Set them.
4529 (elf64_alpha_size_plt_section_1): Reset them when plt entry removed.
4530 (elf64_alpha_relax_tls_get_addr): Handle LDM relocs. Frob the
4531 symbol index when relaxing LDM to TPREL.
4532 (elf64_alpha_relax_section): Likewise. Allow relaxation of GD
4533 relocs, even if the target isn't locally defined.
4534 (elf64_alpha_check_relocs): Frob LDM reloc symndx to zero.
4535 (elf64_alpha_relocate_section): Likewise. Force TP-relative
4536 relocs vs symndx 0 to the tp base.
4537
4538 2003-01-21 Fabio Alemagna <falemagn@aros.org>
4539
4540 * config.bfd: Handle i[3456]86-*-aros*.
4541
4542 2003-01-21 Andreas Schwab <schwab@suse.de>
4543
4544 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Define.
4545 (struct ppc_elf_link_hash_entry): Define.
4546 (ppc_elf_hash_entry): New function.
4547 (struct ppc_elf_link_hash_table): Define.
4548 (ppc_elf_hash_table): New function.
4549 (ppc_elf_link_hash_newfunc): New function.
4550 (ppc_elf_link_hash_table_create): New function.
4551 (ppc_elf_copy_indirect_symbol): New function.
4552 (allocate_dynrelocs): New function.
4553 (readonly_dynrelocs): New function.
4554 (ppc_elf_size_dynamic_sections): Allocate space for dynamic
4555 relocs and determine DT_TEXTREL.
4556 (ppc_elf_check_relocs): Don't do that here, just count the
4557 dynamic relocs.
4558 (ppc_elf_gc_sweep_hook): Discard any dynamic relocs against the
4559 removed section.
4560 (bfd_elf32_bfd_link_hash_table_create): Define.
4561 (elf_backend_copy_indirect_symbol): Define.
4562
4563 2003-01-21 Richard Henderson <rth@redhat.com>
4564
4565 * elf64-alpha.c (alpha_dynamic_entries_for_reloc): GOTTPREL and
4566 TPREL also get a reloc if shared. Remove SREL support.
4567 (elf64_alpha_emit_dynrel): New.
4568 (elf64_alpha_relocate_section): Use it. Resolve dynamic TPREL
4569 and GOTTPREL relocs to local symbols against the tp base.
4570 (elf64_alpha_finish_dynamic_symbol): Use elf64_alpha_emit_dynrel.
4571
4572 * elf64-alpha.c (elf64_alpha_relax_got_load): Decrement got
4573 use count before clobbering r_type.
4574 (elf64_alpha_relax_tls_get_addr): Don't use pos[1] if insn
4575 ordering would mean dataflow inspection is necessary.
4576
4577 2003-01-20 Svein E. Seldal <Svein.Seldal@solidas.com>
4578
4579 * coffcode.h (coff_set_flags): Added get/set arch hooks.
4580
4581 2003-01-20 Fabio Alemagna <falemagn@aros.org>
4582
4583 * elf32-sh.c: Treat elfNN_bed like other macros defined in
4584 elfxx-target.h and #undef it before #define'ing it.
4585 * elf32-i386.c: Likewise.
4586 * elf32-sh64.c: Likewise.
4587 * elf64-alpha.c: Likewise.
4588 * elf64-sh64.c: Likewise.
4589
4590 2003-01-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
4591
4592 * bfd-in2.h: Regenerate.
4593 * elf32-s390.c (elf_s390_adjust_gotplt): New prototype.
4594 (elf_howto_table): Rename R_390_GOTOFF to R_390_GOTOFF32. Add
4595 R_390_GOTOFF16, R_390_GOTOFF64, R_390_GOTPLT12, R_390_GOTPLT16,
4596 R_390_GOTPLT32, R_390_GOTPLT64, R_390_GOTPLTENT, R_390_PLTOFF16,
4597 R_390_PLTOFF32 and R_390_PLTOFF64.
4598 (elf_s390_reloc_type_lookup): Likewise.
4599 (struct elf_s390_link_hash_entry): Add gotplt_refcount to keep track
4600 of GOTPLT references to a function.
4601 (link_hash_newfunc): Initialize gotplt_refcount.
4602 (elf_s390_check_relocs): Move allocation of local_got_refcounts array
4603 and creation of the got section out of the main switch. Add support
4604 for the gotoff, gotplt and pltoff relocations.
4605 (elf_s390_gc_sweep_hook): Add reference counting for gotoff, gotplt
4606 and pltoff.
4607 (elf_s390_adjust_gotplt): New function.
4608 (elf_s390_adjust_dynamic_symbol): Adjust gotplt refcount for removed
4609 plt entries.
4610 (allocate_dynrelocs): Add comment.
4611 (elf_s390_relocate_section): Change r_type to unsigned. Add support
4612 for gotoff, gotplt and pltoff relocations.
4613 * elf64-s390.c: Same changes as for elf32-s390.c.
4614 * libbfd.h: Regenerate.
4615 * reloc.c: Add BFD_RELOC_390_GOTOFF64, BFD_RELOC_390_GOTPLT12,
4616 BFD_RELOC_390_GOTPLT16, BFD_RELOC_390_GOTPLT32, BFD_RELOC_390_GOTPLT64,
4617 BFD_RELOC_390_GOTPLTENT, BFD_RELOC_390_PLTOFF16, BFD_RELOC_390_PLTOFF32
4618 and BFD_RELOC_390_PLTOFF64.
4619
4620 2003-01-18 Jakub Jelinek <jakub@redhat.com>
4621
4622 * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle
4623 R_IA64_TPREL64[LM]SB against non-global symbol properly.
4624
4625 2003-01-16 Jakub Jelinek <jakub@redhat.com>
4626
4627 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add
4628 self_dtpmod_done and self_dtpmod_offset.
4629 (allocate_global_data_got): Only use one got entry for all
4630 dtpmod relocs against local symbols.
4631 (allocate_dynrel_entries): Only need .rela.got entry for
4632 dtpmod against global symbol.
4633 (elfNN_ia64_size_dynamic_sections): Initialize self_dtpmod_offset.
4634 Reserve space in .rela.got for the local dtpmod entry.
4635 (set_got_entry): Initialize the common local dtpmod .got entry.
4636 (elfNN_ia64_relocate_section): Handle R_IA_64_DTPREL64LSB
4637 and R_IA_64_DTPREL64MSB.
4638
4639 2003-01-16 Alan Modra <amodra@bigpond.net.au>
4640
4641 * elf64-ppc.c: Include elf/ppc64.h rather than elf/ppc.h.
4642 (R_PPC_*): Rename all occurrences to R_PPC64_*.
4643 (R_PPC64_ADDR30): Rename all occurrences to R_PPC64_REL30.
4644 (enum elf_ppc_reloc_type): Ditto to enum elf_ppc64_reloc_type.
4645 (ppc64_elf_gc_sweep_hook): Handle R_PPC64_REL30 along with other
4646 relative relocs, not with absolute ones.
4647 * Makefile.am: Run "make dep-am".
4648 * Makefile.in: Regenerate.
4649 * po/SRC-POTFILES.in: Regenerate.
4650
4651 2003-01-15 Andreas Schwab <schwab@suse.de>
4652
4653 * elf32-ppc.c (ppc_elf_check_relocs): Don't set DF_TEXTREL for a
4654 relocation against a non-allocated readonly section.
4655
4656 2003-01-10 Alan Modra <amodra@bigpond.net.au>
4657
4658 * elf32-ppc.c (ppc_elf_relocate_section): Adjust addend for GOT16_HA.
4659 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. PLTGOT16_HA too.
4660
4661 2002-01-08 Klee Dienes <kdienes@apple.com>
4662
4663 * Makefile.am (ALL_MACHINES): Use cpu-msp430.lo, not cpu-msp430.c.
4664 (BFD32_BACKENDS): Use elf32-msp430.lo, not elf32-msp430.c.
4665 * Makefile.in: Regenerate.
4666
4667 2003-01-08 Alexandre Oliva <aoliva@redhat.com>
4668
4669 * elfn32-mips.c (prev_reloc_section): New.
4670 (GET_RELOC_ADDEND): Use it. Parenthesize macro arguments.
4671 (SET_RELOC_ADDEND): Parenthesize macro argument.
4672
4673 2003-01-07 John David Anglin <dave.anglin@nrc.gc.ca>
4674
4675 * elf32-hppa.c (final_link_relocate): For all DP relative relocations,
4676 adjust addil instructions if the symbol has no section.
4677
4678 2003-01-07 DJ Delorie <dj@redhat.com>
4679
4680 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make REL_12 not
4681 partial_inplace.
4682
4683 2003-01-07 Andreas Schwab <schwab@suse.de>
4684
4685 * elf32-m68k.c (elf_m68k_check_relocs): Don't set DF_TEXTREL for
4686 PC relative relocations.
4687 (elf_m68k_discard_copies): Set it here instead.
4688
4689 2002-01-02 Ben Elliston <bje@redhat.com>
4690 Jeff Johnston <jjohnstn@redhat.com>
4691
4692 * Makefile.am (ALL_MACHINES): Add cpu-iq2000.lo.
4693 (ALL_MACHINES_CFILES): Add cpu-iq2000.c.
4694 (BFD32_BACKENDS): Add elf32-iq2000.lo.
4695 (BFD32_BACKENDS_CFILES): Add elf32-iq2000.c.
4696 (cpu-iq2000.lo): New target.
4697 * Makefile.in: Regenerate.
4698 * config.bfd: Handle iq2000-*-elf.
4699 * archures.c (bfd_architecture): Add bfd_{arch,mach}_iq2000.
4700 (bfd_archures_list): Add bfd_iq2000_arch.
4701 * configure.in: Handle bfd_elf32_iq2000_vec.
4702 * configure: Regenerate.
4703 * reloc.c: Add BFD_RELOC_IQ2000_OFFSET_16, BFD_RELOC_IQ2000_OFFSET_21,
4704 and BFD_RELOC_IQ2000_UHI16.
4705 * targets.c (bfd_elf32_iq2000_vec): Declare.
4706 (bfd_target_vector): Add bfd_elf32_iq2000_vec.
4707 * elf.c (prep_headers): Set e_machine to EM_IQ2000.
4708 * cpu-iq2000.c: New file.
4709 * elf32-iq2000.c: Likewise.
4710 * libbfd.h: Regenerate.
4711 * bfd-in2.h: Likewise.
4712
4713 2003-01-02 Richard Sandiford <rsandifo@redhat.com>
4714
4715 * elfxx-mips.c: Include libiberty.h.
4716 (elf_mips_isa, _bfd_mips_elf_mach_extends_p): Remove.
4717 (mips_set_isa_flags): New function, split out from...
4718 (_bfd_mips_elf_final_write_processing): ...here. Only call
4719 mips_set_isa_flags if the EF_MIPS_MACH bits are clear.
4720 (mips_mach_extensions): New array.
4721 (mips_32bit_flags_p): New function.
4722 (_bfd_mips_elf_merge_private_bfd_data): Rework architecture checks.
4723 Use mips_32bit_flags_p to check if one binary is 32-bit and the
4724 other is 64-bit. When adopting IBFD's architecture, adopt the
4725 bfd_mach as well as the flags.
4726
4727 2003-01-02 Nick Kelsey <nickk@ubicom.com>
4728
4729 * elf32-ip2k.c: Re-work of linker relaxation code for the ip2k to
4730 fix internal errors, fix bad code generation, fix incorrect stabs
4731 information, and improve ability to eliminate redundant page
4732 instructions. Added code to ip2k_final_link_relocate to self-verify
4733 the linker relaxation. Fix formatting problems.
4734
4735 2002-12-30 Chris Demetriou <cgd@broadcom.com>
4736
4737 * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mipsisa32r2 case.
4738 * archures.c (bfd_mach_mipsisa32r2): New define.
4739 * bfd-in2.h: Regenerate.
4740 * cpu-mips.c (I_mipsisa32r2): New enum value.
4741 (arch_info_struct): Add entry for I_mipsisa32r2.
4742 * elfxx-mips.c (elf_mips_isa, _bfd_elf_mips_mach)
4743 (_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_32R2.
4744 (_bfd_mips_elf_final_write_processing): Add
4745 bfd_mach_mipsisa32r2 case.
4746 (_bfd_mips_elf_merge_private_bfd_data): Handle merging of
4747 binaries marked as using MIPS32 Release 2.
4748
4749 2002-12-30 Dmitry Diky <diwil@mail.ru>
4750
4751 * Makefile.am: Add msp430 target.
4752 * configure.in: Likewise.
4753 * Makefile.in: Regenerate.
4754 * configure: Regenerate.
4755 * archures.c: Add msp430 architecture vector.
4756 * config.bfd: Likewise.
4757 * reloc.c: Add msp430 relocs.
4758 * targets.c: Add msp320 target.
4759 * cpu-msp430.c: New file: msp430 cpu detection.
4760 * elf32-msp430.c: New file: msp430 reloc processing.
4761 * bfd-in2.h: Regenerate.
4762 * libbfd.h: Regenerate.
4763
4764 2002-12-28 Jakub Jelinek <jakub@redhat.com>
4765
4766 * elf.c (elf_sort_sections): Don't reorder .tbss.
4767 (assign_file_positions_for_segments): Only adjust off/voff
4768 for increased alignment in PT_LOAD or PT_NOTE segment,
4769 but adjust p_filesz for .tbss too. in PT_LOAD consider
4770 .tbss to have zero memory size.
4771 (copy_private_bfd_data) [SECTION_SIZE]: Define.
4772 [IS_CONTAINED_BY_VMA, IS_CONTAINED_BY_LMA]: Use it.
4773 [INCLUDE_SECTION_IN_SEGMENT]: Only put SHF_TLS sections
4774 into PT_TLS segment. Never put SHF_TLS sections in
4775 segments other than PT_TLS or PT_LOAD.
4776
4777 * elf64-alpha.c (elf64_alpha_finish_dynamic_sections): Clear .plt
4778 sh_entsize.
4779
4780 2002-12-23 DJ Delorie <dj@redhat.com>
4781
4782 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Fix logic reversal.
4783
4784 2002-12-23 Alan Modra <amodra@bigpond.net.au>
4785
4786 * elflink.h (elf_link_output_extsym): Heed strip_discarded.
4787
4788 2002-12-23 Nick Clifton <nickc@redhat.com>
4789
4790 * archures.c (bfd_arch_get_compatible): Add third parameter
4791 'accept_unknowns'. Only accept unknown format BFDs if
4792 accept_unknowns is true, or if the format is "binary".
4793 * bfd-in2.h: Regenerate.
4794
4795 2002-12-21 Nick Clifton <nickc@redhat.com>
4796
4797 * coff-arm.c (coff_arm_relocate_section): Disable WINCE workaround
4798 that subtracted 8 from pc relative relocations.
4799
4800 2002-12-20 Kazu Hirata <kazu@cs.umass.edu>
4801
4802 * coff-h8300.c: Fix comment typos.
4803 * coffcode.h: Likewise.
4804 * cpu-cris.c: Likewise.
4805 * elf32-vax.c: Likewise.
4806 * genlink.h: Likewise.
4807 * linker.c: Likewise.
4808 * som.c: Likewise.
4809 * tekhex.c: Likewise.
4810 * vms-misc.c: Likewise.
4811
4812 2002-12-20 DJ Delorie <dj@redhat.com>
4813
4814 * reloc.c: Add BFD_RELOC_XSTORMY16_12.
4815 * libbfd.h: Regenerate.
4816 * bfd-in2.h: Regenerate.
4817 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_12.
4818 (xstormy16_reloc_map): Add R_XSTORMY16_12.
4819
4820 2002-12-19 Kazu Hirata <kazu@cs.umass.edu>
4821
4822 * doc/bfdint.texi: Fix typos.
4823
4824 2002-12-20 Paul Eggert <eggert@twinsun.com>
4825
4826 Port to POSIX 1003.1-2001.
4827 * acinclude.m4 (AM_INSTALL_LIBBFD): Do not rely on "test -o".
4828 * configure.in (build-warnings): Likewise.
4829 (Horrible hacks to build DLLs on Windows): Do not rely on "tail -1".
4830 * aclocal.m4: Regenerate.
4831 * config.in: Regenerate.
4832 * configure: Regenerate.
4833
4834 2002-12-19 Alan Modra <amodra@bigpond.net.au>
4835
4836 * coff-h8300.c: Include libiberty.h.
4837 (h8300_reloc16_extra_cases): Check the hash table creator before
4838 referencing h8300 specific fields. Stash the hash table pointer
4839 in a local var. Comment typo fixes.
4840 (h8300_bfd_link_add_symbols): Likewise.
4841
4842 * reloc.c (struct reloc_howto_struct): Revise src_mask and
4843 dst_mask comments.
4844 * bfd-in2.h: Regenerate.
4845
4846 2002-12-18 Alan Modra <amodra@bigpond.net.au>
4847
4848 * elf32-ppc.c (ppc_elf_relocate_section): Reorganize dynamic reloc
4849 code a little. Comment on dynamic relocs against section symbols.
4850
4851 2002-12-17 Roger Sayle <roger@eyesopen.com>
4852
4853 * configure.host (ia64-*-hpux*): Support 64 bit targets using
4854 the HP compiler's "long long".
4855
4856 2002-12-16 Andrew MacLeod <amacleod@redhat.com>
4857
4858 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_LO16
4859 and R_XSTORMY16_HI16) howto entries.
4860 (xstormy16_reloc_map): Map R_XSTORMY16_{LO,HI}16 to BFD_RELOC_{LO,HI}16.
4861 (xstormy16_info_to_howto_rela): Use R_XSTORMY16_GNU_VTINHERIT to
4862 determine the start of the second reloc table.
4863
4864 2002-12-16 Nathan Tallent <eraxxon@alumni.rice.edu>
4865
4866 * ecofflink.c: Fix the reading of the debugging information
4867 of Tru64/Alpha binaries that are produced by recent Compaq
4868 compilers.
4869 (mk_fdrtab): Fix error in creating the FDR (file descriptor)
4870 table.
4871 (lookup_line): Because of the strange information sometimes
4872 generated by Compaq's recent compilers, change how the FDR
4873 table is searched so that PDRs (procedure descriptors) are
4874 correctly found. Note that this change is really more of a hack;
4875 however, I have included extensive documentation as to why
4876 this is the best solution short of an extensive rewrite or
4877 another hack.
4878 (fdrtab_lookup): Add comments to explain the algorithm.
4879
4880 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
4881
4882 * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Reorder
4883 initializers to match struct declaration.
4884
4885 2002-12-12 Alan Modra <amodra@bigpond.net.au>
4886
4887 * dwarf2.c (comp_unit_contains_address): Comment typo fix.
4888 * elf.c (get_program_header_size): Likewise.
4889 * elf32-m32r.c (m32r_elf_lo16_reloc): Likewise.
4890 (m32r_elf_generic_reloc): Likewise.
4891 * elf32-ppc.c (ppc_elf_howto_init): Likewise.
4892 * elflink.h (elf_bfd_discard_info): Likewise.
4893
4894 2002-12-12 Alan Modra <amodra@bigpond.net.au>
4895
4896 * elf32-i386.c (elf_i386_finish_dynamic_sections): Add output_offset
4897 to DT_JMPREL. Use srelplt input section size for DT_PLTRELSZ and
4898 DT_RELSZ adjustment, not output section. Avoid writing tags when
4899 unchanged. Don't assume linker script is sane, adjust DT_REL too.
4900 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Just use raw
4901 size of srelplt for DT_PLTRELSZ. Use srelplt input section size for
4902 DT_RELASZ adjustment, not output section. Avoid writing tags when
4903 unchanged. Adjust DT_RELA.
4904 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Tweaks for better
4905 formatting. Avoid writing tags when unchanged. Adjust DT_RELA.
4906
4907 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
4908
4909 * elfxx-mips.c (mips_elf_calculate_relocation): Don't divide
4910 addend by 4.
4911
4912 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
4913
4914 * elfxx-mips.c (struct mips_got_entry): New.
4915 (struct mips_got_info): Added got_entries field.
4916 (mips_elf_got_entry_hash, mips_elf_got_entry_eq): New functions.
4917 (mips_elf_local_got_index, mips_elf_got_page,
4918 mips_elf_got16_entry): Re-implement in terms of new...
4919 (mips_elf_create_local_got_entry): Rewrite to use got_entries.
4920 Change return type.
4921 (mips_elf_highest): Warning clean-up.
4922 (mips_elf_create_got_section): Initialize got_entries.
4923 (_bfd_mips_elf_check_relocs): Use got_entries to estimate
4924 local got size.
4925 (_bfd_mips_elf_size_dynamic_sections): Do not account for
4926 GOT_PAGE entries, since we now reuse GOT16 entries.
4927
4928 2002-12-10 Jason Thorpe <thorpej@wasabisystems.com>
4929
4930 * aoutx.h (set_section_contents): Allow an otherwise unrepresentable
4931 read-only section that lies after .text and before .data to be
4932 written into the output file and included in a_text.
4933 (translate_to_native_sym_flags): If an otherwise unrepresentable
4934 section was merged with .text, convert its symbols to N_TEXT
4935 symbols.
4936 * libaout.h (aout_section_merge_with_text_p): New macro.
4937
4938 2002-12-08 Alan Modra <amodra@bigpond.net.au>
4939
4940 * bfd-in.h: Comment typo fix. Formatting.
4941 * bfd-in2.h: Regenerate.
4942 * coff64-rs6000.c (xcoff64_openr_next_archived_file): Warning fix.
4943 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): Prototype.
4944 * elf64-mmix.c (mmix_dump_bpo_gregs): Warning fix.
4945
4946 2002-12-05 Richard Henderson <rth@redhat.com>
4947
4948 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21BI.
4949 Only send PCREL21B though the plt. Fix installed reloc type.
4950 (elfNN_ia64_relocate_section): Give error for dynamic reloc
4951 against PCREL22 or PCREL64I; clean up error messages for
4952 branch relocs.
4953
4954 2002-12-04 Kevin Buettner <kevinb@redhat.com>
4955
4956 * elf64-mips.c (elf64_mips_grok_prstatus, elf64_mips_grok_psinfo):
4957 New functions.
4958 (elf_backend_grok_prstatus, elf_backend_grok_psinfo): Define.
4959
4960 2002-12-04 David Mosberger <davidm@hpl.hp.com>
4961
4962 * cpu-ia64-opc.c: Add operand constant "ar.csd".
4963
4964 2002-12-04 H.J. Lu <hjl@gnu.org>
4965
4966 * elfxx-ia64.c (get_local_sym_hash): Use section ID instead of
4967 BFD address when constructing local name.
4968
4969 2002-12-04 Andreas Schwab <schwab@suse.de>
4970
4971 * elf32-m68k.c (struct elf_m68k_link_hash_table): Add sym_sec
4972 member.
4973 (elf_m68k_link_hash_table_create): Initialize it.
4974 (elf_m68k_check_relocs): Handle symbols that are forced to be
4975 local due to visibility changes.
4976 (elf_m68k_adjust_dynamic_symbol): Likewise.
4977 (elf_m68k_size_dynamic_sections): Likewise.
4978 (elf_m68k_discard_copies): Likewise.
4979 (elf_m68k_relocate_section): Likewise.
4980
4981 2002-12-04 Alan Modra <amodra@bigpond.net.au>
4982
4983 * elf64-ppc.c (ppc64_elf_edit_opd): Correct typo.
4984
4985 2002-12-04 Alan Modra <amodra@bigpond.net.au>
4986
4987 * srec.c (srec_write_symbols): Restore '$' prefix to address
4988 accidentally removed in 2002-04-04 change.
4989 (srec_get_symtab): Use 0 instead of `(long) FALSE'.
4990
4991 2002-12-03 Nick Clifton <nickc@redhat.com>
4992
4993 * elf32-ppc.c (apuinfo_list_init): New function.
4994 (apuinfo_list_add): New function: Add a value to the list.
4995 (apuinfo_list_length): New function: Return the number of
4996 values on the list.
4997 (apuinfo_list_element): New function: Return a value on the
4998 list.
4999 (apuinfo_list_finish): New function: Free the resources used
5000 by the list.
5001 (ppc_elf_begin_write_processing): New function. Scan the
5002 input bfds for apuinfo sections.
5003 (ppc_elf_write_section): New function: Delay the creation of
5004 the contents of an apuinfo section in an output bfd.
5005 (ppc_elf_final_write_processing): New function. Create the
5006 contents of an apuinfo section in an output bfd.
5007 (elf_backend_begin_write_processing): Define.
5008 (elf_backend_final_write_processing): Define.
5009 (elf_backend_write_section): Define.
5010
5011 2002-12-03 Richard Henderson <rth@redhat.com>
5012
5013 * cpu-ia64-opc.c (elf64_ia64_operands): Add ldxmov entry.
5014
5015 2002-12-01 Stephane Carrez <stcarrez@nerim.fr>
5016
5017 Fix PR savannah/1417:
5018 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Don't adjust
5019 branch if it goes to the start of the deleted region.
5020
5021 2002-12-01 Stephane Carrez <stcarrez@nerim.fr>
5022
5023 * bfd-in2.h (bfd_mach_m6812): Rebuild.
5024 * archures.c (bfd_mach_m6812_default, bfd_mach_m6812,
5025 bfd_mach_m6812s): Declare.
5026
5027 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): New function.
5028 (_bfd_m68hc12_elf_set_private_flags): Call it.
5029 (_bfd_m68hc12_elf_print_private_bfd_data): Report processor version.
5030 (_bfd_m68hc12_elf_merge_private_bfd_data): Merge the flags and
5031 report microcontroller incompatibilities (HC12 vs HCS12).
5032 (elf_backend_object_p): Update.
5033
5034 2002-11-30 Alan Modra <amodra@bigpond.net.au>
5035
5036 * bfd-in.h (TRUE_FALSE_ALREADY_DEFINED, BFD_TRUE_FALSE): Delete.
5037 (enum bfd_boolean, boolean): Delete.
5038 (bfd_boolean): Typedef to an int.
5039 (FALSE, TRUE): Define.
5040 * aix386-core.c, aix5ppc-core.c, aout-adobe.c, aout-arm.c, aout-cris.c,
5041 aout-encap.c, aout-ns32k.c, aout-target.h, aout-tic30.c, aoutf1.h,
5042 aoutx.h, archive.c, archive64.c, archures.c, bfd-in.h, bfd.c, bfdwin.c,
5043 binary.c, bout.c, cache.c, cisco-core.c, coff-a29k.c, coff-alpha.c,
5044 coff-apollo.c, coff-arm.c, coff-aux.c, coff-h8300.c, coff-h8500.c,
5045 coff-i386.c, coff-i860.c, coff-i960.c, coff-ia64.c, coff-m68k.c,
5046 coff-m88k.c, coff-mcore.c, coff-mips.c, coff-or32.c, coff-ppc.c,
5047 coff-rs6000.c, coff-sh.c, coff-sparc.c, coff-stgo32.c, coff-tic30.c,
5048 coff-tic4x.c, coff-tic54x.c, coff-tic80.c, coff-w65.c, coff-we32k.c,
5049 coff-z8k.c, coff64-rs6000.c, coffcode.h, coffgen.c, cofflink.c,
5050 corefile.c, cpu-a29k.c, cpu-alpha.c, cpu-arc.c, cpu-arm.c, cpu-avr.c,
5051 cpu-cris.c, cpu-d10v.c, cpu-d30v.c, cpu-dlx.c, cpu-fr30.c, cpu-frv.c,
5052 cpu-h8300.c, cpu-h8500.c, cpu-hppa.c, cpu-i370.c, cpu-i386.c,
5053 cpu-i860.c, cpu-i960.c, cpu-ia64.c, cpu-ip2k.c, cpu-m10200.c,
5054 cpu-m10300.c, cpu-m32r.c, cpu-m68hc11.c, cpu-m68hc12.c, cpu-m68k.c,
5055 cpu-m88k.c, cpu-mcore.c, cpu-mips.c, cpu-mmix.c, cpu-ns32k.c,
5056 cpu-openrisc.c, cpu-or32.c, cpu-pdp11.c, cpu-pj.c, cpu-powerpc.c,
5057 cpu-rs6000.c, cpu-s390.c, cpu-sh.c, cpu-sparc.c, cpu-tic30.c,
5058 cpu-tic4x.c, cpu-tic54x.c, cpu-tic80.c, cpu-v850.c, cpu-vax.c,
5059 cpu-w65.c, cpu-we32k.c, cpu-xstormy16.c, cpu-z8k.c, dwarf1.c,
5060 dwarf2.c, ecoff.c, ecofflink.c, efi-app-ia32.c, efi-app-ia64.c,
5061 elf-bfd.h, elf-eh-frame.c, elf-hppa.h, elf-m10200.c, elf-m10300.c,
5062 elf-strtab.c, elf.c, elf32-arc.c, elf32-arm.h, elf32-avr.c,
5063 elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c, elf32-fr30.c,
5064 elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c, elf32-hppa.h,
5065 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
5066 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
5067 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
5068 elf32-pj.c, elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-sh64-com.c,
5069 elf32-sh64.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
5070 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
5071 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-ppc.h, elf64-s390.c,
5072 elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c,
5073 elfarm-oabi.c, elfcode.h, elfcore.h, elflink.c, elflink.h,
5074 elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c, elfxx-mips.h,
5075 elfxx-target.h, format.c, freebsd.h, genlink.h, hash.c, hp300hpux.c,
5076 hppabsd-core.c, hpux-core.c, i386aout.c, i386linux.c, i386lynx.c,
5077 i386mach3.c, i386msdos.c, i386os9k.c, ieee.c, ihex.c, irix-core.c,
5078 libaout.h, libbfd-in.h, libbfd.c, libcoff-in.h, libecoff.h, libieee.h,
5079 libnlm.h, liboasys.h, libpei.h, libxcoff.h, linker.c, lynx-core.c,
5080 m68klinux.c, m68klynx.c, mach-o.c, mach-o.h, merge.c, mipsbsd.c,
5081 mmo.c, netbsd-core.c, netbsd.h, nlm.c, nlm32-alpha.c, nlm32-i386.c,
5082 nlm32-ppc.c, nlm32-sparc.c, nlmcode.h, oasys.c, opncls.c, osf-core.c,
5083 pc532-mach.c, pdp11.c, pe-arm.c, pe-i386.c, pe-mcore.c, pe-mips.c,
5084 pe-sh.c, peXXigen.c, pef.c, pei-arm.c, pei-i386.c, pei-mcore.c,
5085 pei-mips.c, pei-sh.c, peicode.h, ppcboot.c, ptrace-core.c, reloc.c,
5086 reloc16.c, riscix.c, rs6000-core.c, sco5-core.c, section.c, simple.c,
5087 som.c, som.h, sparclinux.c, sparclynx.c, srec.c, stabs.c, sunos.c,
5088 syms.c, targets.c, tekhex.c, ticoff.h, trad-core.c, versados.c,
5089 vms-gsd.c, vms-hdr.c, vms-misc.c, vms-tir.c, vms.c, vms.h,
5090 xcoff-target.h, xcofflink.c, xsym.c, xsym.h: Replace boolean with
5091 bfd_boolean, true with TRUE, false with FALSE. Simplify comparisons
5092 of bfd_boolean vars with TRUE/FALSE. Formatting.
5093 * bfd-in2.h, libbfd.h, libcoff.h: Regenerate
5094
5095 2002-11-28 Alan Modra <amodra@bigpond.net.au>
5096
5097 * elf-bfd.h: Replace occurrences of Elf32_Internal_* and
5098 Elf64_Internal_* with Elf_Internal_*. Replace Elf_Internal_Rel
5099 with Elf_Internal_Rela.
5100 * elf-hppa.h, elf-m10200.c, elf-m10300.c, elf32-arc.c, elf32-arm.h,
5101 elf32-avr.c, elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c,
5102 elf32-fr30.c, elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c,
5103 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
5104 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
5105 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
5106 elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-v850.c, elf32-vax.c,
5107 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
5108 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
5109 elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c, elfarm-oabi.c,
5110 elfcode.h, elflink.h, elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c: Ditto.
5111 * elf-hppa.h (elf_hppa_internal_shdr): Delete. Use Elf_Internal_Shdr
5112 throughout instead.
5113 * elf.c (_bfd_elf_no_info_to_howto_rel): Delete.
5114 * elfcode.h (elf_swap_reloca_in): Pass source operand as a bfd_byte *.
5115 Remove INLINE keyword.
5116 (elf_swap_reloc_in): Likewise. Also clear r_addend.
5117 (elf_swap_reloc_out, elf_swap_reloca_out): Pass destination operand
5118 as a bfd_byte *.
5119 (elf_write_relocs): Consolidate REL and RELA code.
5120 (elf_slurp_reloc_table_from_section): Simplify REL code.
5121 (NAME(_bfd_elf,size_info)): Populate reloc swap entries.
5122 * elf-bfd.h (MAX_INT_RELS_PER_EXT_REL): Define.
5123 * elflink.h (elf_link_read_relocs_from_section): Consolidate REL and
5124 RELA code.
5125 (elf_link_adjust_relocs): Likewise. Don't malloc space for temp
5126 reloc array, use a fixed size of MAX_INT_RELS_PER_EXT_REL.
5127 (elf_link_output_relocs): Likewise.
5128 (elf_reloc_link_order): Likewise.
5129 (elf_finish_pointer_linker_section): Likewise.
5130 (struct elf_link_sort_rela): Remove union.
5131 (elf_link_sort_cmp1): Update to suit.
5132 (elf_link_sort_cmp2): Here too.
5133 (elf_link_sort_relocs): Consolidate REL and RELA code. Fix memory
5134 over-allocation for int_rels_per_ext_rel != 1 case.
5135 * elf32-arm.h: Update all bfd_elf32_swap_reloc_out calls.
5136 * elf32-i386.c: Likewise.
5137 * elf32-cris.c: Likewise for bfd_elf32_swap_reloca_out.
5138 * elf32-hppa.c, elf32-i370.c, elf32-m68k.c, elf32-ppc.c, elf32-s390.c,
5139 elf32-sh.c, elf32-vax.c, elfxx-mips.c: Likewise.
5140 * elf64-alpha.c: Likewise for bfd_elf64_swap_reloca_out.
5141 * elf64-hppa.c, elf64-mips.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
5142 elf64-sparc.c, elf64-x86-64.c: Likewise.
5143 * elfxx-ia64.c: Likewise for bfd_elfNN_swap_reloca_out.
5144 * elfxx-mips.c (sort_dynamic_relocs): Likewise for
5145 bfd_elf32_swap_reloc_in.
5146
5147 * elf32-arm.h: Update elf32_arm_info_to_howto calls.
5148 * elf32-mips.c: Likewise for mips_info_to_howto_rel.
5149 (mips_elf64_swap_reloc_in): Zero r_addend.
5150 (mips_elf64_be_swap_reloc_in): Likewise.
5151 (mips_elf64_slurp_one_reloc_table): Simplify.
5152
5153 * elf64-alpha.c (alpha_elf_size_info): Populate reloc swap entries.
5154 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
5155 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
5156
5157 2002-11-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5158
5159 * elf32-sh.c (sh_elf_relocate_section): Don't complain about
5160 unresolved debugging relocs in dynamic applications.
5161 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
5162
5163 2002-11-26 Alan Modra <amodra@bigpond.net.au>
5164
5165 * elf-eh-frame.c (ENSURE_NO_RELOCS): Disregard R_*_NONE relocs.
5166 (_bfd_elf_discard_section_eh_frame): Don't discard duplicate CIEs
5167 on a relocatable link. Comment typos.
5168 * elf.c (_bfd_elf_link_hash_newfunc): Assign elements of structure
5169 in the order they are declared. Clear elf_hash_value too.
5170 (_bfd_elf_link_hash_table_init): Likewise assign in order. Clear
5171 eh_info and tls_segment.
5172 * elflink.h (elf_link_input_bfd <emit_relocs>): Keep reloc offsets
5173 sorted when discarding relocs by turning them into R_*_NONE.
5174
5175 * libbfd.c (warn_deprecated): Comment spelling.
5176 * po/SRC-POTFILES.in: Regenerate.
5177
5178 2002-11-21 Richard Henderson <rth@redhat.com>
5179
5180 * elflink.h (elf_link_add_object_symbols): Don't overwrite the
5181 arch's st_other bits when merging visibilities.
5182 (elf_link_output_extsym): Tidy clearing of visibility field.
5183
5184 2002-11-21 Alan Modra <amodra@bigpond.net.au>
5185
5186 * coff-mcore.c (SWAP_IN_RELOC_OFFSET): Define.
5187 (SWAP_OUT_RELOC_OFFSET): Define.
5188
5189 2002-11-20 Alexandre Oliva <aoliva@redhat.com>
5190
5191 * elf.c (_bfd_elf_link_hash_table_init): Make sure
5192 can_refcount is properly extended to the type of
5193 init_refcount.
5194
5195 2002-11-19 Alexandre Oliva <aoliva@redhat.com>
5196
5197 * elfxx-mips.c (MIPS_RELOC_RELA_P): New macro.
5198 (_bfd_mips_elf_relocate_section): Use it.
5199
5200 * elfxx-mips.c (MNAME): New macro.
5201 (_bfd_mips_elf_check_relocs): Use it.
5202 (_bfd_mips_elf_discard_info): Likewise.
5203 (_bfd_mips_elf_final_link): Likewise.
5204
5205 2002-11-19 Alan Modra <amodra@bigpond.net.au>
5206
5207 * elf64-ppc.c (ppc64_elf_edit_opd): When deleting relocs, adjust
5208 rel_hdr.sh_size too.
5209
5210 2002-11-18 Klee Dienes <kdienes@apple.com>
5211
5212 * Makefile.am (BFD32_LIBS): Add bfdwin.lo, bfdio.lo.
5213 (BFD32_LIBS_CFILES): Add bfdwin.c, bfdio.c.
5214 (BFD_H_FILES): Add bfdwin.c, bfdio.c.
5215 (LIBBFD_H_FILES): Add bfdwin.c, bfdio.c.
5216 Add dependencies for bfdwin.c, bfdio.c.
5217 * bfd.c: Remove bfd_get_mtime, bfd_get_size.
5218 * libbfd.c: Remove real_read, bfd_bread, _bfd_window_internal,
5219 bfd_init_window, bfd_free_window, bfd_get_file_window, bfd_bwrite,
5220 bfd_tell, bfd_flush, bfd_stat, bfd_seek.
5221 * bfdio.c: New file. Contains real_read, bfd_bread, bfd_write,
5222 bfd_tell, bfd_flush, bfd_stat, bfd_seek, bfd_ge_mtime,
5223 bfd_get_size (moved from libbfd.c and bfd.c).
5224 * bfdwin.c New file. Contains _bfd_window_internal,
5225 bfd_init_window, bfd_free_window, bfd_get_file_window (moved from
5226 libbfd.c and bfd.c).
5227 * po/SRC-POTFILES.in: Regenerate.
5228 * po/bfd.pot: Regenerate.
5229 * libbfd.h: Regenerate.
5230 * bfd-in2.h: Regenerate.
5231 * aclocal.m4: Regenerate.
5232 * Makefile.in: Regenerate.
5233 * configure: Regenerate.
5234
5235 2002-11-18 Klee Dienes <kdienes@apple.com>
5236
5237 * bfd.c (bfd_preserve_save): Don't zero BFD_IN_MEMORY.
5238
5239 2002-11-15 Kazu Hirata <kazu@cs.umass.edu>
5240
5241 * coff-h8300.c (h8300_reloc16_estimate): Do not optimize away
5242 jsr after a short jump.
5243 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
5244
5245 2002-11-15 Klee Dienes <kdienes@apple.com>
5246
5247 * pef.c (bfd_pef_convert_architecture): Move declaration of
5248 ARCH_POWERPC and ARCH_M68K to the start of the function.
5249
5250 2002-11-14 Svein E. Seldal <Svein.Seldal@solidas.com>
5251
5252 * coff-tic4x.c (tic4x_howto_table): Formatting fixup
5253
5254 2002-11-14 Hans-Peter Nilsson <hp@bitrange.com>
5255
5256 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs):
5257 For bpo_gregs_section->contents, allocate _raw_size, not
5258 _cooked_size.
5259
5260 2002-11-13 Klee Dienes <kdienes@apple.com>
5261
5262 * config.bfd: Add entries for powerpc-*-darwin and cousins.
5263
5264 2002-11-13 H.J. Lu <hjl@gnu.org>
5265
5266 * elfcode.h (elf_object_p): Don't restore abfd->arch_info.
5267
5268 2002-11-13 Klee Dienes <kdienes@apple.com>
5269 Alan Modra <amodra@bigpond.net.au>
5270
5271 * bfd.c (struct bfd_preserve): New.
5272 (bfd_preserve_save): New function.
5273 (bfd_preserve_restore): Ditto.
5274 (bfd_preserve_finish): Ditto.
5275 * bfd-in2.h: Regenerate.
5276 * mach-o.c: Formatting.
5277 (bfd_mach_o_scan_read_symtab_symbol): Make "value" unsigned.
5278 (bfd_mach_o_object_p): Use bfd_preserve_save/restore/finish.
5279 (bfd_mach_o_core_p): Ditto.
5280 (bfd_mach_o_scan): Pass in mdata.
5281 * mach-o.h (bfd_mach_o_scan): Update prototype.
5282 * pef.c: Formatting.
5283 (bfd_pef_object_p): Use bfd_preserve_save/restore/finish.
5284 (bfd_pef_xlib_object_p): Ditto.
5285 (bfd_pef_scan): Pass in mdata. Move version check to bfd_pef_object_p.
5286 * pef.h (bfd_pef_scan): Update prototype.
5287 * xsym.c: Formatting, K&R fixes.
5288 (bfd_sym_object_p): Use bfd_preserve_save/restore/finish.
5289 (bfd_sym_scan): New function split out from bfd_sym_object_p.
5290 * xsym.h (bfd_sym_scan): Declare.
5291 * elfcode.h (elf_object_p): Use bfd_preserve_save/restore/finish.
5292 * elfcore.h (elf_core_file_p): Likewise.
5293 * targets.c (_bfd_target_vector): Revert 2002-11-08 change.
5294
5295 2002-11-12 Nick Clifton <nickc@redhat.com>
5296
5297 * po/da.po: Updated Danish translation.
5298
5299 2002-11-12 Alan Modra <amodra@bigpond.net.au>
5300
5301 * elflink.h (elf_link_add_object_symbols): Optimize stabs for
5302 relocatable link too.
5303 (elf_link_input_bfd): When emitting relocs, adjust offsets for
5304 eh_frame and stab sections. Zap deleted relocs.
5305 (elf_reloc_symbol_deleted_p): Return true for zero r_symndx.
5306 (elf_bfd_discard_info): Run for relocatable link too.
5307 * elf64-ppc.c (ppc64_elf_edit_opd): Rename from edit_opd. Make global.
5308 Handle ld -r case.
5309 (ppc64_elf_size_dynamic_sections): Don't call edit_opd from here.
5310 * elf64-ppc.h (ppc64_elf_edit_opd): Declare.
5311
5312 * elf-bfd.h (struct cie_header): Move from elf_eh-frame.c.
5313 (struct cie, struct eh_cie_fde, struct eh_frame_sec_info): Likewise.
5314 (struct eh_frame_array_ent, struct eh_frame_hdr_info): Likewise.
5315 (enum elf_link_info_type): Remove ELF_INFO_TYPE_EH_FRAME_HDR.
5316 (struct eh_frame_hdr_info): Add "hdr_sec", remove "split".
5317 (struct elf_link_hash_table): Add eh_info.
5318 (struct elf_obj_tdata): Change eh_frame_hdr to an asection *.
5319 (_bfd_elf_discard_section_eh_frame): Update prototype.
5320 (_bfd_elf_discard_section_eh_frame_hdr): Likewise.
5321 (_bfd_elf_write_section_eh_frame): Likewise.
5322 (_bfd_elf_write_section_eh_frame_hdr): Likewise.
5323 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Remove "ehdrsec"
5324 param. Get "hdr_info" from link hash table.
5325 (_bfd_elf_discard_section_eh_frame_hdr): Remove "sec" param. Get
5326 header section from link hash table. Save header section to elf_tdata.
5327 (_bfd_elf_maybe_strip_eh_frame_hdr): Remove local "sec". Use
5328 header section from link hash table. Don't alloc hdr_info. Clear
5329 hdr_sec instead of setting "strip".
5330 (_bfd_elf_eh_frame_section_offset): Formatting.
5331 (_bfd_elf_write_section_eh_frame): Remove "ehdrsec", add "info" param.
5332 Get header section from link hash table.
5333 (_bfd_elf_write_section_eh_frame_hdr): Remove "sec", add "info" param.
5334 Get header section from link hash table.
5335 * elf.c (map_sections_to_segments): Use cached eh_frame_hdr.
5336 (get_program_header_size): Likewise.
5337 (_bfd_elf_section_offset): Formatting.
5338 * elflink.h (elf_link_create_dynamic_sections): Stash eh frame header
5339 section pointer in link hash table.
5340 (elf_bfd_final_link): Adjust _bfd_elf_write_section_eh_frame_hdr
5341 and _bfd_elf_write_section_eh_frame calls. Update comment about
5342 eh_frame entries.
5343 (elf_bfd_discard_info): Adjust _bfd_elf_discard_section_eh_frame and
5344 _bfd_elf_discard_section_eh_frame_hdr calls. Remove "ehdr".
5345
5346 * po/SRC-POTFILES.in: Regenerate.
5347
5348 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't zero
5349 relocs for discarded FDEs. Remove dead code.
5350 (_bfd_elf_write_section_eh_frame_hdr): Remove dead code.
5351 * elflink.h (elf_bfd_discard_info): Don't save edited relocs.
5352 Tidy conditions under which stabs are edited. Formatting.
5353 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
5354 from discarded relocs.
5355 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Add reloc output
5356 section adjustments after testing magic values.
5357
5358 2002-11-12 Thomas Moestl <tmm@FreeBSD.org>
5359
5360 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Correct
5361 references to large plt symbols.
5362
5363 2002-11-12 Klee Dienes <kdienes@apple.com>
5364
5365 * mach-o.c (bfd_mach_o_scan_read_thread): Don't re-use 'i' when
5366 looking for an unused section name.
5367
5368 2002-11-11 Kazu Hirata <kazu@cs.umass.edu>
5369
5370 * coff-h8300.c: Fix formatting.
5371 * elf32-h8300.c: Likewise.
5372 * reloc16.c: Likewise.
5373
5374 2002-11-09 Jeroen Dobbelaere <jeroen.dobbelaere@acunia.com>
5375
5376 * elf32-arm.h (elf32_arm_size_dynamic_sections): Don't strip output
5377 section when dynamic section unused; _bfd_strip_section_from_output
5378 instead.
5379
5380 2002-11-08 Alan Modra <amodra@bigpond.net.au>
5381
5382 * targets.c (_bfd_target_vector): Disable pef_vec, pef_xlib_vec
5383 and sym_vec.
5384
5385 * dwarf2.c: Revert last change.
5386
5387 2002-11-07 Michal Ludvig <mludvig@suse.cz>
5388
5389 * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
5390 _bfd_dwarf2_find_nearest_line): Use
5391 bfd_simple_get_relocated_section_contents() instead of
5392 bfd_get_section_contents().
5393 * reloc.c (bfd_perform_relocation): Add sanity check.
5394 * simple.c (simple_get_relocated_section_contents): If the section
5395 does not have any relocs associated with it, just return the
5396 unadjusted contents.
5397
5398 2002-11-07 Hans-Peter Nilsson <hp@axis.com>
5399
5400 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOT,
5401 case R_CRIS_32_GOT>: Correct test for filling in constant .got
5402 contents, enabling for a non-DSO, for symbols defined in the
5403 program with --export-dynamic.
5404
5405 2002-11-07 Alan Modra <amodra@bigpond.net.au>
5406
5407 * elf64-ppc.c: Comment typo fixes.
5408 (ppc64_elf_merge_private_bfd_data): Allow BFD_ENDIAN_UNKNOWN input.
5409
5410 2002-11-07 Nick Clifton <nickc@redhat.com>
5411
5412 * po/da.po: Updated Danish translation.
5413
5414 2002-11-06 Alexandre Oliva <aoliva@redhat.com>
5415
5416 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Generate
5417 exactly three internal relocs per external reloc. Set reloc_count
5418 to the external reloc count.
5419
5420 2002-11-06 Klee Dienes <kdienes@apple.com>
5421
5422 * coff-stgo32.c (stub_bytes): Mark as const.
5423 Fix comment formatting.
5424
5425 2002-11-06 Klee Dienes <kdienes@apple.com>
5426
5427 * Makefile.am (BFD32_BACKENDS): Add mach-o.lo, pef.lo, and
5428 xsym.lo.
5429 (BFD32_BACKENDS_CFILES): Add mach-o.c, pef.c, and xsym.c.
5430 (SOURCE_HFILES): Add mach-o.h, pef.h, pef-traceback.h, xsym.h
5431 * archures.c (enum bfd_architecture): Add bfd_arch_m98k.
5432 * bfd.c (struct bfd): Add private data for mach-o, pef, and sym.
5433 * targets.c (enum bfd_flavour): Add flavours for mach-o, pef, and
5434 sym.
5435 (_bfd_target_vector): Add target vectors for mach-o, pef, and sym.
5436 * Makefile.in: Regenerate.
5437 * doc/Makefile.in: Regenerate.
5438 * bfd-in2.h: Regenerate.
5439 * xsym.c: New file. Contains support for the Apple/Metrowerks
5440 xSYM debugging format.
5441 * xsym.h: New file.
5442 * pef.c: New file. Contains support for the Apple Code Fragment
5443 Manager Preferred Executable Format
5444 * pef.h: New file.
5445 * pef-traceback.h: New file. Contains support for parsing PowerPC
5446 traceback tables as used by PEF executables (and perhaps other
5447 systems as well).
5448 * mach-o.c: New file. Contains support for the Mach-O object file
5449 format.
5450 * mach-o.h: New file.
5451 * mach-o-target.c: New file. Declares the mach-o targets
5452 themselves. Included three times by mach-o.c; each time with a
5453 different set of macros set.
5454
5455 2002-11-06 Graeme Peterson <gp@qnx.com>
5456
5457 * Makefile.am: Remove entries for elf32-qnx.[ch].
5458 * Makefile.in: Regenerate.
5459 * config.bfd: Change arm-nto to use bfd_elf32_{big|little}arm_vec,
5460 ppc-nto to use bfd_elf32_powerpc{le}_vec, sh-nto to use
5461 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
5462 * configure.in: Remove support for bfd_elf32_sh{l}qnx_vec,
5463 bfd_elf32_powerpc{le}qnx_vec, bfd_elf32_{big|little}armqnx_vec,
5464 and bfd_elf32_i386qnx_vec, and removed elf32-qnx.lo from other targets.
5465 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
5466 * configure: Regenerate.
5467 * elf32-qnx.c: Remove.
5468 * elf32-qnx.h: Remove.
5469 * elf.c: Remove calls to QNX specific set_nonloadable_filepos,
5470 is_contained_by_filepos, and copy_private_bfd_data_p.
5471 * elf-bfd.h (struct elf_backend_data): Remove set_nonloadable_filepos,
5472 is_contained_by_filepos, and copy_private_bfd_data_p.
5473 * elf32-i386.c: Remove QNX extended bfd support.
5474 * elf32-ppc.c: Remove QNX extended bfd support.
5475 * elf32-sh.c: Remove QNX extended bfd support.
5476 * elfarm-nabi.c: Remove QNX extended bfd support.
5477 * targets.c: Remove qnx vectors.
5478 * elfxx-target.h (elf_backend_set_nonloadable_filepos): Remove
5479 (elf_backend_is_contained_by_filepos): Remove.
5480 (elf_backend_copy_private_bfd_data_p): Remove.
5481 * po/SRC-POTFILES.in: Regenerate.
5482
5483 2002-11-06 David O'Brien <obrien@FreeBSD.org>
5484 Alan Modra <amodra@bigpond.net.au>
5485
5486 * elf64-sparc.c (sparc64_elf_relocate_section): Adjust addend of
5487 dynamic relocs against section symbols for the output section vma.
5488
5489 2002-11-05 Alan Modra <amodra@bigpond.net.au>
5490
5491 * elf32-arm.h (t2a1_push_insn, t2a2_ldr_insn, t2a3_mov_insn,
5492 t2a4_bx_insn, t2a5_pop_insn, t2a6_bx_insn): Remove.
5493
5494 2002-11-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5495 Alan Modra <amodra@bigpond.net.au>
5496
5497 * config.bfd (sh-*-linux*): Use bfd_elf*_sh64*lin_vec as sh64
5498 vectors in target_selvecs.
5499 (shle-*-netbsdelf*): Use bfd_elf*_sh64*nbsd_vec as sh64 vectors
5500 in target_selvecs.
5501 (sh-*-netbsdelf*): Likewise.
5502 * configure.in (assocvecs): New variable. Handle assocvecs like
5503 selvecs.
5504 * configure: Regenerate.
5505 * format.c (bfd_check_format_matches): Store bfd_target pointers
5506 in matching_vector instead of target names. Select first target
5507 from bfd_associated_vector that matches a list of ambiguous targets.
5508 * targets.c (_bfd_associated_vector): New array.
5509 (bfd_associated_vector): New variable.
5510 (_bfd_target_vector): Add bfd_elf*_sh64*lin_vec.
5511 * libbfd-in.h (bfd_associated_vector): Declare.
5512 * libbfd.h: Regenerate.
5513
5514 2002-11-05 Elias Athanasopoulos <eathan@otenet.gr>
5515
5516 * vms-gsd.c (_bfd_vms_write_gsd): Check that symbol->udata.p is
5517 non-NULL before dereferencing.
5518
5519 2002-11-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5520
5521 * vms.c (vms_object_p): Restore the start address when returning
5522 NULL.
5523
5524 2002-11-04 Alan Modra <amodra@bigpond.net.au>
5525 Hans-Peter Nilsson <hp@axis.com>
5526
5527 * elflink.h (struct elf_final_link_info): Add shndxbuf_size.
5528 (elf_bfd_final_link): Don't bother zeroing symtab_hdr fields.
5529 Set up a larger symshndxbuf, and write it out. Free it on
5530 exit rather than freeing symbuf twice. Correct section index
5531 on output section symbol loop.
5532 (elf_link_output_sym): Accumulate symbol extension section
5533 indices, reallocating symshndxbuf rather than writing it out.
5534 (elf_link_flush_output_syms): Don't flush symshndxbuf.
5535 * elf.c (assign_section_numbers): Init i_shdrp to all zero.
5536 Use bfd_zalloc to clear i_shdrp[0] too.
5537
5538 2002-11-03 Stephen Clarke <stephen.clarke@earthling.net>
5539
5540 * elf32-sh64-com.c (sh64_address_in_cranges): Use
5541 _raw_size of cranges section if _cooked_size not yet set.
5542
5543 2002-11-03 Hans-Peter Nilsson <hp@axis.com>
5544
5545 * elf32-v850.c (v850_elf_relax_delete_bytes): Correct parameters
5546 for bfd_elf32_swap_symbol_out.
5547
5548 2002-10-31 David O'Brien <obrien@FreeBSD.org>
5549
5550 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't mix
5551 signed and unsigned in comparison.
5552
5553 2002-10-30 Daniel Jacobowitz <drow@mvista.com>
5554
5555 * coffcode.h: Remove extraneous '\'.
5556
5557 2002-10-28 H.J. Lu <hjl@gnu.org>
5558
5559 * Makefile.am (targets.lo): Depend on Makefile instead of
5560 config.status.
5561 (archures.lo): Likewise.
5562 * Makefile.in: Regenerated.
5563
5564 2002-10-25 Jason Thorpe <thorpej@wasabisystems.com>
5565
5566 * config.bfd (mips*el-*-netbsd*, mips*-*-netbsd*): Add
5567 bfd_elf64_bigmips_vec and bfd_elf64_littlemips_vec to
5568 targ_selvecs.
5569
5570 2002-10-25 Jim Wilson <wilson@redhat.com>
5571
5572 * elf64-sh64.c (sh_elf64_relocate_section): Call
5573 _bfd_elf_rela_local_sym. Handle relocs against STT_SECTION symbol
5574 of SHF_MERGE section.
5575
5576 2002-10-25 Hans-Peter Nilsson <hp@axis.com>
5577
5578 * simple.c: Correct placement of ATTRIBUTE_UNUSED.
5579
5580 2002-10-24 John David Anglin <dave@hiauly1.hia.nrc.ca>
5581
5582 * aoutx.h (NAME(aout,swap_ext_reloc_in)): Cast bytes->r_index to
5583 unsigned int. Cast RELOC_BASE10, RELOC_BASE13 and RELOC_BASE22 to
5584 unsigned int.
5585 (NAME(aout,final_link)): Cast enum used in assignment.
5586 (aout_link_write_symbols): Cast enums in comparisons, int values to
5587 boolean, enums in assignments to int.
5588 (aout_link_input_section_std): Cast rel->r_index to unsigned int.
5589 (aout_link_input_section_ext): Likewise. Cast enums used in
5590 comparisons with unsigned ints.
5591 (aout_link_reloc_link_order): Cast enum to int in assignment.
5592 * archive.c (_bfd_generic_read_ar_hdr_mag): Cast result of memchr
5593 calls to char *.
5594 * bfd-in.h (bfd_set_section_vma): Cast enum true to unsigned int in
5595 assignment.
5596 * bfd-in2.h (bfd_set_section_vma): Likewise.
5597 * bfd.c (bfd_record_phdr): Cast enums in assignments.
5598 * binary.c (bfd_alloc): Cast enum to long.
5599 * coffgen.c (_bfd_coff_is_local_label_name): Cast return to boolean.
5600 * dwarf2.c (read_abbrevs): Add casts to enum types.
5601 (read_attribute_value): Likewise.
5602 (arange_add): Cast result of bfd_zalloc call.
5603 (comp_unit_contains_address): Return true and false.
5604 (comp_unit_find_nearest_line): Cast return to boolean.
5605 * format.c (bfd_check_format_matches, bfd_set_format): Likewise.
5606 * gen-aout.c: define macro '_' if not defined.
5607 * libbfd.c (bfd_realloc): Cast malloc and realloc to PTR.
5608 (bfd_bwrite): Cast bfd_realloc to bfd_byte *.
5609 (bfd_write_bigendian_4byte_int): Cast return to boolean.
5610 (bfd_seek): Cast bfd_realloc to bfd_byte *.
5611 (bfd_generic_is_local_label_name): Cast return to boolean.
5612 * libcoff.h (_bfd_coff_adjust_symndx): Remove extraneous '\'.
5613 * linker.c (_bfd_link_hash_newfunc): Cast bfd_hash_allocate result to
5614 struct bfd_hash_entry *.
5615 (_bfd_generic_link_hash_newfunc): likewise.
5616 (_bfd_generic_final_link): Cast enum to unsigned int.
5617 * merge.c (sec_merge_emit): Cast return to boolean.
5618 (merge_strings): Add casts to const unsigned char *.
5619 * reloc.c (bfd_get_reloc_code_name): Cast enums in comparison to int.
5620 (bfd_generic_get_relocated_section_content): Cast enum to unsigned int.
5621 * section.c (bfd_section_hash_newfunc): Cast bfd_hash_allocate result
5622 to struct bfd_hash_entry *.
5623 (bfd_set_section_content): Add cast to PTR in comparison.
5624 * simple.c (simple_dummy_warning, simple_dummy_undefined_symbol,
5625 simple_dummy_reloc_overflow, simple_dummy_reloc_dangerous,
5626 simple_dummy_unattached_reloc,
5627 bfd_simple_get_relocated_section_contents): Add K&R declarations and
5628 function definitions.
5629 * srec.c (S3Forced): Initialize to false.
5630 (srec_get_symtab): Cast return value from bfd_alloc to asymbol *.
5631 * stabs.c (_bfd_link_section_stabs): Cast enum to int in comparisons.
5632 (_bfd_discard_section_stabs): Likewise. Also cast return to boolean.
5633 * syms.c (bfd_is_undefined_symclass): Cast return to boolean.
5634 (_bfd_stab_section_find_nearest_line): Cast enum to bfd_byte in
5635 comparisons.
5636
5637 2002-10-23 Jakub Jelinek <jakub@redhat.com>
5638
5639 * elf64-alpha.c (elf64_alpha_check_relocs): Only put maybe_dynamic
5640 relocs into shared lib non-allocated reloc sections.
5641
5642 2002-10-23 Nathan Tallent <eraxxon@alumni.rice.edu>
5643
5644 * dwarf2.c (add_line_info): Ensure that the line_info_table is
5645 sorted even when given an out-of-order line sequence.
5646 (lookup_address_in_line_info_table): When an exact VMA match is
5647 not found, return line information with the closest VMA.
5648
5649 2002-10-23 Ross Alexander <ross.alexander@uk.neceur.com>
5650
5651 * elf64-hppa.c: Force DT_FLAGS to always be set. Required by
5652 HPUX 11.00 patch PHSS_26559.
5653
5654 2002-10-22 Alexandre Oliva <aoliva@redhat.com>
5655
5656 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Don't move
5657 the options section into a separate section unless IRIX 6
5658 compatibility is enabled.
5659
5660 2002-10-22 Alexandre Oliva <aoliva@redhat.com>
5661
5662 * elflink.h (struct elf_link_sort_rela): Turn rel and rela
5663 into arrays.
5664 (elf_link_sort_cmp1, elf_link_sort_cmp2): Adjust.
5665 (elf_link_sort_relocs): Likewise. Take int_rels_per_ext_rel
5666 into account.
5667 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Compose
5668 R_MIPS_REL32 with R_MIPS64 if ABI_64_P.
5669
5670 2002-10-21 Graeme Peterson <gp@qnx.com>
5671
5672 * targets.c (_bfd_target_vector): Add missing qnx vectors.
5673
5674 2002-10-21 Alan Modra <amodra@bigpond.net.au>
5675
5676 * targets.c (bfd_target_list): Don't return the default target twice.
5677
5678 2002-10-21 Elias Athanasopoulos <eathan@otenet.gr>
5679
5680 * archive.c (_bfd_archive_bsd_update_armap_timestamp): Replace
5681 perror with bfd_perror.
5682
5683 2002-10-19 H.J. Lu <hjl@gnu.org>
5684
5685 * elflink.h (elf_link_add_object_symbols): Correctly handle
5686 DT_RPATH and DT_RUNPATH.
5687
5688 2002-10-19 Mark Kettenis <kettenis@gnu.org>
5689
5690 * elf.c (elfcore_grok_note): Fix recognition on NT_PRXFPREG notes.
5691
5692 2002-10-17 Denis Chertykov <denisc@overta.ru>
5693
5694 * elf32-ip2k.c (ELF_MACHINE_ALT1): Define alternate machine code
5695 for ip2k port.
5696
5697 2002-10-17 Alan Modra <amodra@bigpond.net.au>
5698
5699 * elfxx-target.h (USE_REL): Don't define as 1.
5700 * elf32-arm.h (USE_REL): Provide a default define of 0.
5701 Use #if rather than #ifdef when testing USE_REL.
5702 * elf32-m32r.c: Likewise.
5703
5704 * elf32-arc.c (USE_REL): Define as 1.
5705 * elf32-d10v.c (USE_REL): Likewise.
5706 * elf32-m32r.c (USE_REL): Likewise.
5707 * elf32-m68hc11.c (USE_REL): Likewise.
5708 * elf32-m68hc12.c (USE_REL): Likewise.
5709 * elf32-or32.c (USE_REL): Likewise.
5710 * elfarm-nabi.c (USE_REL): Likewise.
5711
5712 2002-10-16 Jakub Jelinek <jakub@redhat.com>
5713
5714 * config.bfd (s390-*-linux*): Add targ64_selvecs.
5715 (s390x-*-linux*): Add targ_selvecs.
5716
5717 2002-10-16 Alan Modra <amodra@bigpond.net.au>
5718
5719 * Makefile.am (BFD32_BACKENDS): Remove elfarmqnx-nabi.lo,
5720 elf32-i386-fbsd.lo, elf32-i386qnx.lo, elf32-ppcqnx.lo,
5721 elf32-sh-lin.lo, elf32-sh64-lin.lo, elf32-sh-nbsd.lo,
5722 elf32-sh64-nbsd.lo, elf32-shqnx.lo. Add elf32-qnx.lo.
5723 (BFD32_BACKENDS_CFILES): Likewise for corresponding C files.
5724 (BFD64_BACKENDS): Remove elf64-sh64-lin.lo, elf64-sh64-nbsd.lo.
5725 (BFD64_BACKENDS_CFILES): Likewise for corresponding C files.
5726 (SOURCE_HFILES): Add elf32-qnx.h.
5727 (BUILD_HFILES): Add bfdver.h.
5728 Run "make dep-am".
5729 * Makefile.in: Regenerate.
5730 * configure.in Update bfd vector dependencies.
5731 * configure: Regenerate.
5732 * elf32-i386-fbsd.c: Delete. Move code to elf32-i386.c.
5733 * elf32-i386qnx.c: Likewise.
5734 * elf32-ppcqnx.c: Delete. Move code to elf32-ppc.c.
5735 * elf32-sh-nbsd.c: Delete. Move code to elf32-sh.c.
5736 * elf32-sh-lin.c: Likewise.
5737 * elf32-shqnx.c: Likewise.
5738 * elf32-sh64-lin.c: Delete. Move code to elf32-sh64.c.
5739 * elf32-sh64-nbsd.c: Likewise.
5740 * elf64-sh64-lin.c: Delete. Move code to elf64-sh64.c.
5741 * elf64-sh64-nbsd.c: Likewise.
5742 * elfarmqnx-nabi.c: Delete. Move code to elfarm-nabi.c.
5743 * elf32-arm.h (ELF_MAXPAGESIZE): Always define.
5744 * elf32-i386.c: Remove ELF_ARCH and ELF32_I386_C_INCLUDED tests.
5745 * elf32-ppc.c: Remove ELF32_PPC_C_INCLUDED tests.
5746 * elf32-qnx.h (elf_backend_set_nonloadable_filepos): Always define.
5747 (elf_backend_is_contained_by_filepos): Likewise.
5748 (elf_backend_copy_private_bfd_data_p): Likewise.
5749 Globalize and move functions to..
5750 * elf32-qnx.c: ..here. New file.
5751 * elf32-sh.c: Remove ELF_ARCH and ELF32_SH_C_INCLUDED tests. Don't
5752 emit target vectors when INCLUDE_SHMEDIA.
5753 * elf32-sh64.c: Remove ELF_ARCH test. Move TARGET_* etc. defines to
5754 end of file.
5755 * elf64-sh64.c: Remove ELF_ARCH test.
5756 * elfarm-nabi.c: Remove ELFARM_NABI_C_INCLUDED test.
5757 * po/BLD-POTFILES.in: Regenerate.
5758 * po/SRC-POTFILES.in: Regenerate.
5759
5760 2002-10-16 Alan Modra <amodra@bigpond.net.au>
5761
5762 * elflink.h (elf_link_add_object_symbols): Error out on dynamic objects
5763 loaded with --just-symbols.
5764
5765 * elf32-i386qnx.c (TARGET_LITTLE_NAME): Define.
5766 * elf32-ppcqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
5767 * elf32-shqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
5768 * elfarmqnx-nabi.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
5769
5770 2002-10-15 Richard Henderson <rth@redhat.com>
5771
5772 * Makefile.am (BFD64_BACKENDS): Remove elf64-alpha-fbsd.
5773 (BFD64_BACKENDS_CFILES): Likewise.
5774 * configure.in (bfd_elf64_alpha_freebsd_vec): Use elf64-alpha.
5775 * elf64-alpha-fbsd.c: Remove file, move code ...
5776 * elf64-alpha.c: ... here.
5777 * Makefile.in, configure: Rebuild.
5778
5779 2002-10-14 Richard Henderson <rth@redhat.com>
5780
5781 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: Increment
5782 VALUE, not ADDEND.
5783
5784 2002-10-14 Stephen Clarke <stephen.clarke@superh.com>
5785
5786 * elf32-sh.c (elf_sh_link_hash_entry): Replace
5787 datalabel_got_offset with union of datalabel_got
5788 offset and refcount.
5789 (sh_elf_link_hash_newfunc): Initialize datalabel_got.refcount.
5790 (allocate_dynrelocs): Delete unnecessary code for
5791 STT_DATALABEL type. Create entry in got for
5792 datalabel version of symbol if datalabel_got.refcount > 0.
5793 (sh_elf_relocate_section): Use datalabel_got union.
5794 (sh_elf_gc_sweep_hook): Pull common code to initialize
5795 h and eh out of switch statement. Declare seen_stt_datalabel.
5796 Initialize it. Decrement datalabel_got.refcount for
5797 got relocs when seen_stt_datalabel is true.
5798 Decrement local_got_refcounts entry for datalabel got relocs
5799 of local symbols.
5800 (sh_elf_copy_indirect_symbol): Copy datalabel_got field over.
5801 (sh_elf_check_relocs): Declare seen_stt_datalabel.
5802 Initialize it. When seen_stt_datalabel is true, increment
5803 datalabel_got refcount rather than got.refcount.
5804 (sh_elf_finish_dynamic_symbol): Create relocs to
5805 initialize got entry for datalabel version of symbol.
5806
5807 2002-10-14 Alan Modra <amodra@bigpond.net.au>
5808
5809 * Makefile.am: Run "make dep-am".
5810 (BFD_H_FILES): Remove version.h.
5811 * bfd-in.h (BFD_VERSION, BFD_VERSION_DATE, BFD_VERSION_STRING): Move..
5812 * version.h: ..to here.
5813 * configure.in (bfd_version_date): Remove.
5814 (AC_OUTPUT): Make bfdver.h from version.h.
5815 * bfd.c: #include "bfdver.h".
5816 * vms-hdr.c: Likewise.
5817 * Makefile.in: Regenerate.
5818 * bfd-in2.h: Regenerate.
5819 * configure: Regenerate.
5820 * po/SRC-POTFILES.in: Regenerate.
5821
5822 2002-10-14 Alan Modra <amodra@bigpond.net.au>
5823
5824 * archures.c (bfd_mach_i386_i386, bfd_mach_i386_i8086,
5825 bfd_mach_i386_i386_intel_syntax, bfd_mach_x86_64,
5826 bfd_mach_x86_64_intel_syntax bfd_mach_ppc, bfd_mach_ppc64,
5827 bfd_mach_rs6k, bfd_mach_d10v, bfd_mach_sh, bfd_mach_v850,
5828 bfd_mach_arc_5, bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8,
5829 bfd_mach_m32r, bfd_mach_frv, bfd_mach_frvsimple,
5830 bfd_mach_ia64_elf64, bfd_mach_ia64_elf32,
5831 bfd_mach_ip2022, bfd_mach_ip2022ext,
5832 bfd_mach_s390_31, bfd_mach_s390_64, bfd_mach_xstormy16): Renumber.
5833 * bfd-in2.h: Regenerate.
5834
5835 2002-10-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5836
5837 * config.bfd (sh*eb-*-linux*, sh*-*-linux*): Add the alternative
5838 endian vector to targ_selvecs.
5839
5840 2002-10-13 Alexandre Oliva <aoliva@redhat.com>
5841
5842 * elfxx-mips.c (mips_elf_calculate_relocation): Take
5843 save_addend argument. Don't apply the 32-bit mask to a
5844 GPREL32 value if it's to be used in another relocation. Don't
5845 use forced-check computation of local_p to decide whether to
5846 add gp0 to GPREL16 value. Don't use only the lowest 16 bits
5847 of the addend of a non-in-place GPREL16 relocation.
5848 (_bfd_mips_elf_relocate_section): Pass use_saved_addend_p to
5849 mips_elf_calculate_relocation().
5850
5851 2002-10-12 Stephane Carrez <stcarrez@nerim.fr>
5852
5853 * elf32-m68hc11.c (m68hc11_elf_relax_section): Don't treat relocs
5854 with symbols in other sections if we relaxed something; the sections
5855 output offsets must be re-computed before.
5856
5857 2002-10-12 Stephane Carrez <stcarrez@nerim.fr>
5858
5859 * elf32-m68hc11.c (m68hc11_elf_relax_section): Update symbols
5860 handling to use Elf_Internal_Sym.
5861 (m68hc11_elf_relax_delete_bytes): Likewise.
5862
5863 2002-10-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5864
5865 * elf32-sh.c (sh_elf_optimized_tls_reloc, sh_elf_mkobject,
5866 sh_elf_object_p, dtpoff_base): New functions.
5867 (sh_elf_howto_table): Add TLS relocs.
5868 (sh_reloc_map): Likewise.
5869 (sh_elf_info_to_howto): Support TLS relocs.
5870 (elf_sh_link_hash_entry): Add tls_type and tls_tpoff32.
5871 (sh_elf_hash_entry, sh_elf_tdata, sh_elf_local_got_tls_type):
5872 New macros.
5873 (sh_elf_obj_tdata): New.
5874 (elf_sh_link_hash_table): Add tls_ldm_got.
5875 (sh_elf_link_hash_table_create): Clear refcount of tls_ldm_got.
5876 (allocate_dynrelocs): Support TLS relocs.
5877 (sh_elf_size_dynamic_sections): Likewise.
5878 (sh_elf_relocate_section): Support TLS relocs. Don't try to find
5879 .rela.got section when found already. Return false after printing
5880 error about unresolvable relocation.
5881 (sh_elf_gc_sweep_hook): Support TLS relocs.
5882 (sh_elf_check_relocs): Likewise.
5883 (sh_elf_finish_dynamic_symbol): Likewise.
5884 (bfd_elf32_mkobject, elf_backend_object_p): Define for TLS case.
5885 * reloc.c: Add SH TLS relocs.
5886 * bfd-in2.h, libbfd.h: Regenerate.
5887
5888 2002-10-11 Daniel Jacobowitz <drow@mvista.com>
5889
5890 * Makefile.in: Regenerated.
5891
5892 2002-10-11 Daniel Jacobowitz <drow@mvista.com>
5893
5894 * Makefile.am: Run dep-am.
5895 (BFD_H_DEP): Add simple.c and linker.c.
5896 (BFD32_LIBS): Add simple.lo.
5897 (BFD32_LIBS_CFILES): Add simple.c.
5898 * Makefile.in: Regenerated.
5899 * bfd-in2.h: Regenerated.
5900 * simple.c: New file.
5901
5902 2002-10-11 Alan Modra <amodra@bigpond.net.au>
5903
5904 * coff-arm.c (record_arm_to_thumb_glue): Avoid type-punned pointers.
5905 (record_thumb_to_arm_glue): Likewise.
5906 * ecoff.c (ecoff_link_add_externals): Likewise.
5907 * elf32-arm.h (record_arm_to_thumb_glue): Likewise.
5908 (record_thumb_to_arm_glue): Likewise.
5909 * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
5910 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
5911 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
5912 * elf64-alpha.c (elf64_alpha_create_dynamic_sections): Likewise.
5913 * elf64-ppc.c (func_desc_adjust): Likewise.
5914 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
5915 (sh64_elf64_create_dynamic_sections): Likewise.
5916 * elflink.c (_bfd_elf_create_got_section): Likewise.
5917 (_bfd_elf_create_dynamic_sections): Likewise.
5918 (_bfd_elf_create_linker_section): Likewise.
5919 * elflink.h (elf_add_default_symbol): Likewise.
5920 (elf_link_create_dynamic_sections): Likewise.
5921 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
5922 * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Likewise.
5923 * elfxx-mips.c (mips_elf_create_got_section): Likewise.
5924 (_bfd_mips_elf_add_symbol_hook): Likewise.
5925 (_bfd_mips_elf_create_dynamic_sections): Likewise.
5926 * linker.c (generic_link_add_symbol_list): Likewise.
5927 * xcofflink.c (xcoff_link_add_symbols): Likewise.
5928
5929 * elfxx-ia64.c (oor_brl, oor_ip): Conditionally define.
5930
5931 * elf64-ppc.c (edit_opd): Only zero opd syms when function is
5932 completely removed. Correct local sym adjustment.
5933
5934 2002-10-10 Stephen Clarke <stephen.clarke@superh.com>
5935
5936 * elf32-sh.c (elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
5937 Correct mistake in calculation of address of .got.
5938 * elf64-sh64.c (elf_sh64_pic_plt_entry_be,
5939 elf_sh64_pic_plt_entry_le): Likewise.
5940
5941 2002-10-09 Richard Shann <richard.shann@superh.com>
5942 Stephen Clarke <stephen.clarke@superh.com>
5943
5944 * Makefile.am: Add entries for elf32-sh64-lin.c and
5945 elf64-sh64-lin.c. Regenerate.
5946 * Makefile.in: Regenerate.
5947 * config.bfd: Change sh64eb-*-linux* and sh64-*-linux*
5948 to use sh64 vectors rather than sh vectors.
5949 * configure.in: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
5950 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
5951 * configure: Regenerate.
5952 * elf32-sh64-lin.c: New file.
5953 * elf64-sh64-lin.c: New file.
5954 * targets.c: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
5955 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
5956
5957 2002-10-08 H.J. Lu <hjl@gnu.org>
5958
5959 * elf32-i386.c (elf_i386_relocate_section): Re-arrange the
5960 IE->LE transition for R_386_TLS_IE.
5961
5962 2002-10-08 Alan Modra <amodra@bigpond.net.au>
5963
5964 * elf64-ppc.c (edit_opd): Correct test for discarded sections.
5965
5966 2002-10-07 Mark Elbrecht <snowball3@softhome.net>
5967
5968 * cofflink.c (mark_relocs): Don't mark relocations in excluded
5969 sections.
5970
5971 2002-10-07 Alan Modra <amodra@bigpond.net.au>
5972
5973 * elflink.h (elf_link_input_bfd): Remove BFD_VERSION_DATE dependent
5974 code.
5975
5976 * elf64-ppc.c (ppc64_elf_build_stubs): Increment .glink indx.
5977
5978 2002-10-06 Alan Modra <amodra@bigpond.net.au>
5979
5980 * opncls.c: Formatting.
5981 (_bfd_new_bfd): Use a smaller section hash table.
5982
5983 2002-10-05 Alexandre Oliva <aoliva@redhat.com>
5984
5985 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Set the type
5986 of the other two relocations packed with a REL32 to NONE.
5987
5988 2002-10-02 Stephen Clarke <stephen.clarke@superh.com>
5989
5990 * elf32-sh.c (elf_sh_link_hash_entry): Add gotplt_refcount.
5991 (sh_elf_link_hash_newfunc): Initialize it.
5992 (allocate_dynrelocs): Transfer gotplt refs from plt.refcount
5993 to got.refcount for symbols that are forced local or when
5994 we have direct got refs.
5995 (sh_elf_gc_sweep_hook): Adjust gotplt_refcount. Use it
5996 to correctly adjust got.refcount and plt.refcount.
5997 (sh_elf_copy_indirect_symbol): Copy gotplt_refcount across.
5998 (sh_elf_check_relocs): Increment gotplt_refcount.
5999
6000 2002-10-01 Jakub Jelinek <jakub@redhat.com>
6001
6002 * elf32-i386.c (elf_i386_relocate_section): Fix
6003 movl foo@indntpoff, %eax IE->LE transition.
6004
6005 2002-10-01 Jakub Jelinek <jakub@redhat.com>
6006
6007 * elf64-x86-64.c (elf64_x86_64_relocate_section): Change TLSGD
6008 sequence and its transitions.
6009
6010 2002-10-01 Jakub Jelinek <jakub@redhat.com>
6011
6012 * elf32-i386.c (elf_i386_relocate_section): Resolve R_386_TLS_LDO_32
6013 to st_value + addend in non-code sections.
6014 * elf64-x86-64.c (elf64_x86_64_relocate_section): Resolve
6015 R_X86_64_DTPOFF32 to st_value + addend in non-code sections.
6016
6017 2002-09-30 Gavin Romig-Koch <gavin@redhat.com>
6018 Ken Raeburn <raeburn@cygnus.com>
6019 Aldy Hernandez <aldyh@redhat.com>
6020 Eric Christopher <echristo@redhat.com>
6021 Richard Sandiford <rsandifo@redhat.com>
6022
6023 * archures.c (bfd_mach_mips4120, bfd_mach_mips5400): New.
6024 (bfd_mach_mips5500): New.
6025 * cpu-mips.c (I_mips4120, I_mips5400, I_mips5500): New.
6026 (arch_info_struct): Add corresponding entries here.
6027 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_4120,
6028 E_MIPS_MACH_5400 and E_MIPS_MACH_5500.
6029 (_bfd_mips_elf_final_write_processing): Handle bfd_mach_mips4120,
6030 bfd_mach_mips5400 and bfd_mach_mips5500.
6031 (_bfd_mips_elf_mach_extends_p): New function.
6032 (_bfd_mips_elf_merge_private_bfd_data): Use it to help merge
6033 the EF_MIPS_MACH flags.
6034 * bfd-in2.h: Regenerate.
6035
6036 2002-09-28 Jason Thorpe <thorpej@wasabisystems.com>
6037
6038 * elf32-vax.c (elf_vax_size_dynamic_section): Don't strip
6039 .got sections.
6040
6041 2002-09-28 Alan Modra <amodra@bigpond.net.au>
6042
6043 * elf.c (map_sections_to_segments): Correct test for start of
6044 writable section in the same page as end of read-only section.
6045
6046 2002-09-27 Matt Thomas <matt@3am-software.com>
6047
6048 * elf32-vax.c (elf_vax_check_relocs): Remove unused
6049 local_got_refcounts usage. Remove allocation of got slot.
6050 (elf_vax_gc_sweep_hook): Remove unused local_got_refcounts usage.
6051 Remove de-allocation of got slot.
6052 (elf_vax_size_dynamic_section): Fix some indentation. Add hash
6053 traversal for elf_vax_instantiate_got_entries. Allow empty .got
6054 sections to be GC'ed.
6055 (elf_vax_instantiate_got_entries): New function.
6056 (elf_vax_relocate_section): Simplify R_VAX_GOT32 handling. Remove
6057 tests that are now handled by elf_vax_instantiate_got_entries.
6058 Assert GOT entry falls within .got section size. Remove redundant
6059 comparisions. Fix comments.
6060
6061 2002-09-27 Jakub Jelinek <jakub@redhat.com>
6062
6063 * reloc.c: Add x86-64 TLS relocs.
6064 * bfd-in2.h, libbfd.h: Rebuilt.
6065 * elf64-x86-64.c (x86_64_elf_howto): Fix size fields for 32-bit
6066 relocs. Add TLS relocs.
6067 (x86_64_reloc_map): Add TLS relocs.
6068 (elf64_x86_64_info_to_howto): Adjust for added TLS relocs.
6069 (struct elf64_x86_64_link_hash_entry): Add tls_type field.
6070 (GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD, GOT_TLS_IE): Define.
6071 (elf64_x86_64_hash_entry): Define.
6072 (struct elf64_x86_64_obj_tdata): New.
6073 (elf64_x86_64_tdata, elf64_x86_64_local_got_tls_type): Define.
6074 (struct elf64_x86_64_link_hash_table): Add tls_ld_got.
6075 (link_hash_newfunc): Initialize tls_type.
6076 (elf64_x86_64_link_hash_table_create): Initialize tls_ld_got.
6077 (elf64_x86_64_copy_indirect_symbol): Swap tls_type if necessary.
6078 (elf64_x86_64_mkobject): New.
6079 (elf64_x86_64_elf_object_p): Allocate struct elf64_x86_64_obj_tdata.
6080 (elf64_x86_64_tls_transition): New.
6081 (elf64_x86_64_check_relocs): Add r_type variable and use it.
6082 Handle TLS relocs.
6083 (elf64_x86_64_gc_sweep_hook): Handle TLS relocs.
6084 (allocate_dynrelocs): Allocate GOT space for TLS relocs.
6085 (elf64_x86_64_size_dynamic_sections): Likewise.
6086 (dtpoff_base, tpoff): New.
6087 (elf64_x86_64_relocate_section): Handle TLS relocs.
6088 (elf64_x86_64_finish_dynamic_symbol): Only handle non-TLS GOT
6089 entries.
6090 (bfd_elf64_mkobject): Define.
6091
6092 * elf32-i386.c (elf_i386_check_relocs) [R_386_TLS_LE]: Set
6093 DF_STATIC_TLS if shared.
6094
6095 2002-09-26 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6096
6097 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Don't emit unneeded
6098 empty relocation sections.
6099
6100 2002-09-26 Alan Modra <amodra@bigpond.net.au>
6101
6102 * elf64-ppc.c (ppc_build_one_stub): Don't build glink stubs here.
6103 (ppc64_elf_build_stubs): Build them here instead.
6104
6105 2002-09-24 Jakub Jelinek <jakub@redhat.com>
6106
6107 * elf32-sparc.c (elf32_sparc_relocate_section): Put R_SPARC_RELATIVE
6108 addend into r_addend, not *r_offset.
6109 (elf32_sparc_finish_dynamic_symbol): Likewise.
6110 * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Clear xword at
6111 R_SPARC_RELATIVE's r_offset.
6112
6113 2002-09-23 Nathan Tallent <eraxxon@alumni.rice.edu>
6114
6115 * dwarf2.c (decode_line_info): Update to correctly decode
6116 the (non-standard DWARF2) out-of-order address sequences
6117 generated by the Intel C++ 6.0 compiler for ia64-Linux.
6118
6119 2002-09-23 Mark Elbrecht <snowball3@softhome.net>
6120
6121 * config.bfd: For DJGPP targets, match with any cpu and any machine.
6122
6123 2002-09-23 Alan Modra <amodra@bigpond.net.au>
6124
6125 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Zero relocs
6126 for discarded FDEs. Remove redundant assignment.
6127 * elflink.h (elf_bfd_discard_info): Save edited relocs.
6128
6129 2002-09-22 H.J. Lu <hjl@gnu.org>
6130
6131 * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Don't merge
6132 the relocation count between different .reloc sections.
6133
6134 2002-09-21 Alan Modra <amodra@bigpond.net.au>
6135
6136 * elf32-ppc.c (ppc_elf_relocate_section): Allow ".sbss.*" and
6137 ".sdata.*" for R_PPC_SDAREL16, ".sbss2*" and ".sdata2*" for
6138 R_PPC_EMB_SDA2REL. Similarly for R_PPC_EMB_SDA21 and
6139 R_PPC_EMB_RELSDA.
6140
6141 * elfcode.h (elf_slurp_reloc_table_from_section): Make "symcount"
6142 unsigned. Move "symcount" assignment out of loop.
6143 * Makefile.am: Run "make dep-am".
6144 * Makefile.in: Regenerate.
6145 * configure: Regenerate.
6146 * po/SRC-POTFILES.in: Regnerate.
6147
6148 2002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
6149
6150 * dwarf2.c (_bfd_dwarf2_find_nearest_line): If address length is
6151 zero, set it to 8 for (non-standard) 64-bit DWARF2 formats
6152 (e.g. IRIX64).
6153
6154 2002-09-19 Jakub Jelinek <jakub@redhat.com>
6155
6156 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Clear .got word
6157 even if generating R_PPC_RELATIVE reloc.
6158 (ppc_elf_relocate_section): Make sure relocation is performed
6159 if skip == -2. Clear memory at r_offset when creating dynamic
6160 relocation.
6161
6162 2002-09-19 Jakub Jelinek <jakub@redhat.com>
6163
6164 * reloc.c (BFD_RELOC_386_TLS_TPOFF, BFD_RELOC_386_TLS_IE,
6165 BFD_RELOC_386_TLS_GOTIE): Add.
6166 * bfd-in2.h, libbfd.h: Rebuilt.
6167 * elf32-i386.c (elf_howto_table): Add R_386_TLS_TPOFF, R_386_TLS_IE
6168 and R_386_TLS_GOTIE.
6169 (elf_i386_reloc_type_lookup): Handle it.
6170 (struct elf_i386_link_hash_entry): Change tls_type type to unsigned
6171 char instead of enum, change GOT_* into defines.
6172 (GOT_TLS_IE_POS, GOT_TLS_IE_NEG, GOT_TLS_IE_BOTH): Define.
6173 (elf_i386_tls_transition): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
6174 (elf_i386_check_relocs): Likewise. Avoid crash if local symbol is
6175 accessed both as normal and TLS symbol. Move R_386_TLS_LDM and
6176 R_386_PLT32 cases so that R_386_TLS_IE can fall through.
6177 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
6178 (elf_i386_gc_sweep_hook): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
6179 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
6180 (allocate_dynrelocs): Allocate 2 .got and 2 .rel.got entries if
6181 tls_type is GOT_TLS_IE_BOTH.
6182 (elf_i386_size_dynamic_sections): Likewise.
6183 (elf_i386_relocate_section): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
6184 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
6185 (elf_i386_finish_dynamic_symbol): Use tls_type & GOT_TLS_IE to catch
6186 all 4 GOT_TLS_* TLS types.
6187
6188 2002-09-19 Nick Clifton <nickc@redhat.com>
6189
6190 * elflink.h (elf_fix_symbol_flags): When examining weak symbols,
6191 follow indirect links.
6192
6193 2002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
6194
6195 * ecoffswap.h (ecoff_swap_pdr_in) <isym, iline>: Update to
6196 correctly sign-extend 32-bit ECOFF null values (0xffffffff, -1)
6197 on 64 bit machines.
6198 (ecoff_swap_sym_in) <iss>: Likewise.
6199 * ecoff.c (_bfd_ecoff_slurp_symbolic_info): Fix error reading
6200 ECOFF information: 'ioptMax' refers to the actual *size*
6201 of the optimization symtab, not the number of entries.
6202
6203 2002-09-19 Daniel Jacobowitz <drow@mvista.com>
6204
6205 * elf32-arm.h (elf32_arm_adjust_dynamic_symbol): Update
6206 ELF_LINK_HASH_NEEDS_PLT logic.
6207
6208 2002-09-18 Daniel Jacobowitz <drow@mvista.com>
6209
6210 * elfcode.h (elf_slurp_reloc_table_from_section): Check
6211 correct relocation count.
6212
6213 2002-09-17 Daniel Jacobowitz <drow@mvista.com>
6214
6215 * bfd-in.h (bfd_get_dynamic_symcount): Define.
6216 * bfd.c (struct _bfd): Add dynsymcount.
6217 * bfd-in2.h: Regenerated.
6218 * elf.c (_bfd_elf_canonicalize_dynamic_symtab): Set
6219 abfd->dynsymcount.
6220 * elfcode.h (elf_slurp_reloc_table_from_section): Check
6221 for overflow.
6222
6223 2002-09-17 Stan Cox <scox@redhat.com>
6224
6225 * elf64-mips.c (mips_elf64_be_swap_reloca_out): Handle type2 and type3.
6226 (mips_elf64_final_gp): Don't make up gp value.
6227 * elfn32-mips.c (mips_elf_final_gp): Likewise.
6228 * elfxx-mips.c (_bfd_mips_elf_final_link): Always create
6229 .MIPS.options/.options section.
6230
6231 2002-09-17 David O'Brien <obrien@FreeBSD.org>
6232
6233 * elf32-i386-fbsd.c: Always label using the EI_OSABI method.
6234 It is benign for FreeBSD < 4.1. Minor reformatting.
6235 * elf64-alpha-fbsd.c: Likewise.
6236
6237 2002-09-17 Jakub Jelinek <jakub@redhat.com>
6238
6239 * elf32-i386.c (elf_i386_relocate_section) [R_386_TLS_TPOFF32]: Negate
6240 addend.
6241
6242 2002-09-17 Alan Modra <amodra@bigpond.net.au>
6243
6244 * elf64-alpha.c (alpha_elf_size_info): Make static.
6245
6246 2002-09-17 Svein E. Seldal <Svein.Seldal@solidas.com>
6247
6248 * coff-tic4x.c: Add function declarations and ATTRIBUTE_UNUSED.
6249 * cpu-tic4x.c: Ditto.
6250
6251 2002-09-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6252
6253 * elf64-mips.c (define elf_backend_ignore_discarded_relocs): Remove
6254 duplicate define.
6255
6256 2002-09-16 Bruno Haible <bruno@clisp.org>
6257
6258 * elf32-i386.c: Don't defined ELF_ARCH etc. if this file is included
6259 by a target variant implementation.
6260 * elf64-alpha.c: Likewise.
6261 * elf32-i386-fbsd.c: New file.
6262 * elf64-alpha-fbsd.c: New file.
6263 * targets.c: Support bfd_elf32_i386_freebsd_vec and
6264 bfd_elf64_alpha_freebsd_vec.
6265 * configure.in: Accept the vectors bfd_elf32_i386_freebsd_vec,
6266 bfd_elf64_alpha_freebsd_vec.
6267 * Makefile.am (BFD32_BACKENDS): Add elf32-i386-fbsd.lo.
6268 (BFD32_BACKENDS_CFILES): Add elf32-i386-fbsd.c.
6269 (BFD64_BACKENDS): Add elf64-alpha-fbsd.lo.
6270 (BFD64_BACKENDS_CFILES): Add elf64-alpha-fbsd.c.
6271 (elf32-i386-fbsd.lo, elf64-alpha-fbsd.lo): Add dependencies.
6272 * config.bfd: For FreeBSD targets, set targ_defvec to a FreeBSD
6273 specific targets. Define OLD_FREEBSD_ABI_LABEL if appropriate.
6274
6275 2002-09-12 Jakub Jelinek <jakub@redhat.com>
6276
6277 * elf32-i386.c (dtpoff_base, tpoff): Don't crash if tls_segment is
6278 NULL.
6279 (elf_i386_relocate_section): Return false after printing error about
6280 unresolvable relocation.
6281
6282 2002-09-12 Nick Clifton <nickc@redhat.com>
6283
6284 * elf32-arm.h (elf32_arm_final_link_relocate): Fix handling of
6285 R_ARM_THM_PC11.
6286
6287 2002-09-11 Jeffrey Law <law@redhat.com>
6288
6289 * elf32-h8300.c (elf32_h8_relax_section): Fix typo.
6290
6291 2002-09-11 Andrew Haley <aph@cambridge.redhat.com>
6292
6293 * elf.c (_bfd_elf_find_nearest_line): Check functionname_ptr and
6294 line_ptr before deciding we've found a symbol.
6295
6296 2002-09-11 Nick Clifton <nickc@redhat.com>
6297
6298 * po/da.po: New Danish translation file.
6299 * configure.in (LINGUAS): Add 'da'.
6300 * configure: Regenerate.
6301
6302 2002-09-10 Michael Snyder <msnyder@redhat.com>
6303
6304 * irix-core.c (do_sections, do_sections64): New functions.
6305 (irix_core_core_file_p): Call new functions do_sections,
6306 do_sections64, depending on corefile (32-bit or 64-bit).
6307
6308 2002-09-09 Richard Henderson <rth@redhat.com>
6309
6310 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21M
6311 and PCREL21F like PCREL21B.
6312
6313 2002-09-04 Kevin Buettner <kevinb@redhat.com>
6314
6315 * config.bfd (mips*-*-irix6*): Add new ABI vectors. Make n32 default
6316 vector.
6317
6318 2002-09-02 Nick Clifton <nickc@redhat.com>
6319
6320 * elf32-v850.c (v850_elf_final_link_relocate): Use helpful
6321 names instead of cryptically overloaded bfd_reloc error
6322 codes.
6323 (v850_elf_relocate_section): Likewise.
6324 (v850_elf_relax_section): Replace caching of external symbols
6325 with caching of internal symbols obtained from calling
6326 bfd_elf_get_elf_syms().
6327 Fixup problems with freeing cached allocated memory blocks.
6328
6329 2002-09-02 Alan Modra <amodra@bigpond.net.au>
6330
6331 * cpu-pj.c (scan_mach, compatible, arch_info_struct): Remove.
6332 (bfd_pj_arch): Use bfd_default_scan.
6333 * cpu-v850.c (scan): Remove.
6334 (N): Use bfd_default_scan.
6335 * cpu-z8k.c (scan_mach): Remove.
6336 (arch_info_struct, bfd_z8k_arch): Reorganize so that the default is
6337 first. Use bfd_default_scan.
6338
6339 * ecoff.c (_bfd_ecoff_set_arch_mach_hook): Don't use hard-coded
6340 bfd_mach constants.
6341 (ecoff_get_magic): Likewise.
6342 * elf32-v850.c (v850_elf_object_p): Likewise.
6343 (v850_elf_final_write_processing): Likewise.
6344 * mipsbsd.c (MY(set_arch_mach)): Likewise.
6345 (MY(write_object_contents)): Likewise.
6346 * coff64-rs6000.c (xcoff64_write_object_contents): Likewise.
6347 * coffcode.h (coff_write_object_contents): Likewise.
6348 (coff_set_arch_mach_hook): Add comment describing machine == 0.
6349 Remove unnecessary "machine" assignments.
6350 (coff_write_relocs): Test for the absolute section sym by testing
6351 section and flags.
6352
6353 * aoutx.h (NAME(aout,machine_type)): Recognize bfd_mach_i386_i386
6354 and bfd_mach_i386_i386_intel_syntax.
6355 * pdp11.c (NAME(aout,machine_type)): Likewise.
6356
6357 2002-08-30 John David Anglin <dave@hiauly1.hia.nrc.ca>
6358
6359 * bfd-in.h (align_power): Cast constants to bfd_vma type.
6360 * bfd-in2.h (align_power): Likewise.
6361
6362 2002-08-30 Alan Modra <amodra@bigpond.net.au>
6363
6364 * Makefile.am: Run "make dep-am".
6365 * Makefile.in: Regenerate.
6366
6367 * cpu-avr.c (compatible): Don't use hard-coded mach constants.
6368 * cpu-powerpc.c (powerpc_compatible): Likewise.
6369 * cpu-rs6000.c (rs6000_compatible): Likewise.
6370
6371 2002-08-28 Catherine Moore <clm@redhat.com>
6372
6373 * elf32-v850.c (v850_elf_reloc_map): Add new relocs.
6374 (v850-elf-reloc): Don't resolve pc relative relocs.
6375 (v850_elf_ignore_reloc): New routine.
6376 (v850_elf_final_link_relocate): Handle new relocs.
6377 (v850_elf_relax_delete_bytes ): New routine.
6378 (v850_elf_relax_section): New routine.
6379 (bfd_elf32_bfd_relax_section): Define.
6380 (HOWTO): New entries for new relocs.
6381 * reloc.c (BFD_RELOC_V850_LONGCALL): New reloc.
6382 (BFD_RELOC_V850_LONGJUMP): New reloc.
6383 (BFD_RELOC_V850_ALIGN): New reloc.
6384 * archures.c: Remove redundant v850ea architecture.
6385 * cpu-v850.c: Remove redundant v850ea support.
6386 * libbfd.h: Regenerate.
6387 * bfd-in2.h: Regenerated.
6388
6389 2002-08-28 Svein E. Seldal <Svein.Seldal@solidas.com>
6390
6391 * config.bfd: Add tic4x-*-*coff* and c4x-*-*coff* target.
6392 * configure.in: Add tic4x_coff vector files.
6393 * configure: Regenerate.
6394 * Makefile.am: Add tic4x target.
6395 * Makefile.in: Regenerate.
6396
6397 2002-08-27 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
6398
6399 * archures.c: Add the BFD arch type tic4x.
6400 * bfd-in.h: Add BFD_IN_MEMORY flag.
6401 * coff-tic4x.c: New file.
6402 * coffswap.h (coff_swap_sym_out): Add preadjuster.
6403 * cpu-tic4x.c: New file.
6404 * targets.c: Added tic4x- in list of xvecs.
6405 * ticoff.h: New file.
6406 * bfd-in2.h: Regenerate.
6407
6408 2002-08-27 Adam Nemet <anemet@lnxw.com>
6409
6410 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Set the last
6411 bit of DT_INIT and DT_FINI for Thumb functions.
6412
6413 2002-08-26 Alan Modra <amodra@bigpond.net.au>
6414
6415 * coffcode.h (coff_set_arch_mach_hook): Handle W65MAGIC.
6416
6417 2002-08-26 Alan Modra <amodra@bigpond.net.au>
6418
6419 * aoutx.h (NAME(aout,reloc_type_lookup)): Handle BFD_RELOC_8.
6420
6421 2002-08-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6422
6423 * elf32-sh.c (sh_elf_copy_indirect_symbol): New.
6424 (create_got_section, allocate_dynrelocs, readonly_dynrelocs):
6425 Likewise.
6426 (struct elf_sh_pcrel_relocs_copied): Removed.
6427 (struct elf_sh_dyn_relocs): New.
6428 (struct elf_sh_link_hash_entry): Replace pcrel_relocs_copied
6429 field with dyn_relocs.
6430 (struct elf_sh_link_hash_table): Add short-cuts to get dynamic
6431 sections and sym_sec.
6432 (sh_elf_link_hash_newfunc): Clear dyn_relocs.
6433 (sh_elf_link_hash_table_create): Clear shorts-cuts and sym_sec.
6434 (sh_elf_create_dynamic_sections): Use create_got_section instead
6435 of _bfd_elf_create_got_section.
6436 (sh_elf_check_relocs): Likewise.
6437 (sh_elf_create_dynamic_sections): Use short-cuts to the dynamic
6438 sections.
6439 (sh_elf_adjust_dynamic_symbol, sh_elf_size_dynamic_sections,
6440 sh_elf_relocate_section, sh_elf_check_relocs,
6441 sh_elf_finish_dynamic_symbol, sh_elf_finish_dynamic_sections):
6442 Likewise.
6443 (sh_elf_adjust_dynamic_symbol): Handle nocopyreloc. Keep the
6444 dynamic relocations and avoiding the copy relocation when we
6445 didn't find any dynamic relocations in the section which has
6446 contents or is read-only.
6447 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
6448 (sh_elf_size_dynamic_sections): Don't reset the size of
6449 .rela.got section even if dynamic_sections_created flag is off.
6450 Don't use sh_elf_discard_copies. Scan all input bfd and use
6451 allocate_dynrelocs. Call readonly_dynrelocs to determine
6452 whether we need DT_TEXTREL.
6453 (sh_elf_adjust_dynamic_symbol): Use plt.refcount to determine
6454 whether the symbol was never referred to.
6455 (sh_elf_relocate_section): Use WILL_CALL_FINISH_DYNAMIC_SYMBOL.
6456 (sh_elf_gc_sweep_hook): Fill with the real sweep function.
6457 (sh_elf_check_relocs): Call create_got_section if the short-cut
6458 to .got is null. Increment reference counters only instead of
6459 allocating space on dynamic sections here. Don't conditionalize
6460 uninitialized got.offset value when marking the symbol as a
6461 global offset table entry. Keep relocations for symbols satisfied
6462 by a dynamic library to avoid copy relocations for the symbol.
6463 Set dynobj field of an elf hash table if needed.
6464 (sh_elf_finish_dynamic_sections): Handle null section pointer
6465 correctly.
6466 (elf_backend_copy_indirect_symbol): Defined.
6467 (elf_backend_can_refcount): Defined.
6468
6469 2002-08-23 Nick Clifton <nickc@redhat.com>
6470
6471 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Undo
6472 previous change. Add comment explaining why.
6473
6474 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>
6475
6476 * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le): Copy
6477 contents of .got.plt[2] to tr0, not address of .got.plt.
6478 (sh_elf_finish_dynamic_symbol): Do not apply GOT_BIAS when
6479 patching absolute plt entry. For shmedia plt entry, set bottom bit
6480 of branch to plt0 as this is a branch to an shmedia instruction.
6481 * elf64-sh64.c (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le):
6482 Copy contents of .got.plt[2] to tr0, not address of .got.plt.
6483 (elf_sh64_plt_entry_be, elf_sh64_plt_entry_le): Use ptrel to
6484 branch to plt0.
6485 (sh64_elf64_finish_dynamic_symbol): Do not apply GOT_BIAS when
6486 patching absolute plt entry. For shmedia plt entry, branch to
6487 plt0 is now ptrel, so use relative offset. Set bottom bit of
6488 branch target as it is a branch to an shmedia instruction.
6489
6490 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>,
6491 Richard Shann <richard.shann@superh.com>
6492
6493 * elf32-sh.c (sh_elf_finish_dynamic_sections): Set LSB of DT_INIT
6494 value if .init is an SHmedia function. Similarly for DT_FINI.
6495 * elf64-sh64.c (sh64_elf64_finish_dynamic_sections): Likewise.
6496
6497 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>
6498
6499 * elf32-sh.c (sh_elf_size_dynamic_sections): Zero initialize
6500 dynamic section.
6501 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
6502
6503 2002-08-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6504
6505 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use a simple
6506 byte read when reading the return address register column.
6507
6508 2002-08-22 Nick Clifton <nickc@redhat.com>
6509
6510 * config.bfd: Add powepc64-*-*bsd* target.
6511
6512 2002-08-22 Graeme Peterson <gp@qnx.com>
6513
6514 * Makefile.am: Add entries for elf32-shqnx.c
6515 * Makefile.in: Regenerate.
6516 * config.bfd: Add support sh-*-nto* target.
6517 * configure.in: Add support for bfd_elf32_sh{l}qnx_vec.
6518 * configure: Regenerate.
6519 * elf32-qnx.h: Changed typo "elf_i386qnx_*" to "elf_qnx_*" .
6520 * elf32-sh.c: Do not include elf32-target.h if
6521 ELF32_SH_C_INCLUDED is defined.
6522 * elf32-shqnx.c: New file: Support for QNX.
6523 * targets.c: Add bfd_elf32_sh{l}qnx_vec.
6524
6525 2002-08-22 Nick Clifton <nickc@redhat.com>
6526
6527 * po/tr.po: Updated Turkish translation.
6528
6529 * syms.c (_bfd_generic_read_minisymbols): Set bfd_error if the
6530 symbols are not read.
6531
6532 2002-08-22 Alan Modra <amodra@bigpond.net.au>
6533
6534 * elf32-m68hc11.c: Formatting fixes.
6535 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
6536 * elf32-m68hc12.c: Formatting fixes.
6537 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
6538
6539 2002-08-22 Alan Modra <amodra@bigpond.net.au>
6540
6541 * coff-rs6000.c (rs6000coff_vec <object_flags>): Add SEC_CODE and
6542 SEC_DATA.
6543 (pmac_xcoff_vec): Likewise.
6544 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
6545 (aix5coff64_vec): Likewise.
6546
6547 2002-08-22 Alan Modra <amodra@bigpond.net.au>
6548
6549 * elf-bfd.h (struct elf_backend_data): Add struct elf_backend_data
6550 param to elf_backend_copy_indirect_symbol.
6551 (_bfd_elf_link_hash_copy_indirect): Likewise.
6552 * elflink.h (elf_add_default_symbol, elf_fix_symbol_flags): Adjust
6553 calls to copy_indirect_symbol.
6554 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
6555 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
6556 * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
6557 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
6558 * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
6559 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
6560 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
6561 * elfxx-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
6562 * elfxx-mips.h (_bfd_mips_elf_copy_indirect_symbol): Likewise.
6563 * elf.c (_bfd_elf_link_hash_copy_indirect): Likewise. Properly
6564 test refcounts for "used" values.
6565
6566 2002-08-21 John David Anglin <dave@hiauly1.hia.nrc.ca>
6567
6568 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Add PARAMS to
6569 argument declaration.
6570
6571 2002-08-19 Elena Zannoni <ezannoni@redhat.com>
6572
6573 * archures.c (bfd_mach_ppc_e500): Added.
6574 * bfd-in2.h: Rebuilt.
6575 * cpu-powerpc.c (bfd_powerpc_archs): Added e500.
6576
6577 2002-08-19 Alan Modra <amodra@bigpond.net.au>
6578
6579 * elf32-m68hc12.c (elf_backend_can_gc_sections): False.
6580
6581 2002-08-17 Andrew Cagney <ac131313@redhat.com>
6582
6583 * elf.c (bfd_elf_get_elf_syms): Change type of `esym' to
6584 `bfd_byte'.
6585
6586 2002-08-17 Stan Cox <scox@redhat.com>
6587
6588 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Use the
6589 IRIX 6 segment layout for NEWABI.
6590
6591 2002-08-16 Stephen Clarke <stephen.clarke@superh.com>
6592
6593 * elf32-sh.c (sh_elf_gc_mark_hook): For sh64, skip indirect
6594 symbols when looking for section referred to by a relocation.
6595 * elf64-sh.c (sh_elf64_gc_mark_hook): Likewise.
6596
6597 2002-08-15 Alan Modra <amodra@bigpond.net.au>
6598
6599 * elf32-i370.c: Move reloc enum to include/elf/i370.h.
6600
6601 2002-08-15 Hans-Peter Nilsson <hp@axis.com>
6602
6603 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Add
6604 missing check for whether the symbol is referenced by DSO before
6605 unexporting it as an unneeded dynamic symbol.
6606
6607 2002-08-14 H.J. Lu <hjl@gnu.org>
6608
6609 * libbfd.h: Regenerate.
6610
6611 2002-08-14 H.J. Lu <hjl@gnu.org>
6612
6613 * config.bfd: Always add 64bit vectors to 32bit Linux/mips.
6614
6615 2002-08-14 Stephane Carrez <stcarrez@nerim.fr>
6616
6617 * elf32-m68hc11.c (m68hc11_relax_group): New to relax group of
6618 instructions.
6619 (m68hc11_direct_relax): New to define table of relaxable instructions.
6620 (find_relaxable_insn): New, find a relaxable insn.
6621 (compare_reloc): New to compare two relocs.
6622 (m68hc11_elf_relax_section): New, relax text sections.
6623 (m68hc11_elf_relax_delete_bytes): New, delete bytes and adjust branchs.
6624 (elf32_m68hc11_check_relocs): New function for GC support.
6625 (elf32_m68hc11_relocate_section): New function for GC support.
6626 (bfd_elf32_bfd_relax_section): Define to support linker relaxation.
6627 (elf_backend_check_relocs): Likewise.
6628 (elf_backend_relocate_section): Likewise.
6629
6630 2002-08-13 H.J. Lu <hjl@gnu.org>
6631
6632 * elflink.h (NAME(bfd_elf,size_dynamic_sections): Don't count
6633 definitions in shared objects when checking symbol with
6634 undefined version.
6635
6636 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6637
6638 * elf32-m68hc11.c (elf32_m68hc11_gc_mark_hook): New for section GC.
6639 (elf32_m68hc11_gc_sweep_hook): Likewise.
6640 (elf_backend_gc_mark_hook): Define for GC section support.
6641 (elf_backend_gc_sweep_hook): Likewise.
6642 (elf_backend_can_gc_sections): Likewise.
6643
6644 * elf32-m68hc12.c: Likewise.
6645
6646 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6647
6648 * elf32-m68hc11.c (_bfd_m68hc11_elf_print_private_bfd_data): New.
6649 (_bfd_m68hc11_elf_merge_private_bfd_data): New function.
6650 (_bfd_m68hc11_elf_set_private_flags): New function.
6651 Use them to set/check/print ELF flags specific to 68HC11.
6652
6653 * elf32-m68hc12.c (_bfd_m68hc12_elf_print_private_bfd_data): New.
6654 (_bfd_m68hc12_elf_merge_private_bfd_data): New function.
6655 (_bfd_m68hc12_elf_set_private_flags): New function.
6656 Use them to set/check/print ELF flags specific to 68HC12.
6657
6658 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6659
6660 * elf32-m68hc11.c (elf_m68hc11_howto_table): Add the new relocs;
6661 fix masks for PC-rel relocs.
6662 (m68hc11_elf_ignore_reloc): New function.
6663
6664 * elf32-m68hc12.c (m68hc12_elf_special_reloc): New to handle specific
6665 68HC12 banked addressing relocs.
6666 (m68hc12_phys_addr): New to compute physical address of banked memory.
6667 (m68hc12_phys_page): Likewise for page.
6668 (m68hc12_addr_is_banked): New to see if address is in banked area.
6669 (elf_m68hc12_howto_table): Add new relocs and rename to xx12.
6670
6671 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6672
6673 * reloc.c (BFD_RELOC_M68HC11_RL_JUMP, BFD_RELOC_M68HC11_RL_GROUP,
6674 BFD_RELOC_M68HC11_LO16, BFD_RELOC_M68HC11_PAGE,
6675 BFD_RELOC_M68HC11_24): New relocs for 68HC11/68HC12.
6676 * bfd-in2.h: Regenerate.
6677
6678 2002-08-12 H.J. Lu <hjl@gnu.org>
6679
6680 * elflink.h (elf_add_default_symbol): Preserve section across
6681 elf_merge_symbol.
6682
6683 2002-08-09 Graeme Peterson <gp@qnx.com>
6684
6685 * Makefile.am: Add entries for elf32-ppcqnx.c, and add
6686 elf32-qnx.h dependency to elfarmqnx-nabi.c and elf32-i386qnx.c.
6687 * Makefile.in: Regenerate.
6688 * config.bfd: Add support for powerpc{le}-*-nto targets.
6689 * configure.in: Add support for bfd_elf32_powerpc{le}qnx_vec.
6690 * configure: Regenerate.
6691 * elf32-i386qnx.c: Moved backend functions into a QNX specific
6692 common file "elf32-qnx.h", and now include that file.
6693 * elf32-qnx.h: New file: QNX specific common elf backend.
6694 * elf32-ppc.c: Do not include elf32-target.h if
6695 ELF32_PPC_C_INCLUDED is defined.
6696 * elf32-ppcqnx.c: New file: Support for QNX.
6697 * elfarmqnx-nabi.c: Include elf32-qnx.h for qnx elf backend.
6698 * targets.c: Add bfd_elf32_powerpc{le}qnx_vec.
6699
6700 2002-08-09 Nick Clifton <nickc@redhat.com>
6701
6702 * po/sv.po: Updated Swedish translation.
6703
6704 2002-08-09 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6705
6706 * elfxx-mips.c (mips_elf_global_got_index): Avoid segfault if
6707 g->global_gotsym is NULL.
6708
6709 2002-08-08 H.J. Lu <hjl@gnu.org>
6710
6711 * elflink.h (elf_add_default_symbol): Don't warn if a definition
6712 overrides an indirect versioned symbol.
6713
6714 2002-08-08 Jakub Jelinek <jakub@redhat.com>
6715
6716 * elf32-i386.c (elf_i386_relocate_section): Fill in proper addend
6717 for R_386_TLS_TPOFF32 relocs against symndx 0.
6718
6719 2002-08-07 H.J. Lu <hjl@gnu.org>
6720
6721 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Check symbol
6722 with undefined version if needed.
6723 (elf_link_assign_sym_version): Match a default symbol with a
6724 version without definition. No need to hide the default
6725 definition separately.
6726
6727 2002-08-08 Alan Modra <amodra@bigpond.net.au>
6728
6729 * elflink.h (elf_link_output_extsym): Don't output symbols from
6730 SEC_EXCLUDE sections.
6731
6732 * aoutx.h (aout_link_write_symbols): Correct handling of warning syms.
6733
6734 2002-08-07 Alan Modra <amodra@bigpond.net.au>
6735
6736 * elf64-ppc.c (edit_opd): Arrange to drop symbols for discarded .opd
6737 entries.
6738
6739 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6740
6741 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Cast signedness
6742 mismatch.
6743
6744 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6745
6746 * elfxx-mips.c (ABI_64_P): Remove superfluous check.
6747
6748 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6749
6750 * elf32-mips.c (mips_reloc_map): Fix typo.
6751
6752 2002-08-06 Alan Modra <amodra@bigpond.net.au>
6753
6754 * xcofflink.c (xcoff_write_global_symbol): Set n_scnum for abs_section.
6755
6756 2002-08-06 Alan Modra <amodra@bigpond.net.au>
6757
6758 * elf64-ppc.c (ppc64_elf_howto_raw): Zero all src_mask entries.
6759
6760 2002-08-06 Alan Modra <amodra@bigpond.net.au>
6761
6762 * libxcoff.h: Use PARAMS on function declarations.
6763 * coff-rs6000.c (xcoff_generate_rtinit): Simplify size calc.
6764 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
6765
6766 * coff-rs6000.c: (xcoff_rtype2howto): Don't place reloc address in
6767 addend.
6768 * coff64-rs6000.c: (xcoff64_rtype2howto): Likewise.
6769
6770 2002-08-06 Alan Modra <amodra@bigpond.net.au>
6771
6772 * coff-rs6000.c: Formatting fixes.
6773 (xcoff_calculate_relocation): Use PARAMS in declaration.
6774 (xcoff_complain_overflow): Likewise.
6775 (xcoff_ppc_relocate_section): Use old-style function pointer call.
6776 (bfd_xcoff_backend_data): Remove useless comments.
6777 (rs6000coff_vec): Likewise.
6778 (bfd_pmac_xcoff_backend_data): Likewise.
6779 (pmac_xcoff_vec): Likewise.
6780
6781 * coff64-rs6000.c: Formatting fixes.
6782 (xcoff64_calculate_relocation): Use PARAMS in declaration.
6783 (xcoff64_ppc_relocate_section): Use old-style function pointer call.
6784 (bfd_xcoff_backend_data): Remove useless comments.
6785 (rs6000coff64_vec): Likewise.
6786 (bfd_xcoff_aix5_backend_data): Likewise.
6787 (aix5coff64_vec): Likewise.
6788
6789 2002-08-06 Alan Modra <amodra@bigpond.net.au>
6790
6791 * coff-rs6000.c (xcoff_howto_table): Revert some of last change to
6792 mask entries. Use complain_overflow_dont for R_REF.
6793 (xcoff_reloc_type_ba): Revert last change.
6794 (xcoff_reloc_type_br): Likewise.
6795 (xcoff_reloc_type_crel): Likewise.
6796 (xcoff_ppc_relocate_section): Likewise.
6797 * coff64-rs6000.c (xcoff64_reloc_type_br): Likewise.
6798 (xcoff64_ppc_relocate_section): Likewise.
6799 (xcoff64_howto_table): Revert some of last change to mask entries.
6800 Use complain_overflow_dont for R_REF.
6801
6802 * coff-rs6000.c (xcoff_howto_table): Fix src_mask entries. Make all
6803 relocs with bitsize == 16 have size = 1.
6804 (xcoff_reloc_type_ba): Correct src_mask and dst_mask adjustment.
6805 (xcoff_reloc_type_br): Likewise.
6806 (xcoff_reloc_type_crel): Likewise.
6807 (xcoff_ppc_relocate_section): Set up src_mask and dst_mask correctly.
6808 * coff64-rs6000.c (xcoff64_reloc_type_br): Correct src_mask and
6809 dst_mask adjustment.
6810 (xcoff64_ppc_relocate_section): Set up src_mask and dst_mask correctly.
6811 (xcoff64_howto_table): Fix src_mask entries. Make all relocs with
6812 bitsize == 16 have size = 1.
6813
6814 2002-08-01 Denis Chertykov <denisc@overta.ru>
6815
6816 * elf32-ip2k.c: Processor manufacturer changed to Ubicom.
6817 (struct misc): New field isymbuf. All free_* fields removed.
6818 (symbol_value): Pass in internal syms. No need to swap syms in.
6819 (ip2k_elf_relax_section): Use bfd_elf_get_elf_syms. Properly free
6820 possibly cached info.
6821 (tidyup_after_error): Removed.
6822 (ip2k_elf_relax_section_pass1): Don't use removed fields of struct
6823 misc. Use new field.
6824 (adjust_all_relocations): Use internal syms. No need to swap syms
6825 in and out.
6826 (add_page_insn): Don't use removed fields of struct misc.
6827
6828 2002-08-01 Nick Clifton <nickc@redhat.com>
6829
6830 * elf32-arm.h: Revert previous delta.
6831
6832 2002-08-01 Nick Clifton <nickc@redhat.com>
6833
6834 * configure.in (AM_INIT_AUTOMAKE): Bump version number.
6835 * configure: Regenerate.
6836
6837 2002-07-31 H.J. Lu <hjl@gnu.org>
6838
6839 * config.bfd: Add x86-64 vector to Linux/i386 if 64bit BFD is
6840 selected.
6841
6842 2002-07-31 H.J. Lu <hjl@gnu.org>
6843
6844 * config.bfd: Add n32 vectors to 32bit Linux/mips if 64bit BFD
6845 is selected.
6846
6847 2002-07-31 Jakub Jelinek <jakub@redhat.com>
6848
6849 * elf32-i386.c (elf_i386_copy_indirect_symbol): Swap tls_type
6850 if _bfd_elf_link_hash_copy_indirect will swap got.refcount.
6851
6852 2002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
6853
6854 * cpu-ns32k.c (_bfd_ns32k_put_immdeiate, _bfd_ns32k_get_immediate):
6855 There is no 8 byte relocation type for this architecture.
6856 (do_ns32k_reloc): Use bfd_vma instead of native types.
6857 (bfd_ns32k_put_immediate, _bfd_ns32k_relocate_contents) put_data
6858 returns void.
6859 (_bfd_ns32k_put_displacement): Don't check for overflow. We can
6860 rely on generic code to do that.
6861 * aout-ns32k.c (howto_table): Add appropriate overflow detection
6862 to all table entries.
6863 (_bfd_ns32k_relocate_contents): put_data returns void.
6864 * ns32k.h: (_bfd_ns32k_put_displacement, _bfd_ns32k_put_immediate)
6865 (_bfd_do_ns32k_reloc_contents): Fix prototypes. put data functions
6866 return void.
6867
6868 2002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
6869
6870 * aoutx.h (aout_link_check_ar_symbols): Whether to include an
6871 archive object is target dependant.
6872
6873 2002-07-31 Adam Nemet <anemet@lnxw.com>
6874
6875 * elf32-arm.h (ARM_PLT_ENTRY_SIZE): Rename PLT_ENTRY_SIZE.
6876 (THUMB_PLT_ENTRY_SIZE): New macro.
6877 (PLT_ENTRY_SIZE): Return the appropriate *_PLT_ENTRY_SIZE.
6878 (elf32_arm_plt0_entry): Rename PLT_ENTRY_SIZE to
6879 ARM_PLT_ENTRY_SIZE.
6880 (elf32_arm_plt_entry): Likewise.
6881 (elf_backend_plt_header_size): Likewise.
6882 (elf32_thumb_plt0_entry): New global.
6883 (elf32_arm_finish_dynamic_sections): Use it. Put Thumb entries
6884 into .plt.thumb.
6885 (elf32_thumb_plt_entry): New global.
6886 (elf32_arm_finish_dynamic_symbol): Use it. Use .thumb.plt for
6887 Thumb entries. Set the bottom bit of the corresponding GOT entry
6888 for a Thumb PLT entry.
6889 (struct elf32_arm_plt_entry_info): New structure.
6890 (struct elf32_arm_link_hash_entry, plt_info): New member of this
6891 type.
6892 (elf32_arm_link_hash_newfunc): Initialize new member.
6893 (elf32_arm_final_link_relocate, R_ARM_THM_PC22 case): Handle
6894 relocations against the PLT.
6895 (elf32_arm_check_relocs, case R_ARM_PLT32 case): Set
6896 first_rel_type if this is the first time we encounter the symbol.
6897 (elf32_arm_check_relocs, case R_ARM_THM_PC22 case): New case.
6898 Determine if relocation needs a PLT entry. Set first_rel_type if
6899 this is the first time we encounter the symbol
6900 (elf32_arm_adjust_dynamic_symbol): Create PLT entries for Thumb
6901 functions as well.
6902 (elf32_arm_size_dynamic_sections): Handle .plt.thumb like .plt.
6903 (elf32_arm_create_dynamic_sections): New function. Create the
6904 .plt.thumb section.
6905 (elf_backend_create_dynamic_sections): Call it.
6906
6907 2002-07-31 Nick Clifton <nickc@redhat.com>
6908
6909 * bfd.c (bfd_alt_mach_code): Rename parameter 'index' to
6910 'alternative' in order to avoid shadowing global symbol of the
6911 same name.
6912 * bfd-in2.h: Regenerate.
6913 * libbfd.h: Regenerate.
6914 * libcoff.h: Regenerate.
6915
6916 2002-07-31 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6917
6918 * Makefile.am: Add n32 ABI support.
6919 * Makefile.in: Regenerate.
6920 * config.bfd: Add n32 vectors to mips64*-*-linux* targets. Treat 64
6921 bit vectors for mips*-*-linux targets as optional.
6922 * configure.in: Add n32 ABI vectors.
6923 * configure: Regenerate.
6924 * elf32-mips.c (mips_elf32_object_p): Reject n32 ABI files.
6925 * elfn32-mips.c: New file, n32 ABI support.
6926 * targets.c: Add n32 ABI vectors.
6927
6928 2002-07-30 Graeme Peterson <gp@qnx.com>
6929
6930 * elfarmqnx-nabi.c: New file: Support for QNX.
6931 * config.bfd: Add support for arm-*-nto target.
6932 * configure.in: Add support for bfd_elf32_{big|little}armqnx_vec.
6933 * configure: Regenerate.
6934 * Makefile.am: Add entries for elfarmqnx-nabi.c.
6935 * Makefile.in: Regenerate.
6936 * elf32-arm.h (ELF_MAXPAGESIZE): Do not define if already defined.
6937 Do not define global function if ELFARM_NABI_C_INCLUDED is defined.
6938 * elfarm-nabi.c: Do not include elf32-arm.h if
6939 ELFARM_NABI_C_INCLUDED is defined.
6940 * targets.c: Add bfd_elf32_{big|little}armqnx_vec.
6941
6942 2002-07-30 Nick Clifton <nickc@redhat.com>
6943
6944 * po/sv.po: Updated Swedish translation.
6945
6946 2002-07-30 Jakub Jelinek <jakub@redhat.com>
6947
6948 * elf.c (elf_fake_sections): Fix up .tbss sh_size and sh_type.
6949
6950 2002-07-30 Alan Modra <amodra@bigpond.net.au>
6951
6952 * aoutx.h (some_aout_object_p): Clean up tdata properly on error.
6953 * archive.c (bfd_generic_archive_p): Likewise.
6954 * coff-rs6000.c (_bfd_xcoff_archive_p): Likewise.
6955 (_bfd_xcoff_archive_p): Use bfd_scan_vma in place of strtol.
6956 * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
6957 (xcoff64_archive_p): Likewise.
6958 (xcoff64_openr_next_archived_file): Likewise.
6959 (xcoff64_archive_p): Clean up tdata properly on error.
6960 * coffgen.c (coff_real_object_p): Likewise.
6961 (coff_object_p): Release filehdr and opthdr.
6962 * ecoff.c (_bfd_ecoff_archive_p): Clean up tdata properly on error.
6963 * ieee.c (ieee_archive_p): Likewise.
6964 * ihex.c (ihex_object_p): Likewise.
6965 (ihex_mkobject): Always allocate tdata.
6966 * peicode.h (pe_ILF_object_p): Release bfd_alloc'd buffer on error.
6967 * srec.c (srec_mkobject): Always allocate tdata.
6968 (srec_object_p): Clean up tdata properly on error.
6969 (symbolsrec_object_p): Likewise.
6970 * versados.c (versados_object_p): Likewise.
6971 * vms-misc.c (_bfd_vms_get_record): Use bfd_malloc instead of malloc,
6972 and bfd_realloc instead of realloc.
6973 (add_new_contents): Use bfd_alloc instead of bfd_malloc for sections.
6974 * vms.c (vms_initialize): Always allocate tdata. Use bfd_alloc in
6975 place of bfd_malloc, simplifying error freeing. Free hash table too.
6976 (vms_object_p): Clean up tdata on error.
6977 (vms_mkobject): Don't complain on stderr if vms_initialize fails.
6978 (vms_close_and_cleanup): Adjust for bfd_alloc use.
6979
6980 2002-07-30 Alan Modra <amodra@bigpond.net.au>
6981
6982 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set e_flags.
6983
6984 2002-07-26 Chris Demetriou <cgd@broadcom.com>
6985
6986 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Merge ASE
6987 flags into resulting BFD.
6988
6989 2002-07-26 Alan Modra <amodra@bigpond.net.au>
6990
6991 From John Reiser <jreiser@BitWagon.com>
6992 * elf32-i386.c (elf_i386_link_hash_table_create): Clear
6993 tls_ldm_got.refcount.
6994
6995 2002-07-25 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6996
6997 * elf64-mips.c: Update TODO comment.
6998 (mips_elf64_higher_reloc,mips_elf64_highest_reloc,
6999 mips_elf64_gprel16_reloca): Remove prototypes.
7000 (mips16_jump_reloc,mips16_gprel_reloc): Add functions.
7001 (UNUSED_RELOC): Replace by EMPTY_RELOC.
7002 (mips_elf64_howto_table_rel): Use special R_MIPS_HI16 handling. Remove
7003 wrong comments. Remove disfunctional support of R_MIPS_HIGHER and
7004 R_MIPS_HIGHEST.
7005 (mips_elf64_howto_table_rela): Fix handling of R_MIPS_GPREL16 and
7006 R_MIPS_GOT16. Remove wrong comments.
7007 (elf_mips16_jump_howto,elf_mips16_gprel_howto,
7008 elf_mips_gnu_vtinherit_howto,elf_mips_gnu_vtentry_howto): New, code
7009 from elf32-mips.c.
7010 (mips_elf64_hi16_reloc): Fix formatting.
7011 (mips_elf64_higher_reloc,mips_elf64_highest_reloc): Remove.
7012 (mips_elf64_got16_reloc): Fix formatting. Remove superfluous code.
7013 Better comment. Fall back to R_MIPS_GOT_DISP instead of abort().
7014 (mips_elf64_gprel16_reloc): Make static. Add check for
7015 partial_inplace.
7016 (mips_elf64_gprel16_reloca): Remove.
7017 (mips_elf64_literal_reloc): New function.
7018 (mips_elf64_gprel32_reloc): Fix formatting.
7019 (mips_elf64_shift6_reloc): Fix comment. Make static.
7020 (mips16_jump_reloc,mips16_gprel_reloc): New functions, code from
7021 elf32-mips.c.
7022 (elf_reloc_map,mips_reloc_map): New mapping table, similiar as in
7023 elf32-mips.c
7024 (bfd_elf64_bfd_reloc_type_lookup): Use the mapping table. Enable GNU
7025 specific relocations.
7026 (mips_elf64_rtype_to_howto): Enable GNU specific relocations.
7027 (mips_elf64_object_p): Invert logic to check for SGI-ish ABI.
7028 (ELF_MAXPAGESIZE): Add comment.
7029
7030 2002-07-25 Nick Clifton <nickc@redhat.com>
7031
7032 * po/sv.po: Updated Swedish translation.
7033 * po/es.po: Updated Spanish translation.
7034 * po/fr.po: Updated French translation.
7035
7036 2002-07-25 Alan Modra <amodra@bigpond.net.au>
7037
7038 * elf-bfd.h (_bfd_elf32_link_record_local_dynamic_symbol): Define
7039 as elf_link_record_local_dynamic_symbol.
7040 (_bfd_elf64_link_record_local_dynamic_symbol): Likewise.
7041 (elf_link_record_local_dynamic_symbol): Declare. Now returns int.
7042 * elflink.h (elf_link_record_local_dynamic_symbol): Move to..
7043 * elflink.c: .. here. Use bfd_elf_get_elf_syms. Check whether an
7044 attempt is made to record a symbol in a discarded section, and
7045 return `2' in that case.
7046
7047 2002-07-24 Nick Clifton <nickc@redhat.com>
7048
7049 * po/sv.po: Updated Swedish translation.
7050 * po/es.po: Updated Spanish translation.
7051
7052 2002-07-23 Alan Modra <amodra@bigpond.net.au>
7053
7054 * po/SRC-POTFILES.in: Regenerate.
7055
7056 * elf-hppa.h (elf_hppa_relocate_section): If relocatable, return
7057 immediately. Remove code handling relocatable linking.
7058 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
7059 * elf32-cris.c (cris_elf_relocate_section): Likewise.
7060 * elf32-fr30.c (elf32_frv_relocate_section): Likewise.
7061 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
7062 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
7063 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
7064 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
7065 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
7066 * elf32-v850.c (v850_elf_relocate_section): Likewise.
7067 * elf32-vax.c (elf_vax_relocate_section): Likewise.
7068 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7069 * elf32-avr.c (elf_backend_rela_normal): Define.
7070 * elf32-cris.c: Likewise.
7071 * elf32-fr30.c: Likewise.
7072 * elf32-frv.c: Likewise.
7073 * elf32-h8300.c: Likewise.
7074 * elf32-hppa.c: Likewise.
7075 * elf32-ip2k.c: Likewise.
7076 * elf32-sparc.c: Likewise.
7077 * elf32-v850.c: Likewise.
7078 * elf32-vax.c: Likewise.
7079 * elf64-hppa.c: Likewise.
7080 * elf64-sparc.c: Likewise.
7081 * elf32-fr30.c (elf32_frv_relocate_section): Edit comment.
7082 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
7083 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
7084 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
7085 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
7086 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
7087 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
7088 * elf-m10200.c (USE_RELA): Don't define.
7089 * elf-m10300.c: Likewise.
7090 * elfarm-oabi.c: Likewise.
7091 * elf32-i370.c: Likewise.
7092 * elf32-ip2k.c: Likewise.
7093 * elf32-m68k.c: Likewise.
7094 * elf32-mcore.c: Likewise.
7095 * elf32-ppc.c: Likewise.
7096 * elf32-s390.c: Likewise.
7097 * elf32-vax.c: Likewise.
7098 * elf64-ppc.c: Likewise.
7099 * elf64-s390.c: Likewise.
7100 * elf64-x86-64.c: Likewise.
7101 * elfxx-ia64.c: Likewise.
7102 * elf32-avr.c (USE_REL): Don't undef.
7103 * elf32-ip2k.c: Likewise.
7104
7105 2002-07-23 Nick Clifton <nickc@redhat.com>
7106
7107 * elf-bfd.h (struct elf_backend_data): Add new bitfield
7108 'want_p_paddr_set_to_zero'.
7109 * elfxx-target.h: Set default value for want_p_paddr_set_to_zero
7110 to false;
7111 * elfxx-ia64.c: Set want_p_paddr_set_zero for HPUX target.
7112 * elf.c (copy_private_bfd_data): Test want_p_paddr_set_zero.
7113
7114 2002-07-23 Gabor Keresztfalvi <keresztg@mail.com>
7115
7116 * nlmcode.h (nlm_swap_auxiliary_headers_out): Swapped the order of
7117 the MeSsAgEs and CoPyRiGhT tags to make >=NW4.x NLM loaders to
7118 show the Copyright string.
7119 Minor formatting tidy ups.
7120
7121 2002-07-23 Nick Clifton <nickc@redhat.com>
7122
7123 * po/fr.po: Updated French translation.
7124 * po/sv.po: Updated Swedish translation.
7125
7126 2002-07-23 Alan Modra <amodra@bigpond.net.au>
7127
7128 * elflink.h (elf_link_input_bfd): Don't change internal symbols
7129 when outputting relocs.
7130
7131 2002-07-20 Jason Thorpe <thorpej@wasabisystems.com>
7132
7133 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only insert
7134 DT_PLTGOT into the dynamic section if there is a PLT.
7135
7136 2002-07-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7137
7138 * elfxx-mips.c (_bfd_mips_elf_discard_info): New function, code from
7139 elf32-mips.c.
7140 (_bfd_mips_elf_write_section): Likewise.
7141 * elfxx-mips.h (_bfd_mips_elf_discard_info): New prototype.
7142 (_bfd_mips_elf_write_section): Likewise.
7143 * elf32-mips.c (elf32_mips_discard_info): Move to elfxx-mips.c.
7144 (elf32_mips_write_section): Likewise.
7145 * elf64-mips.c (_bfd_mips_elf_ignore_discarded_relocs): Use it.
7146 (_bfd_mips_elf_write_section): Likewise.
7147
7148 2002-07-19 Alan Modra <amodra@bigpond.net.au>
7149
7150 * elfxx-ia64.c: (elfNN_ia64_modify_segment_map): Properly scan
7151 PT_IA_64_UNWIND segments for a given section.
7152
7153 2002-07-17 H.J. Lu <hjl@gnu.org>
7154
7155 * Makefile.am: Fix a typo.
7156 * Makefile.in: Regenerate.
7157
7158 2002-07-15 Denis Chertykov <denisc@overta.ru>
7159 Frank Ch. Eigler <fche@redhat.com>
7160 Ben Elliston <bje@redhat.com>
7161 Alan Lehotsky <alehotsky@cygnus.com>
7162 John Healy <jhealy@redhat.com>
7163 Graham Stott <grahams@redhat.com>
7164 Jeff Johnston <jjohnstn@redhat.com>
7165
7166 * Makefile.am: Add support for ip2k.
7167 * Makefile.in: Regenerate.
7168 * doc/Makefile.in: Regenerate.
7169 * archures.c: Add support for ip2k.
7170 * config.bfd: Add support for ip2k.
7171 * configure.in: Add support for ip2k.
7172 * configure: Regenerate.
7173 * reloc.c: Add support for ip2k.
7174 * targets.c: Add support for ip2k.
7175 * bfd-in2.h: Regenerate.
7176 * libbfd.h: Regenerate.
7177 * cpu-ip2k.c: New file.
7178 * elf32-ip2k.c: New file.
7179
7180 2002-07-17 Ian Rickards <irickard@arm.com>
7181
7182 * dwarf2.c (concat_filename): If we can't establish the directory
7183 just return the filename.
7184
7185 2002-07-16 Moritz Jodeit <moritz@jodeit.org>
7186
7187 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Correct order of memset args.
7188
7189 2002-07-16 Alan Modra <amodra@bigpond.net.au>
7190
7191 * elflink.h: Formatting fixes, tidy prototypes.
7192 (elf_link_assign_sym_version): Move common code out of loop.
7193
7194 2002-07-16 Alan Modra <amodra@bigpond.net.au>
7195
7196 * elflink.h (elf_link_input_bfd): Don't call reloc_emitter when
7197 reloc section size is zero. Correct reloc output location.
7198
7199 2002-07-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
7200
7201 * elf-hppa.h (elf_hppa_reloc_final_type): Use R_PARISC_PCREL16F as
7202 the final type for the e_fsel selector when generating PA2.0W code.
7203 (elf_hppa_relocate_insn): Provide support for PA2.0W 16-bit format 1
7204 relocations.
7205
7206 2002-07-14 H.J. Lu <hjl@gnu.org>
7207
7208 * elflink.h (elf_link_assign_sym_version): Hide the default
7209 definition if there is a hidden versioned definition.
7210
7211 2002-07-12 Hans-Peter Nilsson <hp@axis.com>
7212
7213 * elf32-cris.c (cris_elf_relocate_section): Drop nonsensical
7214 dynamic reference test in assertion when initializing GOT with
7215 static contents. Just assert that there are either no dynamic
7216 sections, the symbol is defined in the regular objects or that the
7217 symbol is undef weak. Tweak comment.
7218 (elf_cris_finish_dynamic_symbol): Emit .got reloc for a program
7219 only if the symbol isn't defined in the program and isn't undef
7220 weak.
7221 (elf_cris_adjust_dynamic_symbol): Simplify condition for getting
7222 rid of PLT entry: only do it if the symbol isn't defined in a DSO.
7223 When doing so, clear ELF_LINK_HASH_NEEDS_PLT. Tweak comments.
7224 (elf_cris_discard_excess_program_dynamics): Don't consider
7225 ELF_LINK_HASH_REF_DYNAMIC when omitting .got runtime relocs.
7226
7227 2002-07-11 Alan Modra <amodra@bigpond.net.au>
7228
7229 * elf32-i386.c (elf_i386_relocate_section): Don't complain about
7230 unresolved debugging relocs in dynamic applications.
7231 * elf32-s390.c (elf_s390_relocate_section): Likewise.
7232 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
7233 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
7234 * elf64-s390.c (elf_s390_relocate_section): Likewise.
7235 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7236 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
7237
7238 2002-07-10 Alan Modra <amodra@bigpond.net.au>
7239
7240 * elf64-ppc.c (ONES): Define.
7241 (ppc64_elf_howto_table): Use ONES here to avoid warnings. Fill in
7242 missing src_mask fields. Tweak R_PPC64_NONE, R_PPC64_COPY. Fill
7243 in missing dst_mask fields on R_PPC64_PLT32, R_PPC64_PLTREL32.
7244
7245 * elf64-ppc.c (ppc64_elf_get_symbol_info): Delete.
7246 (ppc64_elf_set_private_flags): Delete.
7247 (ppc64_elf_section_from_shdr): Delete.
7248 (ppc64_elf_merge_private_bfd_data): Remove flag checking/merging code.
7249 (ppc64_elf_fake_sections): Delete.
7250 (bfd_elf64_bfd_set_private_flags): Don't define.
7251 (bfd_elf64_get_symbol_info): Likewise.
7252 (elf_backend_section_from_shdr): Likewise.
7253 (elf_backend_fake_sections): Likewise.
7254
7255 2002-07-10 Marco Walther <Marco.Walther@sun.com>
7256
7257 * elf.c: (assign_section_numbers) Set sh_entsize for .stab only
7258 when not already set.
7259 * elf64-sparc.c: (sparc64_elf_fake_sections): New function.
7260 (elf_backend_fake_sections): Define.
7261
7262 2002-07-10 Alan Modra <amodra@bigpond.net.au>
7263
7264 * merge.c (_bfd_merge_section): Remove redundant output_section check.
7265 Formatting.
7266 (_bfd_merge_sections): Don't set SEC_EXCLUDE on unused sections.
7267
7268 2002-07-09 Hans-Peter Nilsson <hp@axis.com>
7269
7270 * elf32-cris.c (cris_elf_relocate_section): Move sanity-check for
7271 NULL sym_hashes to just before use.
7272 <case R_CRIS_32_GOTREL>: In test for local symbol, accept also
7273 symbol with non-default visibility.
7274 <case R_CRIS_32_GOTREL, case R_CRIS_32_PLT_GOTREL>: Ditto.
7275 <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
7276 Ditto.
7277 (cris_elf_gc_sweep_hook): Only decrease h->plt.refcount for
7278 symbol with non-default visibility.
7279 (cris_elf_check_relocs): At tests for local symbol before
7280 increasing h->plt.refcount, also check for non-default
7281 visibility. Ditto when checking for local symbol to eliminate
7282 pc-relative runtime relocs.
7283
7284 2002-07-08 Alan Modra <amodra@bigpond.net.au>
7285
7286 * elf.c: Formatting.
7287 (IS_SOLARIS_PT_INTERP): Add p_paddr and p_memsz checks.
7288 (INCLUDE_SECTION_IN_SEGMENT): Remove IS_SOLARIS_PT_INTERP.
7289 (copy_private_bfd_data): Set p_vaddr on broken Solaris PT_INTERP
7290 segments.
7291
7292 2002-07-07 Mark Mitchell <mark@codesourcery.com>
7293 Alan Modra <amodra@bigpond.net.au>
7294
7295 * cofflink.c (_bfd_coff_final_link): On PE COFF systems, take into
7296 account the impact of relocation count overflow when computing
7297 section offsets.
7298 * coffcode.h (coff_write_relocs): Use obj_pe when deciding whether
7299 or not to apply the PE COFF reloc overflow handling. Fix a
7300 fencepost error in deciding whether or not to use that technique.
7301
7302 2002-07-07 Alan Modra <amodra@bigpond.net.au>
7303
7304 * elf-bfd.h (struct elf_reloc_cookie): Remove locsym_shndx,
7305 change type of locsyms.
7306 (bfd_elf_get_elf_syms): Declare.
7307 * elf.c (bfd_elf_get_elf_syms): New function.
7308 (group_signature): Use bfd_elf_get_elf_syms.
7309 (bfd_section_from_r_symndx): Likewise.
7310 * elfcode.h (elf_slurp_symbol_table): Likewise.
7311 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
7312 (elf_link_add_object_symbols): Likewise. Reorganise to increase
7313 locality of various data structures. Properly free internal relocs.
7314 (elf_bfd_final_link): Properly free internal relocs.
7315 (elf_link_check_versioned_symbol): Use bfd_elf_get_elf_syms.
7316 (elf_link_input_bfd): Likewise.
7317 (elf_gc_mark): Likewise. Properly free internal relocs.
7318 (elf_gc_sweep): Properly free internal relocs.
7319 (elf_reloc_symbol_deleted_p): No need to swap syms in.
7320 (elf_bfd_discard_info): Use bfd_elf_get_elf_syms. Properly free
7321 internal relocs.
7322 * elf-m10200.c (mn10200_elf_relax_section): Use bfd_elf_get_elf_syms.
7323 Properly free possibly cached info.
7324 (mn10200_elf_relax_delete_bytes): Remove symbol swapping code.
7325 (mn10200_elf_symbol_address_p): Pass in internal syms. Remove
7326 symbol swapping code.
7327 (mn10200_elf_get_relocated_section_contents): Use bfd_elf_get_elf_syms.
7328 Properly free possibly cached info.
7329 * elf-m10300.c (mn10300_elf_relax_section): As above for elf-m10200.c.
7330 (mn10300_elf_relax_delete_bytes): Likewise.
7331 (mn10300_elf_symbol_address_p): Likewise.
7332 (mn10300_elf_get_relocated_section_contents): Likewise.
7333 * elf32-h8300.c (elf32_h8_relax_section): As above for elf-m10200.c.
7334 (elf32_h8_relax_delete_bytes): Likewise.
7335 (elf32_h8_symbol_address_p): Likewise.
7336 (elf32_h8_get_relocated_section_contents): Likewise.
7337 * elf32-m32r.c (m32r_elf_relax_section): As above for elf-m10200.c.
7338 (m32r_elf_relax_delete_bytes): Likewise.
7339 (m32r_elf_get_relocated_section_contents): Likewise.
7340 * elf32-sh.c (sh_elf_reloc_loop): Free section contents using
7341 elf_section_data to determine whether cached.
7342 (sh_elf_relax_section): As above for elf-m10200.c.
7343 (sh_elf_relax_delete_bytes): Likewise.
7344 (sh_elf_get_relocated_section_contents): Likewise.
7345 * elf32-xstormy16.c (xstormy16_elf_relax_section): As above.
7346 * elf64-alpha.c (elf64_alpha_relax_section): As above. Also delay
7347 reading of local syms.
7348 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
7349 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): As above.
7350 * elfxx-ia64.c (elfNN_ia64_relax_section): As above.
7351 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Properly free internal
7352 relocs.
7353 * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Properly
7354 free internal relocs and section contents. Don't read symbols.
7355 * elf32-hppa.c (get_local_syms): Use bfd_elf_get_elf_syms.
7356 (elf32_hppa_size_stubs): Don't free local syms.
7357 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Delay
7358 reading of local syms. Use bfd_elf_get_elf_syms. Properly free
7359 possibly cached info.
7360 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
7361 * elf64-hppa.c (elf64_hppa_check_relocs): Use bfd_elf_get_elf_syms.
7362 * elf64-ppc.c (struct ppc_link_hash_table): Delete bfd_count and
7363 all_local_syms.
7364 (get_local_syms): Delete function.
7365 (edit_opd): Use bfd_elf_get_elf_syms. Free on error exit. Cache
7366 on exit.
7367 (ppc64_elf_size_stubs): Use bfd_elf_get_elf_syms. Free/cache on exit.
7368
7369 2002-07-05 Jim Wilson <wilson@redhat.com>
7370
7371 * syms.c (decode_section_type): New.
7372 (bfd_decode_symclass): Call decode_section_type.
7373
7374 2002-07-04 Jakub Jelinek <jakub@redhat.com>
7375
7376 * merge.c (_bfd_merged_section_offset): Avoid accessing byte before
7377 section content start.
7378 Reported by Michael Schumacher <mike@hightec-rt.com>.
7379
7380 2002-07-04 Alan Modra <amodra@bigpond.net.au>
7381
7382 * section.c (_bfd_strip_section_from_output): Remove unnecessary
7383 link order code. Don't actually remove the output section here;
7384 Just set a flag for the linker to do so.
7385 * elflink.c (_bfd_elf_link_renumber_dynsyms): Test for removed
7386 sections when setting up output section dynsyms.
7387
7388 2002-07-04 Alan Modra <amodra@bigpond.net.au>
7389
7390 * elflink.h (elf_link_add_object_symbols): Revert 1999-09-02 hpux
7391 fudge.
7392 * elf.c (bfd_section_from_shdr): Work around broken hpux shared
7393 libs here instead.
7394
7395 2002-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
7396
7397 * elf64-s390.c (create_got_section): Set .got section alignment to
7398 8 bytes.
7399 (elf_s390_check_relocs): Set .rela.dyn section alignment to 8 bytes.
7400
7401 2002-07-02 Alan Modra <amodra@bigpond.net.au>
7402
7403 * elf.c (_bfd_elf_reloc_type_class): Fix comment grammar.
7404
7405 2002-07-01 Matt Thomas <matt@3am-software.com>
7406
7407 * elf32-vax.c (elf32_vax_print_private_bfd_data): Change EF_*
7408 to EF_VAX_*.
7409
7410 2002-07-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7411
7412 * elfxx-mips.c (ABI_64_P): Fix comment.
7413 (MIPS_ELF_OPTIONS_SECTION_NAME,MIPS_ELF_STUB_SECTION_NAME): Use the
7414 new section names for N64 ABI.
7415 (mips_elf_output_extsym): No special _gp_disp handling for NewABI.
7416 (mips_elf_calculate_relocation): Code formatting.
7417 (mips_elf_create_dynamic_relocation): Likewise.
7418 (_bfd_mips_elf_fake_sections): IRIX6 needs this hack, too.
7419 (_bfd_mips_elf_size_dynamic_sections): Handle GOT_PAGE for any NewABI.
7420 (_bfd_mips_elf_relocate_section): No special handling for R_MIPS_64
7421 in any NewABI.
7422 (_bfd_mips_elf_finish_dynamic_symbol): No special _gp_disp handling
7423 for NewABI.
7424 (_bfd_mips_elf_modify_segment_map): Handle any N64 ABI.
7425 (_bfd_mips_elf_gc_sweep_hook): NewABI GOT relocs should be handled
7426 here, too.
7427
7428 2002-07-01 Andreas Schwab <schwab@suse.de>
7429
7430 * elf64-x86-64.c (elf64_x86_64_relocate_section): Only convert
7431 R_X86_64_64 to R_X86_64_RELATIVE.
7432
7433 2002-07-01 John David Anglin <dave@hiauly1.hia.nrc.ca>
7434
7435 * vaxbsd.c: New BFD backend for VAX BSD and Ultrix.
7436 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Add new backend.
7437 Run "make dep-am".
7438 * config.bfd (vax-*-bsd* | vax-*-ultrix*): Use vaxbsd_vec instead of
7439 host_aout_vec.
7440 * configure.in (vaxbsd_vec): Add.
7441 * targets.c (vaxbsd_vec): Add.
7442 * Makefile.in: Rebuild.
7443 * configure: Rebuild.
7444 * po/SRC-POTFILES.in: Rebuild.
7445
7446 2002-07-01 Alan Modra <amodra@bigpond.net.au>
7447
7448 * elflink.h (elf_gc_mark): Pass in the section whose relocs we are
7449 examining to gc_mark_hook, rather than the bfd.
7450 (elf_gc_sections): Adjust.
7451 * elf-bfd.h (struct elf_backend_data <gc_mark_hook>): Likewise.
7452 * elf-m10300.c (mn10300_elf_gc_mark_hook): Likewise.
7453 * elf32-arm.h (elf32_arm_gc_mark_hook): Likewise.
7454 * elf32-avr.c (elf32_avr_gc_mark_hook): Likewise.
7455 * elf32-cris.c (cris_elf_gc_mark_hook): Likewise.
7456 * elf32-d10v.c (elf32_d10v_gc_mark_hook): Likewise.
7457 * elf32-fr30.c (fr30_elf_gc_mark_hook): Likewise.
7458 * elf32-hppa.c (elf32_hppa_gc_mark_hook): Likewise.
7459 * elf32-i386.c (elf_i386_gc_mark_hook): Likewise.
7460 * elf32-m32r.c (m32r_elf_gc_mark_hook): Likewise.
7461 * elf32-m68k.c (elf_m68k_gc_mark_hook): Likewise.
7462 * elf32-mcore.c (mcore_elf_gc_mark_hook): Likewise.
7463 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Likewise.
7464 * elf32-ppc.c (ppc_elf_gc_mark_hook): Likewise.
7465 * elf32-s390.c (elf_s390_gc_mark_hook): Likewise.
7466 * elf32-sh.c (sh_elf_gc_mark_hook): Likewise.
7467 * elf32-sparc.c (elf32_sparc_gc_mark_hook): Likewise.
7468 * elf32-v850.c (v850_elf_gc_mark_hook): Likewise.
7469 * elf32-vax.c (elf_vax_gc_mark_hook): Likewise.
7470 * elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Likewise.
7471 * elf64-mmix.c (mmix_elf_gc_mark_hook): Likewise.
7472 * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
7473 * elf64-s390.c (elf_s390_gc_mark_hook): Likewise.
7474 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
7475 * elfxx-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise.
7476 * elfxx-mips.h (_bfd_mips_elf_gc_mark_hook): Likewise.
7477 * elf64-x86-64.c (elf64_x86_64_gc_mark_hook): Likewise.
7478 * elf32-frv.c (elf32_frv_gc_mark_hook): Likewise. Also remove
7479 redundant local sym tests.
7480 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_entry.
7481 (link_hash_newfunc): Init is_entry.
7482 (ppc64_elf_copy_indirect_symbol): Copy is_entry.
7483 (ppc64_elf_link_hash_table_create): Init all_local_syms.
7484 (create_linkage_sections): Use bfd_make_section_anyway rather than
7485 bfd_make_section.
7486 (ppc64_elf_mark_entry_syms): New function.
7487 (ppc64_elf_check_relocs): Don't bother testing elf_bad_symtab. Set
7488 up opd entry to function section map.
7489 (ppc64_elf_gc_mark_hook): Special case opd section relocs, and
7490 relocs that reference the opd section.
7491 (edit_opd): New function.
7492 (ppc64_elf_size_dynamic_sections): Call get_local_syms and edit_opd.
7493 (ppc64_elf_setup_section_lists): Don't calculate htab->bfd_count here.
7494 (get_local_syms): Do so here. Exit if we already have local syms.
7495 Remove bogus comment imported from elf32-hppa.c. Don't attempt to
7496 read local syms on non-ELF input.
7497 (ppc64_elf_size_stubs): Call _bfd_elf64_link_read_relocs rather
7498 than duplicating it's function here. Adjust free of internal
7499 relocs to suit.
7500 (ppc64_elf_relocate_section): Adjust local syms in opd section.
7501 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Declare.
7502 * elf32-hppa.c (elf32_hppa_size_stubs): Call
7503 _bfd_elf32_link_read_relocs rather than duplicating it's function
7504 here. Adjust free of internal relocs to suit.
7505
7506 2002-07-01 Andreas Jaeger <aj@suse.de>
7507
7508 * elf64-x86-64.c (elf64_x86_64_check_relocs): Certain relocations
7509 are not allowed in shared libs code, enforce -fPIC.
7510
7511 2002-06-29 Hans-Peter Nilsson <hp@bitrange.com>
7512
7513 * mmo.c (mmo_write_loc_chunk): Don't eliminate leading and
7514 trailing zero-sequences when there's previous left-over data.
7515
7516 2002-06-27 John David Anglin <dave@hiauly1.hia.nrc.ca>
7517
7518 * elf64-hppa.c (elf64_hppa_reloc_type_class): New function.
7519 (elf64_hppa_finish_dynamic_sections): Check other_rel_sec, dlt_rel_sec
7520 and opd_rel_sec in order for starting rela section. Check _raw_size.
7521 (elf_backend_reloc_type_class): Define.
7522
7523 2002-06-27 Kevin Buettner <kevinb@redhat.com>
7524
7525 * dwarf2.c (decode_line_info): Handle older, non-standard, 64-bit
7526 DWARF2 formats.
7527
7528 2002-06-27 Alan Modra <amodra@bigpond.net.au>
7529
7530 * cpu-powerpc.c: Comment on ordering of arch_info.
7531 * elf32-ppc.c (ppc_elf_object_p): New function.
7532 (elf_backend_object_p): Define.
7533 * elf64-ppc.c (ppc64_elf_object_p): New function.
7534 (elf_backend_object_p): Define.
7535
7536 2002-06-26 Jason Thorpe <thorpej@wasabisystems.com>
7537
7538 * configure.in (vax-*-netbsd*): Set COREFILE to netbsd-core.lo.
7539 * configure: Regenerate.
7540
7541 2002-06-25 Jason Eckhardt <jle@rice.edu>
7542
7543 * dwarf2.c (decode_line_info): Check unit->addr_size
7544 to read in the proper number of prologue bytes.
7545
7546 2002-06-25 Nick Clifton <nickc@cambridge.redhat.com>
7547
7548 * config.bfd (powerpc-*-aix5*): Only create a selvecs for
7549 aix5coff64_vec if 64-bit bfd support has been enabled.
7550 (powerpc64-*-aix5*): Only define if 64-bit bfd support has
7551 been enabled.
7552
7553 * targets.c (_bfd_target_vector[]): Only include
7554 aix5coff64_vec if 64-bit bfd support has been enabled.
7555
7556 2002-06-25 Alan Modra <amodra@bigpond.net.au>
7557
7558 * elf64-ppc.c (ppc_add_stub): Replace strcpy/strncpy with memcpy.
7559 * elf32-hppa.c (hppa_add_stub): Likewise.
7560 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
7561 * elflink.h (elf_add_default_symbol): Fix comment typo.
7562 (elf_add_default_symbol): Replace strcpy and strncpy with memcpy.
7563 (elf_link_add_object_symbols): Likewise.
7564 (elf_link_assign_sym_version): Likewise.
7565 * hash.c (bfd_hash_lookup): Likewise.
7566 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
7567 * section.c (bfd_get_unique_section_name): Likewise.
7568 * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
7569 * elf.c (_bfd_elf_make_section_from_phdr): Likewise.
7570 (assign_section_numbers): Likewise.
7571 (_bfd_elfcore_make_pseudosection): Likewise.
7572 (elfcore_grok_lwpstatus): Likewise.
7573 (elfcore_grok_win32pstatus): Likewise.
7574 (elfcore_write_note): Constify input params. Use PTR instead of
7575 void *. Include terminating NUL in namesz. Correct padding.
7576 Support NULL "name" param. Use memcpy instead of strcpy.
7577 (elfcore_write_prpsinfo): Constify input params.
7578 (elfcore_write_prstatus): Likewise. Use PTR instead of void *.
7579 (elfcore_write_lwpstatus): Likewise.
7580 (elfcore_write_pstatus): Likewise.
7581 (elfcore_write_prfpreg): Likewise.
7582 (elfcore_write_prxfpreg): Likewise.
7583 * elf-bfd.h (elfcore_write_note): Update declaration.
7584 (elfcore_write_prpsinfo): Likewise.
7585 (elfcore_write_prstatus): Likewise.
7586 (elfcore_write_pstatus): Likewise.
7587 (elfcore_write_prfpreg): Likewise.
7588 (elfcore_write_prxfpreg): Likewise.
7589 (elfcore_write_lwpstatus): Likewise.
7590
7591 2002-06-25 Jason Eckhardt <jle@rice.edu>
7592
7593 * ecoff.c (ecoff_set_symbol_info): Set BSF_FUNCTION for
7594 symbols of type stProc and stStaticProc.
7595
7596 2002-06-25 Nick Clifton <nickc@redhat.com>
7597
7598 * ecoff.c: VArious formatting fixes.
7599
7600 2002-06-25 Alan Modra <amodra@bigpond.net.au>
7601
7602 * coff-rs6000.c (xcoff_generate_rtinit): Fix typo.
7603
7604 2002-06-25 Alan Modra <amodra@bigpond.net.au>
7605
7606 * aout-adobe.c: Don't compare against "true" or "false.
7607 * aout-target.h: Likewise.
7608 * aoutx.h: Likewise.
7609 * archive.c: Likewise.
7610 * bout.c: Likewise.
7611 * cache.c: Likewise.
7612 * coff-a29k.c: Likewise.
7613 * coff-alpha.c: Likewise.
7614 * coff-i386.c: Likewise.
7615 * coff-mips.c: Likewise.
7616 * coff-or32.c: Likewise.
7617 * coff64-rs6000.c: Likewise.
7618 * coffcode.h: Likewise.
7619 * coffgen.c: Likewise.
7620 * cpu-ns32k.c: Likewise.
7621 * ecoff.c: Likewise.
7622 * ecofflink.c: Likewise.
7623 * elf.c: Likewise.
7624 * elf32-arm.h: Likewise.
7625 * elf32-cris.c: Likewise.
7626 * elf32-d30v.c: Likewise.
7627 * elf32-i386.c: Likewise.
7628 * elf32-mcore.c: Likewise.
7629 * elf32-ppc.c: Likewise.
7630 * elf32-sh.c: Likewise.
7631 * elf32-sh64.c: Likewise.
7632 * elf32-v850.c: Likewise.
7633 * elf64-alpha.c: Likewise.
7634 * elf64-sh64.c: Likewise.
7635 * elfcode.h: Likewise.
7636 * elfcore.h: Likewise.
7637 * elflink.h: Likewise.
7638 * elfxx-mips.c: Likewise.
7639 * i386os9k.c: Likewise.
7640 * ieee.c: Likewise.
7641 * libbfd.c: Likewise.
7642 * linker.c: Likewise.
7643 * mmo.c: Likewise.
7644 * nlm32-alpha.c: Likewise.
7645 * nlm32-i386.c: Likewise.
7646 * nlm32-ppc.c: Likewise.
7647 * nlm32-sparc.c: Likewise.
7648 * nlmcode.h: Likewise.
7649 * oasys.c: Likewise.
7650 * pdp11.c: Likewise.
7651 * peicode.h: Likewise.
7652 * reloc.c: Likewise.
7653 * som.c: Likewise.
7654 * srec.c: Likewise.
7655 * tekhex.c: Likewise.
7656 * vms.c: Likewise.
7657 * xcofflink.c: Likewise.
7658 * elf64-sparc.c: Edit comment to not use "== false".
7659
7660 * aoutf1.h: Don't use "? true : false".
7661 * ecoff.c: Likewise.
7662 * format.c: Likewise.
7663 * ieee.c: Likewise.
7664 * linker.c: Likewise.
7665 * mmo.c: Likewise.
7666 * oasys.c: Likewise.
7667
7668 2002-06-23 H.J. Lu <hjl@gnu.org>
7669
7670 * elflink.h (elf_link_add_archive_symbols): For the default
7671 version, check references with only one `@' first.
7672
7673 2002-06-23 John David Anglin <dave@hiauly1.hia.nrc.ca>
7674
7675 * elf64-hppa.c (elf64_hppa_mark_milli_and_exported_functions): New
7676 function.
7677 (allocate_global_data_dlt): Don't add millicode symbols to dynamic
7678 symbol table.
7679 (allocate_global_data_opd, allocate_dynrel_entries): Likewise.
7680 (elf64_hppa_size_dynamic_sections): Revise to use
7681 elf64_hppa_mark_milli_and_exported_functions.
7682 (elf64_hppa_finish_dynamic_symbol): Remove code to keep millicode
7683 symbols out of dynamic symbol table.
7684
7685 2002-06-23 Alan Modra <amodra@bigpond.net.au>
7686
7687 * Makefile.in: Regenerate.
7688 * libbfd.h: Regenerate.
7689 * bfd-in2.h: Regenerate.
7690 * configure: Regenerate.
7691 * po/SRC-POTFILES.in: Regenerate.
7692
7693 * elflink.h: Comment typo fixes.
7694
7695 2002-06-23 H.J. Lu <hjl@gnu.org>
7696
7697 * elf-bfd.h (elf_link_loaded_list): New structure.
7698 (elf_link_hash_table): Add "loaded".
7699 * elf.c (_bfd_elf_link_hash_table_init): Initialize "loaded".
7700 * elflink.h (elf_link_check_versioned_symbol): New function.
7701 (elf_link_output_extsym): Call elf_link_check_versioned_symbol.
7702
7703 2002-06-19 Nick Clifton <nickc@cambridge.redhat.com>
7704
7705 * elflink.h (size_dynamic_sections): If the target does not
7706 support an ELF style hash table, return true, indicating that
7707 nothing needed to be done, rather than false, indicating that the
7708 section's size could not be computed.
7709
7710 2002-06-18 Dave Brolley <brolley@redhat.com>
7711
7712 From Catherine Moore, Michael Meissner, Dave Brolley:
7713 * po/SRC-POTFILES.in: Add cpu-frv.c and elf32-frv.c
7714 * targets.c: Support bfd_elf32_frv_vec.
7715 * reloc.c: Add FRV relocs.
7716 * configure.in: Add support for bfd-elf32-frv-vec.
7717 * config.bfd (targ_cpu): Add support for frv-*-elf.
7718 * archures.c: Add frv arch and machines.
7719 * Makefile.am (ALL_MACHINES): Add cpu-frv.lo.
7720 (ALL_MACHINES_CFILES): Add cpu-frv.c.
7721 (BFD32_BACKENDS): Add elf32-frv.lo.
7722 (BFD32_BACKENDS_CFILES): Add elf32-frv.c
7723 (cpu-frv.lo): New target.
7724 (elf32-frv.lo): New target.
7725 * cpu-frv.c: New file.
7726 * elf32-frv.c: New file.
7727
7728 2002-06-18 Jakub Jelinek <jakub@redhat.com>
7729
7730 * elfcode.h (elf_object_p): Sanity check eh_shoff == 0 implies
7731 e_shnum == 0.
7732 Only read the first section header if e_shoff is non-zero.
7733 Don't consider e_shstrndx if there are no sections.
7734
7735 2002-06-17 Tom Rix <trix@redhat.com>
7736
7737 * elf32-d10v.c (elf_d10v_howto_table): Change R_D10V_10_PCREL_R,
7738 R_D10V_10_PCREL_L and R_D10V_18_PCREL to use
7739 complain_overflow_bitfield.
7740
7741 2002-06-17 Alan Modra <amodra@bigpond.net.au>
7742
7743 * opncls.c (bfd_openr): Remove redundant bfd_set_error.
7744 (bfd_fdopenr): Likewise.
7745 (bfd_openstreamr): Likewise.
7746 (bfd_openw): Likewise.
7747
7748 * targets.c: Sort target vecs.
7749 (_bfd_target_vector): Add aix5coff64_vec, bfd_elf32_sh64_vec,
7750 bfd_elf32_sh64l_vec, bfd_elf32_sh64lnbsd_vec,
7751 bfd_elf32_sh64nbsd_vec, bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec,
7752 bfd_elf64_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec.
7753 * configure.in: Sort target vecs. Add m88kmach3_vec.
7754 * configure: Regenerate.
7755
7756 2002-06-16 Hans-Peter Nilsson <hp@bitrange.com>
7757
7758 * elf64-mmix.c (bpo_reloc_request_sort_fn): Use member
7759 bpo_reloc_no to break sort order ties, not address of items.
7760
7761 2002-06-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
7762
7763 * elf-hppa.h (elf_hppa_final_link): Fix formatting in comment.
7764 Skip excluded sections in determing __gp value.
7765 (elf_hppa_final_link_relocate): Use the symbol's address in
7766 R_PARISC_FPTR64 relocations that don't need an opd entry.
7767 * elf64-hppa.c (allocate_dynrel_entries): Simplify code.
7768 (elf64_hppa_finalize_dynreloc): Likewise.
7769 (elf64_hppa_size_dynamic_sections): Move comments and fix typo.
7770 (elf64_hppa_finish_dynamic_symbol): Break up assert.
7771
7772 2002-06-14 Sergey Grigoriev <serge@leopold.Physik.Uni-Augsburg.DE>
7773
7774 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
7775 alignment for .bss, .data and .text sections so that sse and sse2
7776 code will work.
7777 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
7778
7779 2002-06013 J"orn Rennecke <joern.rennecke@superh.com>
7780
7781 config.bfd: Add support for sh[1234]l*-*-elf* | sh3el*-*-elf*,
7782 sh[1234]*-elf*.
7783
7784 2002-06-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
7785
7786 * elflink.h (elf_bfd_final_link): Improve error handling for missing
7787 dynamic sections.
7788
7789 * elf64-hppa.c (allocate_global_data_opd): We don't need an opd entry
7790 for a symbol that has no output section.
7791 (allocate_dynrel_entries): Correct comment.
7792 (elf64_hppa_finalize_dynreloc): Likewise. Don't create an opd entry
7793 unless we want one.
7794 (elf64_hppa_finalize_opd): Prevent segfault if dyn_h is NULL.
7795 (elf64_hppa_finalize_dlt): Likewise. Prevent segfault for symbols
7796 with no section. Remove unnecessary parentheses.
7797
7798 2002-06-11 Tom Rix <trix@redhat.com>
7799
7800 * coffcode.h (coff_compute_section_file_positions): Add data
7801 section to AIX loader alignment check.
7802
7803 * coff-rs6000.c (_bfd_xcoff_mkobject): Set default text section
7804 alignment to 4 bytes.
7805 (_bfd_xcoff_copy_private_bfd_data): Use text and data alignment
7806 power accessor macro.
7807 (do_shared_object_padding): Remove invalid assertion.
7808
7809 2002-06-10 Richard Sandiford <rsandifo@redhat.com>
7810
7811 * section.c (_bfd_strip_section_from_output): Set SEC_EXCLUDE
7812 for removed output sections.
7813
7814 2002-06-10 Geoffrey Keating <geoffk@redhat.com>
7815
7816 * merge.c (merge_strings): Use htab_create_alloc with calloc, not
7817 htab_alloc.
7818 * elf-strtab.c (_bfd_elf_strtab_finalize): Likewise.
7819
7820 2002-06-08 H.J. Lu <hjl@gnu.org>
7821
7822 * elf.c (copy_private_bfd_data): Don't cast to bfd_size_type to
7823 work around a long long bug in gcc 2.96 on mips.
7824
7825 2002-06-08 Jason Thorpe <thorpej@wasabisystems.com>
7826
7827 * Makefile.am (BFD32_BACKENDS): Add vax1knetbsd.lo.
7828 (BFD32_BACKENDS_CFILES): Add vax1knetbsd.c.
7829 Regenerate dependency lists.
7830 * Makefile.in: Regenerate.
7831 * config.bfd (vax-*-netbsdelf*, vax-*-netbsdaout*): Add
7832 vax1knetbsd_vec to targ_selvecs.
7833 * configure.in: Add vax1knetbsd_vec.
7834 * configure: Regenerate.
7835 * targets.c (_bfd_target_vector): Add vax1knetbsd_vec.
7836 * vax1knetbsd.c: New file.
7837 * vaxnetbsd.c: Update copyright years.
7838 (TARGET_PAGE_SIZE): Set to 0x1000.
7839 (DEFAULT_MID): Set to M_VAX4K_NETBSD.
7840
7841 2002-06-08 Matt Thomas <matt@3am-software.com>
7842
7843 * libaout.h (enum machine_type): Add M_VAX4K_NETBSD.
7844
7845 2002-06-08 Alan Modra <amodra@bigpond.net.au>
7846
7847 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Make static.
7848
7849 2002-06-08 Alan Modra <amodra@bigpond.net.au>
7850
7851 * Makefile.am: Run "make dep-am".
7852 * Makefile.in: Regenerate.
7853
7854 * armnetbsd.c: Replace CONST with const.
7855 * corefile.c: Likewise.
7856 * elf32-dlx.c: Likewise.
7857 * elf64-mips.c: Likewise.
7858 * mmo.c: Likewise.
7859 * ns32knetbsd.c: Likewise.
7860
7861 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Check the hash
7862 table is elf64-sparc.
7863
7864 2002-06-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7865
7866 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Simplify code.
7867 Fix RELA addends to get not shifted in the result. Don't do special
7868 handling of R_MIPS_64 for NewABI.
7869
7870 2002-06-07 Alan Modra <amodra@bigpond.net.au>
7871
7872 * aoutx.h (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
7873 (NAME(aout,slurp_reloc_table)): Likewise.
7874 * coff-mips.c (mips_relax_section): Use bfd_zalloc.
7875 * coff-rs6000.c (xcoff_write_armap_big): Use bfd_zmalloc.
7876 (xcoff_write_archive_contents_big): Likewise.
7877 (xcoff_generate_rtinit): Likewise.
7878 (xcoff_generate_rtinit): Likewise, and check error return.
7879 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
7880 * coffgen.c (coff_section_symbol): Use bfd_zalloc.
7881 (coff_get_normalized_symtab): Likewise.
7882 (coff_make_empty_symbol): Likewise.
7883 (bfd_coff_set_symbol_class): Likewise.
7884 * cofflink.c (coff_link_add_symbols): Likewise.
7885 * ecoff.c (_bfd_ecoff_make_empty_symbol): Likewise.
7886 * ecofflink.c (ecoff_write_shuffle): Use bfd_zmalloc.
7887 (bfd_ecoff_write_accumulated_debug): Likewise.
7888 * elf64-alpha.c (get_got_entry): Use bfd_zalloc.
7889 * i386linux.c (bfd_i386linux_size_dynamic_sections): Likewise.
7890 * i386lynx.c (NAME(lynx,slurp_reloc_table)): Use bfd_zmalloc.
7891 * ieee.c (do_with_relocs): Use bfd_zalloc.
7892 * m68klinux.c (bfd_m68klinux_size_dynamic_sections): Likewise.
7893 * pdp11.c (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
7894 (NAME(aout,slurp_reloc_table)): Likewise.
7895 (NAME(aout,squirt_out_relocs)): Don't memset when zalloc'd.
7896 * reloc16.c (bfd_coff_reloc16_relax_section): Use bfd_zmalloc.
7897 * som.c (som_build_and_write_symbol_table): Likewise.
7898 (som_slurp_string_table): Likewise.
7899 (som_slurp_symbol_table): Likewise.
7900 (som_bfd_ar_write_symbol_stuff): Likewise.
7901 * sparclinux.c (bfd_sparclinux_size_dynamic_sections): Use bfd_zalloc.
7902 * sunos.c (bfd_sunos_size_dynamic_sections): Likewise.
7903 * tekhex.c (find_chunk): Likewise. Get rid of unused "sname".
7904 * vms-gsd.c (_bfd_vms_slurp_gsd): Use bfd_zmalloc.
7905 * xcofflink.c (xcoff_link_add_symbols): Use bfd_zalloc/bfd_zmalloc.
7906
7907 2002-06-07 Alan Modra <amodra@bigpond.net.au>
7908
7909 * elf-bfd.h (struct bfd_elf_section_data <group_name>): Replace with
7910 "group" union.
7911 (elf_group_name): Update.
7912 (elf_group_id): Define.
7913 (bfd_elf_set_group_contents): Declare.
7914 * elf.c (elf_fake_sections): Qualify use of elf_group_name.
7915 (set_group_contents): Rename to bfd_elf_set_group_contents. Remove
7916 ATTRIBUTE_UNUSED from failedptrarg. If elf_group_id is set, use
7917 that sym for the signature.
7918 (_bfd_elf_compute_section_file_positions): Don't call
7919 set_group_contents for "ld -r" case.
7920 (swap_out_syms): Use bfd_zalloc.
7921 * elflink.h (elf_link_add_archive_symbols): Likewise.
7922 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
7923 (elf_bfd_final_link): Call bfd_elf_set_group_contents.
7924
7925 2002-06-07 Alan Modra <amodra@bigpond.net.au>
7926
7927 * elf64-ppc.c (ppc64_elf_relocate_section): Allow unresolved
7928 relocs in opd for non-shared too.
7929
7930 2002-06-06 Jeffrey Law <law@redhat.com>
7931
7932 * elf32-h8300.c (elf32_h8_relax_section): Ignore uninteresting
7933 relocations.
7934
7935 2002-06-06 Nick Clifton <nickc@cambridge.redhat.com>
7936
7937 * merge.c: Include libiberty.h.
7938 * elf-strtab.c: Include libiberty.h.
7939
7940 2002-06-06 Elias Athanasopoulos <eathan@otenet.gr>
7941
7942 * peXXigen.c (pe_print_idata): Remove unused variable.
7943
7944 2002-06-06 David Heine <dlheine@tensilica.com>
7945
7946 * elf.c (assign_file_positions_for_segments): Remove unallocated
7947 sections from the section to segment mapping for PT_LOAD segments.
7948 Update comment about empty loadable segments.
7949
7950 2002-06-06 Richard Sandiford <rsandifo@redhat.com>
7951
7952 * stabs.c (_bfd_link_section_stabs): Check that the symbol offset
7953 is within the .stabstr section.
7954
7955 2002-06-06 Alan Modra <amodra@bigpond.net.au>
7956
7957 * elf-bfd.h (struct elf_size_info <swap_symbol_in>): Function args
7958 are "const PTR", not "const PTR *".
7959 (bfd_elf32_swap_symbol_in): Likewise.
7960 (bfd_elf64_swap_symbol_in): Likewise.
7961 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR.
7962 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
7963 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
7964 (elf_link_add_object_symbols): Likewise.
7965 (elf_link_record_local_dynamic_symbol): Likewise.
7966 (elf_link_input_bfd): Likewise.
7967 (elf_gc_mark): Likewise.
7968 (elf_reloc_symbol_deleted_p): Likewise.
7969 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
7970 (mn10200_elf_relax_delete_bytes): Likewise.
7971 (mn10200_elf_symbol_address_p): Likewise.
7972 (mn10200_elf_get_relocated_section_contents): Likewise.
7973 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
7974 (mn10300_elf_relax_section): Likewise.
7975 (mn10300_elf_relax_delete_bytes): Likewise.
7976 (mn10300_elf_symbol_address_p): Likewise.
7977 (mn10300_elf_get_relocated_section_contents): Likewise.
7978 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
7979 (elf32_h8_relax_delete_bytes): Likewise.
7980 (elf32_h8_symbol_address_p): Likewise.
7981 (elf32_h8_get_relocated_section_contents): Likewise.
7982 * elf32-hppa.c (get_local_syms): Likewise.
7983 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
7984 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
7985 * elf32-sh.c (sh_elf_relax_section): Likewise.
7986 (sh_elf_relax_delete_bytes): Likewise.
7987 (sh_elf_get_relocated_section_contents): Likewise.
7988 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
7989 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
7990 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
7991 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
7992 * elf64-ppc.c (get_local_syms): Likewise.
7993 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
7994 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
7995
7996 2002-06-05 J"orn Rennecke <joern.rennecke@superh.com>
7997
7998 * config.bfd (sh64l*-*-elf*, shl*-*-elf*): New configurations.
7999
8000 2002-06-05 Alan Modra <amodra@bigpond.net.au>
8001
8002 * elf.c (group_signature): Swap in the whole symbol, and handle
8003 extracting section symbol names.
8004 (setup_group): Add comment.
8005 (set_group_contents): When called from objcopy or ld, arrange for
8006 section contents to be written. Write group member output section
8007 indices to allow objcopy to reorganize sections.
8008 (_bfd_elf_copy_private_section_data): Copy group info.
8009
8010 * elf-bfd.h (struct elf_size_info): Add swap_symbol_in field.
8011 (bfd_elf32_swap_symbol_in): Update prototype.
8012 (bfd_elf64_swap_symbol_in): Likewise.
8013 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR *.
8014 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
8015 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
8016 (elf_link_add_object_symbols): Likewise.
8017 (elf_link_record_local_dynamic_symbol): Likewise.
8018 (elf_link_input_bfd): Likewise.
8019 (elf_gc_mark): Likewise.
8020 (elf_reloc_symbol_deleted_p): Likewise.
8021 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
8022 (mn10200_elf_relax_delete_bytes): Likewise.
8023 (mn10200_elf_symbol_address_p): Likewise.
8024 (mn10200_elf_get_relocated_section_contents): Likewise.
8025 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
8026 (mn10300_elf_relax_section): Likewise.
8027 (mn10300_elf_relax_delete_bytes): Likewise.
8028 (mn10300_elf_symbol_address_p): Likewise.
8029 (mn10300_elf_get_relocated_section_contents): Likewise.
8030 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
8031 (elf32_h8_relax_delete_bytes): Likewise.
8032 (elf32_h8_symbol_address_p): Likewise.
8033 (elf32_h8_get_relocated_section_contents): Likewise.
8034 * elf32-hppa.c (get_local_syms): Likewise.
8035 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
8036 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
8037 * elf32-sh.c (sh_elf_relax_section): Likewise.
8038 (sh_elf_relax_delete_bytes): Likewise.
8039 (sh_elf_get_relocated_section_contents): Likewise.
8040 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
8041 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
8042 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
8043 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
8044 * elf64-ppc.c (get_local_syms): Likewise.
8045 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
8046 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
8047 * elfcode.h (NAME(_bfd_elf,size_info)): Update initialiser.
8048 * elf64-alpha.c (alpha_elf_size_info): Likewise.
8049 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
8050 * elf64-mips.c (mips_elf64_size_info): Likewise.
8051 * elf64-s390.c (s390_elf64_size_info): Likewise.
8052 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
8053
8054 2002-06-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
8055
8056 * elf32-mips.c (elf32_mips_ignore_discarded_relocs): Move to...
8057 elfxx-mips.c (_bfd_mips_elf_ignore_discarded_relocs): ... here.
8058 elf64-mips.c (elf_backend_ignore_discarded_relocs): Use
8059 _bfd_mips_elf_ignore_discarded_relocs.
8060 elfxx-mips.h (_bfd_mips_elf_ignore_discarded_relocs): Declare.
8061
8062 2002-06-05 H.J. Lu <hjl@gnu.org>
8063
8064 * elfxx-mips.c (mips_elf_calculate_relocation): Call
8065 _bfd_elf_rel_local_sym for STT_SECTION relocations against
8066 the SEC_MERGE section.
8067
8068 2002-06-05 Alan Modra <amodra@bigpond.net.au>
8069
8070 * coff-alpha.c: Update copyright date.
8071 * coff-mips.c: Likewise.
8072 * xcoff-target.h: Likewise.
8073
8074 * bfd-in.h: Remove "taken from the source" comment.
8075 * libbfd-in.h: Likewise.
8076 * libcoff-in.h: Likewise.
8077 * bfd-in2.h: Regenerate.
8078 * libbfd.h: Regenerate.
8079 * libcoff.h: Regenerate.
8080
8081 * elf.c (bfd_elf_discard_group): Return true.
8082 * elf-bfd.h (bfd_elf_discard_group): Declare.
8083 * bfd-in.h (bfd_elf_discard_group): Don't declare here.
8084 * section.c (bfd_discard_group): Rename to bfd_generic_discard_group.
8085 * bfd.c (bfd_discard_group): Define.
8086 * targets.c (struct bfd_target): Add _bfd_discard_group.
8087 (BFD_JUMP_TABLE_LINK): Here too.
8088 * libbfd-in.h (_bfd_nolink_bfd_discard_group): Define.
8089 * aout-adobe.c (aout_32_bfd_discard_group): Define.
8090 * aout-target.h (MY_bfd_discard_group): Define.
8091 * aout-tic30.c (MY_bfd_discard_group): Define.
8092 * binary.c (binary_bfd_discard_group): Define.
8093 * bout.c (b_out_bfd_discard_group): Define.
8094 * coff-alpha.c (_bfd_ecoff_bfd_discard_group): Define.
8095 * coffcode.h (coff_bfd_discard_group): Define.
8096 * coff-mips.c (_bfd_ecoff_bfd_discard_group): Define.
8097 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Define.
8098 * i386msdos.c (msdos_bfd_discard_group): Define.
8099 * i386os9k.c (os9k_bfd_discard_group): Define.
8100 * ieee.c (ieee_bfd_discard_group): Define.
8101 * ihex.c (ihex_bfd_discard_group): Define.
8102 * mmo.c (mmo_bfd_discard_group): Define.
8103 * nlm-target.h (nlm_bfd_discard_group): Define.
8104 * oasys.c (oasys_bfd_discard_group): Define.
8105 * ppcboot.c (ppcboot_bfd_discard_group): Define.
8106 * som.c (som_bfd_discard_group): Define.
8107 * srec.c (srec_bfd_discard_group): Define.
8108 * tekhex.c (tekhex_bfd_discard_group): Define.
8109 * versados.c (versados_bfd_discard_group): Define.
8110 * vms.c (vms_bfd_discard_group): Define.
8111 * xcoff-target.h (_bfd_xcoff_bfd_discard_group): Define.
8112 * coff64-rs6000.c (rs6000coff64_vec): Update initialiser.
8113 (aix5coff64_vec): Likewise.
8114 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Likewise.
8115
8116 2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
8117
8118 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-com.lo.
8119 (BFD32_BACKENDS_CFILES): Add elf32-sh64-com.c.
8120 (elf32-sh64-com.lo): New dependency list.
8121 * Makefile.in: Regenerate.
8122 * configure.in (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec)
8123 (bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec): Add
8124 elf32-sh64-com.lo.
8125 * configure: Regenerate.
8126 * elf32-sh64.c (sh64_address_in_cranges)
8127 (sh64_get_contents_type, sh64_address_is_shmedia): Move to...
8128 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb):
8129 (crange_bsearch_cmpl): Prepend _bfd_sh64_ to name and move to...
8130 * elf32-sh64-com.c: ...here. New file.
8131
8132 2002-06-04 Alan Modra <amodra@bigpond.net.au>
8133
8134 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Remove
8135 ATTRIBUTE_UNUSED on used params.
8136 * elf32-vax.c (elf_vax_gc_mark_hook): Remove unnecessary checks
8137 before calling bfd_section_from_elf_index on local syms.
8138 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
8139
8140 2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
8141
8142 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-nbsd.lo.
8143 (BFD32_BACKENDS_CFILES): Add elf32-sh64-nbsd.c.
8144 (BFD64_BACKENDS): Add elf64-sh64-nbsd.lo.
8145 (BFD64_BACKENDS_CFILES): Add elf64-sh64-nbsd.c.
8146 (elf32-sh64-nbsd.lo, elf64-sh64-nbsd.lo): New rules.
8147 * Makefile.in: Regenerate.
8148 * config.bfd (sh5le-*-netbsd*, sh5-*-netbsd*, sh64le-*-netbsd*)
8149 (sh64-*-netbsd*): New targets.
8150 * configure.in: Add bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec,
8151 bfd_elf64_sh64nbsd_vec, and bfd_elf64_sh64lnbsd_vec.
8152 * configure: Regenerate.
8153 * elf32-sh64-nbsd.c: New file.
8154 * elf64-sh64-nbsd.c: New file.
8155 * targets.c: Add extern decls for bfd_elf32_sh64nbsd_vec,
8156 bfd_elf32_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec, and
8157 bfd_elf64_sh64lnbsd_vec.
8158
8159 2002-06-04 Alan Modra <amodra@bigpond.net.au>
8160
8161 * elf.c (setup_group): Set SEC_LINK_ONCE on GRP_COMDAT groups.
8162 (bfd_section_from_shdr): Likewise. Set section name of group
8163 sections from signature.
8164 (group_signature): Split out from setup_group. Ensure symbol table
8165 is available.
8166 (bfd_elf_discard_group): New function.
8167 (_bfd_elf_make_section_from_shdr): Don't set SEC_LINK_ONCE on
8168 .gnu.linkonce* sections if they are members of a group.
8169 (set_group_contents): Set GRP_COMDAT flag.
8170 * section.c (bfd_discard_group): New function.
8171 * bfd-in.h (bfd_elf_discard_group): Declare.
8172 * bfd-in2.h: Regenerate.
8173 * elf-bfd.h (struct bfd_elf_section_data): Add linkonce_p field.
8174 (elf_linkonce_p): Define.
8175
8176 2002-06-04 Alan Modra <amodra@bigpond.net.au>
8177
8178 * elf.c (bfd_section_from_shdr): Make "name" const.
8179 * elf-bfd.h (elf_backend_section_from_shdr): Likewise.
8180 * elf32-i370.c (i370_elf_section_from_shdr): Likewise.
8181 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
8182 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
8183 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
8184 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
8185 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
8186 * elf64-ppc.c (ppc64_elf_section_from_shdr): Likewise.
8187 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
8188 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
8189 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
8190
8191 2002-06-03 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
8192
8193 * elfxx-mips.c (ABI_64_P): Use backend's data to determine the
8194 ABI.
8195
8196 2002-06-02 Kazu Hirata <kazu@cs.umass.edu>
8197
8198 * elf32-arc.c: Fix formatting.
8199 * elf32-arm.h: Likewise.
8200 * elf32-cris.c: Likewise.
8201 * elf32-dlx.c: Likewise.
8202 * elf32-hppa.c: Likewise.
8203 * elf32-i386.c: Likewise.
8204 * elf32-i386qnx.c: Likewise.
8205 * elf32-or32.c: Likewise.
8206 * elf32-s390.c: Likewise.
8207 * elf32-sh64.c: Likewise.
8208 * elf32-vax.c: Likewise.
8209 * elf32-xstormy16.c: Likewise.
8210 * elf64-alpha.c: Likewise.
8211 * elf64-mmix.c: Likewise.
8212 * elf64-ppc.c: Likewise.
8213 * elf64-s390.c: Likewise.
8214 * elf64-sh64.c: Likewise.
8215 * elf64-x86-64.c: Likewise.
8216
8217 2002-06-02 Richard Henderson <rth@redhat.com>
8218
8219 * elf64-alpha.c (elf64_alpha_relocate_section): Don't dereference
8220 null when there are no got entries for a symbol.
8221 (elf64_alpha_relax_find_tls_segment): Rearrange to avoid
8222 uninitialized variable warning.
8223
8224 2002-06-01 Richard Henderson <rth@redhat.com>
8225
8226 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Don't test for
8227 undefined symbols here.
8228 (elf64_alpha_relax_section): Do it here. Also test for not
8229 defined in the current module.
8230 (elf64_alpha_relocate_section_r): Split out of ...
8231 (elf64_alpha_relocate_section): ... here. Don't dereference
8232 NULL when looking up local got entries.
8233
8234 2002-06-01 Richard Henderson <rth@redhat.com>
8235
8236 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Reject undefined
8237 symbols from JSR relaxation.
8238 (elf64_alpha_size_plt_section_1): New.
8239 (elf64_alpha_calc_dynrel_sizes): Split out .rela.got bits ...
8240 (elf64_alpha_size_rela_got_1): ... here.
8241 (elf64_alpha_size_dynamic_sections): Split out .rela.got bits ...
8242 (elf64_alpha_size_rela_got_section): ... here.
8243 (elf64_alpha_size_plt_section): New.
8244 (elf64_alpha_relax_section): Call them.
8245 (elf64_alpha_size_got_sections): Remove output_bfd arg.
8246 (elf64_alpha_finish_dynamic_symbol): Check gotent use_count.
8247
8248 2002-06-01 Richard Henderson <rth@redhat.com>
8249
8250 * elf64-alpha.c (alpha_get_dtprel_base, alpha_get_tprel_base): New.
8251 (elf64_alpha_relocate_section): Use them. Reject LE TLS relocs
8252 in shared libraries. Fix DTPRELHI and TPRELHI value.
8253 (INSN_ADDQ, INSN_RDUNIQ): New.
8254 (struct alpha_relax_info): Add symtab_hdr, tls_segment, first_gotent.
8255 (elf64_alpha_relax_with_lituse): Return boolean. Remove irelend
8256 argument. Reject dynamic symbols. Use LITUSE symbolic constants.
8257 (elf64_alpha_relax_got_load): Rename from relax_without_lituse.
8258 Handle GOTDTPREL and GOTTPREL relocations.
8259 (elf64_alpha_relax_gprelhilo): New.
8260 (elf64_alpha_relax_tls_get_addr): New.
8261 (elf64_alpha_relax_find_tls_segment): New.
8262 (elf64_alpha_relax_section): Handle TLS relocations.
8263 (ALPHA_ELF_LINK_HASH_TLS_IE): New.
8264 (elf64_alpha_check_relocs): Set it.
8265
8266 2002-06-01 Richard Henderson <rth@redhat.com>
8267
8268 * elf64-alpha.c (elf64_alpha_relax_section): Don't store computed gp.
8269
8270 * elf64-alpha.c (elf64_alpha_check_relocs): Fix typo on maybe_dynamic
8271 check; don't suppress dynamic relocs for non-allocated sections.
8272
8273 * elf64-alpha.c: Remove dead code.
8274
8275 2002-05-31 Alan Modra <amodra@bigpond.net.au>
8276
8277 * bfd-in2.h: Regenerate.
8278 * libbfd.h: Regenerate.
8279 * po/SRC-POTFILES.in: Regenerate.
8280
8281 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate
8282 space for bss .plt.
8283
8284 2002-05-31 Graeme Peterson <gp@qnx.com>
8285
8286 * Makefile.am (BFD32_BACKENDS): Add elf32-i386qnx.lo.
8287 (BFD32_BACKENDS_CFILES): Add elf32-i386qnx.c.
8288 Run "make dep-am".
8289 * Makefile.in: Regenerate.
8290 * config.bfd: Add i[3456]86-*-nto-qnx* support.
8291 * configure.in: Add bfd_elf32_i386qnx_vec support.
8292 * configure: Regenerate.
8293 * elf-bfd.h (struct elf_backend_data): Add set_nonloadable_filepos,
8294 is_contained_by_filepos, and copy_private_bfd_data_p.
8295 * elf.c (assign_file_positions_for_segments): Call backend
8296 set_nonloadable_filepos. Fix non-K&R call to _bfd_error_handler.
8297 (IS_CONTAINED_BY_FILEPOS): Define.
8298 (INCLUDE_SECTION_IN_SEGMENT): Also test IS_CONTAINED_BY_FILEPOS.
8299 (copy_private_bfd_data): Use IS_CONTAINED_BY_FILEPOS. Typo fix.
8300 Fix non-K&R call to _bfd_error_handler.
8301 (_bfd_elf_copy_private_section_data): Use backend
8302 copy_private_bfd_data_p.
8303 * elf32-i386.c: Don't include elfxx-target.h when
8304 ELF32_I386_C_INCLUDED is defined.
8305 * elf32-i386qnx.c: New QNX elf backend file.
8306 * elfxx-target.h: Add elf_backend_set_nonloadable_filepos,
8307 elf_backend_is_contained_by_filepos, and
8308 elf_backend_do_copy_private_bfd_data.
8309 * targets.c: Add bfd_target bfd_elf32_i386qnx_vec.
8310
8311 2002-05-31 Alan Modra <amodra@bigpond.net.au>
8312
8313 * elfarm-oabi.c (bfd_elf32_arm_add_glue_sections_to_bfd): Define.
8314 Move other similar defines to start of file.
8315
8316 2002-05-30 Tom Rix <trix@redhat.com>
8317
8318 * coff-rs6000.c (xcoff_rtype2howto): Handle 16 bit R_RBA.
8319 * coff64-rs6000.c (xcoff64_rtype2howto): Same.
8320
8321 2002-05-30 Richard Henderson <rth@redhat.com>
8322
8323 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_TLSGD,
8324 ALPHA_ELF_LINK_HASH_LU_TLSLDM, ALPHA_ELF_LINK_HASH_LU_FUNC): New.
8325 (ALPHA_ELF_GOT_ENTRY_RELOCS_DONE): Remove.
8326 (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Remove.
8327 (struct alpha_elf_got_entry): Add reloc_type, reloc_done, reloc_xlated.
8328 (struct alpha_elf_obj_tdata): Rename total_got_entries and
8329 n_local_got_entries to total_got_size and local_got_size.
8330 (elf64_alpha_howto, elf64_alpha_reloc_map): Update for TLS relocs.
8331 (alpha_got_entry_size): New.
8332 (elf64_alpha_relax_with_lituse): Use it.
8333 (elf64_alpha_relax_without_lituse): Likewise.
8334 (MAX_GOT_SIZE): Rename from MAX_GOT_ENTRIES.
8335 (get_got_entry): New.
8336 (elf64_alpha_check_relocs): Handle TLS relocs. Reorganize.
8337 (elf64_alpha_adjust_dynamic_symbol): Test LU_FUNC as a mask.
8338 (elf64_alpha_merge_ind_symbols): Check gotent->reloc_type.
8339 (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots): Likewise.
8340 (elf64_alpha_calc_got_offsets_for_symbol): Use alpha_got_entry_size.
8341 (elf64_alpha_calc_got_offsets): Likewise.
8342 (alpha_dynamic_entries_for_reloc): New.
8343 (elf64_alpha_calc_dynrel_sizes): Use it.
8344 (elf64_alpha_size_dynamic_sections): Likewise.
8345 (elf64_alpha_relocate_section): Handle TLS relocations.
8346 * reloc.c: Add Alpha TLS relocations.
8347 * bfd-in2.h, libbfd.h: Rebuild.
8348
8349 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
8350
8351 * peXXigen.c (pe_print_idata): Remove double printed
8352 import table lines; add Bound-To comment.
8353
8354 2002-05-29 Matt Thomas <matt@3am-software.com>
8355
8356 * Makefile.am (BFD32_BACKENDS): Add elf32-vax.lo.
8357 (BFD32_BACKENDS_CFILES): Add elf32-vax.c.
8358 (elf32-vax.lo): New rule.
8359 * Makefile.in: Regenerate.
8360 * configure.in (bfd_elf32_vax_vec)
8361 (vaxnetbsd_vec): New vectors.
8362 * configure: Regenerate.
8363 * config.bfd (vax-*-netbsdelf*)
8364 (vax-*-netbsdaout*)
8365 (vax-*-netbsd*): New targets.
8366 * elf32-vax.c: New file.
8367 * reloc.c: Add VAX relocations.
8368 * bfd-in2.h: Regenerate.
8369 * targets.c (_bfd_target_vector): Add bfd_elf32_vax_vec.
8370
8371 2002-05-29 Jason Thorpe <thorpej@wasabisystems.com>
8372
8373 * config.bfd (arm-*-netbsd*): Add bfd_elf32_littlearm_vec
8374 and bfd_elf32_bigarm_vec to targ_selvecs.
8375
8376 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
8377
8378 * peXXigen.c (pe_print_idata): Fix seg faults on printing import tables
8379 with auto-imported symbols.
8380
8381 2002-05-29 Adam Nemet <anemet@lnxw.com>
8382
8383 * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Don't add glue
8384 sections only record bfd.
8385 (bfd_elf32_arm_add_glue_sections_to_bfd): New function.
8386 * bfd-in.h (bfd_elf32_arm_add_glue_sections_to_bfd): Declare it.
8387 * bfd-in2.h: Regenerate.
8388
8389 2002-05-28 Nick Clifton <nickc@cambridge.redhat.com>
8390
8391 * syms.c (_bfd_stab_section_find_nearest_line): Move
8392 declaration and initialisation of saw_line and saw_func out of
8393 for loop.
8394
8395 2002-05-29 Alan Modra <amodra@bigpond.net.au>
8396
8397 * elf64-ppc.c (ppc64_elf_get_symbol_info): New function.
8398 (bfd_elf64_get_symbol_info): Define.
8399 * elfxx-target.h (bfd_elfNN_get_symbol_info): Only define if undef.
8400
8401 2002-05-29 Andrey Volkov <avolkov@transas.com>
8402
8403 * cpu-h8300.c: Make default h8300 machine first in machine list.
8404
8405 2002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net>
8406
8407 * config.bfd: Added DLX configuraton.
8408 * Makefile.am: Added DLX configuraton.
8409 * configure.in: Added DLX configuraton.
8410 * archures.c: Add DLX architecure.
8411 * reloc.c: Add DLX relocs.
8412 * targets.c: Added DLX target vector.
8413 * configure: Regenerate.
8414 * Makefile.in: Regenreate.
8415 * bfd-in2.h: Regenreate.
8416 * elf32-dlx.c: New file: Support DLX target.
8417 * cpu-dlx.c: New file: Support DLX target.
8418
8419 2002-05-25 Alan Modra <amodra@bigpond.net.au>
8420
8421 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Formatting.
8422
8423 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Revert last change.
8424 (ppc64_elf_check_relocs): Don't set up function descriptor symbol
8425 strings to point inside function code sym string.
8426 (func_desc_adjust): Likewise.
8427 (ppc64_elf_hide_symbol): Rewrite code to look up function code sym.
8428
8429 2002-05-24 Michal Ludvig <mludvig@suse.cz>
8430
8431 * elf64-x86-64.c (elf64_x86_64_grok_prstatus): Added.
8432 (elf64_x86_64_grok_psinfo): Added.
8433
8434 2002-05-24 TAMURA Kent <kent@netbsd.org>
8435
8436 * config.bfd: Add a target for i386-netbsdpe.
8437
8438 2002-05-24 Alan Modra <amodra@bigpond.net.au>
8439
8440 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy is_func
8441 and is_func_descriptor.
8442 (func_desc_adjust): Hide function code sym in shared libs unless
8443 there is a matching exported function descriptor sym.
8444
8445 2002-05-23 Jakub Jelinek <jakub@redhat.com>
8446
8447 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_THREAD_LOCAL
8448 for symbols from SHF_TLS section.
8449 (_bfd_elf_print_private_bfd_data): Add PT_TLS.
8450 (elf_fake_sections): Set SHF_TLS for SEC_THREAD_LOCAL sections.
8451 (map_sections_to_segments): Build PT_TLS segment if necessary.
8452 (assign_file_positions_for_segments): Likewise.
8453 (get_program_header_size): Account for PT_TLS segment.
8454 (swap_out_syms): Set type of BSF_THREAD_LOCAL symbols and symbols from
8455 SEC_THREAD_LOCAL sections to STT_TLS.
8456 * reloc.c: Add 386 and IA-64 TLS relocs.
8457 * section.c (SEC_THREAD_LOCAL): Define.
8458 (SEC_CONSTRUCTOR_TEXT, SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS):
8459 Remove.
8460 * elflink.h (elf_link_add_object_symbols): Support .tcommon.
8461 (size_dynamic_sections): If DF_STATIC_TLS, set DF_FLAGS
8462 unconditionally.
8463 (struct elf_final_link_info): Add first_tls_sec.
8464 (elf_bfd_final_link): Set first_tls_sec.
8465 Compute elf_hash_table (info)->tls_segment.
8466 (elf_link_output_extsym): Handle STT_TLS symbols.
8467 (elf_link_input_bfd): Likewise.
8468 * syms.c (BSF_THREAD_LOCAL): Define.
8469 * bfd-in2.h: Rebuilt.
8470 * libbfd.h: Rebuilt.
8471 * elf32-i386.c (elf_i386_tls_transition, dtpoff_base, tpoff,
8472 elf_i386_mkobject, elf_i386_object_p): New functions.
8473 (elf_howto_table): Add TLS relocs.
8474 (elf_i386_reloc_type_lookup): Support TLS relocs.
8475 (elf_i386_info_to_howto_rel): Likewise.
8476 (struct elf_i386_link_hash_entry): Add tls_type.
8477 (struct elf_i386_obj_tdata): New.
8478 (elf_i386_hash_entry, elf_i386_tdata, elf_i386_local_got_tls_type):
8479 New macros.
8480 (struct elf_i386_link_hash_table): Add tls_ldm_got.
8481 (link_hash_newfunc): Clear tls_type.
8482 (elf_i386_check_relocs): Support TLS relocs.
8483 (elf_i386_gc_sweep_hook): Likewise.
8484 (allocate_dynrelocs): Likewise.
8485 (elf_i386_size_dynamic_sections): Likewise.
8486 (elf_i386_relocate_section): Likewise.
8487 (elf_i386_finish_dynamic_symbol): Likewise.
8488 (bfd_elf32_mkobject, elf_backend_object_p): Define.
8489 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add tprel_offset,
8490 dtpmod_offset, dtprel_offset, tprel_done, dtpmod_done, dtprel_done,
8491 want_tprel, want_dtpmod, want_dtprel.
8492 (elfNN_ia64_tprel_base, elfNN_ia64_dtprel_base): New functions.
8493 (ia64_howto_table): Add TLS relocs, rename R_IA64_LTOFF_TP22 to
8494 R_IA64_LTOFF_TPREL22.
8495 (elf_code_to_howto_index): Add TLS relocs.
8496 (elfNN_ia64_check_relocs): Support TLS relocs.
8497 (allocate_global_data_got): Account for TLS .got data.
8498 (allocate_dynrel_entries): Account for TLS dynamic relocations.
8499 (elfNN_ia64_install_value): Supprt TLS relocs.
8500 (set_got_entry): Support TLS relocs.
8501 (elfNN_ia64_relocate_section): Likewise.
8502
8503 2002-05-23 Nick Clifton <nickc@cambridge.redhat.com>
8504
8505 * elf32-arm.h (elf32_arm_final_link_relocate): For the Thumb
8506 BLX reloc round the relocation up rather than down.
8507 * coff-arm.c (coff_arm_relocate_section): Likewise.
8508
8509 2002-05-21 H.J. Lu (hjl@gnu.org)
8510
8511 * linker.c (_bfd_generic_link_add_one_symbol): Allow multiple
8512 definition.
8513
8514 2002-05-22 Alan Modra <amodra@bigpond.net.au>
8515
8516 * elf64-ppc.c (ppc64_elf_size_stubs): Don't strip .branch_lt.
8517 (ppc64_elf_relocate_section): Handle unresolved relocs in opd.
8518
8519 2002-05-22 Alan Modra <amodra@bigpond.net.au>
8520
8521 * elf64-ppc.c (ppc64_elf_relocate_section): Return false for
8522 unresolved relocs.
8523 (ppc64_elf_size_dynamic_sections): Check for splt NULL.
8524
8525 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8526
8527 * bfd.c (bfd_get_arch_size): Remove bfd_set_error call for
8528 non-ELF targets.
8529
8530 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8531
8532 * elf-bfd.h (elf_backend_emit_relocs): Change prototype to return
8533 an error value.
8534 * elflink.h (elf_link_output_relocs): Likewise. Improve error message.
8535 return with false on error.
8536 (elf_link_input_bfd): Check reloc_emitter return value.
8537
8538 2002-05-21 Jason Thorpe <thorpej@wasabisystems.com>
8539
8540 * config.bfd (armeb-*-netbsdelf*): New target.
8541
8542 2002-05-20 Alan Modra <amodra@bigpond.net.au>
8543
8544 * elf64-ppc.c (ppc_build_one_stub): Point undefined function syms
8545 at the plt call stub.
8546
8547 2002-05-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8548
8549 * cpu-mips.c (mips_compatible): Don't try to check machine
8550 compatibility.
8551
8552 2002-05-18 Tom Rix <trix@redhat.com>
8553
8554 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_out): Fix C_FILE auxent.
8555
8556 2002-05-17 Alan Modra <amodra@bigpond.net.au>
8557
8558 * elf64-ppc.c (ppc64_elf_info_to_howto): Formatting.
8559 (ppc64_elf_relocate_section): Don't warn about reloc overflow when
8560 we've already warned about an undefined symbol. Report more
8561 detail on reloc errors.
8562
8563 2002-05-17 Alan Modra <amodra@bigpond.net.au>
8564
8565 * acinclude.m4 (AM_INSTALL_LIBBFD): New.
8566 * configure.in: Invoke AM_INSTALL_LIBBFD.
8567 * Makefile.am (install-data-local): Revert 2002-05-13. Move to..
8568 (install_libbfd): .. New target.
8569 (uninstall_libbfd): Likewise.
8570 (install-bfdlibLTLIBRARIES): Likewise.
8571 (uninstall-bfdlibLTLIBRARIES): Likewise.
8572 (bfdlibdir): New.
8573 (bfdincludedir): New.
8574 (lib_LTLIBRARIES): Rename to bfdlib_LTLIBRARIES.
8575 * aclocal.m4: Regenerate.
8576 * configure: Regenerate.
8577 * Makefile.in: Regenerate.
8578
8579 2002-05-17 Stuart Balfour <sbalfour@cisco.com>
8580
8581 * hash.c (bfd_hash_lookup): Remove computation of len from inside
8582 hash loop.
8583
8584 2002-05-16 Nick Clifton <nickc@cambridge.redhat.com>
8585
8586 * config.bfd: Add targets for sh64-linux (little endian and
8587 big endian).
8588
8589 2002-05-15 Laurent Pinchart <laurent.pinchart@skynet.be>
8590
8591 * peXXigen.c (pe_print_idata): Do not assume that the first thunk
8592 is located in the same section as the import table. Instead
8593 check, and if necessary load the section containing the thunk.
8594
8595 2002-05-15 Nick Clifton <nickc@cambridge.redhat.com>
8596
8597 * aix5ppc-core.c (xcoff64_core_p): Replace bfd_read with
8598 bfd_bread.
8599 (xcoff64_core_file_matches_executable_p): Replace bfd_read
8600 with bfd_bread.
8601
8602 2002-05-15 Alan Modra <amodra@bigpond.net.au>
8603
8604 * aix5ppc-core.c: Warning fixes.
8605 * aout-adobe.c (aout_32_bfd_link_just_syms): Define.
8606 * aout-target.h (MY_bfd_link_just_syms): Define.
8607 * aout-tic30.c (MY_bfd_link_just_syms): Define.
8608 * bfd.c (bfd_link_just_syms): Define.
8609 * binary.c (binary_bfd_link_just_syms): Define.
8610 * bout.c (b_out_bfd_link_just_syms): Define.
8611 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update initializer.
8612 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
8613 * coffcode.h (coff_bfd_link_just_syms): Define.
8614 * elf-bfd.h (enum elf_link_info_type): Add ELF_INFO_TYPE_JUST_SYMS.
8615 (elf_discarded_section): Check for ELF_INFO_TYPE_JUST_SYMS.
8616 (_bfd_elf_link_just_syms): Declare.
8617 * elf.c (_bfd_elf_link_just_syms): New function.
8618 * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Check that
8619 sections haven't already been discarded by the linker.
8620 * elflink.h (elf_link_add_object_symbols): Likewise for stab
8621 sections and SEC_MERGE sections.
8622 (elf_bfd_discard_info): Similarly here.
8623 * elfxx-target.h (bfd_elfNN_bfd_link_just_syms): Define.
8624 * i386msdos.c (msdos_bfd_link_just_syms): Define.
8625 * i386os9k.c (os9k_bfd_link_just_syms): Define.
8626 * ieee.c (ieee_bfd_link_just_syms): Define.
8627 * ihex.c (ihex_bfd_link_just_syms): Define.
8628 * libbfd-in.h (_bfd_nolink_bfd_link_just_syms): Define.
8629 (_bfd_generic_link_just_syms): Declare.
8630 * libecoff.h (_bfd_ecoff_bfd_link_just_syms): Define.
8631 * linker.c (_bfd_generic_link_just_syms): New function.
8632 * mmo.c (mmo_bfd_link_just_syms): Define.
8633 * nlm-target.h (nlm_bfd_link_just_syms): Define.
8634 * oasys.c (oasys_bfd_link_just_syms): Define.
8635 * ppcboot.c (ppcboot_bfd_link_just_syms): Define.
8636 * som.c (som_bfd_link_just_syms): Define.
8637 * srec.c (srec_bfd_link_just_syms): Define.
8638 * targets.c (struct bfd_target): Add _bfd_link_just_syms.
8639 (BFD_JUMP_TABLE_LINK): And here.
8640 * tekhex.c (tekhex_bfd_link_just_syms): Define.
8641 * versados.c (versados_bfd_link_just_syms): Define.
8642 * vms.c (vms_bfd_link_just_syms): Define.
8643 * libbfd.h: Regenerate.
8644 * bfd-in2.h: Regenerate.
8645
8646 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8647
8648 * elf32-mips.c: Remove superfluous definitions copied from
8649 elfxx-mips.c.
8650 (bfd_elf32_bigmips_vec,bfd_elf32_littlemips_vec): Use the
8651 SGIish vectors to check the special case.
8652 (mips_elf_hi16_reloc): Fix comment.
8653 (mips_elf_got16_reloc): Likewise.
8654 (_bfd_mips_elf32_gprel16_reloc): Likewise.
8655 (elf_reloc_map): Code cleanup.
8656 (mips_reloc_map): Add comment.
8657 (bfd_elf23_bfd_reloc_type_lookup): Code cleanup.
8658 (mips_elf32_rtype_to_howto): Likewise.
8659 (mips_elf32_discard_info): Likewise.
8660 (elf32_mips_irix_compat): Invert logic: Only SGIish vectors
8661 lead to IRIX compatibility now.
8662
8663 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8664
8665 * elfxx-mips.c: Call it IRIX, not Irix in comments.
8666
8667 2002-05-13 Jason Thorpe <thorpej@wasabisystems.com>
8668
8669 * config.bfd (shle-*-netbsdelf*): Add target which includes
8670 sh64 support.
8671
8672 2002-05-13 David Edelsohn <edelsohn@gnu.org>
8673
8674 * configure.in: Revert 2002-04-07. Instead, auto-configure
8675 HAVE_ST_C_IMPL.
8676 * configure: Regenerate.
8677 * config.in: Regenerate.
8678 * rs6000-core.c (CNEW_IMPL): Guard use of c_impl with HAVE_ST_C_IMPL
8679 or AIX_5_CORE.
8680
8681 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
8682
8683 * configure.in (sparc*-*-openbsd*): Support sparc64-openbsd
8684 corefiles as well.2
8685 * configure: Regenerate.
8686
8687 2002-05-13 Alan Modra <amodra@bigpond.net.au>
8688
8689 * Makefile.am (install-data-local): Install headers to
8690 $(exec_prefix)/include.
8691 * Makefile.in: Regenerate.
8692
8693 2002-05-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
8694 Daniel Jacobowitz <drow@mvista.com>
8695
8696 * coff-sh.c (sh_reloc_map): Map to R_SH_IMM32 for non-PE. Don't
8697 map BFD_RELOC_RVA.
8698
8699 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
8700
8701 * config.bfd (alpha*-*-openbsd*, sparc64*-*-openbsd*,
8702 hppa*-*-openbsd*): New targets.
8703 * configure.in (alpha*-*-openbsd*): Set COREFILE.
8704 * configure: Regenerate.
8705
8706 2002-05-10 Tom Rix <trix@redhat.com>
8707
8708 * coff64-rs6000.c (xcoff64_reloc_type_br): New function for
8709 xcoff64_ppc_relocate_section.
8710 * coff-rs6000.c : Extern common xcoff_reloc_type functions.
8711 * libxcoff.h: Common xcoff_reloc_type function declaration.
8712
8713 2002-05-10 Alan Modra <amodra@bigpond.net.au>
8714
8715 * elf32-i386.c (elf_i386_relocate_section): Remove overflow checks
8716 added in 2002-05-09 commit.
8717
8718 * elf32-hppa.c (elf32_hppa_size_stubs): Revert part of 2002-05-04,
8719 don't look for stubs on all undefined syms.
8720
8721 2002-05-09 Alan Modra <amodra@bigpond.net.au>
8722
8723 * elf64-ppc.c (RA_REGISTER_MASK, RA_REGISTER_SHIFT): Delete.
8724 (ppc64_elf_howto_raw <R_PPC64_RELATIVE>): Not pc_relative or
8725 pcrel_offset.
8726
8727 * elf32-i386.c (elf_howto_table): Comments.
8728 (elf_i386_relocate_section): Handle more relocs for relocatable
8729 linking and against SEC_MERGE sections.
8730
8731 2002-05-08 Alan Modra <amodra@bigpond.net.au>
8732
8733 * elf32-ppc.c (ppc_elf_create_got): New function.
8734 (ppc_elf_create_dynamic_sections): Call ppc_elf_create_got before
8735 _bfd_elf_create_dynamic_sections. Correct .plt flags.
8736 (ppc_elf_check_relocs): Use ppc_elf_create_got in place of
8737 _bfd_elf_create_got_section.
8738
8739 2002-05-07 Alan Modra <amodra@bigpond.net.au>
8740
8741 * elf-bfd.h (struct elf_backend_data): Add rela_normal.
8742 * elfxx-target.h (elf_backend_rela_normal): Define.
8743 (elfNN_bed): Init rela_normal.
8744 * elflink.h (elf_link_input_bfd <emit_relocs>): Handle adjustment
8745 for section symbols here if rela_normal. Simplify abs section test.
8746 * elf-m10200.c (mn10200_elf_relocate_section): If relocatable,
8747 return immediately. Remove code handling relocatable linking.
8748 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
8749 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
8750 * elf32-i370.c (i370_elf_relocate_section): Likewise.
8751 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
8752 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
8753 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
8754 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
8755 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
8756 * elf32-s390.c (elf_s390_relocate_section): Likewise.
8757 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
8758 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
8759 * elf64-s390.c (elf_s390_relocate_section): Likewise.
8760 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
8761 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
8762 * elf32-arm.h (elf32_arm_relocate_section): Likewise #ifndef USE_REL.
8763 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
8764 * elf-m10200.c (elf_backend_rela_normal): Define.
8765 * elf-m10300.c (elf_backend_rela_normal): Define.
8766 * elf32-fr30.c (elf_backend_rela_normal): Define.
8767 * elf32-i370.c (elf_backend_rela_normal): Define.
8768 * elf32-i860.c (elf_backend_rela_normal): Define.
8769 * elf32-m68k.c (elf_backend_rela_normal): Define.
8770 * elf32-mcore.c (elf_backend_rela_normal): Define.
8771 * elf32-openrisc.c (elf_backend_rela_normal): Define.
8772 * elf32-ppc.c (elf_backend_rela_normal): Define.
8773 * elf32-s390.c (elf_backend_rela_normal): Define.
8774 * elf32-xstormy16.c (elf_backend_rela_normal): Define.
8775 * elf64-ppc.c (elf_backend_rela_normal): Define.
8776 * elf64-s390.c (elf_backend_rela_normal): Define.
8777 * elf64-x86-64.c (elf_backend_rela_normal): Define.
8778 * elfxx-ia64.c (elf_backend_rela_normal): Define.
8779 * elf32-arm.h (elf_backend_rela_normal): Define #ifndef USE_REL.
8780 * elf32-m32r.c (elf_backend_rela_normal): Likewise.
8781
8782 2002-05-06 Nick Clifton <nickc@cambridge.redhat.com>
8783
8784 * elf32-arm.h (elf32_arm_final_link_relocate): Convert
8785 'reloc_signed_max' and 'reloc_signed_min' into half-word offsets.
8786
8787 2002-05-06 Alan Modra <amodra@bigpond.net.au>
8788
8789 * elflink.h (elf_link_input_bfd <emit_relocs>): Adjust r_offset
8790 when not relocatable. Fix reloc_emitter call for K&R.
8791
8792 2002-05-04 Alan Modra <amodra@bigpond.net.au>
8793
8794 * elf64-ppc.c (ppc64_elf_relocate_section): Reinstate code
8795 reloading local sym addend mistakenly removed in 2002-05-01 change.
8796
8797 * dwarf2.c (struct line_head): Make prologue_length a bfd_vma.
8798 (read_abbrevs): Change "offset" param to bfd_vma.
8799 (parse_comp_unit): Change "version" and addr_size to unsigned ints.
8800 Change "abbrev_offset" to bfd_vma.
8801 (read_indirect_string): Use correct conversion chars in error
8802 message format string, cast bfd_vma's to unsigned long.
8803 (read_abbrevs): Likewise.
8804 (read_attribute_value): Likewise.
8805 (decode_line_info): Likewise.
8806 (scan_unit_for_functions): Likewise.
8807 (parse_comp_unit): Likewise.
8808
8809 2002-05-04 Tom Rix <trix@redhat.com>
8810
8811 * coffswap.h (coff_swap_reloc_in): Remove XCOFF support.
8812 (coff_swap_reloc_out): Same.
8813 * coff-rs6000.c: (xcoff_swap_reloc_in): Moved from coffswap.h.
8814 (xcoff_swap_reloc_out): Same.
8815 (xcoff_rtype2howto): Renamed from _bfd_xcoff_rtype2howto. Special
8816 case some 16 bit relocs. Add reloc value to output.
8817 (xcoff_howto_table): Remove 64 bit R_POS, add 16 bit
8818 R_RBR. Improve names.
8819 (_bfd_xcoff_reloc_type_lookup): Adjust for removal of 64 bit R_POS.
8820 (bfd_xcoff_backend_data): Update with new reloc swap names.
8821 (bfd_pmac_xcoff_backend_data) : Same.
8822 * coff64-rs6000.c: (xcoff64_swap_reloc_in): Moved from coffswap.h.
8823 (xcoff64_swap_reloc_out): Same.
8824 (xcoff64_rtype2howto): Special case some 16 bit relocs and 32 bit
8825 R_POS. Add reloc value to output.
8826 (xcoff64_howto_table): Move 64 bit R_POS to first entry. Add 16
8827 bit R_RBR. Improve names, masks.
8828 (xcoff64_reloc_type_lookup): Adjust for move of 64 bit R_POS.
8829 (bfd_xcoff_backend_data): Update with new reloc swap names.
8830 (bfd_xcoff_aix5_backend_data) : Same.
8831
8832 2002-05-04 Alan Modra <amodra@bigpond.net.au>
8833
8834 * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add
8835 bfd_count top_index, input_list, all_local_syms.
8836 (elf32_hppa_setup_section_lists): New function, split from
8837 elf32_hppa_size_stubs.
8838 (elf32_hppa_next_input_section): Likewise.
8839 (group_sections): Likewise.
8840 (get_local_syms): Likewise.
8841 (elf32_hppa_size_stubs): Adjust for split out functions. Look for
8842 stubs on undefined syms too.
8843 (elf32_hppa_set_gp): Use bfd_link_hash* instead of elf_link_hash*.
8844 Only access htab elf fields when we have an elf hash table.
8845 * elf32-hppa.h (elf32_hppa_setup_section_lists): Declare.
8846 (elf32_hppa_next_input_section): Declare.
8847
8848 2002-05-04 Bob Byrnes <byrnes@curl.com>
8849
8850 * opncls.c (_bfd_new_bfd_contained_in): Check return value of
8851 _bfd_new_bfd.
8852
8853 2002-05-03 H.J. Lu (hjl@gnu.org)
8854
8855 * elfxx-mips.c (mips_elf_link_hash_entry): Add forced_local.
8856 (mips_elf_link_hash_newfunc): Initialize forced_local to false.
8857 (mips_elf_record_global_got_symbol): Call _bfd_mips_elf_hide_symbol
8858 to hide a global symbol.
8859 (_bfd_mips_elf_hide_symbol): Return if forced_local is true. Set
8860 forced_local to true.
8861
8862 2002-05-02 Richard Henderson <rth@redhat.com>
8863
8864 * elf64-alpha.c (elf64_alpha_relocate_section): Force relative relocs
8865 vs SHN_UNDEF to zero.
8866
8867 2002-05-02 Alan Modra <amodra@bigpond.net.au>
8868
8869 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_SECTOFF>): Change to a
8870 16 bit reloc.
8871 <R_PPC64_SECTOFF_DS>: Likewise.
8872 (ppc64_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
8873 SECTOFF reloc.
8874 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_SECTOFF>): Correct.
8875 (ppc_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
8876 SECTOFF reloc.
8877
8878 * elf64-ppc.c (ppc64_elf_addr16_ha_reloc): Delete.
8879 (ppc64_elf_ha_reloc): New function.
8880 (ppc64_elf_brtaken_reloc): New function.
8881 (ppc64_elf_sectoff_reloc): New function.
8882 (ppc64_elf_sectoff_ha_reloc): New function.
8883 (ppc64_elf_toc_reloc): New function.
8884 (ppc64_elf_toc_ha_reloc): New function.
8885 (ppc64_elf_toc64_reloc): New function.
8886 (ppc64_elf_unhandled_reloc): New function.
8887 (ppc64_elf_howto_raw): Use the above.
8888 <R_PPC64_RELATIVE>: Mark pc_relative, pcrel_offset.
8889 <R_PPC64_SECTOFF>: Not pc_relative or pcrel_offset. Fix dst_mask.
8890 <R_PPC64_SECTOFF_DS>: Likewise.
8891 (IS_ABSOLUTE_RELOC): Update.
8892 (struct ppc_link_hash_table): Add have_undefweak.
8893 (ppc64_elf_link_hash_table_create): Init.
8894 (func_desc_adjust): Set have_undefweak.
8895 (ppc64_elf_func_desc_adjust): Call func_desc_adjust earlier. Only
8896 add the .sfpr blr when have_undefweak.
8897 (ppc64_elf_setup_section_lists): Check hash table flavour.
8898 (ppc64_elf_next_input_section): Move output_section->owner test to
8899 ppc64elf.em.
8900 (ppc64_elf_set_toc): Rename to ppc64_elf_toc, remove info param
8901 and relocatable test. Return TOCstart and don't set elf_gp.
8902 (ppc64_elf_relocate_section): Correct BRTAKEN/BRNTAKEN branch
8903 offset calculation. Add assert on weak sym branch tweaks.
8904 * elf64-ppc.h (ppc64_elf_set_toc): Delete.
8905 (ppc64_elf_toc): Declare.
8906 (ppc64_elf_next_input_section): Update.
8907
8908 2002-05-01 Alan Modra <amodra@bigpond.net.au>
8909
8910 * syms.c (_bfd_stab_section_find_nearest_line): Don't bomb on NULL
8911 file_name.
8912
8913 2002-05-01 Alan Modra <amodra@bigpond.net.au>
8914
8915 * elf64-ppc.c (CROR_151515, CROR_313131): Define.
8916 (ppc64_elf_relocate_section): Use them. Don't look for plt calls
8917 on R_PPC64_ADDR24 relocs. Require a nop or no link reg on plt
8918 call branches. Correct undefined weak destination.
8919 (ppc64_elf_func_desc_adjust): Always create at least one blr in
8920 .sfpr, and correct case where either only savef* or restf* is
8921 needed.
8922
8923 Long branch stubs, multiple stub sections.
8924 * elf64-ppc.h (ppc64_elf_setup_section_lists): Declare.
8925 (ppc64_elf_next_input_section): Declare.
8926 * elf64-ppc.c: Move linker-only prototypes.
8927 (STUB_SUFFIX): Define.
8928 (enum ppc_stub_type): New.
8929 (struct ppc_stub_hash_entry): New.
8930 (struct ppc_branch_hash_entry): New.
8931 (struct ppc_link_hash_entry): Add stub_cache, oh.
8932 (struct ppc_link_hash_table): Add stub_hash_table etc. Remove
8933 sstub. Add sbrlt, srelbrlt, has_14bit_branch, stub_iteration.
8934 Rename plt_overflow to stub_error.
8935 (ppc_stub_hash_lookup): Define.
8936 (ppc_branch_hash_lookup): Define.
8937 (stub_hash_newfunc): New function.
8938 (branch_hash_newfunc): New function.
8939 (link_hash_newfunc): Init new fields.
8940 (ppc64_elf_link_hash_table_create): Likewise.
8941 (ppc64_elf_link_hash_table_free): New function.
8942 (ppc_stub_name): New function.
8943 (ppc_get_stub_entry): New function.
8944 (ppc_add_stub): New function.
8945 (create_linkage_sections): Use bfd_make_section_anyway. Create
8946 .branch_lt and .rela.branch_lt sections. Don't create .stub.
8947 (ppc64_elf_check_relocs): Set has_14bit_branch on R_PPC64_REL14*,
8948 and set up for plt call stubs. Link func and func desc syms.
8949 (ppc64_elf_gc_sweep_hook): Handle REL14* as per REL24.
8950 (func_desc_adjust): Avoid hash lookup when func desc sym available
8951 via shortcut, and set links when processing.
8952 (ppc64_elf_hide_symbol): Likewise.
8953 (allocate_dynrelocs): Don't allocate stub section here.
8954 (ppc64_elf_size_dynamic_sections): Handle sbrlt and srelbrlt.
8955 Remove sstub code.
8956 (ppc_type_of_stub): New function.
8957 (build_one_stub): Delete.
8958 (ppc_build_one_stub): New function.
8959 (ppc_size_one_stub): New function.
8960 (ppc64_elf_setup_section_lists): New function.
8961 (ppc64_elf_next_input_section): New function.
8962 (group_sections): New function.
8963 (get_local_syms): New function.
8964 (ppc64_elf_size_stubs): Rewrite.
8965 (ppc64_elf_build_stubs): Rewrite.
8966 (ppc64_elf_relocate_section): Look up stub entry for REL24
8967 relocs. Don't propagate REL14* to dynamic objects. Look for long
8968 branch stubs if REL14* or REL24 relocs won't reach.
8969 (bfd_elf64_bfd_link_hash_table_free): Define.
8970
8971 2002-04-30 Mark Mitchell <mark@codesourcery.com>
8972
8973 * config.bfd: Add support for powerpc-*-windiss.
8974
8975 2002-04-30 Tom Rix <trix@redhat.com>
8976
8977 * xcofflink.c (xcoff_link_add_symbols): Always copy undef C_EXT
8978 symbol names into the hash table.
8979
8980 2002-04-28 Tom Rix <trix@redhat.com>
8981
8982 * coff-rs6000.c (xcoff_calculate_relocation) : Function table for
8983 calulating relocations.
8984 (xcoff_complain_overflow) : Function table for relocation errors.
8985 (xcoff_ppc_relocate_section): Use relocation and complain function
8986 tables.
8987 (xcoff_complain_overflow_unsigned_func): New complain function.
8988 (xcoff_complain_overflow_signed_func): Same.
8989 (xcoff_complain_overflow_bitfield_func): Same.
8990 (xcoff_complain_overflow_dont_func): Same.
8991 (xcoff_reloc_type_crel): New recot function.
8992 (xcoff_reloc_type_br): Same.
8993 (xcoff_reloc_type_ba): Same.
8994 (xcoff_reloc_type_toc): Same.
8995 (xcoff_reloc_type_rel): Same.
8996 (xcoff_reloc_type_neg): Same.
8997 (xcoff_reloc_type_pos): Same.
8998 (xcoff_reloc_type_fail): Same.
8999 (xcoff_reloc_type_noop): Same.
9000 * libxcoff.h : Declare common parts for xcoff64.
9001 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Use relocation
9002 and complain function tables.
9003
9004 2002-04-28 Alan Modra <amodra@bigpond.net.au>
9005
9006 * elf64-x86-64.c (struct elf64_x86_64_dyn_relocs): Comment typo.
9007 * elf32-hppa.c (elf32_hppa_final_link): Formatting.
9008
9009 2002-04-26 Alan Modra <amodra@bigpond.net.au>
9010
9011 * opncls.c (bfd_make_readable): Call bfd_section_list_clear.
9012 * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
9013
9014 * elflink.h (elf_bfd_final_link): Ensure input bfd class is the
9015 same as the output before calling elf_link_input_bfd.
9016
9017 * coffcode.h (coff_compute_section_file_positions): Set
9018 section_tail after shuffling section list.
9019
9020 2002-04-24 Christian Groessler <chris@groessler.org>
9021
9022 * coff-z8k.c (extra_case): Fix R_IMM32 relocations: The
9023 addresses are 23bit with a special layout, not plain 32bit
9024 values. Prevent relocation of immediate values.
9025
9026 2002-04-24 Chris G. Demetriou <cgd@broadcom.com>
9027
9028 * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): If MDMX or
9029 MIPS-16 ASE flags are set, print something to indicate that.
9030
9031 2002-04-23 Alan Modra <amodra@bigpond.net.au>
9032
9033 * elf32-hppa.c (hppa_type_of_stub): Correct and simplify condition
9034 under which a plt call stub is used.
9035 (final_link_relocate): Similarly.
9036 (allocate_plt_static): Clear h-plabel except when plt entry is
9037 exclusively used for a plabel.
9038 (allocate_dynrelocs): Use the above to simplify plt sizing.
9039 (struct elf32_hppa_link_hash_table): Add has_22bit_branch.
9040 (elf32_hppa_link_hash_table_create): Init.
9041 (BL22_RP): Define.
9042 (hppa_build_one_stub): Use BL22_RP if has_22bit_branch.
9043 (elf32_hppa_check_relocs): Set has_22bit_branch.
9044
9045 * elf32-hppa.c (elf32_hppa_check_relocs): Remove debug message.
9046 (final_link_relocate): Likewise.
9047
9048 2002-04-22 Jakub Jelinek <jakub@redhat.com>
9049
9050 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't build
9051 search table if some FDE is DW_EH_PE_aligned encoded either.
9052 (_bfd_elf_write_section_eh_frame): Handle terminating FDE specially.
9053
9054 2002-04-22 Richard Smith <richard@ex-parrot.com>
9055 Jakub Jelinek <jakub@redhat.com>
9056
9057 * elf-eh-frame.c (struct eh_cie_fde): Add per_encoding_relative.
9058 (_bfd_elf_discard_section_eh_frame): Set it for CIEs with pcrel
9059 encoded personality.
9060 (_bfd_elf_write_section_eh_frame): Adjust pcrel encoded personality
9061 for CIE/FDE removal.
9062
9063 2002-04-20 Tom Rix <trix@redhat.com>
9064
9065 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Fix C_FILE auxent.
9066
9067 2002-04-20 Alan Modra <amodra@bigpond.net.au>
9068
9069 * archures.c (bfd_lookup_arch): Move the list order comment..
9070 (struct bfd_arch_info): ..to where it belongs.
9071 * bfd-in2.h: Regenerate.
9072
9073 * archures.c (bfd_lookup_arch): Add comment on list order.
9074 (bfd_default_set_arch_mach): Use bfd_lookup_arch.
9075 * cpu-powerpc.c (bfd_powerpc_archs): Re-order so that the default
9076 is always at head of list.
9077
9078 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
9079
9080 * coff-arm.c (coff_thumb_pcrel_12, coff_thumb_pcrel_9,
9081 insert_thumb_branch, record_thumb_to_arm_glue): Suppress
9082 definition of these functions for ARM_WINCE builds as they are
9083 not used.
9084 (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET): Do not define
9085 for ARM_WINCE builds.
9086
9087 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
9088
9089 * coff-arm.c (bfd_arm_process_before_allocation):
9090
9091 2002-04-17 J"orn Rennecke <joern.rennecke@superh.com>
9092
9093 * cpu-sh.c (scan_mach): Delete.
9094 (arch_info_struct): Replace scan_mach with bfd_default_scan.
9095 (bfd_sh_arch): Likewise.
9096
9097 2002-04-16 Nick Clifton <nickc@cambridge.redhat.com>
9098
9099 * ihex.c (ihex_write_object_contents): Fix check for records
9100 crossing 64K boundaries.
9101
9102 2002-04-16 Alan Modra <amodra@bigpond.net.au>
9103
9104 * elf32-m32r.c (m32r_elf_add_symbol_hook): Check the hash table
9105 type rather than just assuming entries are ELF.
9106 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
9107 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
9108 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Likewise.
9109 * elf64-mmix.c (mmix_elf_add_symbol_hook): Use bfd_link_hash_entry
9110 rather than elf_link_hash_entry.
9111
9112 2002-04-15 Richard Henderson <rth@redhat.com>
9113
9114 * elf32-mips.c (mips_elf32_object_p): Revert 0404 fragment: allow
9115 n32 binaries.
9116
9117 2002-04-15 Michael Snyder <msnyder@redhat.com>
9118
9119 * opncls.c (bfd_close): Write contents if writeable.
9120 Minor formatting tidy-ups.
9121
9122 2002-04-15 Alan Modra <amodra@bigpond.net.au>
9123
9124 * elf32-ppc.c (ppc_elf_add_symbol_hook): Check the hash table type.
9125
9126 2002-04-12 Michael Snyder <msnyder@redhat.com>
9127
9128 * bfd-in.h (bfd_get_section_lma): New access macro.
9129 Minor white-space fix-up.
9130
9131 2002-04-12 Alan Modra <amodra@bigpond.net.au>
9132
9133 * elf.c (prep_headers): Don't zero EI_OSABI, EI_ABIVERSION or
9134 header pad.
9135
9136 2002-04-09 DJ Delorie <dj@redhat.com>
9137
9138 * elfarm-nabi.c (elf32_arm_howto_table): Fix ABS16 masks.
9139
9140 2002-04-09 Casper S. Hornstrup <chorns@users.sourceforge.net>
9141
9142 * coffcode.h (coff_read_word): New.
9143 (coff_compute_checksum): New.
9144 (coff_apply_checksum): New.
9145 (coff_write_object_contents): Call coff_apply_checksum () to
9146 apply checksum to PE image.
9147
9148 2002-04-08 Randolph Chung <tausq@debian.org>
9149
9150 * elf32-hppa.c (hppa_unwind_entry_compare): Move to elf-hppa.h.
9151 (elf32_hppa_final_link): Split out sorting logic to..
9152 * elf-hppa.h (elf_hppa_sort_unwind): ..here.
9153 (elf_hppa_final_link): Call elf_hppa_sort_unwind.
9154
9155 2002-04-07 Andrew Cagney <ac131313@redhat.com>
9156
9157 * configure.in: Add missing ``|'' to powerpc-*-aix4.[4-9]*
9158 pattern.
9159 * configure: Re-generate.
9160
9161 2002-04-07 Andrew Cagney <ac131313@redhat.com>
9162
9163 * configure.in: Only define AIX_CORE_DUMPX_CORE when AIX version
9164 is greater or equal to 4.3.3.
9165 * configure: Regenerate.
9166 Fix PR gdb/344.
9167
9168 2002-04-05 Hans-Peter Nilsson <hp@axis.com>
9169
9170 * elf32-cris.c (cris_elf_howto_table) <R_CRIS_16_PCREL,
9171 R_CRIS_32_PCREL>: Fix typo in name.
9172 (cris_elf_check_relocs): Always create .rela.got here when
9173 R_CRIS_16_GOTPLT or R_CRIS_32_GOTPLT is seen.
9174 (elf_cris_adjust_gotplt_to_got): Don't create .rela.got here;
9175 assume it's created.
9176
9177 2002-04-04 Daniel Jacobowitz <drow@mvista.com>
9178
9179 * aout-adobe.c (aout_32_bfd_link_hash_table_free): Define.
9180 * aout-target.h (MY_bfd_link_hash_table_free): Conditionally
9181 define.
9182 * aout-tic30.c (MY_bfd_link_hash_table_free): Likewise.
9183 * bfd.c (bfd_link_hash_table_free): Define.
9184 * binary.c (binary_bfd_link_hash_table_free): Define.
9185 * bout.c (b_out_bfd_link_hash_table_free): Define.
9186 * coff-rs6000.c (rs6000coff_vec): Include
9187 _bfd_generic_link_hash_table_free.
9188 (pmac_xcoff_vec): Likewise.
9189 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
9190 (aix5coff64_vec): Likewise.
9191 * coffcode.h (coff_bfd_link_hash_table_free): Conditionally define.
9192 * elf-m10300.c (elf32_mn10300_link_hash_table_free): New function.
9193 (bfd_elf32_bfd_link_hash_table_free): Define.
9194 * elf32-hppa.c (elf32_hppa_link_hash_table_free): New function.
9195 (bfd_elf32_bfd_link_hash_table_free): Define.
9196 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Conditionally
9197 define.
9198 * i386msdos.c (msdos_bfd_link_hash_table_free): Define.
9199 * i386os9k.c (os9k_bfd_link_hash_table_free): Define.
9200 * ieee.c (ieee_bfd_link_hash_table_free): Define.
9201 * ihex.c (ihex_bfd_link_hash_table_free): Define.
9202 * libbfd-in.h (_bfd_nolink_bfd_link_hash_table_free): Define.
9203 (_bfd_generic_link_hash_table_free): Add prototype.
9204 * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Add prototype.
9205 * libecoff.h (_bfd_ecoff_bfd_link_hash_table_free): Define.
9206 * linker.c (_bfd_generic_link_hash_table_free): New function.
9207 * mmo.c (mmo_bfd_link_hash_table_free): Define.
9208 * nlm-target.h (nlm_bfd_link_hash_table_free): Define.
9209 * oasys.c (oasys_bfd_link_hash_table_free): Define.
9210 * ppcboot.c (ppcboot_bfd_link_hash_table_free): Define.
9211 * som.c (som_bfd_link_hash_table_free): Define.
9212 * srec.c (srec_bfd_link_hash_table_free): Define.
9213 * tekhex.c (tekhex_bfd_link_hash_table_free): Define.
9214 * versados.c (versados_bfd_link_hash_table_free): Define.
9215 * vms.c (vms_bfd_link_hash_table_free): New function.
9216 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_free): New function.
9217
9218 * coff-arm.c (coff_arm_link_hash_table_create): Use bfd_malloc
9219 instead of bfd_alloc.
9220 * coff-h8300.c (h8300_coff_link_hash_table_create): Likewise.
9221 * coff-mcore.c (coff_mcore_link_hash_table_create): Likewise.
9222 * coff-ppc.c (ppc_coff_link_hash_table_create): Likewise.
9223 * cofflink.c (_bfd_coff_link_hash_table_create): Likewise.
9224 * ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
9225 * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise.
9226 * elf.c (_bfd_elf_link_hash_table_create): Likewise.
9227 * elf32-arm.h (elf32_arm_link_hash_table_create): Likewise.
9228 * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
9229 * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise.
9230 * elf32-i386.c (elf_i386_link_hash_table_create): Likewise.
9231 * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
9232 * elf32-s390.c (elf_s390_link_hash_table_create): Likewise.
9233 * elf32-sh.c (sh_elf_link_hash_table_create): Likewise.
9234 * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create): Likewise.
9235 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
9236 * elf64-s390.c (elf_s390_link_hash_table_create): Likewise.
9237 * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise.
9238 * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create): Likewise.
9239 * elf64-x86-64.c (elf64_x86_64_link_hash_table_create): Likewise.
9240 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
9241 * linker.c (_bfd_generic_link_hash_table_create): Likewise.
9242 * m68klinux.c (linux_link_hash_table_create): Likewise.
9243 * sparclinux.c (linux_link_hash_table_create): Likewise.
9244 * sunos.c (sunos_link_hash_table_create): Likewise.
9245 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise.
9246
9247 * targets.c: Add _bfd_link_hash_table_free to xvec.
9248
9249 * bfd-in2.h: Regenerate.
9250 * libbfd.h: Regenerate.
9251 * libcoff.h: Regenerate.
9252
9253 2002-04-04 Alan Modra <amodra@bigpond.net.au>
9254
9255 * dep-in.sed: Cope with absolute paths.
9256 * Makefile.am (dep.sed): Subst TOPDIR, and not INCDIR.
9257 Run "make dep-am".
9258 * Makefile.in: Regenerate.
9259 * coff-arm.c: Fix copyright date.
9260 * cpu-h8300.c: Likewise.
9261 * cpu-i370.c: Likewise.
9262 * cpu-s390.c: Likewise.
9263 * cpu-mips.c: Likewise.
9264 * po/SRC-POTFILES.in: Regenerate.
9265
9266 2002-04-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
9267
9268 * Makefile.am: Add elfxx-mips.c to the known backends.
9269 (elf32-mips.lo): remove dependency to coff/external.h.
9270 * Makefile.in: Regenerate.
9271 * configure.in: Add elfxx-mips.lo to all vectors using elf32-mips.lo
9272 Remove elf32-mips.lo from 64 bit vectors. Update dependencies
9273 accordingly.
9274 * configure: Regenerate.
9275 * elf-bfd.h: Move all MIPS ELF specific prototypes to elfxx-mips.h.
9276 (irix_compat_t): IRIX compatibility level, moved from elf32-mips.c.
9277 (elf_backend_mips_irix_compat, elf_backend_mips_rtype_to_howto): New
9278 MIPS specific backend functions.
9279 * elf32-mips.c: Moved most code to elfxx-mips.c.
9280 (mips_elf_hi16_reloc): Rename from _bfd_mips_elf_hi16_reloc and make
9281 static.
9282 (mips_elf_lo16_reloc): Likewise, was _bfd_mips_elf_lo16_reloc.
9283 (mips_elf_got16_reloc): Likewise, was _bfd_mips_elf_got16_reloc.
9284 (mips_elf_gprel32_reloc): Likewise, was _bfd_mips_elf_gprel32_reloc.
9285 (mips_elf32_rtype_to_howto): Rename from mips_rtype_to_howto. Changed
9286 interface to allow selection of the right REL or RELA howto table.
9287 (mips_elf32_object_p): Rename from _bfd_mips_elf_object_p and made
9288 static. Let it refuse n32 objects.
9289 (elf32_mips_grok_prstatus): Rename from _bfd_elf32_mips_grok_prstatus.
9290 (elf32_mips_grok_psinfo): Rename from _bfd_elf32_mips_grok_psinfo.
9291 (elf32_mips_discard_info): Rename from _bfd_elf32_mips_discard_info.
9292 (elf32_mips_ignore_discarded_relocs): Rename from
9293 _bfd_elf32_mips_ignore_discarded_relocs.
9294 (elf32_mips_write_section): Rename from _bfd_elf32_mips_write_section.
9295 (elf32_mips_irix_compat): New function, replaces IRIX_COMPAT.
9296 (elf_mips_howto_table_rela): Remove.
9297 * elf64-mips.c: Moved most code to elfxx-mips.c.
9298 (bfd_elf64_bfd_reloc_type_lookup): Make static.
9299 (mips_elf64_rtype_to_howto): New function.
9300 (mips_elf64_object_p): Likewise.
9301 (elf64_mips_irix_compat): Likewise.
9302 * elfxx-mips.c: New file containing common code merged together from
9303 elf32-mips.c and elf64-mips.c.
9304 * elfxx-mips.h: New file containing MIPS specific prototypes from
9305 elf-bfd.h.
9306 * elfxx-target.h: Add handling for elf_backend_mips_irix_compat and
9307 elf_backend_mips_rtype_to_howto.
9308
9309 2002-04-04 Alan Modra <amodra@bigpond.net.au>
9310
9311 * srec.c (MAXCHUNK, Chunk): Revise comments.
9312 (srec_write_record): Correct buffer size.
9313 (srec_write_header): Do without intermediate buffer.
9314 (srec_write_section): Validate Chunk.
9315 (srec_write_terminator): Pass NULL instead of dummy buffer.
9316 (srec_write_symbols): Pass file and symbol names directly to
9317 bfd_bwrite so sprintf won't overflow buffer.
9318
9319 2002-04-03 Jakub Jelinek <jakub@redhat.com>
9320
9321 * elf32-sparc.c (elf32_sparc_relocate_section): Don't emit dynamic
9322 PC relative relocs against hidden symbols.
9323 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
9324
9325 2002-04-03 Alan Modra <amodra@bigpond.net.au>
9326
9327 * elf.c (_bfd_elf_make_section_from_shdr): When setting section
9328 LMAs, loop over segments until p_vaddr and p_memsz specify an
9329 extent enclosing the section.
9330
9331 2002-04-02 Nick Clifton <nickc@cambridge.redhat.com>
9332
9333 * ihex.c (ihex_write_object_contents): Do not allow records to
9334 cross a 64K boundary - wrap if necessary.
9335
9336 2002-04-01 Nathan Williams <nathanw@wasabisystems.com>
9337
9338 * elf.c (elfcore_netbsd_get_lwpid): Fix off-by-one error
9339 which caused the returned LWP ID to always be 0.
9340
9341 2002-04-01 Richard Henderson <rth@redhat.com>
9342
9343 * elf32-sparc.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
9344 (elf32_sparc_relocate_section): Use it to figure out when to
9345 initialize .got entries.
9346 * elf64-sparc.c: Similarly.
9347
9348 2002-03-28 Alan Modra <amodra@bigpond.net.au>
9349
9350 * linker.c (link_action): Ignore duplicate warning syms.
9351 (_bfd_generic_link_write_global_symbol): Follow warning symbol link.
9352 * elflink.h (elf_adjust_dynstr_offsets): Likewise.
9353 (elf_adjust_dynamic_symbol): Likewise.
9354 (elf_export_symbol): Likewise.
9355 (elf_link_find_version_dependencies): Likewise.
9356 (elf_link_assign_sym_version): Likewise.
9357 (elf_link_sec_merge_syms): Likewise.
9358 (elf_link_output_extsym): Likewise.
9359 (elf_gc_sweep_symbol): Likewise.
9360 (elf_gc_propagate_vtable_entries_used): Likewise.
9361 (elf_gc_smash_unused_vtentry_relocs): Likewise.
9362 (elf_gc_allocate_got_offsets): Likewise.
9363 (elf_collect_hash_codes): Likewise.
9364 * elflink.c (elf_link_renumber_hash_table_dynsyms): Likewise.
9365 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
9366 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
9367 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
9368 * elf32-arm.h (elf32_arm_discard_copies): Likewise.
9369 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Likewise.
9370 (elf_cris_discard_excess_dso_dynamics): Likewise.
9371 * elf32-hppa.c (clobber_millicode_symbols): Likewise.
9372 (mark_PIC_calls): Likewise.
9373 (allocate_plt_static): Likewise.
9374 (allocate_dynrelocs): Likewise.
9375 (readonly_dynrelocs): Likewise.
9376 * elf32-i386.c (allocate_dynrelocs): Likewise.
9377 (readonly_dynrelocs): Likewise.
9378 * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
9379 * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
9380 * elf32-mips.c (mips_elf_output_extsym): Likewise.
9381 (mips_elf_sort_hash_table_f): Likewise.
9382 (mips_elf_check_mips16_stubs): Likewise.
9383 * elf32-s390.c (allocate_dynrelocs): Likewise.
9384 (readonly_dynrelocs): Likewise.
9385 * elf32-sh.c (sh_elf_discard_copies): Likewise.
9386 * elf32-xstormy16.c (xstormy16_relax_plt_check): Likewise.
9387 (xstormy16_relax_plt_realloc): Likewise.
9388 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
9389 (elf64_alpha_output_extsym): Likewise.
9390 * elf64-hppa.c (elf64_hppa_mark_exported_functions): Likewise.
9391 * elf64-mips.c (mips_elf64_sort_hash_table_f): Likewise.
9392 (mips_elf64_check_mips16_stubs): Likewise.
9393 (mips_elf64_output_extsym): Likewise.
9394 * elf64-ppc.c (func_desc_adjust): Likewise.
9395 (allocate_dynrelocs): Likewise.
9396 (readonly_dynrelocs): Likewise.
9397 * elf64-s390.c (allocate_dynrelocs): Likewise.
9398 (readonly_dynrelocs): Likewise.
9399 * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
9400 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
9401 (readonly_dynrelocs): Likewise.
9402 * elfxx-ia64.c (elfNN_ia64_global_dyn_sym_thunk): Likewise.
9403 * aoutx.h (aout_link_write_other_symbol): Likewise.
9404 * cofflink.c (_bfd_coff_write_task_globals): Likewise.
9405 (_bfd_coff_write_global_sym): Likewise.
9406 * i386linux.c (linux_tally_symbols): Likewise.
9407 * m68klinux.c (linux_tally_symbols): Likewise.
9408 * sparclinux.c (linux_tally_symbols): Likewise.
9409 * pdp11.c (aout_link_write_other_symbol): Likewise.
9410 * sunos.c (sunos_scan_dynamic_symbol): Likewise.
9411 * xcofflink.c (xcoff_build_ldsyms): Likewise.
9412 (xcoff_write_global_symbol): Likewise.
9413
9414 * cofflink.c (_bfd_coff_final_link): Formatting.
9415 * cpu-mips.c (mips_compatible): Make static, prototype.
9416 * elf32-i386.c (elf_i386_check_relocs): Formatting.
9417 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
9418 * elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
9419 * elf64-mips.c (mips_elf64_sort_hash_table): Likewise.
9420 (mips_elf64_final_link): Likewise.
9421 * elflink.h (elf_link_find_version_dependencies): Remove duplicate
9422 prototype.
9423
9424 2002-03-27 Nick Clifton <nickc@cambridge.redhat.com>
9425
9426 * coff-arm.c (SWAP_IN_RELOC_OFFSET): Define.
9427 (SWAP_OUT_RELOC_OFFSET): Define.
9428
9429 2002-03-27 Gregory Steuck <greg@nest.cx>
9430
9431 * elf.c (_bfd_elf_get_symtab_upper_bound): Leave space for
9432 terminating NULL if empty symbol table.
9433 (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise.
9434
9435 2002-03-26 H.J. Lu (hjl@gnu.org)
9436
9437 * elflink.h (elf_link_input_bfd): Revert the last change since
9438 the gcc exception handling isn't fixed yet.
9439
9440 2002-03-26 H.J. Lu (hjl@gnu.org)
9441
9442 * elflink.h (elf_link_input_bfd): Complain about relocations
9443 against local symbols in discarded sections.
9444
9445 2002-03-26 Alan Modra <amodra@bigpond.net.au>
9446
9447 * elflink.h (elf_gc_mark): Don't recurse into non-ELF sections.
9448
9449 2002-03-23 Alan Modra <amodra@bigpond.net.au>
9450
9451 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
9452 section file offset for !SEC_LOAD sections.
9453
9454 2002-03-21 Richard Earnshaw <rearnsha@arm.com>
9455
9456 * elf32-arm.h (elf32_arm_final_link_relocate <case R_ARM_GOTOFF>,
9457 <case R_ARM_GOT>): Handle relocations to Thumb functions.
9458
9459 2002-03-21 Alan Modra <amodra@bigpond.net.au>
9460
9461 * coff64-rs6000.c (_bfd_xcoff64_put_symbol_name): Prototype.
9462 Whitespace changes.
9463 * archive.c: Update copyright date.
9464 * bfd-in2.h: Regenerate.
9465 * libbfd.h: Regenerate.
9466 * Makefile.am: Run "make dep-am"
9467 * Makefile.in: Regenerate.
9468 * po/SRC-POTFILES.in: Regenerate.
9469
9470 2002-03-20 Daniel Jacobowitz <drow@mvista.com>
9471
9472 * dwarf2.c (struct funcinfo): Move up.
9473 (lookup_address_in_function_table): New argument function_ptr.
9474 Set it.
9475 (lookup_address_in_line_table): New argument function. If function
9476 is non-NULL, use it to handle ``addr'' before the first line note of
9477 the function.
9478 (comp_unit_find_nearest_line): Update and swap calls to
9479 lookup_address_in_function_table and lookup_address_in_line_table.
9480 * syms.c (_bfd_stab_section_find_nearest_line): Use the first
9481 N_SLINE encountered if we see an N_FUN before any N_SLINE.
9482
9483 2002-03-20 Tom Rix <trix@redhat.com>
9484
9485 * coff-rs6000.c (_bfd_xcoff_stat_arch_elt): Renamed from
9486 _bfd_xcoff_generic_stat_arch_elt. Fix format check.
9487 * coff64-rs6000.c : Use _bfd_xcoff_stat_arch_elt.
9488
9489 2002-03-19 Tom Rix <trix@redhat.com>
9490
9491 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through all
9492 dynamic objects in archives.
9493
9494 2002-03-19 Hans-Peter Nilsson <hp@bitrange.com>
9495
9496 * elflink.h (NAME(bfd_elf,record_link_assignment)): Don't set
9497 STT_NOTYPE symbols to STT_OBJECT.
9498
9499 2002-03-18 Jan Hubicka <jh@suse.cz>
9500
9501 * cpu-i386.c (bfd_x86_64_arch): Rename to "i386:x86-64"
9502
9503 2002-03-18 Tom Rix <trix@redhat.com>
9504
9505 * aix5ppc.core.c : New file for AIX 5 64 bit core support.
9506 * bfd-in.h : Add bfd_xcoff_ar_archive_set_magic declaration.
9507 * coff-rs6000 (do_pad) : New function for archive padding.
9508 (do_copy) : New function for object file copying in archives.
9509 (do_shared_object_padding) : New function for padding shared
9510 objects to their text section alignment in archives.
9511 (bfd_xcoff_ar_achive_set_magic) : Stub.
9512 (xcoff_write_armap_big) : Use do_copy and do_pad.
9513 (xcoff_write_archive_contents_big) : Use do_shared_object_padding,
9514 do_copy and do_pad.
9515 * coff64-rs6000.c (xcoff64_write_ojbect_contents) : Use
9516 bfd_xcoff_magic_number.
9517 (xcoff64_bad_format_hook) : New function for _bfd_bad_format_hook
9518 fop.
9519 (xcoff_backend_data_r) : Use xcoff64_bad_format_hook.
9520 (bfd_xcoff_aix5_backend_data) : New Aix 5 backend data.
9521 (aix5coff64_vec) : New Aix 5 target aix5coff64-rs6000.
9522 * rs6000-core.c : Update copyright date.
9523 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Check for NULL
9524 csectpp.
9525 * coffcode.h (coff_new_section_hook) : Use new accessor macros.
9526 (coff_set_arch_mach_hook) : Add Aix 5 U64_TOCMAGIC magic #.
9527 (coff_set_flags) : Use bfd_xcoff_magic_number.
9528 * libxcoff.h (bfd_xcoff_is_xcoff64): Add U64_TOCMAGIC.
9529 * configure.in : Add powerpc-*-aix5 and rs6000-*-aix5 support.
9530 * Makefile.am : Same.
9531 * config.bfd : Same.
9532 * targets.c : Same.
9533 * configure : Regnerate.
9534 * Makefile.in : Same.
9535 * bfd-in2.h : Same.
9536
9537 2002-03-18 Nick Clifton <nickc@cambridge.redhat.com>
9538
9539 * po/fr.po: Updated version.
9540
9541 2002-03-18 Alan Modra <amodra@bigpond.net.au>
9542
9543 * libbfd.c (bfd_write_bigendian_4byte_int): Return true iff success.
9544 * libbfd.h: Regenerate.
9545 * archive.c (coff_write_armap): Pass on failures from
9546 bfd_write_bigendian_4byte_int.
9547
9548 2002-03-14 H.J. Lu <hjl@gnu.org>
9549
9550 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the BFD
9551 error to bfd_error_nonrepresentable_section for reinit_array
9552 section in DSO.
9553
9554 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
9555
9556 * coffcode.h (coff_slurp_symbol_table): When adding BSF_WEAK flag,
9557 OR it in rather than replacing previously selected flags.
9558
9559 * elfxx-target.h (TARGET_BIG_SYM): Set ar_max_namelen to 15.
9560 (TARGET_LITTLE_SYM): Set ar_max_namelen to 15.
9561
9562 2002-03-14 Alan Modra <amodra@bigpond.net.au>
9563
9564 * cpu-mips.c (mips_compatible): New. Don't check bits_per_word.
9565 (N): Use the above.
9566 * elflink.h (elf_bfd_final_link): Revert last change. Instead,
9567 ensure reloc size matches before calling elf_link_input_bfd.
9568 Add an assert to check reloc size when counting output relocs.
9569
9570 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
9571
9572 * mmo.c (mmo_get_loc): Return NULL rather than false.
9573
9574 2002-03-13 Nick Clifton <nickc@cambridge.redhat.com>
9575
9576 * po/fr.po: Updated version.
9577
9578 2002-03-13 Alan Modra <amodra@bigpond.net.au>
9579
9580 * archures.c (bfd_default_compatible): Test bits_per_word.
9581 * cpu-i386.c (i386_compatible): Remove. Replace occurrences with
9582 bfd_default_compatible.
9583 * cpu-i370.c (i370_compatible): Likewise.
9584 * cpu-sparc.c (sparc_compatible): Likewise.
9585 * cpu-h8300.c (compatible): Test in->arch == out->arch.
9586
9587 * elflink.h: Formatting fixes.
9588 (elf_link_output_extsym): Merge undefined and undef weak cases.
9589
9590 * elflink.h (elf_bfd_final_link): Only call elf_link_input_bfd
9591 when word size of input matches output word size.
9592
9593 2002-03-12 Andreas Jaeger <aj@suse.de>
9594
9595 * cpu-i386.c (i386_compatible): New. Use it instead of
9596 bfd_default_compatible.
9597
9598 2002-03-07 H.J. Lu (hjl@gnu.org)
9599
9600 * coff-sh.c (shcoff_reloc_map): Use bfd_reloc_code_real_type
9601 as the type for bfd_reloc_val.
9602
9603 2002-03-05 John David Anglin <dave@hiauly1.hia.nrc.ca>
9604
9605 * elf-hppa.h (elf_hppa_is_dynamic_loader_symbol): New function.
9606 (elf_hppa_relocate_section): Ignore undefined dynamic loader symbols.
9607 (elf_hppa_final_link_relocate): Correct relocations for indirect
9608 references to local data through the DLT. Fix .opd creation for
9609 local symbols using R_PARISC_LTOFF_FPTR32 and R_PARISC_FPTR64
9610 relocations. Use e_lsel selector for R_PARISC_DLTIND21L,
9611 R_PARISC_LTOFF_FPTR21L and R_PARISC_LTOFF_TP21L as per
9612 "Processor-Specific ELF for PA_RISC, Version 1.43" document.
9613 Similarly, use e_rsel for DLT and LTOFF 'R' relocations.
9614 * elf32-hppa.c (final_link_relocate): Revise relocation selectors
9615 as per "Processor-Specific ELF for PA_RISC, Version 1.43" document.
9616
9617 2002-03-05 Jakub Jelinek <jakub@redhat.com>
9618
9619 * merge.c (_bfd_merge_sections): Don't segfault if there
9620 is nothing to merge due to GC.
9621
9622 2002-03-05 Alan Modra <amodra@bigpond.net.au>
9623
9624 * elf32-hppa.c (clobber_millicode_symbols): Remove hack to keep
9625 symbols that have been forced local.
9626
9627 * elflink.h (elf_bfd_final_link): Call elf_link_output_extsym
9628 to output forced local syms for non-shared link.
9629 (elf_link_output_extsym): Tweak condition for calling backend
9630 adjust_dynamic_symbol so that previous behaviour is kept.
9631 Whitespace changes throughout file.
9632
9633 2002-03-04 H.J. Lu <hjl@gnu.org>
9634
9635 * elf.c (bfd_section_from_shdr): Handle special sections,
9636 .init_array, .fini_array and .preinit_array.
9637 (elf_fake_sections): Likewise.
9638
9639 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Create the
9640 DT entry only if the section is in output for .init_array,
9641 .fini_array and .preinit_array. Complain about .preinit_array
9642 section in DSO.
9643 (elf_bfd_final_link): Warn zero size for .init_array,
9644 .fini_array and .preinit_array sections.
9645
9646 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Remove
9647 SHT_INIT_ARRAY, SHT_FINI_ARRAY and SHT_PREINIT_ARRAY.
9648 (elfNN_ia64_fake_sections): Remove .init_array, .fini_array and
9649 .preinit_array.
9650
9651 2002-03-04 Alan Modra <amodra@bigpond.net.au>
9652
9653 * configure.in (WIN32LIBADD): Don't eval PICFLAG assignment.
9654 * configure: Regenerate.
9655
9656 2002-03-02 Tom Rix <trix@redhat.com>
9657
9658 * coff64-rs6000.c (xcoff64_howto_table): Replace howto types with
9659 symbolic equiv.
9660 * coff-rs6000.c (xcoff_howto_table): Same.
9661
9662 2002-03-01 David Mosberger <davidm@hpl.hp.com>
9663
9664 * elflink.h (size_dynamic_sections): If section named
9665 ".preinit_array" exists, create DT_PREINIT_ARRAY and
9666 DT_PREINIT_ARRAYSZ entries in dynamic table. Analogously for
9667 ".init_array" and ".fini_array".
9668 (elf_bfd_final_link): Handle DT_PREINIT_ARRAYSZ, DT_INIT_ARRAYSZ,
9669 DT_FINI_ARRAYSZ, DT_PREINIT_ARRAY, DT_INIT_ARRAY, and
9670 DT_FINI_ARRAY.
9671
9672 2002-02-26 Andrew Macleod <amacleod@cygnus.com>
9673
9674 * elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local
9675 dynsyms.
9676
9677 2002-02-25 Alan Modra <amodra@bigpond.net.au>
9678
9679 * elf64-hppa.h: Update copyright date.
9680
9681 * elf64-ppc.c (ppc64_elf_check_relocs): Warning fix.
9682 (ppc64_elf_relocate_section): Don't generate power4 style branch
9683 hints for *_BRTAKEN and *_BRNTAKEN relocs.
9684
9685 2002-02-22 Jakub Jelinek <jakub@redhat.com>
9686
9687 * elf64-sh64.c (sh_elf64_relocate_section): Fix a typo from my
9688 last patch.
9689 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
9690
9691 2002-02-21 Andreas Jaeger <aj@suse.de>
9692
9693 * elf64-x86-64.c: Major rework that introduces all recent changes
9694 to the x86-64 backend. Get a closer match to elf32-i386.
9695 (struct elf64_x86_64_dyn_relocs): Rename from
9696 elf64_x86_64_pcrel_relocs_copied, add additional fields. Change
9697 all users.
9698 (struct elf64_x86_64_link_hash_table): Add short cuts to some
9699 sections.
9700 (link_hash_newfunc): Rename from elf64_x86_64_link_hash_newfunc,
9701 remove casts, initialize new hash members.
9702 (create_got_section): New.
9703 (elf64_x86_64_create_dynamic_sections): New.
9704 (elf64_x86_64_copy_indirect_symbol): New.
9705 (elf64_x86_64_check_relocs): Don't allocate space for dynamic
9706 relocs, .got or .relgot here but do it in allocate_dynrelocs.
9707 Reference count possible .plt and .got entries. Don't test input
9708 section SEC_READONLY here to try to avoid copy relocs, and keep
9709 dyn_relocs regardless of ELF_LINK_NON_GOT_REF. Don't set
9710 DF_TEXTREL here. Delay setting of variables until needed. Cache
9711 pointer to "sreloc" section in elf_section_data. Tweak condition
9712 under which .got created. Report files with bad relocation
9713 section names.
9714 (elf64_x86_64_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
9715 Reference count possible .plt entries. Don't deallocate .got and
9716 .relgot space here.
9717 (elf64_x86_64_adjust_dynamic_symbol): Handle nocopyreloc. Don't
9718 do copy reloc processing for weakdefs. Remove redundant casts and
9719 aborts. Delay setting of vars until needed. Move creation of
9720 dynamic symbols and allocation of .plt and .rela.plt to
9721 allocate_dynrelocs. Replace BFD_ASSERT with abort.
9722 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
9723 (allocate_dynrelocs): New.
9724 (readonly_dynrelocs): New.
9725 (elf64_x86_64_size_dynamic_sections): Call readonly_dynrelocs.
9726 Allocate space for dyn relocs. Replace BFD_ASSERT with abort.
9727 Zero out the dynamic allocated content space.
9728 (elf64_x86_64_discard_copies): Removed.
9729 (elf64_x86_64_relocate_section): Make use of dynamic section
9730 short-cuts. Localise vars, and delay setting. Better error
9731 reporting, replace BFD_ASSERT with abort. Check
9732 ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined in the
9733 regular object file and tread the weak definition as the normal
9734 one. Don't discard relocs for undefweak or undefined symbols and
9735 check !DEF_REGULAR as well as DEF_DYNAMIC in test for avoided copy
9736 relocs.
9737 (elf64_x86_64_finish_dynamic_symbol): Don't copy relocs for
9738 symbols that have been forced local. Use same test to decide if
9739 we can use a relative reloc for got as relocate_section. Expand
9740 SHN_UNDEF comment. Move expressions out of function calls.
9741 Replace BFD_ASSERT with abort.
9742 (bfd_elf64_bfd_final_link): Removed.
9743 (elf_backend_copy_indirect_symbol): Define.
9744
9745 2002-02-20 Tom Rix <trix@redhat.com>
9746
9747 * coff-rs6000.c (xcoff_howto_table): Add 16 bit R_BA.
9748 (_bfd_xcoff_reloc_type_lookup): Use it.
9749 * coff64-rs6000.c (xcoff64_howto_table): Same.
9750 (xcoff64_reloc_type_lookup): Same.
9751
9752 2002-02-20 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
9753
9754 * osf-core.c (osf_core_vec): OSF/1 (Digital Unix) core files are
9755 little endian.
9756
9757 2002-02-19 Martin Schwidefsky <schwidefsky@de.ibm.com>
9758
9759 * archures.c (bfd_mach_s390_esa): Rename to bfd_mach_s390_31.
9760 (bfd_mach_s390_esame): Rename to bfd_mach_s390_64.
9761 * bfd-in2.h: Regenerate.
9762 * cpu-s390.c (arch_info_struct): Use renamed architecture defines.
9763 Replace architecture name "s390" with "s390:31-bit" and "s390:esame"
9764 with "s390:64-bit".
9765 * elf32-s390.c (elf_howto_table): Add 32 bit pc relative relocations.
9766 (elf_s390_reloc_type_lookup): Likewise.
9767 (elf_s390_check_relocs): Likewise.
9768 (elf_s390_gc_sweep_hook): Likewise.
9769 (elf_s390_relocate_section): Likewise.
9770 (elf_s390_object_p): Use renamed architecture define.
9771 * elf64-s390.c (elf_s390_object_p): Use renamed architecture define.
9772
9773 2002-02-19 Frank Ch. Eigler <fche@redhat.com>
9774
9775 * syms.c (stt[]): Sorted. Added .init/.fini -> "t" mapping.
9776
9777 2002-02-19 Jakub Jelinek <jakub@redhat.com>
9778
9779 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Enable
9780 absptr -> pcrel optimization for shared libs.
9781 Only create minimal .eh_frame_hdr if absptr FDE encoding in shared
9782 library cannot be converted to pcrel.
9783 (_bfd_elf_eh_frame_section_offset): Return -2 if making absptr
9784 relative.
9785 * elf32-i386.c (elf_i386_relocate_section): If
9786 _bfd_elf_section_offset returned -2, skip, but make sure the
9787 relocation is installed.
9788 * elf32-arm.h (elf32_arm_final_link_relocate): Likewise.
9789 * elf32-cris.c (cris_elf_relocate_section): Likewise.
9790 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
9791 * elf32-i370.c (i370_elf_relocate_section): Likewise.
9792 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
9793 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
9794 * elf32-s390.c (elf_s390_relocate_section): Likewise.
9795 * elf32-sh.c (sh_elf_relocate_section): Likewise.
9796 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
9797 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
9798 * elf64-s390.c (elf_s390_relocate_section): Likewise.
9799 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
9800 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
9801 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
9802 * elf64-alpha.c (elf64_alpha_relocate_section): Handle
9803 _bfd_elf_section_offset returning -2 the same way as -1.
9804 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
9805 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add FIXME
9806 and BFD_ASSERT.
9807 * elf64-mips.c (mips_elf64_create_dynamic_relocation): Likewise.
9808
9809 2002-02-18 Tom Rix <trix@redhat.com>
9810
9811 * xcofflink.c (bfd_xcoff_link_gernate_rtinit): Add -brtl support.
9812 (bfd_xcoff_size_dynamic_sections): Same.
9813 * bfd-in.h (bfd_xcoff_link_generate_rtinit): Same.
9814 (bfd_xcoff_size_dynamic_sections): Same.
9815 * coff-rs6000.c (xcoff_generate_rtinit): Same.
9816 * coff-rs646000.c (xcoff64_generate_rtinit): Same.
9817 * libxcoff.h (struct xcoff_backend_data_rec): Same.
9818 * xcofflink.c (xcoff_build_ldsyms, xcoff_link_add_symbols): Clean.
9819 * bfd-in2.h: Regenerate.
9820
9821 2002-02-18 Alan Modra <amodra@bigpond.net.au>
9822
9823 * elf64-ppc.c (STFD_FR0_0R1, LFD_FR0_0R1, BLR): Define.
9824 (struct ppc_link_hash_table): Add sfpr.
9825 (ppc64_elf_link_hash_table_create): Init it.
9826 (ppc64_elf_create_dynamic_sections): Split creation of .stub and
9827 .glink out to..
9828 (create_linkage_sections): ..here. Make .sfpr too.
9829 (ppc64_elf_check_relocs): Call create_linkage_sections, and set
9830 dynobj early.
9831 (MIN_SAVE_FPR, MAX_SAVE_FPR): Define.
9832 (ppc64_elf_func_desc_adjust): Look for missing ._savef* and
9833 ._restf* functions, and create as needed.
9834 (func_desc_adjust): Only force_local for shared libs.
9835
9836 2002-02-18 David O'Brien <obrien@FreeBSD.org>
9837
9838 * configure.in: Bump version number post 2.12 branching.
9839 * configure: Regenerate.
9840
9841 2002-02-17 Hans-Peter Nilsson <hp@bitrange.com>
9842
9843 * mmo.c: Correct and improve comments.
9844 (mmo_write_chunk): Store trailing byte in bfd buffer; don't
9845 zero-pad. Use input to fill up non-empty bfd buffer.
9846 (mmo_flush_chunk): New function.
9847 (mmo_write_loc_chunk): Add parameter last_vmap, all callers
9848 changed. Don't emit location specifier if VMA is same as
9849 *LAST_VMAP after omitting leading zero contents. Call
9850 mmo_flush_chunk before emitting location specifier.
9851 (mmo_write_loc_chunk_list): Call mmo_flush_chunk when finished
9852 with mmo_write_loc_chunk calls.
9853 (mmo_internal_write_section): Call mmo_flush_chunk after
9854 mmo_write_chunk.
9855 (mmo_write_symbols_and_terminator): Move :Main to first position
9856 in symbol array. Add faked one if it does not exist if there are
9857 other symbols. Don't add it if there are no symbols at all. Move
9858 out test for value of :Main from symbol loop. Rename table
9859 fakemain to maintable and variable mainsym to fakemain.
9860
9861 2002-02-15 Richard Henderson <rth@redhat.com>
9862
9863 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: A target
9864 section with no got matches any got. Simplify error generaion.
9865
9866 2002-02-15 Alan Modra <amodra@bigpond.net.au>
9867
9868 Support arbitrary length fill patterns.
9869 * linker.c (bfd_new_link_order): Zero all fields with bfd_zalloc.
9870 (_bfd_default_link_order): Remove bfd_fill_link_order code.
9871 Call default_data_link_order.
9872 (default_fill_link_order): Delete.
9873 (default_data_link_order): New function.
9874 * elf32-mips.c (_bfd_mips_elf_final_link): Replace occurrences
9875 of bfd_fill_link_order with bfd_data_link_order.
9876 * elf64-alpha.c (elf64_alpha_final_link): Likewise.
9877 * elf64-mips.c (mips_elf64_final_link): Likewise.
9878
9879 * bfd.c (bfd_scan_vma): Clamp overflows to max bfd_vma value.
9880 Correct value returned in "end" for "0x<non-hex>".
9881
9882 2002-02-14 Nick Clifton <nickc@cambridge.redhat.com>
9883
9884 * cpu-arm.c (processors): Replace 'arch' field with 'mach'.
9885 (scan): Test against 'mach' field in info structure.
9886
9887 2002-02-14 Alan Modra <amodra@bigpond.net.au>
9888
9889 * elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD.
9890
9891 2002-02-14 Matt Fredette <fredette@netbsd.org>
9892
9893 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize
9894 EF_M68000.
9895
9896 2002-02-13 Nick Clifton <nickc@cambridge.redhat.com>
9897
9898 * elf.c (_bfd_elf_make_section_from_shdr): Do not insist on
9899 non-zero physical addresses when adjusting the LMAs of new
9900 sections.
9901
9902 2002-02-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
9903
9904 * elf-hppa.h (elf_hppa_reloc_final_type): New function stripped
9905 from _bfd_elf_hppa_gen_reloc_type.
9906 (_bfd_elf_hppa_gen_reloc_type): Remove duplicate prototype.
9907 * elf32-hppa.h (elf32_hppa_reloc_final_type): Add protptype.
9908 * elf32-hppa.c: Include elf32-hppa.h before elf-hppa.h.
9909 * elf64-hppa.h (elf64_hppa_reloc_final_type): Add protptype.
9910
9911 2002-02-12 Alexandre Oliva <aoliva@redhat.com>
9912
9913 * elf-m10300.c (mn10300_elf_relax_section): Skip section before
9914 loading its contents if there's nothing to do in it.
9915
9916 2002-02-12 Alan Modra <amodra@bigpond.net.au>
9917
9918 * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for crossing
9919 64k boundary.
9920
9921 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Add dynamic
9922 DT_PPC64_OPD and DT_PPC64_OPDSZ tags.
9923 (ppc64_elf_finish_dynamic_sections): Set values for them.
9924
9925 2002-02-11 Michael Snyder <msnyder@redhat.com>
9926
9927 * elf-bfd.h (elfcore_write_lwpstatus): Add prototype.
9928 * elf.c (elfcore_grok_pstatus): Add prototype.
9929 (elfcore_grok_lwpstatus): Add prototype.
9930 (elfcore_write_lwpstatus): New function.
9931 (elfcore_write_pstatus): Fix typo, eliminate unnecessary memcpy.
9932
9933 2002-02-11 Alexandre Oliva <aoliva@redhat.com>
9934
9935 * elf32-sh.c: Added missing prototypes.
9936 * elf32-sh64.c: Likewise.
9937 (sh_elf_align_loads): Mark unused args as such.
9938 * elf64-sh64.c: Added missing prototypes.
9939 (struct elf_sh64_link_hash_entry): Fix typo.
9940 (sh_elf64_relocate_section): Fix info argument passed to
9941 _bfd_elf_section_offset.
9942
9943 2002-02-11 Alan Modra <amodra@bigpond.net.au>
9944
9945 * Makefile.am: "make dep-am".
9946 * Makefile.in: Regenerate.
9947 * aclocal.m4: Regenerate.
9948 * config.in: Regenerate.
9949 * configure: Regenerate.
9950
9951 2002-02-10 Daniel Jacobowitz <drow@mvista.com>
9952
9953 * coff-rs6000.c (xcoff_generate_rtinit): Silence uninitialized
9954 variable warnings.
9955 * elf32-sh.c (sh_elf_relax_section): Silence signed/unsigned
9956 comparison warning.
9957 * trad-core.c (trad_unix_core_file_p): Silence pointer/integer
9958 cast warnings for the common case.
9959
9960 2002-02-10 Hans-Peter Nilsson <hp@bitrange.com>
9961
9962 * config.bfd (sh-*-linux*, sh-*-elf* | sh-*-rtemself*): Add sh64
9963 vectors.
9964 (sh-*-netbsdelf*): New, to trump sh*-*-netbsdelf* and add sh64
9965 vectors.
9966
9967 2002-02-09 Richard Henderson <rth@redhat.com>
9968
9969 * elf64-alpha.c (elf64_alpha_howto): Add R_ALPHA_BRSGP.
9970 (elf64_alpha_reloc_map, elf64_alpha_check_relocs): Likewise.
9971 (elf64_alpha_relocate_section): Likewise.
9972 * reloc.c (BFD_RELOC_ALPHA_BRSGP): New.
9973 * bfd-in2.h, libbfd.h: Rebuild.
9974
9975 2002-02-09 Hans-Peter Nilsson <hp@bitrange.com>
9976
9977 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs): Check
9978 that base-plus-offset reloc accounting is consistent.
9979 (mmix_elf_relax_section): Keep base-plus-offset reloc accounting
9980 up to date for undefined symbols.
9981
9982 2002-02-08 Eric Christopher <echristo@redhat.com>
9983
9984 From Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
9985
9986 * elf32-mips.c (_bfd_mips_elf_fake_sections): Don't create .rela
9987 sections for the O32 ABI.
9988
9989 2002-02-08 Chris Demetriou <cgd@broadcom.com>
9990
9991 * elf32-arm.h: Fix formatting of _("...").
9992 * elf32-d10v.c: Likewise.
9993 * elf32-m68k.c: Likewise.
9994 * elf32-mips.c: Likewise.
9995
9996 2002-02-08 Ivan Guzvinec <ivang@opencores.org>
9997
9998 * coff-or32.c: Fix compile time warning messages.
9999
10000 2002-02-08 Alexandre Oliva <aoliva@redhat.com>
10001
10002 Contribute sh64-elf.
10003 2002-01-23 Alexandre Oliva <aoliva@redhat.com>
10004 * reloc.c (R_SH_GOTPLT32, R_SH_GOT_LOW16, R_SH_GOT_MEDLOW16,
10005 R_SH_GOT_MEDHI16, R_SH_GOT_HI16, R_SH_GOTPLT_LOW16,
10006 R_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_HI16,
10007 R_SH_PLT_LOW16, R_SH_PLT_MEDLOW16, R_SH_PLT_MEDHI16,
10008 R_SH_PLT_HI16, R_SH_GOTOFF_LOW16, R_SH_GOTOFF_MEDLOW16,
10009 R_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_HI16, R_SH_GOTPC_LOW16,
10010 R_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDHI16, R_SH_GOTPC_HI16,
10011 R_SH_GOT10BY4, R_SH_GOTPLT10BY4, R_SH_GOT10BY8, R_SH_GOTPLT10BY8,
10012 R_SH_COPY64, R_SH_GLOB_DAT64, R_SH_JMP_SLOT64, R_SH_RELATIVE64):
10013 New relocs.
10014 * libbfd.h, bfd-in2.h: Rebuilt.
10015 * elf32-sh.c (sh_elf_howto_table): Define new relocs.
10016 (sh_reloc_map): Map them.
10017 (PLT_ENTRY_SIZE, elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
10018 elf_sh_plt_entry_be, elf_sh_plt_entry_le, elf_sh_pic_plt_entry_be,
10019 elf_sh_pic_plt_entry_le, elf_sh_plt0_entry, elf_sh_plt_entry,
10020 elf_sh_pic_plt_entry, elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
10021 elf_sh_plt0_gotplt_offset, elf_sh_plt_temp_offset,
10022 elf_sh_plt_symbol_offset, elf_sh_plt_reloc_offset,
10023 movi_shori_putval) [INCLUDE_SHMEDIA]: New.
10024 (elf_sh_link_hash_entry) [INCLUDE_SHMEDIA]: Add
10025 datalabel_got_offset.
10026 (sh_elf_link_hash_newfunc): Initialize it.
10027 (sh_elf_relocate_section): Augment the scope of
10028 seen_stt_datalabel. Introduce GOTPLT support. Extend GOTPC, PLT,
10029 GOT and GOTOFF handling to new SHmedia relocation types. Support
10030 GOT_BIAS.
10031 (sh_elf_check_relocs): Likewise.
10032 (sh_elf_finish_dynamic_symbol) [TARGET_SHMEDIA]: Set up values in
10033 PLT entries using movi_shori_putval. Support GOT_BIAS.
10034 (sh_elf_finish_dynamic_sections): Likewise.
10035 * elf32-sh64.c (shmedia_prepare_reloc): Do not add addend to
10036 relocation, it's now done by the caller.
10037 (GOT_BIAS): New.
10038 * elf64-sh64.c (GOT_BIAS, PLT_ENTRY_SIZE, elf_sh64_sizeof_plt,
10039 elf_sh64_plt_plt0_offset, elf_sh64_plt0_gotplt_offset,
10040 elf_sh64_plt_temp_offset, elf_sh64_plt_symbol_offset,
10041 elf_sh64_plt_reloc_offset, ELF_DYNAMIC_INTERPRETER,
10042 elf_sh64_pcrel_relocs_copied, elf_sh64_link_hash_entry,
10043 elf_sh64_link_hash_table, sh64_elf64_link_hash_traverse,
10044 sh64_elf64_hash_table): New.
10045 (sh_elf64_howto_table): Introduce new relocs.
10046 (sh_elf64_info_to_howto): Accept new PIC relocs.
10047 (sh_elf64_relocate_section): Augment the scope of
10048 seen_stt_datalabel. Support new PIC relocs.
10049 (sh_elf64_check_relocs): Support new PIC relocs.
10050 (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le,
10051 elf_sh64_plt_entry_be, elf_sh64_plt_entry_le,
10052 elf_sh64_pic_plt_entry_be, elf_sh64_pic_plt_entry_le,
10053 elf_sh64_plt0_entry, elf_sh64_plt_entry, elf_sh64_pic_plt_entry,
10054 sh64_elf64_link_hash_newfunc, sh64_elf64_link_hash_table_create,
10055 movi_shori_putval, movi_3shori_putval,
10056 sh64_elf64_create_dynamic_sections,
10057 sh64_elf64_adjust_dynamic_symbol, sh64_elf64_discard_copies,
10058 sh64_elf64_size_dynamic_sections,
10059 sh64_elf64_finish_dynamic_symbol,
10060 sh64_elf64_finish_dynamic_sections): New.
10061 (elf_backend_create_dynamic-sections,
10062 bfd_elf64_bfd_link_hash_table_create,
10063 elf_backend_adjust_dynamic_symbol,
10064 elf_backend_size_dynamic_sections,
10065 elf_backend_finish_dynamic_symbol,
10066 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
10067 elf_backend_plt_readonly, elf_backend_want_plt_sym,
10068 elf_backend_got_header_size, elf_backend_plt_header_size):
10069 Define.
10070 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
10071 * elf32-sh.c: Renumbered and renamed some SH5 relocations to
10072 match official numbers and names; moved unmaching ones to the
10073 range 0xf2-0xff.
10074 * elf32-sh64.c, elf64-sh64.c: Likewise.
10075 2001-03-12 DJ Delorie <dj@redhat.com>
10076 * elf32-sh.c (sh_elf_relax_section): Don't relax SHmedia
10077 sections.
10078 2001-03-12 DJ Delorie <dj@redhat.com>
10079 * elf32-sh64.c (shmedia_prepare_reloc): Validate relocs that must
10080 be aligned.
10081 * elf64-sh64.c (sh_elf64_relocate_section): Ditto.
10082 2001-01-14 Hans-Peter Nilsson <hpn@cygnus.com>
10083 * elf32-sh64.c (bfd_elf32_bfd_copy_private_section_data): Define.
10084 (sh64_elf_fake_sections): Set type to SHT_SH5_CR_SORTED for a
10085 .cranges section with SEC_SORT_ENTRIES set.
10086 (sh64_backend_section_from_shdr): Set SEC_SORT_ENTRIES on an
10087 incoming sorted .cranges section.
10088 (sh64_bfd_elf_copy_private_section_data): New.
10089 (sh64_elf_final_write_processing): Only sort .cranges and modify
10090 start address if called by linker.
10091 2001-01-08 Ben Elliston <bje@redhat.com>
10092 * elf32-sh64.c (sh64_elf_final_write_processing): Activate
10093 Hans-Peter Nilsson's set bit 0 patch from 2001-01-06.
10094 * elf64-sh64.c (sh64_elf64_final_write_processing): Ditto.
10095 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
10096 * elf64-sh64.c (sh_elf64_howto_table): No open brace at start of
10097 line. Add comments before all entries.
10098 <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct and clarify describing
10099 comment.
10100 (sh_elf64_reloc): Correct head comment.
10101 (sh_elf64_relocate_section): Correct spacing.
10102 <relocating for a local symbol>: Do not honour STO_SH5_ISA32;
10103 instead call reloc_dangerous callback.
10104 <case R_SH_SHMEDIA_CODE>: New case.
10105 (sh_elf64_gc_mark_hook): Correct spacing.
10106 (sh_elf64_check_relocs): Ditto.
10107 * elf32-sh64.c (shmedia_prepare_reloc) <case R_SH_SHMEDIA_CODE>:
10108 New case.
10109 * elf32-sh.c: Correct #endif comments for #ifndef-wrapped
10110 functions.
10111 (sh_elf_howto_table) <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct,
10112 clarify describing comment. Add comments before all entries.
10113 (sh_elf_relocate_section) <relocating for a local symbol>: Do not
10114 honour STO_SH5_ISA32; instead call reloc_dangerous callback.
10115 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
10116 Sort .cranges section in final link. Prepare to set bit 0 on
10117 entry address.
10118 * elf32-sh64.c (struct sh64_find_section_vma_data): New.
10119 (sh64_elf_link_output_symbol_hook): Fix typo in prototype.
10120 (sh64_elf_set_mach_from_flags): Set SEC_DEBUGGING on incoming
10121 .cranges section.
10122 (sh64_backend_section_from_shdr): New, to recognize
10123 SHT_SH5_CR_SORTED on incoming .cranges section.
10124 (elf_backend_section_from_shdr): Define.
10125 (sh64_elf_final_write_processing): Sort outgoing .cranges
10126 section. (New, temporarily disabled:) Set bit 0 on entry address
10127 according to ISA type.
10128 (sh64_find_section_for_address): New.
10129 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb,
10130 crange_bsearch_cmpl): Move here from opcodes/sh64-dis.c.
10131 (sh64_address_in_cranges): Move here from opcodes/sh64-dis.c. Use
10132 bfd_malloc, not xmalloc.
10133 (sh64_get_contents_type): Move here from opcodes/sh64-dis.c. Make
10134 global.
10135 * elf32-sh64.c (sh64_elf64_final_write_processing): New, (but
10136 temporarily disabled) setting bit 0 on entry address.
10137 (elf_backend_final_write_processing): Define.
10138 2001-01-05 Hans-Peter Nilsson <hpn@cygnus.com>
10139 * elf32-sh.c (sh_elf_howto_table) <R_SH_PT_16>: Adjust fields to
10140 be a proper relocation for PTA and PTB rather than a marker.
10141 <R_SH_IMMU5, R_SH_IMMS6, R_SH_IMMU6, R_SH_IMMS10, R_SH_IMMS10BY2,
10142 R_SH_IMMS10BY4, R_SH_IMMS10BY8, R_SH_IMMS16, R_SH_IMMU16,
10143 R_SH_IMM_LOW16, R_SH_IMM_LOW16_PCREL, R_SH_IMM_MEDLOW16,
10144 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16_PCREL,
10145 R_SH_IMM_HI16, R_SH_IMM_HI16_PCREL, R_SH_64, R_SH_64_PCREL>:
10146 Zero src_mask.
10147 * elf64-sh64.c: Ditto.
10148 (sh_elf64_relocate_section) <case R_SH_PT_16>: New case.
10149 * elf32-sh64.c: Include opcodes/sh64-opc.h
10150 (shmedia_prepare_reloc): Take a bfd_link_info pointer as first
10151 argument. Drop const qualifiers from "bfd *" and "bfd_byte *"
10152 parameters. No unused parameters. Caller changed.
10153 <case R_SH_PT_16>: New case.
10154 * Makefile.am (elf32-sh64.lo): Add dependency on sh64-opc.h.
10155 * Makefile.in: Regenerate.
10156 2000-12-30 Hans-Peter Nilsson <hpn@cygnus.com>
10157 * elf64-sh64.c (sh64_elf64_fake_sections): Set SHF_SH5_ISA32 for
10158 all code sections.
10159 (sh_elf64_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
10160 (sh64_elf_merge_private_data): Ditto.
10161 * elf32-sh64.c (sh64_elf_fake_sections): Use sh64_elf_section_data
10162 to access stored section flags.
10163 (sh64_elf_final_write_processing): Return immediately unless
10164 called by linker. Use sh64_elf_section_data (cranges) to get size
10165 of linker-generated cranges entries.
10166 (sh64_elf_copy_private_data): Add missing "return true".
10167 (sh64_elf_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
10168 (sh_elf64_merge_private_data): Ditto.
10169 2000-12-19 Hans-Peter Nilsson <hpn@cygnus.com>
10170 * elf64-sh64.c (sh64_elf64_fake_sections): New, copy of
10171 elf64-sh64.c:sh64_elf_fake_sections.
10172 (elf_backend_fake_sections): Define as sh64_elf64_fake_sections.
10173 2000-12-18 Hans-Peter Nilsson <hpn@cygnus.com>
10174 * elf32-sh64.c (sh64_elf_copy_private_data_internal): Delete.
10175 (sh64_elf_final_write_processing): New.
10176 (elf_backend_final_write_processing): Define.
10177 (sh64_elf_fake_sections): Get header flags from tdata field.
10178 (sh64_elf_copy_private_data): Do not call
10179 sh64_elf_copy_private_data_internal, just copy e_flags field.
10180 (sh64_elf_merge_private_data): Do not call
10181 sh64_elf_copy_private_data_internal.
10182 2000-12-12 Hans-Peter Nilsson <hpn@cygnus.com>
10183 Remove EF_SH64_ABI64, let ELF size make difference.
10184 Remove SH64-specific BFD section flag.
10185 * elf32-sh64.c (sh64_elf_fake_sections): Recognize section as
10186 containing SHmedia through elf_section_data (asect)->tdata
10187 non-zero, not using a BFD section flag.
10188 (sh64_elf_set_mach_from_flags): Don't recognize EF_SH64_ABI64.
10189 (sh64_elf_merge_private_data): Similar.
10190 (elf_backend_section_flags): Don't define.
10191 (sh64_elf_backend_section_flags): Delete.
10192 * elf64-sh64.c (sh_elf64_set_mach_from_flags): Recognize EF_SH64,
10193 not EF_SH64_ABI64.
10194 (sh_elf64_merge_private_data): Similar.
10195 * section.c (Section flags definitions): Don't define
10196 SEC_SH_ISA_SHMEDIA.
10197 (bfd-in2.h): Regenerate.
10198 2000-12-09 Hans-Peter Nilsson <hpn@cygnus.com>
10199 Make DataLabel references work with partial linking.
10200 * elf32-sh64.c: Fix formatting.
10201 (sh64_elf_link_output_symbol_hook): New.
10202 (elf_backend_link_output_symbol_hook): Define to
10203 sh64_elf_link_output_symbol_hook.
10204 (sh64_elf_add_symbol_hook): Make DataLabel symbol just global
10205 undefined if partial linking. Adjust sanity check.
10206 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): New.
10207 (elf_backend_link_output_symbol_hook): Define to
10208 sh64_elf64_link_output_symbol_hook.
10209 (sh64_elf64_add_symbol_hook): Make DataLabel symbol just global
10210 undefined if partial linking. Adjust sanity check.
10211 2000-12-07 Hans-Peter Nilsson <hpn@cygnus.com>
10212 Implement semantics for inter-file DataLabel references.
10213 * elf64-sh64.c (DATALABEL_SUFFIX): Define.
10214 (sh64_elf64_add_symbol_hook): New.
10215 (sh_elf64_relocate_section): If passing an indirect symbol with
10216 st_type STT_DATALABEL on the way to a symbol with st_other
10217 STO_SH5_ISA32, do not bitor 1 to the relocation.
10218 (elf_backend_add_symbol_hook): Define to
10219 sh64_elf64_add_symbol_hook.
10220 * elf64-sh32.c: Tweak comments.
10221 (DATALABEL_SUFFIX): Define.
10222 (sh64_elf_add_symbol_hook): New.
10223 (elf_backend_add_symbol_hook): Define to sh64_elf_add_symbol_hook.
10224 * elf32-sh.c (sh_elf_relocate_section): If passing an indirect
10225 symbol with st_type STT_DATALABEL on the way to a symbol with
10226 st_other STO_SH5_ISA32, do not bitor 1 to the relocation.
10227 2000-12-05 Hans-Peter Nilsson <hpn@cygnus.com>
10228 Pass through STT_DATALABEL.
10229 * elf32-sh64.c (sh64_elf_get_symbol_type): New.
10230 (elf_backend_get_symbol_type): Define.
10231 * elf64-sh64.c (sh64_elf64_get_symbol_type): New.
10232 (elf_backend_get_symbol_type): Define.
10233 2000-11-30 Hans-Peter Nilsson <hpn@cygnus.com>
10234 * elf32-sh64.c: Tweak comments.
10235 (sh64_elf_copy_private_data_internal): Add prototype.
10236 (bfd_elf32_bfd_set_private_flags): Define.
10237 (sh64_elf_copy_private_data_internal): Compare machine name, not
10238 textual BFD target name, to check whether to copy section flag
10239 SHF_SH5_ISA32.
10240 (sh64_elf_merge_private_data): Validize bfd_get_arch_size.
10241 Tweak section-contents-type-mismatch message.
10242 (shmedia_prepare_reloc): Add ATTRIBUTE_UNUSED markers.
10243 Validize reloc-types.
10244 * elf64-sh64.c: New file.
10245 * targets.c (bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec): Declare.
10246 * Makefile.am (BFD64_BACKENDS): Add elf64-sh64.lo.
10247 (BFD64_BACKENDS_CFILES): Add elf64-sh64.c.
10248 Regenerate dependencies.
10249 * Makefile.in: Regenerate.
10250 * config.bfd (sh64-*-elf*): Add bfd_elf64_sh64_vec and
10251 bfd_elf64_sh64l_vec.
10252 * configure.in: Handle bfd_elf64_sh64_vec and
10253 bfd_elf64_sh64l_vec.
10254 * configure: Regenerate.
10255 * po/POTFILES.in: Regenerate.
10256 * po/bfd.pot: Regenerate.
10257 2000-11-29 Hans-Peter Nilsson <hpn@cygnus.com>
10258 * elf32-sh64.c (sh64_elf_set_mach_from_flags): Do not recognize
10259 anything else but EF_SH64 and EF_SH64_ABI64.
10260 (sh64_elf_merge_private_data): Emit error for anything else but
10261 EF_SH64 and EF_SH64_ABI64.
10262 * config.bfd: Remove bfd_elf32_shblin_vec and bfd_elf32_shlin_vec
10263 from targ_selvecs.
10264 * configure.in: Add cofflink.lo to bfd_elf32_sh64_vec and
10265 bfd_elf32_sh64l_vec as a temporary measure.
10266 * configure: Regenerate.
10267 2000-11-27 Hans-Peter Nilsson <hpn@cygnus.com>
10268 * cpu-sh.c (arch_info_struct): Include sh5 item
10269 unconditionalized.
10270 * config.bfd (sh64-*-elf*): Do not set targ_cflags.
10271 Add targ_selvecs bfd_elf32_sh_vec, bfd_elf32_shl_vec,
10272 bfd_elf32_shblin_vec and bfd_elf32_shlin_vec.
10273 * elf32-sh64.c: Tweak comments.
10274 (sh64_elf_set_mach_from_flags): Recognize all machine flags that
10275 are proper subsets of SH64 as bfd_mach_sh5. Add EF_SH64_ABI64.
10276 (sh64_elf_copy_private_data_internal): Wrap long line.
10277 (sh64_elf_merge_private_data): Rewrite to allow objects from
10278 SH64 subsets to be linked together.
10279 (INCLUDE_SHMEDIA): Define.
10280 * elf32-sh.c (sh_elf_relocate_section) <local symbol>:
10281 Parenthesize plus-expression inside or-expression.
10282 <global symbol>: Ditto.
10283 (sh_elf_set_mach_from_flags): Remove code refusing
10284 deleted EF_SH64_32BIT_ABI flag.
10285 2000-11-26 Hans-Peter Nilsson <hpn@cygnus.com>
10286 * elf32-sh.c (sh_elf_howto_table) <R_SH_IMM_LOW16_PCREL,
10287 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16_PCREL,
10288 R_SH_IMM_HI16_PCREL, R_SH_64_PCREL>: Set pcrel_offset to true.
10289 (sh_elf_relocate_section) <local symbol>: Or 1 in
10290 calculation of relocation if sym->st_other & STO_SH5_ISA32.
10291 <global symbol>: Ditto if h->other & STO_SH5_ISA32.
10292 * elf32-sh64.c (shmedia_prepare_reloc): Add rel->r_addend to
10293 relocation.
10294 2000-11-24 Hans-Peter Nilsson <hpn@cygnus.com>
10295 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64.lo.
10296 (BFD32_BACKENDS_CFILES): Add elf32-sh64.c.
10297 Regenerate dependencies.
10298 * Makefile.in: Regenerate.
10299 * archures.c: Add bfd_mach_sh5.
10300 * config.bfd: Map targ_cpu sh* to bfd_sh_arch.
10301 Handle sh64-*-elf*. Set targ_cflags to -DINCLUDE_SHMEDIA.
10302 * configure.in: Handle bfd_elf32_sh64_vec and bfd_elf32_sh64l_vec.
10303 * configure: Regenerate.
10304 * reloc.c (BFD_RELOC_SH_SHMEDIA_CODE, BFD_RELOC_SH_IMMU5,
10305 BFD_RELOC_SH_IMMS6, BFD_RELOC_SH_IMMS6BY32, BFD_RELOC_SH_IMMU6,
10306 BFD_RELOC_SH_IMMS10, BFD_RELOC_SH_IMMS10BY2,
10307 BFD_RELOC_SH_IMMS10BY4, BFD_RELOC_SH_IMMS10BY8,
10308 BFD_RELOC_SH_IMMS16, BFD_RELOC_SH_IMMU16, BFD_RELOC_SH_IMM_LOW16,
10309 BFD_RELOC_SH_IMM_LOW16_PCREL, BFD_RELOC_SH_IMM_MEDLOW16,
10310 BFD_RELOC_SH_IMM_MEDLOW16_PCREL, BFD_RELOC_SH_IMM_MEDHI16,
10311 BFD_RELOC_SH_IMM_MEDHI16_PCREL, BFD_RELOC_SH_IMM_HI16,
10312 BFD_RELOC_SH_IMM_HI16_PCREL, BFD_RELOC_SH_PT_16): New relocations.
10313 * cpu-sh.c [INCLUDE_SHMEDIA] (arch_info_struct): Define and link
10314 in item for SH5.
10315 * elf32-sh.c [INCLUDE_SHMEDIA] (sh_elf_howto_table): Add howto items
10316 for SHmedia relocs.
10317 [INCLUDE_SHMEDIA] (sh_rel): Add mappings for SHmedia relocs.
10318 [INCLUDE_SHMEDIA] (sh_elf_relocate_section) [default]: Call
10319 shmedia_prepare_reloc, goto final_link_relocate if it returns
10320 non-zero, else fail as before.
10321 (sh_elf_set_mach_from_flags): Provide function only if not defined
10322 as macro. Do not recognize objects with EF_SH64_32BIT_ABI set.
10323 (sh_elf_set_private_flags): Provide function only if not defined
10324 as a macro.
10325 (sh_elf_copy_private_data): Similar.
10326 (sh_elf_merge_private_data): Similar.
10327 * section.c (SEC_SH_ISA_SHMEDIA): New.
10328 * targets.c (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec): Declare.
10329 * elf32-sh64.c: New file.
10330 * libbfd.h: Regenerate.
10331 * bfd-in2.h: Regenerate.
10332 * po/POTFILES.in: Regenerate.
10333 * po/bfd.pot: Regenerate.
10334 * bfd-in2.h: Regenerate.
10335 * libbfd.h: Regenerate.
10336
10337 2002-02-07 Daniel Jacobowitz <drow@mvista.com>
10338
10339 * bfd-in.h: Update <stdbool.h> check to only see if <stdbool.h> has
10340 been included, not drag it in.
10341 * bfd-in2.h: Regenerate.
10342
10343 2002-02-06 H.J. Lu (hjl@gnu.org)
10344
10345 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Update
10346 the mach and ISA fields if necessary.
10347
10348 2002-02-06 Nick Clifton <nickc@cambridge.redhat.com>
10349
10350 * coffcode.h (coff_set_arch_mach_hook): Select the highest known
10351 ARM architecture when an F_ARM_5 flag is detected, since we cannot
10352 be sure exactly which architecture this represents.
10353
10354 2002-02-05 Nick Clifton <nickc@redhat.com>
10355
10356 * po/tr.po: Updated translation.
10357
10358 2002-02-05 Alan Modra <amodra@bigpond.net.au>
10359
10360 From Jimi X <jimix@watson.ibm.com>
10361 * archures (bfd_mach_ppc64): Define.
10362 (bfd_powerpc_arch): Rename to bfd_powerpc_archs.
10363 (bfd_powerpc_arch): Define.
10364 * bfd-in2.h: Regenerate.
10365 * cpu-powerpc.c (arch_info_struct): Rename to bfd_powerpc_archs.
10366 (bfd_powerpc_arch): Move to tail of bfd_powerpc_archs.
10367 (bfd_powerpc_archs): Add default powerpc64 arch.
10368
10369 2002-02-05 Alan Modra <amodra@bigpond.net.au>
10370
10371 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Check for relocs
10372 against section syms in readonly sections. Don't do the global
10373 sym check if we find one.
10374 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
10375 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
10376 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
10377 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
10378 (elf_s390_grok_prstatus): Add missing prototype.
10379
10380 2002-02-04 Hans-Peter Nilsson <hp@bitrange.com>
10381
10382 * elf64-mmix.c (mmix_dump_bpo_gregs): New function.
10383 (mmix_elf_check_common_relocs) <case R_MMIX_BASE_PLUS_OFFSET>:
10384 Call bfd_get_section_by_name only once. Initialize
10385 bpodata->n_bpo_relocs_this_section.
10386 (_bfd_mmix_prepare_linker_allocated_gregs): Remove comment
10387 referring to DSOs.
10388 (bpo_reloc_request_sort_fn): Don't use difference of values as
10389 return-value.
10390
10391 2002-02-02 David O'Brien <obrien@FreeBSD>
10392
10393 * configure.in: Tweak the FreeBSD 4.x recognition more. Only treat
10394 version 4.5 and later the same as 5-CURRENT.
10395 * configure: Re-generate.
10396
10397 2002-02-02 Jason Thorpe <thorpej@wasabisystems.com>
10398
10399 * config.bfd (hppa*-*-netbsd*): New target.
10400
10401 2002-01-31 Philipp Thomas <pthomas@suse.de>
10402
10403 * coff-arm.c (coff_arm_merge_private_bfd_data): Move ERROR
10404 to front of message. Unify messages with elf32-arm.h. Use
10405 commas where neccessary.
10406 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Use all upcase
10407 ERROR in messages. Unify messages with coff-arm.c. Correct
10408 VFP/FPA error message.
10409 (elf32_arm_print_private_bfd_data): Don't mark APCS-26 and
10410 APCS-32 for translation.
10411
10412 2002-02-01 Hans-Peter Nilsson <hp@bitrange.com>
10413
10414 Perform on-demand global register allocation from
10415 R_MMIX_BASE_PLUS_OFFSET relocs.
10416 * elf64-mmix.c (struct bpo_reloc_section_info, struct
10417 bpo_reloc_request, struct bpo_greg_section_info): New.
10418 (mmix_elf_check_common_relocs, mmix_elf_gc_sweep_hook,
10419 bpo_reloc_request_sort_fn, mmix_elf_relax_section,
10420 _bfd_mmix_check_all_relocs,
10421 _bfd_mmix_prepare_linker_allocated_gregs,
10422 _bfd_mmix_finalize_linker_allocated_gregs): New functions.
10423 (elf_mmix_howto_table): Correct src_mask for most relocs.
10424 (mmix_elf_perform_relocation) <case R_MMIX_BASE_PLUS_OFFSET>: New
10425 case.
10426 (mmix_final_link_relocate) <case R_MMIX_BASE_PLUS_OFFSET>: New
10427 case. Fix typo in comment. New label do_mmix_reloc.
10428 (mmix_elf_check_relocs): Abuse bfd_link_info member base_file to
10429 store first object file with a base-plus-offset reloc. Call
10430 mmix_elf_check_common_relocs for the part common with mmo.
10431 (mmix_elf_final_link): Write out linker-allocated register
10432 contents section.
10433 (elf_backend_gc_sweep_hook): Define.
10434 (bfd_elf64_bfd_relax_section): Define.
10435
10436 * mmo.c: Don't include <ctype.h>
10437 (mmo_init): Correct init-once logic.
10438
10439 2002-02-01 Tom Rix <trix@redhat.com>
10440
10441 * config.bfd: Conditionally support <aiaff> for pre AIX 4.3.
10442
10443 2002-02-01 Alan Modra <amodra@bigpond.net.au>
10444
10445 * Makefile.am: Run "make dep-am"
10446 * Makefile.in: Regenerate.
10447
10448 2002-01-31 David O'Brien <obrien@FreeBSD>
10449
10450 * configure.in: Recognize the differences in core files from FreeBSD
10451 4.{0,1} and later versions of 4.x. This treats 4.2+ the same as
10452 5-CURRENT.
10453 * configure: Regenerate.
10454
10455 2002-01-31 Ivan Guzvinec <ivang@opencores.org>
10456
10457 * coff-or32.c: New file.
10458 * cpu-or32.c: New file.
10459 * elf32-or32.c: New file.
10460 * archures.c: Add support for or32.
10461 * targets.c: Add support for or32.
10462 * bfd-in2.h: Regenerate.
10463 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags,
10464 coff_write_object_contents): Add support for or32.
10465 * config.bfd: Add target.
10466 * configure.in: Add support for or32.
10467 * configure: Regenerate.
10468 * Makefile.am: Add support for or32.
10469 * Makefile.in: Regenerate.
10470 * po/SRC-POTFILES.in: Add or32 files.
10471 * po/bfd.pot: Regenerate.
10472
10473 2002-01-31 Nick Clifton <nickc@cambridge.redhat.com>
10474 Don Lindsay <lindsayd@cisco.com>
10475
10476 * elf32-mips.c (mips_elf_calculate_relocation): Replace 'return
10477 false' with a return of a bfd_reloc_ error code.
10478
10479 2002-01-31 Hans-Peter Nilsson <hp@axis.com>
10480
10481 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
10482 unexport unreferenced symbols when --export-dynamic. Call
10483 _bfd_elf_strtab_delref when unexporting.
10484
10485 2002-01-30 Daniel Jacobowitz <drow@mvista.com>
10486
10487 * bfd-in.h: Include <stdbool.h> if it is available.
10488 * bfd-in2.h: Regenerated.
10489
10490 2002-01-31 Alan Modra <amodra@bigpond.net.au>
10491
10492 * elf64-ppc.c (func_desc_adjust): STV_PROTECTED functions should
10493 not go via the plt.
10494
10495 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
10496
10497 * archures.c: Tidy up formatting of embedded comments.
10498 * bfd.c: Tidy up formatting of embedded comments.
10499 * bfd-in.h: Fix formatting of comments.
10500 * reloc.c: Tidy up formatting of ordinary & embedded comments.
10501 * section.c: Tidy up formatting of embedded comments.
10502 * syms.c: Tidy up formatting of embedded comments.
10503 * targets.c: Tidy up formatting of embedded comments.
10504
10505 * bfd-in2.h: Regenerate.
10506
10507 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
10508
10509 * vms-tir.c (cmd_name): New function.
10510 (tir_cmd_name): New function.
10511 (etir_sta, etir_sto, etir_opr, etir_stc): Use cmd_name().
10512 (tir_opr, tir_ctl, tir_cmd): use tir_cmd_name().
10513 Fix formatting.
10514
10515 * peXXigen.c (pe_print_idata): Rearrange message to aid in
10516 translation.
10517 (pe_print_pdata): Rearrange message to aid in translation.
10518
10519 * libbfd.c (warn_deprecated): Rearrange error message to aid in
10520 translation.
10521
10522 * ihex.c (ihex_write_object_contents): Fix spelling typo.
10523
10524 * ieee.c (ieee_slurp_external_symbols): Remove spurious space.
10525
10526 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Rearrange error
10527 message to aid in translation.
10528
10529 * elf64-mmix.c (mmix_final_link_relocate): Rearrange error message
10530 to aid in translation.
10531
10532 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix typo.
10533
10534 2002-01-30 Philipp Thomas <pthomas@suse.de>
10535
10536 * coff-arm.c, elf32-elf.h: Unify messages.
10537
10538 2002-01-30 Nick Clifton <nickc@redhat.com>
10539
10540 * po/sv.po: Updated translation.
10541
10542 2002-01-30 Philipp Thomas <pthomas@suse.de>
10543
10544 * dwarf2.c (read_abbrev): Use full section name in error message.
10545 (decode_line_info): Likewise.
10546
10547 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Don't translate debugging
10548 message.
10549
10550 2002-01-30 Alan Modra <amodra@bigpond.net.au>
10551
10552 * elf64-ppc.c (func_desc_adjust): Only provide missing function
10553 descriptor symbols for undefined function code syms. Clear
10554 ELF_LINK_NON_ELF so that they can stay weak.
10555
10556 2002-01-29 Chris Demetriou <cgd@broadcom.com>
10557 Mitch Lichtenberg <mpl@broadcom.com>
10558
10559 * bfd-in.h (bfd_mips_elf32_create_embedded_relocs): New prototype.
10560 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): New function
10561 to handle 32-bit ELF embedded reloc (ld --embedded-relocs)
10562 generation.
10563 * bfd-in2.h: Regenerate.
10564
10565 2002-01-29 Chris Demetriou <cgd@broadcom.com>
10566
10567 * elf32-mips.c: Add additional comments about HI16 relocation
10568 processing.
10569 (_bfd_mips_elf_hi16_reloc): Don't subtract address here for
10570 pc-relative relocations. (Reverts change made on 2001-10-31.)
10571 (_bfd_mips_elf_lo16_reloc): Subtract address of LO16 part here
10572 for pc-relative relocations.
10573 (mips_elf_calculate_relocation): Add a comment about a kludge
10574 in the R_MIPS_GNU_REL_HI16 handling.
10575 (_bfd_mips_elf_relocate_section): Implement that kludge;
10576 adjust pc-relative HI16 relocation for difference in HI16 and
10577 LO16 addresses, since it can't easily be done in
10578 mips_elf_calculate_relocation.
10579
10580 2002-01-29 Martin Schwidefsky <schwidefsky@de.ibm.com>
10581
10582 * elf32-i386 (elf_i386_adjust_dynamic_symbol): Do not replace PLT32
10583 relocations with PC32 relocations for undefined or weak symbols.
10584 * elf32-s390 (elf_i386_adjust_dynamic_symbol): Likewise.
10585 * elf64-s390x (elf_i386_adjust_dynamic_symbol): Likewise.
10586
10587 2002-01-28 Jason Thorpe <thorpej@wasabisystems.com>
10588
10589 * elfcore.h (elf_core_file_p): Improve comment for last change.
10590
10591 2002-01-27 Daniel Jacobowitz <drow@mvista.com>
10592
10593 * configure: Regenerated.
10594
10595 2002-01-27 Jason Thorpe <thorpej@wasabisystems.com>
10596
10597 * elfcore.h (elf_core_file_p): Set the machine architecture
10598 before processing the program headers.
10599
10600 2002-01-26 Hans-Peter Nilsson <hp@bitrange.com>
10601
10602 * configure.in <64-bit configuration>: If using gcc, check and
10603 emit error for egcs-1.1.2.
10604 * configure: Regenerate.
10605
10606 2002-01-26 Egor Duda <deo@logos-m.ru>
10607
10608 * elf.c (elfcore_grok_win32pstatus): Copy only as much information
10609 as possible to avoid stack corruption.
10610
10611 2002-01-26 Richard Henderson <rth@redhat.com>
10612
10613 * elf64-alpha.c (elf64_alpha_check_relocs): Don't set reltext
10614 for non-allocated sections.
10615
10616 2002-01-25 Mark Kettenis <kettenis@gnu.org>
10617
10618 * elf.c (elfcore_write_prstatus): Make sure we pass the address of
10619 prstat.pr_reg even if it is a struct.
10620
10621 2002-01-25 Steve Ellcey <sje@cup.hp.com>
10622
10623 * elfxx-ia64.c: Reset AIX vector function overrides for HP-UX.
10624
10625 2002-01-25 Philipp Thomas <pthomas@suse.de>
10626
10627 * coffgen.c (coff_print_symbol): Don't mark info message
10628 for translation.
10629
10630 2002-01-25 Nick Clifton <nickc@redhat.com>
10631
10632 * po/fr.po: Updated translation.
10633 * po/es.po: Updated translation.
10634
10635 2002-01-25 Philipp Thomas <pthomas@suse.de>
10636
10637 * coff-alpha.c (alpha_relocate_section): Unify warning message
10638 for GP relative relocations without GP defined.
10639 * coff-mips.c (mips_relocate_section): Likewise.
10640
10641 2002-01-25 Alan Modra <amodra@bigpond.net.au>
10642
10643 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Avoid
10644 unsigned overflow when new_offset < old_offset.
10645
10646 2002-01-24 Philipp Thomas <pthomas@suse.de>
10647
10648 * bfd.c (_bfd_abort): Fix typo.
10649
10650 2002-01-23 Richard Henderson <rth@redhat.com>
10651
10652 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't suppress
10653 plt entries for undefweak symbols.
10654
10655 2002-01-23 Steve Ellcey <sje@cup.hp.com>
10656
10657 * targets.c (bfd_elf32_ia64_hpux_big_vec): Add to DEFAULT_VECTOR.
10658 (bfd_elf64_ia64_hpux_big_vec): Ditto.
10659 (bfd_elf32_h8300_vec): Ditto.
10660
10661 2002-01-23 Alan Modra <amodra@bigpond.net.au>
10662
10663 * elf64-ppc.c: Remove stale part of ABI comment.
10664 (NO_OPD_RELOCS): Define.
10665 (ppc64_elf_check_relocs): Use it.
10666 (ppc64_elf_relocate_section): Here too.
10667 (build_one_stub): Don't point function syms at the stub. Instead,
10668 hijack plt.offset.
10669 (ppc64_elf_relocate_section): Check whether REL24 relocs should
10670 really go to the stub. Make all dynamic relocs in opd against
10671 locals.
10672 (ppc64_elf_finish_dynamic_symbol): Allow for non-standard use of
10673 plt.offset.
10674
10675 2002-01-22 Richard Henderson <rth@redhat.com>
10676
10677 * elf64-alpha.c (INSN_UNOP): Encode with RB as $sp.
10678
10679 2002-01-22 Alan Modra <amodra@bigpond.net.au>
10680
10681 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Correct sign of
10682 TOC_BASE_OFF adjustment.
10683
10684 * Makefile.am: Run "make dep-am".
10685 * Makefile.in: Regenerate.
10686 * po/SRC-POTFILES.in: Regenerate.
10687
10688 2002-01-22 John David Anglin <dave@hiauly1.hia.nrc.ca>
10689
10690 * configure.host (hppa*64*-*-hpux*, hppa*64*-*-linux*): Add new
10691 host defines.
10692
10693 2002-01-21 Hans-Peter Nilsson <hp@axis.com>
10694
10695 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GOTREL>:
10696 Check for and emit error if sgot is NULL at this point.
10697
10698 2002-01-21 Jason Thorpe <thorpej@wasabisystems.com>
10699
10700 * config.bfd (ia64*-*-netbsd*): New target.
10701
10702 2002-01-21 Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
10703
10704 * som.c (som_write_space_strings): Comment typo fix.
10705
10706 2002-01-21 Alan Modra <amodra@bigpond.net.au>
10707
10708 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_func and
10709 is_func_descriptor fields.
10710 (link_hash_newfunc): Init them.
10711 (ppc64_elf_check_relocs): Only R_PPC24_REL24 syms starting with a
10712 dot are candidates for plt entries. When processing .opd relocs,
10713 set function descriptor strings to point inside function code
10714 string, and set new ppc_link_hash_entry fields.
10715 (ppc64_elf_gc_sweep_hook): Don't sweep R_PPC64_REL24 relocs.
10716 (ppc64_elf_adjust_dynamic_symbol): Remove most code dealing with
10717 function descriptors. It's now done in..
10718 (func_desc_adjust): New.
10719 (ppc64_elf_func_desc_adjust): New.
10720 (define elf_backend_always_size_sections): Define.
10721 (ppc64_elf_hide_symbol): New.
10722 (define elf_backend_hide_symbol): Define.
10723 (allocate_dynrelocs): Remove code looking up function descriptors
10724 as that has been done earlier.
10725 (ppc64_elf_size_dynamic_sections): Use htab shortcut to elf hash
10726 table.
10727 (ppc64_elf_finish_dynamic_symbol): Likewise. Remove code looking
10728 up function descriptor.
10729 (build_one_stub): Look up the function code sym. Check for
10730 invalid plt offsets.
10731 (ppc64_elf_relocate_section): Tweak calls to undefined weak syms.
10732 Convert R_PPC64_TOC relocs to R_PPC64_RELATIVE in shared libs.
10733
10734 * elf-bfd.h (elf_backend_data <elf_backend_hide_symbol>): Add
10735 boolean param.
10736 (_bfd_elf_link_hash_hide_symbol): Likewise.
10737 * elflink.h (elf_link_add_object_symbols): Adjust call to
10738 elf_backend_hide_symbol.
10739 (elf_fix_symbol_flags): Likewise.
10740 (elf_link_assign_sym_version): Likewise. Use bfd_malloc rather
10741 than bfd_alloc.
10742 * elf.c (_bfd_elf_link_hash_hide_symbol): Add "force_local" param.
10743 Set ELF_LINK_FORCED_LOCAL and call _bfd_elf_strtab_delref.
10744 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
10745 (clobber_millicode_symbols): Adjust to suit new hide_symbol.
10746 * elf32-cris.c (elf_cris_hide_symbol): Add "force_local" param
10747 and adjust to suit.
10748 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise, and call
10749 _bfd_elf_link_hash_hide_symbol rather than duplicating code.
10750 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
10751
10752 2002-01-18 Alan Modra <amodra@bigpond.net.au>
10753
10754 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Test for a
10755 dynamic function descriptor symbol, not the associated function
10756 symbol.
10757
10758 2002-01-17 Eric Christopher <echristo@redhat.com>
10759
10760 * elf32-mips.c (mips_elf_calculate_relocation): Fix typo.
10761
10762 2002-01-17 Nick Clifton <nickc@cambridge.redhat.com>
10763
10764 * po/bfd.pot: Regenerate.
10765 * po/fr.po: Regenerate.
10766
10767 2002-01-17 Alan Modra <amodra@bigpond.net.au>
10768
10769 * elf-bfd.h (elf_backend_data <elf_backend_section_from_bfd_section>):
10770 Remove "Elf_Internal_Shdr *" param.
10771 (_bfd_mips_elf_section_from_bfd_section): Ditto.
10772 * elf32-mips.c (_bfd_mips_elf_section_from_bfd_section): Ditto.
10773 * elf32-m32r.c (_bfd_m32r_elf_section_from_bfd_section): Ditto.
10774 * elf32-v850.c (v850_elf_section_from_bfd_section): Ditto.
10775 * elf64-mmix.c (mmix_elf_section_from_bfd_section): Ditto.
10776 * elfxx-ia64.c (elfNN_hpux_backend_section_from_bfd_section): Ditto.
10777 * elf.c (_bfd_elf_section_from_bfd_section): Allow backend
10778 function to override special sections. Remove hdr arg from
10779 backend call, and don't loop.
10780
10781 2002-01-16 Eric Christopher <echristo@redhat.com>
10782
10783 * elf32-mips.c (mips_elf_calculate_relocation): Set require_jalxp
10784 on R_MIPS_26 and target is 16bit. Add R_MIPS16_GPREL to list of
10785 relocations requiring gp0 and gp.
10786
10787 2002-01-16 Richard Earnshaw <rearnsha@arm.com>
10788
10789 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle
10790 EF_ARM_VFP_FLOAT.
10791 (elf32_arm_print_private_bfd_data): Likewise.
10792
10793 2002-01-16 Nick Clifton <nickc@cambridge.redhat.com>
10794
10795 * po/tr.po: Import new version.
10796
10797 2002-01-16 Alan Modra <amodra@bigpond.net.au>
10798
10799 * elf64-ppc.c (ppc64_elf_howto_raw): Remove stale FIXMEs.
10800 (ppc64_elf_reloc_type_lookup): Use proper CTOR reloc.
10801 (ORI_R0_R0_0): Correct.
10802
10803 2002-01-16 Alan Modra <amodra@bigpond.net.au>
10804
10805 * elflink.c (_bfd_elf_create_dynamic_sections): Don't set SEC_CODE
10806 when plt_not_loaded.
10807 * elf64-ppc.c (ppc64_elf_create_dynamic_sections): No need to
10808 clear .plt SEC_CODE here. Create .stub and correct .glink flags.
10809 (PLT_INITIAL_ENTRY_SIZE): Set to 24.
10810 (ppc64_elf_glink_code): Delete.
10811 (PPC64_ELF_GLINK_SIZE): Delete.
10812 (ADDIS_R12_R2, STD_R2_40R1, LD_R11_0R12, LD_R2_0R12, MTCTR_R11,
10813 BCTR, ADDIS_R12_R12_1, LD_R2_40R1, NOP, LI_R0_0, B_DOT, LIS_R0_0,
10814 ORI_R0_R0_0): Define.
10815 (PLT_CALL_STUB_SIZE, GLINK_CALL_STUB_SIZE): Define.
10816 (struct ppc_link_hash_table): Add sstub and plt_overflow.
10817 (ppc64_elf_link_hash_table_create): Init them.
10818 (ppc64_elf_check_relocs <R_PPC64_REL24>): Refcount .plt entry.
10819 Don't copy to shared lib.
10820 (ppc64_elf_check_relocs): Call bfd_set_error on errors.
10821 (ppc64_elf_gc_sweep_hook <R_PPC64_REL24>): Sweep plt refcount.
10822 (allocate_dynrelocs <plt>): Don't change function sym here. Make
10823 room for .stub and .glink code.
10824 (ppc64_elf_size_dynamic_sections): Handle .stub. Make entry for
10825 DT_PPC64_GLINK.
10826 (ppc64_elf_final_link): Rename to ppc64_elf_set_toc. Don't call
10827 bfd_elf64_bfd_final_link.
10828 (bfd_elf64_bfd_final_link): Don't define.
10829 (ppc64_elf_size_stubs): New.
10830 (build_plt_stub): New.
10831 (build_one_stub): New.
10832 (ppc64_elf_build_stubs): New.
10833 (ppc64_elf_relocate_section <toc relocs>): Remove assert.
10834 (ppc64_elf_relocate_section): Don't copy R_PPC64_REL24 relocs.
10835 (ppc64_elf_finish_dynamic_symbol): Don't build stubs here. Set
10836 DT_PPC64_GLINK entry. Tweak DT_PLTGOT, DT_JMPREL, DT_PLTRELSZ in
10837 case output sections not separate. Adjust DT_RELASZ to not
10838 include plt relocs. Set reserved got entry. Set got and plt
10839 entry size.
10840 (elf_backend_got_header_size): Set to 8.
10841 * elf64-ppc.h: New file.
10842
10843 2002-01-16 Alan Modra <amodra@bigpond.net.au>
10844
10845 * elf32-arm.h (elf32_arm_size_dynamic_sections): When removing
10846 sections, use bfd_section_list_remove.
10847 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
10848 * elflink.h (elf_link_add_object_symbols): When removing all
10849 sections, use bfd_section_list_clear.
10850
10851 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
10852
10853 * po/sv.po: New file: Swedish translation.
10854 * configure.in (ALL_LINGUAS): Add sv.
10855 * configure: Regenerate.
10856
10857 2002-01-15 Jakub Jelinek <jakub@redhat.com>
10858
10859 * elflink.h (elf_link_input_bfd): Back out 2002-01-07 change.
10860 * elf.c (merge_sections_remove_hook): New function.
10861 (_bfd_elf_merge_sections): Pass it as 3rd argument to
10862 _bfd_merge_sections.
10863 * libbfd-in.h (_bfd_merge_sections): Add 3rd argument.
10864 * libbfd.h: Rebuilt.
10865 * merge.c (_bfd_merge_sections): Add remove_hook argument.
10866 Call remove_hook if a SEC_EXCLUDE section is encountered.
10867
10868 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
10869
10870 * elf32-xstormy16.c (xstormy16_reloc_map): Add new field 'table'.
10871 (xstormy16_reloc_map): Initialise new field with correct howto
10872 table.
10873 (xstormy16_reloc_type_lookup): Use 'table' field to locate correct
10874 howto entry.
10875
10876 2002-01-10 Michael Snyder <msnyder@redhat.com>
10877
10878 * elf.c (elfcore_write_prstatus): Use long instead of pid_t;
10879 (elfcore_write_pstatus): Use long instead of pid_t;
10880 * elf-bfd.h: Change prototypes to use long instead of pid_t;
10881
10882 2002-01-09 Jason Thorpe <thorpej@wasabisystems.com>
10883
10884 * elf.c: Update copyright years.
10885 (elfcore_grok_netbsd_note): Use NT_NETBSDCORE_PROCINFO
10886 and NT_NETBSDCORE_FIRSTMACH. Improve a comment.
10887
10888 2002-01-08 Michael Snyder <msnyder@redhat.com>
10889
10890 Add capability to write corefile note sections, for gdb.
10891 * elf.c (elfcore_write_note): New function.
10892 (elfcore_write_prpsinfo): New function.
10893 (elfcore_write_prstatus): New function.
10894 (elfcore_write_pstatus): New function.
10895 (elfcore_write_prfpreg): New function.
10896 (elfcore_write_prxfpreg): New function.
10897 * elf-bfd.h: Add prototypes for above functions.
10898
10899 2002-01-08 Alexandre Oliva <aoliva@redhat.com>
10900
10901 * elf.c (elf_fake_sections): Propagate errors from
10902 elf_backend_fake_section.
10903
10904 2002-01-07 Jason Thorpe <thorpej@wasabisystems.com>
10905
10906 * Makefile.am (BFD32_BACKENDS): Add elf32-sh-nbsd.lo.
10907 (BFD32_BACKENDS_CFILES): Add elf32-sh-nbsd.c.
10908 (elf32-sh-nbsd.lo): New rule.
10909 * Makefile.in: Regenerate.
10910 * config.bfd (sh*le-*-netbsdelf*): New target.
10911 (sh*-*-netbsdelf*): New target.
10912 * configure.in: Include netbsd-core.lo for native sh*-*-netbsd*.
10913 (bfd_elf32_shnbsd_vec): New vector.
10914 (bfd_elf32_shlnbsd_vec): New vector.
10915 * configure: Regenerate.
10916 * elf32-sh-nbsd.c: New file.
10917 * targets.c: Update copyright years.
10918 (_bfd_target_vector): Add bfd_elf32_shlnbsd_vec and
10919 bfd_elf32_shnbsd_vec.
10920
10921 2002-01-07 Aldy Hernandez <aldyh@redhat.com>
10922
10923 * coff-rs6000.c (READ20): Use bfd_scan_vma.
10924
10925 2002-01-07 Geoffrey Keating <geoffk@redhat.com>
10926
10927 * elflink.h (elf_link_input_bfd): Don't ask for the merged offset
10928 of a symbol in a section that will be deleted.
10929
10930 2002-01-07 Nick Clifton <nickc@cambridge.redhat.com>
10931
10932 * po/es.po: New file: Spanish translation.
10933 * configure.in (ALL_LINGUAS): Add es.
10934 * configure: Regenerate.
10935
10936 2002-01-06 Steve Ellcey <sje@cup.hp.com>
10937
10938 * elfxx-ia64.c (is_unwind_section_name): Add target vector as
10939 argument so we can handle HP-UX specially.
10940 (elfNN_ia64_hpux_vec): New for use in is_unwind_section_name.
10941 (elfNN_hpux_backend_section_from_bfd_section): New for support
10942 of SHN_IA_64_ANSI_COMMON.
10943 (elfNN_ia64_relax_section): Add support for SHN_IA_64_ANSI_COMMON.
10944 (is_unwind_section_name): Add special HP-UX support.
10945 (elfNN_ia64_section_from_shdr): Add support for more sections.
10946 (elfNN_ia64_fake_sections): Modify is_unwind_section_name call and
10947 add support for more sections.
10948 (elfNN_ia64_additional_program_headers): Modify
10949 is_unwind_section_name call.
10950 (elfNN_ia64_modify_segment_map): Remove assumption that there is
10951 only one unwind section in segment.
10952
10953 2002-01-06 Alan Modra <amodra@bigpond.net.au>
10954
10955 * syms.c (_bfd_generic_make_empty_symbol): New function.
10956 * libbfd-in.h (_bfd_nosymbols_make_empty_symbol): Define as
10957 _bfd_generic_make_empty_symbol.
10958 * libbfd.h: Regenerate.
10959 * bfd-in2.h: Regenerate.
10960 * hppabsd-core.c (hppabsd_core_make_empty_symbol): Delete function.
10961 (hppabsd_core_get_symtab_upper_bound): Don't define.
10962 (hppabsd_core_get_symtab): Likewise.
10963 (hppabsd_core_print_symbol): Likewise.
10964 (hppabsd_core_get_symbol_info): Likewise.
10965 (hppabsd_core_bfd_is_local_label_name): Likewise.
10966 (hppabsd_core_get_lineno): Likewise.
10967 (hppabsd_core_find_nearest_line): Likewise.
10968 (hppabsd_core_bfd_make_debug_symbol): Likewise.
10969 (hppabsd_core_read_minisymbols): Likewise.
10970 (hppabsd_core_minisymbol_to_symbol): Likewise.
10971 (hppabsd_core_vec): Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols).
10972 Formatting fixes.
10973 * hpux-core.c: Similarly.
10974 * irix-core.c: Similarly.
10975 * osf-core.c: Similarly.
10976 * sco5-core.c: Similarly.
10977 * binary.c (binary_make_empty_symbol): Remove function, define as
10978 _bfd_generic_make_empty_symbol.
10979 * ihex.c (ihex_make_empty_symbol): Likewise.
10980 * mmo.c (mmo_make_empty_symbol): Likewise.
10981 * ppcboot.c (ppcboot_make_empty_symbol): Likewise.
10982 * srec.c (srec_make_empty_symbol): Likewise.
10983 * versados.c (versados_make_empty_symbol): Likewise.
10984 * vms.c (_bfd_vms_make_empty_symbol): Remove.
10985 (vms_make_empty_symbol): Define as _bfd_generic_make_empty_symbol.
10986 * vms-gsd.c (_bfd_vms_slurp_gsd): Call bfd_make_empty_symbol
10987 rather than _bfd_vms_make_empty_symbol.
10988 * vms-misc.c (new_symbol): Likewise.
10989
10990 2002-01-05 Alan Modra <amodra@bigpond.net.au>
10991
10992 * section.c (bfd_section_init): Remove unnecessary initialisations.
10993 (bfd_section_list_clear): New function.
10994 (bfd_section_list_remove, bfd_section_list_insert): New macros.
10995 (_bfd_strip_section_from_output): Use them.
10996 * coffcode.h (coff_set_alignment_hook): Likewise.
10997 * elf32-mips.c (_bfd_mips_elf_final_link): Likewise.
10998 * elf64-mips.c (mips_elf64_final_link): Likewise.
10999 * elf64-mmix.c (mmix_elf_final_link): Likewise.
11000 * sunos.c (sunos_add_dynamic_symbols): Likewise.
11001 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
11002 * bfd-in2.h: Regenerate.
11003
11004 * netbsd-core.c (netbsd_core_file_p): Use bfd_make_section_anyway
11005 rather than doing our own section handling. Clean up after errors
11006 with bfd_release and bfd_section_list_clear. Handle unexpected
11007 flags.
11008 * aoutf1.h (sunos4_core_file_p): Likewise.
11009 * aix386-core.c (aix386_core_file_p): Likewise.
11010 * cisco-core.c (cisco_core_file_validate): Likewise.
11011 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
11012 * trad-core.c (trad_unix_core_file_p): Likewise.
11013
11014 * hppabsd-core.c (hppabsd_core_core_file_p): Clean up after errors
11015 with bfd_release and bfd_section_list_clear.
11016 * hpux-core.c (hpux_core_core_file_p): Likewise.
11017 * irix-core.c (irix_core_core_file_p): Likewise.
11018 * lynx-core.c (lynx_core_file_p): Likewise.
11019 * osf-core.c (osf_core_core_file_p): Likewise.
11020 * rs6000-core.c (rs6000coff_core_p): Likewise.
11021 * sco5-core.c (sco5_core_file_p): Likewise.
11022
11023 * elf32-mips.c (_bfd_mips_elf_lo16_reloc): Simplify, and perform
11024 sign extension adjustments without conditionals.
11025
11026 2002-01-04 Jakub Jelinek <jakub@redhat.com>
11027
11028 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Don't crash if
11029 CIE at .eh_frame start is removed due to no FDEs referencing it.
11030
11031 2002-01-04 Jason Thorpe <thorpej@wasabisystems.com>
11032
11033 * config.bfd (x86_64-*-netbsd*): New target.
11034 * configure.in (x86_64-*-netbsd*): Set COREFILE
11035 to netbsd-core.lo.
11036 * configure: Regenerated.
11037
11038 2002-01-03 Tom Rix <trix@redhat.com>
11039
11040 * xcofflink.c (_bfd_xcoff_bfd_final_link): Update .pad section ordering
11041 for recent bfd_make_section_anyway change.
11042
11043 2002-01-03 Nick Clifton <nickc@cambridge.redhat.com>
11044
11045 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
11046 R_ARM_THM_PC11 reloc.
11047
11048 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
11049
11050 * configure.in (LINGUAS): Add ja.
11051 * configure: Regenerate.
11052 * po/ja.po: Import from translation project's web site.
11053
11054 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
11055
11056 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Reformat error
11057 messages to ease translation into other languages.
11058
11059 For older changes see ChangeLog-0001
11060 \f
11061 Local Variables:
11062 mode: change-log
11063 left-margin: 8
11064 fill-column: 74
11065 version-control: never
11066 End:
This page took 0.24558 seconds and 5 git commands to generate.