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