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