* elf64-ppc.c: Move TARGET_LITTLE_SYM and other macros used by
[deliverable/binutils-gdb.git] / bfd / ChangeLog
1 2003-06-08 Alan Modra <amodra@bigpond.net.au>
2
3 * elf64-ppc.c: Move TARGET_LITTLE_SYM and other macros used by
4 elfxx-target.h so that we can use elf_backend_got_header_size.
5 (ELF_MACHINE_ALT1, ELF_MACHINE_ALT2): Delete.
6 (GLINK_CALL_STUB_SIZE): Modify. Define new glink call stub and
7 associated macros.
8 (ppc64_elf_howto_raw <GOT_TPREL16_DS, GOT_TPREL16_LO_DS>): Correct
9 dst_mask.
10 (enum ppc_stub_type): Add ppc_stub_long_branch_r2off and
11 ppc_stub_plt_branch_r2off.
12 (struct ppc_stub_hash_entry): Reorganize.
13 (struct ppc_link_hash_table): Add no_multi_toc, multi_toc_needed,
14 toc_curr, toc_off and emit_stub_syms.
15 (ppc64_elf_link_hash_table_create): Init them.
16 (ppc_stub_name): Correct string size.
17 (ppc64_elf_check_relocs): Set has_gp_reloc on GOT and TOC relocs.
18 (ppc64_elf_size_dynamic_sections): Set no_multi_toc if GOT entries
19 used.
20 (ppc_type_of_stub): Tweak root.type test.
21 (build_plt_stub): Remove glink code. Adjust for insn macro changes.
22 (ppc_size_one_stub): Handle ppc_stub_long_branch_r2off and
23 ppc_stub_plt_branch_r2off.
24 (ppc_build_one_stub): Likewise. Fix var shadowing. Correct addis,addi
25 range test. Use toc_off to calculte r2 values. Handle emit_stub_syms.
26 (ppc64_elf_setup_section_lists): Remove htab creator flavour test.
27 Initialize elf_gp and toc_curr.
28 (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): New functions.
29 (ppc64_elf_next_input_section): Set toc_off.
30 (group_sections): Ensure groups have the same TOC.
31 (ppc64_elf_size_stubs): Check whether we need a TOC adjusting stub.
32 (ppc64_elf_build_stubs): Add emit_stub_syms param, and stash in htab.
33 Build new glink stub.
34 (ppc64_elf_relocate_section): Handle multiple TOCs. Fix comments.
35 (ppc64_elf_finish_dynamic_sections): Adjust DT_PPC64_GLINK.
36 * elf64-ppc.h (ppc64_elf_build_stubs): Update prototype.
37 (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): Declare.
38 * section.c (struct sec): Rename flag12 to has_gp_reloc.
39 (STD_SECTION): Update.
40 * ecoff.c (bfd_debug_section): Update comment.
41 * bfd-in2.h: Regenerate.
42
43 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
44
45 * elfcode.h (elf_slurp_reloc_table_from_section): Don't dereference
46 NULL function pointers.
47
48 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
49
50 * simple.c (bfd_simple_get_relocated_section_contents): Call
51 _bfd_generic_link_add_symbols instead of bfd_link_add_symbols.
52
53 2003-06-04 Svein E. Seldal <Svein.Seldal@solidas.com>
54
55 * coff-tic54x.c: Removed the ticoff0_bad_format_hook() and
56 ticoff1_bad_format_hook() functions. Removed the coff0 and coff1
57 swaptables.
58 * coff-tic4x.c: Ditto
59 * coffcode.h: Added extra arguments to CREATE_BIG_COFF_TARGET_VEC
60 and CREATE_LITTLE_COFF_TARGET_VEC. Created the macro
61 CREATE_BIGHDR_COFF_TARGET_VEC. Created the ticoff0_bad_format_hook(),
62 ticoff1_bad_format_hook() functions. Created the coff0 and coff1
63 swap tables.
64 * coff-tic4x.c: Adopted new CREATE_xxx_COFF_TARGET_VEC macros.
65 * coff-a29k.c: Append COFF_SWAP_TABLE argument
66 * coff-apollo.c: Ditto
67 * coff-arm.c: Ditto
68 * coff-h8300.c: Ditto
69 * coff-h8500.c: Ditto
70 * coff-i960.c: Ditto
71 * coff-m68k.c: Ditto
72 * coff-m88k.c: Ditto
73 * coff-mcore.c: Ditto
74 * coff-sh.c: Ditto
75 * coff-sparc.c: Ditto
76 * coff-tic80.c: Ditto
77 * coff-we32k.c: Ditto
78 * coff-z8k.c: Ditto
79 * coff-w65.c: Ditto
80
81 2003-06-04 Svein E. Seldal <Svein.Seldal@solidas.com>
82
83 * coff-tic4x.c (ticoff0_swap_table, ticoff1_swap_table): Fixed
84 initialization bug
85
86 2003-06-03 Jakub Jelinek <jakub@redhat.com>
87
88 * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_STACK.
89 (bfd_section_from_phdr): Likewise.
90 (map_sections_to_segments): Create PT_GNU_STACK segment header.
91 (get_program_header_size): Count with PT_GNU_STACK.
92 * elf-bfd.h (struct elf_obj_tdata): Add stack_flags.
93 * elflink.h (bfd_elfNN_size_dynamic_sections): Set stack_flags.
94
95 2003-06-03 H.J. Lu <hongjiu.lu@intel.com>
96
97 * elflink.h (elf_link_input_bfd): Call linker error_handler
98 for discarded definitions.
99
100 2003-06-03 Elias Athanasopoulos <elathan@phys.uoa.gr>
101
102 * syms.c (decode_section_type): Return 'n' if section flags are
103 SEC_HAS_CONTENTS && SEC_READONLY.
104
105 2003-06-03 Nick Clifton <nickc@redhat.com>
106
107 * elf32-v850.c (v850_elf_howto_t): Rename R_V850_32to
108 R_V850_ABS32. Add entry for R_V850_REL32.
109 (v850_elf_reloc_map): Likewise.
110 (v850_elf_check_relocs): Likewise.
111 (v850_elf_perform_relocation): Likewise.
112 (v850_elf_final_link_relocate): Likewise. Include computation
113 to make R_V850_REl32 pc-relative.
114
115 2003-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
116
117 * elf32-sh.c (sh_elf_size_dynamic_sections): Create .interp section
118 and DT_DEBUG dynamic tag even for position independent executables.
119 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewize.
120
121 2003-06-02 Daniel Jacobowitz <drow@mvista.com>
122
123 * config.bfd: Move obsolete entries out of the range of the
124 targmatch sed script.
125
126 2003-06-02 Daniel Jacobowitz <drow@mvista.com>
127
128 * config.bfd (mips*-dec-bsd*, mips*-*-pe*): Mark as obsolete.
129
130 2003-05-31 Jakub Jelinek <jakub@redhat.com>
131
132 * elf32-ppc.c (allocate_dynrelocs): Use single slot for first 8192
133 plt entries, not just 8191.
134
135 2003-05-30 Daniel Jacobowitz <drow@mvista.com>
136
137 * elfxx-mips.c (_bfd_mips_elf_discard_info): Correct loop index.
138 Reported by Ken Faiczak <kfaiczak@SANDVINE.com>.
139
140 2003-05-30 Ulrich Drepper <drepper@redhat.com>
141 Jakub Jelinek <jakub@redhat.com>
142
143 * elflink.h (elf_link_add_object_symbols): Use !info->executable
144 instead of info->shared where appropriate.
145 (bfd_elfNN_size_dynamic_sections, elf_link_output_extsym): Likewise.
146 * elflink.c (_bfd_elf_create_got_section): Likewise.
147 (_bfd_elf_link_create_dynamic_sections): Likewise.
148 (_bfd_elf_link_assign_sym_version): Likewise.
149 * elf32-i386.c (elf_i386_size_dynamic_sections): Create .interp section
150 and DT_DEBUG dynamic tag even for position independent executables.
151 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
152 * elf32-s390.c (elf_s390_size_dynamic_sections: Likewise.
153 * elf64-ppc.c (ppc64_elf_size_dynamic_sections: Likewise.
154 * elf64-s390.c (elf_s390_size_dynamic_sections: Likewise.
155 * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections: Likewise.
156 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections: Likewise.
157 * elf32-sparc.c (elf32_sparc_size_dynamic_sections: Likewise.
158 * elf64-alpha.c (elf64_alpha_size_dynamic_sections: Likewise.
159 * elf64-sparc.c (sparc64_elf_size_dynamic_sections: Likewise.
160
161 2003-05-30 Kris Warkentin <kewarken@qnx.com>
162
163 * elf.c (elfcore_grok_nto_status): Only set lwpid for the active or
164 signalled thread.
165 (elfcore_grok_nto_gregs): Only make .reg section for the active thread.
166
167 2003-05-29 Nick Clifton <nickc@redhat.com>
168
169 * pef.c: Include "safe-ctype.h" instead of <ctype.h>.
170 Tidy up formatting.
171 * Makefile.am: Add dependency on safe-ctype.h.
172 * Makefile.in: Regenerate.
173
174 2003-05-29 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
175
176 * elfxx-mips.c: Don't force symbols local unconditionally.
177
178 2003-05-28 Alan Modra <amodra@bigpond.net.au>
179
180 * elf32-hppa.c (elf32_hppa_relocate_section): Delete bogus
181 undefined_symbol call.
182
183 2003-05-27 Richard Sandiford <rsandifo@redhat.com>
184
185 * elfxx-mips.c (mips_elf_hash_sort_data): Fix formattting.
186 (mips_elf_link_hash_table): Likewise.
187
188 2003-05-22 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
189
190 * elf64-mips.c (elf_mips_gnu_rel16_s2): Add internally used
191 R_MIPS_GNU_REL16_S2 support.
192 (bfd_elf64_bfd_reloc_type_lookup): Use it.
193 (mips_elf64_rtype_to_howto): Use it.
194 * elfn32-mips.c (elf_mips_gnu_rel16_s2): Add internally used
195 R_MIPS_GNU_REL16_S2 support.
196 (bfd_elf32_bfd_reloc_type_lookup): Use it.
197 (mips_elf_n32_rtype_to_howto): Use it.
198
199 2003-05-21 Stuart F. Downing <sdowning@fame.com>
200
201 * som.h: Define PA_2_0 before including a.out.h
202
203 2003-05-07 Eric Christopher <echristo@redhat.com>
204 Alexandre Oliva <aoliva@redhat.com>
205
206 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Adjust
207 pic tests, change to warning.
208 (_bfd_mips_elf_final_link): Remove EF_MIPS_CPIC flag setting.
209
210 2003-05-21 Marcus Comstedt <marcus@mc.pp.se>
211
212 * config.bfd: Check for a target triplet of shl-...-netbsdelf as
213 well as shle-...-netbsdelf. Remove duplicate entry.
214
215 2003-05-21 Nick Clifton <nickc@redhat.com>
216
217 * elf32-xstormy16.c (xstormy16_elf_howto_table): Fix dst_mask
218 for X_STORMY16_REL_12 reloc.
219
220 * elf.c (bfd_elf_get_needed_list): Use is_elf_hash_table to check
221 the type of the has table in the bfd_link_info structure.
222 (bfd_elf_get_runpath_list): Likewise.
223
224 2003-05-19 Roland McGrath <roland@redhat.com>
225
226 * elf.c (bfd_elf_bfd_from_remote_memory): New function.
227 * bfd-in.h: Declare it.
228 * bfd-in2.h: Regenerated.
229 * elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): New function.
230 * elf-bfd.h (struct elf_backend_data): New function pointer member
231 elf_backend_bfd_from_remote_memory.
232 (_bfd_elf32_bfd_from_remote_memory, _bfd_elf64_bfd_from_remote_memory):
233 Declare them.
234 * elfxx-target.h (elf_backend_bfd_from_remote_memory): New macro.
235 (elfNN_bed): Add that to the initializer.
236
237 2003-05-15 Roland McGrath <roland@redhat.com>
238
239 * elf.c (elfcore_grok_note): Grok NT_AUXV note, make ".auxv" section.
240
241 2003-05-20 Jakub Jelinek <jakub@redhat.com>
242
243 * elflink.h (elf_link_output_extsym): Only issue error about !=
244 STV_DEFAULT symbols if they are bfd_link_hash_undefined.
245
246 2003-05-20 H.J. Lu <hongjiu.lu@intel.com>
247
248 * elflink.c (_bfd_elf_merge_symbol): Check ELF_LINK_DYNAMIC_DEF
249 when removing the old definition for symbols with non-default
250 visibility.
251
252 2003-05-18 Jason Eckhardt <jle@rice.edu>
253
254 * elf32-i860.c (elf32_i860_relocate_highadj): Simplify calculation.
255
256 2003-05-17 Andreas Schwab <schwab@suse.de>
257
258 * elf32-m68k.c (elf_m68k_check_relocs): Cache reloc section in
259 elf_section_data during processing of pc-relative and absolute
260 relocations.
261 (elf_m68k_relocate_section): Use the cached reloc section instead
262 of computing it again. Fix handling of visibility. Don't modify
263 addend when copying over a relocation into the output.
264
265 2003-05-17 Alan Modra <amodra@bigpond.net.au>
266
267 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
268 to trim plt entries. Move undefweak non-default visibility test..
269 (allocate_dynrelocs): ..from here.
270 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't test
271 dynamic_sections_created here. Update comment. Move undefweak
272 non-default visibility test..
273 (allocate_dynrelocs): ..from here. Fix comment.
274 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
275 to trim plt entries. Move undefweak non-default visibility test..
276 (allocate_dynrelocs): ..from here. Fix comment.
277 * elflink.h (elf_link_output_extsym): Compare ELF_ST_VISIBILITY with
278 STV_DEFAULT rather than comparing with zero.
279 * elflink.c (_bfd_elf_merge_symbol): Likewise.
280 (_bfd_elf_fix_symbol_flags): Likewise. Format comment.
281
282 2003-05-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
283
284 * bfd.c (_bfd_get_gp_value): Prevent illegal access for abfd null
285 pointers.
286 (_bfd_set_gp_value): Likewise.
287
288 2003-05-16 Michael Snyder <msnyder@redhat.com>
289 From Bernd Schmidt <bernds@redhat.com>
290 * archures.c (bfd_mach_h8300sx): New.
291 * bfd-in2.h: Regenerate.
292 * cpu-h8300.c (h8300_scan)): Add support for h8300sx.
293 (h8300sx_info_struct): New.
294 (h8300s_info_struct): Link to it.
295 * elf32-h8300.c (elf32_h8_mach): Add support for h8300sx.
296 (elf32_h8_final_write_processing): Likewise.
297 (elf32_h8_relax_section): Likewise.
298
299 2003-05-16 Kelley Cook <kelleycook@wideopenwest.com>
300
301 * config.bfd: Accept i[3-7]86 variants.
302 * configure.host: Likewise.
303 * configure.in: Likewise.
304 * configure: Regenerate.
305
306 2003-05-15 H.J. Lu <hongjiu.lu@intel.com>
307
308 * elflink.c (_bfd_elf_fix_symbol_flags): Also hide protected
309 symbol.
310
311 2003-05-15 H.J. Lu <hongjiu.lu@intel.com>
312
313 * elflink.h (elf_link_check_versioned_symbol): Also allow
314 the base version.
315
316 2003-05-15 Alan Modra <amodra@bigpond.net.au>
317 H.J. Lu <hongjiu.lu@intel.com>
318
319 * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL.
320 (elf_i386_relocate_section): Likewise.
321 * elf32-ppc.c (allocate_dynrelocs): Likewise.
322 (ppc_elf_relocate_section): Likewise.
323 * elf64-ppc.c (allocate_dynrelocs): Likewise.
324 (ppc64_elf_relocate_section): Likewise.
325
326 2003-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
327
328 * elf32-mips.c (gprel32_with_gp): Remove useless N64 ABI case.
329
330 2003-05-13 Stephane Carrez <stcarrez@nerim.fr>
331
332 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Check for
333 processor capability, allow merge of HC12 and HCS12 in some cases.
334 (m68hc11_elf_hash_table_create): Use bfd_malloc instead of bfd_zalloc.
335 * cpu-m68hc12.c (bfd_m68hc12s_arch): New struct.
336 (bfd_m68hc12_arch): Link it.
337 (scan_mach): New function.
338
339 2003-05-13 Andrew Haley <aph@redhat.com>
340
341 * elf.c (bfd_elf_hash): Mask lower 32 bits of hash.
342
343 2003-05-13 Alan Modra <amodra@bigpond.net.au>
344 H.J. Lu <hongjiu.lu@intel.com>
345
346 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Move from
347 elf32-ppc.c. Add ELF_LINK_FORCED_LOCAL check.
348 * elf32-ppc.c: (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Delete.
349 (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for dynreloc check.
350 (ppc_elf_relocate_section): Likewise.
351 * elf64-ppc.c (allocate_dynrelocs): Likewise.
352 (ppc64_elf_relocate_section): Likewise. Use for .got relocs too.
353 (ppc64_elf_adjust_dynamic_symbol): Don't assume symbols with .plt
354 relocs need no other types.
355 * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for
356 dynreloc check.
357 (elf_i386_relocate_section): Likewise. Use for .got relocs too.
358 (elf_i386_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL for
359 .got relocs.
360
361 2003-05-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
362
363 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): For weak symbols,
364 copy ELF_LINK_NON_GOT_REF from weakdef.
365 (allocate_dynrelocs): For undef weak syms with non-default
366 visibility, a) don't allocate plt entries, b) don't allocate
367 .got relocs, c) discard dyn rel space
368 (sh_elf_relocate_section): d) don't generate .got relocs, e)
369 don't generate dynamic relocs.
370 (sh_elf_copy_indirect_symbol): Don't copy ELF_LINK_NON_GOT_REF
371 for weakdefs when symbol already adjusted.
372
373 2003-05-12 Nick Clifton <nickc@redhat.com>
374
375 * elf32-xstormy16.c (xstormy16_elf_howto_table): use 'bitfield'
376 overflow detection for R_XSTORMY16_16 reloc.
377
378 2003-05-12 Paul Clarke <paulc@senet.com.au>
379
380 * elf32-h8300.c: Fix typo in name of R_H8_DIR8 reloc.
381
382 2003-05-11 Jason Eckhardt <jle@rice.edu>
383
384 * elf32-i860.c (elf32_i860_relocate_highadj): Properly
385 adjust upper bits.
386 (elf32_i860_relocate_splitn): Obtain upper 5 bits from the
387 proper place.
388 (elf32_i860_relocate_pc16): Obtain upper 5 bits from the
389 proper place.
390
391 2003-05-11 Andreas Schwab <schwab@suse.de>
392
393 * elf32-m68k.c (elf_m68k_relocate_section): Replace ugly
394 complicated tests for unresolvable relocs with a simple direct
395 scheme using "unresolved_reloc" var. Report some detail on
396 bfd_reloc_outofrange and similar errors.
397
398 2003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
399
400 * elf32-s390.c (allocate_dynrelocs, elf_s390_relocate_section):
401 Fix WILL_CALL_FINISH_DYNAMIC_SYMBOL call.
402 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
403 * elf64-s390.c: Likewise.
404
405 2003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
406
407 * elf32-s390.c (ELIMINATE_COPY_RELOCS): Define as one.
408 (elf_s390_adjust_dynamic_symbol): For weak symbols, copy
409 ELF_LINK_NON_GOT_REF from weakdef.
410 (elf_s390_copy_indirect_symbol): Test whether the weakdef sym has
411 already been adjusted before treating it specially.
412 * el64-s390.c: Likwise.
413
414 2003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
415
416 * elf32-s390.c (allocate_dynrelocs): For undef weak syms with
417 non-default visibility, a) don't make them dynamic, b) discard
418 space for dynamic relocs.
419 (elf_s390_relocate_section): Initialize the GOT entries and skip
420 R_390_{8,16,32}/R_390_PC{16,16DBL,32DBL,32} for weak undefined
421 symbols with non-default visibility.
422 * elf64-s390.c: Likewise.
423
424 2003-05-09 Alan Modra <amodra@bigpond.net.au>
425
426 * cpu-arm.c (arm_check_note): Warning fix.
427 * elf32-iq2000.c (iq2000_elf_check_relocs): Warning fixes. Arrange
428 to keep relocs if edited.
429 (iq2000_elf_print_private_bfd_data): Return TRUE.
430 * elfxx-ia64.c (elfNN_ia64_relax_section): Use ELFNN_R_SYM, not
431 ELF64_R_SYM.
432 (elfNN_ia64_relax_ldxmov): Warning fix.
433 * xtensa-isa.c (xtensa_add_isa): Warning fix.
434 * xtensa-modules.c (get_num_opcodes): Warning fix.
435
436 2003-05-09 Andrey Petrov <petrov@netbsd.org>
437
438 * elf.c (elf_fake_sections): Use correct cast for sh_name.
439
440 2003-05-09 Alan Modra <amodra@bigpond.net.au>
441
442 * elflink.c (_bfd_elf_link_create_dynamic_sections): Move from
443 elflink.h. Replace LOG_FILE_ALIGN with bed->s->log_file_align.
444 (_bfd_elf_create_dynamic_sections): Use bed->s->log_file_align.
445 (bfd_elf_record_link_assignment): Move from elflink.h.
446 (_bfd_elf_merge_symbol): Likewise.
447 (_bfd_elf_add_default_symbol): Likewise.
448 (_bfd_elf_export_symbol): Likewise.
449 (_bfd_elf_link_find_version_dependencies): Likewise.
450 (_bfd_elf_link_assign_sym_version): Likewise.
451 (_bfd_elf_link_read_relocs): Likewise.
452 (_bfd_elf_link_size_reloc_section): Likewise.
453 (_bfd_elf_fix_symbol_flags): Likewise.
454 (_bfd_elf_adjust_dynamic_symbol): Likewise.
455 (_bfd_elf_link_sec_merge_syms): Likewise.
456 (elf_link_read_relocs_from_section): Likewise. Use bed->s->sizeof_rel
457 and bed->s->sizeof_rela.
458 (_bfd_elf_link_output_relocs): Likewise.
459 * elf-bfd.h (struct elf_size_info): Rename file_align to
460 log_file_align.
461 (struct elf_info_failed): Move from elflink.h.
462 (struct elf_assign_sym_version_info): Likewise.
463 (struct elf_find_verdep_info): Likewise.
464 (_bfd_elf_create_dynamic_sections): Delete duplicate declaration.
465 (_bfd_elf_merge_symbol, _bfd_elf_add_default_symbol,
466 _bfd_elf_export_symbol, _bfd_elf_link_find_version_dependencies,
467 _bfd_elf_link_assign_sym_version,
468 _bfd_elf_link_create_dynamic_sections, _bfd_elf_link_read_relocs,
469 _bfd_elf_link_size_reloc_section, _bfd_elf_link_output_relocs,
470 _bfd_elf_fix_symbol_flags, _bfd_elf_adjust_dynamic_symbol,
471 _bfd_elf_link_sec_merge_syms): Declare.
472 (bfd_elf32_link_create_dynamic_sections): Don't declare.
473 (_bfd_elf32_link_read_relocs): Likewise.
474 (bfd_elf64_link_create_dynamic_sections): Likewise.
475 (_bfd_elf64_link_read_relocs): Likewise.
476 * elflink.h: Move lots o' stuff elsewhere.
477 * bfd-in.h (bfd_elf32_record_link_assignment): Don't declare.
478 (bfd_elf64_record_link_assignment): Likewise.
479 (bfd_elf_record_link_assignment): Declare.
480 * bfd-in2.h: Regenerate.
481 * elfcode.h (elf_link_create_dynamic_sections): Don't declare.
482 (NAME(_bfd_elf,size_info)): Adjust for log_file_align.
483 * elf.c (_bfd_elf_init_reloc_shdr): Adjust for bed->s->log_file_align.
484 (assign_file_positions_for_segments): Likewise.
485 (assign_file_positions_except_relocs): Likewise.
486 (swap_out_syms, elfcore_write_note): Likewise.
487 * elf-m10200.c: Adjust for changed function names.
488 * elf-m10300.c: Likewise.
489 * elf32-arm.h: Likewise.
490 * elf32-h8300.c: Likewise.
491 * elf32-hppa.c: Likewise.
492 * elf32-ip2k.c: Likewise.
493 * elf32-m32r.c: Likewise.
494 * elf32-m68hc11.c: Likewise.
495 * elf32-m68hc1x.c: Likewise.
496 * elf32-m68k.c: Likewise.
497 * elf32-mips.c: Likewise.
498 * elf32-ppc.c: Likewise.
499 * elf32-sh.c: Likewise.
500 * elf32-v850.c: Likewise.
501 * elf32-xtensa.c: Likewise.
502 * elf64-alpha.c: Likewise.
503 * elf64-hppa.c: Likewise.
504 * elf64-mmix.c: Likewise.
505 * elf64-ppc.c: Likewise.
506 * elf64-sh64.c: Likewise.
507 * elfxx-ia64.c: Likewise.
508 * elfxx-mips.c: Likewise.
509 (MIPS_ELF_LOG_FILE_ALIGN): Use log_file_align.
510 * elf64-alpha.c (alpha_elf_size_info): Adjust for log_file_align.
511 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
512 * elf64-mips.c (mips_elf64_size_info): Likewise.
513 * elf64-s390.c (s390_elf64_size_info): Likewise.
514 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
515
516 2003-05-08 H.J. Lu <hongjiu.lu@intel.com>
517
518 * elflink.h (elf_add_default_symbol): After skipping the
519 unversioned symbol, go to non-default one.
520
521 2003-05-07 H.J. Lu <hongjiu.lu@intel.com>
522
523 * elfxx-ia64.c (_bfd_elf_link_hash_hide_symbol): Also clear the
524 want_plt field.
525 (elfNN_ia64_relocate_section): Don't do dynamic symbol lookup
526 for symbols with non-default visibility.
527
528 2003-05-07 H.J. Lu <hongjiu.lu@intel.com>
529
530 * elflink.h (elf_link_check_versioned_symbol): Also handle the
531 case that a DSO references a hidden symbol which may be
532 satisfied by a versioned symbol in another DSO.
533 (elf_link_output_extsym): Check versioned definition for hidden
534 symbol referenced by a DSO.
535
536 2003-05-07 Nick Clifton <nickc@redhat.com>
537
538 * elf32-xstormy16.c (xstormy16_elf_howto_table): Reset
539 R_XSTORMY16_16 reloc to ignore overflows.
540
541 2003-05-06 Alexandre Oliva <aoliva@redhat.com>
542
543 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Improve
544 error message for mixing different-endian files. Check for ABI
545 compatibility of input files with the selected emulation.
546
547 2003-05-05 Alan Modra <amodra@bigpond.net.au>
548
549 * elf32-i386.c (allocate_dynrelocs): For undef weak syms with
550 non-default visibility, a) don't make them dynamic, b) discard
551 space for dynamic relocs.
552 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
553
554 * elf32-ppc.c (allocate_dynrelocs): For undef weak syms with
555 non-default visibility, a) don't allocate plt entries, b) don't
556 allocate .got relocs, c) discard dyn rel space,
557 (ppc_elf_relocate_section): d) don't generate .got relocs, e)
558 don't generate dynamic relocs.
559 * elf64-ppc.c (allocate_dynrelocs): As above.
560 (ppc64_elf_relocate_section): As above.
561
562 2003-05-05 Andreas Jaeger <aj@suse.de>
563
564 * elf64-x86-64.c (allocate_dynrelocs): Don't allocate dynamic
565 relocation entries for weak undefined symbols with non-default
566 visibility.
567 (elf64_x86_64_relocate_section): Initialize the GOT entries and
568 skip R_386_32/R_386_PC32 for weak undefined symbols with
569 non-default visibility.
570
571 2003-05-04 H.J. Lu <hjl@gnu.org>
572
573 * elf32-i386.c (allocate_dynrelocs): Don't allocate dynamic
574 relocation entries for weak undefined symbols with non-default
575 visibility.
576 (elf_i386_relocate_section): Initialize the GOT entries and
577 skip R_386_32/R_386_PC32 for weak undefined symbols with
578 non-default visibility.
579
580 * elfxx-ia64.c (allocate_fptr): Don't allocate function
581 descriptors for weak undefined symbols with non-default
582 visibility.
583 (allocate_dynrel_entries): Don't allocate relocation entries
584 for symbols resolved to 0.
585 (set_got_entry): Don't install dynamic relocation for weak
586 undefined symbols with non-default visibility.
587 (set_pltoff_entry): Likewise.
588
589 * elflink.h (elf_fix_symbol_flags): Hide weak undefined symbols
590 with non-default visibility.
591 (elf_link_output_extsym): Don't make weak undefined symbols
592 with non-default visibility dynamic.
593
594 2003-05-04 H.J. Lu <hjl@gnu.org>
595
596 * elflink.h (elf_merge_symbol): Correctly handle weak definiton.
597
598 2003-05-04 H.J. Lu <hjl@gnu.org>
599
600 * elflink.h (elf_merge_symbol): Don't record a hidden/internal
601 symbol dynamic. Check indirection when removing the old
602 definition for symbols with non-default visibility.
603 (elf_add_default_symbol): Skip when told by elf_merge_symbol.
604
605 2003-05-02 Nick Clifton <nickc@redhat.com>
606
607 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make the
608 R_XSTORMY16_8 and R_XSTORMY16_16 relocs detect and complain about
609 unsigned overflow.
610
611 2003-05-02 Andreas Jaeger <aj@suse.de>
612
613 * elf64-x86-64.c (elf_x86_64_copy_indirect_symbol): Don't copy
614 ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
615 (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
616 (elf_x86_64_adjust_dynamic_symbol): For weak symbols, copy
617 ELF_LINK_NON_GOT_REF from weakdef.
618
619 2003-05-02 Charles Lepple <clepple@ghz.cc>
620 Nick Clifton <nickc@redhat.com>
621
622 * acinclude.m4: Fix name of --enable-install-libbfd switch.
623 * aclocal.m4: Regenerate.
624 * configure: Regenerate.
625 * Makefile.in: Regenerate.
626
627 2003-05-01 Alan Modra <amodra@bigpond.net.au>
628
629 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Test whether the
630 weakdef sym has already been adjusted before treating it specially.
631 * elf32-i386.c (elf_i386_copy_indirect_symbol): Don't copy
632 ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
633 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
634 (ppc64_elf_check_relocs): Set ELF_LINK_NON_GOT_REF.
635
636 2003-04-28 H.J. Lu <hjl@gnu.org>
637
638 * elfxx-ia64.c (elfNN_ia64_relax_section): Relax ldxmov during
639 the relax finalize pass.
640
641 * section.c (struct sec): Add need_finalize_relax and remove
642 flag11.
643 (STD_SECTION): Update struct sec initializer.
644 * bfd-in2.h: Regenerated.
645
646 2003-04-28 H.J. Lu <hjl@gnu.org>
647
648 * elflink.h (elf_merge_symbol): Call elf_backend_copy_indirect_symbol
649 to copy any information related to dynamic linking when we flip
650 the indirection.
651
652 2003-04-27 H.J. Lu <hjl@gnu.org>
653
654 * elf-bfd.h (ELF_LINK_DYNAMIC_DEF): New.
655 (ELF_LINK_DYNAMIC_WEAK): New.
656
657 * elflink.h (elf_merge_symbol): Add one argument to indicate if
658 a symbol should be skipped. Ignore definitions in dynamic
659 objects for symbols with non-default visibility.
660 (elf_add_default_symbol): Adjusted.
661 (elf_link_add_object_symbols): Check if a symbol should be
662 skipped. Don't merge the visibility field with the one from
663 a dynamic object.
664 (elf_link_check_versioned_symbol): Use undef_bfd.
665 (elf_link_output_extsym): Warn if a forced local symbol is
666 referenced from dynamic objects. Make non-weak undefined symbol
667 with non-default visibility a fatal error.
668
669 2003-04-27 Daniel Jacobowitz <drow@mvista.com>
670
671 * configure.in: Bump version on HEAD to 2.14.90.
672 * configure: Regenerated.
673
674 2003-04-26 Stephane Carrez <stcarrez@nerim.fr>
675
676 PR savannah/3331:
677 * elf32-m68hc11.c (m68hc11_elf_relax_section): Clear prev_insn_group
678 when we couldn't relax something.
679
680 2003-04-25 Alan Modra <amodra@bigpond.net.au>
681
682 * elflink.h (elf_merge_symbol): When we find a regular definition
683 for an indirect symbol, flip the indirection so that the old
684 direct symbol now points to the new definition.
685
686 2003-04-24 Roland McGrath <roland@redhat.com>
687
688 * elf.c (bfd_section_from_phdr): Map PT_GNU_EH_FRAME to "eh_frame_hdr".
689
690 2003-04-24 Alan Modra <amodra@bigpond.net.au>
691
692 * elf32-ppc.c: Formatting and comment fixes.
693 (ELIMINATE_COPY_RELOCS): Move before ppc_elf_copy_indirect_symbol.
694 (ppc_elf_copy_indirect_symbol): Copy flags here for weakdefs.
695
696 2003-04-24 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
697
698 * archures.c (bfd_mach_h8300hn, bfd_mach_h8300sn): Added.
699 * bfd-in2.h: Rebuilt.
700 * coff-h8300.c (BADMAG): Add check for H8300HNBADMAG & H8300SNBADMAG.
701 * coffcode.h (coff_set_arch_mach_hook): Add case for H8300HNMAGIC
702 & H8300SNMAGIC.
703 (coff_set_flags): Add case for bfd_mach_h8300hn & bfd_mach_h8300sn.
704 * cpu-h8300.c (h8300_scan): Handle h8300hn, h8300sn.
705 (h8300sn_info_struct, h8300hn_info_struct): New.
706 * elf32-h8300.c (elf32_h8_mach): Handle case for h8300hn & h8300sn
707 (elf32_h8_final_write_processing): Likewise.
708
709 2003-04-23 Kaz Kojima <kkojima@rr.iij4u.or.jp>
710
711 * elf32-sh.c (tpoff): New.
712 (struct elf_sh_dyn_relocs): Remove tls_tpoff32.
713 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
714 (allocate_dynrelocs): Don't make unnecessary dynamic TLS
715 relocations. Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses.
716 (sh_elf_relocate_section): Likewise. Remove unnecessary tests.
717 (dtpoff_base): Fix wrong indentation.
718 (sh_elf_check_relocs): Don't set DF_STATIC_TLS flag with non-TLS
719 relocations. Don't set tls_tpoff32 flag. Don't make unnecessary
720 R_SH_TLS_TPOFF32 relocations.
721
722 2003-04-23 J"orn Rennecke <joern.rennecke@superh.com>
723
724 * archures.c (enum bfd_architecture): Amend comment to refer to SuperH.
725 * cpu-sh.c: Likewise.
726 * elf32-sh.c: Likewise.
727 * reloc.c (bfd_reloc_code_real): Likewise.
728 * elf32-sh64-com.c: Change comment to refer to SuperH.
729 * elf32-sh64.c: Likewise.
730 * elf64-sh64.c: Likewise.
731 * bfd-in2.h (enum bfd_architecture): Regenerate.
732
733 2003-04-23 Alan Modra <amodra@bigpond.net.au>
734
735 From Julien LEMOINE <speedblue@debian.org>
736 * elf32-i386.c (elf_i386_info_to_howto): Delete.
737 (elf_info_to_howto): Define as elf_i386_info_to_howto_rel.
738
739 2003-04-22 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
740
741 * archures.c: Replace references to Mitsubishi M32R with references
742 to Renesas M32R.
743 * relocs.c: Likewise.
744 * bfd-in2.h: Regenerate.
745
746 2003-04-21 Richard Henderson <rth@redhat.com>
747
748 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Return false for an
749 executable when a symbol is defined both regular and dynamic.
750
751 2003-04-21 Stephane Carrez <stcarrez@nerim.fr>
752
753 * Makefile.am (BFD32_BACKENDS): Add elf32-m68hc1x.lo.
754 (elf32-m68hc1x.lo): Update dependencies
755 * configure.in: Add elf32-m68hc1x.lo.
756 * configure: Rebuild.
757 * Makefile.in: Rebuild.
758
759 2003-04-21 Stephane Carrez <stcarrez@nerim.fr>
760
761 * elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
762 (m68hc11_elf_hash_table_create): New function.
763 (elf32_m68hc11_link_hash_table_free): New function.
764 (stub_hash_newfunc): New function.
765 (m68hc11_add_stub): New function.
766 (elf32_m68hc11_add_symbol_hook): New function.
767 (elf32_m68hc11_setup_section_lists): New function.
768 (elf32_m68hc11_next_input_section): New function.
769 (elf32_m68hc11_size_stubs): New function.
770 (elf32_m68hc11_build_stubs): New function.
771 (m68hc11_get_relocation_value): New function.
772 (elf32_m68hc11_relocate_section): Call the above to redirect
773 some relocations to the trampoline code.
774 (m68hc11_elf_export_one_stub): New function.
775 (m68hc11_elf_set_symbol): New function.
776 (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse.
777 (m68hc11_elf_get_bank_parameters): Get parameters only when the info
778 is not yet initialized.
779
780 * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
781 (elf32_m68hc11_stub_hash_entry): New struct.
782 (m68hc11_page_info): Add trampoline handler address.
783 (m68hc11_elf_link_hash_table): Add stubs generation members.
784 (elf32_m68hc11_add_symbol_hook): Declare.
785 (elf32_m68hc11_setup_section_lists): Declare.
786 (elf32_m68hc11_size_stubs): Declare.
787 (elf32_m68hc11_build_stubs): Declare.
788
789 * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c.
790 (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise.
791 (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto.
792 (_bfd_m68hc11_elf_set_private_flags): Ditto.
793 (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto.
794 (_bfd_m68hc11_elf_print_private_bfd_data): Ditto.
795 (bfd_elf32_bfd_link_hash_table_create): Define.
796 (elf_backend_add_symbol_hook): Define.
797 (m68hc11_elf_bfd_link_hash_table_create): New function.
798 (m68hc11_elf_build_one_stub): New function.
799 (m68hc11_elf_size_one_stub): New function.
800 (m68hc11_elf_bfd_link_hash_table_create): Install the above.
801 (bfd_elf32_bfd_link_hash_table_create): Define.
802
803 * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove.
804 (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked.
805 (m68hc12_phys_addr): Ditto.
806 (m68hc12_phys_page): Ditto.
807 (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c.
808 (elf32_m68hc11_gc_mark_hook): Likewise.
809 (elf32_m68hc11_gc_sweep_hook): Likewise.
810 (elf32_m68hc11_check_relocs): Likewise.
811 (elf32_m68hc11_relocate_section): Likewise.
812 (_bfd_m68hc12_elf_set_private_flags): Likewise.
813 (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise.
814 (_bfd_m68hc12_elf_print_private_bfd_data): Likewise.
815 (m68hc12_elf_build_one_stub): New function.
816 (m68hc12_elf_size_one_stub): New function.
817 (m68hc12_elf_bfd_link_hash_table_create): New function, use the above.
818 (elf_backend_add_symbol_hook): Define.
819 (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
820
821 2003-04-18 Nick Clifton <nickc@redhat.com>
822
823 * format.c (bfd_check_format_matches): Only check associated
824 vector if the matching_vector has been created.
825
826 2003-04-15 Alexandre Oliva <aoliva@redhat.com>
827
828 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Fix typo in
829 2003-04-09's change.
830
831 2003-04-15 Brian Ford <ford@vss.fsi.com>
832
833 * peicode.h (coff_swap_scnhdr_in): If a section holds
834 uninitialized data and is from an object file or from an
835 executable image that has not initialized the s_size field, or if
836 the physical size is padded, use the virtual size (stored in
837 s_paddr) instead.
838
839 2003-04-15 H.J. Lu <hjl@gnu.org>
840
841 * elflink.h (elf_link_add_object_symbols): Properly report
842 filename for alignment reduction.
843
844 2003-04-15 Rohit Kumar Srivastava <rohits@kpitcummins.com>
845
846 * archures.c: Replace occurrances of 'Hitachi' with 'Renesas'.
847 * reloc.c: Likewise.
848 * coff-h8300.c: Likewise.
849 * coff-h8500.c: Likewise.
850 * coff-sh.c: Likewise.
851 * cpu-h8300.c: Likewise.
852 * cpu-sh.c: Likewise.
853 * elf32-h8300.c: Likewise.
854 * elf32-sh.c: Likewise.
855 * elf32-sh64-com.c: Likewise.
856 * elf32-sh64.c: Likewise.
857 * elf64-sh64.c: Likewise.
858 * bfd-in2.h: Regenerate.
859
860 2003-04-14 H.J. Lu <hjl@gnu.org>
861
862 * elflink.h (elf_link_add_object_symbols): Maintain maximum
863 alignment for common symbols. Warn reducing alignment for
864 common symbols. Report old filename when symbol size changes.
865
866 2003-04-12 Alexandre Oliva <aoliva@redhat.com>
867
868 * elfxx-mips.c (mips_elf_calculate_relocation): Adjust two other
869 occurrences of the same test changed in the previous patch.
870 Optimize.
871
872 2003-04-11 Alexandre Oliva <aoliva@redhat.com>
873
874 * elfxx-mips.c (mips_elf_get_global_gotsym_index): New.
875 (mips_elf_calculate_relocation): Decay GOT_PAGE/GOT_OFST to
876 GOT_DISP/addend only if the symbol got a global GOT entry.
877
878 2003-04-10 Alexandre Oliva <aoliva@redhat.com>
879
880 * elfxx-mips.c (mips_elf_calculate_relocation): Decay
881 GOT_PAGE/GOT_OFST referencing overridable symbol to
882 GOT_DISP/addend.
883 (_bfd_mips_elf_check_relocs): Handle GOT_PAGE referencing
884 global symbol as GOT_DISP.
885
886 2003-04-10 Bob Wilson <bob.wilson@acm.org>
887
888 * elf32-xtensa.c (elf_xtensa_relocate_section): Don't continue to the
889 next relocation on an undefined symbol.
890
891 2003-04-09 Richard Henderson <rth@redhat.com>
892
893 * elf64-alpha.c (elf64_alpha_relocate_section) <R_ALPHA_GPREL32>:
894 Ignore relocations against r_symndx == 0.
895
896 2003-04-09 H.J. Lu <hjl@gnu.org>
897
898 * elf64-alpha.c (elf64_alpha_relocate_section): Don't return
899 FALSE for undefined symbols.
900 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
901
902 2003-04-09 Alexandre Oliva <aoliva@redhat.com>
903
904 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Try DWARF3-standard
905 and IRIX-specific shift-to-64-bit 4-byte lengths before following
906 addr_size.
907
908 2003-04-08 Alexandre Oliva <aoliva@redhat.com>
909
910 * elf32-mips.c (bfd_elf32_bfd_reloc_type_lookup): Detect (ctor)
911 pointer size from ABI, not arch_bits_per_address.
912
913 2003-04-07 Kevin Buettner <kevinb@redhat.com>
914
915 * elfn32-mips.c (elf32_mips_grok_prstatus): Adjust core file related
916 constants for n32 ABI.
917
918 2003-04-06 Andrew Cagney <cagney@redhat.com>
919
920 * simple.c (bfd_simple_get_relocated_section_contents): Disable
921 free that leads to GDB vs BFD memory corruption.
922
923 2003-04-04 Stephane Carrez <stcarrez@nerim.fr>
924
925 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Also adjust
926 symbols that mark the end of the section.
927 (m68hc11_elf_relax_section): Use R_M68HC11_PCREL_8 relocs when
928 converting to a relative branch so that the offset is computed after
929 the relaxation; also relocate a jsr into a bsr if possible but don't
930 relax them if they are to a far symbol as we need to call the
931 trampoline code.
932 (elf_m68hc11_howto_table): Set pcrel_offset to true.
933
934 2003-04-04 Svein E. Seldal <Svein.Seldal@solidas.com>
935
936 * archures.c: Namespace cleanup. Rename bfd_mach_c3x to
937 bfd_mach_tic3x and bfd_mach_c4x to bfd_mach_tic4x
938 * bfd-in2.h: Regenerate
939 * coff-tic4x.c: Namespace cleanup. Replace s/c4x/tic4x/
940 * cpu-tic4x.c: Ditto
941
942 2003-04-03 Nick Clifton <nickc@redhat.com>
943
944 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Compute ps and ss
945 differently for object files and executables.
946 * peicode.h (coff_swap_scnhdr_in): Only set the s_size field
947 for object files or for executables who have not already
948 initialised the field.
949 * libpei.h (bfd_pe_executable_p): New macro. Return true if
950 the PE format bfd is an executable.
951
952 2003-04-03 Alan Modra <amodra@bigpond.net.au>
953
954 * elf32-ppc.c (ppc_elf_check_relocs): Don't use SYMBOL_REFERENCES_LOCAL
955 here as it's too early to reliably determine locality.
956 (ppc_elf_gc_sweep_hook): Likewise.
957 (SYMBOL_REFERENCES_LOCAL): Expand comment.
958
959 2003-04-02 Bob Wilson <bob.wilson@acm.org>
960
961 * xtensa-modules.c: Remove comment indicating that this is a
962 generated file.
963
964 2003-04-02 Alan Modra <amodra@bigpond.net.au>
965
966 * elfxx-mips.c (_bfd_mips_elf_hide_symbol): Test for NULL dynobj.
967
968 2003-04-01 Bob Wilson <bob.wilson@acm.org>
969
970 * Makefile.am (ALL_MACHINES): Add cpu-xtensa.lo.
971 (ALL_MACHINES_CFILES): Add cpu-xtensa.c.
972 (BFD32_BACKENDS): Add elf32-xtensa.lo, xtensa-isa.lo, and
973 xtensa-modules.lo.
974 (BFD32_BACKENDS_CFILES): Add elf32-xtensa.c, xtensa-isa.c, and
975 xtensa-modules.c.
976 (cpu-xtensa.lo): New target.
977 (elf32-xtensa.lo): Likewise.
978 (xtensa-isa.lo): Likewise.
979 (xtensa-modules.lo): Likewise.
980 * Makefile.in: Regenerate.
981 * archures.c (bfd_architecture): Add bfd_{arch,mach}_xtensa.
982 (bfd_archures_list): Add bfd_xtensa_arch.
983 * config.bfd: Handle xtensa-*-*.
984 * configure.in: Handle bfd_elf32_xtensa_{le,be}_vec.
985 * configure: Regenerate.
986 * reloc.c: Add BFD_RELOC_XTENSA_{RTLD,GLOB_DAT,JMP_SLOT,RELATIVE,
987 PLT,OP0,OP1,OP2,ASM_EXPAND,ASM_SIMPLIFY}.
988 * targets.c (bfd_elf32_xtensa_be_vec): Declare.
989 (bfd_elf32_xtensa_le_vec): Likewise.
990 (bfd_target_vector): Add bfd_elf32_xtensa_{be,le}_vec.
991 * cpu-xtensa.c: New file.
992 * elf32-xtensa.c: Likewise.
993 * xtensa-isa.c: Likewise.
994 * xtensa-modules.c: Likewise.
995 * libbfd.h: Regenerate.
996 * bfd-in2.h: Likewise.
997
998 2003-04-01 Nick Clifton <nickc@redhat.com>
999
1000 * archures.c (bfd_mach_arm_unknown): Define.
1001 * bfd-in.h (bfd_arm_merge_machines, bfd_arm+update_notes,
1002 bfd_arm_get_mach_from_notes): Prototype.
1003 * bfd-in2.h: Regenerate.
1004 * coff-arm.c (coff_arm_merge_private_bfd_data): Call
1005 bfd_arm_merge_machines.
1006 (coff_arm_final_link_postscript): Call bfd_arm_update_notes.
1007 * coffcode.h (coff_set_arch_mach_hook): Call
1008 bfd_arm_get_mach_from_notes.
1009 * coffgen.c (coff_real_object_p): Revert previous delta.
1010 * cpu_arm.c (arm_check_note): New function. Examine a note in a
1011 .note section.
1012 (bfd_arm_merge_machines): New function: Handle the merging of ARM
1013 binaries compiled for different architectures..
1014 (bfd_arm_update_notes): New function: Update an ARM note section.
1015 (bfd_arm_get_mach_from_notes): New function: Extract a bfd machine
1016 number from an ARM note section.
1017 * elf32-arm.h (elf32_arm_object_p): Use
1018 bfd_arm_get_mach_from_notes.
1019 (elf32_arm_merge_private_bfd_data): Use bfd_arm_merge_machines.
1020 (elf32_arm_final_write_processing): Use bfd_arm_update_notes.
1021
1022 2003-04-01 Ben Elliston <bje@wasabisystems.com>
1023
1024 * dwarf2.c (read_attribute_value): Correct typo in comment.
1025
1026 2003-04-01 Nick Clifton <nickc@redhat.com>
1027
1028 * dwarf2.c (concat_filename): Use bfd_malloc() and strdup()
1029 instead of concat().
1030 (decode_line_info): Only free filename if it is not NULL.
1031 (add_line_info): Make a copy of the filename when storing it into
1032 the info structure.
1033
1034 2003-03-31 Andreas Schwab <schwab@suse.de>
1035 Daniel Jacobowitz <drow@mvista.com>
1036
1037 * simple.c (bfd_simple_get_relocated_section_contents): Add
1038 parameter symbol_table. Optionally use it instead of the symbol
1039 table from the bfd. Save and restore output offsets and output
1040 sections around bfd_get_relocated_section_contents. Fix a memory
1041 leak.
1042 (simple_save_output_info, simple_restore_output_info): New
1043 functions.
1044 * bfd-in2.h: Regenerate.
1045 * dwarf2.c (read_abbrevs): Use
1046 bfd_simple_get_relocated_section_contents instead of
1047 bfd_get_section_contents.
1048 (decode_line_info): Likewise.
1049 (_bfd_dwarf2_find_nearest_line): Likewise. Don't call
1050 find_rela_addend.
1051 (find_rela_addend): Remove.
1052 * elfxx-ia64.c (elfNN_ia64_reloc): Weaken sanity check for
1053 debugging sections.
1054 (elfNN_ia64_hash_table_create): Create the hash table with malloc,
1055 not bfd_zalloc.
1056
1057 2003-03-31 David Heine <dlheine@suif.stanford.edu>
1058
1059 * aoutx.h (aout_link_hash_table_create): Use bfd_malloc instead of
1060 bfd_alloc.
1061 * dwarf2.c (concat_filename): Always allocate space for the
1062 returned filename.
1063 (decode_line_info): Free the allocated filename returned by
1064 concat_filename.
1065 * elf-eh-frame.c (bfd_elf_write_section_eh_frame): Fix memory leaks.
1066 * elf.c (copy_private_bfd_data): Likewise.
1067 (_bfd_elf_slurp_version_tables): Fix bug freeing contents pointer.
1068 * elflink.h (elf_link_sort_relocs): Fix memory leak.
1069 * format.c (bfd_check_format_matches): Likewise.
1070 * linker.c (bfd_generic_final_link): Likewise.
1071 * opncls.c (find_separate_debug_info): Likewise.
1072 * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
1073
1074 2003-03-28 H.J. Lu <hjl@gnu.org>
1075
1076 * elflink.h (elf_link_add_object_symbols): Correctly combine
1077 visibilities.
1078
1079 2003-03-27 Jakub Jelinek <jakub@redhat.com>
1080
1081 * elfxx-ia64.c (elfNN_ia64_relax_section): Reset self_dtpmod_offset
1082 to -1 before recomputing got offsets.
1083
1084 2003-03-26 Andreas Schwab <schwab@suse.de>
1085
1086 * elf32-m68k.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
1087 (elf_m68k_relocate_section): Use it to correctly handle symbols
1088 forced to be local.
1089 (elf_m68k_finish_dynamic_symbol): Emit RELATIVE reloc for got
1090 entries for symbols that are forced to be local.
1091
1092 2003-03-25 Alexandre Oliva <aoliva@redhat.com>
1093
1094 * elfxx-mips.c (_bfd_mips_relax_section): New function.
1095 * elfxx-mips.h (_bfd_mips_relax_section): Declare.
1096 * elfn32-mips.c, elf64-mips.c: Use it.
1097
1098 2003-03-25 Stan Cox <scox@redhat.com>
1099 Nick Clifton <nickc@redhat.com>
1100
1101 Contribute support for Intel's iWMMXt chip - an ARM variant:
1102
1103 * archures.c: Add bfd_mach_arm_iWMMXt.
1104 * reloc.c: Add BFD_RELOC_ARM_CP_OFF_IMM_S2.
1105 * bfd-in2.h: Regenerate.
1106 * libbfd.h: Regenerate.
1107 * coff-arm.c (coff_arm_merge_private_bfd_data): Allow iWMMXt
1108 object files to be linked with XScale ones.
1109 (coff_arm_final_link_postscript): Update note section.
1110 * coffcode.h (coff_set_arch_mach_hook): Handle note section.
1111 * coffgen.c (coff_real_object_p): Call bfd_coff_set_arch_mach_hook
1112 after identifying a coff binary.
1113 * cpu-arm.c (processors): Add iWMMXt.
1114 (arch_inf): Likewise.
1115 * elf32-arm.h (arm_object_p): Handle note section.
1116 (elf32_arm_merge_private_bfd_data): Allow iWMMXt object files to
1117 be linked with XScale ones.
1118 (elf32_arm_section_flags): New function: Set flags on note section.
1119 (elf32_arm_final_write_processing): Handle note section.
1120
1121 2003-03-21 DJ Delorie <dj@redhat.com>
1122
1123 * elf32-xstormy16.c (elf32_xstormy16_relocate_section): Call
1124 _bfd_elf_rela_local_sym.
1125
1126 2003-03-20 H.J. Lu <hjl@gnu.org>
1127
1128 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't try relax for
1129 non-ELF outputs.
1130
1131 2003-03-20 Nick Clifton <nickc@redhat.com>
1132
1133 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Initialise $idata2 and
1134 $idata5 in case bfd_coff_final_link is not called.
1135
1136 2003-03-19 Jakub Jelinek <jakub@redhat.com>
1137
1138 * elf64-sparc.c (struct sparc64_elf_section_data): Add reloc_count
1139 field.
1140 (canon_reloc_count): Define.
1141 (sparc64_elf_slurp_one_reloc_table, sparc64_elf_slurp_reloc_table,
1142 sparc64_elf_canonicalize_dynamic_reloc): Use it instead of
1143 reloc_count.
1144 (sparc64_elf_canonicalize_reloc): New routine.
1145 (bfd_elf64_canonicalize_reloc): Define.
1146
1147 2003-03-18 Jakub Jelinek <jakub@redhat.com>
1148
1149 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle relaxation
1150 againt mergeable sections. Take r_addend into account when caching
1151 trampolines.
1152
1153 2003-03-18 Richard Henderson <rth@redhat.com>
1154
1155 * elfxx-ia64.c (get_dyn_sym_info): Return NULL gracefully for
1156 local symbols that have no dyninfo.
1157
1158 2003-03-14 Gene Smith <gene.smith@siemens.com>
1159
1160 * ieee.c (ieee_write_expression): Handle the case where symbol is
1161 NULL.
1162 General formatting improvements.
1163
1164 2003-03-13 Nick Clifton <nickc@redhat.com>
1165
1166 * configure.in (LINGUAS): Add zh_CN.
1167 * configure: Regenerate.
1168 * po/zh_CN.po: New file.
1169
1170 2003-03-13 Elias Athanasopoulos <elathan@phys.uoa.gr>
1171
1172 * aout-cris.c (BYTES_IN_WORD): Don't define.
1173 aout-encap.c: Likewise.
1174 aout-ns32k.c: Likewise.
1175 aout-tic30.c: Likewise.
1176 hp300bsd.c: Likewise.
1177 i386aout.c: Likewise.
1178 i386dynix.c: Likewise.
1179 i386linux.c: Likewise.
1180 i386lynx.c: Likewise.
1181 i386mach3.c: Likewise.
1182 m68k4knetbsd.c: Likewise.
1183 m68klinux.c: Likewise.
1184 m68klynx.c: Likewise.
1185 m68knetbsd.c: Likewise.
1186 m88kmach3.c: Likewise.
1187 mipsbsd.c: Likewise.
1188 newsos3.c: Likewise.
1189 sparclinux.c: Likewise.
1190 sparclynx.c: Likewise.
1191 sparcnetbsd.c: Likewise.
1192 vaxbsd.c: Likewise. Fix comment formatting.
1193
1194 2003-03-12 Alexandre Oliva <aoliva@redhat.com>
1195
1196 * Reverted 2003-03-02's patch.
1197
1198 * elfxx-target.h (bfd_elfNN_canonicalize_reloc): Make it
1199 overridable.
1200 * elf64-mips.c (mips_elf64_canonicalize_reloc,
1201 mips_elf64_get_dynamic_reloc_upper_bound,
1202 mips_elf64_canonicalize_dynamic_reloc): New, adapted from elf.c.
1203 (bfd_elf64_get_canonicalize_reloc,
1204 bfd_elf64_get_dynamic_reloc_upper_bound,
1205 bfd_elf64_canonicalize_dynamic_reloc): Define.
1206 (mips_elf64_slurp_reloc_table): Support dynamic.
1207 (mips_elf64_slurp_one_reloc_table): Adjust.
1208
1209 2003-03-12 Nick Clifton <nickc@redhat.com>
1210
1211 * xsym.c (bfd_sym_fetch_type_information_table_entry): Change
1212 'index' to 'offset' in test for zero value.
1213
1214 2003-03-11 Alexandre Oliva <aoliva@redhat.com>
1215
1216 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Do not create
1217 dynamic relocations pointing to local or section symbols, use the
1218 NULL symbol instead. Document the choice to not emit an
1219 additional R_MIPS_64 relocation.
1220
1221 2003-03-11 Alan Modra <amodra@bigpond.net.au>
1222
1223 * elf32-ppc.c (ppc_elf_relocate_section): Subtract tls seg vma from
1224 zero index dynamic tls relocs generated for the GOT. Tidy code.
1225 Set "relocation" to 1 on DTPMOD32 relocs. Optimize HA adjustment.
1226 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1227
1228 2003-03-07 Alan Modra <amodra@bigpond.net.au>
1229
1230 * elf32-ppc.c (ppc_elf_relocate_section): Don't look for a nop after
1231 a tls_get_addr call.
1232
1233 * elf32-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
1234 (ppc_elf_adjust_dynamic_symbol): For weak symbols, copy
1235 ELF_LINK_NON_GOT_REF from weakdef.
1236 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
1237 (ppc64_elf_adjust_dynamic_symbol): For weak symbols, copy
1238 ELF_LINK_NON_GOT_REF from weakdef.
1239 * elf32-i386.c (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
1240 (elf_i386_adjust_dynamic_symbol): For weak symbols, copy
1241 ELF_LINK_NON_GOT_REF from weakdef.
1242
1243 2003-03-06 Jakub Jelinek <jakub@redhat.com>
1244 Andrew Haley <aph@redhat.com>
1245
1246 * elflink.h (elf_bfd_discard_info): Don't process eh frames if
1247 output is relocateable.
1248
1249 2003-03-06 Steven Konopa <skonopa@kgo.csc.com>
1250
1251 * som.c (som_fixup_formats): Correct formats for R_AUX_UNWIND and
1252 R_COMMENT.
1253
1254 2003-03-06 Alan Modra <amodra@bigpond.net.au>
1255
1256 * elf32-ppc.c (ppc_elf_create_linker_section): Don't capitalize
1257 error messages.
1258 (ELIMINATE_COPY_RELOCS): Define to zero.
1259 (ppc_elf_relocate_section): Don't deref htab->tls_sec when calculating
1260 TLSLD relocs. Report reloc types on a number of errors. Optimize
1261 LOCAL24PC check for non-local syms. Don't capitalize error messages.
1262 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define to zero.
1263 (ppc64_elf_relocate_section): Don't deref htab->tls_sec when
1264 calculating TLSLD relocs. Report reloc types on a number of errors.
1265 Don't capitalize error messages.
1266
1267 2003-03-03 H.J. Lu <hjl@gnu.org>
1268
1269 * elfxx-ia64.c (USE_BRL): Removed.
1270 (oor_ip): Removed.
1271
1272 2003-03-03 J"orn Rennecke <joern.rennecke@superh.com>
1273
1274 * elf32-sh.c (sh_elf_howto_tab): Make R_SH_IND12W into an ordinary
1275 relocation (no special function), and make it non-partial_inplace.
1276 (sh_elf_relax_section): When creating a bsr, use a consistent value
1277 no matter if the symbol is extern or not; set addend to -4.
1278 Don't swap load / non-load instructions for SH4.
1279 (sh_elf_relax_delete_bytes): In R_SH_IND12W case, check the offset
1280 rather than if the symbol is external to determine if adjusting the
1281 offset makes sense. Adjust the addend too if appropriate.
1282 (sh_elf_relocate_section): In R_SH_IND12W, don't fiddle with the
1283 relocation.
1284
1285 2003-03-03 Nick Clifton <nickc@redhat.com>
1286
1287 * po/da.po: Installed latest translation.
1288
1289 2003-03-02 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1290
1291 * elf32-mips.c (elf_mips_howto_table_rel): Change definition of
1292 R_MIPS_PC16 to rightshift 2.
1293 (elf_reloc_map mips_reloc_map): Map to rightshifted BFD reloc.
1294 (bfd_elf32_bfd_reloc_type_lookup): Support
1295 BFD_RELOC_MIPSEMB_16_PCREL_S2.
1296 * elf64-mips.c (mips_elf64_howto_table_rel): Change definition of
1297 R_MIPS_PC16 to rightshift 2.
1298 (mips_elf64_howto_table_rela): Likewise.
1299 (mips_reloc_map): Map to rightshifted BFD reloc.
1300 * elfn32-mips.c: The same as in elf64-mips.c.
1301 * elfxx-mips.c (mips_elf_got_for_ibfd): Typo in comment.
1302 (mips_elf_calculate_relocation): Handle rightshifted addends for
1303 R_MIPS_PC16.
1304 * reloc.c (BFD_RELOC_MIPSEMB_16_PCREL_S2): New BFD relocation for
1305 MIPS Embedded PIC. Remove superfluous empty COMMENT.
1306 * libbfd.h: Regenerate.
1307 * bfd-in2.h: Regenerate.
1308
1309 2003-02-28 Richard Henderson <rth@redhat.com>
1310
1311 * elfxx-ia64.c (elfNN_ia64_relax_section): Correct bounds
1312 for ltoff22x relaxation.
1313
1314 2003-03-01 Alan Modra <amodra@bigpond.net.au>
1315
1316 * bfd-in.h (_bfd): Don't define.
1317 * bfd.c: Rename occurrences of "struct _bfd" to "struct bfd".
1318 * syms.c: Likewise.
1319 * bfd-in2.h: Regenerate.
1320
1321 2003-02-27 Richard Henderson <rth@redhat.com>
1322
1323 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add want_gotx;
1324 (elfNN_ia64_check_relocs): Set it.
1325 (allocate_global_data_got): Check it.
1326 (allocate_local_got): Likewise.
1327 (allocate_dynrel_entries): Likewise.
1328 (elfNN_ia64_relax_ldxmov): New.
1329 (elfNN_ia64_relax_section): Handle LTOFF22X, LDXMOV.
1330 (elfNN_ia64_choose_gp): Split out from ...
1331 (elfNN_ia64_final_link): ... here.
1332
1333 2003-02-27 Andrew Cagney <cagney@redhat.com>
1334
1335 * bfd.c (struct bfd): Rename "struct _bfd".
1336 * bfd-in.h: Update copyright.
1337 (struct bfd): Rename "struct _bfd".
1338 (_bfd): Define for backward compatibility.
1339 * bfd-in2.h: Regenerate.
1340
1341 2003-02-25 Alan Modra <amodra@bigpond.net.au>
1342
1343 * elflink.h (elf_bfd_final_link): Apportion reloc counts to rel_hdr
1344 and rel_hdr2 when initially counting input relocs rather than after
1345 creating output reloc sections.
1346 (elf_link_read_relocs_from_section): Don't abort with wrong reloc
1347 sizes.
1348
1349 * Makefile.am: Run "make dep-am".
1350 * Makefile.in: Regenerate.
1351
1352 2003-02-24 Kris Warkentin <kewarken@qnx.com>
1353
1354 * elf.c (elfcore_read_notes): Add check for QNX style core file.
1355 (elfcore_grog_nto_note): New function.
1356 (elfcore_grog_nto_gregs): New function.
1357 (elfcore_grog_nto_status): New function.
1358
1359 2003-02-24 Alan Modra <amodra@bigpond.net.au>
1360
1361 * elflink.c (_bfd_elf_create_got_section): Check existing .got
1362 section flags before concluding that we've already been called.
1363 Don't use register keyword.
1364 (_bfd_elf_create_dynamic_sections): Don't use register keyword.
1365 (_bfd_elf_create_linker_section): Formatting.
1366
1367 2003-02-20 jmc <jmc@prioris.mini.pw.edu.pl>
1368
1369 * coff-h8300.c: Fix typo: intial -> initial.
1370 * coff-ppc.c: Likewise.
1371
1372 2003-02-20 Alan Modra <amodra@bigpond.net.au>
1373
1374 * elf32-ppc.c: Formatting.
1375 (allocate_dynrelocs): LD and GD relocs against the same sym need
1376 separate GOT entries.
1377 (ppc_elf_relocate_section): Correct GOT handling for multiple GOT
1378 entries per symbol.
1379
1380 2003-02-19 Alan Modra <amodra@bigpond.net.au>
1381
1382 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Simplify dynamic reloc
1383 removal. Localize vars. Remove unnecessary dynobj test.
1384 * elf32-i386 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead
1385 of INFO.
1386 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
1387 and optimize.
1388 (elf_i386_relocate_section): Likewise.
1389 (elf_i386_gc_sweep_hook): Simplify dyn reloc removal. Localize vars.
1390 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
1391 * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
1392 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
1393 * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
1394 * elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise. Remove
1395 local_dynrel for section too. Don't touch HIPLT22, LOPLT10, PCPLT32
1396 or PCPLT10 relocs. Don't subtract twice on PLT32 relocs.
1397 Formatting.
1398
1399 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define.
1400 (ppc64_elf_check_relocs): Use it. Correct comment. Move SEC_ALLOC
1401 test.
1402 (ppc64_elf_adjust_dynamic_symbol): Use ELIMINATE_COPY_RELOCS.
1403 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
1404 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
1405 and optimize. Use ELIMINATE_COPY_RELOCS.
1406 (ppc64_elf_relocate_section): Likewise.
1407
1408 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Add pc_count field.
1409 (ppc_elf_copy_indirect_symbol): Copy pc_count field.
1410 (ELIMINATE_COPY_RELOCS): Define.
1411 (ppc_elf_adjust_dynamic_symbol): Convert copy relocs to dynamic.
1412 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
1413 (MUST_BE_DYN_RELOC): Define.
1414 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
1415 and optimize. Trim dyn_relocs.
1416 (ppc_elf_check_relocs): Don't generate dyn_relocs when we know they'll
1417 not be used. Do generate dyn_relocs for copy reloc avoidance. Keep
1418 track of pc_rel dyn relocs.
1419 (ppc_elf_relocate_section): Remove "will_become_local". Adjust
1420 WILL_CALL_FINISH_DYNAMIC_SYMBOL use. Trim dyn relocs as per
1421 allocate_dynrelocs. Don't recalculate "sec".
1422
1423 2003-02-18 Alan Modra <amodra@bigpond.net.au>
1424
1425 * elf32-ppc.c (ppc_elf_relocate_section): Remove unnecessary test.
1426 * elf64-ppc.c (ppc64_elf_tls_optimize): Decrement tlsld_got.refcount
1427 on invalid LD relocs.
1428 (allocate_dynrelocs): Invalid LD relocs don't use tlsld_got entry.
1429 (ppc64_elf_relocate_section): Unify new handling of LD relocs and
1430 tlsld_got entry. Use IS_PPC64_TLS_RELOC.
1431
1432 * elf32-ppc.h: New file.
1433 * elf32-ppc.c: Include elf32-ppc.h.
1434 (NOP, CROR_151515, CROR_313131, TP_OFFSET, DTP_OFFSET): Define.
1435 (struct ppc_elf_link_hash_entry): Rename "root" to "elf". Adjust uses.
1436 Add "tls_mask" field.
1437 (TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL, TLS_TLS, TLS_TPRELGD): Define.
1438 (struct ppc_elf_link_hash_table): Rename "root" to "elf". Adjust uses.
1439 Add got, relgot, plt, relplt, dynbss, relbss, dynsbss, relsbss,
1440 sdata, sdata2, tls_sec, tls_get_addr, tlsld_got fields.
1441 Make use of htab shortcuts throughout file.
1442 (ppc_elf_link_hash_newfunc): Init tls_mask field.
1443 (ppc_elf_link_hash_table_create): Init new fields.
1444 (ppc_elf_copy_indirect_symbol): Copy tls_mask.
1445 (ppc_elf_howto_raw): Add tls relocs.
1446 (ppc_elf_reloc_type_lookup): Handle them.
1447 (ppc_elf_unhandled_reloc): New function.
1448 (ppc_elf_create_got): Stash got section pointer in hash table,
1449 return status. Make .rela.got too.
1450 (ppc_elf_create_dynamic_sections): Stash section pointers in htab.
1451 (ppc_elf_adjust_dynamic_symbol): Only set up copy relocs when
1452 NON_GOT_REF set. Don't allocate space in .plt here..
1453 (allocate_dynrelocs): ..do so here instead, properly ref-counting and
1454 not allocating plt entries unnecessarily. Allocate got entries here.
1455 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
1456 (ppc_elf_size_dynamic_sections): Allocate local got entries. Pass
1457 "info" during allocate_dynrelocs hash traversal. Use htab section
1458 shortcuts rather than searching for named sections. Get rid of
1459 "plt" and "strip" booleans.
1460 (update_local_sym_info, bad_shared_reloc): New functions.
1461 (ppc_elf_check_relocs): Handle TLS relocs. Move .rela.got creation to
1462 ppc_elf_create_got. Don't mark got or plt reloc syms dynamic, do so
1463 in allocate_dynreloc. Use update_local_sym_info and bad_shared_reloc.
1464 Disallow R_PPC_EMB_RELSDA, R_PPC_EMB_NADDR32, R_PPC_EMB_NADDR16,
1465 R_PPC_EMB_NADDR16_LO, R_PPC_EMB_NADDR16_HI and R_PPC_EMB_NADDR16_HA
1466 in shared libs. R_PPC_PLTREL32 is a plt reloc too. Refcount all
1467 relocs that might use a plt entry. Set NON_GOT_REF too.
1468 Enumerate all do-nothing relocs.
1469 (ppc_elf_gc_sweep_hook): Simplify removal of dynrelocs. Handle
1470 tls relocs and all plt relocs.
1471 (ppc_elf_tls_setup, ppc_elf_tls_optimize): New functions.
1472 (ppc_elf_finish_dynamic_symbol): Don't build got entries here.
1473 (ppc_elf_finish_dynamic_sections): Rewrite tag code using htab
1474 shortcuts.
1475 (ppc_elf_relocate_section): Tidy. Handle TLS relocs. Use
1476 bfd_elf_local_sym_name. Simplify unresolved reloc code. Build got
1477 entries and got relocs here. Warn on non-zero got reloc addend.
1478 Split out branch taken/not taken reloc code into a separate switch
1479 and correct offset calculation. Allow BRTAKEN/BRNTAKEN dynamic relocs.
1480 Split out HA reloc adjustments to separate switch statement. Don't
1481 warn on reloc overflow if we've already warned about undefined.
1482 Don't rebuild sym name when reporting errors. Report all possible
1483 errors from _bfd_final_link_relocate.
1484 (bfd_elf32_bfd_final_link): Don't define.
1485
1486 2003-02-18 Alan Modra <amodra@bigpond.net.au>
1487
1488 * elf64-ppc.c (ppc64_elf_relocate_section): Don't init "r". Don't
1489 rebuild sym name when reporting errors.
1490
1491 2003-02-17 Nick Clifton <nickc@redhat.com>
1492
1493 * elflink.h (elf_link_output_extsym): Only check
1494 allow_shlib_undefined for shared libraries.
1495 * elf32-i386.c (elf_i386_relocate_section): Remove bogus check
1496 of allow_shlib_undefined.
1497 * elf32-cris.c (cris_elf_relocate_section): Likewise.
1498 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
1499 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1500 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1501 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1502 * elf32-sh.c (sh_elf_relocate_section): Likewise.
1503 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1504 * elf32-vax.c (elf_vax_relocate_section): Likewise.
1505 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
1506 * elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
1507 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1508 * elf64-s390.c (elf_s390_relocate_section): Likewise.
1509 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1510 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1511 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
1512 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
1513
1514 2003-02-17 Nick Clifton <nickc@redhat.com>
1515
1516 * elf.c (SEGMENT_AFTER_SEGMENT): Add third parameter - the
1517 address field to use in the comparison.
1518 (SEGMENT_OVERLAPS): Check that LMAs overlap as well.
1519
1520 2003-02-14 Bob Wilson <bob.wilson@acm.org>
1521
1522 * elfcore.h (elf_core_file_p): Compare alternate machine codes for ELF
1523 backends when checking if the generic ELF target should be used.
1524
1525 * syms.c (_bfd_stab_section_find_nearest_line): For line number stabs
1526 outside of functions, treat values as absolute addresses.
1527
1528 * bfd.c: Change embedded documentation to use consistent indentation
1529 and to split up long lines. Change informal style of description
1530 for functions lacking real documentation.
1531 * coffcode.h: Break up long lines in embedded documentation.
1532 * format.c: Likewise.
1533 * targets.c: Likewise.
1534 * libcoff.h: Regenerate.
1535 * bfd-in2.h: Regenerate.
1536
1537 2003-02-14 Alan Modra <amodra@bigpond.net.au>
1538
1539 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Init tls_get_addr.
1540 (ppc64_elf_copy_indirect_symbol): Merge tls_mask too.
1541 (ppc64_elf_gc_sweep_hook): Simplify removal of dyn_relocs.
1542 (allocate_dynrelocs): Don't treat undefined and undefweak specially.
1543 (ppc_size_one_stub): Fix warning, and tighten plt entry check.
1544 (group_sections): Don't share a stub section if stubs are for a large
1545 section. Adjust comment.
1546 (ppc64_elf_size_stubs): Roughly double the size left for stubs if
1547 !stubs_always_before_branch.
1548 (ppc64_elf_relocate_section): Initialize tlsld GOT entry once. Don't
1549 treat undefined and undefweak specially when processing dyn relocs.
1550
1551 2003-02-13 Jakub Jelinek <jakub@redhat.com>
1552
1553 * elflink.h (elf_link_add_object_symbols): Handle .symver x, x@FOO.
1554
1555 2003-02-13 Nick Clifton <nickc@redhat.com>
1556
1557 * elf32-arm.h (elf32_thumb_to_arm_stub): Include section VMAs
1558 in computation of offset to insert into BL instruction.
1559
1560 2003-02-11 Uwe Stieber <uwe@wwws.de>
1561
1562 * config.bfd: Add support for kaOS as cross build target system.
1563
1564 2003-02-11 Alan Modra <amodra@bigpond.net.au>
1565
1566 * elf64-ppc.c (ppc64_elf_check_relocs): Match versioned
1567 .__tls_get_addr too.
1568 (ppc64_elf_tls_setup): Ensure cached tls_get_addr is not indirect.
1569
1570 2003-02-10 Kaz kojima <kkojima@rr.iij4u.or.jp>
1571
1572 * elf32-sh.c (elf_sh_dyn_relocs): Add tls_tpoff32 field.
1573 (elf_sh_link_hash_entry): Remove tls_tpoff32 field.
1574 (sh_elf_link_hash_newfunc): Remove the initialization of
1575 tls_tpoff32 field.
1576 (allocate_dynrelocs): Keep dyn_relocs if it includes the entry
1577 for which tls_tpoff32 flag is set.
1578 (sh_elf_relocate_section): Covert to LE only if the dyn_relocs
1579 of the symbol includes the entry matched with the input_section
1580 and having tls_tpoff32 flag on. When linking statically, set
1581 symbol index of R_SH_TLS_TPOFF32 relocation to zero if the symbol
1582 is defined in this executable.
1583 (sh_elf_check_relocs): Set tls_tpoff32 flag appropriately.
1584
1585 2003-02-10 Jakub Jelinek <jakub@redhat.com>
1586
1587 * elf32-s390.c (elf_s390_size_dynamic_sections): Set relocs to TRUE
1588 even if there is just non-empty .rela.plt.
1589
1590 2003-02-10 Nick Clifton <nickc@redhat.com>
1591
1592 * archures.c (bfd_mach_arm_ep9312): Define.
1593 * bfd-in2.h: Regenerate.
1594 * cpu-arm.c (processors[]): Add ep9312.
1595 (bfd_arm_arch): Add ep9312.
1596 * elf32-arm.h (elf32_arm_merge_private_data): Update error
1597 messages and add test for Maverick floating point support.
1598 (elf32_arm_print_private_bfd_data): Handle
1599 EF_ARM_MAVERICK_FLOAT flag.
1600 (elf32_arm_object_p): New function.
1601 (elf_backend_object_p): Define.
1602
1603 2003-02-10 Alan Modra <amodra@bigpond.net.au>
1604
1605 * elf64-ppc.c: Rename assorted occurrences of tls_type and similar
1606 variables, structure fields or function params to tls_mask or
1607 similar to better reflect usage.
1608 (struct got_entry): Comment.
1609 (struct ppc_link_hash_entry): Expand comment, and renumber TLS_*.
1610 (get_tls_mask): Rename from get_tls_type.
1611
1612 2003-02-09 Alan Modra <amodra@bigpond.net.au>
1613
1614 * elf64-ppc.c (TLS_GD_LD): Don't define..
1615 (TLS_GD): ..define this instead and update all uses.
1616 (TLS_TPRELGD): Define.
1617 (ppc64_elf_link_hash_table_create): Tweak initialization of
1618 init_refcount and init_offset.
1619 (ppc64_elf_check_relocs): Add one extra element to t_symndx array.
1620 Mark second slot of GD or LD toc entries.
1621 (get_tls_type): Return an int. Distinguish toc GD and LD entries
1622 from other tls types.
1623 (ppc64_elf_tls_setup): New function, split out from..
1624 (ppc64_elf_tls_optimize): ..here. Don't optimize when symbols are
1625 defined in a dynamic object. Fix LD optimization. Don't set TLS_TPREL
1626 on GD->IE optimization, use TLS_TPRELGD instead. Use get_tls_type
1627 return value to properly decide whether toc GD and LD entries can
1628 optimize away __tls_get_addr call. Check next reloc after DTPMOD64
1629 to determine GD or LD rather than looking at TLS_LD flag. Don't
1630 attempt to adjust got entry tls_type here..
1631 (allocate_dynrelocs): ..instead, adjust got entry tls_type here, and
1632 look for possible merges.
1633 (ppc64_elf_size_dynamic_sections): Adjust local got entries for
1634 optimization.
1635 (ppc64_elf_size_stubs): Tweak __tls_get_addr fudge.
1636 (ppc64_elf_relocate_section): Rename some vars to better reflect usage.
1637 Make use of return value from get_tls_type to properly detect GD and
1638 LD optimizations. Split tlsld/gd hi/ha from lo/ds case. Don't
1639 handle tls_get_addr removal when looking at REL24 relocs, do it when
1640 looking at the previous reloc. Check reloc after DTPMOD64 to determine
1641 GD or LD.
1642 * elf64-ppc.h (ppc64_elf_tls_setup): Declare.
1643
1644 2003-02-08 Alan Modra <amodra@bigpond.net.au>
1645
1646 * elf32-hppa.c (group_sections): Don't share a stub section if
1647 stubs are for a large section.
1648
1649 * elf32-hppa.c (elf32_hppa_size_stubs): Double the size left for
1650 stubs if !stubs_always_before_branch.
1651
1652 2003-02-07 Nick Clifton <nickc@redhat.com>
1653
1654 * elf.c (swap_out_syms): Generate an error message if an
1655 equivalent output section cannot be found for a symbol.
1656
1657 2003-02-07 Jakub Jelinek <jakub@redhat.com>
1658
1659 * elf64-alpha.c (elf64_alpha_relax_section): Don't crash if
1660 local_got_entries is NULL.
1661
1662 2003-02-06 Andreas Schwab <schwab@suse.de>
1663
1664 * elf-eh-frame.c (get_DW_EH_PE_signed): Define.
1665 (read_value): Add parameter is_signed, use signed extraction if
1666 the value is signed.
1667 (_bfd_elf_write_section_eh_frame): Pass signed flag of the
1668 encoding to read_value.
1669
1670 2003-02-06 Alan Modra <amodra@bigpond.net.au>
1671
1672 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy got and
1673 plt info when called to transfer weak sym info.
1674
1675 2003-02-05 Alan Modra <amodra@bigpond.net.au>
1676
1677 * reloc.c: Add PPC and PPC64 TLS relocs.
1678 * libbfd.h: Regenerate.
1679 * bfd-in2.h: Regenerate.
1680 * elf64-ppc.c (TP_OFFSET, DTP_OFFSET): Declare.
1681 (ppc64_elf_howto_raw): Add TLS howto's. Adjust R_PPC64_NONE to be
1682 against a 32 bit field.
1683 (ppc64_elf_reloc_type_lookup): Handle TLS relocs.
1684 (_ppc64_elf_section_data): Add t_symndx and comments.
1685 (ppc64_elf_section_data): Use elf_section_data macro.
1686 (ppc64_elf_new_section_hook): American spelling.
1687 (struct got_entry, struct plt_entry): New.
1688 (MUST_BE_DYN_RELOC): Rename from IS_ABSOLUTE_RELOC.
1689 (struct ppc_stub_hash_entry): Add "addend" field.
1690 (struct ppc_link_hash_entry): Add "tls_type".
1691 (TLS_TLS, TLS_GD_LD, TLS_LD, TLS_TPREL, TLS_DTPREL,
1692 TLS_EXPLICIT): Define.
1693 (struct ppc_link_hash_table): Add tls_sec, tls_get_addr, tlsld_got.
1694 (link_hash_newfunc): Init new fields.
1695 (ppc64_elf_link_hash_table_create): Likewise. Set init_refcount and
1696 init_offset to NULL.
1697 (ppc64_elf_copy_indirect_symbol): Copy got and plt info. Don't call
1698 _bfd_elf_link_hash_copy_indirect, rather insert relevant code from
1699 there.
1700 (update_local_sym_info, update_plt_info): New functions.
1701 (ppc64_elf_check_relocs): Use them. Handle TLS relocs. Adjust GOT
1702 handling to use got.glist rather than got.refcount. Likewise for PLT.
1703 (ppc64_elf_gc_sweep_hook): Handle TLS relocs, new GOT and PLT lists.
1704 (func_desc_adjust): Adjust for new PLT list.
1705 (ppc64_elf_adjust_dynamic_symbol): Likewise.
1706 (get_sym_h, get_tls_type): New functions.
1707 (ppc64_elf_edit_opd): Remove unused variable. Use get_sym_h.
1708 (ppc64_elf_tls_optimize): New function.
1709 (allocate_dynrelocs): Adjust for new PLT and GOT lists. Allocate
1710 TLS relocs.
1711 (ppc64_elf_size_dynamic_sections): Likewise.
1712 (ppc_type_of_stub): Adjust for new PLT list.
1713 (ppc_build_one_stub): Likewise.
1714 (ppc64_elf_size_stubs): Likewise. Use get_sym_h. Treat __tls_get_addr
1715 calls specially.
1716 (ppc64_elf_relocate_section): Adjust for new GOT and PLT lists. Handle
1717 TLS relocs. Report local syms using bfd_elf_local_sym_name. Don't
1718 init GOT entries that have a reloc. Generate GOT relocs here..
1719 (ppc64_elf_finish_dynamic_symbol): ..not here. Adjust for PLT list.
1720 * elf64-ppc.h (ppc64_elf_tls_optimize): Declare.
1721
1722 2003-02-04 Andreas Schwab <schwab@suse.de>
1723
1724 * elf32-m68k.c (elf_m68k_hash_entry): Define.
1725 (elf_m68k_link_hash_traverse): Remove.
1726 (elf_m68k_link_hash_newfunc): Use struct bfd_hash_entry and
1727 elf_m68k_hash_entry instead of struct elf_m68k_link_hash_entry to
1728 reduce casting.
1729 (elf_m68k_check_relocs): Use elf_m68k_hash_entry instead of
1730 casting.
1731 (elf_m68k_size_dynamic_sections): Use elf_link_hash_traverse
1732 instead of elf_m68k_link_hash_traverse.
1733 (elf_m68k_discard_copies): Change first parameter to pointer to
1734 struct elf_link_hash_entry and use elf_m68k_hash_entry when struct
1735 elf_m68k_link_hash_entry is needed.
1736
1737 2003-02-04 Alan Modra <amodra@bigpond.net.au>
1738
1739 * elf-bfd.h (struct got_entry, struct plt_entry): Forward declare.
1740 (struct elf_link_hash_entry): Add "glist" and "plist" fields to
1741 "got" union, and declare as gotplt_union. Use gotplt_uinion for
1742 "plt" field.
1743 (struct elf_link_hash_table): Make "init_refcount" a gotplt_union.
1744 Add "init_offset" field.
1745 (struct elf_obj_tdata <local_got>): Add "struct got_entry **" to union.
1746 (elf_local_got_ents): Declare.
1747 * elf.c (_bfd_elf_link_hash_newfunc): Adjust initialization of "got"
1748 and "plt".
1749 (_bfd_elf_link_hash_hide_symbol): Use "init_offset".
1750 (_bfd_elf_link_hash_table_init): Set "init_offset".
1751 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set init_refcount
1752 from init_offset.
1753 (elf_adjust_dynamic_symbol): Set plt and got offsets using init_offset.
1754
1755 * elf.c (bfd_elf_local_sym_name): Split out from..
1756 (group_signature): ..here.
1757 * elf-bfd.h (bfd_elf_local_sym_name): Declare.
1758
1759 2003-02-04 Alan Modra <amodra@bigpond.net.au>
1760
1761 * elf-bfd.h (enum elf_link_info_type): Remove.
1762 (struct bfd_elf_section_data): Move sec_info_type, use_rela_p fields
1763 to struct sec. Remove linkonce_p field.
1764 (elf_linkonce_p): Delete.
1765 (elf_discarded_section): Update for sec_info_type change.
1766 * section.c (struct sec): Add sec_info_type, use_rela_p, has_tls_reloc,
1767 flag11, flag12, flag13, flag14, flag15, flag16, flag20, flag24.
1768 (ELF_INFO_TYPE_NONE): Define.
1769 (ELF_INFO_TYPE_STABS): Define.
1770 (ELF_INFO_TYPE_MERGE): Define.
1771 (ELF_INFO_TYPE_EH_FRAME): Define.
1772 (ELF_INFO_TYPE_JUST_SYMS): Define.
1773 (STD_SECTION): Update struct sec initializer.
1774 * ecoff.c (bfd_debug_section): Likewise.
1775 * elf.c: Likewise. Update occurrences of sec_info_type and use_rela_p.
1776 * elflink.h: Likewise.
1777 * elf-eh-frame.c: Likewise.
1778 * elf64-alpha.c: Likewise.
1779 * elfxx-ia64.c: Likewise.
1780 * elfxx-mips.c: Likewise.
1781 * bfd-in2.h: Regenerate.
1782
1783 * elf32-sparc.c (sec_do_relax): Use elf_section_data macro rather than
1784 referring to used_by_bfd.
1785 * elf64-sparc.c (sec_do_relax): Likewise.
1786 * elf64-mmix.c (mmix_elf_section_data): Likewise.
1787 * elfxx-mips.c (mips_elf_section_data): Likewise.
1788 * ieee.c (ieee_slurp_section_data): Use ieee_per_section macro.
1789 (ieee_get_section_contents): Likewise.
1790 (ieee_new_section_hook): Formatting.
1791 (ieee_canonicalize_reloc): Remove commented out code.
1792 * mmo.c (mmo_section_data): Define. Use throughout file.
1793 * oasys.c (oasys_get_section_contents): Use oasys_per_section macro.
1794
1795 2003-01-31 Graydon Hoare <graydon@redhat.com>
1796
1797 * Makefile.am (opncls.lo): Add dependency upon libiberty.h.
1798 * Makefile.in: Regenerate.
1799 * opncls.c (calc_crc32, get_debug_link_info,
1800 seperate_debug_file_exists, find_seperate_debug_file): New
1801 internal functions.
1802 (bfd_follow_gnu_debuglink): New function. Follow the pointer
1803 contained inside a .gnu_debuglink section.
1804 * bfd-in2.h: Regenerate.
1805
1806 2003-01-29 Alexandre Oliva <aoliva@redhat.com>
1807
1808 * elfxx-mips.c (mips_elf_got_entry_hash): Don't dereference
1809 entry->abfd when it's NULL.
1810
1811 2003-01-27 Alexandre Oliva <aoliva@redhat.com>
1812
1813 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Handle
1814 _bfd_elf_section_offset returning -2 the same way as -1.
1815
1816 * elfxx-mips.c (mips_elf_multi_got): New function.
1817 (struct mips_got_entry): Make symndx and gotidx signed. Moved
1818 addend into union along with address and link hash entry.
1819 (struct mips_got_info): Added bfd2got and next.
1820 (struct mips_elf_hash_sort_data): Added max_unref_got_dynindx.
1821 (mips_elf_got_section, mips_elf_create_got_section): Use
1822 SEC_EXCLUDE bit to tell whether we really need the got
1823 section. Take boolean arguments to disregard an excluded
1824 section, or to create it as excluded. Adjust all callers.
1825 Use mips_elf_got_section all over.
1826 (mips_elf_local_got_index, mips_elf_got_page,
1827 mips_elf_got16_entry): Take input bfd as argument, and pass it
1828 on to mips_elf_create_local_got_entry.
1829 (mips_elf_global_got_index, mips_elf_create_local_got_entry):
1830 Take input bfd as argument, and manage entries in the
1831 appropriate GOT.
1832 (mips_elf_got_offset_from_index): Take input bfd as argument,
1833 and use it to adjust the GP offset of the bfd.
1834 (mips_elf_sort_hash_table, mips_elf_sort_hash_table_f): Move
1835 unreferenced GOT entries of global symbols to the end.
1836 (mips_elf_record_global_got_symbol): Take input bfd as
1837 argument. Add entries to the master GOT hash table.
1838 (struct mips_elf_bfd2got_hash): New.
1839 (struct mips_elf_got_per_bfd_arg): New.
1840 (struct mips_elf_set_global_got_offset_arg): New.
1841 (mips_elf_hash_bfd_vma, mips_elf_multi_got_entry_hash,
1842 mips_elf_multi_got_entry_eq, mips_elf_bfd2got_entry_hash,
1843 mips_elf_bfd2got_entry_eq, mips_elf_make_got_per_bfd,
1844 mips_elf_merge_gots, mips_elf_set_global_got_offset,
1845 mips_elf_resolve_final_got_entry,
1846 mips_elf_resolve_final_got_entries, mips_elf_adjust_gp,
1847 mips_elf_got_for_ibfd): New functions.
1848 (ELF_MIPS_GP_OFFSET): Don't depend on SGI_COMPAT.
1849 (MIPS_ELF_GOT_MAX_SIZE): New macro.
1850 (STUB_LW): Generate 64-bit stub regardless of SGI_COMPAT.
1851 (mips_elf_got_entry_hash): Take new fields into account. Use
1852 mips_elf_hash_bfd_vma.
1853 (mips_elf_got_entry_eq): Take new fields into account.
1854 (mips_elf_create_got_section): Initialize new fields.
1855 (mips_elf_calculate_relocation): Pass input_bfd to functions
1856 that now take it. Adjust gp for the input_bfd.
1857 (mips_elf_allocate_dynamic_relocation,
1858 mips_elf_create_dynamic_relocation,
1859 _bfd_mips_elf_create_dynamic_sections): Use...
1860 (mips_elf_rel_dyn_section): New function. Borrow code from...
1861 (_bfd_mips_elf_check_relocs): Pass input_bfd to functions that
1862 now take it. Create the got section if needed, even if
1863 excluded, before recording a global got symbol. Move some
1864 code to...
1865 (mips_elf_record_local_got_symbol): New fn.
1866 (_bfd_mips_elf_size_dynamic_sections): Disable combreloc.
1867 Compute multi-got global entries offsets. Move GOT code to...
1868 (_bfd_mips_elf_always_size_sections): Call mips_elf_multi_got
1869 if the GOT is too big.
1870 (_bfd_mips_elf_finish_dynamic_symbol): Set got entry of
1871 undefweak symbol to zero. Generate dynamic relocations for
1872 non-primary GOT entries for global symbols.
1873 (_bfd_mips_elf_finish_dynamic_sections): Handle multi-got
1874 case. Generate dynamic relocations for local got entries.
1875 Sort dynamic relocations on N64 too, using...
1876 (sort_dynamic_relocs_64): New fns.
1877 (_bfd_mips_elf_hide_symbol): Adjust multi-got counters.
1878 (_bfd_mips_elf_merge_private_bfd_data): Ignore EF_MIPS_XGOT.
1879
1880 2003-01-27 Alexandre Oliva <aoliva@redhat.com>
1881
1882 * bfd.c (struct _bfd): Added id field.
1883 * opncls.c (_bfd_id_counter): New static variable.
1884 (_bfd_new_bfd): Use it.
1885 * bfd-in2.h: Rebuilt.
1886
1887 2003-01-25 Alan Modra <amodra@bigpond.net.au>
1888
1889 * elf32-sparc.c (bfd_elf32_new_section_hook): Define.
1890
1891 2003-01-25 Jakub Jelinek <jakub@redhat.com>
1892
1893 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Add TLS relocs.
1894 (elf32_sparc_rev32_howto): New variable.
1895 (sparc_reloc_map): Add TLS relocs.
1896 (elf32_sparc_reloc_type_lookup, elf32_sparc_info_to_howto):
1897 Handle REV32.
1898 (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc, elf32_sparc_mkobject):
1899 New functions.
1900 (struct elf32_sparc_dyn_relocs, struct elf32_sparc_link_hash_entry,
1901 struct elf32_sparc_link_hash_table):
1902 New structures.
1903 (elf32_sparc_tdata, elf32_sparc_local_got_tls_type,
1904 elf32_sparc_hash_table): Define.
1905 (link_hash_newfunc, elf32_sparc_link_hash_table_create,
1906 create_got_section, elf32_sparc_create_dynamic_sections,
1907 elf32_sparc_copy_indirect_symbol, elf32_sparc_tls_transition): New
1908 functions.
1909 (elf32_sparc_check_relocs): Handle TLS relocs. Add dynamic reloc
1910 reference counting.
1911 (elf32_sparc_gc_sweep_hook): Likewise.
1912 (elf32_sparc_adjust_dynamic_symbol): Likewise.
1913 (elf32_sparc_size_dynamic_sections): Likewise.
1914 (elf32_sparc_relocate_section): Likewise.
1915 (allocate_dynrelocs, readonly_dynrelocs, dtpoff_base, tpoff):
1916 New functions.
1917 (elf32_sparc_object_p): Allocate backend private object data.
1918 (bfd_elf32_bfd_link_hash_table_create,
1919 elf_backend_copy_indirect_symbol, bfd_elf32_mkobject,
1920 elf_backend_can_refcount): Define.
1921 (elf_backend_create_dynamic_sections): Define to
1922 elf32_sparc_create_dynamic_sections.
1923 * reloc.c: Add SPARC TLS relocs.
1924 * bfd-in2.h, libbfd.h: Rebuilt.
1925 * elf64-sparc.c (sparc64_elf_howto_table): Add TLS relocs.
1926 (sparc_reloc_map): Likewise.
1927
1928 2003-01-24 Martin Schwidefsky <schwidefsky@de.ibm.com>
1929
1930 * bfd-in2.h: Regenerate.
1931 * elf32-s390.c (elf_s390_mkobject, elf_s390_tls_transition,
1932 s390_tls_reloc, dtpoff_base, tpoff, invalid_tls_insn): New functions.
1933 (elf_howto_table): Add TLS relocs.
1934 (elf_s390_reloc_type_lookup): Likewise.
1935 (elf_s390_link_hash_entry): Add tls_type.
1936 (elf_s390_hash_entry, elf_s390_obj_tdata, elf_s390_local_got_tls_type):
1937 New macros.
1938 (elf_s390_link_hash_table): Add tls_ldm_got.
1939 (link_hash_newfunc): Initialize tls_type.
1940 (elf_s390_link_hash_table_create): Initialize refcount of tls_ldm_got.
1941 (elf_s390_copy_indirect_symbol): Copy tls_type information.
1942 (elf_s390_check_relocs): Support TLS relocs.
1943 (elf_s390_gc_sweep_hook): Likewise.
1944 (allocate_dynrelocs): Likewise.
1945 (elf_s390_size_dynamic_sections): Likewise.
1946 (elf_s390_relocate_section): Likewise.
1947 (elf_s390_finish_dynamic_symbol): Likewise.
1948 (bfd_elf32_mkobject): Define for TLS.
1949 * elf64-s390.c: Same changes as for elf32-s390.c.
1950 * libbfd.h: Regenerate.
1951 * reloc.c: Add s390 TLS relocations.
1952
1953 2003-01-24 Charles Lepple <clepple@ghz.cc>
1954
1955 * aclocal.m4: Fix name of --enable-install-libbfd switch.
1956
1957 2003-01-23 Nick Clifton <nickc@redhat.com>
1958
1959 * Add sh2e support:
1960
1961 2002-04-02 Elena Zannoni <ezannoni@redhat.com>
1962
1963 * archures.c (bfd_mach_sh2e): Added.
1964 * bfd-in2.h: Rebuilt.
1965 * cpu-sh.c (arch_info_struct): Added SH2e.
1966 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle EF_SH2E.
1967
1968 2003-01-23 Alan Modra <amodra@bigpond.net.au>
1969
1970 * elf-bfd.h (struct bfd_elf_section_data): Remove tdata. Change
1971 dynindx to an int. Rearrange for better packing.
1972 * elf.c (_bfd_elf_new_section_hook): Don't alloc if already done.
1973 * elf32-mips.c (bfd_elf32_new_section_hook): Define.
1974 * elf32-sh64.h: New. Split out from include/elf/sh.h.
1975 (struct _sh64_elf_section_data): New struct.
1976 (sh64_elf_section_data): Don't dereference sh64_info (was tdata).
1977 * elf32-sh64-com.c: Include elf32-sh64.h.
1978 * elf32-sh64.c: Likewise.
1979 (sh64_elf_new_section_hook): New function.
1980 (bfd_elf32_new_section_hook): Define.
1981 (sh64_elf_fake_sections): Adjust for sh64_elf_section_data change.
1982 (sh64_bfd_elf_copy_private_section_data): Likewise.
1983 (sh64_elf_final_write_processing): Likewise.
1984 * elf32-sparc.c (struct elf32_sparc_section_data): New.
1985 (elf32_sparc_new_section_hook): New function.
1986 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
1987 (sec_do_relax): Define.
1988 (elf32_sparc_relax_section): Adjust to use sec_do_relax.
1989 (elf32_sparc_relocate_section): Likewise.
1990 * elf64-mips.c (bfd_elf64_new_section_hook): Define.
1991 * elf64-mmix.c (struct _mmix_elf_section_data): New.
1992 (mmix_elf_section_data): Define. Use throughout file.
1993 (mmix_elf_new_section_hook): New function.
1994 (bfd_elf64_new_section_hook): Define.
1995 * elf64-ppc.c (struct _ppc64_elf_section_data): New.
1996 (ppc64_elf_section_data): Define. Use throughout.
1997 (ppc64_elf_new_section_hook): New function.
1998 (bfd_elf64_new_section_hook): Define.
1999 * elf64-sparc.c (struct sparc64_elf_section_data): New.
2000 (sparc64_elf_new_section_hook): New function.
2001 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
2002 (sec_do_relax): Define.
2003 (sparc64_elf_relax_section): Adjust to use sec_do_relax.
2004 (sparc64_elf_relocate_section): Likewise.
2005 (bfd_elf64_new_section_hook): Define.
2006 * elfn32-mips.c (bfd_elf32_new_section_hook): Define.
2007 * elfxx-mips.c (struct _mips_elf_section_data): New.
2008 (mips_elf_section_data): Define. Use throughout.
2009 (_bfd_mips_elf_new_section_hook): New function.
2010 (mips_elf_create_got_section): Don't alloc used_by_bfd.
2011 * elfxx-mips.h (_bfd_mips_elf_new_section_hook): Declare.
2012 * elfxx-target.h (bfd_elfNN_new_section_hook): Add #ifndef.
2013 * Makefile.am: Run "make dep-am".
2014 * Makefile.in: Regenerate.
2015
2016 2003-01-21 Richard Henderson <rth@redhat.com>
2017
2018 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_PLT_LOC): New.
2019 (struct alpha_elf_link_hash_entry): Add plt_old_section, plt_old_value.
2020 (elf64_alpha_adjust_dynamic_symbol): Set them.
2021 (elf64_alpha_size_plt_section_1): Reset them when plt entry removed.
2022 (elf64_alpha_relax_tls_get_addr): Handle LDM relocs. Frob the
2023 symbol index when relaxing LDM to TPREL.
2024 (elf64_alpha_relax_section): Likewise. Allow relaxation of GD
2025 relocs, even if the target isn't locally defined.
2026 (elf64_alpha_check_relocs): Frob LDM reloc symndx to zero.
2027 (elf64_alpha_relocate_section): Likewise. Force TP-relative
2028 relocs vs symndx 0 to the tp base.
2029
2030 2003-01-21 Fabio Alemagna <falemagn@aros.org>
2031
2032 * config.bfd: Handle i[3456]86-*-aros*.
2033
2034 2003-01-21 Andreas Schwab <schwab@suse.de>
2035
2036 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Define.
2037 (struct ppc_elf_link_hash_entry): Define.
2038 (ppc_elf_hash_entry): New function.
2039 (struct ppc_elf_link_hash_table): Define.
2040 (ppc_elf_hash_table): New function.
2041 (ppc_elf_link_hash_newfunc): New function.
2042 (ppc_elf_link_hash_table_create): New function.
2043 (ppc_elf_copy_indirect_symbol): New function.
2044 (allocate_dynrelocs): New function.
2045 (readonly_dynrelocs): New function.
2046 (ppc_elf_size_dynamic_sections): Allocate space for dynamic
2047 relocs and determine DT_TEXTREL.
2048 (ppc_elf_check_relocs): Don't do that here, just count the
2049 dynamic relocs.
2050 (ppc_elf_gc_sweep_hook): Discard any dynamic relocs against the
2051 removed section.
2052 (bfd_elf32_bfd_link_hash_table_create): Define.
2053 (elf_backend_copy_indirect_symbol): Define.
2054
2055 2003-01-21 Richard Henderson <rth@redhat.com>
2056
2057 * elf64-alpha.c (alpha_dynamic_entries_for_reloc): GOTTPREL and
2058 TPREL also get a reloc if shared. Remove SREL support.
2059 (elf64_alpha_emit_dynrel): New.
2060 (elf64_alpha_relocate_section): Use it. Resolve dynamic TPREL
2061 and GOTTPREL relocs to local symbols against the tp base.
2062 (elf64_alpha_finish_dynamic_symbol): Use elf64_alpha_emit_dynrel.
2063
2064 * elf64-alpha.c (elf64_alpha_relax_got_load): Decrement got
2065 use count before clobbering r_type.
2066 (elf64_alpha_relax_tls_get_addr): Don't use pos[1] if insn
2067 ordering would mean dataflow inspection is necessary.
2068
2069 2003-01-20 Svein E. Seldal <Svein.Seldal@solidas.com>
2070
2071 * coffcode.h (coff_set_flags): Added get/set arch hooks.
2072
2073 2003-01-20 Fabio Alemagna <falemagn@aros.org>
2074
2075 * elf32-sh.c: Treat elfNN_bed like other macros defined in
2076 elfxx-target.h and #undef it before #define'ing it.
2077 * elf32-i386.c: Likewise.
2078 * elf32-sh64.c: Likewise.
2079 * elf64-alpha.c: Likewise.
2080 * elf64-sh64.c: Likewise.
2081
2082 2003-01-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
2083
2084 * bfd-in2.h: Regenerate.
2085 * elf32-s390.c (elf_s390_adjust_gotplt): New prototype.
2086 (elf_howto_table): Rename R_390_GOTOFF to R_390_GOTOFF32. Add
2087 R_390_GOTOFF16, R_390_GOTOFF64, R_390_GOTPLT12, R_390_GOTPLT16,
2088 R_390_GOTPLT32, R_390_GOTPLT64, R_390_GOTPLTENT, R_390_PLTOFF16,
2089 R_390_PLTOFF32 and R_390_PLTOFF64.
2090 (elf_s390_reloc_type_lookup): Likewise.
2091 (struct elf_s390_link_hash_entry): Add gotplt_refcount to keep track
2092 of GOTPLT references to a function.
2093 (link_hash_newfunc): Initialize gotplt_refcount.
2094 (elf_s390_check_relocs): Move allocation of local_got_refcounts array
2095 and creation of the got section out of the main switch. Add support
2096 for the gotoff, gotplt and pltoff relocations.
2097 (elf_s390_gc_sweep_hook): Add reference counting for gotoff, gotplt
2098 and pltoff.
2099 (elf_s390_adjust_gotplt): New function.
2100 (elf_s390_adjust_dynamic_symbol): Adjust gotplt refcount for removed
2101 plt entries.
2102 (allocate_dynrelocs): Add comment.
2103 (elf_s390_relocate_section): Change r_type to unsigned. Add support
2104 for gotoff, gotplt and pltoff relocations.
2105 * elf64-s390.c: Same changes as for elf32-s390.c.
2106 * libbfd.h: Regenerate.
2107 * reloc.c: Add BFD_RELOC_390_GOTOFF64, BFD_RELOC_390_GOTPLT12,
2108 BFD_RELOC_390_GOTPLT16, BFD_RELOC_390_GOTPLT32, BFD_RELOC_390_GOTPLT64,
2109 BFD_RELOC_390_GOTPLTENT, BFD_RELOC_390_PLTOFF16, BFD_RELOC_390_PLTOFF32
2110 and BFD_RELOC_390_PLTOFF64.
2111
2112 2003-01-18 Jakub Jelinek <jakub@redhat.com>
2113
2114 * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle
2115 R_IA64_TPREL64[LM]SB against non-global symbol properly.
2116
2117 2003-01-16 Jakub Jelinek <jakub@redhat.com>
2118
2119 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add
2120 self_dtpmod_done and self_dtpmod_offset.
2121 (allocate_global_data_got): Only use one got entry for all
2122 dtpmod relocs against local symbols.
2123 (allocate_dynrel_entries): Only need .rela.got entry for
2124 dtpmod against global symbol.
2125 (elfNN_ia64_size_dynamic_sections): Initialize self_dtpmod_offset.
2126 Reserve space in .rela.got for the local dtpmod entry.
2127 (set_got_entry): Initialize the common local dtpmod .got entry.
2128 (elfNN_ia64_relocate_section): Handle R_IA_64_DTPREL64LSB
2129 and R_IA_64_DTPREL64MSB.
2130
2131 2003-01-16 Alan Modra <amodra@bigpond.net.au>
2132
2133 * elf64-ppc.c: Include elf/ppc64.h rather than elf/ppc.h.
2134 (R_PPC_*): Rename all occurrences to R_PPC64_*.
2135 (R_PPC64_ADDR30): Rename all occurrences to R_PPC64_REL30.
2136 (enum elf_ppc_reloc_type): Ditto to enum elf_ppc64_reloc_type.
2137 (ppc64_elf_gc_sweep_hook): Handle R_PPC64_REL30 along with other
2138 relative relocs, not with absolute ones.
2139 * Makefile.am: Run "make dep-am".
2140 * Makefile.in: Regenerate.
2141 * po/SRC-POTFILES.in: Regenerate.
2142
2143 2003-01-15 Andreas Schwab <schwab@suse.de>
2144
2145 * elf32-ppc.c (ppc_elf_check_relocs): Don't set DF_TEXTREL for a
2146 relocation against a non-allocated readonly section.
2147
2148 2003-01-10 Alan Modra <amodra@bigpond.net.au>
2149
2150 * elf32-ppc.c (ppc_elf_relocate_section): Adjust addend for GOT16_HA.
2151 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. PLTGOT16_HA too.
2152
2153 2002-01-08 Klee Dienes <kdienes@apple.com>
2154
2155 * Makefile.am (ALL_MACHINES): Use cpu-msp430.lo, not cpu-msp430.c.
2156 (BFD32_BACKENDS): Use elf32-msp430.lo, not elf32-msp430.c.
2157 * Makefile.in: Regenerate.
2158
2159 2003-01-08 Alexandre Oliva <aoliva@redhat.com>
2160
2161 * elfn32-mips.c (prev_reloc_section): New.
2162 (GET_RELOC_ADDEND): Use it. Parenthesize macro arguments.
2163 (SET_RELOC_ADDEND): Parenthesize macro argument.
2164
2165 2003-01-07 John David Anglin <dave.anglin@nrc.gc.ca>
2166
2167 * elf32-hppa.c (final_link_relocate): For all DP relative relocations,
2168 adjust addil instructions if the symbol has no section.
2169
2170 2003-01-07 DJ Delorie <dj@redhat.com>
2171
2172 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make REL_12 not
2173 partial_inplace.
2174
2175 2003-01-07 Andreas Schwab <schwab@suse.de>
2176
2177 * elf32-m68k.c (elf_m68k_check_relocs): Don't set DF_TEXTREL for
2178 PC relative relocations.
2179 (elf_m68k_discard_copies): Set it here instead.
2180
2181 2002-01-02 Ben Elliston <bje@redhat.com>
2182 Jeff Johnston <jjohnstn@redhat.com>
2183
2184 * Makefile.am (ALL_MACHINES): Add cpu-iq2000.lo.
2185 (ALL_MACHINES_CFILES): Add cpu-iq2000.c.
2186 (BFD32_BACKENDS): Add elf32-iq2000.lo.
2187 (BFD32_BACKENDS_CFILES): Add elf32-iq2000.c.
2188 (cpu-iq2000.lo): New target.
2189 * Makefile.in: Regenerate.
2190 * config.bfd: Handle iq2000-*-elf.
2191 * archures.c (bfd_architecture): Add bfd_{arch,mach}_iq2000.
2192 (bfd_archures_list): Add bfd_iq2000_arch.
2193 * configure.in: Handle bfd_elf32_iq2000_vec.
2194 * configure: Regenerate.
2195 * reloc.c: Add BFD_RELOC_IQ2000_OFFSET_16, BFD_RELOC_IQ2000_OFFSET_21,
2196 and BFD_RELOC_IQ2000_UHI16.
2197 * targets.c (bfd_elf32_iq2000_vec): Declare.
2198 (bfd_target_vector): Add bfd_elf32_iq2000_vec.
2199 * elf.c (prep_headers): Set e_machine to EM_IQ2000.
2200 * cpu-iq2000.c: New file.
2201 * elf32-iq2000.c: Likewise.
2202 * libbfd.h: Regenerate.
2203 * bfd-in2.h: Likewise.
2204
2205 2003-01-02 Richard Sandiford <rsandifo@redhat.com>
2206
2207 * elfxx-mips.c: Include libiberty.h.
2208 (elf_mips_isa, _bfd_mips_elf_mach_extends_p): Remove.
2209 (mips_set_isa_flags): New function, split out from...
2210 (_bfd_mips_elf_final_write_processing): ...here. Only call
2211 mips_set_isa_flags if the EF_MIPS_MACH bits are clear.
2212 (mips_mach_extensions): New array.
2213 (mips_32bit_flags_p): New function.
2214 (_bfd_mips_elf_merge_private_bfd_data): Rework architecture checks.
2215 Use mips_32bit_flags_p to check if one binary is 32-bit and the
2216 other is 64-bit. When adopting IBFD's architecture, adopt the
2217 bfd_mach as well as the flags.
2218
2219 2003-01-02 Nick Kelsey <nickk@ubicom.com>
2220
2221 * elf32-ip2k.c: Re-work of linker relaxation code for the ip2k to
2222 fix internal errors, fix bad code generation, fix incorrect stabs
2223 information, and improve ability to eliminate redundant page
2224 instructions. Added code to ip2k_final_link_relocate to self-verify
2225 the linker relaxation. Fix formatting problems.
2226
2227 2002-12-30 Chris Demetriou <cgd@broadcom.com>
2228
2229 * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mipsisa32r2 case.
2230 * archures.c (bfd_mach_mipsisa32r2): New define.
2231 * bfd-in2.h: Regenerate.
2232 * cpu-mips.c (I_mipsisa32r2): New enum value.
2233 (arch_info_struct): Add entry for I_mipsisa32r2.
2234 * elfxx-mips.c (elf_mips_isa, _bfd_elf_mips_mach)
2235 (_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_32R2.
2236 (_bfd_mips_elf_final_write_processing): Add
2237 bfd_mach_mipsisa32r2 case.
2238 (_bfd_mips_elf_merge_private_bfd_data): Handle merging of
2239 binaries marked as using MIPS32 Release 2.
2240
2241 2002-12-30 Dmitry Diky <diwil@mail.ru>
2242
2243 * Makefile.am: Add msp430 target.
2244 * configure.in: Likewise.
2245 * Makefile.in: Regenerate.
2246 * configure: Regenerate.
2247 * archures.c: Add msp430 architecture vector.
2248 * config.bfd: Likewise.
2249 * reloc.c: Add msp430 relocs.
2250 * targets.c: Add msp320 target.
2251 * cpu-msp430.c: New file: msp430 cpu detection.
2252 * elf32-msp430.c: New file: msp430 reloc processing.
2253 * bfd-in2.h: Regenerate.
2254 * libbfd.h: Regenerate.
2255
2256 2002-12-28 Jakub Jelinek <jakub@redhat.com>
2257
2258 * elf.c (elf_sort_sections): Don't reorder .tbss.
2259 (assign_file_positions_for_segments): Only adjust off/voff
2260 for increased alignment in PT_LOAD or PT_NOTE segment,
2261 but adjust p_filesz for .tbss too. in PT_LOAD consider
2262 .tbss to have zero memory size.
2263 (copy_private_bfd_data) [SECTION_SIZE]: Define.
2264 [IS_CONTAINED_BY_VMA, IS_CONTAINED_BY_LMA]: Use it.
2265 [INCLUDE_SECTION_IN_SEGMENT]: Only put SHF_TLS sections
2266 into PT_TLS segment. Never put SHF_TLS sections in
2267 segments other than PT_TLS or PT_LOAD.
2268
2269 * elf64-alpha.c (elf64_alpha_finish_dynamic_sections): Clear .plt
2270 sh_entsize.
2271
2272 2002-12-23 DJ Delorie <dj@redhat.com>
2273
2274 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Fix logic reversal.
2275
2276 2002-12-23 Alan Modra <amodra@bigpond.net.au>
2277
2278 * elflink.h (elf_link_output_extsym): Heed strip_discarded.
2279
2280 2002-12-23 Nick Clifton <nickc@redhat.com>
2281
2282 * archures.c (bfd_arch_get_compatible): Add third parameter
2283 'accept_unknowns'. Only accept unknown format BFDs if
2284 accept_unknowns is true, or if the format is "binary".
2285 * bfd-in2.h: Regenerate.
2286
2287 2002-12-21 Nick Clifton <nickc@redhat.com>
2288
2289 * coff-arm.c (coff_arm_relocate_section): Disable WINCE workaround
2290 that subtracted 8 from pc relative relocations.
2291
2292 2002-12-20 Kazu Hirata <kazu@cs.umass.edu>
2293
2294 * coff-h8300.c: Fix comment typos.
2295 * coffcode.h: Likewise.
2296 * cpu-cris.c: Likewise.
2297 * elf32-vax.c: Likewise.
2298 * genlink.h: Likewise.
2299 * linker.c: Likewise.
2300 * som.c: Likewise.
2301 * tekhex.c: Likewise.
2302 * vms-misc.c: Likewise.
2303
2304 2002-12-20 DJ Delorie <dj@redhat.com>
2305
2306 * reloc.c: Add BFD_RELOC_XSTORMY16_12.
2307 * libbfd.h: Regenerate.
2308 * bfd-in2.h: Regenerate.
2309 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_12.
2310 (xstormy16_reloc_map): Add R_XSTORMY16_12.
2311
2312 2002-12-19 Kazu Hirata <kazu@cs.umass.edu>
2313
2314 * doc/bfdint.texi: Fix typos.
2315
2316 2002-12-20 Paul Eggert <eggert@twinsun.com>
2317
2318 Port to POSIX 1003.1-2001.
2319 * acinclude.m4 (AM_INSTALL_LIBBFD): Do not rely on "test -o".
2320 * configure.in (build-warnings): Likewise.
2321 (Horrible hacks to build DLLs on Windows): Do not rely on "tail -1".
2322 * aclocal.m4: Regenerate.
2323 * config.in: Regenerate.
2324 * configure: Regenerate.
2325
2326 2002-12-19 Alan Modra <amodra@bigpond.net.au>
2327
2328 * coff-h8300.c: Include libiberty.h.
2329 (h8300_reloc16_extra_cases): Check the hash table creator before
2330 referencing h8300 specific fields. Stash the hash table pointer
2331 in a local var. Comment typo fixes.
2332 (h8300_bfd_link_add_symbols): Likewise.
2333
2334 * bfd/reloc.c (struct reloc_howto_struct): Revise src_mask and
2335 dst_mask comments.
2336 * bfd-in2.h: Regenerate.
2337
2338 2002-12-18 Alan Modra <amodra@bigpond.net.au>
2339
2340 * elf32-ppc.c (ppc_elf_relocate_section): Reorganize dynamic reloc
2341 code a little. Comment on dynamic relocs against section symbols.
2342
2343 2002-12-17 Roger Sayle <roger@eyesopen.com>
2344
2345 * configure.host (ia64-*-hpux*): Support 64 bit targets using
2346 the HP compiler's "long long".
2347
2348 2002-12-16 Andrew MacLeod <amacleod@redhat.com>
2349
2350 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_LO16
2351 and R_XSTORMY16_HI16) howto entries.
2352 (xstormy16_reloc_map): Map R_XSTORMY16_{LO,HI}16 to BFD_RELOC_{LO,HI}16.
2353 (xstormy16_info_to_howto_rela): Use R_XSTORMY16_GNU_VTINHERIT to
2354 determine the start of the second reloc table.
2355
2356 2002-12-16 Nathan Tallent <eraxxon@alumni.rice.edu>
2357
2358 * ecofflink.c: Fix the reading of the debugging information
2359 of Tru64/Alpha binaries that are produced by recent Compaq
2360 compilers.
2361 (mk_fdrtab): Fix error in creating the FDR (file descriptor)
2362 table.
2363 (lookup_line): Because of the strange information sometimes
2364 generated by Compaq's recent compilers, change how the FDR
2365 table is searched so that PDRs (procedure descriptors) are
2366 correctly found. Note that this change is really more of a hack;
2367 however, I have included extensive documentation as to why
2368 this is the best solution short of an extensive rewrite or
2369 another hack.
2370 (fdrtab_lookup): Add comments to explain the algorithm.
2371
2372 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
2373
2374 * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Reorder
2375 initializers to match struct declaration.
2376
2377 2002-12-12 Alan Modra <amodra@bigpond.net.au>
2378
2379 * dwarf2.c (comp_unit_contains_address): Comment typo fix.
2380 * elf.c (get_program_header_size): Likewise.
2381 * elf32-m32r.c (m32r_elf_lo16_reloc): Likewise.
2382 (m32r_elf_generic_reloc): Likewise.
2383 * elf32-ppc.c (ppc_elf_howto_init): Likewise.
2384 * elflink.h (elf_bfd_discard_info): Likewise.
2385
2386 2002-12-12 Alan Modra <amodra@bigpond.net.au>
2387
2388 * elf32-i386.c (elf_i386_finish_dynamic_sections): Add output_offset
2389 to DT_JMPREL. Use srelplt input section size for DT_PLTRELSZ and
2390 DT_RELSZ adjustment, not output section. Avoid writing tags when
2391 unchanged. Don't assume linker script is sane, adjust DT_REL too.
2392 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Just use raw
2393 size of srelplt for DT_PLTRELSZ. Use srelplt input section size for
2394 DT_RELASZ adjustment, not output section. Avoid writing tags when
2395 unchanged. Adjust DT_RELA.
2396 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Tweaks for better
2397 formatting. Avoid writing tags when unchanged. Adjust DT_RELA.
2398
2399 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
2400
2401 * elfxx-mips.c (mips_elf_calculate_relocation): Don't divide
2402 addend by 4.
2403
2404 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
2405
2406 * elfxx-mips.c (struct mips_got_entry): New.
2407 (struct mips_got_info): Added got_entries field.
2408 (mips_elf_got_entry_hash, mips_elf_got_entry_eq): New functions.
2409 (mips_elf_local_got_index, mips_elf_got_page,
2410 mips_elf_got16_entry): Re-implement in terms of new...
2411 (mips_elf_create_local_got_entry): Rewrite to use got_entries.
2412 Change return type.
2413 (mips_elf_highest): Warning clean-up.
2414 (mips_elf_create_got_section): Initialize got_entries.
2415 (_bfd_mips_elf_check_relocs): Use got_entries to estimate
2416 local got size.
2417 (_bfd_mips_elf_size_dynamic_sections): Do not account for
2418 GOT_PAGE entries, since we now reuse GOT16 entries.
2419
2420 2002-12-10 Jason Thorpe <thorpej@wasabisystems.com>
2421
2422 * aoutx.h (set_section_contents): Allow an otherwise unrepresentable
2423 read-only section that lies after .text and before .data to be
2424 written into the output file and included in a_text.
2425 (translate_to_native_sym_flags): If an otherwise unrepresentable
2426 section was merged with .text, convert its symbols to N_TEXT
2427 symbols.
2428 * libaout.h (aout_section_merge_with_text_p): New macro.
2429
2430 2002-12-08 Alan Modra <amodra@bigpond.net.au>
2431
2432 * bfd-in.h: Comment typo fix. Formatting.
2433 * bfd-in2.h: Regenerate.
2434 * coff64-rs6000.c (xcoff64_openr_next_archived_file): Warning fix.
2435 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): Prototype.
2436 * elf64-mmix.c (mmix_dump_bpo_gregs): Warning fix.
2437
2438 2002-12-05 Richard Henderson <rth@redhat.com>
2439
2440 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21BI.
2441 Only send PCREL21B though the plt. Fix installed reloc type.
2442 (elfNN_ia64_relocate_section): Give error for dynamic reloc
2443 against PCREL22 or PCREL64I; clean up error messages for
2444 branch relocs.
2445
2446 2002-12-04 Kevin Buettner <kevinb@redhat.com>
2447
2448 * elf64-mips.c (elf64_mips_grok_prstatus, elf64_mips_grok_psinfo):
2449 New functions.
2450 (elf_backend_grok_prstatus, elf_backend_grok_psinfo): Define.
2451
2452 2002-12-04 David Mosberger <davidm@hpl.hp.com>
2453
2454 * cpu-ia64-opc.c: Add operand constant "ar.csd".
2455
2456 2002-12-04 H.J. Lu <hjl@gnu.org>
2457
2458 * elfxx-ia64.c (get_local_sym_hash): Use section ID instead of
2459 BFD address when constructing local name.
2460
2461 2002-12-04 Andreas Schwab <schwab@suse.de>
2462
2463 * elf32-m68k.c (struct elf_m68k_link_hash_table): Add sym_sec
2464 member.
2465 (elf_m68k_link_hash_table_create): Initialize it.
2466 (elf_m68k_check_relocs): Handle symbols that are forced to be
2467 local due to visibility changes.
2468 (elf_m68k_adjust_dynamic_symbol): Likewise.
2469 (elf_m68k_size_dynamic_sections): Likewise.
2470 (elf_m68k_discard_copies): Likewise.
2471 (elf_m68k_relocate_section): Likewise.
2472
2473 2002-12-04 Alan Modra <amodra@bigpond.net.au>
2474
2475 * elf64-ppc.c (ppc64_elf_edit_opd): Correct typo.
2476
2477 2002-12-04 Alan Modra <amodra@bigpond.net.au>
2478
2479 * srec.c (srec_write_symbols): Restore '$' prefix to address
2480 accidentally removed in 2002-04-04 change.
2481 (srec_get_symtab): Use 0 instead of `(long) FALSE'.
2482
2483 2002-12-03 Nick Clifton <nickc@redhat.com>
2484
2485 * elf32-ppc.c (apuinfo_list_init): New function.
2486 (apuinfo_list_add): New function: Add a value to the list.
2487 (apuinfo_list_length): New function: Return the number of
2488 values on the list.
2489 (apuinfo_list_element): New function: Return a value on the
2490 list.
2491 (apuinfo_list_finish): New function: Free the resources used
2492 by the list.
2493 (ppc_elf_begin_write_processing): New function. Scan the
2494 input bfds for apuinfo sections.
2495 (ppc_elf_write_section): New function: Delay the creation of
2496 the contents of an apuinfo section in an output bfd.
2497 (ppc_elf_final_write_processing): New function. Create the
2498 contents of an apuinfo section in an output bfd.
2499 (elf_backend_begin_write_processing): Define.
2500 (elf_backend_final_write_processing): Define.
2501 (elf_backend_write_section): Define.
2502
2503 2002-12-03 Richard Henderson <rth@redhat.com>
2504
2505 * cpu-ia64-opc.c (elf64_ia64_operands): Add ldxmov entry.
2506
2507 2002-12-01 Stephane Carrez <stcarrez@nerim.fr>
2508
2509 Fix PR savannah/1417:
2510 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Don't adjust
2511 branch if it goes to the start of the deleted region.
2512
2513 2002-12-01 Stephane Carrez <stcarrez@nerim.fr>
2514
2515 * bfd-in2.h (bfd_mach_m6812): Rebuild.
2516 * archures.c (bfd_mach_m6812_default, bfd_mach_m6812,
2517 bfd_mach_m6812s): Declare.
2518
2519 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): New function.
2520 (_bfd_m68hc12_elf_set_private_flags): Call it.
2521 (_bfd_m68hc12_elf_print_private_bfd_data): Report processor version.
2522 (_bfd_m68hc12_elf_merge_private_bfd_data): Merge the flags and
2523 report microcontroller incompatibilities (HC12 vs HCS12).
2524 (elf_backend_object_p): Update.
2525
2526 2002-11-30 Alan Modra <amodra@bigpond.net.au>
2527
2528 * bfd-in.h (TRUE_FALSE_ALREADY_DEFINED, BFD_TRUE_FALSE): Delete.
2529 (enum bfd_boolean, boolean): Delete.
2530 (bfd_boolean): Typedef to an int.
2531 (FALSE, TRUE): Define.
2532 * aix386-core.c, aix5ppc-core.c, aout-adobe.c, aout-arm.c, aout-cris.c,
2533 aout-encap.c, aout-ns32k.c, aout-target.h, aout-tic30.c, aoutf1.h,
2534 aoutx.h, archive.c, archive64.c, archures.c, bfd-in.h, bfd.c, bfdwin.c,
2535 binary.c, bout.c, cache.c, cisco-core.c, coff-a29k.c, coff-alpha.c,
2536 coff-apollo.c, coff-arm.c, coff-aux.c, coff-h8300.c, coff-h8500.c,
2537 coff-i386.c, coff-i860.c, coff-i960.c, coff-ia64.c, coff-m68k.c,
2538 coff-m88k.c, coff-mcore.c, coff-mips.c, coff-or32.c, coff-ppc.c,
2539 coff-rs6000.c, coff-sh.c, coff-sparc.c, coff-stgo32.c, coff-tic30.c,
2540 coff-tic4x.c, coff-tic54x.c, coff-tic80.c, coff-w65.c, coff-we32k.c,
2541 coff-z8k.c, coff64-rs6000.c, coffcode.h, coffgen.c, cofflink.c,
2542 corefile.c, cpu-a29k.c, cpu-alpha.c, cpu-arc.c, cpu-arm.c, cpu-avr.c,
2543 cpu-cris.c, cpu-d10v.c, cpu-d30v.c, cpu-dlx.c, cpu-fr30.c, cpu-frv.c,
2544 cpu-h8300.c, cpu-h8500.c, cpu-hppa.c, cpu-i370.c, cpu-i386.c,
2545 cpu-i860.c, cpu-i960.c, cpu-ia64.c, cpu-ip2k.c, cpu-m10200.c,
2546 cpu-m10300.c, cpu-m32r.c, cpu-m68hc11.c, cpu-m68hc12.c, cpu-m68k.c,
2547 cpu-m88k.c, cpu-mcore.c, cpu-mips.c, cpu-mmix.c, cpu-ns32k.c,
2548 cpu-openrisc.c, cpu-or32.c, cpu-pdp11.c, cpu-pj.c, cpu-powerpc.c,
2549 cpu-rs6000.c, cpu-s390.c, cpu-sh.c, cpu-sparc.c, cpu-tic30.c,
2550 cpu-tic4x.c, cpu-tic54x.c, cpu-tic80.c, cpu-v850.c, cpu-vax.c,
2551 cpu-w65.c, cpu-we32k.c, cpu-xstormy16.c, cpu-z8k.c, dwarf1.c,
2552 dwarf2.c, ecoff.c, ecofflink.c, efi-app-ia32.c, efi-app-ia64.c,
2553 elf-bfd.h, elf-eh-frame.c, elf-hppa.h, elf-m10200.c, elf-m10300.c,
2554 elf-strtab.c, elf.c, elf32-arc.c, elf32-arm.h, elf32-avr.c,
2555 elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c, elf32-fr30.c,
2556 elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c, elf32-hppa.h,
2557 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
2558 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
2559 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
2560 elf32-pj.c, elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-sh64-com.c,
2561 elf32-sh64.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
2562 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
2563 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-ppc.h, elf64-s390.c,
2564 elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c,
2565 elfarm-oabi.c, elfcode.h, elfcore.h, elflink.c, elflink.h,
2566 elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c, elfxx-mips.h,
2567 elfxx-target.h, format.c, freebsd.h, genlink.h, hash.c, hp300hpux.c,
2568 hppabsd-core.c, hpux-core.c, i386aout.c, i386linux.c, i386lynx.c,
2569 i386mach3.c, i386msdos.c, i386os9k.c, ieee.c, ihex.c, irix-core.c,
2570 libaout.h, libbfd-in.h, libbfd.c, libcoff-in.h, libecoff.h, libieee.h,
2571 libnlm.h, liboasys.h, libpei.h, libxcoff.h, linker.c, lynx-core.c,
2572 m68klinux.c, m68klynx.c, mach-o.c, mach-o.h, merge.c, mipsbsd.c,
2573 mmo.c, netbsd-core.c, netbsd.h, nlm.c, nlm32-alpha.c, nlm32-i386.c,
2574 nlm32-ppc.c, nlm32-sparc.c, nlmcode.h, oasys.c, opncls.c, osf-core.c,
2575 pc532-mach.c, pdp11.c, pe-arm.c, pe-i386.c, pe-mcore.c, pe-mips.c,
2576 pe-sh.c, peXXigen.c, pef.c, pei-arm.c, pei-i386.c, pei-mcore.c,
2577 pei-mips.c, pei-sh.c, peicode.h, ppcboot.c, ptrace-core.c, reloc.c,
2578 reloc16.c, riscix.c, rs6000-core.c, sco5-core.c, section.c, simple.c,
2579 som.c, som.h, sparclinux.c, sparclynx.c, srec.c, stabs.c, sunos.c,
2580 syms.c, targets.c, tekhex.c, ticoff.h, trad-core.c, versados.c,
2581 vms-gsd.c, vms-hdr.c, vms-misc.c, vms-tir.c, vms.c, vms.h,
2582 xcoff-target.h, xcofflink.c, xsym.c, xsym.h: Replace boolean with
2583 bfd_boolean, true with TRUE, false with FALSE. Simplify comparisons
2584 of bfd_boolean vars with TRUE/FALSE. Formatting.
2585 * bfd-in2.h, libbfd.h, libcoff.h: Regenerate
2586
2587 2002-11-28 Alan Modra <amodra@bigpond.net.au>
2588
2589 * elf-bfd.h: Replace occurrences of Elf32_Internal_* and
2590 Elf64_Internal_* with Elf_Internal_*. Replace Elf_Internal_Rel
2591 with Elf_Internal_Rela.
2592 * elf-hppa.h, elf-m10200.c, elf-m10300.c, elf32-arc.c, elf32-arm.h,
2593 elf32-avr.c, elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c,
2594 elf32-fr30.c, elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c,
2595 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
2596 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
2597 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
2598 elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-v850.c, elf32-vax.c,
2599 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
2600 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
2601 elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c, elfarm-oabi.c,
2602 elfcode.h, elflink.h, elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c: Ditto.
2603 * elf-hppa.h (elf_hppa_internal_shdr): Delete. Use Elf_Internal_Shdr
2604 throughout instead.
2605 * elf.c (_bfd_elf_no_info_to_howto_rel): Delete.
2606 * elfcode.h (elf_swap_reloca_in): Pass source operand as a bfd_byte *.
2607 Remove INLINE keyword.
2608 (elf_swap_reloc_in): Likewise. Also clear r_addend.
2609 (elf_swap_reloc_out, elf_swap_reloca_out): Pass destination operand
2610 as a bfd_byte *.
2611 (elf_write_relocs): Consolidate REL and RELA code.
2612 (elf_slurp_reloc_table_from_section): Simplify REL code.
2613 (NAME(_bfd_elf,size_info)): Populate reloc swap entries.
2614 * elf-bfd.h (MAX_INT_RELS_PER_EXT_REL): Define.
2615 * elflink.h (elf_link_read_relocs_from_section): Consolidate REL and
2616 RELA code.
2617 (elf_link_adjust_relocs): Likewise. Don't malloc space for temp
2618 reloc array, use a fixed size of MAX_INT_RELS_PER_EXT_REL.
2619 (elf_link_output_relocs): Likewise.
2620 (elf_reloc_link_order): Likewise.
2621 (elf_finish_pointer_linker_section): Likewise.
2622 (struct elf_link_sort_rela): Remove union.
2623 (elf_link_sort_cmp1): Update to suit.
2624 (elf_link_sort_cmp2): Here too.
2625 (elf_link_sort_relocs): Consolidate REL and RELA code. Fix memory
2626 over-allocation for int_rels_per_ext_rel != 1 case.
2627 * elf32-arm.h: Update all bfd_elf32_swap_reloc_out calls.
2628 * elf32-i386.c: Likewise.
2629 * elf32-cris.c: Likewise for bfd_elf32_swap_reloca_out.
2630 * elf32-hppa.c, elf32-i370.c, elf32-m68k.c, elf32-ppc.c, elf32-s390.c,
2631 elf32-sh.c, elf32-vax.c, elfxx-mips.c: Likewise.
2632 * elf64-alpha.c: Likewise for bfd_elf64_swap_reloca_out.
2633 * elf64-hppa.c, elf64-mips.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
2634 elf64-sparc.c, elf64-x86-64.c: Likewise.
2635 * elfxx-ia64.c: Likewise for bfd_elfNN_swap_reloca_out.
2636 * elfxx-mips.c (sort_dynamic_relocs): Likewise for
2637 bfd_elf32_swap_reloc_in.
2638
2639 * elf32-arm.h: Update elf32_arm_info_to_howto calls.
2640 * elf32-mips.c: Likewise for mips_info_to_howto_rel.
2641 (mips_elf64_swap_reloc_in): Zero r_addend.
2642 (mips_elf64_be_swap_reloc_in): Likewise.
2643 (mips_elf64_slurp_one_reloc_table): Simplify.
2644
2645 * elf64-alpha.c (alpha_elf_size_info): Populate reloc swap entries.
2646 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
2647 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
2648
2649 2002-11-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2650
2651 * elf32-sh.c (sh_elf_relocate_section): Don't complain about
2652 unresolved debugging relocs in dynamic applications.
2653 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
2654
2655 2002-11-26 Alan Modra <amodra@bigpond.net.au>
2656
2657 * elf-eh-frame.c (ENSURE_NO_RELOCS): Disregard R_*_NONE relocs.
2658 (_bfd_elf_discard_section_eh_frame): Don't discard duplicate CIEs
2659 on a relocatable link. Comment typos.
2660 * elf.c (_bfd_elf_link_hash_newfunc): Assign elements of structure
2661 in the order they are declared. Clear elf_hash_value too.
2662 (_bfd_elf_link_hash_table_init): Likewise assign in order. Clear
2663 eh_info and tls_segment.
2664 * elflink.h (elf_link_input_bfd <emit_relocs>): Keep reloc offsets
2665 sorted when discarding relocs by turning them into R_*_NONE.
2666
2667 * libbfd.c (warn_deprecated): Comment spelling.
2668 * po/SRC-POTFILES.in: Regenerate.
2669
2670 2002-11-21 Richard Henderson <rth@redhat.com>
2671
2672 * elflink.h (elf_link_add_object_symbols): Don't overwrite the
2673 arch's st_other bits when merging visibilities.
2674 (elf_link_output_extsym): Tidy clearing of visibility field.
2675
2676 2002-11-21 Alan Modra <amodra@bigpond.net.au>
2677
2678 * coff-mcore.c (SWAP_IN_RELOC_OFFSET): Define.
2679 (SWAP_OUT_RELOC_OFFSET): Define.
2680
2681 2002-11-20 Alexandre Oliva <aoliva@redhat.com>
2682
2683 * elf.c (_bfd_elf_link_hash_table_init): Make sure
2684 can_refcount is properly extended to the type of
2685 init_refcount.
2686
2687 2002-11-19 Alexandre Oliva <aoliva@redhat.com>
2688
2689 * elfxx-mips.c (MIPS_RELOC_RELA_P): New macro.
2690 (_bfd_mips_elf_relocate_section): Use it.
2691
2692 * elfxx-mips.c (MNAME): New macro.
2693 (_bfd_mips_elf_check_relocs): Use it.
2694 (_bfd_mips_elf_discard_info): Likewise.
2695 (_bfd_mips_elf_final_link): Likewise.
2696
2697 2002-11-19 Alan Modra <amodra@bigpond.net.au>
2698
2699 * elf64-ppc.c (ppc64_elf_edit_opd): When deleting relocs, adjust
2700 rel_hdr.sh_size too.
2701
2702 2002-11-18 Klee Dienes <kdienes@apple.com>
2703
2704 * Makefile.am (BFD32_LIBS): Add bfdwin.lo, bfdio.lo.
2705 (BFD32_LIBS_CFILES): Add bfdwin.c, bfdio.c.
2706 (BFD_H_FILES): Add bfdwin.c, bfdio.c.
2707 (LIBBFD_H_FILES): Add bfdwin.c, bfdio.c.
2708 Add dependencies for bfdwin.c, bfdio.c.
2709 * bfd.c: Remove bfd_get_mtime, bfd_get_size.
2710 * libbfd.c: Remove real_read, bfd_bread, _bfd_window_internal,
2711 bfd_init_window, bfd_free_window, bfd_get_file_window, bfd_bwrite,
2712 bfd_tell, bfd_flush, bfd_stat, bfd_seek.
2713 * bfdio.c: New file. Contains real_read, bfd_bread, bfd_write,
2714 bfd_tell, bfd_flush, bfd_stat, bfd_seek, bfd_ge_mtime,
2715 bfd_get_size (moved from libbfd.c and bfd.c).
2716 * bfdwin.c New file. Contains _bfd_window_internal,
2717 bfd_init_window, bfd_free_window, bfd_get_file_window (moved from
2718 libbfd.c and bfd.c).
2719 * po/SRC-POTFILES.in: Regenerate.
2720 * po/bfd.pot: Regenerate.
2721 * libbfd.h: Regenerate.
2722 * bfd-in2.h: Regenerate.
2723 * aclocal.m4: Regenerate.
2724 * Makefile.in: Regenerate.
2725 * configure: Regenerate.
2726
2727 2002-11-18 Klee Dienes <kdienes@apple.com>
2728
2729 * bfd.c (bfd_preserve_save): Don't zero BFD_IN_MEMORY.
2730
2731 2002-11-15 Kazu Hirata <kazu@cs.umass.edu>
2732
2733 * coff-h8300.c (h8300_reloc16_estimate): Do not optimize away
2734 jsr after a short jump.
2735 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
2736
2737 2002-11-15 Klee Dienes <kdienes@apple.com>
2738
2739 * pef.c (bfd_pef_convert_architecture): Move declaration of
2740 ARCH_POWERPC and ARCH_M68K to the start of the function.
2741
2742 2002-11-14 Svein E. Seldal <Svein.Seldal@solidas.com>
2743
2744 * coff-tic4x.c (tic4x_howto_table): Formatting fixup
2745
2746 2002-11-14 Hans-Peter Nilsson <hp@bitrange.com>
2747
2748 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs):
2749 For bpo_gregs_section->contents, allocate _raw_size, not
2750 _cooked_size.
2751
2752 2002-11-13 Klee Dienes <kdienes@apple.com>
2753
2754 * config.bfd: Add entries for powerpc-*-darwin and cousins.
2755
2756 2002-11-13 H.J. Lu <hjl@gnu.org>
2757
2758 * elfcode.h (elf_object_p): Don't restore abfd->arch_info.
2759
2760 2002-11-13 Klee Dienes <kdienes@apple.com>
2761 Alan Modra <amodra@bigpond.net.au>
2762
2763 * bfd.c (struct bfd_preserve): New.
2764 (bfd_preserve_save): New function.
2765 (bfd_preserve_restore): Ditto.
2766 (bfd_preserve_finish): Ditto.
2767 * bfd-in2.h: Regenerate.
2768 * mach-o.c: Formatting.
2769 (bfd_mach_o_scan_read_symtab_symbol): Make "value" unsigned.
2770 (bfd_mach_o_object_p): Use bfd_preserve_save/restore/finish.
2771 (bfd_mach_o_core_p): Ditto.
2772 (bfd_mach_o_scan): Pass in mdata.
2773 * mach-o.h (bfd_mach_o_scan): Update prototype.
2774 * pef.c: Formatting.
2775 (bfd_pef_object_p): Use bfd_preserve_save/restore/finish.
2776 (bfd_pef_xlib_object_p): Ditto.
2777 (bfd_pef_scan): Pass in mdata. Move version check to bfd_pef_object_p.
2778 * pef.h (bfd_pef_scan): Update prototype.
2779 * xsym.c: Formatting, K&R fixes.
2780 (bfd_sym_object_p): Use bfd_preserve_save/restore/finish.
2781 (bfd_sym_scan): New function split out from bfd_sym_object_p.
2782 * xsym.h (bfd_sym_scan): Declare.
2783 * elfcode.h (elf_object_p): Use bfd_preserve_save/restore/finish.
2784 * elfcore.h (elf_core_file_p): Likewise.
2785 * targets.c (_bfd_target_vector): Revert 2002-11-08 change.
2786
2787 2002-11-12 Nick Clifton <nickc@redhat.com>
2788
2789 * po/da.po: Updated Danish translation.
2790
2791 2002-11-12 Alan Modra <amodra@bigpond.net.au>
2792
2793 * elflink.h (elf_link_add_object_symbols): Optimize stabs for
2794 relocatable link too.
2795 (elf_link_input_bfd): When emitting relocs, adjust offsets for
2796 eh_frame and stab sections. Zap deleted relocs.
2797 (elf_reloc_symbol_deleted_p): Return true for zero r_symndx.
2798 (elf_bfd_discard_info): Run for relocatable link too.
2799 * elf64-ppc.c (ppc64_elf_edit_opd): Rename from edit_opd. Make global.
2800 Handle ld -r case.
2801 (ppc64_elf_size_dynamic_sections): Don't call edit_opd from here.
2802 * elf64-ppc.h (ppc64_elf_edit_opd): Declare.
2803
2804 * elf-bfd.h (struct cie_header): Move from elf_eh-frame.c.
2805 (struct cie, struct eh_cie_fde, struct eh_frame_sec_info): Likewise.
2806 (struct eh_frame_array_ent, struct eh_frame_hdr_info): Likewise.
2807 (enum elf_link_info_type): Remove ELF_INFO_TYPE_EH_FRAME_HDR.
2808 (struct eh_frame_hdr_info): Add "hdr_sec", remove "split".
2809 (struct elf_link_hash_table): Add eh_info.
2810 (struct elf_obj_tdata): Change eh_frame_hdr to an asection *.
2811 (_bfd_elf_discard_section_eh_frame): Update prototype.
2812 (_bfd_elf_discard_section_eh_frame_hdr): Likewise.
2813 (_bfd_elf_write_section_eh_frame): Likewise.
2814 (_bfd_elf_write_section_eh_frame_hdr): Likewise.
2815 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Remove "ehdrsec"
2816 param. Get "hdr_info" from link hash table.
2817 (_bfd_elf_discard_section_eh_frame_hdr): Remove "sec" param. Get
2818 header section from link hash table. Save header section to elf_tdata.
2819 (_bfd_elf_maybe_strip_eh_frame_hdr): Remove local "sec". Use
2820 header section from link hash table. Don't alloc hdr_info. Clear
2821 hdr_sec instead of setting "strip".
2822 (_bfd_elf_eh_frame_section_offset): Formatting.
2823 (_bfd_elf_write_section_eh_frame): Remove "ehdrsec", add "info" param.
2824 Get header section from link hash table.
2825 (_bfd_elf_write_section_eh_frame_hdr): Remove "sec", add "info" param.
2826 Get header section from link hash table.
2827 * elf.c (map_sections_to_segments): Use cached eh_frame_hdr.
2828 (get_program_header_size): Likewise.
2829 (_bfd_elf_section_offset): Formatting.
2830 * elflink.h (elf_link_create_dynamic_sections): Stash eh frame header
2831 section pointer in link hash table.
2832 (elf_bfd_final_link): Adjust _bfd_elf_write_section_eh_frame_hdr
2833 and _bfd_elf_write_section_eh_frame calls. Update comment about
2834 eh_frame entries.
2835 (elf_bfd_discard_info): Adjust _bfd_elf_discard_section_eh_frame and
2836 _bfd_elf_discard_section_eh_frame_hdr calls. Remove "ehdr".
2837
2838 * po/SRC-POTFILES.in: Regenerate.
2839
2840 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't zero
2841 relocs for discarded FDEs. Remove dead code.
2842 (_bfd_elf_write_section_eh_frame_hdr): Remove dead code.
2843 * elflink.h (elf_bfd_discard_info): Don't save edited relocs.
2844 Tidy conditions under which stabs are edited. Formatting.
2845 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
2846 from discarded relocs.
2847 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Add reloc output
2848 section adjustments after testing magic values.
2849
2850 2002-11-12 Thomas Moestl <tmm@FreeBSD.org>
2851
2852 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Correct
2853 references to large plt symbols.
2854
2855 2002-11-12 Klee Dienes <kdienes@apple.com>
2856
2857 * mach-o.c (bfd_mach_o_scan_read_thread): Don't re-use 'i' when
2858 looking for an unused section name.
2859
2860 2002-11-11 Kazu Hirata <kazu@cs.umass.edu>
2861
2862 * coff-h8300.c: Fix formatting.
2863 * elf32-h8300.c: Likewise.
2864 * reloc16.c: Likewise.
2865
2866 2002-11-09 Jeroen Dobbelaere <jeroen.dobbelaere@acunia.com>
2867
2868 * elf32-arm.h (elf32_arm_size_dynamic_sections): Don't strip output
2869 section when dynamic section unused; _bfd_strip_section_from_output
2870 instead.
2871
2872 2002-11-08 Alan Modra <amodra@bigpond.net.au>
2873
2874 * targets.c (_bfd_target_vector): Disable pef_vec, pef_xlib_vec
2875 and sym_vec.
2876
2877 * dwarf2.c: Revert last change.
2878
2879 2002-11-07 Michal Ludvig <mludvig@suse.cz>
2880
2881 * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
2882 _bfd_dwarf2_find_nearest_line): Use
2883 bfd_simple_get_relocated_section_contents() instead of
2884 bfd_get_section_contents().
2885 * reloc.c (bfd_perform_relocation): Add sanity check.
2886 * simple.c (simple_get_relocated_section_contents): If the section
2887 does not have any relocs associated with it, just return the
2888 unadjusted contents.
2889
2890 2002-11-07 Hans-Peter Nilsson <hp@axis.com>
2891
2892 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOT,
2893 case R_CRIS_32_GOT>: Correct test for filling in constant .got
2894 contents, enabling for a non-DSO, for symbols defined in the
2895 program with --export-dynamic.
2896
2897 2002-11-07 Alan Modra <amodra@bigpond.net.au>
2898
2899 * elf64-ppc.c: Comment typo fixes.
2900 (ppc64_elf_merge_private_bfd_data): Allow BFD_ENDIAN_UNKNOWN input.
2901
2902 2002-11-07 Nick Clifton <nickc@redhat.com>
2903
2904 * po/da.po: Updated Danish translation.
2905
2906 2002-11-06 Alexandre Oliva <aoliva@redhat.com>
2907
2908 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Generate
2909 exactly three internal relocs per external reloc. Set reloc_count
2910 to the external reloc count.
2911
2912 2002-11-06 Klee Dienes <kdienes@apple.com>
2913
2914 * coff-stgo32.c (stub_bytes): Mark as const.
2915 Fix comment formatting.
2916
2917 2002-11-06 Klee Dienes <kdienes@apple.com>
2918
2919 * Makefile.am (BFD32_BACKENDS): Add mach-o.lo, pef.lo, and
2920 xsym.lo.
2921 (BFD32_BACKENDS_CFILES): Add mach-o.c, pef.c, and xsym.c.
2922 (SOURCE_HFILES): Add mach-o.h, pef.h, pef-traceback.h, xsym.h
2923 * archures.c (enum bfd_architecture): Add bfd_arch_m98k.
2924 * bfd.c (struct bfd): Add private data for mach-o, pef, and sym.
2925 * targets.c (enum bfd_flavour): Add flavours for mach-o, pef, and
2926 sym.
2927 (_bfd_target_vector): Add target vectors for mach-o, pef, and sym.
2928 * Makefile.in: Regenerate.
2929 * doc/Makefile.in: Regenerate.
2930 * bfd-in2.h: Regenerate.
2931 * xsym.c: New file. Contains support for the Apple/Metrowerks
2932 xSYM debugging format.
2933 * xsym.h: New file.
2934 * pef.c: New file. Contains support for the Apple Code Fragment
2935 Manager Preferred Executable Format
2936 * pef.h: New file.
2937 * pef-traceback.h: New file. Contains support for parsing PowerPC
2938 traceback tables as used by PEF executables (and perhaps other
2939 systems as well).
2940 * mach-o.c: New file. Contains support for the Mach-O object file
2941 format.
2942 * mach-o.h: New file.
2943 * mach-o-target.c: New file. Declares the mach-o targets
2944 themselves. Included three times by mach-o.c; each time with a
2945 different set of macros set.
2946
2947 2002-11-06 Graeme Peterson <gp@qnx.com>
2948
2949 * Makefile.am: Remove entries for elf32-qnx.[ch].
2950 * Makefile.in: Regenerate.
2951 * config.bfd: Change arm-nto to use bfd_elf32_{big|little}arm_vec,
2952 ppc-nto to use bfd_elf32_powerpc{le}_vec, sh-nto to use
2953 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
2954 * configure.in: Remove support for bfd_elf32_sh{l}qnx_vec,
2955 bfd_elf32_powerpc{le}qnx_vec, bfd_elf32_{big|little}armqnx_vec,
2956 and bfd_elf32_i386qnx_vec, and removed elf32-qnx.lo from other targets.
2957 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
2958 * configure: Regenerate.
2959 * elf32-qnx.c: Remove.
2960 * elf32-qnx.h: Remove.
2961 * elf.c: Remove calls to QNX specific set_nonloadable_filepos,
2962 is_contained_by_filepos, and copy_private_bfd_data_p.
2963 * elf-bfd.h (struct elf_backend_data): Remove set_nonloadable_filepos,
2964 is_contained_by_filepos, and copy_private_bfd_data_p.
2965 * elf32-i386.c: Remove QNX extended bfd support.
2966 * elf32-ppc.c: Remove QNX extended bfd support.
2967 * elf32-sh.c: Remove QNX extended bfd support.
2968 * elfarm-nabi.c: Remove QNX extended bfd support.
2969 * targets.c: Remove qnx vectors.
2970 * elfxx-target.h (elf_backend_set_nonloadable_filepos): Remove
2971 (elf_backend_is_contained_by_filepos): Remove.
2972 (elf_backend_copy_private_bfd_data_p): Remove.
2973 * po/SRC-POTFILES.in: Regenerate.
2974
2975 2002-11-06 David O'Brien <obrien@FreeBSD.org>
2976 Alan Modra <amodra@bigpond.net.au>
2977
2978 * elf64-sparc.c (sparc64_elf_relocate_section): Adjust addend of
2979 dynamic relocs against section symbols for the output section vma.
2980
2981 2002-11-05 Alan Modra <amodra@bigpond.net.au>
2982
2983 * elf32-arm.h (t2a1_push_insn, t2a2_ldr_insn, t2a3_mov_insn,
2984 t2a4_bx_insn, t2a5_pop_insn, t2a6_bx_insn): Remove.
2985
2986 2002-11-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2987 Alan Modra <amodra@bigpond.net.au>
2988
2989 * config.bfd (sh-*-linux*): Use bfd_elf*_sh64*lin_vec as sh64
2990 vectors in target_selvecs.
2991 (shle-*-netbsdelf*): Use bfd_elf*_sh64*nbsd_vec as sh64 vectors
2992 in target_selvecs.
2993 (sh-*-netbsdelf*): Likewise.
2994 * configure.in (assocvecs): New variable. Handle assocvecs like
2995 selvecs.
2996 * configure: Regenerate.
2997 * format.c (bfd_check_format_matches): Store bfd_target pointers
2998 in matching_vector instead of target names. Select first target
2999 from bfd_associated_vector that matches a list of ambiguous targets.
3000 * targets.c (_bfd_associated_vector): New array.
3001 (bfd_associated_vector): New variable.
3002 (_bfd_target_vector): Add bfd_elf*_sh64*lin_vec.
3003 * libbfd-in.h (bfd_associated_vector): Declare.
3004 * libbfd.h: Regenerate.
3005
3006 2002-11-05 Elias Athanasopoulos <eathan@otenet.gr>
3007
3008 * vms-gsd.c (_bfd_vms_write_gsd): Check that symbol->udata.p is
3009 non-NULL before dereferencing.
3010
3011 2002-11-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3012
3013 * vms.c (vms_object_p): Restore the start address when returning
3014 NULL.
3015
3016 2002-11-04 Alan Modra <amodra@bigpond.net.au>
3017 Hans-Peter Nilsson <hp@axis.com>
3018
3019 * elflink.h (struct elf_final_link_info): Add shndxbuf_size.
3020 (elf_bfd_final_link): Don't bother zeroing symtab_hdr fields.
3021 Set up a larger symshndxbuf, and write it out. Free it on
3022 exit rather than freeing symbuf twice. Correct section index
3023 on output section symbol loop.
3024 (elf_link_output_sym): Accumulate symbol extension section
3025 indices, reallocating symshndxbuf rather than writing it out.
3026 (elf_link_flush_output_syms): Don't flush symshndxbuf.
3027 * elf.c (assign_section_numbers): Init i_shdrp to all zero.
3028 Use bfd_zalloc to clear i_shdrp[0] too.
3029
3030 2002-11-03 Stephen Clarke <stephen.clarke@earthling.net>
3031
3032 * elf32-sh64-com.c (sh64_address_in_cranges): Use
3033 _raw_size of cranges section if _cooked_size not yet set.
3034
3035 2002-11-03 Hans-Peter Nilsson <hp@axis.com>
3036
3037 * elf32-v850.c (v850_elf_relax_delete_bytes): Correct parameters
3038 for bfd_elf32_swap_symbol_out.
3039
3040 2002-10-31 David O'Brien <obrien@FreeBSD.org>
3041
3042 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't mix
3043 signed and unsigned in comparison.
3044
3045 2002-10-30 Daniel Jacobowitz <drow@mvista.com>
3046
3047 * coffcode.h: Remove extraneous '\'.
3048
3049 2002-10-28 H.J. Lu <hjl@gnu.org>
3050
3051 * Makefile.am (targets.lo): Depend on Makefile instead of
3052 config.status.
3053 (archures.lo): Likewise.
3054 * Makefile.in: Regenerated.
3055
3056 2002-10-25 Jason Thorpe <thorpej@wasabisystems.com>
3057
3058 * config.bfd (mips*el-*-netbsd*, mips*-*-netbsd*): Add
3059 bfd_elf64_bigmips_vec and bfd_elf64_littlemips_vec to
3060 targ_selvecs.
3061
3062 2002-10-25 Jim Wilson <wilson@redhat.com>
3063
3064 * elf64-sh64.c (sh_elf64_relocate_section): Call
3065 _bfd_elf_rela_local_sym. Handle relocs against STT_SECTION symbol
3066 of SHF_MERGE section.
3067
3068 2002-10-25 Hans-Peter Nilsson <hp@axis.com>
3069
3070 * simple.c: Correct placement of ATTRIBUTE_UNUSED.
3071
3072 2002-10-24 John David Anglin <dave@hiauly1.hia.nrc.ca>
3073
3074 * aoutx.h (NAME(aout,swap_ext_reloc_in)): Cast bytes->r_index to
3075 unsigned int. Cast RELOC_BASE10, RELOC_BASE13 and RELOC_BASE22 to
3076 unsigned int.
3077 (NAME(aout,final_link)): Cast enum used in assignment.
3078 (aout_link_write_symbols): Cast enums in comparisons, int values to
3079 boolean, enums in assignments to int.
3080 (aout_link_input_section_std): Cast rel->r_index to unsigned int.
3081 (aout_link_input_section_ext): Likewise. Cast enums used in comparisons
3082 with unsigned ints.
3083 (aout_link_reloc_link_order): Cast enum to int in assignment.
3084 * archive.c (_bfd_generic_read_ar_hdr_mag): Cast result of memchr
3085 calls to char *.
3086 * bfd-in.h (bfd_set_section_vma): Cast enum true to unsigned int in
3087 assignment.
3088 * bfd-in2.h (bfd_set_section_vma): Likewise.
3089 * bfd.c (bfd_record_phdr): Cast enums in assignments.
3090 * binary.c (bfd_alloc): Cast enum to long.
3091 * coffgen.c (_bfd_coff_is_local_label_name): Cast return to boolean.
3092 * dwarf2.c (read_abbrevs): Add casts to enum types.
3093 (read_attribute_value): Likewise.
3094 (arange_add): Cast result of bfd_zalloc call.
3095 (comp_unit_contains_address): Return true and false.
3096 (comp_unit_find_nearest_line): Cast return to boolean.
3097 * format.c (bfd_check_format_matches, bfd_set_format): Likewise.
3098 * gen-aout.c: define macro '_' if not defined.
3099 * libbfd.c (bfd_realloc): Cast malloc and realloc to PTR.
3100 (bfd_bwrite): Cast bfd_realloc to bfd_byte *.
3101 (bfd_write_bigendian_4byte_int): Cast return to boolean.
3102 (bfd_seek): Cast bfd_realloc to bfd_byte *.
3103 (bfd_generic_is_local_label_name): Cast return to boolean.
3104 * libcoff.h (_bfd_coff_adjust_symndx): Remove extraneous '\'.
3105 * linker.c (_bfd_link_hash_newfunc): Cast bfd_hash_allocate result to
3106 struct bfd_hash_entry *.
3107 (_bfd_generic_link_hash_newfunc): likewise.
3108 (_bfd_generic_final_link): Cast enum to unsigned int.
3109 * merge.c (sec_merge_emit): Cast return to boolean.
3110 (merge_strings): Add casts to const unsigned char *.
3111 * reloc.c (bfd_get_reloc_code_name): Cast enums in comparison to int.
3112 (bfd_generic_get_relocated_section_content): Cast enum to unsigned int.
3113 * section.c (bfd_section_hash_newfunc): Cast bfd_hash_allocate result to
3114 struct bfd_hash_entry *.
3115 (bfd_set_section_content): Add cast to PTR in comparison.
3116 * simple.c (simple_dummy_warning, simple_dummy_undefined_symbol,
3117 simple_dummy_reloc_overflow, simple_dummy_reloc_dangerous,
3118 simple_dummy_unattached_reloc,
3119 bfd_simple_get_relocated_section_contents): Add K&R declarations and
3120 function definitions.
3121 * srec.c (S3Forced): Initialize to false.
3122 (srec_get_symtab): Cast return value from bfd_alloc to asymbol *.
3123 * stabs.c (_bfd_link_section_stabs): Cast enum to int in comparisons.
3124 (_bfd_discard_section_stabs): Likewise. Also cast return to boolean.
3125 * syms.c (bfd_is_undefined_symclass): Cast return to boolean.
3126 (_bfd_stab_section_find_nearest_line): Cast enum to bfd_byte in
3127 comparisons.
3128
3129 2002-10-23 Jakub Jelinek <jakub@redhat.com>
3130
3131 * elf64-alpha.c (elf64_alpha_check_relocs): Only put maybe_dynamic
3132 relocs into shared lib non-allocated reloc sections.
3133
3134 2002-10-23 Nathan Tallent <eraxxon@alumni.rice.edu>
3135
3136 * dwarf2.c (add_line_info): Ensure that the line_info_table is
3137 sorted even when given an out-of-order line sequence.
3138 (lookup_address_in_line_info_table): When an exact VMA match is
3139 not found, return line information with the closest VMA.
3140
3141 2002-10-23 Ross Alexander <ross.alexander@uk.neceur.com>
3142
3143 * elf64-hppa.c: Force DT_FLAGS to always be set. Required by
3144 HPUX 11.00 patch PHSS_26559.
3145
3146 2002-10-22 Alexandre Oliva <aoliva@redhat.com>
3147
3148 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Don't move
3149 the options section into a separate section unless IRIX 6
3150 compatibility is enabled.
3151
3152 2002-10-22 Alexandre Oliva <aoliva@redhat.com>
3153
3154 * elflink.h (struct elf_link_sort_rela): Turn rel and rela
3155 into arrays.
3156 (elf_link_sort_cmp1, elf_link_sort_cmp2): Adjust.
3157 (elf_link_sort_relocs): Likewise. Take int_rels_per_ext_rel
3158 into account.
3159 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Compose
3160 R_MIPS_REL32 with R_MIPS64 if ABI_64_P.
3161
3162 2002-10-21 Graeme Peterson <gp@qnx.com>
3163
3164 * targets.c (_bfd_target_vector): Add missing qnx vectors.
3165
3166 2002-10-21 Alan Modra <amodra@bigpond.net.au>
3167
3168 * targets.c (bfd_target_list): Don't return the default target twice.
3169
3170 2002-10-21 Elias Athanasopoulos <eathan@otenet.gr>
3171
3172 * archive.c (_bfd_archive_bsd_update_armap_timestamp): Replace
3173 perror with bfd_perror.
3174
3175 2002-10-19 H.J. Lu <hjl@gnu.org>
3176
3177 * elflink.h (elf_link_add_object_symbols): Correctly handle
3178 DT_RPATH and DT_RUNPATH.
3179
3180 2002-10-19 Mark Kettenis <kettenis@gnu.org>
3181
3182 * elf.c (elfcore_grok_note): Fix recognition on NT_PRXFPREG notes.
3183
3184 2002-10-17 Denis Chertykov <denisc@overta.ru>
3185
3186 * elf32-ip2k.c (ELF_MACHINE_ALT1): Define alternate machine code
3187 for ip2k port.
3188
3189 2002-10-17 Alan Modra <amodra@bigpond.net.au>
3190
3191 * elfxx-target.h (USE_REL): Don't define as 1.
3192 * elf32-arm.h (USE_REL): Provide a default define of 0.
3193 Use #if rather than #ifdef when testing USE_REL.
3194 * elf32-m32r.c: Likewise.
3195
3196 * elf32-arc.c (USE_REL): Define as 1.
3197 * elf32-d10v.c (USE_REL): Likewise.
3198 * elf32-m32r.c (USE_REL): Likewise.
3199 * elf32-m68hc11.c (USE_REL): Likewise.
3200 * elf32-m68hc12.c (USE_REL): Likewise.
3201 * elf32-or32.c (USE_REL): Likewise.
3202 * elfarm-nabi.c (USE_REL): Likewise.
3203
3204 2002-10-16 Jakub Jelinek <jakub@redhat.com>
3205
3206 * config.bfd (s390-*-linux*): Add targ64_selvecs.
3207 (s390x-*-linux*): Add targ_selvecs.
3208
3209 2002-10-16 Alan Modra <amodra@bigpond.net.au>
3210
3211 * Makefile.am (BFD32_BACKENDS): Remove elfarmqnx-nabi.lo,
3212 elf32-i386-fbsd.lo, elf32-i386qnx.lo, elf32-ppcqnx.lo,
3213 elf32-sh-lin.lo, elf32-sh64-lin.lo, elf32-sh-nbsd.lo,
3214 elf32-sh64-nbsd.lo, elf32-shqnx.lo. Add elf32-qnx.lo.
3215 (BFD32_BACKENDS_CFILES): Likewise for corresponding C files.
3216 (BFD64_BACKENDS): Remove elf64-sh64-lin.lo, elf64-sh64-nbsd.lo.
3217 (BFD64_BACKENDS_CFILES): Likewise for corresponding C files.
3218 (SOURCE_HFILES): Add elf32-qnx.h.
3219 (BUILD_HFILES): Add bfdver.h.
3220 Run "make dep-am".
3221 * Makefile.in: Regenerate.
3222 * configure.in Update bfd vector dependencies.
3223 * configure: Regenerate.
3224 * elf32-i386-fbsd.c: Delete. Move code to elf32-i386.c.
3225 * elf32-i386qnx.c: Likewise.
3226 * elf32-ppcqnx.c: Delete. Move code to elf32-ppc.c.
3227 * elf32-sh-nbsd.c: Delete. Move code to elf32-sh.c.
3228 * elf32-sh-lin.c: Likewise.
3229 * elf32-shqnx.c: Likewise.
3230 * elf32-sh64-lin.c: Delete. Move code to elf32-sh64.c.
3231 * elf32-sh64-nbsd.c: Likewise.
3232 * elf64-sh64-lin.c: Delete. Move code to elf64-sh64.c.
3233 * elf64-sh64-nbsd.c: Likewise.
3234 * elfarmqnx-nabi.c: Delete. Move code to elfarm-nabi.c.
3235 * elf32-arm.h (ELF_MAXPAGESIZE): Always define.
3236 * elf32-i386.c: Remove ELF_ARCH and ELF32_I386_C_INCLUDED tests.
3237 * elf32-ppc.c: Remove ELF32_PPC_C_INCLUDED tests.
3238 * elf32-qnx.h (elf_backend_set_nonloadable_filepos): Always define.
3239 (elf_backend_is_contained_by_filepos): Likewise.
3240 (elf_backend_copy_private_bfd_data_p): Likewise.
3241 Globalize and move functions to..
3242 * elf32-qnx.c: ..here. New file.
3243 * elf32-sh.c: Remove ELF_ARCH and ELF32_SH_C_INCLUDED tests. Don't
3244 emit target vectors when INCLUDE_SHMEDIA.
3245 * elf32-sh64.c: Remove ELF_ARCH test. Move TARGET_* etc. defines to
3246 end of file.
3247 * elf64-sh64.c: Remove ELF_ARCH test.
3248 * elfarm-nabi.c: Remove ELFARM_NABI_C_INCLUDED test.
3249 * po/BLD-POTFILES.in: Regenerate.
3250 * po/SRC-POTFILES.in: Regenerate.
3251
3252 2002-10-16 Alan Modra <amodra@bigpond.net.au>
3253
3254 * elflink.h (elf_link_add_object_symbols): Error out on dynamic objects
3255 loaded with --just-symbols.
3256
3257 * elf32-i386qnx.c (TARGET_LITTLE_NAME): Define.
3258 * elf32-ppcqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
3259 * elf32-shqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
3260 * elfarmqnx-nabi.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
3261
3262 2002-10-15 Richard Henderson <rth@redhat.com>
3263
3264 * Makefile.am (BFD64_BACKENDS): Remove elf64-alpha-fbsd.
3265 (BFD64_BACKENDS_CFILES): Likewise.
3266 * configure.in (bfd_elf64_alpha_freebsd_vec): Use elf64-alpha.
3267 * elf64-alpha-fbsd.c: Remove file, move code ...
3268 * elf64-alpha.c: ... here.
3269 * Makefile.in, configure: Rebuild.
3270
3271 2002-10-14 Richard Henderson <rth@redhat.com>
3272
3273 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: Increment
3274 VALUE, not ADDEND.
3275
3276 2002-10-14 Stephen Clarke <stephen.clarke@superh.com>
3277
3278 * elf32-sh.c (elf_sh_link_hash_entry): Replace
3279 datalabel_got_offset with union of datalabel_got
3280 offset and refcount.
3281 (sh_elf_link_hash_newfunc): Initialize datalabel_got.refcount.
3282 (allocate_dynrelocs): Delete unnecessary code for
3283 STT_DATALABEL type. Create entry in got for
3284 datalabel version of symbol if datalabel_got.refcount > 0.
3285 (sh_elf_relocate_section): Use datalabel_got union.
3286 (sh_elf_gc_sweep_hook): Pull common code to initialize
3287 h and eh out of switch statement. Declare seen_stt_datalabel.
3288 Initialize it. Decrement datalabel_got.refcount for
3289 got relocs when seen_stt_datalabel is true.
3290 Decrement local_got_refcounts entry for datalabel got relocs
3291 of local symbols.
3292 (sh_elf_copy_indirect_symbol): Copy datalabel_got field over.
3293 (sh_elf_check_relocs): Declare seen_stt_datalabel.
3294 Initialize it. When seen_stt_datalabel is true, increment
3295 datalabel_got refcount rather than got.refcount.
3296 (sh_elf_finish_dynamic_symbol): Create relocs to
3297 initialize got entry for datalabel version of symbol.
3298
3299 2002-10-14 Alan Modra <amodra@bigpond.net.au>
3300
3301 * Makefile.am: Run "make dep-am".
3302 (BFD_H_FILES): Remove version.h.
3303 * bfd-in.h (BFD_VERSION, BFD_VERSION_DATE, BFD_VERSION_STRING): Move..
3304 * version.h: ..to here.
3305 * configure.in (bfd_version_date): Remove.
3306 (AC_OUTPUT): Make bfdver.h from version.h.
3307 * bfd.c: #include "bfdver.h".
3308 * vms-hdr.c: Likewise.
3309 * Makefile.in: Regenerate.
3310 * bfd-in2.h: Regenerate.
3311 * configure: Regenerate.
3312 * po/SRC-POTFILES.in: Regenerate.
3313
3314 2002-10-14 Alan Modra <amodra@bigpond.net.au>
3315
3316 * archures.c (bfd_mach_i386_i386, bfd_mach_i386_i8086,
3317 bfd_mach_i386_i386_intel_syntax, bfd_mach_x86_64,
3318 bfd_mach_x86_64_intel_syntax bfd_mach_ppc, bfd_mach_ppc64,
3319 bfd_mach_rs6k, bfd_mach_d10v, bfd_mach_sh, bfd_mach_v850,
3320 bfd_mach_arc_5, bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8,
3321 bfd_mach_m32r, bfd_mach_frv, bfd_mach_frvsimple,
3322 bfd_mach_ia64_elf64, bfd_mach_ia64_elf32,
3323 bfd_mach_ip2022, bfd_mach_ip2022ext,
3324 bfd_mach_s390_31, bfd_mach_s390_64, bfd_mach_xstormy16): Renumber.
3325 * bfd-in2.h: Regenerate.
3326
3327 2002-10-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3328
3329 * config.bfd (sh*eb-*-linux*, sh*-*-linux*): Add the alternative
3330 endian vector to targ_selvecs.
3331
3332 2002-10-13 Alexandre Oliva <aoliva@redhat.com>
3333
3334 * elfxx-mips.c (mips_elf_calculate_relocation): Take
3335 save_addend argument. Don't apply the 32-bit mask to a
3336 GPREL32 value if it's to be used in another relocation. Don't
3337 use forced-check computation of local_p to decide whether to
3338 add gp0 to GPREL16 value. Don't use only the lowest 16 bits
3339 of the addend of a non-in-place GPREL16 relocation.
3340 (_bfd_mips_elf_relocate_section): Pass use_saved_addend_p to
3341 mips_elf_calculate_relocation().
3342
3343 2002-10-12 Stephane Carrez <stcarrez@nerim.fr>
3344
3345 * elf32-m68hc11.c (m68hc11_elf_relax_section): Don't treat relocs
3346 with symbols in other sections if we relaxed something; the sections
3347 output offsets must be re-computed before.
3348
3349 2002-10-12 Stephane Carrez <stcarrez@nerim.fr>
3350
3351 * elf32-m68hc11.c (m68hc11_elf_relax_section): Update symbols
3352 handling to use Elf_Internal_Sym.
3353 (m68hc11_elf_relax_delete_bytes): Likewise.
3354
3355 2002-10-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3356
3357 * elf32-sh.c (sh_elf_optimized_tls_reloc, sh_elf_mkobject,
3358 sh_elf_object_p, dtpoff_base): New functions.
3359 (sh_elf_howto_table): Add TLS relocs.
3360 (sh_reloc_map): Likewise.
3361 (sh_elf_info_to_howto): Support TLS relocs.
3362 (elf_sh_link_hash_entry): Add tls_type and tls_tpoff32.
3363 (sh_elf_hash_entry, sh_elf_tdata, sh_elf_local_got_tls_type):
3364 New macros.
3365 (sh_elf_obj_tdata): New.
3366 (elf_sh_link_hash_table): Add tls_ldm_got.
3367 (sh_elf_link_hash_table_create): Clear refcount of tls_ldm_got.
3368 (allocate_dynrelocs): Support TLS relocs.
3369 (sh_elf_size_dynamic_sections): Likewise.
3370 (sh_elf_relocate_section): Support TLS relocs. Don't try to find
3371 .rela.got section when found already. Return false after printing
3372 error about unresolvable relocation.
3373 (sh_elf_gc_sweep_hook): Support TLS relocs.
3374 (sh_elf_check_relocs): Likewise.
3375 (sh_elf_finish_dynamic_symbol): Likewise.
3376 (bfd_elf32_mkobject, elf_backend_object_p): Define for TLS case.
3377 * reloc.c: Add SH TLS relocs.
3378 * bfd-in2.h, libbfd.h: Regenerate.
3379
3380 2002-10-11 Daniel Jacobowitz <drow@mvista.com>
3381
3382 * Makefile.in: Regenerated.
3383
3384 2002-10-11 Daniel Jacobowitz <drow@mvista.com>
3385
3386 * Makefile.am: Run dep-am.
3387 (BFD_H_DEP): Add simple.c and linker.c.
3388 (BFD32_LIBS): Add simple.lo.
3389 (BFD32_LIBS_CFILES): Add simple.c.
3390 * Makefile.in: Regenerated.
3391 * bfd-in2.h: Regenerated.
3392 * simple.c: New file.
3393
3394 2002-10-11 Alan Modra <amodra@bigpond.net.au>
3395
3396 * coff-arm.c (record_arm_to_thumb_glue): Avoid type-punned pointers.
3397 (record_thumb_to_arm_glue): Likewise.
3398 * ecoff.c (ecoff_link_add_externals): Likewise.
3399 * elf32-arm.h (record_arm_to_thumb_glue): Likewise.
3400 (record_thumb_to_arm_glue): Likewise.
3401 * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
3402 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
3403 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
3404 * elf64-alpha.c (elf64_alpha_create_dynamic_sections): Likewise.
3405 * elf64-ppc.c (func_desc_adjust): Likewise.
3406 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
3407 (sh64_elf64_create_dynamic_sections): Likewise.
3408 * elflink.c (_bfd_elf_create_got_section): Likewise.
3409 (_bfd_elf_create_dynamic_sections): Likewise.
3410 (_bfd_elf_create_linker_section): Likewise.
3411 * elflink.h (elf_add_default_symbol): Likewise.
3412 (elf_link_create_dynamic_sections): Likewise.
3413 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
3414 * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Likewise.
3415 * elfxx-mips.c (mips_elf_create_got_section): Likewise.
3416 (_bfd_mips_elf_add_symbol_hook): Likewise.
3417 (_bfd_mips_elf_create_dynamic_sections): Likewise.
3418 * linker.c (generic_link_add_symbol_list): Likewise.
3419 * xcofflink.c (xcoff_link_add_symbols): Likewise.
3420
3421 * elfxx-ia64.c (oor_brl, oor_ip): Conditionally define.
3422
3423 * elf64-ppc.c (edit_opd): Only zero opd syms when function is
3424 completely removed. Correct local sym adjustment.
3425
3426 2002-10-10 Stephen Clarke <stephen.clarke@superh.com>
3427
3428 * elf32-sh.c (elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
3429 Correct mistake in calculation of address of .got.
3430 * elf64-sh64.c (elf_sh64_pic_plt_entry_be,
3431 elf_sh64_pic_plt_entry_le): Likewise.
3432
3433 2002-10-09 Richard Shann <richard.shann@superh.com>
3434 Stephen Clarke <stephen.clarke@superh.com>
3435
3436 * Makefile.am: Add entries for elf32-sh64-lin.c and
3437 elf64-sh64-lin.c. Regenerate.
3438 * Makefile.in: Regenerate.
3439 * config.bfd: Change sh64eb-*-linux* and sh64-*-linux*
3440 to use sh64 vectors rather than sh vectors.
3441 * configure.in: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
3442 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
3443 * configure: Regenerate.
3444 * elf32-sh64-lin.c: New file.
3445 * elf64-sh64-lin.c: New file.
3446 * targets.c: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
3447 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
3448
3449 2002-10-08 H.J. Lu <hjl@gnu.org>
3450
3451 * elf32-i386.c (elf_i386_relocate_section): Re-arrange the
3452 IE->LE transition for R_386_TLS_IE.
3453
3454 2002-10-08 Alan Modra <amodra@bigpond.net.au>
3455
3456 * elf64-ppc.c (edit_opd): Correct test for discarded sections.
3457
3458 2002-10-07 Mark Elbrecht <snowball3@softhome.net>
3459
3460 * cofflink.c (mark_relocs): Don't mark relocations in excluded
3461 sections.
3462
3463 2002-10-07 Alan Modra <amodra@bigpond.net.au>
3464
3465 * elflink.h (elf_link_input_bfd): Remove BFD_VERSION_DATE dependent
3466 code.
3467
3468 * elf64-ppc.c (ppc64_elf_build_stubs): Increment .glink indx.
3469
3470 2002-10-06 Alan Modra <amodra@bigpond.net.au>
3471
3472 * opncls.c: Formatting.
3473 (_bfd_new_bfd): Use a smaller section hash table.
3474
3475 2002-10-05 Alexandre Oliva <aoliva@redhat.com>
3476
3477 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Set the type
3478 of the other two relocations packed with a REL32 to NONE.
3479
3480 2002-10-02 Stephen Clarke <stephen.clarke@superh.com>
3481
3482 * elf32-sh.c (elf_sh_link_hash_entry): Add gotplt_refcount.
3483 (sh_elf_link_hash_newfunc): Initialize it.
3484 (allocate_dynrelocs): Transfer gotplt refs from plt.refcount
3485 to got.refcount for symbols that are forced local or when
3486 we have direct got refs.
3487 (sh_elf_gc_sweep_hook): Adjust gotplt_refcount. Use it
3488 to correctly adjust got.refcount and plt.refcount.
3489 (sh_elf_copy_indirect_symbol): Copy gotplt_refcount across.
3490 (sh_elf_check_relocs): Increment gotplt_refcount.
3491
3492 2002-10-01 Jakub Jelinek <jakub@redhat.com>
3493
3494 * elf32-i386.c (elf_i386_relocate_section): Fix
3495 movl foo@indntpoff, %eax IE->LE transition.
3496
3497 2002-10-01 Jakub Jelinek <jakub@redhat.com>
3498
3499 * elf64-x86-64.c (elf64_x86_64_relocate_section): Change TLSGD
3500 sequence and its transitions.
3501
3502 2002-10-01 Jakub Jelinek <jakub@redhat.com>
3503
3504 * elf32-i386.c (elf_i386_relocate_section): Resolve R_386_TLS_LDO_32
3505 to st_value + addend in non-code sections.
3506 * elf64-x86-64.c (elf64_x86_64_relocate_section): Resolve
3507 R_X86_64_DTPOFF32 to st_value + addend in non-code sections.
3508
3509 2002-09-30 Gavin Romig-Koch <gavin@redhat.com>
3510 Ken Raeburn <raeburn@cygnus.com>
3511 Aldy Hernandez <aldyh@redhat.com>
3512 Eric Christopher <echristo@redhat.com>
3513 Richard Sandiford <rsandifo@redhat.com>
3514
3515 * archures.c (bfd_mach_mips4120, bfd_mach_mips5400): New.
3516 (bfd_mach_mips5500): New.
3517 * cpu-mips.c (I_mips4120, I_mips5400, I_mips5500): New.
3518 (arch_info_struct): Add corresponding entries here.
3519 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_4120,
3520 E_MIPS_MACH_5400 and E_MIPS_MACH_5500.
3521 (_bfd_mips_elf_final_write_processing): Handle bfd_mach_mips4120,
3522 bfd_mach_mips5400 and bfd_mach_mips5500.
3523 (_bfd_mips_elf_mach_extends_p): New function.
3524 (_bfd_mips_elf_merge_private_bfd_data): Use it to help merge
3525 the EF_MIPS_MACH flags.
3526 * bfd-in2.h: Regenerate.
3527
3528 2002-09-28 Jason Thorpe <thorpej@wasabisystems.com>
3529
3530 * elf32-vax.c (elf_vax_size_dynamic_section): Don't strip
3531 .got sections.
3532
3533 2002-09-28 Alan Modra <amodra@bigpond.net.au>
3534
3535 * elf.c (map_sections_to_segments): Correct test for start of
3536 writable section in the same page as end of read-only section.
3537
3538 2002-09-27 Matt Thomas <matt@3am-software.com>
3539
3540 * elf32-vax.c (elf_vax_check_relocs): Remove unused
3541 local_got_refcounts usage. Remove allocation of got slot.
3542 (elf_vax_gc_sweep_hook): Remove unused local_got_refcounts usage.
3543 Remove de-allocation of got slot.
3544 (elf_vax_size_dynamic_section): Fix some indentation. Add hash
3545 traversal for elf_vax_instantiate_got_entries. Allow empty .got
3546 sections to be GC'ed.
3547 (elf_vax_instantiate_got_entries): New function.
3548 (elf_vax_relocate_section): Simplify R_VAX_GOT32 handling. Remove
3549 tests that are now handled by elf_vax_instantiate_got_entries.
3550 Assert GOT entry falls within .got section size. Remove redundant
3551 comparisions. Fix comments.
3552
3553 2002-09-27 Jakub Jelinek <jakub@redhat.com>
3554
3555 * reloc.c: Add x86-64 TLS relocs.
3556 * bfd-in2.h, libbfd.h: Rebuilt.
3557 * elf64-x86-64.c (x86_64_elf_howto): Fix size fields for 32-bit
3558 relocs. Add TLS relocs.
3559 (x86_64_reloc_map): Add TLS relocs.
3560 (elf64_x86_64_info_to_howto): Adjust for added TLS relocs.
3561 (struct elf64_x86_64_link_hash_entry): Add tls_type field.
3562 (GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD, GOT_TLS_IE): Define.
3563 (elf64_x86_64_hash_entry): Define.
3564 (struct elf64_x86_64_obj_tdata): New.
3565 (elf64_x86_64_tdata, elf64_x86_64_local_got_tls_type): Define.
3566 (struct elf64_x86_64_link_hash_table): Add tls_ld_got.
3567 (link_hash_newfunc): Initialize tls_type.
3568 (elf64_x86_64_link_hash_table_create): Initialize tls_ld_got.
3569 (elf64_x86_64_copy_indirect_symbol): Swap tls_type if necessary.
3570 (elf64_x86_64_mkobject): New.
3571 (elf64_x86_64_elf_object_p): Allocate struct elf64_x86_64_obj_tdata.
3572 (elf64_x86_64_tls_transition): New.
3573 (elf64_x86_64_check_relocs): Add r_type variable and use it.
3574 Handle TLS relocs.
3575 (elf64_x86_64_gc_sweep_hook): Handle TLS relocs.
3576 (allocate_dynrelocs): Allocate GOT space for TLS relocs.
3577 (elf64_x86_64_size_dynamic_sections): Likewise.
3578 (dtpoff_base, tpoff): New.
3579 (elf64_x86_64_relocate_section): Handle TLS relocs.
3580 (elf64_x86_64_finish_dynamic_symbol): Only handle non-TLS GOT
3581 entries.
3582 (bfd_elf64_mkobject): Define.
3583
3584 * elf32-i386.c (elf_i386_check_relocs) [R_386_TLS_LE]: Set
3585 DF_STATIC_TLS if shared.
3586
3587 2002-09-26 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3588
3589 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Don't emit unneeded
3590 empty relocation sections.
3591
3592 2002-09-26 Alan Modra <amodra@bigpond.net.au>
3593
3594 * elf64-ppc.c (ppc_build_one_stub): Don't build glink stubs here.
3595 (ppc64_elf_build_stubs): Build them here instead.
3596
3597 2002-09-24 Jakub Jelinek <jakub@redhat.com>
3598
3599 * elf32-sparc.c (elf32_sparc_relocate_section): Put R_SPARC_RELATIVE
3600 addend into r_addend, not *r_offset.
3601 (elf32_sparc_finish_dynamic_symbol): Likewise.
3602 * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Clear xword at
3603 R_SPARC_RELATIVE's r_offset.
3604
3605 2002-09-23 Nathan Tallent <eraxxon@alumni.rice.edu>
3606
3607 * dwarf2.c (decode_line_info): Update to correctly decode
3608 the (non-standard DWARF2) out-of-order address sequences
3609 generated by the Intel C++ 6.0 compiler for ia64-Linux.
3610
3611 2002-09-23 Mark Elbrecht <snowball3@softhome.net>
3612
3613 * config.bfd: For DJGPP targets, match with any cpu and any machine.
3614
3615 2002-09-23 Alan Modra <amodra@bigpond.net.au>
3616
3617 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Zero relocs
3618 for discarded FDEs. Remove redundant assignment.
3619 * elflink.h (elf_bfd_discard_info): Save edited relocs.
3620
3621 2002-09-22 H.J. Lu <hjl@gnu.org>
3622
3623 * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Don't merge
3624 the relocation count between different .reloc sections.
3625
3626 2002-09-21 Alan Modra <amodra@bigpond.net.au>
3627
3628 * elf32-ppc.c (ppc_elf_relocate_section): Allow ".sbss.*" and
3629 ".sdata.*" for R_PPC_SDAREL16, ".sbss2*" and ".sdata2*" for
3630 R_PPC_EMB_SDA2REL. Similarly for R_PPC_EMB_SDA21 and
3631 R_PPC_EMB_RELSDA.
3632
3633 * elfcode.h (elf_slurp_reloc_table_from_section): Make "symcount"
3634 unsigned. Move "symcount" assignment out of loop.
3635 * Makefile.am: Run "make dep-am".
3636 * Makefile.in: Regenerate.
3637 * configure: Regenerate.
3638 * po/SRC-POTFILES.in: Regnerate.
3639
3640 2002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
3641
3642 * dwarf2.c (_bfd_dwarf2_find_nearest_line): If address length is
3643 zero, set it to 8 for (non-standard) 64-bit DWARF2 formats
3644 (e.g. IRIX64).
3645
3646 2002-09-19 Jakub Jelinek <jakub@redhat.com>
3647
3648 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Clear .got word
3649 even if generating R_PPC_RELATIVE reloc.
3650 (ppc_elf_relocate_section): Make sure relocation is performed
3651 if skip == -2. Clear memory at r_offset when creating dynamic
3652 relocation.
3653
3654 2002-09-19 Jakub Jelinek <jakub@redhat.com>
3655
3656 * reloc.c (BFD_RELOC_386_TLS_TPOFF, BFD_RELOC_386_TLS_IE,
3657 BFD_RELOC_386_TLS_GOTIE): Add.
3658 * bfd-in2.h, libbfd.h: Rebuilt.
3659 * elf32-i386.c (elf_howto_table): Add R_386_TLS_TPOFF, R_386_TLS_IE
3660 and R_386_TLS_GOTIE.
3661 (elf_i386_reloc_type_lookup): Handle it.
3662 (struct elf_i386_link_hash_entry): Change tls_type type to unsigned
3663 char instead of enum, change GOT_* into defines.
3664 (GOT_TLS_IE_POS, GOT_TLS_IE_NEG, GOT_TLS_IE_BOTH): Define.
3665 (elf_i386_tls_transition): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
3666 (elf_i386_check_relocs): Likewise. Avoid crash if local symbol is
3667 accessed both as normal and TLS symbol. Move R_386_TLS_LDM and
3668 R_386_PLT32 cases so that R_386_TLS_IE can fall through.
3669 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
3670 (elf_i386_gc_sweep_hook): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
3671 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
3672 (allocate_dynrelocs): Allocate 2 .got and 2 .rel.got entries if
3673 tls_type is GOT_TLS_IE_BOTH.
3674 (elf_i386_size_dynamic_sections): Likewise.
3675 (elf_i386_relocate_section): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
3676 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
3677 (elf_i386_finish_dynamic_symbol): Use tls_type & GOT_TLS_IE to catch
3678 all 4 GOT_TLS_* TLS types.
3679
3680 2002-09-19 Nick Clifton <nickc@redhat.com>
3681
3682 * elflink.h (elf_fix_symbol_flags): When examining weak symbols,
3683 follow indirect links.
3684
3685 2002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
3686
3687 * ecoffswap.h (ecoff_swap_pdr_in) <isym, iline>: Update to
3688 correctly sign-extend 32-bit ECOFF null values (0xffffffff, -1)
3689 on 64 bit machines.
3690 (ecoff_swap_sym_in) <iss>: Likewise.
3691 * ecoff.c (_bfd_ecoff_slurp_symbolic_info): Fix error reading
3692 ECOFF information: 'ioptMax' refers to the actual *size*
3693 of the optimization symtab, not the number of entries.
3694
3695 2002-09-19 Daniel Jacobowitz <drow@mvista.com>
3696
3697 * elf32-arm.h (elf32_arm_adjust_dynamic_symbol): Update
3698 ELF_LINK_HASH_NEEDS_PLT logic.
3699
3700 2002-09-18 Daniel Jacobowitz <drow@mvista.com>
3701
3702 * elfcode.h (elf_slurp_reloc_table_from_section): Check
3703 correct relocation count.
3704
3705 2002-09-17 Daniel Jacobowitz <drow@mvista.com>
3706
3707 * bfd-in.h (bfd_get_dynamic_symcount): Define.
3708 * bfd.c (struct _bfd): Add dynsymcount.
3709 * bfd-in2.h: Regenerated.
3710 * elf.c (_bfd_elf_canonicalize_dynamic_symtab): Set
3711 abfd->dynsymcount.
3712 * elfcode.h (elf_slurp_reloc_table_from_section): Check
3713 for overflow.
3714
3715 2002-09-17 Stan Cox <scox@redhat.com>
3716
3717 * elf64-mips.c (mips_elf64_be_swap_reloca_out): Handle type2 and type3.
3718 (mips_elf64_final_gp): Don't make up gp value.
3719 * elfn32-mips.c (mips_elf_final_gp): Likewise.
3720 * elfxx-mips.c (_bfd_mips_elf_final_link): Always create
3721 .MIPS.options/.options section.
3722
3723 2002-09-17 David O'Brien <obrien@FreeBSD.org>
3724
3725 * elf32-i386-fbsd.c: Always label using the EI_OSABI method.
3726 It is benign for FreeBSD < 4.1. Minor reformatting.
3727 * elf64-alpha-fbsd.c: Likewise.
3728
3729 2002-09-17 Jakub Jelinek <jakub@redhat.com>
3730
3731 * elf32-i386.c (elf_i386_relocate_section) [R_386_TLS_TPOFF32]: Negate
3732 addend.
3733
3734 2002-09-17 Alan Modra <amodra@bigpond.net.au>
3735
3736 * elf64-alpha.c (alpha_elf_size_info): Make static.
3737
3738 2002-09-17 Svein E. Seldal <Svein.Seldal@solidas.com>
3739
3740 * coff-tic4x.c: Add function declarations and ATTRIBUTE_UNUSED.
3741 * cpu-tic4x.c: Ditto.
3742
3743 2002-09-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3744
3745 * elf64-mips.c (define elf_backend_ignore_discarded_relocs): Remove
3746 duplicate define.
3747
3748 2002-09-16 Bruno Haible <bruno@clisp.org>
3749
3750 * elf32-i386.c: Don't defined ELF_ARCH etc. if this file is included
3751 by a target variant implementation.
3752 * elf64-alpha.c: Likewise.
3753 * elf32-i386-fbsd.c: New file.
3754 * elf64-alpha-fbsd.c: New file.
3755 * targets.c: Support bfd_elf32_i386_freebsd_vec and
3756 bfd_elf64_alpha_freebsd_vec.
3757 * configure.in: Accept the vectors bfd_elf32_i386_freebsd_vec,
3758 bfd_elf64_alpha_freebsd_vec.
3759 * Makefile.am (BFD32_BACKENDS): Add elf32-i386-fbsd.lo.
3760 (BFD32_BACKENDS_CFILES): Add elf32-i386-fbsd.c.
3761 (BFD64_BACKENDS): Add elf64-alpha-fbsd.lo.
3762 (BFD64_BACKENDS_CFILES): Add elf64-alpha-fbsd.c.
3763 (elf32-i386-fbsd.lo, elf64-alpha-fbsd.lo): Add dependencies.
3764 * config.bfd: For FreeBSD targets, set targ_defvec to a FreeBSD
3765 specific targets. Define OLD_FREEBSD_ABI_LABEL if appropriate.
3766
3767 2002-09-12 Jakub Jelinek <jakub@redhat.com>
3768
3769 * elf32-i386.c (dtpoff_base, tpoff): Don't crash if tls_segment is
3770 NULL.
3771 (elf_i386_relocate_section): Return false after printing error about
3772 unresolvable relocation.
3773
3774 2002-09-12 Nick Clifton <nickc@redhat.com>
3775
3776 * elf32-arm.h (elf32_arm_final_link_relocate): Fix handling of
3777 R_ARM_THM_PC11.
3778
3779 2002-09-11 Jeffrey Law <law@redhat.com>
3780
3781 * elf32-h8300.c (elf32_h8_relax_section): Fix typo.
3782
3783 2002-09-11 Andrew Haley <aph@cambridge.redhat.com>
3784
3785 * elf.c (_bfd_elf_find_nearest_line): Check functionname_ptr and
3786 line_ptr before deciding we've found a symbol.
3787
3788 2002-09-11 Nick Clifton <nickc@redhat.com>
3789
3790 * po/da.po: New Danish translation file.
3791 * configure.in (LINGUAS): Add 'da'.
3792 * configure: Regenerate.
3793
3794 2002-09-10 Michael Snyder <msnyder@redhat.com>
3795
3796 * irix-core.c (do_sections, do_sections64): New functions.
3797 (irix_core_core_file_p): Call new functions do_sections,
3798 do_sections64, depending on corefile (32-bit or 64-bit).
3799
3800 2002-09-09 Richard Henderson <rth@redhat.com>
3801
3802 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21M
3803 and PCREL21F like PCREL21B.
3804
3805 2002-09-04 Kevin Buettner <kevinb@redhat.com>
3806
3807 * config.bfd (mips*-*-irix6*): Add new ABI vectors. Make n32 default
3808 vector.
3809
3810 2002-09-02 Nick Clifton <nickc@redhat.com>
3811
3812 * elf32-v850.c (v850_elf_final_link_relocate): Use helpful
3813 names instead of cryptically overloaded bfd_reloc error
3814 codes.
3815 (v850_elf_relocate_section): Likewise.
3816 (v850_elf_relax_section): Replace caching of external symbols
3817 with caching of internal symbols obtained from calling
3818 bfd_elf_get_elf_syms().
3819 Fixup problems with freeing cached allocated memory blocks.
3820
3821 2002-09-02 Alan Modra <amodra@bigpond.net.au>
3822
3823 * cpu-pj.c (scan_mach, compatible, arch_info_struct): Remove.
3824 (bfd_pj_arch): Use bfd_default_scan.
3825 * cpu-v850.c (scan): Remove.
3826 (N): Use bfd_default_scan.
3827 * cpu-z8k.c (scan_mach): Remove.
3828 (arch_info_struct, bfd_z8k_arch): Reorganize so that the default is
3829 first. Use bfd_default_scan.
3830
3831 * ecoff.c (_bfd_ecoff_set_arch_mach_hook): Don't use hard-coded
3832 bfd_mach constants.
3833 (ecoff_get_magic): Likewise.
3834 * elf32-v850.c (v850_elf_object_p): Likewise.
3835 (v850_elf_final_write_processing): Likewise.
3836 * mipsbsd.c (MY(set_arch_mach)): Likewise.
3837 (MY(write_object_contents)): Likewise.
3838 * coff64-rs6000.c (xcoff64_write_object_contents): Likewise.
3839 * coffcode.h (coff_write_object_contents): Likewise.
3840 (coff_set_arch_mach_hook): Add comment describing machine == 0.
3841 Remove unnecessary "machine" assignments.
3842 (coff_write_relocs): Test for the absolute section sym by testing
3843 section and flags.
3844
3845 * aoutx.h (NAME(aout,machine_type)): Recognize bfd_mach_i386_i386
3846 and bfd_mach_i386_i386_intel_syntax.
3847 * pdp11.c (NAME(aout,machine_type)): Likewise.
3848
3849 2002-08-30 John David Anglin <dave@hiauly1.hia.nrc.ca>
3850
3851 * bfd-in.h (align_power): Cast constants to bfd_vma type.
3852 * bfd-in2.h (align_power): Likewise.
3853
3854 2002-08-30 Alan Modra <amodra@bigpond.net.au>
3855
3856 * Makefile.am: Run "make dep-am".
3857 * Makefile.in: Regenerate.
3858
3859 * cpu-avr.c (compatible): Don't use hard-coded mach constants.
3860 * cpu-powerpc.c (powerpc_compatible): Likewise.
3861 * cpu-rs6000.c (rs6000_compatible): Likewise.
3862
3863 2002-08-28 Catherine Moore <clm@redhat.com>
3864
3865 * elf32-v850.c (v850_elf_reloc_map): Add new relocs.
3866 (v850-elf-reloc): Don't resolve pc relative relocs.
3867 (v850_elf_ignore_reloc): New routine.
3868 (v850_elf_final_link_relocate): Handle new relocs.
3869 (v850_elf_relax_delete_bytes ): New routine.
3870 (v850_elf_relax_section): New routine.
3871 (bfd_elf32_bfd_relax_section): Define.
3872 (HOWTO): New entries for new relocs.
3873 * reloc.c (BFD_RELOC_V850_LONGCALL): New reloc.
3874 (BFD_RELOC_V850_LONGJUMP): New reloc.
3875 (BFD_RELOC_V850_ALIGN): New reloc.
3876 * archures.c: Remove redundant v850ea architecture.
3877 * cpu-v850.c: Remove redundant v850ea support.
3878 * libbfd.h: Regenerate.
3879 * bfd-in2.h: Regenerated.
3880
3881 2002-08-28 Svein E. Seldal <Svein.Seldal@solidas.com>
3882
3883 * config.bfd: Add tic4x-*-*coff* and c4x-*-*coff* target.
3884 * configure.in: Add tic4x_coff vector files.
3885 * configure: Regenerate.
3886 * Makefile.am: Add tic4x target.
3887 * Makefile.in: Regenerate.
3888
3889 2002-08-27 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
3890
3891 * archures.c: Add the BFD arch type tic4x.
3892 * bfd-in.h: Add BFD_IN_MEMORY flag.
3893 * coff-tic4x.c: New file.
3894 * coffswap.h (coff_swap_sym_out): Add preadjuster.
3895 * cpu-tic4x.c: New file.
3896 * targets.c: Added tic4x- in list of xvecs.
3897 * ticoff.h: New file.
3898 * bfd-in2.h: Regenerate.
3899
3900 2002-08-27 Adam Nemet <anemet@lnxw.com>
3901
3902 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Set the last
3903 bit of DT_INIT and DT_FINI for Thumb functions.
3904
3905 2002-08-26 Alan Modra <amodra@bigpond.net.au>
3906
3907 * coffcode.h (coff_set_arch_mach_hook): Handle W65MAGIC.
3908
3909 2002-08-26 Alan Modra <amodra@bigpond.net.au>
3910
3911 * aoutx.h (NAME(aout,reloc_type_lookup)): Handle BFD_RELOC_8.
3912
3913 2002-08-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3914
3915 * elf32-sh.c (sh_elf_copy_indirect_symbol): New.
3916 (create_got_section, allocate_dynrelocs, readonly_dynrelocs):
3917 Likewise.
3918 (struct elf_sh_pcrel_relocs_copied): Removed.
3919 (struct elf_sh_dyn_relocs): New.
3920 (struct elf_sh_link_hash_entry): Replace pcrel_relocs_copied
3921 field with dyn_relocs.
3922 (struct elf_sh_link_hash_table): Add short-cuts to get dynamic
3923 sections and sym_sec.
3924 (sh_elf_link_hash_newfunc): Clear dyn_relocs.
3925 (sh_elf_link_hash_table_create): Clear shorts-cuts and sym_sec.
3926 (sh_elf_create_dynamic_sections): Use create_got_section instead
3927 of _bfd_elf_create_got_section.
3928 (sh_elf_check_relocs): Likewise.
3929 (sh_elf_create_dynamic_sections): Use short-cuts to the dynamic
3930 sections.
3931 (sh_elf_adjust_dynamic_symbol, sh_elf_size_dynamic_sections,
3932 sh_elf_relocate_section, sh_elf_check_relocs,
3933 sh_elf_finish_dynamic_symbol, sh_elf_finish_dynamic_sections):
3934 Likewise.
3935 (sh_elf_adjust_dynamic_symbol): Handle nocopyreloc. Keep the
3936 dynamic relocations and avoiding the copy relocation when we
3937 didn't find any dynamic relocations in the section which has
3938 contents or is read-only.
3939 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
3940 (sh_elf_size_dynamic_sections): Don't reset the size of
3941 .rela.got section even if dynamic_sections_created flag is off.
3942 Don't use sh_elf_discard_copies. Scan all input bfd and use
3943 allocate_dynrelocs. Call readonly_dynrelocs to determine
3944 whether we need DT_TEXTREL.
3945 (sh_elf_adjust_dynamic_symbol): Use plt.refcount to determine
3946 whether the symbol was never referred to.
3947 (sh_elf_relocate_section): Use WILL_CALL_FINISH_DYNAMIC_SYMBOL.
3948 (sh_elf_gc_sweep_hook): Fill with the real sweep function.
3949 (sh_elf_check_relocs): Call create_got_section if the short-cut
3950 to .got is null. Increment reference counters only instead of
3951 allocating space on dynamic sections here. Don't conditionalize
3952 uninitialized got.offset value when marking the symbol as a
3953 global offset table entry. Keep relocations for symbols satisfied
3954 by a dynamic library to avoid copy relocations for the symbol.
3955 Set dynobj field of an elf hash table if needed.
3956 (sh_elf_finish_dynamic_sections): Handle null section pointer
3957 correctly.
3958 (elf_backend_copy_indirect_symbol): Defined.
3959 (elf_backend_can_refcount): Defined.
3960
3961 2002-08-23 Nick Clifton <nickc@redhat.com>
3962
3963 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Undo
3964 previous change. Add comment explaining why.
3965
3966 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>
3967
3968 * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le): Copy
3969 contents of .got.plt[2] to tr0, not address of .got.plt.
3970 (sh_elf_finish_dynamic_symbol): Do not apply GOT_BIAS when
3971 patching absolute plt entry. For shmedia plt entry, set bottom bit
3972 of branch to plt0 as this is a branch to an shmedia instruction.
3973 * elf64-sh64.c (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le):
3974 Copy contents of .got.plt[2] to tr0, not address of .got.plt.
3975 (elf_sh64_plt_entry_be, elf_sh64_plt_entry_le): Use ptrel to
3976 branch to plt0.
3977 (sh64_elf64_finish_dynamic_symbol): Do not apply GOT_BIAS when
3978 patching absolute plt entry. For shmedia plt entry, branch to
3979 plt0 is now ptrel, so use relative offset. Set bottom bit of
3980 branch target as it is a branch to an shmedia instruction.
3981
3982 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>,
3983 Richard Shann <richard.shann@superh.com>
3984
3985 * elf32-sh.c (sh_elf_finish_dynamic_sections): Set LSB of DT_INIT
3986 value if .init is an SHmedia function. Similarly for DT_FINI.
3987 * elf64-sh64.c (sh64_elf64_finish_dynamic_sections): Likewise.
3988
3989 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>
3990
3991 * elf32-sh.c (sh_elf_size_dynamic_sections): Zero initialize
3992 dynamic section.
3993 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
3994
3995 2002-08-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3996
3997 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use a simple
3998 byte read when reading the return address register column.
3999
4000 2002-08-22 Nick Clifton <nickc@redhat.com>
4001
4002 * config.bfd: Add powepc64-*-*bsd* target.
4003
4004 2002-08-22 Graeme Peterson <gp@qnx.com>
4005
4006 * Makefile.am: Add entries for elf32-shqnx.c
4007 * Makefile.in: Regenerate.
4008 * config.bfd: Add support sh-*-nto* target.
4009 * configure.in: Add support for bfd_elf32_sh{l}qnx_vec.
4010 * configure: Regenerate.
4011 * elf32-qnx.h: Changed typo "elf_i386qnx_*" to "elf_qnx_*" .
4012 * elf32-sh.c: Do not include elf32-target.h if
4013 ELF32_SH_C_INCLUDED is defined.
4014 * elf32-shqnx.c: New file: Support for QNX.
4015 * targets.c: Add bfd_elf32_sh{l}qnx_vec.
4016
4017 2002-08-22 Nick Clifton <nickc@redhat.com>
4018
4019 * po/tr.po: Updated Turkish translation.
4020
4021 * syms.c (_bfd_generic_read_minisymbols): Set bfd_error if the
4022 symbols are not read.
4023
4024 2002-08-22 Alan Modra <amodra@bigpond.net.au>
4025
4026 * elf32-m68hc11.c: Formatting fixes.
4027 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
4028 * elf32-m68hc12.c: Formatting fixes.
4029 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
4030
4031 2002-08-22 Alan Modra <amodra@bigpond.net.au>
4032
4033 * coff-rs6000.c (rs6000coff_vec <object_flags>): Add SEC_CODE and
4034 SEC_DATA.
4035 (pmac_xcoff_vec): Likewise.
4036 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
4037 (aix5coff64_vec): Likewise.
4038
4039 2002-08-22 Alan Modra <amodra@bigpond.net.au>
4040
4041 * elf-bfd.h (struct elf_backend_data): Add struct elf_backend_data
4042 param to elf_backend_copy_indirect_symbol.
4043 (_bfd_elf_link_hash_copy_indirect): Likewise.
4044 * elflink.h (elf_add_default_symbol, elf_fix_symbol_flags): Adjust
4045 calls to copy_indirect_symbol.
4046 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
4047 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
4048 * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
4049 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
4050 * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
4051 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
4052 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
4053 * elfxx-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
4054 * elfxx-mips.h (_bfd_mips_elf_copy_indirect_symbol): Likewise.
4055 * elf.c (_bfd_elf_link_hash_copy_indirect): Likewise. Properly
4056 test refcounts for "used" values.
4057
4058 2002-08-21 John David Anglin <dave@hiauly1.hia.nrc.ca>
4059
4060 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Add PARAMS to
4061 argument declaration.
4062
4063 2002-08-19 Elena Zannoni <ezannoni@redhat.com>
4064
4065 * archures.c (bfd_mach_ppc_e500): Added.
4066 * bfd-in2.h: Rebuilt.
4067 * cpu-powerpc.c (bfd_powerpc_archs): Added e500.
4068
4069 2002-08-19 Alan Modra <amodra@bigpond.net.au>
4070
4071 * elf32-m68hc12.c (elf_backend_can_gc_sections): False.
4072
4073 2002-08-17 Andrew Cagney <ac131313@redhat.com>
4074
4075 * elf.c (bfd_elf_get_elf_syms): Change type of `esym' to
4076 `bfd_byte'.
4077
4078 2002-08-17 Stan Cox <scox@redhat.com>
4079
4080 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Use the
4081 IRIX 6 segment layout for NEWABI.
4082
4083 2002-08-16 Stephen Clarke <stephen.clarke@superh.com>
4084
4085 * bfd/elf32-sh.c (sh_elf_gc_mark_hook): For sh64, skip indirect
4086 symbols when looking for section referred to by a relocation.
4087 * bfd/elf64-sh.c (sh_elf64_gc_mark_hook): Likewise.
4088
4089 2002-08-15 Alan Modra <amodra@bigpond.net.au>
4090
4091 * elf32-i370.c: Move reloc enum to include/elf/i370.h.
4092
4093 2002-08-15 Hans-Peter Nilsson <hp@axis.com>
4094
4095 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Add
4096 missing check for whether the symbol is referenced by DSO before
4097 unexporting it as an unneeded dynamic symbol.
4098
4099 2002-08-14 H.J. Lu <hjl@gnu.org>
4100
4101 * libbfd.h: Regenerate.
4102
4103 2002-08-14 H.J. Lu <hjl@gnu.org>
4104
4105 * config.bfd: Always add 64bit vectors to 32bit Linux/mips.
4106
4107 2002-08-14 Stephane Carrez <stcarrez@nerim.fr>
4108
4109 * elf32-m68hc11.c (m68hc11_relax_group): New to relax group of
4110 instructions.
4111 (m68hc11_direct_relax): New to define table of relaxable instructions.
4112 (find_relaxable_insn): New, find a relaxable insn.
4113 (compare_reloc): New to compare two relocs.
4114 (m68hc11_elf_relax_section): New, relax text sections.
4115 (m68hc11_elf_relax_delete_bytes): New, delete bytes and adjust branchs.
4116 (elf32_m68hc11_check_relocs): New function for GC support.
4117 (elf32_m68hc11_relocate_section): New function for GC support.
4118 (bfd_elf32_bfd_relax_section): Define to support linker relaxation.
4119 (elf_backend_check_relocs): Likewise.
4120 (elf_backend_relocate_section): Likewise.
4121
4122 2002-08-13 H.J. Lu <hjl@gnu.org>
4123
4124 * elflink.h (NAME(bfd_elf,size_dynamic_sections): Don't count
4125 definitions in shared objects when checking symbol with
4126 undefined version.
4127
4128 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
4129
4130 * elf32-m68hc11.c (elf32_m68hc11_gc_mark_hook): New for section GC.
4131 (elf32_m68hc11_gc_sweep_hook): Likewise.
4132 (elf_backend_gc_mark_hook): Define for GC section support.
4133 (elf_backend_gc_sweep_hook): Likewise.
4134 (elf_backend_can_gc_sections): Likewise.
4135
4136 * elf32-m68hc12.c: Likewise.
4137
4138 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
4139
4140 * elf32-m68hc11.c (_bfd_m68hc11_elf_print_private_bfd_data): New.
4141 (_bfd_m68hc11_elf_merge_private_bfd_data): New function.
4142 (_bfd_m68hc11_elf_set_private_flags): New function.
4143 Use them to set/check/print ELF flags specific to 68HC11.
4144
4145 * elf32-m68hc12.c (_bfd_m68hc12_elf_print_private_bfd_data): New.
4146 (_bfd_m68hc12_elf_merge_private_bfd_data): New function.
4147 (_bfd_m68hc12_elf_set_private_flags): New function.
4148 Use them to set/check/print ELF flags specific to 68HC12.
4149
4150 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
4151
4152 * elf32-m68hc11.c (elf_m68hc11_howto_table): Add the new relocs;
4153 fix masks for PC-rel relocs.
4154 (m68hc11_elf_ignore_reloc): New function.
4155
4156 * elf32-m68hc12.c (m68hc12_elf_special_reloc): New to handle specific
4157 68HC12 banked addressing relocs.
4158 (m68hc12_phys_addr): New to compute physical address of banked memory.
4159 (m68hc12_phys_page): Likewise for page.
4160 (m68hc12_addr_is_banked): New to see if address is in banked area.
4161 (elf_m68hc12_howto_table): Add new relocs and rename to xx12.
4162
4163 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
4164
4165 * reloc.c (BFD_RELOC_M68HC11_RL_JUMP, BFD_RELOC_M68HC11_RL_GROUP,
4166 BFD_RELOC_M68HC11_LO16, BFD_RELOC_M68HC11_PAGE,
4167 BFD_RELOC_M68HC11_24): New relocs for 68HC11/68HC12.
4168 * bfd-in2.h: Regenerate.
4169
4170 2002-08-12 H.J. Lu <hjl@gnu.org>
4171
4172 * elflink.h (elf_add_default_symbol): Preserve section across
4173 elf_merge_symbol.
4174
4175 2002-08-09 Graeme Peterson <gp@qnx.com>
4176
4177 * Makefile.am: Add entries for elf32-ppcqnx.c, and add
4178 elf32-qnx.h dependency to elfarmqnx-nabi.c and elf32-i386qnx.c.
4179 * Makefile.in: Regenerate.
4180 * config.bfd: Add support for powerpc{le}-*-nto targets.
4181 * configure.in: Add support for bfd_elf32_powerpc{le}qnx_vec.
4182 * configure: Regenerate.
4183 * elf32-i386qnx.c: Moved backend functions into a QNX specific
4184 common file "elf32-qnx.h", and now include that file.
4185 * elf32-qnx.h: New file: QNX specific common elf backend.
4186 * elf32-ppc.c: Do not include elf32-target.h if
4187 ELF32_PPC_C_INCLUDED is defined.
4188 * elf32-ppcqnx.c: New file: Support for QNX.
4189 * elfarmqnx-nabi.c: Include elf32-qnx.h for qnx elf backend.
4190 * targets.c: Add bfd_elf32_powerpc{le}qnx_vec.
4191
4192 2002-08-09 Nick Clifton <nickc@redhat.com>
4193
4194 * po/sv.po: Updated Swedish translation.
4195
4196 2002-08-09 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4197
4198 * elfxx-mips.c (mips_elf_global_got_index): Avoid segfault if
4199 g->global_gotsym is NULL.
4200
4201 2002-08-08 H.J. Lu <hjl@gnu.org>
4202
4203 * elflink.h (elf_add_default_symbol): Don't warn if a definition
4204 overrides an indirect versioned symbol.
4205
4206 2002-08-08 Jakub Jelinek <jakub@redhat.com>
4207
4208 * elf32-i386.c (elf_i386_relocate_section): Fill in proper addend
4209 for R_386_TLS_TPOFF32 relocs against symndx 0.
4210
4211 2002-08-07 H.J. Lu <hjl@gnu.org>
4212
4213 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Check symbol
4214 with undefined version if needed.
4215 (elf_link_assign_sym_version): Match a default symbol with a
4216 version without definition. No need to hide the default
4217 definition separately.
4218
4219 2002-08-08 Alan Modra <amodra@bigpond.net.au>
4220
4221 * elflink.h (elf_link_output_extsym): Don't output symbols from
4222 SEC_EXCLUDE sections.
4223
4224 * aoutx.h (aout_link_write_symbols): Correct handling of warning syms.
4225
4226 2002-08-07 Alan Modra <amodra@bigpond.net.au>
4227
4228 * elf64-ppc.c (edit_opd): Arrange to drop symbols for discarded .opd
4229 entries.
4230
4231 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4232
4233 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Cast signedness
4234 mismatch.
4235
4236 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4237
4238 * elfxx-mips.c (ABI_64_P): Remove superfluous check.
4239
4240 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4241
4242 * elf32-mips.c (mips_reloc_map): Fix typo.
4243
4244 2002-08-06 Alan Modra <amodra@bigpond.net.au>
4245
4246 * xcofflink.c (xcoff_write_global_symbol): Set n_scnum for abs_section.
4247
4248 2002-08-06 Alan Modra <amodra@bigpond.net.au>
4249
4250 * elf64-ppc.c (ppc64_elf_howto_raw): Zero all src_mask entries.
4251
4252 2002-08-06 Alan Modra <amodra@bigpond.net.au>
4253
4254 * libxcoff.h: Use PARAMS on function declarations.
4255 * coff-rs6000.c (xcoff_generate_rtinit): Simplify size calc.
4256 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
4257
4258 * coff-rs6000.c: (xcoff_rtype2howto): Don't place reloc address in
4259 addend.
4260 * coff64-rs6000.c: (xcoff64_rtype2howto): Likewise.
4261
4262 2002-08-06 Alan Modra <amodra@bigpond.net.au>
4263
4264 * coff-rs6000.c: Formatting fixes.
4265 (xcoff_calculate_relocation): Use PARAMS in declaration.
4266 (xcoff_complain_overflow): Likewise.
4267 (xcoff_ppc_relocate_section): Use old-style function pointer call.
4268 (bfd_xcoff_backend_data): Remove useless comments.
4269 (rs6000coff_vec): Likewise.
4270 (bfd_pmac_xcoff_backend_data): Likewise.
4271 (pmac_xcoff_vec): Likewise.
4272
4273 * coff64-rs6000.c: Formatting fixes.
4274 (xcoff64_calculate_relocation): Use PARAMS in declaration.
4275 (xcoff64_ppc_relocate_section): Use old-style function pointer call.
4276 (bfd_xcoff_backend_data): Remove useless comments.
4277 (rs6000coff64_vec): Likewise.
4278 (bfd_xcoff_aix5_backend_data): Likewise.
4279 (aix5coff64_vec): Likewise.
4280
4281 2002-08-06 Alan Modra <amodra@bigpond.net.au>
4282
4283 * coff-rs6000.c (xcoff_howto_table): Revert some of last change to
4284 mask entries. Use complain_overflow_dont for R_REF.
4285 (xcoff_reloc_type_ba): Revert last change.
4286 (xcoff_reloc_type_br): Likewise.
4287 (xcoff_reloc_type_crel): Likewise.
4288 (xcoff_ppc_relocate_section): Likewise.
4289 * coff64-rs6000.c (xcoff64_reloc_type_br): Likewise.
4290 (xcoff64_ppc_relocate_section): Likewise.
4291 (xcoff64_howto_table): Revert some of last change to mask entries.
4292 Use complain_overflow_dont for R_REF.
4293
4294 * coff-rs6000.c (xcoff_howto_table): Fix src_mask entries. Make all
4295 relocs with bitsize == 16 have size = 1.
4296 (xcoff_reloc_type_ba): Correct src_mask and dst_mask adjustment.
4297 (xcoff_reloc_type_br): Likewise.
4298 (xcoff_reloc_type_crel): Likewise.
4299 (xcoff_ppc_relocate_section): Set up src_mask and dst_mask correctly.
4300 * coff64-rs6000.c (xcoff64_reloc_type_br): Correct src_mask and
4301 dst_mask adjustment.
4302 (xcoff64_ppc_relocate_section): Set up src_mask and dst_mask correctly.
4303 (xcoff64_howto_table): Fix src_mask entries. Make all relocs with
4304 bitsize == 16 have size = 1.
4305
4306 2002-08-01 Denis Chertykov <denisc@overta.ru>
4307
4308 * elf32-ip2k.c: Processor manufacturer changed to Ubicom.
4309 (struct misc): New field isymbuf. All free_* fields removed.
4310 (symbol_value): Pass in internal syms. No need to swap syms in.
4311 (ip2k_elf_relax_section): Use bfd_elf_get_elf_syms. Properly free
4312 possibly cached info.
4313 (tidyup_after_error): Removed.
4314 (ip2k_elf_relax_section_pass1): Don't use removed fields of struct
4315 misc. Use new field.
4316 (adjust_all_relocations): Use internal syms. No need to swap syms
4317 in and out.
4318 (add_page_insn): Don't use removed fields of struct misc.
4319
4320 2002-08-01 Nick Clifton <nickc@redhat.com>
4321
4322 * elf32-arm.h: Revert previous delta.
4323
4324 2002-08-01 Nick Clifton <nickc@redhat.com>
4325
4326 * configure.in (AM_INIT_AUTOMAKE): Bump version number.
4327 * configure: Regenerate.
4328
4329 2002-07-31 H.J. Lu <hjl@gnu.org>
4330
4331 * config.bfd: Add x86-64 vector to Linux/i386 if 64bit BFD is
4332 selected.
4333
4334 2002-07-31 H.J. Lu <hjl@gnu.org>
4335
4336 * config.bfd: Add n32 vectors to 32bit Linux/mips if 64bit BFD
4337 is selected.
4338
4339 2002-07-31 Jakub Jelinek <jakub@redhat.com>
4340
4341 * elf32-i386.c (elf_i386_copy_indirect_symbol): Swap tls_type
4342 if _bfd_elf_link_hash_copy_indirect will swap got.refcount.
4343
4344 2002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
4345
4346 * cpu-ns32k.c (_bfd_ns32k_put_immdeiate, _bfd_ns32k_get_immediate):
4347 There is no 8 byte relocation type for this architecture.
4348 (do_ns32k_reloc): Use bfd_vma instead of native types.
4349 (bfd_ns32k_put_immediate, _bfd_ns32k_relocate_contents) put_data
4350 returns void.
4351 (_bfd_ns32k_put_displacement): Don't check for overflow. We can
4352 rely on generic code to do that.
4353 * aout-ns32k.c (howto_table): Add appropriate overflow detection
4354 to all table entries.
4355 (_bfd_ns32k_relocate_contents): put_data returns void.
4356 * ns32k.h: (_bfd_ns32k_put_displacement, _bfd_ns32k_put_immediate)
4357 (_bfd_do_ns32k_reloc_contents): Fix prototypes. put data functions
4358 return void.
4359
4360 2002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
4361
4362 * aoutx.h (aout_link_check_ar_symbols): Whether to include an
4363 archive object is target dependant.
4364
4365 2002-07-31 Adam Nemet <anemet@lnxw.com>
4366
4367 * elf32-arm.h (ARM_PLT_ENTRY_SIZE): Rename PLT_ENTRY_SIZE.
4368 (THUMB_PLT_ENTRY_SIZE): New macro.
4369 (PLT_ENTRY_SIZE): Return the appropriate *_PLT_ENTRY_SIZE.
4370 (elf32_arm_plt0_entry): Rename PLT_ENTRY_SIZE to
4371 ARM_PLT_ENTRY_SIZE.
4372 (elf32_arm_plt_entry): Likewise.
4373 (elf_backend_plt_header_size): Likewise.
4374 (elf32_thumb_plt0_entry): New global.
4375 (elf32_arm_finish_dynamic_sections): Use it. Put Thumb entries
4376 into .plt.thumb.
4377 (elf32_thumb_plt_entry): New global.
4378 (elf32_arm_finish_dynamic_symbol): Use it. Use .thumb.plt for
4379 Thumb entries. Set the bottom bit of the corresponding GOT entry
4380 for a Thumb PLT entry.
4381 (struct elf32_arm_plt_entry_info): New structure.
4382 (struct elf32_arm_link_hash_entry, plt_info): New member of this
4383 type.
4384 (elf32_arm_link_hash_newfunc): Initialize new member.
4385 (elf32_arm_final_link_relocate, R_ARM_THM_PC22 case): Handle
4386 relocations against the PLT.
4387 (elf32_arm_check_relocs, case R_ARM_PLT32 case): Set
4388 first_rel_type if this is the first time we encounter the symbol.
4389 (elf32_arm_check_relocs, case R_ARM_THM_PC22 case): New case.
4390 Determine if relocation needs a PLT entry. Set first_rel_type if
4391 this is the first time we encounter the symbol
4392 (elf32_arm_adjust_dynamic_symbol): Create PLT entries for Thumb
4393 functions as well.
4394 (elf32_arm_size_dynamic_sections): Handle .plt.thumb like .plt.
4395 (elf32_arm_create_dynamic_sections): New function. Create the
4396 .plt.thumb section.
4397 (elf_backend_create_dynamic_sections): Call it.
4398
4399 2002-07-31 Nick Clifton <nickc@redhat.com>
4400
4401 * bfd.c (bfd_alt_mach_code): Rename parameter 'index' to
4402 'alternative' in order to avoid shadowing global symbol of the
4403 same name.
4404 * bfd-in2.h: Regenerate.
4405 * libbfd.h: Regenerate.
4406 * libcoff.h: Regenerate.
4407
4408 2002-07-31 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4409
4410 * Makefile.am: Add n32 ABI support.
4411 * Makefile.in: Regenerate.
4412 * config.bfd: Add n32 vectors to mips64*-*-linux* targets. Treat 64
4413 bit vectors for mips*-*-linux targets as optional.
4414 * configure.in: Add n32 ABI vectors.
4415 * configure: Regenerate.
4416 * elf32-mips.c (mips_elf32_object_p): Reject n32 ABI files.
4417 * elfn32-mips.c: New file, n32 ABI support.
4418 * targets.c: Add n32 ABI vectors.
4419
4420 2002-07-30 Graeme Peterson <gp@qnx.com>
4421
4422 * elfarmqnx-nabi.c: New file: Support for QNX.
4423 * config.bfd: Add support for arm-*-nto target.
4424 * configure.in: Add support for bfd_elf32_{big|little}armqnx_vec.
4425 * configure: Regenerate.
4426 * Makefile.am: Add entries for elfarmqnx-nabi.c.
4427 * Makefile.in: Regenerate.
4428 * elf32-arm.h (ELF_MAXPAGESIZE): Do not define if already defined.
4429 Do not define global function if ELFARM_NABI_C_INCLUDED is defined.
4430 * elfarm-nabi.c: Do not include elf32-arm.h if
4431 ELFARM_NABI_C_INCLUDED is defined.
4432 * targets.c: Add bfd_elf32_{big|little}armqnx_vec.
4433
4434 2002-07-30 Nick Clifton <nickc@redhat.com>
4435
4436 * po/sv.po: Updated Swedish translation.
4437
4438 2002-07-30 Jakub Jelinek <jakub@redhat.com>
4439
4440 * elf.c (elf_fake_sections): Fix up .tbss sh_size and sh_type.
4441
4442 2002-07-30 Alan Modra <amodra@bigpond.net.au>
4443
4444 * aoutx.h (some_aout_object_p): Clean up tdata properly on error.
4445 * archive.c (bfd_generic_archive_p): Likewise.
4446 * coff-rs6000.c (_bfd_xcoff_archive_p): Likewise.
4447 (_bfd_xcoff_archive_p): Use bfd_scan_vma in place of strtol.
4448 * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
4449 (xcoff64_archive_p): Likewise.
4450 (xcoff64_openr_next_archived_file): Likewise.
4451 (xcoff64_archive_p): Clean up tdata properly on error.
4452 * coffgen.c (coff_real_object_p): Likewise.
4453 (coff_object_p): Release filehdr and opthdr.
4454 * ecoff.c (_bfd_ecoff_archive_p): Clean up tdata properly on error.
4455 * ieee.c (ieee_archive_p): Likewise.
4456 * ihex.c (ihex_object_p): Likewise.
4457 (ihex_mkobject): Always allocate tdata.
4458 * peicode.h (pe_ILF_object_p): Release bfd_alloc'd buffer on error.
4459 * srec.c (srec_mkobject): Always allocate tdata.
4460 (srec_object_p): Clean up tdata properly on error.
4461 (symbolsrec_object_p): Likewise.
4462 * versados.c (versados_object_p): Likewise.
4463 * vms-misc.c (_bfd_vms_get_record): Use bfd_malloc instead of malloc,
4464 and bfd_realloc instead of realloc.
4465 (add_new_contents): Use bfd_alloc instead of bfd_malloc for sections.
4466 * vms.c (vms_initialize): Always allocate tdata. Use bfd_alloc in
4467 place of bfd_malloc, simplifying error freeing. Free hash table too.
4468 (vms_object_p): Clean up tdata on error.
4469 (vms_mkobject): Don't complain on stderr if vms_initialize fails.
4470 (vms_close_and_cleanup): Adjust for bfd_alloc use.
4471
4472 2002-07-30 Alan Modra <amodra@bigpond.net.au>
4473
4474 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set e_flags.
4475
4476 2002-07-26 Chris Demetriou <cgd@broadcom.com>
4477
4478 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Merge ASE
4479 flags into resulting BFD.
4480
4481 2002-07-26 Alan Modra <amodra@bigpond.net.au>
4482
4483 From John Reiser <jreiser@BitWagon.com>
4484 * elf32-i386.c (elf_i386_link_hash_table_create): Clear
4485 tls_ldm_got.refcount.
4486
4487 2002-07-25 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4488
4489 * elf64-mips.c: Update TODO comment.
4490 (mips_elf64_higher_reloc,mips_elf64_highest_reloc,
4491 mips_elf64_gprel16_reloca): Remove prototypes.
4492 (mips16_jump_reloc,mips16_gprel_reloc): Add functions.
4493 (UNUSED_RELOC): Replace by EMPTY_RELOC.
4494 (mips_elf64_howto_table_rel): Use special R_MIPS_HI16 handling. Remove
4495 wrong comments. Remove disfunctional support of R_MIPS_HIGHER and
4496 R_MIPS_HIGHEST.
4497 (mips_elf64_howto_table_rela): Fix handling of R_MIPS_GPREL16 and
4498 R_MIPS_GOT16. Remove wrong comments.
4499 (elf_mips16_jump_howto,elf_mips16_gprel_howto,
4500 elf_mips_gnu_vtinherit_howto,elf_mips_gnu_vtentry_howto): New, code
4501 from elf32-mips.c.
4502 (mips_elf64_hi16_reloc): Fix formatting.
4503 (mips_elf64_higher_reloc,mips_elf64_highest_reloc): Remove.
4504 (mips_elf64_got16_reloc): Fix formatting. Remove superfluous code.
4505 Better comment. Fall back to R_MIPS_GOT_DISP instead of abort().
4506 (mips_elf64_gprel16_reloc): Make static. Add check for
4507 partial_inplace.
4508 (mips_elf64_gprel16_reloca): Remove.
4509 (mips_elf64_literal_reloc): New function.
4510 (mips_elf64_gprel32_reloc): Fix formatting.
4511 (mips_elf64_shift6_reloc): Fix comment. Make static.
4512 (mips16_jump_reloc,mips16_gprel_reloc): New functions, code from
4513 elf32-mips.c.
4514 (elf_reloc_map,mips_reloc_map): New mapping table, similiar as in
4515 elf32-mips.c
4516 (bfd_elf64_bfd_reloc_type_lookup): Use the mapping table. Enable GNU
4517 specific relocations.
4518 (mips_elf64_rtype_to_howto): Enable GNU specific relocations.
4519 (mips_elf64_object_p): Invert logic to check for SGI-ish ABI.
4520 (ELF_MAXPAGESIZE): Add comment.
4521
4522 2002-07-25 Nick Clifton <nickc@redhat.com>
4523
4524 * po/sv.po: Updated Swedish translation.
4525 * po/es.po: Updated Spanish translation.
4526 * po/fr.po: Updated French translation.
4527
4528 2002-07-25 Alan Modra <amodra@bigpond.net.au>
4529
4530 * elf-bfd.h (_bfd_elf32_link_record_local_dynamic_symbol): Define
4531 as elf_link_record_local_dynamic_symbol.
4532 (_bfd_elf64_link_record_local_dynamic_symbol): Likewise.
4533 (elf_link_record_local_dynamic_symbol): Declare. Now returns int.
4534 * elflink.h (elf_link_record_local_dynamic_symbol): Move to..
4535 * elflink.c: .. here. Use bfd_elf_get_elf_syms. Check whether an
4536 attempt is made to record a symbol in a discarded section, and
4537 return `2' in that case.
4538
4539 2002-07-24 Nick Clifton <nickc@redhat.com>
4540
4541 * po/sv.po: Updated Swedish translation.
4542 * po/es.po: Updated Spanish translation.
4543
4544 2002-07-23 Alan Modra <amodra@bigpond.net.au>
4545
4546 * po/SRC-POTFILES.in: Regenerate.
4547
4548 * elf-hppa.h (elf_hppa_relocate_section): If relocatable, return
4549 immediately. Remove code handling relocatable linking.
4550 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
4551 * elf32-cris.c (cris_elf_relocate_section): Likewise.
4552 * elf32-fr30.c (elf32_frv_relocate_section): Likewise.
4553 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
4554 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
4555 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
4556 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
4557 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
4558 * elf32-v850.c (v850_elf_relocate_section): Likewise.
4559 * elf32-vax.c (elf_vax_relocate_section): Likewise.
4560 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
4561 * elf32-avr.c (elf_backend_rela_normal): Define.
4562 * elf32-cris.c: Likewise.
4563 * elf32-fr30.c: Likewise.
4564 * elf32-frv.c: Likewise.
4565 * elf32-h8300.c: Likewise.
4566 * elf32-hppa.c: Likewise.
4567 * elf32-ip2k.c: Likewise.
4568 * elf32-sparc.c: Likewise.
4569 * elf32-v850.c: Likewise.
4570 * elf32-vax.c: Likewise.
4571 * elf64-hppa.c: Likewise.
4572 * elf64-sparc.c: Likewise.
4573 * elf32-fr30.c (elf32_frv_relocate_section): Edit comment.
4574 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
4575 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
4576 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
4577 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
4578 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
4579 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
4580 * elf-m10200.c (USE_RELA): Don't define.
4581 * elf-m10300.c: Likewise.
4582 * elfarm-oabi.c: Likewise.
4583 * elf32-i370.c: Likewise.
4584 * elf32-ip2k.c: Likewise.
4585 * elf32-m68k.c: Likewise.
4586 * elf32-mcore.c: Likewise.
4587 * elf32-ppc.c: Likewise.
4588 * elf32-s390.c: Likewise.
4589 * elf32-vax.c: Likewise.
4590 * elf64-ppc.c: Likewise.
4591 * elf64-s390.c: Likewise.
4592 * elf64-x86-64.c: Likewise.
4593 * elfxx-ia64.c: Likewise.
4594 * elf32-avr.c (USE_REL): Don't undef.
4595 * elf32-ip2k.c: Likewise.
4596
4597 2002-07-23 Nick Clifton <nickc@redhat.com>
4598
4599 * elf-bfd.h (struct elf_backend_data): Add new bitfield
4600 'want_p_paddr_set_to_zero'.
4601 * elfxx-target.h: Set default value for want_p_paddr_set_to_zero
4602 to false;
4603 * elfxx-ia64.c: Set want_p_paddr_set_zero for HPUX target.
4604 * elf.c (copy_private_bfd_data): Test want_p_paddr_set_zero.
4605
4606 2002-07-23 Gabor Keresztfalvi <keresztg@mail.com>
4607
4608 * nlmcode.h (nlm_swap_auxiliary_headers_out): Swapped the order of
4609 the MeSsAgEs and CoPyRiGhT tags to make >=NW4.x NLM loaders to
4610 show the Copyright string.
4611 Minor formatting tidy ups.
4612
4613 2002-07-23 Nick Clifton <nickc@redhat.com>
4614
4615 * po/fr.po: Updated French translation.
4616 * po/sv.po: Updated Swedish translation.
4617
4618 2002-07-23 Alan Modra <amodra@bigpond.net.au>
4619
4620 * elflink.h (elf_link_input_bfd): Don't change internal symbols
4621 when outputting relocs.
4622
4623 2002-07-20 Jason Thorpe <thorpej@wasabisystems.com>
4624
4625 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only insert
4626 DT_PLTGOT into the dynamic section if there is a PLT.
4627
4628 2002-07-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4629
4630 * elfxx-mips.c (_bfd_mips_elf_discard_info): New function, code from
4631 elf32-mips.c.
4632 (_bfd_mips_elf_write_section): Likewise.
4633 * elfxx-mips.h (_bfd_mips_elf_discard_info): New prototype.
4634 (_bfd_mips_elf_write_section): Likewise.
4635 * elf32-mips.c (elf32_mips_discard_info): Move to elfxx-mips.c.
4636 (elf32_mips_write_section): Likewise.
4637 * elf64-mips.c (_bfd_mips_elf_ignore_discarded_relocs): Use it.
4638 (_bfd_mips_elf_write_section): Likewise.
4639
4640 2002-07-19 Alan Modra <amodra@bigpond.net.au>
4641
4642 * elfxx-ia64.c: (elfNN_ia64_modify_segment_map): Properly scan
4643 PT_IA_64_UNWIND segments for a given section.
4644
4645 2002-07-17 H.J. Lu <hjl@gnu.org>
4646
4647 * Makefile.am: Fix a typo.
4648 * Makefile.in: Regenerate.
4649
4650 2002-07-15 Denis Chertykov <denisc@overta.ru>
4651 Frank Ch. Eigler <fche@redhat.com>
4652 Ben Elliston <bje@redhat.com>
4653 Alan Lehotsky <alehotsky@cygnus.com>
4654 John Healy <jhealy@redhat.com>
4655 Graham Stott <grahams@redhat.com>
4656 Jeff Johnston <jjohnstn@redhat.com>
4657
4658 * Makefile.am: Add support for ip2k.
4659 * Makefile.in: Regenerate.
4660 * doc/Makefile.in: Regenerate.
4661 * archures.c: Add support for ip2k.
4662 * config.bfd: Add support for ip2k.
4663 * configure.in: Add support for ip2k.
4664 * configure: Regenerate.
4665 * reloc.c: Add support for ip2k.
4666 * targets.c: Add support for ip2k.
4667 * bfd-in2.h: Regenerate.
4668 * libbfd.h: Regenerate.
4669 * cpu-ip2k.c: New file.
4670 * elf32-ip2k.c: New file.
4671
4672 2002-07-17 Ian Rickards <irickard@arm.com>
4673
4674 * dwarf2.c (concat_filename): If we can't establish the directory
4675 just return the filename.
4676
4677 2002-07-16 Moritz Jodeit <moritz@jodeit.org>
4678
4679 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Correct order of memset args.
4680
4681 2002-07-16 Alan Modra <amodra@bigpond.net.au>
4682
4683 * elflink.h: Formatting fixes, tidy prototypes.
4684 (elf_link_assign_sym_version): Move common code out of loop.
4685
4686 2002-07-16 Alan Modra <amodra@bigpond.net.au>
4687
4688 * elflink.h (elf_link_input_bfd): Don't call reloc_emitter when
4689 reloc section size is zero. Correct reloc output location.
4690
4691 2002-07-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
4692
4693 * elf-hppa.h (elf_hppa_reloc_final_type): Use R_PARISC_PCREL16F as
4694 the final type for the e_fsel selector when generating PA2.0W code.
4695 (elf_hppa_relocate_insn): Provide support for PA2.0W 16-bit format 1
4696 relocations.
4697
4698 2002-07-14 H.J. Lu <hjl@gnu.org>
4699
4700 * elflink.h (elf_link_assign_sym_version): Hide the default
4701 definition if there is a hidden versioned definition.
4702
4703 2002-07-12 Hans-Peter Nilsson <hp@axis.com>
4704
4705 * elf32-cris.c (cris_elf_relocate_section): Drop nonsensical
4706 dynamic reference test in assertion when initializing GOT with
4707 static contents. Just assert that there are either no dynamic
4708 sections, the symbol is defined in the regular objects or that the
4709 symbol is undef weak. Tweak comment.
4710 (elf_cris_finish_dynamic_symbol): Emit .got reloc for a program
4711 only if the symbol isn't defined in the program and isn't undef
4712 weak.
4713 (elf_cris_adjust_dynamic_symbol): Simplify condition for getting
4714 rid of PLT entry: only do it if the symbol isn't defined in a DSO.
4715 When doing so, clear ELF_LINK_HASH_NEEDS_PLT. Tweak comments.
4716 (elf_cris_discard_excess_program_dynamics): Don't consider
4717 ELF_LINK_HASH_REF_DYNAMIC when omitting .got runtime relocs.
4718
4719 2002-07-11 Alan Modra <amodra@bigpond.net.au>
4720
4721 * elf32-i386.c (elf_i386_relocate_section): Don't complain about
4722 unresolved debugging relocs in dynamic applications.
4723 * elf32-s390.c (elf_s390_relocate_section): Likewise.
4724 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
4725 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
4726 * elf64-s390.c (elf_s390_relocate_section): Likewise.
4727 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
4728 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
4729
4730 2002-07-10 Alan Modra <amodra@bigpond.net.au>
4731
4732 * elf64-ppc.c (ONES): Define.
4733 (ppc64_elf_howto_table): Use ONES here to avoid warnings. Fill in
4734 missing src_mask fields. Tweak R_PPC64_NONE, R_PPC64_COPY. Fill
4735 in missing dst_mask fields on R_PPC64_PLT32, R_PPC64_PLTREL32.
4736
4737 * elf64-ppc.c (ppc64_elf_get_symbol_info): Delete.
4738 (ppc64_elf_set_private_flags): Delete.
4739 (ppc64_elf_section_from_shdr): Delete.
4740 (ppc64_elf_merge_private_bfd_data): Remove flag checking/merging code.
4741 (ppc64_elf_fake_sections): Delete.
4742 (bfd_elf64_bfd_set_private_flags): Don't define.
4743 (bfd_elf64_get_symbol_info): Likewise.
4744 (elf_backend_section_from_shdr): Likewise.
4745 (elf_backend_fake_sections): Likewise.
4746
4747 2002-07-10 Marco Walther <Marco.Walther@sun.com>
4748
4749 * elf.c: (assign_section_numbers) Set sh_entsize for .stab only
4750 when not already set.
4751 * elf64-sparc.c: (sparc64_elf_fake_sections): New function.
4752 (elf_backend_fake_sections): Define.
4753
4754 2002-07-10 Alan Modra <amodra@bigpond.net.au>
4755
4756 * merge.c (_bfd_merge_section): Remove redundant output_section check.
4757 Formatting.
4758 (_bfd_merge_sections): Don't set SEC_EXCLUDE on unused sections.
4759
4760 2002-07-09 Hans-Peter Nilsson <hp@axis.com>
4761
4762 * elf32-cris.c (cris_elf_relocate_section): Move sanity-check for
4763 NULL sym_hashes to just before use.
4764 <case R_CRIS_32_GOTREL>: In test for local symbol, accept also
4765 symbol with non-default visibility.
4766 <case R_CRIS_32_GOTREL, case R_CRIS_32_PLT_GOTREL>: Ditto.
4767 <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
4768 Ditto.
4769 (cris_elf_gc_sweep_hook): Only decrease h->plt.refcount for
4770 symbol with non-default visibility.
4771 (cris_elf_check_relocs): At tests for local symbol before
4772 increasing h->plt.refcount, also check for non-default
4773 visibility. Ditto when checking for local symbol to eliminate
4774 pc-relative runtime relocs.
4775
4776 2002-07-08 Alan Modra <amodra@bigpond.net.au>
4777
4778 * elf.c: Formatting.
4779 (IS_SOLARIS_PT_INTERP): Add p_paddr and p_memsz checks.
4780 (INCLUDE_SECTION_IN_SEGMENT): Remove IS_SOLARIS_PT_INTERP.
4781 (copy_private_bfd_data): Set p_vaddr on broken Solaris PT_INTERP
4782 segments.
4783
4784 2002-07-07 Mark Mitchell <mark@codesourcery.com>
4785 Alan Modra <amodra@bigpond.net.au>
4786
4787 * cofflink.c (_bfd_coff_final_link): On PE COFF systems, take into
4788 account the impact of relocation count overflow when computing
4789 section offsets.
4790 * coffcode.h (coff_write_relocs): Use obj_pe when deciding whether
4791 or not to apply the PE COFF reloc overflow handling. Fix a
4792 fencepost error in deciding whether or not to use that technique.
4793
4794 2002-07-07 Alan Modra <amodra@bigpond.net.au>
4795
4796 * elf-bfd.h (struct elf_reloc_cookie): Remove locsym_shndx,
4797 change type of locsyms.
4798 (bfd_elf_get_elf_syms): Declare.
4799 * elf.c (bfd_elf_get_elf_syms): New function.
4800 (group_signature): Use bfd_elf_get_elf_syms.
4801 (bfd_section_from_r_symndx): Likewise.
4802 * elfcode.h (elf_slurp_symbol_table): Likewise.
4803 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
4804 (elf_link_add_object_symbols): Likewise. Reorganise to increase
4805 locality of various data structures. Properly free internal relocs.
4806 (elf_bfd_final_link): Properly free internal relocs.
4807 (elf_link_check_versioned_symbol): Use bfd_elf_get_elf_syms.
4808 (elf_link_input_bfd): Likewise.
4809 (elf_gc_mark): Likewise. Properly free internal relocs.
4810 (elf_gc_sweep): Properly free internal relocs.
4811 (elf_reloc_symbol_deleted_p): No need to swap syms in.
4812 (elf_bfd_discard_info): Use bfd_elf_get_elf_syms. Properly free
4813 internal relocs.
4814 * elf-m10200.c (mn10200_elf_relax_section): Use bfd_elf_get_elf_syms.
4815 Properly free possibly cached info.
4816 (mn10200_elf_relax_delete_bytes): Remove symbol swapping code.
4817 (mn10200_elf_symbol_address_p): Pass in internal syms. Remove
4818 symbol swapping code.
4819 (mn10200_elf_get_relocated_section_contents): Use bfd_elf_get_elf_syms.
4820 Properly free possibly cached info.
4821 * elf-m10300.c (mn10300_elf_relax_section): As above for elf-m10200.c.
4822 (mn10300_elf_relax_delete_bytes): Likewise.
4823 (mn10300_elf_symbol_address_p): Likewise.
4824 (mn10300_elf_get_relocated_section_contents): Likewise.
4825 * elf32-h8300.c (elf32_h8_relax_section): As above for elf-m10200.c.
4826 (elf32_h8_relax_delete_bytes): Likewise.
4827 (elf32_h8_symbol_address_p): Likewise.
4828 (elf32_h8_get_relocated_section_contents): Likewise.
4829 * elf32-m32r.c (m32r_elf_relax_section): As above for elf-m10200.c.
4830 (m32r_elf_relax_delete_bytes): Likewise.
4831 (m32r_elf_get_relocated_section_contents): Likewise.
4832 * elf32-sh.c (sh_elf_reloc_loop): Free section contents using
4833 elf_section_data to determine whether cached.
4834 (sh_elf_relax_section): As above for elf-m10200.c.
4835 (sh_elf_relax_delete_bytes): Likewise.
4836 (sh_elf_get_relocated_section_contents): Likewise.
4837 * elf32-xstormy16.c (xstormy16_elf_relax_section): As above.
4838 * elf64-alpha.c (elf64_alpha_relax_section): As above. Also delay
4839 reading of local syms.
4840 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
4841 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): As above.
4842 * elfxx-ia64.c (elfNN_ia64_relax_section): As above.
4843 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Properly free internal
4844 relocs.
4845 * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Properly
4846 free internal relocs and section contents. Don't read symbols.
4847 * elf32-hppa.c (get_local_syms): Use bfd_elf_get_elf_syms.
4848 (elf32_hppa_size_stubs): Don't free local syms.
4849 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Delay
4850 reading of local syms. Use bfd_elf_get_elf_syms. Properly free
4851 possibly cached info.
4852 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
4853 * elf64-hppa.c (elf64_hppa_check_relocs): Use bfd_elf_get_elf_syms.
4854 * elf64-ppc.c (struct ppc_link_hash_table): Delete bfd_count and
4855 all_local_syms.
4856 (get_local_syms): Delete function.
4857 (edit_opd): Use bfd_elf_get_elf_syms. Free on error exit. Cache
4858 on exit.
4859 (ppc64_elf_size_stubs): Use bfd_elf_get_elf_syms. Free/cache on exit.
4860
4861 2002-07-05 Jim Wilson <wilson@redhat.com>
4862
4863 * syms.c (decode_section_type): New.
4864 (bfd_decode_symclass): Call decode_section_type.
4865
4866 2002-07-04 Jakub Jelinek <jakub@redhat.com>
4867
4868 * merge.c (_bfd_merged_section_offset): Avoid accessing byte before
4869 section content start.
4870 Reported by Michael Schumacher <mike@hightec-rt.com>.
4871
4872 2002-07-04 Alan Modra <amodra@bigpond.net.au>
4873
4874 * section.c (_bfd_strip_section_from_output): Remove unnecessary
4875 link order code. Don't actually remove the output section here;
4876 Just set a flag for the linker to do so.
4877 * elflink.c (_bfd_elf_link_renumber_dynsyms): Test for removed
4878 sections when setting up output section dynsyms.
4879
4880 2002-07-04 Alan Modra <amodra@bigpond.net.au>
4881
4882 * elflink.h (elf_link_add_object_symbols): Revert 1999-09-02 hpux
4883 fudge.
4884 * elf.c (bfd_section_from_shdr): Work around broken hpux shared
4885 libs here instead.
4886
4887 2002-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
4888
4889 * elf64-s390.c (create_got_section): Set .got section alignment to
4890 8 bytes.
4891 (elf_s390_check_relocs): Set .rela.dyn section alignment to 8 bytes.
4892
4893 2002-07-02 Alan Modra <amodra@bigpond.net.au>
4894
4895 * elf.c (_bfd_elf_reloc_type_class): Fix comment grammar.
4896
4897 2002-07-01 Matt Thomas <matt@3am-software.com>
4898
4899 * elf32-vax.c (elf32_vax_print_private_bfd_data): Change EF_*
4900 to EF_VAX_*.
4901
4902 2002-07-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4903
4904 * elfxx-mips.c (ABI_64_P): Fix comment.
4905 (MIPS_ELF_OPTIONS_SECTION_NAME,MIPS_ELF_STUB_SECTION_NAME): Use the
4906 new section names for N64 ABI.
4907 (mips_elf_output_extsym): No special _gp_disp handling for NewABI.
4908 (mips_elf_calculate_relocation): Code formatting.
4909 (mips_elf_create_dynamic_relocation): Likewise.
4910 (_bfd_mips_elf_fake_sections): IRIX6 needs this hack, too.
4911 (_bfd_mips_elf_size_dynamic_sections): Handle GOT_PAGE for any NewABI.
4912 (_bfd_mips_elf_relocate_section): No special handling for R_MIPS_64
4913 in any NewABI.
4914 (_bfd_mips_elf_finish_dynamic_symbol): No special _gp_disp handling
4915 for NewABI.
4916 (_bfd_mips_elf_modify_segment_map): Handle any N64 ABI.
4917 (_bfd_mips_elf_gc_sweep_hook): NewABI GOT relocs should be handled
4918 here, too.
4919
4920 2002-07-01 Andreas Schwab <schwab@suse.de>
4921
4922 * elf64-x86-64.c (elf64_x86_64_relocate_section): Only convert
4923 R_X86_64_64 to R_X86_64_RELATIVE.
4924
4925 2002-07-01 John David Anglin <dave@hiauly1.hia.nrc.ca>
4926
4927 * vaxbsd.c: New BFD backend for VAX BSD and Ultrix.
4928 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Add new backend.
4929 Run "make dep-am".
4930 * config.bfd (vax-*-bsd* | vax-*-ultrix*): Use vaxbsd_vec instead of
4931 host_aout_vec.
4932 * configure.in (vaxbsd_vec): Add.
4933 * targets.c (vaxbsd_vec): Add.
4934 * Makefile.in: Rebuild.
4935 * configure: Rebuild.
4936 * po/SRC-POTFILES.in: Rebuild.
4937
4938 2002-07-01 Alan Modra <amodra@bigpond.net.au>
4939
4940 * elflink.h (elf_gc_mark): Pass in the section whose relocs we are
4941 examining to gc_mark_hook, rather than the bfd.
4942 (elf_gc_sections): Adjust.
4943 * elf-bfd.h (struct elf_backend_data <gc_mark_hook>): Likewise.
4944 * elf-m10300.c (mn10300_elf_gc_mark_hook): Likewise.
4945 * elf32-arm.h (elf32_arm_gc_mark_hook): Likewise.
4946 * elf32-avr.c (elf32_avr_gc_mark_hook): Likewise.
4947 * elf32-cris.c (cris_elf_gc_mark_hook): Likewise.
4948 * elf32-d10v.c (elf32_d10v_gc_mark_hook): Likewise.
4949 * elf32-fr30.c (fr30_elf_gc_mark_hook): Likewise.
4950 * elf32-hppa.c (elf32_hppa_gc_mark_hook): Likewise.
4951 * elf32-i386.c (elf_i386_gc_mark_hook): Likewise.
4952 * elf32-m32r.c (m32r_elf_gc_mark_hook): Likewise.
4953 * elf32-m68k.c (elf_m68k_gc_mark_hook): Likewise.
4954 * elf32-mcore.c (mcore_elf_gc_mark_hook): Likewise.
4955 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Likewise.
4956 * elf32-ppc.c (ppc_elf_gc_mark_hook): Likewise.
4957 * elf32-s390.c (elf_s390_gc_mark_hook): Likewise.
4958 * elf32-sh.c (sh_elf_gc_mark_hook): Likewise.
4959 * elf32-sparc.c (elf32_sparc_gc_mark_hook): Likewise.
4960 * elf32-v850.c (v850_elf_gc_mark_hook): Likewise.
4961 * elf32-vax.c (elf_vax_gc_mark_hook): Likewise.
4962 * elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Likewise.
4963 * elf64-mmix.c (mmix_elf_gc_mark_hook): Likewise.
4964 * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
4965 * elf64-s390.c (elf_s390_gc_mark_hook): Likewise.
4966 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
4967 * elfxx-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise.
4968 * elfxx-mips.h (_bfd_mips_elf_gc_mark_hook): Likewise.
4969 * elf64-x86-64.c (elf64_x86_64_gc_mark_hook): Likewise.
4970 * elf32-frv.c (elf32_frv_gc_mark_hook): Likewise. Also remove
4971 redundant local sym tests.
4972 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_entry.
4973 (link_hash_newfunc): Init is_entry.
4974 (ppc64_elf_copy_indirect_symbol): Copy is_entry.
4975 (ppc64_elf_link_hash_table_create): Init all_local_syms.
4976 (create_linkage_sections): Use bfd_make_section_anyway rather than
4977 bfd_make_section.
4978 (ppc64_elf_mark_entry_syms): New function.
4979 (ppc64_elf_check_relocs): Don't bother testing elf_bad_symtab. Set
4980 up opd entry to function section map.
4981 (ppc64_elf_gc_mark_hook): Special case opd section relocs, and
4982 relocs that reference the opd section.
4983 (edit_opd): New function.
4984 (ppc64_elf_size_dynamic_sections): Call get_local_syms and edit_opd.
4985 (ppc64_elf_setup_section_lists): Don't calculate htab->bfd_count here.
4986 (get_local_syms): Do so here. Exit if we already have local syms.
4987 Remove bogus comment imported from elf32-hppa.c. Don't attempt to
4988 read local syms on non-ELF input.
4989 (ppc64_elf_size_stubs): Call _bfd_elf64_link_read_relocs rather
4990 than duplicating it's function here. Adjust free of internal
4991 relocs to suit.
4992 (ppc64_elf_relocate_section): Adjust local syms in opd section.
4993 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Declare.
4994 * elf32-hppa.c (elf32_hppa_size_stubs): Call
4995 _bfd_elf32_link_read_relocs rather than duplicating it's function
4996 here. Adjust free of internal relocs to suit.
4997
4998 2002-07-01 Andreas Jaeger <aj@suse.de>
4999
5000 * elf64-x86-64.c (elf64_x86_64_check_relocs): Certain relocations
5001 are not allowed in shared libs code, enforce -fPIC.
5002
5003 2002-06-29 Hans-Peter Nilsson <hp@bitrange.com>
5004
5005 * mmo.c (mmo_write_loc_chunk): Don't eliminate leading and
5006 trailing zero-sequences when there's previous left-over data.
5007
5008 2002-06-27 John David Anglin <dave@hiauly1.hia.nrc.ca>
5009
5010 * elf64-hppa.c (elf64_hppa_reloc_type_class): New function.
5011 (elf64_hppa_finish_dynamic_sections): Check other_rel_sec, dlt_rel_sec
5012 and opd_rel_sec in order for starting rela section. Check _raw_size.
5013 (elf_backend_reloc_type_class): Define.
5014
5015 2002-06-27 Kevin Buettner <kevinb@redhat.com>
5016
5017 * dwarf2.c (decode_line_info): Handle older, non-standard, 64-bit
5018 DWARF2 formats.
5019
5020 2002-06-27 Alan Modra <amodra@bigpond.net.au>
5021
5022 * cpu-powerpc.c: Comment on ordering of arch_info.
5023 * elf32-ppc.c (ppc_elf_object_p): New function.
5024 (elf_backend_object_p): Define.
5025 * elf64-ppc.c (ppc64_elf_object_p): New function.
5026 (elf_backend_object_p): Define.
5027
5028 2002-06-26 Jason Thorpe <thorpej@wasabisystems.com>
5029
5030 * configure.in (vax-*-netbsd*): Set COREFILE to netbsd-core.lo.
5031 * configure: Regenerate.
5032
5033 2002-06-25 Jason Eckhardt <jle@rice.edu>
5034
5035 * dwarf2.c (decode_line_info): Check unit->addr_size
5036 to read in the proper number of prologue bytes.
5037
5038 2002-06-25 Nick Clifton <nickc@cambridge.redhat.com>
5039
5040 * config.bfd (powerpc-*-aix5*): Only create a selvecs for
5041 aix5coff64_vec if 64-bit bfd support has been enabled.
5042 (powerpc64-*-aix5*): Only define if 64-bit bfd support has
5043 been enabled.
5044
5045 * targets.c (_bfd_target_vector[]): Only include
5046 aix5coff64_vec if 64-bit bfd support has been enabled.
5047
5048 2002-06-25 Alan Modra <amodra@bigpond.net.au>
5049
5050 * elf64-ppc.c (ppc_add_stub): Replace strcpy/strncpy with memcpy.
5051 * elf32-hppa.c (hppa_add_stub): Likewise.
5052 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
5053 * elflink.h (elf_add_default_symbol): Fix comment typo.
5054 (elf_add_default_symbol): Replace strcpy and strncpy with memcpy.
5055 (elf_link_add_object_symbols): Likewise.
5056 (elf_link_assign_sym_version): Likewise.
5057 * hash.c (bfd_hash_lookup): Likewise.
5058 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
5059 * section.c (bfd_get_unique_section_name): Likewise.
5060 * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
5061 * elf.c (_bfd_elf_make_section_from_phdr): Likewise.
5062 (assign_section_numbers): Likewise.
5063 (_bfd_elfcore_make_pseudosection): Likewise.
5064 (elfcore_grok_lwpstatus): Likewise.
5065 (elfcore_grok_win32pstatus): Likewise.
5066 (elfcore_write_note): Constify input params. Use PTR instead of
5067 void *. Include terminating NUL in namesz. Correct padding.
5068 Support NULL "name" param. Use memcpy instead of strcpy.
5069 (elfcore_write_prpsinfo): Constify input params.
5070 (elfcore_write_prstatus): Likewise. Use PTR instead of void *.
5071 (elfcore_write_lwpstatus): Likewise.
5072 (elfcore_write_pstatus): Likewise.
5073 (elfcore_write_prfpreg): Likewise.
5074 (elfcore_write_prxfpreg): Likewise.
5075 * elf-bfd.h (elfcore_write_note): Update declaration.
5076 (elfcore_write_prpsinfo): Likewise.
5077 (elfcore_write_prstatus): Likewise.
5078 (elfcore_write_pstatus): Likewise.
5079 (elfcore_write_prfpreg): Likewise.
5080 (elfcore_write_prxfpreg): Likewise.
5081 (elfcore_write_lwpstatus): Likewise.
5082
5083 2002-06-25 Jason Eckhardt <jle@rice.edu>
5084
5085 * ecoff.c (ecoff_set_symbol_info): Set BSF_FUNCTION for
5086 symbols of type stProc and stStaticProc.
5087
5088 2002-06-25 Nick Clifton <nickc@redhat.com>
5089
5090 * ecoff.c: VArious formatting fixes.
5091
5092 2002-06-25 Alan Modra <amodra@bigpond.net.au>
5093
5094 * coff-rs6000.c (xcoff_generate_rtinit): Fix typo.
5095
5096 2002-06-25 Alan Modra <amodra@bigpond.net.au>
5097
5098 * aout-adobe.c: Don't compare against "true" or "false.
5099 * aout-target.h: Likewise.
5100 * aoutx.h: Likewise.
5101 * archive.c: Likewise.
5102 * bout.c: Likewise.
5103 * cache.c: Likewise.
5104 * coff-a29k.c: Likewise.
5105 * coff-alpha.c: Likewise.
5106 * coff-i386.c: Likewise.
5107 * coff-mips.c: Likewise.
5108 * coff-or32.c: Likewise.
5109 * coff64-rs6000.c: Likewise.
5110 * coffcode.h: Likewise.
5111 * coffgen.c: Likewise.
5112 * cpu-ns32k.c: Likewise.
5113 * ecoff.c: Likewise.
5114 * ecofflink.c: Likewise.
5115 * elf.c: Likewise.
5116 * elf32-arm.h: Likewise.
5117 * elf32-cris.c: Likewise.
5118 * elf32-d30v.c: Likewise.
5119 * elf32-i386.c: Likewise.
5120 * elf32-mcore.c: Likewise.
5121 * elf32-ppc.c: Likewise.
5122 * elf32-sh.c: Likewise.
5123 * elf32-sh64.c: Likewise.
5124 * elf32-v850.c: Likewise.
5125 * elf64-alpha.c: Likewise.
5126 * elf64-sh64.c: Likewise.
5127 * elfcode.h: Likewise.
5128 * elfcore.h: Likewise.
5129 * elflink.h: Likewise.
5130 * elfxx-mips.c: Likewise.
5131 * i386os9k.c: Likewise.
5132 * ieee.c: Likewise.
5133 * libbfd.c: Likewise.
5134 * linker.c: Likewise.
5135 * mmo.c: Likewise.
5136 * nlm32-alpha.c: Likewise.
5137 * nlm32-i386.c: Likewise.
5138 * nlm32-ppc.c: Likewise.
5139 * nlm32-sparc.c: Likewise.
5140 * nlmcode.h: Likewise.
5141 * oasys.c: Likewise.
5142 * pdp11.c: Likewise.
5143 * peicode.h: Likewise.
5144 * reloc.c: Likewise.
5145 * som.c: Likewise.
5146 * srec.c: Likewise.
5147 * tekhex.c: Likewise.
5148 * vms.c: Likewise.
5149 * xcofflink.c: Likewise.
5150 * elf64-sparc.c: Edit comment to not use "== false".
5151
5152 * aoutf1.h: Don't use "? true : false".
5153 * ecoff.c: Likewise.
5154 * format.c: Likewise.
5155 * ieee.c: Likewise.
5156 * linker.c: Likewise.
5157 * mmo.c: Likewise.
5158 * oasys.c: Likewise.
5159
5160 2002-06-23 H.J. Lu <hjl@gnu.org>
5161
5162 * elflink.h (elf_link_add_archive_symbols): For the default
5163 version, check references with only one `@' first.
5164
5165 2002-06-23 John David Anglin <dave@hiauly1.hia.nrc.ca>
5166
5167 * elf64-hppa.c (elf64_hppa_mark_milli_and_exported_functions): New
5168 function.
5169 (allocate_global_data_dlt): Don't add millicode symbols to dynamic
5170 symbol table.
5171 (allocate_global_data_opd, allocate_dynrel_entries): Likewise.
5172 (elf64_hppa_size_dynamic_sections): Revise to use
5173 elf64_hppa_mark_milli_and_exported_functions.
5174 (elf64_hppa_finish_dynamic_symbol): Remove code to keep millicode
5175 symbols out of dynamic symbol table.
5176
5177 2002-06-23 Alan Modra <amodra@bigpond.net.au>
5178
5179 * Makefile.in: Regenerate.
5180 * libbfd.h: Regenerate.
5181 * bfd-in2.h: Regenerate.
5182 * configure: Regenerate.
5183 * po/SRC-POTFILES.in: Regenerate.
5184
5185 * elflink.h: Comment typo fixes.
5186
5187 2002-06-23 H.J. Lu <hjl@gnu.org>
5188
5189 * elf-bfd.h (elf_link_loaded_list): New structure.
5190 (elf_link_hash_table): Add "loaded".
5191 * elf.c (_bfd_elf_link_hash_table_init): Initialize "loaded".
5192 * elflink.h (elf_link_check_versioned_symbol): New function.
5193 (elf_link_output_extsym): Call elf_link_check_versioned_symbol.
5194
5195 2002-06-19 Nick Clifton <nickc@cambridge.redhat.com>
5196
5197 * elflink.h (size_dynamic_sections): If the target does not
5198 support an ELF style hash table, return true, indicating that
5199 nothing needed to be done, rather than false, indicating that the
5200 section's size could not be computed.
5201
5202 2002-06-18 Dave Brolley <brolley@redhat.com>
5203
5204 From Catherine Moore, Michael Meissner, Dave Brolley:
5205 * po/SRC-POTFILES.in: Add cpu-frv.c and elf32-frv.c
5206 * targets.c: Support bfd_elf32_frv_vec.
5207 * reloc.c: Add FRV relocs.
5208 * configure.in: Add support for bfd-elf32-frv-vec.
5209 * config.bfd (targ_cpu): Add support for frv-*-elf.
5210 * archures.c: Add frv arch and machines.
5211 * Makefile.am (ALL_MACHINES): Add cpu-frv.lo.
5212 (ALL_MACHINES_CFILES): Add cpu-frv.c.
5213 (BFD32_BACKENDS): Add elf32-frv.lo.
5214 (BFD32_BACKENDS_CFILES): Add elf32-frv.c
5215 (cpu-frv.lo): New target.
5216 (elf32-frv.lo): New target.
5217 * cpu-frv.c: New file.
5218 * elf32-frv.c: New file.
5219
5220 2002-06-18 Jakub Jelinek <jakub@redhat.com>
5221
5222 * elfcode.h (elf_object_p): Sanity check eh_shoff == 0 implies
5223 e_shnum == 0.
5224 Only read the first section header if e_shoff is non-zero.
5225 Don't consider e_shstrndx if there are no sections.
5226
5227 2002-06-17 Tom Rix <trix@redhat.com>
5228
5229 * elf32-d10v.c (elf_d10v_howto_table): Change R_D10V_10_PCREL_R,
5230 R_D10V_10_PCREL_L and R_D10V_18_PCREL to use
5231 complain_overflow_bitfield.
5232
5233 2002-06-17 Alan Modra <amodra@bigpond.net.au>
5234
5235 * opncls.c (bfd_openr): Remove redundant bfd_set_error.
5236 (bfd_fdopenr): Likewise.
5237 (bfd_openstreamr): Likewise.
5238 (bfd_openw): Likewise.
5239
5240 * targets.c: Sort target vecs.
5241 (_bfd_target_vector): Add aix5coff64_vec, bfd_elf32_sh64_vec,
5242 bfd_elf32_sh64l_vec, bfd_elf32_sh64lnbsd_vec,
5243 bfd_elf32_sh64nbsd_vec, bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec,
5244 bfd_elf64_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec.
5245 * configure.in: Sort target vecs. Add m88kmach3_vec.
5246 * configure: Regenerate.
5247
5248 2002-06-16 Hans-Peter Nilsson <hp@bitrange.com>
5249
5250 * elf64-mmix.c (bpo_reloc_request_sort_fn): Use member
5251 bpo_reloc_no to break sort order ties, not address of items.
5252
5253 2002-06-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
5254
5255 * elf-hppa.h (elf_hppa_final_link): Fix formatting in comment.
5256 Skip excluded sections in determing __gp value.
5257 (elf_hppa_final_link_relocate): Use the symbol's address in
5258 R_PARISC_FPTR64 relocations that don't need an opd entry.
5259 * elf64-hppa.c (allocate_dynrel_entries): Simplify code.
5260 (elf64_hppa_finalize_dynreloc): Likewise.
5261 (elf64_hppa_size_dynamic_sections): Move comments and fix typo.
5262 (elf64_hppa_finish_dynamic_symbol): Break up assert.
5263
5264 2002-06-14 Sergey Grigoriev <serge@leopold.Physik.Uni-Augsburg.DE>
5265
5266 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
5267 alignment for .bss, .data and .text sections so that sse and sse2
5268 code will work.
5269 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
5270
5271 2002-06013 J"orn Rennecke <joern.rennecke@superh.com>
5272
5273 config.bfd: Add support for sh[1234]l*-*-elf* | sh3el*-*-elf*,
5274 sh[1234]*-elf*.
5275
5276 2002-06-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
5277
5278 * elflink.h (elf_bfd_final_link): Improve error handling for missing
5279 dynamic sections.
5280
5281 * elf64-hppa.c (allocate_global_data_opd): We don't need an opd entry
5282 for a symbol that has no output section.
5283 (allocate_dynrel_entries): Correct comment.
5284 (elf64_hppa_finalize_dynreloc): Likewise. Don't create an opd entry
5285 unless we want one.
5286 (elf64_hppa_finalize_opd): Prevent segfault if dyn_h is NULL.
5287 (elf64_hppa_finalize_dlt): Likewise. Prevent segfault for symbols
5288 with no section. Remove unnecessary parentheses.
5289
5290 2002-06-11 Tom Rix <trix@redhat.com>
5291
5292 * coffcode.h (coff_compute_section_file_positions): Add data
5293 section to AIX loader alignment check.
5294
5295 * coff-rs6000.c (_bfd_xcoff_mkobject): Set default text section
5296 alignment to 4 bytes.
5297 (_bfd_xcoff_copy_private_bfd_data): Use text and data alignment
5298 power accessor macro.
5299 (do_shared_object_padding): Remove invalid assertion.
5300
5301 2002-06-10 Richard Sandiford <rsandifo@redhat.com>
5302
5303 * section.c (_bfd_strip_section_from_output): Set SEC_EXCLUDE
5304 for removed output sections.
5305
5306 2002-06-10 Geoffrey Keating <geoffk@redhat.com>
5307
5308 * merge.c (merge_strings): Use htab_create_alloc with calloc, not
5309 htab_alloc.
5310 * elf-strtab.c (_bfd_elf_strtab_finalize): Likewise.
5311
5312 2002-06-08 H.J. Lu <hjl@gnu.org>
5313
5314 * elf.c (copy_private_bfd_data): Don't cast to bfd_size_type to
5315 work around a long long bug in gcc 2.96 on mips.
5316
5317 2002-06-08 Jason Thorpe <thorpej@wasabisystems.com>
5318
5319 * Makefile.am (BFD32_BACKENDS): Add vax1knetbsd.lo.
5320 (BFD32_BACKENDS_CFILES): Add vax1knetbsd.c.
5321 Regenerate dependency lists.
5322 * Makefile.in: Regenerate.
5323 * config.bfd (vax-*-netbsdelf*, vax-*-netbsdaout*): Add
5324 vax1knetbsd_vec to targ_selvecs.
5325 * configure.in: Add vax1knetbsd_vec.
5326 * configure: Regenerate.
5327 * targets.c (_bfd_target_vector): Add vax1knetbsd_vec.
5328 * vax1knetbsd.c: New file.
5329 * vaxnetbsd.c: Update copyright years.
5330 (TARGET_PAGE_SIZE): Set to 0x1000.
5331 (DEFAULT_MID): Set to M_VAX4K_NETBSD.
5332
5333 2002-06-08 Matt Thomas <matt@3am-software.com>
5334
5335 * libaout.h (enum machine_type): Add M_VAX4K_NETBSD.
5336
5337 2002-06-08 Alan Modra <amodra@bigpond.net.au>
5338
5339 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Make static.
5340
5341 2002-06-08 Alan Modra <amodra@bigpond.net.au>
5342
5343 * Makefile.am: Run "make dep-am".
5344 * Makefile.in: Regenerate.
5345
5346 * armnetbsd.c: Replace CONST with const.
5347 * corefile.c: Likewise.
5348 * elf32-dlx.c: Likewise.
5349 * elf64-mips.c: Likewise.
5350 * mmo.c: Likewise.
5351 * ns32knetbsd.c: Likewise.
5352
5353 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Check the hash
5354 table is elf64-sparc.
5355
5356 2002-06-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5357
5358 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Simplify code.
5359 Fix RELA addends to get not shifted in the result. Don't do special
5360 handling of R_MIPS_64 for NewABI.
5361
5362 2002-06-07 Alan Modra <amodra@bigpond.net.au>
5363
5364 * aoutx.h (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
5365 (NAME(aout,slurp_reloc_table)): Likewise.
5366 * coff-mips.c (mips_relax_section): Use bfd_zalloc.
5367 * coff-rs6000.c (xcoff_write_armap_big): Use bfd_zmalloc.
5368 (xcoff_write_archive_contents_big): Likewise.
5369 (xcoff_generate_rtinit): Likewise.
5370 (xcoff_generate_rtinit): Likewise, and check error return.
5371 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
5372 * coffgen.c (coff_section_symbol): Use bfd_zalloc.
5373 (coff_get_normalized_symtab): Likewise.
5374 (coff_make_empty_symbol): Likewise.
5375 (bfd_coff_set_symbol_class): Likewise.
5376 * cofflink.c (coff_link_add_symbols): Likewise.
5377 * ecoff.c (_bfd_ecoff_make_empty_symbol): Likewise.
5378 * ecofflink.c (ecoff_write_shuffle): Use bfd_zmalloc.
5379 (bfd_ecoff_write_accumulated_debug): Likewise.
5380 * elf64-alpha.c (get_got_entry): Use bfd_zalloc.
5381 * i386linux.c (bfd_i386linux_size_dynamic_sections): Likewise.
5382 * i386lynx.c (NAME(lynx,slurp_reloc_table)): Use bfd_zmalloc.
5383 * ieee.c (do_with_relocs): Use bfd_zalloc.
5384 * m68klinux.c (bfd_m68klinux_size_dynamic_sections): Likewise.
5385 * pdp11.c (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
5386 (NAME(aout,slurp_reloc_table)): Likewise.
5387 (NAME(aout,squirt_out_relocs)): Don't memset when zalloc'd.
5388 * reloc16.c (bfd_coff_reloc16_relax_section): Use bfd_zmalloc.
5389 * som.c (som_build_and_write_symbol_table): Likewise.
5390 (som_slurp_string_table): Likewise.
5391 (som_slurp_symbol_table): Likewise.
5392 (som_bfd_ar_write_symbol_stuff): Likewise.
5393 * sparclinux.c (bfd_sparclinux_size_dynamic_sections): Use bfd_zalloc.
5394 * sunos.c (bfd_sunos_size_dynamic_sections): Likewise.
5395 * tekhex.c (find_chunk): Likewise. Get rid of unused "sname".
5396 * vms-gsd.c (_bfd_vms_slurp_gsd): Use bfd_zmalloc.
5397 * xcofflink.c (xcoff_link_add_symbols): Use bfd_zalloc/bfd_zmalloc.
5398
5399 2002-06-07 Alan Modra <amodra@bigpond.net.au>
5400
5401 * elf-bfd.h (struct bfd_elf_section_data <group_name>): Replace with
5402 "group" union.
5403 (elf_group_name): Update.
5404 (elf_group_id): Define.
5405 (bfd_elf_set_group_contents): Declare.
5406 * elf.c (elf_fake_sections): Qualify use of elf_group_name.
5407 (set_group_contents): Rename to bfd_elf_set_group_contents. Remove
5408 ATTRIBUTE_UNUSED from failedptrarg. If elf_group_id is set, use
5409 that sym for the signature.
5410 (_bfd_elf_compute_section_file_positions): Don't call
5411 set_group_contents for "ld -r" case.
5412 (swap_out_syms): Use bfd_zalloc.
5413 * elflink.h (elf_link_add_archive_symbols): Likewise.
5414 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
5415 (elf_bfd_final_link): Call bfd_elf_set_group_contents.
5416
5417 2002-06-07 Alan Modra <amodra@bigpond.net.au>
5418
5419 * elf64-ppc.c (ppc64_elf_relocate_section): Allow unresolved
5420 relocs in opd for non-shared too.
5421
5422 2002-06-06 Jeffrey Law <law@redhat.com>
5423
5424 * elf32-h8300.c (elf32_h8_relax_section): Ignore uninteresting
5425 relocations.
5426
5427 2002-06-06 Nick Clifton <nickc@cambridge.redhat.com>
5428
5429 * merge.c: Include libiberty.h.
5430 * elf-strtab.c: Include libiberty.h.
5431
5432 2002-06-06 Elias Athanasopoulos <eathan@otenet.gr>
5433
5434 * peXXigen.c (pe_print_idata): Remove unused variable.
5435
5436 2002-06-06 David Heine <dlheine@tensilica.com>
5437
5438 * elf.c (assign_file_positions_for_segments): Remove unallocated
5439 sections from the section to segment mapping for PT_LOAD segments.
5440 Update comment about empty loadable segments.
5441
5442 2002-06-06 Richard Sandiford <rsandifo@redhat.com>
5443
5444 * stabs.c (_bfd_link_section_stabs): Check that the symbol offset
5445 is within the .stabstr section.
5446
5447 2002-06-06 Alan Modra <amodra@bigpond.net.au>
5448
5449 * elf-bfd.h (struct elf_size_info <swap_symbol_in>): Function args
5450 are "const PTR", not "const PTR *".
5451 (bfd_elf32_swap_symbol_in): Likewise.
5452 (bfd_elf64_swap_symbol_in): Likewise.
5453 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR.
5454 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
5455 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
5456 (elf_link_add_object_symbols): Likewise.
5457 (elf_link_record_local_dynamic_symbol): Likewise.
5458 (elf_link_input_bfd): Likewise.
5459 (elf_gc_mark): Likewise.
5460 (elf_reloc_symbol_deleted_p): Likewise.
5461 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
5462 (mn10200_elf_relax_delete_bytes): Likewise.
5463 (mn10200_elf_symbol_address_p): Likewise.
5464 (mn10200_elf_get_relocated_section_contents): Likewise.
5465 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
5466 (mn10300_elf_relax_section): Likewise.
5467 (mn10300_elf_relax_delete_bytes): Likewise.
5468 (mn10300_elf_symbol_address_p): Likewise.
5469 (mn10300_elf_get_relocated_section_contents): Likewise.
5470 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
5471 (elf32_h8_relax_delete_bytes): Likewise.
5472 (elf32_h8_symbol_address_p): Likewise.
5473 (elf32_h8_get_relocated_section_contents): Likewise.
5474 * elf32-hppa.c (get_local_syms): Likewise.
5475 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
5476 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
5477 * elf32-sh.c (sh_elf_relax_section): Likewise.
5478 (sh_elf_relax_delete_bytes): Likewise.
5479 (sh_elf_get_relocated_section_contents): Likewise.
5480 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
5481 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
5482 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
5483 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
5484 * elf64-ppc.c (get_local_syms): Likewise.
5485 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
5486 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
5487
5488 2002-06-05 J"orn Rennecke <joern.rennecke@superh.com>
5489
5490 * config.bfd (sh64l*-*-elf*, shl*-*-elf*): New configurations.
5491
5492 2002-06-05 Alan Modra <amodra@bigpond.net.au>
5493
5494 * elf.c (group_signature): Swap in the whole symbol, and handle
5495 extracting section symbol names.
5496 (setup_group): Add comment.
5497 (set_group_contents): When called from objcopy or ld, arrange for
5498 section contents to be written. Write group member output section
5499 indices to allow objcopy to reorganize sections.
5500 (_bfd_elf_copy_private_section_data): Copy group info.
5501
5502 * elf-bfd.h (struct elf_size_info): Add swap_symbol_in field.
5503 (bfd_elf32_swap_symbol_in): Update prototype.
5504 (bfd_elf64_swap_symbol_in): Likewise.
5505 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR *.
5506 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
5507 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
5508 (elf_link_add_object_symbols): Likewise.
5509 (elf_link_record_local_dynamic_symbol): Likewise.
5510 (elf_link_input_bfd): Likewise.
5511 (elf_gc_mark): Likewise.
5512 (elf_reloc_symbol_deleted_p): Likewise.
5513 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
5514 (mn10200_elf_relax_delete_bytes): Likewise.
5515 (mn10200_elf_symbol_address_p): Likewise.
5516 (mn10200_elf_get_relocated_section_contents): Likewise.
5517 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
5518 (mn10300_elf_relax_section): Likewise.
5519 (mn10300_elf_relax_delete_bytes): Likewise.
5520 (mn10300_elf_symbol_address_p): Likewise.
5521 (mn10300_elf_get_relocated_section_contents): Likewise.
5522 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
5523 (elf32_h8_relax_delete_bytes): Likewise.
5524 (elf32_h8_symbol_address_p): Likewise.
5525 (elf32_h8_get_relocated_section_contents): Likewise.
5526 * elf32-hppa.c (get_local_syms): Likewise.
5527 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
5528 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
5529 * elf32-sh.c (sh_elf_relax_section): Likewise.
5530 (sh_elf_relax_delete_bytes): Likewise.
5531 (sh_elf_get_relocated_section_contents): Likewise.
5532 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
5533 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
5534 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
5535 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
5536 * elf64-ppc.c (get_local_syms): Likewise.
5537 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
5538 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
5539 * elfcode.h (NAME(_bfd_elf,size_info)): Update initialiser.
5540 * elf64-alpha.c (alpha_elf_size_info): Likewise.
5541 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
5542 * elf64-mips.c (mips_elf64_size_info): Likewise.
5543 * elf64-s390.c (s390_elf64_size_info): Likewise.
5544 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
5545
5546 2002-06-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
5547
5548 * elf32-mips.c (elf32_mips_ignore_discarded_relocs): Move to...
5549 elfxx-mips.c (_bfd_mips_elf_ignore_discarded_relocs): ... here.
5550 elf64-mips.c (elf_backend_ignore_discarded_relocs): Use
5551 _bfd_mips_elf_ignore_discarded_relocs.
5552 elfxx-mips.h (_bfd_mips_elf_ignore_discarded_relocs): Declare.
5553
5554 2002-06-05 H.J. Lu <hjl@gnu.org>
5555
5556 * elfxx-mips.c (mips_elf_calculate_relocation): Call
5557 _bfd_elf_rel_local_sym for STT_SECTION relocations against
5558 the SEC_MERGE section.
5559
5560 2002-06-05 Alan Modra <amodra@bigpond.net.au>
5561
5562 * coff-alpha.c: Update copyright date.
5563 * coff-mips.c: Likewise.
5564 * xcoff-target.h: Likewise.
5565
5566 * bfd-in.h: Remove "taken from the source" comment.
5567 * libbfd-in.h: Likewise.
5568 * libcoff-in.h: Likewise.
5569 * bfd-in2.h: Regenerate.
5570 * libbfd.h: Regenerate.
5571 * libcoff.h: Regenerate.
5572
5573 * elf.c (bfd_elf_discard_group): Return true.
5574 * elf-bfd.h (bfd_elf_discard_group): Declare.
5575 * bfd-in.h (bfd_elf_discard_group): Don't declare here.
5576 * section.c (bfd_discard_group): Rename to bfd_generic_discard_group.
5577 * bfd.c (bfd_discard_group): Define.
5578 * targets.c (struct bfd_target): Add _bfd_discard_group.
5579 (BFD_JUMP_TABLE_LINK): Here too.
5580 * libbfd-in.h (_bfd_nolink_bfd_discard_group): Define.
5581 * aout-adobe.c (aout_32_bfd_discard_group): Define.
5582 * aout-target.h (MY_bfd_discard_group): Define.
5583 * aout-tic30.c (MY_bfd_discard_group): Define.
5584 * binary.c (binary_bfd_discard_group): Define.
5585 * bout.c (b_out_bfd_discard_group): Define.
5586 * coff-alpha.c (_bfd_ecoff_bfd_discard_group): Define.
5587 * coffcode.h (coff_bfd_discard_group): Define.
5588 * coff-mips.c (_bfd_ecoff_bfd_discard_group): Define.
5589 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Define.
5590 * i386msdos.c (msdos_bfd_discard_group): Define.
5591 * i386os9k.c (os9k_bfd_discard_group): Define.
5592 * ieee.c (ieee_bfd_discard_group): Define.
5593 * ihex.c (ihex_bfd_discard_group): Define.
5594 * mmo.c (mmo_bfd_discard_group): Define.
5595 * nlm-target.h (nlm_bfd_discard_group): Define.
5596 * oasys.c (oasys_bfd_discard_group): Define.
5597 * ppcboot.c (ppcboot_bfd_discard_group): Define.
5598 * som.c (som_bfd_discard_group): Define.
5599 * srec.c (srec_bfd_discard_group): Define.
5600 * tekhex.c (tekhex_bfd_discard_group): Define.
5601 * versados.c (versados_bfd_discard_group): Define.
5602 * vms.c (vms_bfd_discard_group): Define.
5603 * xcoff-target.h (_bfd_xcoff_bfd_discard_group): Define.
5604 * coff64-rs6000.c (rs6000coff64_vec): Update initialiser.
5605 (aix5coff64_vec): Likewise.
5606 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Likewise.
5607
5608 2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
5609
5610 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-com.lo.
5611 (BFD32_BACKENDS_CFILES): Add elf32-sh64-com.c.
5612 (elf32-sh64-com.lo): New dependency list.
5613 * Makefile.in: Regenerate.
5614 * configure.in (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec)
5615 (bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec): Add
5616 elf32-sh64-com.lo.
5617 * configure: Regenerate.
5618 * elf32-sh64.c (sh64_address_in_cranges)
5619 (sh64_get_contents_type, sh64_address_is_shmedia): Move to...
5620 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb):
5621 (crange_bsearch_cmpl): Prepend _bfd_sh64_ to name and move to...
5622 * elf32-sh64-com.c: ...here. New file.
5623
5624 2002-06-04 Alan Modra <amodra@bigpond.net.au>
5625
5626 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Remove
5627 ATTRIBUTE_UNUSED on used params.
5628 * elf32-vax.c (elf_vax_gc_mark_hook): Remove unnecessary checks
5629 before calling bfd_section_from_elf_index on local syms.
5630 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
5631
5632 2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
5633
5634 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-nbsd.lo.
5635 (BFD32_BACKENDS_CFILES): Add elf32-sh64-nbsd.c.
5636 (BFD64_BACKENDS): Add elf64-sh64-nbsd.lo.
5637 (BFD64_BACKENDS_CFILES): Add elf64-sh64-nbsd.c.
5638 (elf32-sh64-nbsd.lo, elf64-sh64-nbsd.lo): New rules.
5639 * Makefile.in: Regenerate.
5640 * config.bfd (sh5le-*-netbsd*, sh5-*-netbsd*, sh64le-*-netbsd*)
5641 (sh64-*-netbsd*): New targets.
5642 * configure.in: Add bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec,
5643 bfd_elf64_sh64nbsd_vec, and bfd_elf64_sh64lnbsd_vec.
5644 * configure: Regenerate.
5645 * elf32-sh64-nbsd.c: New file.
5646 * elf64-sh64-nbsd.c: New file.
5647 * targets.c: Add extern decls for bfd_elf32_sh64nbsd_vec,
5648 bfd_elf32_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec, and
5649 bfd_elf64_sh64lnbsd_vec.
5650
5651 2002-06-04 Alan Modra <amodra@bigpond.net.au>
5652
5653 * elf.c (setup_group): Set SEC_LINK_ONCE on GRP_COMDAT groups.
5654 (bfd_section_from_shdr): Likewise. Set section name of group
5655 sections from signature.
5656 (group_signature): Split out from setup_group. Ensure symbol table
5657 is available.
5658 (bfd_elf_discard_group): New function.
5659 (_bfd_elf_make_section_from_shdr): Don't set SEC_LINK_ONCE on
5660 .gnu.linkonce* sections if they are members of a group.
5661 (set_group_contents): Set GRP_COMDAT flag.
5662 * section.c (bfd_discard_group): New function.
5663 * bfd-in.h (bfd_elf_discard_group): Declare.
5664 * bfd-in2.h: Regenerate.
5665 * elf-bfd.h (struct bfd_elf_section_data): Add linkonce_p field.
5666 (elf_linkonce_p): Define.
5667
5668 2002-06-04 Alan Modra <amodra@bigpond.net.au>
5669
5670 * elf.c (bfd_section_from_shdr): Make "name" const.
5671 * elf-bfd.h (elf_backend_section_from_shdr): Likewise.
5672 * elf32-i370.c (i370_elf_section_from_shdr): Likewise.
5673 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
5674 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
5675 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
5676 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
5677 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
5678 * elf64-ppc.c (ppc64_elf_section_from_shdr): Likewise.
5679 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
5680 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
5681 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
5682
5683 2002-06-03 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
5684
5685 * elfxx-mips.c (ABI_64_P): Use backend's data to determine the
5686 ABI.
5687
5688 2002-06-02 Kazu Hirata <kazu@cs.umass.edu>
5689
5690 * elf32-arc.c: Fix formatting.
5691 * elf32-arm.h: Likewise.
5692 * elf32-cris.c: Likewise.
5693 * elf32-dlx.c: Likewise.
5694 * elf32-hppa.c: Likewise.
5695 * elf32-i386.c: Likewise.
5696 * elf32-i386qnx.c: Likewise.
5697 * elf32-or32.c: Likewise.
5698 * elf32-s390.c: Likewise.
5699 * elf32-sh64.c: Likewise.
5700 * elf32-vax.c: Likewise.
5701 * elf32-xstormy16.c: Likewise.
5702 * elf64-alpha.c: Likewise.
5703 * elf64-mmix.c: Likewise.
5704 * elf64-ppc.c: Likewise.
5705 * elf64-s390.c: Likewise.
5706 * elf64-sh64.c: Likewise.
5707 * elf64-x86-64.c: Likewise.
5708
5709 2002-06-02 Richard Henderson <rth@redhat.com>
5710
5711 * elf64-alpha.c (elf64_alpha_relocate_section): Don't dereference
5712 null when there are no got entries for a symbol.
5713 (elf64_alpha_relax_find_tls_segment): Rearrange to avoid
5714 uninitialized variable warning.
5715
5716 2002-06-01 Richard Henderson <rth@redhat.com>
5717
5718 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Don't test for
5719 undefined symbols here.
5720 (elf64_alpha_relax_section): Do it here. Also test for not
5721 defined in the current module.
5722 (elf64_alpha_relocate_section_r): Split out of ...
5723 (elf64_alpha_relocate_section): ... here. Don't dereference
5724 NULL when looking up local got entries.
5725
5726 2002-06-01 Richard Henderson <rth@redhat.com>
5727
5728 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Reject undefined
5729 symbols from JSR relaxation.
5730 (elf64_alpha_size_plt_section_1): New.
5731 (elf64_alpha_calc_dynrel_sizes): Split out .rela.got bits ...
5732 (elf64_alpha_size_rela_got_1): ... here.
5733 (elf64_alpha_size_dynamic_sections): Split out .rela.got bits ...
5734 (elf64_alpha_size_rela_got_section): ... here.
5735 (elf64_alpha_size_plt_section): New.
5736 (elf64_alpha_relax_section): Call them.
5737 (elf64_alpha_size_got_sections): Remove output_bfd arg.
5738 (elf64_alpha_finish_dynamic_symbol): Check gotent use_count.
5739
5740 2002-06-01 Richard Henderson <rth@redhat.com>
5741
5742 * elf64-alpha.c (alpha_get_dtprel_base, alpha_get_tprel_base): New.
5743 (elf64_alpha_relocate_section): Use them. Reject LE TLS relocs
5744 in shared libraries. Fix DTPRELHI and TPRELHI value.
5745 (INSN_ADDQ, INSN_RDUNIQ): New.
5746 (struct alpha_relax_info): Add symtab_hdr, tls_segment, first_gotent.
5747 (elf64_alpha_relax_with_lituse): Return boolean. Remove irelend
5748 argument. Reject dynamic symbols. Use LITUSE symbolic constants.
5749 (elf64_alpha_relax_got_load): Rename from relax_without_lituse.
5750 Handle GOTDTPREL and GOTTPREL relocations.
5751 (elf64_alpha_relax_gprelhilo): New.
5752 (elf64_alpha_relax_tls_get_addr): New.
5753 (elf64_alpha_relax_find_tls_segment): New.
5754 (elf64_alpha_relax_section): Handle TLS relocations.
5755 (ALPHA_ELF_LINK_HASH_TLS_IE): New.
5756 (elf64_alpha_check_relocs): Set it.
5757
5758 2002-06-01 Richard Henderson <rth@redhat.com>
5759
5760 * elf64-alpha.c (elf64_alpha_relax_section): Don't store computed gp.
5761
5762 * elf64-alpha.c (elf64_alpha_check_relocs): Fix typo on maybe_dynamic
5763 check; don't suppress dynamic relocs for non-allocated sections.
5764
5765 * elf64-alpha.c: Remove dead code.
5766
5767 2002-05-31 Alan Modra <amodra@bigpond.net.au>
5768
5769 * bfd-in2.h: Regenerate.
5770 * libbfd.h: Regenerate.
5771 * po/SRC-POTFILES.in: Regenerate.
5772
5773 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate
5774 space for bss .plt.
5775
5776 2002-05-31 Graeme Peterson <gp@qnx.com>
5777
5778 * Makefile.am (BFD32_BACKENDS): Add elf32-i386qnx.lo.
5779 (BFD32_BACKENDS_CFILES): Add elf32-i386qnx.c.
5780 Run "make dep-am".
5781 * Makefile.in: Regenerate.
5782 * config.bfd: Add i[3456]86-*-nto-qnx* support.
5783 * configure.in: Add bfd_elf32_i386qnx_vec support.
5784 * configure: Regenerate.
5785 * elf-bfd.h (struct elf_backend_data): Add set_nonloadable_filepos,
5786 is_contained_by_filepos, and copy_private_bfd_data_p.
5787 * elf.c (assign_file_positions_for_segments): Call backend
5788 set_nonloadable_filepos. Fix non-K&R call to _bfd_error_handler.
5789 (IS_CONTAINED_BY_FILEPOS): Define.
5790 (INCLUDE_SECTION_IN_SEGMENT): Also test IS_CONTAINED_BY_FILEPOS.
5791 (copy_private_bfd_data): Use IS_CONTAINED_BY_FILEPOS. Typo fix.
5792 Fix non-K&R call to _bfd_error_handler.
5793 (_bfd_elf_copy_private_section_data): Use backend
5794 copy_private_bfd_data_p.
5795 * elf32-i386.c: Don't include elfxx-target.h when
5796 ELF32_I386_C_INCLUDED is defined.
5797 * elf32-i386qnx.c: New QNX elf backend file.
5798 * elfxx-target.h: Add elf_backend_set_nonloadable_filepos,
5799 elf_backend_is_contained_by_filepos, and
5800 elf_backend_do_copy_private_bfd_data.
5801 * targets.c: Add bfd_target bfd_elf32_i386qnx_vec.
5802
5803 2002-05-31 Alan Modra <amodra@bigpond.net.au>
5804
5805 * elfarm-oabi.c (bfd_elf32_arm_add_glue_sections_to_bfd): Define.
5806 Move other similar defines to start of file.
5807
5808 2002-05-30 Tom Rix <trix@redhat.com>
5809
5810 * coff-rs6000.c (xcoff_rtype2howto): Handle 16 bit R_RBA.
5811 * coff64-rs6000.c (xcoff64_rtype2howto): Same.
5812
5813 2002-05-30 Richard Henderson <rth@redhat.com>
5814
5815 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_TLSGD,
5816 ALPHA_ELF_LINK_HASH_LU_TLSLDM, ALPHA_ELF_LINK_HASH_LU_FUNC): New.
5817 (ALPHA_ELF_GOT_ENTRY_RELOCS_DONE): Remove.
5818 (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Remove.
5819 (struct alpha_elf_got_entry): Add reloc_type, reloc_done, reloc_xlated.
5820 (struct alpha_elf_obj_tdata): Rename total_got_entries and
5821 n_local_got_entries to total_got_size and local_got_size.
5822 (elf64_alpha_howto, elf64_alpha_reloc_map): Update for TLS relocs.
5823 (alpha_got_entry_size): New.
5824 (elf64_alpha_relax_with_lituse): Use it.
5825 (elf64_alpha_relax_without_lituse): Likewise.
5826 (MAX_GOT_SIZE): Rename from MAX_GOT_ENTRIES.
5827 (get_got_entry): New.
5828 (elf64_alpha_check_relocs): Handle TLS relocs. Reorganize.
5829 (elf64_alpha_adjust_dynamic_symbol): Test LU_FUNC as a mask.
5830 (elf64_alpha_merge_ind_symbols): Check gotent->reloc_type.
5831 (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots): Likewise.
5832 (elf64_alpha_calc_got_offsets_for_symbol): Use alpha_got_entry_size.
5833 (elf64_alpha_calc_got_offsets): Likewise.
5834 (alpha_dynamic_entries_for_reloc): New.
5835 (elf64_alpha_calc_dynrel_sizes): Use it.
5836 (elf64_alpha_size_dynamic_sections): Likewise.
5837 (elf64_alpha_relocate_section): Handle TLS relocations.
5838 * reloc.c: Add Alpha TLS relocations.
5839 * bfd-in2.h, libbfd.h: Rebuild.
5840
5841 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
5842
5843 * peXXigen.c (pe_print_idata): Remove double printed
5844 import table lines; add Bound-To comment.
5845
5846 2002-05-29 Matt Thomas <matt@3am-software.com>
5847
5848 * Makefile.am (BFD32_BACKENDS): Add elf32-vax.lo.
5849 (BFD32_BACKENDS_CFILES): Add elf32-vax.c.
5850 (elf32-vax.lo): New rule.
5851 * Makefile.in: Regenerate.
5852 * configure.in (bfd_elf32_vax_vec)
5853 (vaxnetbsd_vec): New vectors.
5854 * configure: Regenerate.
5855 * config.bfd (vax-*-netbsdelf*)
5856 (vax-*-netbsdaout*)
5857 (vax-*-netbsd*): New targets.
5858 * elf32-vax.c: New file.
5859 * reloc.c: Add VAX relocations.
5860 * bfd-in2.h: Regenerate.
5861 * targets.c (_bfd_target_vector): Add bfd_elf32_vax_vec.
5862
5863 2002-05-29 Jason Thorpe <thorpej@wasabisystems.com>
5864
5865 * config.bfd (arm-*-netbsd*): Add bfd_elf32_littlearm_vec
5866 and bfd_elf32_bigarm_vec to targ_selvecs.
5867
5868 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
5869
5870 * peXXigen.c (pe_print_idata): Fix seg faults on printing import tables
5871 with auto-imported symbols.
5872
5873 2002-05-29 Adam Nemet <anemet@lnxw.com>
5874
5875 * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Don't add glue
5876 sections only record bfd.
5877 (bfd_elf32_arm_add_glue_sections_to_bfd): New function.
5878 * bfd-in.h (bfd_elf32_arm_add_glue_sections_to_bfd): Declare it.
5879 * bfd-in2.h: Regenerate.
5880
5881 2002-05-28 Nick Clifton <nickc@cambridge.redhat.com>
5882
5883 * syms.c (_bfd_stab_section_find_nearest_line): Move
5884 declaration and initialisation of saw_line and saw_func out of
5885 for loop.
5886
5887 2002-05-29 Alan Modra <amodra@bigpond.net.au>
5888
5889 * elf64-ppc.c (ppc64_elf_get_symbol_info): New function.
5890 (bfd_elf64_get_symbol_info): Define.
5891 * elfxx-target.h (bfd_elfNN_get_symbol_info): Only define if undef.
5892
5893 2002-05-29 Andrey Volkov <avolkov@transas.com>
5894
5895 * cpu-h8300.c: Make default h8300 machine first in machine list.
5896
5897 2002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net>
5898
5899 * config.bfd: Added DLX configuraton.
5900 * Makefile.am: Added DLX configuraton.
5901 * configure.in: Added DLX configuraton.
5902 * archures.c: Add DLX architecure.
5903 * reloc.c: Add DLX relocs.
5904 * targets.c: Added DLX target vector.
5905 * configure: Regenerate.
5906 * Makefile.in: Regenreate.
5907 * bfd-in2.h: Regenreate.
5908 * elf32-dlx.c: New file: Support DLX target.
5909 * cpu-dlx.c: New file: Support DLX target.
5910
5911 2002-05-25 Alan Modra <amodra@bigpond.net.au>
5912
5913 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Formatting.
5914
5915 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Revert last change.
5916 (ppc64_elf_check_relocs): Don't set up function descriptor symbol
5917 strings to point inside function code sym string.
5918 (func_desc_adjust): Likewise.
5919 (ppc64_elf_hide_symbol): Rewrite code to look up function code sym.
5920
5921 2002-05-24 Michal Ludvig <mludvig@suse.cz>
5922
5923 * elf64-x86-64.c (elf64_x86_64_grok_prstatus): Added.
5924 (elf64_x86_64_grok_psinfo): Added.
5925
5926 2002-05-24 TAMURA Kent <kent@netbsd.org>
5927
5928 * config.bfd: Add a target for i386-netbsdpe.
5929
5930 2002-05-24 Alan Modra <amodra@bigpond.net.au>
5931
5932 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy is_func
5933 and is_func_descriptor.
5934 (func_desc_adjust): Hide function code sym in shared libs unless
5935 there is a matching exported function descriptor sym.
5936
5937 2002-05-23 Jakub Jelinek <jakub@redhat.com>
5938
5939 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_THREAD_LOCAL
5940 for symbols from SHF_TLS section.
5941 (_bfd_elf_print_private_bfd_data): Add PT_TLS.
5942 (elf_fake_sections): Set SHF_TLS for SEC_THREAD_LOCAL sections.
5943 (map_sections_to_segments): Build PT_TLS segment if necessary.
5944 (assign_file_positions_for_segments): Likewise.
5945 (get_program_header_size): Account for PT_TLS segment.
5946 (swap_out_syms): Set type of BSF_THREAD_LOCAL symbols and symbols from
5947 SEC_THREAD_LOCAL sections to STT_TLS.
5948 * reloc.c: Add 386 and IA-64 TLS relocs.
5949 * section.c (SEC_THREAD_LOCAL): Define.
5950 (SEC_CONSTRUCTOR_TEXT, SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS):
5951 Remove.
5952 * elflink.h (elf_link_add_object_symbols): Support .tcommon.
5953 (size_dynamic_sections): If DF_STATIC_TLS, set DF_FLAGS
5954 unconditionally.
5955 (struct elf_final_link_info): Add first_tls_sec.
5956 (elf_bfd_final_link): Set first_tls_sec.
5957 Compute elf_hash_table (info)->tls_segment.
5958 (elf_link_output_extsym): Handle STT_TLS symbols.
5959 (elf_link_input_bfd): Likewise.
5960 * syms.c (BSF_THREAD_LOCAL): Define.
5961 * bfd-in2.h: Rebuilt.
5962 * libbfd.h: Rebuilt.
5963 * elf32-i386.c (elf_i386_tls_transition, dtpoff_base, tpoff,
5964 elf_i386_mkobject, elf_i386_object_p): New functions.
5965 (elf_howto_table): Add TLS relocs.
5966 (elf_i386_reloc_type_lookup): Support TLS relocs.
5967 (elf_i386_info_to_howto_rel): Likewise.
5968 (struct elf_i386_link_hash_entry): Add tls_type.
5969 (struct elf_i386_obj_tdata): New.
5970 (elf_i386_hash_entry, elf_i386_tdata, elf_i386_local_got_tls_type):
5971 New macros.
5972 (struct elf_i386_link_hash_table): Add tls_ldm_got.
5973 (link_hash_newfunc): Clear tls_type.
5974 (elf_i386_check_relocs): Support TLS relocs.
5975 (elf_i386_gc_sweep_hook): Likewise.
5976 (allocate_dynrelocs): Likewise.
5977 (elf_i386_size_dynamic_sections): Likewise.
5978 (elf_i386_relocate_section): Likewise.
5979 (elf_i386_finish_dynamic_symbol): Likewise.
5980 (bfd_elf32_mkobject, elf_backend_object_p): Define.
5981 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add tprel_offset,
5982 dtpmod_offset, dtprel_offset, tprel_done, dtpmod_done, dtprel_done,
5983 want_tprel, want_dtpmod, want_dtprel.
5984 (elfNN_ia64_tprel_base, elfNN_ia64_dtprel_base): New functions.
5985 (ia64_howto_table): Add TLS relocs, rename R_IA64_LTOFF_TP22 to
5986 R_IA64_LTOFF_TPREL22.
5987 (elf_code_to_howto_index): Add TLS relocs.
5988 (elfNN_ia64_check_relocs): Support TLS relocs.
5989 (allocate_global_data_got): Account for TLS .got data.
5990 (allocate_dynrel_entries): Account for TLS dynamic relocations.
5991 (elfNN_ia64_install_value): Supprt TLS relocs.
5992 (set_got_entry): Support TLS relocs.
5993 (elfNN_ia64_relocate_section): Likewise.
5994
5995 2002-05-23 Nick Clifton <nickc@cambridge.redhat.com>
5996
5997 * elf32-arm.h (elf32_arm_final_link_relocate): For the Thumb
5998 BLX reloc round the relocation up rather than down.
5999 * coff-arm.c (coff_arm_relocate_section): Likewise.
6000
6001 2002-05-21 H.J. Lu (hjl@gnu.org)
6002
6003 * linker.c (_bfd_generic_link_add_one_symbol): Allow multiple
6004 definition.
6005
6006 2002-05-22 Alan Modra <amodra@bigpond.net.au>
6007
6008 * elf64-ppc.c (ppc64_elf_size_stubs): Don't strip .branch_lt.
6009 (ppc64_elf_relocate_section): Handle unresolved relocs in opd.
6010
6011 2002-05-22 Alan Modra <amodra@bigpond.net.au>
6012
6013 * elf64-ppc.c (ppc64_elf_relocate_section): Return false for
6014 unresolved relocs.
6015 (ppc64_elf_size_dynamic_sections): Check for splt NULL.
6016
6017 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6018
6019 * bfd.c (bfd_get_arch_size): Remove bfd_set_error call for
6020 non-ELF targets.
6021
6022 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6023
6024 * elf-bfd.h (elf_backend_emit_relocs): Change prototype to return
6025 an error value.
6026 * elflink.h (elf_link_output_relocs): Likewise. Improve error message.
6027 return with false on error.
6028 (elf_link_input_bfd): Check reloc_emitter return value.
6029
6030 2002-05-21 Jason Thorpe <thorpej@wasabisystems.com>
6031
6032 * config.bfd (armeb-*-netbsdelf*): New target.
6033
6034 2002-05-20 Alan Modra <amodra@bigpond.net.au>
6035
6036 * elf64-ppc.c (ppc_build_one_stub): Point undefined function syms
6037 at the plt call stub.
6038
6039 2002-05-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6040
6041 * cpu-mips.c (mips_compatible): Don't try to check machine
6042 compatibility.
6043
6044 2002-05-18 Tom Rix <trix@redhat.com>
6045
6046 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_out): Fix C_FILE auxent.
6047
6048 2002-05-17 Alan Modra <amodra@bigpond.net.au>
6049
6050 * elf64-ppc.c (ppc64_elf_info_to_howto): Formatting.
6051 (ppc64_elf_relocate_section): Don't warn about reloc overflow when
6052 we've already warned about an undefined symbol. Report more
6053 detail on reloc errors.
6054
6055 2002-05-17 Alan Modra <amodra@bigpond.net.au>
6056
6057 * acinclude.m4 (AM_INSTALL_LIBBFD): New.
6058 * configure.in: Invoke AM_INSTALL_LIBBFD.
6059 * Makefile.am (install-data-local): Revert 2002-05-13. Move to..
6060 (install_libbfd): .. New target.
6061 (uninstall_libbfd): Likewise.
6062 (install-bfdlibLTLIBRARIES): Likewise.
6063 (uninstall-bfdlibLTLIBRARIES): Likewise.
6064 (bfdlibdir): New.
6065 (bfdincludedir): New.
6066 (lib_LTLIBRARIES): Rename to bfdlib_LTLIBRARIES.
6067 * aclocal.m4: Regenerate.
6068 * configure: Regenerate.
6069 * Makefile.in: Regenerate.
6070
6071 2002-05-17 Stuart Balfour <sbalfour@cisco.com>
6072
6073 * hash.c (bfd_hash_lookup): Remove computation of len from inside
6074 hash loop.
6075
6076 2002-05-16 Nick Clifton <nickc@cambridge.redhat.com>
6077
6078 * config.bfd: Add targets for sh64-linux (little endian and
6079 big endian).
6080
6081 2002-05-15 Laurent Pinchart <laurent.pinchart@skynet.be>
6082
6083 * peXXigen.c (pe_print_idata): Do not assume that the first thunk
6084 is located in the same section as the import table. Instead
6085 check, and if necessary load the section containing the thunk.
6086
6087 2002-05-15 Nick Clifton <nickc@cambridge.redhat.com>
6088
6089 * aix5ppc-core.c (xcoff64_core_p): Replace bfd_read with
6090 bfd_bread.
6091 (xcoff64_core_file_matches_executable_p): Replace bfd_read
6092 with bfd_bread.
6093
6094 2002-05-15 Alan Modra <amodra@bigpond.net.au>
6095
6096 * aix5ppc-core.c: Warning fixes.
6097 * aout-adobe.c (aout_32_bfd_link_just_syms): Define.
6098 * aout-target.h (MY_bfd_link_just_syms): Define.
6099 * aout-tic30.c (MY_bfd_link_just_syms): Define.
6100 * bfd.c (bfd_link_just_syms): Define.
6101 * binary.c (binary_bfd_link_just_syms): Define.
6102 * bout.c (b_out_bfd_link_just_syms): Define.
6103 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update initializer.
6104 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
6105 * coffcode.h (coff_bfd_link_just_syms): Define.
6106 * elf-bfd.h (enum elf_link_info_type): Add ELF_INFO_TYPE_JUST_SYMS.
6107 (elf_discarded_section): Check for ELF_INFO_TYPE_JUST_SYMS.
6108 (_bfd_elf_link_just_syms): Declare.
6109 * elf.c (_bfd_elf_link_just_syms): New function.
6110 * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Check that
6111 sections haven't already been discarded by the linker.
6112 * elflink.h (elf_link_add_object_symbols): Likewise for stab
6113 sections and SEC_MERGE sections.
6114 (elf_bfd_discard_info): Similarly here.
6115 * elfxx-target.h (bfd_elfNN_bfd_link_just_syms): Define.
6116 * i386msdos.c (msdos_bfd_link_just_syms): Define.
6117 * i386os9k.c (os9k_bfd_link_just_syms): Define.
6118 * ieee.c (ieee_bfd_link_just_syms): Define.
6119 * ihex.c (ihex_bfd_link_just_syms): Define.
6120 * libbfd-in.h (_bfd_nolink_bfd_link_just_syms): Define.
6121 (_bfd_generic_link_just_syms): Declare.
6122 * libecoff.h (_bfd_ecoff_bfd_link_just_syms): Define.
6123 * linker.c (_bfd_generic_link_just_syms): New function.
6124 * mmo.c (mmo_bfd_link_just_syms): Define.
6125 * nlm-target.h (nlm_bfd_link_just_syms): Define.
6126 * oasys.c (oasys_bfd_link_just_syms): Define.
6127 * ppcboot.c (ppcboot_bfd_link_just_syms): Define.
6128 * som.c (som_bfd_link_just_syms): Define.
6129 * srec.c (srec_bfd_link_just_syms): Define.
6130 * targets.c (struct bfd_target): Add _bfd_link_just_syms.
6131 (BFD_JUMP_TABLE_LINK): And here.
6132 * tekhex.c (tekhex_bfd_link_just_syms): Define.
6133 * versados.c (versados_bfd_link_just_syms): Define.
6134 * vms.c (vms_bfd_link_just_syms): Define.
6135 * libbfd.h: Regenerate.
6136 * bfd-in2.h: Regenerate.
6137
6138 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6139
6140 * elf32-mips.c: Remove superfluous definitions copied from
6141 elfxx-mips.c.
6142 (bfd_elf32_bigmips_vec,bfd_elf32_littlemips_vec): Use the
6143 SGIish vectors to check the special case.
6144 (mips_elf_hi16_reloc): Fix comment.
6145 (mips_elf_got16_reloc): Likewise.
6146 (_bfd_mips_elf32_gprel16_reloc): Likewise.
6147 (elf_reloc_map): Code cleanup.
6148 (mips_reloc_map): Add comment.
6149 (bfd_elf23_bfd_reloc_type_lookup): Code cleanup.
6150 (mips_elf32_rtype_to_howto): Likewise.
6151 (mips_elf32_discard_info): Likewise.
6152 (elf32_mips_irix_compat): Invert logic: Only SGIish vectors
6153 lead to IRIX compatibility now.
6154
6155 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6156
6157 * elfxx-mips.c: Call it IRIX, not Irix in comments.
6158
6159 2002-05-13 Jason Thorpe <thorpej@wasabisystems.com>
6160
6161 * config.bfd (shle-*-netbsdelf*): Add target which includes
6162 sh64 support.
6163
6164 2002-05-13 David Edelsohn <edelsohn@gnu.org>
6165
6166 * configure.in: Revert 2002-04-07. Instead, auto-configure
6167 HAVE_ST_C_IMPL.
6168 * configure: Regenerate.
6169 * config.in: Regenerate.
6170 * rs6000-core.c (CNEW_IMPL): Guard use of c_impl with HAVE_ST_C_IMPL
6171 or AIX_5_CORE.
6172
6173 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
6174
6175 * configure.in (sparc*-*-openbsd*): Support sparc64-openbsd
6176 corefiles as well.2
6177 * configure: Regenerate.
6178
6179 2002-05-13 Alan Modra <amodra@bigpond.net.au>
6180
6181 * Makefile.am (install-data-local): Install headers to
6182 $(exec_prefix)/include.
6183 * Makefile.in: Regenerate.
6184
6185 2002-05-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
6186 Daniel Jacobowitz <drow@mvista.com>
6187
6188 * coff-sh.c (sh_reloc_map): Map to R_SH_IMM32 for non-PE. Don't
6189 map BFD_RELOC_RVA.
6190
6191 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
6192
6193 * config.bfd (alpha*-*-openbsd*, sparc64*-*-openbsd*,
6194 hppa*-*-openbsd*): New targets.
6195 * configure.in (alpha*-*-openbsd*): Set COREFILE.
6196 * configure: Regenerate.
6197
6198 2002-05-10 Tom Rix <trix@redhat.com>
6199
6200 * coff64-rs6000.c (xcoff64_reloc_type_br): New function for
6201 xcoff64_ppc_relocate_section.
6202 * coff-rs6000.c : Extern common xcoff_reloc_type functions.
6203 * libxcoff.h: Common xcoff_reloc_type function declaration.
6204
6205 2002-05-10 Alan Modra <amodra@bigpond.net.au>
6206
6207 * elf32-i386.c (elf_i386_relocate_section): Remove overflow checks
6208 added in 2002-05-09 commit.
6209
6210 * elf32-hppa.c (elf32_hppa_size_stubs): Revert part of 2002-05-04,
6211 don't look for stubs on all undefined syms.
6212
6213 2002-05-09 Alan Modra <amodra@bigpond.net.au>
6214
6215 * elf64-ppc.c (RA_REGISTER_MASK, RA_REGISTER_SHIFT): Delete.
6216 (ppc64_elf_howto_raw <R_PPC64_RELATIVE>): Not pc_relative or
6217 pcrel_offset.
6218
6219 * elf32-i386.c (elf_howto_table): Comments.
6220 (elf_i386_relocate_section): Handle more relocs for relocatable
6221 linking and against SEC_MERGE sections.
6222
6223 2002-05-08 Alan Modra <amodra@bigpond.net.au>
6224
6225 * elf32-ppc.c (ppc_elf_create_got): New function.
6226 (ppc_elf_create_dynamic_sections): Call ppc_elf_create_got before
6227 _bfd_elf_create_dynamic_sections. Correct .plt flags.
6228 (ppc_elf_check_relocs): Use ppc_elf_create_got in place of
6229 _bfd_elf_create_got_section.
6230
6231 2002-05-07 Alan Modra <amodra@bigpond.net.au>
6232
6233 * elf-bfd.h (struct elf_backend_data): Add rela_normal.
6234 * elfxx-target.h (elf_backend_rela_normal): Define.
6235 (elfNN_bed): Init rela_normal.
6236 * elflink.h (elf_link_input_bfd <emit_relocs>): Handle adjustment
6237 for section symbols here if rela_normal. Simplify abs section test.
6238 * elf-m10200.c (mn10200_elf_relocate_section): If relocatable,
6239 return immediately. Remove code handling relocatable linking.
6240 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
6241 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
6242 * elf32-i370.c (i370_elf_relocate_section): Likewise.
6243 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
6244 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
6245 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
6246 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
6247 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
6248 * elf32-s390.c (elf_s390_relocate_section): Likewise.
6249 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
6250 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
6251 * elf64-s390.c (elf_s390_relocate_section): Likewise.
6252 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
6253 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
6254 * elf32-arm.h (elf32_arm_relocate_section): Likewise #ifndef USE_REL.
6255 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
6256 * elf-m10200.c (elf_backend_rela_normal): Define.
6257 * elf-m10300.c (elf_backend_rela_normal): Define.
6258 * elf32-fr30.c (elf_backend_rela_normal): Define.
6259 * elf32-i370.c (elf_backend_rela_normal): Define.
6260 * elf32-i860.c (elf_backend_rela_normal): Define.
6261 * elf32-m68k.c (elf_backend_rela_normal): Define.
6262 * elf32-mcore.c (elf_backend_rela_normal): Define.
6263 * elf32-openrisc.c (elf_backend_rela_normal): Define.
6264 * elf32-ppc.c (elf_backend_rela_normal): Define.
6265 * elf32-s390.c (elf_backend_rela_normal): Define.
6266 * elf32-xstormy16.c (elf_backend_rela_normal): Define.
6267 * elf64-ppc.c (elf_backend_rela_normal): Define.
6268 * elf64-s390.c (elf_backend_rela_normal): Define.
6269 * elf64-x86-64.c (elf_backend_rela_normal): Define.
6270 * elfxx-ia64.c (elf_backend_rela_normal): Define.
6271 * elf32-arm.h (elf_backend_rela_normal): Define #ifndef USE_REL.
6272 * elf32-m32r.c (elf_backend_rela_normal): Likewise.
6273
6274 2002-05-06 Nick Clifton <nickc@cambridge.redhat.com>
6275
6276 * elf32-arm.h (elf32_arm_final_link_relocate): Convert
6277 'reloc_signed_max' and 'reloc_signed_min' into half-word offsets.
6278
6279 2002-05-06 Alan Modra <amodra@bigpond.net.au>
6280
6281 * elflink.h (elf_link_input_bfd <emit_relocs>): Adjust r_offset
6282 when not relocatable. Fix reloc_emitter call for K&R.
6283
6284 2002-05-04 Alan Modra <amodra@bigpond.net.au>
6285
6286 * elf64-ppc.c (ppc64_elf_relocate_section): Reinstate code
6287 reloading local sym addend mistakenly removed in 2002-05-01 change.
6288
6289 * dwarf2.c (struct line_head): Make prologue_length a bfd_vma.
6290 (read_abbrevs): Change "offset" param to bfd_vma.
6291 (parse_comp_unit): Change "version" and addr_size to unsigned ints.
6292 Change "abbrev_offset" to bfd_vma.
6293 (read_indirect_string): Use correct conversion chars in error
6294 message format string, cast bfd_vma's to unsigned long.
6295 (read_abbrevs): Likewise.
6296 (read_attribute_value): Likewise.
6297 (decode_line_info): Likewise.
6298 (scan_unit_for_functions): Likewise.
6299 (parse_comp_unit): Likewise.
6300
6301 2002-05-04 Tom Rix <trix@redhat.com>
6302
6303 * coffswap.h (coff_swap_reloc_in): Remove XCOFF support.
6304 (coff_swap_reloc_out): Same.
6305 * coff-rs6000.c: (xcoff_swap_reloc_in): Moved from coffswap.h.
6306 (xcoff_swap_reloc_out): Same.
6307 (xcoff_rtype2howto): Renamed from _bfd_xcoff_rtype2howto. Special
6308 case some 16 bit relocs. Add reloc value to output.
6309 (xcoff_howto_table): Remove 64 bit R_POS, add 16 bit
6310 R_RBR. Improve names.
6311 (_bfd_xcoff_reloc_type_lookup): Adjust for removal of 64 bit R_POS.
6312 (bfd_xcoff_backend_data): Update with new reloc swap names.
6313 (bfd_pmac_xcoff_backend_data) : Same.
6314 * coff64-rs6000.c: (xcoff64_swap_reloc_in): Moved from coffswap.h.
6315 (xcoff64_swap_reloc_out): Same.
6316 (xcoff64_rtype2howto): Special case some 16 bit relocs and 32 bit
6317 R_POS. Add reloc value to output.
6318 (xcoff64_howto_table): Move 64 bit R_POS to first entry. Add 16
6319 bit R_RBR. Improve names, masks.
6320 (xcoff64_reloc_type_lookup): Adjust for move of 64 bit R_POS.
6321 (bfd_xcoff_backend_data): Update with new reloc swap names.
6322 (bfd_xcoff_aix5_backend_data) : Same.
6323
6324 2002-05-04 Alan Modra <amodra@bigpond.net.au>
6325
6326 * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add
6327 bfd_count top_index, input_list, all_local_syms.
6328 (elf32_hppa_setup_section_lists): New function, split from
6329 elf32_hppa_size_stubs.
6330 (elf32_hppa_next_input_section): Likewise.
6331 (group_sections): Likewise.
6332 (get_local_syms): Likewise.
6333 (elf32_hppa_size_stubs): Adjust for split out functions. Look for
6334 stubs on undefined syms too.
6335 (elf32_hppa_set_gp): Use bfd_link_hash* instead of elf_link_hash*.
6336 Only access htab elf fields when we have an elf hash table.
6337 * elf32-hppa.h (elf32_hppa_setup_section_lists): Declare.
6338 (elf32_hppa_next_input_section): Declare.
6339
6340 2002-05-04 Bob Byrnes <byrnes@curl.com>
6341
6342 * opncls.c (_bfd_new_bfd_contained_in): Check return value of
6343 _bfd_new_bfd.
6344
6345 2002-05-03 H.J. Lu (hjl@gnu.org)
6346
6347 * elfxx-mips.c (mips_elf_link_hash_entry): Add forced_local.
6348 (mips_elf_link_hash_newfunc): Initialize forced_local to false.
6349 (mips_elf_record_global_got_symbol): Call _bfd_mips_elf_hide_symbol
6350 to hide a global symbol.
6351 (_bfd_mips_elf_hide_symbol): Return if forced_local is true. Set
6352 forced_local to true.
6353
6354 2002-05-02 Richard Henderson <rth@redhat.com>
6355
6356 * elf64-alpha.c (elf64_alpha_relocate_section): Force relative relocs
6357 vs SHN_UNDEF to zero.
6358
6359 2002-05-02 Alan Modra <amodra@bigpond.net.au>
6360
6361 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_SECTOFF>): Change to a
6362 16 bit reloc.
6363 <R_PPC64_SECTOFF_DS>: Likewise.
6364 (ppc64_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
6365 SECTOFF reloc.
6366 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_SECTOFF>): Correct.
6367 (ppc_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
6368 SECTOFF reloc.
6369
6370 * elf64-ppc.c (ppc64_elf_addr16_ha_reloc): Delete.
6371 (ppc64_elf_ha_reloc): New function.
6372 (ppc64_elf_brtaken_reloc): New function.
6373 (ppc64_elf_sectoff_reloc): New function.
6374 (ppc64_elf_sectoff_ha_reloc): New function.
6375 (ppc64_elf_toc_reloc): New function.
6376 (ppc64_elf_toc_ha_reloc): New function.
6377 (ppc64_elf_toc64_reloc): New function.
6378 (ppc64_elf_unhandled_reloc): New function.
6379 (ppc64_elf_howto_raw): Use the above.
6380 <R_PPC64_RELATIVE>: Mark pc_relative, pcrel_offset.
6381 <R_PPC64_SECTOFF>: Not pc_relative or pcrel_offset. Fix dst_mask.
6382 <R_PPC64_SECTOFF_DS>: Likewise.
6383 (IS_ABSOLUTE_RELOC): Update.
6384 (struct ppc_link_hash_table): Add have_undefweak.
6385 (ppc64_elf_link_hash_table_create): Init.
6386 (func_desc_adjust): Set have_undefweak.
6387 (ppc64_elf_func_desc_adjust): Call func_desc_adjust earlier. Only
6388 add the .sfpr blr when have_undefweak.
6389 (ppc64_elf_setup_section_lists): Check hash table flavour.
6390 (ppc64_elf_next_input_section): Move output_section->owner test to
6391 ppc64elf.em.
6392 (ppc64_elf_set_toc): Rename to ppc64_elf_toc, remove info param
6393 and relocatable test. Return TOCstart and don't set elf_gp.
6394 (ppc64_elf_relocate_section): Correct BRTAKEN/BRNTAKEN branch
6395 offset calculation. Add assert on weak sym branch tweaks.
6396 * elf64-ppc.h (ppc64_elf_set_toc): Delete.
6397 (ppc64_elf_toc): Declare.
6398 (ppc64_elf_next_input_section): Update.
6399
6400 2002-05-01 Alan Modra <amodra@bigpond.net.au>
6401
6402 * syms.c (_bfd_stab_section_find_nearest_line): Don't bomb on NULL
6403 file_name.
6404
6405 2002-05-01 Alan Modra <amodra@bigpond.net.au>
6406
6407 * elf64-ppc.c (CROR_151515, CROR_313131): Define.
6408 (ppc64_elf_relocate_section): Use them. Don't look for plt calls
6409 on R_PPC64_ADDR24 relocs. Require a nop or no link reg on plt
6410 call branches. Correct undefined weak destination.
6411 (ppc64_elf_func_desc_adjust): Always create at least one blr in
6412 .sfpr, and correct case where either only savef* or restf* is
6413 needed.
6414
6415 Long branch stubs, multiple stub sections.
6416 * elf64-ppc.h (ppc64_elf_setup_section_lists): Declare.
6417 (ppc64_elf_next_input_section): Declare.
6418 * elf64-ppc.c: Move linker-only prototypes.
6419 (STUB_SUFFIX): Define.
6420 (enum ppc_stub_type): New.
6421 (struct ppc_stub_hash_entry): New.
6422 (struct ppc_branch_hash_entry): New.
6423 (struct ppc_link_hash_entry): Add stub_cache, oh.
6424 (struct ppc_link_hash_table): Add stub_hash_table etc. Remove
6425 sstub. Add sbrlt, srelbrlt, has_14bit_branch, stub_iteration.
6426 Rename plt_overflow to stub_error.
6427 (ppc_stub_hash_lookup): Define.
6428 (ppc_branch_hash_lookup): Define.
6429 (stub_hash_newfunc): New function.
6430 (branch_hash_newfunc): New function.
6431 (link_hash_newfunc): Init new fields.
6432 (ppc64_elf_link_hash_table_create): Likewise.
6433 (ppc64_elf_link_hash_table_free): New function.
6434 (ppc_stub_name): New function.
6435 (ppc_get_stub_entry): New function.
6436 (ppc_add_stub): New function.
6437 (create_linkage_sections): Use bfd_make_section_anyway. Create
6438 .branch_lt and .rela.branch_lt sections. Don't create .stub.
6439 (ppc64_elf_check_relocs): Set has_14bit_branch on R_PPC64_REL14*,
6440 and set up for plt call stubs. Link func and func desc syms.
6441 (ppc64_elf_gc_sweep_hook): Handle REL14* as per REL24.
6442 (func_desc_adjust): Avoid hash lookup when func desc sym available
6443 via shortcut, and set links when processing.
6444 (ppc64_elf_hide_symbol): Likewise.
6445 (allocate_dynrelocs): Don't allocate stub section here.
6446 (ppc64_elf_size_dynamic_sections): Handle sbrlt and srelbrlt.
6447 Remove sstub code.
6448 (ppc_type_of_stub): New function.
6449 (build_one_stub): Delete.
6450 (ppc_build_one_stub): New function.
6451 (ppc_size_one_stub): New function.
6452 (ppc64_elf_setup_section_lists): New function.
6453 (ppc64_elf_next_input_section): New function.
6454 (group_sections): New function.
6455 (get_local_syms): New function.
6456 (ppc64_elf_size_stubs): Rewrite.
6457 (ppc64_elf_build_stubs): Rewrite.
6458 (ppc64_elf_relocate_section): Look up stub entry for REL24
6459 relocs. Don't propagate REL14* to dynamic objects. Look for long
6460 branch stubs if REL14* or REL24 relocs won't reach.
6461 (bfd_elf64_bfd_link_hash_table_free): Define.
6462
6463 2002-04-30 Mark Mitchell <mark@codesourcery.com>
6464
6465 * config.bfd: Add support for powerpc-*-windiss.
6466
6467 2002-04-30 Tom Rix <trix@redhat.com>
6468
6469 * xcofflink.c (xcoff_link_add_symbols): Always copy undef C_EXT
6470 symbol names into the hash table.
6471
6472 2002-04-28 Tom Rix <trix@redhat.com>
6473
6474 * coff-rs6000.c (xcoff_calculate_relocation) : Function table for
6475 calulating relocations.
6476 (xcoff_complain_overflow) : Function table for relocation errors.
6477 (xcoff_ppc_relocate_section): Use relocation and complain function
6478 tables.
6479 (xcoff_complain_overflow_unsigned_func): New complain function.
6480 (xcoff_complain_overflow_signed_func): Same.
6481 (xcoff_complain_overflow_bitfield_func): Same.
6482 (xcoff_complain_overflow_dont_func): Same.
6483 (xcoff_reloc_type_crel): New recot function.
6484 (xcoff_reloc_type_br): Same.
6485 (xcoff_reloc_type_ba): Same.
6486 (xcoff_reloc_type_toc): Same.
6487 (xcoff_reloc_type_rel): Same.
6488 (xcoff_reloc_type_neg): Same.
6489 (xcoff_reloc_type_pos): Same.
6490 (xcoff_reloc_type_fail): Same.
6491 (xcoff_reloc_type_noop): Same.
6492 * libxcoff.h : Declare common parts for xcoff64.
6493 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Use relocation
6494 and complain function tables.
6495
6496 2002-04-28 Alan Modra <amodra@bigpond.net.au>
6497
6498 * elf64-x86-64.c (struct elf64_x86_64_dyn_relocs): Comment typo.
6499 * elf32-hppa.c (elf32_hppa_final_link): Formatting.
6500
6501 2002-04-26 Alan Modra <amodra@bigpond.net.au>
6502
6503 * opncls.c (bfd_make_readable): Call bfd_section_list_clear.
6504 * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
6505
6506 * elflink.h (elf_bfd_final_link): Ensure input bfd class is the
6507 same as the output before calling elf_link_input_bfd.
6508
6509 * coffcode.h (coff_compute_section_file_positions): Set
6510 section_tail after shuffling section list.
6511
6512 2002-04-24 Christian Groessler <chris@groessler.org>
6513
6514 * coff-z8k.c (extra_case): Fix R_IMM32 relocations: The
6515 addresses are 23bit with a special layout, not plain 32bit
6516 values. Prevent relocation of immediate values.
6517
6518 2002-04-24 Chris G. Demetriou <cgd@broadcom.com>
6519
6520 * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): If MDMX or
6521 MIPS-16 ASE flags are set, print something to indicate that.
6522
6523 2002-04-23 Alan Modra <amodra@bigpond.net.au>
6524
6525 * elf32-hppa.c (hppa_type_of_stub): Correct and simplify condition
6526 under which a plt call stub is used.
6527 (final_link_relocate): Similarly.
6528 (allocate_plt_static): Clear h-plabel except when plt entry is
6529 exclusively used for a plabel.
6530 (allocate_dynrelocs): Use the above to simplify plt sizing.
6531 (struct elf32_hppa_link_hash_table): Add has_22bit_branch.
6532 (elf32_hppa_link_hash_table_create): Init.
6533 (BL22_RP): Define.
6534 (hppa_build_one_stub): Use BL22_RP if has_22bit_branch.
6535 (elf32_hppa_check_relocs): Set has_22bit_branch.
6536
6537 * elf32-hppa.c (elf32_hppa_check_relocs): Remove debug message.
6538 (final_link_relocate): Likewise.
6539
6540 2002-04-22 Jakub Jelinek <jakub@redhat.com>
6541
6542 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't build
6543 search table if some FDE is DW_EH_PE_aligned encoded either.
6544 (_bfd_elf_write_section_eh_frame): Handle terminating FDE specially.
6545
6546 2002-04-22 Richard Smith <richard@ex-parrot.com>
6547 Jakub Jelinek <jakub@redhat.com>
6548
6549 * elf-eh-frame.c (struct eh_cie_fde): Add per_encoding_relative.
6550 (_bfd_elf_discard_section_eh_frame): Set it for CIEs with pcrel
6551 encoded personality.
6552 (_bfd_elf_write_section_eh_frame): Adjust pcrel encoded personality
6553 for CIE/FDE removal.
6554
6555 2002-04-20 Tom Rix <trix@redhat.com>
6556
6557 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Fix C_FILE auxent.
6558
6559 2002-04-20 Alan Modra <amodra@bigpond.net.au>
6560
6561 * archures.c (bfd_lookup_arch): Move the list order comment..
6562 (struct bfd_arch_info): ..to where it belongs.
6563 * bfd-in2.h: Regenerate.
6564
6565 * archures.c (bfd_lookup_arch): Add comment on list order.
6566 (bfd_default_set_arch_mach): Use bfd_lookup_arch.
6567 * cpu-powerpc.c (bfd_powerpc_archs): Re-order so that the default
6568 is always at head of list.
6569
6570 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
6571
6572 * coff-arm.c (coff_thumb_pcrel_12, coff_thumb_pcrel_9,
6573 insert_thumb_branch, record_thumb_to_arm_glue): Suppress
6574 definition of these functions for ARM_WINCE builds as they are
6575 not used.
6576 (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET): Do not define
6577 for ARM_WINCE builds.
6578
6579 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
6580
6581 * coff-arm.c (bfd_arm_process_before_allocation):
6582
6583 2002-04-17 J"orn Rennecke <joern.rennecke@superh.com>
6584
6585 * cpu-sh.c (scan_mach): Delete.
6586 (arch_info_struct): Replace scan_mach with bfd_default_scan.
6587 (bfd_sh_arch): Likewise.
6588
6589 2002-04-16 Nick Clifton <nickc@cambridge.redhat.com>
6590
6591 * ihex.c (ihex_write_object_contents): Fix check for records
6592 crossing 64K boundaries.
6593
6594 2002-04-16 Alan Modra <amodra@bigpond.net.au>
6595
6596 * elf32-m32r.c (m32r_elf_add_symbol_hook): Check the hash table
6597 type rather than just assuming entries are ELF.
6598 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
6599 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
6600 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Likewise.
6601 * elf64-mmix.c (mmix_elf_add_symbol_hook): Use bfd_link_hash_entry
6602 rather than elf_link_hash_entry.
6603
6604 2002-04-15 Richard Henderson <rth@redhat.com>
6605
6606 * elf32-mips.c (mips_elf32_object_p): Revert 0404 fragment: allow
6607 n32 binaries.
6608
6609 2002-04-15 Michael Snyder <msnyder@redhat.com>
6610
6611 * opncls.c (bfd_close): Write contents if writeable.
6612 Minor formatting tidy-ups.
6613
6614 2002-04-15 Alan Modra <amodra@bigpond.net.au>
6615
6616 * elf32-ppc.c (ppc_elf_add_symbol_hook): Check the hash table type.
6617
6618 2002-04-12 Michael Snyder <msnyder@redhat.com>
6619
6620 * bfd-in.h (bfd_get_section_lma): New access macro.
6621 Minor white-space fix-up.
6622
6623 2002-04-12 Alan Modra <amodra@bigpond.net.au>
6624
6625 * elf.c (prep_headers): Don't zero EI_OSABI, EI_ABIVERSION or
6626 header pad.
6627
6628 2002-04-09 DJ Delorie <dj@redhat.com>
6629
6630 * elfarm-nabi.c (elf32_arm_howto_table): Fix ABS16 masks.
6631
6632 2002-04-09 Casper S. Hornstrup <chorns@users.sourceforge.net>
6633
6634 * coffcode.h (coff_read_word): New.
6635 (coff_compute_checksum): New.
6636 (coff_apply_checksum): New.
6637 (coff_write_object_contents): Call coff_apply_checksum () to
6638 apply checksum to PE image.
6639
6640 2002-04-08 Randolph Chung <tausq@debian.org>
6641
6642 * elf32-hppa.c (hppa_unwind_entry_compare): Move to elf-hppa.h.
6643 (elf32_hppa_final_link): Split out sorting logic to..
6644 * elf-hppa.h (elf_hppa_sort_unwind): ..here.
6645 (elf_hppa_final_link): Call elf_hppa_sort_unwind.
6646
6647 2002-04-07 Andrew Cagney <ac131313@redhat.com>
6648
6649 * configure.in: Add missing ``|'' to powerpc-*-aix4.[4-9]*
6650 pattern.
6651 * configure: Re-generate.
6652
6653 2002-04-07 Andrew Cagney <ac131313@redhat.com>
6654
6655 * configure.in: Only define AIX_CORE_DUMPX_CORE when AIX version
6656 is greater or equal to 4.3.3.
6657 * configure: Regenerate.
6658 Fix PR gdb/344.
6659
6660 2002-04-05 Hans-Peter Nilsson <hp@axis.com>
6661
6662 * elf32-cris.c (cris_elf_howto_table) <R_CRIS_16_PCREL,
6663 R_CRIS_32_PCREL>: Fix typo in name.
6664 (cris_elf_check_relocs): Always create .rela.got here when
6665 R_CRIS_16_GOTPLT or R_CRIS_32_GOTPLT is seen.
6666 (elf_cris_adjust_gotplt_to_got): Don't create .rela.got here;
6667 assume it's created.
6668
6669 2002-04-04 Daniel Jacobowitz <drow@mvista.com>
6670
6671 * aout-adobe.c (aout_32_bfd_link_hash_table_free): Define.
6672 * aout-target.h (MY_bfd_link_hash_table_free): Conditionally
6673 define.
6674 * aout-tic30.c (MY_bfd_link_hash_table_free): Likewise.
6675 * bfd.c (bfd_link_hash_table_free): Define.
6676 * binary.c (binary_bfd_link_hash_table_free): Define.
6677 * bout.c (b_out_bfd_link_hash_table_free): Define.
6678 * coff-rs6000.c (rs6000coff_vec): Include
6679 _bfd_generic_link_hash_table_free.
6680 (pmac_xcoff_vec): Likewise.
6681 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
6682 (aix5coff64_vec): Likewise.
6683 * coffcode.h (coff_bfd_link_hash_table_free): Conditionally define.
6684 * elf-m10300.c (elf32_mn10300_link_hash_table_free): New function.
6685 (bfd_elf32_bfd_link_hash_table_free): Define.
6686 * elf32-hppa.c (elf32_hppa_link_hash_table_free): New function.
6687 (bfd_elf32_bfd_link_hash_table_free): Define.
6688 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Conditionally
6689 define.
6690 * i386msdos.c (msdos_bfd_link_hash_table_free): Define.
6691 * i386os9k.c (os9k_bfd_link_hash_table_free): Define.
6692 * ieee.c (ieee_bfd_link_hash_table_free): Define.
6693 * ihex.c (ihex_bfd_link_hash_table_free): Define.
6694 * libbfd-in.h (_bfd_nolink_bfd_link_hash_table_free): Define.
6695 (_bfd_generic_link_hash_table_free): Add prototype.
6696 * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Add prototype.
6697 * libecoff.h (_bfd_ecoff_bfd_link_hash_table_free): Define.
6698 * linker.c (_bfd_generic_link_hash_table_free): New function.
6699 * mmo.c (mmo_bfd_link_hash_table_free): Define.
6700 * nlm-target.h (nlm_bfd_link_hash_table_free): Define.
6701 * oasys.c (oasys_bfd_link_hash_table_free): Define.
6702 * ppcboot.c (ppcboot_bfd_link_hash_table_free): Define.
6703 * som.c (som_bfd_link_hash_table_free): Define.
6704 * srec.c (srec_bfd_link_hash_table_free): Define.
6705 * tekhex.c (tekhex_bfd_link_hash_table_free): Define.
6706 * versados.c (versados_bfd_link_hash_table_free): Define.
6707 * vms.c (vms_bfd_link_hash_table_free): New function.
6708 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_free): New function.
6709
6710 * coff-arm.c (coff_arm_link_hash_table_create): Use bfd_malloc
6711 instead of bfd_alloc.
6712 * coff-h8300.c (h8300_coff_link_hash_table_create): Likewise.
6713 * coff-mcore.c (coff_mcore_link_hash_table_create): Likewise.
6714 * coff-ppc.c (ppc_coff_link_hash_table_create): Likewise.
6715 * cofflink.c (_bfd_coff_link_hash_table_create): Likewise.
6716 * ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
6717 * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise.
6718 * elf.c (_bfd_elf_link_hash_table_create): Likewise.
6719 * elf32-arm.h (elf32_arm_link_hash_table_create): Likewise.
6720 * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
6721 * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise.
6722 * elf32-i386.c (elf_i386_link_hash_table_create): Likewise.
6723 * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
6724 * elf32-s390.c (elf_s390_link_hash_table_create): Likewise.
6725 * elf32-sh.c (sh_elf_link_hash_table_create): Likewise.
6726 * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create): Likewise.
6727 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
6728 * elf64-s390.c (elf_s390_link_hash_table_create): Likewise.
6729 * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise.
6730 * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create): Likewise.
6731 * elf64-x86-64.c (elf64_x86_64_link_hash_table_create): Likewise.
6732 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
6733 * linker.c (_bfd_generic_link_hash_table_create): Likewise.
6734 * m68klinux.c (linux_link_hash_table_create): Likewise.
6735 * sparclinux.c (linux_link_hash_table_create): Likewise.
6736 * sunos.c (sunos_link_hash_table_create): Likewise.
6737 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise.
6738
6739 * targets.c: Add _bfd_link_hash_table_free to xvec.
6740
6741 * bfd-in2.h: Regenerate.
6742 * libbfd.h: Regenerate.
6743 * libcoff.h: Regenerate.
6744
6745 2002-04-04 Alan Modra <amodra@bigpond.net.au>
6746
6747 * dep-in.sed: Cope with absolute paths.
6748 * Makefile.am (dep.sed): Subst TOPDIR, and not INCDIR.
6749 Run "make dep-am".
6750 * Makefile.in: Regenerate.
6751 * coff-arm.c: Fix copyright date.
6752 * cpu-h8300.c: Likewise.
6753 * cpu-i370.c: Likewise.
6754 * cpu-s390.c: Likewise.
6755 * cpu-mips.c: Likewise.
6756 * po/SRC-POTFILES.in: Regenerate.
6757
6758 2002-04-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6759
6760 * Makefile.am: Add elfxx-mips.c to the known backends.
6761 (elf32-mips.lo): remove dependency to coff/external.h.
6762 * Makefile.in: Regenerate.
6763 * configure.in: Add elfxx-mips.lo to all vectors using elf32-mips.lo
6764 Remove elf32-mips.lo from 64 bit vectors. Update dependencies
6765 accordingly.
6766 * configure: Regenerate.
6767 * elf-bfd.h: Move all MIPS ELF specific prototypes to elfxx-mips.h.
6768 (irix_compat_t): IRIX compatibility level, moved from elf32-mips.c.
6769 (elf_backend_mips_irix_compat, elf_backend_mips_rtype_to_howto): New
6770 MIPS specific backend functions.
6771 * elf32-mips.c: Moved most code to elfxx-mips.c.
6772 (mips_elf_hi16_reloc): Rename from _bfd_mips_elf_hi16_reloc and make
6773 static.
6774 (mips_elf_lo16_reloc): Likewise, was _bfd_mips_elf_lo16_reloc.
6775 (mips_elf_got16_reloc): Likewise, was _bfd_mips_elf_got16_reloc.
6776 (mips_elf_gprel32_reloc): Likewise, was _bfd_mips_elf_gprel32_reloc.
6777 (mips_elf32_rtype_to_howto): Rename from mips_rtype_to_howto. Changed
6778 interface to allow selection of the right REL or RELA howto table.
6779 (mips_elf32_object_p): Rename from _bfd_mips_elf_object_p and made
6780 static. Let it refuse n32 objects.
6781 (elf32_mips_grok_prstatus): Rename from _bfd_elf32_mips_grok_prstatus.
6782 (elf32_mips_grok_psinfo): Rename from _bfd_elf32_mips_grok_psinfo.
6783 (elf32_mips_discard_info): Rename from _bfd_elf32_mips_discard_info.
6784 (elf32_mips_ignore_discarded_relocs): Rename from
6785 _bfd_elf32_mips_ignore_discarded_relocs.
6786 (elf32_mips_write_section): Rename from _bfd_elf32_mips_write_section.
6787 (elf32_mips_irix_compat): New function, replaces IRIX_COMPAT.
6788 (elf_mips_howto_table_rela): Remove.
6789 * elf64-mips.c: Moved most code to elfxx-mips.c.
6790 (bfd_elf64_bfd_reloc_type_lookup): Make static.
6791 (mips_elf64_rtype_to_howto): New function.
6792 (mips_elf64_object_p): Likewise.
6793 (elf64_mips_irix_compat): Likewise.
6794 * elfxx-mips.c: New file containing common code merged together from
6795 elf32-mips.c and elf64-mips.c.
6796 * elfxx-mips.h: New file containing MIPS specific prototypes from
6797 elf-bfd.h.
6798 * elfxx-target.h: Add handling for elf_backend_mips_irix_compat and
6799 elf_backend_mips_rtype_to_howto.
6800
6801 2002-04-04 Alan Modra <amodra@bigpond.net.au>
6802
6803 * srec.c (MAXCHUNK, Chunk): Revise comments.
6804 (srec_write_record): Correct buffer size.
6805 (srec_write_header): Do without intermediate buffer.
6806 (srec_write_section): Validate Chunk.
6807 (srec_write_terminator): Pass NULL instead of dummy buffer.
6808 (srec_write_symbols): Pass file and symbol names directly to
6809 bfd_bwrite so sprintf won't overflow buffer.
6810
6811 2002-04-03 Jakub Jelinek <jakub@redhat.com>
6812
6813 * elf32-sparc.c (elf32_sparc_relocate_section): Don't emit dynamic
6814 PC relative relocs against hidden symbols.
6815 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
6816
6817 2002-04-03 Alan Modra <amodra@bigpond.net.au>
6818
6819 * elf.c (_bfd_elf_make_section_from_shdr): When setting section
6820 LMAs, loop over segments until p_vaddr and p_memsz specify an
6821 extent enclosing the section.
6822
6823 2002-04-02 Nick Clifton <nickc@cambridge.redhat.com>
6824
6825 * ihex.c (ihex_write_object_contents): Do not allow records to
6826 cross a 64K boundary - wrap if necessary.
6827
6828 2002-04-01 Nathan Williams <nathanw@wasabisystems.com>
6829
6830 * elf.c (elfcore_netbsd_get_lwpid): Fix off-by-one error
6831 which caused the returned LWP ID to always be 0.
6832
6833 2002-04-01 Richard Henderson <rth@redhat.com>
6834
6835 * elf32-sparc.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
6836 (elf32_sparc_relocate_section): Use it to figure out when to
6837 initialize .got entries.
6838 * elf64-sparc.c: Similarly.
6839
6840 2002-03-28 Alan Modra <amodra@bigpond.net.au>
6841
6842 * linker.c (link_action): Ignore duplicate warning syms.
6843 (_bfd_generic_link_write_global_symbol): Follow warning symbol link.
6844 * elflink.h (elf_adjust_dynstr_offsets): Likewise.
6845 (elf_adjust_dynamic_symbol): Likewise.
6846 (elf_export_symbol): Likewise.
6847 (elf_link_find_version_dependencies): Likewise.
6848 (elf_link_assign_sym_version): Likewise.
6849 (elf_link_sec_merge_syms): Likewise.
6850 (elf_link_output_extsym): Likewise.
6851 (elf_gc_sweep_symbol): Likewise.
6852 (elf_gc_propagate_vtable_entries_used): Likewise.
6853 (elf_gc_smash_unused_vtentry_relocs): Likewise.
6854 (elf_gc_allocate_got_offsets): Likewise.
6855 (elf_collect_hash_codes): Likewise.
6856 * elflink.c (elf_link_renumber_hash_table_dynsyms): Likewise.
6857 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
6858 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
6859 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
6860 * elf32-arm.h (elf32_arm_discard_copies): Likewise.
6861 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Likewise.
6862 (elf_cris_discard_excess_dso_dynamics): Likewise.
6863 * elf32-hppa.c (clobber_millicode_symbols): Likewise.
6864 (mark_PIC_calls): Likewise.
6865 (allocate_plt_static): Likewise.
6866 (allocate_dynrelocs): Likewise.
6867 (readonly_dynrelocs): Likewise.
6868 * elf32-i386.c (allocate_dynrelocs): Likewise.
6869 (readonly_dynrelocs): Likewise.
6870 * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
6871 * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
6872 * elf32-mips.c (mips_elf_output_extsym): Likewise.
6873 (mips_elf_sort_hash_table_f): Likewise.
6874 (mips_elf_check_mips16_stubs): Likewise.
6875 * elf32-s390.c (allocate_dynrelocs): Likewise.
6876 (readonly_dynrelocs): Likewise.
6877 * elf32-sh.c (sh_elf_discard_copies): Likewise.
6878 * elf32-xstormy16.c (xstormy16_relax_plt_check): Likewise.
6879 (xstormy16_relax_plt_realloc): Likewise.
6880 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
6881 (elf64_alpha_output_extsym): Likewise.
6882 * elf64-hppa.c (elf64_hppa_mark_exported_functions): Likewise.
6883 * elf64-mips.c (mips_elf64_sort_hash_table_f): Likewise.
6884 (mips_elf64_check_mips16_stubs): Likewise.
6885 (mips_elf64_output_extsym): Likewise.
6886 * elf64-ppc.c (func_desc_adjust): Likewise.
6887 (allocate_dynrelocs): Likewise.
6888 (readonly_dynrelocs): Likewise.
6889 * elf64-s390.c (allocate_dynrelocs): Likewise.
6890 (readonly_dynrelocs): Likewise.
6891 * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
6892 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
6893 (readonly_dynrelocs): Likewise.
6894 * elfxx-ia64.c (elfNN_ia64_global_dyn_sym_thunk): Likewise.
6895 * aoutx.h (aout_link_write_other_symbol): Likewise.
6896 * cofflink.c (_bfd_coff_write_task_globals): Likewise.
6897 (_bfd_coff_write_global_sym): Likewise.
6898 * i386linux.c (linux_tally_symbols): Likewise.
6899 * m68klinux.c (linux_tally_symbols): Likewise.
6900 * sparclinux.c (linux_tally_symbols): Likewise.
6901 * pdp11.c (aout_link_write_other_symbol): Likewise.
6902 * sunos.c (sunos_scan_dynamic_symbol): Likewise.
6903 * xcofflink.c (xcoff_build_ldsyms): Likewise.
6904 (xcoff_write_global_symbol): Likewise.
6905
6906 * cofflink.c (_bfd_coff_final_link): Formatting.
6907 * cpu-mips.c (mips_compatible): Make static, prototype.
6908 * elf32-i386.c (elf_i386_check_relocs): Formatting.
6909 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
6910 * elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
6911 * elf64-mips.c (mips_elf64_sort_hash_table): Likewise.
6912 (mips_elf64_final_link): Likewise.
6913 * elflink.h (elf_link_find_version_dependencies): Remove duplicate
6914 prototype.
6915
6916 2002-03-27 Nick Clifton <nickc@cambridge.redhat.com>
6917
6918 * coff-arm.c (SWAP_IN_RELOC_OFFSET): Define.
6919 (SWAP_OUT_RELOC_OFFSET): Define.
6920
6921 2002-03-27 Gregory Steuck <greg@nest.cx>
6922
6923 * elf.c (_bfd_elf_get_symtab_upper_bound): Leave space for
6924 terminating NULL if empty symbol table.
6925 (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise.
6926
6927 2002-03-26 H.J. Lu (hjl@gnu.org)
6928
6929 * elflink.h (elf_link_input_bfd): Revert the last change since
6930 the gcc exception handling isn't fixed yet.
6931
6932 2002-03-26 H.J. Lu (hjl@gnu.org)
6933
6934 * elflink.h (elf_link_input_bfd): Complain about relocations
6935 against local symbols in discarded sections.
6936
6937 2002-03-26 Alan Modra <amodra@bigpond.net.au>
6938
6939 * elflink.h (elf_gc_mark): Don't recurse into non-ELF sections.
6940
6941 2002-03-23 Alan Modra <amodra@bigpond.net.au>
6942
6943 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
6944 section file offset for !SEC_LOAD sections.
6945
6946 2002-03-21 Richard Earnshaw <rearnsha@arm.com>
6947
6948 * elf32-arm.h (elf32_arm_final_link_relocate <case R_ARM_GOTOFF>,
6949 <case R_ARM_GOT>): Handle relocations to Thumb functions.
6950
6951 2002-03-21 Alan Modra <amodra@bigpond.net.au>
6952
6953 * coff64-rs6000.c (_bfd_xcoff64_put_symbol_name): Prototype.
6954 Whitespace changes.
6955 * archive.c: Update copyright date.
6956 * bfd-in2.h: Regenerate.
6957 * libbfd.h: Regenerate.
6958 * Makefile.am: Run "make dep-am"
6959 * Makefile.in: Regenerate.
6960 * po/SRC-POTFILES.in: Regenerate.
6961
6962 2002-03-20 Daniel Jacobowitz <drow@mvista.com>
6963
6964 * dwarf2.c (struct funcinfo): Move up.
6965 (lookup_address_in_function_table): New argument function_ptr.
6966 Set it.
6967 (lookup_address_in_line_table): New argument function. If function
6968 is non-NULL, use it to handle ``addr'' before the first line note of
6969 the function.
6970 (comp_unit_find_nearest_line): Update and swap calls to
6971 lookup_address_in_function_table and lookup_address_in_line_table.
6972 * syms.c (_bfd_stab_section_find_nearest_line): Use the first
6973 N_SLINE encountered if we see an N_FUN before any N_SLINE.
6974
6975 2002-03-20 Tom Rix <trix@redhat.com>
6976
6977 * coff-rs6000.c (_bfd_xcoff_stat_arch_elt): Renamed from
6978 _bfd_xcoff_generic_stat_arch_elt. Fix format check.
6979 * coff64-rs6000.c : Use _bfd_xcoff_stat_arch_elt.
6980
6981 2002-03-19 Tom Rix <trix@redhat.com>
6982
6983 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through all
6984 dynamic objects in archives.
6985
6986 2002-03-19 Hans-Peter Nilsson <hp@bitrange.com>
6987
6988 * elflink.h (NAME(bfd_elf,record_link_assignment)): Don't set
6989 STT_NOTYPE symbols to STT_OBJECT.
6990
6991 2002-03-18 Jan Hubicka <jh@suse.cz>
6992
6993 * cpu-i386.c (bfd_x86_64_arch): Rename to "i386:x86-64"
6994
6995 2002-03-18 Tom Rix <trix@redhat.com>
6996
6997 * aix5ppc.core.c : New file for AIX 5 64 bit core support.
6998 * bfd-in.h : Add bfd_xcoff_ar_archive_set_magic declaration.
6999 * coff-rs6000 (do_pad) : New function for archive padding.
7000 (do_copy) : New function for object file copying in archives.
7001 (do_shared_object_padding) : New function for padding shared
7002 objects to their text section alignment in archives.
7003 (bfd_xcoff_ar_achive_set_magic) : Stub.
7004 (xcoff_write_armap_big) : Use do_copy and do_pad.
7005 (xcoff_write_archive_contents_big) : Use do_shared_object_padding,
7006 do_copy and do_pad.
7007 * coff64-rs6000.c (xcoff64_write_ojbect_contents) : Use
7008 bfd_xcoff_magic_number.
7009 (xcoff64_bad_format_hook) : New function for _bfd_bad_format_hook
7010 fop.
7011 (xcoff_backend_data_r) : Use xcoff64_bad_format_hook.
7012 (bfd_xcoff_aix5_backend_data) : New Aix 5 backend data.
7013 (aix5coff64_vec) : New Aix 5 target aix5coff64-rs6000.
7014 * rs6000-core.c : Update copyright date.
7015 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Check for NULL
7016 csectpp.
7017 * coffcode.h (coff_new_section_hook) : Use new accessor macros.
7018 (coff_set_arch_mach_hook) : Add Aix 5 U64_TOCMAGIC magic #.
7019 (coff_set_flags) : Use bfd_xcoff_magic_number.
7020 * libxcoff.h (bfd_xcoff_is_xcoff64): Add U64_TOCMAGIC.
7021 * configure.in : Add powerpc-*-aix5 and rs6000-*-aix5 support.
7022 * Makefile.am : Same.
7023 * config.bfd : Same.
7024 * targets.c : Same.
7025 * configure : Regnerate.
7026 * Makefile.in : Same.
7027 * bfd-in2.h : Same.
7028
7029 2002-03-18 Nick Clifton <nickc@cambridge.redhat.com>
7030
7031 * po/fr.po: Updated version.
7032
7033 2002-03-18 Alan Modra <amodra@bigpond.net.au>
7034
7035 * libbfd.c (bfd_write_bigendian_4byte_int): Return true iff success.
7036 * libbfd.h: Regenerate.
7037 * archive.c (coff_write_armap): Pass on failures from
7038 bfd_write_bigendian_4byte_int.
7039
7040 2002-03-14 H.J. Lu <hjl@gnu.org>
7041
7042 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the BFD
7043 error to bfd_error_nonrepresentable_section for reinit_array
7044 section in DSO.
7045
7046 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
7047
7048 * coffcode.h (coff_slurp_symbol_table): When adding BSF_WEAK flag,
7049 OR it in rather than replacing previously selected flags.
7050
7051 * elfxx-target.h (TARGET_BIG_SYM): Set ar_max_namelen to 15.
7052 (TARGET_LITTLE_SYM): Set ar_max_namelen to 15.
7053
7054 2002-03-14 Alan Modra <amodra@bigpond.net.au>
7055
7056 * cpu-mips.c (mips_compatible): New. Don't check bits_per_word.
7057 (N): Use the above.
7058 * elflink.h (elf_bfd_final_link): Revert last change. Instead,
7059 ensure reloc size matches before calling elf_link_input_bfd.
7060 Add an assert to check reloc size when counting output relocs.
7061
7062 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
7063
7064 * mmo.c (mmo_get_loc): Return NULL rather than false.
7065
7066 2002-03-13 Nick Clifton <nickc@cambridge.redhat.com>
7067
7068 * po/fr.po: Updated version.
7069
7070 2002-03-13 Alan Modra <amodra@bigpond.net.au>
7071
7072 * archures.c (bfd_default_compatible): Test bits_per_word.
7073 * cpu-i386.c (i386_compatible): Remove. Replace occurrences with
7074 bfd_default_compatible.
7075 * cpu-i370.c (i370_compatible): Likewise.
7076 * cpu-sparc.c (sparc_compatible): Likewise.
7077 * cpu-h8300.c (compatible): Test in->arch == out->arch.
7078
7079 * elflink.h: Formatting fixes.
7080 (elf_link_output_extsym): Merge undefined and undef weak cases.
7081
7082 * elflink.h (elf_bfd_final_link): Only call elf_link_input_bfd
7083 when word size of input matches output word size.
7084
7085 2002-03-12 Andreas Jaeger <aj@suse.de>
7086
7087 * cpu-i386.c (i386_compatible): New. Use it instead of
7088 bfd_default_compatible.
7089
7090 2002-03-07 H.J. Lu (hjl@gnu.org)
7091
7092 * coff-sh.c (shcoff_reloc_map): Use bfd_reloc_code_real_type
7093 as the type for bfd_reloc_val.
7094
7095 2002-03-05 John David Anglin <dave@hiauly1.hia.nrc.ca>
7096
7097 * elf-hppa.h (elf_hppa_is_dynamic_loader_symbol): New function.
7098 (elf_hppa_relocate_section): Ignore undefined dynamic loader symbols.
7099 (elf_hppa_final_link_relocate): Correct relocations for indirect
7100 references to local data through the DLT. Fix .opd creation for
7101 local symbols using R_PARISC_LTOFF_FPTR32 and R_PARISC_FPTR64
7102 relocations. Use e_lsel selector for R_PARISC_DLTIND21L,
7103 R_PARISC_LTOFF_FPTR21L and R_PARISC_LTOFF_TP21L as per
7104 "Processor-Specific ELF for PA_RISC, Version 1.43" document.
7105 Similarly, use e_rsel for DLT and LTOFF 'R' relocations.
7106 * elf32-hppa.c (final_link_relocate): Revise relocation selectors
7107 as per "Processor-Specific ELF for PA_RISC, Version 1.43" document.
7108
7109 2002-03-05 Jakub Jelinek <jakub@redhat.com>
7110
7111 * merge.c (_bfd_merge_sections): Don't segfault if there
7112 is nothing to merge due to GC.
7113
7114 2002-03-05 Alan Modra <amodra@bigpond.net.au>
7115
7116 * elf32-hppa.c (clobber_millicode_symbols): Remove hack to keep
7117 symbols that have been forced local.
7118
7119 * elflink.h (elf_bfd_final_link): Call elf_link_output_extsym
7120 to output forced local syms for non-shared link.
7121 (elf_link_output_extsym): Tweak condition for calling backend
7122 adjust_dynamic_symbol so that previous behaviour is kept.
7123 Whitespace changes throughout file.
7124
7125 2002-03-04 H.J. Lu <hjl@gnu.org>
7126
7127 * elf.c (bfd_section_from_shdr): Handle special sections,
7128 .init_array, .fini_array and .preinit_array.
7129 (elf_fake_sections): Likewise.
7130
7131 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Create the
7132 DT entry only if the section is in output for .init_array,
7133 .fini_array and .preinit_array. Complain about .preinit_array
7134 section in DSO.
7135 (elf_bfd_final_link): Warn zero size for .init_array,
7136 .fini_array and .preinit_array sections.
7137
7138 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Remove
7139 SHT_INIT_ARRAY, SHT_FINI_ARRAY and SHT_PREINIT_ARRAY.
7140 (elfNN_ia64_fake_sections): Remove .init_array, .fini_array and
7141 .preinit_array.
7142
7143 2002-03-04 Alan Modra <amodra@bigpond.net.au>
7144
7145 * configure.in (WIN32LIBADD): Don't eval PICFLAG assignment.
7146 * configure: Regenerate.
7147
7148 2002-03-02 Tom Rix <trix@redhat.com>
7149
7150 * coff64-rs6000.c (xcoff64_howto_table): Replace howto types with
7151 symbolic equiv.
7152 * coff-rs6000.c (xcoff_howto_table): Same.
7153
7154 2002-03-01 David Mosberger <davidm@hpl.hp.com>
7155
7156 * elflink.h (size_dynamic_sections): If section named
7157 ".preinit_array" exists, create DT_PREINIT_ARRAY and
7158 DT_PREINIT_ARRAYSZ entries in dynamic table. Analogously for
7159 ".init_array" and ".fini_array".
7160 (elf_bfd_final_link): Handle DT_PREINIT_ARRAYSZ, DT_INIT_ARRAYSZ,
7161 DT_FINI_ARRAYSZ, DT_PREINIT_ARRAY, DT_INIT_ARRAY, and
7162 DT_FINI_ARRAY.
7163
7164 2002-02-26 Andrew Macleod <amacleod@cygnus.com>
7165
7166 * elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local
7167 dynsyms.
7168
7169 2002-02-25 Alan Modra <amodra@bigpond.net.au>
7170
7171 * elf64-hppa.h: Update copyright date.
7172
7173 * elf64-ppc.c (ppc64_elf_check_relocs): Warning fix.
7174 (ppc64_elf_relocate_section): Don't generate power4 style branch
7175 hints for *_BRTAKEN and *_BRNTAKEN relocs.
7176
7177 2002-02-22 Jakub Jelinek <jakub@redhat.com>
7178
7179 * elf64-sh64.c (sh_elf64_relocate_section): Fix a typo from my
7180 last patch.
7181 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
7182
7183 2002-02-21 Andreas Jaeger <aj@suse.de>
7184
7185 * elf64-x86-64.c: Major rework that introduces all recent changes
7186 to the x86-64 backend. Get a closer match to elf32-i386.
7187 (struct elf64_x86_64_dyn_relocs): Rename from
7188 elf64_x86_64_pcrel_relocs_copied, add additional fields. Change
7189 all users.
7190 (struct elf64_x86_64_link_hash_table): Add short cuts to some
7191 sections.
7192 (link_hash_newfunc): Rename from elf64_x86_64_link_hash_newfunc,
7193 remove casts, initialize new hash members.
7194 (create_got_section): New.
7195 (elf64_x86_64_create_dynamic_sections): New.
7196 (elf64_x86_64_copy_indirect_symbol): New.
7197 (elf64_x86_64_check_relocs): Don't allocate space for dynamic
7198 relocs, .got or .relgot here but do it in allocate_dynrelocs.
7199 Reference count possible .plt and .got entries. Don't test input
7200 section SEC_READONLY here to try to avoid copy relocs, and keep
7201 dyn_relocs regardless of ELF_LINK_NON_GOT_REF. Don't set
7202 DF_TEXTREL here. Delay setting of variables until needed. Cache
7203 pointer to "sreloc" section in elf_section_data. Tweak condition
7204 under which .got created. Report files with bad relocation
7205 section names.
7206 (elf64_x86_64_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
7207 Reference count possible .plt entries. Don't deallocate .got and
7208 .relgot space here.
7209 (elf64_x86_64_adjust_dynamic_symbol): Handle nocopyreloc. Don't
7210 do copy reloc processing for weakdefs. Remove redundant casts and
7211 aborts. Delay setting of vars until needed. Move creation of
7212 dynamic symbols and allocation of .plt and .rela.plt to
7213 allocate_dynrelocs. Replace BFD_ASSERT with abort.
7214 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
7215 (allocate_dynrelocs): New.
7216 (readonly_dynrelocs): New.
7217 (elf64_x86_64_size_dynamic_sections): Call readonly_dynrelocs.
7218 Allocate space for dyn relocs. Replace BFD_ASSERT with abort.
7219 Zero out the dynamic allocated content space.
7220 (elf64_x86_64_discard_copies): Removed.
7221 (elf64_x86_64_relocate_section): Make use of dynamic section
7222 short-cuts. Localise vars, and delay setting. Better error
7223 reporting, replace BFD_ASSERT with abort. Check
7224 ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined in the
7225 regular object file and tread the weak definition as the normal
7226 one. Don't discard relocs for undefweak or undefined symbols and
7227 check !DEF_REGULAR as well as DEF_DYNAMIC in test for avoided copy
7228 relocs.
7229 (elf64_x86_64_finish_dynamic_symbol): Don't copy relocs for
7230 symbols that have been forced local. Use same test to decide if
7231 we can use a relative reloc for got as relocate_section. Expand
7232 SHN_UNDEF comment. Move expressions out of function calls.
7233 Replace BFD_ASSERT with abort.
7234 (bfd_elf64_bfd_final_link): Removed.
7235 (elf_backend_copy_indirect_symbol): Define.
7236
7237 2002-02-20 Tom Rix <trix@redhat.com>
7238
7239 * coff-rs6000.c (xcoff_howto_table): Add 16 bit R_BA.
7240 (_bfd_xcoff_reloc_type_lookup): Use it.
7241 * coff64-rs6000.c (xcoff64_howto_table): Same.
7242 (xcoff64_reloc_type_lookup): Same.
7243
7244 2002-02-20 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
7245
7246 * osf-core.c (osf_core_vec): OSF/1 (Digital Unix) core files are
7247 little endian.
7248
7249 2002-02-19 Martin Schwidefsky <schwidefsky@de.ibm.com>
7250
7251 * archures.c (bfd_mach_s390_esa): Rename to bfd_mach_s390_31.
7252 (bfd_mach_s390_esame): Rename to bfd_mach_s390_64.
7253 * bfd-in2.h: Regenerate.
7254 * cpu-s390.c (arch_info_struct): Use renamed architecture defines.
7255 Replace architecture name "s390" with "s390:31-bit" and "s390:esame"
7256 with "s390:64-bit".
7257 * elf32-s390.c (elf_howto_table): Add 32 bit pc relative relocations.
7258 (elf_s390_reloc_type_lookup): Likewise.
7259 (elf_s390_check_relocs): Likewise.
7260 (elf_s390_gc_sweep_hook): Likewise.
7261 (elf_s390_relocate_section): Likewise.
7262 (elf_s390_object_p): Use renamed architecture define.
7263 * elf64-s390.c (elf_s390_object_p): Use renamed architecture define.
7264
7265 2002-02-19 Frank Ch. Eigler <fche@redhat.com>
7266
7267 * syms.c (stt[]): Sorted. Added .init/.fini -> "t" mapping.
7268
7269 2002-02-19 Jakub Jelinek <jakub@redhat.com>
7270
7271 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Enable
7272 absptr -> pcrel optimization for shared libs.
7273 Only create minimal .eh_frame_hdr if absptr FDE encoding in shared
7274 library cannot be converted to pcrel.
7275 (_bfd_elf_eh_frame_section_offset): Return -2 if making absptr
7276 relative.
7277 * elf32-i386.c (elf_i386_relocate_section): If
7278 _bfd_elf_section_offset returned -2, skip, but make sure the
7279 relocation is installed.
7280 * elf32-arm.h (elf32_arm_final_link_relocate): Likewise.
7281 * elf32-cris.c (cris_elf_relocate_section): Likewise.
7282 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
7283 * elf32-i370.c (i370_elf_relocate_section): Likewise.
7284 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
7285 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
7286 * elf32-s390.c (elf_s390_relocate_section): Likewise.
7287 * elf32-sh.c (sh_elf_relocate_section): Likewise.
7288 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
7289 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
7290 * elf64-s390.c (elf_s390_relocate_section): Likewise.
7291 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
7292 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7293 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
7294 * elf64-alpha.c (elf64_alpha_relocate_section): Handle
7295 _bfd_elf_section_offset returning -2 the same way as -1.
7296 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
7297 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add FIXME
7298 and BFD_ASSERT.
7299 * elf64-mips.c (mips_elf64_create_dynamic_relocation): Likewise.
7300
7301 2002-02-18 Tom Rix <trix@redhat.com>
7302
7303 * xcofflink.c (bfd_xcoff_link_gernate_rtinit): Add -brtl support.
7304 (bfd_xcoff_size_dynamic_sections): Same.
7305 * bfd-in.h (bfd_xcoff_link_generate_rtinit): Same.
7306 (bfd_xcoff_size_dynamic_sections): Same.
7307 * coff-rs6000.c (xcoff_generate_rtinit): Same.
7308 * coff-rs646000.c (xcoff64_generate_rtinit): Same.
7309 * libxcoff.h (struct xcoff_backend_data_rec): Same.
7310 * xcofflink.c (xcoff_build_ldsyms, xcoff_link_add_symbols): Clean.
7311 * bfd-in2.h: Regenerate.
7312
7313 2002-02-18 Alan Modra <amodra@bigpond.net.au>
7314
7315 * elf64-ppc.c (STFD_FR0_0R1, LFD_FR0_0R1, BLR): Define.
7316 (struct ppc_link_hash_table): Add sfpr.
7317 (ppc64_elf_link_hash_table_create): Init it.
7318 (ppc64_elf_create_dynamic_sections): Split creation of .stub and
7319 .glink out to..
7320 (create_linkage_sections): ..here. Make .sfpr too.
7321 (ppc64_elf_check_relocs): Call create_linkage_sections, and set
7322 dynobj early.
7323 (MIN_SAVE_FPR, MAX_SAVE_FPR): Define.
7324 (ppc64_elf_func_desc_adjust): Look for missing ._savef* and
7325 ._restf* functions, and create as needed.
7326 (func_desc_adjust): Only force_local for shared libs.
7327
7328 2002-02-18 David O'Brien <obrien@FreeBSD.org>
7329
7330 * configure.in: Bump version number post 2.12 branching.
7331 * configure: Regenerate.
7332
7333 2002-02-17 Hans-Peter Nilsson <hp@bitrange.com>
7334
7335 * mmo.c: Correct and improve comments.
7336 (mmo_write_chunk): Store trailing byte in bfd buffer; don't
7337 zero-pad. Use input to fill up non-empty bfd buffer.
7338 (mmo_flush_chunk): New function.
7339 (mmo_write_loc_chunk): Add parameter last_vmap, all callers
7340 changed. Don't emit location specifier if VMA is same as
7341 *LAST_VMAP after omitting leading zero contents. Call
7342 mmo_flush_chunk before emitting location specifier.
7343 (mmo_write_loc_chunk_list): Call mmo_flush_chunk when finished
7344 with mmo_write_loc_chunk calls.
7345 (mmo_internal_write_section): Call mmo_flush_chunk after
7346 mmo_write_chunk.
7347 (mmo_write_symbols_and_terminator): Move :Main to first position
7348 in symbol array. Add faked one if it does not exist if there are
7349 other symbols. Don't add it if there are no symbols at all. Move
7350 out test for value of :Main from symbol loop. Rename table
7351 fakemain to maintable and variable mainsym to fakemain.
7352
7353 2002-02-15 Richard Henderson <rth@redhat.com>
7354
7355 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: A target
7356 section with no got matches any got. Simplify error generaion.
7357
7358 2002-02-15 Alan Modra <amodra@bigpond.net.au>
7359
7360 Support arbitrary length fill patterns.
7361 * linker.c (bfd_new_link_order): Zero all fields with bfd_zalloc.
7362 (_bfd_default_link_order): Remove bfd_fill_link_order code.
7363 Call default_data_link_order.
7364 (default_fill_link_order): Delete.
7365 (default_data_link_order): New function.
7366 * elf32-mips.c (_bfd_mips_elf_final_link): Replace occurrences
7367 of bfd_fill_link_order with bfd_data_link_order.
7368 * elf64-alpha.c (elf64_alpha_final_link): Likewise.
7369 * elf64-mips.c (mips_elf64_final_link): Likewise.
7370
7371 * bfd.c (bfd_scan_vma): Clamp overflows to max bfd_vma value.
7372 Correct value returned in "end" for "0x<non-hex>".
7373
7374 2002-02-14 Nick Clifton <nickc@cambridge.redhat.com>
7375
7376 * cpu-arm.c (processors): Replace 'arch' field with 'mach'.
7377 (scan): Test against 'mach' field in info structure.
7378
7379 2002-02-14 Alan Modra <amodra@bigpond.net.au>
7380
7381 * elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD.
7382
7383 2002-02-14 Matt Fredette <fredette@netbsd.org>
7384
7385 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize
7386 EF_M68000.
7387
7388 2002-02-13 Nick Clifton <nickc@cambridge.redhat.com>
7389
7390 * elf.c (_bfd_elf_make_section_from_shdr): Do not insist on
7391 non-zero physical addresses when adjusting the LMAs of new
7392 sections.
7393
7394 2002-02-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
7395
7396 * elf-hppa.h (elf_hppa_reloc_final_type): New function stripped
7397 from _bfd_elf_hppa_gen_reloc_type.
7398 (_bfd_elf_hppa_gen_reloc_type): Remove duplicate prototype.
7399 * elf32-hppa.h (elf32_hppa_reloc_final_type): Add protptype.
7400 * elf32-hppa.c: Include elf32-hppa.h before elf-hppa.h.
7401 * elf64-hppa.h (elf64_hppa_reloc_final_type): Add protptype.
7402
7403 2002-02-12 Alexandre Oliva <aoliva@redhat.com>
7404
7405 * elf-m10300.c (mn10300_elf_relax_section): Skip section before
7406 loading its contents if there's nothing to do in it.
7407
7408 2002-02-12 Alan Modra <amodra@bigpond.net.au>
7409
7410 * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for crossing
7411 64k boundary.
7412
7413 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Add dynamic
7414 DT_PPC64_OPD and DT_PPC64_OPDSZ tags.
7415 (ppc64_elf_finish_dynamic_sections): Set values for them.
7416
7417 2002-02-11 Michael Snyder <msnyder@redhat.com>
7418
7419 * elf-bfd.h (elfcore_write_lwpstatus): Add prototype.
7420 * elf.c (elfcore_grok_pstatus): Add prototype.
7421 (elfcore_grok_lwpstatus): Add prototype.
7422 (elfcore_write_lwpstatus): New function.
7423 (elfcore_write_pstatus): Fix typo, eliminate unnecessary memcpy.
7424
7425 2002-02-11 Alexandre Oliva <aoliva@redhat.com>
7426
7427 * elf32-sh.c: Added missing prototypes.
7428 * elf32-sh64.c: Likewise.
7429 (sh_elf_align_loads): Mark unused args as such.
7430 * elf64-sh64.c: Added missing prototypes.
7431 (struct elf_sh64_link_hash_entry): Fix typo.
7432 (sh_elf64_relocate_section): Fix info argument passed to
7433 _bfd_elf_section_offset.
7434
7435 2002-02-11 Alan Modra <amodra@bigpond.net.au>
7436
7437 * Makefile.am: "make dep-am".
7438 * Makefile.in: Regenerate.
7439 * aclocal.m4: Regenerate.
7440 * config.in: Regenerate.
7441 * configure: Regenerate.
7442
7443 2002-02-10 Daniel Jacobowitz <drow@mvista.com>
7444
7445 * coff-rs6000.c (xcoff_generate_rtinit): Silence uninitialized
7446 variable warnings.
7447 * elf32-sh.c (sh_elf_relax_section): Silence signed/unsigned
7448 comparison warning.
7449 * trad-core.c (trad_unix_core_file_p): Silence pointer/integer
7450 cast warnings for the common case.
7451
7452 2002-02-10 Hans-Peter Nilsson <hp@bitrange.com>
7453
7454 * config.bfd (sh-*-linux*, sh-*-elf* | sh-*-rtemself*): Add sh64
7455 vectors.
7456 (sh-*-netbsdelf*): New, to trump sh*-*-netbsdelf* and add sh64
7457 vectors.
7458
7459 2002-02-09 Richard Henderson <rth@redhat.com>
7460
7461 * elf64-alpha.c (elf64_alpha_howto): Add R_ALPHA_BRSGP.
7462 (elf64_alpha_reloc_map, elf64_alpha_check_relocs): Likewise.
7463 (elf64_alpha_relocate_section): Likewise.
7464 * reloc.c (BFD_RELOC_ALPHA_BRSGP): New.
7465 * bfd-in2.h, libbfd.h: Rebuild.
7466
7467 2002-02-09 Hans-Peter Nilsson <hp@bitrange.com>
7468
7469 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs): Check
7470 that base-plus-offset reloc accounting is consistent.
7471 (mmix_elf_relax_section): Keep base-plus-offset reloc accounting
7472 up to date for undefined symbols.
7473
7474 2002-02-08 Eric Christopher <echristo@redhat.com>
7475
7476 From Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
7477
7478 * elf32-mips.c (_bfd_mips_elf_fake_sections): Don't create .rela
7479 sections for the O32 ABI.
7480
7481 2002-02-08 Chris Demetriou <cgd@broadcom.com>
7482
7483 * elf32-arm.h: Fix formatting of _("...").
7484 * elf32-d10v.c: Likewise.
7485 * elf32-m68k.c: Likewise.
7486 * elf32-mips.c: Likewise.
7487
7488 2002-02-08 Ivan Guzvinec <ivang@opencores.org>
7489
7490 * coff-or32.c: Fix compile time warning messages.
7491
7492 2002-02-08 Alexandre Oliva <aoliva@redhat.com>
7493
7494 Contribute sh64-elf.
7495 2002-01-23 Alexandre Oliva <aoliva@redhat.com>
7496 * reloc.c (R_SH_GOTPLT32, R_SH_GOT_LOW16, R_SH_GOT_MEDLOW16,
7497 R_SH_GOT_MEDHI16, R_SH_GOT_HI16, R_SH_GOTPLT_LOW16,
7498 R_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_HI16,
7499 R_SH_PLT_LOW16, R_SH_PLT_MEDLOW16, R_SH_PLT_MEDHI16,
7500 R_SH_PLT_HI16, R_SH_GOTOFF_LOW16, R_SH_GOTOFF_MEDLOW16,
7501 R_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_HI16, R_SH_GOTPC_LOW16,
7502 R_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDHI16, R_SH_GOTPC_HI16,
7503 R_SH_GOT10BY4, R_SH_GOTPLT10BY4, R_SH_GOT10BY8, R_SH_GOTPLT10BY8,
7504 R_SH_COPY64, R_SH_GLOB_DAT64, R_SH_JMP_SLOT64, R_SH_RELATIVE64):
7505 New relocs.
7506 * libbfd.h, bfd-in2.h: Rebuilt.
7507 * elf32-sh.c (sh_elf_howto_table): Define new relocs.
7508 (sh_reloc_map): Map them.
7509 (PLT_ENTRY_SIZE, elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
7510 elf_sh_plt_entry_be, elf_sh_plt_entry_le, elf_sh_pic_plt_entry_be,
7511 elf_sh_pic_plt_entry_le, elf_sh_plt0_entry, elf_sh_plt_entry,
7512 elf_sh_pic_plt_entry, elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
7513 elf_sh_plt0_gotplt_offset, elf_sh_plt_temp_offset,
7514 elf_sh_plt_symbol_offset, elf_sh_plt_reloc_offset,
7515 movi_shori_putval) [INCLUDE_SHMEDIA]: New.
7516 (elf_sh_link_hash_entry) [INCLUDE_SHMEDIA]: Add
7517 datalabel_got_offset.
7518 (sh_elf_link_hash_newfunc): Initialize it.
7519 (sh_elf_relocate_section): Augment the scope of
7520 seen_stt_datalabel. Introduce GOTPLT support. Extend GOTPC, PLT,
7521 GOT and GOTOFF handling to new SHmedia relocation types. Support
7522 GOT_BIAS.
7523 (sh_elf_check_relocs): Likewise.
7524 (sh_elf_finish_dynamic_symbol) [TARGET_SHMEDIA]: Set up values in
7525 PLT entries using movi_shori_putval. Support GOT_BIAS.
7526 (sh_elf_finish_dynamic_sections): Likewise.
7527 * elf32-sh64.c (shmedia_prepare_reloc): Do not add addend to
7528 relocation, it's now done by the caller.
7529 (GOT_BIAS): New.
7530 * elf64-sh64.c (GOT_BIAS, PLT_ENTRY_SIZE, elf_sh64_sizeof_plt,
7531 elf_sh64_plt_plt0_offset, elf_sh64_plt0_gotplt_offset,
7532 elf_sh64_plt_temp_offset, elf_sh64_plt_symbol_offset,
7533 elf_sh64_plt_reloc_offset, ELF_DYNAMIC_INTERPRETER,
7534 elf_sh64_pcrel_relocs_copied, elf_sh64_link_hash_entry,
7535 elf_sh64_link_hash_table, sh64_elf64_link_hash_traverse,
7536 sh64_elf64_hash_table): New.
7537 (sh_elf64_howto_table): Introduce new relocs.
7538 (sh_elf64_info_to_howto): Accept new PIC relocs.
7539 (sh_elf64_relocate_section): Augment the scope of
7540 seen_stt_datalabel. Support new PIC relocs.
7541 (sh_elf64_check_relocs): Support new PIC relocs.
7542 (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le,
7543 elf_sh64_plt_entry_be, elf_sh64_plt_entry_le,
7544 elf_sh64_pic_plt_entry_be, elf_sh64_pic_plt_entry_le,
7545 elf_sh64_plt0_entry, elf_sh64_plt_entry, elf_sh64_pic_plt_entry,
7546 sh64_elf64_link_hash_newfunc, sh64_elf64_link_hash_table_create,
7547 movi_shori_putval, movi_3shori_putval,
7548 sh64_elf64_create_dynamic_sections,
7549 sh64_elf64_adjust_dynamic_symbol, sh64_elf64_discard_copies,
7550 sh64_elf64_size_dynamic_sections,
7551 sh64_elf64_finish_dynamic_symbol,
7552 sh64_elf64_finish_dynamic_sections): New.
7553 (elf_backend_create_dynamic-sections,
7554 bfd_elf64_bfd_link_hash_table_create,
7555 elf_backend_adjust_dynamic_symbol,
7556 elf_backend_size_dynamic_sections,
7557 elf_backend_finish_dynamic_symbol,
7558 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
7559 elf_backend_plt_readonly, elf_backend_want_plt_sym,
7560 elf_backend_got_header_size, elf_backend_plt_header_size):
7561 Define.
7562 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
7563 * elf32-sh.c: Renumbered and renamed some SH5 relocations to
7564 match official numbers and names; moved unmaching ones to the
7565 range 0xf2-0xff.
7566 * elf32-sh64.c, elf64-sh64.c: Likewise.
7567 2001-03-12 DJ Delorie <dj@redhat.com>
7568 * elf32-sh.c (sh_elf_relax_section): Don't relax SHmedia
7569 sections.
7570 2001-03-12 DJ Delorie <dj@redhat.com>
7571 * elf32-sh64.c (shmedia_prepare_reloc): Validate relocs that must
7572 be aligned.
7573 * elf64-sh64.c (sh_elf64_relocate_section): Ditto.
7574 2001-01-14 Hans-Peter Nilsson <hpn@cygnus.com>
7575 * elf32-sh64.c (bfd_elf32_bfd_copy_private_section_data): Define.
7576 (sh64_elf_fake_sections): Set type to SHT_SH5_CR_SORTED for a
7577 .cranges section with SEC_SORT_ENTRIES set.
7578 (sh64_backend_section_from_shdr): Set SEC_SORT_ENTRIES on an
7579 incoming sorted .cranges section.
7580 (sh64_bfd_elf_copy_private_section_data): New.
7581 (sh64_elf_final_write_processing): Only sort .cranges and modify
7582 start address if called by linker.
7583 2001-01-08 Ben Elliston <bje@redhat.com>
7584 * elf32-sh64.c (sh64_elf_final_write_processing): Activate
7585 Hans-Peter Nilsson's set bit 0 patch from 2001-01-06.
7586 * elf64-sh64.c (sh64_elf64_final_write_processing): Ditto.
7587 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
7588 * elf64-sh64.c (sh_elf64_howto_table): No open brace at start of
7589 line. Add comments before all entries.
7590 <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct and clarify describing
7591 comment.
7592 (sh_elf64_reloc): Correct head comment.
7593 (sh_elf64_relocate_section): Correct spacing.
7594 <relocating for a local symbol>: Do not honour STO_SH5_ISA32;
7595 instead call reloc_dangerous callback.
7596 <case R_SH_SHMEDIA_CODE>: New case.
7597 (sh_elf64_gc_mark_hook): Correct spacing.
7598 (sh_elf64_check_relocs): Ditto.
7599 * elf32-sh64.c (shmedia_prepare_reloc) <case R_SH_SHMEDIA_CODE>:
7600 New case.
7601 * elf32-sh.c: Correct #endif comments for #ifndef-wrapped
7602 functions.
7603 (sh_elf_howto_table) <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct,
7604 clarify describing comment. Add comments before all entries.
7605 (sh_elf_relocate_section) <relocating for a local symbol>: Do not
7606 honour STO_SH5_ISA32; instead call reloc_dangerous callback.
7607 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
7608 Sort .cranges section in final link. Prepare to set bit 0 on
7609 entry address.
7610 * elf32-sh64.c (struct sh64_find_section_vma_data): New.
7611 (sh64_elf_link_output_symbol_hook): Fix typo in prototype.
7612 (sh64_elf_set_mach_from_flags): Set SEC_DEBUGGING on incoming
7613 .cranges section.
7614 (sh64_backend_section_from_shdr): New, to recognize
7615 SHT_SH5_CR_SORTED on incoming .cranges section.
7616 (elf_backend_section_from_shdr): Define.
7617 (sh64_elf_final_write_processing): Sort outgoing .cranges
7618 section. (New, temporarily disabled:) Set bit 0 on entry address
7619 according to ISA type.
7620 (sh64_find_section_for_address): New.
7621 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb,
7622 crange_bsearch_cmpl): Move here from opcodes/sh64-dis.c.
7623 (sh64_address_in_cranges): Move here from opcodes/sh64-dis.c. Use
7624 bfd_malloc, not xmalloc.
7625 (sh64_get_contents_type): Move here from opcodes/sh64-dis.c. Make
7626 global.
7627 * elf32-sh64.c (sh64_elf64_final_write_processing): New, (but
7628 temporarily disabled) setting bit 0 on entry address.
7629 (elf_backend_final_write_processing): Define.
7630 2001-01-05 Hans-Peter Nilsson <hpn@cygnus.com>
7631 * elf32-sh.c (sh_elf_howto_table) <R_SH_PT_16>: Adjust fields to
7632 be a proper relocation for PTA and PTB rather than a marker.
7633 <R_SH_IMMU5, R_SH_IMMS6, R_SH_IMMU6, R_SH_IMMS10, R_SH_IMMS10BY2,
7634 R_SH_IMMS10BY4, R_SH_IMMS10BY8, R_SH_IMMS16, R_SH_IMMU16,
7635 R_SH_IMM_LOW16, R_SH_IMM_LOW16_PCREL, R_SH_IMM_MEDLOW16,
7636 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16_PCREL,
7637 R_SH_IMM_HI16, R_SH_IMM_HI16_PCREL, R_SH_64, R_SH_64_PCREL>:
7638 Zero src_mask.
7639 * elf64-sh64.c: Ditto.
7640 (sh_elf64_relocate_section) <case R_SH_PT_16>: New case.
7641 * elf32-sh64.c: Include opcodes/sh64-opc.h
7642 (shmedia_prepare_reloc): Take a bfd_link_info pointer as first
7643 argument. Drop const qualifiers from "bfd *" and "bfd_byte *"
7644 parameters. No unused parameters. Caller changed.
7645 <case R_SH_PT_16>: New case.
7646 * Makefile.am (elf32-sh64.lo): Add dependency on sh64-opc.h.
7647 * Makefile.in: Regenerate.
7648 2000-12-30 Hans-Peter Nilsson <hpn@cygnus.com>
7649 * elf64-sh64.c (sh64_elf64_fake_sections): Set SHF_SH5_ISA32 for
7650 all code sections.
7651 (sh_elf64_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
7652 (sh64_elf_merge_private_data): Ditto.
7653 * elf32-sh64.c (sh64_elf_fake_sections): Use sh64_elf_section_data
7654 to access stored section flags.
7655 (sh64_elf_final_write_processing): Return immediately unless
7656 called by linker. Use sh64_elf_section_data (cranges) to get size
7657 of linker-generated cranges entries.
7658 (sh64_elf_copy_private_data): Add missing "return true".
7659 (sh64_elf_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
7660 (sh_elf64_merge_private_data): Ditto.
7661 2000-12-19 Hans-Peter Nilsson <hpn@cygnus.com>
7662 * elf64-sh64.c (sh64_elf64_fake_sections): New, copy of
7663 elf64-sh64.c:sh64_elf_fake_sections.
7664 (elf_backend_fake_sections): Define as sh64_elf64_fake_sections.
7665 2000-12-18 Hans-Peter Nilsson <hpn@cygnus.com>
7666 * elf32-sh64.c (sh64_elf_copy_private_data_internal): Delete.
7667 (sh64_elf_final_write_processing): New.
7668 (elf_backend_final_write_processing): Define.
7669 (sh64_elf_fake_sections): Get header flags from tdata field.
7670 (sh64_elf_copy_private_data): Do not call
7671 sh64_elf_copy_private_data_internal, just copy e_flags field.
7672 (sh64_elf_merge_private_data): Do not call
7673 sh64_elf_copy_private_data_internal.
7674 2000-12-12 Hans-Peter Nilsson <hpn@cygnus.com>
7675 Remove EF_SH64_ABI64, let ELF size make difference.
7676 Remove SH64-specific BFD section flag.
7677 * elf32-sh64.c (sh64_elf_fake_sections): Recognize section as
7678 containing SHmedia through elf_section_data (asect)->tdata
7679 non-zero, not using a BFD section flag.
7680 (sh64_elf_set_mach_from_flags): Don't recognize EF_SH64_ABI64.
7681 (sh64_elf_merge_private_data): Similar.
7682 (elf_backend_section_flags): Don't define.
7683 (sh64_elf_backend_section_flags): Delete.
7684 * elf64-sh64.c (sh_elf64_set_mach_from_flags): Recognize EF_SH64,
7685 not EF_SH64_ABI64.
7686 (sh_elf64_merge_private_data): Similar.
7687 * section.c (Section flags definitions): Don't define
7688 SEC_SH_ISA_SHMEDIA.
7689 (bfd-in2.h): Regenerate.
7690 2000-12-09 Hans-Peter Nilsson <hpn@cygnus.com>
7691 Make DataLabel references work with partial linking.
7692 * elf32-sh64.c: Fix formatting.
7693 (sh64_elf_link_output_symbol_hook): New.
7694 (elf_backend_link_output_symbol_hook): Define to
7695 sh64_elf_link_output_symbol_hook.
7696 (sh64_elf_add_symbol_hook): Make DataLabel symbol just global
7697 undefined if partial linking. Adjust sanity check.
7698 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): New.
7699 (elf_backend_link_output_symbol_hook): Define to
7700 sh64_elf64_link_output_symbol_hook.
7701 (sh64_elf64_add_symbol_hook): Make DataLabel symbol just global
7702 undefined if partial linking. Adjust sanity check.
7703 2000-12-07 Hans-Peter Nilsson <hpn@cygnus.com>
7704 Implement semantics for inter-file DataLabel references.
7705 * elf64-sh64.c (DATALABEL_SUFFIX): Define.
7706 (sh64_elf64_add_symbol_hook): New.
7707 (sh_elf64_relocate_section): If passing an indirect symbol with
7708 st_type STT_DATALABEL on the way to a symbol with st_other
7709 STO_SH5_ISA32, do not bitor 1 to the relocation.
7710 (elf_backend_add_symbol_hook): Define to
7711 sh64_elf64_add_symbol_hook.
7712 * elf64-sh32.c: Tweak comments.
7713 (DATALABEL_SUFFIX): Define.
7714 (sh64_elf_add_symbol_hook): New.
7715 (elf_backend_add_symbol_hook): Define to sh64_elf_add_symbol_hook.
7716 * elf32-sh.c (sh_elf_relocate_section): If passing an indirect
7717 symbol with st_type STT_DATALABEL on the way to a symbol with
7718 st_other STO_SH5_ISA32, do not bitor 1 to the relocation.
7719 2000-12-05 Hans-Peter Nilsson <hpn@cygnus.com>
7720 Pass through STT_DATALABEL.
7721 * elf32-sh64.c (sh64_elf_get_symbol_type): New.
7722 (elf_backend_get_symbol_type): Define.
7723 * elf64-sh64.c (sh64_elf64_get_symbol_type): New.
7724 (elf_backend_get_symbol_type): Define.
7725 2000-11-30 Hans-Peter Nilsson <hpn@cygnus.com>
7726 * elf32-sh64.c: Tweak comments.
7727 (sh64_elf_copy_private_data_internal): Add prototype.
7728 (bfd_elf32_bfd_set_private_flags): Define.
7729 (sh64_elf_copy_private_data_internal): Compare machine name, not
7730 textual BFD target name, to check whether to copy section flag
7731 SHF_SH5_ISA32.
7732 (sh64_elf_merge_private_data): Validize bfd_get_arch_size.
7733 Tweak section-contents-type-mismatch message.
7734 (shmedia_prepare_reloc): Add ATTRIBUTE_UNUSED markers.
7735 Validize reloc-types.
7736 * elf64-sh64.c: New file.
7737 * targets.c (bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec): Declare.
7738 * Makefile.am (BFD64_BACKENDS): Add elf64-sh64.lo.
7739 (BFD64_BACKENDS_CFILES): Add elf64-sh64.c.
7740 Regenerate dependencies.
7741 * Makefile.in: Regenerate.
7742 * config.bfd (sh64-*-elf*): Add bfd_elf64_sh64_vec and
7743 bfd_elf64_sh64l_vec.
7744 * configure.in: Handle bfd_elf64_sh64_vec and
7745 bfd_elf64_sh64l_vec.
7746 * configure: Regenerate.
7747 * po/POTFILES.in: Regenerate.
7748 * po/bfd.pot: Regenerate.
7749 2000-11-29 Hans-Peter Nilsson <hpn@cygnus.com>
7750 * elf32-sh64.c (sh64_elf_set_mach_from_flags): Do not recognize
7751 anything else but EF_SH64 and EF_SH64_ABI64.
7752 (sh64_elf_merge_private_data): Emit error for anything else but
7753 EF_SH64 and EF_SH64_ABI64.
7754 * config.bfd: Remove bfd_elf32_shblin_vec and bfd_elf32_shlin_vec
7755 from targ_selvecs.
7756 * configure.in: Add cofflink.lo to bfd_elf32_sh64_vec and
7757 bfd_elf32_sh64l_vec as a temporary measure.
7758 * configure: Regenerate.
7759 2000-11-27 Hans-Peter Nilsson <hpn@cygnus.com>
7760 * cpu-sh.c (arch_info_struct): Include sh5 item
7761 unconditionalized.
7762 * config.bfd (sh64-*-elf*): Do not set targ_cflags.
7763 Add targ_selvecs bfd_elf32_sh_vec, bfd_elf32_shl_vec,
7764 bfd_elf32_shblin_vec and bfd_elf32_shlin_vec.
7765 * elf32-sh64.c: Tweak comments.
7766 (sh64_elf_set_mach_from_flags): Recognize all machine flags that
7767 are proper subsets of SH64 as bfd_mach_sh5. Add EF_SH64_ABI64.
7768 (sh64_elf_copy_private_data_internal): Wrap long line.
7769 (sh64_elf_merge_private_data): Rewrite to allow objects from
7770 SH64 subsets to be linked together.
7771 (INCLUDE_SHMEDIA): Define.
7772 * elf32-sh.c (sh_elf_relocate_section) <local symbol>:
7773 Parenthesize plus-expression inside or-expression.
7774 <global symbol>: Ditto.
7775 (sh_elf_set_mach_from_flags): Remove code refusing
7776 deleted EF_SH64_32BIT_ABI flag.
7777 2000-11-26 Hans-Peter Nilsson <hpn@cygnus.com>
7778 * elf32-sh.c (sh_elf_howto_table) <R_SH_IMM_LOW16_PCREL,
7779 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16_PCREL,
7780 R_SH_IMM_HI16_PCREL, R_SH_64_PCREL>: Set pcrel_offset to true.
7781 (sh_elf_relocate_section) <local symbol>: Or 1 in
7782 calculation of relocation if sym->st_other & STO_SH5_ISA32.
7783 <global symbol>: Ditto if h->other & STO_SH5_ISA32.
7784 * elf32-sh64.c (shmedia_prepare_reloc): Add rel->r_addend to
7785 relocation.
7786 2000-11-24 Hans-Peter Nilsson <hpn@cygnus.com>
7787 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64.lo.
7788 (BFD32_BACKENDS_CFILES): Add elf32-sh64.c.
7789 Regenerate dependencies.
7790 * Makefile.in: Regenerate.
7791 * archures.c: Add bfd_mach_sh5.
7792 * config.bfd: Map targ_cpu sh* to bfd_sh_arch.
7793 Handle sh64-*-elf*. Set targ_cflags to -DINCLUDE_SHMEDIA.
7794 * configure.in: Handle bfd_elf32_sh64_vec and bfd_elf32_sh64l_vec.
7795 * configure: Regenerate.
7796 * reloc.c (BFD_RELOC_SH_SHMEDIA_CODE, BFD_RELOC_SH_IMMU5,
7797 BFD_RELOC_SH_IMMS6, BFD_RELOC_SH_IMMS6BY32, BFD_RELOC_SH_IMMU6,
7798 BFD_RELOC_SH_IMMS10, BFD_RELOC_SH_IMMS10BY2,
7799 BFD_RELOC_SH_IMMS10BY4, BFD_RELOC_SH_IMMS10BY8,
7800 BFD_RELOC_SH_IMMS16, BFD_RELOC_SH_IMMU16, BFD_RELOC_SH_IMM_LOW16,
7801 BFD_RELOC_SH_IMM_LOW16_PCREL, BFD_RELOC_SH_IMM_MEDLOW16,
7802 BFD_RELOC_SH_IMM_MEDLOW16_PCREL, BFD_RELOC_SH_IMM_MEDHI16,
7803 BFD_RELOC_SH_IMM_MEDHI16_PCREL, BFD_RELOC_SH_IMM_HI16,
7804 BFD_RELOC_SH_IMM_HI16_PCREL, BFD_RELOC_SH_PT_16): New relocations.
7805 * cpu-sh.c [INCLUDE_SHMEDIA] (arch_info_struct): Define and link
7806 in item for SH5.
7807 * elf32-sh.c [INCLUDE_SHMEDIA] (sh_elf_howto_table): Add howto items
7808 for SHmedia relocs.
7809 [INCLUDE_SHMEDIA] (sh_rel): Add mappings for SHmedia relocs.
7810 [INCLUDE_SHMEDIA] (sh_elf_relocate_section) [default]: Call
7811 shmedia_prepare_reloc, goto final_link_relocate if it returns
7812 non-zero, else fail as before.
7813 (sh_elf_set_mach_from_flags): Provide function only if not defined
7814 as macro. Do not recognize objects with EF_SH64_32BIT_ABI set.
7815 (sh_elf_set_private_flags): Provide function only if not defined
7816 as a macro.
7817 (sh_elf_copy_private_data): Similar.
7818 (sh_elf_merge_private_data): Similar.
7819 * section.c (SEC_SH_ISA_SHMEDIA): New.
7820 * targets.c (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec): Declare.
7821 * elf32-sh64.c: New file.
7822 * libbfd.h: Regenerate.
7823 * bfd-in2.h: Regenerate.
7824 * po/POTFILES.in: Regenerate.
7825 * po/bfd.pot: Regenerate.
7826 * bfd-in2.h: Regenerate.
7827 * libbfd.h: Regenerate.
7828
7829 2002-02-07 Daniel Jacobowitz <drow@mvista.com>
7830
7831 * bfd-in.h: Update <stdbool.h> check to only see if <stdbool.h> has
7832 been included, not drag it in.
7833 * bfd-in2.h: Regenerate.
7834
7835 2002-02-06 H.J. Lu (hjl@gnu.org)
7836
7837 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Update
7838 the mach and ISA fields if necessary.
7839
7840 2002-02-06 Nick Clifton <nickc@cambridge.redhat.com>
7841
7842 * coffcode.h (coff_set_arch_mach_hook): Select the highest known
7843 ARM architecture when an F_ARM_5 flag is detected, since we cannot
7844 be sure exactly which architecture this represents.
7845
7846 2002-02-05 Nick Clifton <nickc@redhat.com>
7847
7848 * po/tr.po: Updated translation.
7849
7850 2002-02-05 Alan Modra <amodra@bigpond.net.au>
7851
7852 From Jimi X <jimix@watson.ibm.com>
7853 * archures (bfd_mach_ppc64): Define.
7854 (bfd_powerpc_arch): Rename to bfd_powerpc_archs.
7855 (bfd_powerpc_arch): Define.
7856 * bfd-in2.h: Regenerate.
7857 * cpu-powerpc.c (arch_info_struct): Rename to bfd_powerpc_archs.
7858 (bfd_powerpc_arch): Move to tail of bfd_powerpc_archs.
7859 (bfd_powerpc_archs): Add default powerpc64 arch.
7860
7861 2002-02-05 Alan Modra <amodra@bigpond.net.au>
7862
7863 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Check for relocs
7864 against section syms in readonly sections. Don't do the global
7865 sym check if we find one.
7866 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
7867 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
7868 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
7869 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
7870 (elf_s390_grok_prstatus): Add missing prototype.
7871
7872 2002-02-04 Hans-Peter Nilsson <hp@bitrange.com>
7873
7874 * elf64-mmix.c (mmix_dump_bpo_gregs): New function.
7875 (mmix_elf_check_common_relocs) <case R_MMIX_BASE_PLUS_OFFSET>:
7876 Call bfd_get_section_by_name only once. Initialize
7877 bpodata->n_bpo_relocs_this_section.
7878 (_bfd_mmix_prepare_linker_allocated_gregs): Remove comment
7879 referring to DSOs.
7880 (bpo_reloc_request_sort_fn): Don't use difference of values as
7881 return-value.
7882
7883 2002-02-02 David O'Brien <obrien@FreeBSD>
7884
7885 * configure.in: Tweak the FreeBSD 4.x recognition more. Only treat
7886 version 4.5 and later the same as 5-CURRENT.
7887 * configure: Re-generate.
7888
7889 2002-02-02 Jason Thorpe <thorpej@wasabisystems.com>
7890
7891 * config.bfd (hppa*-*-netbsd*): New target.
7892
7893 2002-01-31 Philipp Thomas <pthomas@suse.de>
7894
7895 * coff-arm.c (coff_arm_merge_private_bfd_data): Move ERROR
7896 to front of message. Unify messages with elf32-arm.h. Use
7897 commas where neccessary.
7898 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Use all upcase
7899 ERROR in messages. Unify messages with coff-arm.c. Correct
7900 VFP/FPA error message.
7901 (elf32_arm_print_private_bfd_data): Don't mark APCS-26 and
7902 APCS-32 for translation.
7903
7904 2002-02-01 Hans-Peter Nilsson <hp@bitrange.com>
7905
7906 Perform on-demand global register allocation from
7907 R_MMIX_BASE_PLUS_OFFSET relocs.
7908 * elf64-mmix.c (struct bpo_reloc_section_info, struct
7909 bpo_reloc_request, struct bpo_greg_section_info): New.
7910 (mmix_elf_check_common_relocs, mmix_elf_gc_sweep_hook,
7911 bpo_reloc_request_sort_fn, mmix_elf_relax_section,
7912 _bfd_mmix_check_all_relocs,
7913 _bfd_mmix_prepare_linker_allocated_gregs,
7914 _bfd_mmix_finalize_linker_allocated_gregs): New functions.
7915 (elf_mmix_howto_table): Correct src_mask for most relocs.
7916 (mmix_elf_perform_relocation) <case R_MMIX_BASE_PLUS_OFFSET>: New
7917 case.
7918 (mmix_final_link_relocate) <case R_MMIX_BASE_PLUS_OFFSET>: New
7919 case. Fix typo in comment. New label do_mmix_reloc.
7920 (mmix_elf_check_relocs): Abuse bfd_link_info member base_file to
7921 store first object file with a base-plus-offset reloc. Call
7922 mmix_elf_check_common_relocs for the part common with mmo.
7923 (mmix_elf_final_link): Write out linker-allocated register
7924 contents section.
7925 (elf_backend_gc_sweep_hook): Define.
7926 (bfd_elf64_bfd_relax_section): Define.
7927
7928 * mmo.c: Don't include <ctype.h>
7929 (mmo_init): Correct init-once logic.
7930
7931 2002-02-01 Tom Rix <trix@redhat.com>
7932
7933 * config.bfd: Conditionally support <aiaff> for pre AIX 4.3.
7934
7935 2002-02-01 Alan Modra <amodra@bigpond.net.au>
7936
7937 * Makefile.am: Run "make dep-am"
7938 * Makefile.in: Regenerate.
7939
7940 2002-01-31 David O'Brien <obrien@FreeBSD>
7941
7942 * configure.in: Recognize the differences in core files from FreeBSD
7943 4.{0,1} and later versions of 4.x. This treats 4.2+ the same as
7944 5-CURRENT.
7945 * configure: Regenerate.
7946
7947 2002-01-31 Ivan Guzvinec <ivang@opencores.org>
7948
7949 * coff-or32.c: New file.
7950 * cpu-or32.c: New file.
7951 * elf32-or32.c: New file.
7952 * archures.c: Add support for or32.
7953 * targets.c: Add support for or32.
7954 * bfd-in2.h: Regenerate.
7955 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags,
7956 coff_write_object_contents): Add support for or32.
7957 * config.bfd: Add target.
7958 * configure.in: Add support for or32.
7959 * configure: Regenerate.
7960 * Makefile.am: Add support for or32.
7961 * Makefile.in: Regenerate.
7962 * po/SRC-POTFILES.in: Add or32 files.
7963 * po/bfd.pot: Regenerate.
7964
7965 2002-01-31 Nick Clifton <nickc@cambridge.redhat.com>
7966 Don Lindsay <lindsayd@cisco.com>
7967
7968 * elf32-mips.c (mips_elf_calculate_relocation): Replace 'return
7969 false' with a return of a bfd_reloc_ error code.
7970
7971 2002-01-31 Hans-Peter Nilsson <hp@axis.com>
7972
7973 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
7974 unexport unreferenced symbols when --export-dynamic. Call
7975 _bfd_elf_strtab_delref when unexporting.
7976
7977 2002-01-30 Daniel Jacobowitz <drow@mvista.com>
7978
7979 * bfd-in.h: Include <stdbool.h> if it is available.
7980 * bfd-in2.h: Regenerated.
7981
7982 2002-01-31 Alan Modra <amodra@bigpond.net.au>
7983
7984 * elf64-ppc.c (func_desc_adjust): STV_PROTECTED functions should
7985 not go via the plt.
7986
7987 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
7988
7989 * archures.c: Tidy up formatting of embedded comments.
7990 * bfd.c: Tidy up formatting of embedded comments.
7991 * bfd-in.h: Fix formatting of comments.
7992 * reloc.c: Tidy up formatting of ordinary & embedded comments.
7993 * section.c: Tidy up formatting of embedded comments.
7994 * syms.c: Tidy up formatting of embedded comments.
7995 * targets.c: Tidy up formatting of embedded comments.
7996
7997 * bfd-in2.h: Regenerate.
7998
7999 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
8000
8001 * vms-tir.c (cmd_name): New function.
8002 (tir_cmd_name): New function.
8003 (etir_sta, etir_sto, etir_opr, etir_stc): Use cmd_name().
8004 (tir_opr, tir_ctl, tir_cmd): use tir_cmd_name().
8005 Fix formatting.
8006
8007 * peXXigen.c (pe_print_idata): Rearrange message to aid in
8008 translation.
8009 (pe_print_pdata): Rearrange message to aid in translation.
8010
8011 * libbfd.c (warn_deprecated): Rearrange error message to aid in
8012 translation.
8013
8014 * ihex.c (ihex_write_object_contents): Fix spelling typo.
8015
8016 * ieee.c (ieee_slurp_external_symbols): Remove spurious space.
8017
8018 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Rearrange error
8019 message to aid in translation.
8020
8021 * elf64-mmix.c (mmix_final_link_relocate): Rearrange error message
8022 to aid in translation.
8023
8024 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix typo.
8025
8026 2002-01-30 Philipp Thomas <pthomas@suse.de>
8027
8028 * coff-arm.c, elf32-elf.h: Unify messages.
8029
8030 2002-01-30 Nick Clifton <nickc@redhat.com>
8031
8032 * po/sv.po: Updated translation.
8033
8034 2002-01-30 Philipp Thomas <pthomas@suse.de>
8035
8036 * dwarf2.c (read_abbrev): Use full section name in error message.
8037 (decode_line_info): Likewise.
8038
8039 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Don't translate debugging
8040 message.
8041
8042 2002-01-30 Alan Modra <amodra@bigpond.net.au>
8043
8044 * elf64-ppc.c (func_desc_adjust): Only provide missing function
8045 descriptor symbols for undefined function code syms. Clear
8046 ELF_LINK_NON_ELF so that they can stay weak.
8047
8048 2002-01-29 Chris Demetriou <cgd@broadcom.com>
8049 Mitch Lichtenberg <mpl@broadcom.com>
8050
8051 * bfd-in.h (bfd_mips_elf32_create_embedded_relocs): New prototype.
8052 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): New function
8053 to handle 32-bit ELF embedded reloc (ld --embedded-relocs)
8054 generation.
8055 * bfd-in2.h: Regenerate.
8056
8057 2002-01-29 Chris Demetriou <cgd@broadcom.com>
8058
8059 * elf32-mips.c: Add additional comments about HI16 relocation
8060 processing.
8061 (_bfd_mips_elf_hi16_reloc): Don't subtract address here for
8062 pc-relative relocations. (Reverts change made on 2001-10-31.)
8063 (_bfd_mips_elf_lo16_reloc): Subtract address of LO16 part here
8064 for pc-relative relocations.
8065 (mips_elf_calculate_relocation): Add a comment about a kludge
8066 in the R_MIPS_GNU_REL_HI16 handling.
8067 (_bfd_mips_elf_relocate_section): Implement that kludge;
8068 adjust pc-relative HI16 relocation for difference in HI16 and
8069 LO16 addresses, since it can't easily be done in
8070 mips_elf_calculate_relocation.
8071
8072 2002-01-29 Martin Schwidefsky <schwidefsky@de.ibm.com>
8073
8074 * elf32-i386 (elf_i386_adjust_dynamic_symbol): Do not replace PLT32
8075 relocations with PC32 relocations for undefined or weak symbols.
8076 * elf32-s390 (elf_i386_adjust_dynamic_symbol): Likewise.
8077 * elf64-s390x (elf_i386_adjust_dynamic_symbol): Likewise.
8078
8079 2002-01-28 Jason Thorpe <thorpej@wasabisystems.com>
8080
8081 * elfcore.h (elf_core_file_p): Improve comment for last change.
8082
8083 2002-01-27 Daniel Jacobowitz <drow@mvista.com>
8084
8085 * configure: Regenerated.
8086
8087 2002-01-27 Jason Thorpe <thorpej@wasabisystems.com>
8088
8089 * elfcore.h (elf_core_file_p): Set the machine architecture
8090 before processing the program headers.
8091
8092 2002-01-26 Hans-Peter Nilsson <hp@bitrange.com>
8093
8094 * configure.in <64-bit configuration>: If using gcc, check and
8095 emit error for egcs-1.1.2.
8096 * configure: Regenerate.
8097
8098 2002-01-26 Egor Duda <deo@logos-m.ru>
8099
8100 * elf.c (elfcore_grok_win32pstatus): Copy only as much information
8101 as possible to avoid stack corruption.
8102
8103 2002-01-26 Richard Henderson <rth@redhat.com>
8104
8105 * elf64-alpha.c (elf64_alpha_check_relocs): Don't set reltext
8106 for non-allocated sections.
8107
8108 2002-01-25 Mark Kettenis <kettenis@gnu.org>
8109
8110 * elf.c (elfcore_write_prstatus): Make sure we pass the address of
8111 prstat.pr_reg even if it is a struct.
8112
8113 2002-01-25 Steve Ellcey <sje@cup.hp.com>
8114
8115 * elfxx-ia64.c: Reset AIX vector function overrides for HP-UX.
8116
8117 2002-01-25 Philipp Thomas <pthomas@suse.de>
8118
8119 * coffgen.c (coff_print_symbol): Don't mark info message
8120 for translation.
8121
8122 2002-01-25 Nick Clifton <nickc@redhat.com>
8123
8124 * po/fr.po: Updated translation.
8125 * po/es.po: Updated translation.
8126
8127 2002-01-25 Philipp Thomas <pthomas@suse.de>
8128
8129 * coff-alpha.c (alpha_relocate_section): Unify warning message
8130 for GP relative relocations without GP defined.
8131 * coff-mips.c (mips_relocate_section): Likewise.
8132
8133 2002-01-25 Alan Modra <amodra@bigpond.net.au>
8134
8135 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Avoid
8136 unsigned overflow when new_offset < old_offset.
8137
8138 2002-01-24 Philipp Thomas <pthomas@suse.de>
8139
8140 * bfd.c (_bfd_abort): Fix typo.
8141
8142 2002-01-23 Richard Henderson <rth@redhat.com>
8143
8144 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't suppress
8145 plt entries for undefweak symbols.
8146
8147 2002-01-23 Steve Ellcey <sje@cup.hp.com>
8148
8149 * targets.c (bfd_elf32_ia64_hpux_big_vec): Add to DEFAULT_VECTOR.
8150 (bfd_elf64_ia64_hpux_big_vec): Ditto.
8151 (bfd_elf32_h8300_vec): Ditto.
8152
8153 2002-01-23 Alan Modra <amodra@bigpond.net.au>
8154
8155 * elf64-ppc.c: Remove stale part of ABI comment.
8156 (NO_OPD_RELOCS): Define.
8157 (ppc64_elf_check_relocs): Use it.
8158 (ppc64_elf_relocate_section): Here too.
8159 (build_one_stub): Don't point function syms at the stub. Instead,
8160 hijack plt.offset.
8161 (ppc64_elf_relocate_section): Check whether REL24 relocs should
8162 really go to the stub. Make all dynamic relocs in opd against
8163 locals.
8164 (ppc64_elf_finish_dynamic_symbol): Allow for non-standard use of
8165 plt.offset.
8166
8167 2002-01-22 Richard Henderson <rth@redhat.com>
8168
8169 * elf64-alpha.c (INSN_UNOP): Encode with RB as $sp.
8170
8171 2002-01-22 Alan Modra <amodra@bigpond.net.au>
8172
8173 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Correct sign of
8174 TOC_BASE_OFF adjustment.
8175
8176 * Makefile.am: Run "make dep-am".
8177 * Makefile.in: Regenerate.
8178 * po/SRC-POTFILES.in: Regenerate.
8179
8180 2002-01-22 John David Anglin <dave@hiauly1.hia.nrc.ca>
8181
8182 * configure.host (hppa*64*-*-hpux*, hppa*64*-*-linux*): Add new
8183 host defines.
8184
8185 2002-01-21 Hans-Peter Nilsson <hp@axis.com>
8186
8187 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GOTREL>:
8188 Check for and emit error if sgot is NULL at this point.
8189
8190 2002-01-21 Jason Thorpe <thorpej@wasabisystems.com>
8191
8192 * config.bfd (ia64*-*-netbsd*): New target.
8193
8194 2002-01-21 Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
8195
8196 * som.c (som_write_space_strings): Comment typo fix.
8197
8198 2002-01-21 Alan Modra <amodra@bigpond.net.au>
8199
8200 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_func and
8201 is_func_descriptor fields.
8202 (link_hash_newfunc): Init them.
8203 (ppc64_elf_check_relocs): Only R_PPC24_REL24 syms starting with a
8204 dot are candidates for plt entries. When processing .opd relocs,
8205 set function descriptor strings to point inside function code
8206 string, and set new ppc_link_hash_entry fields.
8207 (ppc64_elf_gc_sweep_hook): Don't sweep R_PPC64_REL24 relocs.
8208 (ppc64_elf_adjust_dynamic_symbol): Remove most code dealing with
8209 function descriptors. It's now done in..
8210 (func_desc_adjust): New.
8211 (ppc64_elf_func_desc_adjust): New.
8212 (define elf_backend_always_size_sections): Define.
8213 (ppc64_elf_hide_symbol): New.
8214 (define elf_backend_hide_symbol): Define.
8215 (allocate_dynrelocs): Remove code looking up function descriptors
8216 as that has been done earlier.
8217 (ppc64_elf_size_dynamic_sections): Use htab shortcut to elf hash
8218 table.
8219 (ppc64_elf_finish_dynamic_symbol): Likewise. Remove code looking
8220 up function descriptor.
8221 (build_one_stub): Look up the function code sym. Check for
8222 invalid plt offsets.
8223 (ppc64_elf_relocate_section): Tweak calls to undefined weak syms.
8224 Convert R_PPC64_TOC relocs to R_PPC64_RELATIVE in shared libs.
8225
8226 * elf-bfd.h (elf_backend_data <elf_backend_hide_symbol>): Add
8227 boolean param.
8228 (_bfd_elf_link_hash_hide_symbol): Likewise.
8229 * elflink.h (elf_link_add_object_symbols): Adjust call to
8230 elf_backend_hide_symbol.
8231 (elf_fix_symbol_flags): Likewise.
8232 (elf_link_assign_sym_version): Likewise. Use bfd_malloc rather
8233 than bfd_alloc.
8234 * elf.c (_bfd_elf_link_hash_hide_symbol): Add "force_local" param.
8235 Set ELF_LINK_FORCED_LOCAL and call _bfd_elf_strtab_delref.
8236 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
8237 (clobber_millicode_symbols): Adjust to suit new hide_symbol.
8238 * elf32-cris.c (elf_cris_hide_symbol): Add "force_local" param
8239 and adjust to suit.
8240 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise, and call
8241 _bfd_elf_link_hash_hide_symbol rather than duplicating code.
8242 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
8243
8244 2002-01-18 Alan Modra <amodra@bigpond.net.au>
8245
8246 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Test for a
8247 dynamic function descriptor symbol, not the associated function
8248 symbol.
8249
8250 2002-01-17 Eric Christopher <echristo@redhat.com>
8251
8252 * elf32-mips.c (mips_elf_calculate_relocation): Fix typo.
8253
8254 2002-01-17 Nick Clifton <nickc@cambridge.redhat.com>
8255
8256 * po/bfd.pot: Regenerate.
8257 * po/fr.po: Regenerate.
8258
8259 2002-01-17 Alan Modra <amodra@bigpond.net.au>
8260
8261 * elf-bfd.h (elf_backend_data <elf_backend_section_from_bfd_section>):
8262 Remove "Elf_Internal_Shdr *" param.
8263 (_bfd_mips_elf_section_from_bfd_section): Ditto.
8264 * elf32-mips.c (_bfd_mips_elf_section_from_bfd_section): Ditto.
8265 * elf32-m32r.c (_bfd_m32r_elf_section_from_bfd_section): Ditto.
8266 * elf32-v850.c (v850_elf_section_from_bfd_section): Ditto.
8267 * elf64-mmix.c (mmix_elf_section_from_bfd_section): Ditto.
8268 * elfxx-ia64.c (elfNN_hpux_backend_section_from_bfd_section): Ditto.
8269 * elf.c (_bfd_elf_section_from_bfd_section): Allow backend
8270 function to override special sections. Remove hdr arg from
8271 backend call, and don't loop.
8272
8273 2002-01-16 Eric Christopher <echristo@redhat.com>
8274
8275 * elf32-mips.c (mips_elf_calculate_relocation): Set require_jalxp
8276 on R_MIPS_26 and target is 16bit. Add R_MIPS16_GPREL to list of
8277 relocations requiring gp0 and gp.
8278
8279 2002-01-16 Richard Earnshaw <rearnsha@arm.com>
8280
8281 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle
8282 EF_ARM_VFP_FLOAT.
8283 (elf32_arm_print_private_bfd_data): Likewise.
8284
8285 2002-01-16 Nick Clifton <nickc@cambridge.redhat.com>
8286
8287 * po/tr.po: Import new version.
8288
8289 2002-01-16 Alan Modra <amodra@bigpond.net.au>
8290
8291 * elf64-ppc.c (ppc64_elf_howto_raw): Remove stale FIXMEs.
8292 (ppc64_elf_reloc_type_lookup): Use proper CTOR reloc.
8293 (ORI_R0_R0_0): Correct.
8294
8295 2002-01-16 Alan Modra <amodra@bigpond.net.au>
8296
8297 * elflink.c (_bfd_elf_create_dynamic_sections): Don't set SEC_CODE
8298 when plt_not_loaded.
8299 * elf64-ppc.c (ppc64_elf_create_dynamic_sections): No need to
8300 clear .plt SEC_CODE here. Create .stub and correct .glink flags.
8301 (PLT_INITIAL_ENTRY_SIZE): Set to 24.
8302 (ppc64_elf_glink_code): Delete.
8303 (PPC64_ELF_GLINK_SIZE): Delete.
8304 (ADDIS_R12_R2, STD_R2_40R1, LD_R11_0R12, LD_R2_0R12, MTCTR_R11,
8305 BCTR, ADDIS_R12_R12_1, LD_R2_40R1, NOP, LI_R0_0, B_DOT, LIS_R0_0,
8306 ORI_R0_R0_0): Define.
8307 (PLT_CALL_STUB_SIZE, GLINK_CALL_STUB_SIZE): Define.
8308 (struct ppc_link_hash_table): Add sstub and plt_overflow.
8309 (ppc64_elf_link_hash_table_create): Init them.
8310 (ppc64_elf_check_relocs <R_PPC64_REL24>): Refcount .plt entry.
8311 Don't copy to shared lib.
8312 (ppc64_elf_check_relocs): Call bfd_set_error on errors.
8313 (ppc64_elf_gc_sweep_hook <R_PPC64_REL24>): Sweep plt refcount.
8314 (allocate_dynrelocs <plt>): Don't change function sym here. Make
8315 room for .stub and .glink code.
8316 (ppc64_elf_size_dynamic_sections): Handle .stub. Make entry for
8317 DT_PPC64_GLINK.
8318 (ppc64_elf_final_link): Rename to ppc64_elf_set_toc. Don't call
8319 bfd_elf64_bfd_final_link.
8320 (bfd_elf64_bfd_final_link): Don't define.
8321 (ppc64_elf_size_stubs): New.
8322 (build_plt_stub): New.
8323 (build_one_stub): New.
8324 (ppc64_elf_build_stubs): New.
8325 (ppc64_elf_relocate_section <toc relocs>): Remove assert.
8326 (ppc64_elf_relocate_section): Don't copy R_PPC64_REL24 relocs.
8327 (ppc64_elf_finish_dynamic_symbol): Don't build stubs here. Set
8328 DT_PPC64_GLINK entry. Tweak DT_PLTGOT, DT_JMPREL, DT_PLTRELSZ in
8329 case output sections not separate. Adjust DT_RELASZ to not
8330 include plt relocs. Set reserved got entry. Set got and plt
8331 entry size.
8332 (elf_backend_got_header_size): Set to 8.
8333 * elf64-ppc.h: New file.
8334
8335 2002-01-16 Alan Modra <amodra@bigpond.net.au>
8336
8337 * elf32-arm.h (elf32_arm_size_dynamic_sections): When removing
8338 sections, use bfd_section_list_remove.
8339 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
8340 * elflink.h (elf_link_add_object_symbols): When removing all
8341 sections, use bfd_section_list_clear.
8342
8343 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
8344
8345 * po/sv.po: New file: Swedish translation.
8346 * configure.in (ALL_LINGUAS): Add sv.
8347 * configure: Regenerate.
8348
8349 2002-01-15 Jakub Jelinek <jakub@redhat.com>
8350
8351 * elflink.h (elf_link_input_bfd): Back out 2002-01-07 change.
8352 * elf.c (merge_sections_remove_hook): New function.
8353 (_bfd_elf_merge_sections): Pass it as 3rd argument to
8354 _bfd_merge_sections.
8355 * libbfd-in.h (_bfd_merge_sections): Add 3rd argument.
8356 * libbfd.h: Rebuilt.
8357 * merge.c (_bfd_merge_sections): Add remove_hook argument.
8358 Call remove_hook if a SEC_EXCLUDE section is encountered.
8359
8360 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
8361
8362 * elf32-xstormy16.c (xstormy16_reloc_map): Add new field 'table'.
8363 (xstormy16_reloc_map): Initialise new field with correct howto
8364 table.
8365 (xstormy16_reloc_type_lookup): Use 'table' field to locate correct
8366 howto entry.
8367
8368 2002-01-10 Michael Snyder <msnyder@redhat.com>
8369
8370 * elf.c (elfcore_write_prstatus): Use long instead of pid_t;
8371 (elfcore_write_pstatus): Use long instead of pid_t;
8372 * elf-bfd.h: Change prototypes to use long instead of pid_t;
8373
8374 2002-01-09 Jason Thorpe <thorpej@wasabisystems.com>
8375
8376 * elf.c: Update copyright years.
8377 (elfcore_grok_netbsd_note): Use NT_NETBSDCORE_PROCINFO
8378 and NT_NETBSDCORE_FIRSTMACH. Improve a comment.
8379
8380 2002-01-08 Michael Snyder <msnyder@redhat.com>
8381
8382 Add capability to write corefile note sections, for gdb.
8383 * elf.c (elfcore_write_note): New function.
8384 (elfcore_write_prpsinfo): New function.
8385 (elfcore_write_prstatus): New function.
8386 (elfcore_write_pstatus): New function.
8387 (elfcore_write_prfpreg): New function.
8388 (elfcore_write_prxfpreg): New function.
8389 * elf-bfd.h: Add prototypes for above functions.
8390
8391 2002-01-08 Alexandre Oliva <aoliva@redhat.com>
8392
8393 * elf.c (elf_fake_sections): Propagate errors from
8394 elf_backend_fake_section.
8395
8396 2002-01-07 Jason Thorpe <thorpej@wasabisystems.com>
8397
8398 * Makefile.am (BFD32_BACKENDS): Add elf32-sh-nbsd.lo.
8399 (BFD32_BACKENDS_CFILES): Add elf32-sh-nbsd.c.
8400 (elf32-sh-nbsd.lo): New rule.
8401 * Makefile.in: Regenerate.
8402 * config.bfd (sh*le-*-netbsdelf*): New target.
8403 (sh*-*-netbsdelf*): New target.
8404 * configure.in: Include netbsd-core.lo for native sh*-*-netbsd*.
8405 (bfd_elf32_shnbsd_vec): New vector.
8406 (bfd_elf32_shlnbsd_vec): New vector.
8407 * configure: Regenerate.
8408 * elf32-sh-nbsd.c: New file.
8409 * targets.c: Update copyright years.
8410 (_bfd_target_vector): Add bfd_elf32_shlnbsd_vec and
8411 bfd_elf32_shnbsd_vec.
8412
8413 2002-01-07 Aldy Hernandez <aldyh@redhat.com>
8414
8415 * coff-rs6000.c (READ20): Use bfd_scan_vma.
8416
8417 2002-01-07 Geoffrey Keating <geoffk@redhat.com>
8418
8419 * elflink.h (elf_link_input_bfd): Don't ask for the merged offset
8420 of a symbol in a section that will be deleted.
8421
8422 2002-01-07 Nick Clifton <nickc@cambridge.redhat.com>
8423
8424 * po/es.po: New file: Spanish translation.
8425 * configure.in (ALL_LINGUAS): Add es.
8426 * configure: Regenerate.
8427
8428 2002-01-06 Steve Ellcey <sje@cup.hp.com>
8429
8430 * elfxx-ia64.c (is_unwind_section_name): Add target vector as
8431 argument so we can handle HP-UX specially.
8432 (elfNN_ia64_hpux_vec): New for use in is_unwind_section_name.
8433 (elfNN_hpux_backend_section_from_bfd_section): New for support
8434 of SHN_IA_64_ANSI_COMMON.
8435 (elfNN_ia64_relax_section): Add support for SHN_IA_64_ANSI_COMMON.
8436 (is_unwind_section_name): Add special HP-UX support.
8437 (elfNN_ia64_section_from_shdr): Add support for more sections.
8438 (elfNN_ia64_fake_sections): Modify is_unwind_section_name call and
8439 add support for more sections.
8440 (elfNN_ia64_additional_program_headers): Modify
8441 is_unwind_section_name call.
8442 (elfNN_ia64_modify_segment_map): Remove assumption that there is
8443 only one unwind section in segment.
8444
8445 2002-01-06 Alan Modra <amodra@bigpond.net.au>
8446
8447 * syms.c (_bfd_generic_make_empty_symbol): New function.
8448 * libbfd-in.h (_bfd_nosymbols_make_empty_symbol): Define as
8449 _bfd_generic_make_empty_symbol.
8450 * libbfd.h: Regenerate.
8451 * bfd-in2.h: Regenerate.
8452 * hppabsd-core.c (hppabsd_core_make_empty_symbol): Delete function.
8453 (hppabsd_core_get_symtab_upper_bound): Don't define.
8454 (hppabsd_core_get_symtab): Likewise.
8455 (hppabsd_core_print_symbol): Likewise.
8456 (hppabsd_core_get_symbol_info): Likewise.
8457 (hppabsd_core_bfd_is_local_label_name): Likewise.
8458 (hppabsd_core_get_lineno): Likewise.
8459 (hppabsd_core_find_nearest_line): Likewise.
8460 (hppabsd_core_bfd_make_debug_symbol): Likewise.
8461 (hppabsd_core_read_minisymbols): Likewise.
8462 (hppabsd_core_minisymbol_to_symbol): Likewise.
8463 (hppabsd_core_vec): Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols).
8464 Formatting fixes.
8465 * hpux-core.c: Similarly.
8466 * irix-core.c: Similarly.
8467 * osf-core.c: Similarly.
8468 * sco5-core.c: Similarly.
8469 * binary.c (binary_make_empty_symbol): Remove function, define as
8470 _bfd_generic_make_empty_symbol.
8471 * ihex.c (ihex_make_empty_symbol): Likewise.
8472 * mmo.c (mmo_make_empty_symbol): Likewise.
8473 * ppcboot.c (ppcboot_make_empty_symbol): Likewise.
8474 * srec.c (srec_make_empty_symbol): Likewise.
8475 * versados.c (versados_make_empty_symbol): Likewise.
8476 * vms.c (_bfd_vms_make_empty_symbol): Remove.
8477 (vms_make_empty_symbol): Define as _bfd_generic_make_empty_symbol.
8478 * vms-gsd.c (_bfd_vms_slurp_gsd): Call bfd_make_empty_symbol
8479 rather than _bfd_vms_make_empty_symbol.
8480 * vms-misc.c (new_symbol): Likewise.
8481
8482 2002-01-05 Alan Modra <amodra@bigpond.net.au>
8483
8484 * section.c (bfd_section_init): Remove unnecessary initialisations.
8485 (bfd_section_list_clear): New function.
8486 (bfd_section_list_remove, bfd_section_list_insert): New macros.
8487 (_bfd_strip_section_from_output): Use them.
8488 * coffcode.h (coff_set_alignment_hook): Likewise.
8489 * elf32-mips.c (_bfd_mips_elf_final_link): Likewise.
8490 * elf64-mips.c (mips_elf64_final_link): Likewise.
8491 * elf64-mmix.c (mmix_elf_final_link): Likewise.
8492 * sunos.c (sunos_add_dynamic_symbols): Likewise.
8493 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
8494 * bfd-in2.h: Regenerate.
8495
8496 * netbsd-core.c (netbsd_core_file_p): Use bfd_make_section_anyway
8497 rather than doing our own section handling. Clean up after errors
8498 with bfd_release and bfd_section_list_clear. Handle unexpected
8499 flags.
8500 * aoutf1.h (sunos4_core_file_p): Likewise.
8501 * aix386-core.c (aix386_core_file_p): Likewise.
8502 * cisco-core.c (cisco_core_file_validate): Likewise.
8503 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
8504 * trad-core.c (trad_unix_core_file_p): Likewise.
8505
8506 * hppabsd-core.c (hppabsd_core_core_file_p): Clean up after errors
8507 with bfd_release and bfd_section_list_clear.
8508 * hpux-core.c (hpux_core_core_file_p): Likewise.
8509 * irix-core.c (irix_core_core_file_p): Likewise.
8510 * lynx-core.c (lynx_core_file_p): Likewise.
8511 * osf-core.c (osf_core_core_file_p): Likewise.
8512 * rs6000-core.c (rs6000coff_core_p): Likewise.
8513 * sco5-core.c (sco5_core_file_p): Likewise.
8514
8515 * elf32-mips.c (_bfd_mips_elf_lo16_reloc): Simplify, and perform
8516 sign extension adjustments without conditionals.
8517
8518 2002-01-04 Jakub Jelinek <jakub@redhat.com>
8519
8520 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Don't crash if
8521 CIE at .eh_frame start is removed due to no FDEs referencing it.
8522
8523 2002-01-04 Jason Thorpe <thorpej@wasabisystems.com>
8524
8525 * config.bfd (x86_64-*-netbsd*): New target.
8526 * configure.in (x86_64-*-netbsd*): Set COREFILE
8527 to netbsd-core.lo.
8528 * configure: Regenerated.
8529
8530 2002-01-03 Tom Rix <trix@redhat.com>
8531
8532 * xcofflink.c (_bfd_xcoff_bfd_final_link): Update .pad section ordering
8533 for recent bfd_make_section_anyway change.
8534
8535 2002-01-03 Nick Clifton <nickc@cambridge.redhat.com>
8536
8537 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
8538 R_ARM_THM_PC11 reloc.
8539
8540 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
8541
8542 * configure.in (LINGUAS): Add ja.
8543 * configure: Regenerate.
8544 * po/ja.po: Import from translation project's web site.
8545
8546 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
8547
8548 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Reformat error
8549 messages to ease translation into other languages.
8550
8551 For older changes see ChangeLog-0001
8552 \f
8553 Local Variables:
8554 mode: change-log
8555 left-margin: 8
8556 fill-column: 74
8557 version-control: never
8558 End:
This page took 0.202553 seconds and 5 git commands to generate.