* ChangeLog: Fix typos.
[deliverable/binutils-gdb.git] / bfd / ChangeLog
1 2003-11-28 Christian Groessler <chris@groessler.org>
2
3 * cpu-z8k.c: Convert to ISO C90.
4 * coff-z8k.c: Likewise.
5
6 2003-11-27 Alexandre Oliva <aoliva@redhat.com>
7
8 * elf-bfd.h (elf_backend_data::elf_backend_modify_segment_map):
9 Add link info argument.
10 * elf32-i370.c (elf_backend_modify_segment_map): Likewise.
11 * elf32-ppc.c (ppc_elf_modify_segment_map): Likewise.
12 * elf32-xtensa.c (elf_xtensa_modify_segment_map): Likewise.
13 * elf64-hppa.c (elf64_hppa_modify_segment_map): Likewise.
14 * elfxx-ia64.c (elfNN_ia64_modify_segment_map): Likewise.
15 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Likewise.
16 * elfxx-mips.h (_bfd_mips_elf_modify_segment_map): Likewise.
17 * elf.c (assign_file_positions_except_relocs,
18 assign_file_positions_for_segments): Likewise. Adjust calls.
19
20 2003-11-27 Mark Kettenis <kettenis@gnu.org>
21
22 * elf.c (elfcore_grok_netbsd_procinfo): Make a pseudosection out
23 of the note.
24
25 2003-11-26 Daniel Jacobowitz <drow@mvista.com>
26 Richard Sandiford <rsandifo@redhat.com>
27
28 * elfxx-mips.c (mips_elf_set_global_got_offset): Don't set no_fn_stub.
29 (mips_elf_set_no_stub): New function.
30 (mips_elf_multi_got): Call it.
31 (_bfd_mips_elf_finish_dynamic_symbol): If a relocation is needed for
32 a secondary GOT entry, create an R_MIPS_32 or R_MIPS_64 relocation and
33 use mips_elf_create_dynamic_relocation to deal with any compatibility
34 issues. Store the adjusted addend in the GOT slot.
35
36 2003-11-25 Mattias EngdegÄrd <mattias@virtutech.se>
37
38 * stabs.c (_bfd_link_section_stabs): Skip N_EXCL stabs when
39 procesing N_BINCL stabs.
40
41 2003-11-25 Alan Modra <amodra@bigpond.net.au>
42
43 * elf64-ppc.c (ppc_type_of_stub): Disallow stubs other than
44 ppc_stub_plt_call to symbols defined in shared libs.
45
46 2003-11-22 Jakub Jelinek <jakub@redhat.com>
47
48 * elf-bfd.h (ELF_LINK_POINTER_EQUALITY_NEEDED): Define new flag.
49 * elf.c (_bfd_elf_link_hash_copy_indirect): Copy it.
50 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
51 (elf_i386_check_relocs): Set it.
52 (elf_i386_finish_dynamic_symbol): If it is not set,
53 clear st_value of SHN_UNDEF symbol.
54
55 2003-11-20 Jim Blandy <jimb@redhat.com>
56
57 * cpu-powerpc.c (powerpc_compatible): Any ISA in the PowerPC
58 family is a superset of <bfd_arch_rs6000,bfd_mach_rs6k>.
59
60 2003-11-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
61
62 * elf32-s390.c (elf_s390_relocate_section): Don't recalculate symbol
63 section for reloc output and subtract the output section's address
64 from the addend when converting a relocation into one against a
65 section symbol.
66 * elf64-s390.c (elf_s390_relocate_section): Likewise.
67
68 2003-11-18 James E Wilson <wilson@specifixinc.com>
69
70 * elfxx-ia64.c (get_fptr): For fptr_rel, use dynobj not abfd.
71 (elfNN_ia64_size_dynamic_sections): When stripping sections, check
72 for ia64_info->rel_fptr_sec.
73
74 2003-11-18 Alan Modra <amodra@bigpond.net.au>
75
76 * elf64-ppc.c (toc_adjusting_stub_needed): Exit early if section
77 size is zero.
78
79 2003-11-17 Daniel Jacobowitz <drow@mvista.com>
80
81 * elf.c (_bfd_elf_link_hash_copy_indirect): Copy
82 ELF_LINK_HASH_NEEDS_PLT. Fix formatting.
83 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
84 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
85 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Likewise.
86 * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
87 * elf32-sh.c (sh_elf_copy_indirect_symbol): Likewise.
88 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
89 * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
90 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
91 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
92 * elf32-xtensa.c (elf_xtensa_copy_indirect_symbol): Remove.
93 (elf_backend_copy_indirect_symbol): Don't define.
94
95 2003-11-14 Daniel Jacobowitz <drow@mvista.com>
96
97 * elfxx-mips.c (mips_elf_merge_gots): Weaken assert for local
98 GOT entries.
99
100 2003-11-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
101
102 * elf32-s390.c (elf_s390_relocate_section): Only convert R_390_32
103 to R_390_RELATIVE. Convert the other relocations against local
104 symbols to relocations against the start of the section.
105 * elf64-s390.c (elf_s390_relocate_section): Only convert R_390_64
106 to R_390_RELATIVE. Convert the other relocations against local
107 symbols to relocations against the start of the section.
108
109 2003-11-11 Nick Clifton <nickc@redhat.com>
110
111 * elf-m10300.c (bfd_mn10300_elf_size_dynamic_sections): Use
112 info->executable not info->shared to decide if a .interp section
113 should be present.
114 * elf32-arm.h (elf32_arm_size_dynamic_sections): Likewise.
115 * elf32-cris.c (elf_cris_size_dynamic_sections): Likewise.
116 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
117 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
118 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
119 * elf32-vax.c (elf_vax_size_dynamic_sections): Likewise.
120 * elf32-xtensa.c (elf_xtensa_size_dynamic_sections): Likewise.
121 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
122 * elfxx-mips.c (_bfd_mips_size_dynamic_sections): Likewise.
123 * elflink.h (size_dynamic_sections): Likewise.
124
125 2003-11-10 Jonathan Wilson <jonwil@tpgi.com.au>
126
127 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Swap out tls pointer.
128 (_bfd_XXi_final_link_postscript): Look for __tks_used symbol. If
129 found initialise the tls data directory entry.
130
131 2003-11-07 Alan Modra <amodra@bigpond.net.au>
132
133 * elf32-ppc.c (ppc_elf_install_value): Delete.
134 (shared_stub_entry, stub_entry): Make them arrays of ints.
135 Remove initial branch.
136 (ppc_elf_relax_section): Write one branch around all trampolines
137 instead. Correct bogus R_PPC_PLTREL24 handling. Correct
138 branch range check. Only use shared_stub_entry when shared.
139 Test that branches can reach stubs. Write trampolines out at
140 end so that just one realloc is used. Handle little-endian
141 mode. Move relevant code from ppc_elf_install_value to here.
142 (ppc_elf_relocate_section): Move code handling RELAX32 from
143 ppc_elf_install_value to here.
144
145 2003-11-06 Alan Modra <amodra@bigpond.net.au>
146
147 * elf32-ppc.c (ppc_elf_howto_raw); Add entry for R_PPC_RELAX32PC.
148 (ppc_elf_install_value): Handle R_PPC_RELAX32PC. Merge duplicate
149 cases.
150 (shared_stub_entry): Correct opcode.
151 (ppc_elf_relax_section): Generate R_PPC_RELAX32PC relocs.
152 (ppc_elf_relocate_section): Handle them.
153
154 2003-11-05 Alan Modra <amodra@bigpond.net.au>
155
156 * elf.c (_bfd_elf_rela_local_sym): Accept asection **, and return
157 updated section in case of merged section.
158 * elf-bfd.h (_bfd_elf_rela_local_sym): Update declaration.
159 * elf-hppa.h (elf_hppa_relocate_section): Adjust call.
160 * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
161 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
162 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
163 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
164 * elf32-cris.c (cris_elf_relocate_section): Likewise.
165 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
166 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
167 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
168 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
169 * elf32-i370.c (i370_elf_relocate_section): Likewise.
170 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
171 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
172 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
173 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
174 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
175 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
176 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
177 * elf32-s390.c (elf_s390_relocate_section): Likewise.
178 * elf32-sh.c (sh_elf_relocate_section): Likewise.
179 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
180 * elf32-v850.c (v850_elf_relocate_section) Likewise.
181 * elf32-vax.c (elf_vax_relocate_section): Likewise.
182 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
183 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
184 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
185 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
186 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
187 * elf64-s390.c (elf_s390_relocate_section): Likewise.
188 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
189 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
190 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
191 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
192
193 * elf32-cris.c (cris_elf_relocate_section): Don't recalculate symbol
194 section for reloc output.
195 * elf32-i370.c (i370_elf_relocate_section): Likewise.
196 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
197 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
198 * elf32-vax.c (elf_vax_relocate_section): Likewise.
199 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
200 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
201
202 * elf32-ppc.c (ppc_elf_relocate_section): Don't recalculate everything
203 for R_PPC_RELAX32 reloc. Don't bother checking ppc_elf_install_value
204 return value.
205 * elf64-ppc.c (ppc64_elf_relocate_section <R_PPC64_TOC>): Sanity check
206 sec->id.
207
208 2003-11-05 Alan Modra <amodra@bigpond.net.au>
209
210 * elf32-d10v.c (extract_rel_addend, insert_rel_addend): New functions.
211 (elf32_d10v_relocate_section): Use them to handle -r reloc
212 adjustments, and in place of _bfd_elf_rela_local_sym.
213
214 * cpu-iq2000.c (arch_info_struct): Warning fix.
215
216 2003-11-05 Alan Modra <amodra@bigpond.net.au>
217
218 * elf32-hppa.c (ELIMINATE_COPY_RELOCS): Define.
219 (elf32_hppa_copy_indirect_symbol): Don't copy NON_GOT_REF on
220 weakdefs.
221 (elf32_hppa_check_relocs): Use ELIMINATE_COPY_RELOCS.
222 (elf32_hppa_adjust_dynamic_symbol): Likewise. Copy weakdef
223 NON_GOT_REF.
224 (allocate_dynrelocs): Use ELIMINATE_COPY_RELOCS and
225 SYMBOL_CALLS_LOCAL. Discard relocs for undef weak syms with
226 non-default visibility.
227 (elf32_hppa_relocate_section): Use ELIMINATE_COPY_RELOCS and
228 SYMBOL_CALLS_LOCAL.
229
230 2003-11-04 Alan Modra <amodra@bigpond.net.au>
231
232 * aout-target.h, aoutf1.h, bfdio.c, bfdwin.c: Update copyright date.
233 * coff-apollo.c, coff-sparc.c, coff-w65.c, coff-we32k.c: Ditto.
234 * coff-z8k.c, coffgen.c, cpu-frv.c, cpu-h8500.c, cpu-hppa.c: Ditto.
235 * cpu-ia64-opc.c, cpu-m10300.c, cpu-mips.c, cpu-msp430.c: Ditto.
236 * cpu-rs6000.c, cpu-z8k.c, efi-app-ia32.c, elf32-am33lin.c: Ditto.
237 * gen-aout.c, hash.c, hp300hpux.c, init.c, mach-o.c: Ditto.
238 * nlm-target.h, nlm.c, som.h, stabs.c, sysdep.h, xsym.h: Ditto.
239
240 * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Fix
241 "dereferencing type-punned pointer" warnings.
242
243 * aout-adobe.c (aout_adobe_set_section_contents): Constify location.
244 * aoutx.h (NAME(aout,set_section_contents)): Ditto.
245 * bfd-in2.h: Regenerate.
246 * binary.c (binary_set_section_contents): Ditto.
247 * bout.c (b_out_set_section_contents): Ditto.
248 * coff-tic54x.c (tic54x_set_section_contents): Ditto.
249 * coffcode.h (coff_set_section_contents): Ditto.
250 * ecoff.c (_bfd_ecoff_set_section_contents): Ditto.
251 * elf-bfd.h (_bfd_elf_set_section_contents): Ditto.
252 * elf.c (_bfd_elf_set_section_contents): Ditto.
253 * elfxx-mips.c (_bfd_mips_elf_set_section_contents): Ditto.
254 * elfxx-mips.h (_bfd_mips_elf_set_section_contents): Ditto.
255 * i386msdos.c (msdos_set_section_contents): Ditto.
256 * ieee.c (ieee_set_section_contents): Ditto.
257 * ihex.c (ihex_set_section_contents): Ditto.
258 * libaout.h (NAME(aout,set_section_contents)): Ditto.
259 * libbfd-in.h (_bfd_nowrite_set_section_contents): Ditto.
260 (_bfd_generic_set_section_contents): Ditto.
261 * libbfd.h: Regenerate.
262 * libbfd.c (_bfd_generic_set_section_contents): Ditto.
263 * libecoff.h (_bfd_ecoff_set_section_contents): Ditto.
264 * libnlm.h (nlmNAME(set_section_contents)): Ditto.
265 (struct nlm_backend_data <nlm_mangle_relocs>): Ditto.
266 * mmo.c (mmo_set_section_contents): Ditto.
267 * nlm32-alpha.c (nlm_alpha_mangle_relocs): Ditto.
268 * nlm32-i386.c (nlm_i386_mangle_relocs): Ditto.
269 * nlm32-ppc.c (nlm_powerpc_mangle_relocs): Ditto.
270 * nlm32-sparc.c (nlm_sparc_mangle_relocs): Ditto.
271 * nlmcode.h (nlm_set_section_contents): Ditto.
272 * oasys.c (oasys_set_section_contents): Ditto.
273 * pdp11.c (NAME(aout,set_section_contents)): Ditto.
274 * ppcboot.c (ppcboot_set_section_contents): Ditto.
275 * srec.c (srec_set_section_contents): Ditto.
276 * targets.c (BFD_JUMP_TABLE_WRITE <_bfd_set_section_contents>): Ditto.
277 * tekhex.c (tekhex_set_section_contents): Ditto.
278 (move_section_contents): Ditto.
279 * versados.c (versados_set_section_contents): Ditto.
280 * vms-misc.c (_bfd_save_vms_section): Ditto.
281 * vms.c (vms_set_section_contents): Ditto.
282 * vms.h (_bfd_save_vms_section): Ditto.
283
284 2003-11-04 Alan Modra <amodra@bigpond.net.au>
285
286 * elf64-ppc.c (ppc_size_one_stub): Size relbrlt. Accept info arg
287 rather than htab.
288 (ppc64_elf_size_stubs): Adjust ppc_size_one_stub traversal. Zero
289 relbrlt size.
290 (ppc64_elf_build_stubs): Allocate space for relbrlt.
291
292 2003-11-04 Alan Modra <amodra@bigpond.net.au>
293
294 * bfd-in.h (_bfd_elf_tls_setup): Declare.
295 * bfd-in2.h: Regenerate.
296 * elf-bfd.h (struct elf_link_tls_segment): Delete.
297 (struct elf_link_hash_table): Add tls_sec and tls_size.
298 * elf.c (_bfd_elf_link_hash_table_init): Init tls_sec and tls_size.
299 * elflink.c (_bfd_elf_tls_setup): New function.
300 * elflink.h (struct elf_final_link_info): Remove first_tls_sec.
301 (elf_bfd_final_link): Don't set first_tls_sec here. Update code
302 saving tls segment info, round segment size up.
303 (elf_link_output_extsym): Adjust code using tls segment info.
304 (elf_link_input_bfd): Likewise.
305 * elf32-i386.c (dtpoff_base, tpoff): Likewise.
306 * elf32-s390.c (dtpoff_base, tpoff): Likewise.
307 * elf32-sh.c (dtpoff_base, tpoff): Likewise.
308 * elf32-sparc.c (dtpoff_base, tpoff): Likewise.
309 * elf64-s390.c (dtpoff_base, tpoff): Likewise.
310 * elf64-x86-64.c (dtpoff_base, tpoff): Likewise.
311 * elfxx-ia64.c (elfNN_ia64_tprel_base): Likewise.
312 (elfNN_ia64_dtprel_base): Likewise.
313 * elf64-alpha.c (alpha_get_dtprel_base): Likewise.
314 (alpha_get_tprel_base): Likewise.
315 (struct alpha_relax_info): Remove tls_segment.
316 (elf64_alpha_relax_got_load): Adjust invocation of
317 alpha_get_dtprel_base and alpha_get_tprel_base.
318 (elf64_alpha_relax_tls_get_addr): Likewise.
319 (elf64_alpha_relax_section): Likewise.
320 (elf64_alpha_relocate_section): Likewise.
321 (elf64_alpha_relax_find_tls_segment): Delete.
322 * elf32-ppc.c (struct ppc_elf_link_hash_table): Remove tls_sec.
323 (ppc_elf_tls_setup): Call _bfd_elf_tls_setup. Return section.
324 (ppc_elf_relocate_section): Adjust to use elf.tls_sec.
325 * elf32-ppc.h (ppc_elf_tls_setup): Update.
326 * elf64-ppc.c (struct ppc_link_hash_table): Remove tls_sec.
327 (ppc64_elf_tls_setup): Call _bfd_elf_tls_setup. Return section.
328 (ppc64_elf_tls_optimize): Adjust to use elf.tls_sec.
329 (ppc64_elf_relocate_section): Likewise.
330 * elf64-ppc.h (ppc64_elf_tls_setup): Update.
331
332 2003-11-03 Daniel Jacobowitz <drow@mvista.com>
333
334 * elf-bfd.h (struct elf_backend_data): Remove plt_header_size.
335 * elf-m10300.c (elf_backend_plt_header_size): Don't define.
336 * elf32-arm.h (elf_backend_plt_header_size): Don't define.
337 * elf32-cris.c (elf_backend_plt_header_size): Don't define.
338 * elf32-i386.c (elf_backend_plt_header_size): Don't define.
339 * elf32-mips.c (elf_backend_plt_header_size): Don't define.
340 * elf32-ppc.c (elf_backend_plt_header_size): Don't define.
341 * elf32-s390.c (elf_backend_plt_header_size): Don't define.
342 * elf32-sh.c (elf_backend_plt_header_size): Don't define.
343 * elf32-sparc.c (elf_backend_plt_header_size): Don't define.
344 * elf64-alpha.c (elf_backend_plt_header_size): Don't define.
345 * elf64-hppa.c (elf_backend_plt_header_size): Don't define.
346 * elf64-mips.c (elf_backend_plt_header_size): Don't define.
347 * elf64-ppc.c (elf_backend_plt_header_size): Don't define.
348 * elf64-s390.c (elf_backend_plt_header_size): Don't define.
349 * elf64-sh64.c (elf_backend_plt_header_size): Don't define.
350 * elf64-sparc.c (elf_backend_plt_header_size): Don't define.
351 * elf64-x86-64.c (elf_backend_plt_header_size): Don't define.
352 * elfn32-mips.c (elf_backend_plt_header_size): Don't define.
353 * elfxx-ia64.c (elf_backend_plt_header_size): Don't define.
354 * elfxx-target.h (elf_backend_plt_header_size): Don't define
355 or include in target initializer.
356
357 2003-11-03 Andrew Cagney <cagney@redhat.com>
358
359 * section.c (bfd_set_section_contents): Make the "location" buffer
360 constant.
361 * bfd-in2.h: Re-generate.
362
363 2003-10-30 Andrew Cagney <cagney@redhat.com>
364
365 * syms.c: Replace "struct symbol_cache_entry" with "struct
366 bfd_symbol".
367 * vms.h, targets.c, section.c, reloc.c, peicode.h: Ditto.
368 * mipsbsd.c, elf.c, linker.c, elf-bfd.h, ecoff.c: Ditto.
369 * cpu-z8k.c, cpu-ns32k.c, cpu-h8500.c, bfd.c, bfd-in.h: Ditto.
370 * bfd-in2.h: Re-generate.
371
372 2003-10-30 Jakub Jelinek <jakub@redhat.com>
373
374 * elfxx-ia64.c: Include objalloc.h, hashtab.h.
375 (struct elfNN_ia64_local_hash_entry): Remove root. Add id and r_sym
376 fields.
377 (struct elfNN_ia64_local_hash_table): Remove.
378 (struct elfNN_ia64_link_hash_table): Change loc_hash_table's type
379 to htab_t. Add loc_hash_memory field.
380 (elfNN_ia64_local_hash_table_init, elfNN_ia64_new_loc_hash_entry):
381 Removed.
382 (elfNN_ia64_local_htab_hash, elfNN_ia64_local_htab_eq): New
383 functions.
384 (elfNN_ia64_hash_table_create): Use hashtab.h hashtable for
385 loc_hash_table. Initialize loc_hash_memory.
386 (elfNN_ia64_hash_table_free): New function.
387 (elfNN_ia64_local_hash_lookup): Remove.
388 (elfNN_ia64_local_dyn_sym_thunk): Change into htab_traverse
389 callback.
390 (elfNN_ia64_dyn_sym_traverse): Use htab_traverse.
391 (get_local_sym_hash): Use hashtab.h hashtable for loc_hash_table.
392 (bfd_elfNN_bfd_link_hash_table_free): Define.
393
394 2003-10-30 Alan Modra <amodra@bigpond.net.au>
395
396 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Modify versioned
397 symbol string in place.
398
399 2003-10-30 Jim Blandy <jimb@redhat.com>
400
401 * cpu-rs6000.c (rs6000_compatible): Check the correct arch_info
402 object's mach field: all PowerPC machines are supersets of the
403 original rs6000, but not later rs6000 machines.
404
405 2003-10-30 Alan Modra <amodra@bigpond.net.au>
406
407 * dwarf2.c (struct attribute): Delete "unsnd", "snd" and "addr".
408 Add "val" and "sval" fields.
409 (DW_STRING, DW_UNSND, DW_BLOCK, DW_SND, DW_ADDR): Delete.
410 (read_attribute_value): Expand and adjust DW_* occurrences.
411 (scan_unit_for_functions, parse_comp_unit): Likewise.
412
413 2003-10-30 Phil Edwards <phil@codesourcery.com>
414
415 * config.bfd (arm-*-vxworks): Remove separate stanza; merge with
416 other common ELF triples.
417 (i[3-7]86-*-vxworks): Change to ELF format.
418 (mips*-*-windiss): New triple, add to common MIPS/ELF stanza.
419 (sh-*-vxworks): New stanza.
420
421 2003-10-30 Lars Knoll <lars@trolltech.com>
422 Michael Matz <matz@suse.de>
423 Jakub Jelinek <jakub@redhat.com>
424 Alan Modra <amodra@bigpond.net.au>
425
426 * merge.c (struct sec_merge_sec_info): Update comment.
427 (struct sec_merge_hash_entry): Remove entsize.
428 (sec_merge_hash_lookup): Only adjust alignment when creating.
429 (sec_merge_emit): Remove register keyword.
430 (cmplengthentry, last4_eq, last_eq): Delete.
431 (strrevcmp, strrevcmp_align, is_suffix): New.
432 (merge_strings): Use them to implement fast suffix merging.
433 * elf-strtab.c (struct elf_strtab_hash_entry): Update comments.
434 Make "len" signed.
435 (_bfd_elf_strtab_add): Lose on >2G strings.
436 (_bfd_elf_strtab_emit): Don't emit strings with len < 0.
437 (cmplengthentry, last4_eq): Delete.
438 (strrevcmp, is_suffix): New.
439 (_bfd_elf_strtab_finalize): Rework to implement fast suffix merging.
440
441 2003-10-29 Daniel Jacobowitz <drow@mvista.com>
442
443 * elf32-arm.h (elf32_arm_final_link_relocate): Move check for
444 SEC_ALLOC.
445
446 2003-10-29 Philip Blundell <philb@gnu.org>
447
448 * elf32-arm.h (elf32_arm_plt0_entry, elf32_arm_plt_entry): New
449 code sequence.
450 (PLT_HEADER_SIZE): New.
451 (struct elf32_arm_pcrel_relocs_copied): Rename to ...
452 (struct elf32_arm_relocs_copied): ... this. Count both
453 pcrel and non-pcrel relocs. All uses updated.
454 (struct elf32_arm_link_hash_table): Add pointers to dynamic linker
455 sections and symbol/section mapping cache.
456 (create_got_section): New.
457 (elf32_arm_create_dynamic_sections): New.
458 (elf_backend_create_dynamic_sections): Use it.
459 (elf32_arm_final_link_relocate): Support garbage collection of relocs.
460 (elf32_arm_check_relocs): Likewise.
461 (elf32_arm_adjust_dynamic_symbol): Likewise.
462 (elf32_arm_copy_indirect_symbol): New.
463 (elf32_arm_link_hash_table_create): Initialise new fields.
464 (elf32_arm_gc_sweep_hook): Implement.
465 (elf32_arm_discard_copies): Delete.
466 (elf32_arm_finish_dynamic_symbol): Use new PLT code.
467 (elf32_arm_finish_dynamic_sections): Likewise.
468 (elf_backend_can_refcount): Define.
469 (elf_backend_copy_indirect_symbol): Likewise.
470 (elf_backend_plt_header_size): Set to PLT_HEADER_SIZE.
471
472 2003-10-29 Alan Modra <amodra@bigpond.net.au>
473
474 * elf64-ppc.c (elf_backend_grok_prstatus): Define.
475 (elf_backend_grok_psinfo): Define.
476 (ppc64_elf_grok_prstatus, ppc64_elf_grok_psinfo): New functions.
477
478 * elf.c (_bfd_elfcore_make_pseudosection): Allow multiple
479 sections with the same name.
480 (elfcore_grok_lwpstatus): Likewise.
481 (elfcore_grok_win32pstatus): Likewise.
482 (elfcore_grok_note): Likewise.
483 (elfcore_grok_nto_status): Likewise.
484 (elfcore_grok_nto_gregs): Likewise.
485
486 2003-10-27 Daniel Jacobowitz <drow@mvista.com>
487
488 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Never skip dynamic
489 objects.
490
491 2003-10-14 Richard Sandiford <rsandifo@redhat.com>
492
493 * elfxx-mips.c (mips_elf_create_got_section): Initialize global_gotno.
494
495 2003-10-24 H.J. Lu <hongjiu.lu@intel.com>
496
497 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Look up
498 hash table for real symbols.
499
500 2003-10-23 Michael Snyder <msnyder@redhat.com>
501
502 * section.c (asection): Fix typo in comment.
503
504 2003-10-23 Alan Modra <amodra@bigpond.net.au>
505
506 * elf64-ppc.c (get_tls_mask): Add toc_symndx param, save toc
507 reloc symbol index to it. Don't allow gd syms in shared libs
508 to be optimized.
509 (ppc64_elf_tls_optimize): Adjust get_tls_mask call.
510 (ppc64_elf_size_stubs): Likewise.
511 (ppc64_elf_relocate_section): Check that tls relocs are only used
512 with tls syms, and similarly for non-tls. Correct symbol used
513 when optimizing toc tls code.
514
515 2003-10-22 Nick Clifton <nickc@redhat.com>
516
517 * peicode.h (coff_swap_scnhdr_in): Only remove padding when
518 processing an executable.
519
520 2003-10-22 Jakub Jelinek <jakub@redhat.com>
521
522 * elflink.c (_bfd_elf_export_symbol): Adjust for globals and locals
523 field changes.
524 (_bfd_elf_link_assign_sym_version): Likewise.
525 * elflink.h (size_dynamic_sections): Likewise.
526
527 2003-10-21 Alexandre Oliva <aoliva@redhat.com>,
528 Michael Snyder <msnyder@redhat.com>
529
530 * archures.c (bfd_mach_sh4a, bfd_mach_sh4al_dsp, bfd_mach_sh4_nofpu,
531 bfd_mach_sh4a_nofpu): New machine types.
532 * bfd-in2.h: Rebuilt.
533 * cpu-sh.c (compatible): Remove unused function.
534 (SH4A_NEXT, SH4AL_DSP_NEXT, SH4_NOFPU_NEXT, SH4A_NOFPU_NEXT): New.
535 (arch_info_struct): Add sh4a, sh4al_dsp, sh4-nofpu and sh4a-nofpu.
536 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle them.
537
538 2003-10-21 Wouter van Heyst <wouter@vidicode.nl>
539
540 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Correct text
541 describing mismatched formats involving the Maverick FP type.
542
543 2003-10-21 Anil Paranjpe <anilp1@KPITCummins.com>
544
545 * binary.c (binary_object_p): Pass machine flag along with
546 architecture.
547
548 2003-10-21 Thorsten Brehm <brehm@gmx.net>
549
550 * archures.c (bfd_default_scan): Add support for mcf528x.
551 * ieee.c (ieee_write_processor): Likewise.
552
553 2003-10-21 Peter Barada <pbarada@mail.wm.sps.mot.com>
554 Bernardo Innocenti <bernie@develer.com>
555
556 * archures.c: Add MCF528x (MCFv4) support.
557 * bfd/cpu-m68k.c (arch_info_struct): Likewise.
558 * bfd-in2.h: Regenerate.
559
560 2003-10-20 Andrew Cagney <cagney@redhat.com>
561
562 * targets.c: Replace "struct sec" with "struct bfd_section"
563 * syms.c, sparclynx.c, section.c, opncls.c: Ditto.
564 * libcoff-in.h, libbfd-in.h, elfxx-target.h: Ditto.
565 * elf.c, coffgen.c, bfd.c, bfd-in.h, aoutf1.h: Ditto.
566 * aout-tic30.c, aout-target.h:
567 * bfd-in2.h, libcoff.h, libbfd.h: Regenerate.
568
569 2003-10-18 Hans-Peter Nilsson <hp@bitrange.com>
570
571 Support linker relaxation of new R_MMIX_PUSHJ_STUBBABLE relocs.
572 * elf64-mmix.c (MAX_PUSHJ_STUB_SIZE): New macro.
573 (struct _mmix_elf_section_data): New member pjs.
574 (mmix_set_relaxable_size, mmix_elf_get_section_contents): New
575 functions.
576 (elf_mmix_howto_table): New entry for R_MMIX_PUSHJ_STUBBABLE.
577 (mmix_reloc_map): Ditto.
578 (mmix_elf_relocate_section): Handle R_MMIX_PUSHJ_STUBBABLE.
579 (mmix_final_link_relocate, mmix_elf_check_common_relocs): Ditto.
580 (mmix_elf_perform_relocation): Ditto. Don't mark parameter addr
581 unused.
582 (mmix_elf_check_relocs): Move early return to after
583 mmix_elf_check_common_relocs call.
584 (mmix_elf_symbol_processing): Fix cut-and-pasto in head comment.
585 (_bfd_mmix_before_linker_allocation): Rename from
586 _bfd_mmix_prepare_linker_allocated_gregs. All referers changed.
587 Arrange to set the initial relaxable size of sections.
588 (_bfd_mmix_after_linker_allocation): Rename from
589 _bfd_mmix_finalize_linker_allocated_gregs.
590 (mmix_elf_relax_section): Relax a R_MMIX_PUSHJ_STUBBABLE reloc.
591 (bfd_elf64_get_section_contents): Define.
592 * reloc.c: Add ENUMX for BFD_RELOC_MMIX_PUSHJ_STUBBABLE.
593 * libbfd.h, bfd-in2.h: Regenerate.
594
595 * reloc.c (bfd_generic_relax_section): Default-set
596 section->_cooked_size here.
597 (bfd_generic_get_relocated_section_contents): Don't set it here.
598 Explain why.
599
600 2003-10-17 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
601
602 * elf32-hppa.c (elf32_hppa_relocate_section): Skip relocation if
603 output section has been discarded.
604
605 2003-10-17 Shrinivas Atre <shrinivasa@KPITCummins.com>
606
607 * coff-h8300.c (funcvec_hash_newfunc): Handle normal mode.
608 (h8300_reloc16_extra_cases): Likewise.
609 (h8300_bfd_link_add_symbols): Likewise.
610
611 2003-10-17 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
612
613 * cpu-h8300.c (h8300sxn_info_struct): Correct address size.
614 (h8300sn_info_struct): Likewise.
615 (h8300hn_info_struct): Likewise.
616
617 2003-10-16 Pavel Roskin <proski@gnu.org>
618
619 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Don't calculate image size
620 for sections which lack size info.
621
622 2003-10-17 Danny Smith <dannysmith@users.sourceforge.net>
623
624 * configure.host: Add __USE_MINGW_FSEEK to HDEFINES for
625 mingw32.
626
627 2003-10-16 H.J. Lu <hongjiu.lu@intel.com>
628
629 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Also warn
630 undefined patterns with '*'.
631
632 2003-10-16 H.J. Lu <hongjiu.lu@intel.com>
633
634 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't
635 use the last CIE from a different section.
636 (_bfd_elf_write_section_eh_frame): Don't pad beyond the raw
637 size of the output section.
638
639 2003-10-07 Roland McGrath <roland@redhat.com>
640
641 * elf.c (_bfd_elf_make_section_from_phdr): Set alignment_power of
642 new section from p_align header field.
643
644 2003-10-16 H.J. Lu <hongjiu.lu@intel.com>
645
646 * elf32-xtensa.c (xtensa_read_table_entries): The external size
647 of entry is 8 bytes.
648
649 2003-10-15 Andrew Cagney <cagney@redhat.com>
650
651 * targets.c (BFD_JUMP_TABLE_SYMBOLS): Replace NAME##_get_symtab
652 with NAME##_canonicalize_symtab.
653 * libcoff-in.h (coff_canonicalize_symtab): Update.
654 * xsym.h (bfd_sym_canonicalize_symtab): Update.
655 * elf-bfd.h (_bfd_elf_canonicalize_symtab): Update.
656 * coffgen.c (coff_canonicalize_symtab): Update.
657 * libbfd-in.h (_bfd_nosymbols_canonicalize_symtab): Update.
658 * libnlm.h (nlmNAME(canonicalize_symtab)): Update.
659 * ieee.c (ieee_vec): Update comment.
660 * libecoff.h (_bfd_ecoff_canonicalize_symtab): Update.
661 * mmo.c (mmo_canonicalize_symtab): Update.
662 * nlm-target.h (nlm_canonicalize_symtab): Update.
663 * nlmcode.h (nlm_canonicalize_symtab): Update.
664 * i386msdos.c (msdos_canonicalize_symtab): Update.
665 * hp300hpux.c (MY (canonicalize_symtab)): Update.
666 * oasys.c (oasys_canonicalize_symtab): Update.
667 * som.c (som_canonicalize_symtab): Update.
668 * pef.c (bfd_pef_canonicalize_symtab): Update.
669 * nlmcode.h (nlm_canonicalize_symtab): Update.
670 * xsym.c (bfd_sym_canonicalize_symtab): Update.
671 * vms.c (vms_canonicalize_symtab): Update.
672 * versados.c (versados_canonicalize_symtab): Update.
673 * mach-o.c (bfd_mach_o_canonicalize_symtab): Update.
674 * ieee.c (ieee_canonicalize_symtab): Update.
675 * pdp11.c (NAME(aout,canonicalize_symtab)): Update.
676 * reloc.c: Update comment.
677 * libaout.h (NAME(aout,canonicalize_symtab)): Update.
678 * coff64-rs6000.c (aix5coff64_vec): Update.
679 * coff64-rs6000.c (bfd_xcoff_aix5_backend_data): Update.
680 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update.
681 * aoutx.h (NAME(aout,canonicalize_symtab)): Update.
682 * elfxx-target.h (bfd_elfNN_canonicalize_symtab): Update.
683 * hp300hpux.c (MY_canonicalize_symtab): Update.
684 * ecoff.c (_bfd_ecoff_canonicalize_symtab): Update.
685 * aout-tic30.c (MY_canonicalize_symtab): Update.
686 * aout-target.h (MY_canonicalize_symtab): Update.
687 * ppcboot.c (ppcboot_canonicalize_symtab): Update.
688 * elf.c (_bfd_elf_canonicalize_symtab): Update.
689 * elfcode.h (elf_canonicalize_symtab): Update.
690 * ihex.c (ihex_canonicalize_symtab): Update.
691 * tekhex.c (tekhex_canonicalize_symtab): Update.
692 * binary.c (binary_canonicalize_symtab): Update.
693 * srec.c (srec_canonicalize_symtab): Update.
694
695 2003-10-15 Kazu Hirata <kazu@cs.umass.edu>
696
697 * elf32-h8300.c (elf_reloc_map): Fix a comment typo.
698
699 2003-10-15 Kaz Kojima <kkojima@rr.iij4u.or.jp>
700
701 * elf32-sh.c (sh_elf_relocate_section): Handle R_SH_IMM_*_PCREL
702 relocations.
703 (sh_elf_check_relocs): Likewise.
704
705 * elf32-sh64.c (elf_backend_merge_symbol_attribute): Define.
706 (sh64_elf_merge_symbol_attribute): New.
707 * elf64-sh64.c (elf_backend_merge_symbol_attribute): Define.
708 (sh64_elf64_merge_symbol_attribute): New.
709
710 2003-10-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
711
712 * elf-bfd.h (struct elf_backend_data): New function pointer member
713 elf_backend_merge_symbol_attribute.
714 * elflink.h (elf_link_add_object_symbols): Adjust call to
715 elf_backend_merge_symbol_attribute if the backend defined it.
716 * elfxx-target.h (elf_backend_merge_symbol_attribute): New macro.
717 (elfNN_bed): Add that to the initializer.
718
719 2003-10-14 Bob Wilson <bob.wilson@acm.org>
720
721 * elf32-xtensa.c (get_is_linkonce_section): Delete.
722 (xtensa_is_property_section, xtensa_is_littable_section): Use
723 XTENSA_INSN_SEC_NAME and XTENSA_LIT_SEC_NAME macros. Do not recognize
724 linkonce sections containing ".xt.insn" and ".xt.lit" substrings.
725 (xtensa_get_property_section_name): Check section name instead of
726 calling get_is_linkonce_section. Remove unused bfd parameter. Use
727 XTENSA_INSN_SEC_NAME and XTENSA_LIT_SEC_NAME macros. Never generate
728 linkonce section names by appending ".xt.insn" or ".xt.lit".
729 (xtensa_read_table_entries): Remove bfd argument in call to
730 xtensa_get_property_section_name. Free section name when done.
731 (elf_xtensa_combine_prop_entries): Free leaking table.
732
733 2003-10-13 Richard Sandiford <rsandifo@redht.com>
734
735 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Don't add
736 DT_MIPS_LIBLIST or DT_MIPS_CONFLICT entries.
737 (_bfd_mips_elf_finish_dynamic_symbol): Don't handle them. Don't
738 handle DT_MIPS_MSYM. Set DT_RELSZ based on the number of relocations
739 that were needed.
740 (_bfd_mips_elf_modify_segment_map): Fix placement of PT_MIPS_OPTIONS.
741 (_bfd_mips_elf_merge_private_bfd_data): Ignore EF_MIPS_UCODE.
742
743 2003-10-13 H.J. Lu <hongjiu.lu@intel.com>
744
745 * bfd-in.h (bfd_elf32_ia64_after_parse): New prototype.
746 (bfd_elf64_ia64_after_parse): Likewise.
747 * bfd-in2.h: Regenerated.
748
749 * elfxx-ia64.c (oor_ip): New.
750 (oor_branch_size): Likewise.
751 (bfd_elfNN_ia64_after_parse): Likewise.
752 (elfNN_ia64_relax_section): Use oor_ip if oor_branch_size
753 equals sizeof (oor_ip).
754
755 2003-10-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
756
757 * elf64-sh64.c (sh_elf64_relocate_section): Tidy up for the
758 renumbering of some relocation numbers.
759
760 2003-10-11 Alan Modra <amodra@bigpond.net.au>
761
762 * coff-sh.c: Move definition of MAP and guard more code with
763 COFF_IMAGE_WITH_PE.
764
765 * section.c (bfd_get_section_size_before_reloc): Ignore reloc_done.
766 * bfd-in2.h: Regenerate.
767
768 2003-10-10 H.J. Lu <hongjiu.lu@intel.com>
769
770 * Makefile.am: Run "make dep-am".
771 * Makefile.in: Regenerate.
772 * doc/Makefile.in: Likewise.
773
774 2003-10-09 H.J. Lu <hongjiu.lu@intel.com>
775
776 * cofflink.c: Include "safe-ctype.h".
777 (coff_link_add_symbols): Use ISDIGIT instead of isdigit.
778
779 2003-10-08 Dave Brolley <brolley@redhat.com>
780 On behalf of Michael Snyder <msnyder@redhat.com>
781
782 * archures.c: Add FRV fr550 machine.
783 * cpu-frv.c: Ditto.
784 * elf32-frv.c: Ditto.
785 * bfd-in2.h: Regenerate.
786
787 2003-10-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
788
789 * elfxx-mips.c (STUB_MOVE,STUB_LI16): Fix stub code
790 for non-SGI N64 ABI. Improve code consitency.
791
792 2003-10-07 Alexandre Oliva <aoliva@redhat.com>
793
794 * elf32-frv.c (elf32_frv_howto_table): Set R_FRV_LABEL16's
795 rightshift to 2.
796
797 2003-10-07 Nathan Sidwell <nathan@codesourcery.com>
798
799 * libbfd-in.h (_bfd_link_section_stabs): Add string offset
800 parameter.
801 * cofflink.c (coff_link_add_symbols): Deal with split stab
802 sections.
803 * elflink.h (elf_link_add_object_symbols): Deal with split stab
804 sections.
805 * stabs.c (_bfd_link_section_stabs): Add string offset parameter.
806 * libbfd.h: Regenerated.
807
808 * coffcode.h (coff_set_alignment_hook): With PE_COFF reloc
809 overflow, set reloc start position to after the count
810 reloc. Subtract one from num relocs. Give error on 0xffff relocs
811 and no overflow.
812 * cofflink.c (_bfd_coff_final_link): Deal with PE_COFF reloc
813 overflow.
814 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Do overflow if >=
815 0xffff.
816
817 2003-10-06 H.J. Lu <hongjiu.lu@intel.com>
818
819 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Pad the
820 last CIE/FDE if needed.
821
822 2003-10-06 Nick Clifton <nickc@redhat.com>
823
824 * targets.c (_bfd_target_vector): Include bfd_elf64_sparc_vec if
825 BFD64 is enabled.
826
827 2003-10-06 Matt Thomas <matt@3am-software.com>
828
829 * config.bfd: Move the hppa*-*-netbsd* case to the hppa*-*-linux* case.
830
831 2003-10-06 Robert Millan <robertmh@gnu.org>
832
833 * configure.in: Match GNU/KNetBSD with new knetbsd*-gnu triplet.
834 * config.bfd: Likewise.
835 * configure: Regenerate.
836
837 2003-10-04 Christian Groessler <chris@groessler.org>
838
839 * coff-z8k.c (extra_case): Fix displacement length check for R_JR
840 and R_CALLR.
841
842 2003-10-04 Stephane Carrez <stcarrez@nerim.fr>
843
844 * elf32-m68hc1x.c: Update to ISO C90; replace PTR with void*.
845 * elf32-m68hc11.c: Likewise.
846 * elf32-m68hc12.c: Likewise.
847 * elf32-m68hc1x.h: Likewise.
848
849 2003-10-04 Stephane Carrez <stcarrez@nerim.fr>
850
851 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Fix merge
852 of flags between HC12 and HCS12.
853
854 2003-10-04 Bryce McKinlay <bryce@mckinlay.net.nz>
855
856 * merge.c (_bfd_merge_sections): Set SEC_EXCLUDE flag on sections
857 which become empty after merging.
858
859 2003-09-30 Jakub Jelinek <jakub@redhat.com>
860
861 * elfxx-ia64.c (ia64_howto_table): Fix size of R_IA64_TPREL64[LM]SB,
862 R_IA64_DTPREL{32,64}[LM]SB and R_IA64_DTPMOD64[LM]SB.
863
864 2003-09-30 Chris Demetriou <cgd@broadcom.com>
865
866 * archures.c (bfd_mach_mipsisa64r2): New define.
867 * bfd-in2.h: Regenerate.
868 * aoutx.h (NAME(aout,machine_type)): Handle bfd_mach_mipsisa64r2.
869 * cpu-mips.c (I_mipsisa64r2): New enum value.
870 (arch_info_struct): Add entry for I_mipsisa64r2.
871 * elfxx-mips.c (_bfd_elf_mips_mach)
872 (_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_64R2.
873 (mips_set_isa_flags): Add bfd_mach_mipsisa64r2 case.
874 (mips_mach_extensions): Add entry for bfd_mach_mipsisa64r2.
875
876 2003-09-29 H.J. Lu <hongjiu.lu@intel.com>
877
878 * elfxx-ia64.c (elfNN_hpux_backend_symbol_processing): New.
879 Handle SHN_IA_64_ANSI_COMMON.
880 (elf_backend_section_from_bfd_section): Defined.
881
882 2003-09-26 H.J. Lu <hongjiu.lu@intel.com>
883
884 * elflink.c (elf_link_read_relocs_from_section): Add an argument
885 of a pointer to section. Check bad symbol index.
886 (_bfd_elf_link_read_relocs): Modify calls to
887 elf_link_read_relocs_from_section.
888
889 2003-09-23 DJ Delorie <dj@redhat.com>
890
891 * elf32-sh.c (sh_elf_howto_table): R_SH_SWITCH8,
892 R_SH_GNU_VTINHERIT, R_SH_GNU_VTENTRY,
893 R_SH_LOOP_START,R_SH_LOOP_END moved to "reserved" spaces,
894 R_SH_DIR16, R_SH_DIR8, R_SH_DIR8UL, R_SH_DIR8UW, R_SH_DIR8U,
895 R_SH_DIR8SW, R_SH_DIR8S, R_SH_DIR4UL, R_SH_DIR4UW, R_SH_DIR4U,
896 R_SH_PSHA, R_SH_PSHL added.
897 (sh_reloc_map): Add R_SH_DIR16 and R_SH_DIR8.
898 (sh_elf_relocate_section): Support new relocs.
899
900 2003-09-23 Bob Wilson <bob.wilson@acm.org>
901
902 * elf32-xtensa.c (elf_xtensa_relocate_section): Fix typo that clobbered
903 dynamic relocation offsets.
904
905 2003-09-23 Alan Modra <amodra@bigpond.net.au>
906
907 * simple.c (bfd_simple_get_relocated_section_contents): Free the
908 hash table using _bfd_generic_link_hash_table_free.
909
910 2003-09-23 Alan Modra <amodra@bigpond.net.au>
911
912 * elf-bfd.h (struct bfd_elf_special_section): Remove "suffix". Change
913 type of prefix_length and suffix_length to int. Rename "attributes"
914 to "attr". Comment.
915 (_bfd_elf_get_sec_type_attr): Update prototype.
916 * elf.c (get_special_section): Rewrite.
917 (_bfd_elf_get_sec_type_attr): Return struct rather than passing in
918 attr and type pointers.
919 (_bfd_elf_new_section_hook): Adjust for above.
920 (special_sections): Merge suffix with prefix. Set
921 prefix_length for all entries. Set suffix_length appropriately.
922 * elf32-m32r.c (m32r_elf_special_sections): Likewise.
923 * elf32-m68hc11.c (elf32_m68hc11_special_sections): Likewise.
924 * elf32-m68hc12.c (elf32_m68hc12_special_sections): Likewise.
925 * elf32-mcore.c (mcore_elf_special_sections): Likewise.
926 * elf32-sh64.c (sh64_elf_special_sections): Likewise.
927 * elf32-v850.c (v850_elf_special_sections): Likewise.
928 * elf32-xtensa.c (elf_xtensa_special_sections): Likewise.
929 * elf64-alpha.c (elf64_alpha_special_sections): Likewise.
930 * elf64-hppa.c (elf64_hppa_special_sections): Likewise.
931 * elf64-ppc.c (ppc64_elf_special_sections): Likewise.
932 * elf64-sh64.c (sh64_elf64_special_sections): Likewise.
933 * elfxx-ia64.c (elfNN_ia64_special_sections): Likewise.
934 * elfxx-mips.c (_bfd_mips_elf_special_sections): Likewise.
935 * elf32-ppc.c (ppc_elf_special_sections): Likewise. Fix .plt flags.
936
937 2003-09-21 Daniel Jacobowitz <drow@mvista.com>
938
939 * elf64-alpha.c (elf64_alpha_create_got_section): Initialize
940 ->got if the section already exists.
941
942 2003-09-19 Nathan Sidwell <nathan@codesourcery.com>
943
944 * dwarf2.c (decode_line_info): Cope with an initially empty
945 filename table.
946
947 2003-09-18 H.J. Lu <hongjiu.lu@intel.com>
948
949 * acinclude.m4: Include ../config/accross.m4.
950 * aclocal.m4: Regenerated.
951
952 * configure.host (HOST_64BIT_TYPE): Remove if it is set to long
953 or long long.
954 (HOST_U_64BIT_TYPE): Remove if it is set to unsigned long long.
955 (host64): Remove if HOST_64BIT_TYPE is set to long.
956
957 * configure.in (HOST_64BIT_TYPE): Set according to the size of
958 long and long long.
959 (HOST_U_64BIT_TYPE): Likewise.
960 (host64): Likewise.
961 * configure: Regenerated.
962
963 2003-09-19 Alan Modra <amodra@bigpond.net.au>
964
965 * elf.c (elfcore_write_note): Don't use sizeof(Elf_External_note)
966 since some ABIs round up the size of the struct.
967
968 2003-09-18 H.J. Lu <hongjiu.lu@intel.com>
969
970 * elflink.c (_bfd_elf_merge_symbol): Allow type change if
971 the old symbol is undefined and the new symbol is defined.
972
973 2003-09-18 Andreas Schwab <schwab@suse.de>
974
975 * simple.c (bfd_simple_get_relocated_section_contents): Use
976 _bfd_generic_link_hash_table_create instead of
977 bfd_link_hash_table_create.
978
979 2003-09-10 H.J. Lu <hongjiu.lu@intel.com>
980
981 * elfxx-ia64.c (elfNN_ia64_special_sections): Mark all sections
982 started with ".sbss" or "".sdata" as SHF_IA_64_SHORT.
983
984 2003-09-10 John David Anglin <dave.anglin@nrc-cnrc.nrc.ca>
985 Randolph Chung <randolph@tausq.org>
986
987 * elf32-hppa.c (struct elf32_hppa_link_hash_entry,
988 hppa_link_hash_newfunc, hppa_build_one_stub,
989 elf32_hppa_adjust_dynamic_symbol, mark_PIC_calls, allocate_plt_static,
990 allocate_dynrelocs, elf32_hppa_size_dynamic_sections,
991 elf32_hppa_finish_dynamic_symbol): Remove pic_call field and all code
992 for generating import stubs for calls to statically linked PIC
993 functions.
994 (hppa_type_of_stub): Don't generate an import stub for calls to
995 statically linked pic functions. Generate import stubs for calls
996 in a shared object, to functions not in a regular file, and to
997 defined weak functions. Add new argument INFO.
998 (hppa_build_one_stub): Don't undef ADDIL_DP.
999 (elf32_hppa_check_relocs): Don't set SEC_HAS_GOT_REF flag.
1000 (elf32_hppa_size_stubs): Pass info to hppa_type_of_stub.
1001 (final_link_relocate): Change all DLTIND relocs to DPREL relocs in a
1002 non-shared link. Convert instructions that use the the linkage table
1003 pointer, or a facsimile thereof, to use the global data pointer when
1004 the reloc has been changed.
1005
1006 2003-09-08 Joel Brobecker <brobecker@gnat.com>
1007
1008 * archures.c: Add new machine names for hppa.
1009 * bfd-in2.h: Regenerate.
1010 * cpu-hppa.c: Use the new machine names.
1011
1012 2003-09-06 Stephane Carrez <stcarrez@nerim.fr>
1013
1014 * elf32-m68hc1x.h (struct m68hc11_elf_link_hash_table): Remove
1015 all_local_syms member.
1016 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Use bfd_elf_get_elf_syms
1017 to get the local symbols.
1018
1019 2003-09-06 Stephane Carrez <stcarrez@nerim.fr>
1020
1021 * elf32-m68hc12.c (elf32_m68hc12_special_sections): New for hc11.
1022 (elf_backend_special_sections): Define.a
1023
1024 PR savannah/4950:
1025 * elf32-m68hc11.c (elf32_m68hc11_special_sections): The .vectors
1026 section is read-only.
1027
1028 2003-09-04 Nick Clifton <nickc@redhat.com>
1029
1030 * archures.c (bfd_mach_v850e1): Define.
1031 * bfd-in2.h: Regenerate.
1032 * cpu-v850.h (scan): Accept bfd_mach_v850e1.
1033 (arch_info_struct): Include an entry for bfd_mach_v850e1.
1034 * elf32-v850.c (v850_elf_object_p): Accept E_V850E1_ARCH flag.
1035 (v850_elf_final_write_processing): Accept bfd_mach_v850e1.
1036 (v850_elf_print_private_bfd_data): Interpret E_V850E1_ARCH flag.
1037 (v850_elf_merge_private_bfd_data): Allow v850e1 binaries to be
1038 linked with v850e binaries. Mark the output as v850e.
1039
1040 2003-09-03 Nick Clifton <nickc@redhat.com>
1041
1042 * cofflink.c (_bfd_coff_link_input_bfd): Do not skip section
1043 symbols that are used in relocs.
1044
1045 2003-08-30 Robert Millan <robertmh@gnu.org>
1046
1047 * configure.in: Match GNU/KFreeBSD with new kfreebsd*-gnu triplet.
1048 * config.bfd: Likewise.
1049 * configure: Regenerate.
1050
1051 2003-08-31 Christian Groessler <chris@groessler.org>
1052
1053 * elf32-i860.c (i860_howto_pc26_reloc): Finish relocation here
1054 instead of returning bfd_reloc_continue.
1055
1056 2003-08-31 Andreas Jaeger <aj@suse.de>
1057
1058 * merge.c: Update to ISO C90.
1059
1060 2003-08-27 Ian Lance Taylor <ian@airs.com>
1061
1062 * configure.in: Check for strtoull.
1063 * bfd.c (bfd_scan_vma): Use strtoull when available.
1064 * configure, config.in: Regenerate.
1065
1066 * configure.in: Define and substitute BFD_HOST_LONG_LONG.
1067 * bfd-in.h: Define BFD_HOST_LONG_LONG. Test it rather than
1068 __GNUC__ when deciding whether to use long long for
1069 BFD_HOST_64_BIT.
1070 * configure, Makefile.in, doc/Makefile.in, bfd-in2.h: Regenerate.
1071
1072 2003-08-27 Christian Groessler <chris@groessler.org>
1073
1074 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc,
1075 i860_howto_splitn_reloc, i860_howto_highadj_reloc): New
1076 functions.
1077 (elf32_i860_howto_table): Insert the new functions as
1078 'special_function's in the proper reloc type entries.
1079
1080 2003-08-27 Richard Sandiford <rsandifo@redhat.com>
1081
1082 * elf32-frv.c (elf32_frv_relocate_section): Use
1083 _bfd_elf_rela_local_sym.
1084
1085 2003-08-26 Michael Snyder <msnyder@redhat.com>
1086
1087 * cpu-frv.c: Remove unused enum.
1088
1089 2003-08-25 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
1090
1091 * reloc.c: Fix documentation for MIPS ELF relocations.
1092 libbfd.h: Regenerate.
1093 bfd-in2.h: Regenerate.
1094
1095 2003-08-24 Jason Eckhardt <jle@rice.edu>
1096
1097 * coff-i860.c (CALC_ADDEND): Define to be a no-op.
1098
1099 2003-08-24 Jason Eckhardt <jle@rice.edu>
1100
1101 * elf32-i860.c (elf32_i860_relocate_pc16): Subtract 4 and
1102 shift by 2 before storing the relocated value.
1103
1104 2003-08-23 Jason Eckhardt <jle@rice.edu>
1105
1106 * coff-i860.c (coff_i860_reloc_nyi): New function.
1107 (howto_table): Add entries for relocations PAIR, HIGHADJ, HIGH,
1108 LOWn, SPLITn, and BRADDR.
1109 (RTYPE2HOWTO): Check that the r_type is within the howto_table
1110 before trying to access the entry.
1111 (coff_i860_rtype_to_howto): Likewise.
1112 (coff_i860_reloc_type_lookup): New function.
1113 (i860_reloc_processing): New function.
1114 (coff_bfd_reloc_type_lookup): Define macro.
1115 (RELOC_PROCESSING): Define macro.
1116 Minor formatting adjustments.
1117
1118 2003-08-23 Alan Modra <amodra@bigpond.net.au>
1119
1120 * elflink.h (elf_link_add_object_symbols): Don't crash on NULL owner.
1121
1122 2003-08-22 H.J. Lu <hongjiu.lu@intel.com>
1123
1124 * elfxx-ia64.c (elfNN_ia64_create_dynamic_sections): Align the
1125 .got section at 8 bytes.
1126
1127 2003-08-21 Nick Clifton <nickc@redhat.com>
1128
1129 * cofflink.c: Update to ISO C90 and tidy up formatting.
1130
1131 2003-08-21 Randolph Chung <tausq@debian.org>
1132
1133 * elf32-hppa.c (elf32_hppa_object_p): For elf32-hppa-linux, objects
1134 can have OSABI=Linux or OSABI=SysV. Check for both.
1135 * elf64-hppa.c (elf64_hppa_object_p): Likewise.
1136
1137 2003-08-21 Nick Clifton <nickc@redhat.com>
1138
1139 * po/sv.po: Updated Swedish translation.
1140
1141 2003-08-20 Richard Sandiford <rsandifo@redhat.com>
1142
1143 * elf64-mips.c (elf_backend_copy_indirect_symbol): Define.
1144
1145 2003-08-20 Nick Clifton <nickc@redhat.com>
1146
1147 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): New macro used to
1148 replace some duplicated code in most elfxx-xxxx.c files. This
1149 version uses the new fields in bfd_link_info.
1150
1151 * elf-m10300.c (mn10300_elf_relocate_section): Use new macro.
1152 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
1153 * elf32-cris.c (cris_elf_relocate_section): Likewise.
1154 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
1155 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1156 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
1157 * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
1158 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1159 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1160 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1161 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1162 * elf32-vax.c (elf_vax_relocate_section): Likewise.
1163 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
1164 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
1165 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1166 * elf64-s390.c (elf_s390_relocate_section): Likewise.
1167 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1168 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1169 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
1170
1171 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols,
1172 elf_hppa_remark_useless_dynamic_symbols,
1173 elf_hppa_relocate_section): Use the new fields in
1174 bfd_link_info structure.
1175 * elf32-sh.c (sh_elf_relocate_section): Likewise.
1176 * elf64-alpha.c (elf64_alpha_check_relocs): Likewise.
1177 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
1178 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
1179 * elfxx-ia64.c (elfNN_ia64_check_relocs): Likewise.
1180 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
1181
1182 * elflink.h (elf_link_output_extsym): Fix test for reporting
1183 undefined symbols in shared libraries. Remove redundant test
1184 of shlib_undefined when reporting references to forced local
1185 symbols.
1186
1187 2003-08-18 Andreas Schwab <schwab@suse.de>
1188
1189 * libpei.h (bfd_pe_executable_p): Also recognize efi-app
1190 executables.
1191
1192 2003-08-17 Hans-Peter Nilsson <hp@bitrange.com>
1193
1194 * simple.c (bfd_simple_get_relocated_section_contents): Move
1195 reloc_done hack to before first bfd_section_size call. Change all
1196 returns to use new wrapper macro RETURN, restoring sec->reloc_done.
1197
1198 2003-08-16 Alan Modra <amodra@bigpond.net.au>
1199
1200 * elf64-ppc.c: Don't include elf/ppc.h.
1201
1202 2003-08-14 Richard Sandiford <rsandifo@redhat.com>
1203
1204 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Fix PT_DYNAMIC
1205 code to work with 64-bit bfds.
1206
1207 2003-08-14 Alan Modra <amodra@bigpond.net.au>
1208
1209 * dep-in.sed: Remove libintl.h.
1210 * Makefile.am (SRC-POTFILES.in, BLD-POTFILES.in): Unset LC_COLLATE.
1211 (POTFILES.in): Remove target.
1212 * Makefile.in: Regenerate.
1213
1214 2003-08-12 Alan Modra <amodra@bigpond.net.au>
1215
1216 * elf64-ppc.c (ppc64_elf_next_input_section): Update comment.
1217 (ppc64_elf_relocate_section): For zero sym R_PPC64_TOC relocs,
1218 use the function sym from the previous reloc.
1219
1220 2003-08-11 Jakub Jelinek <jakub@redhat.com>
1221
1222 * elf32-i386.c (elf_i386_relocate_section): Make undefined symbols
1223 fatal if -pie.
1224 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1225 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1226 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
1227 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1228 * elf64-s390.c (elf_s390_relocate_section): Likewise.
1229 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1230 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1231 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
1232 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1233 (ppc_elf_relocate_section) <case R_PPC_RELAX32>: Issue fatal error
1234 on undefined symbols if -pie.
1235 * elf32-sh.c (sh_elf_relocate_section): Likewise.
1236
1237 2003-08-11 Alan Modra <amodra@bigpond.net.au>
1238
1239 * elf64-ppc.c (ppc64_elf_relocate_section): Add special case for crt1.o
1240 branch to __libc_start_main.
1241
1242 2003-08-08 Dmitry Diky <diwil@mail.ru>
1243
1244 * archures.c: Add xW42 and xE42 parts. Sort MPU list according to
1245 gcc order.
1246 * cpu-msp430.c: Likewise.
1247 * elf32-msp430.c: Likewise.
1248 * bfd-in2.h: Regenerate.
1249
1250 2003-08-07 Alan Modra <amodra@bigpond.net.au>
1251
1252 * elfxx-target.h: Remove PTR cast.
1253 * targets.c (bfd_target): Make backend_data const void *.
1254 * elf-bfd.h: Constify all occurrences of struct elf_backend_data.
1255 * elf-m10300.c: Likewise.
1256 * elf.c: Likewise.
1257 * elf32-hppa.c: Likewise.
1258 * elf32-i386.c: Likewise.
1259 * elf32-m68hc1x.c: Likewise.
1260 * elf32-ppc.c: Likewise.
1261 * elf32-s390.c: Likewise.
1262 * elf32-sh.c: Likewise.
1263 * elf32-sh64.c: Likewise.
1264 * elf32-sparc.c: Likewise.
1265 * elf32-xtensa.c: Likewise.
1266 * elf64-mips.c: Likewise.
1267 * elf64-ppc.c: Likewise.
1268 * elf64-s390.c: Likewise.
1269 * elf64-sh64.c: Likewise.
1270 * elf64-sparc.c: Likewise.
1271 * elf64-x86-64.c: Likewise.
1272 * elfcode.h: Likewise.
1273 * elfcore.h: Likewise.
1274 * elflink.c: Likewise.
1275 * elflink.h: Likewise.
1276 * elfxx-ia64.c: Likewise.
1277 * elfxx-mips.c: Likewise.
1278 * elfxx-mips.h: Likewise.
1279 * elf.c (prep_headers): Remove useless check for null backend_data.
1280 * bfd-in2.h: Regenerate.
1281
1282 * elf-bfd.h: Remove PARAMS macro. Replace PTR with void *.
1283 (NAME): Use ## rather than CONCAT4 macro.
1284 * elfcode.h: Remove one remaining PARAMS macro.
1285 * elf-eh-frame.c: Convert to C90, remove unneeded casts and prototypes.
1286 * elf-strtab.c: Likewise.
1287 * elf-hppa.h: Likewise.
1288 * elf32-hppa.h: Likewise.
1289 * elf32-hppa.c: Likewise.
1290 (elf32_hppa_add_symbol_hook): Delete.
1291 (elf_backend_add_symbol_hook): Don't define.
1292 * libhppa.h: Convert to C90. Replace INLINE with inline.
1293
1294 2003-08-06 Alan Modra <amodra@bigpond.net.au>
1295
1296 * elf64-ppc.c (ppc_stub_name): Tweak names for better readability.
1297 (ppc64_elf_adjust_dynamic_symbol): Allow copy relocs against
1298 function descriptors, but warn.
1299 (ppc_build_one_stub): Remove a couple of vars. Move code creating
1300 stub syms so that we can avoid a stub sym if we already have a
1301 plt sym. Do not redefine an existing symbol.
1302 (ppc64_elf_build_stubs): When --emit-stub-syms, print a symbol for
1303 glink.
1304
1305 2003-08-06 Nick Clifton <nickc@redhat.com>
1306
1307 * po/fr.po: Updated French translation.
1308
1309 2003-08-06 Alan Modra <amodra@bigpond.net.au>
1310
1311 * elflink.c (_bfd_elf_create_dynamic_sections): Mark .dynbss with
1312 SEC_LINKER_CREATED.
1313
1314 2003-08-05 Daniel Jacobowitz <drow@mvista.com>
1315
1316 * elf32-arm.h (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
1317 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Use it.
1318
1319 2003-08-03 Jeff Muizelaar <muizelaar@rogers.com>
1320
1321 * coffcode.h (coff_slurp_line_table): Return with a warning
1322 message if the line number table could not be read.
1323
1324 2003-08-04 Nick Clifton <nickc@redhat.com>
1325
1326 * elflink.h (elf_link_add_object_symbols): Prepend "warning: "
1327 to messages produced for .gnu.warning.SYMBOL sections.
1328
1329 2003-08-04 Alan Modra <amodra@bigpond.net.au>
1330
1331 * elfcode.h: Convert to C90, remove unneeded casts and prototypes.
1332 * elfcore.h: Likewise.
1333 * elflink.c: Likewise.
1334 * elflink.h: Likewise.
1335 * elf.c (sym_is_global): Remove INLINE.
1336 (align_file_position): Replace INLINE with inline.
1337 * elfcode.h (elf_swap_dyn_in, elf_swap_dyn_out): Remove INLINE.
1338 (elf_file_p): Replace INLINE with inline.
1339
1340 2003-08-02 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1341
1342 * elf32-sh.c (sh_elf_check_relocs): Don't set DF_TEXTREL here.
1343
1344 2003-08-01 H.J. Lu <hongjiu.lu@intel.com>
1345
1346 * elfxx-ia64.c (get_got): Align the .got section at 8 bytes.
1347
1348 2003-08-01 H.J. Lu <hongjiu.lu@intel.com>
1349
1350 * elfxx-ia64.c (elfNN_ia64_finish_dynamic_symbol): Use
1351 ElfNN_External_Rela instead of Elf64_External_Rela.
1352
1353 2003-08-01 Nick Clifton <nickc@redhat.com>
1354
1355 * config.bfd: Add code to catch obsolete configurations and warn
1356 about them unless --enable-obsolete is used. Use this to mark
1357 vax-vms port as obsolete.
1358
1359 2003-07-30 Alan Modra <amodra@bigpond.net.au>
1360
1361 * elf32-ppc.c (ppc_elf_install_value): Tidy.
1362 (ppc_elf_relax_section): Remove dead code. Remove unnecessary casts.
1363 Formatting.
1364 * elfxx-target.h: Remove PARAMS macro. Formatting.
1365
1366 2003-07-30 Alan Modra <amodra@bigpond.net.au>
1367
1368 * elf.c (bfd_section_from_r_symndx): Test for SHN_UNDEF.
1369 * elf64-ppc.c (get_fdh): New function, split out from
1370 ppc64_elf_edit_opd.
1371 (ppc64_elf_check_relocs): Use get_fdh.
1372 (func_desc_adjust): Likewise. Tidy.
1373 (ppc64_elf_edit_opd): Tighten reloc checks. Free local_syms on error
1374 exit. Use get_fdh. Account for superfluous dynamic relocs.
1375 (ppc64_elf_relocate_section): Warning fix.
1376
1377 2003-07-30 Jason Eckhardt <jle@rice.edu>
1378
1379 * coff-i860.c: Convert to ISO C90. Remove superflous prototypes.
1380
1381 2003-07-30 Jason Eckhardt <jle@rice.edu>
1382
1383 * elf32-i860.c: Convert to ISO C90. Remove superflous prototypes.
1384
1385 2003-07-30 Randolph Chung <tausq@debian.org>
1386
1387 * elf-hppa.h (elf_hppa_relocate_section): Look up dyn_h for undefweak.
1388 * elf64-hppa.c (elf64_hppa_finalize_dlt): Check h->root.type.
1389
1390 2003-07-30 Alan Modra <amodra@bigpond.net.au>
1391
1392 * elf.c: Convert to C90, remove unnecessary prototypes and casts.
1393 Replace PTR with void *. Formatting.
1394 (_bfd_elf_assign_file_position_for_section): Remove INLINE.
1395 (make_mapping): Likewise.
1396
1397 2003-07-29 Alan Modra <amodra@bigpond.net.au>
1398
1399 * elf64-ppc.c (func_desc_adjust): Give linker created function
1400 descriptor symbols a size and type.
1401 (ppc64_elf_relocate_section): Correct lq insn test.
1402
1403 2003-07-28 Eric Christopher <echristo@redhat.com>
1404
1405 * elf32-ppc.c (R_PPC_RELAX32): New relocation.
1406 (ppc_elf_install_value): New function.
1407 (ppc_elf_sort_rela): Remove.
1408 (ppc_elf_relax_section): Rewrite. Remove old relaxation
1409 and replace with out of range branch stubs.
1410 (ppc_elf_relocate_section): Handle R_PPC_RELAX32.
1411
1412 2003-07-29 Alexandre Oliva <aoliva@redhat.com>
1413
1414 * elf-m10300.c (mn10300_elf_relax_section): Take symbol hash table
1415 from input_bfd.
1416
1417 2003-07-28 Alan Modra <amodra@bigpond.net.au>
1418
1419 * elf.c (special_sections): Set attributes for .got and .plt.
1420
1421 2003-07-27 Alan Modra <amodra@bigpond.net.au>
1422
1423 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Ensure no copy relocs
1424 on function descriptors.
1425 (ELIMINATE_COPY_RELOCS): Expand comment.
1426 (ppc64_elf_special_sections): Move. Don't include non-ppc64 sections.
1427 Do include ".toc1".
1428
1429 2003-07-25 H.J. Lu <hongjiu.lu@intel.com>
1430
1431 * elf.c (_bfd_elf_new_section_hook): Set the default section
1432 type to SHT_NULL.
1433 (elf_fake_sections): Set the section type based on asect->flags
1434 if it is SHT_NULL. Don't abort on processor specific section
1435 types.
1436
1437 2003-07-25 H.J. Lu <hongjiu.lu@intel.com>
1438
1439 * bfd-in2.h: Regenerated.
1440
1441 2003-07-25 H.J. Lu <hongjiu.lu@intel.com>
1442
1443 * elf-bfd.h (bfd_elf_special_section): New.
1444 (elf_backend_data): Add special_sections, a pointer to
1445 bfd_elf_special_section.
1446 (elf_section_type). New.
1447 (elf_section_flags): New.
1448 (_bfd_elf_get_sec_type_attr): New.
1449
1450 * elf.c (_bfd_elf_make_section_from_shdr): Always use the
1451 real section type/flags.
1452 (special_sections): New.
1453 (get_special_section): New.
1454 (_bfd_elf_get_sec_type_attr): New.
1455 (_bfd_elf_new_section_hook): Check special_section to set
1456 elf_section_type and elf_section_flags.
1457 (elf_fake_sections): Don't use section name to set ELF section
1458 data.
1459
1460 * elf32-m32r.c (m32r_elf_special_sections): New.
1461 (elf_backend_special_sections): Defined.
1462
1463 * elf32-m68hc11.c (elf32_m68hc11_special_sections): New.
1464 (elf_backend_special_sections): Defined.
1465
1466 * elf32-mcore.c (mcore_elf_special_sections): New.
1467 (elf_backend_special_sections): Defined.
1468
1469 * elf32-ppc.c (ppc_elf_special_sections): New.
1470 (elf_backend_special_sections): Defined.
1471
1472 * elf32-sh64.c (sh64_elf_special_sections): New.
1473 (elf_backend_special_sections): Defined.
1474
1475 * elf32-v850.c (v850_elf_special_sections): New.
1476 (elf_backend_special_sections): Defined.
1477
1478 * elf32-xtensa.c (elf_xtensa_special_sections): New.
1479 (elf_backend_special_sections): Defined.
1480
1481 * elf64-alpha.c (elf64_alpha_special_sections): New.
1482 (elf_backend_special_sections): Defined.
1483
1484 * elf64-hppa.c (elf64_hppa_special_sections): New.
1485 (elf_backend_special_sections): Defined.
1486
1487 * elf64-ppc.c (ppc64_elf_special_sections): New.
1488 (elf_backend_special_sections): Defined.
1489
1490 * elf64-sh64.c (sh64_elf64_special_sections): New.
1491 (elf_backend_special_sections): Defined.
1492
1493 * elfxx-ia64.c (elfNN_ia64_special_sections): New.
1494 (elf_backend_special_sections): Defined.
1495
1496 * elfxx-mips.c (_bfd_mips_elf_special_sections): New.
1497
1498 * elfxx-mips.h (_bfd_mips_elf_special_sections): New.
1499 (elf_backend_special_sections): Defined.
1500
1501 * elfxx-target.h (elf_backend_special_sections): New. Default
1502 to NULL.
1503 (elfNN_bed): Initialize special_sections.
1504
1505 * section.c (bfd_abs_section): Remove const.
1506 (bfd_und_section): Likewise.
1507 (bfd_com_section): Likewise.
1508 (bfd_ind_section): Likewise.
1509
1510 2003-07-24 Nick Clifton <nickc@redhat.com>
1511
1512 * coff-arm.c (EXTRA_S_FLAGS): Include SEC_CODE so that code
1513 sections are assigned the LOAD attribute.
1514
1515 2003-07-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1516
1517 * elf32-sh.c: Convert to C90. Replace PTR with void *.
1518 * elf32-sh64-com.c: Likewise.
1519 * elf32-sh64.c: Likewise.
1520 * elf32-sh64.h: Likewise.
1521 * elf64-sh64.c: Likewise.
1522
1523 2003-07-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1524
1525 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
1526 (allocate_dynrelocs): Likewise.
1527 (sh_elf_relocate_section): Likewise. Use SYMBOL_REFERENCES_LOCAL.
1528 (sh_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
1529
1530 2003-07-24 Nick Clifton <nickc@redhat.com>
1531
1532 * po/fr.po: Updated French translation.
1533
1534 2003-07-23 Bob Wilson <bob.wilson@acm.org>
1535
1536 * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Make inline and move
1537 near the beginning of the file. Swap order of arguments. Call
1538 _bfd_elf_dynamic_symbol_p with "ignore_protected" set to 0.
1539 (elf_xtensa_fix_refcounts): Adjust xtensa_elf_dynamic_symbol_p call.
1540 (elf_xtensa_relocate_section): Likewise.
1541 (shrink_dynamic_reloc_sections): Likewise.
1542
1543 2003-07-23 Bob Wilson <bob.wilson@acm.org>
1544
1545 * elf32-xtensa.c (plt_reloc_count): Fix typo in comment.
1546 (elf_xtensa_size_dynamic_sections): Use elf_discarded_section.
1547 (elf_xtensa_combine_prop_entries): Avoid returning non-zero without
1548 first printing an error message.
1549 (elf_xtensa_finish_dynamic_sections): Likewise.
1550 (elf_xtensa_discard_info_for_section): Adjust size of .got.loc when
1551 discarding literal table entries.
1552 (elf_xtensa_merge_private_bfd_data): Remove newline from error message.
1553 (elf_xtensa_do_asm_simplify): Likewise.
1554
1555 2003-07-23 Stephane Carrez <stcarrez@nerim.fr>
1556
1557 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Avoid crash when
1558 we have a local symbol in common section.
1559
1560 2003-07-22 H.J. Lu <hongjiu.lu@intel.com>
1561
1562 * elflink.c (_bfd_elf_dynamic_symbol_p): Don't return TRUE for
1563 weak symbols.
1564
1565 2003-07-22 Nick Clifton <nickc@redhat.com>
1566
1567 * coffcode.h (coff_slurp_symbol_table): Add C_TCSYM and C_ECOML to
1568 expected RS6000 storage classes.
1569
1570 2003-07-21 H.J. Lu <hongjiu.lu@intel.com>
1571
1572 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Mark
1573 output_bfd unused to silence gcc.
1574
1575 2003-07-21 Nick Clifton <nickc@redhat.com>
1576
1577 * po/sv.po: Updated Swedish translation.
1578
1579 2003-07-21 Alan Modra <amodra@bigpond.net.au>
1580
1581 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Use..
1582 (_bfd_elf_symbol_refs_local_p): ..this. Declare.
1583 * elflink.c (_bfd_elf_symbol_refs_local_p): New function.
1584 * elf32-i386.c (elf_i386_relocate_section): Remove h NULL test
1585 now done in _bfd_elf_symbol_refs_local_p.
1586 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1587 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1588 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1589
1590 2003-07-18 H.J. Lu <hongjiu.lu@intel.com>
1591
1592 * elflink.c (_bfd_elf_dynamic_symbol_p): Undo the last change.
1593
1594 2003-07-18 H.J. Lu <hongjiu.lu@intel.com>
1595
1596 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL): Fix a typo.
1597 (SYMBOL_CALLS_LOCAL): Likewise.
1598
1599 * elflink.c (_bfd_elf_dynamic_symbol_p): Return TRUE
1600 immediately if symbol isn't defined locally.
1601
1602 2003-07-18 Richard Henderson <rth@redhat.com>
1603
1604 * elflink.c (_bfd_elf_dynamic_symbol_p): New.
1605 * elf-bfd.h (_bfd_elf_dynamic_symbol_p): Declare it.
1606 (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Use it.
1607 * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Likewise.
1608 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
1609 * elf64-hppa.c (elf64_hppa_dynamic_symbol_p): Likewise.
1610 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Likewise.
1611 Update all callers to provide the relocation being resolved.
1612
1613 2003-07-17 Shaun Jackman <sjackman@pathwayconnect.com>
1614
1615 * config.bfd (arm-wince-pe): Add -DARM_COFF_BUGFIX to
1616 targ_cflags.
1617
1618 2003-07-17 Nick Clifton <nickc@redhat.com>
1619
1620 * po/es.po: New Spanish translation.
1621 * po/sv.po: New Swedish translation.
1622 * po/opcodes.pot: Regenerate.
1623
1624 2003-07-16 Richard Henderson <rth@redhat.com>
1625
1626 * config.bfd, configure.host, configure.in: Remove ia64-aix support.
1627 * elfxx-ia64.c, targets.c: Likewise.
1628
1629 2003-07-16 Richard Henderson <rth@redhat.com>
1630
1631 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Properly return false
1632 for symbols defined locally plus -Bsymbolic. Tidy logic.
1633
1634 2003-07-15 Richard Sandiford <rsandifo@redhat.com>
1635
1636 * archures.c (bfd_mach_mips7000): New.
1637 * bfd-in2.h: Regenerated.
1638 * cpu-mips.c (arch_info_struct): Add an entry for mips:7000.
1639 * elfxx-mips.c (mips_set_isa_flags): Handle bfd_mach_mips7000.
1640 (mips_mach_extensions): Add an entry for it.
1641
1642 2003-07-14 Nick Clifton <nickc@redhat.com>
1643
1644 * po/tr.po: Update with latest version.
1645 * po/SRC-POTFILES.in: Regenerate.
1646 * po/bfd.pot: Regenerate.
1647 * Makfile.in: Regenerate.
1648 * configure: Regenerate.
1649
1650 2003-07-12 Jeff Baker <jbaker@qnx.com>
1651
1652 * bfd/config.bfd (__QNXTARGET__): Define for Neutrino architectures.
1653 * bfd/elf32-arm.h (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1654 * bfd/elf32-sh.c (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1655 * bfd/elf32-ppc.c (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1656
1657 2003-07-12 Jeff Muizelaar <muizelaar@rogers.com>
1658
1659 * coffcode.h (coff_set_section_contents): Set the
1660 IMAGE_FILE_32BIT_MACHINE flag for PE targets.
1661
1662 2003-07-11 Richard Sandiford <rsandifo@redhat.com>
1663
1664 * bfd-in.h (bfd_h8300_pad_address): Declare.
1665 * bfd-in2.h: Regenerate.
1666 * cpu-h8300.c (bfd_h8300_pad_address): New function.
1667 * coff-h8300.c (h8300_reloc16_estimate): Use it to canonicalize
1668 addresses before checking whether they can be relaxed.
1669 (h8300_reloc16_extra_cases): Likewise for the R_MOVL2 sanity check.
1670 Don't complain about overflows in general 8-bit relocations.
1671 * elf32-h8300.c (elf32_h8_relax_section): Use bfd_h8300_pad_address.
1672 Fix handling of R_H8_DIR24A8.
1673
1674 2003-07-11 Richard Sandiford <rsandifo@redhat.com>
1675
1676 * elf32-h8300.c: Convert function prototypes and definitions
1677 to C90 syntax.
1678 * coff-h8300.c: Likewise.
1679 * cpu-h8300.c: Likewise.
1680
1681 2003-07-11 Alan Modra <amodra@bigpond.net.au>
1682
1683 * po/SRC-POTFILES.in: Regenerate.
1684 * po/bfd.pot: Likewise.
1685
1686 2003-07-10 Bob Wilson <bob.wilson@acm.org>
1687
1688 * elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Create new
1689 .got.loc section. Do not set SEC_ALLOC or SEC_LOAD flags for the
1690 .xt.lit.plt section.
1691 (elf_xtensa_size_dynamic_sections): Set size of the .got.loc section
1692 and allocate memory for it.
1693 (elf_xtensa_combine_prop_entries): Copy contents of .xt.lit output
1694 section to the .got.loc section.
1695 (elf_xtensa_finish_dynamic_sections): Fix up call to
1696 elf_xtensa_combine_prop_entries and set DT_XTENSA_GOT_LOC_OFF to
1697 the address of .got.loc.
1698 (relax_property_section): Shrink .got.loc to match changes in any
1699 literal table section.
1700 (xtensa_is_property_section): Change to match
1701 xtensa_get_property_section_name.
1702 (xtensa_is_littable_section): New.
1703
1704 2003-07-10 H.J. Lu <hongjiu.lu@intel.com>
1705
1706 * elfxx-ia64.c (IA64_HOWTO): Set dst_mask to -1 instead of
1707 -1LL.
1708
1709 2003-07-10 Alan Modra <amodra@bigpond.net.au>
1710
1711 * Makefile.am (BFD32_BACKENDS): Add elf32-am33lin.lo.
1712 (BFD32_BACKENDS_CFILES): elf32-am33lin.c not elf32-am33lin.lo.
1713 Run "make dep-am".
1714 * Makefile.in: Regenerate.
1715
1716 2003-07-10 Alexandre Oliva <aoliva@redhat.com>
1717
1718 2001-09-12 Alexandre Oliva <aoliva@redhat.com>
1719 * elf32-am33lin.c (ELF_MACHINE_CODE): Redefine to EM_MN10300.
1720 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10300.
1721 2001-06-02 Nick Clifton <nickc@cambridge.redhat.com>
1722 * elf32-am33lin.c: Rename global functions.
1723 2001-05-09 Alexandre Oliva <aoliva@redhat.com>
1724 * config.bfd (am33_2.0, am33_2.0-*-linux*): Added.
1725 * configure.in (bfd_elf32_am33lin_vec): Added.
1726 * Makefile.am (BFD32_BACKENDS): Added elf32-am33lin.lo.
1727 (elf32-am33lin.lo): List dependencies.
1728 * aclocal.m4, configure, Makefile.in: Rebuilt.
1729 * elf-m10300.c (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME,
1730 ELF_ARCH, ELF_MACHINE_CODE, ELF_MAXPAGESIZE): Define only if
1731 ELF_ARCH was not defined before.
1732 (elf_symbol_leading_char): Define if not defined.
1733 * elf32-am33lin.c: Override the definitions above.
1734 * targets.c (bfd_elf32_am33lin_vec): New.
1735
1736 2003-07-09 Alexandre Oliva <aoliva@redhat.com>
1737
1738 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
1739 * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Initialize
1740 pcrel_relocs_copied.
1741 2001-12-13 Alexandre Oliva <aoliva@redhat.com>
1742 * elf-m10300.c (ELF_DYNAMIC_INTERPRETER): Renamed from
1743 ld-linux.so.2 to ld.so.1.
1744 2001-10-10 Alexandre Oliva <aoliva@redhat.com>
1745 * elf-m10300.c (elf_mn10300_sizeof_plt0): New macro.
1746 (_bfd_mn10300_elf_adjust_dynamic_symbol): Use it.
1747 (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
1748 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Allocate
1749 .rela.* section contents with bfd_zalloc.
1750 2001-09-25 Alexandre Oliva <aoliva@redhat.com>
1751 * elf-m10300.c: Added declarations for functions missing them.
1752 Merge some shared-library changes from the i386 back-end. Use
1753 R_MN10300_RELATIVE instead of R_MN10300_PCREL32 and
1754 R_MN10300_GLOB_DAT instead of R_MN10300_32 where appropriate.
1755 (struct elf32_mn10300_link_hash_entry): Remove duplicates of
1756 members of elf_link_hash_entry. Adjusted references.
1757 (mn10300_elf_final_link_relocate): dynobj was already loaded
1758 into a local variable, use it.
1759 2001-09-21 Nick Clifton <nickc@cambridge.redhat.com>
1760 * elf-m10300.c: Add missing function prototypes.
1761 2001-08-24 Alexandre Oliva <aoliva@redhat.com>
1762 * elf-m10300.c (mn10300_elf_relocate_section): Don't compute
1763 relocation for dynamic relocations.
1764 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
1765 * reloc.c (BFD_RELOC_MN10300_GOTOFF24): New.
1766 * elf-m10300.c: Introduce GOTPC16, GOTOFF24, GOTOFF16 and
1767 PLT16, and rename GOTPC to GOTPC32 and GOTOFF to GOTOFF32.
1768 (_bfd_mn10300_elf_create_dynamic_sections): Move creation ot PLT...
1769 (_bfd_mn10300_elf_create_got_section): ... here, so that its
1770 adress is already known at the time we compute relaxations.
1771 (mn10300_elf_relax_section): Relax GOTPC32, GOTOFF32, GOT32
1772 and PLT32 to narrower relocations.
1773 * libbfd.h, bfd-in2.h: Rebuilt.
1774 2001-04-12 Alexandre Oliva <aoliva@redhat.com>
1775 * reloc.c (BFD_RELOC_MN10300_GOT32, BFD_RELOC_MN10300_GOT24,
1776 BFD_RELOC_MN10300_GOT16, BFD_RELOC_MN10300_COPY,
1777 BFD_RELOC_MN10300_GLOB_DAT, BFD_RELOC_MN10300_JMP_SLOT,
1778 BFD_RELOC_MN10300_RELATIVE): New relocs.
1779 * libbfd.h, bfd-in2.h: Rebuilt.
1780 * elf-m10300.c (struct elf_mn10300_pcrel_relocs_copied): New.
1781 (struct elf32_mn10300_link_hash_entry): Added DSO-related
1782 fields.
1783 (elf_mn10300_howto): Defined new relocation types.
1784 (mn10300_reloc_map): Map them.
1785 (_bfd_mn10300_elf_create_got_section): New fn.
1786 (mn10300_elf_check_relocs): Handle PIC relocs.
1787 (mn10300_elf_final_link_relocate): Likewise.
1788 (mn10300_elf_relocate_section): Handle DSOs.
1789 (PLT0_ENTRY_SIZE, PLT_ENTRY_SIZE, PIC_PLT_ENTRY_SIZE): New macros.
1790 (elf_mn10300_plt0_entry, elf_mn10300_plt_entry,
1791 elf_mn10300_pic_plt_entry): New.
1792 (elf_mn10300_sizeof_plt, elf_mn10300_plt_plt0_offset,
1793 elf_mn10300_plt0_linker_offset, elf_mn10300_plt0_gotid_offset,
1794 elf_mn10300_plt_temp_offset, elf_mn10300_plt_symbol_offset,
1795 elf_mn10300_plt_reloc_offset: New macros.
1796 (ELF_DYNAMIC_INTERPRETER): Likewise.
1797 (_bfd_mn10300_elf_create_dynamic_sections): New function.
1798 (_bfd_mn10300_elf_adjust_dynamic_symbol): Likewise.
1799 (_bfd_mn10300_elf_discard_copies): Likewise.
1800 (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
1801 (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
1802 (_bfd_mn10300_elf_finish_dynamic_sections): Likewise.
1803 (elf_backend_can_gc_sections,
1804 elf_backend_create_dynamic_sections,
1805 elf_backend_adjust_dynamic_sections,
1806 elf_backend_size_dynamic_sections,
1807 elf_backend_finish_dynamic_symbol,
1808 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
1809 elf_backend_plt_readonly, elf_backend_want_plt_sym,
1810 elf_backend_got_header_size, elf_backend_plt_header_size): New
1811 macros.
1812
1813 2003-07-09 Alexandre Oliva <aoliva@redhat.com>
1814
1815 2001-05-06 Alexandre Oliva <aoliva@redhat.com>
1816 * elf-m10300.c (compute_function_info): Account for AM33
1817 registers in `movm' when computing stack space for `call' when
1818 linking for AM33/2.0 link.
1819 2000-04-01 Alexandre Oliva <aoliva@cygnus.com>
1820 * archures.c (bfd_mach_am33_2): Renamed from bfd_mach_am332.
1821 * bfd-in2.h: Rebuilt.
1822 * cpu-m10300.c (bfd_am33_2_arch): Renamed from bfd_am332_arch.
1823 * elf-m10300.c: Updated.
1824 2000-03-31 Alexandre Oliva <aoliva@cygnus.com>
1825 * archures.c (bfd_mach_am332): Defined.
1826 * bfd-in2.h: Rebuilt.
1827 * cpu-m10300.c (bfd_am332_arch): Defined.
1828 (bfd_am33_arch): Chained with am33-2.
1829 * elf-m10300.c (elf_mn10300_mach): Handle am332.
1830 (_bfd_mn10300_elf_final_write_processing): Likewise.
1831
1832 2003-07-09 H.J. Lu <hongjiu.lu@intel.com>
1833
1834 * elfxx-ia64.c (IA64_HOWTO): Set dst_mask to -1LL.
1835
1836 2003-07-10 Alan Modra <amodra@bigpond.net.au>
1837
1838 * elf64-ppc.c (bfd_elf64_mkobject): Define.
1839 (struct ppc64_elf_obj_tdata): New.
1840 (ppc64_elf_tdata, ppc64_tlsld_got): Define.
1841 (ppc64_elf_mkobject): New function.
1842 (struct got_entry): Add "owner". Move "tls_type".
1843 (struct ppc_link_hash_table): Delete "relgot", "tlsld_got".
1844 (ppc64_elf_init_stub_bfd): New function.
1845 (create_got_section): Create header .got in dynobj. Create .got
1846 and .rela.got in each bfd. Stash pointers in ppc64_elf_obj_tdata.
1847 (ppc64_elf_create_dynamic_sections): Don't call create_got_section.
1848 Look for dynobj .got, and test it.
1849 (ppc64_elf_copy_indirect_symbol): Adjust for changed got.
1850 (update_local_sym_info): Likewise.
1851 (ppc64_elf_check_relocs): Likewise.
1852 (ppc64_elf_gc_sweep_hook): Likewise.
1853 (ppc64_elf_tls_optimize): Likewise.
1854 (allocate_dynrelocs): Likewise.
1855 (ppc64_elf_size_dynamic_sections): Likewise.
1856 (ppc64_elf_relocate_section): Likewise.
1857 (ppc64_elf_next_toc_section): Update comment.
1858 (toc_adjusting_stub_needed): Remove unneeded cast.
1859 (ppc64_elf_build_stubs): Check for stub sections in stub bfd by
1860 testing section flags.
1861 (ppc64_elf_build_stubs): Likewise.
1862 (ppc64_elf_size_stubs): Likewise. Remove stub_bfd param.
1863 (ppc64_elf_finish_dynamic_sections): Write out got sections.
1864 (func_desc_adjust): Copy over dynamic info for undef weaks.
1865 * elf64-ppc.h (ppc64_elf_init_stub_bfd): Declare.
1866 (ppc64_elf_size_stubs): Update prototype.
1867 * elflink.h (elf_link_sort_relocs): Use link_orders to find reldyn
1868 input sections rather than scanning dynobj.
1869
1870 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
1871
1872 * elfxx-mips.c (mips_elf_link_hash_entry): Remove min_dyn_reloc_index.
1873 (bfd_mips_elf_swap_msym_in, bfd_mips_elf_swap_msym_out): Delete.
1874 (mips_elf_create_msym_section): Delete.
1875 (mips_elf_create_dynamic_relocation): Don't set min_dyn_reloc_index.
1876 (_bfd_mips_elf_copy_indirect_symbol): Likewise.
1877 (_bfd_mips_elf_create_dynamic_sections): Don't create .msym.
1878 (_bfd_mips_elf_size_dynamic_sections): Don't calculate its size.
1879 (_bfd_mips_elf_size_dynamic_sections): Don't add DT_MIPS_MSYM.
1880 (_bfd_mips_elf_finish_dynamic_symbol): Don't add symbols to .msym.
1881 (_bfd_mips_elf_finish_dynamic_sections): Likewise.
1882
1883 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
1884
1885 * elfxx-mips.c (mips_elf_irix6_finish_dynamic_symbol): Make the
1886 symbols protected.
1887
1888 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
1889
1890 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Fix handling
1891 of relocations whose offset is -2.
1892
1893 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
1894
1895 * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): Treat
1896 forced-local symbols like other locals. Don't create relocations
1897 against STN_UNDEF in irix objects.
1898
1899 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
1900
1901 * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): In SGI-
1902 compatible objects, add the values of defined external symbols
1903 to the addend.
1904
1905 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
1906
1907 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Always
1908 initialize a GOT entry to the symbol's st_value.
1909
1910 2003-07-08 Alan Modra <amodra@bigpond.net.au>
1911
1912 * elf-bfd.h (struct elf_obj_tdata): Move linker_section_pointers..
1913 * elf32-ppc.c (struct ppc_elf_obj_tdata): ..to here. New.
1914 (ppc_elf_tdata): Define.
1915 (elf_local_ptr_offsets): Adjust.
1916 (ppc_elf_mkobject): New function.
1917 (bfd_elf32_mkobject): Define.
1918
1919 * elfcode.h (elf_object_p): Allocate tdata via _bfd_set_format.
1920 * elfcore.h (elf_core_file_p): Likewise.
1921 * section.c (bfd_section_init): Remove prototype.
1922
1923 2003-07-08 Alan Modra <amodra@bigpond.net.au>
1924
1925 * elf-bfd.h (struct elf_link_hash_entry): Remove linker_section_pointer
1926 field.
1927 (enum elf_linker_section_enum): Delete.
1928 (struct elf_linker_section): Delete.
1929 (struct elf_linker_section_pointers): Delete.
1930 (struct elf_obj_tdata): Remove #if 0 chunk. Remove linker_section.
1931 Make linker_section_pointers a void**.
1932 (elf_local_ptr_offsets, elf_linker_section): Don't define.
1933 * elf32-ppc.c (enum elf_linker_section_enum): New, cut-down version
1934 of old item in elf-bfd.h.
1935 (struct elf_linker_section): Likewise.
1936 (struct elf_linker_section_pointers): Likewise.
1937 (elf_local_ptr_offsets): Define.
1938 (struct ppc_elf_link_hash_entry): Add linker_section_pointer.
1939 (ppc_elf_link_hash_newfunc): Init it.
1940 (struct ppc_elf_link_hash_table): Add sbss.
1941 (ppc_elf_link_hash_table_create): zmalloc rather than clearing
1942 individual fields.
1943 (elf_create_linker_section): Fold into..
1944 (ppc_elf_create_linker_section): ..here. Remove hole_size code.
1945 Make rela section here if shared.
1946 (elf_find_pointer_linker_section): Pass lsect rather than enum.
1947 (elf_create_pointer_linker_section): Adjust. zalloc rather than
1948 clearing in a loop.
1949 (elf_finish_pointer_linker_section): Adjust. Don't make rela
1950 section here.
1951 (ppc_elf_check_relocs): Adjust.
1952 (ppc_elf_add_symbol_hook): Tighten hash creator test. Remove code
1953 creating .sbss by hand.
1954 * elf.c (_bfd_elf_link_hash_newfunc): Adjust.
1955
1956 2003-07-04 Jakub Jelinek <jakub@redhat.com>
1957
1958 * elf32-s390.c (elf_howto_table): Change R_390_GOT12 to
1959 complain_overflow_bitfield.
1960 * elf64-s390.c (elf_howto_table): Change R_390_GOT12 to
1961 complain_overflow_bitfield.
1962
1963 2003-07-04 Jakub Jelinek <jakub@redhat.com>
1964
1965 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Return
1966 true even if -pie.
1967
1968 2003-07-04 Jakub Jelinek <jakub@redhat.com>
1969
1970 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add rel_fptr_sec.
1971 (elfNN_ia64_dynamic_symbol_p): Change info->shared into
1972 !info->executable.
1973 (get_fptr): For -pie create .opd as writable section and create
1974 .rela.opd as well.
1975 (elfNN_ia64_check_relocs): Change info->shared into
1976 !info->executable.
1977 (allocate_fptr): Likewise.
1978 (allocate_dynrel_entries): Account for a relative reloc for -pie
1979 @fptr(). Don't account for a relative reloc if -pie want_ltoff_fptr
1980 for undefweak symbol. Account for an IPLT reloc in .rela.opd
1981 section if -pie.
1982 (set_got_entry): Don't create a relative reloc if -pie
1983 want_ltoff_fptr for undefweak symbol.
1984 (set_fptr_entry): Emit an IPLT reloc in .rela.opd for -pie.
1985 (elfNN_ia64_relocate_section): Emit a relative reloc for -pie
1986 @fptr().
1987
1988 * elfxx-ia64.c (elfNN_ia64_relocate_section): Issue undefined_symbol
1989 even if -pie.
1990 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1991 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1992 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1993 * elf64-s390.c (elf_s390_relocate_section): Likewise.
1994 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1995 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
1996 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1997 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1998 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1999
2000 2003-07-04 Paul Clarke <paulc@senet.com.au>
2001
2002 * elf32-h8300.c (R_H8_DIR32A16): Fix name field.
2003 (elf32_h8_relax_section) <R_H8_DIR16A8>: Adjust position of relocation.
2004 <R_H8_DIR32A16>: Fix type of relocation.
2005
2006 2003-07-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2007
2008 * elf32-sh.c (sh_elf_create_dynamic_sections): Return if dynamic
2009 sections were created already. Remove unnecessary tests of
2010 the previous change.
2011
2012 2003-07-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2013
2014 * elf32-sh.c (sh_elf_create_dynamic_sections): Don't call
2015 bfd_make_section for existing sections.
2016
2017 2003-07-04 Alan Modra <amodra@bigpond.net.au>
2018
2019 * elf32-sparc.c (elf32_sparc_check_relocs): Don't call
2020 create_got_section if we already have done so.
2021 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
2022 (sh_elf_check_relocs): Likewise.
2023 (sh_elf_adjust_dynamic_symbol): Delete "dynobj" var. Use
2024 htab->root.dynobj instead.
2025 (sh_elf_check_relocs): Likewise.
2026 (sh_elf_finish_dynamic_sections): Likewise.
2027
2028 * section.c (bfd_make_section): Return NULL for existing section.
2029
2030 2003-07-04 Alan Modra <amodra@bigpond.net.au>
2031
2032 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Don't call
2033 ppc_elf_create_got if we've already done so.
2034
2035 * elf-bfd.h (_bfd_elf_create_linker_section) Don't declare.
2036 (_bfd_elf_find_pointer_linker_section): Likewise.
2037 (bfd_elf32_create_pointer_linker_section): Likewise.
2038 (bfd_elf32_finish_pointer_linker_section): Likewise.
2039 (bfd_elf64_create_pointer_linker_section): Likewise.
2040 (bfd_elf64_finish_pointer_linker_section): Likewise.
2041 (_bfd_elf_make_linker_section_rela): Likewise.
2042 * elfcode.h (elf_create_pointer_linker_section): Don't define.
2043 (elf_finish_pointer_linker_section): Likewise.
2044 * elflink.c (_bfd_elf_make_linker_section_rela): Delete.
2045 (_bfd_elf_create_linker_section): Move this function..
2046 (_bfd_elf_find_pointer_linker_section): ..and this..
2047 * elflink.h (elf_create_pointer_linker_section): ..and this..
2048 (elf_finish_pointer_linker_section): ..and this..
2049 * elf32-ppc.c: ..to here, renaming to the following, and adjusting
2050 calls.
2051 (elf_create_linker_section): Convert to C90, tidy.
2052 (elf_find_pointer_linker_section): Likewise.
2053 (elf_create_pointer_linker_section): Likewise.
2054 (elf_finish_pointer_linker_section): Likewise.
2055 * elf32-i370.c: Delete #if 0 code.
2056
2057 2003-07-02 Alan Modra <amodra@bigpond.net.au>
2058
2059 * elf64-ppc.c (ppc64_elf_func_desc_adjust): Don't allow _savef* and
2060 _restf* to be satisfied by shared libs, and always force them local.
2061 (toc_adjusting_stub_needed): Avoid scanning linker created sections.
2062 Correct test for "bl".
2063 (ppc64_elf_relocate_section <R_PPC64_TLS>): Correct test for
2064 primary opcode 31.
2065
2066 2003-07-01 Martin Schwidefsky <schwidefsky@de.ibm.com>
2067
2068 * elf32-s390.c (s390_elf_ldisp_reloc): New prototype.
2069 (s390_tls_reloc): New function.
2070 (elf_howto_table): Add long displacement relocations R_390_20,
2071 R_390_GOT20, R_390_GOTPLT20 and R_390_TLS_GOTIE20.
2072 (elf_s390_reloc_type_lookup): Likewise.
2073 (elf_s390_check_relocs): Likewise.
2074 (elf_s390_gc_sweep_hook): Likewise.
2075 (elf_s390_relocate_section): Likewise.
2076 * elf64-s390.c: Same changes as for elf32-s390.c.
2077 * reloc.c: Add long displacement relocations BFD_RELOC_390_20,
2078 BFD_RELOC_390_GOT20, BFD_RELOC_390_GOTPLT20 and
2079 BFD_RELOC_390_TLS_GOTIE20.
2080 * bfd-in2.h: Regenerate.
2081 * libbfd.h: Likewise.
2082
2083 2003-06-30 Alan Modra <amodra@bigpond.net.au>
2084
2085 * cpu-ia64-opc.c (ext_imms_scaled): Don't sign extend using shifts.
2086 (ins_imms, ins_immsm1u4): Likewise. Warning fix.
2087
2088 2003-06-29 Alan Modra <amodra@bigpond.net.au>
2089
2090 * archive.c: Convert to C90, remove unnecessary prototypes and casts.
2091 Replace PTR with void *. Formatting.
2092 * archive64.c: Likewise.
2093 * archures.c: Likewise.
2094 * bfd-in.h: Likewise.
2095 * bfd.c: Likewise.
2096 * bfdio.c: Likewise.
2097 * bfdwin.c: Likewise.
2098 * cache.c: Likewise.
2099 * corefile.c: Likewise.
2100 * format.c: Likewise.
2101 * init.c: Likewise.
2102 * libbfd-in.h: Likewise.
2103 * libbfd.c: Likewise.
2104 * linker.c: Likewise.
2105 * opncls.c: Likewise.
2106 * reloc.c: Likewise.
2107 * section.c: Likewise.
2108 * simple.c: Likewise.
2109 * syms.c: Likewise.
2110 * targets.c: Likewise.
2111 * bfd-in2.h: Regenerate.
2112 * libbfd.h: Regenerate.
2113
2114 * ecoff.c (bfd_debug_section): Add missing kept_section initialization.
2115 * libbfd-in.h (_bfd_sh_align_load_span): Don't declare if defined.
2116 * libbfd.c (COERCE32, EIGHT_GAZILLION): Simplify.
2117 (bfd_getb64): Rewrite without parens.
2118 (bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
2119 * cache.c (insert, snip): Remove INLINE.
2120 * linker.c (bfd_link_add_undef): Likewise.
2121
2122 2003-06-29 Andreas Jaeger <aj@suse.de>
2123
2124 * elf64-x86-64.c: Convert to ISO C90 prototypes, remove
2125 unnecessary prototypes. Replace PTR with void *.
2126 (elf64_x86_64_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL to
2127 trim plt entries. Move undefweak non-default visibility test ...
2128 (allocate_dynrelocs): ... from here.
2129 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
2130 Change all callers.
2131 (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL. Use
2132 SYMBOL_REFERENCES_LOCAL for dynreloc check.
2133 (elf64_x86_64_relocate_section): Use SYMBOL_CALLS_LOCAL for
2134 dynreloc and .got relocs.
2135 (elf64_x86_64_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL
2136 for .got relocs.
2137
2138 2003-06-29 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2139
2140 * elfxx-mips.c: Allow lazy binding for R_MIPS_JALR.
2141
2142 2003-06-27 Nick Clifton <nickc@redhat.com>
2143
2144 * opncls.c (bfd_add_gnu_debuglink_section): Rename to
2145 bfd_add_gnu_debuglink_section and only create the section, do not
2146 fill in its contents.
2147 (bfd_fill_in_gnu_debuglink_section): New function. Fill in the
2148 contents of a .gnu-debuglink section.
2149 * bfd-in2.h: Regenerate.
2150
2151 2003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2152
2153 * elfxx-mips.c: Revert .got alignment to 2**4.
2154
2155 2003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2156
2157 * elf32-mips.c: Fix addend for _gp_disp special symbol.
2158
2159 2003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2160
2161 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Remove non-default
2162 relocation header setup.
2163
2164 2003-06-25 Alan Modra <amodra@bigpond.net.au>
2165
2166 * elf32-ppc.c (ppc_elf_howto_table): Remove unnecessary cast.
2167 (ppc_elf_reloc_type_lookup): Modify comment.
2168 (ppc_elf_info_to_howto): Ditto.
2169 (ppc_elf_relocate_section): Ditto.
2170 (ppc_elf_check_relocs): Call ppc_elf_howto_init.
2171
2172 2003-06-25 Alan Modra <amodra@bigpond.net.au>
2173
2174 * aout-ns32k.c: Correct spelling of "relocatable".
2175 * aoutx.h: Likewise.
2176 * bfd-in.h: Likewise.
2177 * bfd.c: Likewise.
2178 * bout.c: Likewise.
2179 * coff-a29k.c: Likewise.
2180 * coff-alpha.c: Likewise.
2181 * coff-arm.c: Likewise.
2182 * coff-i386.c: Likewise.
2183 * coff-i860.c: Likewise.
2184 * coff-i960.c: Likewise.
2185 * coff-m68k.c: Likewise.
2186 * coff-m88k.c: Likewise.
2187 * coff-mcore.c: Likewise.
2188 * coff-mips.c: Likewise.
2189 * coff-or32.c: Likewise.
2190 * coff-ppc.c: Likewise.
2191 * coff-rs6000.c: Likewise.
2192 * coff-sh.c: Likewise.
2193 * coff-tic80.c: Likewise.
2194 * coff64-rs6000.c: Likewise.
2195 * cofflink.c: Likewise.
2196 * cpu-ns32k.c: Likewise.
2197 * ecoff.c: Likewise.
2198 * ecofflink.c: Likewise.
2199 * elf-bfd.h: Likewise.
2200 * elf-eh-frame.c: Likewise.
2201 * elf-hppa.h: Likewise.
2202 * elf-m10200.c: Likewise.
2203 * elf-m10300.c: Likewise.
2204 * elf.c: Likewise.
2205 * elf32-arm.h: Likewise.
2206 * elf32-avr.c: Likewise.
2207 * elf32-cris.c: Likewise.
2208 * elf32-d10v.c: Likewise.
2209 * elf32-dlx.c: Likewise.
2210 * elf32-fr30.c: Likewise.
2211 * elf32-frv.c: Likewise.
2212 * elf32-h8300.c: Likewise.
2213 * elf32-hppa.c: Likewise.
2214 * elf32-i370.c: Likewise.
2215 * elf32-i386.c: Likewise.
2216 * elf32-i860.c: Likewise.
2217 * elf32-i960.c: Likewise.
2218 * elf32-ip2k.c: Likewise.
2219 * elf32-iq2000.c: Likewise.
2220 * elf32-m32r.c: Likewise.
2221 * elf32-m68hc11.c: Likewise.
2222 * elf32-m68hc1x.c: Likewise.
2223 * elf32-m68k.c: Likewise.
2224 * elf32-mcore.c: Likewise.
2225 * elf32-mips.c: Likewise.
2226 * elf32-msp430.c: Likewise.
2227 * elf32-openrisc.c: Likewise.
2228 * elf32-ppc.c: Likewise.
2229 * elf32-s390.c: Likewise.
2230 * elf32-sh.c: Likewise.
2231 * elf32-sh64.c: Likewise.
2232 * elf32-sparc.c: Likewise.
2233 * elf32-v850.c: Likewise.
2234 * elf32-vax.c: Likewise.
2235 * elf32-xstormy16.c: Likewise.
2236 * elf32-xtensa.c: Likewise.
2237 * elf64-alpha.c: Likewise.
2238 * elf64-hppa.c: Likewise.
2239 * elf64-mips.c: Likewise.
2240 * elf64-mmix.c: Likewise.
2241 * elf64-ppc.c: Likewise.
2242 * elf64-s390.c: Likewise.
2243 * elf64-sh64.c: Likewise.
2244 * elf64-sparc.c: Likewise.
2245 * elf64-x86-64.c: Likewise.
2246 * elfcode.h: Likewise.
2247 * elflink.h: Likewise.
2248 * elfn32-mips.c: Likewise.
2249 * elfxx-ia64.c: Likewise.
2250 * elfxx-mips.c: Likewise.
2251 * i386linux.c: Likewise.
2252 * ieee.c: Likewise.
2253 * libcoff-in.h: Likewise.
2254 * linker.c: Likewise.
2255 * m68klinux.c: Likewise.
2256 * pdp11.c: Likewise.
2257 * pe-mips.c: Likewise.
2258 * peXXigen.c: Likewise.
2259 * reloc.c: Likewise.
2260 * reloc16.c: Likewise.
2261 * sparclinux.c: Likewise.
2262 * sunos.c: Likewise.
2263 * syms.c: Likewise.
2264 * versados.c: Likewise.
2265 * vms.c: Likewise.
2266 * xcofflink.c: Likewise.
2267 * bfd-in2.h: Regenerate.
2268 * libcoff.h: Regenerate.
2269 * libbfd.h: Regenerate.
2270
2271 2003-06-24 Alan Modra <amodra@bigpond.net.au>
2272
2273 * elf32-ppc.c (ppc_elf_check_relocs): Report plt reloc against
2274 local sym errors.
2275
2276 * elf32-i386.c: Convert to C90 function definitions, remove unnecessary
2277 prototypes and casts. Replace PTR with void *. Formatting.
2278 * elf32-ppc.c: Likewise. Break long strings too.
2279 (ppc_elf_relax_section): Use enum elf_ppc_reloc_type for r_type.
2280 (ppc_elf_unhandled_reloc): Internationalize error message.
2281 * elf32-ppc.h: Remove PARAMS.
2282
2283 2003-06-23 Mark Mitchell <mark@codesourcery.com>
2284
2285 * elf32-ppc.c (ppc_elf_begin_write_processing): Use bytes to count
2286 APUinfo slots.
2287 (ppc_elf_final_write_processing): Likewise.
2288
2289 2003-06-23 H.J. Lu <hongjiu.lu@intel.com>
2290
2291 * elflink.h (elf_link_input_bfd): Check raw size when using
2292 kept_section to preserve debug information discarded by
2293 linkonce.
2294
2295 2003-06-20 Alan Modra <amodra@bigpond.net.au>
2296
2297 * elf64-ppc.c (struct ppc_link_hash_table): Add top_id.
2298 (ppc64_elf_setup_section_lists): Set it.
2299 (ppc64_elf_relocate_section): Check sym section id against top_id.
2300 (ppc_build_one_stub): Comment on top_id.
2301
2302 2003-06-20 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
2303
2304 * config.bfd: Add tic4x-*-rtems*.
2305
2306 2003-06-20 Alan Modra <amodra@bigpond.net.au>
2307
2308 * elf64-ppc.c: Convert to C90 function definitions, remove unnecessary
2309 prototypes and casts. Replace PTR with void *. Format copyright.
2310 Mention ABI links.
2311 (struct ppc_link_hash_table): Rename sgot, srelgot, splt, srelplt,
2312 sdynbss, srelbss, sglink, sbrlt and srelbrlt to got, relgot .. relbrlt.
2313 (ppc_type_of_stub): Make r_type an enum.
2314 (ppc64_elf_size_stubs): Likewise.
2315 * elf64-ppc.h: Remove PARAMS macro.
2316
2317 2003-06-19 Alan Modra <amodra@bigpond.net.au>
2318
2319 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Reinstate init of
2320 elf hash tab fields.
2321
2322 * elf64-ppc.c (ppc64_elf_reloc_type_lookup): Tidy prototype.
2323 (ppc64_elf_info_to_howto): Likewise.
2324 (ppc64_elf_build_stubs): Add "stats" param, and print statistics.
2325 * elf64-ppc.h (ppc64_elf_build_stubs): Adjust prototype.
2326
2327 2003-06-19 Alan Modra <amodra@bigpond.net.au>
2328
2329 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore R_SPARC_DISP32
2330 reloc overflow on discarded eh_frame entries.
2331
2332 2003-06-19 Alan Modra <amodra@bigpond.net.au>
2333
2334 * elf64-ppc.c (toc_adjusting_stub_needed): New function.
2335 (ppc64_elf_next_input_section): Use it here to set has_gp_reloc.
2336 Return error condition.
2337 (ppc64_elf_size_stubs): Restrict toc adjusting stubs to sections
2338 that have has_gp_reloc set.
2339 (struct ppc_link_hash_table): Add stub_count.
2340 (ppc_build_one_stub): Increment it.
2341 (ppc64_elf_link_hash_table_create): zmalloc rather than clearing
2342 individual fields.
2343 * elf64-ppc.h (ppc64_elf_next_input_section): Update prototype.
2344
2345 2003-06-18 Alan Modra <amodra@bigpond.net.au>
2346
2347 * elflink.h (elf_gc_record_vtentry): Revert last change. Correct
2348 size calculation from addend. Round size up.
2349
2350 2003-06-18 Hans-Peter Nilsson <hp@axis.com>
2351
2352 * elf32-cris.c (cris_elf_relocate_section) <case
2353 R_CRIS_32_GOTREL>: When linking a program, don't complain about a
2354 symbol from a normal object or an undefined weak symbol.
2355
2356 2003-06-18 Alan Modra <amodra@bigpond.net.au>
2357
2358 * elf64-ppc.c (ppc64_elf_relocate_section): Accept a symbol on
2359 R_PPC64_TOC relocs.
2360
2361 2003-06-17 H.J. Lu <hongjiu.lu@intel.com>
2362
2363 * section.c (struct sec): Put back kept_section.
2364 (STD_SECTION): Put back kept_section initialization.
2365 * bfd-in2.h: Regenerate.
2366
2367 * elflink.h (elf_link_input_bfd): Also check discarded linkonce
2368 sections for relocateable output. Use kept_section to preserve
2369 debug information discarded by linkonce.
2370
2371 2003-06-17 Roland McGrath <roland@redhat.com>
2372
2373 * elfxx-ia64.c (elfNN_ia64_relocate_section): Support
2374 segment-relative relocation between different segments.
2375
2376 2003-06-17 Alan Modra <amodra@bigpond.net.au>
2377
2378 * elf64-ppc.c (ppc64_elf_relocate_section): Do unaligned reloc
2379 optimizations earlier.
2380
2381 * elf64-ppc.c (struct ppc_link_hash_table): Reinstate top_index.
2382 Restore previous input_list type.
2383 (ppc64_elf_link_hash_table_create): Undo last change.
2384 (ppc64_elf_setup_section_lists): Reinstate code setting up input lists
2385 per output section, but don't bother with bfd_abs_section marker.
2386 (ppc64_elf_next_input_section): Adjust for multiple input section
2387 lists.
2388 (group_sections): Likewise.
2389
2390 2003-06-17 Jakub Jelinek <jakub@redhat.com>
2391
2392 * elf64-ppc.c (ppc64_elf_relocation_section): Ensure
2393 *r_offset == r_addend for RELATIVE relocs against .got.
2394
2395 2003-06-17 Alan Modra <amodra@bigpond.net.au>
2396
2397 * elf64-ppc.c (ppc64_elf_relocate_section): Optimize unaligned relocs.
2398
2399 2003-06-17 Nick Clifton <nickc@redhat.com>
2400
2401 * elflink.h (elf_gc_record_vtentry): Allocate an extra element
2402 in the vtable_entries_used array to allow for the accessing
2403 the largest element.
2404
2405 2003-06-17 Alan Modra <amodra@bigpond.net.au>
2406
2407 * elf64-ppc.c (struct ppc_link_hash_table): Remove top_index. Modify
2408 input_list.
2409 (ppc64_elf_link_hash_table_create): Init input_list here.
2410 (ppc64_elf_setup_section_lists): Remove code setting up input lists
2411 per output section. Set toc_off for abs and other standard sections.
2412 (ppc64_elf_reinit_toc): Don't set elf_gp on input bfds lacking a toc.
2413 (ppc64_elf_next_input_section): Adjust for single input section list.
2414 Don't set toc_curr from input bfds that haven't set elf_gp.
2415 (group_sections): Adjust for single input section list.
2416
2417 * elf64-ppc.c (ppc64_elf_relocate_section): Correct pcrel section zero.
2418
2419 2003-06-16 Alan Modra <amodra@bigpond.net.au>
2420
2421 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing toctprel
2422 tls, check that a TOC16_DS or TOC16_LO_DS reloc isn't pointing to a
2423 dtprel entry. Ensure TLS_LD DTPMOD reloc has a zero addend. Write
2424 got section for RELATIVE relocs. Fix wrong comment. Change condition
2425 under which dynamic relocs update the section contents.
2426
2427 2003-06-13 Robert Millan <zeratul2@wanadoo.es>
2428
2429 * config.bfd: Add i386-netbsd-gnu target.
2430
2431 2003-06-12 Nick Clifton <nickc@redhat.com>
2432
2433 * opncls.c (calc_crc32): Rename to
2434 bfd_calc_gnu_debuglink_crc32 and export.
2435 (GNU_DEBUGLINK): Define and use to replace occurrences of
2436 hard-coded ".gnu_debuglink" in the code.
2437 (get_debug_link_info): Prevent aborts by replacing call to
2438 xmalloc with a call to malloc.
2439 (find_separate_debug_file): Prevent aborts by replacing calls
2440 to xmalloc and xstrdup with calls to malloc and strdup.
2441 (bfd_add_gnu_debuglink): New function. Add a .gnu_debuglink
2442 section to a bfd.
2443 * bfd-in2.h: Regenerate.
2444
2445 2003-06-12 Federico G. Schwindt <fgsch@lodoss.net>
2446
2447 * config.bfd (i[3-7]86-*-openbsd[0-2].* | i[3-7]86-*-openbsd3.[0-3]):
2448 New target (was i[3-7]86-*-openbsd* before).
2449 (i[3-7]86-*-openbsd*): Change to use bfd_elf32_i386_vec.
2450 (vax-*-openbsd*): New target.
2451
2452 2003-06-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2453
2454 * elfxx-mips.c (MIPS_ELF_OPTIONS_SECTION_NAME): Use .MIPS.options
2455 for n32, too.
2456 (MIPS_ELF_STUB_SECTION_NAME): Use .MIPS.stubs for n32, too.
2457 (mips_elf_rel_dyn_section): Use appropriate section alignment.
2458 (mips_elf_create_got_section): Likewise.
2459 (_bfd_mips_elf_create_dynamic_sections): Likewise.
2460
2461 2003-06-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2462
2463 * elf32-mips.c (mips_elf_generic_reloc): New Function.
2464 (elf_mips_howto_table_rel): Use it.
2465 (gprel32_with_gp): Move prototype.
2466 (mips_elf_hi16_reloc): Check for ! BSF_LOCAL instead of zero addend.
2467 Use mips_elf_generic_reloc.
2468 (mips_elf_got16_reloc): Check for ! BSF_LOCAL instead of zero addend.
2469 Code cleanup.
2470 (_bfd_mips_elf32_gprel16_reloc): Check for ! BSF_LOCAL instead of
2471 zero addend.
2472 (mips_elf_gprel32_reloc): Likewise. Use the same GP assignment logic
2473 as in the other *_gprel*_reloc functions.
2474 (gprel32_with_gp): Handle partial_inplace properly.
2475 (mips32_64bit_reloc): Use mips_elf_generic_reloc.
2476 (mips16_gprel_reloc): Check for ! BSF_LOCAL instead of zero addend.
2477 Do addend handling directly instead of calling
2478 _bfd_mips_elf_gprel16_with_gp. Handle partial_inplace properly.
2479 * elf64-mips.c (mips_elf64_hi16_reloc): Check for ! BSF_LOCAL instead
2480 of zero addend. Handle partial_inplace properly.
2481 (mips_elf64_got16_reloc): Check for ! BSF_LOCAL instead of zero
2482 addend.
2483 (mips_elf64_gprel16_reloc): Likewise.
2484 (mips_elf64_literal_reloc): Likewise.
2485 (mips_elf64_gprel32_reloc): Likewise. Use the same GP assignment
2486 logic as in the other *_gprel*_reloc functions. Handle
2487 partial_inplace properly.
2488 (mips_elf64_shift6_reloc): Check for ! BSF_LOCAL instead of zero
2489 addend. Handle partial_inplace properly.
2490 (mips16_gprel_reloc): Likewise. Do addend handling directly instead
2491 of calling _bfd_mips_elf_gprel16_with_gp.
2492 * elfn32-mips.c (mips_elf_got16_reloc): Check for BSF_LOCAL.
2493 (mips_elf_gprel32_reloc): Check for ! BSF_LOCAL instead
2494 of zero addend.
2495 (mips_elf_shift6_reloc): Handle partial_inplace properly.
2496 (mips16_gprel_reloc): Likewise. Do addend handling directly instead
2497 of calling _bfd_mips_elf_gprel16_with_gp.
2498 * elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp): Handle
2499 partial_inplace properly. Fix wrong addend handling. Fix overflow
2500 check.
2501 (_bfd_mips_elf_sign_extend): Renamed from mips_elf_sign_extend and
2502 exported.
2503 (mips_elf_calculate_relocation): Use _bfd_mips_elf_sign_extend.
2504 (_bfd_mips_elf_relocate_section): Likewise.
2505 (mips_elf_create_dynamic_relocation): Update sec_info_type access.
2506 * elfxx-mips.h (_bfd_mips_relax_section): Fix prototype declaration.
2507 (_bfd_mips_elf_sign_extend): New prototype.
2508
2509 2003-06-11 Federico G. Schwindt <fgsch@lodoss.net>
2510
2511 * config.bfd (sparc-*-openbsd[0-2].* | sparc-*-openbsd3.[0-1]):
2512 New target (was sparc-*-openbsd* before).
2513 (sparc-*-openbsd*): Change to use bfd_elf32_sparc_vec.
2514
2515 * configure.in (vax-*-openbsd*): Set COREFILE to netbsd-core.lo.
2516 * configure: Regenerate.
2517
2518 2003-06-11 H.J. Lu <hongjiu.lu@intel.com>
2519
2520 * po/Make-in (DESTDIR): New.
2521 (install-data-yes): Support $(DESTDIR).
2522 (uninstall): Likewise.
2523
2524 2003-06-11 Alan Modra <amodra@bigpond.net.au>
2525
2526 * Makefile.am (config.status): Depend on version.h.
2527 Run "make dep-am".
2528 * Makefile.in: Regenerate.
2529 * po/SRC-POTFILES.in: Regenerate.
2530
2531 2003-06-10 Alan Modra <amodra@bigpond.net.au>
2532 Gary Hade <garyhade@us.ibm.com>
2533
2534 * elf64-ppc.c (ppc64_elf_relocate_section <*_DS>): Special case lq.
2535
2536 2003-06-10 Richard Sandiford <rsandifo@redhat.com>
2537
2538 * archures.c (bfd_mach_h8300sxn): New architecture.
2539 * bfd-in2.h: Regenerate.
2540 * cpu-h8300.c (h8300_scan): Check for 'sxn'.
2541 (h8300sxn_info_struct): New.
2542 (h8300sx_info_struct): Link to it.
2543 * elf32-h8300.c (elf32_h8_mach): Add h8300sxn case.
2544 (elf32_h8_final_write_processing): Likewise.
2545
2546 2003-06-08 Alan Modra <amodra@bigpond.net.au>
2547
2548 * elf64-ppc.c: Move TARGET_LITTLE_SYM and other macros used by
2549 elfxx-target.h so that we can use elf_backend_got_header_size.
2550 (ELF_MACHINE_ALT1, ELF_MACHINE_ALT2): Delete.
2551 (GLINK_CALL_STUB_SIZE): Modify. Define new glink call stub and
2552 associated macros.
2553 (ppc64_elf_howto_raw <GOT_TPREL16_DS, GOT_TPREL16_LO_DS>): Correct
2554 dst_mask.
2555 (enum ppc_stub_type): Add ppc_stub_long_branch_r2off and
2556 ppc_stub_plt_branch_r2off.
2557 (struct ppc_stub_hash_entry): Reorganize.
2558 (struct ppc_link_hash_table): Add no_multi_toc, multi_toc_needed,
2559 toc_curr, toc_off and emit_stub_syms.
2560 (ppc64_elf_link_hash_table_create): Init them.
2561 (ppc_stub_name): Correct string size.
2562 (ppc64_elf_check_relocs): Set has_gp_reloc on GOT and TOC relocs.
2563 (ppc64_elf_size_dynamic_sections): Set no_multi_toc if GOT entries
2564 used.
2565 (ppc_type_of_stub): Tweak root.type test.
2566 (build_plt_stub): Remove glink code. Adjust for insn macro changes.
2567 (ppc_size_one_stub): Handle ppc_stub_long_branch_r2off and
2568 ppc_stub_plt_branch_r2off.
2569 (ppc_build_one_stub): Likewise. Fix var shadowing. Correct addis,addi
2570 range test. Use toc_off to calculte r2 values. Handle emit_stub_syms.
2571 (ppc64_elf_setup_section_lists): Remove htab creator flavour test.
2572 Initialize elf_gp and toc_curr.
2573 (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): New functions.
2574 (ppc64_elf_next_input_section): Set toc_off.
2575 (group_sections): Ensure groups have the same TOC.
2576 (ppc64_elf_size_stubs): Check whether we need a TOC adjusting stub.
2577 (ppc64_elf_build_stubs): Add emit_stub_syms param, and stash in htab.
2578 Build new glink stub.
2579 (ppc64_elf_relocate_section): Handle multiple TOCs. Fix comments.
2580 (ppc64_elf_finish_dynamic_sections): Adjust DT_PPC64_GLINK.
2581 * elf64-ppc.h (ppc64_elf_build_stubs): Update prototype.
2582 (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): Declare.
2583 * section.c (struct sec): Rename flag12 to has_gp_reloc.
2584 (STD_SECTION): Update.
2585 * ecoff.c (bfd_debug_section): Update comment.
2586 * bfd-in2.h: Regenerate.
2587
2588 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
2589
2590 * elfcode.h (elf_slurp_reloc_table_from_section): Don't dereference
2591 NULL function pointers.
2592
2593 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
2594
2595 * simple.c (bfd_simple_get_relocated_section_contents): Call
2596 _bfd_generic_link_add_symbols instead of bfd_link_add_symbols.
2597
2598 2003-06-04 Svein E. Seldal <Svein.Seldal@solidas.com>
2599
2600 * coff-tic54x.c: Removed the ticoff0_bad_format_hook() and
2601 ticoff1_bad_format_hook() functions. Removed the coff0 and coff1
2602 swaptables.
2603 * coff-tic4x.c: Ditto
2604 * coffcode.h: Added extra arguments to CREATE_BIG_COFF_TARGET_VEC
2605 and CREATE_LITTLE_COFF_TARGET_VEC. Created the macro
2606 CREATE_BIGHDR_COFF_TARGET_VEC. Created the ticoff0_bad_format_hook(),
2607 ticoff1_bad_format_hook() functions. Created the coff0 and coff1
2608 swap tables.
2609 * coff-tic4x.c: Adopted new CREATE_xxx_COFF_TARGET_VEC macros.
2610 * coff-a29k.c: Append COFF_SWAP_TABLE argument
2611 * coff-apollo.c: Ditto
2612 * coff-arm.c: Ditto
2613 * coff-h8300.c: Ditto
2614 * coff-h8500.c: Ditto
2615 * coff-i960.c: Ditto
2616 * coff-m68k.c: Ditto
2617 * coff-m88k.c: Ditto
2618 * coff-mcore.c: Ditto
2619 * coff-sh.c: Ditto
2620 * coff-sparc.c: Ditto
2621 * coff-tic80.c: Ditto
2622 * coff-we32k.c: Ditto
2623 * coff-z8k.c: Ditto
2624 * coff-w65.c: Ditto
2625
2626 2003-06-04 Svein E. Seldal <Svein.Seldal@solidas.com>
2627
2628 * coff-tic4x.c (ticoff0_swap_table, ticoff1_swap_table): Fixed
2629 initialization bug
2630
2631 2003-06-03 Jakub Jelinek <jakub@redhat.com>
2632
2633 * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_STACK.
2634 (bfd_section_from_phdr): Likewise.
2635 (map_sections_to_segments): Create PT_GNU_STACK segment header.
2636 (get_program_header_size): Count with PT_GNU_STACK.
2637 * elf-bfd.h (struct elf_obj_tdata): Add stack_flags.
2638 * elflink.h (bfd_elfNN_size_dynamic_sections): Set stack_flags.
2639
2640 2003-06-03 H.J. Lu <hongjiu.lu@intel.com>
2641
2642 * elflink.h (elf_link_input_bfd): Call linker error_handler
2643 for discarded definitions.
2644
2645 2003-06-03 Elias Athanasopoulos <elathan@phys.uoa.gr>
2646
2647 * syms.c (decode_section_type): Return 'n' if section flags are
2648 SEC_HAS_CONTENTS && SEC_READONLY.
2649
2650 2003-06-03 Nick Clifton <nickc@redhat.com>
2651
2652 * elf32-v850.c (v850_elf_howto_t): Rename R_V850_32to
2653 R_V850_ABS32. Add entry for R_V850_REL32.
2654 (v850_elf_reloc_map): Likewise.
2655 (v850_elf_check_relocs): Likewise.
2656 (v850_elf_perform_relocation): Likewise.
2657 (v850_elf_final_link_relocate): Likewise. Include computation
2658 to make R_V850_REl32 pc-relative.
2659
2660 2003-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2661
2662 * elf32-sh.c (sh_elf_size_dynamic_sections): Create .interp section
2663 and DT_DEBUG dynamic tag even for position independent executables.
2664 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewize.
2665
2666 2003-06-02 Daniel Jacobowitz <drow@mvista.com>
2667
2668 * config.bfd: Move obsolete entries out of the range of the
2669 targmatch sed script.
2670
2671 2003-06-02 Daniel Jacobowitz <drow@mvista.com>
2672
2673 * config.bfd (mips*-dec-bsd*, mips*-*-pe*): Mark as obsolete.
2674
2675 2003-05-31 Jakub Jelinek <jakub@redhat.com>
2676
2677 * elf32-ppc.c (allocate_dynrelocs): Use single slot for first 8192
2678 plt entries, not just 8191.
2679
2680 2003-05-30 Daniel Jacobowitz <drow@mvista.com>
2681
2682 * elfxx-mips.c (_bfd_mips_elf_discard_info): Correct loop index.
2683 Reported by Ken Faiczak <kfaiczak@SANDVINE.com>.
2684
2685 2003-05-30 Ulrich Drepper <drepper@redhat.com>
2686 Jakub Jelinek <jakub@redhat.com>
2687
2688 * elflink.h (elf_link_add_object_symbols): Use !info->executable
2689 instead of info->shared where appropriate.
2690 (bfd_elfNN_size_dynamic_sections, elf_link_output_extsym): Likewise.
2691 * elflink.c (_bfd_elf_create_got_section): Likewise.
2692 (_bfd_elf_link_create_dynamic_sections): Likewise.
2693 (_bfd_elf_link_assign_sym_version): Likewise.
2694 * elf32-i386.c (elf_i386_size_dynamic_sections): Create .interp section
2695 and DT_DEBUG dynamic tag even for position independent executables.
2696 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
2697 * elf32-s390.c (elf_s390_size_dynamic_sections: Likewise.
2698 * elf64-ppc.c (ppc64_elf_size_dynamic_sections: Likewise.
2699 * elf64-s390.c (elf_s390_size_dynamic_sections: Likewise.
2700 * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections: Likewise.
2701 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections: Likewise.
2702 * elf32-sparc.c (elf32_sparc_size_dynamic_sections: Likewise.
2703 * elf64-alpha.c (elf64_alpha_size_dynamic_sections: Likewise.
2704 * elf64-sparc.c (sparc64_elf_size_dynamic_sections: Likewise.
2705
2706 2003-05-30 Kris Warkentin <kewarken@qnx.com>
2707
2708 * elf.c (elfcore_grok_nto_status): Only set lwpid for the active or
2709 signalled thread.
2710 (elfcore_grok_nto_gregs): Only make .reg section for the active thread.
2711
2712 2003-05-29 Nick Clifton <nickc@redhat.com>
2713
2714 * pef.c: Include "safe-ctype.h" instead of <ctype.h>.
2715 Tidy up formatting.
2716 * Makefile.am: Add dependency on safe-ctype.h.
2717 * Makefile.in: Regenerate.
2718
2719 2003-05-29 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2720
2721 * elfxx-mips.c: Don't force symbols local unconditionally.
2722
2723 2003-05-28 Alan Modra <amodra@bigpond.net.au>
2724
2725 * elf32-hppa.c (elf32_hppa_relocate_section): Delete bogus
2726 undefined_symbol call.
2727
2728 2003-05-27 Richard Sandiford <rsandifo@redhat.com>
2729
2730 * elfxx-mips.c (mips_elf_hash_sort_data): Fix formattting.
2731 (mips_elf_link_hash_table): Likewise.
2732
2733 2003-05-22 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2734
2735 * elf64-mips.c (elf_mips_gnu_rel16_s2): Add internally used
2736 R_MIPS_GNU_REL16_S2 support.
2737 (bfd_elf64_bfd_reloc_type_lookup): Use it.
2738 (mips_elf64_rtype_to_howto): Use it.
2739 * elfn32-mips.c (elf_mips_gnu_rel16_s2): Add internally used
2740 R_MIPS_GNU_REL16_S2 support.
2741 (bfd_elf32_bfd_reloc_type_lookup): Use it.
2742 (mips_elf_n32_rtype_to_howto): Use it.
2743
2744 2003-05-21 Stuart F. Downing <sdowning@fame.com>
2745
2746 * som.h: Define PA_2_0 before including a.out.h
2747
2748 2003-05-07 Eric Christopher <echristo@redhat.com>
2749 Alexandre Oliva <aoliva@redhat.com>
2750
2751 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Adjust
2752 pic tests, change to warning.
2753 (_bfd_mips_elf_final_link): Remove EF_MIPS_CPIC flag setting.
2754
2755 2003-05-21 Marcus Comstedt <marcus@mc.pp.se>
2756
2757 * config.bfd: Check for a target triplet of shl-...-netbsdelf as
2758 well as shle-...-netbsdelf. Remove duplicate entry.
2759
2760 2003-05-21 Nick Clifton <nickc@redhat.com>
2761
2762 * elf32-xstormy16.c (xstormy16_elf_howto_table): Fix dst_mask
2763 for X_STORMY16_REL_12 reloc.
2764
2765 * elf.c (bfd_elf_get_needed_list): Use is_elf_hash_table to check
2766 the type of the hash table in the bfd_link_info structure.
2767 (bfd_elf_get_runpath_list): Likewise.
2768
2769 2003-05-19 Roland McGrath <roland@redhat.com>
2770
2771 * elf.c (bfd_elf_bfd_from_remote_memory): New function.
2772 * bfd-in.h: Declare it.
2773 * bfd-in2.h: Regenerated.
2774 * elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): New function.
2775 * elf-bfd.h (struct elf_backend_data): New function pointer member
2776 elf_backend_bfd_from_remote_memory.
2777 (_bfd_elf32_bfd_from_remote_memory, _bfd_elf64_bfd_from_remote_memory):
2778 Declare them.
2779 * elfxx-target.h (elf_backend_bfd_from_remote_memory): New macro.
2780 (elfNN_bed): Add that to the initializer.
2781
2782 2003-05-15 Roland McGrath <roland@redhat.com>
2783
2784 * elf.c (elfcore_grok_note): Grok NT_AUXV note, make ".auxv" section.
2785
2786 2003-05-20 Jakub Jelinek <jakub@redhat.com>
2787
2788 * elflink.h (elf_link_output_extsym): Only issue error about !=
2789 STV_DEFAULT symbols if they are bfd_link_hash_undefined.
2790
2791 2003-05-20 H.J. Lu <hongjiu.lu@intel.com>
2792
2793 * elflink.c (_bfd_elf_merge_symbol): Check ELF_LINK_DYNAMIC_DEF
2794 when removing the old definition for symbols with non-default
2795 visibility.
2796
2797 2003-05-18 Jason Eckhardt <jle@rice.edu>
2798
2799 * elf32-i860.c (elf32_i860_relocate_highadj): Simplify calculation.
2800
2801 2003-05-17 Andreas Schwab <schwab@suse.de>
2802
2803 * elf32-m68k.c (elf_m68k_check_relocs): Cache reloc section in
2804 elf_section_data during processing of pc-relative and absolute
2805 relocations.
2806 (elf_m68k_relocate_section): Use the cached reloc section instead
2807 of computing it again. Fix handling of visibility. Don't modify
2808 addend when copying over a relocation into the output.
2809
2810 2003-05-17 Alan Modra <amodra@bigpond.net.au>
2811
2812 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
2813 to trim plt entries. Move undefweak non-default visibility test..
2814 (allocate_dynrelocs): ..from here.
2815 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't test
2816 dynamic_sections_created here. Update comment. Move undefweak
2817 non-default visibility test..
2818 (allocate_dynrelocs): ..from here. Fix comment.
2819 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
2820 to trim plt entries. Move undefweak non-default visibility test..
2821 (allocate_dynrelocs): ..from here. Fix comment.
2822 * elflink.h (elf_link_output_extsym): Compare ELF_ST_VISIBILITY with
2823 STV_DEFAULT rather than comparing with zero.
2824 * elflink.c (_bfd_elf_merge_symbol): Likewise.
2825 (_bfd_elf_fix_symbol_flags): Likewise. Format comment.
2826
2827 2003-05-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2828
2829 * bfd.c (_bfd_get_gp_value): Prevent illegal access for abfd null
2830 pointers.
2831 (_bfd_set_gp_value): Likewise.
2832
2833 2003-05-16 Michael Snyder <msnyder@redhat.com>
2834 From Bernd Schmidt <bernds@redhat.com>
2835 * archures.c (bfd_mach_h8300sx): New.
2836 * bfd-in2.h: Regenerate.
2837 * cpu-h8300.c (h8300_scan)): Add support for h8300sx.
2838 (h8300sx_info_struct): New.
2839 (h8300s_info_struct): Link to it.
2840 * elf32-h8300.c (elf32_h8_mach): Add support for h8300sx.
2841 (elf32_h8_final_write_processing): Likewise.
2842 (elf32_h8_relax_section): Likewise.
2843
2844 2003-05-16 Kelley Cook <kelleycook@wideopenwest.com>
2845
2846 * config.bfd: Accept i[3-7]86 variants.
2847 * configure.host: Likewise.
2848 * configure.in: Likewise.
2849 * configure: Regenerate.
2850
2851 2003-05-15 H.J. Lu <hongjiu.lu@intel.com>
2852
2853 * elflink.c (_bfd_elf_fix_symbol_flags): Also hide protected
2854 symbol.
2855
2856 2003-05-15 H.J. Lu <hongjiu.lu@intel.com>
2857
2858 * elflink.h (elf_link_check_versioned_symbol): Also allow
2859 the base version.
2860
2861 2003-05-15 Alan Modra <amodra@bigpond.net.au>
2862 H.J. Lu <hongjiu.lu@intel.com>
2863
2864 * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL.
2865 (elf_i386_relocate_section): Likewise.
2866 * elf32-ppc.c (allocate_dynrelocs): Likewise.
2867 (ppc_elf_relocate_section): Likewise.
2868 * elf64-ppc.c (allocate_dynrelocs): Likewise.
2869 (ppc64_elf_relocate_section): Likewise.
2870
2871 2003-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2872
2873 * elf32-mips.c (gprel32_with_gp): Remove useless N64 ABI case.
2874
2875 2003-05-13 Stephane Carrez <stcarrez@nerim.fr>
2876
2877 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Check for
2878 processor capability, allow merge of HC12 and HCS12 in some cases.
2879 (m68hc11_elf_hash_table_create): Use bfd_malloc instead of bfd_zalloc.
2880 * cpu-m68hc12.c (bfd_m68hc12s_arch): New struct.
2881 (bfd_m68hc12_arch): Link it.
2882 (scan_mach): New function.
2883
2884 2003-05-13 Andrew Haley <aph@redhat.com>
2885
2886 * elf.c (bfd_elf_hash): Mask lower 32 bits of hash.
2887
2888 2003-05-13 Alan Modra <amodra@bigpond.net.au>
2889 H.J. Lu <hongjiu.lu@intel.com>
2890
2891 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Move from
2892 elf32-ppc.c. Add ELF_LINK_FORCED_LOCAL check.
2893 * elf32-ppc.c: (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Delete.
2894 (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for dynreloc check.
2895 (ppc_elf_relocate_section): Likewise.
2896 * elf64-ppc.c (allocate_dynrelocs): Likewise.
2897 (ppc64_elf_relocate_section): Likewise. Use for .got relocs too.
2898 (ppc64_elf_adjust_dynamic_symbol): Don't assume symbols with .plt
2899 relocs need no other types.
2900 * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for
2901 dynreloc check.
2902 (elf_i386_relocate_section): Likewise. Use for .got relocs too.
2903 (elf_i386_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL for
2904 .got relocs.
2905
2906 2003-05-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2907
2908 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): For weak symbols,
2909 copy ELF_LINK_NON_GOT_REF from weakdef.
2910 (allocate_dynrelocs): For undef weak syms with non-default
2911 visibility, a) don't allocate plt entries, b) don't allocate
2912 .got relocs, c) discard dyn rel space
2913 (sh_elf_relocate_section): d) don't generate .got relocs, e)
2914 don't generate dynamic relocs.
2915 (sh_elf_copy_indirect_symbol): Don't copy ELF_LINK_NON_GOT_REF
2916 for weakdefs when symbol already adjusted.
2917
2918 2003-05-12 Nick Clifton <nickc@redhat.com>
2919
2920 * elf32-xstormy16.c (xstormy16_elf_howto_table): use 'bitfield'
2921 overflow detection for R_XSTORMY16_16 reloc.
2922
2923 2003-05-12 Paul Clarke <paulc@senet.com.au>
2924
2925 * elf32-h8300.c: Fix typo in name of R_H8_DIR8 reloc.
2926
2927 2003-05-11 Jason Eckhardt <jle@rice.edu>
2928
2929 * elf32-i860.c (elf32_i860_relocate_highadj): Properly
2930 adjust upper bits.
2931 (elf32_i860_relocate_splitn): Obtain upper 5 bits from the
2932 proper place.
2933 (elf32_i860_relocate_pc16): Obtain upper 5 bits from the
2934 proper place.
2935
2936 2003-05-11 Andreas Schwab <schwab@suse.de>
2937
2938 * elf32-m68k.c (elf_m68k_relocate_section): Replace ugly
2939 complicated tests for unresolvable relocs with a simple direct
2940 scheme using "unresolved_reloc" var. Report some detail on
2941 bfd_reloc_outofrange and similar errors.
2942
2943 2003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
2944
2945 * elf32-s390.c (allocate_dynrelocs, elf_s390_relocate_section):
2946 Fix WILL_CALL_FINISH_DYNAMIC_SYMBOL call.
2947 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
2948 * elf64-s390.c: Likewise.
2949
2950 2003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
2951
2952 * elf32-s390.c (ELIMINATE_COPY_RELOCS): Define as one.
2953 (elf_s390_adjust_dynamic_symbol): For weak symbols, copy
2954 ELF_LINK_NON_GOT_REF from weakdef.
2955 (elf_s390_copy_indirect_symbol): Test whether the weakdef sym has
2956 already been adjusted before treating it specially.
2957 * el64-s390.c: Likwise.
2958
2959 2003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
2960
2961 * elf32-s390.c (allocate_dynrelocs): For undef weak syms with
2962 non-default visibility, a) don't make them dynamic, b) discard
2963 space for dynamic relocs.
2964 (elf_s390_relocate_section): Initialize the GOT entries and skip
2965 R_390_{8,16,32}/R_390_PC{16,16DBL,32DBL,32} for weak undefined
2966 symbols with non-default visibility.
2967 * elf64-s390.c: Likewise.
2968
2969 2003-05-09 Alan Modra <amodra@bigpond.net.au>
2970
2971 * cpu-arm.c (arm_check_note): Warning fix.
2972 * elf32-iq2000.c (iq2000_elf_check_relocs): Warning fixes. Arrange
2973 to keep relocs if edited.
2974 (iq2000_elf_print_private_bfd_data): Return TRUE.
2975 * elfxx-ia64.c (elfNN_ia64_relax_section): Use ELFNN_R_SYM, not
2976 ELF64_R_SYM.
2977 (elfNN_ia64_relax_ldxmov): Warning fix.
2978 * xtensa-isa.c (xtensa_add_isa): Warning fix.
2979 * xtensa-modules.c (get_num_opcodes): Warning fix.
2980
2981 2003-05-09 Andrey Petrov <petrov@netbsd.org>
2982
2983 * elf.c (elf_fake_sections): Use correct cast for sh_name.
2984
2985 2003-05-09 Alan Modra <amodra@bigpond.net.au>
2986
2987 * elflink.c (_bfd_elf_link_create_dynamic_sections): Move from
2988 elflink.h. Replace LOG_FILE_ALIGN with bed->s->log_file_align.
2989 (_bfd_elf_create_dynamic_sections): Use bed->s->log_file_align.
2990 (bfd_elf_record_link_assignment): Move from elflink.h.
2991 (_bfd_elf_merge_symbol): Likewise.
2992 (_bfd_elf_add_default_symbol): Likewise.
2993 (_bfd_elf_export_symbol): Likewise.
2994 (_bfd_elf_link_find_version_dependencies): Likewise.
2995 (_bfd_elf_link_assign_sym_version): Likewise.
2996 (_bfd_elf_link_read_relocs): Likewise.
2997 (_bfd_elf_link_size_reloc_section): Likewise.
2998 (_bfd_elf_fix_symbol_flags): Likewise.
2999 (_bfd_elf_adjust_dynamic_symbol): Likewise.
3000 (_bfd_elf_link_sec_merge_syms): Likewise.
3001 (elf_link_read_relocs_from_section): Likewise. Use bed->s->sizeof_rel
3002 and bed->s->sizeof_rela.
3003 (_bfd_elf_link_output_relocs): Likewise.
3004 * elf-bfd.h (struct elf_size_info): Rename file_align to
3005 log_file_align.
3006 (struct elf_info_failed): Move from elflink.h.
3007 (struct elf_assign_sym_version_info): Likewise.
3008 (struct elf_find_verdep_info): Likewise.
3009 (_bfd_elf_create_dynamic_sections): Delete duplicate declaration.
3010 (_bfd_elf_merge_symbol, _bfd_elf_add_default_symbol,
3011 _bfd_elf_export_symbol, _bfd_elf_link_find_version_dependencies,
3012 _bfd_elf_link_assign_sym_version,
3013 _bfd_elf_link_create_dynamic_sections, _bfd_elf_link_read_relocs,
3014 _bfd_elf_link_size_reloc_section, _bfd_elf_link_output_relocs,
3015 _bfd_elf_fix_symbol_flags, _bfd_elf_adjust_dynamic_symbol,
3016 _bfd_elf_link_sec_merge_syms): Declare.
3017 (bfd_elf32_link_create_dynamic_sections): Don't declare.
3018 (_bfd_elf32_link_read_relocs): Likewise.
3019 (bfd_elf64_link_create_dynamic_sections): Likewise.
3020 (_bfd_elf64_link_read_relocs): Likewise.
3021 * elflink.h: Move lots o' stuff elsewhere.
3022 * bfd-in.h (bfd_elf32_record_link_assignment): Don't declare.
3023 (bfd_elf64_record_link_assignment): Likewise.
3024 (bfd_elf_record_link_assignment): Declare.
3025 * bfd-in2.h: Regenerate.
3026 * elfcode.h (elf_link_create_dynamic_sections): Don't declare.
3027 (NAME(_bfd_elf,size_info)): Adjust for log_file_align.
3028 * elf.c (_bfd_elf_init_reloc_shdr): Adjust for bed->s->log_file_align.
3029 (assign_file_positions_for_segments): Likewise.
3030 (assign_file_positions_except_relocs): Likewise.
3031 (swap_out_syms, elfcore_write_note): Likewise.
3032 * elf-m10200.c: Adjust for changed function names.
3033 * elf-m10300.c: Likewise.
3034 * elf32-arm.h: Likewise.
3035 * elf32-h8300.c: Likewise.
3036 * elf32-hppa.c: Likewise.
3037 * elf32-ip2k.c: Likewise.
3038 * elf32-m32r.c: Likewise.
3039 * elf32-m68hc11.c: Likewise.
3040 * elf32-m68hc1x.c: Likewise.
3041 * elf32-m68k.c: Likewise.
3042 * elf32-mips.c: Likewise.
3043 * elf32-ppc.c: Likewise.
3044 * elf32-sh.c: Likewise.
3045 * elf32-v850.c: Likewise.
3046 * elf32-xtensa.c: Likewise.
3047 * elf64-alpha.c: Likewise.
3048 * elf64-hppa.c: Likewise.
3049 * elf64-mmix.c: Likewise.
3050 * elf64-ppc.c: Likewise.
3051 * elf64-sh64.c: Likewise.
3052 * elfxx-ia64.c: Likewise.
3053 * elfxx-mips.c: Likewise.
3054 (MIPS_ELF_LOG_FILE_ALIGN): Use log_file_align.
3055 * elf64-alpha.c (alpha_elf_size_info): Adjust for log_file_align.
3056 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
3057 * elf64-mips.c (mips_elf64_size_info): Likewise.
3058 * elf64-s390.c (s390_elf64_size_info): Likewise.
3059 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
3060
3061 2003-05-08 H.J. Lu <hongjiu.lu@intel.com>
3062
3063 * elflink.h (elf_add_default_symbol): After skipping the
3064 unversioned symbol, go to non-default one.
3065
3066 2003-05-07 H.J. Lu <hongjiu.lu@intel.com>
3067
3068 * elfxx-ia64.c (_bfd_elf_link_hash_hide_symbol): Also clear the
3069 want_plt field.
3070 (elfNN_ia64_relocate_section): Don't do dynamic symbol lookup
3071 for symbols with non-default visibility.
3072
3073 2003-05-07 H.J. Lu <hongjiu.lu@intel.com>
3074
3075 * elflink.h (elf_link_check_versioned_symbol): Also handle the
3076 case that a DSO references a hidden symbol which may be
3077 satisfied by a versioned symbol in another DSO.
3078 (elf_link_output_extsym): Check versioned definition for hidden
3079 symbol referenced by a DSO.
3080
3081 2003-05-07 Nick Clifton <nickc@redhat.com>
3082
3083 * elf32-xstormy16.c (xstormy16_elf_howto_table): Reset
3084 R_XSTORMY16_16 reloc to ignore overflows.
3085
3086 2003-05-06 Alexandre Oliva <aoliva@redhat.com>
3087
3088 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Improve
3089 error message for mixing different-endian files. Check for ABI
3090 compatibility of input files with the selected emulation.
3091
3092 2003-05-05 Alan Modra <amodra@bigpond.net.au>
3093
3094 * elf32-i386.c (allocate_dynrelocs): For undef weak syms with
3095 non-default visibility, a) don't make them dynamic, b) discard
3096 space for dynamic relocs.
3097 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
3098
3099 * elf32-ppc.c (allocate_dynrelocs): For undef weak syms with
3100 non-default visibility, a) don't allocate plt entries, b) don't
3101 allocate .got relocs, c) discard dyn rel space,
3102 (ppc_elf_relocate_section): d) don't generate .got relocs, e)
3103 don't generate dynamic relocs.
3104 * elf64-ppc.c (allocate_dynrelocs): As above.
3105 (ppc64_elf_relocate_section): As above.
3106
3107 2003-05-05 Andreas Jaeger <aj@suse.de>
3108
3109 * elf64-x86-64.c (allocate_dynrelocs): Don't allocate dynamic
3110 relocation entries for weak undefined symbols with non-default
3111 visibility.
3112 (elf64_x86_64_relocate_section): Initialize the GOT entries and
3113 skip R_386_32/R_386_PC32 for weak undefined symbols with
3114 non-default visibility.
3115
3116 2003-05-04 H.J. Lu <hjl@gnu.org>
3117
3118 * elf32-i386.c (allocate_dynrelocs): Don't allocate dynamic
3119 relocation entries for weak undefined symbols with non-default
3120 visibility.
3121 (elf_i386_relocate_section): Initialize the GOT entries and
3122 skip R_386_32/R_386_PC32 for weak undefined symbols with
3123 non-default visibility.
3124
3125 * elfxx-ia64.c (allocate_fptr): Don't allocate function
3126 descriptors for weak undefined symbols with non-default
3127 visibility.
3128 (allocate_dynrel_entries): Don't allocate relocation entries
3129 for symbols resolved to 0.
3130 (set_got_entry): Don't install dynamic relocation for weak
3131 undefined symbols with non-default visibility.
3132 (set_pltoff_entry): Likewise.
3133
3134 * elflink.h (elf_fix_symbol_flags): Hide weak undefined symbols
3135 with non-default visibility.
3136 (elf_link_output_extsym): Don't make weak undefined symbols
3137 with non-default visibility dynamic.
3138
3139 2003-05-04 H.J. Lu <hjl@gnu.org>
3140
3141 * elflink.h (elf_merge_symbol): Correctly handle weak definition.
3142
3143 2003-05-04 H.J. Lu <hjl@gnu.org>
3144
3145 * elflink.h (elf_merge_symbol): Don't record a hidden/internal
3146 symbol dynamic. Check indirection when removing the old
3147 definition for symbols with non-default visibility.
3148 (elf_add_default_symbol): Skip when told by elf_merge_symbol.
3149
3150 2003-05-02 Nick Clifton <nickc@redhat.com>
3151
3152 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make the
3153 R_XSTORMY16_8 and R_XSTORMY16_16 relocs detect and complain about
3154 unsigned overflow.
3155
3156 2003-05-02 Andreas Jaeger <aj@suse.de>
3157
3158 * elf64-x86-64.c (elf_x86_64_copy_indirect_symbol): Don't copy
3159 ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
3160 (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
3161 (elf_x86_64_adjust_dynamic_symbol): For weak symbols, copy
3162 ELF_LINK_NON_GOT_REF from weakdef.
3163
3164 2003-05-02 Charles Lepple <clepple@ghz.cc>
3165 Nick Clifton <nickc@redhat.com>
3166
3167 * acinclude.m4: Fix name of --enable-install-libbfd switch.
3168 * aclocal.m4: Regenerate.
3169 * configure: Regenerate.
3170 * Makefile.in: Regenerate.
3171
3172 2003-05-01 Alan Modra <amodra@bigpond.net.au>
3173
3174 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Test whether the
3175 weakdef sym has already been adjusted before treating it specially.
3176 * elf32-i386.c (elf_i386_copy_indirect_symbol): Don't copy
3177 ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
3178 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
3179 (ppc64_elf_check_relocs): Set ELF_LINK_NON_GOT_REF.
3180
3181 2003-04-28 H.J. Lu <hjl@gnu.org>
3182
3183 * elfxx-ia64.c (elfNN_ia64_relax_section): Relax ldxmov during
3184 the relax finalize pass.
3185
3186 * section.c (struct sec): Add need_finalize_relax and remove
3187 flag11.
3188 (STD_SECTION): Update struct sec initializer.
3189 * bfd-in2.h: Regenerated.
3190
3191 2003-04-28 H.J. Lu <hjl@gnu.org>
3192
3193 * elflink.h (elf_merge_symbol): Call elf_backend_copy_indirect_symbol
3194 to copy any information related to dynamic linking when we flip
3195 the indirection.
3196
3197 2003-04-27 H.J. Lu <hjl@gnu.org>
3198
3199 * elf-bfd.h (ELF_LINK_DYNAMIC_DEF): New.
3200 (ELF_LINK_DYNAMIC_WEAK): New.
3201
3202 * elflink.h (elf_merge_symbol): Add one argument to indicate if
3203 a symbol should be skipped. Ignore definitions in dynamic
3204 objects for symbols with non-default visibility.
3205 (elf_add_default_symbol): Adjusted.
3206 (elf_link_add_object_symbols): Check if a symbol should be
3207 skipped. Don't merge the visibility field with the one from
3208 a dynamic object.
3209 (elf_link_check_versioned_symbol): Use undef_bfd.
3210 (elf_link_output_extsym): Warn if a forced local symbol is
3211 referenced from dynamic objects. Make non-weak undefined symbol
3212 with non-default visibility a fatal error.
3213
3214 2003-04-27 Daniel Jacobowitz <drow@mvista.com>
3215
3216 * configure.in: Bump version on HEAD to 2.14.90.
3217 * configure: Regenerated.
3218
3219 2003-04-26 Stephane Carrez <stcarrez@nerim.fr>
3220
3221 PR savannah/3331:
3222 * elf32-m68hc11.c (m68hc11_elf_relax_section): Clear prev_insn_group
3223 when we couldn't relax something.
3224
3225 2003-04-25 Alan Modra <amodra@bigpond.net.au>
3226
3227 * elflink.h (elf_merge_symbol): When we find a regular definition
3228 for an indirect symbol, flip the indirection so that the old
3229 direct symbol now points to the new definition.
3230
3231 2003-04-24 Roland McGrath <roland@redhat.com>
3232
3233 * elf.c (bfd_section_from_phdr): Map PT_GNU_EH_FRAME to "eh_frame_hdr".
3234
3235 2003-04-24 Alan Modra <amodra@bigpond.net.au>
3236
3237 * elf32-ppc.c: Formatting and comment fixes.
3238 (ELIMINATE_COPY_RELOCS): Move before ppc_elf_copy_indirect_symbol.
3239 (ppc_elf_copy_indirect_symbol): Copy flags here for weakdefs.
3240
3241 2003-04-24 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
3242
3243 * archures.c (bfd_mach_h8300hn, bfd_mach_h8300sn): Added.
3244 * bfd-in2.h: Rebuilt.
3245 * coff-h8300.c (BADMAG): Add check for H8300HNBADMAG & H8300SNBADMAG.
3246 * coffcode.h (coff_set_arch_mach_hook): Add case for H8300HNMAGIC
3247 & H8300SNMAGIC.
3248 (coff_set_flags): Add case for bfd_mach_h8300hn & bfd_mach_h8300sn.
3249 * cpu-h8300.c (h8300_scan): Handle h8300hn, h8300sn.
3250 (h8300sn_info_struct, h8300hn_info_struct): New.
3251 * elf32-h8300.c (elf32_h8_mach): Handle case for h8300hn & h8300sn
3252 (elf32_h8_final_write_processing): Likewise.
3253
3254 2003-04-23 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3255
3256 * elf32-sh.c (tpoff): New.
3257 (struct elf_sh_dyn_relocs): Remove tls_tpoff32.
3258 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
3259 (allocate_dynrelocs): Don't make unnecessary dynamic TLS
3260 relocations. Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses.
3261 (sh_elf_relocate_section): Likewise. Remove unnecessary tests.
3262 (dtpoff_base): Fix wrong indentation.
3263 (sh_elf_check_relocs): Don't set DF_STATIC_TLS flag with non-TLS
3264 relocations. Don't set tls_tpoff32 flag. Don't make unnecessary
3265 R_SH_TLS_TPOFF32 relocations.
3266
3267 2003-04-23 J"orn Rennecke <joern.rennecke@superh.com>
3268
3269 * archures.c (enum bfd_architecture): Amend comment to refer to SuperH.
3270 * cpu-sh.c: Likewise.
3271 * elf32-sh.c: Likewise.
3272 * reloc.c (bfd_reloc_code_real): Likewise.
3273 * elf32-sh64-com.c: Change comment to refer to SuperH.
3274 * elf32-sh64.c: Likewise.
3275 * elf64-sh64.c: Likewise.
3276 * bfd-in2.h (enum bfd_architecture): Regenerate.
3277
3278 2003-04-23 Alan Modra <amodra@bigpond.net.au>
3279
3280 From Julien LEMOINE <speedblue@debian.org>
3281 * elf32-i386.c (elf_i386_info_to_howto): Delete.
3282 (elf_info_to_howto): Define as elf_i386_info_to_howto_rel.
3283
3284 2003-04-22 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
3285
3286 * archures.c: Replace references to Mitsubishi M32R with references
3287 to Renesas M32R.
3288 * relocs.c: Likewise.
3289 * bfd-in2.h: Regenerate.
3290
3291 2003-04-21 Richard Henderson <rth@redhat.com>
3292
3293 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Return false for an
3294 executable when a symbol is defined both regular and dynamic.
3295
3296 2003-04-21 Stephane Carrez <stcarrez@nerim.fr>
3297
3298 * Makefile.am (BFD32_BACKENDS): Add elf32-m68hc1x.lo.
3299 (elf32-m68hc1x.lo): Update dependencies
3300 * configure.in: Add elf32-m68hc1x.lo.
3301 * configure: Rebuild.
3302 * Makefile.in: Rebuild.
3303
3304 2003-04-21 Stephane Carrez <stcarrez@nerim.fr>
3305
3306 * elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
3307 (m68hc11_elf_hash_table_create): New function.
3308 (elf32_m68hc11_link_hash_table_free): New function.
3309 (stub_hash_newfunc): New function.
3310 (m68hc11_add_stub): New function.
3311 (elf32_m68hc11_add_symbol_hook): New function.
3312 (elf32_m68hc11_setup_section_lists): New function.
3313 (elf32_m68hc11_next_input_section): New function.
3314 (elf32_m68hc11_size_stubs): New function.
3315 (elf32_m68hc11_build_stubs): New function.
3316 (m68hc11_get_relocation_value): New function.
3317 (elf32_m68hc11_relocate_section): Call the above to redirect
3318 some relocations to the trampoline code.
3319 (m68hc11_elf_export_one_stub): New function.
3320 (m68hc11_elf_set_symbol): New function.
3321 (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse.
3322 (m68hc11_elf_get_bank_parameters): Get parameters only when the info
3323 is not yet initialized.
3324
3325 * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
3326 (elf32_m68hc11_stub_hash_entry): New struct.
3327 (m68hc11_page_info): Add trampoline handler address.
3328 (m68hc11_elf_link_hash_table): Add stubs generation members.
3329 (elf32_m68hc11_add_symbol_hook): Declare.
3330 (elf32_m68hc11_setup_section_lists): Declare.
3331 (elf32_m68hc11_size_stubs): Declare.
3332 (elf32_m68hc11_build_stubs): Declare.
3333
3334 * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c.
3335 (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise.
3336 (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto.
3337 (_bfd_m68hc11_elf_set_private_flags): Ditto.
3338 (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto.
3339 (_bfd_m68hc11_elf_print_private_bfd_data): Ditto.
3340 (bfd_elf32_bfd_link_hash_table_create): Define.
3341 (elf_backend_add_symbol_hook): Define.
3342 (m68hc11_elf_bfd_link_hash_table_create): New function.
3343 (m68hc11_elf_build_one_stub): New function.
3344 (m68hc11_elf_size_one_stub): New function.
3345 (m68hc11_elf_bfd_link_hash_table_create): Install the above.
3346 (bfd_elf32_bfd_link_hash_table_create): Define.
3347
3348 * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove.
3349 (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked.
3350 (m68hc12_phys_addr): Ditto.
3351 (m68hc12_phys_page): Ditto.
3352 (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c.
3353 (elf32_m68hc11_gc_mark_hook): Likewise.
3354 (elf32_m68hc11_gc_sweep_hook): Likewise.
3355 (elf32_m68hc11_check_relocs): Likewise.
3356 (elf32_m68hc11_relocate_section): Likewise.
3357 (_bfd_m68hc12_elf_set_private_flags): Likewise.
3358 (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise.
3359 (_bfd_m68hc12_elf_print_private_bfd_data): Likewise.
3360 (m68hc12_elf_build_one_stub): New function.
3361 (m68hc12_elf_size_one_stub): New function.
3362 (m68hc12_elf_bfd_link_hash_table_create): New function, use the above.
3363 (elf_backend_add_symbol_hook): Define.
3364 (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
3365
3366 2003-04-18 Nick Clifton <nickc@redhat.com>
3367
3368 * format.c (bfd_check_format_matches): Only check associated
3369 vector if the matching_vector has been created.
3370
3371 2003-04-15 Alexandre Oliva <aoliva@redhat.com>
3372
3373 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Fix typo in
3374 2003-04-09's change.
3375
3376 2003-04-15 Brian Ford <ford@vss.fsi.com>
3377
3378 * peicode.h (coff_swap_scnhdr_in): If a section holds
3379 uninitialized data and is from an object file or from an
3380 executable image that has not initialized the s_size field, or if
3381 the physical size is padded, use the virtual size (stored in
3382 s_paddr) instead.
3383
3384 2003-04-15 H.J. Lu <hjl@gnu.org>
3385
3386 * elflink.h (elf_link_add_object_symbols): Properly report
3387 filename for alignment reduction.
3388
3389 2003-04-15 Rohit Kumar Srivastava <rohits@kpitcummins.com>
3390
3391 * archures.c: Replace occurrances of 'Hitachi' with 'Renesas'.
3392 * reloc.c: Likewise.
3393 * coff-h8300.c: Likewise.
3394 * coff-h8500.c: Likewise.
3395 * coff-sh.c: Likewise.
3396 * cpu-h8300.c: Likewise.
3397 * cpu-sh.c: Likewise.
3398 * elf32-h8300.c: Likewise.
3399 * elf32-sh.c: Likewise.
3400 * elf32-sh64-com.c: Likewise.
3401 * elf32-sh64.c: Likewise.
3402 * elf64-sh64.c: Likewise.
3403 * bfd-in2.h: Regenerate.
3404
3405 2003-04-14 H.J. Lu <hjl@gnu.org>
3406
3407 * elflink.h (elf_link_add_object_symbols): Maintain maximum
3408 alignment for common symbols. Warn reducing alignment for
3409 common symbols. Report old filename when symbol size changes.
3410
3411 2003-04-12 Alexandre Oliva <aoliva@redhat.com>
3412
3413 * elfxx-mips.c (mips_elf_calculate_relocation): Adjust two other
3414 occurrences of the same test changed in the previous patch.
3415 Optimize.
3416
3417 2003-04-11 Alexandre Oliva <aoliva@redhat.com>
3418
3419 * elfxx-mips.c (mips_elf_get_global_gotsym_index): New.
3420 (mips_elf_calculate_relocation): Decay GOT_PAGE/GOT_OFST to
3421 GOT_DISP/addend only if the symbol got a global GOT entry.
3422
3423 2003-04-10 Alexandre Oliva <aoliva@redhat.com>
3424
3425 * elfxx-mips.c (mips_elf_calculate_relocation): Decay
3426 GOT_PAGE/GOT_OFST referencing overridable symbol to
3427 GOT_DISP/addend.
3428 (_bfd_mips_elf_check_relocs): Handle GOT_PAGE referencing
3429 global symbol as GOT_DISP.
3430
3431 2003-04-10 Bob Wilson <bob.wilson@acm.org>
3432
3433 * elf32-xtensa.c (elf_xtensa_relocate_section): Don't continue to the
3434 next relocation on an undefined symbol.
3435
3436 2003-04-09 Richard Henderson <rth@redhat.com>
3437
3438 * elf64-alpha.c (elf64_alpha_relocate_section) <R_ALPHA_GPREL32>:
3439 Ignore relocations against r_symndx == 0.
3440
3441 2003-04-09 H.J. Lu <hjl@gnu.org>
3442
3443 * elf64-alpha.c (elf64_alpha_relocate_section): Don't return
3444 FALSE for undefined symbols.
3445 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
3446
3447 2003-04-09 Alexandre Oliva <aoliva@redhat.com>
3448
3449 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Try DWARF3-standard
3450 and IRIX-specific shift-to-64-bit 4-byte lengths before following
3451 addr_size.
3452
3453 2003-04-08 Alexandre Oliva <aoliva@redhat.com>
3454
3455 * elf32-mips.c (bfd_elf32_bfd_reloc_type_lookup): Detect (ctor)
3456 pointer size from ABI, not arch_bits_per_address.
3457
3458 2003-04-07 Kevin Buettner <kevinb@redhat.com>
3459
3460 * elfn32-mips.c (elf32_mips_grok_prstatus): Adjust core file related
3461 constants for n32 ABI.
3462
3463 2003-04-06 Andrew Cagney <cagney@redhat.com>
3464
3465 * simple.c (bfd_simple_get_relocated_section_contents): Disable
3466 free that leads to GDB vs BFD memory corruption.
3467
3468 2003-04-04 Stephane Carrez <stcarrez@nerim.fr>
3469
3470 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Also adjust
3471 symbols that mark the end of the section.
3472 (m68hc11_elf_relax_section): Use R_M68HC11_PCREL_8 relocs when
3473 converting to a relative branch so that the offset is computed after
3474 the relaxation; also relocate a jsr into a bsr if possible but don't
3475 relax them if they are to a far symbol as we need to call the
3476 trampoline code.
3477 (elf_m68hc11_howto_table): Set pcrel_offset to true.
3478
3479 2003-04-04 Svein E. Seldal <Svein.Seldal@solidas.com>
3480
3481 * archures.c: Namespace cleanup. Rename bfd_mach_c3x to
3482 bfd_mach_tic3x and bfd_mach_c4x to bfd_mach_tic4x
3483 * bfd-in2.h: Regenerate
3484 * coff-tic4x.c: Namespace cleanup. Replace s/c4x/tic4x/
3485 * cpu-tic4x.c: Ditto
3486
3487 2003-04-03 Nick Clifton <nickc@redhat.com>
3488
3489 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Compute ps and ss
3490 differently for object files and executables.
3491 * peicode.h (coff_swap_scnhdr_in): Only set the s_size field
3492 for object files or for executables who have not already
3493 initialised the field.
3494 * libpei.h (bfd_pe_executable_p): New macro. Return true if
3495 the PE format bfd is an executable.
3496
3497 2003-04-03 Alan Modra <amodra@bigpond.net.au>
3498
3499 * elf32-ppc.c (ppc_elf_check_relocs): Don't use SYMBOL_REFERENCES_LOCAL
3500 here as it's too early to reliably determine locality.
3501 (ppc_elf_gc_sweep_hook): Likewise.
3502 (SYMBOL_REFERENCES_LOCAL): Expand comment.
3503
3504 2003-04-02 Bob Wilson <bob.wilson@acm.org>
3505
3506 * xtensa-modules.c: Remove comment indicating that this is a
3507 generated file.
3508
3509 2003-04-02 Alan Modra <amodra@bigpond.net.au>
3510
3511 * elfxx-mips.c (_bfd_mips_elf_hide_symbol): Test for NULL dynobj.
3512
3513 2003-04-01 Bob Wilson <bob.wilson@acm.org>
3514
3515 * Makefile.am (ALL_MACHINES): Add cpu-xtensa.lo.
3516 (ALL_MACHINES_CFILES): Add cpu-xtensa.c.
3517 (BFD32_BACKENDS): Add elf32-xtensa.lo, xtensa-isa.lo, and
3518 xtensa-modules.lo.
3519 (BFD32_BACKENDS_CFILES): Add elf32-xtensa.c, xtensa-isa.c, and
3520 xtensa-modules.c.
3521 (cpu-xtensa.lo): New target.
3522 (elf32-xtensa.lo): Likewise.
3523 (xtensa-isa.lo): Likewise.
3524 (xtensa-modules.lo): Likewise.
3525 * Makefile.in: Regenerate.
3526 * archures.c (bfd_architecture): Add bfd_{arch,mach}_xtensa.
3527 (bfd_archures_list): Add bfd_xtensa_arch.
3528 * config.bfd: Handle xtensa-*-*.
3529 * configure.in: Handle bfd_elf32_xtensa_{le,be}_vec.
3530 * configure: Regenerate.
3531 * reloc.c: Add BFD_RELOC_XTENSA_{RTLD,GLOB_DAT,JMP_SLOT,RELATIVE,
3532 PLT,OP0,OP1,OP2,ASM_EXPAND,ASM_SIMPLIFY}.
3533 * targets.c (bfd_elf32_xtensa_be_vec): Declare.
3534 (bfd_elf32_xtensa_le_vec): Likewise.
3535 (bfd_target_vector): Add bfd_elf32_xtensa_{be,le}_vec.
3536 * cpu-xtensa.c: New file.
3537 * elf32-xtensa.c: Likewise.
3538 * xtensa-isa.c: Likewise.
3539 * xtensa-modules.c: Likewise.
3540 * libbfd.h: Regenerate.
3541 * bfd-in2.h: Likewise.
3542
3543 2003-04-01 Nick Clifton <nickc@redhat.com>
3544
3545 * archures.c (bfd_mach_arm_unknown): Define.
3546 * bfd-in.h (bfd_arm_merge_machines, bfd_arm+update_notes,
3547 bfd_arm_get_mach_from_notes): Prototype.
3548 * bfd-in2.h: Regenerate.
3549 * coff-arm.c (coff_arm_merge_private_bfd_data): Call
3550 bfd_arm_merge_machines.
3551 (coff_arm_final_link_postscript): Call bfd_arm_update_notes.
3552 * coffcode.h (coff_set_arch_mach_hook): Call
3553 bfd_arm_get_mach_from_notes.
3554 * coffgen.c (coff_real_object_p): Revert previous delta.
3555 * cpu_arm.c (arm_check_note): New function. Examine a note in a
3556 .note section.
3557 (bfd_arm_merge_machines): New function: Handle the merging of ARM
3558 binaries compiled for different architectures..
3559 (bfd_arm_update_notes): New function: Update an ARM note section.
3560 (bfd_arm_get_mach_from_notes): New function: Extract a bfd machine
3561 number from an ARM note section.
3562 * elf32-arm.h (elf32_arm_object_p): Use
3563 bfd_arm_get_mach_from_notes.
3564 (elf32_arm_merge_private_bfd_data): Use bfd_arm_merge_machines.
3565 (elf32_arm_final_write_processing): Use bfd_arm_update_notes.
3566
3567 2003-04-01 Ben Elliston <bje@wasabisystems.com>
3568
3569 * dwarf2.c (read_attribute_value): Correct typo in comment.
3570
3571 2003-04-01 Nick Clifton <nickc@redhat.com>
3572
3573 * dwarf2.c (concat_filename): Use bfd_malloc() and strdup()
3574 instead of concat().
3575 (decode_line_info): Only free filename if it is not NULL.
3576 (add_line_info): Make a copy of the filename when storing it into
3577 the info structure.
3578
3579 2003-03-31 Andreas Schwab <schwab@suse.de>
3580 Daniel Jacobowitz <drow@mvista.com>
3581
3582 * simple.c (bfd_simple_get_relocated_section_contents): Add
3583 parameter symbol_table. Optionally use it instead of the symbol
3584 table from the bfd. Save and restore output offsets and output
3585 sections around bfd_get_relocated_section_contents. Fix a memory
3586 leak.
3587 (simple_save_output_info, simple_restore_output_info): New
3588 functions.
3589 * bfd-in2.h: Regenerate.
3590 * dwarf2.c (read_abbrevs): Use
3591 bfd_simple_get_relocated_section_contents instead of
3592 bfd_get_section_contents.
3593 (decode_line_info): Likewise.
3594 (_bfd_dwarf2_find_nearest_line): Likewise. Don't call
3595 find_rela_addend.
3596 (find_rela_addend): Remove.
3597 * elfxx-ia64.c (elfNN_ia64_reloc): Weaken sanity check for
3598 debugging sections.
3599 (elfNN_ia64_hash_table_create): Create the hash table with malloc,
3600 not bfd_zalloc.
3601
3602 2003-03-31 David Heine <dlheine@suif.stanford.edu>
3603
3604 * aoutx.h (aout_link_hash_table_create): Use bfd_malloc instead of
3605 bfd_alloc.
3606 * dwarf2.c (concat_filename): Always allocate space for the
3607 returned filename.
3608 (decode_line_info): Free the allocated filename returned by
3609 concat_filename.
3610 * elf-eh-frame.c (bfd_elf_write_section_eh_frame): Fix memory leaks.
3611 * elf.c (copy_private_bfd_data): Likewise.
3612 (_bfd_elf_slurp_version_tables): Fix bug freeing contents pointer.
3613 * elflink.h (elf_link_sort_relocs): Fix memory leak.
3614 * format.c (bfd_check_format_matches): Likewise.
3615 * linker.c (bfd_generic_final_link): Likewise.
3616 * opncls.c (find_separate_debug_info): Likewise.
3617 * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
3618
3619 2003-03-28 H.J. Lu <hjl@gnu.org>
3620
3621 * elflink.h (elf_link_add_object_symbols): Correctly combine
3622 visibilities.
3623
3624 2003-03-27 Jakub Jelinek <jakub@redhat.com>
3625
3626 * elfxx-ia64.c (elfNN_ia64_relax_section): Reset self_dtpmod_offset
3627 to -1 before recomputing got offsets.
3628
3629 2003-03-26 Andreas Schwab <schwab@suse.de>
3630
3631 * elf32-m68k.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
3632 (elf_m68k_relocate_section): Use it to correctly handle symbols
3633 forced to be local.
3634 (elf_m68k_finish_dynamic_symbol): Emit RELATIVE reloc for got
3635 entries for symbols that are forced to be local.
3636
3637 2003-03-25 Alexandre Oliva <aoliva@redhat.com>
3638
3639 * elfxx-mips.c (_bfd_mips_relax_section): New function.
3640 * elfxx-mips.h (_bfd_mips_relax_section): Declare.
3641 * elfn32-mips.c, elf64-mips.c: Use it.
3642
3643 2003-03-25 Stan Cox <scox@redhat.com>
3644 Nick Clifton <nickc@redhat.com>
3645
3646 Contribute support for Intel's iWMMXt chip - an ARM variant:
3647
3648 * archures.c: Add bfd_mach_arm_iWMMXt.
3649 * reloc.c: Add BFD_RELOC_ARM_CP_OFF_IMM_S2.
3650 * bfd-in2.h: Regenerate.
3651 * libbfd.h: Regenerate.
3652 * coff-arm.c (coff_arm_merge_private_bfd_data): Allow iWMMXt
3653 object files to be linked with XScale ones.
3654 (coff_arm_final_link_postscript): Update note section.
3655 * coffcode.h (coff_set_arch_mach_hook): Handle note section.
3656 * coffgen.c (coff_real_object_p): Call bfd_coff_set_arch_mach_hook
3657 after identifying a coff binary.
3658 * cpu-arm.c (processors): Add iWMMXt.
3659 (arch_inf): Likewise.
3660 * elf32-arm.h (arm_object_p): Handle note section.
3661 (elf32_arm_merge_private_bfd_data): Allow iWMMXt object files to
3662 be linked with XScale ones.
3663 (elf32_arm_section_flags): New function: Set flags on note section.
3664 (elf32_arm_final_write_processing): Handle note section.
3665
3666 2003-03-21 DJ Delorie <dj@redhat.com>
3667
3668 * elf32-xstormy16.c (elf32_xstormy16_relocate_section): Call
3669 _bfd_elf_rela_local_sym.
3670
3671 2003-03-20 H.J. Lu <hjl@gnu.org>
3672
3673 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't try relax for
3674 non-ELF outputs.
3675
3676 2003-03-20 Nick Clifton <nickc@redhat.com>
3677
3678 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Initialise $idata2 and
3679 $idata5 in case bfd_coff_final_link is not called.
3680
3681 2003-03-19 Jakub Jelinek <jakub@redhat.com>
3682
3683 * elf64-sparc.c (struct sparc64_elf_section_data): Add reloc_count
3684 field.
3685 (canon_reloc_count): Define.
3686 (sparc64_elf_slurp_one_reloc_table, sparc64_elf_slurp_reloc_table,
3687 sparc64_elf_canonicalize_dynamic_reloc): Use it instead of
3688 reloc_count.
3689 (sparc64_elf_canonicalize_reloc): New routine.
3690 (bfd_elf64_canonicalize_reloc): Define.
3691
3692 2003-03-18 Jakub Jelinek <jakub@redhat.com>
3693
3694 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle relaxation
3695 againt mergeable sections. Take r_addend into account when caching
3696 trampolines.
3697
3698 2003-03-18 Richard Henderson <rth@redhat.com>
3699
3700 * elfxx-ia64.c (get_dyn_sym_info): Return NULL gracefully for
3701 local symbols that have no dyninfo.
3702
3703 2003-03-14 Gene Smith <gene.smith@siemens.com>
3704
3705 * ieee.c (ieee_write_expression): Handle the case where symbol is
3706 NULL.
3707 General formatting improvements.
3708
3709 2003-03-13 Nick Clifton <nickc@redhat.com>
3710
3711 * configure.in (LINGUAS): Add zh_CN.
3712 * configure: Regenerate.
3713 * po/zh_CN.po: New file.
3714
3715 2003-03-13 Elias Athanasopoulos <elathan@phys.uoa.gr>
3716
3717 * aout-cris.c (BYTES_IN_WORD): Don't define.
3718 aout-encap.c: Likewise.
3719 aout-ns32k.c: Likewise.
3720 aout-tic30.c: Likewise.
3721 hp300bsd.c: Likewise.
3722 i386aout.c: Likewise.
3723 i386dynix.c: Likewise.
3724 i386linux.c: Likewise.
3725 i386lynx.c: Likewise.
3726 i386mach3.c: Likewise.
3727 m68k4knetbsd.c: Likewise.
3728 m68klinux.c: Likewise.
3729 m68klynx.c: Likewise.
3730 m68knetbsd.c: Likewise.
3731 m88kmach3.c: Likewise.
3732 mipsbsd.c: Likewise.
3733 newsos3.c: Likewise.
3734 sparclinux.c: Likewise.
3735 sparclynx.c: Likewise.
3736 sparcnetbsd.c: Likewise.
3737 vaxbsd.c: Likewise. Fix comment formatting.
3738
3739 2003-03-12 Alexandre Oliva <aoliva@redhat.com>
3740
3741 * Reverted 2003-03-02's patch.
3742
3743 * elfxx-target.h (bfd_elfNN_canonicalize_reloc): Make it
3744 overridable.
3745 * elf64-mips.c (mips_elf64_canonicalize_reloc,
3746 mips_elf64_get_dynamic_reloc_upper_bound,
3747 mips_elf64_canonicalize_dynamic_reloc): New, adapted from elf.c.
3748 (bfd_elf64_get_canonicalize_reloc,
3749 bfd_elf64_get_dynamic_reloc_upper_bound,
3750 bfd_elf64_canonicalize_dynamic_reloc): Define.
3751 (mips_elf64_slurp_reloc_table): Support dynamic.
3752 (mips_elf64_slurp_one_reloc_table): Adjust.
3753
3754 2003-03-12 Nick Clifton <nickc@redhat.com>
3755
3756 * xsym.c (bfd_sym_fetch_type_information_table_entry): Change
3757 'index' to 'offset' in test for zero value.
3758
3759 2003-03-11 Alexandre Oliva <aoliva@redhat.com>
3760
3761 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Do not create
3762 dynamic relocations pointing to local or section symbols, use the
3763 NULL symbol instead. Document the choice to not emit an
3764 additional R_MIPS_64 relocation.
3765
3766 2003-03-11 Alan Modra <amodra@bigpond.net.au>
3767
3768 * elf32-ppc.c (ppc_elf_relocate_section): Subtract tls seg vma from
3769 zero index dynamic tls relocs generated for the GOT. Tidy code.
3770 Set "relocation" to 1 on DTPMOD32 relocs. Optimize HA adjustment.
3771 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
3772
3773 2003-03-07 Alan Modra <amodra@bigpond.net.au>
3774
3775 * elf32-ppc.c (ppc_elf_relocate_section): Don't look for a nop after
3776 a tls_get_addr call.
3777
3778 * elf32-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
3779 (ppc_elf_adjust_dynamic_symbol): For weak symbols, copy
3780 ELF_LINK_NON_GOT_REF from weakdef.
3781 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
3782 (ppc64_elf_adjust_dynamic_symbol): For weak symbols, copy
3783 ELF_LINK_NON_GOT_REF from weakdef.
3784 * elf32-i386.c (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
3785 (elf_i386_adjust_dynamic_symbol): For weak symbols, copy
3786 ELF_LINK_NON_GOT_REF from weakdef.
3787
3788 2003-03-06 Jakub Jelinek <jakub@redhat.com>
3789 Andrew Haley <aph@redhat.com>
3790
3791 * elflink.h (elf_bfd_discard_info): Don't process eh frames if
3792 output is relocateable.
3793
3794 2003-03-06 Steven Konopa <skonopa@kgo.csc.com>
3795
3796 * som.c (som_fixup_formats): Correct formats for R_AUX_UNWIND and
3797 R_COMMENT.
3798
3799 2003-03-06 Alan Modra <amodra@bigpond.net.au>
3800
3801 * elf32-ppc.c (ppc_elf_create_linker_section): Don't capitalize
3802 error messages.
3803 (ELIMINATE_COPY_RELOCS): Define to zero.
3804 (ppc_elf_relocate_section): Don't deref htab->tls_sec when calculating
3805 TLSLD relocs. Report reloc types on a number of errors. Optimize
3806 LOCAL24PC check for non-local syms. Don't capitalize error messages.
3807 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define to zero.
3808 (ppc64_elf_relocate_section): Don't deref htab->tls_sec when
3809 calculating TLSLD relocs. Report reloc types on a number of errors.
3810 Don't capitalize error messages.
3811
3812 2003-03-03 H.J. Lu <hjl@gnu.org>
3813
3814 * elfxx-ia64.c (USE_BRL): Removed.
3815 (oor_ip): Removed.
3816
3817 2003-03-03 J"orn Rennecke <joern.rennecke@superh.com>
3818
3819 * elf32-sh.c (sh_elf_howto_tab): Make R_SH_IND12W into an ordinary
3820 relocation (no special function), and make it non-partial_inplace.
3821 (sh_elf_relax_section): When creating a bsr, use a consistent value
3822 no matter if the symbol is extern or not; set addend to -4.
3823 Don't swap load / non-load instructions for SH4.
3824 (sh_elf_relax_delete_bytes): In R_SH_IND12W case, check the offset
3825 rather than if the symbol is external to determine if adjusting the
3826 offset makes sense. Adjust the addend too if appropriate.
3827 (sh_elf_relocate_section): In R_SH_IND12W, don't fiddle with the
3828 relocation.
3829
3830 2003-03-03 Nick Clifton <nickc@redhat.com>
3831
3832 * po/da.po: Installed latest translation.
3833
3834 2003-03-02 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3835
3836 * elf32-mips.c (elf_mips_howto_table_rel): Change definition of
3837 R_MIPS_PC16 to rightshift 2.
3838 (elf_reloc_map mips_reloc_map): Map to rightshifted BFD reloc.
3839 (bfd_elf32_bfd_reloc_type_lookup): Support
3840 BFD_RELOC_MIPSEMB_16_PCREL_S2.
3841 * elf64-mips.c (mips_elf64_howto_table_rel): Change definition of
3842 R_MIPS_PC16 to rightshift 2.
3843 (mips_elf64_howto_table_rela): Likewise.
3844 (mips_reloc_map): Map to rightshifted BFD reloc.
3845 * elfn32-mips.c: The same as in elf64-mips.c.
3846 * elfxx-mips.c (mips_elf_got_for_ibfd): Typo in comment.
3847 (mips_elf_calculate_relocation): Handle rightshifted addends for
3848 R_MIPS_PC16.
3849 * reloc.c (BFD_RELOC_MIPSEMB_16_PCREL_S2): New BFD relocation for
3850 MIPS Embedded PIC. Remove superfluous empty COMMENT.
3851 * libbfd.h: Regenerate.
3852 * bfd-in2.h: Regenerate.
3853
3854 2003-02-28 Richard Henderson <rth@redhat.com>
3855
3856 * elfxx-ia64.c (elfNN_ia64_relax_section): Correct bounds
3857 for ltoff22x relaxation.
3858
3859 2003-03-01 Alan Modra <amodra@bigpond.net.au>
3860
3861 * bfd-in.h (_bfd): Don't define.
3862 * bfd.c: Rename occurrences of "struct _bfd" to "struct bfd".
3863 * syms.c: Likewise.
3864 * bfd-in2.h: Regenerate.
3865
3866 2003-02-27 Richard Henderson <rth@redhat.com>
3867
3868 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add want_gotx;
3869 (elfNN_ia64_check_relocs): Set it.
3870 (allocate_global_data_got): Check it.
3871 (allocate_local_got): Likewise.
3872 (allocate_dynrel_entries): Likewise.
3873 (elfNN_ia64_relax_ldxmov): New.
3874 (elfNN_ia64_relax_section): Handle LTOFF22X, LDXMOV.
3875 (elfNN_ia64_choose_gp): Split out from ...
3876 (elfNN_ia64_final_link): ... here.
3877
3878 2003-02-27 Andrew Cagney <cagney@redhat.com>
3879
3880 * bfd.c (struct bfd): Rename "struct _bfd".
3881 * bfd-in.h: Update copyright.
3882 (struct bfd): Rename "struct _bfd".
3883 (_bfd): Define for backward compatibility.
3884 * bfd-in2.h: Regenerate.
3885
3886 2003-02-25 Alan Modra <amodra@bigpond.net.au>
3887
3888 * elflink.h (elf_bfd_final_link): Apportion reloc counts to rel_hdr
3889 and rel_hdr2 when initially counting input relocs rather than after
3890 creating output reloc sections.
3891 (elf_link_read_relocs_from_section): Don't abort with wrong reloc
3892 sizes.
3893
3894 * Makefile.am: Run "make dep-am".
3895 * Makefile.in: Regenerate.
3896
3897 2003-02-24 Kris Warkentin <kewarken@qnx.com>
3898
3899 * elf.c (elfcore_read_notes): Add check for QNX style core file.
3900 (elfcore_grog_nto_note): New function.
3901 (elfcore_grog_nto_gregs): New function.
3902 (elfcore_grog_nto_status): New function.
3903
3904 2003-02-24 Alan Modra <amodra@bigpond.net.au>
3905
3906 * elflink.c (_bfd_elf_create_got_section): Check existing .got
3907 section flags before concluding that we've already been called.
3908 Don't use register keyword.
3909 (_bfd_elf_create_dynamic_sections): Don't use register keyword.
3910 (_bfd_elf_create_linker_section): Formatting.
3911
3912 2003-02-20 jmc <jmc@prioris.mini.pw.edu.pl>
3913
3914 * coff-h8300.c: Fix typo: intial -> initial.
3915 * coff-ppc.c: Likewise.
3916
3917 2003-02-20 Alan Modra <amodra@bigpond.net.au>
3918
3919 * elf32-ppc.c: Formatting.
3920 (allocate_dynrelocs): LD and GD relocs against the same sym need
3921 separate GOT entries.
3922 (ppc_elf_relocate_section): Correct GOT handling for multiple GOT
3923 entries per symbol.
3924
3925 2003-02-19 Alan Modra <amodra@bigpond.net.au>
3926
3927 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Simplify dynamic reloc
3928 removal. Localize vars. Remove unnecessary dynobj test.
3929 * elf32-i386 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead
3930 of INFO.
3931 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
3932 and optimize.
3933 (elf_i386_relocate_section): Likewise.
3934 (elf_i386_gc_sweep_hook): Simplify dyn reloc removal. Localize vars.
3935 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
3936 * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
3937 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
3938 * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
3939 * elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise. Remove
3940 local_dynrel for section too. Don't touch HIPLT22, LOPLT10, PCPLT32
3941 or PCPLT10 relocs. Don't subtract twice on PLT32 relocs.
3942 Formatting.
3943
3944 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define.
3945 (ppc64_elf_check_relocs): Use it. Correct comment. Move SEC_ALLOC
3946 test.
3947 (ppc64_elf_adjust_dynamic_symbol): Use ELIMINATE_COPY_RELOCS.
3948 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
3949 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
3950 and optimize. Use ELIMINATE_COPY_RELOCS.
3951 (ppc64_elf_relocate_section): Likewise.
3952
3953 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Add pc_count field.
3954 (ppc_elf_copy_indirect_symbol): Copy pc_count field.
3955 (ELIMINATE_COPY_RELOCS): Define.
3956 (ppc_elf_adjust_dynamic_symbol): Convert copy relocs to dynamic.
3957 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
3958 (MUST_BE_DYN_RELOC): Define.
3959 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
3960 and optimize. Trim dyn_relocs.
3961 (ppc_elf_check_relocs): Don't generate dyn_relocs when we know they'll
3962 not be used. Do generate dyn_relocs for copy reloc avoidance. Keep
3963 track of pc_rel dyn relocs.
3964 (ppc_elf_relocate_section): Remove "will_become_local". Adjust
3965 WILL_CALL_FINISH_DYNAMIC_SYMBOL use. Trim dyn relocs as per
3966 allocate_dynrelocs. Don't recalculate "sec".
3967
3968 2003-02-18 Alan Modra <amodra@bigpond.net.au>
3969
3970 * elf32-ppc.c (ppc_elf_relocate_section): Remove unnecessary test.
3971 * elf64-ppc.c (ppc64_elf_tls_optimize): Decrement tlsld_got.refcount
3972 on invalid LD relocs.
3973 (allocate_dynrelocs): Invalid LD relocs don't use tlsld_got entry.
3974 (ppc64_elf_relocate_section): Unify new handling of LD relocs and
3975 tlsld_got entry. Use IS_PPC64_TLS_RELOC.
3976
3977 * elf32-ppc.h: New file.
3978 * elf32-ppc.c: Include elf32-ppc.h.
3979 (NOP, CROR_151515, CROR_313131, TP_OFFSET, DTP_OFFSET): Define.
3980 (struct ppc_elf_link_hash_entry): Rename "root" to "elf". Adjust uses.
3981 Add "tls_mask" field.
3982 (TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL, TLS_TLS, TLS_TPRELGD): Define.
3983 (struct ppc_elf_link_hash_table): Rename "root" to "elf". Adjust uses.
3984 Add got, relgot, plt, relplt, dynbss, relbss, dynsbss, relsbss,
3985 sdata, sdata2, tls_sec, tls_get_addr, tlsld_got fields.
3986 Make use of htab shortcuts throughout file.
3987 (ppc_elf_link_hash_newfunc): Init tls_mask field.
3988 (ppc_elf_link_hash_table_create): Init new fields.
3989 (ppc_elf_copy_indirect_symbol): Copy tls_mask.
3990 (ppc_elf_howto_raw): Add tls relocs.
3991 (ppc_elf_reloc_type_lookup): Handle them.
3992 (ppc_elf_unhandled_reloc): New function.
3993 (ppc_elf_create_got): Stash got section pointer in hash table,
3994 return status. Make .rela.got too.
3995 (ppc_elf_create_dynamic_sections): Stash section pointers in htab.
3996 (ppc_elf_adjust_dynamic_symbol): Only set up copy relocs when
3997 NON_GOT_REF set. Don't allocate space in .plt here..
3998 (allocate_dynrelocs): ..do so here instead, properly ref-counting and
3999 not allocating plt entries unnecessarily. Allocate got entries here.
4000 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
4001 (ppc_elf_size_dynamic_sections): Allocate local got entries. Pass
4002 "info" during allocate_dynrelocs hash traversal. Use htab section
4003 shortcuts rather than searching for named sections. Get rid of
4004 "plt" and "strip" booleans.
4005 (update_local_sym_info, bad_shared_reloc): New functions.
4006 (ppc_elf_check_relocs): Handle TLS relocs. Move .rela.got creation to
4007 ppc_elf_create_got. Don't mark got or plt reloc syms dynamic, do so
4008 in allocate_dynreloc. Use update_local_sym_info and bad_shared_reloc.
4009 Disallow R_PPC_EMB_RELSDA, R_PPC_EMB_NADDR32, R_PPC_EMB_NADDR16,
4010 R_PPC_EMB_NADDR16_LO, R_PPC_EMB_NADDR16_HI and R_PPC_EMB_NADDR16_HA
4011 in shared libs. R_PPC_PLTREL32 is a plt reloc too. Refcount all
4012 relocs that might use a plt entry. Set NON_GOT_REF too.
4013 Enumerate all do-nothing relocs.
4014 (ppc_elf_gc_sweep_hook): Simplify removal of dynrelocs. Handle
4015 tls relocs and all plt relocs.
4016 (ppc_elf_tls_setup, ppc_elf_tls_optimize): New functions.
4017 (ppc_elf_finish_dynamic_symbol): Don't build got entries here.
4018 (ppc_elf_finish_dynamic_sections): Rewrite tag code using htab
4019 shortcuts.
4020 (ppc_elf_relocate_section): Tidy. Handle TLS relocs. Use
4021 bfd_elf_local_sym_name. Simplify unresolved reloc code. Build got
4022 entries and got relocs here. Warn on non-zero got reloc addend.
4023 Split out branch taken/not taken reloc code into a separate switch
4024 and correct offset calculation. Allow BRTAKEN/BRNTAKEN dynamic relocs.
4025 Split out HA reloc adjustments to separate switch statement. Don't
4026 warn on reloc overflow if we've already warned about undefined.
4027 Don't rebuild sym name when reporting errors. Report all possible
4028 errors from _bfd_final_link_relocate.
4029 (bfd_elf32_bfd_final_link): Don't define.
4030
4031 2003-02-18 Alan Modra <amodra@bigpond.net.au>
4032
4033 * elf64-ppc.c (ppc64_elf_relocate_section): Don't init "r". Don't
4034 rebuild sym name when reporting errors.
4035
4036 2003-02-17 Nick Clifton <nickc@redhat.com>
4037
4038 * elflink.h (elf_link_output_extsym): Only check
4039 allow_shlib_undefined for shared libraries.
4040 * elf32-i386.c (elf_i386_relocate_section): Remove bogus check
4041 of allow_shlib_undefined.
4042 * elf32-cris.c (cris_elf_relocate_section): Likewise.
4043 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
4044 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
4045 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
4046 * elf32-s390.c (elf_s390_relocate_section): Likewise.
4047 * elf32-sh.c (sh_elf_relocate_section): Likewise.
4048 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
4049 * elf32-vax.c (elf_vax_relocate_section): Likewise.
4050 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
4051 * elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
4052 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
4053 * elf64-s390.c (elf_s390_relocate_section): Likewise.
4054 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
4055 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
4056 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
4057 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
4058
4059 2003-02-17 Nick Clifton <nickc@redhat.com>
4060
4061 * elf.c (SEGMENT_AFTER_SEGMENT): Add third parameter - the
4062 address field to use in the comparison.
4063 (SEGMENT_OVERLAPS): Check that LMAs overlap as well.
4064
4065 2003-02-14 Bob Wilson <bob.wilson@acm.org>
4066
4067 * elfcore.h (elf_core_file_p): Compare alternate machine codes for ELF
4068 backends when checking if the generic ELF target should be used.
4069
4070 * syms.c (_bfd_stab_section_find_nearest_line): For line number stabs
4071 outside of functions, treat values as absolute addresses.
4072
4073 * bfd.c: Change embedded documentation to use consistent indentation
4074 and to split up long lines. Change informal style of description
4075 for functions lacking real documentation.
4076 * coffcode.h: Break up long lines in embedded documentation.
4077 * format.c: Likewise.
4078 * targets.c: Likewise.
4079 * libcoff.h: Regenerate.
4080 * bfd-in2.h: Regenerate.
4081
4082 2003-02-14 Alan Modra <amodra@bigpond.net.au>
4083
4084 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Init tls_get_addr.
4085 (ppc64_elf_copy_indirect_symbol): Merge tls_mask too.
4086 (ppc64_elf_gc_sweep_hook): Simplify removal of dyn_relocs.
4087 (allocate_dynrelocs): Don't treat undefined and undefweak specially.
4088 (ppc_size_one_stub): Fix warning, and tighten plt entry check.
4089 (group_sections): Don't share a stub section if stubs are for a large
4090 section. Adjust comment.
4091 (ppc64_elf_size_stubs): Roughly double the size left for stubs if
4092 !stubs_always_before_branch.
4093 (ppc64_elf_relocate_section): Initialize tlsld GOT entry once. Don't
4094 treat undefined and undefweak specially when processing dyn relocs.
4095
4096 2003-02-13 Jakub Jelinek <jakub@redhat.com>
4097
4098 * elflink.h (elf_link_add_object_symbols): Handle .symver x, x@FOO.
4099
4100 2003-02-13 Nick Clifton <nickc@redhat.com>
4101
4102 * elf32-arm.h (elf32_thumb_to_arm_stub): Include section VMAs
4103 in computation of offset to insert into BL instruction.
4104
4105 2003-02-11 Uwe Stieber <uwe@wwws.de>
4106
4107 * config.bfd: Add support for kaOS as cross build target system.
4108
4109 2003-02-11 Alan Modra <amodra@bigpond.net.au>
4110
4111 * elf64-ppc.c (ppc64_elf_check_relocs): Match versioned
4112 .__tls_get_addr too.
4113 (ppc64_elf_tls_setup): Ensure cached tls_get_addr is not indirect.
4114
4115 2003-02-10 Kaz kojima <kkojima@rr.iij4u.or.jp>
4116
4117 * elf32-sh.c (elf_sh_dyn_relocs): Add tls_tpoff32 field.
4118 (elf_sh_link_hash_entry): Remove tls_tpoff32 field.
4119 (sh_elf_link_hash_newfunc): Remove the initialization of
4120 tls_tpoff32 field.
4121 (allocate_dynrelocs): Keep dyn_relocs if it includes the entry
4122 for which tls_tpoff32 flag is set.
4123 (sh_elf_relocate_section): Covert to LE only if the dyn_relocs
4124 of the symbol includes the entry matched with the input_section
4125 and having tls_tpoff32 flag on. When linking statically, set
4126 symbol index of R_SH_TLS_TPOFF32 relocation to zero if the symbol
4127 is defined in this executable.
4128 (sh_elf_check_relocs): Set tls_tpoff32 flag appropriately.
4129
4130 2003-02-10 Jakub Jelinek <jakub@redhat.com>
4131
4132 * elf32-s390.c (elf_s390_size_dynamic_sections): Set relocs to TRUE
4133 even if there is just non-empty .rela.plt.
4134
4135 2003-02-10 Nick Clifton <nickc@redhat.com>
4136
4137 * archures.c (bfd_mach_arm_ep9312): Define.
4138 * bfd-in2.h: Regenerate.
4139 * cpu-arm.c (processors[]): Add ep9312.
4140 (bfd_arm_arch): Add ep9312.
4141 * elf32-arm.h (elf32_arm_merge_private_data): Update error
4142 messages and add test for Maverick floating point support.
4143 (elf32_arm_print_private_bfd_data): Handle
4144 EF_ARM_MAVERICK_FLOAT flag.
4145 (elf32_arm_object_p): New function.
4146 (elf_backend_object_p): Define.
4147
4148 2003-02-10 Alan Modra <amodra@bigpond.net.au>
4149
4150 * elf64-ppc.c: Rename assorted occurrences of tls_type and similar
4151 variables, structure fields or function params to tls_mask or
4152 similar to better reflect usage.
4153 (struct got_entry): Comment.
4154 (struct ppc_link_hash_entry): Expand comment, and renumber TLS_*.
4155 (get_tls_mask): Rename from get_tls_type.
4156
4157 2003-02-09 Alan Modra <amodra@bigpond.net.au>
4158
4159 * elf64-ppc.c (TLS_GD_LD): Don't define..
4160 (TLS_GD): ..define this instead and update all uses.
4161 (TLS_TPRELGD): Define.
4162 (ppc64_elf_link_hash_table_create): Tweak initialization of
4163 init_refcount and init_offset.
4164 (ppc64_elf_check_relocs): Add one extra element to t_symndx array.
4165 Mark second slot of GD or LD toc entries.
4166 (get_tls_type): Return an int. Distinguish toc GD and LD entries
4167 from other tls types.
4168 (ppc64_elf_tls_setup): New function, split out from..
4169 (ppc64_elf_tls_optimize): ..here. Don't optimize when symbols are
4170 defined in a dynamic object. Fix LD optimization. Don't set TLS_TPREL
4171 on GD->IE optimization, use TLS_TPRELGD instead. Use get_tls_type
4172 return value to properly decide whether toc GD and LD entries can
4173 optimize away __tls_get_addr call. Check next reloc after DTPMOD64
4174 to determine GD or LD rather than looking at TLS_LD flag. Don't
4175 attempt to adjust got entry tls_type here..
4176 (allocate_dynrelocs): ..instead, adjust got entry tls_type here, and
4177 look for possible merges.
4178 (ppc64_elf_size_dynamic_sections): Adjust local got entries for
4179 optimization.
4180 (ppc64_elf_size_stubs): Tweak __tls_get_addr fudge.
4181 (ppc64_elf_relocate_section): Rename some vars to better reflect usage.
4182 Make use of return value from get_tls_type to properly detect GD and
4183 LD optimizations. Split tlsld/gd hi/ha from lo/ds case. Don't
4184 handle tls_get_addr removal when looking at REL24 relocs, do it when
4185 looking at the previous reloc. Check reloc after DTPMOD64 to determine
4186 GD or LD.
4187 * elf64-ppc.h (ppc64_elf_tls_setup): Declare.
4188
4189 2003-02-08 Alan Modra <amodra@bigpond.net.au>
4190
4191 * elf32-hppa.c (group_sections): Don't share a stub section if
4192 stubs are for a large section.
4193
4194 * elf32-hppa.c (elf32_hppa_size_stubs): Double the size left for
4195 stubs if !stubs_always_before_branch.
4196
4197 2003-02-07 Nick Clifton <nickc@redhat.com>
4198
4199 * elf.c (swap_out_syms): Generate an error message if an
4200 equivalent output section cannot be found for a symbol.
4201
4202 2003-02-07 Jakub Jelinek <jakub@redhat.com>
4203
4204 * elf64-alpha.c (elf64_alpha_relax_section): Don't crash if
4205 local_got_entries is NULL.
4206
4207 2003-02-06 Andreas Schwab <schwab@suse.de>
4208
4209 * elf-eh-frame.c (get_DW_EH_PE_signed): Define.
4210 (read_value): Add parameter is_signed, use signed extraction if
4211 the value is signed.
4212 (_bfd_elf_write_section_eh_frame): Pass signed flag of the
4213 encoding to read_value.
4214
4215 2003-02-06 Alan Modra <amodra@bigpond.net.au>
4216
4217 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy got and
4218 plt info when called to transfer weak sym info.
4219
4220 2003-02-05 Alan Modra <amodra@bigpond.net.au>
4221
4222 * reloc.c: Add PPC and PPC64 TLS relocs.
4223 * libbfd.h: Regenerate.
4224 * bfd-in2.h: Regenerate.
4225 * elf64-ppc.c (TP_OFFSET, DTP_OFFSET): Declare.
4226 (ppc64_elf_howto_raw): Add TLS howto's. Adjust R_PPC64_NONE to be
4227 against a 32 bit field.
4228 (ppc64_elf_reloc_type_lookup): Handle TLS relocs.
4229 (_ppc64_elf_section_data): Add t_symndx and comments.
4230 (ppc64_elf_section_data): Use elf_section_data macro.
4231 (ppc64_elf_new_section_hook): American spelling.
4232 (struct got_entry, struct plt_entry): New.
4233 (MUST_BE_DYN_RELOC): Rename from IS_ABSOLUTE_RELOC.
4234 (struct ppc_stub_hash_entry): Add "addend" field.
4235 (struct ppc_link_hash_entry): Add "tls_type".
4236 (TLS_TLS, TLS_GD_LD, TLS_LD, TLS_TPREL, TLS_DTPREL,
4237 TLS_EXPLICIT): Define.
4238 (struct ppc_link_hash_table): Add tls_sec, tls_get_addr, tlsld_got.
4239 (link_hash_newfunc): Init new fields.
4240 (ppc64_elf_link_hash_table_create): Likewise. Set init_refcount and
4241 init_offset to NULL.
4242 (ppc64_elf_copy_indirect_symbol): Copy got and plt info. Don't call
4243 _bfd_elf_link_hash_copy_indirect, rather insert relevant code from
4244 there.
4245 (update_local_sym_info, update_plt_info): New functions.
4246 (ppc64_elf_check_relocs): Use them. Handle TLS relocs. Adjust GOT
4247 handling to use got.glist rather than got.refcount. Likewise for PLT.
4248 (ppc64_elf_gc_sweep_hook): Handle TLS relocs, new GOT and PLT lists.
4249 (func_desc_adjust): Adjust for new PLT list.
4250 (ppc64_elf_adjust_dynamic_symbol): Likewise.
4251 (get_sym_h, get_tls_type): New functions.
4252 (ppc64_elf_edit_opd): Remove unused variable. Use get_sym_h.
4253 (ppc64_elf_tls_optimize): New function.
4254 (allocate_dynrelocs): Adjust for new PLT and GOT lists. Allocate
4255 TLS relocs.
4256 (ppc64_elf_size_dynamic_sections): Likewise.
4257 (ppc_type_of_stub): Adjust for new PLT list.
4258 (ppc_build_one_stub): Likewise.
4259 (ppc64_elf_size_stubs): Likewise. Use get_sym_h. Treat __tls_get_addr
4260 calls specially.
4261 (ppc64_elf_relocate_section): Adjust for new GOT and PLT lists. Handle
4262 TLS relocs. Report local syms using bfd_elf_local_sym_name. Don't
4263 init GOT entries that have a reloc. Generate GOT relocs here..
4264 (ppc64_elf_finish_dynamic_symbol): ..not here. Adjust for PLT list.
4265 * elf64-ppc.h (ppc64_elf_tls_optimize): Declare.
4266
4267 2003-02-04 Andreas Schwab <schwab@suse.de>
4268
4269 * elf32-m68k.c (elf_m68k_hash_entry): Define.
4270 (elf_m68k_link_hash_traverse): Remove.
4271 (elf_m68k_link_hash_newfunc): Use struct bfd_hash_entry and
4272 elf_m68k_hash_entry instead of struct elf_m68k_link_hash_entry to
4273 reduce casting.
4274 (elf_m68k_check_relocs): Use elf_m68k_hash_entry instead of
4275 casting.
4276 (elf_m68k_size_dynamic_sections): Use elf_link_hash_traverse
4277 instead of elf_m68k_link_hash_traverse.
4278 (elf_m68k_discard_copies): Change first parameter to pointer to
4279 struct elf_link_hash_entry and use elf_m68k_hash_entry when struct
4280 elf_m68k_link_hash_entry is needed.
4281
4282 2003-02-04 Alan Modra <amodra@bigpond.net.au>
4283
4284 * elf-bfd.h (struct got_entry, struct plt_entry): Forward declare.
4285 (struct elf_link_hash_entry): Add "glist" and "plist" fields to
4286 "got" union, and declare as gotplt_union. Use gotplt_uinion for
4287 "plt" field.
4288 (struct elf_link_hash_table): Make "init_refcount" a gotplt_union.
4289 Add "init_offset" field.
4290 (struct elf_obj_tdata <local_got>): Add "struct got_entry **" to union.
4291 (elf_local_got_ents): Declare.
4292 * elf.c (_bfd_elf_link_hash_newfunc): Adjust initialization of "got"
4293 and "plt".
4294 (_bfd_elf_link_hash_hide_symbol): Use "init_offset".
4295 (_bfd_elf_link_hash_table_init): Set "init_offset".
4296 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set init_refcount
4297 from init_offset.
4298 (elf_adjust_dynamic_symbol): Set plt and got offsets using init_offset.
4299
4300 * elf.c (bfd_elf_local_sym_name): Split out from..
4301 (group_signature): ..here.
4302 * elf-bfd.h (bfd_elf_local_sym_name): Declare.
4303
4304 2003-02-04 Alan Modra <amodra@bigpond.net.au>
4305
4306 * elf-bfd.h (enum elf_link_info_type): Remove.
4307 (struct bfd_elf_section_data): Move sec_info_type, use_rela_p fields
4308 to struct sec. Remove linkonce_p field.
4309 (elf_linkonce_p): Delete.
4310 (elf_discarded_section): Update for sec_info_type change.
4311 * section.c (struct sec): Add sec_info_type, use_rela_p, has_tls_reloc,
4312 flag11, flag12, flag13, flag14, flag15, flag16, flag20, flag24.
4313 (ELF_INFO_TYPE_NONE): Define.
4314 (ELF_INFO_TYPE_STABS): Define.
4315 (ELF_INFO_TYPE_MERGE): Define.
4316 (ELF_INFO_TYPE_EH_FRAME): Define.
4317 (ELF_INFO_TYPE_JUST_SYMS): Define.
4318 (STD_SECTION): Update struct sec initializer.
4319 * ecoff.c (bfd_debug_section): Likewise.
4320 * elf.c: Likewise. Update occurrences of sec_info_type and use_rela_p.
4321 * elflink.h: Likewise.
4322 * elf-eh-frame.c: Likewise.
4323 * elf64-alpha.c: Likewise.
4324 * elfxx-ia64.c: Likewise.
4325 * elfxx-mips.c: Likewise.
4326 * bfd-in2.h: Regenerate.
4327
4328 * elf32-sparc.c (sec_do_relax): Use elf_section_data macro rather than
4329 referring to used_by_bfd.
4330 * elf64-sparc.c (sec_do_relax): Likewise.
4331 * elf64-mmix.c (mmix_elf_section_data): Likewise.
4332 * elfxx-mips.c (mips_elf_section_data): Likewise.
4333 * ieee.c (ieee_slurp_section_data): Use ieee_per_section macro.
4334 (ieee_get_section_contents): Likewise.
4335 (ieee_new_section_hook): Formatting.
4336 (ieee_canonicalize_reloc): Remove commented out code.
4337 * mmo.c (mmo_section_data): Define. Use throughout file.
4338 * oasys.c (oasys_get_section_contents): Use oasys_per_section macro.
4339
4340 2003-01-31 Graydon Hoare <graydon@redhat.com>
4341
4342 * Makefile.am (opncls.lo): Add dependency upon libiberty.h.
4343 * Makefile.in: Regenerate.
4344 * opncls.c (calc_crc32, get_debug_link_info,
4345 seperate_debug_file_exists, find_seperate_debug_file): New
4346 internal functions.
4347 (bfd_follow_gnu_debuglink): New function. Follow the pointer
4348 contained inside a .gnu_debuglink section.
4349 * bfd-in2.h: Regenerate.
4350
4351 2003-01-29 Alexandre Oliva <aoliva@redhat.com>
4352
4353 * elfxx-mips.c (mips_elf_got_entry_hash): Don't dereference
4354 entry->abfd when it's NULL.
4355
4356 2003-01-27 Alexandre Oliva <aoliva@redhat.com>
4357
4358 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Handle
4359 _bfd_elf_section_offset returning -2 the same way as -1.
4360
4361 * elfxx-mips.c (mips_elf_multi_got): New function.
4362 (struct mips_got_entry): Make symndx and gotidx signed. Moved
4363 addend into union along with address and link hash entry.
4364 (struct mips_got_info): Added bfd2got and next.
4365 (struct mips_elf_hash_sort_data): Added max_unref_got_dynindx.
4366 (mips_elf_got_section, mips_elf_create_got_section): Use
4367 SEC_EXCLUDE bit to tell whether we really need the got
4368 section. Take boolean arguments to disregard an excluded
4369 section, or to create it as excluded. Adjust all callers.
4370 Use mips_elf_got_section all over.
4371 (mips_elf_local_got_index, mips_elf_got_page,
4372 mips_elf_got16_entry): Take input bfd as argument, and pass it
4373 on to mips_elf_create_local_got_entry.
4374 (mips_elf_global_got_index, mips_elf_create_local_got_entry):
4375 Take input bfd as argument, and manage entries in the
4376 appropriate GOT.
4377 (mips_elf_got_offset_from_index): Take input bfd as argument,
4378 and use it to adjust the GP offset of the bfd.
4379 (mips_elf_sort_hash_table, mips_elf_sort_hash_table_f): Move
4380 unreferenced GOT entries of global symbols to the end.
4381 (mips_elf_record_global_got_symbol): Take input bfd as
4382 argument. Add entries to the master GOT hash table.
4383 (struct mips_elf_bfd2got_hash): New.
4384 (struct mips_elf_got_per_bfd_arg): New.
4385 (struct mips_elf_set_global_got_offset_arg): New.
4386 (mips_elf_hash_bfd_vma, mips_elf_multi_got_entry_hash,
4387 mips_elf_multi_got_entry_eq, mips_elf_bfd2got_entry_hash,
4388 mips_elf_bfd2got_entry_eq, mips_elf_make_got_per_bfd,
4389 mips_elf_merge_gots, mips_elf_set_global_got_offset,
4390 mips_elf_resolve_final_got_entry,
4391 mips_elf_resolve_final_got_entries, mips_elf_adjust_gp,
4392 mips_elf_got_for_ibfd): New functions.
4393 (ELF_MIPS_GP_OFFSET): Don't depend on SGI_COMPAT.
4394 (MIPS_ELF_GOT_MAX_SIZE): New macro.
4395 (STUB_LW): Generate 64-bit stub regardless of SGI_COMPAT.
4396 (mips_elf_got_entry_hash): Take new fields into account. Use
4397 mips_elf_hash_bfd_vma.
4398 (mips_elf_got_entry_eq): Take new fields into account.
4399 (mips_elf_create_got_section): Initialize new fields.
4400 (mips_elf_calculate_relocation): Pass input_bfd to functions
4401 that now take it. Adjust gp for the input_bfd.
4402 (mips_elf_allocate_dynamic_relocation,
4403 mips_elf_create_dynamic_relocation,
4404 _bfd_mips_elf_create_dynamic_sections): Use...
4405 (mips_elf_rel_dyn_section): New function. Borrow code from...
4406 (_bfd_mips_elf_check_relocs): Pass input_bfd to functions that
4407 now take it. Create the got section if needed, even if
4408 excluded, before recording a global got symbol. Move some
4409 code to...
4410 (mips_elf_record_local_got_symbol): New fn.
4411 (_bfd_mips_elf_size_dynamic_sections): Disable combreloc.
4412 Compute multi-got global entries offsets. Move GOT code to...
4413 (_bfd_mips_elf_always_size_sections): Call mips_elf_multi_got
4414 if the GOT is too big.
4415 (_bfd_mips_elf_finish_dynamic_symbol): Set got entry of
4416 undefweak symbol to zero. Generate dynamic relocations for
4417 non-primary GOT entries for global symbols.
4418 (_bfd_mips_elf_finish_dynamic_sections): Handle multi-got
4419 case. Generate dynamic relocations for local got entries.
4420 Sort dynamic relocations on N64 too, using...
4421 (sort_dynamic_relocs_64): New fns.
4422 (_bfd_mips_elf_hide_symbol): Adjust multi-got counters.
4423 (_bfd_mips_elf_merge_private_bfd_data): Ignore EF_MIPS_XGOT.
4424
4425 2003-01-27 Alexandre Oliva <aoliva@redhat.com>
4426
4427 * bfd.c (struct _bfd): Added id field.
4428 * opncls.c (_bfd_id_counter): New static variable.
4429 (_bfd_new_bfd): Use it.
4430 * bfd-in2.h: Rebuilt.
4431
4432 2003-01-25 Alan Modra <amodra@bigpond.net.au>
4433
4434 * elf32-sparc.c (bfd_elf32_new_section_hook): Define.
4435
4436 2003-01-25 Jakub Jelinek <jakub@redhat.com>
4437
4438 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Add TLS relocs.
4439 (elf32_sparc_rev32_howto): New variable.
4440 (sparc_reloc_map): Add TLS relocs.
4441 (elf32_sparc_reloc_type_lookup, elf32_sparc_info_to_howto):
4442 Handle REV32.
4443 (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc, elf32_sparc_mkobject):
4444 New functions.
4445 (struct elf32_sparc_dyn_relocs, struct elf32_sparc_link_hash_entry,
4446 struct elf32_sparc_link_hash_table):
4447 New structures.
4448 (elf32_sparc_tdata, elf32_sparc_local_got_tls_type,
4449 elf32_sparc_hash_table): Define.
4450 (link_hash_newfunc, elf32_sparc_link_hash_table_create,
4451 create_got_section, elf32_sparc_create_dynamic_sections,
4452 elf32_sparc_copy_indirect_symbol, elf32_sparc_tls_transition): New
4453 functions.
4454 (elf32_sparc_check_relocs): Handle TLS relocs. Add dynamic reloc
4455 reference counting.
4456 (elf32_sparc_gc_sweep_hook): Likewise.
4457 (elf32_sparc_adjust_dynamic_symbol): Likewise.
4458 (elf32_sparc_size_dynamic_sections): Likewise.
4459 (elf32_sparc_relocate_section): Likewise.
4460 (allocate_dynrelocs, readonly_dynrelocs, dtpoff_base, tpoff):
4461 New functions.
4462 (elf32_sparc_object_p): Allocate backend private object data.
4463 (bfd_elf32_bfd_link_hash_table_create,
4464 elf_backend_copy_indirect_symbol, bfd_elf32_mkobject,
4465 elf_backend_can_refcount): Define.
4466 (elf_backend_create_dynamic_sections): Define to
4467 elf32_sparc_create_dynamic_sections.
4468 * reloc.c: Add SPARC TLS relocs.
4469 * bfd-in2.h, libbfd.h: Rebuilt.
4470 * elf64-sparc.c (sparc64_elf_howto_table): Add TLS relocs.
4471 (sparc_reloc_map): Likewise.
4472
4473 2003-01-24 Martin Schwidefsky <schwidefsky@de.ibm.com>
4474
4475 * bfd-in2.h: Regenerate.
4476 * elf32-s390.c (elf_s390_mkobject, elf_s390_tls_transition,
4477 s390_tls_reloc, dtpoff_base, tpoff, invalid_tls_insn): New functions.
4478 (elf_howto_table): Add TLS relocs.
4479 (elf_s390_reloc_type_lookup): Likewise.
4480 (elf_s390_link_hash_entry): Add tls_type.
4481 (elf_s390_hash_entry, elf_s390_obj_tdata, elf_s390_local_got_tls_type):
4482 New macros.
4483 (elf_s390_link_hash_table): Add tls_ldm_got.
4484 (link_hash_newfunc): Initialize tls_type.
4485 (elf_s390_link_hash_table_create): Initialize refcount of tls_ldm_got.
4486 (elf_s390_copy_indirect_symbol): Copy tls_type information.
4487 (elf_s390_check_relocs): Support TLS relocs.
4488 (elf_s390_gc_sweep_hook): Likewise.
4489 (allocate_dynrelocs): Likewise.
4490 (elf_s390_size_dynamic_sections): Likewise.
4491 (elf_s390_relocate_section): Likewise.
4492 (elf_s390_finish_dynamic_symbol): Likewise.
4493 (bfd_elf32_mkobject): Define for TLS.
4494 * elf64-s390.c: Same changes as for elf32-s390.c.
4495 * libbfd.h: Regenerate.
4496 * reloc.c: Add s390 TLS relocations.
4497
4498 2003-01-24 Charles Lepple <clepple@ghz.cc>
4499
4500 * aclocal.m4: Fix name of --enable-install-libbfd switch.
4501
4502 2003-01-23 Nick Clifton <nickc@redhat.com>
4503
4504 * Add sh2e support:
4505 2002-04-02 Elena Zannoni <ezannoni@redhat.com>
4506 * archures.c (bfd_mach_sh2e): Added.
4507 * bfd-in2.h: Rebuilt.
4508 * cpu-sh.c (arch_info_struct): Added SH2e.
4509 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle EF_SH2E.
4510
4511 2003-01-23 Alan Modra <amodra@bigpond.net.au>
4512
4513 * elf-bfd.h (struct bfd_elf_section_data): Remove tdata. Change
4514 dynindx to an int. Rearrange for better packing.
4515 * elf.c (_bfd_elf_new_section_hook): Don't alloc if already done.
4516 * elf32-mips.c (bfd_elf32_new_section_hook): Define.
4517 * elf32-sh64.h: New. Split out from include/elf/sh.h.
4518 (struct _sh64_elf_section_data): New struct.
4519 (sh64_elf_section_data): Don't dereference sh64_info (was tdata).
4520 * elf32-sh64-com.c: Include elf32-sh64.h.
4521 * elf32-sh64.c: Likewise.
4522 (sh64_elf_new_section_hook): New function.
4523 (bfd_elf32_new_section_hook): Define.
4524 (sh64_elf_fake_sections): Adjust for sh64_elf_section_data change.
4525 (sh64_bfd_elf_copy_private_section_data): Likewise.
4526 (sh64_elf_final_write_processing): Likewise.
4527 * elf32-sparc.c (struct elf32_sparc_section_data): New.
4528 (elf32_sparc_new_section_hook): New function.
4529 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
4530 (sec_do_relax): Define.
4531 (elf32_sparc_relax_section): Adjust to use sec_do_relax.
4532 (elf32_sparc_relocate_section): Likewise.
4533 * elf64-mips.c (bfd_elf64_new_section_hook): Define.
4534 * elf64-mmix.c (struct _mmix_elf_section_data): New.
4535 (mmix_elf_section_data): Define. Use throughout file.
4536 (mmix_elf_new_section_hook): New function.
4537 (bfd_elf64_new_section_hook): Define.
4538 * elf64-ppc.c (struct _ppc64_elf_section_data): New.
4539 (ppc64_elf_section_data): Define. Use throughout.
4540 (ppc64_elf_new_section_hook): New function.
4541 (bfd_elf64_new_section_hook): Define.
4542 * elf64-sparc.c (struct sparc64_elf_section_data): New.
4543 (sparc64_elf_new_section_hook): New function.
4544 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
4545 (sec_do_relax): Define.
4546 (sparc64_elf_relax_section): Adjust to use sec_do_relax.
4547 (sparc64_elf_relocate_section): Likewise.
4548 (bfd_elf64_new_section_hook): Define.
4549 * elfn32-mips.c (bfd_elf32_new_section_hook): Define.
4550 * elfxx-mips.c (struct _mips_elf_section_data): New.
4551 (mips_elf_section_data): Define. Use throughout.
4552 (_bfd_mips_elf_new_section_hook): New function.
4553 (mips_elf_create_got_section): Don't alloc used_by_bfd.
4554 * elfxx-mips.h (_bfd_mips_elf_new_section_hook): Declare.
4555 * elfxx-target.h (bfd_elfNN_new_section_hook): Add #ifndef.
4556 * Makefile.am: Run "make dep-am".
4557 * Makefile.in: Regenerate.
4558
4559 2003-01-21 Richard Henderson <rth@redhat.com>
4560
4561 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_PLT_LOC): New.
4562 (struct alpha_elf_link_hash_entry): Add plt_old_section, plt_old_value.
4563 (elf64_alpha_adjust_dynamic_symbol): Set them.
4564 (elf64_alpha_size_plt_section_1): Reset them when plt entry removed.
4565 (elf64_alpha_relax_tls_get_addr): Handle LDM relocs. Frob the
4566 symbol index when relaxing LDM to TPREL.
4567 (elf64_alpha_relax_section): Likewise. Allow relaxation of GD
4568 relocs, even if the target isn't locally defined.
4569 (elf64_alpha_check_relocs): Frob LDM reloc symndx to zero.
4570 (elf64_alpha_relocate_section): Likewise. Force TP-relative
4571 relocs vs symndx 0 to the tp base.
4572
4573 2003-01-21 Fabio Alemagna <falemagn@aros.org>
4574
4575 * config.bfd: Handle i[3456]86-*-aros*.
4576
4577 2003-01-21 Andreas Schwab <schwab@suse.de>
4578
4579 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Define.
4580 (struct ppc_elf_link_hash_entry): Define.
4581 (ppc_elf_hash_entry): New function.
4582 (struct ppc_elf_link_hash_table): Define.
4583 (ppc_elf_hash_table): New function.
4584 (ppc_elf_link_hash_newfunc): New function.
4585 (ppc_elf_link_hash_table_create): New function.
4586 (ppc_elf_copy_indirect_symbol): New function.
4587 (allocate_dynrelocs): New function.
4588 (readonly_dynrelocs): New function.
4589 (ppc_elf_size_dynamic_sections): Allocate space for dynamic
4590 relocs and determine DT_TEXTREL.
4591 (ppc_elf_check_relocs): Don't do that here, just count the
4592 dynamic relocs.
4593 (ppc_elf_gc_sweep_hook): Discard any dynamic relocs against the
4594 removed section.
4595 (bfd_elf32_bfd_link_hash_table_create): Define.
4596 (elf_backend_copy_indirect_symbol): Define.
4597
4598 2003-01-21 Richard Henderson <rth@redhat.com>
4599
4600 * elf64-alpha.c (alpha_dynamic_entries_for_reloc): GOTTPREL and
4601 TPREL also get a reloc if shared. Remove SREL support.
4602 (elf64_alpha_emit_dynrel): New.
4603 (elf64_alpha_relocate_section): Use it. Resolve dynamic TPREL
4604 and GOTTPREL relocs to local symbols against the tp base.
4605 (elf64_alpha_finish_dynamic_symbol): Use elf64_alpha_emit_dynrel.
4606
4607 * elf64-alpha.c (elf64_alpha_relax_got_load): Decrement got
4608 use count before clobbering r_type.
4609 (elf64_alpha_relax_tls_get_addr): Don't use pos[1] if insn
4610 ordering would mean dataflow inspection is necessary.
4611
4612 2003-01-20 Svein E. Seldal <Svein.Seldal@solidas.com>
4613
4614 * coffcode.h (coff_set_flags): Added get/set arch hooks.
4615
4616 2003-01-20 Fabio Alemagna <falemagn@aros.org>
4617
4618 * elf32-sh.c: Treat elfNN_bed like other macros defined in
4619 elfxx-target.h and #undef it before #define'ing it.
4620 * elf32-i386.c: Likewise.
4621 * elf32-sh64.c: Likewise.
4622 * elf64-alpha.c: Likewise.
4623 * elf64-sh64.c: Likewise.
4624
4625 2003-01-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
4626
4627 * bfd-in2.h: Regenerate.
4628 * elf32-s390.c (elf_s390_adjust_gotplt): New prototype.
4629 (elf_howto_table): Rename R_390_GOTOFF to R_390_GOTOFF32. Add
4630 R_390_GOTOFF16, R_390_GOTOFF64, R_390_GOTPLT12, R_390_GOTPLT16,
4631 R_390_GOTPLT32, R_390_GOTPLT64, R_390_GOTPLTENT, R_390_PLTOFF16,
4632 R_390_PLTOFF32 and R_390_PLTOFF64.
4633 (elf_s390_reloc_type_lookup): Likewise.
4634 (struct elf_s390_link_hash_entry): Add gotplt_refcount to keep track
4635 of GOTPLT references to a function.
4636 (link_hash_newfunc): Initialize gotplt_refcount.
4637 (elf_s390_check_relocs): Move allocation of local_got_refcounts array
4638 and creation of the got section out of the main switch. Add support
4639 for the gotoff, gotplt and pltoff relocations.
4640 (elf_s390_gc_sweep_hook): Add reference counting for gotoff, gotplt
4641 and pltoff.
4642 (elf_s390_adjust_gotplt): New function.
4643 (elf_s390_adjust_dynamic_symbol): Adjust gotplt refcount for removed
4644 plt entries.
4645 (allocate_dynrelocs): Add comment.
4646 (elf_s390_relocate_section): Change r_type to unsigned. Add support
4647 for gotoff, gotplt and pltoff relocations.
4648 * elf64-s390.c: Same changes as for elf32-s390.c.
4649 * libbfd.h: Regenerate.
4650 * reloc.c: Add BFD_RELOC_390_GOTOFF64, BFD_RELOC_390_GOTPLT12,
4651 BFD_RELOC_390_GOTPLT16, BFD_RELOC_390_GOTPLT32, BFD_RELOC_390_GOTPLT64,
4652 BFD_RELOC_390_GOTPLTENT, BFD_RELOC_390_PLTOFF16, BFD_RELOC_390_PLTOFF32
4653 and BFD_RELOC_390_PLTOFF64.
4654
4655 2003-01-18 Jakub Jelinek <jakub@redhat.com>
4656
4657 * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle
4658 R_IA64_TPREL64[LM]SB against non-global symbol properly.
4659
4660 2003-01-16 Jakub Jelinek <jakub@redhat.com>
4661
4662 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add
4663 self_dtpmod_done and self_dtpmod_offset.
4664 (allocate_global_data_got): Only use one got entry for all
4665 dtpmod relocs against local symbols.
4666 (allocate_dynrel_entries): Only need .rela.got entry for
4667 dtpmod against global symbol.
4668 (elfNN_ia64_size_dynamic_sections): Initialize self_dtpmod_offset.
4669 Reserve space in .rela.got for the local dtpmod entry.
4670 (set_got_entry): Initialize the common local dtpmod .got entry.
4671 (elfNN_ia64_relocate_section): Handle R_IA_64_DTPREL64LSB
4672 and R_IA_64_DTPREL64MSB.
4673
4674 2003-01-16 Alan Modra <amodra@bigpond.net.au>
4675
4676 * elf64-ppc.c: Include elf/ppc64.h rather than elf/ppc.h.
4677 (R_PPC_*): Rename all occurrences to R_PPC64_*.
4678 (R_PPC64_ADDR30): Rename all occurrences to R_PPC64_REL30.
4679 (enum elf_ppc_reloc_type): Ditto to enum elf_ppc64_reloc_type.
4680 (ppc64_elf_gc_sweep_hook): Handle R_PPC64_REL30 along with other
4681 relative relocs, not with absolute ones.
4682 * Makefile.am: Run "make dep-am".
4683 * Makefile.in: Regenerate.
4684 * po/SRC-POTFILES.in: Regenerate.
4685
4686 2003-01-15 Andreas Schwab <schwab@suse.de>
4687
4688 * elf32-ppc.c (ppc_elf_check_relocs): Don't set DF_TEXTREL for a
4689 relocation against a non-allocated readonly section.
4690
4691 2003-01-10 Alan Modra <amodra@bigpond.net.au>
4692
4693 * elf32-ppc.c (ppc_elf_relocate_section): Adjust addend for GOT16_HA.
4694 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. PLTGOT16_HA too.
4695
4696 2002-01-08 Klee Dienes <kdienes@apple.com>
4697
4698 * Makefile.am (ALL_MACHINES): Use cpu-msp430.lo, not cpu-msp430.c.
4699 (BFD32_BACKENDS): Use elf32-msp430.lo, not elf32-msp430.c.
4700 * Makefile.in: Regenerate.
4701
4702 2003-01-08 Alexandre Oliva <aoliva@redhat.com>
4703
4704 * elfn32-mips.c (prev_reloc_section): New.
4705 (GET_RELOC_ADDEND): Use it. Parenthesize macro arguments.
4706 (SET_RELOC_ADDEND): Parenthesize macro argument.
4707
4708 2003-01-07 John David Anglin <dave.anglin@nrc.gc.ca>
4709
4710 * elf32-hppa.c (final_link_relocate): For all DP relative relocations,
4711 adjust addil instructions if the symbol has no section.
4712
4713 2003-01-07 DJ Delorie <dj@redhat.com>
4714
4715 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make REL_12 not
4716 partial_inplace.
4717
4718 2003-01-07 Andreas Schwab <schwab@suse.de>
4719
4720 * elf32-m68k.c (elf_m68k_check_relocs): Don't set DF_TEXTREL for
4721 PC relative relocations.
4722 (elf_m68k_discard_copies): Set it here instead.
4723
4724 2002-01-02 Ben Elliston <bje@redhat.com>
4725 Jeff Johnston <jjohnstn@redhat.com>
4726
4727 * Makefile.am (ALL_MACHINES): Add cpu-iq2000.lo.
4728 (ALL_MACHINES_CFILES): Add cpu-iq2000.c.
4729 (BFD32_BACKENDS): Add elf32-iq2000.lo.
4730 (BFD32_BACKENDS_CFILES): Add elf32-iq2000.c.
4731 (cpu-iq2000.lo): New target.
4732 * Makefile.in: Regenerate.
4733 * config.bfd: Handle iq2000-*-elf.
4734 * archures.c (bfd_architecture): Add bfd_{arch,mach}_iq2000.
4735 (bfd_archures_list): Add bfd_iq2000_arch.
4736 * configure.in: Handle bfd_elf32_iq2000_vec.
4737 * configure: Regenerate.
4738 * reloc.c: Add BFD_RELOC_IQ2000_OFFSET_16, BFD_RELOC_IQ2000_OFFSET_21,
4739 and BFD_RELOC_IQ2000_UHI16.
4740 * targets.c (bfd_elf32_iq2000_vec): Declare.
4741 (bfd_target_vector): Add bfd_elf32_iq2000_vec.
4742 * elf.c (prep_headers): Set e_machine to EM_IQ2000.
4743 * cpu-iq2000.c: New file.
4744 * elf32-iq2000.c: Likewise.
4745 * libbfd.h: Regenerate.
4746 * bfd-in2.h: Likewise.
4747
4748 2003-01-02 Richard Sandiford <rsandifo@redhat.com>
4749
4750 * elfxx-mips.c: Include libiberty.h.
4751 (elf_mips_isa, _bfd_mips_elf_mach_extends_p): Remove.
4752 (mips_set_isa_flags): New function, split out from...
4753 (_bfd_mips_elf_final_write_processing): ...here. Only call
4754 mips_set_isa_flags if the EF_MIPS_MACH bits are clear.
4755 (mips_mach_extensions): New array.
4756 (mips_32bit_flags_p): New function.
4757 (_bfd_mips_elf_merge_private_bfd_data): Rework architecture checks.
4758 Use mips_32bit_flags_p to check if one binary is 32-bit and the
4759 other is 64-bit. When adopting IBFD's architecture, adopt the
4760 bfd_mach as well as the flags.
4761
4762 2003-01-02 Nick Kelsey <nickk@ubicom.com>
4763
4764 * elf32-ip2k.c: Re-work of linker relaxation code for the ip2k to
4765 fix internal errors, fix bad code generation, fix incorrect stabs
4766 information, and improve ability to eliminate redundant page
4767 instructions. Added code to ip2k_final_link_relocate to self-verify
4768 the linker relaxation. Fix formatting problems.
4769
4770 2002-12-30 Chris Demetriou <cgd@broadcom.com>
4771
4772 * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mipsisa32r2 case.
4773 * archures.c (bfd_mach_mipsisa32r2): New define.
4774 * bfd-in2.h: Regenerate.
4775 * cpu-mips.c (I_mipsisa32r2): New enum value.
4776 (arch_info_struct): Add entry for I_mipsisa32r2.
4777 * elfxx-mips.c (elf_mips_isa, _bfd_elf_mips_mach)
4778 (_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_32R2.
4779 (_bfd_mips_elf_final_write_processing): Add
4780 bfd_mach_mipsisa32r2 case.
4781 (_bfd_mips_elf_merge_private_bfd_data): Handle merging of
4782 binaries marked as using MIPS32 Release 2.
4783
4784 2002-12-30 Dmitry Diky <diwil@mail.ru>
4785
4786 * Makefile.am: Add msp430 target.
4787 * configure.in: Likewise.
4788 * Makefile.in: Regenerate.
4789 * configure: Regenerate.
4790 * archures.c: Add msp430 architecture vector.
4791 * config.bfd: Likewise.
4792 * reloc.c: Add msp430 relocs.
4793 * targets.c: Add msp320 target.
4794 * cpu-msp430.c: New file: msp430 cpu detection.
4795 * elf32-msp430.c: New file: msp430 reloc processing.
4796 * bfd-in2.h: Regenerate.
4797 * libbfd.h: Regenerate.
4798
4799 2002-12-28 Jakub Jelinek <jakub@redhat.com>
4800
4801 * elf.c (elf_sort_sections): Don't reorder .tbss.
4802 (assign_file_positions_for_segments): Only adjust off/voff
4803 for increased alignment in PT_LOAD or PT_NOTE segment,
4804 but adjust p_filesz for .tbss too. in PT_LOAD consider
4805 .tbss to have zero memory size.
4806 (copy_private_bfd_data) [SECTION_SIZE]: Define.
4807 [IS_CONTAINED_BY_VMA, IS_CONTAINED_BY_LMA]: Use it.
4808 [INCLUDE_SECTION_IN_SEGMENT]: Only put SHF_TLS sections
4809 into PT_TLS segment. Never put SHF_TLS sections in
4810 segments other than PT_TLS or PT_LOAD.
4811
4812 * elf64-alpha.c (elf64_alpha_finish_dynamic_sections): Clear .plt
4813 sh_entsize.
4814
4815 2002-12-23 DJ Delorie <dj@redhat.com>
4816
4817 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Fix logic reversal.
4818
4819 2002-12-23 Alan Modra <amodra@bigpond.net.au>
4820
4821 * elflink.h (elf_link_output_extsym): Heed strip_discarded.
4822
4823 2002-12-23 Nick Clifton <nickc@redhat.com>
4824
4825 * archures.c (bfd_arch_get_compatible): Add third parameter
4826 'accept_unknowns'. Only accept unknown format BFDs if
4827 accept_unknowns is true, or if the format is "binary".
4828 * bfd-in2.h: Regenerate.
4829
4830 2002-12-21 Nick Clifton <nickc@redhat.com>
4831
4832 * coff-arm.c (coff_arm_relocate_section): Disable WINCE workaround
4833 that subtracted 8 from pc relative relocations.
4834
4835 2002-12-20 Kazu Hirata <kazu@cs.umass.edu>
4836
4837 * coff-h8300.c: Fix comment typos.
4838 * coffcode.h: Likewise.
4839 * cpu-cris.c: Likewise.
4840 * elf32-vax.c: Likewise.
4841 * genlink.h: Likewise.
4842 * linker.c: Likewise.
4843 * som.c: Likewise.
4844 * tekhex.c: Likewise.
4845 * vms-misc.c: Likewise.
4846
4847 2002-12-20 DJ Delorie <dj@redhat.com>
4848
4849 * reloc.c: Add BFD_RELOC_XSTORMY16_12.
4850 * libbfd.h: Regenerate.
4851 * bfd-in2.h: Regenerate.
4852 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_12.
4853 (xstormy16_reloc_map): Add R_XSTORMY16_12.
4854
4855 2002-12-19 Kazu Hirata <kazu@cs.umass.edu>
4856
4857 * doc/bfdint.texi: Fix typos.
4858
4859 2002-12-20 Paul Eggert <eggert@twinsun.com>
4860
4861 Port to POSIX 1003.1-2001.
4862 * acinclude.m4 (AM_INSTALL_LIBBFD): Do not rely on "test -o".
4863 * configure.in (build-warnings): Likewise.
4864 (Horrible hacks to build DLLs on Windows): Do not rely on "tail -1".
4865 * aclocal.m4: Regenerate.
4866 * config.in: Regenerate.
4867 * configure: Regenerate.
4868
4869 2002-12-19 Alan Modra <amodra@bigpond.net.au>
4870
4871 * coff-h8300.c: Include libiberty.h.
4872 (h8300_reloc16_extra_cases): Check the hash table creator before
4873 referencing h8300 specific fields. Stash the hash table pointer
4874 in a local var. Comment typo fixes.
4875 (h8300_bfd_link_add_symbols): Likewise.
4876
4877 * reloc.c (struct reloc_howto_struct): Revise src_mask and
4878 dst_mask comments.
4879 * bfd-in2.h: Regenerate.
4880
4881 2002-12-18 Alan Modra <amodra@bigpond.net.au>
4882
4883 * elf32-ppc.c (ppc_elf_relocate_section): Reorganize dynamic reloc
4884 code a little. Comment on dynamic relocs against section symbols.
4885
4886 2002-12-17 Roger Sayle <roger@eyesopen.com>
4887
4888 * configure.host (ia64-*-hpux*): Support 64 bit targets using
4889 the HP compiler's "long long".
4890
4891 2002-12-16 Andrew MacLeod <amacleod@redhat.com>
4892
4893 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_LO16
4894 and R_XSTORMY16_HI16) howto entries.
4895 (xstormy16_reloc_map): Map R_XSTORMY16_{LO,HI}16 to BFD_RELOC_{LO,HI}16.
4896 (xstormy16_info_to_howto_rela): Use R_XSTORMY16_GNU_VTINHERIT to
4897 determine the start of the second reloc table.
4898
4899 2002-12-16 Nathan Tallent <eraxxon@alumni.rice.edu>
4900
4901 * ecofflink.c: Fix the reading of the debugging information
4902 of Tru64/Alpha binaries that are produced by recent Compaq
4903 compilers.
4904 (mk_fdrtab): Fix error in creating the FDR (file descriptor)
4905 table.
4906 (lookup_line): Because of the strange information sometimes
4907 generated by Compaq's recent compilers, change how the FDR
4908 table is searched so that PDRs (procedure descriptors) are
4909 correctly found. Note that this change is really more of a hack;
4910 however, I have included extensive documentation as to why
4911 this is the best solution short of an extensive rewrite or
4912 another hack.
4913 (fdrtab_lookup): Add comments to explain the algorithm.
4914
4915 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
4916
4917 * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Reorder
4918 initializers to match struct declaration.
4919
4920 2002-12-12 Alan Modra <amodra@bigpond.net.au>
4921
4922 * dwarf2.c (comp_unit_contains_address): Comment typo fix.
4923 * elf.c (get_program_header_size): Likewise.
4924 * elf32-m32r.c (m32r_elf_lo16_reloc): Likewise.
4925 (m32r_elf_generic_reloc): Likewise.
4926 * elf32-ppc.c (ppc_elf_howto_init): Likewise.
4927 * elflink.h (elf_bfd_discard_info): Likewise.
4928
4929 2002-12-12 Alan Modra <amodra@bigpond.net.au>
4930
4931 * elf32-i386.c (elf_i386_finish_dynamic_sections): Add output_offset
4932 to DT_JMPREL. Use srelplt input section size for DT_PLTRELSZ and
4933 DT_RELSZ adjustment, not output section. Avoid writing tags when
4934 unchanged. Don't assume linker script is sane, adjust DT_REL too.
4935 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Just use raw
4936 size of srelplt for DT_PLTRELSZ. Use srelplt input section size for
4937 DT_RELASZ adjustment, not output section. Avoid writing tags when
4938 unchanged. Adjust DT_RELA.
4939 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Tweaks for better
4940 formatting. Avoid writing tags when unchanged. Adjust DT_RELA.
4941
4942 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
4943
4944 * elfxx-mips.c (mips_elf_calculate_relocation): Don't divide
4945 addend by 4.
4946
4947 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
4948
4949 * elfxx-mips.c (struct mips_got_entry): New.
4950 (struct mips_got_info): Added got_entries field.
4951 (mips_elf_got_entry_hash, mips_elf_got_entry_eq): New functions.
4952 (mips_elf_local_got_index, mips_elf_got_page,
4953 mips_elf_got16_entry): Re-implement in terms of new...
4954 (mips_elf_create_local_got_entry): Rewrite to use got_entries.
4955 Change return type.
4956 (mips_elf_highest): Warning clean-up.
4957 (mips_elf_create_got_section): Initialize got_entries.
4958 (_bfd_mips_elf_check_relocs): Use got_entries to estimate
4959 local got size.
4960 (_bfd_mips_elf_size_dynamic_sections): Do not account for
4961 GOT_PAGE entries, since we now reuse GOT16 entries.
4962
4963 2002-12-10 Jason Thorpe <thorpej@wasabisystems.com>
4964
4965 * aoutx.h (set_section_contents): Allow an otherwise unrepresentable
4966 read-only section that lies after .text and before .data to be
4967 written into the output file and included in a_text.
4968 (translate_to_native_sym_flags): If an otherwise unrepresentable
4969 section was merged with .text, convert its symbols to N_TEXT
4970 symbols.
4971 * libaout.h (aout_section_merge_with_text_p): New macro.
4972
4973 2002-12-08 Alan Modra <amodra@bigpond.net.au>
4974
4975 * bfd-in.h: Comment typo fix. Formatting.
4976 * bfd-in2.h: Regenerate.
4977 * coff64-rs6000.c (xcoff64_openr_next_archived_file): Warning fix.
4978 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): Prototype.
4979 * elf64-mmix.c (mmix_dump_bpo_gregs): Warning fix.
4980
4981 2002-12-05 Richard Henderson <rth@redhat.com>
4982
4983 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21BI.
4984 Only send PCREL21B though the plt. Fix installed reloc type.
4985 (elfNN_ia64_relocate_section): Give error for dynamic reloc
4986 against PCREL22 or PCREL64I; clean up error messages for
4987 branch relocs.
4988
4989 2002-12-04 Kevin Buettner <kevinb@redhat.com>
4990
4991 * elf64-mips.c (elf64_mips_grok_prstatus, elf64_mips_grok_psinfo):
4992 New functions.
4993 (elf_backend_grok_prstatus, elf_backend_grok_psinfo): Define.
4994
4995 2002-12-04 David Mosberger <davidm@hpl.hp.com>
4996
4997 * cpu-ia64-opc.c: Add operand constant "ar.csd".
4998
4999 2002-12-04 H.J. Lu <hjl@gnu.org>
5000
5001 * elfxx-ia64.c (get_local_sym_hash): Use section ID instead of
5002 BFD address when constructing local name.
5003
5004 2002-12-04 Andreas Schwab <schwab@suse.de>
5005
5006 * elf32-m68k.c (struct elf_m68k_link_hash_table): Add sym_sec
5007 member.
5008 (elf_m68k_link_hash_table_create): Initialize it.
5009 (elf_m68k_check_relocs): Handle symbols that are forced to be
5010 local due to visibility changes.
5011 (elf_m68k_adjust_dynamic_symbol): Likewise.
5012 (elf_m68k_size_dynamic_sections): Likewise.
5013 (elf_m68k_discard_copies): Likewise.
5014 (elf_m68k_relocate_section): Likewise.
5015
5016 2002-12-04 Alan Modra <amodra@bigpond.net.au>
5017
5018 * elf64-ppc.c (ppc64_elf_edit_opd): Correct typo.
5019
5020 2002-12-04 Alan Modra <amodra@bigpond.net.au>
5021
5022 * srec.c (srec_write_symbols): Restore '$' prefix to address
5023 accidentally removed in 2002-04-04 change.
5024 (srec_get_symtab): Use 0 instead of `(long) FALSE'.
5025
5026 2002-12-03 Nick Clifton <nickc@redhat.com>
5027
5028 * elf32-ppc.c (apuinfo_list_init): New function.
5029 (apuinfo_list_add): New function: Add a value to the list.
5030 (apuinfo_list_length): New function: Return the number of
5031 values on the list.
5032 (apuinfo_list_element): New function: Return a value on the
5033 list.
5034 (apuinfo_list_finish): New function: Free the resources used
5035 by the list.
5036 (ppc_elf_begin_write_processing): New function. Scan the
5037 input bfds for apuinfo sections.
5038 (ppc_elf_write_section): New function: Delay the creation of
5039 the contents of an apuinfo section in an output bfd.
5040 (ppc_elf_final_write_processing): New function. Create the
5041 contents of an apuinfo section in an output bfd.
5042 (elf_backend_begin_write_processing): Define.
5043 (elf_backend_final_write_processing): Define.
5044 (elf_backend_write_section): Define.
5045
5046 2002-12-03 Richard Henderson <rth@redhat.com>
5047
5048 * cpu-ia64-opc.c (elf64_ia64_operands): Add ldxmov entry.
5049
5050 2002-12-01 Stephane Carrez <stcarrez@nerim.fr>
5051
5052 Fix PR savannah/1417:
5053 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Don't adjust
5054 branch if it goes to the start of the deleted region.
5055
5056 2002-12-01 Stephane Carrez <stcarrez@nerim.fr>
5057
5058 * bfd-in2.h (bfd_mach_m6812): Rebuild.
5059 * archures.c (bfd_mach_m6812_default, bfd_mach_m6812,
5060 bfd_mach_m6812s): Declare.
5061
5062 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): New function.
5063 (_bfd_m68hc12_elf_set_private_flags): Call it.
5064 (_bfd_m68hc12_elf_print_private_bfd_data): Report processor version.
5065 (_bfd_m68hc12_elf_merge_private_bfd_data): Merge the flags and
5066 report microcontroller incompatibilities (HC12 vs HCS12).
5067 (elf_backend_object_p): Update.
5068
5069 2002-11-30 Alan Modra <amodra@bigpond.net.au>
5070
5071 * bfd-in.h (TRUE_FALSE_ALREADY_DEFINED, BFD_TRUE_FALSE): Delete.
5072 (enum bfd_boolean, boolean): Delete.
5073 (bfd_boolean): Typedef to an int.
5074 (FALSE, TRUE): Define.
5075 * aix386-core.c, aix5ppc-core.c, aout-adobe.c, aout-arm.c, aout-cris.c,
5076 aout-encap.c, aout-ns32k.c, aout-target.h, aout-tic30.c, aoutf1.h,
5077 aoutx.h, archive.c, archive64.c, archures.c, bfd-in.h, bfd.c, bfdwin.c,
5078 binary.c, bout.c, cache.c, cisco-core.c, coff-a29k.c, coff-alpha.c,
5079 coff-apollo.c, coff-arm.c, coff-aux.c, coff-h8300.c, coff-h8500.c,
5080 coff-i386.c, coff-i860.c, coff-i960.c, coff-ia64.c, coff-m68k.c,
5081 coff-m88k.c, coff-mcore.c, coff-mips.c, coff-or32.c, coff-ppc.c,
5082 coff-rs6000.c, coff-sh.c, coff-sparc.c, coff-stgo32.c, coff-tic30.c,
5083 coff-tic4x.c, coff-tic54x.c, coff-tic80.c, coff-w65.c, coff-we32k.c,
5084 coff-z8k.c, coff64-rs6000.c, coffcode.h, coffgen.c, cofflink.c,
5085 corefile.c, cpu-a29k.c, cpu-alpha.c, cpu-arc.c, cpu-arm.c, cpu-avr.c,
5086 cpu-cris.c, cpu-d10v.c, cpu-d30v.c, cpu-dlx.c, cpu-fr30.c, cpu-frv.c,
5087 cpu-h8300.c, cpu-h8500.c, cpu-hppa.c, cpu-i370.c, cpu-i386.c,
5088 cpu-i860.c, cpu-i960.c, cpu-ia64.c, cpu-ip2k.c, cpu-m10200.c,
5089 cpu-m10300.c, cpu-m32r.c, cpu-m68hc11.c, cpu-m68hc12.c, cpu-m68k.c,
5090 cpu-m88k.c, cpu-mcore.c, cpu-mips.c, cpu-mmix.c, cpu-ns32k.c,
5091 cpu-openrisc.c, cpu-or32.c, cpu-pdp11.c, cpu-pj.c, cpu-powerpc.c,
5092 cpu-rs6000.c, cpu-s390.c, cpu-sh.c, cpu-sparc.c, cpu-tic30.c,
5093 cpu-tic4x.c, cpu-tic54x.c, cpu-tic80.c, cpu-v850.c, cpu-vax.c,
5094 cpu-w65.c, cpu-we32k.c, cpu-xstormy16.c, cpu-z8k.c, dwarf1.c,
5095 dwarf2.c, ecoff.c, ecofflink.c, efi-app-ia32.c, efi-app-ia64.c,
5096 elf-bfd.h, elf-eh-frame.c, elf-hppa.h, elf-m10200.c, elf-m10300.c,
5097 elf-strtab.c, elf.c, elf32-arc.c, elf32-arm.h, elf32-avr.c,
5098 elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c, elf32-fr30.c,
5099 elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c, elf32-hppa.h,
5100 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
5101 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
5102 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
5103 elf32-pj.c, elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-sh64-com.c,
5104 elf32-sh64.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
5105 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
5106 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-ppc.h, elf64-s390.c,
5107 elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c,
5108 elfarm-oabi.c, elfcode.h, elfcore.h, elflink.c, elflink.h,
5109 elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c, elfxx-mips.h,
5110 elfxx-target.h, format.c, freebsd.h, genlink.h, hash.c, hp300hpux.c,
5111 hppabsd-core.c, hpux-core.c, i386aout.c, i386linux.c, i386lynx.c,
5112 i386mach3.c, i386msdos.c, i386os9k.c, ieee.c, ihex.c, irix-core.c,
5113 libaout.h, libbfd-in.h, libbfd.c, libcoff-in.h, libecoff.h, libieee.h,
5114 libnlm.h, liboasys.h, libpei.h, libxcoff.h, linker.c, lynx-core.c,
5115 m68klinux.c, m68klynx.c, mach-o.c, mach-o.h, merge.c, mipsbsd.c,
5116 mmo.c, netbsd-core.c, netbsd.h, nlm.c, nlm32-alpha.c, nlm32-i386.c,
5117 nlm32-ppc.c, nlm32-sparc.c, nlmcode.h, oasys.c, opncls.c, osf-core.c,
5118 pc532-mach.c, pdp11.c, pe-arm.c, pe-i386.c, pe-mcore.c, pe-mips.c,
5119 pe-sh.c, peXXigen.c, pef.c, pei-arm.c, pei-i386.c, pei-mcore.c,
5120 pei-mips.c, pei-sh.c, peicode.h, ppcboot.c, ptrace-core.c, reloc.c,
5121 reloc16.c, riscix.c, rs6000-core.c, sco5-core.c, section.c, simple.c,
5122 som.c, som.h, sparclinux.c, sparclynx.c, srec.c, stabs.c, sunos.c,
5123 syms.c, targets.c, tekhex.c, ticoff.h, trad-core.c, versados.c,
5124 vms-gsd.c, vms-hdr.c, vms-misc.c, vms-tir.c, vms.c, vms.h,
5125 xcoff-target.h, xcofflink.c, xsym.c, xsym.h: Replace boolean with
5126 bfd_boolean, true with TRUE, false with FALSE. Simplify comparisons
5127 of bfd_boolean vars with TRUE/FALSE. Formatting.
5128 * bfd-in2.h, libbfd.h, libcoff.h: Regenerate
5129
5130 2002-11-28 Alan Modra <amodra@bigpond.net.au>
5131
5132 * elf-bfd.h: Replace occurrences of Elf32_Internal_* and
5133 Elf64_Internal_* with Elf_Internal_*. Replace Elf_Internal_Rel
5134 with Elf_Internal_Rela.
5135 * elf-hppa.h, elf-m10200.c, elf-m10300.c, elf32-arc.c, elf32-arm.h,
5136 elf32-avr.c, elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c,
5137 elf32-fr30.c, elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c,
5138 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
5139 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
5140 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
5141 elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-v850.c, elf32-vax.c,
5142 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
5143 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
5144 elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c, elfarm-oabi.c,
5145 elfcode.h, elflink.h, elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c: Ditto.
5146 * elf-hppa.h (elf_hppa_internal_shdr): Delete. Use Elf_Internal_Shdr
5147 throughout instead.
5148 * elf.c (_bfd_elf_no_info_to_howto_rel): Delete.
5149 * elfcode.h (elf_swap_reloca_in): Pass source operand as a bfd_byte *.
5150 Remove INLINE keyword.
5151 (elf_swap_reloc_in): Likewise. Also clear r_addend.
5152 (elf_swap_reloc_out, elf_swap_reloca_out): Pass destination operand
5153 as a bfd_byte *.
5154 (elf_write_relocs): Consolidate REL and RELA code.
5155 (elf_slurp_reloc_table_from_section): Simplify REL code.
5156 (NAME(_bfd_elf,size_info)): Populate reloc swap entries.
5157 * elf-bfd.h (MAX_INT_RELS_PER_EXT_REL): Define.
5158 * elflink.h (elf_link_read_relocs_from_section): Consolidate REL and
5159 RELA code.
5160 (elf_link_adjust_relocs): Likewise. Don't malloc space for temp
5161 reloc array, use a fixed size of MAX_INT_RELS_PER_EXT_REL.
5162 (elf_link_output_relocs): Likewise.
5163 (elf_reloc_link_order): Likewise.
5164 (elf_finish_pointer_linker_section): Likewise.
5165 (struct elf_link_sort_rela): Remove union.
5166 (elf_link_sort_cmp1): Update to suit.
5167 (elf_link_sort_cmp2): Here too.
5168 (elf_link_sort_relocs): Consolidate REL and RELA code. Fix memory
5169 over-allocation for int_rels_per_ext_rel != 1 case.
5170 * elf32-arm.h: Update all bfd_elf32_swap_reloc_out calls.
5171 * elf32-i386.c: Likewise.
5172 * elf32-cris.c: Likewise for bfd_elf32_swap_reloca_out.
5173 * elf32-hppa.c, elf32-i370.c, elf32-m68k.c, elf32-ppc.c, elf32-s390.c,
5174 elf32-sh.c, elf32-vax.c, elfxx-mips.c: Likewise.
5175 * elf64-alpha.c: Likewise for bfd_elf64_swap_reloca_out.
5176 * elf64-hppa.c, elf64-mips.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
5177 elf64-sparc.c, elf64-x86-64.c: Likewise.
5178 * elfxx-ia64.c: Likewise for bfd_elfNN_swap_reloca_out.
5179 * elfxx-mips.c (sort_dynamic_relocs): Likewise for
5180 bfd_elf32_swap_reloc_in.
5181
5182 * elf32-arm.h: Update elf32_arm_info_to_howto calls.
5183 * elf32-mips.c: Likewise for mips_info_to_howto_rel.
5184 (mips_elf64_swap_reloc_in): Zero r_addend.
5185 (mips_elf64_be_swap_reloc_in): Likewise.
5186 (mips_elf64_slurp_one_reloc_table): Simplify.
5187
5188 * elf64-alpha.c (alpha_elf_size_info): Populate reloc swap entries.
5189 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
5190 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
5191
5192 2002-11-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5193
5194 * elf32-sh.c (sh_elf_relocate_section): Don't complain about
5195 unresolved debugging relocs in dynamic applications.
5196 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
5197
5198 2002-11-26 Alan Modra <amodra@bigpond.net.au>
5199
5200 * elf-eh-frame.c (ENSURE_NO_RELOCS): Disregard R_*_NONE relocs.
5201 (_bfd_elf_discard_section_eh_frame): Don't discard duplicate CIEs
5202 on a relocatable link. Comment typos.
5203 * elf.c (_bfd_elf_link_hash_newfunc): Assign elements of structure
5204 in the order they are declared. Clear elf_hash_value too.
5205 (_bfd_elf_link_hash_table_init): Likewise assign in order. Clear
5206 eh_info and tls_segment.
5207 * elflink.h (elf_link_input_bfd <emit_relocs>): Keep reloc offsets
5208 sorted when discarding relocs by turning them into R_*_NONE.
5209
5210 * libbfd.c (warn_deprecated): Comment spelling.
5211 * po/SRC-POTFILES.in: Regenerate.
5212
5213 2002-11-21 Richard Henderson <rth@redhat.com>
5214
5215 * elflink.h (elf_link_add_object_symbols): Don't overwrite the
5216 arch's st_other bits when merging visibilities.
5217 (elf_link_output_extsym): Tidy clearing of visibility field.
5218
5219 2002-11-21 Alan Modra <amodra@bigpond.net.au>
5220
5221 * coff-mcore.c (SWAP_IN_RELOC_OFFSET): Define.
5222 (SWAP_OUT_RELOC_OFFSET): Define.
5223
5224 2002-11-20 Alexandre Oliva <aoliva@redhat.com>
5225
5226 * elf.c (_bfd_elf_link_hash_table_init): Make sure
5227 can_refcount is properly extended to the type of
5228 init_refcount.
5229
5230 2002-11-19 Alexandre Oliva <aoliva@redhat.com>
5231
5232 * elfxx-mips.c (MIPS_RELOC_RELA_P): New macro.
5233 (_bfd_mips_elf_relocate_section): Use it.
5234
5235 * elfxx-mips.c (MNAME): New macro.
5236 (_bfd_mips_elf_check_relocs): Use it.
5237 (_bfd_mips_elf_discard_info): Likewise.
5238 (_bfd_mips_elf_final_link): Likewise.
5239
5240 2002-11-19 Alan Modra <amodra@bigpond.net.au>
5241
5242 * elf64-ppc.c (ppc64_elf_edit_opd): When deleting relocs, adjust
5243 rel_hdr.sh_size too.
5244
5245 2002-11-18 Klee Dienes <kdienes@apple.com>
5246
5247 * Makefile.am (BFD32_LIBS): Add bfdwin.lo, bfdio.lo.
5248 (BFD32_LIBS_CFILES): Add bfdwin.c, bfdio.c.
5249 (BFD_H_FILES): Add bfdwin.c, bfdio.c.
5250 (LIBBFD_H_FILES): Add bfdwin.c, bfdio.c.
5251 Add dependencies for bfdwin.c, bfdio.c.
5252 * bfd.c: Remove bfd_get_mtime, bfd_get_size.
5253 * libbfd.c: Remove real_read, bfd_bread, _bfd_window_internal,
5254 bfd_init_window, bfd_free_window, bfd_get_file_window, bfd_bwrite,
5255 bfd_tell, bfd_flush, bfd_stat, bfd_seek.
5256 * bfdio.c: New file. Contains real_read, bfd_bread, bfd_write,
5257 bfd_tell, bfd_flush, bfd_stat, bfd_seek, bfd_ge_mtime,
5258 bfd_get_size (moved from libbfd.c and bfd.c).
5259 * bfdwin.c New file. Contains _bfd_window_internal,
5260 bfd_init_window, bfd_free_window, bfd_get_file_window (moved from
5261 libbfd.c and bfd.c).
5262 * po/SRC-POTFILES.in: Regenerate.
5263 * po/bfd.pot: Regenerate.
5264 * libbfd.h: Regenerate.
5265 * bfd-in2.h: Regenerate.
5266 * aclocal.m4: Regenerate.
5267 * Makefile.in: Regenerate.
5268 * configure: Regenerate.
5269
5270 2002-11-18 Klee Dienes <kdienes@apple.com>
5271
5272 * bfd.c (bfd_preserve_save): Don't zero BFD_IN_MEMORY.
5273
5274 2002-11-15 Kazu Hirata <kazu@cs.umass.edu>
5275
5276 * coff-h8300.c (h8300_reloc16_estimate): Do not optimize away
5277 jsr after a short jump.
5278 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
5279
5280 2002-11-15 Klee Dienes <kdienes@apple.com>
5281
5282 * pef.c (bfd_pef_convert_architecture): Move declaration of
5283 ARCH_POWERPC and ARCH_M68K to the start of the function.
5284
5285 2002-11-14 Svein E. Seldal <Svein.Seldal@solidas.com>
5286
5287 * coff-tic4x.c (tic4x_howto_table): Formatting fixup
5288
5289 2002-11-14 Hans-Peter Nilsson <hp@bitrange.com>
5290
5291 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs):
5292 For bpo_gregs_section->contents, allocate _raw_size, not
5293 _cooked_size.
5294
5295 2002-11-13 Klee Dienes <kdienes@apple.com>
5296
5297 * config.bfd: Add entries for powerpc-*-darwin and cousins.
5298
5299 2002-11-13 H.J. Lu <hjl@gnu.org>
5300
5301 * elfcode.h (elf_object_p): Don't restore abfd->arch_info.
5302
5303 2002-11-13 Klee Dienes <kdienes@apple.com>
5304 Alan Modra <amodra@bigpond.net.au>
5305
5306 * bfd.c (struct bfd_preserve): New.
5307 (bfd_preserve_save): New function.
5308 (bfd_preserve_restore): Ditto.
5309 (bfd_preserve_finish): Ditto.
5310 * bfd-in2.h: Regenerate.
5311 * mach-o.c: Formatting.
5312 (bfd_mach_o_scan_read_symtab_symbol): Make "value" unsigned.
5313 (bfd_mach_o_object_p): Use bfd_preserve_save/restore/finish.
5314 (bfd_mach_o_core_p): Ditto.
5315 (bfd_mach_o_scan): Pass in mdata.
5316 * mach-o.h (bfd_mach_o_scan): Update prototype.
5317 * pef.c: Formatting.
5318 (bfd_pef_object_p): Use bfd_preserve_save/restore/finish.
5319 (bfd_pef_xlib_object_p): Ditto.
5320 (bfd_pef_scan): Pass in mdata. Move version check to bfd_pef_object_p.
5321 * pef.h (bfd_pef_scan): Update prototype.
5322 * xsym.c: Formatting, K&R fixes.
5323 (bfd_sym_object_p): Use bfd_preserve_save/restore/finish.
5324 (bfd_sym_scan): New function split out from bfd_sym_object_p.
5325 * xsym.h (bfd_sym_scan): Declare.
5326 * elfcode.h (elf_object_p): Use bfd_preserve_save/restore/finish.
5327 * elfcore.h (elf_core_file_p): Likewise.
5328 * targets.c (_bfd_target_vector): Revert 2002-11-08 change.
5329
5330 2002-11-12 Nick Clifton <nickc@redhat.com>
5331
5332 * po/da.po: Updated Danish translation.
5333
5334 2002-11-12 Alan Modra <amodra@bigpond.net.au>
5335
5336 * elflink.h (elf_link_add_object_symbols): Optimize stabs for
5337 relocatable link too.
5338 (elf_link_input_bfd): When emitting relocs, adjust offsets for
5339 eh_frame and stab sections. Zap deleted relocs.
5340 (elf_reloc_symbol_deleted_p): Return true for zero r_symndx.
5341 (elf_bfd_discard_info): Run for relocatable link too.
5342 * elf64-ppc.c (ppc64_elf_edit_opd): Rename from edit_opd. Make global.
5343 Handle ld -r case.
5344 (ppc64_elf_size_dynamic_sections): Don't call edit_opd from here.
5345 * elf64-ppc.h (ppc64_elf_edit_opd): Declare.
5346
5347 * elf-bfd.h (struct cie_header): Move from elf_eh-frame.c.
5348 (struct cie, struct eh_cie_fde, struct eh_frame_sec_info): Likewise.
5349 (struct eh_frame_array_ent, struct eh_frame_hdr_info): Likewise.
5350 (enum elf_link_info_type): Remove ELF_INFO_TYPE_EH_FRAME_HDR.
5351 (struct eh_frame_hdr_info): Add "hdr_sec", remove "split".
5352 (struct elf_link_hash_table): Add eh_info.
5353 (struct elf_obj_tdata): Change eh_frame_hdr to an asection *.
5354 (_bfd_elf_discard_section_eh_frame): Update prototype.
5355 (_bfd_elf_discard_section_eh_frame_hdr): Likewise.
5356 (_bfd_elf_write_section_eh_frame): Likewise.
5357 (_bfd_elf_write_section_eh_frame_hdr): Likewise.
5358 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Remove "ehdrsec"
5359 param. Get "hdr_info" from link hash table.
5360 (_bfd_elf_discard_section_eh_frame_hdr): Remove "sec" param. Get
5361 header section from link hash table. Save header section to elf_tdata.
5362 (_bfd_elf_maybe_strip_eh_frame_hdr): Remove local "sec". Use
5363 header section from link hash table. Don't alloc hdr_info. Clear
5364 hdr_sec instead of setting "strip".
5365 (_bfd_elf_eh_frame_section_offset): Formatting.
5366 (_bfd_elf_write_section_eh_frame): Remove "ehdrsec", add "info" param.
5367 Get header section from link hash table.
5368 (_bfd_elf_write_section_eh_frame_hdr): Remove "sec", add "info" param.
5369 Get header section from link hash table.
5370 * elf.c (map_sections_to_segments): Use cached eh_frame_hdr.
5371 (get_program_header_size): Likewise.
5372 (_bfd_elf_section_offset): Formatting.
5373 * elflink.h (elf_link_create_dynamic_sections): Stash eh frame header
5374 section pointer in link hash table.
5375 (elf_bfd_final_link): Adjust _bfd_elf_write_section_eh_frame_hdr
5376 and _bfd_elf_write_section_eh_frame calls. Update comment about
5377 eh_frame entries.
5378 (elf_bfd_discard_info): Adjust _bfd_elf_discard_section_eh_frame and
5379 _bfd_elf_discard_section_eh_frame_hdr calls. Remove "ehdr".
5380
5381 * po/SRC-POTFILES.in: Regenerate.
5382
5383 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't zero
5384 relocs for discarded FDEs. Remove dead code.
5385 (_bfd_elf_write_section_eh_frame_hdr): Remove dead code.
5386 * elflink.h (elf_bfd_discard_info): Don't save edited relocs.
5387 Tidy conditions under which stabs are edited. Formatting.
5388 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
5389 from discarded relocs.
5390 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Add reloc output
5391 section adjustments after testing magic values.
5392
5393 2002-11-12 Thomas Moestl <tmm@FreeBSD.org>
5394
5395 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Correct
5396 references to large plt symbols.
5397
5398 2002-11-12 Klee Dienes <kdienes@apple.com>
5399
5400 * mach-o.c (bfd_mach_o_scan_read_thread): Don't re-use 'i' when
5401 looking for an unused section name.
5402
5403 2002-11-11 Kazu Hirata <kazu@cs.umass.edu>
5404
5405 * coff-h8300.c: Fix formatting.
5406 * elf32-h8300.c: Likewise.
5407 * reloc16.c: Likewise.
5408
5409 2002-11-09 Jeroen Dobbelaere <jeroen.dobbelaere@acunia.com>
5410
5411 * elf32-arm.h (elf32_arm_size_dynamic_sections): Don't strip output
5412 section when dynamic section unused; _bfd_strip_section_from_output
5413 instead.
5414
5415 2002-11-08 Alan Modra <amodra@bigpond.net.au>
5416
5417 * targets.c (_bfd_target_vector): Disable pef_vec, pef_xlib_vec
5418 and sym_vec.
5419
5420 * dwarf2.c: Revert last change.
5421
5422 2002-11-07 Michal Ludvig <mludvig@suse.cz>
5423
5424 * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
5425 _bfd_dwarf2_find_nearest_line): Use
5426 bfd_simple_get_relocated_section_contents() instead of
5427 bfd_get_section_contents().
5428 * reloc.c (bfd_perform_relocation): Add sanity check.
5429 * simple.c (simple_get_relocated_section_contents): If the section
5430 does not have any relocs associated with it, just return the
5431 unadjusted contents.
5432
5433 2002-11-07 Hans-Peter Nilsson <hp@axis.com>
5434
5435 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOT,
5436 case R_CRIS_32_GOT>: Correct test for filling in constant .got
5437 contents, enabling for a non-DSO, for symbols defined in the
5438 program with --export-dynamic.
5439
5440 2002-11-07 Alan Modra <amodra@bigpond.net.au>
5441
5442 * elf64-ppc.c: Comment typo fixes.
5443 (ppc64_elf_merge_private_bfd_data): Allow BFD_ENDIAN_UNKNOWN input.
5444
5445 2002-11-07 Nick Clifton <nickc@redhat.com>
5446
5447 * po/da.po: Updated Danish translation.
5448
5449 2002-11-06 Alexandre Oliva <aoliva@redhat.com>
5450
5451 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Generate
5452 exactly three internal relocs per external reloc. Set reloc_count
5453 to the external reloc count.
5454
5455 2002-11-06 Klee Dienes <kdienes@apple.com>
5456
5457 * coff-stgo32.c (stub_bytes): Mark as const.
5458 Fix comment formatting.
5459
5460 2002-11-06 Klee Dienes <kdienes@apple.com>
5461
5462 * Makefile.am (BFD32_BACKENDS): Add mach-o.lo, pef.lo, and
5463 xsym.lo.
5464 (BFD32_BACKENDS_CFILES): Add mach-o.c, pef.c, and xsym.c.
5465 (SOURCE_HFILES): Add mach-o.h, pef.h, pef-traceback.h, xsym.h
5466 * archures.c (enum bfd_architecture): Add bfd_arch_m98k.
5467 * bfd.c (struct bfd): Add private data for mach-o, pef, and sym.
5468 * targets.c (enum bfd_flavour): Add flavours for mach-o, pef, and
5469 sym.
5470 (_bfd_target_vector): Add target vectors for mach-o, pef, and sym.
5471 * Makefile.in: Regenerate.
5472 * doc/Makefile.in: Regenerate.
5473 * bfd-in2.h: Regenerate.
5474 * xsym.c: New file. Contains support for the Apple/Metrowerks
5475 xSYM debugging format.
5476 * xsym.h: New file.
5477 * pef.c: New file. Contains support for the Apple Code Fragment
5478 Manager Preferred Executable Format
5479 * pef.h: New file.
5480 * pef-traceback.h: New file. Contains support for parsing PowerPC
5481 traceback tables as used by PEF executables (and perhaps other
5482 systems as well).
5483 * mach-o.c: New file. Contains support for the Mach-O object file
5484 format.
5485 * mach-o.h: New file.
5486 * mach-o-target.c: New file. Declares the mach-o targets
5487 themselves. Included three times by mach-o.c; each time with a
5488 different set of macros set.
5489
5490 2002-11-06 Graeme Peterson <gp@qnx.com>
5491
5492 * Makefile.am: Remove entries for elf32-qnx.[ch].
5493 * Makefile.in: Regenerate.
5494 * config.bfd: Change arm-nto to use bfd_elf32_{big|little}arm_vec,
5495 ppc-nto to use bfd_elf32_powerpc{le}_vec, sh-nto to use
5496 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
5497 * configure.in: Remove support for bfd_elf32_sh{l}qnx_vec,
5498 bfd_elf32_powerpc{le}qnx_vec, bfd_elf32_{big|little}armqnx_vec,
5499 and bfd_elf32_i386qnx_vec, and removed elf32-qnx.lo from other targets.
5500 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
5501 * configure: Regenerate.
5502 * elf32-qnx.c: Remove.
5503 * elf32-qnx.h: Remove.
5504 * elf.c: Remove calls to QNX specific set_nonloadable_filepos,
5505 is_contained_by_filepos, and copy_private_bfd_data_p.
5506 * elf-bfd.h (struct elf_backend_data): Remove set_nonloadable_filepos,
5507 is_contained_by_filepos, and copy_private_bfd_data_p.
5508 * elf32-i386.c: Remove QNX extended bfd support.
5509 * elf32-ppc.c: Remove QNX extended bfd support.
5510 * elf32-sh.c: Remove QNX extended bfd support.
5511 * elfarm-nabi.c: Remove QNX extended bfd support.
5512 * targets.c: Remove qnx vectors.
5513 * elfxx-target.h (elf_backend_set_nonloadable_filepos): Remove
5514 (elf_backend_is_contained_by_filepos): Remove.
5515 (elf_backend_copy_private_bfd_data_p): Remove.
5516 * po/SRC-POTFILES.in: Regenerate.
5517
5518 2002-11-06 David O'Brien <obrien@FreeBSD.org>
5519 Alan Modra <amodra@bigpond.net.au>
5520
5521 * elf64-sparc.c (sparc64_elf_relocate_section): Adjust addend of
5522 dynamic relocs against section symbols for the output section vma.
5523
5524 2002-11-05 Alan Modra <amodra@bigpond.net.au>
5525
5526 * elf32-arm.h (t2a1_push_insn, t2a2_ldr_insn, t2a3_mov_insn,
5527 t2a4_bx_insn, t2a5_pop_insn, t2a6_bx_insn): Remove.
5528
5529 2002-11-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5530 Alan Modra <amodra@bigpond.net.au>
5531
5532 * config.bfd (sh-*-linux*): Use bfd_elf*_sh64*lin_vec as sh64
5533 vectors in target_selvecs.
5534 (shle-*-netbsdelf*): Use bfd_elf*_sh64*nbsd_vec as sh64 vectors
5535 in target_selvecs.
5536 (sh-*-netbsdelf*): Likewise.
5537 * configure.in (assocvecs): New variable. Handle assocvecs like
5538 selvecs.
5539 * configure: Regenerate.
5540 * format.c (bfd_check_format_matches): Store bfd_target pointers
5541 in matching_vector instead of target names. Select first target
5542 from bfd_associated_vector that matches a list of ambiguous targets.
5543 * targets.c (_bfd_associated_vector): New array.
5544 (bfd_associated_vector): New variable.
5545 (_bfd_target_vector): Add bfd_elf*_sh64*lin_vec.
5546 * libbfd-in.h (bfd_associated_vector): Declare.
5547 * libbfd.h: Regenerate.
5548
5549 2002-11-05 Elias Athanasopoulos <eathan@otenet.gr>
5550
5551 * vms-gsd.c (_bfd_vms_write_gsd): Check that symbol->udata.p is
5552 non-NULL before dereferencing.
5553
5554 2002-11-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5555
5556 * vms.c (vms_object_p): Restore the start address when returning
5557 NULL.
5558
5559 2002-11-04 Alan Modra <amodra@bigpond.net.au>
5560 Hans-Peter Nilsson <hp@axis.com>
5561
5562 * elflink.h (struct elf_final_link_info): Add shndxbuf_size.
5563 (elf_bfd_final_link): Don't bother zeroing symtab_hdr fields.
5564 Set up a larger symshndxbuf, and write it out. Free it on
5565 exit rather than freeing symbuf twice. Correct section index
5566 on output section symbol loop.
5567 (elf_link_output_sym): Accumulate symbol extension section
5568 indices, reallocating symshndxbuf rather than writing it out.
5569 (elf_link_flush_output_syms): Don't flush symshndxbuf.
5570 * elf.c (assign_section_numbers): Init i_shdrp to all zero.
5571 Use bfd_zalloc to clear i_shdrp[0] too.
5572
5573 2002-11-03 Stephen Clarke <stephen.clarke@earthling.net>
5574
5575 * elf32-sh64-com.c (sh64_address_in_cranges): Use
5576 _raw_size of cranges section if _cooked_size not yet set.
5577
5578 2002-11-03 Hans-Peter Nilsson <hp@axis.com>
5579
5580 * elf32-v850.c (v850_elf_relax_delete_bytes): Correct parameters
5581 for bfd_elf32_swap_symbol_out.
5582
5583 2002-10-31 David O'Brien <obrien@FreeBSD.org>
5584
5585 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't mix
5586 signed and unsigned in comparison.
5587
5588 2002-10-30 Daniel Jacobowitz <drow@mvista.com>
5589
5590 * coffcode.h: Remove extraneous '\'.
5591
5592 2002-10-28 H.J. Lu <hjl@gnu.org>
5593
5594 * Makefile.am (targets.lo): Depend on Makefile instead of
5595 config.status.
5596 (archures.lo): Likewise.
5597 * Makefile.in: Regenerated.
5598
5599 2002-10-25 Jason Thorpe <thorpej@wasabisystems.com>
5600
5601 * config.bfd (mips*el-*-netbsd*, mips*-*-netbsd*): Add
5602 bfd_elf64_bigmips_vec and bfd_elf64_littlemips_vec to
5603 targ_selvecs.
5604
5605 2002-10-25 Jim Wilson <wilson@redhat.com>
5606
5607 * elf64-sh64.c (sh_elf64_relocate_section): Call
5608 _bfd_elf_rela_local_sym. Handle relocs against STT_SECTION symbol
5609 of SHF_MERGE section.
5610
5611 2002-10-25 Hans-Peter Nilsson <hp@axis.com>
5612
5613 * simple.c: Correct placement of ATTRIBUTE_UNUSED.
5614
5615 2002-10-24 John David Anglin <dave@hiauly1.hia.nrc.ca>
5616
5617 * aoutx.h (NAME(aout,swap_ext_reloc_in)): Cast bytes->r_index to
5618 unsigned int. Cast RELOC_BASE10, RELOC_BASE13 and RELOC_BASE22 to
5619 unsigned int.
5620 (NAME(aout,final_link)): Cast enum used in assignment.
5621 (aout_link_write_symbols): Cast enums in comparisons, int values to
5622 boolean, enums in assignments to int.
5623 (aout_link_input_section_std): Cast rel->r_index to unsigned int.
5624 (aout_link_input_section_ext): Likewise. Cast enums used in
5625 comparisons with unsigned ints.
5626 (aout_link_reloc_link_order): Cast enum to int in assignment.
5627 * archive.c (_bfd_generic_read_ar_hdr_mag): Cast result of memchr
5628 calls to char *.
5629 * bfd-in.h (bfd_set_section_vma): Cast enum true to unsigned int in
5630 assignment.
5631 * bfd-in2.h (bfd_set_section_vma): Likewise.
5632 * bfd.c (bfd_record_phdr): Cast enums in assignments.
5633 * binary.c (bfd_alloc): Cast enum to long.
5634 * coffgen.c (_bfd_coff_is_local_label_name): Cast return to boolean.
5635 * dwarf2.c (read_abbrevs): Add casts to enum types.
5636 (read_attribute_value): Likewise.
5637 (arange_add): Cast result of bfd_zalloc call.
5638 (comp_unit_contains_address): Return true and false.
5639 (comp_unit_find_nearest_line): Cast return to boolean.
5640 * format.c (bfd_check_format_matches, bfd_set_format): Likewise.
5641 * gen-aout.c: define macro '_' if not defined.
5642 * libbfd.c (bfd_realloc): Cast malloc and realloc to PTR.
5643 (bfd_bwrite): Cast bfd_realloc to bfd_byte *.
5644 (bfd_write_bigendian_4byte_int): Cast return to boolean.
5645 (bfd_seek): Cast bfd_realloc to bfd_byte *.
5646 (bfd_generic_is_local_label_name): Cast return to boolean.
5647 * libcoff.h (_bfd_coff_adjust_symndx): Remove extraneous '\'.
5648 * linker.c (_bfd_link_hash_newfunc): Cast bfd_hash_allocate result to
5649 struct bfd_hash_entry *.
5650 (_bfd_generic_link_hash_newfunc): likewise.
5651 (_bfd_generic_final_link): Cast enum to unsigned int.
5652 * merge.c (sec_merge_emit): Cast return to boolean.
5653 (merge_strings): Add casts to const unsigned char *.
5654 * reloc.c (bfd_get_reloc_code_name): Cast enums in comparison to int.
5655 (bfd_generic_get_relocated_section_content): Cast enum to unsigned int.
5656 * section.c (bfd_section_hash_newfunc): Cast bfd_hash_allocate result
5657 to struct bfd_hash_entry *.
5658 (bfd_set_section_content): Add cast to PTR in comparison.
5659 * simple.c (simple_dummy_warning, simple_dummy_undefined_symbol,
5660 simple_dummy_reloc_overflow, simple_dummy_reloc_dangerous,
5661 simple_dummy_unattached_reloc,
5662 bfd_simple_get_relocated_section_contents): Add K&R declarations and
5663 function definitions.
5664 * srec.c (S3Forced): Initialize to false.
5665 (srec_get_symtab): Cast return value from bfd_alloc to asymbol *.
5666 * stabs.c (_bfd_link_section_stabs): Cast enum to int in comparisons.
5667 (_bfd_discard_section_stabs): Likewise. Also cast return to boolean.
5668 * syms.c (bfd_is_undefined_symclass): Cast return to boolean.
5669 (_bfd_stab_section_find_nearest_line): Cast enum to bfd_byte in
5670 comparisons.
5671
5672 2002-10-23 Jakub Jelinek <jakub@redhat.com>
5673
5674 * elf64-alpha.c (elf64_alpha_check_relocs): Only put maybe_dynamic
5675 relocs into shared lib non-allocated reloc sections.
5676
5677 2002-10-23 Nathan Tallent <eraxxon@alumni.rice.edu>
5678
5679 * dwarf2.c (add_line_info): Ensure that the line_info_table is
5680 sorted even when given an out-of-order line sequence.
5681 (lookup_address_in_line_info_table): When an exact VMA match is
5682 not found, return line information with the closest VMA.
5683
5684 2002-10-23 Ross Alexander <ross.alexander@uk.neceur.com>
5685
5686 * elf64-hppa.c: Force DT_FLAGS to always be set. Required by
5687 HPUX 11.00 patch PHSS_26559.
5688
5689 2002-10-22 Alexandre Oliva <aoliva@redhat.com>
5690
5691 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Don't move
5692 the options section into a separate section unless IRIX 6
5693 compatibility is enabled.
5694
5695 2002-10-22 Alexandre Oliva <aoliva@redhat.com>
5696
5697 * elflink.h (struct elf_link_sort_rela): Turn rel and rela
5698 into arrays.
5699 (elf_link_sort_cmp1, elf_link_sort_cmp2): Adjust.
5700 (elf_link_sort_relocs): Likewise. Take int_rels_per_ext_rel
5701 into account.
5702 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Compose
5703 R_MIPS_REL32 with R_MIPS64 if ABI_64_P.
5704
5705 2002-10-21 Graeme Peterson <gp@qnx.com>
5706
5707 * targets.c (_bfd_target_vector): Add missing qnx vectors.
5708
5709 2002-10-21 Alan Modra <amodra@bigpond.net.au>
5710
5711 * targets.c (bfd_target_list): Don't return the default target twice.
5712
5713 2002-10-21 Elias Athanasopoulos <eathan@otenet.gr>
5714
5715 * archive.c (_bfd_archive_bsd_update_armap_timestamp): Replace
5716 perror with bfd_perror.
5717
5718 2002-10-19 H.J. Lu <hjl@gnu.org>
5719
5720 * elflink.h (elf_link_add_object_symbols): Correctly handle
5721 DT_RPATH and DT_RUNPATH.
5722
5723 2002-10-19 Mark Kettenis <kettenis@gnu.org>
5724
5725 * elf.c (elfcore_grok_note): Fix recognition on NT_PRXFPREG notes.
5726
5727 2002-10-17 Denis Chertykov <denisc@overta.ru>
5728
5729 * elf32-ip2k.c (ELF_MACHINE_ALT1): Define alternate machine code
5730 for ip2k port.
5731
5732 2002-10-17 Alan Modra <amodra@bigpond.net.au>
5733
5734 * elfxx-target.h (USE_REL): Don't define as 1.
5735 * elf32-arm.h (USE_REL): Provide a default define of 0.
5736 Use #if rather than #ifdef when testing USE_REL.
5737 * elf32-m32r.c: Likewise.
5738
5739 * elf32-arc.c (USE_REL): Define as 1.
5740 * elf32-d10v.c (USE_REL): Likewise.
5741 * elf32-m32r.c (USE_REL): Likewise.
5742 * elf32-m68hc11.c (USE_REL): Likewise.
5743 * elf32-m68hc12.c (USE_REL): Likewise.
5744 * elf32-or32.c (USE_REL): Likewise.
5745 * elfarm-nabi.c (USE_REL): Likewise.
5746
5747 2002-10-16 Jakub Jelinek <jakub@redhat.com>
5748
5749 * config.bfd (s390-*-linux*): Add targ64_selvecs.
5750 (s390x-*-linux*): Add targ_selvecs.
5751
5752 2002-10-16 Alan Modra <amodra@bigpond.net.au>
5753
5754 * Makefile.am (BFD32_BACKENDS): Remove elfarmqnx-nabi.lo,
5755 elf32-i386-fbsd.lo, elf32-i386qnx.lo, elf32-ppcqnx.lo,
5756 elf32-sh-lin.lo, elf32-sh64-lin.lo, elf32-sh-nbsd.lo,
5757 elf32-sh64-nbsd.lo, elf32-shqnx.lo. Add elf32-qnx.lo.
5758 (BFD32_BACKENDS_CFILES): Likewise for corresponding C files.
5759 (BFD64_BACKENDS): Remove elf64-sh64-lin.lo, elf64-sh64-nbsd.lo.
5760 (BFD64_BACKENDS_CFILES): Likewise for corresponding C files.
5761 (SOURCE_HFILES): Add elf32-qnx.h.
5762 (BUILD_HFILES): Add bfdver.h.
5763 Run "make dep-am".
5764 * Makefile.in: Regenerate.
5765 * configure.in Update bfd vector dependencies.
5766 * configure: Regenerate.
5767 * elf32-i386-fbsd.c: Delete. Move code to elf32-i386.c.
5768 * elf32-i386qnx.c: Likewise.
5769 * elf32-ppcqnx.c: Delete. Move code to elf32-ppc.c.
5770 * elf32-sh-nbsd.c: Delete. Move code to elf32-sh.c.
5771 * elf32-sh-lin.c: Likewise.
5772 * elf32-shqnx.c: Likewise.
5773 * elf32-sh64-lin.c: Delete. Move code to elf32-sh64.c.
5774 * elf32-sh64-nbsd.c: Likewise.
5775 * elf64-sh64-lin.c: Delete. Move code to elf64-sh64.c.
5776 * elf64-sh64-nbsd.c: Likewise.
5777 * elfarmqnx-nabi.c: Delete. Move code to elfarm-nabi.c.
5778 * elf32-arm.h (ELF_MAXPAGESIZE): Always define.
5779 * elf32-i386.c: Remove ELF_ARCH and ELF32_I386_C_INCLUDED tests.
5780 * elf32-ppc.c: Remove ELF32_PPC_C_INCLUDED tests.
5781 * elf32-qnx.h (elf_backend_set_nonloadable_filepos): Always define.
5782 (elf_backend_is_contained_by_filepos): Likewise.
5783 (elf_backend_copy_private_bfd_data_p): Likewise.
5784 Globalize and move functions to..
5785 * elf32-qnx.c: ..here. New file.
5786 * elf32-sh.c: Remove ELF_ARCH and ELF32_SH_C_INCLUDED tests. Don't
5787 emit target vectors when INCLUDE_SHMEDIA.
5788 * elf32-sh64.c: Remove ELF_ARCH test. Move TARGET_* etc. defines to
5789 end of file.
5790 * elf64-sh64.c: Remove ELF_ARCH test.
5791 * elfarm-nabi.c: Remove ELFARM_NABI_C_INCLUDED test.
5792 * po/BLD-POTFILES.in: Regenerate.
5793 * po/SRC-POTFILES.in: Regenerate.
5794
5795 2002-10-16 Alan Modra <amodra@bigpond.net.au>
5796
5797 * elflink.h (elf_link_add_object_symbols): Error out on dynamic objects
5798 loaded with --just-symbols.
5799
5800 * elf32-i386qnx.c (TARGET_LITTLE_NAME): Define.
5801 * elf32-ppcqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
5802 * elf32-shqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
5803 * elfarmqnx-nabi.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
5804
5805 2002-10-15 Richard Henderson <rth@redhat.com>
5806
5807 * Makefile.am (BFD64_BACKENDS): Remove elf64-alpha-fbsd.
5808 (BFD64_BACKENDS_CFILES): Likewise.
5809 * configure.in (bfd_elf64_alpha_freebsd_vec): Use elf64-alpha.
5810 * elf64-alpha-fbsd.c: Remove file, move code ...
5811 * elf64-alpha.c: ... here.
5812 * Makefile.in, configure: Rebuild.
5813
5814 2002-10-14 Richard Henderson <rth@redhat.com>
5815
5816 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: Increment
5817 VALUE, not ADDEND.
5818
5819 2002-10-14 Stephen Clarke <stephen.clarke@superh.com>
5820
5821 * elf32-sh.c (elf_sh_link_hash_entry): Replace
5822 datalabel_got_offset with union of datalabel_got
5823 offset and refcount.
5824 (sh_elf_link_hash_newfunc): Initialize datalabel_got.refcount.
5825 (allocate_dynrelocs): Delete unnecessary code for
5826 STT_DATALABEL type. Create entry in got for
5827 datalabel version of symbol if datalabel_got.refcount > 0.
5828 (sh_elf_relocate_section): Use datalabel_got union.
5829 (sh_elf_gc_sweep_hook): Pull common code to initialize
5830 h and eh out of switch statement. Declare seen_stt_datalabel.
5831 Initialize it. Decrement datalabel_got.refcount for
5832 got relocs when seen_stt_datalabel is true.
5833 Decrement local_got_refcounts entry for datalabel got relocs
5834 of local symbols.
5835 (sh_elf_copy_indirect_symbol): Copy datalabel_got field over.
5836 (sh_elf_check_relocs): Declare seen_stt_datalabel.
5837 Initialize it. When seen_stt_datalabel is true, increment
5838 datalabel_got refcount rather than got.refcount.
5839 (sh_elf_finish_dynamic_symbol): Create relocs to
5840 initialize got entry for datalabel version of symbol.
5841
5842 2002-10-14 Alan Modra <amodra@bigpond.net.au>
5843
5844 * Makefile.am: Run "make dep-am".
5845 (BFD_H_FILES): Remove version.h.
5846 * bfd-in.h (BFD_VERSION, BFD_VERSION_DATE, BFD_VERSION_STRING): Move..
5847 * version.h: ..to here.
5848 * configure.in (bfd_version_date): Remove.
5849 (AC_OUTPUT): Make bfdver.h from version.h.
5850 * bfd.c: #include "bfdver.h".
5851 * vms-hdr.c: Likewise.
5852 * Makefile.in: Regenerate.
5853 * bfd-in2.h: Regenerate.
5854 * configure: Regenerate.
5855 * po/SRC-POTFILES.in: Regenerate.
5856
5857 2002-10-14 Alan Modra <amodra@bigpond.net.au>
5858
5859 * archures.c (bfd_mach_i386_i386, bfd_mach_i386_i8086,
5860 bfd_mach_i386_i386_intel_syntax, bfd_mach_x86_64,
5861 bfd_mach_x86_64_intel_syntax bfd_mach_ppc, bfd_mach_ppc64,
5862 bfd_mach_rs6k, bfd_mach_d10v, bfd_mach_sh, bfd_mach_v850,
5863 bfd_mach_arc_5, bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8,
5864 bfd_mach_m32r, bfd_mach_frv, bfd_mach_frvsimple,
5865 bfd_mach_ia64_elf64, bfd_mach_ia64_elf32,
5866 bfd_mach_ip2022, bfd_mach_ip2022ext,
5867 bfd_mach_s390_31, bfd_mach_s390_64, bfd_mach_xstormy16): Renumber.
5868 * bfd-in2.h: Regenerate.
5869
5870 2002-10-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5871
5872 * config.bfd (sh*eb-*-linux*, sh*-*-linux*): Add the alternative
5873 endian vector to targ_selvecs.
5874
5875 2002-10-13 Alexandre Oliva <aoliva@redhat.com>
5876
5877 * elfxx-mips.c (mips_elf_calculate_relocation): Take
5878 save_addend argument. Don't apply the 32-bit mask to a
5879 GPREL32 value if it's to be used in another relocation. Don't
5880 use forced-check computation of local_p to decide whether to
5881 add gp0 to GPREL16 value. Don't use only the lowest 16 bits
5882 of the addend of a non-in-place GPREL16 relocation.
5883 (_bfd_mips_elf_relocate_section): Pass use_saved_addend_p to
5884 mips_elf_calculate_relocation().
5885
5886 2002-10-12 Stephane Carrez <stcarrez@nerim.fr>
5887
5888 * elf32-m68hc11.c (m68hc11_elf_relax_section): Don't treat relocs
5889 with symbols in other sections if we relaxed something; the sections
5890 output offsets must be re-computed before.
5891
5892 2002-10-12 Stephane Carrez <stcarrez@nerim.fr>
5893
5894 * elf32-m68hc11.c (m68hc11_elf_relax_section): Update symbols
5895 handling to use Elf_Internal_Sym.
5896 (m68hc11_elf_relax_delete_bytes): Likewise.
5897
5898 2002-10-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5899
5900 * elf32-sh.c (sh_elf_optimized_tls_reloc, sh_elf_mkobject,
5901 sh_elf_object_p, dtpoff_base): New functions.
5902 (sh_elf_howto_table): Add TLS relocs.
5903 (sh_reloc_map): Likewise.
5904 (sh_elf_info_to_howto): Support TLS relocs.
5905 (elf_sh_link_hash_entry): Add tls_type and tls_tpoff32.
5906 (sh_elf_hash_entry, sh_elf_tdata, sh_elf_local_got_tls_type):
5907 New macros.
5908 (sh_elf_obj_tdata): New.
5909 (elf_sh_link_hash_table): Add tls_ldm_got.
5910 (sh_elf_link_hash_table_create): Clear refcount of tls_ldm_got.
5911 (allocate_dynrelocs): Support TLS relocs.
5912 (sh_elf_size_dynamic_sections): Likewise.
5913 (sh_elf_relocate_section): Support TLS relocs. Don't try to find
5914 .rela.got section when found already. Return false after printing
5915 error about unresolvable relocation.
5916 (sh_elf_gc_sweep_hook): Support TLS relocs.
5917 (sh_elf_check_relocs): Likewise.
5918 (sh_elf_finish_dynamic_symbol): Likewise.
5919 (bfd_elf32_mkobject, elf_backend_object_p): Define for TLS case.
5920 * reloc.c: Add SH TLS relocs.
5921 * bfd-in2.h, libbfd.h: Regenerate.
5922
5923 2002-10-11 Daniel Jacobowitz <drow@mvista.com>
5924
5925 * Makefile.in: Regenerated.
5926
5927 2002-10-11 Daniel Jacobowitz <drow@mvista.com>
5928
5929 * Makefile.am: Run dep-am.
5930 (BFD_H_DEP): Add simple.c and linker.c.
5931 (BFD32_LIBS): Add simple.lo.
5932 (BFD32_LIBS_CFILES): Add simple.c.
5933 * Makefile.in: Regenerated.
5934 * bfd-in2.h: Regenerated.
5935 * simple.c: New file.
5936
5937 2002-10-11 Alan Modra <amodra@bigpond.net.au>
5938
5939 * coff-arm.c (record_arm_to_thumb_glue): Avoid type-punned pointers.
5940 (record_thumb_to_arm_glue): Likewise.
5941 * ecoff.c (ecoff_link_add_externals): Likewise.
5942 * elf32-arm.h (record_arm_to_thumb_glue): Likewise.
5943 (record_thumb_to_arm_glue): Likewise.
5944 * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
5945 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
5946 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
5947 * elf64-alpha.c (elf64_alpha_create_dynamic_sections): Likewise.
5948 * elf64-ppc.c (func_desc_adjust): Likewise.
5949 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
5950 (sh64_elf64_create_dynamic_sections): Likewise.
5951 * elflink.c (_bfd_elf_create_got_section): Likewise.
5952 (_bfd_elf_create_dynamic_sections): Likewise.
5953 (_bfd_elf_create_linker_section): Likewise.
5954 * elflink.h (elf_add_default_symbol): Likewise.
5955 (elf_link_create_dynamic_sections): Likewise.
5956 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
5957 * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Likewise.
5958 * elfxx-mips.c (mips_elf_create_got_section): Likewise.
5959 (_bfd_mips_elf_add_symbol_hook): Likewise.
5960 (_bfd_mips_elf_create_dynamic_sections): Likewise.
5961 * linker.c (generic_link_add_symbol_list): Likewise.
5962 * xcofflink.c (xcoff_link_add_symbols): Likewise.
5963
5964 * elfxx-ia64.c (oor_brl, oor_ip): Conditionally define.
5965
5966 * elf64-ppc.c (edit_opd): Only zero opd syms when function is
5967 completely removed. Correct local sym adjustment.
5968
5969 2002-10-10 Stephen Clarke <stephen.clarke@superh.com>
5970
5971 * elf32-sh.c (elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
5972 Correct mistake in calculation of address of .got.
5973 * elf64-sh64.c (elf_sh64_pic_plt_entry_be,
5974 elf_sh64_pic_plt_entry_le): Likewise.
5975
5976 2002-10-09 Richard Shann <richard.shann@superh.com>
5977 Stephen Clarke <stephen.clarke@superh.com>
5978
5979 * Makefile.am: Add entries for elf32-sh64-lin.c and
5980 elf64-sh64-lin.c. Regenerate.
5981 * Makefile.in: Regenerate.
5982 * config.bfd: Change sh64eb-*-linux* and sh64-*-linux*
5983 to use sh64 vectors rather than sh vectors.
5984 * configure.in: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
5985 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
5986 * configure: Regenerate.
5987 * elf32-sh64-lin.c: New file.
5988 * elf64-sh64-lin.c: New file.
5989 * targets.c: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
5990 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
5991
5992 2002-10-08 H.J. Lu <hjl@gnu.org>
5993
5994 * elf32-i386.c (elf_i386_relocate_section): Re-arrange the
5995 IE->LE transition for R_386_TLS_IE.
5996
5997 2002-10-08 Alan Modra <amodra@bigpond.net.au>
5998
5999 * elf64-ppc.c (edit_opd): Correct test for discarded sections.
6000
6001 2002-10-07 Mark Elbrecht <snowball3@softhome.net>
6002
6003 * cofflink.c (mark_relocs): Don't mark relocations in excluded
6004 sections.
6005
6006 2002-10-07 Alan Modra <amodra@bigpond.net.au>
6007
6008 * elflink.h (elf_link_input_bfd): Remove BFD_VERSION_DATE dependent
6009 code.
6010
6011 * elf64-ppc.c (ppc64_elf_build_stubs): Increment .glink indx.
6012
6013 2002-10-06 Alan Modra <amodra@bigpond.net.au>
6014
6015 * opncls.c: Formatting.
6016 (_bfd_new_bfd): Use a smaller section hash table.
6017
6018 2002-10-05 Alexandre Oliva <aoliva@redhat.com>
6019
6020 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Set the type
6021 of the other two relocations packed with a REL32 to NONE.
6022
6023 2002-10-02 Stephen Clarke <stephen.clarke@superh.com>
6024
6025 * elf32-sh.c (elf_sh_link_hash_entry): Add gotplt_refcount.
6026 (sh_elf_link_hash_newfunc): Initialize it.
6027 (allocate_dynrelocs): Transfer gotplt refs from plt.refcount
6028 to got.refcount for symbols that are forced local or when
6029 we have direct got refs.
6030 (sh_elf_gc_sweep_hook): Adjust gotplt_refcount. Use it
6031 to correctly adjust got.refcount and plt.refcount.
6032 (sh_elf_copy_indirect_symbol): Copy gotplt_refcount across.
6033 (sh_elf_check_relocs): Increment gotplt_refcount.
6034
6035 2002-10-01 Jakub Jelinek <jakub@redhat.com>
6036
6037 * elf32-i386.c (elf_i386_relocate_section): Fix
6038 movl foo@indntpoff, %eax IE->LE transition.
6039
6040 2002-10-01 Jakub Jelinek <jakub@redhat.com>
6041
6042 * elf64-x86-64.c (elf64_x86_64_relocate_section): Change TLSGD
6043 sequence and its transitions.
6044
6045 2002-10-01 Jakub Jelinek <jakub@redhat.com>
6046
6047 * elf32-i386.c (elf_i386_relocate_section): Resolve R_386_TLS_LDO_32
6048 to st_value + addend in non-code sections.
6049 * elf64-x86-64.c (elf64_x86_64_relocate_section): Resolve
6050 R_X86_64_DTPOFF32 to st_value + addend in non-code sections.
6051
6052 2002-09-30 Gavin Romig-Koch <gavin@redhat.com>
6053 Ken Raeburn <raeburn@cygnus.com>
6054 Aldy Hernandez <aldyh@redhat.com>
6055 Eric Christopher <echristo@redhat.com>
6056 Richard Sandiford <rsandifo@redhat.com>
6057
6058 * archures.c (bfd_mach_mips4120, bfd_mach_mips5400): New.
6059 (bfd_mach_mips5500): New.
6060 * cpu-mips.c (I_mips4120, I_mips5400, I_mips5500): New.
6061 (arch_info_struct): Add corresponding entries here.
6062 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_4120,
6063 E_MIPS_MACH_5400 and E_MIPS_MACH_5500.
6064 (_bfd_mips_elf_final_write_processing): Handle bfd_mach_mips4120,
6065 bfd_mach_mips5400 and bfd_mach_mips5500.
6066 (_bfd_mips_elf_mach_extends_p): New function.
6067 (_bfd_mips_elf_merge_private_bfd_data): Use it to help merge
6068 the EF_MIPS_MACH flags.
6069 * bfd-in2.h: Regenerate.
6070
6071 2002-09-28 Jason Thorpe <thorpej@wasabisystems.com>
6072
6073 * elf32-vax.c (elf_vax_size_dynamic_section): Don't strip
6074 .got sections.
6075
6076 2002-09-28 Alan Modra <amodra@bigpond.net.au>
6077
6078 * elf.c (map_sections_to_segments): Correct test for start of
6079 writable section in the same page as end of read-only section.
6080
6081 2002-09-27 Matt Thomas <matt@3am-software.com>
6082
6083 * elf32-vax.c (elf_vax_check_relocs): Remove unused
6084 local_got_refcounts usage. Remove allocation of got slot.
6085 (elf_vax_gc_sweep_hook): Remove unused local_got_refcounts usage.
6086 Remove de-allocation of got slot.
6087 (elf_vax_size_dynamic_section): Fix some indentation. Add hash
6088 traversal for elf_vax_instantiate_got_entries. Allow empty .got
6089 sections to be GC'ed.
6090 (elf_vax_instantiate_got_entries): New function.
6091 (elf_vax_relocate_section): Simplify R_VAX_GOT32 handling. Remove
6092 tests that are now handled by elf_vax_instantiate_got_entries.
6093 Assert GOT entry falls within .got section size. Remove redundant
6094 comparisions. Fix comments.
6095
6096 2002-09-27 Jakub Jelinek <jakub@redhat.com>
6097
6098 * reloc.c: Add x86-64 TLS relocs.
6099 * bfd-in2.h, libbfd.h: Rebuilt.
6100 * elf64-x86-64.c (x86_64_elf_howto): Fix size fields for 32-bit
6101 relocs. Add TLS relocs.
6102 (x86_64_reloc_map): Add TLS relocs.
6103 (elf64_x86_64_info_to_howto): Adjust for added TLS relocs.
6104 (struct elf64_x86_64_link_hash_entry): Add tls_type field.
6105 (GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD, GOT_TLS_IE): Define.
6106 (elf64_x86_64_hash_entry): Define.
6107 (struct elf64_x86_64_obj_tdata): New.
6108 (elf64_x86_64_tdata, elf64_x86_64_local_got_tls_type): Define.
6109 (struct elf64_x86_64_link_hash_table): Add tls_ld_got.
6110 (link_hash_newfunc): Initialize tls_type.
6111 (elf64_x86_64_link_hash_table_create): Initialize tls_ld_got.
6112 (elf64_x86_64_copy_indirect_symbol): Swap tls_type if necessary.
6113 (elf64_x86_64_mkobject): New.
6114 (elf64_x86_64_elf_object_p): Allocate struct elf64_x86_64_obj_tdata.
6115 (elf64_x86_64_tls_transition): New.
6116 (elf64_x86_64_check_relocs): Add r_type variable and use it.
6117 Handle TLS relocs.
6118 (elf64_x86_64_gc_sweep_hook): Handle TLS relocs.
6119 (allocate_dynrelocs): Allocate GOT space for TLS relocs.
6120 (elf64_x86_64_size_dynamic_sections): Likewise.
6121 (dtpoff_base, tpoff): New.
6122 (elf64_x86_64_relocate_section): Handle TLS relocs.
6123 (elf64_x86_64_finish_dynamic_symbol): Only handle non-TLS GOT
6124 entries.
6125 (bfd_elf64_mkobject): Define.
6126
6127 * elf32-i386.c (elf_i386_check_relocs) [R_386_TLS_LE]: Set
6128 DF_STATIC_TLS if shared.
6129
6130 2002-09-26 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6131
6132 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Don't emit unneeded
6133 empty relocation sections.
6134
6135 2002-09-26 Alan Modra <amodra@bigpond.net.au>
6136
6137 * elf64-ppc.c (ppc_build_one_stub): Don't build glink stubs here.
6138 (ppc64_elf_build_stubs): Build them here instead.
6139
6140 2002-09-24 Jakub Jelinek <jakub@redhat.com>
6141
6142 * elf32-sparc.c (elf32_sparc_relocate_section): Put R_SPARC_RELATIVE
6143 addend into r_addend, not *r_offset.
6144 (elf32_sparc_finish_dynamic_symbol): Likewise.
6145 * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Clear xword at
6146 R_SPARC_RELATIVE's r_offset.
6147
6148 2002-09-23 Nathan Tallent <eraxxon@alumni.rice.edu>
6149
6150 * dwarf2.c (decode_line_info): Update to correctly decode
6151 the (non-standard DWARF2) out-of-order address sequences
6152 generated by the Intel C++ 6.0 compiler for ia64-Linux.
6153
6154 2002-09-23 Mark Elbrecht <snowball3@softhome.net>
6155
6156 * config.bfd: For DJGPP targets, match with any cpu and any machine.
6157
6158 2002-09-23 Alan Modra <amodra@bigpond.net.au>
6159
6160 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Zero relocs
6161 for discarded FDEs. Remove redundant assignment.
6162 * elflink.h (elf_bfd_discard_info): Save edited relocs.
6163
6164 2002-09-22 H.J. Lu <hjl@gnu.org>
6165
6166 * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Don't merge
6167 the relocation count between different .reloc sections.
6168
6169 2002-09-21 Alan Modra <amodra@bigpond.net.au>
6170
6171 * elf32-ppc.c (ppc_elf_relocate_section): Allow ".sbss.*" and
6172 ".sdata.*" for R_PPC_SDAREL16, ".sbss2*" and ".sdata2*" for
6173 R_PPC_EMB_SDA2REL. Similarly for R_PPC_EMB_SDA21 and
6174 R_PPC_EMB_RELSDA.
6175
6176 * elfcode.h (elf_slurp_reloc_table_from_section): Make "symcount"
6177 unsigned. Move "symcount" assignment out of loop.
6178 * Makefile.am: Run "make dep-am".
6179 * Makefile.in: Regenerate.
6180 * configure: Regenerate.
6181 * po/SRC-POTFILES.in: Regnerate.
6182
6183 2002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
6184
6185 * dwarf2.c (_bfd_dwarf2_find_nearest_line): If address length is
6186 zero, set it to 8 for (non-standard) 64-bit DWARF2 formats
6187 (e.g. IRIX64).
6188
6189 2002-09-19 Jakub Jelinek <jakub@redhat.com>
6190
6191 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Clear .got word
6192 even if generating R_PPC_RELATIVE reloc.
6193 (ppc_elf_relocate_section): Make sure relocation is performed
6194 if skip == -2. Clear memory at r_offset when creating dynamic
6195 relocation.
6196
6197 2002-09-19 Jakub Jelinek <jakub@redhat.com>
6198
6199 * reloc.c (BFD_RELOC_386_TLS_TPOFF, BFD_RELOC_386_TLS_IE,
6200 BFD_RELOC_386_TLS_GOTIE): Add.
6201 * bfd-in2.h, libbfd.h: Rebuilt.
6202 * elf32-i386.c (elf_howto_table): Add R_386_TLS_TPOFF, R_386_TLS_IE
6203 and R_386_TLS_GOTIE.
6204 (elf_i386_reloc_type_lookup): Handle it.
6205 (struct elf_i386_link_hash_entry): Change tls_type type to unsigned
6206 char instead of enum, change GOT_* into defines.
6207 (GOT_TLS_IE_POS, GOT_TLS_IE_NEG, GOT_TLS_IE_BOTH): Define.
6208 (elf_i386_tls_transition): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
6209 (elf_i386_check_relocs): Likewise. Avoid crash if local symbol is
6210 accessed both as normal and TLS symbol. Move R_386_TLS_LDM and
6211 R_386_PLT32 cases so that R_386_TLS_IE can fall through.
6212 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
6213 (elf_i386_gc_sweep_hook): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
6214 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
6215 (allocate_dynrelocs): Allocate 2 .got and 2 .rel.got entries if
6216 tls_type is GOT_TLS_IE_BOTH.
6217 (elf_i386_size_dynamic_sections): Likewise.
6218 (elf_i386_relocate_section): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
6219 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
6220 (elf_i386_finish_dynamic_symbol): Use tls_type & GOT_TLS_IE to catch
6221 all 4 GOT_TLS_* TLS types.
6222
6223 2002-09-19 Nick Clifton <nickc@redhat.com>
6224
6225 * elflink.h (elf_fix_symbol_flags): When examining weak symbols,
6226 follow indirect links.
6227
6228 2002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
6229
6230 * ecoffswap.h (ecoff_swap_pdr_in) <isym, iline>: Update to
6231 correctly sign-extend 32-bit ECOFF null values (0xffffffff, -1)
6232 on 64 bit machines.
6233 (ecoff_swap_sym_in) <iss>: Likewise.
6234 * ecoff.c (_bfd_ecoff_slurp_symbolic_info): Fix error reading
6235 ECOFF information: 'ioptMax' refers to the actual *size*
6236 of the optimization symtab, not the number of entries.
6237
6238 2002-09-19 Daniel Jacobowitz <drow@mvista.com>
6239
6240 * elf32-arm.h (elf32_arm_adjust_dynamic_symbol): Update
6241 ELF_LINK_HASH_NEEDS_PLT logic.
6242
6243 2002-09-18 Daniel Jacobowitz <drow@mvista.com>
6244
6245 * elfcode.h (elf_slurp_reloc_table_from_section): Check
6246 correct relocation count.
6247
6248 2002-09-17 Daniel Jacobowitz <drow@mvista.com>
6249
6250 * bfd-in.h (bfd_get_dynamic_symcount): Define.
6251 * bfd.c (struct _bfd): Add dynsymcount.
6252 * bfd-in2.h: Regenerated.
6253 * elf.c (_bfd_elf_canonicalize_dynamic_symtab): Set
6254 abfd->dynsymcount.
6255 * elfcode.h (elf_slurp_reloc_table_from_section): Check
6256 for overflow.
6257
6258 2002-09-17 Stan Cox <scox@redhat.com>
6259
6260 * elf64-mips.c (mips_elf64_be_swap_reloca_out): Handle type2 and type3.
6261 (mips_elf64_final_gp): Don't make up gp value.
6262 * elfn32-mips.c (mips_elf_final_gp): Likewise.
6263 * elfxx-mips.c (_bfd_mips_elf_final_link): Always create
6264 .MIPS.options/.options section.
6265
6266 2002-09-17 David O'Brien <obrien@FreeBSD.org>
6267
6268 * elf32-i386-fbsd.c: Always label using the EI_OSABI method.
6269 It is benign for FreeBSD < 4.1. Minor reformatting.
6270 * elf64-alpha-fbsd.c: Likewise.
6271
6272 2002-09-17 Jakub Jelinek <jakub@redhat.com>
6273
6274 * elf32-i386.c (elf_i386_relocate_section) [R_386_TLS_TPOFF32]: Negate
6275 addend.
6276
6277 2002-09-17 Alan Modra <amodra@bigpond.net.au>
6278
6279 * elf64-alpha.c (alpha_elf_size_info): Make static.
6280
6281 2002-09-17 Svein E. Seldal <Svein.Seldal@solidas.com>
6282
6283 * coff-tic4x.c: Add function declarations and ATTRIBUTE_UNUSED.
6284 * cpu-tic4x.c: Ditto.
6285
6286 2002-09-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6287
6288 * elf64-mips.c (define elf_backend_ignore_discarded_relocs): Remove
6289 duplicate define.
6290
6291 2002-09-16 Bruno Haible <bruno@clisp.org>
6292
6293 * elf32-i386.c: Don't defined ELF_ARCH etc. if this file is included
6294 by a target variant implementation.
6295 * elf64-alpha.c: Likewise.
6296 * elf32-i386-fbsd.c: New file.
6297 * elf64-alpha-fbsd.c: New file.
6298 * targets.c: Support bfd_elf32_i386_freebsd_vec and
6299 bfd_elf64_alpha_freebsd_vec.
6300 * configure.in: Accept the vectors bfd_elf32_i386_freebsd_vec,
6301 bfd_elf64_alpha_freebsd_vec.
6302 * Makefile.am (BFD32_BACKENDS): Add elf32-i386-fbsd.lo.
6303 (BFD32_BACKENDS_CFILES): Add elf32-i386-fbsd.c.
6304 (BFD64_BACKENDS): Add elf64-alpha-fbsd.lo.
6305 (BFD64_BACKENDS_CFILES): Add elf64-alpha-fbsd.c.
6306 (elf32-i386-fbsd.lo, elf64-alpha-fbsd.lo): Add dependencies.
6307 * config.bfd: For FreeBSD targets, set targ_defvec to a FreeBSD
6308 specific targets. Define OLD_FREEBSD_ABI_LABEL if appropriate.
6309
6310 2002-09-12 Jakub Jelinek <jakub@redhat.com>
6311
6312 * elf32-i386.c (dtpoff_base, tpoff): Don't crash if tls_segment is
6313 NULL.
6314 (elf_i386_relocate_section): Return false after printing error about
6315 unresolvable relocation.
6316
6317 2002-09-12 Nick Clifton <nickc@redhat.com>
6318
6319 * elf32-arm.h (elf32_arm_final_link_relocate): Fix handling of
6320 R_ARM_THM_PC11.
6321
6322 2002-09-11 Jeffrey Law <law@redhat.com>
6323
6324 * elf32-h8300.c (elf32_h8_relax_section): Fix typo.
6325
6326 2002-09-11 Andrew Haley <aph@cambridge.redhat.com>
6327
6328 * elf.c (_bfd_elf_find_nearest_line): Check functionname_ptr and
6329 line_ptr before deciding we've found a symbol.
6330
6331 2002-09-11 Nick Clifton <nickc@redhat.com>
6332
6333 * po/da.po: New Danish translation file.
6334 * configure.in (LINGUAS): Add 'da'.
6335 * configure: Regenerate.
6336
6337 2002-09-10 Michael Snyder <msnyder@redhat.com>
6338
6339 * irix-core.c (do_sections, do_sections64): New functions.
6340 (irix_core_core_file_p): Call new functions do_sections,
6341 do_sections64, depending on corefile (32-bit or 64-bit).
6342
6343 2002-09-09 Richard Henderson <rth@redhat.com>
6344
6345 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21M
6346 and PCREL21F like PCREL21B.
6347
6348 2002-09-04 Kevin Buettner <kevinb@redhat.com>
6349
6350 * config.bfd (mips*-*-irix6*): Add new ABI vectors. Make n32 default
6351 vector.
6352
6353 2002-09-02 Nick Clifton <nickc@redhat.com>
6354
6355 * elf32-v850.c (v850_elf_final_link_relocate): Use helpful
6356 names instead of cryptically overloaded bfd_reloc error
6357 codes.
6358 (v850_elf_relocate_section): Likewise.
6359 (v850_elf_relax_section): Replace caching of external symbols
6360 with caching of internal symbols obtained from calling
6361 bfd_elf_get_elf_syms().
6362 Fixup problems with freeing cached allocated memory blocks.
6363
6364 2002-09-02 Alan Modra <amodra@bigpond.net.au>
6365
6366 * cpu-pj.c (scan_mach, compatible, arch_info_struct): Remove.
6367 (bfd_pj_arch): Use bfd_default_scan.
6368 * cpu-v850.c (scan): Remove.
6369 (N): Use bfd_default_scan.
6370 * cpu-z8k.c (scan_mach): Remove.
6371 (arch_info_struct, bfd_z8k_arch): Reorganize so that the default is
6372 first. Use bfd_default_scan.
6373
6374 * ecoff.c (_bfd_ecoff_set_arch_mach_hook): Don't use hard-coded
6375 bfd_mach constants.
6376 (ecoff_get_magic): Likewise.
6377 * elf32-v850.c (v850_elf_object_p): Likewise.
6378 (v850_elf_final_write_processing): Likewise.
6379 * mipsbsd.c (MY(set_arch_mach)): Likewise.
6380 (MY(write_object_contents)): Likewise.
6381 * coff64-rs6000.c (xcoff64_write_object_contents): Likewise.
6382 * coffcode.h (coff_write_object_contents): Likewise.
6383 (coff_set_arch_mach_hook): Add comment describing machine == 0.
6384 Remove unnecessary "machine" assignments.
6385 (coff_write_relocs): Test for the absolute section sym by testing
6386 section and flags.
6387
6388 * aoutx.h (NAME(aout,machine_type)): Recognize bfd_mach_i386_i386
6389 and bfd_mach_i386_i386_intel_syntax.
6390 * pdp11.c (NAME(aout,machine_type)): Likewise.
6391
6392 2002-08-30 John David Anglin <dave@hiauly1.hia.nrc.ca>
6393
6394 * bfd-in.h (align_power): Cast constants to bfd_vma type.
6395 * bfd-in2.h (align_power): Likewise.
6396
6397 2002-08-30 Alan Modra <amodra@bigpond.net.au>
6398
6399 * Makefile.am: Run "make dep-am".
6400 * Makefile.in: Regenerate.
6401
6402 * cpu-avr.c (compatible): Don't use hard-coded mach constants.
6403 * cpu-powerpc.c (powerpc_compatible): Likewise.
6404 * cpu-rs6000.c (rs6000_compatible): Likewise.
6405
6406 2002-08-28 Catherine Moore <clm@redhat.com>
6407
6408 * elf32-v850.c (v850_elf_reloc_map): Add new relocs.
6409 (v850-elf-reloc): Don't resolve pc relative relocs.
6410 (v850_elf_ignore_reloc): New routine.
6411 (v850_elf_final_link_relocate): Handle new relocs.
6412 (v850_elf_relax_delete_bytes ): New routine.
6413 (v850_elf_relax_section): New routine.
6414 (bfd_elf32_bfd_relax_section): Define.
6415 (HOWTO): New entries for new relocs.
6416 * reloc.c (BFD_RELOC_V850_LONGCALL): New reloc.
6417 (BFD_RELOC_V850_LONGJUMP): New reloc.
6418 (BFD_RELOC_V850_ALIGN): New reloc.
6419 * archures.c: Remove redundant v850ea architecture.
6420 * cpu-v850.c: Remove redundant v850ea support.
6421 * libbfd.h: Regenerate.
6422 * bfd-in2.h: Regenerated.
6423
6424 2002-08-28 Svein E. Seldal <Svein.Seldal@solidas.com>
6425
6426 * config.bfd: Add tic4x-*-*coff* and c4x-*-*coff* target.
6427 * configure.in: Add tic4x_coff vector files.
6428 * configure: Regenerate.
6429 * Makefile.am: Add tic4x target.
6430 * Makefile.in: Regenerate.
6431
6432 2002-08-27 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
6433
6434 * archures.c: Add the BFD arch type tic4x.
6435 * bfd-in.h: Add BFD_IN_MEMORY flag.
6436 * coff-tic4x.c: New file.
6437 * coffswap.h (coff_swap_sym_out): Add preadjuster.
6438 * cpu-tic4x.c: New file.
6439 * targets.c: Added tic4x- in list of xvecs.
6440 * ticoff.h: New file.
6441 * bfd-in2.h: Regenerate.
6442
6443 2002-08-27 Adam Nemet <anemet@lnxw.com>
6444
6445 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Set the last
6446 bit of DT_INIT and DT_FINI for Thumb functions.
6447
6448 2002-08-26 Alan Modra <amodra@bigpond.net.au>
6449
6450 * coffcode.h (coff_set_arch_mach_hook): Handle W65MAGIC.
6451
6452 2002-08-26 Alan Modra <amodra@bigpond.net.au>
6453
6454 * aoutx.h (NAME(aout,reloc_type_lookup)): Handle BFD_RELOC_8.
6455
6456 2002-08-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6457
6458 * elf32-sh.c (sh_elf_copy_indirect_symbol): New.
6459 (create_got_section, allocate_dynrelocs, readonly_dynrelocs):
6460 Likewise.
6461 (struct elf_sh_pcrel_relocs_copied): Removed.
6462 (struct elf_sh_dyn_relocs): New.
6463 (struct elf_sh_link_hash_entry): Replace pcrel_relocs_copied
6464 field with dyn_relocs.
6465 (struct elf_sh_link_hash_table): Add short-cuts to get dynamic
6466 sections and sym_sec.
6467 (sh_elf_link_hash_newfunc): Clear dyn_relocs.
6468 (sh_elf_link_hash_table_create): Clear shorts-cuts and sym_sec.
6469 (sh_elf_create_dynamic_sections): Use create_got_section instead
6470 of _bfd_elf_create_got_section.
6471 (sh_elf_check_relocs): Likewise.
6472 (sh_elf_create_dynamic_sections): Use short-cuts to the dynamic
6473 sections.
6474 (sh_elf_adjust_dynamic_symbol, sh_elf_size_dynamic_sections,
6475 sh_elf_relocate_section, sh_elf_check_relocs,
6476 sh_elf_finish_dynamic_symbol, sh_elf_finish_dynamic_sections):
6477 Likewise.
6478 (sh_elf_adjust_dynamic_symbol): Handle nocopyreloc. Keep the
6479 dynamic relocations and avoiding the copy relocation when we
6480 didn't find any dynamic relocations in the section which has
6481 contents or is read-only.
6482 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
6483 (sh_elf_size_dynamic_sections): Don't reset the size of
6484 .rela.got section even if dynamic_sections_created flag is off.
6485 Don't use sh_elf_discard_copies. Scan all input bfd and use
6486 allocate_dynrelocs. Call readonly_dynrelocs to determine
6487 whether we need DT_TEXTREL.
6488 (sh_elf_adjust_dynamic_symbol): Use plt.refcount to determine
6489 whether the symbol was never referred to.
6490 (sh_elf_relocate_section): Use WILL_CALL_FINISH_DYNAMIC_SYMBOL.
6491 (sh_elf_gc_sweep_hook): Fill with the real sweep function.
6492 (sh_elf_check_relocs): Call create_got_section if the short-cut
6493 to .got is null. Increment reference counters only instead of
6494 allocating space on dynamic sections here. Don't conditionalize
6495 uninitialized got.offset value when marking the symbol as a
6496 global offset table entry. Keep relocations for symbols satisfied
6497 by a dynamic library to avoid copy relocations for the symbol.
6498 Set dynobj field of an elf hash table if needed.
6499 (sh_elf_finish_dynamic_sections): Handle null section pointer
6500 correctly.
6501 (elf_backend_copy_indirect_symbol): Defined.
6502 (elf_backend_can_refcount): Defined.
6503
6504 2002-08-23 Nick Clifton <nickc@redhat.com>
6505
6506 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Undo
6507 previous change. Add comment explaining why.
6508
6509 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>
6510
6511 * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le): Copy
6512 contents of .got.plt[2] to tr0, not address of .got.plt.
6513 (sh_elf_finish_dynamic_symbol): Do not apply GOT_BIAS when
6514 patching absolute plt entry. For shmedia plt entry, set bottom bit
6515 of branch to plt0 as this is a branch to an shmedia instruction.
6516 * elf64-sh64.c (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le):
6517 Copy contents of .got.plt[2] to tr0, not address of .got.plt.
6518 (elf_sh64_plt_entry_be, elf_sh64_plt_entry_le): Use ptrel to
6519 branch to plt0.
6520 (sh64_elf64_finish_dynamic_symbol): Do not apply GOT_BIAS when
6521 patching absolute plt entry. For shmedia plt entry, branch to
6522 plt0 is now ptrel, so use relative offset. Set bottom bit of
6523 branch target as it is a branch to an shmedia instruction.
6524
6525 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>,
6526 Richard Shann <richard.shann@superh.com>
6527
6528 * elf32-sh.c (sh_elf_finish_dynamic_sections): Set LSB of DT_INIT
6529 value if .init is an SHmedia function. Similarly for DT_FINI.
6530 * elf64-sh64.c (sh64_elf64_finish_dynamic_sections): Likewise.
6531
6532 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>
6533
6534 * elf32-sh.c (sh_elf_size_dynamic_sections): Zero initialize
6535 dynamic section.
6536 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
6537
6538 2002-08-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6539
6540 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use a simple
6541 byte read when reading the return address register column.
6542
6543 2002-08-22 Nick Clifton <nickc@redhat.com>
6544
6545 * config.bfd: Add powepc64-*-*bsd* target.
6546
6547 2002-08-22 Graeme Peterson <gp@qnx.com>
6548
6549 * Makefile.am: Add entries for elf32-shqnx.c
6550 * Makefile.in: Regenerate.
6551 * config.bfd: Add support sh-*-nto* target.
6552 * configure.in: Add support for bfd_elf32_sh{l}qnx_vec.
6553 * configure: Regenerate.
6554 * elf32-qnx.h: Changed typo "elf_i386qnx_*" to "elf_qnx_*" .
6555 * elf32-sh.c: Do not include elf32-target.h if
6556 ELF32_SH_C_INCLUDED is defined.
6557 * elf32-shqnx.c: New file: Support for QNX.
6558 * targets.c: Add bfd_elf32_sh{l}qnx_vec.
6559
6560 2002-08-22 Nick Clifton <nickc@redhat.com>
6561
6562 * po/tr.po: Updated Turkish translation.
6563
6564 * syms.c (_bfd_generic_read_minisymbols): Set bfd_error if the
6565 symbols are not read.
6566
6567 2002-08-22 Alan Modra <amodra@bigpond.net.au>
6568
6569 * elf32-m68hc11.c: Formatting fixes.
6570 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
6571 * elf32-m68hc12.c: Formatting fixes.
6572 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
6573
6574 2002-08-22 Alan Modra <amodra@bigpond.net.au>
6575
6576 * coff-rs6000.c (rs6000coff_vec <object_flags>): Add SEC_CODE and
6577 SEC_DATA.
6578 (pmac_xcoff_vec): Likewise.
6579 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
6580 (aix5coff64_vec): Likewise.
6581
6582 2002-08-22 Alan Modra <amodra@bigpond.net.au>
6583
6584 * elf-bfd.h (struct elf_backend_data): Add struct elf_backend_data
6585 param to elf_backend_copy_indirect_symbol.
6586 (_bfd_elf_link_hash_copy_indirect): Likewise.
6587 * elflink.h (elf_add_default_symbol, elf_fix_symbol_flags): Adjust
6588 calls to copy_indirect_symbol.
6589 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
6590 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
6591 * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
6592 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
6593 * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
6594 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
6595 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
6596 * elfxx-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
6597 * elfxx-mips.h (_bfd_mips_elf_copy_indirect_symbol): Likewise.
6598 * elf.c (_bfd_elf_link_hash_copy_indirect): Likewise. Properly
6599 test refcounts for "used" values.
6600
6601 2002-08-21 John David Anglin <dave@hiauly1.hia.nrc.ca>
6602
6603 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Add PARAMS to
6604 argument declaration.
6605
6606 2002-08-19 Elena Zannoni <ezannoni@redhat.com>
6607
6608 * archures.c (bfd_mach_ppc_e500): Added.
6609 * bfd-in2.h: Rebuilt.
6610 * cpu-powerpc.c (bfd_powerpc_archs): Added e500.
6611
6612 2002-08-19 Alan Modra <amodra@bigpond.net.au>
6613
6614 * elf32-m68hc12.c (elf_backend_can_gc_sections): False.
6615
6616 2002-08-17 Andrew Cagney <ac131313@redhat.com>
6617
6618 * elf.c (bfd_elf_get_elf_syms): Change type of `esym' to
6619 `bfd_byte'.
6620
6621 2002-08-17 Stan Cox <scox@redhat.com>
6622
6623 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Use the
6624 IRIX 6 segment layout for NEWABI.
6625
6626 2002-08-16 Stephen Clarke <stephen.clarke@superh.com>
6627
6628 * elf32-sh.c (sh_elf_gc_mark_hook): For sh64, skip indirect
6629 symbols when looking for section referred to by a relocation.
6630 * elf64-sh.c (sh_elf64_gc_mark_hook): Likewise.
6631
6632 2002-08-15 Alan Modra <amodra@bigpond.net.au>
6633
6634 * elf32-i370.c: Move reloc enum to include/elf/i370.h.
6635
6636 2002-08-15 Hans-Peter Nilsson <hp@axis.com>
6637
6638 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Add
6639 missing check for whether the symbol is referenced by DSO before
6640 unexporting it as an unneeded dynamic symbol.
6641
6642 2002-08-14 H.J. Lu <hjl@gnu.org>
6643
6644 * libbfd.h: Regenerate.
6645
6646 2002-08-14 H.J. Lu <hjl@gnu.org>
6647
6648 * config.bfd: Always add 64bit vectors to 32bit Linux/mips.
6649
6650 2002-08-14 Stephane Carrez <stcarrez@nerim.fr>
6651
6652 * elf32-m68hc11.c (m68hc11_relax_group): New to relax group of
6653 instructions.
6654 (m68hc11_direct_relax): New to define table of relaxable instructions.
6655 (find_relaxable_insn): New, find a relaxable insn.
6656 (compare_reloc): New to compare two relocs.
6657 (m68hc11_elf_relax_section): New, relax text sections.
6658 (m68hc11_elf_relax_delete_bytes): New, delete bytes and adjust branchs.
6659 (elf32_m68hc11_check_relocs): New function for GC support.
6660 (elf32_m68hc11_relocate_section): New function for GC support.
6661 (bfd_elf32_bfd_relax_section): Define to support linker relaxation.
6662 (elf_backend_check_relocs): Likewise.
6663 (elf_backend_relocate_section): Likewise.
6664
6665 2002-08-13 H.J. Lu <hjl@gnu.org>
6666
6667 * elflink.h (NAME(bfd_elf,size_dynamic_sections): Don't count
6668 definitions in shared objects when checking symbol with
6669 undefined version.
6670
6671 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6672
6673 * elf32-m68hc11.c (elf32_m68hc11_gc_mark_hook): New for section GC.
6674 (elf32_m68hc11_gc_sweep_hook): Likewise.
6675 (elf_backend_gc_mark_hook): Define for GC section support.
6676 (elf_backend_gc_sweep_hook): Likewise.
6677 (elf_backend_can_gc_sections): Likewise.
6678
6679 * elf32-m68hc12.c: Likewise.
6680
6681 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6682
6683 * elf32-m68hc11.c (_bfd_m68hc11_elf_print_private_bfd_data): New.
6684 (_bfd_m68hc11_elf_merge_private_bfd_data): New function.
6685 (_bfd_m68hc11_elf_set_private_flags): New function.
6686 Use them to set/check/print ELF flags specific to 68HC11.
6687
6688 * elf32-m68hc12.c (_bfd_m68hc12_elf_print_private_bfd_data): New.
6689 (_bfd_m68hc12_elf_merge_private_bfd_data): New function.
6690 (_bfd_m68hc12_elf_set_private_flags): New function.
6691 Use them to set/check/print ELF flags specific to 68HC12.
6692
6693 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6694
6695 * elf32-m68hc11.c (elf_m68hc11_howto_table): Add the new relocs;
6696 fix masks for PC-rel relocs.
6697 (m68hc11_elf_ignore_reloc): New function.
6698
6699 * elf32-m68hc12.c (m68hc12_elf_special_reloc): New to handle specific
6700 68HC12 banked addressing relocs.
6701 (m68hc12_phys_addr): New to compute physical address of banked memory.
6702 (m68hc12_phys_page): Likewise for page.
6703 (m68hc12_addr_is_banked): New to see if address is in banked area.
6704 (elf_m68hc12_howto_table): Add new relocs and rename to xx12.
6705
6706 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6707
6708 * reloc.c (BFD_RELOC_M68HC11_RL_JUMP, BFD_RELOC_M68HC11_RL_GROUP,
6709 BFD_RELOC_M68HC11_LO16, BFD_RELOC_M68HC11_PAGE,
6710 BFD_RELOC_M68HC11_24): New relocs for 68HC11/68HC12.
6711 * bfd-in2.h: Regenerate.
6712
6713 2002-08-12 H.J. Lu <hjl@gnu.org>
6714
6715 * elflink.h (elf_add_default_symbol): Preserve section across
6716 elf_merge_symbol.
6717
6718 2002-08-09 Graeme Peterson <gp@qnx.com>
6719
6720 * Makefile.am: Add entries for elf32-ppcqnx.c, and add
6721 elf32-qnx.h dependency to elfarmqnx-nabi.c and elf32-i386qnx.c.
6722 * Makefile.in: Regenerate.
6723 * config.bfd: Add support for powerpc{le}-*-nto targets.
6724 * configure.in: Add support for bfd_elf32_powerpc{le}qnx_vec.
6725 * configure: Regenerate.
6726 * elf32-i386qnx.c: Moved backend functions into a QNX specific
6727 common file "elf32-qnx.h", and now include that file.
6728 * elf32-qnx.h: New file: QNX specific common elf backend.
6729 * elf32-ppc.c: Do not include elf32-target.h if
6730 ELF32_PPC_C_INCLUDED is defined.
6731 * elf32-ppcqnx.c: New file: Support for QNX.
6732 * elfarmqnx-nabi.c: Include elf32-qnx.h for qnx elf backend.
6733 * targets.c: Add bfd_elf32_powerpc{le}qnx_vec.
6734
6735 2002-08-09 Nick Clifton <nickc@redhat.com>
6736
6737 * po/sv.po: Updated Swedish translation.
6738
6739 2002-08-09 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6740
6741 * elfxx-mips.c (mips_elf_global_got_index): Avoid segfault if
6742 g->global_gotsym is NULL.
6743
6744 2002-08-08 H.J. Lu <hjl@gnu.org>
6745
6746 * elflink.h (elf_add_default_symbol): Don't warn if a definition
6747 overrides an indirect versioned symbol.
6748
6749 2002-08-08 Jakub Jelinek <jakub@redhat.com>
6750
6751 * elf32-i386.c (elf_i386_relocate_section): Fill in proper addend
6752 for R_386_TLS_TPOFF32 relocs against symndx 0.
6753
6754 2002-08-07 H.J. Lu <hjl@gnu.org>
6755
6756 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Check symbol
6757 with undefined version if needed.
6758 (elf_link_assign_sym_version): Match a default symbol with a
6759 version without definition. No need to hide the default
6760 definition separately.
6761
6762 2002-08-08 Alan Modra <amodra@bigpond.net.au>
6763
6764 * elflink.h (elf_link_output_extsym): Don't output symbols from
6765 SEC_EXCLUDE sections.
6766
6767 * aoutx.h (aout_link_write_symbols): Correct handling of warning syms.
6768
6769 2002-08-07 Alan Modra <amodra@bigpond.net.au>
6770
6771 * elf64-ppc.c (edit_opd): Arrange to drop symbols for discarded .opd
6772 entries.
6773
6774 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6775
6776 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Cast signedness
6777 mismatch.
6778
6779 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6780
6781 * elfxx-mips.c (ABI_64_P): Remove superfluous check.
6782
6783 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6784
6785 * elf32-mips.c (mips_reloc_map): Fix typo.
6786
6787 2002-08-06 Alan Modra <amodra@bigpond.net.au>
6788
6789 * xcofflink.c (xcoff_write_global_symbol): Set n_scnum for abs_section.
6790
6791 2002-08-06 Alan Modra <amodra@bigpond.net.au>
6792
6793 * elf64-ppc.c (ppc64_elf_howto_raw): Zero all src_mask entries.
6794
6795 2002-08-06 Alan Modra <amodra@bigpond.net.au>
6796
6797 * libxcoff.h: Use PARAMS on function declarations.
6798 * coff-rs6000.c (xcoff_generate_rtinit): Simplify size calc.
6799 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
6800
6801 * coff-rs6000.c: (xcoff_rtype2howto): Don't place reloc address in
6802 addend.
6803 * coff64-rs6000.c: (xcoff64_rtype2howto): Likewise.
6804
6805 2002-08-06 Alan Modra <amodra@bigpond.net.au>
6806
6807 * coff-rs6000.c: Formatting fixes.
6808 (xcoff_calculate_relocation): Use PARAMS in declaration.
6809 (xcoff_complain_overflow): Likewise.
6810 (xcoff_ppc_relocate_section): Use old-style function pointer call.
6811 (bfd_xcoff_backend_data): Remove useless comments.
6812 (rs6000coff_vec): Likewise.
6813 (bfd_pmac_xcoff_backend_data): Likewise.
6814 (pmac_xcoff_vec): Likewise.
6815
6816 * coff64-rs6000.c: Formatting fixes.
6817 (xcoff64_calculate_relocation): Use PARAMS in declaration.
6818 (xcoff64_ppc_relocate_section): Use old-style function pointer call.
6819 (bfd_xcoff_backend_data): Remove useless comments.
6820 (rs6000coff64_vec): Likewise.
6821 (bfd_xcoff_aix5_backend_data): Likewise.
6822 (aix5coff64_vec): Likewise.
6823
6824 2002-08-06 Alan Modra <amodra@bigpond.net.au>
6825
6826 * coff-rs6000.c (xcoff_howto_table): Revert some of last change to
6827 mask entries. Use complain_overflow_dont for R_REF.
6828 (xcoff_reloc_type_ba): Revert last change.
6829 (xcoff_reloc_type_br): Likewise.
6830 (xcoff_reloc_type_crel): Likewise.
6831 (xcoff_ppc_relocate_section): Likewise.
6832 * coff64-rs6000.c (xcoff64_reloc_type_br): Likewise.
6833 (xcoff64_ppc_relocate_section): Likewise.
6834 (xcoff64_howto_table): Revert some of last change to mask entries.
6835 Use complain_overflow_dont for R_REF.
6836
6837 * coff-rs6000.c (xcoff_howto_table): Fix src_mask entries. Make all
6838 relocs with bitsize == 16 have size = 1.
6839 (xcoff_reloc_type_ba): Correct src_mask and dst_mask adjustment.
6840 (xcoff_reloc_type_br): Likewise.
6841 (xcoff_reloc_type_crel): Likewise.
6842 (xcoff_ppc_relocate_section): Set up src_mask and dst_mask correctly.
6843 * coff64-rs6000.c (xcoff64_reloc_type_br): Correct src_mask and
6844 dst_mask adjustment.
6845 (xcoff64_ppc_relocate_section): Set up src_mask and dst_mask correctly.
6846 (xcoff64_howto_table): Fix src_mask entries. Make all relocs with
6847 bitsize == 16 have size = 1.
6848
6849 2002-08-01 Denis Chertykov <denisc@overta.ru>
6850
6851 * elf32-ip2k.c: Processor manufacturer changed to Ubicom.
6852 (struct misc): New field isymbuf. All free_* fields removed.
6853 (symbol_value): Pass in internal syms. No need to swap syms in.
6854 (ip2k_elf_relax_section): Use bfd_elf_get_elf_syms. Properly free
6855 possibly cached info.
6856 (tidyup_after_error): Removed.
6857 (ip2k_elf_relax_section_pass1): Don't use removed fields of struct
6858 misc. Use new field.
6859 (adjust_all_relocations): Use internal syms. No need to swap syms
6860 in and out.
6861 (add_page_insn): Don't use removed fields of struct misc.
6862
6863 2002-08-01 Nick Clifton <nickc@redhat.com>
6864
6865 * elf32-arm.h: Revert previous delta.
6866
6867 2002-08-01 Nick Clifton <nickc@redhat.com>
6868
6869 * configure.in (AM_INIT_AUTOMAKE): Bump version number.
6870 * configure: Regenerate.
6871
6872 2002-07-31 H.J. Lu <hjl@gnu.org>
6873
6874 * config.bfd: Add x86-64 vector to Linux/i386 if 64bit BFD is
6875 selected.
6876
6877 2002-07-31 H.J. Lu <hjl@gnu.org>
6878
6879 * config.bfd: Add n32 vectors to 32bit Linux/mips if 64bit BFD
6880 is selected.
6881
6882 2002-07-31 Jakub Jelinek <jakub@redhat.com>
6883
6884 * elf32-i386.c (elf_i386_copy_indirect_symbol): Swap tls_type
6885 if _bfd_elf_link_hash_copy_indirect will swap got.refcount.
6886
6887 2002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
6888
6889 * cpu-ns32k.c (_bfd_ns32k_put_immdeiate, _bfd_ns32k_get_immediate):
6890 There is no 8 byte relocation type for this architecture.
6891 (do_ns32k_reloc): Use bfd_vma instead of native types.
6892 (bfd_ns32k_put_immediate, _bfd_ns32k_relocate_contents) put_data
6893 returns void.
6894 (_bfd_ns32k_put_displacement): Don't check for overflow. We can
6895 rely on generic code to do that.
6896 * aout-ns32k.c (howto_table): Add appropriate overflow detection
6897 to all table entries.
6898 (_bfd_ns32k_relocate_contents): put_data returns void.
6899 * ns32k.h: (_bfd_ns32k_put_displacement, _bfd_ns32k_put_immediate)
6900 (_bfd_do_ns32k_reloc_contents): Fix prototypes. put data functions
6901 return void.
6902
6903 2002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
6904
6905 * aoutx.h (aout_link_check_ar_symbols): Whether to include an
6906 archive object is target dependant.
6907
6908 2002-07-31 Adam Nemet <anemet@lnxw.com>
6909
6910 * elf32-arm.h (ARM_PLT_ENTRY_SIZE): Rename PLT_ENTRY_SIZE.
6911 (THUMB_PLT_ENTRY_SIZE): New macro.
6912 (PLT_ENTRY_SIZE): Return the appropriate *_PLT_ENTRY_SIZE.
6913 (elf32_arm_plt0_entry): Rename PLT_ENTRY_SIZE to
6914 ARM_PLT_ENTRY_SIZE.
6915 (elf32_arm_plt_entry): Likewise.
6916 (elf_backend_plt_header_size): Likewise.
6917 (elf32_thumb_plt0_entry): New global.
6918 (elf32_arm_finish_dynamic_sections): Use it. Put Thumb entries
6919 into .plt.thumb.
6920 (elf32_thumb_plt_entry): New global.
6921 (elf32_arm_finish_dynamic_symbol): Use it. Use .thumb.plt for
6922 Thumb entries. Set the bottom bit of the corresponding GOT entry
6923 for a Thumb PLT entry.
6924 (struct elf32_arm_plt_entry_info): New structure.
6925 (struct elf32_arm_link_hash_entry, plt_info): New member of this
6926 type.
6927 (elf32_arm_link_hash_newfunc): Initialize new member.
6928 (elf32_arm_final_link_relocate, R_ARM_THM_PC22 case): Handle
6929 relocations against the PLT.
6930 (elf32_arm_check_relocs, case R_ARM_PLT32 case): Set
6931 first_rel_type if this is the first time we encounter the symbol.
6932 (elf32_arm_check_relocs, case R_ARM_THM_PC22 case): New case.
6933 Determine if relocation needs a PLT entry. Set first_rel_type if
6934 this is the first time we encounter the symbol
6935 (elf32_arm_adjust_dynamic_symbol): Create PLT entries for Thumb
6936 functions as well.
6937 (elf32_arm_size_dynamic_sections): Handle .plt.thumb like .plt.
6938 (elf32_arm_create_dynamic_sections): New function. Create the
6939 .plt.thumb section.
6940 (elf_backend_create_dynamic_sections): Call it.
6941
6942 2002-07-31 Nick Clifton <nickc@redhat.com>
6943
6944 * bfd.c (bfd_alt_mach_code): Rename parameter 'index' to
6945 'alternative' in order to avoid shadowing global symbol of the
6946 same name.
6947 * bfd-in2.h: Regenerate.
6948 * libbfd.h: Regenerate.
6949 * libcoff.h: Regenerate.
6950
6951 2002-07-31 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6952
6953 * Makefile.am: Add n32 ABI support.
6954 * Makefile.in: Regenerate.
6955 * config.bfd: Add n32 vectors to mips64*-*-linux* targets. Treat 64
6956 bit vectors for mips*-*-linux targets as optional.
6957 * configure.in: Add n32 ABI vectors.
6958 * configure: Regenerate.
6959 * elf32-mips.c (mips_elf32_object_p): Reject n32 ABI files.
6960 * elfn32-mips.c: New file, n32 ABI support.
6961 * targets.c: Add n32 ABI vectors.
6962
6963 2002-07-30 Graeme Peterson <gp@qnx.com>
6964
6965 * elfarmqnx-nabi.c: New file: Support for QNX.
6966 * config.bfd: Add support for arm-*-nto target.
6967 * configure.in: Add support for bfd_elf32_{big|little}armqnx_vec.
6968 * configure: Regenerate.
6969 * Makefile.am: Add entries for elfarmqnx-nabi.c.
6970 * Makefile.in: Regenerate.
6971 * elf32-arm.h (ELF_MAXPAGESIZE): Do not define if already defined.
6972 Do not define global function if ELFARM_NABI_C_INCLUDED is defined.
6973 * elfarm-nabi.c: Do not include elf32-arm.h if
6974 ELFARM_NABI_C_INCLUDED is defined.
6975 * targets.c: Add bfd_elf32_{big|little}armqnx_vec.
6976
6977 2002-07-30 Nick Clifton <nickc@redhat.com>
6978
6979 * po/sv.po: Updated Swedish translation.
6980
6981 2002-07-30 Jakub Jelinek <jakub@redhat.com>
6982
6983 * elf.c (elf_fake_sections): Fix up .tbss sh_size and sh_type.
6984
6985 2002-07-30 Alan Modra <amodra@bigpond.net.au>
6986
6987 * aoutx.h (some_aout_object_p): Clean up tdata properly on error.
6988 * archive.c (bfd_generic_archive_p): Likewise.
6989 * coff-rs6000.c (_bfd_xcoff_archive_p): Likewise.
6990 (_bfd_xcoff_archive_p): Use bfd_scan_vma in place of strtol.
6991 * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
6992 (xcoff64_archive_p): Likewise.
6993 (xcoff64_openr_next_archived_file): Likewise.
6994 (xcoff64_archive_p): Clean up tdata properly on error.
6995 * coffgen.c (coff_real_object_p): Likewise.
6996 (coff_object_p): Release filehdr and opthdr.
6997 * ecoff.c (_bfd_ecoff_archive_p): Clean up tdata properly on error.
6998 * ieee.c (ieee_archive_p): Likewise.
6999 * ihex.c (ihex_object_p): Likewise.
7000 (ihex_mkobject): Always allocate tdata.
7001 * peicode.h (pe_ILF_object_p): Release bfd_alloc'd buffer on error.
7002 * srec.c (srec_mkobject): Always allocate tdata.
7003 (srec_object_p): Clean up tdata properly on error.
7004 (symbolsrec_object_p): Likewise.
7005 * versados.c (versados_object_p): Likewise.
7006 * vms-misc.c (_bfd_vms_get_record): Use bfd_malloc instead of malloc,
7007 and bfd_realloc instead of realloc.
7008 (add_new_contents): Use bfd_alloc instead of bfd_malloc for sections.
7009 * vms.c (vms_initialize): Always allocate tdata. Use bfd_alloc in
7010 place of bfd_malloc, simplifying error freeing. Free hash table too.
7011 (vms_object_p): Clean up tdata on error.
7012 (vms_mkobject): Don't complain on stderr if vms_initialize fails.
7013 (vms_close_and_cleanup): Adjust for bfd_alloc use.
7014
7015 2002-07-30 Alan Modra <amodra@bigpond.net.au>
7016
7017 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set e_flags.
7018
7019 2002-07-26 Chris Demetriou <cgd@broadcom.com>
7020
7021 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Merge ASE
7022 flags into resulting BFD.
7023
7024 2002-07-26 Alan Modra <amodra@bigpond.net.au>
7025
7026 From John Reiser <jreiser@BitWagon.com>
7027 * elf32-i386.c (elf_i386_link_hash_table_create): Clear
7028 tls_ldm_got.refcount.
7029
7030 2002-07-25 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7031
7032 * elf64-mips.c: Update TODO comment.
7033 (mips_elf64_higher_reloc,mips_elf64_highest_reloc,
7034 mips_elf64_gprel16_reloca): Remove prototypes.
7035 (mips16_jump_reloc,mips16_gprel_reloc): Add functions.
7036 (UNUSED_RELOC): Replace by EMPTY_RELOC.
7037 (mips_elf64_howto_table_rel): Use special R_MIPS_HI16 handling. Remove
7038 wrong comments. Remove disfunctional support of R_MIPS_HIGHER and
7039 R_MIPS_HIGHEST.
7040 (mips_elf64_howto_table_rela): Fix handling of R_MIPS_GPREL16 and
7041 R_MIPS_GOT16. Remove wrong comments.
7042 (elf_mips16_jump_howto,elf_mips16_gprel_howto,
7043 elf_mips_gnu_vtinherit_howto,elf_mips_gnu_vtentry_howto): New, code
7044 from elf32-mips.c.
7045 (mips_elf64_hi16_reloc): Fix formatting.
7046 (mips_elf64_higher_reloc,mips_elf64_highest_reloc): Remove.
7047 (mips_elf64_got16_reloc): Fix formatting. Remove superfluous code.
7048 Better comment. Fall back to R_MIPS_GOT_DISP instead of abort().
7049 (mips_elf64_gprel16_reloc): Make static. Add check for
7050 partial_inplace.
7051 (mips_elf64_gprel16_reloca): Remove.
7052 (mips_elf64_literal_reloc): New function.
7053 (mips_elf64_gprel32_reloc): Fix formatting.
7054 (mips_elf64_shift6_reloc): Fix comment. Make static.
7055 (mips16_jump_reloc,mips16_gprel_reloc): New functions, code from
7056 elf32-mips.c.
7057 (elf_reloc_map,mips_reloc_map): New mapping table, similiar as in
7058 elf32-mips.c
7059 (bfd_elf64_bfd_reloc_type_lookup): Use the mapping table. Enable GNU
7060 specific relocations.
7061 (mips_elf64_rtype_to_howto): Enable GNU specific relocations.
7062 (mips_elf64_object_p): Invert logic to check for SGI-ish ABI.
7063 (ELF_MAXPAGESIZE): Add comment.
7064
7065 2002-07-25 Nick Clifton <nickc@redhat.com>
7066
7067 * po/sv.po: Updated Swedish translation.
7068 * po/es.po: Updated Spanish translation.
7069 * po/fr.po: Updated French translation.
7070
7071 2002-07-25 Alan Modra <amodra@bigpond.net.au>
7072
7073 * elf-bfd.h (_bfd_elf32_link_record_local_dynamic_symbol): Define
7074 as elf_link_record_local_dynamic_symbol.
7075 (_bfd_elf64_link_record_local_dynamic_symbol): Likewise.
7076 (elf_link_record_local_dynamic_symbol): Declare. Now returns int.
7077 * elflink.h (elf_link_record_local_dynamic_symbol): Move to..
7078 * elflink.c: .. here. Use bfd_elf_get_elf_syms. Check whether an
7079 attempt is made to record a symbol in a discarded section, and
7080 return `2' in that case.
7081
7082 2002-07-24 Nick Clifton <nickc@redhat.com>
7083
7084 * po/sv.po: Updated Swedish translation.
7085 * po/es.po: Updated Spanish translation.
7086
7087 2002-07-23 Alan Modra <amodra@bigpond.net.au>
7088
7089 * po/SRC-POTFILES.in: Regenerate.
7090
7091 * elf-hppa.h (elf_hppa_relocate_section): If relocatable, return
7092 immediately. Remove code handling relocatable linking.
7093 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
7094 * elf32-cris.c (cris_elf_relocate_section): Likewise.
7095 * elf32-fr30.c (elf32_frv_relocate_section): Likewise.
7096 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
7097 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
7098 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
7099 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
7100 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
7101 * elf32-v850.c (v850_elf_relocate_section): Likewise.
7102 * elf32-vax.c (elf_vax_relocate_section): Likewise.
7103 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7104 * elf32-avr.c (elf_backend_rela_normal): Define.
7105 * elf32-cris.c: Likewise.
7106 * elf32-fr30.c: Likewise.
7107 * elf32-frv.c: Likewise.
7108 * elf32-h8300.c: Likewise.
7109 * elf32-hppa.c: Likewise.
7110 * elf32-ip2k.c: Likewise.
7111 * elf32-sparc.c: Likewise.
7112 * elf32-v850.c: Likewise.
7113 * elf32-vax.c: Likewise.
7114 * elf64-hppa.c: Likewise.
7115 * elf64-sparc.c: Likewise.
7116 * elf32-fr30.c (elf32_frv_relocate_section): Edit comment.
7117 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
7118 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
7119 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
7120 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
7121 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
7122 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
7123 * elf-m10200.c (USE_RELA): Don't define.
7124 * elf-m10300.c: Likewise.
7125 * elfarm-oabi.c: Likewise.
7126 * elf32-i370.c: Likewise.
7127 * elf32-ip2k.c: Likewise.
7128 * elf32-m68k.c: Likewise.
7129 * elf32-mcore.c: Likewise.
7130 * elf32-ppc.c: Likewise.
7131 * elf32-s390.c: Likewise.
7132 * elf32-vax.c: Likewise.
7133 * elf64-ppc.c: Likewise.
7134 * elf64-s390.c: Likewise.
7135 * elf64-x86-64.c: Likewise.
7136 * elfxx-ia64.c: Likewise.
7137 * elf32-avr.c (USE_REL): Don't undef.
7138 * elf32-ip2k.c: Likewise.
7139
7140 2002-07-23 Nick Clifton <nickc@redhat.com>
7141
7142 * elf-bfd.h (struct elf_backend_data): Add new bitfield
7143 'want_p_paddr_set_to_zero'.
7144 * elfxx-target.h: Set default value for want_p_paddr_set_to_zero
7145 to false;
7146 * elfxx-ia64.c: Set want_p_paddr_set_zero for HPUX target.
7147 * elf.c (copy_private_bfd_data): Test want_p_paddr_set_zero.
7148
7149 2002-07-23 Gabor Keresztfalvi <keresztg@mail.com>
7150
7151 * nlmcode.h (nlm_swap_auxiliary_headers_out): Swapped the order of
7152 the MeSsAgEs and CoPyRiGhT tags to make >=NW4.x NLM loaders to
7153 show the Copyright string.
7154 Minor formatting tidy ups.
7155
7156 2002-07-23 Nick Clifton <nickc@redhat.com>
7157
7158 * po/fr.po: Updated French translation.
7159 * po/sv.po: Updated Swedish translation.
7160
7161 2002-07-23 Alan Modra <amodra@bigpond.net.au>
7162
7163 * elflink.h (elf_link_input_bfd): Don't change internal symbols
7164 when outputting relocs.
7165
7166 2002-07-20 Jason Thorpe <thorpej@wasabisystems.com>
7167
7168 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only insert
7169 DT_PLTGOT into the dynamic section if there is a PLT.
7170
7171 2002-07-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7172
7173 * elfxx-mips.c (_bfd_mips_elf_discard_info): New function, code from
7174 elf32-mips.c.
7175 (_bfd_mips_elf_write_section): Likewise.
7176 * elfxx-mips.h (_bfd_mips_elf_discard_info): New prototype.
7177 (_bfd_mips_elf_write_section): Likewise.
7178 * elf32-mips.c (elf32_mips_discard_info): Move to elfxx-mips.c.
7179 (elf32_mips_write_section): Likewise.
7180 * elf64-mips.c (_bfd_mips_elf_ignore_discarded_relocs): Use it.
7181 (_bfd_mips_elf_write_section): Likewise.
7182
7183 2002-07-19 Alan Modra <amodra@bigpond.net.au>
7184
7185 * elfxx-ia64.c: (elfNN_ia64_modify_segment_map): Properly scan
7186 PT_IA_64_UNWIND segments for a given section.
7187
7188 2002-07-17 H.J. Lu <hjl@gnu.org>
7189
7190 * Makefile.am: Fix a typo.
7191 * Makefile.in: Regenerate.
7192
7193 2002-07-15 Denis Chertykov <denisc@overta.ru>
7194 Frank Ch. Eigler <fche@redhat.com>
7195 Ben Elliston <bje@redhat.com>
7196 Alan Lehotsky <alehotsky@cygnus.com>
7197 John Healy <jhealy@redhat.com>
7198 Graham Stott <grahams@redhat.com>
7199 Jeff Johnston <jjohnstn@redhat.com>
7200
7201 * Makefile.am: Add support for ip2k.
7202 * Makefile.in: Regenerate.
7203 * doc/Makefile.in: Regenerate.
7204 * archures.c: Add support for ip2k.
7205 * config.bfd: Add support for ip2k.
7206 * configure.in: Add support for ip2k.
7207 * configure: Regenerate.
7208 * reloc.c: Add support for ip2k.
7209 * targets.c: Add support for ip2k.
7210 * bfd-in2.h: Regenerate.
7211 * libbfd.h: Regenerate.
7212 * cpu-ip2k.c: New file.
7213 * elf32-ip2k.c: New file.
7214
7215 2002-07-17 Ian Rickards <irickard@arm.com>
7216
7217 * dwarf2.c (concat_filename): If we can't establish the directory
7218 just return the filename.
7219
7220 2002-07-16 Moritz Jodeit <moritz@jodeit.org>
7221
7222 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Correct order of memset args.
7223
7224 2002-07-16 Alan Modra <amodra@bigpond.net.au>
7225
7226 * elflink.h: Formatting fixes, tidy prototypes.
7227 (elf_link_assign_sym_version): Move common code out of loop.
7228
7229 2002-07-16 Alan Modra <amodra@bigpond.net.au>
7230
7231 * elflink.h (elf_link_input_bfd): Don't call reloc_emitter when
7232 reloc section size is zero. Correct reloc output location.
7233
7234 2002-07-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
7235
7236 * elf-hppa.h (elf_hppa_reloc_final_type): Use R_PARISC_PCREL16F as
7237 the final type for the e_fsel selector when generating PA2.0W code.
7238 (elf_hppa_relocate_insn): Provide support for PA2.0W 16-bit format 1
7239 relocations.
7240
7241 2002-07-14 H.J. Lu <hjl@gnu.org>
7242
7243 * elflink.h (elf_link_assign_sym_version): Hide the default
7244 definition if there is a hidden versioned definition.
7245
7246 2002-07-12 Hans-Peter Nilsson <hp@axis.com>
7247
7248 * elf32-cris.c (cris_elf_relocate_section): Drop nonsensical
7249 dynamic reference test in assertion when initializing GOT with
7250 static contents. Just assert that there are either no dynamic
7251 sections, the symbol is defined in the regular objects or that the
7252 symbol is undef weak. Tweak comment.
7253 (elf_cris_finish_dynamic_symbol): Emit .got reloc for a program
7254 only if the symbol isn't defined in the program and isn't undef
7255 weak.
7256 (elf_cris_adjust_dynamic_symbol): Simplify condition for getting
7257 rid of PLT entry: only do it if the symbol isn't defined in a DSO.
7258 When doing so, clear ELF_LINK_HASH_NEEDS_PLT. Tweak comments.
7259 (elf_cris_discard_excess_program_dynamics): Don't consider
7260 ELF_LINK_HASH_REF_DYNAMIC when omitting .got runtime relocs.
7261
7262 2002-07-11 Alan Modra <amodra@bigpond.net.au>
7263
7264 * elf32-i386.c (elf_i386_relocate_section): Don't complain about
7265 unresolved debugging relocs in dynamic applications.
7266 * elf32-s390.c (elf_s390_relocate_section): Likewise.
7267 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
7268 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
7269 * elf64-s390.c (elf_s390_relocate_section): Likewise.
7270 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7271 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
7272
7273 2002-07-10 Alan Modra <amodra@bigpond.net.au>
7274
7275 * elf64-ppc.c (ONES): Define.
7276 (ppc64_elf_howto_table): Use ONES here to avoid warnings. Fill in
7277 missing src_mask fields. Tweak R_PPC64_NONE, R_PPC64_COPY. Fill
7278 in missing dst_mask fields on R_PPC64_PLT32, R_PPC64_PLTREL32.
7279
7280 * elf64-ppc.c (ppc64_elf_get_symbol_info): Delete.
7281 (ppc64_elf_set_private_flags): Delete.
7282 (ppc64_elf_section_from_shdr): Delete.
7283 (ppc64_elf_merge_private_bfd_data): Remove flag checking/merging code.
7284 (ppc64_elf_fake_sections): Delete.
7285 (bfd_elf64_bfd_set_private_flags): Don't define.
7286 (bfd_elf64_get_symbol_info): Likewise.
7287 (elf_backend_section_from_shdr): Likewise.
7288 (elf_backend_fake_sections): Likewise.
7289
7290 2002-07-10 Marco Walther <Marco.Walther@sun.com>
7291
7292 * elf.c: (assign_section_numbers) Set sh_entsize for .stab only
7293 when not already set.
7294 * elf64-sparc.c: (sparc64_elf_fake_sections): New function.
7295 (elf_backend_fake_sections): Define.
7296
7297 2002-07-10 Alan Modra <amodra@bigpond.net.au>
7298
7299 * merge.c (_bfd_merge_section): Remove redundant output_section check.
7300 Formatting.
7301 (_bfd_merge_sections): Don't set SEC_EXCLUDE on unused sections.
7302
7303 2002-07-09 Hans-Peter Nilsson <hp@axis.com>
7304
7305 * elf32-cris.c (cris_elf_relocate_section): Move sanity-check for
7306 NULL sym_hashes to just before use.
7307 <case R_CRIS_32_GOTREL>: In test for local symbol, accept also
7308 symbol with non-default visibility.
7309 <case R_CRIS_32_GOTREL, case R_CRIS_32_PLT_GOTREL>: Ditto.
7310 <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
7311 Ditto.
7312 (cris_elf_gc_sweep_hook): Only decrease h->plt.refcount for
7313 symbol with non-default visibility.
7314 (cris_elf_check_relocs): At tests for local symbol before
7315 increasing h->plt.refcount, also check for non-default
7316 visibility. Ditto when checking for local symbol to eliminate
7317 pc-relative runtime relocs.
7318
7319 2002-07-08 Alan Modra <amodra@bigpond.net.au>
7320
7321 * elf.c: Formatting.
7322 (IS_SOLARIS_PT_INTERP): Add p_paddr and p_memsz checks.
7323 (INCLUDE_SECTION_IN_SEGMENT): Remove IS_SOLARIS_PT_INTERP.
7324 (copy_private_bfd_data): Set p_vaddr on broken Solaris PT_INTERP
7325 segments.
7326
7327 2002-07-07 Mark Mitchell <mark@codesourcery.com>
7328 Alan Modra <amodra@bigpond.net.au>
7329
7330 * cofflink.c (_bfd_coff_final_link): On PE COFF systems, take into
7331 account the impact of relocation count overflow when computing
7332 section offsets.
7333 * coffcode.h (coff_write_relocs): Use obj_pe when deciding whether
7334 or not to apply the PE COFF reloc overflow handling. Fix a
7335 fencepost error in deciding whether or not to use that technique.
7336
7337 2002-07-07 Alan Modra <amodra@bigpond.net.au>
7338
7339 * elf-bfd.h (struct elf_reloc_cookie): Remove locsym_shndx,
7340 change type of locsyms.
7341 (bfd_elf_get_elf_syms): Declare.
7342 * elf.c (bfd_elf_get_elf_syms): New function.
7343 (group_signature): Use bfd_elf_get_elf_syms.
7344 (bfd_section_from_r_symndx): Likewise.
7345 * elfcode.h (elf_slurp_symbol_table): Likewise.
7346 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
7347 (elf_link_add_object_symbols): Likewise. Reorganise to increase
7348 locality of various data structures. Properly free internal relocs.
7349 (elf_bfd_final_link): Properly free internal relocs.
7350 (elf_link_check_versioned_symbol): Use bfd_elf_get_elf_syms.
7351 (elf_link_input_bfd): Likewise.
7352 (elf_gc_mark): Likewise. Properly free internal relocs.
7353 (elf_gc_sweep): Properly free internal relocs.
7354 (elf_reloc_symbol_deleted_p): No need to swap syms in.
7355 (elf_bfd_discard_info): Use bfd_elf_get_elf_syms. Properly free
7356 internal relocs.
7357 * elf-m10200.c (mn10200_elf_relax_section): Use bfd_elf_get_elf_syms.
7358 Properly free possibly cached info.
7359 (mn10200_elf_relax_delete_bytes): Remove symbol swapping code.
7360 (mn10200_elf_symbol_address_p): Pass in internal syms. Remove
7361 symbol swapping code.
7362 (mn10200_elf_get_relocated_section_contents): Use bfd_elf_get_elf_syms.
7363 Properly free possibly cached info.
7364 * elf-m10300.c (mn10300_elf_relax_section): As above for elf-m10200.c.
7365 (mn10300_elf_relax_delete_bytes): Likewise.
7366 (mn10300_elf_symbol_address_p): Likewise.
7367 (mn10300_elf_get_relocated_section_contents): Likewise.
7368 * elf32-h8300.c (elf32_h8_relax_section): As above for elf-m10200.c.
7369 (elf32_h8_relax_delete_bytes): Likewise.
7370 (elf32_h8_symbol_address_p): Likewise.
7371 (elf32_h8_get_relocated_section_contents): Likewise.
7372 * elf32-m32r.c (m32r_elf_relax_section): As above for elf-m10200.c.
7373 (m32r_elf_relax_delete_bytes): Likewise.
7374 (m32r_elf_get_relocated_section_contents): Likewise.
7375 * elf32-sh.c (sh_elf_reloc_loop): Free section contents using
7376 elf_section_data to determine whether cached.
7377 (sh_elf_relax_section): As above for elf-m10200.c.
7378 (sh_elf_relax_delete_bytes): Likewise.
7379 (sh_elf_get_relocated_section_contents): Likewise.
7380 * elf32-xstormy16.c (xstormy16_elf_relax_section): As above.
7381 * elf64-alpha.c (elf64_alpha_relax_section): As above. Also delay
7382 reading of local syms.
7383 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
7384 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): As above.
7385 * elfxx-ia64.c (elfNN_ia64_relax_section): As above.
7386 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Properly free internal
7387 relocs.
7388 * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Properly
7389 free internal relocs and section contents. Don't read symbols.
7390 * elf32-hppa.c (get_local_syms): Use bfd_elf_get_elf_syms.
7391 (elf32_hppa_size_stubs): Don't free local syms.
7392 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Delay
7393 reading of local syms. Use bfd_elf_get_elf_syms. Properly free
7394 possibly cached info.
7395 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
7396 * elf64-hppa.c (elf64_hppa_check_relocs): Use bfd_elf_get_elf_syms.
7397 * elf64-ppc.c (struct ppc_link_hash_table): Delete bfd_count and
7398 all_local_syms.
7399 (get_local_syms): Delete function.
7400 (edit_opd): Use bfd_elf_get_elf_syms. Free on error exit. Cache
7401 on exit.
7402 (ppc64_elf_size_stubs): Use bfd_elf_get_elf_syms. Free/cache on exit.
7403
7404 2002-07-05 Jim Wilson <wilson@redhat.com>
7405
7406 * syms.c (decode_section_type): New.
7407 (bfd_decode_symclass): Call decode_section_type.
7408
7409 2002-07-04 Jakub Jelinek <jakub@redhat.com>
7410
7411 * merge.c (_bfd_merged_section_offset): Avoid accessing byte before
7412 section content start.
7413 Reported by Michael Schumacher <mike@hightec-rt.com>.
7414
7415 2002-07-04 Alan Modra <amodra@bigpond.net.au>
7416
7417 * section.c (_bfd_strip_section_from_output): Remove unnecessary
7418 link order code. Don't actually remove the output section here;
7419 Just set a flag for the linker to do so.
7420 * elflink.c (_bfd_elf_link_renumber_dynsyms): Test for removed
7421 sections when setting up output section dynsyms.
7422
7423 2002-07-04 Alan Modra <amodra@bigpond.net.au>
7424
7425 * elflink.h (elf_link_add_object_symbols): Revert 1999-09-02 hpux
7426 fudge.
7427 * elf.c (bfd_section_from_shdr): Work around broken hpux shared
7428 libs here instead.
7429
7430 2002-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
7431
7432 * elf64-s390.c (create_got_section): Set .got section alignment to
7433 8 bytes.
7434 (elf_s390_check_relocs): Set .rela.dyn section alignment to 8 bytes.
7435
7436 2002-07-02 Alan Modra <amodra@bigpond.net.au>
7437
7438 * elf.c (_bfd_elf_reloc_type_class): Fix comment grammar.
7439
7440 2002-07-01 Matt Thomas <matt@3am-software.com>
7441
7442 * elf32-vax.c (elf32_vax_print_private_bfd_data): Change EF_*
7443 to EF_VAX_*.
7444
7445 2002-07-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7446
7447 * elfxx-mips.c (ABI_64_P): Fix comment.
7448 (MIPS_ELF_OPTIONS_SECTION_NAME,MIPS_ELF_STUB_SECTION_NAME): Use the
7449 new section names for N64 ABI.
7450 (mips_elf_output_extsym): No special _gp_disp handling for NewABI.
7451 (mips_elf_calculate_relocation): Code formatting.
7452 (mips_elf_create_dynamic_relocation): Likewise.
7453 (_bfd_mips_elf_fake_sections): IRIX6 needs this hack, too.
7454 (_bfd_mips_elf_size_dynamic_sections): Handle GOT_PAGE for any NewABI.
7455 (_bfd_mips_elf_relocate_section): No special handling for R_MIPS_64
7456 in any NewABI.
7457 (_bfd_mips_elf_finish_dynamic_symbol): No special _gp_disp handling
7458 for NewABI.
7459 (_bfd_mips_elf_modify_segment_map): Handle any N64 ABI.
7460 (_bfd_mips_elf_gc_sweep_hook): NewABI GOT relocs should be handled
7461 here, too.
7462
7463 2002-07-01 Andreas Schwab <schwab@suse.de>
7464
7465 * elf64-x86-64.c (elf64_x86_64_relocate_section): Only convert
7466 R_X86_64_64 to R_X86_64_RELATIVE.
7467
7468 2002-07-01 John David Anglin <dave@hiauly1.hia.nrc.ca>
7469
7470 * vaxbsd.c: New BFD backend for VAX BSD and Ultrix.
7471 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Add new backend.
7472 Run "make dep-am".
7473 * config.bfd (vax-*-bsd* | vax-*-ultrix*): Use vaxbsd_vec instead of
7474 host_aout_vec.
7475 * configure.in (vaxbsd_vec): Add.
7476 * targets.c (vaxbsd_vec): Add.
7477 * Makefile.in: Rebuild.
7478 * configure: Rebuild.
7479 * po/SRC-POTFILES.in: Rebuild.
7480
7481 2002-07-01 Alan Modra <amodra@bigpond.net.au>
7482
7483 * elflink.h (elf_gc_mark): Pass in the section whose relocs we are
7484 examining to gc_mark_hook, rather than the bfd.
7485 (elf_gc_sections): Adjust.
7486 * elf-bfd.h (struct elf_backend_data <gc_mark_hook>): Likewise.
7487 * elf-m10300.c (mn10300_elf_gc_mark_hook): Likewise.
7488 * elf32-arm.h (elf32_arm_gc_mark_hook): Likewise.
7489 * elf32-avr.c (elf32_avr_gc_mark_hook): Likewise.
7490 * elf32-cris.c (cris_elf_gc_mark_hook): Likewise.
7491 * elf32-d10v.c (elf32_d10v_gc_mark_hook): Likewise.
7492 * elf32-fr30.c (fr30_elf_gc_mark_hook): Likewise.
7493 * elf32-hppa.c (elf32_hppa_gc_mark_hook): Likewise.
7494 * elf32-i386.c (elf_i386_gc_mark_hook): Likewise.
7495 * elf32-m32r.c (m32r_elf_gc_mark_hook): Likewise.
7496 * elf32-m68k.c (elf_m68k_gc_mark_hook): Likewise.
7497 * elf32-mcore.c (mcore_elf_gc_mark_hook): Likewise.
7498 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Likewise.
7499 * elf32-ppc.c (ppc_elf_gc_mark_hook): Likewise.
7500 * elf32-s390.c (elf_s390_gc_mark_hook): Likewise.
7501 * elf32-sh.c (sh_elf_gc_mark_hook): Likewise.
7502 * elf32-sparc.c (elf32_sparc_gc_mark_hook): Likewise.
7503 * elf32-v850.c (v850_elf_gc_mark_hook): Likewise.
7504 * elf32-vax.c (elf_vax_gc_mark_hook): Likewise.
7505 * elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Likewise.
7506 * elf64-mmix.c (mmix_elf_gc_mark_hook): Likewise.
7507 * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
7508 * elf64-s390.c (elf_s390_gc_mark_hook): Likewise.
7509 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
7510 * elfxx-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise.
7511 * elfxx-mips.h (_bfd_mips_elf_gc_mark_hook): Likewise.
7512 * elf64-x86-64.c (elf64_x86_64_gc_mark_hook): Likewise.
7513 * elf32-frv.c (elf32_frv_gc_mark_hook): Likewise. Also remove
7514 redundant local sym tests.
7515 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_entry.
7516 (link_hash_newfunc): Init is_entry.
7517 (ppc64_elf_copy_indirect_symbol): Copy is_entry.
7518 (ppc64_elf_link_hash_table_create): Init all_local_syms.
7519 (create_linkage_sections): Use bfd_make_section_anyway rather than
7520 bfd_make_section.
7521 (ppc64_elf_mark_entry_syms): New function.
7522 (ppc64_elf_check_relocs): Don't bother testing elf_bad_symtab. Set
7523 up opd entry to function section map.
7524 (ppc64_elf_gc_mark_hook): Special case opd section relocs, and
7525 relocs that reference the opd section.
7526 (edit_opd): New function.
7527 (ppc64_elf_size_dynamic_sections): Call get_local_syms and edit_opd.
7528 (ppc64_elf_setup_section_lists): Don't calculate htab->bfd_count here.
7529 (get_local_syms): Do so here. Exit if we already have local syms.
7530 Remove bogus comment imported from elf32-hppa.c. Don't attempt to
7531 read local syms on non-ELF input.
7532 (ppc64_elf_size_stubs): Call _bfd_elf64_link_read_relocs rather
7533 than duplicating it's function here. Adjust free of internal
7534 relocs to suit.
7535 (ppc64_elf_relocate_section): Adjust local syms in opd section.
7536 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Declare.
7537 * elf32-hppa.c (elf32_hppa_size_stubs): Call
7538 _bfd_elf32_link_read_relocs rather than duplicating it's function
7539 here. Adjust free of internal relocs to suit.
7540
7541 2002-07-01 Andreas Jaeger <aj@suse.de>
7542
7543 * elf64-x86-64.c (elf64_x86_64_check_relocs): Certain relocations
7544 are not allowed in shared libs code, enforce -fPIC.
7545
7546 2002-06-29 Hans-Peter Nilsson <hp@bitrange.com>
7547
7548 * mmo.c (mmo_write_loc_chunk): Don't eliminate leading and
7549 trailing zero-sequences when there's previous left-over data.
7550
7551 2002-06-27 John David Anglin <dave@hiauly1.hia.nrc.ca>
7552
7553 * elf64-hppa.c (elf64_hppa_reloc_type_class): New function.
7554 (elf64_hppa_finish_dynamic_sections): Check other_rel_sec, dlt_rel_sec
7555 and opd_rel_sec in order for starting rela section. Check _raw_size.
7556 (elf_backend_reloc_type_class): Define.
7557
7558 2002-06-27 Kevin Buettner <kevinb@redhat.com>
7559
7560 * dwarf2.c (decode_line_info): Handle older, non-standard, 64-bit
7561 DWARF2 formats.
7562
7563 2002-06-27 Alan Modra <amodra@bigpond.net.au>
7564
7565 * cpu-powerpc.c: Comment on ordering of arch_info.
7566 * elf32-ppc.c (ppc_elf_object_p): New function.
7567 (elf_backend_object_p): Define.
7568 * elf64-ppc.c (ppc64_elf_object_p): New function.
7569 (elf_backend_object_p): Define.
7570
7571 2002-06-26 Jason Thorpe <thorpej@wasabisystems.com>
7572
7573 * configure.in (vax-*-netbsd*): Set COREFILE to netbsd-core.lo.
7574 * configure: Regenerate.
7575
7576 2002-06-25 Jason Eckhardt <jle@rice.edu>
7577
7578 * dwarf2.c (decode_line_info): Check unit->addr_size
7579 to read in the proper number of prologue bytes.
7580
7581 2002-06-25 Nick Clifton <nickc@cambridge.redhat.com>
7582
7583 * config.bfd (powerpc-*-aix5*): Only create a selvecs for
7584 aix5coff64_vec if 64-bit bfd support has been enabled.
7585 (powerpc64-*-aix5*): Only define if 64-bit bfd support has
7586 been enabled.
7587
7588 * targets.c (_bfd_target_vector[]): Only include
7589 aix5coff64_vec if 64-bit bfd support has been enabled.
7590
7591 2002-06-25 Alan Modra <amodra@bigpond.net.au>
7592
7593 * elf64-ppc.c (ppc_add_stub): Replace strcpy/strncpy with memcpy.
7594 * elf32-hppa.c (hppa_add_stub): Likewise.
7595 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
7596 * elflink.h (elf_add_default_symbol): Fix comment typo.
7597 (elf_add_default_symbol): Replace strcpy and strncpy with memcpy.
7598 (elf_link_add_object_symbols): Likewise.
7599 (elf_link_assign_sym_version): Likewise.
7600 * hash.c (bfd_hash_lookup): Likewise.
7601 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
7602 * section.c (bfd_get_unique_section_name): Likewise.
7603 * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
7604 * elf.c (_bfd_elf_make_section_from_phdr): Likewise.
7605 (assign_section_numbers): Likewise.
7606 (_bfd_elfcore_make_pseudosection): Likewise.
7607 (elfcore_grok_lwpstatus): Likewise.
7608 (elfcore_grok_win32pstatus): Likewise.
7609 (elfcore_write_note): Constify input params. Use PTR instead of
7610 void *. Include terminating NUL in namesz. Correct padding.
7611 Support NULL "name" param. Use memcpy instead of strcpy.
7612 (elfcore_write_prpsinfo): Constify input params.
7613 (elfcore_write_prstatus): Likewise. Use PTR instead of void *.
7614 (elfcore_write_lwpstatus): Likewise.
7615 (elfcore_write_pstatus): Likewise.
7616 (elfcore_write_prfpreg): Likewise.
7617 (elfcore_write_prxfpreg): Likewise.
7618 * elf-bfd.h (elfcore_write_note): Update declaration.
7619 (elfcore_write_prpsinfo): Likewise.
7620 (elfcore_write_prstatus): Likewise.
7621 (elfcore_write_pstatus): Likewise.
7622 (elfcore_write_prfpreg): Likewise.
7623 (elfcore_write_prxfpreg): Likewise.
7624 (elfcore_write_lwpstatus): Likewise.
7625
7626 2002-06-25 Jason Eckhardt <jle@rice.edu>
7627
7628 * ecoff.c (ecoff_set_symbol_info): Set BSF_FUNCTION for
7629 symbols of type stProc and stStaticProc.
7630
7631 2002-06-25 Nick Clifton <nickc@redhat.com>
7632
7633 * ecoff.c: VArious formatting fixes.
7634
7635 2002-06-25 Alan Modra <amodra@bigpond.net.au>
7636
7637 * coff-rs6000.c (xcoff_generate_rtinit): Fix typo.
7638
7639 2002-06-25 Alan Modra <amodra@bigpond.net.au>
7640
7641 * aout-adobe.c: Don't compare against "true" or "false.
7642 * aout-target.h: Likewise.
7643 * aoutx.h: Likewise.
7644 * archive.c: Likewise.
7645 * bout.c: Likewise.
7646 * cache.c: Likewise.
7647 * coff-a29k.c: Likewise.
7648 * coff-alpha.c: Likewise.
7649 * coff-i386.c: Likewise.
7650 * coff-mips.c: Likewise.
7651 * coff-or32.c: Likewise.
7652 * coff64-rs6000.c: Likewise.
7653 * coffcode.h: Likewise.
7654 * coffgen.c: Likewise.
7655 * cpu-ns32k.c: Likewise.
7656 * ecoff.c: Likewise.
7657 * ecofflink.c: Likewise.
7658 * elf.c: Likewise.
7659 * elf32-arm.h: Likewise.
7660 * elf32-cris.c: Likewise.
7661 * elf32-d30v.c: Likewise.
7662 * elf32-i386.c: Likewise.
7663 * elf32-mcore.c: Likewise.
7664 * elf32-ppc.c: Likewise.
7665 * elf32-sh.c: Likewise.
7666 * elf32-sh64.c: Likewise.
7667 * elf32-v850.c: Likewise.
7668 * elf64-alpha.c: Likewise.
7669 * elf64-sh64.c: Likewise.
7670 * elfcode.h: Likewise.
7671 * elfcore.h: Likewise.
7672 * elflink.h: Likewise.
7673 * elfxx-mips.c: Likewise.
7674 * i386os9k.c: Likewise.
7675 * ieee.c: Likewise.
7676 * libbfd.c: Likewise.
7677 * linker.c: Likewise.
7678 * mmo.c: Likewise.
7679 * nlm32-alpha.c: Likewise.
7680 * nlm32-i386.c: Likewise.
7681 * nlm32-ppc.c: Likewise.
7682 * nlm32-sparc.c: Likewise.
7683 * nlmcode.h: Likewise.
7684 * oasys.c: Likewise.
7685 * pdp11.c: Likewise.
7686 * peicode.h: Likewise.
7687 * reloc.c: Likewise.
7688 * som.c: Likewise.
7689 * srec.c: Likewise.
7690 * tekhex.c: Likewise.
7691 * vms.c: Likewise.
7692 * xcofflink.c: Likewise.
7693 * elf64-sparc.c: Edit comment to not use "== false".
7694
7695 * aoutf1.h: Don't use "? true : false".
7696 * ecoff.c: Likewise.
7697 * format.c: Likewise.
7698 * ieee.c: Likewise.
7699 * linker.c: Likewise.
7700 * mmo.c: Likewise.
7701 * oasys.c: Likewise.
7702
7703 2002-06-23 H.J. Lu <hjl@gnu.org>
7704
7705 * elflink.h (elf_link_add_archive_symbols): For the default
7706 version, check references with only one `@' first.
7707
7708 2002-06-23 John David Anglin <dave@hiauly1.hia.nrc.ca>
7709
7710 * elf64-hppa.c (elf64_hppa_mark_milli_and_exported_functions): New
7711 function.
7712 (allocate_global_data_dlt): Don't add millicode symbols to dynamic
7713 symbol table.
7714 (allocate_global_data_opd, allocate_dynrel_entries): Likewise.
7715 (elf64_hppa_size_dynamic_sections): Revise to use
7716 elf64_hppa_mark_milli_and_exported_functions.
7717 (elf64_hppa_finish_dynamic_symbol): Remove code to keep millicode
7718 symbols out of dynamic symbol table.
7719
7720 2002-06-23 Alan Modra <amodra@bigpond.net.au>
7721
7722 * Makefile.in: Regenerate.
7723 * libbfd.h: Regenerate.
7724 * bfd-in2.h: Regenerate.
7725 * configure: Regenerate.
7726 * po/SRC-POTFILES.in: Regenerate.
7727
7728 * elflink.h: Comment typo fixes.
7729
7730 2002-06-23 H.J. Lu <hjl@gnu.org>
7731
7732 * elf-bfd.h (elf_link_loaded_list): New structure.
7733 (elf_link_hash_table): Add "loaded".
7734 * elf.c (_bfd_elf_link_hash_table_init): Initialize "loaded".
7735 * elflink.h (elf_link_check_versioned_symbol): New function.
7736 (elf_link_output_extsym): Call elf_link_check_versioned_symbol.
7737
7738 2002-06-19 Nick Clifton <nickc@cambridge.redhat.com>
7739
7740 * elflink.h (size_dynamic_sections): If the target does not
7741 support an ELF style hash table, return true, indicating that
7742 nothing needed to be done, rather than false, indicating that the
7743 section's size could not be computed.
7744
7745 2002-06-18 Dave Brolley <brolley@redhat.com>
7746
7747 From Catherine Moore, Michael Meissner, Dave Brolley:
7748 * po/SRC-POTFILES.in: Add cpu-frv.c and elf32-frv.c
7749 * targets.c: Support bfd_elf32_frv_vec.
7750 * reloc.c: Add FRV relocs.
7751 * configure.in: Add support for bfd-elf32-frv-vec.
7752 * config.bfd (targ_cpu): Add support for frv-*-elf.
7753 * archures.c: Add frv arch and machines.
7754 * Makefile.am (ALL_MACHINES): Add cpu-frv.lo.
7755 (ALL_MACHINES_CFILES): Add cpu-frv.c.
7756 (BFD32_BACKENDS): Add elf32-frv.lo.
7757 (BFD32_BACKENDS_CFILES): Add elf32-frv.c
7758 (cpu-frv.lo): New target.
7759 (elf32-frv.lo): New target.
7760 * cpu-frv.c: New file.
7761 * elf32-frv.c: New file.
7762
7763 2002-06-18 Jakub Jelinek <jakub@redhat.com>
7764
7765 * elfcode.h (elf_object_p): Sanity check eh_shoff == 0 implies
7766 e_shnum == 0.
7767 Only read the first section header if e_shoff is non-zero.
7768 Don't consider e_shstrndx if there are no sections.
7769
7770 2002-06-17 Tom Rix <trix@redhat.com>
7771
7772 * elf32-d10v.c (elf_d10v_howto_table): Change R_D10V_10_PCREL_R,
7773 R_D10V_10_PCREL_L and R_D10V_18_PCREL to use
7774 complain_overflow_bitfield.
7775
7776 2002-06-17 Alan Modra <amodra@bigpond.net.au>
7777
7778 * opncls.c (bfd_openr): Remove redundant bfd_set_error.
7779 (bfd_fdopenr): Likewise.
7780 (bfd_openstreamr): Likewise.
7781 (bfd_openw): Likewise.
7782
7783 * targets.c: Sort target vecs.
7784 (_bfd_target_vector): Add aix5coff64_vec, bfd_elf32_sh64_vec,
7785 bfd_elf32_sh64l_vec, bfd_elf32_sh64lnbsd_vec,
7786 bfd_elf32_sh64nbsd_vec, bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec,
7787 bfd_elf64_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec.
7788 * configure.in: Sort target vecs. Add m88kmach3_vec.
7789 * configure: Regenerate.
7790
7791 2002-06-16 Hans-Peter Nilsson <hp@bitrange.com>
7792
7793 * elf64-mmix.c (bpo_reloc_request_sort_fn): Use member
7794 bpo_reloc_no to break sort order ties, not address of items.
7795
7796 2002-06-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
7797
7798 * elf-hppa.h (elf_hppa_final_link): Fix formatting in comment.
7799 Skip excluded sections in determing __gp value.
7800 (elf_hppa_final_link_relocate): Use the symbol's address in
7801 R_PARISC_FPTR64 relocations that don't need an opd entry.
7802 * elf64-hppa.c (allocate_dynrel_entries): Simplify code.
7803 (elf64_hppa_finalize_dynreloc): Likewise.
7804 (elf64_hppa_size_dynamic_sections): Move comments and fix typo.
7805 (elf64_hppa_finish_dynamic_symbol): Break up assert.
7806
7807 2002-06-14 Sergey Grigoriev <serge@leopold.Physik.Uni-Augsburg.DE>
7808
7809 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
7810 alignment for .bss, .data and .text sections so that sse and sse2
7811 code will work.
7812 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
7813
7814 2002-06013 J"orn Rennecke <joern.rennecke@superh.com>
7815
7816 config.bfd: Add support for sh[1234]l*-*-elf* | sh3el*-*-elf*,
7817 sh[1234]*-elf*.
7818
7819 2002-06-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
7820
7821 * elflink.h (elf_bfd_final_link): Improve error handling for missing
7822 dynamic sections.
7823
7824 * elf64-hppa.c (allocate_global_data_opd): We don't need an opd entry
7825 for a symbol that has no output section.
7826 (allocate_dynrel_entries): Correct comment.
7827 (elf64_hppa_finalize_dynreloc): Likewise. Don't create an opd entry
7828 unless we want one.
7829 (elf64_hppa_finalize_opd): Prevent segfault if dyn_h is NULL.
7830 (elf64_hppa_finalize_dlt): Likewise. Prevent segfault for symbols
7831 with no section. Remove unnecessary parentheses.
7832
7833 2002-06-11 Tom Rix <trix@redhat.com>
7834
7835 * coffcode.h (coff_compute_section_file_positions): Add data
7836 section to AIX loader alignment check.
7837
7838 * coff-rs6000.c (_bfd_xcoff_mkobject): Set default text section
7839 alignment to 4 bytes.
7840 (_bfd_xcoff_copy_private_bfd_data): Use text and data alignment
7841 power accessor macro.
7842 (do_shared_object_padding): Remove invalid assertion.
7843
7844 2002-06-10 Richard Sandiford <rsandifo@redhat.com>
7845
7846 * section.c (_bfd_strip_section_from_output): Set SEC_EXCLUDE
7847 for removed output sections.
7848
7849 2002-06-10 Geoffrey Keating <geoffk@redhat.com>
7850
7851 * merge.c (merge_strings): Use htab_create_alloc with calloc, not
7852 htab_alloc.
7853 * elf-strtab.c (_bfd_elf_strtab_finalize): Likewise.
7854
7855 2002-06-08 H.J. Lu <hjl@gnu.org>
7856
7857 * elf.c (copy_private_bfd_data): Don't cast to bfd_size_type to
7858 work around a long long bug in gcc 2.96 on mips.
7859
7860 2002-06-08 Jason Thorpe <thorpej@wasabisystems.com>
7861
7862 * Makefile.am (BFD32_BACKENDS): Add vax1knetbsd.lo.
7863 (BFD32_BACKENDS_CFILES): Add vax1knetbsd.c.
7864 Regenerate dependency lists.
7865 * Makefile.in: Regenerate.
7866 * config.bfd (vax-*-netbsdelf*, vax-*-netbsdaout*): Add
7867 vax1knetbsd_vec to targ_selvecs.
7868 * configure.in: Add vax1knetbsd_vec.
7869 * configure: Regenerate.
7870 * targets.c (_bfd_target_vector): Add vax1knetbsd_vec.
7871 * vax1knetbsd.c: New file.
7872 * vaxnetbsd.c: Update copyright years.
7873 (TARGET_PAGE_SIZE): Set to 0x1000.
7874 (DEFAULT_MID): Set to M_VAX4K_NETBSD.
7875
7876 2002-06-08 Matt Thomas <matt@3am-software.com>
7877
7878 * libaout.h (enum machine_type): Add M_VAX4K_NETBSD.
7879
7880 2002-06-08 Alan Modra <amodra@bigpond.net.au>
7881
7882 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Make static.
7883
7884 2002-06-08 Alan Modra <amodra@bigpond.net.au>
7885
7886 * Makefile.am: Run "make dep-am".
7887 * Makefile.in: Regenerate.
7888
7889 * armnetbsd.c: Replace CONST with const.
7890 * corefile.c: Likewise.
7891 * elf32-dlx.c: Likewise.
7892 * elf64-mips.c: Likewise.
7893 * mmo.c: Likewise.
7894 * ns32knetbsd.c: Likewise.
7895
7896 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Check the hash
7897 table is elf64-sparc.
7898
7899 2002-06-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7900
7901 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Simplify code.
7902 Fix RELA addends to get not shifted in the result. Don't do special
7903 handling of R_MIPS_64 for NewABI.
7904
7905 2002-06-07 Alan Modra <amodra@bigpond.net.au>
7906
7907 * aoutx.h (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
7908 (NAME(aout,slurp_reloc_table)): Likewise.
7909 * coff-mips.c (mips_relax_section): Use bfd_zalloc.
7910 * coff-rs6000.c (xcoff_write_armap_big): Use bfd_zmalloc.
7911 (xcoff_write_archive_contents_big): Likewise.
7912 (xcoff_generate_rtinit): Likewise.
7913 (xcoff_generate_rtinit): Likewise, and check error return.
7914 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
7915 * coffgen.c (coff_section_symbol): Use bfd_zalloc.
7916 (coff_get_normalized_symtab): Likewise.
7917 (coff_make_empty_symbol): Likewise.
7918 (bfd_coff_set_symbol_class): Likewise.
7919 * cofflink.c (coff_link_add_symbols): Likewise.
7920 * ecoff.c (_bfd_ecoff_make_empty_symbol): Likewise.
7921 * ecofflink.c (ecoff_write_shuffle): Use bfd_zmalloc.
7922 (bfd_ecoff_write_accumulated_debug): Likewise.
7923 * elf64-alpha.c (get_got_entry): Use bfd_zalloc.
7924 * i386linux.c (bfd_i386linux_size_dynamic_sections): Likewise.
7925 * i386lynx.c (NAME(lynx,slurp_reloc_table)): Use bfd_zmalloc.
7926 * ieee.c (do_with_relocs): Use bfd_zalloc.
7927 * m68klinux.c (bfd_m68klinux_size_dynamic_sections): Likewise.
7928 * pdp11.c (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
7929 (NAME(aout,slurp_reloc_table)): Likewise.
7930 (NAME(aout,squirt_out_relocs)): Don't memset when zalloc'd.
7931 * reloc16.c (bfd_coff_reloc16_relax_section): Use bfd_zmalloc.
7932 * som.c (som_build_and_write_symbol_table): Likewise.
7933 (som_slurp_string_table): Likewise.
7934 (som_slurp_symbol_table): Likewise.
7935 (som_bfd_ar_write_symbol_stuff): Likewise.
7936 * sparclinux.c (bfd_sparclinux_size_dynamic_sections): Use bfd_zalloc.
7937 * sunos.c (bfd_sunos_size_dynamic_sections): Likewise.
7938 * tekhex.c (find_chunk): Likewise. Get rid of unused "sname".
7939 * vms-gsd.c (_bfd_vms_slurp_gsd): Use bfd_zmalloc.
7940 * xcofflink.c (xcoff_link_add_symbols): Use bfd_zalloc/bfd_zmalloc.
7941
7942 2002-06-07 Alan Modra <amodra@bigpond.net.au>
7943
7944 * elf-bfd.h (struct bfd_elf_section_data <group_name>): Replace with
7945 "group" union.
7946 (elf_group_name): Update.
7947 (elf_group_id): Define.
7948 (bfd_elf_set_group_contents): Declare.
7949 * elf.c (elf_fake_sections): Qualify use of elf_group_name.
7950 (set_group_contents): Rename to bfd_elf_set_group_contents. Remove
7951 ATTRIBUTE_UNUSED from failedptrarg. If elf_group_id is set, use
7952 that sym for the signature.
7953 (_bfd_elf_compute_section_file_positions): Don't call
7954 set_group_contents for "ld -r" case.
7955 (swap_out_syms): Use bfd_zalloc.
7956 * elflink.h (elf_link_add_archive_symbols): Likewise.
7957 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
7958 (elf_bfd_final_link): Call bfd_elf_set_group_contents.
7959
7960 2002-06-07 Alan Modra <amodra@bigpond.net.au>
7961
7962 * elf64-ppc.c (ppc64_elf_relocate_section): Allow unresolved
7963 relocs in opd for non-shared too.
7964
7965 2002-06-06 Jeffrey Law <law@redhat.com>
7966
7967 * elf32-h8300.c (elf32_h8_relax_section): Ignore uninteresting
7968 relocations.
7969
7970 2002-06-06 Nick Clifton <nickc@cambridge.redhat.com>
7971
7972 * merge.c: Include libiberty.h.
7973 * elf-strtab.c: Include libiberty.h.
7974
7975 2002-06-06 Elias Athanasopoulos <eathan@otenet.gr>
7976
7977 * peXXigen.c (pe_print_idata): Remove unused variable.
7978
7979 2002-06-06 David Heine <dlheine@tensilica.com>
7980
7981 * elf.c (assign_file_positions_for_segments): Remove unallocated
7982 sections from the section to segment mapping for PT_LOAD segments.
7983 Update comment about empty loadable segments.
7984
7985 2002-06-06 Richard Sandiford <rsandifo@redhat.com>
7986
7987 * stabs.c (_bfd_link_section_stabs): Check that the symbol offset
7988 is within the .stabstr section.
7989
7990 2002-06-06 Alan Modra <amodra@bigpond.net.au>
7991
7992 * elf-bfd.h (struct elf_size_info <swap_symbol_in>): Function args
7993 are "const PTR", not "const PTR *".
7994 (bfd_elf32_swap_symbol_in): Likewise.
7995 (bfd_elf64_swap_symbol_in): Likewise.
7996 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR.
7997 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
7998 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
7999 (elf_link_add_object_symbols): Likewise.
8000 (elf_link_record_local_dynamic_symbol): Likewise.
8001 (elf_link_input_bfd): Likewise.
8002 (elf_gc_mark): Likewise.
8003 (elf_reloc_symbol_deleted_p): Likewise.
8004 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
8005 (mn10200_elf_relax_delete_bytes): Likewise.
8006 (mn10200_elf_symbol_address_p): Likewise.
8007 (mn10200_elf_get_relocated_section_contents): Likewise.
8008 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
8009 (mn10300_elf_relax_section): Likewise.
8010 (mn10300_elf_relax_delete_bytes): Likewise.
8011 (mn10300_elf_symbol_address_p): Likewise.
8012 (mn10300_elf_get_relocated_section_contents): Likewise.
8013 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
8014 (elf32_h8_relax_delete_bytes): Likewise.
8015 (elf32_h8_symbol_address_p): Likewise.
8016 (elf32_h8_get_relocated_section_contents): Likewise.
8017 * elf32-hppa.c (get_local_syms): Likewise.
8018 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
8019 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
8020 * elf32-sh.c (sh_elf_relax_section): Likewise.
8021 (sh_elf_relax_delete_bytes): Likewise.
8022 (sh_elf_get_relocated_section_contents): Likewise.
8023 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
8024 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
8025 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
8026 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
8027 * elf64-ppc.c (get_local_syms): Likewise.
8028 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
8029 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
8030
8031 2002-06-05 J"orn Rennecke <joern.rennecke@superh.com>
8032
8033 * config.bfd (sh64l*-*-elf*, shl*-*-elf*): New configurations.
8034
8035 2002-06-05 Alan Modra <amodra@bigpond.net.au>
8036
8037 * elf.c (group_signature): Swap in the whole symbol, and handle
8038 extracting section symbol names.
8039 (setup_group): Add comment.
8040 (set_group_contents): When called from objcopy or ld, arrange for
8041 section contents to be written. Write group member output section
8042 indices to allow objcopy to reorganize sections.
8043 (_bfd_elf_copy_private_section_data): Copy group info.
8044
8045 * elf-bfd.h (struct elf_size_info): Add swap_symbol_in field.
8046 (bfd_elf32_swap_symbol_in): Update prototype.
8047 (bfd_elf64_swap_symbol_in): Likewise.
8048 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR *.
8049 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
8050 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
8051 (elf_link_add_object_symbols): Likewise.
8052 (elf_link_record_local_dynamic_symbol): Likewise.
8053 (elf_link_input_bfd): Likewise.
8054 (elf_gc_mark): Likewise.
8055 (elf_reloc_symbol_deleted_p): Likewise.
8056 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
8057 (mn10200_elf_relax_delete_bytes): Likewise.
8058 (mn10200_elf_symbol_address_p): Likewise.
8059 (mn10200_elf_get_relocated_section_contents): Likewise.
8060 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
8061 (mn10300_elf_relax_section): Likewise.
8062 (mn10300_elf_relax_delete_bytes): Likewise.
8063 (mn10300_elf_symbol_address_p): Likewise.
8064 (mn10300_elf_get_relocated_section_contents): Likewise.
8065 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
8066 (elf32_h8_relax_delete_bytes): Likewise.
8067 (elf32_h8_symbol_address_p): Likewise.
8068 (elf32_h8_get_relocated_section_contents): Likewise.
8069 * elf32-hppa.c (get_local_syms): Likewise.
8070 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
8071 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
8072 * elf32-sh.c (sh_elf_relax_section): Likewise.
8073 (sh_elf_relax_delete_bytes): Likewise.
8074 (sh_elf_get_relocated_section_contents): Likewise.
8075 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
8076 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
8077 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
8078 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
8079 * elf64-ppc.c (get_local_syms): Likewise.
8080 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
8081 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
8082 * elfcode.h (NAME(_bfd_elf,size_info)): Update initialiser.
8083 * elf64-alpha.c (alpha_elf_size_info): Likewise.
8084 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
8085 * elf64-mips.c (mips_elf64_size_info): Likewise.
8086 * elf64-s390.c (s390_elf64_size_info): Likewise.
8087 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
8088
8089 2002-06-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
8090
8091 * elf32-mips.c (elf32_mips_ignore_discarded_relocs): Move to...
8092 elfxx-mips.c (_bfd_mips_elf_ignore_discarded_relocs): ... here.
8093 elf64-mips.c (elf_backend_ignore_discarded_relocs): Use
8094 _bfd_mips_elf_ignore_discarded_relocs.
8095 elfxx-mips.h (_bfd_mips_elf_ignore_discarded_relocs): Declare.
8096
8097 2002-06-05 H.J. Lu <hjl@gnu.org>
8098
8099 * elfxx-mips.c (mips_elf_calculate_relocation): Call
8100 _bfd_elf_rel_local_sym for STT_SECTION relocations against
8101 the SEC_MERGE section.
8102
8103 2002-06-05 Alan Modra <amodra@bigpond.net.au>
8104
8105 * coff-alpha.c: Update copyright date.
8106 * coff-mips.c: Likewise.
8107 * xcoff-target.h: Likewise.
8108
8109 * bfd-in.h: Remove "taken from the source" comment.
8110 * libbfd-in.h: Likewise.
8111 * libcoff-in.h: Likewise.
8112 * bfd-in2.h: Regenerate.
8113 * libbfd.h: Regenerate.
8114 * libcoff.h: Regenerate.
8115
8116 * elf.c (bfd_elf_discard_group): Return true.
8117 * elf-bfd.h (bfd_elf_discard_group): Declare.
8118 * bfd-in.h (bfd_elf_discard_group): Don't declare here.
8119 * section.c (bfd_discard_group): Rename to bfd_generic_discard_group.
8120 * bfd.c (bfd_discard_group): Define.
8121 * targets.c (struct bfd_target): Add _bfd_discard_group.
8122 (BFD_JUMP_TABLE_LINK): Here too.
8123 * libbfd-in.h (_bfd_nolink_bfd_discard_group): Define.
8124 * aout-adobe.c (aout_32_bfd_discard_group): Define.
8125 * aout-target.h (MY_bfd_discard_group): Define.
8126 * aout-tic30.c (MY_bfd_discard_group): Define.
8127 * binary.c (binary_bfd_discard_group): Define.
8128 * bout.c (b_out_bfd_discard_group): Define.
8129 * coff-alpha.c (_bfd_ecoff_bfd_discard_group): Define.
8130 * coffcode.h (coff_bfd_discard_group): Define.
8131 * coff-mips.c (_bfd_ecoff_bfd_discard_group): Define.
8132 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Define.
8133 * i386msdos.c (msdos_bfd_discard_group): Define.
8134 * i386os9k.c (os9k_bfd_discard_group): Define.
8135 * ieee.c (ieee_bfd_discard_group): Define.
8136 * ihex.c (ihex_bfd_discard_group): Define.
8137 * mmo.c (mmo_bfd_discard_group): Define.
8138 * nlm-target.h (nlm_bfd_discard_group): Define.
8139 * oasys.c (oasys_bfd_discard_group): Define.
8140 * ppcboot.c (ppcboot_bfd_discard_group): Define.
8141 * som.c (som_bfd_discard_group): Define.
8142 * srec.c (srec_bfd_discard_group): Define.
8143 * tekhex.c (tekhex_bfd_discard_group): Define.
8144 * versados.c (versados_bfd_discard_group): Define.
8145 * vms.c (vms_bfd_discard_group): Define.
8146 * xcoff-target.h (_bfd_xcoff_bfd_discard_group): Define.
8147 * coff64-rs6000.c (rs6000coff64_vec): Update initialiser.
8148 (aix5coff64_vec): Likewise.
8149 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Likewise.
8150
8151 2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
8152
8153 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-com.lo.
8154 (BFD32_BACKENDS_CFILES): Add elf32-sh64-com.c.
8155 (elf32-sh64-com.lo): New dependency list.
8156 * Makefile.in: Regenerate.
8157 * configure.in (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec)
8158 (bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec): Add
8159 elf32-sh64-com.lo.
8160 * configure: Regenerate.
8161 * elf32-sh64.c (sh64_address_in_cranges)
8162 (sh64_get_contents_type, sh64_address_is_shmedia): Move to...
8163 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb):
8164 (crange_bsearch_cmpl): Prepend _bfd_sh64_ to name and move to...
8165 * elf32-sh64-com.c: ...here. New file.
8166
8167 2002-06-04 Alan Modra <amodra@bigpond.net.au>
8168
8169 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Remove
8170 ATTRIBUTE_UNUSED on used params.
8171 * elf32-vax.c (elf_vax_gc_mark_hook): Remove unnecessary checks
8172 before calling bfd_section_from_elf_index on local syms.
8173 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
8174
8175 2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
8176
8177 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-nbsd.lo.
8178 (BFD32_BACKENDS_CFILES): Add elf32-sh64-nbsd.c.
8179 (BFD64_BACKENDS): Add elf64-sh64-nbsd.lo.
8180 (BFD64_BACKENDS_CFILES): Add elf64-sh64-nbsd.c.
8181 (elf32-sh64-nbsd.lo, elf64-sh64-nbsd.lo): New rules.
8182 * Makefile.in: Regenerate.
8183 * config.bfd (sh5le-*-netbsd*, sh5-*-netbsd*, sh64le-*-netbsd*)
8184 (sh64-*-netbsd*): New targets.
8185 * configure.in: Add bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec,
8186 bfd_elf64_sh64nbsd_vec, and bfd_elf64_sh64lnbsd_vec.
8187 * configure: Regenerate.
8188 * elf32-sh64-nbsd.c: New file.
8189 * elf64-sh64-nbsd.c: New file.
8190 * targets.c: Add extern decls for bfd_elf32_sh64nbsd_vec,
8191 bfd_elf32_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec, and
8192 bfd_elf64_sh64lnbsd_vec.
8193
8194 2002-06-04 Alan Modra <amodra@bigpond.net.au>
8195
8196 * elf.c (setup_group): Set SEC_LINK_ONCE on GRP_COMDAT groups.
8197 (bfd_section_from_shdr): Likewise. Set section name of group
8198 sections from signature.
8199 (group_signature): Split out from setup_group. Ensure symbol table
8200 is available.
8201 (bfd_elf_discard_group): New function.
8202 (_bfd_elf_make_section_from_shdr): Don't set SEC_LINK_ONCE on
8203 .gnu.linkonce* sections if they are members of a group.
8204 (set_group_contents): Set GRP_COMDAT flag.
8205 * section.c (bfd_discard_group): New function.
8206 * bfd-in.h (bfd_elf_discard_group): Declare.
8207 * bfd-in2.h: Regenerate.
8208 * elf-bfd.h (struct bfd_elf_section_data): Add linkonce_p field.
8209 (elf_linkonce_p): Define.
8210
8211 2002-06-04 Alan Modra <amodra@bigpond.net.au>
8212
8213 * elf.c (bfd_section_from_shdr): Make "name" const.
8214 * elf-bfd.h (elf_backend_section_from_shdr): Likewise.
8215 * elf32-i370.c (i370_elf_section_from_shdr): Likewise.
8216 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
8217 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
8218 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
8219 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
8220 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
8221 * elf64-ppc.c (ppc64_elf_section_from_shdr): Likewise.
8222 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
8223 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
8224 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
8225
8226 2002-06-03 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
8227
8228 * elfxx-mips.c (ABI_64_P): Use backend's data to determine the
8229 ABI.
8230
8231 2002-06-02 Kazu Hirata <kazu@cs.umass.edu>
8232
8233 * elf32-arc.c: Fix formatting.
8234 * elf32-arm.h: Likewise.
8235 * elf32-cris.c: Likewise.
8236 * elf32-dlx.c: Likewise.
8237 * elf32-hppa.c: Likewise.
8238 * elf32-i386.c: Likewise.
8239 * elf32-i386qnx.c: Likewise.
8240 * elf32-or32.c: Likewise.
8241 * elf32-s390.c: Likewise.
8242 * elf32-sh64.c: Likewise.
8243 * elf32-vax.c: Likewise.
8244 * elf32-xstormy16.c: Likewise.
8245 * elf64-alpha.c: Likewise.
8246 * elf64-mmix.c: Likewise.
8247 * elf64-ppc.c: Likewise.
8248 * elf64-s390.c: Likewise.
8249 * elf64-sh64.c: Likewise.
8250 * elf64-x86-64.c: Likewise.
8251
8252 2002-06-02 Richard Henderson <rth@redhat.com>
8253
8254 * elf64-alpha.c (elf64_alpha_relocate_section): Don't dereference
8255 null when there are no got entries for a symbol.
8256 (elf64_alpha_relax_find_tls_segment): Rearrange to avoid
8257 uninitialized variable warning.
8258
8259 2002-06-01 Richard Henderson <rth@redhat.com>
8260
8261 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Don't test for
8262 undefined symbols here.
8263 (elf64_alpha_relax_section): Do it here. Also test for not
8264 defined in the current module.
8265 (elf64_alpha_relocate_section_r): Split out of ...
8266 (elf64_alpha_relocate_section): ... here. Don't dereference
8267 NULL when looking up local got entries.
8268
8269 2002-06-01 Richard Henderson <rth@redhat.com>
8270
8271 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Reject undefined
8272 symbols from JSR relaxation.
8273 (elf64_alpha_size_plt_section_1): New.
8274 (elf64_alpha_calc_dynrel_sizes): Split out .rela.got bits ...
8275 (elf64_alpha_size_rela_got_1): ... here.
8276 (elf64_alpha_size_dynamic_sections): Split out .rela.got bits ...
8277 (elf64_alpha_size_rela_got_section): ... here.
8278 (elf64_alpha_size_plt_section): New.
8279 (elf64_alpha_relax_section): Call them.
8280 (elf64_alpha_size_got_sections): Remove output_bfd arg.
8281 (elf64_alpha_finish_dynamic_symbol): Check gotent use_count.
8282
8283 2002-06-01 Richard Henderson <rth@redhat.com>
8284
8285 * elf64-alpha.c (alpha_get_dtprel_base, alpha_get_tprel_base): New.
8286 (elf64_alpha_relocate_section): Use them. Reject LE TLS relocs
8287 in shared libraries. Fix DTPRELHI and TPRELHI value.
8288 (INSN_ADDQ, INSN_RDUNIQ): New.
8289 (struct alpha_relax_info): Add symtab_hdr, tls_segment, first_gotent.
8290 (elf64_alpha_relax_with_lituse): Return boolean. Remove irelend
8291 argument. Reject dynamic symbols. Use LITUSE symbolic constants.
8292 (elf64_alpha_relax_got_load): Rename from relax_without_lituse.
8293 Handle GOTDTPREL and GOTTPREL relocations.
8294 (elf64_alpha_relax_gprelhilo): New.
8295 (elf64_alpha_relax_tls_get_addr): New.
8296 (elf64_alpha_relax_find_tls_segment): New.
8297 (elf64_alpha_relax_section): Handle TLS relocations.
8298 (ALPHA_ELF_LINK_HASH_TLS_IE): New.
8299 (elf64_alpha_check_relocs): Set it.
8300
8301 2002-06-01 Richard Henderson <rth@redhat.com>
8302
8303 * elf64-alpha.c (elf64_alpha_relax_section): Don't store computed gp.
8304
8305 * elf64-alpha.c (elf64_alpha_check_relocs): Fix typo on maybe_dynamic
8306 check; don't suppress dynamic relocs for non-allocated sections.
8307
8308 * elf64-alpha.c: Remove dead code.
8309
8310 2002-05-31 Alan Modra <amodra@bigpond.net.au>
8311
8312 * bfd-in2.h: Regenerate.
8313 * libbfd.h: Regenerate.
8314 * po/SRC-POTFILES.in: Regenerate.
8315
8316 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate
8317 space for bss .plt.
8318
8319 2002-05-31 Graeme Peterson <gp@qnx.com>
8320
8321 * Makefile.am (BFD32_BACKENDS): Add elf32-i386qnx.lo.
8322 (BFD32_BACKENDS_CFILES): Add elf32-i386qnx.c.
8323 Run "make dep-am".
8324 * Makefile.in: Regenerate.
8325 * config.bfd: Add i[3456]86-*-nto-qnx* support.
8326 * configure.in: Add bfd_elf32_i386qnx_vec support.
8327 * configure: Regenerate.
8328 * elf-bfd.h (struct elf_backend_data): Add set_nonloadable_filepos,
8329 is_contained_by_filepos, and copy_private_bfd_data_p.
8330 * elf.c (assign_file_positions_for_segments): Call backend
8331 set_nonloadable_filepos. Fix non-K&R call to _bfd_error_handler.
8332 (IS_CONTAINED_BY_FILEPOS): Define.
8333 (INCLUDE_SECTION_IN_SEGMENT): Also test IS_CONTAINED_BY_FILEPOS.
8334 (copy_private_bfd_data): Use IS_CONTAINED_BY_FILEPOS. Typo fix.
8335 Fix non-K&R call to _bfd_error_handler.
8336 (_bfd_elf_copy_private_section_data): Use backend
8337 copy_private_bfd_data_p.
8338 * elf32-i386.c: Don't include elfxx-target.h when
8339 ELF32_I386_C_INCLUDED is defined.
8340 * elf32-i386qnx.c: New QNX elf backend file.
8341 * elfxx-target.h: Add elf_backend_set_nonloadable_filepos,
8342 elf_backend_is_contained_by_filepos, and
8343 elf_backend_do_copy_private_bfd_data.
8344 * targets.c: Add bfd_target bfd_elf32_i386qnx_vec.
8345
8346 2002-05-31 Alan Modra <amodra@bigpond.net.au>
8347
8348 * elfarm-oabi.c (bfd_elf32_arm_add_glue_sections_to_bfd): Define.
8349 Move other similar defines to start of file.
8350
8351 2002-05-30 Tom Rix <trix@redhat.com>
8352
8353 * coff-rs6000.c (xcoff_rtype2howto): Handle 16 bit R_RBA.
8354 * coff64-rs6000.c (xcoff64_rtype2howto): Same.
8355
8356 2002-05-30 Richard Henderson <rth@redhat.com>
8357
8358 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_TLSGD,
8359 ALPHA_ELF_LINK_HASH_LU_TLSLDM, ALPHA_ELF_LINK_HASH_LU_FUNC): New.
8360 (ALPHA_ELF_GOT_ENTRY_RELOCS_DONE): Remove.
8361 (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Remove.
8362 (struct alpha_elf_got_entry): Add reloc_type, reloc_done, reloc_xlated.
8363 (struct alpha_elf_obj_tdata): Rename total_got_entries and
8364 n_local_got_entries to total_got_size and local_got_size.
8365 (elf64_alpha_howto, elf64_alpha_reloc_map): Update for TLS relocs.
8366 (alpha_got_entry_size): New.
8367 (elf64_alpha_relax_with_lituse): Use it.
8368 (elf64_alpha_relax_without_lituse): Likewise.
8369 (MAX_GOT_SIZE): Rename from MAX_GOT_ENTRIES.
8370 (get_got_entry): New.
8371 (elf64_alpha_check_relocs): Handle TLS relocs. Reorganize.
8372 (elf64_alpha_adjust_dynamic_symbol): Test LU_FUNC as a mask.
8373 (elf64_alpha_merge_ind_symbols): Check gotent->reloc_type.
8374 (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots): Likewise.
8375 (elf64_alpha_calc_got_offsets_for_symbol): Use alpha_got_entry_size.
8376 (elf64_alpha_calc_got_offsets): Likewise.
8377 (alpha_dynamic_entries_for_reloc): New.
8378 (elf64_alpha_calc_dynrel_sizes): Use it.
8379 (elf64_alpha_size_dynamic_sections): Likewise.
8380 (elf64_alpha_relocate_section): Handle TLS relocations.
8381 * reloc.c: Add Alpha TLS relocations.
8382 * bfd-in2.h, libbfd.h: Rebuild.
8383
8384 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
8385
8386 * peXXigen.c (pe_print_idata): Remove double printed
8387 import table lines; add Bound-To comment.
8388
8389 2002-05-29 Matt Thomas <matt@3am-software.com>
8390
8391 * Makefile.am (BFD32_BACKENDS): Add elf32-vax.lo.
8392 (BFD32_BACKENDS_CFILES): Add elf32-vax.c.
8393 (elf32-vax.lo): New rule.
8394 * Makefile.in: Regenerate.
8395 * configure.in (bfd_elf32_vax_vec)
8396 (vaxnetbsd_vec): New vectors.
8397 * configure: Regenerate.
8398 * config.bfd (vax-*-netbsdelf*)
8399 (vax-*-netbsdaout*)
8400 (vax-*-netbsd*): New targets.
8401 * elf32-vax.c: New file.
8402 * reloc.c: Add VAX relocations.
8403 * bfd-in2.h: Regenerate.
8404 * targets.c (_bfd_target_vector): Add bfd_elf32_vax_vec.
8405
8406 2002-05-29 Jason Thorpe <thorpej@wasabisystems.com>
8407
8408 * config.bfd (arm-*-netbsd*): Add bfd_elf32_littlearm_vec
8409 and bfd_elf32_bigarm_vec to targ_selvecs.
8410
8411 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
8412
8413 * peXXigen.c (pe_print_idata): Fix seg faults on printing import tables
8414 with auto-imported symbols.
8415
8416 2002-05-29 Adam Nemet <anemet@lnxw.com>
8417
8418 * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Don't add glue
8419 sections only record bfd.
8420 (bfd_elf32_arm_add_glue_sections_to_bfd): New function.
8421 * bfd-in.h (bfd_elf32_arm_add_glue_sections_to_bfd): Declare it.
8422 * bfd-in2.h: Regenerate.
8423
8424 2002-05-28 Nick Clifton <nickc@cambridge.redhat.com>
8425
8426 * syms.c (_bfd_stab_section_find_nearest_line): Move
8427 declaration and initialisation of saw_line and saw_func out of
8428 for loop.
8429
8430 2002-05-29 Alan Modra <amodra@bigpond.net.au>
8431
8432 * elf64-ppc.c (ppc64_elf_get_symbol_info): New function.
8433 (bfd_elf64_get_symbol_info): Define.
8434 * elfxx-target.h (bfd_elfNN_get_symbol_info): Only define if undef.
8435
8436 2002-05-29 Andrey Volkov <avolkov@transas.com>
8437
8438 * cpu-h8300.c: Make default h8300 machine first in machine list.
8439
8440 2002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net>
8441
8442 * config.bfd: Added DLX configuraton.
8443 * Makefile.am: Added DLX configuraton.
8444 * configure.in: Added DLX configuraton.
8445 * archures.c: Add DLX architecture.
8446 * reloc.c: Add DLX relocs.
8447 * targets.c: Added DLX target vector.
8448 * configure: Regenerate.
8449 * Makefile.in: Regenreate.
8450 * bfd-in2.h: Regenreate.
8451 * elf32-dlx.c: New file: Support DLX target.
8452 * cpu-dlx.c: New file: Support DLX target.
8453
8454 2002-05-25 Alan Modra <amodra@bigpond.net.au>
8455
8456 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Formatting.
8457
8458 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Revert last change.
8459 (ppc64_elf_check_relocs): Don't set up function descriptor symbol
8460 strings to point inside function code sym string.
8461 (func_desc_adjust): Likewise.
8462 (ppc64_elf_hide_symbol): Rewrite code to look up function code sym.
8463
8464 2002-05-24 Michal Ludvig <mludvig@suse.cz>
8465
8466 * elf64-x86-64.c (elf64_x86_64_grok_prstatus): Added.
8467 (elf64_x86_64_grok_psinfo): Added.
8468
8469 2002-05-24 TAMURA Kent <kent@netbsd.org>
8470
8471 * config.bfd: Add a target for i386-netbsdpe.
8472
8473 2002-05-24 Alan Modra <amodra@bigpond.net.au>
8474
8475 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy is_func
8476 and is_func_descriptor.
8477 (func_desc_adjust): Hide function code sym in shared libs unless
8478 there is a matching exported function descriptor sym.
8479
8480 2002-05-23 Jakub Jelinek <jakub@redhat.com>
8481
8482 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_THREAD_LOCAL
8483 for symbols from SHF_TLS section.
8484 (_bfd_elf_print_private_bfd_data): Add PT_TLS.
8485 (elf_fake_sections): Set SHF_TLS for SEC_THREAD_LOCAL sections.
8486 (map_sections_to_segments): Build PT_TLS segment if necessary.
8487 (assign_file_positions_for_segments): Likewise.
8488 (get_program_header_size): Account for PT_TLS segment.
8489 (swap_out_syms): Set type of BSF_THREAD_LOCAL symbols and symbols from
8490 SEC_THREAD_LOCAL sections to STT_TLS.
8491 * reloc.c: Add 386 and IA-64 TLS relocs.
8492 * section.c (SEC_THREAD_LOCAL): Define.
8493 (SEC_CONSTRUCTOR_TEXT, SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS):
8494 Remove.
8495 * elflink.h (elf_link_add_object_symbols): Support .tcommon.
8496 (size_dynamic_sections): If DF_STATIC_TLS, set DF_FLAGS
8497 unconditionally.
8498 (struct elf_final_link_info): Add first_tls_sec.
8499 (elf_bfd_final_link): Set first_tls_sec.
8500 Compute elf_hash_table (info)->tls_segment.
8501 (elf_link_output_extsym): Handle STT_TLS symbols.
8502 (elf_link_input_bfd): Likewise.
8503 * syms.c (BSF_THREAD_LOCAL): Define.
8504 * bfd-in2.h: Rebuilt.
8505 * libbfd.h: Rebuilt.
8506 * elf32-i386.c (elf_i386_tls_transition, dtpoff_base, tpoff,
8507 elf_i386_mkobject, elf_i386_object_p): New functions.
8508 (elf_howto_table): Add TLS relocs.
8509 (elf_i386_reloc_type_lookup): Support TLS relocs.
8510 (elf_i386_info_to_howto_rel): Likewise.
8511 (struct elf_i386_link_hash_entry): Add tls_type.
8512 (struct elf_i386_obj_tdata): New.
8513 (elf_i386_hash_entry, elf_i386_tdata, elf_i386_local_got_tls_type):
8514 New macros.
8515 (struct elf_i386_link_hash_table): Add tls_ldm_got.
8516 (link_hash_newfunc): Clear tls_type.
8517 (elf_i386_check_relocs): Support TLS relocs.
8518 (elf_i386_gc_sweep_hook): Likewise.
8519 (allocate_dynrelocs): Likewise.
8520 (elf_i386_size_dynamic_sections): Likewise.
8521 (elf_i386_relocate_section): Likewise.
8522 (elf_i386_finish_dynamic_symbol): Likewise.
8523 (bfd_elf32_mkobject, elf_backend_object_p): Define.
8524 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add tprel_offset,
8525 dtpmod_offset, dtprel_offset, tprel_done, dtpmod_done, dtprel_done,
8526 want_tprel, want_dtpmod, want_dtprel.
8527 (elfNN_ia64_tprel_base, elfNN_ia64_dtprel_base): New functions.
8528 (ia64_howto_table): Add TLS relocs, rename R_IA64_LTOFF_TP22 to
8529 R_IA64_LTOFF_TPREL22.
8530 (elf_code_to_howto_index): Add TLS relocs.
8531 (elfNN_ia64_check_relocs): Support TLS relocs.
8532 (allocate_global_data_got): Account for TLS .got data.
8533 (allocate_dynrel_entries): Account for TLS dynamic relocations.
8534 (elfNN_ia64_install_value): Supprt TLS relocs.
8535 (set_got_entry): Support TLS relocs.
8536 (elfNN_ia64_relocate_section): Likewise.
8537
8538 2002-05-23 Nick Clifton <nickc@cambridge.redhat.com>
8539
8540 * elf32-arm.h (elf32_arm_final_link_relocate): For the Thumb
8541 BLX reloc round the relocation up rather than down.
8542 * coff-arm.c (coff_arm_relocate_section): Likewise.
8543
8544 2002-05-21 H.J. Lu (hjl@gnu.org)
8545
8546 * linker.c (_bfd_generic_link_add_one_symbol): Allow multiple
8547 definition.
8548
8549 2002-05-22 Alan Modra <amodra@bigpond.net.au>
8550
8551 * elf64-ppc.c (ppc64_elf_size_stubs): Don't strip .branch_lt.
8552 (ppc64_elf_relocate_section): Handle unresolved relocs in opd.
8553
8554 2002-05-22 Alan Modra <amodra@bigpond.net.au>
8555
8556 * elf64-ppc.c (ppc64_elf_relocate_section): Return false for
8557 unresolved relocs.
8558 (ppc64_elf_size_dynamic_sections): Check for splt NULL.
8559
8560 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8561
8562 * bfd.c (bfd_get_arch_size): Remove bfd_set_error call for
8563 non-ELF targets.
8564
8565 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8566
8567 * elf-bfd.h (elf_backend_emit_relocs): Change prototype to return
8568 an error value.
8569 * elflink.h (elf_link_output_relocs): Likewise. Improve error message.
8570 return with false on error.
8571 (elf_link_input_bfd): Check reloc_emitter return value.
8572
8573 2002-05-21 Jason Thorpe <thorpej@wasabisystems.com>
8574
8575 * config.bfd (armeb-*-netbsdelf*): New target.
8576
8577 2002-05-20 Alan Modra <amodra@bigpond.net.au>
8578
8579 * elf64-ppc.c (ppc_build_one_stub): Point undefined function syms
8580 at the plt call stub.
8581
8582 2002-05-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8583
8584 * cpu-mips.c (mips_compatible): Don't try to check machine
8585 compatibility.
8586
8587 2002-05-18 Tom Rix <trix@redhat.com>
8588
8589 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_out): Fix C_FILE auxent.
8590
8591 2002-05-17 Alan Modra <amodra@bigpond.net.au>
8592
8593 * elf64-ppc.c (ppc64_elf_info_to_howto): Formatting.
8594 (ppc64_elf_relocate_section): Don't warn about reloc overflow when
8595 we've already warned about an undefined symbol. Report more
8596 detail on reloc errors.
8597
8598 2002-05-17 Alan Modra <amodra@bigpond.net.au>
8599
8600 * acinclude.m4 (AM_INSTALL_LIBBFD): New.
8601 * configure.in: Invoke AM_INSTALL_LIBBFD.
8602 * Makefile.am (install-data-local): Revert 2002-05-13. Move to..
8603 (install_libbfd): .. New target.
8604 (uninstall_libbfd): Likewise.
8605 (install-bfdlibLTLIBRARIES): Likewise.
8606 (uninstall-bfdlibLTLIBRARIES): Likewise.
8607 (bfdlibdir): New.
8608 (bfdincludedir): New.
8609 (lib_LTLIBRARIES): Rename to bfdlib_LTLIBRARIES.
8610 * aclocal.m4: Regenerate.
8611 * configure: Regenerate.
8612 * Makefile.in: Regenerate.
8613
8614 2002-05-17 Stuart Balfour <sbalfour@cisco.com>
8615
8616 * hash.c (bfd_hash_lookup): Remove computation of len from inside
8617 hash loop.
8618
8619 2002-05-16 Nick Clifton <nickc@cambridge.redhat.com>
8620
8621 * config.bfd: Add targets for sh64-linux (little endian and
8622 big endian).
8623
8624 2002-05-15 Laurent Pinchart <laurent.pinchart@skynet.be>
8625
8626 * peXXigen.c (pe_print_idata): Do not assume that the first thunk
8627 is located in the same section as the import table. Instead
8628 check, and if necessary load the section containing the thunk.
8629
8630 2002-05-15 Nick Clifton <nickc@cambridge.redhat.com>
8631
8632 * aix5ppc-core.c (xcoff64_core_p): Replace bfd_read with
8633 bfd_bread.
8634 (xcoff64_core_file_matches_executable_p): Replace bfd_read
8635 with bfd_bread.
8636
8637 2002-05-15 Alan Modra <amodra@bigpond.net.au>
8638
8639 * aix5ppc-core.c: Warning fixes.
8640 * aout-adobe.c (aout_32_bfd_link_just_syms): Define.
8641 * aout-target.h (MY_bfd_link_just_syms): Define.
8642 * aout-tic30.c (MY_bfd_link_just_syms): Define.
8643 * bfd.c (bfd_link_just_syms): Define.
8644 * binary.c (binary_bfd_link_just_syms): Define.
8645 * bout.c (b_out_bfd_link_just_syms): Define.
8646 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update initializer.
8647 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
8648 * coffcode.h (coff_bfd_link_just_syms): Define.
8649 * elf-bfd.h (enum elf_link_info_type): Add ELF_INFO_TYPE_JUST_SYMS.
8650 (elf_discarded_section): Check for ELF_INFO_TYPE_JUST_SYMS.
8651 (_bfd_elf_link_just_syms): Declare.
8652 * elf.c (_bfd_elf_link_just_syms): New function.
8653 * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Check that
8654 sections haven't already been discarded by the linker.
8655 * elflink.h (elf_link_add_object_symbols): Likewise for stab
8656 sections and SEC_MERGE sections.
8657 (elf_bfd_discard_info): Similarly here.
8658 * elfxx-target.h (bfd_elfNN_bfd_link_just_syms): Define.
8659 * i386msdos.c (msdos_bfd_link_just_syms): Define.
8660 * i386os9k.c (os9k_bfd_link_just_syms): Define.
8661 * ieee.c (ieee_bfd_link_just_syms): Define.
8662 * ihex.c (ihex_bfd_link_just_syms): Define.
8663 * libbfd-in.h (_bfd_nolink_bfd_link_just_syms): Define.
8664 (_bfd_generic_link_just_syms): Declare.
8665 * libecoff.h (_bfd_ecoff_bfd_link_just_syms): Define.
8666 * linker.c (_bfd_generic_link_just_syms): New function.
8667 * mmo.c (mmo_bfd_link_just_syms): Define.
8668 * nlm-target.h (nlm_bfd_link_just_syms): Define.
8669 * oasys.c (oasys_bfd_link_just_syms): Define.
8670 * ppcboot.c (ppcboot_bfd_link_just_syms): Define.
8671 * som.c (som_bfd_link_just_syms): Define.
8672 * srec.c (srec_bfd_link_just_syms): Define.
8673 * targets.c (struct bfd_target): Add _bfd_link_just_syms.
8674 (BFD_JUMP_TABLE_LINK): And here.
8675 * tekhex.c (tekhex_bfd_link_just_syms): Define.
8676 * versados.c (versados_bfd_link_just_syms): Define.
8677 * vms.c (vms_bfd_link_just_syms): Define.
8678 * libbfd.h: Regenerate.
8679 * bfd-in2.h: Regenerate.
8680
8681 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8682
8683 * elf32-mips.c: Remove superfluous definitions copied from
8684 elfxx-mips.c.
8685 (bfd_elf32_bigmips_vec,bfd_elf32_littlemips_vec): Use the
8686 SGIish vectors to check the special case.
8687 (mips_elf_hi16_reloc): Fix comment.
8688 (mips_elf_got16_reloc): Likewise.
8689 (_bfd_mips_elf32_gprel16_reloc): Likewise.
8690 (elf_reloc_map): Code cleanup.
8691 (mips_reloc_map): Add comment.
8692 (bfd_elf23_bfd_reloc_type_lookup): Code cleanup.
8693 (mips_elf32_rtype_to_howto): Likewise.
8694 (mips_elf32_discard_info): Likewise.
8695 (elf32_mips_irix_compat): Invert logic: Only SGIish vectors
8696 lead to IRIX compatibility now.
8697
8698 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8699
8700 * elfxx-mips.c: Call it IRIX, not Irix in comments.
8701
8702 2002-05-13 Jason Thorpe <thorpej@wasabisystems.com>
8703
8704 * config.bfd (shle-*-netbsdelf*): Add target which includes
8705 sh64 support.
8706
8707 2002-05-13 David Edelsohn <edelsohn@gnu.org>
8708
8709 * configure.in: Revert 2002-04-07. Instead, auto-configure
8710 HAVE_ST_C_IMPL.
8711 * configure: Regenerate.
8712 * config.in: Regenerate.
8713 * rs6000-core.c (CNEW_IMPL): Guard use of c_impl with HAVE_ST_C_IMPL
8714 or AIX_5_CORE.
8715
8716 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
8717
8718 * configure.in (sparc*-*-openbsd*): Support sparc64-openbsd
8719 corefiles as well.2
8720 * configure: Regenerate.
8721
8722 2002-05-13 Alan Modra <amodra@bigpond.net.au>
8723
8724 * Makefile.am (install-data-local): Install headers to
8725 $(exec_prefix)/include.
8726 * Makefile.in: Regenerate.
8727
8728 2002-05-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
8729 Daniel Jacobowitz <drow@mvista.com>
8730
8731 * coff-sh.c (sh_reloc_map): Map to R_SH_IMM32 for non-PE. Don't
8732 map BFD_RELOC_RVA.
8733
8734 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
8735
8736 * config.bfd (alpha*-*-openbsd*, sparc64*-*-openbsd*,
8737 hppa*-*-openbsd*): New targets.
8738 * configure.in (alpha*-*-openbsd*): Set COREFILE.
8739 * configure: Regenerate.
8740
8741 2002-05-10 Tom Rix <trix@redhat.com>
8742
8743 * coff64-rs6000.c (xcoff64_reloc_type_br): New function for
8744 xcoff64_ppc_relocate_section.
8745 * coff-rs6000.c : Extern common xcoff_reloc_type functions.
8746 * libxcoff.h: Common xcoff_reloc_type function declaration.
8747
8748 2002-05-10 Alan Modra <amodra@bigpond.net.au>
8749
8750 * elf32-i386.c (elf_i386_relocate_section): Remove overflow checks
8751 added in 2002-05-09 commit.
8752
8753 * elf32-hppa.c (elf32_hppa_size_stubs): Revert part of 2002-05-04,
8754 don't look for stubs on all undefined syms.
8755
8756 2002-05-09 Alan Modra <amodra@bigpond.net.au>
8757
8758 * elf64-ppc.c (RA_REGISTER_MASK, RA_REGISTER_SHIFT): Delete.
8759 (ppc64_elf_howto_raw <R_PPC64_RELATIVE>): Not pc_relative or
8760 pcrel_offset.
8761
8762 * elf32-i386.c (elf_howto_table): Comments.
8763 (elf_i386_relocate_section): Handle more relocs for relocatable
8764 linking and against SEC_MERGE sections.
8765
8766 2002-05-08 Alan Modra <amodra@bigpond.net.au>
8767
8768 * elf32-ppc.c (ppc_elf_create_got): New function.
8769 (ppc_elf_create_dynamic_sections): Call ppc_elf_create_got before
8770 _bfd_elf_create_dynamic_sections. Correct .plt flags.
8771 (ppc_elf_check_relocs): Use ppc_elf_create_got in place of
8772 _bfd_elf_create_got_section.
8773
8774 2002-05-07 Alan Modra <amodra@bigpond.net.au>
8775
8776 * elf-bfd.h (struct elf_backend_data): Add rela_normal.
8777 * elfxx-target.h (elf_backend_rela_normal): Define.
8778 (elfNN_bed): Init rela_normal.
8779 * elflink.h (elf_link_input_bfd <emit_relocs>): Handle adjustment
8780 for section symbols here if rela_normal. Simplify abs section test.
8781 * elf-m10200.c (mn10200_elf_relocate_section): If relocatable,
8782 return immediately. Remove code handling relocatable linking.
8783 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
8784 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
8785 * elf32-i370.c (i370_elf_relocate_section): Likewise.
8786 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
8787 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
8788 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
8789 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
8790 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
8791 * elf32-s390.c (elf_s390_relocate_section): Likewise.
8792 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
8793 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
8794 * elf64-s390.c (elf_s390_relocate_section): Likewise.
8795 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
8796 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
8797 * elf32-arm.h (elf32_arm_relocate_section): Likewise #ifndef USE_REL.
8798 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
8799 * elf-m10200.c (elf_backend_rela_normal): Define.
8800 * elf-m10300.c (elf_backend_rela_normal): Define.
8801 * elf32-fr30.c (elf_backend_rela_normal): Define.
8802 * elf32-i370.c (elf_backend_rela_normal): Define.
8803 * elf32-i860.c (elf_backend_rela_normal): Define.
8804 * elf32-m68k.c (elf_backend_rela_normal): Define.
8805 * elf32-mcore.c (elf_backend_rela_normal): Define.
8806 * elf32-openrisc.c (elf_backend_rela_normal): Define.
8807 * elf32-ppc.c (elf_backend_rela_normal): Define.
8808 * elf32-s390.c (elf_backend_rela_normal): Define.
8809 * elf32-xstormy16.c (elf_backend_rela_normal): Define.
8810 * elf64-ppc.c (elf_backend_rela_normal): Define.
8811 * elf64-s390.c (elf_backend_rela_normal): Define.
8812 * elf64-x86-64.c (elf_backend_rela_normal): Define.
8813 * elfxx-ia64.c (elf_backend_rela_normal): Define.
8814 * elf32-arm.h (elf_backend_rela_normal): Define #ifndef USE_REL.
8815 * elf32-m32r.c (elf_backend_rela_normal): Likewise.
8816
8817 2002-05-06 Nick Clifton <nickc@cambridge.redhat.com>
8818
8819 * elf32-arm.h (elf32_arm_final_link_relocate): Convert
8820 'reloc_signed_max' and 'reloc_signed_min' into half-word offsets.
8821
8822 2002-05-06 Alan Modra <amodra@bigpond.net.au>
8823
8824 * elflink.h (elf_link_input_bfd <emit_relocs>): Adjust r_offset
8825 when not relocatable. Fix reloc_emitter call for K&R.
8826
8827 2002-05-04 Alan Modra <amodra@bigpond.net.au>
8828
8829 * elf64-ppc.c (ppc64_elf_relocate_section): Reinstate code
8830 reloading local sym addend mistakenly removed in 2002-05-01 change.
8831
8832 * dwarf2.c (struct line_head): Make prologue_length a bfd_vma.
8833 (read_abbrevs): Change "offset" param to bfd_vma.
8834 (parse_comp_unit): Change "version" and addr_size to unsigned ints.
8835 Change "abbrev_offset" to bfd_vma.
8836 (read_indirect_string): Use correct conversion chars in error
8837 message format string, cast bfd_vma's to unsigned long.
8838 (read_abbrevs): Likewise.
8839 (read_attribute_value): Likewise.
8840 (decode_line_info): Likewise.
8841 (scan_unit_for_functions): Likewise.
8842 (parse_comp_unit): Likewise.
8843
8844 2002-05-04 Tom Rix <trix@redhat.com>
8845
8846 * coffswap.h (coff_swap_reloc_in): Remove XCOFF support.
8847 (coff_swap_reloc_out): Same.
8848 * coff-rs6000.c: (xcoff_swap_reloc_in): Moved from coffswap.h.
8849 (xcoff_swap_reloc_out): Same.
8850 (xcoff_rtype2howto): Renamed from _bfd_xcoff_rtype2howto. Special
8851 case some 16 bit relocs. Add reloc value to output.
8852 (xcoff_howto_table): Remove 64 bit R_POS, add 16 bit
8853 R_RBR. Improve names.
8854 (_bfd_xcoff_reloc_type_lookup): Adjust for removal of 64 bit R_POS.
8855 (bfd_xcoff_backend_data): Update with new reloc swap names.
8856 (bfd_pmac_xcoff_backend_data) : Same.
8857 * coff64-rs6000.c: (xcoff64_swap_reloc_in): Moved from coffswap.h.
8858 (xcoff64_swap_reloc_out): Same.
8859 (xcoff64_rtype2howto): Special case some 16 bit relocs and 32 bit
8860 R_POS. Add reloc value to output.
8861 (xcoff64_howto_table): Move 64 bit R_POS to first entry. Add 16
8862 bit R_RBR. Improve names, masks.
8863 (xcoff64_reloc_type_lookup): Adjust for move of 64 bit R_POS.
8864 (bfd_xcoff_backend_data): Update with new reloc swap names.
8865 (bfd_xcoff_aix5_backend_data) : Same.
8866
8867 2002-05-04 Alan Modra <amodra@bigpond.net.au>
8868
8869 * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add
8870 bfd_count top_index, input_list, all_local_syms.
8871 (elf32_hppa_setup_section_lists): New function, split from
8872 elf32_hppa_size_stubs.
8873 (elf32_hppa_next_input_section): Likewise.
8874 (group_sections): Likewise.
8875 (get_local_syms): Likewise.
8876 (elf32_hppa_size_stubs): Adjust for split out functions. Look for
8877 stubs on undefined syms too.
8878 (elf32_hppa_set_gp): Use bfd_link_hash* instead of elf_link_hash*.
8879 Only access htab elf fields when we have an elf hash table.
8880 * elf32-hppa.h (elf32_hppa_setup_section_lists): Declare.
8881 (elf32_hppa_next_input_section): Declare.
8882
8883 2002-05-04 Bob Byrnes <byrnes@curl.com>
8884
8885 * opncls.c (_bfd_new_bfd_contained_in): Check return value of
8886 _bfd_new_bfd.
8887
8888 2002-05-03 H.J. Lu (hjl@gnu.org)
8889
8890 * elfxx-mips.c (mips_elf_link_hash_entry): Add forced_local.
8891 (mips_elf_link_hash_newfunc): Initialize forced_local to false.
8892 (mips_elf_record_global_got_symbol): Call _bfd_mips_elf_hide_symbol
8893 to hide a global symbol.
8894 (_bfd_mips_elf_hide_symbol): Return if forced_local is true. Set
8895 forced_local to true.
8896
8897 2002-05-02 Richard Henderson <rth@redhat.com>
8898
8899 * elf64-alpha.c (elf64_alpha_relocate_section): Force relative relocs
8900 vs SHN_UNDEF to zero.
8901
8902 2002-05-02 Alan Modra <amodra@bigpond.net.au>
8903
8904 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_SECTOFF>): Change to a
8905 16 bit reloc.
8906 <R_PPC64_SECTOFF_DS>: Likewise.
8907 (ppc64_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
8908 SECTOFF reloc.
8909 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_SECTOFF>): Correct.
8910 (ppc_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
8911 SECTOFF reloc.
8912
8913 * elf64-ppc.c (ppc64_elf_addr16_ha_reloc): Delete.
8914 (ppc64_elf_ha_reloc): New function.
8915 (ppc64_elf_brtaken_reloc): New function.
8916 (ppc64_elf_sectoff_reloc): New function.
8917 (ppc64_elf_sectoff_ha_reloc): New function.
8918 (ppc64_elf_toc_reloc): New function.
8919 (ppc64_elf_toc_ha_reloc): New function.
8920 (ppc64_elf_toc64_reloc): New function.
8921 (ppc64_elf_unhandled_reloc): New function.
8922 (ppc64_elf_howto_raw): Use the above.
8923 <R_PPC64_RELATIVE>: Mark pc_relative, pcrel_offset.
8924 <R_PPC64_SECTOFF>: Not pc_relative or pcrel_offset. Fix dst_mask.
8925 <R_PPC64_SECTOFF_DS>: Likewise.
8926 (IS_ABSOLUTE_RELOC): Update.
8927 (struct ppc_link_hash_table): Add have_undefweak.
8928 (ppc64_elf_link_hash_table_create): Init.
8929 (func_desc_adjust): Set have_undefweak.
8930 (ppc64_elf_func_desc_adjust): Call func_desc_adjust earlier. Only
8931 add the .sfpr blr when have_undefweak.
8932 (ppc64_elf_setup_section_lists): Check hash table flavour.
8933 (ppc64_elf_next_input_section): Move output_section->owner test to
8934 ppc64elf.em.
8935 (ppc64_elf_set_toc): Rename to ppc64_elf_toc, remove info param
8936 and relocatable test. Return TOCstart and don't set elf_gp.
8937 (ppc64_elf_relocate_section): Correct BRTAKEN/BRNTAKEN branch
8938 offset calculation. Add assert on weak sym branch tweaks.
8939 * elf64-ppc.h (ppc64_elf_set_toc): Delete.
8940 (ppc64_elf_toc): Declare.
8941 (ppc64_elf_next_input_section): Update.
8942
8943 2002-05-01 Alan Modra <amodra@bigpond.net.au>
8944
8945 * syms.c (_bfd_stab_section_find_nearest_line): Don't bomb on NULL
8946 file_name.
8947
8948 2002-05-01 Alan Modra <amodra@bigpond.net.au>
8949
8950 * elf64-ppc.c (CROR_151515, CROR_313131): Define.
8951 (ppc64_elf_relocate_section): Use them. Don't look for plt calls
8952 on R_PPC64_ADDR24 relocs. Require a nop or no link reg on plt
8953 call branches. Correct undefined weak destination.
8954 (ppc64_elf_func_desc_adjust): Always create at least one blr in
8955 .sfpr, and correct case where either only savef* or restf* is
8956 needed.
8957
8958 Long branch stubs, multiple stub sections.
8959 * elf64-ppc.h (ppc64_elf_setup_section_lists): Declare.
8960 (ppc64_elf_next_input_section): Declare.
8961 * elf64-ppc.c: Move linker-only prototypes.
8962 (STUB_SUFFIX): Define.
8963 (enum ppc_stub_type): New.
8964 (struct ppc_stub_hash_entry): New.
8965 (struct ppc_branch_hash_entry): New.
8966 (struct ppc_link_hash_entry): Add stub_cache, oh.
8967 (struct ppc_link_hash_table): Add stub_hash_table etc. Remove
8968 sstub. Add sbrlt, srelbrlt, has_14bit_branch, stub_iteration.
8969 Rename plt_overflow to stub_error.
8970 (ppc_stub_hash_lookup): Define.
8971 (ppc_branch_hash_lookup): Define.
8972 (stub_hash_newfunc): New function.
8973 (branch_hash_newfunc): New function.
8974 (link_hash_newfunc): Init new fields.
8975 (ppc64_elf_link_hash_table_create): Likewise.
8976 (ppc64_elf_link_hash_table_free): New function.
8977 (ppc_stub_name): New function.
8978 (ppc_get_stub_entry): New function.
8979 (ppc_add_stub): New function.
8980 (create_linkage_sections): Use bfd_make_section_anyway. Create
8981 .branch_lt and .rela.branch_lt sections. Don't create .stub.
8982 (ppc64_elf_check_relocs): Set has_14bit_branch on R_PPC64_REL14*,
8983 and set up for plt call stubs. Link func and func desc syms.
8984 (ppc64_elf_gc_sweep_hook): Handle REL14* as per REL24.
8985 (func_desc_adjust): Avoid hash lookup when func desc sym available
8986 via shortcut, and set links when processing.
8987 (ppc64_elf_hide_symbol): Likewise.
8988 (allocate_dynrelocs): Don't allocate stub section here.
8989 (ppc64_elf_size_dynamic_sections): Handle sbrlt and srelbrlt.
8990 Remove sstub code.
8991 (ppc_type_of_stub): New function.
8992 (build_one_stub): Delete.
8993 (ppc_build_one_stub): New function.
8994 (ppc_size_one_stub): New function.
8995 (ppc64_elf_setup_section_lists): New function.
8996 (ppc64_elf_next_input_section): New function.
8997 (group_sections): New function.
8998 (get_local_syms): New function.
8999 (ppc64_elf_size_stubs): Rewrite.
9000 (ppc64_elf_build_stubs): Rewrite.
9001 (ppc64_elf_relocate_section): Look up stub entry for REL24
9002 relocs. Don't propagate REL14* to dynamic objects. Look for long
9003 branch stubs if REL14* or REL24 relocs won't reach.
9004 (bfd_elf64_bfd_link_hash_table_free): Define.
9005
9006 2002-04-30 Mark Mitchell <mark@codesourcery.com>
9007
9008 * config.bfd: Add support for powerpc-*-windiss.
9009
9010 2002-04-30 Tom Rix <trix@redhat.com>
9011
9012 * xcofflink.c (xcoff_link_add_symbols): Always copy undef C_EXT
9013 symbol names into the hash table.
9014
9015 2002-04-28 Tom Rix <trix@redhat.com>
9016
9017 * coff-rs6000.c (xcoff_calculate_relocation) : Function table for
9018 calulating relocations.
9019 (xcoff_complain_overflow) : Function table for relocation errors.
9020 (xcoff_ppc_relocate_section): Use relocation and complain function
9021 tables.
9022 (xcoff_complain_overflow_unsigned_func): New complain function.
9023 (xcoff_complain_overflow_signed_func): Same.
9024 (xcoff_complain_overflow_bitfield_func): Same.
9025 (xcoff_complain_overflow_dont_func): Same.
9026 (xcoff_reloc_type_crel): New recot function.
9027 (xcoff_reloc_type_br): Same.
9028 (xcoff_reloc_type_ba): Same.
9029 (xcoff_reloc_type_toc): Same.
9030 (xcoff_reloc_type_rel): Same.
9031 (xcoff_reloc_type_neg): Same.
9032 (xcoff_reloc_type_pos): Same.
9033 (xcoff_reloc_type_fail): Same.
9034 (xcoff_reloc_type_noop): Same.
9035 * libxcoff.h : Declare common parts for xcoff64.
9036 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Use relocation
9037 and complain function tables.
9038
9039 2002-04-28 Alan Modra <amodra@bigpond.net.au>
9040
9041 * elf64-x86-64.c (struct elf64_x86_64_dyn_relocs): Comment typo.
9042 * elf32-hppa.c (elf32_hppa_final_link): Formatting.
9043
9044 2002-04-26 Alan Modra <amodra@bigpond.net.au>
9045
9046 * opncls.c (bfd_make_readable): Call bfd_section_list_clear.
9047 * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
9048
9049 * elflink.h (elf_bfd_final_link): Ensure input bfd class is the
9050 same as the output before calling elf_link_input_bfd.
9051
9052 * coffcode.h (coff_compute_section_file_positions): Set
9053 section_tail after shuffling section list.
9054
9055 2002-04-24 Christian Groessler <chris@groessler.org>
9056
9057 * coff-z8k.c (extra_case): Fix R_IMM32 relocations: The
9058 addresses are 23bit with a special layout, not plain 32bit
9059 values. Prevent relocation of immediate values.
9060
9061 2002-04-24 Chris G. Demetriou <cgd@broadcom.com>
9062
9063 * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): If MDMX or
9064 MIPS-16 ASE flags are set, print something to indicate that.
9065
9066 2002-04-23 Alan Modra <amodra@bigpond.net.au>
9067
9068 * elf32-hppa.c (hppa_type_of_stub): Correct and simplify condition
9069 under which a plt call stub is used.
9070 (final_link_relocate): Similarly.
9071 (allocate_plt_static): Clear h-plabel except when plt entry is
9072 exclusively used for a plabel.
9073 (allocate_dynrelocs): Use the above to simplify plt sizing.
9074 (struct elf32_hppa_link_hash_table): Add has_22bit_branch.
9075 (elf32_hppa_link_hash_table_create): Init.
9076 (BL22_RP): Define.
9077 (hppa_build_one_stub): Use BL22_RP if has_22bit_branch.
9078 (elf32_hppa_check_relocs): Set has_22bit_branch.
9079
9080 * elf32-hppa.c (elf32_hppa_check_relocs): Remove debug message.
9081 (final_link_relocate): Likewise.
9082
9083 2002-04-22 Jakub Jelinek <jakub@redhat.com>
9084
9085 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't build
9086 search table if some FDE is DW_EH_PE_aligned encoded either.
9087 (_bfd_elf_write_section_eh_frame): Handle terminating FDE specially.
9088
9089 2002-04-22 Richard Smith <richard@ex-parrot.com>
9090 Jakub Jelinek <jakub@redhat.com>
9091
9092 * elf-eh-frame.c (struct eh_cie_fde): Add per_encoding_relative.
9093 (_bfd_elf_discard_section_eh_frame): Set it for CIEs with pcrel
9094 encoded personality.
9095 (_bfd_elf_write_section_eh_frame): Adjust pcrel encoded personality
9096 for CIE/FDE removal.
9097
9098 2002-04-20 Tom Rix <trix@redhat.com>
9099
9100 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Fix C_FILE auxent.
9101
9102 2002-04-20 Alan Modra <amodra@bigpond.net.au>
9103
9104 * archures.c (bfd_lookup_arch): Move the list order comment..
9105 (struct bfd_arch_info): ..to where it belongs.
9106 * bfd-in2.h: Regenerate.
9107
9108 * archures.c (bfd_lookup_arch): Add comment on list order.
9109 (bfd_default_set_arch_mach): Use bfd_lookup_arch.
9110 * cpu-powerpc.c (bfd_powerpc_archs): Re-order so that the default
9111 is always at head of list.
9112
9113 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
9114
9115 * coff-arm.c (coff_thumb_pcrel_12, coff_thumb_pcrel_9,
9116 insert_thumb_branch, record_thumb_to_arm_glue): Suppress
9117 definition of these functions for ARM_WINCE builds as they are
9118 not used.
9119 (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET): Do not define
9120 for ARM_WINCE builds.
9121
9122 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
9123
9124 * coff-arm.c (bfd_arm_process_before_allocation):
9125
9126 2002-04-17 J"orn Rennecke <joern.rennecke@superh.com>
9127
9128 * cpu-sh.c (scan_mach): Delete.
9129 (arch_info_struct): Replace scan_mach with bfd_default_scan.
9130 (bfd_sh_arch): Likewise.
9131
9132 2002-04-16 Nick Clifton <nickc@cambridge.redhat.com>
9133
9134 * ihex.c (ihex_write_object_contents): Fix check for records
9135 crossing 64K boundaries.
9136
9137 2002-04-16 Alan Modra <amodra@bigpond.net.au>
9138
9139 * elf32-m32r.c (m32r_elf_add_symbol_hook): Check the hash table
9140 type rather than just assuming entries are ELF.
9141 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
9142 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
9143 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Likewise.
9144 * elf64-mmix.c (mmix_elf_add_symbol_hook): Use bfd_link_hash_entry
9145 rather than elf_link_hash_entry.
9146
9147 2002-04-15 Richard Henderson <rth@redhat.com>
9148
9149 * elf32-mips.c (mips_elf32_object_p): Revert 0404 fragment: allow
9150 n32 binaries.
9151
9152 2002-04-15 Michael Snyder <msnyder@redhat.com>
9153
9154 * opncls.c (bfd_close): Write contents if writeable.
9155 Minor formatting tidy-ups.
9156
9157 2002-04-15 Alan Modra <amodra@bigpond.net.au>
9158
9159 * elf32-ppc.c (ppc_elf_add_symbol_hook): Check the hash table type.
9160
9161 2002-04-12 Michael Snyder <msnyder@redhat.com>
9162
9163 * bfd-in.h (bfd_get_section_lma): New access macro.
9164 Minor white-space fix-up.
9165
9166 2002-04-12 Alan Modra <amodra@bigpond.net.au>
9167
9168 * elf.c (prep_headers): Don't zero EI_OSABI, EI_ABIVERSION or
9169 header pad.
9170
9171 2002-04-09 DJ Delorie <dj@redhat.com>
9172
9173 * elfarm-nabi.c (elf32_arm_howto_table): Fix ABS16 masks.
9174
9175 2002-04-09 Casper S. Hornstrup <chorns@users.sourceforge.net>
9176
9177 * coffcode.h (coff_read_word): New.
9178 (coff_compute_checksum): New.
9179 (coff_apply_checksum): New.
9180 (coff_write_object_contents): Call coff_apply_checksum () to
9181 apply checksum to PE image.
9182
9183 2002-04-08 Randolph Chung <tausq@debian.org>
9184
9185 * elf32-hppa.c (hppa_unwind_entry_compare): Move to elf-hppa.h.
9186 (elf32_hppa_final_link): Split out sorting logic to..
9187 * elf-hppa.h (elf_hppa_sort_unwind): ..here.
9188 (elf_hppa_final_link): Call elf_hppa_sort_unwind.
9189
9190 2002-04-07 Andrew Cagney <ac131313@redhat.com>
9191
9192 * configure.in: Add missing ``|'' to powerpc-*-aix4.[4-9]*
9193 pattern.
9194 * configure: Re-generate.
9195
9196 2002-04-07 Andrew Cagney <ac131313@redhat.com>
9197
9198 * configure.in: Only define AIX_CORE_DUMPX_CORE when AIX version
9199 is greater or equal to 4.3.3.
9200 * configure: Regenerate.
9201 Fix PR gdb/344.
9202
9203 2002-04-05 Hans-Peter Nilsson <hp@axis.com>
9204
9205 * elf32-cris.c (cris_elf_howto_table) <R_CRIS_16_PCREL,
9206 R_CRIS_32_PCREL>: Fix typo in name.
9207 (cris_elf_check_relocs): Always create .rela.got here when
9208 R_CRIS_16_GOTPLT or R_CRIS_32_GOTPLT is seen.
9209 (elf_cris_adjust_gotplt_to_got): Don't create .rela.got here;
9210 assume it's created.
9211
9212 2002-04-04 Daniel Jacobowitz <drow@mvista.com>
9213
9214 * aout-adobe.c (aout_32_bfd_link_hash_table_free): Define.
9215 * aout-target.h (MY_bfd_link_hash_table_free): Conditionally
9216 define.
9217 * aout-tic30.c (MY_bfd_link_hash_table_free): Likewise.
9218 * bfd.c (bfd_link_hash_table_free): Define.
9219 * binary.c (binary_bfd_link_hash_table_free): Define.
9220 * bout.c (b_out_bfd_link_hash_table_free): Define.
9221 * coff-rs6000.c (rs6000coff_vec): Include
9222 _bfd_generic_link_hash_table_free.
9223 (pmac_xcoff_vec): Likewise.
9224 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
9225 (aix5coff64_vec): Likewise.
9226 * coffcode.h (coff_bfd_link_hash_table_free): Conditionally define.
9227 * elf-m10300.c (elf32_mn10300_link_hash_table_free): New function.
9228 (bfd_elf32_bfd_link_hash_table_free): Define.
9229 * elf32-hppa.c (elf32_hppa_link_hash_table_free): New function.
9230 (bfd_elf32_bfd_link_hash_table_free): Define.
9231 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Conditionally
9232 define.
9233 * i386msdos.c (msdos_bfd_link_hash_table_free): Define.
9234 * i386os9k.c (os9k_bfd_link_hash_table_free): Define.
9235 * ieee.c (ieee_bfd_link_hash_table_free): Define.
9236 * ihex.c (ihex_bfd_link_hash_table_free): Define.
9237 * libbfd-in.h (_bfd_nolink_bfd_link_hash_table_free): Define.
9238 (_bfd_generic_link_hash_table_free): Add prototype.
9239 * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Add prototype.
9240 * libecoff.h (_bfd_ecoff_bfd_link_hash_table_free): Define.
9241 * linker.c (_bfd_generic_link_hash_table_free): New function.
9242 * mmo.c (mmo_bfd_link_hash_table_free): Define.
9243 * nlm-target.h (nlm_bfd_link_hash_table_free): Define.
9244 * oasys.c (oasys_bfd_link_hash_table_free): Define.
9245 * ppcboot.c (ppcboot_bfd_link_hash_table_free): Define.
9246 * som.c (som_bfd_link_hash_table_free): Define.
9247 * srec.c (srec_bfd_link_hash_table_free): Define.
9248 * tekhex.c (tekhex_bfd_link_hash_table_free): Define.
9249 * versados.c (versados_bfd_link_hash_table_free): Define.
9250 * vms.c (vms_bfd_link_hash_table_free): New function.
9251 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_free): New function.
9252
9253 * coff-arm.c (coff_arm_link_hash_table_create): Use bfd_malloc
9254 instead of bfd_alloc.
9255 * coff-h8300.c (h8300_coff_link_hash_table_create): Likewise.
9256 * coff-mcore.c (coff_mcore_link_hash_table_create): Likewise.
9257 * coff-ppc.c (ppc_coff_link_hash_table_create): Likewise.
9258 * cofflink.c (_bfd_coff_link_hash_table_create): Likewise.
9259 * ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
9260 * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise.
9261 * elf.c (_bfd_elf_link_hash_table_create): Likewise.
9262 * elf32-arm.h (elf32_arm_link_hash_table_create): Likewise.
9263 * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
9264 * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise.
9265 * elf32-i386.c (elf_i386_link_hash_table_create): Likewise.
9266 * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
9267 * elf32-s390.c (elf_s390_link_hash_table_create): Likewise.
9268 * elf32-sh.c (sh_elf_link_hash_table_create): Likewise.
9269 * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create): Likewise.
9270 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
9271 * elf64-s390.c (elf_s390_link_hash_table_create): Likewise.
9272 * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise.
9273 * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create): Likewise.
9274 * elf64-x86-64.c (elf64_x86_64_link_hash_table_create): Likewise.
9275 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
9276 * linker.c (_bfd_generic_link_hash_table_create): Likewise.
9277 * m68klinux.c (linux_link_hash_table_create): Likewise.
9278 * sparclinux.c (linux_link_hash_table_create): Likewise.
9279 * sunos.c (sunos_link_hash_table_create): Likewise.
9280 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise.
9281
9282 * targets.c: Add _bfd_link_hash_table_free to xvec.
9283
9284 * bfd-in2.h: Regenerate.
9285 * libbfd.h: Regenerate.
9286 * libcoff.h: Regenerate.
9287
9288 2002-04-04 Alan Modra <amodra@bigpond.net.au>
9289
9290 * dep-in.sed: Cope with absolute paths.
9291 * Makefile.am (dep.sed): Subst TOPDIR, and not INCDIR.
9292 Run "make dep-am".
9293 * Makefile.in: Regenerate.
9294 * coff-arm.c: Fix copyright date.
9295 * cpu-h8300.c: Likewise.
9296 * cpu-i370.c: Likewise.
9297 * cpu-s390.c: Likewise.
9298 * cpu-mips.c: Likewise.
9299 * po/SRC-POTFILES.in: Regenerate.
9300
9301 2002-04-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
9302
9303 * Makefile.am: Add elfxx-mips.c to the known backends.
9304 (elf32-mips.lo): remove dependency to coff/external.h.
9305 * Makefile.in: Regenerate.
9306 * configure.in: Add elfxx-mips.lo to all vectors using elf32-mips.lo
9307 Remove elf32-mips.lo from 64 bit vectors. Update dependencies
9308 accordingly.
9309 * configure: Regenerate.
9310 * elf-bfd.h: Move all MIPS ELF specific prototypes to elfxx-mips.h.
9311 (irix_compat_t): IRIX compatibility level, moved from elf32-mips.c.
9312 (elf_backend_mips_irix_compat, elf_backend_mips_rtype_to_howto): New
9313 MIPS specific backend functions.
9314 * elf32-mips.c: Moved most code to elfxx-mips.c.
9315 (mips_elf_hi16_reloc): Rename from _bfd_mips_elf_hi16_reloc and make
9316 static.
9317 (mips_elf_lo16_reloc): Likewise, was _bfd_mips_elf_lo16_reloc.
9318 (mips_elf_got16_reloc): Likewise, was _bfd_mips_elf_got16_reloc.
9319 (mips_elf_gprel32_reloc): Likewise, was _bfd_mips_elf_gprel32_reloc.
9320 (mips_elf32_rtype_to_howto): Rename from mips_rtype_to_howto. Changed
9321 interface to allow selection of the right REL or RELA howto table.
9322 (mips_elf32_object_p): Rename from _bfd_mips_elf_object_p and made
9323 static. Let it refuse n32 objects.
9324 (elf32_mips_grok_prstatus): Rename from _bfd_elf32_mips_grok_prstatus.
9325 (elf32_mips_grok_psinfo): Rename from _bfd_elf32_mips_grok_psinfo.
9326 (elf32_mips_discard_info): Rename from _bfd_elf32_mips_discard_info.
9327 (elf32_mips_ignore_discarded_relocs): Rename from
9328 _bfd_elf32_mips_ignore_discarded_relocs.
9329 (elf32_mips_write_section): Rename from _bfd_elf32_mips_write_section.
9330 (elf32_mips_irix_compat): New function, replaces IRIX_COMPAT.
9331 (elf_mips_howto_table_rela): Remove.
9332 * elf64-mips.c: Moved most code to elfxx-mips.c.
9333 (bfd_elf64_bfd_reloc_type_lookup): Make static.
9334 (mips_elf64_rtype_to_howto): New function.
9335 (mips_elf64_object_p): Likewise.
9336 (elf64_mips_irix_compat): Likewise.
9337 * elfxx-mips.c: New file containing common code merged together from
9338 elf32-mips.c and elf64-mips.c.
9339 * elfxx-mips.h: New file containing MIPS specific prototypes from
9340 elf-bfd.h.
9341 * elfxx-target.h: Add handling for elf_backend_mips_irix_compat and
9342 elf_backend_mips_rtype_to_howto.
9343
9344 2002-04-04 Alan Modra <amodra@bigpond.net.au>
9345
9346 * srec.c (MAXCHUNK, Chunk): Revise comments.
9347 (srec_write_record): Correct buffer size.
9348 (srec_write_header): Do without intermediate buffer.
9349 (srec_write_section): Validate Chunk.
9350 (srec_write_terminator): Pass NULL instead of dummy buffer.
9351 (srec_write_symbols): Pass file and symbol names directly to
9352 bfd_bwrite so sprintf won't overflow buffer.
9353
9354 2002-04-03 Jakub Jelinek <jakub@redhat.com>
9355
9356 * elf32-sparc.c (elf32_sparc_relocate_section): Don't emit dynamic
9357 PC relative relocs against hidden symbols.
9358 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
9359
9360 2002-04-03 Alan Modra <amodra@bigpond.net.au>
9361
9362 * elf.c (_bfd_elf_make_section_from_shdr): When setting section
9363 LMAs, loop over segments until p_vaddr and p_memsz specify an
9364 extent enclosing the section.
9365
9366 2002-04-02 Nick Clifton <nickc@cambridge.redhat.com>
9367
9368 * ihex.c (ihex_write_object_contents): Do not allow records to
9369 cross a 64K boundary - wrap if necessary.
9370
9371 2002-04-01 Nathan Williams <nathanw@wasabisystems.com>
9372
9373 * elf.c (elfcore_netbsd_get_lwpid): Fix off-by-one error
9374 which caused the returned LWP ID to always be 0.
9375
9376 2002-04-01 Richard Henderson <rth@redhat.com>
9377
9378 * elf32-sparc.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
9379 (elf32_sparc_relocate_section): Use it to figure out when to
9380 initialize .got entries.
9381 * elf64-sparc.c: Similarly.
9382
9383 2002-03-28 Alan Modra <amodra@bigpond.net.au>
9384
9385 * linker.c (link_action): Ignore duplicate warning syms.
9386 (_bfd_generic_link_write_global_symbol): Follow warning symbol link.
9387 * elflink.h (elf_adjust_dynstr_offsets): Likewise.
9388 (elf_adjust_dynamic_symbol): Likewise.
9389 (elf_export_symbol): Likewise.
9390 (elf_link_find_version_dependencies): Likewise.
9391 (elf_link_assign_sym_version): Likewise.
9392 (elf_link_sec_merge_syms): Likewise.
9393 (elf_link_output_extsym): Likewise.
9394 (elf_gc_sweep_symbol): Likewise.
9395 (elf_gc_propagate_vtable_entries_used): Likewise.
9396 (elf_gc_smash_unused_vtentry_relocs): Likewise.
9397 (elf_gc_allocate_got_offsets): Likewise.
9398 (elf_collect_hash_codes): Likewise.
9399 * elflink.c (elf_link_renumber_hash_table_dynsyms): Likewise.
9400 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
9401 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
9402 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
9403 * elf32-arm.h (elf32_arm_discard_copies): Likewise.
9404 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Likewise.
9405 (elf_cris_discard_excess_dso_dynamics): Likewise.
9406 * elf32-hppa.c (clobber_millicode_symbols): Likewise.
9407 (mark_PIC_calls): Likewise.
9408 (allocate_plt_static): Likewise.
9409 (allocate_dynrelocs): Likewise.
9410 (readonly_dynrelocs): Likewise.
9411 * elf32-i386.c (allocate_dynrelocs): Likewise.
9412 (readonly_dynrelocs): Likewise.
9413 * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
9414 * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
9415 * elf32-mips.c (mips_elf_output_extsym): Likewise.
9416 (mips_elf_sort_hash_table_f): Likewise.
9417 (mips_elf_check_mips16_stubs): Likewise.
9418 * elf32-s390.c (allocate_dynrelocs): Likewise.
9419 (readonly_dynrelocs): Likewise.
9420 * elf32-sh.c (sh_elf_discard_copies): Likewise.
9421 * elf32-xstormy16.c (xstormy16_relax_plt_check): Likewise.
9422 (xstormy16_relax_plt_realloc): Likewise.
9423 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
9424 (elf64_alpha_output_extsym): Likewise.
9425 * elf64-hppa.c (elf64_hppa_mark_exported_functions): Likewise.
9426 * elf64-mips.c (mips_elf64_sort_hash_table_f): Likewise.
9427 (mips_elf64_check_mips16_stubs): Likewise.
9428 (mips_elf64_output_extsym): Likewise.
9429 * elf64-ppc.c (func_desc_adjust): Likewise.
9430 (allocate_dynrelocs): Likewise.
9431 (readonly_dynrelocs): Likewise.
9432 * elf64-s390.c (allocate_dynrelocs): Likewise.
9433 (readonly_dynrelocs): Likewise.
9434 * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
9435 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
9436 (readonly_dynrelocs): Likewise.
9437 * elfxx-ia64.c (elfNN_ia64_global_dyn_sym_thunk): Likewise.
9438 * aoutx.h (aout_link_write_other_symbol): Likewise.
9439 * cofflink.c (_bfd_coff_write_task_globals): Likewise.
9440 (_bfd_coff_write_global_sym): Likewise.
9441 * i386linux.c (linux_tally_symbols): Likewise.
9442 * m68klinux.c (linux_tally_symbols): Likewise.
9443 * sparclinux.c (linux_tally_symbols): Likewise.
9444 * pdp11.c (aout_link_write_other_symbol): Likewise.
9445 * sunos.c (sunos_scan_dynamic_symbol): Likewise.
9446 * xcofflink.c (xcoff_build_ldsyms): Likewise.
9447 (xcoff_write_global_symbol): Likewise.
9448
9449 * cofflink.c (_bfd_coff_final_link): Formatting.
9450 * cpu-mips.c (mips_compatible): Make static, prototype.
9451 * elf32-i386.c (elf_i386_check_relocs): Formatting.
9452 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
9453 * elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
9454 * elf64-mips.c (mips_elf64_sort_hash_table): Likewise.
9455 (mips_elf64_final_link): Likewise.
9456 * elflink.h (elf_link_find_version_dependencies): Remove duplicate
9457 prototype.
9458
9459 2002-03-27 Nick Clifton <nickc@cambridge.redhat.com>
9460
9461 * coff-arm.c (SWAP_IN_RELOC_OFFSET): Define.
9462 (SWAP_OUT_RELOC_OFFSET): Define.
9463
9464 2002-03-27 Gregory Steuck <greg@nest.cx>
9465
9466 * elf.c (_bfd_elf_get_symtab_upper_bound): Leave space for
9467 terminating NULL if empty symbol table.
9468 (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise.
9469
9470 2002-03-26 H.J. Lu (hjl@gnu.org)
9471
9472 * elflink.h (elf_link_input_bfd): Revert the last change since
9473 the gcc exception handling isn't fixed yet.
9474
9475 2002-03-26 H.J. Lu (hjl@gnu.org)
9476
9477 * elflink.h (elf_link_input_bfd): Complain about relocations
9478 against local symbols in discarded sections.
9479
9480 2002-03-26 Alan Modra <amodra@bigpond.net.au>
9481
9482 * elflink.h (elf_gc_mark): Don't recurse into non-ELF sections.
9483
9484 2002-03-23 Alan Modra <amodra@bigpond.net.au>
9485
9486 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
9487 section file offset for !SEC_LOAD sections.
9488
9489 2002-03-21 Richard Earnshaw <rearnsha@arm.com>
9490
9491 * elf32-arm.h (elf32_arm_final_link_relocate <case R_ARM_GOTOFF>,
9492 <case R_ARM_GOT>): Handle relocations to Thumb functions.
9493
9494 2002-03-21 Alan Modra <amodra@bigpond.net.au>
9495
9496 * coff64-rs6000.c (_bfd_xcoff64_put_symbol_name): Prototype.
9497 Whitespace changes.
9498 * archive.c: Update copyright date.
9499 * bfd-in2.h: Regenerate.
9500 * libbfd.h: Regenerate.
9501 * Makefile.am: Run "make dep-am"
9502 * Makefile.in: Regenerate.
9503 * po/SRC-POTFILES.in: Regenerate.
9504
9505 2002-03-20 Daniel Jacobowitz <drow@mvista.com>
9506
9507 * dwarf2.c (struct funcinfo): Move up.
9508 (lookup_address_in_function_table): New argument function_ptr.
9509 Set it.
9510 (lookup_address_in_line_table): New argument function. If function
9511 is non-NULL, use it to handle ``addr'' before the first line note of
9512 the function.
9513 (comp_unit_find_nearest_line): Update and swap calls to
9514 lookup_address_in_function_table and lookup_address_in_line_table.
9515 * syms.c (_bfd_stab_section_find_nearest_line): Use the first
9516 N_SLINE encountered if we see an N_FUN before any N_SLINE.
9517
9518 2002-03-20 Tom Rix <trix@redhat.com>
9519
9520 * coff-rs6000.c (_bfd_xcoff_stat_arch_elt): Renamed from
9521 _bfd_xcoff_generic_stat_arch_elt. Fix format check.
9522 * coff64-rs6000.c : Use _bfd_xcoff_stat_arch_elt.
9523
9524 2002-03-19 Tom Rix <trix@redhat.com>
9525
9526 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through all
9527 dynamic objects in archives.
9528
9529 2002-03-19 Hans-Peter Nilsson <hp@bitrange.com>
9530
9531 * elflink.h (NAME(bfd_elf,record_link_assignment)): Don't set
9532 STT_NOTYPE symbols to STT_OBJECT.
9533
9534 2002-03-18 Jan Hubicka <jh@suse.cz>
9535
9536 * cpu-i386.c (bfd_x86_64_arch): Rename to "i386:x86-64"
9537
9538 2002-03-18 Tom Rix <trix@redhat.com>
9539
9540 * aix5ppc.core.c : New file for AIX 5 64 bit core support.
9541 * bfd-in.h : Add bfd_xcoff_ar_archive_set_magic declaration.
9542 * coff-rs6000 (do_pad) : New function for archive padding.
9543 (do_copy) : New function for object file copying in archives.
9544 (do_shared_object_padding) : New function for padding shared
9545 objects to their text section alignment in archives.
9546 (bfd_xcoff_ar_achive_set_magic) : Stub.
9547 (xcoff_write_armap_big) : Use do_copy and do_pad.
9548 (xcoff_write_archive_contents_big) : Use do_shared_object_padding,
9549 do_copy and do_pad.
9550 * coff64-rs6000.c (xcoff64_write_ojbect_contents) : Use
9551 bfd_xcoff_magic_number.
9552 (xcoff64_bad_format_hook) : New function for _bfd_bad_format_hook
9553 fop.
9554 (xcoff_backend_data_r) : Use xcoff64_bad_format_hook.
9555 (bfd_xcoff_aix5_backend_data) : New Aix 5 backend data.
9556 (aix5coff64_vec) : New Aix 5 target aix5coff64-rs6000.
9557 * rs6000-core.c : Update copyright date.
9558 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Check for NULL
9559 csectpp.
9560 * coffcode.h (coff_new_section_hook) : Use new accessor macros.
9561 (coff_set_arch_mach_hook) : Add Aix 5 U64_TOCMAGIC magic #.
9562 (coff_set_flags) : Use bfd_xcoff_magic_number.
9563 * libxcoff.h (bfd_xcoff_is_xcoff64): Add U64_TOCMAGIC.
9564 * configure.in : Add powerpc-*-aix5 and rs6000-*-aix5 support.
9565 * Makefile.am : Same.
9566 * config.bfd : Same.
9567 * targets.c : Same.
9568 * configure : Regnerate.
9569 * Makefile.in : Same.
9570 * bfd-in2.h : Same.
9571
9572 2002-03-18 Nick Clifton <nickc@cambridge.redhat.com>
9573
9574 * po/fr.po: Updated version.
9575
9576 2002-03-18 Alan Modra <amodra@bigpond.net.au>
9577
9578 * libbfd.c (bfd_write_bigendian_4byte_int): Return true iff success.
9579 * libbfd.h: Regenerate.
9580 * archive.c (coff_write_armap): Pass on failures from
9581 bfd_write_bigendian_4byte_int.
9582
9583 2002-03-14 H.J. Lu <hjl@gnu.org>
9584
9585 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the BFD
9586 error to bfd_error_nonrepresentable_section for reinit_array
9587 section in DSO.
9588
9589 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
9590
9591 * coffcode.h (coff_slurp_symbol_table): When adding BSF_WEAK flag,
9592 OR it in rather than replacing previously selected flags.
9593
9594 * elfxx-target.h (TARGET_BIG_SYM): Set ar_max_namelen to 15.
9595 (TARGET_LITTLE_SYM): Set ar_max_namelen to 15.
9596
9597 2002-03-14 Alan Modra <amodra@bigpond.net.au>
9598
9599 * cpu-mips.c (mips_compatible): New. Don't check bits_per_word.
9600 (N): Use the above.
9601 * elflink.h (elf_bfd_final_link): Revert last change. Instead,
9602 ensure reloc size matches before calling elf_link_input_bfd.
9603 Add an assert to check reloc size when counting output relocs.
9604
9605 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
9606
9607 * mmo.c (mmo_get_loc): Return NULL rather than false.
9608
9609 2002-03-13 Nick Clifton <nickc@cambridge.redhat.com>
9610
9611 * po/fr.po: Updated version.
9612
9613 2002-03-13 Alan Modra <amodra@bigpond.net.au>
9614
9615 * archures.c (bfd_default_compatible): Test bits_per_word.
9616 * cpu-i386.c (i386_compatible): Remove. Replace occurrences with
9617 bfd_default_compatible.
9618 * cpu-i370.c (i370_compatible): Likewise.
9619 * cpu-sparc.c (sparc_compatible): Likewise.
9620 * cpu-h8300.c (compatible): Test in->arch == out->arch.
9621
9622 * elflink.h: Formatting fixes.
9623 (elf_link_output_extsym): Merge undefined and undef weak cases.
9624
9625 * elflink.h (elf_bfd_final_link): Only call elf_link_input_bfd
9626 when word size of input matches output word size.
9627
9628 2002-03-12 Andreas Jaeger <aj@suse.de>
9629
9630 * cpu-i386.c (i386_compatible): New. Use it instead of
9631 bfd_default_compatible.
9632
9633 2002-03-07 H.J. Lu (hjl@gnu.org)
9634
9635 * coff-sh.c (shcoff_reloc_map): Use bfd_reloc_code_real_type
9636 as the type for bfd_reloc_val.
9637
9638 2002-03-05 John David Anglin <dave@hiauly1.hia.nrc.ca>
9639
9640 * elf-hppa.h (elf_hppa_is_dynamic_loader_symbol): New function.
9641 (elf_hppa_relocate_section): Ignore undefined dynamic loader symbols.
9642 (elf_hppa_final_link_relocate): Correct relocations for indirect
9643 references to local data through the DLT. Fix .opd creation for
9644 local symbols using R_PARISC_LTOFF_FPTR32 and R_PARISC_FPTR64
9645 relocations. Use e_lsel selector for R_PARISC_DLTIND21L,
9646 R_PARISC_LTOFF_FPTR21L and R_PARISC_LTOFF_TP21L as per
9647 "Processor-Specific ELF for PA_RISC, Version 1.43" document.
9648 Similarly, use e_rsel for DLT and LTOFF 'R' relocations.
9649 * elf32-hppa.c (final_link_relocate): Revise relocation selectors
9650 as per "Processor-Specific ELF for PA_RISC, Version 1.43" document.
9651
9652 2002-03-05 Jakub Jelinek <jakub@redhat.com>
9653
9654 * merge.c (_bfd_merge_sections): Don't segfault if there
9655 is nothing to merge due to GC.
9656
9657 2002-03-05 Alan Modra <amodra@bigpond.net.au>
9658
9659 * elf32-hppa.c (clobber_millicode_symbols): Remove hack to keep
9660 symbols that have been forced local.
9661
9662 * elflink.h (elf_bfd_final_link): Call elf_link_output_extsym
9663 to output forced local syms for non-shared link.
9664 (elf_link_output_extsym): Tweak condition for calling backend
9665 adjust_dynamic_symbol so that previous behaviour is kept.
9666 Whitespace changes throughout file.
9667
9668 2002-03-04 H.J. Lu <hjl@gnu.org>
9669
9670 * elf.c (bfd_section_from_shdr): Handle special sections,
9671 .init_array, .fini_array and .preinit_array.
9672 (elf_fake_sections): Likewise.
9673
9674 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Create the
9675 DT entry only if the section is in output for .init_array,
9676 .fini_array and .preinit_array. Complain about .preinit_array
9677 section in DSO.
9678 (elf_bfd_final_link): Warn zero size for .init_array,
9679 .fini_array and .preinit_array sections.
9680
9681 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Remove
9682 SHT_INIT_ARRAY, SHT_FINI_ARRAY and SHT_PREINIT_ARRAY.
9683 (elfNN_ia64_fake_sections): Remove .init_array, .fini_array and
9684 .preinit_array.
9685
9686 2002-03-04 Alan Modra <amodra@bigpond.net.au>
9687
9688 * configure.in (WIN32LIBADD): Don't eval PICFLAG assignment.
9689 * configure: Regenerate.
9690
9691 2002-03-02 Tom Rix <trix@redhat.com>
9692
9693 * coff64-rs6000.c (xcoff64_howto_table): Replace howto types with
9694 symbolic equiv.
9695 * coff-rs6000.c (xcoff_howto_table): Same.
9696
9697 2002-03-01 David Mosberger <davidm@hpl.hp.com>
9698
9699 * elflink.h (size_dynamic_sections): If section named
9700 ".preinit_array" exists, create DT_PREINIT_ARRAY and
9701 DT_PREINIT_ARRAYSZ entries in dynamic table. Analogously for
9702 ".init_array" and ".fini_array".
9703 (elf_bfd_final_link): Handle DT_PREINIT_ARRAYSZ, DT_INIT_ARRAYSZ,
9704 DT_FINI_ARRAYSZ, DT_PREINIT_ARRAY, DT_INIT_ARRAY, and
9705 DT_FINI_ARRAY.
9706
9707 2002-02-26 Andrew Macleod <amacleod@cygnus.com>
9708
9709 * elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local
9710 dynsyms.
9711
9712 2002-02-25 Alan Modra <amodra@bigpond.net.au>
9713
9714 * elf64-hppa.h: Update copyright date.
9715
9716 * elf64-ppc.c (ppc64_elf_check_relocs): Warning fix.
9717 (ppc64_elf_relocate_section): Don't generate power4 style branch
9718 hints for *_BRTAKEN and *_BRNTAKEN relocs.
9719
9720 2002-02-22 Jakub Jelinek <jakub@redhat.com>
9721
9722 * elf64-sh64.c (sh_elf64_relocate_section): Fix a typo from my
9723 last patch.
9724 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
9725
9726 2002-02-21 Andreas Jaeger <aj@suse.de>
9727
9728 * elf64-x86-64.c: Major rework that introduces all recent changes
9729 to the x86-64 backend. Get a closer match to elf32-i386.
9730 (struct elf64_x86_64_dyn_relocs): Rename from
9731 elf64_x86_64_pcrel_relocs_copied, add additional fields. Change
9732 all users.
9733 (struct elf64_x86_64_link_hash_table): Add short cuts to some
9734 sections.
9735 (link_hash_newfunc): Rename from elf64_x86_64_link_hash_newfunc,
9736 remove casts, initialize new hash members.
9737 (create_got_section): New.
9738 (elf64_x86_64_create_dynamic_sections): New.
9739 (elf64_x86_64_copy_indirect_symbol): New.
9740 (elf64_x86_64_check_relocs): Don't allocate space for dynamic
9741 relocs, .got or .relgot here but do it in allocate_dynrelocs.
9742 Reference count possible .plt and .got entries. Don't test input
9743 section SEC_READONLY here to try to avoid copy relocs, and keep
9744 dyn_relocs regardless of ELF_LINK_NON_GOT_REF. Don't set
9745 DF_TEXTREL here. Delay setting of variables until needed. Cache
9746 pointer to "sreloc" section in elf_section_data. Tweak condition
9747 under which .got created. Report files with bad relocation
9748 section names.
9749 (elf64_x86_64_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
9750 Reference count possible .plt entries. Don't deallocate .got and
9751 .relgot space here.
9752 (elf64_x86_64_adjust_dynamic_symbol): Handle nocopyreloc. Don't
9753 do copy reloc processing for weakdefs. Remove redundant casts and
9754 aborts. Delay setting of vars until needed. Move creation of
9755 dynamic symbols and allocation of .plt and .rela.plt to
9756 allocate_dynrelocs. Replace BFD_ASSERT with abort.
9757 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
9758 (allocate_dynrelocs): New.
9759 (readonly_dynrelocs): New.
9760 (elf64_x86_64_size_dynamic_sections): Call readonly_dynrelocs.
9761 Allocate space for dyn relocs. Replace BFD_ASSERT with abort.
9762 Zero out the dynamic allocated content space.
9763 (elf64_x86_64_discard_copies): Removed.
9764 (elf64_x86_64_relocate_section): Make use of dynamic section
9765 short-cuts. Localise vars, and delay setting. Better error
9766 reporting, replace BFD_ASSERT with abort. Check
9767 ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined in the
9768 regular object file and tread the weak definition as the normal
9769 one. Don't discard relocs for undefweak or undefined symbols and
9770 check !DEF_REGULAR as well as DEF_DYNAMIC in test for avoided copy
9771 relocs.
9772 (elf64_x86_64_finish_dynamic_symbol): Don't copy relocs for
9773 symbols that have been forced local. Use same test to decide if
9774 we can use a relative reloc for got as relocate_section. Expand
9775 SHN_UNDEF comment. Move expressions out of function calls.
9776 Replace BFD_ASSERT with abort.
9777 (bfd_elf64_bfd_final_link): Removed.
9778 (elf_backend_copy_indirect_symbol): Define.
9779
9780 2002-02-20 Tom Rix <trix@redhat.com>
9781
9782 * coff-rs6000.c (xcoff_howto_table): Add 16 bit R_BA.
9783 (_bfd_xcoff_reloc_type_lookup): Use it.
9784 * coff64-rs6000.c (xcoff64_howto_table): Same.
9785 (xcoff64_reloc_type_lookup): Same.
9786
9787 2002-02-20 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
9788
9789 * osf-core.c (osf_core_vec): OSF/1 (Digital Unix) core files are
9790 little endian.
9791
9792 2002-02-19 Martin Schwidefsky <schwidefsky@de.ibm.com>
9793
9794 * archures.c (bfd_mach_s390_esa): Rename to bfd_mach_s390_31.
9795 (bfd_mach_s390_esame): Rename to bfd_mach_s390_64.
9796 * bfd-in2.h: Regenerate.
9797 * cpu-s390.c (arch_info_struct): Use renamed architecture defines.
9798 Replace architecture name "s390" with "s390:31-bit" and "s390:esame"
9799 with "s390:64-bit".
9800 * elf32-s390.c (elf_howto_table): Add 32 bit pc relative relocations.
9801 (elf_s390_reloc_type_lookup): Likewise.
9802 (elf_s390_check_relocs): Likewise.
9803 (elf_s390_gc_sweep_hook): Likewise.
9804 (elf_s390_relocate_section): Likewise.
9805 (elf_s390_object_p): Use renamed architecture define.
9806 * elf64-s390.c (elf_s390_object_p): Use renamed architecture define.
9807
9808 2002-02-19 Frank Ch. Eigler <fche@redhat.com>
9809
9810 * syms.c (stt[]): Sorted. Added .init/.fini -> "t" mapping.
9811
9812 2002-02-19 Jakub Jelinek <jakub@redhat.com>
9813
9814 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Enable
9815 absptr -> pcrel optimization for shared libs.
9816 Only create minimal .eh_frame_hdr if absptr FDE encoding in shared
9817 library cannot be converted to pcrel.
9818 (_bfd_elf_eh_frame_section_offset): Return -2 if making absptr
9819 relative.
9820 * elf32-i386.c (elf_i386_relocate_section): If
9821 _bfd_elf_section_offset returned -2, skip, but make sure the
9822 relocation is installed.
9823 * elf32-arm.h (elf32_arm_final_link_relocate): Likewise.
9824 * elf32-cris.c (cris_elf_relocate_section): Likewise.
9825 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
9826 * elf32-i370.c (i370_elf_relocate_section): Likewise.
9827 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
9828 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
9829 * elf32-s390.c (elf_s390_relocate_section): Likewise.
9830 * elf32-sh.c (sh_elf_relocate_section): Likewise.
9831 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
9832 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
9833 * elf64-s390.c (elf_s390_relocate_section): Likewise.
9834 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
9835 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
9836 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
9837 * elf64-alpha.c (elf64_alpha_relocate_section): Handle
9838 _bfd_elf_section_offset returning -2 the same way as -1.
9839 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
9840 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add FIXME
9841 and BFD_ASSERT.
9842 * elf64-mips.c (mips_elf64_create_dynamic_relocation): Likewise.
9843
9844 2002-02-18 Tom Rix <trix@redhat.com>
9845
9846 * xcofflink.c (bfd_xcoff_link_gernate_rtinit): Add -brtl support.
9847 (bfd_xcoff_size_dynamic_sections): Same.
9848 * bfd-in.h (bfd_xcoff_link_generate_rtinit): Same.
9849 (bfd_xcoff_size_dynamic_sections): Same.
9850 * coff-rs6000.c (xcoff_generate_rtinit): Same.
9851 * coff-rs646000.c (xcoff64_generate_rtinit): Same.
9852 * libxcoff.h (struct xcoff_backend_data_rec): Same.
9853 * xcofflink.c (xcoff_build_ldsyms, xcoff_link_add_symbols): Clean.
9854 * bfd-in2.h: Regenerate.
9855
9856 2002-02-18 Alan Modra <amodra@bigpond.net.au>
9857
9858 * elf64-ppc.c (STFD_FR0_0R1, LFD_FR0_0R1, BLR): Define.
9859 (struct ppc_link_hash_table): Add sfpr.
9860 (ppc64_elf_link_hash_table_create): Init it.
9861 (ppc64_elf_create_dynamic_sections): Split creation of .stub and
9862 .glink out to..
9863 (create_linkage_sections): ..here. Make .sfpr too.
9864 (ppc64_elf_check_relocs): Call create_linkage_sections, and set
9865 dynobj early.
9866 (MIN_SAVE_FPR, MAX_SAVE_FPR): Define.
9867 (ppc64_elf_func_desc_adjust): Look for missing ._savef* and
9868 ._restf* functions, and create as needed.
9869 (func_desc_adjust): Only force_local for shared libs.
9870
9871 2002-02-18 David O'Brien <obrien@FreeBSD.org>
9872
9873 * configure.in: Bump version number post 2.12 branching.
9874 * configure: Regenerate.
9875
9876 2002-02-17 Hans-Peter Nilsson <hp@bitrange.com>
9877
9878 * mmo.c: Correct and improve comments.
9879 (mmo_write_chunk): Store trailing byte in bfd buffer; don't
9880 zero-pad. Use input to fill up non-empty bfd buffer.
9881 (mmo_flush_chunk): New function.
9882 (mmo_write_loc_chunk): Add parameter last_vmap, all callers
9883 changed. Don't emit location specifier if VMA is same as
9884 *LAST_VMAP after omitting leading zero contents. Call
9885 mmo_flush_chunk before emitting location specifier.
9886 (mmo_write_loc_chunk_list): Call mmo_flush_chunk when finished
9887 with mmo_write_loc_chunk calls.
9888 (mmo_internal_write_section): Call mmo_flush_chunk after
9889 mmo_write_chunk.
9890 (mmo_write_symbols_and_terminator): Move :Main to first position
9891 in symbol array. Add faked one if it does not exist if there are
9892 other symbols. Don't add it if there are no symbols at all. Move
9893 out test for value of :Main from symbol loop. Rename table
9894 fakemain to maintable and variable mainsym to fakemain.
9895
9896 2002-02-15 Richard Henderson <rth@redhat.com>
9897
9898 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: A target
9899 section with no got matches any got. Simplify error generaion.
9900
9901 2002-02-15 Alan Modra <amodra@bigpond.net.au>
9902
9903 Support arbitrary length fill patterns.
9904 * linker.c (bfd_new_link_order): Zero all fields with bfd_zalloc.
9905 (_bfd_default_link_order): Remove bfd_fill_link_order code.
9906 Call default_data_link_order.
9907 (default_fill_link_order): Delete.
9908 (default_data_link_order): New function.
9909 * elf32-mips.c (_bfd_mips_elf_final_link): Replace occurrences
9910 of bfd_fill_link_order with bfd_data_link_order.
9911 * elf64-alpha.c (elf64_alpha_final_link): Likewise.
9912 * elf64-mips.c (mips_elf64_final_link): Likewise.
9913
9914 * bfd.c (bfd_scan_vma): Clamp overflows to max bfd_vma value.
9915 Correct value returned in "end" for "0x<non-hex>".
9916
9917 2002-02-14 Nick Clifton <nickc@cambridge.redhat.com>
9918
9919 * cpu-arm.c (processors): Replace 'arch' field with 'mach'.
9920 (scan): Test against 'mach' field in info structure.
9921
9922 2002-02-14 Alan Modra <amodra@bigpond.net.au>
9923
9924 * elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD.
9925
9926 2002-02-14 Matt Fredette <fredette@netbsd.org>
9927
9928 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize
9929 EF_M68000.
9930
9931 2002-02-13 Nick Clifton <nickc@cambridge.redhat.com>
9932
9933 * elf.c (_bfd_elf_make_section_from_shdr): Do not insist on
9934 non-zero physical addresses when adjusting the LMAs of new
9935 sections.
9936
9937 2002-02-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
9938
9939 * elf-hppa.h (elf_hppa_reloc_final_type): New function stripped
9940 from _bfd_elf_hppa_gen_reloc_type.
9941 (_bfd_elf_hppa_gen_reloc_type): Remove duplicate prototype.
9942 * elf32-hppa.h (elf32_hppa_reloc_final_type): Add protptype.
9943 * elf32-hppa.c: Include elf32-hppa.h before elf-hppa.h.
9944 * elf64-hppa.h (elf64_hppa_reloc_final_type): Add protptype.
9945
9946 2002-02-12 Alexandre Oliva <aoliva@redhat.com>
9947
9948 * elf-m10300.c (mn10300_elf_relax_section): Skip section before
9949 loading its contents if there's nothing to do in it.
9950
9951 2002-02-12 Alan Modra <amodra@bigpond.net.au>
9952
9953 * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for crossing
9954 64k boundary.
9955
9956 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Add dynamic
9957 DT_PPC64_OPD and DT_PPC64_OPDSZ tags.
9958 (ppc64_elf_finish_dynamic_sections): Set values for them.
9959
9960 2002-02-11 Michael Snyder <msnyder@redhat.com>
9961
9962 * elf-bfd.h (elfcore_write_lwpstatus): Add prototype.
9963 * elf.c (elfcore_grok_pstatus): Add prototype.
9964 (elfcore_grok_lwpstatus): Add prototype.
9965 (elfcore_write_lwpstatus): New function.
9966 (elfcore_write_pstatus): Fix typo, eliminate unnecessary memcpy.
9967
9968 2002-02-11 Alexandre Oliva <aoliva@redhat.com>
9969
9970 * elf32-sh.c: Added missing prototypes.
9971 * elf32-sh64.c: Likewise.
9972 (sh_elf_align_loads): Mark unused args as such.
9973 * elf64-sh64.c: Added missing prototypes.
9974 (struct elf_sh64_link_hash_entry): Fix typo.
9975 (sh_elf64_relocate_section): Fix info argument passed to
9976 _bfd_elf_section_offset.
9977
9978 2002-02-11 Alan Modra <amodra@bigpond.net.au>
9979
9980 * Makefile.am: "make dep-am".
9981 * Makefile.in: Regenerate.
9982 * aclocal.m4: Regenerate.
9983 * config.in: Regenerate.
9984 * configure: Regenerate.
9985
9986 2002-02-10 Daniel Jacobowitz <drow@mvista.com>
9987
9988 * coff-rs6000.c (xcoff_generate_rtinit): Silence uninitialized
9989 variable warnings.
9990 * elf32-sh.c (sh_elf_relax_section): Silence signed/unsigned
9991 comparison warning.
9992 * trad-core.c (trad_unix_core_file_p): Silence pointer/integer
9993 cast warnings for the common case.
9994
9995 2002-02-10 Hans-Peter Nilsson <hp@bitrange.com>
9996
9997 * config.bfd (sh-*-linux*, sh-*-elf* | sh-*-rtemself*): Add sh64
9998 vectors.
9999 (sh-*-netbsdelf*): New, to trump sh*-*-netbsdelf* and add sh64
10000 vectors.
10001
10002 2002-02-09 Richard Henderson <rth@redhat.com>
10003
10004 * elf64-alpha.c (elf64_alpha_howto): Add R_ALPHA_BRSGP.
10005 (elf64_alpha_reloc_map, elf64_alpha_check_relocs): Likewise.
10006 (elf64_alpha_relocate_section): Likewise.
10007 * reloc.c (BFD_RELOC_ALPHA_BRSGP): New.
10008 * bfd-in2.h, libbfd.h: Rebuild.
10009
10010 2002-02-09 Hans-Peter Nilsson <hp@bitrange.com>
10011
10012 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs): Check
10013 that base-plus-offset reloc accounting is consistent.
10014 (mmix_elf_relax_section): Keep base-plus-offset reloc accounting
10015 up to date for undefined symbols.
10016
10017 2002-02-08 Eric Christopher <echristo@redhat.com>
10018
10019 From Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
10020
10021 * elf32-mips.c (_bfd_mips_elf_fake_sections): Don't create .rela
10022 sections for the O32 ABI.
10023
10024 2002-02-08 Chris Demetriou <cgd@broadcom.com>
10025
10026 * elf32-arm.h: Fix formatting of _("...").
10027 * elf32-d10v.c: Likewise.
10028 * elf32-m68k.c: Likewise.
10029 * elf32-mips.c: Likewise.
10030
10031 2002-02-08 Ivan Guzvinec <ivang@opencores.org>
10032
10033 * coff-or32.c: Fix compile time warning messages.
10034
10035 2002-02-08 Alexandre Oliva <aoliva@redhat.com>
10036
10037 Contribute sh64-elf.
10038 2002-01-23 Alexandre Oliva <aoliva@redhat.com>
10039 * reloc.c (R_SH_GOTPLT32, R_SH_GOT_LOW16, R_SH_GOT_MEDLOW16,
10040 R_SH_GOT_MEDHI16, R_SH_GOT_HI16, R_SH_GOTPLT_LOW16,
10041 R_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_HI16,
10042 R_SH_PLT_LOW16, R_SH_PLT_MEDLOW16, R_SH_PLT_MEDHI16,
10043 R_SH_PLT_HI16, R_SH_GOTOFF_LOW16, R_SH_GOTOFF_MEDLOW16,
10044 R_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_HI16, R_SH_GOTPC_LOW16,
10045 R_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDHI16, R_SH_GOTPC_HI16,
10046 R_SH_GOT10BY4, R_SH_GOTPLT10BY4, R_SH_GOT10BY8, R_SH_GOTPLT10BY8,
10047 R_SH_COPY64, R_SH_GLOB_DAT64, R_SH_JMP_SLOT64, R_SH_RELATIVE64):
10048 New relocs.
10049 * libbfd.h, bfd-in2.h: Rebuilt.
10050 * elf32-sh.c (sh_elf_howto_table): Define new relocs.
10051 (sh_reloc_map): Map them.
10052 (PLT_ENTRY_SIZE, elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
10053 elf_sh_plt_entry_be, elf_sh_plt_entry_le, elf_sh_pic_plt_entry_be,
10054 elf_sh_pic_plt_entry_le, elf_sh_plt0_entry, elf_sh_plt_entry,
10055 elf_sh_pic_plt_entry, elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
10056 elf_sh_plt0_gotplt_offset, elf_sh_plt_temp_offset,
10057 elf_sh_plt_symbol_offset, elf_sh_plt_reloc_offset,
10058 movi_shori_putval) [INCLUDE_SHMEDIA]: New.
10059 (elf_sh_link_hash_entry) [INCLUDE_SHMEDIA]: Add
10060 datalabel_got_offset.
10061 (sh_elf_link_hash_newfunc): Initialize it.
10062 (sh_elf_relocate_section): Augment the scope of
10063 seen_stt_datalabel. Introduce GOTPLT support. Extend GOTPC, PLT,
10064 GOT and GOTOFF handling to new SHmedia relocation types. Support
10065 GOT_BIAS.
10066 (sh_elf_check_relocs): Likewise.
10067 (sh_elf_finish_dynamic_symbol) [TARGET_SHMEDIA]: Set up values in
10068 PLT entries using movi_shori_putval. Support GOT_BIAS.
10069 (sh_elf_finish_dynamic_sections): Likewise.
10070 * elf32-sh64.c (shmedia_prepare_reloc): Do not add addend to
10071 relocation, it's now done by the caller.
10072 (GOT_BIAS): New.
10073 * elf64-sh64.c (GOT_BIAS, PLT_ENTRY_SIZE, elf_sh64_sizeof_plt,
10074 elf_sh64_plt_plt0_offset, elf_sh64_plt0_gotplt_offset,
10075 elf_sh64_plt_temp_offset, elf_sh64_plt_symbol_offset,
10076 elf_sh64_plt_reloc_offset, ELF_DYNAMIC_INTERPRETER,
10077 elf_sh64_pcrel_relocs_copied, elf_sh64_link_hash_entry,
10078 elf_sh64_link_hash_table, sh64_elf64_link_hash_traverse,
10079 sh64_elf64_hash_table): New.
10080 (sh_elf64_howto_table): Introduce new relocs.
10081 (sh_elf64_info_to_howto): Accept new PIC relocs.
10082 (sh_elf64_relocate_section): Augment the scope of
10083 seen_stt_datalabel. Support new PIC relocs.
10084 (sh_elf64_check_relocs): Support new PIC relocs.
10085 (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le,
10086 elf_sh64_plt_entry_be, elf_sh64_plt_entry_le,
10087 elf_sh64_pic_plt_entry_be, elf_sh64_pic_plt_entry_le,
10088 elf_sh64_plt0_entry, elf_sh64_plt_entry, elf_sh64_pic_plt_entry,
10089 sh64_elf64_link_hash_newfunc, sh64_elf64_link_hash_table_create,
10090 movi_shori_putval, movi_3shori_putval,
10091 sh64_elf64_create_dynamic_sections,
10092 sh64_elf64_adjust_dynamic_symbol, sh64_elf64_discard_copies,
10093 sh64_elf64_size_dynamic_sections,
10094 sh64_elf64_finish_dynamic_symbol,
10095 sh64_elf64_finish_dynamic_sections): New.
10096 (elf_backend_create_dynamic-sections,
10097 bfd_elf64_bfd_link_hash_table_create,
10098 elf_backend_adjust_dynamic_symbol,
10099 elf_backend_size_dynamic_sections,
10100 elf_backend_finish_dynamic_symbol,
10101 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
10102 elf_backend_plt_readonly, elf_backend_want_plt_sym,
10103 elf_backend_got_header_size, elf_backend_plt_header_size):
10104 Define.
10105 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
10106 * elf32-sh.c: Renumbered and renamed some SH5 relocations to
10107 match official numbers and names; moved unmaching ones to the
10108 range 0xf2-0xff.
10109 * elf32-sh64.c, elf64-sh64.c: Likewise.
10110 2001-03-12 DJ Delorie <dj@redhat.com>
10111 * elf32-sh.c (sh_elf_relax_section): Don't relax SHmedia
10112 sections.
10113 2001-03-12 DJ Delorie <dj@redhat.com>
10114 * elf32-sh64.c (shmedia_prepare_reloc): Validate relocs that must
10115 be aligned.
10116 * elf64-sh64.c (sh_elf64_relocate_section): Ditto.
10117 2001-01-14 Hans-Peter Nilsson <hpn@cygnus.com>
10118 * elf32-sh64.c (bfd_elf32_bfd_copy_private_section_data): Define.
10119 (sh64_elf_fake_sections): Set type to SHT_SH5_CR_SORTED for a
10120 .cranges section with SEC_SORT_ENTRIES set.
10121 (sh64_backend_section_from_shdr): Set SEC_SORT_ENTRIES on an
10122 incoming sorted .cranges section.
10123 (sh64_bfd_elf_copy_private_section_data): New.
10124 (sh64_elf_final_write_processing): Only sort .cranges and modify
10125 start address if called by linker.
10126 2001-01-08 Ben Elliston <bje@redhat.com>
10127 * elf32-sh64.c (sh64_elf_final_write_processing): Activate
10128 Hans-Peter Nilsson's set bit 0 patch from 2001-01-06.
10129 * elf64-sh64.c (sh64_elf64_final_write_processing): Ditto.
10130 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
10131 * elf64-sh64.c (sh_elf64_howto_table): No open brace at start of
10132 line. Add comments before all entries.
10133 <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct and clarify describing
10134 comment.
10135 (sh_elf64_reloc): Correct head comment.
10136 (sh_elf64_relocate_section): Correct spacing.
10137 <relocating for a local symbol>: Do not honour STO_SH5_ISA32;
10138 instead call reloc_dangerous callback.
10139 <case R_SH_SHMEDIA_CODE>: New case.
10140 (sh_elf64_gc_mark_hook): Correct spacing.
10141 (sh_elf64_check_relocs): Ditto.
10142 * elf32-sh64.c (shmedia_prepare_reloc) <case R_SH_SHMEDIA_CODE>:
10143 New case.
10144 * elf32-sh.c: Correct #endif comments for #ifndef-wrapped
10145 functions.
10146 (sh_elf_howto_table) <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct,
10147 clarify describing comment. Add comments before all entries.
10148 (sh_elf_relocate_section) <relocating for a local symbol>: Do not
10149 honour STO_SH5_ISA32; instead call reloc_dangerous callback.
10150 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
10151 Sort .cranges section in final link. Prepare to set bit 0 on
10152 entry address.
10153 * elf32-sh64.c (struct sh64_find_section_vma_data): New.
10154 (sh64_elf_link_output_symbol_hook): Fix typo in prototype.
10155 (sh64_elf_set_mach_from_flags): Set SEC_DEBUGGING on incoming
10156 .cranges section.
10157 (sh64_backend_section_from_shdr): New, to recognize
10158 SHT_SH5_CR_SORTED on incoming .cranges section.
10159 (elf_backend_section_from_shdr): Define.
10160 (sh64_elf_final_write_processing): Sort outgoing .cranges
10161 section. (New, temporarily disabled:) Set bit 0 on entry address
10162 according to ISA type.
10163 (sh64_find_section_for_address): New.
10164 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb,
10165 crange_bsearch_cmpl): Move here from opcodes/sh64-dis.c.
10166 (sh64_address_in_cranges): Move here from opcodes/sh64-dis.c. Use
10167 bfd_malloc, not xmalloc.
10168 (sh64_get_contents_type): Move here from opcodes/sh64-dis.c. Make
10169 global.
10170 * elf32-sh64.c (sh64_elf64_final_write_processing): New, (but
10171 temporarily disabled) setting bit 0 on entry address.
10172 (elf_backend_final_write_processing): Define.
10173 2001-01-05 Hans-Peter Nilsson <hpn@cygnus.com>
10174 * elf32-sh.c (sh_elf_howto_table) <R_SH_PT_16>: Adjust fields to
10175 be a proper relocation for PTA and PTB rather than a marker.
10176 <R_SH_IMMU5, R_SH_IMMS6, R_SH_IMMU6, R_SH_IMMS10, R_SH_IMMS10BY2,
10177 R_SH_IMMS10BY4, R_SH_IMMS10BY8, R_SH_IMMS16, R_SH_IMMU16,
10178 R_SH_IMM_LOW16, R_SH_IMM_LOW16_PCREL, R_SH_IMM_MEDLOW16,
10179 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16_PCREL,
10180 R_SH_IMM_HI16, R_SH_IMM_HI16_PCREL, R_SH_64, R_SH_64_PCREL>:
10181 Zero src_mask.
10182 * elf64-sh64.c: Ditto.
10183 (sh_elf64_relocate_section) <case R_SH_PT_16>: New case.
10184 * elf32-sh64.c: Include opcodes/sh64-opc.h
10185 (shmedia_prepare_reloc): Take a bfd_link_info pointer as first
10186 argument. Drop const qualifiers from "bfd *" and "bfd_byte *"
10187 parameters. No unused parameters. Caller changed.
10188 <case R_SH_PT_16>: New case.
10189 * Makefile.am (elf32-sh64.lo): Add dependency on sh64-opc.h.
10190 * Makefile.in: Regenerate.
10191 2000-12-30 Hans-Peter Nilsson <hpn@cygnus.com>
10192 * elf64-sh64.c (sh64_elf64_fake_sections): Set SHF_SH5_ISA32 for
10193 all code sections.
10194 (sh_elf64_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
10195 (sh64_elf_merge_private_data): Ditto.
10196 * elf32-sh64.c (sh64_elf_fake_sections): Use sh64_elf_section_data
10197 to access stored section flags.
10198 (sh64_elf_final_write_processing): Return immediately unless
10199 called by linker. Use sh64_elf_section_data (cranges) to get size
10200 of linker-generated cranges entries.
10201 (sh64_elf_copy_private_data): Add missing "return true".
10202 (sh64_elf_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
10203 (sh_elf64_merge_private_data): Ditto.
10204 2000-12-19 Hans-Peter Nilsson <hpn@cygnus.com>
10205 * elf64-sh64.c (sh64_elf64_fake_sections): New, copy of
10206 elf64-sh64.c:sh64_elf_fake_sections.
10207 (elf_backend_fake_sections): Define as sh64_elf64_fake_sections.
10208 2000-12-18 Hans-Peter Nilsson <hpn@cygnus.com>
10209 * elf32-sh64.c (sh64_elf_copy_private_data_internal): Delete.
10210 (sh64_elf_final_write_processing): New.
10211 (elf_backend_final_write_processing): Define.
10212 (sh64_elf_fake_sections): Get header flags from tdata field.
10213 (sh64_elf_copy_private_data): Do not call
10214 sh64_elf_copy_private_data_internal, just copy e_flags field.
10215 (sh64_elf_merge_private_data): Do not call
10216 sh64_elf_copy_private_data_internal.
10217 2000-12-12 Hans-Peter Nilsson <hpn@cygnus.com>
10218 Remove EF_SH64_ABI64, let ELF size make difference.
10219 Remove SH64-specific BFD section flag.
10220 * elf32-sh64.c (sh64_elf_fake_sections): Recognize section as
10221 containing SHmedia through elf_section_data (asect)->tdata
10222 non-zero, not using a BFD section flag.
10223 (sh64_elf_set_mach_from_flags): Don't recognize EF_SH64_ABI64.
10224 (sh64_elf_merge_private_data): Similar.
10225 (elf_backend_section_flags): Don't define.
10226 (sh64_elf_backend_section_flags): Delete.
10227 * elf64-sh64.c (sh_elf64_set_mach_from_flags): Recognize EF_SH64,
10228 not EF_SH64_ABI64.
10229 (sh_elf64_merge_private_data): Similar.
10230 * section.c (Section flags definitions): Don't define
10231 SEC_SH_ISA_SHMEDIA.
10232 (bfd-in2.h): Regenerate.
10233 2000-12-09 Hans-Peter Nilsson <hpn@cygnus.com>
10234 Make DataLabel references work with partial linking.
10235 * elf32-sh64.c: Fix formatting.
10236 (sh64_elf_link_output_symbol_hook): New.
10237 (elf_backend_link_output_symbol_hook): Define to
10238 sh64_elf_link_output_symbol_hook.
10239 (sh64_elf_add_symbol_hook): Make DataLabel symbol just global
10240 undefined if partial linking. Adjust sanity check.
10241 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): New.
10242 (elf_backend_link_output_symbol_hook): Define to
10243 sh64_elf64_link_output_symbol_hook.
10244 (sh64_elf64_add_symbol_hook): Make DataLabel symbol just global
10245 undefined if partial linking. Adjust sanity check.
10246 2000-12-07 Hans-Peter Nilsson <hpn@cygnus.com>
10247 Implement semantics for inter-file DataLabel references.
10248 * elf64-sh64.c (DATALABEL_SUFFIX): Define.
10249 (sh64_elf64_add_symbol_hook): New.
10250 (sh_elf64_relocate_section): If passing an indirect symbol with
10251 st_type STT_DATALABEL on the way to a symbol with st_other
10252 STO_SH5_ISA32, do not bitor 1 to the relocation.
10253 (elf_backend_add_symbol_hook): Define to
10254 sh64_elf64_add_symbol_hook.
10255 * elf64-sh32.c: Tweak comments.
10256 (DATALABEL_SUFFIX): Define.
10257 (sh64_elf_add_symbol_hook): New.
10258 (elf_backend_add_symbol_hook): Define to sh64_elf_add_symbol_hook.
10259 * elf32-sh.c (sh_elf_relocate_section): If passing an indirect
10260 symbol with st_type STT_DATALABEL on the way to a symbol with
10261 st_other STO_SH5_ISA32, do not bitor 1 to the relocation.
10262 2000-12-05 Hans-Peter Nilsson <hpn@cygnus.com>
10263 Pass through STT_DATALABEL.
10264 * elf32-sh64.c (sh64_elf_get_symbol_type): New.
10265 (elf_backend_get_symbol_type): Define.
10266 * elf64-sh64.c (sh64_elf64_get_symbol_type): New.
10267 (elf_backend_get_symbol_type): Define.
10268 2000-11-30 Hans-Peter Nilsson <hpn@cygnus.com>
10269 * elf32-sh64.c: Tweak comments.
10270 (sh64_elf_copy_private_data_internal): Add prototype.
10271 (bfd_elf32_bfd_set_private_flags): Define.
10272 (sh64_elf_copy_private_data_internal): Compare machine name, not
10273 textual BFD target name, to check whether to copy section flag
10274 SHF_SH5_ISA32.
10275 (sh64_elf_merge_private_data): Validize bfd_get_arch_size.
10276 Tweak section-contents-type-mismatch message.
10277 (shmedia_prepare_reloc): Add ATTRIBUTE_UNUSED markers.
10278 Validize reloc-types.
10279 * elf64-sh64.c: New file.
10280 * targets.c (bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec): Declare.
10281 * Makefile.am (BFD64_BACKENDS): Add elf64-sh64.lo.
10282 (BFD64_BACKENDS_CFILES): Add elf64-sh64.c.
10283 Regenerate dependencies.
10284 * Makefile.in: Regenerate.
10285 * config.bfd (sh64-*-elf*): Add bfd_elf64_sh64_vec and
10286 bfd_elf64_sh64l_vec.
10287 * configure.in: Handle bfd_elf64_sh64_vec and
10288 bfd_elf64_sh64l_vec.
10289 * configure: Regenerate.
10290 * po/POTFILES.in: Regenerate.
10291 * po/bfd.pot: Regenerate.
10292 2000-11-29 Hans-Peter Nilsson <hpn@cygnus.com>
10293 * elf32-sh64.c (sh64_elf_set_mach_from_flags): Do not recognize
10294 anything else but EF_SH64 and EF_SH64_ABI64.
10295 (sh64_elf_merge_private_data): Emit error for anything else but
10296 EF_SH64 and EF_SH64_ABI64.
10297 * config.bfd: Remove bfd_elf32_shblin_vec and bfd_elf32_shlin_vec
10298 from targ_selvecs.
10299 * configure.in: Add cofflink.lo to bfd_elf32_sh64_vec and
10300 bfd_elf32_sh64l_vec as a temporary measure.
10301 * configure: Regenerate.
10302 2000-11-27 Hans-Peter Nilsson <hpn@cygnus.com>
10303 * cpu-sh.c (arch_info_struct): Include sh5 item
10304 unconditionalized.
10305 * config.bfd (sh64-*-elf*): Do not set targ_cflags.
10306 Add targ_selvecs bfd_elf32_sh_vec, bfd_elf32_shl_vec,
10307 bfd_elf32_shblin_vec and bfd_elf32_shlin_vec.
10308 * elf32-sh64.c: Tweak comments.
10309 (sh64_elf_set_mach_from_flags): Recognize all machine flags that
10310 are proper subsets of SH64 as bfd_mach_sh5. Add EF_SH64_ABI64.
10311 (sh64_elf_copy_private_data_internal): Wrap long line.
10312 (sh64_elf_merge_private_data): Rewrite to allow objects from
10313 SH64 subsets to be linked together.
10314 (INCLUDE_SHMEDIA): Define.
10315 * elf32-sh.c (sh_elf_relocate_section) <local symbol>:
10316 Parenthesize plus-expression inside or-expression.
10317 <global symbol>: Ditto.
10318 (sh_elf_set_mach_from_flags): Remove code refusing
10319 deleted EF_SH64_32BIT_ABI flag.
10320 2000-11-26 Hans-Peter Nilsson <hpn@cygnus.com>
10321 * elf32-sh.c (sh_elf_howto_table) <R_SH_IMM_LOW16_PCREL,
10322 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16_PCREL,
10323 R_SH_IMM_HI16_PCREL, R_SH_64_PCREL>: Set pcrel_offset to true.
10324 (sh_elf_relocate_section) <local symbol>: Or 1 in
10325 calculation of relocation if sym->st_other & STO_SH5_ISA32.
10326 <global symbol>: Ditto if h->other & STO_SH5_ISA32.
10327 * elf32-sh64.c (shmedia_prepare_reloc): Add rel->r_addend to
10328 relocation.
10329 2000-11-24 Hans-Peter Nilsson <hpn@cygnus.com>
10330 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64.lo.
10331 (BFD32_BACKENDS_CFILES): Add elf32-sh64.c.
10332 Regenerate dependencies.
10333 * Makefile.in: Regenerate.
10334 * archures.c: Add bfd_mach_sh5.
10335 * config.bfd: Map targ_cpu sh* to bfd_sh_arch.
10336 Handle sh64-*-elf*. Set targ_cflags to -DINCLUDE_SHMEDIA.
10337 * configure.in: Handle bfd_elf32_sh64_vec and bfd_elf32_sh64l_vec.
10338 * configure: Regenerate.
10339 * reloc.c (BFD_RELOC_SH_SHMEDIA_CODE, BFD_RELOC_SH_IMMU5,
10340 BFD_RELOC_SH_IMMS6, BFD_RELOC_SH_IMMS6BY32, BFD_RELOC_SH_IMMU6,
10341 BFD_RELOC_SH_IMMS10, BFD_RELOC_SH_IMMS10BY2,
10342 BFD_RELOC_SH_IMMS10BY4, BFD_RELOC_SH_IMMS10BY8,
10343 BFD_RELOC_SH_IMMS16, BFD_RELOC_SH_IMMU16, BFD_RELOC_SH_IMM_LOW16,
10344 BFD_RELOC_SH_IMM_LOW16_PCREL, BFD_RELOC_SH_IMM_MEDLOW16,
10345 BFD_RELOC_SH_IMM_MEDLOW16_PCREL, BFD_RELOC_SH_IMM_MEDHI16,
10346 BFD_RELOC_SH_IMM_MEDHI16_PCREL, BFD_RELOC_SH_IMM_HI16,
10347 BFD_RELOC_SH_IMM_HI16_PCREL, BFD_RELOC_SH_PT_16): New relocations.
10348 * cpu-sh.c [INCLUDE_SHMEDIA] (arch_info_struct): Define and link
10349 in item for SH5.
10350 * elf32-sh.c [INCLUDE_SHMEDIA] (sh_elf_howto_table): Add howto items
10351 for SHmedia relocs.
10352 [INCLUDE_SHMEDIA] (sh_rel): Add mappings for SHmedia relocs.
10353 [INCLUDE_SHMEDIA] (sh_elf_relocate_section) [default]: Call
10354 shmedia_prepare_reloc, goto final_link_relocate if it returns
10355 non-zero, else fail as before.
10356 (sh_elf_set_mach_from_flags): Provide function only if not defined
10357 as macro. Do not recognize objects with EF_SH64_32BIT_ABI set.
10358 (sh_elf_set_private_flags): Provide function only if not defined
10359 as a macro.
10360 (sh_elf_copy_private_data): Similar.
10361 (sh_elf_merge_private_data): Similar.
10362 * section.c (SEC_SH_ISA_SHMEDIA): New.
10363 * targets.c (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec): Declare.
10364 * elf32-sh64.c: New file.
10365 * libbfd.h: Regenerate.
10366 * bfd-in2.h: Regenerate.
10367 * po/POTFILES.in: Regenerate.
10368 * po/bfd.pot: Regenerate.
10369 * bfd-in2.h: Regenerate.
10370 * libbfd.h: Regenerate.
10371
10372 2002-02-07 Daniel Jacobowitz <drow@mvista.com>
10373
10374 * bfd-in.h: Update <stdbool.h> check to only see if <stdbool.h> has
10375 been included, not drag it in.
10376 * bfd-in2.h: Regenerate.
10377
10378 2002-02-06 H.J. Lu (hjl@gnu.org)
10379
10380 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Update
10381 the mach and ISA fields if necessary.
10382
10383 2002-02-06 Nick Clifton <nickc@cambridge.redhat.com>
10384
10385 * coffcode.h (coff_set_arch_mach_hook): Select the highest known
10386 ARM architecture when an F_ARM_5 flag is detected, since we cannot
10387 be sure exactly which architecture this represents.
10388
10389 2002-02-05 Nick Clifton <nickc@redhat.com>
10390
10391 * po/tr.po: Updated translation.
10392
10393 2002-02-05 Alan Modra <amodra@bigpond.net.au>
10394
10395 From Jimi X <jimix@watson.ibm.com>
10396 * archures (bfd_mach_ppc64): Define.
10397 (bfd_powerpc_arch): Rename to bfd_powerpc_archs.
10398 (bfd_powerpc_arch): Define.
10399 * bfd-in2.h: Regenerate.
10400 * cpu-powerpc.c (arch_info_struct): Rename to bfd_powerpc_archs.
10401 (bfd_powerpc_arch): Move to tail of bfd_powerpc_archs.
10402 (bfd_powerpc_archs): Add default powerpc64 arch.
10403
10404 2002-02-05 Alan Modra <amodra@bigpond.net.au>
10405
10406 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Check for relocs
10407 against section syms in readonly sections. Don't do the global
10408 sym check if we find one.
10409 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
10410 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
10411 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
10412 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
10413 (elf_s390_grok_prstatus): Add missing prototype.
10414
10415 2002-02-04 Hans-Peter Nilsson <hp@bitrange.com>
10416
10417 * elf64-mmix.c (mmix_dump_bpo_gregs): New function.
10418 (mmix_elf_check_common_relocs) <case R_MMIX_BASE_PLUS_OFFSET>:
10419 Call bfd_get_section_by_name only once. Initialize
10420 bpodata->n_bpo_relocs_this_section.
10421 (_bfd_mmix_prepare_linker_allocated_gregs): Remove comment
10422 referring to DSOs.
10423 (bpo_reloc_request_sort_fn): Don't use difference of values as
10424 return-value.
10425
10426 2002-02-02 David O'Brien <obrien@FreeBSD>
10427
10428 * configure.in: Tweak the FreeBSD 4.x recognition more. Only treat
10429 version 4.5 and later the same as 5-CURRENT.
10430 * configure: Re-generate.
10431
10432 2002-02-02 Jason Thorpe <thorpej@wasabisystems.com>
10433
10434 * config.bfd (hppa*-*-netbsd*): New target.
10435
10436 2002-01-31 Philipp Thomas <pthomas@suse.de>
10437
10438 * coff-arm.c (coff_arm_merge_private_bfd_data): Move ERROR
10439 to front of message. Unify messages with elf32-arm.h. Use
10440 commas where neccessary.
10441 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Use all upcase
10442 ERROR in messages. Unify messages with coff-arm.c. Correct
10443 VFP/FPA error message.
10444 (elf32_arm_print_private_bfd_data): Don't mark APCS-26 and
10445 APCS-32 for translation.
10446
10447 2002-02-01 Hans-Peter Nilsson <hp@bitrange.com>
10448
10449 Perform on-demand global register allocation from
10450 R_MMIX_BASE_PLUS_OFFSET relocs.
10451 * elf64-mmix.c (struct bpo_reloc_section_info, struct
10452 bpo_reloc_request, struct bpo_greg_section_info): New.
10453 (mmix_elf_check_common_relocs, mmix_elf_gc_sweep_hook,
10454 bpo_reloc_request_sort_fn, mmix_elf_relax_section,
10455 _bfd_mmix_check_all_relocs,
10456 _bfd_mmix_prepare_linker_allocated_gregs,
10457 _bfd_mmix_finalize_linker_allocated_gregs): New functions.
10458 (elf_mmix_howto_table): Correct src_mask for most relocs.
10459 (mmix_elf_perform_relocation) <case R_MMIX_BASE_PLUS_OFFSET>: New
10460 case.
10461 (mmix_final_link_relocate) <case R_MMIX_BASE_PLUS_OFFSET>: New
10462 case. Fix typo in comment. New label do_mmix_reloc.
10463 (mmix_elf_check_relocs): Abuse bfd_link_info member base_file to
10464 store first object file with a base-plus-offset reloc. Call
10465 mmix_elf_check_common_relocs for the part common with mmo.
10466 (mmix_elf_final_link): Write out linker-allocated register
10467 contents section.
10468 (elf_backend_gc_sweep_hook): Define.
10469 (bfd_elf64_bfd_relax_section): Define.
10470
10471 * mmo.c: Don't include <ctype.h>
10472 (mmo_init): Correct init-once logic.
10473
10474 2002-02-01 Tom Rix <trix@redhat.com>
10475
10476 * config.bfd: Conditionally support <aiaff> for pre AIX 4.3.
10477
10478 2002-02-01 Alan Modra <amodra@bigpond.net.au>
10479
10480 * Makefile.am: Run "make dep-am"
10481 * Makefile.in: Regenerate.
10482
10483 2002-01-31 David O'Brien <obrien@FreeBSD>
10484
10485 * configure.in: Recognize the differences in core files from FreeBSD
10486 4.{0,1} and later versions of 4.x. This treats 4.2+ the same as
10487 5-CURRENT.
10488 * configure: Regenerate.
10489
10490 2002-01-31 Ivan Guzvinec <ivang@opencores.org>
10491
10492 * coff-or32.c: New file.
10493 * cpu-or32.c: New file.
10494 * elf32-or32.c: New file.
10495 * archures.c: Add support for or32.
10496 * targets.c: Add support for or32.
10497 * bfd-in2.h: Regenerate.
10498 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags,
10499 coff_write_object_contents): Add support for or32.
10500 * config.bfd: Add target.
10501 * configure.in: Add support for or32.
10502 * configure: Regenerate.
10503 * Makefile.am: Add support for or32.
10504 * Makefile.in: Regenerate.
10505 * po/SRC-POTFILES.in: Add or32 files.
10506 * po/bfd.pot: Regenerate.
10507
10508 2002-01-31 Nick Clifton <nickc@cambridge.redhat.com>
10509 Don Lindsay <lindsayd@cisco.com>
10510
10511 * elf32-mips.c (mips_elf_calculate_relocation): Replace 'return
10512 false' with a return of a bfd_reloc_ error code.
10513
10514 2002-01-31 Hans-Peter Nilsson <hp@axis.com>
10515
10516 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
10517 unexport unreferenced symbols when --export-dynamic. Call
10518 _bfd_elf_strtab_delref when unexporting.
10519
10520 2002-01-30 Daniel Jacobowitz <drow@mvista.com>
10521
10522 * bfd-in.h: Include <stdbool.h> if it is available.
10523 * bfd-in2.h: Regenerated.
10524
10525 2002-01-31 Alan Modra <amodra@bigpond.net.au>
10526
10527 * elf64-ppc.c (func_desc_adjust): STV_PROTECTED functions should
10528 not go via the plt.
10529
10530 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
10531
10532 * archures.c: Tidy up formatting of embedded comments.
10533 * bfd.c: Tidy up formatting of embedded comments.
10534 * bfd-in.h: Fix formatting of comments.
10535 * reloc.c: Tidy up formatting of ordinary & embedded comments.
10536 * section.c: Tidy up formatting of embedded comments.
10537 * syms.c: Tidy up formatting of embedded comments.
10538 * targets.c: Tidy up formatting of embedded comments.
10539
10540 * bfd-in2.h: Regenerate.
10541
10542 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
10543
10544 * vms-tir.c (cmd_name): New function.
10545 (tir_cmd_name): New function.
10546 (etir_sta, etir_sto, etir_opr, etir_stc): Use cmd_name().
10547 (tir_opr, tir_ctl, tir_cmd): use tir_cmd_name().
10548 Fix formatting.
10549
10550 * peXXigen.c (pe_print_idata): Rearrange message to aid in
10551 translation.
10552 (pe_print_pdata): Rearrange message to aid in translation.
10553
10554 * libbfd.c (warn_deprecated): Rearrange error message to aid in
10555 translation.
10556
10557 * ihex.c (ihex_write_object_contents): Fix spelling typo.
10558
10559 * ieee.c (ieee_slurp_external_symbols): Remove spurious space.
10560
10561 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Rearrange error
10562 message to aid in translation.
10563
10564 * elf64-mmix.c (mmix_final_link_relocate): Rearrange error message
10565 to aid in translation.
10566
10567 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix typo.
10568
10569 2002-01-30 Philipp Thomas <pthomas@suse.de>
10570
10571 * coff-arm.c, elf32-elf.h: Unify messages.
10572
10573 2002-01-30 Nick Clifton <nickc@redhat.com>
10574
10575 * po/sv.po: Updated translation.
10576
10577 2002-01-30 Philipp Thomas <pthomas@suse.de>
10578
10579 * dwarf2.c (read_abbrev): Use full section name in error message.
10580 (decode_line_info): Likewise.
10581
10582 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Don't translate debugging
10583 message.
10584
10585 2002-01-30 Alan Modra <amodra@bigpond.net.au>
10586
10587 * elf64-ppc.c (func_desc_adjust): Only provide missing function
10588 descriptor symbols for undefined function code syms. Clear
10589 ELF_LINK_NON_ELF so that they can stay weak.
10590
10591 2002-01-29 Chris Demetriou <cgd@broadcom.com>
10592 Mitch Lichtenberg <mpl@broadcom.com>
10593
10594 * bfd-in.h (bfd_mips_elf32_create_embedded_relocs): New prototype.
10595 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): New function
10596 to handle 32-bit ELF embedded reloc (ld --embedded-relocs)
10597 generation.
10598 * bfd-in2.h: Regenerate.
10599
10600 2002-01-29 Chris Demetriou <cgd@broadcom.com>
10601
10602 * elf32-mips.c: Add additional comments about HI16 relocation
10603 processing.
10604 (_bfd_mips_elf_hi16_reloc): Don't subtract address here for
10605 pc-relative relocations. (Reverts change made on 2001-10-31.)
10606 (_bfd_mips_elf_lo16_reloc): Subtract address of LO16 part here
10607 for pc-relative relocations.
10608 (mips_elf_calculate_relocation): Add a comment about a kludge
10609 in the R_MIPS_GNU_REL_HI16 handling.
10610 (_bfd_mips_elf_relocate_section): Implement that kludge;
10611 adjust pc-relative HI16 relocation for difference in HI16 and
10612 LO16 addresses, since it can't easily be done in
10613 mips_elf_calculate_relocation.
10614
10615 2002-01-29 Martin Schwidefsky <schwidefsky@de.ibm.com>
10616
10617 * elf32-i386 (elf_i386_adjust_dynamic_symbol): Do not replace PLT32
10618 relocations with PC32 relocations for undefined or weak symbols.
10619 * elf32-s390 (elf_i386_adjust_dynamic_symbol): Likewise.
10620 * elf64-s390x (elf_i386_adjust_dynamic_symbol): Likewise.
10621
10622 2002-01-28 Jason Thorpe <thorpej@wasabisystems.com>
10623
10624 * elfcore.h (elf_core_file_p): Improve comment for last change.
10625
10626 2002-01-27 Daniel Jacobowitz <drow@mvista.com>
10627
10628 * configure: Regenerated.
10629
10630 2002-01-27 Jason Thorpe <thorpej@wasabisystems.com>
10631
10632 * elfcore.h (elf_core_file_p): Set the machine architecture
10633 before processing the program headers.
10634
10635 2002-01-26 Hans-Peter Nilsson <hp@bitrange.com>
10636
10637 * configure.in <64-bit configuration>: If using gcc, check and
10638 emit error for egcs-1.1.2.
10639 * configure: Regenerate.
10640
10641 2002-01-26 Egor Duda <deo@logos-m.ru>
10642
10643 * elf.c (elfcore_grok_win32pstatus): Copy only as much information
10644 as possible to avoid stack corruption.
10645
10646 2002-01-26 Richard Henderson <rth@redhat.com>
10647
10648 * elf64-alpha.c (elf64_alpha_check_relocs): Don't set reltext
10649 for non-allocated sections.
10650
10651 2002-01-25 Mark Kettenis <kettenis@gnu.org>
10652
10653 * elf.c (elfcore_write_prstatus): Make sure we pass the address of
10654 prstat.pr_reg even if it is a struct.
10655
10656 2002-01-25 Steve Ellcey <sje@cup.hp.com>
10657
10658 * elfxx-ia64.c: Reset AIX vector function overrides for HP-UX.
10659
10660 2002-01-25 Philipp Thomas <pthomas@suse.de>
10661
10662 * coffgen.c (coff_print_symbol): Don't mark info message
10663 for translation.
10664
10665 2002-01-25 Nick Clifton <nickc@redhat.com>
10666
10667 * po/fr.po: Updated translation.
10668 * po/es.po: Updated translation.
10669
10670 2002-01-25 Philipp Thomas <pthomas@suse.de>
10671
10672 * coff-alpha.c (alpha_relocate_section): Unify warning message
10673 for GP relative relocations without GP defined.
10674 * coff-mips.c (mips_relocate_section): Likewise.
10675
10676 2002-01-25 Alan Modra <amodra@bigpond.net.au>
10677
10678 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Avoid
10679 unsigned overflow when new_offset < old_offset.
10680
10681 2002-01-24 Philipp Thomas <pthomas@suse.de>
10682
10683 * bfd.c (_bfd_abort): Fix typo.
10684
10685 2002-01-23 Richard Henderson <rth@redhat.com>
10686
10687 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't suppress
10688 plt entries for undefweak symbols.
10689
10690 2002-01-23 Steve Ellcey <sje@cup.hp.com>
10691
10692 * targets.c (bfd_elf32_ia64_hpux_big_vec): Add to DEFAULT_VECTOR.
10693 (bfd_elf64_ia64_hpux_big_vec): Ditto.
10694 (bfd_elf32_h8300_vec): Ditto.
10695
10696 2002-01-23 Alan Modra <amodra@bigpond.net.au>
10697
10698 * elf64-ppc.c: Remove stale part of ABI comment.
10699 (NO_OPD_RELOCS): Define.
10700 (ppc64_elf_check_relocs): Use it.
10701 (ppc64_elf_relocate_section): Here too.
10702 (build_one_stub): Don't point function syms at the stub. Instead,
10703 hijack plt.offset.
10704 (ppc64_elf_relocate_section): Check whether REL24 relocs should
10705 really go to the stub. Make all dynamic relocs in opd against
10706 locals.
10707 (ppc64_elf_finish_dynamic_symbol): Allow for non-standard use of
10708 plt.offset.
10709
10710 2002-01-22 Richard Henderson <rth@redhat.com>
10711
10712 * elf64-alpha.c (INSN_UNOP): Encode with RB as $sp.
10713
10714 2002-01-22 Alan Modra <amodra@bigpond.net.au>
10715
10716 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Correct sign of
10717 TOC_BASE_OFF adjustment.
10718
10719 * Makefile.am: Run "make dep-am".
10720 * Makefile.in: Regenerate.
10721 * po/SRC-POTFILES.in: Regenerate.
10722
10723 2002-01-22 John David Anglin <dave@hiauly1.hia.nrc.ca>
10724
10725 * configure.host (hppa*64*-*-hpux*, hppa*64*-*-linux*): Add new
10726 host defines.
10727
10728 2002-01-21 Hans-Peter Nilsson <hp@axis.com>
10729
10730 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GOTREL>:
10731 Check for and emit error if sgot is NULL at this point.
10732
10733 2002-01-21 Jason Thorpe <thorpej@wasabisystems.com>
10734
10735 * config.bfd (ia64*-*-netbsd*): New target.
10736
10737 2002-01-21 Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
10738
10739 * som.c (som_write_space_strings): Comment typo fix.
10740
10741 2002-01-21 Alan Modra <amodra@bigpond.net.au>
10742
10743 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_func and
10744 is_func_descriptor fields.
10745 (link_hash_newfunc): Init them.
10746 (ppc64_elf_check_relocs): Only R_PPC24_REL24 syms starting with a
10747 dot are candidates for plt entries. When processing .opd relocs,
10748 set function descriptor strings to point inside function code
10749 string, and set new ppc_link_hash_entry fields.
10750 (ppc64_elf_gc_sweep_hook): Don't sweep R_PPC64_REL24 relocs.
10751 (ppc64_elf_adjust_dynamic_symbol): Remove most code dealing with
10752 function descriptors. It's now done in..
10753 (func_desc_adjust): New.
10754 (ppc64_elf_func_desc_adjust): New.
10755 (define elf_backend_always_size_sections): Define.
10756 (ppc64_elf_hide_symbol): New.
10757 (define elf_backend_hide_symbol): Define.
10758 (allocate_dynrelocs): Remove code looking up function descriptors
10759 as that has been done earlier.
10760 (ppc64_elf_size_dynamic_sections): Use htab shortcut to elf hash
10761 table.
10762 (ppc64_elf_finish_dynamic_symbol): Likewise. Remove code looking
10763 up function descriptor.
10764 (build_one_stub): Look up the function code sym. Check for
10765 invalid plt offsets.
10766 (ppc64_elf_relocate_section): Tweak calls to undefined weak syms.
10767 Convert R_PPC64_TOC relocs to R_PPC64_RELATIVE in shared libs.
10768
10769 * elf-bfd.h (elf_backend_data <elf_backend_hide_symbol>): Add
10770 boolean param.
10771 (_bfd_elf_link_hash_hide_symbol): Likewise.
10772 * elflink.h (elf_link_add_object_symbols): Adjust call to
10773 elf_backend_hide_symbol.
10774 (elf_fix_symbol_flags): Likewise.
10775 (elf_link_assign_sym_version): Likewise. Use bfd_malloc rather
10776 than bfd_alloc.
10777 * elf.c (_bfd_elf_link_hash_hide_symbol): Add "force_local" param.
10778 Set ELF_LINK_FORCED_LOCAL and call _bfd_elf_strtab_delref.
10779 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
10780 (clobber_millicode_symbols): Adjust to suit new hide_symbol.
10781 * elf32-cris.c (elf_cris_hide_symbol): Add "force_local" param
10782 and adjust to suit.
10783 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise, and call
10784 _bfd_elf_link_hash_hide_symbol rather than duplicating code.
10785 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
10786
10787 2002-01-18 Alan Modra <amodra@bigpond.net.au>
10788
10789 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Test for a
10790 dynamic function descriptor symbol, not the associated function
10791 symbol.
10792
10793 2002-01-17 Eric Christopher <echristo@redhat.com>
10794
10795 * elf32-mips.c (mips_elf_calculate_relocation): Fix typo.
10796
10797 2002-01-17 Nick Clifton <nickc@cambridge.redhat.com>
10798
10799 * po/bfd.pot: Regenerate.
10800 * po/fr.po: Regenerate.
10801
10802 2002-01-17 Alan Modra <amodra@bigpond.net.au>
10803
10804 * elf-bfd.h (elf_backend_data <elf_backend_section_from_bfd_section>):
10805 Remove "Elf_Internal_Shdr *" param.
10806 (_bfd_mips_elf_section_from_bfd_section): Ditto.
10807 * elf32-mips.c (_bfd_mips_elf_section_from_bfd_section): Ditto.
10808 * elf32-m32r.c (_bfd_m32r_elf_section_from_bfd_section): Ditto.
10809 * elf32-v850.c (v850_elf_section_from_bfd_section): Ditto.
10810 * elf64-mmix.c (mmix_elf_section_from_bfd_section): Ditto.
10811 * elfxx-ia64.c (elfNN_hpux_backend_section_from_bfd_section): Ditto.
10812 * elf.c (_bfd_elf_section_from_bfd_section): Allow backend
10813 function to override special sections. Remove hdr arg from
10814 backend call, and don't loop.
10815
10816 2002-01-16 Eric Christopher <echristo@redhat.com>
10817
10818 * elf32-mips.c (mips_elf_calculate_relocation): Set require_jalxp
10819 on R_MIPS_26 and target is 16bit. Add R_MIPS16_GPREL to list of
10820 relocations requiring gp0 and gp.
10821
10822 2002-01-16 Richard Earnshaw <rearnsha@arm.com>
10823
10824 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle
10825 EF_ARM_VFP_FLOAT.
10826 (elf32_arm_print_private_bfd_data): Likewise.
10827
10828 2002-01-16 Nick Clifton <nickc@cambridge.redhat.com>
10829
10830 * po/tr.po: Import new version.
10831
10832 2002-01-16 Alan Modra <amodra@bigpond.net.au>
10833
10834 * elf64-ppc.c (ppc64_elf_howto_raw): Remove stale FIXMEs.
10835 (ppc64_elf_reloc_type_lookup): Use proper CTOR reloc.
10836 (ORI_R0_R0_0): Correct.
10837
10838 2002-01-16 Alan Modra <amodra@bigpond.net.au>
10839
10840 * elflink.c (_bfd_elf_create_dynamic_sections): Don't set SEC_CODE
10841 when plt_not_loaded.
10842 * elf64-ppc.c (ppc64_elf_create_dynamic_sections): No need to
10843 clear .plt SEC_CODE here. Create .stub and correct .glink flags.
10844 (PLT_INITIAL_ENTRY_SIZE): Set to 24.
10845 (ppc64_elf_glink_code): Delete.
10846 (PPC64_ELF_GLINK_SIZE): Delete.
10847 (ADDIS_R12_R2, STD_R2_40R1, LD_R11_0R12, LD_R2_0R12, MTCTR_R11,
10848 BCTR, ADDIS_R12_R12_1, LD_R2_40R1, NOP, LI_R0_0, B_DOT, LIS_R0_0,
10849 ORI_R0_R0_0): Define.
10850 (PLT_CALL_STUB_SIZE, GLINK_CALL_STUB_SIZE): Define.
10851 (struct ppc_link_hash_table): Add sstub and plt_overflow.
10852 (ppc64_elf_link_hash_table_create): Init them.
10853 (ppc64_elf_check_relocs <R_PPC64_REL24>): Refcount .plt entry.
10854 Don't copy to shared lib.
10855 (ppc64_elf_check_relocs): Call bfd_set_error on errors.
10856 (ppc64_elf_gc_sweep_hook <R_PPC64_REL24>): Sweep plt refcount.
10857 (allocate_dynrelocs <plt>): Don't change function sym here. Make
10858 room for .stub and .glink code.
10859 (ppc64_elf_size_dynamic_sections): Handle .stub. Make entry for
10860 DT_PPC64_GLINK.
10861 (ppc64_elf_final_link): Rename to ppc64_elf_set_toc. Don't call
10862 bfd_elf64_bfd_final_link.
10863 (bfd_elf64_bfd_final_link): Don't define.
10864 (ppc64_elf_size_stubs): New.
10865 (build_plt_stub): New.
10866 (build_one_stub): New.
10867 (ppc64_elf_build_stubs): New.
10868 (ppc64_elf_relocate_section <toc relocs>): Remove assert.
10869 (ppc64_elf_relocate_section): Don't copy R_PPC64_REL24 relocs.
10870 (ppc64_elf_finish_dynamic_symbol): Don't build stubs here. Set
10871 DT_PPC64_GLINK entry. Tweak DT_PLTGOT, DT_JMPREL, DT_PLTRELSZ in
10872 case output sections not separate. Adjust DT_RELASZ to not
10873 include plt relocs. Set reserved got entry. Set got and plt
10874 entry size.
10875 (elf_backend_got_header_size): Set to 8.
10876 * elf64-ppc.h: New file.
10877
10878 2002-01-16 Alan Modra <amodra@bigpond.net.au>
10879
10880 * elf32-arm.h (elf32_arm_size_dynamic_sections): When removing
10881 sections, use bfd_section_list_remove.
10882 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
10883 * elflink.h (elf_link_add_object_symbols): When removing all
10884 sections, use bfd_section_list_clear.
10885
10886 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
10887
10888 * po/sv.po: New file: Swedish translation.
10889 * configure.in (ALL_LINGUAS): Add sv.
10890 * configure: Regenerate.
10891
10892 2002-01-15 Jakub Jelinek <jakub@redhat.com>
10893
10894 * elflink.h (elf_link_input_bfd): Back out 2002-01-07 change.
10895 * elf.c (merge_sections_remove_hook): New function.
10896 (_bfd_elf_merge_sections): Pass it as 3rd argument to
10897 _bfd_merge_sections.
10898 * libbfd-in.h (_bfd_merge_sections): Add 3rd argument.
10899 * libbfd.h: Rebuilt.
10900 * merge.c (_bfd_merge_sections): Add remove_hook argument.
10901 Call remove_hook if a SEC_EXCLUDE section is encountered.
10902
10903 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
10904
10905 * elf32-xstormy16.c (xstormy16_reloc_map): Add new field 'table'.
10906 (xstormy16_reloc_map): Initialise new field with correct howto
10907 table.
10908 (xstormy16_reloc_type_lookup): Use 'table' field to locate correct
10909 howto entry.
10910
10911 2002-01-10 Michael Snyder <msnyder@redhat.com>
10912
10913 * elf.c (elfcore_write_prstatus): Use long instead of pid_t;
10914 (elfcore_write_pstatus): Use long instead of pid_t;
10915 * elf-bfd.h: Change prototypes to use long instead of pid_t;
10916
10917 2002-01-09 Jason Thorpe <thorpej@wasabisystems.com>
10918
10919 * elf.c: Update copyright years.
10920 (elfcore_grok_netbsd_note): Use NT_NETBSDCORE_PROCINFO
10921 and NT_NETBSDCORE_FIRSTMACH. Improve a comment.
10922
10923 2002-01-08 Michael Snyder <msnyder@redhat.com>
10924
10925 Add capability to write corefile note sections, for gdb.
10926 * elf.c (elfcore_write_note): New function.
10927 (elfcore_write_prpsinfo): New function.
10928 (elfcore_write_prstatus): New function.
10929 (elfcore_write_pstatus): New function.
10930 (elfcore_write_prfpreg): New function.
10931 (elfcore_write_prxfpreg): New function.
10932 * elf-bfd.h: Add prototypes for above functions.
10933
10934 2002-01-08 Alexandre Oliva <aoliva@redhat.com>
10935
10936 * elf.c (elf_fake_sections): Propagate errors from
10937 elf_backend_fake_section.
10938
10939 2002-01-07 Jason Thorpe <thorpej@wasabisystems.com>
10940
10941 * Makefile.am (BFD32_BACKENDS): Add elf32-sh-nbsd.lo.
10942 (BFD32_BACKENDS_CFILES): Add elf32-sh-nbsd.c.
10943 (elf32-sh-nbsd.lo): New rule.
10944 * Makefile.in: Regenerate.
10945 * config.bfd (sh*le-*-netbsdelf*): New target.
10946 (sh*-*-netbsdelf*): New target.
10947 * configure.in: Include netbsd-core.lo for native sh*-*-netbsd*.
10948 (bfd_elf32_shnbsd_vec): New vector.
10949 (bfd_elf32_shlnbsd_vec): New vector.
10950 * configure: Regenerate.
10951 * elf32-sh-nbsd.c: New file.
10952 * targets.c: Update copyright years.
10953 (_bfd_target_vector): Add bfd_elf32_shlnbsd_vec and
10954 bfd_elf32_shnbsd_vec.
10955
10956 2002-01-07 Aldy Hernandez <aldyh@redhat.com>
10957
10958 * coff-rs6000.c (READ20): Use bfd_scan_vma.
10959
10960 2002-01-07 Geoffrey Keating <geoffk@redhat.com>
10961
10962 * elflink.h (elf_link_input_bfd): Don't ask for the merged offset
10963 of a symbol in a section that will be deleted.
10964
10965 2002-01-07 Nick Clifton <nickc@cambridge.redhat.com>
10966
10967 * po/es.po: New file: Spanish translation.
10968 * configure.in (ALL_LINGUAS): Add es.
10969 * configure: Regenerate.
10970
10971 2002-01-06 Steve Ellcey <sje@cup.hp.com>
10972
10973 * elfxx-ia64.c (is_unwind_section_name): Add target vector as
10974 argument so we can handle HP-UX specially.
10975 (elfNN_ia64_hpux_vec): New for use in is_unwind_section_name.
10976 (elfNN_hpux_backend_section_from_bfd_section): New for support
10977 of SHN_IA_64_ANSI_COMMON.
10978 (elfNN_ia64_relax_section): Add support for SHN_IA_64_ANSI_COMMON.
10979 (is_unwind_section_name): Add special HP-UX support.
10980 (elfNN_ia64_section_from_shdr): Add support for more sections.
10981 (elfNN_ia64_fake_sections): Modify is_unwind_section_name call and
10982 add support for more sections.
10983 (elfNN_ia64_additional_program_headers): Modify
10984 is_unwind_section_name call.
10985 (elfNN_ia64_modify_segment_map): Remove assumption that there is
10986 only one unwind section in segment.
10987
10988 2002-01-06 Alan Modra <amodra@bigpond.net.au>
10989
10990 * syms.c (_bfd_generic_make_empty_symbol): New function.
10991 * libbfd-in.h (_bfd_nosymbols_make_empty_symbol): Define as
10992 _bfd_generic_make_empty_symbol.
10993 * libbfd.h: Regenerate.
10994 * bfd-in2.h: Regenerate.
10995 * hppabsd-core.c (hppabsd_core_make_empty_symbol): Delete function.
10996 (hppabsd_core_get_symtab_upper_bound): Don't define.
10997 (hppabsd_core_get_symtab): Likewise.
10998 (hppabsd_core_print_symbol): Likewise.
10999 (hppabsd_core_get_symbol_info): Likewise.
11000 (hppabsd_core_bfd_is_local_label_name): Likewise.
11001 (hppabsd_core_get_lineno): Likewise.
11002 (hppabsd_core_find_nearest_line): Likewise.
11003 (hppabsd_core_bfd_make_debug_symbol): Likewise.
11004 (hppabsd_core_read_minisymbols): Likewise.
11005 (hppabsd_core_minisymbol_to_symbol): Likewise.
11006 (hppabsd_core_vec): Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols).
11007 Formatting fixes.
11008 * hpux-core.c: Similarly.
11009 * irix-core.c: Similarly.
11010 * osf-core.c: Similarly.
11011 * sco5-core.c: Similarly.
11012 * binary.c (binary_make_empty_symbol): Remove function, define as
11013 _bfd_generic_make_empty_symbol.
11014 * ihex.c (ihex_make_empty_symbol): Likewise.
11015 * mmo.c (mmo_make_empty_symbol): Likewise.
11016 * ppcboot.c (ppcboot_make_empty_symbol): Likewise.
11017 * srec.c (srec_make_empty_symbol): Likewise.
11018 * versados.c (versados_make_empty_symbol): Likewise.
11019 * vms.c (_bfd_vms_make_empty_symbol): Remove.
11020 (vms_make_empty_symbol): Define as _bfd_generic_make_empty_symbol.
11021 * vms-gsd.c (_bfd_vms_slurp_gsd): Call bfd_make_empty_symbol
11022 rather than _bfd_vms_make_empty_symbol.
11023 * vms-misc.c (new_symbol): Likewise.
11024
11025 2002-01-05 Alan Modra <amodra@bigpond.net.au>
11026
11027 * section.c (bfd_section_init): Remove unnecessary initialisations.
11028 (bfd_section_list_clear): New function.
11029 (bfd_section_list_remove, bfd_section_list_insert): New macros.
11030 (_bfd_strip_section_from_output): Use them.
11031 * coffcode.h (coff_set_alignment_hook): Likewise.
11032 * elf32-mips.c (_bfd_mips_elf_final_link): Likewise.
11033 * elf64-mips.c (mips_elf64_final_link): Likewise.
11034 * elf64-mmix.c (mmix_elf_final_link): Likewise.
11035 * sunos.c (sunos_add_dynamic_symbols): Likewise.
11036 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
11037 * bfd-in2.h: Regenerate.
11038
11039 * netbsd-core.c (netbsd_core_file_p): Use bfd_make_section_anyway
11040 rather than doing our own section handling. Clean up after errors
11041 with bfd_release and bfd_section_list_clear. Handle unexpected
11042 flags.
11043 * aoutf1.h (sunos4_core_file_p): Likewise.
11044 * aix386-core.c (aix386_core_file_p): Likewise.
11045 * cisco-core.c (cisco_core_file_validate): Likewise.
11046 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
11047 * trad-core.c (trad_unix_core_file_p): Likewise.
11048
11049 * hppabsd-core.c (hppabsd_core_core_file_p): Clean up after errors
11050 with bfd_release and bfd_section_list_clear.
11051 * hpux-core.c (hpux_core_core_file_p): Likewise.
11052 * irix-core.c (irix_core_core_file_p): Likewise.
11053 * lynx-core.c (lynx_core_file_p): Likewise.
11054 * osf-core.c (osf_core_core_file_p): Likewise.
11055 * rs6000-core.c (rs6000coff_core_p): Likewise.
11056 * sco5-core.c (sco5_core_file_p): Likewise.
11057
11058 * elf32-mips.c (_bfd_mips_elf_lo16_reloc): Simplify, and perform
11059 sign extension adjustments without conditionals.
11060
11061 2002-01-04 Jakub Jelinek <jakub@redhat.com>
11062
11063 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Don't crash if
11064 CIE at .eh_frame start is removed due to no FDEs referencing it.
11065
11066 2002-01-04 Jason Thorpe <thorpej@wasabisystems.com>
11067
11068 * config.bfd (x86_64-*-netbsd*): New target.
11069 * configure.in (x86_64-*-netbsd*): Set COREFILE
11070 to netbsd-core.lo.
11071 * configure: Regenerated.
11072
11073 2002-01-03 Tom Rix <trix@redhat.com>
11074
11075 * xcofflink.c (_bfd_xcoff_bfd_final_link): Update .pad section ordering
11076 for recent bfd_make_section_anyway change.
11077
11078 2002-01-03 Nick Clifton <nickc@cambridge.redhat.com>
11079
11080 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
11081 R_ARM_THM_PC11 reloc.
11082
11083 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
11084
11085 * configure.in (LINGUAS): Add ja.
11086 * configure: Regenerate.
11087 * po/ja.po: Import from translation project's web site.
11088
11089 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
11090
11091 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Reformat error
11092 messages to ease translation into other languages.
11093
11094 For older changes see ChangeLog-0001
11095 \f
11096 Local Variables:
11097 mode: change-log
11098 left-margin: 8
11099 fill-column: 74
11100 version-control: never
11101 End:
This page took 0.259753 seconds and 4 git commands to generate.