* elf-bfd.h (is_elf_hash_table): Take hash tab rather than info arg.
[binutils-gdb.git] / bfd / ChangeLog
1 2003-12-01 Alan Modra <amodra@bigpond.net.au>
2
3 * elf-bfd.h (is_elf_hash_table): Take hash tab rather than info arg.
4 * elf.c (_bfd_elf_merge_sections): Adjust to suit.
5 (_bfd_elf_link_just_syms): Likewise.
6 (bfd_elf_get_needed_list): Likewise.
7 (bfd_elf_get_runpath_list): Likewise.
8 (_bfd_elf_link_hash_copy_indirect): Remove unneeded parens.
9 * elf32-hppa.c (elf32_hppa_setup_section_lists): Don't check hash tab
10 creator flavour.
11 (elf32_hppa_set_gp): Look up output sections rather than using htab.
12 * elf32-i960.c: Comment fix. Formatting.
13 * elf32-m32r.c (m32r_elf_add_symbol_hook): Use is_elf_hash_table
14 rather than testing creator flavour.
15 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
16 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
17 * elflink.c (_bfd_elf_link_create_dynamic_sections): Adjust for
18 is_elf_hash_table change. Remove redundant test.
19 (bfd_elf_record_link_assignment): Use is_elf_hash_table rather than
20 testing creator flavour.
21 (elf_link_record_local_dynamic_symbol): Adjust for is_elf_hash_table.
22 (_bfd_elf_fix_symbol_flags): Likewise.
23 (_bfd_elf_adjust_dynamic_symbol): Likewise.
24 * elflink.h (elf_link_add_object_symbols): Likewise. Remove redundant
25 checks. Use is_elf_hash_table rather than testing creator flavour.
26 Use hash_table throughout in place of info->hash.
27 (elf_add_dynamic_entry): Adjust for is_elf_hash_table change.
28 (NAME(bfd_elf,size_dynamic_sections)): Likewise. Remove redundant
29 check.
30 (elf_bfd_final_link): Adjust for is_elf_hash_table change.
31 (elf_link_check_versioned_symbol): Use is_elf_hash_table rather than
32 testing creator flavour.
33 (elf_gc_sections): Add is_elf_hash_table check.
34 (elf_gc_common_finalize_got_offsets): Likewise.
35 (elf_bfd_discard_info): Adjust for is_elf_hash_table change. Remove
36 redundant check.
37 * elfxx-ia64.c (elfNN_ia64_relax_section): Use is_elf_hash_table
38 rather than testing creator flavour.
39
40 2003-11-28 Christian Groessler <chris@groessler.org>
41
42 * cpu-z8k.c: Convert to ISO C90.
43 * coff-z8k.c: Likewise.
44
45 2003-11-27 Alexandre Oliva <aoliva@redhat.com>
46
47 * elf-bfd.h (elf_backend_data::elf_backend_modify_segment_map):
48 Add link info argument.
49 * elf32-i370.c (elf_backend_modify_segment_map): Likewise.
50 * elf32-ppc.c (ppc_elf_modify_segment_map): Likewise.
51 * elf32-xtensa.c (elf_xtensa_modify_segment_map): Likewise.
52 * elf64-hppa.c (elf64_hppa_modify_segment_map): Likewise.
53 * elfxx-ia64.c (elfNN_ia64_modify_segment_map): Likewise.
54 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Likewise.
55 * elfxx-mips.h (_bfd_mips_elf_modify_segment_map): Likewise.
56 * elf.c (assign_file_positions_except_relocs,
57 assign_file_positions_for_segments): Likewise. Adjust calls.
58
59 2003-11-27 Mark Kettenis <kettenis@gnu.org>
60
61 * elf.c (elfcore_grok_netbsd_procinfo): Make a pseudosection out
62 of the note.
63
64 2003-11-26 Daniel Jacobowitz <drow@mvista.com>
65 Richard Sandiford <rsandifo@redhat.com>
66
67 * elfxx-mips.c (mips_elf_set_global_got_offset): Don't set no_fn_stub.
68 (mips_elf_set_no_stub): New function.
69 (mips_elf_multi_got): Call it.
70 (_bfd_mips_elf_finish_dynamic_symbol): If a relocation is needed for
71 a secondary GOT entry, create an R_MIPS_32 or R_MIPS_64 relocation and
72 use mips_elf_create_dynamic_relocation to deal with any compatibility
73 issues. Store the adjusted addend in the GOT slot.
74
75 2003-11-25 Mattias EngdegÄrd <mattias@virtutech.se>
76
77 * stabs.c (_bfd_link_section_stabs): Skip N_EXCL stabs when
78 procesing N_BINCL stabs.
79
80 2003-11-25 Alan Modra <amodra@bigpond.net.au>
81
82 * elf64-ppc.c (ppc_type_of_stub): Disallow stubs other than
83 ppc_stub_plt_call to symbols defined in shared libs.
84
85 2003-11-22 Jakub Jelinek <jakub@redhat.com>
86
87 * elf-bfd.h (ELF_LINK_POINTER_EQUALITY_NEEDED): Define new flag.
88 * elf.c (_bfd_elf_link_hash_copy_indirect): Copy it.
89 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
90 (elf_i386_check_relocs): Set it.
91 (elf_i386_finish_dynamic_symbol): If it is not set,
92 clear st_value of SHN_UNDEF symbol.
93
94 2003-11-20 Jim Blandy <jimb@redhat.com>
95
96 * cpu-powerpc.c (powerpc_compatible): Any ISA in the PowerPC
97 family is a superset of <bfd_arch_rs6000,bfd_mach_rs6k>.
98
99 2003-11-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
100
101 * elf32-s390.c (elf_s390_relocate_section): Don't recalculate symbol
102 section for reloc output and subtract the output section's address
103 from the addend when converting a relocation into one against a
104 section symbol.
105 * elf64-s390.c (elf_s390_relocate_section): Likewise.
106
107 2003-11-18 James E Wilson <wilson@specifixinc.com>
108
109 * elfxx-ia64.c (get_fptr): For fptr_rel, use dynobj not abfd.
110 (elfNN_ia64_size_dynamic_sections): When stripping sections, check
111 for ia64_info->rel_fptr_sec.
112
113 2003-11-18 Alan Modra <amodra@bigpond.net.au>
114
115 * elf64-ppc.c (toc_adjusting_stub_needed): Exit early if section
116 size is zero.
117
118 2003-11-17 Daniel Jacobowitz <drow@mvista.com>
119
120 * elf.c (_bfd_elf_link_hash_copy_indirect): Copy
121 ELF_LINK_HASH_NEEDS_PLT. Fix formatting.
122 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
123 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
124 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Likewise.
125 * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
126 * elf32-sh.c (sh_elf_copy_indirect_symbol): Likewise.
127 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
128 * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
129 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
130 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
131 * elf32-xtensa.c (elf_xtensa_copy_indirect_symbol): Remove.
132 (elf_backend_copy_indirect_symbol): Don't define.
133
134 2003-11-14 Daniel Jacobowitz <drow@mvista.com>
135
136 * elfxx-mips.c (mips_elf_merge_gots): Weaken assert for local
137 GOT entries.
138
139 2003-11-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
140
141 * elf32-s390.c (elf_s390_relocate_section): Only convert R_390_32
142 to R_390_RELATIVE. Convert the other relocations against local
143 symbols to relocations against the start of the section.
144 * elf64-s390.c (elf_s390_relocate_section): Only convert R_390_64
145 to R_390_RELATIVE. Convert the other relocations against local
146 symbols to relocations against the start of the section.
147
148 2003-11-11 Nick Clifton <nickc@redhat.com>
149
150 * elf-m10300.c (bfd_mn10300_elf_size_dynamic_sections): Use
151 info->executable not info->shared to decide if a .interp section
152 should be present.
153 * elf32-arm.h (elf32_arm_size_dynamic_sections): Likewise.
154 * elf32-cris.c (elf_cris_size_dynamic_sections): Likewise.
155 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
156 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
157 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
158 * elf32-vax.c (elf_vax_size_dynamic_sections): Likewise.
159 * elf32-xtensa.c (elf_xtensa_size_dynamic_sections): Likewise.
160 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
161 * elfxx-mips.c (_bfd_mips_size_dynamic_sections): Likewise.
162 * elflink.h (size_dynamic_sections): Likewise.
163
164 2003-11-10 Jonathan Wilson <jonwil@tpgi.com.au>
165
166 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Swap out tls pointer.
167 (_bfd_XXi_final_link_postscript): Look for __tks_used symbol. If
168 found initialise the tls data directory entry.
169
170 2003-11-07 Alan Modra <amodra@bigpond.net.au>
171
172 * elf32-ppc.c (ppc_elf_install_value): Delete.
173 (shared_stub_entry, stub_entry): Make them arrays of ints.
174 Remove initial branch.
175 (ppc_elf_relax_section): Write one branch around all trampolines
176 instead. Correct bogus R_PPC_PLTREL24 handling. Correct
177 branch range check. Only use shared_stub_entry when shared.
178 Test that branches can reach stubs. Write trampolines out at
179 end so that just one realloc is used. Handle little-endian
180 mode. Move relevant code from ppc_elf_install_value to here.
181 (ppc_elf_relocate_section): Move code handling RELAX32 from
182 ppc_elf_install_value to here.
183
184 2003-11-06 Alan Modra <amodra@bigpond.net.au>
185
186 * elf32-ppc.c (ppc_elf_howto_raw); Add entry for R_PPC_RELAX32PC.
187 (ppc_elf_install_value): Handle R_PPC_RELAX32PC. Merge duplicate
188 cases.
189 (shared_stub_entry): Correct opcode.
190 (ppc_elf_relax_section): Generate R_PPC_RELAX32PC relocs.
191 (ppc_elf_relocate_section): Handle them.
192
193 2003-11-05 Alan Modra <amodra@bigpond.net.au>
194
195 * elf.c (_bfd_elf_rela_local_sym): Accept asection **, and return
196 updated section in case of merged section.
197 * elf-bfd.h (_bfd_elf_rela_local_sym): Update declaration.
198 * elf-hppa.h (elf_hppa_relocate_section): Adjust call.
199 * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
200 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
201 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
202 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
203 * elf32-cris.c (cris_elf_relocate_section): Likewise.
204 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
205 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
206 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
207 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
208 * elf32-i370.c (i370_elf_relocate_section): Likewise.
209 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
210 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
211 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
212 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
213 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
214 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
215 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
216 * elf32-s390.c (elf_s390_relocate_section): Likewise.
217 * elf32-sh.c (sh_elf_relocate_section): Likewise.
218 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
219 * elf32-v850.c (v850_elf_relocate_section) Likewise.
220 * elf32-vax.c (elf_vax_relocate_section): Likewise.
221 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
222 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
223 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
224 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
225 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
226 * elf64-s390.c (elf_s390_relocate_section): Likewise.
227 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
228 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
229 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
230 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
231
232 * elf32-cris.c (cris_elf_relocate_section): Don't recalculate symbol
233 section for reloc output.
234 * elf32-i370.c (i370_elf_relocate_section): Likewise.
235 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
236 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
237 * elf32-vax.c (elf_vax_relocate_section): Likewise.
238 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
239 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
240
241 * elf32-ppc.c (ppc_elf_relocate_section): Don't recalculate everything
242 for R_PPC_RELAX32 reloc. Don't bother checking ppc_elf_install_value
243 return value.
244 * elf64-ppc.c (ppc64_elf_relocate_section <R_PPC64_TOC>): Sanity check
245 sec->id.
246
247 2003-11-05 Alan Modra <amodra@bigpond.net.au>
248
249 * elf32-d10v.c (extract_rel_addend, insert_rel_addend): New functions.
250 (elf32_d10v_relocate_section): Use them to handle -r reloc
251 adjustments, and in place of _bfd_elf_rela_local_sym.
252
253 * cpu-iq2000.c (arch_info_struct): Warning fix.
254
255 2003-11-05 Alan Modra <amodra@bigpond.net.au>
256
257 * elf32-hppa.c (ELIMINATE_COPY_RELOCS): Define.
258 (elf32_hppa_copy_indirect_symbol): Don't copy NON_GOT_REF on
259 weakdefs.
260 (elf32_hppa_check_relocs): Use ELIMINATE_COPY_RELOCS.
261 (elf32_hppa_adjust_dynamic_symbol): Likewise. Copy weakdef
262 NON_GOT_REF.
263 (allocate_dynrelocs): Use ELIMINATE_COPY_RELOCS and
264 SYMBOL_CALLS_LOCAL. Discard relocs for undef weak syms with
265 non-default visibility.
266 (elf32_hppa_relocate_section): Use ELIMINATE_COPY_RELOCS and
267 SYMBOL_CALLS_LOCAL.
268
269 2003-11-04 Alan Modra <amodra@bigpond.net.au>
270
271 * aout-target.h, aoutf1.h, bfdio.c, bfdwin.c: Update copyright date.
272 * coff-apollo.c, coff-sparc.c, coff-w65.c, coff-we32k.c: Ditto.
273 * coff-z8k.c, coffgen.c, cpu-frv.c, cpu-h8500.c, cpu-hppa.c: Ditto.
274 * cpu-ia64-opc.c, cpu-m10300.c, cpu-mips.c, cpu-msp430.c: Ditto.
275 * cpu-rs6000.c, cpu-z8k.c, efi-app-ia32.c, elf32-am33lin.c: Ditto.
276 * gen-aout.c, hash.c, hp300hpux.c, init.c, mach-o.c: Ditto.
277 * nlm-target.h, nlm.c, som.h, stabs.c, sysdep.h, xsym.h: Ditto.
278
279 * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Fix
280 "dereferencing type-punned pointer" warnings.
281
282 * aout-adobe.c (aout_adobe_set_section_contents): Constify location.
283 * aoutx.h (NAME(aout,set_section_contents)): Ditto.
284 * bfd-in2.h: Regenerate.
285 * binary.c (binary_set_section_contents): Ditto.
286 * bout.c (b_out_set_section_contents): Ditto.
287 * coff-tic54x.c (tic54x_set_section_contents): Ditto.
288 * coffcode.h (coff_set_section_contents): Ditto.
289 * ecoff.c (_bfd_ecoff_set_section_contents): Ditto.
290 * elf-bfd.h (_bfd_elf_set_section_contents): Ditto.
291 * elf.c (_bfd_elf_set_section_contents): Ditto.
292 * elfxx-mips.c (_bfd_mips_elf_set_section_contents): Ditto.
293 * elfxx-mips.h (_bfd_mips_elf_set_section_contents): Ditto.
294 * i386msdos.c (msdos_set_section_contents): Ditto.
295 * ieee.c (ieee_set_section_contents): Ditto.
296 * ihex.c (ihex_set_section_contents): Ditto.
297 * libaout.h (NAME(aout,set_section_contents)): Ditto.
298 * libbfd-in.h (_bfd_nowrite_set_section_contents): Ditto.
299 (_bfd_generic_set_section_contents): Ditto.
300 * libbfd.h: Regenerate.
301 * libbfd.c (_bfd_generic_set_section_contents): Ditto.
302 * libecoff.h (_bfd_ecoff_set_section_contents): Ditto.
303 * libnlm.h (nlmNAME(set_section_contents)): Ditto.
304 (struct nlm_backend_data <nlm_mangle_relocs>): Ditto.
305 * mmo.c (mmo_set_section_contents): Ditto.
306 * nlm32-alpha.c (nlm_alpha_mangle_relocs): Ditto.
307 * nlm32-i386.c (nlm_i386_mangle_relocs): Ditto.
308 * nlm32-ppc.c (nlm_powerpc_mangle_relocs): Ditto.
309 * nlm32-sparc.c (nlm_sparc_mangle_relocs): Ditto.
310 * nlmcode.h (nlm_set_section_contents): Ditto.
311 * oasys.c (oasys_set_section_contents): Ditto.
312 * pdp11.c (NAME(aout,set_section_contents)): Ditto.
313 * ppcboot.c (ppcboot_set_section_contents): Ditto.
314 * srec.c (srec_set_section_contents): Ditto.
315 * targets.c (BFD_JUMP_TABLE_WRITE <_bfd_set_section_contents>): Ditto.
316 * tekhex.c (tekhex_set_section_contents): Ditto.
317 (move_section_contents): Ditto.
318 * versados.c (versados_set_section_contents): Ditto.
319 * vms-misc.c (_bfd_save_vms_section): Ditto.
320 * vms.c (vms_set_section_contents): Ditto.
321 * vms.h (_bfd_save_vms_section): Ditto.
322
323 2003-11-04 Alan Modra <amodra@bigpond.net.au>
324
325 * elf64-ppc.c (ppc_size_one_stub): Size relbrlt. Accept info arg
326 rather than htab.
327 (ppc64_elf_size_stubs): Adjust ppc_size_one_stub traversal. Zero
328 relbrlt size.
329 (ppc64_elf_build_stubs): Allocate space for relbrlt.
330
331 2003-11-04 Alan Modra <amodra@bigpond.net.au>
332
333 * bfd-in.h (_bfd_elf_tls_setup): Declare.
334 * bfd-in2.h: Regenerate.
335 * elf-bfd.h (struct elf_link_tls_segment): Delete.
336 (struct elf_link_hash_table): Add tls_sec and tls_size.
337 * elf.c (_bfd_elf_link_hash_table_init): Init tls_sec and tls_size.
338 * elflink.c (_bfd_elf_tls_setup): New function.
339 * elflink.h (struct elf_final_link_info): Remove first_tls_sec.
340 (elf_bfd_final_link): Don't set first_tls_sec here. Update code
341 saving tls segment info, round segment size up.
342 (elf_link_output_extsym): Adjust code using tls segment info.
343 (elf_link_input_bfd): Likewise.
344 * elf32-i386.c (dtpoff_base, tpoff): Likewise.
345 * elf32-s390.c (dtpoff_base, tpoff): Likewise.
346 * elf32-sh.c (dtpoff_base, tpoff): Likewise.
347 * elf32-sparc.c (dtpoff_base, tpoff): Likewise.
348 * elf64-s390.c (dtpoff_base, tpoff): Likewise.
349 * elf64-x86-64.c (dtpoff_base, tpoff): Likewise.
350 * elfxx-ia64.c (elfNN_ia64_tprel_base): Likewise.
351 (elfNN_ia64_dtprel_base): Likewise.
352 * elf64-alpha.c (alpha_get_dtprel_base): Likewise.
353 (alpha_get_tprel_base): Likewise.
354 (struct alpha_relax_info): Remove tls_segment.
355 (elf64_alpha_relax_got_load): Adjust invocation of
356 alpha_get_dtprel_base and alpha_get_tprel_base.
357 (elf64_alpha_relax_tls_get_addr): Likewise.
358 (elf64_alpha_relax_section): Likewise.
359 (elf64_alpha_relocate_section): Likewise.
360 (elf64_alpha_relax_find_tls_segment): Delete.
361 * elf32-ppc.c (struct ppc_elf_link_hash_table): Remove tls_sec.
362 (ppc_elf_tls_setup): Call _bfd_elf_tls_setup. Return section.
363 (ppc_elf_relocate_section): Adjust to use elf.tls_sec.
364 * elf32-ppc.h (ppc_elf_tls_setup): Update.
365 * elf64-ppc.c (struct ppc_link_hash_table): Remove tls_sec.
366 (ppc64_elf_tls_setup): Call _bfd_elf_tls_setup. Return section.
367 (ppc64_elf_tls_optimize): Adjust to use elf.tls_sec.
368 (ppc64_elf_relocate_section): Likewise.
369 * elf64-ppc.h (ppc64_elf_tls_setup): Update.
370
371 2003-11-03 Daniel Jacobowitz <drow@mvista.com>
372
373 * elf-bfd.h (struct elf_backend_data): Remove plt_header_size.
374 * elf-m10300.c (elf_backend_plt_header_size): Don't define.
375 * elf32-arm.h (elf_backend_plt_header_size): Don't define.
376 * elf32-cris.c (elf_backend_plt_header_size): Don't define.
377 * elf32-i386.c (elf_backend_plt_header_size): Don't define.
378 * elf32-mips.c (elf_backend_plt_header_size): Don't define.
379 * elf32-ppc.c (elf_backend_plt_header_size): Don't define.
380 * elf32-s390.c (elf_backend_plt_header_size): Don't define.
381 * elf32-sh.c (elf_backend_plt_header_size): Don't define.
382 * elf32-sparc.c (elf_backend_plt_header_size): Don't define.
383 * elf64-alpha.c (elf_backend_plt_header_size): Don't define.
384 * elf64-hppa.c (elf_backend_plt_header_size): Don't define.
385 * elf64-mips.c (elf_backend_plt_header_size): Don't define.
386 * elf64-ppc.c (elf_backend_plt_header_size): Don't define.
387 * elf64-s390.c (elf_backend_plt_header_size): Don't define.
388 * elf64-sh64.c (elf_backend_plt_header_size): Don't define.
389 * elf64-sparc.c (elf_backend_plt_header_size): Don't define.
390 * elf64-x86-64.c (elf_backend_plt_header_size): Don't define.
391 * elfn32-mips.c (elf_backend_plt_header_size): Don't define.
392 * elfxx-ia64.c (elf_backend_plt_header_size): Don't define.
393 * elfxx-target.h (elf_backend_plt_header_size): Don't define
394 or include in target initializer.
395
396 2003-11-03 Andrew Cagney <cagney@redhat.com>
397
398 * section.c (bfd_set_section_contents): Make the "location" buffer
399 constant.
400 * bfd-in2.h: Re-generate.
401
402 2003-10-30 Andrew Cagney <cagney@redhat.com>
403
404 * syms.c: Replace "struct symbol_cache_entry" with "struct
405 bfd_symbol".
406 * vms.h, targets.c, section.c, reloc.c, peicode.h: Ditto.
407 * mipsbsd.c, elf.c, linker.c, elf-bfd.h, ecoff.c: Ditto.
408 * cpu-z8k.c, cpu-ns32k.c, cpu-h8500.c, bfd.c, bfd-in.h: Ditto.
409 * bfd-in2.h: Re-generate.
410
411 2003-10-30 Jakub Jelinek <jakub@redhat.com>
412
413 * elfxx-ia64.c: Include objalloc.h, hashtab.h.
414 (struct elfNN_ia64_local_hash_entry): Remove root. Add id and r_sym
415 fields.
416 (struct elfNN_ia64_local_hash_table): Remove.
417 (struct elfNN_ia64_link_hash_table): Change loc_hash_table's type
418 to htab_t. Add loc_hash_memory field.
419 (elfNN_ia64_local_hash_table_init, elfNN_ia64_new_loc_hash_entry):
420 Removed.
421 (elfNN_ia64_local_htab_hash, elfNN_ia64_local_htab_eq): New
422 functions.
423 (elfNN_ia64_hash_table_create): Use hashtab.h hashtable for
424 loc_hash_table. Initialize loc_hash_memory.
425 (elfNN_ia64_hash_table_free): New function.
426 (elfNN_ia64_local_hash_lookup): Remove.
427 (elfNN_ia64_local_dyn_sym_thunk): Change into htab_traverse
428 callback.
429 (elfNN_ia64_dyn_sym_traverse): Use htab_traverse.
430 (get_local_sym_hash): Use hashtab.h hashtable for loc_hash_table.
431 (bfd_elfNN_bfd_link_hash_table_free): Define.
432
433 2003-10-30 Alan Modra <amodra@bigpond.net.au>
434
435 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Modify versioned
436 symbol string in place.
437
438 2003-10-30 Jim Blandy <jimb@redhat.com>
439
440 * cpu-rs6000.c (rs6000_compatible): Check the correct arch_info
441 object's mach field: all PowerPC machines are supersets of the
442 original rs6000, but not later rs6000 machines.
443
444 2003-10-30 Alan Modra <amodra@bigpond.net.au>
445
446 * dwarf2.c (struct attribute): Delete "unsnd", "snd" and "addr".
447 Add "val" and "sval" fields.
448 (DW_STRING, DW_UNSND, DW_BLOCK, DW_SND, DW_ADDR): Delete.
449 (read_attribute_value): Expand and adjust DW_* occurrences.
450 (scan_unit_for_functions, parse_comp_unit): Likewise.
451
452 2003-10-30 Phil Edwards <phil@codesourcery.com>
453
454 * config.bfd (arm-*-vxworks): Remove separate stanza; merge with
455 other common ELF triples.
456 (i[3-7]86-*-vxworks): Change to ELF format.
457 (mips*-*-windiss): New triple, add to common MIPS/ELF stanza.
458 (sh-*-vxworks): New stanza.
459
460 2003-10-30 Lars Knoll <lars@trolltech.com>
461 Michael Matz <matz@suse.de>
462 Jakub Jelinek <jakub@redhat.com>
463 Alan Modra <amodra@bigpond.net.au>
464
465 * merge.c (struct sec_merge_sec_info): Update comment.
466 (struct sec_merge_hash_entry): Remove entsize.
467 (sec_merge_hash_lookup): Only adjust alignment when creating.
468 (sec_merge_emit): Remove register keyword.
469 (cmplengthentry, last4_eq, last_eq): Delete.
470 (strrevcmp, strrevcmp_align, is_suffix): New.
471 (merge_strings): Use them to implement fast suffix merging.
472 * elf-strtab.c (struct elf_strtab_hash_entry): Update comments.
473 Make "len" signed.
474 (_bfd_elf_strtab_add): Lose on >2G strings.
475 (_bfd_elf_strtab_emit): Don't emit strings with len < 0.
476 (cmplengthentry, last4_eq): Delete.
477 (strrevcmp, is_suffix): New.
478 (_bfd_elf_strtab_finalize): Rework to implement fast suffix merging.
479
480 2003-10-29 Daniel Jacobowitz <drow@mvista.com>
481
482 * elf32-arm.h (elf32_arm_final_link_relocate): Move check for
483 SEC_ALLOC.
484
485 2003-10-29 Philip Blundell <philb@gnu.org>
486
487 * elf32-arm.h (elf32_arm_plt0_entry, elf32_arm_plt_entry): New
488 code sequence.
489 (PLT_HEADER_SIZE): New.
490 (struct elf32_arm_pcrel_relocs_copied): Rename to ...
491 (struct elf32_arm_relocs_copied): ... this. Count both
492 pcrel and non-pcrel relocs. All uses updated.
493 (struct elf32_arm_link_hash_table): Add pointers to dynamic linker
494 sections and symbol/section mapping cache.
495 (create_got_section): New.
496 (elf32_arm_create_dynamic_sections): New.
497 (elf_backend_create_dynamic_sections): Use it.
498 (elf32_arm_final_link_relocate): Support garbage collection of relocs.
499 (elf32_arm_check_relocs): Likewise.
500 (elf32_arm_adjust_dynamic_symbol): Likewise.
501 (elf32_arm_copy_indirect_symbol): New.
502 (elf32_arm_link_hash_table_create): Initialise new fields.
503 (elf32_arm_gc_sweep_hook): Implement.
504 (elf32_arm_discard_copies): Delete.
505 (elf32_arm_finish_dynamic_symbol): Use new PLT code.
506 (elf32_arm_finish_dynamic_sections): Likewise.
507 (elf_backend_can_refcount): Define.
508 (elf_backend_copy_indirect_symbol): Likewise.
509 (elf_backend_plt_header_size): Set to PLT_HEADER_SIZE.
510
511 2003-10-29 Alan Modra <amodra@bigpond.net.au>
512
513 * elf64-ppc.c (elf_backend_grok_prstatus): Define.
514 (elf_backend_grok_psinfo): Define.
515 (ppc64_elf_grok_prstatus, ppc64_elf_grok_psinfo): New functions.
516
517 * elf.c (_bfd_elfcore_make_pseudosection): Allow multiple
518 sections with the same name.
519 (elfcore_grok_lwpstatus): Likewise.
520 (elfcore_grok_win32pstatus): Likewise.
521 (elfcore_grok_note): Likewise.
522 (elfcore_grok_nto_status): Likewise.
523 (elfcore_grok_nto_gregs): Likewise.
524
525 2003-10-27 Daniel Jacobowitz <drow@mvista.com>
526
527 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Never skip dynamic
528 objects.
529
530 2003-10-14 Richard Sandiford <rsandifo@redhat.com>
531
532 * elfxx-mips.c (mips_elf_create_got_section): Initialize global_gotno.
533
534 2003-10-24 H.J. Lu <hongjiu.lu@intel.com>
535
536 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Look up
537 hash table for real symbols.
538
539 2003-10-23 Michael Snyder <msnyder@redhat.com>
540
541 * section.c (asection): Fix typo in comment.
542
543 2003-10-23 Alan Modra <amodra@bigpond.net.au>
544
545 * elf64-ppc.c (get_tls_mask): Add toc_symndx param, save toc
546 reloc symbol index to it. Don't allow gd syms in shared libs
547 to be optimized.
548 (ppc64_elf_tls_optimize): Adjust get_tls_mask call.
549 (ppc64_elf_size_stubs): Likewise.
550 (ppc64_elf_relocate_section): Check that tls relocs are only used
551 with tls syms, and similarly for non-tls. Correct symbol used
552 when optimizing toc tls code.
553
554 2003-10-22 Nick Clifton <nickc@redhat.com>
555
556 * peicode.h (coff_swap_scnhdr_in): Only remove padding when
557 processing an executable.
558
559 2003-10-22 Jakub Jelinek <jakub@redhat.com>
560
561 * elflink.c (_bfd_elf_export_symbol): Adjust for globals and locals
562 field changes.
563 (_bfd_elf_link_assign_sym_version): Likewise.
564 * elflink.h (size_dynamic_sections): Likewise.
565
566 2003-10-21 Alexandre Oliva <aoliva@redhat.com>,
567 Michael Snyder <msnyder@redhat.com>
568
569 * archures.c (bfd_mach_sh4a, bfd_mach_sh4al_dsp, bfd_mach_sh4_nofpu,
570 bfd_mach_sh4a_nofpu): New machine types.
571 * bfd-in2.h: Rebuilt.
572 * cpu-sh.c (compatible): Remove unused function.
573 (SH4A_NEXT, SH4AL_DSP_NEXT, SH4_NOFPU_NEXT, SH4A_NOFPU_NEXT): New.
574 (arch_info_struct): Add sh4a, sh4al_dsp, sh4-nofpu and sh4a-nofpu.
575 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle them.
576
577 2003-10-21 Wouter van Heyst <wouter@vidicode.nl>
578
579 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Correct text
580 describing mismatched formats involving the Maverick FP type.
581
582 2003-10-21 Anil Paranjpe <anilp1@KPITCummins.com>
583
584 * binary.c (binary_object_p): Pass machine flag along with
585 architecture.
586
587 2003-10-21 Thorsten Brehm <brehm@gmx.net>
588
589 * archures.c (bfd_default_scan): Add support for mcf528x.
590 * ieee.c (ieee_write_processor): Likewise.
591
592 2003-10-21 Peter Barada <pbarada@mail.wm.sps.mot.com>
593 Bernardo Innocenti <bernie@develer.com>
594
595 * archures.c: Add MCF528x (MCFv4) support.
596 * bfd/cpu-m68k.c (arch_info_struct): Likewise.
597 * bfd-in2.h: Regenerate.
598
599 2003-10-20 Andrew Cagney <cagney@redhat.com>
600
601 * targets.c: Replace "struct sec" with "struct bfd_section"
602 * syms.c, sparclynx.c, section.c, opncls.c: Ditto.
603 * libcoff-in.h, libbfd-in.h, elfxx-target.h: Ditto.
604 * elf.c, coffgen.c, bfd.c, bfd-in.h, aoutf1.h: Ditto.
605 * aout-tic30.c, aout-target.h:
606 * bfd-in2.h, libcoff.h, libbfd.h: Regenerate.
607
608 2003-10-18 Hans-Peter Nilsson <hp@bitrange.com>
609
610 Support linker relaxation of new R_MMIX_PUSHJ_STUBBABLE relocs.
611 * elf64-mmix.c (MAX_PUSHJ_STUB_SIZE): New macro.
612 (struct _mmix_elf_section_data): New member pjs.
613 (mmix_set_relaxable_size, mmix_elf_get_section_contents): New
614 functions.
615 (elf_mmix_howto_table): New entry for R_MMIX_PUSHJ_STUBBABLE.
616 (mmix_reloc_map): Ditto.
617 (mmix_elf_relocate_section): Handle R_MMIX_PUSHJ_STUBBABLE.
618 (mmix_final_link_relocate, mmix_elf_check_common_relocs): Ditto.
619 (mmix_elf_perform_relocation): Ditto. Don't mark parameter addr
620 unused.
621 (mmix_elf_check_relocs): Move early return to after
622 mmix_elf_check_common_relocs call.
623 (mmix_elf_symbol_processing): Fix cut-and-pasto in head comment.
624 (_bfd_mmix_before_linker_allocation): Rename from
625 _bfd_mmix_prepare_linker_allocated_gregs. All referers changed.
626 Arrange to set the initial relaxable size of sections.
627 (_bfd_mmix_after_linker_allocation): Rename from
628 _bfd_mmix_finalize_linker_allocated_gregs.
629 (mmix_elf_relax_section): Relax a R_MMIX_PUSHJ_STUBBABLE reloc.
630 (bfd_elf64_get_section_contents): Define.
631 * reloc.c: Add ENUMX for BFD_RELOC_MMIX_PUSHJ_STUBBABLE.
632 * libbfd.h, bfd-in2.h: Regenerate.
633
634 * reloc.c (bfd_generic_relax_section): Default-set
635 section->_cooked_size here.
636 (bfd_generic_get_relocated_section_contents): Don't set it here.
637 Explain why.
638
639 2003-10-17 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
640
641 * elf32-hppa.c (elf32_hppa_relocate_section): Skip relocation if
642 output section has been discarded.
643
644 2003-10-17 Shrinivas Atre <shrinivasa@KPITCummins.com>
645
646 * coff-h8300.c (funcvec_hash_newfunc): Handle normal mode.
647 (h8300_reloc16_extra_cases): Likewise.
648 (h8300_bfd_link_add_symbols): Likewise.
649
650 2003-10-17 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
651
652 * cpu-h8300.c (h8300sxn_info_struct): Correct address size.
653 (h8300sn_info_struct): Likewise.
654 (h8300hn_info_struct): Likewise.
655
656 2003-10-16 Pavel Roskin <proski@gnu.org>
657
658 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Don't calculate image size
659 for sections which lack size info.
660
661 2003-10-17 Danny Smith <dannysmith@users.sourceforge.net>
662
663 * configure.host: Add __USE_MINGW_FSEEK to HDEFINES for
664 mingw32.
665
666 2003-10-16 H.J. Lu <hongjiu.lu@intel.com>
667
668 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Also warn
669 undefined patterns with '*'.
670
671 2003-10-16 H.J. Lu <hongjiu.lu@intel.com>
672
673 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't
674 use the last CIE from a different section.
675 (_bfd_elf_write_section_eh_frame): Don't pad beyond the raw
676 size of the output section.
677
678 2003-10-07 Roland McGrath <roland@redhat.com>
679
680 * elf.c (_bfd_elf_make_section_from_phdr): Set alignment_power of
681 new section from p_align header field.
682
683 2003-10-16 H.J. Lu <hongjiu.lu@intel.com>
684
685 * elf32-xtensa.c (xtensa_read_table_entries): The external size
686 of entry is 8 bytes.
687
688 2003-10-15 Andrew Cagney <cagney@redhat.com>
689
690 * targets.c (BFD_JUMP_TABLE_SYMBOLS): Replace NAME##_get_symtab
691 with NAME##_canonicalize_symtab.
692 * libcoff-in.h (coff_canonicalize_symtab): Update.
693 * xsym.h (bfd_sym_canonicalize_symtab): Update.
694 * elf-bfd.h (_bfd_elf_canonicalize_symtab): Update.
695 * coffgen.c (coff_canonicalize_symtab): Update.
696 * libbfd-in.h (_bfd_nosymbols_canonicalize_symtab): Update.
697 * libnlm.h (nlmNAME(canonicalize_symtab)): Update.
698 * ieee.c (ieee_vec): Update comment.
699 * libecoff.h (_bfd_ecoff_canonicalize_symtab): Update.
700 * mmo.c (mmo_canonicalize_symtab): Update.
701 * nlm-target.h (nlm_canonicalize_symtab): Update.
702 * nlmcode.h (nlm_canonicalize_symtab): Update.
703 * i386msdos.c (msdos_canonicalize_symtab): Update.
704 * hp300hpux.c (MY (canonicalize_symtab)): Update.
705 * oasys.c (oasys_canonicalize_symtab): Update.
706 * som.c (som_canonicalize_symtab): Update.
707 * pef.c (bfd_pef_canonicalize_symtab): Update.
708 * nlmcode.h (nlm_canonicalize_symtab): Update.
709 * xsym.c (bfd_sym_canonicalize_symtab): Update.
710 * vms.c (vms_canonicalize_symtab): Update.
711 * versados.c (versados_canonicalize_symtab): Update.
712 * mach-o.c (bfd_mach_o_canonicalize_symtab): Update.
713 * ieee.c (ieee_canonicalize_symtab): Update.
714 * pdp11.c (NAME(aout,canonicalize_symtab)): Update.
715 * reloc.c: Update comment.
716 * libaout.h (NAME(aout,canonicalize_symtab)): Update.
717 * coff64-rs6000.c (aix5coff64_vec): Update.
718 * coff64-rs6000.c (bfd_xcoff_aix5_backend_data): Update.
719 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update.
720 * aoutx.h (NAME(aout,canonicalize_symtab)): Update.
721 * elfxx-target.h (bfd_elfNN_canonicalize_symtab): Update.
722 * hp300hpux.c (MY_canonicalize_symtab): Update.
723 * ecoff.c (_bfd_ecoff_canonicalize_symtab): Update.
724 * aout-tic30.c (MY_canonicalize_symtab): Update.
725 * aout-target.h (MY_canonicalize_symtab): Update.
726 * ppcboot.c (ppcboot_canonicalize_symtab): Update.
727 * elf.c (_bfd_elf_canonicalize_symtab): Update.
728 * elfcode.h (elf_canonicalize_symtab): Update.
729 * ihex.c (ihex_canonicalize_symtab): Update.
730 * tekhex.c (tekhex_canonicalize_symtab): Update.
731 * binary.c (binary_canonicalize_symtab): Update.
732 * srec.c (srec_canonicalize_symtab): Update.
733
734 2003-10-15 Kazu Hirata <kazu@cs.umass.edu>
735
736 * elf32-h8300.c (elf_reloc_map): Fix a comment typo.
737
738 2003-10-15 Kaz Kojima <kkojima@rr.iij4u.or.jp>
739
740 * elf32-sh.c (sh_elf_relocate_section): Handle R_SH_IMM_*_PCREL
741 relocations.
742 (sh_elf_check_relocs): Likewise.
743
744 * elf32-sh64.c (elf_backend_merge_symbol_attribute): Define.
745 (sh64_elf_merge_symbol_attribute): New.
746 * elf64-sh64.c (elf_backend_merge_symbol_attribute): Define.
747 (sh64_elf64_merge_symbol_attribute): New.
748
749 2003-10-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
750
751 * elf-bfd.h (struct elf_backend_data): New function pointer member
752 elf_backend_merge_symbol_attribute.
753 * elflink.h (elf_link_add_object_symbols): Adjust call to
754 elf_backend_merge_symbol_attribute if the backend defined it.
755 * elfxx-target.h (elf_backend_merge_symbol_attribute): New macro.
756 (elfNN_bed): Add that to the initializer.
757
758 2003-10-14 Bob Wilson <bob.wilson@acm.org>
759
760 * elf32-xtensa.c (get_is_linkonce_section): Delete.
761 (xtensa_is_property_section, xtensa_is_littable_section): Use
762 XTENSA_INSN_SEC_NAME and XTENSA_LIT_SEC_NAME macros. Do not recognize
763 linkonce sections containing ".xt.insn" and ".xt.lit" substrings.
764 (xtensa_get_property_section_name): Check section name instead of
765 calling get_is_linkonce_section. Remove unused bfd parameter. Use
766 XTENSA_INSN_SEC_NAME and XTENSA_LIT_SEC_NAME macros. Never generate
767 linkonce section names by appending ".xt.insn" or ".xt.lit".
768 (xtensa_read_table_entries): Remove bfd argument in call to
769 xtensa_get_property_section_name. Free section name when done.
770 (elf_xtensa_combine_prop_entries): Free leaking table.
771
772 2003-10-13 Richard Sandiford <rsandifo@redht.com>
773
774 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Don't add
775 DT_MIPS_LIBLIST or DT_MIPS_CONFLICT entries.
776 (_bfd_mips_elf_finish_dynamic_symbol): Don't handle them. Don't
777 handle DT_MIPS_MSYM. Set DT_RELSZ based on the number of relocations
778 that were needed.
779 (_bfd_mips_elf_modify_segment_map): Fix placement of PT_MIPS_OPTIONS.
780 (_bfd_mips_elf_merge_private_bfd_data): Ignore EF_MIPS_UCODE.
781
782 2003-10-13 H.J. Lu <hongjiu.lu@intel.com>
783
784 * bfd-in.h (bfd_elf32_ia64_after_parse): New prototype.
785 (bfd_elf64_ia64_after_parse): Likewise.
786 * bfd-in2.h: Regenerated.
787
788 * elfxx-ia64.c (oor_ip): New.
789 (oor_branch_size): Likewise.
790 (bfd_elfNN_ia64_after_parse): Likewise.
791 (elfNN_ia64_relax_section): Use oor_ip if oor_branch_size
792 equals sizeof (oor_ip).
793
794 2003-10-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
795
796 * elf64-sh64.c (sh_elf64_relocate_section): Tidy up for the
797 renumbering of some relocation numbers.
798
799 2003-10-11 Alan Modra <amodra@bigpond.net.au>
800
801 * coff-sh.c: Move definition of MAP and guard more code with
802 COFF_IMAGE_WITH_PE.
803
804 * section.c (bfd_get_section_size_before_reloc): Ignore reloc_done.
805 * bfd-in2.h: Regenerate.
806
807 2003-10-10 H.J. Lu <hongjiu.lu@intel.com>
808
809 * Makefile.am: Run "make dep-am".
810 * Makefile.in: Regenerate.
811 * doc/Makefile.in: Likewise.
812
813 2003-10-09 H.J. Lu <hongjiu.lu@intel.com>
814
815 * cofflink.c: Include "safe-ctype.h".
816 (coff_link_add_symbols): Use ISDIGIT instead of isdigit.
817
818 2003-10-08 Dave Brolley <brolley@redhat.com>
819 On behalf of Michael Snyder <msnyder@redhat.com>
820
821 * archures.c: Add FRV fr550 machine.
822 * cpu-frv.c: Ditto.
823 * elf32-frv.c: Ditto.
824 * bfd-in2.h: Regenerate.
825
826 2003-10-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
827
828 * elfxx-mips.c (STUB_MOVE,STUB_LI16): Fix stub code
829 for non-SGI N64 ABI. Improve code consitency.
830
831 2003-10-07 Alexandre Oliva <aoliva@redhat.com>
832
833 * elf32-frv.c (elf32_frv_howto_table): Set R_FRV_LABEL16's
834 rightshift to 2.
835
836 2003-10-07 Nathan Sidwell <nathan@codesourcery.com>
837
838 * libbfd-in.h (_bfd_link_section_stabs): Add string offset
839 parameter.
840 * cofflink.c (coff_link_add_symbols): Deal with split stab
841 sections.
842 * elflink.h (elf_link_add_object_symbols): Deal with split stab
843 sections.
844 * stabs.c (_bfd_link_section_stabs): Add string offset parameter.
845 * libbfd.h: Regenerated.
846
847 * coffcode.h (coff_set_alignment_hook): With PE_COFF reloc
848 overflow, set reloc start position to after the count
849 reloc. Subtract one from num relocs. Give error on 0xffff relocs
850 and no overflow.
851 * cofflink.c (_bfd_coff_final_link): Deal with PE_COFF reloc
852 overflow.
853 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Do overflow if >=
854 0xffff.
855
856 2003-10-06 H.J. Lu <hongjiu.lu@intel.com>
857
858 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Pad the
859 last CIE/FDE if needed.
860
861 2003-10-06 Nick Clifton <nickc@redhat.com>
862
863 * targets.c (_bfd_target_vector): Include bfd_elf64_sparc_vec if
864 BFD64 is enabled.
865
866 2003-10-06 Matt Thomas <matt@3am-software.com>
867
868 * config.bfd: Move the hppa*-*-netbsd* case to the hppa*-*-linux* case.
869
870 2003-10-06 Robert Millan <robertmh@gnu.org>
871
872 * configure.in: Match GNU/KNetBSD with new knetbsd*-gnu triplet.
873 * config.bfd: Likewise.
874 * configure: Regenerate.
875
876 2003-10-04 Christian Groessler <chris@groessler.org>
877
878 * coff-z8k.c (extra_case): Fix displacement length check for R_JR
879 and R_CALLR.
880
881 2003-10-04 Stephane Carrez <stcarrez@nerim.fr>
882
883 * elf32-m68hc1x.c: Update to ISO C90; replace PTR with void*.
884 * elf32-m68hc11.c: Likewise.
885 * elf32-m68hc12.c: Likewise.
886 * elf32-m68hc1x.h: Likewise.
887
888 2003-10-04 Stephane Carrez <stcarrez@nerim.fr>
889
890 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Fix merge
891 of flags between HC12 and HCS12.
892
893 2003-10-04 Bryce McKinlay <bryce@mckinlay.net.nz>
894
895 * merge.c (_bfd_merge_sections): Set SEC_EXCLUDE flag on sections
896 which become empty after merging.
897
898 2003-09-30 Jakub Jelinek <jakub@redhat.com>
899
900 * elfxx-ia64.c (ia64_howto_table): Fix size of R_IA64_TPREL64[LM]SB,
901 R_IA64_DTPREL{32,64}[LM]SB and R_IA64_DTPMOD64[LM]SB.
902
903 2003-09-30 Chris Demetriou <cgd@broadcom.com>
904
905 * archures.c (bfd_mach_mipsisa64r2): New define.
906 * bfd-in2.h: Regenerate.
907 * aoutx.h (NAME(aout,machine_type)): Handle bfd_mach_mipsisa64r2.
908 * cpu-mips.c (I_mipsisa64r2): New enum value.
909 (arch_info_struct): Add entry for I_mipsisa64r2.
910 * elfxx-mips.c (_bfd_elf_mips_mach)
911 (_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_64R2.
912 (mips_set_isa_flags): Add bfd_mach_mipsisa64r2 case.
913 (mips_mach_extensions): Add entry for bfd_mach_mipsisa64r2.
914
915 2003-09-29 H.J. Lu <hongjiu.lu@intel.com>
916
917 * elfxx-ia64.c (elfNN_hpux_backend_symbol_processing): New.
918 Handle SHN_IA_64_ANSI_COMMON.
919 (elf_backend_section_from_bfd_section): Defined.
920
921 2003-09-26 H.J. Lu <hongjiu.lu@intel.com>
922
923 * elflink.c (elf_link_read_relocs_from_section): Add an argument
924 of a pointer to section. Check bad symbol index.
925 (_bfd_elf_link_read_relocs): Modify calls to
926 elf_link_read_relocs_from_section.
927
928 2003-09-23 DJ Delorie <dj@redhat.com>
929
930 * elf32-sh.c (sh_elf_howto_table): R_SH_SWITCH8,
931 R_SH_GNU_VTINHERIT, R_SH_GNU_VTENTRY,
932 R_SH_LOOP_START,R_SH_LOOP_END moved to "reserved" spaces,
933 R_SH_DIR16, R_SH_DIR8, R_SH_DIR8UL, R_SH_DIR8UW, R_SH_DIR8U,
934 R_SH_DIR8SW, R_SH_DIR8S, R_SH_DIR4UL, R_SH_DIR4UW, R_SH_DIR4U,
935 R_SH_PSHA, R_SH_PSHL added.
936 (sh_reloc_map): Add R_SH_DIR16 and R_SH_DIR8.
937 (sh_elf_relocate_section): Support new relocs.
938
939 2003-09-23 Bob Wilson <bob.wilson@acm.org>
940
941 * elf32-xtensa.c (elf_xtensa_relocate_section): Fix typo that clobbered
942 dynamic relocation offsets.
943
944 2003-09-23 Alan Modra <amodra@bigpond.net.au>
945
946 * simple.c (bfd_simple_get_relocated_section_contents): Free the
947 hash table using _bfd_generic_link_hash_table_free.
948
949 2003-09-23 Alan Modra <amodra@bigpond.net.au>
950
951 * elf-bfd.h (struct bfd_elf_special_section): Remove "suffix". Change
952 type of prefix_length and suffix_length to int. Rename "attributes"
953 to "attr". Comment.
954 (_bfd_elf_get_sec_type_attr): Update prototype.
955 * elf.c (get_special_section): Rewrite.
956 (_bfd_elf_get_sec_type_attr): Return struct rather than passing in
957 attr and type pointers.
958 (_bfd_elf_new_section_hook): Adjust for above.
959 (special_sections): Merge suffix with prefix. Set
960 prefix_length for all entries. Set suffix_length appropriately.
961 * elf32-m32r.c (m32r_elf_special_sections): Likewise.
962 * elf32-m68hc11.c (elf32_m68hc11_special_sections): Likewise.
963 * elf32-m68hc12.c (elf32_m68hc12_special_sections): Likewise.
964 * elf32-mcore.c (mcore_elf_special_sections): Likewise.
965 * elf32-sh64.c (sh64_elf_special_sections): Likewise.
966 * elf32-v850.c (v850_elf_special_sections): Likewise.
967 * elf32-xtensa.c (elf_xtensa_special_sections): Likewise.
968 * elf64-alpha.c (elf64_alpha_special_sections): Likewise.
969 * elf64-hppa.c (elf64_hppa_special_sections): Likewise.
970 * elf64-ppc.c (ppc64_elf_special_sections): Likewise.
971 * elf64-sh64.c (sh64_elf64_special_sections): Likewise.
972 * elfxx-ia64.c (elfNN_ia64_special_sections): Likewise.
973 * elfxx-mips.c (_bfd_mips_elf_special_sections): Likewise.
974 * elf32-ppc.c (ppc_elf_special_sections): Likewise. Fix .plt flags.
975
976 2003-09-21 Daniel Jacobowitz <drow@mvista.com>
977
978 * elf64-alpha.c (elf64_alpha_create_got_section): Initialize
979 ->got if the section already exists.
980
981 2003-09-19 Nathan Sidwell <nathan@codesourcery.com>
982
983 * dwarf2.c (decode_line_info): Cope with an initially empty
984 filename table.
985
986 2003-09-18 H.J. Lu <hongjiu.lu@intel.com>
987
988 * acinclude.m4: Include ../config/accross.m4.
989 * aclocal.m4: Regenerated.
990
991 * configure.host (HOST_64BIT_TYPE): Remove if it is set to long
992 or long long.
993 (HOST_U_64BIT_TYPE): Remove if it is set to unsigned long long.
994 (host64): Remove if HOST_64BIT_TYPE is set to long.
995
996 * configure.in (HOST_64BIT_TYPE): Set according to the size of
997 long and long long.
998 (HOST_U_64BIT_TYPE): Likewise.
999 (host64): Likewise.
1000 * configure: Regenerated.
1001
1002 2003-09-19 Alan Modra <amodra@bigpond.net.au>
1003
1004 * elf.c (elfcore_write_note): Don't use sizeof(Elf_External_note)
1005 since some ABIs round up the size of the struct.
1006
1007 2003-09-18 H.J. Lu <hongjiu.lu@intel.com>
1008
1009 * elflink.c (_bfd_elf_merge_symbol): Allow type change if
1010 the old symbol is undefined and the new symbol is defined.
1011
1012 2003-09-18 Andreas Schwab <schwab@suse.de>
1013
1014 * simple.c (bfd_simple_get_relocated_section_contents): Use
1015 _bfd_generic_link_hash_table_create instead of
1016 bfd_link_hash_table_create.
1017
1018 2003-09-10 H.J. Lu <hongjiu.lu@intel.com>
1019
1020 * elfxx-ia64.c (elfNN_ia64_special_sections): Mark all sections
1021 started with ".sbss" or "".sdata" as SHF_IA_64_SHORT.
1022
1023 2003-09-10 John David Anglin <dave.anglin@nrc-cnrc.nrc.ca>
1024 Randolph Chung <randolph@tausq.org>
1025
1026 * elf32-hppa.c (struct elf32_hppa_link_hash_entry,
1027 hppa_link_hash_newfunc, hppa_build_one_stub,
1028 elf32_hppa_adjust_dynamic_symbol, mark_PIC_calls, allocate_plt_static,
1029 allocate_dynrelocs, elf32_hppa_size_dynamic_sections,
1030 elf32_hppa_finish_dynamic_symbol): Remove pic_call field and all code
1031 for generating import stubs for calls to statically linked PIC
1032 functions.
1033 (hppa_type_of_stub): Don't generate an import stub for calls to
1034 statically linked pic functions. Generate import stubs for calls
1035 in a shared object, to functions not in a regular file, and to
1036 defined weak functions. Add new argument INFO.
1037 (hppa_build_one_stub): Don't undef ADDIL_DP.
1038 (elf32_hppa_check_relocs): Don't set SEC_HAS_GOT_REF flag.
1039 (elf32_hppa_size_stubs): Pass info to hppa_type_of_stub.
1040 (final_link_relocate): Change all DLTIND relocs to DPREL relocs in a
1041 non-shared link. Convert instructions that use the the linkage table
1042 pointer, or a facsimile thereof, to use the global data pointer when
1043 the reloc has been changed.
1044
1045 2003-09-08 Joel Brobecker <brobecker@gnat.com>
1046
1047 * archures.c: Add new machine names for hppa.
1048 * bfd-in2.h: Regenerate.
1049 * cpu-hppa.c: Use the new machine names.
1050
1051 2003-09-06 Stephane Carrez <stcarrez@nerim.fr>
1052
1053 * elf32-m68hc1x.h (struct m68hc11_elf_link_hash_table): Remove
1054 all_local_syms member.
1055 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Use bfd_elf_get_elf_syms
1056 to get the local symbols.
1057
1058 2003-09-06 Stephane Carrez <stcarrez@nerim.fr>
1059
1060 * elf32-m68hc12.c (elf32_m68hc12_special_sections): New for hc11.
1061 (elf_backend_special_sections): Define.a
1062
1063 PR savannah/4950:
1064 * elf32-m68hc11.c (elf32_m68hc11_special_sections): The .vectors
1065 section is read-only.
1066
1067 2003-09-04 Nick Clifton <nickc@redhat.com>
1068
1069 * archures.c (bfd_mach_v850e1): Define.
1070 * bfd-in2.h: Regenerate.
1071 * cpu-v850.h (scan): Accept bfd_mach_v850e1.
1072 (arch_info_struct): Include an entry for bfd_mach_v850e1.
1073 * elf32-v850.c (v850_elf_object_p): Accept E_V850E1_ARCH flag.
1074 (v850_elf_final_write_processing): Accept bfd_mach_v850e1.
1075 (v850_elf_print_private_bfd_data): Interpret E_V850E1_ARCH flag.
1076 (v850_elf_merge_private_bfd_data): Allow v850e1 binaries to be
1077 linked with v850e binaries. Mark the output as v850e.
1078
1079 2003-09-03 Nick Clifton <nickc@redhat.com>
1080
1081 * cofflink.c (_bfd_coff_link_input_bfd): Do not skip section
1082 symbols that are used in relocs.
1083
1084 2003-08-30 Robert Millan <robertmh@gnu.org>
1085
1086 * configure.in: Match GNU/KFreeBSD with new kfreebsd*-gnu triplet.
1087 * config.bfd: Likewise.
1088 * configure: Regenerate.
1089
1090 2003-08-31 Christian Groessler <chris@groessler.org>
1091
1092 * elf32-i860.c (i860_howto_pc26_reloc): Finish relocation here
1093 instead of returning bfd_reloc_continue.
1094
1095 2003-08-31 Andreas Jaeger <aj@suse.de>
1096
1097 * merge.c: Update to ISO C90.
1098
1099 2003-08-27 Ian Lance Taylor <ian@airs.com>
1100
1101 * configure.in: Check for strtoull.
1102 * bfd.c (bfd_scan_vma): Use strtoull when available.
1103 * configure, config.in: Regenerate.
1104
1105 * configure.in: Define and substitute BFD_HOST_LONG_LONG.
1106 * bfd-in.h: Define BFD_HOST_LONG_LONG. Test it rather than
1107 __GNUC__ when deciding whether to use long long for
1108 BFD_HOST_64_BIT.
1109 * configure, Makefile.in, doc/Makefile.in, bfd-in2.h: Regenerate.
1110
1111 2003-08-27 Christian Groessler <chris@groessler.org>
1112
1113 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc,
1114 i860_howto_splitn_reloc, i860_howto_highadj_reloc): New
1115 functions.
1116 (elf32_i860_howto_table): Insert the new functions as
1117 'special_function's in the proper reloc type entries.
1118
1119 2003-08-27 Richard Sandiford <rsandifo@redhat.com>
1120
1121 * elf32-frv.c (elf32_frv_relocate_section): Use
1122 _bfd_elf_rela_local_sym.
1123
1124 2003-08-26 Michael Snyder <msnyder@redhat.com>
1125
1126 * cpu-frv.c: Remove unused enum.
1127
1128 2003-08-25 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
1129
1130 * reloc.c: Fix documentation for MIPS ELF relocations.
1131 libbfd.h: Regenerate.
1132 bfd-in2.h: Regenerate.
1133
1134 2003-08-24 Jason Eckhardt <jle@rice.edu>
1135
1136 * coff-i860.c (CALC_ADDEND): Define to be a no-op.
1137
1138 2003-08-24 Jason Eckhardt <jle@rice.edu>
1139
1140 * elf32-i860.c (elf32_i860_relocate_pc16): Subtract 4 and
1141 shift by 2 before storing the relocated value.
1142
1143 2003-08-23 Jason Eckhardt <jle@rice.edu>
1144
1145 * coff-i860.c (coff_i860_reloc_nyi): New function.
1146 (howto_table): Add entries for relocations PAIR, HIGHADJ, HIGH,
1147 LOWn, SPLITn, and BRADDR.
1148 (RTYPE2HOWTO): Check that the r_type is within the howto_table
1149 before trying to access the entry.
1150 (coff_i860_rtype_to_howto): Likewise.
1151 (coff_i860_reloc_type_lookup): New function.
1152 (i860_reloc_processing): New function.
1153 (coff_bfd_reloc_type_lookup): Define macro.
1154 (RELOC_PROCESSING): Define macro.
1155 Minor formatting adjustments.
1156
1157 2003-08-23 Alan Modra <amodra@bigpond.net.au>
1158
1159 * elflink.h (elf_link_add_object_symbols): Don't crash on NULL owner.
1160
1161 2003-08-22 H.J. Lu <hongjiu.lu@intel.com>
1162
1163 * elfxx-ia64.c (elfNN_ia64_create_dynamic_sections): Align the
1164 .got section at 8 bytes.
1165
1166 2003-08-21 Nick Clifton <nickc@redhat.com>
1167
1168 * cofflink.c: Update to ISO C90 and tidy up formatting.
1169
1170 2003-08-21 Randolph Chung <tausq@debian.org>
1171
1172 * elf32-hppa.c (elf32_hppa_object_p): For elf32-hppa-linux, objects
1173 can have OSABI=Linux or OSABI=SysV. Check for both.
1174 * elf64-hppa.c (elf64_hppa_object_p): Likewise.
1175
1176 2003-08-21 Nick Clifton <nickc@redhat.com>
1177
1178 * po/sv.po: Updated Swedish translation.
1179
1180 2003-08-20 Richard Sandiford <rsandifo@redhat.com>
1181
1182 * elf64-mips.c (elf_backend_copy_indirect_symbol): Define.
1183
1184 2003-08-20 Nick Clifton <nickc@redhat.com>
1185
1186 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): New macro used to
1187 replace some duplicated code in most elfxx-xxxx.c files. This
1188 version uses the new fields in bfd_link_info.
1189
1190 * elf-m10300.c (mn10300_elf_relocate_section): Use new macro.
1191 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
1192 * elf32-cris.c (cris_elf_relocate_section): Likewise.
1193 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
1194 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1195 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
1196 * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
1197 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1198 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1199 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1200 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1201 * elf32-vax.c (elf_vax_relocate_section): Likewise.
1202 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
1203 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
1204 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1205 * elf64-s390.c (elf_s390_relocate_section): Likewise.
1206 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1207 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1208 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
1209
1210 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols,
1211 elf_hppa_remark_useless_dynamic_symbols,
1212 elf_hppa_relocate_section): Use the new fields in
1213 bfd_link_info structure.
1214 * elf32-sh.c (sh_elf_relocate_section): Likewise.
1215 * elf64-alpha.c (elf64_alpha_check_relocs): Likewise.
1216 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
1217 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
1218 * elfxx-ia64.c (elfNN_ia64_check_relocs): Likewise.
1219 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
1220
1221 * elflink.h (elf_link_output_extsym): Fix test for reporting
1222 undefined symbols in shared libraries. Remove redundant test
1223 of shlib_undefined when reporting references to forced local
1224 symbols.
1225
1226 2003-08-18 Andreas Schwab <schwab@suse.de>
1227
1228 * libpei.h (bfd_pe_executable_p): Also recognize efi-app
1229 executables.
1230
1231 2003-08-17 Hans-Peter Nilsson <hp@bitrange.com>
1232
1233 * simple.c (bfd_simple_get_relocated_section_contents): Move
1234 reloc_done hack to before first bfd_section_size call. Change all
1235 returns to use new wrapper macro RETURN, restoring sec->reloc_done.
1236
1237 2003-08-16 Alan Modra <amodra@bigpond.net.au>
1238
1239 * elf64-ppc.c: Don't include elf/ppc.h.
1240
1241 2003-08-14 Richard Sandiford <rsandifo@redhat.com>
1242
1243 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Fix PT_DYNAMIC
1244 code to work with 64-bit bfds.
1245
1246 2003-08-14 Alan Modra <amodra@bigpond.net.au>
1247
1248 * dep-in.sed: Remove libintl.h.
1249 * Makefile.am (SRC-POTFILES.in, BLD-POTFILES.in): Unset LC_COLLATE.
1250 (POTFILES.in): Remove target.
1251 * Makefile.in: Regenerate.
1252
1253 2003-08-12 Alan Modra <amodra@bigpond.net.au>
1254
1255 * elf64-ppc.c (ppc64_elf_next_input_section): Update comment.
1256 (ppc64_elf_relocate_section): For zero sym R_PPC64_TOC relocs,
1257 use the function sym from the previous reloc.
1258
1259 2003-08-11 Jakub Jelinek <jakub@redhat.com>
1260
1261 * elf32-i386.c (elf_i386_relocate_section): Make undefined symbols
1262 fatal if -pie.
1263 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1264 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1265 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
1266 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1267 * elf64-s390.c (elf_s390_relocate_section): Likewise.
1268 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1269 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1270 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
1271 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1272 (ppc_elf_relocate_section) <case R_PPC_RELAX32>: Issue fatal error
1273 on undefined symbols if -pie.
1274 * elf32-sh.c (sh_elf_relocate_section): Likewise.
1275
1276 2003-08-11 Alan Modra <amodra@bigpond.net.au>
1277
1278 * elf64-ppc.c (ppc64_elf_relocate_section): Add special case for crt1.o
1279 branch to __libc_start_main.
1280
1281 2003-08-08 Dmitry Diky <diwil@mail.ru>
1282
1283 * archures.c: Add xW42 and xE42 parts. Sort MPU list according to
1284 gcc order.
1285 * cpu-msp430.c: Likewise.
1286 * elf32-msp430.c: Likewise.
1287 * bfd-in2.h: Regenerate.
1288
1289 2003-08-07 Alan Modra <amodra@bigpond.net.au>
1290
1291 * elfxx-target.h: Remove PTR cast.
1292 * targets.c (bfd_target): Make backend_data const void *.
1293 * elf-bfd.h: Constify all occurrences of struct elf_backend_data.
1294 * elf-m10300.c: Likewise.
1295 * elf.c: Likewise.
1296 * elf32-hppa.c: Likewise.
1297 * elf32-i386.c: Likewise.
1298 * elf32-m68hc1x.c: Likewise.
1299 * elf32-ppc.c: Likewise.
1300 * elf32-s390.c: Likewise.
1301 * elf32-sh.c: Likewise.
1302 * elf32-sh64.c: Likewise.
1303 * elf32-sparc.c: Likewise.
1304 * elf32-xtensa.c: Likewise.
1305 * elf64-mips.c: Likewise.
1306 * elf64-ppc.c: Likewise.
1307 * elf64-s390.c: Likewise.
1308 * elf64-sh64.c: Likewise.
1309 * elf64-sparc.c: Likewise.
1310 * elf64-x86-64.c: Likewise.
1311 * elfcode.h: Likewise.
1312 * elfcore.h: Likewise.
1313 * elflink.c: Likewise.
1314 * elflink.h: Likewise.
1315 * elfxx-ia64.c: Likewise.
1316 * elfxx-mips.c: Likewise.
1317 * elfxx-mips.h: Likewise.
1318 * elf.c (prep_headers): Remove useless check for null backend_data.
1319 * bfd-in2.h: Regenerate.
1320
1321 * elf-bfd.h: Remove PARAMS macro. Replace PTR with void *.
1322 (NAME): Use ## rather than CONCAT4 macro.
1323 * elfcode.h: Remove one remaining PARAMS macro.
1324 * elf-eh-frame.c: Convert to C90, remove unneeded casts and prototypes.
1325 * elf-strtab.c: Likewise.
1326 * elf-hppa.h: Likewise.
1327 * elf32-hppa.h: Likewise.
1328 * elf32-hppa.c: Likewise.
1329 (elf32_hppa_add_symbol_hook): Delete.
1330 (elf_backend_add_symbol_hook): Don't define.
1331 * libhppa.h: Convert to C90. Replace INLINE with inline.
1332
1333 2003-08-06 Alan Modra <amodra@bigpond.net.au>
1334
1335 * elf64-ppc.c (ppc_stub_name): Tweak names for better readability.
1336 (ppc64_elf_adjust_dynamic_symbol): Allow copy relocs against
1337 function descriptors, but warn.
1338 (ppc_build_one_stub): Remove a couple of vars. Move code creating
1339 stub syms so that we can avoid a stub sym if we already have a
1340 plt sym. Do not redefine an existing symbol.
1341 (ppc64_elf_build_stubs): When --emit-stub-syms, print a symbol for
1342 glink.
1343
1344 2003-08-06 Nick Clifton <nickc@redhat.com>
1345
1346 * po/fr.po: Updated French translation.
1347
1348 2003-08-06 Alan Modra <amodra@bigpond.net.au>
1349
1350 * elflink.c (_bfd_elf_create_dynamic_sections): Mark .dynbss with
1351 SEC_LINKER_CREATED.
1352
1353 2003-08-05 Daniel Jacobowitz <drow@mvista.com>
1354
1355 * elf32-arm.h (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
1356 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Use it.
1357
1358 2003-08-03 Jeff Muizelaar <muizelaar@rogers.com>
1359
1360 * coffcode.h (coff_slurp_line_table): Return with a warning
1361 message if the line number table could not be read.
1362
1363 2003-08-04 Nick Clifton <nickc@redhat.com>
1364
1365 * elflink.h (elf_link_add_object_symbols): Prepend "warning: "
1366 to messages produced for .gnu.warning.SYMBOL sections.
1367
1368 2003-08-04 Alan Modra <amodra@bigpond.net.au>
1369
1370 * elfcode.h: Convert to C90, remove unneeded casts and prototypes.
1371 * elfcore.h: Likewise.
1372 * elflink.c: Likewise.
1373 * elflink.h: Likewise.
1374 * elf.c (sym_is_global): Remove INLINE.
1375 (align_file_position): Replace INLINE with inline.
1376 * elfcode.h (elf_swap_dyn_in, elf_swap_dyn_out): Remove INLINE.
1377 (elf_file_p): Replace INLINE with inline.
1378
1379 2003-08-02 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1380
1381 * elf32-sh.c (sh_elf_check_relocs): Don't set DF_TEXTREL here.
1382
1383 2003-08-01 H.J. Lu <hongjiu.lu@intel.com>
1384
1385 * elfxx-ia64.c (get_got): Align the .got section at 8 bytes.
1386
1387 2003-08-01 H.J. Lu <hongjiu.lu@intel.com>
1388
1389 * elfxx-ia64.c (elfNN_ia64_finish_dynamic_symbol): Use
1390 ElfNN_External_Rela instead of Elf64_External_Rela.
1391
1392 2003-08-01 Nick Clifton <nickc@redhat.com>
1393
1394 * config.bfd: Add code to catch obsolete configurations and warn
1395 about them unless --enable-obsolete is used. Use this to mark
1396 vax-vms port as obsolete.
1397
1398 2003-07-30 Alan Modra <amodra@bigpond.net.au>
1399
1400 * elf32-ppc.c (ppc_elf_install_value): Tidy.
1401 (ppc_elf_relax_section): Remove dead code. Remove unnecessary casts.
1402 Formatting.
1403 * elfxx-target.h: Remove PARAMS macro. Formatting.
1404
1405 2003-07-30 Alan Modra <amodra@bigpond.net.au>
1406
1407 * elf.c (bfd_section_from_r_symndx): Test for SHN_UNDEF.
1408 * elf64-ppc.c (get_fdh): New function, split out from
1409 ppc64_elf_edit_opd.
1410 (ppc64_elf_check_relocs): Use get_fdh.
1411 (func_desc_adjust): Likewise. Tidy.
1412 (ppc64_elf_edit_opd): Tighten reloc checks. Free local_syms on error
1413 exit. Use get_fdh. Account for superfluous dynamic relocs.
1414 (ppc64_elf_relocate_section): Warning fix.
1415
1416 2003-07-30 Jason Eckhardt <jle@rice.edu>
1417
1418 * coff-i860.c: Convert to ISO C90. Remove superflous prototypes.
1419
1420 2003-07-30 Jason Eckhardt <jle@rice.edu>
1421
1422 * elf32-i860.c: Convert to ISO C90. Remove superflous prototypes.
1423
1424 2003-07-30 Randolph Chung <tausq@debian.org>
1425
1426 * elf-hppa.h (elf_hppa_relocate_section): Look up dyn_h for undefweak.
1427 * elf64-hppa.c (elf64_hppa_finalize_dlt): Check h->root.type.
1428
1429 2003-07-30 Alan Modra <amodra@bigpond.net.au>
1430
1431 * elf.c: Convert to C90, remove unnecessary prototypes and casts.
1432 Replace PTR with void *. Formatting.
1433 (_bfd_elf_assign_file_position_for_section): Remove INLINE.
1434 (make_mapping): Likewise.
1435
1436 2003-07-29 Alan Modra <amodra@bigpond.net.au>
1437
1438 * elf64-ppc.c (func_desc_adjust): Give linker created function
1439 descriptor symbols a size and type.
1440 (ppc64_elf_relocate_section): Correct lq insn test.
1441
1442 2003-07-28 Eric Christopher <echristo@redhat.com>
1443
1444 * elf32-ppc.c (R_PPC_RELAX32): New relocation.
1445 (ppc_elf_install_value): New function.
1446 (ppc_elf_sort_rela): Remove.
1447 (ppc_elf_relax_section): Rewrite. Remove old relaxation
1448 and replace with out of range branch stubs.
1449 (ppc_elf_relocate_section): Handle R_PPC_RELAX32.
1450
1451 2003-07-29 Alexandre Oliva <aoliva@redhat.com>
1452
1453 * elf-m10300.c (mn10300_elf_relax_section): Take symbol hash table
1454 from input_bfd.
1455
1456 2003-07-28 Alan Modra <amodra@bigpond.net.au>
1457
1458 * elf.c (special_sections): Set attributes for .got and .plt.
1459
1460 2003-07-27 Alan Modra <amodra@bigpond.net.au>
1461
1462 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Ensure no copy relocs
1463 on function descriptors.
1464 (ELIMINATE_COPY_RELOCS): Expand comment.
1465 (ppc64_elf_special_sections): Move. Don't include non-ppc64 sections.
1466 Do include ".toc1".
1467
1468 2003-07-25 H.J. Lu <hongjiu.lu@intel.com>
1469
1470 * elf.c (_bfd_elf_new_section_hook): Set the default section
1471 type to SHT_NULL.
1472 (elf_fake_sections): Set the section type based on asect->flags
1473 if it is SHT_NULL. Don't abort on processor specific section
1474 types.
1475
1476 2003-07-25 H.J. Lu <hongjiu.lu@intel.com>
1477
1478 * bfd-in2.h: Regenerated.
1479
1480 2003-07-25 H.J. Lu <hongjiu.lu@intel.com>
1481
1482 * elf-bfd.h (bfd_elf_special_section): New.
1483 (elf_backend_data): Add special_sections, a pointer to
1484 bfd_elf_special_section.
1485 (elf_section_type). New.
1486 (elf_section_flags): New.
1487 (_bfd_elf_get_sec_type_attr): New.
1488
1489 * elf.c (_bfd_elf_make_section_from_shdr): Always use the
1490 real section type/flags.
1491 (special_sections): New.
1492 (get_special_section): New.
1493 (_bfd_elf_get_sec_type_attr): New.
1494 (_bfd_elf_new_section_hook): Check special_section to set
1495 elf_section_type and elf_section_flags.
1496 (elf_fake_sections): Don't use section name to set ELF section
1497 data.
1498
1499 * elf32-m32r.c (m32r_elf_special_sections): New.
1500 (elf_backend_special_sections): Defined.
1501
1502 * elf32-m68hc11.c (elf32_m68hc11_special_sections): New.
1503 (elf_backend_special_sections): Defined.
1504
1505 * elf32-mcore.c (mcore_elf_special_sections): New.
1506 (elf_backend_special_sections): Defined.
1507
1508 * elf32-ppc.c (ppc_elf_special_sections): New.
1509 (elf_backend_special_sections): Defined.
1510
1511 * elf32-sh64.c (sh64_elf_special_sections): New.
1512 (elf_backend_special_sections): Defined.
1513
1514 * elf32-v850.c (v850_elf_special_sections): New.
1515 (elf_backend_special_sections): Defined.
1516
1517 * elf32-xtensa.c (elf_xtensa_special_sections): New.
1518 (elf_backend_special_sections): Defined.
1519
1520 * elf64-alpha.c (elf64_alpha_special_sections): New.
1521 (elf_backend_special_sections): Defined.
1522
1523 * elf64-hppa.c (elf64_hppa_special_sections): New.
1524 (elf_backend_special_sections): Defined.
1525
1526 * elf64-ppc.c (ppc64_elf_special_sections): New.
1527 (elf_backend_special_sections): Defined.
1528
1529 * elf64-sh64.c (sh64_elf64_special_sections): New.
1530 (elf_backend_special_sections): Defined.
1531
1532 * elfxx-ia64.c (elfNN_ia64_special_sections): New.
1533 (elf_backend_special_sections): Defined.
1534
1535 * elfxx-mips.c (_bfd_mips_elf_special_sections): New.
1536
1537 * elfxx-mips.h (_bfd_mips_elf_special_sections): New.
1538 (elf_backend_special_sections): Defined.
1539
1540 * elfxx-target.h (elf_backend_special_sections): New. Default
1541 to NULL.
1542 (elfNN_bed): Initialize special_sections.
1543
1544 * section.c (bfd_abs_section): Remove const.
1545 (bfd_und_section): Likewise.
1546 (bfd_com_section): Likewise.
1547 (bfd_ind_section): Likewise.
1548
1549 2003-07-24 Nick Clifton <nickc@redhat.com>
1550
1551 * coff-arm.c (EXTRA_S_FLAGS): Include SEC_CODE so that code
1552 sections are assigned the LOAD attribute.
1553
1554 2003-07-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1555
1556 * elf32-sh.c: Convert to C90. Replace PTR with void *.
1557 * elf32-sh64-com.c: Likewise.
1558 * elf32-sh64.c: Likewise.
1559 * elf32-sh64.h: Likewise.
1560 * elf64-sh64.c: Likewise.
1561
1562 2003-07-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1563
1564 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
1565 (allocate_dynrelocs): Likewise.
1566 (sh_elf_relocate_section): Likewise. Use SYMBOL_REFERENCES_LOCAL.
1567 (sh_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
1568
1569 2003-07-24 Nick Clifton <nickc@redhat.com>
1570
1571 * po/fr.po: Updated French translation.
1572
1573 2003-07-23 Bob Wilson <bob.wilson@acm.org>
1574
1575 * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Make inline and move
1576 near the beginning of the file. Swap order of arguments. Call
1577 _bfd_elf_dynamic_symbol_p with "ignore_protected" set to 0.
1578 (elf_xtensa_fix_refcounts): Adjust xtensa_elf_dynamic_symbol_p call.
1579 (elf_xtensa_relocate_section): Likewise.
1580 (shrink_dynamic_reloc_sections): Likewise.
1581
1582 2003-07-23 Bob Wilson <bob.wilson@acm.org>
1583
1584 * elf32-xtensa.c (plt_reloc_count): Fix typo in comment.
1585 (elf_xtensa_size_dynamic_sections): Use elf_discarded_section.
1586 (elf_xtensa_combine_prop_entries): Avoid returning non-zero without
1587 first printing an error message.
1588 (elf_xtensa_finish_dynamic_sections): Likewise.
1589 (elf_xtensa_discard_info_for_section): Adjust size of .got.loc when
1590 discarding literal table entries.
1591 (elf_xtensa_merge_private_bfd_data): Remove newline from error message.
1592 (elf_xtensa_do_asm_simplify): Likewise.
1593
1594 2003-07-23 Stephane Carrez <stcarrez@nerim.fr>
1595
1596 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Avoid crash when
1597 we have a local symbol in common section.
1598
1599 2003-07-22 H.J. Lu <hongjiu.lu@intel.com>
1600
1601 * elflink.c (_bfd_elf_dynamic_symbol_p): Don't return TRUE for
1602 weak symbols.
1603
1604 2003-07-22 Nick Clifton <nickc@redhat.com>
1605
1606 * coffcode.h (coff_slurp_symbol_table): Add C_TCSYM and C_ECOML to
1607 expected RS6000 storage classes.
1608
1609 2003-07-21 H.J. Lu <hongjiu.lu@intel.com>
1610
1611 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Mark
1612 output_bfd unused to silence gcc.
1613
1614 2003-07-21 Nick Clifton <nickc@redhat.com>
1615
1616 * po/sv.po: Updated Swedish translation.
1617
1618 2003-07-21 Alan Modra <amodra@bigpond.net.au>
1619
1620 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Use..
1621 (_bfd_elf_symbol_refs_local_p): ..this. Declare.
1622 * elflink.c (_bfd_elf_symbol_refs_local_p): New function.
1623 * elf32-i386.c (elf_i386_relocate_section): Remove h NULL test
1624 now done in _bfd_elf_symbol_refs_local_p.
1625 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1626 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1627 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1628
1629 2003-07-18 H.J. Lu <hongjiu.lu@intel.com>
1630
1631 * elflink.c (_bfd_elf_dynamic_symbol_p): Undo the last change.
1632
1633 2003-07-18 H.J. Lu <hongjiu.lu@intel.com>
1634
1635 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL): Fix a typo.
1636 (SYMBOL_CALLS_LOCAL): Likewise.
1637
1638 * elflink.c (_bfd_elf_dynamic_symbol_p): Return TRUE
1639 immediately if symbol isn't defined locally.
1640
1641 2003-07-18 Richard Henderson <rth@redhat.com>
1642
1643 * elflink.c (_bfd_elf_dynamic_symbol_p): New.
1644 * elf-bfd.h (_bfd_elf_dynamic_symbol_p): Declare it.
1645 (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Use it.
1646 * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Likewise.
1647 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
1648 * elf64-hppa.c (elf64_hppa_dynamic_symbol_p): Likewise.
1649 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Likewise.
1650 Update all callers to provide the relocation being resolved.
1651
1652 2003-07-17 Shaun Jackman <sjackman@pathwayconnect.com>
1653
1654 * config.bfd (arm-wince-pe): Add -DARM_COFF_BUGFIX to
1655 targ_cflags.
1656
1657 2003-07-17 Nick Clifton <nickc@redhat.com>
1658
1659 * po/es.po: New Spanish translation.
1660 * po/sv.po: New Swedish translation.
1661 * po/opcodes.pot: Regenerate.
1662
1663 2003-07-16 Richard Henderson <rth@redhat.com>
1664
1665 * config.bfd, configure.host, configure.in: Remove ia64-aix support.
1666 * elfxx-ia64.c, targets.c: Likewise.
1667
1668 2003-07-16 Richard Henderson <rth@redhat.com>
1669
1670 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Properly return false
1671 for symbols defined locally plus -Bsymbolic. Tidy logic.
1672
1673 2003-07-15 Richard Sandiford <rsandifo@redhat.com>
1674
1675 * archures.c (bfd_mach_mips7000): New.
1676 * bfd-in2.h: Regenerated.
1677 * cpu-mips.c (arch_info_struct): Add an entry for mips:7000.
1678 * elfxx-mips.c (mips_set_isa_flags): Handle bfd_mach_mips7000.
1679 (mips_mach_extensions): Add an entry for it.
1680
1681 2003-07-14 Nick Clifton <nickc@redhat.com>
1682
1683 * po/tr.po: Update with latest version.
1684 * po/SRC-POTFILES.in: Regenerate.
1685 * po/bfd.pot: Regenerate.
1686 * Makfile.in: Regenerate.
1687 * configure: Regenerate.
1688
1689 2003-07-12 Jeff Baker <jbaker@qnx.com>
1690
1691 * bfd/config.bfd (__QNXTARGET__): Define for Neutrino architectures.
1692 * bfd/elf32-arm.h (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1693 * bfd/elf32-sh.c (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1694 * bfd/elf32-ppc.c (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1695
1696 2003-07-12 Jeff Muizelaar <muizelaar@rogers.com>
1697
1698 * coffcode.h (coff_set_section_contents): Set the
1699 IMAGE_FILE_32BIT_MACHINE flag for PE targets.
1700
1701 2003-07-11 Richard Sandiford <rsandifo@redhat.com>
1702
1703 * bfd-in.h (bfd_h8300_pad_address): Declare.
1704 * bfd-in2.h: Regenerate.
1705 * cpu-h8300.c (bfd_h8300_pad_address): New function.
1706 * coff-h8300.c (h8300_reloc16_estimate): Use it to canonicalize
1707 addresses before checking whether they can be relaxed.
1708 (h8300_reloc16_extra_cases): Likewise for the R_MOVL2 sanity check.
1709 Don't complain about overflows in general 8-bit relocations.
1710 * elf32-h8300.c (elf32_h8_relax_section): Use bfd_h8300_pad_address.
1711 Fix handling of R_H8_DIR24A8.
1712
1713 2003-07-11 Richard Sandiford <rsandifo@redhat.com>
1714
1715 * elf32-h8300.c: Convert function prototypes and definitions
1716 to C90 syntax.
1717 * coff-h8300.c: Likewise.
1718 * cpu-h8300.c: Likewise.
1719
1720 2003-07-11 Alan Modra <amodra@bigpond.net.au>
1721
1722 * po/SRC-POTFILES.in: Regenerate.
1723 * po/bfd.pot: Likewise.
1724
1725 2003-07-10 Bob Wilson <bob.wilson@acm.org>
1726
1727 * elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Create new
1728 .got.loc section. Do not set SEC_ALLOC or SEC_LOAD flags for the
1729 .xt.lit.plt section.
1730 (elf_xtensa_size_dynamic_sections): Set size of the .got.loc section
1731 and allocate memory for it.
1732 (elf_xtensa_combine_prop_entries): Copy contents of .xt.lit output
1733 section to the .got.loc section.
1734 (elf_xtensa_finish_dynamic_sections): Fix up call to
1735 elf_xtensa_combine_prop_entries and set DT_XTENSA_GOT_LOC_OFF to
1736 the address of .got.loc.
1737 (relax_property_section): Shrink .got.loc to match changes in any
1738 literal table section.
1739 (xtensa_is_property_section): Change to match
1740 xtensa_get_property_section_name.
1741 (xtensa_is_littable_section): New.
1742
1743 2003-07-10 H.J. Lu <hongjiu.lu@intel.com>
1744
1745 * elfxx-ia64.c (IA64_HOWTO): Set dst_mask to -1 instead of
1746 -1LL.
1747
1748 2003-07-10 Alan Modra <amodra@bigpond.net.au>
1749
1750 * Makefile.am (BFD32_BACKENDS): Add elf32-am33lin.lo.
1751 (BFD32_BACKENDS_CFILES): elf32-am33lin.c not elf32-am33lin.lo.
1752 Run "make dep-am".
1753 * Makefile.in: Regenerate.
1754
1755 2003-07-10 Alexandre Oliva <aoliva@redhat.com>
1756
1757 2001-09-12 Alexandre Oliva <aoliva@redhat.com>
1758 * elf32-am33lin.c (ELF_MACHINE_CODE): Redefine to EM_MN10300.
1759 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10300.
1760 2001-06-02 Nick Clifton <nickc@cambridge.redhat.com>
1761 * elf32-am33lin.c: Rename global functions.
1762 2001-05-09 Alexandre Oliva <aoliva@redhat.com>
1763 * config.bfd (am33_2.0, am33_2.0-*-linux*): Added.
1764 * configure.in (bfd_elf32_am33lin_vec): Added.
1765 * Makefile.am (BFD32_BACKENDS): Added elf32-am33lin.lo.
1766 (elf32-am33lin.lo): List dependencies.
1767 * aclocal.m4, configure, Makefile.in: Rebuilt.
1768 * elf-m10300.c (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME,
1769 ELF_ARCH, ELF_MACHINE_CODE, ELF_MAXPAGESIZE): Define only if
1770 ELF_ARCH was not defined before.
1771 (elf_symbol_leading_char): Define if not defined.
1772 * elf32-am33lin.c: Override the definitions above.
1773 * targets.c (bfd_elf32_am33lin_vec): New.
1774
1775 2003-07-09 Alexandre Oliva <aoliva@redhat.com>
1776
1777 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
1778 * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Initialize
1779 pcrel_relocs_copied.
1780 2001-12-13 Alexandre Oliva <aoliva@redhat.com>
1781 * elf-m10300.c (ELF_DYNAMIC_INTERPRETER): Renamed from
1782 ld-linux.so.2 to ld.so.1.
1783 2001-10-10 Alexandre Oliva <aoliva@redhat.com>
1784 * elf-m10300.c (elf_mn10300_sizeof_plt0): New macro.
1785 (_bfd_mn10300_elf_adjust_dynamic_symbol): Use it.
1786 (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
1787 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Allocate
1788 .rela.* section contents with bfd_zalloc.
1789 2001-09-25 Alexandre Oliva <aoliva@redhat.com>
1790 * elf-m10300.c: Added declarations for functions missing them.
1791 Merge some shared-library changes from the i386 back-end. Use
1792 R_MN10300_RELATIVE instead of R_MN10300_PCREL32 and
1793 R_MN10300_GLOB_DAT instead of R_MN10300_32 where appropriate.
1794 (struct elf32_mn10300_link_hash_entry): Remove duplicates of
1795 members of elf_link_hash_entry. Adjusted references.
1796 (mn10300_elf_final_link_relocate): dynobj was already loaded
1797 into a local variable, use it.
1798 2001-09-21 Nick Clifton <nickc@cambridge.redhat.com>
1799 * elf-m10300.c: Add missing function prototypes.
1800 2001-08-24 Alexandre Oliva <aoliva@redhat.com>
1801 * elf-m10300.c (mn10300_elf_relocate_section): Don't compute
1802 relocation for dynamic relocations.
1803 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
1804 * reloc.c (BFD_RELOC_MN10300_GOTOFF24): New.
1805 * elf-m10300.c: Introduce GOTPC16, GOTOFF24, GOTOFF16 and
1806 PLT16, and rename GOTPC to GOTPC32 and GOTOFF to GOTOFF32.
1807 (_bfd_mn10300_elf_create_dynamic_sections): Move creation ot PLT...
1808 (_bfd_mn10300_elf_create_got_section): ... here, so that its
1809 adress is already known at the time we compute relaxations.
1810 (mn10300_elf_relax_section): Relax GOTPC32, GOTOFF32, GOT32
1811 and PLT32 to narrower relocations.
1812 * libbfd.h, bfd-in2.h: Rebuilt.
1813 2001-04-12 Alexandre Oliva <aoliva@redhat.com>
1814 * reloc.c (BFD_RELOC_MN10300_GOT32, BFD_RELOC_MN10300_GOT24,
1815 BFD_RELOC_MN10300_GOT16, BFD_RELOC_MN10300_COPY,
1816 BFD_RELOC_MN10300_GLOB_DAT, BFD_RELOC_MN10300_JMP_SLOT,
1817 BFD_RELOC_MN10300_RELATIVE): New relocs.
1818 * libbfd.h, bfd-in2.h: Rebuilt.
1819 * elf-m10300.c (struct elf_mn10300_pcrel_relocs_copied): New.
1820 (struct elf32_mn10300_link_hash_entry): Added DSO-related
1821 fields.
1822 (elf_mn10300_howto): Defined new relocation types.
1823 (mn10300_reloc_map): Map them.
1824 (_bfd_mn10300_elf_create_got_section): New fn.
1825 (mn10300_elf_check_relocs): Handle PIC relocs.
1826 (mn10300_elf_final_link_relocate): Likewise.
1827 (mn10300_elf_relocate_section): Handle DSOs.
1828 (PLT0_ENTRY_SIZE, PLT_ENTRY_SIZE, PIC_PLT_ENTRY_SIZE): New macros.
1829 (elf_mn10300_plt0_entry, elf_mn10300_plt_entry,
1830 elf_mn10300_pic_plt_entry): New.
1831 (elf_mn10300_sizeof_plt, elf_mn10300_plt_plt0_offset,
1832 elf_mn10300_plt0_linker_offset, elf_mn10300_plt0_gotid_offset,
1833 elf_mn10300_plt_temp_offset, elf_mn10300_plt_symbol_offset,
1834 elf_mn10300_plt_reloc_offset: New macros.
1835 (ELF_DYNAMIC_INTERPRETER): Likewise.
1836 (_bfd_mn10300_elf_create_dynamic_sections): New function.
1837 (_bfd_mn10300_elf_adjust_dynamic_symbol): Likewise.
1838 (_bfd_mn10300_elf_discard_copies): Likewise.
1839 (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
1840 (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
1841 (_bfd_mn10300_elf_finish_dynamic_sections): Likewise.
1842 (elf_backend_can_gc_sections,
1843 elf_backend_create_dynamic_sections,
1844 elf_backend_adjust_dynamic_sections,
1845 elf_backend_size_dynamic_sections,
1846 elf_backend_finish_dynamic_symbol,
1847 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
1848 elf_backend_plt_readonly, elf_backend_want_plt_sym,
1849 elf_backend_got_header_size, elf_backend_plt_header_size): New
1850 macros.
1851
1852 2003-07-09 Alexandre Oliva <aoliva@redhat.com>
1853
1854 2001-05-06 Alexandre Oliva <aoliva@redhat.com>
1855 * elf-m10300.c (compute_function_info): Account for AM33
1856 registers in `movm' when computing stack space for `call' when
1857 linking for AM33/2.0 link.
1858 2000-04-01 Alexandre Oliva <aoliva@cygnus.com>
1859 * archures.c (bfd_mach_am33_2): Renamed from bfd_mach_am332.
1860 * bfd-in2.h: Rebuilt.
1861 * cpu-m10300.c (bfd_am33_2_arch): Renamed from bfd_am332_arch.
1862 * elf-m10300.c: Updated.
1863 2000-03-31 Alexandre Oliva <aoliva@cygnus.com>
1864 * archures.c (bfd_mach_am332): Defined.
1865 * bfd-in2.h: Rebuilt.
1866 * cpu-m10300.c (bfd_am332_arch): Defined.
1867 (bfd_am33_arch): Chained with am33-2.
1868 * elf-m10300.c (elf_mn10300_mach): Handle am332.
1869 (_bfd_mn10300_elf_final_write_processing): Likewise.
1870
1871 2003-07-09 H.J. Lu <hongjiu.lu@intel.com>
1872
1873 * elfxx-ia64.c (IA64_HOWTO): Set dst_mask to -1LL.
1874
1875 2003-07-10 Alan Modra <amodra@bigpond.net.au>
1876
1877 * elf64-ppc.c (bfd_elf64_mkobject): Define.
1878 (struct ppc64_elf_obj_tdata): New.
1879 (ppc64_elf_tdata, ppc64_tlsld_got): Define.
1880 (ppc64_elf_mkobject): New function.
1881 (struct got_entry): Add "owner". Move "tls_type".
1882 (struct ppc_link_hash_table): Delete "relgot", "tlsld_got".
1883 (ppc64_elf_init_stub_bfd): New function.
1884 (create_got_section): Create header .got in dynobj. Create .got
1885 and .rela.got in each bfd. Stash pointers in ppc64_elf_obj_tdata.
1886 (ppc64_elf_create_dynamic_sections): Don't call create_got_section.
1887 Look for dynobj .got, and test it.
1888 (ppc64_elf_copy_indirect_symbol): Adjust for changed got.
1889 (update_local_sym_info): Likewise.
1890 (ppc64_elf_check_relocs): Likewise.
1891 (ppc64_elf_gc_sweep_hook): Likewise.
1892 (ppc64_elf_tls_optimize): Likewise.
1893 (allocate_dynrelocs): Likewise.
1894 (ppc64_elf_size_dynamic_sections): Likewise.
1895 (ppc64_elf_relocate_section): Likewise.
1896 (ppc64_elf_next_toc_section): Update comment.
1897 (toc_adjusting_stub_needed): Remove unneeded cast.
1898 (ppc64_elf_build_stubs): Check for stub sections in stub bfd by
1899 testing section flags.
1900 (ppc64_elf_build_stubs): Likewise.
1901 (ppc64_elf_size_stubs): Likewise. Remove stub_bfd param.
1902 (ppc64_elf_finish_dynamic_sections): Write out got sections.
1903 (func_desc_adjust): Copy over dynamic info for undef weaks.
1904 * elf64-ppc.h (ppc64_elf_init_stub_bfd): Declare.
1905 (ppc64_elf_size_stubs): Update prototype.
1906 * elflink.h (elf_link_sort_relocs): Use link_orders to find reldyn
1907 input sections rather than scanning dynobj.
1908
1909 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
1910
1911 * elfxx-mips.c (mips_elf_link_hash_entry): Remove min_dyn_reloc_index.
1912 (bfd_mips_elf_swap_msym_in, bfd_mips_elf_swap_msym_out): Delete.
1913 (mips_elf_create_msym_section): Delete.
1914 (mips_elf_create_dynamic_relocation): Don't set min_dyn_reloc_index.
1915 (_bfd_mips_elf_copy_indirect_symbol): Likewise.
1916 (_bfd_mips_elf_create_dynamic_sections): Don't create .msym.
1917 (_bfd_mips_elf_size_dynamic_sections): Don't calculate its size.
1918 (_bfd_mips_elf_size_dynamic_sections): Don't add DT_MIPS_MSYM.
1919 (_bfd_mips_elf_finish_dynamic_symbol): Don't add symbols to .msym.
1920 (_bfd_mips_elf_finish_dynamic_sections): Likewise.
1921
1922 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
1923
1924 * elfxx-mips.c (mips_elf_irix6_finish_dynamic_symbol): Make the
1925 symbols protected.
1926
1927 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
1928
1929 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Fix handling
1930 of relocations whose offset is -2.
1931
1932 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
1933
1934 * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): Treat
1935 forced-local symbols like other locals. Don't create relocations
1936 against STN_UNDEF in irix objects.
1937
1938 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
1939
1940 * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): In SGI-
1941 compatible objects, add the values of defined external symbols
1942 to the addend.
1943
1944 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
1945
1946 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Always
1947 initialize a GOT entry to the symbol's st_value.
1948
1949 2003-07-08 Alan Modra <amodra@bigpond.net.au>
1950
1951 * elf-bfd.h (struct elf_obj_tdata): Move linker_section_pointers..
1952 * elf32-ppc.c (struct ppc_elf_obj_tdata): ..to here. New.
1953 (ppc_elf_tdata): Define.
1954 (elf_local_ptr_offsets): Adjust.
1955 (ppc_elf_mkobject): New function.
1956 (bfd_elf32_mkobject): Define.
1957
1958 * elfcode.h (elf_object_p): Allocate tdata via _bfd_set_format.
1959 * elfcore.h (elf_core_file_p): Likewise.
1960 * section.c (bfd_section_init): Remove prototype.
1961
1962 2003-07-08 Alan Modra <amodra@bigpond.net.au>
1963
1964 * elf-bfd.h (struct elf_link_hash_entry): Remove linker_section_pointer
1965 field.
1966 (enum elf_linker_section_enum): Delete.
1967 (struct elf_linker_section): Delete.
1968 (struct elf_linker_section_pointers): Delete.
1969 (struct elf_obj_tdata): Remove #if 0 chunk. Remove linker_section.
1970 Make linker_section_pointers a void**.
1971 (elf_local_ptr_offsets, elf_linker_section): Don't define.
1972 * elf32-ppc.c (enum elf_linker_section_enum): New, cut-down version
1973 of old item in elf-bfd.h.
1974 (struct elf_linker_section): Likewise.
1975 (struct elf_linker_section_pointers): Likewise.
1976 (elf_local_ptr_offsets): Define.
1977 (struct ppc_elf_link_hash_entry): Add linker_section_pointer.
1978 (ppc_elf_link_hash_newfunc): Init it.
1979 (struct ppc_elf_link_hash_table): Add sbss.
1980 (ppc_elf_link_hash_table_create): zmalloc rather than clearing
1981 individual fields.
1982 (elf_create_linker_section): Fold into..
1983 (ppc_elf_create_linker_section): ..here. Remove hole_size code.
1984 Make rela section here if shared.
1985 (elf_find_pointer_linker_section): Pass lsect rather than enum.
1986 (elf_create_pointer_linker_section): Adjust. zalloc rather than
1987 clearing in a loop.
1988 (elf_finish_pointer_linker_section): Adjust. Don't make rela
1989 section here.
1990 (ppc_elf_check_relocs): Adjust.
1991 (ppc_elf_add_symbol_hook): Tighten hash creator test. Remove code
1992 creating .sbss by hand.
1993 * elf.c (_bfd_elf_link_hash_newfunc): Adjust.
1994
1995 2003-07-04 Jakub Jelinek <jakub@redhat.com>
1996
1997 * elf32-s390.c (elf_howto_table): Change R_390_GOT12 to
1998 complain_overflow_bitfield.
1999 * elf64-s390.c (elf_howto_table): Change R_390_GOT12 to
2000 complain_overflow_bitfield.
2001
2002 2003-07-04 Jakub Jelinek <jakub@redhat.com>
2003
2004 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Return
2005 true even if -pie.
2006
2007 2003-07-04 Jakub Jelinek <jakub@redhat.com>
2008
2009 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add rel_fptr_sec.
2010 (elfNN_ia64_dynamic_symbol_p): Change info->shared into
2011 !info->executable.
2012 (get_fptr): For -pie create .opd as writable section and create
2013 .rela.opd as well.
2014 (elfNN_ia64_check_relocs): Change info->shared into
2015 !info->executable.
2016 (allocate_fptr): Likewise.
2017 (allocate_dynrel_entries): Account for a relative reloc for -pie
2018 @fptr(). Don't account for a relative reloc if -pie want_ltoff_fptr
2019 for undefweak symbol. Account for an IPLT reloc in .rela.opd
2020 section if -pie.
2021 (set_got_entry): Don't create a relative reloc if -pie
2022 want_ltoff_fptr for undefweak symbol.
2023 (set_fptr_entry): Emit an IPLT reloc in .rela.opd for -pie.
2024 (elfNN_ia64_relocate_section): Emit a relative reloc for -pie
2025 @fptr().
2026
2027 * elfxx-ia64.c (elfNN_ia64_relocate_section): Issue undefined_symbol
2028 even if -pie.
2029 * elf32-i386.c (elf_i386_relocate_section): Likewise.
2030 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
2031 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
2032 * elf64-s390.c (elf_s390_relocate_section): Likewise.
2033 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
2034 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
2035 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
2036 * elf32-s390.c (elf_s390_relocate_section): Likewise.
2037 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2038
2039 2003-07-04 Paul Clarke <paulc@senet.com.au>
2040
2041 * elf32-h8300.c (R_H8_DIR32A16): Fix name field.
2042 (elf32_h8_relax_section) <R_H8_DIR16A8>: Adjust position of relocation.
2043 <R_H8_DIR32A16>: Fix type of relocation.
2044
2045 2003-07-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2046
2047 * elf32-sh.c (sh_elf_create_dynamic_sections): Return if dynamic
2048 sections were created already. Remove unnecessary tests of
2049 the previous change.
2050
2051 2003-07-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2052
2053 * elf32-sh.c (sh_elf_create_dynamic_sections): Don't call
2054 bfd_make_section for existing sections.
2055
2056 2003-07-04 Alan Modra <amodra@bigpond.net.au>
2057
2058 * elf32-sparc.c (elf32_sparc_check_relocs): Don't call
2059 create_got_section if we already have done so.
2060 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
2061 (sh_elf_check_relocs): Likewise.
2062 (sh_elf_adjust_dynamic_symbol): Delete "dynobj" var. Use
2063 htab->root.dynobj instead.
2064 (sh_elf_check_relocs): Likewise.
2065 (sh_elf_finish_dynamic_sections): Likewise.
2066
2067 * section.c (bfd_make_section): Return NULL for existing section.
2068
2069 2003-07-04 Alan Modra <amodra@bigpond.net.au>
2070
2071 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Don't call
2072 ppc_elf_create_got if we've already done so.
2073
2074 * elf-bfd.h (_bfd_elf_create_linker_section) Don't declare.
2075 (_bfd_elf_find_pointer_linker_section): Likewise.
2076 (bfd_elf32_create_pointer_linker_section): Likewise.
2077 (bfd_elf32_finish_pointer_linker_section): Likewise.
2078 (bfd_elf64_create_pointer_linker_section): Likewise.
2079 (bfd_elf64_finish_pointer_linker_section): Likewise.
2080 (_bfd_elf_make_linker_section_rela): Likewise.
2081 * elfcode.h (elf_create_pointer_linker_section): Don't define.
2082 (elf_finish_pointer_linker_section): Likewise.
2083 * elflink.c (_bfd_elf_make_linker_section_rela): Delete.
2084 (_bfd_elf_create_linker_section): Move this function..
2085 (_bfd_elf_find_pointer_linker_section): ..and this..
2086 * elflink.h (elf_create_pointer_linker_section): ..and this..
2087 (elf_finish_pointer_linker_section): ..and this..
2088 * elf32-ppc.c: ..to here, renaming to the following, and adjusting
2089 calls.
2090 (elf_create_linker_section): Convert to C90, tidy.
2091 (elf_find_pointer_linker_section): Likewise.
2092 (elf_create_pointer_linker_section): Likewise.
2093 (elf_finish_pointer_linker_section): Likewise.
2094 * elf32-i370.c: Delete #if 0 code.
2095
2096 2003-07-02 Alan Modra <amodra@bigpond.net.au>
2097
2098 * elf64-ppc.c (ppc64_elf_func_desc_adjust): Don't allow _savef* and
2099 _restf* to be satisfied by shared libs, and always force them local.
2100 (toc_adjusting_stub_needed): Avoid scanning linker created sections.
2101 Correct test for "bl".
2102 (ppc64_elf_relocate_section <R_PPC64_TLS>): Correct test for
2103 primary opcode 31.
2104
2105 2003-07-01 Martin Schwidefsky <schwidefsky@de.ibm.com>
2106
2107 * elf32-s390.c (s390_elf_ldisp_reloc): New prototype.
2108 (s390_tls_reloc): New function.
2109 (elf_howto_table): Add long displacement relocations R_390_20,
2110 R_390_GOT20, R_390_GOTPLT20 and R_390_TLS_GOTIE20.
2111 (elf_s390_reloc_type_lookup): Likewise.
2112 (elf_s390_check_relocs): Likewise.
2113 (elf_s390_gc_sweep_hook): Likewise.
2114 (elf_s390_relocate_section): Likewise.
2115 * elf64-s390.c: Same changes as for elf32-s390.c.
2116 * reloc.c: Add long displacement relocations BFD_RELOC_390_20,
2117 BFD_RELOC_390_GOT20, BFD_RELOC_390_GOTPLT20 and
2118 BFD_RELOC_390_TLS_GOTIE20.
2119 * bfd-in2.h: Regenerate.
2120 * libbfd.h: Likewise.
2121
2122 2003-06-30 Alan Modra <amodra@bigpond.net.au>
2123
2124 * cpu-ia64-opc.c (ext_imms_scaled): Don't sign extend using shifts.
2125 (ins_imms, ins_immsm1u4): Likewise. Warning fix.
2126
2127 2003-06-29 Alan Modra <amodra@bigpond.net.au>
2128
2129 * archive.c: Convert to C90, remove unnecessary prototypes and casts.
2130 Replace PTR with void *. Formatting.
2131 * archive64.c: Likewise.
2132 * archures.c: Likewise.
2133 * bfd-in.h: Likewise.
2134 * bfd.c: Likewise.
2135 * bfdio.c: Likewise.
2136 * bfdwin.c: Likewise.
2137 * cache.c: Likewise.
2138 * corefile.c: Likewise.
2139 * format.c: Likewise.
2140 * init.c: Likewise.
2141 * libbfd-in.h: Likewise.
2142 * libbfd.c: Likewise.
2143 * linker.c: Likewise.
2144 * opncls.c: Likewise.
2145 * reloc.c: Likewise.
2146 * section.c: Likewise.
2147 * simple.c: Likewise.
2148 * syms.c: Likewise.
2149 * targets.c: Likewise.
2150 * bfd-in2.h: Regenerate.
2151 * libbfd.h: Regenerate.
2152
2153 * ecoff.c (bfd_debug_section): Add missing kept_section initialization.
2154 * libbfd-in.h (_bfd_sh_align_load_span): Don't declare if defined.
2155 * libbfd.c (COERCE32, EIGHT_GAZILLION): Simplify.
2156 (bfd_getb64): Rewrite without parens.
2157 (bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
2158 * cache.c (insert, snip): Remove INLINE.
2159 * linker.c (bfd_link_add_undef): Likewise.
2160
2161 2003-06-29 Andreas Jaeger <aj@suse.de>
2162
2163 * elf64-x86-64.c: Convert to ISO C90 prototypes, remove
2164 unnecessary prototypes. Replace PTR with void *.
2165 (elf64_x86_64_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL to
2166 trim plt entries. Move undefweak non-default visibility test ...
2167 (allocate_dynrelocs): ... from here.
2168 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
2169 Change all callers.
2170 (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL. Use
2171 SYMBOL_REFERENCES_LOCAL for dynreloc check.
2172 (elf64_x86_64_relocate_section): Use SYMBOL_CALLS_LOCAL for
2173 dynreloc and .got relocs.
2174 (elf64_x86_64_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL
2175 for .got relocs.
2176
2177 2003-06-29 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2178
2179 * elfxx-mips.c: Allow lazy binding for R_MIPS_JALR.
2180
2181 2003-06-27 Nick Clifton <nickc@redhat.com>
2182
2183 * opncls.c (bfd_add_gnu_debuglink_section): Rename to
2184 bfd_add_gnu_debuglink_section and only create the section, do not
2185 fill in its contents.
2186 (bfd_fill_in_gnu_debuglink_section): New function. Fill in the
2187 contents of a .gnu-debuglink section.
2188 * bfd-in2.h: Regenerate.
2189
2190 2003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2191
2192 * elfxx-mips.c: Revert .got alignment to 2**4.
2193
2194 2003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2195
2196 * elf32-mips.c: Fix addend for _gp_disp special symbol.
2197
2198 2003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2199
2200 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Remove non-default
2201 relocation header setup.
2202
2203 2003-06-25 Alan Modra <amodra@bigpond.net.au>
2204
2205 * elf32-ppc.c (ppc_elf_howto_table): Remove unnecessary cast.
2206 (ppc_elf_reloc_type_lookup): Modify comment.
2207 (ppc_elf_info_to_howto): Ditto.
2208 (ppc_elf_relocate_section): Ditto.
2209 (ppc_elf_check_relocs): Call ppc_elf_howto_init.
2210
2211 2003-06-25 Alan Modra <amodra@bigpond.net.au>
2212
2213 * aout-ns32k.c: Correct spelling of "relocatable".
2214 * aoutx.h: Likewise.
2215 * bfd-in.h: Likewise.
2216 * bfd.c: Likewise.
2217 * bout.c: Likewise.
2218 * coff-a29k.c: Likewise.
2219 * coff-alpha.c: Likewise.
2220 * coff-arm.c: Likewise.
2221 * coff-i386.c: Likewise.
2222 * coff-i860.c: Likewise.
2223 * coff-i960.c: Likewise.
2224 * coff-m68k.c: Likewise.
2225 * coff-m88k.c: Likewise.
2226 * coff-mcore.c: Likewise.
2227 * coff-mips.c: Likewise.
2228 * coff-or32.c: Likewise.
2229 * coff-ppc.c: Likewise.
2230 * coff-rs6000.c: Likewise.
2231 * coff-sh.c: Likewise.
2232 * coff-tic80.c: Likewise.
2233 * coff64-rs6000.c: Likewise.
2234 * cofflink.c: Likewise.
2235 * cpu-ns32k.c: Likewise.
2236 * ecoff.c: Likewise.
2237 * ecofflink.c: Likewise.
2238 * elf-bfd.h: Likewise.
2239 * elf-eh-frame.c: Likewise.
2240 * elf-hppa.h: Likewise.
2241 * elf-m10200.c: Likewise.
2242 * elf-m10300.c: Likewise.
2243 * elf.c: Likewise.
2244 * elf32-arm.h: Likewise.
2245 * elf32-avr.c: Likewise.
2246 * elf32-cris.c: Likewise.
2247 * elf32-d10v.c: Likewise.
2248 * elf32-dlx.c: Likewise.
2249 * elf32-fr30.c: Likewise.
2250 * elf32-frv.c: Likewise.
2251 * elf32-h8300.c: Likewise.
2252 * elf32-hppa.c: Likewise.
2253 * elf32-i370.c: Likewise.
2254 * elf32-i386.c: Likewise.
2255 * elf32-i860.c: Likewise.
2256 * elf32-i960.c: Likewise.
2257 * elf32-ip2k.c: Likewise.
2258 * elf32-iq2000.c: Likewise.
2259 * elf32-m32r.c: Likewise.
2260 * elf32-m68hc11.c: Likewise.
2261 * elf32-m68hc1x.c: Likewise.
2262 * elf32-m68k.c: Likewise.
2263 * elf32-mcore.c: Likewise.
2264 * elf32-mips.c: Likewise.
2265 * elf32-msp430.c: Likewise.
2266 * elf32-openrisc.c: Likewise.
2267 * elf32-ppc.c: Likewise.
2268 * elf32-s390.c: Likewise.
2269 * elf32-sh.c: Likewise.
2270 * elf32-sh64.c: Likewise.
2271 * elf32-sparc.c: Likewise.
2272 * elf32-v850.c: Likewise.
2273 * elf32-vax.c: Likewise.
2274 * elf32-xstormy16.c: Likewise.
2275 * elf32-xtensa.c: Likewise.
2276 * elf64-alpha.c: Likewise.
2277 * elf64-hppa.c: Likewise.
2278 * elf64-mips.c: Likewise.
2279 * elf64-mmix.c: Likewise.
2280 * elf64-ppc.c: Likewise.
2281 * elf64-s390.c: Likewise.
2282 * elf64-sh64.c: Likewise.
2283 * elf64-sparc.c: Likewise.
2284 * elf64-x86-64.c: Likewise.
2285 * elfcode.h: Likewise.
2286 * elflink.h: Likewise.
2287 * elfn32-mips.c: Likewise.
2288 * elfxx-ia64.c: Likewise.
2289 * elfxx-mips.c: Likewise.
2290 * i386linux.c: Likewise.
2291 * ieee.c: Likewise.
2292 * libcoff-in.h: Likewise.
2293 * linker.c: Likewise.
2294 * m68klinux.c: Likewise.
2295 * pdp11.c: Likewise.
2296 * pe-mips.c: Likewise.
2297 * peXXigen.c: Likewise.
2298 * reloc.c: Likewise.
2299 * reloc16.c: Likewise.
2300 * sparclinux.c: Likewise.
2301 * sunos.c: Likewise.
2302 * syms.c: Likewise.
2303 * versados.c: Likewise.
2304 * vms.c: Likewise.
2305 * xcofflink.c: Likewise.
2306 * bfd-in2.h: Regenerate.
2307 * libcoff.h: Regenerate.
2308 * libbfd.h: Regenerate.
2309
2310 2003-06-24 Alan Modra <amodra@bigpond.net.au>
2311
2312 * elf32-ppc.c (ppc_elf_check_relocs): Report plt reloc against
2313 local sym errors.
2314
2315 * elf32-i386.c: Convert to C90 function definitions, remove unnecessary
2316 prototypes and casts. Replace PTR with void *. Formatting.
2317 * elf32-ppc.c: Likewise. Break long strings too.
2318 (ppc_elf_relax_section): Use enum elf_ppc_reloc_type for r_type.
2319 (ppc_elf_unhandled_reloc): Internationalize error message.
2320 * elf32-ppc.h: Remove PARAMS.
2321
2322 2003-06-23 Mark Mitchell <mark@codesourcery.com>
2323
2324 * elf32-ppc.c (ppc_elf_begin_write_processing): Use bytes to count
2325 APUinfo slots.
2326 (ppc_elf_final_write_processing): Likewise.
2327
2328 2003-06-23 H.J. Lu <hongjiu.lu@intel.com>
2329
2330 * elflink.h (elf_link_input_bfd): Check raw size when using
2331 kept_section to preserve debug information discarded by
2332 linkonce.
2333
2334 2003-06-20 Alan Modra <amodra@bigpond.net.au>
2335
2336 * elf64-ppc.c (struct ppc_link_hash_table): Add top_id.
2337 (ppc64_elf_setup_section_lists): Set it.
2338 (ppc64_elf_relocate_section): Check sym section id against top_id.
2339 (ppc_build_one_stub): Comment on top_id.
2340
2341 2003-06-20 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
2342
2343 * config.bfd: Add tic4x-*-rtems*.
2344
2345 2003-06-20 Alan Modra <amodra@bigpond.net.au>
2346
2347 * elf64-ppc.c: Convert to C90 function definitions, remove unnecessary
2348 prototypes and casts. Replace PTR with void *. Format copyright.
2349 Mention ABI links.
2350 (struct ppc_link_hash_table): Rename sgot, srelgot, splt, srelplt,
2351 sdynbss, srelbss, sglink, sbrlt and srelbrlt to got, relgot .. relbrlt.
2352 (ppc_type_of_stub): Make r_type an enum.
2353 (ppc64_elf_size_stubs): Likewise.
2354 * elf64-ppc.h: Remove PARAMS macro.
2355
2356 2003-06-19 Alan Modra <amodra@bigpond.net.au>
2357
2358 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Reinstate init of
2359 elf hash tab fields.
2360
2361 * elf64-ppc.c (ppc64_elf_reloc_type_lookup): Tidy prototype.
2362 (ppc64_elf_info_to_howto): Likewise.
2363 (ppc64_elf_build_stubs): Add "stats" param, and print statistics.
2364 * elf64-ppc.h (ppc64_elf_build_stubs): Adjust prototype.
2365
2366 2003-06-19 Alan Modra <amodra@bigpond.net.au>
2367
2368 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore R_SPARC_DISP32
2369 reloc overflow on discarded eh_frame entries.
2370
2371 2003-06-19 Alan Modra <amodra@bigpond.net.au>
2372
2373 * elf64-ppc.c (toc_adjusting_stub_needed): New function.
2374 (ppc64_elf_next_input_section): Use it here to set has_gp_reloc.
2375 Return error condition.
2376 (ppc64_elf_size_stubs): Restrict toc adjusting stubs to sections
2377 that have has_gp_reloc set.
2378 (struct ppc_link_hash_table): Add stub_count.
2379 (ppc_build_one_stub): Increment it.
2380 (ppc64_elf_link_hash_table_create): zmalloc rather than clearing
2381 individual fields.
2382 * elf64-ppc.h (ppc64_elf_next_input_section): Update prototype.
2383
2384 2003-06-18 Alan Modra <amodra@bigpond.net.au>
2385
2386 * elflink.h (elf_gc_record_vtentry): Revert last change. Correct
2387 size calculation from addend. Round size up.
2388
2389 2003-06-18 Hans-Peter Nilsson <hp@axis.com>
2390
2391 * elf32-cris.c (cris_elf_relocate_section) <case
2392 R_CRIS_32_GOTREL>: When linking a program, don't complain about a
2393 symbol from a normal object or an undefined weak symbol.
2394
2395 2003-06-18 Alan Modra <amodra@bigpond.net.au>
2396
2397 * elf64-ppc.c (ppc64_elf_relocate_section): Accept a symbol on
2398 R_PPC64_TOC relocs.
2399
2400 2003-06-17 H.J. Lu <hongjiu.lu@intel.com>
2401
2402 * section.c (struct sec): Put back kept_section.
2403 (STD_SECTION): Put back kept_section initialization.
2404 * bfd-in2.h: Regenerate.
2405
2406 * elflink.h (elf_link_input_bfd): Also check discarded linkonce
2407 sections for relocateable output. Use kept_section to preserve
2408 debug information discarded by linkonce.
2409
2410 2003-06-17 Roland McGrath <roland@redhat.com>
2411
2412 * elfxx-ia64.c (elfNN_ia64_relocate_section): Support
2413 segment-relative relocation between different segments.
2414
2415 2003-06-17 Alan Modra <amodra@bigpond.net.au>
2416
2417 * elf64-ppc.c (ppc64_elf_relocate_section): Do unaligned reloc
2418 optimizations earlier.
2419
2420 * elf64-ppc.c (struct ppc_link_hash_table): Reinstate top_index.
2421 Restore previous input_list type.
2422 (ppc64_elf_link_hash_table_create): Undo last change.
2423 (ppc64_elf_setup_section_lists): Reinstate code setting up input lists
2424 per output section, but don't bother with bfd_abs_section marker.
2425 (ppc64_elf_next_input_section): Adjust for multiple input section
2426 lists.
2427 (group_sections): Likewise.
2428
2429 2003-06-17 Jakub Jelinek <jakub@redhat.com>
2430
2431 * elf64-ppc.c (ppc64_elf_relocation_section): Ensure
2432 *r_offset == r_addend for RELATIVE relocs against .got.
2433
2434 2003-06-17 Alan Modra <amodra@bigpond.net.au>
2435
2436 * elf64-ppc.c (ppc64_elf_relocate_section): Optimize unaligned relocs.
2437
2438 2003-06-17 Nick Clifton <nickc@redhat.com>
2439
2440 * elflink.h (elf_gc_record_vtentry): Allocate an extra element
2441 in the vtable_entries_used array to allow for the accessing
2442 the largest element.
2443
2444 2003-06-17 Alan Modra <amodra@bigpond.net.au>
2445
2446 * elf64-ppc.c (struct ppc_link_hash_table): Remove top_index. Modify
2447 input_list.
2448 (ppc64_elf_link_hash_table_create): Init input_list here.
2449 (ppc64_elf_setup_section_lists): Remove code setting up input lists
2450 per output section. Set toc_off for abs and other standard sections.
2451 (ppc64_elf_reinit_toc): Don't set elf_gp on input bfds lacking a toc.
2452 (ppc64_elf_next_input_section): Adjust for single input section list.
2453 Don't set toc_curr from input bfds that haven't set elf_gp.
2454 (group_sections): Adjust for single input section list.
2455
2456 * elf64-ppc.c (ppc64_elf_relocate_section): Correct pcrel section zero.
2457
2458 2003-06-16 Alan Modra <amodra@bigpond.net.au>
2459
2460 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing toctprel
2461 tls, check that a TOC16_DS or TOC16_LO_DS reloc isn't pointing to a
2462 dtprel entry. Ensure TLS_LD DTPMOD reloc has a zero addend. Write
2463 got section for RELATIVE relocs. Fix wrong comment. Change condition
2464 under which dynamic relocs update the section contents.
2465
2466 2003-06-13 Robert Millan <zeratul2@wanadoo.es>
2467
2468 * config.bfd: Add i386-netbsd-gnu target.
2469
2470 2003-06-12 Nick Clifton <nickc@redhat.com>
2471
2472 * opncls.c (calc_crc32): Rename to
2473 bfd_calc_gnu_debuglink_crc32 and export.
2474 (GNU_DEBUGLINK): Define and use to replace occurrences of
2475 hard-coded ".gnu_debuglink" in the code.
2476 (get_debug_link_info): Prevent aborts by replacing call to
2477 xmalloc with a call to malloc.
2478 (find_separate_debug_file): Prevent aborts by replacing calls
2479 to xmalloc and xstrdup with calls to malloc and strdup.
2480 (bfd_add_gnu_debuglink): New function. Add a .gnu_debuglink
2481 section to a bfd.
2482 * bfd-in2.h: Regenerate.
2483
2484 2003-06-12 Federico G. Schwindt <fgsch@lodoss.net>
2485
2486 * config.bfd (i[3-7]86-*-openbsd[0-2].* | i[3-7]86-*-openbsd3.[0-3]):
2487 New target (was i[3-7]86-*-openbsd* before).
2488 (i[3-7]86-*-openbsd*): Change to use bfd_elf32_i386_vec.
2489 (vax-*-openbsd*): New target.
2490
2491 2003-06-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2492
2493 * elfxx-mips.c (MIPS_ELF_OPTIONS_SECTION_NAME): Use .MIPS.options
2494 for n32, too.
2495 (MIPS_ELF_STUB_SECTION_NAME): Use .MIPS.stubs for n32, too.
2496 (mips_elf_rel_dyn_section): Use appropriate section alignment.
2497 (mips_elf_create_got_section): Likewise.
2498 (_bfd_mips_elf_create_dynamic_sections): Likewise.
2499
2500 2003-06-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2501
2502 * elf32-mips.c (mips_elf_generic_reloc): New Function.
2503 (elf_mips_howto_table_rel): Use it.
2504 (gprel32_with_gp): Move prototype.
2505 (mips_elf_hi16_reloc): Check for ! BSF_LOCAL instead of zero addend.
2506 Use mips_elf_generic_reloc.
2507 (mips_elf_got16_reloc): Check for ! BSF_LOCAL instead of zero addend.
2508 Code cleanup.
2509 (_bfd_mips_elf32_gprel16_reloc): Check for ! BSF_LOCAL instead of
2510 zero addend.
2511 (mips_elf_gprel32_reloc): Likewise. Use the same GP assignment logic
2512 as in the other *_gprel*_reloc functions.
2513 (gprel32_with_gp): Handle partial_inplace properly.
2514 (mips32_64bit_reloc): Use mips_elf_generic_reloc.
2515 (mips16_gprel_reloc): Check for ! BSF_LOCAL instead of zero addend.
2516 Do addend handling directly instead of calling
2517 _bfd_mips_elf_gprel16_with_gp. Handle partial_inplace properly.
2518 * elf64-mips.c (mips_elf64_hi16_reloc): Check for ! BSF_LOCAL instead
2519 of zero addend. Handle partial_inplace properly.
2520 (mips_elf64_got16_reloc): Check for ! BSF_LOCAL instead of zero
2521 addend.
2522 (mips_elf64_gprel16_reloc): Likewise.
2523 (mips_elf64_literal_reloc): Likewise.
2524 (mips_elf64_gprel32_reloc): Likewise. Use the same GP assignment
2525 logic as in the other *_gprel*_reloc functions. Handle
2526 partial_inplace properly.
2527 (mips_elf64_shift6_reloc): Check for ! BSF_LOCAL instead of zero
2528 addend. Handle partial_inplace properly.
2529 (mips16_gprel_reloc): Likewise. Do addend handling directly instead
2530 of calling _bfd_mips_elf_gprel16_with_gp.
2531 * elfn32-mips.c (mips_elf_got16_reloc): Check for BSF_LOCAL.
2532 (mips_elf_gprel32_reloc): Check for ! BSF_LOCAL instead
2533 of zero addend.
2534 (mips_elf_shift6_reloc): Handle partial_inplace properly.
2535 (mips16_gprel_reloc): Likewise. Do addend handling directly instead
2536 of calling _bfd_mips_elf_gprel16_with_gp.
2537 * elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp): Handle
2538 partial_inplace properly. Fix wrong addend handling. Fix overflow
2539 check.
2540 (_bfd_mips_elf_sign_extend): Renamed from mips_elf_sign_extend and
2541 exported.
2542 (mips_elf_calculate_relocation): Use _bfd_mips_elf_sign_extend.
2543 (_bfd_mips_elf_relocate_section): Likewise.
2544 (mips_elf_create_dynamic_relocation): Update sec_info_type access.
2545 * elfxx-mips.h (_bfd_mips_relax_section): Fix prototype declaration.
2546 (_bfd_mips_elf_sign_extend): New prototype.
2547
2548 2003-06-11 Federico G. Schwindt <fgsch@lodoss.net>
2549
2550 * config.bfd (sparc-*-openbsd[0-2].* | sparc-*-openbsd3.[0-1]):
2551 New target (was sparc-*-openbsd* before).
2552 (sparc-*-openbsd*): Change to use bfd_elf32_sparc_vec.
2553
2554 * configure.in (vax-*-openbsd*): Set COREFILE to netbsd-core.lo.
2555 * configure: Regenerate.
2556
2557 2003-06-11 H.J. Lu <hongjiu.lu@intel.com>
2558
2559 * po/Make-in (DESTDIR): New.
2560 (install-data-yes): Support $(DESTDIR).
2561 (uninstall): Likewise.
2562
2563 2003-06-11 Alan Modra <amodra@bigpond.net.au>
2564
2565 * Makefile.am (config.status): Depend on version.h.
2566 Run "make dep-am".
2567 * Makefile.in: Regenerate.
2568 * po/SRC-POTFILES.in: Regenerate.
2569
2570 2003-06-10 Alan Modra <amodra@bigpond.net.au>
2571 Gary Hade <garyhade@us.ibm.com>
2572
2573 * elf64-ppc.c (ppc64_elf_relocate_section <*_DS>): Special case lq.
2574
2575 2003-06-10 Richard Sandiford <rsandifo@redhat.com>
2576
2577 * archures.c (bfd_mach_h8300sxn): New architecture.
2578 * bfd-in2.h: Regenerate.
2579 * cpu-h8300.c (h8300_scan): Check for 'sxn'.
2580 (h8300sxn_info_struct): New.
2581 (h8300sx_info_struct): Link to it.
2582 * elf32-h8300.c (elf32_h8_mach): Add h8300sxn case.
2583 (elf32_h8_final_write_processing): Likewise.
2584
2585 2003-06-08 Alan Modra <amodra@bigpond.net.au>
2586
2587 * elf64-ppc.c: Move TARGET_LITTLE_SYM and other macros used by
2588 elfxx-target.h so that we can use elf_backend_got_header_size.
2589 (ELF_MACHINE_ALT1, ELF_MACHINE_ALT2): Delete.
2590 (GLINK_CALL_STUB_SIZE): Modify. Define new glink call stub and
2591 associated macros.
2592 (ppc64_elf_howto_raw <GOT_TPREL16_DS, GOT_TPREL16_LO_DS>): Correct
2593 dst_mask.
2594 (enum ppc_stub_type): Add ppc_stub_long_branch_r2off and
2595 ppc_stub_plt_branch_r2off.
2596 (struct ppc_stub_hash_entry): Reorganize.
2597 (struct ppc_link_hash_table): Add no_multi_toc, multi_toc_needed,
2598 toc_curr, toc_off and emit_stub_syms.
2599 (ppc64_elf_link_hash_table_create): Init them.
2600 (ppc_stub_name): Correct string size.
2601 (ppc64_elf_check_relocs): Set has_gp_reloc on GOT and TOC relocs.
2602 (ppc64_elf_size_dynamic_sections): Set no_multi_toc if GOT entries
2603 used.
2604 (ppc_type_of_stub): Tweak root.type test.
2605 (build_plt_stub): Remove glink code. Adjust for insn macro changes.
2606 (ppc_size_one_stub): Handle ppc_stub_long_branch_r2off and
2607 ppc_stub_plt_branch_r2off.
2608 (ppc_build_one_stub): Likewise. Fix var shadowing. Correct addis,addi
2609 range test. Use toc_off to calculte r2 values. Handle emit_stub_syms.
2610 (ppc64_elf_setup_section_lists): Remove htab creator flavour test.
2611 Initialize elf_gp and toc_curr.
2612 (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): New functions.
2613 (ppc64_elf_next_input_section): Set toc_off.
2614 (group_sections): Ensure groups have the same TOC.
2615 (ppc64_elf_size_stubs): Check whether we need a TOC adjusting stub.
2616 (ppc64_elf_build_stubs): Add emit_stub_syms param, and stash in htab.
2617 Build new glink stub.
2618 (ppc64_elf_relocate_section): Handle multiple TOCs. Fix comments.
2619 (ppc64_elf_finish_dynamic_sections): Adjust DT_PPC64_GLINK.
2620 * elf64-ppc.h (ppc64_elf_build_stubs): Update prototype.
2621 (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): Declare.
2622 * section.c (struct sec): Rename flag12 to has_gp_reloc.
2623 (STD_SECTION): Update.
2624 * ecoff.c (bfd_debug_section): Update comment.
2625 * bfd-in2.h: Regenerate.
2626
2627 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
2628
2629 * elfcode.h (elf_slurp_reloc_table_from_section): Don't dereference
2630 NULL function pointers.
2631
2632 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
2633
2634 * simple.c (bfd_simple_get_relocated_section_contents): Call
2635 _bfd_generic_link_add_symbols instead of bfd_link_add_symbols.
2636
2637 2003-06-04 Svein E. Seldal <Svein.Seldal@solidas.com>
2638
2639 * coff-tic54x.c: Removed the ticoff0_bad_format_hook() and
2640 ticoff1_bad_format_hook() functions. Removed the coff0 and coff1
2641 swaptables.
2642 * coff-tic4x.c: Ditto
2643 * coffcode.h: Added extra arguments to CREATE_BIG_COFF_TARGET_VEC
2644 and CREATE_LITTLE_COFF_TARGET_VEC. Created the macro
2645 CREATE_BIGHDR_COFF_TARGET_VEC. Created the ticoff0_bad_format_hook(),
2646 ticoff1_bad_format_hook() functions. Created the coff0 and coff1
2647 swap tables.
2648 * coff-tic4x.c: Adopted new CREATE_xxx_COFF_TARGET_VEC macros.
2649 * coff-a29k.c: Append COFF_SWAP_TABLE argument
2650 * coff-apollo.c: Ditto
2651 * coff-arm.c: Ditto
2652 * coff-h8300.c: Ditto
2653 * coff-h8500.c: Ditto
2654 * coff-i960.c: Ditto
2655 * coff-m68k.c: Ditto
2656 * coff-m88k.c: Ditto
2657 * coff-mcore.c: Ditto
2658 * coff-sh.c: Ditto
2659 * coff-sparc.c: Ditto
2660 * coff-tic80.c: Ditto
2661 * coff-we32k.c: Ditto
2662 * coff-z8k.c: Ditto
2663 * coff-w65.c: Ditto
2664
2665 2003-06-04 Svein E. Seldal <Svein.Seldal@solidas.com>
2666
2667 * coff-tic4x.c (ticoff0_swap_table, ticoff1_swap_table): Fixed
2668 initialization bug
2669
2670 2003-06-03 Jakub Jelinek <jakub@redhat.com>
2671
2672 * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_STACK.
2673 (bfd_section_from_phdr): Likewise.
2674 (map_sections_to_segments): Create PT_GNU_STACK segment header.
2675 (get_program_header_size): Count with PT_GNU_STACK.
2676 * elf-bfd.h (struct elf_obj_tdata): Add stack_flags.
2677 * elflink.h (bfd_elfNN_size_dynamic_sections): Set stack_flags.
2678
2679 2003-06-03 H.J. Lu <hongjiu.lu@intel.com>
2680
2681 * elflink.h (elf_link_input_bfd): Call linker error_handler
2682 for discarded definitions.
2683
2684 2003-06-03 Elias Athanasopoulos <elathan@phys.uoa.gr>
2685
2686 * syms.c (decode_section_type): Return 'n' if section flags are
2687 SEC_HAS_CONTENTS && SEC_READONLY.
2688
2689 2003-06-03 Nick Clifton <nickc@redhat.com>
2690
2691 * elf32-v850.c (v850_elf_howto_t): Rename R_V850_32to
2692 R_V850_ABS32. Add entry for R_V850_REL32.
2693 (v850_elf_reloc_map): Likewise.
2694 (v850_elf_check_relocs): Likewise.
2695 (v850_elf_perform_relocation): Likewise.
2696 (v850_elf_final_link_relocate): Likewise. Include computation
2697 to make R_V850_REl32 pc-relative.
2698
2699 2003-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2700
2701 * elf32-sh.c (sh_elf_size_dynamic_sections): Create .interp section
2702 and DT_DEBUG dynamic tag even for position independent executables.
2703 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewize.
2704
2705 2003-06-02 Daniel Jacobowitz <drow@mvista.com>
2706
2707 * config.bfd: Move obsolete entries out of the range of the
2708 targmatch sed script.
2709
2710 2003-06-02 Daniel Jacobowitz <drow@mvista.com>
2711
2712 * config.bfd (mips*-dec-bsd*, mips*-*-pe*): Mark as obsolete.
2713
2714 2003-05-31 Jakub Jelinek <jakub@redhat.com>
2715
2716 * elf32-ppc.c (allocate_dynrelocs): Use single slot for first 8192
2717 plt entries, not just 8191.
2718
2719 2003-05-30 Daniel Jacobowitz <drow@mvista.com>
2720
2721 * elfxx-mips.c (_bfd_mips_elf_discard_info): Correct loop index.
2722 Reported by Ken Faiczak <kfaiczak@SANDVINE.com>.
2723
2724 2003-05-30 Ulrich Drepper <drepper@redhat.com>
2725 Jakub Jelinek <jakub@redhat.com>
2726
2727 * elflink.h (elf_link_add_object_symbols): Use !info->executable
2728 instead of info->shared where appropriate.
2729 (bfd_elfNN_size_dynamic_sections, elf_link_output_extsym): Likewise.
2730 * elflink.c (_bfd_elf_create_got_section): Likewise.
2731 (_bfd_elf_link_create_dynamic_sections): Likewise.
2732 (_bfd_elf_link_assign_sym_version): Likewise.
2733 * elf32-i386.c (elf_i386_size_dynamic_sections): Create .interp section
2734 and DT_DEBUG dynamic tag even for position independent executables.
2735 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
2736 * elf32-s390.c (elf_s390_size_dynamic_sections: Likewise.
2737 * elf64-ppc.c (ppc64_elf_size_dynamic_sections: Likewise.
2738 * elf64-s390.c (elf_s390_size_dynamic_sections: Likewise.
2739 * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections: Likewise.
2740 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections: Likewise.
2741 * elf32-sparc.c (elf32_sparc_size_dynamic_sections: Likewise.
2742 * elf64-alpha.c (elf64_alpha_size_dynamic_sections: Likewise.
2743 * elf64-sparc.c (sparc64_elf_size_dynamic_sections: Likewise.
2744
2745 2003-05-30 Kris Warkentin <kewarken@qnx.com>
2746
2747 * elf.c (elfcore_grok_nto_status): Only set lwpid for the active or
2748 signalled thread.
2749 (elfcore_grok_nto_gregs): Only make .reg section for the active thread.
2750
2751 2003-05-29 Nick Clifton <nickc@redhat.com>
2752
2753 * pef.c: Include "safe-ctype.h" instead of <ctype.h>.
2754 Tidy up formatting.
2755 * Makefile.am: Add dependency on safe-ctype.h.
2756 * Makefile.in: Regenerate.
2757
2758 2003-05-29 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2759
2760 * elfxx-mips.c: Don't force symbols local unconditionally.
2761
2762 2003-05-28 Alan Modra <amodra@bigpond.net.au>
2763
2764 * elf32-hppa.c (elf32_hppa_relocate_section): Delete bogus
2765 undefined_symbol call.
2766
2767 2003-05-27 Richard Sandiford <rsandifo@redhat.com>
2768
2769 * elfxx-mips.c (mips_elf_hash_sort_data): Fix formattting.
2770 (mips_elf_link_hash_table): Likewise.
2771
2772 2003-05-22 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2773
2774 * elf64-mips.c (elf_mips_gnu_rel16_s2): Add internally used
2775 R_MIPS_GNU_REL16_S2 support.
2776 (bfd_elf64_bfd_reloc_type_lookup): Use it.
2777 (mips_elf64_rtype_to_howto): Use it.
2778 * elfn32-mips.c (elf_mips_gnu_rel16_s2): Add internally used
2779 R_MIPS_GNU_REL16_S2 support.
2780 (bfd_elf32_bfd_reloc_type_lookup): Use it.
2781 (mips_elf_n32_rtype_to_howto): Use it.
2782
2783 2003-05-21 Stuart F. Downing <sdowning@fame.com>
2784
2785 * som.h: Define PA_2_0 before including a.out.h
2786
2787 2003-05-07 Eric Christopher <echristo@redhat.com>
2788 Alexandre Oliva <aoliva@redhat.com>
2789
2790 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Adjust
2791 pic tests, change to warning.
2792 (_bfd_mips_elf_final_link): Remove EF_MIPS_CPIC flag setting.
2793
2794 2003-05-21 Marcus Comstedt <marcus@mc.pp.se>
2795
2796 * config.bfd: Check for a target triplet of shl-...-netbsdelf as
2797 well as shle-...-netbsdelf. Remove duplicate entry.
2798
2799 2003-05-21 Nick Clifton <nickc@redhat.com>
2800
2801 * elf32-xstormy16.c (xstormy16_elf_howto_table): Fix dst_mask
2802 for X_STORMY16_REL_12 reloc.
2803
2804 * elf.c (bfd_elf_get_needed_list): Use is_elf_hash_table to check
2805 the type of the hash table in the bfd_link_info structure.
2806 (bfd_elf_get_runpath_list): Likewise.
2807
2808 2003-05-19 Roland McGrath <roland@redhat.com>
2809
2810 * elf.c (bfd_elf_bfd_from_remote_memory): New function.
2811 * bfd-in.h: Declare it.
2812 * bfd-in2.h: Regenerated.
2813 * elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): New function.
2814 * elf-bfd.h (struct elf_backend_data): New function pointer member
2815 elf_backend_bfd_from_remote_memory.
2816 (_bfd_elf32_bfd_from_remote_memory, _bfd_elf64_bfd_from_remote_memory):
2817 Declare them.
2818 * elfxx-target.h (elf_backend_bfd_from_remote_memory): New macro.
2819 (elfNN_bed): Add that to the initializer.
2820
2821 2003-05-15 Roland McGrath <roland@redhat.com>
2822
2823 * elf.c (elfcore_grok_note): Grok NT_AUXV note, make ".auxv" section.
2824
2825 2003-05-20 Jakub Jelinek <jakub@redhat.com>
2826
2827 * elflink.h (elf_link_output_extsym): Only issue error about !=
2828 STV_DEFAULT symbols if they are bfd_link_hash_undefined.
2829
2830 2003-05-20 H.J. Lu <hongjiu.lu@intel.com>
2831
2832 * elflink.c (_bfd_elf_merge_symbol): Check ELF_LINK_DYNAMIC_DEF
2833 when removing the old definition for symbols with non-default
2834 visibility.
2835
2836 2003-05-18 Jason Eckhardt <jle@rice.edu>
2837
2838 * elf32-i860.c (elf32_i860_relocate_highadj): Simplify calculation.
2839
2840 2003-05-17 Andreas Schwab <schwab@suse.de>
2841
2842 * elf32-m68k.c (elf_m68k_check_relocs): Cache reloc section in
2843 elf_section_data during processing of pc-relative and absolute
2844 relocations.
2845 (elf_m68k_relocate_section): Use the cached reloc section instead
2846 of computing it again. Fix handling of visibility. Don't modify
2847 addend when copying over a relocation into the output.
2848
2849 2003-05-17 Alan Modra <amodra@bigpond.net.au>
2850
2851 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
2852 to trim plt entries. Move undefweak non-default visibility test..
2853 (allocate_dynrelocs): ..from here.
2854 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't test
2855 dynamic_sections_created here. Update comment. Move undefweak
2856 non-default visibility test..
2857 (allocate_dynrelocs): ..from here. Fix comment.
2858 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
2859 to trim plt entries. Move undefweak non-default visibility test..
2860 (allocate_dynrelocs): ..from here. Fix comment.
2861 * elflink.h (elf_link_output_extsym): Compare ELF_ST_VISIBILITY with
2862 STV_DEFAULT rather than comparing with zero.
2863 * elflink.c (_bfd_elf_merge_symbol): Likewise.
2864 (_bfd_elf_fix_symbol_flags): Likewise. Format comment.
2865
2866 2003-05-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2867
2868 * bfd.c (_bfd_get_gp_value): Prevent illegal access for abfd null
2869 pointers.
2870 (_bfd_set_gp_value): Likewise.
2871
2872 2003-05-16 Michael Snyder <msnyder@redhat.com>
2873 From Bernd Schmidt <bernds@redhat.com>
2874 * archures.c (bfd_mach_h8300sx): New.
2875 * bfd-in2.h: Regenerate.
2876 * cpu-h8300.c (h8300_scan)): Add support for h8300sx.
2877 (h8300sx_info_struct): New.
2878 (h8300s_info_struct): Link to it.
2879 * elf32-h8300.c (elf32_h8_mach): Add support for h8300sx.
2880 (elf32_h8_final_write_processing): Likewise.
2881 (elf32_h8_relax_section): Likewise.
2882
2883 2003-05-16 Kelley Cook <kelleycook@wideopenwest.com>
2884
2885 * config.bfd: Accept i[3-7]86 variants.
2886 * configure.host: Likewise.
2887 * configure.in: Likewise.
2888 * configure: Regenerate.
2889
2890 2003-05-15 H.J. Lu <hongjiu.lu@intel.com>
2891
2892 * elflink.c (_bfd_elf_fix_symbol_flags): Also hide protected
2893 symbol.
2894
2895 2003-05-15 H.J. Lu <hongjiu.lu@intel.com>
2896
2897 * elflink.h (elf_link_check_versioned_symbol): Also allow
2898 the base version.
2899
2900 2003-05-15 Alan Modra <amodra@bigpond.net.au>
2901 H.J. Lu <hongjiu.lu@intel.com>
2902
2903 * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL.
2904 (elf_i386_relocate_section): Likewise.
2905 * elf32-ppc.c (allocate_dynrelocs): Likewise.
2906 (ppc_elf_relocate_section): Likewise.
2907 * elf64-ppc.c (allocate_dynrelocs): Likewise.
2908 (ppc64_elf_relocate_section): Likewise.
2909
2910 2003-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2911
2912 * elf32-mips.c (gprel32_with_gp): Remove useless N64 ABI case.
2913
2914 2003-05-13 Stephane Carrez <stcarrez@nerim.fr>
2915
2916 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Check for
2917 processor capability, allow merge of HC12 and HCS12 in some cases.
2918 (m68hc11_elf_hash_table_create): Use bfd_malloc instead of bfd_zalloc.
2919 * cpu-m68hc12.c (bfd_m68hc12s_arch): New struct.
2920 (bfd_m68hc12_arch): Link it.
2921 (scan_mach): New function.
2922
2923 2003-05-13 Andrew Haley <aph@redhat.com>
2924
2925 * elf.c (bfd_elf_hash): Mask lower 32 bits of hash.
2926
2927 2003-05-13 Alan Modra <amodra@bigpond.net.au>
2928 H.J. Lu <hongjiu.lu@intel.com>
2929
2930 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Move from
2931 elf32-ppc.c. Add ELF_LINK_FORCED_LOCAL check.
2932 * elf32-ppc.c: (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Delete.
2933 (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for dynreloc check.
2934 (ppc_elf_relocate_section): Likewise.
2935 * elf64-ppc.c (allocate_dynrelocs): Likewise.
2936 (ppc64_elf_relocate_section): Likewise. Use for .got relocs too.
2937 (ppc64_elf_adjust_dynamic_symbol): Don't assume symbols with .plt
2938 relocs need no other types.
2939 * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for
2940 dynreloc check.
2941 (elf_i386_relocate_section): Likewise. Use for .got relocs too.
2942 (elf_i386_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL for
2943 .got relocs.
2944
2945 2003-05-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2946
2947 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): For weak symbols,
2948 copy ELF_LINK_NON_GOT_REF from weakdef.
2949 (allocate_dynrelocs): For undef weak syms with non-default
2950 visibility, a) don't allocate plt entries, b) don't allocate
2951 .got relocs, c) discard dyn rel space
2952 (sh_elf_relocate_section): d) don't generate .got relocs, e)
2953 don't generate dynamic relocs.
2954 (sh_elf_copy_indirect_symbol): Don't copy ELF_LINK_NON_GOT_REF
2955 for weakdefs when symbol already adjusted.
2956
2957 2003-05-12 Nick Clifton <nickc@redhat.com>
2958
2959 * elf32-xstormy16.c (xstormy16_elf_howto_table): use 'bitfield'
2960 overflow detection for R_XSTORMY16_16 reloc.
2961
2962 2003-05-12 Paul Clarke <paulc@senet.com.au>
2963
2964 * elf32-h8300.c: Fix typo in name of R_H8_DIR8 reloc.
2965
2966 2003-05-11 Jason Eckhardt <jle@rice.edu>
2967
2968 * elf32-i860.c (elf32_i860_relocate_highadj): Properly
2969 adjust upper bits.
2970 (elf32_i860_relocate_splitn): Obtain upper 5 bits from the
2971 proper place.
2972 (elf32_i860_relocate_pc16): Obtain upper 5 bits from the
2973 proper place.
2974
2975 2003-05-11 Andreas Schwab <schwab@suse.de>
2976
2977 * elf32-m68k.c (elf_m68k_relocate_section): Replace ugly
2978 complicated tests for unresolvable relocs with a simple direct
2979 scheme using "unresolved_reloc" var. Report some detail on
2980 bfd_reloc_outofrange and similar errors.
2981
2982 2003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
2983
2984 * elf32-s390.c (allocate_dynrelocs, elf_s390_relocate_section):
2985 Fix WILL_CALL_FINISH_DYNAMIC_SYMBOL call.
2986 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
2987 * elf64-s390.c: Likewise.
2988
2989 2003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
2990
2991 * elf32-s390.c (ELIMINATE_COPY_RELOCS): Define as one.
2992 (elf_s390_adjust_dynamic_symbol): For weak symbols, copy
2993 ELF_LINK_NON_GOT_REF from weakdef.
2994 (elf_s390_copy_indirect_symbol): Test whether the weakdef sym has
2995 already been adjusted before treating it specially.
2996 * el64-s390.c: Likwise.
2997
2998 2003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
2999
3000 * elf32-s390.c (allocate_dynrelocs): For undef weak syms with
3001 non-default visibility, a) don't make them dynamic, b) discard
3002 space for dynamic relocs.
3003 (elf_s390_relocate_section): Initialize the GOT entries and skip
3004 R_390_{8,16,32}/R_390_PC{16,16DBL,32DBL,32} for weak undefined
3005 symbols with non-default visibility.
3006 * elf64-s390.c: Likewise.
3007
3008 2003-05-09 Alan Modra <amodra@bigpond.net.au>
3009
3010 * cpu-arm.c (arm_check_note): Warning fix.
3011 * elf32-iq2000.c (iq2000_elf_check_relocs): Warning fixes. Arrange
3012 to keep relocs if edited.
3013 (iq2000_elf_print_private_bfd_data): Return TRUE.
3014 * elfxx-ia64.c (elfNN_ia64_relax_section): Use ELFNN_R_SYM, not
3015 ELF64_R_SYM.
3016 (elfNN_ia64_relax_ldxmov): Warning fix.
3017 * xtensa-isa.c (xtensa_add_isa): Warning fix.
3018 * xtensa-modules.c (get_num_opcodes): Warning fix.
3019
3020 2003-05-09 Andrey Petrov <petrov@netbsd.org>
3021
3022 * elf.c (elf_fake_sections): Use correct cast for sh_name.
3023
3024 2003-05-09 Alan Modra <amodra@bigpond.net.au>
3025
3026 * elflink.c (_bfd_elf_link_create_dynamic_sections): Move from
3027 elflink.h. Replace LOG_FILE_ALIGN with bed->s->log_file_align.
3028 (_bfd_elf_create_dynamic_sections): Use bed->s->log_file_align.
3029 (bfd_elf_record_link_assignment): Move from elflink.h.
3030 (_bfd_elf_merge_symbol): Likewise.
3031 (_bfd_elf_add_default_symbol): Likewise.
3032 (_bfd_elf_export_symbol): Likewise.
3033 (_bfd_elf_link_find_version_dependencies): Likewise.
3034 (_bfd_elf_link_assign_sym_version): Likewise.
3035 (_bfd_elf_link_read_relocs): Likewise.
3036 (_bfd_elf_link_size_reloc_section): Likewise.
3037 (_bfd_elf_fix_symbol_flags): Likewise.
3038 (_bfd_elf_adjust_dynamic_symbol): Likewise.
3039 (_bfd_elf_link_sec_merge_syms): Likewise.
3040 (elf_link_read_relocs_from_section): Likewise. Use bed->s->sizeof_rel
3041 and bed->s->sizeof_rela.
3042 (_bfd_elf_link_output_relocs): Likewise.
3043 * elf-bfd.h (struct elf_size_info): Rename file_align to
3044 log_file_align.
3045 (struct elf_info_failed): Move from elflink.h.
3046 (struct elf_assign_sym_version_info): Likewise.
3047 (struct elf_find_verdep_info): Likewise.
3048 (_bfd_elf_create_dynamic_sections): Delete duplicate declaration.
3049 (_bfd_elf_merge_symbol, _bfd_elf_add_default_symbol,
3050 _bfd_elf_export_symbol, _bfd_elf_link_find_version_dependencies,
3051 _bfd_elf_link_assign_sym_version,
3052 _bfd_elf_link_create_dynamic_sections, _bfd_elf_link_read_relocs,
3053 _bfd_elf_link_size_reloc_section, _bfd_elf_link_output_relocs,
3054 _bfd_elf_fix_symbol_flags, _bfd_elf_adjust_dynamic_symbol,
3055 _bfd_elf_link_sec_merge_syms): Declare.
3056 (bfd_elf32_link_create_dynamic_sections): Don't declare.
3057 (_bfd_elf32_link_read_relocs): Likewise.
3058 (bfd_elf64_link_create_dynamic_sections): Likewise.
3059 (_bfd_elf64_link_read_relocs): Likewise.
3060 * elflink.h: Move lots o' stuff elsewhere.
3061 * bfd-in.h (bfd_elf32_record_link_assignment): Don't declare.
3062 (bfd_elf64_record_link_assignment): Likewise.
3063 (bfd_elf_record_link_assignment): Declare.
3064 * bfd-in2.h: Regenerate.
3065 * elfcode.h (elf_link_create_dynamic_sections): Don't declare.
3066 (NAME(_bfd_elf,size_info)): Adjust for log_file_align.
3067 * elf.c (_bfd_elf_init_reloc_shdr): Adjust for bed->s->log_file_align.
3068 (assign_file_positions_for_segments): Likewise.
3069 (assign_file_positions_except_relocs): Likewise.
3070 (swap_out_syms, elfcore_write_note): Likewise.
3071 * elf-m10200.c: Adjust for changed function names.
3072 * elf-m10300.c: Likewise.
3073 * elf32-arm.h: Likewise.
3074 * elf32-h8300.c: Likewise.
3075 * elf32-hppa.c: Likewise.
3076 * elf32-ip2k.c: Likewise.
3077 * elf32-m32r.c: Likewise.
3078 * elf32-m68hc11.c: Likewise.
3079 * elf32-m68hc1x.c: Likewise.
3080 * elf32-m68k.c: Likewise.
3081 * elf32-mips.c: Likewise.
3082 * elf32-ppc.c: Likewise.
3083 * elf32-sh.c: Likewise.
3084 * elf32-v850.c: Likewise.
3085 * elf32-xtensa.c: Likewise.
3086 * elf64-alpha.c: Likewise.
3087 * elf64-hppa.c: Likewise.
3088 * elf64-mmix.c: Likewise.
3089 * elf64-ppc.c: Likewise.
3090 * elf64-sh64.c: Likewise.
3091 * elfxx-ia64.c: Likewise.
3092 * elfxx-mips.c: Likewise.
3093 (MIPS_ELF_LOG_FILE_ALIGN): Use log_file_align.
3094 * elf64-alpha.c (alpha_elf_size_info): Adjust for log_file_align.
3095 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
3096 * elf64-mips.c (mips_elf64_size_info): Likewise.
3097 * elf64-s390.c (s390_elf64_size_info): Likewise.
3098 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
3099
3100 2003-05-08 H.J. Lu <hongjiu.lu@intel.com>
3101
3102 * elflink.h (elf_add_default_symbol): After skipping the
3103 unversioned symbol, go to non-default one.
3104
3105 2003-05-07 H.J. Lu <hongjiu.lu@intel.com>
3106
3107 * elfxx-ia64.c (_bfd_elf_link_hash_hide_symbol): Also clear the
3108 want_plt field.
3109 (elfNN_ia64_relocate_section): Don't do dynamic symbol lookup
3110 for symbols with non-default visibility.
3111
3112 2003-05-07 H.J. Lu <hongjiu.lu@intel.com>
3113
3114 * elflink.h (elf_link_check_versioned_symbol): Also handle the
3115 case that a DSO references a hidden symbol which may be
3116 satisfied by a versioned symbol in another DSO.
3117 (elf_link_output_extsym): Check versioned definition for hidden
3118 symbol referenced by a DSO.
3119
3120 2003-05-07 Nick Clifton <nickc@redhat.com>
3121
3122 * elf32-xstormy16.c (xstormy16_elf_howto_table): Reset
3123 R_XSTORMY16_16 reloc to ignore overflows.
3124
3125 2003-05-06 Alexandre Oliva <aoliva@redhat.com>
3126
3127 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Improve
3128 error message for mixing different-endian files. Check for ABI
3129 compatibility of input files with the selected emulation.
3130
3131 2003-05-05 Alan Modra <amodra@bigpond.net.au>
3132
3133 * elf32-i386.c (allocate_dynrelocs): For undef weak syms with
3134 non-default visibility, a) don't make them dynamic, b) discard
3135 space for dynamic relocs.
3136 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
3137
3138 * elf32-ppc.c (allocate_dynrelocs): For undef weak syms with
3139 non-default visibility, a) don't allocate plt entries, b) don't
3140 allocate .got relocs, c) discard dyn rel space,
3141 (ppc_elf_relocate_section): d) don't generate .got relocs, e)
3142 don't generate dynamic relocs.
3143 * elf64-ppc.c (allocate_dynrelocs): As above.
3144 (ppc64_elf_relocate_section): As above.
3145
3146 2003-05-05 Andreas Jaeger <aj@suse.de>
3147
3148 * elf64-x86-64.c (allocate_dynrelocs): Don't allocate dynamic
3149 relocation entries for weak undefined symbols with non-default
3150 visibility.
3151 (elf64_x86_64_relocate_section): Initialize the GOT entries and
3152 skip R_386_32/R_386_PC32 for weak undefined symbols with
3153 non-default visibility.
3154
3155 2003-05-04 H.J. Lu <hjl@gnu.org>
3156
3157 * elf32-i386.c (allocate_dynrelocs): Don't allocate dynamic
3158 relocation entries for weak undefined symbols with non-default
3159 visibility.
3160 (elf_i386_relocate_section): Initialize the GOT entries and
3161 skip R_386_32/R_386_PC32 for weak undefined symbols with
3162 non-default visibility.
3163
3164 * elfxx-ia64.c (allocate_fptr): Don't allocate function
3165 descriptors for weak undefined symbols with non-default
3166 visibility.
3167 (allocate_dynrel_entries): Don't allocate relocation entries
3168 for symbols resolved to 0.
3169 (set_got_entry): Don't install dynamic relocation for weak
3170 undefined symbols with non-default visibility.
3171 (set_pltoff_entry): Likewise.
3172
3173 * elflink.h (elf_fix_symbol_flags): Hide weak undefined symbols
3174 with non-default visibility.
3175 (elf_link_output_extsym): Don't make weak undefined symbols
3176 with non-default visibility dynamic.
3177
3178 2003-05-04 H.J. Lu <hjl@gnu.org>
3179
3180 * elflink.h (elf_merge_symbol): Correctly handle weak definition.
3181
3182 2003-05-04 H.J. Lu <hjl@gnu.org>
3183
3184 * elflink.h (elf_merge_symbol): Don't record a hidden/internal
3185 symbol dynamic. Check indirection when removing the old
3186 definition for symbols with non-default visibility.
3187 (elf_add_default_symbol): Skip when told by elf_merge_symbol.
3188
3189 2003-05-02 Nick Clifton <nickc@redhat.com>
3190
3191 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make the
3192 R_XSTORMY16_8 and R_XSTORMY16_16 relocs detect and complain about
3193 unsigned overflow.
3194
3195 2003-05-02 Andreas Jaeger <aj@suse.de>
3196
3197 * elf64-x86-64.c (elf_x86_64_copy_indirect_symbol): Don't copy
3198 ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
3199 (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
3200 (elf_x86_64_adjust_dynamic_symbol): For weak symbols, copy
3201 ELF_LINK_NON_GOT_REF from weakdef.
3202
3203 2003-05-02 Charles Lepple <clepple@ghz.cc>
3204 Nick Clifton <nickc@redhat.com>
3205
3206 * acinclude.m4: Fix name of --enable-install-libbfd switch.
3207 * aclocal.m4: Regenerate.
3208 * configure: Regenerate.
3209 * Makefile.in: Regenerate.
3210
3211 2003-05-01 Alan Modra <amodra@bigpond.net.au>
3212
3213 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Test whether the
3214 weakdef sym has already been adjusted before treating it specially.
3215 * elf32-i386.c (elf_i386_copy_indirect_symbol): Don't copy
3216 ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
3217 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
3218 (ppc64_elf_check_relocs): Set ELF_LINK_NON_GOT_REF.
3219
3220 2003-04-28 H.J. Lu <hjl@gnu.org>
3221
3222 * elfxx-ia64.c (elfNN_ia64_relax_section): Relax ldxmov during
3223 the relax finalize pass.
3224
3225 * section.c (struct sec): Add need_finalize_relax and remove
3226 flag11.
3227 (STD_SECTION): Update struct sec initializer.
3228 * bfd-in2.h: Regenerated.
3229
3230 2003-04-28 H.J. Lu <hjl@gnu.org>
3231
3232 * elflink.h (elf_merge_symbol): Call elf_backend_copy_indirect_symbol
3233 to copy any information related to dynamic linking when we flip
3234 the indirection.
3235
3236 2003-04-27 H.J. Lu <hjl@gnu.org>
3237
3238 * elf-bfd.h (ELF_LINK_DYNAMIC_DEF): New.
3239 (ELF_LINK_DYNAMIC_WEAK): New.
3240
3241 * elflink.h (elf_merge_symbol): Add one argument to indicate if
3242 a symbol should be skipped. Ignore definitions in dynamic
3243 objects for symbols with non-default visibility.
3244 (elf_add_default_symbol): Adjusted.
3245 (elf_link_add_object_symbols): Check if a symbol should be
3246 skipped. Don't merge the visibility field with the one from
3247 a dynamic object.
3248 (elf_link_check_versioned_symbol): Use undef_bfd.
3249 (elf_link_output_extsym): Warn if a forced local symbol is
3250 referenced from dynamic objects. Make non-weak undefined symbol
3251 with non-default visibility a fatal error.
3252
3253 2003-04-27 Daniel Jacobowitz <drow@mvista.com>
3254
3255 * configure.in: Bump version on HEAD to 2.14.90.
3256 * configure: Regenerated.
3257
3258 2003-04-26 Stephane Carrez <stcarrez@nerim.fr>
3259
3260 PR savannah/3331:
3261 * elf32-m68hc11.c (m68hc11_elf_relax_section): Clear prev_insn_group
3262 when we couldn't relax something.
3263
3264 2003-04-25 Alan Modra <amodra@bigpond.net.au>
3265
3266 * elflink.h (elf_merge_symbol): When we find a regular definition
3267 for an indirect symbol, flip the indirection so that the old
3268 direct symbol now points to the new definition.
3269
3270 2003-04-24 Roland McGrath <roland@redhat.com>
3271
3272 * elf.c (bfd_section_from_phdr): Map PT_GNU_EH_FRAME to "eh_frame_hdr".
3273
3274 2003-04-24 Alan Modra <amodra@bigpond.net.au>
3275
3276 * elf32-ppc.c: Formatting and comment fixes.
3277 (ELIMINATE_COPY_RELOCS): Move before ppc_elf_copy_indirect_symbol.
3278 (ppc_elf_copy_indirect_symbol): Copy flags here for weakdefs.
3279
3280 2003-04-24 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
3281
3282 * archures.c (bfd_mach_h8300hn, bfd_mach_h8300sn): Added.
3283 * bfd-in2.h: Rebuilt.
3284 * coff-h8300.c (BADMAG): Add check for H8300HNBADMAG & H8300SNBADMAG.
3285 * coffcode.h (coff_set_arch_mach_hook): Add case for H8300HNMAGIC
3286 & H8300SNMAGIC.
3287 (coff_set_flags): Add case for bfd_mach_h8300hn & bfd_mach_h8300sn.
3288 * cpu-h8300.c (h8300_scan): Handle h8300hn, h8300sn.
3289 (h8300sn_info_struct, h8300hn_info_struct): New.
3290 * elf32-h8300.c (elf32_h8_mach): Handle case for h8300hn & h8300sn
3291 (elf32_h8_final_write_processing): Likewise.
3292
3293 2003-04-23 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3294
3295 * elf32-sh.c (tpoff): New.
3296 (struct elf_sh_dyn_relocs): Remove tls_tpoff32.
3297 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
3298 (allocate_dynrelocs): Don't make unnecessary dynamic TLS
3299 relocations. Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses.
3300 (sh_elf_relocate_section): Likewise. Remove unnecessary tests.
3301 (dtpoff_base): Fix wrong indentation.
3302 (sh_elf_check_relocs): Don't set DF_STATIC_TLS flag with non-TLS
3303 relocations. Don't set tls_tpoff32 flag. Don't make unnecessary
3304 R_SH_TLS_TPOFF32 relocations.
3305
3306 2003-04-23 J"orn Rennecke <joern.rennecke@superh.com>
3307
3308 * archures.c (enum bfd_architecture): Amend comment to refer to SuperH.
3309 * cpu-sh.c: Likewise.
3310 * elf32-sh.c: Likewise.
3311 * reloc.c (bfd_reloc_code_real): Likewise.
3312 * elf32-sh64-com.c: Change comment to refer to SuperH.
3313 * elf32-sh64.c: Likewise.
3314 * elf64-sh64.c: Likewise.
3315 * bfd-in2.h (enum bfd_architecture): Regenerate.
3316
3317 2003-04-23 Alan Modra <amodra@bigpond.net.au>
3318
3319 From Julien LEMOINE <speedblue@debian.org>
3320 * elf32-i386.c (elf_i386_info_to_howto): Delete.
3321 (elf_info_to_howto): Define as elf_i386_info_to_howto_rel.
3322
3323 2003-04-22 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
3324
3325 * archures.c: Replace references to Mitsubishi M32R with references
3326 to Renesas M32R.
3327 * relocs.c: Likewise.
3328 * bfd-in2.h: Regenerate.
3329
3330 2003-04-21 Richard Henderson <rth@redhat.com>
3331
3332 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Return false for an
3333 executable when a symbol is defined both regular and dynamic.
3334
3335 2003-04-21 Stephane Carrez <stcarrez@nerim.fr>
3336
3337 * Makefile.am (BFD32_BACKENDS): Add elf32-m68hc1x.lo.
3338 (elf32-m68hc1x.lo): Update dependencies
3339 * configure.in: Add elf32-m68hc1x.lo.
3340 * configure: Rebuild.
3341 * Makefile.in: Rebuild.
3342
3343 2003-04-21 Stephane Carrez <stcarrez@nerim.fr>
3344
3345 * elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
3346 (m68hc11_elf_hash_table_create): New function.
3347 (elf32_m68hc11_link_hash_table_free): New function.
3348 (stub_hash_newfunc): New function.
3349 (m68hc11_add_stub): New function.
3350 (elf32_m68hc11_add_symbol_hook): New function.
3351 (elf32_m68hc11_setup_section_lists): New function.
3352 (elf32_m68hc11_next_input_section): New function.
3353 (elf32_m68hc11_size_stubs): New function.
3354 (elf32_m68hc11_build_stubs): New function.
3355 (m68hc11_get_relocation_value): New function.
3356 (elf32_m68hc11_relocate_section): Call the above to redirect
3357 some relocations to the trampoline code.
3358 (m68hc11_elf_export_one_stub): New function.
3359 (m68hc11_elf_set_symbol): New function.
3360 (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse.
3361 (m68hc11_elf_get_bank_parameters): Get parameters only when the info
3362 is not yet initialized.
3363
3364 * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
3365 (elf32_m68hc11_stub_hash_entry): New struct.
3366 (m68hc11_page_info): Add trampoline handler address.
3367 (m68hc11_elf_link_hash_table): Add stubs generation members.
3368 (elf32_m68hc11_add_symbol_hook): Declare.
3369 (elf32_m68hc11_setup_section_lists): Declare.
3370 (elf32_m68hc11_size_stubs): Declare.
3371 (elf32_m68hc11_build_stubs): Declare.
3372
3373 * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c.
3374 (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise.
3375 (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto.
3376 (_bfd_m68hc11_elf_set_private_flags): Ditto.
3377 (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto.
3378 (_bfd_m68hc11_elf_print_private_bfd_data): Ditto.
3379 (bfd_elf32_bfd_link_hash_table_create): Define.
3380 (elf_backend_add_symbol_hook): Define.
3381 (m68hc11_elf_bfd_link_hash_table_create): New function.
3382 (m68hc11_elf_build_one_stub): New function.
3383 (m68hc11_elf_size_one_stub): New function.
3384 (m68hc11_elf_bfd_link_hash_table_create): Install the above.
3385 (bfd_elf32_bfd_link_hash_table_create): Define.
3386
3387 * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove.
3388 (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked.
3389 (m68hc12_phys_addr): Ditto.
3390 (m68hc12_phys_page): Ditto.
3391 (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c.
3392 (elf32_m68hc11_gc_mark_hook): Likewise.
3393 (elf32_m68hc11_gc_sweep_hook): Likewise.
3394 (elf32_m68hc11_check_relocs): Likewise.
3395 (elf32_m68hc11_relocate_section): Likewise.
3396 (_bfd_m68hc12_elf_set_private_flags): Likewise.
3397 (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise.
3398 (_bfd_m68hc12_elf_print_private_bfd_data): Likewise.
3399 (m68hc12_elf_build_one_stub): New function.
3400 (m68hc12_elf_size_one_stub): New function.
3401 (m68hc12_elf_bfd_link_hash_table_create): New function, use the above.
3402 (elf_backend_add_symbol_hook): Define.
3403 (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
3404
3405 2003-04-18 Nick Clifton <nickc@redhat.com>
3406
3407 * format.c (bfd_check_format_matches): Only check associated
3408 vector if the matching_vector has been created.
3409
3410 2003-04-15 Alexandre Oliva <aoliva@redhat.com>
3411
3412 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Fix typo in
3413 2003-04-09's change.
3414
3415 2003-04-15 Brian Ford <ford@vss.fsi.com>
3416
3417 * peicode.h (coff_swap_scnhdr_in): If a section holds
3418 uninitialized data and is from an object file or from an
3419 executable image that has not initialized the s_size field, or if
3420 the physical size is padded, use the virtual size (stored in
3421 s_paddr) instead.
3422
3423 2003-04-15 H.J. Lu <hjl@gnu.org>
3424
3425 * elflink.h (elf_link_add_object_symbols): Properly report
3426 filename for alignment reduction.
3427
3428 2003-04-15 Rohit Kumar Srivastava <rohits@kpitcummins.com>
3429
3430 * archures.c: Replace occurrances of 'Hitachi' with 'Renesas'.
3431 * reloc.c: Likewise.
3432 * coff-h8300.c: Likewise.
3433 * coff-h8500.c: Likewise.
3434 * coff-sh.c: Likewise.
3435 * cpu-h8300.c: Likewise.
3436 * cpu-sh.c: Likewise.
3437 * elf32-h8300.c: Likewise.
3438 * elf32-sh.c: Likewise.
3439 * elf32-sh64-com.c: Likewise.
3440 * elf32-sh64.c: Likewise.
3441 * elf64-sh64.c: Likewise.
3442 * bfd-in2.h: Regenerate.
3443
3444 2003-04-14 H.J. Lu <hjl@gnu.org>
3445
3446 * elflink.h (elf_link_add_object_symbols): Maintain maximum
3447 alignment for common symbols. Warn reducing alignment for
3448 common symbols. Report old filename when symbol size changes.
3449
3450 2003-04-12 Alexandre Oliva <aoliva@redhat.com>
3451
3452 * elfxx-mips.c (mips_elf_calculate_relocation): Adjust two other
3453 occurrences of the same test changed in the previous patch.
3454 Optimize.
3455
3456 2003-04-11 Alexandre Oliva <aoliva@redhat.com>
3457
3458 * elfxx-mips.c (mips_elf_get_global_gotsym_index): New.
3459 (mips_elf_calculate_relocation): Decay GOT_PAGE/GOT_OFST to
3460 GOT_DISP/addend only if the symbol got a global GOT entry.
3461
3462 2003-04-10 Alexandre Oliva <aoliva@redhat.com>
3463
3464 * elfxx-mips.c (mips_elf_calculate_relocation): Decay
3465 GOT_PAGE/GOT_OFST referencing overridable symbol to
3466 GOT_DISP/addend.
3467 (_bfd_mips_elf_check_relocs): Handle GOT_PAGE referencing
3468 global symbol as GOT_DISP.
3469
3470 2003-04-10 Bob Wilson <bob.wilson@acm.org>
3471
3472 * elf32-xtensa.c (elf_xtensa_relocate_section): Don't continue to the
3473 next relocation on an undefined symbol.
3474
3475 2003-04-09 Richard Henderson <rth@redhat.com>
3476
3477 * elf64-alpha.c (elf64_alpha_relocate_section) <R_ALPHA_GPREL32>:
3478 Ignore relocations against r_symndx == 0.
3479
3480 2003-04-09 H.J. Lu <hjl@gnu.org>
3481
3482 * elf64-alpha.c (elf64_alpha_relocate_section): Don't return
3483 FALSE for undefined symbols.
3484 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
3485
3486 2003-04-09 Alexandre Oliva <aoliva@redhat.com>
3487
3488 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Try DWARF3-standard
3489 and IRIX-specific shift-to-64-bit 4-byte lengths before following
3490 addr_size.
3491
3492 2003-04-08 Alexandre Oliva <aoliva@redhat.com>
3493
3494 * elf32-mips.c (bfd_elf32_bfd_reloc_type_lookup): Detect (ctor)
3495 pointer size from ABI, not arch_bits_per_address.
3496
3497 2003-04-07 Kevin Buettner <kevinb@redhat.com>
3498
3499 * elfn32-mips.c (elf32_mips_grok_prstatus): Adjust core file related
3500 constants for n32 ABI.
3501
3502 2003-04-06 Andrew Cagney <cagney@redhat.com>
3503
3504 * simple.c (bfd_simple_get_relocated_section_contents): Disable
3505 free that leads to GDB vs BFD memory corruption.
3506
3507 2003-04-04 Stephane Carrez <stcarrez@nerim.fr>
3508
3509 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Also adjust
3510 symbols that mark the end of the section.
3511 (m68hc11_elf_relax_section): Use R_M68HC11_PCREL_8 relocs when
3512 converting to a relative branch so that the offset is computed after
3513 the relaxation; also relocate a jsr into a bsr if possible but don't
3514 relax them if they are to a far symbol as we need to call the
3515 trampoline code.
3516 (elf_m68hc11_howto_table): Set pcrel_offset to true.
3517
3518 2003-04-04 Svein E. Seldal <Svein.Seldal@solidas.com>
3519
3520 * archures.c: Namespace cleanup. Rename bfd_mach_c3x to
3521 bfd_mach_tic3x and bfd_mach_c4x to bfd_mach_tic4x
3522 * bfd-in2.h: Regenerate
3523 * coff-tic4x.c: Namespace cleanup. Replace s/c4x/tic4x/
3524 * cpu-tic4x.c: Ditto
3525
3526 2003-04-03 Nick Clifton <nickc@redhat.com>
3527
3528 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Compute ps and ss
3529 differently for object files and executables.
3530 * peicode.h (coff_swap_scnhdr_in): Only set the s_size field
3531 for object files or for executables who have not already
3532 initialised the field.
3533 * libpei.h (bfd_pe_executable_p): New macro. Return true if
3534 the PE format bfd is an executable.
3535
3536 2003-04-03 Alan Modra <amodra@bigpond.net.au>
3537
3538 * elf32-ppc.c (ppc_elf_check_relocs): Don't use SYMBOL_REFERENCES_LOCAL
3539 here as it's too early to reliably determine locality.
3540 (ppc_elf_gc_sweep_hook): Likewise.
3541 (SYMBOL_REFERENCES_LOCAL): Expand comment.
3542
3543 2003-04-02 Bob Wilson <bob.wilson@acm.org>
3544
3545 * xtensa-modules.c: Remove comment indicating that this is a
3546 generated file.
3547
3548 2003-04-02 Alan Modra <amodra@bigpond.net.au>
3549
3550 * elfxx-mips.c (_bfd_mips_elf_hide_symbol): Test for NULL dynobj.
3551
3552 2003-04-01 Bob Wilson <bob.wilson@acm.org>
3553
3554 * Makefile.am (ALL_MACHINES): Add cpu-xtensa.lo.
3555 (ALL_MACHINES_CFILES): Add cpu-xtensa.c.
3556 (BFD32_BACKENDS): Add elf32-xtensa.lo, xtensa-isa.lo, and
3557 xtensa-modules.lo.
3558 (BFD32_BACKENDS_CFILES): Add elf32-xtensa.c, xtensa-isa.c, and
3559 xtensa-modules.c.
3560 (cpu-xtensa.lo): New target.
3561 (elf32-xtensa.lo): Likewise.
3562 (xtensa-isa.lo): Likewise.
3563 (xtensa-modules.lo): Likewise.
3564 * Makefile.in: Regenerate.
3565 * archures.c (bfd_architecture): Add bfd_{arch,mach}_xtensa.
3566 (bfd_archures_list): Add bfd_xtensa_arch.
3567 * config.bfd: Handle xtensa-*-*.
3568 * configure.in: Handle bfd_elf32_xtensa_{le,be}_vec.
3569 * configure: Regenerate.
3570 * reloc.c: Add BFD_RELOC_XTENSA_{RTLD,GLOB_DAT,JMP_SLOT,RELATIVE,
3571 PLT,OP0,OP1,OP2,ASM_EXPAND,ASM_SIMPLIFY}.
3572 * targets.c (bfd_elf32_xtensa_be_vec): Declare.
3573 (bfd_elf32_xtensa_le_vec): Likewise.
3574 (bfd_target_vector): Add bfd_elf32_xtensa_{be,le}_vec.
3575 * cpu-xtensa.c: New file.
3576 * elf32-xtensa.c: Likewise.
3577 * xtensa-isa.c: Likewise.
3578 * xtensa-modules.c: Likewise.
3579 * libbfd.h: Regenerate.
3580 * bfd-in2.h: Likewise.
3581
3582 2003-04-01 Nick Clifton <nickc@redhat.com>
3583
3584 * archures.c (bfd_mach_arm_unknown): Define.
3585 * bfd-in.h (bfd_arm_merge_machines, bfd_arm+update_notes,
3586 bfd_arm_get_mach_from_notes): Prototype.
3587 * bfd-in2.h: Regenerate.
3588 * coff-arm.c (coff_arm_merge_private_bfd_data): Call
3589 bfd_arm_merge_machines.
3590 (coff_arm_final_link_postscript): Call bfd_arm_update_notes.
3591 * coffcode.h (coff_set_arch_mach_hook): Call
3592 bfd_arm_get_mach_from_notes.
3593 * coffgen.c (coff_real_object_p): Revert previous delta.
3594 * cpu_arm.c (arm_check_note): New function. Examine a note in a
3595 .note section.
3596 (bfd_arm_merge_machines): New function: Handle the merging of ARM
3597 binaries compiled for different architectures..
3598 (bfd_arm_update_notes): New function: Update an ARM note section.
3599 (bfd_arm_get_mach_from_notes): New function: Extract a bfd machine
3600 number from an ARM note section.
3601 * elf32-arm.h (elf32_arm_object_p): Use
3602 bfd_arm_get_mach_from_notes.
3603 (elf32_arm_merge_private_bfd_data): Use bfd_arm_merge_machines.
3604 (elf32_arm_final_write_processing): Use bfd_arm_update_notes.
3605
3606 2003-04-01 Ben Elliston <bje@wasabisystems.com>
3607
3608 * dwarf2.c (read_attribute_value): Correct typo in comment.
3609
3610 2003-04-01 Nick Clifton <nickc@redhat.com>
3611
3612 * dwarf2.c (concat_filename): Use bfd_malloc() and strdup()
3613 instead of concat().
3614 (decode_line_info): Only free filename if it is not NULL.
3615 (add_line_info): Make a copy of the filename when storing it into
3616 the info structure.
3617
3618 2003-03-31 Andreas Schwab <schwab@suse.de>
3619 Daniel Jacobowitz <drow@mvista.com>
3620
3621 * simple.c (bfd_simple_get_relocated_section_contents): Add
3622 parameter symbol_table. Optionally use it instead of the symbol
3623 table from the bfd. Save and restore output offsets and output
3624 sections around bfd_get_relocated_section_contents. Fix a memory
3625 leak.
3626 (simple_save_output_info, simple_restore_output_info): New
3627 functions.
3628 * bfd-in2.h: Regenerate.
3629 * dwarf2.c (read_abbrevs): Use
3630 bfd_simple_get_relocated_section_contents instead of
3631 bfd_get_section_contents.
3632 (decode_line_info): Likewise.
3633 (_bfd_dwarf2_find_nearest_line): Likewise. Don't call
3634 find_rela_addend.
3635 (find_rela_addend): Remove.
3636 * elfxx-ia64.c (elfNN_ia64_reloc): Weaken sanity check for
3637 debugging sections.
3638 (elfNN_ia64_hash_table_create): Create the hash table with malloc,
3639 not bfd_zalloc.
3640
3641 2003-03-31 David Heine <dlheine@suif.stanford.edu>
3642
3643 * aoutx.h (aout_link_hash_table_create): Use bfd_malloc instead of
3644 bfd_alloc.
3645 * dwarf2.c (concat_filename): Always allocate space for the
3646 returned filename.
3647 (decode_line_info): Free the allocated filename returned by
3648 concat_filename.
3649 * elf-eh-frame.c (bfd_elf_write_section_eh_frame): Fix memory leaks.
3650 * elf.c (copy_private_bfd_data): Likewise.
3651 (_bfd_elf_slurp_version_tables): Fix bug freeing contents pointer.
3652 * elflink.h (elf_link_sort_relocs): Fix memory leak.
3653 * format.c (bfd_check_format_matches): Likewise.
3654 * linker.c (bfd_generic_final_link): Likewise.
3655 * opncls.c (find_separate_debug_info): Likewise.
3656 * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
3657
3658 2003-03-28 H.J. Lu <hjl@gnu.org>
3659
3660 * elflink.h (elf_link_add_object_symbols): Correctly combine
3661 visibilities.
3662
3663 2003-03-27 Jakub Jelinek <jakub@redhat.com>
3664
3665 * elfxx-ia64.c (elfNN_ia64_relax_section): Reset self_dtpmod_offset
3666 to -1 before recomputing got offsets.
3667
3668 2003-03-26 Andreas Schwab <schwab@suse.de>
3669
3670 * elf32-m68k.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
3671 (elf_m68k_relocate_section): Use it to correctly handle symbols
3672 forced to be local.
3673 (elf_m68k_finish_dynamic_symbol): Emit RELATIVE reloc for got
3674 entries for symbols that are forced to be local.
3675
3676 2003-03-25 Alexandre Oliva <aoliva@redhat.com>
3677
3678 * elfxx-mips.c (_bfd_mips_relax_section): New function.
3679 * elfxx-mips.h (_bfd_mips_relax_section): Declare.
3680 * elfn32-mips.c, elf64-mips.c: Use it.
3681
3682 2003-03-25 Stan Cox <scox@redhat.com>
3683 Nick Clifton <nickc@redhat.com>
3684
3685 Contribute support for Intel's iWMMXt chip - an ARM variant:
3686
3687 * archures.c: Add bfd_mach_arm_iWMMXt.
3688 * reloc.c: Add BFD_RELOC_ARM_CP_OFF_IMM_S2.
3689 * bfd-in2.h: Regenerate.
3690 * libbfd.h: Regenerate.
3691 * coff-arm.c (coff_arm_merge_private_bfd_data): Allow iWMMXt
3692 object files to be linked with XScale ones.
3693 (coff_arm_final_link_postscript): Update note section.
3694 * coffcode.h (coff_set_arch_mach_hook): Handle note section.
3695 * coffgen.c (coff_real_object_p): Call bfd_coff_set_arch_mach_hook
3696 after identifying a coff binary.
3697 * cpu-arm.c (processors): Add iWMMXt.
3698 (arch_inf): Likewise.
3699 * elf32-arm.h (arm_object_p): Handle note section.
3700 (elf32_arm_merge_private_bfd_data): Allow iWMMXt object files to
3701 be linked with XScale ones.
3702 (elf32_arm_section_flags): New function: Set flags on note section.
3703 (elf32_arm_final_write_processing): Handle note section.
3704
3705 2003-03-21 DJ Delorie <dj@redhat.com>
3706
3707 * elf32-xstormy16.c (elf32_xstormy16_relocate_section): Call
3708 _bfd_elf_rela_local_sym.
3709
3710 2003-03-20 H.J. Lu <hjl@gnu.org>
3711
3712 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't try relax for
3713 non-ELF outputs.
3714
3715 2003-03-20 Nick Clifton <nickc@redhat.com>
3716
3717 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Initialise $idata2 and
3718 $idata5 in case bfd_coff_final_link is not called.
3719
3720 2003-03-19 Jakub Jelinek <jakub@redhat.com>
3721
3722 * elf64-sparc.c (struct sparc64_elf_section_data): Add reloc_count
3723 field.
3724 (canon_reloc_count): Define.
3725 (sparc64_elf_slurp_one_reloc_table, sparc64_elf_slurp_reloc_table,
3726 sparc64_elf_canonicalize_dynamic_reloc): Use it instead of
3727 reloc_count.
3728 (sparc64_elf_canonicalize_reloc): New routine.
3729 (bfd_elf64_canonicalize_reloc): Define.
3730
3731 2003-03-18 Jakub Jelinek <jakub@redhat.com>
3732
3733 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle relaxation
3734 againt mergeable sections. Take r_addend into account when caching
3735 trampolines.
3736
3737 2003-03-18 Richard Henderson <rth@redhat.com>
3738
3739 * elfxx-ia64.c (get_dyn_sym_info): Return NULL gracefully for
3740 local symbols that have no dyninfo.
3741
3742 2003-03-14 Gene Smith <gene.smith@siemens.com>
3743
3744 * ieee.c (ieee_write_expression): Handle the case where symbol is
3745 NULL.
3746 General formatting improvements.
3747
3748 2003-03-13 Nick Clifton <nickc@redhat.com>
3749
3750 * configure.in (LINGUAS): Add zh_CN.
3751 * configure: Regenerate.
3752 * po/zh_CN.po: New file.
3753
3754 2003-03-13 Elias Athanasopoulos <elathan@phys.uoa.gr>
3755
3756 * aout-cris.c (BYTES_IN_WORD): Don't define.
3757 aout-encap.c: Likewise.
3758 aout-ns32k.c: Likewise.
3759 aout-tic30.c: Likewise.
3760 hp300bsd.c: Likewise.
3761 i386aout.c: Likewise.
3762 i386dynix.c: Likewise.
3763 i386linux.c: Likewise.
3764 i386lynx.c: Likewise.
3765 i386mach3.c: Likewise.
3766 m68k4knetbsd.c: Likewise.
3767 m68klinux.c: Likewise.
3768 m68klynx.c: Likewise.
3769 m68knetbsd.c: Likewise.
3770 m88kmach3.c: Likewise.
3771 mipsbsd.c: Likewise.
3772 newsos3.c: Likewise.
3773 sparclinux.c: Likewise.
3774 sparclynx.c: Likewise.
3775 sparcnetbsd.c: Likewise.
3776 vaxbsd.c: Likewise. Fix comment formatting.
3777
3778 2003-03-12 Alexandre Oliva <aoliva@redhat.com>
3779
3780 * Reverted 2003-03-02's patch.
3781
3782 * elfxx-target.h (bfd_elfNN_canonicalize_reloc): Make it
3783 overridable.
3784 * elf64-mips.c (mips_elf64_canonicalize_reloc,
3785 mips_elf64_get_dynamic_reloc_upper_bound,
3786 mips_elf64_canonicalize_dynamic_reloc): New, adapted from elf.c.
3787 (bfd_elf64_get_canonicalize_reloc,
3788 bfd_elf64_get_dynamic_reloc_upper_bound,
3789 bfd_elf64_canonicalize_dynamic_reloc): Define.
3790 (mips_elf64_slurp_reloc_table): Support dynamic.
3791 (mips_elf64_slurp_one_reloc_table): Adjust.
3792
3793 2003-03-12 Nick Clifton <nickc@redhat.com>
3794
3795 * xsym.c (bfd_sym_fetch_type_information_table_entry): Change
3796 'index' to 'offset' in test for zero value.
3797
3798 2003-03-11 Alexandre Oliva <aoliva@redhat.com>
3799
3800 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Do not create
3801 dynamic relocations pointing to local or section symbols, use the
3802 NULL symbol instead. Document the choice to not emit an
3803 additional R_MIPS_64 relocation.
3804
3805 2003-03-11 Alan Modra <amodra@bigpond.net.au>
3806
3807 * elf32-ppc.c (ppc_elf_relocate_section): Subtract tls seg vma from
3808 zero index dynamic tls relocs generated for the GOT. Tidy code.
3809 Set "relocation" to 1 on DTPMOD32 relocs. Optimize HA adjustment.
3810 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
3811
3812 2003-03-07 Alan Modra <amodra@bigpond.net.au>
3813
3814 * elf32-ppc.c (ppc_elf_relocate_section): Don't look for a nop after
3815 a tls_get_addr call.
3816
3817 * elf32-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
3818 (ppc_elf_adjust_dynamic_symbol): For weak symbols, copy
3819 ELF_LINK_NON_GOT_REF from weakdef.
3820 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
3821 (ppc64_elf_adjust_dynamic_symbol): For weak symbols, copy
3822 ELF_LINK_NON_GOT_REF from weakdef.
3823 * elf32-i386.c (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
3824 (elf_i386_adjust_dynamic_symbol): For weak symbols, copy
3825 ELF_LINK_NON_GOT_REF from weakdef.
3826
3827 2003-03-06 Jakub Jelinek <jakub@redhat.com>
3828 Andrew Haley <aph@redhat.com>
3829
3830 * elflink.h (elf_bfd_discard_info): Don't process eh frames if
3831 output is relocateable.
3832
3833 2003-03-06 Steven Konopa <skonopa@kgo.csc.com>
3834
3835 * som.c (som_fixup_formats): Correct formats for R_AUX_UNWIND and
3836 R_COMMENT.
3837
3838 2003-03-06 Alan Modra <amodra@bigpond.net.au>
3839
3840 * elf32-ppc.c (ppc_elf_create_linker_section): Don't capitalize
3841 error messages.
3842 (ELIMINATE_COPY_RELOCS): Define to zero.
3843 (ppc_elf_relocate_section): Don't deref htab->tls_sec when calculating
3844 TLSLD relocs. Report reloc types on a number of errors. Optimize
3845 LOCAL24PC check for non-local syms. Don't capitalize error messages.
3846 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define to zero.
3847 (ppc64_elf_relocate_section): Don't deref htab->tls_sec when
3848 calculating TLSLD relocs. Report reloc types on a number of errors.
3849 Don't capitalize error messages.
3850
3851 2003-03-03 H.J. Lu <hjl@gnu.org>
3852
3853 * elfxx-ia64.c (USE_BRL): Removed.
3854 (oor_ip): Removed.
3855
3856 2003-03-03 J"orn Rennecke <joern.rennecke@superh.com>
3857
3858 * elf32-sh.c (sh_elf_howto_tab): Make R_SH_IND12W into an ordinary
3859 relocation (no special function), and make it non-partial_inplace.
3860 (sh_elf_relax_section): When creating a bsr, use a consistent value
3861 no matter if the symbol is extern or not; set addend to -4.
3862 Don't swap load / non-load instructions for SH4.
3863 (sh_elf_relax_delete_bytes): In R_SH_IND12W case, check the offset
3864 rather than if the symbol is external to determine if adjusting the
3865 offset makes sense. Adjust the addend too if appropriate.
3866 (sh_elf_relocate_section): In R_SH_IND12W, don't fiddle with the
3867 relocation.
3868
3869 2003-03-03 Nick Clifton <nickc@redhat.com>
3870
3871 * po/da.po: Installed latest translation.
3872
3873 2003-03-02 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3874
3875 * elf32-mips.c (elf_mips_howto_table_rel): Change definition of
3876 R_MIPS_PC16 to rightshift 2.
3877 (elf_reloc_map mips_reloc_map): Map to rightshifted BFD reloc.
3878 (bfd_elf32_bfd_reloc_type_lookup): Support
3879 BFD_RELOC_MIPSEMB_16_PCREL_S2.
3880 * elf64-mips.c (mips_elf64_howto_table_rel): Change definition of
3881 R_MIPS_PC16 to rightshift 2.
3882 (mips_elf64_howto_table_rela): Likewise.
3883 (mips_reloc_map): Map to rightshifted BFD reloc.
3884 * elfn32-mips.c: The same as in elf64-mips.c.
3885 * elfxx-mips.c (mips_elf_got_for_ibfd): Typo in comment.
3886 (mips_elf_calculate_relocation): Handle rightshifted addends for
3887 R_MIPS_PC16.
3888 * reloc.c (BFD_RELOC_MIPSEMB_16_PCREL_S2): New BFD relocation for
3889 MIPS Embedded PIC. Remove superfluous empty COMMENT.
3890 * libbfd.h: Regenerate.
3891 * bfd-in2.h: Regenerate.
3892
3893 2003-02-28 Richard Henderson <rth@redhat.com>
3894
3895 * elfxx-ia64.c (elfNN_ia64_relax_section): Correct bounds
3896 for ltoff22x relaxation.
3897
3898 2003-03-01 Alan Modra <amodra@bigpond.net.au>
3899
3900 * bfd-in.h (_bfd): Don't define.
3901 * bfd.c: Rename occurrences of "struct _bfd" to "struct bfd".
3902 * syms.c: Likewise.
3903 * bfd-in2.h: Regenerate.
3904
3905 2003-02-27 Richard Henderson <rth@redhat.com>
3906
3907 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add want_gotx;
3908 (elfNN_ia64_check_relocs): Set it.
3909 (allocate_global_data_got): Check it.
3910 (allocate_local_got): Likewise.
3911 (allocate_dynrel_entries): Likewise.
3912 (elfNN_ia64_relax_ldxmov): New.
3913 (elfNN_ia64_relax_section): Handle LTOFF22X, LDXMOV.
3914 (elfNN_ia64_choose_gp): Split out from ...
3915 (elfNN_ia64_final_link): ... here.
3916
3917 2003-02-27 Andrew Cagney <cagney@redhat.com>
3918
3919 * bfd.c (struct bfd): Rename "struct _bfd".
3920 * bfd-in.h: Update copyright.
3921 (struct bfd): Rename "struct _bfd".
3922 (_bfd): Define for backward compatibility.
3923 * bfd-in2.h: Regenerate.
3924
3925 2003-02-25 Alan Modra <amodra@bigpond.net.au>
3926
3927 * elflink.h (elf_bfd_final_link): Apportion reloc counts to rel_hdr
3928 and rel_hdr2 when initially counting input relocs rather than after
3929 creating output reloc sections.
3930 (elf_link_read_relocs_from_section): Don't abort with wrong reloc
3931 sizes.
3932
3933 * Makefile.am: Run "make dep-am".
3934 * Makefile.in: Regenerate.
3935
3936 2003-02-24 Kris Warkentin <kewarken@qnx.com>
3937
3938 * elf.c (elfcore_read_notes): Add check for QNX style core file.
3939 (elfcore_grog_nto_note): New function.
3940 (elfcore_grog_nto_gregs): New function.
3941 (elfcore_grog_nto_status): New function.
3942
3943 2003-02-24 Alan Modra <amodra@bigpond.net.au>
3944
3945 * elflink.c (_bfd_elf_create_got_section): Check existing .got
3946 section flags before concluding that we've already been called.
3947 Don't use register keyword.
3948 (_bfd_elf_create_dynamic_sections): Don't use register keyword.
3949 (_bfd_elf_create_linker_section): Formatting.
3950
3951 2003-02-20 jmc <jmc@prioris.mini.pw.edu.pl>
3952
3953 * coff-h8300.c: Fix typo: intial -> initial.
3954 * coff-ppc.c: Likewise.
3955
3956 2003-02-20 Alan Modra <amodra@bigpond.net.au>
3957
3958 * elf32-ppc.c: Formatting.
3959 (allocate_dynrelocs): LD and GD relocs against the same sym need
3960 separate GOT entries.
3961 (ppc_elf_relocate_section): Correct GOT handling for multiple GOT
3962 entries per symbol.
3963
3964 2003-02-19 Alan Modra <amodra@bigpond.net.au>
3965
3966 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Simplify dynamic reloc
3967 removal. Localize vars. Remove unnecessary dynobj test.
3968 * elf32-i386 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead
3969 of INFO.
3970 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
3971 and optimize.
3972 (elf_i386_relocate_section): Likewise.
3973 (elf_i386_gc_sweep_hook): Simplify dyn reloc removal. Localize vars.
3974 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
3975 * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
3976 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
3977 * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
3978 * elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise. Remove
3979 local_dynrel for section too. Don't touch HIPLT22, LOPLT10, PCPLT32
3980 or PCPLT10 relocs. Don't subtract twice on PLT32 relocs.
3981 Formatting.
3982
3983 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define.
3984 (ppc64_elf_check_relocs): Use it. Correct comment. Move SEC_ALLOC
3985 test.
3986 (ppc64_elf_adjust_dynamic_symbol): Use ELIMINATE_COPY_RELOCS.
3987 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
3988 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
3989 and optimize. Use ELIMINATE_COPY_RELOCS.
3990 (ppc64_elf_relocate_section): Likewise.
3991
3992 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Add pc_count field.
3993 (ppc_elf_copy_indirect_symbol): Copy pc_count field.
3994 (ELIMINATE_COPY_RELOCS): Define.
3995 (ppc_elf_adjust_dynamic_symbol): Convert copy relocs to dynamic.
3996 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
3997 (MUST_BE_DYN_RELOC): Define.
3998 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
3999 and optimize. Trim dyn_relocs.
4000 (ppc_elf_check_relocs): Don't generate dyn_relocs when we know they'll
4001 not be used. Do generate dyn_relocs for copy reloc avoidance. Keep
4002 track of pc_rel dyn relocs.
4003 (ppc_elf_relocate_section): Remove "will_become_local". Adjust
4004 WILL_CALL_FINISH_DYNAMIC_SYMBOL use. Trim dyn relocs as per
4005 allocate_dynrelocs. Don't recalculate "sec".
4006
4007 2003-02-18 Alan Modra <amodra@bigpond.net.au>
4008
4009 * elf32-ppc.c (ppc_elf_relocate_section): Remove unnecessary test.
4010 * elf64-ppc.c (ppc64_elf_tls_optimize): Decrement tlsld_got.refcount
4011 on invalid LD relocs.
4012 (allocate_dynrelocs): Invalid LD relocs don't use tlsld_got entry.
4013 (ppc64_elf_relocate_section): Unify new handling of LD relocs and
4014 tlsld_got entry. Use IS_PPC64_TLS_RELOC.
4015
4016 * elf32-ppc.h: New file.
4017 * elf32-ppc.c: Include elf32-ppc.h.
4018 (NOP, CROR_151515, CROR_313131, TP_OFFSET, DTP_OFFSET): Define.
4019 (struct ppc_elf_link_hash_entry): Rename "root" to "elf". Adjust uses.
4020 Add "tls_mask" field.
4021 (TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL, TLS_TLS, TLS_TPRELGD): Define.
4022 (struct ppc_elf_link_hash_table): Rename "root" to "elf". Adjust uses.
4023 Add got, relgot, plt, relplt, dynbss, relbss, dynsbss, relsbss,
4024 sdata, sdata2, tls_sec, tls_get_addr, tlsld_got fields.
4025 Make use of htab shortcuts throughout file.
4026 (ppc_elf_link_hash_newfunc): Init tls_mask field.
4027 (ppc_elf_link_hash_table_create): Init new fields.
4028 (ppc_elf_copy_indirect_symbol): Copy tls_mask.
4029 (ppc_elf_howto_raw): Add tls relocs.
4030 (ppc_elf_reloc_type_lookup): Handle them.
4031 (ppc_elf_unhandled_reloc): New function.
4032 (ppc_elf_create_got): Stash got section pointer in hash table,
4033 return status. Make .rela.got too.
4034 (ppc_elf_create_dynamic_sections): Stash section pointers in htab.
4035 (ppc_elf_adjust_dynamic_symbol): Only set up copy relocs when
4036 NON_GOT_REF set. Don't allocate space in .plt here..
4037 (allocate_dynrelocs): ..do so here instead, properly ref-counting and
4038 not allocating plt entries unnecessarily. Allocate got entries here.
4039 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
4040 (ppc_elf_size_dynamic_sections): Allocate local got entries. Pass
4041 "info" during allocate_dynrelocs hash traversal. Use htab section
4042 shortcuts rather than searching for named sections. Get rid of
4043 "plt" and "strip" booleans.
4044 (update_local_sym_info, bad_shared_reloc): New functions.
4045 (ppc_elf_check_relocs): Handle TLS relocs. Move .rela.got creation to
4046 ppc_elf_create_got. Don't mark got or plt reloc syms dynamic, do so
4047 in allocate_dynreloc. Use update_local_sym_info and bad_shared_reloc.
4048 Disallow R_PPC_EMB_RELSDA, R_PPC_EMB_NADDR32, R_PPC_EMB_NADDR16,
4049 R_PPC_EMB_NADDR16_LO, R_PPC_EMB_NADDR16_HI and R_PPC_EMB_NADDR16_HA
4050 in shared libs. R_PPC_PLTREL32 is a plt reloc too. Refcount all
4051 relocs that might use a plt entry. Set NON_GOT_REF too.
4052 Enumerate all do-nothing relocs.
4053 (ppc_elf_gc_sweep_hook): Simplify removal of dynrelocs. Handle
4054 tls relocs and all plt relocs.
4055 (ppc_elf_tls_setup, ppc_elf_tls_optimize): New functions.
4056 (ppc_elf_finish_dynamic_symbol): Don't build got entries here.
4057 (ppc_elf_finish_dynamic_sections): Rewrite tag code using htab
4058 shortcuts.
4059 (ppc_elf_relocate_section): Tidy. Handle TLS relocs. Use
4060 bfd_elf_local_sym_name. Simplify unresolved reloc code. Build got
4061 entries and got relocs here. Warn on non-zero got reloc addend.
4062 Split out branch taken/not taken reloc code into a separate switch
4063 and correct offset calculation. Allow BRTAKEN/BRNTAKEN dynamic relocs.
4064 Split out HA reloc adjustments to separate switch statement. Don't
4065 warn on reloc overflow if we've already warned about undefined.
4066 Don't rebuild sym name when reporting errors. Report all possible
4067 errors from _bfd_final_link_relocate.
4068 (bfd_elf32_bfd_final_link): Don't define.
4069
4070 2003-02-18 Alan Modra <amodra@bigpond.net.au>
4071
4072 * elf64-ppc.c (ppc64_elf_relocate_section): Don't init "r". Don't
4073 rebuild sym name when reporting errors.
4074
4075 2003-02-17 Nick Clifton <nickc@redhat.com>
4076
4077 * elflink.h (elf_link_output_extsym): Only check
4078 allow_shlib_undefined for shared libraries.
4079 * elf32-i386.c (elf_i386_relocate_section): Remove bogus check
4080 of allow_shlib_undefined.
4081 * elf32-cris.c (cris_elf_relocate_section): Likewise.
4082 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
4083 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
4084 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
4085 * elf32-s390.c (elf_s390_relocate_section): Likewise.
4086 * elf32-sh.c (sh_elf_relocate_section): Likewise.
4087 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
4088 * elf32-vax.c (elf_vax_relocate_section): Likewise.
4089 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
4090 * elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
4091 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
4092 * elf64-s390.c (elf_s390_relocate_section): Likewise.
4093 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
4094 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
4095 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
4096 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
4097
4098 2003-02-17 Nick Clifton <nickc@redhat.com>
4099
4100 * elf.c (SEGMENT_AFTER_SEGMENT): Add third parameter - the
4101 address field to use in the comparison.
4102 (SEGMENT_OVERLAPS): Check that LMAs overlap as well.
4103
4104 2003-02-14 Bob Wilson <bob.wilson@acm.org>
4105
4106 * elfcore.h (elf_core_file_p): Compare alternate machine codes for ELF
4107 backends when checking if the generic ELF target should be used.
4108
4109 * syms.c (_bfd_stab_section_find_nearest_line): For line number stabs
4110 outside of functions, treat values as absolute addresses.
4111
4112 * bfd.c: Change embedded documentation to use consistent indentation
4113 and to split up long lines. Change informal style of description
4114 for functions lacking real documentation.
4115 * coffcode.h: Break up long lines in embedded documentation.
4116 * format.c: Likewise.
4117 * targets.c: Likewise.
4118 * libcoff.h: Regenerate.
4119 * bfd-in2.h: Regenerate.
4120
4121 2003-02-14 Alan Modra <amodra@bigpond.net.au>
4122
4123 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Init tls_get_addr.
4124 (ppc64_elf_copy_indirect_symbol): Merge tls_mask too.
4125 (ppc64_elf_gc_sweep_hook): Simplify removal of dyn_relocs.
4126 (allocate_dynrelocs): Don't treat undefined and undefweak specially.
4127 (ppc_size_one_stub): Fix warning, and tighten plt entry check.
4128 (group_sections): Don't share a stub section if stubs are for a large
4129 section. Adjust comment.
4130 (ppc64_elf_size_stubs): Roughly double the size left for stubs if
4131 !stubs_always_before_branch.
4132 (ppc64_elf_relocate_section): Initialize tlsld GOT entry once. Don't
4133 treat undefined and undefweak specially when processing dyn relocs.
4134
4135 2003-02-13 Jakub Jelinek <jakub@redhat.com>
4136
4137 * elflink.h (elf_link_add_object_symbols): Handle .symver x, x@FOO.
4138
4139 2003-02-13 Nick Clifton <nickc@redhat.com>
4140
4141 * elf32-arm.h (elf32_thumb_to_arm_stub): Include section VMAs
4142 in computation of offset to insert into BL instruction.
4143
4144 2003-02-11 Uwe Stieber <uwe@wwws.de>
4145
4146 * config.bfd: Add support for kaOS as cross build target system.
4147
4148 2003-02-11 Alan Modra <amodra@bigpond.net.au>
4149
4150 * elf64-ppc.c (ppc64_elf_check_relocs): Match versioned
4151 .__tls_get_addr too.
4152 (ppc64_elf_tls_setup): Ensure cached tls_get_addr is not indirect.
4153
4154 2003-02-10 Kaz kojima <kkojima@rr.iij4u.or.jp>
4155
4156 * elf32-sh.c (elf_sh_dyn_relocs): Add tls_tpoff32 field.
4157 (elf_sh_link_hash_entry): Remove tls_tpoff32 field.
4158 (sh_elf_link_hash_newfunc): Remove the initialization of
4159 tls_tpoff32 field.
4160 (allocate_dynrelocs): Keep dyn_relocs if it includes the entry
4161 for which tls_tpoff32 flag is set.
4162 (sh_elf_relocate_section): Covert to LE only if the dyn_relocs
4163 of the symbol includes the entry matched with the input_section
4164 and having tls_tpoff32 flag on. When linking statically, set
4165 symbol index of R_SH_TLS_TPOFF32 relocation to zero if the symbol
4166 is defined in this executable.
4167 (sh_elf_check_relocs): Set tls_tpoff32 flag appropriately.
4168
4169 2003-02-10 Jakub Jelinek <jakub@redhat.com>
4170
4171 * elf32-s390.c (elf_s390_size_dynamic_sections): Set relocs to TRUE
4172 even if there is just non-empty .rela.plt.
4173
4174 2003-02-10 Nick Clifton <nickc@redhat.com>
4175
4176 * archures.c (bfd_mach_arm_ep9312): Define.
4177 * bfd-in2.h: Regenerate.
4178 * cpu-arm.c (processors[]): Add ep9312.
4179 (bfd_arm_arch): Add ep9312.
4180 * elf32-arm.h (elf32_arm_merge_private_data): Update error
4181 messages and add test for Maverick floating point support.
4182 (elf32_arm_print_private_bfd_data): Handle
4183 EF_ARM_MAVERICK_FLOAT flag.
4184 (elf32_arm_object_p): New function.
4185 (elf_backend_object_p): Define.
4186
4187 2003-02-10 Alan Modra <amodra@bigpond.net.au>
4188
4189 * elf64-ppc.c: Rename assorted occurrences of tls_type and similar
4190 variables, structure fields or function params to tls_mask or
4191 similar to better reflect usage.
4192 (struct got_entry): Comment.
4193 (struct ppc_link_hash_entry): Expand comment, and renumber TLS_*.
4194 (get_tls_mask): Rename from get_tls_type.
4195
4196 2003-02-09 Alan Modra <amodra@bigpond.net.au>
4197
4198 * elf64-ppc.c (TLS_GD_LD): Don't define..
4199 (TLS_GD): ..define this instead and update all uses.
4200 (TLS_TPRELGD): Define.
4201 (ppc64_elf_link_hash_table_create): Tweak initialization of
4202 init_refcount and init_offset.
4203 (ppc64_elf_check_relocs): Add one extra element to t_symndx array.
4204 Mark second slot of GD or LD toc entries.
4205 (get_tls_type): Return an int. Distinguish toc GD and LD entries
4206 from other tls types.
4207 (ppc64_elf_tls_setup): New function, split out from..
4208 (ppc64_elf_tls_optimize): ..here. Don't optimize when symbols are
4209 defined in a dynamic object. Fix LD optimization. Don't set TLS_TPREL
4210 on GD->IE optimization, use TLS_TPRELGD instead. Use get_tls_type
4211 return value to properly decide whether toc GD and LD entries can
4212 optimize away __tls_get_addr call. Check next reloc after DTPMOD64
4213 to determine GD or LD rather than looking at TLS_LD flag. Don't
4214 attempt to adjust got entry tls_type here..
4215 (allocate_dynrelocs): ..instead, adjust got entry tls_type here, and
4216 look for possible merges.
4217 (ppc64_elf_size_dynamic_sections): Adjust local got entries for
4218 optimization.
4219 (ppc64_elf_size_stubs): Tweak __tls_get_addr fudge.
4220 (ppc64_elf_relocate_section): Rename some vars to better reflect usage.
4221 Make use of return value from get_tls_type to properly detect GD and
4222 LD optimizations. Split tlsld/gd hi/ha from lo/ds case. Don't
4223 handle tls_get_addr removal when looking at REL24 relocs, do it when
4224 looking at the previous reloc. Check reloc after DTPMOD64 to determine
4225 GD or LD.
4226 * elf64-ppc.h (ppc64_elf_tls_setup): Declare.
4227
4228 2003-02-08 Alan Modra <amodra@bigpond.net.au>
4229
4230 * elf32-hppa.c (group_sections): Don't share a stub section if
4231 stubs are for a large section.
4232
4233 * elf32-hppa.c (elf32_hppa_size_stubs): Double the size left for
4234 stubs if !stubs_always_before_branch.
4235
4236 2003-02-07 Nick Clifton <nickc@redhat.com>
4237
4238 * elf.c (swap_out_syms): Generate an error message if an
4239 equivalent output section cannot be found for a symbol.
4240
4241 2003-02-07 Jakub Jelinek <jakub@redhat.com>
4242
4243 * elf64-alpha.c (elf64_alpha_relax_section): Don't crash if
4244 local_got_entries is NULL.
4245
4246 2003-02-06 Andreas Schwab <schwab@suse.de>
4247
4248 * elf-eh-frame.c (get_DW_EH_PE_signed): Define.
4249 (read_value): Add parameter is_signed, use signed extraction if
4250 the value is signed.
4251 (_bfd_elf_write_section_eh_frame): Pass signed flag of the
4252 encoding to read_value.
4253
4254 2003-02-06 Alan Modra <amodra@bigpond.net.au>
4255
4256 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy got and
4257 plt info when called to transfer weak sym info.
4258
4259 2003-02-05 Alan Modra <amodra@bigpond.net.au>
4260
4261 * reloc.c: Add PPC and PPC64 TLS relocs.
4262 * libbfd.h: Regenerate.
4263 * bfd-in2.h: Regenerate.
4264 * elf64-ppc.c (TP_OFFSET, DTP_OFFSET): Declare.
4265 (ppc64_elf_howto_raw): Add TLS howto's. Adjust R_PPC64_NONE to be
4266 against a 32 bit field.
4267 (ppc64_elf_reloc_type_lookup): Handle TLS relocs.
4268 (_ppc64_elf_section_data): Add t_symndx and comments.
4269 (ppc64_elf_section_data): Use elf_section_data macro.
4270 (ppc64_elf_new_section_hook): American spelling.
4271 (struct got_entry, struct plt_entry): New.
4272 (MUST_BE_DYN_RELOC): Rename from IS_ABSOLUTE_RELOC.
4273 (struct ppc_stub_hash_entry): Add "addend" field.
4274 (struct ppc_link_hash_entry): Add "tls_type".
4275 (TLS_TLS, TLS_GD_LD, TLS_LD, TLS_TPREL, TLS_DTPREL,
4276 TLS_EXPLICIT): Define.
4277 (struct ppc_link_hash_table): Add tls_sec, tls_get_addr, tlsld_got.
4278 (link_hash_newfunc): Init new fields.
4279 (ppc64_elf_link_hash_table_create): Likewise. Set init_refcount and
4280 init_offset to NULL.
4281 (ppc64_elf_copy_indirect_symbol): Copy got and plt info. Don't call
4282 _bfd_elf_link_hash_copy_indirect, rather insert relevant code from
4283 there.
4284 (update_local_sym_info, update_plt_info): New functions.
4285 (ppc64_elf_check_relocs): Use them. Handle TLS relocs. Adjust GOT
4286 handling to use got.glist rather than got.refcount. Likewise for PLT.
4287 (ppc64_elf_gc_sweep_hook): Handle TLS relocs, new GOT and PLT lists.
4288 (func_desc_adjust): Adjust for new PLT list.
4289 (ppc64_elf_adjust_dynamic_symbol): Likewise.
4290 (get_sym_h, get_tls_type): New functions.
4291 (ppc64_elf_edit_opd): Remove unused variable. Use get_sym_h.
4292 (ppc64_elf_tls_optimize): New function.
4293 (allocate_dynrelocs): Adjust for new PLT and GOT lists. Allocate
4294 TLS relocs.
4295 (ppc64_elf_size_dynamic_sections): Likewise.
4296 (ppc_type_of_stub): Adjust for new PLT list.
4297 (ppc_build_one_stub): Likewise.
4298 (ppc64_elf_size_stubs): Likewise. Use get_sym_h. Treat __tls_get_addr
4299 calls specially.
4300 (ppc64_elf_relocate_section): Adjust for new GOT and PLT lists. Handle
4301 TLS relocs. Report local syms using bfd_elf_local_sym_name. Don't
4302 init GOT entries that have a reloc. Generate GOT relocs here..
4303 (ppc64_elf_finish_dynamic_symbol): ..not here. Adjust for PLT list.
4304 * elf64-ppc.h (ppc64_elf_tls_optimize): Declare.
4305
4306 2003-02-04 Andreas Schwab <schwab@suse.de>
4307
4308 * elf32-m68k.c (elf_m68k_hash_entry): Define.
4309 (elf_m68k_link_hash_traverse): Remove.
4310 (elf_m68k_link_hash_newfunc): Use struct bfd_hash_entry and
4311 elf_m68k_hash_entry instead of struct elf_m68k_link_hash_entry to
4312 reduce casting.
4313 (elf_m68k_check_relocs): Use elf_m68k_hash_entry instead of
4314 casting.
4315 (elf_m68k_size_dynamic_sections): Use elf_link_hash_traverse
4316 instead of elf_m68k_link_hash_traverse.
4317 (elf_m68k_discard_copies): Change first parameter to pointer to
4318 struct elf_link_hash_entry and use elf_m68k_hash_entry when struct
4319 elf_m68k_link_hash_entry is needed.
4320
4321 2003-02-04 Alan Modra <amodra@bigpond.net.au>
4322
4323 * elf-bfd.h (struct got_entry, struct plt_entry): Forward declare.
4324 (struct elf_link_hash_entry): Add "glist" and "plist" fields to
4325 "got" union, and declare as gotplt_union. Use gotplt_uinion for
4326 "plt" field.
4327 (struct elf_link_hash_table): Make "init_refcount" a gotplt_union.
4328 Add "init_offset" field.
4329 (struct elf_obj_tdata <local_got>): Add "struct got_entry **" to union.
4330 (elf_local_got_ents): Declare.
4331 * elf.c (_bfd_elf_link_hash_newfunc): Adjust initialization of "got"
4332 and "plt".
4333 (_bfd_elf_link_hash_hide_symbol): Use "init_offset".
4334 (_bfd_elf_link_hash_table_init): Set "init_offset".
4335 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set init_refcount
4336 from init_offset.
4337 (elf_adjust_dynamic_symbol): Set plt and got offsets using init_offset.
4338
4339 * elf.c (bfd_elf_local_sym_name): Split out from..
4340 (group_signature): ..here.
4341 * elf-bfd.h (bfd_elf_local_sym_name): Declare.
4342
4343 2003-02-04 Alan Modra <amodra@bigpond.net.au>
4344
4345 * elf-bfd.h (enum elf_link_info_type): Remove.
4346 (struct bfd_elf_section_data): Move sec_info_type, use_rela_p fields
4347 to struct sec. Remove linkonce_p field.
4348 (elf_linkonce_p): Delete.
4349 (elf_discarded_section): Update for sec_info_type change.
4350 * section.c (struct sec): Add sec_info_type, use_rela_p, has_tls_reloc,
4351 flag11, flag12, flag13, flag14, flag15, flag16, flag20, flag24.
4352 (ELF_INFO_TYPE_NONE): Define.
4353 (ELF_INFO_TYPE_STABS): Define.
4354 (ELF_INFO_TYPE_MERGE): Define.
4355 (ELF_INFO_TYPE_EH_FRAME): Define.
4356 (ELF_INFO_TYPE_JUST_SYMS): Define.
4357 (STD_SECTION): Update struct sec initializer.
4358 * ecoff.c (bfd_debug_section): Likewise.
4359 * elf.c: Likewise. Update occurrences of sec_info_type and use_rela_p.
4360 * elflink.h: Likewise.
4361 * elf-eh-frame.c: Likewise.
4362 * elf64-alpha.c: Likewise.
4363 * elfxx-ia64.c: Likewise.
4364 * elfxx-mips.c: Likewise.
4365 * bfd-in2.h: Regenerate.
4366
4367 * elf32-sparc.c (sec_do_relax): Use elf_section_data macro rather than
4368 referring to used_by_bfd.
4369 * elf64-sparc.c (sec_do_relax): Likewise.
4370 * elf64-mmix.c (mmix_elf_section_data): Likewise.
4371 * elfxx-mips.c (mips_elf_section_data): Likewise.
4372 * ieee.c (ieee_slurp_section_data): Use ieee_per_section macro.
4373 (ieee_get_section_contents): Likewise.
4374 (ieee_new_section_hook): Formatting.
4375 (ieee_canonicalize_reloc): Remove commented out code.
4376 * mmo.c (mmo_section_data): Define. Use throughout file.
4377 * oasys.c (oasys_get_section_contents): Use oasys_per_section macro.
4378
4379 2003-01-31 Graydon Hoare <graydon@redhat.com>
4380
4381 * Makefile.am (opncls.lo): Add dependency upon libiberty.h.
4382 * Makefile.in: Regenerate.
4383 * opncls.c (calc_crc32, get_debug_link_info,
4384 seperate_debug_file_exists, find_seperate_debug_file): New
4385 internal functions.
4386 (bfd_follow_gnu_debuglink): New function. Follow the pointer
4387 contained inside a .gnu_debuglink section.
4388 * bfd-in2.h: Regenerate.
4389
4390 2003-01-29 Alexandre Oliva <aoliva@redhat.com>
4391
4392 * elfxx-mips.c (mips_elf_got_entry_hash): Don't dereference
4393 entry->abfd when it's NULL.
4394
4395 2003-01-27 Alexandre Oliva <aoliva@redhat.com>
4396
4397 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Handle
4398 _bfd_elf_section_offset returning -2 the same way as -1.
4399
4400 * elfxx-mips.c (mips_elf_multi_got): New function.
4401 (struct mips_got_entry): Make symndx and gotidx signed. Moved
4402 addend into union along with address and link hash entry.
4403 (struct mips_got_info): Added bfd2got and next.
4404 (struct mips_elf_hash_sort_data): Added max_unref_got_dynindx.
4405 (mips_elf_got_section, mips_elf_create_got_section): Use
4406 SEC_EXCLUDE bit to tell whether we really need the got
4407 section. Take boolean arguments to disregard an excluded
4408 section, or to create it as excluded. Adjust all callers.
4409 Use mips_elf_got_section all over.
4410 (mips_elf_local_got_index, mips_elf_got_page,
4411 mips_elf_got16_entry): Take input bfd as argument, and pass it
4412 on to mips_elf_create_local_got_entry.
4413 (mips_elf_global_got_index, mips_elf_create_local_got_entry):
4414 Take input bfd as argument, and manage entries in the
4415 appropriate GOT.
4416 (mips_elf_got_offset_from_index): Take input bfd as argument,
4417 and use it to adjust the GP offset of the bfd.
4418 (mips_elf_sort_hash_table, mips_elf_sort_hash_table_f): Move
4419 unreferenced GOT entries of global symbols to the end.
4420 (mips_elf_record_global_got_symbol): Take input bfd as
4421 argument. Add entries to the master GOT hash table.
4422 (struct mips_elf_bfd2got_hash): New.
4423 (struct mips_elf_got_per_bfd_arg): New.
4424 (struct mips_elf_set_global_got_offset_arg): New.
4425 (mips_elf_hash_bfd_vma, mips_elf_multi_got_entry_hash,
4426 mips_elf_multi_got_entry_eq, mips_elf_bfd2got_entry_hash,
4427 mips_elf_bfd2got_entry_eq, mips_elf_make_got_per_bfd,
4428 mips_elf_merge_gots, mips_elf_set_global_got_offset,
4429 mips_elf_resolve_final_got_entry,
4430 mips_elf_resolve_final_got_entries, mips_elf_adjust_gp,
4431 mips_elf_got_for_ibfd): New functions.
4432 (ELF_MIPS_GP_OFFSET): Don't depend on SGI_COMPAT.
4433 (MIPS_ELF_GOT_MAX_SIZE): New macro.
4434 (STUB_LW): Generate 64-bit stub regardless of SGI_COMPAT.
4435 (mips_elf_got_entry_hash): Take new fields into account. Use
4436 mips_elf_hash_bfd_vma.
4437 (mips_elf_got_entry_eq): Take new fields into account.
4438 (mips_elf_create_got_section): Initialize new fields.
4439 (mips_elf_calculate_relocation): Pass input_bfd to functions
4440 that now take it. Adjust gp for the input_bfd.
4441 (mips_elf_allocate_dynamic_relocation,
4442 mips_elf_create_dynamic_relocation,
4443 _bfd_mips_elf_create_dynamic_sections): Use...
4444 (mips_elf_rel_dyn_section): New function. Borrow code from...
4445 (_bfd_mips_elf_check_relocs): Pass input_bfd to functions that
4446 now take it. Create the got section if needed, even if
4447 excluded, before recording a global got symbol. Move some
4448 code to...
4449 (mips_elf_record_local_got_symbol): New fn.
4450 (_bfd_mips_elf_size_dynamic_sections): Disable combreloc.
4451 Compute multi-got global entries offsets. Move GOT code to...
4452 (_bfd_mips_elf_always_size_sections): Call mips_elf_multi_got
4453 if the GOT is too big.
4454 (_bfd_mips_elf_finish_dynamic_symbol): Set got entry of
4455 undefweak symbol to zero. Generate dynamic relocations for
4456 non-primary GOT entries for global symbols.
4457 (_bfd_mips_elf_finish_dynamic_sections): Handle multi-got
4458 case. Generate dynamic relocations for local got entries.
4459 Sort dynamic relocations on N64 too, using...
4460 (sort_dynamic_relocs_64): New fns.
4461 (_bfd_mips_elf_hide_symbol): Adjust multi-got counters.
4462 (_bfd_mips_elf_merge_private_bfd_data): Ignore EF_MIPS_XGOT.
4463
4464 2003-01-27 Alexandre Oliva <aoliva@redhat.com>
4465
4466 * bfd.c (struct _bfd): Added id field.
4467 * opncls.c (_bfd_id_counter): New static variable.
4468 (_bfd_new_bfd): Use it.
4469 * bfd-in2.h: Rebuilt.
4470
4471 2003-01-25 Alan Modra <amodra@bigpond.net.au>
4472
4473 * elf32-sparc.c (bfd_elf32_new_section_hook): Define.
4474
4475 2003-01-25 Jakub Jelinek <jakub@redhat.com>
4476
4477 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Add TLS relocs.
4478 (elf32_sparc_rev32_howto): New variable.
4479 (sparc_reloc_map): Add TLS relocs.
4480 (elf32_sparc_reloc_type_lookup, elf32_sparc_info_to_howto):
4481 Handle REV32.
4482 (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc, elf32_sparc_mkobject):
4483 New functions.
4484 (struct elf32_sparc_dyn_relocs, struct elf32_sparc_link_hash_entry,
4485 struct elf32_sparc_link_hash_table):
4486 New structures.
4487 (elf32_sparc_tdata, elf32_sparc_local_got_tls_type,
4488 elf32_sparc_hash_table): Define.
4489 (link_hash_newfunc, elf32_sparc_link_hash_table_create,
4490 create_got_section, elf32_sparc_create_dynamic_sections,
4491 elf32_sparc_copy_indirect_symbol, elf32_sparc_tls_transition): New
4492 functions.
4493 (elf32_sparc_check_relocs): Handle TLS relocs. Add dynamic reloc
4494 reference counting.
4495 (elf32_sparc_gc_sweep_hook): Likewise.
4496 (elf32_sparc_adjust_dynamic_symbol): Likewise.
4497 (elf32_sparc_size_dynamic_sections): Likewise.
4498 (elf32_sparc_relocate_section): Likewise.
4499 (allocate_dynrelocs, readonly_dynrelocs, dtpoff_base, tpoff):
4500 New functions.
4501 (elf32_sparc_object_p): Allocate backend private object data.
4502 (bfd_elf32_bfd_link_hash_table_create,
4503 elf_backend_copy_indirect_symbol, bfd_elf32_mkobject,
4504 elf_backend_can_refcount): Define.
4505 (elf_backend_create_dynamic_sections): Define to
4506 elf32_sparc_create_dynamic_sections.
4507 * reloc.c: Add SPARC TLS relocs.
4508 * bfd-in2.h, libbfd.h: Rebuilt.
4509 * elf64-sparc.c (sparc64_elf_howto_table): Add TLS relocs.
4510 (sparc_reloc_map): Likewise.
4511
4512 2003-01-24 Martin Schwidefsky <schwidefsky@de.ibm.com>
4513
4514 * bfd-in2.h: Regenerate.
4515 * elf32-s390.c (elf_s390_mkobject, elf_s390_tls_transition,
4516 s390_tls_reloc, dtpoff_base, tpoff, invalid_tls_insn): New functions.
4517 (elf_howto_table): Add TLS relocs.
4518 (elf_s390_reloc_type_lookup): Likewise.
4519 (elf_s390_link_hash_entry): Add tls_type.
4520 (elf_s390_hash_entry, elf_s390_obj_tdata, elf_s390_local_got_tls_type):
4521 New macros.
4522 (elf_s390_link_hash_table): Add tls_ldm_got.
4523 (link_hash_newfunc): Initialize tls_type.
4524 (elf_s390_link_hash_table_create): Initialize refcount of tls_ldm_got.
4525 (elf_s390_copy_indirect_symbol): Copy tls_type information.
4526 (elf_s390_check_relocs): Support TLS relocs.
4527 (elf_s390_gc_sweep_hook): Likewise.
4528 (allocate_dynrelocs): Likewise.
4529 (elf_s390_size_dynamic_sections): Likewise.
4530 (elf_s390_relocate_section): Likewise.
4531 (elf_s390_finish_dynamic_symbol): Likewise.
4532 (bfd_elf32_mkobject): Define for TLS.
4533 * elf64-s390.c: Same changes as for elf32-s390.c.
4534 * libbfd.h: Regenerate.
4535 * reloc.c: Add s390 TLS relocations.
4536
4537 2003-01-24 Charles Lepple <clepple@ghz.cc>
4538
4539 * aclocal.m4: Fix name of --enable-install-libbfd switch.
4540
4541 2003-01-23 Nick Clifton <nickc@redhat.com>
4542
4543 * Add sh2e support:
4544 2002-04-02 Elena Zannoni <ezannoni@redhat.com>
4545 * archures.c (bfd_mach_sh2e): Added.
4546 * bfd-in2.h: Rebuilt.
4547 * cpu-sh.c (arch_info_struct): Added SH2e.
4548 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle EF_SH2E.
4549
4550 2003-01-23 Alan Modra <amodra@bigpond.net.au>
4551
4552 * elf-bfd.h (struct bfd_elf_section_data): Remove tdata. Change
4553 dynindx to an int. Rearrange for better packing.
4554 * elf.c (_bfd_elf_new_section_hook): Don't alloc if already done.
4555 * elf32-mips.c (bfd_elf32_new_section_hook): Define.
4556 * elf32-sh64.h: New. Split out from include/elf/sh.h.
4557 (struct _sh64_elf_section_data): New struct.
4558 (sh64_elf_section_data): Don't dereference sh64_info (was tdata).
4559 * elf32-sh64-com.c: Include elf32-sh64.h.
4560 * elf32-sh64.c: Likewise.
4561 (sh64_elf_new_section_hook): New function.
4562 (bfd_elf32_new_section_hook): Define.
4563 (sh64_elf_fake_sections): Adjust for sh64_elf_section_data change.
4564 (sh64_bfd_elf_copy_private_section_data): Likewise.
4565 (sh64_elf_final_write_processing): Likewise.
4566 * elf32-sparc.c (struct elf32_sparc_section_data): New.
4567 (elf32_sparc_new_section_hook): New function.
4568 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
4569 (sec_do_relax): Define.
4570 (elf32_sparc_relax_section): Adjust to use sec_do_relax.
4571 (elf32_sparc_relocate_section): Likewise.
4572 * elf64-mips.c (bfd_elf64_new_section_hook): Define.
4573 * elf64-mmix.c (struct _mmix_elf_section_data): New.
4574 (mmix_elf_section_data): Define. Use throughout file.
4575 (mmix_elf_new_section_hook): New function.
4576 (bfd_elf64_new_section_hook): Define.
4577 * elf64-ppc.c (struct _ppc64_elf_section_data): New.
4578 (ppc64_elf_section_data): Define. Use throughout.
4579 (ppc64_elf_new_section_hook): New function.
4580 (bfd_elf64_new_section_hook): Define.
4581 * elf64-sparc.c (struct sparc64_elf_section_data): New.
4582 (sparc64_elf_new_section_hook): New function.
4583 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
4584 (sec_do_relax): Define.
4585 (sparc64_elf_relax_section): Adjust to use sec_do_relax.
4586 (sparc64_elf_relocate_section): Likewise.
4587 (bfd_elf64_new_section_hook): Define.
4588 * elfn32-mips.c (bfd_elf32_new_section_hook): Define.
4589 * elfxx-mips.c (struct _mips_elf_section_data): New.
4590 (mips_elf_section_data): Define. Use throughout.
4591 (_bfd_mips_elf_new_section_hook): New function.
4592 (mips_elf_create_got_section): Don't alloc used_by_bfd.
4593 * elfxx-mips.h (_bfd_mips_elf_new_section_hook): Declare.
4594 * elfxx-target.h (bfd_elfNN_new_section_hook): Add #ifndef.
4595 * Makefile.am: Run "make dep-am".
4596 * Makefile.in: Regenerate.
4597
4598 2003-01-21 Richard Henderson <rth@redhat.com>
4599
4600 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_PLT_LOC): New.
4601 (struct alpha_elf_link_hash_entry): Add plt_old_section, plt_old_value.
4602 (elf64_alpha_adjust_dynamic_symbol): Set them.
4603 (elf64_alpha_size_plt_section_1): Reset them when plt entry removed.
4604 (elf64_alpha_relax_tls_get_addr): Handle LDM relocs. Frob the
4605 symbol index when relaxing LDM to TPREL.
4606 (elf64_alpha_relax_section): Likewise. Allow relaxation of GD
4607 relocs, even if the target isn't locally defined.
4608 (elf64_alpha_check_relocs): Frob LDM reloc symndx to zero.
4609 (elf64_alpha_relocate_section): Likewise. Force TP-relative
4610 relocs vs symndx 0 to the tp base.
4611
4612 2003-01-21 Fabio Alemagna <falemagn@aros.org>
4613
4614 * config.bfd: Handle i[3456]86-*-aros*.
4615
4616 2003-01-21 Andreas Schwab <schwab@suse.de>
4617
4618 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Define.
4619 (struct ppc_elf_link_hash_entry): Define.
4620 (ppc_elf_hash_entry): New function.
4621 (struct ppc_elf_link_hash_table): Define.
4622 (ppc_elf_hash_table): New function.
4623 (ppc_elf_link_hash_newfunc): New function.
4624 (ppc_elf_link_hash_table_create): New function.
4625 (ppc_elf_copy_indirect_symbol): New function.
4626 (allocate_dynrelocs): New function.
4627 (readonly_dynrelocs): New function.
4628 (ppc_elf_size_dynamic_sections): Allocate space for dynamic
4629 relocs and determine DT_TEXTREL.
4630 (ppc_elf_check_relocs): Don't do that here, just count the
4631 dynamic relocs.
4632 (ppc_elf_gc_sweep_hook): Discard any dynamic relocs against the
4633 removed section.
4634 (bfd_elf32_bfd_link_hash_table_create): Define.
4635 (elf_backend_copy_indirect_symbol): Define.
4636
4637 2003-01-21 Richard Henderson <rth@redhat.com>
4638
4639 * elf64-alpha.c (alpha_dynamic_entries_for_reloc): GOTTPREL and
4640 TPREL also get a reloc if shared. Remove SREL support.
4641 (elf64_alpha_emit_dynrel): New.
4642 (elf64_alpha_relocate_section): Use it. Resolve dynamic TPREL
4643 and GOTTPREL relocs to local symbols against the tp base.
4644 (elf64_alpha_finish_dynamic_symbol): Use elf64_alpha_emit_dynrel.
4645
4646 * elf64-alpha.c (elf64_alpha_relax_got_load): Decrement got
4647 use count before clobbering r_type.
4648 (elf64_alpha_relax_tls_get_addr): Don't use pos[1] if insn
4649 ordering would mean dataflow inspection is necessary.
4650
4651 2003-01-20 Svein E. Seldal <Svein.Seldal@solidas.com>
4652
4653 * coffcode.h (coff_set_flags): Added get/set arch hooks.
4654
4655 2003-01-20 Fabio Alemagna <falemagn@aros.org>
4656
4657 * elf32-sh.c: Treat elfNN_bed like other macros defined in
4658 elfxx-target.h and #undef it before #define'ing it.
4659 * elf32-i386.c: Likewise.
4660 * elf32-sh64.c: Likewise.
4661 * elf64-alpha.c: Likewise.
4662 * elf64-sh64.c: Likewise.
4663
4664 2003-01-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
4665
4666 * bfd-in2.h: Regenerate.
4667 * elf32-s390.c (elf_s390_adjust_gotplt): New prototype.
4668 (elf_howto_table): Rename R_390_GOTOFF to R_390_GOTOFF32. Add
4669 R_390_GOTOFF16, R_390_GOTOFF64, R_390_GOTPLT12, R_390_GOTPLT16,
4670 R_390_GOTPLT32, R_390_GOTPLT64, R_390_GOTPLTENT, R_390_PLTOFF16,
4671 R_390_PLTOFF32 and R_390_PLTOFF64.
4672 (elf_s390_reloc_type_lookup): Likewise.
4673 (struct elf_s390_link_hash_entry): Add gotplt_refcount to keep track
4674 of GOTPLT references to a function.
4675 (link_hash_newfunc): Initialize gotplt_refcount.
4676 (elf_s390_check_relocs): Move allocation of local_got_refcounts array
4677 and creation of the got section out of the main switch. Add support
4678 for the gotoff, gotplt and pltoff relocations.
4679 (elf_s390_gc_sweep_hook): Add reference counting for gotoff, gotplt
4680 and pltoff.
4681 (elf_s390_adjust_gotplt): New function.
4682 (elf_s390_adjust_dynamic_symbol): Adjust gotplt refcount for removed
4683 plt entries.
4684 (allocate_dynrelocs): Add comment.
4685 (elf_s390_relocate_section): Change r_type to unsigned. Add support
4686 for gotoff, gotplt and pltoff relocations.
4687 * elf64-s390.c: Same changes as for elf32-s390.c.
4688 * libbfd.h: Regenerate.
4689 * reloc.c: Add BFD_RELOC_390_GOTOFF64, BFD_RELOC_390_GOTPLT12,
4690 BFD_RELOC_390_GOTPLT16, BFD_RELOC_390_GOTPLT32, BFD_RELOC_390_GOTPLT64,
4691 BFD_RELOC_390_GOTPLTENT, BFD_RELOC_390_PLTOFF16, BFD_RELOC_390_PLTOFF32
4692 and BFD_RELOC_390_PLTOFF64.
4693
4694 2003-01-18 Jakub Jelinek <jakub@redhat.com>
4695
4696 * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle
4697 R_IA64_TPREL64[LM]SB against non-global symbol properly.
4698
4699 2003-01-16 Jakub Jelinek <jakub@redhat.com>
4700
4701 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add
4702 self_dtpmod_done and self_dtpmod_offset.
4703 (allocate_global_data_got): Only use one got entry for all
4704 dtpmod relocs against local symbols.
4705 (allocate_dynrel_entries): Only need .rela.got entry for
4706 dtpmod against global symbol.
4707 (elfNN_ia64_size_dynamic_sections): Initialize self_dtpmod_offset.
4708 Reserve space in .rela.got for the local dtpmod entry.
4709 (set_got_entry): Initialize the common local dtpmod .got entry.
4710 (elfNN_ia64_relocate_section): Handle R_IA_64_DTPREL64LSB
4711 and R_IA_64_DTPREL64MSB.
4712
4713 2003-01-16 Alan Modra <amodra@bigpond.net.au>
4714
4715 * elf64-ppc.c: Include elf/ppc64.h rather than elf/ppc.h.
4716 (R_PPC_*): Rename all occurrences to R_PPC64_*.
4717 (R_PPC64_ADDR30): Rename all occurrences to R_PPC64_REL30.
4718 (enum elf_ppc_reloc_type): Ditto to enum elf_ppc64_reloc_type.
4719 (ppc64_elf_gc_sweep_hook): Handle R_PPC64_REL30 along with other
4720 relative relocs, not with absolute ones.
4721 * Makefile.am: Run "make dep-am".
4722 * Makefile.in: Regenerate.
4723 * po/SRC-POTFILES.in: Regenerate.
4724
4725 2003-01-15 Andreas Schwab <schwab@suse.de>
4726
4727 * elf32-ppc.c (ppc_elf_check_relocs): Don't set DF_TEXTREL for a
4728 relocation against a non-allocated readonly section.
4729
4730 2003-01-10 Alan Modra <amodra@bigpond.net.au>
4731
4732 * elf32-ppc.c (ppc_elf_relocate_section): Adjust addend for GOT16_HA.
4733 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. PLTGOT16_HA too.
4734
4735 2002-01-08 Klee Dienes <kdienes@apple.com>
4736
4737 * Makefile.am (ALL_MACHINES): Use cpu-msp430.lo, not cpu-msp430.c.
4738 (BFD32_BACKENDS): Use elf32-msp430.lo, not elf32-msp430.c.
4739 * Makefile.in: Regenerate.
4740
4741 2003-01-08 Alexandre Oliva <aoliva@redhat.com>
4742
4743 * elfn32-mips.c (prev_reloc_section): New.
4744 (GET_RELOC_ADDEND): Use it. Parenthesize macro arguments.
4745 (SET_RELOC_ADDEND): Parenthesize macro argument.
4746
4747 2003-01-07 John David Anglin <dave.anglin@nrc.gc.ca>
4748
4749 * elf32-hppa.c (final_link_relocate): For all DP relative relocations,
4750 adjust addil instructions if the symbol has no section.
4751
4752 2003-01-07 DJ Delorie <dj@redhat.com>
4753
4754 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make REL_12 not
4755 partial_inplace.
4756
4757 2003-01-07 Andreas Schwab <schwab@suse.de>
4758
4759 * elf32-m68k.c (elf_m68k_check_relocs): Don't set DF_TEXTREL for
4760 PC relative relocations.
4761 (elf_m68k_discard_copies): Set it here instead.
4762
4763 2002-01-02 Ben Elliston <bje@redhat.com>
4764 Jeff Johnston <jjohnstn@redhat.com>
4765
4766 * Makefile.am (ALL_MACHINES): Add cpu-iq2000.lo.
4767 (ALL_MACHINES_CFILES): Add cpu-iq2000.c.
4768 (BFD32_BACKENDS): Add elf32-iq2000.lo.
4769 (BFD32_BACKENDS_CFILES): Add elf32-iq2000.c.
4770 (cpu-iq2000.lo): New target.
4771 * Makefile.in: Regenerate.
4772 * config.bfd: Handle iq2000-*-elf.
4773 * archures.c (bfd_architecture): Add bfd_{arch,mach}_iq2000.
4774 (bfd_archures_list): Add bfd_iq2000_arch.
4775 * configure.in: Handle bfd_elf32_iq2000_vec.
4776 * configure: Regenerate.
4777 * reloc.c: Add BFD_RELOC_IQ2000_OFFSET_16, BFD_RELOC_IQ2000_OFFSET_21,
4778 and BFD_RELOC_IQ2000_UHI16.
4779 * targets.c (bfd_elf32_iq2000_vec): Declare.
4780 (bfd_target_vector): Add bfd_elf32_iq2000_vec.
4781 * elf.c (prep_headers): Set e_machine to EM_IQ2000.
4782 * cpu-iq2000.c: New file.
4783 * elf32-iq2000.c: Likewise.
4784 * libbfd.h: Regenerate.
4785 * bfd-in2.h: Likewise.
4786
4787 2003-01-02 Richard Sandiford <rsandifo@redhat.com>
4788
4789 * elfxx-mips.c: Include libiberty.h.
4790 (elf_mips_isa, _bfd_mips_elf_mach_extends_p): Remove.
4791 (mips_set_isa_flags): New function, split out from...
4792 (_bfd_mips_elf_final_write_processing): ...here. Only call
4793 mips_set_isa_flags if the EF_MIPS_MACH bits are clear.
4794 (mips_mach_extensions): New array.
4795 (mips_32bit_flags_p): New function.
4796 (_bfd_mips_elf_merge_private_bfd_data): Rework architecture checks.
4797 Use mips_32bit_flags_p to check if one binary is 32-bit and the
4798 other is 64-bit. When adopting IBFD's architecture, adopt the
4799 bfd_mach as well as the flags.
4800
4801 2003-01-02 Nick Kelsey <nickk@ubicom.com>
4802
4803 * elf32-ip2k.c: Re-work of linker relaxation code for the ip2k to
4804 fix internal errors, fix bad code generation, fix incorrect stabs
4805 information, and improve ability to eliminate redundant page
4806 instructions. Added code to ip2k_final_link_relocate to self-verify
4807 the linker relaxation. Fix formatting problems.
4808
4809 2002-12-30 Chris Demetriou <cgd@broadcom.com>
4810
4811 * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mipsisa32r2 case.
4812 * archures.c (bfd_mach_mipsisa32r2): New define.
4813 * bfd-in2.h: Regenerate.
4814 * cpu-mips.c (I_mipsisa32r2): New enum value.
4815 (arch_info_struct): Add entry for I_mipsisa32r2.
4816 * elfxx-mips.c (elf_mips_isa, _bfd_elf_mips_mach)
4817 (_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_32R2.
4818 (_bfd_mips_elf_final_write_processing): Add
4819 bfd_mach_mipsisa32r2 case.
4820 (_bfd_mips_elf_merge_private_bfd_data): Handle merging of
4821 binaries marked as using MIPS32 Release 2.
4822
4823 2002-12-30 Dmitry Diky <diwil@mail.ru>
4824
4825 * Makefile.am: Add msp430 target.
4826 * configure.in: Likewise.
4827 * Makefile.in: Regenerate.
4828 * configure: Regenerate.
4829 * archures.c: Add msp430 architecture vector.
4830 * config.bfd: Likewise.
4831 * reloc.c: Add msp430 relocs.
4832 * targets.c: Add msp320 target.
4833 * cpu-msp430.c: New file: msp430 cpu detection.
4834 * elf32-msp430.c: New file: msp430 reloc processing.
4835 * bfd-in2.h: Regenerate.
4836 * libbfd.h: Regenerate.
4837
4838 2002-12-28 Jakub Jelinek <jakub@redhat.com>
4839
4840 * elf.c (elf_sort_sections): Don't reorder .tbss.
4841 (assign_file_positions_for_segments): Only adjust off/voff
4842 for increased alignment in PT_LOAD or PT_NOTE segment,
4843 but adjust p_filesz for .tbss too. in PT_LOAD consider
4844 .tbss to have zero memory size.
4845 (copy_private_bfd_data) [SECTION_SIZE]: Define.
4846 [IS_CONTAINED_BY_VMA, IS_CONTAINED_BY_LMA]: Use it.
4847 [INCLUDE_SECTION_IN_SEGMENT]: Only put SHF_TLS sections
4848 into PT_TLS segment. Never put SHF_TLS sections in
4849 segments other than PT_TLS or PT_LOAD.
4850
4851 * elf64-alpha.c (elf64_alpha_finish_dynamic_sections): Clear .plt
4852 sh_entsize.
4853
4854 2002-12-23 DJ Delorie <dj@redhat.com>
4855
4856 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Fix logic reversal.
4857
4858 2002-12-23 Alan Modra <amodra@bigpond.net.au>
4859
4860 * elflink.h (elf_link_output_extsym): Heed strip_discarded.
4861
4862 2002-12-23 Nick Clifton <nickc@redhat.com>
4863
4864 * archures.c (bfd_arch_get_compatible): Add third parameter
4865 'accept_unknowns'. Only accept unknown format BFDs if
4866 accept_unknowns is true, or if the format is "binary".
4867 * bfd-in2.h: Regenerate.
4868
4869 2002-12-21 Nick Clifton <nickc@redhat.com>
4870
4871 * coff-arm.c (coff_arm_relocate_section): Disable WINCE workaround
4872 that subtracted 8 from pc relative relocations.
4873
4874 2002-12-20 Kazu Hirata <kazu@cs.umass.edu>
4875
4876 * coff-h8300.c: Fix comment typos.
4877 * coffcode.h: Likewise.
4878 * cpu-cris.c: Likewise.
4879 * elf32-vax.c: Likewise.
4880 * genlink.h: Likewise.
4881 * linker.c: Likewise.
4882 * som.c: Likewise.
4883 * tekhex.c: Likewise.
4884 * vms-misc.c: Likewise.
4885
4886 2002-12-20 DJ Delorie <dj@redhat.com>
4887
4888 * reloc.c: Add BFD_RELOC_XSTORMY16_12.
4889 * libbfd.h: Regenerate.
4890 * bfd-in2.h: Regenerate.
4891 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_12.
4892 (xstormy16_reloc_map): Add R_XSTORMY16_12.
4893
4894 2002-12-19 Kazu Hirata <kazu@cs.umass.edu>
4895
4896 * doc/bfdint.texi: Fix typos.
4897
4898 2002-12-20 Paul Eggert <eggert@twinsun.com>
4899
4900 Port to POSIX 1003.1-2001.
4901 * acinclude.m4 (AM_INSTALL_LIBBFD): Do not rely on "test -o".
4902 * configure.in (build-warnings): Likewise.
4903 (Horrible hacks to build DLLs on Windows): Do not rely on "tail -1".
4904 * aclocal.m4: Regenerate.
4905 * config.in: Regenerate.
4906 * configure: Regenerate.
4907
4908 2002-12-19 Alan Modra <amodra@bigpond.net.au>
4909
4910 * coff-h8300.c: Include libiberty.h.
4911 (h8300_reloc16_extra_cases): Check the hash table creator before
4912 referencing h8300 specific fields. Stash the hash table pointer
4913 in a local var. Comment typo fixes.
4914 (h8300_bfd_link_add_symbols): Likewise.
4915
4916 * reloc.c (struct reloc_howto_struct): Revise src_mask and
4917 dst_mask comments.
4918 * bfd-in2.h: Regenerate.
4919
4920 2002-12-18 Alan Modra <amodra@bigpond.net.au>
4921
4922 * elf32-ppc.c (ppc_elf_relocate_section): Reorganize dynamic reloc
4923 code a little. Comment on dynamic relocs against section symbols.
4924
4925 2002-12-17 Roger Sayle <roger@eyesopen.com>
4926
4927 * configure.host (ia64-*-hpux*): Support 64 bit targets using
4928 the HP compiler's "long long".
4929
4930 2002-12-16 Andrew MacLeod <amacleod@redhat.com>
4931
4932 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_LO16
4933 and R_XSTORMY16_HI16) howto entries.
4934 (xstormy16_reloc_map): Map R_XSTORMY16_{LO,HI}16 to BFD_RELOC_{LO,HI}16.
4935 (xstormy16_info_to_howto_rela): Use R_XSTORMY16_GNU_VTINHERIT to
4936 determine the start of the second reloc table.
4937
4938 2002-12-16 Nathan Tallent <eraxxon@alumni.rice.edu>
4939
4940 * ecofflink.c: Fix the reading of the debugging information
4941 of Tru64/Alpha binaries that are produced by recent Compaq
4942 compilers.
4943 (mk_fdrtab): Fix error in creating the FDR (file descriptor)
4944 table.
4945 (lookup_line): Because of the strange information sometimes
4946 generated by Compaq's recent compilers, change how the FDR
4947 table is searched so that PDRs (procedure descriptors) are
4948 correctly found. Note that this change is really more of a hack;
4949 however, I have included extensive documentation as to why
4950 this is the best solution short of an extensive rewrite or
4951 another hack.
4952 (fdrtab_lookup): Add comments to explain the algorithm.
4953
4954 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
4955
4956 * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Reorder
4957 initializers to match struct declaration.
4958
4959 2002-12-12 Alan Modra <amodra@bigpond.net.au>
4960
4961 * dwarf2.c (comp_unit_contains_address): Comment typo fix.
4962 * elf.c (get_program_header_size): Likewise.
4963 * elf32-m32r.c (m32r_elf_lo16_reloc): Likewise.
4964 (m32r_elf_generic_reloc): Likewise.
4965 * elf32-ppc.c (ppc_elf_howto_init): Likewise.
4966 * elflink.h (elf_bfd_discard_info): Likewise.
4967
4968 2002-12-12 Alan Modra <amodra@bigpond.net.au>
4969
4970 * elf32-i386.c (elf_i386_finish_dynamic_sections): Add output_offset
4971 to DT_JMPREL. Use srelplt input section size for DT_PLTRELSZ and
4972 DT_RELSZ adjustment, not output section. Avoid writing tags when
4973 unchanged. Don't assume linker script is sane, adjust DT_REL too.
4974 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Just use raw
4975 size of srelplt for DT_PLTRELSZ. Use srelplt input section size for
4976 DT_RELASZ adjustment, not output section. Avoid writing tags when
4977 unchanged. Adjust DT_RELA.
4978 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Tweaks for better
4979 formatting. Avoid writing tags when unchanged. Adjust DT_RELA.
4980
4981 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
4982
4983 * elfxx-mips.c (mips_elf_calculate_relocation): Don't divide
4984 addend by 4.
4985
4986 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
4987
4988 * elfxx-mips.c (struct mips_got_entry): New.
4989 (struct mips_got_info): Added got_entries field.
4990 (mips_elf_got_entry_hash, mips_elf_got_entry_eq): New functions.
4991 (mips_elf_local_got_index, mips_elf_got_page,
4992 mips_elf_got16_entry): Re-implement in terms of new...
4993 (mips_elf_create_local_got_entry): Rewrite to use got_entries.
4994 Change return type.
4995 (mips_elf_highest): Warning clean-up.
4996 (mips_elf_create_got_section): Initialize got_entries.
4997 (_bfd_mips_elf_check_relocs): Use got_entries to estimate
4998 local got size.
4999 (_bfd_mips_elf_size_dynamic_sections): Do not account for
5000 GOT_PAGE entries, since we now reuse GOT16 entries.
5001
5002 2002-12-10 Jason Thorpe <thorpej@wasabisystems.com>
5003
5004 * aoutx.h (set_section_contents): Allow an otherwise unrepresentable
5005 read-only section that lies after .text and before .data to be
5006 written into the output file and included in a_text.
5007 (translate_to_native_sym_flags): If an otherwise unrepresentable
5008 section was merged with .text, convert its symbols to N_TEXT
5009 symbols.
5010 * libaout.h (aout_section_merge_with_text_p): New macro.
5011
5012 2002-12-08 Alan Modra <amodra@bigpond.net.au>
5013
5014 * bfd-in.h: Comment typo fix. Formatting.
5015 * bfd-in2.h: Regenerate.
5016 * coff64-rs6000.c (xcoff64_openr_next_archived_file): Warning fix.
5017 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): Prototype.
5018 * elf64-mmix.c (mmix_dump_bpo_gregs): Warning fix.
5019
5020 2002-12-05 Richard Henderson <rth@redhat.com>
5021
5022 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21BI.
5023 Only send PCREL21B though the plt. Fix installed reloc type.
5024 (elfNN_ia64_relocate_section): Give error for dynamic reloc
5025 against PCREL22 or PCREL64I; clean up error messages for
5026 branch relocs.
5027
5028 2002-12-04 Kevin Buettner <kevinb@redhat.com>
5029
5030 * elf64-mips.c (elf64_mips_grok_prstatus, elf64_mips_grok_psinfo):
5031 New functions.
5032 (elf_backend_grok_prstatus, elf_backend_grok_psinfo): Define.
5033
5034 2002-12-04 David Mosberger <davidm@hpl.hp.com>
5035
5036 * cpu-ia64-opc.c: Add operand constant "ar.csd".
5037
5038 2002-12-04 H.J. Lu <hjl@gnu.org>
5039
5040 * elfxx-ia64.c (get_local_sym_hash): Use section ID instead of
5041 BFD address when constructing local name.
5042
5043 2002-12-04 Andreas Schwab <schwab@suse.de>
5044
5045 * elf32-m68k.c (struct elf_m68k_link_hash_table): Add sym_sec
5046 member.
5047 (elf_m68k_link_hash_table_create): Initialize it.
5048 (elf_m68k_check_relocs): Handle symbols that are forced to be
5049 local due to visibility changes.
5050 (elf_m68k_adjust_dynamic_symbol): Likewise.
5051 (elf_m68k_size_dynamic_sections): Likewise.
5052 (elf_m68k_discard_copies): Likewise.
5053 (elf_m68k_relocate_section): Likewise.
5054
5055 2002-12-04 Alan Modra <amodra@bigpond.net.au>
5056
5057 * elf64-ppc.c (ppc64_elf_edit_opd): Correct typo.
5058
5059 2002-12-04 Alan Modra <amodra@bigpond.net.au>
5060
5061 * srec.c (srec_write_symbols): Restore '$' prefix to address
5062 accidentally removed in 2002-04-04 change.
5063 (srec_get_symtab): Use 0 instead of `(long) FALSE'.
5064
5065 2002-12-03 Nick Clifton <nickc@redhat.com>
5066
5067 * elf32-ppc.c (apuinfo_list_init): New function.
5068 (apuinfo_list_add): New function: Add a value to the list.
5069 (apuinfo_list_length): New function: Return the number of
5070 values on the list.
5071 (apuinfo_list_element): New function: Return a value on the
5072 list.
5073 (apuinfo_list_finish): New function: Free the resources used
5074 by the list.
5075 (ppc_elf_begin_write_processing): New function. Scan the
5076 input bfds for apuinfo sections.
5077 (ppc_elf_write_section): New function: Delay the creation of
5078 the contents of an apuinfo section in an output bfd.
5079 (ppc_elf_final_write_processing): New function. Create the
5080 contents of an apuinfo section in an output bfd.
5081 (elf_backend_begin_write_processing): Define.
5082 (elf_backend_final_write_processing): Define.
5083 (elf_backend_write_section): Define.
5084
5085 2002-12-03 Richard Henderson <rth@redhat.com>
5086
5087 * cpu-ia64-opc.c (elf64_ia64_operands): Add ldxmov entry.
5088
5089 2002-12-01 Stephane Carrez <stcarrez@nerim.fr>
5090
5091 Fix PR savannah/1417:
5092 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Don't adjust
5093 branch if it goes to the start of the deleted region.
5094
5095 2002-12-01 Stephane Carrez <stcarrez@nerim.fr>
5096
5097 * bfd-in2.h (bfd_mach_m6812): Rebuild.
5098 * archures.c (bfd_mach_m6812_default, bfd_mach_m6812,
5099 bfd_mach_m6812s): Declare.
5100
5101 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): New function.
5102 (_bfd_m68hc12_elf_set_private_flags): Call it.
5103 (_bfd_m68hc12_elf_print_private_bfd_data): Report processor version.
5104 (_bfd_m68hc12_elf_merge_private_bfd_data): Merge the flags and
5105 report microcontroller incompatibilities (HC12 vs HCS12).
5106 (elf_backend_object_p): Update.
5107
5108 2002-11-30 Alan Modra <amodra@bigpond.net.au>
5109
5110 * bfd-in.h (TRUE_FALSE_ALREADY_DEFINED, BFD_TRUE_FALSE): Delete.
5111 (enum bfd_boolean, boolean): Delete.
5112 (bfd_boolean): Typedef to an int.
5113 (FALSE, TRUE): Define.
5114 * aix386-core.c, aix5ppc-core.c, aout-adobe.c, aout-arm.c, aout-cris.c,
5115 aout-encap.c, aout-ns32k.c, aout-target.h, aout-tic30.c, aoutf1.h,
5116 aoutx.h, archive.c, archive64.c, archures.c, bfd-in.h, bfd.c, bfdwin.c,
5117 binary.c, bout.c, cache.c, cisco-core.c, coff-a29k.c, coff-alpha.c,
5118 coff-apollo.c, coff-arm.c, coff-aux.c, coff-h8300.c, coff-h8500.c,
5119 coff-i386.c, coff-i860.c, coff-i960.c, coff-ia64.c, coff-m68k.c,
5120 coff-m88k.c, coff-mcore.c, coff-mips.c, coff-or32.c, coff-ppc.c,
5121 coff-rs6000.c, coff-sh.c, coff-sparc.c, coff-stgo32.c, coff-tic30.c,
5122 coff-tic4x.c, coff-tic54x.c, coff-tic80.c, coff-w65.c, coff-we32k.c,
5123 coff-z8k.c, coff64-rs6000.c, coffcode.h, coffgen.c, cofflink.c,
5124 corefile.c, cpu-a29k.c, cpu-alpha.c, cpu-arc.c, cpu-arm.c, cpu-avr.c,
5125 cpu-cris.c, cpu-d10v.c, cpu-d30v.c, cpu-dlx.c, cpu-fr30.c, cpu-frv.c,
5126 cpu-h8300.c, cpu-h8500.c, cpu-hppa.c, cpu-i370.c, cpu-i386.c,
5127 cpu-i860.c, cpu-i960.c, cpu-ia64.c, cpu-ip2k.c, cpu-m10200.c,
5128 cpu-m10300.c, cpu-m32r.c, cpu-m68hc11.c, cpu-m68hc12.c, cpu-m68k.c,
5129 cpu-m88k.c, cpu-mcore.c, cpu-mips.c, cpu-mmix.c, cpu-ns32k.c,
5130 cpu-openrisc.c, cpu-or32.c, cpu-pdp11.c, cpu-pj.c, cpu-powerpc.c,
5131 cpu-rs6000.c, cpu-s390.c, cpu-sh.c, cpu-sparc.c, cpu-tic30.c,
5132 cpu-tic4x.c, cpu-tic54x.c, cpu-tic80.c, cpu-v850.c, cpu-vax.c,
5133 cpu-w65.c, cpu-we32k.c, cpu-xstormy16.c, cpu-z8k.c, dwarf1.c,
5134 dwarf2.c, ecoff.c, ecofflink.c, efi-app-ia32.c, efi-app-ia64.c,
5135 elf-bfd.h, elf-eh-frame.c, elf-hppa.h, elf-m10200.c, elf-m10300.c,
5136 elf-strtab.c, elf.c, elf32-arc.c, elf32-arm.h, elf32-avr.c,
5137 elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c, elf32-fr30.c,
5138 elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c, elf32-hppa.h,
5139 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
5140 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
5141 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
5142 elf32-pj.c, elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-sh64-com.c,
5143 elf32-sh64.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
5144 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
5145 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-ppc.h, elf64-s390.c,
5146 elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c,
5147 elfarm-oabi.c, elfcode.h, elfcore.h, elflink.c, elflink.h,
5148 elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c, elfxx-mips.h,
5149 elfxx-target.h, format.c, freebsd.h, genlink.h, hash.c, hp300hpux.c,
5150 hppabsd-core.c, hpux-core.c, i386aout.c, i386linux.c, i386lynx.c,
5151 i386mach3.c, i386msdos.c, i386os9k.c, ieee.c, ihex.c, irix-core.c,
5152 libaout.h, libbfd-in.h, libbfd.c, libcoff-in.h, libecoff.h, libieee.h,
5153 libnlm.h, liboasys.h, libpei.h, libxcoff.h, linker.c, lynx-core.c,
5154 m68klinux.c, m68klynx.c, mach-o.c, mach-o.h, merge.c, mipsbsd.c,
5155 mmo.c, netbsd-core.c, netbsd.h, nlm.c, nlm32-alpha.c, nlm32-i386.c,
5156 nlm32-ppc.c, nlm32-sparc.c, nlmcode.h, oasys.c, opncls.c, osf-core.c,
5157 pc532-mach.c, pdp11.c, pe-arm.c, pe-i386.c, pe-mcore.c, pe-mips.c,
5158 pe-sh.c, peXXigen.c, pef.c, pei-arm.c, pei-i386.c, pei-mcore.c,
5159 pei-mips.c, pei-sh.c, peicode.h, ppcboot.c, ptrace-core.c, reloc.c,
5160 reloc16.c, riscix.c, rs6000-core.c, sco5-core.c, section.c, simple.c,
5161 som.c, som.h, sparclinux.c, sparclynx.c, srec.c, stabs.c, sunos.c,
5162 syms.c, targets.c, tekhex.c, ticoff.h, trad-core.c, versados.c,
5163 vms-gsd.c, vms-hdr.c, vms-misc.c, vms-tir.c, vms.c, vms.h,
5164 xcoff-target.h, xcofflink.c, xsym.c, xsym.h: Replace boolean with
5165 bfd_boolean, true with TRUE, false with FALSE. Simplify comparisons
5166 of bfd_boolean vars with TRUE/FALSE. Formatting.
5167 * bfd-in2.h, libbfd.h, libcoff.h: Regenerate
5168
5169 2002-11-28 Alan Modra <amodra@bigpond.net.au>
5170
5171 * elf-bfd.h: Replace occurrences of Elf32_Internal_* and
5172 Elf64_Internal_* with Elf_Internal_*. Replace Elf_Internal_Rel
5173 with Elf_Internal_Rela.
5174 * elf-hppa.h, elf-m10200.c, elf-m10300.c, elf32-arc.c, elf32-arm.h,
5175 elf32-avr.c, elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c,
5176 elf32-fr30.c, elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c,
5177 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
5178 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
5179 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
5180 elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-v850.c, elf32-vax.c,
5181 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
5182 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
5183 elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c, elfarm-oabi.c,
5184 elfcode.h, elflink.h, elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c: Ditto.
5185 * elf-hppa.h (elf_hppa_internal_shdr): Delete. Use Elf_Internal_Shdr
5186 throughout instead.
5187 * elf.c (_bfd_elf_no_info_to_howto_rel): Delete.
5188 * elfcode.h (elf_swap_reloca_in): Pass source operand as a bfd_byte *.
5189 Remove INLINE keyword.
5190 (elf_swap_reloc_in): Likewise. Also clear r_addend.
5191 (elf_swap_reloc_out, elf_swap_reloca_out): Pass destination operand
5192 as a bfd_byte *.
5193 (elf_write_relocs): Consolidate REL and RELA code.
5194 (elf_slurp_reloc_table_from_section): Simplify REL code.
5195 (NAME(_bfd_elf,size_info)): Populate reloc swap entries.
5196 * elf-bfd.h (MAX_INT_RELS_PER_EXT_REL): Define.
5197 * elflink.h (elf_link_read_relocs_from_section): Consolidate REL and
5198 RELA code.
5199 (elf_link_adjust_relocs): Likewise. Don't malloc space for temp
5200 reloc array, use a fixed size of MAX_INT_RELS_PER_EXT_REL.
5201 (elf_link_output_relocs): Likewise.
5202 (elf_reloc_link_order): Likewise.
5203 (elf_finish_pointer_linker_section): Likewise.
5204 (struct elf_link_sort_rela): Remove union.
5205 (elf_link_sort_cmp1): Update to suit.
5206 (elf_link_sort_cmp2): Here too.
5207 (elf_link_sort_relocs): Consolidate REL and RELA code. Fix memory
5208 over-allocation for int_rels_per_ext_rel != 1 case.
5209 * elf32-arm.h: Update all bfd_elf32_swap_reloc_out calls.
5210 * elf32-i386.c: Likewise.
5211 * elf32-cris.c: Likewise for bfd_elf32_swap_reloca_out.
5212 * elf32-hppa.c, elf32-i370.c, elf32-m68k.c, elf32-ppc.c, elf32-s390.c,
5213 elf32-sh.c, elf32-vax.c, elfxx-mips.c: Likewise.
5214 * elf64-alpha.c: Likewise for bfd_elf64_swap_reloca_out.
5215 * elf64-hppa.c, elf64-mips.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
5216 elf64-sparc.c, elf64-x86-64.c: Likewise.
5217 * elfxx-ia64.c: Likewise for bfd_elfNN_swap_reloca_out.
5218 * elfxx-mips.c (sort_dynamic_relocs): Likewise for
5219 bfd_elf32_swap_reloc_in.
5220
5221 * elf32-arm.h: Update elf32_arm_info_to_howto calls.
5222 * elf32-mips.c: Likewise for mips_info_to_howto_rel.
5223 (mips_elf64_swap_reloc_in): Zero r_addend.
5224 (mips_elf64_be_swap_reloc_in): Likewise.
5225 (mips_elf64_slurp_one_reloc_table): Simplify.
5226
5227 * elf64-alpha.c (alpha_elf_size_info): Populate reloc swap entries.
5228 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
5229 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
5230
5231 2002-11-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5232
5233 * elf32-sh.c (sh_elf_relocate_section): Don't complain about
5234 unresolved debugging relocs in dynamic applications.
5235 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
5236
5237 2002-11-26 Alan Modra <amodra@bigpond.net.au>
5238
5239 * elf-eh-frame.c (ENSURE_NO_RELOCS): Disregard R_*_NONE relocs.
5240 (_bfd_elf_discard_section_eh_frame): Don't discard duplicate CIEs
5241 on a relocatable link. Comment typos.
5242 * elf.c (_bfd_elf_link_hash_newfunc): Assign elements of structure
5243 in the order they are declared. Clear elf_hash_value too.
5244 (_bfd_elf_link_hash_table_init): Likewise assign in order. Clear
5245 eh_info and tls_segment.
5246 * elflink.h (elf_link_input_bfd <emit_relocs>): Keep reloc offsets
5247 sorted when discarding relocs by turning them into R_*_NONE.
5248
5249 * libbfd.c (warn_deprecated): Comment spelling.
5250 * po/SRC-POTFILES.in: Regenerate.
5251
5252 2002-11-21 Richard Henderson <rth@redhat.com>
5253
5254 * elflink.h (elf_link_add_object_symbols): Don't overwrite the
5255 arch's st_other bits when merging visibilities.
5256 (elf_link_output_extsym): Tidy clearing of visibility field.
5257
5258 2002-11-21 Alan Modra <amodra@bigpond.net.au>
5259
5260 * coff-mcore.c (SWAP_IN_RELOC_OFFSET): Define.
5261 (SWAP_OUT_RELOC_OFFSET): Define.
5262
5263 2002-11-20 Alexandre Oliva <aoliva@redhat.com>
5264
5265 * elf.c (_bfd_elf_link_hash_table_init): Make sure
5266 can_refcount is properly extended to the type of
5267 init_refcount.
5268
5269 2002-11-19 Alexandre Oliva <aoliva@redhat.com>
5270
5271 * elfxx-mips.c (MIPS_RELOC_RELA_P): New macro.
5272 (_bfd_mips_elf_relocate_section): Use it.
5273
5274 * elfxx-mips.c (MNAME): New macro.
5275 (_bfd_mips_elf_check_relocs): Use it.
5276 (_bfd_mips_elf_discard_info): Likewise.
5277 (_bfd_mips_elf_final_link): Likewise.
5278
5279 2002-11-19 Alan Modra <amodra@bigpond.net.au>
5280
5281 * elf64-ppc.c (ppc64_elf_edit_opd): When deleting relocs, adjust
5282 rel_hdr.sh_size too.
5283
5284 2002-11-18 Klee Dienes <kdienes@apple.com>
5285
5286 * Makefile.am (BFD32_LIBS): Add bfdwin.lo, bfdio.lo.
5287 (BFD32_LIBS_CFILES): Add bfdwin.c, bfdio.c.
5288 (BFD_H_FILES): Add bfdwin.c, bfdio.c.
5289 (LIBBFD_H_FILES): Add bfdwin.c, bfdio.c.
5290 Add dependencies for bfdwin.c, bfdio.c.
5291 * bfd.c: Remove bfd_get_mtime, bfd_get_size.
5292 * libbfd.c: Remove real_read, bfd_bread, _bfd_window_internal,
5293 bfd_init_window, bfd_free_window, bfd_get_file_window, bfd_bwrite,
5294 bfd_tell, bfd_flush, bfd_stat, bfd_seek.
5295 * bfdio.c: New file. Contains real_read, bfd_bread, bfd_write,
5296 bfd_tell, bfd_flush, bfd_stat, bfd_seek, bfd_ge_mtime,
5297 bfd_get_size (moved from libbfd.c and bfd.c).
5298 * bfdwin.c New file. Contains _bfd_window_internal,
5299 bfd_init_window, bfd_free_window, bfd_get_file_window (moved from
5300 libbfd.c and bfd.c).
5301 * po/SRC-POTFILES.in: Regenerate.
5302 * po/bfd.pot: Regenerate.
5303 * libbfd.h: Regenerate.
5304 * bfd-in2.h: Regenerate.
5305 * aclocal.m4: Regenerate.
5306 * Makefile.in: Regenerate.
5307 * configure: Regenerate.
5308
5309 2002-11-18 Klee Dienes <kdienes@apple.com>
5310
5311 * bfd.c (bfd_preserve_save): Don't zero BFD_IN_MEMORY.
5312
5313 2002-11-15 Kazu Hirata <kazu@cs.umass.edu>
5314
5315 * coff-h8300.c (h8300_reloc16_estimate): Do not optimize away
5316 jsr after a short jump.
5317 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
5318
5319 2002-11-15 Klee Dienes <kdienes@apple.com>
5320
5321 * pef.c (bfd_pef_convert_architecture): Move declaration of
5322 ARCH_POWERPC and ARCH_M68K to the start of the function.
5323
5324 2002-11-14 Svein E. Seldal <Svein.Seldal@solidas.com>
5325
5326 * coff-tic4x.c (tic4x_howto_table): Formatting fixup
5327
5328 2002-11-14 Hans-Peter Nilsson <hp@bitrange.com>
5329
5330 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs):
5331 For bpo_gregs_section->contents, allocate _raw_size, not
5332 _cooked_size.
5333
5334 2002-11-13 Klee Dienes <kdienes@apple.com>
5335
5336 * config.bfd: Add entries for powerpc-*-darwin and cousins.
5337
5338 2002-11-13 H.J. Lu <hjl@gnu.org>
5339
5340 * elfcode.h (elf_object_p): Don't restore abfd->arch_info.
5341
5342 2002-11-13 Klee Dienes <kdienes@apple.com>
5343 Alan Modra <amodra@bigpond.net.au>
5344
5345 * bfd.c (struct bfd_preserve): New.
5346 (bfd_preserve_save): New function.
5347 (bfd_preserve_restore): Ditto.
5348 (bfd_preserve_finish): Ditto.
5349 * bfd-in2.h: Regenerate.
5350 * mach-o.c: Formatting.
5351 (bfd_mach_o_scan_read_symtab_symbol): Make "value" unsigned.
5352 (bfd_mach_o_object_p): Use bfd_preserve_save/restore/finish.
5353 (bfd_mach_o_core_p): Ditto.
5354 (bfd_mach_o_scan): Pass in mdata.
5355 * mach-o.h (bfd_mach_o_scan): Update prototype.
5356 * pef.c: Formatting.
5357 (bfd_pef_object_p): Use bfd_preserve_save/restore/finish.
5358 (bfd_pef_xlib_object_p): Ditto.
5359 (bfd_pef_scan): Pass in mdata. Move version check to bfd_pef_object_p.
5360 * pef.h (bfd_pef_scan): Update prototype.
5361 * xsym.c: Formatting, K&R fixes.
5362 (bfd_sym_object_p): Use bfd_preserve_save/restore/finish.
5363 (bfd_sym_scan): New function split out from bfd_sym_object_p.
5364 * xsym.h (bfd_sym_scan): Declare.
5365 * elfcode.h (elf_object_p): Use bfd_preserve_save/restore/finish.
5366 * elfcore.h (elf_core_file_p): Likewise.
5367 * targets.c (_bfd_target_vector): Revert 2002-11-08 change.
5368
5369 2002-11-12 Nick Clifton <nickc@redhat.com>
5370
5371 * po/da.po: Updated Danish translation.
5372
5373 2002-11-12 Alan Modra <amodra@bigpond.net.au>
5374
5375 * elflink.h (elf_link_add_object_symbols): Optimize stabs for
5376 relocatable link too.
5377 (elf_link_input_bfd): When emitting relocs, adjust offsets for
5378 eh_frame and stab sections. Zap deleted relocs.
5379 (elf_reloc_symbol_deleted_p): Return true for zero r_symndx.
5380 (elf_bfd_discard_info): Run for relocatable link too.
5381 * elf64-ppc.c (ppc64_elf_edit_opd): Rename from edit_opd. Make global.
5382 Handle ld -r case.
5383 (ppc64_elf_size_dynamic_sections): Don't call edit_opd from here.
5384 * elf64-ppc.h (ppc64_elf_edit_opd): Declare.
5385
5386 * elf-bfd.h (struct cie_header): Move from elf_eh-frame.c.
5387 (struct cie, struct eh_cie_fde, struct eh_frame_sec_info): Likewise.
5388 (struct eh_frame_array_ent, struct eh_frame_hdr_info): Likewise.
5389 (enum elf_link_info_type): Remove ELF_INFO_TYPE_EH_FRAME_HDR.
5390 (struct eh_frame_hdr_info): Add "hdr_sec", remove "split".
5391 (struct elf_link_hash_table): Add eh_info.
5392 (struct elf_obj_tdata): Change eh_frame_hdr to an asection *.
5393 (_bfd_elf_discard_section_eh_frame): Update prototype.
5394 (_bfd_elf_discard_section_eh_frame_hdr): Likewise.
5395 (_bfd_elf_write_section_eh_frame): Likewise.
5396 (_bfd_elf_write_section_eh_frame_hdr): Likewise.
5397 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Remove "ehdrsec"
5398 param. Get "hdr_info" from link hash table.
5399 (_bfd_elf_discard_section_eh_frame_hdr): Remove "sec" param. Get
5400 header section from link hash table. Save header section to elf_tdata.
5401 (_bfd_elf_maybe_strip_eh_frame_hdr): Remove local "sec". Use
5402 header section from link hash table. Don't alloc hdr_info. Clear
5403 hdr_sec instead of setting "strip".
5404 (_bfd_elf_eh_frame_section_offset): Formatting.
5405 (_bfd_elf_write_section_eh_frame): Remove "ehdrsec", add "info" param.
5406 Get header section from link hash table.
5407 (_bfd_elf_write_section_eh_frame_hdr): Remove "sec", add "info" param.
5408 Get header section from link hash table.
5409 * elf.c (map_sections_to_segments): Use cached eh_frame_hdr.
5410 (get_program_header_size): Likewise.
5411 (_bfd_elf_section_offset): Formatting.
5412 * elflink.h (elf_link_create_dynamic_sections): Stash eh frame header
5413 section pointer in link hash table.
5414 (elf_bfd_final_link): Adjust _bfd_elf_write_section_eh_frame_hdr
5415 and _bfd_elf_write_section_eh_frame calls. Update comment about
5416 eh_frame entries.
5417 (elf_bfd_discard_info): Adjust _bfd_elf_discard_section_eh_frame and
5418 _bfd_elf_discard_section_eh_frame_hdr calls. Remove "ehdr".
5419
5420 * po/SRC-POTFILES.in: Regenerate.
5421
5422 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't zero
5423 relocs for discarded FDEs. Remove dead code.
5424 (_bfd_elf_write_section_eh_frame_hdr): Remove dead code.
5425 * elflink.h (elf_bfd_discard_info): Don't save edited relocs.
5426 Tidy conditions under which stabs are edited. Formatting.
5427 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
5428 from discarded relocs.
5429 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Add reloc output
5430 section adjustments after testing magic values.
5431
5432 2002-11-12 Thomas Moestl <tmm@FreeBSD.org>
5433
5434 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Correct
5435 references to large plt symbols.
5436
5437 2002-11-12 Klee Dienes <kdienes@apple.com>
5438
5439 * mach-o.c (bfd_mach_o_scan_read_thread): Don't re-use 'i' when
5440 looking for an unused section name.
5441
5442 2002-11-11 Kazu Hirata <kazu@cs.umass.edu>
5443
5444 * coff-h8300.c: Fix formatting.
5445 * elf32-h8300.c: Likewise.
5446 * reloc16.c: Likewise.
5447
5448 2002-11-09 Jeroen Dobbelaere <jeroen.dobbelaere@acunia.com>
5449
5450 * elf32-arm.h (elf32_arm_size_dynamic_sections): Don't strip output
5451 section when dynamic section unused; _bfd_strip_section_from_output
5452 instead.
5453
5454 2002-11-08 Alan Modra <amodra@bigpond.net.au>
5455
5456 * targets.c (_bfd_target_vector): Disable pef_vec, pef_xlib_vec
5457 and sym_vec.
5458
5459 * dwarf2.c: Revert last change.
5460
5461 2002-11-07 Michal Ludvig <mludvig@suse.cz>
5462
5463 * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
5464 _bfd_dwarf2_find_nearest_line): Use
5465 bfd_simple_get_relocated_section_contents() instead of
5466 bfd_get_section_contents().
5467 * reloc.c (bfd_perform_relocation): Add sanity check.
5468 * simple.c (simple_get_relocated_section_contents): If the section
5469 does not have any relocs associated with it, just return the
5470 unadjusted contents.
5471
5472 2002-11-07 Hans-Peter Nilsson <hp@axis.com>
5473
5474 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOT,
5475 case R_CRIS_32_GOT>: Correct test for filling in constant .got
5476 contents, enabling for a non-DSO, for symbols defined in the
5477 program with --export-dynamic.
5478
5479 2002-11-07 Alan Modra <amodra@bigpond.net.au>
5480
5481 * elf64-ppc.c: Comment typo fixes.
5482 (ppc64_elf_merge_private_bfd_data): Allow BFD_ENDIAN_UNKNOWN input.
5483
5484 2002-11-07 Nick Clifton <nickc@redhat.com>
5485
5486 * po/da.po: Updated Danish translation.
5487
5488 2002-11-06 Alexandre Oliva <aoliva@redhat.com>
5489
5490 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Generate
5491 exactly three internal relocs per external reloc. Set reloc_count
5492 to the external reloc count.
5493
5494 2002-11-06 Klee Dienes <kdienes@apple.com>
5495
5496 * coff-stgo32.c (stub_bytes): Mark as const.
5497 Fix comment formatting.
5498
5499 2002-11-06 Klee Dienes <kdienes@apple.com>
5500
5501 * Makefile.am (BFD32_BACKENDS): Add mach-o.lo, pef.lo, and
5502 xsym.lo.
5503 (BFD32_BACKENDS_CFILES): Add mach-o.c, pef.c, and xsym.c.
5504 (SOURCE_HFILES): Add mach-o.h, pef.h, pef-traceback.h, xsym.h
5505 * archures.c (enum bfd_architecture): Add bfd_arch_m98k.
5506 * bfd.c (struct bfd): Add private data for mach-o, pef, and sym.
5507 * targets.c (enum bfd_flavour): Add flavours for mach-o, pef, and
5508 sym.
5509 (_bfd_target_vector): Add target vectors for mach-o, pef, and sym.
5510 * Makefile.in: Regenerate.
5511 * doc/Makefile.in: Regenerate.
5512 * bfd-in2.h: Regenerate.
5513 * xsym.c: New file. Contains support for the Apple/Metrowerks
5514 xSYM debugging format.
5515 * xsym.h: New file.
5516 * pef.c: New file. Contains support for the Apple Code Fragment
5517 Manager Preferred Executable Format
5518 * pef.h: New file.
5519 * pef-traceback.h: New file. Contains support for parsing PowerPC
5520 traceback tables as used by PEF executables (and perhaps other
5521 systems as well).
5522 * mach-o.c: New file. Contains support for the Mach-O object file
5523 format.
5524 * mach-o.h: New file.
5525 * mach-o-target.c: New file. Declares the mach-o targets
5526 themselves. Included three times by mach-o.c; each time with a
5527 different set of macros set.
5528
5529 2002-11-06 Graeme Peterson <gp@qnx.com>
5530
5531 * Makefile.am: Remove entries for elf32-qnx.[ch].
5532 * Makefile.in: Regenerate.
5533 * config.bfd: Change arm-nto to use bfd_elf32_{big|little}arm_vec,
5534 ppc-nto to use bfd_elf32_powerpc{le}_vec, sh-nto to use
5535 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
5536 * configure.in: Remove support for bfd_elf32_sh{l}qnx_vec,
5537 bfd_elf32_powerpc{le}qnx_vec, bfd_elf32_{big|little}armqnx_vec,
5538 and bfd_elf32_i386qnx_vec, and removed elf32-qnx.lo from other targets.
5539 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
5540 * configure: Regenerate.
5541 * elf32-qnx.c: Remove.
5542 * elf32-qnx.h: Remove.
5543 * elf.c: Remove calls to QNX specific set_nonloadable_filepos,
5544 is_contained_by_filepos, and copy_private_bfd_data_p.
5545 * elf-bfd.h (struct elf_backend_data): Remove set_nonloadable_filepos,
5546 is_contained_by_filepos, and copy_private_bfd_data_p.
5547 * elf32-i386.c: Remove QNX extended bfd support.
5548 * elf32-ppc.c: Remove QNX extended bfd support.
5549 * elf32-sh.c: Remove QNX extended bfd support.
5550 * elfarm-nabi.c: Remove QNX extended bfd support.
5551 * targets.c: Remove qnx vectors.
5552 * elfxx-target.h (elf_backend_set_nonloadable_filepos): Remove
5553 (elf_backend_is_contained_by_filepos): Remove.
5554 (elf_backend_copy_private_bfd_data_p): Remove.
5555 * po/SRC-POTFILES.in: Regenerate.
5556
5557 2002-11-06 David O'Brien <obrien@FreeBSD.org>
5558 Alan Modra <amodra@bigpond.net.au>
5559
5560 * elf64-sparc.c (sparc64_elf_relocate_section): Adjust addend of
5561 dynamic relocs against section symbols for the output section vma.
5562
5563 2002-11-05 Alan Modra <amodra@bigpond.net.au>
5564
5565 * elf32-arm.h (t2a1_push_insn, t2a2_ldr_insn, t2a3_mov_insn,
5566 t2a4_bx_insn, t2a5_pop_insn, t2a6_bx_insn): Remove.
5567
5568 2002-11-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5569 Alan Modra <amodra@bigpond.net.au>
5570
5571 * config.bfd (sh-*-linux*): Use bfd_elf*_sh64*lin_vec as sh64
5572 vectors in target_selvecs.
5573 (shle-*-netbsdelf*): Use bfd_elf*_sh64*nbsd_vec as sh64 vectors
5574 in target_selvecs.
5575 (sh-*-netbsdelf*): Likewise.
5576 * configure.in (assocvecs): New variable. Handle assocvecs like
5577 selvecs.
5578 * configure: Regenerate.
5579 * format.c (bfd_check_format_matches): Store bfd_target pointers
5580 in matching_vector instead of target names. Select first target
5581 from bfd_associated_vector that matches a list of ambiguous targets.
5582 * targets.c (_bfd_associated_vector): New array.
5583 (bfd_associated_vector): New variable.
5584 (_bfd_target_vector): Add bfd_elf*_sh64*lin_vec.
5585 * libbfd-in.h (bfd_associated_vector): Declare.
5586 * libbfd.h: Regenerate.
5587
5588 2002-11-05 Elias Athanasopoulos <eathan@otenet.gr>
5589
5590 * vms-gsd.c (_bfd_vms_write_gsd): Check that symbol->udata.p is
5591 non-NULL before dereferencing.
5592
5593 2002-11-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5594
5595 * vms.c (vms_object_p): Restore the start address when returning
5596 NULL.
5597
5598 2002-11-04 Alan Modra <amodra@bigpond.net.au>
5599 Hans-Peter Nilsson <hp@axis.com>
5600
5601 * elflink.h (struct elf_final_link_info): Add shndxbuf_size.
5602 (elf_bfd_final_link): Don't bother zeroing symtab_hdr fields.
5603 Set up a larger symshndxbuf, and write it out. Free it on
5604 exit rather than freeing symbuf twice. Correct section index
5605 on output section symbol loop.
5606 (elf_link_output_sym): Accumulate symbol extension section
5607 indices, reallocating symshndxbuf rather than writing it out.
5608 (elf_link_flush_output_syms): Don't flush symshndxbuf.
5609 * elf.c (assign_section_numbers): Init i_shdrp to all zero.
5610 Use bfd_zalloc to clear i_shdrp[0] too.
5611
5612 2002-11-03 Stephen Clarke <stephen.clarke@earthling.net>
5613
5614 * elf32-sh64-com.c (sh64_address_in_cranges): Use
5615 _raw_size of cranges section if _cooked_size not yet set.
5616
5617 2002-11-03 Hans-Peter Nilsson <hp@axis.com>
5618
5619 * elf32-v850.c (v850_elf_relax_delete_bytes): Correct parameters
5620 for bfd_elf32_swap_symbol_out.
5621
5622 2002-10-31 David O'Brien <obrien@FreeBSD.org>
5623
5624 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't mix
5625 signed and unsigned in comparison.
5626
5627 2002-10-30 Daniel Jacobowitz <drow@mvista.com>
5628
5629 * coffcode.h: Remove extraneous '\'.
5630
5631 2002-10-28 H.J. Lu <hjl@gnu.org>
5632
5633 * Makefile.am (targets.lo): Depend on Makefile instead of
5634 config.status.
5635 (archures.lo): Likewise.
5636 * Makefile.in: Regenerated.
5637
5638 2002-10-25 Jason Thorpe <thorpej@wasabisystems.com>
5639
5640 * config.bfd (mips*el-*-netbsd*, mips*-*-netbsd*): Add
5641 bfd_elf64_bigmips_vec and bfd_elf64_littlemips_vec to
5642 targ_selvecs.
5643
5644 2002-10-25 Jim Wilson <wilson@redhat.com>
5645
5646 * elf64-sh64.c (sh_elf64_relocate_section): Call
5647 _bfd_elf_rela_local_sym. Handle relocs against STT_SECTION symbol
5648 of SHF_MERGE section.
5649
5650 2002-10-25 Hans-Peter Nilsson <hp@axis.com>
5651
5652 * simple.c: Correct placement of ATTRIBUTE_UNUSED.
5653
5654 2002-10-24 John David Anglin <dave@hiauly1.hia.nrc.ca>
5655
5656 * aoutx.h (NAME(aout,swap_ext_reloc_in)): Cast bytes->r_index to
5657 unsigned int. Cast RELOC_BASE10, RELOC_BASE13 and RELOC_BASE22 to
5658 unsigned int.
5659 (NAME(aout,final_link)): Cast enum used in assignment.
5660 (aout_link_write_symbols): Cast enums in comparisons, int values to
5661 boolean, enums in assignments to int.
5662 (aout_link_input_section_std): Cast rel->r_index to unsigned int.
5663 (aout_link_input_section_ext): Likewise. Cast enums used in
5664 comparisons with unsigned ints.
5665 (aout_link_reloc_link_order): Cast enum to int in assignment.
5666 * archive.c (_bfd_generic_read_ar_hdr_mag): Cast result of memchr
5667 calls to char *.
5668 * bfd-in.h (bfd_set_section_vma): Cast enum true to unsigned int in
5669 assignment.
5670 * bfd-in2.h (bfd_set_section_vma): Likewise.
5671 * bfd.c (bfd_record_phdr): Cast enums in assignments.
5672 * binary.c (bfd_alloc): Cast enum to long.
5673 * coffgen.c (_bfd_coff_is_local_label_name): Cast return to boolean.
5674 * dwarf2.c (read_abbrevs): Add casts to enum types.
5675 (read_attribute_value): Likewise.
5676 (arange_add): Cast result of bfd_zalloc call.
5677 (comp_unit_contains_address): Return true and false.
5678 (comp_unit_find_nearest_line): Cast return to boolean.
5679 * format.c (bfd_check_format_matches, bfd_set_format): Likewise.
5680 * gen-aout.c: define macro '_' if not defined.
5681 * libbfd.c (bfd_realloc): Cast malloc and realloc to PTR.
5682 (bfd_bwrite): Cast bfd_realloc to bfd_byte *.
5683 (bfd_write_bigendian_4byte_int): Cast return to boolean.
5684 (bfd_seek): Cast bfd_realloc to bfd_byte *.
5685 (bfd_generic_is_local_label_name): Cast return to boolean.
5686 * libcoff.h (_bfd_coff_adjust_symndx): Remove extraneous '\'.
5687 * linker.c (_bfd_link_hash_newfunc): Cast bfd_hash_allocate result to
5688 struct bfd_hash_entry *.
5689 (_bfd_generic_link_hash_newfunc): likewise.
5690 (_bfd_generic_final_link): Cast enum to unsigned int.
5691 * merge.c (sec_merge_emit): Cast return to boolean.
5692 (merge_strings): Add casts to const unsigned char *.
5693 * reloc.c (bfd_get_reloc_code_name): Cast enums in comparison to int.
5694 (bfd_generic_get_relocated_section_content): Cast enum to unsigned int.
5695 * section.c (bfd_section_hash_newfunc): Cast bfd_hash_allocate result
5696 to struct bfd_hash_entry *.
5697 (bfd_set_section_content): Add cast to PTR in comparison.
5698 * simple.c (simple_dummy_warning, simple_dummy_undefined_symbol,
5699 simple_dummy_reloc_overflow, simple_dummy_reloc_dangerous,
5700 simple_dummy_unattached_reloc,
5701 bfd_simple_get_relocated_section_contents): Add K&R declarations and
5702 function definitions.
5703 * srec.c (S3Forced): Initialize to false.
5704 (srec_get_symtab): Cast return value from bfd_alloc to asymbol *.
5705 * stabs.c (_bfd_link_section_stabs): Cast enum to int in comparisons.
5706 (_bfd_discard_section_stabs): Likewise. Also cast return to boolean.
5707 * syms.c (bfd_is_undefined_symclass): Cast return to boolean.
5708 (_bfd_stab_section_find_nearest_line): Cast enum to bfd_byte in
5709 comparisons.
5710
5711 2002-10-23 Jakub Jelinek <jakub@redhat.com>
5712
5713 * elf64-alpha.c (elf64_alpha_check_relocs): Only put maybe_dynamic
5714 relocs into shared lib non-allocated reloc sections.
5715
5716 2002-10-23 Nathan Tallent <eraxxon@alumni.rice.edu>
5717
5718 * dwarf2.c (add_line_info): Ensure that the line_info_table is
5719 sorted even when given an out-of-order line sequence.
5720 (lookup_address_in_line_info_table): When an exact VMA match is
5721 not found, return line information with the closest VMA.
5722
5723 2002-10-23 Ross Alexander <ross.alexander@uk.neceur.com>
5724
5725 * elf64-hppa.c: Force DT_FLAGS to always be set. Required by
5726 HPUX 11.00 patch PHSS_26559.
5727
5728 2002-10-22 Alexandre Oliva <aoliva@redhat.com>
5729
5730 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Don't move
5731 the options section into a separate section unless IRIX 6
5732 compatibility is enabled.
5733
5734 2002-10-22 Alexandre Oliva <aoliva@redhat.com>
5735
5736 * elflink.h (struct elf_link_sort_rela): Turn rel and rela
5737 into arrays.
5738 (elf_link_sort_cmp1, elf_link_sort_cmp2): Adjust.
5739 (elf_link_sort_relocs): Likewise. Take int_rels_per_ext_rel
5740 into account.
5741 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Compose
5742 R_MIPS_REL32 with R_MIPS64 if ABI_64_P.
5743
5744 2002-10-21 Graeme Peterson <gp@qnx.com>
5745
5746 * targets.c (_bfd_target_vector): Add missing qnx vectors.
5747
5748 2002-10-21 Alan Modra <amodra@bigpond.net.au>
5749
5750 * targets.c (bfd_target_list): Don't return the default target twice.
5751
5752 2002-10-21 Elias Athanasopoulos <eathan@otenet.gr>
5753
5754 * archive.c (_bfd_archive_bsd_update_armap_timestamp): Replace
5755 perror with bfd_perror.
5756
5757 2002-10-19 H.J. Lu <hjl@gnu.org>
5758
5759 * elflink.h (elf_link_add_object_symbols): Correctly handle
5760 DT_RPATH and DT_RUNPATH.
5761
5762 2002-10-19 Mark Kettenis <kettenis@gnu.org>
5763
5764 * elf.c (elfcore_grok_note): Fix recognition on NT_PRXFPREG notes.
5765
5766 2002-10-17 Denis Chertykov <denisc@overta.ru>
5767
5768 * elf32-ip2k.c (ELF_MACHINE_ALT1): Define alternate machine code
5769 for ip2k port.
5770
5771 2002-10-17 Alan Modra <amodra@bigpond.net.au>
5772
5773 * elfxx-target.h (USE_REL): Don't define as 1.
5774 * elf32-arm.h (USE_REL): Provide a default define of 0.
5775 Use #if rather than #ifdef when testing USE_REL.
5776 * elf32-m32r.c: Likewise.
5777
5778 * elf32-arc.c (USE_REL): Define as 1.
5779 * elf32-d10v.c (USE_REL): Likewise.
5780 * elf32-m32r.c (USE_REL): Likewise.
5781 * elf32-m68hc11.c (USE_REL): Likewise.
5782 * elf32-m68hc12.c (USE_REL): Likewise.
5783 * elf32-or32.c (USE_REL): Likewise.
5784 * elfarm-nabi.c (USE_REL): Likewise.
5785
5786 2002-10-16 Jakub Jelinek <jakub@redhat.com>
5787
5788 * config.bfd (s390-*-linux*): Add targ64_selvecs.
5789 (s390x-*-linux*): Add targ_selvecs.
5790
5791 2002-10-16 Alan Modra <amodra@bigpond.net.au>
5792
5793 * Makefile.am (BFD32_BACKENDS): Remove elfarmqnx-nabi.lo,
5794 elf32-i386-fbsd.lo, elf32-i386qnx.lo, elf32-ppcqnx.lo,
5795 elf32-sh-lin.lo, elf32-sh64-lin.lo, elf32-sh-nbsd.lo,
5796 elf32-sh64-nbsd.lo, elf32-shqnx.lo. Add elf32-qnx.lo.
5797 (BFD32_BACKENDS_CFILES): Likewise for corresponding C files.
5798 (BFD64_BACKENDS): Remove elf64-sh64-lin.lo, elf64-sh64-nbsd.lo.
5799 (BFD64_BACKENDS_CFILES): Likewise for corresponding C files.
5800 (SOURCE_HFILES): Add elf32-qnx.h.
5801 (BUILD_HFILES): Add bfdver.h.
5802 Run "make dep-am".
5803 * Makefile.in: Regenerate.
5804 * configure.in Update bfd vector dependencies.
5805 * configure: Regenerate.
5806 * elf32-i386-fbsd.c: Delete. Move code to elf32-i386.c.
5807 * elf32-i386qnx.c: Likewise.
5808 * elf32-ppcqnx.c: Delete. Move code to elf32-ppc.c.
5809 * elf32-sh-nbsd.c: Delete. Move code to elf32-sh.c.
5810 * elf32-sh-lin.c: Likewise.
5811 * elf32-shqnx.c: Likewise.
5812 * elf32-sh64-lin.c: Delete. Move code to elf32-sh64.c.
5813 * elf32-sh64-nbsd.c: Likewise.
5814 * elf64-sh64-lin.c: Delete. Move code to elf64-sh64.c.
5815 * elf64-sh64-nbsd.c: Likewise.
5816 * elfarmqnx-nabi.c: Delete. Move code to elfarm-nabi.c.
5817 * elf32-arm.h (ELF_MAXPAGESIZE): Always define.
5818 * elf32-i386.c: Remove ELF_ARCH and ELF32_I386_C_INCLUDED tests.
5819 * elf32-ppc.c: Remove ELF32_PPC_C_INCLUDED tests.
5820 * elf32-qnx.h (elf_backend_set_nonloadable_filepos): Always define.
5821 (elf_backend_is_contained_by_filepos): Likewise.
5822 (elf_backend_copy_private_bfd_data_p): Likewise.
5823 Globalize and move functions to..
5824 * elf32-qnx.c: ..here. New file.
5825 * elf32-sh.c: Remove ELF_ARCH and ELF32_SH_C_INCLUDED tests. Don't
5826 emit target vectors when INCLUDE_SHMEDIA.
5827 * elf32-sh64.c: Remove ELF_ARCH test. Move TARGET_* etc. defines to
5828 end of file.
5829 * elf64-sh64.c: Remove ELF_ARCH test.
5830 * elfarm-nabi.c: Remove ELFARM_NABI_C_INCLUDED test.
5831 * po/BLD-POTFILES.in: Regenerate.
5832 * po/SRC-POTFILES.in: Regenerate.
5833
5834 2002-10-16 Alan Modra <amodra@bigpond.net.au>
5835
5836 * elflink.h (elf_link_add_object_symbols): Error out on dynamic objects
5837 loaded with --just-symbols.
5838
5839 * elf32-i386qnx.c (TARGET_LITTLE_NAME): Define.
5840 * elf32-ppcqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
5841 * elf32-shqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
5842 * elfarmqnx-nabi.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
5843
5844 2002-10-15 Richard Henderson <rth@redhat.com>
5845
5846 * Makefile.am (BFD64_BACKENDS): Remove elf64-alpha-fbsd.
5847 (BFD64_BACKENDS_CFILES): Likewise.
5848 * configure.in (bfd_elf64_alpha_freebsd_vec): Use elf64-alpha.
5849 * elf64-alpha-fbsd.c: Remove file, move code ...
5850 * elf64-alpha.c: ... here.
5851 * Makefile.in, configure: Rebuild.
5852
5853 2002-10-14 Richard Henderson <rth@redhat.com>
5854
5855 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: Increment
5856 VALUE, not ADDEND.
5857
5858 2002-10-14 Stephen Clarke <stephen.clarke@superh.com>
5859
5860 * elf32-sh.c (elf_sh_link_hash_entry): Replace
5861 datalabel_got_offset with union of datalabel_got
5862 offset and refcount.
5863 (sh_elf_link_hash_newfunc): Initialize datalabel_got.refcount.
5864 (allocate_dynrelocs): Delete unnecessary code for
5865 STT_DATALABEL type. Create entry in got for
5866 datalabel version of symbol if datalabel_got.refcount > 0.
5867 (sh_elf_relocate_section): Use datalabel_got union.
5868 (sh_elf_gc_sweep_hook): Pull common code to initialize
5869 h and eh out of switch statement. Declare seen_stt_datalabel.
5870 Initialize it. Decrement datalabel_got.refcount for
5871 got relocs when seen_stt_datalabel is true.
5872 Decrement local_got_refcounts entry for datalabel got relocs
5873 of local symbols.
5874 (sh_elf_copy_indirect_symbol): Copy datalabel_got field over.
5875 (sh_elf_check_relocs): Declare seen_stt_datalabel.
5876 Initialize it. When seen_stt_datalabel is true, increment
5877 datalabel_got refcount rather than got.refcount.
5878 (sh_elf_finish_dynamic_symbol): Create relocs to
5879 initialize got entry for datalabel version of symbol.
5880
5881 2002-10-14 Alan Modra <amodra@bigpond.net.au>
5882
5883 * Makefile.am: Run "make dep-am".
5884 (BFD_H_FILES): Remove version.h.
5885 * bfd-in.h (BFD_VERSION, BFD_VERSION_DATE, BFD_VERSION_STRING): Move..
5886 * version.h: ..to here.
5887 * configure.in (bfd_version_date): Remove.
5888 (AC_OUTPUT): Make bfdver.h from version.h.
5889 * bfd.c: #include "bfdver.h".
5890 * vms-hdr.c: Likewise.
5891 * Makefile.in: Regenerate.
5892 * bfd-in2.h: Regenerate.
5893 * configure: Regenerate.
5894 * po/SRC-POTFILES.in: Regenerate.
5895
5896 2002-10-14 Alan Modra <amodra@bigpond.net.au>
5897
5898 * archures.c (bfd_mach_i386_i386, bfd_mach_i386_i8086,
5899 bfd_mach_i386_i386_intel_syntax, bfd_mach_x86_64,
5900 bfd_mach_x86_64_intel_syntax bfd_mach_ppc, bfd_mach_ppc64,
5901 bfd_mach_rs6k, bfd_mach_d10v, bfd_mach_sh, bfd_mach_v850,
5902 bfd_mach_arc_5, bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8,
5903 bfd_mach_m32r, bfd_mach_frv, bfd_mach_frvsimple,
5904 bfd_mach_ia64_elf64, bfd_mach_ia64_elf32,
5905 bfd_mach_ip2022, bfd_mach_ip2022ext,
5906 bfd_mach_s390_31, bfd_mach_s390_64, bfd_mach_xstormy16): Renumber.
5907 * bfd-in2.h: Regenerate.
5908
5909 2002-10-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5910
5911 * config.bfd (sh*eb-*-linux*, sh*-*-linux*): Add the alternative
5912 endian vector to targ_selvecs.
5913
5914 2002-10-13 Alexandre Oliva <aoliva@redhat.com>
5915
5916 * elfxx-mips.c (mips_elf_calculate_relocation): Take
5917 save_addend argument. Don't apply the 32-bit mask to a
5918 GPREL32 value if it's to be used in another relocation. Don't
5919 use forced-check computation of local_p to decide whether to
5920 add gp0 to GPREL16 value. Don't use only the lowest 16 bits
5921 of the addend of a non-in-place GPREL16 relocation.
5922 (_bfd_mips_elf_relocate_section): Pass use_saved_addend_p to
5923 mips_elf_calculate_relocation().
5924
5925 2002-10-12 Stephane Carrez <stcarrez@nerim.fr>
5926
5927 * elf32-m68hc11.c (m68hc11_elf_relax_section): Don't treat relocs
5928 with symbols in other sections if we relaxed something; the sections
5929 output offsets must be re-computed before.
5930
5931 2002-10-12 Stephane Carrez <stcarrez@nerim.fr>
5932
5933 * elf32-m68hc11.c (m68hc11_elf_relax_section): Update symbols
5934 handling to use Elf_Internal_Sym.
5935 (m68hc11_elf_relax_delete_bytes): Likewise.
5936
5937 2002-10-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5938
5939 * elf32-sh.c (sh_elf_optimized_tls_reloc, sh_elf_mkobject,
5940 sh_elf_object_p, dtpoff_base): New functions.
5941 (sh_elf_howto_table): Add TLS relocs.
5942 (sh_reloc_map): Likewise.
5943 (sh_elf_info_to_howto): Support TLS relocs.
5944 (elf_sh_link_hash_entry): Add tls_type and tls_tpoff32.
5945 (sh_elf_hash_entry, sh_elf_tdata, sh_elf_local_got_tls_type):
5946 New macros.
5947 (sh_elf_obj_tdata): New.
5948 (elf_sh_link_hash_table): Add tls_ldm_got.
5949 (sh_elf_link_hash_table_create): Clear refcount of tls_ldm_got.
5950 (allocate_dynrelocs): Support TLS relocs.
5951 (sh_elf_size_dynamic_sections): Likewise.
5952 (sh_elf_relocate_section): Support TLS relocs. Don't try to find
5953 .rela.got section when found already. Return false after printing
5954 error about unresolvable relocation.
5955 (sh_elf_gc_sweep_hook): Support TLS relocs.
5956 (sh_elf_check_relocs): Likewise.
5957 (sh_elf_finish_dynamic_symbol): Likewise.
5958 (bfd_elf32_mkobject, elf_backend_object_p): Define for TLS case.
5959 * reloc.c: Add SH TLS relocs.
5960 * bfd-in2.h, libbfd.h: Regenerate.
5961
5962 2002-10-11 Daniel Jacobowitz <drow@mvista.com>
5963
5964 * Makefile.in: Regenerated.
5965
5966 2002-10-11 Daniel Jacobowitz <drow@mvista.com>
5967
5968 * Makefile.am: Run dep-am.
5969 (BFD_H_DEP): Add simple.c and linker.c.
5970 (BFD32_LIBS): Add simple.lo.
5971 (BFD32_LIBS_CFILES): Add simple.c.
5972 * Makefile.in: Regenerated.
5973 * bfd-in2.h: Regenerated.
5974 * simple.c: New file.
5975
5976 2002-10-11 Alan Modra <amodra@bigpond.net.au>
5977
5978 * coff-arm.c (record_arm_to_thumb_glue): Avoid type-punned pointers.
5979 (record_thumb_to_arm_glue): Likewise.
5980 * ecoff.c (ecoff_link_add_externals): Likewise.
5981 * elf32-arm.h (record_arm_to_thumb_glue): Likewise.
5982 (record_thumb_to_arm_glue): Likewise.
5983 * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
5984 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
5985 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
5986 * elf64-alpha.c (elf64_alpha_create_dynamic_sections): Likewise.
5987 * elf64-ppc.c (func_desc_adjust): Likewise.
5988 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
5989 (sh64_elf64_create_dynamic_sections): Likewise.
5990 * elflink.c (_bfd_elf_create_got_section): Likewise.
5991 (_bfd_elf_create_dynamic_sections): Likewise.
5992 (_bfd_elf_create_linker_section): Likewise.
5993 * elflink.h (elf_add_default_symbol): Likewise.
5994 (elf_link_create_dynamic_sections): Likewise.
5995 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
5996 * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Likewise.
5997 * elfxx-mips.c (mips_elf_create_got_section): Likewise.
5998 (_bfd_mips_elf_add_symbol_hook): Likewise.
5999 (_bfd_mips_elf_create_dynamic_sections): Likewise.
6000 * linker.c (generic_link_add_symbol_list): Likewise.
6001 * xcofflink.c (xcoff_link_add_symbols): Likewise.
6002
6003 * elfxx-ia64.c (oor_brl, oor_ip): Conditionally define.
6004
6005 * elf64-ppc.c (edit_opd): Only zero opd syms when function is
6006 completely removed. Correct local sym adjustment.
6007
6008 2002-10-10 Stephen Clarke <stephen.clarke@superh.com>
6009
6010 * elf32-sh.c (elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
6011 Correct mistake in calculation of address of .got.
6012 * elf64-sh64.c (elf_sh64_pic_plt_entry_be,
6013 elf_sh64_pic_plt_entry_le): Likewise.
6014
6015 2002-10-09 Richard Shann <richard.shann@superh.com>
6016 Stephen Clarke <stephen.clarke@superh.com>
6017
6018 * Makefile.am: Add entries for elf32-sh64-lin.c and
6019 elf64-sh64-lin.c. Regenerate.
6020 * Makefile.in: Regenerate.
6021 * config.bfd: Change sh64eb-*-linux* and sh64-*-linux*
6022 to use sh64 vectors rather than sh vectors.
6023 * configure.in: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
6024 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
6025 * configure: Regenerate.
6026 * elf32-sh64-lin.c: New file.
6027 * elf64-sh64-lin.c: New file.
6028 * targets.c: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
6029 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
6030
6031 2002-10-08 H.J. Lu <hjl@gnu.org>
6032
6033 * elf32-i386.c (elf_i386_relocate_section): Re-arrange the
6034 IE->LE transition for R_386_TLS_IE.
6035
6036 2002-10-08 Alan Modra <amodra@bigpond.net.au>
6037
6038 * elf64-ppc.c (edit_opd): Correct test for discarded sections.
6039
6040 2002-10-07 Mark Elbrecht <snowball3@softhome.net>
6041
6042 * cofflink.c (mark_relocs): Don't mark relocations in excluded
6043 sections.
6044
6045 2002-10-07 Alan Modra <amodra@bigpond.net.au>
6046
6047 * elflink.h (elf_link_input_bfd): Remove BFD_VERSION_DATE dependent
6048 code.
6049
6050 * elf64-ppc.c (ppc64_elf_build_stubs): Increment .glink indx.
6051
6052 2002-10-06 Alan Modra <amodra@bigpond.net.au>
6053
6054 * opncls.c: Formatting.
6055 (_bfd_new_bfd): Use a smaller section hash table.
6056
6057 2002-10-05 Alexandre Oliva <aoliva@redhat.com>
6058
6059 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Set the type
6060 of the other two relocations packed with a REL32 to NONE.
6061
6062 2002-10-02 Stephen Clarke <stephen.clarke@superh.com>
6063
6064 * elf32-sh.c (elf_sh_link_hash_entry): Add gotplt_refcount.
6065 (sh_elf_link_hash_newfunc): Initialize it.
6066 (allocate_dynrelocs): Transfer gotplt refs from plt.refcount
6067 to got.refcount for symbols that are forced local or when
6068 we have direct got refs.
6069 (sh_elf_gc_sweep_hook): Adjust gotplt_refcount. Use it
6070 to correctly adjust got.refcount and plt.refcount.
6071 (sh_elf_copy_indirect_symbol): Copy gotplt_refcount across.
6072 (sh_elf_check_relocs): Increment gotplt_refcount.
6073
6074 2002-10-01 Jakub Jelinek <jakub@redhat.com>
6075
6076 * elf32-i386.c (elf_i386_relocate_section): Fix
6077 movl foo@indntpoff, %eax IE->LE transition.
6078
6079 2002-10-01 Jakub Jelinek <jakub@redhat.com>
6080
6081 * elf64-x86-64.c (elf64_x86_64_relocate_section): Change TLSGD
6082 sequence and its transitions.
6083
6084 2002-10-01 Jakub Jelinek <jakub@redhat.com>
6085
6086 * elf32-i386.c (elf_i386_relocate_section): Resolve R_386_TLS_LDO_32
6087 to st_value + addend in non-code sections.
6088 * elf64-x86-64.c (elf64_x86_64_relocate_section): Resolve
6089 R_X86_64_DTPOFF32 to st_value + addend in non-code sections.
6090
6091 2002-09-30 Gavin Romig-Koch <gavin@redhat.com>
6092 Ken Raeburn <raeburn@cygnus.com>
6093 Aldy Hernandez <aldyh@redhat.com>
6094 Eric Christopher <echristo@redhat.com>
6095 Richard Sandiford <rsandifo@redhat.com>
6096
6097 * archures.c (bfd_mach_mips4120, bfd_mach_mips5400): New.
6098 (bfd_mach_mips5500): New.
6099 * cpu-mips.c (I_mips4120, I_mips5400, I_mips5500): New.
6100 (arch_info_struct): Add corresponding entries here.
6101 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_4120,
6102 E_MIPS_MACH_5400 and E_MIPS_MACH_5500.
6103 (_bfd_mips_elf_final_write_processing): Handle bfd_mach_mips4120,
6104 bfd_mach_mips5400 and bfd_mach_mips5500.
6105 (_bfd_mips_elf_mach_extends_p): New function.
6106 (_bfd_mips_elf_merge_private_bfd_data): Use it to help merge
6107 the EF_MIPS_MACH flags.
6108 * bfd-in2.h: Regenerate.
6109
6110 2002-09-28 Jason Thorpe <thorpej@wasabisystems.com>
6111
6112 * elf32-vax.c (elf_vax_size_dynamic_section): Don't strip
6113 .got sections.
6114
6115 2002-09-28 Alan Modra <amodra@bigpond.net.au>
6116
6117 * elf.c (map_sections_to_segments): Correct test for start of
6118 writable section in the same page as end of read-only section.
6119
6120 2002-09-27 Matt Thomas <matt@3am-software.com>
6121
6122 * elf32-vax.c (elf_vax_check_relocs): Remove unused
6123 local_got_refcounts usage. Remove allocation of got slot.
6124 (elf_vax_gc_sweep_hook): Remove unused local_got_refcounts usage.
6125 Remove de-allocation of got slot.
6126 (elf_vax_size_dynamic_section): Fix some indentation. Add hash
6127 traversal for elf_vax_instantiate_got_entries. Allow empty .got
6128 sections to be GC'ed.
6129 (elf_vax_instantiate_got_entries): New function.
6130 (elf_vax_relocate_section): Simplify R_VAX_GOT32 handling. Remove
6131 tests that are now handled by elf_vax_instantiate_got_entries.
6132 Assert GOT entry falls within .got section size. Remove redundant
6133 comparisions. Fix comments.
6134
6135 2002-09-27 Jakub Jelinek <jakub@redhat.com>
6136
6137 * reloc.c: Add x86-64 TLS relocs.
6138 * bfd-in2.h, libbfd.h: Rebuilt.
6139 * elf64-x86-64.c (x86_64_elf_howto): Fix size fields for 32-bit
6140 relocs. Add TLS relocs.
6141 (x86_64_reloc_map): Add TLS relocs.
6142 (elf64_x86_64_info_to_howto): Adjust for added TLS relocs.
6143 (struct elf64_x86_64_link_hash_entry): Add tls_type field.
6144 (GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD, GOT_TLS_IE): Define.
6145 (elf64_x86_64_hash_entry): Define.
6146 (struct elf64_x86_64_obj_tdata): New.
6147 (elf64_x86_64_tdata, elf64_x86_64_local_got_tls_type): Define.
6148 (struct elf64_x86_64_link_hash_table): Add tls_ld_got.
6149 (link_hash_newfunc): Initialize tls_type.
6150 (elf64_x86_64_link_hash_table_create): Initialize tls_ld_got.
6151 (elf64_x86_64_copy_indirect_symbol): Swap tls_type if necessary.
6152 (elf64_x86_64_mkobject): New.
6153 (elf64_x86_64_elf_object_p): Allocate struct elf64_x86_64_obj_tdata.
6154 (elf64_x86_64_tls_transition): New.
6155 (elf64_x86_64_check_relocs): Add r_type variable and use it.
6156 Handle TLS relocs.
6157 (elf64_x86_64_gc_sweep_hook): Handle TLS relocs.
6158 (allocate_dynrelocs): Allocate GOT space for TLS relocs.
6159 (elf64_x86_64_size_dynamic_sections): Likewise.
6160 (dtpoff_base, tpoff): New.
6161 (elf64_x86_64_relocate_section): Handle TLS relocs.
6162 (elf64_x86_64_finish_dynamic_symbol): Only handle non-TLS GOT
6163 entries.
6164 (bfd_elf64_mkobject): Define.
6165
6166 * elf32-i386.c (elf_i386_check_relocs) [R_386_TLS_LE]: Set
6167 DF_STATIC_TLS if shared.
6168
6169 2002-09-26 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6170
6171 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Don't emit unneeded
6172 empty relocation sections.
6173
6174 2002-09-26 Alan Modra <amodra@bigpond.net.au>
6175
6176 * elf64-ppc.c (ppc_build_one_stub): Don't build glink stubs here.
6177 (ppc64_elf_build_stubs): Build them here instead.
6178
6179 2002-09-24 Jakub Jelinek <jakub@redhat.com>
6180
6181 * elf32-sparc.c (elf32_sparc_relocate_section): Put R_SPARC_RELATIVE
6182 addend into r_addend, not *r_offset.
6183 (elf32_sparc_finish_dynamic_symbol): Likewise.
6184 * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Clear xword at
6185 R_SPARC_RELATIVE's r_offset.
6186
6187 2002-09-23 Nathan Tallent <eraxxon@alumni.rice.edu>
6188
6189 * dwarf2.c (decode_line_info): Update to correctly decode
6190 the (non-standard DWARF2) out-of-order address sequences
6191 generated by the Intel C++ 6.0 compiler for ia64-Linux.
6192
6193 2002-09-23 Mark Elbrecht <snowball3@softhome.net>
6194
6195 * config.bfd: For DJGPP targets, match with any cpu and any machine.
6196
6197 2002-09-23 Alan Modra <amodra@bigpond.net.au>
6198
6199 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Zero relocs
6200 for discarded FDEs. Remove redundant assignment.
6201 * elflink.h (elf_bfd_discard_info): Save edited relocs.
6202
6203 2002-09-22 H.J. Lu <hjl@gnu.org>
6204
6205 * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Don't merge
6206 the relocation count between different .reloc sections.
6207
6208 2002-09-21 Alan Modra <amodra@bigpond.net.au>
6209
6210 * elf32-ppc.c (ppc_elf_relocate_section): Allow ".sbss.*" and
6211 ".sdata.*" for R_PPC_SDAREL16, ".sbss2*" and ".sdata2*" for
6212 R_PPC_EMB_SDA2REL. Similarly for R_PPC_EMB_SDA21 and
6213 R_PPC_EMB_RELSDA.
6214
6215 * elfcode.h (elf_slurp_reloc_table_from_section): Make "symcount"
6216 unsigned. Move "symcount" assignment out of loop.
6217 * Makefile.am: Run "make dep-am".
6218 * Makefile.in: Regenerate.
6219 * configure: Regenerate.
6220 * po/SRC-POTFILES.in: Regnerate.
6221
6222 2002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
6223
6224 * dwarf2.c (_bfd_dwarf2_find_nearest_line): If address length is
6225 zero, set it to 8 for (non-standard) 64-bit DWARF2 formats
6226 (e.g. IRIX64).
6227
6228 2002-09-19 Jakub Jelinek <jakub@redhat.com>
6229
6230 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Clear .got word
6231 even if generating R_PPC_RELATIVE reloc.
6232 (ppc_elf_relocate_section): Make sure relocation is performed
6233 if skip == -2. Clear memory at r_offset when creating dynamic
6234 relocation.
6235
6236 2002-09-19 Jakub Jelinek <jakub@redhat.com>
6237
6238 * reloc.c (BFD_RELOC_386_TLS_TPOFF, BFD_RELOC_386_TLS_IE,
6239 BFD_RELOC_386_TLS_GOTIE): Add.
6240 * bfd-in2.h, libbfd.h: Rebuilt.
6241 * elf32-i386.c (elf_howto_table): Add R_386_TLS_TPOFF, R_386_TLS_IE
6242 and R_386_TLS_GOTIE.
6243 (elf_i386_reloc_type_lookup): Handle it.
6244 (struct elf_i386_link_hash_entry): Change tls_type type to unsigned
6245 char instead of enum, change GOT_* into defines.
6246 (GOT_TLS_IE_POS, GOT_TLS_IE_NEG, GOT_TLS_IE_BOTH): Define.
6247 (elf_i386_tls_transition): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
6248 (elf_i386_check_relocs): Likewise. Avoid crash if local symbol is
6249 accessed both as normal and TLS symbol. Move R_386_TLS_LDM and
6250 R_386_PLT32 cases so that R_386_TLS_IE can fall through.
6251 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
6252 (elf_i386_gc_sweep_hook): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
6253 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
6254 (allocate_dynrelocs): Allocate 2 .got and 2 .rel.got entries if
6255 tls_type is GOT_TLS_IE_BOTH.
6256 (elf_i386_size_dynamic_sections): Likewise.
6257 (elf_i386_relocate_section): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
6258 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
6259 (elf_i386_finish_dynamic_symbol): Use tls_type & GOT_TLS_IE to catch
6260 all 4 GOT_TLS_* TLS types.
6261
6262 2002-09-19 Nick Clifton <nickc@redhat.com>
6263
6264 * elflink.h (elf_fix_symbol_flags): When examining weak symbols,
6265 follow indirect links.
6266
6267 2002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
6268
6269 * ecoffswap.h (ecoff_swap_pdr_in) <isym, iline>: Update to
6270 correctly sign-extend 32-bit ECOFF null values (0xffffffff, -1)
6271 on 64 bit machines.
6272 (ecoff_swap_sym_in) <iss>: Likewise.
6273 * ecoff.c (_bfd_ecoff_slurp_symbolic_info): Fix error reading
6274 ECOFF information: 'ioptMax' refers to the actual *size*
6275 of the optimization symtab, not the number of entries.
6276
6277 2002-09-19 Daniel Jacobowitz <drow@mvista.com>
6278
6279 * elf32-arm.h (elf32_arm_adjust_dynamic_symbol): Update
6280 ELF_LINK_HASH_NEEDS_PLT logic.
6281
6282 2002-09-18 Daniel Jacobowitz <drow@mvista.com>
6283
6284 * elfcode.h (elf_slurp_reloc_table_from_section): Check
6285 correct relocation count.
6286
6287 2002-09-17 Daniel Jacobowitz <drow@mvista.com>
6288
6289 * bfd-in.h (bfd_get_dynamic_symcount): Define.
6290 * bfd.c (struct _bfd): Add dynsymcount.
6291 * bfd-in2.h: Regenerated.
6292 * elf.c (_bfd_elf_canonicalize_dynamic_symtab): Set
6293 abfd->dynsymcount.
6294 * elfcode.h (elf_slurp_reloc_table_from_section): Check
6295 for overflow.
6296
6297 2002-09-17 Stan Cox <scox@redhat.com>
6298
6299 * elf64-mips.c (mips_elf64_be_swap_reloca_out): Handle type2 and type3.
6300 (mips_elf64_final_gp): Don't make up gp value.
6301 * elfn32-mips.c (mips_elf_final_gp): Likewise.
6302 * elfxx-mips.c (_bfd_mips_elf_final_link): Always create
6303 .MIPS.options/.options section.
6304
6305 2002-09-17 David O'Brien <obrien@FreeBSD.org>
6306
6307 * elf32-i386-fbsd.c: Always label using the EI_OSABI method.
6308 It is benign for FreeBSD < 4.1. Minor reformatting.
6309 * elf64-alpha-fbsd.c: Likewise.
6310
6311 2002-09-17 Jakub Jelinek <jakub@redhat.com>
6312
6313 * elf32-i386.c (elf_i386_relocate_section) [R_386_TLS_TPOFF32]: Negate
6314 addend.
6315
6316 2002-09-17 Alan Modra <amodra@bigpond.net.au>
6317
6318 * elf64-alpha.c (alpha_elf_size_info): Make static.
6319
6320 2002-09-17 Svein E. Seldal <Svein.Seldal@solidas.com>
6321
6322 * coff-tic4x.c: Add function declarations and ATTRIBUTE_UNUSED.
6323 * cpu-tic4x.c: Ditto.
6324
6325 2002-09-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6326
6327 * elf64-mips.c (define elf_backend_ignore_discarded_relocs): Remove
6328 duplicate define.
6329
6330 2002-09-16 Bruno Haible <bruno@clisp.org>
6331
6332 * elf32-i386.c: Don't defined ELF_ARCH etc. if this file is included
6333 by a target variant implementation.
6334 * elf64-alpha.c: Likewise.
6335 * elf32-i386-fbsd.c: New file.
6336 * elf64-alpha-fbsd.c: New file.
6337 * targets.c: Support bfd_elf32_i386_freebsd_vec and
6338 bfd_elf64_alpha_freebsd_vec.
6339 * configure.in: Accept the vectors bfd_elf32_i386_freebsd_vec,
6340 bfd_elf64_alpha_freebsd_vec.
6341 * Makefile.am (BFD32_BACKENDS): Add elf32-i386-fbsd.lo.
6342 (BFD32_BACKENDS_CFILES): Add elf32-i386-fbsd.c.
6343 (BFD64_BACKENDS): Add elf64-alpha-fbsd.lo.
6344 (BFD64_BACKENDS_CFILES): Add elf64-alpha-fbsd.c.
6345 (elf32-i386-fbsd.lo, elf64-alpha-fbsd.lo): Add dependencies.
6346 * config.bfd: For FreeBSD targets, set targ_defvec to a FreeBSD
6347 specific targets. Define OLD_FREEBSD_ABI_LABEL if appropriate.
6348
6349 2002-09-12 Jakub Jelinek <jakub@redhat.com>
6350
6351 * elf32-i386.c (dtpoff_base, tpoff): Don't crash if tls_segment is
6352 NULL.
6353 (elf_i386_relocate_section): Return false after printing error about
6354 unresolvable relocation.
6355
6356 2002-09-12 Nick Clifton <nickc@redhat.com>
6357
6358 * elf32-arm.h (elf32_arm_final_link_relocate): Fix handling of
6359 R_ARM_THM_PC11.
6360
6361 2002-09-11 Jeffrey Law <law@redhat.com>
6362
6363 * elf32-h8300.c (elf32_h8_relax_section): Fix typo.
6364
6365 2002-09-11 Andrew Haley <aph@cambridge.redhat.com>
6366
6367 * elf.c (_bfd_elf_find_nearest_line): Check functionname_ptr and
6368 line_ptr before deciding we've found a symbol.
6369
6370 2002-09-11 Nick Clifton <nickc@redhat.com>
6371
6372 * po/da.po: New Danish translation file.
6373 * configure.in (LINGUAS): Add 'da'.
6374 * configure: Regenerate.
6375
6376 2002-09-10 Michael Snyder <msnyder@redhat.com>
6377
6378 * irix-core.c (do_sections, do_sections64): New functions.
6379 (irix_core_core_file_p): Call new functions do_sections,
6380 do_sections64, depending on corefile (32-bit or 64-bit).
6381
6382 2002-09-09 Richard Henderson <rth@redhat.com>
6383
6384 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21M
6385 and PCREL21F like PCREL21B.
6386
6387 2002-09-04 Kevin Buettner <kevinb@redhat.com>
6388
6389 * config.bfd (mips*-*-irix6*): Add new ABI vectors. Make n32 default
6390 vector.
6391
6392 2002-09-02 Nick Clifton <nickc@redhat.com>
6393
6394 * elf32-v850.c (v850_elf_final_link_relocate): Use helpful
6395 names instead of cryptically overloaded bfd_reloc error
6396 codes.
6397 (v850_elf_relocate_section): Likewise.
6398 (v850_elf_relax_section): Replace caching of external symbols
6399 with caching of internal symbols obtained from calling
6400 bfd_elf_get_elf_syms().
6401 Fixup problems with freeing cached allocated memory blocks.
6402
6403 2002-09-02 Alan Modra <amodra@bigpond.net.au>
6404
6405 * cpu-pj.c (scan_mach, compatible, arch_info_struct): Remove.
6406 (bfd_pj_arch): Use bfd_default_scan.
6407 * cpu-v850.c (scan): Remove.
6408 (N): Use bfd_default_scan.
6409 * cpu-z8k.c (scan_mach): Remove.
6410 (arch_info_struct, bfd_z8k_arch): Reorganize so that the default is
6411 first. Use bfd_default_scan.
6412
6413 * ecoff.c (_bfd_ecoff_set_arch_mach_hook): Don't use hard-coded
6414 bfd_mach constants.
6415 (ecoff_get_magic): Likewise.
6416 * elf32-v850.c (v850_elf_object_p): Likewise.
6417 (v850_elf_final_write_processing): Likewise.
6418 * mipsbsd.c (MY(set_arch_mach)): Likewise.
6419 (MY(write_object_contents)): Likewise.
6420 * coff64-rs6000.c (xcoff64_write_object_contents): Likewise.
6421 * coffcode.h (coff_write_object_contents): Likewise.
6422 (coff_set_arch_mach_hook): Add comment describing machine == 0.
6423 Remove unnecessary "machine" assignments.
6424 (coff_write_relocs): Test for the absolute section sym by testing
6425 section and flags.
6426
6427 * aoutx.h (NAME(aout,machine_type)): Recognize bfd_mach_i386_i386
6428 and bfd_mach_i386_i386_intel_syntax.
6429 * pdp11.c (NAME(aout,machine_type)): Likewise.
6430
6431 2002-08-30 John David Anglin <dave@hiauly1.hia.nrc.ca>
6432
6433 * bfd-in.h (align_power): Cast constants to bfd_vma type.
6434 * bfd-in2.h (align_power): Likewise.
6435
6436 2002-08-30 Alan Modra <amodra@bigpond.net.au>
6437
6438 * Makefile.am: Run "make dep-am".
6439 * Makefile.in: Regenerate.
6440
6441 * cpu-avr.c (compatible): Don't use hard-coded mach constants.
6442 * cpu-powerpc.c (powerpc_compatible): Likewise.
6443 * cpu-rs6000.c (rs6000_compatible): Likewise.
6444
6445 2002-08-28 Catherine Moore <clm@redhat.com>
6446
6447 * elf32-v850.c (v850_elf_reloc_map): Add new relocs.
6448 (v850-elf-reloc): Don't resolve pc relative relocs.
6449 (v850_elf_ignore_reloc): New routine.
6450 (v850_elf_final_link_relocate): Handle new relocs.
6451 (v850_elf_relax_delete_bytes ): New routine.
6452 (v850_elf_relax_section): New routine.
6453 (bfd_elf32_bfd_relax_section): Define.
6454 (HOWTO): New entries for new relocs.
6455 * reloc.c (BFD_RELOC_V850_LONGCALL): New reloc.
6456 (BFD_RELOC_V850_LONGJUMP): New reloc.
6457 (BFD_RELOC_V850_ALIGN): New reloc.
6458 * archures.c: Remove redundant v850ea architecture.
6459 * cpu-v850.c: Remove redundant v850ea support.
6460 * libbfd.h: Regenerate.
6461 * bfd-in2.h: Regenerated.
6462
6463 2002-08-28 Svein E. Seldal <Svein.Seldal@solidas.com>
6464
6465 * config.bfd: Add tic4x-*-*coff* and c4x-*-*coff* target.
6466 * configure.in: Add tic4x_coff vector files.
6467 * configure: Regenerate.
6468 * Makefile.am: Add tic4x target.
6469 * Makefile.in: Regenerate.
6470
6471 2002-08-27 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
6472
6473 * archures.c: Add the BFD arch type tic4x.
6474 * bfd-in.h: Add BFD_IN_MEMORY flag.
6475 * coff-tic4x.c: New file.
6476 * coffswap.h (coff_swap_sym_out): Add preadjuster.
6477 * cpu-tic4x.c: New file.
6478 * targets.c: Added tic4x- in list of xvecs.
6479 * ticoff.h: New file.
6480 * bfd-in2.h: Regenerate.
6481
6482 2002-08-27 Adam Nemet <anemet@lnxw.com>
6483
6484 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Set the last
6485 bit of DT_INIT and DT_FINI for Thumb functions.
6486
6487 2002-08-26 Alan Modra <amodra@bigpond.net.au>
6488
6489 * coffcode.h (coff_set_arch_mach_hook): Handle W65MAGIC.
6490
6491 2002-08-26 Alan Modra <amodra@bigpond.net.au>
6492
6493 * aoutx.h (NAME(aout,reloc_type_lookup)): Handle BFD_RELOC_8.
6494
6495 2002-08-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6496
6497 * elf32-sh.c (sh_elf_copy_indirect_symbol): New.
6498 (create_got_section, allocate_dynrelocs, readonly_dynrelocs):
6499 Likewise.
6500 (struct elf_sh_pcrel_relocs_copied): Removed.
6501 (struct elf_sh_dyn_relocs): New.
6502 (struct elf_sh_link_hash_entry): Replace pcrel_relocs_copied
6503 field with dyn_relocs.
6504 (struct elf_sh_link_hash_table): Add short-cuts to get dynamic
6505 sections and sym_sec.
6506 (sh_elf_link_hash_newfunc): Clear dyn_relocs.
6507 (sh_elf_link_hash_table_create): Clear shorts-cuts and sym_sec.
6508 (sh_elf_create_dynamic_sections): Use create_got_section instead
6509 of _bfd_elf_create_got_section.
6510 (sh_elf_check_relocs): Likewise.
6511 (sh_elf_create_dynamic_sections): Use short-cuts to the dynamic
6512 sections.
6513 (sh_elf_adjust_dynamic_symbol, sh_elf_size_dynamic_sections,
6514 sh_elf_relocate_section, sh_elf_check_relocs,
6515 sh_elf_finish_dynamic_symbol, sh_elf_finish_dynamic_sections):
6516 Likewise.
6517 (sh_elf_adjust_dynamic_symbol): Handle nocopyreloc. Keep the
6518 dynamic relocations and avoiding the copy relocation when we
6519 didn't find any dynamic relocations in the section which has
6520 contents or is read-only.
6521 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
6522 (sh_elf_size_dynamic_sections): Don't reset the size of
6523 .rela.got section even if dynamic_sections_created flag is off.
6524 Don't use sh_elf_discard_copies. Scan all input bfd and use
6525 allocate_dynrelocs. Call readonly_dynrelocs to determine
6526 whether we need DT_TEXTREL.
6527 (sh_elf_adjust_dynamic_symbol): Use plt.refcount to determine
6528 whether the symbol was never referred to.
6529 (sh_elf_relocate_section): Use WILL_CALL_FINISH_DYNAMIC_SYMBOL.
6530 (sh_elf_gc_sweep_hook): Fill with the real sweep function.
6531 (sh_elf_check_relocs): Call create_got_section if the short-cut
6532 to .got is null. Increment reference counters only instead of
6533 allocating space on dynamic sections here. Don't conditionalize
6534 uninitialized got.offset value when marking the symbol as a
6535 global offset table entry. Keep relocations for symbols satisfied
6536 by a dynamic library to avoid copy relocations for the symbol.
6537 Set dynobj field of an elf hash table if needed.
6538 (sh_elf_finish_dynamic_sections): Handle null section pointer
6539 correctly.
6540 (elf_backend_copy_indirect_symbol): Defined.
6541 (elf_backend_can_refcount): Defined.
6542
6543 2002-08-23 Nick Clifton <nickc@redhat.com>
6544
6545 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Undo
6546 previous change. Add comment explaining why.
6547
6548 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>
6549
6550 * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le): Copy
6551 contents of .got.plt[2] to tr0, not address of .got.plt.
6552 (sh_elf_finish_dynamic_symbol): Do not apply GOT_BIAS when
6553 patching absolute plt entry. For shmedia plt entry, set bottom bit
6554 of branch to plt0 as this is a branch to an shmedia instruction.
6555 * elf64-sh64.c (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le):
6556 Copy contents of .got.plt[2] to tr0, not address of .got.plt.
6557 (elf_sh64_plt_entry_be, elf_sh64_plt_entry_le): Use ptrel to
6558 branch to plt0.
6559 (sh64_elf64_finish_dynamic_symbol): Do not apply GOT_BIAS when
6560 patching absolute plt entry. For shmedia plt entry, branch to
6561 plt0 is now ptrel, so use relative offset. Set bottom bit of
6562 branch target as it is a branch to an shmedia instruction.
6563
6564 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>,
6565 Richard Shann <richard.shann@superh.com>
6566
6567 * elf32-sh.c (sh_elf_finish_dynamic_sections): Set LSB of DT_INIT
6568 value if .init is an SHmedia function. Similarly for DT_FINI.
6569 * elf64-sh64.c (sh64_elf64_finish_dynamic_sections): Likewise.
6570
6571 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>
6572
6573 * elf32-sh.c (sh_elf_size_dynamic_sections): Zero initialize
6574 dynamic section.
6575 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
6576
6577 2002-08-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6578
6579 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use a simple
6580 byte read when reading the return address register column.
6581
6582 2002-08-22 Nick Clifton <nickc@redhat.com>
6583
6584 * config.bfd: Add powepc64-*-*bsd* target.
6585
6586 2002-08-22 Graeme Peterson <gp@qnx.com>
6587
6588 * Makefile.am: Add entries for elf32-shqnx.c
6589 * Makefile.in: Regenerate.
6590 * config.bfd: Add support sh-*-nto* target.
6591 * configure.in: Add support for bfd_elf32_sh{l}qnx_vec.
6592 * configure: Regenerate.
6593 * elf32-qnx.h: Changed typo "elf_i386qnx_*" to "elf_qnx_*" .
6594 * elf32-sh.c: Do not include elf32-target.h if
6595 ELF32_SH_C_INCLUDED is defined.
6596 * elf32-shqnx.c: New file: Support for QNX.
6597 * targets.c: Add bfd_elf32_sh{l}qnx_vec.
6598
6599 2002-08-22 Nick Clifton <nickc@redhat.com>
6600
6601 * po/tr.po: Updated Turkish translation.
6602
6603 * syms.c (_bfd_generic_read_minisymbols): Set bfd_error if the
6604 symbols are not read.
6605
6606 2002-08-22 Alan Modra <amodra@bigpond.net.au>
6607
6608 * elf32-m68hc11.c: Formatting fixes.
6609 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
6610 * elf32-m68hc12.c: Formatting fixes.
6611 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
6612
6613 2002-08-22 Alan Modra <amodra@bigpond.net.au>
6614
6615 * coff-rs6000.c (rs6000coff_vec <object_flags>): Add SEC_CODE and
6616 SEC_DATA.
6617 (pmac_xcoff_vec): Likewise.
6618 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
6619 (aix5coff64_vec): Likewise.
6620
6621 2002-08-22 Alan Modra <amodra@bigpond.net.au>
6622
6623 * elf-bfd.h (struct elf_backend_data): Add struct elf_backend_data
6624 param to elf_backend_copy_indirect_symbol.
6625 (_bfd_elf_link_hash_copy_indirect): Likewise.
6626 * elflink.h (elf_add_default_symbol, elf_fix_symbol_flags): Adjust
6627 calls to copy_indirect_symbol.
6628 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
6629 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
6630 * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
6631 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
6632 * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
6633 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
6634 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
6635 * elfxx-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
6636 * elfxx-mips.h (_bfd_mips_elf_copy_indirect_symbol): Likewise.
6637 * elf.c (_bfd_elf_link_hash_copy_indirect): Likewise. Properly
6638 test refcounts for "used" values.
6639
6640 2002-08-21 John David Anglin <dave@hiauly1.hia.nrc.ca>
6641
6642 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Add PARAMS to
6643 argument declaration.
6644
6645 2002-08-19 Elena Zannoni <ezannoni@redhat.com>
6646
6647 * archures.c (bfd_mach_ppc_e500): Added.
6648 * bfd-in2.h: Rebuilt.
6649 * cpu-powerpc.c (bfd_powerpc_archs): Added e500.
6650
6651 2002-08-19 Alan Modra <amodra@bigpond.net.au>
6652
6653 * elf32-m68hc12.c (elf_backend_can_gc_sections): False.
6654
6655 2002-08-17 Andrew Cagney <ac131313@redhat.com>
6656
6657 * elf.c (bfd_elf_get_elf_syms): Change type of `esym' to
6658 `bfd_byte'.
6659
6660 2002-08-17 Stan Cox <scox@redhat.com>
6661
6662 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Use the
6663 IRIX 6 segment layout for NEWABI.
6664
6665 2002-08-16 Stephen Clarke <stephen.clarke@superh.com>
6666
6667 * elf32-sh.c (sh_elf_gc_mark_hook): For sh64, skip indirect
6668 symbols when looking for section referred to by a relocation.
6669 * elf64-sh.c (sh_elf64_gc_mark_hook): Likewise.
6670
6671 2002-08-15 Alan Modra <amodra@bigpond.net.au>
6672
6673 * elf32-i370.c: Move reloc enum to include/elf/i370.h.
6674
6675 2002-08-15 Hans-Peter Nilsson <hp@axis.com>
6676
6677 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Add
6678 missing check for whether the symbol is referenced by DSO before
6679 unexporting it as an unneeded dynamic symbol.
6680
6681 2002-08-14 H.J. Lu <hjl@gnu.org>
6682
6683 * libbfd.h: Regenerate.
6684
6685 2002-08-14 H.J. Lu <hjl@gnu.org>
6686
6687 * config.bfd: Always add 64bit vectors to 32bit Linux/mips.
6688
6689 2002-08-14 Stephane Carrez <stcarrez@nerim.fr>
6690
6691 * elf32-m68hc11.c (m68hc11_relax_group): New to relax group of
6692 instructions.
6693 (m68hc11_direct_relax): New to define table of relaxable instructions.
6694 (find_relaxable_insn): New, find a relaxable insn.
6695 (compare_reloc): New to compare two relocs.
6696 (m68hc11_elf_relax_section): New, relax text sections.
6697 (m68hc11_elf_relax_delete_bytes): New, delete bytes and adjust branchs.
6698 (elf32_m68hc11_check_relocs): New function for GC support.
6699 (elf32_m68hc11_relocate_section): New function for GC support.
6700 (bfd_elf32_bfd_relax_section): Define to support linker relaxation.
6701 (elf_backend_check_relocs): Likewise.
6702 (elf_backend_relocate_section): Likewise.
6703
6704 2002-08-13 H.J. Lu <hjl@gnu.org>
6705
6706 * elflink.h (NAME(bfd_elf,size_dynamic_sections): Don't count
6707 definitions in shared objects when checking symbol with
6708 undefined version.
6709
6710 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6711
6712 * elf32-m68hc11.c (elf32_m68hc11_gc_mark_hook): New for section GC.
6713 (elf32_m68hc11_gc_sweep_hook): Likewise.
6714 (elf_backend_gc_mark_hook): Define for GC section support.
6715 (elf_backend_gc_sweep_hook): Likewise.
6716 (elf_backend_can_gc_sections): Likewise.
6717
6718 * elf32-m68hc12.c: Likewise.
6719
6720 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6721
6722 * elf32-m68hc11.c (_bfd_m68hc11_elf_print_private_bfd_data): New.
6723 (_bfd_m68hc11_elf_merge_private_bfd_data): New function.
6724 (_bfd_m68hc11_elf_set_private_flags): New function.
6725 Use them to set/check/print ELF flags specific to 68HC11.
6726
6727 * elf32-m68hc12.c (_bfd_m68hc12_elf_print_private_bfd_data): New.
6728 (_bfd_m68hc12_elf_merge_private_bfd_data): New function.
6729 (_bfd_m68hc12_elf_set_private_flags): New function.
6730 Use them to set/check/print ELF flags specific to 68HC12.
6731
6732 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6733
6734 * elf32-m68hc11.c (elf_m68hc11_howto_table): Add the new relocs;
6735 fix masks for PC-rel relocs.
6736 (m68hc11_elf_ignore_reloc): New function.
6737
6738 * elf32-m68hc12.c (m68hc12_elf_special_reloc): New to handle specific
6739 68HC12 banked addressing relocs.
6740 (m68hc12_phys_addr): New to compute physical address of banked memory.
6741 (m68hc12_phys_page): Likewise for page.
6742 (m68hc12_addr_is_banked): New to see if address is in banked area.
6743 (elf_m68hc12_howto_table): Add new relocs and rename to xx12.
6744
6745 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6746
6747 * reloc.c (BFD_RELOC_M68HC11_RL_JUMP, BFD_RELOC_M68HC11_RL_GROUP,
6748 BFD_RELOC_M68HC11_LO16, BFD_RELOC_M68HC11_PAGE,
6749 BFD_RELOC_M68HC11_24): New relocs for 68HC11/68HC12.
6750 * bfd-in2.h: Regenerate.
6751
6752 2002-08-12 H.J. Lu <hjl@gnu.org>
6753
6754 * elflink.h (elf_add_default_symbol): Preserve section across
6755 elf_merge_symbol.
6756
6757 2002-08-09 Graeme Peterson <gp@qnx.com>
6758
6759 * Makefile.am: Add entries for elf32-ppcqnx.c, and add
6760 elf32-qnx.h dependency to elfarmqnx-nabi.c and elf32-i386qnx.c.
6761 * Makefile.in: Regenerate.
6762 * config.bfd: Add support for powerpc{le}-*-nto targets.
6763 * configure.in: Add support for bfd_elf32_powerpc{le}qnx_vec.
6764 * configure: Regenerate.
6765 * elf32-i386qnx.c: Moved backend functions into a QNX specific
6766 common file "elf32-qnx.h", and now include that file.
6767 * elf32-qnx.h: New file: QNX specific common elf backend.
6768 * elf32-ppc.c: Do not include elf32-target.h if
6769 ELF32_PPC_C_INCLUDED is defined.
6770 * elf32-ppcqnx.c: New file: Support for QNX.
6771 * elfarmqnx-nabi.c: Include elf32-qnx.h for qnx elf backend.
6772 * targets.c: Add bfd_elf32_powerpc{le}qnx_vec.
6773
6774 2002-08-09 Nick Clifton <nickc@redhat.com>
6775
6776 * po/sv.po: Updated Swedish translation.
6777
6778 2002-08-09 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6779
6780 * elfxx-mips.c (mips_elf_global_got_index): Avoid segfault if
6781 g->global_gotsym is NULL.
6782
6783 2002-08-08 H.J. Lu <hjl@gnu.org>
6784
6785 * elflink.h (elf_add_default_symbol): Don't warn if a definition
6786 overrides an indirect versioned symbol.
6787
6788 2002-08-08 Jakub Jelinek <jakub@redhat.com>
6789
6790 * elf32-i386.c (elf_i386_relocate_section): Fill in proper addend
6791 for R_386_TLS_TPOFF32 relocs against symndx 0.
6792
6793 2002-08-07 H.J. Lu <hjl@gnu.org>
6794
6795 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Check symbol
6796 with undefined version if needed.
6797 (elf_link_assign_sym_version): Match a default symbol with a
6798 version without definition. No need to hide the default
6799 definition separately.
6800
6801 2002-08-08 Alan Modra <amodra@bigpond.net.au>
6802
6803 * elflink.h (elf_link_output_extsym): Don't output symbols from
6804 SEC_EXCLUDE sections.
6805
6806 * aoutx.h (aout_link_write_symbols): Correct handling of warning syms.
6807
6808 2002-08-07 Alan Modra <amodra@bigpond.net.au>
6809
6810 * elf64-ppc.c (edit_opd): Arrange to drop symbols for discarded .opd
6811 entries.
6812
6813 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6814
6815 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Cast signedness
6816 mismatch.
6817
6818 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6819
6820 * elfxx-mips.c (ABI_64_P): Remove superfluous check.
6821
6822 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6823
6824 * elf32-mips.c (mips_reloc_map): Fix typo.
6825
6826 2002-08-06 Alan Modra <amodra@bigpond.net.au>
6827
6828 * xcofflink.c (xcoff_write_global_symbol): Set n_scnum for abs_section.
6829
6830 2002-08-06 Alan Modra <amodra@bigpond.net.au>
6831
6832 * elf64-ppc.c (ppc64_elf_howto_raw): Zero all src_mask entries.
6833
6834 2002-08-06 Alan Modra <amodra@bigpond.net.au>
6835
6836 * libxcoff.h: Use PARAMS on function declarations.
6837 * coff-rs6000.c (xcoff_generate_rtinit): Simplify size calc.
6838 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
6839
6840 * coff-rs6000.c: (xcoff_rtype2howto): Don't place reloc address in
6841 addend.
6842 * coff64-rs6000.c: (xcoff64_rtype2howto): Likewise.
6843
6844 2002-08-06 Alan Modra <amodra@bigpond.net.au>
6845
6846 * coff-rs6000.c: Formatting fixes.
6847 (xcoff_calculate_relocation): Use PARAMS in declaration.
6848 (xcoff_complain_overflow): Likewise.
6849 (xcoff_ppc_relocate_section): Use old-style function pointer call.
6850 (bfd_xcoff_backend_data): Remove useless comments.
6851 (rs6000coff_vec): Likewise.
6852 (bfd_pmac_xcoff_backend_data): Likewise.
6853 (pmac_xcoff_vec): Likewise.
6854
6855 * coff64-rs6000.c: Formatting fixes.
6856 (xcoff64_calculate_relocation): Use PARAMS in declaration.
6857 (xcoff64_ppc_relocate_section): Use old-style function pointer call.
6858 (bfd_xcoff_backend_data): Remove useless comments.
6859 (rs6000coff64_vec): Likewise.
6860 (bfd_xcoff_aix5_backend_data): Likewise.
6861 (aix5coff64_vec): Likewise.
6862
6863 2002-08-06 Alan Modra <amodra@bigpond.net.au>
6864
6865 * coff-rs6000.c (xcoff_howto_table): Revert some of last change to
6866 mask entries. Use complain_overflow_dont for R_REF.
6867 (xcoff_reloc_type_ba): Revert last change.
6868 (xcoff_reloc_type_br): Likewise.
6869 (xcoff_reloc_type_crel): Likewise.
6870 (xcoff_ppc_relocate_section): Likewise.
6871 * coff64-rs6000.c (xcoff64_reloc_type_br): Likewise.
6872 (xcoff64_ppc_relocate_section): Likewise.
6873 (xcoff64_howto_table): Revert some of last change to mask entries.
6874 Use complain_overflow_dont for R_REF.
6875
6876 * coff-rs6000.c (xcoff_howto_table): Fix src_mask entries. Make all
6877 relocs with bitsize == 16 have size = 1.
6878 (xcoff_reloc_type_ba): Correct src_mask and dst_mask adjustment.
6879 (xcoff_reloc_type_br): Likewise.
6880 (xcoff_reloc_type_crel): Likewise.
6881 (xcoff_ppc_relocate_section): Set up src_mask and dst_mask correctly.
6882 * coff64-rs6000.c (xcoff64_reloc_type_br): Correct src_mask and
6883 dst_mask adjustment.
6884 (xcoff64_ppc_relocate_section): Set up src_mask and dst_mask correctly.
6885 (xcoff64_howto_table): Fix src_mask entries. Make all relocs with
6886 bitsize == 16 have size = 1.
6887
6888 2002-08-01 Denis Chertykov <denisc@overta.ru>
6889
6890 * elf32-ip2k.c: Processor manufacturer changed to Ubicom.
6891 (struct misc): New field isymbuf. All free_* fields removed.
6892 (symbol_value): Pass in internal syms. No need to swap syms in.
6893 (ip2k_elf_relax_section): Use bfd_elf_get_elf_syms. Properly free
6894 possibly cached info.
6895 (tidyup_after_error): Removed.
6896 (ip2k_elf_relax_section_pass1): Don't use removed fields of struct
6897 misc. Use new field.
6898 (adjust_all_relocations): Use internal syms. No need to swap syms
6899 in and out.
6900 (add_page_insn): Don't use removed fields of struct misc.
6901
6902 2002-08-01 Nick Clifton <nickc@redhat.com>
6903
6904 * elf32-arm.h: Revert previous delta.
6905
6906 2002-08-01 Nick Clifton <nickc@redhat.com>
6907
6908 * configure.in (AM_INIT_AUTOMAKE): Bump version number.
6909 * configure: Regenerate.
6910
6911 2002-07-31 H.J. Lu <hjl@gnu.org>
6912
6913 * config.bfd: Add x86-64 vector to Linux/i386 if 64bit BFD is
6914 selected.
6915
6916 2002-07-31 H.J. Lu <hjl@gnu.org>
6917
6918 * config.bfd: Add n32 vectors to 32bit Linux/mips if 64bit BFD
6919 is selected.
6920
6921 2002-07-31 Jakub Jelinek <jakub@redhat.com>
6922
6923 * elf32-i386.c (elf_i386_copy_indirect_symbol): Swap tls_type
6924 if _bfd_elf_link_hash_copy_indirect will swap got.refcount.
6925
6926 2002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
6927
6928 * cpu-ns32k.c (_bfd_ns32k_put_immdeiate, _bfd_ns32k_get_immediate):
6929 There is no 8 byte relocation type for this architecture.
6930 (do_ns32k_reloc): Use bfd_vma instead of native types.
6931 (bfd_ns32k_put_immediate, _bfd_ns32k_relocate_contents) put_data
6932 returns void.
6933 (_bfd_ns32k_put_displacement): Don't check for overflow. We can
6934 rely on generic code to do that.
6935 * aout-ns32k.c (howto_table): Add appropriate overflow detection
6936 to all table entries.
6937 (_bfd_ns32k_relocate_contents): put_data returns void.
6938 * ns32k.h: (_bfd_ns32k_put_displacement, _bfd_ns32k_put_immediate)
6939 (_bfd_do_ns32k_reloc_contents): Fix prototypes. put data functions
6940 return void.
6941
6942 2002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
6943
6944 * aoutx.h (aout_link_check_ar_symbols): Whether to include an
6945 archive object is target dependant.
6946
6947 2002-07-31 Adam Nemet <anemet@lnxw.com>
6948
6949 * elf32-arm.h (ARM_PLT_ENTRY_SIZE): Rename PLT_ENTRY_SIZE.
6950 (THUMB_PLT_ENTRY_SIZE): New macro.
6951 (PLT_ENTRY_SIZE): Return the appropriate *_PLT_ENTRY_SIZE.
6952 (elf32_arm_plt0_entry): Rename PLT_ENTRY_SIZE to
6953 ARM_PLT_ENTRY_SIZE.
6954 (elf32_arm_plt_entry): Likewise.
6955 (elf_backend_plt_header_size): Likewise.
6956 (elf32_thumb_plt0_entry): New global.
6957 (elf32_arm_finish_dynamic_sections): Use it. Put Thumb entries
6958 into .plt.thumb.
6959 (elf32_thumb_plt_entry): New global.
6960 (elf32_arm_finish_dynamic_symbol): Use it. Use .thumb.plt for
6961 Thumb entries. Set the bottom bit of the corresponding GOT entry
6962 for a Thumb PLT entry.
6963 (struct elf32_arm_plt_entry_info): New structure.
6964 (struct elf32_arm_link_hash_entry, plt_info): New member of this
6965 type.
6966 (elf32_arm_link_hash_newfunc): Initialize new member.
6967 (elf32_arm_final_link_relocate, R_ARM_THM_PC22 case): Handle
6968 relocations against the PLT.
6969 (elf32_arm_check_relocs, case R_ARM_PLT32 case): Set
6970 first_rel_type if this is the first time we encounter the symbol.
6971 (elf32_arm_check_relocs, case R_ARM_THM_PC22 case): New case.
6972 Determine if relocation needs a PLT entry. Set first_rel_type if
6973 this is the first time we encounter the symbol
6974 (elf32_arm_adjust_dynamic_symbol): Create PLT entries for Thumb
6975 functions as well.
6976 (elf32_arm_size_dynamic_sections): Handle .plt.thumb like .plt.
6977 (elf32_arm_create_dynamic_sections): New function. Create the
6978 .plt.thumb section.
6979 (elf_backend_create_dynamic_sections): Call it.
6980
6981 2002-07-31 Nick Clifton <nickc@redhat.com>
6982
6983 * bfd.c (bfd_alt_mach_code): Rename parameter 'index' to
6984 'alternative' in order to avoid shadowing global symbol of the
6985 same name.
6986 * bfd-in2.h: Regenerate.
6987 * libbfd.h: Regenerate.
6988 * libcoff.h: Regenerate.
6989
6990 2002-07-31 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6991
6992 * Makefile.am: Add n32 ABI support.
6993 * Makefile.in: Regenerate.
6994 * config.bfd: Add n32 vectors to mips64*-*-linux* targets. Treat 64
6995 bit vectors for mips*-*-linux targets as optional.
6996 * configure.in: Add n32 ABI vectors.
6997 * configure: Regenerate.
6998 * elf32-mips.c (mips_elf32_object_p): Reject n32 ABI files.
6999 * elfn32-mips.c: New file, n32 ABI support.
7000 * targets.c: Add n32 ABI vectors.
7001
7002 2002-07-30 Graeme Peterson <gp@qnx.com>
7003
7004 * elfarmqnx-nabi.c: New file: Support for QNX.
7005 * config.bfd: Add support for arm-*-nto target.
7006 * configure.in: Add support for bfd_elf32_{big|little}armqnx_vec.
7007 * configure: Regenerate.
7008 * Makefile.am: Add entries for elfarmqnx-nabi.c.
7009 * Makefile.in: Regenerate.
7010 * elf32-arm.h (ELF_MAXPAGESIZE): Do not define if already defined.
7011 Do not define global function if ELFARM_NABI_C_INCLUDED is defined.
7012 * elfarm-nabi.c: Do not include elf32-arm.h if
7013 ELFARM_NABI_C_INCLUDED is defined.
7014 * targets.c: Add bfd_elf32_{big|little}armqnx_vec.
7015
7016 2002-07-30 Nick Clifton <nickc@redhat.com>
7017
7018 * po/sv.po: Updated Swedish translation.
7019
7020 2002-07-30 Jakub Jelinek <jakub@redhat.com>
7021
7022 * elf.c (elf_fake_sections): Fix up .tbss sh_size and sh_type.
7023
7024 2002-07-30 Alan Modra <amodra@bigpond.net.au>
7025
7026 * aoutx.h (some_aout_object_p): Clean up tdata properly on error.
7027 * archive.c (bfd_generic_archive_p): Likewise.
7028 * coff-rs6000.c (_bfd_xcoff_archive_p): Likewise.
7029 (_bfd_xcoff_archive_p): Use bfd_scan_vma in place of strtol.
7030 * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
7031 (xcoff64_archive_p): Likewise.
7032 (xcoff64_openr_next_archived_file): Likewise.
7033 (xcoff64_archive_p): Clean up tdata properly on error.
7034 * coffgen.c (coff_real_object_p): Likewise.
7035 (coff_object_p): Release filehdr and opthdr.
7036 * ecoff.c (_bfd_ecoff_archive_p): Clean up tdata properly on error.
7037 * ieee.c (ieee_archive_p): Likewise.
7038 * ihex.c (ihex_object_p): Likewise.
7039 (ihex_mkobject): Always allocate tdata.
7040 * peicode.h (pe_ILF_object_p): Release bfd_alloc'd buffer on error.
7041 * srec.c (srec_mkobject): Always allocate tdata.
7042 (srec_object_p): Clean up tdata properly on error.
7043 (symbolsrec_object_p): Likewise.
7044 * versados.c (versados_object_p): Likewise.
7045 * vms-misc.c (_bfd_vms_get_record): Use bfd_malloc instead of malloc,
7046 and bfd_realloc instead of realloc.
7047 (add_new_contents): Use bfd_alloc instead of bfd_malloc for sections.
7048 * vms.c (vms_initialize): Always allocate tdata. Use bfd_alloc in
7049 place of bfd_malloc, simplifying error freeing. Free hash table too.
7050 (vms_object_p): Clean up tdata on error.
7051 (vms_mkobject): Don't complain on stderr if vms_initialize fails.
7052 (vms_close_and_cleanup): Adjust for bfd_alloc use.
7053
7054 2002-07-30 Alan Modra <amodra@bigpond.net.au>
7055
7056 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set e_flags.
7057
7058 2002-07-26 Chris Demetriou <cgd@broadcom.com>
7059
7060 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Merge ASE
7061 flags into resulting BFD.
7062
7063 2002-07-26 Alan Modra <amodra@bigpond.net.au>
7064
7065 From John Reiser <jreiser@BitWagon.com>
7066 * elf32-i386.c (elf_i386_link_hash_table_create): Clear
7067 tls_ldm_got.refcount.
7068
7069 2002-07-25 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7070
7071 * elf64-mips.c: Update TODO comment.
7072 (mips_elf64_higher_reloc,mips_elf64_highest_reloc,
7073 mips_elf64_gprel16_reloca): Remove prototypes.
7074 (mips16_jump_reloc,mips16_gprel_reloc): Add functions.
7075 (UNUSED_RELOC): Replace by EMPTY_RELOC.
7076 (mips_elf64_howto_table_rel): Use special R_MIPS_HI16 handling. Remove
7077 wrong comments. Remove disfunctional support of R_MIPS_HIGHER and
7078 R_MIPS_HIGHEST.
7079 (mips_elf64_howto_table_rela): Fix handling of R_MIPS_GPREL16 and
7080 R_MIPS_GOT16. Remove wrong comments.
7081 (elf_mips16_jump_howto,elf_mips16_gprel_howto,
7082 elf_mips_gnu_vtinherit_howto,elf_mips_gnu_vtentry_howto): New, code
7083 from elf32-mips.c.
7084 (mips_elf64_hi16_reloc): Fix formatting.
7085 (mips_elf64_higher_reloc,mips_elf64_highest_reloc): Remove.
7086 (mips_elf64_got16_reloc): Fix formatting. Remove superfluous code.
7087 Better comment. Fall back to R_MIPS_GOT_DISP instead of abort().
7088 (mips_elf64_gprel16_reloc): Make static. Add check for
7089 partial_inplace.
7090 (mips_elf64_gprel16_reloca): Remove.
7091 (mips_elf64_literal_reloc): New function.
7092 (mips_elf64_gprel32_reloc): Fix formatting.
7093 (mips_elf64_shift6_reloc): Fix comment. Make static.
7094 (mips16_jump_reloc,mips16_gprel_reloc): New functions, code from
7095 elf32-mips.c.
7096 (elf_reloc_map,mips_reloc_map): New mapping table, similiar as in
7097 elf32-mips.c
7098 (bfd_elf64_bfd_reloc_type_lookup): Use the mapping table. Enable GNU
7099 specific relocations.
7100 (mips_elf64_rtype_to_howto): Enable GNU specific relocations.
7101 (mips_elf64_object_p): Invert logic to check for SGI-ish ABI.
7102 (ELF_MAXPAGESIZE): Add comment.
7103
7104 2002-07-25 Nick Clifton <nickc@redhat.com>
7105
7106 * po/sv.po: Updated Swedish translation.
7107 * po/es.po: Updated Spanish translation.
7108 * po/fr.po: Updated French translation.
7109
7110 2002-07-25 Alan Modra <amodra@bigpond.net.au>
7111
7112 * elf-bfd.h (_bfd_elf32_link_record_local_dynamic_symbol): Define
7113 as elf_link_record_local_dynamic_symbol.
7114 (_bfd_elf64_link_record_local_dynamic_symbol): Likewise.
7115 (elf_link_record_local_dynamic_symbol): Declare. Now returns int.
7116 * elflink.h (elf_link_record_local_dynamic_symbol): Move to..
7117 * elflink.c: .. here. Use bfd_elf_get_elf_syms. Check whether an
7118 attempt is made to record a symbol in a discarded section, and
7119 return `2' in that case.
7120
7121 2002-07-24 Nick Clifton <nickc@redhat.com>
7122
7123 * po/sv.po: Updated Swedish translation.
7124 * po/es.po: Updated Spanish translation.
7125
7126 2002-07-23 Alan Modra <amodra@bigpond.net.au>
7127
7128 * po/SRC-POTFILES.in: Regenerate.
7129
7130 * elf-hppa.h (elf_hppa_relocate_section): If relocatable, return
7131 immediately. Remove code handling relocatable linking.
7132 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
7133 * elf32-cris.c (cris_elf_relocate_section): Likewise.
7134 * elf32-fr30.c (elf32_frv_relocate_section): Likewise.
7135 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
7136 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
7137 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
7138 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
7139 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
7140 * elf32-v850.c (v850_elf_relocate_section): Likewise.
7141 * elf32-vax.c (elf_vax_relocate_section): Likewise.
7142 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7143 * elf32-avr.c (elf_backend_rela_normal): Define.
7144 * elf32-cris.c: Likewise.
7145 * elf32-fr30.c: Likewise.
7146 * elf32-frv.c: Likewise.
7147 * elf32-h8300.c: Likewise.
7148 * elf32-hppa.c: Likewise.
7149 * elf32-ip2k.c: Likewise.
7150 * elf32-sparc.c: Likewise.
7151 * elf32-v850.c: Likewise.
7152 * elf32-vax.c: Likewise.
7153 * elf64-hppa.c: Likewise.
7154 * elf64-sparc.c: Likewise.
7155 * elf32-fr30.c (elf32_frv_relocate_section): Edit comment.
7156 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
7157 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
7158 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
7159 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
7160 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
7161 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
7162 * elf-m10200.c (USE_RELA): Don't define.
7163 * elf-m10300.c: Likewise.
7164 * elfarm-oabi.c: Likewise.
7165 * elf32-i370.c: Likewise.
7166 * elf32-ip2k.c: Likewise.
7167 * elf32-m68k.c: Likewise.
7168 * elf32-mcore.c: Likewise.
7169 * elf32-ppc.c: Likewise.
7170 * elf32-s390.c: Likewise.
7171 * elf32-vax.c: Likewise.
7172 * elf64-ppc.c: Likewise.
7173 * elf64-s390.c: Likewise.
7174 * elf64-x86-64.c: Likewise.
7175 * elfxx-ia64.c: Likewise.
7176 * elf32-avr.c (USE_REL): Don't undef.
7177 * elf32-ip2k.c: Likewise.
7178
7179 2002-07-23 Nick Clifton <nickc@redhat.com>
7180
7181 * elf-bfd.h (struct elf_backend_data): Add new bitfield
7182 'want_p_paddr_set_to_zero'.
7183 * elfxx-target.h: Set default value for want_p_paddr_set_to_zero
7184 to false;
7185 * elfxx-ia64.c: Set want_p_paddr_set_zero for HPUX target.
7186 * elf.c (copy_private_bfd_data): Test want_p_paddr_set_zero.
7187
7188 2002-07-23 Gabor Keresztfalvi <keresztg@mail.com>
7189
7190 * nlmcode.h (nlm_swap_auxiliary_headers_out): Swapped the order of
7191 the MeSsAgEs and CoPyRiGhT tags to make >=NW4.x NLM loaders to
7192 show the Copyright string.
7193 Minor formatting tidy ups.
7194
7195 2002-07-23 Nick Clifton <nickc@redhat.com>
7196
7197 * po/fr.po: Updated French translation.
7198 * po/sv.po: Updated Swedish translation.
7199
7200 2002-07-23 Alan Modra <amodra@bigpond.net.au>
7201
7202 * elflink.h (elf_link_input_bfd): Don't change internal symbols
7203 when outputting relocs.
7204
7205 2002-07-20 Jason Thorpe <thorpej@wasabisystems.com>
7206
7207 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only insert
7208 DT_PLTGOT into the dynamic section if there is a PLT.
7209
7210 2002-07-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7211
7212 * elfxx-mips.c (_bfd_mips_elf_discard_info): New function, code from
7213 elf32-mips.c.
7214 (_bfd_mips_elf_write_section): Likewise.
7215 * elfxx-mips.h (_bfd_mips_elf_discard_info): New prototype.
7216 (_bfd_mips_elf_write_section): Likewise.
7217 * elf32-mips.c (elf32_mips_discard_info): Move to elfxx-mips.c.
7218 (elf32_mips_write_section): Likewise.
7219 * elf64-mips.c (_bfd_mips_elf_ignore_discarded_relocs): Use it.
7220 (_bfd_mips_elf_write_section): Likewise.
7221
7222 2002-07-19 Alan Modra <amodra@bigpond.net.au>
7223
7224 * elfxx-ia64.c: (elfNN_ia64_modify_segment_map): Properly scan
7225 PT_IA_64_UNWIND segments for a given section.
7226
7227 2002-07-17 H.J. Lu <hjl@gnu.org>
7228
7229 * Makefile.am: Fix a typo.
7230 * Makefile.in: Regenerate.
7231
7232 2002-07-15 Denis Chertykov <denisc@overta.ru>
7233 Frank Ch. Eigler <fche@redhat.com>
7234 Ben Elliston <bje@redhat.com>
7235 Alan Lehotsky <alehotsky@cygnus.com>
7236 John Healy <jhealy@redhat.com>
7237 Graham Stott <grahams@redhat.com>
7238 Jeff Johnston <jjohnstn@redhat.com>
7239
7240 * Makefile.am: Add support for ip2k.
7241 * Makefile.in: Regenerate.
7242 * doc/Makefile.in: Regenerate.
7243 * archures.c: Add support for ip2k.
7244 * config.bfd: Add support for ip2k.
7245 * configure.in: Add support for ip2k.
7246 * configure: Regenerate.
7247 * reloc.c: Add support for ip2k.
7248 * targets.c: Add support for ip2k.
7249 * bfd-in2.h: Regenerate.
7250 * libbfd.h: Regenerate.
7251 * cpu-ip2k.c: New file.
7252 * elf32-ip2k.c: New file.
7253
7254 2002-07-17 Ian Rickards <irickard@arm.com>
7255
7256 * dwarf2.c (concat_filename): If we can't establish the directory
7257 just return the filename.
7258
7259 2002-07-16 Moritz Jodeit <moritz@jodeit.org>
7260
7261 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Correct order of memset args.
7262
7263 2002-07-16 Alan Modra <amodra@bigpond.net.au>
7264
7265 * elflink.h: Formatting fixes, tidy prototypes.
7266 (elf_link_assign_sym_version): Move common code out of loop.
7267
7268 2002-07-16 Alan Modra <amodra@bigpond.net.au>
7269
7270 * elflink.h (elf_link_input_bfd): Don't call reloc_emitter when
7271 reloc section size is zero. Correct reloc output location.
7272
7273 2002-07-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
7274
7275 * elf-hppa.h (elf_hppa_reloc_final_type): Use R_PARISC_PCREL16F as
7276 the final type for the e_fsel selector when generating PA2.0W code.
7277 (elf_hppa_relocate_insn): Provide support for PA2.0W 16-bit format 1
7278 relocations.
7279
7280 2002-07-14 H.J. Lu <hjl@gnu.org>
7281
7282 * elflink.h (elf_link_assign_sym_version): Hide the default
7283 definition if there is a hidden versioned definition.
7284
7285 2002-07-12 Hans-Peter Nilsson <hp@axis.com>
7286
7287 * elf32-cris.c (cris_elf_relocate_section): Drop nonsensical
7288 dynamic reference test in assertion when initializing GOT with
7289 static contents. Just assert that there are either no dynamic
7290 sections, the symbol is defined in the regular objects or that the
7291 symbol is undef weak. Tweak comment.
7292 (elf_cris_finish_dynamic_symbol): Emit .got reloc for a program
7293 only if the symbol isn't defined in the program and isn't undef
7294 weak.
7295 (elf_cris_adjust_dynamic_symbol): Simplify condition for getting
7296 rid of PLT entry: only do it if the symbol isn't defined in a DSO.
7297 When doing so, clear ELF_LINK_HASH_NEEDS_PLT. Tweak comments.
7298 (elf_cris_discard_excess_program_dynamics): Don't consider
7299 ELF_LINK_HASH_REF_DYNAMIC when omitting .got runtime relocs.
7300
7301 2002-07-11 Alan Modra <amodra@bigpond.net.au>
7302
7303 * elf32-i386.c (elf_i386_relocate_section): Don't complain about
7304 unresolved debugging relocs in dynamic applications.
7305 * elf32-s390.c (elf_s390_relocate_section): Likewise.
7306 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
7307 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
7308 * elf64-s390.c (elf_s390_relocate_section): Likewise.
7309 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7310 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
7311
7312 2002-07-10 Alan Modra <amodra@bigpond.net.au>
7313
7314 * elf64-ppc.c (ONES): Define.
7315 (ppc64_elf_howto_table): Use ONES here to avoid warnings. Fill in
7316 missing src_mask fields. Tweak R_PPC64_NONE, R_PPC64_COPY. Fill
7317 in missing dst_mask fields on R_PPC64_PLT32, R_PPC64_PLTREL32.
7318
7319 * elf64-ppc.c (ppc64_elf_get_symbol_info): Delete.
7320 (ppc64_elf_set_private_flags): Delete.
7321 (ppc64_elf_section_from_shdr): Delete.
7322 (ppc64_elf_merge_private_bfd_data): Remove flag checking/merging code.
7323 (ppc64_elf_fake_sections): Delete.
7324 (bfd_elf64_bfd_set_private_flags): Don't define.
7325 (bfd_elf64_get_symbol_info): Likewise.
7326 (elf_backend_section_from_shdr): Likewise.
7327 (elf_backend_fake_sections): Likewise.
7328
7329 2002-07-10 Marco Walther <Marco.Walther@sun.com>
7330
7331 * elf.c: (assign_section_numbers) Set sh_entsize for .stab only
7332 when not already set.
7333 * elf64-sparc.c: (sparc64_elf_fake_sections): New function.
7334 (elf_backend_fake_sections): Define.
7335
7336 2002-07-10 Alan Modra <amodra@bigpond.net.au>
7337
7338 * merge.c (_bfd_merge_section): Remove redundant output_section check.
7339 Formatting.
7340 (_bfd_merge_sections): Don't set SEC_EXCLUDE on unused sections.
7341
7342 2002-07-09 Hans-Peter Nilsson <hp@axis.com>
7343
7344 * elf32-cris.c (cris_elf_relocate_section): Move sanity-check for
7345 NULL sym_hashes to just before use.
7346 <case R_CRIS_32_GOTREL>: In test for local symbol, accept also
7347 symbol with non-default visibility.
7348 <case R_CRIS_32_GOTREL, case R_CRIS_32_PLT_GOTREL>: Ditto.
7349 <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
7350 Ditto.
7351 (cris_elf_gc_sweep_hook): Only decrease h->plt.refcount for
7352 symbol with non-default visibility.
7353 (cris_elf_check_relocs): At tests for local symbol before
7354 increasing h->plt.refcount, also check for non-default
7355 visibility. Ditto when checking for local symbol to eliminate
7356 pc-relative runtime relocs.
7357
7358 2002-07-08 Alan Modra <amodra@bigpond.net.au>
7359
7360 * elf.c: Formatting.
7361 (IS_SOLARIS_PT_INTERP): Add p_paddr and p_memsz checks.
7362 (INCLUDE_SECTION_IN_SEGMENT): Remove IS_SOLARIS_PT_INTERP.
7363 (copy_private_bfd_data): Set p_vaddr on broken Solaris PT_INTERP
7364 segments.
7365
7366 2002-07-07 Mark Mitchell <mark@codesourcery.com>
7367 Alan Modra <amodra@bigpond.net.au>
7368
7369 * cofflink.c (_bfd_coff_final_link): On PE COFF systems, take into
7370 account the impact of relocation count overflow when computing
7371 section offsets.
7372 * coffcode.h (coff_write_relocs): Use obj_pe when deciding whether
7373 or not to apply the PE COFF reloc overflow handling. Fix a
7374 fencepost error in deciding whether or not to use that technique.
7375
7376 2002-07-07 Alan Modra <amodra@bigpond.net.au>
7377
7378 * elf-bfd.h (struct elf_reloc_cookie): Remove locsym_shndx,
7379 change type of locsyms.
7380 (bfd_elf_get_elf_syms): Declare.
7381 * elf.c (bfd_elf_get_elf_syms): New function.
7382 (group_signature): Use bfd_elf_get_elf_syms.
7383 (bfd_section_from_r_symndx): Likewise.
7384 * elfcode.h (elf_slurp_symbol_table): Likewise.
7385 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
7386 (elf_link_add_object_symbols): Likewise. Reorganise to increase
7387 locality of various data structures. Properly free internal relocs.
7388 (elf_bfd_final_link): Properly free internal relocs.
7389 (elf_link_check_versioned_symbol): Use bfd_elf_get_elf_syms.
7390 (elf_link_input_bfd): Likewise.
7391 (elf_gc_mark): Likewise. Properly free internal relocs.
7392 (elf_gc_sweep): Properly free internal relocs.
7393 (elf_reloc_symbol_deleted_p): No need to swap syms in.
7394 (elf_bfd_discard_info): Use bfd_elf_get_elf_syms. Properly free
7395 internal relocs.
7396 * elf-m10200.c (mn10200_elf_relax_section): Use bfd_elf_get_elf_syms.
7397 Properly free possibly cached info.
7398 (mn10200_elf_relax_delete_bytes): Remove symbol swapping code.
7399 (mn10200_elf_symbol_address_p): Pass in internal syms. Remove
7400 symbol swapping code.
7401 (mn10200_elf_get_relocated_section_contents): Use bfd_elf_get_elf_syms.
7402 Properly free possibly cached info.
7403 * elf-m10300.c (mn10300_elf_relax_section): As above for elf-m10200.c.
7404 (mn10300_elf_relax_delete_bytes): Likewise.
7405 (mn10300_elf_symbol_address_p): Likewise.
7406 (mn10300_elf_get_relocated_section_contents): Likewise.
7407 * elf32-h8300.c (elf32_h8_relax_section): As above for elf-m10200.c.
7408 (elf32_h8_relax_delete_bytes): Likewise.
7409 (elf32_h8_symbol_address_p): Likewise.
7410 (elf32_h8_get_relocated_section_contents): Likewise.
7411 * elf32-m32r.c (m32r_elf_relax_section): As above for elf-m10200.c.
7412 (m32r_elf_relax_delete_bytes): Likewise.
7413 (m32r_elf_get_relocated_section_contents): Likewise.
7414 * elf32-sh.c (sh_elf_reloc_loop): Free section contents using
7415 elf_section_data to determine whether cached.
7416 (sh_elf_relax_section): As above for elf-m10200.c.
7417 (sh_elf_relax_delete_bytes): Likewise.
7418 (sh_elf_get_relocated_section_contents): Likewise.
7419 * elf32-xstormy16.c (xstormy16_elf_relax_section): As above.
7420 * elf64-alpha.c (elf64_alpha_relax_section): As above. Also delay
7421 reading of local syms.
7422 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
7423 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): As above.
7424 * elfxx-ia64.c (elfNN_ia64_relax_section): As above.
7425 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Properly free internal
7426 relocs.
7427 * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Properly
7428 free internal relocs and section contents. Don't read symbols.
7429 * elf32-hppa.c (get_local_syms): Use bfd_elf_get_elf_syms.
7430 (elf32_hppa_size_stubs): Don't free local syms.
7431 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Delay
7432 reading of local syms. Use bfd_elf_get_elf_syms. Properly free
7433 possibly cached info.
7434 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
7435 * elf64-hppa.c (elf64_hppa_check_relocs): Use bfd_elf_get_elf_syms.
7436 * elf64-ppc.c (struct ppc_link_hash_table): Delete bfd_count and
7437 all_local_syms.
7438 (get_local_syms): Delete function.
7439 (edit_opd): Use bfd_elf_get_elf_syms. Free on error exit. Cache
7440 on exit.
7441 (ppc64_elf_size_stubs): Use bfd_elf_get_elf_syms. Free/cache on exit.
7442
7443 2002-07-05 Jim Wilson <wilson@redhat.com>
7444
7445 * syms.c (decode_section_type): New.
7446 (bfd_decode_symclass): Call decode_section_type.
7447
7448 2002-07-04 Jakub Jelinek <jakub@redhat.com>
7449
7450 * merge.c (_bfd_merged_section_offset): Avoid accessing byte before
7451 section content start.
7452 Reported by Michael Schumacher <mike@hightec-rt.com>.
7453
7454 2002-07-04 Alan Modra <amodra@bigpond.net.au>
7455
7456 * section.c (_bfd_strip_section_from_output): Remove unnecessary
7457 link order code. Don't actually remove the output section here;
7458 Just set a flag for the linker to do so.
7459 * elflink.c (_bfd_elf_link_renumber_dynsyms): Test for removed
7460 sections when setting up output section dynsyms.
7461
7462 2002-07-04 Alan Modra <amodra@bigpond.net.au>
7463
7464 * elflink.h (elf_link_add_object_symbols): Revert 1999-09-02 hpux
7465 fudge.
7466 * elf.c (bfd_section_from_shdr): Work around broken hpux shared
7467 libs here instead.
7468
7469 2002-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
7470
7471 * elf64-s390.c (create_got_section): Set .got section alignment to
7472 8 bytes.
7473 (elf_s390_check_relocs): Set .rela.dyn section alignment to 8 bytes.
7474
7475 2002-07-02 Alan Modra <amodra@bigpond.net.au>
7476
7477 * elf.c (_bfd_elf_reloc_type_class): Fix comment grammar.
7478
7479 2002-07-01 Matt Thomas <matt@3am-software.com>
7480
7481 * elf32-vax.c (elf32_vax_print_private_bfd_data): Change EF_*
7482 to EF_VAX_*.
7483
7484 2002-07-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7485
7486 * elfxx-mips.c (ABI_64_P): Fix comment.
7487 (MIPS_ELF_OPTIONS_SECTION_NAME,MIPS_ELF_STUB_SECTION_NAME): Use the
7488 new section names for N64 ABI.
7489 (mips_elf_output_extsym): No special _gp_disp handling for NewABI.
7490 (mips_elf_calculate_relocation): Code formatting.
7491 (mips_elf_create_dynamic_relocation): Likewise.
7492 (_bfd_mips_elf_fake_sections): IRIX6 needs this hack, too.
7493 (_bfd_mips_elf_size_dynamic_sections): Handle GOT_PAGE for any NewABI.
7494 (_bfd_mips_elf_relocate_section): No special handling for R_MIPS_64
7495 in any NewABI.
7496 (_bfd_mips_elf_finish_dynamic_symbol): No special _gp_disp handling
7497 for NewABI.
7498 (_bfd_mips_elf_modify_segment_map): Handle any N64 ABI.
7499 (_bfd_mips_elf_gc_sweep_hook): NewABI GOT relocs should be handled
7500 here, too.
7501
7502 2002-07-01 Andreas Schwab <schwab@suse.de>
7503
7504 * elf64-x86-64.c (elf64_x86_64_relocate_section): Only convert
7505 R_X86_64_64 to R_X86_64_RELATIVE.
7506
7507 2002-07-01 John David Anglin <dave@hiauly1.hia.nrc.ca>
7508
7509 * vaxbsd.c: New BFD backend for VAX BSD and Ultrix.
7510 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Add new backend.
7511 Run "make dep-am".
7512 * config.bfd (vax-*-bsd* | vax-*-ultrix*): Use vaxbsd_vec instead of
7513 host_aout_vec.
7514 * configure.in (vaxbsd_vec): Add.
7515 * targets.c (vaxbsd_vec): Add.
7516 * Makefile.in: Rebuild.
7517 * configure: Rebuild.
7518 * po/SRC-POTFILES.in: Rebuild.
7519
7520 2002-07-01 Alan Modra <amodra@bigpond.net.au>
7521
7522 * elflink.h (elf_gc_mark): Pass in the section whose relocs we are
7523 examining to gc_mark_hook, rather than the bfd.
7524 (elf_gc_sections): Adjust.
7525 * elf-bfd.h (struct elf_backend_data <gc_mark_hook>): Likewise.
7526 * elf-m10300.c (mn10300_elf_gc_mark_hook): Likewise.
7527 * elf32-arm.h (elf32_arm_gc_mark_hook): Likewise.
7528 * elf32-avr.c (elf32_avr_gc_mark_hook): Likewise.
7529 * elf32-cris.c (cris_elf_gc_mark_hook): Likewise.
7530 * elf32-d10v.c (elf32_d10v_gc_mark_hook): Likewise.
7531 * elf32-fr30.c (fr30_elf_gc_mark_hook): Likewise.
7532 * elf32-hppa.c (elf32_hppa_gc_mark_hook): Likewise.
7533 * elf32-i386.c (elf_i386_gc_mark_hook): Likewise.
7534 * elf32-m32r.c (m32r_elf_gc_mark_hook): Likewise.
7535 * elf32-m68k.c (elf_m68k_gc_mark_hook): Likewise.
7536 * elf32-mcore.c (mcore_elf_gc_mark_hook): Likewise.
7537 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Likewise.
7538 * elf32-ppc.c (ppc_elf_gc_mark_hook): Likewise.
7539 * elf32-s390.c (elf_s390_gc_mark_hook): Likewise.
7540 * elf32-sh.c (sh_elf_gc_mark_hook): Likewise.
7541 * elf32-sparc.c (elf32_sparc_gc_mark_hook): Likewise.
7542 * elf32-v850.c (v850_elf_gc_mark_hook): Likewise.
7543 * elf32-vax.c (elf_vax_gc_mark_hook): Likewise.
7544 * elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Likewise.
7545 * elf64-mmix.c (mmix_elf_gc_mark_hook): Likewise.
7546 * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
7547 * elf64-s390.c (elf_s390_gc_mark_hook): Likewise.
7548 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
7549 * elfxx-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise.
7550 * elfxx-mips.h (_bfd_mips_elf_gc_mark_hook): Likewise.
7551 * elf64-x86-64.c (elf64_x86_64_gc_mark_hook): Likewise.
7552 * elf32-frv.c (elf32_frv_gc_mark_hook): Likewise. Also remove
7553 redundant local sym tests.
7554 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_entry.
7555 (link_hash_newfunc): Init is_entry.
7556 (ppc64_elf_copy_indirect_symbol): Copy is_entry.
7557 (ppc64_elf_link_hash_table_create): Init all_local_syms.
7558 (create_linkage_sections): Use bfd_make_section_anyway rather than
7559 bfd_make_section.
7560 (ppc64_elf_mark_entry_syms): New function.
7561 (ppc64_elf_check_relocs): Don't bother testing elf_bad_symtab. Set
7562 up opd entry to function section map.
7563 (ppc64_elf_gc_mark_hook): Special case opd section relocs, and
7564 relocs that reference the opd section.
7565 (edit_opd): New function.
7566 (ppc64_elf_size_dynamic_sections): Call get_local_syms and edit_opd.
7567 (ppc64_elf_setup_section_lists): Don't calculate htab->bfd_count here.
7568 (get_local_syms): Do so here. Exit if we already have local syms.
7569 Remove bogus comment imported from elf32-hppa.c. Don't attempt to
7570 read local syms on non-ELF input.
7571 (ppc64_elf_size_stubs): Call _bfd_elf64_link_read_relocs rather
7572 than duplicating it's function here. Adjust free of internal
7573 relocs to suit.
7574 (ppc64_elf_relocate_section): Adjust local syms in opd section.
7575 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Declare.
7576 * elf32-hppa.c (elf32_hppa_size_stubs): Call
7577 _bfd_elf32_link_read_relocs rather than duplicating it's function
7578 here. Adjust free of internal relocs to suit.
7579
7580 2002-07-01 Andreas Jaeger <aj@suse.de>
7581
7582 * elf64-x86-64.c (elf64_x86_64_check_relocs): Certain relocations
7583 are not allowed in shared libs code, enforce -fPIC.
7584
7585 2002-06-29 Hans-Peter Nilsson <hp@bitrange.com>
7586
7587 * mmo.c (mmo_write_loc_chunk): Don't eliminate leading and
7588 trailing zero-sequences when there's previous left-over data.
7589
7590 2002-06-27 John David Anglin <dave@hiauly1.hia.nrc.ca>
7591
7592 * elf64-hppa.c (elf64_hppa_reloc_type_class): New function.
7593 (elf64_hppa_finish_dynamic_sections): Check other_rel_sec, dlt_rel_sec
7594 and opd_rel_sec in order for starting rela section. Check _raw_size.
7595 (elf_backend_reloc_type_class): Define.
7596
7597 2002-06-27 Kevin Buettner <kevinb@redhat.com>
7598
7599 * dwarf2.c (decode_line_info): Handle older, non-standard, 64-bit
7600 DWARF2 formats.
7601
7602 2002-06-27 Alan Modra <amodra@bigpond.net.au>
7603
7604 * cpu-powerpc.c: Comment on ordering of arch_info.
7605 * elf32-ppc.c (ppc_elf_object_p): New function.
7606 (elf_backend_object_p): Define.
7607 * elf64-ppc.c (ppc64_elf_object_p): New function.
7608 (elf_backend_object_p): Define.
7609
7610 2002-06-26 Jason Thorpe <thorpej@wasabisystems.com>
7611
7612 * configure.in (vax-*-netbsd*): Set COREFILE to netbsd-core.lo.
7613 * configure: Regenerate.
7614
7615 2002-06-25 Jason Eckhardt <jle@rice.edu>
7616
7617 * dwarf2.c (decode_line_info): Check unit->addr_size
7618 to read in the proper number of prologue bytes.
7619
7620 2002-06-25 Nick Clifton <nickc@cambridge.redhat.com>
7621
7622 * config.bfd (powerpc-*-aix5*): Only create a selvecs for
7623 aix5coff64_vec if 64-bit bfd support has been enabled.
7624 (powerpc64-*-aix5*): Only define if 64-bit bfd support has
7625 been enabled.
7626
7627 * targets.c (_bfd_target_vector[]): Only include
7628 aix5coff64_vec if 64-bit bfd support has been enabled.
7629
7630 2002-06-25 Alan Modra <amodra@bigpond.net.au>
7631
7632 * elf64-ppc.c (ppc_add_stub): Replace strcpy/strncpy with memcpy.
7633 * elf32-hppa.c (hppa_add_stub): Likewise.
7634 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
7635 * elflink.h (elf_add_default_symbol): Fix comment typo.
7636 (elf_add_default_symbol): Replace strcpy and strncpy with memcpy.
7637 (elf_link_add_object_symbols): Likewise.
7638 (elf_link_assign_sym_version): Likewise.
7639 * hash.c (bfd_hash_lookup): Likewise.
7640 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
7641 * section.c (bfd_get_unique_section_name): Likewise.
7642 * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
7643 * elf.c (_bfd_elf_make_section_from_phdr): Likewise.
7644 (assign_section_numbers): Likewise.
7645 (_bfd_elfcore_make_pseudosection): Likewise.
7646 (elfcore_grok_lwpstatus): Likewise.
7647 (elfcore_grok_win32pstatus): Likewise.
7648 (elfcore_write_note): Constify input params. Use PTR instead of
7649 void *. Include terminating NUL in namesz. Correct padding.
7650 Support NULL "name" param. Use memcpy instead of strcpy.
7651 (elfcore_write_prpsinfo): Constify input params.
7652 (elfcore_write_prstatus): Likewise. Use PTR instead of void *.
7653 (elfcore_write_lwpstatus): Likewise.
7654 (elfcore_write_pstatus): Likewise.
7655 (elfcore_write_prfpreg): Likewise.
7656 (elfcore_write_prxfpreg): Likewise.
7657 * elf-bfd.h (elfcore_write_note): Update declaration.
7658 (elfcore_write_prpsinfo): Likewise.
7659 (elfcore_write_prstatus): Likewise.
7660 (elfcore_write_pstatus): Likewise.
7661 (elfcore_write_prfpreg): Likewise.
7662 (elfcore_write_prxfpreg): Likewise.
7663 (elfcore_write_lwpstatus): Likewise.
7664
7665 2002-06-25 Jason Eckhardt <jle@rice.edu>
7666
7667 * ecoff.c (ecoff_set_symbol_info): Set BSF_FUNCTION for
7668 symbols of type stProc and stStaticProc.
7669
7670 2002-06-25 Nick Clifton <nickc@redhat.com>
7671
7672 * ecoff.c: VArious formatting fixes.
7673
7674 2002-06-25 Alan Modra <amodra@bigpond.net.au>
7675
7676 * coff-rs6000.c (xcoff_generate_rtinit): Fix typo.
7677
7678 2002-06-25 Alan Modra <amodra@bigpond.net.au>
7679
7680 * aout-adobe.c: Don't compare against "true" or "false.
7681 * aout-target.h: Likewise.
7682 * aoutx.h: Likewise.
7683 * archive.c: Likewise.
7684 * bout.c: Likewise.
7685 * cache.c: Likewise.
7686 * coff-a29k.c: Likewise.
7687 * coff-alpha.c: Likewise.
7688 * coff-i386.c: Likewise.
7689 * coff-mips.c: Likewise.
7690 * coff-or32.c: Likewise.
7691 * coff64-rs6000.c: Likewise.
7692 * coffcode.h: Likewise.
7693 * coffgen.c: Likewise.
7694 * cpu-ns32k.c: Likewise.
7695 * ecoff.c: Likewise.
7696 * ecofflink.c: Likewise.
7697 * elf.c: Likewise.
7698 * elf32-arm.h: Likewise.
7699 * elf32-cris.c: Likewise.
7700 * elf32-d30v.c: Likewise.
7701 * elf32-i386.c: Likewise.
7702 * elf32-mcore.c: Likewise.
7703 * elf32-ppc.c: Likewise.
7704 * elf32-sh.c: Likewise.
7705 * elf32-sh64.c: Likewise.
7706 * elf32-v850.c: Likewise.
7707 * elf64-alpha.c: Likewise.
7708 * elf64-sh64.c: Likewise.
7709 * elfcode.h: Likewise.
7710 * elfcore.h: Likewise.
7711 * elflink.h: Likewise.
7712 * elfxx-mips.c: Likewise.
7713 * i386os9k.c: Likewise.
7714 * ieee.c: Likewise.
7715 * libbfd.c: Likewise.
7716 * linker.c: Likewise.
7717 * mmo.c: Likewise.
7718 * nlm32-alpha.c: Likewise.
7719 * nlm32-i386.c: Likewise.
7720 * nlm32-ppc.c: Likewise.
7721 * nlm32-sparc.c: Likewise.
7722 * nlmcode.h: Likewise.
7723 * oasys.c: Likewise.
7724 * pdp11.c: Likewise.
7725 * peicode.h: Likewise.
7726 * reloc.c: Likewise.
7727 * som.c: Likewise.
7728 * srec.c: Likewise.
7729 * tekhex.c: Likewise.
7730 * vms.c: Likewise.
7731 * xcofflink.c: Likewise.
7732 * elf64-sparc.c: Edit comment to not use "== false".
7733
7734 * aoutf1.h: Don't use "? true : false".
7735 * ecoff.c: Likewise.
7736 * format.c: Likewise.
7737 * ieee.c: Likewise.
7738 * linker.c: Likewise.
7739 * mmo.c: Likewise.
7740 * oasys.c: Likewise.
7741
7742 2002-06-23 H.J. Lu <hjl@gnu.org>
7743
7744 * elflink.h (elf_link_add_archive_symbols): For the default
7745 version, check references with only one `@' first.
7746
7747 2002-06-23 John David Anglin <dave@hiauly1.hia.nrc.ca>
7748
7749 * elf64-hppa.c (elf64_hppa_mark_milli_and_exported_functions): New
7750 function.
7751 (allocate_global_data_dlt): Don't add millicode symbols to dynamic
7752 symbol table.
7753 (allocate_global_data_opd, allocate_dynrel_entries): Likewise.
7754 (elf64_hppa_size_dynamic_sections): Revise to use
7755 elf64_hppa_mark_milli_and_exported_functions.
7756 (elf64_hppa_finish_dynamic_symbol): Remove code to keep millicode
7757 symbols out of dynamic symbol table.
7758
7759 2002-06-23 Alan Modra <amodra@bigpond.net.au>
7760
7761 * Makefile.in: Regenerate.
7762 * libbfd.h: Regenerate.
7763 * bfd-in2.h: Regenerate.
7764 * configure: Regenerate.
7765 * po/SRC-POTFILES.in: Regenerate.
7766
7767 * elflink.h: Comment typo fixes.
7768
7769 2002-06-23 H.J. Lu <hjl@gnu.org>
7770
7771 * elf-bfd.h (elf_link_loaded_list): New structure.
7772 (elf_link_hash_table): Add "loaded".
7773 * elf.c (_bfd_elf_link_hash_table_init): Initialize "loaded".
7774 * elflink.h (elf_link_check_versioned_symbol): New function.
7775 (elf_link_output_extsym): Call elf_link_check_versioned_symbol.
7776
7777 2002-06-19 Nick Clifton <nickc@cambridge.redhat.com>
7778
7779 * elflink.h (size_dynamic_sections): If the target does not
7780 support an ELF style hash table, return true, indicating that
7781 nothing needed to be done, rather than false, indicating that the
7782 section's size could not be computed.
7783
7784 2002-06-18 Dave Brolley <brolley@redhat.com>
7785
7786 From Catherine Moore, Michael Meissner, Dave Brolley:
7787 * po/SRC-POTFILES.in: Add cpu-frv.c and elf32-frv.c
7788 * targets.c: Support bfd_elf32_frv_vec.
7789 * reloc.c: Add FRV relocs.
7790 * configure.in: Add support for bfd-elf32-frv-vec.
7791 * config.bfd (targ_cpu): Add support for frv-*-elf.
7792 * archures.c: Add frv arch and machines.
7793 * Makefile.am (ALL_MACHINES): Add cpu-frv.lo.
7794 (ALL_MACHINES_CFILES): Add cpu-frv.c.
7795 (BFD32_BACKENDS): Add elf32-frv.lo.
7796 (BFD32_BACKENDS_CFILES): Add elf32-frv.c
7797 (cpu-frv.lo): New target.
7798 (elf32-frv.lo): New target.
7799 * cpu-frv.c: New file.
7800 * elf32-frv.c: New file.
7801
7802 2002-06-18 Jakub Jelinek <jakub@redhat.com>
7803
7804 * elfcode.h (elf_object_p): Sanity check eh_shoff == 0 implies
7805 e_shnum == 0.
7806 Only read the first section header if e_shoff is non-zero.
7807 Don't consider e_shstrndx if there are no sections.
7808
7809 2002-06-17 Tom Rix <trix@redhat.com>
7810
7811 * elf32-d10v.c (elf_d10v_howto_table): Change R_D10V_10_PCREL_R,
7812 R_D10V_10_PCREL_L and R_D10V_18_PCREL to use
7813 complain_overflow_bitfield.
7814
7815 2002-06-17 Alan Modra <amodra@bigpond.net.au>
7816
7817 * opncls.c (bfd_openr): Remove redundant bfd_set_error.
7818 (bfd_fdopenr): Likewise.
7819 (bfd_openstreamr): Likewise.
7820 (bfd_openw): Likewise.
7821
7822 * targets.c: Sort target vecs.
7823 (_bfd_target_vector): Add aix5coff64_vec, bfd_elf32_sh64_vec,
7824 bfd_elf32_sh64l_vec, bfd_elf32_sh64lnbsd_vec,
7825 bfd_elf32_sh64nbsd_vec, bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec,
7826 bfd_elf64_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec.
7827 * configure.in: Sort target vecs. Add m88kmach3_vec.
7828 * configure: Regenerate.
7829
7830 2002-06-16 Hans-Peter Nilsson <hp@bitrange.com>
7831
7832 * elf64-mmix.c (bpo_reloc_request_sort_fn): Use member
7833 bpo_reloc_no to break sort order ties, not address of items.
7834
7835 2002-06-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
7836
7837 * elf-hppa.h (elf_hppa_final_link): Fix formatting in comment.
7838 Skip excluded sections in determing __gp value.
7839 (elf_hppa_final_link_relocate): Use the symbol's address in
7840 R_PARISC_FPTR64 relocations that don't need an opd entry.
7841 * elf64-hppa.c (allocate_dynrel_entries): Simplify code.
7842 (elf64_hppa_finalize_dynreloc): Likewise.
7843 (elf64_hppa_size_dynamic_sections): Move comments and fix typo.
7844 (elf64_hppa_finish_dynamic_symbol): Break up assert.
7845
7846 2002-06-14 Sergey Grigoriev <serge@leopold.Physik.Uni-Augsburg.DE>
7847
7848 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
7849 alignment for .bss, .data and .text sections so that sse and sse2
7850 code will work.
7851 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
7852
7853 2002-06013 J"orn Rennecke <joern.rennecke@superh.com>
7854
7855 config.bfd: Add support for sh[1234]l*-*-elf* | sh3el*-*-elf*,
7856 sh[1234]*-elf*.
7857
7858 2002-06-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
7859
7860 * elflink.h (elf_bfd_final_link): Improve error handling for missing
7861 dynamic sections.
7862
7863 * elf64-hppa.c (allocate_global_data_opd): We don't need an opd entry
7864 for a symbol that has no output section.
7865 (allocate_dynrel_entries): Correct comment.
7866 (elf64_hppa_finalize_dynreloc): Likewise. Don't create an opd entry
7867 unless we want one.
7868 (elf64_hppa_finalize_opd): Prevent segfault if dyn_h is NULL.
7869 (elf64_hppa_finalize_dlt): Likewise. Prevent segfault for symbols
7870 with no section. Remove unnecessary parentheses.
7871
7872 2002-06-11 Tom Rix <trix@redhat.com>
7873
7874 * coffcode.h (coff_compute_section_file_positions): Add data
7875 section to AIX loader alignment check.
7876
7877 * coff-rs6000.c (_bfd_xcoff_mkobject): Set default text section
7878 alignment to 4 bytes.
7879 (_bfd_xcoff_copy_private_bfd_data): Use text and data alignment
7880 power accessor macro.
7881 (do_shared_object_padding): Remove invalid assertion.
7882
7883 2002-06-10 Richard Sandiford <rsandifo@redhat.com>
7884
7885 * section.c (_bfd_strip_section_from_output): Set SEC_EXCLUDE
7886 for removed output sections.
7887
7888 2002-06-10 Geoffrey Keating <geoffk@redhat.com>
7889
7890 * merge.c (merge_strings): Use htab_create_alloc with calloc, not
7891 htab_alloc.
7892 * elf-strtab.c (_bfd_elf_strtab_finalize): Likewise.
7893
7894 2002-06-08 H.J. Lu <hjl@gnu.org>
7895
7896 * elf.c (copy_private_bfd_data): Don't cast to bfd_size_type to
7897 work around a long long bug in gcc 2.96 on mips.
7898
7899 2002-06-08 Jason Thorpe <thorpej@wasabisystems.com>
7900
7901 * Makefile.am (BFD32_BACKENDS): Add vax1knetbsd.lo.
7902 (BFD32_BACKENDS_CFILES): Add vax1knetbsd.c.
7903 Regenerate dependency lists.
7904 * Makefile.in: Regenerate.
7905 * config.bfd (vax-*-netbsdelf*, vax-*-netbsdaout*): Add
7906 vax1knetbsd_vec to targ_selvecs.
7907 * configure.in: Add vax1knetbsd_vec.
7908 * configure: Regenerate.
7909 * targets.c (_bfd_target_vector): Add vax1knetbsd_vec.
7910 * vax1knetbsd.c: New file.
7911 * vaxnetbsd.c: Update copyright years.
7912 (TARGET_PAGE_SIZE): Set to 0x1000.
7913 (DEFAULT_MID): Set to M_VAX4K_NETBSD.
7914
7915 2002-06-08 Matt Thomas <matt@3am-software.com>
7916
7917 * libaout.h (enum machine_type): Add M_VAX4K_NETBSD.
7918
7919 2002-06-08 Alan Modra <amodra@bigpond.net.au>
7920
7921 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Make static.
7922
7923 2002-06-08 Alan Modra <amodra@bigpond.net.au>
7924
7925 * Makefile.am: Run "make dep-am".
7926 * Makefile.in: Regenerate.
7927
7928 * armnetbsd.c: Replace CONST with const.
7929 * corefile.c: Likewise.
7930 * elf32-dlx.c: Likewise.
7931 * elf64-mips.c: Likewise.
7932 * mmo.c: Likewise.
7933 * ns32knetbsd.c: Likewise.
7934
7935 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Check the hash
7936 table is elf64-sparc.
7937
7938 2002-06-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7939
7940 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Simplify code.
7941 Fix RELA addends to get not shifted in the result. Don't do special
7942 handling of R_MIPS_64 for NewABI.
7943
7944 2002-06-07 Alan Modra <amodra@bigpond.net.au>
7945
7946 * aoutx.h (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
7947 (NAME(aout,slurp_reloc_table)): Likewise.
7948 * coff-mips.c (mips_relax_section): Use bfd_zalloc.
7949 * coff-rs6000.c (xcoff_write_armap_big): Use bfd_zmalloc.
7950 (xcoff_write_archive_contents_big): Likewise.
7951 (xcoff_generate_rtinit): Likewise.
7952 (xcoff_generate_rtinit): Likewise, and check error return.
7953 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
7954 * coffgen.c (coff_section_symbol): Use bfd_zalloc.
7955 (coff_get_normalized_symtab): Likewise.
7956 (coff_make_empty_symbol): Likewise.
7957 (bfd_coff_set_symbol_class): Likewise.
7958 * cofflink.c (coff_link_add_symbols): Likewise.
7959 * ecoff.c (_bfd_ecoff_make_empty_symbol): Likewise.
7960 * ecofflink.c (ecoff_write_shuffle): Use bfd_zmalloc.
7961 (bfd_ecoff_write_accumulated_debug): Likewise.
7962 * elf64-alpha.c (get_got_entry): Use bfd_zalloc.
7963 * i386linux.c (bfd_i386linux_size_dynamic_sections): Likewise.
7964 * i386lynx.c (NAME(lynx,slurp_reloc_table)): Use bfd_zmalloc.
7965 * ieee.c (do_with_relocs): Use bfd_zalloc.
7966 * m68klinux.c (bfd_m68klinux_size_dynamic_sections): Likewise.
7967 * pdp11.c (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
7968 (NAME(aout,slurp_reloc_table)): Likewise.
7969 (NAME(aout,squirt_out_relocs)): Don't memset when zalloc'd.
7970 * reloc16.c (bfd_coff_reloc16_relax_section): Use bfd_zmalloc.
7971 * som.c (som_build_and_write_symbol_table): Likewise.
7972 (som_slurp_string_table): Likewise.
7973 (som_slurp_symbol_table): Likewise.
7974 (som_bfd_ar_write_symbol_stuff): Likewise.
7975 * sparclinux.c (bfd_sparclinux_size_dynamic_sections): Use bfd_zalloc.
7976 * sunos.c (bfd_sunos_size_dynamic_sections): Likewise.
7977 * tekhex.c (find_chunk): Likewise. Get rid of unused "sname".
7978 * vms-gsd.c (_bfd_vms_slurp_gsd): Use bfd_zmalloc.
7979 * xcofflink.c (xcoff_link_add_symbols): Use bfd_zalloc/bfd_zmalloc.
7980
7981 2002-06-07 Alan Modra <amodra@bigpond.net.au>
7982
7983 * elf-bfd.h (struct bfd_elf_section_data <group_name>): Replace with
7984 "group" union.
7985 (elf_group_name): Update.
7986 (elf_group_id): Define.
7987 (bfd_elf_set_group_contents): Declare.
7988 * elf.c (elf_fake_sections): Qualify use of elf_group_name.
7989 (set_group_contents): Rename to bfd_elf_set_group_contents. Remove
7990 ATTRIBUTE_UNUSED from failedptrarg. If elf_group_id is set, use
7991 that sym for the signature.
7992 (_bfd_elf_compute_section_file_positions): Don't call
7993 set_group_contents for "ld -r" case.
7994 (swap_out_syms): Use bfd_zalloc.
7995 * elflink.h (elf_link_add_archive_symbols): Likewise.
7996 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
7997 (elf_bfd_final_link): Call bfd_elf_set_group_contents.
7998
7999 2002-06-07 Alan Modra <amodra@bigpond.net.au>
8000
8001 * elf64-ppc.c (ppc64_elf_relocate_section): Allow unresolved
8002 relocs in opd for non-shared too.
8003
8004 2002-06-06 Jeffrey Law <law@redhat.com>
8005
8006 * elf32-h8300.c (elf32_h8_relax_section): Ignore uninteresting
8007 relocations.
8008
8009 2002-06-06 Nick Clifton <nickc@cambridge.redhat.com>
8010
8011 * merge.c: Include libiberty.h.
8012 * elf-strtab.c: Include libiberty.h.
8013
8014 2002-06-06 Elias Athanasopoulos <eathan@otenet.gr>
8015
8016 * peXXigen.c (pe_print_idata): Remove unused variable.
8017
8018 2002-06-06 David Heine <dlheine@tensilica.com>
8019
8020 * elf.c (assign_file_positions_for_segments): Remove unallocated
8021 sections from the section to segment mapping for PT_LOAD segments.
8022 Update comment about empty loadable segments.
8023
8024 2002-06-06 Richard Sandiford <rsandifo@redhat.com>
8025
8026 * stabs.c (_bfd_link_section_stabs): Check that the symbol offset
8027 is within the .stabstr section.
8028
8029 2002-06-06 Alan Modra <amodra@bigpond.net.au>
8030
8031 * elf-bfd.h (struct elf_size_info <swap_symbol_in>): Function args
8032 are "const PTR", not "const PTR *".
8033 (bfd_elf32_swap_symbol_in): Likewise.
8034 (bfd_elf64_swap_symbol_in): Likewise.
8035 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR.
8036 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
8037 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
8038 (elf_link_add_object_symbols): Likewise.
8039 (elf_link_record_local_dynamic_symbol): Likewise.
8040 (elf_link_input_bfd): Likewise.
8041 (elf_gc_mark): Likewise.
8042 (elf_reloc_symbol_deleted_p): Likewise.
8043 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
8044 (mn10200_elf_relax_delete_bytes): Likewise.
8045 (mn10200_elf_symbol_address_p): Likewise.
8046 (mn10200_elf_get_relocated_section_contents): Likewise.
8047 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
8048 (mn10300_elf_relax_section): Likewise.
8049 (mn10300_elf_relax_delete_bytes): Likewise.
8050 (mn10300_elf_symbol_address_p): Likewise.
8051 (mn10300_elf_get_relocated_section_contents): Likewise.
8052 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
8053 (elf32_h8_relax_delete_bytes): Likewise.
8054 (elf32_h8_symbol_address_p): Likewise.
8055 (elf32_h8_get_relocated_section_contents): Likewise.
8056 * elf32-hppa.c (get_local_syms): Likewise.
8057 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
8058 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
8059 * elf32-sh.c (sh_elf_relax_section): Likewise.
8060 (sh_elf_relax_delete_bytes): Likewise.
8061 (sh_elf_get_relocated_section_contents): Likewise.
8062 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
8063 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
8064 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
8065 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
8066 * elf64-ppc.c (get_local_syms): Likewise.
8067 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
8068 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
8069
8070 2002-06-05 J"orn Rennecke <joern.rennecke@superh.com>
8071
8072 * config.bfd (sh64l*-*-elf*, shl*-*-elf*): New configurations.
8073
8074 2002-06-05 Alan Modra <amodra@bigpond.net.au>
8075
8076 * elf.c (group_signature): Swap in the whole symbol, and handle
8077 extracting section symbol names.
8078 (setup_group): Add comment.
8079 (set_group_contents): When called from objcopy or ld, arrange for
8080 section contents to be written. Write group member output section
8081 indices to allow objcopy to reorganize sections.
8082 (_bfd_elf_copy_private_section_data): Copy group info.
8083
8084 * elf-bfd.h (struct elf_size_info): Add swap_symbol_in field.
8085 (bfd_elf32_swap_symbol_in): Update prototype.
8086 (bfd_elf64_swap_symbol_in): Likewise.
8087 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR *.
8088 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
8089 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
8090 (elf_link_add_object_symbols): Likewise.
8091 (elf_link_record_local_dynamic_symbol): Likewise.
8092 (elf_link_input_bfd): Likewise.
8093 (elf_gc_mark): Likewise.
8094 (elf_reloc_symbol_deleted_p): Likewise.
8095 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
8096 (mn10200_elf_relax_delete_bytes): Likewise.
8097 (mn10200_elf_symbol_address_p): Likewise.
8098 (mn10200_elf_get_relocated_section_contents): Likewise.
8099 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
8100 (mn10300_elf_relax_section): Likewise.
8101 (mn10300_elf_relax_delete_bytes): Likewise.
8102 (mn10300_elf_symbol_address_p): Likewise.
8103 (mn10300_elf_get_relocated_section_contents): Likewise.
8104 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
8105 (elf32_h8_relax_delete_bytes): Likewise.
8106 (elf32_h8_symbol_address_p): Likewise.
8107 (elf32_h8_get_relocated_section_contents): Likewise.
8108 * elf32-hppa.c (get_local_syms): Likewise.
8109 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
8110 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
8111 * elf32-sh.c (sh_elf_relax_section): Likewise.
8112 (sh_elf_relax_delete_bytes): Likewise.
8113 (sh_elf_get_relocated_section_contents): Likewise.
8114 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
8115 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
8116 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
8117 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
8118 * elf64-ppc.c (get_local_syms): Likewise.
8119 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
8120 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
8121 * elfcode.h (NAME(_bfd_elf,size_info)): Update initialiser.
8122 * elf64-alpha.c (alpha_elf_size_info): Likewise.
8123 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
8124 * elf64-mips.c (mips_elf64_size_info): Likewise.
8125 * elf64-s390.c (s390_elf64_size_info): Likewise.
8126 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
8127
8128 2002-06-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
8129
8130 * elf32-mips.c (elf32_mips_ignore_discarded_relocs): Move to...
8131 elfxx-mips.c (_bfd_mips_elf_ignore_discarded_relocs): ... here.
8132 elf64-mips.c (elf_backend_ignore_discarded_relocs): Use
8133 _bfd_mips_elf_ignore_discarded_relocs.
8134 elfxx-mips.h (_bfd_mips_elf_ignore_discarded_relocs): Declare.
8135
8136 2002-06-05 H.J. Lu <hjl@gnu.org>
8137
8138 * elfxx-mips.c (mips_elf_calculate_relocation): Call
8139 _bfd_elf_rel_local_sym for STT_SECTION relocations against
8140 the SEC_MERGE section.
8141
8142 2002-06-05 Alan Modra <amodra@bigpond.net.au>
8143
8144 * coff-alpha.c: Update copyright date.
8145 * coff-mips.c: Likewise.
8146 * xcoff-target.h: Likewise.
8147
8148 * bfd-in.h: Remove "taken from the source" comment.
8149 * libbfd-in.h: Likewise.
8150 * libcoff-in.h: Likewise.
8151 * bfd-in2.h: Regenerate.
8152 * libbfd.h: Regenerate.
8153 * libcoff.h: Regenerate.
8154
8155 * elf.c (bfd_elf_discard_group): Return true.
8156 * elf-bfd.h (bfd_elf_discard_group): Declare.
8157 * bfd-in.h (bfd_elf_discard_group): Don't declare here.
8158 * section.c (bfd_discard_group): Rename to bfd_generic_discard_group.
8159 * bfd.c (bfd_discard_group): Define.
8160 * targets.c (struct bfd_target): Add _bfd_discard_group.
8161 (BFD_JUMP_TABLE_LINK): Here too.
8162 * libbfd-in.h (_bfd_nolink_bfd_discard_group): Define.
8163 * aout-adobe.c (aout_32_bfd_discard_group): Define.
8164 * aout-target.h (MY_bfd_discard_group): Define.
8165 * aout-tic30.c (MY_bfd_discard_group): Define.
8166 * binary.c (binary_bfd_discard_group): Define.
8167 * bout.c (b_out_bfd_discard_group): Define.
8168 * coff-alpha.c (_bfd_ecoff_bfd_discard_group): Define.
8169 * coffcode.h (coff_bfd_discard_group): Define.
8170 * coff-mips.c (_bfd_ecoff_bfd_discard_group): Define.
8171 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Define.
8172 * i386msdos.c (msdos_bfd_discard_group): Define.
8173 * i386os9k.c (os9k_bfd_discard_group): Define.
8174 * ieee.c (ieee_bfd_discard_group): Define.
8175 * ihex.c (ihex_bfd_discard_group): Define.
8176 * mmo.c (mmo_bfd_discard_group): Define.
8177 * nlm-target.h (nlm_bfd_discard_group): Define.
8178 * oasys.c (oasys_bfd_discard_group): Define.
8179 * ppcboot.c (ppcboot_bfd_discard_group): Define.
8180 * som.c (som_bfd_discard_group): Define.
8181 * srec.c (srec_bfd_discard_group): Define.
8182 * tekhex.c (tekhex_bfd_discard_group): Define.
8183 * versados.c (versados_bfd_discard_group): Define.
8184 * vms.c (vms_bfd_discard_group): Define.
8185 * xcoff-target.h (_bfd_xcoff_bfd_discard_group): Define.
8186 * coff64-rs6000.c (rs6000coff64_vec): Update initialiser.
8187 (aix5coff64_vec): Likewise.
8188 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Likewise.
8189
8190 2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
8191
8192 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-com.lo.
8193 (BFD32_BACKENDS_CFILES): Add elf32-sh64-com.c.
8194 (elf32-sh64-com.lo): New dependency list.
8195 * Makefile.in: Regenerate.
8196 * configure.in (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec)
8197 (bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec): Add
8198 elf32-sh64-com.lo.
8199 * configure: Regenerate.
8200 * elf32-sh64.c (sh64_address_in_cranges)
8201 (sh64_get_contents_type, sh64_address_is_shmedia): Move to...
8202 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb):
8203 (crange_bsearch_cmpl): Prepend _bfd_sh64_ to name and move to...
8204 * elf32-sh64-com.c: ...here. New file.
8205
8206 2002-06-04 Alan Modra <amodra@bigpond.net.au>
8207
8208 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Remove
8209 ATTRIBUTE_UNUSED on used params.
8210 * elf32-vax.c (elf_vax_gc_mark_hook): Remove unnecessary checks
8211 before calling bfd_section_from_elf_index on local syms.
8212 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
8213
8214 2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
8215
8216 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-nbsd.lo.
8217 (BFD32_BACKENDS_CFILES): Add elf32-sh64-nbsd.c.
8218 (BFD64_BACKENDS): Add elf64-sh64-nbsd.lo.
8219 (BFD64_BACKENDS_CFILES): Add elf64-sh64-nbsd.c.
8220 (elf32-sh64-nbsd.lo, elf64-sh64-nbsd.lo): New rules.
8221 * Makefile.in: Regenerate.
8222 * config.bfd (sh5le-*-netbsd*, sh5-*-netbsd*, sh64le-*-netbsd*)
8223 (sh64-*-netbsd*): New targets.
8224 * configure.in: Add bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec,
8225 bfd_elf64_sh64nbsd_vec, and bfd_elf64_sh64lnbsd_vec.
8226 * configure: Regenerate.
8227 * elf32-sh64-nbsd.c: New file.
8228 * elf64-sh64-nbsd.c: New file.
8229 * targets.c: Add extern decls for bfd_elf32_sh64nbsd_vec,
8230 bfd_elf32_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec, and
8231 bfd_elf64_sh64lnbsd_vec.
8232
8233 2002-06-04 Alan Modra <amodra@bigpond.net.au>
8234
8235 * elf.c (setup_group): Set SEC_LINK_ONCE on GRP_COMDAT groups.
8236 (bfd_section_from_shdr): Likewise. Set section name of group
8237 sections from signature.
8238 (group_signature): Split out from setup_group. Ensure symbol table
8239 is available.
8240 (bfd_elf_discard_group): New function.
8241 (_bfd_elf_make_section_from_shdr): Don't set SEC_LINK_ONCE on
8242 .gnu.linkonce* sections if they are members of a group.
8243 (set_group_contents): Set GRP_COMDAT flag.
8244 * section.c (bfd_discard_group): New function.
8245 * bfd-in.h (bfd_elf_discard_group): Declare.
8246 * bfd-in2.h: Regenerate.
8247 * elf-bfd.h (struct bfd_elf_section_data): Add linkonce_p field.
8248 (elf_linkonce_p): Define.
8249
8250 2002-06-04 Alan Modra <amodra@bigpond.net.au>
8251
8252 * elf.c (bfd_section_from_shdr): Make "name" const.
8253 * elf-bfd.h (elf_backend_section_from_shdr): Likewise.
8254 * elf32-i370.c (i370_elf_section_from_shdr): Likewise.
8255 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
8256 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
8257 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
8258 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
8259 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
8260 * elf64-ppc.c (ppc64_elf_section_from_shdr): Likewise.
8261 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
8262 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
8263 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
8264
8265 2002-06-03 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
8266
8267 * elfxx-mips.c (ABI_64_P): Use backend's data to determine the
8268 ABI.
8269
8270 2002-06-02 Kazu Hirata <kazu@cs.umass.edu>
8271
8272 * elf32-arc.c: Fix formatting.
8273 * elf32-arm.h: Likewise.
8274 * elf32-cris.c: Likewise.
8275 * elf32-dlx.c: Likewise.
8276 * elf32-hppa.c: Likewise.
8277 * elf32-i386.c: Likewise.
8278 * elf32-i386qnx.c: Likewise.
8279 * elf32-or32.c: Likewise.
8280 * elf32-s390.c: Likewise.
8281 * elf32-sh64.c: Likewise.
8282 * elf32-vax.c: Likewise.
8283 * elf32-xstormy16.c: Likewise.
8284 * elf64-alpha.c: Likewise.
8285 * elf64-mmix.c: Likewise.
8286 * elf64-ppc.c: Likewise.
8287 * elf64-s390.c: Likewise.
8288 * elf64-sh64.c: Likewise.
8289 * elf64-x86-64.c: Likewise.
8290
8291 2002-06-02 Richard Henderson <rth@redhat.com>
8292
8293 * elf64-alpha.c (elf64_alpha_relocate_section): Don't dereference
8294 null when there are no got entries for a symbol.
8295 (elf64_alpha_relax_find_tls_segment): Rearrange to avoid
8296 uninitialized variable warning.
8297
8298 2002-06-01 Richard Henderson <rth@redhat.com>
8299
8300 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Don't test for
8301 undefined symbols here.
8302 (elf64_alpha_relax_section): Do it here. Also test for not
8303 defined in the current module.
8304 (elf64_alpha_relocate_section_r): Split out of ...
8305 (elf64_alpha_relocate_section): ... here. Don't dereference
8306 NULL when looking up local got entries.
8307
8308 2002-06-01 Richard Henderson <rth@redhat.com>
8309
8310 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Reject undefined
8311 symbols from JSR relaxation.
8312 (elf64_alpha_size_plt_section_1): New.
8313 (elf64_alpha_calc_dynrel_sizes): Split out .rela.got bits ...
8314 (elf64_alpha_size_rela_got_1): ... here.
8315 (elf64_alpha_size_dynamic_sections): Split out .rela.got bits ...
8316 (elf64_alpha_size_rela_got_section): ... here.
8317 (elf64_alpha_size_plt_section): New.
8318 (elf64_alpha_relax_section): Call them.
8319 (elf64_alpha_size_got_sections): Remove output_bfd arg.
8320 (elf64_alpha_finish_dynamic_symbol): Check gotent use_count.
8321
8322 2002-06-01 Richard Henderson <rth@redhat.com>
8323
8324 * elf64-alpha.c (alpha_get_dtprel_base, alpha_get_tprel_base): New.
8325 (elf64_alpha_relocate_section): Use them. Reject LE TLS relocs
8326 in shared libraries. Fix DTPRELHI and TPRELHI value.
8327 (INSN_ADDQ, INSN_RDUNIQ): New.
8328 (struct alpha_relax_info): Add symtab_hdr, tls_segment, first_gotent.
8329 (elf64_alpha_relax_with_lituse): Return boolean. Remove irelend
8330 argument. Reject dynamic symbols. Use LITUSE symbolic constants.
8331 (elf64_alpha_relax_got_load): Rename from relax_without_lituse.
8332 Handle GOTDTPREL and GOTTPREL relocations.
8333 (elf64_alpha_relax_gprelhilo): New.
8334 (elf64_alpha_relax_tls_get_addr): New.
8335 (elf64_alpha_relax_find_tls_segment): New.
8336 (elf64_alpha_relax_section): Handle TLS relocations.
8337 (ALPHA_ELF_LINK_HASH_TLS_IE): New.
8338 (elf64_alpha_check_relocs): Set it.
8339
8340 2002-06-01 Richard Henderson <rth@redhat.com>
8341
8342 * elf64-alpha.c (elf64_alpha_relax_section): Don't store computed gp.
8343
8344 * elf64-alpha.c (elf64_alpha_check_relocs): Fix typo on maybe_dynamic
8345 check; don't suppress dynamic relocs for non-allocated sections.
8346
8347 * elf64-alpha.c: Remove dead code.
8348
8349 2002-05-31 Alan Modra <amodra@bigpond.net.au>
8350
8351 * bfd-in2.h: Regenerate.
8352 * libbfd.h: Regenerate.
8353 * po/SRC-POTFILES.in: Regenerate.
8354
8355 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate
8356 space for bss .plt.
8357
8358 2002-05-31 Graeme Peterson <gp@qnx.com>
8359
8360 * Makefile.am (BFD32_BACKENDS): Add elf32-i386qnx.lo.
8361 (BFD32_BACKENDS_CFILES): Add elf32-i386qnx.c.
8362 Run "make dep-am".
8363 * Makefile.in: Regenerate.
8364 * config.bfd: Add i[3456]86-*-nto-qnx* support.
8365 * configure.in: Add bfd_elf32_i386qnx_vec support.
8366 * configure: Regenerate.
8367 * elf-bfd.h (struct elf_backend_data): Add set_nonloadable_filepos,
8368 is_contained_by_filepos, and copy_private_bfd_data_p.
8369 * elf.c (assign_file_positions_for_segments): Call backend
8370 set_nonloadable_filepos. Fix non-K&R call to _bfd_error_handler.
8371 (IS_CONTAINED_BY_FILEPOS): Define.
8372 (INCLUDE_SECTION_IN_SEGMENT): Also test IS_CONTAINED_BY_FILEPOS.
8373 (copy_private_bfd_data): Use IS_CONTAINED_BY_FILEPOS. Typo fix.
8374 Fix non-K&R call to _bfd_error_handler.
8375 (_bfd_elf_copy_private_section_data): Use backend
8376 copy_private_bfd_data_p.
8377 * elf32-i386.c: Don't include elfxx-target.h when
8378 ELF32_I386_C_INCLUDED is defined.
8379 * elf32-i386qnx.c: New QNX elf backend file.
8380 * elfxx-target.h: Add elf_backend_set_nonloadable_filepos,
8381 elf_backend_is_contained_by_filepos, and
8382 elf_backend_do_copy_private_bfd_data.
8383 * targets.c: Add bfd_target bfd_elf32_i386qnx_vec.
8384
8385 2002-05-31 Alan Modra <amodra@bigpond.net.au>
8386
8387 * elfarm-oabi.c (bfd_elf32_arm_add_glue_sections_to_bfd): Define.
8388 Move other similar defines to start of file.
8389
8390 2002-05-30 Tom Rix <trix@redhat.com>
8391
8392 * coff-rs6000.c (xcoff_rtype2howto): Handle 16 bit R_RBA.
8393 * coff64-rs6000.c (xcoff64_rtype2howto): Same.
8394
8395 2002-05-30 Richard Henderson <rth@redhat.com>
8396
8397 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_TLSGD,
8398 ALPHA_ELF_LINK_HASH_LU_TLSLDM, ALPHA_ELF_LINK_HASH_LU_FUNC): New.
8399 (ALPHA_ELF_GOT_ENTRY_RELOCS_DONE): Remove.
8400 (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Remove.
8401 (struct alpha_elf_got_entry): Add reloc_type, reloc_done, reloc_xlated.
8402 (struct alpha_elf_obj_tdata): Rename total_got_entries and
8403 n_local_got_entries to total_got_size and local_got_size.
8404 (elf64_alpha_howto, elf64_alpha_reloc_map): Update for TLS relocs.
8405 (alpha_got_entry_size): New.
8406 (elf64_alpha_relax_with_lituse): Use it.
8407 (elf64_alpha_relax_without_lituse): Likewise.
8408 (MAX_GOT_SIZE): Rename from MAX_GOT_ENTRIES.
8409 (get_got_entry): New.
8410 (elf64_alpha_check_relocs): Handle TLS relocs. Reorganize.
8411 (elf64_alpha_adjust_dynamic_symbol): Test LU_FUNC as a mask.
8412 (elf64_alpha_merge_ind_symbols): Check gotent->reloc_type.
8413 (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots): Likewise.
8414 (elf64_alpha_calc_got_offsets_for_symbol): Use alpha_got_entry_size.
8415 (elf64_alpha_calc_got_offsets): Likewise.
8416 (alpha_dynamic_entries_for_reloc): New.
8417 (elf64_alpha_calc_dynrel_sizes): Use it.
8418 (elf64_alpha_size_dynamic_sections): Likewise.
8419 (elf64_alpha_relocate_section): Handle TLS relocations.
8420 * reloc.c: Add Alpha TLS relocations.
8421 * bfd-in2.h, libbfd.h: Rebuild.
8422
8423 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
8424
8425 * peXXigen.c (pe_print_idata): Remove double printed
8426 import table lines; add Bound-To comment.
8427
8428 2002-05-29 Matt Thomas <matt@3am-software.com>
8429
8430 * Makefile.am (BFD32_BACKENDS): Add elf32-vax.lo.
8431 (BFD32_BACKENDS_CFILES): Add elf32-vax.c.
8432 (elf32-vax.lo): New rule.
8433 * Makefile.in: Regenerate.
8434 * configure.in (bfd_elf32_vax_vec)
8435 (vaxnetbsd_vec): New vectors.
8436 * configure: Regenerate.
8437 * config.bfd (vax-*-netbsdelf*)
8438 (vax-*-netbsdaout*)
8439 (vax-*-netbsd*): New targets.
8440 * elf32-vax.c: New file.
8441 * reloc.c: Add VAX relocations.
8442 * bfd-in2.h: Regenerate.
8443 * targets.c (_bfd_target_vector): Add bfd_elf32_vax_vec.
8444
8445 2002-05-29 Jason Thorpe <thorpej@wasabisystems.com>
8446
8447 * config.bfd (arm-*-netbsd*): Add bfd_elf32_littlearm_vec
8448 and bfd_elf32_bigarm_vec to targ_selvecs.
8449
8450 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
8451
8452 * peXXigen.c (pe_print_idata): Fix seg faults on printing import tables
8453 with auto-imported symbols.
8454
8455 2002-05-29 Adam Nemet <anemet@lnxw.com>
8456
8457 * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Don't add glue
8458 sections only record bfd.
8459 (bfd_elf32_arm_add_glue_sections_to_bfd): New function.
8460 * bfd-in.h (bfd_elf32_arm_add_glue_sections_to_bfd): Declare it.
8461 * bfd-in2.h: Regenerate.
8462
8463 2002-05-28 Nick Clifton <nickc@cambridge.redhat.com>
8464
8465 * syms.c (_bfd_stab_section_find_nearest_line): Move
8466 declaration and initialisation of saw_line and saw_func out of
8467 for loop.
8468
8469 2002-05-29 Alan Modra <amodra@bigpond.net.au>
8470
8471 * elf64-ppc.c (ppc64_elf_get_symbol_info): New function.
8472 (bfd_elf64_get_symbol_info): Define.
8473 * elfxx-target.h (bfd_elfNN_get_symbol_info): Only define if undef.
8474
8475 2002-05-29 Andrey Volkov <avolkov@transas.com>
8476
8477 * cpu-h8300.c: Make default h8300 machine first in machine list.
8478
8479 2002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net>
8480
8481 * config.bfd: Added DLX configuraton.
8482 * Makefile.am: Added DLX configuraton.
8483 * configure.in: Added DLX configuraton.
8484 * archures.c: Add DLX architecture.
8485 * reloc.c: Add DLX relocs.
8486 * targets.c: Added DLX target vector.
8487 * configure: Regenerate.
8488 * Makefile.in: Regenreate.
8489 * bfd-in2.h: Regenreate.
8490 * elf32-dlx.c: New file: Support DLX target.
8491 * cpu-dlx.c: New file: Support DLX target.
8492
8493 2002-05-25 Alan Modra <amodra@bigpond.net.au>
8494
8495 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Formatting.
8496
8497 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Revert last change.
8498 (ppc64_elf_check_relocs): Don't set up function descriptor symbol
8499 strings to point inside function code sym string.
8500 (func_desc_adjust): Likewise.
8501 (ppc64_elf_hide_symbol): Rewrite code to look up function code sym.
8502
8503 2002-05-24 Michal Ludvig <mludvig@suse.cz>
8504
8505 * elf64-x86-64.c (elf64_x86_64_grok_prstatus): Added.
8506 (elf64_x86_64_grok_psinfo): Added.
8507
8508 2002-05-24 TAMURA Kent <kent@netbsd.org>
8509
8510 * config.bfd: Add a target for i386-netbsdpe.
8511
8512 2002-05-24 Alan Modra <amodra@bigpond.net.au>
8513
8514 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy is_func
8515 and is_func_descriptor.
8516 (func_desc_adjust): Hide function code sym in shared libs unless
8517 there is a matching exported function descriptor sym.
8518
8519 2002-05-23 Jakub Jelinek <jakub@redhat.com>
8520
8521 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_THREAD_LOCAL
8522 for symbols from SHF_TLS section.
8523 (_bfd_elf_print_private_bfd_data): Add PT_TLS.
8524 (elf_fake_sections): Set SHF_TLS for SEC_THREAD_LOCAL sections.
8525 (map_sections_to_segments): Build PT_TLS segment if necessary.
8526 (assign_file_positions_for_segments): Likewise.
8527 (get_program_header_size): Account for PT_TLS segment.
8528 (swap_out_syms): Set type of BSF_THREAD_LOCAL symbols and symbols from
8529 SEC_THREAD_LOCAL sections to STT_TLS.
8530 * reloc.c: Add 386 and IA-64 TLS relocs.
8531 * section.c (SEC_THREAD_LOCAL): Define.
8532 (SEC_CONSTRUCTOR_TEXT, SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS):
8533 Remove.
8534 * elflink.h (elf_link_add_object_symbols): Support .tcommon.
8535 (size_dynamic_sections): If DF_STATIC_TLS, set DF_FLAGS
8536 unconditionally.
8537 (struct elf_final_link_info): Add first_tls_sec.
8538 (elf_bfd_final_link): Set first_tls_sec.
8539 Compute elf_hash_table (info)->tls_segment.
8540 (elf_link_output_extsym): Handle STT_TLS symbols.
8541 (elf_link_input_bfd): Likewise.
8542 * syms.c (BSF_THREAD_LOCAL): Define.
8543 * bfd-in2.h: Rebuilt.
8544 * libbfd.h: Rebuilt.
8545 * elf32-i386.c (elf_i386_tls_transition, dtpoff_base, tpoff,
8546 elf_i386_mkobject, elf_i386_object_p): New functions.
8547 (elf_howto_table): Add TLS relocs.
8548 (elf_i386_reloc_type_lookup): Support TLS relocs.
8549 (elf_i386_info_to_howto_rel): Likewise.
8550 (struct elf_i386_link_hash_entry): Add tls_type.
8551 (struct elf_i386_obj_tdata): New.
8552 (elf_i386_hash_entry, elf_i386_tdata, elf_i386_local_got_tls_type):
8553 New macros.
8554 (struct elf_i386_link_hash_table): Add tls_ldm_got.
8555 (link_hash_newfunc): Clear tls_type.
8556 (elf_i386_check_relocs): Support TLS relocs.
8557 (elf_i386_gc_sweep_hook): Likewise.
8558 (allocate_dynrelocs): Likewise.
8559 (elf_i386_size_dynamic_sections): Likewise.
8560 (elf_i386_relocate_section): Likewise.
8561 (elf_i386_finish_dynamic_symbol): Likewise.
8562 (bfd_elf32_mkobject, elf_backend_object_p): Define.
8563 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add tprel_offset,
8564 dtpmod_offset, dtprel_offset, tprel_done, dtpmod_done, dtprel_done,
8565 want_tprel, want_dtpmod, want_dtprel.
8566 (elfNN_ia64_tprel_base, elfNN_ia64_dtprel_base): New functions.
8567 (ia64_howto_table): Add TLS relocs, rename R_IA64_LTOFF_TP22 to
8568 R_IA64_LTOFF_TPREL22.
8569 (elf_code_to_howto_index): Add TLS relocs.
8570 (elfNN_ia64_check_relocs): Support TLS relocs.
8571 (allocate_global_data_got): Account for TLS .got data.
8572 (allocate_dynrel_entries): Account for TLS dynamic relocations.
8573 (elfNN_ia64_install_value): Supprt TLS relocs.
8574 (set_got_entry): Support TLS relocs.
8575 (elfNN_ia64_relocate_section): Likewise.
8576
8577 2002-05-23 Nick Clifton <nickc@cambridge.redhat.com>
8578
8579 * elf32-arm.h (elf32_arm_final_link_relocate): For the Thumb
8580 BLX reloc round the relocation up rather than down.
8581 * coff-arm.c (coff_arm_relocate_section): Likewise.
8582
8583 2002-05-21 H.J. Lu (hjl@gnu.org)
8584
8585 * linker.c (_bfd_generic_link_add_one_symbol): Allow multiple
8586 definition.
8587
8588 2002-05-22 Alan Modra <amodra@bigpond.net.au>
8589
8590 * elf64-ppc.c (ppc64_elf_size_stubs): Don't strip .branch_lt.
8591 (ppc64_elf_relocate_section): Handle unresolved relocs in opd.
8592
8593 2002-05-22 Alan Modra <amodra@bigpond.net.au>
8594
8595 * elf64-ppc.c (ppc64_elf_relocate_section): Return false for
8596 unresolved relocs.
8597 (ppc64_elf_size_dynamic_sections): Check for splt NULL.
8598
8599 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8600
8601 * bfd.c (bfd_get_arch_size): Remove bfd_set_error call for
8602 non-ELF targets.
8603
8604 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8605
8606 * elf-bfd.h (elf_backend_emit_relocs): Change prototype to return
8607 an error value.
8608 * elflink.h (elf_link_output_relocs): Likewise. Improve error message.
8609 return with false on error.
8610 (elf_link_input_bfd): Check reloc_emitter return value.
8611
8612 2002-05-21 Jason Thorpe <thorpej@wasabisystems.com>
8613
8614 * config.bfd (armeb-*-netbsdelf*): New target.
8615
8616 2002-05-20 Alan Modra <amodra@bigpond.net.au>
8617
8618 * elf64-ppc.c (ppc_build_one_stub): Point undefined function syms
8619 at the plt call stub.
8620
8621 2002-05-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8622
8623 * cpu-mips.c (mips_compatible): Don't try to check machine
8624 compatibility.
8625
8626 2002-05-18 Tom Rix <trix@redhat.com>
8627
8628 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_out): Fix C_FILE auxent.
8629
8630 2002-05-17 Alan Modra <amodra@bigpond.net.au>
8631
8632 * elf64-ppc.c (ppc64_elf_info_to_howto): Formatting.
8633 (ppc64_elf_relocate_section): Don't warn about reloc overflow when
8634 we've already warned about an undefined symbol. Report more
8635 detail on reloc errors.
8636
8637 2002-05-17 Alan Modra <amodra@bigpond.net.au>
8638
8639 * acinclude.m4 (AM_INSTALL_LIBBFD): New.
8640 * configure.in: Invoke AM_INSTALL_LIBBFD.
8641 * Makefile.am (install-data-local): Revert 2002-05-13. Move to..
8642 (install_libbfd): .. New target.
8643 (uninstall_libbfd): Likewise.
8644 (install-bfdlibLTLIBRARIES): Likewise.
8645 (uninstall-bfdlibLTLIBRARIES): Likewise.
8646 (bfdlibdir): New.
8647 (bfdincludedir): New.
8648 (lib_LTLIBRARIES): Rename to bfdlib_LTLIBRARIES.
8649 * aclocal.m4: Regenerate.
8650 * configure: Regenerate.
8651 * Makefile.in: Regenerate.
8652
8653 2002-05-17 Stuart Balfour <sbalfour@cisco.com>
8654
8655 * hash.c (bfd_hash_lookup): Remove computation of len from inside
8656 hash loop.
8657
8658 2002-05-16 Nick Clifton <nickc@cambridge.redhat.com>
8659
8660 * config.bfd: Add targets for sh64-linux (little endian and
8661 big endian).
8662
8663 2002-05-15 Laurent Pinchart <laurent.pinchart@skynet.be>
8664
8665 * peXXigen.c (pe_print_idata): Do not assume that the first thunk
8666 is located in the same section as the import table. Instead
8667 check, and if necessary load the section containing the thunk.
8668
8669 2002-05-15 Nick Clifton <nickc@cambridge.redhat.com>
8670
8671 * aix5ppc-core.c (xcoff64_core_p): Replace bfd_read with
8672 bfd_bread.
8673 (xcoff64_core_file_matches_executable_p): Replace bfd_read
8674 with bfd_bread.
8675
8676 2002-05-15 Alan Modra <amodra@bigpond.net.au>
8677
8678 * aix5ppc-core.c: Warning fixes.
8679 * aout-adobe.c (aout_32_bfd_link_just_syms): Define.
8680 * aout-target.h (MY_bfd_link_just_syms): Define.
8681 * aout-tic30.c (MY_bfd_link_just_syms): Define.
8682 * bfd.c (bfd_link_just_syms): Define.
8683 * binary.c (binary_bfd_link_just_syms): Define.
8684 * bout.c (b_out_bfd_link_just_syms): Define.
8685 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update initializer.
8686 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
8687 * coffcode.h (coff_bfd_link_just_syms): Define.
8688 * elf-bfd.h (enum elf_link_info_type): Add ELF_INFO_TYPE_JUST_SYMS.
8689 (elf_discarded_section): Check for ELF_INFO_TYPE_JUST_SYMS.
8690 (_bfd_elf_link_just_syms): Declare.
8691 * elf.c (_bfd_elf_link_just_syms): New function.
8692 * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Check that
8693 sections haven't already been discarded by the linker.
8694 * elflink.h (elf_link_add_object_symbols): Likewise for stab
8695 sections and SEC_MERGE sections.
8696 (elf_bfd_discard_info): Similarly here.
8697 * elfxx-target.h (bfd_elfNN_bfd_link_just_syms): Define.
8698 * i386msdos.c (msdos_bfd_link_just_syms): Define.
8699 * i386os9k.c (os9k_bfd_link_just_syms): Define.
8700 * ieee.c (ieee_bfd_link_just_syms): Define.
8701 * ihex.c (ihex_bfd_link_just_syms): Define.
8702 * libbfd-in.h (_bfd_nolink_bfd_link_just_syms): Define.
8703 (_bfd_generic_link_just_syms): Declare.
8704 * libecoff.h (_bfd_ecoff_bfd_link_just_syms): Define.
8705 * linker.c (_bfd_generic_link_just_syms): New function.
8706 * mmo.c (mmo_bfd_link_just_syms): Define.
8707 * nlm-target.h (nlm_bfd_link_just_syms): Define.
8708 * oasys.c (oasys_bfd_link_just_syms): Define.
8709 * ppcboot.c (ppcboot_bfd_link_just_syms): Define.
8710 * som.c (som_bfd_link_just_syms): Define.
8711 * srec.c (srec_bfd_link_just_syms): Define.
8712 * targets.c (struct bfd_target): Add _bfd_link_just_syms.
8713 (BFD_JUMP_TABLE_LINK): And here.
8714 * tekhex.c (tekhex_bfd_link_just_syms): Define.
8715 * versados.c (versados_bfd_link_just_syms): Define.
8716 * vms.c (vms_bfd_link_just_syms): Define.
8717 * libbfd.h: Regenerate.
8718 * bfd-in2.h: Regenerate.
8719
8720 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8721
8722 * elf32-mips.c: Remove superfluous definitions copied from
8723 elfxx-mips.c.
8724 (bfd_elf32_bigmips_vec,bfd_elf32_littlemips_vec): Use the
8725 SGIish vectors to check the special case.
8726 (mips_elf_hi16_reloc): Fix comment.
8727 (mips_elf_got16_reloc): Likewise.
8728 (_bfd_mips_elf32_gprel16_reloc): Likewise.
8729 (elf_reloc_map): Code cleanup.
8730 (mips_reloc_map): Add comment.
8731 (bfd_elf23_bfd_reloc_type_lookup): Code cleanup.
8732 (mips_elf32_rtype_to_howto): Likewise.
8733 (mips_elf32_discard_info): Likewise.
8734 (elf32_mips_irix_compat): Invert logic: Only SGIish vectors
8735 lead to IRIX compatibility now.
8736
8737 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8738
8739 * elfxx-mips.c: Call it IRIX, not Irix in comments.
8740
8741 2002-05-13 Jason Thorpe <thorpej@wasabisystems.com>
8742
8743 * config.bfd (shle-*-netbsdelf*): Add target which includes
8744 sh64 support.
8745
8746 2002-05-13 David Edelsohn <edelsohn@gnu.org>
8747
8748 * configure.in: Revert 2002-04-07. Instead, auto-configure
8749 HAVE_ST_C_IMPL.
8750 * configure: Regenerate.
8751 * config.in: Regenerate.
8752 * rs6000-core.c (CNEW_IMPL): Guard use of c_impl with HAVE_ST_C_IMPL
8753 or AIX_5_CORE.
8754
8755 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
8756
8757 * configure.in (sparc*-*-openbsd*): Support sparc64-openbsd
8758 corefiles as well.2
8759 * configure: Regenerate.
8760
8761 2002-05-13 Alan Modra <amodra@bigpond.net.au>
8762
8763 * Makefile.am (install-data-local): Install headers to
8764 $(exec_prefix)/include.
8765 * Makefile.in: Regenerate.
8766
8767 2002-05-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
8768 Daniel Jacobowitz <drow@mvista.com>
8769
8770 * coff-sh.c (sh_reloc_map): Map to R_SH_IMM32 for non-PE. Don't
8771 map BFD_RELOC_RVA.
8772
8773 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
8774
8775 * config.bfd (alpha*-*-openbsd*, sparc64*-*-openbsd*,
8776 hppa*-*-openbsd*): New targets.
8777 * configure.in (alpha*-*-openbsd*): Set COREFILE.
8778 * configure: Regenerate.
8779
8780 2002-05-10 Tom Rix <trix@redhat.com>
8781
8782 * coff64-rs6000.c (xcoff64_reloc_type_br): New function for
8783 xcoff64_ppc_relocate_section.
8784 * coff-rs6000.c : Extern common xcoff_reloc_type functions.
8785 * libxcoff.h: Common xcoff_reloc_type function declaration.
8786
8787 2002-05-10 Alan Modra <amodra@bigpond.net.au>
8788
8789 * elf32-i386.c (elf_i386_relocate_section): Remove overflow checks
8790 added in 2002-05-09 commit.
8791
8792 * elf32-hppa.c (elf32_hppa_size_stubs): Revert part of 2002-05-04,
8793 don't look for stubs on all undefined syms.
8794
8795 2002-05-09 Alan Modra <amodra@bigpond.net.au>
8796
8797 * elf64-ppc.c (RA_REGISTER_MASK, RA_REGISTER_SHIFT): Delete.
8798 (ppc64_elf_howto_raw <R_PPC64_RELATIVE>): Not pc_relative or
8799 pcrel_offset.
8800
8801 * elf32-i386.c (elf_howto_table): Comments.
8802 (elf_i386_relocate_section): Handle more relocs for relocatable
8803 linking and against SEC_MERGE sections.
8804
8805 2002-05-08 Alan Modra <amodra@bigpond.net.au>
8806
8807 * elf32-ppc.c (ppc_elf_create_got): New function.
8808 (ppc_elf_create_dynamic_sections): Call ppc_elf_create_got before
8809 _bfd_elf_create_dynamic_sections. Correct .plt flags.
8810 (ppc_elf_check_relocs): Use ppc_elf_create_got in place of
8811 _bfd_elf_create_got_section.
8812
8813 2002-05-07 Alan Modra <amodra@bigpond.net.au>
8814
8815 * elf-bfd.h (struct elf_backend_data): Add rela_normal.
8816 * elfxx-target.h (elf_backend_rela_normal): Define.
8817 (elfNN_bed): Init rela_normal.
8818 * elflink.h (elf_link_input_bfd <emit_relocs>): Handle adjustment
8819 for section symbols here if rela_normal. Simplify abs section test.
8820 * elf-m10200.c (mn10200_elf_relocate_section): If relocatable,
8821 return immediately. Remove code handling relocatable linking.
8822 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
8823 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
8824 * elf32-i370.c (i370_elf_relocate_section): Likewise.
8825 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
8826 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
8827 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
8828 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
8829 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
8830 * elf32-s390.c (elf_s390_relocate_section): Likewise.
8831 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
8832 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
8833 * elf64-s390.c (elf_s390_relocate_section): Likewise.
8834 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
8835 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
8836 * elf32-arm.h (elf32_arm_relocate_section): Likewise #ifndef USE_REL.
8837 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
8838 * elf-m10200.c (elf_backend_rela_normal): Define.
8839 * elf-m10300.c (elf_backend_rela_normal): Define.
8840 * elf32-fr30.c (elf_backend_rela_normal): Define.
8841 * elf32-i370.c (elf_backend_rela_normal): Define.
8842 * elf32-i860.c (elf_backend_rela_normal): Define.
8843 * elf32-m68k.c (elf_backend_rela_normal): Define.
8844 * elf32-mcore.c (elf_backend_rela_normal): Define.
8845 * elf32-openrisc.c (elf_backend_rela_normal): Define.
8846 * elf32-ppc.c (elf_backend_rela_normal): Define.
8847 * elf32-s390.c (elf_backend_rela_normal): Define.
8848 * elf32-xstormy16.c (elf_backend_rela_normal): Define.
8849 * elf64-ppc.c (elf_backend_rela_normal): Define.
8850 * elf64-s390.c (elf_backend_rela_normal): Define.
8851 * elf64-x86-64.c (elf_backend_rela_normal): Define.
8852 * elfxx-ia64.c (elf_backend_rela_normal): Define.
8853 * elf32-arm.h (elf_backend_rela_normal): Define #ifndef USE_REL.
8854 * elf32-m32r.c (elf_backend_rela_normal): Likewise.
8855
8856 2002-05-06 Nick Clifton <nickc@cambridge.redhat.com>
8857
8858 * elf32-arm.h (elf32_arm_final_link_relocate): Convert
8859 'reloc_signed_max' and 'reloc_signed_min' into half-word offsets.
8860
8861 2002-05-06 Alan Modra <amodra@bigpond.net.au>
8862
8863 * elflink.h (elf_link_input_bfd <emit_relocs>): Adjust r_offset
8864 when not relocatable. Fix reloc_emitter call for K&R.
8865
8866 2002-05-04 Alan Modra <amodra@bigpond.net.au>
8867
8868 * elf64-ppc.c (ppc64_elf_relocate_section): Reinstate code
8869 reloading local sym addend mistakenly removed in 2002-05-01 change.
8870
8871 * dwarf2.c (struct line_head): Make prologue_length a bfd_vma.
8872 (read_abbrevs): Change "offset" param to bfd_vma.
8873 (parse_comp_unit): Change "version" and addr_size to unsigned ints.
8874 Change "abbrev_offset" to bfd_vma.
8875 (read_indirect_string): Use correct conversion chars in error
8876 message format string, cast bfd_vma's to unsigned long.
8877 (read_abbrevs): Likewise.
8878 (read_attribute_value): Likewise.
8879 (decode_line_info): Likewise.
8880 (scan_unit_for_functions): Likewise.
8881 (parse_comp_unit): Likewise.
8882
8883 2002-05-04 Tom Rix <trix@redhat.com>
8884
8885 * coffswap.h (coff_swap_reloc_in): Remove XCOFF support.
8886 (coff_swap_reloc_out): Same.
8887 * coff-rs6000.c: (xcoff_swap_reloc_in): Moved from coffswap.h.
8888 (xcoff_swap_reloc_out): Same.
8889 (xcoff_rtype2howto): Renamed from _bfd_xcoff_rtype2howto. Special
8890 case some 16 bit relocs. Add reloc value to output.
8891 (xcoff_howto_table): Remove 64 bit R_POS, add 16 bit
8892 R_RBR. Improve names.
8893 (_bfd_xcoff_reloc_type_lookup): Adjust for removal of 64 bit R_POS.
8894 (bfd_xcoff_backend_data): Update with new reloc swap names.
8895 (bfd_pmac_xcoff_backend_data) : Same.
8896 * coff64-rs6000.c: (xcoff64_swap_reloc_in): Moved from coffswap.h.
8897 (xcoff64_swap_reloc_out): Same.
8898 (xcoff64_rtype2howto): Special case some 16 bit relocs and 32 bit
8899 R_POS. Add reloc value to output.
8900 (xcoff64_howto_table): Move 64 bit R_POS to first entry. Add 16
8901 bit R_RBR. Improve names, masks.
8902 (xcoff64_reloc_type_lookup): Adjust for move of 64 bit R_POS.
8903 (bfd_xcoff_backend_data): Update with new reloc swap names.
8904 (bfd_xcoff_aix5_backend_data) : Same.
8905
8906 2002-05-04 Alan Modra <amodra@bigpond.net.au>
8907
8908 * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add
8909 bfd_count top_index, input_list, all_local_syms.
8910 (elf32_hppa_setup_section_lists): New function, split from
8911 elf32_hppa_size_stubs.
8912 (elf32_hppa_next_input_section): Likewise.
8913 (group_sections): Likewise.
8914 (get_local_syms): Likewise.
8915 (elf32_hppa_size_stubs): Adjust for split out functions. Look for
8916 stubs on undefined syms too.
8917 (elf32_hppa_set_gp): Use bfd_link_hash* instead of elf_link_hash*.
8918 Only access htab elf fields when we have an elf hash table.
8919 * elf32-hppa.h (elf32_hppa_setup_section_lists): Declare.
8920 (elf32_hppa_next_input_section): Declare.
8921
8922 2002-05-04 Bob Byrnes <byrnes@curl.com>
8923
8924 * opncls.c (_bfd_new_bfd_contained_in): Check return value of
8925 _bfd_new_bfd.
8926
8927 2002-05-03 H.J. Lu (hjl@gnu.org)
8928
8929 * elfxx-mips.c (mips_elf_link_hash_entry): Add forced_local.
8930 (mips_elf_link_hash_newfunc): Initialize forced_local to false.
8931 (mips_elf_record_global_got_symbol): Call _bfd_mips_elf_hide_symbol
8932 to hide a global symbol.
8933 (_bfd_mips_elf_hide_symbol): Return if forced_local is true. Set
8934 forced_local to true.
8935
8936 2002-05-02 Richard Henderson <rth@redhat.com>
8937
8938 * elf64-alpha.c (elf64_alpha_relocate_section): Force relative relocs
8939 vs SHN_UNDEF to zero.
8940
8941 2002-05-02 Alan Modra <amodra@bigpond.net.au>
8942
8943 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_SECTOFF>): Change to a
8944 16 bit reloc.
8945 <R_PPC64_SECTOFF_DS>: Likewise.
8946 (ppc64_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
8947 SECTOFF reloc.
8948 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_SECTOFF>): Correct.
8949 (ppc_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
8950 SECTOFF reloc.
8951
8952 * elf64-ppc.c (ppc64_elf_addr16_ha_reloc): Delete.
8953 (ppc64_elf_ha_reloc): New function.
8954 (ppc64_elf_brtaken_reloc): New function.
8955 (ppc64_elf_sectoff_reloc): New function.
8956 (ppc64_elf_sectoff_ha_reloc): New function.
8957 (ppc64_elf_toc_reloc): New function.
8958 (ppc64_elf_toc_ha_reloc): New function.
8959 (ppc64_elf_toc64_reloc): New function.
8960 (ppc64_elf_unhandled_reloc): New function.
8961 (ppc64_elf_howto_raw): Use the above.
8962 <R_PPC64_RELATIVE>: Mark pc_relative, pcrel_offset.
8963 <R_PPC64_SECTOFF>: Not pc_relative or pcrel_offset. Fix dst_mask.
8964 <R_PPC64_SECTOFF_DS>: Likewise.
8965 (IS_ABSOLUTE_RELOC): Update.
8966 (struct ppc_link_hash_table): Add have_undefweak.
8967 (ppc64_elf_link_hash_table_create): Init.
8968 (func_desc_adjust): Set have_undefweak.
8969 (ppc64_elf_func_desc_adjust): Call func_desc_adjust earlier. Only
8970 add the .sfpr blr when have_undefweak.
8971 (ppc64_elf_setup_section_lists): Check hash table flavour.
8972 (ppc64_elf_next_input_section): Move output_section->owner test to
8973 ppc64elf.em.
8974 (ppc64_elf_set_toc): Rename to ppc64_elf_toc, remove info param
8975 and relocatable test. Return TOCstart and don't set elf_gp.
8976 (ppc64_elf_relocate_section): Correct BRTAKEN/BRNTAKEN branch
8977 offset calculation. Add assert on weak sym branch tweaks.
8978 * elf64-ppc.h (ppc64_elf_set_toc): Delete.
8979 (ppc64_elf_toc): Declare.
8980 (ppc64_elf_next_input_section): Update.
8981
8982 2002-05-01 Alan Modra <amodra@bigpond.net.au>
8983
8984 * syms.c (_bfd_stab_section_find_nearest_line): Don't bomb on NULL
8985 file_name.
8986
8987 2002-05-01 Alan Modra <amodra@bigpond.net.au>
8988
8989 * elf64-ppc.c (CROR_151515, CROR_313131): Define.
8990 (ppc64_elf_relocate_section): Use them. Don't look for plt calls
8991 on R_PPC64_ADDR24 relocs. Require a nop or no link reg on plt
8992 call branches. Correct undefined weak destination.
8993 (ppc64_elf_func_desc_adjust): Always create at least one blr in
8994 .sfpr, and correct case where either only savef* or restf* is
8995 needed.
8996
8997 Long branch stubs, multiple stub sections.
8998 * elf64-ppc.h (ppc64_elf_setup_section_lists): Declare.
8999 (ppc64_elf_next_input_section): Declare.
9000 * elf64-ppc.c: Move linker-only prototypes.
9001 (STUB_SUFFIX): Define.
9002 (enum ppc_stub_type): New.
9003 (struct ppc_stub_hash_entry): New.
9004 (struct ppc_branch_hash_entry): New.
9005 (struct ppc_link_hash_entry): Add stub_cache, oh.
9006 (struct ppc_link_hash_table): Add stub_hash_table etc. Remove
9007 sstub. Add sbrlt, srelbrlt, has_14bit_branch, stub_iteration.
9008 Rename plt_overflow to stub_error.
9009 (ppc_stub_hash_lookup): Define.
9010 (ppc_branch_hash_lookup): Define.
9011 (stub_hash_newfunc): New function.
9012 (branch_hash_newfunc): New function.
9013 (link_hash_newfunc): Init new fields.
9014 (ppc64_elf_link_hash_table_create): Likewise.
9015 (ppc64_elf_link_hash_table_free): New function.
9016 (ppc_stub_name): New function.
9017 (ppc_get_stub_entry): New function.
9018 (ppc_add_stub): New function.
9019 (create_linkage_sections): Use bfd_make_section_anyway. Create
9020 .branch_lt and .rela.branch_lt sections. Don't create .stub.
9021 (ppc64_elf_check_relocs): Set has_14bit_branch on R_PPC64_REL14*,
9022 and set up for plt call stubs. Link func and func desc syms.
9023 (ppc64_elf_gc_sweep_hook): Handle REL14* as per REL24.
9024 (func_desc_adjust): Avoid hash lookup when func desc sym available
9025 via shortcut, and set links when processing.
9026 (ppc64_elf_hide_symbol): Likewise.
9027 (allocate_dynrelocs): Don't allocate stub section here.
9028 (ppc64_elf_size_dynamic_sections): Handle sbrlt and srelbrlt.
9029 Remove sstub code.
9030 (ppc_type_of_stub): New function.
9031 (build_one_stub): Delete.
9032 (ppc_build_one_stub): New function.
9033 (ppc_size_one_stub): New function.
9034 (ppc64_elf_setup_section_lists): New function.
9035 (ppc64_elf_next_input_section): New function.
9036 (group_sections): New function.
9037 (get_local_syms): New function.
9038 (ppc64_elf_size_stubs): Rewrite.
9039 (ppc64_elf_build_stubs): Rewrite.
9040 (ppc64_elf_relocate_section): Look up stub entry for REL24
9041 relocs. Don't propagate REL14* to dynamic objects. Look for long
9042 branch stubs if REL14* or REL24 relocs won't reach.
9043 (bfd_elf64_bfd_link_hash_table_free): Define.
9044
9045 2002-04-30 Mark Mitchell <mark@codesourcery.com>
9046
9047 * config.bfd: Add support for powerpc-*-windiss.
9048
9049 2002-04-30 Tom Rix <trix@redhat.com>
9050
9051 * xcofflink.c (xcoff_link_add_symbols): Always copy undef C_EXT
9052 symbol names into the hash table.
9053
9054 2002-04-28 Tom Rix <trix@redhat.com>
9055
9056 * coff-rs6000.c (xcoff_calculate_relocation) : Function table for
9057 calulating relocations.
9058 (xcoff_complain_overflow) : Function table for relocation errors.
9059 (xcoff_ppc_relocate_section): Use relocation and complain function
9060 tables.
9061 (xcoff_complain_overflow_unsigned_func): New complain function.
9062 (xcoff_complain_overflow_signed_func): Same.
9063 (xcoff_complain_overflow_bitfield_func): Same.
9064 (xcoff_complain_overflow_dont_func): Same.
9065 (xcoff_reloc_type_crel): New recot function.
9066 (xcoff_reloc_type_br): Same.
9067 (xcoff_reloc_type_ba): Same.
9068 (xcoff_reloc_type_toc): Same.
9069 (xcoff_reloc_type_rel): Same.
9070 (xcoff_reloc_type_neg): Same.
9071 (xcoff_reloc_type_pos): Same.
9072 (xcoff_reloc_type_fail): Same.
9073 (xcoff_reloc_type_noop): Same.
9074 * libxcoff.h : Declare common parts for xcoff64.
9075 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Use relocation
9076 and complain function tables.
9077
9078 2002-04-28 Alan Modra <amodra@bigpond.net.au>
9079
9080 * elf64-x86-64.c (struct elf64_x86_64_dyn_relocs): Comment typo.
9081 * elf32-hppa.c (elf32_hppa_final_link): Formatting.
9082
9083 2002-04-26 Alan Modra <amodra@bigpond.net.au>
9084
9085 * opncls.c (bfd_make_readable): Call bfd_section_list_clear.
9086 * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
9087
9088 * elflink.h (elf_bfd_final_link): Ensure input bfd class is the
9089 same as the output before calling elf_link_input_bfd.
9090
9091 * coffcode.h (coff_compute_section_file_positions): Set
9092 section_tail after shuffling section list.
9093
9094 2002-04-24 Christian Groessler <chris@groessler.org>
9095
9096 * coff-z8k.c (extra_case): Fix R_IMM32 relocations: The
9097 addresses are 23bit with a special layout, not plain 32bit
9098 values. Prevent relocation of immediate values.
9099
9100 2002-04-24 Chris G. Demetriou <cgd@broadcom.com>
9101
9102 * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): If MDMX or
9103 MIPS-16 ASE flags are set, print something to indicate that.
9104
9105 2002-04-23 Alan Modra <amodra@bigpond.net.au>
9106
9107 * elf32-hppa.c (hppa_type_of_stub): Correct and simplify condition
9108 under which a plt call stub is used.
9109 (final_link_relocate): Similarly.
9110 (allocate_plt_static): Clear h-plabel except when plt entry is
9111 exclusively used for a plabel.
9112 (allocate_dynrelocs): Use the above to simplify plt sizing.
9113 (struct elf32_hppa_link_hash_table): Add has_22bit_branch.
9114 (elf32_hppa_link_hash_table_create): Init.
9115 (BL22_RP): Define.
9116 (hppa_build_one_stub): Use BL22_RP if has_22bit_branch.
9117 (elf32_hppa_check_relocs): Set has_22bit_branch.
9118
9119 * elf32-hppa.c (elf32_hppa_check_relocs): Remove debug message.
9120 (final_link_relocate): Likewise.
9121
9122 2002-04-22 Jakub Jelinek <jakub@redhat.com>
9123
9124 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't build
9125 search table if some FDE is DW_EH_PE_aligned encoded either.
9126 (_bfd_elf_write_section_eh_frame): Handle terminating FDE specially.
9127
9128 2002-04-22 Richard Smith <richard@ex-parrot.com>
9129 Jakub Jelinek <jakub@redhat.com>
9130
9131 * elf-eh-frame.c (struct eh_cie_fde): Add per_encoding_relative.
9132 (_bfd_elf_discard_section_eh_frame): Set it for CIEs with pcrel
9133 encoded personality.
9134 (_bfd_elf_write_section_eh_frame): Adjust pcrel encoded personality
9135 for CIE/FDE removal.
9136
9137 2002-04-20 Tom Rix <trix@redhat.com>
9138
9139 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Fix C_FILE auxent.
9140
9141 2002-04-20 Alan Modra <amodra@bigpond.net.au>
9142
9143 * archures.c (bfd_lookup_arch): Move the list order comment..
9144 (struct bfd_arch_info): ..to where it belongs.
9145 * bfd-in2.h: Regenerate.
9146
9147 * archures.c (bfd_lookup_arch): Add comment on list order.
9148 (bfd_default_set_arch_mach): Use bfd_lookup_arch.
9149 * cpu-powerpc.c (bfd_powerpc_archs): Re-order so that the default
9150 is always at head of list.
9151
9152 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
9153
9154 * coff-arm.c (coff_thumb_pcrel_12, coff_thumb_pcrel_9,
9155 insert_thumb_branch, record_thumb_to_arm_glue): Suppress
9156 definition of these functions for ARM_WINCE builds as they are
9157 not used.
9158 (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET): Do not define
9159 for ARM_WINCE builds.
9160
9161 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
9162
9163 * coff-arm.c (bfd_arm_process_before_allocation):
9164
9165 2002-04-17 J"orn Rennecke <joern.rennecke@superh.com>
9166
9167 * cpu-sh.c (scan_mach): Delete.
9168 (arch_info_struct): Replace scan_mach with bfd_default_scan.
9169 (bfd_sh_arch): Likewise.
9170
9171 2002-04-16 Nick Clifton <nickc@cambridge.redhat.com>
9172
9173 * ihex.c (ihex_write_object_contents): Fix check for records
9174 crossing 64K boundaries.
9175
9176 2002-04-16 Alan Modra <amodra@bigpond.net.au>
9177
9178 * elf32-m32r.c (m32r_elf_add_symbol_hook): Check the hash table
9179 type rather than just assuming entries are ELF.
9180 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
9181 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
9182 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Likewise.
9183 * elf64-mmix.c (mmix_elf_add_symbol_hook): Use bfd_link_hash_entry
9184 rather than elf_link_hash_entry.
9185
9186 2002-04-15 Richard Henderson <rth@redhat.com>
9187
9188 * elf32-mips.c (mips_elf32_object_p): Revert 0404 fragment: allow
9189 n32 binaries.
9190
9191 2002-04-15 Michael Snyder <msnyder@redhat.com>
9192
9193 * opncls.c (bfd_close): Write contents if writeable.
9194 Minor formatting tidy-ups.
9195
9196 2002-04-15 Alan Modra <amodra@bigpond.net.au>
9197
9198 * elf32-ppc.c (ppc_elf_add_symbol_hook): Check the hash table type.
9199
9200 2002-04-12 Michael Snyder <msnyder@redhat.com>
9201
9202 * bfd-in.h (bfd_get_section_lma): New access macro.
9203 Minor white-space fix-up.
9204
9205 2002-04-12 Alan Modra <amodra@bigpond.net.au>
9206
9207 * elf.c (prep_headers): Don't zero EI_OSABI, EI_ABIVERSION or
9208 header pad.
9209
9210 2002-04-09 DJ Delorie <dj@redhat.com>
9211
9212 * elfarm-nabi.c (elf32_arm_howto_table): Fix ABS16 masks.
9213
9214 2002-04-09 Casper S. Hornstrup <chorns@users.sourceforge.net>
9215
9216 * coffcode.h (coff_read_word): New.
9217 (coff_compute_checksum): New.
9218 (coff_apply_checksum): New.
9219 (coff_write_object_contents): Call coff_apply_checksum () to
9220 apply checksum to PE image.
9221
9222 2002-04-08 Randolph Chung <tausq@debian.org>
9223
9224 * elf32-hppa.c (hppa_unwind_entry_compare): Move to elf-hppa.h.
9225 (elf32_hppa_final_link): Split out sorting logic to..
9226 * elf-hppa.h (elf_hppa_sort_unwind): ..here.
9227 (elf_hppa_final_link): Call elf_hppa_sort_unwind.
9228
9229 2002-04-07 Andrew Cagney <ac131313@redhat.com>
9230
9231 * configure.in: Add missing ``|'' to powerpc-*-aix4.[4-9]*
9232 pattern.
9233 * configure: Re-generate.
9234
9235 2002-04-07 Andrew Cagney <ac131313@redhat.com>
9236
9237 * configure.in: Only define AIX_CORE_DUMPX_CORE when AIX version
9238 is greater or equal to 4.3.3.
9239 * configure: Regenerate.
9240 Fix PR gdb/344.
9241
9242 2002-04-05 Hans-Peter Nilsson <hp@axis.com>
9243
9244 * elf32-cris.c (cris_elf_howto_table) <R_CRIS_16_PCREL,
9245 R_CRIS_32_PCREL>: Fix typo in name.
9246 (cris_elf_check_relocs): Always create .rela.got here when
9247 R_CRIS_16_GOTPLT or R_CRIS_32_GOTPLT is seen.
9248 (elf_cris_adjust_gotplt_to_got): Don't create .rela.got here;
9249 assume it's created.
9250
9251 2002-04-04 Daniel Jacobowitz <drow@mvista.com>
9252
9253 * aout-adobe.c (aout_32_bfd_link_hash_table_free): Define.
9254 * aout-target.h (MY_bfd_link_hash_table_free): Conditionally
9255 define.
9256 * aout-tic30.c (MY_bfd_link_hash_table_free): Likewise.
9257 * bfd.c (bfd_link_hash_table_free): Define.
9258 * binary.c (binary_bfd_link_hash_table_free): Define.
9259 * bout.c (b_out_bfd_link_hash_table_free): Define.
9260 * coff-rs6000.c (rs6000coff_vec): Include
9261 _bfd_generic_link_hash_table_free.
9262 (pmac_xcoff_vec): Likewise.
9263 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
9264 (aix5coff64_vec): Likewise.
9265 * coffcode.h (coff_bfd_link_hash_table_free): Conditionally define.
9266 * elf-m10300.c (elf32_mn10300_link_hash_table_free): New function.
9267 (bfd_elf32_bfd_link_hash_table_free): Define.
9268 * elf32-hppa.c (elf32_hppa_link_hash_table_free): New function.
9269 (bfd_elf32_bfd_link_hash_table_free): Define.
9270 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Conditionally
9271 define.
9272 * i386msdos.c (msdos_bfd_link_hash_table_free): Define.
9273 * i386os9k.c (os9k_bfd_link_hash_table_free): Define.
9274 * ieee.c (ieee_bfd_link_hash_table_free): Define.
9275 * ihex.c (ihex_bfd_link_hash_table_free): Define.
9276 * libbfd-in.h (_bfd_nolink_bfd_link_hash_table_free): Define.
9277 (_bfd_generic_link_hash_table_free): Add prototype.
9278 * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Add prototype.
9279 * libecoff.h (_bfd_ecoff_bfd_link_hash_table_free): Define.
9280 * linker.c (_bfd_generic_link_hash_table_free): New function.
9281 * mmo.c (mmo_bfd_link_hash_table_free): Define.
9282 * nlm-target.h (nlm_bfd_link_hash_table_free): Define.
9283 * oasys.c (oasys_bfd_link_hash_table_free): Define.
9284 * ppcboot.c (ppcboot_bfd_link_hash_table_free): Define.
9285 * som.c (som_bfd_link_hash_table_free): Define.
9286 * srec.c (srec_bfd_link_hash_table_free): Define.
9287 * tekhex.c (tekhex_bfd_link_hash_table_free): Define.
9288 * versados.c (versados_bfd_link_hash_table_free): Define.
9289 * vms.c (vms_bfd_link_hash_table_free): New function.
9290 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_free): New function.
9291
9292 * coff-arm.c (coff_arm_link_hash_table_create): Use bfd_malloc
9293 instead of bfd_alloc.
9294 * coff-h8300.c (h8300_coff_link_hash_table_create): Likewise.
9295 * coff-mcore.c (coff_mcore_link_hash_table_create): Likewise.
9296 * coff-ppc.c (ppc_coff_link_hash_table_create): Likewise.
9297 * cofflink.c (_bfd_coff_link_hash_table_create): Likewise.
9298 * ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
9299 * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise.
9300 * elf.c (_bfd_elf_link_hash_table_create): Likewise.
9301 * elf32-arm.h (elf32_arm_link_hash_table_create): Likewise.
9302 * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
9303 * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise.
9304 * elf32-i386.c (elf_i386_link_hash_table_create): Likewise.
9305 * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
9306 * elf32-s390.c (elf_s390_link_hash_table_create): Likewise.
9307 * elf32-sh.c (sh_elf_link_hash_table_create): Likewise.
9308 * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create): Likewise.
9309 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
9310 * elf64-s390.c (elf_s390_link_hash_table_create): Likewise.
9311 * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise.
9312 * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create): Likewise.
9313 * elf64-x86-64.c (elf64_x86_64_link_hash_table_create): Likewise.
9314 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
9315 * linker.c (_bfd_generic_link_hash_table_create): Likewise.
9316 * m68klinux.c (linux_link_hash_table_create): Likewise.
9317 * sparclinux.c (linux_link_hash_table_create): Likewise.
9318 * sunos.c (sunos_link_hash_table_create): Likewise.
9319 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise.
9320
9321 * targets.c: Add _bfd_link_hash_table_free to xvec.
9322
9323 * bfd-in2.h: Regenerate.
9324 * libbfd.h: Regenerate.
9325 * libcoff.h: Regenerate.
9326
9327 2002-04-04 Alan Modra <amodra@bigpond.net.au>
9328
9329 * dep-in.sed: Cope with absolute paths.
9330 * Makefile.am (dep.sed): Subst TOPDIR, and not INCDIR.
9331 Run "make dep-am".
9332 * Makefile.in: Regenerate.
9333 * coff-arm.c: Fix copyright date.
9334 * cpu-h8300.c: Likewise.
9335 * cpu-i370.c: Likewise.
9336 * cpu-s390.c: Likewise.
9337 * cpu-mips.c: Likewise.
9338 * po/SRC-POTFILES.in: Regenerate.
9339
9340 2002-04-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
9341
9342 * Makefile.am: Add elfxx-mips.c to the known backends.
9343 (elf32-mips.lo): remove dependency to coff/external.h.
9344 * Makefile.in: Regenerate.
9345 * configure.in: Add elfxx-mips.lo to all vectors using elf32-mips.lo
9346 Remove elf32-mips.lo from 64 bit vectors. Update dependencies
9347 accordingly.
9348 * configure: Regenerate.
9349 * elf-bfd.h: Move all MIPS ELF specific prototypes to elfxx-mips.h.
9350 (irix_compat_t): IRIX compatibility level, moved from elf32-mips.c.
9351 (elf_backend_mips_irix_compat, elf_backend_mips_rtype_to_howto): New
9352 MIPS specific backend functions.
9353 * elf32-mips.c: Moved most code to elfxx-mips.c.
9354 (mips_elf_hi16_reloc): Rename from _bfd_mips_elf_hi16_reloc and make
9355 static.
9356 (mips_elf_lo16_reloc): Likewise, was _bfd_mips_elf_lo16_reloc.
9357 (mips_elf_got16_reloc): Likewise, was _bfd_mips_elf_got16_reloc.
9358 (mips_elf_gprel32_reloc): Likewise, was _bfd_mips_elf_gprel32_reloc.
9359 (mips_elf32_rtype_to_howto): Rename from mips_rtype_to_howto. Changed
9360 interface to allow selection of the right REL or RELA howto table.
9361 (mips_elf32_object_p): Rename from _bfd_mips_elf_object_p and made
9362 static. Let it refuse n32 objects.
9363 (elf32_mips_grok_prstatus): Rename from _bfd_elf32_mips_grok_prstatus.
9364 (elf32_mips_grok_psinfo): Rename from _bfd_elf32_mips_grok_psinfo.
9365 (elf32_mips_discard_info): Rename from _bfd_elf32_mips_discard_info.
9366 (elf32_mips_ignore_discarded_relocs): Rename from
9367 _bfd_elf32_mips_ignore_discarded_relocs.
9368 (elf32_mips_write_section): Rename from _bfd_elf32_mips_write_section.
9369 (elf32_mips_irix_compat): New function, replaces IRIX_COMPAT.
9370 (elf_mips_howto_table_rela): Remove.
9371 * elf64-mips.c: Moved most code to elfxx-mips.c.
9372 (bfd_elf64_bfd_reloc_type_lookup): Make static.
9373 (mips_elf64_rtype_to_howto): New function.
9374 (mips_elf64_object_p): Likewise.
9375 (elf64_mips_irix_compat): Likewise.
9376 * elfxx-mips.c: New file containing common code merged together from
9377 elf32-mips.c and elf64-mips.c.
9378 * elfxx-mips.h: New file containing MIPS specific prototypes from
9379 elf-bfd.h.
9380 * elfxx-target.h: Add handling for elf_backend_mips_irix_compat and
9381 elf_backend_mips_rtype_to_howto.
9382
9383 2002-04-04 Alan Modra <amodra@bigpond.net.au>
9384
9385 * srec.c (MAXCHUNK, Chunk): Revise comments.
9386 (srec_write_record): Correct buffer size.
9387 (srec_write_header): Do without intermediate buffer.
9388 (srec_write_section): Validate Chunk.
9389 (srec_write_terminator): Pass NULL instead of dummy buffer.
9390 (srec_write_symbols): Pass file and symbol names directly to
9391 bfd_bwrite so sprintf won't overflow buffer.
9392
9393 2002-04-03 Jakub Jelinek <jakub@redhat.com>
9394
9395 * elf32-sparc.c (elf32_sparc_relocate_section): Don't emit dynamic
9396 PC relative relocs against hidden symbols.
9397 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
9398
9399 2002-04-03 Alan Modra <amodra@bigpond.net.au>
9400
9401 * elf.c (_bfd_elf_make_section_from_shdr): When setting section
9402 LMAs, loop over segments until p_vaddr and p_memsz specify an
9403 extent enclosing the section.
9404
9405 2002-04-02 Nick Clifton <nickc@cambridge.redhat.com>
9406
9407 * ihex.c (ihex_write_object_contents): Do not allow records to
9408 cross a 64K boundary - wrap if necessary.
9409
9410 2002-04-01 Nathan Williams <nathanw@wasabisystems.com>
9411
9412 * elf.c (elfcore_netbsd_get_lwpid): Fix off-by-one error
9413 which caused the returned LWP ID to always be 0.
9414
9415 2002-04-01 Richard Henderson <rth@redhat.com>
9416
9417 * elf32-sparc.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
9418 (elf32_sparc_relocate_section): Use it to figure out when to
9419 initialize .got entries.
9420 * elf64-sparc.c: Similarly.
9421
9422 2002-03-28 Alan Modra <amodra@bigpond.net.au>
9423
9424 * linker.c (link_action): Ignore duplicate warning syms.
9425 (_bfd_generic_link_write_global_symbol): Follow warning symbol link.
9426 * elflink.h (elf_adjust_dynstr_offsets): Likewise.
9427 (elf_adjust_dynamic_symbol): Likewise.
9428 (elf_export_symbol): Likewise.
9429 (elf_link_find_version_dependencies): Likewise.
9430 (elf_link_assign_sym_version): Likewise.
9431 (elf_link_sec_merge_syms): Likewise.
9432 (elf_link_output_extsym): Likewise.
9433 (elf_gc_sweep_symbol): Likewise.
9434 (elf_gc_propagate_vtable_entries_used): Likewise.
9435 (elf_gc_smash_unused_vtentry_relocs): Likewise.
9436 (elf_gc_allocate_got_offsets): Likewise.
9437 (elf_collect_hash_codes): Likewise.
9438 * elflink.c (elf_link_renumber_hash_table_dynsyms): Likewise.
9439 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
9440 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
9441 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
9442 * elf32-arm.h (elf32_arm_discard_copies): Likewise.
9443 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Likewise.
9444 (elf_cris_discard_excess_dso_dynamics): Likewise.
9445 * elf32-hppa.c (clobber_millicode_symbols): Likewise.
9446 (mark_PIC_calls): Likewise.
9447 (allocate_plt_static): Likewise.
9448 (allocate_dynrelocs): Likewise.
9449 (readonly_dynrelocs): Likewise.
9450 * elf32-i386.c (allocate_dynrelocs): Likewise.
9451 (readonly_dynrelocs): Likewise.
9452 * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
9453 * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
9454 * elf32-mips.c (mips_elf_output_extsym): Likewise.
9455 (mips_elf_sort_hash_table_f): Likewise.
9456 (mips_elf_check_mips16_stubs): Likewise.
9457 * elf32-s390.c (allocate_dynrelocs): Likewise.
9458 (readonly_dynrelocs): Likewise.
9459 * elf32-sh.c (sh_elf_discard_copies): Likewise.
9460 * elf32-xstormy16.c (xstormy16_relax_plt_check): Likewise.
9461 (xstormy16_relax_plt_realloc): Likewise.
9462 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
9463 (elf64_alpha_output_extsym): Likewise.
9464 * elf64-hppa.c (elf64_hppa_mark_exported_functions): Likewise.
9465 * elf64-mips.c (mips_elf64_sort_hash_table_f): Likewise.
9466 (mips_elf64_check_mips16_stubs): Likewise.
9467 (mips_elf64_output_extsym): Likewise.
9468 * elf64-ppc.c (func_desc_adjust): Likewise.
9469 (allocate_dynrelocs): Likewise.
9470 (readonly_dynrelocs): Likewise.
9471 * elf64-s390.c (allocate_dynrelocs): Likewise.
9472 (readonly_dynrelocs): Likewise.
9473 * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
9474 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
9475 (readonly_dynrelocs): Likewise.
9476 * elfxx-ia64.c (elfNN_ia64_global_dyn_sym_thunk): Likewise.
9477 * aoutx.h (aout_link_write_other_symbol): Likewise.
9478 * cofflink.c (_bfd_coff_write_task_globals): Likewise.
9479 (_bfd_coff_write_global_sym): Likewise.
9480 * i386linux.c (linux_tally_symbols): Likewise.
9481 * m68klinux.c (linux_tally_symbols): Likewise.
9482 * sparclinux.c (linux_tally_symbols): Likewise.
9483 * pdp11.c (aout_link_write_other_symbol): Likewise.
9484 * sunos.c (sunos_scan_dynamic_symbol): Likewise.
9485 * xcofflink.c (xcoff_build_ldsyms): Likewise.
9486 (xcoff_write_global_symbol): Likewise.
9487
9488 * cofflink.c (_bfd_coff_final_link): Formatting.
9489 * cpu-mips.c (mips_compatible): Make static, prototype.
9490 * elf32-i386.c (elf_i386_check_relocs): Formatting.
9491 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
9492 * elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
9493 * elf64-mips.c (mips_elf64_sort_hash_table): Likewise.
9494 (mips_elf64_final_link): Likewise.
9495 * elflink.h (elf_link_find_version_dependencies): Remove duplicate
9496 prototype.
9497
9498 2002-03-27 Nick Clifton <nickc@cambridge.redhat.com>
9499
9500 * coff-arm.c (SWAP_IN_RELOC_OFFSET): Define.
9501 (SWAP_OUT_RELOC_OFFSET): Define.
9502
9503 2002-03-27 Gregory Steuck <greg@nest.cx>
9504
9505 * elf.c (_bfd_elf_get_symtab_upper_bound): Leave space for
9506 terminating NULL if empty symbol table.
9507 (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise.
9508
9509 2002-03-26 H.J. Lu (hjl@gnu.org)
9510
9511 * elflink.h (elf_link_input_bfd): Revert the last change since
9512 the gcc exception handling isn't fixed yet.
9513
9514 2002-03-26 H.J. Lu (hjl@gnu.org)
9515
9516 * elflink.h (elf_link_input_bfd): Complain about relocations
9517 against local symbols in discarded sections.
9518
9519 2002-03-26 Alan Modra <amodra@bigpond.net.au>
9520
9521 * elflink.h (elf_gc_mark): Don't recurse into non-ELF sections.
9522
9523 2002-03-23 Alan Modra <amodra@bigpond.net.au>
9524
9525 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
9526 section file offset for !SEC_LOAD sections.
9527
9528 2002-03-21 Richard Earnshaw <rearnsha@arm.com>
9529
9530 * elf32-arm.h (elf32_arm_final_link_relocate <case R_ARM_GOTOFF>,
9531 <case R_ARM_GOT>): Handle relocations to Thumb functions.
9532
9533 2002-03-21 Alan Modra <amodra@bigpond.net.au>
9534
9535 * coff64-rs6000.c (_bfd_xcoff64_put_symbol_name): Prototype.
9536 Whitespace changes.
9537 * archive.c: Update copyright date.
9538 * bfd-in2.h: Regenerate.
9539 * libbfd.h: Regenerate.
9540 * Makefile.am: Run "make dep-am"
9541 * Makefile.in: Regenerate.
9542 * po/SRC-POTFILES.in: Regenerate.
9543
9544 2002-03-20 Daniel Jacobowitz <drow@mvista.com>
9545
9546 * dwarf2.c (struct funcinfo): Move up.
9547 (lookup_address_in_function_table): New argument function_ptr.
9548 Set it.
9549 (lookup_address_in_line_table): New argument function. If function
9550 is non-NULL, use it to handle ``addr'' before the first line note of
9551 the function.
9552 (comp_unit_find_nearest_line): Update and swap calls to
9553 lookup_address_in_function_table and lookup_address_in_line_table.
9554 * syms.c (_bfd_stab_section_find_nearest_line): Use the first
9555 N_SLINE encountered if we see an N_FUN before any N_SLINE.
9556
9557 2002-03-20 Tom Rix <trix@redhat.com>
9558
9559 * coff-rs6000.c (_bfd_xcoff_stat_arch_elt): Renamed from
9560 _bfd_xcoff_generic_stat_arch_elt. Fix format check.
9561 * coff64-rs6000.c : Use _bfd_xcoff_stat_arch_elt.
9562
9563 2002-03-19 Tom Rix <trix@redhat.com>
9564
9565 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through all
9566 dynamic objects in archives.
9567
9568 2002-03-19 Hans-Peter Nilsson <hp@bitrange.com>
9569
9570 * elflink.h (NAME(bfd_elf,record_link_assignment)): Don't set
9571 STT_NOTYPE symbols to STT_OBJECT.
9572
9573 2002-03-18 Jan Hubicka <jh@suse.cz>
9574
9575 * cpu-i386.c (bfd_x86_64_arch): Rename to "i386:x86-64"
9576
9577 2002-03-18 Tom Rix <trix@redhat.com>
9578
9579 * aix5ppc.core.c : New file for AIX 5 64 bit core support.
9580 * bfd-in.h : Add bfd_xcoff_ar_archive_set_magic declaration.
9581 * coff-rs6000 (do_pad) : New function for archive padding.
9582 (do_copy) : New function for object file copying in archives.
9583 (do_shared_object_padding) : New function for padding shared
9584 objects to their text section alignment in archives.
9585 (bfd_xcoff_ar_achive_set_magic) : Stub.
9586 (xcoff_write_armap_big) : Use do_copy and do_pad.
9587 (xcoff_write_archive_contents_big) : Use do_shared_object_padding,
9588 do_copy and do_pad.
9589 * coff64-rs6000.c (xcoff64_write_ojbect_contents) : Use
9590 bfd_xcoff_magic_number.
9591 (xcoff64_bad_format_hook) : New function for _bfd_bad_format_hook
9592 fop.
9593 (xcoff_backend_data_r) : Use xcoff64_bad_format_hook.
9594 (bfd_xcoff_aix5_backend_data) : New Aix 5 backend data.
9595 (aix5coff64_vec) : New Aix 5 target aix5coff64-rs6000.
9596 * rs6000-core.c : Update copyright date.
9597 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Check for NULL
9598 csectpp.
9599 * coffcode.h (coff_new_section_hook) : Use new accessor macros.
9600 (coff_set_arch_mach_hook) : Add Aix 5 U64_TOCMAGIC magic #.
9601 (coff_set_flags) : Use bfd_xcoff_magic_number.
9602 * libxcoff.h (bfd_xcoff_is_xcoff64): Add U64_TOCMAGIC.
9603 * configure.in : Add powerpc-*-aix5 and rs6000-*-aix5 support.
9604 * Makefile.am : Same.
9605 * config.bfd : Same.
9606 * targets.c : Same.
9607 * configure : Regnerate.
9608 * Makefile.in : Same.
9609 * bfd-in2.h : Same.
9610
9611 2002-03-18 Nick Clifton <nickc@cambridge.redhat.com>
9612
9613 * po/fr.po: Updated version.
9614
9615 2002-03-18 Alan Modra <amodra@bigpond.net.au>
9616
9617 * libbfd.c (bfd_write_bigendian_4byte_int): Return true iff success.
9618 * libbfd.h: Regenerate.
9619 * archive.c (coff_write_armap): Pass on failures from
9620 bfd_write_bigendian_4byte_int.
9621
9622 2002-03-14 H.J. Lu <hjl@gnu.org>
9623
9624 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the BFD
9625 error to bfd_error_nonrepresentable_section for reinit_array
9626 section in DSO.
9627
9628 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
9629
9630 * coffcode.h (coff_slurp_symbol_table): When adding BSF_WEAK flag,
9631 OR it in rather than replacing previously selected flags.
9632
9633 * elfxx-target.h (TARGET_BIG_SYM): Set ar_max_namelen to 15.
9634 (TARGET_LITTLE_SYM): Set ar_max_namelen to 15.
9635
9636 2002-03-14 Alan Modra <amodra@bigpond.net.au>
9637
9638 * cpu-mips.c (mips_compatible): New. Don't check bits_per_word.
9639 (N): Use the above.
9640 * elflink.h (elf_bfd_final_link): Revert last change. Instead,
9641 ensure reloc size matches before calling elf_link_input_bfd.
9642 Add an assert to check reloc size when counting output relocs.
9643
9644 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
9645
9646 * mmo.c (mmo_get_loc): Return NULL rather than false.
9647
9648 2002-03-13 Nick Clifton <nickc@cambridge.redhat.com>
9649
9650 * po/fr.po: Updated version.
9651
9652 2002-03-13 Alan Modra <amodra@bigpond.net.au>
9653
9654 * archures.c (bfd_default_compatible): Test bits_per_word.
9655 * cpu-i386.c (i386_compatible): Remove. Replace occurrences with
9656 bfd_default_compatible.
9657 * cpu-i370.c (i370_compatible): Likewise.
9658 * cpu-sparc.c (sparc_compatible): Likewise.
9659 * cpu-h8300.c (compatible): Test in->arch == out->arch.
9660
9661 * elflink.h: Formatting fixes.
9662 (elf_link_output_extsym): Merge undefined and undef weak cases.
9663
9664 * elflink.h (elf_bfd_final_link): Only call elf_link_input_bfd
9665 when word size of input matches output word size.
9666
9667 2002-03-12 Andreas Jaeger <aj@suse.de>
9668
9669 * cpu-i386.c (i386_compatible): New. Use it instead of
9670 bfd_default_compatible.
9671
9672 2002-03-07 H.J. Lu (hjl@gnu.org)
9673
9674 * coff-sh.c (shcoff_reloc_map): Use bfd_reloc_code_real_type
9675 as the type for bfd_reloc_val.
9676
9677 2002-03-05 John David Anglin <dave@hiauly1.hia.nrc.ca>
9678
9679 * elf-hppa.h (elf_hppa_is_dynamic_loader_symbol): New function.
9680 (elf_hppa_relocate_section): Ignore undefined dynamic loader symbols.
9681 (elf_hppa_final_link_relocate): Correct relocations for indirect
9682 references to local data through the DLT. Fix .opd creation for
9683 local symbols using R_PARISC_LTOFF_FPTR32 and R_PARISC_FPTR64
9684 relocations. Use e_lsel selector for R_PARISC_DLTIND21L,
9685 R_PARISC_LTOFF_FPTR21L and R_PARISC_LTOFF_TP21L as per
9686 "Processor-Specific ELF for PA_RISC, Version 1.43" document.
9687 Similarly, use e_rsel for DLT and LTOFF 'R' relocations.
9688 * elf32-hppa.c (final_link_relocate): Revise relocation selectors
9689 as per "Processor-Specific ELF for PA_RISC, Version 1.43" document.
9690
9691 2002-03-05 Jakub Jelinek <jakub@redhat.com>
9692
9693 * merge.c (_bfd_merge_sections): Don't segfault if there
9694 is nothing to merge due to GC.
9695
9696 2002-03-05 Alan Modra <amodra@bigpond.net.au>
9697
9698 * elf32-hppa.c (clobber_millicode_symbols): Remove hack to keep
9699 symbols that have been forced local.
9700
9701 * elflink.h (elf_bfd_final_link): Call elf_link_output_extsym
9702 to output forced local syms for non-shared link.
9703 (elf_link_output_extsym): Tweak condition for calling backend
9704 adjust_dynamic_symbol so that previous behaviour is kept.
9705 Whitespace changes throughout file.
9706
9707 2002-03-04 H.J. Lu <hjl@gnu.org>
9708
9709 * elf.c (bfd_section_from_shdr): Handle special sections,
9710 .init_array, .fini_array and .preinit_array.
9711 (elf_fake_sections): Likewise.
9712
9713 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Create the
9714 DT entry only if the section is in output for .init_array,
9715 .fini_array and .preinit_array. Complain about .preinit_array
9716 section in DSO.
9717 (elf_bfd_final_link): Warn zero size for .init_array,
9718 .fini_array and .preinit_array sections.
9719
9720 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Remove
9721 SHT_INIT_ARRAY, SHT_FINI_ARRAY and SHT_PREINIT_ARRAY.
9722 (elfNN_ia64_fake_sections): Remove .init_array, .fini_array and
9723 .preinit_array.
9724
9725 2002-03-04 Alan Modra <amodra@bigpond.net.au>
9726
9727 * configure.in (WIN32LIBADD): Don't eval PICFLAG assignment.
9728 * configure: Regenerate.
9729
9730 2002-03-02 Tom Rix <trix@redhat.com>
9731
9732 * coff64-rs6000.c (xcoff64_howto_table): Replace howto types with
9733 symbolic equiv.
9734 * coff-rs6000.c (xcoff_howto_table): Same.
9735
9736 2002-03-01 David Mosberger <davidm@hpl.hp.com>
9737
9738 * elflink.h (size_dynamic_sections): If section named
9739 ".preinit_array" exists, create DT_PREINIT_ARRAY and
9740 DT_PREINIT_ARRAYSZ entries in dynamic table. Analogously for
9741 ".init_array" and ".fini_array".
9742 (elf_bfd_final_link): Handle DT_PREINIT_ARRAYSZ, DT_INIT_ARRAYSZ,
9743 DT_FINI_ARRAYSZ, DT_PREINIT_ARRAY, DT_INIT_ARRAY, and
9744 DT_FINI_ARRAY.
9745
9746 2002-02-26 Andrew Macleod <amacleod@cygnus.com>
9747
9748 * elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local
9749 dynsyms.
9750
9751 2002-02-25 Alan Modra <amodra@bigpond.net.au>
9752
9753 * elf64-hppa.h: Update copyright date.
9754
9755 * elf64-ppc.c (ppc64_elf_check_relocs): Warning fix.
9756 (ppc64_elf_relocate_section): Don't generate power4 style branch
9757 hints for *_BRTAKEN and *_BRNTAKEN relocs.
9758
9759 2002-02-22 Jakub Jelinek <jakub@redhat.com>
9760
9761 * elf64-sh64.c (sh_elf64_relocate_section): Fix a typo from my
9762 last patch.
9763 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
9764
9765 2002-02-21 Andreas Jaeger <aj@suse.de>
9766
9767 * elf64-x86-64.c: Major rework that introduces all recent changes
9768 to the x86-64 backend. Get a closer match to elf32-i386.
9769 (struct elf64_x86_64_dyn_relocs): Rename from
9770 elf64_x86_64_pcrel_relocs_copied, add additional fields. Change
9771 all users.
9772 (struct elf64_x86_64_link_hash_table): Add short cuts to some
9773 sections.
9774 (link_hash_newfunc): Rename from elf64_x86_64_link_hash_newfunc,
9775 remove casts, initialize new hash members.
9776 (create_got_section): New.
9777 (elf64_x86_64_create_dynamic_sections): New.
9778 (elf64_x86_64_copy_indirect_symbol): New.
9779 (elf64_x86_64_check_relocs): Don't allocate space for dynamic
9780 relocs, .got or .relgot here but do it in allocate_dynrelocs.
9781 Reference count possible .plt and .got entries. Don't test input
9782 section SEC_READONLY here to try to avoid copy relocs, and keep
9783 dyn_relocs regardless of ELF_LINK_NON_GOT_REF. Don't set
9784 DF_TEXTREL here. Delay setting of variables until needed. Cache
9785 pointer to "sreloc" section in elf_section_data. Tweak condition
9786 under which .got created. Report files with bad relocation
9787 section names.
9788 (elf64_x86_64_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
9789 Reference count possible .plt entries. Don't deallocate .got and
9790 .relgot space here.
9791 (elf64_x86_64_adjust_dynamic_symbol): Handle nocopyreloc. Don't
9792 do copy reloc processing for weakdefs. Remove redundant casts and
9793 aborts. Delay setting of vars until needed. Move creation of
9794 dynamic symbols and allocation of .plt and .rela.plt to
9795 allocate_dynrelocs. Replace BFD_ASSERT with abort.
9796 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
9797 (allocate_dynrelocs): New.
9798 (readonly_dynrelocs): New.
9799 (elf64_x86_64_size_dynamic_sections): Call readonly_dynrelocs.
9800 Allocate space for dyn relocs. Replace BFD_ASSERT with abort.
9801 Zero out the dynamic allocated content space.
9802 (elf64_x86_64_discard_copies): Removed.
9803 (elf64_x86_64_relocate_section): Make use of dynamic section
9804 short-cuts. Localise vars, and delay setting. Better error
9805 reporting, replace BFD_ASSERT with abort. Check
9806 ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined in the
9807 regular object file and tread the weak definition as the normal
9808 one. Don't discard relocs for undefweak or undefined symbols and
9809 check !DEF_REGULAR as well as DEF_DYNAMIC in test for avoided copy
9810 relocs.
9811 (elf64_x86_64_finish_dynamic_symbol): Don't copy relocs for
9812 symbols that have been forced local. Use same test to decide if
9813 we can use a relative reloc for got as relocate_section. Expand
9814 SHN_UNDEF comment. Move expressions out of function calls.
9815 Replace BFD_ASSERT with abort.
9816 (bfd_elf64_bfd_final_link): Removed.
9817 (elf_backend_copy_indirect_symbol): Define.
9818
9819 2002-02-20 Tom Rix <trix@redhat.com>
9820
9821 * coff-rs6000.c (xcoff_howto_table): Add 16 bit R_BA.
9822 (_bfd_xcoff_reloc_type_lookup): Use it.
9823 * coff64-rs6000.c (xcoff64_howto_table): Same.
9824 (xcoff64_reloc_type_lookup): Same.
9825
9826 2002-02-20 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
9827
9828 * osf-core.c (osf_core_vec): OSF/1 (Digital Unix) core files are
9829 little endian.
9830
9831 2002-02-19 Martin Schwidefsky <schwidefsky@de.ibm.com>
9832
9833 * archures.c (bfd_mach_s390_esa): Rename to bfd_mach_s390_31.
9834 (bfd_mach_s390_esame): Rename to bfd_mach_s390_64.
9835 * bfd-in2.h: Regenerate.
9836 * cpu-s390.c (arch_info_struct): Use renamed architecture defines.
9837 Replace architecture name "s390" with "s390:31-bit" and "s390:esame"
9838 with "s390:64-bit".
9839 * elf32-s390.c (elf_howto_table): Add 32 bit pc relative relocations.
9840 (elf_s390_reloc_type_lookup): Likewise.
9841 (elf_s390_check_relocs): Likewise.
9842 (elf_s390_gc_sweep_hook): Likewise.
9843 (elf_s390_relocate_section): Likewise.
9844 (elf_s390_object_p): Use renamed architecture define.
9845 * elf64-s390.c (elf_s390_object_p): Use renamed architecture define.
9846
9847 2002-02-19 Frank Ch. Eigler <fche@redhat.com>
9848
9849 * syms.c (stt[]): Sorted. Added .init/.fini -> "t" mapping.
9850
9851 2002-02-19 Jakub Jelinek <jakub@redhat.com>
9852
9853 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Enable
9854 absptr -> pcrel optimization for shared libs.
9855 Only create minimal .eh_frame_hdr if absptr FDE encoding in shared
9856 library cannot be converted to pcrel.
9857 (_bfd_elf_eh_frame_section_offset): Return -2 if making absptr
9858 relative.
9859 * elf32-i386.c (elf_i386_relocate_section): If
9860 _bfd_elf_section_offset returned -2, skip, but make sure the
9861 relocation is installed.
9862 * elf32-arm.h (elf32_arm_final_link_relocate): Likewise.
9863 * elf32-cris.c (cris_elf_relocate_section): Likewise.
9864 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
9865 * elf32-i370.c (i370_elf_relocate_section): Likewise.
9866 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
9867 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
9868 * elf32-s390.c (elf_s390_relocate_section): Likewise.
9869 * elf32-sh.c (sh_elf_relocate_section): Likewise.
9870 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
9871 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
9872 * elf64-s390.c (elf_s390_relocate_section): Likewise.
9873 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
9874 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
9875 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
9876 * elf64-alpha.c (elf64_alpha_relocate_section): Handle
9877 _bfd_elf_section_offset returning -2 the same way as -1.
9878 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
9879 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add FIXME
9880 and BFD_ASSERT.
9881 * elf64-mips.c (mips_elf64_create_dynamic_relocation): Likewise.
9882
9883 2002-02-18 Tom Rix <trix@redhat.com>
9884
9885 * xcofflink.c (bfd_xcoff_link_gernate_rtinit): Add -brtl support.
9886 (bfd_xcoff_size_dynamic_sections): Same.
9887 * bfd-in.h (bfd_xcoff_link_generate_rtinit): Same.
9888 (bfd_xcoff_size_dynamic_sections): Same.
9889 * coff-rs6000.c (xcoff_generate_rtinit): Same.
9890 * coff-rs646000.c (xcoff64_generate_rtinit): Same.
9891 * libxcoff.h (struct xcoff_backend_data_rec): Same.
9892 * xcofflink.c (xcoff_build_ldsyms, xcoff_link_add_symbols): Clean.
9893 * bfd-in2.h: Regenerate.
9894
9895 2002-02-18 Alan Modra <amodra@bigpond.net.au>
9896
9897 * elf64-ppc.c (STFD_FR0_0R1, LFD_FR0_0R1, BLR): Define.
9898 (struct ppc_link_hash_table): Add sfpr.
9899 (ppc64_elf_link_hash_table_create): Init it.
9900 (ppc64_elf_create_dynamic_sections): Split creation of .stub and
9901 .glink out to..
9902 (create_linkage_sections): ..here. Make .sfpr too.
9903 (ppc64_elf_check_relocs): Call create_linkage_sections, and set
9904 dynobj early.
9905 (MIN_SAVE_FPR, MAX_SAVE_FPR): Define.
9906 (ppc64_elf_func_desc_adjust): Look for missing ._savef* and
9907 ._restf* functions, and create as needed.
9908 (func_desc_adjust): Only force_local for shared libs.
9909
9910 2002-02-18 David O'Brien <obrien@FreeBSD.org>
9911
9912 * configure.in: Bump version number post 2.12 branching.
9913 * configure: Regenerate.
9914
9915 2002-02-17 Hans-Peter Nilsson <hp@bitrange.com>
9916
9917 * mmo.c: Correct and improve comments.
9918 (mmo_write_chunk): Store trailing byte in bfd buffer; don't
9919 zero-pad. Use input to fill up non-empty bfd buffer.
9920 (mmo_flush_chunk): New function.
9921 (mmo_write_loc_chunk): Add parameter last_vmap, all callers
9922 changed. Don't emit location specifier if VMA is same as
9923 *LAST_VMAP after omitting leading zero contents. Call
9924 mmo_flush_chunk before emitting location specifier.
9925 (mmo_write_loc_chunk_list): Call mmo_flush_chunk when finished
9926 with mmo_write_loc_chunk calls.
9927 (mmo_internal_write_section): Call mmo_flush_chunk after
9928 mmo_write_chunk.
9929 (mmo_write_symbols_and_terminator): Move :Main to first position
9930 in symbol array. Add faked one if it does not exist if there are
9931 other symbols. Don't add it if there are no symbols at all. Move
9932 out test for value of :Main from symbol loop. Rename table
9933 fakemain to maintable and variable mainsym to fakemain.
9934
9935 2002-02-15 Richard Henderson <rth@redhat.com>
9936
9937 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: A target
9938 section with no got matches any got. Simplify error generaion.
9939
9940 2002-02-15 Alan Modra <amodra@bigpond.net.au>
9941
9942 Support arbitrary length fill patterns.
9943 * linker.c (bfd_new_link_order): Zero all fields with bfd_zalloc.
9944 (_bfd_default_link_order): Remove bfd_fill_link_order code.
9945 Call default_data_link_order.
9946 (default_fill_link_order): Delete.
9947 (default_data_link_order): New function.
9948 * elf32-mips.c (_bfd_mips_elf_final_link): Replace occurrences
9949 of bfd_fill_link_order with bfd_data_link_order.
9950 * elf64-alpha.c (elf64_alpha_final_link): Likewise.
9951 * elf64-mips.c (mips_elf64_final_link): Likewise.
9952
9953 * bfd.c (bfd_scan_vma): Clamp overflows to max bfd_vma value.
9954 Correct value returned in "end" for "0x<non-hex>".
9955
9956 2002-02-14 Nick Clifton <nickc@cambridge.redhat.com>
9957
9958 * cpu-arm.c (processors): Replace 'arch' field with 'mach'.
9959 (scan): Test against 'mach' field in info structure.
9960
9961 2002-02-14 Alan Modra <amodra@bigpond.net.au>
9962
9963 * elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD.
9964
9965 2002-02-14 Matt Fredette <fredette@netbsd.org>
9966
9967 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize
9968 EF_M68000.
9969
9970 2002-02-13 Nick Clifton <nickc@cambridge.redhat.com>
9971
9972 * elf.c (_bfd_elf_make_section_from_shdr): Do not insist on
9973 non-zero physical addresses when adjusting the LMAs of new
9974 sections.
9975
9976 2002-02-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
9977
9978 * elf-hppa.h (elf_hppa_reloc_final_type): New function stripped
9979 from _bfd_elf_hppa_gen_reloc_type.
9980 (_bfd_elf_hppa_gen_reloc_type): Remove duplicate prototype.
9981 * elf32-hppa.h (elf32_hppa_reloc_final_type): Add protptype.
9982 * elf32-hppa.c: Include elf32-hppa.h before elf-hppa.h.
9983 * elf64-hppa.h (elf64_hppa_reloc_final_type): Add protptype.
9984
9985 2002-02-12 Alexandre Oliva <aoliva@redhat.com>
9986
9987 * elf-m10300.c (mn10300_elf_relax_section): Skip section before
9988 loading its contents if there's nothing to do in it.
9989
9990 2002-02-12 Alan Modra <amodra@bigpond.net.au>
9991
9992 * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for crossing
9993 64k boundary.
9994
9995 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Add dynamic
9996 DT_PPC64_OPD and DT_PPC64_OPDSZ tags.
9997 (ppc64_elf_finish_dynamic_sections): Set values for them.
9998
9999 2002-02-11 Michael Snyder <msnyder@redhat.com>
10000
10001 * elf-bfd.h (elfcore_write_lwpstatus): Add prototype.
10002 * elf.c (elfcore_grok_pstatus): Add prototype.
10003 (elfcore_grok_lwpstatus): Add prototype.
10004 (elfcore_write_lwpstatus): New function.
10005 (elfcore_write_pstatus): Fix typo, eliminate unnecessary memcpy.
10006
10007 2002-02-11 Alexandre Oliva <aoliva@redhat.com>
10008
10009 * elf32-sh.c: Added missing prototypes.
10010 * elf32-sh64.c: Likewise.
10011 (sh_elf_align_loads): Mark unused args as such.
10012 * elf64-sh64.c: Added missing prototypes.
10013 (struct elf_sh64_link_hash_entry): Fix typo.
10014 (sh_elf64_relocate_section): Fix info argument passed to
10015 _bfd_elf_section_offset.
10016
10017 2002-02-11 Alan Modra <amodra@bigpond.net.au>
10018
10019 * Makefile.am: "make dep-am".
10020 * Makefile.in: Regenerate.
10021 * aclocal.m4: Regenerate.
10022 * config.in: Regenerate.
10023 * configure: Regenerate.
10024
10025 2002-02-10 Daniel Jacobowitz <drow@mvista.com>
10026
10027 * coff-rs6000.c (xcoff_generate_rtinit): Silence uninitialized
10028 variable warnings.
10029 * elf32-sh.c (sh_elf_relax_section): Silence signed/unsigned
10030 comparison warning.
10031 * trad-core.c (trad_unix_core_file_p): Silence pointer/integer
10032 cast warnings for the common case.
10033
10034 2002-02-10 Hans-Peter Nilsson <hp@bitrange.com>
10035
10036 * config.bfd (sh-*-linux*, sh-*-elf* | sh-*-rtemself*): Add sh64
10037 vectors.
10038 (sh-*-netbsdelf*): New, to trump sh*-*-netbsdelf* and add sh64
10039 vectors.
10040
10041 2002-02-09 Richard Henderson <rth@redhat.com>
10042
10043 * elf64-alpha.c (elf64_alpha_howto): Add R_ALPHA_BRSGP.
10044 (elf64_alpha_reloc_map, elf64_alpha_check_relocs): Likewise.
10045 (elf64_alpha_relocate_section): Likewise.
10046 * reloc.c (BFD_RELOC_ALPHA_BRSGP): New.
10047 * bfd-in2.h, libbfd.h: Rebuild.
10048
10049 2002-02-09 Hans-Peter Nilsson <hp@bitrange.com>
10050
10051 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs): Check
10052 that base-plus-offset reloc accounting is consistent.
10053 (mmix_elf_relax_section): Keep base-plus-offset reloc accounting
10054 up to date for undefined symbols.
10055
10056 2002-02-08 Eric Christopher <echristo@redhat.com>
10057
10058 From Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
10059
10060 * elf32-mips.c (_bfd_mips_elf_fake_sections): Don't create .rela
10061 sections for the O32 ABI.
10062
10063 2002-02-08 Chris Demetriou <cgd@broadcom.com>
10064
10065 * elf32-arm.h: Fix formatting of _("...").
10066 * elf32-d10v.c: Likewise.
10067 * elf32-m68k.c: Likewise.
10068 * elf32-mips.c: Likewise.
10069
10070 2002-02-08 Ivan Guzvinec <ivang@opencores.org>
10071
10072 * coff-or32.c: Fix compile time warning messages.
10073
10074 2002-02-08 Alexandre Oliva <aoliva@redhat.com>
10075
10076 Contribute sh64-elf.
10077 2002-01-23 Alexandre Oliva <aoliva@redhat.com>
10078 * reloc.c (R_SH_GOTPLT32, R_SH_GOT_LOW16, R_SH_GOT_MEDLOW16,
10079 R_SH_GOT_MEDHI16, R_SH_GOT_HI16, R_SH_GOTPLT_LOW16,
10080 R_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_HI16,
10081 R_SH_PLT_LOW16, R_SH_PLT_MEDLOW16, R_SH_PLT_MEDHI16,
10082 R_SH_PLT_HI16, R_SH_GOTOFF_LOW16, R_SH_GOTOFF_MEDLOW16,
10083 R_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_HI16, R_SH_GOTPC_LOW16,
10084 R_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDHI16, R_SH_GOTPC_HI16,
10085 R_SH_GOT10BY4, R_SH_GOTPLT10BY4, R_SH_GOT10BY8, R_SH_GOTPLT10BY8,
10086 R_SH_COPY64, R_SH_GLOB_DAT64, R_SH_JMP_SLOT64, R_SH_RELATIVE64):
10087 New relocs.
10088 * libbfd.h, bfd-in2.h: Rebuilt.
10089 * elf32-sh.c (sh_elf_howto_table): Define new relocs.
10090 (sh_reloc_map): Map them.
10091 (PLT_ENTRY_SIZE, elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
10092 elf_sh_plt_entry_be, elf_sh_plt_entry_le, elf_sh_pic_plt_entry_be,
10093 elf_sh_pic_plt_entry_le, elf_sh_plt0_entry, elf_sh_plt_entry,
10094 elf_sh_pic_plt_entry, elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
10095 elf_sh_plt0_gotplt_offset, elf_sh_plt_temp_offset,
10096 elf_sh_plt_symbol_offset, elf_sh_plt_reloc_offset,
10097 movi_shori_putval) [INCLUDE_SHMEDIA]: New.
10098 (elf_sh_link_hash_entry) [INCLUDE_SHMEDIA]: Add
10099 datalabel_got_offset.
10100 (sh_elf_link_hash_newfunc): Initialize it.
10101 (sh_elf_relocate_section): Augment the scope of
10102 seen_stt_datalabel. Introduce GOTPLT support. Extend GOTPC, PLT,
10103 GOT and GOTOFF handling to new SHmedia relocation types. Support
10104 GOT_BIAS.
10105 (sh_elf_check_relocs): Likewise.
10106 (sh_elf_finish_dynamic_symbol) [TARGET_SHMEDIA]: Set up values in
10107 PLT entries using movi_shori_putval. Support GOT_BIAS.
10108 (sh_elf_finish_dynamic_sections): Likewise.
10109 * elf32-sh64.c (shmedia_prepare_reloc): Do not add addend to
10110 relocation, it's now done by the caller.
10111 (GOT_BIAS): New.
10112 * elf64-sh64.c (GOT_BIAS, PLT_ENTRY_SIZE, elf_sh64_sizeof_plt,
10113 elf_sh64_plt_plt0_offset, elf_sh64_plt0_gotplt_offset,
10114 elf_sh64_plt_temp_offset, elf_sh64_plt_symbol_offset,
10115 elf_sh64_plt_reloc_offset, ELF_DYNAMIC_INTERPRETER,
10116 elf_sh64_pcrel_relocs_copied, elf_sh64_link_hash_entry,
10117 elf_sh64_link_hash_table, sh64_elf64_link_hash_traverse,
10118 sh64_elf64_hash_table): New.
10119 (sh_elf64_howto_table): Introduce new relocs.
10120 (sh_elf64_info_to_howto): Accept new PIC relocs.
10121 (sh_elf64_relocate_section): Augment the scope of
10122 seen_stt_datalabel. Support new PIC relocs.
10123 (sh_elf64_check_relocs): Support new PIC relocs.
10124 (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le,
10125 elf_sh64_plt_entry_be, elf_sh64_plt_entry_le,
10126 elf_sh64_pic_plt_entry_be, elf_sh64_pic_plt_entry_le,
10127 elf_sh64_plt0_entry, elf_sh64_plt_entry, elf_sh64_pic_plt_entry,
10128 sh64_elf64_link_hash_newfunc, sh64_elf64_link_hash_table_create,
10129 movi_shori_putval, movi_3shori_putval,
10130 sh64_elf64_create_dynamic_sections,
10131 sh64_elf64_adjust_dynamic_symbol, sh64_elf64_discard_copies,
10132 sh64_elf64_size_dynamic_sections,
10133 sh64_elf64_finish_dynamic_symbol,
10134 sh64_elf64_finish_dynamic_sections): New.
10135 (elf_backend_create_dynamic-sections,
10136 bfd_elf64_bfd_link_hash_table_create,
10137 elf_backend_adjust_dynamic_symbol,
10138 elf_backend_size_dynamic_sections,
10139 elf_backend_finish_dynamic_symbol,
10140 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
10141 elf_backend_plt_readonly, elf_backend_want_plt_sym,
10142 elf_backend_got_header_size, elf_backend_plt_header_size):
10143 Define.
10144 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
10145 * elf32-sh.c: Renumbered and renamed some SH5 relocations to
10146 match official numbers and names; moved unmaching ones to the
10147 range 0xf2-0xff.
10148 * elf32-sh64.c, elf64-sh64.c: Likewise.
10149 2001-03-12 DJ Delorie <dj@redhat.com>
10150 * elf32-sh.c (sh_elf_relax_section): Don't relax SHmedia
10151 sections.
10152 2001-03-12 DJ Delorie <dj@redhat.com>
10153 * elf32-sh64.c (shmedia_prepare_reloc): Validate relocs that must
10154 be aligned.
10155 * elf64-sh64.c (sh_elf64_relocate_section): Ditto.
10156 2001-01-14 Hans-Peter Nilsson <hpn@cygnus.com>
10157 * elf32-sh64.c (bfd_elf32_bfd_copy_private_section_data): Define.
10158 (sh64_elf_fake_sections): Set type to SHT_SH5_CR_SORTED for a
10159 .cranges section with SEC_SORT_ENTRIES set.
10160 (sh64_backend_section_from_shdr): Set SEC_SORT_ENTRIES on an
10161 incoming sorted .cranges section.
10162 (sh64_bfd_elf_copy_private_section_data): New.
10163 (sh64_elf_final_write_processing): Only sort .cranges and modify
10164 start address if called by linker.
10165 2001-01-08 Ben Elliston <bje@redhat.com>
10166 * elf32-sh64.c (sh64_elf_final_write_processing): Activate
10167 Hans-Peter Nilsson's set bit 0 patch from 2001-01-06.
10168 * elf64-sh64.c (sh64_elf64_final_write_processing): Ditto.
10169 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
10170 * elf64-sh64.c (sh_elf64_howto_table): No open brace at start of
10171 line. Add comments before all entries.
10172 <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct and clarify describing
10173 comment.
10174 (sh_elf64_reloc): Correct head comment.
10175 (sh_elf64_relocate_section): Correct spacing.
10176 <relocating for a local symbol>: Do not honour STO_SH5_ISA32;
10177 instead call reloc_dangerous callback.
10178 <case R_SH_SHMEDIA_CODE>: New case.
10179 (sh_elf64_gc_mark_hook): Correct spacing.
10180 (sh_elf64_check_relocs): Ditto.
10181 * elf32-sh64.c (shmedia_prepare_reloc) <case R_SH_SHMEDIA_CODE>:
10182 New case.
10183 * elf32-sh.c: Correct #endif comments for #ifndef-wrapped
10184 functions.
10185 (sh_elf_howto_table) <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct,
10186 clarify describing comment. Add comments before all entries.
10187 (sh_elf_relocate_section) <relocating for a local symbol>: Do not
10188 honour STO_SH5_ISA32; instead call reloc_dangerous callback.
10189 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
10190 Sort .cranges section in final link. Prepare to set bit 0 on
10191 entry address.
10192 * elf32-sh64.c (struct sh64_find_section_vma_data): New.
10193 (sh64_elf_link_output_symbol_hook): Fix typo in prototype.
10194 (sh64_elf_set_mach_from_flags): Set SEC_DEBUGGING on incoming
10195 .cranges section.
10196 (sh64_backend_section_from_shdr): New, to recognize
10197 SHT_SH5_CR_SORTED on incoming .cranges section.
10198 (elf_backend_section_from_shdr): Define.
10199 (sh64_elf_final_write_processing): Sort outgoing .cranges
10200 section. (New, temporarily disabled:) Set bit 0 on entry address
10201 according to ISA type.
10202 (sh64_find_section_for_address): New.
10203 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb,
10204 crange_bsearch_cmpl): Move here from opcodes/sh64-dis.c.
10205 (sh64_address_in_cranges): Move here from opcodes/sh64-dis.c. Use
10206 bfd_malloc, not xmalloc.
10207 (sh64_get_contents_type): Move here from opcodes/sh64-dis.c. Make
10208 global.
10209 * elf32-sh64.c (sh64_elf64_final_write_processing): New, (but
10210 temporarily disabled) setting bit 0 on entry address.
10211 (elf_backend_final_write_processing): Define.
10212 2001-01-05 Hans-Peter Nilsson <hpn@cygnus.com>
10213 * elf32-sh.c (sh_elf_howto_table) <R_SH_PT_16>: Adjust fields to
10214 be a proper relocation for PTA and PTB rather than a marker.
10215 <R_SH_IMMU5, R_SH_IMMS6, R_SH_IMMU6, R_SH_IMMS10, R_SH_IMMS10BY2,
10216 R_SH_IMMS10BY4, R_SH_IMMS10BY8, R_SH_IMMS16, R_SH_IMMU16,
10217 R_SH_IMM_LOW16, R_SH_IMM_LOW16_PCREL, R_SH_IMM_MEDLOW16,
10218 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16_PCREL,
10219 R_SH_IMM_HI16, R_SH_IMM_HI16_PCREL, R_SH_64, R_SH_64_PCREL>:
10220 Zero src_mask.
10221 * elf64-sh64.c: Ditto.
10222 (sh_elf64_relocate_section) <case R_SH_PT_16>: New case.
10223 * elf32-sh64.c: Include opcodes/sh64-opc.h
10224 (shmedia_prepare_reloc): Take a bfd_link_info pointer as first
10225 argument. Drop const qualifiers from "bfd *" and "bfd_byte *"
10226 parameters. No unused parameters. Caller changed.
10227 <case R_SH_PT_16>: New case.
10228 * Makefile.am (elf32-sh64.lo): Add dependency on sh64-opc.h.
10229 * Makefile.in: Regenerate.
10230 2000-12-30 Hans-Peter Nilsson <hpn@cygnus.com>
10231 * elf64-sh64.c (sh64_elf64_fake_sections): Set SHF_SH5_ISA32 for
10232 all code sections.
10233 (sh_elf64_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
10234 (sh64_elf_merge_private_data): Ditto.
10235 * elf32-sh64.c (sh64_elf_fake_sections): Use sh64_elf_section_data
10236 to access stored section flags.
10237 (sh64_elf_final_write_processing): Return immediately unless
10238 called by linker. Use sh64_elf_section_data (cranges) to get size
10239 of linker-generated cranges entries.
10240 (sh64_elf_copy_private_data): Add missing "return true".
10241 (sh64_elf_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
10242 (sh_elf64_merge_private_data): Ditto.
10243 2000-12-19 Hans-Peter Nilsson <hpn@cygnus.com>
10244 * elf64-sh64.c (sh64_elf64_fake_sections): New, copy of
10245 elf64-sh64.c:sh64_elf_fake_sections.
10246 (elf_backend_fake_sections): Define as sh64_elf64_fake_sections.
10247 2000-12-18 Hans-Peter Nilsson <hpn@cygnus.com>
10248 * elf32-sh64.c (sh64_elf_copy_private_data_internal): Delete.
10249 (sh64_elf_final_write_processing): New.
10250 (elf_backend_final_write_processing): Define.
10251 (sh64_elf_fake_sections): Get header flags from tdata field.
10252 (sh64_elf_copy_private_data): Do not call
10253 sh64_elf_copy_private_data_internal, just copy e_flags field.
10254 (sh64_elf_merge_private_data): Do not call
10255 sh64_elf_copy_private_data_internal.
10256 2000-12-12 Hans-Peter Nilsson <hpn@cygnus.com>
10257 Remove EF_SH64_ABI64, let ELF size make difference.
10258 Remove SH64-specific BFD section flag.
10259 * elf32-sh64.c (sh64_elf_fake_sections): Recognize section as
10260 containing SHmedia through elf_section_data (asect)->tdata
10261 non-zero, not using a BFD section flag.
10262 (sh64_elf_set_mach_from_flags): Don't recognize EF_SH64_ABI64.
10263 (sh64_elf_merge_private_data): Similar.
10264 (elf_backend_section_flags): Don't define.
10265 (sh64_elf_backend_section_flags): Delete.
10266 * elf64-sh64.c (sh_elf64_set_mach_from_flags): Recognize EF_SH64,
10267 not EF_SH64_ABI64.
10268 (sh_elf64_merge_private_data): Similar.
10269 * section.c (Section flags definitions): Don't define
10270 SEC_SH_ISA_SHMEDIA.
10271 (bfd-in2.h): Regenerate.
10272 2000-12-09 Hans-Peter Nilsson <hpn@cygnus.com>
10273 Make DataLabel references work with partial linking.
10274 * elf32-sh64.c: Fix formatting.
10275 (sh64_elf_link_output_symbol_hook): New.
10276 (elf_backend_link_output_symbol_hook): Define to
10277 sh64_elf_link_output_symbol_hook.
10278 (sh64_elf_add_symbol_hook): Make DataLabel symbol just global
10279 undefined if partial linking. Adjust sanity check.
10280 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): New.
10281 (elf_backend_link_output_symbol_hook): Define to
10282 sh64_elf64_link_output_symbol_hook.
10283 (sh64_elf64_add_symbol_hook): Make DataLabel symbol just global
10284 undefined if partial linking. Adjust sanity check.
10285 2000-12-07 Hans-Peter Nilsson <hpn@cygnus.com>
10286 Implement semantics for inter-file DataLabel references.
10287 * elf64-sh64.c (DATALABEL_SUFFIX): Define.
10288 (sh64_elf64_add_symbol_hook): New.
10289 (sh_elf64_relocate_section): If passing an indirect symbol with
10290 st_type STT_DATALABEL on the way to a symbol with st_other
10291 STO_SH5_ISA32, do not bitor 1 to the relocation.
10292 (elf_backend_add_symbol_hook): Define to
10293 sh64_elf64_add_symbol_hook.
10294 * elf64-sh32.c: Tweak comments.
10295 (DATALABEL_SUFFIX): Define.
10296 (sh64_elf_add_symbol_hook): New.
10297 (elf_backend_add_symbol_hook): Define to sh64_elf_add_symbol_hook.
10298 * elf32-sh.c (sh_elf_relocate_section): If passing an indirect
10299 symbol with st_type STT_DATALABEL on the way to a symbol with
10300 st_other STO_SH5_ISA32, do not bitor 1 to the relocation.
10301 2000-12-05 Hans-Peter Nilsson <hpn@cygnus.com>
10302 Pass through STT_DATALABEL.
10303 * elf32-sh64.c (sh64_elf_get_symbol_type): New.
10304 (elf_backend_get_symbol_type): Define.
10305 * elf64-sh64.c (sh64_elf64_get_symbol_type): New.
10306 (elf_backend_get_symbol_type): Define.
10307 2000-11-30 Hans-Peter Nilsson <hpn@cygnus.com>
10308 * elf32-sh64.c: Tweak comments.
10309 (sh64_elf_copy_private_data_internal): Add prototype.
10310 (bfd_elf32_bfd_set_private_flags): Define.
10311 (sh64_elf_copy_private_data_internal): Compare machine name, not
10312 textual BFD target name, to check whether to copy section flag
10313 SHF_SH5_ISA32.
10314 (sh64_elf_merge_private_data): Validize bfd_get_arch_size.
10315 Tweak section-contents-type-mismatch message.
10316 (shmedia_prepare_reloc): Add ATTRIBUTE_UNUSED markers.
10317 Validize reloc-types.
10318 * elf64-sh64.c: New file.
10319 * targets.c (bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec): Declare.
10320 * Makefile.am (BFD64_BACKENDS): Add elf64-sh64.lo.
10321 (BFD64_BACKENDS_CFILES): Add elf64-sh64.c.
10322 Regenerate dependencies.
10323 * Makefile.in: Regenerate.
10324 * config.bfd (sh64-*-elf*): Add bfd_elf64_sh64_vec and
10325 bfd_elf64_sh64l_vec.
10326 * configure.in: Handle bfd_elf64_sh64_vec and
10327 bfd_elf64_sh64l_vec.
10328 * configure: Regenerate.
10329 * po/POTFILES.in: Regenerate.
10330 * po/bfd.pot: Regenerate.
10331 2000-11-29 Hans-Peter Nilsson <hpn@cygnus.com>
10332 * elf32-sh64.c (sh64_elf_set_mach_from_flags): Do not recognize
10333 anything else but EF_SH64 and EF_SH64_ABI64.
10334 (sh64_elf_merge_private_data): Emit error for anything else but
10335 EF_SH64 and EF_SH64_ABI64.
10336 * config.bfd: Remove bfd_elf32_shblin_vec and bfd_elf32_shlin_vec
10337 from targ_selvecs.
10338 * configure.in: Add cofflink.lo to bfd_elf32_sh64_vec and
10339 bfd_elf32_sh64l_vec as a temporary measure.
10340 * configure: Regenerate.
10341 2000-11-27 Hans-Peter Nilsson <hpn@cygnus.com>
10342 * cpu-sh.c (arch_info_struct): Include sh5 item
10343 unconditionalized.
10344 * config.bfd (sh64-*-elf*): Do not set targ_cflags.
10345 Add targ_selvecs bfd_elf32_sh_vec, bfd_elf32_shl_vec,
10346 bfd_elf32_shblin_vec and bfd_elf32_shlin_vec.
10347 * elf32-sh64.c: Tweak comments.
10348 (sh64_elf_set_mach_from_flags): Recognize all machine flags that
10349 are proper subsets of SH64 as bfd_mach_sh5. Add EF_SH64_ABI64.
10350 (sh64_elf_copy_private_data_internal): Wrap long line.
10351 (sh64_elf_merge_private_data): Rewrite to allow objects from
10352 SH64 subsets to be linked together.
10353 (INCLUDE_SHMEDIA): Define.
10354 * elf32-sh.c (sh_elf_relocate_section) <local symbol>:
10355 Parenthesize plus-expression inside or-expression.
10356 <global symbol>: Ditto.
10357 (sh_elf_set_mach_from_flags): Remove code refusing
10358 deleted EF_SH64_32BIT_ABI flag.
10359 2000-11-26 Hans-Peter Nilsson <hpn@cygnus.com>
10360 * elf32-sh.c (sh_elf_howto_table) <R_SH_IMM_LOW16_PCREL,
10361 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16_PCREL,
10362 R_SH_IMM_HI16_PCREL, R_SH_64_PCREL>: Set pcrel_offset to true.
10363 (sh_elf_relocate_section) <local symbol>: Or 1 in
10364 calculation of relocation if sym->st_other & STO_SH5_ISA32.
10365 <global symbol>: Ditto if h->other & STO_SH5_ISA32.
10366 * elf32-sh64.c (shmedia_prepare_reloc): Add rel->r_addend to
10367 relocation.
10368 2000-11-24 Hans-Peter Nilsson <hpn@cygnus.com>
10369 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64.lo.
10370 (BFD32_BACKENDS_CFILES): Add elf32-sh64.c.
10371 Regenerate dependencies.
10372 * Makefile.in: Regenerate.
10373 * archures.c: Add bfd_mach_sh5.
10374 * config.bfd: Map targ_cpu sh* to bfd_sh_arch.
10375 Handle sh64-*-elf*. Set targ_cflags to -DINCLUDE_SHMEDIA.
10376 * configure.in: Handle bfd_elf32_sh64_vec and bfd_elf32_sh64l_vec.
10377 * configure: Regenerate.
10378 * reloc.c (BFD_RELOC_SH_SHMEDIA_CODE, BFD_RELOC_SH_IMMU5,
10379 BFD_RELOC_SH_IMMS6, BFD_RELOC_SH_IMMS6BY32, BFD_RELOC_SH_IMMU6,
10380 BFD_RELOC_SH_IMMS10, BFD_RELOC_SH_IMMS10BY2,
10381 BFD_RELOC_SH_IMMS10BY4, BFD_RELOC_SH_IMMS10BY8,
10382 BFD_RELOC_SH_IMMS16, BFD_RELOC_SH_IMMU16, BFD_RELOC_SH_IMM_LOW16,
10383 BFD_RELOC_SH_IMM_LOW16_PCREL, BFD_RELOC_SH_IMM_MEDLOW16,
10384 BFD_RELOC_SH_IMM_MEDLOW16_PCREL, BFD_RELOC_SH_IMM_MEDHI16,
10385 BFD_RELOC_SH_IMM_MEDHI16_PCREL, BFD_RELOC_SH_IMM_HI16,
10386 BFD_RELOC_SH_IMM_HI16_PCREL, BFD_RELOC_SH_PT_16): New relocations.
10387 * cpu-sh.c [INCLUDE_SHMEDIA] (arch_info_struct): Define and link
10388 in item for SH5.
10389 * elf32-sh.c [INCLUDE_SHMEDIA] (sh_elf_howto_table): Add howto items
10390 for SHmedia relocs.
10391 [INCLUDE_SHMEDIA] (sh_rel): Add mappings for SHmedia relocs.
10392 [INCLUDE_SHMEDIA] (sh_elf_relocate_section) [default]: Call
10393 shmedia_prepare_reloc, goto final_link_relocate if it returns
10394 non-zero, else fail as before.
10395 (sh_elf_set_mach_from_flags): Provide function only if not defined
10396 as macro. Do not recognize objects with EF_SH64_32BIT_ABI set.
10397 (sh_elf_set_private_flags): Provide function only if not defined
10398 as a macro.
10399 (sh_elf_copy_private_data): Similar.
10400 (sh_elf_merge_private_data): Similar.
10401 * section.c (SEC_SH_ISA_SHMEDIA): New.
10402 * targets.c (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec): Declare.
10403 * elf32-sh64.c: New file.
10404 * libbfd.h: Regenerate.
10405 * bfd-in2.h: Regenerate.
10406 * po/POTFILES.in: Regenerate.
10407 * po/bfd.pot: Regenerate.
10408 * bfd-in2.h: Regenerate.
10409 * libbfd.h: Regenerate.
10410
10411 2002-02-07 Daniel Jacobowitz <drow@mvista.com>
10412
10413 * bfd-in.h: Update <stdbool.h> check to only see if <stdbool.h> has
10414 been included, not drag it in.
10415 * bfd-in2.h: Regenerate.
10416
10417 2002-02-06 H.J. Lu (hjl@gnu.org)
10418
10419 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Update
10420 the mach and ISA fields if necessary.
10421
10422 2002-02-06 Nick Clifton <nickc@cambridge.redhat.com>
10423
10424 * coffcode.h (coff_set_arch_mach_hook): Select the highest known
10425 ARM architecture when an F_ARM_5 flag is detected, since we cannot
10426 be sure exactly which architecture this represents.
10427
10428 2002-02-05 Nick Clifton <nickc@redhat.com>
10429
10430 * po/tr.po: Updated translation.
10431
10432 2002-02-05 Alan Modra <amodra@bigpond.net.au>
10433
10434 From Jimi X <jimix@watson.ibm.com>
10435 * archures (bfd_mach_ppc64): Define.
10436 (bfd_powerpc_arch): Rename to bfd_powerpc_archs.
10437 (bfd_powerpc_arch): Define.
10438 * bfd-in2.h: Regenerate.
10439 * cpu-powerpc.c (arch_info_struct): Rename to bfd_powerpc_archs.
10440 (bfd_powerpc_arch): Move to tail of bfd_powerpc_archs.
10441 (bfd_powerpc_archs): Add default powerpc64 arch.
10442
10443 2002-02-05 Alan Modra <amodra@bigpond.net.au>
10444
10445 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Check for relocs
10446 against section syms in readonly sections. Don't do the global
10447 sym check if we find one.
10448 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
10449 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
10450 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
10451 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
10452 (elf_s390_grok_prstatus): Add missing prototype.
10453
10454 2002-02-04 Hans-Peter Nilsson <hp@bitrange.com>
10455
10456 * elf64-mmix.c (mmix_dump_bpo_gregs): New function.
10457 (mmix_elf_check_common_relocs) <case R_MMIX_BASE_PLUS_OFFSET>:
10458 Call bfd_get_section_by_name only once. Initialize
10459 bpodata->n_bpo_relocs_this_section.
10460 (_bfd_mmix_prepare_linker_allocated_gregs): Remove comment
10461 referring to DSOs.
10462 (bpo_reloc_request_sort_fn): Don't use difference of values as
10463 return-value.
10464
10465 2002-02-02 David O'Brien <obrien@FreeBSD>
10466
10467 * configure.in: Tweak the FreeBSD 4.x recognition more. Only treat
10468 version 4.5 and later the same as 5-CURRENT.
10469 * configure: Re-generate.
10470
10471 2002-02-02 Jason Thorpe <thorpej@wasabisystems.com>
10472
10473 * config.bfd (hppa*-*-netbsd*): New target.
10474
10475 2002-01-31 Philipp Thomas <pthomas@suse.de>
10476
10477 * coff-arm.c (coff_arm_merge_private_bfd_data): Move ERROR
10478 to front of message. Unify messages with elf32-arm.h. Use
10479 commas where neccessary.
10480 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Use all upcase
10481 ERROR in messages. Unify messages with coff-arm.c. Correct
10482 VFP/FPA error message.
10483 (elf32_arm_print_private_bfd_data): Don't mark APCS-26 and
10484 APCS-32 for translation.
10485
10486 2002-02-01 Hans-Peter Nilsson <hp@bitrange.com>
10487
10488 Perform on-demand global register allocation from
10489 R_MMIX_BASE_PLUS_OFFSET relocs.
10490 * elf64-mmix.c (struct bpo_reloc_section_info, struct
10491 bpo_reloc_request, struct bpo_greg_section_info): New.
10492 (mmix_elf_check_common_relocs, mmix_elf_gc_sweep_hook,
10493 bpo_reloc_request_sort_fn, mmix_elf_relax_section,
10494 _bfd_mmix_check_all_relocs,
10495 _bfd_mmix_prepare_linker_allocated_gregs,
10496 _bfd_mmix_finalize_linker_allocated_gregs): New functions.
10497 (elf_mmix_howto_table): Correct src_mask for most relocs.
10498 (mmix_elf_perform_relocation) <case R_MMIX_BASE_PLUS_OFFSET>: New
10499 case.
10500 (mmix_final_link_relocate) <case R_MMIX_BASE_PLUS_OFFSET>: New
10501 case. Fix typo in comment. New label do_mmix_reloc.
10502 (mmix_elf_check_relocs): Abuse bfd_link_info member base_file to
10503 store first object file with a base-plus-offset reloc. Call
10504 mmix_elf_check_common_relocs for the part common with mmo.
10505 (mmix_elf_final_link): Write out linker-allocated register
10506 contents section.
10507 (elf_backend_gc_sweep_hook): Define.
10508 (bfd_elf64_bfd_relax_section): Define.
10509
10510 * mmo.c: Don't include <ctype.h>
10511 (mmo_init): Correct init-once logic.
10512
10513 2002-02-01 Tom Rix <trix@redhat.com>
10514
10515 * config.bfd: Conditionally support <aiaff> for pre AIX 4.3.
10516
10517 2002-02-01 Alan Modra <amodra@bigpond.net.au>
10518
10519 * Makefile.am: Run "make dep-am"
10520 * Makefile.in: Regenerate.
10521
10522 2002-01-31 David O'Brien <obrien@FreeBSD>
10523
10524 * configure.in: Recognize the differences in core files from FreeBSD
10525 4.{0,1} and later versions of 4.x. This treats 4.2+ the same as
10526 5-CURRENT.
10527 * configure: Regenerate.
10528
10529 2002-01-31 Ivan Guzvinec <ivang@opencores.org>
10530
10531 * coff-or32.c: New file.
10532 * cpu-or32.c: New file.
10533 * elf32-or32.c: New file.
10534 * archures.c: Add support for or32.
10535 * targets.c: Add support for or32.
10536 * bfd-in2.h: Regenerate.
10537 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags,
10538 coff_write_object_contents): Add support for or32.
10539 * config.bfd: Add target.
10540 * configure.in: Add support for or32.
10541 * configure: Regenerate.
10542 * Makefile.am: Add support for or32.
10543 * Makefile.in: Regenerate.
10544 * po/SRC-POTFILES.in: Add or32 files.
10545 * po/bfd.pot: Regenerate.
10546
10547 2002-01-31 Nick Clifton <nickc@cambridge.redhat.com>
10548 Don Lindsay <lindsayd@cisco.com>
10549
10550 * elf32-mips.c (mips_elf_calculate_relocation): Replace 'return
10551 false' with a return of a bfd_reloc_ error code.
10552
10553 2002-01-31 Hans-Peter Nilsson <hp@axis.com>
10554
10555 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
10556 unexport unreferenced symbols when --export-dynamic. Call
10557 _bfd_elf_strtab_delref when unexporting.
10558
10559 2002-01-30 Daniel Jacobowitz <drow@mvista.com>
10560
10561 * bfd-in.h: Include <stdbool.h> if it is available.
10562 * bfd-in2.h: Regenerated.
10563
10564 2002-01-31 Alan Modra <amodra@bigpond.net.au>
10565
10566 * elf64-ppc.c (func_desc_adjust): STV_PROTECTED functions should
10567 not go via the plt.
10568
10569 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
10570
10571 * archures.c: Tidy up formatting of embedded comments.
10572 * bfd.c: Tidy up formatting of embedded comments.
10573 * bfd-in.h: Fix formatting of comments.
10574 * reloc.c: Tidy up formatting of ordinary & embedded comments.
10575 * section.c: Tidy up formatting of embedded comments.
10576 * syms.c: Tidy up formatting of embedded comments.
10577 * targets.c: Tidy up formatting of embedded comments.
10578
10579 * bfd-in2.h: Regenerate.
10580
10581 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
10582
10583 * vms-tir.c (cmd_name): New function.
10584 (tir_cmd_name): New function.
10585 (etir_sta, etir_sto, etir_opr, etir_stc): Use cmd_name().
10586 (tir_opr, tir_ctl, tir_cmd): use tir_cmd_name().
10587 Fix formatting.
10588
10589 * peXXigen.c (pe_print_idata): Rearrange message to aid in
10590 translation.
10591 (pe_print_pdata): Rearrange message to aid in translation.
10592
10593 * libbfd.c (warn_deprecated): Rearrange error message to aid in
10594 translation.
10595
10596 * ihex.c (ihex_write_object_contents): Fix spelling typo.
10597
10598 * ieee.c (ieee_slurp_external_symbols): Remove spurious space.
10599
10600 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Rearrange error
10601 message to aid in translation.
10602
10603 * elf64-mmix.c (mmix_final_link_relocate): Rearrange error message
10604 to aid in translation.
10605
10606 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix typo.
10607
10608 2002-01-30 Philipp Thomas <pthomas@suse.de>
10609
10610 * coff-arm.c, elf32-elf.h: Unify messages.
10611
10612 2002-01-30 Nick Clifton <nickc@redhat.com>
10613
10614 * po/sv.po: Updated translation.
10615
10616 2002-01-30 Philipp Thomas <pthomas@suse.de>
10617
10618 * dwarf2.c (read_abbrev): Use full section name in error message.
10619 (decode_line_info): Likewise.
10620
10621 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Don't translate debugging
10622 message.
10623
10624 2002-01-30 Alan Modra <amodra@bigpond.net.au>
10625
10626 * elf64-ppc.c (func_desc_adjust): Only provide missing function
10627 descriptor symbols for undefined function code syms. Clear
10628 ELF_LINK_NON_ELF so that they can stay weak.
10629
10630 2002-01-29 Chris Demetriou <cgd@broadcom.com>
10631 Mitch Lichtenberg <mpl@broadcom.com>
10632
10633 * bfd-in.h (bfd_mips_elf32_create_embedded_relocs): New prototype.
10634 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): New function
10635 to handle 32-bit ELF embedded reloc (ld --embedded-relocs)
10636 generation.
10637 * bfd-in2.h: Regenerate.
10638
10639 2002-01-29 Chris Demetriou <cgd@broadcom.com>
10640
10641 * elf32-mips.c: Add additional comments about HI16 relocation
10642 processing.
10643 (_bfd_mips_elf_hi16_reloc): Don't subtract address here for
10644 pc-relative relocations. (Reverts change made on 2001-10-31.)
10645 (_bfd_mips_elf_lo16_reloc): Subtract address of LO16 part here
10646 for pc-relative relocations.
10647 (mips_elf_calculate_relocation): Add a comment about a kludge
10648 in the R_MIPS_GNU_REL_HI16 handling.
10649 (_bfd_mips_elf_relocate_section): Implement that kludge;
10650 adjust pc-relative HI16 relocation for difference in HI16 and
10651 LO16 addresses, since it can't easily be done in
10652 mips_elf_calculate_relocation.
10653
10654 2002-01-29 Martin Schwidefsky <schwidefsky@de.ibm.com>
10655
10656 * elf32-i386 (elf_i386_adjust_dynamic_symbol): Do not replace PLT32
10657 relocations with PC32 relocations for undefined or weak symbols.
10658 * elf32-s390 (elf_i386_adjust_dynamic_symbol): Likewise.
10659 * elf64-s390x (elf_i386_adjust_dynamic_symbol): Likewise.
10660
10661 2002-01-28 Jason Thorpe <thorpej@wasabisystems.com>
10662
10663 * elfcore.h (elf_core_file_p): Improve comment for last change.
10664
10665 2002-01-27 Daniel Jacobowitz <drow@mvista.com>
10666
10667 * configure: Regenerated.
10668
10669 2002-01-27 Jason Thorpe <thorpej@wasabisystems.com>
10670
10671 * elfcore.h (elf_core_file_p): Set the machine architecture
10672 before processing the program headers.
10673
10674 2002-01-26 Hans-Peter Nilsson <hp@bitrange.com>
10675
10676 * configure.in <64-bit configuration>: If using gcc, check and
10677 emit error for egcs-1.1.2.
10678 * configure: Regenerate.
10679
10680 2002-01-26 Egor Duda <deo@logos-m.ru>
10681
10682 * elf.c (elfcore_grok_win32pstatus): Copy only as much information
10683 as possible to avoid stack corruption.
10684
10685 2002-01-26 Richard Henderson <rth@redhat.com>
10686
10687 * elf64-alpha.c (elf64_alpha_check_relocs): Don't set reltext
10688 for non-allocated sections.
10689
10690 2002-01-25 Mark Kettenis <kettenis@gnu.org>
10691
10692 * elf.c (elfcore_write_prstatus): Make sure we pass the address of
10693 prstat.pr_reg even if it is a struct.
10694
10695 2002-01-25 Steve Ellcey <sje@cup.hp.com>
10696
10697 * elfxx-ia64.c: Reset AIX vector function overrides for HP-UX.
10698
10699 2002-01-25 Philipp Thomas <pthomas@suse.de>
10700
10701 * coffgen.c (coff_print_symbol): Don't mark info message
10702 for translation.
10703
10704 2002-01-25 Nick Clifton <nickc@redhat.com>
10705
10706 * po/fr.po: Updated translation.
10707 * po/es.po: Updated translation.
10708
10709 2002-01-25 Philipp Thomas <pthomas@suse.de>
10710
10711 * coff-alpha.c (alpha_relocate_section): Unify warning message
10712 for GP relative relocations without GP defined.
10713 * coff-mips.c (mips_relocate_section): Likewise.
10714
10715 2002-01-25 Alan Modra <amodra@bigpond.net.au>
10716
10717 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Avoid
10718 unsigned overflow when new_offset < old_offset.
10719
10720 2002-01-24 Philipp Thomas <pthomas@suse.de>
10721
10722 * bfd.c (_bfd_abort): Fix typo.
10723
10724 2002-01-23 Richard Henderson <rth@redhat.com>
10725
10726 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't suppress
10727 plt entries for undefweak symbols.
10728
10729 2002-01-23 Steve Ellcey <sje@cup.hp.com>
10730
10731 * targets.c (bfd_elf32_ia64_hpux_big_vec): Add to DEFAULT_VECTOR.
10732 (bfd_elf64_ia64_hpux_big_vec): Ditto.
10733 (bfd_elf32_h8300_vec): Ditto.
10734
10735 2002-01-23 Alan Modra <amodra@bigpond.net.au>
10736
10737 * elf64-ppc.c: Remove stale part of ABI comment.
10738 (NO_OPD_RELOCS): Define.
10739 (ppc64_elf_check_relocs): Use it.
10740 (ppc64_elf_relocate_section): Here too.
10741 (build_one_stub): Don't point function syms at the stub. Instead,
10742 hijack plt.offset.
10743 (ppc64_elf_relocate_section): Check whether REL24 relocs should
10744 really go to the stub. Make all dynamic relocs in opd against
10745 locals.
10746 (ppc64_elf_finish_dynamic_symbol): Allow for non-standard use of
10747 plt.offset.
10748
10749 2002-01-22 Richard Henderson <rth@redhat.com>
10750
10751 * elf64-alpha.c (INSN_UNOP): Encode with RB as $sp.
10752
10753 2002-01-22 Alan Modra <amodra@bigpond.net.au>
10754
10755 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Correct sign of
10756 TOC_BASE_OFF adjustment.
10757
10758 * Makefile.am: Run "make dep-am".
10759 * Makefile.in: Regenerate.
10760 * po/SRC-POTFILES.in: Regenerate.
10761
10762 2002-01-22 John David Anglin <dave@hiauly1.hia.nrc.ca>
10763
10764 * configure.host (hppa*64*-*-hpux*, hppa*64*-*-linux*): Add new
10765 host defines.
10766
10767 2002-01-21 Hans-Peter Nilsson <hp@axis.com>
10768
10769 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GOTREL>:
10770 Check for and emit error if sgot is NULL at this point.
10771
10772 2002-01-21 Jason Thorpe <thorpej@wasabisystems.com>
10773
10774 * config.bfd (ia64*-*-netbsd*): New target.
10775
10776 2002-01-21 Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
10777
10778 * som.c (som_write_space_strings): Comment typo fix.
10779
10780 2002-01-21 Alan Modra <amodra@bigpond.net.au>
10781
10782 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_func and
10783 is_func_descriptor fields.
10784 (link_hash_newfunc): Init them.
10785 (ppc64_elf_check_relocs): Only R_PPC24_REL24 syms starting with a
10786 dot are candidates for plt entries. When processing .opd relocs,
10787 set function descriptor strings to point inside function code
10788 string, and set new ppc_link_hash_entry fields.
10789 (ppc64_elf_gc_sweep_hook): Don't sweep R_PPC64_REL24 relocs.
10790 (ppc64_elf_adjust_dynamic_symbol): Remove most code dealing with
10791 function descriptors. It's now done in..
10792 (func_desc_adjust): New.
10793 (ppc64_elf_func_desc_adjust): New.
10794 (define elf_backend_always_size_sections): Define.
10795 (ppc64_elf_hide_symbol): New.
10796 (define elf_backend_hide_symbol): Define.
10797 (allocate_dynrelocs): Remove code looking up function descriptors
10798 as that has been done earlier.
10799 (ppc64_elf_size_dynamic_sections): Use htab shortcut to elf hash
10800 table.
10801 (ppc64_elf_finish_dynamic_symbol): Likewise. Remove code looking
10802 up function descriptor.
10803 (build_one_stub): Look up the function code sym. Check for
10804 invalid plt offsets.
10805 (ppc64_elf_relocate_section): Tweak calls to undefined weak syms.
10806 Convert R_PPC64_TOC relocs to R_PPC64_RELATIVE in shared libs.
10807
10808 * elf-bfd.h (elf_backend_data <elf_backend_hide_symbol>): Add
10809 boolean param.
10810 (_bfd_elf_link_hash_hide_symbol): Likewise.
10811 * elflink.h (elf_link_add_object_symbols): Adjust call to
10812 elf_backend_hide_symbol.
10813 (elf_fix_symbol_flags): Likewise.
10814 (elf_link_assign_sym_version): Likewise. Use bfd_malloc rather
10815 than bfd_alloc.
10816 * elf.c (_bfd_elf_link_hash_hide_symbol): Add "force_local" param.
10817 Set ELF_LINK_FORCED_LOCAL and call _bfd_elf_strtab_delref.
10818 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
10819 (clobber_millicode_symbols): Adjust to suit new hide_symbol.
10820 * elf32-cris.c (elf_cris_hide_symbol): Add "force_local" param
10821 and adjust to suit.
10822 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise, and call
10823 _bfd_elf_link_hash_hide_symbol rather than duplicating code.
10824 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
10825
10826 2002-01-18 Alan Modra <amodra@bigpond.net.au>
10827
10828 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Test for a
10829 dynamic function descriptor symbol, not the associated function
10830 symbol.
10831
10832 2002-01-17 Eric Christopher <echristo@redhat.com>
10833
10834 * elf32-mips.c (mips_elf_calculate_relocation): Fix typo.
10835
10836 2002-01-17 Nick Clifton <nickc@cambridge.redhat.com>
10837
10838 * po/bfd.pot: Regenerate.
10839 * po/fr.po: Regenerate.
10840
10841 2002-01-17 Alan Modra <amodra@bigpond.net.au>
10842
10843 * elf-bfd.h (elf_backend_data <elf_backend_section_from_bfd_section>):
10844 Remove "Elf_Internal_Shdr *" param.
10845 (_bfd_mips_elf_section_from_bfd_section): Ditto.
10846 * elf32-mips.c (_bfd_mips_elf_section_from_bfd_section): Ditto.
10847 * elf32-m32r.c (_bfd_m32r_elf_section_from_bfd_section): Ditto.
10848 * elf32-v850.c (v850_elf_section_from_bfd_section): Ditto.
10849 * elf64-mmix.c (mmix_elf_section_from_bfd_section): Ditto.
10850 * elfxx-ia64.c (elfNN_hpux_backend_section_from_bfd_section): Ditto.
10851 * elf.c (_bfd_elf_section_from_bfd_section): Allow backend
10852 function to override special sections. Remove hdr arg from
10853 backend call, and don't loop.
10854
10855 2002-01-16 Eric Christopher <echristo@redhat.com>
10856
10857 * elf32-mips.c (mips_elf_calculate_relocation): Set require_jalxp
10858 on R_MIPS_26 and target is 16bit. Add R_MIPS16_GPREL to list of
10859 relocations requiring gp0 and gp.
10860
10861 2002-01-16 Richard Earnshaw <rearnsha@arm.com>
10862
10863 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle
10864 EF_ARM_VFP_FLOAT.
10865 (elf32_arm_print_private_bfd_data): Likewise.
10866
10867 2002-01-16 Nick Clifton <nickc@cambridge.redhat.com>
10868
10869 * po/tr.po: Import new version.
10870
10871 2002-01-16 Alan Modra <amodra@bigpond.net.au>
10872
10873 * elf64-ppc.c (ppc64_elf_howto_raw): Remove stale FIXMEs.
10874 (ppc64_elf_reloc_type_lookup): Use proper CTOR reloc.
10875 (ORI_R0_R0_0): Correct.
10876
10877 2002-01-16 Alan Modra <amodra@bigpond.net.au>
10878
10879 * elflink.c (_bfd_elf_create_dynamic_sections): Don't set SEC_CODE
10880 when plt_not_loaded.
10881 * elf64-ppc.c (ppc64_elf_create_dynamic_sections): No need to
10882 clear .plt SEC_CODE here. Create .stub and correct .glink flags.
10883 (PLT_INITIAL_ENTRY_SIZE): Set to 24.
10884 (ppc64_elf_glink_code): Delete.
10885 (PPC64_ELF_GLINK_SIZE): Delete.
10886 (ADDIS_R12_R2, STD_R2_40R1, LD_R11_0R12, LD_R2_0R12, MTCTR_R11,
10887 BCTR, ADDIS_R12_R12_1, LD_R2_40R1, NOP, LI_R0_0, B_DOT, LIS_R0_0,
10888 ORI_R0_R0_0): Define.
10889 (PLT_CALL_STUB_SIZE, GLINK_CALL_STUB_SIZE): Define.
10890 (struct ppc_link_hash_table): Add sstub and plt_overflow.
10891 (ppc64_elf_link_hash_table_create): Init them.
10892 (ppc64_elf_check_relocs <R_PPC64_REL24>): Refcount .plt entry.
10893 Don't copy to shared lib.
10894 (ppc64_elf_check_relocs): Call bfd_set_error on errors.
10895 (ppc64_elf_gc_sweep_hook <R_PPC64_REL24>): Sweep plt refcount.
10896 (allocate_dynrelocs <plt>): Don't change function sym here. Make
10897 room for .stub and .glink code.
10898 (ppc64_elf_size_dynamic_sections): Handle .stub. Make entry for
10899 DT_PPC64_GLINK.
10900 (ppc64_elf_final_link): Rename to ppc64_elf_set_toc. Don't call
10901 bfd_elf64_bfd_final_link.
10902 (bfd_elf64_bfd_final_link): Don't define.
10903 (ppc64_elf_size_stubs): New.
10904 (build_plt_stub): New.
10905 (build_one_stub): New.
10906 (ppc64_elf_build_stubs): New.
10907 (ppc64_elf_relocate_section <toc relocs>): Remove assert.
10908 (ppc64_elf_relocate_section): Don't copy R_PPC64_REL24 relocs.
10909 (ppc64_elf_finish_dynamic_symbol): Don't build stubs here. Set
10910 DT_PPC64_GLINK entry. Tweak DT_PLTGOT, DT_JMPREL, DT_PLTRELSZ in
10911 case output sections not separate. Adjust DT_RELASZ to not
10912 include plt relocs. Set reserved got entry. Set got and plt
10913 entry size.
10914 (elf_backend_got_header_size): Set to 8.
10915 * elf64-ppc.h: New file.
10916
10917 2002-01-16 Alan Modra <amodra@bigpond.net.au>
10918
10919 * elf32-arm.h (elf32_arm_size_dynamic_sections): When removing
10920 sections, use bfd_section_list_remove.
10921 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
10922 * elflink.h (elf_link_add_object_symbols): When removing all
10923 sections, use bfd_section_list_clear.
10924
10925 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
10926
10927 * po/sv.po: New file: Swedish translation.
10928 * configure.in (ALL_LINGUAS): Add sv.
10929 * configure: Regenerate.
10930
10931 2002-01-15 Jakub Jelinek <jakub@redhat.com>
10932
10933 * elflink.h (elf_link_input_bfd): Back out 2002-01-07 change.
10934 * elf.c (merge_sections_remove_hook): New function.
10935 (_bfd_elf_merge_sections): Pass it as 3rd argument to
10936 _bfd_merge_sections.
10937 * libbfd-in.h (_bfd_merge_sections): Add 3rd argument.
10938 * libbfd.h: Rebuilt.
10939 * merge.c (_bfd_merge_sections): Add remove_hook argument.
10940 Call remove_hook if a SEC_EXCLUDE section is encountered.
10941
10942 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
10943
10944 * elf32-xstormy16.c (xstormy16_reloc_map): Add new field 'table'.
10945 (xstormy16_reloc_map): Initialise new field with correct howto
10946 table.
10947 (xstormy16_reloc_type_lookup): Use 'table' field to locate correct
10948 howto entry.
10949
10950 2002-01-10 Michael Snyder <msnyder@redhat.com>
10951
10952 * elf.c (elfcore_write_prstatus): Use long instead of pid_t;
10953 (elfcore_write_pstatus): Use long instead of pid_t;
10954 * elf-bfd.h: Change prototypes to use long instead of pid_t;
10955
10956 2002-01-09 Jason Thorpe <thorpej@wasabisystems.com>
10957
10958 * elf.c: Update copyright years.
10959 (elfcore_grok_netbsd_note): Use NT_NETBSDCORE_PROCINFO
10960 and NT_NETBSDCORE_FIRSTMACH. Improve a comment.
10961
10962 2002-01-08 Michael Snyder <msnyder@redhat.com>
10963
10964 Add capability to write corefile note sections, for gdb.
10965 * elf.c (elfcore_write_note): New function.
10966 (elfcore_write_prpsinfo): New function.
10967 (elfcore_write_prstatus): New function.
10968 (elfcore_write_pstatus): New function.
10969 (elfcore_write_prfpreg): New function.
10970 (elfcore_write_prxfpreg): New function.
10971 * elf-bfd.h: Add prototypes for above functions.
10972
10973 2002-01-08 Alexandre Oliva <aoliva@redhat.com>
10974
10975 * elf.c (elf_fake_sections): Propagate errors from
10976 elf_backend_fake_section.
10977
10978 2002-01-07 Jason Thorpe <thorpej@wasabisystems.com>
10979
10980 * Makefile.am (BFD32_BACKENDS): Add elf32-sh-nbsd.lo.
10981 (BFD32_BACKENDS_CFILES): Add elf32-sh-nbsd.c.
10982 (elf32-sh-nbsd.lo): New rule.
10983 * Makefile.in: Regenerate.
10984 * config.bfd (sh*le-*-netbsdelf*): New target.
10985 (sh*-*-netbsdelf*): New target.
10986 * configure.in: Include netbsd-core.lo for native sh*-*-netbsd*.
10987 (bfd_elf32_shnbsd_vec): New vector.
10988 (bfd_elf32_shlnbsd_vec): New vector.
10989 * configure: Regenerate.
10990 * elf32-sh-nbsd.c: New file.
10991 * targets.c: Update copyright years.
10992 (_bfd_target_vector): Add bfd_elf32_shlnbsd_vec and
10993 bfd_elf32_shnbsd_vec.
10994
10995 2002-01-07 Aldy Hernandez <aldyh@redhat.com>
10996
10997 * coff-rs6000.c (READ20): Use bfd_scan_vma.
10998
10999 2002-01-07 Geoffrey Keating <geoffk@redhat.com>
11000
11001 * elflink.h (elf_link_input_bfd): Don't ask for the merged offset
11002 of a symbol in a section that will be deleted.
11003
11004 2002-01-07 Nick Clifton <nickc@cambridge.redhat.com>
11005
11006 * po/es.po: New file: Spanish translation.
11007 * configure.in (ALL_LINGUAS): Add es.
11008 * configure: Regenerate.
11009
11010 2002-01-06 Steve Ellcey <sje@cup.hp.com>
11011
11012 * elfxx-ia64.c (is_unwind_section_name): Add target vector as
11013 argument so we can handle HP-UX specially.
11014 (elfNN_ia64_hpux_vec): New for use in is_unwind_section_name.
11015 (elfNN_hpux_backend_section_from_bfd_section): New for support
11016 of SHN_IA_64_ANSI_COMMON.
11017 (elfNN_ia64_relax_section): Add support for SHN_IA_64_ANSI_COMMON.
11018 (is_unwind_section_name): Add special HP-UX support.
11019 (elfNN_ia64_section_from_shdr): Add support for more sections.
11020 (elfNN_ia64_fake_sections): Modify is_unwind_section_name call and
11021 add support for more sections.
11022 (elfNN_ia64_additional_program_headers): Modify
11023 is_unwind_section_name call.
11024 (elfNN_ia64_modify_segment_map): Remove assumption that there is
11025 only one unwind section in segment.
11026
11027 2002-01-06 Alan Modra <amodra@bigpond.net.au>
11028
11029 * syms.c (_bfd_generic_make_empty_symbol): New function.
11030 * libbfd-in.h (_bfd_nosymbols_make_empty_symbol): Define as
11031 _bfd_generic_make_empty_symbol.
11032 * libbfd.h: Regenerate.
11033 * bfd-in2.h: Regenerate.
11034 * hppabsd-core.c (hppabsd_core_make_empty_symbol): Delete function.
11035 (hppabsd_core_get_symtab_upper_bound): Don't define.
11036 (hppabsd_core_get_symtab): Likewise.
11037 (hppabsd_core_print_symbol): Likewise.
11038 (hppabsd_core_get_symbol_info): Likewise.
11039 (hppabsd_core_bfd_is_local_label_name): Likewise.
11040 (hppabsd_core_get_lineno): Likewise.
11041 (hppabsd_core_find_nearest_line): Likewise.
11042 (hppabsd_core_bfd_make_debug_symbol): Likewise.
11043 (hppabsd_core_read_minisymbols): Likewise.
11044 (hppabsd_core_minisymbol_to_symbol): Likewise.
11045 (hppabsd_core_vec): Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols).
11046 Formatting fixes.
11047 * hpux-core.c: Similarly.
11048 * irix-core.c: Similarly.
11049 * osf-core.c: Similarly.
11050 * sco5-core.c: Similarly.
11051 * binary.c (binary_make_empty_symbol): Remove function, define as
11052 _bfd_generic_make_empty_symbol.
11053 * ihex.c (ihex_make_empty_symbol): Likewise.
11054 * mmo.c (mmo_make_empty_symbol): Likewise.
11055 * ppcboot.c (ppcboot_make_empty_symbol): Likewise.
11056 * srec.c (srec_make_empty_symbol): Likewise.
11057 * versados.c (versados_make_empty_symbol): Likewise.
11058 * vms.c (_bfd_vms_make_empty_symbol): Remove.
11059 (vms_make_empty_symbol): Define as _bfd_generic_make_empty_symbol.
11060 * vms-gsd.c (_bfd_vms_slurp_gsd): Call bfd_make_empty_symbol
11061 rather than _bfd_vms_make_empty_symbol.
11062 * vms-misc.c (new_symbol): Likewise.
11063
11064 2002-01-05 Alan Modra <amodra@bigpond.net.au>
11065
11066 * section.c (bfd_section_init): Remove unnecessary initialisations.
11067 (bfd_section_list_clear): New function.
11068 (bfd_section_list_remove, bfd_section_list_insert): New macros.
11069 (_bfd_strip_section_from_output): Use them.
11070 * coffcode.h (coff_set_alignment_hook): Likewise.
11071 * elf32-mips.c (_bfd_mips_elf_final_link): Likewise.
11072 * elf64-mips.c (mips_elf64_final_link): Likewise.
11073 * elf64-mmix.c (mmix_elf_final_link): Likewise.
11074 * sunos.c (sunos_add_dynamic_symbols): Likewise.
11075 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
11076 * bfd-in2.h: Regenerate.
11077
11078 * netbsd-core.c (netbsd_core_file_p): Use bfd_make_section_anyway
11079 rather than doing our own section handling. Clean up after errors
11080 with bfd_release and bfd_section_list_clear. Handle unexpected
11081 flags.
11082 * aoutf1.h (sunos4_core_file_p): Likewise.
11083 * aix386-core.c (aix386_core_file_p): Likewise.
11084 * cisco-core.c (cisco_core_file_validate): Likewise.
11085 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
11086 * trad-core.c (trad_unix_core_file_p): Likewise.
11087
11088 * hppabsd-core.c (hppabsd_core_core_file_p): Clean up after errors
11089 with bfd_release and bfd_section_list_clear.
11090 * hpux-core.c (hpux_core_core_file_p): Likewise.
11091 * irix-core.c (irix_core_core_file_p): Likewise.
11092 * lynx-core.c (lynx_core_file_p): Likewise.
11093 * osf-core.c (osf_core_core_file_p): Likewise.
11094 * rs6000-core.c (rs6000coff_core_p): Likewise.
11095 * sco5-core.c (sco5_core_file_p): Likewise.
11096
11097 * elf32-mips.c (_bfd_mips_elf_lo16_reloc): Simplify, and perform
11098 sign extension adjustments without conditionals.
11099
11100 2002-01-04 Jakub Jelinek <jakub@redhat.com>
11101
11102 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Don't crash if
11103 CIE at .eh_frame start is removed due to no FDEs referencing it.
11104
11105 2002-01-04 Jason Thorpe <thorpej@wasabisystems.com>
11106
11107 * config.bfd (x86_64-*-netbsd*): New target.
11108 * configure.in (x86_64-*-netbsd*): Set COREFILE
11109 to netbsd-core.lo.
11110 * configure: Regenerated.
11111
11112 2002-01-03 Tom Rix <trix@redhat.com>
11113
11114 * xcofflink.c (_bfd_xcoff_bfd_final_link): Update .pad section ordering
11115 for recent bfd_make_section_anyway change.
11116
11117 2002-01-03 Nick Clifton <nickc@cambridge.redhat.com>
11118
11119 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
11120 R_ARM_THM_PC11 reloc.
11121
11122 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
11123
11124 * configure.in (LINGUAS): Add ja.
11125 * configure: Regenerate.
11126 * po/ja.po: Import from translation project's web site.
11127
11128 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
11129
11130 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Reformat error
11131 messages to ease translation into other languages.
11132
11133 For older changes see ChangeLog-0001
11134 \f
11135 Local Variables:
11136 mode: change-log
11137 left-margin: 8
11138 fill-column: 74
11139 version-control: never
11140 End: