Check for alignment when emitting constants on the sh-elf target
[deliverable/binutils-gdb.git] / bfd / ChangeLog
1 2003-11-26 Daniel Jacobowitz <drow@mvista.com>
2 Richard Sandiford <rsandifo@redhat.com>
3
4 * elfxx-mips.c (mips_elf_set_global_got_offset): Don't set no_fn_stub.
5 (mips_elf_set_no_stub): New function.
6 (mips_elf_multi_got): Call it.
7 (_bfd_mips_elf_finish_dynamic_symbol): If a relocation is needed for
8 a secondary GOT entry, create an R_MIPS_32 or R_MIPS_64 relocation and
9 use mips_elf_create_dynamic_relocation to deal with any compatibility
10 issues. Store the adjusted addend in the GOT slot.
11
12 2003-11-25 Mattias EngdegÄrd <mattias@virtutech.se>
13
14 * stabs.c (_bfd_link_section_stabs): Skip N_EXCL stabs when
15 procesing N_BINCL stabs.
16
17 2003-11-25 Alan Modra <amodra@bigpond.net.au>
18
19 * elf64-ppc.c (ppc_type_of_stub): Disallow stubs other than
20 ppc_stub_plt_call to symbols defined in shared libs.
21
22 2003-11-22 Jakub Jelinek <jakub@redhat.com>
23
24 * elf-bfd.h (ELF_LINK_POINTER_EQUALITY_NEEDED): Define new flag.
25 * elf.c (_bfd_elf_link_hash_copy_indirect): Copy it.
26 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
27 (elf_i386_check_relocs): Set it.
28 (elf_i386_finish_dynamic_symbol): If it is not set,
29 clear st_value of SHN_UNDEF symbol.
30
31 2003-11-20 Jim Blandy <jimb@redhat.com>
32
33 * cpu-powerpc.c (powerpc_compatible): Any ISA in the PowerPC
34 family is a superset of <bfd_arch_rs6000,bfd_mach_rs6k>.
35
36 2003-11-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
37
38 * elf32-s390.c (elf_s390_relocate_section): Don't recalculate symbol
39 section for reloc output and subtract the output section's address
40 from the addend when converting a relocation into one against a
41 section symbol.
42 * elf64-s390.c (elf_s390_relocate_section): Likewise.
43
44 2003-11-18 James E Wilson <wilson@specifixinc.com>
45
46 * elfxx-ia64.c (get_fptr): For fptr_rel, use dynobj not abfd.
47 (elfNN_ia64_size_dynamic_sections): When stripping sections, check
48 for ia64_info->rel_fptr_sec.
49
50 2003-11-18 Alan Modra <amodra@bigpond.net.au>
51
52 * elf64-ppc.c (toc_adjusting_stub_needed): Exit early if section
53 size is zero.
54
55 2003-11-17 Daniel Jacobowitz <drow@mvista.com>
56
57 * elf.c (_bfd_elf_link_hash_copy_indirect): Copy
58 ELF_LINK_HASH_NEEDS_PLT. Fix formatting.
59 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
60 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
61 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Likewise.
62 * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
63 * elf32-sh.c (sh_elf_copy_indirect_symbol): Likewise.
64 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
65 * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
66 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
67 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
68 * elf32-xtensa.c (elf_xtensa_copy_indirect_symbol): Remove.
69 (elf_backend_copy_indirect_symbol): Don't define.
70
71 2003-11-14 Daniel Jacobowitz <drow@mvista.com>
72
73 * elfxx-mips.c (mips_elf_merge_gots): Weaken assert for local
74 GOT entries.
75
76 2003-11-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
77
78 * elf32-s390.c (elf_s390_relocate_section): Only convert R_390_32
79 to R_390_RELATIVE. Convert the other relocations against local
80 symbols to relocations against the start of the section.
81 * elf64-s390.c (elf_s390_relocate_section): Only convert R_390_64
82 to R_390_RELATIVE. Convert the other relocations against local
83 symbols to relocations against the start of the section.
84
85 2003-11-11 Nick Clifton <nickc@redhat.com>
86
87 * elf-m10300.c (bfd_mn10300_elf_size_dynamic_sections): Use
88 info->executable not info->shared to decide if a .interp section
89 should be present.
90 * elf32-arm.h (elf32_arm_size_dynamic_sections): Likewise.
91 * elf32-cris.c (elf_cris_size_dynamic_sections): Likewise.
92 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
93 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
94 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
95 * elf32-vax.c (elf_vax_size_dynamic_sections): Likewise.
96 * elf32-xtensa.c (elf_xtensa_size_dynamic_sections): Likewise.
97 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
98 * elfxx-mips.c (_bfd_mips_size_dynamic_sections): Likewise.
99 * elflink.h (size_dynamic_sections): Likewise.
100
101 2003-11-10 Jonathan Wilson <jonwil@tpgi.com.au>
102
103 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Swap out tls pointer.
104 (_bfd_XXi_final_link_postscript): Look for __tks_used symbol. If
105 found initialise the tls data directory entry.
106
107 2003-11-07 Alan Modra <amodra@bigpond.net.au>
108
109 * elf32-ppc.c (ppc_elf_install_value): Delete.
110 (shared_stub_entry, stub_entry): Make them arrays of ints.
111 Remove initial branch.
112 (ppc_elf_relax_section): Write one branch around all trampolines
113 instead. Correct bogus R_PPC_PLTREL24 handling. Correct
114 branch range check. Only use shared_stub_entry when shared.
115 Test that branches can reach stubs. Write trampolines out at
116 end so that just one realloc is used. Handle little-endian
117 mode. Move relevant code from ppc_elf_install_value to here.
118 (ppc_elf_relocate_section): Move code handling RELAX32 from
119 ppc_elf_install_value to here.
120
121 2003-11-06 Alan Modra <amodra@bigpond.net.au>
122
123 * elf32-ppc.c (ppc_elf_howto_raw); Add entry for R_PPC_RELAX32PC.
124 (ppc_elf_install_value): Handle R_PPC_RELAX32PC. Merge duplicate
125 cases.
126 (shared_stub_entry): Correct opcode.
127 (ppc_elf_relax_section): Generate R_PPC_RELAX32PC relocs.
128 (ppc_elf_relocate_section): Handle them.
129
130 2003-11-05 Alan Modra <amodra@bigpond.net.au>
131
132 * elf.c (_bfd_elf_rela_local_sym): Accept asection **, and return
133 updated section in case of merged section.
134 * elf-bfd.h (_bfd_elf_rela_local_sym): Update declaration.
135 * elf-hppa.h (elf_hppa_relocate_section): Adjust call.
136 * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
137 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
138 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
139 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
140 * elf32-cris.c (cris_elf_relocate_section): Likewise.
141 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
142 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
143 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
144 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
145 * elf32-i370.c (i370_elf_relocate_section): Likewise.
146 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
147 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
148 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
149 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
150 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
151 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
152 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
153 * elf32-s390.c (elf_s390_relocate_section): Likewise.
154 * elf32-sh.c (sh_elf_relocate_section): Likewise.
155 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
156 * elf32-v850.c (v850_elf_relocate_section) Likewise.
157 * elf32-vax.c (elf_vax_relocate_section): Likewise.
158 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
159 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
160 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
161 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
162 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
163 * elf64-s390.c (elf_s390_relocate_section): Likewise.
164 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
165 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
166 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
167 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
168
169 * elf32-cris.c (cris_elf_relocate_section): Don't recalculate symbol
170 section for reloc output.
171 * elf32-i370.c (i370_elf_relocate_section): Likewise.
172 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
173 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
174 * elf32-vax.c (elf_vax_relocate_section): Likewise.
175 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
176 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
177
178 * elf32-ppc.c (ppc_elf_relocate_section): Don't recalculate everything
179 for R_PPC_RELAX32 reloc. Don't bother checking ppc_elf_install_value
180 return value.
181 * elf64-ppc.c (ppc64_elf_relocate_section <R_PPC64_TOC>): Sanity check
182 sec->id.
183
184 2003-11-05 Alan Modra <amodra@bigpond.net.au>
185
186 * elf32-d10v.c (extract_rel_addend, insert_rel_addend): New functions.
187 (elf32_d10v_relocate_section): Use them to handle -r reloc
188 adjustments, and in place of _bfd_elf_rela_local_sym.
189
190 * cpu-iq2000.c (arch_info_struct): Warning fix.
191
192 2003-11-05 Alan Modra <amodra@bigpond.net.au>
193
194 * elf32-hppa.c (ELIMINATE_COPY_RELOCS): Define.
195 (elf32_hppa_copy_indirect_symbol): Don't copy NON_GOT_REF on
196 weakdefs.
197 (elf32_hppa_check_relocs): Use ELIMINATE_COPY_RELOCS.
198 (elf32_hppa_adjust_dynamic_symbol): Likewise. Copy weakdef
199 NON_GOT_REF.
200 (allocate_dynrelocs): Use ELIMINATE_COPY_RELOCS and
201 SYMBOL_CALLS_LOCAL. Discard relocs for undef weak syms with
202 non-default visibility.
203 (elf32_hppa_relocate_section): Use ELIMINATE_COPY_RELOCS and
204 SYMBOL_CALLS_LOCAL.
205
206 2003-11-04 Alan Modra <amodra@bigpond.net.au>
207
208 * aout-target.h, aoutf1.h, bfdio.c, bfdwin.c: Update copyright date.
209 * coff-apollo.c, coff-sparc.c, coff-w65.c, coff-we32k.c: Ditto.
210 * coff-z8k.c, coffgen.c, cpu-frv.c, cpu-h8500.c, cpu-hppa.c: Ditto.
211 * cpu-ia64-opc.c, cpu-m10300.c, cpu-mips.c, cpu-msp430.c: Ditto.
212 * cpu-rs6000.c, cpu-z8k.c, efi-app-ia32.c, elf32-am33lin.c: Ditto.
213 * gen-aout.c, hash.c, hp300hpux.c, init.c, mach-o.c: Ditto.
214 * nlm-target.h, nlm.c, som.h, stabs.c, sysdep.h, xsym.h: Ditto.
215
216 * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Fix
217 "dereferencing type-punned pointer" warnings.
218
219 * aout-adobe.c (aout_adobe_set_section_contents): Constify location.
220 * aoutx.h (NAME(aout,set_section_contents)): Ditto.
221 * bfd-in2.h: Regenerate.
222 * binary.c (binary_set_section_contents): Ditto.
223 * bout.c (b_out_set_section_contents): Ditto.
224 * coff-tic54x.c (tic54x_set_section_contents): Ditto.
225 * coffcode.h (coff_set_section_contents): Ditto.
226 * ecoff.c (_bfd_ecoff_set_section_contents): Ditto.
227 * elf-bfd.h (_bfd_elf_set_section_contents): Ditto.
228 * elf.c (_bfd_elf_set_section_contents): Ditto.
229 * elfxx-mips.c (_bfd_mips_elf_set_section_contents): Ditto.
230 * elfxx-mips.h (_bfd_mips_elf_set_section_contents): Ditto.
231 * i386msdos.c (msdos_set_section_contents): Ditto.
232 * ieee.c (ieee_set_section_contents): Ditto.
233 * ihex.c (ihex_set_section_contents): Ditto.
234 * libaout.h (NAME(aout,set_section_contents)): Ditto.
235 * libbfd-in.h (_bfd_nowrite_set_section_contents): Ditto.
236 (_bfd_generic_set_section_contents): Ditto.
237 * libbfd.h: Regenerate.
238 * libbfd.c (_bfd_generic_set_section_contents): Ditto.
239 * libecoff.h (_bfd_ecoff_set_section_contents): Ditto.
240 * libnlm.h (nlmNAME(set_section_contents)): Ditto.
241 (struct nlm_backend_data <nlm_mangle_relocs>): Ditto.
242 * mmo.c (mmo_set_section_contents): Ditto.
243 * nlm32-alpha.c (nlm_alpha_mangle_relocs): Ditto.
244 * nlm32-i386.c (nlm_i386_mangle_relocs): Ditto.
245 * nlm32-ppc.c (nlm_powerpc_mangle_relocs): Ditto.
246 * nlm32-sparc.c (nlm_sparc_mangle_relocs): Ditto.
247 * nlmcode.h (nlm_set_section_contents): Ditto.
248 * oasys.c (oasys_set_section_contents): Ditto.
249 * pdp11.c (NAME(aout,set_section_contents)): Ditto.
250 * ppcboot.c (ppcboot_set_section_contents): Ditto.
251 * srec.c (srec_set_section_contents): Ditto.
252 * targets.c (BFD_JUMP_TABLE_WRITE <_bfd_set_section_contents>): Ditto.
253 * tekhex.c (tekhex_set_section_contents): Ditto.
254 (move_section_contents): Ditto.
255 * versados.c (versados_set_section_contents): Ditto.
256 * vms-misc.c (_bfd_save_vms_section): Ditto.
257 * vms.c (vms_set_section_contents): Ditto.
258 * vms.h (_bfd_save_vms_section): Ditto.
259
260 2003-11-04 Alan Modra <amodra@bigpond.net.au>
261
262 * elf64-ppc.c (ppc_size_one_stub): Size relbrlt. Accept info arg
263 rather than htab.
264 (ppc64_elf_size_stubs): Adjust ppc_size_one_stub traversal. Zero
265 relbrlt size.
266 (ppc64_elf_build_stubs): Allocate space for relbrlt.
267
268 2003-11-04 Alan Modra <amodra@bigpond.net.au>
269
270 * bfd-in.h (_bfd_elf_tls_setup): Declare.
271 * bfd-in2.h: Regenerate.
272 * elf-bfd.h (struct elf_link_tls_segment): Delete.
273 (struct elf_link_hash_table): Add tls_sec and tls_size.
274 * elf.c (_bfd_elf_link_hash_table_init): Init tls_sec and tls_size.
275 * elflink.c (_bfd_elf_tls_setup): New function.
276 * elflink.h (struct elf_final_link_info): Remove first_tls_sec.
277 (elf_bfd_final_link): Don't set first_tls_sec here. Update code
278 saving tls segment info, round segment size up.
279 (elf_link_output_extsym): Adjust code using tls segment info.
280 (elf_link_input_bfd): Likewise.
281 * elf32-i386.c (dtpoff_base, tpoff): Likewise.
282 * elf32-s390.c (dtpoff_base, tpoff): Likewise.
283 * elf32-sh.c (dtpoff_base, tpoff): Likewise.
284 * elf32-sparc.c (dtpoff_base, tpoff): Likewise.
285 * elf64-s390.c (dtpoff_base, tpoff): Likewise.
286 * elf64-x86-64.c (dtpoff_base, tpoff): Likewise.
287 * elfxx-ia64.c (elfNN_ia64_tprel_base): Likewise.
288 (elfNN_ia64_dtprel_base): Likewise.
289 * elf64-alpha.c (alpha_get_dtprel_base): Likewise.
290 (alpha_get_tprel_base): Likewise.
291 (struct alpha_relax_info): Remove tls_segment.
292 (elf64_alpha_relax_got_load): Adjust invocation of
293 alpha_get_dtprel_base and alpha_get_tprel_base.
294 (elf64_alpha_relax_tls_get_addr): Likewise.
295 (elf64_alpha_relax_section): Likewise.
296 (elf64_alpha_relocate_section): Likewise.
297 (elf64_alpha_relax_find_tls_segment): Delete.
298 * elf32-ppc.c (struct ppc_elf_link_hash_table): Remove tls_sec.
299 (ppc_elf_tls_setup): Call _bfd_elf_tls_setup. Return section.
300 (ppc_elf_relocate_section): Adjust to use elf.tls_sec.
301 * elf32-ppc.h (ppc_elf_tls_setup): Update.
302 * elf64-ppc.c (struct ppc_link_hash_table): Remove tls_sec.
303 (ppc64_elf_tls_setup): Call _bfd_elf_tls_setup. Return section.
304 (ppc64_elf_tls_optimize): Adjust to use elf.tls_sec.
305 (ppc64_elf_relocate_section): Likewise.
306 * elf64-ppc.h (ppc64_elf_tls_setup): Update.
307
308 2003-11-03 Daniel Jacobowitz <drow@mvista.com>
309
310 * elf-bfd.h (struct elf_backend_data): Remove plt_header_size.
311 * elf-m10300.c (elf_backend_plt_header_size): Don't define.
312 * elf32-arm.h (elf_backend_plt_header_size): Don't define.
313 * elf32-cris.c (elf_backend_plt_header_size): Don't define.
314 * elf32-i386.c (elf_backend_plt_header_size): Don't define.
315 * elf32-mips.c (elf_backend_plt_header_size): Don't define.
316 * elf32-ppc.c (elf_backend_plt_header_size): Don't define.
317 * elf32-s390.c (elf_backend_plt_header_size): Don't define.
318 * elf32-sh.c (elf_backend_plt_header_size): Don't define.
319 * elf32-sparc.c (elf_backend_plt_header_size): Don't define.
320 * elf64-alpha.c (elf_backend_plt_header_size): Don't define.
321 * elf64-hppa.c (elf_backend_plt_header_size): Don't define.
322 * elf64-mips.c (elf_backend_plt_header_size): Don't define.
323 * elf64-ppc.c (elf_backend_plt_header_size): Don't define.
324 * elf64-s390.c (elf_backend_plt_header_size): Don't define.
325 * elf64-sh64.c (elf_backend_plt_header_size): Don't define.
326 * elf64-sparc.c (elf_backend_plt_header_size): Don't define.
327 * elf64-x86-64.c (elf_backend_plt_header_size): Don't define.
328 * elfn32-mips.c (elf_backend_plt_header_size): Don't define.
329 * elfxx-ia64.c (elf_backend_plt_header_size): Don't define.
330 * elfxx-target.h (elf_backend_plt_header_size): Don't define
331 or include in target initializer.
332
333 2003-11-03 Andrew Cagney <cagney@redhat.com>
334
335 * section.c (bfd_set_section_contents): Make the "location" buffer
336 constant.
337 * bfd-in2.h: Re-generate.
338
339 2003-10-30 Andrew Cagney <cagney@redhat.com>
340
341 * syms.c: Replace "struct symbol_cache_entry" with "struct
342 bfd_symbol".
343 * vms.h, targets.c, section.c, reloc.c, peicode.h: Ditto.
344 * mipsbsd.c, elf.c, linker.c, elf-bfd.h, ecoff.c: Ditto.
345 * cpu-z8k.c, cpu-ns32k.c, cpu-h8500.c, bfd.c, bfd-in.h: Ditto.
346 * bfd-in2.h: Re-generate.
347
348 2003-10-30 Jakub Jelinek <jakub@redhat.com>
349
350 * elfxx-ia64.c: Include objalloc.h, hashtab.h.
351 (struct elfNN_ia64_local_hash_entry): Remove root. Add id and r_sym
352 fields.
353 (struct elfNN_ia64_local_hash_table): Remove.
354 (struct elfNN_ia64_link_hash_table): Change loc_hash_table's type
355 to htab_t. Add loc_hash_memory field.
356 (elfNN_ia64_local_hash_table_init, elfNN_ia64_new_loc_hash_entry):
357 Removed.
358 (elfNN_ia64_local_htab_hash, elfNN_ia64_local_htab_eq): New
359 functions.
360 (elfNN_ia64_hash_table_create): Use hashtab.h hashtable for
361 loc_hash_table. Initialize loc_hash_memory.
362 (elfNN_ia64_hash_table_free): New function.
363 (elfNN_ia64_local_hash_lookup): Remove.
364 (elfNN_ia64_local_dyn_sym_thunk): Change into htab_traverse
365 callback.
366 (elfNN_ia64_dyn_sym_traverse): Use htab_traverse.
367 (get_local_sym_hash): Use hashtab.h hashtable for loc_hash_table.
368 (bfd_elfNN_bfd_link_hash_table_free): Define.
369
370 2003-10-30 Alan Modra <amodra@bigpond.net.au>
371
372 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Modify versioned
373 symbol string in place.
374
375 2003-10-30 Jim Blandy <jimb@redhat.com>
376
377 * cpu-rs6000.c (rs6000_compatible): Check the correct arch_info
378 object's mach field: all PowerPC machines are supersets of the
379 original rs6000, but not later rs6000 machines.
380
381 2003-10-30 Alan Modra <amodra@bigpond.net.au>
382
383 * dwarf2.c (struct attribute): Delete "unsnd", "snd" and "addr".
384 Add "val" and "sval" fields.
385 (DW_STRING, DW_UNSND, DW_BLOCK, DW_SND, DW_ADDR): Delete.
386 (read_attribute_value): Expand and adjust DW_* occurrences.
387 (scan_unit_for_functions, parse_comp_unit): Likewise.
388
389 2003-10-30 Phil Edwards <phil@codesourcery.com>
390
391 * config.bfd (arm-*-vxworks): Remove separate stanza; merge with
392 other common ELF triples.
393 (i[3-7]86-*-vxworks): Change to ELF format.
394 (mips*-*-windiss): New triple, add to common MIPS/ELF stanza.
395 (sh-*-vxworks): New stanza.
396
397 2003-10-30 Lars Knoll <lars@trolltech.com>
398 Michael Matz <matz@suse.de>
399 Jakub Jelinek <jakub@redhat.com>
400 Alan Modra <amodra@bigpond.net.au>
401
402 * merge.c (struct sec_merge_sec_info): Update comment.
403 (struct sec_merge_hash_entry): Remove entsize.
404 (sec_merge_hash_lookup): Only adjust alignment when creating.
405 (sec_merge_emit): Remove register keyword.
406 (cmplengthentry, last4_eq, last_eq): Delete.
407 (strrevcmp, strrevcmp_align, is_suffix): New.
408 (merge_strings): Use them to implement fast suffix merging.
409 * elf-strtab.c (struct elf_strtab_hash_entry): Update comments.
410 Make "len" signed.
411 (_bfd_elf_strtab_add): Lose on >2G strings.
412 (_bfd_elf_strtab_emit): Don't emit strings with len < 0.
413 (cmplengthentry, last4_eq): Delete.
414 (strrevcmp, is_suffix): New.
415 (_bfd_elf_strtab_finalize): Rework to implement fast suffix merging.
416
417 2003-10-29 Daniel Jacobowitz <drow@mvista.com>
418
419 * elf32-arm.h (elf32_arm_final_link_relocate): Move check for
420 SEC_ALLOC.
421
422 2003-10-29 Philip Blundell <philb@gnu.org>
423
424 * elf32-arm.h (elf32_arm_plt0_entry, elf32_arm_plt_entry): New
425 code sequence.
426 (PLT_HEADER_SIZE): New.
427 (struct elf32_arm_pcrel_relocs_copied): Rename to ...
428 (struct elf32_arm_relocs_copied): ... this. Count both
429 pcrel and non-pcrel relocs. All uses updated.
430 (struct elf32_arm_link_hash_table): Add pointers to dynamic linker
431 sections and symbol/section mapping cache.
432 (create_got_section): New.
433 (elf32_arm_create_dynamic_sections): New.
434 (elf_backend_create_dynamic_sections): Use it.
435 (elf32_arm_final_link_relocate): Support garbage collection of relocs.
436 (elf32_arm_check_relocs): Likewise.
437 (elf32_arm_adjust_dynamic_symbol): Likewise.
438 (elf32_arm_copy_indirect_symbol): New.
439 (elf32_arm_link_hash_table_create): Initialise new fields.
440 (elf32_arm_gc_sweep_hook): Implement.
441 (elf32_arm_discard_copies): Delete.
442 (elf32_arm_finish_dynamic_symbol): Use new PLT code.
443 (elf32_arm_finish_dynamic_sections): Likewise.
444 (elf_backend_can_refcount): Define.
445 (elf_backend_copy_indirect_symbol): Likewise.
446 (elf_backend_plt_header_size): Set to PLT_HEADER_SIZE.
447
448 2003-10-29 Alan Modra <amodra@bigpond.net.au>
449
450 * elf64-ppc.c (elf_backend_grok_prstatus): Define.
451 (elf_backend_grok_psinfo): Define.
452 (ppc64_elf_grok_prstatus, ppc64_elf_grok_psinfo): New functions.
453
454 * elf.c (_bfd_elfcore_make_pseudosection): Allow multiple
455 sections with the same name.
456 (elfcore_grok_lwpstatus): Likewise.
457 (elfcore_grok_win32pstatus): Likewise.
458 (elfcore_grok_note): Likewise.
459 (elfcore_grok_nto_status): Likewise.
460 (elfcore_grok_nto_gregs): Likewise.
461
462 2003-10-27 Daniel Jacobowitz <drow@mvista.com>
463
464 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Never skip dynamic
465 objects.
466
467 2003-10-14 Richard Sandiford <rsandifo@redhat.com>
468
469 * elfxx-mips.c (mips_elf_create_got_section): Initialize global_gotno.
470
471 2003-10-24 H.J. Lu <hongjiu.lu@intel.com>
472
473 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Look up
474 hash table for real symbols.
475
476 2003-10-23 Michael Snyder <msnyder@redhat.com>
477
478 * section.c (asection): Fix typo in comment.
479
480 2003-10-23 Alan Modra <amodra@bigpond.net.au>
481
482 * elf64-ppc.c (get_tls_mask): Add toc_symndx param, save toc
483 reloc symbol index to it. Don't allow gd syms in shared libs
484 to be optimized.
485 (ppc64_elf_tls_optimize): Adjust get_tls_mask call.
486 (ppc64_elf_size_stubs): Likewise.
487 (ppc64_elf_relocate_section): Check that tls relocs are only used
488 with tls syms, and similarly for non-tls. Correct symbol used
489 when optimizing toc tls code.
490
491 2003-10-22 Nick Clifton <nickc@redhat.com>
492
493 * peicode.h (coff_swap_scnhdr_in): Only remove padding when
494 processing an executable.
495
496 2003-10-22 Jakub Jelinek <jakub@redhat.com>
497
498 * elflink.c (_bfd_elf_export_symbol): Adjust for globals and locals
499 field changes.
500 (_bfd_elf_link_assign_sym_version): Likewise.
501 * elflink.h (size_dynamic_sections): Likewise.
502
503 2003-10-21 Alexandre Oliva <aoliva@redhat.com>,
504 Michael Snyder <msnyder@redhat.com>
505
506 * archures.c (bfd_mach_sh4a, bfd_mach_sh4al_dsp, bfd_mach_sh4_nofpu,
507 bfd_mach_sh4a_nofpu): New machine types.
508 * bfd-in2.h: Rebuilt.
509 * cpu-sh.c (compatible): Remove unused function.
510 (SH4A_NEXT, SH4AL_DSP_NEXT, SH4_NOFPU_NEXT, SH4A_NOFPU_NEXT): New.
511 (arch_info_struct): Add sh4a, sh4al_dsp, sh4-nofpu and sh4a-nofpu.
512 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle them.
513
514 2003-10-21 Wouter van Heyst <wouter@vidicode.nl>
515
516 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Correct text
517 describing mismatched formats involving the Maverick FP type.
518
519 2003-10-21 Anil Paranjpe <anilp1@KPITCummins.com>
520
521 * binary.c (binary_object_p): Pass machine flag along with
522 architecture.
523
524 2003-10-21 Thorsten Brehm <brehm@gmx.net>
525
526 * archures.c (bfd_default_scan): Add support for mcf528x.
527 * ieee.c (ieee_write_processor): Likewise.
528
529 2003-10-21 Peter Barada <pbarada@mail.wm.sps.mot.com>
530 Bernardo Innocenti <bernie@develer.com>
531
532 * archures.c: Add MCF528x (MCFv4) support.
533 * bfd/cpu-m68k.c (arch_info_struct): Likewise.
534 * bfd-in2.h: Regenerate.
535
536 2003-10-20 Andrew Cagney <cagney@redhat.com>
537
538 * targets.c: Replace "struct sec" with "struct bfd_section"
539 * syms.c, sparclynx.c, section.c, opncls.c: Ditto.
540 * libcoff-in.h, libbfd-in.h, elfxx-target.h: Ditto.
541 * elf.c, coffgen.c, bfd.c, bfd-in.h, aoutf1.h: Ditto.
542 * aout-tic30.c, aout-target.h:
543 * bfd-in2.h, libcoff.h, libbfd.h: Regenerate.
544
545 2003-10-18 Hans-Peter Nilsson <hp@bitrange.com>
546
547 Support linker relaxation of new R_MMIX_PUSHJ_STUBBABLE relocs.
548 * elf64-mmix.c (MAX_PUSHJ_STUB_SIZE): New macro.
549 (struct _mmix_elf_section_data): New member pjs.
550 (mmix_set_relaxable_size, mmix_elf_get_section_contents): New
551 functions.
552 (elf_mmix_howto_table): New entry for R_MMIX_PUSHJ_STUBBABLE.
553 (mmix_reloc_map): Ditto.
554 (mmix_elf_relocate_section): Handle R_MMIX_PUSHJ_STUBBABLE.
555 (mmix_final_link_relocate, mmix_elf_check_common_relocs): Ditto.
556 (mmix_elf_perform_relocation): Ditto. Don't mark parameter addr
557 unused.
558 (mmix_elf_check_relocs): Move early return to after
559 mmix_elf_check_common_relocs call.
560 (mmix_elf_symbol_processing): Fix cut-and-pasto in head comment.
561 (_bfd_mmix_before_linker_allocation): Rename from
562 _bfd_mmix_prepare_linker_allocated_gregs. All referers changed.
563 Arrange to set the initial relaxable size of sections.
564 (_bfd_mmix_after_linker_allocation): Rename from
565 _bfd_mmix_finalize_linker_allocated_gregs.
566 (mmix_elf_relax_section): Relax a R_MMIX_PUSHJ_STUBBABLE reloc.
567 (bfd_elf64_get_section_contents): Define.
568 * reloc.c: Add ENUMX for BFD_RELOC_MMIX_PUSHJ_STUBBABLE.
569 * libbfd.h, bfd-in2.h: Regenerate.
570
571 * reloc.c (bfd_generic_relax_section): Default-set
572 section->_cooked_size here.
573 (bfd_generic_get_relocated_section_contents): Don't set it here.
574 Explain why.
575
576 2003-10-17 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
577
578 * elf32-hppa.c (elf32_hppa_relocate_section): Skip relocation if
579 output section has been discarded.
580
581 2003-10-17 Shrinivas Atre <shrinivasa@KPITCummins.com>
582
583 * coff-h8300.c (funcvec_hash_newfunc): Handle normal mode.
584 (h8300_reloc16_extra_cases): Likewise.
585 (h8300_bfd_link_add_symbols): Likewise.
586
587 2003-10-17 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
588
589 * cpu-h8300.c (h8300sxn_info_struct): Correct address size.
590 (h8300sn_info_struct): Likewise.
591 (h8300hn_info_struct): Likewise.
592
593 2003-10-16 Pavel Roskin <proski@gnu.org>
594
595 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Don't calculate image size
596 for sections which lack size info.
597
598 2003-10-17 Danny Smith <dannysmith@users.sourceforge.net>
599
600 * configure.host: Add __USE_MINGW_FSEEK to HDEFINES for
601 mingw32.
602
603 2003-10-16 H.J. Lu <hongjiu.lu@intel.com>
604
605 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Also warn
606 undefined patterns with '*'.
607
608 2003-10-16 H.J. Lu <hongjiu.lu@intel.com>
609
610 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't
611 use the last CIE from a different section.
612 (_bfd_elf_write_section_eh_frame): Don't pad beyond the raw
613 size of the output section.
614
615 2003-10-07 Roland McGrath <roland@redhat.com>
616
617 * elf.c (_bfd_elf_make_section_from_phdr): Set alignment_power of
618 new section from p_align header field.
619
620 2003-10-16 H.J. Lu <hongjiu.lu@intel.com>
621
622 * elf32-xtensa.c (xtensa_read_table_entries): The external size
623 of entry is 8 bytes.
624
625 2003-10-15 Andrew Cagney <cagney@redhat.com>
626
627 * targets.c (BFD_JUMP_TABLE_SYMBOLS): Replace NAME##_get_symtab
628 with NAME##_canonicalize_symtab.
629 * libcoff-in.h (coff_canonicalize_symtab): Update.
630 * xsym.h (bfd_sym_canonicalize_symtab): Update.
631 * elf-bfd.h (_bfd_elf_canonicalize_symtab): Update.
632 * coffgen.c (coff_canonicalize_symtab): Update.
633 * libbfd-in.h (_bfd_nosymbols_canonicalize_symtab): Update.
634 * libnlm.h (nlmNAME(canonicalize_symtab)): Update.
635 * ieee.c (ieee_vec): Update comment.
636 * libecoff.h (_bfd_ecoff_canonicalize_symtab): Update.
637 * mmo.c (mmo_canonicalize_symtab): Update.
638 * nlm-target.h (nlm_canonicalize_symtab): Update.
639 * nlmcode.h (nlm_canonicalize_symtab): Update.
640 * i386msdos.c (msdos_canonicalize_symtab): Update.
641 * hp300hpux.c (MY (canonicalize_symtab)): Update.
642 * oasys.c (oasys_canonicalize_symtab): Update.
643 * som.c (som_canonicalize_symtab): Update.
644 * pef.c (bfd_pef_canonicalize_symtab): Update.
645 * nlmcode.h (nlm_canonicalize_symtab): Update.
646 * xsym.c (bfd_sym_canonicalize_symtab): Update.
647 * vms.c (vms_canonicalize_symtab): Update.
648 * versados.c (versados_canonicalize_symtab): Update.
649 * mach-o.c (bfd_mach_o_canonicalize_symtab): Update.
650 * ieee.c (ieee_canonicalize_symtab): Update.
651 * pdp11.c (NAME(aout,canonicalize_symtab)): Update.
652 * reloc.c: Update comment.
653 * libaout.h (NAME(aout,canonicalize_symtab)): Update.
654 * coff64-rs6000.c (aix5coff64_vec): Update.
655 * coff64-rs6000.c (bfd_xcoff_aix5_backend_data): Update.
656 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update.
657 * aoutx.h (NAME(aout,canonicalize_symtab)): Update.
658 * elfxx-target.h (bfd_elfNN_canonicalize_symtab): Update.
659 * hp300hpux.c (MY_canonicalize_symtab): Update.
660 * ecoff.c (_bfd_ecoff_canonicalize_symtab): Update.
661 * aout-tic30.c (MY_canonicalize_symtab): Update.
662 * aout-target.h (MY_canonicalize_symtab): Update.
663 * ppcboot.c (ppcboot_canonicalize_symtab): Update.
664 * elf.c (_bfd_elf_canonicalize_symtab): Update.
665 * elfcode.h (elf_canonicalize_symtab): Update.
666 * ihex.c (ihex_canonicalize_symtab): Update.
667 * tekhex.c (tekhex_canonicalize_symtab): Update.
668 * binary.c (binary_canonicalize_symtab): Update.
669 * srec.c (srec_canonicalize_symtab): Update.
670
671 2003-10-15 Kazu Hirata <kazu@cs.umass.edu>
672
673 * elf32-h8300.c (elf_reloc_map): Fix a comment typo.
674
675 2003-10-15 Kaz Kojima <kkojima@rr.iij4u.or.jp>
676
677 * elf32-sh.c (sh_elf_relocate_section): Handle R_SH_IMM_*_PCREL
678 relocations.
679 (sh_elf_check_relocs): Likewise.
680
681 * elf32-sh64.c (elf_backend_merge_symbol_attribute): Define.
682 (sh64_elf_merge_symbol_attribute): New.
683 * elf64-sh64.c (elf_backend_merge_symbol_attribute): Define.
684 (sh64_elf64_merge_symbol_attribute): New.
685
686 2003-10-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
687
688 * elf-bfd.h (struct elf_backend_data): New function pointer member
689 elf_backend_merge_symbol_attribute.
690 * elflink.h (elf_link_add_object_symbols): Adjust call to
691 elf_backend_merge_symbol_attribute if the backend defined it.
692 * elfxx-target.h (elf_backend_merge_symbol_attribute): New macro.
693 (elfNN_bed): Add that to the initializer.
694
695 2003-10-14 Bob Wilson <bob.wilson@acm.org>
696
697 * elf32-xtensa.c (get_is_linkonce_section): Delete.
698 (xtensa_is_property_section, xtensa_is_littable_section): Use
699 XTENSA_INSN_SEC_NAME and XTENSA_LIT_SEC_NAME macros. Do not recognize
700 linkonce sections containing ".xt.insn" and ".xt.lit" substrings.
701 (xtensa_get_property_section_name): Check section name instead of
702 calling get_is_linkonce_section. Remove unused bfd parameter. Use
703 XTENSA_INSN_SEC_NAME and XTENSA_LIT_SEC_NAME macros. Never generate
704 linkonce section names by appending ".xt.insn" or ".xt.lit".
705 (xtensa_read_table_entries): Remove bfd argument in call to
706 xtensa_get_property_section_name. Free section name when done.
707 (elf_xtensa_combine_prop_entries): Free leaking table.
708
709 2003-10-13 Richard Sandiford <rsandifo@redht.com>
710
711 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Don't add
712 DT_MIPS_LIBLIST or DT_MIPS_CONFLICT entries.
713 (_bfd_mips_elf_finish_dynamic_symbol): Don't handle them. Don't
714 handle DT_MIPS_MSYM. Set DT_RELSZ based on the number of relocations
715 that were needed.
716 (_bfd_mips_elf_modify_segment_map): Fix placement of PT_MIPS_OPTIONS.
717 (_bfd_mips_elf_merge_private_bfd_data): Ignore EF_MIPS_UCODE.
718
719 2003-10-13 H.J. Lu <hongjiu.lu@intel.com>
720
721 * bfd-in.h (bfd_elf32_ia64_after_parse): New prototype.
722 (bfd_elf64_ia64_after_parse): Likewise.
723 * bfd-in2.h: Regenerated.
724
725 * elfxx-ia64.c (oor_ip): New.
726 (oor_branch_size): Likewise.
727 (bfd_elfNN_ia64_after_parse): Likewise.
728 (elfNN_ia64_relax_section): Use oor_ip if oor_branch_size
729 equals sizeof (oor_ip).
730
731 2003-10-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
732
733 * elf64-sh64.c (sh_elf64_relocate_section): Tidy up for the
734 renumbering of some relocation numbers.
735
736 2003-10-11 Alan Modra <amodra@bigpond.net.au>
737
738 * coff-sh.c: Move definition of MAP and guard more code with
739 COFF_IMAGE_WITH_PE.
740
741 * section.c (bfd_get_section_size_before_reloc): Ignore reloc_done.
742 * bfd-in2.h: Regenerate.
743
744 2003-10-10 H.J. Lu <hongjiu.lu@intel.com>
745
746 * Makefile.am: Run "make dep-am".
747 * Makefile.in: Regenerate.
748 * doc/Makefile.in: Likewise.
749
750 2003-10-09 H.J. Lu <hongjiu.lu@intel.com>
751
752 * cofflink.c: Include "safe-ctype.h".
753 (coff_link_add_symbols): Use ISDIGIT instead of isdigit.
754
755 2003-10-08 Dave Brolley <brolley@redhat.com>
756 On behalf of Michael Snyder <msnyder@redhat.com>
757
758 * archures.c: Add FRV fr550 machine.
759 * cpu-frv.c: Ditto.
760 * elf32-frv.c: Ditto.
761 * bfd-in2.h: Regenerate.
762
763 2003-10-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
764
765 * elfxx-mips.c (STUB_MOVE,STUB_LI16): Fix stub code
766 for non-SGI N64 ABI. Improve code consitency.
767
768 2003-10-07 Alexandre Oliva <aoliva@redhat.com>
769
770 * elf32-frv.c (elf32_frv_howto_table): Set R_FRV_LABEL16's
771 rightshift to 2.
772
773 2003-10-07 Nathan Sidwell <nathan@codesourcery.com>
774
775 * libbfd-in.h (_bfd_link_section_stabs): Add string offset
776 parameter.
777 * cofflink.c (coff_link_add_symbols): Deal with split stab
778 sections.
779 * elflink.h (elf_link_add_object_symbols): Deal with split stab
780 sections.
781 * stabs.c (_bfd_link_section_stabs): Add string offset parameter.
782 * libbfd.h: Regenerated.
783
784 * coffcode.h (coff_set_alignment_hook): With PE_COFF reloc
785 overflow, set reloc start position to after the count
786 reloc. Subtract one from num relocs. Give error on 0xffff relocs
787 and no overflow.
788 * cofflink.c (_bfd_coff_final_link): Deal with PE_COFF reloc
789 overflow.
790 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Do overflow if >=
791 0xffff.
792
793 2003-10-06 H.J. Lu <hongjiu.lu@intel.com>
794
795 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Pad the
796 last CIE/FDE if needed.
797
798 2003-10-06 Nick Clifton <nickc@redhat.com>
799
800 * targets.c (_bfd_target_vector): Include bfd_elf64_sparc_vec if
801 BFD64 is enabled.
802
803 2003-10-06 Matt Thomas <matt@3am-software.com>
804
805 * config.bfd: Move the hppa*-*-netbsd* case to the hppa*-*-linux* case.
806
807 2003-10-06 Robert Millan <robertmh@gnu.org>
808
809 * configure.in: Match GNU/KNetBSD with new knetbsd*-gnu triplet.
810 * config.bfd: Likewise.
811 * configure: Regenerate.
812
813 2003-10-04 Christian Groessler <chris@groessler.org>
814
815 * coff-z8k.c (extra_case): Fix displacement length check for R_JR
816 and R_CALLR.
817
818 2003-10-04 Stephane Carrez <stcarrez@nerim.fr>
819
820 * elf32-m68hc1x.c: Update to ISO C90; replace PTR with void*.
821 * elf32-m68hc11.c: Likewise.
822 * elf32-m68hc12.c: Likewise.
823 * elf32-m68hc1x.h: Likewise.
824
825 2003-10-04 Stephane Carrez <stcarrez@nerim.fr>
826
827 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Fix merge
828 of flags between HC12 and HCS12.
829
830 2003-10-04 Bryce McKinlay <bryce@mckinlay.net.nz>
831
832 * merge.c (_bfd_merge_sections): Set SEC_EXCLUDE flag on sections
833 which become empty after merging.
834
835 2003-09-30 Jakub Jelinek <jakub@redhat.com>
836
837 * elfxx-ia64.c (ia64_howto_table): Fix size of R_IA64_TPREL64[LM]SB,
838 R_IA64_DTPREL{32,64}[LM]SB and R_IA64_DTPMOD64[LM]SB.
839
840 2003-09-30 Chris Demetriou <cgd@broadcom.com>
841
842 * archures.c (bfd_mach_mipsisa64r2): New define.
843 * bfd-in2.h: Regenerate.
844 * aoutx.h (NAME(aout,machine_type)): Handle bfd_mach_mipsisa64r2.
845 * cpu-mips.c (I_mipsisa64r2): New enum value.
846 (arch_info_struct): Add entry for I_mipsisa64r2.
847 * elfxx-mips.c (_bfd_elf_mips_mach)
848 (_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_64R2.
849 (mips_set_isa_flags): Add bfd_mach_mipsisa64r2 case.
850 (mips_mach_extensions): Add entry for bfd_mach_mipsisa64r2.
851
852 2003-09-29 H.J. Lu <hongjiu.lu@intel.com>
853
854 * elfxx-ia64.c (elfNN_hpux_backend_symbol_processing): New.
855 Handle SHN_IA_64_ANSI_COMMON.
856 (elf_backend_section_from_bfd_section): Defined.
857
858 2003-09-26 H.J. Lu <hongjiu.lu@intel.com>
859
860 * elflink.c (elf_link_read_relocs_from_section): Add an argument
861 of a pointer to section. Check bad symbol index.
862 (_bfd_elf_link_read_relocs): Modify calls to
863 elf_link_read_relocs_from_section.
864
865 2003-09-23 DJ Delorie <dj@redhat.com>
866
867 * elf32-sh.c (sh_elf_howto_table): R_SH_SWITCH8,
868 R_SH_GNU_VTINHERIT, R_SH_GNU_VTENTRY,
869 R_SH_LOOP_START,R_SH_LOOP_END moved to "reserved" spaces,
870 R_SH_DIR16, R_SH_DIR8, R_SH_DIR8UL, R_SH_DIR8UW, R_SH_DIR8U,
871 R_SH_DIR8SW, R_SH_DIR8S, R_SH_DIR4UL, R_SH_DIR4UW, R_SH_DIR4U,
872 R_SH_PSHA, R_SH_PSHL added.
873 (sh_reloc_map): Add R_SH_DIR16 and R_SH_DIR8.
874 (sh_elf_relocate_section): Support new relocs.
875
876 2003-09-23 Bob Wilson <bob.wilson@acm.org>
877
878 * elf32-xtensa.c (elf_xtensa_relocate_section): Fix typo that clobbered
879 dynamic relocation offsets.
880
881 2003-09-23 Alan Modra <amodra@bigpond.net.au>
882
883 * simple.c (bfd_simple_get_relocated_section_contents): Free the
884 hash table using _bfd_generic_link_hash_table_free.
885
886 2003-09-23 Alan Modra <amodra@bigpond.net.au>
887
888 * elf-bfd.h (struct bfd_elf_special_section): Remove "suffix". Change
889 type of prefix_length and suffix_length to int. Rename "attributes"
890 to "attr". Comment.
891 (_bfd_elf_get_sec_type_attr): Update prototype.
892 * elf.c (get_special_section): Rewrite.
893 (_bfd_elf_get_sec_type_attr): Return struct rather than passing in
894 attr and type pointers.
895 (_bfd_elf_new_section_hook): Adjust for above.
896 (special_sections): Merge suffix with prefix. Set
897 prefix_length for all entries. Set suffix_length appropriately.
898 * elf32-m32r.c (m32r_elf_special_sections): Likewise.
899 * elf32-m68hc11.c (elf32_m68hc11_special_sections): Likewise.
900 * elf32-m68hc12.c (elf32_m68hc12_special_sections): Likewise.
901 * elf32-mcore.c (mcore_elf_special_sections): Likewise.
902 * elf32-sh64.c (sh64_elf_special_sections): Likewise.
903 * elf32-v850.c (v850_elf_special_sections): Likewise.
904 * elf32-xtensa.c (elf_xtensa_special_sections): Likewise.
905 * elf64-alpha.c (elf64_alpha_special_sections): Likewise.
906 * elf64-hppa.c (elf64_hppa_special_sections): Likewise.
907 * elf64-ppc.c (ppc64_elf_special_sections): Likewise.
908 * elf64-sh64.c (sh64_elf64_special_sections): Likewise.
909 * elfxx-ia64.c (elfNN_ia64_special_sections): Likewise.
910 * elfxx-mips.c (_bfd_mips_elf_special_sections): Likewise.
911 * elf32-ppc.c (ppc_elf_special_sections): Likewise. Fix .plt flags.
912
913 2003-09-21 Daniel Jacobowitz <drow@mvista.com>
914
915 * elf64-alpha.c (elf64_alpha_create_got_section): Initialize
916 ->got if the section already exists.
917
918 2003-09-19 Nathan Sidwell <nathan@codesourcery.com>
919
920 * dwarf2.c (decode_line_info): Cope with an initially empty
921 filename table.
922
923 2003-09-18 H.J. Lu <hongjiu.lu@intel.com>
924
925 * acinclude.m4: Include ../config/accross.m4.
926 * aclocal.m4: Regenerated.
927
928 * configure.host (HOST_64BIT_TYPE): Remove if it is set to long
929 or long long.
930 (HOST_U_64BIT_TYPE): Remove if it is set to unsigned long long.
931 (host64): Remove if HOST_64BIT_TYPE is set to long.
932
933 * configure.in (HOST_64BIT_TYPE): Set according to the size of
934 long and long long.
935 (HOST_U_64BIT_TYPE): Likewise.
936 (host64): Likewise.
937 * configure: Regenerated.
938
939 2003-09-19 Alan Modra <amodra@bigpond.net.au>
940
941 * elf.c (elfcore_write_note): Don't use sizeof(Elf_External_note)
942 since some ABIs round up the size of the struct.
943
944 2003-09-18 H.J. Lu <hongjiu.lu@intel.com>
945
946 * elflink.c (_bfd_elf_merge_symbol): Allow type change if
947 the old symbol is undefined and the new symbol is defined.
948
949 2003-09-18 Andreas Schwab <schwab@suse.de>
950
951 * simple.c (bfd_simple_get_relocated_section_contents): Use
952 _bfd_generic_link_hash_table_create instead of
953 bfd_link_hash_table_create.
954
955 2003-09-10 H.J. Lu <hongjiu.lu@intel.com>
956
957 * elfxx-ia64.c (elfNN_ia64_special_sections): Mark all sections
958 started with ".sbss" or "".sdata" as SHF_IA_64_SHORT.
959
960 2003-09-10 John David Anglin <dave.anglin@nrc-cnrc.nrc.ca>
961 Randolph Chung <randolph@tausq.org>
962
963 * elf32-hppa.c (struct elf32_hppa_link_hash_entry,
964 hppa_link_hash_newfunc, hppa_build_one_stub,
965 elf32_hppa_adjust_dynamic_symbol, mark_PIC_calls, allocate_plt_static,
966 allocate_dynrelocs, elf32_hppa_size_dynamic_sections,
967 elf32_hppa_finish_dynamic_symbol): Remove pic_call field and all code
968 for generating import stubs for calls to statically linked PIC
969 functions.
970 (hppa_type_of_stub): Don't generate an import stub for calls to
971 statically linked pic functions. Generate import stubs for calls
972 in a shared object, to functions not in a regular file, and to
973 defined weak functions. Add new argument INFO.
974 (hppa_build_one_stub): Don't undef ADDIL_DP.
975 (elf32_hppa_check_relocs): Don't set SEC_HAS_GOT_REF flag.
976 (elf32_hppa_size_stubs): Pass info to hppa_type_of_stub.
977 (final_link_relocate): Change all DLTIND relocs to DPREL relocs in a
978 non-shared link. Convert instructions that use the the linkage table
979 pointer, or a facsimile thereof, to use the global data pointer when
980 the reloc has been changed.
981
982 2003-09-08 Joel Brobecker <brobecker@gnat.com>
983
984 * archures.c: Add new machine names for hppa.
985 * bfd-in2.h: Regenerate.
986 * cpu-hppa.c: Use the new machine names.
987
988 2003-09-06 Stephane Carrez <stcarrez@nerim.fr>
989
990 * elf32-m68hc1x.h (struct m68hc11_elf_link_hash_table): Remove
991 all_local_syms member.
992 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Use bfd_elf_get_elf_syms
993 to get the local symbols.
994
995 2003-09-06 Stephane Carrez <stcarrez@nerim.fr>
996
997 * elf32-m68hc12.c (elf32_m68hc12_special_sections): New for hc11.
998 (elf_backend_special_sections): Define.a
999
1000 PR savannah/4950:
1001 * elf32-m68hc11.c (elf32_m68hc11_special_sections): The .vectors
1002 section is read-only.
1003
1004 2003-09-04 Nick Clifton <nickc@redhat.com>
1005
1006 * archures.c (bfd_mach_v850e1): Define.
1007 * bfd-in2.h: Regenerate.
1008 * cpu-v850.h (scan): Accept bfd_mach_v850e1.
1009 (arch_info_struct): Include an entry for bfd_mach_v850e1.
1010 * elf32-v850.c (v850_elf_object_p): Accept E_V850E1_ARCH flag.
1011 (v850_elf_final_write_processing): Accept bfd_mach_v850e1.
1012 (v850_elf_print_private_bfd_data): Interpret E_V850E1_ARCH flag.
1013 (v850_elf_merge_private_bfd_data): Allow v850e1 binaries to be
1014 linked with v850e binaries. Mark the output as v850e.
1015
1016 2003-09-03 Nick Clifton <nickc@redhat.com>
1017
1018 * cofflink.c (_bfd_coff_link_input_bfd): Do not skip section
1019 symbols that are used in relocs.
1020
1021 2003-08-30 Robert Millan <robertmh@gnu.org>
1022
1023 * configure.in: Match GNU/KFreeBSD with new kfreebsd*-gnu triplet.
1024 * config.bfd: Likewise.
1025 * configure: Regenerate.
1026
1027 2003-08-31 Christian Groessler <chris@groessler.org>
1028
1029 * elf32-i860.c (i860_howto_pc26_reloc): Finish relocation here
1030 instead of returning bfd_reloc_continue.
1031
1032 2003-08-31 Andreas Jaeger <aj@suse.de>
1033
1034 * merge.c: Update to ISO C90.
1035
1036 2003-08-27 Ian Lance Taylor <ian@airs.com>
1037
1038 * configure.in: Check for strtoull.
1039 * bfd.c (bfd_scan_vma): Use strtoull when available.
1040 * configure, config.in: Regenerate.
1041
1042 * configure.in: Define and substitute BFD_HOST_LONG_LONG.
1043 * bfd-in.h: Define BFD_HOST_LONG_LONG. Test it rather than
1044 __GNUC__ when deciding whether to use long long for
1045 BFD_HOST_64_BIT.
1046 * configure, Makefile.in, doc/Makefile.in, bfd-in2.h: Regenerate.
1047
1048 2003-08-27 Christian Groessler <chris@groessler.org>
1049
1050 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc,
1051 i860_howto_splitn_reloc, i860_howto_highadj_reloc): New
1052 functions.
1053 (elf32_i860_howto_table): Insert the new functions as
1054 'special_function's in the proper reloc type entries.
1055
1056 2003-08-27 Richard Sandiford <rsandifo@redhat.com>
1057
1058 * elf32-frv.c (elf32_frv_relocate_section): Use
1059 _bfd_elf_rela_local_sym.
1060
1061 2003-08-26 Michael Snyder <msnyder@redhat.com>
1062
1063 * cpu-frv.c: Remove unused enum.
1064
1065 2003-08-25 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
1066
1067 * reloc.c: Fix documentation for MIPS ELF relocations.
1068 libbfd.h: Regenerate.
1069 bfd-in2.h: Regenerate.
1070
1071 2003-08-24 Jason Eckhardt <jle@rice.edu>
1072
1073 * coff-i860.c (CALC_ADDEND): Define to be a no-op.
1074
1075 2003-08-24 Jason Eckhardt <jle@rice.edu>
1076
1077 * elf32-i860.c (elf32_i860_relocate_pc16): Subtract 4 and
1078 shift by 2 before storing the relocated value.
1079
1080 2003-08-23 Jason Eckhardt <jle@rice.edu>
1081
1082 * coff-i860.c (coff_i860_reloc_nyi): New function.
1083 (howto_table): Add entries for relocations PAIR, HIGHADJ, HIGH,
1084 LOWn, SPLITn, and BRADDR.
1085 (RTYPE2HOWTO): Check that the r_type is within the howto_table
1086 before trying to access the entry.
1087 (coff_i860_rtype_to_howto): Likewise.
1088 (coff_i860_reloc_type_lookup): New function.
1089 (i860_reloc_processing): New function.
1090 (coff_bfd_reloc_type_lookup): Define macro.
1091 (RELOC_PROCESSING): Define macro.
1092 Minor formatting adjustments.
1093
1094 2003-08-23 Alan Modra <amodra@bigpond.net.au>
1095
1096 * elflink.h (elf_link_add_object_symbols): Don't crash on NULL owner.
1097
1098 2003-08-22 H.J. Lu <hongjiu.lu@intel.com>
1099
1100 * elfxx-ia64.c (elfNN_ia64_create_dynamic_sections): Align the
1101 .got section at 8 bytes.
1102
1103 2003-08-21 Nick Clifton <nickc@redhat.com>
1104
1105 * cofflink.c: Update to ISO C90 and tidy up formatting.
1106
1107 2003-08-21 Randolph Chung <tausq@debian.org>
1108
1109 * elf32-hppa.c (elf32_hppa_object_p): For elf32-hppa-linux, objects
1110 can have OSABI=Linux or OSABI=SysV. Check for both.
1111 * elf64-hppa.c (elf64_hppa_object_p): Likewise.
1112
1113 2003-08-21 Nick Clifton <nickc@redhat.com>
1114
1115 * po/sv.po: Updated Swedish translation.
1116
1117 2003-08-20 Richard Sandiford <rsandifo@redhat.com>
1118
1119 * elf64-mips.c (elf_backend_copy_indirect_symbol): Define.
1120
1121 2003-08-20 Nick Clifton <nickc@redhat.com>
1122
1123 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): New macro used to
1124 replace some duplicated code in most elfxx-xxxx.c files. This
1125 version uses the new fields in bfd_link_info.
1126
1127 * elf-m10300.c (mn10300_elf_relocate_section): Use new macro.
1128 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
1129 * elf32-cris.c (cris_elf_relocate_section): Likewise.
1130 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
1131 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1132 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
1133 * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
1134 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1135 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1136 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1137 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1138 * elf32-vax.c (elf_vax_relocate_section): Likewise.
1139 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
1140 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
1141 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1142 * elf64-s390.c (elf_s390_relocate_section): Likewise.
1143 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1144 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1145 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
1146
1147 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols,
1148 elf_hppa_remark_useless_dynamic_symbols,
1149 elf_hppa_relocate_section): Use the new fields in
1150 bfd_link_info structure.
1151 * elf32-sh.c (sh_elf_relocate_section): Likewise.
1152 * elf64-alpha.c (elf64_alpha_check_relocs): Likewise.
1153 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
1154 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
1155 * elfxx-ia64.c (elfNN_ia64_check_relocs): Likewise.
1156 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
1157
1158 * elflink.h (elf_link_output_extsym): Fix test for reporting
1159 undefined symbols in shared libraries. Remove redundant test
1160 of shlib_undefined when reporting references to forced local
1161 symbols.
1162
1163 2003-08-18 Andreas Schwab <schwab@suse.de>
1164
1165 * libpei.h (bfd_pe_executable_p): Also recognize efi-app
1166 executables.
1167
1168 2003-08-17 Hans-Peter Nilsson <hp@bitrange.com>
1169
1170 * simple.c (bfd_simple_get_relocated_section_contents): Move
1171 reloc_done hack to before first bfd_section_size call. Change all
1172 returns to use new wrapper macro RETURN, restoring sec->reloc_done.
1173
1174 2003-08-16 Alan Modra <amodra@bigpond.net.au>
1175
1176 * elf64-ppc.c: Don't include elf/ppc.h.
1177
1178 2003-08-14 Richard Sandiford <rsandifo@redhat.com>
1179
1180 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Fix PT_DYNAMIC
1181 code to work with 64-bit bfds.
1182
1183 2003-08-14 Alan Modra <amodra@bigpond.net.au>
1184
1185 * dep-in.sed: Remove libintl.h.
1186 * Makefile.am (SRC-POTFILES.in, BLD-POTFILES.in): Unset LC_COLLATE.
1187 (POTFILES.in): Remove target.
1188 * Makefile.in: Regenerate.
1189
1190 2003-08-12 Alan Modra <amodra@bigpond.net.au>
1191
1192 * elf64-ppc.c (ppc64_elf_next_input_section): Update comment.
1193 (ppc64_elf_relocate_section): For zero sym R_PPC64_TOC relocs,
1194 use the function sym from the previous reloc.
1195
1196 2003-08-11 Jakub Jelinek <jakub@redhat.com>
1197
1198 * elf32-i386.c (elf_i386_relocate_section): Make undefined symbols
1199 fatal if -pie.
1200 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1201 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1202 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
1203 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1204 * elf64-s390.c (elf_s390_relocate_section): Likewise.
1205 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1206 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1207 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
1208 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1209 (ppc_elf_relocate_section) <case R_PPC_RELAX32>: Issue fatal error
1210 on undefined symbols if -pie.
1211 * elf32-sh.c (sh_elf_relocate_section): Likewise.
1212
1213 2003-08-11 Alan Modra <amodra@bigpond.net.au>
1214
1215 * elf64-ppc.c (ppc64_elf_relocate_section): Add special case for crt1.o
1216 branch to __libc_start_main.
1217
1218 2003-08-08 Dmitry Diky <diwil@mail.ru>
1219
1220 * archures.c: Add xW42 and xE42 parts. Sort MPU list according to
1221 gcc order.
1222 * cpu-msp430.c: Likewise.
1223 * elf32-msp430.c: Likewise.
1224 * bfd-in2.h: Regenerate.
1225
1226 2003-08-07 Alan Modra <amodra@bigpond.net.au>
1227
1228 * elfxx-target.h: Remove PTR cast.
1229 * targets.c (bfd_target): Make backend_data const void *.
1230 * elf-bfd.h: Constify all occurrences of struct elf_backend_data.
1231 * elf-m10300.c: Likewise.
1232 * elf.c: Likewise.
1233 * elf32-hppa.c: Likewise.
1234 * elf32-i386.c: Likewise.
1235 * elf32-m68hc1x.c: Likewise.
1236 * elf32-ppc.c: Likewise.
1237 * elf32-s390.c: Likewise.
1238 * elf32-sh.c: Likewise.
1239 * elf32-sh64.c: Likewise.
1240 * elf32-sparc.c: Likewise.
1241 * elf32-xtensa.c: Likewise.
1242 * elf64-mips.c: Likewise.
1243 * elf64-ppc.c: Likewise.
1244 * elf64-s390.c: Likewise.
1245 * elf64-sh64.c: Likewise.
1246 * elf64-sparc.c: Likewise.
1247 * elf64-x86-64.c: Likewise.
1248 * elfcode.h: Likewise.
1249 * elfcore.h: Likewise.
1250 * elflink.c: Likewise.
1251 * elflink.h: Likewise.
1252 * elfxx-ia64.c: Likewise.
1253 * elfxx-mips.c: Likewise.
1254 * elfxx-mips.h: Likewise.
1255 * elf.c (prep_headers): Remove useless check for null backend_data.
1256 * bfd-in2.h: Regenerate.
1257
1258 * elf-bfd.h: Remove PARAMS macro. Replace PTR with void *.
1259 (NAME): Use ## rather than CONCAT4 macro.
1260 * elfcode.h: Remove one remaining PARAMS macro.
1261 * elf-eh-frame.c: Convert to C90, remove unneeded casts and prototypes.
1262 * elf-strtab.c: Likewise.
1263 * elf-hppa.h: Likewise.
1264 * elf32-hppa.h: Likewise.
1265 * elf32-hppa.c: Likewise.
1266 (elf32_hppa_add_symbol_hook): Delete.
1267 (elf_backend_add_symbol_hook): Don't define.
1268 * libhppa.h: Convert to C90. Replace INLINE with inline.
1269
1270 2003-08-06 Alan Modra <amodra@bigpond.net.au>
1271
1272 * elf64-ppc.c (ppc_stub_name): Tweak names for better readability.
1273 (ppc64_elf_adjust_dynamic_symbol): Allow copy relocs against
1274 function descriptors, but warn.
1275 (ppc_build_one_stub): Remove a couple of vars. Move code creating
1276 stub syms so that we can avoid a stub sym if we already have a
1277 plt sym. Do not redefine an existing symbol.
1278 (ppc64_elf_build_stubs): When --emit-stub-syms, print a symbol for
1279 glink.
1280
1281 2003-08-06 Nick Clifton <nickc@redhat.com>
1282
1283 * po/fr.po: Updated French translation.
1284
1285 2003-08-06 Alan Modra <amodra@bigpond.net.au>
1286
1287 * elflink.c (_bfd_elf_create_dynamic_sections): Mark .dynbss with
1288 SEC_LINKER_CREATED.
1289
1290 2003-08-05 Daniel Jacobowitz <drow@mvista.com>
1291
1292 * elf32-arm.h (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
1293 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Use it.
1294
1295 2003-08-03 Jeff Muizelaar <muizelaar@rogers.com>
1296
1297 * coffcode.h (coff_slurp_line_table): Return with a warning
1298 message if the line number table could not be read.
1299
1300 2003-08-04 Nick Clifton <nickc@redhat.com>
1301
1302 * elflink.h (elf_link_add_object_symbols): Prepend "warning: "
1303 to messages produced for .gnu.warning.SYMBOL sections.
1304
1305 2003-08-04 Alan Modra <amodra@bigpond.net.au>
1306
1307 * elfcode.h: Convert to C90, remove unneeded casts and prototypes.
1308 * elfcore.h: Likewise.
1309 * elflink.c: Likewise.
1310 * elflink.h: Likewise.
1311 * elf.c (sym_is_global): Remove INLINE.
1312 (align_file_position): Replace INLINE with inline.
1313 * elfcode.h (elf_swap_dyn_in, elf_swap_dyn_out): Remove INLINE.
1314 (elf_file_p): Replace INLINE with inline.
1315
1316 2003-08-02 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1317
1318 * elf32-sh.c (sh_elf_check_relocs): Don't set DF_TEXTREL here.
1319
1320 2003-08-01 H.J. Lu <hongjiu.lu@intel.com>
1321
1322 * elfxx-ia64.c (get_got): Align the .got section at 8 bytes.
1323
1324 2003-08-01 H.J. Lu <hongjiu.lu@intel.com>
1325
1326 * elfxx-ia64.c (elfNN_ia64_finish_dynamic_symbol): Use
1327 ElfNN_External_Rela instead of Elf64_External_Rela.
1328
1329 2003-08-01 Nick Clifton <nickc@redhat.com>
1330
1331 * config.bfd: Add code to catch obsolete configurations and warn
1332 about them unless --enable-obsolete is used. Use this to mark
1333 vax-vms port as obsolete.
1334
1335 2003-07-30 Alan Modra <amodra@bigpond.net.au>
1336
1337 * elf32-ppc.c (ppc_elf_install_value): Tidy.
1338 (ppc_elf_relax_section): Remove dead code. Remove unnecessary casts.
1339 Formatting.
1340 * elfxx-target.h: Remove PARAMS macro. Formatting.
1341
1342 2003-07-30 Alan Modra <amodra@bigpond.net.au>
1343
1344 * elf.c (bfd_section_from_r_symndx): Test for SHN_UNDEF.
1345 * elf64-ppc.c (get_fdh): New function, split out from
1346 ppc64_elf_edit_opd.
1347 (ppc64_elf_check_relocs): Use get_fdh.
1348 (func_desc_adjust): Likewise. Tidy.
1349 (ppc64_elf_edit_opd): Tighten reloc checks. Free local_syms on error
1350 exit. Use get_fdh. Account for superfluous dynamic relocs.
1351 (ppc64_elf_relocate_section): Warning fix.
1352
1353 2003-07-30 Jason Eckhardt <jle@rice.edu>
1354
1355 * coff-i860.c: Convert to ISO C90. Remove superflous prototypes.
1356
1357 2003-07-30 Jason Eckhardt <jle@rice.edu>
1358
1359 * elf32-i860.c: Convert to ISO C90. Remove superflous prototypes.
1360
1361 2003-07-30 Randolph Chung <tausq@debian.org>
1362
1363 * elf-hppa.h (elf_hppa_relocate_section): Look up dyn_h for undefweak.
1364 * elf64-hppa.c (elf64_hppa_finalize_dlt): Check h->root.type.
1365
1366 2003-07-30 Alan Modra <amodra@bigpond.net.au>
1367
1368 * elf.c: Convert to C90, remove unnecessary prototypes and casts.
1369 Replace PTR with void *. Formatting.
1370 (_bfd_elf_assign_file_position_for_section): Remove INLINE.
1371 (make_mapping): Likewise.
1372
1373 2003-07-29 Alan Modra <amodra@bigpond.net.au>
1374
1375 * elf64-ppc.c (func_desc_adjust): Give linker created function
1376 descriptor symbols a size and type.
1377 (ppc64_elf_relocate_section): Correct lq insn test.
1378
1379 2003-07-28 Eric Christopher <echristo@redhat.com>
1380
1381 * elf32-ppc.c (R_PPC_RELAX32): New relocation.
1382 (ppc_elf_install_value): New function.
1383 (ppc_elf_sort_rela): Remove.
1384 (ppc_elf_relax_section): Rewrite. Remove old relaxation
1385 and replace with out of range branch stubs.
1386 (ppc_elf_relocate_section): Handle R_PPC_RELAX32.
1387
1388 2003-07-29 Alexandre Oliva <aoliva@redhat.com>
1389
1390 * elf-m10300.c (mn10300_elf_relax_section): Take symbol hash table
1391 from input_bfd.
1392
1393 2003-07-28 Alan Modra <amodra@bigpond.net.au>
1394
1395 * elf.c (special_sections): Set attributes for .got and .plt.
1396
1397 2003-07-27 Alan Modra <amodra@bigpond.net.au>
1398
1399 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Ensure no copy relocs
1400 on function descriptors.
1401 (ELIMINATE_COPY_RELOCS): Expand comment.
1402 (ppc64_elf_special_sections): Move. Don't include non-ppc64 sections.
1403 Do include ".toc1".
1404
1405 2003-07-25 H.J. Lu <hongjiu.lu@intel.com>
1406
1407 * elf.c (_bfd_elf_new_section_hook): Set the default section
1408 type to SHT_NULL.
1409 (elf_fake_sections): Set the section type based on asect->flags
1410 if it is SHT_NULL. Don't abort on processor specific section
1411 types.
1412
1413 2003-07-25 H.J. Lu <hongjiu.lu@intel.com>
1414
1415 * bfd-in2.h: Regenerated.
1416
1417 2003-07-25 H.J. Lu <hongjiu.lu@intel.com>
1418
1419 * elf-bfd.h (bfd_elf_special_section): New.
1420 (elf_backend_data): Add special_sections, a pointer to
1421 bfd_elf_special_section.
1422 (elf_section_type). New.
1423 (elf_section_flags): New.
1424 (_bfd_elf_get_sec_type_attr): New.
1425
1426 * elf.c (_bfd_elf_make_section_from_shdr): Always use the
1427 real section type/flags.
1428 (special_sections): New.
1429 (get_special_section): New.
1430 (_bfd_elf_get_sec_type_attr): New.
1431 (_bfd_elf_new_section_hook): Check special_section to set
1432 elf_section_type and elf_section_flags.
1433 (elf_fake_sections): Don't use section name to set ELF section
1434 data.
1435
1436 * elf32-m32r.c (m32r_elf_special_sections): New.
1437 (elf_backend_special_sections): Defined.
1438
1439 * elf32-m68hc11.c (elf32_m68hc11_special_sections): New.
1440 (elf_backend_special_sections): Defined.
1441
1442 * elf32-mcore.c (mcore_elf_special_sections): New.
1443 (elf_backend_special_sections): Defined.
1444
1445 * elf32-ppc.c (ppc_elf_special_sections): New.
1446 (elf_backend_special_sections): Defined.
1447
1448 * elf32-sh64.c (sh64_elf_special_sections): New.
1449 (elf_backend_special_sections): Defined.
1450
1451 * elf32-v850.c (v850_elf_special_sections): New.
1452 (elf_backend_special_sections): Defined.
1453
1454 * elf32-xtensa.c (elf_xtensa_special_sections): New.
1455 (elf_backend_special_sections): Defined.
1456
1457 * elf64-alpha.c (elf64_alpha_special_sections): New.
1458 (elf_backend_special_sections): Defined.
1459
1460 * elf64-hppa.c (elf64_hppa_special_sections): New.
1461 (elf_backend_special_sections): Defined.
1462
1463 * elf64-ppc.c (ppc64_elf_special_sections): New.
1464 (elf_backend_special_sections): Defined.
1465
1466 * elf64-sh64.c (sh64_elf64_special_sections): New.
1467 (elf_backend_special_sections): Defined.
1468
1469 * elfxx-ia64.c (elfNN_ia64_special_sections): New.
1470 (elf_backend_special_sections): Defined.
1471
1472 * elfxx-mips.c (_bfd_mips_elf_special_sections): New.
1473
1474 * elfxx-mips.h (_bfd_mips_elf_special_sections): New.
1475 (elf_backend_special_sections): Defined.
1476
1477 * elfxx-target.h (elf_backend_special_sections): New. Default
1478 to NULL.
1479 (elfNN_bed): Initialize special_sections.
1480
1481 * section.c (bfd_abs_section): Remove const.
1482 (bfd_und_section): Likewise.
1483 (bfd_com_section): Likewise.
1484 (bfd_ind_section): Likewise.
1485
1486 2003-07-24 Nick Clifton <nickc@redhat.com>
1487
1488 * coff-arm.c (EXTRA_S_FLAGS): Include SEC_CODE so that code
1489 sections are assigned the LOAD attribute.
1490
1491 2003-07-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1492
1493 * elf32-sh.c: Convert to C90. Replace PTR with void *.
1494 * elf32-sh64-com.c: Likewise.
1495 * elf32-sh64.c: Likewise.
1496 * elf32-sh64.h: Likewise.
1497 * elf64-sh64.c: Likewise.
1498
1499 2003-07-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1500
1501 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
1502 (allocate_dynrelocs): Likewise.
1503 (sh_elf_relocate_section): Likewise. Use SYMBOL_REFERENCES_LOCAL.
1504 (sh_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
1505
1506 2003-07-24 Nick Clifton <nickc@redhat.com>
1507
1508 * po/fr.po: Updated French translation.
1509
1510 2003-07-23 Bob Wilson <bob.wilson@acm.org>
1511
1512 * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Make inline and move
1513 near the beginning of the file. Swap order of arguments. Call
1514 _bfd_elf_dynamic_symbol_p with "ignore_protected" set to 0.
1515 (elf_xtensa_fix_refcounts): Adjust xtensa_elf_dynamic_symbol_p call.
1516 (elf_xtensa_relocate_section): Likewise.
1517 (shrink_dynamic_reloc_sections): Likewise.
1518
1519 2003-07-23 Bob Wilson <bob.wilson@acm.org>
1520
1521 * elf32-xtensa.c (plt_reloc_count): Fix typo in comment.
1522 (elf_xtensa_size_dynamic_sections): Use elf_discarded_section.
1523 (elf_xtensa_combine_prop_entries): Avoid returning non-zero without
1524 first printing an error message.
1525 (elf_xtensa_finish_dynamic_sections): Likewise.
1526 (elf_xtensa_discard_info_for_section): Adjust size of .got.loc when
1527 discarding literal table entries.
1528 (elf_xtensa_merge_private_bfd_data): Remove newline from error message.
1529 (elf_xtensa_do_asm_simplify): Likewise.
1530
1531 2003-07-23 Stephane Carrez <stcarrez@nerim.fr>
1532
1533 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Avoid crash when
1534 we have a local symbol in common section.
1535
1536 2003-07-22 H.J. Lu <hongjiu.lu@intel.com>
1537
1538 * elflink.c (_bfd_elf_dynamic_symbol_p): Don't return TRUE for
1539 weak symbols.
1540
1541 2003-07-22 Nick Clifton <nickc@redhat.com>
1542
1543 * coffcode.h (coff_slurp_symbol_table): Add C_TCSYM and C_ECOML to
1544 expected RS6000 storage classes.
1545
1546 2003-07-21 H.J. Lu <hongjiu.lu@intel.com>
1547
1548 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Mark
1549 output_bfd unused to silence gcc.
1550
1551 2003-07-21 Nick Clifton <nickc@redhat.com>
1552
1553 * po/sv.po: Updated Swedish translation.
1554
1555 2003-07-21 Alan Modra <amodra@bigpond.net.au>
1556
1557 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Use..
1558 (_bfd_elf_symbol_refs_local_p): ..this. Declare.
1559 * elflink.c (_bfd_elf_symbol_refs_local_p): New function.
1560 * elf32-i386.c (elf_i386_relocate_section): Remove h NULL test
1561 now done in _bfd_elf_symbol_refs_local_p.
1562 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1563 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1564 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1565
1566 2003-07-18 H.J. Lu <hongjiu.lu@intel.com>
1567
1568 * elflink.c (_bfd_elf_dynamic_symbol_p): Undo the last change.
1569
1570 2003-07-18 H.J. Lu <hongjiu.lu@intel.com>
1571
1572 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL): Fix a typo.
1573 (SYMBOL_CALLS_LOCAL): Likewise.
1574
1575 * elflink.c (_bfd_elf_dynamic_symbol_p): Return TRUE
1576 immediately if symbol isn't defined locally.
1577
1578 2003-07-18 Richard Henderson <rth@redhat.com>
1579
1580 * elflink.c (_bfd_elf_dynamic_symbol_p): New.
1581 * elf-bfd.h (_bfd_elf_dynamic_symbol_p): Declare it.
1582 (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Use it.
1583 * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Likewise.
1584 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
1585 * elf64-hppa.c (elf64_hppa_dynamic_symbol_p): Likewise.
1586 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Likewise.
1587 Update all callers to provide the relocation being resolved.
1588
1589 2003-07-17 Shaun Jackman <sjackman@pathwayconnect.com>
1590
1591 * config.bfd (arm-wince-pe): Add -DARM_COFF_BUGFIX to
1592 targ_cflags.
1593
1594 2003-07-17 Nick Clifton <nickc@redhat.com>
1595
1596 * po/es.po: New Spanish translation.
1597 * po/sv.po: New Swedish translation.
1598 * po/opcodes.pot: Regenerate.
1599
1600 2003-07-16 Richard Henderson <rth@redhat.com>
1601
1602 * config.bfd, configure.host, configure.in: Remove ia64-aix support.
1603 * elfxx-ia64.c, targets.c: Likewise.
1604
1605 2003-07-16 Richard Henderson <rth@redhat.com>
1606
1607 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Properly return false
1608 for symbols defined locally plus -Bsymbolic. Tidy logic.
1609
1610 2003-07-15 Richard Sandiford <rsandifo@redhat.com>
1611
1612 * archures.c (bfd_mach_mips7000): New.
1613 * bfd-in2.h: Regenerated.
1614 * cpu-mips.c (arch_info_struct): Add an entry for mips:7000.
1615 * elfxx-mips.c (mips_set_isa_flags): Handle bfd_mach_mips7000.
1616 (mips_mach_extensions): Add an entry for it.
1617
1618 2003-07-14 Nick Clifton <nickc@redhat.com>
1619
1620 * po/tr.po: Update with latest version.
1621 * po/SRC-POTFILES.in: Regenerate.
1622 * po/bfd.pot: Regenerate.
1623 * Makfile.in: Regenerate.
1624 * configure: Regenerate.
1625
1626 2003-07-12 Jeff Baker <jbaker@qnx.com>
1627
1628 * bfd/config.bfd (__QNXTARGET__): Define for Neutrino architectures.
1629 * bfd/elf32-arm.h (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1630 * bfd/elf32-sh.c (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1631 * bfd/elf32-ppc.c (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1632
1633 2003-07-12 Jeff Muizelaar <muizelaar@rogers.com>
1634
1635 * coffcode.h (coff_set_section_contents): Set the
1636 IMAGE_FILE_32BIT_MACHINE flag for PE targets.
1637
1638 2003-07-11 Richard Sandiford <rsandifo@redhat.com>
1639
1640 * bfd-in.h (bfd_h8300_pad_address): Declare.
1641 * bfd-in2.h: Regenerate.
1642 * cpu-h8300.c (bfd_h8300_pad_address): New function.
1643 * coff-h8300.c (h8300_reloc16_estimate): Use it to canonicalize
1644 addresses before checking whether they can be relaxed.
1645 (h8300_reloc16_extra_cases): Likewise for the R_MOVL2 sanity check.
1646 Don't complain about overflows in general 8-bit relocations.
1647 * elf32-h8300.c (elf32_h8_relax_section): Use bfd_h8300_pad_address.
1648 Fix handling of R_H8_DIR24A8.
1649
1650 2003-07-11 Richard Sandiford <rsandifo@redhat.com>
1651
1652 * elf32-h8300.c: Convert function prototypes and definitions
1653 to C90 syntax.
1654 * coff-h8300.c: Likewise.
1655 * cpu-h8300.c: Likewise.
1656
1657 2003-07-11 Alan Modra <amodra@bigpond.net.au>
1658
1659 * po/SRC-POTFILES.in: Regenerate.
1660 * po/bfd.pot: Likewise.
1661
1662 2003-07-10 Bob Wilson <bob.wilson@acm.org>
1663
1664 * elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Create new
1665 .got.loc section. Do not set SEC_ALLOC or SEC_LOAD flags for the
1666 .xt.lit.plt section.
1667 (elf_xtensa_size_dynamic_sections): Set size of the .got.loc section
1668 and allocate memory for it.
1669 (elf_xtensa_combine_prop_entries): Copy contents of .xt.lit output
1670 section to the .got.loc section.
1671 (elf_xtensa_finish_dynamic_sections): Fix up call to
1672 elf_xtensa_combine_prop_entries and set DT_XTENSA_GOT_LOC_OFF to
1673 the address of .got.loc.
1674 (relax_property_section): Shrink .got.loc to match changes in any
1675 literal table section.
1676 (xtensa_is_property_section): Change to match
1677 xtensa_get_property_section_name.
1678 (xtensa_is_littable_section): New.
1679
1680 2003-07-10 H.J. Lu <hongjiu.lu@intel.com>
1681
1682 * elfxx-ia64.c (IA64_HOWTO): Set dst_mask to -1 instead of
1683 -1LL.
1684
1685 2003-07-10 Alan Modra <amodra@bigpond.net.au>
1686
1687 * Makefile.am (BFD32_BACKENDS): Add elf32-am33lin.lo.
1688 (BFD32_BACKENDS_CFILES): elf32-am33lin.c not elf32-am33lin.lo.
1689 Run "make dep-am".
1690 * Makefile.in: Regenerate.
1691
1692 2003-07-10 Alexandre Oliva <aoliva@redhat.com>
1693
1694 2001-09-12 Alexandre Oliva <aoliva@redhat.com>
1695 * elf32-am33lin.c (ELF_MACHINE_CODE): Redefine to EM_MN10300.
1696 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10300.
1697 2001-06-02 Nick Clifton <nickc@cambridge.redhat.com>
1698 * elf32-am33lin.c: Rename global functions.
1699 2001-05-09 Alexandre Oliva <aoliva@redhat.com>
1700 * config.bfd (am33_2.0, am33_2.0-*-linux*): Added.
1701 * configure.in (bfd_elf32_am33lin_vec): Added.
1702 * Makefile.am (BFD32_BACKENDS): Added elf32-am33lin.lo.
1703 (elf32-am33lin.lo): List dependencies.
1704 * aclocal.m4, configure, Makefile.in: Rebuilt.
1705 * elf-m10300.c (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME,
1706 ELF_ARCH, ELF_MACHINE_CODE, ELF_MAXPAGESIZE): Define only if
1707 ELF_ARCH was not defined before.
1708 (elf_symbol_leading_char): Define if not defined.
1709 * elf32-am33lin.c: Override the definitions above.
1710 * targets.c (bfd_elf32_am33lin_vec): New.
1711
1712 2003-07-09 Alexandre Oliva <aoliva@redhat.com>
1713
1714 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
1715 * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Initialize
1716 pcrel_relocs_copied.
1717 2001-12-13 Alexandre Oliva <aoliva@redhat.com>
1718 * elf-m10300.c (ELF_DYNAMIC_INTERPRETER): Renamed from
1719 ld-linux.so.2 to ld.so.1.
1720 2001-10-10 Alexandre Oliva <aoliva@redhat.com>
1721 * elf-m10300.c (elf_mn10300_sizeof_plt0): New macro.
1722 (_bfd_mn10300_elf_adjust_dynamic_symbol): Use it.
1723 (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
1724 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Allocate
1725 .rela.* section contents with bfd_zalloc.
1726 2001-09-25 Alexandre Oliva <aoliva@redhat.com>
1727 * elf-m10300.c: Added declarations for functions missing them.
1728 Merge some shared-library changes from the i386 back-end. Use
1729 R_MN10300_RELATIVE instead of R_MN10300_PCREL32 and
1730 R_MN10300_GLOB_DAT instead of R_MN10300_32 where appropriate.
1731 (struct elf32_mn10300_link_hash_entry): Remove duplicates of
1732 members of elf_link_hash_entry. Adjusted references.
1733 (mn10300_elf_final_link_relocate): dynobj was already loaded
1734 into a local variable, use it.
1735 2001-09-21 Nick Clifton <nickc@cambridge.redhat.com>
1736 * elf-m10300.c: Add missing function prototypes.
1737 2001-08-24 Alexandre Oliva <aoliva@redhat.com>
1738 * elf-m10300.c (mn10300_elf_relocate_section): Don't compute
1739 relocation for dynamic relocations.
1740 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
1741 * reloc.c (BFD_RELOC_MN10300_GOTOFF24): New.
1742 * elf-m10300.c: Introduce GOTPC16, GOTOFF24, GOTOFF16 and
1743 PLT16, and rename GOTPC to GOTPC32 and GOTOFF to GOTOFF32.
1744 (_bfd_mn10300_elf_create_dynamic_sections): Move creation ot PLT...
1745 (_bfd_mn10300_elf_create_got_section): ... here, so that its
1746 adress is already known at the time we compute relaxations.
1747 (mn10300_elf_relax_section): Relax GOTPC32, GOTOFF32, GOT32
1748 and PLT32 to narrower relocations.
1749 * libbfd.h, bfd-in2.h: Rebuilt.
1750 2001-04-12 Alexandre Oliva <aoliva@redhat.com>
1751 * reloc.c (BFD_RELOC_MN10300_GOT32, BFD_RELOC_MN10300_GOT24,
1752 BFD_RELOC_MN10300_GOT16, BFD_RELOC_MN10300_COPY,
1753 BFD_RELOC_MN10300_GLOB_DAT, BFD_RELOC_MN10300_JMP_SLOT,
1754 BFD_RELOC_MN10300_RELATIVE): New relocs.
1755 * libbfd.h, bfd-in2.h: Rebuilt.
1756 * elf-m10300.c (struct elf_mn10300_pcrel_relocs_copied): New.
1757 (struct elf32_mn10300_link_hash_entry): Added DSO-related
1758 fields.
1759 (elf_mn10300_howto): Defined new relocation types.
1760 (mn10300_reloc_map): Map them.
1761 (_bfd_mn10300_elf_create_got_section): New fn.
1762 (mn10300_elf_check_relocs): Handle PIC relocs.
1763 (mn10300_elf_final_link_relocate): Likewise.
1764 (mn10300_elf_relocate_section): Handle DSOs.
1765 (PLT0_ENTRY_SIZE, PLT_ENTRY_SIZE, PIC_PLT_ENTRY_SIZE): New macros.
1766 (elf_mn10300_plt0_entry, elf_mn10300_plt_entry,
1767 elf_mn10300_pic_plt_entry): New.
1768 (elf_mn10300_sizeof_plt, elf_mn10300_plt_plt0_offset,
1769 elf_mn10300_plt0_linker_offset, elf_mn10300_plt0_gotid_offset,
1770 elf_mn10300_plt_temp_offset, elf_mn10300_plt_symbol_offset,
1771 elf_mn10300_plt_reloc_offset: New macros.
1772 (ELF_DYNAMIC_INTERPRETER): Likewise.
1773 (_bfd_mn10300_elf_create_dynamic_sections): New function.
1774 (_bfd_mn10300_elf_adjust_dynamic_symbol): Likewise.
1775 (_bfd_mn10300_elf_discard_copies): Likewise.
1776 (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
1777 (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
1778 (_bfd_mn10300_elf_finish_dynamic_sections): Likewise.
1779 (elf_backend_can_gc_sections,
1780 elf_backend_create_dynamic_sections,
1781 elf_backend_adjust_dynamic_sections,
1782 elf_backend_size_dynamic_sections,
1783 elf_backend_finish_dynamic_symbol,
1784 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
1785 elf_backend_plt_readonly, elf_backend_want_plt_sym,
1786 elf_backend_got_header_size, elf_backend_plt_header_size): New
1787 macros.
1788
1789 2003-07-09 Alexandre Oliva <aoliva@redhat.com>
1790
1791 2001-05-06 Alexandre Oliva <aoliva@redhat.com>
1792 * elf-m10300.c (compute_function_info): Account for AM33
1793 registers in `movm' when computing stack space for `call' when
1794 linking for AM33/2.0 link.
1795 2000-04-01 Alexandre Oliva <aoliva@cygnus.com>
1796 * archures.c (bfd_mach_am33_2): Renamed from bfd_mach_am332.
1797 * bfd-in2.h: Rebuilt.
1798 * cpu-m10300.c (bfd_am33_2_arch): Renamed from bfd_am332_arch.
1799 * elf-m10300.c: Updated.
1800 2000-03-31 Alexandre Oliva <aoliva@cygnus.com>
1801 * archures.c (bfd_mach_am332): Defined.
1802 * bfd-in2.h: Rebuilt.
1803 * cpu-m10300.c (bfd_am332_arch): Defined.
1804 (bfd_am33_arch): Chained with am33-2.
1805 * elf-m10300.c (elf_mn10300_mach): Handle am332.
1806 (_bfd_mn10300_elf_final_write_processing): Likewise.
1807
1808 2003-07-09 H.J. Lu <hongjiu.lu@intel.com>
1809
1810 * elfxx-ia64.c (IA64_HOWTO): Set dst_mask to -1LL.
1811
1812 2003-07-10 Alan Modra <amodra@bigpond.net.au>
1813
1814 * elf64-ppc.c (bfd_elf64_mkobject): Define.
1815 (struct ppc64_elf_obj_tdata): New.
1816 (ppc64_elf_tdata, ppc64_tlsld_got): Define.
1817 (ppc64_elf_mkobject): New function.
1818 (struct got_entry): Add "owner". Move "tls_type".
1819 (struct ppc_link_hash_table): Delete "relgot", "tlsld_got".
1820 (ppc64_elf_init_stub_bfd): New function.
1821 (create_got_section): Create header .got in dynobj. Create .got
1822 and .rela.got in each bfd. Stash pointers in ppc64_elf_obj_tdata.
1823 (ppc64_elf_create_dynamic_sections): Don't call create_got_section.
1824 Look for dynobj .got, and test it.
1825 (ppc64_elf_copy_indirect_symbol): Adjust for changed got.
1826 (update_local_sym_info): Likewise.
1827 (ppc64_elf_check_relocs): Likewise.
1828 (ppc64_elf_gc_sweep_hook): Likewise.
1829 (ppc64_elf_tls_optimize): Likewise.
1830 (allocate_dynrelocs): Likewise.
1831 (ppc64_elf_size_dynamic_sections): Likewise.
1832 (ppc64_elf_relocate_section): Likewise.
1833 (ppc64_elf_next_toc_section): Update comment.
1834 (toc_adjusting_stub_needed): Remove unneeded cast.
1835 (ppc64_elf_build_stubs): Check for stub sections in stub bfd by
1836 testing section flags.
1837 (ppc64_elf_build_stubs): Likewise.
1838 (ppc64_elf_size_stubs): Likewise. Remove stub_bfd param.
1839 (ppc64_elf_finish_dynamic_sections): Write out got sections.
1840 (func_desc_adjust): Copy over dynamic info for undef weaks.
1841 * elf64-ppc.h (ppc64_elf_init_stub_bfd): Declare.
1842 (ppc64_elf_size_stubs): Update prototype.
1843 * elflink.h (elf_link_sort_relocs): Use link_orders to find reldyn
1844 input sections rather than scanning dynobj.
1845
1846 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
1847
1848 * elfxx-mips.c (mips_elf_link_hash_entry): Remove min_dyn_reloc_index.
1849 (bfd_mips_elf_swap_msym_in, bfd_mips_elf_swap_msym_out): Delete.
1850 (mips_elf_create_msym_section): Delete.
1851 (mips_elf_create_dynamic_relocation): Don't set min_dyn_reloc_index.
1852 (_bfd_mips_elf_copy_indirect_symbol): Likewise.
1853 (_bfd_mips_elf_create_dynamic_sections): Don't create .msym.
1854 (_bfd_mips_elf_size_dynamic_sections): Don't calculate its size.
1855 (_bfd_mips_elf_size_dynamic_sections): Don't add DT_MIPS_MSYM.
1856 (_bfd_mips_elf_finish_dynamic_symbol): Don't add symbols to .msym.
1857 (_bfd_mips_elf_finish_dynamic_sections): Likewise.
1858
1859 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
1860
1861 * elfxx-mips.c (mips_elf_irix6_finish_dynamic_symbol): Make the
1862 symbols protected.
1863
1864 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
1865
1866 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Fix handling
1867 of relocations whose offset is -2.
1868
1869 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
1870
1871 * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): Treat
1872 forced-local symbols like other locals. Don't create relocations
1873 against STN_UNDEF in irix objects.
1874
1875 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
1876
1877 * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): In SGI-
1878 compatible objects, add the values of defined external symbols
1879 to the addend.
1880
1881 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
1882
1883 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Always
1884 initialize a GOT entry to the symbol's st_value.
1885
1886 2003-07-08 Alan Modra <amodra@bigpond.net.au>
1887
1888 * elf-bfd.h (struct elf_obj_tdata): Move linker_section_pointers..
1889 * elf32-ppc.c (struct ppc_elf_obj_tdata): ..to here. New.
1890 (ppc_elf_tdata): Define.
1891 (elf_local_ptr_offsets): Adjust.
1892 (ppc_elf_mkobject): New function.
1893 (bfd_elf32_mkobject): Define.
1894
1895 * elfcode.h (elf_object_p): Allocate tdata via _bfd_set_format.
1896 * elfcore.h (elf_core_file_p): Likewise.
1897 * section.c (bfd_section_init): Remove prototype.
1898
1899 2003-07-08 Alan Modra <amodra@bigpond.net.au>
1900
1901 * elf-bfd.h (struct elf_link_hash_entry): Remove linker_section_pointer
1902 field.
1903 (enum elf_linker_section_enum): Delete.
1904 (struct elf_linker_section): Delete.
1905 (struct elf_linker_section_pointers): Delete.
1906 (struct elf_obj_tdata): Remove #if 0 chunk. Remove linker_section.
1907 Make linker_section_pointers a void**.
1908 (elf_local_ptr_offsets, elf_linker_section): Don't define.
1909 * elf32-ppc.c (enum elf_linker_section_enum): New, cut-down version
1910 of old item in elf-bfd.h.
1911 (struct elf_linker_section): Likewise.
1912 (struct elf_linker_section_pointers): Likewise.
1913 (elf_local_ptr_offsets): Define.
1914 (struct ppc_elf_link_hash_entry): Add linker_section_pointer.
1915 (ppc_elf_link_hash_newfunc): Init it.
1916 (struct ppc_elf_link_hash_table): Add sbss.
1917 (ppc_elf_link_hash_table_create): zmalloc rather than clearing
1918 individual fields.
1919 (elf_create_linker_section): Fold into..
1920 (ppc_elf_create_linker_section): ..here. Remove hole_size code.
1921 Make rela section here if shared.
1922 (elf_find_pointer_linker_section): Pass lsect rather than enum.
1923 (elf_create_pointer_linker_section): Adjust. zalloc rather than
1924 clearing in a loop.
1925 (elf_finish_pointer_linker_section): Adjust. Don't make rela
1926 section here.
1927 (ppc_elf_check_relocs): Adjust.
1928 (ppc_elf_add_symbol_hook): Tighten hash creator test. Remove code
1929 creating .sbss by hand.
1930 * elf.c (_bfd_elf_link_hash_newfunc): Adjust.
1931
1932 2003-07-04 Jakub Jelinek <jakub@redhat.com>
1933
1934 * elf32-s390.c (elf_howto_table): Change R_390_GOT12 to
1935 complain_overflow_bitfield.
1936 * elf64-s390.c (elf_howto_table): Change R_390_GOT12 to
1937 complain_overflow_bitfield.
1938
1939 2003-07-04 Jakub Jelinek <jakub@redhat.com>
1940
1941 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Return
1942 true even if -pie.
1943
1944 2003-07-04 Jakub Jelinek <jakub@redhat.com>
1945
1946 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add rel_fptr_sec.
1947 (elfNN_ia64_dynamic_symbol_p): Change info->shared into
1948 !info->executable.
1949 (get_fptr): For -pie create .opd as writable section and create
1950 .rela.opd as well.
1951 (elfNN_ia64_check_relocs): Change info->shared into
1952 !info->executable.
1953 (allocate_fptr): Likewise.
1954 (allocate_dynrel_entries): Account for a relative reloc for -pie
1955 @fptr(). Don't account for a relative reloc if -pie want_ltoff_fptr
1956 for undefweak symbol. Account for an IPLT reloc in .rela.opd
1957 section if -pie.
1958 (set_got_entry): Don't create a relative reloc if -pie
1959 want_ltoff_fptr for undefweak symbol.
1960 (set_fptr_entry): Emit an IPLT reloc in .rela.opd for -pie.
1961 (elfNN_ia64_relocate_section): Emit a relative reloc for -pie
1962 @fptr().
1963
1964 * elfxx-ia64.c (elfNN_ia64_relocate_section): Issue undefined_symbol
1965 even if -pie.
1966 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1967 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1968 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1969 * elf64-s390.c (elf_s390_relocate_section): Likewise.
1970 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1971 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
1972 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1973 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1974 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1975
1976 2003-07-04 Paul Clarke <paulc@senet.com.au>
1977
1978 * elf32-h8300.c (R_H8_DIR32A16): Fix name field.
1979 (elf32_h8_relax_section) <R_H8_DIR16A8>: Adjust position of relocation.
1980 <R_H8_DIR32A16>: Fix type of relocation.
1981
1982 2003-07-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1983
1984 * elf32-sh.c (sh_elf_create_dynamic_sections): Return if dynamic
1985 sections were created already. Remove unnecessary tests of
1986 the previous change.
1987
1988 2003-07-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1989
1990 * elf32-sh.c (sh_elf_create_dynamic_sections): Don't call
1991 bfd_make_section for existing sections.
1992
1993 2003-07-04 Alan Modra <amodra@bigpond.net.au>
1994
1995 * elf32-sparc.c (elf32_sparc_check_relocs): Don't call
1996 create_got_section if we already have done so.
1997 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
1998 (sh_elf_check_relocs): Likewise.
1999 (sh_elf_adjust_dynamic_symbol): Delete "dynobj" var. Use
2000 htab->root.dynobj instead.
2001 (sh_elf_check_relocs): Likewise.
2002 (sh_elf_finish_dynamic_sections): Likewise.
2003
2004 * section.c (bfd_make_section): Return NULL for existing section.
2005
2006 2003-07-04 Alan Modra <amodra@bigpond.net.au>
2007
2008 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Don't call
2009 ppc_elf_create_got if we've already done so.
2010
2011 * elf-bfd.h (_bfd_elf_create_linker_section) Don't declare.
2012 (_bfd_elf_find_pointer_linker_section): Likewise.
2013 (bfd_elf32_create_pointer_linker_section): Likewise.
2014 (bfd_elf32_finish_pointer_linker_section): Likewise.
2015 (bfd_elf64_create_pointer_linker_section): Likewise.
2016 (bfd_elf64_finish_pointer_linker_section): Likewise.
2017 (_bfd_elf_make_linker_section_rela): Likewise.
2018 * elfcode.h (elf_create_pointer_linker_section): Don't define.
2019 (elf_finish_pointer_linker_section): Likewise.
2020 * elflink.c (_bfd_elf_make_linker_section_rela): Delete.
2021 (_bfd_elf_create_linker_section): Move this function..
2022 (_bfd_elf_find_pointer_linker_section): ..and this..
2023 * elflink.h (elf_create_pointer_linker_section): ..and this..
2024 (elf_finish_pointer_linker_section): ..and this..
2025 * elf32-ppc.c: ..to here, renaming to the following, and adjusting
2026 calls.
2027 (elf_create_linker_section): Convert to C90, tidy.
2028 (elf_find_pointer_linker_section): Likewise.
2029 (elf_create_pointer_linker_section): Likewise.
2030 (elf_finish_pointer_linker_section): Likewise.
2031 * elf32-i370.c: Delete #if 0 code.
2032
2033 2003-07-02 Alan Modra <amodra@bigpond.net.au>
2034
2035 * elf64-ppc.c (ppc64_elf_func_desc_adjust): Don't allow _savef* and
2036 _restf* to be satisfied by shared libs, and always force them local.
2037 (toc_adjusting_stub_needed): Avoid scanning linker created sections.
2038 Correct test for "bl".
2039 (ppc64_elf_relocate_section <R_PPC64_TLS>): Correct test for
2040 primary opcode 31.
2041
2042 2003-07-01 Martin Schwidefsky <schwidefsky@de.ibm.com>
2043
2044 * elf32-s390.c (s390_elf_ldisp_reloc): New prototype.
2045 (s390_tls_reloc): New function.
2046 (elf_howto_table): Add long displacement relocations R_390_20,
2047 R_390_GOT20, R_390_GOTPLT20 and R_390_TLS_GOTIE20.
2048 (elf_s390_reloc_type_lookup): Likewise.
2049 (elf_s390_check_relocs): Likewise.
2050 (elf_s390_gc_sweep_hook): Likewise.
2051 (elf_s390_relocate_section): Likewise.
2052 * elf64-s390.c: Same changes as for elf32-s390.c.
2053 * reloc.c: Add long displacement relocations BFD_RELOC_390_20,
2054 BFD_RELOC_390_GOT20, BFD_RELOC_390_GOTPLT20 and
2055 BFD_RELOC_390_TLS_GOTIE20.
2056 * bfd-in2.h: Regenerate.
2057 * libbfd.h: Likewise.
2058
2059 2003-06-30 Alan Modra <amodra@bigpond.net.au>
2060
2061 * cpu-ia64-opc.c (ext_imms_scaled): Don't sign extend using shifts.
2062 (ins_imms, ins_immsm1u4): Likewise. Warning fix.
2063
2064 2003-06-29 Alan Modra <amodra@bigpond.net.au>
2065
2066 * archive.c: Convert to C90, remove unnecessary prototypes and casts.
2067 Replace PTR with void *. Formatting.
2068 * archive64.c: Likewise.
2069 * archures.c: Likewise.
2070 * bfd-in.h: Likewise.
2071 * bfd.c: Likewise.
2072 * bfdio.c: Likewise.
2073 * bfdwin.c: Likewise.
2074 * cache.c: Likewise.
2075 * corefile.c: Likewise.
2076 * format.c: Likewise.
2077 * init.c: Likewise.
2078 * libbfd-in.h: Likewise.
2079 * libbfd.c: Likewise.
2080 * linker.c: Likewise.
2081 * opncls.c: Likewise.
2082 * reloc.c: Likewise.
2083 * section.c: Likewise.
2084 * simple.c: Likewise.
2085 * syms.c: Likewise.
2086 * targets.c: Likewise.
2087 * bfd-in2.h: Regenerate.
2088 * libbfd.h: Regenerate.
2089
2090 * ecoff.c (bfd_debug_section): Add missing kept_section initialization.
2091 * libbfd-in.h (_bfd_sh_align_load_span): Don't declare if defined.
2092 * libbfd.c (COERCE32, EIGHT_GAZILLION): Simplify.
2093 (bfd_getb64): Rewrite without parens.
2094 (bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
2095 * cache.c (insert, snip): Remove INLINE.
2096 * linker.c (bfd_link_add_undef): Likewise.
2097
2098 2003-06-29 Andreas Jaeger <aj@suse.de>
2099
2100 * elf64-x86-64.c: Convert to ISO C90 prototypes, remove
2101 unnecessary prototypes. Replace PTR with void *.
2102 (elf64_x86_64_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL to
2103 trim plt entries. Move undefweak non-default visibility test ...
2104 (allocate_dynrelocs): ... from here.
2105 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
2106 Change all callers.
2107 (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL. Use
2108 SYMBOL_REFERENCES_LOCAL for dynreloc check.
2109 (elf64_x86_64_relocate_section): Use SYMBOL_CALLS_LOCAL for
2110 dynreloc and .got relocs.
2111 (elf64_x86_64_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL
2112 for .got relocs.
2113
2114 2003-06-29 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2115
2116 * elfxx-mips.c: Allow lazy binding for R_MIPS_JALR.
2117
2118 2003-06-27 Nick Clifton <nickc@redhat.com>
2119
2120 * opncls.c (bfd_add_gnu_debuglink_section): Rename to
2121 bfd_add_gnu_debuglink_section and only create the section, do not
2122 fill in its contents.
2123 (bfd_fill_in_gnu_debuglink_section): New function. Fill in the
2124 contents of a .gnu-debuglink section.
2125 * bfd-in2.h: Regenerate.
2126
2127 2003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2128
2129 * elfxx-mips.c: Revert .got alignment to 2**4.
2130
2131 2003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2132
2133 * elf32-mips.c: Fix addend for _gp_disp special symbol.
2134
2135 2003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2136
2137 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Remove non-default
2138 relocation header setup.
2139
2140 2003-06-25 Alan Modra <amodra@bigpond.net.au>
2141
2142 * elf32-ppc.c (ppc_elf_howto_table): Remove unnecessary cast.
2143 (ppc_elf_reloc_type_lookup): Modify comment.
2144 (ppc_elf_info_to_howto): Ditto.
2145 (ppc_elf_relocate_section): Ditto.
2146 (ppc_elf_check_relocs): Call ppc_elf_howto_init.
2147
2148 2003-06-25 Alan Modra <amodra@bigpond.net.au>
2149
2150 * aout-ns32k.c: Correct spelling of "relocatable".
2151 * aoutx.h: Likewise.
2152 * bfd-in.h: Likewise.
2153 * bfd.c: Likewise.
2154 * bout.c: Likewise.
2155 * coff-a29k.c: Likewise.
2156 * coff-alpha.c: Likewise.
2157 * coff-arm.c: Likewise.
2158 * coff-i386.c: Likewise.
2159 * coff-i860.c: Likewise.
2160 * coff-i960.c: Likewise.
2161 * coff-m68k.c: Likewise.
2162 * coff-m88k.c: Likewise.
2163 * coff-mcore.c: Likewise.
2164 * coff-mips.c: Likewise.
2165 * coff-or32.c: Likewise.
2166 * coff-ppc.c: Likewise.
2167 * coff-rs6000.c: Likewise.
2168 * coff-sh.c: Likewise.
2169 * coff-tic80.c: Likewise.
2170 * coff64-rs6000.c: Likewise.
2171 * cofflink.c: Likewise.
2172 * cpu-ns32k.c: Likewise.
2173 * ecoff.c: Likewise.
2174 * ecofflink.c: Likewise.
2175 * elf-bfd.h: Likewise.
2176 * elf-eh-frame.c: Likewise.
2177 * elf-hppa.h: Likewise.
2178 * elf-m10200.c: Likewise.
2179 * elf-m10300.c: Likewise.
2180 * elf.c: Likewise.
2181 * elf32-arm.h: Likewise.
2182 * elf32-avr.c: Likewise.
2183 * elf32-cris.c: Likewise.
2184 * elf32-d10v.c: Likewise.
2185 * elf32-dlx.c: Likewise.
2186 * elf32-fr30.c: Likewise.
2187 * elf32-frv.c: Likewise.
2188 * elf32-h8300.c: Likewise.
2189 * elf32-hppa.c: Likewise.
2190 * elf32-i370.c: Likewise.
2191 * elf32-i386.c: Likewise.
2192 * elf32-i860.c: Likewise.
2193 * elf32-i960.c: Likewise.
2194 * elf32-ip2k.c: Likewise.
2195 * elf32-iq2000.c: Likewise.
2196 * elf32-m32r.c: Likewise.
2197 * elf32-m68hc11.c: Likewise.
2198 * elf32-m68hc1x.c: Likewise.
2199 * elf32-m68k.c: Likewise.
2200 * elf32-mcore.c: Likewise.
2201 * elf32-mips.c: Likewise.
2202 * elf32-msp430.c: Likewise.
2203 * elf32-openrisc.c: Likewise.
2204 * elf32-ppc.c: Likewise.
2205 * elf32-s390.c: Likewise.
2206 * elf32-sh.c: Likewise.
2207 * elf32-sh64.c: Likewise.
2208 * elf32-sparc.c: Likewise.
2209 * elf32-v850.c: Likewise.
2210 * elf32-vax.c: Likewise.
2211 * elf32-xstormy16.c: Likewise.
2212 * elf32-xtensa.c: Likewise.
2213 * elf64-alpha.c: Likewise.
2214 * elf64-hppa.c: Likewise.
2215 * elf64-mips.c: Likewise.
2216 * elf64-mmix.c: Likewise.
2217 * elf64-ppc.c: Likewise.
2218 * elf64-s390.c: Likewise.
2219 * elf64-sh64.c: Likewise.
2220 * elf64-sparc.c: Likewise.
2221 * elf64-x86-64.c: Likewise.
2222 * elfcode.h: Likewise.
2223 * elflink.h: Likewise.
2224 * elfn32-mips.c: Likewise.
2225 * elfxx-ia64.c: Likewise.
2226 * elfxx-mips.c: Likewise.
2227 * i386linux.c: Likewise.
2228 * ieee.c: Likewise.
2229 * libcoff-in.h: Likewise.
2230 * linker.c: Likewise.
2231 * m68klinux.c: Likewise.
2232 * pdp11.c: Likewise.
2233 * pe-mips.c: Likewise.
2234 * peXXigen.c: Likewise.
2235 * reloc.c: Likewise.
2236 * reloc16.c: Likewise.
2237 * sparclinux.c: Likewise.
2238 * sunos.c: Likewise.
2239 * syms.c: Likewise.
2240 * versados.c: Likewise.
2241 * vms.c: Likewise.
2242 * xcofflink.c: Likewise.
2243 * bfd-in2.h: Regenerate.
2244 * libcoff.h: Regenerate.
2245 * libbfd.h: Regenerate.
2246
2247 2003-06-24 Alan Modra <amodra@bigpond.net.au>
2248
2249 * elf32-ppc.c (ppc_elf_check_relocs): Report plt reloc against
2250 local sym errors.
2251
2252 * elf32-i386.c: Convert to C90 function definitions, remove unnecessary
2253 prototypes and casts. Replace PTR with void *. Formatting.
2254 * elf32-ppc.c: Likewise. Break long strings too.
2255 (ppc_elf_relax_section): Use enum elf_ppc_reloc_type for r_type.
2256 (ppc_elf_unhandled_reloc): Internationalize error message.
2257 * elf32-ppc.h: Remove PARAMS.
2258
2259 2003-06-23 Mark Mitchell <mark@codesourcery.com>
2260
2261 * elf32-ppc.c (ppc_elf_begin_write_processing): Use bytes to count
2262 APUinfo slots.
2263 (ppc_elf_final_write_processing): Likewise.
2264
2265 2003-06-23 H.J. Lu <hongjiu.lu@intel.com>
2266
2267 * elflink.h (elf_link_input_bfd): Check raw size when using
2268 kept_section to preserve debug information discarded by
2269 linkonce.
2270
2271 2003-06-20 Alan Modra <amodra@bigpond.net.au>
2272
2273 * elf64-ppc.c (struct ppc_link_hash_table): Add top_id.
2274 (ppc64_elf_setup_section_lists): Set it.
2275 (ppc64_elf_relocate_section): Check sym section id against top_id.
2276 (ppc_build_one_stub): Comment on top_id.
2277
2278 2003-06-20 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
2279
2280 * config.bfd: Add tic4x-*-rtems*.
2281
2282 2003-06-20 Alan Modra <amodra@bigpond.net.au>
2283
2284 * elf64-ppc.c: Convert to C90 function definitions, remove unnecessary
2285 prototypes and casts. Replace PTR with void *. Format copyright.
2286 Mention ABI links.
2287 (struct ppc_link_hash_table): Rename sgot, srelgot, splt, srelplt,
2288 sdynbss, srelbss, sglink, sbrlt and srelbrlt to got, relgot .. relbrlt.
2289 (ppc_type_of_stub): Make r_type an enum.
2290 (ppc64_elf_size_stubs): Likewise.
2291 * elf64-ppc.h: Remove PARAMS macro.
2292
2293 2003-06-19 Alan Modra <amodra@bigpond.net.au>
2294
2295 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Reinstate init of
2296 elf hash tab fields.
2297
2298 * elf64-ppc.c (ppc64_elf_reloc_type_lookup): Tidy prototype.
2299 (ppc64_elf_info_to_howto): Likewise.
2300 (ppc64_elf_build_stubs): Add "stats" param, and print statistics.
2301 * elf64-ppc.h (ppc64_elf_build_stubs): Adjust prototype.
2302
2303 2003-06-19 Alan Modra <amodra@bigpond.net.au>
2304
2305 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore R_SPARC_DISP32
2306 reloc overflow on discarded eh_frame entries.
2307
2308 2003-06-19 Alan Modra <amodra@bigpond.net.au>
2309
2310 * elf64-ppc.c (toc_adjusting_stub_needed): New function.
2311 (ppc64_elf_next_input_section): Use it here to set has_gp_reloc.
2312 Return error condition.
2313 (ppc64_elf_size_stubs): Restrict toc adjusting stubs to sections
2314 that have has_gp_reloc set.
2315 (struct ppc_link_hash_table): Add stub_count.
2316 (ppc_build_one_stub): Increment it.
2317 (ppc64_elf_link_hash_table_create): zmalloc rather than clearing
2318 individual fields.
2319 * elf64-ppc.h (ppc64_elf_next_input_section): Update prototype.
2320
2321 2003-06-18 Alan Modra <amodra@bigpond.net.au>
2322
2323 * elflink.h (elf_gc_record_vtentry): Revert last change. Correct
2324 size calculation from addend. Round size up.
2325
2326 2003-06-18 Hans-Peter Nilsson <hp@axis.com>
2327
2328 * elf32-cris.c (cris_elf_relocate_section) <case
2329 R_CRIS_32_GOTREL>: When linking a program, don't complain about a
2330 symbol from a normal object or an undefined weak symbol.
2331
2332 2003-06-18 Alan Modra <amodra@bigpond.net.au>
2333
2334 * elf64-ppc.c (ppc64_elf_relocate_section): Accept a symbol on
2335 R_PPC64_TOC relocs.
2336
2337 2003-06-17 H.J. Lu <hongjiu.lu@intel.com>
2338
2339 * section.c (struct sec): Put back kept_section.
2340 (STD_SECTION): Put back kept_section initialization.
2341 * bfd-in2.h: Regenerate.
2342
2343 * elflink.h (elf_link_input_bfd): Also check discarded linkonce
2344 sections for relocateable output. Use kept_section to preserve
2345 debug information discarded by linkonce.
2346
2347 2003-06-17 Roland McGrath <roland@redhat.com>
2348
2349 * elfxx-ia64.c (elfNN_ia64_relocate_section): Support
2350 segment-relative relocation between different segments.
2351
2352 2003-06-17 Alan Modra <amodra@bigpond.net.au>
2353
2354 * elf64-ppc.c (ppc64_elf_relocate_section): Do unaligned reloc
2355 optimizations earlier.
2356
2357 * elf64-ppc.c (struct ppc_link_hash_table): Reinstate top_index.
2358 Restore previous input_list type.
2359 (ppc64_elf_link_hash_table_create): Undo last change.
2360 (ppc64_elf_setup_section_lists): Reinstate code setting up input lists
2361 per output section, but don't bother with bfd_abs_section marker.
2362 (ppc64_elf_next_input_section): Adjust for multiple input section
2363 lists.
2364 (group_sections): Likewise.
2365
2366 2003-06-17 Jakub Jelinek <jakub@redhat.com>
2367
2368 * elf64-ppc.c (ppc64_elf_relocation_section): Ensure
2369 *r_offset == r_addend for RELATIVE relocs against .got.
2370
2371 2003-06-17 Alan Modra <amodra@bigpond.net.au>
2372
2373 * elf64-ppc.c (ppc64_elf_relocate_section): Optimize unaligned relocs.
2374
2375 2003-06-17 Nick Clifton <nickc@redhat.com>
2376
2377 * elflink.h (elf_gc_record_vtentry): Allocate an extra element
2378 in the vtable_entries_used array to allow for the accessing
2379 the largest element.
2380
2381 2003-06-17 Alan Modra <amodra@bigpond.net.au>
2382
2383 * elf64-ppc.c (struct ppc_link_hash_table): Remove top_index. Modify
2384 input_list.
2385 (ppc64_elf_link_hash_table_create): Init input_list here.
2386 (ppc64_elf_setup_section_lists): Remove code setting up input lists
2387 per output section. Set toc_off for abs and other standard sections.
2388 (ppc64_elf_reinit_toc): Don't set elf_gp on input bfds lacking a toc.
2389 (ppc64_elf_next_input_section): Adjust for single input section list.
2390 Don't set toc_curr from input bfds that haven't set elf_gp.
2391 (group_sections): Adjust for single input section list.
2392
2393 * elf64-ppc.c (ppc64_elf_relocate_section): Correct pcrel section zero.
2394
2395 2003-06-16 Alan Modra <amodra@bigpond.net.au>
2396
2397 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing toctprel
2398 tls, check that a TOC16_DS or TOC16_LO_DS reloc isn't pointing to a
2399 dtprel entry. Ensure TLS_LD DTPMOD reloc has a zero addend. Write
2400 got section for RELATIVE relocs. Fix wrong comment. Change condition
2401 under which dynamic relocs update the section contents.
2402
2403 2003-06-13 Robert Millan <zeratul2@wanadoo.es>
2404
2405 * config.bfd: Add i386-netbsd-gnu target.
2406
2407 2003-06-12 Nick Clifton <nickc@redhat.com>
2408
2409 * opncls.c (calc_crc32): Rename to
2410 bfd_calc_gnu_debuglink_crc32 and export.
2411 (GNU_DEBUGLINK): Define and use to replace occurrences of
2412 hard-coded ".gnu_debuglink" in the code.
2413 (get_debug_link_info): Prevent aborts by replacing call to
2414 xmalloc with a call to malloc.
2415 (find_separate_debug_file): Prevent aborts by replacing calls
2416 to xmalloc and xstrdup with calls to malloc and strdup.
2417 (bfd_add_gnu_debuglink): New function. Add a .gnu_debuglink
2418 section to a bfd.
2419 * bfd-in2.h: Regenerate.
2420
2421 2003-06-12 Federico G. Schwindt <fgsch@lodoss.net>
2422
2423 * config.bfd (i[3-7]86-*-openbsd[0-2].* | i[3-7]86-*-openbsd3.[0-3]):
2424 New target (was i[3-7]86-*-openbsd* before).
2425 (i[3-7]86-*-openbsd*): Change to use bfd_elf32_i386_vec.
2426 (vax-*-openbsd*): New target.
2427
2428 2003-06-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2429
2430 * elfxx-mips.c (MIPS_ELF_OPTIONS_SECTION_NAME): Use .MIPS.options
2431 for n32, too.
2432 (MIPS_ELF_STUB_SECTION_NAME): Use .MIPS.stubs for n32, too.
2433 (mips_elf_rel_dyn_section): Use appropriate section alignment.
2434 (mips_elf_create_got_section): Likewise.
2435 (_bfd_mips_elf_create_dynamic_sections): Likewise.
2436
2437 2003-06-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2438
2439 * elf32-mips.c (mips_elf_generic_reloc): New Function.
2440 (elf_mips_howto_table_rel): Use it.
2441 (gprel32_with_gp): Move prototype.
2442 (mips_elf_hi16_reloc): Check for ! BSF_LOCAL instead of zero addend.
2443 Use mips_elf_generic_reloc.
2444 (mips_elf_got16_reloc): Check for ! BSF_LOCAL instead of zero addend.
2445 Code cleanup.
2446 (_bfd_mips_elf32_gprel16_reloc): Check for ! BSF_LOCAL instead of
2447 zero addend.
2448 (mips_elf_gprel32_reloc): Likewise. Use the same GP assignment logic
2449 as in the other *_gprel*_reloc functions.
2450 (gprel32_with_gp): Handle partial_inplace properly.
2451 (mips32_64bit_reloc): Use mips_elf_generic_reloc.
2452 (mips16_gprel_reloc): Check for ! BSF_LOCAL instead of zero addend.
2453 Do addend handling directly instead of calling
2454 _bfd_mips_elf_gprel16_with_gp. Handle partial_inplace properly.
2455 * elf64-mips.c (mips_elf64_hi16_reloc): Check for ! BSF_LOCAL instead
2456 of zero addend. Handle partial_inplace properly.
2457 (mips_elf64_got16_reloc): Check for ! BSF_LOCAL instead of zero
2458 addend.
2459 (mips_elf64_gprel16_reloc): Likewise.
2460 (mips_elf64_literal_reloc): Likewise.
2461 (mips_elf64_gprel32_reloc): Likewise. Use the same GP assignment
2462 logic as in the other *_gprel*_reloc functions. Handle
2463 partial_inplace properly.
2464 (mips_elf64_shift6_reloc): Check for ! BSF_LOCAL instead of zero
2465 addend. Handle partial_inplace properly.
2466 (mips16_gprel_reloc): Likewise. Do addend handling directly instead
2467 of calling _bfd_mips_elf_gprel16_with_gp.
2468 * elfn32-mips.c (mips_elf_got16_reloc): Check for BSF_LOCAL.
2469 (mips_elf_gprel32_reloc): Check for ! BSF_LOCAL instead
2470 of zero addend.
2471 (mips_elf_shift6_reloc): Handle partial_inplace properly.
2472 (mips16_gprel_reloc): Likewise. Do addend handling directly instead
2473 of calling _bfd_mips_elf_gprel16_with_gp.
2474 * elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp): Handle
2475 partial_inplace properly. Fix wrong addend handling. Fix overflow
2476 check.
2477 (_bfd_mips_elf_sign_extend): Renamed from mips_elf_sign_extend and
2478 exported.
2479 (mips_elf_calculate_relocation): Use _bfd_mips_elf_sign_extend.
2480 (_bfd_mips_elf_relocate_section): Likewise.
2481 (mips_elf_create_dynamic_relocation): Update sec_info_type access.
2482 * elfxx-mips.h (_bfd_mips_relax_section): Fix prototype declaration.
2483 (_bfd_mips_elf_sign_extend): New prototype.
2484
2485 2003-06-11 Federico G. Schwindt <fgsch@lodoss.net>
2486
2487 * config.bfd (sparc-*-openbsd[0-2].* | sparc-*-openbsd3.[0-1]):
2488 New target (was sparc-*-openbsd* before).
2489 (sparc-*-openbsd*): Change to use bfd_elf32_sparc_vec.
2490
2491 * configure.in (vax-*-openbsd*): Set COREFILE to netbsd-core.lo.
2492 * configure: Regenerate.
2493
2494 2003-06-11 H.J. Lu <hongjiu.lu@intel.com>
2495
2496 * po/Make-in (DESTDIR): New.
2497 (install-data-yes): Support $(DESTDIR).
2498 (uninstall): Likewise.
2499
2500 2003-06-11 Alan Modra <amodra@bigpond.net.au>
2501
2502 * Makefile.am (config.status): Depend on version.h.
2503 Run "make dep-am".
2504 * Makefile.in: Regenerate.
2505 * po/SRC-POTFILES.in: Regenerate.
2506
2507 2003-06-10 Alan Modra <amodra@bigpond.net.au>
2508 Gary Hade <garyhade@us.ibm.com>
2509
2510 * elf64-ppc.c (ppc64_elf_relocate_section <*_DS>): Special case lq.
2511
2512 2003-06-10 Richard Sandiford <rsandifo@redhat.com>
2513
2514 * archures.c (bfd_mach_h8300sxn): New architecture.
2515 * bfd-in2.h: Regenerate.
2516 * cpu-h8300.c (h8300_scan): Check for 'sxn'.
2517 (h8300sxn_info_struct): New.
2518 (h8300sx_info_struct): Link to it.
2519 * elf32-h8300.c (elf32_h8_mach): Add h8300sxn case.
2520 (elf32_h8_final_write_processing): Likewise.
2521
2522 2003-06-08 Alan Modra <amodra@bigpond.net.au>
2523
2524 * elf64-ppc.c: Move TARGET_LITTLE_SYM and other macros used by
2525 elfxx-target.h so that we can use elf_backend_got_header_size.
2526 (ELF_MACHINE_ALT1, ELF_MACHINE_ALT2): Delete.
2527 (GLINK_CALL_STUB_SIZE): Modify. Define new glink call stub and
2528 associated macros.
2529 (ppc64_elf_howto_raw <GOT_TPREL16_DS, GOT_TPREL16_LO_DS>): Correct
2530 dst_mask.
2531 (enum ppc_stub_type): Add ppc_stub_long_branch_r2off and
2532 ppc_stub_plt_branch_r2off.
2533 (struct ppc_stub_hash_entry): Reorganize.
2534 (struct ppc_link_hash_table): Add no_multi_toc, multi_toc_needed,
2535 toc_curr, toc_off and emit_stub_syms.
2536 (ppc64_elf_link_hash_table_create): Init them.
2537 (ppc_stub_name): Correct string size.
2538 (ppc64_elf_check_relocs): Set has_gp_reloc on GOT and TOC relocs.
2539 (ppc64_elf_size_dynamic_sections): Set no_multi_toc if GOT entries
2540 used.
2541 (ppc_type_of_stub): Tweak root.type test.
2542 (build_plt_stub): Remove glink code. Adjust for insn macro changes.
2543 (ppc_size_one_stub): Handle ppc_stub_long_branch_r2off and
2544 ppc_stub_plt_branch_r2off.
2545 (ppc_build_one_stub): Likewise. Fix var shadowing. Correct addis,addi
2546 range test. Use toc_off to calculte r2 values. Handle emit_stub_syms.
2547 (ppc64_elf_setup_section_lists): Remove htab creator flavour test.
2548 Initialize elf_gp and toc_curr.
2549 (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): New functions.
2550 (ppc64_elf_next_input_section): Set toc_off.
2551 (group_sections): Ensure groups have the same TOC.
2552 (ppc64_elf_size_stubs): Check whether we need a TOC adjusting stub.
2553 (ppc64_elf_build_stubs): Add emit_stub_syms param, and stash in htab.
2554 Build new glink stub.
2555 (ppc64_elf_relocate_section): Handle multiple TOCs. Fix comments.
2556 (ppc64_elf_finish_dynamic_sections): Adjust DT_PPC64_GLINK.
2557 * elf64-ppc.h (ppc64_elf_build_stubs): Update prototype.
2558 (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): Declare.
2559 * section.c (struct sec): Rename flag12 to has_gp_reloc.
2560 (STD_SECTION): Update.
2561 * ecoff.c (bfd_debug_section): Update comment.
2562 * bfd-in2.h: Regenerate.
2563
2564 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
2565
2566 * elfcode.h (elf_slurp_reloc_table_from_section): Don't dereference
2567 NULL function pointers.
2568
2569 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
2570
2571 * simple.c (bfd_simple_get_relocated_section_contents): Call
2572 _bfd_generic_link_add_symbols instead of bfd_link_add_symbols.
2573
2574 2003-06-04 Svein E. Seldal <Svein.Seldal@solidas.com>
2575
2576 * coff-tic54x.c: Removed the ticoff0_bad_format_hook() and
2577 ticoff1_bad_format_hook() functions. Removed the coff0 and coff1
2578 swaptables.
2579 * coff-tic4x.c: Ditto
2580 * coffcode.h: Added extra arguments to CREATE_BIG_COFF_TARGET_VEC
2581 and CREATE_LITTLE_COFF_TARGET_VEC. Created the macro
2582 CREATE_BIGHDR_COFF_TARGET_VEC. Created the ticoff0_bad_format_hook(),
2583 ticoff1_bad_format_hook() functions. Created the coff0 and coff1
2584 swap tables.
2585 * coff-tic4x.c: Adopted new CREATE_xxx_COFF_TARGET_VEC macros.
2586 * coff-a29k.c: Append COFF_SWAP_TABLE argument
2587 * coff-apollo.c: Ditto
2588 * coff-arm.c: Ditto
2589 * coff-h8300.c: Ditto
2590 * coff-h8500.c: Ditto
2591 * coff-i960.c: Ditto
2592 * coff-m68k.c: Ditto
2593 * coff-m88k.c: Ditto
2594 * coff-mcore.c: Ditto
2595 * coff-sh.c: Ditto
2596 * coff-sparc.c: Ditto
2597 * coff-tic80.c: Ditto
2598 * coff-we32k.c: Ditto
2599 * coff-z8k.c: Ditto
2600 * coff-w65.c: Ditto
2601
2602 2003-06-04 Svein E. Seldal <Svein.Seldal@solidas.com>
2603
2604 * coff-tic4x.c (ticoff0_swap_table, ticoff1_swap_table): Fixed
2605 initialization bug
2606
2607 2003-06-03 Jakub Jelinek <jakub@redhat.com>
2608
2609 * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_STACK.
2610 (bfd_section_from_phdr): Likewise.
2611 (map_sections_to_segments): Create PT_GNU_STACK segment header.
2612 (get_program_header_size): Count with PT_GNU_STACK.
2613 * elf-bfd.h (struct elf_obj_tdata): Add stack_flags.
2614 * elflink.h (bfd_elfNN_size_dynamic_sections): Set stack_flags.
2615
2616 2003-06-03 H.J. Lu <hongjiu.lu@intel.com>
2617
2618 * elflink.h (elf_link_input_bfd): Call linker error_handler
2619 for discarded definitions.
2620
2621 2003-06-03 Elias Athanasopoulos <elathan@phys.uoa.gr>
2622
2623 * syms.c (decode_section_type): Return 'n' if section flags are
2624 SEC_HAS_CONTENTS && SEC_READONLY.
2625
2626 2003-06-03 Nick Clifton <nickc@redhat.com>
2627
2628 * elf32-v850.c (v850_elf_howto_t): Rename R_V850_32to
2629 R_V850_ABS32. Add entry for R_V850_REL32.
2630 (v850_elf_reloc_map): Likewise.
2631 (v850_elf_check_relocs): Likewise.
2632 (v850_elf_perform_relocation): Likewise.
2633 (v850_elf_final_link_relocate): Likewise. Include computation
2634 to make R_V850_REl32 pc-relative.
2635
2636 2003-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2637
2638 * elf32-sh.c (sh_elf_size_dynamic_sections): Create .interp section
2639 and DT_DEBUG dynamic tag even for position independent executables.
2640 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewize.
2641
2642 2003-06-02 Daniel Jacobowitz <drow@mvista.com>
2643
2644 * config.bfd: Move obsolete entries out of the range of the
2645 targmatch sed script.
2646
2647 2003-06-02 Daniel Jacobowitz <drow@mvista.com>
2648
2649 * config.bfd (mips*-dec-bsd*, mips*-*-pe*): Mark as obsolete.
2650
2651 2003-05-31 Jakub Jelinek <jakub@redhat.com>
2652
2653 * elf32-ppc.c (allocate_dynrelocs): Use single slot for first 8192
2654 plt entries, not just 8191.
2655
2656 2003-05-30 Daniel Jacobowitz <drow@mvista.com>
2657
2658 * elfxx-mips.c (_bfd_mips_elf_discard_info): Correct loop index.
2659 Reported by Ken Faiczak <kfaiczak@SANDVINE.com>.
2660
2661 2003-05-30 Ulrich Drepper <drepper@redhat.com>
2662 Jakub Jelinek <jakub@redhat.com>
2663
2664 * elflink.h (elf_link_add_object_symbols): Use !info->executable
2665 instead of info->shared where appropriate.
2666 (bfd_elfNN_size_dynamic_sections, elf_link_output_extsym): Likewise.
2667 * elflink.c (_bfd_elf_create_got_section): Likewise.
2668 (_bfd_elf_link_create_dynamic_sections): Likewise.
2669 (_bfd_elf_link_assign_sym_version): Likewise.
2670 * elf32-i386.c (elf_i386_size_dynamic_sections): Create .interp section
2671 and DT_DEBUG dynamic tag even for position independent executables.
2672 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
2673 * elf32-s390.c (elf_s390_size_dynamic_sections: Likewise.
2674 * elf64-ppc.c (ppc64_elf_size_dynamic_sections: Likewise.
2675 * elf64-s390.c (elf_s390_size_dynamic_sections: Likewise.
2676 * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections: Likewise.
2677 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections: Likewise.
2678 * elf32-sparc.c (elf32_sparc_size_dynamic_sections: Likewise.
2679 * elf64-alpha.c (elf64_alpha_size_dynamic_sections: Likewise.
2680 * elf64-sparc.c (sparc64_elf_size_dynamic_sections: Likewise.
2681
2682 2003-05-30 Kris Warkentin <kewarken@qnx.com>
2683
2684 * elf.c (elfcore_grok_nto_status): Only set lwpid for the active or
2685 signalled thread.
2686 (elfcore_grok_nto_gregs): Only make .reg section for the active thread.
2687
2688 2003-05-29 Nick Clifton <nickc@redhat.com>
2689
2690 * pef.c: Include "safe-ctype.h" instead of <ctype.h>.
2691 Tidy up formatting.
2692 * Makefile.am: Add dependency on safe-ctype.h.
2693 * Makefile.in: Regenerate.
2694
2695 2003-05-29 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2696
2697 * elfxx-mips.c: Don't force symbols local unconditionally.
2698
2699 2003-05-28 Alan Modra <amodra@bigpond.net.au>
2700
2701 * elf32-hppa.c (elf32_hppa_relocate_section): Delete bogus
2702 undefined_symbol call.
2703
2704 2003-05-27 Richard Sandiford <rsandifo@redhat.com>
2705
2706 * elfxx-mips.c (mips_elf_hash_sort_data): Fix formattting.
2707 (mips_elf_link_hash_table): Likewise.
2708
2709 2003-05-22 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2710
2711 * elf64-mips.c (elf_mips_gnu_rel16_s2): Add internally used
2712 R_MIPS_GNU_REL16_S2 support.
2713 (bfd_elf64_bfd_reloc_type_lookup): Use it.
2714 (mips_elf64_rtype_to_howto): Use it.
2715 * elfn32-mips.c (elf_mips_gnu_rel16_s2): Add internally used
2716 R_MIPS_GNU_REL16_S2 support.
2717 (bfd_elf32_bfd_reloc_type_lookup): Use it.
2718 (mips_elf_n32_rtype_to_howto): Use it.
2719
2720 2003-05-21 Stuart F. Downing <sdowning@fame.com>
2721
2722 * som.h: Define PA_2_0 before including a.out.h
2723
2724 2003-05-07 Eric Christopher <echristo@redhat.com>
2725 Alexandre Oliva <aoliva@redhat.com>
2726
2727 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Adjust
2728 pic tests, change to warning.
2729 (_bfd_mips_elf_final_link): Remove EF_MIPS_CPIC flag setting.
2730
2731 2003-05-21 Marcus Comstedt <marcus@mc.pp.se>
2732
2733 * config.bfd: Check for a target triplet of shl-...-netbsdelf as
2734 well as shle-...-netbsdelf. Remove duplicate entry.
2735
2736 2003-05-21 Nick Clifton <nickc@redhat.com>
2737
2738 * elf32-xstormy16.c (xstormy16_elf_howto_table): Fix dst_mask
2739 for X_STORMY16_REL_12 reloc.
2740
2741 * elf.c (bfd_elf_get_needed_list): Use is_elf_hash_table to check
2742 the type of the hash table in the bfd_link_info structure.
2743 (bfd_elf_get_runpath_list): Likewise.
2744
2745 2003-05-19 Roland McGrath <roland@redhat.com>
2746
2747 * elf.c (bfd_elf_bfd_from_remote_memory): New function.
2748 * bfd-in.h: Declare it.
2749 * bfd-in2.h: Regenerated.
2750 * elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): New function.
2751 * elf-bfd.h (struct elf_backend_data): New function pointer member
2752 elf_backend_bfd_from_remote_memory.
2753 (_bfd_elf32_bfd_from_remote_memory, _bfd_elf64_bfd_from_remote_memory):
2754 Declare them.
2755 * elfxx-target.h (elf_backend_bfd_from_remote_memory): New macro.
2756 (elfNN_bed): Add that to the initializer.
2757
2758 2003-05-15 Roland McGrath <roland@redhat.com>
2759
2760 * elf.c (elfcore_grok_note): Grok NT_AUXV note, make ".auxv" section.
2761
2762 2003-05-20 Jakub Jelinek <jakub@redhat.com>
2763
2764 * elflink.h (elf_link_output_extsym): Only issue error about !=
2765 STV_DEFAULT symbols if they are bfd_link_hash_undefined.
2766
2767 2003-05-20 H.J. Lu <hongjiu.lu@intel.com>
2768
2769 * elflink.c (_bfd_elf_merge_symbol): Check ELF_LINK_DYNAMIC_DEF
2770 when removing the old definition for symbols with non-default
2771 visibility.
2772
2773 2003-05-18 Jason Eckhardt <jle@rice.edu>
2774
2775 * elf32-i860.c (elf32_i860_relocate_highadj): Simplify calculation.
2776
2777 2003-05-17 Andreas Schwab <schwab@suse.de>
2778
2779 * elf32-m68k.c (elf_m68k_check_relocs): Cache reloc section in
2780 elf_section_data during processing of pc-relative and absolute
2781 relocations.
2782 (elf_m68k_relocate_section): Use the cached reloc section instead
2783 of computing it again. Fix handling of visibility. Don't modify
2784 addend when copying over a relocation into the output.
2785
2786 2003-05-17 Alan Modra <amodra@bigpond.net.au>
2787
2788 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
2789 to trim plt entries. Move undefweak non-default visibility test..
2790 (allocate_dynrelocs): ..from here.
2791 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't test
2792 dynamic_sections_created here. Update comment. Move undefweak
2793 non-default visibility test..
2794 (allocate_dynrelocs): ..from here. Fix comment.
2795 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
2796 to trim plt entries. Move undefweak non-default visibility test..
2797 (allocate_dynrelocs): ..from here. Fix comment.
2798 * elflink.h (elf_link_output_extsym): Compare ELF_ST_VISIBILITY with
2799 STV_DEFAULT rather than comparing with zero.
2800 * elflink.c (_bfd_elf_merge_symbol): Likewise.
2801 (_bfd_elf_fix_symbol_flags): Likewise. Format comment.
2802
2803 2003-05-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2804
2805 * bfd.c (_bfd_get_gp_value): Prevent illegal access for abfd null
2806 pointers.
2807 (_bfd_set_gp_value): Likewise.
2808
2809 2003-05-16 Michael Snyder <msnyder@redhat.com>
2810 From Bernd Schmidt <bernds@redhat.com>
2811 * archures.c (bfd_mach_h8300sx): New.
2812 * bfd-in2.h: Regenerate.
2813 * cpu-h8300.c (h8300_scan)): Add support for h8300sx.
2814 (h8300sx_info_struct): New.
2815 (h8300s_info_struct): Link to it.
2816 * elf32-h8300.c (elf32_h8_mach): Add support for h8300sx.
2817 (elf32_h8_final_write_processing): Likewise.
2818 (elf32_h8_relax_section): Likewise.
2819
2820 2003-05-16 Kelley Cook <kelleycook@wideopenwest.com>
2821
2822 * config.bfd: Accept i[3-7]86 variants.
2823 * configure.host: Likewise.
2824 * configure.in: Likewise.
2825 * configure: Regenerate.
2826
2827 2003-05-15 H.J. Lu <hongjiu.lu@intel.com>
2828
2829 * elflink.c (_bfd_elf_fix_symbol_flags): Also hide protected
2830 symbol.
2831
2832 2003-05-15 H.J. Lu <hongjiu.lu@intel.com>
2833
2834 * elflink.h (elf_link_check_versioned_symbol): Also allow
2835 the base version.
2836
2837 2003-05-15 Alan Modra <amodra@bigpond.net.au>
2838 H.J. Lu <hongjiu.lu@intel.com>
2839
2840 * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL.
2841 (elf_i386_relocate_section): Likewise.
2842 * elf32-ppc.c (allocate_dynrelocs): Likewise.
2843 (ppc_elf_relocate_section): Likewise.
2844 * elf64-ppc.c (allocate_dynrelocs): Likewise.
2845 (ppc64_elf_relocate_section): Likewise.
2846
2847 2003-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2848
2849 * elf32-mips.c (gprel32_with_gp): Remove useless N64 ABI case.
2850
2851 2003-05-13 Stephane Carrez <stcarrez@nerim.fr>
2852
2853 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Check for
2854 processor capability, allow merge of HC12 and HCS12 in some cases.
2855 (m68hc11_elf_hash_table_create): Use bfd_malloc instead of bfd_zalloc.
2856 * cpu-m68hc12.c (bfd_m68hc12s_arch): New struct.
2857 (bfd_m68hc12_arch): Link it.
2858 (scan_mach): New function.
2859
2860 2003-05-13 Andrew Haley <aph@redhat.com>
2861
2862 * elf.c (bfd_elf_hash): Mask lower 32 bits of hash.
2863
2864 2003-05-13 Alan Modra <amodra@bigpond.net.au>
2865 H.J. Lu <hongjiu.lu@intel.com>
2866
2867 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Move from
2868 elf32-ppc.c. Add ELF_LINK_FORCED_LOCAL check.
2869 * elf32-ppc.c: (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Delete.
2870 (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for dynreloc check.
2871 (ppc_elf_relocate_section): Likewise.
2872 * elf64-ppc.c (allocate_dynrelocs): Likewise.
2873 (ppc64_elf_relocate_section): Likewise. Use for .got relocs too.
2874 (ppc64_elf_adjust_dynamic_symbol): Don't assume symbols with .plt
2875 relocs need no other types.
2876 * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for
2877 dynreloc check.
2878 (elf_i386_relocate_section): Likewise. Use for .got relocs too.
2879 (elf_i386_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL for
2880 .got relocs.
2881
2882 2003-05-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2883
2884 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): For weak symbols,
2885 copy ELF_LINK_NON_GOT_REF from weakdef.
2886 (allocate_dynrelocs): For undef weak syms with non-default
2887 visibility, a) don't allocate plt entries, b) don't allocate
2888 .got relocs, c) discard dyn rel space
2889 (sh_elf_relocate_section): d) don't generate .got relocs, e)
2890 don't generate dynamic relocs.
2891 (sh_elf_copy_indirect_symbol): Don't copy ELF_LINK_NON_GOT_REF
2892 for weakdefs when symbol already adjusted.
2893
2894 2003-05-12 Nick Clifton <nickc@redhat.com>
2895
2896 * elf32-xstormy16.c (xstormy16_elf_howto_table): use 'bitfield'
2897 overflow detection for R_XSTORMY16_16 reloc.
2898
2899 2003-05-12 Paul Clarke <paulc@senet.com.au>
2900
2901 * elf32-h8300.c: Fix typo in name of R_H8_DIR8 reloc.
2902
2903 2003-05-11 Jason Eckhardt <jle@rice.edu>
2904
2905 * elf32-i860.c (elf32_i860_relocate_highadj): Properly
2906 adjust upper bits.
2907 (elf32_i860_relocate_splitn): Obtain upper 5 bits from the
2908 proper place.
2909 (elf32_i860_relocate_pc16): Obtain upper 5 bits from the
2910 proper place.
2911
2912 2003-05-11 Andreas Schwab <schwab@suse.de>
2913
2914 * elf32-m68k.c (elf_m68k_relocate_section): Replace ugly
2915 complicated tests for unresolvable relocs with a simple direct
2916 scheme using "unresolved_reloc" var. Report some detail on
2917 bfd_reloc_outofrange and similar errors.
2918
2919 2003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
2920
2921 * elf32-s390.c (allocate_dynrelocs, elf_s390_relocate_section):
2922 Fix WILL_CALL_FINISH_DYNAMIC_SYMBOL call.
2923 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
2924 * elf64-s390.c: Likewise.
2925
2926 2003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
2927
2928 * elf32-s390.c (ELIMINATE_COPY_RELOCS): Define as one.
2929 (elf_s390_adjust_dynamic_symbol): For weak symbols, copy
2930 ELF_LINK_NON_GOT_REF from weakdef.
2931 (elf_s390_copy_indirect_symbol): Test whether the weakdef sym has
2932 already been adjusted before treating it specially.
2933 * el64-s390.c: Likwise.
2934
2935 2003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
2936
2937 * elf32-s390.c (allocate_dynrelocs): For undef weak syms with
2938 non-default visibility, a) don't make them dynamic, b) discard
2939 space for dynamic relocs.
2940 (elf_s390_relocate_section): Initialize the GOT entries and skip
2941 R_390_{8,16,32}/R_390_PC{16,16DBL,32DBL,32} for weak undefined
2942 symbols with non-default visibility.
2943 * elf64-s390.c: Likewise.
2944
2945 2003-05-09 Alan Modra <amodra@bigpond.net.au>
2946
2947 * cpu-arm.c (arm_check_note): Warning fix.
2948 * elf32-iq2000.c (iq2000_elf_check_relocs): Warning fixes. Arrange
2949 to keep relocs if edited.
2950 (iq2000_elf_print_private_bfd_data): Return TRUE.
2951 * elfxx-ia64.c (elfNN_ia64_relax_section): Use ELFNN_R_SYM, not
2952 ELF64_R_SYM.
2953 (elfNN_ia64_relax_ldxmov): Warning fix.
2954 * xtensa-isa.c (xtensa_add_isa): Warning fix.
2955 * xtensa-modules.c (get_num_opcodes): Warning fix.
2956
2957 2003-05-09 Andrey Petrov <petrov@netbsd.org>
2958
2959 * elf.c (elf_fake_sections): Use correct cast for sh_name.
2960
2961 2003-05-09 Alan Modra <amodra@bigpond.net.au>
2962
2963 * elflink.c (_bfd_elf_link_create_dynamic_sections): Move from
2964 elflink.h. Replace LOG_FILE_ALIGN with bed->s->log_file_align.
2965 (_bfd_elf_create_dynamic_sections): Use bed->s->log_file_align.
2966 (bfd_elf_record_link_assignment): Move from elflink.h.
2967 (_bfd_elf_merge_symbol): Likewise.
2968 (_bfd_elf_add_default_symbol): Likewise.
2969 (_bfd_elf_export_symbol): Likewise.
2970 (_bfd_elf_link_find_version_dependencies): Likewise.
2971 (_bfd_elf_link_assign_sym_version): Likewise.
2972 (_bfd_elf_link_read_relocs): Likewise.
2973 (_bfd_elf_link_size_reloc_section): Likewise.
2974 (_bfd_elf_fix_symbol_flags): Likewise.
2975 (_bfd_elf_adjust_dynamic_symbol): Likewise.
2976 (_bfd_elf_link_sec_merge_syms): Likewise.
2977 (elf_link_read_relocs_from_section): Likewise. Use bed->s->sizeof_rel
2978 and bed->s->sizeof_rela.
2979 (_bfd_elf_link_output_relocs): Likewise.
2980 * elf-bfd.h (struct elf_size_info): Rename file_align to
2981 log_file_align.
2982 (struct elf_info_failed): Move from elflink.h.
2983 (struct elf_assign_sym_version_info): Likewise.
2984 (struct elf_find_verdep_info): Likewise.
2985 (_bfd_elf_create_dynamic_sections): Delete duplicate declaration.
2986 (_bfd_elf_merge_symbol, _bfd_elf_add_default_symbol,
2987 _bfd_elf_export_symbol, _bfd_elf_link_find_version_dependencies,
2988 _bfd_elf_link_assign_sym_version,
2989 _bfd_elf_link_create_dynamic_sections, _bfd_elf_link_read_relocs,
2990 _bfd_elf_link_size_reloc_section, _bfd_elf_link_output_relocs,
2991 _bfd_elf_fix_symbol_flags, _bfd_elf_adjust_dynamic_symbol,
2992 _bfd_elf_link_sec_merge_syms): Declare.
2993 (bfd_elf32_link_create_dynamic_sections): Don't declare.
2994 (_bfd_elf32_link_read_relocs): Likewise.
2995 (bfd_elf64_link_create_dynamic_sections): Likewise.
2996 (_bfd_elf64_link_read_relocs): Likewise.
2997 * elflink.h: Move lots o' stuff elsewhere.
2998 * bfd-in.h (bfd_elf32_record_link_assignment): Don't declare.
2999 (bfd_elf64_record_link_assignment): Likewise.
3000 (bfd_elf_record_link_assignment): Declare.
3001 * bfd-in2.h: Regenerate.
3002 * elfcode.h (elf_link_create_dynamic_sections): Don't declare.
3003 (NAME(_bfd_elf,size_info)): Adjust for log_file_align.
3004 * elf.c (_bfd_elf_init_reloc_shdr): Adjust for bed->s->log_file_align.
3005 (assign_file_positions_for_segments): Likewise.
3006 (assign_file_positions_except_relocs): Likewise.
3007 (swap_out_syms, elfcore_write_note): Likewise.
3008 * elf-m10200.c: Adjust for changed function names.
3009 * elf-m10300.c: Likewise.
3010 * elf32-arm.h: Likewise.
3011 * elf32-h8300.c: Likewise.
3012 * elf32-hppa.c: Likewise.
3013 * elf32-ip2k.c: Likewise.
3014 * elf32-m32r.c: Likewise.
3015 * elf32-m68hc11.c: Likewise.
3016 * elf32-m68hc1x.c: Likewise.
3017 * elf32-m68k.c: Likewise.
3018 * elf32-mips.c: Likewise.
3019 * elf32-ppc.c: Likewise.
3020 * elf32-sh.c: Likewise.
3021 * elf32-v850.c: Likewise.
3022 * elf32-xtensa.c: Likewise.
3023 * elf64-alpha.c: Likewise.
3024 * elf64-hppa.c: Likewise.
3025 * elf64-mmix.c: Likewise.
3026 * elf64-ppc.c: Likewise.
3027 * elf64-sh64.c: Likewise.
3028 * elfxx-ia64.c: Likewise.
3029 * elfxx-mips.c: Likewise.
3030 (MIPS_ELF_LOG_FILE_ALIGN): Use log_file_align.
3031 * elf64-alpha.c (alpha_elf_size_info): Adjust for log_file_align.
3032 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
3033 * elf64-mips.c (mips_elf64_size_info): Likewise.
3034 * elf64-s390.c (s390_elf64_size_info): Likewise.
3035 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
3036
3037 2003-05-08 H.J. Lu <hongjiu.lu@intel.com>
3038
3039 * elflink.h (elf_add_default_symbol): After skipping the
3040 unversioned symbol, go to non-default one.
3041
3042 2003-05-07 H.J. Lu <hongjiu.lu@intel.com>
3043
3044 * elfxx-ia64.c (_bfd_elf_link_hash_hide_symbol): Also clear the
3045 want_plt field.
3046 (elfNN_ia64_relocate_section): Don't do dynamic symbol lookup
3047 for symbols with non-default visibility.
3048
3049 2003-05-07 H.J. Lu <hongjiu.lu@intel.com>
3050
3051 * elflink.h (elf_link_check_versioned_symbol): Also handle the
3052 case that a DSO references a hidden symbol which may be
3053 satisfied by a versioned symbol in another DSO.
3054 (elf_link_output_extsym): Check versioned definition for hidden
3055 symbol referenced by a DSO.
3056
3057 2003-05-07 Nick Clifton <nickc@redhat.com>
3058
3059 * elf32-xstormy16.c (xstormy16_elf_howto_table): Reset
3060 R_XSTORMY16_16 reloc to ignore overflows.
3061
3062 2003-05-06 Alexandre Oliva <aoliva@redhat.com>
3063
3064 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Improve
3065 error message for mixing different-endian files. Check for ABI
3066 compatibility of input files with the selected emulation.
3067
3068 2003-05-05 Alan Modra <amodra@bigpond.net.au>
3069
3070 * elf32-i386.c (allocate_dynrelocs): For undef weak syms with
3071 non-default visibility, a) don't make them dynamic, b) discard
3072 space for dynamic relocs.
3073 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
3074
3075 * elf32-ppc.c (allocate_dynrelocs): For undef weak syms with
3076 non-default visibility, a) don't allocate plt entries, b) don't
3077 allocate .got relocs, c) discard dyn rel space,
3078 (ppc_elf_relocate_section): d) don't generate .got relocs, e)
3079 don't generate dynamic relocs.
3080 * elf64-ppc.c (allocate_dynrelocs): As above.
3081 (ppc64_elf_relocate_section): As above.
3082
3083 2003-05-05 Andreas Jaeger <aj@suse.de>
3084
3085 * elf64-x86-64.c (allocate_dynrelocs): Don't allocate dynamic
3086 relocation entries for weak undefined symbols with non-default
3087 visibility.
3088 (elf64_x86_64_relocate_section): Initialize the GOT entries and
3089 skip R_386_32/R_386_PC32 for weak undefined symbols with
3090 non-default visibility.
3091
3092 2003-05-04 H.J. Lu <hjl@gnu.org>
3093
3094 * elf32-i386.c (allocate_dynrelocs): Don't allocate dynamic
3095 relocation entries for weak undefined symbols with non-default
3096 visibility.
3097 (elf_i386_relocate_section): Initialize the GOT entries and
3098 skip R_386_32/R_386_PC32 for weak undefined symbols with
3099 non-default visibility.
3100
3101 * elfxx-ia64.c (allocate_fptr): Don't allocate function
3102 descriptors for weak undefined symbols with non-default
3103 visibility.
3104 (allocate_dynrel_entries): Don't allocate relocation entries
3105 for symbols resolved to 0.
3106 (set_got_entry): Don't install dynamic relocation for weak
3107 undefined symbols with non-default visibility.
3108 (set_pltoff_entry): Likewise.
3109
3110 * elflink.h (elf_fix_symbol_flags): Hide weak undefined symbols
3111 with non-default visibility.
3112 (elf_link_output_extsym): Don't make weak undefined symbols
3113 with non-default visibility dynamic.
3114
3115 2003-05-04 H.J. Lu <hjl@gnu.org>
3116
3117 * elflink.h (elf_merge_symbol): Correctly handle weak definiton.
3118
3119 2003-05-04 H.J. Lu <hjl@gnu.org>
3120
3121 * elflink.h (elf_merge_symbol): Don't record a hidden/internal
3122 symbol dynamic. Check indirection when removing the old
3123 definition for symbols with non-default visibility.
3124 (elf_add_default_symbol): Skip when told by elf_merge_symbol.
3125
3126 2003-05-02 Nick Clifton <nickc@redhat.com>
3127
3128 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make the
3129 R_XSTORMY16_8 and R_XSTORMY16_16 relocs detect and complain about
3130 unsigned overflow.
3131
3132 2003-05-02 Andreas Jaeger <aj@suse.de>
3133
3134 * elf64-x86-64.c (elf_x86_64_copy_indirect_symbol): Don't copy
3135 ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
3136 (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
3137 (elf_x86_64_adjust_dynamic_symbol): For weak symbols, copy
3138 ELF_LINK_NON_GOT_REF from weakdef.
3139
3140 2003-05-02 Charles Lepple <clepple@ghz.cc>
3141 Nick Clifton <nickc@redhat.com>
3142
3143 * acinclude.m4: Fix name of --enable-install-libbfd switch.
3144 * aclocal.m4: Regenerate.
3145 * configure: Regenerate.
3146 * Makefile.in: Regenerate.
3147
3148 2003-05-01 Alan Modra <amodra@bigpond.net.au>
3149
3150 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Test whether the
3151 weakdef sym has already been adjusted before treating it specially.
3152 * elf32-i386.c (elf_i386_copy_indirect_symbol): Don't copy
3153 ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
3154 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
3155 (ppc64_elf_check_relocs): Set ELF_LINK_NON_GOT_REF.
3156
3157 2003-04-28 H.J. Lu <hjl@gnu.org>
3158
3159 * elfxx-ia64.c (elfNN_ia64_relax_section): Relax ldxmov during
3160 the relax finalize pass.
3161
3162 * section.c (struct sec): Add need_finalize_relax and remove
3163 flag11.
3164 (STD_SECTION): Update struct sec initializer.
3165 * bfd-in2.h: Regenerated.
3166
3167 2003-04-28 H.J. Lu <hjl@gnu.org>
3168
3169 * elflink.h (elf_merge_symbol): Call elf_backend_copy_indirect_symbol
3170 to copy any information related to dynamic linking when we flip
3171 the indirection.
3172
3173 2003-04-27 H.J. Lu <hjl@gnu.org>
3174
3175 * elf-bfd.h (ELF_LINK_DYNAMIC_DEF): New.
3176 (ELF_LINK_DYNAMIC_WEAK): New.
3177
3178 * elflink.h (elf_merge_symbol): Add one argument to indicate if
3179 a symbol should be skipped. Ignore definitions in dynamic
3180 objects for symbols with non-default visibility.
3181 (elf_add_default_symbol): Adjusted.
3182 (elf_link_add_object_symbols): Check if a symbol should be
3183 skipped. Don't merge the visibility field with the one from
3184 a dynamic object.
3185 (elf_link_check_versioned_symbol): Use undef_bfd.
3186 (elf_link_output_extsym): Warn if a forced local symbol is
3187 referenced from dynamic objects. Make non-weak undefined symbol
3188 with non-default visibility a fatal error.
3189
3190 2003-04-27 Daniel Jacobowitz <drow@mvista.com>
3191
3192 * configure.in: Bump version on HEAD to 2.14.90.
3193 * configure: Regenerated.
3194
3195 2003-04-26 Stephane Carrez <stcarrez@nerim.fr>
3196
3197 PR savannah/3331:
3198 * elf32-m68hc11.c (m68hc11_elf_relax_section): Clear prev_insn_group
3199 when we couldn't relax something.
3200
3201 2003-04-25 Alan Modra <amodra@bigpond.net.au>
3202
3203 * elflink.h (elf_merge_symbol): When we find a regular definition
3204 for an indirect symbol, flip the indirection so that the old
3205 direct symbol now points to the new definition.
3206
3207 2003-04-24 Roland McGrath <roland@redhat.com>
3208
3209 * elf.c (bfd_section_from_phdr): Map PT_GNU_EH_FRAME to "eh_frame_hdr".
3210
3211 2003-04-24 Alan Modra <amodra@bigpond.net.au>
3212
3213 * elf32-ppc.c: Formatting and comment fixes.
3214 (ELIMINATE_COPY_RELOCS): Move before ppc_elf_copy_indirect_symbol.
3215 (ppc_elf_copy_indirect_symbol): Copy flags here for weakdefs.
3216
3217 2003-04-24 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
3218
3219 * archures.c (bfd_mach_h8300hn, bfd_mach_h8300sn): Added.
3220 * bfd-in2.h: Rebuilt.
3221 * coff-h8300.c (BADMAG): Add check for H8300HNBADMAG & H8300SNBADMAG.
3222 * coffcode.h (coff_set_arch_mach_hook): Add case for H8300HNMAGIC
3223 & H8300SNMAGIC.
3224 (coff_set_flags): Add case for bfd_mach_h8300hn & bfd_mach_h8300sn.
3225 * cpu-h8300.c (h8300_scan): Handle h8300hn, h8300sn.
3226 (h8300sn_info_struct, h8300hn_info_struct): New.
3227 * elf32-h8300.c (elf32_h8_mach): Handle case for h8300hn & h8300sn
3228 (elf32_h8_final_write_processing): Likewise.
3229
3230 2003-04-23 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3231
3232 * elf32-sh.c (tpoff): New.
3233 (struct elf_sh_dyn_relocs): Remove tls_tpoff32.
3234 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
3235 (allocate_dynrelocs): Don't make unnecessary dynamic TLS
3236 relocations. Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses.
3237 (sh_elf_relocate_section): Likewise. Remove unnecessary tests.
3238 (dtpoff_base): Fix wrong indentation.
3239 (sh_elf_check_relocs): Don't set DF_STATIC_TLS flag with non-TLS
3240 relocations. Don't set tls_tpoff32 flag. Don't make unnecessary
3241 R_SH_TLS_TPOFF32 relocations.
3242
3243 2003-04-23 J"orn Rennecke <joern.rennecke@superh.com>
3244
3245 * archures.c (enum bfd_architecture): Amend comment to refer to SuperH.
3246 * cpu-sh.c: Likewise.
3247 * elf32-sh.c: Likewise.
3248 * reloc.c (bfd_reloc_code_real): Likewise.
3249 * elf32-sh64-com.c: Change comment to refer to SuperH.
3250 * elf32-sh64.c: Likewise.
3251 * elf64-sh64.c: Likewise.
3252 * bfd-in2.h (enum bfd_architecture): Regenerate.
3253
3254 2003-04-23 Alan Modra <amodra@bigpond.net.au>
3255
3256 From Julien LEMOINE <speedblue@debian.org>
3257 * elf32-i386.c (elf_i386_info_to_howto): Delete.
3258 (elf_info_to_howto): Define as elf_i386_info_to_howto_rel.
3259
3260 2003-04-22 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
3261
3262 * archures.c: Replace references to Mitsubishi M32R with references
3263 to Renesas M32R.
3264 * relocs.c: Likewise.
3265 * bfd-in2.h: Regenerate.
3266
3267 2003-04-21 Richard Henderson <rth@redhat.com>
3268
3269 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Return false for an
3270 executable when a symbol is defined both regular and dynamic.
3271
3272 2003-04-21 Stephane Carrez <stcarrez@nerim.fr>
3273
3274 * Makefile.am (BFD32_BACKENDS): Add elf32-m68hc1x.lo.
3275 (elf32-m68hc1x.lo): Update dependencies
3276 * configure.in: Add elf32-m68hc1x.lo.
3277 * configure: Rebuild.
3278 * Makefile.in: Rebuild.
3279
3280 2003-04-21 Stephane Carrez <stcarrez@nerim.fr>
3281
3282 * elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
3283 (m68hc11_elf_hash_table_create): New function.
3284 (elf32_m68hc11_link_hash_table_free): New function.
3285 (stub_hash_newfunc): New function.
3286 (m68hc11_add_stub): New function.
3287 (elf32_m68hc11_add_symbol_hook): New function.
3288 (elf32_m68hc11_setup_section_lists): New function.
3289 (elf32_m68hc11_next_input_section): New function.
3290 (elf32_m68hc11_size_stubs): New function.
3291 (elf32_m68hc11_build_stubs): New function.
3292 (m68hc11_get_relocation_value): New function.
3293 (elf32_m68hc11_relocate_section): Call the above to redirect
3294 some relocations to the trampoline code.
3295 (m68hc11_elf_export_one_stub): New function.
3296 (m68hc11_elf_set_symbol): New function.
3297 (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse.
3298 (m68hc11_elf_get_bank_parameters): Get parameters only when the info
3299 is not yet initialized.
3300
3301 * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
3302 (elf32_m68hc11_stub_hash_entry): New struct.
3303 (m68hc11_page_info): Add trampoline handler address.
3304 (m68hc11_elf_link_hash_table): Add stubs generation members.
3305 (elf32_m68hc11_add_symbol_hook): Declare.
3306 (elf32_m68hc11_setup_section_lists): Declare.
3307 (elf32_m68hc11_size_stubs): Declare.
3308 (elf32_m68hc11_build_stubs): Declare.
3309
3310 * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c.
3311 (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise.
3312 (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto.
3313 (_bfd_m68hc11_elf_set_private_flags): Ditto.
3314 (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto.
3315 (_bfd_m68hc11_elf_print_private_bfd_data): Ditto.
3316 (bfd_elf32_bfd_link_hash_table_create): Define.
3317 (elf_backend_add_symbol_hook): Define.
3318 (m68hc11_elf_bfd_link_hash_table_create): New function.
3319 (m68hc11_elf_build_one_stub): New function.
3320 (m68hc11_elf_size_one_stub): New function.
3321 (m68hc11_elf_bfd_link_hash_table_create): Install the above.
3322 (bfd_elf32_bfd_link_hash_table_create): Define.
3323
3324 * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove.
3325 (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked.
3326 (m68hc12_phys_addr): Ditto.
3327 (m68hc12_phys_page): Ditto.
3328 (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c.
3329 (elf32_m68hc11_gc_mark_hook): Likewise.
3330 (elf32_m68hc11_gc_sweep_hook): Likewise.
3331 (elf32_m68hc11_check_relocs): Likewise.
3332 (elf32_m68hc11_relocate_section): Likewise.
3333 (_bfd_m68hc12_elf_set_private_flags): Likewise.
3334 (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise.
3335 (_bfd_m68hc12_elf_print_private_bfd_data): Likewise.
3336 (m68hc12_elf_build_one_stub): New function.
3337 (m68hc12_elf_size_one_stub): New function.
3338 (m68hc12_elf_bfd_link_hash_table_create): New function, use the above.
3339 (elf_backend_add_symbol_hook): Define.
3340 (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
3341
3342 2003-04-18 Nick Clifton <nickc@redhat.com>
3343
3344 * format.c (bfd_check_format_matches): Only check associated
3345 vector if the matching_vector has been created.
3346
3347 2003-04-15 Alexandre Oliva <aoliva@redhat.com>
3348
3349 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Fix typo in
3350 2003-04-09's change.
3351
3352 2003-04-15 Brian Ford <ford@vss.fsi.com>
3353
3354 * peicode.h (coff_swap_scnhdr_in): If a section holds
3355 uninitialized data and is from an object file or from an
3356 executable image that has not initialized the s_size field, or if
3357 the physical size is padded, use the virtual size (stored in
3358 s_paddr) instead.
3359
3360 2003-04-15 H.J. Lu <hjl@gnu.org>
3361
3362 * elflink.h (elf_link_add_object_symbols): Properly report
3363 filename for alignment reduction.
3364
3365 2003-04-15 Rohit Kumar Srivastava <rohits@kpitcummins.com>
3366
3367 * archures.c: Replace occurrances of 'Hitachi' with 'Renesas'.
3368 * reloc.c: Likewise.
3369 * coff-h8300.c: Likewise.
3370 * coff-h8500.c: Likewise.
3371 * coff-sh.c: Likewise.
3372 * cpu-h8300.c: Likewise.
3373 * cpu-sh.c: Likewise.
3374 * elf32-h8300.c: Likewise.
3375 * elf32-sh.c: Likewise.
3376 * elf32-sh64-com.c: Likewise.
3377 * elf32-sh64.c: Likewise.
3378 * elf64-sh64.c: Likewise.
3379 * bfd-in2.h: Regenerate.
3380
3381 2003-04-14 H.J. Lu <hjl@gnu.org>
3382
3383 * elflink.h (elf_link_add_object_symbols): Maintain maximum
3384 alignment for common symbols. Warn reducing alignment for
3385 common symbols. Report old filename when symbol size changes.
3386
3387 2003-04-12 Alexandre Oliva <aoliva@redhat.com>
3388
3389 * elfxx-mips.c (mips_elf_calculate_relocation): Adjust two other
3390 occurrences of the same test changed in the previous patch.
3391 Optimize.
3392
3393 2003-04-11 Alexandre Oliva <aoliva@redhat.com>
3394
3395 * elfxx-mips.c (mips_elf_get_global_gotsym_index): New.
3396 (mips_elf_calculate_relocation): Decay GOT_PAGE/GOT_OFST to
3397 GOT_DISP/addend only if the symbol got a global GOT entry.
3398
3399 2003-04-10 Alexandre Oliva <aoliva@redhat.com>
3400
3401 * elfxx-mips.c (mips_elf_calculate_relocation): Decay
3402 GOT_PAGE/GOT_OFST referencing overridable symbol to
3403 GOT_DISP/addend.
3404 (_bfd_mips_elf_check_relocs): Handle GOT_PAGE referencing
3405 global symbol as GOT_DISP.
3406
3407 2003-04-10 Bob Wilson <bob.wilson@acm.org>
3408
3409 * elf32-xtensa.c (elf_xtensa_relocate_section): Don't continue to the
3410 next relocation on an undefined symbol.
3411
3412 2003-04-09 Richard Henderson <rth@redhat.com>
3413
3414 * elf64-alpha.c (elf64_alpha_relocate_section) <R_ALPHA_GPREL32>:
3415 Ignore relocations against r_symndx == 0.
3416
3417 2003-04-09 H.J. Lu <hjl@gnu.org>
3418
3419 * elf64-alpha.c (elf64_alpha_relocate_section): Don't return
3420 FALSE for undefined symbols.
3421 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
3422
3423 2003-04-09 Alexandre Oliva <aoliva@redhat.com>
3424
3425 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Try DWARF3-standard
3426 and IRIX-specific shift-to-64-bit 4-byte lengths before following
3427 addr_size.
3428
3429 2003-04-08 Alexandre Oliva <aoliva@redhat.com>
3430
3431 * elf32-mips.c (bfd_elf32_bfd_reloc_type_lookup): Detect (ctor)
3432 pointer size from ABI, not arch_bits_per_address.
3433
3434 2003-04-07 Kevin Buettner <kevinb@redhat.com>
3435
3436 * elfn32-mips.c (elf32_mips_grok_prstatus): Adjust core file related
3437 constants for n32 ABI.
3438
3439 2003-04-06 Andrew Cagney <cagney@redhat.com>
3440
3441 * simple.c (bfd_simple_get_relocated_section_contents): Disable
3442 free that leads to GDB vs BFD memory corruption.
3443
3444 2003-04-04 Stephane Carrez <stcarrez@nerim.fr>
3445
3446 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Also adjust
3447 symbols that mark the end of the section.
3448 (m68hc11_elf_relax_section): Use R_M68HC11_PCREL_8 relocs when
3449 converting to a relative branch so that the offset is computed after
3450 the relaxation; also relocate a jsr into a bsr if possible but don't
3451 relax them if they are to a far symbol as we need to call the
3452 trampoline code.
3453 (elf_m68hc11_howto_table): Set pcrel_offset to true.
3454
3455 2003-04-04 Svein E. Seldal <Svein.Seldal@solidas.com>
3456
3457 * archures.c: Namespace cleanup. Rename bfd_mach_c3x to
3458 bfd_mach_tic3x and bfd_mach_c4x to bfd_mach_tic4x
3459 * bfd-in2.h: Regenerate
3460 * coff-tic4x.c: Namespace cleanup. Replace s/c4x/tic4x/
3461 * cpu-tic4x.c: Ditto
3462
3463 2003-04-03 Nick Clifton <nickc@redhat.com>
3464
3465 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Compute ps and ss
3466 differently for object files and executables.
3467 * peicode.h (coff_swap_scnhdr_in): Only set the s_size field
3468 for object files or for executables who have not already
3469 initialised the field.
3470 * libpei.h (bfd_pe_executable_p): New macro. Return true if
3471 the PE format bfd is an executable.
3472
3473 2003-04-03 Alan Modra <amodra@bigpond.net.au>
3474
3475 * elf32-ppc.c (ppc_elf_check_relocs): Don't use SYMBOL_REFERENCES_LOCAL
3476 here as it's too early to reliably determine locality.
3477 (ppc_elf_gc_sweep_hook): Likewise.
3478 (SYMBOL_REFERENCES_LOCAL): Expand comment.
3479
3480 2003-04-02 Bob Wilson <bob.wilson@acm.org>
3481
3482 * xtensa-modules.c: Remove comment indicating that this is a
3483 generated file.
3484
3485 2003-04-02 Alan Modra <amodra@bigpond.net.au>
3486
3487 * elfxx-mips.c (_bfd_mips_elf_hide_symbol): Test for NULL dynobj.
3488
3489 2003-04-01 Bob Wilson <bob.wilson@acm.org>
3490
3491 * Makefile.am (ALL_MACHINES): Add cpu-xtensa.lo.
3492 (ALL_MACHINES_CFILES): Add cpu-xtensa.c.
3493 (BFD32_BACKENDS): Add elf32-xtensa.lo, xtensa-isa.lo, and
3494 xtensa-modules.lo.
3495 (BFD32_BACKENDS_CFILES): Add elf32-xtensa.c, xtensa-isa.c, and
3496 xtensa-modules.c.
3497 (cpu-xtensa.lo): New target.
3498 (elf32-xtensa.lo): Likewise.
3499 (xtensa-isa.lo): Likewise.
3500 (xtensa-modules.lo): Likewise.
3501 * Makefile.in: Regenerate.
3502 * archures.c (bfd_architecture): Add bfd_{arch,mach}_xtensa.
3503 (bfd_archures_list): Add bfd_xtensa_arch.
3504 * config.bfd: Handle xtensa-*-*.
3505 * configure.in: Handle bfd_elf32_xtensa_{le,be}_vec.
3506 * configure: Regenerate.
3507 * reloc.c: Add BFD_RELOC_XTENSA_{RTLD,GLOB_DAT,JMP_SLOT,RELATIVE,
3508 PLT,OP0,OP1,OP2,ASM_EXPAND,ASM_SIMPLIFY}.
3509 * targets.c (bfd_elf32_xtensa_be_vec): Declare.
3510 (bfd_elf32_xtensa_le_vec): Likewise.
3511 (bfd_target_vector): Add bfd_elf32_xtensa_{be,le}_vec.
3512 * cpu-xtensa.c: New file.
3513 * elf32-xtensa.c: Likewise.
3514 * xtensa-isa.c: Likewise.
3515 * xtensa-modules.c: Likewise.
3516 * libbfd.h: Regenerate.
3517 * bfd-in2.h: Likewise.
3518
3519 2003-04-01 Nick Clifton <nickc@redhat.com>
3520
3521 * archures.c (bfd_mach_arm_unknown): Define.
3522 * bfd-in.h (bfd_arm_merge_machines, bfd_arm+update_notes,
3523 bfd_arm_get_mach_from_notes): Prototype.
3524 * bfd-in2.h: Regenerate.
3525 * coff-arm.c (coff_arm_merge_private_bfd_data): Call
3526 bfd_arm_merge_machines.
3527 (coff_arm_final_link_postscript): Call bfd_arm_update_notes.
3528 * coffcode.h (coff_set_arch_mach_hook): Call
3529 bfd_arm_get_mach_from_notes.
3530 * coffgen.c (coff_real_object_p): Revert previous delta.
3531 * cpu_arm.c (arm_check_note): New function. Examine a note in a
3532 .note section.
3533 (bfd_arm_merge_machines): New function: Handle the merging of ARM
3534 binaries compiled for different architectures..
3535 (bfd_arm_update_notes): New function: Update an ARM note section.
3536 (bfd_arm_get_mach_from_notes): New function: Extract a bfd machine
3537 number from an ARM note section.
3538 * elf32-arm.h (elf32_arm_object_p): Use
3539 bfd_arm_get_mach_from_notes.
3540 (elf32_arm_merge_private_bfd_data): Use bfd_arm_merge_machines.
3541 (elf32_arm_final_write_processing): Use bfd_arm_update_notes.
3542
3543 2003-04-01 Ben Elliston <bje@wasabisystems.com>
3544
3545 * dwarf2.c (read_attribute_value): Correct typo in comment.
3546
3547 2003-04-01 Nick Clifton <nickc@redhat.com>
3548
3549 * dwarf2.c (concat_filename): Use bfd_malloc() and strdup()
3550 instead of concat().
3551 (decode_line_info): Only free filename if it is not NULL.
3552 (add_line_info): Make a copy of the filename when storing it into
3553 the info structure.
3554
3555 2003-03-31 Andreas Schwab <schwab@suse.de>
3556 Daniel Jacobowitz <drow@mvista.com>
3557
3558 * simple.c (bfd_simple_get_relocated_section_contents): Add
3559 parameter symbol_table. Optionally use it instead of the symbol
3560 table from the bfd. Save and restore output offsets and output
3561 sections around bfd_get_relocated_section_contents. Fix a memory
3562 leak.
3563 (simple_save_output_info, simple_restore_output_info): New
3564 functions.
3565 * bfd-in2.h: Regenerate.
3566 * dwarf2.c (read_abbrevs): Use
3567 bfd_simple_get_relocated_section_contents instead of
3568 bfd_get_section_contents.
3569 (decode_line_info): Likewise.
3570 (_bfd_dwarf2_find_nearest_line): Likewise. Don't call
3571 find_rela_addend.
3572 (find_rela_addend): Remove.
3573 * elfxx-ia64.c (elfNN_ia64_reloc): Weaken sanity check for
3574 debugging sections.
3575 (elfNN_ia64_hash_table_create): Create the hash table with malloc,
3576 not bfd_zalloc.
3577
3578 2003-03-31 David Heine <dlheine@suif.stanford.edu>
3579
3580 * aoutx.h (aout_link_hash_table_create): Use bfd_malloc instead of
3581 bfd_alloc.
3582 * dwarf2.c (concat_filename): Always allocate space for the
3583 returned filename.
3584 (decode_line_info): Free the allocated filename returned by
3585 concat_filename.
3586 * elf-eh-frame.c (bfd_elf_write_section_eh_frame): Fix memory leaks.
3587 * elf.c (copy_private_bfd_data): Likewise.
3588 (_bfd_elf_slurp_version_tables): Fix bug freeing contents pointer.
3589 * elflink.h (elf_link_sort_relocs): Fix memory leak.
3590 * format.c (bfd_check_format_matches): Likewise.
3591 * linker.c (bfd_generic_final_link): Likewise.
3592 * opncls.c (find_separate_debug_info): Likewise.
3593 * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
3594
3595 2003-03-28 H.J. Lu <hjl@gnu.org>
3596
3597 * elflink.h (elf_link_add_object_symbols): Correctly combine
3598 visibilities.
3599
3600 2003-03-27 Jakub Jelinek <jakub@redhat.com>
3601
3602 * elfxx-ia64.c (elfNN_ia64_relax_section): Reset self_dtpmod_offset
3603 to -1 before recomputing got offsets.
3604
3605 2003-03-26 Andreas Schwab <schwab@suse.de>
3606
3607 * elf32-m68k.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
3608 (elf_m68k_relocate_section): Use it to correctly handle symbols
3609 forced to be local.
3610 (elf_m68k_finish_dynamic_symbol): Emit RELATIVE reloc for got
3611 entries for symbols that are forced to be local.
3612
3613 2003-03-25 Alexandre Oliva <aoliva@redhat.com>
3614
3615 * elfxx-mips.c (_bfd_mips_relax_section): New function.
3616 * elfxx-mips.h (_bfd_mips_relax_section): Declare.
3617 * elfn32-mips.c, elf64-mips.c: Use it.
3618
3619 2003-03-25 Stan Cox <scox@redhat.com>
3620 Nick Clifton <nickc@redhat.com>
3621
3622 Contribute support for Intel's iWMMXt chip - an ARM variant:
3623
3624 * archures.c: Add bfd_mach_arm_iWMMXt.
3625 * reloc.c: Add BFD_RELOC_ARM_CP_OFF_IMM_S2.
3626 * bfd-in2.h: Regenerate.
3627 * libbfd.h: Regenerate.
3628 * coff-arm.c (coff_arm_merge_private_bfd_data): Allow iWMMXt
3629 object files to be linked with XScale ones.
3630 (coff_arm_final_link_postscript): Update note section.
3631 * coffcode.h (coff_set_arch_mach_hook): Handle note section.
3632 * coffgen.c (coff_real_object_p): Call bfd_coff_set_arch_mach_hook
3633 after identifying a coff binary.
3634 * cpu-arm.c (processors): Add iWMMXt.
3635 (arch_inf): Likewise.
3636 * elf32-arm.h (arm_object_p): Handle note section.
3637 (elf32_arm_merge_private_bfd_data): Allow iWMMXt object files to
3638 be linked with XScale ones.
3639 (elf32_arm_section_flags): New function: Set flags on note section.
3640 (elf32_arm_final_write_processing): Handle note section.
3641
3642 2003-03-21 DJ Delorie <dj@redhat.com>
3643
3644 * elf32-xstormy16.c (elf32_xstormy16_relocate_section): Call
3645 _bfd_elf_rela_local_sym.
3646
3647 2003-03-20 H.J. Lu <hjl@gnu.org>
3648
3649 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't try relax for
3650 non-ELF outputs.
3651
3652 2003-03-20 Nick Clifton <nickc@redhat.com>
3653
3654 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Initialise $idata2 and
3655 $idata5 in case bfd_coff_final_link is not called.
3656
3657 2003-03-19 Jakub Jelinek <jakub@redhat.com>
3658
3659 * elf64-sparc.c (struct sparc64_elf_section_data): Add reloc_count
3660 field.
3661 (canon_reloc_count): Define.
3662 (sparc64_elf_slurp_one_reloc_table, sparc64_elf_slurp_reloc_table,
3663 sparc64_elf_canonicalize_dynamic_reloc): Use it instead of
3664 reloc_count.
3665 (sparc64_elf_canonicalize_reloc): New routine.
3666 (bfd_elf64_canonicalize_reloc): Define.
3667
3668 2003-03-18 Jakub Jelinek <jakub@redhat.com>
3669
3670 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle relaxation
3671 againt mergeable sections. Take r_addend into account when caching
3672 trampolines.
3673
3674 2003-03-18 Richard Henderson <rth@redhat.com>
3675
3676 * elfxx-ia64.c (get_dyn_sym_info): Return NULL gracefully for
3677 local symbols that have no dyninfo.
3678
3679 2003-03-14 Gene Smith <gene.smith@siemens.com>
3680
3681 * ieee.c (ieee_write_expression): Handle the case where symbol is
3682 NULL.
3683 General formatting improvements.
3684
3685 2003-03-13 Nick Clifton <nickc@redhat.com>
3686
3687 * configure.in (LINGUAS): Add zh_CN.
3688 * configure: Regenerate.
3689 * po/zh_CN.po: New file.
3690
3691 2003-03-13 Elias Athanasopoulos <elathan@phys.uoa.gr>
3692
3693 * aout-cris.c (BYTES_IN_WORD): Don't define.
3694 aout-encap.c: Likewise.
3695 aout-ns32k.c: Likewise.
3696 aout-tic30.c: Likewise.
3697 hp300bsd.c: Likewise.
3698 i386aout.c: Likewise.
3699 i386dynix.c: Likewise.
3700 i386linux.c: Likewise.
3701 i386lynx.c: Likewise.
3702 i386mach3.c: Likewise.
3703 m68k4knetbsd.c: Likewise.
3704 m68klinux.c: Likewise.
3705 m68klynx.c: Likewise.
3706 m68knetbsd.c: Likewise.
3707 m88kmach3.c: Likewise.
3708 mipsbsd.c: Likewise.
3709 newsos3.c: Likewise.
3710 sparclinux.c: Likewise.
3711 sparclynx.c: Likewise.
3712 sparcnetbsd.c: Likewise.
3713 vaxbsd.c: Likewise. Fix comment formatting.
3714
3715 2003-03-12 Alexandre Oliva <aoliva@redhat.com>
3716
3717 * Reverted 2003-03-02's patch.
3718
3719 * elfxx-target.h (bfd_elfNN_canonicalize_reloc): Make it
3720 overridable.
3721 * elf64-mips.c (mips_elf64_canonicalize_reloc,
3722 mips_elf64_get_dynamic_reloc_upper_bound,
3723 mips_elf64_canonicalize_dynamic_reloc): New, adapted from elf.c.
3724 (bfd_elf64_get_canonicalize_reloc,
3725 bfd_elf64_get_dynamic_reloc_upper_bound,
3726 bfd_elf64_canonicalize_dynamic_reloc): Define.
3727 (mips_elf64_slurp_reloc_table): Support dynamic.
3728 (mips_elf64_slurp_one_reloc_table): Adjust.
3729
3730 2003-03-12 Nick Clifton <nickc@redhat.com>
3731
3732 * xsym.c (bfd_sym_fetch_type_information_table_entry): Change
3733 'index' to 'offset' in test for zero value.
3734
3735 2003-03-11 Alexandre Oliva <aoliva@redhat.com>
3736
3737 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Do not create
3738 dynamic relocations pointing to local or section symbols, use the
3739 NULL symbol instead. Document the choice to not emit an
3740 additional R_MIPS_64 relocation.
3741
3742 2003-03-11 Alan Modra <amodra@bigpond.net.au>
3743
3744 * elf32-ppc.c (ppc_elf_relocate_section): Subtract tls seg vma from
3745 zero index dynamic tls relocs generated for the GOT. Tidy code.
3746 Set "relocation" to 1 on DTPMOD32 relocs. Optimize HA adjustment.
3747 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
3748
3749 2003-03-07 Alan Modra <amodra@bigpond.net.au>
3750
3751 * elf32-ppc.c (ppc_elf_relocate_section): Don't look for a nop after
3752 a tls_get_addr call.
3753
3754 * elf32-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
3755 (ppc_elf_adjust_dynamic_symbol): For weak symbols, copy
3756 ELF_LINK_NON_GOT_REF from weakdef.
3757 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
3758 (ppc64_elf_adjust_dynamic_symbol): For weak symbols, copy
3759 ELF_LINK_NON_GOT_REF from weakdef.
3760 * elf32-i386.c (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
3761 (elf_i386_adjust_dynamic_symbol): For weak symbols, copy
3762 ELF_LINK_NON_GOT_REF from weakdef.
3763
3764 2003-03-06 Jakub Jelinek <jakub@redhat.com>
3765 Andrew Haley <aph@redhat.com>
3766
3767 * elflink.h (elf_bfd_discard_info): Don't process eh frames if
3768 output is relocateable.
3769
3770 2003-03-06 Steven Konopa <skonopa@kgo.csc.com>
3771
3772 * som.c (som_fixup_formats): Correct formats for R_AUX_UNWIND and
3773 R_COMMENT.
3774
3775 2003-03-06 Alan Modra <amodra@bigpond.net.au>
3776
3777 * elf32-ppc.c (ppc_elf_create_linker_section): Don't capitalize
3778 error messages.
3779 (ELIMINATE_COPY_RELOCS): Define to zero.
3780 (ppc_elf_relocate_section): Don't deref htab->tls_sec when calculating
3781 TLSLD relocs. Report reloc types on a number of errors. Optimize
3782 LOCAL24PC check for non-local syms. Don't capitalize error messages.
3783 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define to zero.
3784 (ppc64_elf_relocate_section): Don't deref htab->tls_sec when
3785 calculating TLSLD relocs. Report reloc types on a number of errors.
3786 Don't capitalize error messages.
3787
3788 2003-03-03 H.J. Lu <hjl@gnu.org>
3789
3790 * elfxx-ia64.c (USE_BRL): Removed.
3791 (oor_ip): Removed.
3792
3793 2003-03-03 J"orn Rennecke <joern.rennecke@superh.com>
3794
3795 * elf32-sh.c (sh_elf_howto_tab): Make R_SH_IND12W into an ordinary
3796 relocation (no special function), and make it non-partial_inplace.
3797 (sh_elf_relax_section): When creating a bsr, use a consistent value
3798 no matter if the symbol is extern or not; set addend to -4.
3799 Don't swap load / non-load instructions for SH4.
3800 (sh_elf_relax_delete_bytes): In R_SH_IND12W case, check the offset
3801 rather than if the symbol is external to determine if adjusting the
3802 offset makes sense. Adjust the addend too if appropriate.
3803 (sh_elf_relocate_section): In R_SH_IND12W, don't fiddle with the
3804 relocation.
3805
3806 2003-03-03 Nick Clifton <nickc@redhat.com>
3807
3808 * po/da.po: Installed latest translation.
3809
3810 2003-03-02 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3811
3812 * elf32-mips.c (elf_mips_howto_table_rel): Change definition of
3813 R_MIPS_PC16 to rightshift 2.
3814 (elf_reloc_map mips_reloc_map): Map to rightshifted BFD reloc.
3815 (bfd_elf32_bfd_reloc_type_lookup): Support
3816 BFD_RELOC_MIPSEMB_16_PCREL_S2.
3817 * elf64-mips.c (mips_elf64_howto_table_rel): Change definition of
3818 R_MIPS_PC16 to rightshift 2.
3819 (mips_elf64_howto_table_rela): Likewise.
3820 (mips_reloc_map): Map to rightshifted BFD reloc.
3821 * elfn32-mips.c: The same as in elf64-mips.c.
3822 * elfxx-mips.c (mips_elf_got_for_ibfd): Typo in comment.
3823 (mips_elf_calculate_relocation): Handle rightshifted addends for
3824 R_MIPS_PC16.
3825 * reloc.c (BFD_RELOC_MIPSEMB_16_PCREL_S2): New BFD relocation for
3826 MIPS Embedded PIC. Remove superfluous empty COMMENT.
3827 * libbfd.h: Regenerate.
3828 * bfd-in2.h: Regenerate.
3829
3830 2003-02-28 Richard Henderson <rth@redhat.com>
3831
3832 * elfxx-ia64.c (elfNN_ia64_relax_section): Correct bounds
3833 for ltoff22x relaxation.
3834
3835 2003-03-01 Alan Modra <amodra@bigpond.net.au>
3836
3837 * bfd-in.h (_bfd): Don't define.
3838 * bfd.c: Rename occurrences of "struct _bfd" to "struct bfd".
3839 * syms.c: Likewise.
3840 * bfd-in2.h: Regenerate.
3841
3842 2003-02-27 Richard Henderson <rth@redhat.com>
3843
3844 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add want_gotx;
3845 (elfNN_ia64_check_relocs): Set it.
3846 (allocate_global_data_got): Check it.
3847 (allocate_local_got): Likewise.
3848 (allocate_dynrel_entries): Likewise.
3849 (elfNN_ia64_relax_ldxmov): New.
3850 (elfNN_ia64_relax_section): Handle LTOFF22X, LDXMOV.
3851 (elfNN_ia64_choose_gp): Split out from ...
3852 (elfNN_ia64_final_link): ... here.
3853
3854 2003-02-27 Andrew Cagney <cagney@redhat.com>
3855
3856 * bfd.c (struct bfd): Rename "struct _bfd".
3857 * bfd-in.h: Update copyright.
3858 (struct bfd): Rename "struct _bfd".
3859 (_bfd): Define for backward compatibility.
3860 * bfd-in2.h: Regenerate.
3861
3862 2003-02-25 Alan Modra <amodra@bigpond.net.au>
3863
3864 * elflink.h (elf_bfd_final_link): Apportion reloc counts to rel_hdr
3865 and rel_hdr2 when initially counting input relocs rather than after
3866 creating output reloc sections.
3867 (elf_link_read_relocs_from_section): Don't abort with wrong reloc
3868 sizes.
3869
3870 * Makefile.am: Run "make dep-am".
3871 * Makefile.in: Regenerate.
3872
3873 2003-02-24 Kris Warkentin <kewarken@qnx.com>
3874
3875 * elf.c (elfcore_read_notes): Add check for QNX style core file.
3876 (elfcore_grog_nto_note): New function.
3877 (elfcore_grog_nto_gregs): New function.
3878 (elfcore_grog_nto_status): New function.
3879
3880 2003-02-24 Alan Modra <amodra@bigpond.net.au>
3881
3882 * elflink.c (_bfd_elf_create_got_section): Check existing .got
3883 section flags before concluding that we've already been called.
3884 Don't use register keyword.
3885 (_bfd_elf_create_dynamic_sections): Don't use register keyword.
3886 (_bfd_elf_create_linker_section): Formatting.
3887
3888 2003-02-20 jmc <jmc@prioris.mini.pw.edu.pl>
3889
3890 * coff-h8300.c: Fix typo: intial -> initial.
3891 * coff-ppc.c: Likewise.
3892
3893 2003-02-20 Alan Modra <amodra@bigpond.net.au>
3894
3895 * elf32-ppc.c: Formatting.
3896 (allocate_dynrelocs): LD and GD relocs against the same sym need
3897 separate GOT entries.
3898 (ppc_elf_relocate_section): Correct GOT handling for multiple GOT
3899 entries per symbol.
3900
3901 2003-02-19 Alan Modra <amodra@bigpond.net.au>
3902
3903 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Simplify dynamic reloc
3904 removal. Localize vars. Remove unnecessary dynobj test.
3905 * elf32-i386 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead
3906 of INFO.
3907 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
3908 and optimize.
3909 (elf_i386_relocate_section): Likewise.
3910 (elf_i386_gc_sweep_hook): Simplify dyn reloc removal. Localize vars.
3911 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
3912 * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
3913 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
3914 * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
3915 * elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise. Remove
3916 local_dynrel for section too. Don't touch HIPLT22, LOPLT10, PCPLT32
3917 or PCPLT10 relocs. Don't subtract twice on PLT32 relocs.
3918 Formatting.
3919
3920 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define.
3921 (ppc64_elf_check_relocs): Use it. Correct comment. Move SEC_ALLOC
3922 test.
3923 (ppc64_elf_adjust_dynamic_symbol): Use ELIMINATE_COPY_RELOCS.
3924 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
3925 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
3926 and optimize. Use ELIMINATE_COPY_RELOCS.
3927 (ppc64_elf_relocate_section): Likewise.
3928
3929 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Add pc_count field.
3930 (ppc_elf_copy_indirect_symbol): Copy pc_count field.
3931 (ELIMINATE_COPY_RELOCS): Define.
3932 (ppc_elf_adjust_dynamic_symbol): Convert copy relocs to dynamic.
3933 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
3934 (MUST_BE_DYN_RELOC): Define.
3935 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
3936 and optimize. Trim dyn_relocs.
3937 (ppc_elf_check_relocs): Don't generate dyn_relocs when we know they'll
3938 not be used. Do generate dyn_relocs for copy reloc avoidance. Keep
3939 track of pc_rel dyn relocs.
3940 (ppc_elf_relocate_section): Remove "will_become_local". Adjust
3941 WILL_CALL_FINISH_DYNAMIC_SYMBOL use. Trim dyn relocs as per
3942 allocate_dynrelocs. Don't recalculate "sec".
3943
3944 2003-02-18 Alan Modra <amodra@bigpond.net.au>
3945
3946 * elf32-ppc.c (ppc_elf_relocate_section): Remove unnecessary test.
3947 * elf64-ppc.c (ppc64_elf_tls_optimize): Decrement tlsld_got.refcount
3948 on invalid LD relocs.
3949 (allocate_dynrelocs): Invalid LD relocs don't use tlsld_got entry.
3950 (ppc64_elf_relocate_section): Unify new handling of LD relocs and
3951 tlsld_got entry. Use IS_PPC64_TLS_RELOC.
3952
3953 * elf32-ppc.h: New file.
3954 * elf32-ppc.c: Include elf32-ppc.h.
3955 (NOP, CROR_151515, CROR_313131, TP_OFFSET, DTP_OFFSET): Define.
3956 (struct ppc_elf_link_hash_entry): Rename "root" to "elf". Adjust uses.
3957 Add "tls_mask" field.
3958 (TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL, TLS_TLS, TLS_TPRELGD): Define.
3959 (struct ppc_elf_link_hash_table): Rename "root" to "elf". Adjust uses.
3960 Add got, relgot, plt, relplt, dynbss, relbss, dynsbss, relsbss,
3961 sdata, sdata2, tls_sec, tls_get_addr, tlsld_got fields.
3962 Make use of htab shortcuts throughout file.
3963 (ppc_elf_link_hash_newfunc): Init tls_mask field.
3964 (ppc_elf_link_hash_table_create): Init new fields.
3965 (ppc_elf_copy_indirect_symbol): Copy tls_mask.
3966 (ppc_elf_howto_raw): Add tls relocs.
3967 (ppc_elf_reloc_type_lookup): Handle them.
3968 (ppc_elf_unhandled_reloc): New function.
3969 (ppc_elf_create_got): Stash got section pointer in hash table,
3970 return status. Make .rela.got too.
3971 (ppc_elf_create_dynamic_sections): Stash section pointers in htab.
3972 (ppc_elf_adjust_dynamic_symbol): Only set up copy relocs when
3973 NON_GOT_REF set. Don't allocate space in .plt here..
3974 (allocate_dynrelocs): ..do so here instead, properly ref-counting and
3975 not allocating plt entries unnecessarily. Allocate got entries here.
3976 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
3977 (ppc_elf_size_dynamic_sections): Allocate local got entries. Pass
3978 "info" during allocate_dynrelocs hash traversal. Use htab section
3979 shortcuts rather than searching for named sections. Get rid of
3980 "plt" and "strip" booleans.
3981 (update_local_sym_info, bad_shared_reloc): New functions.
3982 (ppc_elf_check_relocs): Handle TLS relocs. Move .rela.got creation to
3983 ppc_elf_create_got. Don't mark got or plt reloc syms dynamic, do so
3984 in allocate_dynreloc. Use update_local_sym_info and bad_shared_reloc.
3985 Disallow R_PPC_EMB_RELSDA, R_PPC_EMB_NADDR32, R_PPC_EMB_NADDR16,
3986 R_PPC_EMB_NADDR16_LO, R_PPC_EMB_NADDR16_HI and R_PPC_EMB_NADDR16_HA
3987 in shared libs. R_PPC_PLTREL32 is a plt reloc too. Refcount all
3988 relocs that might use a plt entry. Set NON_GOT_REF too.
3989 Enumerate all do-nothing relocs.
3990 (ppc_elf_gc_sweep_hook): Simplify removal of dynrelocs. Handle
3991 tls relocs and all plt relocs.
3992 (ppc_elf_tls_setup, ppc_elf_tls_optimize): New functions.
3993 (ppc_elf_finish_dynamic_symbol): Don't build got entries here.
3994 (ppc_elf_finish_dynamic_sections): Rewrite tag code using htab
3995 shortcuts.
3996 (ppc_elf_relocate_section): Tidy. Handle TLS relocs. Use
3997 bfd_elf_local_sym_name. Simplify unresolved reloc code. Build got
3998 entries and got relocs here. Warn on non-zero got reloc addend.
3999 Split out branch taken/not taken reloc code into a separate switch
4000 and correct offset calculation. Allow BRTAKEN/BRNTAKEN dynamic relocs.
4001 Split out HA reloc adjustments to separate switch statement. Don't
4002 warn on reloc overflow if we've already warned about undefined.
4003 Don't rebuild sym name when reporting errors. Report all possible
4004 errors from _bfd_final_link_relocate.
4005 (bfd_elf32_bfd_final_link): Don't define.
4006
4007 2003-02-18 Alan Modra <amodra@bigpond.net.au>
4008
4009 * elf64-ppc.c (ppc64_elf_relocate_section): Don't init "r". Don't
4010 rebuild sym name when reporting errors.
4011
4012 2003-02-17 Nick Clifton <nickc@redhat.com>
4013
4014 * elflink.h (elf_link_output_extsym): Only check
4015 allow_shlib_undefined for shared libraries.
4016 * elf32-i386.c (elf_i386_relocate_section): Remove bogus check
4017 of allow_shlib_undefined.
4018 * elf32-cris.c (cris_elf_relocate_section): Likewise.
4019 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
4020 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
4021 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
4022 * elf32-s390.c (elf_s390_relocate_section): Likewise.
4023 * elf32-sh.c (sh_elf_relocate_section): Likewise.
4024 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
4025 * elf32-vax.c (elf_vax_relocate_section): Likewise.
4026 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
4027 * elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
4028 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
4029 * elf64-s390.c (elf_s390_relocate_section): Likewise.
4030 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
4031 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
4032 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
4033 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
4034
4035 2003-02-17 Nick Clifton <nickc@redhat.com>
4036
4037 * elf.c (SEGMENT_AFTER_SEGMENT): Add third parameter - the
4038 address field to use in the comparison.
4039 (SEGMENT_OVERLAPS): Check that LMAs overlap as well.
4040
4041 2003-02-14 Bob Wilson <bob.wilson@acm.org>
4042
4043 * elfcore.h (elf_core_file_p): Compare alternate machine codes for ELF
4044 backends when checking if the generic ELF target should be used.
4045
4046 * syms.c (_bfd_stab_section_find_nearest_line): For line number stabs
4047 outside of functions, treat values as absolute addresses.
4048
4049 * bfd.c: Change embedded documentation to use consistent indentation
4050 and to split up long lines. Change informal style of description
4051 for functions lacking real documentation.
4052 * coffcode.h: Break up long lines in embedded documentation.
4053 * format.c: Likewise.
4054 * targets.c: Likewise.
4055 * libcoff.h: Regenerate.
4056 * bfd-in2.h: Regenerate.
4057
4058 2003-02-14 Alan Modra <amodra@bigpond.net.au>
4059
4060 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Init tls_get_addr.
4061 (ppc64_elf_copy_indirect_symbol): Merge tls_mask too.
4062 (ppc64_elf_gc_sweep_hook): Simplify removal of dyn_relocs.
4063 (allocate_dynrelocs): Don't treat undefined and undefweak specially.
4064 (ppc_size_one_stub): Fix warning, and tighten plt entry check.
4065 (group_sections): Don't share a stub section if stubs are for a large
4066 section. Adjust comment.
4067 (ppc64_elf_size_stubs): Roughly double the size left for stubs if
4068 !stubs_always_before_branch.
4069 (ppc64_elf_relocate_section): Initialize tlsld GOT entry once. Don't
4070 treat undefined and undefweak specially when processing dyn relocs.
4071
4072 2003-02-13 Jakub Jelinek <jakub@redhat.com>
4073
4074 * elflink.h (elf_link_add_object_symbols): Handle .symver x, x@FOO.
4075
4076 2003-02-13 Nick Clifton <nickc@redhat.com>
4077
4078 * elf32-arm.h (elf32_thumb_to_arm_stub): Include section VMAs
4079 in computation of offset to insert into BL instruction.
4080
4081 2003-02-11 Uwe Stieber <uwe@wwws.de>
4082
4083 * config.bfd: Add support for kaOS as cross build target system.
4084
4085 2003-02-11 Alan Modra <amodra@bigpond.net.au>
4086
4087 * elf64-ppc.c (ppc64_elf_check_relocs): Match versioned
4088 .__tls_get_addr too.
4089 (ppc64_elf_tls_setup): Ensure cached tls_get_addr is not indirect.
4090
4091 2003-02-10 Kaz kojima <kkojima@rr.iij4u.or.jp>
4092
4093 * elf32-sh.c (elf_sh_dyn_relocs): Add tls_tpoff32 field.
4094 (elf_sh_link_hash_entry): Remove tls_tpoff32 field.
4095 (sh_elf_link_hash_newfunc): Remove the initialization of
4096 tls_tpoff32 field.
4097 (allocate_dynrelocs): Keep dyn_relocs if it includes the entry
4098 for which tls_tpoff32 flag is set.
4099 (sh_elf_relocate_section): Covert to LE only if the dyn_relocs
4100 of the symbol includes the entry matched with the input_section
4101 and having tls_tpoff32 flag on. When linking statically, set
4102 symbol index of R_SH_TLS_TPOFF32 relocation to zero if the symbol
4103 is defined in this executable.
4104 (sh_elf_check_relocs): Set tls_tpoff32 flag appropriately.
4105
4106 2003-02-10 Jakub Jelinek <jakub@redhat.com>
4107
4108 * elf32-s390.c (elf_s390_size_dynamic_sections): Set relocs to TRUE
4109 even if there is just non-empty .rela.plt.
4110
4111 2003-02-10 Nick Clifton <nickc@redhat.com>
4112
4113 * archures.c (bfd_mach_arm_ep9312): Define.
4114 * bfd-in2.h: Regenerate.
4115 * cpu-arm.c (processors[]): Add ep9312.
4116 (bfd_arm_arch): Add ep9312.
4117 * elf32-arm.h (elf32_arm_merge_private_data): Update error
4118 messages and add test for Maverick floating point support.
4119 (elf32_arm_print_private_bfd_data): Handle
4120 EF_ARM_MAVERICK_FLOAT flag.
4121 (elf32_arm_object_p): New function.
4122 (elf_backend_object_p): Define.
4123
4124 2003-02-10 Alan Modra <amodra@bigpond.net.au>
4125
4126 * elf64-ppc.c: Rename assorted occurrences of tls_type and similar
4127 variables, structure fields or function params to tls_mask or
4128 similar to better reflect usage.
4129 (struct got_entry): Comment.
4130 (struct ppc_link_hash_entry): Expand comment, and renumber TLS_*.
4131 (get_tls_mask): Rename from get_tls_type.
4132
4133 2003-02-09 Alan Modra <amodra@bigpond.net.au>
4134
4135 * elf64-ppc.c (TLS_GD_LD): Don't define..
4136 (TLS_GD): ..define this instead and update all uses.
4137 (TLS_TPRELGD): Define.
4138 (ppc64_elf_link_hash_table_create): Tweak initialization of
4139 init_refcount and init_offset.
4140 (ppc64_elf_check_relocs): Add one extra element to t_symndx array.
4141 Mark second slot of GD or LD toc entries.
4142 (get_tls_type): Return an int. Distinguish toc GD and LD entries
4143 from other tls types.
4144 (ppc64_elf_tls_setup): New function, split out from..
4145 (ppc64_elf_tls_optimize): ..here. Don't optimize when symbols are
4146 defined in a dynamic object. Fix LD optimization. Don't set TLS_TPREL
4147 on GD->IE optimization, use TLS_TPRELGD instead. Use get_tls_type
4148 return value to properly decide whether toc GD and LD entries can
4149 optimize away __tls_get_addr call. Check next reloc after DTPMOD64
4150 to determine GD or LD rather than looking at TLS_LD flag. Don't
4151 attempt to adjust got entry tls_type here..
4152 (allocate_dynrelocs): ..instead, adjust got entry tls_type here, and
4153 look for possible merges.
4154 (ppc64_elf_size_dynamic_sections): Adjust local got entries for
4155 optimization.
4156 (ppc64_elf_size_stubs): Tweak __tls_get_addr fudge.
4157 (ppc64_elf_relocate_section): Rename some vars to better reflect usage.
4158 Make use of return value from get_tls_type to properly detect GD and
4159 LD optimizations. Split tlsld/gd hi/ha from lo/ds case. Don't
4160 handle tls_get_addr removal when looking at REL24 relocs, do it when
4161 looking at the previous reloc. Check reloc after DTPMOD64 to determine
4162 GD or LD.
4163 * elf64-ppc.h (ppc64_elf_tls_setup): Declare.
4164
4165 2003-02-08 Alan Modra <amodra@bigpond.net.au>
4166
4167 * elf32-hppa.c (group_sections): Don't share a stub section if
4168 stubs are for a large section.
4169
4170 * elf32-hppa.c (elf32_hppa_size_stubs): Double the size left for
4171 stubs if !stubs_always_before_branch.
4172
4173 2003-02-07 Nick Clifton <nickc@redhat.com>
4174
4175 * elf.c (swap_out_syms): Generate an error message if an
4176 equivalent output section cannot be found for a symbol.
4177
4178 2003-02-07 Jakub Jelinek <jakub@redhat.com>
4179
4180 * elf64-alpha.c (elf64_alpha_relax_section): Don't crash if
4181 local_got_entries is NULL.
4182
4183 2003-02-06 Andreas Schwab <schwab@suse.de>
4184
4185 * elf-eh-frame.c (get_DW_EH_PE_signed): Define.
4186 (read_value): Add parameter is_signed, use signed extraction if
4187 the value is signed.
4188 (_bfd_elf_write_section_eh_frame): Pass signed flag of the
4189 encoding to read_value.
4190
4191 2003-02-06 Alan Modra <amodra@bigpond.net.au>
4192
4193 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy got and
4194 plt info when called to transfer weak sym info.
4195
4196 2003-02-05 Alan Modra <amodra@bigpond.net.au>
4197
4198 * reloc.c: Add PPC and PPC64 TLS relocs.
4199 * libbfd.h: Regenerate.
4200 * bfd-in2.h: Regenerate.
4201 * elf64-ppc.c (TP_OFFSET, DTP_OFFSET): Declare.
4202 (ppc64_elf_howto_raw): Add TLS howto's. Adjust R_PPC64_NONE to be
4203 against a 32 bit field.
4204 (ppc64_elf_reloc_type_lookup): Handle TLS relocs.
4205 (_ppc64_elf_section_data): Add t_symndx and comments.
4206 (ppc64_elf_section_data): Use elf_section_data macro.
4207 (ppc64_elf_new_section_hook): American spelling.
4208 (struct got_entry, struct plt_entry): New.
4209 (MUST_BE_DYN_RELOC): Rename from IS_ABSOLUTE_RELOC.
4210 (struct ppc_stub_hash_entry): Add "addend" field.
4211 (struct ppc_link_hash_entry): Add "tls_type".
4212 (TLS_TLS, TLS_GD_LD, TLS_LD, TLS_TPREL, TLS_DTPREL,
4213 TLS_EXPLICIT): Define.
4214 (struct ppc_link_hash_table): Add tls_sec, tls_get_addr, tlsld_got.
4215 (link_hash_newfunc): Init new fields.
4216 (ppc64_elf_link_hash_table_create): Likewise. Set init_refcount and
4217 init_offset to NULL.
4218 (ppc64_elf_copy_indirect_symbol): Copy got and plt info. Don't call
4219 _bfd_elf_link_hash_copy_indirect, rather insert relevant code from
4220 there.
4221 (update_local_sym_info, update_plt_info): New functions.
4222 (ppc64_elf_check_relocs): Use them. Handle TLS relocs. Adjust GOT
4223 handling to use got.glist rather than got.refcount. Likewise for PLT.
4224 (ppc64_elf_gc_sweep_hook): Handle TLS relocs, new GOT and PLT lists.
4225 (func_desc_adjust): Adjust for new PLT list.
4226 (ppc64_elf_adjust_dynamic_symbol): Likewise.
4227 (get_sym_h, get_tls_type): New functions.
4228 (ppc64_elf_edit_opd): Remove unused variable. Use get_sym_h.
4229 (ppc64_elf_tls_optimize): New function.
4230 (allocate_dynrelocs): Adjust for new PLT and GOT lists. Allocate
4231 TLS relocs.
4232 (ppc64_elf_size_dynamic_sections): Likewise.
4233 (ppc_type_of_stub): Adjust for new PLT list.
4234 (ppc_build_one_stub): Likewise.
4235 (ppc64_elf_size_stubs): Likewise. Use get_sym_h. Treat __tls_get_addr
4236 calls specially.
4237 (ppc64_elf_relocate_section): Adjust for new GOT and PLT lists. Handle
4238 TLS relocs. Report local syms using bfd_elf_local_sym_name. Don't
4239 init GOT entries that have a reloc. Generate GOT relocs here..
4240 (ppc64_elf_finish_dynamic_symbol): ..not here. Adjust for PLT list.
4241 * elf64-ppc.h (ppc64_elf_tls_optimize): Declare.
4242
4243 2003-02-04 Andreas Schwab <schwab@suse.de>
4244
4245 * elf32-m68k.c (elf_m68k_hash_entry): Define.
4246 (elf_m68k_link_hash_traverse): Remove.
4247 (elf_m68k_link_hash_newfunc): Use struct bfd_hash_entry and
4248 elf_m68k_hash_entry instead of struct elf_m68k_link_hash_entry to
4249 reduce casting.
4250 (elf_m68k_check_relocs): Use elf_m68k_hash_entry instead of
4251 casting.
4252 (elf_m68k_size_dynamic_sections): Use elf_link_hash_traverse
4253 instead of elf_m68k_link_hash_traverse.
4254 (elf_m68k_discard_copies): Change first parameter to pointer to
4255 struct elf_link_hash_entry and use elf_m68k_hash_entry when struct
4256 elf_m68k_link_hash_entry is needed.
4257
4258 2003-02-04 Alan Modra <amodra@bigpond.net.au>
4259
4260 * elf-bfd.h (struct got_entry, struct plt_entry): Forward declare.
4261 (struct elf_link_hash_entry): Add "glist" and "plist" fields to
4262 "got" union, and declare as gotplt_union. Use gotplt_uinion for
4263 "plt" field.
4264 (struct elf_link_hash_table): Make "init_refcount" a gotplt_union.
4265 Add "init_offset" field.
4266 (struct elf_obj_tdata <local_got>): Add "struct got_entry **" to union.
4267 (elf_local_got_ents): Declare.
4268 * elf.c (_bfd_elf_link_hash_newfunc): Adjust initialization of "got"
4269 and "plt".
4270 (_bfd_elf_link_hash_hide_symbol): Use "init_offset".
4271 (_bfd_elf_link_hash_table_init): Set "init_offset".
4272 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set init_refcount
4273 from init_offset.
4274 (elf_adjust_dynamic_symbol): Set plt and got offsets using init_offset.
4275
4276 * elf.c (bfd_elf_local_sym_name): Split out from..
4277 (group_signature): ..here.
4278 * elf-bfd.h (bfd_elf_local_sym_name): Declare.
4279
4280 2003-02-04 Alan Modra <amodra@bigpond.net.au>
4281
4282 * elf-bfd.h (enum elf_link_info_type): Remove.
4283 (struct bfd_elf_section_data): Move sec_info_type, use_rela_p fields
4284 to struct sec. Remove linkonce_p field.
4285 (elf_linkonce_p): Delete.
4286 (elf_discarded_section): Update for sec_info_type change.
4287 * section.c (struct sec): Add sec_info_type, use_rela_p, has_tls_reloc,
4288 flag11, flag12, flag13, flag14, flag15, flag16, flag20, flag24.
4289 (ELF_INFO_TYPE_NONE): Define.
4290 (ELF_INFO_TYPE_STABS): Define.
4291 (ELF_INFO_TYPE_MERGE): Define.
4292 (ELF_INFO_TYPE_EH_FRAME): Define.
4293 (ELF_INFO_TYPE_JUST_SYMS): Define.
4294 (STD_SECTION): Update struct sec initializer.
4295 * ecoff.c (bfd_debug_section): Likewise.
4296 * elf.c: Likewise. Update occurrences of sec_info_type and use_rela_p.
4297 * elflink.h: Likewise.
4298 * elf-eh-frame.c: Likewise.
4299 * elf64-alpha.c: Likewise.
4300 * elfxx-ia64.c: Likewise.
4301 * elfxx-mips.c: Likewise.
4302 * bfd-in2.h: Regenerate.
4303
4304 * elf32-sparc.c (sec_do_relax): Use elf_section_data macro rather than
4305 referring to used_by_bfd.
4306 * elf64-sparc.c (sec_do_relax): Likewise.
4307 * elf64-mmix.c (mmix_elf_section_data): Likewise.
4308 * elfxx-mips.c (mips_elf_section_data): Likewise.
4309 * ieee.c (ieee_slurp_section_data): Use ieee_per_section macro.
4310 (ieee_get_section_contents): Likewise.
4311 (ieee_new_section_hook): Formatting.
4312 (ieee_canonicalize_reloc): Remove commented out code.
4313 * mmo.c (mmo_section_data): Define. Use throughout file.
4314 * oasys.c (oasys_get_section_contents): Use oasys_per_section macro.
4315
4316 2003-01-31 Graydon Hoare <graydon@redhat.com>
4317
4318 * Makefile.am (opncls.lo): Add dependency upon libiberty.h.
4319 * Makefile.in: Regenerate.
4320 * opncls.c (calc_crc32, get_debug_link_info,
4321 seperate_debug_file_exists, find_seperate_debug_file): New
4322 internal functions.
4323 (bfd_follow_gnu_debuglink): New function. Follow the pointer
4324 contained inside a .gnu_debuglink section.
4325 * bfd-in2.h: Regenerate.
4326
4327 2003-01-29 Alexandre Oliva <aoliva@redhat.com>
4328
4329 * elfxx-mips.c (mips_elf_got_entry_hash): Don't dereference
4330 entry->abfd when it's NULL.
4331
4332 2003-01-27 Alexandre Oliva <aoliva@redhat.com>
4333
4334 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Handle
4335 _bfd_elf_section_offset returning -2 the same way as -1.
4336
4337 * elfxx-mips.c (mips_elf_multi_got): New function.
4338 (struct mips_got_entry): Make symndx and gotidx signed. Moved
4339 addend into union along with address and link hash entry.
4340 (struct mips_got_info): Added bfd2got and next.
4341 (struct mips_elf_hash_sort_data): Added max_unref_got_dynindx.
4342 (mips_elf_got_section, mips_elf_create_got_section): Use
4343 SEC_EXCLUDE bit to tell whether we really need the got
4344 section. Take boolean arguments to disregard an excluded
4345 section, or to create it as excluded. Adjust all callers.
4346 Use mips_elf_got_section all over.
4347 (mips_elf_local_got_index, mips_elf_got_page,
4348 mips_elf_got16_entry): Take input bfd as argument, and pass it
4349 on to mips_elf_create_local_got_entry.
4350 (mips_elf_global_got_index, mips_elf_create_local_got_entry):
4351 Take input bfd as argument, and manage entries in the
4352 appropriate GOT.
4353 (mips_elf_got_offset_from_index): Take input bfd as argument,
4354 and use it to adjust the GP offset of the bfd.
4355 (mips_elf_sort_hash_table, mips_elf_sort_hash_table_f): Move
4356 unreferenced GOT entries of global symbols to the end.
4357 (mips_elf_record_global_got_symbol): Take input bfd as
4358 argument. Add entries to the master GOT hash table.
4359 (struct mips_elf_bfd2got_hash): New.
4360 (struct mips_elf_got_per_bfd_arg): New.
4361 (struct mips_elf_set_global_got_offset_arg): New.
4362 (mips_elf_hash_bfd_vma, mips_elf_multi_got_entry_hash,
4363 mips_elf_multi_got_entry_eq, mips_elf_bfd2got_entry_hash,
4364 mips_elf_bfd2got_entry_eq, mips_elf_make_got_per_bfd,
4365 mips_elf_merge_gots, mips_elf_set_global_got_offset,
4366 mips_elf_resolve_final_got_entry,
4367 mips_elf_resolve_final_got_entries, mips_elf_adjust_gp,
4368 mips_elf_got_for_ibfd): New functions.
4369 (ELF_MIPS_GP_OFFSET): Don't depend on SGI_COMPAT.
4370 (MIPS_ELF_GOT_MAX_SIZE): New macro.
4371 (STUB_LW): Generate 64-bit stub regardless of SGI_COMPAT.
4372 (mips_elf_got_entry_hash): Take new fields into account. Use
4373 mips_elf_hash_bfd_vma.
4374 (mips_elf_got_entry_eq): Take new fields into account.
4375 (mips_elf_create_got_section): Initialize new fields.
4376 (mips_elf_calculate_relocation): Pass input_bfd to functions
4377 that now take it. Adjust gp for the input_bfd.
4378 (mips_elf_allocate_dynamic_relocation,
4379 mips_elf_create_dynamic_relocation,
4380 _bfd_mips_elf_create_dynamic_sections): Use...
4381 (mips_elf_rel_dyn_section): New function. Borrow code from...
4382 (_bfd_mips_elf_check_relocs): Pass input_bfd to functions that
4383 now take it. Create the got section if needed, even if
4384 excluded, before recording a global got symbol. Move some
4385 code to...
4386 (mips_elf_record_local_got_symbol): New fn.
4387 (_bfd_mips_elf_size_dynamic_sections): Disable combreloc.
4388 Compute multi-got global entries offsets. Move GOT code to...
4389 (_bfd_mips_elf_always_size_sections): Call mips_elf_multi_got
4390 if the GOT is too big.
4391 (_bfd_mips_elf_finish_dynamic_symbol): Set got entry of
4392 undefweak symbol to zero. Generate dynamic relocations for
4393 non-primary GOT entries for global symbols.
4394 (_bfd_mips_elf_finish_dynamic_sections): Handle multi-got
4395 case. Generate dynamic relocations for local got entries.
4396 Sort dynamic relocations on N64 too, using...
4397 (sort_dynamic_relocs_64): New fns.
4398 (_bfd_mips_elf_hide_symbol): Adjust multi-got counters.
4399 (_bfd_mips_elf_merge_private_bfd_data): Ignore EF_MIPS_XGOT.
4400
4401 2003-01-27 Alexandre Oliva <aoliva@redhat.com>
4402
4403 * bfd.c (struct _bfd): Added id field.
4404 * opncls.c (_bfd_id_counter): New static variable.
4405 (_bfd_new_bfd): Use it.
4406 * bfd-in2.h: Rebuilt.
4407
4408 2003-01-25 Alan Modra <amodra@bigpond.net.au>
4409
4410 * elf32-sparc.c (bfd_elf32_new_section_hook): Define.
4411
4412 2003-01-25 Jakub Jelinek <jakub@redhat.com>
4413
4414 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Add TLS relocs.
4415 (elf32_sparc_rev32_howto): New variable.
4416 (sparc_reloc_map): Add TLS relocs.
4417 (elf32_sparc_reloc_type_lookup, elf32_sparc_info_to_howto):
4418 Handle REV32.
4419 (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc, elf32_sparc_mkobject):
4420 New functions.
4421 (struct elf32_sparc_dyn_relocs, struct elf32_sparc_link_hash_entry,
4422 struct elf32_sparc_link_hash_table):
4423 New structures.
4424 (elf32_sparc_tdata, elf32_sparc_local_got_tls_type,
4425 elf32_sparc_hash_table): Define.
4426 (link_hash_newfunc, elf32_sparc_link_hash_table_create,
4427 create_got_section, elf32_sparc_create_dynamic_sections,
4428 elf32_sparc_copy_indirect_symbol, elf32_sparc_tls_transition): New
4429 functions.
4430 (elf32_sparc_check_relocs): Handle TLS relocs. Add dynamic reloc
4431 reference counting.
4432 (elf32_sparc_gc_sweep_hook): Likewise.
4433 (elf32_sparc_adjust_dynamic_symbol): Likewise.
4434 (elf32_sparc_size_dynamic_sections): Likewise.
4435 (elf32_sparc_relocate_section): Likewise.
4436 (allocate_dynrelocs, readonly_dynrelocs, dtpoff_base, tpoff):
4437 New functions.
4438 (elf32_sparc_object_p): Allocate backend private object data.
4439 (bfd_elf32_bfd_link_hash_table_create,
4440 elf_backend_copy_indirect_symbol, bfd_elf32_mkobject,
4441 elf_backend_can_refcount): Define.
4442 (elf_backend_create_dynamic_sections): Define to
4443 elf32_sparc_create_dynamic_sections.
4444 * reloc.c: Add SPARC TLS relocs.
4445 * bfd-in2.h, libbfd.h: Rebuilt.
4446 * elf64-sparc.c (sparc64_elf_howto_table): Add TLS relocs.
4447 (sparc_reloc_map): Likewise.
4448
4449 2003-01-24 Martin Schwidefsky <schwidefsky@de.ibm.com>
4450
4451 * bfd-in2.h: Regenerate.
4452 * elf32-s390.c (elf_s390_mkobject, elf_s390_tls_transition,
4453 s390_tls_reloc, dtpoff_base, tpoff, invalid_tls_insn): New functions.
4454 (elf_howto_table): Add TLS relocs.
4455 (elf_s390_reloc_type_lookup): Likewise.
4456 (elf_s390_link_hash_entry): Add tls_type.
4457 (elf_s390_hash_entry, elf_s390_obj_tdata, elf_s390_local_got_tls_type):
4458 New macros.
4459 (elf_s390_link_hash_table): Add tls_ldm_got.
4460 (link_hash_newfunc): Initialize tls_type.
4461 (elf_s390_link_hash_table_create): Initialize refcount of tls_ldm_got.
4462 (elf_s390_copy_indirect_symbol): Copy tls_type information.
4463 (elf_s390_check_relocs): Support TLS relocs.
4464 (elf_s390_gc_sweep_hook): Likewise.
4465 (allocate_dynrelocs): Likewise.
4466 (elf_s390_size_dynamic_sections): Likewise.
4467 (elf_s390_relocate_section): Likewise.
4468 (elf_s390_finish_dynamic_symbol): Likewise.
4469 (bfd_elf32_mkobject): Define for TLS.
4470 * elf64-s390.c: Same changes as for elf32-s390.c.
4471 * libbfd.h: Regenerate.
4472 * reloc.c: Add s390 TLS relocations.
4473
4474 2003-01-24 Charles Lepple <clepple@ghz.cc>
4475
4476 * aclocal.m4: Fix name of --enable-install-libbfd switch.
4477
4478 2003-01-23 Nick Clifton <nickc@redhat.com>
4479
4480 * Add sh2e support:
4481 2002-04-02 Elena Zannoni <ezannoni@redhat.com>
4482 * archures.c (bfd_mach_sh2e): Added.
4483 * bfd-in2.h: Rebuilt.
4484 * cpu-sh.c (arch_info_struct): Added SH2e.
4485 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle EF_SH2E.
4486
4487 2003-01-23 Alan Modra <amodra@bigpond.net.au>
4488
4489 * elf-bfd.h (struct bfd_elf_section_data): Remove tdata. Change
4490 dynindx to an int. Rearrange for better packing.
4491 * elf.c (_bfd_elf_new_section_hook): Don't alloc if already done.
4492 * elf32-mips.c (bfd_elf32_new_section_hook): Define.
4493 * elf32-sh64.h: New. Split out from include/elf/sh.h.
4494 (struct _sh64_elf_section_data): New struct.
4495 (sh64_elf_section_data): Don't dereference sh64_info (was tdata).
4496 * elf32-sh64-com.c: Include elf32-sh64.h.
4497 * elf32-sh64.c: Likewise.
4498 (sh64_elf_new_section_hook): New function.
4499 (bfd_elf32_new_section_hook): Define.
4500 (sh64_elf_fake_sections): Adjust for sh64_elf_section_data change.
4501 (sh64_bfd_elf_copy_private_section_data): Likewise.
4502 (sh64_elf_final_write_processing): Likewise.
4503 * elf32-sparc.c (struct elf32_sparc_section_data): New.
4504 (elf32_sparc_new_section_hook): New function.
4505 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
4506 (sec_do_relax): Define.
4507 (elf32_sparc_relax_section): Adjust to use sec_do_relax.
4508 (elf32_sparc_relocate_section): Likewise.
4509 * elf64-mips.c (bfd_elf64_new_section_hook): Define.
4510 * elf64-mmix.c (struct _mmix_elf_section_data): New.
4511 (mmix_elf_section_data): Define. Use throughout file.
4512 (mmix_elf_new_section_hook): New function.
4513 (bfd_elf64_new_section_hook): Define.
4514 * elf64-ppc.c (struct _ppc64_elf_section_data): New.
4515 (ppc64_elf_section_data): Define. Use throughout.
4516 (ppc64_elf_new_section_hook): New function.
4517 (bfd_elf64_new_section_hook): Define.
4518 * elf64-sparc.c (struct sparc64_elf_section_data): New.
4519 (sparc64_elf_new_section_hook): New function.
4520 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
4521 (sec_do_relax): Define.
4522 (sparc64_elf_relax_section): Adjust to use sec_do_relax.
4523 (sparc64_elf_relocate_section): Likewise.
4524 (bfd_elf64_new_section_hook): Define.
4525 * elfn32-mips.c (bfd_elf32_new_section_hook): Define.
4526 * elfxx-mips.c (struct _mips_elf_section_data): New.
4527 (mips_elf_section_data): Define. Use throughout.
4528 (_bfd_mips_elf_new_section_hook): New function.
4529 (mips_elf_create_got_section): Don't alloc used_by_bfd.
4530 * elfxx-mips.h (_bfd_mips_elf_new_section_hook): Declare.
4531 * elfxx-target.h (bfd_elfNN_new_section_hook): Add #ifndef.
4532 * Makefile.am: Run "make dep-am".
4533 * Makefile.in: Regenerate.
4534
4535 2003-01-21 Richard Henderson <rth@redhat.com>
4536
4537 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_PLT_LOC): New.
4538 (struct alpha_elf_link_hash_entry): Add plt_old_section, plt_old_value.
4539 (elf64_alpha_adjust_dynamic_symbol): Set them.
4540 (elf64_alpha_size_plt_section_1): Reset them when plt entry removed.
4541 (elf64_alpha_relax_tls_get_addr): Handle LDM relocs. Frob the
4542 symbol index when relaxing LDM to TPREL.
4543 (elf64_alpha_relax_section): Likewise. Allow relaxation of GD
4544 relocs, even if the target isn't locally defined.
4545 (elf64_alpha_check_relocs): Frob LDM reloc symndx to zero.
4546 (elf64_alpha_relocate_section): Likewise. Force TP-relative
4547 relocs vs symndx 0 to the tp base.
4548
4549 2003-01-21 Fabio Alemagna <falemagn@aros.org>
4550
4551 * config.bfd: Handle i[3456]86-*-aros*.
4552
4553 2003-01-21 Andreas Schwab <schwab@suse.de>
4554
4555 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Define.
4556 (struct ppc_elf_link_hash_entry): Define.
4557 (ppc_elf_hash_entry): New function.
4558 (struct ppc_elf_link_hash_table): Define.
4559 (ppc_elf_hash_table): New function.
4560 (ppc_elf_link_hash_newfunc): New function.
4561 (ppc_elf_link_hash_table_create): New function.
4562 (ppc_elf_copy_indirect_symbol): New function.
4563 (allocate_dynrelocs): New function.
4564 (readonly_dynrelocs): New function.
4565 (ppc_elf_size_dynamic_sections): Allocate space for dynamic
4566 relocs and determine DT_TEXTREL.
4567 (ppc_elf_check_relocs): Don't do that here, just count the
4568 dynamic relocs.
4569 (ppc_elf_gc_sweep_hook): Discard any dynamic relocs against the
4570 removed section.
4571 (bfd_elf32_bfd_link_hash_table_create): Define.
4572 (elf_backend_copy_indirect_symbol): Define.
4573
4574 2003-01-21 Richard Henderson <rth@redhat.com>
4575
4576 * elf64-alpha.c (alpha_dynamic_entries_for_reloc): GOTTPREL and
4577 TPREL also get a reloc if shared. Remove SREL support.
4578 (elf64_alpha_emit_dynrel): New.
4579 (elf64_alpha_relocate_section): Use it. Resolve dynamic TPREL
4580 and GOTTPREL relocs to local symbols against the tp base.
4581 (elf64_alpha_finish_dynamic_symbol): Use elf64_alpha_emit_dynrel.
4582
4583 * elf64-alpha.c (elf64_alpha_relax_got_load): Decrement got
4584 use count before clobbering r_type.
4585 (elf64_alpha_relax_tls_get_addr): Don't use pos[1] if insn
4586 ordering would mean dataflow inspection is necessary.
4587
4588 2003-01-20 Svein E. Seldal <Svein.Seldal@solidas.com>
4589
4590 * coffcode.h (coff_set_flags): Added get/set arch hooks.
4591
4592 2003-01-20 Fabio Alemagna <falemagn@aros.org>
4593
4594 * elf32-sh.c: Treat elfNN_bed like other macros defined in
4595 elfxx-target.h and #undef it before #define'ing it.
4596 * elf32-i386.c: Likewise.
4597 * elf32-sh64.c: Likewise.
4598 * elf64-alpha.c: Likewise.
4599 * elf64-sh64.c: Likewise.
4600
4601 2003-01-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
4602
4603 * bfd-in2.h: Regenerate.
4604 * elf32-s390.c (elf_s390_adjust_gotplt): New prototype.
4605 (elf_howto_table): Rename R_390_GOTOFF to R_390_GOTOFF32. Add
4606 R_390_GOTOFF16, R_390_GOTOFF64, R_390_GOTPLT12, R_390_GOTPLT16,
4607 R_390_GOTPLT32, R_390_GOTPLT64, R_390_GOTPLTENT, R_390_PLTOFF16,
4608 R_390_PLTOFF32 and R_390_PLTOFF64.
4609 (elf_s390_reloc_type_lookup): Likewise.
4610 (struct elf_s390_link_hash_entry): Add gotplt_refcount to keep track
4611 of GOTPLT references to a function.
4612 (link_hash_newfunc): Initialize gotplt_refcount.
4613 (elf_s390_check_relocs): Move allocation of local_got_refcounts array
4614 and creation of the got section out of the main switch. Add support
4615 for the gotoff, gotplt and pltoff relocations.
4616 (elf_s390_gc_sweep_hook): Add reference counting for gotoff, gotplt
4617 and pltoff.
4618 (elf_s390_adjust_gotplt): New function.
4619 (elf_s390_adjust_dynamic_symbol): Adjust gotplt refcount for removed
4620 plt entries.
4621 (allocate_dynrelocs): Add comment.
4622 (elf_s390_relocate_section): Change r_type to unsigned. Add support
4623 for gotoff, gotplt and pltoff relocations.
4624 * elf64-s390.c: Same changes as for elf32-s390.c.
4625 * libbfd.h: Regenerate.
4626 * reloc.c: Add BFD_RELOC_390_GOTOFF64, BFD_RELOC_390_GOTPLT12,
4627 BFD_RELOC_390_GOTPLT16, BFD_RELOC_390_GOTPLT32, BFD_RELOC_390_GOTPLT64,
4628 BFD_RELOC_390_GOTPLTENT, BFD_RELOC_390_PLTOFF16, BFD_RELOC_390_PLTOFF32
4629 and BFD_RELOC_390_PLTOFF64.
4630
4631 2003-01-18 Jakub Jelinek <jakub@redhat.com>
4632
4633 * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle
4634 R_IA64_TPREL64[LM]SB against non-global symbol properly.
4635
4636 2003-01-16 Jakub Jelinek <jakub@redhat.com>
4637
4638 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add
4639 self_dtpmod_done and self_dtpmod_offset.
4640 (allocate_global_data_got): Only use one got entry for all
4641 dtpmod relocs against local symbols.
4642 (allocate_dynrel_entries): Only need .rela.got entry for
4643 dtpmod against global symbol.
4644 (elfNN_ia64_size_dynamic_sections): Initialize self_dtpmod_offset.
4645 Reserve space in .rela.got for the local dtpmod entry.
4646 (set_got_entry): Initialize the common local dtpmod .got entry.
4647 (elfNN_ia64_relocate_section): Handle R_IA_64_DTPREL64LSB
4648 and R_IA_64_DTPREL64MSB.
4649
4650 2003-01-16 Alan Modra <amodra@bigpond.net.au>
4651
4652 * elf64-ppc.c: Include elf/ppc64.h rather than elf/ppc.h.
4653 (R_PPC_*): Rename all occurrences to R_PPC64_*.
4654 (R_PPC64_ADDR30): Rename all occurrences to R_PPC64_REL30.
4655 (enum elf_ppc_reloc_type): Ditto to enum elf_ppc64_reloc_type.
4656 (ppc64_elf_gc_sweep_hook): Handle R_PPC64_REL30 along with other
4657 relative relocs, not with absolute ones.
4658 * Makefile.am: Run "make dep-am".
4659 * Makefile.in: Regenerate.
4660 * po/SRC-POTFILES.in: Regenerate.
4661
4662 2003-01-15 Andreas Schwab <schwab@suse.de>
4663
4664 * elf32-ppc.c (ppc_elf_check_relocs): Don't set DF_TEXTREL for a
4665 relocation against a non-allocated readonly section.
4666
4667 2003-01-10 Alan Modra <amodra@bigpond.net.au>
4668
4669 * elf32-ppc.c (ppc_elf_relocate_section): Adjust addend for GOT16_HA.
4670 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. PLTGOT16_HA too.
4671
4672 2002-01-08 Klee Dienes <kdienes@apple.com>
4673
4674 * Makefile.am (ALL_MACHINES): Use cpu-msp430.lo, not cpu-msp430.c.
4675 (BFD32_BACKENDS): Use elf32-msp430.lo, not elf32-msp430.c.
4676 * Makefile.in: Regenerate.
4677
4678 2003-01-08 Alexandre Oliva <aoliva@redhat.com>
4679
4680 * elfn32-mips.c (prev_reloc_section): New.
4681 (GET_RELOC_ADDEND): Use it. Parenthesize macro arguments.
4682 (SET_RELOC_ADDEND): Parenthesize macro argument.
4683
4684 2003-01-07 John David Anglin <dave.anglin@nrc.gc.ca>
4685
4686 * elf32-hppa.c (final_link_relocate): For all DP relative relocations,
4687 adjust addil instructions if the symbol has no section.
4688
4689 2003-01-07 DJ Delorie <dj@redhat.com>
4690
4691 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make REL_12 not
4692 partial_inplace.
4693
4694 2003-01-07 Andreas Schwab <schwab@suse.de>
4695
4696 * elf32-m68k.c (elf_m68k_check_relocs): Don't set DF_TEXTREL for
4697 PC relative relocations.
4698 (elf_m68k_discard_copies): Set it here instead.
4699
4700 2002-01-02 Ben Elliston <bje@redhat.com>
4701 Jeff Johnston <jjohnstn@redhat.com>
4702
4703 * Makefile.am (ALL_MACHINES): Add cpu-iq2000.lo.
4704 (ALL_MACHINES_CFILES): Add cpu-iq2000.c.
4705 (BFD32_BACKENDS): Add elf32-iq2000.lo.
4706 (BFD32_BACKENDS_CFILES): Add elf32-iq2000.c.
4707 (cpu-iq2000.lo): New target.
4708 * Makefile.in: Regenerate.
4709 * config.bfd: Handle iq2000-*-elf.
4710 * archures.c (bfd_architecture): Add bfd_{arch,mach}_iq2000.
4711 (bfd_archures_list): Add bfd_iq2000_arch.
4712 * configure.in: Handle bfd_elf32_iq2000_vec.
4713 * configure: Regenerate.
4714 * reloc.c: Add BFD_RELOC_IQ2000_OFFSET_16, BFD_RELOC_IQ2000_OFFSET_21,
4715 and BFD_RELOC_IQ2000_UHI16.
4716 * targets.c (bfd_elf32_iq2000_vec): Declare.
4717 (bfd_target_vector): Add bfd_elf32_iq2000_vec.
4718 * elf.c (prep_headers): Set e_machine to EM_IQ2000.
4719 * cpu-iq2000.c: New file.
4720 * elf32-iq2000.c: Likewise.
4721 * libbfd.h: Regenerate.
4722 * bfd-in2.h: Likewise.
4723
4724 2003-01-02 Richard Sandiford <rsandifo@redhat.com>
4725
4726 * elfxx-mips.c: Include libiberty.h.
4727 (elf_mips_isa, _bfd_mips_elf_mach_extends_p): Remove.
4728 (mips_set_isa_flags): New function, split out from...
4729 (_bfd_mips_elf_final_write_processing): ...here. Only call
4730 mips_set_isa_flags if the EF_MIPS_MACH bits are clear.
4731 (mips_mach_extensions): New array.
4732 (mips_32bit_flags_p): New function.
4733 (_bfd_mips_elf_merge_private_bfd_data): Rework architecture checks.
4734 Use mips_32bit_flags_p to check if one binary is 32-bit and the
4735 other is 64-bit. When adopting IBFD's architecture, adopt the
4736 bfd_mach as well as the flags.
4737
4738 2003-01-02 Nick Kelsey <nickk@ubicom.com>
4739
4740 * elf32-ip2k.c: Re-work of linker relaxation code for the ip2k to
4741 fix internal errors, fix bad code generation, fix incorrect stabs
4742 information, and improve ability to eliminate redundant page
4743 instructions. Added code to ip2k_final_link_relocate to self-verify
4744 the linker relaxation. Fix formatting problems.
4745
4746 2002-12-30 Chris Demetriou <cgd@broadcom.com>
4747
4748 * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mipsisa32r2 case.
4749 * archures.c (bfd_mach_mipsisa32r2): New define.
4750 * bfd-in2.h: Regenerate.
4751 * cpu-mips.c (I_mipsisa32r2): New enum value.
4752 (arch_info_struct): Add entry for I_mipsisa32r2.
4753 * elfxx-mips.c (elf_mips_isa, _bfd_elf_mips_mach)
4754 (_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_32R2.
4755 (_bfd_mips_elf_final_write_processing): Add
4756 bfd_mach_mipsisa32r2 case.
4757 (_bfd_mips_elf_merge_private_bfd_data): Handle merging of
4758 binaries marked as using MIPS32 Release 2.
4759
4760 2002-12-30 Dmitry Diky <diwil@mail.ru>
4761
4762 * Makefile.am: Add msp430 target.
4763 * configure.in: Likewise.
4764 * Makefile.in: Regenerate.
4765 * configure: Regenerate.
4766 * archures.c: Add msp430 architecture vector.
4767 * config.bfd: Likewise.
4768 * reloc.c: Add msp430 relocs.
4769 * targets.c: Add msp320 target.
4770 * cpu-msp430.c: New file: msp430 cpu detection.
4771 * elf32-msp430.c: New file: msp430 reloc processing.
4772 * bfd-in2.h: Regenerate.
4773 * libbfd.h: Regenerate.
4774
4775 2002-12-28 Jakub Jelinek <jakub@redhat.com>
4776
4777 * elf.c (elf_sort_sections): Don't reorder .tbss.
4778 (assign_file_positions_for_segments): Only adjust off/voff
4779 for increased alignment in PT_LOAD or PT_NOTE segment,
4780 but adjust p_filesz for .tbss too. in PT_LOAD consider
4781 .tbss to have zero memory size.
4782 (copy_private_bfd_data) [SECTION_SIZE]: Define.
4783 [IS_CONTAINED_BY_VMA, IS_CONTAINED_BY_LMA]: Use it.
4784 [INCLUDE_SECTION_IN_SEGMENT]: Only put SHF_TLS sections
4785 into PT_TLS segment. Never put SHF_TLS sections in
4786 segments other than PT_TLS or PT_LOAD.
4787
4788 * elf64-alpha.c (elf64_alpha_finish_dynamic_sections): Clear .plt
4789 sh_entsize.
4790
4791 2002-12-23 DJ Delorie <dj@redhat.com>
4792
4793 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Fix logic reversal.
4794
4795 2002-12-23 Alan Modra <amodra@bigpond.net.au>
4796
4797 * elflink.h (elf_link_output_extsym): Heed strip_discarded.
4798
4799 2002-12-23 Nick Clifton <nickc@redhat.com>
4800
4801 * archures.c (bfd_arch_get_compatible): Add third parameter
4802 'accept_unknowns'. Only accept unknown format BFDs if
4803 accept_unknowns is true, or if the format is "binary".
4804 * bfd-in2.h: Regenerate.
4805
4806 2002-12-21 Nick Clifton <nickc@redhat.com>
4807
4808 * coff-arm.c (coff_arm_relocate_section): Disable WINCE workaround
4809 that subtracted 8 from pc relative relocations.
4810
4811 2002-12-20 Kazu Hirata <kazu@cs.umass.edu>
4812
4813 * coff-h8300.c: Fix comment typos.
4814 * coffcode.h: Likewise.
4815 * cpu-cris.c: Likewise.
4816 * elf32-vax.c: Likewise.
4817 * genlink.h: Likewise.
4818 * linker.c: Likewise.
4819 * som.c: Likewise.
4820 * tekhex.c: Likewise.
4821 * vms-misc.c: Likewise.
4822
4823 2002-12-20 DJ Delorie <dj@redhat.com>
4824
4825 * reloc.c: Add BFD_RELOC_XSTORMY16_12.
4826 * libbfd.h: Regenerate.
4827 * bfd-in2.h: Regenerate.
4828 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_12.
4829 (xstormy16_reloc_map): Add R_XSTORMY16_12.
4830
4831 2002-12-19 Kazu Hirata <kazu@cs.umass.edu>
4832
4833 * doc/bfdint.texi: Fix typos.
4834
4835 2002-12-20 Paul Eggert <eggert@twinsun.com>
4836
4837 Port to POSIX 1003.1-2001.
4838 * acinclude.m4 (AM_INSTALL_LIBBFD): Do not rely on "test -o".
4839 * configure.in (build-warnings): Likewise.
4840 (Horrible hacks to build DLLs on Windows): Do not rely on "tail -1".
4841 * aclocal.m4: Regenerate.
4842 * config.in: Regenerate.
4843 * configure: Regenerate.
4844
4845 2002-12-19 Alan Modra <amodra@bigpond.net.au>
4846
4847 * coff-h8300.c: Include libiberty.h.
4848 (h8300_reloc16_extra_cases): Check the hash table creator before
4849 referencing h8300 specific fields. Stash the hash table pointer
4850 in a local var. Comment typo fixes.
4851 (h8300_bfd_link_add_symbols): Likewise.
4852
4853 * reloc.c (struct reloc_howto_struct): Revise src_mask and
4854 dst_mask comments.
4855 * bfd-in2.h: Regenerate.
4856
4857 2002-12-18 Alan Modra <amodra@bigpond.net.au>
4858
4859 * elf32-ppc.c (ppc_elf_relocate_section): Reorganize dynamic reloc
4860 code a little. Comment on dynamic relocs against section symbols.
4861
4862 2002-12-17 Roger Sayle <roger@eyesopen.com>
4863
4864 * configure.host (ia64-*-hpux*): Support 64 bit targets using
4865 the HP compiler's "long long".
4866
4867 2002-12-16 Andrew MacLeod <amacleod@redhat.com>
4868
4869 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_LO16
4870 and R_XSTORMY16_HI16) howto entries.
4871 (xstormy16_reloc_map): Map R_XSTORMY16_{LO,HI}16 to BFD_RELOC_{LO,HI}16.
4872 (xstormy16_info_to_howto_rela): Use R_XSTORMY16_GNU_VTINHERIT to
4873 determine the start of the second reloc table.
4874
4875 2002-12-16 Nathan Tallent <eraxxon@alumni.rice.edu>
4876
4877 * ecofflink.c: Fix the reading of the debugging information
4878 of Tru64/Alpha binaries that are produced by recent Compaq
4879 compilers.
4880 (mk_fdrtab): Fix error in creating the FDR (file descriptor)
4881 table.
4882 (lookup_line): Because of the strange information sometimes
4883 generated by Compaq's recent compilers, change how the FDR
4884 table is searched so that PDRs (procedure descriptors) are
4885 correctly found. Note that this change is really more of a hack;
4886 however, I have included extensive documentation as to why
4887 this is the best solution short of an extensive rewrite or
4888 another hack.
4889 (fdrtab_lookup): Add comments to explain the algorithm.
4890
4891 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
4892
4893 * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Reorder
4894 initializers to match struct declaration.
4895
4896 2002-12-12 Alan Modra <amodra@bigpond.net.au>
4897
4898 * dwarf2.c (comp_unit_contains_address): Comment typo fix.
4899 * elf.c (get_program_header_size): Likewise.
4900 * elf32-m32r.c (m32r_elf_lo16_reloc): Likewise.
4901 (m32r_elf_generic_reloc): Likewise.
4902 * elf32-ppc.c (ppc_elf_howto_init): Likewise.
4903 * elflink.h (elf_bfd_discard_info): Likewise.
4904
4905 2002-12-12 Alan Modra <amodra@bigpond.net.au>
4906
4907 * elf32-i386.c (elf_i386_finish_dynamic_sections): Add output_offset
4908 to DT_JMPREL. Use srelplt input section size for DT_PLTRELSZ and
4909 DT_RELSZ adjustment, not output section. Avoid writing tags when
4910 unchanged. Don't assume linker script is sane, adjust DT_REL too.
4911 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Just use raw
4912 size of srelplt for DT_PLTRELSZ. Use srelplt input section size for
4913 DT_RELASZ adjustment, not output section. Avoid writing tags when
4914 unchanged. Adjust DT_RELA.
4915 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Tweaks for better
4916 formatting. Avoid writing tags when unchanged. Adjust DT_RELA.
4917
4918 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
4919
4920 * elfxx-mips.c (mips_elf_calculate_relocation): Don't divide
4921 addend by 4.
4922
4923 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
4924
4925 * elfxx-mips.c (struct mips_got_entry): New.
4926 (struct mips_got_info): Added got_entries field.
4927 (mips_elf_got_entry_hash, mips_elf_got_entry_eq): New functions.
4928 (mips_elf_local_got_index, mips_elf_got_page,
4929 mips_elf_got16_entry): Re-implement in terms of new...
4930 (mips_elf_create_local_got_entry): Rewrite to use got_entries.
4931 Change return type.
4932 (mips_elf_highest): Warning clean-up.
4933 (mips_elf_create_got_section): Initialize got_entries.
4934 (_bfd_mips_elf_check_relocs): Use got_entries to estimate
4935 local got size.
4936 (_bfd_mips_elf_size_dynamic_sections): Do not account for
4937 GOT_PAGE entries, since we now reuse GOT16 entries.
4938
4939 2002-12-10 Jason Thorpe <thorpej@wasabisystems.com>
4940
4941 * aoutx.h (set_section_contents): Allow an otherwise unrepresentable
4942 read-only section that lies after .text and before .data to be
4943 written into the output file and included in a_text.
4944 (translate_to_native_sym_flags): If an otherwise unrepresentable
4945 section was merged with .text, convert its symbols to N_TEXT
4946 symbols.
4947 * libaout.h (aout_section_merge_with_text_p): New macro.
4948
4949 2002-12-08 Alan Modra <amodra@bigpond.net.au>
4950
4951 * bfd-in.h: Comment typo fix. Formatting.
4952 * bfd-in2.h: Regenerate.
4953 * coff64-rs6000.c (xcoff64_openr_next_archived_file): Warning fix.
4954 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): Prototype.
4955 * elf64-mmix.c (mmix_dump_bpo_gregs): Warning fix.
4956
4957 2002-12-05 Richard Henderson <rth@redhat.com>
4958
4959 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21BI.
4960 Only send PCREL21B though the plt. Fix installed reloc type.
4961 (elfNN_ia64_relocate_section): Give error for dynamic reloc
4962 against PCREL22 or PCREL64I; clean up error messages for
4963 branch relocs.
4964
4965 2002-12-04 Kevin Buettner <kevinb@redhat.com>
4966
4967 * elf64-mips.c (elf64_mips_grok_prstatus, elf64_mips_grok_psinfo):
4968 New functions.
4969 (elf_backend_grok_prstatus, elf_backend_grok_psinfo): Define.
4970
4971 2002-12-04 David Mosberger <davidm@hpl.hp.com>
4972
4973 * cpu-ia64-opc.c: Add operand constant "ar.csd".
4974
4975 2002-12-04 H.J. Lu <hjl@gnu.org>
4976
4977 * elfxx-ia64.c (get_local_sym_hash): Use section ID instead of
4978 BFD address when constructing local name.
4979
4980 2002-12-04 Andreas Schwab <schwab@suse.de>
4981
4982 * elf32-m68k.c (struct elf_m68k_link_hash_table): Add sym_sec
4983 member.
4984 (elf_m68k_link_hash_table_create): Initialize it.
4985 (elf_m68k_check_relocs): Handle symbols that are forced to be
4986 local due to visibility changes.
4987 (elf_m68k_adjust_dynamic_symbol): Likewise.
4988 (elf_m68k_size_dynamic_sections): Likewise.
4989 (elf_m68k_discard_copies): Likewise.
4990 (elf_m68k_relocate_section): Likewise.
4991
4992 2002-12-04 Alan Modra <amodra@bigpond.net.au>
4993
4994 * elf64-ppc.c (ppc64_elf_edit_opd): Correct typo.
4995
4996 2002-12-04 Alan Modra <amodra@bigpond.net.au>
4997
4998 * srec.c (srec_write_symbols): Restore '$' prefix to address
4999 accidentally removed in 2002-04-04 change.
5000 (srec_get_symtab): Use 0 instead of `(long) FALSE'.
5001
5002 2002-12-03 Nick Clifton <nickc@redhat.com>
5003
5004 * elf32-ppc.c (apuinfo_list_init): New function.
5005 (apuinfo_list_add): New function: Add a value to the list.
5006 (apuinfo_list_length): New function: Return the number of
5007 values on the list.
5008 (apuinfo_list_element): New function: Return a value on the
5009 list.
5010 (apuinfo_list_finish): New function: Free the resources used
5011 by the list.
5012 (ppc_elf_begin_write_processing): New function. Scan the
5013 input bfds for apuinfo sections.
5014 (ppc_elf_write_section): New function: Delay the creation of
5015 the contents of an apuinfo section in an output bfd.
5016 (ppc_elf_final_write_processing): New function. Create the
5017 contents of an apuinfo section in an output bfd.
5018 (elf_backend_begin_write_processing): Define.
5019 (elf_backend_final_write_processing): Define.
5020 (elf_backend_write_section): Define.
5021
5022 2002-12-03 Richard Henderson <rth@redhat.com>
5023
5024 * cpu-ia64-opc.c (elf64_ia64_operands): Add ldxmov entry.
5025
5026 2002-12-01 Stephane Carrez <stcarrez@nerim.fr>
5027
5028 Fix PR savannah/1417:
5029 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Don't adjust
5030 branch if it goes to the start of the deleted region.
5031
5032 2002-12-01 Stephane Carrez <stcarrez@nerim.fr>
5033
5034 * bfd-in2.h (bfd_mach_m6812): Rebuild.
5035 * archures.c (bfd_mach_m6812_default, bfd_mach_m6812,
5036 bfd_mach_m6812s): Declare.
5037
5038 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): New function.
5039 (_bfd_m68hc12_elf_set_private_flags): Call it.
5040 (_bfd_m68hc12_elf_print_private_bfd_data): Report processor version.
5041 (_bfd_m68hc12_elf_merge_private_bfd_data): Merge the flags and
5042 report microcontroller incompatibilities (HC12 vs HCS12).
5043 (elf_backend_object_p): Update.
5044
5045 2002-11-30 Alan Modra <amodra@bigpond.net.au>
5046
5047 * bfd-in.h (TRUE_FALSE_ALREADY_DEFINED, BFD_TRUE_FALSE): Delete.
5048 (enum bfd_boolean, boolean): Delete.
5049 (bfd_boolean): Typedef to an int.
5050 (FALSE, TRUE): Define.
5051 * aix386-core.c, aix5ppc-core.c, aout-adobe.c, aout-arm.c, aout-cris.c,
5052 aout-encap.c, aout-ns32k.c, aout-target.h, aout-tic30.c, aoutf1.h,
5053 aoutx.h, archive.c, archive64.c, archures.c, bfd-in.h, bfd.c, bfdwin.c,
5054 binary.c, bout.c, cache.c, cisco-core.c, coff-a29k.c, coff-alpha.c,
5055 coff-apollo.c, coff-arm.c, coff-aux.c, coff-h8300.c, coff-h8500.c,
5056 coff-i386.c, coff-i860.c, coff-i960.c, coff-ia64.c, coff-m68k.c,
5057 coff-m88k.c, coff-mcore.c, coff-mips.c, coff-or32.c, coff-ppc.c,
5058 coff-rs6000.c, coff-sh.c, coff-sparc.c, coff-stgo32.c, coff-tic30.c,
5059 coff-tic4x.c, coff-tic54x.c, coff-tic80.c, coff-w65.c, coff-we32k.c,
5060 coff-z8k.c, coff64-rs6000.c, coffcode.h, coffgen.c, cofflink.c,
5061 corefile.c, cpu-a29k.c, cpu-alpha.c, cpu-arc.c, cpu-arm.c, cpu-avr.c,
5062 cpu-cris.c, cpu-d10v.c, cpu-d30v.c, cpu-dlx.c, cpu-fr30.c, cpu-frv.c,
5063 cpu-h8300.c, cpu-h8500.c, cpu-hppa.c, cpu-i370.c, cpu-i386.c,
5064 cpu-i860.c, cpu-i960.c, cpu-ia64.c, cpu-ip2k.c, cpu-m10200.c,
5065 cpu-m10300.c, cpu-m32r.c, cpu-m68hc11.c, cpu-m68hc12.c, cpu-m68k.c,
5066 cpu-m88k.c, cpu-mcore.c, cpu-mips.c, cpu-mmix.c, cpu-ns32k.c,
5067 cpu-openrisc.c, cpu-or32.c, cpu-pdp11.c, cpu-pj.c, cpu-powerpc.c,
5068 cpu-rs6000.c, cpu-s390.c, cpu-sh.c, cpu-sparc.c, cpu-tic30.c,
5069 cpu-tic4x.c, cpu-tic54x.c, cpu-tic80.c, cpu-v850.c, cpu-vax.c,
5070 cpu-w65.c, cpu-we32k.c, cpu-xstormy16.c, cpu-z8k.c, dwarf1.c,
5071 dwarf2.c, ecoff.c, ecofflink.c, efi-app-ia32.c, efi-app-ia64.c,
5072 elf-bfd.h, elf-eh-frame.c, elf-hppa.h, elf-m10200.c, elf-m10300.c,
5073 elf-strtab.c, elf.c, elf32-arc.c, elf32-arm.h, elf32-avr.c,
5074 elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c, elf32-fr30.c,
5075 elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c, elf32-hppa.h,
5076 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
5077 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
5078 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
5079 elf32-pj.c, elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-sh64-com.c,
5080 elf32-sh64.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
5081 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
5082 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-ppc.h, elf64-s390.c,
5083 elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c,
5084 elfarm-oabi.c, elfcode.h, elfcore.h, elflink.c, elflink.h,
5085 elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c, elfxx-mips.h,
5086 elfxx-target.h, format.c, freebsd.h, genlink.h, hash.c, hp300hpux.c,
5087 hppabsd-core.c, hpux-core.c, i386aout.c, i386linux.c, i386lynx.c,
5088 i386mach3.c, i386msdos.c, i386os9k.c, ieee.c, ihex.c, irix-core.c,
5089 libaout.h, libbfd-in.h, libbfd.c, libcoff-in.h, libecoff.h, libieee.h,
5090 libnlm.h, liboasys.h, libpei.h, libxcoff.h, linker.c, lynx-core.c,
5091 m68klinux.c, m68klynx.c, mach-o.c, mach-o.h, merge.c, mipsbsd.c,
5092 mmo.c, netbsd-core.c, netbsd.h, nlm.c, nlm32-alpha.c, nlm32-i386.c,
5093 nlm32-ppc.c, nlm32-sparc.c, nlmcode.h, oasys.c, opncls.c, osf-core.c,
5094 pc532-mach.c, pdp11.c, pe-arm.c, pe-i386.c, pe-mcore.c, pe-mips.c,
5095 pe-sh.c, peXXigen.c, pef.c, pei-arm.c, pei-i386.c, pei-mcore.c,
5096 pei-mips.c, pei-sh.c, peicode.h, ppcboot.c, ptrace-core.c, reloc.c,
5097 reloc16.c, riscix.c, rs6000-core.c, sco5-core.c, section.c, simple.c,
5098 som.c, som.h, sparclinux.c, sparclynx.c, srec.c, stabs.c, sunos.c,
5099 syms.c, targets.c, tekhex.c, ticoff.h, trad-core.c, versados.c,
5100 vms-gsd.c, vms-hdr.c, vms-misc.c, vms-tir.c, vms.c, vms.h,
5101 xcoff-target.h, xcofflink.c, xsym.c, xsym.h: Replace boolean with
5102 bfd_boolean, true with TRUE, false with FALSE. Simplify comparisons
5103 of bfd_boolean vars with TRUE/FALSE. Formatting.
5104 * bfd-in2.h, libbfd.h, libcoff.h: Regenerate
5105
5106 2002-11-28 Alan Modra <amodra@bigpond.net.au>
5107
5108 * elf-bfd.h: Replace occurrences of Elf32_Internal_* and
5109 Elf64_Internal_* with Elf_Internal_*. Replace Elf_Internal_Rel
5110 with Elf_Internal_Rela.
5111 * elf-hppa.h, elf-m10200.c, elf-m10300.c, elf32-arc.c, elf32-arm.h,
5112 elf32-avr.c, elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c,
5113 elf32-fr30.c, elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c,
5114 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
5115 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
5116 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
5117 elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-v850.c, elf32-vax.c,
5118 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
5119 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
5120 elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c, elfarm-oabi.c,
5121 elfcode.h, elflink.h, elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c: Ditto.
5122 * elf-hppa.h (elf_hppa_internal_shdr): Delete. Use Elf_Internal_Shdr
5123 throughout instead.
5124 * elf.c (_bfd_elf_no_info_to_howto_rel): Delete.
5125 * elfcode.h (elf_swap_reloca_in): Pass source operand as a bfd_byte *.
5126 Remove INLINE keyword.
5127 (elf_swap_reloc_in): Likewise. Also clear r_addend.
5128 (elf_swap_reloc_out, elf_swap_reloca_out): Pass destination operand
5129 as a bfd_byte *.
5130 (elf_write_relocs): Consolidate REL and RELA code.
5131 (elf_slurp_reloc_table_from_section): Simplify REL code.
5132 (NAME(_bfd_elf,size_info)): Populate reloc swap entries.
5133 * elf-bfd.h (MAX_INT_RELS_PER_EXT_REL): Define.
5134 * elflink.h (elf_link_read_relocs_from_section): Consolidate REL and
5135 RELA code.
5136 (elf_link_adjust_relocs): Likewise. Don't malloc space for temp
5137 reloc array, use a fixed size of MAX_INT_RELS_PER_EXT_REL.
5138 (elf_link_output_relocs): Likewise.
5139 (elf_reloc_link_order): Likewise.
5140 (elf_finish_pointer_linker_section): Likewise.
5141 (struct elf_link_sort_rela): Remove union.
5142 (elf_link_sort_cmp1): Update to suit.
5143 (elf_link_sort_cmp2): Here too.
5144 (elf_link_sort_relocs): Consolidate REL and RELA code. Fix memory
5145 over-allocation for int_rels_per_ext_rel != 1 case.
5146 * elf32-arm.h: Update all bfd_elf32_swap_reloc_out calls.
5147 * elf32-i386.c: Likewise.
5148 * elf32-cris.c: Likewise for bfd_elf32_swap_reloca_out.
5149 * elf32-hppa.c, elf32-i370.c, elf32-m68k.c, elf32-ppc.c, elf32-s390.c,
5150 elf32-sh.c, elf32-vax.c, elfxx-mips.c: Likewise.
5151 * elf64-alpha.c: Likewise for bfd_elf64_swap_reloca_out.
5152 * elf64-hppa.c, elf64-mips.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
5153 elf64-sparc.c, elf64-x86-64.c: Likewise.
5154 * elfxx-ia64.c: Likewise for bfd_elfNN_swap_reloca_out.
5155 * elfxx-mips.c (sort_dynamic_relocs): Likewise for
5156 bfd_elf32_swap_reloc_in.
5157
5158 * elf32-arm.h: Update elf32_arm_info_to_howto calls.
5159 * elf32-mips.c: Likewise for mips_info_to_howto_rel.
5160 (mips_elf64_swap_reloc_in): Zero r_addend.
5161 (mips_elf64_be_swap_reloc_in): Likewise.
5162 (mips_elf64_slurp_one_reloc_table): Simplify.
5163
5164 * elf64-alpha.c (alpha_elf_size_info): Populate reloc swap entries.
5165 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
5166 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
5167
5168 2002-11-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5169
5170 * elf32-sh.c (sh_elf_relocate_section): Don't complain about
5171 unresolved debugging relocs in dynamic applications.
5172 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
5173
5174 2002-11-26 Alan Modra <amodra@bigpond.net.au>
5175
5176 * elf-eh-frame.c (ENSURE_NO_RELOCS): Disregard R_*_NONE relocs.
5177 (_bfd_elf_discard_section_eh_frame): Don't discard duplicate CIEs
5178 on a relocatable link. Comment typos.
5179 * elf.c (_bfd_elf_link_hash_newfunc): Assign elements of structure
5180 in the order they are declared. Clear elf_hash_value too.
5181 (_bfd_elf_link_hash_table_init): Likewise assign in order. Clear
5182 eh_info and tls_segment.
5183 * elflink.h (elf_link_input_bfd <emit_relocs>): Keep reloc offsets
5184 sorted when discarding relocs by turning them into R_*_NONE.
5185
5186 * libbfd.c (warn_deprecated): Comment spelling.
5187 * po/SRC-POTFILES.in: Regenerate.
5188
5189 2002-11-21 Richard Henderson <rth@redhat.com>
5190
5191 * elflink.h (elf_link_add_object_symbols): Don't overwrite the
5192 arch's st_other bits when merging visibilities.
5193 (elf_link_output_extsym): Tidy clearing of visibility field.
5194
5195 2002-11-21 Alan Modra <amodra@bigpond.net.au>
5196
5197 * coff-mcore.c (SWAP_IN_RELOC_OFFSET): Define.
5198 (SWAP_OUT_RELOC_OFFSET): Define.
5199
5200 2002-11-20 Alexandre Oliva <aoliva@redhat.com>
5201
5202 * elf.c (_bfd_elf_link_hash_table_init): Make sure
5203 can_refcount is properly extended to the type of
5204 init_refcount.
5205
5206 2002-11-19 Alexandre Oliva <aoliva@redhat.com>
5207
5208 * elfxx-mips.c (MIPS_RELOC_RELA_P): New macro.
5209 (_bfd_mips_elf_relocate_section): Use it.
5210
5211 * elfxx-mips.c (MNAME): New macro.
5212 (_bfd_mips_elf_check_relocs): Use it.
5213 (_bfd_mips_elf_discard_info): Likewise.
5214 (_bfd_mips_elf_final_link): Likewise.
5215
5216 2002-11-19 Alan Modra <amodra@bigpond.net.au>
5217
5218 * elf64-ppc.c (ppc64_elf_edit_opd): When deleting relocs, adjust
5219 rel_hdr.sh_size too.
5220
5221 2002-11-18 Klee Dienes <kdienes@apple.com>
5222
5223 * Makefile.am (BFD32_LIBS): Add bfdwin.lo, bfdio.lo.
5224 (BFD32_LIBS_CFILES): Add bfdwin.c, bfdio.c.
5225 (BFD_H_FILES): Add bfdwin.c, bfdio.c.
5226 (LIBBFD_H_FILES): Add bfdwin.c, bfdio.c.
5227 Add dependencies for bfdwin.c, bfdio.c.
5228 * bfd.c: Remove bfd_get_mtime, bfd_get_size.
5229 * libbfd.c: Remove real_read, bfd_bread, _bfd_window_internal,
5230 bfd_init_window, bfd_free_window, bfd_get_file_window, bfd_bwrite,
5231 bfd_tell, bfd_flush, bfd_stat, bfd_seek.
5232 * bfdio.c: New file. Contains real_read, bfd_bread, bfd_write,
5233 bfd_tell, bfd_flush, bfd_stat, bfd_seek, bfd_ge_mtime,
5234 bfd_get_size (moved from libbfd.c and bfd.c).
5235 * bfdwin.c New file. Contains _bfd_window_internal,
5236 bfd_init_window, bfd_free_window, bfd_get_file_window (moved from
5237 libbfd.c and bfd.c).
5238 * po/SRC-POTFILES.in: Regenerate.
5239 * po/bfd.pot: Regenerate.
5240 * libbfd.h: Regenerate.
5241 * bfd-in2.h: Regenerate.
5242 * aclocal.m4: Regenerate.
5243 * Makefile.in: Regenerate.
5244 * configure: Regenerate.
5245
5246 2002-11-18 Klee Dienes <kdienes@apple.com>
5247
5248 * bfd.c (bfd_preserve_save): Don't zero BFD_IN_MEMORY.
5249
5250 2002-11-15 Kazu Hirata <kazu@cs.umass.edu>
5251
5252 * coff-h8300.c (h8300_reloc16_estimate): Do not optimize away
5253 jsr after a short jump.
5254 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
5255
5256 2002-11-15 Klee Dienes <kdienes@apple.com>
5257
5258 * pef.c (bfd_pef_convert_architecture): Move declaration of
5259 ARCH_POWERPC and ARCH_M68K to the start of the function.
5260
5261 2002-11-14 Svein E. Seldal <Svein.Seldal@solidas.com>
5262
5263 * coff-tic4x.c (tic4x_howto_table): Formatting fixup
5264
5265 2002-11-14 Hans-Peter Nilsson <hp@bitrange.com>
5266
5267 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs):
5268 For bpo_gregs_section->contents, allocate _raw_size, not
5269 _cooked_size.
5270
5271 2002-11-13 Klee Dienes <kdienes@apple.com>
5272
5273 * config.bfd: Add entries for powerpc-*-darwin and cousins.
5274
5275 2002-11-13 H.J. Lu <hjl@gnu.org>
5276
5277 * elfcode.h (elf_object_p): Don't restore abfd->arch_info.
5278
5279 2002-11-13 Klee Dienes <kdienes@apple.com>
5280 Alan Modra <amodra@bigpond.net.au>
5281
5282 * bfd.c (struct bfd_preserve): New.
5283 (bfd_preserve_save): New function.
5284 (bfd_preserve_restore): Ditto.
5285 (bfd_preserve_finish): Ditto.
5286 * bfd-in2.h: Regenerate.
5287 * mach-o.c: Formatting.
5288 (bfd_mach_o_scan_read_symtab_symbol): Make "value" unsigned.
5289 (bfd_mach_o_object_p): Use bfd_preserve_save/restore/finish.
5290 (bfd_mach_o_core_p): Ditto.
5291 (bfd_mach_o_scan): Pass in mdata.
5292 * mach-o.h (bfd_mach_o_scan): Update prototype.
5293 * pef.c: Formatting.
5294 (bfd_pef_object_p): Use bfd_preserve_save/restore/finish.
5295 (bfd_pef_xlib_object_p): Ditto.
5296 (bfd_pef_scan): Pass in mdata. Move version check to bfd_pef_object_p.
5297 * pef.h (bfd_pef_scan): Update prototype.
5298 * xsym.c: Formatting, K&R fixes.
5299 (bfd_sym_object_p): Use bfd_preserve_save/restore/finish.
5300 (bfd_sym_scan): New function split out from bfd_sym_object_p.
5301 * xsym.h (bfd_sym_scan): Declare.
5302 * elfcode.h (elf_object_p): Use bfd_preserve_save/restore/finish.
5303 * elfcore.h (elf_core_file_p): Likewise.
5304 * targets.c (_bfd_target_vector): Revert 2002-11-08 change.
5305
5306 2002-11-12 Nick Clifton <nickc@redhat.com>
5307
5308 * po/da.po: Updated Danish translation.
5309
5310 2002-11-12 Alan Modra <amodra@bigpond.net.au>
5311
5312 * elflink.h (elf_link_add_object_symbols): Optimize stabs for
5313 relocatable link too.
5314 (elf_link_input_bfd): When emitting relocs, adjust offsets for
5315 eh_frame and stab sections. Zap deleted relocs.
5316 (elf_reloc_symbol_deleted_p): Return true for zero r_symndx.
5317 (elf_bfd_discard_info): Run for relocatable link too.
5318 * elf64-ppc.c (ppc64_elf_edit_opd): Rename from edit_opd. Make global.
5319 Handle ld -r case.
5320 (ppc64_elf_size_dynamic_sections): Don't call edit_opd from here.
5321 * elf64-ppc.h (ppc64_elf_edit_opd): Declare.
5322
5323 * elf-bfd.h (struct cie_header): Move from elf_eh-frame.c.
5324 (struct cie, struct eh_cie_fde, struct eh_frame_sec_info): Likewise.
5325 (struct eh_frame_array_ent, struct eh_frame_hdr_info): Likewise.
5326 (enum elf_link_info_type): Remove ELF_INFO_TYPE_EH_FRAME_HDR.
5327 (struct eh_frame_hdr_info): Add "hdr_sec", remove "split".
5328 (struct elf_link_hash_table): Add eh_info.
5329 (struct elf_obj_tdata): Change eh_frame_hdr to an asection *.
5330 (_bfd_elf_discard_section_eh_frame): Update prototype.
5331 (_bfd_elf_discard_section_eh_frame_hdr): Likewise.
5332 (_bfd_elf_write_section_eh_frame): Likewise.
5333 (_bfd_elf_write_section_eh_frame_hdr): Likewise.
5334 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Remove "ehdrsec"
5335 param. Get "hdr_info" from link hash table.
5336 (_bfd_elf_discard_section_eh_frame_hdr): Remove "sec" param. Get
5337 header section from link hash table. Save header section to elf_tdata.
5338 (_bfd_elf_maybe_strip_eh_frame_hdr): Remove local "sec". Use
5339 header section from link hash table. Don't alloc hdr_info. Clear
5340 hdr_sec instead of setting "strip".
5341 (_bfd_elf_eh_frame_section_offset): Formatting.
5342 (_bfd_elf_write_section_eh_frame): Remove "ehdrsec", add "info" param.
5343 Get header section from link hash table.
5344 (_bfd_elf_write_section_eh_frame_hdr): Remove "sec", add "info" param.
5345 Get header section from link hash table.
5346 * elf.c (map_sections_to_segments): Use cached eh_frame_hdr.
5347 (get_program_header_size): Likewise.
5348 (_bfd_elf_section_offset): Formatting.
5349 * elflink.h (elf_link_create_dynamic_sections): Stash eh frame header
5350 section pointer in link hash table.
5351 (elf_bfd_final_link): Adjust _bfd_elf_write_section_eh_frame_hdr
5352 and _bfd_elf_write_section_eh_frame calls. Update comment about
5353 eh_frame entries.
5354 (elf_bfd_discard_info): Adjust _bfd_elf_discard_section_eh_frame and
5355 _bfd_elf_discard_section_eh_frame_hdr calls. Remove "ehdr".
5356
5357 * po/SRC-POTFILES.in: Regenerate.
5358
5359 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't zero
5360 relocs for discarded FDEs. Remove dead code.
5361 (_bfd_elf_write_section_eh_frame_hdr): Remove dead code.
5362 * elflink.h (elf_bfd_discard_info): Don't save edited relocs.
5363 Tidy conditions under which stabs are edited. Formatting.
5364 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
5365 from discarded relocs.
5366 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Add reloc output
5367 section adjustments after testing magic values.
5368
5369 2002-11-12 Thomas Moestl <tmm@FreeBSD.org>
5370
5371 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Correct
5372 references to large plt symbols.
5373
5374 2002-11-12 Klee Dienes <kdienes@apple.com>
5375
5376 * mach-o.c (bfd_mach_o_scan_read_thread): Don't re-use 'i' when
5377 looking for an unused section name.
5378
5379 2002-11-11 Kazu Hirata <kazu@cs.umass.edu>
5380
5381 * coff-h8300.c: Fix formatting.
5382 * elf32-h8300.c: Likewise.
5383 * reloc16.c: Likewise.
5384
5385 2002-11-09 Jeroen Dobbelaere <jeroen.dobbelaere@acunia.com>
5386
5387 * elf32-arm.h (elf32_arm_size_dynamic_sections): Don't strip output
5388 section when dynamic section unused; _bfd_strip_section_from_output
5389 instead.
5390
5391 2002-11-08 Alan Modra <amodra@bigpond.net.au>
5392
5393 * targets.c (_bfd_target_vector): Disable pef_vec, pef_xlib_vec
5394 and sym_vec.
5395
5396 * dwarf2.c: Revert last change.
5397
5398 2002-11-07 Michal Ludvig <mludvig@suse.cz>
5399
5400 * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
5401 _bfd_dwarf2_find_nearest_line): Use
5402 bfd_simple_get_relocated_section_contents() instead of
5403 bfd_get_section_contents().
5404 * reloc.c (bfd_perform_relocation): Add sanity check.
5405 * simple.c (simple_get_relocated_section_contents): If the section
5406 does not have any relocs associated with it, just return the
5407 unadjusted contents.
5408
5409 2002-11-07 Hans-Peter Nilsson <hp@axis.com>
5410
5411 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOT,
5412 case R_CRIS_32_GOT>: Correct test for filling in constant .got
5413 contents, enabling for a non-DSO, for symbols defined in the
5414 program with --export-dynamic.
5415
5416 2002-11-07 Alan Modra <amodra@bigpond.net.au>
5417
5418 * elf64-ppc.c: Comment typo fixes.
5419 (ppc64_elf_merge_private_bfd_data): Allow BFD_ENDIAN_UNKNOWN input.
5420
5421 2002-11-07 Nick Clifton <nickc@redhat.com>
5422
5423 * po/da.po: Updated Danish translation.
5424
5425 2002-11-06 Alexandre Oliva <aoliva@redhat.com>
5426
5427 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Generate
5428 exactly three internal relocs per external reloc. Set reloc_count
5429 to the external reloc count.
5430
5431 2002-11-06 Klee Dienes <kdienes@apple.com>
5432
5433 * coff-stgo32.c (stub_bytes): Mark as const.
5434 Fix comment formatting.
5435
5436 2002-11-06 Klee Dienes <kdienes@apple.com>
5437
5438 * Makefile.am (BFD32_BACKENDS): Add mach-o.lo, pef.lo, and
5439 xsym.lo.
5440 (BFD32_BACKENDS_CFILES): Add mach-o.c, pef.c, and xsym.c.
5441 (SOURCE_HFILES): Add mach-o.h, pef.h, pef-traceback.h, xsym.h
5442 * archures.c (enum bfd_architecture): Add bfd_arch_m98k.
5443 * bfd.c (struct bfd): Add private data for mach-o, pef, and sym.
5444 * targets.c (enum bfd_flavour): Add flavours for mach-o, pef, and
5445 sym.
5446 (_bfd_target_vector): Add target vectors for mach-o, pef, and sym.
5447 * Makefile.in: Regenerate.
5448 * doc/Makefile.in: Regenerate.
5449 * bfd-in2.h: Regenerate.
5450 * xsym.c: New file. Contains support for the Apple/Metrowerks
5451 xSYM debugging format.
5452 * xsym.h: New file.
5453 * pef.c: New file. Contains support for the Apple Code Fragment
5454 Manager Preferred Executable Format
5455 * pef.h: New file.
5456 * pef-traceback.h: New file. Contains support for parsing PowerPC
5457 traceback tables as used by PEF executables (and perhaps other
5458 systems as well).
5459 * mach-o.c: New file. Contains support for the Mach-O object file
5460 format.
5461 * mach-o.h: New file.
5462 * mach-o-target.c: New file. Declares the mach-o targets
5463 themselves. Included three times by mach-o.c; each time with a
5464 different set of macros set.
5465
5466 2002-11-06 Graeme Peterson <gp@qnx.com>
5467
5468 * Makefile.am: Remove entries for elf32-qnx.[ch].
5469 * Makefile.in: Regenerate.
5470 * config.bfd: Change arm-nto to use bfd_elf32_{big|little}arm_vec,
5471 ppc-nto to use bfd_elf32_powerpc{le}_vec, sh-nto to use
5472 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
5473 * configure.in: Remove support for bfd_elf32_sh{l}qnx_vec,
5474 bfd_elf32_powerpc{le}qnx_vec, bfd_elf32_{big|little}armqnx_vec,
5475 and bfd_elf32_i386qnx_vec, and removed elf32-qnx.lo from other targets.
5476 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
5477 * configure: Regenerate.
5478 * elf32-qnx.c: Remove.
5479 * elf32-qnx.h: Remove.
5480 * elf.c: Remove calls to QNX specific set_nonloadable_filepos,
5481 is_contained_by_filepos, and copy_private_bfd_data_p.
5482 * elf-bfd.h (struct elf_backend_data): Remove set_nonloadable_filepos,
5483 is_contained_by_filepos, and copy_private_bfd_data_p.
5484 * elf32-i386.c: Remove QNX extended bfd support.
5485 * elf32-ppc.c: Remove QNX extended bfd support.
5486 * elf32-sh.c: Remove QNX extended bfd support.
5487 * elfarm-nabi.c: Remove QNX extended bfd support.
5488 * targets.c: Remove qnx vectors.
5489 * elfxx-target.h (elf_backend_set_nonloadable_filepos): Remove
5490 (elf_backend_is_contained_by_filepos): Remove.
5491 (elf_backend_copy_private_bfd_data_p): Remove.
5492 * po/SRC-POTFILES.in: Regenerate.
5493
5494 2002-11-06 David O'Brien <obrien@FreeBSD.org>
5495 Alan Modra <amodra@bigpond.net.au>
5496
5497 * elf64-sparc.c (sparc64_elf_relocate_section): Adjust addend of
5498 dynamic relocs against section symbols for the output section vma.
5499
5500 2002-11-05 Alan Modra <amodra@bigpond.net.au>
5501
5502 * elf32-arm.h (t2a1_push_insn, t2a2_ldr_insn, t2a3_mov_insn,
5503 t2a4_bx_insn, t2a5_pop_insn, t2a6_bx_insn): Remove.
5504
5505 2002-11-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5506 Alan Modra <amodra@bigpond.net.au>
5507
5508 * config.bfd (sh-*-linux*): Use bfd_elf*_sh64*lin_vec as sh64
5509 vectors in target_selvecs.
5510 (shle-*-netbsdelf*): Use bfd_elf*_sh64*nbsd_vec as sh64 vectors
5511 in target_selvecs.
5512 (sh-*-netbsdelf*): Likewise.
5513 * configure.in (assocvecs): New variable. Handle assocvecs like
5514 selvecs.
5515 * configure: Regenerate.
5516 * format.c (bfd_check_format_matches): Store bfd_target pointers
5517 in matching_vector instead of target names. Select first target
5518 from bfd_associated_vector that matches a list of ambiguous targets.
5519 * targets.c (_bfd_associated_vector): New array.
5520 (bfd_associated_vector): New variable.
5521 (_bfd_target_vector): Add bfd_elf*_sh64*lin_vec.
5522 * libbfd-in.h (bfd_associated_vector): Declare.
5523 * libbfd.h: Regenerate.
5524
5525 2002-11-05 Elias Athanasopoulos <eathan@otenet.gr>
5526
5527 * vms-gsd.c (_bfd_vms_write_gsd): Check that symbol->udata.p is
5528 non-NULL before dereferencing.
5529
5530 2002-11-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5531
5532 * vms.c (vms_object_p): Restore the start address when returning
5533 NULL.
5534
5535 2002-11-04 Alan Modra <amodra@bigpond.net.au>
5536 Hans-Peter Nilsson <hp@axis.com>
5537
5538 * elflink.h (struct elf_final_link_info): Add shndxbuf_size.
5539 (elf_bfd_final_link): Don't bother zeroing symtab_hdr fields.
5540 Set up a larger symshndxbuf, and write it out. Free it on
5541 exit rather than freeing symbuf twice. Correct section index
5542 on output section symbol loop.
5543 (elf_link_output_sym): Accumulate symbol extension section
5544 indices, reallocating symshndxbuf rather than writing it out.
5545 (elf_link_flush_output_syms): Don't flush symshndxbuf.
5546 * elf.c (assign_section_numbers): Init i_shdrp to all zero.
5547 Use bfd_zalloc to clear i_shdrp[0] too.
5548
5549 2002-11-03 Stephen Clarke <stephen.clarke@earthling.net>
5550
5551 * elf32-sh64-com.c (sh64_address_in_cranges): Use
5552 _raw_size of cranges section if _cooked_size not yet set.
5553
5554 2002-11-03 Hans-Peter Nilsson <hp@axis.com>
5555
5556 * elf32-v850.c (v850_elf_relax_delete_bytes): Correct parameters
5557 for bfd_elf32_swap_symbol_out.
5558
5559 2002-10-31 David O'Brien <obrien@FreeBSD.org>
5560
5561 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't mix
5562 signed and unsigned in comparison.
5563
5564 2002-10-30 Daniel Jacobowitz <drow@mvista.com>
5565
5566 * coffcode.h: Remove extraneous '\'.
5567
5568 2002-10-28 H.J. Lu <hjl@gnu.org>
5569
5570 * Makefile.am (targets.lo): Depend on Makefile instead of
5571 config.status.
5572 (archures.lo): Likewise.
5573 * Makefile.in: Regenerated.
5574
5575 2002-10-25 Jason Thorpe <thorpej@wasabisystems.com>
5576
5577 * config.bfd (mips*el-*-netbsd*, mips*-*-netbsd*): Add
5578 bfd_elf64_bigmips_vec and bfd_elf64_littlemips_vec to
5579 targ_selvecs.
5580
5581 2002-10-25 Jim Wilson <wilson@redhat.com>
5582
5583 * elf64-sh64.c (sh_elf64_relocate_section): Call
5584 _bfd_elf_rela_local_sym. Handle relocs against STT_SECTION symbol
5585 of SHF_MERGE section.
5586
5587 2002-10-25 Hans-Peter Nilsson <hp@axis.com>
5588
5589 * simple.c: Correct placement of ATTRIBUTE_UNUSED.
5590
5591 2002-10-24 John David Anglin <dave@hiauly1.hia.nrc.ca>
5592
5593 * aoutx.h (NAME(aout,swap_ext_reloc_in)): Cast bytes->r_index to
5594 unsigned int. Cast RELOC_BASE10, RELOC_BASE13 and RELOC_BASE22 to
5595 unsigned int.
5596 (NAME(aout,final_link)): Cast enum used in assignment.
5597 (aout_link_write_symbols): Cast enums in comparisons, int values to
5598 boolean, enums in assignments to int.
5599 (aout_link_input_section_std): Cast rel->r_index to unsigned int.
5600 (aout_link_input_section_ext): Likewise. Cast enums used in
5601 comparisons with unsigned ints.
5602 (aout_link_reloc_link_order): Cast enum to int in assignment.
5603 * archive.c (_bfd_generic_read_ar_hdr_mag): Cast result of memchr
5604 calls to char *.
5605 * bfd-in.h (bfd_set_section_vma): Cast enum true to unsigned int in
5606 assignment.
5607 * bfd-in2.h (bfd_set_section_vma): Likewise.
5608 * bfd.c (bfd_record_phdr): Cast enums in assignments.
5609 * binary.c (bfd_alloc): Cast enum to long.
5610 * coffgen.c (_bfd_coff_is_local_label_name): Cast return to boolean.
5611 * dwarf2.c (read_abbrevs): Add casts to enum types.
5612 (read_attribute_value): Likewise.
5613 (arange_add): Cast result of bfd_zalloc call.
5614 (comp_unit_contains_address): Return true and false.
5615 (comp_unit_find_nearest_line): Cast return to boolean.
5616 * format.c (bfd_check_format_matches, bfd_set_format): Likewise.
5617 * gen-aout.c: define macro '_' if not defined.
5618 * libbfd.c (bfd_realloc): Cast malloc and realloc to PTR.
5619 (bfd_bwrite): Cast bfd_realloc to bfd_byte *.
5620 (bfd_write_bigendian_4byte_int): Cast return to boolean.
5621 (bfd_seek): Cast bfd_realloc to bfd_byte *.
5622 (bfd_generic_is_local_label_name): Cast return to boolean.
5623 * libcoff.h (_bfd_coff_adjust_symndx): Remove extraneous '\'.
5624 * linker.c (_bfd_link_hash_newfunc): Cast bfd_hash_allocate result to
5625 struct bfd_hash_entry *.
5626 (_bfd_generic_link_hash_newfunc): likewise.
5627 (_bfd_generic_final_link): Cast enum to unsigned int.
5628 * merge.c (sec_merge_emit): Cast return to boolean.
5629 (merge_strings): Add casts to const unsigned char *.
5630 * reloc.c (bfd_get_reloc_code_name): Cast enums in comparison to int.
5631 (bfd_generic_get_relocated_section_content): Cast enum to unsigned int.
5632 * section.c (bfd_section_hash_newfunc): Cast bfd_hash_allocate result
5633 to struct bfd_hash_entry *.
5634 (bfd_set_section_content): Add cast to PTR in comparison.
5635 * simple.c (simple_dummy_warning, simple_dummy_undefined_symbol,
5636 simple_dummy_reloc_overflow, simple_dummy_reloc_dangerous,
5637 simple_dummy_unattached_reloc,
5638 bfd_simple_get_relocated_section_contents): Add K&R declarations and
5639 function definitions.
5640 * srec.c (S3Forced): Initialize to false.
5641 (srec_get_symtab): Cast return value from bfd_alloc to asymbol *.
5642 * stabs.c (_bfd_link_section_stabs): Cast enum to int in comparisons.
5643 (_bfd_discard_section_stabs): Likewise. Also cast return to boolean.
5644 * syms.c (bfd_is_undefined_symclass): Cast return to boolean.
5645 (_bfd_stab_section_find_nearest_line): Cast enum to bfd_byte in
5646 comparisons.
5647
5648 2002-10-23 Jakub Jelinek <jakub@redhat.com>
5649
5650 * elf64-alpha.c (elf64_alpha_check_relocs): Only put maybe_dynamic
5651 relocs into shared lib non-allocated reloc sections.
5652
5653 2002-10-23 Nathan Tallent <eraxxon@alumni.rice.edu>
5654
5655 * dwarf2.c (add_line_info): Ensure that the line_info_table is
5656 sorted even when given an out-of-order line sequence.
5657 (lookup_address_in_line_info_table): When an exact VMA match is
5658 not found, return line information with the closest VMA.
5659
5660 2002-10-23 Ross Alexander <ross.alexander@uk.neceur.com>
5661
5662 * elf64-hppa.c: Force DT_FLAGS to always be set. Required by
5663 HPUX 11.00 patch PHSS_26559.
5664
5665 2002-10-22 Alexandre Oliva <aoliva@redhat.com>
5666
5667 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Don't move
5668 the options section into a separate section unless IRIX 6
5669 compatibility is enabled.
5670
5671 2002-10-22 Alexandre Oliva <aoliva@redhat.com>
5672
5673 * elflink.h (struct elf_link_sort_rela): Turn rel and rela
5674 into arrays.
5675 (elf_link_sort_cmp1, elf_link_sort_cmp2): Adjust.
5676 (elf_link_sort_relocs): Likewise. Take int_rels_per_ext_rel
5677 into account.
5678 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Compose
5679 R_MIPS_REL32 with R_MIPS64 if ABI_64_P.
5680
5681 2002-10-21 Graeme Peterson <gp@qnx.com>
5682
5683 * targets.c (_bfd_target_vector): Add missing qnx vectors.
5684
5685 2002-10-21 Alan Modra <amodra@bigpond.net.au>
5686
5687 * targets.c (bfd_target_list): Don't return the default target twice.
5688
5689 2002-10-21 Elias Athanasopoulos <eathan@otenet.gr>
5690
5691 * archive.c (_bfd_archive_bsd_update_armap_timestamp): Replace
5692 perror with bfd_perror.
5693
5694 2002-10-19 H.J. Lu <hjl@gnu.org>
5695
5696 * elflink.h (elf_link_add_object_symbols): Correctly handle
5697 DT_RPATH and DT_RUNPATH.
5698
5699 2002-10-19 Mark Kettenis <kettenis@gnu.org>
5700
5701 * elf.c (elfcore_grok_note): Fix recognition on NT_PRXFPREG notes.
5702
5703 2002-10-17 Denis Chertykov <denisc@overta.ru>
5704
5705 * elf32-ip2k.c (ELF_MACHINE_ALT1): Define alternate machine code
5706 for ip2k port.
5707
5708 2002-10-17 Alan Modra <amodra@bigpond.net.au>
5709
5710 * elfxx-target.h (USE_REL): Don't define as 1.
5711 * elf32-arm.h (USE_REL): Provide a default define of 0.
5712 Use #if rather than #ifdef when testing USE_REL.
5713 * elf32-m32r.c: Likewise.
5714
5715 * elf32-arc.c (USE_REL): Define as 1.
5716 * elf32-d10v.c (USE_REL): Likewise.
5717 * elf32-m32r.c (USE_REL): Likewise.
5718 * elf32-m68hc11.c (USE_REL): Likewise.
5719 * elf32-m68hc12.c (USE_REL): Likewise.
5720 * elf32-or32.c (USE_REL): Likewise.
5721 * elfarm-nabi.c (USE_REL): Likewise.
5722
5723 2002-10-16 Jakub Jelinek <jakub@redhat.com>
5724
5725 * config.bfd (s390-*-linux*): Add targ64_selvecs.
5726 (s390x-*-linux*): Add targ_selvecs.
5727
5728 2002-10-16 Alan Modra <amodra@bigpond.net.au>
5729
5730 * Makefile.am (BFD32_BACKENDS): Remove elfarmqnx-nabi.lo,
5731 elf32-i386-fbsd.lo, elf32-i386qnx.lo, elf32-ppcqnx.lo,
5732 elf32-sh-lin.lo, elf32-sh64-lin.lo, elf32-sh-nbsd.lo,
5733 elf32-sh64-nbsd.lo, elf32-shqnx.lo. Add elf32-qnx.lo.
5734 (BFD32_BACKENDS_CFILES): Likewise for corresponding C files.
5735 (BFD64_BACKENDS): Remove elf64-sh64-lin.lo, elf64-sh64-nbsd.lo.
5736 (BFD64_BACKENDS_CFILES): Likewise for corresponding C files.
5737 (SOURCE_HFILES): Add elf32-qnx.h.
5738 (BUILD_HFILES): Add bfdver.h.
5739 Run "make dep-am".
5740 * Makefile.in: Regenerate.
5741 * configure.in Update bfd vector dependencies.
5742 * configure: Regenerate.
5743 * elf32-i386-fbsd.c: Delete. Move code to elf32-i386.c.
5744 * elf32-i386qnx.c: Likewise.
5745 * elf32-ppcqnx.c: Delete. Move code to elf32-ppc.c.
5746 * elf32-sh-nbsd.c: Delete. Move code to elf32-sh.c.
5747 * elf32-sh-lin.c: Likewise.
5748 * elf32-shqnx.c: Likewise.
5749 * elf32-sh64-lin.c: Delete. Move code to elf32-sh64.c.
5750 * elf32-sh64-nbsd.c: Likewise.
5751 * elf64-sh64-lin.c: Delete. Move code to elf64-sh64.c.
5752 * elf64-sh64-nbsd.c: Likewise.
5753 * elfarmqnx-nabi.c: Delete. Move code to elfarm-nabi.c.
5754 * elf32-arm.h (ELF_MAXPAGESIZE): Always define.
5755 * elf32-i386.c: Remove ELF_ARCH and ELF32_I386_C_INCLUDED tests.
5756 * elf32-ppc.c: Remove ELF32_PPC_C_INCLUDED tests.
5757 * elf32-qnx.h (elf_backend_set_nonloadable_filepos): Always define.
5758 (elf_backend_is_contained_by_filepos): Likewise.
5759 (elf_backend_copy_private_bfd_data_p): Likewise.
5760 Globalize and move functions to..
5761 * elf32-qnx.c: ..here. New file.
5762 * elf32-sh.c: Remove ELF_ARCH and ELF32_SH_C_INCLUDED tests. Don't
5763 emit target vectors when INCLUDE_SHMEDIA.
5764 * elf32-sh64.c: Remove ELF_ARCH test. Move TARGET_* etc. defines to
5765 end of file.
5766 * elf64-sh64.c: Remove ELF_ARCH test.
5767 * elfarm-nabi.c: Remove ELFARM_NABI_C_INCLUDED test.
5768 * po/BLD-POTFILES.in: Regenerate.
5769 * po/SRC-POTFILES.in: Regenerate.
5770
5771 2002-10-16 Alan Modra <amodra@bigpond.net.au>
5772
5773 * elflink.h (elf_link_add_object_symbols): Error out on dynamic objects
5774 loaded with --just-symbols.
5775
5776 * elf32-i386qnx.c (TARGET_LITTLE_NAME): Define.
5777 * elf32-ppcqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
5778 * elf32-shqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
5779 * elfarmqnx-nabi.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
5780
5781 2002-10-15 Richard Henderson <rth@redhat.com>
5782
5783 * Makefile.am (BFD64_BACKENDS): Remove elf64-alpha-fbsd.
5784 (BFD64_BACKENDS_CFILES): Likewise.
5785 * configure.in (bfd_elf64_alpha_freebsd_vec): Use elf64-alpha.
5786 * elf64-alpha-fbsd.c: Remove file, move code ...
5787 * elf64-alpha.c: ... here.
5788 * Makefile.in, configure: Rebuild.
5789
5790 2002-10-14 Richard Henderson <rth@redhat.com>
5791
5792 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: Increment
5793 VALUE, not ADDEND.
5794
5795 2002-10-14 Stephen Clarke <stephen.clarke@superh.com>
5796
5797 * elf32-sh.c (elf_sh_link_hash_entry): Replace
5798 datalabel_got_offset with union of datalabel_got
5799 offset and refcount.
5800 (sh_elf_link_hash_newfunc): Initialize datalabel_got.refcount.
5801 (allocate_dynrelocs): Delete unnecessary code for
5802 STT_DATALABEL type. Create entry in got for
5803 datalabel version of symbol if datalabel_got.refcount > 0.
5804 (sh_elf_relocate_section): Use datalabel_got union.
5805 (sh_elf_gc_sweep_hook): Pull common code to initialize
5806 h and eh out of switch statement. Declare seen_stt_datalabel.
5807 Initialize it. Decrement datalabel_got.refcount for
5808 got relocs when seen_stt_datalabel is true.
5809 Decrement local_got_refcounts entry for datalabel got relocs
5810 of local symbols.
5811 (sh_elf_copy_indirect_symbol): Copy datalabel_got field over.
5812 (sh_elf_check_relocs): Declare seen_stt_datalabel.
5813 Initialize it. When seen_stt_datalabel is true, increment
5814 datalabel_got refcount rather than got.refcount.
5815 (sh_elf_finish_dynamic_symbol): Create relocs to
5816 initialize got entry for datalabel version of symbol.
5817
5818 2002-10-14 Alan Modra <amodra@bigpond.net.au>
5819
5820 * Makefile.am: Run "make dep-am".
5821 (BFD_H_FILES): Remove version.h.
5822 * bfd-in.h (BFD_VERSION, BFD_VERSION_DATE, BFD_VERSION_STRING): Move..
5823 * version.h: ..to here.
5824 * configure.in (bfd_version_date): Remove.
5825 (AC_OUTPUT): Make bfdver.h from version.h.
5826 * bfd.c: #include "bfdver.h".
5827 * vms-hdr.c: Likewise.
5828 * Makefile.in: Regenerate.
5829 * bfd-in2.h: Regenerate.
5830 * configure: Regenerate.
5831 * po/SRC-POTFILES.in: Regenerate.
5832
5833 2002-10-14 Alan Modra <amodra@bigpond.net.au>
5834
5835 * archures.c (bfd_mach_i386_i386, bfd_mach_i386_i8086,
5836 bfd_mach_i386_i386_intel_syntax, bfd_mach_x86_64,
5837 bfd_mach_x86_64_intel_syntax bfd_mach_ppc, bfd_mach_ppc64,
5838 bfd_mach_rs6k, bfd_mach_d10v, bfd_mach_sh, bfd_mach_v850,
5839 bfd_mach_arc_5, bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8,
5840 bfd_mach_m32r, bfd_mach_frv, bfd_mach_frvsimple,
5841 bfd_mach_ia64_elf64, bfd_mach_ia64_elf32,
5842 bfd_mach_ip2022, bfd_mach_ip2022ext,
5843 bfd_mach_s390_31, bfd_mach_s390_64, bfd_mach_xstormy16): Renumber.
5844 * bfd-in2.h: Regenerate.
5845
5846 2002-10-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5847
5848 * config.bfd (sh*eb-*-linux*, sh*-*-linux*): Add the alternative
5849 endian vector to targ_selvecs.
5850
5851 2002-10-13 Alexandre Oliva <aoliva@redhat.com>
5852
5853 * elfxx-mips.c (mips_elf_calculate_relocation): Take
5854 save_addend argument. Don't apply the 32-bit mask to a
5855 GPREL32 value if it's to be used in another relocation. Don't
5856 use forced-check computation of local_p to decide whether to
5857 add gp0 to GPREL16 value. Don't use only the lowest 16 bits
5858 of the addend of a non-in-place GPREL16 relocation.
5859 (_bfd_mips_elf_relocate_section): Pass use_saved_addend_p to
5860 mips_elf_calculate_relocation().
5861
5862 2002-10-12 Stephane Carrez <stcarrez@nerim.fr>
5863
5864 * elf32-m68hc11.c (m68hc11_elf_relax_section): Don't treat relocs
5865 with symbols in other sections if we relaxed something; the sections
5866 output offsets must be re-computed before.
5867
5868 2002-10-12 Stephane Carrez <stcarrez@nerim.fr>
5869
5870 * elf32-m68hc11.c (m68hc11_elf_relax_section): Update symbols
5871 handling to use Elf_Internal_Sym.
5872 (m68hc11_elf_relax_delete_bytes): Likewise.
5873
5874 2002-10-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5875
5876 * elf32-sh.c (sh_elf_optimized_tls_reloc, sh_elf_mkobject,
5877 sh_elf_object_p, dtpoff_base): New functions.
5878 (sh_elf_howto_table): Add TLS relocs.
5879 (sh_reloc_map): Likewise.
5880 (sh_elf_info_to_howto): Support TLS relocs.
5881 (elf_sh_link_hash_entry): Add tls_type and tls_tpoff32.
5882 (sh_elf_hash_entry, sh_elf_tdata, sh_elf_local_got_tls_type):
5883 New macros.
5884 (sh_elf_obj_tdata): New.
5885 (elf_sh_link_hash_table): Add tls_ldm_got.
5886 (sh_elf_link_hash_table_create): Clear refcount of tls_ldm_got.
5887 (allocate_dynrelocs): Support TLS relocs.
5888 (sh_elf_size_dynamic_sections): Likewise.
5889 (sh_elf_relocate_section): Support TLS relocs. Don't try to find
5890 .rela.got section when found already. Return false after printing
5891 error about unresolvable relocation.
5892 (sh_elf_gc_sweep_hook): Support TLS relocs.
5893 (sh_elf_check_relocs): Likewise.
5894 (sh_elf_finish_dynamic_symbol): Likewise.
5895 (bfd_elf32_mkobject, elf_backend_object_p): Define for TLS case.
5896 * reloc.c: Add SH TLS relocs.
5897 * bfd-in2.h, libbfd.h: Regenerate.
5898
5899 2002-10-11 Daniel Jacobowitz <drow@mvista.com>
5900
5901 * Makefile.in: Regenerated.
5902
5903 2002-10-11 Daniel Jacobowitz <drow@mvista.com>
5904
5905 * Makefile.am: Run dep-am.
5906 (BFD_H_DEP): Add simple.c and linker.c.
5907 (BFD32_LIBS): Add simple.lo.
5908 (BFD32_LIBS_CFILES): Add simple.c.
5909 * Makefile.in: Regenerated.
5910 * bfd-in2.h: Regenerated.
5911 * simple.c: New file.
5912
5913 2002-10-11 Alan Modra <amodra@bigpond.net.au>
5914
5915 * coff-arm.c (record_arm_to_thumb_glue): Avoid type-punned pointers.
5916 (record_thumb_to_arm_glue): Likewise.
5917 * ecoff.c (ecoff_link_add_externals): Likewise.
5918 * elf32-arm.h (record_arm_to_thumb_glue): Likewise.
5919 (record_thumb_to_arm_glue): Likewise.
5920 * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
5921 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
5922 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
5923 * elf64-alpha.c (elf64_alpha_create_dynamic_sections): Likewise.
5924 * elf64-ppc.c (func_desc_adjust): Likewise.
5925 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
5926 (sh64_elf64_create_dynamic_sections): Likewise.
5927 * elflink.c (_bfd_elf_create_got_section): Likewise.
5928 (_bfd_elf_create_dynamic_sections): Likewise.
5929 (_bfd_elf_create_linker_section): Likewise.
5930 * elflink.h (elf_add_default_symbol): Likewise.
5931 (elf_link_create_dynamic_sections): Likewise.
5932 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
5933 * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Likewise.
5934 * elfxx-mips.c (mips_elf_create_got_section): Likewise.
5935 (_bfd_mips_elf_add_symbol_hook): Likewise.
5936 (_bfd_mips_elf_create_dynamic_sections): Likewise.
5937 * linker.c (generic_link_add_symbol_list): Likewise.
5938 * xcofflink.c (xcoff_link_add_symbols): Likewise.
5939
5940 * elfxx-ia64.c (oor_brl, oor_ip): Conditionally define.
5941
5942 * elf64-ppc.c (edit_opd): Only zero opd syms when function is
5943 completely removed. Correct local sym adjustment.
5944
5945 2002-10-10 Stephen Clarke <stephen.clarke@superh.com>
5946
5947 * elf32-sh.c (elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
5948 Correct mistake in calculation of address of .got.
5949 * elf64-sh64.c (elf_sh64_pic_plt_entry_be,
5950 elf_sh64_pic_plt_entry_le): Likewise.
5951
5952 2002-10-09 Richard Shann <richard.shann@superh.com>
5953 Stephen Clarke <stephen.clarke@superh.com>
5954
5955 * Makefile.am: Add entries for elf32-sh64-lin.c and
5956 elf64-sh64-lin.c. Regenerate.
5957 * Makefile.in: Regenerate.
5958 * config.bfd: Change sh64eb-*-linux* and sh64-*-linux*
5959 to use sh64 vectors rather than sh vectors.
5960 * configure.in: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
5961 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
5962 * configure: Regenerate.
5963 * elf32-sh64-lin.c: New file.
5964 * elf64-sh64-lin.c: New file.
5965 * targets.c: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
5966 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
5967
5968 2002-10-08 H.J. Lu <hjl@gnu.org>
5969
5970 * elf32-i386.c (elf_i386_relocate_section): Re-arrange the
5971 IE->LE transition for R_386_TLS_IE.
5972
5973 2002-10-08 Alan Modra <amodra@bigpond.net.au>
5974
5975 * elf64-ppc.c (edit_opd): Correct test for discarded sections.
5976
5977 2002-10-07 Mark Elbrecht <snowball3@softhome.net>
5978
5979 * cofflink.c (mark_relocs): Don't mark relocations in excluded
5980 sections.
5981
5982 2002-10-07 Alan Modra <amodra@bigpond.net.au>
5983
5984 * elflink.h (elf_link_input_bfd): Remove BFD_VERSION_DATE dependent
5985 code.
5986
5987 * elf64-ppc.c (ppc64_elf_build_stubs): Increment .glink indx.
5988
5989 2002-10-06 Alan Modra <amodra@bigpond.net.au>
5990
5991 * opncls.c: Formatting.
5992 (_bfd_new_bfd): Use a smaller section hash table.
5993
5994 2002-10-05 Alexandre Oliva <aoliva@redhat.com>
5995
5996 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Set the type
5997 of the other two relocations packed with a REL32 to NONE.
5998
5999 2002-10-02 Stephen Clarke <stephen.clarke@superh.com>
6000
6001 * elf32-sh.c (elf_sh_link_hash_entry): Add gotplt_refcount.
6002 (sh_elf_link_hash_newfunc): Initialize it.
6003 (allocate_dynrelocs): Transfer gotplt refs from plt.refcount
6004 to got.refcount for symbols that are forced local or when
6005 we have direct got refs.
6006 (sh_elf_gc_sweep_hook): Adjust gotplt_refcount. Use it
6007 to correctly adjust got.refcount and plt.refcount.
6008 (sh_elf_copy_indirect_symbol): Copy gotplt_refcount across.
6009 (sh_elf_check_relocs): Increment gotplt_refcount.
6010
6011 2002-10-01 Jakub Jelinek <jakub@redhat.com>
6012
6013 * elf32-i386.c (elf_i386_relocate_section): Fix
6014 movl foo@indntpoff, %eax IE->LE transition.
6015
6016 2002-10-01 Jakub Jelinek <jakub@redhat.com>
6017
6018 * elf64-x86-64.c (elf64_x86_64_relocate_section): Change TLSGD
6019 sequence and its transitions.
6020
6021 2002-10-01 Jakub Jelinek <jakub@redhat.com>
6022
6023 * elf32-i386.c (elf_i386_relocate_section): Resolve R_386_TLS_LDO_32
6024 to st_value + addend in non-code sections.
6025 * elf64-x86-64.c (elf64_x86_64_relocate_section): Resolve
6026 R_X86_64_DTPOFF32 to st_value + addend in non-code sections.
6027
6028 2002-09-30 Gavin Romig-Koch <gavin@redhat.com>
6029 Ken Raeburn <raeburn@cygnus.com>
6030 Aldy Hernandez <aldyh@redhat.com>
6031 Eric Christopher <echristo@redhat.com>
6032 Richard Sandiford <rsandifo@redhat.com>
6033
6034 * archures.c (bfd_mach_mips4120, bfd_mach_mips5400): New.
6035 (bfd_mach_mips5500): New.
6036 * cpu-mips.c (I_mips4120, I_mips5400, I_mips5500): New.
6037 (arch_info_struct): Add corresponding entries here.
6038 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_4120,
6039 E_MIPS_MACH_5400 and E_MIPS_MACH_5500.
6040 (_bfd_mips_elf_final_write_processing): Handle bfd_mach_mips4120,
6041 bfd_mach_mips5400 and bfd_mach_mips5500.
6042 (_bfd_mips_elf_mach_extends_p): New function.
6043 (_bfd_mips_elf_merge_private_bfd_data): Use it to help merge
6044 the EF_MIPS_MACH flags.
6045 * bfd-in2.h: Regenerate.
6046
6047 2002-09-28 Jason Thorpe <thorpej@wasabisystems.com>
6048
6049 * elf32-vax.c (elf_vax_size_dynamic_section): Don't strip
6050 .got sections.
6051
6052 2002-09-28 Alan Modra <amodra@bigpond.net.au>
6053
6054 * elf.c (map_sections_to_segments): Correct test for start of
6055 writable section in the same page as end of read-only section.
6056
6057 2002-09-27 Matt Thomas <matt@3am-software.com>
6058
6059 * elf32-vax.c (elf_vax_check_relocs): Remove unused
6060 local_got_refcounts usage. Remove allocation of got slot.
6061 (elf_vax_gc_sweep_hook): Remove unused local_got_refcounts usage.
6062 Remove de-allocation of got slot.
6063 (elf_vax_size_dynamic_section): Fix some indentation. Add hash
6064 traversal for elf_vax_instantiate_got_entries. Allow empty .got
6065 sections to be GC'ed.
6066 (elf_vax_instantiate_got_entries): New function.
6067 (elf_vax_relocate_section): Simplify R_VAX_GOT32 handling. Remove
6068 tests that are now handled by elf_vax_instantiate_got_entries.
6069 Assert GOT entry falls within .got section size. Remove redundant
6070 comparisions. Fix comments.
6071
6072 2002-09-27 Jakub Jelinek <jakub@redhat.com>
6073
6074 * reloc.c: Add x86-64 TLS relocs.
6075 * bfd-in2.h, libbfd.h: Rebuilt.
6076 * elf64-x86-64.c (x86_64_elf_howto): Fix size fields for 32-bit
6077 relocs. Add TLS relocs.
6078 (x86_64_reloc_map): Add TLS relocs.
6079 (elf64_x86_64_info_to_howto): Adjust for added TLS relocs.
6080 (struct elf64_x86_64_link_hash_entry): Add tls_type field.
6081 (GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD, GOT_TLS_IE): Define.
6082 (elf64_x86_64_hash_entry): Define.
6083 (struct elf64_x86_64_obj_tdata): New.
6084 (elf64_x86_64_tdata, elf64_x86_64_local_got_tls_type): Define.
6085 (struct elf64_x86_64_link_hash_table): Add tls_ld_got.
6086 (link_hash_newfunc): Initialize tls_type.
6087 (elf64_x86_64_link_hash_table_create): Initialize tls_ld_got.
6088 (elf64_x86_64_copy_indirect_symbol): Swap tls_type if necessary.
6089 (elf64_x86_64_mkobject): New.
6090 (elf64_x86_64_elf_object_p): Allocate struct elf64_x86_64_obj_tdata.
6091 (elf64_x86_64_tls_transition): New.
6092 (elf64_x86_64_check_relocs): Add r_type variable and use it.
6093 Handle TLS relocs.
6094 (elf64_x86_64_gc_sweep_hook): Handle TLS relocs.
6095 (allocate_dynrelocs): Allocate GOT space for TLS relocs.
6096 (elf64_x86_64_size_dynamic_sections): Likewise.
6097 (dtpoff_base, tpoff): New.
6098 (elf64_x86_64_relocate_section): Handle TLS relocs.
6099 (elf64_x86_64_finish_dynamic_symbol): Only handle non-TLS GOT
6100 entries.
6101 (bfd_elf64_mkobject): Define.
6102
6103 * elf32-i386.c (elf_i386_check_relocs) [R_386_TLS_LE]: Set
6104 DF_STATIC_TLS if shared.
6105
6106 2002-09-26 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6107
6108 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Don't emit unneeded
6109 empty relocation sections.
6110
6111 2002-09-26 Alan Modra <amodra@bigpond.net.au>
6112
6113 * elf64-ppc.c (ppc_build_one_stub): Don't build glink stubs here.
6114 (ppc64_elf_build_stubs): Build them here instead.
6115
6116 2002-09-24 Jakub Jelinek <jakub@redhat.com>
6117
6118 * elf32-sparc.c (elf32_sparc_relocate_section): Put R_SPARC_RELATIVE
6119 addend into r_addend, not *r_offset.
6120 (elf32_sparc_finish_dynamic_symbol): Likewise.
6121 * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Clear xword at
6122 R_SPARC_RELATIVE's r_offset.
6123
6124 2002-09-23 Nathan Tallent <eraxxon@alumni.rice.edu>
6125
6126 * dwarf2.c (decode_line_info): Update to correctly decode
6127 the (non-standard DWARF2) out-of-order address sequences
6128 generated by the Intel C++ 6.0 compiler for ia64-Linux.
6129
6130 2002-09-23 Mark Elbrecht <snowball3@softhome.net>
6131
6132 * config.bfd: For DJGPP targets, match with any cpu and any machine.
6133
6134 2002-09-23 Alan Modra <amodra@bigpond.net.au>
6135
6136 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Zero relocs
6137 for discarded FDEs. Remove redundant assignment.
6138 * elflink.h (elf_bfd_discard_info): Save edited relocs.
6139
6140 2002-09-22 H.J. Lu <hjl@gnu.org>
6141
6142 * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Don't merge
6143 the relocation count between different .reloc sections.
6144
6145 2002-09-21 Alan Modra <amodra@bigpond.net.au>
6146
6147 * elf32-ppc.c (ppc_elf_relocate_section): Allow ".sbss.*" and
6148 ".sdata.*" for R_PPC_SDAREL16, ".sbss2*" and ".sdata2*" for
6149 R_PPC_EMB_SDA2REL. Similarly for R_PPC_EMB_SDA21 and
6150 R_PPC_EMB_RELSDA.
6151
6152 * elfcode.h (elf_slurp_reloc_table_from_section): Make "symcount"
6153 unsigned. Move "symcount" assignment out of loop.
6154 * Makefile.am: Run "make dep-am".
6155 * Makefile.in: Regenerate.
6156 * configure: Regenerate.
6157 * po/SRC-POTFILES.in: Regnerate.
6158
6159 2002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
6160
6161 * dwarf2.c (_bfd_dwarf2_find_nearest_line): If address length is
6162 zero, set it to 8 for (non-standard) 64-bit DWARF2 formats
6163 (e.g. IRIX64).
6164
6165 2002-09-19 Jakub Jelinek <jakub@redhat.com>
6166
6167 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Clear .got word
6168 even if generating R_PPC_RELATIVE reloc.
6169 (ppc_elf_relocate_section): Make sure relocation is performed
6170 if skip == -2. Clear memory at r_offset when creating dynamic
6171 relocation.
6172
6173 2002-09-19 Jakub Jelinek <jakub@redhat.com>
6174
6175 * reloc.c (BFD_RELOC_386_TLS_TPOFF, BFD_RELOC_386_TLS_IE,
6176 BFD_RELOC_386_TLS_GOTIE): Add.
6177 * bfd-in2.h, libbfd.h: Rebuilt.
6178 * elf32-i386.c (elf_howto_table): Add R_386_TLS_TPOFF, R_386_TLS_IE
6179 and R_386_TLS_GOTIE.
6180 (elf_i386_reloc_type_lookup): Handle it.
6181 (struct elf_i386_link_hash_entry): Change tls_type type to unsigned
6182 char instead of enum, change GOT_* into defines.
6183 (GOT_TLS_IE_POS, GOT_TLS_IE_NEG, GOT_TLS_IE_BOTH): Define.
6184 (elf_i386_tls_transition): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
6185 (elf_i386_check_relocs): Likewise. Avoid crash if local symbol is
6186 accessed both as normal and TLS symbol. Move R_386_TLS_LDM and
6187 R_386_PLT32 cases so that R_386_TLS_IE can fall through.
6188 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
6189 (elf_i386_gc_sweep_hook): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
6190 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
6191 (allocate_dynrelocs): Allocate 2 .got and 2 .rel.got entries if
6192 tls_type is GOT_TLS_IE_BOTH.
6193 (elf_i386_size_dynamic_sections): Likewise.
6194 (elf_i386_relocate_section): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
6195 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
6196 (elf_i386_finish_dynamic_symbol): Use tls_type & GOT_TLS_IE to catch
6197 all 4 GOT_TLS_* TLS types.
6198
6199 2002-09-19 Nick Clifton <nickc@redhat.com>
6200
6201 * elflink.h (elf_fix_symbol_flags): When examining weak symbols,
6202 follow indirect links.
6203
6204 2002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
6205
6206 * ecoffswap.h (ecoff_swap_pdr_in) <isym, iline>: Update to
6207 correctly sign-extend 32-bit ECOFF null values (0xffffffff, -1)
6208 on 64 bit machines.
6209 (ecoff_swap_sym_in) <iss>: Likewise.
6210 * ecoff.c (_bfd_ecoff_slurp_symbolic_info): Fix error reading
6211 ECOFF information: 'ioptMax' refers to the actual *size*
6212 of the optimization symtab, not the number of entries.
6213
6214 2002-09-19 Daniel Jacobowitz <drow@mvista.com>
6215
6216 * elf32-arm.h (elf32_arm_adjust_dynamic_symbol): Update
6217 ELF_LINK_HASH_NEEDS_PLT logic.
6218
6219 2002-09-18 Daniel Jacobowitz <drow@mvista.com>
6220
6221 * elfcode.h (elf_slurp_reloc_table_from_section): Check
6222 correct relocation count.
6223
6224 2002-09-17 Daniel Jacobowitz <drow@mvista.com>
6225
6226 * bfd-in.h (bfd_get_dynamic_symcount): Define.
6227 * bfd.c (struct _bfd): Add dynsymcount.
6228 * bfd-in2.h: Regenerated.
6229 * elf.c (_bfd_elf_canonicalize_dynamic_symtab): Set
6230 abfd->dynsymcount.
6231 * elfcode.h (elf_slurp_reloc_table_from_section): Check
6232 for overflow.
6233
6234 2002-09-17 Stan Cox <scox@redhat.com>
6235
6236 * elf64-mips.c (mips_elf64_be_swap_reloca_out): Handle type2 and type3.
6237 (mips_elf64_final_gp): Don't make up gp value.
6238 * elfn32-mips.c (mips_elf_final_gp): Likewise.
6239 * elfxx-mips.c (_bfd_mips_elf_final_link): Always create
6240 .MIPS.options/.options section.
6241
6242 2002-09-17 David O'Brien <obrien@FreeBSD.org>
6243
6244 * elf32-i386-fbsd.c: Always label using the EI_OSABI method.
6245 It is benign for FreeBSD < 4.1. Minor reformatting.
6246 * elf64-alpha-fbsd.c: Likewise.
6247
6248 2002-09-17 Jakub Jelinek <jakub@redhat.com>
6249
6250 * elf32-i386.c (elf_i386_relocate_section) [R_386_TLS_TPOFF32]: Negate
6251 addend.
6252
6253 2002-09-17 Alan Modra <amodra@bigpond.net.au>
6254
6255 * elf64-alpha.c (alpha_elf_size_info): Make static.
6256
6257 2002-09-17 Svein E. Seldal <Svein.Seldal@solidas.com>
6258
6259 * coff-tic4x.c: Add function declarations and ATTRIBUTE_UNUSED.
6260 * cpu-tic4x.c: Ditto.
6261
6262 2002-09-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6263
6264 * elf64-mips.c (define elf_backend_ignore_discarded_relocs): Remove
6265 duplicate define.
6266
6267 2002-09-16 Bruno Haible <bruno@clisp.org>
6268
6269 * elf32-i386.c: Don't defined ELF_ARCH etc. if this file is included
6270 by a target variant implementation.
6271 * elf64-alpha.c: Likewise.
6272 * elf32-i386-fbsd.c: New file.
6273 * elf64-alpha-fbsd.c: New file.
6274 * targets.c: Support bfd_elf32_i386_freebsd_vec and
6275 bfd_elf64_alpha_freebsd_vec.
6276 * configure.in: Accept the vectors bfd_elf32_i386_freebsd_vec,
6277 bfd_elf64_alpha_freebsd_vec.
6278 * Makefile.am (BFD32_BACKENDS): Add elf32-i386-fbsd.lo.
6279 (BFD32_BACKENDS_CFILES): Add elf32-i386-fbsd.c.
6280 (BFD64_BACKENDS): Add elf64-alpha-fbsd.lo.
6281 (BFD64_BACKENDS_CFILES): Add elf64-alpha-fbsd.c.
6282 (elf32-i386-fbsd.lo, elf64-alpha-fbsd.lo): Add dependencies.
6283 * config.bfd: For FreeBSD targets, set targ_defvec to a FreeBSD
6284 specific targets. Define OLD_FREEBSD_ABI_LABEL if appropriate.
6285
6286 2002-09-12 Jakub Jelinek <jakub@redhat.com>
6287
6288 * elf32-i386.c (dtpoff_base, tpoff): Don't crash if tls_segment is
6289 NULL.
6290 (elf_i386_relocate_section): Return false after printing error about
6291 unresolvable relocation.
6292
6293 2002-09-12 Nick Clifton <nickc@redhat.com>
6294
6295 * elf32-arm.h (elf32_arm_final_link_relocate): Fix handling of
6296 R_ARM_THM_PC11.
6297
6298 2002-09-11 Jeffrey Law <law@redhat.com>
6299
6300 * elf32-h8300.c (elf32_h8_relax_section): Fix typo.
6301
6302 2002-09-11 Andrew Haley <aph@cambridge.redhat.com>
6303
6304 * elf.c (_bfd_elf_find_nearest_line): Check functionname_ptr and
6305 line_ptr before deciding we've found a symbol.
6306
6307 2002-09-11 Nick Clifton <nickc@redhat.com>
6308
6309 * po/da.po: New Danish translation file.
6310 * configure.in (LINGUAS): Add 'da'.
6311 * configure: Regenerate.
6312
6313 2002-09-10 Michael Snyder <msnyder@redhat.com>
6314
6315 * irix-core.c (do_sections, do_sections64): New functions.
6316 (irix_core_core_file_p): Call new functions do_sections,
6317 do_sections64, depending on corefile (32-bit or 64-bit).
6318
6319 2002-09-09 Richard Henderson <rth@redhat.com>
6320
6321 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21M
6322 and PCREL21F like PCREL21B.
6323
6324 2002-09-04 Kevin Buettner <kevinb@redhat.com>
6325
6326 * config.bfd (mips*-*-irix6*): Add new ABI vectors. Make n32 default
6327 vector.
6328
6329 2002-09-02 Nick Clifton <nickc@redhat.com>
6330
6331 * elf32-v850.c (v850_elf_final_link_relocate): Use helpful
6332 names instead of cryptically overloaded bfd_reloc error
6333 codes.
6334 (v850_elf_relocate_section): Likewise.
6335 (v850_elf_relax_section): Replace caching of external symbols
6336 with caching of internal symbols obtained from calling
6337 bfd_elf_get_elf_syms().
6338 Fixup problems with freeing cached allocated memory blocks.
6339
6340 2002-09-02 Alan Modra <amodra@bigpond.net.au>
6341
6342 * cpu-pj.c (scan_mach, compatible, arch_info_struct): Remove.
6343 (bfd_pj_arch): Use bfd_default_scan.
6344 * cpu-v850.c (scan): Remove.
6345 (N): Use bfd_default_scan.
6346 * cpu-z8k.c (scan_mach): Remove.
6347 (arch_info_struct, bfd_z8k_arch): Reorganize so that the default is
6348 first. Use bfd_default_scan.
6349
6350 * ecoff.c (_bfd_ecoff_set_arch_mach_hook): Don't use hard-coded
6351 bfd_mach constants.
6352 (ecoff_get_magic): Likewise.
6353 * elf32-v850.c (v850_elf_object_p): Likewise.
6354 (v850_elf_final_write_processing): Likewise.
6355 * mipsbsd.c (MY(set_arch_mach)): Likewise.
6356 (MY(write_object_contents)): Likewise.
6357 * coff64-rs6000.c (xcoff64_write_object_contents): Likewise.
6358 * coffcode.h (coff_write_object_contents): Likewise.
6359 (coff_set_arch_mach_hook): Add comment describing machine == 0.
6360 Remove unnecessary "machine" assignments.
6361 (coff_write_relocs): Test for the absolute section sym by testing
6362 section and flags.
6363
6364 * aoutx.h (NAME(aout,machine_type)): Recognize bfd_mach_i386_i386
6365 and bfd_mach_i386_i386_intel_syntax.
6366 * pdp11.c (NAME(aout,machine_type)): Likewise.
6367
6368 2002-08-30 John David Anglin <dave@hiauly1.hia.nrc.ca>
6369
6370 * bfd-in.h (align_power): Cast constants to bfd_vma type.
6371 * bfd-in2.h (align_power): Likewise.
6372
6373 2002-08-30 Alan Modra <amodra@bigpond.net.au>
6374
6375 * Makefile.am: Run "make dep-am".
6376 * Makefile.in: Regenerate.
6377
6378 * cpu-avr.c (compatible): Don't use hard-coded mach constants.
6379 * cpu-powerpc.c (powerpc_compatible): Likewise.
6380 * cpu-rs6000.c (rs6000_compatible): Likewise.
6381
6382 2002-08-28 Catherine Moore <clm@redhat.com>
6383
6384 * elf32-v850.c (v850_elf_reloc_map): Add new relocs.
6385 (v850-elf-reloc): Don't resolve pc relative relocs.
6386 (v850_elf_ignore_reloc): New routine.
6387 (v850_elf_final_link_relocate): Handle new relocs.
6388 (v850_elf_relax_delete_bytes ): New routine.
6389 (v850_elf_relax_section): New routine.
6390 (bfd_elf32_bfd_relax_section): Define.
6391 (HOWTO): New entries for new relocs.
6392 * reloc.c (BFD_RELOC_V850_LONGCALL): New reloc.
6393 (BFD_RELOC_V850_LONGJUMP): New reloc.
6394 (BFD_RELOC_V850_ALIGN): New reloc.
6395 * archures.c: Remove redundant v850ea architecture.
6396 * cpu-v850.c: Remove redundant v850ea support.
6397 * libbfd.h: Regenerate.
6398 * bfd-in2.h: Regenerated.
6399
6400 2002-08-28 Svein E. Seldal <Svein.Seldal@solidas.com>
6401
6402 * config.bfd: Add tic4x-*-*coff* and c4x-*-*coff* target.
6403 * configure.in: Add tic4x_coff vector files.
6404 * configure: Regenerate.
6405 * Makefile.am: Add tic4x target.
6406 * Makefile.in: Regenerate.
6407
6408 2002-08-27 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
6409
6410 * archures.c: Add the BFD arch type tic4x.
6411 * bfd-in.h: Add BFD_IN_MEMORY flag.
6412 * coff-tic4x.c: New file.
6413 * coffswap.h (coff_swap_sym_out): Add preadjuster.
6414 * cpu-tic4x.c: New file.
6415 * targets.c: Added tic4x- in list of xvecs.
6416 * ticoff.h: New file.
6417 * bfd-in2.h: Regenerate.
6418
6419 2002-08-27 Adam Nemet <anemet@lnxw.com>
6420
6421 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Set the last
6422 bit of DT_INIT and DT_FINI for Thumb functions.
6423
6424 2002-08-26 Alan Modra <amodra@bigpond.net.au>
6425
6426 * coffcode.h (coff_set_arch_mach_hook): Handle W65MAGIC.
6427
6428 2002-08-26 Alan Modra <amodra@bigpond.net.au>
6429
6430 * aoutx.h (NAME(aout,reloc_type_lookup)): Handle BFD_RELOC_8.
6431
6432 2002-08-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6433
6434 * elf32-sh.c (sh_elf_copy_indirect_symbol): New.
6435 (create_got_section, allocate_dynrelocs, readonly_dynrelocs):
6436 Likewise.
6437 (struct elf_sh_pcrel_relocs_copied): Removed.
6438 (struct elf_sh_dyn_relocs): New.
6439 (struct elf_sh_link_hash_entry): Replace pcrel_relocs_copied
6440 field with dyn_relocs.
6441 (struct elf_sh_link_hash_table): Add short-cuts to get dynamic
6442 sections and sym_sec.
6443 (sh_elf_link_hash_newfunc): Clear dyn_relocs.
6444 (sh_elf_link_hash_table_create): Clear shorts-cuts and sym_sec.
6445 (sh_elf_create_dynamic_sections): Use create_got_section instead
6446 of _bfd_elf_create_got_section.
6447 (sh_elf_check_relocs): Likewise.
6448 (sh_elf_create_dynamic_sections): Use short-cuts to the dynamic
6449 sections.
6450 (sh_elf_adjust_dynamic_symbol, sh_elf_size_dynamic_sections,
6451 sh_elf_relocate_section, sh_elf_check_relocs,
6452 sh_elf_finish_dynamic_symbol, sh_elf_finish_dynamic_sections):
6453 Likewise.
6454 (sh_elf_adjust_dynamic_symbol): Handle nocopyreloc. Keep the
6455 dynamic relocations and avoiding the copy relocation when we
6456 didn't find any dynamic relocations in the section which has
6457 contents or is read-only.
6458 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
6459 (sh_elf_size_dynamic_sections): Don't reset the size of
6460 .rela.got section even if dynamic_sections_created flag is off.
6461 Don't use sh_elf_discard_copies. Scan all input bfd and use
6462 allocate_dynrelocs. Call readonly_dynrelocs to determine
6463 whether we need DT_TEXTREL.
6464 (sh_elf_adjust_dynamic_symbol): Use plt.refcount to determine
6465 whether the symbol was never referred to.
6466 (sh_elf_relocate_section): Use WILL_CALL_FINISH_DYNAMIC_SYMBOL.
6467 (sh_elf_gc_sweep_hook): Fill with the real sweep function.
6468 (sh_elf_check_relocs): Call create_got_section if the short-cut
6469 to .got is null. Increment reference counters only instead of
6470 allocating space on dynamic sections here. Don't conditionalize
6471 uninitialized got.offset value when marking the symbol as a
6472 global offset table entry. Keep relocations for symbols satisfied
6473 by a dynamic library to avoid copy relocations for the symbol.
6474 Set dynobj field of an elf hash table if needed.
6475 (sh_elf_finish_dynamic_sections): Handle null section pointer
6476 correctly.
6477 (elf_backend_copy_indirect_symbol): Defined.
6478 (elf_backend_can_refcount): Defined.
6479
6480 2002-08-23 Nick Clifton <nickc@redhat.com>
6481
6482 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Undo
6483 previous change. Add comment explaining why.
6484
6485 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>
6486
6487 * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le): Copy
6488 contents of .got.plt[2] to tr0, not address of .got.plt.
6489 (sh_elf_finish_dynamic_symbol): Do not apply GOT_BIAS when
6490 patching absolute plt entry. For shmedia plt entry, set bottom bit
6491 of branch to plt0 as this is a branch to an shmedia instruction.
6492 * elf64-sh64.c (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le):
6493 Copy contents of .got.plt[2] to tr0, not address of .got.plt.
6494 (elf_sh64_plt_entry_be, elf_sh64_plt_entry_le): Use ptrel to
6495 branch to plt0.
6496 (sh64_elf64_finish_dynamic_symbol): Do not apply GOT_BIAS when
6497 patching absolute plt entry. For shmedia plt entry, branch to
6498 plt0 is now ptrel, so use relative offset. Set bottom bit of
6499 branch target as it is a branch to an shmedia instruction.
6500
6501 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>,
6502 Richard Shann <richard.shann@superh.com>
6503
6504 * elf32-sh.c (sh_elf_finish_dynamic_sections): Set LSB of DT_INIT
6505 value if .init is an SHmedia function. Similarly for DT_FINI.
6506 * elf64-sh64.c (sh64_elf64_finish_dynamic_sections): Likewise.
6507
6508 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>
6509
6510 * elf32-sh.c (sh_elf_size_dynamic_sections): Zero initialize
6511 dynamic section.
6512 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
6513
6514 2002-08-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6515
6516 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use a simple
6517 byte read when reading the return address register column.
6518
6519 2002-08-22 Nick Clifton <nickc@redhat.com>
6520
6521 * config.bfd: Add powepc64-*-*bsd* target.
6522
6523 2002-08-22 Graeme Peterson <gp@qnx.com>
6524
6525 * Makefile.am: Add entries for elf32-shqnx.c
6526 * Makefile.in: Regenerate.
6527 * config.bfd: Add support sh-*-nto* target.
6528 * configure.in: Add support for bfd_elf32_sh{l}qnx_vec.
6529 * configure: Regenerate.
6530 * elf32-qnx.h: Changed typo "elf_i386qnx_*" to "elf_qnx_*" .
6531 * elf32-sh.c: Do not include elf32-target.h if
6532 ELF32_SH_C_INCLUDED is defined.
6533 * elf32-shqnx.c: New file: Support for QNX.
6534 * targets.c: Add bfd_elf32_sh{l}qnx_vec.
6535
6536 2002-08-22 Nick Clifton <nickc@redhat.com>
6537
6538 * po/tr.po: Updated Turkish translation.
6539
6540 * syms.c (_bfd_generic_read_minisymbols): Set bfd_error if the
6541 symbols are not read.
6542
6543 2002-08-22 Alan Modra <amodra@bigpond.net.au>
6544
6545 * elf32-m68hc11.c: Formatting fixes.
6546 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
6547 * elf32-m68hc12.c: Formatting fixes.
6548 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
6549
6550 2002-08-22 Alan Modra <amodra@bigpond.net.au>
6551
6552 * coff-rs6000.c (rs6000coff_vec <object_flags>): Add SEC_CODE and
6553 SEC_DATA.
6554 (pmac_xcoff_vec): Likewise.
6555 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
6556 (aix5coff64_vec): Likewise.
6557
6558 2002-08-22 Alan Modra <amodra@bigpond.net.au>
6559
6560 * elf-bfd.h (struct elf_backend_data): Add struct elf_backend_data
6561 param to elf_backend_copy_indirect_symbol.
6562 (_bfd_elf_link_hash_copy_indirect): Likewise.
6563 * elflink.h (elf_add_default_symbol, elf_fix_symbol_flags): Adjust
6564 calls to copy_indirect_symbol.
6565 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
6566 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
6567 * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
6568 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
6569 * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
6570 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
6571 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
6572 * elfxx-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
6573 * elfxx-mips.h (_bfd_mips_elf_copy_indirect_symbol): Likewise.
6574 * elf.c (_bfd_elf_link_hash_copy_indirect): Likewise. Properly
6575 test refcounts for "used" values.
6576
6577 2002-08-21 John David Anglin <dave@hiauly1.hia.nrc.ca>
6578
6579 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Add PARAMS to
6580 argument declaration.
6581
6582 2002-08-19 Elena Zannoni <ezannoni@redhat.com>
6583
6584 * archures.c (bfd_mach_ppc_e500): Added.
6585 * bfd-in2.h: Rebuilt.
6586 * cpu-powerpc.c (bfd_powerpc_archs): Added e500.
6587
6588 2002-08-19 Alan Modra <amodra@bigpond.net.au>
6589
6590 * elf32-m68hc12.c (elf_backend_can_gc_sections): False.
6591
6592 2002-08-17 Andrew Cagney <ac131313@redhat.com>
6593
6594 * elf.c (bfd_elf_get_elf_syms): Change type of `esym' to
6595 `bfd_byte'.
6596
6597 2002-08-17 Stan Cox <scox@redhat.com>
6598
6599 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Use the
6600 IRIX 6 segment layout for NEWABI.
6601
6602 2002-08-16 Stephen Clarke <stephen.clarke@superh.com>
6603
6604 * elf32-sh.c (sh_elf_gc_mark_hook): For sh64, skip indirect
6605 symbols when looking for section referred to by a relocation.
6606 * elf64-sh.c (sh_elf64_gc_mark_hook): Likewise.
6607
6608 2002-08-15 Alan Modra <amodra@bigpond.net.au>
6609
6610 * elf32-i370.c: Move reloc enum to include/elf/i370.h.
6611
6612 2002-08-15 Hans-Peter Nilsson <hp@axis.com>
6613
6614 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Add
6615 missing check for whether the symbol is referenced by DSO before
6616 unexporting it as an unneeded dynamic symbol.
6617
6618 2002-08-14 H.J. Lu <hjl@gnu.org>
6619
6620 * libbfd.h: Regenerate.
6621
6622 2002-08-14 H.J. Lu <hjl@gnu.org>
6623
6624 * config.bfd: Always add 64bit vectors to 32bit Linux/mips.
6625
6626 2002-08-14 Stephane Carrez <stcarrez@nerim.fr>
6627
6628 * elf32-m68hc11.c (m68hc11_relax_group): New to relax group of
6629 instructions.
6630 (m68hc11_direct_relax): New to define table of relaxable instructions.
6631 (find_relaxable_insn): New, find a relaxable insn.
6632 (compare_reloc): New to compare two relocs.
6633 (m68hc11_elf_relax_section): New, relax text sections.
6634 (m68hc11_elf_relax_delete_bytes): New, delete bytes and adjust branchs.
6635 (elf32_m68hc11_check_relocs): New function for GC support.
6636 (elf32_m68hc11_relocate_section): New function for GC support.
6637 (bfd_elf32_bfd_relax_section): Define to support linker relaxation.
6638 (elf_backend_check_relocs): Likewise.
6639 (elf_backend_relocate_section): Likewise.
6640
6641 2002-08-13 H.J. Lu <hjl@gnu.org>
6642
6643 * elflink.h (NAME(bfd_elf,size_dynamic_sections): Don't count
6644 definitions in shared objects when checking symbol with
6645 undefined version.
6646
6647 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6648
6649 * elf32-m68hc11.c (elf32_m68hc11_gc_mark_hook): New for section GC.
6650 (elf32_m68hc11_gc_sweep_hook): Likewise.
6651 (elf_backend_gc_mark_hook): Define for GC section support.
6652 (elf_backend_gc_sweep_hook): Likewise.
6653 (elf_backend_can_gc_sections): Likewise.
6654
6655 * elf32-m68hc12.c: Likewise.
6656
6657 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6658
6659 * elf32-m68hc11.c (_bfd_m68hc11_elf_print_private_bfd_data): New.
6660 (_bfd_m68hc11_elf_merge_private_bfd_data): New function.
6661 (_bfd_m68hc11_elf_set_private_flags): New function.
6662 Use them to set/check/print ELF flags specific to 68HC11.
6663
6664 * elf32-m68hc12.c (_bfd_m68hc12_elf_print_private_bfd_data): New.
6665 (_bfd_m68hc12_elf_merge_private_bfd_data): New function.
6666 (_bfd_m68hc12_elf_set_private_flags): New function.
6667 Use them to set/check/print ELF flags specific to 68HC12.
6668
6669 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6670
6671 * elf32-m68hc11.c (elf_m68hc11_howto_table): Add the new relocs;
6672 fix masks for PC-rel relocs.
6673 (m68hc11_elf_ignore_reloc): New function.
6674
6675 * elf32-m68hc12.c (m68hc12_elf_special_reloc): New to handle specific
6676 68HC12 banked addressing relocs.
6677 (m68hc12_phys_addr): New to compute physical address of banked memory.
6678 (m68hc12_phys_page): Likewise for page.
6679 (m68hc12_addr_is_banked): New to see if address is in banked area.
6680 (elf_m68hc12_howto_table): Add new relocs and rename to xx12.
6681
6682 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6683
6684 * reloc.c (BFD_RELOC_M68HC11_RL_JUMP, BFD_RELOC_M68HC11_RL_GROUP,
6685 BFD_RELOC_M68HC11_LO16, BFD_RELOC_M68HC11_PAGE,
6686 BFD_RELOC_M68HC11_24): New relocs for 68HC11/68HC12.
6687 * bfd-in2.h: Regenerate.
6688
6689 2002-08-12 H.J. Lu <hjl@gnu.org>
6690
6691 * elflink.h (elf_add_default_symbol): Preserve section across
6692 elf_merge_symbol.
6693
6694 2002-08-09 Graeme Peterson <gp@qnx.com>
6695
6696 * Makefile.am: Add entries for elf32-ppcqnx.c, and add
6697 elf32-qnx.h dependency to elfarmqnx-nabi.c and elf32-i386qnx.c.
6698 * Makefile.in: Regenerate.
6699 * config.bfd: Add support for powerpc{le}-*-nto targets.
6700 * configure.in: Add support for bfd_elf32_powerpc{le}qnx_vec.
6701 * configure: Regenerate.
6702 * elf32-i386qnx.c: Moved backend functions into a QNX specific
6703 common file "elf32-qnx.h", and now include that file.
6704 * elf32-qnx.h: New file: QNX specific common elf backend.
6705 * elf32-ppc.c: Do not include elf32-target.h if
6706 ELF32_PPC_C_INCLUDED is defined.
6707 * elf32-ppcqnx.c: New file: Support for QNX.
6708 * elfarmqnx-nabi.c: Include elf32-qnx.h for qnx elf backend.
6709 * targets.c: Add bfd_elf32_powerpc{le}qnx_vec.
6710
6711 2002-08-09 Nick Clifton <nickc@redhat.com>
6712
6713 * po/sv.po: Updated Swedish translation.
6714
6715 2002-08-09 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6716
6717 * elfxx-mips.c (mips_elf_global_got_index): Avoid segfault if
6718 g->global_gotsym is NULL.
6719
6720 2002-08-08 H.J. Lu <hjl@gnu.org>
6721
6722 * elflink.h (elf_add_default_symbol): Don't warn if a definition
6723 overrides an indirect versioned symbol.
6724
6725 2002-08-08 Jakub Jelinek <jakub@redhat.com>
6726
6727 * elf32-i386.c (elf_i386_relocate_section): Fill in proper addend
6728 for R_386_TLS_TPOFF32 relocs against symndx 0.
6729
6730 2002-08-07 H.J. Lu <hjl@gnu.org>
6731
6732 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Check symbol
6733 with undefined version if needed.
6734 (elf_link_assign_sym_version): Match a default symbol with a
6735 version without definition. No need to hide the default
6736 definition separately.
6737
6738 2002-08-08 Alan Modra <amodra@bigpond.net.au>
6739
6740 * elflink.h (elf_link_output_extsym): Don't output symbols from
6741 SEC_EXCLUDE sections.
6742
6743 * aoutx.h (aout_link_write_symbols): Correct handling of warning syms.
6744
6745 2002-08-07 Alan Modra <amodra@bigpond.net.au>
6746
6747 * elf64-ppc.c (edit_opd): Arrange to drop symbols for discarded .opd
6748 entries.
6749
6750 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6751
6752 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Cast signedness
6753 mismatch.
6754
6755 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6756
6757 * elfxx-mips.c (ABI_64_P): Remove superfluous check.
6758
6759 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6760
6761 * elf32-mips.c (mips_reloc_map): Fix typo.
6762
6763 2002-08-06 Alan Modra <amodra@bigpond.net.au>
6764
6765 * xcofflink.c (xcoff_write_global_symbol): Set n_scnum for abs_section.
6766
6767 2002-08-06 Alan Modra <amodra@bigpond.net.au>
6768
6769 * elf64-ppc.c (ppc64_elf_howto_raw): Zero all src_mask entries.
6770
6771 2002-08-06 Alan Modra <amodra@bigpond.net.au>
6772
6773 * libxcoff.h: Use PARAMS on function declarations.
6774 * coff-rs6000.c (xcoff_generate_rtinit): Simplify size calc.
6775 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
6776
6777 * coff-rs6000.c: (xcoff_rtype2howto): Don't place reloc address in
6778 addend.
6779 * coff64-rs6000.c: (xcoff64_rtype2howto): Likewise.
6780
6781 2002-08-06 Alan Modra <amodra@bigpond.net.au>
6782
6783 * coff-rs6000.c: Formatting fixes.
6784 (xcoff_calculate_relocation): Use PARAMS in declaration.
6785 (xcoff_complain_overflow): Likewise.
6786 (xcoff_ppc_relocate_section): Use old-style function pointer call.
6787 (bfd_xcoff_backend_data): Remove useless comments.
6788 (rs6000coff_vec): Likewise.
6789 (bfd_pmac_xcoff_backend_data): Likewise.
6790 (pmac_xcoff_vec): Likewise.
6791
6792 * coff64-rs6000.c: Formatting fixes.
6793 (xcoff64_calculate_relocation): Use PARAMS in declaration.
6794 (xcoff64_ppc_relocate_section): Use old-style function pointer call.
6795 (bfd_xcoff_backend_data): Remove useless comments.
6796 (rs6000coff64_vec): Likewise.
6797 (bfd_xcoff_aix5_backend_data): Likewise.
6798 (aix5coff64_vec): Likewise.
6799
6800 2002-08-06 Alan Modra <amodra@bigpond.net.au>
6801
6802 * coff-rs6000.c (xcoff_howto_table): Revert some of last change to
6803 mask entries. Use complain_overflow_dont for R_REF.
6804 (xcoff_reloc_type_ba): Revert last change.
6805 (xcoff_reloc_type_br): Likewise.
6806 (xcoff_reloc_type_crel): Likewise.
6807 (xcoff_ppc_relocate_section): Likewise.
6808 * coff64-rs6000.c (xcoff64_reloc_type_br): Likewise.
6809 (xcoff64_ppc_relocate_section): Likewise.
6810 (xcoff64_howto_table): Revert some of last change to mask entries.
6811 Use complain_overflow_dont for R_REF.
6812
6813 * coff-rs6000.c (xcoff_howto_table): Fix src_mask entries. Make all
6814 relocs with bitsize == 16 have size = 1.
6815 (xcoff_reloc_type_ba): Correct src_mask and dst_mask adjustment.
6816 (xcoff_reloc_type_br): Likewise.
6817 (xcoff_reloc_type_crel): Likewise.
6818 (xcoff_ppc_relocate_section): Set up src_mask and dst_mask correctly.
6819 * coff64-rs6000.c (xcoff64_reloc_type_br): Correct src_mask and
6820 dst_mask adjustment.
6821 (xcoff64_ppc_relocate_section): Set up src_mask and dst_mask correctly.
6822 (xcoff64_howto_table): Fix src_mask entries. Make all relocs with
6823 bitsize == 16 have size = 1.
6824
6825 2002-08-01 Denis Chertykov <denisc@overta.ru>
6826
6827 * elf32-ip2k.c: Processor manufacturer changed to Ubicom.
6828 (struct misc): New field isymbuf. All free_* fields removed.
6829 (symbol_value): Pass in internal syms. No need to swap syms in.
6830 (ip2k_elf_relax_section): Use bfd_elf_get_elf_syms. Properly free
6831 possibly cached info.
6832 (tidyup_after_error): Removed.
6833 (ip2k_elf_relax_section_pass1): Don't use removed fields of struct
6834 misc. Use new field.
6835 (adjust_all_relocations): Use internal syms. No need to swap syms
6836 in and out.
6837 (add_page_insn): Don't use removed fields of struct misc.
6838
6839 2002-08-01 Nick Clifton <nickc@redhat.com>
6840
6841 * elf32-arm.h: Revert previous delta.
6842
6843 2002-08-01 Nick Clifton <nickc@redhat.com>
6844
6845 * configure.in (AM_INIT_AUTOMAKE): Bump version number.
6846 * configure: Regenerate.
6847
6848 2002-07-31 H.J. Lu <hjl@gnu.org>
6849
6850 * config.bfd: Add x86-64 vector to Linux/i386 if 64bit BFD is
6851 selected.
6852
6853 2002-07-31 H.J. Lu <hjl@gnu.org>
6854
6855 * config.bfd: Add n32 vectors to 32bit Linux/mips if 64bit BFD
6856 is selected.
6857
6858 2002-07-31 Jakub Jelinek <jakub@redhat.com>
6859
6860 * elf32-i386.c (elf_i386_copy_indirect_symbol): Swap tls_type
6861 if _bfd_elf_link_hash_copy_indirect will swap got.refcount.
6862
6863 2002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
6864
6865 * cpu-ns32k.c (_bfd_ns32k_put_immdeiate, _bfd_ns32k_get_immediate):
6866 There is no 8 byte relocation type for this architecture.
6867 (do_ns32k_reloc): Use bfd_vma instead of native types.
6868 (bfd_ns32k_put_immediate, _bfd_ns32k_relocate_contents) put_data
6869 returns void.
6870 (_bfd_ns32k_put_displacement): Don't check for overflow. We can
6871 rely on generic code to do that.
6872 * aout-ns32k.c (howto_table): Add appropriate overflow detection
6873 to all table entries.
6874 (_bfd_ns32k_relocate_contents): put_data returns void.
6875 * ns32k.h: (_bfd_ns32k_put_displacement, _bfd_ns32k_put_immediate)
6876 (_bfd_do_ns32k_reloc_contents): Fix prototypes. put data functions
6877 return void.
6878
6879 2002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
6880
6881 * aoutx.h (aout_link_check_ar_symbols): Whether to include an
6882 archive object is target dependant.
6883
6884 2002-07-31 Adam Nemet <anemet@lnxw.com>
6885
6886 * elf32-arm.h (ARM_PLT_ENTRY_SIZE): Rename PLT_ENTRY_SIZE.
6887 (THUMB_PLT_ENTRY_SIZE): New macro.
6888 (PLT_ENTRY_SIZE): Return the appropriate *_PLT_ENTRY_SIZE.
6889 (elf32_arm_plt0_entry): Rename PLT_ENTRY_SIZE to
6890 ARM_PLT_ENTRY_SIZE.
6891 (elf32_arm_plt_entry): Likewise.
6892 (elf_backend_plt_header_size): Likewise.
6893 (elf32_thumb_plt0_entry): New global.
6894 (elf32_arm_finish_dynamic_sections): Use it. Put Thumb entries
6895 into .plt.thumb.
6896 (elf32_thumb_plt_entry): New global.
6897 (elf32_arm_finish_dynamic_symbol): Use it. Use .thumb.plt for
6898 Thumb entries. Set the bottom bit of the corresponding GOT entry
6899 for a Thumb PLT entry.
6900 (struct elf32_arm_plt_entry_info): New structure.
6901 (struct elf32_arm_link_hash_entry, plt_info): New member of this
6902 type.
6903 (elf32_arm_link_hash_newfunc): Initialize new member.
6904 (elf32_arm_final_link_relocate, R_ARM_THM_PC22 case): Handle
6905 relocations against the PLT.
6906 (elf32_arm_check_relocs, case R_ARM_PLT32 case): Set
6907 first_rel_type if this is the first time we encounter the symbol.
6908 (elf32_arm_check_relocs, case R_ARM_THM_PC22 case): New case.
6909 Determine if relocation needs a PLT entry. Set first_rel_type if
6910 this is the first time we encounter the symbol
6911 (elf32_arm_adjust_dynamic_symbol): Create PLT entries for Thumb
6912 functions as well.
6913 (elf32_arm_size_dynamic_sections): Handle .plt.thumb like .plt.
6914 (elf32_arm_create_dynamic_sections): New function. Create the
6915 .plt.thumb section.
6916 (elf_backend_create_dynamic_sections): Call it.
6917
6918 2002-07-31 Nick Clifton <nickc@redhat.com>
6919
6920 * bfd.c (bfd_alt_mach_code): Rename parameter 'index' to
6921 'alternative' in order to avoid shadowing global symbol of the
6922 same name.
6923 * bfd-in2.h: Regenerate.
6924 * libbfd.h: Regenerate.
6925 * libcoff.h: Regenerate.
6926
6927 2002-07-31 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6928
6929 * Makefile.am: Add n32 ABI support.
6930 * Makefile.in: Regenerate.
6931 * config.bfd: Add n32 vectors to mips64*-*-linux* targets. Treat 64
6932 bit vectors for mips*-*-linux targets as optional.
6933 * configure.in: Add n32 ABI vectors.
6934 * configure: Regenerate.
6935 * elf32-mips.c (mips_elf32_object_p): Reject n32 ABI files.
6936 * elfn32-mips.c: New file, n32 ABI support.
6937 * targets.c: Add n32 ABI vectors.
6938
6939 2002-07-30 Graeme Peterson <gp@qnx.com>
6940
6941 * elfarmqnx-nabi.c: New file: Support for QNX.
6942 * config.bfd: Add support for arm-*-nto target.
6943 * configure.in: Add support for bfd_elf32_{big|little}armqnx_vec.
6944 * configure: Regenerate.
6945 * Makefile.am: Add entries for elfarmqnx-nabi.c.
6946 * Makefile.in: Regenerate.
6947 * elf32-arm.h (ELF_MAXPAGESIZE): Do not define if already defined.
6948 Do not define global function if ELFARM_NABI_C_INCLUDED is defined.
6949 * elfarm-nabi.c: Do not include elf32-arm.h if
6950 ELFARM_NABI_C_INCLUDED is defined.
6951 * targets.c: Add bfd_elf32_{big|little}armqnx_vec.
6952
6953 2002-07-30 Nick Clifton <nickc@redhat.com>
6954
6955 * po/sv.po: Updated Swedish translation.
6956
6957 2002-07-30 Jakub Jelinek <jakub@redhat.com>
6958
6959 * elf.c (elf_fake_sections): Fix up .tbss sh_size and sh_type.
6960
6961 2002-07-30 Alan Modra <amodra@bigpond.net.au>
6962
6963 * aoutx.h (some_aout_object_p): Clean up tdata properly on error.
6964 * archive.c (bfd_generic_archive_p): Likewise.
6965 * coff-rs6000.c (_bfd_xcoff_archive_p): Likewise.
6966 (_bfd_xcoff_archive_p): Use bfd_scan_vma in place of strtol.
6967 * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
6968 (xcoff64_archive_p): Likewise.
6969 (xcoff64_openr_next_archived_file): Likewise.
6970 (xcoff64_archive_p): Clean up tdata properly on error.
6971 * coffgen.c (coff_real_object_p): Likewise.
6972 (coff_object_p): Release filehdr and opthdr.
6973 * ecoff.c (_bfd_ecoff_archive_p): Clean up tdata properly on error.
6974 * ieee.c (ieee_archive_p): Likewise.
6975 * ihex.c (ihex_object_p): Likewise.
6976 (ihex_mkobject): Always allocate tdata.
6977 * peicode.h (pe_ILF_object_p): Release bfd_alloc'd buffer on error.
6978 * srec.c (srec_mkobject): Always allocate tdata.
6979 (srec_object_p): Clean up tdata properly on error.
6980 (symbolsrec_object_p): Likewise.
6981 * versados.c (versados_object_p): Likewise.
6982 * vms-misc.c (_bfd_vms_get_record): Use bfd_malloc instead of malloc,
6983 and bfd_realloc instead of realloc.
6984 (add_new_contents): Use bfd_alloc instead of bfd_malloc for sections.
6985 * vms.c (vms_initialize): Always allocate tdata. Use bfd_alloc in
6986 place of bfd_malloc, simplifying error freeing. Free hash table too.
6987 (vms_object_p): Clean up tdata on error.
6988 (vms_mkobject): Don't complain on stderr if vms_initialize fails.
6989 (vms_close_and_cleanup): Adjust for bfd_alloc use.
6990
6991 2002-07-30 Alan Modra <amodra@bigpond.net.au>
6992
6993 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set e_flags.
6994
6995 2002-07-26 Chris Demetriou <cgd@broadcom.com>
6996
6997 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Merge ASE
6998 flags into resulting BFD.
6999
7000 2002-07-26 Alan Modra <amodra@bigpond.net.au>
7001
7002 From John Reiser <jreiser@BitWagon.com>
7003 * elf32-i386.c (elf_i386_link_hash_table_create): Clear
7004 tls_ldm_got.refcount.
7005
7006 2002-07-25 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7007
7008 * elf64-mips.c: Update TODO comment.
7009 (mips_elf64_higher_reloc,mips_elf64_highest_reloc,
7010 mips_elf64_gprel16_reloca): Remove prototypes.
7011 (mips16_jump_reloc,mips16_gprel_reloc): Add functions.
7012 (UNUSED_RELOC): Replace by EMPTY_RELOC.
7013 (mips_elf64_howto_table_rel): Use special R_MIPS_HI16 handling. Remove
7014 wrong comments. Remove disfunctional support of R_MIPS_HIGHER and
7015 R_MIPS_HIGHEST.
7016 (mips_elf64_howto_table_rela): Fix handling of R_MIPS_GPREL16 and
7017 R_MIPS_GOT16. Remove wrong comments.
7018 (elf_mips16_jump_howto,elf_mips16_gprel_howto,
7019 elf_mips_gnu_vtinherit_howto,elf_mips_gnu_vtentry_howto): New, code
7020 from elf32-mips.c.
7021 (mips_elf64_hi16_reloc): Fix formatting.
7022 (mips_elf64_higher_reloc,mips_elf64_highest_reloc): Remove.
7023 (mips_elf64_got16_reloc): Fix formatting. Remove superfluous code.
7024 Better comment. Fall back to R_MIPS_GOT_DISP instead of abort().
7025 (mips_elf64_gprel16_reloc): Make static. Add check for
7026 partial_inplace.
7027 (mips_elf64_gprel16_reloca): Remove.
7028 (mips_elf64_literal_reloc): New function.
7029 (mips_elf64_gprel32_reloc): Fix formatting.
7030 (mips_elf64_shift6_reloc): Fix comment. Make static.
7031 (mips16_jump_reloc,mips16_gprel_reloc): New functions, code from
7032 elf32-mips.c.
7033 (elf_reloc_map,mips_reloc_map): New mapping table, similiar as in
7034 elf32-mips.c
7035 (bfd_elf64_bfd_reloc_type_lookup): Use the mapping table. Enable GNU
7036 specific relocations.
7037 (mips_elf64_rtype_to_howto): Enable GNU specific relocations.
7038 (mips_elf64_object_p): Invert logic to check for SGI-ish ABI.
7039 (ELF_MAXPAGESIZE): Add comment.
7040
7041 2002-07-25 Nick Clifton <nickc@redhat.com>
7042
7043 * po/sv.po: Updated Swedish translation.
7044 * po/es.po: Updated Spanish translation.
7045 * po/fr.po: Updated French translation.
7046
7047 2002-07-25 Alan Modra <amodra@bigpond.net.au>
7048
7049 * elf-bfd.h (_bfd_elf32_link_record_local_dynamic_symbol): Define
7050 as elf_link_record_local_dynamic_symbol.
7051 (_bfd_elf64_link_record_local_dynamic_symbol): Likewise.
7052 (elf_link_record_local_dynamic_symbol): Declare. Now returns int.
7053 * elflink.h (elf_link_record_local_dynamic_symbol): Move to..
7054 * elflink.c: .. here. Use bfd_elf_get_elf_syms. Check whether an
7055 attempt is made to record a symbol in a discarded section, and
7056 return `2' in that case.
7057
7058 2002-07-24 Nick Clifton <nickc@redhat.com>
7059
7060 * po/sv.po: Updated Swedish translation.
7061 * po/es.po: Updated Spanish translation.
7062
7063 2002-07-23 Alan Modra <amodra@bigpond.net.au>
7064
7065 * po/SRC-POTFILES.in: Regenerate.
7066
7067 * elf-hppa.h (elf_hppa_relocate_section): If relocatable, return
7068 immediately. Remove code handling relocatable linking.
7069 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
7070 * elf32-cris.c (cris_elf_relocate_section): Likewise.
7071 * elf32-fr30.c (elf32_frv_relocate_section): Likewise.
7072 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
7073 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
7074 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
7075 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
7076 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
7077 * elf32-v850.c (v850_elf_relocate_section): Likewise.
7078 * elf32-vax.c (elf_vax_relocate_section): Likewise.
7079 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7080 * elf32-avr.c (elf_backend_rela_normal): Define.
7081 * elf32-cris.c: Likewise.
7082 * elf32-fr30.c: Likewise.
7083 * elf32-frv.c: Likewise.
7084 * elf32-h8300.c: Likewise.
7085 * elf32-hppa.c: Likewise.
7086 * elf32-ip2k.c: Likewise.
7087 * elf32-sparc.c: Likewise.
7088 * elf32-v850.c: Likewise.
7089 * elf32-vax.c: Likewise.
7090 * elf64-hppa.c: Likewise.
7091 * elf64-sparc.c: Likewise.
7092 * elf32-fr30.c (elf32_frv_relocate_section): Edit comment.
7093 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
7094 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
7095 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
7096 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
7097 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
7098 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
7099 * elf-m10200.c (USE_RELA): Don't define.
7100 * elf-m10300.c: Likewise.
7101 * elfarm-oabi.c: Likewise.
7102 * elf32-i370.c: Likewise.
7103 * elf32-ip2k.c: Likewise.
7104 * elf32-m68k.c: Likewise.
7105 * elf32-mcore.c: Likewise.
7106 * elf32-ppc.c: Likewise.
7107 * elf32-s390.c: Likewise.
7108 * elf32-vax.c: Likewise.
7109 * elf64-ppc.c: Likewise.
7110 * elf64-s390.c: Likewise.
7111 * elf64-x86-64.c: Likewise.
7112 * elfxx-ia64.c: Likewise.
7113 * elf32-avr.c (USE_REL): Don't undef.
7114 * elf32-ip2k.c: Likewise.
7115
7116 2002-07-23 Nick Clifton <nickc@redhat.com>
7117
7118 * elf-bfd.h (struct elf_backend_data): Add new bitfield
7119 'want_p_paddr_set_to_zero'.
7120 * elfxx-target.h: Set default value for want_p_paddr_set_to_zero
7121 to false;
7122 * elfxx-ia64.c: Set want_p_paddr_set_zero for HPUX target.
7123 * elf.c (copy_private_bfd_data): Test want_p_paddr_set_zero.
7124
7125 2002-07-23 Gabor Keresztfalvi <keresztg@mail.com>
7126
7127 * nlmcode.h (nlm_swap_auxiliary_headers_out): Swapped the order of
7128 the MeSsAgEs and CoPyRiGhT tags to make >=NW4.x NLM loaders to
7129 show the Copyright string.
7130 Minor formatting tidy ups.
7131
7132 2002-07-23 Nick Clifton <nickc@redhat.com>
7133
7134 * po/fr.po: Updated French translation.
7135 * po/sv.po: Updated Swedish translation.
7136
7137 2002-07-23 Alan Modra <amodra@bigpond.net.au>
7138
7139 * elflink.h (elf_link_input_bfd): Don't change internal symbols
7140 when outputting relocs.
7141
7142 2002-07-20 Jason Thorpe <thorpej@wasabisystems.com>
7143
7144 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only insert
7145 DT_PLTGOT into the dynamic section if there is a PLT.
7146
7147 2002-07-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7148
7149 * elfxx-mips.c (_bfd_mips_elf_discard_info): New function, code from
7150 elf32-mips.c.
7151 (_bfd_mips_elf_write_section): Likewise.
7152 * elfxx-mips.h (_bfd_mips_elf_discard_info): New prototype.
7153 (_bfd_mips_elf_write_section): Likewise.
7154 * elf32-mips.c (elf32_mips_discard_info): Move to elfxx-mips.c.
7155 (elf32_mips_write_section): Likewise.
7156 * elf64-mips.c (_bfd_mips_elf_ignore_discarded_relocs): Use it.
7157 (_bfd_mips_elf_write_section): Likewise.
7158
7159 2002-07-19 Alan Modra <amodra@bigpond.net.au>
7160
7161 * elfxx-ia64.c: (elfNN_ia64_modify_segment_map): Properly scan
7162 PT_IA_64_UNWIND segments for a given section.
7163
7164 2002-07-17 H.J. Lu <hjl@gnu.org>
7165
7166 * Makefile.am: Fix a typo.
7167 * Makefile.in: Regenerate.
7168
7169 2002-07-15 Denis Chertykov <denisc@overta.ru>
7170 Frank Ch. Eigler <fche@redhat.com>
7171 Ben Elliston <bje@redhat.com>
7172 Alan Lehotsky <alehotsky@cygnus.com>
7173 John Healy <jhealy@redhat.com>
7174 Graham Stott <grahams@redhat.com>
7175 Jeff Johnston <jjohnstn@redhat.com>
7176
7177 * Makefile.am: Add support for ip2k.
7178 * Makefile.in: Regenerate.
7179 * doc/Makefile.in: Regenerate.
7180 * archures.c: Add support for ip2k.
7181 * config.bfd: Add support for ip2k.
7182 * configure.in: Add support for ip2k.
7183 * configure: Regenerate.
7184 * reloc.c: Add support for ip2k.
7185 * targets.c: Add support for ip2k.
7186 * bfd-in2.h: Regenerate.
7187 * libbfd.h: Regenerate.
7188 * cpu-ip2k.c: New file.
7189 * elf32-ip2k.c: New file.
7190
7191 2002-07-17 Ian Rickards <irickard@arm.com>
7192
7193 * dwarf2.c (concat_filename): If we can't establish the directory
7194 just return the filename.
7195
7196 2002-07-16 Moritz Jodeit <moritz@jodeit.org>
7197
7198 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Correct order of memset args.
7199
7200 2002-07-16 Alan Modra <amodra@bigpond.net.au>
7201
7202 * elflink.h: Formatting fixes, tidy prototypes.
7203 (elf_link_assign_sym_version): Move common code out of loop.
7204
7205 2002-07-16 Alan Modra <amodra@bigpond.net.au>
7206
7207 * elflink.h (elf_link_input_bfd): Don't call reloc_emitter when
7208 reloc section size is zero. Correct reloc output location.
7209
7210 2002-07-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
7211
7212 * elf-hppa.h (elf_hppa_reloc_final_type): Use R_PARISC_PCREL16F as
7213 the final type for the e_fsel selector when generating PA2.0W code.
7214 (elf_hppa_relocate_insn): Provide support for PA2.0W 16-bit format 1
7215 relocations.
7216
7217 2002-07-14 H.J. Lu <hjl@gnu.org>
7218
7219 * elflink.h (elf_link_assign_sym_version): Hide the default
7220 definition if there is a hidden versioned definition.
7221
7222 2002-07-12 Hans-Peter Nilsson <hp@axis.com>
7223
7224 * elf32-cris.c (cris_elf_relocate_section): Drop nonsensical
7225 dynamic reference test in assertion when initializing GOT with
7226 static contents. Just assert that there are either no dynamic
7227 sections, the symbol is defined in the regular objects or that the
7228 symbol is undef weak. Tweak comment.
7229 (elf_cris_finish_dynamic_symbol): Emit .got reloc for a program
7230 only if the symbol isn't defined in the program and isn't undef
7231 weak.
7232 (elf_cris_adjust_dynamic_symbol): Simplify condition for getting
7233 rid of PLT entry: only do it if the symbol isn't defined in a DSO.
7234 When doing so, clear ELF_LINK_HASH_NEEDS_PLT. Tweak comments.
7235 (elf_cris_discard_excess_program_dynamics): Don't consider
7236 ELF_LINK_HASH_REF_DYNAMIC when omitting .got runtime relocs.
7237
7238 2002-07-11 Alan Modra <amodra@bigpond.net.au>
7239
7240 * elf32-i386.c (elf_i386_relocate_section): Don't complain about
7241 unresolved debugging relocs in dynamic applications.
7242 * elf32-s390.c (elf_s390_relocate_section): Likewise.
7243 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
7244 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
7245 * elf64-s390.c (elf_s390_relocate_section): Likewise.
7246 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7247 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
7248
7249 2002-07-10 Alan Modra <amodra@bigpond.net.au>
7250
7251 * elf64-ppc.c (ONES): Define.
7252 (ppc64_elf_howto_table): Use ONES here to avoid warnings. Fill in
7253 missing src_mask fields. Tweak R_PPC64_NONE, R_PPC64_COPY. Fill
7254 in missing dst_mask fields on R_PPC64_PLT32, R_PPC64_PLTREL32.
7255
7256 * elf64-ppc.c (ppc64_elf_get_symbol_info): Delete.
7257 (ppc64_elf_set_private_flags): Delete.
7258 (ppc64_elf_section_from_shdr): Delete.
7259 (ppc64_elf_merge_private_bfd_data): Remove flag checking/merging code.
7260 (ppc64_elf_fake_sections): Delete.
7261 (bfd_elf64_bfd_set_private_flags): Don't define.
7262 (bfd_elf64_get_symbol_info): Likewise.
7263 (elf_backend_section_from_shdr): Likewise.
7264 (elf_backend_fake_sections): Likewise.
7265
7266 2002-07-10 Marco Walther <Marco.Walther@sun.com>
7267
7268 * elf.c: (assign_section_numbers) Set sh_entsize for .stab only
7269 when not already set.
7270 * elf64-sparc.c: (sparc64_elf_fake_sections): New function.
7271 (elf_backend_fake_sections): Define.
7272
7273 2002-07-10 Alan Modra <amodra@bigpond.net.au>
7274
7275 * merge.c (_bfd_merge_section): Remove redundant output_section check.
7276 Formatting.
7277 (_bfd_merge_sections): Don't set SEC_EXCLUDE on unused sections.
7278
7279 2002-07-09 Hans-Peter Nilsson <hp@axis.com>
7280
7281 * elf32-cris.c (cris_elf_relocate_section): Move sanity-check for
7282 NULL sym_hashes to just before use.
7283 <case R_CRIS_32_GOTREL>: In test for local symbol, accept also
7284 symbol with non-default visibility.
7285 <case R_CRIS_32_GOTREL, case R_CRIS_32_PLT_GOTREL>: Ditto.
7286 <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
7287 Ditto.
7288 (cris_elf_gc_sweep_hook): Only decrease h->plt.refcount for
7289 symbol with non-default visibility.
7290 (cris_elf_check_relocs): At tests for local symbol before
7291 increasing h->plt.refcount, also check for non-default
7292 visibility. Ditto when checking for local symbol to eliminate
7293 pc-relative runtime relocs.
7294
7295 2002-07-08 Alan Modra <amodra@bigpond.net.au>
7296
7297 * elf.c: Formatting.
7298 (IS_SOLARIS_PT_INTERP): Add p_paddr and p_memsz checks.
7299 (INCLUDE_SECTION_IN_SEGMENT): Remove IS_SOLARIS_PT_INTERP.
7300 (copy_private_bfd_data): Set p_vaddr on broken Solaris PT_INTERP
7301 segments.
7302
7303 2002-07-07 Mark Mitchell <mark@codesourcery.com>
7304 Alan Modra <amodra@bigpond.net.au>
7305
7306 * cofflink.c (_bfd_coff_final_link): On PE COFF systems, take into
7307 account the impact of relocation count overflow when computing
7308 section offsets.
7309 * coffcode.h (coff_write_relocs): Use obj_pe when deciding whether
7310 or not to apply the PE COFF reloc overflow handling. Fix a
7311 fencepost error in deciding whether or not to use that technique.
7312
7313 2002-07-07 Alan Modra <amodra@bigpond.net.au>
7314
7315 * elf-bfd.h (struct elf_reloc_cookie): Remove locsym_shndx,
7316 change type of locsyms.
7317 (bfd_elf_get_elf_syms): Declare.
7318 * elf.c (bfd_elf_get_elf_syms): New function.
7319 (group_signature): Use bfd_elf_get_elf_syms.
7320 (bfd_section_from_r_symndx): Likewise.
7321 * elfcode.h (elf_slurp_symbol_table): Likewise.
7322 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
7323 (elf_link_add_object_symbols): Likewise. Reorganise to increase
7324 locality of various data structures. Properly free internal relocs.
7325 (elf_bfd_final_link): Properly free internal relocs.
7326 (elf_link_check_versioned_symbol): Use bfd_elf_get_elf_syms.
7327 (elf_link_input_bfd): Likewise.
7328 (elf_gc_mark): Likewise. Properly free internal relocs.
7329 (elf_gc_sweep): Properly free internal relocs.
7330 (elf_reloc_symbol_deleted_p): No need to swap syms in.
7331 (elf_bfd_discard_info): Use bfd_elf_get_elf_syms. Properly free
7332 internal relocs.
7333 * elf-m10200.c (mn10200_elf_relax_section): Use bfd_elf_get_elf_syms.
7334 Properly free possibly cached info.
7335 (mn10200_elf_relax_delete_bytes): Remove symbol swapping code.
7336 (mn10200_elf_symbol_address_p): Pass in internal syms. Remove
7337 symbol swapping code.
7338 (mn10200_elf_get_relocated_section_contents): Use bfd_elf_get_elf_syms.
7339 Properly free possibly cached info.
7340 * elf-m10300.c (mn10300_elf_relax_section): As above for elf-m10200.c.
7341 (mn10300_elf_relax_delete_bytes): Likewise.
7342 (mn10300_elf_symbol_address_p): Likewise.
7343 (mn10300_elf_get_relocated_section_contents): Likewise.
7344 * elf32-h8300.c (elf32_h8_relax_section): As above for elf-m10200.c.
7345 (elf32_h8_relax_delete_bytes): Likewise.
7346 (elf32_h8_symbol_address_p): Likewise.
7347 (elf32_h8_get_relocated_section_contents): Likewise.
7348 * elf32-m32r.c (m32r_elf_relax_section): As above for elf-m10200.c.
7349 (m32r_elf_relax_delete_bytes): Likewise.
7350 (m32r_elf_get_relocated_section_contents): Likewise.
7351 * elf32-sh.c (sh_elf_reloc_loop): Free section contents using
7352 elf_section_data to determine whether cached.
7353 (sh_elf_relax_section): As above for elf-m10200.c.
7354 (sh_elf_relax_delete_bytes): Likewise.
7355 (sh_elf_get_relocated_section_contents): Likewise.
7356 * elf32-xstormy16.c (xstormy16_elf_relax_section): As above.
7357 * elf64-alpha.c (elf64_alpha_relax_section): As above. Also delay
7358 reading of local syms.
7359 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
7360 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): As above.
7361 * elfxx-ia64.c (elfNN_ia64_relax_section): As above.
7362 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Properly free internal
7363 relocs.
7364 * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Properly
7365 free internal relocs and section contents. Don't read symbols.
7366 * elf32-hppa.c (get_local_syms): Use bfd_elf_get_elf_syms.
7367 (elf32_hppa_size_stubs): Don't free local syms.
7368 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Delay
7369 reading of local syms. Use bfd_elf_get_elf_syms. Properly free
7370 possibly cached info.
7371 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
7372 * elf64-hppa.c (elf64_hppa_check_relocs): Use bfd_elf_get_elf_syms.
7373 * elf64-ppc.c (struct ppc_link_hash_table): Delete bfd_count and
7374 all_local_syms.
7375 (get_local_syms): Delete function.
7376 (edit_opd): Use bfd_elf_get_elf_syms. Free on error exit. Cache
7377 on exit.
7378 (ppc64_elf_size_stubs): Use bfd_elf_get_elf_syms. Free/cache on exit.
7379
7380 2002-07-05 Jim Wilson <wilson@redhat.com>
7381
7382 * syms.c (decode_section_type): New.
7383 (bfd_decode_symclass): Call decode_section_type.
7384
7385 2002-07-04 Jakub Jelinek <jakub@redhat.com>
7386
7387 * merge.c (_bfd_merged_section_offset): Avoid accessing byte before
7388 section content start.
7389 Reported by Michael Schumacher <mike@hightec-rt.com>.
7390
7391 2002-07-04 Alan Modra <amodra@bigpond.net.au>
7392
7393 * section.c (_bfd_strip_section_from_output): Remove unnecessary
7394 link order code. Don't actually remove the output section here;
7395 Just set a flag for the linker to do so.
7396 * elflink.c (_bfd_elf_link_renumber_dynsyms): Test for removed
7397 sections when setting up output section dynsyms.
7398
7399 2002-07-04 Alan Modra <amodra@bigpond.net.au>
7400
7401 * elflink.h (elf_link_add_object_symbols): Revert 1999-09-02 hpux
7402 fudge.
7403 * elf.c (bfd_section_from_shdr): Work around broken hpux shared
7404 libs here instead.
7405
7406 2002-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
7407
7408 * elf64-s390.c (create_got_section): Set .got section alignment to
7409 8 bytes.
7410 (elf_s390_check_relocs): Set .rela.dyn section alignment to 8 bytes.
7411
7412 2002-07-02 Alan Modra <amodra@bigpond.net.au>
7413
7414 * elf.c (_bfd_elf_reloc_type_class): Fix comment grammar.
7415
7416 2002-07-01 Matt Thomas <matt@3am-software.com>
7417
7418 * elf32-vax.c (elf32_vax_print_private_bfd_data): Change EF_*
7419 to EF_VAX_*.
7420
7421 2002-07-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7422
7423 * elfxx-mips.c (ABI_64_P): Fix comment.
7424 (MIPS_ELF_OPTIONS_SECTION_NAME,MIPS_ELF_STUB_SECTION_NAME): Use the
7425 new section names for N64 ABI.
7426 (mips_elf_output_extsym): No special _gp_disp handling for NewABI.
7427 (mips_elf_calculate_relocation): Code formatting.
7428 (mips_elf_create_dynamic_relocation): Likewise.
7429 (_bfd_mips_elf_fake_sections): IRIX6 needs this hack, too.
7430 (_bfd_mips_elf_size_dynamic_sections): Handle GOT_PAGE for any NewABI.
7431 (_bfd_mips_elf_relocate_section): No special handling for R_MIPS_64
7432 in any NewABI.
7433 (_bfd_mips_elf_finish_dynamic_symbol): No special _gp_disp handling
7434 for NewABI.
7435 (_bfd_mips_elf_modify_segment_map): Handle any N64 ABI.
7436 (_bfd_mips_elf_gc_sweep_hook): NewABI GOT relocs should be handled
7437 here, too.
7438
7439 2002-07-01 Andreas Schwab <schwab@suse.de>
7440
7441 * elf64-x86-64.c (elf64_x86_64_relocate_section): Only convert
7442 R_X86_64_64 to R_X86_64_RELATIVE.
7443
7444 2002-07-01 John David Anglin <dave@hiauly1.hia.nrc.ca>
7445
7446 * vaxbsd.c: New BFD backend for VAX BSD and Ultrix.
7447 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Add new backend.
7448 Run "make dep-am".
7449 * config.bfd (vax-*-bsd* | vax-*-ultrix*): Use vaxbsd_vec instead of
7450 host_aout_vec.
7451 * configure.in (vaxbsd_vec): Add.
7452 * targets.c (vaxbsd_vec): Add.
7453 * Makefile.in: Rebuild.
7454 * configure: Rebuild.
7455 * po/SRC-POTFILES.in: Rebuild.
7456
7457 2002-07-01 Alan Modra <amodra@bigpond.net.au>
7458
7459 * elflink.h (elf_gc_mark): Pass in the section whose relocs we are
7460 examining to gc_mark_hook, rather than the bfd.
7461 (elf_gc_sections): Adjust.
7462 * elf-bfd.h (struct elf_backend_data <gc_mark_hook>): Likewise.
7463 * elf-m10300.c (mn10300_elf_gc_mark_hook): Likewise.
7464 * elf32-arm.h (elf32_arm_gc_mark_hook): Likewise.
7465 * elf32-avr.c (elf32_avr_gc_mark_hook): Likewise.
7466 * elf32-cris.c (cris_elf_gc_mark_hook): Likewise.
7467 * elf32-d10v.c (elf32_d10v_gc_mark_hook): Likewise.
7468 * elf32-fr30.c (fr30_elf_gc_mark_hook): Likewise.
7469 * elf32-hppa.c (elf32_hppa_gc_mark_hook): Likewise.
7470 * elf32-i386.c (elf_i386_gc_mark_hook): Likewise.
7471 * elf32-m32r.c (m32r_elf_gc_mark_hook): Likewise.
7472 * elf32-m68k.c (elf_m68k_gc_mark_hook): Likewise.
7473 * elf32-mcore.c (mcore_elf_gc_mark_hook): Likewise.
7474 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Likewise.
7475 * elf32-ppc.c (ppc_elf_gc_mark_hook): Likewise.
7476 * elf32-s390.c (elf_s390_gc_mark_hook): Likewise.
7477 * elf32-sh.c (sh_elf_gc_mark_hook): Likewise.
7478 * elf32-sparc.c (elf32_sparc_gc_mark_hook): Likewise.
7479 * elf32-v850.c (v850_elf_gc_mark_hook): Likewise.
7480 * elf32-vax.c (elf_vax_gc_mark_hook): Likewise.
7481 * elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Likewise.
7482 * elf64-mmix.c (mmix_elf_gc_mark_hook): Likewise.
7483 * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
7484 * elf64-s390.c (elf_s390_gc_mark_hook): Likewise.
7485 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
7486 * elfxx-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise.
7487 * elfxx-mips.h (_bfd_mips_elf_gc_mark_hook): Likewise.
7488 * elf64-x86-64.c (elf64_x86_64_gc_mark_hook): Likewise.
7489 * elf32-frv.c (elf32_frv_gc_mark_hook): Likewise. Also remove
7490 redundant local sym tests.
7491 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_entry.
7492 (link_hash_newfunc): Init is_entry.
7493 (ppc64_elf_copy_indirect_symbol): Copy is_entry.
7494 (ppc64_elf_link_hash_table_create): Init all_local_syms.
7495 (create_linkage_sections): Use bfd_make_section_anyway rather than
7496 bfd_make_section.
7497 (ppc64_elf_mark_entry_syms): New function.
7498 (ppc64_elf_check_relocs): Don't bother testing elf_bad_symtab. Set
7499 up opd entry to function section map.
7500 (ppc64_elf_gc_mark_hook): Special case opd section relocs, and
7501 relocs that reference the opd section.
7502 (edit_opd): New function.
7503 (ppc64_elf_size_dynamic_sections): Call get_local_syms and edit_opd.
7504 (ppc64_elf_setup_section_lists): Don't calculate htab->bfd_count here.
7505 (get_local_syms): Do so here. Exit if we already have local syms.
7506 Remove bogus comment imported from elf32-hppa.c. Don't attempt to
7507 read local syms on non-ELF input.
7508 (ppc64_elf_size_stubs): Call _bfd_elf64_link_read_relocs rather
7509 than duplicating it's function here. Adjust free of internal
7510 relocs to suit.
7511 (ppc64_elf_relocate_section): Adjust local syms in opd section.
7512 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Declare.
7513 * elf32-hppa.c (elf32_hppa_size_stubs): Call
7514 _bfd_elf32_link_read_relocs rather than duplicating it's function
7515 here. Adjust free of internal relocs to suit.
7516
7517 2002-07-01 Andreas Jaeger <aj@suse.de>
7518
7519 * elf64-x86-64.c (elf64_x86_64_check_relocs): Certain relocations
7520 are not allowed in shared libs code, enforce -fPIC.
7521
7522 2002-06-29 Hans-Peter Nilsson <hp@bitrange.com>
7523
7524 * mmo.c (mmo_write_loc_chunk): Don't eliminate leading and
7525 trailing zero-sequences when there's previous left-over data.
7526
7527 2002-06-27 John David Anglin <dave@hiauly1.hia.nrc.ca>
7528
7529 * elf64-hppa.c (elf64_hppa_reloc_type_class): New function.
7530 (elf64_hppa_finish_dynamic_sections): Check other_rel_sec, dlt_rel_sec
7531 and opd_rel_sec in order for starting rela section. Check _raw_size.
7532 (elf_backend_reloc_type_class): Define.
7533
7534 2002-06-27 Kevin Buettner <kevinb@redhat.com>
7535
7536 * dwarf2.c (decode_line_info): Handle older, non-standard, 64-bit
7537 DWARF2 formats.
7538
7539 2002-06-27 Alan Modra <amodra@bigpond.net.au>
7540
7541 * cpu-powerpc.c: Comment on ordering of arch_info.
7542 * elf32-ppc.c (ppc_elf_object_p): New function.
7543 (elf_backend_object_p): Define.
7544 * elf64-ppc.c (ppc64_elf_object_p): New function.
7545 (elf_backend_object_p): Define.
7546
7547 2002-06-26 Jason Thorpe <thorpej@wasabisystems.com>
7548
7549 * configure.in (vax-*-netbsd*): Set COREFILE to netbsd-core.lo.
7550 * configure: Regenerate.
7551
7552 2002-06-25 Jason Eckhardt <jle@rice.edu>
7553
7554 * dwarf2.c (decode_line_info): Check unit->addr_size
7555 to read in the proper number of prologue bytes.
7556
7557 2002-06-25 Nick Clifton <nickc@cambridge.redhat.com>
7558
7559 * config.bfd (powerpc-*-aix5*): Only create a selvecs for
7560 aix5coff64_vec if 64-bit bfd support has been enabled.
7561 (powerpc64-*-aix5*): Only define if 64-bit bfd support has
7562 been enabled.
7563
7564 * targets.c (_bfd_target_vector[]): Only include
7565 aix5coff64_vec if 64-bit bfd support has been enabled.
7566
7567 2002-06-25 Alan Modra <amodra@bigpond.net.au>
7568
7569 * elf64-ppc.c (ppc_add_stub): Replace strcpy/strncpy with memcpy.
7570 * elf32-hppa.c (hppa_add_stub): Likewise.
7571 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
7572 * elflink.h (elf_add_default_symbol): Fix comment typo.
7573 (elf_add_default_symbol): Replace strcpy and strncpy with memcpy.
7574 (elf_link_add_object_symbols): Likewise.
7575 (elf_link_assign_sym_version): Likewise.
7576 * hash.c (bfd_hash_lookup): Likewise.
7577 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
7578 * section.c (bfd_get_unique_section_name): Likewise.
7579 * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
7580 * elf.c (_bfd_elf_make_section_from_phdr): Likewise.
7581 (assign_section_numbers): Likewise.
7582 (_bfd_elfcore_make_pseudosection): Likewise.
7583 (elfcore_grok_lwpstatus): Likewise.
7584 (elfcore_grok_win32pstatus): Likewise.
7585 (elfcore_write_note): Constify input params. Use PTR instead of
7586 void *. Include terminating NUL in namesz. Correct padding.
7587 Support NULL "name" param. Use memcpy instead of strcpy.
7588 (elfcore_write_prpsinfo): Constify input params.
7589 (elfcore_write_prstatus): Likewise. Use PTR instead of void *.
7590 (elfcore_write_lwpstatus): Likewise.
7591 (elfcore_write_pstatus): Likewise.
7592 (elfcore_write_prfpreg): Likewise.
7593 (elfcore_write_prxfpreg): Likewise.
7594 * elf-bfd.h (elfcore_write_note): Update declaration.
7595 (elfcore_write_prpsinfo): Likewise.
7596 (elfcore_write_prstatus): Likewise.
7597 (elfcore_write_pstatus): Likewise.
7598 (elfcore_write_prfpreg): Likewise.
7599 (elfcore_write_prxfpreg): Likewise.
7600 (elfcore_write_lwpstatus): Likewise.
7601
7602 2002-06-25 Jason Eckhardt <jle@rice.edu>
7603
7604 * ecoff.c (ecoff_set_symbol_info): Set BSF_FUNCTION for
7605 symbols of type stProc and stStaticProc.
7606
7607 2002-06-25 Nick Clifton <nickc@redhat.com>
7608
7609 * ecoff.c: VArious formatting fixes.
7610
7611 2002-06-25 Alan Modra <amodra@bigpond.net.au>
7612
7613 * coff-rs6000.c (xcoff_generate_rtinit): Fix typo.
7614
7615 2002-06-25 Alan Modra <amodra@bigpond.net.au>
7616
7617 * aout-adobe.c: Don't compare against "true" or "false.
7618 * aout-target.h: Likewise.
7619 * aoutx.h: Likewise.
7620 * archive.c: Likewise.
7621 * bout.c: Likewise.
7622 * cache.c: Likewise.
7623 * coff-a29k.c: Likewise.
7624 * coff-alpha.c: Likewise.
7625 * coff-i386.c: Likewise.
7626 * coff-mips.c: Likewise.
7627 * coff-or32.c: Likewise.
7628 * coff64-rs6000.c: Likewise.
7629 * coffcode.h: Likewise.
7630 * coffgen.c: Likewise.
7631 * cpu-ns32k.c: Likewise.
7632 * ecoff.c: Likewise.
7633 * ecofflink.c: Likewise.
7634 * elf.c: Likewise.
7635 * elf32-arm.h: Likewise.
7636 * elf32-cris.c: Likewise.
7637 * elf32-d30v.c: Likewise.
7638 * elf32-i386.c: Likewise.
7639 * elf32-mcore.c: Likewise.
7640 * elf32-ppc.c: Likewise.
7641 * elf32-sh.c: Likewise.
7642 * elf32-sh64.c: Likewise.
7643 * elf32-v850.c: Likewise.
7644 * elf64-alpha.c: Likewise.
7645 * elf64-sh64.c: Likewise.
7646 * elfcode.h: Likewise.
7647 * elfcore.h: Likewise.
7648 * elflink.h: Likewise.
7649 * elfxx-mips.c: Likewise.
7650 * i386os9k.c: Likewise.
7651 * ieee.c: Likewise.
7652 * libbfd.c: Likewise.
7653 * linker.c: Likewise.
7654 * mmo.c: Likewise.
7655 * nlm32-alpha.c: Likewise.
7656 * nlm32-i386.c: Likewise.
7657 * nlm32-ppc.c: Likewise.
7658 * nlm32-sparc.c: Likewise.
7659 * nlmcode.h: Likewise.
7660 * oasys.c: Likewise.
7661 * pdp11.c: Likewise.
7662 * peicode.h: Likewise.
7663 * reloc.c: Likewise.
7664 * som.c: Likewise.
7665 * srec.c: Likewise.
7666 * tekhex.c: Likewise.
7667 * vms.c: Likewise.
7668 * xcofflink.c: Likewise.
7669 * elf64-sparc.c: Edit comment to not use "== false".
7670
7671 * aoutf1.h: Don't use "? true : false".
7672 * ecoff.c: Likewise.
7673 * format.c: Likewise.
7674 * ieee.c: Likewise.
7675 * linker.c: Likewise.
7676 * mmo.c: Likewise.
7677 * oasys.c: Likewise.
7678
7679 2002-06-23 H.J. Lu <hjl@gnu.org>
7680
7681 * elflink.h (elf_link_add_archive_symbols): For the default
7682 version, check references with only one `@' first.
7683
7684 2002-06-23 John David Anglin <dave@hiauly1.hia.nrc.ca>
7685
7686 * elf64-hppa.c (elf64_hppa_mark_milli_and_exported_functions): New
7687 function.
7688 (allocate_global_data_dlt): Don't add millicode symbols to dynamic
7689 symbol table.
7690 (allocate_global_data_opd, allocate_dynrel_entries): Likewise.
7691 (elf64_hppa_size_dynamic_sections): Revise to use
7692 elf64_hppa_mark_milli_and_exported_functions.
7693 (elf64_hppa_finish_dynamic_symbol): Remove code to keep millicode
7694 symbols out of dynamic symbol table.
7695
7696 2002-06-23 Alan Modra <amodra@bigpond.net.au>
7697
7698 * Makefile.in: Regenerate.
7699 * libbfd.h: Regenerate.
7700 * bfd-in2.h: Regenerate.
7701 * configure: Regenerate.
7702 * po/SRC-POTFILES.in: Regenerate.
7703
7704 * elflink.h: Comment typo fixes.
7705
7706 2002-06-23 H.J. Lu <hjl@gnu.org>
7707
7708 * elf-bfd.h (elf_link_loaded_list): New structure.
7709 (elf_link_hash_table): Add "loaded".
7710 * elf.c (_bfd_elf_link_hash_table_init): Initialize "loaded".
7711 * elflink.h (elf_link_check_versioned_symbol): New function.
7712 (elf_link_output_extsym): Call elf_link_check_versioned_symbol.
7713
7714 2002-06-19 Nick Clifton <nickc@cambridge.redhat.com>
7715
7716 * elflink.h (size_dynamic_sections): If the target does not
7717 support an ELF style hash table, return true, indicating that
7718 nothing needed to be done, rather than false, indicating that the
7719 section's size could not be computed.
7720
7721 2002-06-18 Dave Brolley <brolley@redhat.com>
7722
7723 From Catherine Moore, Michael Meissner, Dave Brolley:
7724 * po/SRC-POTFILES.in: Add cpu-frv.c and elf32-frv.c
7725 * targets.c: Support bfd_elf32_frv_vec.
7726 * reloc.c: Add FRV relocs.
7727 * configure.in: Add support for bfd-elf32-frv-vec.
7728 * config.bfd (targ_cpu): Add support for frv-*-elf.
7729 * archures.c: Add frv arch and machines.
7730 * Makefile.am (ALL_MACHINES): Add cpu-frv.lo.
7731 (ALL_MACHINES_CFILES): Add cpu-frv.c.
7732 (BFD32_BACKENDS): Add elf32-frv.lo.
7733 (BFD32_BACKENDS_CFILES): Add elf32-frv.c
7734 (cpu-frv.lo): New target.
7735 (elf32-frv.lo): New target.
7736 * cpu-frv.c: New file.
7737 * elf32-frv.c: New file.
7738
7739 2002-06-18 Jakub Jelinek <jakub@redhat.com>
7740
7741 * elfcode.h (elf_object_p): Sanity check eh_shoff == 0 implies
7742 e_shnum == 0.
7743 Only read the first section header if e_shoff is non-zero.
7744 Don't consider e_shstrndx if there are no sections.
7745
7746 2002-06-17 Tom Rix <trix@redhat.com>
7747
7748 * elf32-d10v.c (elf_d10v_howto_table): Change R_D10V_10_PCREL_R,
7749 R_D10V_10_PCREL_L and R_D10V_18_PCREL to use
7750 complain_overflow_bitfield.
7751
7752 2002-06-17 Alan Modra <amodra@bigpond.net.au>
7753
7754 * opncls.c (bfd_openr): Remove redundant bfd_set_error.
7755 (bfd_fdopenr): Likewise.
7756 (bfd_openstreamr): Likewise.
7757 (bfd_openw): Likewise.
7758
7759 * targets.c: Sort target vecs.
7760 (_bfd_target_vector): Add aix5coff64_vec, bfd_elf32_sh64_vec,
7761 bfd_elf32_sh64l_vec, bfd_elf32_sh64lnbsd_vec,
7762 bfd_elf32_sh64nbsd_vec, bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec,
7763 bfd_elf64_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec.
7764 * configure.in: Sort target vecs. Add m88kmach3_vec.
7765 * configure: Regenerate.
7766
7767 2002-06-16 Hans-Peter Nilsson <hp@bitrange.com>
7768
7769 * elf64-mmix.c (bpo_reloc_request_sort_fn): Use member
7770 bpo_reloc_no to break sort order ties, not address of items.
7771
7772 2002-06-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
7773
7774 * elf-hppa.h (elf_hppa_final_link): Fix formatting in comment.
7775 Skip excluded sections in determing __gp value.
7776 (elf_hppa_final_link_relocate): Use the symbol's address in
7777 R_PARISC_FPTR64 relocations that don't need an opd entry.
7778 * elf64-hppa.c (allocate_dynrel_entries): Simplify code.
7779 (elf64_hppa_finalize_dynreloc): Likewise.
7780 (elf64_hppa_size_dynamic_sections): Move comments and fix typo.
7781 (elf64_hppa_finish_dynamic_symbol): Break up assert.
7782
7783 2002-06-14 Sergey Grigoriev <serge@leopold.Physik.Uni-Augsburg.DE>
7784
7785 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
7786 alignment for .bss, .data and .text sections so that sse and sse2
7787 code will work.
7788 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
7789
7790 2002-06013 J"orn Rennecke <joern.rennecke@superh.com>
7791
7792 config.bfd: Add support for sh[1234]l*-*-elf* | sh3el*-*-elf*,
7793 sh[1234]*-elf*.
7794
7795 2002-06-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
7796
7797 * elflink.h (elf_bfd_final_link): Improve error handling for missing
7798 dynamic sections.
7799
7800 * elf64-hppa.c (allocate_global_data_opd): We don't need an opd entry
7801 for a symbol that has no output section.
7802 (allocate_dynrel_entries): Correct comment.
7803 (elf64_hppa_finalize_dynreloc): Likewise. Don't create an opd entry
7804 unless we want one.
7805 (elf64_hppa_finalize_opd): Prevent segfault if dyn_h is NULL.
7806 (elf64_hppa_finalize_dlt): Likewise. Prevent segfault for symbols
7807 with no section. Remove unnecessary parentheses.
7808
7809 2002-06-11 Tom Rix <trix@redhat.com>
7810
7811 * coffcode.h (coff_compute_section_file_positions): Add data
7812 section to AIX loader alignment check.
7813
7814 * coff-rs6000.c (_bfd_xcoff_mkobject): Set default text section
7815 alignment to 4 bytes.
7816 (_bfd_xcoff_copy_private_bfd_data): Use text and data alignment
7817 power accessor macro.
7818 (do_shared_object_padding): Remove invalid assertion.
7819
7820 2002-06-10 Richard Sandiford <rsandifo@redhat.com>
7821
7822 * section.c (_bfd_strip_section_from_output): Set SEC_EXCLUDE
7823 for removed output sections.
7824
7825 2002-06-10 Geoffrey Keating <geoffk@redhat.com>
7826
7827 * merge.c (merge_strings): Use htab_create_alloc with calloc, not
7828 htab_alloc.
7829 * elf-strtab.c (_bfd_elf_strtab_finalize): Likewise.
7830
7831 2002-06-08 H.J. Lu <hjl@gnu.org>
7832
7833 * elf.c (copy_private_bfd_data): Don't cast to bfd_size_type to
7834 work around a long long bug in gcc 2.96 on mips.
7835
7836 2002-06-08 Jason Thorpe <thorpej@wasabisystems.com>
7837
7838 * Makefile.am (BFD32_BACKENDS): Add vax1knetbsd.lo.
7839 (BFD32_BACKENDS_CFILES): Add vax1knetbsd.c.
7840 Regenerate dependency lists.
7841 * Makefile.in: Regenerate.
7842 * config.bfd (vax-*-netbsdelf*, vax-*-netbsdaout*): Add
7843 vax1knetbsd_vec to targ_selvecs.
7844 * configure.in: Add vax1knetbsd_vec.
7845 * configure: Regenerate.
7846 * targets.c (_bfd_target_vector): Add vax1knetbsd_vec.
7847 * vax1knetbsd.c: New file.
7848 * vaxnetbsd.c: Update copyright years.
7849 (TARGET_PAGE_SIZE): Set to 0x1000.
7850 (DEFAULT_MID): Set to M_VAX4K_NETBSD.
7851
7852 2002-06-08 Matt Thomas <matt@3am-software.com>
7853
7854 * libaout.h (enum machine_type): Add M_VAX4K_NETBSD.
7855
7856 2002-06-08 Alan Modra <amodra@bigpond.net.au>
7857
7858 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Make static.
7859
7860 2002-06-08 Alan Modra <amodra@bigpond.net.au>
7861
7862 * Makefile.am: Run "make dep-am".
7863 * Makefile.in: Regenerate.
7864
7865 * armnetbsd.c: Replace CONST with const.
7866 * corefile.c: Likewise.
7867 * elf32-dlx.c: Likewise.
7868 * elf64-mips.c: Likewise.
7869 * mmo.c: Likewise.
7870 * ns32knetbsd.c: Likewise.
7871
7872 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Check the hash
7873 table is elf64-sparc.
7874
7875 2002-06-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7876
7877 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Simplify code.
7878 Fix RELA addends to get not shifted in the result. Don't do special
7879 handling of R_MIPS_64 for NewABI.
7880
7881 2002-06-07 Alan Modra <amodra@bigpond.net.au>
7882
7883 * aoutx.h (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
7884 (NAME(aout,slurp_reloc_table)): Likewise.
7885 * coff-mips.c (mips_relax_section): Use bfd_zalloc.
7886 * coff-rs6000.c (xcoff_write_armap_big): Use bfd_zmalloc.
7887 (xcoff_write_archive_contents_big): Likewise.
7888 (xcoff_generate_rtinit): Likewise.
7889 (xcoff_generate_rtinit): Likewise, and check error return.
7890 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
7891 * coffgen.c (coff_section_symbol): Use bfd_zalloc.
7892 (coff_get_normalized_symtab): Likewise.
7893 (coff_make_empty_symbol): Likewise.
7894 (bfd_coff_set_symbol_class): Likewise.
7895 * cofflink.c (coff_link_add_symbols): Likewise.
7896 * ecoff.c (_bfd_ecoff_make_empty_symbol): Likewise.
7897 * ecofflink.c (ecoff_write_shuffle): Use bfd_zmalloc.
7898 (bfd_ecoff_write_accumulated_debug): Likewise.
7899 * elf64-alpha.c (get_got_entry): Use bfd_zalloc.
7900 * i386linux.c (bfd_i386linux_size_dynamic_sections): Likewise.
7901 * i386lynx.c (NAME(lynx,slurp_reloc_table)): Use bfd_zmalloc.
7902 * ieee.c (do_with_relocs): Use bfd_zalloc.
7903 * m68klinux.c (bfd_m68klinux_size_dynamic_sections): Likewise.
7904 * pdp11.c (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
7905 (NAME(aout,slurp_reloc_table)): Likewise.
7906 (NAME(aout,squirt_out_relocs)): Don't memset when zalloc'd.
7907 * reloc16.c (bfd_coff_reloc16_relax_section): Use bfd_zmalloc.
7908 * som.c (som_build_and_write_symbol_table): Likewise.
7909 (som_slurp_string_table): Likewise.
7910 (som_slurp_symbol_table): Likewise.
7911 (som_bfd_ar_write_symbol_stuff): Likewise.
7912 * sparclinux.c (bfd_sparclinux_size_dynamic_sections): Use bfd_zalloc.
7913 * sunos.c (bfd_sunos_size_dynamic_sections): Likewise.
7914 * tekhex.c (find_chunk): Likewise. Get rid of unused "sname".
7915 * vms-gsd.c (_bfd_vms_slurp_gsd): Use bfd_zmalloc.
7916 * xcofflink.c (xcoff_link_add_symbols): Use bfd_zalloc/bfd_zmalloc.
7917
7918 2002-06-07 Alan Modra <amodra@bigpond.net.au>
7919
7920 * elf-bfd.h (struct bfd_elf_section_data <group_name>): Replace with
7921 "group" union.
7922 (elf_group_name): Update.
7923 (elf_group_id): Define.
7924 (bfd_elf_set_group_contents): Declare.
7925 * elf.c (elf_fake_sections): Qualify use of elf_group_name.
7926 (set_group_contents): Rename to bfd_elf_set_group_contents. Remove
7927 ATTRIBUTE_UNUSED from failedptrarg. If elf_group_id is set, use
7928 that sym for the signature.
7929 (_bfd_elf_compute_section_file_positions): Don't call
7930 set_group_contents for "ld -r" case.
7931 (swap_out_syms): Use bfd_zalloc.
7932 * elflink.h (elf_link_add_archive_symbols): Likewise.
7933 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
7934 (elf_bfd_final_link): Call bfd_elf_set_group_contents.
7935
7936 2002-06-07 Alan Modra <amodra@bigpond.net.au>
7937
7938 * elf64-ppc.c (ppc64_elf_relocate_section): Allow unresolved
7939 relocs in opd for non-shared too.
7940
7941 2002-06-06 Jeffrey Law <law@redhat.com>
7942
7943 * elf32-h8300.c (elf32_h8_relax_section): Ignore uninteresting
7944 relocations.
7945
7946 2002-06-06 Nick Clifton <nickc@cambridge.redhat.com>
7947
7948 * merge.c: Include libiberty.h.
7949 * elf-strtab.c: Include libiberty.h.
7950
7951 2002-06-06 Elias Athanasopoulos <eathan@otenet.gr>
7952
7953 * peXXigen.c (pe_print_idata): Remove unused variable.
7954
7955 2002-06-06 David Heine <dlheine@tensilica.com>
7956
7957 * elf.c (assign_file_positions_for_segments): Remove unallocated
7958 sections from the section to segment mapping for PT_LOAD segments.
7959 Update comment about empty loadable segments.
7960
7961 2002-06-06 Richard Sandiford <rsandifo@redhat.com>
7962
7963 * stabs.c (_bfd_link_section_stabs): Check that the symbol offset
7964 is within the .stabstr section.
7965
7966 2002-06-06 Alan Modra <amodra@bigpond.net.au>
7967
7968 * elf-bfd.h (struct elf_size_info <swap_symbol_in>): Function args
7969 are "const PTR", not "const PTR *".
7970 (bfd_elf32_swap_symbol_in): Likewise.
7971 (bfd_elf64_swap_symbol_in): Likewise.
7972 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR.
7973 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
7974 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
7975 (elf_link_add_object_symbols): Likewise.
7976 (elf_link_record_local_dynamic_symbol): Likewise.
7977 (elf_link_input_bfd): Likewise.
7978 (elf_gc_mark): Likewise.
7979 (elf_reloc_symbol_deleted_p): Likewise.
7980 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
7981 (mn10200_elf_relax_delete_bytes): Likewise.
7982 (mn10200_elf_symbol_address_p): Likewise.
7983 (mn10200_elf_get_relocated_section_contents): Likewise.
7984 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
7985 (mn10300_elf_relax_section): Likewise.
7986 (mn10300_elf_relax_delete_bytes): Likewise.
7987 (mn10300_elf_symbol_address_p): Likewise.
7988 (mn10300_elf_get_relocated_section_contents): Likewise.
7989 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
7990 (elf32_h8_relax_delete_bytes): Likewise.
7991 (elf32_h8_symbol_address_p): Likewise.
7992 (elf32_h8_get_relocated_section_contents): Likewise.
7993 * elf32-hppa.c (get_local_syms): Likewise.
7994 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
7995 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
7996 * elf32-sh.c (sh_elf_relax_section): Likewise.
7997 (sh_elf_relax_delete_bytes): Likewise.
7998 (sh_elf_get_relocated_section_contents): Likewise.
7999 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
8000 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
8001 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
8002 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
8003 * elf64-ppc.c (get_local_syms): Likewise.
8004 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
8005 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
8006
8007 2002-06-05 J"orn Rennecke <joern.rennecke@superh.com>
8008
8009 * config.bfd (sh64l*-*-elf*, shl*-*-elf*): New configurations.
8010
8011 2002-06-05 Alan Modra <amodra@bigpond.net.au>
8012
8013 * elf.c (group_signature): Swap in the whole symbol, and handle
8014 extracting section symbol names.
8015 (setup_group): Add comment.
8016 (set_group_contents): When called from objcopy or ld, arrange for
8017 section contents to be written. Write group member output section
8018 indices to allow objcopy to reorganize sections.
8019 (_bfd_elf_copy_private_section_data): Copy group info.
8020
8021 * elf-bfd.h (struct elf_size_info): Add swap_symbol_in field.
8022 (bfd_elf32_swap_symbol_in): Update prototype.
8023 (bfd_elf64_swap_symbol_in): Likewise.
8024 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR *.
8025 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
8026 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
8027 (elf_link_add_object_symbols): Likewise.
8028 (elf_link_record_local_dynamic_symbol): Likewise.
8029 (elf_link_input_bfd): Likewise.
8030 (elf_gc_mark): Likewise.
8031 (elf_reloc_symbol_deleted_p): Likewise.
8032 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
8033 (mn10200_elf_relax_delete_bytes): Likewise.
8034 (mn10200_elf_symbol_address_p): Likewise.
8035 (mn10200_elf_get_relocated_section_contents): Likewise.
8036 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
8037 (mn10300_elf_relax_section): Likewise.
8038 (mn10300_elf_relax_delete_bytes): Likewise.
8039 (mn10300_elf_symbol_address_p): Likewise.
8040 (mn10300_elf_get_relocated_section_contents): Likewise.
8041 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
8042 (elf32_h8_relax_delete_bytes): Likewise.
8043 (elf32_h8_symbol_address_p): Likewise.
8044 (elf32_h8_get_relocated_section_contents): Likewise.
8045 * elf32-hppa.c (get_local_syms): Likewise.
8046 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
8047 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
8048 * elf32-sh.c (sh_elf_relax_section): Likewise.
8049 (sh_elf_relax_delete_bytes): Likewise.
8050 (sh_elf_get_relocated_section_contents): Likewise.
8051 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
8052 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
8053 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
8054 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
8055 * elf64-ppc.c (get_local_syms): Likewise.
8056 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
8057 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
8058 * elfcode.h (NAME(_bfd_elf,size_info)): Update initialiser.
8059 * elf64-alpha.c (alpha_elf_size_info): Likewise.
8060 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
8061 * elf64-mips.c (mips_elf64_size_info): Likewise.
8062 * elf64-s390.c (s390_elf64_size_info): Likewise.
8063 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
8064
8065 2002-06-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
8066
8067 * elf32-mips.c (elf32_mips_ignore_discarded_relocs): Move to...
8068 elfxx-mips.c (_bfd_mips_elf_ignore_discarded_relocs): ... here.
8069 elf64-mips.c (elf_backend_ignore_discarded_relocs): Use
8070 _bfd_mips_elf_ignore_discarded_relocs.
8071 elfxx-mips.h (_bfd_mips_elf_ignore_discarded_relocs): Declare.
8072
8073 2002-06-05 H.J. Lu <hjl@gnu.org>
8074
8075 * elfxx-mips.c (mips_elf_calculate_relocation): Call
8076 _bfd_elf_rel_local_sym for STT_SECTION relocations against
8077 the SEC_MERGE section.
8078
8079 2002-06-05 Alan Modra <amodra@bigpond.net.au>
8080
8081 * coff-alpha.c: Update copyright date.
8082 * coff-mips.c: Likewise.
8083 * xcoff-target.h: Likewise.
8084
8085 * bfd-in.h: Remove "taken from the source" comment.
8086 * libbfd-in.h: Likewise.
8087 * libcoff-in.h: Likewise.
8088 * bfd-in2.h: Regenerate.
8089 * libbfd.h: Regenerate.
8090 * libcoff.h: Regenerate.
8091
8092 * elf.c (bfd_elf_discard_group): Return true.
8093 * elf-bfd.h (bfd_elf_discard_group): Declare.
8094 * bfd-in.h (bfd_elf_discard_group): Don't declare here.
8095 * section.c (bfd_discard_group): Rename to bfd_generic_discard_group.
8096 * bfd.c (bfd_discard_group): Define.
8097 * targets.c (struct bfd_target): Add _bfd_discard_group.
8098 (BFD_JUMP_TABLE_LINK): Here too.
8099 * libbfd-in.h (_bfd_nolink_bfd_discard_group): Define.
8100 * aout-adobe.c (aout_32_bfd_discard_group): Define.
8101 * aout-target.h (MY_bfd_discard_group): Define.
8102 * aout-tic30.c (MY_bfd_discard_group): Define.
8103 * binary.c (binary_bfd_discard_group): Define.
8104 * bout.c (b_out_bfd_discard_group): Define.
8105 * coff-alpha.c (_bfd_ecoff_bfd_discard_group): Define.
8106 * coffcode.h (coff_bfd_discard_group): Define.
8107 * coff-mips.c (_bfd_ecoff_bfd_discard_group): Define.
8108 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Define.
8109 * i386msdos.c (msdos_bfd_discard_group): Define.
8110 * i386os9k.c (os9k_bfd_discard_group): Define.
8111 * ieee.c (ieee_bfd_discard_group): Define.
8112 * ihex.c (ihex_bfd_discard_group): Define.
8113 * mmo.c (mmo_bfd_discard_group): Define.
8114 * nlm-target.h (nlm_bfd_discard_group): Define.
8115 * oasys.c (oasys_bfd_discard_group): Define.
8116 * ppcboot.c (ppcboot_bfd_discard_group): Define.
8117 * som.c (som_bfd_discard_group): Define.
8118 * srec.c (srec_bfd_discard_group): Define.
8119 * tekhex.c (tekhex_bfd_discard_group): Define.
8120 * versados.c (versados_bfd_discard_group): Define.
8121 * vms.c (vms_bfd_discard_group): Define.
8122 * xcoff-target.h (_bfd_xcoff_bfd_discard_group): Define.
8123 * coff64-rs6000.c (rs6000coff64_vec): Update initialiser.
8124 (aix5coff64_vec): Likewise.
8125 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Likewise.
8126
8127 2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
8128
8129 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-com.lo.
8130 (BFD32_BACKENDS_CFILES): Add elf32-sh64-com.c.
8131 (elf32-sh64-com.lo): New dependency list.
8132 * Makefile.in: Regenerate.
8133 * configure.in (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec)
8134 (bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec): Add
8135 elf32-sh64-com.lo.
8136 * configure: Regenerate.
8137 * elf32-sh64.c (sh64_address_in_cranges)
8138 (sh64_get_contents_type, sh64_address_is_shmedia): Move to...
8139 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb):
8140 (crange_bsearch_cmpl): Prepend _bfd_sh64_ to name and move to...
8141 * elf32-sh64-com.c: ...here. New file.
8142
8143 2002-06-04 Alan Modra <amodra@bigpond.net.au>
8144
8145 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Remove
8146 ATTRIBUTE_UNUSED on used params.
8147 * elf32-vax.c (elf_vax_gc_mark_hook): Remove unnecessary checks
8148 before calling bfd_section_from_elf_index on local syms.
8149 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
8150
8151 2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
8152
8153 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-nbsd.lo.
8154 (BFD32_BACKENDS_CFILES): Add elf32-sh64-nbsd.c.
8155 (BFD64_BACKENDS): Add elf64-sh64-nbsd.lo.
8156 (BFD64_BACKENDS_CFILES): Add elf64-sh64-nbsd.c.
8157 (elf32-sh64-nbsd.lo, elf64-sh64-nbsd.lo): New rules.
8158 * Makefile.in: Regenerate.
8159 * config.bfd (sh5le-*-netbsd*, sh5-*-netbsd*, sh64le-*-netbsd*)
8160 (sh64-*-netbsd*): New targets.
8161 * configure.in: Add bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec,
8162 bfd_elf64_sh64nbsd_vec, and bfd_elf64_sh64lnbsd_vec.
8163 * configure: Regenerate.
8164 * elf32-sh64-nbsd.c: New file.
8165 * elf64-sh64-nbsd.c: New file.
8166 * targets.c: Add extern decls for bfd_elf32_sh64nbsd_vec,
8167 bfd_elf32_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec, and
8168 bfd_elf64_sh64lnbsd_vec.
8169
8170 2002-06-04 Alan Modra <amodra@bigpond.net.au>
8171
8172 * elf.c (setup_group): Set SEC_LINK_ONCE on GRP_COMDAT groups.
8173 (bfd_section_from_shdr): Likewise. Set section name of group
8174 sections from signature.
8175 (group_signature): Split out from setup_group. Ensure symbol table
8176 is available.
8177 (bfd_elf_discard_group): New function.
8178 (_bfd_elf_make_section_from_shdr): Don't set SEC_LINK_ONCE on
8179 .gnu.linkonce* sections if they are members of a group.
8180 (set_group_contents): Set GRP_COMDAT flag.
8181 * section.c (bfd_discard_group): New function.
8182 * bfd-in.h (bfd_elf_discard_group): Declare.
8183 * bfd-in2.h: Regenerate.
8184 * elf-bfd.h (struct bfd_elf_section_data): Add linkonce_p field.
8185 (elf_linkonce_p): Define.
8186
8187 2002-06-04 Alan Modra <amodra@bigpond.net.au>
8188
8189 * elf.c (bfd_section_from_shdr): Make "name" const.
8190 * elf-bfd.h (elf_backend_section_from_shdr): Likewise.
8191 * elf32-i370.c (i370_elf_section_from_shdr): Likewise.
8192 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
8193 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
8194 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
8195 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
8196 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
8197 * elf64-ppc.c (ppc64_elf_section_from_shdr): Likewise.
8198 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
8199 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
8200 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
8201
8202 2002-06-03 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
8203
8204 * elfxx-mips.c (ABI_64_P): Use backend's data to determine the
8205 ABI.
8206
8207 2002-06-02 Kazu Hirata <kazu@cs.umass.edu>
8208
8209 * elf32-arc.c: Fix formatting.
8210 * elf32-arm.h: Likewise.
8211 * elf32-cris.c: Likewise.
8212 * elf32-dlx.c: Likewise.
8213 * elf32-hppa.c: Likewise.
8214 * elf32-i386.c: Likewise.
8215 * elf32-i386qnx.c: Likewise.
8216 * elf32-or32.c: Likewise.
8217 * elf32-s390.c: Likewise.
8218 * elf32-sh64.c: Likewise.
8219 * elf32-vax.c: Likewise.
8220 * elf32-xstormy16.c: Likewise.
8221 * elf64-alpha.c: Likewise.
8222 * elf64-mmix.c: Likewise.
8223 * elf64-ppc.c: Likewise.
8224 * elf64-s390.c: Likewise.
8225 * elf64-sh64.c: Likewise.
8226 * elf64-x86-64.c: Likewise.
8227
8228 2002-06-02 Richard Henderson <rth@redhat.com>
8229
8230 * elf64-alpha.c (elf64_alpha_relocate_section): Don't dereference
8231 null when there are no got entries for a symbol.
8232 (elf64_alpha_relax_find_tls_segment): Rearrange to avoid
8233 uninitialized variable warning.
8234
8235 2002-06-01 Richard Henderson <rth@redhat.com>
8236
8237 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Don't test for
8238 undefined symbols here.
8239 (elf64_alpha_relax_section): Do it here. Also test for not
8240 defined in the current module.
8241 (elf64_alpha_relocate_section_r): Split out of ...
8242 (elf64_alpha_relocate_section): ... here. Don't dereference
8243 NULL when looking up local got entries.
8244
8245 2002-06-01 Richard Henderson <rth@redhat.com>
8246
8247 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Reject undefined
8248 symbols from JSR relaxation.
8249 (elf64_alpha_size_plt_section_1): New.
8250 (elf64_alpha_calc_dynrel_sizes): Split out .rela.got bits ...
8251 (elf64_alpha_size_rela_got_1): ... here.
8252 (elf64_alpha_size_dynamic_sections): Split out .rela.got bits ...
8253 (elf64_alpha_size_rela_got_section): ... here.
8254 (elf64_alpha_size_plt_section): New.
8255 (elf64_alpha_relax_section): Call them.
8256 (elf64_alpha_size_got_sections): Remove output_bfd arg.
8257 (elf64_alpha_finish_dynamic_symbol): Check gotent use_count.
8258
8259 2002-06-01 Richard Henderson <rth@redhat.com>
8260
8261 * elf64-alpha.c (alpha_get_dtprel_base, alpha_get_tprel_base): New.
8262 (elf64_alpha_relocate_section): Use them. Reject LE TLS relocs
8263 in shared libraries. Fix DTPRELHI and TPRELHI value.
8264 (INSN_ADDQ, INSN_RDUNIQ): New.
8265 (struct alpha_relax_info): Add symtab_hdr, tls_segment, first_gotent.
8266 (elf64_alpha_relax_with_lituse): Return boolean. Remove irelend
8267 argument. Reject dynamic symbols. Use LITUSE symbolic constants.
8268 (elf64_alpha_relax_got_load): Rename from relax_without_lituse.
8269 Handle GOTDTPREL and GOTTPREL relocations.
8270 (elf64_alpha_relax_gprelhilo): New.
8271 (elf64_alpha_relax_tls_get_addr): New.
8272 (elf64_alpha_relax_find_tls_segment): New.
8273 (elf64_alpha_relax_section): Handle TLS relocations.
8274 (ALPHA_ELF_LINK_HASH_TLS_IE): New.
8275 (elf64_alpha_check_relocs): Set it.
8276
8277 2002-06-01 Richard Henderson <rth@redhat.com>
8278
8279 * elf64-alpha.c (elf64_alpha_relax_section): Don't store computed gp.
8280
8281 * elf64-alpha.c (elf64_alpha_check_relocs): Fix typo on maybe_dynamic
8282 check; don't suppress dynamic relocs for non-allocated sections.
8283
8284 * elf64-alpha.c: Remove dead code.
8285
8286 2002-05-31 Alan Modra <amodra@bigpond.net.au>
8287
8288 * bfd-in2.h: Regenerate.
8289 * libbfd.h: Regenerate.
8290 * po/SRC-POTFILES.in: Regenerate.
8291
8292 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate
8293 space for bss .plt.
8294
8295 2002-05-31 Graeme Peterson <gp@qnx.com>
8296
8297 * Makefile.am (BFD32_BACKENDS): Add elf32-i386qnx.lo.
8298 (BFD32_BACKENDS_CFILES): Add elf32-i386qnx.c.
8299 Run "make dep-am".
8300 * Makefile.in: Regenerate.
8301 * config.bfd: Add i[3456]86-*-nto-qnx* support.
8302 * configure.in: Add bfd_elf32_i386qnx_vec support.
8303 * configure: Regenerate.
8304 * elf-bfd.h (struct elf_backend_data): Add set_nonloadable_filepos,
8305 is_contained_by_filepos, and copy_private_bfd_data_p.
8306 * elf.c (assign_file_positions_for_segments): Call backend
8307 set_nonloadable_filepos. Fix non-K&R call to _bfd_error_handler.
8308 (IS_CONTAINED_BY_FILEPOS): Define.
8309 (INCLUDE_SECTION_IN_SEGMENT): Also test IS_CONTAINED_BY_FILEPOS.
8310 (copy_private_bfd_data): Use IS_CONTAINED_BY_FILEPOS. Typo fix.
8311 Fix non-K&R call to _bfd_error_handler.
8312 (_bfd_elf_copy_private_section_data): Use backend
8313 copy_private_bfd_data_p.
8314 * elf32-i386.c: Don't include elfxx-target.h when
8315 ELF32_I386_C_INCLUDED is defined.
8316 * elf32-i386qnx.c: New QNX elf backend file.
8317 * elfxx-target.h: Add elf_backend_set_nonloadable_filepos,
8318 elf_backend_is_contained_by_filepos, and
8319 elf_backend_do_copy_private_bfd_data.
8320 * targets.c: Add bfd_target bfd_elf32_i386qnx_vec.
8321
8322 2002-05-31 Alan Modra <amodra@bigpond.net.au>
8323
8324 * elfarm-oabi.c (bfd_elf32_arm_add_glue_sections_to_bfd): Define.
8325 Move other similar defines to start of file.
8326
8327 2002-05-30 Tom Rix <trix@redhat.com>
8328
8329 * coff-rs6000.c (xcoff_rtype2howto): Handle 16 bit R_RBA.
8330 * coff64-rs6000.c (xcoff64_rtype2howto): Same.
8331
8332 2002-05-30 Richard Henderson <rth@redhat.com>
8333
8334 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_TLSGD,
8335 ALPHA_ELF_LINK_HASH_LU_TLSLDM, ALPHA_ELF_LINK_HASH_LU_FUNC): New.
8336 (ALPHA_ELF_GOT_ENTRY_RELOCS_DONE): Remove.
8337 (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Remove.
8338 (struct alpha_elf_got_entry): Add reloc_type, reloc_done, reloc_xlated.
8339 (struct alpha_elf_obj_tdata): Rename total_got_entries and
8340 n_local_got_entries to total_got_size and local_got_size.
8341 (elf64_alpha_howto, elf64_alpha_reloc_map): Update for TLS relocs.
8342 (alpha_got_entry_size): New.
8343 (elf64_alpha_relax_with_lituse): Use it.
8344 (elf64_alpha_relax_without_lituse): Likewise.
8345 (MAX_GOT_SIZE): Rename from MAX_GOT_ENTRIES.
8346 (get_got_entry): New.
8347 (elf64_alpha_check_relocs): Handle TLS relocs. Reorganize.
8348 (elf64_alpha_adjust_dynamic_symbol): Test LU_FUNC as a mask.
8349 (elf64_alpha_merge_ind_symbols): Check gotent->reloc_type.
8350 (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots): Likewise.
8351 (elf64_alpha_calc_got_offsets_for_symbol): Use alpha_got_entry_size.
8352 (elf64_alpha_calc_got_offsets): Likewise.
8353 (alpha_dynamic_entries_for_reloc): New.
8354 (elf64_alpha_calc_dynrel_sizes): Use it.
8355 (elf64_alpha_size_dynamic_sections): Likewise.
8356 (elf64_alpha_relocate_section): Handle TLS relocations.
8357 * reloc.c: Add Alpha TLS relocations.
8358 * bfd-in2.h, libbfd.h: Rebuild.
8359
8360 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
8361
8362 * peXXigen.c (pe_print_idata): Remove double printed
8363 import table lines; add Bound-To comment.
8364
8365 2002-05-29 Matt Thomas <matt@3am-software.com>
8366
8367 * Makefile.am (BFD32_BACKENDS): Add elf32-vax.lo.
8368 (BFD32_BACKENDS_CFILES): Add elf32-vax.c.
8369 (elf32-vax.lo): New rule.
8370 * Makefile.in: Regenerate.
8371 * configure.in (bfd_elf32_vax_vec)
8372 (vaxnetbsd_vec): New vectors.
8373 * configure: Regenerate.
8374 * config.bfd (vax-*-netbsdelf*)
8375 (vax-*-netbsdaout*)
8376 (vax-*-netbsd*): New targets.
8377 * elf32-vax.c: New file.
8378 * reloc.c: Add VAX relocations.
8379 * bfd-in2.h: Regenerate.
8380 * targets.c (_bfd_target_vector): Add bfd_elf32_vax_vec.
8381
8382 2002-05-29 Jason Thorpe <thorpej@wasabisystems.com>
8383
8384 * config.bfd (arm-*-netbsd*): Add bfd_elf32_littlearm_vec
8385 and bfd_elf32_bigarm_vec to targ_selvecs.
8386
8387 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
8388
8389 * peXXigen.c (pe_print_idata): Fix seg faults on printing import tables
8390 with auto-imported symbols.
8391
8392 2002-05-29 Adam Nemet <anemet@lnxw.com>
8393
8394 * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Don't add glue
8395 sections only record bfd.
8396 (bfd_elf32_arm_add_glue_sections_to_bfd): New function.
8397 * bfd-in.h (bfd_elf32_arm_add_glue_sections_to_bfd): Declare it.
8398 * bfd-in2.h: Regenerate.
8399
8400 2002-05-28 Nick Clifton <nickc@cambridge.redhat.com>
8401
8402 * syms.c (_bfd_stab_section_find_nearest_line): Move
8403 declaration and initialisation of saw_line and saw_func out of
8404 for loop.
8405
8406 2002-05-29 Alan Modra <amodra@bigpond.net.au>
8407
8408 * elf64-ppc.c (ppc64_elf_get_symbol_info): New function.
8409 (bfd_elf64_get_symbol_info): Define.
8410 * elfxx-target.h (bfd_elfNN_get_symbol_info): Only define if undef.
8411
8412 2002-05-29 Andrey Volkov <avolkov@transas.com>
8413
8414 * cpu-h8300.c: Make default h8300 machine first in machine list.
8415
8416 2002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net>
8417
8418 * config.bfd: Added DLX configuraton.
8419 * Makefile.am: Added DLX configuraton.
8420 * configure.in: Added DLX configuraton.
8421 * archures.c: Add DLX architecure.
8422 * reloc.c: Add DLX relocs.
8423 * targets.c: Added DLX target vector.
8424 * configure: Regenerate.
8425 * Makefile.in: Regenreate.
8426 * bfd-in2.h: Regenreate.
8427 * elf32-dlx.c: New file: Support DLX target.
8428 * cpu-dlx.c: New file: Support DLX target.
8429
8430 2002-05-25 Alan Modra <amodra@bigpond.net.au>
8431
8432 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Formatting.
8433
8434 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Revert last change.
8435 (ppc64_elf_check_relocs): Don't set up function descriptor symbol
8436 strings to point inside function code sym string.
8437 (func_desc_adjust): Likewise.
8438 (ppc64_elf_hide_symbol): Rewrite code to look up function code sym.
8439
8440 2002-05-24 Michal Ludvig <mludvig@suse.cz>
8441
8442 * elf64-x86-64.c (elf64_x86_64_grok_prstatus): Added.
8443 (elf64_x86_64_grok_psinfo): Added.
8444
8445 2002-05-24 TAMURA Kent <kent@netbsd.org>
8446
8447 * config.bfd: Add a target for i386-netbsdpe.
8448
8449 2002-05-24 Alan Modra <amodra@bigpond.net.au>
8450
8451 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy is_func
8452 and is_func_descriptor.
8453 (func_desc_adjust): Hide function code sym in shared libs unless
8454 there is a matching exported function descriptor sym.
8455
8456 2002-05-23 Jakub Jelinek <jakub@redhat.com>
8457
8458 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_THREAD_LOCAL
8459 for symbols from SHF_TLS section.
8460 (_bfd_elf_print_private_bfd_data): Add PT_TLS.
8461 (elf_fake_sections): Set SHF_TLS for SEC_THREAD_LOCAL sections.
8462 (map_sections_to_segments): Build PT_TLS segment if necessary.
8463 (assign_file_positions_for_segments): Likewise.
8464 (get_program_header_size): Account for PT_TLS segment.
8465 (swap_out_syms): Set type of BSF_THREAD_LOCAL symbols and symbols from
8466 SEC_THREAD_LOCAL sections to STT_TLS.
8467 * reloc.c: Add 386 and IA-64 TLS relocs.
8468 * section.c (SEC_THREAD_LOCAL): Define.
8469 (SEC_CONSTRUCTOR_TEXT, SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS):
8470 Remove.
8471 * elflink.h (elf_link_add_object_symbols): Support .tcommon.
8472 (size_dynamic_sections): If DF_STATIC_TLS, set DF_FLAGS
8473 unconditionally.
8474 (struct elf_final_link_info): Add first_tls_sec.
8475 (elf_bfd_final_link): Set first_tls_sec.
8476 Compute elf_hash_table (info)->tls_segment.
8477 (elf_link_output_extsym): Handle STT_TLS symbols.
8478 (elf_link_input_bfd): Likewise.
8479 * syms.c (BSF_THREAD_LOCAL): Define.
8480 * bfd-in2.h: Rebuilt.
8481 * libbfd.h: Rebuilt.
8482 * elf32-i386.c (elf_i386_tls_transition, dtpoff_base, tpoff,
8483 elf_i386_mkobject, elf_i386_object_p): New functions.
8484 (elf_howto_table): Add TLS relocs.
8485 (elf_i386_reloc_type_lookup): Support TLS relocs.
8486 (elf_i386_info_to_howto_rel): Likewise.
8487 (struct elf_i386_link_hash_entry): Add tls_type.
8488 (struct elf_i386_obj_tdata): New.
8489 (elf_i386_hash_entry, elf_i386_tdata, elf_i386_local_got_tls_type):
8490 New macros.
8491 (struct elf_i386_link_hash_table): Add tls_ldm_got.
8492 (link_hash_newfunc): Clear tls_type.
8493 (elf_i386_check_relocs): Support TLS relocs.
8494 (elf_i386_gc_sweep_hook): Likewise.
8495 (allocate_dynrelocs): Likewise.
8496 (elf_i386_size_dynamic_sections): Likewise.
8497 (elf_i386_relocate_section): Likewise.
8498 (elf_i386_finish_dynamic_symbol): Likewise.
8499 (bfd_elf32_mkobject, elf_backend_object_p): Define.
8500 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add tprel_offset,
8501 dtpmod_offset, dtprel_offset, tprel_done, dtpmod_done, dtprel_done,
8502 want_tprel, want_dtpmod, want_dtprel.
8503 (elfNN_ia64_tprel_base, elfNN_ia64_dtprel_base): New functions.
8504 (ia64_howto_table): Add TLS relocs, rename R_IA64_LTOFF_TP22 to
8505 R_IA64_LTOFF_TPREL22.
8506 (elf_code_to_howto_index): Add TLS relocs.
8507 (elfNN_ia64_check_relocs): Support TLS relocs.
8508 (allocate_global_data_got): Account for TLS .got data.
8509 (allocate_dynrel_entries): Account for TLS dynamic relocations.
8510 (elfNN_ia64_install_value): Supprt TLS relocs.
8511 (set_got_entry): Support TLS relocs.
8512 (elfNN_ia64_relocate_section): Likewise.
8513
8514 2002-05-23 Nick Clifton <nickc@cambridge.redhat.com>
8515
8516 * elf32-arm.h (elf32_arm_final_link_relocate): For the Thumb
8517 BLX reloc round the relocation up rather than down.
8518 * coff-arm.c (coff_arm_relocate_section): Likewise.
8519
8520 2002-05-21 H.J. Lu (hjl@gnu.org)
8521
8522 * linker.c (_bfd_generic_link_add_one_symbol): Allow multiple
8523 definition.
8524
8525 2002-05-22 Alan Modra <amodra@bigpond.net.au>
8526
8527 * elf64-ppc.c (ppc64_elf_size_stubs): Don't strip .branch_lt.
8528 (ppc64_elf_relocate_section): Handle unresolved relocs in opd.
8529
8530 2002-05-22 Alan Modra <amodra@bigpond.net.au>
8531
8532 * elf64-ppc.c (ppc64_elf_relocate_section): Return false for
8533 unresolved relocs.
8534 (ppc64_elf_size_dynamic_sections): Check for splt NULL.
8535
8536 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8537
8538 * bfd.c (bfd_get_arch_size): Remove bfd_set_error call for
8539 non-ELF targets.
8540
8541 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8542
8543 * elf-bfd.h (elf_backend_emit_relocs): Change prototype to return
8544 an error value.
8545 * elflink.h (elf_link_output_relocs): Likewise. Improve error message.
8546 return with false on error.
8547 (elf_link_input_bfd): Check reloc_emitter return value.
8548
8549 2002-05-21 Jason Thorpe <thorpej@wasabisystems.com>
8550
8551 * config.bfd (armeb-*-netbsdelf*): New target.
8552
8553 2002-05-20 Alan Modra <amodra@bigpond.net.au>
8554
8555 * elf64-ppc.c (ppc_build_one_stub): Point undefined function syms
8556 at the plt call stub.
8557
8558 2002-05-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8559
8560 * cpu-mips.c (mips_compatible): Don't try to check machine
8561 compatibility.
8562
8563 2002-05-18 Tom Rix <trix@redhat.com>
8564
8565 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_out): Fix C_FILE auxent.
8566
8567 2002-05-17 Alan Modra <amodra@bigpond.net.au>
8568
8569 * elf64-ppc.c (ppc64_elf_info_to_howto): Formatting.
8570 (ppc64_elf_relocate_section): Don't warn about reloc overflow when
8571 we've already warned about an undefined symbol. Report more
8572 detail on reloc errors.
8573
8574 2002-05-17 Alan Modra <amodra@bigpond.net.au>
8575
8576 * acinclude.m4 (AM_INSTALL_LIBBFD): New.
8577 * configure.in: Invoke AM_INSTALL_LIBBFD.
8578 * Makefile.am (install-data-local): Revert 2002-05-13. Move to..
8579 (install_libbfd): .. New target.
8580 (uninstall_libbfd): Likewise.
8581 (install-bfdlibLTLIBRARIES): Likewise.
8582 (uninstall-bfdlibLTLIBRARIES): Likewise.
8583 (bfdlibdir): New.
8584 (bfdincludedir): New.
8585 (lib_LTLIBRARIES): Rename to bfdlib_LTLIBRARIES.
8586 * aclocal.m4: Regenerate.
8587 * configure: Regenerate.
8588 * Makefile.in: Regenerate.
8589
8590 2002-05-17 Stuart Balfour <sbalfour@cisco.com>
8591
8592 * hash.c (bfd_hash_lookup): Remove computation of len from inside
8593 hash loop.
8594
8595 2002-05-16 Nick Clifton <nickc@cambridge.redhat.com>
8596
8597 * config.bfd: Add targets for sh64-linux (little endian and
8598 big endian).
8599
8600 2002-05-15 Laurent Pinchart <laurent.pinchart@skynet.be>
8601
8602 * peXXigen.c (pe_print_idata): Do not assume that the first thunk
8603 is located in the same section as the import table. Instead
8604 check, and if necessary load the section containing the thunk.
8605
8606 2002-05-15 Nick Clifton <nickc@cambridge.redhat.com>
8607
8608 * aix5ppc-core.c (xcoff64_core_p): Replace bfd_read with
8609 bfd_bread.
8610 (xcoff64_core_file_matches_executable_p): Replace bfd_read
8611 with bfd_bread.
8612
8613 2002-05-15 Alan Modra <amodra@bigpond.net.au>
8614
8615 * aix5ppc-core.c: Warning fixes.
8616 * aout-adobe.c (aout_32_bfd_link_just_syms): Define.
8617 * aout-target.h (MY_bfd_link_just_syms): Define.
8618 * aout-tic30.c (MY_bfd_link_just_syms): Define.
8619 * bfd.c (bfd_link_just_syms): Define.
8620 * binary.c (binary_bfd_link_just_syms): Define.
8621 * bout.c (b_out_bfd_link_just_syms): Define.
8622 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update initializer.
8623 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
8624 * coffcode.h (coff_bfd_link_just_syms): Define.
8625 * elf-bfd.h (enum elf_link_info_type): Add ELF_INFO_TYPE_JUST_SYMS.
8626 (elf_discarded_section): Check for ELF_INFO_TYPE_JUST_SYMS.
8627 (_bfd_elf_link_just_syms): Declare.
8628 * elf.c (_bfd_elf_link_just_syms): New function.
8629 * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Check that
8630 sections haven't already been discarded by the linker.
8631 * elflink.h (elf_link_add_object_symbols): Likewise for stab
8632 sections and SEC_MERGE sections.
8633 (elf_bfd_discard_info): Similarly here.
8634 * elfxx-target.h (bfd_elfNN_bfd_link_just_syms): Define.
8635 * i386msdos.c (msdos_bfd_link_just_syms): Define.
8636 * i386os9k.c (os9k_bfd_link_just_syms): Define.
8637 * ieee.c (ieee_bfd_link_just_syms): Define.
8638 * ihex.c (ihex_bfd_link_just_syms): Define.
8639 * libbfd-in.h (_bfd_nolink_bfd_link_just_syms): Define.
8640 (_bfd_generic_link_just_syms): Declare.
8641 * libecoff.h (_bfd_ecoff_bfd_link_just_syms): Define.
8642 * linker.c (_bfd_generic_link_just_syms): New function.
8643 * mmo.c (mmo_bfd_link_just_syms): Define.
8644 * nlm-target.h (nlm_bfd_link_just_syms): Define.
8645 * oasys.c (oasys_bfd_link_just_syms): Define.
8646 * ppcboot.c (ppcboot_bfd_link_just_syms): Define.
8647 * som.c (som_bfd_link_just_syms): Define.
8648 * srec.c (srec_bfd_link_just_syms): Define.
8649 * targets.c (struct bfd_target): Add _bfd_link_just_syms.
8650 (BFD_JUMP_TABLE_LINK): And here.
8651 * tekhex.c (tekhex_bfd_link_just_syms): Define.
8652 * versados.c (versados_bfd_link_just_syms): Define.
8653 * vms.c (vms_bfd_link_just_syms): Define.
8654 * libbfd.h: Regenerate.
8655 * bfd-in2.h: Regenerate.
8656
8657 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8658
8659 * elf32-mips.c: Remove superfluous definitions copied from
8660 elfxx-mips.c.
8661 (bfd_elf32_bigmips_vec,bfd_elf32_littlemips_vec): Use the
8662 SGIish vectors to check the special case.
8663 (mips_elf_hi16_reloc): Fix comment.
8664 (mips_elf_got16_reloc): Likewise.
8665 (_bfd_mips_elf32_gprel16_reloc): Likewise.
8666 (elf_reloc_map): Code cleanup.
8667 (mips_reloc_map): Add comment.
8668 (bfd_elf23_bfd_reloc_type_lookup): Code cleanup.
8669 (mips_elf32_rtype_to_howto): Likewise.
8670 (mips_elf32_discard_info): Likewise.
8671 (elf32_mips_irix_compat): Invert logic: Only SGIish vectors
8672 lead to IRIX compatibility now.
8673
8674 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8675
8676 * elfxx-mips.c: Call it IRIX, not Irix in comments.
8677
8678 2002-05-13 Jason Thorpe <thorpej@wasabisystems.com>
8679
8680 * config.bfd (shle-*-netbsdelf*): Add target which includes
8681 sh64 support.
8682
8683 2002-05-13 David Edelsohn <edelsohn@gnu.org>
8684
8685 * configure.in: Revert 2002-04-07. Instead, auto-configure
8686 HAVE_ST_C_IMPL.
8687 * configure: Regenerate.
8688 * config.in: Regenerate.
8689 * rs6000-core.c (CNEW_IMPL): Guard use of c_impl with HAVE_ST_C_IMPL
8690 or AIX_5_CORE.
8691
8692 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
8693
8694 * configure.in (sparc*-*-openbsd*): Support sparc64-openbsd
8695 corefiles as well.2
8696 * configure: Regenerate.
8697
8698 2002-05-13 Alan Modra <amodra@bigpond.net.au>
8699
8700 * Makefile.am (install-data-local): Install headers to
8701 $(exec_prefix)/include.
8702 * Makefile.in: Regenerate.
8703
8704 2002-05-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
8705 Daniel Jacobowitz <drow@mvista.com>
8706
8707 * coff-sh.c (sh_reloc_map): Map to R_SH_IMM32 for non-PE. Don't
8708 map BFD_RELOC_RVA.
8709
8710 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
8711
8712 * config.bfd (alpha*-*-openbsd*, sparc64*-*-openbsd*,
8713 hppa*-*-openbsd*): New targets.
8714 * configure.in (alpha*-*-openbsd*): Set COREFILE.
8715 * configure: Regenerate.
8716
8717 2002-05-10 Tom Rix <trix@redhat.com>
8718
8719 * coff64-rs6000.c (xcoff64_reloc_type_br): New function for
8720 xcoff64_ppc_relocate_section.
8721 * coff-rs6000.c : Extern common xcoff_reloc_type functions.
8722 * libxcoff.h: Common xcoff_reloc_type function declaration.
8723
8724 2002-05-10 Alan Modra <amodra@bigpond.net.au>
8725
8726 * elf32-i386.c (elf_i386_relocate_section): Remove overflow checks
8727 added in 2002-05-09 commit.
8728
8729 * elf32-hppa.c (elf32_hppa_size_stubs): Revert part of 2002-05-04,
8730 don't look for stubs on all undefined syms.
8731
8732 2002-05-09 Alan Modra <amodra@bigpond.net.au>
8733
8734 * elf64-ppc.c (RA_REGISTER_MASK, RA_REGISTER_SHIFT): Delete.
8735 (ppc64_elf_howto_raw <R_PPC64_RELATIVE>): Not pc_relative or
8736 pcrel_offset.
8737
8738 * elf32-i386.c (elf_howto_table): Comments.
8739 (elf_i386_relocate_section): Handle more relocs for relocatable
8740 linking and against SEC_MERGE sections.
8741
8742 2002-05-08 Alan Modra <amodra@bigpond.net.au>
8743
8744 * elf32-ppc.c (ppc_elf_create_got): New function.
8745 (ppc_elf_create_dynamic_sections): Call ppc_elf_create_got before
8746 _bfd_elf_create_dynamic_sections. Correct .plt flags.
8747 (ppc_elf_check_relocs): Use ppc_elf_create_got in place of
8748 _bfd_elf_create_got_section.
8749
8750 2002-05-07 Alan Modra <amodra@bigpond.net.au>
8751
8752 * elf-bfd.h (struct elf_backend_data): Add rela_normal.
8753 * elfxx-target.h (elf_backend_rela_normal): Define.
8754 (elfNN_bed): Init rela_normal.
8755 * elflink.h (elf_link_input_bfd <emit_relocs>): Handle adjustment
8756 for section symbols here if rela_normal. Simplify abs section test.
8757 * elf-m10200.c (mn10200_elf_relocate_section): If relocatable,
8758 return immediately. Remove code handling relocatable linking.
8759 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
8760 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
8761 * elf32-i370.c (i370_elf_relocate_section): Likewise.
8762 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
8763 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
8764 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
8765 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
8766 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
8767 * elf32-s390.c (elf_s390_relocate_section): Likewise.
8768 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
8769 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
8770 * elf64-s390.c (elf_s390_relocate_section): Likewise.
8771 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
8772 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
8773 * elf32-arm.h (elf32_arm_relocate_section): Likewise #ifndef USE_REL.
8774 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
8775 * elf-m10200.c (elf_backend_rela_normal): Define.
8776 * elf-m10300.c (elf_backend_rela_normal): Define.
8777 * elf32-fr30.c (elf_backend_rela_normal): Define.
8778 * elf32-i370.c (elf_backend_rela_normal): Define.
8779 * elf32-i860.c (elf_backend_rela_normal): Define.
8780 * elf32-m68k.c (elf_backend_rela_normal): Define.
8781 * elf32-mcore.c (elf_backend_rela_normal): Define.
8782 * elf32-openrisc.c (elf_backend_rela_normal): Define.
8783 * elf32-ppc.c (elf_backend_rela_normal): Define.
8784 * elf32-s390.c (elf_backend_rela_normal): Define.
8785 * elf32-xstormy16.c (elf_backend_rela_normal): Define.
8786 * elf64-ppc.c (elf_backend_rela_normal): Define.
8787 * elf64-s390.c (elf_backend_rela_normal): Define.
8788 * elf64-x86-64.c (elf_backend_rela_normal): Define.
8789 * elfxx-ia64.c (elf_backend_rela_normal): Define.
8790 * elf32-arm.h (elf_backend_rela_normal): Define #ifndef USE_REL.
8791 * elf32-m32r.c (elf_backend_rela_normal): Likewise.
8792
8793 2002-05-06 Nick Clifton <nickc@cambridge.redhat.com>
8794
8795 * elf32-arm.h (elf32_arm_final_link_relocate): Convert
8796 'reloc_signed_max' and 'reloc_signed_min' into half-word offsets.
8797
8798 2002-05-06 Alan Modra <amodra@bigpond.net.au>
8799
8800 * elflink.h (elf_link_input_bfd <emit_relocs>): Adjust r_offset
8801 when not relocatable. Fix reloc_emitter call for K&R.
8802
8803 2002-05-04 Alan Modra <amodra@bigpond.net.au>
8804
8805 * elf64-ppc.c (ppc64_elf_relocate_section): Reinstate code
8806 reloading local sym addend mistakenly removed in 2002-05-01 change.
8807
8808 * dwarf2.c (struct line_head): Make prologue_length a bfd_vma.
8809 (read_abbrevs): Change "offset" param to bfd_vma.
8810 (parse_comp_unit): Change "version" and addr_size to unsigned ints.
8811 Change "abbrev_offset" to bfd_vma.
8812 (read_indirect_string): Use correct conversion chars in error
8813 message format string, cast bfd_vma's to unsigned long.
8814 (read_abbrevs): Likewise.
8815 (read_attribute_value): Likewise.
8816 (decode_line_info): Likewise.
8817 (scan_unit_for_functions): Likewise.
8818 (parse_comp_unit): Likewise.
8819
8820 2002-05-04 Tom Rix <trix@redhat.com>
8821
8822 * coffswap.h (coff_swap_reloc_in): Remove XCOFF support.
8823 (coff_swap_reloc_out): Same.
8824 * coff-rs6000.c: (xcoff_swap_reloc_in): Moved from coffswap.h.
8825 (xcoff_swap_reloc_out): Same.
8826 (xcoff_rtype2howto): Renamed from _bfd_xcoff_rtype2howto. Special
8827 case some 16 bit relocs. Add reloc value to output.
8828 (xcoff_howto_table): Remove 64 bit R_POS, add 16 bit
8829 R_RBR. Improve names.
8830 (_bfd_xcoff_reloc_type_lookup): Adjust for removal of 64 bit R_POS.
8831 (bfd_xcoff_backend_data): Update with new reloc swap names.
8832 (bfd_pmac_xcoff_backend_data) : Same.
8833 * coff64-rs6000.c: (xcoff64_swap_reloc_in): Moved from coffswap.h.
8834 (xcoff64_swap_reloc_out): Same.
8835 (xcoff64_rtype2howto): Special case some 16 bit relocs and 32 bit
8836 R_POS. Add reloc value to output.
8837 (xcoff64_howto_table): Move 64 bit R_POS to first entry. Add 16
8838 bit R_RBR. Improve names, masks.
8839 (xcoff64_reloc_type_lookup): Adjust for move of 64 bit R_POS.
8840 (bfd_xcoff_backend_data): Update with new reloc swap names.
8841 (bfd_xcoff_aix5_backend_data) : Same.
8842
8843 2002-05-04 Alan Modra <amodra@bigpond.net.au>
8844
8845 * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add
8846 bfd_count top_index, input_list, all_local_syms.
8847 (elf32_hppa_setup_section_lists): New function, split from
8848 elf32_hppa_size_stubs.
8849 (elf32_hppa_next_input_section): Likewise.
8850 (group_sections): Likewise.
8851 (get_local_syms): Likewise.
8852 (elf32_hppa_size_stubs): Adjust for split out functions. Look for
8853 stubs on undefined syms too.
8854 (elf32_hppa_set_gp): Use bfd_link_hash* instead of elf_link_hash*.
8855 Only access htab elf fields when we have an elf hash table.
8856 * elf32-hppa.h (elf32_hppa_setup_section_lists): Declare.
8857 (elf32_hppa_next_input_section): Declare.
8858
8859 2002-05-04 Bob Byrnes <byrnes@curl.com>
8860
8861 * opncls.c (_bfd_new_bfd_contained_in): Check return value of
8862 _bfd_new_bfd.
8863
8864 2002-05-03 H.J. Lu (hjl@gnu.org)
8865
8866 * elfxx-mips.c (mips_elf_link_hash_entry): Add forced_local.
8867 (mips_elf_link_hash_newfunc): Initialize forced_local to false.
8868 (mips_elf_record_global_got_symbol): Call _bfd_mips_elf_hide_symbol
8869 to hide a global symbol.
8870 (_bfd_mips_elf_hide_symbol): Return if forced_local is true. Set
8871 forced_local to true.
8872
8873 2002-05-02 Richard Henderson <rth@redhat.com>
8874
8875 * elf64-alpha.c (elf64_alpha_relocate_section): Force relative relocs
8876 vs SHN_UNDEF to zero.
8877
8878 2002-05-02 Alan Modra <amodra@bigpond.net.au>
8879
8880 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_SECTOFF>): Change to a
8881 16 bit reloc.
8882 <R_PPC64_SECTOFF_DS>: Likewise.
8883 (ppc64_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
8884 SECTOFF reloc.
8885 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_SECTOFF>): Correct.
8886 (ppc_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
8887 SECTOFF reloc.
8888
8889 * elf64-ppc.c (ppc64_elf_addr16_ha_reloc): Delete.
8890 (ppc64_elf_ha_reloc): New function.
8891 (ppc64_elf_brtaken_reloc): New function.
8892 (ppc64_elf_sectoff_reloc): New function.
8893 (ppc64_elf_sectoff_ha_reloc): New function.
8894 (ppc64_elf_toc_reloc): New function.
8895 (ppc64_elf_toc_ha_reloc): New function.
8896 (ppc64_elf_toc64_reloc): New function.
8897 (ppc64_elf_unhandled_reloc): New function.
8898 (ppc64_elf_howto_raw): Use the above.
8899 <R_PPC64_RELATIVE>: Mark pc_relative, pcrel_offset.
8900 <R_PPC64_SECTOFF>: Not pc_relative or pcrel_offset. Fix dst_mask.
8901 <R_PPC64_SECTOFF_DS>: Likewise.
8902 (IS_ABSOLUTE_RELOC): Update.
8903 (struct ppc_link_hash_table): Add have_undefweak.
8904 (ppc64_elf_link_hash_table_create): Init.
8905 (func_desc_adjust): Set have_undefweak.
8906 (ppc64_elf_func_desc_adjust): Call func_desc_adjust earlier. Only
8907 add the .sfpr blr when have_undefweak.
8908 (ppc64_elf_setup_section_lists): Check hash table flavour.
8909 (ppc64_elf_next_input_section): Move output_section->owner test to
8910 ppc64elf.em.
8911 (ppc64_elf_set_toc): Rename to ppc64_elf_toc, remove info param
8912 and relocatable test. Return TOCstart and don't set elf_gp.
8913 (ppc64_elf_relocate_section): Correct BRTAKEN/BRNTAKEN branch
8914 offset calculation. Add assert on weak sym branch tweaks.
8915 * elf64-ppc.h (ppc64_elf_set_toc): Delete.
8916 (ppc64_elf_toc): Declare.
8917 (ppc64_elf_next_input_section): Update.
8918
8919 2002-05-01 Alan Modra <amodra@bigpond.net.au>
8920
8921 * syms.c (_bfd_stab_section_find_nearest_line): Don't bomb on NULL
8922 file_name.
8923
8924 2002-05-01 Alan Modra <amodra@bigpond.net.au>
8925
8926 * elf64-ppc.c (CROR_151515, CROR_313131): Define.
8927 (ppc64_elf_relocate_section): Use them. Don't look for plt calls
8928 on R_PPC64_ADDR24 relocs. Require a nop or no link reg on plt
8929 call branches. Correct undefined weak destination.
8930 (ppc64_elf_func_desc_adjust): Always create at least one blr in
8931 .sfpr, and correct case where either only savef* or restf* is
8932 needed.
8933
8934 Long branch stubs, multiple stub sections.
8935 * elf64-ppc.h (ppc64_elf_setup_section_lists): Declare.
8936 (ppc64_elf_next_input_section): Declare.
8937 * elf64-ppc.c: Move linker-only prototypes.
8938 (STUB_SUFFIX): Define.
8939 (enum ppc_stub_type): New.
8940 (struct ppc_stub_hash_entry): New.
8941 (struct ppc_branch_hash_entry): New.
8942 (struct ppc_link_hash_entry): Add stub_cache, oh.
8943 (struct ppc_link_hash_table): Add stub_hash_table etc. Remove
8944 sstub. Add sbrlt, srelbrlt, has_14bit_branch, stub_iteration.
8945 Rename plt_overflow to stub_error.
8946 (ppc_stub_hash_lookup): Define.
8947 (ppc_branch_hash_lookup): Define.
8948 (stub_hash_newfunc): New function.
8949 (branch_hash_newfunc): New function.
8950 (link_hash_newfunc): Init new fields.
8951 (ppc64_elf_link_hash_table_create): Likewise.
8952 (ppc64_elf_link_hash_table_free): New function.
8953 (ppc_stub_name): New function.
8954 (ppc_get_stub_entry): New function.
8955 (ppc_add_stub): New function.
8956 (create_linkage_sections): Use bfd_make_section_anyway. Create
8957 .branch_lt and .rela.branch_lt sections. Don't create .stub.
8958 (ppc64_elf_check_relocs): Set has_14bit_branch on R_PPC64_REL14*,
8959 and set up for plt call stubs. Link func and func desc syms.
8960 (ppc64_elf_gc_sweep_hook): Handle REL14* as per REL24.
8961 (func_desc_adjust): Avoid hash lookup when func desc sym available
8962 via shortcut, and set links when processing.
8963 (ppc64_elf_hide_symbol): Likewise.
8964 (allocate_dynrelocs): Don't allocate stub section here.
8965 (ppc64_elf_size_dynamic_sections): Handle sbrlt and srelbrlt.
8966 Remove sstub code.
8967 (ppc_type_of_stub): New function.
8968 (build_one_stub): Delete.
8969 (ppc_build_one_stub): New function.
8970 (ppc_size_one_stub): New function.
8971 (ppc64_elf_setup_section_lists): New function.
8972 (ppc64_elf_next_input_section): New function.
8973 (group_sections): New function.
8974 (get_local_syms): New function.
8975 (ppc64_elf_size_stubs): Rewrite.
8976 (ppc64_elf_build_stubs): Rewrite.
8977 (ppc64_elf_relocate_section): Look up stub entry for REL24
8978 relocs. Don't propagate REL14* to dynamic objects. Look for long
8979 branch stubs if REL14* or REL24 relocs won't reach.
8980 (bfd_elf64_bfd_link_hash_table_free): Define.
8981
8982 2002-04-30 Mark Mitchell <mark@codesourcery.com>
8983
8984 * config.bfd: Add support for powerpc-*-windiss.
8985
8986 2002-04-30 Tom Rix <trix@redhat.com>
8987
8988 * xcofflink.c (xcoff_link_add_symbols): Always copy undef C_EXT
8989 symbol names into the hash table.
8990
8991 2002-04-28 Tom Rix <trix@redhat.com>
8992
8993 * coff-rs6000.c (xcoff_calculate_relocation) : Function table for
8994 calulating relocations.
8995 (xcoff_complain_overflow) : Function table for relocation errors.
8996 (xcoff_ppc_relocate_section): Use relocation and complain function
8997 tables.
8998 (xcoff_complain_overflow_unsigned_func): New complain function.
8999 (xcoff_complain_overflow_signed_func): Same.
9000 (xcoff_complain_overflow_bitfield_func): Same.
9001 (xcoff_complain_overflow_dont_func): Same.
9002 (xcoff_reloc_type_crel): New recot function.
9003 (xcoff_reloc_type_br): Same.
9004 (xcoff_reloc_type_ba): Same.
9005 (xcoff_reloc_type_toc): Same.
9006 (xcoff_reloc_type_rel): Same.
9007 (xcoff_reloc_type_neg): Same.
9008 (xcoff_reloc_type_pos): Same.
9009 (xcoff_reloc_type_fail): Same.
9010 (xcoff_reloc_type_noop): Same.
9011 * libxcoff.h : Declare common parts for xcoff64.
9012 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Use relocation
9013 and complain function tables.
9014
9015 2002-04-28 Alan Modra <amodra@bigpond.net.au>
9016
9017 * elf64-x86-64.c (struct elf64_x86_64_dyn_relocs): Comment typo.
9018 * elf32-hppa.c (elf32_hppa_final_link): Formatting.
9019
9020 2002-04-26 Alan Modra <amodra@bigpond.net.au>
9021
9022 * opncls.c (bfd_make_readable): Call bfd_section_list_clear.
9023 * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
9024
9025 * elflink.h (elf_bfd_final_link): Ensure input bfd class is the
9026 same as the output before calling elf_link_input_bfd.
9027
9028 * coffcode.h (coff_compute_section_file_positions): Set
9029 section_tail after shuffling section list.
9030
9031 2002-04-24 Christian Groessler <chris@groessler.org>
9032
9033 * coff-z8k.c (extra_case): Fix R_IMM32 relocations: The
9034 addresses are 23bit with a special layout, not plain 32bit
9035 values. Prevent relocation of immediate values.
9036
9037 2002-04-24 Chris G. Demetriou <cgd@broadcom.com>
9038
9039 * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): If MDMX or
9040 MIPS-16 ASE flags are set, print something to indicate that.
9041
9042 2002-04-23 Alan Modra <amodra@bigpond.net.au>
9043
9044 * elf32-hppa.c (hppa_type_of_stub): Correct and simplify condition
9045 under which a plt call stub is used.
9046 (final_link_relocate): Similarly.
9047 (allocate_plt_static): Clear h-plabel except when plt entry is
9048 exclusively used for a plabel.
9049 (allocate_dynrelocs): Use the above to simplify plt sizing.
9050 (struct elf32_hppa_link_hash_table): Add has_22bit_branch.
9051 (elf32_hppa_link_hash_table_create): Init.
9052 (BL22_RP): Define.
9053 (hppa_build_one_stub): Use BL22_RP if has_22bit_branch.
9054 (elf32_hppa_check_relocs): Set has_22bit_branch.
9055
9056 * elf32-hppa.c (elf32_hppa_check_relocs): Remove debug message.
9057 (final_link_relocate): Likewise.
9058
9059 2002-04-22 Jakub Jelinek <jakub@redhat.com>
9060
9061 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't build
9062 search table if some FDE is DW_EH_PE_aligned encoded either.
9063 (_bfd_elf_write_section_eh_frame): Handle terminating FDE specially.
9064
9065 2002-04-22 Richard Smith <richard@ex-parrot.com>
9066 Jakub Jelinek <jakub@redhat.com>
9067
9068 * elf-eh-frame.c (struct eh_cie_fde): Add per_encoding_relative.
9069 (_bfd_elf_discard_section_eh_frame): Set it for CIEs with pcrel
9070 encoded personality.
9071 (_bfd_elf_write_section_eh_frame): Adjust pcrel encoded personality
9072 for CIE/FDE removal.
9073
9074 2002-04-20 Tom Rix <trix@redhat.com>
9075
9076 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Fix C_FILE auxent.
9077
9078 2002-04-20 Alan Modra <amodra@bigpond.net.au>
9079
9080 * archures.c (bfd_lookup_arch): Move the list order comment..
9081 (struct bfd_arch_info): ..to where it belongs.
9082 * bfd-in2.h: Regenerate.
9083
9084 * archures.c (bfd_lookup_arch): Add comment on list order.
9085 (bfd_default_set_arch_mach): Use bfd_lookup_arch.
9086 * cpu-powerpc.c (bfd_powerpc_archs): Re-order so that the default
9087 is always at head of list.
9088
9089 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
9090
9091 * coff-arm.c (coff_thumb_pcrel_12, coff_thumb_pcrel_9,
9092 insert_thumb_branch, record_thumb_to_arm_glue): Suppress
9093 definition of these functions for ARM_WINCE builds as they are
9094 not used.
9095 (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET): Do not define
9096 for ARM_WINCE builds.
9097
9098 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
9099
9100 * coff-arm.c (bfd_arm_process_before_allocation):
9101
9102 2002-04-17 J"orn Rennecke <joern.rennecke@superh.com>
9103
9104 * cpu-sh.c (scan_mach): Delete.
9105 (arch_info_struct): Replace scan_mach with bfd_default_scan.
9106 (bfd_sh_arch): Likewise.
9107
9108 2002-04-16 Nick Clifton <nickc@cambridge.redhat.com>
9109
9110 * ihex.c (ihex_write_object_contents): Fix check for records
9111 crossing 64K boundaries.
9112
9113 2002-04-16 Alan Modra <amodra@bigpond.net.au>
9114
9115 * elf32-m32r.c (m32r_elf_add_symbol_hook): Check the hash table
9116 type rather than just assuming entries are ELF.
9117 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
9118 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
9119 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Likewise.
9120 * elf64-mmix.c (mmix_elf_add_symbol_hook): Use bfd_link_hash_entry
9121 rather than elf_link_hash_entry.
9122
9123 2002-04-15 Richard Henderson <rth@redhat.com>
9124
9125 * elf32-mips.c (mips_elf32_object_p): Revert 0404 fragment: allow
9126 n32 binaries.
9127
9128 2002-04-15 Michael Snyder <msnyder@redhat.com>
9129
9130 * opncls.c (bfd_close): Write contents if writeable.
9131 Minor formatting tidy-ups.
9132
9133 2002-04-15 Alan Modra <amodra@bigpond.net.au>
9134
9135 * elf32-ppc.c (ppc_elf_add_symbol_hook): Check the hash table type.
9136
9137 2002-04-12 Michael Snyder <msnyder@redhat.com>
9138
9139 * bfd-in.h (bfd_get_section_lma): New access macro.
9140 Minor white-space fix-up.
9141
9142 2002-04-12 Alan Modra <amodra@bigpond.net.au>
9143
9144 * elf.c (prep_headers): Don't zero EI_OSABI, EI_ABIVERSION or
9145 header pad.
9146
9147 2002-04-09 DJ Delorie <dj@redhat.com>
9148
9149 * elfarm-nabi.c (elf32_arm_howto_table): Fix ABS16 masks.
9150
9151 2002-04-09 Casper S. Hornstrup <chorns@users.sourceforge.net>
9152
9153 * coffcode.h (coff_read_word): New.
9154 (coff_compute_checksum): New.
9155 (coff_apply_checksum): New.
9156 (coff_write_object_contents): Call coff_apply_checksum () to
9157 apply checksum to PE image.
9158
9159 2002-04-08 Randolph Chung <tausq@debian.org>
9160
9161 * elf32-hppa.c (hppa_unwind_entry_compare): Move to elf-hppa.h.
9162 (elf32_hppa_final_link): Split out sorting logic to..
9163 * elf-hppa.h (elf_hppa_sort_unwind): ..here.
9164 (elf_hppa_final_link): Call elf_hppa_sort_unwind.
9165
9166 2002-04-07 Andrew Cagney <ac131313@redhat.com>
9167
9168 * configure.in: Add missing ``|'' to powerpc-*-aix4.[4-9]*
9169 pattern.
9170 * configure: Re-generate.
9171
9172 2002-04-07 Andrew Cagney <ac131313@redhat.com>
9173
9174 * configure.in: Only define AIX_CORE_DUMPX_CORE when AIX version
9175 is greater or equal to 4.3.3.
9176 * configure: Regenerate.
9177 Fix PR gdb/344.
9178
9179 2002-04-05 Hans-Peter Nilsson <hp@axis.com>
9180
9181 * elf32-cris.c (cris_elf_howto_table) <R_CRIS_16_PCREL,
9182 R_CRIS_32_PCREL>: Fix typo in name.
9183 (cris_elf_check_relocs): Always create .rela.got here when
9184 R_CRIS_16_GOTPLT or R_CRIS_32_GOTPLT is seen.
9185 (elf_cris_adjust_gotplt_to_got): Don't create .rela.got here;
9186 assume it's created.
9187
9188 2002-04-04 Daniel Jacobowitz <drow@mvista.com>
9189
9190 * aout-adobe.c (aout_32_bfd_link_hash_table_free): Define.
9191 * aout-target.h (MY_bfd_link_hash_table_free): Conditionally
9192 define.
9193 * aout-tic30.c (MY_bfd_link_hash_table_free): Likewise.
9194 * bfd.c (bfd_link_hash_table_free): Define.
9195 * binary.c (binary_bfd_link_hash_table_free): Define.
9196 * bout.c (b_out_bfd_link_hash_table_free): Define.
9197 * coff-rs6000.c (rs6000coff_vec): Include
9198 _bfd_generic_link_hash_table_free.
9199 (pmac_xcoff_vec): Likewise.
9200 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
9201 (aix5coff64_vec): Likewise.
9202 * coffcode.h (coff_bfd_link_hash_table_free): Conditionally define.
9203 * elf-m10300.c (elf32_mn10300_link_hash_table_free): New function.
9204 (bfd_elf32_bfd_link_hash_table_free): Define.
9205 * elf32-hppa.c (elf32_hppa_link_hash_table_free): New function.
9206 (bfd_elf32_bfd_link_hash_table_free): Define.
9207 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Conditionally
9208 define.
9209 * i386msdos.c (msdos_bfd_link_hash_table_free): Define.
9210 * i386os9k.c (os9k_bfd_link_hash_table_free): Define.
9211 * ieee.c (ieee_bfd_link_hash_table_free): Define.
9212 * ihex.c (ihex_bfd_link_hash_table_free): Define.
9213 * libbfd-in.h (_bfd_nolink_bfd_link_hash_table_free): Define.
9214 (_bfd_generic_link_hash_table_free): Add prototype.
9215 * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Add prototype.
9216 * libecoff.h (_bfd_ecoff_bfd_link_hash_table_free): Define.
9217 * linker.c (_bfd_generic_link_hash_table_free): New function.
9218 * mmo.c (mmo_bfd_link_hash_table_free): Define.
9219 * nlm-target.h (nlm_bfd_link_hash_table_free): Define.
9220 * oasys.c (oasys_bfd_link_hash_table_free): Define.
9221 * ppcboot.c (ppcboot_bfd_link_hash_table_free): Define.
9222 * som.c (som_bfd_link_hash_table_free): Define.
9223 * srec.c (srec_bfd_link_hash_table_free): Define.
9224 * tekhex.c (tekhex_bfd_link_hash_table_free): Define.
9225 * versados.c (versados_bfd_link_hash_table_free): Define.
9226 * vms.c (vms_bfd_link_hash_table_free): New function.
9227 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_free): New function.
9228
9229 * coff-arm.c (coff_arm_link_hash_table_create): Use bfd_malloc
9230 instead of bfd_alloc.
9231 * coff-h8300.c (h8300_coff_link_hash_table_create): Likewise.
9232 * coff-mcore.c (coff_mcore_link_hash_table_create): Likewise.
9233 * coff-ppc.c (ppc_coff_link_hash_table_create): Likewise.
9234 * cofflink.c (_bfd_coff_link_hash_table_create): Likewise.
9235 * ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
9236 * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise.
9237 * elf.c (_bfd_elf_link_hash_table_create): Likewise.
9238 * elf32-arm.h (elf32_arm_link_hash_table_create): Likewise.
9239 * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
9240 * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise.
9241 * elf32-i386.c (elf_i386_link_hash_table_create): Likewise.
9242 * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
9243 * elf32-s390.c (elf_s390_link_hash_table_create): Likewise.
9244 * elf32-sh.c (sh_elf_link_hash_table_create): Likewise.
9245 * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create): Likewise.
9246 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
9247 * elf64-s390.c (elf_s390_link_hash_table_create): Likewise.
9248 * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise.
9249 * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create): Likewise.
9250 * elf64-x86-64.c (elf64_x86_64_link_hash_table_create): Likewise.
9251 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
9252 * linker.c (_bfd_generic_link_hash_table_create): Likewise.
9253 * m68klinux.c (linux_link_hash_table_create): Likewise.
9254 * sparclinux.c (linux_link_hash_table_create): Likewise.
9255 * sunos.c (sunos_link_hash_table_create): Likewise.
9256 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise.
9257
9258 * targets.c: Add _bfd_link_hash_table_free to xvec.
9259
9260 * bfd-in2.h: Regenerate.
9261 * libbfd.h: Regenerate.
9262 * libcoff.h: Regenerate.
9263
9264 2002-04-04 Alan Modra <amodra@bigpond.net.au>
9265
9266 * dep-in.sed: Cope with absolute paths.
9267 * Makefile.am (dep.sed): Subst TOPDIR, and not INCDIR.
9268 Run "make dep-am".
9269 * Makefile.in: Regenerate.
9270 * coff-arm.c: Fix copyright date.
9271 * cpu-h8300.c: Likewise.
9272 * cpu-i370.c: Likewise.
9273 * cpu-s390.c: Likewise.
9274 * cpu-mips.c: Likewise.
9275 * po/SRC-POTFILES.in: Regenerate.
9276
9277 2002-04-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
9278
9279 * Makefile.am: Add elfxx-mips.c to the known backends.
9280 (elf32-mips.lo): remove dependency to coff/external.h.
9281 * Makefile.in: Regenerate.
9282 * configure.in: Add elfxx-mips.lo to all vectors using elf32-mips.lo
9283 Remove elf32-mips.lo from 64 bit vectors. Update dependencies
9284 accordingly.
9285 * configure: Regenerate.
9286 * elf-bfd.h: Move all MIPS ELF specific prototypes to elfxx-mips.h.
9287 (irix_compat_t): IRIX compatibility level, moved from elf32-mips.c.
9288 (elf_backend_mips_irix_compat, elf_backend_mips_rtype_to_howto): New
9289 MIPS specific backend functions.
9290 * elf32-mips.c: Moved most code to elfxx-mips.c.
9291 (mips_elf_hi16_reloc): Rename from _bfd_mips_elf_hi16_reloc and make
9292 static.
9293 (mips_elf_lo16_reloc): Likewise, was _bfd_mips_elf_lo16_reloc.
9294 (mips_elf_got16_reloc): Likewise, was _bfd_mips_elf_got16_reloc.
9295 (mips_elf_gprel32_reloc): Likewise, was _bfd_mips_elf_gprel32_reloc.
9296 (mips_elf32_rtype_to_howto): Rename from mips_rtype_to_howto. Changed
9297 interface to allow selection of the right REL or RELA howto table.
9298 (mips_elf32_object_p): Rename from _bfd_mips_elf_object_p and made
9299 static. Let it refuse n32 objects.
9300 (elf32_mips_grok_prstatus): Rename from _bfd_elf32_mips_grok_prstatus.
9301 (elf32_mips_grok_psinfo): Rename from _bfd_elf32_mips_grok_psinfo.
9302 (elf32_mips_discard_info): Rename from _bfd_elf32_mips_discard_info.
9303 (elf32_mips_ignore_discarded_relocs): Rename from
9304 _bfd_elf32_mips_ignore_discarded_relocs.
9305 (elf32_mips_write_section): Rename from _bfd_elf32_mips_write_section.
9306 (elf32_mips_irix_compat): New function, replaces IRIX_COMPAT.
9307 (elf_mips_howto_table_rela): Remove.
9308 * elf64-mips.c: Moved most code to elfxx-mips.c.
9309 (bfd_elf64_bfd_reloc_type_lookup): Make static.
9310 (mips_elf64_rtype_to_howto): New function.
9311 (mips_elf64_object_p): Likewise.
9312 (elf64_mips_irix_compat): Likewise.
9313 * elfxx-mips.c: New file containing common code merged together from
9314 elf32-mips.c and elf64-mips.c.
9315 * elfxx-mips.h: New file containing MIPS specific prototypes from
9316 elf-bfd.h.
9317 * elfxx-target.h: Add handling for elf_backend_mips_irix_compat and
9318 elf_backend_mips_rtype_to_howto.
9319
9320 2002-04-04 Alan Modra <amodra@bigpond.net.au>
9321
9322 * srec.c (MAXCHUNK, Chunk): Revise comments.
9323 (srec_write_record): Correct buffer size.
9324 (srec_write_header): Do without intermediate buffer.
9325 (srec_write_section): Validate Chunk.
9326 (srec_write_terminator): Pass NULL instead of dummy buffer.
9327 (srec_write_symbols): Pass file and symbol names directly to
9328 bfd_bwrite so sprintf won't overflow buffer.
9329
9330 2002-04-03 Jakub Jelinek <jakub@redhat.com>
9331
9332 * elf32-sparc.c (elf32_sparc_relocate_section): Don't emit dynamic
9333 PC relative relocs against hidden symbols.
9334 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
9335
9336 2002-04-03 Alan Modra <amodra@bigpond.net.au>
9337
9338 * elf.c (_bfd_elf_make_section_from_shdr): When setting section
9339 LMAs, loop over segments until p_vaddr and p_memsz specify an
9340 extent enclosing the section.
9341
9342 2002-04-02 Nick Clifton <nickc@cambridge.redhat.com>
9343
9344 * ihex.c (ihex_write_object_contents): Do not allow records to
9345 cross a 64K boundary - wrap if necessary.
9346
9347 2002-04-01 Nathan Williams <nathanw@wasabisystems.com>
9348
9349 * elf.c (elfcore_netbsd_get_lwpid): Fix off-by-one error
9350 which caused the returned LWP ID to always be 0.
9351
9352 2002-04-01 Richard Henderson <rth@redhat.com>
9353
9354 * elf32-sparc.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
9355 (elf32_sparc_relocate_section): Use it to figure out when to
9356 initialize .got entries.
9357 * elf64-sparc.c: Similarly.
9358
9359 2002-03-28 Alan Modra <amodra@bigpond.net.au>
9360
9361 * linker.c (link_action): Ignore duplicate warning syms.
9362 (_bfd_generic_link_write_global_symbol): Follow warning symbol link.
9363 * elflink.h (elf_adjust_dynstr_offsets): Likewise.
9364 (elf_adjust_dynamic_symbol): Likewise.
9365 (elf_export_symbol): Likewise.
9366 (elf_link_find_version_dependencies): Likewise.
9367 (elf_link_assign_sym_version): Likewise.
9368 (elf_link_sec_merge_syms): Likewise.
9369 (elf_link_output_extsym): Likewise.
9370 (elf_gc_sweep_symbol): Likewise.
9371 (elf_gc_propagate_vtable_entries_used): Likewise.
9372 (elf_gc_smash_unused_vtentry_relocs): Likewise.
9373 (elf_gc_allocate_got_offsets): Likewise.
9374 (elf_collect_hash_codes): Likewise.
9375 * elflink.c (elf_link_renumber_hash_table_dynsyms): Likewise.
9376 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
9377 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
9378 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
9379 * elf32-arm.h (elf32_arm_discard_copies): Likewise.
9380 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Likewise.
9381 (elf_cris_discard_excess_dso_dynamics): Likewise.
9382 * elf32-hppa.c (clobber_millicode_symbols): Likewise.
9383 (mark_PIC_calls): Likewise.
9384 (allocate_plt_static): Likewise.
9385 (allocate_dynrelocs): Likewise.
9386 (readonly_dynrelocs): Likewise.
9387 * elf32-i386.c (allocate_dynrelocs): Likewise.
9388 (readonly_dynrelocs): Likewise.
9389 * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
9390 * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
9391 * elf32-mips.c (mips_elf_output_extsym): Likewise.
9392 (mips_elf_sort_hash_table_f): Likewise.
9393 (mips_elf_check_mips16_stubs): Likewise.
9394 * elf32-s390.c (allocate_dynrelocs): Likewise.
9395 (readonly_dynrelocs): Likewise.
9396 * elf32-sh.c (sh_elf_discard_copies): Likewise.
9397 * elf32-xstormy16.c (xstormy16_relax_plt_check): Likewise.
9398 (xstormy16_relax_plt_realloc): Likewise.
9399 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
9400 (elf64_alpha_output_extsym): Likewise.
9401 * elf64-hppa.c (elf64_hppa_mark_exported_functions): Likewise.
9402 * elf64-mips.c (mips_elf64_sort_hash_table_f): Likewise.
9403 (mips_elf64_check_mips16_stubs): Likewise.
9404 (mips_elf64_output_extsym): Likewise.
9405 * elf64-ppc.c (func_desc_adjust): Likewise.
9406 (allocate_dynrelocs): Likewise.
9407 (readonly_dynrelocs): Likewise.
9408 * elf64-s390.c (allocate_dynrelocs): Likewise.
9409 (readonly_dynrelocs): Likewise.
9410 * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
9411 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
9412 (readonly_dynrelocs): Likewise.
9413 * elfxx-ia64.c (elfNN_ia64_global_dyn_sym_thunk): Likewise.
9414 * aoutx.h (aout_link_write_other_symbol): Likewise.
9415 * cofflink.c (_bfd_coff_write_task_globals): Likewise.
9416 (_bfd_coff_write_global_sym): Likewise.
9417 * i386linux.c (linux_tally_symbols): Likewise.
9418 * m68klinux.c (linux_tally_symbols): Likewise.
9419 * sparclinux.c (linux_tally_symbols): Likewise.
9420 * pdp11.c (aout_link_write_other_symbol): Likewise.
9421 * sunos.c (sunos_scan_dynamic_symbol): Likewise.
9422 * xcofflink.c (xcoff_build_ldsyms): Likewise.
9423 (xcoff_write_global_symbol): Likewise.
9424
9425 * cofflink.c (_bfd_coff_final_link): Formatting.
9426 * cpu-mips.c (mips_compatible): Make static, prototype.
9427 * elf32-i386.c (elf_i386_check_relocs): Formatting.
9428 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
9429 * elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
9430 * elf64-mips.c (mips_elf64_sort_hash_table): Likewise.
9431 (mips_elf64_final_link): Likewise.
9432 * elflink.h (elf_link_find_version_dependencies): Remove duplicate
9433 prototype.
9434
9435 2002-03-27 Nick Clifton <nickc@cambridge.redhat.com>
9436
9437 * coff-arm.c (SWAP_IN_RELOC_OFFSET): Define.
9438 (SWAP_OUT_RELOC_OFFSET): Define.
9439
9440 2002-03-27 Gregory Steuck <greg@nest.cx>
9441
9442 * elf.c (_bfd_elf_get_symtab_upper_bound): Leave space for
9443 terminating NULL if empty symbol table.
9444 (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise.
9445
9446 2002-03-26 H.J. Lu (hjl@gnu.org)
9447
9448 * elflink.h (elf_link_input_bfd): Revert the last change since
9449 the gcc exception handling isn't fixed yet.
9450
9451 2002-03-26 H.J. Lu (hjl@gnu.org)
9452
9453 * elflink.h (elf_link_input_bfd): Complain about relocations
9454 against local symbols in discarded sections.
9455
9456 2002-03-26 Alan Modra <amodra@bigpond.net.au>
9457
9458 * elflink.h (elf_gc_mark): Don't recurse into non-ELF sections.
9459
9460 2002-03-23 Alan Modra <amodra@bigpond.net.au>
9461
9462 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
9463 section file offset for !SEC_LOAD sections.
9464
9465 2002-03-21 Richard Earnshaw <rearnsha@arm.com>
9466
9467 * elf32-arm.h (elf32_arm_final_link_relocate <case R_ARM_GOTOFF>,
9468 <case R_ARM_GOT>): Handle relocations to Thumb functions.
9469
9470 2002-03-21 Alan Modra <amodra@bigpond.net.au>
9471
9472 * coff64-rs6000.c (_bfd_xcoff64_put_symbol_name): Prototype.
9473 Whitespace changes.
9474 * archive.c: Update copyright date.
9475 * bfd-in2.h: Regenerate.
9476 * libbfd.h: Regenerate.
9477 * Makefile.am: Run "make dep-am"
9478 * Makefile.in: Regenerate.
9479 * po/SRC-POTFILES.in: Regenerate.
9480
9481 2002-03-20 Daniel Jacobowitz <drow@mvista.com>
9482
9483 * dwarf2.c (struct funcinfo): Move up.
9484 (lookup_address_in_function_table): New argument function_ptr.
9485 Set it.
9486 (lookup_address_in_line_table): New argument function. If function
9487 is non-NULL, use it to handle ``addr'' before the first line note of
9488 the function.
9489 (comp_unit_find_nearest_line): Update and swap calls to
9490 lookup_address_in_function_table and lookup_address_in_line_table.
9491 * syms.c (_bfd_stab_section_find_nearest_line): Use the first
9492 N_SLINE encountered if we see an N_FUN before any N_SLINE.
9493
9494 2002-03-20 Tom Rix <trix@redhat.com>
9495
9496 * coff-rs6000.c (_bfd_xcoff_stat_arch_elt): Renamed from
9497 _bfd_xcoff_generic_stat_arch_elt. Fix format check.
9498 * coff64-rs6000.c : Use _bfd_xcoff_stat_arch_elt.
9499
9500 2002-03-19 Tom Rix <trix@redhat.com>
9501
9502 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through all
9503 dynamic objects in archives.
9504
9505 2002-03-19 Hans-Peter Nilsson <hp@bitrange.com>
9506
9507 * elflink.h (NAME(bfd_elf,record_link_assignment)): Don't set
9508 STT_NOTYPE symbols to STT_OBJECT.
9509
9510 2002-03-18 Jan Hubicka <jh@suse.cz>
9511
9512 * cpu-i386.c (bfd_x86_64_arch): Rename to "i386:x86-64"
9513
9514 2002-03-18 Tom Rix <trix@redhat.com>
9515
9516 * aix5ppc.core.c : New file for AIX 5 64 bit core support.
9517 * bfd-in.h : Add bfd_xcoff_ar_archive_set_magic declaration.
9518 * coff-rs6000 (do_pad) : New function for archive padding.
9519 (do_copy) : New function for object file copying in archives.
9520 (do_shared_object_padding) : New function for padding shared
9521 objects to their text section alignment in archives.
9522 (bfd_xcoff_ar_achive_set_magic) : Stub.
9523 (xcoff_write_armap_big) : Use do_copy and do_pad.
9524 (xcoff_write_archive_contents_big) : Use do_shared_object_padding,
9525 do_copy and do_pad.
9526 * coff64-rs6000.c (xcoff64_write_ojbect_contents) : Use
9527 bfd_xcoff_magic_number.
9528 (xcoff64_bad_format_hook) : New function for _bfd_bad_format_hook
9529 fop.
9530 (xcoff_backend_data_r) : Use xcoff64_bad_format_hook.
9531 (bfd_xcoff_aix5_backend_data) : New Aix 5 backend data.
9532 (aix5coff64_vec) : New Aix 5 target aix5coff64-rs6000.
9533 * rs6000-core.c : Update copyright date.
9534 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Check for NULL
9535 csectpp.
9536 * coffcode.h (coff_new_section_hook) : Use new accessor macros.
9537 (coff_set_arch_mach_hook) : Add Aix 5 U64_TOCMAGIC magic #.
9538 (coff_set_flags) : Use bfd_xcoff_magic_number.
9539 * libxcoff.h (bfd_xcoff_is_xcoff64): Add U64_TOCMAGIC.
9540 * configure.in : Add powerpc-*-aix5 and rs6000-*-aix5 support.
9541 * Makefile.am : Same.
9542 * config.bfd : Same.
9543 * targets.c : Same.
9544 * configure : Regnerate.
9545 * Makefile.in : Same.
9546 * bfd-in2.h : Same.
9547
9548 2002-03-18 Nick Clifton <nickc@cambridge.redhat.com>
9549
9550 * po/fr.po: Updated version.
9551
9552 2002-03-18 Alan Modra <amodra@bigpond.net.au>
9553
9554 * libbfd.c (bfd_write_bigendian_4byte_int): Return true iff success.
9555 * libbfd.h: Regenerate.
9556 * archive.c (coff_write_armap): Pass on failures from
9557 bfd_write_bigendian_4byte_int.
9558
9559 2002-03-14 H.J. Lu <hjl@gnu.org>
9560
9561 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the BFD
9562 error to bfd_error_nonrepresentable_section for reinit_array
9563 section in DSO.
9564
9565 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
9566
9567 * coffcode.h (coff_slurp_symbol_table): When adding BSF_WEAK flag,
9568 OR it in rather than replacing previously selected flags.
9569
9570 * elfxx-target.h (TARGET_BIG_SYM): Set ar_max_namelen to 15.
9571 (TARGET_LITTLE_SYM): Set ar_max_namelen to 15.
9572
9573 2002-03-14 Alan Modra <amodra@bigpond.net.au>
9574
9575 * cpu-mips.c (mips_compatible): New. Don't check bits_per_word.
9576 (N): Use the above.
9577 * elflink.h (elf_bfd_final_link): Revert last change. Instead,
9578 ensure reloc size matches before calling elf_link_input_bfd.
9579 Add an assert to check reloc size when counting output relocs.
9580
9581 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
9582
9583 * mmo.c (mmo_get_loc): Return NULL rather than false.
9584
9585 2002-03-13 Nick Clifton <nickc@cambridge.redhat.com>
9586
9587 * po/fr.po: Updated version.
9588
9589 2002-03-13 Alan Modra <amodra@bigpond.net.au>
9590
9591 * archures.c (bfd_default_compatible): Test bits_per_word.
9592 * cpu-i386.c (i386_compatible): Remove. Replace occurrences with
9593 bfd_default_compatible.
9594 * cpu-i370.c (i370_compatible): Likewise.
9595 * cpu-sparc.c (sparc_compatible): Likewise.
9596 * cpu-h8300.c (compatible): Test in->arch == out->arch.
9597
9598 * elflink.h: Formatting fixes.
9599 (elf_link_output_extsym): Merge undefined and undef weak cases.
9600
9601 * elflink.h (elf_bfd_final_link): Only call elf_link_input_bfd
9602 when word size of input matches output word size.
9603
9604 2002-03-12 Andreas Jaeger <aj@suse.de>
9605
9606 * cpu-i386.c (i386_compatible): New. Use it instead of
9607 bfd_default_compatible.
9608
9609 2002-03-07 H.J. Lu (hjl@gnu.org)
9610
9611 * coff-sh.c (shcoff_reloc_map): Use bfd_reloc_code_real_type
9612 as the type for bfd_reloc_val.
9613
9614 2002-03-05 John David Anglin <dave@hiauly1.hia.nrc.ca>
9615
9616 * elf-hppa.h (elf_hppa_is_dynamic_loader_symbol): New function.
9617 (elf_hppa_relocate_section): Ignore undefined dynamic loader symbols.
9618 (elf_hppa_final_link_relocate): Correct relocations for indirect
9619 references to local data through the DLT. Fix .opd creation for
9620 local symbols using R_PARISC_LTOFF_FPTR32 and R_PARISC_FPTR64
9621 relocations. Use e_lsel selector for R_PARISC_DLTIND21L,
9622 R_PARISC_LTOFF_FPTR21L and R_PARISC_LTOFF_TP21L as per
9623 "Processor-Specific ELF for PA_RISC, Version 1.43" document.
9624 Similarly, use e_rsel for DLT and LTOFF 'R' relocations.
9625 * elf32-hppa.c (final_link_relocate): Revise relocation selectors
9626 as per "Processor-Specific ELF for PA_RISC, Version 1.43" document.
9627
9628 2002-03-05 Jakub Jelinek <jakub@redhat.com>
9629
9630 * merge.c (_bfd_merge_sections): Don't segfault if there
9631 is nothing to merge due to GC.
9632
9633 2002-03-05 Alan Modra <amodra@bigpond.net.au>
9634
9635 * elf32-hppa.c (clobber_millicode_symbols): Remove hack to keep
9636 symbols that have been forced local.
9637
9638 * elflink.h (elf_bfd_final_link): Call elf_link_output_extsym
9639 to output forced local syms for non-shared link.
9640 (elf_link_output_extsym): Tweak condition for calling backend
9641 adjust_dynamic_symbol so that previous behaviour is kept.
9642 Whitespace changes throughout file.
9643
9644 2002-03-04 H.J. Lu <hjl@gnu.org>
9645
9646 * elf.c (bfd_section_from_shdr): Handle special sections,
9647 .init_array, .fini_array and .preinit_array.
9648 (elf_fake_sections): Likewise.
9649
9650 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Create the
9651 DT entry only if the section is in output for .init_array,
9652 .fini_array and .preinit_array. Complain about .preinit_array
9653 section in DSO.
9654 (elf_bfd_final_link): Warn zero size for .init_array,
9655 .fini_array and .preinit_array sections.
9656
9657 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Remove
9658 SHT_INIT_ARRAY, SHT_FINI_ARRAY and SHT_PREINIT_ARRAY.
9659 (elfNN_ia64_fake_sections): Remove .init_array, .fini_array and
9660 .preinit_array.
9661
9662 2002-03-04 Alan Modra <amodra@bigpond.net.au>
9663
9664 * configure.in (WIN32LIBADD): Don't eval PICFLAG assignment.
9665 * configure: Regenerate.
9666
9667 2002-03-02 Tom Rix <trix@redhat.com>
9668
9669 * coff64-rs6000.c (xcoff64_howto_table): Replace howto types with
9670 symbolic equiv.
9671 * coff-rs6000.c (xcoff_howto_table): Same.
9672
9673 2002-03-01 David Mosberger <davidm@hpl.hp.com>
9674
9675 * elflink.h (size_dynamic_sections): If section named
9676 ".preinit_array" exists, create DT_PREINIT_ARRAY and
9677 DT_PREINIT_ARRAYSZ entries in dynamic table. Analogously for
9678 ".init_array" and ".fini_array".
9679 (elf_bfd_final_link): Handle DT_PREINIT_ARRAYSZ, DT_INIT_ARRAYSZ,
9680 DT_FINI_ARRAYSZ, DT_PREINIT_ARRAY, DT_INIT_ARRAY, and
9681 DT_FINI_ARRAY.
9682
9683 2002-02-26 Andrew Macleod <amacleod@cygnus.com>
9684
9685 * elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local
9686 dynsyms.
9687
9688 2002-02-25 Alan Modra <amodra@bigpond.net.au>
9689
9690 * elf64-hppa.h: Update copyright date.
9691
9692 * elf64-ppc.c (ppc64_elf_check_relocs): Warning fix.
9693 (ppc64_elf_relocate_section): Don't generate power4 style branch
9694 hints for *_BRTAKEN and *_BRNTAKEN relocs.
9695
9696 2002-02-22 Jakub Jelinek <jakub@redhat.com>
9697
9698 * elf64-sh64.c (sh_elf64_relocate_section): Fix a typo from my
9699 last patch.
9700 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
9701
9702 2002-02-21 Andreas Jaeger <aj@suse.de>
9703
9704 * elf64-x86-64.c: Major rework that introduces all recent changes
9705 to the x86-64 backend. Get a closer match to elf32-i386.
9706 (struct elf64_x86_64_dyn_relocs): Rename from
9707 elf64_x86_64_pcrel_relocs_copied, add additional fields. Change
9708 all users.
9709 (struct elf64_x86_64_link_hash_table): Add short cuts to some
9710 sections.
9711 (link_hash_newfunc): Rename from elf64_x86_64_link_hash_newfunc,
9712 remove casts, initialize new hash members.
9713 (create_got_section): New.
9714 (elf64_x86_64_create_dynamic_sections): New.
9715 (elf64_x86_64_copy_indirect_symbol): New.
9716 (elf64_x86_64_check_relocs): Don't allocate space for dynamic
9717 relocs, .got or .relgot here but do it in allocate_dynrelocs.
9718 Reference count possible .plt and .got entries. Don't test input
9719 section SEC_READONLY here to try to avoid copy relocs, and keep
9720 dyn_relocs regardless of ELF_LINK_NON_GOT_REF. Don't set
9721 DF_TEXTREL here. Delay setting of variables until needed. Cache
9722 pointer to "sreloc" section in elf_section_data. Tweak condition
9723 under which .got created. Report files with bad relocation
9724 section names.
9725 (elf64_x86_64_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
9726 Reference count possible .plt entries. Don't deallocate .got and
9727 .relgot space here.
9728 (elf64_x86_64_adjust_dynamic_symbol): Handle nocopyreloc. Don't
9729 do copy reloc processing for weakdefs. Remove redundant casts and
9730 aborts. Delay setting of vars until needed. Move creation of
9731 dynamic symbols and allocation of .plt and .rela.plt to
9732 allocate_dynrelocs. Replace BFD_ASSERT with abort.
9733 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
9734 (allocate_dynrelocs): New.
9735 (readonly_dynrelocs): New.
9736 (elf64_x86_64_size_dynamic_sections): Call readonly_dynrelocs.
9737 Allocate space for dyn relocs. Replace BFD_ASSERT with abort.
9738 Zero out the dynamic allocated content space.
9739 (elf64_x86_64_discard_copies): Removed.
9740 (elf64_x86_64_relocate_section): Make use of dynamic section
9741 short-cuts. Localise vars, and delay setting. Better error
9742 reporting, replace BFD_ASSERT with abort. Check
9743 ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined in the
9744 regular object file and tread the weak definition as the normal
9745 one. Don't discard relocs for undefweak or undefined symbols and
9746 check !DEF_REGULAR as well as DEF_DYNAMIC in test for avoided copy
9747 relocs.
9748 (elf64_x86_64_finish_dynamic_symbol): Don't copy relocs for
9749 symbols that have been forced local. Use same test to decide if
9750 we can use a relative reloc for got as relocate_section. Expand
9751 SHN_UNDEF comment. Move expressions out of function calls.
9752 Replace BFD_ASSERT with abort.
9753 (bfd_elf64_bfd_final_link): Removed.
9754 (elf_backend_copy_indirect_symbol): Define.
9755
9756 2002-02-20 Tom Rix <trix@redhat.com>
9757
9758 * coff-rs6000.c (xcoff_howto_table): Add 16 bit R_BA.
9759 (_bfd_xcoff_reloc_type_lookup): Use it.
9760 * coff64-rs6000.c (xcoff64_howto_table): Same.
9761 (xcoff64_reloc_type_lookup): Same.
9762
9763 2002-02-20 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
9764
9765 * osf-core.c (osf_core_vec): OSF/1 (Digital Unix) core files are
9766 little endian.
9767
9768 2002-02-19 Martin Schwidefsky <schwidefsky@de.ibm.com>
9769
9770 * archures.c (bfd_mach_s390_esa): Rename to bfd_mach_s390_31.
9771 (bfd_mach_s390_esame): Rename to bfd_mach_s390_64.
9772 * bfd-in2.h: Regenerate.
9773 * cpu-s390.c (arch_info_struct): Use renamed architecture defines.
9774 Replace architecture name "s390" with "s390:31-bit" and "s390:esame"
9775 with "s390:64-bit".
9776 * elf32-s390.c (elf_howto_table): Add 32 bit pc relative relocations.
9777 (elf_s390_reloc_type_lookup): Likewise.
9778 (elf_s390_check_relocs): Likewise.
9779 (elf_s390_gc_sweep_hook): Likewise.
9780 (elf_s390_relocate_section): Likewise.
9781 (elf_s390_object_p): Use renamed architecture define.
9782 * elf64-s390.c (elf_s390_object_p): Use renamed architecture define.
9783
9784 2002-02-19 Frank Ch. Eigler <fche@redhat.com>
9785
9786 * syms.c (stt[]): Sorted. Added .init/.fini -> "t" mapping.
9787
9788 2002-02-19 Jakub Jelinek <jakub@redhat.com>
9789
9790 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Enable
9791 absptr -> pcrel optimization for shared libs.
9792 Only create minimal .eh_frame_hdr if absptr FDE encoding in shared
9793 library cannot be converted to pcrel.
9794 (_bfd_elf_eh_frame_section_offset): Return -2 if making absptr
9795 relative.
9796 * elf32-i386.c (elf_i386_relocate_section): If
9797 _bfd_elf_section_offset returned -2, skip, but make sure the
9798 relocation is installed.
9799 * elf32-arm.h (elf32_arm_final_link_relocate): Likewise.
9800 * elf32-cris.c (cris_elf_relocate_section): Likewise.
9801 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
9802 * elf32-i370.c (i370_elf_relocate_section): Likewise.
9803 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
9804 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
9805 * elf32-s390.c (elf_s390_relocate_section): Likewise.
9806 * elf32-sh.c (sh_elf_relocate_section): Likewise.
9807 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
9808 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
9809 * elf64-s390.c (elf_s390_relocate_section): Likewise.
9810 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
9811 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
9812 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
9813 * elf64-alpha.c (elf64_alpha_relocate_section): Handle
9814 _bfd_elf_section_offset returning -2 the same way as -1.
9815 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
9816 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add FIXME
9817 and BFD_ASSERT.
9818 * elf64-mips.c (mips_elf64_create_dynamic_relocation): Likewise.
9819
9820 2002-02-18 Tom Rix <trix@redhat.com>
9821
9822 * xcofflink.c (bfd_xcoff_link_gernate_rtinit): Add -brtl support.
9823 (bfd_xcoff_size_dynamic_sections): Same.
9824 * bfd-in.h (bfd_xcoff_link_generate_rtinit): Same.
9825 (bfd_xcoff_size_dynamic_sections): Same.
9826 * coff-rs6000.c (xcoff_generate_rtinit): Same.
9827 * coff-rs646000.c (xcoff64_generate_rtinit): Same.
9828 * libxcoff.h (struct xcoff_backend_data_rec): Same.
9829 * xcofflink.c (xcoff_build_ldsyms, xcoff_link_add_symbols): Clean.
9830 * bfd-in2.h: Regenerate.
9831
9832 2002-02-18 Alan Modra <amodra@bigpond.net.au>
9833
9834 * elf64-ppc.c (STFD_FR0_0R1, LFD_FR0_0R1, BLR): Define.
9835 (struct ppc_link_hash_table): Add sfpr.
9836 (ppc64_elf_link_hash_table_create): Init it.
9837 (ppc64_elf_create_dynamic_sections): Split creation of .stub and
9838 .glink out to..
9839 (create_linkage_sections): ..here. Make .sfpr too.
9840 (ppc64_elf_check_relocs): Call create_linkage_sections, and set
9841 dynobj early.
9842 (MIN_SAVE_FPR, MAX_SAVE_FPR): Define.
9843 (ppc64_elf_func_desc_adjust): Look for missing ._savef* and
9844 ._restf* functions, and create as needed.
9845 (func_desc_adjust): Only force_local for shared libs.
9846
9847 2002-02-18 David O'Brien <obrien@FreeBSD.org>
9848
9849 * configure.in: Bump version number post 2.12 branching.
9850 * configure: Regenerate.
9851
9852 2002-02-17 Hans-Peter Nilsson <hp@bitrange.com>
9853
9854 * mmo.c: Correct and improve comments.
9855 (mmo_write_chunk): Store trailing byte in bfd buffer; don't
9856 zero-pad. Use input to fill up non-empty bfd buffer.
9857 (mmo_flush_chunk): New function.
9858 (mmo_write_loc_chunk): Add parameter last_vmap, all callers
9859 changed. Don't emit location specifier if VMA is same as
9860 *LAST_VMAP after omitting leading zero contents. Call
9861 mmo_flush_chunk before emitting location specifier.
9862 (mmo_write_loc_chunk_list): Call mmo_flush_chunk when finished
9863 with mmo_write_loc_chunk calls.
9864 (mmo_internal_write_section): Call mmo_flush_chunk after
9865 mmo_write_chunk.
9866 (mmo_write_symbols_and_terminator): Move :Main to first position
9867 in symbol array. Add faked one if it does not exist if there are
9868 other symbols. Don't add it if there are no symbols at all. Move
9869 out test for value of :Main from symbol loop. Rename table
9870 fakemain to maintable and variable mainsym to fakemain.
9871
9872 2002-02-15 Richard Henderson <rth@redhat.com>
9873
9874 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: A target
9875 section with no got matches any got. Simplify error generaion.
9876
9877 2002-02-15 Alan Modra <amodra@bigpond.net.au>
9878
9879 Support arbitrary length fill patterns.
9880 * linker.c (bfd_new_link_order): Zero all fields with bfd_zalloc.
9881 (_bfd_default_link_order): Remove bfd_fill_link_order code.
9882 Call default_data_link_order.
9883 (default_fill_link_order): Delete.
9884 (default_data_link_order): New function.
9885 * elf32-mips.c (_bfd_mips_elf_final_link): Replace occurrences
9886 of bfd_fill_link_order with bfd_data_link_order.
9887 * elf64-alpha.c (elf64_alpha_final_link): Likewise.
9888 * elf64-mips.c (mips_elf64_final_link): Likewise.
9889
9890 * bfd.c (bfd_scan_vma): Clamp overflows to max bfd_vma value.
9891 Correct value returned in "end" for "0x<non-hex>".
9892
9893 2002-02-14 Nick Clifton <nickc@cambridge.redhat.com>
9894
9895 * cpu-arm.c (processors): Replace 'arch' field with 'mach'.
9896 (scan): Test against 'mach' field in info structure.
9897
9898 2002-02-14 Alan Modra <amodra@bigpond.net.au>
9899
9900 * elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD.
9901
9902 2002-02-14 Matt Fredette <fredette@netbsd.org>
9903
9904 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize
9905 EF_M68000.
9906
9907 2002-02-13 Nick Clifton <nickc@cambridge.redhat.com>
9908
9909 * elf.c (_bfd_elf_make_section_from_shdr): Do not insist on
9910 non-zero physical addresses when adjusting the LMAs of new
9911 sections.
9912
9913 2002-02-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
9914
9915 * elf-hppa.h (elf_hppa_reloc_final_type): New function stripped
9916 from _bfd_elf_hppa_gen_reloc_type.
9917 (_bfd_elf_hppa_gen_reloc_type): Remove duplicate prototype.
9918 * elf32-hppa.h (elf32_hppa_reloc_final_type): Add protptype.
9919 * elf32-hppa.c: Include elf32-hppa.h before elf-hppa.h.
9920 * elf64-hppa.h (elf64_hppa_reloc_final_type): Add protptype.
9921
9922 2002-02-12 Alexandre Oliva <aoliva@redhat.com>
9923
9924 * elf-m10300.c (mn10300_elf_relax_section): Skip section before
9925 loading its contents if there's nothing to do in it.
9926
9927 2002-02-12 Alan Modra <amodra@bigpond.net.au>
9928
9929 * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for crossing
9930 64k boundary.
9931
9932 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Add dynamic
9933 DT_PPC64_OPD and DT_PPC64_OPDSZ tags.
9934 (ppc64_elf_finish_dynamic_sections): Set values for them.
9935
9936 2002-02-11 Michael Snyder <msnyder@redhat.com>
9937
9938 * elf-bfd.h (elfcore_write_lwpstatus): Add prototype.
9939 * elf.c (elfcore_grok_pstatus): Add prototype.
9940 (elfcore_grok_lwpstatus): Add prototype.
9941 (elfcore_write_lwpstatus): New function.
9942 (elfcore_write_pstatus): Fix typo, eliminate unnecessary memcpy.
9943
9944 2002-02-11 Alexandre Oliva <aoliva@redhat.com>
9945
9946 * elf32-sh.c: Added missing prototypes.
9947 * elf32-sh64.c: Likewise.
9948 (sh_elf_align_loads): Mark unused args as such.
9949 * elf64-sh64.c: Added missing prototypes.
9950 (struct elf_sh64_link_hash_entry): Fix typo.
9951 (sh_elf64_relocate_section): Fix info argument passed to
9952 _bfd_elf_section_offset.
9953
9954 2002-02-11 Alan Modra <amodra@bigpond.net.au>
9955
9956 * Makefile.am: "make dep-am".
9957 * Makefile.in: Regenerate.
9958 * aclocal.m4: Regenerate.
9959 * config.in: Regenerate.
9960 * configure: Regenerate.
9961
9962 2002-02-10 Daniel Jacobowitz <drow@mvista.com>
9963
9964 * coff-rs6000.c (xcoff_generate_rtinit): Silence uninitialized
9965 variable warnings.
9966 * elf32-sh.c (sh_elf_relax_section): Silence signed/unsigned
9967 comparison warning.
9968 * trad-core.c (trad_unix_core_file_p): Silence pointer/integer
9969 cast warnings for the common case.
9970
9971 2002-02-10 Hans-Peter Nilsson <hp@bitrange.com>
9972
9973 * config.bfd (sh-*-linux*, sh-*-elf* | sh-*-rtemself*): Add sh64
9974 vectors.
9975 (sh-*-netbsdelf*): New, to trump sh*-*-netbsdelf* and add sh64
9976 vectors.
9977
9978 2002-02-09 Richard Henderson <rth@redhat.com>
9979
9980 * elf64-alpha.c (elf64_alpha_howto): Add R_ALPHA_BRSGP.
9981 (elf64_alpha_reloc_map, elf64_alpha_check_relocs): Likewise.
9982 (elf64_alpha_relocate_section): Likewise.
9983 * reloc.c (BFD_RELOC_ALPHA_BRSGP): New.
9984 * bfd-in2.h, libbfd.h: Rebuild.
9985
9986 2002-02-09 Hans-Peter Nilsson <hp@bitrange.com>
9987
9988 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs): Check
9989 that base-plus-offset reloc accounting is consistent.
9990 (mmix_elf_relax_section): Keep base-plus-offset reloc accounting
9991 up to date for undefined symbols.
9992
9993 2002-02-08 Eric Christopher <echristo@redhat.com>
9994
9995 From Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
9996
9997 * elf32-mips.c (_bfd_mips_elf_fake_sections): Don't create .rela
9998 sections for the O32 ABI.
9999
10000 2002-02-08 Chris Demetriou <cgd@broadcom.com>
10001
10002 * elf32-arm.h: Fix formatting of _("...").
10003 * elf32-d10v.c: Likewise.
10004 * elf32-m68k.c: Likewise.
10005 * elf32-mips.c: Likewise.
10006
10007 2002-02-08 Ivan Guzvinec <ivang@opencores.org>
10008
10009 * coff-or32.c: Fix compile time warning messages.
10010
10011 2002-02-08 Alexandre Oliva <aoliva@redhat.com>
10012
10013 Contribute sh64-elf.
10014 2002-01-23 Alexandre Oliva <aoliva@redhat.com>
10015 * reloc.c (R_SH_GOTPLT32, R_SH_GOT_LOW16, R_SH_GOT_MEDLOW16,
10016 R_SH_GOT_MEDHI16, R_SH_GOT_HI16, R_SH_GOTPLT_LOW16,
10017 R_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_HI16,
10018 R_SH_PLT_LOW16, R_SH_PLT_MEDLOW16, R_SH_PLT_MEDHI16,
10019 R_SH_PLT_HI16, R_SH_GOTOFF_LOW16, R_SH_GOTOFF_MEDLOW16,
10020 R_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_HI16, R_SH_GOTPC_LOW16,
10021 R_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDHI16, R_SH_GOTPC_HI16,
10022 R_SH_GOT10BY4, R_SH_GOTPLT10BY4, R_SH_GOT10BY8, R_SH_GOTPLT10BY8,
10023 R_SH_COPY64, R_SH_GLOB_DAT64, R_SH_JMP_SLOT64, R_SH_RELATIVE64):
10024 New relocs.
10025 * libbfd.h, bfd-in2.h: Rebuilt.
10026 * elf32-sh.c (sh_elf_howto_table): Define new relocs.
10027 (sh_reloc_map): Map them.
10028 (PLT_ENTRY_SIZE, elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
10029 elf_sh_plt_entry_be, elf_sh_plt_entry_le, elf_sh_pic_plt_entry_be,
10030 elf_sh_pic_plt_entry_le, elf_sh_plt0_entry, elf_sh_plt_entry,
10031 elf_sh_pic_plt_entry, elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
10032 elf_sh_plt0_gotplt_offset, elf_sh_plt_temp_offset,
10033 elf_sh_plt_symbol_offset, elf_sh_plt_reloc_offset,
10034 movi_shori_putval) [INCLUDE_SHMEDIA]: New.
10035 (elf_sh_link_hash_entry) [INCLUDE_SHMEDIA]: Add
10036 datalabel_got_offset.
10037 (sh_elf_link_hash_newfunc): Initialize it.
10038 (sh_elf_relocate_section): Augment the scope of
10039 seen_stt_datalabel. Introduce GOTPLT support. Extend GOTPC, PLT,
10040 GOT and GOTOFF handling to new SHmedia relocation types. Support
10041 GOT_BIAS.
10042 (sh_elf_check_relocs): Likewise.
10043 (sh_elf_finish_dynamic_symbol) [TARGET_SHMEDIA]: Set up values in
10044 PLT entries using movi_shori_putval. Support GOT_BIAS.
10045 (sh_elf_finish_dynamic_sections): Likewise.
10046 * elf32-sh64.c (shmedia_prepare_reloc): Do not add addend to
10047 relocation, it's now done by the caller.
10048 (GOT_BIAS): New.
10049 * elf64-sh64.c (GOT_BIAS, PLT_ENTRY_SIZE, elf_sh64_sizeof_plt,
10050 elf_sh64_plt_plt0_offset, elf_sh64_plt0_gotplt_offset,
10051 elf_sh64_plt_temp_offset, elf_sh64_plt_symbol_offset,
10052 elf_sh64_plt_reloc_offset, ELF_DYNAMIC_INTERPRETER,
10053 elf_sh64_pcrel_relocs_copied, elf_sh64_link_hash_entry,
10054 elf_sh64_link_hash_table, sh64_elf64_link_hash_traverse,
10055 sh64_elf64_hash_table): New.
10056 (sh_elf64_howto_table): Introduce new relocs.
10057 (sh_elf64_info_to_howto): Accept new PIC relocs.
10058 (sh_elf64_relocate_section): Augment the scope of
10059 seen_stt_datalabel. Support new PIC relocs.
10060 (sh_elf64_check_relocs): Support new PIC relocs.
10061 (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le,
10062 elf_sh64_plt_entry_be, elf_sh64_plt_entry_le,
10063 elf_sh64_pic_plt_entry_be, elf_sh64_pic_plt_entry_le,
10064 elf_sh64_plt0_entry, elf_sh64_plt_entry, elf_sh64_pic_plt_entry,
10065 sh64_elf64_link_hash_newfunc, sh64_elf64_link_hash_table_create,
10066 movi_shori_putval, movi_3shori_putval,
10067 sh64_elf64_create_dynamic_sections,
10068 sh64_elf64_adjust_dynamic_symbol, sh64_elf64_discard_copies,
10069 sh64_elf64_size_dynamic_sections,
10070 sh64_elf64_finish_dynamic_symbol,
10071 sh64_elf64_finish_dynamic_sections): New.
10072 (elf_backend_create_dynamic-sections,
10073 bfd_elf64_bfd_link_hash_table_create,
10074 elf_backend_adjust_dynamic_symbol,
10075 elf_backend_size_dynamic_sections,
10076 elf_backend_finish_dynamic_symbol,
10077 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
10078 elf_backend_plt_readonly, elf_backend_want_plt_sym,
10079 elf_backend_got_header_size, elf_backend_plt_header_size):
10080 Define.
10081 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
10082 * elf32-sh.c: Renumbered and renamed some SH5 relocations to
10083 match official numbers and names; moved unmaching ones to the
10084 range 0xf2-0xff.
10085 * elf32-sh64.c, elf64-sh64.c: Likewise.
10086 2001-03-12 DJ Delorie <dj@redhat.com>
10087 * elf32-sh.c (sh_elf_relax_section): Don't relax SHmedia
10088 sections.
10089 2001-03-12 DJ Delorie <dj@redhat.com>
10090 * elf32-sh64.c (shmedia_prepare_reloc): Validate relocs that must
10091 be aligned.
10092 * elf64-sh64.c (sh_elf64_relocate_section): Ditto.
10093 2001-01-14 Hans-Peter Nilsson <hpn@cygnus.com>
10094 * elf32-sh64.c (bfd_elf32_bfd_copy_private_section_data): Define.
10095 (sh64_elf_fake_sections): Set type to SHT_SH5_CR_SORTED for a
10096 .cranges section with SEC_SORT_ENTRIES set.
10097 (sh64_backend_section_from_shdr): Set SEC_SORT_ENTRIES on an
10098 incoming sorted .cranges section.
10099 (sh64_bfd_elf_copy_private_section_data): New.
10100 (sh64_elf_final_write_processing): Only sort .cranges and modify
10101 start address if called by linker.
10102 2001-01-08 Ben Elliston <bje@redhat.com>
10103 * elf32-sh64.c (sh64_elf_final_write_processing): Activate
10104 Hans-Peter Nilsson's set bit 0 patch from 2001-01-06.
10105 * elf64-sh64.c (sh64_elf64_final_write_processing): Ditto.
10106 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
10107 * elf64-sh64.c (sh_elf64_howto_table): No open brace at start of
10108 line. Add comments before all entries.
10109 <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct and clarify describing
10110 comment.
10111 (sh_elf64_reloc): Correct head comment.
10112 (sh_elf64_relocate_section): Correct spacing.
10113 <relocating for a local symbol>: Do not honour STO_SH5_ISA32;
10114 instead call reloc_dangerous callback.
10115 <case R_SH_SHMEDIA_CODE>: New case.
10116 (sh_elf64_gc_mark_hook): Correct spacing.
10117 (sh_elf64_check_relocs): Ditto.
10118 * elf32-sh64.c (shmedia_prepare_reloc) <case R_SH_SHMEDIA_CODE>:
10119 New case.
10120 * elf32-sh.c: Correct #endif comments for #ifndef-wrapped
10121 functions.
10122 (sh_elf_howto_table) <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct,
10123 clarify describing comment. Add comments before all entries.
10124 (sh_elf_relocate_section) <relocating for a local symbol>: Do not
10125 honour STO_SH5_ISA32; instead call reloc_dangerous callback.
10126 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
10127 Sort .cranges section in final link. Prepare to set bit 0 on
10128 entry address.
10129 * elf32-sh64.c (struct sh64_find_section_vma_data): New.
10130 (sh64_elf_link_output_symbol_hook): Fix typo in prototype.
10131 (sh64_elf_set_mach_from_flags): Set SEC_DEBUGGING on incoming
10132 .cranges section.
10133 (sh64_backend_section_from_shdr): New, to recognize
10134 SHT_SH5_CR_SORTED on incoming .cranges section.
10135 (elf_backend_section_from_shdr): Define.
10136 (sh64_elf_final_write_processing): Sort outgoing .cranges
10137 section. (New, temporarily disabled:) Set bit 0 on entry address
10138 according to ISA type.
10139 (sh64_find_section_for_address): New.
10140 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb,
10141 crange_bsearch_cmpl): Move here from opcodes/sh64-dis.c.
10142 (sh64_address_in_cranges): Move here from opcodes/sh64-dis.c. Use
10143 bfd_malloc, not xmalloc.
10144 (sh64_get_contents_type): Move here from opcodes/sh64-dis.c. Make
10145 global.
10146 * elf32-sh64.c (sh64_elf64_final_write_processing): New, (but
10147 temporarily disabled) setting bit 0 on entry address.
10148 (elf_backend_final_write_processing): Define.
10149 2001-01-05 Hans-Peter Nilsson <hpn@cygnus.com>
10150 * elf32-sh.c (sh_elf_howto_table) <R_SH_PT_16>: Adjust fields to
10151 be a proper relocation for PTA and PTB rather than a marker.
10152 <R_SH_IMMU5, R_SH_IMMS6, R_SH_IMMU6, R_SH_IMMS10, R_SH_IMMS10BY2,
10153 R_SH_IMMS10BY4, R_SH_IMMS10BY8, R_SH_IMMS16, R_SH_IMMU16,
10154 R_SH_IMM_LOW16, R_SH_IMM_LOW16_PCREL, R_SH_IMM_MEDLOW16,
10155 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16_PCREL,
10156 R_SH_IMM_HI16, R_SH_IMM_HI16_PCREL, R_SH_64, R_SH_64_PCREL>:
10157 Zero src_mask.
10158 * elf64-sh64.c: Ditto.
10159 (sh_elf64_relocate_section) <case R_SH_PT_16>: New case.
10160 * elf32-sh64.c: Include opcodes/sh64-opc.h
10161 (shmedia_prepare_reloc): Take a bfd_link_info pointer as first
10162 argument. Drop const qualifiers from "bfd *" and "bfd_byte *"
10163 parameters. No unused parameters. Caller changed.
10164 <case R_SH_PT_16>: New case.
10165 * Makefile.am (elf32-sh64.lo): Add dependency on sh64-opc.h.
10166 * Makefile.in: Regenerate.
10167 2000-12-30 Hans-Peter Nilsson <hpn@cygnus.com>
10168 * elf64-sh64.c (sh64_elf64_fake_sections): Set SHF_SH5_ISA32 for
10169 all code sections.
10170 (sh_elf64_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
10171 (sh64_elf_merge_private_data): Ditto.
10172 * elf32-sh64.c (sh64_elf_fake_sections): Use sh64_elf_section_data
10173 to access stored section flags.
10174 (sh64_elf_final_write_processing): Return immediately unless
10175 called by linker. Use sh64_elf_section_data (cranges) to get size
10176 of linker-generated cranges entries.
10177 (sh64_elf_copy_private_data): Add missing "return true".
10178 (sh64_elf_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
10179 (sh_elf64_merge_private_data): Ditto.
10180 2000-12-19 Hans-Peter Nilsson <hpn@cygnus.com>
10181 * elf64-sh64.c (sh64_elf64_fake_sections): New, copy of
10182 elf64-sh64.c:sh64_elf_fake_sections.
10183 (elf_backend_fake_sections): Define as sh64_elf64_fake_sections.
10184 2000-12-18 Hans-Peter Nilsson <hpn@cygnus.com>
10185 * elf32-sh64.c (sh64_elf_copy_private_data_internal): Delete.
10186 (sh64_elf_final_write_processing): New.
10187 (elf_backend_final_write_processing): Define.
10188 (sh64_elf_fake_sections): Get header flags from tdata field.
10189 (sh64_elf_copy_private_data): Do not call
10190 sh64_elf_copy_private_data_internal, just copy e_flags field.
10191 (sh64_elf_merge_private_data): Do not call
10192 sh64_elf_copy_private_data_internal.
10193 2000-12-12 Hans-Peter Nilsson <hpn@cygnus.com>
10194 Remove EF_SH64_ABI64, let ELF size make difference.
10195 Remove SH64-specific BFD section flag.
10196 * elf32-sh64.c (sh64_elf_fake_sections): Recognize section as
10197 containing SHmedia through elf_section_data (asect)->tdata
10198 non-zero, not using a BFD section flag.
10199 (sh64_elf_set_mach_from_flags): Don't recognize EF_SH64_ABI64.
10200 (sh64_elf_merge_private_data): Similar.
10201 (elf_backend_section_flags): Don't define.
10202 (sh64_elf_backend_section_flags): Delete.
10203 * elf64-sh64.c (sh_elf64_set_mach_from_flags): Recognize EF_SH64,
10204 not EF_SH64_ABI64.
10205 (sh_elf64_merge_private_data): Similar.
10206 * section.c (Section flags definitions): Don't define
10207 SEC_SH_ISA_SHMEDIA.
10208 (bfd-in2.h): Regenerate.
10209 2000-12-09 Hans-Peter Nilsson <hpn@cygnus.com>
10210 Make DataLabel references work with partial linking.
10211 * elf32-sh64.c: Fix formatting.
10212 (sh64_elf_link_output_symbol_hook): New.
10213 (elf_backend_link_output_symbol_hook): Define to
10214 sh64_elf_link_output_symbol_hook.
10215 (sh64_elf_add_symbol_hook): Make DataLabel symbol just global
10216 undefined if partial linking. Adjust sanity check.
10217 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): New.
10218 (elf_backend_link_output_symbol_hook): Define to
10219 sh64_elf64_link_output_symbol_hook.
10220 (sh64_elf64_add_symbol_hook): Make DataLabel symbol just global
10221 undefined if partial linking. Adjust sanity check.
10222 2000-12-07 Hans-Peter Nilsson <hpn@cygnus.com>
10223 Implement semantics for inter-file DataLabel references.
10224 * elf64-sh64.c (DATALABEL_SUFFIX): Define.
10225 (sh64_elf64_add_symbol_hook): New.
10226 (sh_elf64_relocate_section): If passing an indirect symbol with
10227 st_type STT_DATALABEL on the way to a symbol with st_other
10228 STO_SH5_ISA32, do not bitor 1 to the relocation.
10229 (elf_backend_add_symbol_hook): Define to
10230 sh64_elf64_add_symbol_hook.
10231 * elf64-sh32.c: Tweak comments.
10232 (DATALABEL_SUFFIX): Define.
10233 (sh64_elf_add_symbol_hook): New.
10234 (elf_backend_add_symbol_hook): Define to sh64_elf_add_symbol_hook.
10235 * elf32-sh.c (sh_elf_relocate_section): If passing an indirect
10236 symbol with st_type STT_DATALABEL on the way to a symbol with
10237 st_other STO_SH5_ISA32, do not bitor 1 to the relocation.
10238 2000-12-05 Hans-Peter Nilsson <hpn@cygnus.com>
10239 Pass through STT_DATALABEL.
10240 * elf32-sh64.c (sh64_elf_get_symbol_type): New.
10241 (elf_backend_get_symbol_type): Define.
10242 * elf64-sh64.c (sh64_elf64_get_symbol_type): New.
10243 (elf_backend_get_symbol_type): Define.
10244 2000-11-30 Hans-Peter Nilsson <hpn@cygnus.com>
10245 * elf32-sh64.c: Tweak comments.
10246 (sh64_elf_copy_private_data_internal): Add prototype.
10247 (bfd_elf32_bfd_set_private_flags): Define.
10248 (sh64_elf_copy_private_data_internal): Compare machine name, not
10249 textual BFD target name, to check whether to copy section flag
10250 SHF_SH5_ISA32.
10251 (sh64_elf_merge_private_data): Validize bfd_get_arch_size.
10252 Tweak section-contents-type-mismatch message.
10253 (shmedia_prepare_reloc): Add ATTRIBUTE_UNUSED markers.
10254 Validize reloc-types.
10255 * elf64-sh64.c: New file.
10256 * targets.c (bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec): Declare.
10257 * Makefile.am (BFD64_BACKENDS): Add elf64-sh64.lo.
10258 (BFD64_BACKENDS_CFILES): Add elf64-sh64.c.
10259 Regenerate dependencies.
10260 * Makefile.in: Regenerate.
10261 * config.bfd (sh64-*-elf*): Add bfd_elf64_sh64_vec and
10262 bfd_elf64_sh64l_vec.
10263 * configure.in: Handle bfd_elf64_sh64_vec and
10264 bfd_elf64_sh64l_vec.
10265 * configure: Regenerate.
10266 * po/POTFILES.in: Regenerate.
10267 * po/bfd.pot: Regenerate.
10268 2000-11-29 Hans-Peter Nilsson <hpn@cygnus.com>
10269 * elf32-sh64.c (sh64_elf_set_mach_from_flags): Do not recognize
10270 anything else but EF_SH64 and EF_SH64_ABI64.
10271 (sh64_elf_merge_private_data): Emit error for anything else but
10272 EF_SH64 and EF_SH64_ABI64.
10273 * config.bfd: Remove bfd_elf32_shblin_vec and bfd_elf32_shlin_vec
10274 from targ_selvecs.
10275 * configure.in: Add cofflink.lo to bfd_elf32_sh64_vec and
10276 bfd_elf32_sh64l_vec as a temporary measure.
10277 * configure: Regenerate.
10278 2000-11-27 Hans-Peter Nilsson <hpn@cygnus.com>
10279 * cpu-sh.c (arch_info_struct): Include sh5 item
10280 unconditionalized.
10281 * config.bfd (sh64-*-elf*): Do not set targ_cflags.
10282 Add targ_selvecs bfd_elf32_sh_vec, bfd_elf32_shl_vec,
10283 bfd_elf32_shblin_vec and bfd_elf32_shlin_vec.
10284 * elf32-sh64.c: Tweak comments.
10285 (sh64_elf_set_mach_from_flags): Recognize all machine flags that
10286 are proper subsets of SH64 as bfd_mach_sh5. Add EF_SH64_ABI64.
10287 (sh64_elf_copy_private_data_internal): Wrap long line.
10288 (sh64_elf_merge_private_data): Rewrite to allow objects from
10289 SH64 subsets to be linked together.
10290 (INCLUDE_SHMEDIA): Define.
10291 * elf32-sh.c (sh_elf_relocate_section) <local symbol>:
10292 Parenthesize plus-expression inside or-expression.
10293 <global symbol>: Ditto.
10294 (sh_elf_set_mach_from_flags): Remove code refusing
10295 deleted EF_SH64_32BIT_ABI flag.
10296 2000-11-26 Hans-Peter Nilsson <hpn@cygnus.com>
10297 * elf32-sh.c (sh_elf_howto_table) <R_SH_IMM_LOW16_PCREL,
10298 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16_PCREL,
10299 R_SH_IMM_HI16_PCREL, R_SH_64_PCREL>: Set pcrel_offset to true.
10300 (sh_elf_relocate_section) <local symbol>: Or 1 in
10301 calculation of relocation if sym->st_other & STO_SH5_ISA32.
10302 <global symbol>: Ditto if h->other & STO_SH5_ISA32.
10303 * elf32-sh64.c (shmedia_prepare_reloc): Add rel->r_addend to
10304 relocation.
10305 2000-11-24 Hans-Peter Nilsson <hpn@cygnus.com>
10306 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64.lo.
10307 (BFD32_BACKENDS_CFILES): Add elf32-sh64.c.
10308 Regenerate dependencies.
10309 * Makefile.in: Regenerate.
10310 * archures.c: Add bfd_mach_sh5.
10311 * config.bfd: Map targ_cpu sh* to bfd_sh_arch.
10312 Handle sh64-*-elf*. Set targ_cflags to -DINCLUDE_SHMEDIA.
10313 * configure.in: Handle bfd_elf32_sh64_vec and bfd_elf32_sh64l_vec.
10314 * configure: Regenerate.
10315 * reloc.c (BFD_RELOC_SH_SHMEDIA_CODE, BFD_RELOC_SH_IMMU5,
10316 BFD_RELOC_SH_IMMS6, BFD_RELOC_SH_IMMS6BY32, BFD_RELOC_SH_IMMU6,
10317 BFD_RELOC_SH_IMMS10, BFD_RELOC_SH_IMMS10BY2,
10318 BFD_RELOC_SH_IMMS10BY4, BFD_RELOC_SH_IMMS10BY8,
10319 BFD_RELOC_SH_IMMS16, BFD_RELOC_SH_IMMU16, BFD_RELOC_SH_IMM_LOW16,
10320 BFD_RELOC_SH_IMM_LOW16_PCREL, BFD_RELOC_SH_IMM_MEDLOW16,
10321 BFD_RELOC_SH_IMM_MEDLOW16_PCREL, BFD_RELOC_SH_IMM_MEDHI16,
10322 BFD_RELOC_SH_IMM_MEDHI16_PCREL, BFD_RELOC_SH_IMM_HI16,
10323 BFD_RELOC_SH_IMM_HI16_PCREL, BFD_RELOC_SH_PT_16): New relocations.
10324 * cpu-sh.c [INCLUDE_SHMEDIA] (arch_info_struct): Define and link
10325 in item for SH5.
10326 * elf32-sh.c [INCLUDE_SHMEDIA] (sh_elf_howto_table): Add howto items
10327 for SHmedia relocs.
10328 [INCLUDE_SHMEDIA] (sh_rel): Add mappings for SHmedia relocs.
10329 [INCLUDE_SHMEDIA] (sh_elf_relocate_section) [default]: Call
10330 shmedia_prepare_reloc, goto final_link_relocate if it returns
10331 non-zero, else fail as before.
10332 (sh_elf_set_mach_from_flags): Provide function only if not defined
10333 as macro. Do not recognize objects with EF_SH64_32BIT_ABI set.
10334 (sh_elf_set_private_flags): Provide function only if not defined
10335 as a macro.
10336 (sh_elf_copy_private_data): Similar.
10337 (sh_elf_merge_private_data): Similar.
10338 * section.c (SEC_SH_ISA_SHMEDIA): New.
10339 * targets.c (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec): Declare.
10340 * elf32-sh64.c: New file.
10341 * libbfd.h: Regenerate.
10342 * bfd-in2.h: Regenerate.
10343 * po/POTFILES.in: Regenerate.
10344 * po/bfd.pot: Regenerate.
10345 * bfd-in2.h: Regenerate.
10346 * libbfd.h: Regenerate.
10347
10348 2002-02-07 Daniel Jacobowitz <drow@mvista.com>
10349
10350 * bfd-in.h: Update <stdbool.h> check to only see if <stdbool.h> has
10351 been included, not drag it in.
10352 * bfd-in2.h: Regenerate.
10353
10354 2002-02-06 H.J. Lu (hjl@gnu.org)
10355
10356 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Update
10357 the mach and ISA fields if necessary.
10358
10359 2002-02-06 Nick Clifton <nickc@cambridge.redhat.com>
10360
10361 * coffcode.h (coff_set_arch_mach_hook): Select the highest known
10362 ARM architecture when an F_ARM_5 flag is detected, since we cannot
10363 be sure exactly which architecture this represents.
10364
10365 2002-02-05 Nick Clifton <nickc@redhat.com>
10366
10367 * po/tr.po: Updated translation.
10368
10369 2002-02-05 Alan Modra <amodra@bigpond.net.au>
10370
10371 From Jimi X <jimix@watson.ibm.com>
10372 * archures (bfd_mach_ppc64): Define.
10373 (bfd_powerpc_arch): Rename to bfd_powerpc_archs.
10374 (bfd_powerpc_arch): Define.
10375 * bfd-in2.h: Regenerate.
10376 * cpu-powerpc.c (arch_info_struct): Rename to bfd_powerpc_archs.
10377 (bfd_powerpc_arch): Move to tail of bfd_powerpc_archs.
10378 (bfd_powerpc_archs): Add default powerpc64 arch.
10379
10380 2002-02-05 Alan Modra <amodra@bigpond.net.au>
10381
10382 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Check for relocs
10383 against section syms in readonly sections. Don't do the global
10384 sym check if we find one.
10385 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
10386 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
10387 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
10388 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
10389 (elf_s390_grok_prstatus): Add missing prototype.
10390
10391 2002-02-04 Hans-Peter Nilsson <hp@bitrange.com>
10392
10393 * elf64-mmix.c (mmix_dump_bpo_gregs): New function.
10394 (mmix_elf_check_common_relocs) <case R_MMIX_BASE_PLUS_OFFSET>:
10395 Call bfd_get_section_by_name only once. Initialize
10396 bpodata->n_bpo_relocs_this_section.
10397 (_bfd_mmix_prepare_linker_allocated_gregs): Remove comment
10398 referring to DSOs.
10399 (bpo_reloc_request_sort_fn): Don't use difference of values as
10400 return-value.
10401
10402 2002-02-02 David O'Brien <obrien@FreeBSD>
10403
10404 * configure.in: Tweak the FreeBSD 4.x recognition more. Only treat
10405 version 4.5 and later the same as 5-CURRENT.
10406 * configure: Re-generate.
10407
10408 2002-02-02 Jason Thorpe <thorpej@wasabisystems.com>
10409
10410 * config.bfd (hppa*-*-netbsd*): New target.
10411
10412 2002-01-31 Philipp Thomas <pthomas@suse.de>
10413
10414 * coff-arm.c (coff_arm_merge_private_bfd_data): Move ERROR
10415 to front of message. Unify messages with elf32-arm.h. Use
10416 commas where neccessary.
10417 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Use all upcase
10418 ERROR in messages. Unify messages with coff-arm.c. Correct
10419 VFP/FPA error message.
10420 (elf32_arm_print_private_bfd_data): Don't mark APCS-26 and
10421 APCS-32 for translation.
10422
10423 2002-02-01 Hans-Peter Nilsson <hp@bitrange.com>
10424
10425 Perform on-demand global register allocation from
10426 R_MMIX_BASE_PLUS_OFFSET relocs.
10427 * elf64-mmix.c (struct bpo_reloc_section_info, struct
10428 bpo_reloc_request, struct bpo_greg_section_info): New.
10429 (mmix_elf_check_common_relocs, mmix_elf_gc_sweep_hook,
10430 bpo_reloc_request_sort_fn, mmix_elf_relax_section,
10431 _bfd_mmix_check_all_relocs,
10432 _bfd_mmix_prepare_linker_allocated_gregs,
10433 _bfd_mmix_finalize_linker_allocated_gregs): New functions.
10434 (elf_mmix_howto_table): Correct src_mask for most relocs.
10435 (mmix_elf_perform_relocation) <case R_MMIX_BASE_PLUS_OFFSET>: New
10436 case.
10437 (mmix_final_link_relocate) <case R_MMIX_BASE_PLUS_OFFSET>: New
10438 case. Fix typo in comment. New label do_mmix_reloc.
10439 (mmix_elf_check_relocs): Abuse bfd_link_info member base_file to
10440 store first object file with a base-plus-offset reloc. Call
10441 mmix_elf_check_common_relocs for the part common with mmo.
10442 (mmix_elf_final_link): Write out linker-allocated register
10443 contents section.
10444 (elf_backend_gc_sweep_hook): Define.
10445 (bfd_elf64_bfd_relax_section): Define.
10446
10447 * mmo.c: Don't include <ctype.h>
10448 (mmo_init): Correct init-once logic.
10449
10450 2002-02-01 Tom Rix <trix@redhat.com>
10451
10452 * config.bfd: Conditionally support <aiaff> for pre AIX 4.3.
10453
10454 2002-02-01 Alan Modra <amodra@bigpond.net.au>
10455
10456 * Makefile.am: Run "make dep-am"
10457 * Makefile.in: Regenerate.
10458
10459 2002-01-31 David O'Brien <obrien@FreeBSD>
10460
10461 * configure.in: Recognize the differences in core files from FreeBSD
10462 4.{0,1} and later versions of 4.x. This treats 4.2+ the same as
10463 5-CURRENT.
10464 * configure: Regenerate.
10465
10466 2002-01-31 Ivan Guzvinec <ivang@opencores.org>
10467
10468 * coff-or32.c: New file.
10469 * cpu-or32.c: New file.
10470 * elf32-or32.c: New file.
10471 * archures.c: Add support for or32.
10472 * targets.c: Add support for or32.
10473 * bfd-in2.h: Regenerate.
10474 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags,
10475 coff_write_object_contents): Add support for or32.
10476 * config.bfd: Add target.
10477 * configure.in: Add support for or32.
10478 * configure: Regenerate.
10479 * Makefile.am: Add support for or32.
10480 * Makefile.in: Regenerate.
10481 * po/SRC-POTFILES.in: Add or32 files.
10482 * po/bfd.pot: Regenerate.
10483
10484 2002-01-31 Nick Clifton <nickc@cambridge.redhat.com>
10485 Don Lindsay <lindsayd@cisco.com>
10486
10487 * elf32-mips.c (mips_elf_calculate_relocation): Replace 'return
10488 false' with a return of a bfd_reloc_ error code.
10489
10490 2002-01-31 Hans-Peter Nilsson <hp@axis.com>
10491
10492 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
10493 unexport unreferenced symbols when --export-dynamic. Call
10494 _bfd_elf_strtab_delref when unexporting.
10495
10496 2002-01-30 Daniel Jacobowitz <drow@mvista.com>
10497
10498 * bfd-in.h: Include <stdbool.h> if it is available.
10499 * bfd-in2.h: Regenerated.
10500
10501 2002-01-31 Alan Modra <amodra@bigpond.net.au>
10502
10503 * elf64-ppc.c (func_desc_adjust): STV_PROTECTED functions should
10504 not go via the plt.
10505
10506 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
10507
10508 * archures.c: Tidy up formatting of embedded comments.
10509 * bfd.c: Tidy up formatting of embedded comments.
10510 * bfd-in.h: Fix formatting of comments.
10511 * reloc.c: Tidy up formatting of ordinary & embedded comments.
10512 * section.c: Tidy up formatting of embedded comments.
10513 * syms.c: Tidy up formatting of embedded comments.
10514 * targets.c: Tidy up formatting of embedded comments.
10515
10516 * bfd-in2.h: Regenerate.
10517
10518 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
10519
10520 * vms-tir.c (cmd_name): New function.
10521 (tir_cmd_name): New function.
10522 (etir_sta, etir_sto, etir_opr, etir_stc): Use cmd_name().
10523 (tir_opr, tir_ctl, tir_cmd): use tir_cmd_name().
10524 Fix formatting.
10525
10526 * peXXigen.c (pe_print_idata): Rearrange message to aid in
10527 translation.
10528 (pe_print_pdata): Rearrange message to aid in translation.
10529
10530 * libbfd.c (warn_deprecated): Rearrange error message to aid in
10531 translation.
10532
10533 * ihex.c (ihex_write_object_contents): Fix spelling typo.
10534
10535 * ieee.c (ieee_slurp_external_symbols): Remove spurious space.
10536
10537 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Rearrange error
10538 message to aid in translation.
10539
10540 * elf64-mmix.c (mmix_final_link_relocate): Rearrange error message
10541 to aid in translation.
10542
10543 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix typo.
10544
10545 2002-01-30 Philipp Thomas <pthomas@suse.de>
10546
10547 * coff-arm.c, elf32-elf.h: Unify messages.
10548
10549 2002-01-30 Nick Clifton <nickc@redhat.com>
10550
10551 * po/sv.po: Updated translation.
10552
10553 2002-01-30 Philipp Thomas <pthomas@suse.de>
10554
10555 * dwarf2.c (read_abbrev): Use full section name in error message.
10556 (decode_line_info): Likewise.
10557
10558 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Don't translate debugging
10559 message.
10560
10561 2002-01-30 Alan Modra <amodra@bigpond.net.au>
10562
10563 * elf64-ppc.c (func_desc_adjust): Only provide missing function
10564 descriptor symbols for undefined function code syms. Clear
10565 ELF_LINK_NON_ELF so that they can stay weak.
10566
10567 2002-01-29 Chris Demetriou <cgd@broadcom.com>
10568 Mitch Lichtenberg <mpl@broadcom.com>
10569
10570 * bfd-in.h (bfd_mips_elf32_create_embedded_relocs): New prototype.
10571 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): New function
10572 to handle 32-bit ELF embedded reloc (ld --embedded-relocs)
10573 generation.
10574 * bfd-in2.h: Regenerate.
10575
10576 2002-01-29 Chris Demetriou <cgd@broadcom.com>
10577
10578 * elf32-mips.c: Add additional comments about HI16 relocation
10579 processing.
10580 (_bfd_mips_elf_hi16_reloc): Don't subtract address here for
10581 pc-relative relocations. (Reverts change made on 2001-10-31.)
10582 (_bfd_mips_elf_lo16_reloc): Subtract address of LO16 part here
10583 for pc-relative relocations.
10584 (mips_elf_calculate_relocation): Add a comment about a kludge
10585 in the R_MIPS_GNU_REL_HI16 handling.
10586 (_bfd_mips_elf_relocate_section): Implement that kludge;
10587 adjust pc-relative HI16 relocation for difference in HI16 and
10588 LO16 addresses, since it can't easily be done in
10589 mips_elf_calculate_relocation.
10590
10591 2002-01-29 Martin Schwidefsky <schwidefsky@de.ibm.com>
10592
10593 * elf32-i386 (elf_i386_adjust_dynamic_symbol): Do not replace PLT32
10594 relocations with PC32 relocations for undefined or weak symbols.
10595 * elf32-s390 (elf_i386_adjust_dynamic_symbol): Likewise.
10596 * elf64-s390x (elf_i386_adjust_dynamic_symbol): Likewise.
10597
10598 2002-01-28 Jason Thorpe <thorpej@wasabisystems.com>
10599
10600 * elfcore.h (elf_core_file_p): Improve comment for last change.
10601
10602 2002-01-27 Daniel Jacobowitz <drow@mvista.com>
10603
10604 * configure: Regenerated.
10605
10606 2002-01-27 Jason Thorpe <thorpej@wasabisystems.com>
10607
10608 * elfcore.h (elf_core_file_p): Set the machine architecture
10609 before processing the program headers.
10610
10611 2002-01-26 Hans-Peter Nilsson <hp@bitrange.com>
10612
10613 * configure.in <64-bit configuration>: If using gcc, check and
10614 emit error for egcs-1.1.2.
10615 * configure: Regenerate.
10616
10617 2002-01-26 Egor Duda <deo@logos-m.ru>
10618
10619 * elf.c (elfcore_grok_win32pstatus): Copy only as much information
10620 as possible to avoid stack corruption.
10621
10622 2002-01-26 Richard Henderson <rth@redhat.com>
10623
10624 * elf64-alpha.c (elf64_alpha_check_relocs): Don't set reltext
10625 for non-allocated sections.
10626
10627 2002-01-25 Mark Kettenis <kettenis@gnu.org>
10628
10629 * elf.c (elfcore_write_prstatus): Make sure we pass the address of
10630 prstat.pr_reg even if it is a struct.
10631
10632 2002-01-25 Steve Ellcey <sje@cup.hp.com>
10633
10634 * elfxx-ia64.c: Reset AIX vector function overrides for HP-UX.
10635
10636 2002-01-25 Philipp Thomas <pthomas@suse.de>
10637
10638 * coffgen.c (coff_print_symbol): Don't mark info message
10639 for translation.
10640
10641 2002-01-25 Nick Clifton <nickc@redhat.com>
10642
10643 * po/fr.po: Updated translation.
10644 * po/es.po: Updated translation.
10645
10646 2002-01-25 Philipp Thomas <pthomas@suse.de>
10647
10648 * coff-alpha.c (alpha_relocate_section): Unify warning message
10649 for GP relative relocations without GP defined.
10650 * coff-mips.c (mips_relocate_section): Likewise.
10651
10652 2002-01-25 Alan Modra <amodra@bigpond.net.au>
10653
10654 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Avoid
10655 unsigned overflow when new_offset < old_offset.
10656
10657 2002-01-24 Philipp Thomas <pthomas@suse.de>
10658
10659 * bfd.c (_bfd_abort): Fix typo.
10660
10661 2002-01-23 Richard Henderson <rth@redhat.com>
10662
10663 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't suppress
10664 plt entries for undefweak symbols.
10665
10666 2002-01-23 Steve Ellcey <sje@cup.hp.com>
10667
10668 * targets.c (bfd_elf32_ia64_hpux_big_vec): Add to DEFAULT_VECTOR.
10669 (bfd_elf64_ia64_hpux_big_vec): Ditto.
10670 (bfd_elf32_h8300_vec): Ditto.
10671
10672 2002-01-23 Alan Modra <amodra@bigpond.net.au>
10673
10674 * elf64-ppc.c: Remove stale part of ABI comment.
10675 (NO_OPD_RELOCS): Define.
10676 (ppc64_elf_check_relocs): Use it.
10677 (ppc64_elf_relocate_section): Here too.
10678 (build_one_stub): Don't point function syms at the stub. Instead,
10679 hijack plt.offset.
10680 (ppc64_elf_relocate_section): Check whether REL24 relocs should
10681 really go to the stub. Make all dynamic relocs in opd against
10682 locals.
10683 (ppc64_elf_finish_dynamic_symbol): Allow for non-standard use of
10684 plt.offset.
10685
10686 2002-01-22 Richard Henderson <rth@redhat.com>
10687
10688 * elf64-alpha.c (INSN_UNOP): Encode with RB as $sp.
10689
10690 2002-01-22 Alan Modra <amodra@bigpond.net.au>
10691
10692 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Correct sign of
10693 TOC_BASE_OFF adjustment.
10694
10695 * Makefile.am: Run "make dep-am".
10696 * Makefile.in: Regenerate.
10697 * po/SRC-POTFILES.in: Regenerate.
10698
10699 2002-01-22 John David Anglin <dave@hiauly1.hia.nrc.ca>
10700
10701 * configure.host (hppa*64*-*-hpux*, hppa*64*-*-linux*): Add new
10702 host defines.
10703
10704 2002-01-21 Hans-Peter Nilsson <hp@axis.com>
10705
10706 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GOTREL>:
10707 Check for and emit error if sgot is NULL at this point.
10708
10709 2002-01-21 Jason Thorpe <thorpej@wasabisystems.com>
10710
10711 * config.bfd (ia64*-*-netbsd*): New target.
10712
10713 2002-01-21 Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
10714
10715 * som.c (som_write_space_strings): Comment typo fix.
10716
10717 2002-01-21 Alan Modra <amodra@bigpond.net.au>
10718
10719 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_func and
10720 is_func_descriptor fields.
10721 (link_hash_newfunc): Init them.
10722 (ppc64_elf_check_relocs): Only R_PPC24_REL24 syms starting with a
10723 dot are candidates for plt entries. When processing .opd relocs,
10724 set function descriptor strings to point inside function code
10725 string, and set new ppc_link_hash_entry fields.
10726 (ppc64_elf_gc_sweep_hook): Don't sweep R_PPC64_REL24 relocs.
10727 (ppc64_elf_adjust_dynamic_symbol): Remove most code dealing with
10728 function descriptors. It's now done in..
10729 (func_desc_adjust): New.
10730 (ppc64_elf_func_desc_adjust): New.
10731 (define elf_backend_always_size_sections): Define.
10732 (ppc64_elf_hide_symbol): New.
10733 (define elf_backend_hide_symbol): Define.
10734 (allocate_dynrelocs): Remove code looking up function descriptors
10735 as that has been done earlier.
10736 (ppc64_elf_size_dynamic_sections): Use htab shortcut to elf hash
10737 table.
10738 (ppc64_elf_finish_dynamic_symbol): Likewise. Remove code looking
10739 up function descriptor.
10740 (build_one_stub): Look up the function code sym. Check for
10741 invalid plt offsets.
10742 (ppc64_elf_relocate_section): Tweak calls to undefined weak syms.
10743 Convert R_PPC64_TOC relocs to R_PPC64_RELATIVE in shared libs.
10744
10745 * elf-bfd.h (elf_backend_data <elf_backend_hide_symbol>): Add
10746 boolean param.
10747 (_bfd_elf_link_hash_hide_symbol): Likewise.
10748 * elflink.h (elf_link_add_object_symbols): Adjust call to
10749 elf_backend_hide_symbol.
10750 (elf_fix_symbol_flags): Likewise.
10751 (elf_link_assign_sym_version): Likewise. Use bfd_malloc rather
10752 than bfd_alloc.
10753 * elf.c (_bfd_elf_link_hash_hide_symbol): Add "force_local" param.
10754 Set ELF_LINK_FORCED_LOCAL and call _bfd_elf_strtab_delref.
10755 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
10756 (clobber_millicode_symbols): Adjust to suit new hide_symbol.
10757 * elf32-cris.c (elf_cris_hide_symbol): Add "force_local" param
10758 and adjust to suit.
10759 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise, and call
10760 _bfd_elf_link_hash_hide_symbol rather than duplicating code.
10761 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
10762
10763 2002-01-18 Alan Modra <amodra@bigpond.net.au>
10764
10765 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Test for a
10766 dynamic function descriptor symbol, not the associated function
10767 symbol.
10768
10769 2002-01-17 Eric Christopher <echristo@redhat.com>
10770
10771 * elf32-mips.c (mips_elf_calculate_relocation): Fix typo.
10772
10773 2002-01-17 Nick Clifton <nickc@cambridge.redhat.com>
10774
10775 * po/bfd.pot: Regenerate.
10776 * po/fr.po: Regenerate.
10777
10778 2002-01-17 Alan Modra <amodra@bigpond.net.au>
10779
10780 * elf-bfd.h (elf_backend_data <elf_backend_section_from_bfd_section>):
10781 Remove "Elf_Internal_Shdr *" param.
10782 (_bfd_mips_elf_section_from_bfd_section): Ditto.
10783 * elf32-mips.c (_bfd_mips_elf_section_from_bfd_section): Ditto.
10784 * elf32-m32r.c (_bfd_m32r_elf_section_from_bfd_section): Ditto.
10785 * elf32-v850.c (v850_elf_section_from_bfd_section): Ditto.
10786 * elf64-mmix.c (mmix_elf_section_from_bfd_section): Ditto.
10787 * elfxx-ia64.c (elfNN_hpux_backend_section_from_bfd_section): Ditto.
10788 * elf.c (_bfd_elf_section_from_bfd_section): Allow backend
10789 function to override special sections. Remove hdr arg from
10790 backend call, and don't loop.
10791
10792 2002-01-16 Eric Christopher <echristo@redhat.com>
10793
10794 * elf32-mips.c (mips_elf_calculate_relocation): Set require_jalxp
10795 on R_MIPS_26 and target is 16bit. Add R_MIPS16_GPREL to list of
10796 relocations requiring gp0 and gp.
10797
10798 2002-01-16 Richard Earnshaw <rearnsha@arm.com>
10799
10800 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle
10801 EF_ARM_VFP_FLOAT.
10802 (elf32_arm_print_private_bfd_data): Likewise.
10803
10804 2002-01-16 Nick Clifton <nickc@cambridge.redhat.com>
10805
10806 * po/tr.po: Import new version.
10807
10808 2002-01-16 Alan Modra <amodra@bigpond.net.au>
10809
10810 * elf64-ppc.c (ppc64_elf_howto_raw): Remove stale FIXMEs.
10811 (ppc64_elf_reloc_type_lookup): Use proper CTOR reloc.
10812 (ORI_R0_R0_0): Correct.
10813
10814 2002-01-16 Alan Modra <amodra@bigpond.net.au>
10815
10816 * elflink.c (_bfd_elf_create_dynamic_sections): Don't set SEC_CODE
10817 when plt_not_loaded.
10818 * elf64-ppc.c (ppc64_elf_create_dynamic_sections): No need to
10819 clear .plt SEC_CODE here. Create .stub and correct .glink flags.
10820 (PLT_INITIAL_ENTRY_SIZE): Set to 24.
10821 (ppc64_elf_glink_code): Delete.
10822 (PPC64_ELF_GLINK_SIZE): Delete.
10823 (ADDIS_R12_R2, STD_R2_40R1, LD_R11_0R12, LD_R2_0R12, MTCTR_R11,
10824 BCTR, ADDIS_R12_R12_1, LD_R2_40R1, NOP, LI_R0_0, B_DOT, LIS_R0_0,
10825 ORI_R0_R0_0): Define.
10826 (PLT_CALL_STUB_SIZE, GLINK_CALL_STUB_SIZE): Define.
10827 (struct ppc_link_hash_table): Add sstub and plt_overflow.
10828 (ppc64_elf_link_hash_table_create): Init them.
10829 (ppc64_elf_check_relocs <R_PPC64_REL24>): Refcount .plt entry.
10830 Don't copy to shared lib.
10831 (ppc64_elf_check_relocs): Call bfd_set_error on errors.
10832 (ppc64_elf_gc_sweep_hook <R_PPC64_REL24>): Sweep plt refcount.
10833 (allocate_dynrelocs <plt>): Don't change function sym here. Make
10834 room for .stub and .glink code.
10835 (ppc64_elf_size_dynamic_sections): Handle .stub. Make entry for
10836 DT_PPC64_GLINK.
10837 (ppc64_elf_final_link): Rename to ppc64_elf_set_toc. Don't call
10838 bfd_elf64_bfd_final_link.
10839 (bfd_elf64_bfd_final_link): Don't define.
10840 (ppc64_elf_size_stubs): New.
10841 (build_plt_stub): New.
10842 (build_one_stub): New.
10843 (ppc64_elf_build_stubs): New.
10844 (ppc64_elf_relocate_section <toc relocs>): Remove assert.
10845 (ppc64_elf_relocate_section): Don't copy R_PPC64_REL24 relocs.
10846 (ppc64_elf_finish_dynamic_symbol): Don't build stubs here. Set
10847 DT_PPC64_GLINK entry. Tweak DT_PLTGOT, DT_JMPREL, DT_PLTRELSZ in
10848 case output sections not separate. Adjust DT_RELASZ to not
10849 include plt relocs. Set reserved got entry. Set got and plt
10850 entry size.
10851 (elf_backend_got_header_size): Set to 8.
10852 * elf64-ppc.h: New file.
10853
10854 2002-01-16 Alan Modra <amodra@bigpond.net.au>
10855
10856 * elf32-arm.h (elf32_arm_size_dynamic_sections): When removing
10857 sections, use bfd_section_list_remove.
10858 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
10859 * elflink.h (elf_link_add_object_symbols): When removing all
10860 sections, use bfd_section_list_clear.
10861
10862 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
10863
10864 * po/sv.po: New file: Swedish translation.
10865 * configure.in (ALL_LINGUAS): Add sv.
10866 * configure: Regenerate.
10867
10868 2002-01-15 Jakub Jelinek <jakub@redhat.com>
10869
10870 * elflink.h (elf_link_input_bfd): Back out 2002-01-07 change.
10871 * elf.c (merge_sections_remove_hook): New function.
10872 (_bfd_elf_merge_sections): Pass it as 3rd argument to
10873 _bfd_merge_sections.
10874 * libbfd-in.h (_bfd_merge_sections): Add 3rd argument.
10875 * libbfd.h: Rebuilt.
10876 * merge.c (_bfd_merge_sections): Add remove_hook argument.
10877 Call remove_hook if a SEC_EXCLUDE section is encountered.
10878
10879 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
10880
10881 * elf32-xstormy16.c (xstormy16_reloc_map): Add new field 'table'.
10882 (xstormy16_reloc_map): Initialise new field with correct howto
10883 table.
10884 (xstormy16_reloc_type_lookup): Use 'table' field to locate correct
10885 howto entry.
10886
10887 2002-01-10 Michael Snyder <msnyder@redhat.com>
10888
10889 * elf.c (elfcore_write_prstatus): Use long instead of pid_t;
10890 (elfcore_write_pstatus): Use long instead of pid_t;
10891 * elf-bfd.h: Change prototypes to use long instead of pid_t;
10892
10893 2002-01-09 Jason Thorpe <thorpej@wasabisystems.com>
10894
10895 * elf.c: Update copyright years.
10896 (elfcore_grok_netbsd_note): Use NT_NETBSDCORE_PROCINFO
10897 and NT_NETBSDCORE_FIRSTMACH. Improve a comment.
10898
10899 2002-01-08 Michael Snyder <msnyder@redhat.com>
10900
10901 Add capability to write corefile note sections, for gdb.
10902 * elf.c (elfcore_write_note): New function.
10903 (elfcore_write_prpsinfo): New function.
10904 (elfcore_write_prstatus): New function.
10905 (elfcore_write_pstatus): New function.
10906 (elfcore_write_prfpreg): New function.
10907 (elfcore_write_prxfpreg): New function.
10908 * elf-bfd.h: Add prototypes for above functions.
10909
10910 2002-01-08 Alexandre Oliva <aoliva@redhat.com>
10911
10912 * elf.c (elf_fake_sections): Propagate errors from
10913 elf_backend_fake_section.
10914
10915 2002-01-07 Jason Thorpe <thorpej@wasabisystems.com>
10916
10917 * Makefile.am (BFD32_BACKENDS): Add elf32-sh-nbsd.lo.
10918 (BFD32_BACKENDS_CFILES): Add elf32-sh-nbsd.c.
10919 (elf32-sh-nbsd.lo): New rule.
10920 * Makefile.in: Regenerate.
10921 * config.bfd (sh*le-*-netbsdelf*): New target.
10922 (sh*-*-netbsdelf*): New target.
10923 * configure.in: Include netbsd-core.lo for native sh*-*-netbsd*.
10924 (bfd_elf32_shnbsd_vec): New vector.
10925 (bfd_elf32_shlnbsd_vec): New vector.
10926 * configure: Regenerate.
10927 * elf32-sh-nbsd.c: New file.
10928 * targets.c: Update copyright years.
10929 (_bfd_target_vector): Add bfd_elf32_shlnbsd_vec and
10930 bfd_elf32_shnbsd_vec.
10931
10932 2002-01-07 Aldy Hernandez <aldyh@redhat.com>
10933
10934 * coff-rs6000.c (READ20): Use bfd_scan_vma.
10935
10936 2002-01-07 Geoffrey Keating <geoffk@redhat.com>
10937
10938 * elflink.h (elf_link_input_bfd): Don't ask for the merged offset
10939 of a symbol in a section that will be deleted.
10940
10941 2002-01-07 Nick Clifton <nickc@cambridge.redhat.com>
10942
10943 * po/es.po: New file: Spanish translation.
10944 * configure.in (ALL_LINGUAS): Add es.
10945 * configure: Regenerate.
10946
10947 2002-01-06 Steve Ellcey <sje@cup.hp.com>
10948
10949 * elfxx-ia64.c (is_unwind_section_name): Add target vector as
10950 argument so we can handle HP-UX specially.
10951 (elfNN_ia64_hpux_vec): New for use in is_unwind_section_name.
10952 (elfNN_hpux_backend_section_from_bfd_section): New for support
10953 of SHN_IA_64_ANSI_COMMON.
10954 (elfNN_ia64_relax_section): Add support for SHN_IA_64_ANSI_COMMON.
10955 (is_unwind_section_name): Add special HP-UX support.
10956 (elfNN_ia64_section_from_shdr): Add support for more sections.
10957 (elfNN_ia64_fake_sections): Modify is_unwind_section_name call and
10958 add support for more sections.
10959 (elfNN_ia64_additional_program_headers): Modify
10960 is_unwind_section_name call.
10961 (elfNN_ia64_modify_segment_map): Remove assumption that there is
10962 only one unwind section in segment.
10963
10964 2002-01-06 Alan Modra <amodra@bigpond.net.au>
10965
10966 * syms.c (_bfd_generic_make_empty_symbol): New function.
10967 * libbfd-in.h (_bfd_nosymbols_make_empty_symbol): Define as
10968 _bfd_generic_make_empty_symbol.
10969 * libbfd.h: Regenerate.
10970 * bfd-in2.h: Regenerate.
10971 * hppabsd-core.c (hppabsd_core_make_empty_symbol): Delete function.
10972 (hppabsd_core_get_symtab_upper_bound): Don't define.
10973 (hppabsd_core_get_symtab): Likewise.
10974 (hppabsd_core_print_symbol): Likewise.
10975 (hppabsd_core_get_symbol_info): Likewise.
10976 (hppabsd_core_bfd_is_local_label_name): Likewise.
10977 (hppabsd_core_get_lineno): Likewise.
10978 (hppabsd_core_find_nearest_line): Likewise.
10979 (hppabsd_core_bfd_make_debug_symbol): Likewise.
10980 (hppabsd_core_read_minisymbols): Likewise.
10981 (hppabsd_core_minisymbol_to_symbol): Likewise.
10982 (hppabsd_core_vec): Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols).
10983 Formatting fixes.
10984 * hpux-core.c: Similarly.
10985 * irix-core.c: Similarly.
10986 * osf-core.c: Similarly.
10987 * sco5-core.c: Similarly.
10988 * binary.c (binary_make_empty_symbol): Remove function, define as
10989 _bfd_generic_make_empty_symbol.
10990 * ihex.c (ihex_make_empty_symbol): Likewise.
10991 * mmo.c (mmo_make_empty_symbol): Likewise.
10992 * ppcboot.c (ppcboot_make_empty_symbol): Likewise.
10993 * srec.c (srec_make_empty_symbol): Likewise.
10994 * versados.c (versados_make_empty_symbol): Likewise.
10995 * vms.c (_bfd_vms_make_empty_symbol): Remove.
10996 (vms_make_empty_symbol): Define as _bfd_generic_make_empty_symbol.
10997 * vms-gsd.c (_bfd_vms_slurp_gsd): Call bfd_make_empty_symbol
10998 rather than _bfd_vms_make_empty_symbol.
10999 * vms-misc.c (new_symbol): Likewise.
11000
11001 2002-01-05 Alan Modra <amodra@bigpond.net.au>
11002
11003 * section.c (bfd_section_init): Remove unnecessary initialisations.
11004 (bfd_section_list_clear): New function.
11005 (bfd_section_list_remove, bfd_section_list_insert): New macros.
11006 (_bfd_strip_section_from_output): Use them.
11007 * coffcode.h (coff_set_alignment_hook): Likewise.
11008 * elf32-mips.c (_bfd_mips_elf_final_link): Likewise.
11009 * elf64-mips.c (mips_elf64_final_link): Likewise.
11010 * elf64-mmix.c (mmix_elf_final_link): Likewise.
11011 * sunos.c (sunos_add_dynamic_symbols): Likewise.
11012 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
11013 * bfd-in2.h: Regenerate.
11014
11015 * netbsd-core.c (netbsd_core_file_p): Use bfd_make_section_anyway
11016 rather than doing our own section handling. Clean up after errors
11017 with bfd_release and bfd_section_list_clear. Handle unexpected
11018 flags.
11019 * aoutf1.h (sunos4_core_file_p): Likewise.
11020 * aix386-core.c (aix386_core_file_p): Likewise.
11021 * cisco-core.c (cisco_core_file_validate): Likewise.
11022 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
11023 * trad-core.c (trad_unix_core_file_p): Likewise.
11024
11025 * hppabsd-core.c (hppabsd_core_core_file_p): Clean up after errors
11026 with bfd_release and bfd_section_list_clear.
11027 * hpux-core.c (hpux_core_core_file_p): Likewise.
11028 * irix-core.c (irix_core_core_file_p): Likewise.
11029 * lynx-core.c (lynx_core_file_p): Likewise.
11030 * osf-core.c (osf_core_core_file_p): Likewise.
11031 * rs6000-core.c (rs6000coff_core_p): Likewise.
11032 * sco5-core.c (sco5_core_file_p): Likewise.
11033
11034 * elf32-mips.c (_bfd_mips_elf_lo16_reloc): Simplify, and perform
11035 sign extension adjustments without conditionals.
11036
11037 2002-01-04 Jakub Jelinek <jakub@redhat.com>
11038
11039 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Don't crash if
11040 CIE at .eh_frame start is removed due to no FDEs referencing it.
11041
11042 2002-01-04 Jason Thorpe <thorpej@wasabisystems.com>
11043
11044 * config.bfd (x86_64-*-netbsd*): New target.
11045 * configure.in (x86_64-*-netbsd*): Set COREFILE
11046 to netbsd-core.lo.
11047 * configure: Regenerated.
11048
11049 2002-01-03 Tom Rix <trix@redhat.com>
11050
11051 * xcofflink.c (_bfd_xcoff_bfd_final_link): Update .pad section ordering
11052 for recent bfd_make_section_anyway change.
11053
11054 2002-01-03 Nick Clifton <nickc@cambridge.redhat.com>
11055
11056 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
11057 R_ARM_THM_PC11 reloc.
11058
11059 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
11060
11061 * configure.in (LINGUAS): Add ja.
11062 * configure: Regenerate.
11063 * po/ja.po: Import from translation project's web site.
11064
11065 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
11066
11067 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Reformat error
11068 messages to ease translation into other languages.
11069
11070 For older changes see ChangeLog-0001
11071 \f
11072 Local Variables:
11073 mode: change-log
11074 left-margin: 8
11075 fill-column: 74
11076 version-control: never
11077 End:
This page took 0.320095 seconds and 5 git commands to generate.