* elf.c (elfcore_grok_netbsd_procinfo): Make a pseudosection out
[binutils-gdb.git] / bfd / ChangeLog
1 2003-11-27 Mark Kettenis <kettenis@gnu.org>
2
3 * elf.c (elfcore_grok_netbsd_procinfo): Make a pseudosection out
4 of the note.
5
6 2003-11-26 Daniel Jacobowitz <drow@mvista.com>
7 Richard Sandiford <rsandifo@redhat.com>
8
9 * elfxx-mips.c (mips_elf_set_global_got_offset): Don't set no_fn_stub.
10 (mips_elf_set_no_stub): New function.
11 (mips_elf_multi_got): Call it.
12 (_bfd_mips_elf_finish_dynamic_symbol): If a relocation is needed for
13 a secondary GOT entry, create an R_MIPS_32 or R_MIPS_64 relocation and
14 use mips_elf_create_dynamic_relocation to deal with any compatibility
15 issues. Store the adjusted addend in the GOT slot.
16
17 2003-11-25 Mattias EngdegÄrd <mattias@virtutech.se>
18
19 * stabs.c (_bfd_link_section_stabs): Skip N_EXCL stabs when
20 procesing N_BINCL stabs.
21
22 2003-11-25 Alan Modra <amodra@bigpond.net.au>
23
24 * elf64-ppc.c (ppc_type_of_stub): Disallow stubs other than
25 ppc_stub_plt_call to symbols defined in shared libs.
26
27 2003-11-22 Jakub Jelinek <jakub@redhat.com>
28
29 * elf-bfd.h (ELF_LINK_POINTER_EQUALITY_NEEDED): Define new flag.
30 * elf.c (_bfd_elf_link_hash_copy_indirect): Copy it.
31 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
32 (elf_i386_check_relocs): Set it.
33 (elf_i386_finish_dynamic_symbol): If it is not set,
34 clear st_value of SHN_UNDEF symbol.
35
36 2003-11-20 Jim Blandy <jimb@redhat.com>
37
38 * cpu-powerpc.c (powerpc_compatible): Any ISA in the PowerPC
39 family is a superset of <bfd_arch_rs6000,bfd_mach_rs6k>.
40
41 2003-11-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
42
43 * elf32-s390.c (elf_s390_relocate_section): Don't recalculate symbol
44 section for reloc output and subtract the output section's address
45 from the addend when converting a relocation into one against a
46 section symbol.
47 * elf64-s390.c (elf_s390_relocate_section): Likewise.
48
49 2003-11-18 James E Wilson <wilson@specifixinc.com>
50
51 * elfxx-ia64.c (get_fptr): For fptr_rel, use dynobj not abfd.
52 (elfNN_ia64_size_dynamic_sections): When stripping sections, check
53 for ia64_info->rel_fptr_sec.
54
55 2003-11-18 Alan Modra <amodra@bigpond.net.au>
56
57 * elf64-ppc.c (toc_adjusting_stub_needed): Exit early if section
58 size is zero.
59
60 2003-11-17 Daniel Jacobowitz <drow@mvista.com>
61
62 * elf.c (_bfd_elf_link_hash_copy_indirect): Copy
63 ELF_LINK_HASH_NEEDS_PLT. Fix formatting.
64 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
65 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
66 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Likewise.
67 * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
68 * elf32-sh.c (sh_elf_copy_indirect_symbol): Likewise.
69 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
70 * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
71 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
72 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
73 * elf32-xtensa.c (elf_xtensa_copy_indirect_symbol): Remove.
74 (elf_backend_copy_indirect_symbol): Don't define.
75
76 2003-11-14 Daniel Jacobowitz <drow@mvista.com>
77
78 * elfxx-mips.c (mips_elf_merge_gots): Weaken assert for local
79 GOT entries.
80
81 2003-11-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
82
83 * elf32-s390.c (elf_s390_relocate_section): Only convert R_390_32
84 to R_390_RELATIVE. Convert the other relocations against local
85 symbols to relocations against the start of the section.
86 * elf64-s390.c (elf_s390_relocate_section): Only convert R_390_64
87 to R_390_RELATIVE. Convert the other relocations against local
88 symbols to relocations against the start of the section.
89
90 2003-11-11 Nick Clifton <nickc@redhat.com>
91
92 * elf-m10300.c (bfd_mn10300_elf_size_dynamic_sections): Use
93 info->executable not info->shared to decide if a .interp section
94 should be present.
95 * elf32-arm.h (elf32_arm_size_dynamic_sections): Likewise.
96 * elf32-cris.c (elf_cris_size_dynamic_sections): Likewise.
97 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
98 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
99 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
100 * elf32-vax.c (elf_vax_size_dynamic_sections): Likewise.
101 * elf32-xtensa.c (elf_xtensa_size_dynamic_sections): Likewise.
102 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
103 * elfxx-mips.c (_bfd_mips_size_dynamic_sections): Likewise.
104 * elflink.h (size_dynamic_sections): Likewise.
105
106 2003-11-10 Jonathan Wilson <jonwil@tpgi.com.au>
107
108 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Swap out tls pointer.
109 (_bfd_XXi_final_link_postscript): Look for __tks_used symbol. If
110 found initialise the tls data directory entry.
111
112 2003-11-07 Alan Modra <amodra@bigpond.net.au>
113
114 * elf32-ppc.c (ppc_elf_install_value): Delete.
115 (shared_stub_entry, stub_entry): Make them arrays of ints.
116 Remove initial branch.
117 (ppc_elf_relax_section): Write one branch around all trampolines
118 instead. Correct bogus R_PPC_PLTREL24 handling. Correct
119 branch range check. Only use shared_stub_entry when shared.
120 Test that branches can reach stubs. Write trampolines out at
121 end so that just one realloc is used. Handle little-endian
122 mode. Move relevant code from ppc_elf_install_value to here.
123 (ppc_elf_relocate_section): Move code handling RELAX32 from
124 ppc_elf_install_value to here.
125
126 2003-11-06 Alan Modra <amodra@bigpond.net.au>
127
128 * elf32-ppc.c (ppc_elf_howto_raw); Add entry for R_PPC_RELAX32PC.
129 (ppc_elf_install_value): Handle R_PPC_RELAX32PC. Merge duplicate
130 cases.
131 (shared_stub_entry): Correct opcode.
132 (ppc_elf_relax_section): Generate R_PPC_RELAX32PC relocs.
133 (ppc_elf_relocate_section): Handle them.
134
135 2003-11-05 Alan Modra <amodra@bigpond.net.au>
136
137 * elf.c (_bfd_elf_rela_local_sym): Accept asection **, and return
138 updated section in case of merged section.
139 * elf-bfd.h (_bfd_elf_rela_local_sym): Update declaration.
140 * elf-hppa.h (elf_hppa_relocate_section): Adjust call.
141 * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
142 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
143 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
144 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
145 * elf32-cris.c (cris_elf_relocate_section): Likewise.
146 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
147 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
148 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
149 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
150 * elf32-i370.c (i370_elf_relocate_section): Likewise.
151 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
152 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
153 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
154 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
155 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
156 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
157 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
158 * elf32-s390.c (elf_s390_relocate_section): Likewise.
159 * elf32-sh.c (sh_elf_relocate_section): Likewise.
160 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
161 * elf32-v850.c (v850_elf_relocate_section) Likewise.
162 * elf32-vax.c (elf_vax_relocate_section): Likewise.
163 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
164 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
165 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
166 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
167 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
168 * elf64-s390.c (elf_s390_relocate_section): Likewise.
169 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
170 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
171 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
172 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
173
174 * elf32-cris.c (cris_elf_relocate_section): Don't recalculate symbol
175 section for reloc output.
176 * elf32-i370.c (i370_elf_relocate_section): Likewise.
177 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
178 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
179 * elf32-vax.c (elf_vax_relocate_section): Likewise.
180 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
181 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
182
183 * elf32-ppc.c (ppc_elf_relocate_section): Don't recalculate everything
184 for R_PPC_RELAX32 reloc. Don't bother checking ppc_elf_install_value
185 return value.
186 * elf64-ppc.c (ppc64_elf_relocate_section <R_PPC64_TOC>): Sanity check
187 sec->id.
188
189 2003-11-05 Alan Modra <amodra@bigpond.net.au>
190
191 * elf32-d10v.c (extract_rel_addend, insert_rel_addend): New functions.
192 (elf32_d10v_relocate_section): Use them to handle -r reloc
193 adjustments, and in place of _bfd_elf_rela_local_sym.
194
195 * cpu-iq2000.c (arch_info_struct): Warning fix.
196
197 2003-11-05 Alan Modra <amodra@bigpond.net.au>
198
199 * elf32-hppa.c (ELIMINATE_COPY_RELOCS): Define.
200 (elf32_hppa_copy_indirect_symbol): Don't copy NON_GOT_REF on
201 weakdefs.
202 (elf32_hppa_check_relocs): Use ELIMINATE_COPY_RELOCS.
203 (elf32_hppa_adjust_dynamic_symbol): Likewise. Copy weakdef
204 NON_GOT_REF.
205 (allocate_dynrelocs): Use ELIMINATE_COPY_RELOCS and
206 SYMBOL_CALLS_LOCAL. Discard relocs for undef weak syms with
207 non-default visibility.
208 (elf32_hppa_relocate_section): Use ELIMINATE_COPY_RELOCS and
209 SYMBOL_CALLS_LOCAL.
210
211 2003-11-04 Alan Modra <amodra@bigpond.net.au>
212
213 * aout-target.h, aoutf1.h, bfdio.c, bfdwin.c: Update copyright date.
214 * coff-apollo.c, coff-sparc.c, coff-w65.c, coff-we32k.c: Ditto.
215 * coff-z8k.c, coffgen.c, cpu-frv.c, cpu-h8500.c, cpu-hppa.c: Ditto.
216 * cpu-ia64-opc.c, cpu-m10300.c, cpu-mips.c, cpu-msp430.c: Ditto.
217 * cpu-rs6000.c, cpu-z8k.c, efi-app-ia32.c, elf32-am33lin.c: Ditto.
218 * gen-aout.c, hash.c, hp300hpux.c, init.c, mach-o.c: Ditto.
219 * nlm-target.h, nlm.c, som.h, stabs.c, sysdep.h, xsym.h: Ditto.
220
221 * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Fix
222 "dereferencing type-punned pointer" warnings.
223
224 * aout-adobe.c (aout_adobe_set_section_contents): Constify location.
225 * aoutx.h (NAME(aout,set_section_contents)): Ditto.
226 * bfd-in2.h: Regenerate.
227 * binary.c (binary_set_section_contents): Ditto.
228 * bout.c (b_out_set_section_contents): Ditto.
229 * coff-tic54x.c (tic54x_set_section_contents): Ditto.
230 * coffcode.h (coff_set_section_contents): Ditto.
231 * ecoff.c (_bfd_ecoff_set_section_contents): Ditto.
232 * elf-bfd.h (_bfd_elf_set_section_contents): Ditto.
233 * elf.c (_bfd_elf_set_section_contents): Ditto.
234 * elfxx-mips.c (_bfd_mips_elf_set_section_contents): Ditto.
235 * elfxx-mips.h (_bfd_mips_elf_set_section_contents): Ditto.
236 * i386msdos.c (msdos_set_section_contents): Ditto.
237 * ieee.c (ieee_set_section_contents): Ditto.
238 * ihex.c (ihex_set_section_contents): Ditto.
239 * libaout.h (NAME(aout,set_section_contents)): Ditto.
240 * libbfd-in.h (_bfd_nowrite_set_section_contents): Ditto.
241 (_bfd_generic_set_section_contents): Ditto.
242 * libbfd.h: Regenerate.
243 * libbfd.c (_bfd_generic_set_section_contents): Ditto.
244 * libecoff.h (_bfd_ecoff_set_section_contents): Ditto.
245 * libnlm.h (nlmNAME(set_section_contents)): Ditto.
246 (struct nlm_backend_data <nlm_mangle_relocs>): Ditto.
247 * mmo.c (mmo_set_section_contents): Ditto.
248 * nlm32-alpha.c (nlm_alpha_mangle_relocs): Ditto.
249 * nlm32-i386.c (nlm_i386_mangle_relocs): Ditto.
250 * nlm32-ppc.c (nlm_powerpc_mangle_relocs): Ditto.
251 * nlm32-sparc.c (nlm_sparc_mangle_relocs): Ditto.
252 * nlmcode.h (nlm_set_section_contents): Ditto.
253 * oasys.c (oasys_set_section_contents): Ditto.
254 * pdp11.c (NAME(aout,set_section_contents)): Ditto.
255 * ppcboot.c (ppcboot_set_section_contents): Ditto.
256 * srec.c (srec_set_section_contents): Ditto.
257 * targets.c (BFD_JUMP_TABLE_WRITE <_bfd_set_section_contents>): Ditto.
258 * tekhex.c (tekhex_set_section_contents): Ditto.
259 (move_section_contents): Ditto.
260 * versados.c (versados_set_section_contents): Ditto.
261 * vms-misc.c (_bfd_save_vms_section): Ditto.
262 * vms.c (vms_set_section_contents): Ditto.
263 * vms.h (_bfd_save_vms_section): Ditto.
264
265 2003-11-04 Alan Modra <amodra@bigpond.net.au>
266
267 * elf64-ppc.c (ppc_size_one_stub): Size relbrlt. Accept info arg
268 rather than htab.
269 (ppc64_elf_size_stubs): Adjust ppc_size_one_stub traversal. Zero
270 relbrlt size.
271 (ppc64_elf_build_stubs): Allocate space for relbrlt.
272
273 2003-11-04 Alan Modra <amodra@bigpond.net.au>
274
275 * bfd-in.h (_bfd_elf_tls_setup): Declare.
276 * bfd-in2.h: Regenerate.
277 * elf-bfd.h (struct elf_link_tls_segment): Delete.
278 (struct elf_link_hash_table): Add tls_sec and tls_size.
279 * elf.c (_bfd_elf_link_hash_table_init): Init tls_sec and tls_size.
280 * elflink.c (_bfd_elf_tls_setup): New function.
281 * elflink.h (struct elf_final_link_info): Remove first_tls_sec.
282 (elf_bfd_final_link): Don't set first_tls_sec here. Update code
283 saving tls segment info, round segment size up.
284 (elf_link_output_extsym): Adjust code using tls segment info.
285 (elf_link_input_bfd): Likewise.
286 * elf32-i386.c (dtpoff_base, tpoff): Likewise.
287 * elf32-s390.c (dtpoff_base, tpoff): Likewise.
288 * elf32-sh.c (dtpoff_base, tpoff): Likewise.
289 * elf32-sparc.c (dtpoff_base, tpoff): Likewise.
290 * elf64-s390.c (dtpoff_base, tpoff): Likewise.
291 * elf64-x86-64.c (dtpoff_base, tpoff): Likewise.
292 * elfxx-ia64.c (elfNN_ia64_tprel_base): Likewise.
293 (elfNN_ia64_dtprel_base): Likewise.
294 * elf64-alpha.c (alpha_get_dtprel_base): Likewise.
295 (alpha_get_tprel_base): Likewise.
296 (struct alpha_relax_info): Remove tls_segment.
297 (elf64_alpha_relax_got_load): Adjust invocation of
298 alpha_get_dtprel_base and alpha_get_tprel_base.
299 (elf64_alpha_relax_tls_get_addr): Likewise.
300 (elf64_alpha_relax_section): Likewise.
301 (elf64_alpha_relocate_section): Likewise.
302 (elf64_alpha_relax_find_tls_segment): Delete.
303 * elf32-ppc.c (struct ppc_elf_link_hash_table): Remove tls_sec.
304 (ppc_elf_tls_setup): Call _bfd_elf_tls_setup. Return section.
305 (ppc_elf_relocate_section): Adjust to use elf.tls_sec.
306 * elf32-ppc.h (ppc_elf_tls_setup): Update.
307 * elf64-ppc.c (struct ppc_link_hash_table): Remove tls_sec.
308 (ppc64_elf_tls_setup): Call _bfd_elf_tls_setup. Return section.
309 (ppc64_elf_tls_optimize): Adjust to use elf.tls_sec.
310 (ppc64_elf_relocate_section): Likewise.
311 * elf64-ppc.h (ppc64_elf_tls_setup): Update.
312
313 2003-11-03 Daniel Jacobowitz <drow@mvista.com>
314
315 * elf-bfd.h (struct elf_backend_data): Remove plt_header_size.
316 * elf-m10300.c (elf_backend_plt_header_size): Don't define.
317 * elf32-arm.h (elf_backend_plt_header_size): Don't define.
318 * elf32-cris.c (elf_backend_plt_header_size): Don't define.
319 * elf32-i386.c (elf_backend_plt_header_size): Don't define.
320 * elf32-mips.c (elf_backend_plt_header_size): Don't define.
321 * elf32-ppc.c (elf_backend_plt_header_size): Don't define.
322 * elf32-s390.c (elf_backend_plt_header_size): Don't define.
323 * elf32-sh.c (elf_backend_plt_header_size): Don't define.
324 * elf32-sparc.c (elf_backend_plt_header_size): Don't define.
325 * elf64-alpha.c (elf_backend_plt_header_size): Don't define.
326 * elf64-hppa.c (elf_backend_plt_header_size): Don't define.
327 * elf64-mips.c (elf_backend_plt_header_size): Don't define.
328 * elf64-ppc.c (elf_backend_plt_header_size): Don't define.
329 * elf64-s390.c (elf_backend_plt_header_size): Don't define.
330 * elf64-sh64.c (elf_backend_plt_header_size): Don't define.
331 * elf64-sparc.c (elf_backend_plt_header_size): Don't define.
332 * elf64-x86-64.c (elf_backend_plt_header_size): Don't define.
333 * elfn32-mips.c (elf_backend_plt_header_size): Don't define.
334 * elfxx-ia64.c (elf_backend_plt_header_size): Don't define.
335 * elfxx-target.h (elf_backend_plt_header_size): Don't define
336 or include in target initializer.
337
338 2003-11-03 Andrew Cagney <cagney@redhat.com>
339
340 * section.c (bfd_set_section_contents): Make the "location" buffer
341 constant.
342 * bfd-in2.h: Re-generate.
343
344 2003-10-30 Andrew Cagney <cagney@redhat.com>
345
346 * syms.c: Replace "struct symbol_cache_entry" with "struct
347 bfd_symbol".
348 * vms.h, targets.c, section.c, reloc.c, peicode.h: Ditto.
349 * mipsbsd.c, elf.c, linker.c, elf-bfd.h, ecoff.c: Ditto.
350 * cpu-z8k.c, cpu-ns32k.c, cpu-h8500.c, bfd.c, bfd-in.h: Ditto.
351 * bfd-in2.h: Re-generate.
352
353 2003-10-30 Jakub Jelinek <jakub@redhat.com>
354
355 * elfxx-ia64.c: Include objalloc.h, hashtab.h.
356 (struct elfNN_ia64_local_hash_entry): Remove root. Add id and r_sym
357 fields.
358 (struct elfNN_ia64_local_hash_table): Remove.
359 (struct elfNN_ia64_link_hash_table): Change loc_hash_table's type
360 to htab_t. Add loc_hash_memory field.
361 (elfNN_ia64_local_hash_table_init, elfNN_ia64_new_loc_hash_entry):
362 Removed.
363 (elfNN_ia64_local_htab_hash, elfNN_ia64_local_htab_eq): New
364 functions.
365 (elfNN_ia64_hash_table_create): Use hashtab.h hashtable for
366 loc_hash_table. Initialize loc_hash_memory.
367 (elfNN_ia64_hash_table_free): New function.
368 (elfNN_ia64_local_hash_lookup): Remove.
369 (elfNN_ia64_local_dyn_sym_thunk): Change into htab_traverse
370 callback.
371 (elfNN_ia64_dyn_sym_traverse): Use htab_traverse.
372 (get_local_sym_hash): Use hashtab.h hashtable for loc_hash_table.
373 (bfd_elfNN_bfd_link_hash_table_free): Define.
374
375 2003-10-30 Alan Modra <amodra@bigpond.net.au>
376
377 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Modify versioned
378 symbol string in place.
379
380 2003-10-30 Jim Blandy <jimb@redhat.com>
381
382 * cpu-rs6000.c (rs6000_compatible): Check the correct arch_info
383 object's mach field: all PowerPC machines are supersets of the
384 original rs6000, but not later rs6000 machines.
385
386 2003-10-30 Alan Modra <amodra@bigpond.net.au>
387
388 * dwarf2.c (struct attribute): Delete "unsnd", "snd" and "addr".
389 Add "val" and "sval" fields.
390 (DW_STRING, DW_UNSND, DW_BLOCK, DW_SND, DW_ADDR): Delete.
391 (read_attribute_value): Expand and adjust DW_* occurrences.
392 (scan_unit_for_functions, parse_comp_unit): Likewise.
393
394 2003-10-30 Phil Edwards <phil@codesourcery.com>
395
396 * config.bfd (arm-*-vxworks): Remove separate stanza; merge with
397 other common ELF triples.
398 (i[3-7]86-*-vxworks): Change to ELF format.
399 (mips*-*-windiss): New triple, add to common MIPS/ELF stanza.
400 (sh-*-vxworks): New stanza.
401
402 2003-10-30 Lars Knoll <lars@trolltech.com>
403 Michael Matz <matz@suse.de>
404 Jakub Jelinek <jakub@redhat.com>
405 Alan Modra <amodra@bigpond.net.au>
406
407 * merge.c (struct sec_merge_sec_info): Update comment.
408 (struct sec_merge_hash_entry): Remove entsize.
409 (sec_merge_hash_lookup): Only adjust alignment when creating.
410 (sec_merge_emit): Remove register keyword.
411 (cmplengthentry, last4_eq, last_eq): Delete.
412 (strrevcmp, strrevcmp_align, is_suffix): New.
413 (merge_strings): Use them to implement fast suffix merging.
414 * elf-strtab.c (struct elf_strtab_hash_entry): Update comments.
415 Make "len" signed.
416 (_bfd_elf_strtab_add): Lose on >2G strings.
417 (_bfd_elf_strtab_emit): Don't emit strings with len < 0.
418 (cmplengthentry, last4_eq): Delete.
419 (strrevcmp, is_suffix): New.
420 (_bfd_elf_strtab_finalize): Rework to implement fast suffix merging.
421
422 2003-10-29 Daniel Jacobowitz <drow@mvista.com>
423
424 * elf32-arm.h (elf32_arm_final_link_relocate): Move check for
425 SEC_ALLOC.
426
427 2003-10-29 Philip Blundell <philb@gnu.org>
428
429 * elf32-arm.h (elf32_arm_plt0_entry, elf32_arm_plt_entry): New
430 code sequence.
431 (PLT_HEADER_SIZE): New.
432 (struct elf32_arm_pcrel_relocs_copied): Rename to ...
433 (struct elf32_arm_relocs_copied): ... this. Count both
434 pcrel and non-pcrel relocs. All uses updated.
435 (struct elf32_arm_link_hash_table): Add pointers to dynamic linker
436 sections and symbol/section mapping cache.
437 (create_got_section): New.
438 (elf32_arm_create_dynamic_sections): New.
439 (elf_backend_create_dynamic_sections): Use it.
440 (elf32_arm_final_link_relocate): Support garbage collection of relocs.
441 (elf32_arm_check_relocs): Likewise.
442 (elf32_arm_adjust_dynamic_symbol): Likewise.
443 (elf32_arm_copy_indirect_symbol): New.
444 (elf32_arm_link_hash_table_create): Initialise new fields.
445 (elf32_arm_gc_sweep_hook): Implement.
446 (elf32_arm_discard_copies): Delete.
447 (elf32_arm_finish_dynamic_symbol): Use new PLT code.
448 (elf32_arm_finish_dynamic_sections): Likewise.
449 (elf_backend_can_refcount): Define.
450 (elf_backend_copy_indirect_symbol): Likewise.
451 (elf_backend_plt_header_size): Set to PLT_HEADER_SIZE.
452
453 2003-10-29 Alan Modra <amodra@bigpond.net.au>
454
455 * elf64-ppc.c (elf_backend_grok_prstatus): Define.
456 (elf_backend_grok_psinfo): Define.
457 (ppc64_elf_grok_prstatus, ppc64_elf_grok_psinfo): New functions.
458
459 * elf.c (_bfd_elfcore_make_pseudosection): Allow multiple
460 sections with the same name.
461 (elfcore_grok_lwpstatus): Likewise.
462 (elfcore_grok_win32pstatus): Likewise.
463 (elfcore_grok_note): Likewise.
464 (elfcore_grok_nto_status): Likewise.
465 (elfcore_grok_nto_gregs): Likewise.
466
467 2003-10-27 Daniel Jacobowitz <drow@mvista.com>
468
469 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Never skip dynamic
470 objects.
471
472 2003-10-14 Richard Sandiford <rsandifo@redhat.com>
473
474 * elfxx-mips.c (mips_elf_create_got_section): Initialize global_gotno.
475
476 2003-10-24 H.J. Lu <hongjiu.lu@intel.com>
477
478 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Look up
479 hash table for real symbols.
480
481 2003-10-23 Michael Snyder <msnyder@redhat.com>
482
483 * section.c (asection): Fix typo in comment.
484
485 2003-10-23 Alan Modra <amodra@bigpond.net.au>
486
487 * elf64-ppc.c (get_tls_mask): Add toc_symndx param, save toc
488 reloc symbol index to it. Don't allow gd syms in shared libs
489 to be optimized.
490 (ppc64_elf_tls_optimize): Adjust get_tls_mask call.
491 (ppc64_elf_size_stubs): Likewise.
492 (ppc64_elf_relocate_section): Check that tls relocs are only used
493 with tls syms, and similarly for non-tls. Correct symbol used
494 when optimizing toc tls code.
495
496 2003-10-22 Nick Clifton <nickc@redhat.com>
497
498 * peicode.h (coff_swap_scnhdr_in): Only remove padding when
499 processing an executable.
500
501 2003-10-22 Jakub Jelinek <jakub@redhat.com>
502
503 * elflink.c (_bfd_elf_export_symbol): Adjust for globals and locals
504 field changes.
505 (_bfd_elf_link_assign_sym_version): Likewise.
506 * elflink.h (size_dynamic_sections): Likewise.
507
508 2003-10-21 Alexandre Oliva <aoliva@redhat.com>,
509 Michael Snyder <msnyder@redhat.com>
510
511 * archures.c (bfd_mach_sh4a, bfd_mach_sh4al_dsp, bfd_mach_sh4_nofpu,
512 bfd_mach_sh4a_nofpu): New machine types.
513 * bfd-in2.h: Rebuilt.
514 * cpu-sh.c (compatible): Remove unused function.
515 (SH4A_NEXT, SH4AL_DSP_NEXT, SH4_NOFPU_NEXT, SH4A_NOFPU_NEXT): New.
516 (arch_info_struct): Add sh4a, sh4al_dsp, sh4-nofpu and sh4a-nofpu.
517 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle them.
518
519 2003-10-21 Wouter van Heyst <wouter@vidicode.nl>
520
521 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Correct text
522 describing mismatched formats involving the Maverick FP type.
523
524 2003-10-21 Anil Paranjpe <anilp1@KPITCummins.com>
525
526 * binary.c (binary_object_p): Pass machine flag along with
527 architecture.
528
529 2003-10-21 Thorsten Brehm <brehm@gmx.net>
530
531 * archures.c (bfd_default_scan): Add support for mcf528x.
532 * ieee.c (ieee_write_processor): Likewise.
533
534 2003-10-21 Peter Barada <pbarada@mail.wm.sps.mot.com>
535 Bernardo Innocenti <bernie@develer.com>
536
537 * archures.c: Add MCF528x (MCFv4) support.
538 * bfd/cpu-m68k.c (arch_info_struct): Likewise.
539 * bfd-in2.h: Regenerate.
540
541 2003-10-20 Andrew Cagney <cagney@redhat.com>
542
543 * targets.c: Replace "struct sec" with "struct bfd_section"
544 * syms.c, sparclynx.c, section.c, opncls.c: Ditto.
545 * libcoff-in.h, libbfd-in.h, elfxx-target.h: Ditto.
546 * elf.c, coffgen.c, bfd.c, bfd-in.h, aoutf1.h: Ditto.
547 * aout-tic30.c, aout-target.h:
548 * bfd-in2.h, libcoff.h, libbfd.h: Regenerate.
549
550 2003-10-18 Hans-Peter Nilsson <hp@bitrange.com>
551
552 Support linker relaxation of new R_MMIX_PUSHJ_STUBBABLE relocs.
553 * elf64-mmix.c (MAX_PUSHJ_STUB_SIZE): New macro.
554 (struct _mmix_elf_section_data): New member pjs.
555 (mmix_set_relaxable_size, mmix_elf_get_section_contents): New
556 functions.
557 (elf_mmix_howto_table): New entry for R_MMIX_PUSHJ_STUBBABLE.
558 (mmix_reloc_map): Ditto.
559 (mmix_elf_relocate_section): Handle R_MMIX_PUSHJ_STUBBABLE.
560 (mmix_final_link_relocate, mmix_elf_check_common_relocs): Ditto.
561 (mmix_elf_perform_relocation): Ditto. Don't mark parameter addr
562 unused.
563 (mmix_elf_check_relocs): Move early return to after
564 mmix_elf_check_common_relocs call.
565 (mmix_elf_symbol_processing): Fix cut-and-pasto in head comment.
566 (_bfd_mmix_before_linker_allocation): Rename from
567 _bfd_mmix_prepare_linker_allocated_gregs. All referers changed.
568 Arrange to set the initial relaxable size of sections.
569 (_bfd_mmix_after_linker_allocation): Rename from
570 _bfd_mmix_finalize_linker_allocated_gregs.
571 (mmix_elf_relax_section): Relax a R_MMIX_PUSHJ_STUBBABLE reloc.
572 (bfd_elf64_get_section_contents): Define.
573 * reloc.c: Add ENUMX for BFD_RELOC_MMIX_PUSHJ_STUBBABLE.
574 * libbfd.h, bfd-in2.h: Regenerate.
575
576 * reloc.c (bfd_generic_relax_section): Default-set
577 section->_cooked_size here.
578 (bfd_generic_get_relocated_section_contents): Don't set it here.
579 Explain why.
580
581 2003-10-17 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
582
583 * elf32-hppa.c (elf32_hppa_relocate_section): Skip relocation if
584 output section has been discarded.
585
586 2003-10-17 Shrinivas Atre <shrinivasa@KPITCummins.com>
587
588 * coff-h8300.c (funcvec_hash_newfunc): Handle normal mode.
589 (h8300_reloc16_extra_cases): Likewise.
590 (h8300_bfd_link_add_symbols): Likewise.
591
592 2003-10-17 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
593
594 * cpu-h8300.c (h8300sxn_info_struct): Correct address size.
595 (h8300sn_info_struct): Likewise.
596 (h8300hn_info_struct): Likewise.
597
598 2003-10-16 Pavel Roskin <proski@gnu.org>
599
600 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Don't calculate image size
601 for sections which lack size info.
602
603 2003-10-17 Danny Smith <dannysmith@users.sourceforge.net>
604
605 * configure.host: Add __USE_MINGW_FSEEK to HDEFINES for
606 mingw32.
607
608 2003-10-16 H.J. Lu <hongjiu.lu@intel.com>
609
610 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Also warn
611 undefined patterns with '*'.
612
613 2003-10-16 H.J. Lu <hongjiu.lu@intel.com>
614
615 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't
616 use the last CIE from a different section.
617 (_bfd_elf_write_section_eh_frame): Don't pad beyond the raw
618 size of the output section.
619
620 2003-10-07 Roland McGrath <roland@redhat.com>
621
622 * elf.c (_bfd_elf_make_section_from_phdr): Set alignment_power of
623 new section from p_align header field.
624
625 2003-10-16 H.J. Lu <hongjiu.lu@intel.com>
626
627 * elf32-xtensa.c (xtensa_read_table_entries): The external size
628 of entry is 8 bytes.
629
630 2003-10-15 Andrew Cagney <cagney@redhat.com>
631
632 * targets.c (BFD_JUMP_TABLE_SYMBOLS): Replace NAME##_get_symtab
633 with NAME##_canonicalize_symtab.
634 * libcoff-in.h (coff_canonicalize_symtab): Update.
635 * xsym.h (bfd_sym_canonicalize_symtab): Update.
636 * elf-bfd.h (_bfd_elf_canonicalize_symtab): Update.
637 * coffgen.c (coff_canonicalize_symtab): Update.
638 * libbfd-in.h (_bfd_nosymbols_canonicalize_symtab): Update.
639 * libnlm.h (nlmNAME(canonicalize_symtab)): Update.
640 * ieee.c (ieee_vec): Update comment.
641 * libecoff.h (_bfd_ecoff_canonicalize_symtab): Update.
642 * mmo.c (mmo_canonicalize_symtab): Update.
643 * nlm-target.h (nlm_canonicalize_symtab): Update.
644 * nlmcode.h (nlm_canonicalize_symtab): Update.
645 * i386msdos.c (msdos_canonicalize_symtab): Update.
646 * hp300hpux.c (MY (canonicalize_symtab)): Update.
647 * oasys.c (oasys_canonicalize_symtab): Update.
648 * som.c (som_canonicalize_symtab): Update.
649 * pef.c (bfd_pef_canonicalize_symtab): Update.
650 * nlmcode.h (nlm_canonicalize_symtab): Update.
651 * xsym.c (bfd_sym_canonicalize_symtab): Update.
652 * vms.c (vms_canonicalize_symtab): Update.
653 * versados.c (versados_canonicalize_symtab): Update.
654 * mach-o.c (bfd_mach_o_canonicalize_symtab): Update.
655 * ieee.c (ieee_canonicalize_symtab): Update.
656 * pdp11.c (NAME(aout,canonicalize_symtab)): Update.
657 * reloc.c: Update comment.
658 * libaout.h (NAME(aout,canonicalize_symtab)): Update.
659 * coff64-rs6000.c (aix5coff64_vec): Update.
660 * coff64-rs6000.c (bfd_xcoff_aix5_backend_data): Update.
661 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update.
662 * aoutx.h (NAME(aout,canonicalize_symtab)): Update.
663 * elfxx-target.h (bfd_elfNN_canonicalize_symtab): Update.
664 * hp300hpux.c (MY_canonicalize_symtab): Update.
665 * ecoff.c (_bfd_ecoff_canonicalize_symtab): Update.
666 * aout-tic30.c (MY_canonicalize_symtab): Update.
667 * aout-target.h (MY_canonicalize_symtab): Update.
668 * ppcboot.c (ppcboot_canonicalize_symtab): Update.
669 * elf.c (_bfd_elf_canonicalize_symtab): Update.
670 * elfcode.h (elf_canonicalize_symtab): Update.
671 * ihex.c (ihex_canonicalize_symtab): Update.
672 * tekhex.c (tekhex_canonicalize_symtab): Update.
673 * binary.c (binary_canonicalize_symtab): Update.
674 * srec.c (srec_canonicalize_symtab): Update.
675
676 2003-10-15 Kazu Hirata <kazu@cs.umass.edu>
677
678 * elf32-h8300.c (elf_reloc_map): Fix a comment typo.
679
680 2003-10-15 Kaz Kojima <kkojima@rr.iij4u.or.jp>
681
682 * elf32-sh.c (sh_elf_relocate_section): Handle R_SH_IMM_*_PCREL
683 relocations.
684 (sh_elf_check_relocs): Likewise.
685
686 * elf32-sh64.c (elf_backend_merge_symbol_attribute): Define.
687 (sh64_elf_merge_symbol_attribute): New.
688 * elf64-sh64.c (elf_backend_merge_symbol_attribute): Define.
689 (sh64_elf64_merge_symbol_attribute): New.
690
691 2003-10-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
692
693 * elf-bfd.h (struct elf_backend_data): New function pointer member
694 elf_backend_merge_symbol_attribute.
695 * elflink.h (elf_link_add_object_symbols): Adjust call to
696 elf_backend_merge_symbol_attribute if the backend defined it.
697 * elfxx-target.h (elf_backend_merge_symbol_attribute): New macro.
698 (elfNN_bed): Add that to the initializer.
699
700 2003-10-14 Bob Wilson <bob.wilson@acm.org>
701
702 * elf32-xtensa.c (get_is_linkonce_section): Delete.
703 (xtensa_is_property_section, xtensa_is_littable_section): Use
704 XTENSA_INSN_SEC_NAME and XTENSA_LIT_SEC_NAME macros. Do not recognize
705 linkonce sections containing ".xt.insn" and ".xt.lit" substrings.
706 (xtensa_get_property_section_name): Check section name instead of
707 calling get_is_linkonce_section. Remove unused bfd parameter. Use
708 XTENSA_INSN_SEC_NAME and XTENSA_LIT_SEC_NAME macros. Never generate
709 linkonce section names by appending ".xt.insn" or ".xt.lit".
710 (xtensa_read_table_entries): Remove bfd argument in call to
711 xtensa_get_property_section_name. Free section name when done.
712 (elf_xtensa_combine_prop_entries): Free leaking table.
713
714 2003-10-13 Richard Sandiford <rsandifo@redht.com>
715
716 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Don't add
717 DT_MIPS_LIBLIST or DT_MIPS_CONFLICT entries.
718 (_bfd_mips_elf_finish_dynamic_symbol): Don't handle them. Don't
719 handle DT_MIPS_MSYM. Set DT_RELSZ based on the number of relocations
720 that were needed.
721 (_bfd_mips_elf_modify_segment_map): Fix placement of PT_MIPS_OPTIONS.
722 (_bfd_mips_elf_merge_private_bfd_data): Ignore EF_MIPS_UCODE.
723
724 2003-10-13 H.J. Lu <hongjiu.lu@intel.com>
725
726 * bfd-in.h (bfd_elf32_ia64_after_parse): New prototype.
727 (bfd_elf64_ia64_after_parse): Likewise.
728 * bfd-in2.h: Regenerated.
729
730 * elfxx-ia64.c (oor_ip): New.
731 (oor_branch_size): Likewise.
732 (bfd_elfNN_ia64_after_parse): Likewise.
733 (elfNN_ia64_relax_section): Use oor_ip if oor_branch_size
734 equals sizeof (oor_ip).
735
736 2003-10-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
737
738 * elf64-sh64.c (sh_elf64_relocate_section): Tidy up for the
739 renumbering of some relocation numbers.
740
741 2003-10-11 Alan Modra <amodra@bigpond.net.au>
742
743 * coff-sh.c: Move definition of MAP and guard more code with
744 COFF_IMAGE_WITH_PE.
745
746 * section.c (bfd_get_section_size_before_reloc): Ignore reloc_done.
747 * bfd-in2.h: Regenerate.
748
749 2003-10-10 H.J. Lu <hongjiu.lu@intel.com>
750
751 * Makefile.am: Run "make dep-am".
752 * Makefile.in: Regenerate.
753 * doc/Makefile.in: Likewise.
754
755 2003-10-09 H.J. Lu <hongjiu.lu@intel.com>
756
757 * cofflink.c: Include "safe-ctype.h".
758 (coff_link_add_symbols): Use ISDIGIT instead of isdigit.
759
760 2003-10-08 Dave Brolley <brolley@redhat.com>
761 On behalf of Michael Snyder <msnyder@redhat.com>
762
763 * archures.c: Add FRV fr550 machine.
764 * cpu-frv.c: Ditto.
765 * elf32-frv.c: Ditto.
766 * bfd-in2.h: Regenerate.
767
768 2003-10-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
769
770 * elfxx-mips.c (STUB_MOVE,STUB_LI16): Fix stub code
771 for non-SGI N64 ABI. Improve code consitency.
772
773 2003-10-07 Alexandre Oliva <aoliva@redhat.com>
774
775 * elf32-frv.c (elf32_frv_howto_table): Set R_FRV_LABEL16's
776 rightshift to 2.
777
778 2003-10-07 Nathan Sidwell <nathan@codesourcery.com>
779
780 * libbfd-in.h (_bfd_link_section_stabs): Add string offset
781 parameter.
782 * cofflink.c (coff_link_add_symbols): Deal with split stab
783 sections.
784 * elflink.h (elf_link_add_object_symbols): Deal with split stab
785 sections.
786 * stabs.c (_bfd_link_section_stabs): Add string offset parameter.
787 * libbfd.h: Regenerated.
788
789 * coffcode.h (coff_set_alignment_hook): With PE_COFF reloc
790 overflow, set reloc start position to after the count
791 reloc. Subtract one from num relocs. Give error on 0xffff relocs
792 and no overflow.
793 * cofflink.c (_bfd_coff_final_link): Deal with PE_COFF reloc
794 overflow.
795 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Do overflow if >=
796 0xffff.
797
798 2003-10-06 H.J. Lu <hongjiu.lu@intel.com>
799
800 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Pad the
801 last CIE/FDE if needed.
802
803 2003-10-06 Nick Clifton <nickc@redhat.com>
804
805 * targets.c (_bfd_target_vector): Include bfd_elf64_sparc_vec if
806 BFD64 is enabled.
807
808 2003-10-06 Matt Thomas <matt@3am-software.com>
809
810 * config.bfd: Move the hppa*-*-netbsd* case to the hppa*-*-linux* case.
811
812 2003-10-06 Robert Millan <robertmh@gnu.org>
813
814 * configure.in: Match GNU/KNetBSD with new knetbsd*-gnu triplet.
815 * config.bfd: Likewise.
816 * configure: Regenerate.
817
818 2003-10-04 Christian Groessler <chris@groessler.org>
819
820 * coff-z8k.c (extra_case): Fix displacement length check for R_JR
821 and R_CALLR.
822
823 2003-10-04 Stephane Carrez <stcarrez@nerim.fr>
824
825 * elf32-m68hc1x.c: Update to ISO C90; replace PTR with void*.
826 * elf32-m68hc11.c: Likewise.
827 * elf32-m68hc12.c: Likewise.
828 * elf32-m68hc1x.h: Likewise.
829
830 2003-10-04 Stephane Carrez <stcarrez@nerim.fr>
831
832 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Fix merge
833 of flags between HC12 and HCS12.
834
835 2003-10-04 Bryce McKinlay <bryce@mckinlay.net.nz>
836
837 * merge.c (_bfd_merge_sections): Set SEC_EXCLUDE flag on sections
838 which become empty after merging.
839
840 2003-09-30 Jakub Jelinek <jakub@redhat.com>
841
842 * elfxx-ia64.c (ia64_howto_table): Fix size of R_IA64_TPREL64[LM]SB,
843 R_IA64_DTPREL{32,64}[LM]SB and R_IA64_DTPMOD64[LM]SB.
844
845 2003-09-30 Chris Demetriou <cgd@broadcom.com>
846
847 * archures.c (bfd_mach_mipsisa64r2): New define.
848 * bfd-in2.h: Regenerate.
849 * aoutx.h (NAME(aout,machine_type)): Handle bfd_mach_mipsisa64r2.
850 * cpu-mips.c (I_mipsisa64r2): New enum value.
851 (arch_info_struct): Add entry for I_mipsisa64r2.
852 * elfxx-mips.c (_bfd_elf_mips_mach)
853 (_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_64R2.
854 (mips_set_isa_flags): Add bfd_mach_mipsisa64r2 case.
855 (mips_mach_extensions): Add entry for bfd_mach_mipsisa64r2.
856
857 2003-09-29 H.J. Lu <hongjiu.lu@intel.com>
858
859 * elfxx-ia64.c (elfNN_hpux_backend_symbol_processing): New.
860 Handle SHN_IA_64_ANSI_COMMON.
861 (elf_backend_section_from_bfd_section): Defined.
862
863 2003-09-26 H.J. Lu <hongjiu.lu@intel.com>
864
865 * elflink.c (elf_link_read_relocs_from_section): Add an argument
866 of a pointer to section. Check bad symbol index.
867 (_bfd_elf_link_read_relocs): Modify calls to
868 elf_link_read_relocs_from_section.
869
870 2003-09-23 DJ Delorie <dj@redhat.com>
871
872 * elf32-sh.c (sh_elf_howto_table): R_SH_SWITCH8,
873 R_SH_GNU_VTINHERIT, R_SH_GNU_VTENTRY,
874 R_SH_LOOP_START,R_SH_LOOP_END moved to "reserved" spaces,
875 R_SH_DIR16, R_SH_DIR8, R_SH_DIR8UL, R_SH_DIR8UW, R_SH_DIR8U,
876 R_SH_DIR8SW, R_SH_DIR8S, R_SH_DIR4UL, R_SH_DIR4UW, R_SH_DIR4U,
877 R_SH_PSHA, R_SH_PSHL added.
878 (sh_reloc_map): Add R_SH_DIR16 and R_SH_DIR8.
879 (sh_elf_relocate_section): Support new relocs.
880
881 2003-09-23 Bob Wilson <bob.wilson@acm.org>
882
883 * elf32-xtensa.c (elf_xtensa_relocate_section): Fix typo that clobbered
884 dynamic relocation offsets.
885
886 2003-09-23 Alan Modra <amodra@bigpond.net.au>
887
888 * simple.c (bfd_simple_get_relocated_section_contents): Free the
889 hash table using _bfd_generic_link_hash_table_free.
890
891 2003-09-23 Alan Modra <amodra@bigpond.net.au>
892
893 * elf-bfd.h (struct bfd_elf_special_section): Remove "suffix". Change
894 type of prefix_length and suffix_length to int. Rename "attributes"
895 to "attr". Comment.
896 (_bfd_elf_get_sec_type_attr): Update prototype.
897 * elf.c (get_special_section): Rewrite.
898 (_bfd_elf_get_sec_type_attr): Return struct rather than passing in
899 attr and type pointers.
900 (_bfd_elf_new_section_hook): Adjust for above.
901 (special_sections): Merge suffix with prefix. Set
902 prefix_length for all entries. Set suffix_length appropriately.
903 * elf32-m32r.c (m32r_elf_special_sections): Likewise.
904 * elf32-m68hc11.c (elf32_m68hc11_special_sections): Likewise.
905 * elf32-m68hc12.c (elf32_m68hc12_special_sections): Likewise.
906 * elf32-mcore.c (mcore_elf_special_sections): Likewise.
907 * elf32-sh64.c (sh64_elf_special_sections): Likewise.
908 * elf32-v850.c (v850_elf_special_sections): Likewise.
909 * elf32-xtensa.c (elf_xtensa_special_sections): Likewise.
910 * elf64-alpha.c (elf64_alpha_special_sections): Likewise.
911 * elf64-hppa.c (elf64_hppa_special_sections): Likewise.
912 * elf64-ppc.c (ppc64_elf_special_sections): Likewise.
913 * elf64-sh64.c (sh64_elf64_special_sections): Likewise.
914 * elfxx-ia64.c (elfNN_ia64_special_sections): Likewise.
915 * elfxx-mips.c (_bfd_mips_elf_special_sections): Likewise.
916 * elf32-ppc.c (ppc_elf_special_sections): Likewise. Fix .plt flags.
917
918 2003-09-21 Daniel Jacobowitz <drow@mvista.com>
919
920 * elf64-alpha.c (elf64_alpha_create_got_section): Initialize
921 ->got if the section already exists.
922
923 2003-09-19 Nathan Sidwell <nathan@codesourcery.com>
924
925 * dwarf2.c (decode_line_info): Cope with an initially empty
926 filename table.
927
928 2003-09-18 H.J. Lu <hongjiu.lu@intel.com>
929
930 * acinclude.m4: Include ../config/accross.m4.
931 * aclocal.m4: Regenerated.
932
933 * configure.host (HOST_64BIT_TYPE): Remove if it is set to long
934 or long long.
935 (HOST_U_64BIT_TYPE): Remove if it is set to unsigned long long.
936 (host64): Remove if HOST_64BIT_TYPE is set to long.
937
938 * configure.in (HOST_64BIT_TYPE): Set according to the size of
939 long and long long.
940 (HOST_U_64BIT_TYPE): Likewise.
941 (host64): Likewise.
942 * configure: Regenerated.
943
944 2003-09-19 Alan Modra <amodra@bigpond.net.au>
945
946 * elf.c (elfcore_write_note): Don't use sizeof(Elf_External_note)
947 since some ABIs round up the size of the struct.
948
949 2003-09-18 H.J. Lu <hongjiu.lu@intel.com>
950
951 * elflink.c (_bfd_elf_merge_symbol): Allow type change if
952 the old symbol is undefined and the new symbol is defined.
953
954 2003-09-18 Andreas Schwab <schwab@suse.de>
955
956 * simple.c (bfd_simple_get_relocated_section_contents): Use
957 _bfd_generic_link_hash_table_create instead of
958 bfd_link_hash_table_create.
959
960 2003-09-10 H.J. Lu <hongjiu.lu@intel.com>
961
962 * elfxx-ia64.c (elfNN_ia64_special_sections): Mark all sections
963 started with ".sbss" or "".sdata" as SHF_IA_64_SHORT.
964
965 2003-09-10 John David Anglin <dave.anglin@nrc-cnrc.nrc.ca>
966 Randolph Chung <randolph@tausq.org>
967
968 * elf32-hppa.c (struct elf32_hppa_link_hash_entry,
969 hppa_link_hash_newfunc, hppa_build_one_stub,
970 elf32_hppa_adjust_dynamic_symbol, mark_PIC_calls, allocate_plt_static,
971 allocate_dynrelocs, elf32_hppa_size_dynamic_sections,
972 elf32_hppa_finish_dynamic_symbol): Remove pic_call field and all code
973 for generating import stubs for calls to statically linked PIC
974 functions.
975 (hppa_type_of_stub): Don't generate an import stub for calls to
976 statically linked pic functions. Generate import stubs for calls
977 in a shared object, to functions not in a regular file, and to
978 defined weak functions. Add new argument INFO.
979 (hppa_build_one_stub): Don't undef ADDIL_DP.
980 (elf32_hppa_check_relocs): Don't set SEC_HAS_GOT_REF flag.
981 (elf32_hppa_size_stubs): Pass info to hppa_type_of_stub.
982 (final_link_relocate): Change all DLTIND relocs to DPREL relocs in a
983 non-shared link. Convert instructions that use the the linkage table
984 pointer, or a facsimile thereof, to use the global data pointer when
985 the reloc has been changed.
986
987 2003-09-08 Joel Brobecker <brobecker@gnat.com>
988
989 * archures.c: Add new machine names for hppa.
990 * bfd-in2.h: Regenerate.
991 * cpu-hppa.c: Use the new machine names.
992
993 2003-09-06 Stephane Carrez <stcarrez@nerim.fr>
994
995 * elf32-m68hc1x.h (struct m68hc11_elf_link_hash_table): Remove
996 all_local_syms member.
997 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Use bfd_elf_get_elf_syms
998 to get the local symbols.
999
1000 2003-09-06 Stephane Carrez <stcarrez@nerim.fr>
1001
1002 * elf32-m68hc12.c (elf32_m68hc12_special_sections): New for hc11.
1003 (elf_backend_special_sections): Define.a
1004
1005 PR savannah/4950:
1006 * elf32-m68hc11.c (elf32_m68hc11_special_sections): The .vectors
1007 section is read-only.
1008
1009 2003-09-04 Nick Clifton <nickc@redhat.com>
1010
1011 * archures.c (bfd_mach_v850e1): Define.
1012 * bfd-in2.h: Regenerate.
1013 * cpu-v850.h (scan): Accept bfd_mach_v850e1.
1014 (arch_info_struct): Include an entry for bfd_mach_v850e1.
1015 * elf32-v850.c (v850_elf_object_p): Accept E_V850E1_ARCH flag.
1016 (v850_elf_final_write_processing): Accept bfd_mach_v850e1.
1017 (v850_elf_print_private_bfd_data): Interpret E_V850E1_ARCH flag.
1018 (v850_elf_merge_private_bfd_data): Allow v850e1 binaries to be
1019 linked with v850e binaries. Mark the output as v850e.
1020
1021 2003-09-03 Nick Clifton <nickc@redhat.com>
1022
1023 * cofflink.c (_bfd_coff_link_input_bfd): Do not skip section
1024 symbols that are used in relocs.
1025
1026 2003-08-30 Robert Millan <robertmh@gnu.org>
1027
1028 * configure.in: Match GNU/KFreeBSD with new kfreebsd*-gnu triplet.
1029 * config.bfd: Likewise.
1030 * configure: Regenerate.
1031
1032 2003-08-31 Christian Groessler <chris@groessler.org>
1033
1034 * elf32-i860.c (i860_howto_pc26_reloc): Finish relocation here
1035 instead of returning bfd_reloc_continue.
1036
1037 2003-08-31 Andreas Jaeger <aj@suse.de>
1038
1039 * merge.c: Update to ISO C90.
1040
1041 2003-08-27 Ian Lance Taylor <ian@airs.com>
1042
1043 * configure.in: Check for strtoull.
1044 * bfd.c (bfd_scan_vma): Use strtoull when available.
1045 * configure, config.in: Regenerate.
1046
1047 * configure.in: Define and substitute BFD_HOST_LONG_LONG.
1048 * bfd-in.h: Define BFD_HOST_LONG_LONG. Test it rather than
1049 __GNUC__ when deciding whether to use long long for
1050 BFD_HOST_64_BIT.
1051 * configure, Makefile.in, doc/Makefile.in, bfd-in2.h: Regenerate.
1052
1053 2003-08-27 Christian Groessler <chris@groessler.org>
1054
1055 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc,
1056 i860_howto_splitn_reloc, i860_howto_highadj_reloc): New
1057 functions.
1058 (elf32_i860_howto_table): Insert the new functions as
1059 'special_function's in the proper reloc type entries.
1060
1061 2003-08-27 Richard Sandiford <rsandifo@redhat.com>
1062
1063 * elf32-frv.c (elf32_frv_relocate_section): Use
1064 _bfd_elf_rela_local_sym.
1065
1066 2003-08-26 Michael Snyder <msnyder@redhat.com>
1067
1068 * cpu-frv.c: Remove unused enum.
1069
1070 2003-08-25 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
1071
1072 * reloc.c: Fix documentation for MIPS ELF relocations.
1073 libbfd.h: Regenerate.
1074 bfd-in2.h: Regenerate.
1075
1076 2003-08-24 Jason Eckhardt <jle@rice.edu>
1077
1078 * coff-i860.c (CALC_ADDEND): Define to be a no-op.
1079
1080 2003-08-24 Jason Eckhardt <jle@rice.edu>
1081
1082 * elf32-i860.c (elf32_i860_relocate_pc16): Subtract 4 and
1083 shift by 2 before storing the relocated value.
1084
1085 2003-08-23 Jason Eckhardt <jle@rice.edu>
1086
1087 * coff-i860.c (coff_i860_reloc_nyi): New function.
1088 (howto_table): Add entries for relocations PAIR, HIGHADJ, HIGH,
1089 LOWn, SPLITn, and BRADDR.
1090 (RTYPE2HOWTO): Check that the r_type is within the howto_table
1091 before trying to access the entry.
1092 (coff_i860_rtype_to_howto): Likewise.
1093 (coff_i860_reloc_type_lookup): New function.
1094 (i860_reloc_processing): New function.
1095 (coff_bfd_reloc_type_lookup): Define macro.
1096 (RELOC_PROCESSING): Define macro.
1097 Minor formatting adjustments.
1098
1099 2003-08-23 Alan Modra <amodra@bigpond.net.au>
1100
1101 * elflink.h (elf_link_add_object_symbols): Don't crash on NULL owner.
1102
1103 2003-08-22 H.J. Lu <hongjiu.lu@intel.com>
1104
1105 * elfxx-ia64.c (elfNN_ia64_create_dynamic_sections): Align the
1106 .got section at 8 bytes.
1107
1108 2003-08-21 Nick Clifton <nickc@redhat.com>
1109
1110 * cofflink.c: Update to ISO C90 and tidy up formatting.
1111
1112 2003-08-21 Randolph Chung <tausq@debian.org>
1113
1114 * elf32-hppa.c (elf32_hppa_object_p): For elf32-hppa-linux, objects
1115 can have OSABI=Linux or OSABI=SysV. Check for both.
1116 * elf64-hppa.c (elf64_hppa_object_p): Likewise.
1117
1118 2003-08-21 Nick Clifton <nickc@redhat.com>
1119
1120 * po/sv.po: Updated Swedish translation.
1121
1122 2003-08-20 Richard Sandiford <rsandifo@redhat.com>
1123
1124 * elf64-mips.c (elf_backend_copy_indirect_symbol): Define.
1125
1126 2003-08-20 Nick Clifton <nickc@redhat.com>
1127
1128 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): New macro used to
1129 replace some duplicated code in most elfxx-xxxx.c files. This
1130 version uses the new fields in bfd_link_info.
1131
1132 * elf-m10300.c (mn10300_elf_relocate_section): Use new macro.
1133 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
1134 * elf32-cris.c (cris_elf_relocate_section): Likewise.
1135 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
1136 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1137 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
1138 * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
1139 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1140 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1141 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1142 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1143 * elf32-vax.c (elf_vax_relocate_section): Likewise.
1144 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
1145 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
1146 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1147 * elf64-s390.c (elf_s390_relocate_section): Likewise.
1148 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1149 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1150 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
1151
1152 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols,
1153 elf_hppa_remark_useless_dynamic_symbols,
1154 elf_hppa_relocate_section): Use the new fields in
1155 bfd_link_info structure.
1156 * elf32-sh.c (sh_elf_relocate_section): Likewise.
1157 * elf64-alpha.c (elf64_alpha_check_relocs): Likewise.
1158 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
1159 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
1160 * elfxx-ia64.c (elfNN_ia64_check_relocs): Likewise.
1161 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
1162
1163 * elflink.h (elf_link_output_extsym): Fix test for reporting
1164 undefined symbols in shared libraries. Remove redundant test
1165 of shlib_undefined when reporting references to forced local
1166 symbols.
1167
1168 2003-08-18 Andreas Schwab <schwab@suse.de>
1169
1170 * libpei.h (bfd_pe_executable_p): Also recognize efi-app
1171 executables.
1172
1173 2003-08-17 Hans-Peter Nilsson <hp@bitrange.com>
1174
1175 * simple.c (bfd_simple_get_relocated_section_contents): Move
1176 reloc_done hack to before first bfd_section_size call. Change all
1177 returns to use new wrapper macro RETURN, restoring sec->reloc_done.
1178
1179 2003-08-16 Alan Modra <amodra@bigpond.net.au>
1180
1181 * elf64-ppc.c: Don't include elf/ppc.h.
1182
1183 2003-08-14 Richard Sandiford <rsandifo@redhat.com>
1184
1185 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Fix PT_DYNAMIC
1186 code to work with 64-bit bfds.
1187
1188 2003-08-14 Alan Modra <amodra@bigpond.net.au>
1189
1190 * dep-in.sed: Remove libintl.h.
1191 * Makefile.am (SRC-POTFILES.in, BLD-POTFILES.in): Unset LC_COLLATE.
1192 (POTFILES.in): Remove target.
1193 * Makefile.in: Regenerate.
1194
1195 2003-08-12 Alan Modra <amodra@bigpond.net.au>
1196
1197 * elf64-ppc.c (ppc64_elf_next_input_section): Update comment.
1198 (ppc64_elf_relocate_section): For zero sym R_PPC64_TOC relocs,
1199 use the function sym from the previous reloc.
1200
1201 2003-08-11 Jakub Jelinek <jakub@redhat.com>
1202
1203 * elf32-i386.c (elf_i386_relocate_section): Make undefined symbols
1204 fatal if -pie.
1205 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1206 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1207 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
1208 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1209 * elf64-s390.c (elf_s390_relocate_section): Likewise.
1210 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1211 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1212 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
1213 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1214 (ppc_elf_relocate_section) <case R_PPC_RELAX32>: Issue fatal error
1215 on undefined symbols if -pie.
1216 * elf32-sh.c (sh_elf_relocate_section): Likewise.
1217
1218 2003-08-11 Alan Modra <amodra@bigpond.net.au>
1219
1220 * elf64-ppc.c (ppc64_elf_relocate_section): Add special case for crt1.o
1221 branch to __libc_start_main.
1222
1223 2003-08-08 Dmitry Diky <diwil@mail.ru>
1224
1225 * archures.c: Add xW42 and xE42 parts. Sort MPU list according to
1226 gcc order.
1227 * cpu-msp430.c: Likewise.
1228 * elf32-msp430.c: Likewise.
1229 * bfd-in2.h: Regenerate.
1230
1231 2003-08-07 Alan Modra <amodra@bigpond.net.au>
1232
1233 * elfxx-target.h: Remove PTR cast.
1234 * targets.c (bfd_target): Make backend_data const void *.
1235 * elf-bfd.h: Constify all occurrences of struct elf_backend_data.
1236 * elf-m10300.c: Likewise.
1237 * elf.c: Likewise.
1238 * elf32-hppa.c: Likewise.
1239 * elf32-i386.c: Likewise.
1240 * elf32-m68hc1x.c: Likewise.
1241 * elf32-ppc.c: Likewise.
1242 * elf32-s390.c: Likewise.
1243 * elf32-sh.c: Likewise.
1244 * elf32-sh64.c: Likewise.
1245 * elf32-sparc.c: Likewise.
1246 * elf32-xtensa.c: Likewise.
1247 * elf64-mips.c: Likewise.
1248 * elf64-ppc.c: Likewise.
1249 * elf64-s390.c: Likewise.
1250 * elf64-sh64.c: Likewise.
1251 * elf64-sparc.c: Likewise.
1252 * elf64-x86-64.c: Likewise.
1253 * elfcode.h: Likewise.
1254 * elfcore.h: Likewise.
1255 * elflink.c: Likewise.
1256 * elflink.h: Likewise.
1257 * elfxx-ia64.c: Likewise.
1258 * elfxx-mips.c: Likewise.
1259 * elfxx-mips.h: Likewise.
1260 * elf.c (prep_headers): Remove useless check for null backend_data.
1261 * bfd-in2.h: Regenerate.
1262
1263 * elf-bfd.h: Remove PARAMS macro. Replace PTR with void *.
1264 (NAME): Use ## rather than CONCAT4 macro.
1265 * elfcode.h: Remove one remaining PARAMS macro.
1266 * elf-eh-frame.c: Convert to C90, remove unneeded casts and prototypes.
1267 * elf-strtab.c: Likewise.
1268 * elf-hppa.h: Likewise.
1269 * elf32-hppa.h: Likewise.
1270 * elf32-hppa.c: Likewise.
1271 (elf32_hppa_add_symbol_hook): Delete.
1272 (elf_backend_add_symbol_hook): Don't define.
1273 * libhppa.h: Convert to C90. Replace INLINE with inline.
1274
1275 2003-08-06 Alan Modra <amodra@bigpond.net.au>
1276
1277 * elf64-ppc.c (ppc_stub_name): Tweak names for better readability.
1278 (ppc64_elf_adjust_dynamic_symbol): Allow copy relocs against
1279 function descriptors, but warn.
1280 (ppc_build_one_stub): Remove a couple of vars. Move code creating
1281 stub syms so that we can avoid a stub sym if we already have a
1282 plt sym. Do not redefine an existing symbol.
1283 (ppc64_elf_build_stubs): When --emit-stub-syms, print a symbol for
1284 glink.
1285
1286 2003-08-06 Nick Clifton <nickc@redhat.com>
1287
1288 * po/fr.po: Updated French translation.
1289
1290 2003-08-06 Alan Modra <amodra@bigpond.net.au>
1291
1292 * elflink.c (_bfd_elf_create_dynamic_sections): Mark .dynbss with
1293 SEC_LINKER_CREATED.
1294
1295 2003-08-05 Daniel Jacobowitz <drow@mvista.com>
1296
1297 * elf32-arm.h (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
1298 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Use it.
1299
1300 2003-08-03 Jeff Muizelaar <muizelaar@rogers.com>
1301
1302 * coffcode.h (coff_slurp_line_table): Return with a warning
1303 message if the line number table could not be read.
1304
1305 2003-08-04 Nick Clifton <nickc@redhat.com>
1306
1307 * elflink.h (elf_link_add_object_symbols): Prepend "warning: "
1308 to messages produced for .gnu.warning.SYMBOL sections.
1309
1310 2003-08-04 Alan Modra <amodra@bigpond.net.au>
1311
1312 * elfcode.h: Convert to C90, remove unneeded casts and prototypes.
1313 * elfcore.h: Likewise.
1314 * elflink.c: Likewise.
1315 * elflink.h: Likewise.
1316 * elf.c (sym_is_global): Remove INLINE.
1317 (align_file_position): Replace INLINE with inline.
1318 * elfcode.h (elf_swap_dyn_in, elf_swap_dyn_out): Remove INLINE.
1319 (elf_file_p): Replace INLINE with inline.
1320
1321 2003-08-02 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1322
1323 * elf32-sh.c (sh_elf_check_relocs): Don't set DF_TEXTREL here.
1324
1325 2003-08-01 H.J. Lu <hongjiu.lu@intel.com>
1326
1327 * elfxx-ia64.c (get_got): Align the .got section at 8 bytes.
1328
1329 2003-08-01 H.J. Lu <hongjiu.lu@intel.com>
1330
1331 * elfxx-ia64.c (elfNN_ia64_finish_dynamic_symbol): Use
1332 ElfNN_External_Rela instead of Elf64_External_Rela.
1333
1334 2003-08-01 Nick Clifton <nickc@redhat.com>
1335
1336 * config.bfd: Add code to catch obsolete configurations and warn
1337 about them unless --enable-obsolete is used. Use this to mark
1338 vax-vms port as obsolete.
1339
1340 2003-07-30 Alan Modra <amodra@bigpond.net.au>
1341
1342 * elf32-ppc.c (ppc_elf_install_value): Tidy.
1343 (ppc_elf_relax_section): Remove dead code. Remove unnecessary casts.
1344 Formatting.
1345 * elfxx-target.h: Remove PARAMS macro. Formatting.
1346
1347 2003-07-30 Alan Modra <amodra@bigpond.net.au>
1348
1349 * elf.c (bfd_section_from_r_symndx): Test for SHN_UNDEF.
1350 * elf64-ppc.c (get_fdh): New function, split out from
1351 ppc64_elf_edit_opd.
1352 (ppc64_elf_check_relocs): Use get_fdh.
1353 (func_desc_adjust): Likewise. Tidy.
1354 (ppc64_elf_edit_opd): Tighten reloc checks. Free local_syms on error
1355 exit. Use get_fdh. Account for superfluous dynamic relocs.
1356 (ppc64_elf_relocate_section): Warning fix.
1357
1358 2003-07-30 Jason Eckhardt <jle@rice.edu>
1359
1360 * coff-i860.c: Convert to ISO C90. Remove superflous prototypes.
1361
1362 2003-07-30 Jason Eckhardt <jle@rice.edu>
1363
1364 * elf32-i860.c: Convert to ISO C90. Remove superflous prototypes.
1365
1366 2003-07-30 Randolph Chung <tausq@debian.org>
1367
1368 * elf-hppa.h (elf_hppa_relocate_section): Look up dyn_h for undefweak.
1369 * elf64-hppa.c (elf64_hppa_finalize_dlt): Check h->root.type.
1370
1371 2003-07-30 Alan Modra <amodra@bigpond.net.au>
1372
1373 * elf.c: Convert to C90, remove unnecessary prototypes and casts.
1374 Replace PTR with void *. Formatting.
1375 (_bfd_elf_assign_file_position_for_section): Remove INLINE.
1376 (make_mapping): Likewise.
1377
1378 2003-07-29 Alan Modra <amodra@bigpond.net.au>
1379
1380 * elf64-ppc.c (func_desc_adjust): Give linker created function
1381 descriptor symbols a size and type.
1382 (ppc64_elf_relocate_section): Correct lq insn test.
1383
1384 2003-07-28 Eric Christopher <echristo@redhat.com>
1385
1386 * elf32-ppc.c (R_PPC_RELAX32): New relocation.
1387 (ppc_elf_install_value): New function.
1388 (ppc_elf_sort_rela): Remove.
1389 (ppc_elf_relax_section): Rewrite. Remove old relaxation
1390 and replace with out of range branch stubs.
1391 (ppc_elf_relocate_section): Handle R_PPC_RELAX32.
1392
1393 2003-07-29 Alexandre Oliva <aoliva@redhat.com>
1394
1395 * elf-m10300.c (mn10300_elf_relax_section): Take symbol hash table
1396 from input_bfd.
1397
1398 2003-07-28 Alan Modra <amodra@bigpond.net.au>
1399
1400 * elf.c (special_sections): Set attributes for .got and .plt.
1401
1402 2003-07-27 Alan Modra <amodra@bigpond.net.au>
1403
1404 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Ensure no copy relocs
1405 on function descriptors.
1406 (ELIMINATE_COPY_RELOCS): Expand comment.
1407 (ppc64_elf_special_sections): Move. Don't include non-ppc64 sections.
1408 Do include ".toc1".
1409
1410 2003-07-25 H.J. Lu <hongjiu.lu@intel.com>
1411
1412 * elf.c (_bfd_elf_new_section_hook): Set the default section
1413 type to SHT_NULL.
1414 (elf_fake_sections): Set the section type based on asect->flags
1415 if it is SHT_NULL. Don't abort on processor specific section
1416 types.
1417
1418 2003-07-25 H.J. Lu <hongjiu.lu@intel.com>
1419
1420 * bfd-in2.h: Regenerated.
1421
1422 2003-07-25 H.J. Lu <hongjiu.lu@intel.com>
1423
1424 * elf-bfd.h (bfd_elf_special_section): New.
1425 (elf_backend_data): Add special_sections, a pointer to
1426 bfd_elf_special_section.
1427 (elf_section_type). New.
1428 (elf_section_flags): New.
1429 (_bfd_elf_get_sec_type_attr): New.
1430
1431 * elf.c (_bfd_elf_make_section_from_shdr): Always use the
1432 real section type/flags.
1433 (special_sections): New.
1434 (get_special_section): New.
1435 (_bfd_elf_get_sec_type_attr): New.
1436 (_bfd_elf_new_section_hook): Check special_section to set
1437 elf_section_type and elf_section_flags.
1438 (elf_fake_sections): Don't use section name to set ELF section
1439 data.
1440
1441 * elf32-m32r.c (m32r_elf_special_sections): New.
1442 (elf_backend_special_sections): Defined.
1443
1444 * elf32-m68hc11.c (elf32_m68hc11_special_sections): New.
1445 (elf_backend_special_sections): Defined.
1446
1447 * elf32-mcore.c (mcore_elf_special_sections): New.
1448 (elf_backend_special_sections): Defined.
1449
1450 * elf32-ppc.c (ppc_elf_special_sections): New.
1451 (elf_backend_special_sections): Defined.
1452
1453 * elf32-sh64.c (sh64_elf_special_sections): New.
1454 (elf_backend_special_sections): Defined.
1455
1456 * elf32-v850.c (v850_elf_special_sections): New.
1457 (elf_backend_special_sections): Defined.
1458
1459 * elf32-xtensa.c (elf_xtensa_special_sections): New.
1460 (elf_backend_special_sections): Defined.
1461
1462 * elf64-alpha.c (elf64_alpha_special_sections): New.
1463 (elf_backend_special_sections): Defined.
1464
1465 * elf64-hppa.c (elf64_hppa_special_sections): New.
1466 (elf_backend_special_sections): Defined.
1467
1468 * elf64-ppc.c (ppc64_elf_special_sections): New.
1469 (elf_backend_special_sections): Defined.
1470
1471 * elf64-sh64.c (sh64_elf64_special_sections): New.
1472 (elf_backend_special_sections): Defined.
1473
1474 * elfxx-ia64.c (elfNN_ia64_special_sections): New.
1475 (elf_backend_special_sections): Defined.
1476
1477 * elfxx-mips.c (_bfd_mips_elf_special_sections): New.
1478
1479 * elfxx-mips.h (_bfd_mips_elf_special_sections): New.
1480 (elf_backend_special_sections): Defined.
1481
1482 * elfxx-target.h (elf_backend_special_sections): New. Default
1483 to NULL.
1484 (elfNN_bed): Initialize special_sections.
1485
1486 * section.c (bfd_abs_section): Remove const.
1487 (bfd_und_section): Likewise.
1488 (bfd_com_section): Likewise.
1489 (bfd_ind_section): Likewise.
1490
1491 2003-07-24 Nick Clifton <nickc@redhat.com>
1492
1493 * coff-arm.c (EXTRA_S_FLAGS): Include SEC_CODE so that code
1494 sections are assigned the LOAD attribute.
1495
1496 2003-07-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1497
1498 * elf32-sh.c: Convert to C90. Replace PTR with void *.
1499 * elf32-sh64-com.c: Likewise.
1500 * elf32-sh64.c: Likewise.
1501 * elf32-sh64.h: Likewise.
1502 * elf64-sh64.c: Likewise.
1503
1504 2003-07-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1505
1506 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
1507 (allocate_dynrelocs): Likewise.
1508 (sh_elf_relocate_section): Likewise. Use SYMBOL_REFERENCES_LOCAL.
1509 (sh_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
1510
1511 2003-07-24 Nick Clifton <nickc@redhat.com>
1512
1513 * po/fr.po: Updated French translation.
1514
1515 2003-07-23 Bob Wilson <bob.wilson@acm.org>
1516
1517 * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Make inline and move
1518 near the beginning of the file. Swap order of arguments. Call
1519 _bfd_elf_dynamic_symbol_p with "ignore_protected" set to 0.
1520 (elf_xtensa_fix_refcounts): Adjust xtensa_elf_dynamic_symbol_p call.
1521 (elf_xtensa_relocate_section): Likewise.
1522 (shrink_dynamic_reloc_sections): Likewise.
1523
1524 2003-07-23 Bob Wilson <bob.wilson@acm.org>
1525
1526 * elf32-xtensa.c (plt_reloc_count): Fix typo in comment.
1527 (elf_xtensa_size_dynamic_sections): Use elf_discarded_section.
1528 (elf_xtensa_combine_prop_entries): Avoid returning non-zero without
1529 first printing an error message.
1530 (elf_xtensa_finish_dynamic_sections): Likewise.
1531 (elf_xtensa_discard_info_for_section): Adjust size of .got.loc when
1532 discarding literal table entries.
1533 (elf_xtensa_merge_private_bfd_data): Remove newline from error message.
1534 (elf_xtensa_do_asm_simplify): Likewise.
1535
1536 2003-07-23 Stephane Carrez <stcarrez@nerim.fr>
1537
1538 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Avoid crash when
1539 we have a local symbol in common section.
1540
1541 2003-07-22 H.J. Lu <hongjiu.lu@intel.com>
1542
1543 * elflink.c (_bfd_elf_dynamic_symbol_p): Don't return TRUE for
1544 weak symbols.
1545
1546 2003-07-22 Nick Clifton <nickc@redhat.com>
1547
1548 * coffcode.h (coff_slurp_symbol_table): Add C_TCSYM and C_ECOML to
1549 expected RS6000 storage classes.
1550
1551 2003-07-21 H.J. Lu <hongjiu.lu@intel.com>
1552
1553 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Mark
1554 output_bfd unused to silence gcc.
1555
1556 2003-07-21 Nick Clifton <nickc@redhat.com>
1557
1558 * po/sv.po: Updated Swedish translation.
1559
1560 2003-07-21 Alan Modra <amodra@bigpond.net.au>
1561
1562 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Use..
1563 (_bfd_elf_symbol_refs_local_p): ..this. Declare.
1564 * elflink.c (_bfd_elf_symbol_refs_local_p): New function.
1565 * elf32-i386.c (elf_i386_relocate_section): Remove h NULL test
1566 now done in _bfd_elf_symbol_refs_local_p.
1567 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1568 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1569 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1570
1571 2003-07-18 H.J. Lu <hongjiu.lu@intel.com>
1572
1573 * elflink.c (_bfd_elf_dynamic_symbol_p): Undo the last change.
1574
1575 2003-07-18 H.J. Lu <hongjiu.lu@intel.com>
1576
1577 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL): Fix a typo.
1578 (SYMBOL_CALLS_LOCAL): Likewise.
1579
1580 * elflink.c (_bfd_elf_dynamic_symbol_p): Return TRUE
1581 immediately if symbol isn't defined locally.
1582
1583 2003-07-18 Richard Henderson <rth@redhat.com>
1584
1585 * elflink.c (_bfd_elf_dynamic_symbol_p): New.
1586 * elf-bfd.h (_bfd_elf_dynamic_symbol_p): Declare it.
1587 (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Use it.
1588 * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Likewise.
1589 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
1590 * elf64-hppa.c (elf64_hppa_dynamic_symbol_p): Likewise.
1591 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Likewise.
1592 Update all callers to provide the relocation being resolved.
1593
1594 2003-07-17 Shaun Jackman <sjackman@pathwayconnect.com>
1595
1596 * config.bfd (arm-wince-pe): Add -DARM_COFF_BUGFIX to
1597 targ_cflags.
1598
1599 2003-07-17 Nick Clifton <nickc@redhat.com>
1600
1601 * po/es.po: New Spanish translation.
1602 * po/sv.po: New Swedish translation.
1603 * po/opcodes.pot: Regenerate.
1604
1605 2003-07-16 Richard Henderson <rth@redhat.com>
1606
1607 * config.bfd, configure.host, configure.in: Remove ia64-aix support.
1608 * elfxx-ia64.c, targets.c: Likewise.
1609
1610 2003-07-16 Richard Henderson <rth@redhat.com>
1611
1612 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Properly return false
1613 for symbols defined locally plus -Bsymbolic. Tidy logic.
1614
1615 2003-07-15 Richard Sandiford <rsandifo@redhat.com>
1616
1617 * archures.c (bfd_mach_mips7000): New.
1618 * bfd-in2.h: Regenerated.
1619 * cpu-mips.c (arch_info_struct): Add an entry for mips:7000.
1620 * elfxx-mips.c (mips_set_isa_flags): Handle bfd_mach_mips7000.
1621 (mips_mach_extensions): Add an entry for it.
1622
1623 2003-07-14 Nick Clifton <nickc@redhat.com>
1624
1625 * po/tr.po: Update with latest version.
1626 * po/SRC-POTFILES.in: Regenerate.
1627 * po/bfd.pot: Regenerate.
1628 * Makfile.in: Regenerate.
1629 * configure: Regenerate.
1630
1631 2003-07-12 Jeff Baker <jbaker@qnx.com>
1632
1633 * bfd/config.bfd (__QNXTARGET__): Define for Neutrino architectures.
1634 * bfd/elf32-arm.h (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1635 * bfd/elf32-sh.c (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1636 * bfd/elf32-ppc.c (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1637
1638 2003-07-12 Jeff Muizelaar <muizelaar@rogers.com>
1639
1640 * coffcode.h (coff_set_section_contents): Set the
1641 IMAGE_FILE_32BIT_MACHINE flag for PE targets.
1642
1643 2003-07-11 Richard Sandiford <rsandifo@redhat.com>
1644
1645 * bfd-in.h (bfd_h8300_pad_address): Declare.
1646 * bfd-in2.h: Regenerate.
1647 * cpu-h8300.c (bfd_h8300_pad_address): New function.
1648 * coff-h8300.c (h8300_reloc16_estimate): Use it to canonicalize
1649 addresses before checking whether they can be relaxed.
1650 (h8300_reloc16_extra_cases): Likewise for the R_MOVL2 sanity check.
1651 Don't complain about overflows in general 8-bit relocations.
1652 * elf32-h8300.c (elf32_h8_relax_section): Use bfd_h8300_pad_address.
1653 Fix handling of R_H8_DIR24A8.
1654
1655 2003-07-11 Richard Sandiford <rsandifo@redhat.com>
1656
1657 * elf32-h8300.c: Convert function prototypes and definitions
1658 to C90 syntax.
1659 * coff-h8300.c: Likewise.
1660 * cpu-h8300.c: Likewise.
1661
1662 2003-07-11 Alan Modra <amodra@bigpond.net.au>
1663
1664 * po/SRC-POTFILES.in: Regenerate.
1665 * po/bfd.pot: Likewise.
1666
1667 2003-07-10 Bob Wilson <bob.wilson@acm.org>
1668
1669 * elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Create new
1670 .got.loc section. Do not set SEC_ALLOC or SEC_LOAD flags for the
1671 .xt.lit.plt section.
1672 (elf_xtensa_size_dynamic_sections): Set size of the .got.loc section
1673 and allocate memory for it.
1674 (elf_xtensa_combine_prop_entries): Copy contents of .xt.lit output
1675 section to the .got.loc section.
1676 (elf_xtensa_finish_dynamic_sections): Fix up call to
1677 elf_xtensa_combine_prop_entries and set DT_XTENSA_GOT_LOC_OFF to
1678 the address of .got.loc.
1679 (relax_property_section): Shrink .got.loc to match changes in any
1680 literal table section.
1681 (xtensa_is_property_section): Change to match
1682 xtensa_get_property_section_name.
1683 (xtensa_is_littable_section): New.
1684
1685 2003-07-10 H.J. Lu <hongjiu.lu@intel.com>
1686
1687 * elfxx-ia64.c (IA64_HOWTO): Set dst_mask to -1 instead of
1688 -1LL.
1689
1690 2003-07-10 Alan Modra <amodra@bigpond.net.au>
1691
1692 * Makefile.am (BFD32_BACKENDS): Add elf32-am33lin.lo.
1693 (BFD32_BACKENDS_CFILES): elf32-am33lin.c not elf32-am33lin.lo.
1694 Run "make dep-am".
1695 * Makefile.in: Regenerate.
1696
1697 2003-07-10 Alexandre Oliva <aoliva@redhat.com>
1698
1699 2001-09-12 Alexandre Oliva <aoliva@redhat.com>
1700 * elf32-am33lin.c (ELF_MACHINE_CODE): Redefine to EM_MN10300.
1701 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10300.
1702 2001-06-02 Nick Clifton <nickc@cambridge.redhat.com>
1703 * elf32-am33lin.c: Rename global functions.
1704 2001-05-09 Alexandre Oliva <aoliva@redhat.com>
1705 * config.bfd (am33_2.0, am33_2.0-*-linux*): Added.
1706 * configure.in (bfd_elf32_am33lin_vec): Added.
1707 * Makefile.am (BFD32_BACKENDS): Added elf32-am33lin.lo.
1708 (elf32-am33lin.lo): List dependencies.
1709 * aclocal.m4, configure, Makefile.in: Rebuilt.
1710 * elf-m10300.c (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME,
1711 ELF_ARCH, ELF_MACHINE_CODE, ELF_MAXPAGESIZE): Define only if
1712 ELF_ARCH was not defined before.
1713 (elf_symbol_leading_char): Define if not defined.
1714 * elf32-am33lin.c: Override the definitions above.
1715 * targets.c (bfd_elf32_am33lin_vec): New.
1716
1717 2003-07-09 Alexandre Oliva <aoliva@redhat.com>
1718
1719 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
1720 * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Initialize
1721 pcrel_relocs_copied.
1722 2001-12-13 Alexandre Oliva <aoliva@redhat.com>
1723 * elf-m10300.c (ELF_DYNAMIC_INTERPRETER): Renamed from
1724 ld-linux.so.2 to ld.so.1.
1725 2001-10-10 Alexandre Oliva <aoliva@redhat.com>
1726 * elf-m10300.c (elf_mn10300_sizeof_plt0): New macro.
1727 (_bfd_mn10300_elf_adjust_dynamic_symbol): Use it.
1728 (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
1729 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Allocate
1730 .rela.* section contents with bfd_zalloc.
1731 2001-09-25 Alexandre Oliva <aoliva@redhat.com>
1732 * elf-m10300.c: Added declarations for functions missing them.
1733 Merge some shared-library changes from the i386 back-end. Use
1734 R_MN10300_RELATIVE instead of R_MN10300_PCREL32 and
1735 R_MN10300_GLOB_DAT instead of R_MN10300_32 where appropriate.
1736 (struct elf32_mn10300_link_hash_entry): Remove duplicates of
1737 members of elf_link_hash_entry. Adjusted references.
1738 (mn10300_elf_final_link_relocate): dynobj was already loaded
1739 into a local variable, use it.
1740 2001-09-21 Nick Clifton <nickc@cambridge.redhat.com>
1741 * elf-m10300.c: Add missing function prototypes.
1742 2001-08-24 Alexandre Oliva <aoliva@redhat.com>
1743 * elf-m10300.c (mn10300_elf_relocate_section): Don't compute
1744 relocation for dynamic relocations.
1745 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
1746 * reloc.c (BFD_RELOC_MN10300_GOTOFF24): New.
1747 * elf-m10300.c: Introduce GOTPC16, GOTOFF24, GOTOFF16 and
1748 PLT16, and rename GOTPC to GOTPC32 and GOTOFF to GOTOFF32.
1749 (_bfd_mn10300_elf_create_dynamic_sections): Move creation ot PLT...
1750 (_bfd_mn10300_elf_create_got_section): ... here, so that its
1751 adress is already known at the time we compute relaxations.
1752 (mn10300_elf_relax_section): Relax GOTPC32, GOTOFF32, GOT32
1753 and PLT32 to narrower relocations.
1754 * libbfd.h, bfd-in2.h: Rebuilt.
1755 2001-04-12 Alexandre Oliva <aoliva@redhat.com>
1756 * reloc.c (BFD_RELOC_MN10300_GOT32, BFD_RELOC_MN10300_GOT24,
1757 BFD_RELOC_MN10300_GOT16, BFD_RELOC_MN10300_COPY,
1758 BFD_RELOC_MN10300_GLOB_DAT, BFD_RELOC_MN10300_JMP_SLOT,
1759 BFD_RELOC_MN10300_RELATIVE): New relocs.
1760 * libbfd.h, bfd-in2.h: Rebuilt.
1761 * elf-m10300.c (struct elf_mn10300_pcrel_relocs_copied): New.
1762 (struct elf32_mn10300_link_hash_entry): Added DSO-related
1763 fields.
1764 (elf_mn10300_howto): Defined new relocation types.
1765 (mn10300_reloc_map): Map them.
1766 (_bfd_mn10300_elf_create_got_section): New fn.
1767 (mn10300_elf_check_relocs): Handle PIC relocs.
1768 (mn10300_elf_final_link_relocate): Likewise.
1769 (mn10300_elf_relocate_section): Handle DSOs.
1770 (PLT0_ENTRY_SIZE, PLT_ENTRY_SIZE, PIC_PLT_ENTRY_SIZE): New macros.
1771 (elf_mn10300_plt0_entry, elf_mn10300_plt_entry,
1772 elf_mn10300_pic_plt_entry): New.
1773 (elf_mn10300_sizeof_plt, elf_mn10300_plt_plt0_offset,
1774 elf_mn10300_plt0_linker_offset, elf_mn10300_plt0_gotid_offset,
1775 elf_mn10300_plt_temp_offset, elf_mn10300_plt_symbol_offset,
1776 elf_mn10300_plt_reloc_offset: New macros.
1777 (ELF_DYNAMIC_INTERPRETER): Likewise.
1778 (_bfd_mn10300_elf_create_dynamic_sections): New function.
1779 (_bfd_mn10300_elf_adjust_dynamic_symbol): Likewise.
1780 (_bfd_mn10300_elf_discard_copies): Likewise.
1781 (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
1782 (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
1783 (_bfd_mn10300_elf_finish_dynamic_sections): Likewise.
1784 (elf_backend_can_gc_sections,
1785 elf_backend_create_dynamic_sections,
1786 elf_backend_adjust_dynamic_sections,
1787 elf_backend_size_dynamic_sections,
1788 elf_backend_finish_dynamic_symbol,
1789 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
1790 elf_backend_plt_readonly, elf_backend_want_plt_sym,
1791 elf_backend_got_header_size, elf_backend_plt_header_size): New
1792 macros.
1793
1794 2003-07-09 Alexandre Oliva <aoliva@redhat.com>
1795
1796 2001-05-06 Alexandre Oliva <aoliva@redhat.com>
1797 * elf-m10300.c (compute_function_info): Account for AM33
1798 registers in `movm' when computing stack space for `call' when
1799 linking for AM33/2.0 link.
1800 2000-04-01 Alexandre Oliva <aoliva@cygnus.com>
1801 * archures.c (bfd_mach_am33_2): Renamed from bfd_mach_am332.
1802 * bfd-in2.h: Rebuilt.
1803 * cpu-m10300.c (bfd_am33_2_arch): Renamed from bfd_am332_arch.
1804 * elf-m10300.c: Updated.
1805 2000-03-31 Alexandre Oliva <aoliva@cygnus.com>
1806 * archures.c (bfd_mach_am332): Defined.
1807 * bfd-in2.h: Rebuilt.
1808 * cpu-m10300.c (bfd_am332_arch): Defined.
1809 (bfd_am33_arch): Chained with am33-2.
1810 * elf-m10300.c (elf_mn10300_mach): Handle am332.
1811 (_bfd_mn10300_elf_final_write_processing): Likewise.
1812
1813 2003-07-09 H.J. Lu <hongjiu.lu@intel.com>
1814
1815 * elfxx-ia64.c (IA64_HOWTO): Set dst_mask to -1LL.
1816
1817 2003-07-10 Alan Modra <amodra@bigpond.net.au>
1818
1819 * elf64-ppc.c (bfd_elf64_mkobject): Define.
1820 (struct ppc64_elf_obj_tdata): New.
1821 (ppc64_elf_tdata, ppc64_tlsld_got): Define.
1822 (ppc64_elf_mkobject): New function.
1823 (struct got_entry): Add "owner". Move "tls_type".
1824 (struct ppc_link_hash_table): Delete "relgot", "tlsld_got".
1825 (ppc64_elf_init_stub_bfd): New function.
1826 (create_got_section): Create header .got in dynobj. Create .got
1827 and .rela.got in each bfd. Stash pointers in ppc64_elf_obj_tdata.
1828 (ppc64_elf_create_dynamic_sections): Don't call create_got_section.
1829 Look for dynobj .got, and test it.
1830 (ppc64_elf_copy_indirect_symbol): Adjust for changed got.
1831 (update_local_sym_info): Likewise.
1832 (ppc64_elf_check_relocs): Likewise.
1833 (ppc64_elf_gc_sweep_hook): Likewise.
1834 (ppc64_elf_tls_optimize): Likewise.
1835 (allocate_dynrelocs): Likewise.
1836 (ppc64_elf_size_dynamic_sections): Likewise.
1837 (ppc64_elf_relocate_section): Likewise.
1838 (ppc64_elf_next_toc_section): Update comment.
1839 (toc_adjusting_stub_needed): Remove unneeded cast.
1840 (ppc64_elf_build_stubs): Check for stub sections in stub bfd by
1841 testing section flags.
1842 (ppc64_elf_build_stubs): Likewise.
1843 (ppc64_elf_size_stubs): Likewise. Remove stub_bfd param.
1844 (ppc64_elf_finish_dynamic_sections): Write out got sections.
1845 (func_desc_adjust): Copy over dynamic info for undef weaks.
1846 * elf64-ppc.h (ppc64_elf_init_stub_bfd): Declare.
1847 (ppc64_elf_size_stubs): Update prototype.
1848 * elflink.h (elf_link_sort_relocs): Use link_orders to find reldyn
1849 input sections rather than scanning dynobj.
1850
1851 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
1852
1853 * elfxx-mips.c (mips_elf_link_hash_entry): Remove min_dyn_reloc_index.
1854 (bfd_mips_elf_swap_msym_in, bfd_mips_elf_swap_msym_out): Delete.
1855 (mips_elf_create_msym_section): Delete.
1856 (mips_elf_create_dynamic_relocation): Don't set min_dyn_reloc_index.
1857 (_bfd_mips_elf_copy_indirect_symbol): Likewise.
1858 (_bfd_mips_elf_create_dynamic_sections): Don't create .msym.
1859 (_bfd_mips_elf_size_dynamic_sections): Don't calculate its size.
1860 (_bfd_mips_elf_size_dynamic_sections): Don't add DT_MIPS_MSYM.
1861 (_bfd_mips_elf_finish_dynamic_symbol): Don't add symbols to .msym.
1862 (_bfd_mips_elf_finish_dynamic_sections): Likewise.
1863
1864 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
1865
1866 * elfxx-mips.c (mips_elf_irix6_finish_dynamic_symbol): Make the
1867 symbols protected.
1868
1869 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
1870
1871 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Fix handling
1872 of relocations whose offset is -2.
1873
1874 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
1875
1876 * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): Treat
1877 forced-local symbols like other locals. Don't create relocations
1878 against STN_UNDEF in irix objects.
1879
1880 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
1881
1882 * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): In SGI-
1883 compatible objects, add the values of defined external symbols
1884 to the addend.
1885
1886 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
1887
1888 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Always
1889 initialize a GOT entry to the symbol's st_value.
1890
1891 2003-07-08 Alan Modra <amodra@bigpond.net.au>
1892
1893 * elf-bfd.h (struct elf_obj_tdata): Move linker_section_pointers..
1894 * elf32-ppc.c (struct ppc_elf_obj_tdata): ..to here. New.
1895 (ppc_elf_tdata): Define.
1896 (elf_local_ptr_offsets): Adjust.
1897 (ppc_elf_mkobject): New function.
1898 (bfd_elf32_mkobject): Define.
1899
1900 * elfcode.h (elf_object_p): Allocate tdata via _bfd_set_format.
1901 * elfcore.h (elf_core_file_p): Likewise.
1902 * section.c (bfd_section_init): Remove prototype.
1903
1904 2003-07-08 Alan Modra <amodra@bigpond.net.au>
1905
1906 * elf-bfd.h (struct elf_link_hash_entry): Remove linker_section_pointer
1907 field.
1908 (enum elf_linker_section_enum): Delete.
1909 (struct elf_linker_section): Delete.
1910 (struct elf_linker_section_pointers): Delete.
1911 (struct elf_obj_tdata): Remove #if 0 chunk. Remove linker_section.
1912 Make linker_section_pointers a void**.
1913 (elf_local_ptr_offsets, elf_linker_section): Don't define.
1914 * elf32-ppc.c (enum elf_linker_section_enum): New, cut-down version
1915 of old item in elf-bfd.h.
1916 (struct elf_linker_section): Likewise.
1917 (struct elf_linker_section_pointers): Likewise.
1918 (elf_local_ptr_offsets): Define.
1919 (struct ppc_elf_link_hash_entry): Add linker_section_pointer.
1920 (ppc_elf_link_hash_newfunc): Init it.
1921 (struct ppc_elf_link_hash_table): Add sbss.
1922 (ppc_elf_link_hash_table_create): zmalloc rather than clearing
1923 individual fields.
1924 (elf_create_linker_section): Fold into..
1925 (ppc_elf_create_linker_section): ..here. Remove hole_size code.
1926 Make rela section here if shared.
1927 (elf_find_pointer_linker_section): Pass lsect rather than enum.
1928 (elf_create_pointer_linker_section): Adjust. zalloc rather than
1929 clearing in a loop.
1930 (elf_finish_pointer_linker_section): Adjust. Don't make rela
1931 section here.
1932 (ppc_elf_check_relocs): Adjust.
1933 (ppc_elf_add_symbol_hook): Tighten hash creator test. Remove code
1934 creating .sbss by hand.
1935 * elf.c (_bfd_elf_link_hash_newfunc): Adjust.
1936
1937 2003-07-04 Jakub Jelinek <jakub@redhat.com>
1938
1939 * elf32-s390.c (elf_howto_table): Change R_390_GOT12 to
1940 complain_overflow_bitfield.
1941 * elf64-s390.c (elf_howto_table): Change R_390_GOT12 to
1942 complain_overflow_bitfield.
1943
1944 2003-07-04 Jakub Jelinek <jakub@redhat.com>
1945
1946 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Return
1947 true even if -pie.
1948
1949 2003-07-04 Jakub Jelinek <jakub@redhat.com>
1950
1951 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add rel_fptr_sec.
1952 (elfNN_ia64_dynamic_symbol_p): Change info->shared into
1953 !info->executable.
1954 (get_fptr): For -pie create .opd as writable section and create
1955 .rela.opd as well.
1956 (elfNN_ia64_check_relocs): Change info->shared into
1957 !info->executable.
1958 (allocate_fptr): Likewise.
1959 (allocate_dynrel_entries): Account for a relative reloc for -pie
1960 @fptr(). Don't account for a relative reloc if -pie want_ltoff_fptr
1961 for undefweak symbol. Account for an IPLT reloc in .rela.opd
1962 section if -pie.
1963 (set_got_entry): Don't create a relative reloc if -pie
1964 want_ltoff_fptr for undefweak symbol.
1965 (set_fptr_entry): Emit an IPLT reloc in .rela.opd for -pie.
1966 (elfNN_ia64_relocate_section): Emit a relative reloc for -pie
1967 @fptr().
1968
1969 * elfxx-ia64.c (elfNN_ia64_relocate_section): Issue undefined_symbol
1970 even if -pie.
1971 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1972 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1973 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1974 * elf64-s390.c (elf_s390_relocate_section): Likewise.
1975 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1976 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
1977 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1978 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1979 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1980
1981 2003-07-04 Paul Clarke <paulc@senet.com.au>
1982
1983 * elf32-h8300.c (R_H8_DIR32A16): Fix name field.
1984 (elf32_h8_relax_section) <R_H8_DIR16A8>: Adjust position of relocation.
1985 <R_H8_DIR32A16>: Fix type of relocation.
1986
1987 2003-07-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1988
1989 * elf32-sh.c (sh_elf_create_dynamic_sections): Return if dynamic
1990 sections were created already. Remove unnecessary tests of
1991 the previous change.
1992
1993 2003-07-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1994
1995 * elf32-sh.c (sh_elf_create_dynamic_sections): Don't call
1996 bfd_make_section for existing sections.
1997
1998 2003-07-04 Alan Modra <amodra@bigpond.net.au>
1999
2000 * elf32-sparc.c (elf32_sparc_check_relocs): Don't call
2001 create_got_section if we already have done so.
2002 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
2003 (sh_elf_check_relocs): Likewise.
2004 (sh_elf_adjust_dynamic_symbol): Delete "dynobj" var. Use
2005 htab->root.dynobj instead.
2006 (sh_elf_check_relocs): Likewise.
2007 (sh_elf_finish_dynamic_sections): Likewise.
2008
2009 * section.c (bfd_make_section): Return NULL for existing section.
2010
2011 2003-07-04 Alan Modra <amodra@bigpond.net.au>
2012
2013 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Don't call
2014 ppc_elf_create_got if we've already done so.
2015
2016 * elf-bfd.h (_bfd_elf_create_linker_section) Don't declare.
2017 (_bfd_elf_find_pointer_linker_section): Likewise.
2018 (bfd_elf32_create_pointer_linker_section): Likewise.
2019 (bfd_elf32_finish_pointer_linker_section): Likewise.
2020 (bfd_elf64_create_pointer_linker_section): Likewise.
2021 (bfd_elf64_finish_pointer_linker_section): Likewise.
2022 (_bfd_elf_make_linker_section_rela): Likewise.
2023 * elfcode.h (elf_create_pointer_linker_section): Don't define.
2024 (elf_finish_pointer_linker_section): Likewise.
2025 * elflink.c (_bfd_elf_make_linker_section_rela): Delete.
2026 (_bfd_elf_create_linker_section): Move this function..
2027 (_bfd_elf_find_pointer_linker_section): ..and this..
2028 * elflink.h (elf_create_pointer_linker_section): ..and this..
2029 (elf_finish_pointer_linker_section): ..and this..
2030 * elf32-ppc.c: ..to here, renaming to the following, and adjusting
2031 calls.
2032 (elf_create_linker_section): Convert to C90, tidy.
2033 (elf_find_pointer_linker_section): Likewise.
2034 (elf_create_pointer_linker_section): Likewise.
2035 (elf_finish_pointer_linker_section): Likewise.
2036 * elf32-i370.c: Delete #if 0 code.
2037
2038 2003-07-02 Alan Modra <amodra@bigpond.net.au>
2039
2040 * elf64-ppc.c (ppc64_elf_func_desc_adjust): Don't allow _savef* and
2041 _restf* to be satisfied by shared libs, and always force them local.
2042 (toc_adjusting_stub_needed): Avoid scanning linker created sections.
2043 Correct test for "bl".
2044 (ppc64_elf_relocate_section <R_PPC64_TLS>): Correct test for
2045 primary opcode 31.
2046
2047 2003-07-01 Martin Schwidefsky <schwidefsky@de.ibm.com>
2048
2049 * elf32-s390.c (s390_elf_ldisp_reloc): New prototype.
2050 (s390_tls_reloc): New function.
2051 (elf_howto_table): Add long displacement relocations R_390_20,
2052 R_390_GOT20, R_390_GOTPLT20 and R_390_TLS_GOTIE20.
2053 (elf_s390_reloc_type_lookup): Likewise.
2054 (elf_s390_check_relocs): Likewise.
2055 (elf_s390_gc_sweep_hook): Likewise.
2056 (elf_s390_relocate_section): Likewise.
2057 * elf64-s390.c: Same changes as for elf32-s390.c.
2058 * reloc.c: Add long displacement relocations BFD_RELOC_390_20,
2059 BFD_RELOC_390_GOT20, BFD_RELOC_390_GOTPLT20 and
2060 BFD_RELOC_390_TLS_GOTIE20.
2061 * bfd-in2.h: Regenerate.
2062 * libbfd.h: Likewise.
2063
2064 2003-06-30 Alan Modra <amodra@bigpond.net.au>
2065
2066 * cpu-ia64-opc.c (ext_imms_scaled): Don't sign extend using shifts.
2067 (ins_imms, ins_immsm1u4): Likewise. Warning fix.
2068
2069 2003-06-29 Alan Modra <amodra@bigpond.net.au>
2070
2071 * archive.c: Convert to C90, remove unnecessary prototypes and casts.
2072 Replace PTR with void *. Formatting.
2073 * archive64.c: Likewise.
2074 * archures.c: Likewise.
2075 * bfd-in.h: Likewise.
2076 * bfd.c: Likewise.
2077 * bfdio.c: Likewise.
2078 * bfdwin.c: Likewise.
2079 * cache.c: Likewise.
2080 * corefile.c: Likewise.
2081 * format.c: Likewise.
2082 * init.c: Likewise.
2083 * libbfd-in.h: Likewise.
2084 * libbfd.c: Likewise.
2085 * linker.c: Likewise.
2086 * opncls.c: Likewise.
2087 * reloc.c: Likewise.
2088 * section.c: Likewise.
2089 * simple.c: Likewise.
2090 * syms.c: Likewise.
2091 * targets.c: Likewise.
2092 * bfd-in2.h: Regenerate.
2093 * libbfd.h: Regenerate.
2094
2095 * ecoff.c (bfd_debug_section): Add missing kept_section initialization.
2096 * libbfd-in.h (_bfd_sh_align_load_span): Don't declare if defined.
2097 * libbfd.c (COERCE32, EIGHT_GAZILLION): Simplify.
2098 (bfd_getb64): Rewrite without parens.
2099 (bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
2100 * cache.c (insert, snip): Remove INLINE.
2101 * linker.c (bfd_link_add_undef): Likewise.
2102
2103 2003-06-29 Andreas Jaeger <aj@suse.de>
2104
2105 * elf64-x86-64.c: Convert to ISO C90 prototypes, remove
2106 unnecessary prototypes. Replace PTR with void *.
2107 (elf64_x86_64_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL to
2108 trim plt entries. Move undefweak non-default visibility test ...
2109 (allocate_dynrelocs): ... from here.
2110 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
2111 Change all callers.
2112 (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL. Use
2113 SYMBOL_REFERENCES_LOCAL for dynreloc check.
2114 (elf64_x86_64_relocate_section): Use SYMBOL_CALLS_LOCAL for
2115 dynreloc and .got relocs.
2116 (elf64_x86_64_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL
2117 for .got relocs.
2118
2119 2003-06-29 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2120
2121 * elfxx-mips.c: Allow lazy binding for R_MIPS_JALR.
2122
2123 2003-06-27 Nick Clifton <nickc@redhat.com>
2124
2125 * opncls.c (bfd_add_gnu_debuglink_section): Rename to
2126 bfd_add_gnu_debuglink_section and only create the section, do not
2127 fill in its contents.
2128 (bfd_fill_in_gnu_debuglink_section): New function. Fill in the
2129 contents of a .gnu-debuglink section.
2130 * bfd-in2.h: Regenerate.
2131
2132 2003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2133
2134 * elfxx-mips.c: Revert .got alignment to 2**4.
2135
2136 2003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2137
2138 * elf32-mips.c: Fix addend for _gp_disp special symbol.
2139
2140 2003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2141
2142 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Remove non-default
2143 relocation header setup.
2144
2145 2003-06-25 Alan Modra <amodra@bigpond.net.au>
2146
2147 * elf32-ppc.c (ppc_elf_howto_table): Remove unnecessary cast.
2148 (ppc_elf_reloc_type_lookup): Modify comment.
2149 (ppc_elf_info_to_howto): Ditto.
2150 (ppc_elf_relocate_section): Ditto.
2151 (ppc_elf_check_relocs): Call ppc_elf_howto_init.
2152
2153 2003-06-25 Alan Modra <amodra@bigpond.net.au>
2154
2155 * aout-ns32k.c: Correct spelling of "relocatable".
2156 * aoutx.h: Likewise.
2157 * bfd-in.h: Likewise.
2158 * bfd.c: Likewise.
2159 * bout.c: Likewise.
2160 * coff-a29k.c: Likewise.
2161 * coff-alpha.c: Likewise.
2162 * coff-arm.c: Likewise.
2163 * coff-i386.c: Likewise.
2164 * coff-i860.c: Likewise.
2165 * coff-i960.c: Likewise.
2166 * coff-m68k.c: Likewise.
2167 * coff-m88k.c: Likewise.
2168 * coff-mcore.c: Likewise.
2169 * coff-mips.c: Likewise.
2170 * coff-or32.c: Likewise.
2171 * coff-ppc.c: Likewise.
2172 * coff-rs6000.c: Likewise.
2173 * coff-sh.c: Likewise.
2174 * coff-tic80.c: Likewise.
2175 * coff64-rs6000.c: Likewise.
2176 * cofflink.c: Likewise.
2177 * cpu-ns32k.c: Likewise.
2178 * ecoff.c: Likewise.
2179 * ecofflink.c: Likewise.
2180 * elf-bfd.h: Likewise.
2181 * elf-eh-frame.c: Likewise.
2182 * elf-hppa.h: Likewise.
2183 * elf-m10200.c: Likewise.
2184 * elf-m10300.c: Likewise.
2185 * elf.c: Likewise.
2186 * elf32-arm.h: Likewise.
2187 * elf32-avr.c: Likewise.
2188 * elf32-cris.c: Likewise.
2189 * elf32-d10v.c: Likewise.
2190 * elf32-dlx.c: Likewise.
2191 * elf32-fr30.c: Likewise.
2192 * elf32-frv.c: Likewise.
2193 * elf32-h8300.c: Likewise.
2194 * elf32-hppa.c: Likewise.
2195 * elf32-i370.c: Likewise.
2196 * elf32-i386.c: Likewise.
2197 * elf32-i860.c: Likewise.
2198 * elf32-i960.c: Likewise.
2199 * elf32-ip2k.c: Likewise.
2200 * elf32-iq2000.c: Likewise.
2201 * elf32-m32r.c: Likewise.
2202 * elf32-m68hc11.c: Likewise.
2203 * elf32-m68hc1x.c: Likewise.
2204 * elf32-m68k.c: Likewise.
2205 * elf32-mcore.c: Likewise.
2206 * elf32-mips.c: Likewise.
2207 * elf32-msp430.c: Likewise.
2208 * elf32-openrisc.c: Likewise.
2209 * elf32-ppc.c: Likewise.
2210 * elf32-s390.c: Likewise.
2211 * elf32-sh.c: Likewise.
2212 * elf32-sh64.c: Likewise.
2213 * elf32-sparc.c: Likewise.
2214 * elf32-v850.c: Likewise.
2215 * elf32-vax.c: Likewise.
2216 * elf32-xstormy16.c: Likewise.
2217 * elf32-xtensa.c: Likewise.
2218 * elf64-alpha.c: Likewise.
2219 * elf64-hppa.c: Likewise.
2220 * elf64-mips.c: Likewise.
2221 * elf64-mmix.c: Likewise.
2222 * elf64-ppc.c: Likewise.
2223 * elf64-s390.c: Likewise.
2224 * elf64-sh64.c: Likewise.
2225 * elf64-sparc.c: Likewise.
2226 * elf64-x86-64.c: Likewise.
2227 * elfcode.h: Likewise.
2228 * elflink.h: Likewise.
2229 * elfn32-mips.c: Likewise.
2230 * elfxx-ia64.c: Likewise.
2231 * elfxx-mips.c: Likewise.
2232 * i386linux.c: Likewise.
2233 * ieee.c: Likewise.
2234 * libcoff-in.h: Likewise.
2235 * linker.c: Likewise.
2236 * m68klinux.c: Likewise.
2237 * pdp11.c: Likewise.
2238 * pe-mips.c: Likewise.
2239 * peXXigen.c: Likewise.
2240 * reloc.c: Likewise.
2241 * reloc16.c: Likewise.
2242 * sparclinux.c: Likewise.
2243 * sunos.c: Likewise.
2244 * syms.c: Likewise.
2245 * versados.c: Likewise.
2246 * vms.c: Likewise.
2247 * xcofflink.c: Likewise.
2248 * bfd-in2.h: Regenerate.
2249 * libcoff.h: Regenerate.
2250 * libbfd.h: Regenerate.
2251
2252 2003-06-24 Alan Modra <amodra@bigpond.net.au>
2253
2254 * elf32-ppc.c (ppc_elf_check_relocs): Report plt reloc against
2255 local sym errors.
2256
2257 * elf32-i386.c: Convert to C90 function definitions, remove unnecessary
2258 prototypes and casts. Replace PTR with void *. Formatting.
2259 * elf32-ppc.c: Likewise. Break long strings too.
2260 (ppc_elf_relax_section): Use enum elf_ppc_reloc_type for r_type.
2261 (ppc_elf_unhandled_reloc): Internationalize error message.
2262 * elf32-ppc.h: Remove PARAMS.
2263
2264 2003-06-23 Mark Mitchell <mark@codesourcery.com>
2265
2266 * elf32-ppc.c (ppc_elf_begin_write_processing): Use bytes to count
2267 APUinfo slots.
2268 (ppc_elf_final_write_processing): Likewise.
2269
2270 2003-06-23 H.J. Lu <hongjiu.lu@intel.com>
2271
2272 * elflink.h (elf_link_input_bfd): Check raw size when using
2273 kept_section to preserve debug information discarded by
2274 linkonce.
2275
2276 2003-06-20 Alan Modra <amodra@bigpond.net.au>
2277
2278 * elf64-ppc.c (struct ppc_link_hash_table): Add top_id.
2279 (ppc64_elf_setup_section_lists): Set it.
2280 (ppc64_elf_relocate_section): Check sym section id against top_id.
2281 (ppc_build_one_stub): Comment on top_id.
2282
2283 2003-06-20 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
2284
2285 * config.bfd: Add tic4x-*-rtems*.
2286
2287 2003-06-20 Alan Modra <amodra@bigpond.net.au>
2288
2289 * elf64-ppc.c: Convert to C90 function definitions, remove unnecessary
2290 prototypes and casts. Replace PTR with void *. Format copyright.
2291 Mention ABI links.
2292 (struct ppc_link_hash_table): Rename sgot, srelgot, splt, srelplt,
2293 sdynbss, srelbss, sglink, sbrlt and srelbrlt to got, relgot .. relbrlt.
2294 (ppc_type_of_stub): Make r_type an enum.
2295 (ppc64_elf_size_stubs): Likewise.
2296 * elf64-ppc.h: Remove PARAMS macro.
2297
2298 2003-06-19 Alan Modra <amodra@bigpond.net.au>
2299
2300 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Reinstate init of
2301 elf hash tab fields.
2302
2303 * elf64-ppc.c (ppc64_elf_reloc_type_lookup): Tidy prototype.
2304 (ppc64_elf_info_to_howto): Likewise.
2305 (ppc64_elf_build_stubs): Add "stats" param, and print statistics.
2306 * elf64-ppc.h (ppc64_elf_build_stubs): Adjust prototype.
2307
2308 2003-06-19 Alan Modra <amodra@bigpond.net.au>
2309
2310 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore R_SPARC_DISP32
2311 reloc overflow on discarded eh_frame entries.
2312
2313 2003-06-19 Alan Modra <amodra@bigpond.net.au>
2314
2315 * elf64-ppc.c (toc_adjusting_stub_needed): New function.
2316 (ppc64_elf_next_input_section): Use it here to set has_gp_reloc.
2317 Return error condition.
2318 (ppc64_elf_size_stubs): Restrict toc adjusting stubs to sections
2319 that have has_gp_reloc set.
2320 (struct ppc_link_hash_table): Add stub_count.
2321 (ppc_build_one_stub): Increment it.
2322 (ppc64_elf_link_hash_table_create): zmalloc rather than clearing
2323 individual fields.
2324 * elf64-ppc.h (ppc64_elf_next_input_section): Update prototype.
2325
2326 2003-06-18 Alan Modra <amodra@bigpond.net.au>
2327
2328 * elflink.h (elf_gc_record_vtentry): Revert last change. Correct
2329 size calculation from addend. Round size up.
2330
2331 2003-06-18 Hans-Peter Nilsson <hp@axis.com>
2332
2333 * elf32-cris.c (cris_elf_relocate_section) <case
2334 R_CRIS_32_GOTREL>: When linking a program, don't complain about a
2335 symbol from a normal object or an undefined weak symbol.
2336
2337 2003-06-18 Alan Modra <amodra@bigpond.net.au>
2338
2339 * elf64-ppc.c (ppc64_elf_relocate_section): Accept a symbol on
2340 R_PPC64_TOC relocs.
2341
2342 2003-06-17 H.J. Lu <hongjiu.lu@intel.com>
2343
2344 * section.c (struct sec): Put back kept_section.
2345 (STD_SECTION): Put back kept_section initialization.
2346 * bfd-in2.h: Regenerate.
2347
2348 * elflink.h (elf_link_input_bfd): Also check discarded linkonce
2349 sections for relocateable output. Use kept_section to preserve
2350 debug information discarded by linkonce.
2351
2352 2003-06-17 Roland McGrath <roland@redhat.com>
2353
2354 * elfxx-ia64.c (elfNN_ia64_relocate_section): Support
2355 segment-relative relocation between different segments.
2356
2357 2003-06-17 Alan Modra <amodra@bigpond.net.au>
2358
2359 * elf64-ppc.c (ppc64_elf_relocate_section): Do unaligned reloc
2360 optimizations earlier.
2361
2362 * elf64-ppc.c (struct ppc_link_hash_table): Reinstate top_index.
2363 Restore previous input_list type.
2364 (ppc64_elf_link_hash_table_create): Undo last change.
2365 (ppc64_elf_setup_section_lists): Reinstate code setting up input lists
2366 per output section, but don't bother with bfd_abs_section marker.
2367 (ppc64_elf_next_input_section): Adjust for multiple input section
2368 lists.
2369 (group_sections): Likewise.
2370
2371 2003-06-17 Jakub Jelinek <jakub@redhat.com>
2372
2373 * elf64-ppc.c (ppc64_elf_relocation_section): Ensure
2374 *r_offset == r_addend for RELATIVE relocs against .got.
2375
2376 2003-06-17 Alan Modra <amodra@bigpond.net.au>
2377
2378 * elf64-ppc.c (ppc64_elf_relocate_section): Optimize unaligned relocs.
2379
2380 2003-06-17 Nick Clifton <nickc@redhat.com>
2381
2382 * elflink.h (elf_gc_record_vtentry): Allocate an extra element
2383 in the vtable_entries_used array to allow for the accessing
2384 the largest element.
2385
2386 2003-06-17 Alan Modra <amodra@bigpond.net.au>
2387
2388 * elf64-ppc.c (struct ppc_link_hash_table): Remove top_index. Modify
2389 input_list.
2390 (ppc64_elf_link_hash_table_create): Init input_list here.
2391 (ppc64_elf_setup_section_lists): Remove code setting up input lists
2392 per output section. Set toc_off for abs and other standard sections.
2393 (ppc64_elf_reinit_toc): Don't set elf_gp on input bfds lacking a toc.
2394 (ppc64_elf_next_input_section): Adjust for single input section list.
2395 Don't set toc_curr from input bfds that haven't set elf_gp.
2396 (group_sections): Adjust for single input section list.
2397
2398 * elf64-ppc.c (ppc64_elf_relocate_section): Correct pcrel section zero.
2399
2400 2003-06-16 Alan Modra <amodra@bigpond.net.au>
2401
2402 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing toctprel
2403 tls, check that a TOC16_DS or TOC16_LO_DS reloc isn't pointing to a
2404 dtprel entry. Ensure TLS_LD DTPMOD reloc has a zero addend. Write
2405 got section for RELATIVE relocs. Fix wrong comment. Change condition
2406 under which dynamic relocs update the section contents.
2407
2408 2003-06-13 Robert Millan <zeratul2@wanadoo.es>
2409
2410 * config.bfd: Add i386-netbsd-gnu target.
2411
2412 2003-06-12 Nick Clifton <nickc@redhat.com>
2413
2414 * opncls.c (calc_crc32): Rename to
2415 bfd_calc_gnu_debuglink_crc32 and export.
2416 (GNU_DEBUGLINK): Define and use to replace occurrences of
2417 hard-coded ".gnu_debuglink" in the code.
2418 (get_debug_link_info): Prevent aborts by replacing call to
2419 xmalloc with a call to malloc.
2420 (find_separate_debug_file): Prevent aborts by replacing calls
2421 to xmalloc and xstrdup with calls to malloc and strdup.
2422 (bfd_add_gnu_debuglink): New function. Add a .gnu_debuglink
2423 section to a bfd.
2424 * bfd-in2.h: Regenerate.
2425
2426 2003-06-12 Federico G. Schwindt <fgsch@lodoss.net>
2427
2428 * config.bfd (i[3-7]86-*-openbsd[0-2].* | i[3-7]86-*-openbsd3.[0-3]):
2429 New target (was i[3-7]86-*-openbsd* before).
2430 (i[3-7]86-*-openbsd*): Change to use bfd_elf32_i386_vec.
2431 (vax-*-openbsd*): New target.
2432
2433 2003-06-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2434
2435 * elfxx-mips.c (MIPS_ELF_OPTIONS_SECTION_NAME): Use .MIPS.options
2436 for n32, too.
2437 (MIPS_ELF_STUB_SECTION_NAME): Use .MIPS.stubs for n32, too.
2438 (mips_elf_rel_dyn_section): Use appropriate section alignment.
2439 (mips_elf_create_got_section): Likewise.
2440 (_bfd_mips_elf_create_dynamic_sections): Likewise.
2441
2442 2003-06-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2443
2444 * elf32-mips.c (mips_elf_generic_reloc): New Function.
2445 (elf_mips_howto_table_rel): Use it.
2446 (gprel32_with_gp): Move prototype.
2447 (mips_elf_hi16_reloc): Check for ! BSF_LOCAL instead of zero addend.
2448 Use mips_elf_generic_reloc.
2449 (mips_elf_got16_reloc): Check for ! BSF_LOCAL instead of zero addend.
2450 Code cleanup.
2451 (_bfd_mips_elf32_gprel16_reloc): Check for ! BSF_LOCAL instead of
2452 zero addend.
2453 (mips_elf_gprel32_reloc): Likewise. Use the same GP assignment logic
2454 as in the other *_gprel*_reloc functions.
2455 (gprel32_with_gp): Handle partial_inplace properly.
2456 (mips32_64bit_reloc): Use mips_elf_generic_reloc.
2457 (mips16_gprel_reloc): Check for ! BSF_LOCAL instead of zero addend.
2458 Do addend handling directly instead of calling
2459 _bfd_mips_elf_gprel16_with_gp. Handle partial_inplace properly.
2460 * elf64-mips.c (mips_elf64_hi16_reloc): Check for ! BSF_LOCAL instead
2461 of zero addend. Handle partial_inplace properly.
2462 (mips_elf64_got16_reloc): Check for ! BSF_LOCAL instead of zero
2463 addend.
2464 (mips_elf64_gprel16_reloc): Likewise.
2465 (mips_elf64_literal_reloc): Likewise.
2466 (mips_elf64_gprel32_reloc): Likewise. Use the same GP assignment
2467 logic as in the other *_gprel*_reloc functions. Handle
2468 partial_inplace properly.
2469 (mips_elf64_shift6_reloc): Check for ! BSF_LOCAL instead of zero
2470 addend. Handle partial_inplace properly.
2471 (mips16_gprel_reloc): Likewise. Do addend handling directly instead
2472 of calling _bfd_mips_elf_gprel16_with_gp.
2473 * elfn32-mips.c (mips_elf_got16_reloc): Check for BSF_LOCAL.
2474 (mips_elf_gprel32_reloc): Check for ! BSF_LOCAL instead
2475 of zero addend.
2476 (mips_elf_shift6_reloc): Handle partial_inplace properly.
2477 (mips16_gprel_reloc): Likewise. Do addend handling directly instead
2478 of calling _bfd_mips_elf_gprel16_with_gp.
2479 * elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp): Handle
2480 partial_inplace properly. Fix wrong addend handling. Fix overflow
2481 check.
2482 (_bfd_mips_elf_sign_extend): Renamed from mips_elf_sign_extend and
2483 exported.
2484 (mips_elf_calculate_relocation): Use _bfd_mips_elf_sign_extend.
2485 (_bfd_mips_elf_relocate_section): Likewise.
2486 (mips_elf_create_dynamic_relocation): Update sec_info_type access.
2487 * elfxx-mips.h (_bfd_mips_relax_section): Fix prototype declaration.
2488 (_bfd_mips_elf_sign_extend): New prototype.
2489
2490 2003-06-11 Federico G. Schwindt <fgsch@lodoss.net>
2491
2492 * config.bfd (sparc-*-openbsd[0-2].* | sparc-*-openbsd3.[0-1]):
2493 New target (was sparc-*-openbsd* before).
2494 (sparc-*-openbsd*): Change to use bfd_elf32_sparc_vec.
2495
2496 * configure.in (vax-*-openbsd*): Set COREFILE to netbsd-core.lo.
2497 * configure: Regenerate.
2498
2499 2003-06-11 H.J. Lu <hongjiu.lu@intel.com>
2500
2501 * po/Make-in (DESTDIR): New.
2502 (install-data-yes): Support $(DESTDIR).
2503 (uninstall): Likewise.
2504
2505 2003-06-11 Alan Modra <amodra@bigpond.net.au>
2506
2507 * Makefile.am (config.status): Depend on version.h.
2508 Run "make dep-am".
2509 * Makefile.in: Regenerate.
2510 * po/SRC-POTFILES.in: Regenerate.
2511
2512 2003-06-10 Alan Modra <amodra@bigpond.net.au>
2513 Gary Hade <garyhade@us.ibm.com>
2514
2515 * elf64-ppc.c (ppc64_elf_relocate_section <*_DS>): Special case lq.
2516
2517 2003-06-10 Richard Sandiford <rsandifo@redhat.com>
2518
2519 * archures.c (bfd_mach_h8300sxn): New architecture.
2520 * bfd-in2.h: Regenerate.
2521 * cpu-h8300.c (h8300_scan): Check for 'sxn'.
2522 (h8300sxn_info_struct): New.
2523 (h8300sx_info_struct): Link to it.
2524 * elf32-h8300.c (elf32_h8_mach): Add h8300sxn case.
2525 (elf32_h8_final_write_processing): Likewise.
2526
2527 2003-06-08 Alan Modra <amodra@bigpond.net.au>
2528
2529 * elf64-ppc.c: Move TARGET_LITTLE_SYM and other macros used by
2530 elfxx-target.h so that we can use elf_backend_got_header_size.
2531 (ELF_MACHINE_ALT1, ELF_MACHINE_ALT2): Delete.
2532 (GLINK_CALL_STUB_SIZE): Modify. Define new glink call stub and
2533 associated macros.
2534 (ppc64_elf_howto_raw <GOT_TPREL16_DS, GOT_TPREL16_LO_DS>): Correct
2535 dst_mask.
2536 (enum ppc_stub_type): Add ppc_stub_long_branch_r2off and
2537 ppc_stub_plt_branch_r2off.
2538 (struct ppc_stub_hash_entry): Reorganize.
2539 (struct ppc_link_hash_table): Add no_multi_toc, multi_toc_needed,
2540 toc_curr, toc_off and emit_stub_syms.
2541 (ppc64_elf_link_hash_table_create): Init them.
2542 (ppc_stub_name): Correct string size.
2543 (ppc64_elf_check_relocs): Set has_gp_reloc on GOT and TOC relocs.
2544 (ppc64_elf_size_dynamic_sections): Set no_multi_toc if GOT entries
2545 used.
2546 (ppc_type_of_stub): Tweak root.type test.
2547 (build_plt_stub): Remove glink code. Adjust for insn macro changes.
2548 (ppc_size_one_stub): Handle ppc_stub_long_branch_r2off and
2549 ppc_stub_plt_branch_r2off.
2550 (ppc_build_one_stub): Likewise. Fix var shadowing. Correct addis,addi
2551 range test. Use toc_off to calculte r2 values. Handle emit_stub_syms.
2552 (ppc64_elf_setup_section_lists): Remove htab creator flavour test.
2553 Initialize elf_gp and toc_curr.
2554 (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): New functions.
2555 (ppc64_elf_next_input_section): Set toc_off.
2556 (group_sections): Ensure groups have the same TOC.
2557 (ppc64_elf_size_stubs): Check whether we need a TOC adjusting stub.
2558 (ppc64_elf_build_stubs): Add emit_stub_syms param, and stash in htab.
2559 Build new glink stub.
2560 (ppc64_elf_relocate_section): Handle multiple TOCs. Fix comments.
2561 (ppc64_elf_finish_dynamic_sections): Adjust DT_PPC64_GLINK.
2562 * elf64-ppc.h (ppc64_elf_build_stubs): Update prototype.
2563 (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): Declare.
2564 * section.c (struct sec): Rename flag12 to has_gp_reloc.
2565 (STD_SECTION): Update.
2566 * ecoff.c (bfd_debug_section): Update comment.
2567 * bfd-in2.h: Regenerate.
2568
2569 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
2570
2571 * elfcode.h (elf_slurp_reloc_table_from_section): Don't dereference
2572 NULL function pointers.
2573
2574 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
2575
2576 * simple.c (bfd_simple_get_relocated_section_contents): Call
2577 _bfd_generic_link_add_symbols instead of bfd_link_add_symbols.
2578
2579 2003-06-04 Svein E. Seldal <Svein.Seldal@solidas.com>
2580
2581 * coff-tic54x.c: Removed the ticoff0_bad_format_hook() and
2582 ticoff1_bad_format_hook() functions. Removed the coff0 and coff1
2583 swaptables.
2584 * coff-tic4x.c: Ditto
2585 * coffcode.h: Added extra arguments to CREATE_BIG_COFF_TARGET_VEC
2586 and CREATE_LITTLE_COFF_TARGET_VEC. Created the macro
2587 CREATE_BIGHDR_COFF_TARGET_VEC. Created the ticoff0_bad_format_hook(),
2588 ticoff1_bad_format_hook() functions. Created the coff0 and coff1
2589 swap tables.
2590 * coff-tic4x.c: Adopted new CREATE_xxx_COFF_TARGET_VEC macros.
2591 * coff-a29k.c: Append COFF_SWAP_TABLE argument
2592 * coff-apollo.c: Ditto
2593 * coff-arm.c: Ditto
2594 * coff-h8300.c: Ditto
2595 * coff-h8500.c: Ditto
2596 * coff-i960.c: Ditto
2597 * coff-m68k.c: Ditto
2598 * coff-m88k.c: Ditto
2599 * coff-mcore.c: Ditto
2600 * coff-sh.c: Ditto
2601 * coff-sparc.c: Ditto
2602 * coff-tic80.c: Ditto
2603 * coff-we32k.c: Ditto
2604 * coff-z8k.c: Ditto
2605 * coff-w65.c: Ditto
2606
2607 2003-06-04 Svein E. Seldal <Svein.Seldal@solidas.com>
2608
2609 * coff-tic4x.c (ticoff0_swap_table, ticoff1_swap_table): Fixed
2610 initialization bug
2611
2612 2003-06-03 Jakub Jelinek <jakub@redhat.com>
2613
2614 * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_STACK.
2615 (bfd_section_from_phdr): Likewise.
2616 (map_sections_to_segments): Create PT_GNU_STACK segment header.
2617 (get_program_header_size): Count with PT_GNU_STACK.
2618 * elf-bfd.h (struct elf_obj_tdata): Add stack_flags.
2619 * elflink.h (bfd_elfNN_size_dynamic_sections): Set stack_flags.
2620
2621 2003-06-03 H.J. Lu <hongjiu.lu@intel.com>
2622
2623 * elflink.h (elf_link_input_bfd): Call linker error_handler
2624 for discarded definitions.
2625
2626 2003-06-03 Elias Athanasopoulos <elathan@phys.uoa.gr>
2627
2628 * syms.c (decode_section_type): Return 'n' if section flags are
2629 SEC_HAS_CONTENTS && SEC_READONLY.
2630
2631 2003-06-03 Nick Clifton <nickc@redhat.com>
2632
2633 * elf32-v850.c (v850_elf_howto_t): Rename R_V850_32to
2634 R_V850_ABS32. Add entry for R_V850_REL32.
2635 (v850_elf_reloc_map): Likewise.
2636 (v850_elf_check_relocs): Likewise.
2637 (v850_elf_perform_relocation): Likewise.
2638 (v850_elf_final_link_relocate): Likewise. Include computation
2639 to make R_V850_REl32 pc-relative.
2640
2641 2003-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2642
2643 * elf32-sh.c (sh_elf_size_dynamic_sections): Create .interp section
2644 and DT_DEBUG dynamic tag even for position independent executables.
2645 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewize.
2646
2647 2003-06-02 Daniel Jacobowitz <drow@mvista.com>
2648
2649 * config.bfd: Move obsolete entries out of the range of the
2650 targmatch sed script.
2651
2652 2003-06-02 Daniel Jacobowitz <drow@mvista.com>
2653
2654 * config.bfd (mips*-dec-bsd*, mips*-*-pe*): Mark as obsolete.
2655
2656 2003-05-31 Jakub Jelinek <jakub@redhat.com>
2657
2658 * elf32-ppc.c (allocate_dynrelocs): Use single slot for first 8192
2659 plt entries, not just 8191.
2660
2661 2003-05-30 Daniel Jacobowitz <drow@mvista.com>
2662
2663 * elfxx-mips.c (_bfd_mips_elf_discard_info): Correct loop index.
2664 Reported by Ken Faiczak <kfaiczak@SANDVINE.com>.
2665
2666 2003-05-30 Ulrich Drepper <drepper@redhat.com>
2667 Jakub Jelinek <jakub@redhat.com>
2668
2669 * elflink.h (elf_link_add_object_symbols): Use !info->executable
2670 instead of info->shared where appropriate.
2671 (bfd_elfNN_size_dynamic_sections, elf_link_output_extsym): Likewise.
2672 * elflink.c (_bfd_elf_create_got_section): Likewise.
2673 (_bfd_elf_link_create_dynamic_sections): Likewise.
2674 (_bfd_elf_link_assign_sym_version): Likewise.
2675 * elf32-i386.c (elf_i386_size_dynamic_sections): Create .interp section
2676 and DT_DEBUG dynamic tag even for position independent executables.
2677 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
2678 * elf32-s390.c (elf_s390_size_dynamic_sections: Likewise.
2679 * elf64-ppc.c (ppc64_elf_size_dynamic_sections: Likewise.
2680 * elf64-s390.c (elf_s390_size_dynamic_sections: Likewise.
2681 * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections: Likewise.
2682 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections: Likewise.
2683 * elf32-sparc.c (elf32_sparc_size_dynamic_sections: Likewise.
2684 * elf64-alpha.c (elf64_alpha_size_dynamic_sections: Likewise.
2685 * elf64-sparc.c (sparc64_elf_size_dynamic_sections: Likewise.
2686
2687 2003-05-30 Kris Warkentin <kewarken@qnx.com>
2688
2689 * elf.c (elfcore_grok_nto_status): Only set lwpid for the active or
2690 signalled thread.
2691 (elfcore_grok_nto_gregs): Only make .reg section for the active thread.
2692
2693 2003-05-29 Nick Clifton <nickc@redhat.com>
2694
2695 * pef.c: Include "safe-ctype.h" instead of <ctype.h>.
2696 Tidy up formatting.
2697 * Makefile.am: Add dependency on safe-ctype.h.
2698 * Makefile.in: Regenerate.
2699
2700 2003-05-29 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2701
2702 * elfxx-mips.c: Don't force symbols local unconditionally.
2703
2704 2003-05-28 Alan Modra <amodra@bigpond.net.au>
2705
2706 * elf32-hppa.c (elf32_hppa_relocate_section): Delete bogus
2707 undefined_symbol call.
2708
2709 2003-05-27 Richard Sandiford <rsandifo@redhat.com>
2710
2711 * elfxx-mips.c (mips_elf_hash_sort_data): Fix formattting.
2712 (mips_elf_link_hash_table): Likewise.
2713
2714 2003-05-22 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2715
2716 * elf64-mips.c (elf_mips_gnu_rel16_s2): Add internally used
2717 R_MIPS_GNU_REL16_S2 support.
2718 (bfd_elf64_bfd_reloc_type_lookup): Use it.
2719 (mips_elf64_rtype_to_howto): Use it.
2720 * elfn32-mips.c (elf_mips_gnu_rel16_s2): Add internally used
2721 R_MIPS_GNU_REL16_S2 support.
2722 (bfd_elf32_bfd_reloc_type_lookup): Use it.
2723 (mips_elf_n32_rtype_to_howto): Use it.
2724
2725 2003-05-21 Stuart F. Downing <sdowning@fame.com>
2726
2727 * som.h: Define PA_2_0 before including a.out.h
2728
2729 2003-05-07 Eric Christopher <echristo@redhat.com>
2730 Alexandre Oliva <aoliva@redhat.com>
2731
2732 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Adjust
2733 pic tests, change to warning.
2734 (_bfd_mips_elf_final_link): Remove EF_MIPS_CPIC flag setting.
2735
2736 2003-05-21 Marcus Comstedt <marcus@mc.pp.se>
2737
2738 * config.bfd: Check for a target triplet of shl-...-netbsdelf as
2739 well as shle-...-netbsdelf. Remove duplicate entry.
2740
2741 2003-05-21 Nick Clifton <nickc@redhat.com>
2742
2743 * elf32-xstormy16.c (xstormy16_elf_howto_table): Fix dst_mask
2744 for X_STORMY16_REL_12 reloc.
2745
2746 * elf.c (bfd_elf_get_needed_list): Use is_elf_hash_table to check
2747 the type of the hash table in the bfd_link_info structure.
2748 (bfd_elf_get_runpath_list): Likewise.
2749
2750 2003-05-19 Roland McGrath <roland@redhat.com>
2751
2752 * elf.c (bfd_elf_bfd_from_remote_memory): New function.
2753 * bfd-in.h: Declare it.
2754 * bfd-in2.h: Regenerated.
2755 * elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): New function.
2756 * elf-bfd.h (struct elf_backend_data): New function pointer member
2757 elf_backend_bfd_from_remote_memory.
2758 (_bfd_elf32_bfd_from_remote_memory, _bfd_elf64_bfd_from_remote_memory):
2759 Declare them.
2760 * elfxx-target.h (elf_backend_bfd_from_remote_memory): New macro.
2761 (elfNN_bed): Add that to the initializer.
2762
2763 2003-05-15 Roland McGrath <roland@redhat.com>
2764
2765 * elf.c (elfcore_grok_note): Grok NT_AUXV note, make ".auxv" section.
2766
2767 2003-05-20 Jakub Jelinek <jakub@redhat.com>
2768
2769 * elflink.h (elf_link_output_extsym): Only issue error about !=
2770 STV_DEFAULT symbols if they are bfd_link_hash_undefined.
2771
2772 2003-05-20 H.J. Lu <hongjiu.lu@intel.com>
2773
2774 * elflink.c (_bfd_elf_merge_symbol): Check ELF_LINK_DYNAMIC_DEF
2775 when removing the old definition for symbols with non-default
2776 visibility.
2777
2778 2003-05-18 Jason Eckhardt <jle@rice.edu>
2779
2780 * elf32-i860.c (elf32_i860_relocate_highadj): Simplify calculation.
2781
2782 2003-05-17 Andreas Schwab <schwab@suse.de>
2783
2784 * elf32-m68k.c (elf_m68k_check_relocs): Cache reloc section in
2785 elf_section_data during processing of pc-relative and absolute
2786 relocations.
2787 (elf_m68k_relocate_section): Use the cached reloc section instead
2788 of computing it again. Fix handling of visibility. Don't modify
2789 addend when copying over a relocation into the output.
2790
2791 2003-05-17 Alan Modra <amodra@bigpond.net.au>
2792
2793 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
2794 to trim plt entries. Move undefweak non-default visibility test..
2795 (allocate_dynrelocs): ..from here.
2796 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't test
2797 dynamic_sections_created here. Update comment. Move undefweak
2798 non-default visibility test..
2799 (allocate_dynrelocs): ..from here. Fix comment.
2800 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
2801 to trim plt entries. Move undefweak non-default visibility test..
2802 (allocate_dynrelocs): ..from here. Fix comment.
2803 * elflink.h (elf_link_output_extsym): Compare ELF_ST_VISIBILITY with
2804 STV_DEFAULT rather than comparing with zero.
2805 * elflink.c (_bfd_elf_merge_symbol): Likewise.
2806 (_bfd_elf_fix_symbol_flags): Likewise. Format comment.
2807
2808 2003-05-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2809
2810 * bfd.c (_bfd_get_gp_value): Prevent illegal access for abfd null
2811 pointers.
2812 (_bfd_set_gp_value): Likewise.
2813
2814 2003-05-16 Michael Snyder <msnyder@redhat.com>
2815 From Bernd Schmidt <bernds@redhat.com>
2816 * archures.c (bfd_mach_h8300sx): New.
2817 * bfd-in2.h: Regenerate.
2818 * cpu-h8300.c (h8300_scan)): Add support for h8300sx.
2819 (h8300sx_info_struct): New.
2820 (h8300s_info_struct): Link to it.
2821 * elf32-h8300.c (elf32_h8_mach): Add support for h8300sx.
2822 (elf32_h8_final_write_processing): Likewise.
2823 (elf32_h8_relax_section): Likewise.
2824
2825 2003-05-16 Kelley Cook <kelleycook@wideopenwest.com>
2826
2827 * config.bfd: Accept i[3-7]86 variants.
2828 * configure.host: Likewise.
2829 * configure.in: Likewise.
2830 * configure: Regenerate.
2831
2832 2003-05-15 H.J. Lu <hongjiu.lu@intel.com>
2833
2834 * elflink.c (_bfd_elf_fix_symbol_flags): Also hide protected
2835 symbol.
2836
2837 2003-05-15 H.J. Lu <hongjiu.lu@intel.com>
2838
2839 * elflink.h (elf_link_check_versioned_symbol): Also allow
2840 the base version.
2841
2842 2003-05-15 Alan Modra <amodra@bigpond.net.au>
2843 H.J. Lu <hongjiu.lu@intel.com>
2844
2845 * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL.
2846 (elf_i386_relocate_section): Likewise.
2847 * elf32-ppc.c (allocate_dynrelocs): Likewise.
2848 (ppc_elf_relocate_section): Likewise.
2849 * elf64-ppc.c (allocate_dynrelocs): Likewise.
2850 (ppc64_elf_relocate_section): Likewise.
2851
2852 2003-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2853
2854 * elf32-mips.c (gprel32_with_gp): Remove useless N64 ABI case.
2855
2856 2003-05-13 Stephane Carrez <stcarrez@nerim.fr>
2857
2858 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Check for
2859 processor capability, allow merge of HC12 and HCS12 in some cases.
2860 (m68hc11_elf_hash_table_create): Use bfd_malloc instead of bfd_zalloc.
2861 * cpu-m68hc12.c (bfd_m68hc12s_arch): New struct.
2862 (bfd_m68hc12_arch): Link it.
2863 (scan_mach): New function.
2864
2865 2003-05-13 Andrew Haley <aph@redhat.com>
2866
2867 * elf.c (bfd_elf_hash): Mask lower 32 bits of hash.
2868
2869 2003-05-13 Alan Modra <amodra@bigpond.net.au>
2870 H.J. Lu <hongjiu.lu@intel.com>
2871
2872 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Move from
2873 elf32-ppc.c. Add ELF_LINK_FORCED_LOCAL check.
2874 * elf32-ppc.c: (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Delete.
2875 (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for dynreloc check.
2876 (ppc_elf_relocate_section): Likewise.
2877 * elf64-ppc.c (allocate_dynrelocs): Likewise.
2878 (ppc64_elf_relocate_section): Likewise. Use for .got relocs too.
2879 (ppc64_elf_adjust_dynamic_symbol): Don't assume symbols with .plt
2880 relocs need no other types.
2881 * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for
2882 dynreloc check.
2883 (elf_i386_relocate_section): Likewise. Use for .got relocs too.
2884 (elf_i386_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL for
2885 .got relocs.
2886
2887 2003-05-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2888
2889 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): For weak symbols,
2890 copy ELF_LINK_NON_GOT_REF from weakdef.
2891 (allocate_dynrelocs): For undef weak syms with non-default
2892 visibility, a) don't allocate plt entries, b) don't allocate
2893 .got relocs, c) discard dyn rel space
2894 (sh_elf_relocate_section): d) don't generate .got relocs, e)
2895 don't generate dynamic relocs.
2896 (sh_elf_copy_indirect_symbol): Don't copy ELF_LINK_NON_GOT_REF
2897 for weakdefs when symbol already adjusted.
2898
2899 2003-05-12 Nick Clifton <nickc@redhat.com>
2900
2901 * elf32-xstormy16.c (xstormy16_elf_howto_table): use 'bitfield'
2902 overflow detection for R_XSTORMY16_16 reloc.
2903
2904 2003-05-12 Paul Clarke <paulc@senet.com.au>
2905
2906 * elf32-h8300.c: Fix typo in name of R_H8_DIR8 reloc.
2907
2908 2003-05-11 Jason Eckhardt <jle@rice.edu>
2909
2910 * elf32-i860.c (elf32_i860_relocate_highadj): Properly
2911 adjust upper bits.
2912 (elf32_i860_relocate_splitn): Obtain upper 5 bits from the
2913 proper place.
2914 (elf32_i860_relocate_pc16): Obtain upper 5 bits from the
2915 proper place.
2916
2917 2003-05-11 Andreas Schwab <schwab@suse.de>
2918
2919 * elf32-m68k.c (elf_m68k_relocate_section): Replace ugly
2920 complicated tests for unresolvable relocs with a simple direct
2921 scheme using "unresolved_reloc" var. Report some detail on
2922 bfd_reloc_outofrange and similar errors.
2923
2924 2003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
2925
2926 * elf32-s390.c (allocate_dynrelocs, elf_s390_relocate_section):
2927 Fix WILL_CALL_FINISH_DYNAMIC_SYMBOL call.
2928 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
2929 * elf64-s390.c: Likewise.
2930
2931 2003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
2932
2933 * elf32-s390.c (ELIMINATE_COPY_RELOCS): Define as one.
2934 (elf_s390_adjust_dynamic_symbol): For weak symbols, copy
2935 ELF_LINK_NON_GOT_REF from weakdef.
2936 (elf_s390_copy_indirect_symbol): Test whether the weakdef sym has
2937 already been adjusted before treating it specially.
2938 * el64-s390.c: Likwise.
2939
2940 2003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
2941
2942 * elf32-s390.c (allocate_dynrelocs): For undef weak syms with
2943 non-default visibility, a) don't make them dynamic, b) discard
2944 space for dynamic relocs.
2945 (elf_s390_relocate_section): Initialize the GOT entries and skip
2946 R_390_{8,16,32}/R_390_PC{16,16DBL,32DBL,32} for weak undefined
2947 symbols with non-default visibility.
2948 * elf64-s390.c: Likewise.
2949
2950 2003-05-09 Alan Modra <amodra@bigpond.net.au>
2951
2952 * cpu-arm.c (arm_check_note): Warning fix.
2953 * elf32-iq2000.c (iq2000_elf_check_relocs): Warning fixes. Arrange
2954 to keep relocs if edited.
2955 (iq2000_elf_print_private_bfd_data): Return TRUE.
2956 * elfxx-ia64.c (elfNN_ia64_relax_section): Use ELFNN_R_SYM, not
2957 ELF64_R_SYM.
2958 (elfNN_ia64_relax_ldxmov): Warning fix.
2959 * xtensa-isa.c (xtensa_add_isa): Warning fix.
2960 * xtensa-modules.c (get_num_opcodes): Warning fix.
2961
2962 2003-05-09 Andrey Petrov <petrov@netbsd.org>
2963
2964 * elf.c (elf_fake_sections): Use correct cast for sh_name.
2965
2966 2003-05-09 Alan Modra <amodra@bigpond.net.au>
2967
2968 * elflink.c (_bfd_elf_link_create_dynamic_sections): Move from
2969 elflink.h. Replace LOG_FILE_ALIGN with bed->s->log_file_align.
2970 (_bfd_elf_create_dynamic_sections): Use bed->s->log_file_align.
2971 (bfd_elf_record_link_assignment): Move from elflink.h.
2972 (_bfd_elf_merge_symbol): Likewise.
2973 (_bfd_elf_add_default_symbol): Likewise.
2974 (_bfd_elf_export_symbol): Likewise.
2975 (_bfd_elf_link_find_version_dependencies): Likewise.
2976 (_bfd_elf_link_assign_sym_version): Likewise.
2977 (_bfd_elf_link_read_relocs): Likewise.
2978 (_bfd_elf_link_size_reloc_section): Likewise.
2979 (_bfd_elf_fix_symbol_flags): Likewise.
2980 (_bfd_elf_adjust_dynamic_symbol): Likewise.
2981 (_bfd_elf_link_sec_merge_syms): Likewise.
2982 (elf_link_read_relocs_from_section): Likewise. Use bed->s->sizeof_rel
2983 and bed->s->sizeof_rela.
2984 (_bfd_elf_link_output_relocs): Likewise.
2985 * elf-bfd.h (struct elf_size_info): Rename file_align to
2986 log_file_align.
2987 (struct elf_info_failed): Move from elflink.h.
2988 (struct elf_assign_sym_version_info): Likewise.
2989 (struct elf_find_verdep_info): Likewise.
2990 (_bfd_elf_create_dynamic_sections): Delete duplicate declaration.
2991 (_bfd_elf_merge_symbol, _bfd_elf_add_default_symbol,
2992 _bfd_elf_export_symbol, _bfd_elf_link_find_version_dependencies,
2993 _bfd_elf_link_assign_sym_version,
2994 _bfd_elf_link_create_dynamic_sections, _bfd_elf_link_read_relocs,
2995 _bfd_elf_link_size_reloc_section, _bfd_elf_link_output_relocs,
2996 _bfd_elf_fix_symbol_flags, _bfd_elf_adjust_dynamic_symbol,
2997 _bfd_elf_link_sec_merge_syms): Declare.
2998 (bfd_elf32_link_create_dynamic_sections): Don't declare.
2999 (_bfd_elf32_link_read_relocs): Likewise.
3000 (bfd_elf64_link_create_dynamic_sections): Likewise.
3001 (_bfd_elf64_link_read_relocs): Likewise.
3002 * elflink.h: Move lots o' stuff elsewhere.
3003 * bfd-in.h (bfd_elf32_record_link_assignment): Don't declare.
3004 (bfd_elf64_record_link_assignment): Likewise.
3005 (bfd_elf_record_link_assignment): Declare.
3006 * bfd-in2.h: Regenerate.
3007 * elfcode.h (elf_link_create_dynamic_sections): Don't declare.
3008 (NAME(_bfd_elf,size_info)): Adjust for log_file_align.
3009 * elf.c (_bfd_elf_init_reloc_shdr): Adjust for bed->s->log_file_align.
3010 (assign_file_positions_for_segments): Likewise.
3011 (assign_file_positions_except_relocs): Likewise.
3012 (swap_out_syms, elfcore_write_note): Likewise.
3013 * elf-m10200.c: Adjust for changed function names.
3014 * elf-m10300.c: Likewise.
3015 * elf32-arm.h: Likewise.
3016 * elf32-h8300.c: Likewise.
3017 * elf32-hppa.c: Likewise.
3018 * elf32-ip2k.c: Likewise.
3019 * elf32-m32r.c: Likewise.
3020 * elf32-m68hc11.c: Likewise.
3021 * elf32-m68hc1x.c: Likewise.
3022 * elf32-m68k.c: Likewise.
3023 * elf32-mips.c: Likewise.
3024 * elf32-ppc.c: Likewise.
3025 * elf32-sh.c: Likewise.
3026 * elf32-v850.c: Likewise.
3027 * elf32-xtensa.c: Likewise.
3028 * elf64-alpha.c: Likewise.
3029 * elf64-hppa.c: Likewise.
3030 * elf64-mmix.c: Likewise.
3031 * elf64-ppc.c: Likewise.
3032 * elf64-sh64.c: Likewise.
3033 * elfxx-ia64.c: Likewise.
3034 * elfxx-mips.c: Likewise.
3035 (MIPS_ELF_LOG_FILE_ALIGN): Use log_file_align.
3036 * elf64-alpha.c (alpha_elf_size_info): Adjust for log_file_align.
3037 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
3038 * elf64-mips.c (mips_elf64_size_info): Likewise.
3039 * elf64-s390.c (s390_elf64_size_info): Likewise.
3040 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
3041
3042 2003-05-08 H.J. Lu <hongjiu.lu@intel.com>
3043
3044 * elflink.h (elf_add_default_symbol): After skipping the
3045 unversioned symbol, go to non-default one.
3046
3047 2003-05-07 H.J. Lu <hongjiu.lu@intel.com>
3048
3049 * elfxx-ia64.c (_bfd_elf_link_hash_hide_symbol): Also clear the
3050 want_plt field.
3051 (elfNN_ia64_relocate_section): Don't do dynamic symbol lookup
3052 for symbols with non-default visibility.
3053
3054 2003-05-07 H.J. Lu <hongjiu.lu@intel.com>
3055
3056 * elflink.h (elf_link_check_versioned_symbol): Also handle the
3057 case that a DSO references a hidden symbol which may be
3058 satisfied by a versioned symbol in another DSO.
3059 (elf_link_output_extsym): Check versioned definition for hidden
3060 symbol referenced by a DSO.
3061
3062 2003-05-07 Nick Clifton <nickc@redhat.com>
3063
3064 * elf32-xstormy16.c (xstormy16_elf_howto_table): Reset
3065 R_XSTORMY16_16 reloc to ignore overflows.
3066
3067 2003-05-06 Alexandre Oliva <aoliva@redhat.com>
3068
3069 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Improve
3070 error message for mixing different-endian files. Check for ABI
3071 compatibility of input files with the selected emulation.
3072
3073 2003-05-05 Alan Modra <amodra@bigpond.net.au>
3074
3075 * elf32-i386.c (allocate_dynrelocs): For undef weak syms with
3076 non-default visibility, a) don't make them dynamic, b) discard
3077 space for dynamic relocs.
3078 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
3079
3080 * elf32-ppc.c (allocate_dynrelocs): For undef weak syms with
3081 non-default visibility, a) don't allocate plt entries, b) don't
3082 allocate .got relocs, c) discard dyn rel space,
3083 (ppc_elf_relocate_section): d) don't generate .got relocs, e)
3084 don't generate dynamic relocs.
3085 * elf64-ppc.c (allocate_dynrelocs): As above.
3086 (ppc64_elf_relocate_section): As above.
3087
3088 2003-05-05 Andreas Jaeger <aj@suse.de>
3089
3090 * elf64-x86-64.c (allocate_dynrelocs): Don't allocate dynamic
3091 relocation entries for weak undefined symbols with non-default
3092 visibility.
3093 (elf64_x86_64_relocate_section): Initialize the GOT entries and
3094 skip R_386_32/R_386_PC32 for weak undefined symbols with
3095 non-default visibility.
3096
3097 2003-05-04 H.J. Lu <hjl@gnu.org>
3098
3099 * elf32-i386.c (allocate_dynrelocs): Don't allocate dynamic
3100 relocation entries for weak undefined symbols with non-default
3101 visibility.
3102 (elf_i386_relocate_section): Initialize the GOT entries and
3103 skip R_386_32/R_386_PC32 for weak undefined symbols with
3104 non-default visibility.
3105
3106 * elfxx-ia64.c (allocate_fptr): Don't allocate function
3107 descriptors for weak undefined symbols with non-default
3108 visibility.
3109 (allocate_dynrel_entries): Don't allocate relocation entries
3110 for symbols resolved to 0.
3111 (set_got_entry): Don't install dynamic relocation for weak
3112 undefined symbols with non-default visibility.
3113 (set_pltoff_entry): Likewise.
3114
3115 * elflink.h (elf_fix_symbol_flags): Hide weak undefined symbols
3116 with non-default visibility.
3117 (elf_link_output_extsym): Don't make weak undefined symbols
3118 with non-default visibility dynamic.
3119
3120 2003-05-04 H.J. Lu <hjl@gnu.org>
3121
3122 * elflink.h (elf_merge_symbol): Correctly handle weak definiton.
3123
3124 2003-05-04 H.J. Lu <hjl@gnu.org>
3125
3126 * elflink.h (elf_merge_symbol): Don't record a hidden/internal
3127 symbol dynamic. Check indirection when removing the old
3128 definition for symbols with non-default visibility.
3129 (elf_add_default_symbol): Skip when told by elf_merge_symbol.
3130
3131 2003-05-02 Nick Clifton <nickc@redhat.com>
3132
3133 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make the
3134 R_XSTORMY16_8 and R_XSTORMY16_16 relocs detect and complain about
3135 unsigned overflow.
3136
3137 2003-05-02 Andreas Jaeger <aj@suse.de>
3138
3139 * elf64-x86-64.c (elf_x86_64_copy_indirect_symbol): Don't copy
3140 ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
3141 (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
3142 (elf_x86_64_adjust_dynamic_symbol): For weak symbols, copy
3143 ELF_LINK_NON_GOT_REF from weakdef.
3144
3145 2003-05-02 Charles Lepple <clepple@ghz.cc>
3146 Nick Clifton <nickc@redhat.com>
3147
3148 * acinclude.m4: Fix name of --enable-install-libbfd switch.
3149 * aclocal.m4: Regenerate.
3150 * configure: Regenerate.
3151 * Makefile.in: Regenerate.
3152
3153 2003-05-01 Alan Modra <amodra@bigpond.net.au>
3154
3155 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Test whether the
3156 weakdef sym has already been adjusted before treating it specially.
3157 * elf32-i386.c (elf_i386_copy_indirect_symbol): Don't copy
3158 ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
3159 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
3160 (ppc64_elf_check_relocs): Set ELF_LINK_NON_GOT_REF.
3161
3162 2003-04-28 H.J. Lu <hjl@gnu.org>
3163
3164 * elfxx-ia64.c (elfNN_ia64_relax_section): Relax ldxmov during
3165 the relax finalize pass.
3166
3167 * section.c (struct sec): Add need_finalize_relax and remove
3168 flag11.
3169 (STD_SECTION): Update struct sec initializer.
3170 * bfd-in2.h: Regenerated.
3171
3172 2003-04-28 H.J. Lu <hjl@gnu.org>
3173
3174 * elflink.h (elf_merge_symbol): Call elf_backend_copy_indirect_symbol
3175 to copy any information related to dynamic linking when we flip
3176 the indirection.
3177
3178 2003-04-27 H.J. Lu <hjl@gnu.org>
3179
3180 * elf-bfd.h (ELF_LINK_DYNAMIC_DEF): New.
3181 (ELF_LINK_DYNAMIC_WEAK): New.
3182
3183 * elflink.h (elf_merge_symbol): Add one argument to indicate if
3184 a symbol should be skipped. Ignore definitions in dynamic
3185 objects for symbols with non-default visibility.
3186 (elf_add_default_symbol): Adjusted.
3187 (elf_link_add_object_symbols): Check if a symbol should be
3188 skipped. Don't merge the visibility field with the one from
3189 a dynamic object.
3190 (elf_link_check_versioned_symbol): Use undef_bfd.
3191 (elf_link_output_extsym): Warn if a forced local symbol is
3192 referenced from dynamic objects. Make non-weak undefined symbol
3193 with non-default visibility a fatal error.
3194
3195 2003-04-27 Daniel Jacobowitz <drow@mvista.com>
3196
3197 * configure.in: Bump version on HEAD to 2.14.90.
3198 * configure: Regenerated.
3199
3200 2003-04-26 Stephane Carrez <stcarrez@nerim.fr>
3201
3202 PR savannah/3331:
3203 * elf32-m68hc11.c (m68hc11_elf_relax_section): Clear prev_insn_group
3204 when we couldn't relax something.
3205
3206 2003-04-25 Alan Modra <amodra@bigpond.net.au>
3207
3208 * elflink.h (elf_merge_symbol): When we find a regular definition
3209 for an indirect symbol, flip the indirection so that the old
3210 direct symbol now points to the new definition.
3211
3212 2003-04-24 Roland McGrath <roland@redhat.com>
3213
3214 * elf.c (bfd_section_from_phdr): Map PT_GNU_EH_FRAME to "eh_frame_hdr".
3215
3216 2003-04-24 Alan Modra <amodra@bigpond.net.au>
3217
3218 * elf32-ppc.c: Formatting and comment fixes.
3219 (ELIMINATE_COPY_RELOCS): Move before ppc_elf_copy_indirect_symbol.
3220 (ppc_elf_copy_indirect_symbol): Copy flags here for weakdefs.
3221
3222 2003-04-24 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
3223
3224 * archures.c (bfd_mach_h8300hn, bfd_mach_h8300sn): Added.
3225 * bfd-in2.h: Rebuilt.
3226 * coff-h8300.c (BADMAG): Add check for H8300HNBADMAG & H8300SNBADMAG.
3227 * coffcode.h (coff_set_arch_mach_hook): Add case for H8300HNMAGIC
3228 & H8300SNMAGIC.
3229 (coff_set_flags): Add case for bfd_mach_h8300hn & bfd_mach_h8300sn.
3230 * cpu-h8300.c (h8300_scan): Handle h8300hn, h8300sn.
3231 (h8300sn_info_struct, h8300hn_info_struct): New.
3232 * elf32-h8300.c (elf32_h8_mach): Handle case for h8300hn & h8300sn
3233 (elf32_h8_final_write_processing): Likewise.
3234
3235 2003-04-23 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3236
3237 * elf32-sh.c (tpoff): New.
3238 (struct elf_sh_dyn_relocs): Remove tls_tpoff32.
3239 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
3240 (allocate_dynrelocs): Don't make unnecessary dynamic TLS
3241 relocations. Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses.
3242 (sh_elf_relocate_section): Likewise. Remove unnecessary tests.
3243 (dtpoff_base): Fix wrong indentation.
3244 (sh_elf_check_relocs): Don't set DF_STATIC_TLS flag with non-TLS
3245 relocations. Don't set tls_tpoff32 flag. Don't make unnecessary
3246 R_SH_TLS_TPOFF32 relocations.
3247
3248 2003-04-23 J"orn Rennecke <joern.rennecke@superh.com>
3249
3250 * archures.c (enum bfd_architecture): Amend comment to refer to SuperH.
3251 * cpu-sh.c: Likewise.
3252 * elf32-sh.c: Likewise.
3253 * reloc.c (bfd_reloc_code_real): Likewise.
3254 * elf32-sh64-com.c: Change comment to refer to SuperH.
3255 * elf32-sh64.c: Likewise.
3256 * elf64-sh64.c: Likewise.
3257 * bfd-in2.h (enum bfd_architecture): Regenerate.
3258
3259 2003-04-23 Alan Modra <amodra@bigpond.net.au>
3260
3261 From Julien LEMOINE <speedblue@debian.org>
3262 * elf32-i386.c (elf_i386_info_to_howto): Delete.
3263 (elf_info_to_howto): Define as elf_i386_info_to_howto_rel.
3264
3265 2003-04-22 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
3266
3267 * archures.c: Replace references to Mitsubishi M32R with references
3268 to Renesas M32R.
3269 * relocs.c: Likewise.
3270 * bfd-in2.h: Regenerate.
3271
3272 2003-04-21 Richard Henderson <rth@redhat.com>
3273
3274 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Return false for an
3275 executable when a symbol is defined both regular and dynamic.
3276
3277 2003-04-21 Stephane Carrez <stcarrez@nerim.fr>
3278
3279 * Makefile.am (BFD32_BACKENDS): Add elf32-m68hc1x.lo.
3280 (elf32-m68hc1x.lo): Update dependencies
3281 * configure.in: Add elf32-m68hc1x.lo.
3282 * configure: Rebuild.
3283 * Makefile.in: Rebuild.
3284
3285 2003-04-21 Stephane Carrez <stcarrez@nerim.fr>
3286
3287 * elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
3288 (m68hc11_elf_hash_table_create): New function.
3289 (elf32_m68hc11_link_hash_table_free): New function.
3290 (stub_hash_newfunc): New function.
3291 (m68hc11_add_stub): New function.
3292 (elf32_m68hc11_add_symbol_hook): New function.
3293 (elf32_m68hc11_setup_section_lists): New function.
3294 (elf32_m68hc11_next_input_section): New function.
3295 (elf32_m68hc11_size_stubs): New function.
3296 (elf32_m68hc11_build_stubs): New function.
3297 (m68hc11_get_relocation_value): New function.
3298 (elf32_m68hc11_relocate_section): Call the above to redirect
3299 some relocations to the trampoline code.
3300 (m68hc11_elf_export_one_stub): New function.
3301 (m68hc11_elf_set_symbol): New function.
3302 (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse.
3303 (m68hc11_elf_get_bank_parameters): Get parameters only when the info
3304 is not yet initialized.
3305
3306 * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
3307 (elf32_m68hc11_stub_hash_entry): New struct.
3308 (m68hc11_page_info): Add trampoline handler address.
3309 (m68hc11_elf_link_hash_table): Add stubs generation members.
3310 (elf32_m68hc11_add_symbol_hook): Declare.
3311 (elf32_m68hc11_setup_section_lists): Declare.
3312 (elf32_m68hc11_size_stubs): Declare.
3313 (elf32_m68hc11_build_stubs): Declare.
3314
3315 * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c.
3316 (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise.
3317 (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto.
3318 (_bfd_m68hc11_elf_set_private_flags): Ditto.
3319 (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto.
3320 (_bfd_m68hc11_elf_print_private_bfd_data): Ditto.
3321 (bfd_elf32_bfd_link_hash_table_create): Define.
3322 (elf_backend_add_symbol_hook): Define.
3323 (m68hc11_elf_bfd_link_hash_table_create): New function.
3324 (m68hc11_elf_build_one_stub): New function.
3325 (m68hc11_elf_size_one_stub): New function.
3326 (m68hc11_elf_bfd_link_hash_table_create): Install the above.
3327 (bfd_elf32_bfd_link_hash_table_create): Define.
3328
3329 * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove.
3330 (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked.
3331 (m68hc12_phys_addr): Ditto.
3332 (m68hc12_phys_page): Ditto.
3333 (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c.
3334 (elf32_m68hc11_gc_mark_hook): Likewise.
3335 (elf32_m68hc11_gc_sweep_hook): Likewise.
3336 (elf32_m68hc11_check_relocs): Likewise.
3337 (elf32_m68hc11_relocate_section): Likewise.
3338 (_bfd_m68hc12_elf_set_private_flags): Likewise.
3339 (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise.
3340 (_bfd_m68hc12_elf_print_private_bfd_data): Likewise.
3341 (m68hc12_elf_build_one_stub): New function.
3342 (m68hc12_elf_size_one_stub): New function.
3343 (m68hc12_elf_bfd_link_hash_table_create): New function, use the above.
3344 (elf_backend_add_symbol_hook): Define.
3345 (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
3346
3347 2003-04-18 Nick Clifton <nickc@redhat.com>
3348
3349 * format.c (bfd_check_format_matches): Only check associated
3350 vector if the matching_vector has been created.
3351
3352 2003-04-15 Alexandre Oliva <aoliva@redhat.com>
3353
3354 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Fix typo in
3355 2003-04-09's change.
3356
3357 2003-04-15 Brian Ford <ford@vss.fsi.com>
3358
3359 * peicode.h (coff_swap_scnhdr_in): If a section holds
3360 uninitialized data and is from an object file or from an
3361 executable image that has not initialized the s_size field, or if
3362 the physical size is padded, use the virtual size (stored in
3363 s_paddr) instead.
3364
3365 2003-04-15 H.J. Lu <hjl@gnu.org>
3366
3367 * elflink.h (elf_link_add_object_symbols): Properly report
3368 filename for alignment reduction.
3369
3370 2003-04-15 Rohit Kumar Srivastava <rohits@kpitcummins.com>
3371
3372 * archures.c: Replace occurrances of 'Hitachi' with 'Renesas'.
3373 * reloc.c: Likewise.
3374 * coff-h8300.c: Likewise.
3375 * coff-h8500.c: Likewise.
3376 * coff-sh.c: Likewise.
3377 * cpu-h8300.c: Likewise.
3378 * cpu-sh.c: Likewise.
3379 * elf32-h8300.c: Likewise.
3380 * elf32-sh.c: Likewise.
3381 * elf32-sh64-com.c: Likewise.
3382 * elf32-sh64.c: Likewise.
3383 * elf64-sh64.c: Likewise.
3384 * bfd-in2.h: Regenerate.
3385
3386 2003-04-14 H.J. Lu <hjl@gnu.org>
3387
3388 * elflink.h (elf_link_add_object_symbols): Maintain maximum
3389 alignment for common symbols. Warn reducing alignment for
3390 common symbols. Report old filename when symbol size changes.
3391
3392 2003-04-12 Alexandre Oliva <aoliva@redhat.com>
3393
3394 * elfxx-mips.c (mips_elf_calculate_relocation): Adjust two other
3395 occurrences of the same test changed in the previous patch.
3396 Optimize.
3397
3398 2003-04-11 Alexandre Oliva <aoliva@redhat.com>
3399
3400 * elfxx-mips.c (mips_elf_get_global_gotsym_index): New.
3401 (mips_elf_calculate_relocation): Decay GOT_PAGE/GOT_OFST to
3402 GOT_DISP/addend only if the symbol got a global GOT entry.
3403
3404 2003-04-10 Alexandre Oliva <aoliva@redhat.com>
3405
3406 * elfxx-mips.c (mips_elf_calculate_relocation): Decay
3407 GOT_PAGE/GOT_OFST referencing overridable symbol to
3408 GOT_DISP/addend.
3409 (_bfd_mips_elf_check_relocs): Handle GOT_PAGE referencing
3410 global symbol as GOT_DISP.
3411
3412 2003-04-10 Bob Wilson <bob.wilson@acm.org>
3413
3414 * elf32-xtensa.c (elf_xtensa_relocate_section): Don't continue to the
3415 next relocation on an undefined symbol.
3416
3417 2003-04-09 Richard Henderson <rth@redhat.com>
3418
3419 * elf64-alpha.c (elf64_alpha_relocate_section) <R_ALPHA_GPREL32>:
3420 Ignore relocations against r_symndx == 0.
3421
3422 2003-04-09 H.J. Lu <hjl@gnu.org>
3423
3424 * elf64-alpha.c (elf64_alpha_relocate_section): Don't return
3425 FALSE for undefined symbols.
3426 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
3427
3428 2003-04-09 Alexandre Oliva <aoliva@redhat.com>
3429
3430 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Try DWARF3-standard
3431 and IRIX-specific shift-to-64-bit 4-byte lengths before following
3432 addr_size.
3433
3434 2003-04-08 Alexandre Oliva <aoliva@redhat.com>
3435
3436 * elf32-mips.c (bfd_elf32_bfd_reloc_type_lookup): Detect (ctor)
3437 pointer size from ABI, not arch_bits_per_address.
3438
3439 2003-04-07 Kevin Buettner <kevinb@redhat.com>
3440
3441 * elfn32-mips.c (elf32_mips_grok_prstatus): Adjust core file related
3442 constants for n32 ABI.
3443
3444 2003-04-06 Andrew Cagney <cagney@redhat.com>
3445
3446 * simple.c (bfd_simple_get_relocated_section_contents): Disable
3447 free that leads to GDB vs BFD memory corruption.
3448
3449 2003-04-04 Stephane Carrez <stcarrez@nerim.fr>
3450
3451 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Also adjust
3452 symbols that mark the end of the section.
3453 (m68hc11_elf_relax_section): Use R_M68HC11_PCREL_8 relocs when
3454 converting to a relative branch so that the offset is computed after
3455 the relaxation; also relocate a jsr into a bsr if possible but don't
3456 relax them if they are to a far symbol as we need to call the
3457 trampoline code.
3458 (elf_m68hc11_howto_table): Set pcrel_offset to true.
3459
3460 2003-04-04 Svein E. Seldal <Svein.Seldal@solidas.com>
3461
3462 * archures.c: Namespace cleanup. Rename bfd_mach_c3x to
3463 bfd_mach_tic3x and bfd_mach_c4x to bfd_mach_tic4x
3464 * bfd-in2.h: Regenerate
3465 * coff-tic4x.c: Namespace cleanup. Replace s/c4x/tic4x/
3466 * cpu-tic4x.c: Ditto
3467
3468 2003-04-03 Nick Clifton <nickc@redhat.com>
3469
3470 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Compute ps and ss
3471 differently for object files and executables.
3472 * peicode.h (coff_swap_scnhdr_in): Only set the s_size field
3473 for object files or for executables who have not already
3474 initialised the field.
3475 * libpei.h (bfd_pe_executable_p): New macro. Return true if
3476 the PE format bfd is an executable.
3477
3478 2003-04-03 Alan Modra <amodra@bigpond.net.au>
3479
3480 * elf32-ppc.c (ppc_elf_check_relocs): Don't use SYMBOL_REFERENCES_LOCAL
3481 here as it's too early to reliably determine locality.
3482 (ppc_elf_gc_sweep_hook): Likewise.
3483 (SYMBOL_REFERENCES_LOCAL): Expand comment.
3484
3485 2003-04-02 Bob Wilson <bob.wilson@acm.org>
3486
3487 * xtensa-modules.c: Remove comment indicating that this is a
3488 generated file.
3489
3490 2003-04-02 Alan Modra <amodra@bigpond.net.au>
3491
3492 * elfxx-mips.c (_bfd_mips_elf_hide_symbol): Test for NULL dynobj.
3493
3494 2003-04-01 Bob Wilson <bob.wilson@acm.org>
3495
3496 * Makefile.am (ALL_MACHINES): Add cpu-xtensa.lo.
3497 (ALL_MACHINES_CFILES): Add cpu-xtensa.c.
3498 (BFD32_BACKENDS): Add elf32-xtensa.lo, xtensa-isa.lo, and
3499 xtensa-modules.lo.
3500 (BFD32_BACKENDS_CFILES): Add elf32-xtensa.c, xtensa-isa.c, and
3501 xtensa-modules.c.
3502 (cpu-xtensa.lo): New target.
3503 (elf32-xtensa.lo): Likewise.
3504 (xtensa-isa.lo): Likewise.
3505 (xtensa-modules.lo): Likewise.
3506 * Makefile.in: Regenerate.
3507 * archures.c (bfd_architecture): Add bfd_{arch,mach}_xtensa.
3508 (bfd_archures_list): Add bfd_xtensa_arch.
3509 * config.bfd: Handle xtensa-*-*.
3510 * configure.in: Handle bfd_elf32_xtensa_{le,be}_vec.
3511 * configure: Regenerate.
3512 * reloc.c: Add BFD_RELOC_XTENSA_{RTLD,GLOB_DAT,JMP_SLOT,RELATIVE,
3513 PLT,OP0,OP1,OP2,ASM_EXPAND,ASM_SIMPLIFY}.
3514 * targets.c (bfd_elf32_xtensa_be_vec): Declare.
3515 (bfd_elf32_xtensa_le_vec): Likewise.
3516 (bfd_target_vector): Add bfd_elf32_xtensa_{be,le}_vec.
3517 * cpu-xtensa.c: New file.
3518 * elf32-xtensa.c: Likewise.
3519 * xtensa-isa.c: Likewise.
3520 * xtensa-modules.c: Likewise.
3521 * libbfd.h: Regenerate.
3522 * bfd-in2.h: Likewise.
3523
3524 2003-04-01 Nick Clifton <nickc@redhat.com>
3525
3526 * archures.c (bfd_mach_arm_unknown): Define.
3527 * bfd-in.h (bfd_arm_merge_machines, bfd_arm+update_notes,
3528 bfd_arm_get_mach_from_notes): Prototype.
3529 * bfd-in2.h: Regenerate.
3530 * coff-arm.c (coff_arm_merge_private_bfd_data): Call
3531 bfd_arm_merge_machines.
3532 (coff_arm_final_link_postscript): Call bfd_arm_update_notes.
3533 * coffcode.h (coff_set_arch_mach_hook): Call
3534 bfd_arm_get_mach_from_notes.
3535 * coffgen.c (coff_real_object_p): Revert previous delta.
3536 * cpu_arm.c (arm_check_note): New function. Examine a note in a
3537 .note section.
3538 (bfd_arm_merge_machines): New function: Handle the merging of ARM
3539 binaries compiled for different architectures..
3540 (bfd_arm_update_notes): New function: Update an ARM note section.
3541 (bfd_arm_get_mach_from_notes): New function: Extract a bfd machine
3542 number from an ARM note section.
3543 * elf32-arm.h (elf32_arm_object_p): Use
3544 bfd_arm_get_mach_from_notes.
3545 (elf32_arm_merge_private_bfd_data): Use bfd_arm_merge_machines.
3546 (elf32_arm_final_write_processing): Use bfd_arm_update_notes.
3547
3548 2003-04-01 Ben Elliston <bje@wasabisystems.com>
3549
3550 * dwarf2.c (read_attribute_value): Correct typo in comment.
3551
3552 2003-04-01 Nick Clifton <nickc@redhat.com>
3553
3554 * dwarf2.c (concat_filename): Use bfd_malloc() and strdup()
3555 instead of concat().
3556 (decode_line_info): Only free filename if it is not NULL.
3557 (add_line_info): Make a copy of the filename when storing it into
3558 the info structure.
3559
3560 2003-03-31 Andreas Schwab <schwab@suse.de>
3561 Daniel Jacobowitz <drow@mvista.com>
3562
3563 * simple.c (bfd_simple_get_relocated_section_contents): Add
3564 parameter symbol_table. Optionally use it instead of the symbol
3565 table from the bfd. Save and restore output offsets and output
3566 sections around bfd_get_relocated_section_contents. Fix a memory
3567 leak.
3568 (simple_save_output_info, simple_restore_output_info): New
3569 functions.
3570 * bfd-in2.h: Regenerate.
3571 * dwarf2.c (read_abbrevs): Use
3572 bfd_simple_get_relocated_section_contents instead of
3573 bfd_get_section_contents.
3574 (decode_line_info): Likewise.
3575 (_bfd_dwarf2_find_nearest_line): Likewise. Don't call
3576 find_rela_addend.
3577 (find_rela_addend): Remove.
3578 * elfxx-ia64.c (elfNN_ia64_reloc): Weaken sanity check for
3579 debugging sections.
3580 (elfNN_ia64_hash_table_create): Create the hash table with malloc,
3581 not bfd_zalloc.
3582
3583 2003-03-31 David Heine <dlheine@suif.stanford.edu>
3584
3585 * aoutx.h (aout_link_hash_table_create): Use bfd_malloc instead of
3586 bfd_alloc.
3587 * dwarf2.c (concat_filename): Always allocate space for the
3588 returned filename.
3589 (decode_line_info): Free the allocated filename returned by
3590 concat_filename.
3591 * elf-eh-frame.c (bfd_elf_write_section_eh_frame): Fix memory leaks.
3592 * elf.c (copy_private_bfd_data): Likewise.
3593 (_bfd_elf_slurp_version_tables): Fix bug freeing contents pointer.
3594 * elflink.h (elf_link_sort_relocs): Fix memory leak.
3595 * format.c (bfd_check_format_matches): Likewise.
3596 * linker.c (bfd_generic_final_link): Likewise.
3597 * opncls.c (find_separate_debug_info): Likewise.
3598 * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
3599
3600 2003-03-28 H.J. Lu <hjl@gnu.org>
3601
3602 * elflink.h (elf_link_add_object_symbols): Correctly combine
3603 visibilities.
3604
3605 2003-03-27 Jakub Jelinek <jakub@redhat.com>
3606
3607 * elfxx-ia64.c (elfNN_ia64_relax_section): Reset self_dtpmod_offset
3608 to -1 before recomputing got offsets.
3609
3610 2003-03-26 Andreas Schwab <schwab@suse.de>
3611
3612 * elf32-m68k.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
3613 (elf_m68k_relocate_section): Use it to correctly handle symbols
3614 forced to be local.
3615 (elf_m68k_finish_dynamic_symbol): Emit RELATIVE reloc for got
3616 entries for symbols that are forced to be local.
3617
3618 2003-03-25 Alexandre Oliva <aoliva@redhat.com>
3619
3620 * elfxx-mips.c (_bfd_mips_relax_section): New function.
3621 * elfxx-mips.h (_bfd_mips_relax_section): Declare.
3622 * elfn32-mips.c, elf64-mips.c: Use it.
3623
3624 2003-03-25 Stan Cox <scox@redhat.com>
3625 Nick Clifton <nickc@redhat.com>
3626
3627 Contribute support for Intel's iWMMXt chip - an ARM variant:
3628
3629 * archures.c: Add bfd_mach_arm_iWMMXt.
3630 * reloc.c: Add BFD_RELOC_ARM_CP_OFF_IMM_S2.
3631 * bfd-in2.h: Regenerate.
3632 * libbfd.h: Regenerate.
3633 * coff-arm.c (coff_arm_merge_private_bfd_data): Allow iWMMXt
3634 object files to be linked with XScale ones.
3635 (coff_arm_final_link_postscript): Update note section.
3636 * coffcode.h (coff_set_arch_mach_hook): Handle note section.
3637 * coffgen.c (coff_real_object_p): Call bfd_coff_set_arch_mach_hook
3638 after identifying a coff binary.
3639 * cpu-arm.c (processors): Add iWMMXt.
3640 (arch_inf): Likewise.
3641 * elf32-arm.h (arm_object_p): Handle note section.
3642 (elf32_arm_merge_private_bfd_data): Allow iWMMXt object files to
3643 be linked with XScale ones.
3644 (elf32_arm_section_flags): New function: Set flags on note section.
3645 (elf32_arm_final_write_processing): Handle note section.
3646
3647 2003-03-21 DJ Delorie <dj@redhat.com>
3648
3649 * elf32-xstormy16.c (elf32_xstormy16_relocate_section): Call
3650 _bfd_elf_rela_local_sym.
3651
3652 2003-03-20 H.J. Lu <hjl@gnu.org>
3653
3654 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't try relax for
3655 non-ELF outputs.
3656
3657 2003-03-20 Nick Clifton <nickc@redhat.com>
3658
3659 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Initialise $idata2 and
3660 $idata5 in case bfd_coff_final_link is not called.
3661
3662 2003-03-19 Jakub Jelinek <jakub@redhat.com>
3663
3664 * elf64-sparc.c (struct sparc64_elf_section_data): Add reloc_count
3665 field.
3666 (canon_reloc_count): Define.
3667 (sparc64_elf_slurp_one_reloc_table, sparc64_elf_slurp_reloc_table,
3668 sparc64_elf_canonicalize_dynamic_reloc): Use it instead of
3669 reloc_count.
3670 (sparc64_elf_canonicalize_reloc): New routine.
3671 (bfd_elf64_canonicalize_reloc): Define.
3672
3673 2003-03-18 Jakub Jelinek <jakub@redhat.com>
3674
3675 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle relaxation
3676 againt mergeable sections. Take r_addend into account when caching
3677 trampolines.
3678
3679 2003-03-18 Richard Henderson <rth@redhat.com>
3680
3681 * elfxx-ia64.c (get_dyn_sym_info): Return NULL gracefully for
3682 local symbols that have no dyninfo.
3683
3684 2003-03-14 Gene Smith <gene.smith@siemens.com>
3685
3686 * ieee.c (ieee_write_expression): Handle the case where symbol is
3687 NULL.
3688 General formatting improvements.
3689
3690 2003-03-13 Nick Clifton <nickc@redhat.com>
3691
3692 * configure.in (LINGUAS): Add zh_CN.
3693 * configure: Regenerate.
3694 * po/zh_CN.po: New file.
3695
3696 2003-03-13 Elias Athanasopoulos <elathan@phys.uoa.gr>
3697
3698 * aout-cris.c (BYTES_IN_WORD): Don't define.
3699 aout-encap.c: Likewise.
3700 aout-ns32k.c: Likewise.
3701 aout-tic30.c: Likewise.
3702 hp300bsd.c: Likewise.
3703 i386aout.c: Likewise.
3704 i386dynix.c: Likewise.
3705 i386linux.c: Likewise.
3706 i386lynx.c: Likewise.
3707 i386mach3.c: Likewise.
3708 m68k4knetbsd.c: Likewise.
3709 m68klinux.c: Likewise.
3710 m68klynx.c: Likewise.
3711 m68knetbsd.c: Likewise.
3712 m88kmach3.c: Likewise.
3713 mipsbsd.c: Likewise.
3714 newsos3.c: Likewise.
3715 sparclinux.c: Likewise.
3716 sparclynx.c: Likewise.
3717 sparcnetbsd.c: Likewise.
3718 vaxbsd.c: Likewise. Fix comment formatting.
3719
3720 2003-03-12 Alexandre Oliva <aoliva@redhat.com>
3721
3722 * Reverted 2003-03-02's patch.
3723
3724 * elfxx-target.h (bfd_elfNN_canonicalize_reloc): Make it
3725 overridable.
3726 * elf64-mips.c (mips_elf64_canonicalize_reloc,
3727 mips_elf64_get_dynamic_reloc_upper_bound,
3728 mips_elf64_canonicalize_dynamic_reloc): New, adapted from elf.c.
3729 (bfd_elf64_get_canonicalize_reloc,
3730 bfd_elf64_get_dynamic_reloc_upper_bound,
3731 bfd_elf64_canonicalize_dynamic_reloc): Define.
3732 (mips_elf64_slurp_reloc_table): Support dynamic.
3733 (mips_elf64_slurp_one_reloc_table): Adjust.
3734
3735 2003-03-12 Nick Clifton <nickc@redhat.com>
3736
3737 * xsym.c (bfd_sym_fetch_type_information_table_entry): Change
3738 'index' to 'offset' in test for zero value.
3739
3740 2003-03-11 Alexandre Oliva <aoliva@redhat.com>
3741
3742 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Do not create
3743 dynamic relocations pointing to local or section symbols, use the
3744 NULL symbol instead. Document the choice to not emit an
3745 additional R_MIPS_64 relocation.
3746
3747 2003-03-11 Alan Modra <amodra@bigpond.net.au>
3748
3749 * elf32-ppc.c (ppc_elf_relocate_section): Subtract tls seg vma from
3750 zero index dynamic tls relocs generated for the GOT. Tidy code.
3751 Set "relocation" to 1 on DTPMOD32 relocs. Optimize HA adjustment.
3752 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
3753
3754 2003-03-07 Alan Modra <amodra@bigpond.net.au>
3755
3756 * elf32-ppc.c (ppc_elf_relocate_section): Don't look for a nop after
3757 a tls_get_addr call.
3758
3759 * elf32-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
3760 (ppc_elf_adjust_dynamic_symbol): For weak symbols, copy
3761 ELF_LINK_NON_GOT_REF from weakdef.
3762 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
3763 (ppc64_elf_adjust_dynamic_symbol): For weak symbols, copy
3764 ELF_LINK_NON_GOT_REF from weakdef.
3765 * elf32-i386.c (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
3766 (elf_i386_adjust_dynamic_symbol): For weak symbols, copy
3767 ELF_LINK_NON_GOT_REF from weakdef.
3768
3769 2003-03-06 Jakub Jelinek <jakub@redhat.com>
3770 Andrew Haley <aph@redhat.com>
3771
3772 * elflink.h (elf_bfd_discard_info): Don't process eh frames if
3773 output is relocateable.
3774
3775 2003-03-06 Steven Konopa <skonopa@kgo.csc.com>
3776
3777 * som.c (som_fixup_formats): Correct formats for R_AUX_UNWIND and
3778 R_COMMENT.
3779
3780 2003-03-06 Alan Modra <amodra@bigpond.net.au>
3781
3782 * elf32-ppc.c (ppc_elf_create_linker_section): Don't capitalize
3783 error messages.
3784 (ELIMINATE_COPY_RELOCS): Define to zero.
3785 (ppc_elf_relocate_section): Don't deref htab->tls_sec when calculating
3786 TLSLD relocs. Report reloc types on a number of errors. Optimize
3787 LOCAL24PC check for non-local syms. Don't capitalize error messages.
3788 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define to zero.
3789 (ppc64_elf_relocate_section): Don't deref htab->tls_sec when
3790 calculating TLSLD relocs. Report reloc types on a number of errors.
3791 Don't capitalize error messages.
3792
3793 2003-03-03 H.J. Lu <hjl@gnu.org>
3794
3795 * elfxx-ia64.c (USE_BRL): Removed.
3796 (oor_ip): Removed.
3797
3798 2003-03-03 J"orn Rennecke <joern.rennecke@superh.com>
3799
3800 * elf32-sh.c (sh_elf_howto_tab): Make R_SH_IND12W into an ordinary
3801 relocation (no special function), and make it non-partial_inplace.
3802 (sh_elf_relax_section): When creating a bsr, use a consistent value
3803 no matter if the symbol is extern or not; set addend to -4.
3804 Don't swap load / non-load instructions for SH4.
3805 (sh_elf_relax_delete_bytes): In R_SH_IND12W case, check the offset
3806 rather than if the symbol is external to determine if adjusting the
3807 offset makes sense. Adjust the addend too if appropriate.
3808 (sh_elf_relocate_section): In R_SH_IND12W, don't fiddle with the
3809 relocation.
3810
3811 2003-03-03 Nick Clifton <nickc@redhat.com>
3812
3813 * po/da.po: Installed latest translation.
3814
3815 2003-03-02 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3816
3817 * elf32-mips.c (elf_mips_howto_table_rel): Change definition of
3818 R_MIPS_PC16 to rightshift 2.
3819 (elf_reloc_map mips_reloc_map): Map to rightshifted BFD reloc.
3820 (bfd_elf32_bfd_reloc_type_lookup): Support
3821 BFD_RELOC_MIPSEMB_16_PCREL_S2.
3822 * elf64-mips.c (mips_elf64_howto_table_rel): Change definition of
3823 R_MIPS_PC16 to rightshift 2.
3824 (mips_elf64_howto_table_rela): Likewise.
3825 (mips_reloc_map): Map to rightshifted BFD reloc.
3826 * elfn32-mips.c: The same as in elf64-mips.c.
3827 * elfxx-mips.c (mips_elf_got_for_ibfd): Typo in comment.
3828 (mips_elf_calculate_relocation): Handle rightshifted addends for
3829 R_MIPS_PC16.
3830 * reloc.c (BFD_RELOC_MIPSEMB_16_PCREL_S2): New BFD relocation for
3831 MIPS Embedded PIC. Remove superfluous empty COMMENT.
3832 * libbfd.h: Regenerate.
3833 * bfd-in2.h: Regenerate.
3834
3835 2003-02-28 Richard Henderson <rth@redhat.com>
3836
3837 * elfxx-ia64.c (elfNN_ia64_relax_section): Correct bounds
3838 for ltoff22x relaxation.
3839
3840 2003-03-01 Alan Modra <amodra@bigpond.net.au>
3841
3842 * bfd-in.h (_bfd): Don't define.
3843 * bfd.c: Rename occurrences of "struct _bfd" to "struct bfd".
3844 * syms.c: Likewise.
3845 * bfd-in2.h: Regenerate.
3846
3847 2003-02-27 Richard Henderson <rth@redhat.com>
3848
3849 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add want_gotx;
3850 (elfNN_ia64_check_relocs): Set it.
3851 (allocate_global_data_got): Check it.
3852 (allocate_local_got): Likewise.
3853 (allocate_dynrel_entries): Likewise.
3854 (elfNN_ia64_relax_ldxmov): New.
3855 (elfNN_ia64_relax_section): Handle LTOFF22X, LDXMOV.
3856 (elfNN_ia64_choose_gp): Split out from ...
3857 (elfNN_ia64_final_link): ... here.
3858
3859 2003-02-27 Andrew Cagney <cagney@redhat.com>
3860
3861 * bfd.c (struct bfd): Rename "struct _bfd".
3862 * bfd-in.h: Update copyright.
3863 (struct bfd): Rename "struct _bfd".
3864 (_bfd): Define for backward compatibility.
3865 * bfd-in2.h: Regenerate.
3866
3867 2003-02-25 Alan Modra <amodra@bigpond.net.au>
3868
3869 * elflink.h (elf_bfd_final_link): Apportion reloc counts to rel_hdr
3870 and rel_hdr2 when initially counting input relocs rather than after
3871 creating output reloc sections.
3872 (elf_link_read_relocs_from_section): Don't abort with wrong reloc
3873 sizes.
3874
3875 * Makefile.am: Run "make dep-am".
3876 * Makefile.in: Regenerate.
3877
3878 2003-02-24 Kris Warkentin <kewarken@qnx.com>
3879
3880 * elf.c (elfcore_read_notes): Add check for QNX style core file.
3881 (elfcore_grog_nto_note): New function.
3882 (elfcore_grog_nto_gregs): New function.
3883 (elfcore_grog_nto_status): New function.
3884
3885 2003-02-24 Alan Modra <amodra@bigpond.net.au>
3886
3887 * elflink.c (_bfd_elf_create_got_section): Check existing .got
3888 section flags before concluding that we've already been called.
3889 Don't use register keyword.
3890 (_bfd_elf_create_dynamic_sections): Don't use register keyword.
3891 (_bfd_elf_create_linker_section): Formatting.
3892
3893 2003-02-20 jmc <jmc@prioris.mini.pw.edu.pl>
3894
3895 * coff-h8300.c: Fix typo: intial -> initial.
3896 * coff-ppc.c: Likewise.
3897
3898 2003-02-20 Alan Modra <amodra@bigpond.net.au>
3899
3900 * elf32-ppc.c: Formatting.
3901 (allocate_dynrelocs): LD and GD relocs against the same sym need
3902 separate GOT entries.
3903 (ppc_elf_relocate_section): Correct GOT handling for multiple GOT
3904 entries per symbol.
3905
3906 2003-02-19 Alan Modra <amodra@bigpond.net.au>
3907
3908 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Simplify dynamic reloc
3909 removal. Localize vars. Remove unnecessary dynobj test.
3910 * elf32-i386 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead
3911 of INFO.
3912 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
3913 and optimize.
3914 (elf_i386_relocate_section): Likewise.
3915 (elf_i386_gc_sweep_hook): Simplify dyn reloc removal. Localize vars.
3916 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
3917 * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
3918 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
3919 * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
3920 * elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise. Remove
3921 local_dynrel for section too. Don't touch HIPLT22, LOPLT10, PCPLT32
3922 or PCPLT10 relocs. Don't subtract twice on PLT32 relocs.
3923 Formatting.
3924
3925 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define.
3926 (ppc64_elf_check_relocs): Use it. Correct comment. Move SEC_ALLOC
3927 test.
3928 (ppc64_elf_adjust_dynamic_symbol): Use ELIMINATE_COPY_RELOCS.
3929 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
3930 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
3931 and optimize. Use ELIMINATE_COPY_RELOCS.
3932 (ppc64_elf_relocate_section): Likewise.
3933
3934 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Add pc_count field.
3935 (ppc_elf_copy_indirect_symbol): Copy pc_count field.
3936 (ELIMINATE_COPY_RELOCS): Define.
3937 (ppc_elf_adjust_dynamic_symbol): Convert copy relocs to dynamic.
3938 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
3939 (MUST_BE_DYN_RELOC): Define.
3940 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
3941 and optimize. Trim dyn_relocs.
3942 (ppc_elf_check_relocs): Don't generate dyn_relocs when we know they'll
3943 not be used. Do generate dyn_relocs for copy reloc avoidance. Keep
3944 track of pc_rel dyn relocs.
3945 (ppc_elf_relocate_section): Remove "will_become_local". Adjust
3946 WILL_CALL_FINISH_DYNAMIC_SYMBOL use. Trim dyn relocs as per
3947 allocate_dynrelocs. Don't recalculate "sec".
3948
3949 2003-02-18 Alan Modra <amodra@bigpond.net.au>
3950
3951 * elf32-ppc.c (ppc_elf_relocate_section): Remove unnecessary test.
3952 * elf64-ppc.c (ppc64_elf_tls_optimize): Decrement tlsld_got.refcount
3953 on invalid LD relocs.
3954 (allocate_dynrelocs): Invalid LD relocs don't use tlsld_got entry.
3955 (ppc64_elf_relocate_section): Unify new handling of LD relocs and
3956 tlsld_got entry. Use IS_PPC64_TLS_RELOC.
3957
3958 * elf32-ppc.h: New file.
3959 * elf32-ppc.c: Include elf32-ppc.h.
3960 (NOP, CROR_151515, CROR_313131, TP_OFFSET, DTP_OFFSET): Define.
3961 (struct ppc_elf_link_hash_entry): Rename "root" to "elf". Adjust uses.
3962 Add "tls_mask" field.
3963 (TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL, TLS_TLS, TLS_TPRELGD): Define.
3964 (struct ppc_elf_link_hash_table): Rename "root" to "elf". Adjust uses.
3965 Add got, relgot, plt, relplt, dynbss, relbss, dynsbss, relsbss,
3966 sdata, sdata2, tls_sec, tls_get_addr, tlsld_got fields.
3967 Make use of htab shortcuts throughout file.
3968 (ppc_elf_link_hash_newfunc): Init tls_mask field.
3969 (ppc_elf_link_hash_table_create): Init new fields.
3970 (ppc_elf_copy_indirect_symbol): Copy tls_mask.
3971 (ppc_elf_howto_raw): Add tls relocs.
3972 (ppc_elf_reloc_type_lookup): Handle them.
3973 (ppc_elf_unhandled_reloc): New function.
3974 (ppc_elf_create_got): Stash got section pointer in hash table,
3975 return status. Make .rela.got too.
3976 (ppc_elf_create_dynamic_sections): Stash section pointers in htab.
3977 (ppc_elf_adjust_dynamic_symbol): Only set up copy relocs when
3978 NON_GOT_REF set. Don't allocate space in .plt here..
3979 (allocate_dynrelocs): ..do so here instead, properly ref-counting and
3980 not allocating plt entries unnecessarily. Allocate got entries here.
3981 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
3982 (ppc_elf_size_dynamic_sections): Allocate local got entries. Pass
3983 "info" during allocate_dynrelocs hash traversal. Use htab section
3984 shortcuts rather than searching for named sections. Get rid of
3985 "plt" and "strip" booleans.
3986 (update_local_sym_info, bad_shared_reloc): New functions.
3987 (ppc_elf_check_relocs): Handle TLS relocs. Move .rela.got creation to
3988 ppc_elf_create_got. Don't mark got or plt reloc syms dynamic, do so
3989 in allocate_dynreloc. Use update_local_sym_info and bad_shared_reloc.
3990 Disallow R_PPC_EMB_RELSDA, R_PPC_EMB_NADDR32, R_PPC_EMB_NADDR16,
3991 R_PPC_EMB_NADDR16_LO, R_PPC_EMB_NADDR16_HI and R_PPC_EMB_NADDR16_HA
3992 in shared libs. R_PPC_PLTREL32 is a plt reloc too. Refcount all
3993 relocs that might use a plt entry. Set NON_GOT_REF too.
3994 Enumerate all do-nothing relocs.
3995 (ppc_elf_gc_sweep_hook): Simplify removal of dynrelocs. Handle
3996 tls relocs and all plt relocs.
3997 (ppc_elf_tls_setup, ppc_elf_tls_optimize): New functions.
3998 (ppc_elf_finish_dynamic_symbol): Don't build got entries here.
3999 (ppc_elf_finish_dynamic_sections): Rewrite tag code using htab
4000 shortcuts.
4001 (ppc_elf_relocate_section): Tidy. Handle TLS relocs. Use
4002 bfd_elf_local_sym_name. Simplify unresolved reloc code. Build got
4003 entries and got relocs here. Warn on non-zero got reloc addend.
4004 Split out branch taken/not taken reloc code into a separate switch
4005 and correct offset calculation. Allow BRTAKEN/BRNTAKEN dynamic relocs.
4006 Split out HA reloc adjustments to separate switch statement. Don't
4007 warn on reloc overflow if we've already warned about undefined.
4008 Don't rebuild sym name when reporting errors. Report all possible
4009 errors from _bfd_final_link_relocate.
4010 (bfd_elf32_bfd_final_link): Don't define.
4011
4012 2003-02-18 Alan Modra <amodra@bigpond.net.au>
4013
4014 * elf64-ppc.c (ppc64_elf_relocate_section): Don't init "r". Don't
4015 rebuild sym name when reporting errors.
4016
4017 2003-02-17 Nick Clifton <nickc@redhat.com>
4018
4019 * elflink.h (elf_link_output_extsym): Only check
4020 allow_shlib_undefined for shared libraries.
4021 * elf32-i386.c (elf_i386_relocate_section): Remove bogus check
4022 of allow_shlib_undefined.
4023 * elf32-cris.c (cris_elf_relocate_section): Likewise.
4024 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
4025 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
4026 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
4027 * elf32-s390.c (elf_s390_relocate_section): Likewise.
4028 * elf32-sh.c (sh_elf_relocate_section): Likewise.
4029 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
4030 * elf32-vax.c (elf_vax_relocate_section): Likewise.
4031 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
4032 * elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
4033 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
4034 * elf64-s390.c (elf_s390_relocate_section): Likewise.
4035 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
4036 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
4037 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
4038 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
4039
4040 2003-02-17 Nick Clifton <nickc@redhat.com>
4041
4042 * elf.c (SEGMENT_AFTER_SEGMENT): Add third parameter - the
4043 address field to use in the comparison.
4044 (SEGMENT_OVERLAPS): Check that LMAs overlap as well.
4045
4046 2003-02-14 Bob Wilson <bob.wilson@acm.org>
4047
4048 * elfcore.h (elf_core_file_p): Compare alternate machine codes for ELF
4049 backends when checking if the generic ELF target should be used.
4050
4051 * syms.c (_bfd_stab_section_find_nearest_line): For line number stabs
4052 outside of functions, treat values as absolute addresses.
4053
4054 * bfd.c: Change embedded documentation to use consistent indentation
4055 and to split up long lines. Change informal style of description
4056 for functions lacking real documentation.
4057 * coffcode.h: Break up long lines in embedded documentation.
4058 * format.c: Likewise.
4059 * targets.c: Likewise.
4060 * libcoff.h: Regenerate.
4061 * bfd-in2.h: Regenerate.
4062
4063 2003-02-14 Alan Modra <amodra@bigpond.net.au>
4064
4065 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Init tls_get_addr.
4066 (ppc64_elf_copy_indirect_symbol): Merge tls_mask too.
4067 (ppc64_elf_gc_sweep_hook): Simplify removal of dyn_relocs.
4068 (allocate_dynrelocs): Don't treat undefined and undefweak specially.
4069 (ppc_size_one_stub): Fix warning, and tighten plt entry check.
4070 (group_sections): Don't share a stub section if stubs are for a large
4071 section. Adjust comment.
4072 (ppc64_elf_size_stubs): Roughly double the size left for stubs if
4073 !stubs_always_before_branch.
4074 (ppc64_elf_relocate_section): Initialize tlsld GOT entry once. Don't
4075 treat undefined and undefweak specially when processing dyn relocs.
4076
4077 2003-02-13 Jakub Jelinek <jakub@redhat.com>
4078
4079 * elflink.h (elf_link_add_object_symbols): Handle .symver x, x@FOO.
4080
4081 2003-02-13 Nick Clifton <nickc@redhat.com>
4082
4083 * elf32-arm.h (elf32_thumb_to_arm_stub): Include section VMAs
4084 in computation of offset to insert into BL instruction.
4085
4086 2003-02-11 Uwe Stieber <uwe@wwws.de>
4087
4088 * config.bfd: Add support for kaOS as cross build target system.
4089
4090 2003-02-11 Alan Modra <amodra@bigpond.net.au>
4091
4092 * elf64-ppc.c (ppc64_elf_check_relocs): Match versioned
4093 .__tls_get_addr too.
4094 (ppc64_elf_tls_setup): Ensure cached tls_get_addr is not indirect.
4095
4096 2003-02-10 Kaz kojima <kkojima@rr.iij4u.or.jp>
4097
4098 * elf32-sh.c (elf_sh_dyn_relocs): Add tls_tpoff32 field.
4099 (elf_sh_link_hash_entry): Remove tls_tpoff32 field.
4100 (sh_elf_link_hash_newfunc): Remove the initialization of
4101 tls_tpoff32 field.
4102 (allocate_dynrelocs): Keep dyn_relocs if it includes the entry
4103 for which tls_tpoff32 flag is set.
4104 (sh_elf_relocate_section): Covert to LE only if the dyn_relocs
4105 of the symbol includes the entry matched with the input_section
4106 and having tls_tpoff32 flag on. When linking statically, set
4107 symbol index of R_SH_TLS_TPOFF32 relocation to zero if the symbol
4108 is defined in this executable.
4109 (sh_elf_check_relocs): Set tls_tpoff32 flag appropriately.
4110
4111 2003-02-10 Jakub Jelinek <jakub@redhat.com>
4112
4113 * elf32-s390.c (elf_s390_size_dynamic_sections): Set relocs to TRUE
4114 even if there is just non-empty .rela.plt.
4115
4116 2003-02-10 Nick Clifton <nickc@redhat.com>
4117
4118 * archures.c (bfd_mach_arm_ep9312): Define.
4119 * bfd-in2.h: Regenerate.
4120 * cpu-arm.c (processors[]): Add ep9312.
4121 (bfd_arm_arch): Add ep9312.
4122 * elf32-arm.h (elf32_arm_merge_private_data): Update error
4123 messages and add test for Maverick floating point support.
4124 (elf32_arm_print_private_bfd_data): Handle
4125 EF_ARM_MAVERICK_FLOAT flag.
4126 (elf32_arm_object_p): New function.
4127 (elf_backend_object_p): Define.
4128
4129 2003-02-10 Alan Modra <amodra@bigpond.net.au>
4130
4131 * elf64-ppc.c: Rename assorted occurrences of tls_type and similar
4132 variables, structure fields or function params to tls_mask or
4133 similar to better reflect usage.
4134 (struct got_entry): Comment.
4135 (struct ppc_link_hash_entry): Expand comment, and renumber TLS_*.
4136 (get_tls_mask): Rename from get_tls_type.
4137
4138 2003-02-09 Alan Modra <amodra@bigpond.net.au>
4139
4140 * elf64-ppc.c (TLS_GD_LD): Don't define..
4141 (TLS_GD): ..define this instead and update all uses.
4142 (TLS_TPRELGD): Define.
4143 (ppc64_elf_link_hash_table_create): Tweak initialization of
4144 init_refcount and init_offset.
4145 (ppc64_elf_check_relocs): Add one extra element to t_symndx array.
4146 Mark second slot of GD or LD toc entries.
4147 (get_tls_type): Return an int. Distinguish toc GD and LD entries
4148 from other tls types.
4149 (ppc64_elf_tls_setup): New function, split out from..
4150 (ppc64_elf_tls_optimize): ..here. Don't optimize when symbols are
4151 defined in a dynamic object. Fix LD optimization. Don't set TLS_TPREL
4152 on GD->IE optimization, use TLS_TPRELGD instead. Use get_tls_type
4153 return value to properly decide whether toc GD and LD entries can
4154 optimize away __tls_get_addr call. Check next reloc after DTPMOD64
4155 to determine GD or LD rather than looking at TLS_LD flag. Don't
4156 attempt to adjust got entry tls_type here..
4157 (allocate_dynrelocs): ..instead, adjust got entry tls_type here, and
4158 look for possible merges.
4159 (ppc64_elf_size_dynamic_sections): Adjust local got entries for
4160 optimization.
4161 (ppc64_elf_size_stubs): Tweak __tls_get_addr fudge.
4162 (ppc64_elf_relocate_section): Rename some vars to better reflect usage.
4163 Make use of return value from get_tls_type to properly detect GD and
4164 LD optimizations. Split tlsld/gd hi/ha from lo/ds case. Don't
4165 handle tls_get_addr removal when looking at REL24 relocs, do it when
4166 looking at the previous reloc. Check reloc after DTPMOD64 to determine
4167 GD or LD.
4168 * elf64-ppc.h (ppc64_elf_tls_setup): Declare.
4169
4170 2003-02-08 Alan Modra <amodra@bigpond.net.au>
4171
4172 * elf32-hppa.c (group_sections): Don't share a stub section if
4173 stubs are for a large section.
4174
4175 * elf32-hppa.c (elf32_hppa_size_stubs): Double the size left for
4176 stubs if !stubs_always_before_branch.
4177
4178 2003-02-07 Nick Clifton <nickc@redhat.com>
4179
4180 * elf.c (swap_out_syms): Generate an error message if an
4181 equivalent output section cannot be found for a symbol.
4182
4183 2003-02-07 Jakub Jelinek <jakub@redhat.com>
4184
4185 * elf64-alpha.c (elf64_alpha_relax_section): Don't crash if
4186 local_got_entries is NULL.
4187
4188 2003-02-06 Andreas Schwab <schwab@suse.de>
4189
4190 * elf-eh-frame.c (get_DW_EH_PE_signed): Define.
4191 (read_value): Add parameter is_signed, use signed extraction if
4192 the value is signed.
4193 (_bfd_elf_write_section_eh_frame): Pass signed flag of the
4194 encoding to read_value.
4195
4196 2003-02-06 Alan Modra <amodra@bigpond.net.au>
4197
4198 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy got and
4199 plt info when called to transfer weak sym info.
4200
4201 2003-02-05 Alan Modra <amodra@bigpond.net.au>
4202
4203 * reloc.c: Add PPC and PPC64 TLS relocs.
4204 * libbfd.h: Regenerate.
4205 * bfd-in2.h: Regenerate.
4206 * elf64-ppc.c (TP_OFFSET, DTP_OFFSET): Declare.
4207 (ppc64_elf_howto_raw): Add TLS howto's. Adjust R_PPC64_NONE to be
4208 against a 32 bit field.
4209 (ppc64_elf_reloc_type_lookup): Handle TLS relocs.
4210 (_ppc64_elf_section_data): Add t_symndx and comments.
4211 (ppc64_elf_section_data): Use elf_section_data macro.
4212 (ppc64_elf_new_section_hook): American spelling.
4213 (struct got_entry, struct plt_entry): New.
4214 (MUST_BE_DYN_RELOC): Rename from IS_ABSOLUTE_RELOC.
4215 (struct ppc_stub_hash_entry): Add "addend" field.
4216 (struct ppc_link_hash_entry): Add "tls_type".
4217 (TLS_TLS, TLS_GD_LD, TLS_LD, TLS_TPREL, TLS_DTPREL,
4218 TLS_EXPLICIT): Define.
4219 (struct ppc_link_hash_table): Add tls_sec, tls_get_addr, tlsld_got.
4220 (link_hash_newfunc): Init new fields.
4221 (ppc64_elf_link_hash_table_create): Likewise. Set init_refcount and
4222 init_offset to NULL.
4223 (ppc64_elf_copy_indirect_symbol): Copy got and plt info. Don't call
4224 _bfd_elf_link_hash_copy_indirect, rather insert relevant code from
4225 there.
4226 (update_local_sym_info, update_plt_info): New functions.
4227 (ppc64_elf_check_relocs): Use them. Handle TLS relocs. Adjust GOT
4228 handling to use got.glist rather than got.refcount. Likewise for PLT.
4229 (ppc64_elf_gc_sweep_hook): Handle TLS relocs, new GOT and PLT lists.
4230 (func_desc_adjust): Adjust for new PLT list.
4231 (ppc64_elf_adjust_dynamic_symbol): Likewise.
4232 (get_sym_h, get_tls_type): New functions.
4233 (ppc64_elf_edit_opd): Remove unused variable. Use get_sym_h.
4234 (ppc64_elf_tls_optimize): New function.
4235 (allocate_dynrelocs): Adjust for new PLT and GOT lists. Allocate
4236 TLS relocs.
4237 (ppc64_elf_size_dynamic_sections): Likewise.
4238 (ppc_type_of_stub): Adjust for new PLT list.
4239 (ppc_build_one_stub): Likewise.
4240 (ppc64_elf_size_stubs): Likewise. Use get_sym_h. Treat __tls_get_addr
4241 calls specially.
4242 (ppc64_elf_relocate_section): Adjust for new GOT and PLT lists. Handle
4243 TLS relocs. Report local syms using bfd_elf_local_sym_name. Don't
4244 init GOT entries that have a reloc. Generate GOT relocs here..
4245 (ppc64_elf_finish_dynamic_symbol): ..not here. Adjust for PLT list.
4246 * elf64-ppc.h (ppc64_elf_tls_optimize): Declare.
4247
4248 2003-02-04 Andreas Schwab <schwab@suse.de>
4249
4250 * elf32-m68k.c (elf_m68k_hash_entry): Define.
4251 (elf_m68k_link_hash_traverse): Remove.
4252 (elf_m68k_link_hash_newfunc): Use struct bfd_hash_entry and
4253 elf_m68k_hash_entry instead of struct elf_m68k_link_hash_entry to
4254 reduce casting.
4255 (elf_m68k_check_relocs): Use elf_m68k_hash_entry instead of
4256 casting.
4257 (elf_m68k_size_dynamic_sections): Use elf_link_hash_traverse
4258 instead of elf_m68k_link_hash_traverse.
4259 (elf_m68k_discard_copies): Change first parameter to pointer to
4260 struct elf_link_hash_entry and use elf_m68k_hash_entry when struct
4261 elf_m68k_link_hash_entry is needed.
4262
4263 2003-02-04 Alan Modra <amodra@bigpond.net.au>
4264
4265 * elf-bfd.h (struct got_entry, struct plt_entry): Forward declare.
4266 (struct elf_link_hash_entry): Add "glist" and "plist" fields to
4267 "got" union, and declare as gotplt_union. Use gotplt_uinion for
4268 "plt" field.
4269 (struct elf_link_hash_table): Make "init_refcount" a gotplt_union.
4270 Add "init_offset" field.
4271 (struct elf_obj_tdata <local_got>): Add "struct got_entry **" to union.
4272 (elf_local_got_ents): Declare.
4273 * elf.c (_bfd_elf_link_hash_newfunc): Adjust initialization of "got"
4274 and "plt".
4275 (_bfd_elf_link_hash_hide_symbol): Use "init_offset".
4276 (_bfd_elf_link_hash_table_init): Set "init_offset".
4277 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set init_refcount
4278 from init_offset.
4279 (elf_adjust_dynamic_symbol): Set plt and got offsets using init_offset.
4280
4281 * elf.c (bfd_elf_local_sym_name): Split out from..
4282 (group_signature): ..here.
4283 * elf-bfd.h (bfd_elf_local_sym_name): Declare.
4284
4285 2003-02-04 Alan Modra <amodra@bigpond.net.au>
4286
4287 * elf-bfd.h (enum elf_link_info_type): Remove.
4288 (struct bfd_elf_section_data): Move sec_info_type, use_rela_p fields
4289 to struct sec. Remove linkonce_p field.
4290 (elf_linkonce_p): Delete.
4291 (elf_discarded_section): Update for sec_info_type change.
4292 * section.c (struct sec): Add sec_info_type, use_rela_p, has_tls_reloc,
4293 flag11, flag12, flag13, flag14, flag15, flag16, flag20, flag24.
4294 (ELF_INFO_TYPE_NONE): Define.
4295 (ELF_INFO_TYPE_STABS): Define.
4296 (ELF_INFO_TYPE_MERGE): Define.
4297 (ELF_INFO_TYPE_EH_FRAME): Define.
4298 (ELF_INFO_TYPE_JUST_SYMS): Define.
4299 (STD_SECTION): Update struct sec initializer.
4300 * ecoff.c (bfd_debug_section): Likewise.
4301 * elf.c: Likewise. Update occurrences of sec_info_type and use_rela_p.
4302 * elflink.h: Likewise.
4303 * elf-eh-frame.c: Likewise.
4304 * elf64-alpha.c: Likewise.
4305 * elfxx-ia64.c: Likewise.
4306 * elfxx-mips.c: Likewise.
4307 * bfd-in2.h: Regenerate.
4308
4309 * elf32-sparc.c (sec_do_relax): Use elf_section_data macro rather than
4310 referring to used_by_bfd.
4311 * elf64-sparc.c (sec_do_relax): Likewise.
4312 * elf64-mmix.c (mmix_elf_section_data): Likewise.
4313 * elfxx-mips.c (mips_elf_section_data): Likewise.
4314 * ieee.c (ieee_slurp_section_data): Use ieee_per_section macro.
4315 (ieee_get_section_contents): Likewise.
4316 (ieee_new_section_hook): Formatting.
4317 (ieee_canonicalize_reloc): Remove commented out code.
4318 * mmo.c (mmo_section_data): Define. Use throughout file.
4319 * oasys.c (oasys_get_section_contents): Use oasys_per_section macro.
4320
4321 2003-01-31 Graydon Hoare <graydon@redhat.com>
4322
4323 * Makefile.am (opncls.lo): Add dependency upon libiberty.h.
4324 * Makefile.in: Regenerate.
4325 * opncls.c (calc_crc32, get_debug_link_info,
4326 seperate_debug_file_exists, find_seperate_debug_file): New
4327 internal functions.
4328 (bfd_follow_gnu_debuglink): New function. Follow the pointer
4329 contained inside a .gnu_debuglink section.
4330 * bfd-in2.h: Regenerate.
4331
4332 2003-01-29 Alexandre Oliva <aoliva@redhat.com>
4333
4334 * elfxx-mips.c (mips_elf_got_entry_hash): Don't dereference
4335 entry->abfd when it's NULL.
4336
4337 2003-01-27 Alexandre Oliva <aoliva@redhat.com>
4338
4339 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Handle
4340 _bfd_elf_section_offset returning -2 the same way as -1.
4341
4342 * elfxx-mips.c (mips_elf_multi_got): New function.
4343 (struct mips_got_entry): Make symndx and gotidx signed. Moved
4344 addend into union along with address and link hash entry.
4345 (struct mips_got_info): Added bfd2got and next.
4346 (struct mips_elf_hash_sort_data): Added max_unref_got_dynindx.
4347 (mips_elf_got_section, mips_elf_create_got_section): Use
4348 SEC_EXCLUDE bit to tell whether we really need the got
4349 section. Take boolean arguments to disregard an excluded
4350 section, or to create it as excluded. Adjust all callers.
4351 Use mips_elf_got_section all over.
4352 (mips_elf_local_got_index, mips_elf_got_page,
4353 mips_elf_got16_entry): Take input bfd as argument, and pass it
4354 on to mips_elf_create_local_got_entry.
4355 (mips_elf_global_got_index, mips_elf_create_local_got_entry):
4356 Take input bfd as argument, and manage entries in the
4357 appropriate GOT.
4358 (mips_elf_got_offset_from_index): Take input bfd as argument,
4359 and use it to adjust the GP offset of the bfd.
4360 (mips_elf_sort_hash_table, mips_elf_sort_hash_table_f): Move
4361 unreferenced GOT entries of global symbols to the end.
4362 (mips_elf_record_global_got_symbol): Take input bfd as
4363 argument. Add entries to the master GOT hash table.
4364 (struct mips_elf_bfd2got_hash): New.
4365 (struct mips_elf_got_per_bfd_arg): New.
4366 (struct mips_elf_set_global_got_offset_arg): New.
4367 (mips_elf_hash_bfd_vma, mips_elf_multi_got_entry_hash,
4368 mips_elf_multi_got_entry_eq, mips_elf_bfd2got_entry_hash,
4369 mips_elf_bfd2got_entry_eq, mips_elf_make_got_per_bfd,
4370 mips_elf_merge_gots, mips_elf_set_global_got_offset,
4371 mips_elf_resolve_final_got_entry,
4372 mips_elf_resolve_final_got_entries, mips_elf_adjust_gp,
4373 mips_elf_got_for_ibfd): New functions.
4374 (ELF_MIPS_GP_OFFSET): Don't depend on SGI_COMPAT.
4375 (MIPS_ELF_GOT_MAX_SIZE): New macro.
4376 (STUB_LW): Generate 64-bit stub regardless of SGI_COMPAT.
4377 (mips_elf_got_entry_hash): Take new fields into account. Use
4378 mips_elf_hash_bfd_vma.
4379 (mips_elf_got_entry_eq): Take new fields into account.
4380 (mips_elf_create_got_section): Initialize new fields.
4381 (mips_elf_calculate_relocation): Pass input_bfd to functions
4382 that now take it. Adjust gp for the input_bfd.
4383 (mips_elf_allocate_dynamic_relocation,
4384 mips_elf_create_dynamic_relocation,
4385 _bfd_mips_elf_create_dynamic_sections): Use...
4386 (mips_elf_rel_dyn_section): New function. Borrow code from...
4387 (_bfd_mips_elf_check_relocs): Pass input_bfd to functions that
4388 now take it. Create the got section if needed, even if
4389 excluded, before recording a global got symbol. Move some
4390 code to...
4391 (mips_elf_record_local_got_symbol): New fn.
4392 (_bfd_mips_elf_size_dynamic_sections): Disable combreloc.
4393 Compute multi-got global entries offsets. Move GOT code to...
4394 (_bfd_mips_elf_always_size_sections): Call mips_elf_multi_got
4395 if the GOT is too big.
4396 (_bfd_mips_elf_finish_dynamic_symbol): Set got entry of
4397 undefweak symbol to zero. Generate dynamic relocations for
4398 non-primary GOT entries for global symbols.
4399 (_bfd_mips_elf_finish_dynamic_sections): Handle multi-got
4400 case. Generate dynamic relocations for local got entries.
4401 Sort dynamic relocations on N64 too, using...
4402 (sort_dynamic_relocs_64): New fns.
4403 (_bfd_mips_elf_hide_symbol): Adjust multi-got counters.
4404 (_bfd_mips_elf_merge_private_bfd_data): Ignore EF_MIPS_XGOT.
4405
4406 2003-01-27 Alexandre Oliva <aoliva@redhat.com>
4407
4408 * bfd.c (struct _bfd): Added id field.
4409 * opncls.c (_bfd_id_counter): New static variable.
4410 (_bfd_new_bfd): Use it.
4411 * bfd-in2.h: Rebuilt.
4412
4413 2003-01-25 Alan Modra <amodra@bigpond.net.au>
4414
4415 * elf32-sparc.c (bfd_elf32_new_section_hook): Define.
4416
4417 2003-01-25 Jakub Jelinek <jakub@redhat.com>
4418
4419 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Add TLS relocs.
4420 (elf32_sparc_rev32_howto): New variable.
4421 (sparc_reloc_map): Add TLS relocs.
4422 (elf32_sparc_reloc_type_lookup, elf32_sparc_info_to_howto):
4423 Handle REV32.
4424 (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc, elf32_sparc_mkobject):
4425 New functions.
4426 (struct elf32_sparc_dyn_relocs, struct elf32_sparc_link_hash_entry,
4427 struct elf32_sparc_link_hash_table):
4428 New structures.
4429 (elf32_sparc_tdata, elf32_sparc_local_got_tls_type,
4430 elf32_sparc_hash_table): Define.
4431 (link_hash_newfunc, elf32_sparc_link_hash_table_create,
4432 create_got_section, elf32_sparc_create_dynamic_sections,
4433 elf32_sparc_copy_indirect_symbol, elf32_sparc_tls_transition): New
4434 functions.
4435 (elf32_sparc_check_relocs): Handle TLS relocs. Add dynamic reloc
4436 reference counting.
4437 (elf32_sparc_gc_sweep_hook): Likewise.
4438 (elf32_sparc_adjust_dynamic_symbol): Likewise.
4439 (elf32_sparc_size_dynamic_sections): Likewise.
4440 (elf32_sparc_relocate_section): Likewise.
4441 (allocate_dynrelocs, readonly_dynrelocs, dtpoff_base, tpoff):
4442 New functions.
4443 (elf32_sparc_object_p): Allocate backend private object data.
4444 (bfd_elf32_bfd_link_hash_table_create,
4445 elf_backend_copy_indirect_symbol, bfd_elf32_mkobject,
4446 elf_backend_can_refcount): Define.
4447 (elf_backend_create_dynamic_sections): Define to
4448 elf32_sparc_create_dynamic_sections.
4449 * reloc.c: Add SPARC TLS relocs.
4450 * bfd-in2.h, libbfd.h: Rebuilt.
4451 * elf64-sparc.c (sparc64_elf_howto_table): Add TLS relocs.
4452 (sparc_reloc_map): Likewise.
4453
4454 2003-01-24 Martin Schwidefsky <schwidefsky@de.ibm.com>
4455
4456 * bfd-in2.h: Regenerate.
4457 * elf32-s390.c (elf_s390_mkobject, elf_s390_tls_transition,
4458 s390_tls_reloc, dtpoff_base, tpoff, invalid_tls_insn): New functions.
4459 (elf_howto_table): Add TLS relocs.
4460 (elf_s390_reloc_type_lookup): Likewise.
4461 (elf_s390_link_hash_entry): Add tls_type.
4462 (elf_s390_hash_entry, elf_s390_obj_tdata, elf_s390_local_got_tls_type):
4463 New macros.
4464 (elf_s390_link_hash_table): Add tls_ldm_got.
4465 (link_hash_newfunc): Initialize tls_type.
4466 (elf_s390_link_hash_table_create): Initialize refcount of tls_ldm_got.
4467 (elf_s390_copy_indirect_symbol): Copy tls_type information.
4468 (elf_s390_check_relocs): Support TLS relocs.
4469 (elf_s390_gc_sweep_hook): Likewise.
4470 (allocate_dynrelocs): Likewise.
4471 (elf_s390_size_dynamic_sections): Likewise.
4472 (elf_s390_relocate_section): Likewise.
4473 (elf_s390_finish_dynamic_symbol): Likewise.
4474 (bfd_elf32_mkobject): Define for TLS.
4475 * elf64-s390.c: Same changes as for elf32-s390.c.
4476 * libbfd.h: Regenerate.
4477 * reloc.c: Add s390 TLS relocations.
4478
4479 2003-01-24 Charles Lepple <clepple@ghz.cc>
4480
4481 * aclocal.m4: Fix name of --enable-install-libbfd switch.
4482
4483 2003-01-23 Nick Clifton <nickc@redhat.com>
4484
4485 * Add sh2e support:
4486 2002-04-02 Elena Zannoni <ezannoni@redhat.com>
4487 * archures.c (bfd_mach_sh2e): Added.
4488 * bfd-in2.h: Rebuilt.
4489 * cpu-sh.c (arch_info_struct): Added SH2e.
4490 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle EF_SH2E.
4491
4492 2003-01-23 Alan Modra <amodra@bigpond.net.au>
4493
4494 * elf-bfd.h (struct bfd_elf_section_data): Remove tdata. Change
4495 dynindx to an int. Rearrange for better packing.
4496 * elf.c (_bfd_elf_new_section_hook): Don't alloc if already done.
4497 * elf32-mips.c (bfd_elf32_new_section_hook): Define.
4498 * elf32-sh64.h: New. Split out from include/elf/sh.h.
4499 (struct _sh64_elf_section_data): New struct.
4500 (sh64_elf_section_data): Don't dereference sh64_info (was tdata).
4501 * elf32-sh64-com.c: Include elf32-sh64.h.
4502 * elf32-sh64.c: Likewise.
4503 (sh64_elf_new_section_hook): New function.
4504 (bfd_elf32_new_section_hook): Define.
4505 (sh64_elf_fake_sections): Adjust for sh64_elf_section_data change.
4506 (sh64_bfd_elf_copy_private_section_data): Likewise.
4507 (sh64_elf_final_write_processing): Likewise.
4508 * elf32-sparc.c (struct elf32_sparc_section_data): New.
4509 (elf32_sparc_new_section_hook): New function.
4510 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
4511 (sec_do_relax): Define.
4512 (elf32_sparc_relax_section): Adjust to use sec_do_relax.
4513 (elf32_sparc_relocate_section): Likewise.
4514 * elf64-mips.c (bfd_elf64_new_section_hook): Define.
4515 * elf64-mmix.c (struct _mmix_elf_section_data): New.
4516 (mmix_elf_section_data): Define. Use throughout file.
4517 (mmix_elf_new_section_hook): New function.
4518 (bfd_elf64_new_section_hook): Define.
4519 * elf64-ppc.c (struct _ppc64_elf_section_data): New.
4520 (ppc64_elf_section_data): Define. Use throughout.
4521 (ppc64_elf_new_section_hook): New function.
4522 (bfd_elf64_new_section_hook): Define.
4523 * elf64-sparc.c (struct sparc64_elf_section_data): New.
4524 (sparc64_elf_new_section_hook): New function.
4525 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
4526 (sec_do_relax): Define.
4527 (sparc64_elf_relax_section): Adjust to use sec_do_relax.
4528 (sparc64_elf_relocate_section): Likewise.
4529 (bfd_elf64_new_section_hook): Define.
4530 * elfn32-mips.c (bfd_elf32_new_section_hook): Define.
4531 * elfxx-mips.c (struct _mips_elf_section_data): New.
4532 (mips_elf_section_data): Define. Use throughout.
4533 (_bfd_mips_elf_new_section_hook): New function.
4534 (mips_elf_create_got_section): Don't alloc used_by_bfd.
4535 * elfxx-mips.h (_bfd_mips_elf_new_section_hook): Declare.
4536 * elfxx-target.h (bfd_elfNN_new_section_hook): Add #ifndef.
4537 * Makefile.am: Run "make dep-am".
4538 * Makefile.in: Regenerate.
4539
4540 2003-01-21 Richard Henderson <rth@redhat.com>
4541
4542 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_PLT_LOC): New.
4543 (struct alpha_elf_link_hash_entry): Add plt_old_section, plt_old_value.
4544 (elf64_alpha_adjust_dynamic_symbol): Set them.
4545 (elf64_alpha_size_plt_section_1): Reset them when plt entry removed.
4546 (elf64_alpha_relax_tls_get_addr): Handle LDM relocs. Frob the
4547 symbol index when relaxing LDM to TPREL.
4548 (elf64_alpha_relax_section): Likewise. Allow relaxation of GD
4549 relocs, even if the target isn't locally defined.
4550 (elf64_alpha_check_relocs): Frob LDM reloc symndx to zero.
4551 (elf64_alpha_relocate_section): Likewise. Force TP-relative
4552 relocs vs symndx 0 to the tp base.
4553
4554 2003-01-21 Fabio Alemagna <falemagn@aros.org>
4555
4556 * config.bfd: Handle i[3456]86-*-aros*.
4557
4558 2003-01-21 Andreas Schwab <schwab@suse.de>
4559
4560 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Define.
4561 (struct ppc_elf_link_hash_entry): Define.
4562 (ppc_elf_hash_entry): New function.
4563 (struct ppc_elf_link_hash_table): Define.
4564 (ppc_elf_hash_table): New function.
4565 (ppc_elf_link_hash_newfunc): New function.
4566 (ppc_elf_link_hash_table_create): New function.
4567 (ppc_elf_copy_indirect_symbol): New function.
4568 (allocate_dynrelocs): New function.
4569 (readonly_dynrelocs): New function.
4570 (ppc_elf_size_dynamic_sections): Allocate space for dynamic
4571 relocs and determine DT_TEXTREL.
4572 (ppc_elf_check_relocs): Don't do that here, just count the
4573 dynamic relocs.
4574 (ppc_elf_gc_sweep_hook): Discard any dynamic relocs against the
4575 removed section.
4576 (bfd_elf32_bfd_link_hash_table_create): Define.
4577 (elf_backend_copy_indirect_symbol): Define.
4578
4579 2003-01-21 Richard Henderson <rth@redhat.com>
4580
4581 * elf64-alpha.c (alpha_dynamic_entries_for_reloc): GOTTPREL and
4582 TPREL also get a reloc if shared. Remove SREL support.
4583 (elf64_alpha_emit_dynrel): New.
4584 (elf64_alpha_relocate_section): Use it. Resolve dynamic TPREL
4585 and GOTTPREL relocs to local symbols against the tp base.
4586 (elf64_alpha_finish_dynamic_symbol): Use elf64_alpha_emit_dynrel.
4587
4588 * elf64-alpha.c (elf64_alpha_relax_got_load): Decrement got
4589 use count before clobbering r_type.
4590 (elf64_alpha_relax_tls_get_addr): Don't use pos[1] if insn
4591 ordering would mean dataflow inspection is necessary.
4592
4593 2003-01-20 Svein E. Seldal <Svein.Seldal@solidas.com>
4594
4595 * coffcode.h (coff_set_flags): Added get/set arch hooks.
4596
4597 2003-01-20 Fabio Alemagna <falemagn@aros.org>
4598
4599 * elf32-sh.c: Treat elfNN_bed like other macros defined in
4600 elfxx-target.h and #undef it before #define'ing it.
4601 * elf32-i386.c: Likewise.
4602 * elf32-sh64.c: Likewise.
4603 * elf64-alpha.c: Likewise.
4604 * elf64-sh64.c: Likewise.
4605
4606 2003-01-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
4607
4608 * bfd-in2.h: Regenerate.
4609 * elf32-s390.c (elf_s390_adjust_gotplt): New prototype.
4610 (elf_howto_table): Rename R_390_GOTOFF to R_390_GOTOFF32. Add
4611 R_390_GOTOFF16, R_390_GOTOFF64, R_390_GOTPLT12, R_390_GOTPLT16,
4612 R_390_GOTPLT32, R_390_GOTPLT64, R_390_GOTPLTENT, R_390_PLTOFF16,
4613 R_390_PLTOFF32 and R_390_PLTOFF64.
4614 (elf_s390_reloc_type_lookup): Likewise.
4615 (struct elf_s390_link_hash_entry): Add gotplt_refcount to keep track
4616 of GOTPLT references to a function.
4617 (link_hash_newfunc): Initialize gotplt_refcount.
4618 (elf_s390_check_relocs): Move allocation of local_got_refcounts array
4619 and creation of the got section out of the main switch. Add support
4620 for the gotoff, gotplt and pltoff relocations.
4621 (elf_s390_gc_sweep_hook): Add reference counting for gotoff, gotplt
4622 and pltoff.
4623 (elf_s390_adjust_gotplt): New function.
4624 (elf_s390_adjust_dynamic_symbol): Adjust gotplt refcount for removed
4625 plt entries.
4626 (allocate_dynrelocs): Add comment.
4627 (elf_s390_relocate_section): Change r_type to unsigned. Add support
4628 for gotoff, gotplt and pltoff relocations.
4629 * elf64-s390.c: Same changes as for elf32-s390.c.
4630 * libbfd.h: Regenerate.
4631 * reloc.c: Add BFD_RELOC_390_GOTOFF64, BFD_RELOC_390_GOTPLT12,
4632 BFD_RELOC_390_GOTPLT16, BFD_RELOC_390_GOTPLT32, BFD_RELOC_390_GOTPLT64,
4633 BFD_RELOC_390_GOTPLTENT, BFD_RELOC_390_PLTOFF16, BFD_RELOC_390_PLTOFF32
4634 and BFD_RELOC_390_PLTOFF64.
4635
4636 2003-01-18 Jakub Jelinek <jakub@redhat.com>
4637
4638 * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle
4639 R_IA64_TPREL64[LM]SB against non-global symbol properly.
4640
4641 2003-01-16 Jakub Jelinek <jakub@redhat.com>
4642
4643 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add
4644 self_dtpmod_done and self_dtpmod_offset.
4645 (allocate_global_data_got): Only use one got entry for all
4646 dtpmod relocs against local symbols.
4647 (allocate_dynrel_entries): Only need .rela.got entry for
4648 dtpmod against global symbol.
4649 (elfNN_ia64_size_dynamic_sections): Initialize self_dtpmod_offset.
4650 Reserve space in .rela.got for the local dtpmod entry.
4651 (set_got_entry): Initialize the common local dtpmod .got entry.
4652 (elfNN_ia64_relocate_section): Handle R_IA_64_DTPREL64LSB
4653 and R_IA_64_DTPREL64MSB.
4654
4655 2003-01-16 Alan Modra <amodra@bigpond.net.au>
4656
4657 * elf64-ppc.c: Include elf/ppc64.h rather than elf/ppc.h.
4658 (R_PPC_*): Rename all occurrences to R_PPC64_*.
4659 (R_PPC64_ADDR30): Rename all occurrences to R_PPC64_REL30.
4660 (enum elf_ppc_reloc_type): Ditto to enum elf_ppc64_reloc_type.
4661 (ppc64_elf_gc_sweep_hook): Handle R_PPC64_REL30 along with other
4662 relative relocs, not with absolute ones.
4663 * Makefile.am: Run "make dep-am".
4664 * Makefile.in: Regenerate.
4665 * po/SRC-POTFILES.in: Regenerate.
4666
4667 2003-01-15 Andreas Schwab <schwab@suse.de>
4668
4669 * elf32-ppc.c (ppc_elf_check_relocs): Don't set DF_TEXTREL for a
4670 relocation against a non-allocated readonly section.
4671
4672 2003-01-10 Alan Modra <amodra@bigpond.net.au>
4673
4674 * elf32-ppc.c (ppc_elf_relocate_section): Adjust addend for GOT16_HA.
4675 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. PLTGOT16_HA too.
4676
4677 2002-01-08 Klee Dienes <kdienes@apple.com>
4678
4679 * Makefile.am (ALL_MACHINES): Use cpu-msp430.lo, not cpu-msp430.c.
4680 (BFD32_BACKENDS): Use elf32-msp430.lo, not elf32-msp430.c.
4681 * Makefile.in: Regenerate.
4682
4683 2003-01-08 Alexandre Oliva <aoliva@redhat.com>
4684
4685 * elfn32-mips.c (prev_reloc_section): New.
4686 (GET_RELOC_ADDEND): Use it. Parenthesize macro arguments.
4687 (SET_RELOC_ADDEND): Parenthesize macro argument.
4688
4689 2003-01-07 John David Anglin <dave.anglin@nrc.gc.ca>
4690
4691 * elf32-hppa.c (final_link_relocate): For all DP relative relocations,
4692 adjust addil instructions if the symbol has no section.
4693
4694 2003-01-07 DJ Delorie <dj@redhat.com>
4695
4696 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make REL_12 not
4697 partial_inplace.
4698
4699 2003-01-07 Andreas Schwab <schwab@suse.de>
4700
4701 * elf32-m68k.c (elf_m68k_check_relocs): Don't set DF_TEXTREL for
4702 PC relative relocations.
4703 (elf_m68k_discard_copies): Set it here instead.
4704
4705 2002-01-02 Ben Elliston <bje@redhat.com>
4706 Jeff Johnston <jjohnstn@redhat.com>
4707
4708 * Makefile.am (ALL_MACHINES): Add cpu-iq2000.lo.
4709 (ALL_MACHINES_CFILES): Add cpu-iq2000.c.
4710 (BFD32_BACKENDS): Add elf32-iq2000.lo.
4711 (BFD32_BACKENDS_CFILES): Add elf32-iq2000.c.
4712 (cpu-iq2000.lo): New target.
4713 * Makefile.in: Regenerate.
4714 * config.bfd: Handle iq2000-*-elf.
4715 * archures.c (bfd_architecture): Add bfd_{arch,mach}_iq2000.
4716 (bfd_archures_list): Add bfd_iq2000_arch.
4717 * configure.in: Handle bfd_elf32_iq2000_vec.
4718 * configure: Regenerate.
4719 * reloc.c: Add BFD_RELOC_IQ2000_OFFSET_16, BFD_RELOC_IQ2000_OFFSET_21,
4720 and BFD_RELOC_IQ2000_UHI16.
4721 * targets.c (bfd_elf32_iq2000_vec): Declare.
4722 (bfd_target_vector): Add bfd_elf32_iq2000_vec.
4723 * elf.c (prep_headers): Set e_machine to EM_IQ2000.
4724 * cpu-iq2000.c: New file.
4725 * elf32-iq2000.c: Likewise.
4726 * libbfd.h: Regenerate.
4727 * bfd-in2.h: Likewise.
4728
4729 2003-01-02 Richard Sandiford <rsandifo@redhat.com>
4730
4731 * elfxx-mips.c: Include libiberty.h.
4732 (elf_mips_isa, _bfd_mips_elf_mach_extends_p): Remove.
4733 (mips_set_isa_flags): New function, split out from...
4734 (_bfd_mips_elf_final_write_processing): ...here. Only call
4735 mips_set_isa_flags if the EF_MIPS_MACH bits are clear.
4736 (mips_mach_extensions): New array.
4737 (mips_32bit_flags_p): New function.
4738 (_bfd_mips_elf_merge_private_bfd_data): Rework architecture checks.
4739 Use mips_32bit_flags_p to check if one binary is 32-bit and the
4740 other is 64-bit. When adopting IBFD's architecture, adopt the
4741 bfd_mach as well as the flags.
4742
4743 2003-01-02 Nick Kelsey <nickk@ubicom.com>
4744
4745 * elf32-ip2k.c: Re-work of linker relaxation code for the ip2k to
4746 fix internal errors, fix bad code generation, fix incorrect stabs
4747 information, and improve ability to eliminate redundant page
4748 instructions. Added code to ip2k_final_link_relocate to self-verify
4749 the linker relaxation. Fix formatting problems.
4750
4751 2002-12-30 Chris Demetriou <cgd@broadcom.com>
4752
4753 * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mipsisa32r2 case.
4754 * archures.c (bfd_mach_mipsisa32r2): New define.
4755 * bfd-in2.h: Regenerate.
4756 * cpu-mips.c (I_mipsisa32r2): New enum value.
4757 (arch_info_struct): Add entry for I_mipsisa32r2.
4758 * elfxx-mips.c (elf_mips_isa, _bfd_elf_mips_mach)
4759 (_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_32R2.
4760 (_bfd_mips_elf_final_write_processing): Add
4761 bfd_mach_mipsisa32r2 case.
4762 (_bfd_mips_elf_merge_private_bfd_data): Handle merging of
4763 binaries marked as using MIPS32 Release 2.
4764
4765 2002-12-30 Dmitry Diky <diwil@mail.ru>
4766
4767 * Makefile.am: Add msp430 target.
4768 * configure.in: Likewise.
4769 * Makefile.in: Regenerate.
4770 * configure: Regenerate.
4771 * archures.c: Add msp430 architecture vector.
4772 * config.bfd: Likewise.
4773 * reloc.c: Add msp430 relocs.
4774 * targets.c: Add msp320 target.
4775 * cpu-msp430.c: New file: msp430 cpu detection.
4776 * elf32-msp430.c: New file: msp430 reloc processing.
4777 * bfd-in2.h: Regenerate.
4778 * libbfd.h: Regenerate.
4779
4780 2002-12-28 Jakub Jelinek <jakub@redhat.com>
4781
4782 * elf.c (elf_sort_sections): Don't reorder .tbss.
4783 (assign_file_positions_for_segments): Only adjust off/voff
4784 for increased alignment in PT_LOAD or PT_NOTE segment,
4785 but adjust p_filesz for .tbss too. in PT_LOAD consider
4786 .tbss to have zero memory size.
4787 (copy_private_bfd_data) [SECTION_SIZE]: Define.
4788 [IS_CONTAINED_BY_VMA, IS_CONTAINED_BY_LMA]: Use it.
4789 [INCLUDE_SECTION_IN_SEGMENT]: Only put SHF_TLS sections
4790 into PT_TLS segment. Never put SHF_TLS sections in
4791 segments other than PT_TLS or PT_LOAD.
4792
4793 * elf64-alpha.c (elf64_alpha_finish_dynamic_sections): Clear .plt
4794 sh_entsize.
4795
4796 2002-12-23 DJ Delorie <dj@redhat.com>
4797
4798 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Fix logic reversal.
4799
4800 2002-12-23 Alan Modra <amodra@bigpond.net.au>
4801
4802 * elflink.h (elf_link_output_extsym): Heed strip_discarded.
4803
4804 2002-12-23 Nick Clifton <nickc@redhat.com>
4805
4806 * archures.c (bfd_arch_get_compatible): Add third parameter
4807 'accept_unknowns'. Only accept unknown format BFDs if
4808 accept_unknowns is true, or if the format is "binary".
4809 * bfd-in2.h: Regenerate.
4810
4811 2002-12-21 Nick Clifton <nickc@redhat.com>
4812
4813 * coff-arm.c (coff_arm_relocate_section): Disable WINCE workaround
4814 that subtracted 8 from pc relative relocations.
4815
4816 2002-12-20 Kazu Hirata <kazu@cs.umass.edu>
4817
4818 * coff-h8300.c: Fix comment typos.
4819 * coffcode.h: Likewise.
4820 * cpu-cris.c: Likewise.
4821 * elf32-vax.c: Likewise.
4822 * genlink.h: Likewise.
4823 * linker.c: Likewise.
4824 * som.c: Likewise.
4825 * tekhex.c: Likewise.
4826 * vms-misc.c: Likewise.
4827
4828 2002-12-20 DJ Delorie <dj@redhat.com>
4829
4830 * reloc.c: Add BFD_RELOC_XSTORMY16_12.
4831 * libbfd.h: Regenerate.
4832 * bfd-in2.h: Regenerate.
4833 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_12.
4834 (xstormy16_reloc_map): Add R_XSTORMY16_12.
4835
4836 2002-12-19 Kazu Hirata <kazu@cs.umass.edu>
4837
4838 * doc/bfdint.texi: Fix typos.
4839
4840 2002-12-20 Paul Eggert <eggert@twinsun.com>
4841
4842 Port to POSIX 1003.1-2001.
4843 * acinclude.m4 (AM_INSTALL_LIBBFD): Do not rely on "test -o".
4844 * configure.in (build-warnings): Likewise.
4845 (Horrible hacks to build DLLs on Windows): Do not rely on "tail -1".
4846 * aclocal.m4: Regenerate.
4847 * config.in: Regenerate.
4848 * configure: Regenerate.
4849
4850 2002-12-19 Alan Modra <amodra@bigpond.net.au>
4851
4852 * coff-h8300.c: Include libiberty.h.
4853 (h8300_reloc16_extra_cases): Check the hash table creator before
4854 referencing h8300 specific fields. Stash the hash table pointer
4855 in a local var. Comment typo fixes.
4856 (h8300_bfd_link_add_symbols): Likewise.
4857
4858 * reloc.c (struct reloc_howto_struct): Revise src_mask and
4859 dst_mask comments.
4860 * bfd-in2.h: Regenerate.
4861
4862 2002-12-18 Alan Modra <amodra@bigpond.net.au>
4863
4864 * elf32-ppc.c (ppc_elf_relocate_section): Reorganize dynamic reloc
4865 code a little. Comment on dynamic relocs against section symbols.
4866
4867 2002-12-17 Roger Sayle <roger@eyesopen.com>
4868
4869 * configure.host (ia64-*-hpux*): Support 64 bit targets using
4870 the HP compiler's "long long".
4871
4872 2002-12-16 Andrew MacLeod <amacleod@redhat.com>
4873
4874 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_LO16
4875 and R_XSTORMY16_HI16) howto entries.
4876 (xstormy16_reloc_map): Map R_XSTORMY16_{LO,HI}16 to BFD_RELOC_{LO,HI}16.
4877 (xstormy16_info_to_howto_rela): Use R_XSTORMY16_GNU_VTINHERIT to
4878 determine the start of the second reloc table.
4879
4880 2002-12-16 Nathan Tallent <eraxxon@alumni.rice.edu>
4881
4882 * ecofflink.c: Fix the reading of the debugging information
4883 of Tru64/Alpha binaries that are produced by recent Compaq
4884 compilers.
4885 (mk_fdrtab): Fix error in creating the FDR (file descriptor)
4886 table.
4887 (lookup_line): Because of the strange information sometimes
4888 generated by Compaq's recent compilers, change how the FDR
4889 table is searched so that PDRs (procedure descriptors) are
4890 correctly found. Note that this change is really more of a hack;
4891 however, I have included extensive documentation as to why
4892 this is the best solution short of an extensive rewrite or
4893 another hack.
4894 (fdrtab_lookup): Add comments to explain the algorithm.
4895
4896 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
4897
4898 * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Reorder
4899 initializers to match struct declaration.
4900
4901 2002-12-12 Alan Modra <amodra@bigpond.net.au>
4902
4903 * dwarf2.c (comp_unit_contains_address): Comment typo fix.
4904 * elf.c (get_program_header_size): Likewise.
4905 * elf32-m32r.c (m32r_elf_lo16_reloc): Likewise.
4906 (m32r_elf_generic_reloc): Likewise.
4907 * elf32-ppc.c (ppc_elf_howto_init): Likewise.
4908 * elflink.h (elf_bfd_discard_info): Likewise.
4909
4910 2002-12-12 Alan Modra <amodra@bigpond.net.au>
4911
4912 * elf32-i386.c (elf_i386_finish_dynamic_sections): Add output_offset
4913 to DT_JMPREL. Use srelplt input section size for DT_PLTRELSZ and
4914 DT_RELSZ adjustment, not output section. Avoid writing tags when
4915 unchanged. Don't assume linker script is sane, adjust DT_REL too.
4916 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Just use raw
4917 size of srelplt for DT_PLTRELSZ. Use srelplt input section size for
4918 DT_RELASZ adjustment, not output section. Avoid writing tags when
4919 unchanged. Adjust DT_RELA.
4920 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Tweaks for better
4921 formatting. Avoid writing tags when unchanged. Adjust DT_RELA.
4922
4923 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
4924
4925 * elfxx-mips.c (mips_elf_calculate_relocation): Don't divide
4926 addend by 4.
4927
4928 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
4929
4930 * elfxx-mips.c (struct mips_got_entry): New.
4931 (struct mips_got_info): Added got_entries field.
4932 (mips_elf_got_entry_hash, mips_elf_got_entry_eq): New functions.
4933 (mips_elf_local_got_index, mips_elf_got_page,
4934 mips_elf_got16_entry): Re-implement in terms of new...
4935 (mips_elf_create_local_got_entry): Rewrite to use got_entries.
4936 Change return type.
4937 (mips_elf_highest): Warning clean-up.
4938 (mips_elf_create_got_section): Initialize got_entries.
4939 (_bfd_mips_elf_check_relocs): Use got_entries to estimate
4940 local got size.
4941 (_bfd_mips_elf_size_dynamic_sections): Do not account for
4942 GOT_PAGE entries, since we now reuse GOT16 entries.
4943
4944 2002-12-10 Jason Thorpe <thorpej@wasabisystems.com>
4945
4946 * aoutx.h (set_section_contents): Allow an otherwise unrepresentable
4947 read-only section that lies after .text and before .data to be
4948 written into the output file and included in a_text.
4949 (translate_to_native_sym_flags): If an otherwise unrepresentable
4950 section was merged with .text, convert its symbols to N_TEXT
4951 symbols.
4952 * libaout.h (aout_section_merge_with_text_p): New macro.
4953
4954 2002-12-08 Alan Modra <amodra@bigpond.net.au>
4955
4956 * bfd-in.h: Comment typo fix. Formatting.
4957 * bfd-in2.h: Regenerate.
4958 * coff64-rs6000.c (xcoff64_openr_next_archived_file): Warning fix.
4959 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): Prototype.
4960 * elf64-mmix.c (mmix_dump_bpo_gregs): Warning fix.
4961
4962 2002-12-05 Richard Henderson <rth@redhat.com>
4963
4964 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21BI.
4965 Only send PCREL21B though the plt. Fix installed reloc type.
4966 (elfNN_ia64_relocate_section): Give error for dynamic reloc
4967 against PCREL22 or PCREL64I; clean up error messages for
4968 branch relocs.
4969
4970 2002-12-04 Kevin Buettner <kevinb@redhat.com>
4971
4972 * elf64-mips.c (elf64_mips_grok_prstatus, elf64_mips_grok_psinfo):
4973 New functions.
4974 (elf_backend_grok_prstatus, elf_backend_grok_psinfo): Define.
4975
4976 2002-12-04 David Mosberger <davidm@hpl.hp.com>
4977
4978 * cpu-ia64-opc.c: Add operand constant "ar.csd".
4979
4980 2002-12-04 H.J. Lu <hjl@gnu.org>
4981
4982 * elfxx-ia64.c (get_local_sym_hash): Use section ID instead of
4983 BFD address when constructing local name.
4984
4985 2002-12-04 Andreas Schwab <schwab@suse.de>
4986
4987 * elf32-m68k.c (struct elf_m68k_link_hash_table): Add sym_sec
4988 member.
4989 (elf_m68k_link_hash_table_create): Initialize it.
4990 (elf_m68k_check_relocs): Handle symbols that are forced to be
4991 local due to visibility changes.
4992 (elf_m68k_adjust_dynamic_symbol): Likewise.
4993 (elf_m68k_size_dynamic_sections): Likewise.
4994 (elf_m68k_discard_copies): Likewise.
4995 (elf_m68k_relocate_section): Likewise.
4996
4997 2002-12-04 Alan Modra <amodra@bigpond.net.au>
4998
4999 * elf64-ppc.c (ppc64_elf_edit_opd): Correct typo.
5000
5001 2002-12-04 Alan Modra <amodra@bigpond.net.au>
5002
5003 * srec.c (srec_write_symbols): Restore '$' prefix to address
5004 accidentally removed in 2002-04-04 change.
5005 (srec_get_symtab): Use 0 instead of `(long) FALSE'.
5006
5007 2002-12-03 Nick Clifton <nickc@redhat.com>
5008
5009 * elf32-ppc.c (apuinfo_list_init): New function.
5010 (apuinfo_list_add): New function: Add a value to the list.
5011 (apuinfo_list_length): New function: Return the number of
5012 values on the list.
5013 (apuinfo_list_element): New function: Return a value on the
5014 list.
5015 (apuinfo_list_finish): New function: Free the resources used
5016 by the list.
5017 (ppc_elf_begin_write_processing): New function. Scan the
5018 input bfds for apuinfo sections.
5019 (ppc_elf_write_section): New function: Delay the creation of
5020 the contents of an apuinfo section in an output bfd.
5021 (ppc_elf_final_write_processing): New function. Create the
5022 contents of an apuinfo section in an output bfd.
5023 (elf_backend_begin_write_processing): Define.
5024 (elf_backend_final_write_processing): Define.
5025 (elf_backend_write_section): Define.
5026
5027 2002-12-03 Richard Henderson <rth@redhat.com>
5028
5029 * cpu-ia64-opc.c (elf64_ia64_operands): Add ldxmov entry.
5030
5031 2002-12-01 Stephane Carrez <stcarrez@nerim.fr>
5032
5033 Fix PR savannah/1417:
5034 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Don't adjust
5035 branch if it goes to the start of the deleted region.
5036
5037 2002-12-01 Stephane Carrez <stcarrez@nerim.fr>
5038
5039 * bfd-in2.h (bfd_mach_m6812): Rebuild.
5040 * archures.c (bfd_mach_m6812_default, bfd_mach_m6812,
5041 bfd_mach_m6812s): Declare.
5042
5043 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): New function.
5044 (_bfd_m68hc12_elf_set_private_flags): Call it.
5045 (_bfd_m68hc12_elf_print_private_bfd_data): Report processor version.
5046 (_bfd_m68hc12_elf_merge_private_bfd_data): Merge the flags and
5047 report microcontroller incompatibilities (HC12 vs HCS12).
5048 (elf_backend_object_p): Update.
5049
5050 2002-11-30 Alan Modra <amodra@bigpond.net.au>
5051
5052 * bfd-in.h (TRUE_FALSE_ALREADY_DEFINED, BFD_TRUE_FALSE): Delete.
5053 (enum bfd_boolean, boolean): Delete.
5054 (bfd_boolean): Typedef to an int.
5055 (FALSE, TRUE): Define.
5056 * aix386-core.c, aix5ppc-core.c, aout-adobe.c, aout-arm.c, aout-cris.c,
5057 aout-encap.c, aout-ns32k.c, aout-target.h, aout-tic30.c, aoutf1.h,
5058 aoutx.h, archive.c, archive64.c, archures.c, bfd-in.h, bfd.c, bfdwin.c,
5059 binary.c, bout.c, cache.c, cisco-core.c, coff-a29k.c, coff-alpha.c,
5060 coff-apollo.c, coff-arm.c, coff-aux.c, coff-h8300.c, coff-h8500.c,
5061 coff-i386.c, coff-i860.c, coff-i960.c, coff-ia64.c, coff-m68k.c,
5062 coff-m88k.c, coff-mcore.c, coff-mips.c, coff-or32.c, coff-ppc.c,
5063 coff-rs6000.c, coff-sh.c, coff-sparc.c, coff-stgo32.c, coff-tic30.c,
5064 coff-tic4x.c, coff-tic54x.c, coff-tic80.c, coff-w65.c, coff-we32k.c,
5065 coff-z8k.c, coff64-rs6000.c, coffcode.h, coffgen.c, cofflink.c,
5066 corefile.c, cpu-a29k.c, cpu-alpha.c, cpu-arc.c, cpu-arm.c, cpu-avr.c,
5067 cpu-cris.c, cpu-d10v.c, cpu-d30v.c, cpu-dlx.c, cpu-fr30.c, cpu-frv.c,
5068 cpu-h8300.c, cpu-h8500.c, cpu-hppa.c, cpu-i370.c, cpu-i386.c,
5069 cpu-i860.c, cpu-i960.c, cpu-ia64.c, cpu-ip2k.c, cpu-m10200.c,
5070 cpu-m10300.c, cpu-m32r.c, cpu-m68hc11.c, cpu-m68hc12.c, cpu-m68k.c,
5071 cpu-m88k.c, cpu-mcore.c, cpu-mips.c, cpu-mmix.c, cpu-ns32k.c,
5072 cpu-openrisc.c, cpu-or32.c, cpu-pdp11.c, cpu-pj.c, cpu-powerpc.c,
5073 cpu-rs6000.c, cpu-s390.c, cpu-sh.c, cpu-sparc.c, cpu-tic30.c,
5074 cpu-tic4x.c, cpu-tic54x.c, cpu-tic80.c, cpu-v850.c, cpu-vax.c,
5075 cpu-w65.c, cpu-we32k.c, cpu-xstormy16.c, cpu-z8k.c, dwarf1.c,
5076 dwarf2.c, ecoff.c, ecofflink.c, efi-app-ia32.c, efi-app-ia64.c,
5077 elf-bfd.h, elf-eh-frame.c, elf-hppa.h, elf-m10200.c, elf-m10300.c,
5078 elf-strtab.c, elf.c, elf32-arc.c, elf32-arm.h, elf32-avr.c,
5079 elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c, elf32-fr30.c,
5080 elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c, elf32-hppa.h,
5081 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
5082 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
5083 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
5084 elf32-pj.c, elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-sh64-com.c,
5085 elf32-sh64.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
5086 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
5087 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-ppc.h, elf64-s390.c,
5088 elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c,
5089 elfarm-oabi.c, elfcode.h, elfcore.h, elflink.c, elflink.h,
5090 elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c, elfxx-mips.h,
5091 elfxx-target.h, format.c, freebsd.h, genlink.h, hash.c, hp300hpux.c,
5092 hppabsd-core.c, hpux-core.c, i386aout.c, i386linux.c, i386lynx.c,
5093 i386mach3.c, i386msdos.c, i386os9k.c, ieee.c, ihex.c, irix-core.c,
5094 libaout.h, libbfd-in.h, libbfd.c, libcoff-in.h, libecoff.h, libieee.h,
5095 libnlm.h, liboasys.h, libpei.h, libxcoff.h, linker.c, lynx-core.c,
5096 m68klinux.c, m68klynx.c, mach-o.c, mach-o.h, merge.c, mipsbsd.c,
5097 mmo.c, netbsd-core.c, netbsd.h, nlm.c, nlm32-alpha.c, nlm32-i386.c,
5098 nlm32-ppc.c, nlm32-sparc.c, nlmcode.h, oasys.c, opncls.c, osf-core.c,
5099 pc532-mach.c, pdp11.c, pe-arm.c, pe-i386.c, pe-mcore.c, pe-mips.c,
5100 pe-sh.c, peXXigen.c, pef.c, pei-arm.c, pei-i386.c, pei-mcore.c,
5101 pei-mips.c, pei-sh.c, peicode.h, ppcboot.c, ptrace-core.c, reloc.c,
5102 reloc16.c, riscix.c, rs6000-core.c, sco5-core.c, section.c, simple.c,
5103 som.c, som.h, sparclinux.c, sparclynx.c, srec.c, stabs.c, sunos.c,
5104 syms.c, targets.c, tekhex.c, ticoff.h, trad-core.c, versados.c,
5105 vms-gsd.c, vms-hdr.c, vms-misc.c, vms-tir.c, vms.c, vms.h,
5106 xcoff-target.h, xcofflink.c, xsym.c, xsym.h: Replace boolean with
5107 bfd_boolean, true with TRUE, false with FALSE. Simplify comparisons
5108 of bfd_boolean vars with TRUE/FALSE. Formatting.
5109 * bfd-in2.h, libbfd.h, libcoff.h: Regenerate
5110
5111 2002-11-28 Alan Modra <amodra@bigpond.net.au>
5112
5113 * elf-bfd.h: Replace occurrences of Elf32_Internal_* and
5114 Elf64_Internal_* with Elf_Internal_*. Replace Elf_Internal_Rel
5115 with Elf_Internal_Rela.
5116 * elf-hppa.h, elf-m10200.c, elf-m10300.c, elf32-arc.c, elf32-arm.h,
5117 elf32-avr.c, elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c,
5118 elf32-fr30.c, elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c,
5119 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
5120 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
5121 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
5122 elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-v850.c, elf32-vax.c,
5123 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
5124 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
5125 elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c, elfarm-oabi.c,
5126 elfcode.h, elflink.h, elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c: Ditto.
5127 * elf-hppa.h (elf_hppa_internal_shdr): Delete. Use Elf_Internal_Shdr
5128 throughout instead.
5129 * elf.c (_bfd_elf_no_info_to_howto_rel): Delete.
5130 * elfcode.h (elf_swap_reloca_in): Pass source operand as a bfd_byte *.
5131 Remove INLINE keyword.
5132 (elf_swap_reloc_in): Likewise. Also clear r_addend.
5133 (elf_swap_reloc_out, elf_swap_reloca_out): Pass destination operand
5134 as a bfd_byte *.
5135 (elf_write_relocs): Consolidate REL and RELA code.
5136 (elf_slurp_reloc_table_from_section): Simplify REL code.
5137 (NAME(_bfd_elf,size_info)): Populate reloc swap entries.
5138 * elf-bfd.h (MAX_INT_RELS_PER_EXT_REL): Define.
5139 * elflink.h (elf_link_read_relocs_from_section): Consolidate REL and
5140 RELA code.
5141 (elf_link_adjust_relocs): Likewise. Don't malloc space for temp
5142 reloc array, use a fixed size of MAX_INT_RELS_PER_EXT_REL.
5143 (elf_link_output_relocs): Likewise.
5144 (elf_reloc_link_order): Likewise.
5145 (elf_finish_pointer_linker_section): Likewise.
5146 (struct elf_link_sort_rela): Remove union.
5147 (elf_link_sort_cmp1): Update to suit.
5148 (elf_link_sort_cmp2): Here too.
5149 (elf_link_sort_relocs): Consolidate REL and RELA code. Fix memory
5150 over-allocation for int_rels_per_ext_rel != 1 case.
5151 * elf32-arm.h: Update all bfd_elf32_swap_reloc_out calls.
5152 * elf32-i386.c: Likewise.
5153 * elf32-cris.c: Likewise for bfd_elf32_swap_reloca_out.
5154 * elf32-hppa.c, elf32-i370.c, elf32-m68k.c, elf32-ppc.c, elf32-s390.c,
5155 elf32-sh.c, elf32-vax.c, elfxx-mips.c: Likewise.
5156 * elf64-alpha.c: Likewise for bfd_elf64_swap_reloca_out.
5157 * elf64-hppa.c, elf64-mips.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
5158 elf64-sparc.c, elf64-x86-64.c: Likewise.
5159 * elfxx-ia64.c: Likewise for bfd_elfNN_swap_reloca_out.
5160 * elfxx-mips.c (sort_dynamic_relocs): Likewise for
5161 bfd_elf32_swap_reloc_in.
5162
5163 * elf32-arm.h: Update elf32_arm_info_to_howto calls.
5164 * elf32-mips.c: Likewise for mips_info_to_howto_rel.
5165 (mips_elf64_swap_reloc_in): Zero r_addend.
5166 (mips_elf64_be_swap_reloc_in): Likewise.
5167 (mips_elf64_slurp_one_reloc_table): Simplify.
5168
5169 * elf64-alpha.c (alpha_elf_size_info): Populate reloc swap entries.
5170 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
5171 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
5172
5173 2002-11-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5174
5175 * elf32-sh.c (sh_elf_relocate_section): Don't complain about
5176 unresolved debugging relocs in dynamic applications.
5177 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
5178
5179 2002-11-26 Alan Modra <amodra@bigpond.net.au>
5180
5181 * elf-eh-frame.c (ENSURE_NO_RELOCS): Disregard R_*_NONE relocs.
5182 (_bfd_elf_discard_section_eh_frame): Don't discard duplicate CIEs
5183 on a relocatable link. Comment typos.
5184 * elf.c (_bfd_elf_link_hash_newfunc): Assign elements of structure
5185 in the order they are declared. Clear elf_hash_value too.
5186 (_bfd_elf_link_hash_table_init): Likewise assign in order. Clear
5187 eh_info and tls_segment.
5188 * elflink.h (elf_link_input_bfd <emit_relocs>): Keep reloc offsets
5189 sorted when discarding relocs by turning them into R_*_NONE.
5190
5191 * libbfd.c (warn_deprecated): Comment spelling.
5192 * po/SRC-POTFILES.in: Regenerate.
5193
5194 2002-11-21 Richard Henderson <rth@redhat.com>
5195
5196 * elflink.h (elf_link_add_object_symbols): Don't overwrite the
5197 arch's st_other bits when merging visibilities.
5198 (elf_link_output_extsym): Tidy clearing of visibility field.
5199
5200 2002-11-21 Alan Modra <amodra@bigpond.net.au>
5201
5202 * coff-mcore.c (SWAP_IN_RELOC_OFFSET): Define.
5203 (SWAP_OUT_RELOC_OFFSET): Define.
5204
5205 2002-11-20 Alexandre Oliva <aoliva@redhat.com>
5206
5207 * elf.c (_bfd_elf_link_hash_table_init): Make sure
5208 can_refcount is properly extended to the type of
5209 init_refcount.
5210
5211 2002-11-19 Alexandre Oliva <aoliva@redhat.com>
5212
5213 * elfxx-mips.c (MIPS_RELOC_RELA_P): New macro.
5214 (_bfd_mips_elf_relocate_section): Use it.
5215
5216 * elfxx-mips.c (MNAME): New macro.
5217 (_bfd_mips_elf_check_relocs): Use it.
5218 (_bfd_mips_elf_discard_info): Likewise.
5219 (_bfd_mips_elf_final_link): Likewise.
5220
5221 2002-11-19 Alan Modra <amodra@bigpond.net.au>
5222
5223 * elf64-ppc.c (ppc64_elf_edit_opd): When deleting relocs, adjust
5224 rel_hdr.sh_size too.
5225
5226 2002-11-18 Klee Dienes <kdienes@apple.com>
5227
5228 * Makefile.am (BFD32_LIBS): Add bfdwin.lo, bfdio.lo.
5229 (BFD32_LIBS_CFILES): Add bfdwin.c, bfdio.c.
5230 (BFD_H_FILES): Add bfdwin.c, bfdio.c.
5231 (LIBBFD_H_FILES): Add bfdwin.c, bfdio.c.
5232 Add dependencies for bfdwin.c, bfdio.c.
5233 * bfd.c: Remove bfd_get_mtime, bfd_get_size.
5234 * libbfd.c: Remove real_read, bfd_bread, _bfd_window_internal,
5235 bfd_init_window, bfd_free_window, bfd_get_file_window, bfd_bwrite,
5236 bfd_tell, bfd_flush, bfd_stat, bfd_seek.
5237 * bfdio.c: New file. Contains real_read, bfd_bread, bfd_write,
5238 bfd_tell, bfd_flush, bfd_stat, bfd_seek, bfd_ge_mtime,
5239 bfd_get_size (moved from libbfd.c and bfd.c).
5240 * bfdwin.c New file. Contains _bfd_window_internal,
5241 bfd_init_window, bfd_free_window, bfd_get_file_window (moved from
5242 libbfd.c and bfd.c).
5243 * po/SRC-POTFILES.in: Regenerate.
5244 * po/bfd.pot: Regenerate.
5245 * libbfd.h: Regenerate.
5246 * bfd-in2.h: Regenerate.
5247 * aclocal.m4: Regenerate.
5248 * Makefile.in: Regenerate.
5249 * configure: Regenerate.
5250
5251 2002-11-18 Klee Dienes <kdienes@apple.com>
5252
5253 * bfd.c (bfd_preserve_save): Don't zero BFD_IN_MEMORY.
5254
5255 2002-11-15 Kazu Hirata <kazu@cs.umass.edu>
5256
5257 * coff-h8300.c (h8300_reloc16_estimate): Do not optimize away
5258 jsr after a short jump.
5259 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
5260
5261 2002-11-15 Klee Dienes <kdienes@apple.com>
5262
5263 * pef.c (bfd_pef_convert_architecture): Move declaration of
5264 ARCH_POWERPC and ARCH_M68K to the start of the function.
5265
5266 2002-11-14 Svein E. Seldal <Svein.Seldal@solidas.com>
5267
5268 * coff-tic4x.c (tic4x_howto_table): Formatting fixup
5269
5270 2002-11-14 Hans-Peter Nilsson <hp@bitrange.com>
5271
5272 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs):
5273 For bpo_gregs_section->contents, allocate _raw_size, not
5274 _cooked_size.
5275
5276 2002-11-13 Klee Dienes <kdienes@apple.com>
5277
5278 * config.bfd: Add entries for powerpc-*-darwin and cousins.
5279
5280 2002-11-13 H.J. Lu <hjl@gnu.org>
5281
5282 * elfcode.h (elf_object_p): Don't restore abfd->arch_info.
5283
5284 2002-11-13 Klee Dienes <kdienes@apple.com>
5285 Alan Modra <amodra@bigpond.net.au>
5286
5287 * bfd.c (struct bfd_preserve): New.
5288 (bfd_preserve_save): New function.
5289 (bfd_preserve_restore): Ditto.
5290 (bfd_preserve_finish): Ditto.
5291 * bfd-in2.h: Regenerate.
5292 * mach-o.c: Formatting.
5293 (bfd_mach_o_scan_read_symtab_symbol): Make "value" unsigned.
5294 (bfd_mach_o_object_p): Use bfd_preserve_save/restore/finish.
5295 (bfd_mach_o_core_p): Ditto.
5296 (bfd_mach_o_scan): Pass in mdata.
5297 * mach-o.h (bfd_mach_o_scan): Update prototype.
5298 * pef.c: Formatting.
5299 (bfd_pef_object_p): Use bfd_preserve_save/restore/finish.
5300 (bfd_pef_xlib_object_p): Ditto.
5301 (bfd_pef_scan): Pass in mdata. Move version check to bfd_pef_object_p.
5302 * pef.h (bfd_pef_scan): Update prototype.
5303 * xsym.c: Formatting, K&R fixes.
5304 (bfd_sym_object_p): Use bfd_preserve_save/restore/finish.
5305 (bfd_sym_scan): New function split out from bfd_sym_object_p.
5306 * xsym.h (bfd_sym_scan): Declare.
5307 * elfcode.h (elf_object_p): Use bfd_preserve_save/restore/finish.
5308 * elfcore.h (elf_core_file_p): Likewise.
5309 * targets.c (_bfd_target_vector): Revert 2002-11-08 change.
5310
5311 2002-11-12 Nick Clifton <nickc@redhat.com>
5312
5313 * po/da.po: Updated Danish translation.
5314
5315 2002-11-12 Alan Modra <amodra@bigpond.net.au>
5316
5317 * elflink.h (elf_link_add_object_symbols): Optimize stabs for
5318 relocatable link too.
5319 (elf_link_input_bfd): When emitting relocs, adjust offsets for
5320 eh_frame and stab sections. Zap deleted relocs.
5321 (elf_reloc_symbol_deleted_p): Return true for zero r_symndx.
5322 (elf_bfd_discard_info): Run for relocatable link too.
5323 * elf64-ppc.c (ppc64_elf_edit_opd): Rename from edit_opd. Make global.
5324 Handle ld -r case.
5325 (ppc64_elf_size_dynamic_sections): Don't call edit_opd from here.
5326 * elf64-ppc.h (ppc64_elf_edit_opd): Declare.
5327
5328 * elf-bfd.h (struct cie_header): Move from elf_eh-frame.c.
5329 (struct cie, struct eh_cie_fde, struct eh_frame_sec_info): Likewise.
5330 (struct eh_frame_array_ent, struct eh_frame_hdr_info): Likewise.
5331 (enum elf_link_info_type): Remove ELF_INFO_TYPE_EH_FRAME_HDR.
5332 (struct eh_frame_hdr_info): Add "hdr_sec", remove "split".
5333 (struct elf_link_hash_table): Add eh_info.
5334 (struct elf_obj_tdata): Change eh_frame_hdr to an asection *.
5335 (_bfd_elf_discard_section_eh_frame): Update prototype.
5336 (_bfd_elf_discard_section_eh_frame_hdr): Likewise.
5337 (_bfd_elf_write_section_eh_frame): Likewise.
5338 (_bfd_elf_write_section_eh_frame_hdr): Likewise.
5339 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Remove "ehdrsec"
5340 param. Get "hdr_info" from link hash table.
5341 (_bfd_elf_discard_section_eh_frame_hdr): Remove "sec" param. Get
5342 header section from link hash table. Save header section to elf_tdata.
5343 (_bfd_elf_maybe_strip_eh_frame_hdr): Remove local "sec". Use
5344 header section from link hash table. Don't alloc hdr_info. Clear
5345 hdr_sec instead of setting "strip".
5346 (_bfd_elf_eh_frame_section_offset): Formatting.
5347 (_bfd_elf_write_section_eh_frame): Remove "ehdrsec", add "info" param.
5348 Get header section from link hash table.
5349 (_bfd_elf_write_section_eh_frame_hdr): Remove "sec", add "info" param.
5350 Get header section from link hash table.
5351 * elf.c (map_sections_to_segments): Use cached eh_frame_hdr.
5352 (get_program_header_size): Likewise.
5353 (_bfd_elf_section_offset): Formatting.
5354 * elflink.h (elf_link_create_dynamic_sections): Stash eh frame header
5355 section pointer in link hash table.
5356 (elf_bfd_final_link): Adjust _bfd_elf_write_section_eh_frame_hdr
5357 and _bfd_elf_write_section_eh_frame calls. Update comment about
5358 eh_frame entries.
5359 (elf_bfd_discard_info): Adjust _bfd_elf_discard_section_eh_frame and
5360 _bfd_elf_discard_section_eh_frame_hdr calls. Remove "ehdr".
5361
5362 * po/SRC-POTFILES.in: Regenerate.
5363
5364 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't zero
5365 relocs for discarded FDEs. Remove dead code.
5366 (_bfd_elf_write_section_eh_frame_hdr): Remove dead code.
5367 * elflink.h (elf_bfd_discard_info): Don't save edited relocs.
5368 Tidy conditions under which stabs are edited. Formatting.
5369 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
5370 from discarded relocs.
5371 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Add reloc output
5372 section adjustments after testing magic values.
5373
5374 2002-11-12 Thomas Moestl <tmm@FreeBSD.org>
5375
5376 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Correct
5377 references to large plt symbols.
5378
5379 2002-11-12 Klee Dienes <kdienes@apple.com>
5380
5381 * mach-o.c (bfd_mach_o_scan_read_thread): Don't re-use 'i' when
5382 looking for an unused section name.
5383
5384 2002-11-11 Kazu Hirata <kazu@cs.umass.edu>
5385
5386 * coff-h8300.c: Fix formatting.
5387 * elf32-h8300.c: Likewise.
5388 * reloc16.c: Likewise.
5389
5390 2002-11-09 Jeroen Dobbelaere <jeroen.dobbelaere@acunia.com>
5391
5392 * elf32-arm.h (elf32_arm_size_dynamic_sections): Don't strip output
5393 section when dynamic section unused; _bfd_strip_section_from_output
5394 instead.
5395
5396 2002-11-08 Alan Modra <amodra@bigpond.net.au>
5397
5398 * targets.c (_bfd_target_vector): Disable pef_vec, pef_xlib_vec
5399 and sym_vec.
5400
5401 * dwarf2.c: Revert last change.
5402
5403 2002-11-07 Michal Ludvig <mludvig@suse.cz>
5404
5405 * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
5406 _bfd_dwarf2_find_nearest_line): Use
5407 bfd_simple_get_relocated_section_contents() instead of
5408 bfd_get_section_contents().
5409 * reloc.c (bfd_perform_relocation): Add sanity check.
5410 * simple.c (simple_get_relocated_section_contents): If the section
5411 does not have any relocs associated with it, just return the
5412 unadjusted contents.
5413
5414 2002-11-07 Hans-Peter Nilsson <hp@axis.com>
5415
5416 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOT,
5417 case R_CRIS_32_GOT>: Correct test for filling in constant .got
5418 contents, enabling for a non-DSO, for symbols defined in the
5419 program with --export-dynamic.
5420
5421 2002-11-07 Alan Modra <amodra@bigpond.net.au>
5422
5423 * elf64-ppc.c: Comment typo fixes.
5424 (ppc64_elf_merge_private_bfd_data): Allow BFD_ENDIAN_UNKNOWN input.
5425
5426 2002-11-07 Nick Clifton <nickc@redhat.com>
5427
5428 * po/da.po: Updated Danish translation.
5429
5430 2002-11-06 Alexandre Oliva <aoliva@redhat.com>
5431
5432 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Generate
5433 exactly three internal relocs per external reloc. Set reloc_count
5434 to the external reloc count.
5435
5436 2002-11-06 Klee Dienes <kdienes@apple.com>
5437
5438 * coff-stgo32.c (stub_bytes): Mark as const.
5439 Fix comment formatting.
5440
5441 2002-11-06 Klee Dienes <kdienes@apple.com>
5442
5443 * Makefile.am (BFD32_BACKENDS): Add mach-o.lo, pef.lo, and
5444 xsym.lo.
5445 (BFD32_BACKENDS_CFILES): Add mach-o.c, pef.c, and xsym.c.
5446 (SOURCE_HFILES): Add mach-o.h, pef.h, pef-traceback.h, xsym.h
5447 * archures.c (enum bfd_architecture): Add bfd_arch_m98k.
5448 * bfd.c (struct bfd): Add private data for mach-o, pef, and sym.
5449 * targets.c (enum bfd_flavour): Add flavours for mach-o, pef, and
5450 sym.
5451 (_bfd_target_vector): Add target vectors for mach-o, pef, and sym.
5452 * Makefile.in: Regenerate.
5453 * doc/Makefile.in: Regenerate.
5454 * bfd-in2.h: Regenerate.
5455 * xsym.c: New file. Contains support for the Apple/Metrowerks
5456 xSYM debugging format.
5457 * xsym.h: New file.
5458 * pef.c: New file. Contains support for the Apple Code Fragment
5459 Manager Preferred Executable Format
5460 * pef.h: New file.
5461 * pef-traceback.h: New file. Contains support for parsing PowerPC
5462 traceback tables as used by PEF executables (and perhaps other
5463 systems as well).
5464 * mach-o.c: New file. Contains support for the Mach-O object file
5465 format.
5466 * mach-o.h: New file.
5467 * mach-o-target.c: New file. Declares the mach-o targets
5468 themselves. Included three times by mach-o.c; each time with a
5469 different set of macros set.
5470
5471 2002-11-06 Graeme Peterson <gp@qnx.com>
5472
5473 * Makefile.am: Remove entries for elf32-qnx.[ch].
5474 * Makefile.in: Regenerate.
5475 * config.bfd: Change arm-nto to use bfd_elf32_{big|little}arm_vec,
5476 ppc-nto to use bfd_elf32_powerpc{le}_vec, sh-nto to use
5477 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
5478 * configure.in: Remove support for bfd_elf32_sh{l}qnx_vec,
5479 bfd_elf32_powerpc{le}qnx_vec, bfd_elf32_{big|little}armqnx_vec,
5480 and bfd_elf32_i386qnx_vec, and removed elf32-qnx.lo from other targets.
5481 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
5482 * configure: Regenerate.
5483 * elf32-qnx.c: Remove.
5484 * elf32-qnx.h: Remove.
5485 * elf.c: Remove calls to QNX specific set_nonloadable_filepos,
5486 is_contained_by_filepos, and copy_private_bfd_data_p.
5487 * elf-bfd.h (struct elf_backend_data): Remove set_nonloadable_filepos,
5488 is_contained_by_filepos, and copy_private_bfd_data_p.
5489 * elf32-i386.c: Remove QNX extended bfd support.
5490 * elf32-ppc.c: Remove QNX extended bfd support.
5491 * elf32-sh.c: Remove QNX extended bfd support.
5492 * elfarm-nabi.c: Remove QNX extended bfd support.
5493 * targets.c: Remove qnx vectors.
5494 * elfxx-target.h (elf_backend_set_nonloadable_filepos): Remove
5495 (elf_backend_is_contained_by_filepos): Remove.
5496 (elf_backend_copy_private_bfd_data_p): Remove.
5497 * po/SRC-POTFILES.in: Regenerate.
5498
5499 2002-11-06 David O'Brien <obrien@FreeBSD.org>
5500 Alan Modra <amodra@bigpond.net.au>
5501
5502 * elf64-sparc.c (sparc64_elf_relocate_section): Adjust addend of
5503 dynamic relocs against section symbols for the output section vma.
5504
5505 2002-11-05 Alan Modra <amodra@bigpond.net.au>
5506
5507 * elf32-arm.h (t2a1_push_insn, t2a2_ldr_insn, t2a3_mov_insn,
5508 t2a4_bx_insn, t2a5_pop_insn, t2a6_bx_insn): Remove.
5509
5510 2002-11-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5511 Alan Modra <amodra@bigpond.net.au>
5512
5513 * config.bfd (sh-*-linux*): Use bfd_elf*_sh64*lin_vec as sh64
5514 vectors in target_selvecs.
5515 (shle-*-netbsdelf*): Use bfd_elf*_sh64*nbsd_vec as sh64 vectors
5516 in target_selvecs.
5517 (sh-*-netbsdelf*): Likewise.
5518 * configure.in (assocvecs): New variable. Handle assocvecs like
5519 selvecs.
5520 * configure: Regenerate.
5521 * format.c (bfd_check_format_matches): Store bfd_target pointers
5522 in matching_vector instead of target names. Select first target
5523 from bfd_associated_vector that matches a list of ambiguous targets.
5524 * targets.c (_bfd_associated_vector): New array.
5525 (bfd_associated_vector): New variable.
5526 (_bfd_target_vector): Add bfd_elf*_sh64*lin_vec.
5527 * libbfd-in.h (bfd_associated_vector): Declare.
5528 * libbfd.h: Regenerate.
5529
5530 2002-11-05 Elias Athanasopoulos <eathan@otenet.gr>
5531
5532 * vms-gsd.c (_bfd_vms_write_gsd): Check that symbol->udata.p is
5533 non-NULL before dereferencing.
5534
5535 2002-11-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5536
5537 * vms.c (vms_object_p): Restore the start address when returning
5538 NULL.
5539
5540 2002-11-04 Alan Modra <amodra@bigpond.net.au>
5541 Hans-Peter Nilsson <hp@axis.com>
5542
5543 * elflink.h (struct elf_final_link_info): Add shndxbuf_size.
5544 (elf_bfd_final_link): Don't bother zeroing symtab_hdr fields.
5545 Set up a larger symshndxbuf, and write it out. Free it on
5546 exit rather than freeing symbuf twice. Correct section index
5547 on output section symbol loop.
5548 (elf_link_output_sym): Accumulate symbol extension section
5549 indices, reallocating symshndxbuf rather than writing it out.
5550 (elf_link_flush_output_syms): Don't flush symshndxbuf.
5551 * elf.c (assign_section_numbers): Init i_shdrp to all zero.
5552 Use bfd_zalloc to clear i_shdrp[0] too.
5553
5554 2002-11-03 Stephen Clarke <stephen.clarke@earthling.net>
5555
5556 * elf32-sh64-com.c (sh64_address_in_cranges): Use
5557 _raw_size of cranges section if _cooked_size not yet set.
5558
5559 2002-11-03 Hans-Peter Nilsson <hp@axis.com>
5560
5561 * elf32-v850.c (v850_elf_relax_delete_bytes): Correct parameters
5562 for bfd_elf32_swap_symbol_out.
5563
5564 2002-10-31 David O'Brien <obrien@FreeBSD.org>
5565
5566 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't mix
5567 signed and unsigned in comparison.
5568
5569 2002-10-30 Daniel Jacobowitz <drow@mvista.com>
5570
5571 * coffcode.h: Remove extraneous '\'.
5572
5573 2002-10-28 H.J. Lu <hjl@gnu.org>
5574
5575 * Makefile.am (targets.lo): Depend on Makefile instead of
5576 config.status.
5577 (archures.lo): Likewise.
5578 * Makefile.in: Regenerated.
5579
5580 2002-10-25 Jason Thorpe <thorpej@wasabisystems.com>
5581
5582 * config.bfd (mips*el-*-netbsd*, mips*-*-netbsd*): Add
5583 bfd_elf64_bigmips_vec and bfd_elf64_littlemips_vec to
5584 targ_selvecs.
5585
5586 2002-10-25 Jim Wilson <wilson@redhat.com>
5587
5588 * elf64-sh64.c (sh_elf64_relocate_section): Call
5589 _bfd_elf_rela_local_sym. Handle relocs against STT_SECTION symbol
5590 of SHF_MERGE section.
5591
5592 2002-10-25 Hans-Peter Nilsson <hp@axis.com>
5593
5594 * simple.c: Correct placement of ATTRIBUTE_UNUSED.
5595
5596 2002-10-24 John David Anglin <dave@hiauly1.hia.nrc.ca>
5597
5598 * aoutx.h (NAME(aout,swap_ext_reloc_in)): Cast bytes->r_index to
5599 unsigned int. Cast RELOC_BASE10, RELOC_BASE13 and RELOC_BASE22 to
5600 unsigned int.
5601 (NAME(aout,final_link)): Cast enum used in assignment.
5602 (aout_link_write_symbols): Cast enums in comparisons, int values to
5603 boolean, enums in assignments to int.
5604 (aout_link_input_section_std): Cast rel->r_index to unsigned int.
5605 (aout_link_input_section_ext): Likewise. Cast enums used in
5606 comparisons with unsigned ints.
5607 (aout_link_reloc_link_order): Cast enum to int in assignment.
5608 * archive.c (_bfd_generic_read_ar_hdr_mag): Cast result of memchr
5609 calls to char *.
5610 * bfd-in.h (bfd_set_section_vma): Cast enum true to unsigned int in
5611 assignment.
5612 * bfd-in2.h (bfd_set_section_vma): Likewise.
5613 * bfd.c (bfd_record_phdr): Cast enums in assignments.
5614 * binary.c (bfd_alloc): Cast enum to long.
5615 * coffgen.c (_bfd_coff_is_local_label_name): Cast return to boolean.
5616 * dwarf2.c (read_abbrevs): Add casts to enum types.
5617 (read_attribute_value): Likewise.
5618 (arange_add): Cast result of bfd_zalloc call.
5619 (comp_unit_contains_address): Return true and false.
5620 (comp_unit_find_nearest_line): Cast return to boolean.
5621 * format.c (bfd_check_format_matches, bfd_set_format): Likewise.
5622 * gen-aout.c: define macro '_' if not defined.
5623 * libbfd.c (bfd_realloc): Cast malloc and realloc to PTR.
5624 (bfd_bwrite): Cast bfd_realloc to bfd_byte *.
5625 (bfd_write_bigendian_4byte_int): Cast return to boolean.
5626 (bfd_seek): Cast bfd_realloc to bfd_byte *.
5627 (bfd_generic_is_local_label_name): Cast return to boolean.
5628 * libcoff.h (_bfd_coff_adjust_symndx): Remove extraneous '\'.
5629 * linker.c (_bfd_link_hash_newfunc): Cast bfd_hash_allocate result to
5630 struct bfd_hash_entry *.
5631 (_bfd_generic_link_hash_newfunc): likewise.
5632 (_bfd_generic_final_link): Cast enum to unsigned int.
5633 * merge.c (sec_merge_emit): Cast return to boolean.
5634 (merge_strings): Add casts to const unsigned char *.
5635 * reloc.c (bfd_get_reloc_code_name): Cast enums in comparison to int.
5636 (bfd_generic_get_relocated_section_content): Cast enum to unsigned int.
5637 * section.c (bfd_section_hash_newfunc): Cast bfd_hash_allocate result
5638 to struct bfd_hash_entry *.
5639 (bfd_set_section_content): Add cast to PTR in comparison.
5640 * simple.c (simple_dummy_warning, simple_dummy_undefined_symbol,
5641 simple_dummy_reloc_overflow, simple_dummy_reloc_dangerous,
5642 simple_dummy_unattached_reloc,
5643 bfd_simple_get_relocated_section_contents): Add K&R declarations and
5644 function definitions.
5645 * srec.c (S3Forced): Initialize to false.
5646 (srec_get_symtab): Cast return value from bfd_alloc to asymbol *.
5647 * stabs.c (_bfd_link_section_stabs): Cast enum to int in comparisons.
5648 (_bfd_discard_section_stabs): Likewise. Also cast return to boolean.
5649 * syms.c (bfd_is_undefined_symclass): Cast return to boolean.
5650 (_bfd_stab_section_find_nearest_line): Cast enum to bfd_byte in
5651 comparisons.
5652
5653 2002-10-23 Jakub Jelinek <jakub@redhat.com>
5654
5655 * elf64-alpha.c (elf64_alpha_check_relocs): Only put maybe_dynamic
5656 relocs into shared lib non-allocated reloc sections.
5657
5658 2002-10-23 Nathan Tallent <eraxxon@alumni.rice.edu>
5659
5660 * dwarf2.c (add_line_info): Ensure that the line_info_table is
5661 sorted even when given an out-of-order line sequence.
5662 (lookup_address_in_line_info_table): When an exact VMA match is
5663 not found, return line information with the closest VMA.
5664
5665 2002-10-23 Ross Alexander <ross.alexander@uk.neceur.com>
5666
5667 * elf64-hppa.c: Force DT_FLAGS to always be set. Required by
5668 HPUX 11.00 patch PHSS_26559.
5669
5670 2002-10-22 Alexandre Oliva <aoliva@redhat.com>
5671
5672 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Don't move
5673 the options section into a separate section unless IRIX 6
5674 compatibility is enabled.
5675
5676 2002-10-22 Alexandre Oliva <aoliva@redhat.com>
5677
5678 * elflink.h (struct elf_link_sort_rela): Turn rel and rela
5679 into arrays.
5680 (elf_link_sort_cmp1, elf_link_sort_cmp2): Adjust.
5681 (elf_link_sort_relocs): Likewise. Take int_rels_per_ext_rel
5682 into account.
5683 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Compose
5684 R_MIPS_REL32 with R_MIPS64 if ABI_64_P.
5685
5686 2002-10-21 Graeme Peterson <gp@qnx.com>
5687
5688 * targets.c (_bfd_target_vector): Add missing qnx vectors.
5689
5690 2002-10-21 Alan Modra <amodra@bigpond.net.au>
5691
5692 * targets.c (bfd_target_list): Don't return the default target twice.
5693
5694 2002-10-21 Elias Athanasopoulos <eathan@otenet.gr>
5695
5696 * archive.c (_bfd_archive_bsd_update_armap_timestamp): Replace
5697 perror with bfd_perror.
5698
5699 2002-10-19 H.J. Lu <hjl@gnu.org>
5700
5701 * elflink.h (elf_link_add_object_symbols): Correctly handle
5702 DT_RPATH and DT_RUNPATH.
5703
5704 2002-10-19 Mark Kettenis <kettenis@gnu.org>
5705
5706 * elf.c (elfcore_grok_note): Fix recognition on NT_PRXFPREG notes.
5707
5708 2002-10-17 Denis Chertykov <denisc@overta.ru>
5709
5710 * elf32-ip2k.c (ELF_MACHINE_ALT1): Define alternate machine code
5711 for ip2k port.
5712
5713 2002-10-17 Alan Modra <amodra@bigpond.net.au>
5714
5715 * elfxx-target.h (USE_REL): Don't define as 1.
5716 * elf32-arm.h (USE_REL): Provide a default define of 0.
5717 Use #if rather than #ifdef when testing USE_REL.
5718 * elf32-m32r.c: Likewise.
5719
5720 * elf32-arc.c (USE_REL): Define as 1.
5721 * elf32-d10v.c (USE_REL): Likewise.
5722 * elf32-m32r.c (USE_REL): Likewise.
5723 * elf32-m68hc11.c (USE_REL): Likewise.
5724 * elf32-m68hc12.c (USE_REL): Likewise.
5725 * elf32-or32.c (USE_REL): Likewise.
5726 * elfarm-nabi.c (USE_REL): Likewise.
5727
5728 2002-10-16 Jakub Jelinek <jakub@redhat.com>
5729
5730 * config.bfd (s390-*-linux*): Add targ64_selvecs.
5731 (s390x-*-linux*): Add targ_selvecs.
5732
5733 2002-10-16 Alan Modra <amodra@bigpond.net.au>
5734
5735 * Makefile.am (BFD32_BACKENDS): Remove elfarmqnx-nabi.lo,
5736 elf32-i386-fbsd.lo, elf32-i386qnx.lo, elf32-ppcqnx.lo,
5737 elf32-sh-lin.lo, elf32-sh64-lin.lo, elf32-sh-nbsd.lo,
5738 elf32-sh64-nbsd.lo, elf32-shqnx.lo. Add elf32-qnx.lo.
5739 (BFD32_BACKENDS_CFILES): Likewise for corresponding C files.
5740 (BFD64_BACKENDS): Remove elf64-sh64-lin.lo, elf64-sh64-nbsd.lo.
5741 (BFD64_BACKENDS_CFILES): Likewise for corresponding C files.
5742 (SOURCE_HFILES): Add elf32-qnx.h.
5743 (BUILD_HFILES): Add bfdver.h.
5744 Run "make dep-am".
5745 * Makefile.in: Regenerate.
5746 * configure.in Update bfd vector dependencies.
5747 * configure: Regenerate.
5748 * elf32-i386-fbsd.c: Delete. Move code to elf32-i386.c.
5749 * elf32-i386qnx.c: Likewise.
5750 * elf32-ppcqnx.c: Delete. Move code to elf32-ppc.c.
5751 * elf32-sh-nbsd.c: Delete. Move code to elf32-sh.c.
5752 * elf32-sh-lin.c: Likewise.
5753 * elf32-shqnx.c: Likewise.
5754 * elf32-sh64-lin.c: Delete. Move code to elf32-sh64.c.
5755 * elf32-sh64-nbsd.c: Likewise.
5756 * elf64-sh64-lin.c: Delete. Move code to elf64-sh64.c.
5757 * elf64-sh64-nbsd.c: Likewise.
5758 * elfarmqnx-nabi.c: Delete. Move code to elfarm-nabi.c.
5759 * elf32-arm.h (ELF_MAXPAGESIZE): Always define.
5760 * elf32-i386.c: Remove ELF_ARCH and ELF32_I386_C_INCLUDED tests.
5761 * elf32-ppc.c: Remove ELF32_PPC_C_INCLUDED tests.
5762 * elf32-qnx.h (elf_backend_set_nonloadable_filepos): Always define.
5763 (elf_backend_is_contained_by_filepos): Likewise.
5764 (elf_backend_copy_private_bfd_data_p): Likewise.
5765 Globalize and move functions to..
5766 * elf32-qnx.c: ..here. New file.
5767 * elf32-sh.c: Remove ELF_ARCH and ELF32_SH_C_INCLUDED tests. Don't
5768 emit target vectors when INCLUDE_SHMEDIA.
5769 * elf32-sh64.c: Remove ELF_ARCH test. Move TARGET_* etc. defines to
5770 end of file.
5771 * elf64-sh64.c: Remove ELF_ARCH test.
5772 * elfarm-nabi.c: Remove ELFARM_NABI_C_INCLUDED test.
5773 * po/BLD-POTFILES.in: Regenerate.
5774 * po/SRC-POTFILES.in: Regenerate.
5775
5776 2002-10-16 Alan Modra <amodra@bigpond.net.au>
5777
5778 * elflink.h (elf_link_add_object_symbols): Error out on dynamic objects
5779 loaded with --just-symbols.
5780
5781 * elf32-i386qnx.c (TARGET_LITTLE_NAME): Define.
5782 * elf32-ppcqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
5783 * elf32-shqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
5784 * elfarmqnx-nabi.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
5785
5786 2002-10-15 Richard Henderson <rth@redhat.com>
5787
5788 * Makefile.am (BFD64_BACKENDS): Remove elf64-alpha-fbsd.
5789 (BFD64_BACKENDS_CFILES): Likewise.
5790 * configure.in (bfd_elf64_alpha_freebsd_vec): Use elf64-alpha.
5791 * elf64-alpha-fbsd.c: Remove file, move code ...
5792 * elf64-alpha.c: ... here.
5793 * Makefile.in, configure: Rebuild.
5794
5795 2002-10-14 Richard Henderson <rth@redhat.com>
5796
5797 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: Increment
5798 VALUE, not ADDEND.
5799
5800 2002-10-14 Stephen Clarke <stephen.clarke@superh.com>
5801
5802 * elf32-sh.c (elf_sh_link_hash_entry): Replace
5803 datalabel_got_offset with union of datalabel_got
5804 offset and refcount.
5805 (sh_elf_link_hash_newfunc): Initialize datalabel_got.refcount.
5806 (allocate_dynrelocs): Delete unnecessary code for
5807 STT_DATALABEL type. Create entry in got for
5808 datalabel version of symbol if datalabel_got.refcount > 0.
5809 (sh_elf_relocate_section): Use datalabel_got union.
5810 (sh_elf_gc_sweep_hook): Pull common code to initialize
5811 h and eh out of switch statement. Declare seen_stt_datalabel.
5812 Initialize it. Decrement datalabel_got.refcount for
5813 got relocs when seen_stt_datalabel is true.
5814 Decrement local_got_refcounts entry for datalabel got relocs
5815 of local symbols.
5816 (sh_elf_copy_indirect_symbol): Copy datalabel_got field over.
5817 (sh_elf_check_relocs): Declare seen_stt_datalabel.
5818 Initialize it. When seen_stt_datalabel is true, increment
5819 datalabel_got refcount rather than got.refcount.
5820 (sh_elf_finish_dynamic_symbol): Create relocs to
5821 initialize got entry for datalabel version of symbol.
5822
5823 2002-10-14 Alan Modra <amodra@bigpond.net.au>
5824
5825 * Makefile.am: Run "make dep-am".
5826 (BFD_H_FILES): Remove version.h.
5827 * bfd-in.h (BFD_VERSION, BFD_VERSION_DATE, BFD_VERSION_STRING): Move..
5828 * version.h: ..to here.
5829 * configure.in (bfd_version_date): Remove.
5830 (AC_OUTPUT): Make bfdver.h from version.h.
5831 * bfd.c: #include "bfdver.h".
5832 * vms-hdr.c: Likewise.
5833 * Makefile.in: Regenerate.
5834 * bfd-in2.h: Regenerate.
5835 * configure: Regenerate.
5836 * po/SRC-POTFILES.in: Regenerate.
5837
5838 2002-10-14 Alan Modra <amodra@bigpond.net.au>
5839
5840 * archures.c (bfd_mach_i386_i386, bfd_mach_i386_i8086,
5841 bfd_mach_i386_i386_intel_syntax, bfd_mach_x86_64,
5842 bfd_mach_x86_64_intel_syntax bfd_mach_ppc, bfd_mach_ppc64,
5843 bfd_mach_rs6k, bfd_mach_d10v, bfd_mach_sh, bfd_mach_v850,
5844 bfd_mach_arc_5, bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8,
5845 bfd_mach_m32r, bfd_mach_frv, bfd_mach_frvsimple,
5846 bfd_mach_ia64_elf64, bfd_mach_ia64_elf32,
5847 bfd_mach_ip2022, bfd_mach_ip2022ext,
5848 bfd_mach_s390_31, bfd_mach_s390_64, bfd_mach_xstormy16): Renumber.
5849 * bfd-in2.h: Regenerate.
5850
5851 2002-10-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5852
5853 * config.bfd (sh*eb-*-linux*, sh*-*-linux*): Add the alternative
5854 endian vector to targ_selvecs.
5855
5856 2002-10-13 Alexandre Oliva <aoliva@redhat.com>
5857
5858 * elfxx-mips.c (mips_elf_calculate_relocation): Take
5859 save_addend argument. Don't apply the 32-bit mask to a
5860 GPREL32 value if it's to be used in another relocation. Don't
5861 use forced-check computation of local_p to decide whether to
5862 add gp0 to GPREL16 value. Don't use only the lowest 16 bits
5863 of the addend of a non-in-place GPREL16 relocation.
5864 (_bfd_mips_elf_relocate_section): Pass use_saved_addend_p to
5865 mips_elf_calculate_relocation().
5866
5867 2002-10-12 Stephane Carrez <stcarrez@nerim.fr>
5868
5869 * elf32-m68hc11.c (m68hc11_elf_relax_section): Don't treat relocs
5870 with symbols in other sections if we relaxed something; the sections
5871 output offsets must be re-computed before.
5872
5873 2002-10-12 Stephane Carrez <stcarrez@nerim.fr>
5874
5875 * elf32-m68hc11.c (m68hc11_elf_relax_section): Update symbols
5876 handling to use Elf_Internal_Sym.
5877 (m68hc11_elf_relax_delete_bytes): Likewise.
5878
5879 2002-10-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5880
5881 * elf32-sh.c (sh_elf_optimized_tls_reloc, sh_elf_mkobject,
5882 sh_elf_object_p, dtpoff_base): New functions.
5883 (sh_elf_howto_table): Add TLS relocs.
5884 (sh_reloc_map): Likewise.
5885 (sh_elf_info_to_howto): Support TLS relocs.
5886 (elf_sh_link_hash_entry): Add tls_type and tls_tpoff32.
5887 (sh_elf_hash_entry, sh_elf_tdata, sh_elf_local_got_tls_type):
5888 New macros.
5889 (sh_elf_obj_tdata): New.
5890 (elf_sh_link_hash_table): Add tls_ldm_got.
5891 (sh_elf_link_hash_table_create): Clear refcount of tls_ldm_got.
5892 (allocate_dynrelocs): Support TLS relocs.
5893 (sh_elf_size_dynamic_sections): Likewise.
5894 (sh_elf_relocate_section): Support TLS relocs. Don't try to find
5895 .rela.got section when found already. Return false after printing
5896 error about unresolvable relocation.
5897 (sh_elf_gc_sweep_hook): Support TLS relocs.
5898 (sh_elf_check_relocs): Likewise.
5899 (sh_elf_finish_dynamic_symbol): Likewise.
5900 (bfd_elf32_mkobject, elf_backend_object_p): Define for TLS case.
5901 * reloc.c: Add SH TLS relocs.
5902 * bfd-in2.h, libbfd.h: Regenerate.
5903
5904 2002-10-11 Daniel Jacobowitz <drow@mvista.com>
5905
5906 * Makefile.in: Regenerated.
5907
5908 2002-10-11 Daniel Jacobowitz <drow@mvista.com>
5909
5910 * Makefile.am: Run dep-am.
5911 (BFD_H_DEP): Add simple.c and linker.c.
5912 (BFD32_LIBS): Add simple.lo.
5913 (BFD32_LIBS_CFILES): Add simple.c.
5914 * Makefile.in: Regenerated.
5915 * bfd-in2.h: Regenerated.
5916 * simple.c: New file.
5917
5918 2002-10-11 Alan Modra <amodra@bigpond.net.au>
5919
5920 * coff-arm.c (record_arm_to_thumb_glue): Avoid type-punned pointers.
5921 (record_thumb_to_arm_glue): Likewise.
5922 * ecoff.c (ecoff_link_add_externals): Likewise.
5923 * elf32-arm.h (record_arm_to_thumb_glue): Likewise.
5924 (record_thumb_to_arm_glue): Likewise.
5925 * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
5926 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
5927 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
5928 * elf64-alpha.c (elf64_alpha_create_dynamic_sections): Likewise.
5929 * elf64-ppc.c (func_desc_adjust): Likewise.
5930 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
5931 (sh64_elf64_create_dynamic_sections): Likewise.
5932 * elflink.c (_bfd_elf_create_got_section): Likewise.
5933 (_bfd_elf_create_dynamic_sections): Likewise.
5934 (_bfd_elf_create_linker_section): Likewise.
5935 * elflink.h (elf_add_default_symbol): Likewise.
5936 (elf_link_create_dynamic_sections): Likewise.
5937 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
5938 * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Likewise.
5939 * elfxx-mips.c (mips_elf_create_got_section): Likewise.
5940 (_bfd_mips_elf_add_symbol_hook): Likewise.
5941 (_bfd_mips_elf_create_dynamic_sections): Likewise.
5942 * linker.c (generic_link_add_symbol_list): Likewise.
5943 * xcofflink.c (xcoff_link_add_symbols): Likewise.
5944
5945 * elfxx-ia64.c (oor_brl, oor_ip): Conditionally define.
5946
5947 * elf64-ppc.c (edit_opd): Only zero opd syms when function is
5948 completely removed. Correct local sym adjustment.
5949
5950 2002-10-10 Stephen Clarke <stephen.clarke@superh.com>
5951
5952 * elf32-sh.c (elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
5953 Correct mistake in calculation of address of .got.
5954 * elf64-sh64.c (elf_sh64_pic_plt_entry_be,
5955 elf_sh64_pic_plt_entry_le): Likewise.
5956
5957 2002-10-09 Richard Shann <richard.shann@superh.com>
5958 Stephen Clarke <stephen.clarke@superh.com>
5959
5960 * Makefile.am: Add entries for elf32-sh64-lin.c and
5961 elf64-sh64-lin.c. Regenerate.
5962 * Makefile.in: Regenerate.
5963 * config.bfd: Change sh64eb-*-linux* and sh64-*-linux*
5964 to use sh64 vectors rather than sh vectors.
5965 * configure.in: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
5966 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
5967 * configure: Regenerate.
5968 * elf32-sh64-lin.c: New file.
5969 * elf64-sh64-lin.c: New file.
5970 * targets.c: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
5971 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
5972
5973 2002-10-08 H.J. Lu <hjl@gnu.org>
5974
5975 * elf32-i386.c (elf_i386_relocate_section): Re-arrange the
5976 IE->LE transition for R_386_TLS_IE.
5977
5978 2002-10-08 Alan Modra <amodra@bigpond.net.au>
5979
5980 * elf64-ppc.c (edit_opd): Correct test for discarded sections.
5981
5982 2002-10-07 Mark Elbrecht <snowball3@softhome.net>
5983
5984 * cofflink.c (mark_relocs): Don't mark relocations in excluded
5985 sections.
5986
5987 2002-10-07 Alan Modra <amodra@bigpond.net.au>
5988
5989 * elflink.h (elf_link_input_bfd): Remove BFD_VERSION_DATE dependent
5990 code.
5991
5992 * elf64-ppc.c (ppc64_elf_build_stubs): Increment .glink indx.
5993
5994 2002-10-06 Alan Modra <amodra@bigpond.net.au>
5995
5996 * opncls.c: Formatting.
5997 (_bfd_new_bfd): Use a smaller section hash table.
5998
5999 2002-10-05 Alexandre Oliva <aoliva@redhat.com>
6000
6001 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Set the type
6002 of the other two relocations packed with a REL32 to NONE.
6003
6004 2002-10-02 Stephen Clarke <stephen.clarke@superh.com>
6005
6006 * elf32-sh.c (elf_sh_link_hash_entry): Add gotplt_refcount.
6007 (sh_elf_link_hash_newfunc): Initialize it.
6008 (allocate_dynrelocs): Transfer gotplt refs from plt.refcount
6009 to got.refcount for symbols that are forced local or when
6010 we have direct got refs.
6011 (sh_elf_gc_sweep_hook): Adjust gotplt_refcount. Use it
6012 to correctly adjust got.refcount and plt.refcount.
6013 (sh_elf_copy_indirect_symbol): Copy gotplt_refcount across.
6014 (sh_elf_check_relocs): Increment gotplt_refcount.
6015
6016 2002-10-01 Jakub Jelinek <jakub@redhat.com>
6017
6018 * elf32-i386.c (elf_i386_relocate_section): Fix
6019 movl foo@indntpoff, %eax IE->LE transition.
6020
6021 2002-10-01 Jakub Jelinek <jakub@redhat.com>
6022
6023 * elf64-x86-64.c (elf64_x86_64_relocate_section): Change TLSGD
6024 sequence and its transitions.
6025
6026 2002-10-01 Jakub Jelinek <jakub@redhat.com>
6027
6028 * elf32-i386.c (elf_i386_relocate_section): Resolve R_386_TLS_LDO_32
6029 to st_value + addend in non-code sections.
6030 * elf64-x86-64.c (elf64_x86_64_relocate_section): Resolve
6031 R_X86_64_DTPOFF32 to st_value + addend in non-code sections.
6032
6033 2002-09-30 Gavin Romig-Koch <gavin@redhat.com>
6034 Ken Raeburn <raeburn@cygnus.com>
6035 Aldy Hernandez <aldyh@redhat.com>
6036 Eric Christopher <echristo@redhat.com>
6037 Richard Sandiford <rsandifo@redhat.com>
6038
6039 * archures.c (bfd_mach_mips4120, bfd_mach_mips5400): New.
6040 (bfd_mach_mips5500): New.
6041 * cpu-mips.c (I_mips4120, I_mips5400, I_mips5500): New.
6042 (arch_info_struct): Add corresponding entries here.
6043 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_4120,
6044 E_MIPS_MACH_5400 and E_MIPS_MACH_5500.
6045 (_bfd_mips_elf_final_write_processing): Handle bfd_mach_mips4120,
6046 bfd_mach_mips5400 and bfd_mach_mips5500.
6047 (_bfd_mips_elf_mach_extends_p): New function.
6048 (_bfd_mips_elf_merge_private_bfd_data): Use it to help merge
6049 the EF_MIPS_MACH flags.
6050 * bfd-in2.h: Regenerate.
6051
6052 2002-09-28 Jason Thorpe <thorpej@wasabisystems.com>
6053
6054 * elf32-vax.c (elf_vax_size_dynamic_section): Don't strip
6055 .got sections.
6056
6057 2002-09-28 Alan Modra <amodra@bigpond.net.au>
6058
6059 * elf.c (map_sections_to_segments): Correct test for start of
6060 writable section in the same page as end of read-only section.
6061
6062 2002-09-27 Matt Thomas <matt@3am-software.com>
6063
6064 * elf32-vax.c (elf_vax_check_relocs): Remove unused
6065 local_got_refcounts usage. Remove allocation of got slot.
6066 (elf_vax_gc_sweep_hook): Remove unused local_got_refcounts usage.
6067 Remove de-allocation of got slot.
6068 (elf_vax_size_dynamic_section): Fix some indentation. Add hash
6069 traversal for elf_vax_instantiate_got_entries. Allow empty .got
6070 sections to be GC'ed.
6071 (elf_vax_instantiate_got_entries): New function.
6072 (elf_vax_relocate_section): Simplify R_VAX_GOT32 handling. Remove
6073 tests that are now handled by elf_vax_instantiate_got_entries.
6074 Assert GOT entry falls within .got section size. Remove redundant
6075 comparisions. Fix comments.
6076
6077 2002-09-27 Jakub Jelinek <jakub@redhat.com>
6078
6079 * reloc.c: Add x86-64 TLS relocs.
6080 * bfd-in2.h, libbfd.h: Rebuilt.
6081 * elf64-x86-64.c (x86_64_elf_howto): Fix size fields for 32-bit
6082 relocs. Add TLS relocs.
6083 (x86_64_reloc_map): Add TLS relocs.
6084 (elf64_x86_64_info_to_howto): Adjust for added TLS relocs.
6085 (struct elf64_x86_64_link_hash_entry): Add tls_type field.
6086 (GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD, GOT_TLS_IE): Define.
6087 (elf64_x86_64_hash_entry): Define.
6088 (struct elf64_x86_64_obj_tdata): New.
6089 (elf64_x86_64_tdata, elf64_x86_64_local_got_tls_type): Define.
6090 (struct elf64_x86_64_link_hash_table): Add tls_ld_got.
6091 (link_hash_newfunc): Initialize tls_type.
6092 (elf64_x86_64_link_hash_table_create): Initialize tls_ld_got.
6093 (elf64_x86_64_copy_indirect_symbol): Swap tls_type if necessary.
6094 (elf64_x86_64_mkobject): New.
6095 (elf64_x86_64_elf_object_p): Allocate struct elf64_x86_64_obj_tdata.
6096 (elf64_x86_64_tls_transition): New.
6097 (elf64_x86_64_check_relocs): Add r_type variable and use it.
6098 Handle TLS relocs.
6099 (elf64_x86_64_gc_sweep_hook): Handle TLS relocs.
6100 (allocate_dynrelocs): Allocate GOT space for TLS relocs.
6101 (elf64_x86_64_size_dynamic_sections): Likewise.
6102 (dtpoff_base, tpoff): New.
6103 (elf64_x86_64_relocate_section): Handle TLS relocs.
6104 (elf64_x86_64_finish_dynamic_symbol): Only handle non-TLS GOT
6105 entries.
6106 (bfd_elf64_mkobject): Define.
6107
6108 * elf32-i386.c (elf_i386_check_relocs) [R_386_TLS_LE]: Set
6109 DF_STATIC_TLS if shared.
6110
6111 2002-09-26 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6112
6113 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Don't emit unneeded
6114 empty relocation sections.
6115
6116 2002-09-26 Alan Modra <amodra@bigpond.net.au>
6117
6118 * elf64-ppc.c (ppc_build_one_stub): Don't build glink stubs here.
6119 (ppc64_elf_build_stubs): Build them here instead.
6120
6121 2002-09-24 Jakub Jelinek <jakub@redhat.com>
6122
6123 * elf32-sparc.c (elf32_sparc_relocate_section): Put R_SPARC_RELATIVE
6124 addend into r_addend, not *r_offset.
6125 (elf32_sparc_finish_dynamic_symbol): Likewise.
6126 * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Clear xword at
6127 R_SPARC_RELATIVE's r_offset.
6128
6129 2002-09-23 Nathan Tallent <eraxxon@alumni.rice.edu>
6130
6131 * dwarf2.c (decode_line_info): Update to correctly decode
6132 the (non-standard DWARF2) out-of-order address sequences
6133 generated by the Intel C++ 6.0 compiler for ia64-Linux.
6134
6135 2002-09-23 Mark Elbrecht <snowball3@softhome.net>
6136
6137 * config.bfd: For DJGPP targets, match with any cpu and any machine.
6138
6139 2002-09-23 Alan Modra <amodra@bigpond.net.au>
6140
6141 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Zero relocs
6142 for discarded FDEs. Remove redundant assignment.
6143 * elflink.h (elf_bfd_discard_info): Save edited relocs.
6144
6145 2002-09-22 H.J. Lu <hjl@gnu.org>
6146
6147 * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Don't merge
6148 the relocation count between different .reloc sections.
6149
6150 2002-09-21 Alan Modra <amodra@bigpond.net.au>
6151
6152 * elf32-ppc.c (ppc_elf_relocate_section): Allow ".sbss.*" and
6153 ".sdata.*" for R_PPC_SDAREL16, ".sbss2*" and ".sdata2*" for
6154 R_PPC_EMB_SDA2REL. Similarly for R_PPC_EMB_SDA21 and
6155 R_PPC_EMB_RELSDA.
6156
6157 * elfcode.h (elf_slurp_reloc_table_from_section): Make "symcount"
6158 unsigned. Move "symcount" assignment out of loop.
6159 * Makefile.am: Run "make dep-am".
6160 * Makefile.in: Regenerate.
6161 * configure: Regenerate.
6162 * po/SRC-POTFILES.in: Regnerate.
6163
6164 2002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
6165
6166 * dwarf2.c (_bfd_dwarf2_find_nearest_line): If address length is
6167 zero, set it to 8 for (non-standard) 64-bit DWARF2 formats
6168 (e.g. IRIX64).
6169
6170 2002-09-19 Jakub Jelinek <jakub@redhat.com>
6171
6172 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Clear .got word
6173 even if generating R_PPC_RELATIVE reloc.
6174 (ppc_elf_relocate_section): Make sure relocation is performed
6175 if skip == -2. Clear memory at r_offset when creating dynamic
6176 relocation.
6177
6178 2002-09-19 Jakub Jelinek <jakub@redhat.com>
6179
6180 * reloc.c (BFD_RELOC_386_TLS_TPOFF, BFD_RELOC_386_TLS_IE,
6181 BFD_RELOC_386_TLS_GOTIE): Add.
6182 * bfd-in2.h, libbfd.h: Rebuilt.
6183 * elf32-i386.c (elf_howto_table): Add R_386_TLS_TPOFF, R_386_TLS_IE
6184 and R_386_TLS_GOTIE.
6185 (elf_i386_reloc_type_lookup): Handle it.
6186 (struct elf_i386_link_hash_entry): Change tls_type type to unsigned
6187 char instead of enum, change GOT_* into defines.
6188 (GOT_TLS_IE_POS, GOT_TLS_IE_NEG, GOT_TLS_IE_BOTH): Define.
6189 (elf_i386_tls_transition): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
6190 (elf_i386_check_relocs): Likewise. Avoid crash if local symbol is
6191 accessed both as normal and TLS symbol. Move R_386_TLS_LDM and
6192 R_386_PLT32 cases so that R_386_TLS_IE can fall through.
6193 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
6194 (elf_i386_gc_sweep_hook): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
6195 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
6196 (allocate_dynrelocs): Allocate 2 .got and 2 .rel.got entries if
6197 tls_type is GOT_TLS_IE_BOTH.
6198 (elf_i386_size_dynamic_sections): Likewise.
6199 (elf_i386_relocate_section): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
6200 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
6201 (elf_i386_finish_dynamic_symbol): Use tls_type & GOT_TLS_IE to catch
6202 all 4 GOT_TLS_* TLS types.
6203
6204 2002-09-19 Nick Clifton <nickc@redhat.com>
6205
6206 * elflink.h (elf_fix_symbol_flags): When examining weak symbols,
6207 follow indirect links.
6208
6209 2002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
6210
6211 * ecoffswap.h (ecoff_swap_pdr_in) <isym, iline>: Update to
6212 correctly sign-extend 32-bit ECOFF null values (0xffffffff, -1)
6213 on 64 bit machines.
6214 (ecoff_swap_sym_in) <iss>: Likewise.
6215 * ecoff.c (_bfd_ecoff_slurp_symbolic_info): Fix error reading
6216 ECOFF information: 'ioptMax' refers to the actual *size*
6217 of the optimization symtab, not the number of entries.
6218
6219 2002-09-19 Daniel Jacobowitz <drow@mvista.com>
6220
6221 * elf32-arm.h (elf32_arm_adjust_dynamic_symbol): Update
6222 ELF_LINK_HASH_NEEDS_PLT logic.
6223
6224 2002-09-18 Daniel Jacobowitz <drow@mvista.com>
6225
6226 * elfcode.h (elf_slurp_reloc_table_from_section): Check
6227 correct relocation count.
6228
6229 2002-09-17 Daniel Jacobowitz <drow@mvista.com>
6230
6231 * bfd-in.h (bfd_get_dynamic_symcount): Define.
6232 * bfd.c (struct _bfd): Add dynsymcount.
6233 * bfd-in2.h: Regenerated.
6234 * elf.c (_bfd_elf_canonicalize_dynamic_symtab): Set
6235 abfd->dynsymcount.
6236 * elfcode.h (elf_slurp_reloc_table_from_section): Check
6237 for overflow.
6238
6239 2002-09-17 Stan Cox <scox@redhat.com>
6240
6241 * elf64-mips.c (mips_elf64_be_swap_reloca_out): Handle type2 and type3.
6242 (mips_elf64_final_gp): Don't make up gp value.
6243 * elfn32-mips.c (mips_elf_final_gp): Likewise.
6244 * elfxx-mips.c (_bfd_mips_elf_final_link): Always create
6245 .MIPS.options/.options section.
6246
6247 2002-09-17 David O'Brien <obrien@FreeBSD.org>
6248
6249 * elf32-i386-fbsd.c: Always label using the EI_OSABI method.
6250 It is benign for FreeBSD < 4.1. Minor reformatting.
6251 * elf64-alpha-fbsd.c: Likewise.
6252
6253 2002-09-17 Jakub Jelinek <jakub@redhat.com>
6254
6255 * elf32-i386.c (elf_i386_relocate_section) [R_386_TLS_TPOFF32]: Negate
6256 addend.
6257
6258 2002-09-17 Alan Modra <amodra@bigpond.net.au>
6259
6260 * elf64-alpha.c (alpha_elf_size_info): Make static.
6261
6262 2002-09-17 Svein E. Seldal <Svein.Seldal@solidas.com>
6263
6264 * coff-tic4x.c: Add function declarations and ATTRIBUTE_UNUSED.
6265 * cpu-tic4x.c: Ditto.
6266
6267 2002-09-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6268
6269 * elf64-mips.c (define elf_backend_ignore_discarded_relocs): Remove
6270 duplicate define.
6271
6272 2002-09-16 Bruno Haible <bruno@clisp.org>
6273
6274 * elf32-i386.c: Don't defined ELF_ARCH etc. if this file is included
6275 by a target variant implementation.
6276 * elf64-alpha.c: Likewise.
6277 * elf32-i386-fbsd.c: New file.
6278 * elf64-alpha-fbsd.c: New file.
6279 * targets.c: Support bfd_elf32_i386_freebsd_vec and
6280 bfd_elf64_alpha_freebsd_vec.
6281 * configure.in: Accept the vectors bfd_elf32_i386_freebsd_vec,
6282 bfd_elf64_alpha_freebsd_vec.
6283 * Makefile.am (BFD32_BACKENDS): Add elf32-i386-fbsd.lo.
6284 (BFD32_BACKENDS_CFILES): Add elf32-i386-fbsd.c.
6285 (BFD64_BACKENDS): Add elf64-alpha-fbsd.lo.
6286 (BFD64_BACKENDS_CFILES): Add elf64-alpha-fbsd.c.
6287 (elf32-i386-fbsd.lo, elf64-alpha-fbsd.lo): Add dependencies.
6288 * config.bfd: For FreeBSD targets, set targ_defvec to a FreeBSD
6289 specific targets. Define OLD_FREEBSD_ABI_LABEL if appropriate.
6290
6291 2002-09-12 Jakub Jelinek <jakub@redhat.com>
6292
6293 * elf32-i386.c (dtpoff_base, tpoff): Don't crash if tls_segment is
6294 NULL.
6295 (elf_i386_relocate_section): Return false after printing error about
6296 unresolvable relocation.
6297
6298 2002-09-12 Nick Clifton <nickc@redhat.com>
6299
6300 * elf32-arm.h (elf32_arm_final_link_relocate): Fix handling of
6301 R_ARM_THM_PC11.
6302
6303 2002-09-11 Jeffrey Law <law@redhat.com>
6304
6305 * elf32-h8300.c (elf32_h8_relax_section): Fix typo.
6306
6307 2002-09-11 Andrew Haley <aph@cambridge.redhat.com>
6308
6309 * elf.c (_bfd_elf_find_nearest_line): Check functionname_ptr and
6310 line_ptr before deciding we've found a symbol.
6311
6312 2002-09-11 Nick Clifton <nickc@redhat.com>
6313
6314 * po/da.po: New Danish translation file.
6315 * configure.in (LINGUAS): Add 'da'.
6316 * configure: Regenerate.
6317
6318 2002-09-10 Michael Snyder <msnyder@redhat.com>
6319
6320 * irix-core.c (do_sections, do_sections64): New functions.
6321 (irix_core_core_file_p): Call new functions do_sections,
6322 do_sections64, depending on corefile (32-bit or 64-bit).
6323
6324 2002-09-09 Richard Henderson <rth@redhat.com>
6325
6326 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21M
6327 and PCREL21F like PCREL21B.
6328
6329 2002-09-04 Kevin Buettner <kevinb@redhat.com>
6330
6331 * config.bfd (mips*-*-irix6*): Add new ABI vectors. Make n32 default
6332 vector.
6333
6334 2002-09-02 Nick Clifton <nickc@redhat.com>
6335
6336 * elf32-v850.c (v850_elf_final_link_relocate): Use helpful
6337 names instead of cryptically overloaded bfd_reloc error
6338 codes.
6339 (v850_elf_relocate_section): Likewise.
6340 (v850_elf_relax_section): Replace caching of external symbols
6341 with caching of internal symbols obtained from calling
6342 bfd_elf_get_elf_syms().
6343 Fixup problems with freeing cached allocated memory blocks.
6344
6345 2002-09-02 Alan Modra <amodra@bigpond.net.au>
6346
6347 * cpu-pj.c (scan_mach, compatible, arch_info_struct): Remove.
6348 (bfd_pj_arch): Use bfd_default_scan.
6349 * cpu-v850.c (scan): Remove.
6350 (N): Use bfd_default_scan.
6351 * cpu-z8k.c (scan_mach): Remove.
6352 (arch_info_struct, bfd_z8k_arch): Reorganize so that the default is
6353 first. Use bfd_default_scan.
6354
6355 * ecoff.c (_bfd_ecoff_set_arch_mach_hook): Don't use hard-coded
6356 bfd_mach constants.
6357 (ecoff_get_magic): Likewise.
6358 * elf32-v850.c (v850_elf_object_p): Likewise.
6359 (v850_elf_final_write_processing): Likewise.
6360 * mipsbsd.c (MY(set_arch_mach)): Likewise.
6361 (MY(write_object_contents)): Likewise.
6362 * coff64-rs6000.c (xcoff64_write_object_contents): Likewise.
6363 * coffcode.h (coff_write_object_contents): Likewise.
6364 (coff_set_arch_mach_hook): Add comment describing machine == 0.
6365 Remove unnecessary "machine" assignments.
6366 (coff_write_relocs): Test for the absolute section sym by testing
6367 section and flags.
6368
6369 * aoutx.h (NAME(aout,machine_type)): Recognize bfd_mach_i386_i386
6370 and bfd_mach_i386_i386_intel_syntax.
6371 * pdp11.c (NAME(aout,machine_type)): Likewise.
6372
6373 2002-08-30 John David Anglin <dave@hiauly1.hia.nrc.ca>
6374
6375 * bfd-in.h (align_power): Cast constants to bfd_vma type.
6376 * bfd-in2.h (align_power): Likewise.
6377
6378 2002-08-30 Alan Modra <amodra@bigpond.net.au>
6379
6380 * Makefile.am: Run "make dep-am".
6381 * Makefile.in: Regenerate.
6382
6383 * cpu-avr.c (compatible): Don't use hard-coded mach constants.
6384 * cpu-powerpc.c (powerpc_compatible): Likewise.
6385 * cpu-rs6000.c (rs6000_compatible): Likewise.
6386
6387 2002-08-28 Catherine Moore <clm@redhat.com>
6388
6389 * elf32-v850.c (v850_elf_reloc_map): Add new relocs.
6390 (v850-elf-reloc): Don't resolve pc relative relocs.
6391 (v850_elf_ignore_reloc): New routine.
6392 (v850_elf_final_link_relocate): Handle new relocs.
6393 (v850_elf_relax_delete_bytes ): New routine.
6394 (v850_elf_relax_section): New routine.
6395 (bfd_elf32_bfd_relax_section): Define.
6396 (HOWTO): New entries for new relocs.
6397 * reloc.c (BFD_RELOC_V850_LONGCALL): New reloc.
6398 (BFD_RELOC_V850_LONGJUMP): New reloc.
6399 (BFD_RELOC_V850_ALIGN): New reloc.
6400 * archures.c: Remove redundant v850ea architecture.
6401 * cpu-v850.c: Remove redundant v850ea support.
6402 * libbfd.h: Regenerate.
6403 * bfd-in2.h: Regenerated.
6404
6405 2002-08-28 Svein E. Seldal <Svein.Seldal@solidas.com>
6406
6407 * config.bfd: Add tic4x-*-*coff* and c4x-*-*coff* target.
6408 * configure.in: Add tic4x_coff vector files.
6409 * configure: Regenerate.
6410 * Makefile.am: Add tic4x target.
6411 * Makefile.in: Regenerate.
6412
6413 2002-08-27 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
6414
6415 * archures.c: Add the BFD arch type tic4x.
6416 * bfd-in.h: Add BFD_IN_MEMORY flag.
6417 * coff-tic4x.c: New file.
6418 * coffswap.h (coff_swap_sym_out): Add preadjuster.
6419 * cpu-tic4x.c: New file.
6420 * targets.c: Added tic4x- in list of xvecs.
6421 * ticoff.h: New file.
6422 * bfd-in2.h: Regenerate.
6423
6424 2002-08-27 Adam Nemet <anemet@lnxw.com>
6425
6426 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Set the last
6427 bit of DT_INIT and DT_FINI for Thumb functions.
6428
6429 2002-08-26 Alan Modra <amodra@bigpond.net.au>
6430
6431 * coffcode.h (coff_set_arch_mach_hook): Handle W65MAGIC.
6432
6433 2002-08-26 Alan Modra <amodra@bigpond.net.au>
6434
6435 * aoutx.h (NAME(aout,reloc_type_lookup)): Handle BFD_RELOC_8.
6436
6437 2002-08-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6438
6439 * elf32-sh.c (sh_elf_copy_indirect_symbol): New.
6440 (create_got_section, allocate_dynrelocs, readonly_dynrelocs):
6441 Likewise.
6442 (struct elf_sh_pcrel_relocs_copied): Removed.
6443 (struct elf_sh_dyn_relocs): New.
6444 (struct elf_sh_link_hash_entry): Replace pcrel_relocs_copied
6445 field with dyn_relocs.
6446 (struct elf_sh_link_hash_table): Add short-cuts to get dynamic
6447 sections and sym_sec.
6448 (sh_elf_link_hash_newfunc): Clear dyn_relocs.
6449 (sh_elf_link_hash_table_create): Clear shorts-cuts and sym_sec.
6450 (sh_elf_create_dynamic_sections): Use create_got_section instead
6451 of _bfd_elf_create_got_section.
6452 (sh_elf_check_relocs): Likewise.
6453 (sh_elf_create_dynamic_sections): Use short-cuts to the dynamic
6454 sections.
6455 (sh_elf_adjust_dynamic_symbol, sh_elf_size_dynamic_sections,
6456 sh_elf_relocate_section, sh_elf_check_relocs,
6457 sh_elf_finish_dynamic_symbol, sh_elf_finish_dynamic_sections):
6458 Likewise.
6459 (sh_elf_adjust_dynamic_symbol): Handle nocopyreloc. Keep the
6460 dynamic relocations and avoiding the copy relocation when we
6461 didn't find any dynamic relocations in the section which has
6462 contents or is read-only.
6463 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
6464 (sh_elf_size_dynamic_sections): Don't reset the size of
6465 .rela.got section even if dynamic_sections_created flag is off.
6466 Don't use sh_elf_discard_copies. Scan all input bfd and use
6467 allocate_dynrelocs. Call readonly_dynrelocs to determine
6468 whether we need DT_TEXTREL.
6469 (sh_elf_adjust_dynamic_symbol): Use plt.refcount to determine
6470 whether the symbol was never referred to.
6471 (sh_elf_relocate_section): Use WILL_CALL_FINISH_DYNAMIC_SYMBOL.
6472 (sh_elf_gc_sweep_hook): Fill with the real sweep function.
6473 (sh_elf_check_relocs): Call create_got_section if the short-cut
6474 to .got is null. Increment reference counters only instead of
6475 allocating space on dynamic sections here. Don't conditionalize
6476 uninitialized got.offset value when marking the symbol as a
6477 global offset table entry. Keep relocations for symbols satisfied
6478 by a dynamic library to avoid copy relocations for the symbol.
6479 Set dynobj field of an elf hash table if needed.
6480 (sh_elf_finish_dynamic_sections): Handle null section pointer
6481 correctly.
6482 (elf_backend_copy_indirect_symbol): Defined.
6483 (elf_backend_can_refcount): Defined.
6484
6485 2002-08-23 Nick Clifton <nickc@redhat.com>
6486
6487 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Undo
6488 previous change. Add comment explaining why.
6489
6490 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>
6491
6492 * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le): Copy
6493 contents of .got.plt[2] to tr0, not address of .got.plt.
6494 (sh_elf_finish_dynamic_symbol): Do not apply GOT_BIAS when
6495 patching absolute plt entry. For shmedia plt entry, set bottom bit
6496 of branch to plt0 as this is a branch to an shmedia instruction.
6497 * elf64-sh64.c (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le):
6498 Copy contents of .got.plt[2] to tr0, not address of .got.plt.
6499 (elf_sh64_plt_entry_be, elf_sh64_plt_entry_le): Use ptrel to
6500 branch to plt0.
6501 (sh64_elf64_finish_dynamic_symbol): Do not apply GOT_BIAS when
6502 patching absolute plt entry. For shmedia plt entry, branch to
6503 plt0 is now ptrel, so use relative offset. Set bottom bit of
6504 branch target as it is a branch to an shmedia instruction.
6505
6506 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>,
6507 Richard Shann <richard.shann@superh.com>
6508
6509 * elf32-sh.c (sh_elf_finish_dynamic_sections): Set LSB of DT_INIT
6510 value if .init is an SHmedia function. Similarly for DT_FINI.
6511 * elf64-sh64.c (sh64_elf64_finish_dynamic_sections): Likewise.
6512
6513 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>
6514
6515 * elf32-sh.c (sh_elf_size_dynamic_sections): Zero initialize
6516 dynamic section.
6517 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
6518
6519 2002-08-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6520
6521 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use a simple
6522 byte read when reading the return address register column.
6523
6524 2002-08-22 Nick Clifton <nickc@redhat.com>
6525
6526 * config.bfd: Add powepc64-*-*bsd* target.
6527
6528 2002-08-22 Graeme Peterson <gp@qnx.com>
6529
6530 * Makefile.am: Add entries for elf32-shqnx.c
6531 * Makefile.in: Regenerate.
6532 * config.bfd: Add support sh-*-nto* target.
6533 * configure.in: Add support for bfd_elf32_sh{l}qnx_vec.
6534 * configure: Regenerate.
6535 * elf32-qnx.h: Changed typo "elf_i386qnx_*" to "elf_qnx_*" .
6536 * elf32-sh.c: Do not include elf32-target.h if
6537 ELF32_SH_C_INCLUDED is defined.
6538 * elf32-shqnx.c: New file: Support for QNX.
6539 * targets.c: Add bfd_elf32_sh{l}qnx_vec.
6540
6541 2002-08-22 Nick Clifton <nickc@redhat.com>
6542
6543 * po/tr.po: Updated Turkish translation.
6544
6545 * syms.c (_bfd_generic_read_minisymbols): Set bfd_error if the
6546 symbols are not read.
6547
6548 2002-08-22 Alan Modra <amodra@bigpond.net.au>
6549
6550 * elf32-m68hc11.c: Formatting fixes.
6551 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
6552 * elf32-m68hc12.c: Formatting fixes.
6553 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
6554
6555 2002-08-22 Alan Modra <amodra@bigpond.net.au>
6556
6557 * coff-rs6000.c (rs6000coff_vec <object_flags>): Add SEC_CODE and
6558 SEC_DATA.
6559 (pmac_xcoff_vec): Likewise.
6560 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
6561 (aix5coff64_vec): Likewise.
6562
6563 2002-08-22 Alan Modra <amodra@bigpond.net.au>
6564
6565 * elf-bfd.h (struct elf_backend_data): Add struct elf_backend_data
6566 param to elf_backend_copy_indirect_symbol.
6567 (_bfd_elf_link_hash_copy_indirect): Likewise.
6568 * elflink.h (elf_add_default_symbol, elf_fix_symbol_flags): Adjust
6569 calls to copy_indirect_symbol.
6570 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
6571 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
6572 * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
6573 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
6574 * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
6575 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
6576 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
6577 * elfxx-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
6578 * elfxx-mips.h (_bfd_mips_elf_copy_indirect_symbol): Likewise.
6579 * elf.c (_bfd_elf_link_hash_copy_indirect): Likewise. Properly
6580 test refcounts for "used" values.
6581
6582 2002-08-21 John David Anglin <dave@hiauly1.hia.nrc.ca>
6583
6584 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Add PARAMS to
6585 argument declaration.
6586
6587 2002-08-19 Elena Zannoni <ezannoni@redhat.com>
6588
6589 * archures.c (bfd_mach_ppc_e500): Added.
6590 * bfd-in2.h: Rebuilt.
6591 * cpu-powerpc.c (bfd_powerpc_archs): Added e500.
6592
6593 2002-08-19 Alan Modra <amodra@bigpond.net.au>
6594
6595 * elf32-m68hc12.c (elf_backend_can_gc_sections): False.
6596
6597 2002-08-17 Andrew Cagney <ac131313@redhat.com>
6598
6599 * elf.c (bfd_elf_get_elf_syms): Change type of `esym' to
6600 `bfd_byte'.
6601
6602 2002-08-17 Stan Cox <scox@redhat.com>
6603
6604 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Use the
6605 IRIX 6 segment layout for NEWABI.
6606
6607 2002-08-16 Stephen Clarke <stephen.clarke@superh.com>
6608
6609 * elf32-sh.c (sh_elf_gc_mark_hook): For sh64, skip indirect
6610 symbols when looking for section referred to by a relocation.
6611 * elf64-sh.c (sh_elf64_gc_mark_hook): Likewise.
6612
6613 2002-08-15 Alan Modra <amodra@bigpond.net.au>
6614
6615 * elf32-i370.c: Move reloc enum to include/elf/i370.h.
6616
6617 2002-08-15 Hans-Peter Nilsson <hp@axis.com>
6618
6619 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Add
6620 missing check for whether the symbol is referenced by DSO before
6621 unexporting it as an unneeded dynamic symbol.
6622
6623 2002-08-14 H.J. Lu <hjl@gnu.org>
6624
6625 * libbfd.h: Regenerate.
6626
6627 2002-08-14 H.J. Lu <hjl@gnu.org>
6628
6629 * config.bfd: Always add 64bit vectors to 32bit Linux/mips.
6630
6631 2002-08-14 Stephane Carrez <stcarrez@nerim.fr>
6632
6633 * elf32-m68hc11.c (m68hc11_relax_group): New to relax group of
6634 instructions.
6635 (m68hc11_direct_relax): New to define table of relaxable instructions.
6636 (find_relaxable_insn): New, find a relaxable insn.
6637 (compare_reloc): New to compare two relocs.
6638 (m68hc11_elf_relax_section): New, relax text sections.
6639 (m68hc11_elf_relax_delete_bytes): New, delete bytes and adjust branchs.
6640 (elf32_m68hc11_check_relocs): New function for GC support.
6641 (elf32_m68hc11_relocate_section): New function for GC support.
6642 (bfd_elf32_bfd_relax_section): Define to support linker relaxation.
6643 (elf_backend_check_relocs): Likewise.
6644 (elf_backend_relocate_section): Likewise.
6645
6646 2002-08-13 H.J. Lu <hjl@gnu.org>
6647
6648 * elflink.h (NAME(bfd_elf,size_dynamic_sections): Don't count
6649 definitions in shared objects when checking symbol with
6650 undefined version.
6651
6652 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6653
6654 * elf32-m68hc11.c (elf32_m68hc11_gc_mark_hook): New for section GC.
6655 (elf32_m68hc11_gc_sweep_hook): Likewise.
6656 (elf_backend_gc_mark_hook): Define for GC section support.
6657 (elf_backend_gc_sweep_hook): Likewise.
6658 (elf_backend_can_gc_sections): Likewise.
6659
6660 * elf32-m68hc12.c: Likewise.
6661
6662 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6663
6664 * elf32-m68hc11.c (_bfd_m68hc11_elf_print_private_bfd_data): New.
6665 (_bfd_m68hc11_elf_merge_private_bfd_data): New function.
6666 (_bfd_m68hc11_elf_set_private_flags): New function.
6667 Use them to set/check/print ELF flags specific to 68HC11.
6668
6669 * elf32-m68hc12.c (_bfd_m68hc12_elf_print_private_bfd_data): New.
6670 (_bfd_m68hc12_elf_merge_private_bfd_data): New function.
6671 (_bfd_m68hc12_elf_set_private_flags): New function.
6672 Use them to set/check/print ELF flags specific to 68HC12.
6673
6674 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6675
6676 * elf32-m68hc11.c (elf_m68hc11_howto_table): Add the new relocs;
6677 fix masks for PC-rel relocs.
6678 (m68hc11_elf_ignore_reloc): New function.
6679
6680 * elf32-m68hc12.c (m68hc12_elf_special_reloc): New to handle specific
6681 68HC12 banked addressing relocs.
6682 (m68hc12_phys_addr): New to compute physical address of banked memory.
6683 (m68hc12_phys_page): Likewise for page.
6684 (m68hc12_addr_is_banked): New to see if address is in banked area.
6685 (elf_m68hc12_howto_table): Add new relocs and rename to xx12.
6686
6687 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6688
6689 * reloc.c (BFD_RELOC_M68HC11_RL_JUMP, BFD_RELOC_M68HC11_RL_GROUP,
6690 BFD_RELOC_M68HC11_LO16, BFD_RELOC_M68HC11_PAGE,
6691 BFD_RELOC_M68HC11_24): New relocs for 68HC11/68HC12.
6692 * bfd-in2.h: Regenerate.
6693
6694 2002-08-12 H.J. Lu <hjl@gnu.org>
6695
6696 * elflink.h (elf_add_default_symbol): Preserve section across
6697 elf_merge_symbol.
6698
6699 2002-08-09 Graeme Peterson <gp@qnx.com>
6700
6701 * Makefile.am: Add entries for elf32-ppcqnx.c, and add
6702 elf32-qnx.h dependency to elfarmqnx-nabi.c and elf32-i386qnx.c.
6703 * Makefile.in: Regenerate.
6704 * config.bfd: Add support for powerpc{le}-*-nto targets.
6705 * configure.in: Add support for bfd_elf32_powerpc{le}qnx_vec.
6706 * configure: Regenerate.
6707 * elf32-i386qnx.c: Moved backend functions into a QNX specific
6708 common file "elf32-qnx.h", and now include that file.
6709 * elf32-qnx.h: New file: QNX specific common elf backend.
6710 * elf32-ppc.c: Do not include elf32-target.h if
6711 ELF32_PPC_C_INCLUDED is defined.
6712 * elf32-ppcqnx.c: New file: Support for QNX.
6713 * elfarmqnx-nabi.c: Include elf32-qnx.h for qnx elf backend.
6714 * targets.c: Add bfd_elf32_powerpc{le}qnx_vec.
6715
6716 2002-08-09 Nick Clifton <nickc@redhat.com>
6717
6718 * po/sv.po: Updated Swedish translation.
6719
6720 2002-08-09 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6721
6722 * elfxx-mips.c (mips_elf_global_got_index): Avoid segfault if
6723 g->global_gotsym is NULL.
6724
6725 2002-08-08 H.J. Lu <hjl@gnu.org>
6726
6727 * elflink.h (elf_add_default_symbol): Don't warn if a definition
6728 overrides an indirect versioned symbol.
6729
6730 2002-08-08 Jakub Jelinek <jakub@redhat.com>
6731
6732 * elf32-i386.c (elf_i386_relocate_section): Fill in proper addend
6733 for R_386_TLS_TPOFF32 relocs against symndx 0.
6734
6735 2002-08-07 H.J. Lu <hjl@gnu.org>
6736
6737 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Check symbol
6738 with undefined version if needed.
6739 (elf_link_assign_sym_version): Match a default symbol with a
6740 version without definition. No need to hide the default
6741 definition separately.
6742
6743 2002-08-08 Alan Modra <amodra@bigpond.net.au>
6744
6745 * elflink.h (elf_link_output_extsym): Don't output symbols from
6746 SEC_EXCLUDE sections.
6747
6748 * aoutx.h (aout_link_write_symbols): Correct handling of warning syms.
6749
6750 2002-08-07 Alan Modra <amodra@bigpond.net.au>
6751
6752 * elf64-ppc.c (edit_opd): Arrange to drop symbols for discarded .opd
6753 entries.
6754
6755 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6756
6757 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Cast signedness
6758 mismatch.
6759
6760 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6761
6762 * elfxx-mips.c (ABI_64_P): Remove superfluous check.
6763
6764 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6765
6766 * elf32-mips.c (mips_reloc_map): Fix typo.
6767
6768 2002-08-06 Alan Modra <amodra@bigpond.net.au>
6769
6770 * xcofflink.c (xcoff_write_global_symbol): Set n_scnum for abs_section.
6771
6772 2002-08-06 Alan Modra <amodra@bigpond.net.au>
6773
6774 * elf64-ppc.c (ppc64_elf_howto_raw): Zero all src_mask entries.
6775
6776 2002-08-06 Alan Modra <amodra@bigpond.net.au>
6777
6778 * libxcoff.h: Use PARAMS on function declarations.
6779 * coff-rs6000.c (xcoff_generate_rtinit): Simplify size calc.
6780 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
6781
6782 * coff-rs6000.c: (xcoff_rtype2howto): Don't place reloc address in
6783 addend.
6784 * coff64-rs6000.c: (xcoff64_rtype2howto): Likewise.
6785
6786 2002-08-06 Alan Modra <amodra@bigpond.net.au>
6787
6788 * coff-rs6000.c: Formatting fixes.
6789 (xcoff_calculate_relocation): Use PARAMS in declaration.
6790 (xcoff_complain_overflow): Likewise.
6791 (xcoff_ppc_relocate_section): Use old-style function pointer call.
6792 (bfd_xcoff_backend_data): Remove useless comments.
6793 (rs6000coff_vec): Likewise.
6794 (bfd_pmac_xcoff_backend_data): Likewise.
6795 (pmac_xcoff_vec): Likewise.
6796
6797 * coff64-rs6000.c: Formatting fixes.
6798 (xcoff64_calculate_relocation): Use PARAMS in declaration.
6799 (xcoff64_ppc_relocate_section): Use old-style function pointer call.
6800 (bfd_xcoff_backend_data): Remove useless comments.
6801 (rs6000coff64_vec): Likewise.
6802 (bfd_xcoff_aix5_backend_data): Likewise.
6803 (aix5coff64_vec): Likewise.
6804
6805 2002-08-06 Alan Modra <amodra@bigpond.net.au>
6806
6807 * coff-rs6000.c (xcoff_howto_table): Revert some of last change to
6808 mask entries. Use complain_overflow_dont for R_REF.
6809 (xcoff_reloc_type_ba): Revert last change.
6810 (xcoff_reloc_type_br): Likewise.
6811 (xcoff_reloc_type_crel): Likewise.
6812 (xcoff_ppc_relocate_section): Likewise.
6813 * coff64-rs6000.c (xcoff64_reloc_type_br): Likewise.
6814 (xcoff64_ppc_relocate_section): Likewise.
6815 (xcoff64_howto_table): Revert some of last change to mask entries.
6816 Use complain_overflow_dont for R_REF.
6817
6818 * coff-rs6000.c (xcoff_howto_table): Fix src_mask entries. Make all
6819 relocs with bitsize == 16 have size = 1.
6820 (xcoff_reloc_type_ba): Correct src_mask and dst_mask adjustment.
6821 (xcoff_reloc_type_br): Likewise.
6822 (xcoff_reloc_type_crel): Likewise.
6823 (xcoff_ppc_relocate_section): Set up src_mask and dst_mask correctly.
6824 * coff64-rs6000.c (xcoff64_reloc_type_br): Correct src_mask and
6825 dst_mask adjustment.
6826 (xcoff64_ppc_relocate_section): Set up src_mask and dst_mask correctly.
6827 (xcoff64_howto_table): Fix src_mask entries. Make all relocs with
6828 bitsize == 16 have size = 1.
6829
6830 2002-08-01 Denis Chertykov <denisc@overta.ru>
6831
6832 * elf32-ip2k.c: Processor manufacturer changed to Ubicom.
6833 (struct misc): New field isymbuf. All free_* fields removed.
6834 (symbol_value): Pass in internal syms. No need to swap syms in.
6835 (ip2k_elf_relax_section): Use bfd_elf_get_elf_syms. Properly free
6836 possibly cached info.
6837 (tidyup_after_error): Removed.
6838 (ip2k_elf_relax_section_pass1): Don't use removed fields of struct
6839 misc. Use new field.
6840 (adjust_all_relocations): Use internal syms. No need to swap syms
6841 in and out.
6842 (add_page_insn): Don't use removed fields of struct misc.
6843
6844 2002-08-01 Nick Clifton <nickc@redhat.com>
6845
6846 * elf32-arm.h: Revert previous delta.
6847
6848 2002-08-01 Nick Clifton <nickc@redhat.com>
6849
6850 * configure.in (AM_INIT_AUTOMAKE): Bump version number.
6851 * configure: Regenerate.
6852
6853 2002-07-31 H.J. Lu <hjl@gnu.org>
6854
6855 * config.bfd: Add x86-64 vector to Linux/i386 if 64bit BFD is
6856 selected.
6857
6858 2002-07-31 H.J. Lu <hjl@gnu.org>
6859
6860 * config.bfd: Add n32 vectors to 32bit Linux/mips if 64bit BFD
6861 is selected.
6862
6863 2002-07-31 Jakub Jelinek <jakub@redhat.com>
6864
6865 * elf32-i386.c (elf_i386_copy_indirect_symbol): Swap tls_type
6866 if _bfd_elf_link_hash_copy_indirect will swap got.refcount.
6867
6868 2002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
6869
6870 * cpu-ns32k.c (_bfd_ns32k_put_immdeiate, _bfd_ns32k_get_immediate):
6871 There is no 8 byte relocation type for this architecture.
6872 (do_ns32k_reloc): Use bfd_vma instead of native types.
6873 (bfd_ns32k_put_immediate, _bfd_ns32k_relocate_contents) put_data
6874 returns void.
6875 (_bfd_ns32k_put_displacement): Don't check for overflow. We can
6876 rely on generic code to do that.
6877 * aout-ns32k.c (howto_table): Add appropriate overflow detection
6878 to all table entries.
6879 (_bfd_ns32k_relocate_contents): put_data returns void.
6880 * ns32k.h: (_bfd_ns32k_put_displacement, _bfd_ns32k_put_immediate)
6881 (_bfd_do_ns32k_reloc_contents): Fix prototypes. put data functions
6882 return void.
6883
6884 2002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
6885
6886 * aoutx.h (aout_link_check_ar_symbols): Whether to include an
6887 archive object is target dependant.
6888
6889 2002-07-31 Adam Nemet <anemet@lnxw.com>
6890
6891 * elf32-arm.h (ARM_PLT_ENTRY_SIZE): Rename PLT_ENTRY_SIZE.
6892 (THUMB_PLT_ENTRY_SIZE): New macro.
6893 (PLT_ENTRY_SIZE): Return the appropriate *_PLT_ENTRY_SIZE.
6894 (elf32_arm_plt0_entry): Rename PLT_ENTRY_SIZE to
6895 ARM_PLT_ENTRY_SIZE.
6896 (elf32_arm_plt_entry): Likewise.
6897 (elf_backend_plt_header_size): Likewise.
6898 (elf32_thumb_plt0_entry): New global.
6899 (elf32_arm_finish_dynamic_sections): Use it. Put Thumb entries
6900 into .plt.thumb.
6901 (elf32_thumb_plt_entry): New global.
6902 (elf32_arm_finish_dynamic_symbol): Use it. Use .thumb.plt for
6903 Thumb entries. Set the bottom bit of the corresponding GOT entry
6904 for a Thumb PLT entry.
6905 (struct elf32_arm_plt_entry_info): New structure.
6906 (struct elf32_arm_link_hash_entry, plt_info): New member of this
6907 type.
6908 (elf32_arm_link_hash_newfunc): Initialize new member.
6909 (elf32_arm_final_link_relocate, R_ARM_THM_PC22 case): Handle
6910 relocations against the PLT.
6911 (elf32_arm_check_relocs, case R_ARM_PLT32 case): Set
6912 first_rel_type if this is the first time we encounter the symbol.
6913 (elf32_arm_check_relocs, case R_ARM_THM_PC22 case): New case.
6914 Determine if relocation needs a PLT entry. Set first_rel_type if
6915 this is the first time we encounter the symbol
6916 (elf32_arm_adjust_dynamic_symbol): Create PLT entries for Thumb
6917 functions as well.
6918 (elf32_arm_size_dynamic_sections): Handle .plt.thumb like .plt.
6919 (elf32_arm_create_dynamic_sections): New function. Create the
6920 .plt.thumb section.
6921 (elf_backend_create_dynamic_sections): Call it.
6922
6923 2002-07-31 Nick Clifton <nickc@redhat.com>
6924
6925 * bfd.c (bfd_alt_mach_code): Rename parameter 'index' to
6926 'alternative' in order to avoid shadowing global symbol of the
6927 same name.
6928 * bfd-in2.h: Regenerate.
6929 * libbfd.h: Regenerate.
6930 * libcoff.h: Regenerate.
6931
6932 2002-07-31 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6933
6934 * Makefile.am: Add n32 ABI support.
6935 * Makefile.in: Regenerate.
6936 * config.bfd: Add n32 vectors to mips64*-*-linux* targets. Treat 64
6937 bit vectors for mips*-*-linux targets as optional.
6938 * configure.in: Add n32 ABI vectors.
6939 * configure: Regenerate.
6940 * elf32-mips.c (mips_elf32_object_p): Reject n32 ABI files.
6941 * elfn32-mips.c: New file, n32 ABI support.
6942 * targets.c: Add n32 ABI vectors.
6943
6944 2002-07-30 Graeme Peterson <gp@qnx.com>
6945
6946 * elfarmqnx-nabi.c: New file: Support for QNX.
6947 * config.bfd: Add support for arm-*-nto target.
6948 * configure.in: Add support for bfd_elf32_{big|little}armqnx_vec.
6949 * configure: Regenerate.
6950 * Makefile.am: Add entries for elfarmqnx-nabi.c.
6951 * Makefile.in: Regenerate.
6952 * elf32-arm.h (ELF_MAXPAGESIZE): Do not define if already defined.
6953 Do not define global function if ELFARM_NABI_C_INCLUDED is defined.
6954 * elfarm-nabi.c: Do not include elf32-arm.h if
6955 ELFARM_NABI_C_INCLUDED is defined.
6956 * targets.c: Add bfd_elf32_{big|little}armqnx_vec.
6957
6958 2002-07-30 Nick Clifton <nickc@redhat.com>
6959
6960 * po/sv.po: Updated Swedish translation.
6961
6962 2002-07-30 Jakub Jelinek <jakub@redhat.com>
6963
6964 * elf.c (elf_fake_sections): Fix up .tbss sh_size and sh_type.
6965
6966 2002-07-30 Alan Modra <amodra@bigpond.net.au>
6967
6968 * aoutx.h (some_aout_object_p): Clean up tdata properly on error.
6969 * archive.c (bfd_generic_archive_p): Likewise.
6970 * coff-rs6000.c (_bfd_xcoff_archive_p): Likewise.
6971 (_bfd_xcoff_archive_p): Use bfd_scan_vma in place of strtol.
6972 * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
6973 (xcoff64_archive_p): Likewise.
6974 (xcoff64_openr_next_archived_file): Likewise.
6975 (xcoff64_archive_p): Clean up tdata properly on error.
6976 * coffgen.c (coff_real_object_p): Likewise.
6977 (coff_object_p): Release filehdr and opthdr.
6978 * ecoff.c (_bfd_ecoff_archive_p): Clean up tdata properly on error.
6979 * ieee.c (ieee_archive_p): Likewise.
6980 * ihex.c (ihex_object_p): Likewise.
6981 (ihex_mkobject): Always allocate tdata.
6982 * peicode.h (pe_ILF_object_p): Release bfd_alloc'd buffer on error.
6983 * srec.c (srec_mkobject): Always allocate tdata.
6984 (srec_object_p): Clean up tdata properly on error.
6985 (symbolsrec_object_p): Likewise.
6986 * versados.c (versados_object_p): Likewise.
6987 * vms-misc.c (_bfd_vms_get_record): Use bfd_malloc instead of malloc,
6988 and bfd_realloc instead of realloc.
6989 (add_new_contents): Use bfd_alloc instead of bfd_malloc for sections.
6990 * vms.c (vms_initialize): Always allocate tdata. Use bfd_alloc in
6991 place of bfd_malloc, simplifying error freeing. Free hash table too.
6992 (vms_object_p): Clean up tdata on error.
6993 (vms_mkobject): Don't complain on stderr if vms_initialize fails.
6994 (vms_close_and_cleanup): Adjust for bfd_alloc use.
6995
6996 2002-07-30 Alan Modra <amodra@bigpond.net.au>
6997
6998 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set e_flags.
6999
7000 2002-07-26 Chris Demetriou <cgd@broadcom.com>
7001
7002 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Merge ASE
7003 flags into resulting BFD.
7004
7005 2002-07-26 Alan Modra <amodra@bigpond.net.au>
7006
7007 From John Reiser <jreiser@BitWagon.com>
7008 * elf32-i386.c (elf_i386_link_hash_table_create): Clear
7009 tls_ldm_got.refcount.
7010
7011 2002-07-25 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7012
7013 * elf64-mips.c: Update TODO comment.
7014 (mips_elf64_higher_reloc,mips_elf64_highest_reloc,
7015 mips_elf64_gprel16_reloca): Remove prototypes.
7016 (mips16_jump_reloc,mips16_gprel_reloc): Add functions.
7017 (UNUSED_RELOC): Replace by EMPTY_RELOC.
7018 (mips_elf64_howto_table_rel): Use special R_MIPS_HI16 handling. Remove
7019 wrong comments. Remove disfunctional support of R_MIPS_HIGHER and
7020 R_MIPS_HIGHEST.
7021 (mips_elf64_howto_table_rela): Fix handling of R_MIPS_GPREL16 and
7022 R_MIPS_GOT16. Remove wrong comments.
7023 (elf_mips16_jump_howto,elf_mips16_gprel_howto,
7024 elf_mips_gnu_vtinherit_howto,elf_mips_gnu_vtentry_howto): New, code
7025 from elf32-mips.c.
7026 (mips_elf64_hi16_reloc): Fix formatting.
7027 (mips_elf64_higher_reloc,mips_elf64_highest_reloc): Remove.
7028 (mips_elf64_got16_reloc): Fix formatting. Remove superfluous code.
7029 Better comment. Fall back to R_MIPS_GOT_DISP instead of abort().
7030 (mips_elf64_gprel16_reloc): Make static. Add check for
7031 partial_inplace.
7032 (mips_elf64_gprel16_reloca): Remove.
7033 (mips_elf64_literal_reloc): New function.
7034 (mips_elf64_gprel32_reloc): Fix formatting.
7035 (mips_elf64_shift6_reloc): Fix comment. Make static.
7036 (mips16_jump_reloc,mips16_gprel_reloc): New functions, code from
7037 elf32-mips.c.
7038 (elf_reloc_map,mips_reloc_map): New mapping table, similiar as in
7039 elf32-mips.c
7040 (bfd_elf64_bfd_reloc_type_lookup): Use the mapping table. Enable GNU
7041 specific relocations.
7042 (mips_elf64_rtype_to_howto): Enable GNU specific relocations.
7043 (mips_elf64_object_p): Invert logic to check for SGI-ish ABI.
7044 (ELF_MAXPAGESIZE): Add comment.
7045
7046 2002-07-25 Nick Clifton <nickc@redhat.com>
7047
7048 * po/sv.po: Updated Swedish translation.
7049 * po/es.po: Updated Spanish translation.
7050 * po/fr.po: Updated French translation.
7051
7052 2002-07-25 Alan Modra <amodra@bigpond.net.au>
7053
7054 * elf-bfd.h (_bfd_elf32_link_record_local_dynamic_symbol): Define
7055 as elf_link_record_local_dynamic_symbol.
7056 (_bfd_elf64_link_record_local_dynamic_symbol): Likewise.
7057 (elf_link_record_local_dynamic_symbol): Declare. Now returns int.
7058 * elflink.h (elf_link_record_local_dynamic_symbol): Move to..
7059 * elflink.c: .. here. Use bfd_elf_get_elf_syms. Check whether an
7060 attempt is made to record a symbol in a discarded section, and
7061 return `2' in that case.
7062
7063 2002-07-24 Nick Clifton <nickc@redhat.com>
7064
7065 * po/sv.po: Updated Swedish translation.
7066 * po/es.po: Updated Spanish translation.
7067
7068 2002-07-23 Alan Modra <amodra@bigpond.net.au>
7069
7070 * po/SRC-POTFILES.in: Regenerate.
7071
7072 * elf-hppa.h (elf_hppa_relocate_section): If relocatable, return
7073 immediately. Remove code handling relocatable linking.
7074 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
7075 * elf32-cris.c (cris_elf_relocate_section): Likewise.
7076 * elf32-fr30.c (elf32_frv_relocate_section): Likewise.
7077 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
7078 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
7079 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
7080 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
7081 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
7082 * elf32-v850.c (v850_elf_relocate_section): Likewise.
7083 * elf32-vax.c (elf_vax_relocate_section): Likewise.
7084 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7085 * elf32-avr.c (elf_backend_rela_normal): Define.
7086 * elf32-cris.c: Likewise.
7087 * elf32-fr30.c: Likewise.
7088 * elf32-frv.c: Likewise.
7089 * elf32-h8300.c: Likewise.
7090 * elf32-hppa.c: Likewise.
7091 * elf32-ip2k.c: Likewise.
7092 * elf32-sparc.c: Likewise.
7093 * elf32-v850.c: Likewise.
7094 * elf32-vax.c: Likewise.
7095 * elf64-hppa.c: Likewise.
7096 * elf64-sparc.c: Likewise.
7097 * elf32-fr30.c (elf32_frv_relocate_section): Edit comment.
7098 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
7099 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
7100 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
7101 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
7102 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
7103 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
7104 * elf-m10200.c (USE_RELA): Don't define.
7105 * elf-m10300.c: Likewise.
7106 * elfarm-oabi.c: Likewise.
7107 * elf32-i370.c: Likewise.
7108 * elf32-ip2k.c: Likewise.
7109 * elf32-m68k.c: Likewise.
7110 * elf32-mcore.c: Likewise.
7111 * elf32-ppc.c: Likewise.
7112 * elf32-s390.c: Likewise.
7113 * elf32-vax.c: Likewise.
7114 * elf64-ppc.c: Likewise.
7115 * elf64-s390.c: Likewise.
7116 * elf64-x86-64.c: Likewise.
7117 * elfxx-ia64.c: Likewise.
7118 * elf32-avr.c (USE_REL): Don't undef.
7119 * elf32-ip2k.c: Likewise.
7120
7121 2002-07-23 Nick Clifton <nickc@redhat.com>
7122
7123 * elf-bfd.h (struct elf_backend_data): Add new bitfield
7124 'want_p_paddr_set_to_zero'.
7125 * elfxx-target.h: Set default value for want_p_paddr_set_to_zero
7126 to false;
7127 * elfxx-ia64.c: Set want_p_paddr_set_zero for HPUX target.
7128 * elf.c (copy_private_bfd_data): Test want_p_paddr_set_zero.
7129
7130 2002-07-23 Gabor Keresztfalvi <keresztg@mail.com>
7131
7132 * nlmcode.h (nlm_swap_auxiliary_headers_out): Swapped the order of
7133 the MeSsAgEs and CoPyRiGhT tags to make >=NW4.x NLM loaders to
7134 show the Copyright string.
7135 Minor formatting tidy ups.
7136
7137 2002-07-23 Nick Clifton <nickc@redhat.com>
7138
7139 * po/fr.po: Updated French translation.
7140 * po/sv.po: Updated Swedish translation.
7141
7142 2002-07-23 Alan Modra <amodra@bigpond.net.au>
7143
7144 * elflink.h (elf_link_input_bfd): Don't change internal symbols
7145 when outputting relocs.
7146
7147 2002-07-20 Jason Thorpe <thorpej@wasabisystems.com>
7148
7149 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only insert
7150 DT_PLTGOT into the dynamic section if there is a PLT.
7151
7152 2002-07-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7153
7154 * elfxx-mips.c (_bfd_mips_elf_discard_info): New function, code from
7155 elf32-mips.c.
7156 (_bfd_mips_elf_write_section): Likewise.
7157 * elfxx-mips.h (_bfd_mips_elf_discard_info): New prototype.
7158 (_bfd_mips_elf_write_section): Likewise.
7159 * elf32-mips.c (elf32_mips_discard_info): Move to elfxx-mips.c.
7160 (elf32_mips_write_section): Likewise.
7161 * elf64-mips.c (_bfd_mips_elf_ignore_discarded_relocs): Use it.
7162 (_bfd_mips_elf_write_section): Likewise.
7163
7164 2002-07-19 Alan Modra <amodra@bigpond.net.au>
7165
7166 * elfxx-ia64.c: (elfNN_ia64_modify_segment_map): Properly scan
7167 PT_IA_64_UNWIND segments for a given section.
7168
7169 2002-07-17 H.J. Lu <hjl@gnu.org>
7170
7171 * Makefile.am: Fix a typo.
7172 * Makefile.in: Regenerate.
7173
7174 2002-07-15 Denis Chertykov <denisc@overta.ru>
7175 Frank Ch. Eigler <fche@redhat.com>
7176 Ben Elliston <bje@redhat.com>
7177 Alan Lehotsky <alehotsky@cygnus.com>
7178 John Healy <jhealy@redhat.com>
7179 Graham Stott <grahams@redhat.com>
7180 Jeff Johnston <jjohnstn@redhat.com>
7181
7182 * Makefile.am: Add support for ip2k.
7183 * Makefile.in: Regenerate.
7184 * doc/Makefile.in: Regenerate.
7185 * archures.c: Add support for ip2k.
7186 * config.bfd: Add support for ip2k.
7187 * configure.in: Add support for ip2k.
7188 * configure: Regenerate.
7189 * reloc.c: Add support for ip2k.
7190 * targets.c: Add support for ip2k.
7191 * bfd-in2.h: Regenerate.
7192 * libbfd.h: Regenerate.
7193 * cpu-ip2k.c: New file.
7194 * elf32-ip2k.c: New file.
7195
7196 2002-07-17 Ian Rickards <irickard@arm.com>
7197
7198 * dwarf2.c (concat_filename): If we can't establish the directory
7199 just return the filename.
7200
7201 2002-07-16 Moritz Jodeit <moritz@jodeit.org>
7202
7203 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Correct order of memset args.
7204
7205 2002-07-16 Alan Modra <amodra@bigpond.net.au>
7206
7207 * elflink.h: Formatting fixes, tidy prototypes.
7208 (elf_link_assign_sym_version): Move common code out of loop.
7209
7210 2002-07-16 Alan Modra <amodra@bigpond.net.au>
7211
7212 * elflink.h (elf_link_input_bfd): Don't call reloc_emitter when
7213 reloc section size is zero. Correct reloc output location.
7214
7215 2002-07-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
7216
7217 * elf-hppa.h (elf_hppa_reloc_final_type): Use R_PARISC_PCREL16F as
7218 the final type for the e_fsel selector when generating PA2.0W code.
7219 (elf_hppa_relocate_insn): Provide support for PA2.0W 16-bit format 1
7220 relocations.
7221
7222 2002-07-14 H.J. Lu <hjl@gnu.org>
7223
7224 * elflink.h (elf_link_assign_sym_version): Hide the default
7225 definition if there is a hidden versioned definition.
7226
7227 2002-07-12 Hans-Peter Nilsson <hp@axis.com>
7228
7229 * elf32-cris.c (cris_elf_relocate_section): Drop nonsensical
7230 dynamic reference test in assertion when initializing GOT with
7231 static contents. Just assert that there are either no dynamic
7232 sections, the symbol is defined in the regular objects or that the
7233 symbol is undef weak. Tweak comment.
7234 (elf_cris_finish_dynamic_symbol): Emit .got reloc for a program
7235 only if the symbol isn't defined in the program and isn't undef
7236 weak.
7237 (elf_cris_adjust_dynamic_symbol): Simplify condition for getting
7238 rid of PLT entry: only do it if the symbol isn't defined in a DSO.
7239 When doing so, clear ELF_LINK_HASH_NEEDS_PLT. Tweak comments.
7240 (elf_cris_discard_excess_program_dynamics): Don't consider
7241 ELF_LINK_HASH_REF_DYNAMIC when omitting .got runtime relocs.
7242
7243 2002-07-11 Alan Modra <amodra@bigpond.net.au>
7244
7245 * elf32-i386.c (elf_i386_relocate_section): Don't complain about
7246 unresolved debugging relocs in dynamic applications.
7247 * elf32-s390.c (elf_s390_relocate_section): Likewise.
7248 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
7249 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
7250 * elf64-s390.c (elf_s390_relocate_section): Likewise.
7251 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7252 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
7253
7254 2002-07-10 Alan Modra <amodra@bigpond.net.au>
7255
7256 * elf64-ppc.c (ONES): Define.
7257 (ppc64_elf_howto_table): Use ONES here to avoid warnings. Fill in
7258 missing src_mask fields. Tweak R_PPC64_NONE, R_PPC64_COPY. Fill
7259 in missing dst_mask fields on R_PPC64_PLT32, R_PPC64_PLTREL32.
7260
7261 * elf64-ppc.c (ppc64_elf_get_symbol_info): Delete.
7262 (ppc64_elf_set_private_flags): Delete.
7263 (ppc64_elf_section_from_shdr): Delete.
7264 (ppc64_elf_merge_private_bfd_data): Remove flag checking/merging code.
7265 (ppc64_elf_fake_sections): Delete.
7266 (bfd_elf64_bfd_set_private_flags): Don't define.
7267 (bfd_elf64_get_symbol_info): Likewise.
7268 (elf_backend_section_from_shdr): Likewise.
7269 (elf_backend_fake_sections): Likewise.
7270
7271 2002-07-10 Marco Walther <Marco.Walther@sun.com>
7272
7273 * elf.c: (assign_section_numbers) Set sh_entsize for .stab only
7274 when not already set.
7275 * elf64-sparc.c: (sparc64_elf_fake_sections): New function.
7276 (elf_backend_fake_sections): Define.
7277
7278 2002-07-10 Alan Modra <amodra@bigpond.net.au>
7279
7280 * merge.c (_bfd_merge_section): Remove redundant output_section check.
7281 Formatting.
7282 (_bfd_merge_sections): Don't set SEC_EXCLUDE on unused sections.
7283
7284 2002-07-09 Hans-Peter Nilsson <hp@axis.com>
7285
7286 * elf32-cris.c (cris_elf_relocate_section): Move sanity-check for
7287 NULL sym_hashes to just before use.
7288 <case R_CRIS_32_GOTREL>: In test for local symbol, accept also
7289 symbol with non-default visibility.
7290 <case R_CRIS_32_GOTREL, case R_CRIS_32_PLT_GOTREL>: Ditto.
7291 <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
7292 Ditto.
7293 (cris_elf_gc_sweep_hook): Only decrease h->plt.refcount for
7294 symbol with non-default visibility.
7295 (cris_elf_check_relocs): At tests for local symbol before
7296 increasing h->plt.refcount, also check for non-default
7297 visibility. Ditto when checking for local symbol to eliminate
7298 pc-relative runtime relocs.
7299
7300 2002-07-08 Alan Modra <amodra@bigpond.net.au>
7301
7302 * elf.c: Formatting.
7303 (IS_SOLARIS_PT_INTERP): Add p_paddr and p_memsz checks.
7304 (INCLUDE_SECTION_IN_SEGMENT): Remove IS_SOLARIS_PT_INTERP.
7305 (copy_private_bfd_data): Set p_vaddr on broken Solaris PT_INTERP
7306 segments.
7307
7308 2002-07-07 Mark Mitchell <mark@codesourcery.com>
7309 Alan Modra <amodra@bigpond.net.au>
7310
7311 * cofflink.c (_bfd_coff_final_link): On PE COFF systems, take into
7312 account the impact of relocation count overflow when computing
7313 section offsets.
7314 * coffcode.h (coff_write_relocs): Use obj_pe when deciding whether
7315 or not to apply the PE COFF reloc overflow handling. Fix a
7316 fencepost error in deciding whether or not to use that technique.
7317
7318 2002-07-07 Alan Modra <amodra@bigpond.net.au>
7319
7320 * elf-bfd.h (struct elf_reloc_cookie): Remove locsym_shndx,
7321 change type of locsyms.
7322 (bfd_elf_get_elf_syms): Declare.
7323 * elf.c (bfd_elf_get_elf_syms): New function.
7324 (group_signature): Use bfd_elf_get_elf_syms.
7325 (bfd_section_from_r_symndx): Likewise.
7326 * elfcode.h (elf_slurp_symbol_table): Likewise.
7327 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
7328 (elf_link_add_object_symbols): Likewise. Reorganise to increase
7329 locality of various data structures. Properly free internal relocs.
7330 (elf_bfd_final_link): Properly free internal relocs.
7331 (elf_link_check_versioned_symbol): Use bfd_elf_get_elf_syms.
7332 (elf_link_input_bfd): Likewise.
7333 (elf_gc_mark): Likewise. Properly free internal relocs.
7334 (elf_gc_sweep): Properly free internal relocs.
7335 (elf_reloc_symbol_deleted_p): No need to swap syms in.
7336 (elf_bfd_discard_info): Use bfd_elf_get_elf_syms. Properly free
7337 internal relocs.
7338 * elf-m10200.c (mn10200_elf_relax_section): Use bfd_elf_get_elf_syms.
7339 Properly free possibly cached info.
7340 (mn10200_elf_relax_delete_bytes): Remove symbol swapping code.
7341 (mn10200_elf_symbol_address_p): Pass in internal syms. Remove
7342 symbol swapping code.
7343 (mn10200_elf_get_relocated_section_contents): Use bfd_elf_get_elf_syms.
7344 Properly free possibly cached info.
7345 * elf-m10300.c (mn10300_elf_relax_section): As above for elf-m10200.c.
7346 (mn10300_elf_relax_delete_bytes): Likewise.
7347 (mn10300_elf_symbol_address_p): Likewise.
7348 (mn10300_elf_get_relocated_section_contents): Likewise.
7349 * elf32-h8300.c (elf32_h8_relax_section): As above for elf-m10200.c.
7350 (elf32_h8_relax_delete_bytes): Likewise.
7351 (elf32_h8_symbol_address_p): Likewise.
7352 (elf32_h8_get_relocated_section_contents): Likewise.
7353 * elf32-m32r.c (m32r_elf_relax_section): As above for elf-m10200.c.
7354 (m32r_elf_relax_delete_bytes): Likewise.
7355 (m32r_elf_get_relocated_section_contents): Likewise.
7356 * elf32-sh.c (sh_elf_reloc_loop): Free section contents using
7357 elf_section_data to determine whether cached.
7358 (sh_elf_relax_section): As above for elf-m10200.c.
7359 (sh_elf_relax_delete_bytes): Likewise.
7360 (sh_elf_get_relocated_section_contents): Likewise.
7361 * elf32-xstormy16.c (xstormy16_elf_relax_section): As above.
7362 * elf64-alpha.c (elf64_alpha_relax_section): As above. Also delay
7363 reading of local syms.
7364 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
7365 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): As above.
7366 * elfxx-ia64.c (elfNN_ia64_relax_section): As above.
7367 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Properly free internal
7368 relocs.
7369 * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Properly
7370 free internal relocs and section contents. Don't read symbols.
7371 * elf32-hppa.c (get_local_syms): Use bfd_elf_get_elf_syms.
7372 (elf32_hppa_size_stubs): Don't free local syms.
7373 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Delay
7374 reading of local syms. Use bfd_elf_get_elf_syms. Properly free
7375 possibly cached info.
7376 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
7377 * elf64-hppa.c (elf64_hppa_check_relocs): Use bfd_elf_get_elf_syms.
7378 * elf64-ppc.c (struct ppc_link_hash_table): Delete bfd_count and
7379 all_local_syms.
7380 (get_local_syms): Delete function.
7381 (edit_opd): Use bfd_elf_get_elf_syms. Free on error exit. Cache
7382 on exit.
7383 (ppc64_elf_size_stubs): Use bfd_elf_get_elf_syms. Free/cache on exit.
7384
7385 2002-07-05 Jim Wilson <wilson@redhat.com>
7386
7387 * syms.c (decode_section_type): New.
7388 (bfd_decode_symclass): Call decode_section_type.
7389
7390 2002-07-04 Jakub Jelinek <jakub@redhat.com>
7391
7392 * merge.c (_bfd_merged_section_offset): Avoid accessing byte before
7393 section content start.
7394 Reported by Michael Schumacher <mike@hightec-rt.com>.
7395
7396 2002-07-04 Alan Modra <amodra@bigpond.net.au>
7397
7398 * section.c (_bfd_strip_section_from_output): Remove unnecessary
7399 link order code. Don't actually remove the output section here;
7400 Just set a flag for the linker to do so.
7401 * elflink.c (_bfd_elf_link_renumber_dynsyms): Test for removed
7402 sections when setting up output section dynsyms.
7403
7404 2002-07-04 Alan Modra <amodra@bigpond.net.au>
7405
7406 * elflink.h (elf_link_add_object_symbols): Revert 1999-09-02 hpux
7407 fudge.
7408 * elf.c (bfd_section_from_shdr): Work around broken hpux shared
7409 libs here instead.
7410
7411 2002-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
7412
7413 * elf64-s390.c (create_got_section): Set .got section alignment to
7414 8 bytes.
7415 (elf_s390_check_relocs): Set .rela.dyn section alignment to 8 bytes.
7416
7417 2002-07-02 Alan Modra <amodra@bigpond.net.au>
7418
7419 * elf.c (_bfd_elf_reloc_type_class): Fix comment grammar.
7420
7421 2002-07-01 Matt Thomas <matt@3am-software.com>
7422
7423 * elf32-vax.c (elf32_vax_print_private_bfd_data): Change EF_*
7424 to EF_VAX_*.
7425
7426 2002-07-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7427
7428 * elfxx-mips.c (ABI_64_P): Fix comment.
7429 (MIPS_ELF_OPTIONS_SECTION_NAME,MIPS_ELF_STUB_SECTION_NAME): Use the
7430 new section names for N64 ABI.
7431 (mips_elf_output_extsym): No special _gp_disp handling for NewABI.
7432 (mips_elf_calculate_relocation): Code formatting.
7433 (mips_elf_create_dynamic_relocation): Likewise.
7434 (_bfd_mips_elf_fake_sections): IRIX6 needs this hack, too.
7435 (_bfd_mips_elf_size_dynamic_sections): Handle GOT_PAGE for any NewABI.
7436 (_bfd_mips_elf_relocate_section): No special handling for R_MIPS_64
7437 in any NewABI.
7438 (_bfd_mips_elf_finish_dynamic_symbol): No special _gp_disp handling
7439 for NewABI.
7440 (_bfd_mips_elf_modify_segment_map): Handle any N64 ABI.
7441 (_bfd_mips_elf_gc_sweep_hook): NewABI GOT relocs should be handled
7442 here, too.
7443
7444 2002-07-01 Andreas Schwab <schwab@suse.de>
7445
7446 * elf64-x86-64.c (elf64_x86_64_relocate_section): Only convert
7447 R_X86_64_64 to R_X86_64_RELATIVE.
7448
7449 2002-07-01 John David Anglin <dave@hiauly1.hia.nrc.ca>
7450
7451 * vaxbsd.c: New BFD backend for VAX BSD and Ultrix.
7452 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Add new backend.
7453 Run "make dep-am".
7454 * config.bfd (vax-*-bsd* | vax-*-ultrix*): Use vaxbsd_vec instead of
7455 host_aout_vec.
7456 * configure.in (vaxbsd_vec): Add.
7457 * targets.c (vaxbsd_vec): Add.
7458 * Makefile.in: Rebuild.
7459 * configure: Rebuild.
7460 * po/SRC-POTFILES.in: Rebuild.
7461
7462 2002-07-01 Alan Modra <amodra@bigpond.net.au>
7463
7464 * elflink.h (elf_gc_mark): Pass in the section whose relocs we are
7465 examining to gc_mark_hook, rather than the bfd.
7466 (elf_gc_sections): Adjust.
7467 * elf-bfd.h (struct elf_backend_data <gc_mark_hook>): Likewise.
7468 * elf-m10300.c (mn10300_elf_gc_mark_hook): Likewise.
7469 * elf32-arm.h (elf32_arm_gc_mark_hook): Likewise.
7470 * elf32-avr.c (elf32_avr_gc_mark_hook): Likewise.
7471 * elf32-cris.c (cris_elf_gc_mark_hook): Likewise.
7472 * elf32-d10v.c (elf32_d10v_gc_mark_hook): Likewise.
7473 * elf32-fr30.c (fr30_elf_gc_mark_hook): Likewise.
7474 * elf32-hppa.c (elf32_hppa_gc_mark_hook): Likewise.
7475 * elf32-i386.c (elf_i386_gc_mark_hook): Likewise.
7476 * elf32-m32r.c (m32r_elf_gc_mark_hook): Likewise.
7477 * elf32-m68k.c (elf_m68k_gc_mark_hook): Likewise.
7478 * elf32-mcore.c (mcore_elf_gc_mark_hook): Likewise.
7479 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Likewise.
7480 * elf32-ppc.c (ppc_elf_gc_mark_hook): Likewise.
7481 * elf32-s390.c (elf_s390_gc_mark_hook): Likewise.
7482 * elf32-sh.c (sh_elf_gc_mark_hook): Likewise.
7483 * elf32-sparc.c (elf32_sparc_gc_mark_hook): Likewise.
7484 * elf32-v850.c (v850_elf_gc_mark_hook): Likewise.
7485 * elf32-vax.c (elf_vax_gc_mark_hook): Likewise.
7486 * elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Likewise.
7487 * elf64-mmix.c (mmix_elf_gc_mark_hook): Likewise.
7488 * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
7489 * elf64-s390.c (elf_s390_gc_mark_hook): Likewise.
7490 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
7491 * elfxx-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise.
7492 * elfxx-mips.h (_bfd_mips_elf_gc_mark_hook): Likewise.
7493 * elf64-x86-64.c (elf64_x86_64_gc_mark_hook): Likewise.
7494 * elf32-frv.c (elf32_frv_gc_mark_hook): Likewise. Also remove
7495 redundant local sym tests.
7496 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_entry.
7497 (link_hash_newfunc): Init is_entry.
7498 (ppc64_elf_copy_indirect_symbol): Copy is_entry.
7499 (ppc64_elf_link_hash_table_create): Init all_local_syms.
7500 (create_linkage_sections): Use bfd_make_section_anyway rather than
7501 bfd_make_section.
7502 (ppc64_elf_mark_entry_syms): New function.
7503 (ppc64_elf_check_relocs): Don't bother testing elf_bad_symtab. Set
7504 up opd entry to function section map.
7505 (ppc64_elf_gc_mark_hook): Special case opd section relocs, and
7506 relocs that reference the opd section.
7507 (edit_opd): New function.
7508 (ppc64_elf_size_dynamic_sections): Call get_local_syms and edit_opd.
7509 (ppc64_elf_setup_section_lists): Don't calculate htab->bfd_count here.
7510 (get_local_syms): Do so here. Exit if we already have local syms.
7511 Remove bogus comment imported from elf32-hppa.c. Don't attempt to
7512 read local syms on non-ELF input.
7513 (ppc64_elf_size_stubs): Call _bfd_elf64_link_read_relocs rather
7514 than duplicating it's function here. Adjust free of internal
7515 relocs to suit.
7516 (ppc64_elf_relocate_section): Adjust local syms in opd section.
7517 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Declare.
7518 * elf32-hppa.c (elf32_hppa_size_stubs): Call
7519 _bfd_elf32_link_read_relocs rather than duplicating it's function
7520 here. Adjust free of internal relocs to suit.
7521
7522 2002-07-01 Andreas Jaeger <aj@suse.de>
7523
7524 * elf64-x86-64.c (elf64_x86_64_check_relocs): Certain relocations
7525 are not allowed in shared libs code, enforce -fPIC.
7526
7527 2002-06-29 Hans-Peter Nilsson <hp@bitrange.com>
7528
7529 * mmo.c (mmo_write_loc_chunk): Don't eliminate leading and
7530 trailing zero-sequences when there's previous left-over data.
7531
7532 2002-06-27 John David Anglin <dave@hiauly1.hia.nrc.ca>
7533
7534 * elf64-hppa.c (elf64_hppa_reloc_type_class): New function.
7535 (elf64_hppa_finish_dynamic_sections): Check other_rel_sec, dlt_rel_sec
7536 and opd_rel_sec in order for starting rela section. Check _raw_size.
7537 (elf_backend_reloc_type_class): Define.
7538
7539 2002-06-27 Kevin Buettner <kevinb@redhat.com>
7540
7541 * dwarf2.c (decode_line_info): Handle older, non-standard, 64-bit
7542 DWARF2 formats.
7543
7544 2002-06-27 Alan Modra <amodra@bigpond.net.au>
7545
7546 * cpu-powerpc.c: Comment on ordering of arch_info.
7547 * elf32-ppc.c (ppc_elf_object_p): New function.
7548 (elf_backend_object_p): Define.
7549 * elf64-ppc.c (ppc64_elf_object_p): New function.
7550 (elf_backend_object_p): Define.
7551
7552 2002-06-26 Jason Thorpe <thorpej@wasabisystems.com>
7553
7554 * configure.in (vax-*-netbsd*): Set COREFILE to netbsd-core.lo.
7555 * configure: Regenerate.
7556
7557 2002-06-25 Jason Eckhardt <jle@rice.edu>
7558
7559 * dwarf2.c (decode_line_info): Check unit->addr_size
7560 to read in the proper number of prologue bytes.
7561
7562 2002-06-25 Nick Clifton <nickc@cambridge.redhat.com>
7563
7564 * config.bfd (powerpc-*-aix5*): Only create a selvecs for
7565 aix5coff64_vec if 64-bit bfd support has been enabled.
7566 (powerpc64-*-aix5*): Only define if 64-bit bfd support has
7567 been enabled.
7568
7569 * targets.c (_bfd_target_vector[]): Only include
7570 aix5coff64_vec if 64-bit bfd support has been enabled.
7571
7572 2002-06-25 Alan Modra <amodra@bigpond.net.au>
7573
7574 * elf64-ppc.c (ppc_add_stub): Replace strcpy/strncpy with memcpy.
7575 * elf32-hppa.c (hppa_add_stub): Likewise.
7576 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
7577 * elflink.h (elf_add_default_symbol): Fix comment typo.
7578 (elf_add_default_symbol): Replace strcpy and strncpy with memcpy.
7579 (elf_link_add_object_symbols): Likewise.
7580 (elf_link_assign_sym_version): Likewise.
7581 * hash.c (bfd_hash_lookup): Likewise.
7582 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
7583 * section.c (bfd_get_unique_section_name): Likewise.
7584 * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
7585 * elf.c (_bfd_elf_make_section_from_phdr): Likewise.
7586 (assign_section_numbers): Likewise.
7587 (_bfd_elfcore_make_pseudosection): Likewise.
7588 (elfcore_grok_lwpstatus): Likewise.
7589 (elfcore_grok_win32pstatus): Likewise.
7590 (elfcore_write_note): Constify input params. Use PTR instead of
7591 void *. Include terminating NUL in namesz. Correct padding.
7592 Support NULL "name" param. Use memcpy instead of strcpy.
7593 (elfcore_write_prpsinfo): Constify input params.
7594 (elfcore_write_prstatus): Likewise. Use PTR instead of void *.
7595 (elfcore_write_lwpstatus): Likewise.
7596 (elfcore_write_pstatus): Likewise.
7597 (elfcore_write_prfpreg): Likewise.
7598 (elfcore_write_prxfpreg): Likewise.
7599 * elf-bfd.h (elfcore_write_note): Update declaration.
7600 (elfcore_write_prpsinfo): Likewise.
7601 (elfcore_write_prstatus): Likewise.
7602 (elfcore_write_pstatus): Likewise.
7603 (elfcore_write_prfpreg): Likewise.
7604 (elfcore_write_prxfpreg): Likewise.
7605 (elfcore_write_lwpstatus): Likewise.
7606
7607 2002-06-25 Jason Eckhardt <jle@rice.edu>
7608
7609 * ecoff.c (ecoff_set_symbol_info): Set BSF_FUNCTION for
7610 symbols of type stProc and stStaticProc.
7611
7612 2002-06-25 Nick Clifton <nickc@redhat.com>
7613
7614 * ecoff.c: VArious formatting fixes.
7615
7616 2002-06-25 Alan Modra <amodra@bigpond.net.au>
7617
7618 * coff-rs6000.c (xcoff_generate_rtinit): Fix typo.
7619
7620 2002-06-25 Alan Modra <amodra@bigpond.net.au>
7621
7622 * aout-adobe.c: Don't compare against "true" or "false.
7623 * aout-target.h: Likewise.
7624 * aoutx.h: Likewise.
7625 * archive.c: Likewise.
7626 * bout.c: Likewise.
7627 * cache.c: Likewise.
7628 * coff-a29k.c: Likewise.
7629 * coff-alpha.c: Likewise.
7630 * coff-i386.c: Likewise.
7631 * coff-mips.c: Likewise.
7632 * coff-or32.c: Likewise.
7633 * coff64-rs6000.c: Likewise.
7634 * coffcode.h: Likewise.
7635 * coffgen.c: Likewise.
7636 * cpu-ns32k.c: Likewise.
7637 * ecoff.c: Likewise.
7638 * ecofflink.c: Likewise.
7639 * elf.c: Likewise.
7640 * elf32-arm.h: Likewise.
7641 * elf32-cris.c: Likewise.
7642 * elf32-d30v.c: Likewise.
7643 * elf32-i386.c: Likewise.
7644 * elf32-mcore.c: Likewise.
7645 * elf32-ppc.c: Likewise.
7646 * elf32-sh.c: Likewise.
7647 * elf32-sh64.c: Likewise.
7648 * elf32-v850.c: Likewise.
7649 * elf64-alpha.c: Likewise.
7650 * elf64-sh64.c: Likewise.
7651 * elfcode.h: Likewise.
7652 * elfcore.h: Likewise.
7653 * elflink.h: Likewise.
7654 * elfxx-mips.c: Likewise.
7655 * i386os9k.c: Likewise.
7656 * ieee.c: Likewise.
7657 * libbfd.c: Likewise.
7658 * linker.c: Likewise.
7659 * mmo.c: Likewise.
7660 * nlm32-alpha.c: Likewise.
7661 * nlm32-i386.c: Likewise.
7662 * nlm32-ppc.c: Likewise.
7663 * nlm32-sparc.c: Likewise.
7664 * nlmcode.h: Likewise.
7665 * oasys.c: Likewise.
7666 * pdp11.c: Likewise.
7667 * peicode.h: Likewise.
7668 * reloc.c: Likewise.
7669 * som.c: Likewise.
7670 * srec.c: Likewise.
7671 * tekhex.c: Likewise.
7672 * vms.c: Likewise.
7673 * xcofflink.c: Likewise.
7674 * elf64-sparc.c: Edit comment to not use "== false".
7675
7676 * aoutf1.h: Don't use "? true : false".
7677 * ecoff.c: Likewise.
7678 * format.c: Likewise.
7679 * ieee.c: Likewise.
7680 * linker.c: Likewise.
7681 * mmo.c: Likewise.
7682 * oasys.c: Likewise.
7683
7684 2002-06-23 H.J. Lu <hjl@gnu.org>
7685
7686 * elflink.h (elf_link_add_archive_symbols): For the default
7687 version, check references with only one `@' first.
7688
7689 2002-06-23 John David Anglin <dave@hiauly1.hia.nrc.ca>
7690
7691 * elf64-hppa.c (elf64_hppa_mark_milli_and_exported_functions): New
7692 function.
7693 (allocate_global_data_dlt): Don't add millicode symbols to dynamic
7694 symbol table.
7695 (allocate_global_data_opd, allocate_dynrel_entries): Likewise.
7696 (elf64_hppa_size_dynamic_sections): Revise to use
7697 elf64_hppa_mark_milli_and_exported_functions.
7698 (elf64_hppa_finish_dynamic_symbol): Remove code to keep millicode
7699 symbols out of dynamic symbol table.
7700
7701 2002-06-23 Alan Modra <amodra@bigpond.net.au>
7702
7703 * Makefile.in: Regenerate.
7704 * libbfd.h: Regenerate.
7705 * bfd-in2.h: Regenerate.
7706 * configure: Regenerate.
7707 * po/SRC-POTFILES.in: Regenerate.
7708
7709 * elflink.h: Comment typo fixes.
7710
7711 2002-06-23 H.J. Lu <hjl@gnu.org>
7712
7713 * elf-bfd.h (elf_link_loaded_list): New structure.
7714 (elf_link_hash_table): Add "loaded".
7715 * elf.c (_bfd_elf_link_hash_table_init): Initialize "loaded".
7716 * elflink.h (elf_link_check_versioned_symbol): New function.
7717 (elf_link_output_extsym): Call elf_link_check_versioned_symbol.
7718
7719 2002-06-19 Nick Clifton <nickc@cambridge.redhat.com>
7720
7721 * elflink.h (size_dynamic_sections): If the target does not
7722 support an ELF style hash table, return true, indicating that
7723 nothing needed to be done, rather than false, indicating that the
7724 section's size could not be computed.
7725
7726 2002-06-18 Dave Brolley <brolley@redhat.com>
7727
7728 From Catherine Moore, Michael Meissner, Dave Brolley:
7729 * po/SRC-POTFILES.in: Add cpu-frv.c and elf32-frv.c
7730 * targets.c: Support bfd_elf32_frv_vec.
7731 * reloc.c: Add FRV relocs.
7732 * configure.in: Add support for bfd-elf32-frv-vec.
7733 * config.bfd (targ_cpu): Add support for frv-*-elf.
7734 * archures.c: Add frv arch and machines.
7735 * Makefile.am (ALL_MACHINES): Add cpu-frv.lo.
7736 (ALL_MACHINES_CFILES): Add cpu-frv.c.
7737 (BFD32_BACKENDS): Add elf32-frv.lo.
7738 (BFD32_BACKENDS_CFILES): Add elf32-frv.c
7739 (cpu-frv.lo): New target.
7740 (elf32-frv.lo): New target.
7741 * cpu-frv.c: New file.
7742 * elf32-frv.c: New file.
7743
7744 2002-06-18 Jakub Jelinek <jakub@redhat.com>
7745
7746 * elfcode.h (elf_object_p): Sanity check eh_shoff == 0 implies
7747 e_shnum == 0.
7748 Only read the first section header if e_shoff is non-zero.
7749 Don't consider e_shstrndx if there are no sections.
7750
7751 2002-06-17 Tom Rix <trix@redhat.com>
7752
7753 * elf32-d10v.c (elf_d10v_howto_table): Change R_D10V_10_PCREL_R,
7754 R_D10V_10_PCREL_L and R_D10V_18_PCREL to use
7755 complain_overflow_bitfield.
7756
7757 2002-06-17 Alan Modra <amodra@bigpond.net.au>
7758
7759 * opncls.c (bfd_openr): Remove redundant bfd_set_error.
7760 (bfd_fdopenr): Likewise.
7761 (bfd_openstreamr): Likewise.
7762 (bfd_openw): Likewise.
7763
7764 * targets.c: Sort target vecs.
7765 (_bfd_target_vector): Add aix5coff64_vec, bfd_elf32_sh64_vec,
7766 bfd_elf32_sh64l_vec, bfd_elf32_sh64lnbsd_vec,
7767 bfd_elf32_sh64nbsd_vec, bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec,
7768 bfd_elf64_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec.
7769 * configure.in: Sort target vecs. Add m88kmach3_vec.
7770 * configure: Regenerate.
7771
7772 2002-06-16 Hans-Peter Nilsson <hp@bitrange.com>
7773
7774 * elf64-mmix.c (bpo_reloc_request_sort_fn): Use member
7775 bpo_reloc_no to break sort order ties, not address of items.
7776
7777 2002-06-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
7778
7779 * elf-hppa.h (elf_hppa_final_link): Fix formatting in comment.
7780 Skip excluded sections in determing __gp value.
7781 (elf_hppa_final_link_relocate): Use the symbol's address in
7782 R_PARISC_FPTR64 relocations that don't need an opd entry.
7783 * elf64-hppa.c (allocate_dynrel_entries): Simplify code.
7784 (elf64_hppa_finalize_dynreloc): Likewise.
7785 (elf64_hppa_size_dynamic_sections): Move comments and fix typo.
7786 (elf64_hppa_finish_dynamic_symbol): Break up assert.
7787
7788 2002-06-14 Sergey Grigoriev <serge@leopold.Physik.Uni-Augsburg.DE>
7789
7790 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
7791 alignment for .bss, .data and .text sections so that sse and sse2
7792 code will work.
7793 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
7794
7795 2002-06013 J"orn Rennecke <joern.rennecke@superh.com>
7796
7797 config.bfd: Add support for sh[1234]l*-*-elf* | sh3el*-*-elf*,
7798 sh[1234]*-elf*.
7799
7800 2002-06-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
7801
7802 * elflink.h (elf_bfd_final_link): Improve error handling for missing
7803 dynamic sections.
7804
7805 * elf64-hppa.c (allocate_global_data_opd): We don't need an opd entry
7806 for a symbol that has no output section.
7807 (allocate_dynrel_entries): Correct comment.
7808 (elf64_hppa_finalize_dynreloc): Likewise. Don't create an opd entry
7809 unless we want one.
7810 (elf64_hppa_finalize_opd): Prevent segfault if dyn_h is NULL.
7811 (elf64_hppa_finalize_dlt): Likewise. Prevent segfault for symbols
7812 with no section. Remove unnecessary parentheses.
7813
7814 2002-06-11 Tom Rix <trix@redhat.com>
7815
7816 * coffcode.h (coff_compute_section_file_positions): Add data
7817 section to AIX loader alignment check.
7818
7819 * coff-rs6000.c (_bfd_xcoff_mkobject): Set default text section
7820 alignment to 4 bytes.
7821 (_bfd_xcoff_copy_private_bfd_data): Use text and data alignment
7822 power accessor macro.
7823 (do_shared_object_padding): Remove invalid assertion.
7824
7825 2002-06-10 Richard Sandiford <rsandifo@redhat.com>
7826
7827 * section.c (_bfd_strip_section_from_output): Set SEC_EXCLUDE
7828 for removed output sections.
7829
7830 2002-06-10 Geoffrey Keating <geoffk@redhat.com>
7831
7832 * merge.c (merge_strings): Use htab_create_alloc with calloc, not
7833 htab_alloc.
7834 * elf-strtab.c (_bfd_elf_strtab_finalize): Likewise.
7835
7836 2002-06-08 H.J. Lu <hjl@gnu.org>
7837
7838 * elf.c (copy_private_bfd_data): Don't cast to bfd_size_type to
7839 work around a long long bug in gcc 2.96 on mips.
7840
7841 2002-06-08 Jason Thorpe <thorpej@wasabisystems.com>
7842
7843 * Makefile.am (BFD32_BACKENDS): Add vax1knetbsd.lo.
7844 (BFD32_BACKENDS_CFILES): Add vax1knetbsd.c.
7845 Regenerate dependency lists.
7846 * Makefile.in: Regenerate.
7847 * config.bfd (vax-*-netbsdelf*, vax-*-netbsdaout*): Add
7848 vax1knetbsd_vec to targ_selvecs.
7849 * configure.in: Add vax1knetbsd_vec.
7850 * configure: Regenerate.
7851 * targets.c (_bfd_target_vector): Add vax1knetbsd_vec.
7852 * vax1knetbsd.c: New file.
7853 * vaxnetbsd.c: Update copyright years.
7854 (TARGET_PAGE_SIZE): Set to 0x1000.
7855 (DEFAULT_MID): Set to M_VAX4K_NETBSD.
7856
7857 2002-06-08 Matt Thomas <matt@3am-software.com>
7858
7859 * libaout.h (enum machine_type): Add M_VAX4K_NETBSD.
7860
7861 2002-06-08 Alan Modra <amodra@bigpond.net.au>
7862
7863 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Make static.
7864
7865 2002-06-08 Alan Modra <amodra@bigpond.net.au>
7866
7867 * Makefile.am: Run "make dep-am".
7868 * Makefile.in: Regenerate.
7869
7870 * armnetbsd.c: Replace CONST with const.
7871 * corefile.c: Likewise.
7872 * elf32-dlx.c: Likewise.
7873 * elf64-mips.c: Likewise.
7874 * mmo.c: Likewise.
7875 * ns32knetbsd.c: Likewise.
7876
7877 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Check the hash
7878 table is elf64-sparc.
7879
7880 2002-06-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7881
7882 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Simplify code.
7883 Fix RELA addends to get not shifted in the result. Don't do special
7884 handling of R_MIPS_64 for NewABI.
7885
7886 2002-06-07 Alan Modra <amodra@bigpond.net.au>
7887
7888 * aoutx.h (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
7889 (NAME(aout,slurp_reloc_table)): Likewise.
7890 * coff-mips.c (mips_relax_section): Use bfd_zalloc.
7891 * coff-rs6000.c (xcoff_write_armap_big): Use bfd_zmalloc.
7892 (xcoff_write_archive_contents_big): Likewise.
7893 (xcoff_generate_rtinit): Likewise.
7894 (xcoff_generate_rtinit): Likewise, and check error return.
7895 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
7896 * coffgen.c (coff_section_symbol): Use bfd_zalloc.
7897 (coff_get_normalized_symtab): Likewise.
7898 (coff_make_empty_symbol): Likewise.
7899 (bfd_coff_set_symbol_class): Likewise.
7900 * cofflink.c (coff_link_add_symbols): Likewise.
7901 * ecoff.c (_bfd_ecoff_make_empty_symbol): Likewise.
7902 * ecofflink.c (ecoff_write_shuffle): Use bfd_zmalloc.
7903 (bfd_ecoff_write_accumulated_debug): Likewise.
7904 * elf64-alpha.c (get_got_entry): Use bfd_zalloc.
7905 * i386linux.c (bfd_i386linux_size_dynamic_sections): Likewise.
7906 * i386lynx.c (NAME(lynx,slurp_reloc_table)): Use bfd_zmalloc.
7907 * ieee.c (do_with_relocs): Use bfd_zalloc.
7908 * m68klinux.c (bfd_m68klinux_size_dynamic_sections): Likewise.
7909 * pdp11.c (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
7910 (NAME(aout,slurp_reloc_table)): Likewise.
7911 (NAME(aout,squirt_out_relocs)): Don't memset when zalloc'd.
7912 * reloc16.c (bfd_coff_reloc16_relax_section): Use bfd_zmalloc.
7913 * som.c (som_build_and_write_symbol_table): Likewise.
7914 (som_slurp_string_table): Likewise.
7915 (som_slurp_symbol_table): Likewise.
7916 (som_bfd_ar_write_symbol_stuff): Likewise.
7917 * sparclinux.c (bfd_sparclinux_size_dynamic_sections): Use bfd_zalloc.
7918 * sunos.c (bfd_sunos_size_dynamic_sections): Likewise.
7919 * tekhex.c (find_chunk): Likewise. Get rid of unused "sname".
7920 * vms-gsd.c (_bfd_vms_slurp_gsd): Use bfd_zmalloc.
7921 * xcofflink.c (xcoff_link_add_symbols): Use bfd_zalloc/bfd_zmalloc.
7922
7923 2002-06-07 Alan Modra <amodra@bigpond.net.au>
7924
7925 * elf-bfd.h (struct bfd_elf_section_data <group_name>): Replace with
7926 "group" union.
7927 (elf_group_name): Update.
7928 (elf_group_id): Define.
7929 (bfd_elf_set_group_contents): Declare.
7930 * elf.c (elf_fake_sections): Qualify use of elf_group_name.
7931 (set_group_contents): Rename to bfd_elf_set_group_contents. Remove
7932 ATTRIBUTE_UNUSED from failedptrarg. If elf_group_id is set, use
7933 that sym for the signature.
7934 (_bfd_elf_compute_section_file_positions): Don't call
7935 set_group_contents for "ld -r" case.
7936 (swap_out_syms): Use bfd_zalloc.
7937 * elflink.h (elf_link_add_archive_symbols): Likewise.
7938 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
7939 (elf_bfd_final_link): Call bfd_elf_set_group_contents.
7940
7941 2002-06-07 Alan Modra <amodra@bigpond.net.au>
7942
7943 * elf64-ppc.c (ppc64_elf_relocate_section): Allow unresolved
7944 relocs in opd for non-shared too.
7945
7946 2002-06-06 Jeffrey Law <law@redhat.com>
7947
7948 * elf32-h8300.c (elf32_h8_relax_section): Ignore uninteresting
7949 relocations.
7950
7951 2002-06-06 Nick Clifton <nickc@cambridge.redhat.com>
7952
7953 * merge.c: Include libiberty.h.
7954 * elf-strtab.c: Include libiberty.h.
7955
7956 2002-06-06 Elias Athanasopoulos <eathan@otenet.gr>
7957
7958 * peXXigen.c (pe_print_idata): Remove unused variable.
7959
7960 2002-06-06 David Heine <dlheine@tensilica.com>
7961
7962 * elf.c (assign_file_positions_for_segments): Remove unallocated
7963 sections from the section to segment mapping for PT_LOAD segments.
7964 Update comment about empty loadable segments.
7965
7966 2002-06-06 Richard Sandiford <rsandifo@redhat.com>
7967
7968 * stabs.c (_bfd_link_section_stabs): Check that the symbol offset
7969 is within the .stabstr section.
7970
7971 2002-06-06 Alan Modra <amodra@bigpond.net.au>
7972
7973 * elf-bfd.h (struct elf_size_info <swap_symbol_in>): Function args
7974 are "const PTR", not "const PTR *".
7975 (bfd_elf32_swap_symbol_in): Likewise.
7976 (bfd_elf64_swap_symbol_in): Likewise.
7977 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR.
7978 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
7979 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
7980 (elf_link_add_object_symbols): Likewise.
7981 (elf_link_record_local_dynamic_symbol): Likewise.
7982 (elf_link_input_bfd): Likewise.
7983 (elf_gc_mark): Likewise.
7984 (elf_reloc_symbol_deleted_p): Likewise.
7985 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
7986 (mn10200_elf_relax_delete_bytes): Likewise.
7987 (mn10200_elf_symbol_address_p): Likewise.
7988 (mn10200_elf_get_relocated_section_contents): Likewise.
7989 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
7990 (mn10300_elf_relax_section): Likewise.
7991 (mn10300_elf_relax_delete_bytes): Likewise.
7992 (mn10300_elf_symbol_address_p): Likewise.
7993 (mn10300_elf_get_relocated_section_contents): Likewise.
7994 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
7995 (elf32_h8_relax_delete_bytes): Likewise.
7996 (elf32_h8_symbol_address_p): Likewise.
7997 (elf32_h8_get_relocated_section_contents): Likewise.
7998 * elf32-hppa.c (get_local_syms): Likewise.
7999 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
8000 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
8001 * elf32-sh.c (sh_elf_relax_section): Likewise.
8002 (sh_elf_relax_delete_bytes): Likewise.
8003 (sh_elf_get_relocated_section_contents): Likewise.
8004 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
8005 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
8006 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
8007 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
8008 * elf64-ppc.c (get_local_syms): Likewise.
8009 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
8010 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
8011
8012 2002-06-05 J"orn Rennecke <joern.rennecke@superh.com>
8013
8014 * config.bfd (sh64l*-*-elf*, shl*-*-elf*): New configurations.
8015
8016 2002-06-05 Alan Modra <amodra@bigpond.net.au>
8017
8018 * elf.c (group_signature): Swap in the whole symbol, and handle
8019 extracting section symbol names.
8020 (setup_group): Add comment.
8021 (set_group_contents): When called from objcopy or ld, arrange for
8022 section contents to be written. Write group member output section
8023 indices to allow objcopy to reorganize sections.
8024 (_bfd_elf_copy_private_section_data): Copy group info.
8025
8026 * elf-bfd.h (struct elf_size_info): Add swap_symbol_in field.
8027 (bfd_elf32_swap_symbol_in): Update prototype.
8028 (bfd_elf64_swap_symbol_in): Likewise.
8029 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR *.
8030 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
8031 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
8032 (elf_link_add_object_symbols): Likewise.
8033 (elf_link_record_local_dynamic_symbol): Likewise.
8034 (elf_link_input_bfd): Likewise.
8035 (elf_gc_mark): Likewise.
8036 (elf_reloc_symbol_deleted_p): Likewise.
8037 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
8038 (mn10200_elf_relax_delete_bytes): Likewise.
8039 (mn10200_elf_symbol_address_p): Likewise.
8040 (mn10200_elf_get_relocated_section_contents): Likewise.
8041 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
8042 (mn10300_elf_relax_section): Likewise.
8043 (mn10300_elf_relax_delete_bytes): Likewise.
8044 (mn10300_elf_symbol_address_p): Likewise.
8045 (mn10300_elf_get_relocated_section_contents): Likewise.
8046 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
8047 (elf32_h8_relax_delete_bytes): Likewise.
8048 (elf32_h8_symbol_address_p): Likewise.
8049 (elf32_h8_get_relocated_section_contents): Likewise.
8050 * elf32-hppa.c (get_local_syms): Likewise.
8051 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
8052 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
8053 * elf32-sh.c (sh_elf_relax_section): Likewise.
8054 (sh_elf_relax_delete_bytes): Likewise.
8055 (sh_elf_get_relocated_section_contents): Likewise.
8056 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
8057 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
8058 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
8059 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
8060 * elf64-ppc.c (get_local_syms): Likewise.
8061 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
8062 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
8063 * elfcode.h (NAME(_bfd_elf,size_info)): Update initialiser.
8064 * elf64-alpha.c (alpha_elf_size_info): Likewise.
8065 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
8066 * elf64-mips.c (mips_elf64_size_info): Likewise.
8067 * elf64-s390.c (s390_elf64_size_info): Likewise.
8068 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
8069
8070 2002-06-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
8071
8072 * elf32-mips.c (elf32_mips_ignore_discarded_relocs): Move to...
8073 elfxx-mips.c (_bfd_mips_elf_ignore_discarded_relocs): ... here.
8074 elf64-mips.c (elf_backend_ignore_discarded_relocs): Use
8075 _bfd_mips_elf_ignore_discarded_relocs.
8076 elfxx-mips.h (_bfd_mips_elf_ignore_discarded_relocs): Declare.
8077
8078 2002-06-05 H.J. Lu <hjl@gnu.org>
8079
8080 * elfxx-mips.c (mips_elf_calculate_relocation): Call
8081 _bfd_elf_rel_local_sym for STT_SECTION relocations against
8082 the SEC_MERGE section.
8083
8084 2002-06-05 Alan Modra <amodra@bigpond.net.au>
8085
8086 * coff-alpha.c: Update copyright date.
8087 * coff-mips.c: Likewise.
8088 * xcoff-target.h: Likewise.
8089
8090 * bfd-in.h: Remove "taken from the source" comment.
8091 * libbfd-in.h: Likewise.
8092 * libcoff-in.h: Likewise.
8093 * bfd-in2.h: Regenerate.
8094 * libbfd.h: Regenerate.
8095 * libcoff.h: Regenerate.
8096
8097 * elf.c (bfd_elf_discard_group): Return true.
8098 * elf-bfd.h (bfd_elf_discard_group): Declare.
8099 * bfd-in.h (bfd_elf_discard_group): Don't declare here.
8100 * section.c (bfd_discard_group): Rename to bfd_generic_discard_group.
8101 * bfd.c (bfd_discard_group): Define.
8102 * targets.c (struct bfd_target): Add _bfd_discard_group.
8103 (BFD_JUMP_TABLE_LINK): Here too.
8104 * libbfd-in.h (_bfd_nolink_bfd_discard_group): Define.
8105 * aout-adobe.c (aout_32_bfd_discard_group): Define.
8106 * aout-target.h (MY_bfd_discard_group): Define.
8107 * aout-tic30.c (MY_bfd_discard_group): Define.
8108 * binary.c (binary_bfd_discard_group): Define.
8109 * bout.c (b_out_bfd_discard_group): Define.
8110 * coff-alpha.c (_bfd_ecoff_bfd_discard_group): Define.
8111 * coffcode.h (coff_bfd_discard_group): Define.
8112 * coff-mips.c (_bfd_ecoff_bfd_discard_group): Define.
8113 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Define.
8114 * i386msdos.c (msdos_bfd_discard_group): Define.
8115 * i386os9k.c (os9k_bfd_discard_group): Define.
8116 * ieee.c (ieee_bfd_discard_group): Define.
8117 * ihex.c (ihex_bfd_discard_group): Define.
8118 * mmo.c (mmo_bfd_discard_group): Define.
8119 * nlm-target.h (nlm_bfd_discard_group): Define.
8120 * oasys.c (oasys_bfd_discard_group): Define.
8121 * ppcboot.c (ppcboot_bfd_discard_group): Define.
8122 * som.c (som_bfd_discard_group): Define.
8123 * srec.c (srec_bfd_discard_group): Define.
8124 * tekhex.c (tekhex_bfd_discard_group): Define.
8125 * versados.c (versados_bfd_discard_group): Define.
8126 * vms.c (vms_bfd_discard_group): Define.
8127 * xcoff-target.h (_bfd_xcoff_bfd_discard_group): Define.
8128 * coff64-rs6000.c (rs6000coff64_vec): Update initialiser.
8129 (aix5coff64_vec): Likewise.
8130 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Likewise.
8131
8132 2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
8133
8134 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-com.lo.
8135 (BFD32_BACKENDS_CFILES): Add elf32-sh64-com.c.
8136 (elf32-sh64-com.lo): New dependency list.
8137 * Makefile.in: Regenerate.
8138 * configure.in (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec)
8139 (bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec): Add
8140 elf32-sh64-com.lo.
8141 * configure: Regenerate.
8142 * elf32-sh64.c (sh64_address_in_cranges)
8143 (sh64_get_contents_type, sh64_address_is_shmedia): Move to...
8144 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb):
8145 (crange_bsearch_cmpl): Prepend _bfd_sh64_ to name and move to...
8146 * elf32-sh64-com.c: ...here. New file.
8147
8148 2002-06-04 Alan Modra <amodra@bigpond.net.au>
8149
8150 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Remove
8151 ATTRIBUTE_UNUSED on used params.
8152 * elf32-vax.c (elf_vax_gc_mark_hook): Remove unnecessary checks
8153 before calling bfd_section_from_elf_index on local syms.
8154 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
8155
8156 2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
8157
8158 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-nbsd.lo.
8159 (BFD32_BACKENDS_CFILES): Add elf32-sh64-nbsd.c.
8160 (BFD64_BACKENDS): Add elf64-sh64-nbsd.lo.
8161 (BFD64_BACKENDS_CFILES): Add elf64-sh64-nbsd.c.
8162 (elf32-sh64-nbsd.lo, elf64-sh64-nbsd.lo): New rules.
8163 * Makefile.in: Regenerate.
8164 * config.bfd (sh5le-*-netbsd*, sh5-*-netbsd*, sh64le-*-netbsd*)
8165 (sh64-*-netbsd*): New targets.
8166 * configure.in: Add bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec,
8167 bfd_elf64_sh64nbsd_vec, and bfd_elf64_sh64lnbsd_vec.
8168 * configure: Regenerate.
8169 * elf32-sh64-nbsd.c: New file.
8170 * elf64-sh64-nbsd.c: New file.
8171 * targets.c: Add extern decls for bfd_elf32_sh64nbsd_vec,
8172 bfd_elf32_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec, and
8173 bfd_elf64_sh64lnbsd_vec.
8174
8175 2002-06-04 Alan Modra <amodra@bigpond.net.au>
8176
8177 * elf.c (setup_group): Set SEC_LINK_ONCE on GRP_COMDAT groups.
8178 (bfd_section_from_shdr): Likewise. Set section name of group
8179 sections from signature.
8180 (group_signature): Split out from setup_group. Ensure symbol table
8181 is available.
8182 (bfd_elf_discard_group): New function.
8183 (_bfd_elf_make_section_from_shdr): Don't set SEC_LINK_ONCE on
8184 .gnu.linkonce* sections if they are members of a group.
8185 (set_group_contents): Set GRP_COMDAT flag.
8186 * section.c (bfd_discard_group): New function.
8187 * bfd-in.h (bfd_elf_discard_group): Declare.
8188 * bfd-in2.h: Regenerate.
8189 * elf-bfd.h (struct bfd_elf_section_data): Add linkonce_p field.
8190 (elf_linkonce_p): Define.
8191
8192 2002-06-04 Alan Modra <amodra@bigpond.net.au>
8193
8194 * elf.c (bfd_section_from_shdr): Make "name" const.
8195 * elf-bfd.h (elf_backend_section_from_shdr): Likewise.
8196 * elf32-i370.c (i370_elf_section_from_shdr): Likewise.
8197 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
8198 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
8199 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
8200 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
8201 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
8202 * elf64-ppc.c (ppc64_elf_section_from_shdr): Likewise.
8203 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
8204 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
8205 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
8206
8207 2002-06-03 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
8208
8209 * elfxx-mips.c (ABI_64_P): Use backend's data to determine the
8210 ABI.
8211
8212 2002-06-02 Kazu Hirata <kazu@cs.umass.edu>
8213
8214 * elf32-arc.c: Fix formatting.
8215 * elf32-arm.h: Likewise.
8216 * elf32-cris.c: Likewise.
8217 * elf32-dlx.c: Likewise.
8218 * elf32-hppa.c: Likewise.
8219 * elf32-i386.c: Likewise.
8220 * elf32-i386qnx.c: Likewise.
8221 * elf32-or32.c: Likewise.
8222 * elf32-s390.c: Likewise.
8223 * elf32-sh64.c: Likewise.
8224 * elf32-vax.c: Likewise.
8225 * elf32-xstormy16.c: Likewise.
8226 * elf64-alpha.c: Likewise.
8227 * elf64-mmix.c: Likewise.
8228 * elf64-ppc.c: Likewise.
8229 * elf64-s390.c: Likewise.
8230 * elf64-sh64.c: Likewise.
8231 * elf64-x86-64.c: Likewise.
8232
8233 2002-06-02 Richard Henderson <rth@redhat.com>
8234
8235 * elf64-alpha.c (elf64_alpha_relocate_section): Don't dereference
8236 null when there are no got entries for a symbol.
8237 (elf64_alpha_relax_find_tls_segment): Rearrange to avoid
8238 uninitialized variable warning.
8239
8240 2002-06-01 Richard Henderson <rth@redhat.com>
8241
8242 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Don't test for
8243 undefined symbols here.
8244 (elf64_alpha_relax_section): Do it here. Also test for not
8245 defined in the current module.
8246 (elf64_alpha_relocate_section_r): Split out of ...
8247 (elf64_alpha_relocate_section): ... here. Don't dereference
8248 NULL when looking up local got entries.
8249
8250 2002-06-01 Richard Henderson <rth@redhat.com>
8251
8252 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Reject undefined
8253 symbols from JSR relaxation.
8254 (elf64_alpha_size_plt_section_1): New.
8255 (elf64_alpha_calc_dynrel_sizes): Split out .rela.got bits ...
8256 (elf64_alpha_size_rela_got_1): ... here.
8257 (elf64_alpha_size_dynamic_sections): Split out .rela.got bits ...
8258 (elf64_alpha_size_rela_got_section): ... here.
8259 (elf64_alpha_size_plt_section): New.
8260 (elf64_alpha_relax_section): Call them.
8261 (elf64_alpha_size_got_sections): Remove output_bfd arg.
8262 (elf64_alpha_finish_dynamic_symbol): Check gotent use_count.
8263
8264 2002-06-01 Richard Henderson <rth@redhat.com>
8265
8266 * elf64-alpha.c (alpha_get_dtprel_base, alpha_get_tprel_base): New.
8267 (elf64_alpha_relocate_section): Use them. Reject LE TLS relocs
8268 in shared libraries. Fix DTPRELHI and TPRELHI value.
8269 (INSN_ADDQ, INSN_RDUNIQ): New.
8270 (struct alpha_relax_info): Add symtab_hdr, tls_segment, first_gotent.
8271 (elf64_alpha_relax_with_lituse): Return boolean. Remove irelend
8272 argument. Reject dynamic symbols. Use LITUSE symbolic constants.
8273 (elf64_alpha_relax_got_load): Rename from relax_without_lituse.
8274 Handle GOTDTPREL and GOTTPREL relocations.
8275 (elf64_alpha_relax_gprelhilo): New.
8276 (elf64_alpha_relax_tls_get_addr): New.
8277 (elf64_alpha_relax_find_tls_segment): New.
8278 (elf64_alpha_relax_section): Handle TLS relocations.
8279 (ALPHA_ELF_LINK_HASH_TLS_IE): New.
8280 (elf64_alpha_check_relocs): Set it.
8281
8282 2002-06-01 Richard Henderson <rth@redhat.com>
8283
8284 * elf64-alpha.c (elf64_alpha_relax_section): Don't store computed gp.
8285
8286 * elf64-alpha.c (elf64_alpha_check_relocs): Fix typo on maybe_dynamic
8287 check; don't suppress dynamic relocs for non-allocated sections.
8288
8289 * elf64-alpha.c: Remove dead code.
8290
8291 2002-05-31 Alan Modra <amodra@bigpond.net.au>
8292
8293 * bfd-in2.h: Regenerate.
8294 * libbfd.h: Regenerate.
8295 * po/SRC-POTFILES.in: Regenerate.
8296
8297 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate
8298 space for bss .plt.
8299
8300 2002-05-31 Graeme Peterson <gp@qnx.com>
8301
8302 * Makefile.am (BFD32_BACKENDS): Add elf32-i386qnx.lo.
8303 (BFD32_BACKENDS_CFILES): Add elf32-i386qnx.c.
8304 Run "make dep-am".
8305 * Makefile.in: Regenerate.
8306 * config.bfd: Add i[3456]86-*-nto-qnx* support.
8307 * configure.in: Add bfd_elf32_i386qnx_vec support.
8308 * configure: Regenerate.
8309 * elf-bfd.h (struct elf_backend_data): Add set_nonloadable_filepos,
8310 is_contained_by_filepos, and copy_private_bfd_data_p.
8311 * elf.c (assign_file_positions_for_segments): Call backend
8312 set_nonloadable_filepos. Fix non-K&R call to _bfd_error_handler.
8313 (IS_CONTAINED_BY_FILEPOS): Define.
8314 (INCLUDE_SECTION_IN_SEGMENT): Also test IS_CONTAINED_BY_FILEPOS.
8315 (copy_private_bfd_data): Use IS_CONTAINED_BY_FILEPOS. Typo fix.
8316 Fix non-K&R call to _bfd_error_handler.
8317 (_bfd_elf_copy_private_section_data): Use backend
8318 copy_private_bfd_data_p.
8319 * elf32-i386.c: Don't include elfxx-target.h when
8320 ELF32_I386_C_INCLUDED is defined.
8321 * elf32-i386qnx.c: New QNX elf backend file.
8322 * elfxx-target.h: Add elf_backend_set_nonloadable_filepos,
8323 elf_backend_is_contained_by_filepos, and
8324 elf_backend_do_copy_private_bfd_data.
8325 * targets.c: Add bfd_target bfd_elf32_i386qnx_vec.
8326
8327 2002-05-31 Alan Modra <amodra@bigpond.net.au>
8328
8329 * elfarm-oabi.c (bfd_elf32_arm_add_glue_sections_to_bfd): Define.
8330 Move other similar defines to start of file.
8331
8332 2002-05-30 Tom Rix <trix@redhat.com>
8333
8334 * coff-rs6000.c (xcoff_rtype2howto): Handle 16 bit R_RBA.
8335 * coff64-rs6000.c (xcoff64_rtype2howto): Same.
8336
8337 2002-05-30 Richard Henderson <rth@redhat.com>
8338
8339 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_TLSGD,
8340 ALPHA_ELF_LINK_HASH_LU_TLSLDM, ALPHA_ELF_LINK_HASH_LU_FUNC): New.
8341 (ALPHA_ELF_GOT_ENTRY_RELOCS_DONE): Remove.
8342 (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Remove.
8343 (struct alpha_elf_got_entry): Add reloc_type, reloc_done, reloc_xlated.
8344 (struct alpha_elf_obj_tdata): Rename total_got_entries and
8345 n_local_got_entries to total_got_size and local_got_size.
8346 (elf64_alpha_howto, elf64_alpha_reloc_map): Update for TLS relocs.
8347 (alpha_got_entry_size): New.
8348 (elf64_alpha_relax_with_lituse): Use it.
8349 (elf64_alpha_relax_without_lituse): Likewise.
8350 (MAX_GOT_SIZE): Rename from MAX_GOT_ENTRIES.
8351 (get_got_entry): New.
8352 (elf64_alpha_check_relocs): Handle TLS relocs. Reorganize.
8353 (elf64_alpha_adjust_dynamic_symbol): Test LU_FUNC as a mask.
8354 (elf64_alpha_merge_ind_symbols): Check gotent->reloc_type.
8355 (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots): Likewise.
8356 (elf64_alpha_calc_got_offsets_for_symbol): Use alpha_got_entry_size.
8357 (elf64_alpha_calc_got_offsets): Likewise.
8358 (alpha_dynamic_entries_for_reloc): New.
8359 (elf64_alpha_calc_dynrel_sizes): Use it.
8360 (elf64_alpha_size_dynamic_sections): Likewise.
8361 (elf64_alpha_relocate_section): Handle TLS relocations.
8362 * reloc.c: Add Alpha TLS relocations.
8363 * bfd-in2.h, libbfd.h: Rebuild.
8364
8365 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
8366
8367 * peXXigen.c (pe_print_idata): Remove double printed
8368 import table lines; add Bound-To comment.
8369
8370 2002-05-29 Matt Thomas <matt@3am-software.com>
8371
8372 * Makefile.am (BFD32_BACKENDS): Add elf32-vax.lo.
8373 (BFD32_BACKENDS_CFILES): Add elf32-vax.c.
8374 (elf32-vax.lo): New rule.
8375 * Makefile.in: Regenerate.
8376 * configure.in (bfd_elf32_vax_vec)
8377 (vaxnetbsd_vec): New vectors.
8378 * configure: Regenerate.
8379 * config.bfd (vax-*-netbsdelf*)
8380 (vax-*-netbsdaout*)
8381 (vax-*-netbsd*): New targets.
8382 * elf32-vax.c: New file.
8383 * reloc.c: Add VAX relocations.
8384 * bfd-in2.h: Regenerate.
8385 * targets.c (_bfd_target_vector): Add bfd_elf32_vax_vec.
8386
8387 2002-05-29 Jason Thorpe <thorpej@wasabisystems.com>
8388
8389 * config.bfd (arm-*-netbsd*): Add bfd_elf32_littlearm_vec
8390 and bfd_elf32_bigarm_vec to targ_selvecs.
8391
8392 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
8393
8394 * peXXigen.c (pe_print_idata): Fix seg faults on printing import tables
8395 with auto-imported symbols.
8396
8397 2002-05-29 Adam Nemet <anemet@lnxw.com>
8398
8399 * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Don't add glue
8400 sections only record bfd.
8401 (bfd_elf32_arm_add_glue_sections_to_bfd): New function.
8402 * bfd-in.h (bfd_elf32_arm_add_glue_sections_to_bfd): Declare it.
8403 * bfd-in2.h: Regenerate.
8404
8405 2002-05-28 Nick Clifton <nickc@cambridge.redhat.com>
8406
8407 * syms.c (_bfd_stab_section_find_nearest_line): Move
8408 declaration and initialisation of saw_line and saw_func out of
8409 for loop.
8410
8411 2002-05-29 Alan Modra <amodra@bigpond.net.au>
8412
8413 * elf64-ppc.c (ppc64_elf_get_symbol_info): New function.
8414 (bfd_elf64_get_symbol_info): Define.
8415 * elfxx-target.h (bfd_elfNN_get_symbol_info): Only define if undef.
8416
8417 2002-05-29 Andrey Volkov <avolkov@transas.com>
8418
8419 * cpu-h8300.c: Make default h8300 machine first in machine list.
8420
8421 2002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net>
8422
8423 * config.bfd: Added DLX configuraton.
8424 * Makefile.am: Added DLX configuraton.
8425 * configure.in: Added DLX configuraton.
8426 * archures.c: Add DLX architecure.
8427 * reloc.c: Add DLX relocs.
8428 * targets.c: Added DLX target vector.
8429 * configure: Regenerate.
8430 * Makefile.in: Regenreate.
8431 * bfd-in2.h: Regenreate.
8432 * elf32-dlx.c: New file: Support DLX target.
8433 * cpu-dlx.c: New file: Support DLX target.
8434
8435 2002-05-25 Alan Modra <amodra@bigpond.net.au>
8436
8437 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Formatting.
8438
8439 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Revert last change.
8440 (ppc64_elf_check_relocs): Don't set up function descriptor symbol
8441 strings to point inside function code sym string.
8442 (func_desc_adjust): Likewise.
8443 (ppc64_elf_hide_symbol): Rewrite code to look up function code sym.
8444
8445 2002-05-24 Michal Ludvig <mludvig@suse.cz>
8446
8447 * elf64-x86-64.c (elf64_x86_64_grok_prstatus): Added.
8448 (elf64_x86_64_grok_psinfo): Added.
8449
8450 2002-05-24 TAMURA Kent <kent@netbsd.org>
8451
8452 * config.bfd: Add a target for i386-netbsdpe.
8453
8454 2002-05-24 Alan Modra <amodra@bigpond.net.au>
8455
8456 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy is_func
8457 and is_func_descriptor.
8458 (func_desc_adjust): Hide function code sym in shared libs unless
8459 there is a matching exported function descriptor sym.
8460
8461 2002-05-23 Jakub Jelinek <jakub@redhat.com>
8462
8463 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_THREAD_LOCAL
8464 for symbols from SHF_TLS section.
8465 (_bfd_elf_print_private_bfd_data): Add PT_TLS.
8466 (elf_fake_sections): Set SHF_TLS for SEC_THREAD_LOCAL sections.
8467 (map_sections_to_segments): Build PT_TLS segment if necessary.
8468 (assign_file_positions_for_segments): Likewise.
8469 (get_program_header_size): Account for PT_TLS segment.
8470 (swap_out_syms): Set type of BSF_THREAD_LOCAL symbols and symbols from
8471 SEC_THREAD_LOCAL sections to STT_TLS.
8472 * reloc.c: Add 386 and IA-64 TLS relocs.
8473 * section.c (SEC_THREAD_LOCAL): Define.
8474 (SEC_CONSTRUCTOR_TEXT, SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS):
8475 Remove.
8476 * elflink.h (elf_link_add_object_symbols): Support .tcommon.
8477 (size_dynamic_sections): If DF_STATIC_TLS, set DF_FLAGS
8478 unconditionally.
8479 (struct elf_final_link_info): Add first_tls_sec.
8480 (elf_bfd_final_link): Set first_tls_sec.
8481 Compute elf_hash_table (info)->tls_segment.
8482 (elf_link_output_extsym): Handle STT_TLS symbols.
8483 (elf_link_input_bfd): Likewise.
8484 * syms.c (BSF_THREAD_LOCAL): Define.
8485 * bfd-in2.h: Rebuilt.
8486 * libbfd.h: Rebuilt.
8487 * elf32-i386.c (elf_i386_tls_transition, dtpoff_base, tpoff,
8488 elf_i386_mkobject, elf_i386_object_p): New functions.
8489 (elf_howto_table): Add TLS relocs.
8490 (elf_i386_reloc_type_lookup): Support TLS relocs.
8491 (elf_i386_info_to_howto_rel): Likewise.
8492 (struct elf_i386_link_hash_entry): Add tls_type.
8493 (struct elf_i386_obj_tdata): New.
8494 (elf_i386_hash_entry, elf_i386_tdata, elf_i386_local_got_tls_type):
8495 New macros.
8496 (struct elf_i386_link_hash_table): Add tls_ldm_got.
8497 (link_hash_newfunc): Clear tls_type.
8498 (elf_i386_check_relocs): Support TLS relocs.
8499 (elf_i386_gc_sweep_hook): Likewise.
8500 (allocate_dynrelocs): Likewise.
8501 (elf_i386_size_dynamic_sections): Likewise.
8502 (elf_i386_relocate_section): Likewise.
8503 (elf_i386_finish_dynamic_symbol): Likewise.
8504 (bfd_elf32_mkobject, elf_backend_object_p): Define.
8505 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add tprel_offset,
8506 dtpmod_offset, dtprel_offset, tprel_done, dtpmod_done, dtprel_done,
8507 want_tprel, want_dtpmod, want_dtprel.
8508 (elfNN_ia64_tprel_base, elfNN_ia64_dtprel_base): New functions.
8509 (ia64_howto_table): Add TLS relocs, rename R_IA64_LTOFF_TP22 to
8510 R_IA64_LTOFF_TPREL22.
8511 (elf_code_to_howto_index): Add TLS relocs.
8512 (elfNN_ia64_check_relocs): Support TLS relocs.
8513 (allocate_global_data_got): Account for TLS .got data.
8514 (allocate_dynrel_entries): Account for TLS dynamic relocations.
8515 (elfNN_ia64_install_value): Supprt TLS relocs.
8516 (set_got_entry): Support TLS relocs.
8517 (elfNN_ia64_relocate_section): Likewise.
8518
8519 2002-05-23 Nick Clifton <nickc@cambridge.redhat.com>
8520
8521 * elf32-arm.h (elf32_arm_final_link_relocate): For the Thumb
8522 BLX reloc round the relocation up rather than down.
8523 * coff-arm.c (coff_arm_relocate_section): Likewise.
8524
8525 2002-05-21 H.J. Lu (hjl@gnu.org)
8526
8527 * linker.c (_bfd_generic_link_add_one_symbol): Allow multiple
8528 definition.
8529
8530 2002-05-22 Alan Modra <amodra@bigpond.net.au>
8531
8532 * elf64-ppc.c (ppc64_elf_size_stubs): Don't strip .branch_lt.
8533 (ppc64_elf_relocate_section): Handle unresolved relocs in opd.
8534
8535 2002-05-22 Alan Modra <amodra@bigpond.net.au>
8536
8537 * elf64-ppc.c (ppc64_elf_relocate_section): Return false for
8538 unresolved relocs.
8539 (ppc64_elf_size_dynamic_sections): Check for splt NULL.
8540
8541 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8542
8543 * bfd.c (bfd_get_arch_size): Remove bfd_set_error call for
8544 non-ELF targets.
8545
8546 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8547
8548 * elf-bfd.h (elf_backend_emit_relocs): Change prototype to return
8549 an error value.
8550 * elflink.h (elf_link_output_relocs): Likewise. Improve error message.
8551 return with false on error.
8552 (elf_link_input_bfd): Check reloc_emitter return value.
8553
8554 2002-05-21 Jason Thorpe <thorpej@wasabisystems.com>
8555
8556 * config.bfd (armeb-*-netbsdelf*): New target.
8557
8558 2002-05-20 Alan Modra <amodra@bigpond.net.au>
8559
8560 * elf64-ppc.c (ppc_build_one_stub): Point undefined function syms
8561 at the plt call stub.
8562
8563 2002-05-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8564
8565 * cpu-mips.c (mips_compatible): Don't try to check machine
8566 compatibility.
8567
8568 2002-05-18 Tom Rix <trix@redhat.com>
8569
8570 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_out): Fix C_FILE auxent.
8571
8572 2002-05-17 Alan Modra <amodra@bigpond.net.au>
8573
8574 * elf64-ppc.c (ppc64_elf_info_to_howto): Formatting.
8575 (ppc64_elf_relocate_section): Don't warn about reloc overflow when
8576 we've already warned about an undefined symbol. Report more
8577 detail on reloc errors.
8578
8579 2002-05-17 Alan Modra <amodra@bigpond.net.au>
8580
8581 * acinclude.m4 (AM_INSTALL_LIBBFD): New.
8582 * configure.in: Invoke AM_INSTALL_LIBBFD.
8583 * Makefile.am (install-data-local): Revert 2002-05-13. Move to..
8584 (install_libbfd): .. New target.
8585 (uninstall_libbfd): Likewise.
8586 (install-bfdlibLTLIBRARIES): Likewise.
8587 (uninstall-bfdlibLTLIBRARIES): Likewise.
8588 (bfdlibdir): New.
8589 (bfdincludedir): New.
8590 (lib_LTLIBRARIES): Rename to bfdlib_LTLIBRARIES.
8591 * aclocal.m4: Regenerate.
8592 * configure: Regenerate.
8593 * Makefile.in: Regenerate.
8594
8595 2002-05-17 Stuart Balfour <sbalfour@cisco.com>
8596
8597 * hash.c (bfd_hash_lookup): Remove computation of len from inside
8598 hash loop.
8599
8600 2002-05-16 Nick Clifton <nickc@cambridge.redhat.com>
8601
8602 * config.bfd: Add targets for sh64-linux (little endian and
8603 big endian).
8604
8605 2002-05-15 Laurent Pinchart <laurent.pinchart@skynet.be>
8606
8607 * peXXigen.c (pe_print_idata): Do not assume that the first thunk
8608 is located in the same section as the import table. Instead
8609 check, and if necessary load the section containing the thunk.
8610
8611 2002-05-15 Nick Clifton <nickc@cambridge.redhat.com>
8612
8613 * aix5ppc-core.c (xcoff64_core_p): Replace bfd_read with
8614 bfd_bread.
8615 (xcoff64_core_file_matches_executable_p): Replace bfd_read
8616 with bfd_bread.
8617
8618 2002-05-15 Alan Modra <amodra@bigpond.net.au>
8619
8620 * aix5ppc-core.c: Warning fixes.
8621 * aout-adobe.c (aout_32_bfd_link_just_syms): Define.
8622 * aout-target.h (MY_bfd_link_just_syms): Define.
8623 * aout-tic30.c (MY_bfd_link_just_syms): Define.
8624 * bfd.c (bfd_link_just_syms): Define.
8625 * binary.c (binary_bfd_link_just_syms): Define.
8626 * bout.c (b_out_bfd_link_just_syms): Define.
8627 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update initializer.
8628 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
8629 * coffcode.h (coff_bfd_link_just_syms): Define.
8630 * elf-bfd.h (enum elf_link_info_type): Add ELF_INFO_TYPE_JUST_SYMS.
8631 (elf_discarded_section): Check for ELF_INFO_TYPE_JUST_SYMS.
8632 (_bfd_elf_link_just_syms): Declare.
8633 * elf.c (_bfd_elf_link_just_syms): New function.
8634 * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Check that
8635 sections haven't already been discarded by the linker.
8636 * elflink.h (elf_link_add_object_symbols): Likewise for stab
8637 sections and SEC_MERGE sections.
8638 (elf_bfd_discard_info): Similarly here.
8639 * elfxx-target.h (bfd_elfNN_bfd_link_just_syms): Define.
8640 * i386msdos.c (msdos_bfd_link_just_syms): Define.
8641 * i386os9k.c (os9k_bfd_link_just_syms): Define.
8642 * ieee.c (ieee_bfd_link_just_syms): Define.
8643 * ihex.c (ihex_bfd_link_just_syms): Define.
8644 * libbfd-in.h (_bfd_nolink_bfd_link_just_syms): Define.
8645 (_bfd_generic_link_just_syms): Declare.
8646 * libecoff.h (_bfd_ecoff_bfd_link_just_syms): Define.
8647 * linker.c (_bfd_generic_link_just_syms): New function.
8648 * mmo.c (mmo_bfd_link_just_syms): Define.
8649 * nlm-target.h (nlm_bfd_link_just_syms): Define.
8650 * oasys.c (oasys_bfd_link_just_syms): Define.
8651 * ppcboot.c (ppcboot_bfd_link_just_syms): Define.
8652 * som.c (som_bfd_link_just_syms): Define.
8653 * srec.c (srec_bfd_link_just_syms): Define.
8654 * targets.c (struct bfd_target): Add _bfd_link_just_syms.
8655 (BFD_JUMP_TABLE_LINK): And here.
8656 * tekhex.c (tekhex_bfd_link_just_syms): Define.
8657 * versados.c (versados_bfd_link_just_syms): Define.
8658 * vms.c (vms_bfd_link_just_syms): Define.
8659 * libbfd.h: Regenerate.
8660 * bfd-in2.h: Regenerate.
8661
8662 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8663
8664 * elf32-mips.c: Remove superfluous definitions copied from
8665 elfxx-mips.c.
8666 (bfd_elf32_bigmips_vec,bfd_elf32_littlemips_vec): Use the
8667 SGIish vectors to check the special case.
8668 (mips_elf_hi16_reloc): Fix comment.
8669 (mips_elf_got16_reloc): Likewise.
8670 (_bfd_mips_elf32_gprel16_reloc): Likewise.
8671 (elf_reloc_map): Code cleanup.
8672 (mips_reloc_map): Add comment.
8673 (bfd_elf23_bfd_reloc_type_lookup): Code cleanup.
8674 (mips_elf32_rtype_to_howto): Likewise.
8675 (mips_elf32_discard_info): Likewise.
8676 (elf32_mips_irix_compat): Invert logic: Only SGIish vectors
8677 lead to IRIX compatibility now.
8678
8679 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8680
8681 * elfxx-mips.c: Call it IRIX, not Irix in comments.
8682
8683 2002-05-13 Jason Thorpe <thorpej@wasabisystems.com>
8684
8685 * config.bfd (shle-*-netbsdelf*): Add target which includes
8686 sh64 support.
8687
8688 2002-05-13 David Edelsohn <edelsohn@gnu.org>
8689
8690 * configure.in: Revert 2002-04-07. Instead, auto-configure
8691 HAVE_ST_C_IMPL.
8692 * configure: Regenerate.
8693 * config.in: Regenerate.
8694 * rs6000-core.c (CNEW_IMPL): Guard use of c_impl with HAVE_ST_C_IMPL
8695 or AIX_5_CORE.
8696
8697 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
8698
8699 * configure.in (sparc*-*-openbsd*): Support sparc64-openbsd
8700 corefiles as well.2
8701 * configure: Regenerate.
8702
8703 2002-05-13 Alan Modra <amodra@bigpond.net.au>
8704
8705 * Makefile.am (install-data-local): Install headers to
8706 $(exec_prefix)/include.
8707 * Makefile.in: Regenerate.
8708
8709 2002-05-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
8710 Daniel Jacobowitz <drow@mvista.com>
8711
8712 * coff-sh.c (sh_reloc_map): Map to R_SH_IMM32 for non-PE. Don't
8713 map BFD_RELOC_RVA.
8714
8715 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
8716
8717 * config.bfd (alpha*-*-openbsd*, sparc64*-*-openbsd*,
8718 hppa*-*-openbsd*): New targets.
8719 * configure.in (alpha*-*-openbsd*): Set COREFILE.
8720 * configure: Regenerate.
8721
8722 2002-05-10 Tom Rix <trix@redhat.com>
8723
8724 * coff64-rs6000.c (xcoff64_reloc_type_br): New function for
8725 xcoff64_ppc_relocate_section.
8726 * coff-rs6000.c : Extern common xcoff_reloc_type functions.
8727 * libxcoff.h: Common xcoff_reloc_type function declaration.
8728
8729 2002-05-10 Alan Modra <amodra@bigpond.net.au>
8730
8731 * elf32-i386.c (elf_i386_relocate_section): Remove overflow checks
8732 added in 2002-05-09 commit.
8733
8734 * elf32-hppa.c (elf32_hppa_size_stubs): Revert part of 2002-05-04,
8735 don't look for stubs on all undefined syms.
8736
8737 2002-05-09 Alan Modra <amodra@bigpond.net.au>
8738
8739 * elf64-ppc.c (RA_REGISTER_MASK, RA_REGISTER_SHIFT): Delete.
8740 (ppc64_elf_howto_raw <R_PPC64_RELATIVE>): Not pc_relative or
8741 pcrel_offset.
8742
8743 * elf32-i386.c (elf_howto_table): Comments.
8744 (elf_i386_relocate_section): Handle more relocs for relocatable
8745 linking and against SEC_MERGE sections.
8746
8747 2002-05-08 Alan Modra <amodra@bigpond.net.au>
8748
8749 * elf32-ppc.c (ppc_elf_create_got): New function.
8750 (ppc_elf_create_dynamic_sections): Call ppc_elf_create_got before
8751 _bfd_elf_create_dynamic_sections. Correct .plt flags.
8752 (ppc_elf_check_relocs): Use ppc_elf_create_got in place of
8753 _bfd_elf_create_got_section.
8754
8755 2002-05-07 Alan Modra <amodra@bigpond.net.au>
8756
8757 * elf-bfd.h (struct elf_backend_data): Add rela_normal.
8758 * elfxx-target.h (elf_backend_rela_normal): Define.
8759 (elfNN_bed): Init rela_normal.
8760 * elflink.h (elf_link_input_bfd <emit_relocs>): Handle adjustment
8761 for section symbols here if rela_normal. Simplify abs section test.
8762 * elf-m10200.c (mn10200_elf_relocate_section): If relocatable,
8763 return immediately. Remove code handling relocatable linking.
8764 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
8765 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
8766 * elf32-i370.c (i370_elf_relocate_section): Likewise.
8767 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
8768 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
8769 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
8770 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
8771 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
8772 * elf32-s390.c (elf_s390_relocate_section): Likewise.
8773 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
8774 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
8775 * elf64-s390.c (elf_s390_relocate_section): Likewise.
8776 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
8777 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
8778 * elf32-arm.h (elf32_arm_relocate_section): Likewise #ifndef USE_REL.
8779 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
8780 * elf-m10200.c (elf_backend_rela_normal): Define.
8781 * elf-m10300.c (elf_backend_rela_normal): Define.
8782 * elf32-fr30.c (elf_backend_rela_normal): Define.
8783 * elf32-i370.c (elf_backend_rela_normal): Define.
8784 * elf32-i860.c (elf_backend_rela_normal): Define.
8785 * elf32-m68k.c (elf_backend_rela_normal): Define.
8786 * elf32-mcore.c (elf_backend_rela_normal): Define.
8787 * elf32-openrisc.c (elf_backend_rela_normal): Define.
8788 * elf32-ppc.c (elf_backend_rela_normal): Define.
8789 * elf32-s390.c (elf_backend_rela_normal): Define.
8790 * elf32-xstormy16.c (elf_backend_rela_normal): Define.
8791 * elf64-ppc.c (elf_backend_rela_normal): Define.
8792 * elf64-s390.c (elf_backend_rela_normal): Define.
8793 * elf64-x86-64.c (elf_backend_rela_normal): Define.
8794 * elfxx-ia64.c (elf_backend_rela_normal): Define.
8795 * elf32-arm.h (elf_backend_rela_normal): Define #ifndef USE_REL.
8796 * elf32-m32r.c (elf_backend_rela_normal): Likewise.
8797
8798 2002-05-06 Nick Clifton <nickc@cambridge.redhat.com>
8799
8800 * elf32-arm.h (elf32_arm_final_link_relocate): Convert
8801 'reloc_signed_max' and 'reloc_signed_min' into half-word offsets.
8802
8803 2002-05-06 Alan Modra <amodra@bigpond.net.au>
8804
8805 * elflink.h (elf_link_input_bfd <emit_relocs>): Adjust r_offset
8806 when not relocatable. Fix reloc_emitter call for K&R.
8807
8808 2002-05-04 Alan Modra <amodra@bigpond.net.au>
8809
8810 * elf64-ppc.c (ppc64_elf_relocate_section): Reinstate code
8811 reloading local sym addend mistakenly removed in 2002-05-01 change.
8812
8813 * dwarf2.c (struct line_head): Make prologue_length a bfd_vma.
8814 (read_abbrevs): Change "offset" param to bfd_vma.
8815 (parse_comp_unit): Change "version" and addr_size to unsigned ints.
8816 Change "abbrev_offset" to bfd_vma.
8817 (read_indirect_string): Use correct conversion chars in error
8818 message format string, cast bfd_vma's to unsigned long.
8819 (read_abbrevs): Likewise.
8820 (read_attribute_value): Likewise.
8821 (decode_line_info): Likewise.
8822 (scan_unit_for_functions): Likewise.
8823 (parse_comp_unit): Likewise.
8824
8825 2002-05-04 Tom Rix <trix@redhat.com>
8826
8827 * coffswap.h (coff_swap_reloc_in): Remove XCOFF support.
8828 (coff_swap_reloc_out): Same.
8829 * coff-rs6000.c: (xcoff_swap_reloc_in): Moved from coffswap.h.
8830 (xcoff_swap_reloc_out): Same.
8831 (xcoff_rtype2howto): Renamed from _bfd_xcoff_rtype2howto. Special
8832 case some 16 bit relocs. Add reloc value to output.
8833 (xcoff_howto_table): Remove 64 bit R_POS, add 16 bit
8834 R_RBR. Improve names.
8835 (_bfd_xcoff_reloc_type_lookup): Adjust for removal of 64 bit R_POS.
8836 (bfd_xcoff_backend_data): Update with new reloc swap names.
8837 (bfd_pmac_xcoff_backend_data) : Same.
8838 * coff64-rs6000.c: (xcoff64_swap_reloc_in): Moved from coffswap.h.
8839 (xcoff64_swap_reloc_out): Same.
8840 (xcoff64_rtype2howto): Special case some 16 bit relocs and 32 bit
8841 R_POS. Add reloc value to output.
8842 (xcoff64_howto_table): Move 64 bit R_POS to first entry. Add 16
8843 bit R_RBR. Improve names, masks.
8844 (xcoff64_reloc_type_lookup): Adjust for move of 64 bit R_POS.
8845 (bfd_xcoff_backend_data): Update with new reloc swap names.
8846 (bfd_xcoff_aix5_backend_data) : Same.
8847
8848 2002-05-04 Alan Modra <amodra@bigpond.net.au>
8849
8850 * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add
8851 bfd_count top_index, input_list, all_local_syms.
8852 (elf32_hppa_setup_section_lists): New function, split from
8853 elf32_hppa_size_stubs.
8854 (elf32_hppa_next_input_section): Likewise.
8855 (group_sections): Likewise.
8856 (get_local_syms): Likewise.
8857 (elf32_hppa_size_stubs): Adjust for split out functions. Look for
8858 stubs on undefined syms too.
8859 (elf32_hppa_set_gp): Use bfd_link_hash* instead of elf_link_hash*.
8860 Only access htab elf fields when we have an elf hash table.
8861 * elf32-hppa.h (elf32_hppa_setup_section_lists): Declare.
8862 (elf32_hppa_next_input_section): Declare.
8863
8864 2002-05-04 Bob Byrnes <byrnes@curl.com>
8865
8866 * opncls.c (_bfd_new_bfd_contained_in): Check return value of
8867 _bfd_new_bfd.
8868
8869 2002-05-03 H.J. Lu (hjl@gnu.org)
8870
8871 * elfxx-mips.c (mips_elf_link_hash_entry): Add forced_local.
8872 (mips_elf_link_hash_newfunc): Initialize forced_local to false.
8873 (mips_elf_record_global_got_symbol): Call _bfd_mips_elf_hide_symbol
8874 to hide a global symbol.
8875 (_bfd_mips_elf_hide_symbol): Return if forced_local is true. Set
8876 forced_local to true.
8877
8878 2002-05-02 Richard Henderson <rth@redhat.com>
8879
8880 * elf64-alpha.c (elf64_alpha_relocate_section): Force relative relocs
8881 vs SHN_UNDEF to zero.
8882
8883 2002-05-02 Alan Modra <amodra@bigpond.net.au>
8884
8885 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_SECTOFF>): Change to a
8886 16 bit reloc.
8887 <R_PPC64_SECTOFF_DS>: Likewise.
8888 (ppc64_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
8889 SECTOFF reloc.
8890 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_SECTOFF>): Correct.
8891 (ppc_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
8892 SECTOFF reloc.
8893
8894 * elf64-ppc.c (ppc64_elf_addr16_ha_reloc): Delete.
8895 (ppc64_elf_ha_reloc): New function.
8896 (ppc64_elf_brtaken_reloc): New function.
8897 (ppc64_elf_sectoff_reloc): New function.
8898 (ppc64_elf_sectoff_ha_reloc): New function.
8899 (ppc64_elf_toc_reloc): New function.
8900 (ppc64_elf_toc_ha_reloc): New function.
8901 (ppc64_elf_toc64_reloc): New function.
8902 (ppc64_elf_unhandled_reloc): New function.
8903 (ppc64_elf_howto_raw): Use the above.
8904 <R_PPC64_RELATIVE>: Mark pc_relative, pcrel_offset.
8905 <R_PPC64_SECTOFF>: Not pc_relative or pcrel_offset. Fix dst_mask.
8906 <R_PPC64_SECTOFF_DS>: Likewise.
8907 (IS_ABSOLUTE_RELOC): Update.
8908 (struct ppc_link_hash_table): Add have_undefweak.
8909 (ppc64_elf_link_hash_table_create): Init.
8910 (func_desc_adjust): Set have_undefweak.
8911 (ppc64_elf_func_desc_adjust): Call func_desc_adjust earlier. Only
8912 add the .sfpr blr when have_undefweak.
8913 (ppc64_elf_setup_section_lists): Check hash table flavour.
8914 (ppc64_elf_next_input_section): Move output_section->owner test to
8915 ppc64elf.em.
8916 (ppc64_elf_set_toc): Rename to ppc64_elf_toc, remove info param
8917 and relocatable test. Return TOCstart and don't set elf_gp.
8918 (ppc64_elf_relocate_section): Correct BRTAKEN/BRNTAKEN branch
8919 offset calculation. Add assert on weak sym branch tweaks.
8920 * elf64-ppc.h (ppc64_elf_set_toc): Delete.
8921 (ppc64_elf_toc): Declare.
8922 (ppc64_elf_next_input_section): Update.
8923
8924 2002-05-01 Alan Modra <amodra@bigpond.net.au>
8925
8926 * syms.c (_bfd_stab_section_find_nearest_line): Don't bomb on NULL
8927 file_name.
8928
8929 2002-05-01 Alan Modra <amodra@bigpond.net.au>
8930
8931 * elf64-ppc.c (CROR_151515, CROR_313131): Define.
8932 (ppc64_elf_relocate_section): Use them. Don't look for plt calls
8933 on R_PPC64_ADDR24 relocs. Require a nop or no link reg on plt
8934 call branches. Correct undefined weak destination.
8935 (ppc64_elf_func_desc_adjust): Always create at least one blr in
8936 .sfpr, and correct case where either only savef* or restf* is
8937 needed.
8938
8939 Long branch stubs, multiple stub sections.
8940 * elf64-ppc.h (ppc64_elf_setup_section_lists): Declare.
8941 (ppc64_elf_next_input_section): Declare.
8942 * elf64-ppc.c: Move linker-only prototypes.
8943 (STUB_SUFFIX): Define.
8944 (enum ppc_stub_type): New.
8945 (struct ppc_stub_hash_entry): New.
8946 (struct ppc_branch_hash_entry): New.
8947 (struct ppc_link_hash_entry): Add stub_cache, oh.
8948 (struct ppc_link_hash_table): Add stub_hash_table etc. Remove
8949 sstub. Add sbrlt, srelbrlt, has_14bit_branch, stub_iteration.
8950 Rename plt_overflow to stub_error.
8951 (ppc_stub_hash_lookup): Define.
8952 (ppc_branch_hash_lookup): Define.
8953 (stub_hash_newfunc): New function.
8954 (branch_hash_newfunc): New function.
8955 (link_hash_newfunc): Init new fields.
8956 (ppc64_elf_link_hash_table_create): Likewise.
8957 (ppc64_elf_link_hash_table_free): New function.
8958 (ppc_stub_name): New function.
8959 (ppc_get_stub_entry): New function.
8960 (ppc_add_stub): New function.
8961 (create_linkage_sections): Use bfd_make_section_anyway. Create
8962 .branch_lt and .rela.branch_lt sections. Don't create .stub.
8963 (ppc64_elf_check_relocs): Set has_14bit_branch on R_PPC64_REL14*,
8964 and set up for plt call stubs. Link func and func desc syms.
8965 (ppc64_elf_gc_sweep_hook): Handle REL14* as per REL24.
8966 (func_desc_adjust): Avoid hash lookup when func desc sym available
8967 via shortcut, and set links when processing.
8968 (ppc64_elf_hide_symbol): Likewise.
8969 (allocate_dynrelocs): Don't allocate stub section here.
8970 (ppc64_elf_size_dynamic_sections): Handle sbrlt and srelbrlt.
8971 Remove sstub code.
8972 (ppc_type_of_stub): New function.
8973 (build_one_stub): Delete.
8974 (ppc_build_one_stub): New function.
8975 (ppc_size_one_stub): New function.
8976 (ppc64_elf_setup_section_lists): New function.
8977 (ppc64_elf_next_input_section): New function.
8978 (group_sections): New function.
8979 (get_local_syms): New function.
8980 (ppc64_elf_size_stubs): Rewrite.
8981 (ppc64_elf_build_stubs): Rewrite.
8982 (ppc64_elf_relocate_section): Look up stub entry for REL24
8983 relocs. Don't propagate REL14* to dynamic objects. Look for long
8984 branch stubs if REL14* or REL24 relocs won't reach.
8985 (bfd_elf64_bfd_link_hash_table_free): Define.
8986
8987 2002-04-30 Mark Mitchell <mark@codesourcery.com>
8988
8989 * config.bfd: Add support for powerpc-*-windiss.
8990
8991 2002-04-30 Tom Rix <trix@redhat.com>
8992
8993 * xcofflink.c (xcoff_link_add_symbols): Always copy undef C_EXT
8994 symbol names into the hash table.
8995
8996 2002-04-28 Tom Rix <trix@redhat.com>
8997
8998 * coff-rs6000.c (xcoff_calculate_relocation) : Function table for
8999 calulating relocations.
9000 (xcoff_complain_overflow) : Function table for relocation errors.
9001 (xcoff_ppc_relocate_section): Use relocation and complain function
9002 tables.
9003 (xcoff_complain_overflow_unsigned_func): New complain function.
9004 (xcoff_complain_overflow_signed_func): Same.
9005 (xcoff_complain_overflow_bitfield_func): Same.
9006 (xcoff_complain_overflow_dont_func): Same.
9007 (xcoff_reloc_type_crel): New recot function.
9008 (xcoff_reloc_type_br): Same.
9009 (xcoff_reloc_type_ba): Same.
9010 (xcoff_reloc_type_toc): Same.
9011 (xcoff_reloc_type_rel): Same.
9012 (xcoff_reloc_type_neg): Same.
9013 (xcoff_reloc_type_pos): Same.
9014 (xcoff_reloc_type_fail): Same.
9015 (xcoff_reloc_type_noop): Same.
9016 * libxcoff.h : Declare common parts for xcoff64.
9017 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Use relocation
9018 and complain function tables.
9019
9020 2002-04-28 Alan Modra <amodra@bigpond.net.au>
9021
9022 * elf64-x86-64.c (struct elf64_x86_64_dyn_relocs): Comment typo.
9023 * elf32-hppa.c (elf32_hppa_final_link): Formatting.
9024
9025 2002-04-26 Alan Modra <amodra@bigpond.net.au>
9026
9027 * opncls.c (bfd_make_readable): Call bfd_section_list_clear.
9028 * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
9029
9030 * elflink.h (elf_bfd_final_link): Ensure input bfd class is the
9031 same as the output before calling elf_link_input_bfd.
9032
9033 * coffcode.h (coff_compute_section_file_positions): Set
9034 section_tail after shuffling section list.
9035
9036 2002-04-24 Christian Groessler <chris@groessler.org>
9037
9038 * coff-z8k.c (extra_case): Fix R_IMM32 relocations: The
9039 addresses are 23bit with a special layout, not plain 32bit
9040 values. Prevent relocation of immediate values.
9041
9042 2002-04-24 Chris G. Demetriou <cgd@broadcom.com>
9043
9044 * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): If MDMX or
9045 MIPS-16 ASE flags are set, print something to indicate that.
9046
9047 2002-04-23 Alan Modra <amodra@bigpond.net.au>
9048
9049 * elf32-hppa.c (hppa_type_of_stub): Correct and simplify condition
9050 under which a plt call stub is used.
9051 (final_link_relocate): Similarly.
9052 (allocate_plt_static): Clear h-plabel except when plt entry is
9053 exclusively used for a plabel.
9054 (allocate_dynrelocs): Use the above to simplify plt sizing.
9055 (struct elf32_hppa_link_hash_table): Add has_22bit_branch.
9056 (elf32_hppa_link_hash_table_create): Init.
9057 (BL22_RP): Define.
9058 (hppa_build_one_stub): Use BL22_RP if has_22bit_branch.
9059 (elf32_hppa_check_relocs): Set has_22bit_branch.
9060
9061 * elf32-hppa.c (elf32_hppa_check_relocs): Remove debug message.
9062 (final_link_relocate): Likewise.
9063
9064 2002-04-22 Jakub Jelinek <jakub@redhat.com>
9065
9066 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't build
9067 search table if some FDE is DW_EH_PE_aligned encoded either.
9068 (_bfd_elf_write_section_eh_frame): Handle terminating FDE specially.
9069
9070 2002-04-22 Richard Smith <richard@ex-parrot.com>
9071 Jakub Jelinek <jakub@redhat.com>
9072
9073 * elf-eh-frame.c (struct eh_cie_fde): Add per_encoding_relative.
9074 (_bfd_elf_discard_section_eh_frame): Set it for CIEs with pcrel
9075 encoded personality.
9076 (_bfd_elf_write_section_eh_frame): Adjust pcrel encoded personality
9077 for CIE/FDE removal.
9078
9079 2002-04-20 Tom Rix <trix@redhat.com>
9080
9081 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Fix C_FILE auxent.
9082
9083 2002-04-20 Alan Modra <amodra@bigpond.net.au>
9084
9085 * archures.c (bfd_lookup_arch): Move the list order comment..
9086 (struct bfd_arch_info): ..to where it belongs.
9087 * bfd-in2.h: Regenerate.
9088
9089 * archures.c (bfd_lookup_arch): Add comment on list order.
9090 (bfd_default_set_arch_mach): Use bfd_lookup_arch.
9091 * cpu-powerpc.c (bfd_powerpc_archs): Re-order so that the default
9092 is always at head of list.
9093
9094 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
9095
9096 * coff-arm.c (coff_thumb_pcrel_12, coff_thumb_pcrel_9,
9097 insert_thumb_branch, record_thumb_to_arm_glue): Suppress
9098 definition of these functions for ARM_WINCE builds as they are
9099 not used.
9100 (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET): Do not define
9101 for ARM_WINCE builds.
9102
9103 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
9104
9105 * coff-arm.c (bfd_arm_process_before_allocation):
9106
9107 2002-04-17 J"orn Rennecke <joern.rennecke@superh.com>
9108
9109 * cpu-sh.c (scan_mach): Delete.
9110 (arch_info_struct): Replace scan_mach with bfd_default_scan.
9111 (bfd_sh_arch): Likewise.
9112
9113 2002-04-16 Nick Clifton <nickc@cambridge.redhat.com>
9114
9115 * ihex.c (ihex_write_object_contents): Fix check for records
9116 crossing 64K boundaries.
9117
9118 2002-04-16 Alan Modra <amodra@bigpond.net.au>
9119
9120 * elf32-m32r.c (m32r_elf_add_symbol_hook): Check the hash table
9121 type rather than just assuming entries are ELF.
9122 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
9123 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
9124 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Likewise.
9125 * elf64-mmix.c (mmix_elf_add_symbol_hook): Use bfd_link_hash_entry
9126 rather than elf_link_hash_entry.
9127
9128 2002-04-15 Richard Henderson <rth@redhat.com>
9129
9130 * elf32-mips.c (mips_elf32_object_p): Revert 0404 fragment: allow
9131 n32 binaries.
9132
9133 2002-04-15 Michael Snyder <msnyder@redhat.com>
9134
9135 * opncls.c (bfd_close): Write contents if writeable.
9136 Minor formatting tidy-ups.
9137
9138 2002-04-15 Alan Modra <amodra@bigpond.net.au>
9139
9140 * elf32-ppc.c (ppc_elf_add_symbol_hook): Check the hash table type.
9141
9142 2002-04-12 Michael Snyder <msnyder@redhat.com>
9143
9144 * bfd-in.h (bfd_get_section_lma): New access macro.
9145 Minor white-space fix-up.
9146
9147 2002-04-12 Alan Modra <amodra@bigpond.net.au>
9148
9149 * elf.c (prep_headers): Don't zero EI_OSABI, EI_ABIVERSION or
9150 header pad.
9151
9152 2002-04-09 DJ Delorie <dj@redhat.com>
9153
9154 * elfarm-nabi.c (elf32_arm_howto_table): Fix ABS16 masks.
9155
9156 2002-04-09 Casper S. Hornstrup <chorns@users.sourceforge.net>
9157
9158 * coffcode.h (coff_read_word): New.
9159 (coff_compute_checksum): New.
9160 (coff_apply_checksum): New.
9161 (coff_write_object_contents): Call coff_apply_checksum () to
9162 apply checksum to PE image.
9163
9164 2002-04-08 Randolph Chung <tausq@debian.org>
9165
9166 * elf32-hppa.c (hppa_unwind_entry_compare): Move to elf-hppa.h.
9167 (elf32_hppa_final_link): Split out sorting logic to..
9168 * elf-hppa.h (elf_hppa_sort_unwind): ..here.
9169 (elf_hppa_final_link): Call elf_hppa_sort_unwind.
9170
9171 2002-04-07 Andrew Cagney <ac131313@redhat.com>
9172
9173 * configure.in: Add missing ``|'' to powerpc-*-aix4.[4-9]*
9174 pattern.
9175 * configure: Re-generate.
9176
9177 2002-04-07 Andrew Cagney <ac131313@redhat.com>
9178
9179 * configure.in: Only define AIX_CORE_DUMPX_CORE when AIX version
9180 is greater or equal to 4.3.3.
9181 * configure: Regenerate.
9182 Fix PR gdb/344.
9183
9184 2002-04-05 Hans-Peter Nilsson <hp@axis.com>
9185
9186 * elf32-cris.c (cris_elf_howto_table) <R_CRIS_16_PCREL,
9187 R_CRIS_32_PCREL>: Fix typo in name.
9188 (cris_elf_check_relocs): Always create .rela.got here when
9189 R_CRIS_16_GOTPLT or R_CRIS_32_GOTPLT is seen.
9190 (elf_cris_adjust_gotplt_to_got): Don't create .rela.got here;
9191 assume it's created.
9192
9193 2002-04-04 Daniel Jacobowitz <drow@mvista.com>
9194
9195 * aout-adobe.c (aout_32_bfd_link_hash_table_free): Define.
9196 * aout-target.h (MY_bfd_link_hash_table_free): Conditionally
9197 define.
9198 * aout-tic30.c (MY_bfd_link_hash_table_free): Likewise.
9199 * bfd.c (bfd_link_hash_table_free): Define.
9200 * binary.c (binary_bfd_link_hash_table_free): Define.
9201 * bout.c (b_out_bfd_link_hash_table_free): Define.
9202 * coff-rs6000.c (rs6000coff_vec): Include
9203 _bfd_generic_link_hash_table_free.
9204 (pmac_xcoff_vec): Likewise.
9205 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
9206 (aix5coff64_vec): Likewise.
9207 * coffcode.h (coff_bfd_link_hash_table_free): Conditionally define.
9208 * elf-m10300.c (elf32_mn10300_link_hash_table_free): New function.
9209 (bfd_elf32_bfd_link_hash_table_free): Define.
9210 * elf32-hppa.c (elf32_hppa_link_hash_table_free): New function.
9211 (bfd_elf32_bfd_link_hash_table_free): Define.
9212 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Conditionally
9213 define.
9214 * i386msdos.c (msdos_bfd_link_hash_table_free): Define.
9215 * i386os9k.c (os9k_bfd_link_hash_table_free): Define.
9216 * ieee.c (ieee_bfd_link_hash_table_free): Define.
9217 * ihex.c (ihex_bfd_link_hash_table_free): Define.
9218 * libbfd-in.h (_bfd_nolink_bfd_link_hash_table_free): Define.
9219 (_bfd_generic_link_hash_table_free): Add prototype.
9220 * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Add prototype.
9221 * libecoff.h (_bfd_ecoff_bfd_link_hash_table_free): Define.
9222 * linker.c (_bfd_generic_link_hash_table_free): New function.
9223 * mmo.c (mmo_bfd_link_hash_table_free): Define.
9224 * nlm-target.h (nlm_bfd_link_hash_table_free): Define.
9225 * oasys.c (oasys_bfd_link_hash_table_free): Define.
9226 * ppcboot.c (ppcboot_bfd_link_hash_table_free): Define.
9227 * som.c (som_bfd_link_hash_table_free): Define.
9228 * srec.c (srec_bfd_link_hash_table_free): Define.
9229 * tekhex.c (tekhex_bfd_link_hash_table_free): Define.
9230 * versados.c (versados_bfd_link_hash_table_free): Define.
9231 * vms.c (vms_bfd_link_hash_table_free): New function.
9232 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_free): New function.
9233
9234 * coff-arm.c (coff_arm_link_hash_table_create): Use bfd_malloc
9235 instead of bfd_alloc.
9236 * coff-h8300.c (h8300_coff_link_hash_table_create): Likewise.
9237 * coff-mcore.c (coff_mcore_link_hash_table_create): Likewise.
9238 * coff-ppc.c (ppc_coff_link_hash_table_create): Likewise.
9239 * cofflink.c (_bfd_coff_link_hash_table_create): Likewise.
9240 * ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
9241 * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise.
9242 * elf.c (_bfd_elf_link_hash_table_create): Likewise.
9243 * elf32-arm.h (elf32_arm_link_hash_table_create): Likewise.
9244 * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
9245 * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise.
9246 * elf32-i386.c (elf_i386_link_hash_table_create): Likewise.
9247 * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
9248 * elf32-s390.c (elf_s390_link_hash_table_create): Likewise.
9249 * elf32-sh.c (sh_elf_link_hash_table_create): Likewise.
9250 * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create): Likewise.
9251 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
9252 * elf64-s390.c (elf_s390_link_hash_table_create): Likewise.
9253 * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise.
9254 * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create): Likewise.
9255 * elf64-x86-64.c (elf64_x86_64_link_hash_table_create): Likewise.
9256 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
9257 * linker.c (_bfd_generic_link_hash_table_create): Likewise.
9258 * m68klinux.c (linux_link_hash_table_create): Likewise.
9259 * sparclinux.c (linux_link_hash_table_create): Likewise.
9260 * sunos.c (sunos_link_hash_table_create): Likewise.
9261 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise.
9262
9263 * targets.c: Add _bfd_link_hash_table_free to xvec.
9264
9265 * bfd-in2.h: Regenerate.
9266 * libbfd.h: Regenerate.
9267 * libcoff.h: Regenerate.
9268
9269 2002-04-04 Alan Modra <amodra@bigpond.net.au>
9270
9271 * dep-in.sed: Cope with absolute paths.
9272 * Makefile.am (dep.sed): Subst TOPDIR, and not INCDIR.
9273 Run "make dep-am".
9274 * Makefile.in: Regenerate.
9275 * coff-arm.c: Fix copyright date.
9276 * cpu-h8300.c: Likewise.
9277 * cpu-i370.c: Likewise.
9278 * cpu-s390.c: Likewise.
9279 * cpu-mips.c: Likewise.
9280 * po/SRC-POTFILES.in: Regenerate.
9281
9282 2002-04-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
9283
9284 * Makefile.am: Add elfxx-mips.c to the known backends.
9285 (elf32-mips.lo): remove dependency to coff/external.h.
9286 * Makefile.in: Regenerate.
9287 * configure.in: Add elfxx-mips.lo to all vectors using elf32-mips.lo
9288 Remove elf32-mips.lo from 64 bit vectors. Update dependencies
9289 accordingly.
9290 * configure: Regenerate.
9291 * elf-bfd.h: Move all MIPS ELF specific prototypes to elfxx-mips.h.
9292 (irix_compat_t): IRIX compatibility level, moved from elf32-mips.c.
9293 (elf_backend_mips_irix_compat, elf_backend_mips_rtype_to_howto): New
9294 MIPS specific backend functions.
9295 * elf32-mips.c: Moved most code to elfxx-mips.c.
9296 (mips_elf_hi16_reloc): Rename from _bfd_mips_elf_hi16_reloc and make
9297 static.
9298 (mips_elf_lo16_reloc): Likewise, was _bfd_mips_elf_lo16_reloc.
9299 (mips_elf_got16_reloc): Likewise, was _bfd_mips_elf_got16_reloc.
9300 (mips_elf_gprel32_reloc): Likewise, was _bfd_mips_elf_gprel32_reloc.
9301 (mips_elf32_rtype_to_howto): Rename from mips_rtype_to_howto. Changed
9302 interface to allow selection of the right REL or RELA howto table.
9303 (mips_elf32_object_p): Rename from _bfd_mips_elf_object_p and made
9304 static. Let it refuse n32 objects.
9305 (elf32_mips_grok_prstatus): Rename from _bfd_elf32_mips_grok_prstatus.
9306 (elf32_mips_grok_psinfo): Rename from _bfd_elf32_mips_grok_psinfo.
9307 (elf32_mips_discard_info): Rename from _bfd_elf32_mips_discard_info.
9308 (elf32_mips_ignore_discarded_relocs): Rename from
9309 _bfd_elf32_mips_ignore_discarded_relocs.
9310 (elf32_mips_write_section): Rename from _bfd_elf32_mips_write_section.
9311 (elf32_mips_irix_compat): New function, replaces IRIX_COMPAT.
9312 (elf_mips_howto_table_rela): Remove.
9313 * elf64-mips.c: Moved most code to elfxx-mips.c.
9314 (bfd_elf64_bfd_reloc_type_lookup): Make static.
9315 (mips_elf64_rtype_to_howto): New function.
9316 (mips_elf64_object_p): Likewise.
9317 (elf64_mips_irix_compat): Likewise.
9318 * elfxx-mips.c: New file containing common code merged together from
9319 elf32-mips.c and elf64-mips.c.
9320 * elfxx-mips.h: New file containing MIPS specific prototypes from
9321 elf-bfd.h.
9322 * elfxx-target.h: Add handling for elf_backend_mips_irix_compat and
9323 elf_backend_mips_rtype_to_howto.
9324
9325 2002-04-04 Alan Modra <amodra@bigpond.net.au>
9326
9327 * srec.c (MAXCHUNK, Chunk): Revise comments.
9328 (srec_write_record): Correct buffer size.
9329 (srec_write_header): Do without intermediate buffer.
9330 (srec_write_section): Validate Chunk.
9331 (srec_write_terminator): Pass NULL instead of dummy buffer.
9332 (srec_write_symbols): Pass file and symbol names directly to
9333 bfd_bwrite so sprintf won't overflow buffer.
9334
9335 2002-04-03 Jakub Jelinek <jakub@redhat.com>
9336
9337 * elf32-sparc.c (elf32_sparc_relocate_section): Don't emit dynamic
9338 PC relative relocs against hidden symbols.
9339 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
9340
9341 2002-04-03 Alan Modra <amodra@bigpond.net.au>
9342
9343 * elf.c (_bfd_elf_make_section_from_shdr): When setting section
9344 LMAs, loop over segments until p_vaddr and p_memsz specify an
9345 extent enclosing the section.
9346
9347 2002-04-02 Nick Clifton <nickc@cambridge.redhat.com>
9348
9349 * ihex.c (ihex_write_object_contents): Do not allow records to
9350 cross a 64K boundary - wrap if necessary.
9351
9352 2002-04-01 Nathan Williams <nathanw@wasabisystems.com>
9353
9354 * elf.c (elfcore_netbsd_get_lwpid): Fix off-by-one error
9355 which caused the returned LWP ID to always be 0.
9356
9357 2002-04-01 Richard Henderson <rth@redhat.com>
9358
9359 * elf32-sparc.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
9360 (elf32_sparc_relocate_section): Use it to figure out when to
9361 initialize .got entries.
9362 * elf64-sparc.c: Similarly.
9363
9364 2002-03-28 Alan Modra <amodra@bigpond.net.au>
9365
9366 * linker.c (link_action): Ignore duplicate warning syms.
9367 (_bfd_generic_link_write_global_symbol): Follow warning symbol link.
9368 * elflink.h (elf_adjust_dynstr_offsets): Likewise.
9369 (elf_adjust_dynamic_symbol): Likewise.
9370 (elf_export_symbol): Likewise.
9371 (elf_link_find_version_dependencies): Likewise.
9372 (elf_link_assign_sym_version): Likewise.
9373 (elf_link_sec_merge_syms): Likewise.
9374 (elf_link_output_extsym): Likewise.
9375 (elf_gc_sweep_symbol): Likewise.
9376 (elf_gc_propagate_vtable_entries_used): Likewise.
9377 (elf_gc_smash_unused_vtentry_relocs): Likewise.
9378 (elf_gc_allocate_got_offsets): Likewise.
9379 (elf_collect_hash_codes): Likewise.
9380 * elflink.c (elf_link_renumber_hash_table_dynsyms): Likewise.
9381 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
9382 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
9383 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
9384 * elf32-arm.h (elf32_arm_discard_copies): Likewise.
9385 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Likewise.
9386 (elf_cris_discard_excess_dso_dynamics): Likewise.
9387 * elf32-hppa.c (clobber_millicode_symbols): Likewise.
9388 (mark_PIC_calls): Likewise.
9389 (allocate_plt_static): Likewise.
9390 (allocate_dynrelocs): Likewise.
9391 (readonly_dynrelocs): Likewise.
9392 * elf32-i386.c (allocate_dynrelocs): Likewise.
9393 (readonly_dynrelocs): Likewise.
9394 * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
9395 * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
9396 * elf32-mips.c (mips_elf_output_extsym): Likewise.
9397 (mips_elf_sort_hash_table_f): Likewise.
9398 (mips_elf_check_mips16_stubs): Likewise.
9399 * elf32-s390.c (allocate_dynrelocs): Likewise.
9400 (readonly_dynrelocs): Likewise.
9401 * elf32-sh.c (sh_elf_discard_copies): Likewise.
9402 * elf32-xstormy16.c (xstormy16_relax_plt_check): Likewise.
9403 (xstormy16_relax_plt_realloc): Likewise.
9404 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
9405 (elf64_alpha_output_extsym): Likewise.
9406 * elf64-hppa.c (elf64_hppa_mark_exported_functions): Likewise.
9407 * elf64-mips.c (mips_elf64_sort_hash_table_f): Likewise.
9408 (mips_elf64_check_mips16_stubs): Likewise.
9409 (mips_elf64_output_extsym): Likewise.
9410 * elf64-ppc.c (func_desc_adjust): Likewise.
9411 (allocate_dynrelocs): Likewise.
9412 (readonly_dynrelocs): Likewise.
9413 * elf64-s390.c (allocate_dynrelocs): Likewise.
9414 (readonly_dynrelocs): Likewise.
9415 * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
9416 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
9417 (readonly_dynrelocs): Likewise.
9418 * elfxx-ia64.c (elfNN_ia64_global_dyn_sym_thunk): Likewise.
9419 * aoutx.h (aout_link_write_other_symbol): Likewise.
9420 * cofflink.c (_bfd_coff_write_task_globals): Likewise.
9421 (_bfd_coff_write_global_sym): Likewise.
9422 * i386linux.c (linux_tally_symbols): Likewise.
9423 * m68klinux.c (linux_tally_symbols): Likewise.
9424 * sparclinux.c (linux_tally_symbols): Likewise.
9425 * pdp11.c (aout_link_write_other_symbol): Likewise.
9426 * sunos.c (sunos_scan_dynamic_symbol): Likewise.
9427 * xcofflink.c (xcoff_build_ldsyms): Likewise.
9428 (xcoff_write_global_symbol): Likewise.
9429
9430 * cofflink.c (_bfd_coff_final_link): Formatting.
9431 * cpu-mips.c (mips_compatible): Make static, prototype.
9432 * elf32-i386.c (elf_i386_check_relocs): Formatting.
9433 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
9434 * elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
9435 * elf64-mips.c (mips_elf64_sort_hash_table): Likewise.
9436 (mips_elf64_final_link): Likewise.
9437 * elflink.h (elf_link_find_version_dependencies): Remove duplicate
9438 prototype.
9439
9440 2002-03-27 Nick Clifton <nickc@cambridge.redhat.com>
9441
9442 * coff-arm.c (SWAP_IN_RELOC_OFFSET): Define.
9443 (SWAP_OUT_RELOC_OFFSET): Define.
9444
9445 2002-03-27 Gregory Steuck <greg@nest.cx>
9446
9447 * elf.c (_bfd_elf_get_symtab_upper_bound): Leave space for
9448 terminating NULL if empty symbol table.
9449 (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise.
9450
9451 2002-03-26 H.J. Lu (hjl@gnu.org)
9452
9453 * elflink.h (elf_link_input_bfd): Revert the last change since
9454 the gcc exception handling isn't fixed yet.
9455
9456 2002-03-26 H.J. Lu (hjl@gnu.org)
9457
9458 * elflink.h (elf_link_input_bfd): Complain about relocations
9459 against local symbols in discarded sections.
9460
9461 2002-03-26 Alan Modra <amodra@bigpond.net.au>
9462
9463 * elflink.h (elf_gc_mark): Don't recurse into non-ELF sections.
9464
9465 2002-03-23 Alan Modra <amodra@bigpond.net.au>
9466
9467 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
9468 section file offset for !SEC_LOAD sections.
9469
9470 2002-03-21 Richard Earnshaw <rearnsha@arm.com>
9471
9472 * elf32-arm.h (elf32_arm_final_link_relocate <case R_ARM_GOTOFF>,
9473 <case R_ARM_GOT>): Handle relocations to Thumb functions.
9474
9475 2002-03-21 Alan Modra <amodra@bigpond.net.au>
9476
9477 * coff64-rs6000.c (_bfd_xcoff64_put_symbol_name): Prototype.
9478 Whitespace changes.
9479 * archive.c: Update copyright date.
9480 * bfd-in2.h: Regenerate.
9481 * libbfd.h: Regenerate.
9482 * Makefile.am: Run "make dep-am"
9483 * Makefile.in: Regenerate.
9484 * po/SRC-POTFILES.in: Regenerate.
9485
9486 2002-03-20 Daniel Jacobowitz <drow@mvista.com>
9487
9488 * dwarf2.c (struct funcinfo): Move up.
9489 (lookup_address_in_function_table): New argument function_ptr.
9490 Set it.
9491 (lookup_address_in_line_table): New argument function. If function
9492 is non-NULL, use it to handle ``addr'' before the first line note of
9493 the function.
9494 (comp_unit_find_nearest_line): Update and swap calls to
9495 lookup_address_in_function_table and lookup_address_in_line_table.
9496 * syms.c (_bfd_stab_section_find_nearest_line): Use the first
9497 N_SLINE encountered if we see an N_FUN before any N_SLINE.
9498
9499 2002-03-20 Tom Rix <trix@redhat.com>
9500
9501 * coff-rs6000.c (_bfd_xcoff_stat_arch_elt): Renamed from
9502 _bfd_xcoff_generic_stat_arch_elt. Fix format check.
9503 * coff64-rs6000.c : Use _bfd_xcoff_stat_arch_elt.
9504
9505 2002-03-19 Tom Rix <trix@redhat.com>
9506
9507 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through all
9508 dynamic objects in archives.
9509
9510 2002-03-19 Hans-Peter Nilsson <hp@bitrange.com>
9511
9512 * elflink.h (NAME(bfd_elf,record_link_assignment)): Don't set
9513 STT_NOTYPE symbols to STT_OBJECT.
9514
9515 2002-03-18 Jan Hubicka <jh@suse.cz>
9516
9517 * cpu-i386.c (bfd_x86_64_arch): Rename to "i386:x86-64"
9518
9519 2002-03-18 Tom Rix <trix@redhat.com>
9520
9521 * aix5ppc.core.c : New file for AIX 5 64 bit core support.
9522 * bfd-in.h : Add bfd_xcoff_ar_archive_set_magic declaration.
9523 * coff-rs6000 (do_pad) : New function for archive padding.
9524 (do_copy) : New function for object file copying in archives.
9525 (do_shared_object_padding) : New function for padding shared
9526 objects to their text section alignment in archives.
9527 (bfd_xcoff_ar_achive_set_magic) : Stub.
9528 (xcoff_write_armap_big) : Use do_copy and do_pad.
9529 (xcoff_write_archive_contents_big) : Use do_shared_object_padding,
9530 do_copy and do_pad.
9531 * coff64-rs6000.c (xcoff64_write_ojbect_contents) : Use
9532 bfd_xcoff_magic_number.
9533 (xcoff64_bad_format_hook) : New function for _bfd_bad_format_hook
9534 fop.
9535 (xcoff_backend_data_r) : Use xcoff64_bad_format_hook.
9536 (bfd_xcoff_aix5_backend_data) : New Aix 5 backend data.
9537 (aix5coff64_vec) : New Aix 5 target aix5coff64-rs6000.
9538 * rs6000-core.c : Update copyright date.
9539 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Check for NULL
9540 csectpp.
9541 * coffcode.h (coff_new_section_hook) : Use new accessor macros.
9542 (coff_set_arch_mach_hook) : Add Aix 5 U64_TOCMAGIC magic #.
9543 (coff_set_flags) : Use bfd_xcoff_magic_number.
9544 * libxcoff.h (bfd_xcoff_is_xcoff64): Add U64_TOCMAGIC.
9545 * configure.in : Add powerpc-*-aix5 and rs6000-*-aix5 support.
9546 * Makefile.am : Same.
9547 * config.bfd : Same.
9548 * targets.c : Same.
9549 * configure : Regnerate.
9550 * Makefile.in : Same.
9551 * bfd-in2.h : Same.
9552
9553 2002-03-18 Nick Clifton <nickc@cambridge.redhat.com>
9554
9555 * po/fr.po: Updated version.
9556
9557 2002-03-18 Alan Modra <amodra@bigpond.net.au>
9558
9559 * libbfd.c (bfd_write_bigendian_4byte_int): Return true iff success.
9560 * libbfd.h: Regenerate.
9561 * archive.c (coff_write_armap): Pass on failures from
9562 bfd_write_bigendian_4byte_int.
9563
9564 2002-03-14 H.J. Lu <hjl@gnu.org>
9565
9566 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the BFD
9567 error to bfd_error_nonrepresentable_section for reinit_array
9568 section in DSO.
9569
9570 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
9571
9572 * coffcode.h (coff_slurp_symbol_table): When adding BSF_WEAK flag,
9573 OR it in rather than replacing previously selected flags.
9574
9575 * elfxx-target.h (TARGET_BIG_SYM): Set ar_max_namelen to 15.
9576 (TARGET_LITTLE_SYM): Set ar_max_namelen to 15.
9577
9578 2002-03-14 Alan Modra <amodra@bigpond.net.au>
9579
9580 * cpu-mips.c (mips_compatible): New. Don't check bits_per_word.
9581 (N): Use the above.
9582 * elflink.h (elf_bfd_final_link): Revert last change. Instead,
9583 ensure reloc size matches before calling elf_link_input_bfd.
9584 Add an assert to check reloc size when counting output relocs.
9585
9586 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
9587
9588 * mmo.c (mmo_get_loc): Return NULL rather than false.
9589
9590 2002-03-13 Nick Clifton <nickc@cambridge.redhat.com>
9591
9592 * po/fr.po: Updated version.
9593
9594 2002-03-13 Alan Modra <amodra@bigpond.net.au>
9595
9596 * archures.c (bfd_default_compatible): Test bits_per_word.
9597 * cpu-i386.c (i386_compatible): Remove. Replace occurrences with
9598 bfd_default_compatible.
9599 * cpu-i370.c (i370_compatible): Likewise.
9600 * cpu-sparc.c (sparc_compatible): Likewise.
9601 * cpu-h8300.c (compatible): Test in->arch == out->arch.
9602
9603 * elflink.h: Formatting fixes.
9604 (elf_link_output_extsym): Merge undefined and undef weak cases.
9605
9606 * elflink.h (elf_bfd_final_link): Only call elf_link_input_bfd
9607 when word size of input matches output word size.
9608
9609 2002-03-12 Andreas Jaeger <aj@suse.de>
9610
9611 * cpu-i386.c (i386_compatible): New. Use it instead of
9612 bfd_default_compatible.
9613
9614 2002-03-07 H.J. Lu (hjl@gnu.org)
9615
9616 * coff-sh.c (shcoff_reloc_map): Use bfd_reloc_code_real_type
9617 as the type for bfd_reloc_val.
9618
9619 2002-03-05 John David Anglin <dave@hiauly1.hia.nrc.ca>
9620
9621 * elf-hppa.h (elf_hppa_is_dynamic_loader_symbol): New function.
9622 (elf_hppa_relocate_section): Ignore undefined dynamic loader symbols.
9623 (elf_hppa_final_link_relocate): Correct relocations for indirect
9624 references to local data through the DLT. Fix .opd creation for
9625 local symbols using R_PARISC_LTOFF_FPTR32 and R_PARISC_FPTR64
9626 relocations. Use e_lsel selector for R_PARISC_DLTIND21L,
9627 R_PARISC_LTOFF_FPTR21L and R_PARISC_LTOFF_TP21L as per
9628 "Processor-Specific ELF for PA_RISC, Version 1.43" document.
9629 Similarly, use e_rsel for DLT and LTOFF 'R' relocations.
9630 * elf32-hppa.c (final_link_relocate): Revise relocation selectors
9631 as per "Processor-Specific ELF for PA_RISC, Version 1.43" document.
9632
9633 2002-03-05 Jakub Jelinek <jakub@redhat.com>
9634
9635 * merge.c (_bfd_merge_sections): Don't segfault if there
9636 is nothing to merge due to GC.
9637
9638 2002-03-05 Alan Modra <amodra@bigpond.net.au>
9639
9640 * elf32-hppa.c (clobber_millicode_symbols): Remove hack to keep
9641 symbols that have been forced local.
9642
9643 * elflink.h (elf_bfd_final_link): Call elf_link_output_extsym
9644 to output forced local syms for non-shared link.
9645 (elf_link_output_extsym): Tweak condition for calling backend
9646 adjust_dynamic_symbol so that previous behaviour is kept.
9647 Whitespace changes throughout file.
9648
9649 2002-03-04 H.J. Lu <hjl@gnu.org>
9650
9651 * elf.c (bfd_section_from_shdr): Handle special sections,
9652 .init_array, .fini_array and .preinit_array.
9653 (elf_fake_sections): Likewise.
9654
9655 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Create the
9656 DT entry only if the section is in output for .init_array,
9657 .fini_array and .preinit_array. Complain about .preinit_array
9658 section in DSO.
9659 (elf_bfd_final_link): Warn zero size for .init_array,
9660 .fini_array and .preinit_array sections.
9661
9662 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Remove
9663 SHT_INIT_ARRAY, SHT_FINI_ARRAY and SHT_PREINIT_ARRAY.
9664 (elfNN_ia64_fake_sections): Remove .init_array, .fini_array and
9665 .preinit_array.
9666
9667 2002-03-04 Alan Modra <amodra@bigpond.net.au>
9668
9669 * configure.in (WIN32LIBADD): Don't eval PICFLAG assignment.
9670 * configure: Regenerate.
9671
9672 2002-03-02 Tom Rix <trix@redhat.com>
9673
9674 * coff64-rs6000.c (xcoff64_howto_table): Replace howto types with
9675 symbolic equiv.
9676 * coff-rs6000.c (xcoff_howto_table): Same.
9677
9678 2002-03-01 David Mosberger <davidm@hpl.hp.com>
9679
9680 * elflink.h (size_dynamic_sections): If section named
9681 ".preinit_array" exists, create DT_PREINIT_ARRAY and
9682 DT_PREINIT_ARRAYSZ entries in dynamic table. Analogously for
9683 ".init_array" and ".fini_array".
9684 (elf_bfd_final_link): Handle DT_PREINIT_ARRAYSZ, DT_INIT_ARRAYSZ,
9685 DT_FINI_ARRAYSZ, DT_PREINIT_ARRAY, DT_INIT_ARRAY, and
9686 DT_FINI_ARRAY.
9687
9688 2002-02-26 Andrew Macleod <amacleod@cygnus.com>
9689
9690 * elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local
9691 dynsyms.
9692
9693 2002-02-25 Alan Modra <amodra@bigpond.net.au>
9694
9695 * elf64-hppa.h: Update copyright date.
9696
9697 * elf64-ppc.c (ppc64_elf_check_relocs): Warning fix.
9698 (ppc64_elf_relocate_section): Don't generate power4 style branch
9699 hints for *_BRTAKEN and *_BRNTAKEN relocs.
9700
9701 2002-02-22 Jakub Jelinek <jakub@redhat.com>
9702
9703 * elf64-sh64.c (sh_elf64_relocate_section): Fix a typo from my
9704 last patch.
9705 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
9706
9707 2002-02-21 Andreas Jaeger <aj@suse.de>
9708
9709 * elf64-x86-64.c: Major rework that introduces all recent changes
9710 to the x86-64 backend. Get a closer match to elf32-i386.
9711 (struct elf64_x86_64_dyn_relocs): Rename from
9712 elf64_x86_64_pcrel_relocs_copied, add additional fields. Change
9713 all users.
9714 (struct elf64_x86_64_link_hash_table): Add short cuts to some
9715 sections.
9716 (link_hash_newfunc): Rename from elf64_x86_64_link_hash_newfunc,
9717 remove casts, initialize new hash members.
9718 (create_got_section): New.
9719 (elf64_x86_64_create_dynamic_sections): New.
9720 (elf64_x86_64_copy_indirect_symbol): New.
9721 (elf64_x86_64_check_relocs): Don't allocate space for dynamic
9722 relocs, .got or .relgot here but do it in allocate_dynrelocs.
9723 Reference count possible .plt and .got entries. Don't test input
9724 section SEC_READONLY here to try to avoid copy relocs, and keep
9725 dyn_relocs regardless of ELF_LINK_NON_GOT_REF. Don't set
9726 DF_TEXTREL here. Delay setting of variables until needed. Cache
9727 pointer to "sreloc" section in elf_section_data. Tweak condition
9728 under which .got created. Report files with bad relocation
9729 section names.
9730 (elf64_x86_64_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
9731 Reference count possible .plt entries. Don't deallocate .got and
9732 .relgot space here.
9733 (elf64_x86_64_adjust_dynamic_symbol): Handle nocopyreloc. Don't
9734 do copy reloc processing for weakdefs. Remove redundant casts and
9735 aborts. Delay setting of vars until needed. Move creation of
9736 dynamic symbols and allocation of .plt and .rela.plt to
9737 allocate_dynrelocs. Replace BFD_ASSERT with abort.
9738 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
9739 (allocate_dynrelocs): New.
9740 (readonly_dynrelocs): New.
9741 (elf64_x86_64_size_dynamic_sections): Call readonly_dynrelocs.
9742 Allocate space for dyn relocs. Replace BFD_ASSERT with abort.
9743 Zero out the dynamic allocated content space.
9744 (elf64_x86_64_discard_copies): Removed.
9745 (elf64_x86_64_relocate_section): Make use of dynamic section
9746 short-cuts. Localise vars, and delay setting. Better error
9747 reporting, replace BFD_ASSERT with abort. Check
9748 ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined in the
9749 regular object file and tread the weak definition as the normal
9750 one. Don't discard relocs for undefweak or undefined symbols and
9751 check !DEF_REGULAR as well as DEF_DYNAMIC in test for avoided copy
9752 relocs.
9753 (elf64_x86_64_finish_dynamic_symbol): Don't copy relocs for
9754 symbols that have been forced local. Use same test to decide if
9755 we can use a relative reloc for got as relocate_section. Expand
9756 SHN_UNDEF comment. Move expressions out of function calls.
9757 Replace BFD_ASSERT with abort.
9758 (bfd_elf64_bfd_final_link): Removed.
9759 (elf_backend_copy_indirect_symbol): Define.
9760
9761 2002-02-20 Tom Rix <trix@redhat.com>
9762
9763 * coff-rs6000.c (xcoff_howto_table): Add 16 bit R_BA.
9764 (_bfd_xcoff_reloc_type_lookup): Use it.
9765 * coff64-rs6000.c (xcoff64_howto_table): Same.
9766 (xcoff64_reloc_type_lookup): Same.
9767
9768 2002-02-20 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
9769
9770 * osf-core.c (osf_core_vec): OSF/1 (Digital Unix) core files are
9771 little endian.
9772
9773 2002-02-19 Martin Schwidefsky <schwidefsky@de.ibm.com>
9774
9775 * archures.c (bfd_mach_s390_esa): Rename to bfd_mach_s390_31.
9776 (bfd_mach_s390_esame): Rename to bfd_mach_s390_64.
9777 * bfd-in2.h: Regenerate.
9778 * cpu-s390.c (arch_info_struct): Use renamed architecture defines.
9779 Replace architecture name "s390" with "s390:31-bit" and "s390:esame"
9780 with "s390:64-bit".
9781 * elf32-s390.c (elf_howto_table): Add 32 bit pc relative relocations.
9782 (elf_s390_reloc_type_lookup): Likewise.
9783 (elf_s390_check_relocs): Likewise.
9784 (elf_s390_gc_sweep_hook): Likewise.
9785 (elf_s390_relocate_section): Likewise.
9786 (elf_s390_object_p): Use renamed architecture define.
9787 * elf64-s390.c (elf_s390_object_p): Use renamed architecture define.
9788
9789 2002-02-19 Frank Ch. Eigler <fche@redhat.com>
9790
9791 * syms.c (stt[]): Sorted. Added .init/.fini -> "t" mapping.
9792
9793 2002-02-19 Jakub Jelinek <jakub@redhat.com>
9794
9795 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Enable
9796 absptr -> pcrel optimization for shared libs.
9797 Only create minimal .eh_frame_hdr if absptr FDE encoding in shared
9798 library cannot be converted to pcrel.
9799 (_bfd_elf_eh_frame_section_offset): Return -2 if making absptr
9800 relative.
9801 * elf32-i386.c (elf_i386_relocate_section): If
9802 _bfd_elf_section_offset returned -2, skip, but make sure the
9803 relocation is installed.
9804 * elf32-arm.h (elf32_arm_final_link_relocate): Likewise.
9805 * elf32-cris.c (cris_elf_relocate_section): Likewise.
9806 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
9807 * elf32-i370.c (i370_elf_relocate_section): Likewise.
9808 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
9809 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
9810 * elf32-s390.c (elf_s390_relocate_section): Likewise.
9811 * elf32-sh.c (sh_elf_relocate_section): Likewise.
9812 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
9813 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
9814 * elf64-s390.c (elf_s390_relocate_section): Likewise.
9815 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
9816 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
9817 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
9818 * elf64-alpha.c (elf64_alpha_relocate_section): Handle
9819 _bfd_elf_section_offset returning -2 the same way as -1.
9820 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
9821 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add FIXME
9822 and BFD_ASSERT.
9823 * elf64-mips.c (mips_elf64_create_dynamic_relocation): Likewise.
9824
9825 2002-02-18 Tom Rix <trix@redhat.com>
9826
9827 * xcofflink.c (bfd_xcoff_link_gernate_rtinit): Add -brtl support.
9828 (bfd_xcoff_size_dynamic_sections): Same.
9829 * bfd-in.h (bfd_xcoff_link_generate_rtinit): Same.
9830 (bfd_xcoff_size_dynamic_sections): Same.
9831 * coff-rs6000.c (xcoff_generate_rtinit): Same.
9832 * coff-rs646000.c (xcoff64_generate_rtinit): Same.
9833 * libxcoff.h (struct xcoff_backend_data_rec): Same.
9834 * xcofflink.c (xcoff_build_ldsyms, xcoff_link_add_symbols): Clean.
9835 * bfd-in2.h: Regenerate.
9836
9837 2002-02-18 Alan Modra <amodra@bigpond.net.au>
9838
9839 * elf64-ppc.c (STFD_FR0_0R1, LFD_FR0_0R1, BLR): Define.
9840 (struct ppc_link_hash_table): Add sfpr.
9841 (ppc64_elf_link_hash_table_create): Init it.
9842 (ppc64_elf_create_dynamic_sections): Split creation of .stub and
9843 .glink out to..
9844 (create_linkage_sections): ..here. Make .sfpr too.
9845 (ppc64_elf_check_relocs): Call create_linkage_sections, and set
9846 dynobj early.
9847 (MIN_SAVE_FPR, MAX_SAVE_FPR): Define.
9848 (ppc64_elf_func_desc_adjust): Look for missing ._savef* and
9849 ._restf* functions, and create as needed.
9850 (func_desc_adjust): Only force_local for shared libs.
9851
9852 2002-02-18 David O'Brien <obrien@FreeBSD.org>
9853
9854 * configure.in: Bump version number post 2.12 branching.
9855 * configure: Regenerate.
9856
9857 2002-02-17 Hans-Peter Nilsson <hp@bitrange.com>
9858
9859 * mmo.c: Correct and improve comments.
9860 (mmo_write_chunk): Store trailing byte in bfd buffer; don't
9861 zero-pad. Use input to fill up non-empty bfd buffer.
9862 (mmo_flush_chunk): New function.
9863 (mmo_write_loc_chunk): Add parameter last_vmap, all callers
9864 changed. Don't emit location specifier if VMA is same as
9865 *LAST_VMAP after omitting leading zero contents. Call
9866 mmo_flush_chunk before emitting location specifier.
9867 (mmo_write_loc_chunk_list): Call mmo_flush_chunk when finished
9868 with mmo_write_loc_chunk calls.
9869 (mmo_internal_write_section): Call mmo_flush_chunk after
9870 mmo_write_chunk.
9871 (mmo_write_symbols_and_terminator): Move :Main to first position
9872 in symbol array. Add faked one if it does not exist if there are
9873 other symbols. Don't add it if there are no symbols at all. Move
9874 out test for value of :Main from symbol loop. Rename table
9875 fakemain to maintable and variable mainsym to fakemain.
9876
9877 2002-02-15 Richard Henderson <rth@redhat.com>
9878
9879 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: A target
9880 section with no got matches any got. Simplify error generaion.
9881
9882 2002-02-15 Alan Modra <amodra@bigpond.net.au>
9883
9884 Support arbitrary length fill patterns.
9885 * linker.c (bfd_new_link_order): Zero all fields with bfd_zalloc.
9886 (_bfd_default_link_order): Remove bfd_fill_link_order code.
9887 Call default_data_link_order.
9888 (default_fill_link_order): Delete.
9889 (default_data_link_order): New function.
9890 * elf32-mips.c (_bfd_mips_elf_final_link): Replace occurrences
9891 of bfd_fill_link_order with bfd_data_link_order.
9892 * elf64-alpha.c (elf64_alpha_final_link): Likewise.
9893 * elf64-mips.c (mips_elf64_final_link): Likewise.
9894
9895 * bfd.c (bfd_scan_vma): Clamp overflows to max bfd_vma value.
9896 Correct value returned in "end" for "0x<non-hex>".
9897
9898 2002-02-14 Nick Clifton <nickc@cambridge.redhat.com>
9899
9900 * cpu-arm.c (processors): Replace 'arch' field with 'mach'.
9901 (scan): Test against 'mach' field in info structure.
9902
9903 2002-02-14 Alan Modra <amodra@bigpond.net.au>
9904
9905 * elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD.
9906
9907 2002-02-14 Matt Fredette <fredette@netbsd.org>
9908
9909 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize
9910 EF_M68000.
9911
9912 2002-02-13 Nick Clifton <nickc@cambridge.redhat.com>
9913
9914 * elf.c (_bfd_elf_make_section_from_shdr): Do not insist on
9915 non-zero physical addresses when adjusting the LMAs of new
9916 sections.
9917
9918 2002-02-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
9919
9920 * elf-hppa.h (elf_hppa_reloc_final_type): New function stripped
9921 from _bfd_elf_hppa_gen_reloc_type.
9922 (_bfd_elf_hppa_gen_reloc_type): Remove duplicate prototype.
9923 * elf32-hppa.h (elf32_hppa_reloc_final_type): Add protptype.
9924 * elf32-hppa.c: Include elf32-hppa.h before elf-hppa.h.
9925 * elf64-hppa.h (elf64_hppa_reloc_final_type): Add protptype.
9926
9927 2002-02-12 Alexandre Oliva <aoliva@redhat.com>
9928
9929 * elf-m10300.c (mn10300_elf_relax_section): Skip section before
9930 loading its contents if there's nothing to do in it.
9931
9932 2002-02-12 Alan Modra <amodra@bigpond.net.au>
9933
9934 * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for crossing
9935 64k boundary.
9936
9937 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Add dynamic
9938 DT_PPC64_OPD and DT_PPC64_OPDSZ tags.
9939 (ppc64_elf_finish_dynamic_sections): Set values for them.
9940
9941 2002-02-11 Michael Snyder <msnyder@redhat.com>
9942
9943 * elf-bfd.h (elfcore_write_lwpstatus): Add prototype.
9944 * elf.c (elfcore_grok_pstatus): Add prototype.
9945 (elfcore_grok_lwpstatus): Add prototype.
9946 (elfcore_write_lwpstatus): New function.
9947 (elfcore_write_pstatus): Fix typo, eliminate unnecessary memcpy.
9948
9949 2002-02-11 Alexandre Oliva <aoliva@redhat.com>
9950
9951 * elf32-sh.c: Added missing prototypes.
9952 * elf32-sh64.c: Likewise.
9953 (sh_elf_align_loads): Mark unused args as such.
9954 * elf64-sh64.c: Added missing prototypes.
9955 (struct elf_sh64_link_hash_entry): Fix typo.
9956 (sh_elf64_relocate_section): Fix info argument passed to
9957 _bfd_elf_section_offset.
9958
9959 2002-02-11 Alan Modra <amodra@bigpond.net.au>
9960
9961 * Makefile.am: "make dep-am".
9962 * Makefile.in: Regenerate.
9963 * aclocal.m4: Regenerate.
9964 * config.in: Regenerate.
9965 * configure: Regenerate.
9966
9967 2002-02-10 Daniel Jacobowitz <drow@mvista.com>
9968
9969 * coff-rs6000.c (xcoff_generate_rtinit): Silence uninitialized
9970 variable warnings.
9971 * elf32-sh.c (sh_elf_relax_section): Silence signed/unsigned
9972 comparison warning.
9973 * trad-core.c (trad_unix_core_file_p): Silence pointer/integer
9974 cast warnings for the common case.
9975
9976 2002-02-10 Hans-Peter Nilsson <hp@bitrange.com>
9977
9978 * config.bfd (sh-*-linux*, sh-*-elf* | sh-*-rtemself*): Add sh64
9979 vectors.
9980 (sh-*-netbsdelf*): New, to trump sh*-*-netbsdelf* and add sh64
9981 vectors.
9982
9983 2002-02-09 Richard Henderson <rth@redhat.com>
9984
9985 * elf64-alpha.c (elf64_alpha_howto): Add R_ALPHA_BRSGP.
9986 (elf64_alpha_reloc_map, elf64_alpha_check_relocs): Likewise.
9987 (elf64_alpha_relocate_section): Likewise.
9988 * reloc.c (BFD_RELOC_ALPHA_BRSGP): New.
9989 * bfd-in2.h, libbfd.h: Rebuild.
9990
9991 2002-02-09 Hans-Peter Nilsson <hp@bitrange.com>
9992
9993 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs): Check
9994 that base-plus-offset reloc accounting is consistent.
9995 (mmix_elf_relax_section): Keep base-plus-offset reloc accounting
9996 up to date for undefined symbols.
9997
9998 2002-02-08 Eric Christopher <echristo@redhat.com>
9999
10000 From Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
10001
10002 * elf32-mips.c (_bfd_mips_elf_fake_sections): Don't create .rela
10003 sections for the O32 ABI.
10004
10005 2002-02-08 Chris Demetriou <cgd@broadcom.com>
10006
10007 * elf32-arm.h: Fix formatting of _("...").
10008 * elf32-d10v.c: Likewise.
10009 * elf32-m68k.c: Likewise.
10010 * elf32-mips.c: Likewise.
10011
10012 2002-02-08 Ivan Guzvinec <ivang@opencores.org>
10013
10014 * coff-or32.c: Fix compile time warning messages.
10015
10016 2002-02-08 Alexandre Oliva <aoliva@redhat.com>
10017
10018 Contribute sh64-elf.
10019 2002-01-23 Alexandre Oliva <aoliva@redhat.com>
10020 * reloc.c (R_SH_GOTPLT32, R_SH_GOT_LOW16, R_SH_GOT_MEDLOW16,
10021 R_SH_GOT_MEDHI16, R_SH_GOT_HI16, R_SH_GOTPLT_LOW16,
10022 R_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_HI16,
10023 R_SH_PLT_LOW16, R_SH_PLT_MEDLOW16, R_SH_PLT_MEDHI16,
10024 R_SH_PLT_HI16, R_SH_GOTOFF_LOW16, R_SH_GOTOFF_MEDLOW16,
10025 R_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_HI16, R_SH_GOTPC_LOW16,
10026 R_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDHI16, R_SH_GOTPC_HI16,
10027 R_SH_GOT10BY4, R_SH_GOTPLT10BY4, R_SH_GOT10BY8, R_SH_GOTPLT10BY8,
10028 R_SH_COPY64, R_SH_GLOB_DAT64, R_SH_JMP_SLOT64, R_SH_RELATIVE64):
10029 New relocs.
10030 * libbfd.h, bfd-in2.h: Rebuilt.
10031 * elf32-sh.c (sh_elf_howto_table): Define new relocs.
10032 (sh_reloc_map): Map them.
10033 (PLT_ENTRY_SIZE, elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
10034 elf_sh_plt_entry_be, elf_sh_plt_entry_le, elf_sh_pic_plt_entry_be,
10035 elf_sh_pic_plt_entry_le, elf_sh_plt0_entry, elf_sh_plt_entry,
10036 elf_sh_pic_plt_entry, elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
10037 elf_sh_plt0_gotplt_offset, elf_sh_plt_temp_offset,
10038 elf_sh_plt_symbol_offset, elf_sh_plt_reloc_offset,
10039 movi_shori_putval) [INCLUDE_SHMEDIA]: New.
10040 (elf_sh_link_hash_entry) [INCLUDE_SHMEDIA]: Add
10041 datalabel_got_offset.
10042 (sh_elf_link_hash_newfunc): Initialize it.
10043 (sh_elf_relocate_section): Augment the scope of
10044 seen_stt_datalabel. Introduce GOTPLT support. Extend GOTPC, PLT,
10045 GOT and GOTOFF handling to new SHmedia relocation types. Support
10046 GOT_BIAS.
10047 (sh_elf_check_relocs): Likewise.
10048 (sh_elf_finish_dynamic_symbol) [TARGET_SHMEDIA]: Set up values in
10049 PLT entries using movi_shori_putval. Support GOT_BIAS.
10050 (sh_elf_finish_dynamic_sections): Likewise.
10051 * elf32-sh64.c (shmedia_prepare_reloc): Do not add addend to
10052 relocation, it's now done by the caller.
10053 (GOT_BIAS): New.
10054 * elf64-sh64.c (GOT_BIAS, PLT_ENTRY_SIZE, elf_sh64_sizeof_plt,
10055 elf_sh64_plt_plt0_offset, elf_sh64_plt0_gotplt_offset,
10056 elf_sh64_plt_temp_offset, elf_sh64_plt_symbol_offset,
10057 elf_sh64_plt_reloc_offset, ELF_DYNAMIC_INTERPRETER,
10058 elf_sh64_pcrel_relocs_copied, elf_sh64_link_hash_entry,
10059 elf_sh64_link_hash_table, sh64_elf64_link_hash_traverse,
10060 sh64_elf64_hash_table): New.
10061 (sh_elf64_howto_table): Introduce new relocs.
10062 (sh_elf64_info_to_howto): Accept new PIC relocs.
10063 (sh_elf64_relocate_section): Augment the scope of
10064 seen_stt_datalabel. Support new PIC relocs.
10065 (sh_elf64_check_relocs): Support new PIC relocs.
10066 (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le,
10067 elf_sh64_plt_entry_be, elf_sh64_plt_entry_le,
10068 elf_sh64_pic_plt_entry_be, elf_sh64_pic_plt_entry_le,
10069 elf_sh64_plt0_entry, elf_sh64_plt_entry, elf_sh64_pic_plt_entry,
10070 sh64_elf64_link_hash_newfunc, sh64_elf64_link_hash_table_create,
10071 movi_shori_putval, movi_3shori_putval,
10072 sh64_elf64_create_dynamic_sections,
10073 sh64_elf64_adjust_dynamic_symbol, sh64_elf64_discard_copies,
10074 sh64_elf64_size_dynamic_sections,
10075 sh64_elf64_finish_dynamic_symbol,
10076 sh64_elf64_finish_dynamic_sections): New.
10077 (elf_backend_create_dynamic-sections,
10078 bfd_elf64_bfd_link_hash_table_create,
10079 elf_backend_adjust_dynamic_symbol,
10080 elf_backend_size_dynamic_sections,
10081 elf_backend_finish_dynamic_symbol,
10082 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
10083 elf_backend_plt_readonly, elf_backend_want_plt_sym,
10084 elf_backend_got_header_size, elf_backend_plt_header_size):
10085 Define.
10086 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
10087 * elf32-sh.c: Renumbered and renamed some SH5 relocations to
10088 match official numbers and names; moved unmaching ones to the
10089 range 0xf2-0xff.
10090 * elf32-sh64.c, elf64-sh64.c: Likewise.
10091 2001-03-12 DJ Delorie <dj@redhat.com>
10092 * elf32-sh.c (sh_elf_relax_section): Don't relax SHmedia
10093 sections.
10094 2001-03-12 DJ Delorie <dj@redhat.com>
10095 * elf32-sh64.c (shmedia_prepare_reloc): Validate relocs that must
10096 be aligned.
10097 * elf64-sh64.c (sh_elf64_relocate_section): Ditto.
10098 2001-01-14 Hans-Peter Nilsson <hpn@cygnus.com>
10099 * elf32-sh64.c (bfd_elf32_bfd_copy_private_section_data): Define.
10100 (sh64_elf_fake_sections): Set type to SHT_SH5_CR_SORTED for a
10101 .cranges section with SEC_SORT_ENTRIES set.
10102 (sh64_backend_section_from_shdr): Set SEC_SORT_ENTRIES on an
10103 incoming sorted .cranges section.
10104 (sh64_bfd_elf_copy_private_section_data): New.
10105 (sh64_elf_final_write_processing): Only sort .cranges and modify
10106 start address if called by linker.
10107 2001-01-08 Ben Elliston <bje@redhat.com>
10108 * elf32-sh64.c (sh64_elf_final_write_processing): Activate
10109 Hans-Peter Nilsson's set bit 0 patch from 2001-01-06.
10110 * elf64-sh64.c (sh64_elf64_final_write_processing): Ditto.
10111 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
10112 * elf64-sh64.c (sh_elf64_howto_table): No open brace at start of
10113 line. Add comments before all entries.
10114 <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct and clarify describing
10115 comment.
10116 (sh_elf64_reloc): Correct head comment.
10117 (sh_elf64_relocate_section): Correct spacing.
10118 <relocating for a local symbol>: Do not honour STO_SH5_ISA32;
10119 instead call reloc_dangerous callback.
10120 <case R_SH_SHMEDIA_CODE>: New case.
10121 (sh_elf64_gc_mark_hook): Correct spacing.
10122 (sh_elf64_check_relocs): Ditto.
10123 * elf32-sh64.c (shmedia_prepare_reloc) <case R_SH_SHMEDIA_CODE>:
10124 New case.
10125 * elf32-sh.c: Correct #endif comments for #ifndef-wrapped
10126 functions.
10127 (sh_elf_howto_table) <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct,
10128 clarify describing comment. Add comments before all entries.
10129 (sh_elf_relocate_section) <relocating for a local symbol>: Do not
10130 honour STO_SH5_ISA32; instead call reloc_dangerous callback.
10131 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
10132 Sort .cranges section in final link. Prepare to set bit 0 on
10133 entry address.
10134 * elf32-sh64.c (struct sh64_find_section_vma_data): New.
10135 (sh64_elf_link_output_symbol_hook): Fix typo in prototype.
10136 (sh64_elf_set_mach_from_flags): Set SEC_DEBUGGING on incoming
10137 .cranges section.
10138 (sh64_backend_section_from_shdr): New, to recognize
10139 SHT_SH5_CR_SORTED on incoming .cranges section.
10140 (elf_backend_section_from_shdr): Define.
10141 (sh64_elf_final_write_processing): Sort outgoing .cranges
10142 section. (New, temporarily disabled:) Set bit 0 on entry address
10143 according to ISA type.
10144 (sh64_find_section_for_address): New.
10145 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb,
10146 crange_bsearch_cmpl): Move here from opcodes/sh64-dis.c.
10147 (sh64_address_in_cranges): Move here from opcodes/sh64-dis.c. Use
10148 bfd_malloc, not xmalloc.
10149 (sh64_get_contents_type): Move here from opcodes/sh64-dis.c. Make
10150 global.
10151 * elf32-sh64.c (sh64_elf64_final_write_processing): New, (but
10152 temporarily disabled) setting bit 0 on entry address.
10153 (elf_backend_final_write_processing): Define.
10154 2001-01-05 Hans-Peter Nilsson <hpn@cygnus.com>
10155 * elf32-sh.c (sh_elf_howto_table) <R_SH_PT_16>: Adjust fields to
10156 be a proper relocation for PTA and PTB rather than a marker.
10157 <R_SH_IMMU5, R_SH_IMMS6, R_SH_IMMU6, R_SH_IMMS10, R_SH_IMMS10BY2,
10158 R_SH_IMMS10BY4, R_SH_IMMS10BY8, R_SH_IMMS16, R_SH_IMMU16,
10159 R_SH_IMM_LOW16, R_SH_IMM_LOW16_PCREL, R_SH_IMM_MEDLOW16,
10160 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16_PCREL,
10161 R_SH_IMM_HI16, R_SH_IMM_HI16_PCREL, R_SH_64, R_SH_64_PCREL>:
10162 Zero src_mask.
10163 * elf64-sh64.c: Ditto.
10164 (sh_elf64_relocate_section) <case R_SH_PT_16>: New case.
10165 * elf32-sh64.c: Include opcodes/sh64-opc.h
10166 (shmedia_prepare_reloc): Take a bfd_link_info pointer as first
10167 argument. Drop const qualifiers from "bfd *" and "bfd_byte *"
10168 parameters. No unused parameters. Caller changed.
10169 <case R_SH_PT_16>: New case.
10170 * Makefile.am (elf32-sh64.lo): Add dependency on sh64-opc.h.
10171 * Makefile.in: Regenerate.
10172 2000-12-30 Hans-Peter Nilsson <hpn@cygnus.com>
10173 * elf64-sh64.c (sh64_elf64_fake_sections): Set SHF_SH5_ISA32 for
10174 all code sections.
10175 (sh_elf64_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
10176 (sh64_elf_merge_private_data): Ditto.
10177 * elf32-sh64.c (sh64_elf_fake_sections): Use sh64_elf_section_data
10178 to access stored section flags.
10179 (sh64_elf_final_write_processing): Return immediately unless
10180 called by linker. Use sh64_elf_section_data (cranges) to get size
10181 of linker-generated cranges entries.
10182 (sh64_elf_copy_private_data): Add missing "return true".
10183 (sh64_elf_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
10184 (sh_elf64_merge_private_data): Ditto.
10185 2000-12-19 Hans-Peter Nilsson <hpn@cygnus.com>
10186 * elf64-sh64.c (sh64_elf64_fake_sections): New, copy of
10187 elf64-sh64.c:sh64_elf_fake_sections.
10188 (elf_backend_fake_sections): Define as sh64_elf64_fake_sections.
10189 2000-12-18 Hans-Peter Nilsson <hpn@cygnus.com>
10190 * elf32-sh64.c (sh64_elf_copy_private_data_internal): Delete.
10191 (sh64_elf_final_write_processing): New.
10192 (elf_backend_final_write_processing): Define.
10193 (sh64_elf_fake_sections): Get header flags from tdata field.
10194 (sh64_elf_copy_private_data): Do not call
10195 sh64_elf_copy_private_data_internal, just copy e_flags field.
10196 (sh64_elf_merge_private_data): Do not call
10197 sh64_elf_copy_private_data_internal.
10198 2000-12-12 Hans-Peter Nilsson <hpn@cygnus.com>
10199 Remove EF_SH64_ABI64, let ELF size make difference.
10200 Remove SH64-specific BFD section flag.
10201 * elf32-sh64.c (sh64_elf_fake_sections): Recognize section as
10202 containing SHmedia through elf_section_data (asect)->tdata
10203 non-zero, not using a BFD section flag.
10204 (sh64_elf_set_mach_from_flags): Don't recognize EF_SH64_ABI64.
10205 (sh64_elf_merge_private_data): Similar.
10206 (elf_backend_section_flags): Don't define.
10207 (sh64_elf_backend_section_flags): Delete.
10208 * elf64-sh64.c (sh_elf64_set_mach_from_flags): Recognize EF_SH64,
10209 not EF_SH64_ABI64.
10210 (sh_elf64_merge_private_data): Similar.
10211 * section.c (Section flags definitions): Don't define
10212 SEC_SH_ISA_SHMEDIA.
10213 (bfd-in2.h): Regenerate.
10214 2000-12-09 Hans-Peter Nilsson <hpn@cygnus.com>
10215 Make DataLabel references work with partial linking.
10216 * elf32-sh64.c: Fix formatting.
10217 (sh64_elf_link_output_symbol_hook): New.
10218 (elf_backend_link_output_symbol_hook): Define to
10219 sh64_elf_link_output_symbol_hook.
10220 (sh64_elf_add_symbol_hook): Make DataLabel symbol just global
10221 undefined if partial linking. Adjust sanity check.
10222 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): New.
10223 (elf_backend_link_output_symbol_hook): Define to
10224 sh64_elf64_link_output_symbol_hook.
10225 (sh64_elf64_add_symbol_hook): Make DataLabel symbol just global
10226 undefined if partial linking. Adjust sanity check.
10227 2000-12-07 Hans-Peter Nilsson <hpn@cygnus.com>
10228 Implement semantics for inter-file DataLabel references.
10229 * elf64-sh64.c (DATALABEL_SUFFIX): Define.
10230 (sh64_elf64_add_symbol_hook): New.
10231 (sh_elf64_relocate_section): If passing an indirect symbol with
10232 st_type STT_DATALABEL on the way to a symbol with st_other
10233 STO_SH5_ISA32, do not bitor 1 to the relocation.
10234 (elf_backend_add_symbol_hook): Define to
10235 sh64_elf64_add_symbol_hook.
10236 * elf64-sh32.c: Tweak comments.
10237 (DATALABEL_SUFFIX): Define.
10238 (sh64_elf_add_symbol_hook): New.
10239 (elf_backend_add_symbol_hook): Define to sh64_elf_add_symbol_hook.
10240 * elf32-sh.c (sh_elf_relocate_section): If passing an indirect
10241 symbol with st_type STT_DATALABEL on the way to a symbol with
10242 st_other STO_SH5_ISA32, do not bitor 1 to the relocation.
10243 2000-12-05 Hans-Peter Nilsson <hpn@cygnus.com>
10244 Pass through STT_DATALABEL.
10245 * elf32-sh64.c (sh64_elf_get_symbol_type): New.
10246 (elf_backend_get_symbol_type): Define.
10247 * elf64-sh64.c (sh64_elf64_get_symbol_type): New.
10248 (elf_backend_get_symbol_type): Define.
10249 2000-11-30 Hans-Peter Nilsson <hpn@cygnus.com>
10250 * elf32-sh64.c: Tweak comments.
10251 (sh64_elf_copy_private_data_internal): Add prototype.
10252 (bfd_elf32_bfd_set_private_flags): Define.
10253 (sh64_elf_copy_private_data_internal): Compare machine name, not
10254 textual BFD target name, to check whether to copy section flag
10255 SHF_SH5_ISA32.
10256 (sh64_elf_merge_private_data): Validize bfd_get_arch_size.
10257 Tweak section-contents-type-mismatch message.
10258 (shmedia_prepare_reloc): Add ATTRIBUTE_UNUSED markers.
10259 Validize reloc-types.
10260 * elf64-sh64.c: New file.
10261 * targets.c (bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec): Declare.
10262 * Makefile.am (BFD64_BACKENDS): Add elf64-sh64.lo.
10263 (BFD64_BACKENDS_CFILES): Add elf64-sh64.c.
10264 Regenerate dependencies.
10265 * Makefile.in: Regenerate.
10266 * config.bfd (sh64-*-elf*): Add bfd_elf64_sh64_vec and
10267 bfd_elf64_sh64l_vec.
10268 * configure.in: Handle bfd_elf64_sh64_vec and
10269 bfd_elf64_sh64l_vec.
10270 * configure: Regenerate.
10271 * po/POTFILES.in: Regenerate.
10272 * po/bfd.pot: Regenerate.
10273 2000-11-29 Hans-Peter Nilsson <hpn@cygnus.com>
10274 * elf32-sh64.c (sh64_elf_set_mach_from_flags): Do not recognize
10275 anything else but EF_SH64 and EF_SH64_ABI64.
10276 (sh64_elf_merge_private_data): Emit error for anything else but
10277 EF_SH64 and EF_SH64_ABI64.
10278 * config.bfd: Remove bfd_elf32_shblin_vec and bfd_elf32_shlin_vec
10279 from targ_selvecs.
10280 * configure.in: Add cofflink.lo to bfd_elf32_sh64_vec and
10281 bfd_elf32_sh64l_vec as a temporary measure.
10282 * configure: Regenerate.
10283 2000-11-27 Hans-Peter Nilsson <hpn@cygnus.com>
10284 * cpu-sh.c (arch_info_struct): Include sh5 item
10285 unconditionalized.
10286 * config.bfd (sh64-*-elf*): Do not set targ_cflags.
10287 Add targ_selvecs bfd_elf32_sh_vec, bfd_elf32_shl_vec,
10288 bfd_elf32_shblin_vec and bfd_elf32_shlin_vec.
10289 * elf32-sh64.c: Tweak comments.
10290 (sh64_elf_set_mach_from_flags): Recognize all machine flags that
10291 are proper subsets of SH64 as bfd_mach_sh5. Add EF_SH64_ABI64.
10292 (sh64_elf_copy_private_data_internal): Wrap long line.
10293 (sh64_elf_merge_private_data): Rewrite to allow objects from
10294 SH64 subsets to be linked together.
10295 (INCLUDE_SHMEDIA): Define.
10296 * elf32-sh.c (sh_elf_relocate_section) <local symbol>:
10297 Parenthesize plus-expression inside or-expression.
10298 <global symbol>: Ditto.
10299 (sh_elf_set_mach_from_flags): Remove code refusing
10300 deleted EF_SH64_32BIT_ABI flag.
10301 2000-11-26 Hans-Peter Nilsson <hpn@cygnus.com>
10302 * elf32-sh.c (sh_elf_howto_table) <R_SH_IMM_LOW16_PCREL,
10303 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16_PCREL,
10304 R_SH_IMM_HI16_PCREL, R_SH_64_PCREL>: Set pcrel_offset to true.
10305 (sh_elf_relocate_section) <local symbol>: Or 1 in
10306 calculation of relocation if sym->st_other & STO_SH5_ISA32.
10307 <global symbol>: Ditto if h->other & STO_SH5_ISA32.
10308 * elf32-sh64.c (shmedia_prepare_reloc): Add rel->r_addend to
10309 relocation.
10310 2000-11-24 Hans-Peter Nilsson <hpn@cygnus.com>
10311 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64.lo.
10312 (BFD32_BACKENDS_CFILES): Add elf32-sh64.c.
10313 Regenerate dependencies.
10314 * Makefile.in: Regenerate.
10315 * archures.c: Add bfd_mach_sh5.
10316 * config.bfd: Map targ_cpu sh* to bfd_sh_arch.
10317 Handle sh64-*-elf*. Set targ_cflags to -DINCLUDE_SHMEDIA.
10318 * configure.in: Handle bfd_elf32_sh64_vec and bfd_elf32_sh64l_vec.
10319 * configure: Regenerate.
10320 * reloc.c (BFD_RELOC_SH_SHMEDIA_CODE, BFD_RELOC_SH_IMMU5,
10321 BFD_RELOC_SH_IMMS6, BFD_RELOC_SH_IMMS6BY32, BFD_RELOC_SH_IMMU6,
10322 BFD_RELOC_SH_IMMS10, BFD_RELOC_SH_IMMS10BY2,
10323 BFD_RELOC_SH_IMMS10BY4, BFD_RELOC_SH_IMMS10BY8,
10324 BFD_RELOC_SH_IMMS16, BFD_RELOC_SH_IMMU16, BFD_RELOC_SH_IMM_LOW16,
10325 BFD_RELOC_SH_IMM_LOW16_PCREL, BFD_RELOC_SH_IMM_MEDLOW16,
10326 BFD_RELOC_SH_IMM_MEDLOW16_PCREL, BFD_RELOC_SH_IMM_MEDHI16,
10327 BFD_RELOC_SH_IMM_MEDHI16_PCREL, BFD_RELOC_SH_IMM_HI16,
10328 BFD_RELOC_SH_IMM_HI16_PCREL, BFD_RELOC_SH_PT_16): New relocations.
10329 * cpu-sh.c [INCLUDE_SHMEDIA] (arch_info_struct): Define and link
10330 in item for SH5.
10331 * elf32-sh.c [INCLUDE_SHMEDIA] (sh_elf_howto_table): Add howto items
10332 for SHmedia relocs.
10333 [INCLUDE_SHMEDIA] (sh_rel): Add mappings for SHmedia relocs.
10334 [INCLUDE_SHMEDIA] (sh_elf_relocate_section) [default]: Call
10335 shmedia_prepare_reloc, goto final_link_relocate if it returns
10336 non-zero, else fail as before.
10337 (sh_elf_set_mach_from_flags): Provide function only if not defined
10338 as macro. Do not recognize objects with EF_SH64_32BIT_ABI set.
10339 (sh_elf_set_private_flags): Provide function only if not defined
10340 as a macro.
10341 (sh_elf_copy_private_data): Similar.
10342 (sh_elf_merge_private_data): Similar.
10343 * section.c (SEC_SH_ISA_SHMEDIA): New.
10344 * targets.c (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec): Declare.
10345 * elf32-sh64.c: New file.
10346 * libbfd.h: Regenerate.
10347 * bfd-in2.h: Regenerate.
10348 * po/POTFILES.in: Regenerate.
10349 * po/bfd.pot: Regenerate.
10350 * bfd-in2.h: Regenerate.
10351 * libbfd.h: Regenerate.
10352
10353 2002-02-07 Daniel Jacobowitz <drow@mvista.com>
10354
10355 * bfd-in.h: Update <stdbool.h> check to only see if <stdbool.h> has
10356 been included, not drag it in.
10357 * bfd-in2.h: Regenerate.
10358
10359 2002-02-06 H.J. Lu (hjl@gnu.org)
10360
10361 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Update
10362 the mach and ISA fields if necessary.
10363
10364 2002-02-06 Nick Clifton <nickc@cambridge.redhat.com>
10365
10366 * coffcode.h (coff_set_arch_mach_hook): Select the highest known
10367 ARM architecture when an F_ARM_5 flag is detected, since we cannot
10368 be sure exactly which architecture this represents.
10369
10370 2002-02-05 Nick Clifton <nickc@redhat.com>
10371
10372 * po/tr.po: Updated translation.
10373
10374 2002-02-05 Alan Modra <amodra@bigpond.net.au>
10375
10376 From Jimi X <jimix@watson.ibm.com>
10377 * archures (bfd_mach_ppc64): Define.
10378 (bfd_powerpc_arch): Rename to bfd_powerpc_archs.
10379 (bfd_powerpc_arch): Define.
10380 * bfd-in2.h: Regenerate.
10381 * cpu-powerpc.c (arch_info_struct): Rename to bfd_powerpc_archs.
10382 (bfd_powerpc_arch): Move to tail of bfd_powerpc_archs.
10383 (bfd_powerpc_archs): Add default powerpc64 arch.
10384
10385 2002-02-05 Alan Modra <amodra@bigpond.net.au>
10386
10387 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Check for relocs
10388 against section syms in readonly sections. Don't do the global
10389 sym check if we find one.
10390 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
10391 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
10392 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
10393 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
10394 (elf_s390_grok_prstatus): Add missing prototype.
10395
10396 2002-02-04 Hans-Peter Nilsson <hp@bitrange.com>
10397
10398 * elf64-mmix.c (mmix_dump_bpo_gregs): New function.
10399 (mmix_elf_check_common_relocs) <case R_MMIX_BASE_PLUS_OFFSET>:
10400 Call bfd_get_section_by_name only once. Initialize
10401 bpodata->n_bpo_relocs_this_section.
10402 (_bfd_mmix_prepare_linker_allocated_gregs): Remove comment
10403 referring to DSOs.
10404 (bpo_reloc_request_sort_fn): Don't use difference of values as
10405 return-value.
10406
10407 2002-02-02 David O'Brien <obrien@FreeBSD>
10408
10409 * configure.in: Tweak the FreeBSD 4.x recognition more. Only treat
10410 version 4.5 and later the same as 5-CURRENT.
10411 * configure: Re-generate.
10412
10413 2002-02-02 Jason Thorpe <thorpej@wasabisystems.com>
10414
10415 * config.bfd (hppa*-*-netbsd*): New target.
10416
10417 2002-01-31 Philipp Thomas <pthomas@suse.de>
10418
10419 * coff-arm.c (coff_arm_merge_private_bfd_data): Move ERROR
10420 to front of message. Unify messages with elf32-arm.h. Use
10421 commas where neccessary.
10422 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Use all upcase
10423 ERROR in messages. Unify messages with coff-arm.c. Correct
10424 VFP/FPA error message.
10425 (elf32_arm_print_private_bfd_data): Don't mark APCS-26 and
10426 APCS-32 for translation.
10427
10428 2002-02-01 Hans-Peter Nilsson <hp@bitrange.com>
10429
10430 Perform on-demand global register allocation from
10431 R_MMIX_BASE_PLUS_OFFSET relocs.
10432 * elf64-mmix.c (struct bpo_reloc_section_info, struct
10433 bpo_reloc_request, struct bpo_greg_section_info): New.
10434 (mmix_elf_check_common_relocs, mmix_elf_gc_sweep_hook,
10435 bpo_reloc_request_sort_fn, mmix_elf_relax_section,
10436 _bfd_mmix_check_all_relocs,
10437 _bfd_mmix_prepare_linker_allocated_gregs,
10438 _bfd_mmix_finalize_linker_allocated_gregs): New functions.
10439 (elf_mmix_howto_table): Correct src_mask for most relocs.
10440 (mmix_elf_perform_relocation) <case R_MMIX_BASE_PLUS_OFFSET>: New
10441 case.
10442 (mmix_final_link_relocate) <case R_MMIX_BASE_PLUS_OFFSET>: New
10443 case. Fix typo in comment. New label do_mmix_reloc.
10444 (mmix_elf_check_relocs): Abuse bfd_link_info member base_file to
10445 store first object file with a base-plus-offset reloc. Call
10446 mmix_elf_check_common_relocs for the part common with mmo.
10447 (mmix_elf_final_link): Write out linker-allocated register
10448 contents section.
10449 (elf_backend_gc_sweep_hook): Define.
10450 (bfd_elf64_bfd_relax_section): Define.
10451
10452 * mmo.c: Don't include <ctype.h>
10453 (mmo_init): Correct init-once logic.
10454
10455 2002-02-01 Tom Rix <trix@redhat.com>
10456
10457 * config.bfd: Conditionally support <aiaff> for pre AIX 4.3.
10458
10459 2002-02-01 Alan Modra <amodra@bigpond.net.au>
10460
10461 * Makefile.am: Run "make dep-am"
10462 * Makefile.in: Regenerate.
10463
10464 2002-01-31 David O'Brien <obrien@FreeBSD>
10465
10466 * configure.in: Recognize the differences in core files from FreeBSD
10467 4.{0,1} and later versions of 4.x. This treats 4.2+ the same as
10468 5-CURRENT.
10469 * configure: Regenerate.
10470
10471 2002-01-31 Ivan Guzvinec <ivang@opencores.org>
10472
10473 * coff-or32.c: New file.
10474 * cpu-or32.c: New file.
10475 * elf32-or32.c: New file.
10476 * archures.c: Add support for or32.
10477 * targets.c: Add support for or32.
10478 * bfd-in2.h: Regenerate.
10479 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags,
10480 coff_write_object_contents): Add support for or32.
10481 * config.bfd: Add target.
10482 * configure.in: Add support for or32.
10483 * configure: Regenerate.
10484 * Makefile.am: Add support for or32.
10485 * Makefile.in: Regenerate.
10486 * po/SRC-POTFILES.in: Add or32 files.
10487 * po/bfd.pot: Regenerate.
10488
10489 2002-01-31 Nick Clifton <nickc@cambridge.redhat.com>
10490 Don Lindsay <lindsayd@cisco.com>
10491
10492 * elf32-mips.c (mips_elf_calculate_relocation): Replace 'return
10493 false' with a return of a bfd_reloc_ error code.
10494
10495 2002-01-31 Hans-Peter Nilsson <hp@axis.com>
10496
10497 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
10498 unexport unreferenced symbols when --export-dynamic. Call
10499 _bfd_elf_strtab_delref when unexporting.
10500
10501 2002-01-30 Daniel Jacobowitz <drow@mvista.com>
10502
10503 * bfd-in.h: Include <stdbool.h> if it is available.
10504 * bfd-in2.h: Regenerated.
10505
10506 2002-01-31 Alan Modra <amodra@bigpond.net.au>
10507
10508 * elf64-ppc.c (func_desc_adjust): STV_PROTECTED functions should
10509 not go via the plt.
10510
10511 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
10512
10513 * archures.c: Tidy up formatting of embedded comments.
10514 * bfd.c: Tidy up formatting of embedded comments.
10515 * bfd-in.h: Fix formatting of comments.
10516 * reloc.c: Tidy up formatting of ordinary & embedded comments.
10517 * section.c: Tidy up formatting of embedded comments.
10518 * syms.c: Tidy up formatting of embedded comments.
10519 * targets.c: Tidy up formatting of embedded comments.
10520
10521 * bfd-in2.h: Regenerate.
10522
10523 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
10524
10525 * vms-tir.c (cmd_name): New function.
10526 (tir_cmd_name): New function.
10527 (etir_sta, etir_sto, etir_opr, etir_stc): Use cmd_name().
10528 (tir_opr, tir_ctl, tir_cmd): use tir_cmd_name().
10529 Fix formatting.
10530
10531 * peXXigen.c (pe_print_idata): Rearrange message to aid in
10532 translation.
10533 (pe_print_pdata): Rearrange message to aid in translation.
10534
10535 * libbfd.c (warn_deprecated): Rearrange error message to aid in
10536 translation.
10537
10538 * ihex.c (ihex_write_object_contents): Fix spelling typo.
10539
10540 * ieee.c (ieee_slurp_external_symbols): Remove spurious space.
10541
10542 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Rearrange error
10543 message to aid in translation.
10544
10545 * elf64-mmix.c (mmix_final_link_relocate): Rearrange error message
10546 to aid in translation.
10547
10548 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix typo.
10549
10550 2002-01-30 Philipp Thomas <pthomas@suse.de>
10551
10552 * coff-arm.c, elf32-elf.h: Unify messages.
10553
10554 2002-01-30 Nick Clifton <nickc@redhat.com>
10555
10556 * po/sv.po: Updated translation.
10557
10558 2002-01-30 Philipp Thomas <pthomas@suse.de>
10559
10560 * dwarf2.c (read_abbrev): Use full section name in error message.
10561 (decode_line_info): Likewise.
10562
10563 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Don't translate debugging
10564 message.
10565
10566 2002-01-30 Alan Modra <amodra@bigpond.net.au>
10567
10568 * elf64-ppc.c (func_desc_adjust): Only provide missing function
10569 descriptor symbols for undefined function code syms. Clear
10570 ELF_LINK_NON_ELF so that they can stay weak.
10571
10572 2002-01-29 Chris Demetriou <cgd@broadcom.com>
10573 Mitch Lichtenberg <mpl@broadcom.com>
10574
10575 * bfd-in.h (bfd_mips_elf32_create_embedded_relocs): New prototype.
10576 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): New function
10577 to handle 32-bit ELF embedded reloc (ld --embedded-relocs)
10578 generation.
10579 * bfd-in2.h: Regenerate.
10580
10581 2002-01-29 Chris Demetriou <cgd@broadcom.com>
10582
10583 * elf32-mips.c: Add additional comments about HI16 relocation
10584 processing.
10585 (_bfd_mips_elf_hi16_reloc): Don't subtract address here for
10586 pc-relative relocations. (Reverts change made on 2001-10-31.)
10587 (_bfd_mips_elf_lo16_reloc): Subtract address of LO16 part here
10588 for pc-relative relocations.
10589 (mips_elf_calculate_relocation): Add a comment about a kludge
10590 in the R_MIPS_GNU_REL_HI16 handling.
10591 (_bfd_mips_elf_relocate_section): Implement that kludge;
10592 adjust pc-relative HI16 relocation for difference in HI16 and
10593 LO16 addresses, since it can't easily be done in
10594 mips_elf_calculate_relocation.
10595
10596 2002-01-29 Martin Schwidefsky <schwidefsky@de.ibm.com>
10597
10598 * elf32-i386 (elf_i386_adjust_dynamic_symbol): Do not replace PLT32
10599 relocations with PC32 relocations for undefined or weak symbols.
10600 * elf32-s390 (elf_i386_adjust_dynamic_symbol): Likewise.
10601 * elf64-s390x (elf_i386_adjust_dynamic_symbol): Likewise.
10602
10603 2002-01-28 Jason Thorpe <thorpej@wasabisystems.com>
10604
10605 * elfcore.h (elf_core_file_p): Improve comment for last change.
10606
10607 2002-01-27 Daniel Jacobowitz <drow@mvista.com>
10608
10609 * configure: Regenerated.
10610
10611 2002-01-27 Jason Thorpe <thorpej@wasabisystems.com>
10612
10613 * elfcore.h (elf_core_file_p): Set the machine architecture
10614 before processing the program headers.
10615
10616 2002-01-26 Hans-Peter Nilsson <hp@bitrange.com>
10617
10618 * configure.in <64-bit configuration>: If using gcc, check and
10619 emit error for egcs-1.1.2.
10620 * configure: Regenerate.
10621
10622 2002-01-26 Egor Duda <deo@logos-m.ru>
10623
10624 * elf.c (elfcore_grok_win32pstatus): Copy only as much information
10625 as possible to avoid stack corruption.
10626
10627 2002-01-26 Richard Henderson <rth@redhat.com>
10628
10629 * elf64-alpha.c (elf64_alpha_check_relocs): Don't set reltext
10630 for non-allocated sections.
10631
10632 2002-01-25 Mark Kettenis <kettenis@gnu.org>
10633
10634 * elf.c (elfcore_write_prstatus): Make sure we pass the address of
10635 prstat.pr_reg even if it is a struct.
10636
10637 2002-01-25 Steve Ellcey <sje@cup.hp.com>
10638
10639 * elfxx-ia64.c: Reset AIX vector function overrides for HP-UX.
10640
10641 2002-01-25 Philipp Thomas <pthomas@suse.de>
10642
10643 * coffgen.c (coff_print_symbol): Don't mark info message
10644 for translation.
10645
10646 2002-01-25 Nick Clifton <nickc@redhat.com>
10647
10648 * po/fr.po: Updated translation.
10649 * po/es.po: Updated translation.
10650
10651 2002-01-25 Philipp Thomas <pthomas@suse.de>
10652
10653 * coff-alpha.c (alpha_relocate_section): Unify warning message
10654 for GP relative relocations without GP defined.
10655 * coff-mips.c (mips_relocate_section): Likewise.
10656
10657 2002-01-25 Alan Modra <amodra@bigpond.net.au>
10658
10659 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Avoid
10660 unsigned overflow when new_offset < old_offset.
10661
10662 2002-01-24 Philipp Thomas <pthomas@suse.de>
10663
10664 * bfd.c (_bfd_abort): Fix typo.
10665
10666 2002-01-23 Richard Henderson <rth@redhat.com>
10667
10668 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't suppress
10669 plt entries for undefweak symbols.
10670
10671 2002-01-23 Steve Ellcey <sje@cup.hp.com>
10672
10673 * targets.c (bfd_elf32_ia64_hpux_big_vec): Add to DEFAULT_VECTOR.
10674 (bfd_elf64_ia64_hpux_big_vec): Ditto.
10675 (bfd_elf32_h8300_vec): Ditto.
10676
10677 2002-01-23 Alan Modra <amodra@bigpond.net.au>
10678
10679 * elf64-ppc.c: Remove stale part of ABI comment.
10680 (NO_OPD_RELOCS): Define.
10681 (ppc64_elf_check_relocs): Use it.
10682 (ppc64_elf_relocate_section): Here too.
10683 (build_one_stub): Don't point function syms at the stub. Instead,
10684 hijack plt.offset.
10685 (ppc64_elf_relocate_section): Check whether REL24 relocs should
10686 really go to the stub. Make all dynamic relocs in opd against
10687 locals.
10688 (ppc64_elf_finish_dynamic_symbol): Allow for non-standard use of
10689 plt.offset.
10690
10691 2002-01-22 Richard Henderson <rth@redhat.com>
10692
10693 * elf64-alpha.c (INSN_UNOP): Encode with RB as $sp.
10694
10695 2002-01-22 Alan Modra <amodra@bigpond.net.au>
10696
10697 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Correct sign of
10698 TOC_BASE_OFF adjustment.
10699
10700 * Makefile.am: Run "make dep-am".
10701 * Makefile.in: Regenerate.
10702 * po/SRC-POTFILES.in: Regenerate.
10703
10704 2002-01-22 John David Anglin <dave@hiauly1.hia.nrc.ca>
10705
10706 * configure.host (hppa*64*-*-hpux*, hppa*64*-*-linux*): Add new
10707 host defines.
10708
10709 2002-01-21 Hans-Peter Nilsson <hp@axis.com>
10710
10711 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GOTREL>:
10712 Check for and emit error if sgot is NULL at this point.
10713
10714 2002-01-21 Jason Thorpe <thorpej@wasabisystems.com>
10715
10716 * config.bfd (ia64*-*-netbsd*): New target.
10717
10718 2002-01-21 Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
10719
10720 * som.c (som_write_space_strings): Comment typo fix.
10721
10722 2002-01-21 Alan Modra <amodra@bigpond.net.au>
10723
10724 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_func and
10725 is_func_descriptor fields.
10726 (link_hash_newfunc): Init them.
10727 (ppc64_elf_check_relocs): Only R_PPC24_REL24 syms starting with a
10728 dot are candidates for plt entries. When processing .opd relocs,
10729 set function descriptor strings to point inside function code
10730 string, and set new ppc_link_hash_entry fields.
10731 (ppc64_elf_gc_sweep_hook): Don't sweep R_PPC64_REL24 relocs.
10732 (ppc64_elf_adjust_dynamic_symbol): Remove most code dealing with
10733 function descriptors. It's now done in..
10734 (func_desc_adjust): New.
10735 (ppc64_elf_func_desc_adjust): New.
10736 (define elf_backend_always_size_sections): Define.
10737 (ppc64_elf_hide_symbol): New.
10738 (define elf_backend_hide_symbol): Define.
10739 (allocate_dynrelocs): Remove code looking up function descriptors
10740 as that has been done earlier.
10741 (ppc64_elf_size_dynamic_sections): Use htab shortcut to elf hash
10742 table.
10743 (ppc64_elf_finish_dynamic_symbol): Likewise. Remove code looking
10744 up function descriptor.
10745 (build_one_stub): Look up the function code sym. Check for
10746 invalid plt offsets.
10747 (ppc64_elf_relocate_section): Tweak calls to undefined weak syms.
10748 Convert R_PPC64_TOC relocs to R_PPC64_RELATIVE in shared libs.
10749
10750 * elf-bfd.h (elf_backend_data <elf_backend_hide_symbol>): Add
10751 boolean param.
10752 (_bfd_elf_link_hash_hide_symbol): Likewise.
10753 * elflink.h (elf_link_add_object_symbols): Adjust call to
10754 elf_backend_hide_symbol.
10755 (elf_fix_symbol_flags): Likewise.
10756 (elf_link_assign_sym_version): Likewise. Use bfd_malloc rather
10757 than bfd_alloc.
10758 * elf.c (_bfd_elf_link_hash_hide_symbol): Add "force_local" param.
10759 Set ELF_LINK_FORCED_LOCAL and call _bfd_elf_strtab_delref.
10760 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
10761 (clobber_millicode_symbols): Adjust to suit new hide_symbol.
10762 * elf32-cris.c (elf_cris_hide_symbol): Add "force_local" param
10763 and adjust to suit.
10764 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise, and call
10765 _bfd_elf_link_hash_hide_symbol rather than duplicating code.
10766 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
10767
10768 2002-01-18 Alan Modra <amodra@bigpond.net.au>
10769
10770 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Test for a
10771 dynamic function descriptor symbol, not the associated function
10772 symbol.
10773
10774 2002-01-17 Eric Christopher <echristo@redhat.com>
10775
10776 * elf32-mips.c (mips_elf_calculate_relocation): Fix typo.
10777
10778 2002-01-17 Nick Clifton <nickc@cambridge.redhat.com>
10779
10780 * po/bfd.pot: Regenerate.
10781 * po/fr.po: Regenerate.
10782
10783 2002-01-17 Alan Modra <amodra@bigpond.net.au>
10784
10785 * elf-bfd.h (elf_backend_data <elf_backend_section_from_bfd_section>):
10786 Remove "Elf_Internal_Shdr *" param.
10787 (_bfd_mips_elf_section_from_bfd_section): Ditto.
10788 * elf32-mips.c (_bfd_mips_elf_section_from_bfd_section): Ditto.
10789 * elf32-m32r.c (_bfd_m32r_elf_section_from_bfd_section): Ditto.
10790 * elf32-v850.c (v850_elf_section_from_bfd_section): Ditto.
10791 * elf64-mmix.c (mmix_elf_section_from_bfd_section): Ditto.
10792 * elfxx-ia64.c (elfNN_hpux_backend_section_from_bfd_section): Ditto.
10793 * elf.c (_bfd_elf_section_from_bfd_section): Allow backend
10794 function to override special sections. Remove hdr arg from
10795 backend call, and don't loop.
10796
10797 2002-01-16 Eric Christopher <echristo@redhat.com>
10798
10799 * elf32-mips.c (mips_elf_calculate_relocation): Set require_jalxp
10800 on R_MIPS_26 and target is 16bit. Add R_MIPS16_GPREL to list of
10801 relocations requiring gp0 and gp.
10802
10803 2002-01-16 Richard Earnshaw <rearnsha@arm.com>
10804
10805 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle
10806 EF_ARM_VFP_FLOAT.
10807 (elf32_arm_print_private_bfd_data): Likewise.
10808
10809 2002-01-16 Nick Clifton <nickc@cambridge.redhat.com>
10810
10811 * po/tr.po: Import new version.
10812
10813 2002-01-16 Alan Modra <amodra@bigpond.net.au>
10814
10815 * elf64-ppc.c (ppc64_elf_howto_raw): Remove stale FIXMEs.
10816 (ppc64_elf_reloc_type_lookup): Use proper CTOR reloc.
10817 (ORI_R0_R0_0): Correct.
10818
10819 2002-01-16 Alan Modra <amodra@bigpond.net.au>
10820
10821 * elflink.c (_bfd_elf_create_dynamic_sections): Don't set SEC_CODE
10822 when plt_not_loaded.
10823 * elf64-ppc.c (ppc64_elf_create_dynamic_sections): No need to
10824 clear .plt SEC_CODE here. Create .stub and correct .glink flags.
10825 (PLT_INITIAL_ENTRY_SIZE): Set to 24.
10826 (ppc64_elf_glink_code): Delete.
10827 (PPC64_ELF_GLINK_SIZE): Delete.
10828 (ADDIS_R12_R2, STD_R2_40R1, LD_R11_0R12, LD_R2_0R12, MTCTR_R11,
10829 BCTR, ADDIS_R12_R12_1, LD_R2_40R1, NOP, LI_R0_0, B_DOT, LIS_R0_0,
10830 ORI_R0_R0_0): Define.
10831 (PLT_CALL_STUB_SIZE, GLINK_CALL_STUB_SIZE): Define.
10832 (struct ppc_link_hash_table): Add sstub and plt_overflow.
10833 (ppc64_elf_link_hash_table_create): Init them.
10834 (ppc64_elf_check_relocs <R_PPC64_REL24>): Refcount .plt entry.
10835 Don't copy to shared lib.
10836 (ppc64_elf_check_relocs): Call bfd_set_error on errors.
10837 (ppc64_elf_gc_sweep_hook <R_PPC64_REL24>): Sweep plt refcount.
10838 (allocate_dynrelocs <plt>): Don't change function sym here. Make
10839 room for .stub and .glink code.
10840 (ppc64_elf_size_dynamic_sections): Handle .stub. Make entry for
10841 DT_PPC64_GLINK.
10842 (ppc64_elf_final_link): Rename to ppc64_elf_set_toc. Don't call
10843 bfd_elf64_bfd_final_link.
10844 (bfd_elf64_bfd_final_link): Don't define.
10845 (ppc64_elf_size_stubs): New.
10846 (build_plt_stub): New.
10847 (build_one_stub): New.
10848 (ppc64_elf_build_stubs): New.
10849 (ppc64_elf_relocate_section <toc relocs>): Remove assert.
10850 (ppc64_elf_relocate_section): Don't copy R_PPC64_REL24 relocs.
10851 (ppc64_elf_finish_dynamic_symbol): Don't build stubs here. Set
10852 DT_PPC64_GLINK entry. Tweak DT_PLTGOT, DT_JMPREL, DT_PLTRELSZ in
10853 case output sections not separate. Adjust DT_RELASZ to not
10854 include plt relocs. Set reserved got entry. Set got and plt
10855 entry size.
10856 (elf_backend_got_header_size): Set to 8.
10857 * elf64-ppc.h: New file.
10858
10859 2002-01-16 Alan Modra <amodra@bigpond.net.au>
10860
10861 * elf32-arm.h (elf32_arm_size_dynamic_sections): When removing
10862 sections, use bfd_section_list_remove.
10863 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
10864 * elflink.h (elf_link_add_object_symbols): When removing all
10865 sections, use bfd_section_list_clear.
10866
10867 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
10868
10869 * po/sv.po: New file: Swedish translation.
10870 * configure.in (ALL_LINGUAS): Add sv.
10871 * configure: Regenerate.
10872
10873 2002-01-15 Jakub Jelinek <jakub@redhat.com>
10874
10875 * elflink.h (elf_link_input_bfd): Back out 2002-01-07 change.
10876 * elf.c (merge_sections_remove_hook): New function.
10877 (_bfd_elf_merge_sections): Pass it as 3rd argument to
10878 _bfd_merge_sections.
10879 * libbfd-in.h (_bfd_merge_sections): Add 3rd argument.
10880 * libbfd.h: Rebuilt.
10881 * merge.c (_bfd_merge_sections): Add remove_hook argument.
10882 Call remove_hook if a SEC_EXCLUDE section is encountered.
10883
10884 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
10885
10886 * elf32-xstormy16.c (xstormy16_reloc_map): Add new field 'table'.
10887 (xstormy16_reloc_map): Initialise new field with correct howto
10888 table.
10889 (xstormy16_reloc_type_lookup): Use 'table' field to locate correct
10890 howto entry.
10891
10892 2002-01-10 Michael Snyder <msnyder@redhat.com>
10893
10894 * elf.c (elfcore_write_prstatus): Use long instead of pid_t;
10895 (elfcore_write_pstatus): Use long instead of pid_t;
10896 * elf-bfd.h: Change prototypes to use long instead of pid_t;
10897
10898 2002-01-09 Jason Thorpe <thorpej@wasabisystems.com>
10899
10900 * elf.c: Update copyright years.
10901 (elfcore_grok_netbsd_note): Use NT_NETBSDCORE_PROCINFO
10902 and NT_NETBSDCORE_FIRSTMACH. Improve a comment.
10903
10904 2002-01-08 Michael Snyder <msnyder@redhat.com>
10905
10906 Add capability to write corefile note sections, for gdb.
10907 * elf.c (elfcore_write_note): New function.
10908 (elfcore_write_prpsinfo): New function.
10909 (elfcore_write_prstatus): New function.
10910 (elfcore_write_pstatus): New function.
10911 (elfcore_write_prfpreg): New function.
10912 (elfcore_write_prxfpreg): New function.
10913 * elf-bfd.h: Add prototypes for above functions.
10914
10915 2002-01-08 Alexandre Oliva <aoliva@redhat.com>
10916
10917 * elf.c (elf_fake_sections): Propagate errors from
10918 elf_backend_fake_section.
10919
10920 2002-01-07 Jason Thorpe <thorpej@wasabisystems.com>
10921
10922 * Makefile.am (BFD32_BACKENDS): Add elf32-sh-nbsd.lo.
10923 (BFD32_BACKENDS_CFILES): Add elf32-sh-nbsd.c.
10924 (elf32-sh-nbsd.lo): New rule.
10925 * Makefile.in: Regenerate.
10926 * config.bfd (sh*le-*-netbsdelf*): New target.
10927 (sh*-*-netbsdelf*): New target.
10928 * configure.in: Include netbsd-core.lo for native sh*-*-netbsd*.
10929 (bfd_elf32_shnbsd_vec): New vector.
10930 (bfd_elf32_shlnbsd_vec): New vector.
10931 * configure: Regenerate.
10932 * elf32-sh-nbsd.c: New file.
10933 * targets.c: Update copyright years.
10934 (_bfd_target_vector): Add bfd_elf32_shlnbsd_vec and
10935 bfd_elf32_shnbsd_vec.
10936
10937 2002-01-07 Aldy Hernandez <aldyh@redhat.com>
10938
10939 * coff-rs6000.c (READ20): Use bfd_scan_vma.
10940
10941 2002-01-07 Geoffrey Keating <geoffk@redhat.com>
10942
10943 * elflink.h (elf_link_input_bfd): Don't ask for the merged offset
10944 of a symbol in a section that will be deleted.
10945
10946 2002-01-07 Nick Clifton <nickc@cambridge.redhat.com>
10947
10948 * po/es.po: New file: Spanish translation.
10949 * configure.in (ALL_LINGUAS): Add es.
10950 * configure: Regenerate.
10951
10952 2002-01-06 Steve Ellcey <sje@cup.hp.com>
10953
10954 * elfxx-ia64.c (is_unwind_section_name): Add target vector as
10955 argument so we can handle HP-UX specially.
10956 (elfNN_ia64_hpux_vec): New for use in is_unwind_section_name.
10957 (elfNN_hpux_backend_section_from_bfd_section): New for support
10958 of SHN_IA_64_ANSI_COMMON.
10959 (elfNN_ia64_relax_section): Add support for SHN_IA_64_ANSI_COMMON.
10960 (is_unwind_section_name): Add special HP-UX support.
10961 (elfNN_ia64_section_from_shdr): Add support for more sections.
10962 (elfNN_ia64_fake_sections): Modify is_unwind_section_name call and
10963 add support for more sections.
10964 (elfNN_ia64_additional_program_headers): Modify
10965 is_unwind_section_name call.
10966 (elfNN_ia64_modify_segment_map): Remove assumption that there is
10967 only one unwind section in segment.
10968
10969 2002-01-06 Alan Modra <amodra@bigpond.net.au>
10970
10971 * syms.c (_bfd_generic_make_empty_symbol): New function.
10972 * libbfd-in.h (_bfd_nosymbols_make_empty_symbol): Define as
10973 _bfd_generic_make_empty_symbol.
10974 * libbfd.h: Regenerate.
10975 * bfd-in2.h: Regenerate.
10976 * hppabsd-core.c (hppabsd_core_make_empty_symbol): Delete function.
10977 (hppabsd_core_get_symtab_upper_bound): Don't define.
10978 (hppabsd_core_get_symtab): Likewise.
10979 (hppabsd_core_print_symbol): Likewise.
10980 (hppabsd_core_get_symbol_info): Likewise.
10981 (hppabsd_core_bfd_is_local_label_name): Likewise.
10982 (hppabsd_core_get_lineno): Likewise.
10983 (hppabsd_core_find_nearest_line): Likewise.
10984 (hppabsd_core_bfd_make_debug_symbol): Likewise.
10985 (hppabsd_core_read_minisymbols): Likewise.
10986 (hppabsd_core_minisymbol_to_symbol): Likewise.
10987 (hppabsd_core_vec): Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols).
10988 Formatting fixes.
10989 * hpux-core.c: Similarly.
10990 * irix-core.c: Similarly.
10991 * osf-core.c: Similarly.
10992 * sco5-core.c: Similarly.
10993 * binary.c (binary_make_empty_symbol): Remove function, define as
10994 _bfd_generic_make_empty_symbol.
10995 * ihex.c (ihex_make_empty_symbol): Likewise.
10996 * mmo.c (mmo_make_empty_symbol): Likewise.
10997 * ppcboot.c (ppcboot_make_empty_symbol): Likewise.
10998 * srec.c (srec_make_empty_symbol): Likewise.
10999 * versados.c (versados_make_empty_symbol): Likewise.
11000 * vms.c (_bfd_vms_make_empty_symbol): Remove.
11001 (vms_make_empty_symbol): Define as _bfd_generic_make_empty_symbol.
11002 * vms-gsd.c (_bfd_vms_slurp_gsd): Call bfd_make_empty_symbol
11003 rather than _bfd_vms_make_empty_symbol.
11004 * vms-misc.c (new_symbol): Likewise.
11005
11006 2002-01-05 Alan Modra <amodra@bigpond.net.au>
11007
11008 * section.c (bfd_section_init): Remove unnecessary initialisations.
11009 (bfd_section_list_clear): New function.
11010 (bfd_section_list_remove, bfd_section_list_insert): New macros.
11011 (_bfd_strip_section_from_output): Use them.
11012 * coffcode.h (coff_set_alignment_hook): Likewise.
11013 * elf32-mips.c (_bfd_mips_elf_final_link): Likewise.
11014 * elf64-mips.c (mips_elf64_final_link): Likewise.
11015 * elf64-mmix.c (mmix_elf_final_link): Likewise.
11016 * sunos.c (sunos_add_dynamic_symbols): Likewise.
11017 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
11018 * bfd-in2.h: Regenerate.
11019
11020 * netbsd-core.c (netbsd_core_file_p): Use bfd_make_section_anyway
11021 rather than doing our own section handling. Clean up after errors
11022 with bfd_release and bfd_section_list_clear. Handle unexpected
11023 flags.
11024 * aoutf1.h (sunos4_core_file_p): Likewise.
11025 * aix386-core.c (aix386_core_file_p): Likewise.
11026 * cisco-core.c (cisco_core_file_validate): Likewise.
11027 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
11028 * trad-core.c (trad_unix_core_file_p): Likewise.
11029
11030 * hppabsd-core.c (hppabsd_core_core_file_p): Clean up after errors
11031 with bfd_release and bfd_section_list_clear.
11032 * hpux-core.c (hpux_core_core_file_p): Likewise.
11033 * irix-core.c (irix_core_core_file_p): Likewise.
11034 * lynx-core.c (lynx_core_file_p): Likewise.
11035 * osf-core.c (osf_core_core_file_p): Likewise.
11036 * rs6000-core.c (rs6000coff_core_p): Likewise.
11037 * sco5-core.c (sco5_core_file_p): Likewise.
11038
11039 * elf32-mips.c (_bfd_mips_elf_lo16_reloc): Simplify, and perform
11040 sign extension adjustments without conditionals.
11041
11042 2002-01-04 Jakub Jelinek <jakub@redhat.com>
11043
11044 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Don't crash if
11045 CIE at .eh_frame start is removed due to no FDEs referencing it.
11046
11047 2002-01-04 Jason Thorpe <thorpej@wasabisystems.com>
11048
11049 * config.bfd (x86_64-*-netbsd*): New target.
11050 * configure.in (x86_64-*-netbsd*): Set COREFILE
11051 to netbsd-core.lo.
11052 * configure: Regenerated.
11053
11054 2002-01-03 Tom Rix <trix@redhat.com>
11055
11056 * xcofflink.c (_bfd_xcoff_bfd_final_link): Update .pad section ordering
11057 for recent bfd_make_section_anyway change.
11058
11059 2002-01-03 Nick Clifton <nickc@cambridge.redhat.com>
11060
11061 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
11062 R_ARM_THM_PC11 reloc.
11063
11064 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
11065
11066 * configure.in (LINGUAS): Add ja.
11067 * configure: Regenerate.
11068 * po/ja.po: Import from translation project's web site.
11069
11070 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
11071
11072 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Reformat error
11073 messages to ease translation into other languages.
11074
11075 For older changes see ChangeLog-0001
11076 \f
11077 Local Variables:
11078 mode: change-log
11079 left-margin: 8
11080 fill-column: 74
11081 version-control: never
11082 End: