2005-09-30 H.J. Lu <hongjiu.lu@intel.com>
[deliverable/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
0f64bb02
CM
12005-09-30 Catherine Moore <clm@cm00re.com>
2
3 * Makefile.am: Bfin support.
4 * Makefile.in: Regenerated.
5 * aclocal.m4: Regenerated.
6 * archures.c (bfd_mach_bfin): New.
7 (bfd_arch_bfin): New.
8 bfd-in.h (bfd_bfin_elf32_create_embedded_relocs): New.
9 * bfd-in2.h: Regenerated.
10 * config.bfd: Bfin support.
11 * configure: Regenerated.
12 * configure.in: Bfin support.
13 * libbfd.h: Regenerated.
14 * reloc.c: Add BFD relocations for Bfin.
15 * targets.c (bfd_elf32_bfin_vec): New.
16 * cpu-bfin.c: New file.
17 * elf32-bfin.c: New file.
18
7fe2b9a6
AM
192005-09-30 Alan Modra <amodra@bigpond.net.au>
20
21 * elf64-ppc.c (ppc_type_of_stub): Check both func desc and func
22 entry sym before deciding no stub is needed.
23 (ppc64_elf_size_stubs): When calculating branch destination,
24 don't use func desc sym for old ABI objects unless func entry
25 is undefined.
26
dd863624
L
272005-09-28 H.J. Lu <hongjiu.lu@intel.com>
28
29 PR binutils/1321
30 * elf-bfd.h (_bfd_elf_setup_group_pointers): Renamed to ...
31 (_bfd_elf_setup_sections): This.
32 * elf.c: Likewise.
33 * elfcode.h (elf_object_p): Likewise.
34
35 * elf.c (_bfd_elf_setup_sections): Process SHF_LINK_ORDER.
36 (_bfd_elf_copy_private_section_data): Likewise.
37
d33cdfe3
L
382005-09-28 H.J. Lu <hongjiu.lu@intel.com>
39
40 * elflink.c (elf_fixup_link_order): Report locations for mixed
41 ordered and unordered input sections.
42
c955f9cd
JW
432005-09-22 James E. Wilson <wilson@specifix.com>
44
45 * dwarf2.c (struct funcinfo): Delete nesting_level field.
46 (lookup_address_in_function_table): Delete code to set funcinfo
47 caller_func field. Delete local curr_func.
48 (scan_unit_for_symbols): New locals nested_funcs, nested_funcs_size.
49 Delete code setting funcinfo nesting_level field. Add code to set
50 funcinfo caller_func field.
51
d5cbaa15
JW
522005-09-20 James E. Wilson <wilson@specifix.com>
53
54 * dwarf2.c (find_abstract_instance_name): Don't early exit when name
55 set. For DW_AT_name case, only set name if not already set. Handle
56 DW_AT_MIPS_linkage_name.
57
707bba77
AM
582005-09-20 Alan Modra <amodra@bigpond.net.au>
59
60 * elflink.c (_bfd_elf_merge_symbol): Simplify.
61
5c3dead3
AM
622005-09-19 Alan Modra <amodra@bigpond.net.au>
63
64 * elf64-ppc.c (ppc_build_one_stub): Replace assertion that long
65 branch offset is in range with an error. Print full stub name on
66 errors.
67 (ppc_size_one_stub): Print full stub name on errors.
68 (group_sections): Warn if section size exceeds group size.
69 (ppc64_elf_size_stubs): Continue relaxing when stub types change.
70
6cfda947
KB
712005-09-09 Kevin Buettner <kevinb@redhat.com>
72
73 * elf32-am33lin.c (bfd.h, sysdep.h, elf-bfd.h, elf/mn10300.h):
74 Include.
75 (elf32_am33lin_grok_prstatus, elf32_am33lin_grok_psinfo): New
76 functions.
77 (elf_backend_grok_prstatus, elf_backend_grok_psinfo): Define.
78
0951f019
RE
792005-09-09 Richard Earnshaw <richard.earnshaw@arm.com>
80
81 * elf32-arm.c (elf32_arm_section_from_shdr): Accept SHT_ARM_PREEMPTMAP
82 and SHT_ARM_ATTRIBUTES.
83
e04bcc6d
L
842005-09-08 H.J. Lu <hongjiu.lu@intel.com>
85
86 * elflink.c (elf_get_linked_section_vma): Fix a typo in comment.
87 * elfxx-ia64.c (elf_backend_link_order_error_handler): Likewise.
88
92fd189d
L
892005-09-08 H.J. Lu <hongjiu.lu@intel.com>
90
91 PR ld/1263
92 * elflink.c (elf_link_add_object_symbols): Abort for
93 --just-symbols on DSO.
94
3eb17e6b
PB
952005-09-08 Paul Brook <paul@codesourcery.com>
96
97 * reloc.c: Rename BFD_RELOC_ARM_SMI to BFD_RELOC_ARM_SMC.
98 * bfd-in2.h: Regenerate.
99 * libbfd.h: Regenerate.
100
68f49ba3
L
1012005-09-06 H.J. Lu <hongjiu.lu@intel.com>
102
103 PR ld/1301
104 * elflink.c (_bfd_elf_merge_symbol): Don't check undefined
105 symbol introduced by "ld -u" for TLS.
106
8f06b2d8
PB
1072005-09-02 Paul Brook <paul@codesourcery.com>
108
109 * libbdf.h: Regenerate.
110 * bfd-in2.h: Regenerate.
111 * reloc.c: Add BFD_RELOC_ARM_T32_CP_OFF_IMM and
112 BFD_RELOC_ARM_T32_CP_OFF_IMM_S2.
113
046aeb74
DD
1142005-09-01 Dmitry Diky <diwil@spec.ru>
115
116 * elf32-msp430.c (msp430_elf_relax_delete_bytes): Do not adjust
117 local symbols and move it to
118 (msp430_elf_relax_adjust_locals): New function - walk over the
119 sections in the bfd and adjust relocations as necessary.
120
e81d3500
DD
1212005-08-31 DJ Delorie <dj@redhat.com>
122
123 * elf32-i386.c (elf_i386_check_relocs): Don't cast a unary &
124 address operator, as that breaks GCC's strict aliasing rules.
125 (elf_i386_size_dynamic_sections): Avoid the need for type
126 punning.
127 * elf64-x86-64.c (elf_x86_64_check_relocs): Don't cast a unary
128 & address operator, as that breaks GCC's strict aliasing
129 rules.
130 (elf_x86_64_size_dynamic_sections): Avoid the need for type
131 punning.
132
e26f8bd9
NC
1332005-08-30 Phil Edwards <phil@codesourcery.com>
134
135 * config.bfd (i[3-7]86-*-vxworks): Match vxworks* instead.
136
1faab634
L
1372005-08-29 H.J. Lu <hongjiu.lu@intel.com>
138
139 PR ld/1247
140 * elfxx-ia64.c (allocate_fptr): Check undefined symbol.
141
c9adbffe
NC
1422005-08-29 Steven J. Hill <sjhill@realitydiluted.com>
143
144 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Initialise
145 'value' to avoid compile time warning message.
146
c0524131
NC
1472005-08-26 Christian Groessler <chris@groessler.org>
148
149 * coff-z8k.c: (r_jr, r_disp7, r_callr): Fix src_mask and dst_mask
150 of HOWTO.
151 (coff_z8k_select_reloc): Remove.
152 (SELECT_RELOC): Remove.
153 (coff_z8k_reloc_type_lookup): New function.
154 (coff_bfd_reloc_type_lookup): Define.
155 * configure.in: Add cofflink.lo to z8kcoff_vec.
156 * configure: Regenerate.
157 * reloc.c: (bfd_reloc_code_type): Add z8k relocations.
158 (bfd_install_relocation): Don't clear reloc_entry->addend for
159 coff-z8k target.
160 * bfd-in2.h: Regenerate.
161 * libbfd.h: Regenerate.
162
4195f552
KK
1632005-08-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
164
165 * elf32-sh.c (sh_elf_get_flags_from_mach): Fix off-by-one error.
166
843fe662
L
1672005-08-24 H.J. Lu <hongjiu.lu@intel.com>
168
169 PR ld/1208
170 * elf-hppa.h (elf_hppa_relocate_section): Print out the name
171 of unresolvable relocation.
172 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
173 * elf32-arm.c (elf32_arm_relocate_section): Likewise.
174 * elf32-i386.c (elf_i386_relocate_section): Likewise.
175 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
176 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
177 * elf32-s390.c (elf_s390_relocate_section): Likewise.
178 * elf32-sh.c (sh_elf_relocate_section): Likewise.
179 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
180 * elf64-s390.c (elf_s390_relocate_section): Likewise.
181 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
182 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
183 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
184
1cddf136
KK
1852005-08-18 Kaz Kojima <kkojima@rr.iij4u.or.jp>
186
187 * config.bfd: Add bfd_elf32_shnbsd_vec and bfd_elf32_shlnbsd_vec
188 to targ_selvecs for sh5*-*-netbsd* and sh64*-*-netbsd*.
189
c17ae8a2
AM
1902005-08-18 Alan Modra <amodra@bigpond.net.au>
191
848cf006
AM
192 * coff-a29k.c: Delete.
193 * cpu-a29k.c: Delete.
c17ae8a2
AM
194 * Makefile.am: Remove mention of a29k files.
195 * aoutf1.h: Remove a29k support.
196 * aoutx.h: Likewise.
197 * archures.c: Likewise.
198 * coffcode.h: Likewise.
199 * config.bfd: Likewise.
200 * configure.in: Likewise.
201 * ieee.c: Likewise.
202 * mipsbsd.c: Likewise.
203 * pdp11.c: Likewise.
204 * sparclynx.c: Likewise.
205 * targets.c: Likewise.
206 * Makefile.in: Regenerate.
207 * configure: Regenerate.
208 * bfd-in2.h: Regenerate.
209 * po/SRC-POTFILES.in: Regenerate.
210
909272ee
AM
2112005-08-18 Alan Modra <amodra@bigpond.net.au>
212
213 * elf-m10300.c (_bfd_mn10300_elf_adjust_dynamic_symbol): Warn on
214 zero size dynamic variables.
215 * elf32-arm.c (elf32_arm_adjust_dynamic_symbol): Likewise.
216 * elf32-cris.c (elf_cris_adjust_dynamic_symbol): Likewise.
217 * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Likewise.
218 * elf32-i370.c (i370_elf_adjust_dynamic_symbol): Likewise.
219 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Likewise.
220 * elf32-m32r.c (m32r_elf_adjust_dynamic_symbol): Likewise.
221 * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Likewise.
222 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Likewise.
223 * elf32-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
224 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): Likewise.
225 * elf32-vax.c (elf_vax_adjust_dynamic_symbol): Likewise.
226 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
227 * elf64-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
228 * elf64-sh64.c (sh64_elf64_adjust_dynamic_symbol): Likewise.
229 * elf64-x86-64.c (elf64_x86_64_adjust_dynamic_symbol): Likewise.
230 * elfxx-sparc.c (_bfd_sparc_elf_adjust_dynamic_symbol): Likewise.
231
bc79cded
L
2322005-08-17 H.J. Lu <hongjiu.lu@intel.com>
233
234 PR binutils/1179
235 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Use section lma
236 instead of vma.
237 (_bfd_dwarf2_find_line): Likewise.
238
46fda84e
AM
2392005-08-17 Alan Modra <amodra@bigpond.net.au>
240
241 * elf64-mmix.c (mmix_elf_add_symbol_hook): Mark reg section
242 SEC_LINKER_CREATED.
243 (mmix_elf_final_link): Check that section hasn't already been
244 removed before removing.
245 * mmo.c (mmo_scan): Mark reg contents section SEC_LINKER_CREATED.
246 (mmo_canonicalize_symtab): Likewise for reg section.
247
8d1d654f
AM
2482005-08-17 Alan Modra <amodra@bigpond.net.au>
249
250 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Move assert later.
251 * elfxx-mips.c (_bfd_mips_elf_hide_symbol): Cope with being called
252 without any got section.
253
27198fa9
DS
2542005-08-17 Danny Smith <dannysmith@users.sourceforge.net>
255
256 * cofflink.c (_bfd_coff_generic_relocate_section): Correct
257 comment.
258
ccabcbe5
AM
2592005-08-17 Alan Modra <amodra@bigpond.net.au>
260
261 * elflink.c (_bfd_elf_define_linkage_sym): Don't call
262 bfd_elf_link_record_dynamic_symbol. Call elf_backend_hide_symbol.
263 (_bfd_elf_link_renumber_dynsyms): Formatting.
264 (struct elf_gc_sweep_symbol_info): New.
265 (elf_gc_sweep_symbol): Rewrite.
266 (elf_gc_sweep): Adjust params and elf_gc_sweep_symbol call.
267 Call _bfd_elf_link_renumber_dynsyms.
268 (bfd_elf_gc_sections): Adjust elf_gc_sweep call.
269
18d944df
AM
2702005-08-16 Alan Modra <amodra@bigpond.net.au>
271
272 * elf64-ppc.c (ppc64_elf_edit_opd): Don't call dec_dynrel_count
273 when relocatable.
274
4af0a1d8
BW
2752005-08-15 Bob Wilson <bob.wilson@acm.org>
276
277 * elf32-xtensa.c (ELF_MACHINE_CODE, ELF_MACHINE_ALT1): Swap values
278 of EM_XTENSA and EM_XTENSA_OLD.
279
d98685ac
AM
2802005-08-16 Alan Modra <amodra@bigpond.net.au>
281
282 * elf-bfd.h (_bfd_elf_define_linkage_sym): Declare.
283 * elflink.c (_bfd_elf_define_linkage_sym): New function, extracted
284 from..
285 (_bfd_elf_create_got_section): ..here.
286 (_bfd_elf_link_create_dynamic_sections): Call it for _DYNAMIC.
287 (_bfd_elf_create_dynamic_sections): ..and _PROCEDURE_LINKAGE_TABLE_.
288 * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Use
289 _bfd_elf_define_linkage_sym.
290 * elf32-frv.c (_frv_create_got_section): Likewise.
291 * elf64-alpha.c (elf64_alpha_create_dynamic_sections): Likewise.
292
ce490eda
PB
2932005-08-15 Paul Brook <paul@codesourcery.com>
294
295 * elf32-arm.c (elf32_arm_howto_table_1): Make R_ARM_PLT32 the same as
296 R_ARM_PC24.
297
4fc35ca9
DA
2982005-08-13 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
299
300 PR ld/1135
301 * elf64-hppa.c (elf64_hppa_special_sections): Add flag definitions for
302 .plt, .dlt, .sdata, .sbss and .tbss.
303
fa9ee72b
DD
3042005-08-12 Dmitry Diky <diwil@spec.ru>
305
306 * elf32-msp430.c (msp430_elf_relax_delete_bytes): Adjust relocations
307 referenced by .section + DISPLACEMENT.
308
98b880f4
JW
3092005-08-10 James E. Wilson <wilson@specifix.com>
310
311 * dwarf2.c (scan_unit_for_symbols, case DT_AT_location): Verify that
312 DW_OP_addr is only opcode in location before using it.
313
a38a2e96
L
3142005-08-09 H.J. Lu <hongjiu.lu@intel.com>
315
316 * elfxx-ia64.c (elfNN_ia64_final_link): Reset gp.
317
fd6212e6
NC
3182005-08-09 Rodney Brown <rbrown@bravurasolutions.com.au>
319 Nick Clifton <nickc@redhat.com>
320
321 * aix5ppc-core.c (xcoff64_core_p): Constify return_value
322 variable. Also, do not use core_hdr macro as it evaluates to a
323 cast of an lvalue which is no longer supported by GCC 4.0.
324
44c86e8c
NC
3252005-08-08 Eric Dönges <Eric.Doenges@betty-tv.com>
326
327 * archures.c (bfd_mach_msp21): New MSP430 machine number.
328 * bfd-in2.h: Regenerate.
329 * cpu-msp430.c (arch_info_struct): Add support for msp430x21xx
330 variants.
331
957c6e41
NC
3322005-08-07 Nick Clifton <nickc@redhat.com>
333 Paul Brook <paul@codesourcery.com>
334
335 PR 1147
336 * elf32-arm.c (bfd_elf32_close_and_cleanup): Define.
337 (elf32_arm_close_and_cleanup): New function - walk over the
338 sections in the bfd that is being closed removing them from the
339 list of recorded sections.
340 (unrecord_section_via_map_over_sections): New helper function.
341 (record_section_with_arm_elf_section_data): Call bfd_malloc
342 instead of bfd_alloc. Remove unneeded abfd parameter.
343 (elf32_arm_new_section_hook): Do not pass bfd to
344 record_section_with_arm_elf_section_data.
345
346 * elfxx-target.h (bfd_elfNN_close_and_cleanup): Only define if not
347 already defined by the target.
348
a29b7e88
FF
3492005-08-05 Fred Fish <fnf@specifix.com>
350
351 * dwarf2.c (read_rangelist): Use addr_size instead of offset_size
352 to determine how many bytes to read from each rangelist entry.
353
7af8e998
L
3542005-08-05 H.J. Lu <hongjiu.lu@intel.com>
355
356 * bfd.c (bfd_hide_symbol): New.
357 * bfd-in2.h: Regenerated.
358
00492999
L
3592005-08-04 H.J. Lu <hongjiu.lu@intel.com>
360
361 * elf64-x86-64.c (elf64_x86_64_merge_symbol): When mixing a
362 large common symbol and a normal common symbol, always turn
363 the large common symbol into a normal one.
364
046183de
AM
3652005-08-04 Alan Modra <amodra@bigpond.net.au>
366
367 * elf32-ppc.c (struct elf_linker_section): Replace sym_val field
368 with sym.
369 (ppc_elf_relocate_section): Adjust for above.
370 (create_sdata_sym): New function.
371 (ppc_elf_create_linker_section): Call it.
372 (ppc_elf_check_relocs): Correct has_sda_refs and non_got_refs.
373 Create sdata syms for all SDA relocs.
374 (ppc_elf_adjust_dynamic_symbol): Don't special case _SDA_BASE_
375 and _SDA2_BASE_.
376 (ppc_elf_set_sdata_syms): Delete.
377 * elflink.c (bfd_elf_size_dynamic_sections): Don't create DT_INIT
378 and DT_FINI tags unless associated section has input.
379 (bfd_elf_set_symbol, _bfd_elf_provide_symbol): Delete.
380 (_bfd_elf_provide_section_bound_symbols): Delete.
381 * bfd-in.h (_bfd_elf_provide_symbol): Delete.
382 (_bfd_elf_provide_section_bound_symbols): Delete.
383 * bfd-in2.h: Regenerate.
384
1e035701
AM
3852005-08-04 Alan Modra <amodra@bigpond.net.au>
386
387 * elflink.c (fix_syms, _bfd_elf_fix_excluded_sec_syms): Move to..
388 * linker.c (fix_syms, _bfd_fix_excluded_sec_syms): ..here.
389 * bfd-in.h (_bfd_fix_excluded_sec_syms): Rename.
390 * bfd-in2.h: Regenerate.
391
90b263f3
L
3922005-08-03 H.J. Lu <hongjiu.lu@intel.com>
393
394 * elfxx-ia64.c (elfNN_ia64_relax_section): Resize .rela.got
395 only if it isn't NULL.
396
b0360d8c
L
3972005-08-03 H.J. Lu <hongjiu.lu@intel.com>
398
399 * elf32-i386.c (elf_howto_table): Undo the overflow change for
400 R_386_PC16 made on 2005-07-18.
401
402 * elf64-x86-64.c (x86_64_elf_howto_table): Undo the overflow
403 change for R_X86_64_PC16 made on 2005-07-18.
404
636ce3f5
AM
4052005-08-03 Alan Modra <amodra@bigpond.net.au>
406
407 * elf32-ppc.c (struct ppc_elf_link_hash_table): Remove hgot. Use
408 elf.hgot throughout file.
409
4d962050
AM
4102005-08-03 Alan Modra <amodra@bigpond.net.au>
411
412 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Correct value of
413 _GLOBAL_OFFSET_TABLE_ for > 32k GOT.
414
4a78a1f4
AS
4152005-08-02 Andreas Schwab <schwab@suse.de>
416
417 * elfxx-ia64.c (struct elfNN_ia64_allocate_data): Add only_got.
418 (elfNN_ia64_relax_section): Reallocate .rela.got when .got has
419 changed.
420 (allocate_dynrel_entries): Look only at GOT relocations when
421 only_got is true.
422 (elfNN_ia64_size_dynamic_sections): Set only_got to false before
423 calling allocate_dynrel_entries.
424
8e3de13a
NC
4252005-08-02 Nick Clifton <nickc@redhat.com>
426
427 PR 1147
428 * elf32-arm.c (struct _arm_elf_section_data): Turn into a typedef
429 and make the mapcount field unsigned.
430 (struct section_list): New: Used to keep track of which sections
431 have an _arm_elf_section_data structure.
432 (record_section_with_arm_elf_section_data): New function.
433 (get_arm_elf_section_data): New function.
434 (unrecord_section_with_arm_elf_section_data): New function.
435 (elf32_arm_output_symbol_hook): Use get_arm_elf_section_data.
436 (elf32_arm_new_section_hook): Call
437 record_section_with_arm_elf_section_data.
438 (elf32_arm_write_section): Use get_arm_elf_section_data and
439 unrecord_section_with_arm_elf_section_data.
440
c5211a54
RS
4412005-08-01 Richard Sandiford <richard@codesourcery.com>
442
443 * elfxx-mips.c (mips_mach_extends_p): Treat MIPS64 as an extension
444 of MIPS32 and MIPS64r2 as an extension of MIPS32r2.
445
1b9ee6a2
DD
4462005-07-30 David Daney <ddaney@avtrex.com>
447
448 * elflink.c (elf_gc_sweep): Set dynsymcount to correct value.
449
eedecc07
DD
4502005-07-29 David Daney <ddaney@avtrex.com>
451
452 * elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Ignore _gp_disp
453 if it is in the *ABS* section.
454
e9f89963
PB
4552005-07-29 Paul Brook <paul@codesourcery.com>
456
457 * reloc.c: Add BFD_RELOC_ARM_T32_ADD_PC12.
458 * bfd-in2.h: Regenerate.
459 * libbfd.h: Regenerate.
460
92e90b6e
PB
4612005-07-29 Paul Brook <paul@codesourcery.com>
462
463 * reloc.c (BFD_RELOC_ARM_T32_IMM12): Add.
464 * bfd-in2.h: Regeenrate.
465 * libbfd.h: Regenerate.
466
0facbdf5
NC
4672005-07-29 Pavel Kankovsky <peak@argo.troja.mff.cuni.cz>
468
469 * peXXigen.c (pe_print_edata): Compute the size of the export
470 table from the size field in the DataDictionary and not the size
471 of the section. Some linkers embed the export table inside a
472 larger section.
473
8a696751
AM
4742005-07-29 Alan Modra <amodra@bigpond.net.au>
475
476 * elf-bfd.h (struct elf_backend_data): Add action_discarded.
477 (enum action_discarded): Move from..
478 * elflink.c (enum action_discarded): ..here.
479 (_bfd_elf_default_action_discarded): Rename from elf_action_discarded.
480 Remove target specific section checks.
481 (elf_link_input_bfd): Adjust.
482 * elfxx-target.h (elf_backend_action_discarded): Define.
483 (elfNN_bed): Init new field.
484 * bfd-in.h (_bfd_elf_default_action_discarded): Declare.
485 * bfd-in2.h: Regenerate.
486 * elf-hppa.h (elf_hppa_action_discarded): New function.
487 * elf32-hppa.c (elf_backend_action_discarded): Define.
488 * elf64-hppa.c (elf_backend_action_discarded): Define.
489 * elf32-ppc.c (ppc_elf_action_discarded): New function.
490 (elf_backend_action_discarded): Define.
491
2f5028a7
AM
4922005-07-27 Alan Modra <amodra@bigpond.net.au>
493
494 * elflink.c (fix_syms): Handle symbols defined in input sections.
495
a33d77bc
JB
4962005-07-27 Jan Beulich <jbeulich@novell.com>
497
498 * elf64-x86-64.c (R_X86_64_standard, R_X86_64_vt_offset): New.
499 (elf64_x86_64_info_to_howto): Use them.
500
f41d945b
AM
5012005-07-27 Alan Modra <amodra@bigpond.net.au>
502
503 * elflink.c (_bfd_elf_merge_symbol): Skip weak redefinition
504 regardless of strength of previous definition.
505
87538722
AM
5062005-07-26 Alan Modra <amodra@bigpond.net.au>
507
508 * elflink.c (elf_gc_mark_dynamic_ref_symbol): Handle -shared.
509 (bfd_elf_gc_sections): Allow -gc-sections when -shared.
510 * elf32-ppc.c (ppc_elf_gc_sweep_hook): Correct for -shared.
511
9e8cc8b4
AM
5122005-07-26 Alan Modra <amodra@bigpond.net.au>
513
514 * elflink.c (elf_gc_sweep): Move gcc_except_table code..
515 (bfd_elf_gc_sections): ..to here.
516
fd54057a
DD
5172005-07-25 DJ Delorie <dj@redhat.com>
518
519 * reloc.c: Remove unused M32C relocs, add BFD_RELOC_M32C_HI8.
520 * libbfd.h: Regenerate.
521 * bfd-in2.h: Regenerate.
522
523 * elf32-m32c.c (m32c_elf_howto_table): Add R_M32C_8, R_M32C_LO16,
524 R_M32C_HI8, R_M32C_HI16.
525 (m32c_reloc_map): Likewise.
526 (m32c_elf_relocate_section): Add R_M32C_HI8 and R_M32C_HI16.
527
3b22753a
L
5282005-07-25 Jan Hubicka <jh@suse.cz>
529 H.J. Lu <hongjiu.lu@intel.com>
530
531 * elf-bfd.h (_bfd_elf_large_com_section): New.
532 * elf.c (_bfd_elf_large_com_section): New. Defined.
533
534 * elf64-x86-64.c (elf64_x86_64_add_symbol_hook): New.
535 (elf64_x86_64_elf_section_from_bfd_section): New.
536 (elf64_x86_64_symbol_processing): New.
537 (elf64_x86_64_common_definition): New.
538 (elf64_x86_64_common_section_index): New.
539 (elf64_x86_64_common_section): New.
540 (elf64_x86_64_merge_symbol): New.
541 (elf64_x86_64_additional_program_headers): New.
542 (elf64_x86_64_special_sections): New.
543 (elf_backend_section_from_bfd_section): New. Defined.
544 (elf_backend_add_symbol_hook): Likewise.
545 (elf_backend_common_section_index): Likewise.
546 (elf_backend_common_section): Likewise.
547 (elf_backend_common_definition): Likewise.
548 (elf_backend_merge_symbol): Likewise.
549 (elf_backend_special_sections): Likewise.
550 (elf_backend_additional_program_headers): Likewise.
551
a4d8e49b
L
5522005-07-25 H.J. Lu <hongjiu.lu@intel.com>
553
554 * elf-bfd.h (elf_backend_data): Add common_definition,
555 common_section_index, common_section, and merge_symbol.
556 (_bfd_elf_common_definition): New.
557 (_bfd_elf_common_section_index): New.
558 (_bfd_elf_common_section): New.
559
560 * elf.c (elf_fake_sections): Don't clear sh_flags.
561
562 * elflink.c (_bfd_elf_merge_symbol): Call backend merge_symbol
563 if it is available.
564 (is_global_data_symbol_definition): Call backend
565 common_definition instead of checking SHN_COMMON.
566 (elf_link_add_object_symbols): Likewise.
567 (elf_link_output_extsym): Call backend common_section_index
568 for common section index.
569 (_bfd_elf_common_definition): New.
570 (_bfd_elf_common_section_index): New.
571 (_bfd_elf_common_section): New.
572
573 * elfxx-target.h (elf_backend_common_definition): New.
574 (elf_backend_common_section_index): New.
575 (elf_backend_common_section): New.
576 (elf_backend_merge_symbol): New.
577 (elfNN_bed): Initialize common_definition, common_section_index,
578 common_section, and merge_symbol.
579
580 * section.c (BFD_FAKE_SECTION): New.
581 (STD_SECTION): Use it.
582 * bfd-in2.h: Regenerated.
583
58ac56d0
L
5842005-07-23 Olaf Hering <olh@suse.de>
585
586 * elflink.c (elf_link_input_bfd): Add '\n' for linker einfo
587 callback.
588
9f971fcb
NC
5892005-07-21 Ralf Corsepius <ralf.corsepius@rtems.org>
590
591 * config.bfd: Remove i[3-7]86-*-rtemself*.
592 Remove sparc-*-rtemself*.
593
a9b7b174
NC
5942005-07-22 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
595
596 * elf32-m32r.c (m32r_elf_check_relocs): Fix pc count for
597 R_M32R_REL32.
598
240a3425
BE
5992005-07-21 Ben Elliston <bje@gnu.org>
600
601 * Makefile.am (BFD32_BACKENDS): Remove cf-m68klynx.lo.
602 (BFD32_BACKENDS): Likewise, remove m68klynx.lo.
603 (BFD32_BACKENDS_CFILES): Remove cf-m68klynx.c, m68klynx.c.
604 (cf-m68klynx.lo, m68klynx.lo): Remove targets.
605 * Makefile.in: Regenerate.
606 * cf-m68klynx.c: Remove.
607 * m68klynx.c: Likewise.
608 * configure.in (m68klynx_aout_vec): Remove vector.
609 (m68klynx_coff_vec): Likewise.
610 * configure: Regenerate.
611 * targets.c (m68klynx_aout_vec): Remove extern.
612 (m68klynx_coff_vec): Likewise.
613 (_bfd_target_vector): Remove m68klynx_{aout,coff}_vec.
614 * po/SRC-POTFILES.in: Remove cf-m68klynx.c, m68klynx.c.
615
157e7bd1
NC
6162005-07-20 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
617
618 * elf32-m32r.c (m32r_elf_howto_table): Support R_M32R_REL32.
619 (m32r_reloc_map): Likewise.
620 (m32r_elf_relocate_section): Likewise.
621 (m32r_elf_gc_sweep_hook): Likewise.
622 (m32r_elf_check_relocs): Likewise.
623
85da3a56
NC
6242005-07-18 Nick Clifton <nickc@redhat.com>
625
626 * reloc.c: Add M32C and MS1 relocs.
627 * bfd-in2.h: Regenerate.
628 * libbfd.h: Regenerate.
629
6302005-07-18 Nick Clifton <nickc@redhat.com>
631
632 * config.bfd: Move m32c entry to correct location.
9e8cc8b4
AM
633 * archures.c: Likewise.
634 * configure.in: Likewise.
635 * configure: Regenerate.
636 * targets.c: Move ms1 vector to correct location.
85da3a56 637
ac2aa337
JB
6382005-07-18 Jan Beulich <jbeulich@novell.com>
639
640 * elf32-i386.c (elf_howto_table): Adjust overflow complaint handler
641 for R_386_PC16.
642 * elf64-x86-64.c (x86_64_elf_howto_table): Adjust overflow complaint
643 handler for R_X86_64_PC16, R_X86_64_8, and R_X86_64_DTPOFF.
644
9a20ed6e 6452005-07-16 Eric Botcazou <ebotcazou@libertysurf.fr>
cc86ff91
EB
646
647 PR ld/1021
648 PR ld/1031
649 * elflink.c (elf_link_add_object_symbols): Also append the version
650 name to non-hidden absolute symbols that are functions.
651
42fa7765
AM
6522005-07-16 Alan Modra <amodra@bigpond.net.au>
653
654 * elf32-ppc.c (ppc_elf_set_sdata_syms): Return void. Remove hack
655 for zero size sections. Don't set .sbss syms here.
656 * elf32-ppc.h (ppc_elf_set_sdata_syms): Adjust prototype.
657
0f82ff91
AM
6582005-07-16 Alan Modra <amodra@bigpond.net.au>
659
660 * Makefile.am: Run "make dep-am".
661 * Makefile.in: Regenerate.
662
2db662be
BW
6632005-07-15 Bob Wilson <bob.wilson@acm.org>
664
665 * elf32-xtensa.c (vsprint_msg): Add prototype.
666 (build_encoding_error_message): Delete. Code moved into....
667 (elf_xtensa_do_reloc): ....here, and changed to give better
668 error messages for out of range literals.
669
eaae8ded
AM
6702005-07-15 Alan Modra <amodra@bigpond.net.au>
671
672 * elflink.c (bfd_elf_record_link_assignment): Remove output_bfd param.
673 (_bfd_elf_provide_symbol): Allow redefinition of weak syms and those
674 defined in output sections. Call bfd_elf_record_link_assignment.
675 * bfd-in.h (bfd_elf_record_link_assignment): Update prototype.
676 * bfd-in2.h: Regenerate.
677
49f58d10
JB
6782005-07-14 Jim Blandy <jimb@redhat.com>
679
680 Add support for m32c-*-elf (Renesas m32c and m16c).
681 * Makefile.am (ALL_MACHINES): Add cpu-m32c.lo.
682 (ALL_MACHINES_CFILES): Add cpu-m32c.c.
683 (BFD32_BACKENDS): Add elf32-m32c.lo.
684 (BFD32_BACKENDS_CFILES): Add elf32-m32c.c.
685 (cpu-m32c.lo, elf32-m32c.lo): New rules, generated by 'make dep-am'.
686 * Makefile.in: Regenerated.
687 * archures.c (bfd_arch_m32c, bfd_mach_m16c, bfd_mach_m32c): New
688 arch and mach codes.
689 (bfd_m32c_arch): New arch info object.
690 (bfd_archures_list): List bfd_m32c_arch.
691 * bfd-in2.h: Regenerated.
692 * config.bfd: Add case for the m32c.
693 * configure.in: Add case for the m32c.
694 * configure: Regenerated.
695 * cpu-m32c.c, elf32-m32c.c: New files.
696 * libbfd.h: Regenerated.
697 * targets.c (bfd_elf32_m32c_vec): Declare.
698 (_bfd_target_vector): List bfd_elf32_m32c_vec.
699
a3c2b96a
AM
7002005-07-14 Alan Modra <amodra@bigpond.net.au>
701
702 * bfd-in.h (_bfd_elf_fix_excluded_sec_syms): Declare.
703 (_bfd_elf_provide_section_bound_symbols): Remove param name.
704 Formatting.
705 * bfd-in2.h: Regenerate.
706 * elflink.c (bfd_elf_gc_sections): Don't call generic function.
707 (_bfd_elf_provide_symbol): Formatting.
708 (_bfd_elf_provide_section_bound_symbols): Remove all hacks, just
709 create section relative syms.
710 (fix_syms, _bfd_elf_fix_excluded_sec_syms): New functions.
711 * elf32-ppc.c (ppc_elf_set_sdata_syms): Use
712 _bfd_elf_provide_section_bound_symbols.
713 * reloc.c (bfd_mark_used_section): Delete.
714 (bfd_generic_gc_sections): Don't call the above.
715
1787c340
NC
7162005-07-14 Paul Woegerer <paul.woegerer@nsc.com>
717
cb4aa473 718 PR 1063
1787c340
NC
719 * cache.c (bfd_last_cache): Initialise to NULL.
720
15ac1d4f
NC
7212005-07-14 Daniel Marques <marques@cs.cornell.edu>
722 Nick Clifton <nickc@redhat.com>
723
724 * coff-alpha.c (alpha_ecoff_bad_format_hook): Detect compressed
725 Alpha binaries and issue a helpful error message.
726 (alpha_ecoff_swap_reloc_out): Increase maximum allowed internal
727 symbol index to 15 to allow for binaries produced by DEC
a3c2b96a 728 compilers.
15ac1d4f 729
d4909375
SE
7302005-07-13 Steve Ellcey <sje@cup.hp.com>
731
732 * bfd.m4 (BFD_NEED_DECLARATION): Remove.
733
15b552e9
AM
7342005-07-12 Alan Modra <amodra@bigpond.net.au>
735
736 * elf64-ppc.c (ppc64_elf_relocate_section): Don't use a plt stub
737 when !can_plt_call.
738
70961b9d
AM
7392005-07-12 Alan Modra <amodra@bigpond.net.au>
740
741 * elf32-xtensa.c (bfd_elf_xtensa_reloc): Warning fix.
742
632a56fd
AM
7432005-07-12 Alan Modra <amodra@bigpond.net.au>
744
745 * elf32-ppc.c (ppc_elf_set_sdata_syms): Correct __sbss_start value.
746
49ff44d6
L
7472005-07-11 H.J. Lu <hongjiu.lu@intel.com>
748
749 * elflink.c (_bfd_elf_symbol_refs_local_p): Revert the last
750 change.
751
0af4cd7c
PK
7522005-07-08 Paul Koning <pkoning@equallogic.com>
753
754 * dwarf2.c (read_address): Check sign_extend_vma to handle targets
755 where addresses are sign extended.
756
7e4e2059
NC
7572005-07-08 Ralf Corsepius <ralf.corsepius@rtems.org>
758
759 * config.bfd: Mark i960-*-rtems*, or32-*-rtems* as obsolete.
a3c2b96a 760 Mark a29k-*rtems*, hppa*-*-rtems*, *-go32-rtems*,
7e4e2059
NC
761 i[3-7]86*-*-rtemscoff*, mips*el-*-rtems*, powerpcle-*-rtems*,
762 sparc*-*-rtemsaout* as removed
763
c456f082
AM
7642005-07-08 Alan Modra <amodra@bigpond.net.au>
765
766 * elf-hppa.h (elf_hppa_final_link): Use gp val of zero when none
767 of the usual sections are found.
768 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Tidy.
769 Strip .dynbss if it is zero size.
770 * elf32-arm.c (elf32_arm_size_dynamic_sections): Likewise.
771 * elf32-cris.c (elf_cris_size_dynamic_sections): Likewise.
772 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
773 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise, and
774 .dynsbss.
775 (i370_elf_finish_dynamic_sections): Don't attempt to write .got
776 when it is zero size.
777 * elf32-i386.c (elf_i386_size_dynamic_sections): Correct handling
778 of .dynbss and zero size sections.
779 * elf32-m32r.c (m32r_elf_size_dynamic_sections): Strip .dynbss if
780 it is zero size.
781 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Tidy. Strip
782 .dynbss if zero size.
783 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise, .dynsbss
784 too.
785 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
786 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
787 * elf32-vax.c (elf_vax_size_dynamic_sections): Likewise.
788 * elf32-xtensa.c (elf_xtensa_size_dynamic_sections): Tidy. Strip
789 .plt.* and .got.plt.* if zero size.
790 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Tidy. Strip
791 .got* and .dynbss if zero size.
792 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Tidy. Strip
793 * elf64-ppc.c (create_linkage_sections): Create branch lookup table
794 in .data.rel.ro.brlt or .rodata.brlt, and similarly for associated
795 reloc section.
796 (create_got_section): Always create new .got and .rela.got sections.
797 (ppc64_elf_size_dynamic_sections): Tidy. Strip .dynbss if zero size.
798 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
799 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
800 * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections): Handle
801 dynamic bss sections correctly.
802 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Tidy.
803 * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Tidy. Strip
804 .dynbss if zero size.
805
6c98dd1e
BE
8062005-07-08 Ben Elliston <bje@au.ibm.com>
807
808 * elf32-xtensa.c: Include <stdarg.h> unconditionally, not only
809 when ANSI_PROTOTYPES is defined. Remove #ifdef logic.
810
29ef7005
L
8112005-07-07 H.J. Lu <hongjiu.lu@intel.com>
812
813 * elf-bfd.h (elf_backend_data): Add special_sections.
814
815 * elf.c (_bfd_elf_get_sec_type_attr): Check special_sections
816 first.
817
818 * elf32-arm.c (elf_backend_get_sec_type_attr): Removed.
819 (elf_backend_special_sections): New. Defined.
820 * elf32-m32r.c: Likewise.
821 * elf32-m68hc11.c: Likewise.
822 * elf32-m68hc12.c: Likewise.
823 * elf32-mcore.c: Likewise.
824 * elf32-sh64.c: Likewise.
825 * elf32-v850.c: Likewise.
826 * elf32-xtensa.c: Likewise.
827 * elf64-alpha.c: Likewise.
828 * elf64-hppa.c: Likewise.
829 * elf64-ppc.c: Likewise.
830 * elf64-sh64.c: Likewise.
831 * elfxx-ia64.c: Likewise.
832 * elfxx-mips.c: Likewise.
833 * elfxx-mips.h: Likewise.
834
835 * elfxx-target.h (elf_backend_special_sections): New.
836 (elfNN_bed): Initialize special_sections.
837
074f5109
BW
8382005-07-07 Bob Wilson <bob.wilson@acm.org>
839
840 * xtensa-modules.c: Update tables with Xtensa MMU features.
841
0fd3a477
JW
8422005-07-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
843
844 * elf32-xtensa.c (vsprint_msg): Add format attribute. Fix
845 format bugs.
846 * vms.h (_bfd_vms_debug): Add format attribute.
847 (_bfd_vms_debug, _bfd_hexdump): Fix typos.
848
9968d831
L
8492005-07-07 H.J. Lu <hongjiu.lu@intel.com>
850
851 PR 975
852 * elflink.c (_bfd_elf_symbol_refs_local_p): Only undefined
853 symbol with default visibility is local.
854
3b1fcf96
BE
8552005-07-07 Ben Elliston <bje@gnu.org>
856
857 * config.bfd: Mark m68*-*-rtemscoff as obsolete.
858
5cf2e3f0
L
8592005-07-06 H.J. Lu <hongjiu.lu@intel.com>
860
861 * dwarf2.c (varinfo): Add addr.
862 (lookup_symbol_in_variable_table): Also check addr.
863 (scan_unit_for_symbols): Set addr for variable.
864 (comp_unit_find_line): Updated.
865
0adc9281
NC
8662005-07-06 Nick Clifton <nickc@redhat.com>
867
868 * coff-alpha.c (alpha_adjust_reloc_in): Issue an informative error
869 message if an unknown reloc is encountered.
870 (alpha_relocate_section): Likewise.
871
872 * ecoff.c (_bfd_ecoff_write_object_contents): Cope with a reloc
873 with a missing howto field.
874
cfbe541f
AM
8752005-07-06 Alan Modra <amodra@bigpond.net.au>
876
877 * po/SRC-POTFILES.in: Add cpu-ms1.c, elf32-ms1.c, elf-vxworks.c,
878 elfxx-sparc.c.
879
d5e3d971
PB
8802005-07-05 Paul Brook <paul@codesourcery.com>
881
882 * elf32-ppc.c (ppc_elf_vxworks_special_sections): Remove.
883 (ppc_elf_vxworks_get_sec_type_attr): New function.
884 (elf_backend_special_sections): Remove vxwords definition.
885 (elf_backend_get_sec_type_attr): Define for vxworks.
886
3ec2b351
NC
8872005-07-05 Nick Clifton <nickc@redhat.com>
888
889 * elf64-ppc.c (ppc64_elf_info_to_howto): Fix typo.
890
d5e3d971 8912005-07-05 Paul Brook <paul@codesourcery.com>
9d8504b1
PB
892
893 * config.bfd: Add separate case for ppc-vxworks.
894 * configure: Regenerate.
895 * configure.in: Include elf-vxworks.lo on ppc targets.
896 * elf-vxworks.c (elf_vxworks_final_write_processing): Handle
897 .rela.plt.unloaded.
898 * elf32-ppc.c: Add VxWorks target vec. Include elf-vxworks.h.
899 (PLT_ENTRY_SIZE, PLT_INITIAL_ENTRY_SIZE, PLT_SLOT_SIZE): Remove.
900 (VXWORKS_PLT_ENTRY_SIZE, ppc_elf_vxworks_plt_entry,
901 ppc_elf_vxworks_pic_plt_entry, VXWORKS_PLT_INITIAL_ENTRY_SIZE,
902 ppc_elf_vxworks_plt0_entry, ppc_elf_vxworks_pic_plt0_entry,
903 VXWORKS_PLT_NON_JMP_SLOT_RELOCS, VXWORKS_PLTRESOLVE_RELOCS,
904 VXWORKS_PLTRESOLVE_RELOCS_SHLIB): New.
905 (ppc_elf_link_hash_table): Add srelplt2, sgotplt, hgot, hplt,
906 is_vxworks, plt_entry_size, plt_slot_size, plt_initial_entry_size.
907 (ppc_elf_link_hash_table_create): Initialize hadtab plt fields.
908 (ppc_elf_create_got): Create .got.plt for VxWorks.
909 (ppc_elf_create_dynamic_sections): Create unloaded plt relocation
910 section for VxWorks.
911 (ppc_elf_select_plt_layout): Handle VxWorks plt format.
912 (allocate_got): VxWorks does not need a got header.
913 (allocate_dynrelocs): Handle VxWorks plt format.
914 (ppc_elf_size_dynamic_sections): Save _G_O_T_ and _P_L_T_ symbols for
915 VxWorks. Handle VxWorks plt/got.
916 (ppc_elf_finish_dynamic_sections): Fill in VxWorks plt.
917 (ppc_elf_vxworks_special_sections): New.
918 (ppc_elf_vxworks_link_hash_table_create,
919 ppc_elf_vxworks_add_symbol_hook,
920 elf_i386_vxworks_link_output_symbol_hook,
921 ppc_elf_vxworks_final_write_processing): New functions.
922 * targets.c (bfd_elf32_powerpc_vxworks_vec): Declare.
923 (_bfd_target_vector): Use it.
924
c6c60d09
JJ
9252005-07-05 Jakub Jelinek <jakub@redhat.com>
926
9e492e05
JJ
927 * libbfd-in.h (struct artdata): Add extended_names_size field.
928 * libbfd.h: Rebuilt.
929 * coff-rs600.c (_bfd_xcoff_archive_p): Don't clear fields in freshly
930 allocated object by bfd_zalloc.
931 * coff64-rs6000.c (xcoff64_archive_p): Likewise.
932 * ecoff.c (_bfd_ecoff_archive_p): Likewise.
933 * archive.c (_bfd_generic_mkarchive, bfd_generic_archive_p): Likewise.
934 (get_extended_arelt_filename): Fail if index is bigger or equal to
935 extended_names_size.
936 (_bfd_generic_read_ar_hdr_mag): Don't set bfd_error_malformed_archive,
937 get_extended_arelt_filename already did that.
938 (_bfd_slurp_extended_name_table): Initialize extended_names_size field.
939 Allocate one extra byte and clear it, in case extended names table
940 is not terminated.
941
d0fb9a8d
JJ
942 * libbfd-in.h (bfd_malloc2, bfd_realloc2, bfd_zmalloc2, bfd_alloc2,
943 bfd_zalloc2): New prototypes.
944 * bfd-in.h (HALF_BFD_SIZE_TYPE): Define.
945 * libbfd.c (bfd_malloc2, bfd_realloc2, bfd_zmalloc2): New functions.
946 * opncls.c (bfd_alloc2, bfd_zalloc2): New functions.
947 * elf.c (bfd_elf_get_elf_syms, setup_group, assign_section_numbers,
948 elf_map_symbols, map_sections_to_segments,
949 assign_file_positions_for_segments, copy_private_bfd_data,
950 swap_out_syms, _bfd_elf_slurp_version_tables): Use bfd_*alloc2
951 where appropriate.
952 * bfd-in2.h: Rebuilt.
953 * libbfd.h: Rebuilt.
954
955 * elf.c (_bfd_elf_print_private_bfd_data): Don't crash on bogus
956 verdef or verneed section.
957 (_bfd_elf_slurp_version_tables): Handle corrupt verdef and/or
958 verneed sections gracefully.
959 * elfxx-sparc.c (_bfd_sparc_elf_info_to_howto_ptr): Don't crash on
960 bogus relocation values.
961 * elf64-ppc.c (ppc64_elf_info_to_howto): Likewise.
962 * elf64-s390.c (elf_s390_info_to_howto): Likewise.
963 * elf32-s390.c (elf_s390_info_to_howto): Likewise.
964 * elf64-x86-64.c (elf64_x86_64_info_to_howto): Likewise.
965 * elfxx-ia64.c (lookup_howto): Likewise.
966
c6c60d09
JJ
967 * elf.c (bfd_elf_get_str_section): Allocate an extra byte after
968 the end of strtab and clear it.
969 (elf_read): Remove.
970
dcd4b381
NC
9712005-07-05 Nick Clifton <nickc@redhat.com>
972
973 * po/vi.po: New Vietnamese translation.
974 * configure.in (ALL_LINGUAS): Add vi.
975 * configure: Regenerate.
976
8532796c
NC
9772005-07-05 Peter S. Mazinger <ps.m@gmx.net>
978
979 * elf32-arm.c (elf32_arm_size_dynamic_sections): Fix a typo and
980 touchup logic like i386/ppc.
981
b35d266b
AM
9822005-07-05 Alan Modra <amodra@bigpond.net.au>
983
984 * elf.c (special_sections): Move const qualifier.
985 (special_sections_b..special_sections_t): Likewise.
986 * elf32-arm.c (elf32_arm_symbian_get_sec_type_attr): Remove duplicate
987 const.
988 (elf32_arm_symbian_special_sections): Move const qualifier.
989 * elf32-m32r.c: Similarly.
990 * elf32-m68hc11.c: Similarly.
991 * elf32-m68hc12.c: Similarly.
992 * elf32-mcore.c: Similarly.
993 * elf32-ppc.c: Similarly.
994 * elf32-sh64.c: Similarly.
995 * elf32-v850.c: Similarly.
996 * elf32-xtensa.c: Similarly.
997 * elf64-alpha.c: Similarly.
998 * elf64-hppa.c: Similarly.
999 * elf64-ppc.c: Similarly.
1000 * elf64-sh64.c: Similarly.
1001 * elfxx-ia64.c: Similarly.
1002 * elfxx-mips.c: Similarly.
1003
80447b21
NC
10042005-07-04 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
1005
1006 * elf32-m32r.c (m32r_elf_size_dynamic_sections): Use
1007 info->executable instead of !info->shared where appropriate.
1008
540b09cb
AM
10092005-07-04 Alan Modra <amodra@bigpond.net.au>
1010
1011 PR 1042
1012 * elf.c (assign_file_positions_for_segments): Remove excluded
1013 sections from the segment map.
1014
551b43fd
AM
10152005-07-04 Alan Modra <amodra@bigpond.net.au>
1016
1017 PR 1004
1018 * elf-bfd.h (struct elf_backend_data): Add get_sec_type_attr. Delete
1019 special_sections.
1020 (_bfd_elf_get_special_section): Declare.
1021 (bfd_elf_special_section): Update prototype.
1022 * elf.c (special_sections): Remove unused outer entries.
1023 (get_special_section): Delete.
1024 (_bfd_elf_get_special_section): New function.
1025 (_bfd_elf_get_sec_type_attr): Replace "name" arg with "sec". Update
1026 special_sections indexing.
1027 (_bfd_elf_new_section_hook): Call backend get_sec_type_attr.
1028 * elf32-arm.c (symbian_special_sections_d): Delete.
1029 (symbian_special_sections_g, symbian_special_sections_h): Delete.
1030 (symbian_special_sections_i, symbian_special_sections_f): Delete.
1031 (symbian_special_sections_p): Delete.
1032 (elf32_arm_symbian_special_sections): Merge above to here.
1033 (elf32_arm_symbian_get_sec_type_attr): New function.
1034 (elf_backend_special_sections): Don't define.
1035 (elf_backend_get_sec_type_attr): Define.
1036 * elf32-m32r.c: Similarly to elf32-arm.c.
1037 * elf32-m68hc11.c: Likewise.
1038 * elf32-m68hc12.c: Likewise.
1039 * elf32-mcore.c: Likewise.
1040 * elf32-sh64.c: Likewise.
1041 * elf32-v850.c: Likewise.
1042 * elf32-xtensa.c: Likewise.
1043 * elf64-alpha.c: Likewise.
1044 * elf64-hppa.c: Likewise.
1045 * elf64-ppc.c: Likewise.
1046 * elf64-sh64.c: Likewise.
1047 * elfxx-ia64.c: Likewise.
1048 * elfxx-mips.c: Likewise.
1049 * elf32-ppc.c: Likewise.
1050 (bfd_elf_special_section ppc_alt_plt): New. Use it if .plt loadable.
1051 * elfxx-mips.h (_bfd_mips_elf_get_sec_type_attr): Declare.
1052 (_bfd_mips_elf_special_sections, elf_backend_special_sections): Delete.
1053 (elf_backend_get_sec_type_attr): Define.
1054 * elfxx-target.h (elf_backend_get_sec_type_attr): Define.
1055 (elf_backend_special_sections): Don't define.
1056 (elfNN_bed): Update.
1057
47b0e7ad
NC
10582005-07-01 Nick Clifton <nickc@redhat.com>
1059
1060 * cpu-d10v.c: Update to ISO C90 style function declarations and
1061 fix formatting.
1062 * cpu-d30v.c: Likewsie.
1063 * cpu-i370.c: Likewsie.
1064 * cpu-xstormy16.c: Likewsie.
1065 * elf32-arc.c: Likewsie.
1066 * elf32-d10v.c: Likewsie.
1067 * elf32-d30v.c: Likewsie.
1068 * elf32-dlx.c: Likewsie.
1069 * elf32-i370.c: Likewsie.
1070 * elf32-i960.c: Likewsie.
1071 * elf32-ip2k.c: Likewsie.
1072 * elf32-m32r.c: Likewsie.
1073 * elf32-mcore.c: Likewsie.
1074 * elf32-openrisc.c: Likewsie.
1075 * elf32-or32.c: Likewsie.
1076 * elf32-pj.c: Likewsie.
1077 * elf32-v850.c: Likewsie.
1078 * elf32-xstormy16.c: Likewsie.
1079
85d162e6
AM
10802005-07-01 Alan Modra <amodra@bigpond.net.au>
1081
1082 * elf64-alpha.c (elf64_alpha_create_got_section): Always create
1083 a new .got section.
1084 (elf64_alpha_create_dynamic_sections): Always make new sections
1085 by using bfd_make_section_anyway_with_flags. Check that .got not
1086 already created.
1087 (elf64_alpha_check_relocs): Delete "got_created". Use tdata->gotobj
1088 instead.
1089
b116d4a7
AM
10902005-06-30 Alan Modra <amodra@bigpond.net.au>
1091
1092 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Ignore dynamic
1093 _SDA_BASE_ and _SDA2_BASE_ symbols.
1094 * elflink.c (_bfd_elf_provide_symbol): Correct comment. Define
1095 sym if not def_regular.
1096 (_bfd_elf_provide_section_bound_symbols): Similarly.
1097
7f41b278
BE
10982005-06-30 Ben Elliston <bje@gnu.org>
1099
1100 * config.bfd: Mark as obsolete:
1101 m68*-apollo-*
1102 m68*-apple-aux*
1103 m68*-bull-sysv*
1104
39c2f51b
AM
11052005-06-29 Alan Modra <amodra@bigpond.net.au>
1106
1107 * elflink.c (_bfd_elf_gc_mark): Mark sections referenced by
1108 .eh_frame specially..
1109 (bfd_elf_gc_sections): ..rather than totally ignoring .eh_frame.
1110 Don't recheck sections we have already marked.
1111 (elf_gc_sweep): Keep non-code sections referenced from .eh_frame.
1112 * section.c (struct bfd_section): Add gc_mark_from_eh.
1113 (STD_SECTION): Adjust.
1114 * ecoff.c (bfd_debug_section): Adjust.
1115 * bfd-in2.h: Regenerate.
1116
e8aaee2a
AM
11172005-06-29 Alan Modra <amodra@bigpond.net.au>
1118
1119 * elflink.c (elf_gc_sweep): Do not refcount on sections that have
1120 not been processed by check_relocs.
1121
3b2175db
PB
11222005-06-29 Paul Brook <paul@codesourcery.com>
1123
1124 * bfd-in.h (_bfd_elf_provide_symbol): Update prototype.
1125 * bfd-in2.h: Regenerate.
1126 * elf32-ppc.c (ppc_elf_set_sdata_syms): Make sdata symbols section
1127 relative.
1128 * elflink.c (bfd_elf_set_symbol): Add section argument.
1129 (_bfd_elf_provide_symbol): Ditto.
1130 (_bfd_elf_provide_section_bound_symbols): Pass NULL section argument.
1131
a63e02c7
DA
11322005-06-27 Carlos O'Donell <carlos@systemhalted.org>
1133
c456f082 1134 * bfd/elf32-hppa.c (struct elf32_hppa_stub_hash_entry):
a63e02c7
DA
1135 Use bh_root, and hh.
1136 (struct elf32_hppa_link_hash_entry): Use eh, and hsh_cache.
1137 (struct elf32_hppa_dyn_reloc_entry): Use hdh_next.
1138 (struct elf32_hppa_link_hash_table): Use etab and bstab.
1139 (stub_hash_newfunc): Use hh.
1140 (hppa_link_hash_newfunc): Use hsh_cache.
1141 (elf32_hppa_link_hash_table_create): Use etab, and bstab.
1142 (elf32_hppa_link_hash_table_free): Use bstab.
1143 (hppa_stub_name): Use eh.
1144 (hppa_get_stub_entry): Use hh, hsh_entry, and hsh_cache.
1145 (hppa_add_stub): Use bstab.
1146 (hppa_type_of_stub): Use eh.
1147 (hppa_build_one_stub): Use hh and bh_root.
1148 (elf32_hppa_copy_indirect_symbol): Use hdh_next.
1149 (elf32_hppa_check_relocs): Use eh, etab, and hdh_next.
1150 (elf32_hppa_gc_sweep_hook): Use hdh_next.
1151 (elf32_hppa_adjust_dynamic_symbol): Use hdh_next, and etab.
1152 (allocate_plt_static): Use etab.
1153 (allocate_dynrelocs): Use etab, and hdh_next.
1154 (readonly_dynrelocs): Use hdh_next.
1155 (elf32_hppa_size_dynamic_sections): Use etab, and hdh_next.
1156 (get_local_syms): Use eh, bstab, and hh.
1157 (elf32_hppa_size_stubs): Use eh, bstab, and hh.
1158 (elf32_hppa_set_gp): Use etab.
1159 (elf32_hppa_build_stubs): Use bstab.
1160 (final_link_relocate): Use eh, bh_root.
1161 (elf32_hppa_relocate_section): Use elf, etab.
1162 (elf32_hppa_finish_dynamic_sections): Use etab.
1163
5f1cb353
L
11642005-06-27 H.J. Lu <hongjiu.lu@intel.com>
1165
1166 * elfxx-ia64.c (elfNN_hpux_backend_symbol_processing): Remove
1167 the extra `;'.
1168
875c0872
DA
11692005-06-21 Carlos O'Donell <carlos@systemhalted.org>
1170
1171 * bfd/elf32-hppa.c (hppa_elf_hash_entry): Define.
1172 (hppa_stub_hash_entry): Define.
1173 (stub_hash_newfunc): Rename variables.
1174 (hppa_link_hash_newfunc): Likewise.
1175 (elf32_hppa_link_hash_table_free): Likewise.
1176 (hppa_stub_name): Likewise.
1177 (hppa_get_stub_entry): Likewise.
1178 (hppa_add_stub): Likewise.
1179 (hppa_type_of_stub): Likewise.
1180 (hppa_build_one_stub): Likewise.
1181 (hppa_size_one_stub): Likewise.
1182 (elf32_hppa_create_dynamic_sections): Likewise.
1183 (elf32_hppa_copy_indirect_symbol): Likewise.
1184 (elf32_hppa_check_relocs): Likewise.
1185 (elf32_hppa_gc_mark_hook): Likewise.
1186 (elf32_hppa_gc_sweep_hook): Likewise.
1187 (elf32_hppa_grok_psinfo): Likewise.
1188 (elf32_hppa_hide_symbol): Likewise.
1189 (elf32_hppa_adjust_dynamic_symbol): Likewise.
1190 (allocate_dynrelocs): Likewise.
1191 (clobber_millicode_symbols): Likewise.
1192 (readonly_dynrelocs): Likewise.
1193 (elf32_hppa_size_dynamic_sections): Likewise.
1194 (get_local_syms): Likewise.
1195 (elf32_hppa_size_stubs): Likewise.
1196 (hppa_record_segment_addr): Likewise.
1197 (final_link_relocate): Likewise.
1198 (elf32_hppa_relocate_section): Likewise.
1199 (elf32_hppa_finish_dynamic_symbol): Likewise.
1200
973a3492
L
12012005-06-20 H.J. Lu <hongjiu.lu@intel.com>
1202
1203 PR 1025
1204 * elf-m10300.c (mn10300_elf_check_relocs): Handle indirect
1205 symbol.
1206 * elf32-arm.c (elf32_arm_check_relocs): Likewise.
1207 * elf32-avr.c (elf32_avr_check_relocs): Likewise.
1208 * elf32-cris.c (cris_elf_check_relocs): Likewise.
1209 * elf32-d10v.c (elf32_d10v_check_relocs): Likewise.
1210 * elf32-dlx.c (elf32_dlx_check_relocs): Likewise.
1211 * elf32-fr30.c (fr30_elf_check_relocs): Likewise.
1212 * elf32-frv.c (elf32_frv_check_relocs): Likewise.
1213 * elf32-i370.c (i370_elf_check_relocs): Likewise.
1214 * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
1215 * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
1216 * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
1217 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
1218 * elf32-mcore.c (mcore_elf_check_relocs): Likewise.
1219 * elf32-ms1.c (ms1_elf_check_relocs): Likewise.
1220 * elf32-msp430.c (elf32_msp430_check_relocs): Likewise.
1221 * elf32-openrisc.c (openrisc_elf_check_relocs): Likewise.
1222 * elf32-ppc.c (ppc_elf_check_relocs): Likewise.
1223 * elf32-s390.c (elf_s390_check_relocs): Likewise.
1224 * elf32-sh.c (sh_elf_check_relocs): Likewise.
1225 * elf32-v850.c (v850_elf_check_relocs): Likewise.
1226 * elf32-vax.c (elf_vax_check_relocs): Likewise.
1227 * elf64-mmix.c (mmix_elf_check_relocs): Likewise.
1228 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
1229 * elf64-s390.c (elf_s390_check_relocs): Likewise.
1230 * elf64-sh64.c (sh_elf64_check_relocs): Likewise.
1231 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
1232 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
1233
71cb9464
L
12342005-06-20 H.J. Lu <hongjiu.lu@intel.com>
1235
f7c5057a
L
1236 PR 1022
1237 * elf32-hppa.c (elf32_hppa_check_relocs): Handle indirect
1238 symbol.
1239
12402005-06-20 H.J. Lu <hongjiu.lu@intel.com>
1241
1242 PR 1025
71cb9464
L
1243 * elf32-i386.c (elf_i386_check_relocs): Handle indirect symbol.
1244 * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
1245
73d147dc
L
12462005-06-18 H.J. Lu <hongjiu.lu@intel.com>
1247
1248 * reloc.c: Add BFD_RELOC_X86_64_GOTOFF64 and
1249 BFD_RELOC_X86_64_GOTPC32.
1250 * bfd-in2.h: Regenerated.
1251
a50b2160
JJ
12522005-06-17 Jakub Jelinek <jakub@redhat.com>
1253
aa2ca951
JJ
1254 * elf.c (bfd_section_from_shdr): Kill bogus warning.
1255
a50b2160
JJ
1256 * elf.c (bfd_section_from_shdr): Fail if sh_entsize is bogus for
1257 symbol, relocation, group or versym sections.
1258
1259 * coffcode.h (coff_slurp_reloc_table): Don't crash if native_relocs
1260 is NULL.
1261 * peXXigen.c (pe_print_idata): Don't crash if dll_name or start_address
1262 doesn't point into the section.
1263
d6ab8113
JB
12642005-06-17 Jan Beulich <jbeulich@novell.com>
1265
1266 * bfd-in2.h (elf_x86_64_reloc_type): Add BFD_RELOC_X86_64_GOTOFF64
1267 and BFD_RELOC_X86_64_GOTPC32.
1268 * libbfd.h (bfd_reloc_code_real_names): Likewise.
1269 * elf64-x86-64.c (x86_64_elf_howto_table): Add entries for
1270 R_X86_64_PC64, R_X86_64_GOTOFF64, and R_X86_64_GOTPC32.
1271 (x86_64_reloc_map): Add entries for R_X86_64_PC64, R_X86_64_GOTOFF64,
1272 and R_X86_64_GOTPC32.
1273 (elf64_x86_64_info_to_howto): Adjust bounding relocation type.
1274 (elf64_x86_64_check_relocs): Also handle R_X86_64_PC64,
1275 R_X86_64_GOTOFF64, and R_X86_64_GOTPC32.
1276 (elf64_x86_64_relocate_section): Likewise.
1277 (elf64_x86_64_gc_sweep_hook): Also handle R_X86_64_PC64.
1278
b820f1e4
MK
12792005-06-15 Mark Kettenis <kettenis@gnu.org>
1280
1281 * archive.c: Include "libiberty.h".
1282
46767561
NC
12832005-06-15 Nick Clifton <nickc@redhat.com>
1284
1285 * elf32-v850.c (ELF_MACHINE_ALT2): Define so that binaries
1286 produced by the GreenHills toolchain can be assimilated.
1287
580a09db
DA
12882005-06-14 Steve Ellcey <sje@cup.hp.com>
1289
1290 * som.c (som_find_inliner_info): New.
1291
91134c82
L
12922005-06-14 H.J. Lu <hongjiu.lu@intel.com>
1293
1294 * elflink.c (_bfd_elf_merge_symbol): Fix a typo in comment.
1295
933d961a
JJ
12962005-06-14 Jakub Jelinek <jakub@redhat.com>
1297
1298 * elf.c (bfd_section_from_shdr): Fail if name is NULL.
1299 Prevent endless recursion on broken objects.
1300
1301 * archive.c (do_slurp_coff_armap): Check for overflows.
1302
9a44bbd9
DJ
13032005-06-10 Daniel Jacobowitz <dan@codesourcery.com>
1304
1305 * elfcode.h (elf_write_relocs): Do nothing if there are no
1306 relocations.
1307
75758e9d
AM
13082005-06-10 Alan Modra <amodra@bigpond.net.au>
1309
1310 * dwarf2.c (decode_line_info): Revert last change. Instead set
1311 initial low_pc to -1 to avoid need to test whether loc_pc has
1312 been set.
1313
2ae0844c
CF
13142005-06-09 Christopher Faylor <cgf@timesys.com>
1315
1316 * coffcode.h (sec_to_styp_flags): Set appropriate section flags when
1317 either SEC_ALLOC OR SEC_LOAD.
1318
3b137b9a
CF
13192005-06-09 Christopher Faylor <cgf@timesys.com>
1320
1321 * coffcode.h (sec_to_styp_flags): Remove read/write flags from noload
1322 section header. Do not add STYP_NOLOAD since it does not appear to be
1323 a valid PE flag.
1324
6bd00c5d
L
13252005-06-09 H.J. Lu <hongjiu.lu@intel.com>
1326
1327 PR 1000
1328 * dwarf2.c (lookup_address_in_line_info_table): Restore code
1329 handling NULL function info, removed with 2005-04-03 change.
1330
a366f4ff
MM
13312005-06-08 Mark Mitchell <mark@codesourcery.com>
1332
1333 * opncls.c (bfd_fopen): Mark returned BFD as cacheable if FD == -1.
1334
0e58fcf3
AM
13352005-06-09 Alan Modra <amodra@bigpond.net.au>
1336
1337 * elflink.c (elf_mark_used_section): Delete.
1338 (bfd_elf_gc_sections): Call bfd_generic_gc_sections.
1339 * reloc.c (bfd_mark_used_section): New function.
1340 (bfd_generic_gc_sections): Call bfd_mark_used_section.
1341
92a7c1b8
AM
13422005-06-08 Alan Modra <amodra@bigpond.net.au>
1343
1344 * opncls.c (bfd_fopen): Don't set bfd_error unconditionally.
d83747fa 1345 (bfd_fdopenr): Same.
92a7c1b8 1346
dfab97d6
MM
13472005-06-07 Mark Mitchell <mark@codesourcery.com>
1348
1349 * opncls.c (bfd_fdopenr): Add missing break statements.
1350
2d0123b7
MM
13512005-06-07 Mark Mitchell <mark@codesourcery.com>
1352
1353 * opncls.c (bfd_fopen): New API.
1354 (bfd_openr): Use it.
1355 (bfd_fdopenr): Likewise.
1356 * bfd-in2.h: Regenerated.
1357
de33e640
AH
13582005-06-07 Aldy Hernandez <aldyh@redhat.com>
1359 Michael Snyder <msnyder@redhat.com>
1360 Stan Cox <scox@redhat.com>
1361
1362 * Makefile.am (ALL_MACHINES): Add ms1 support.
1363 (ALL_MACHINES_CFILES): Same.
1364 (BFD32_BACKENDS): Same.
1365 (BFD32_BACKENDS_CFILES): Same.
1366
1367 * Makefile.in: Regenerate.
1368
1369 * archures.c (bfd_architecture): Add ms1 entries.
1370 Externalize bfd_ms1_arch.
1371 (bfd_archures_list): Add bfd_ms1_arch.
1372
1373 * bfd-in2.h: Regenerate.
1374
1375 * cpu-ms1.c: New file.
1376
1377 * elf32-ms1.c: New file.
1378
1379 * targets.c: Define extern of bfd_elf32_ms1_vec.
1380 Add bfd_elf32_ms1_vec to _bfd_target_vector.
1381
1382 * configure.in: Add bfd_elf32_ms1_vec case.
1383
1384 * configure: Regenerate.
1385
1386 * config.bfd: Add ms1-*-elf to table.
1387
55cf6793
ZW
13882005-06-07 Zack Weinberg <zack@codesourcery.com>
1389
1390 * coff-i386.c: Change md_apply_fix3 to md_apply_fix in comment.
1391
4575b1b5
AM
13922005-06-07 Alan Modra <amodra@bigpond.net.au>
1393
1394 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Init _bfd_find_line.
1395 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
1396
5420f73d
L
13972005-06-06 H.J. Lu <hongjiu.lu@intel.com>
1398
1399 PR 990
1400 * bfd.c (bfd_find_line): New.
1401
1402 * dwarf2.c (comp_unit): Add variable_table.
1403 (funcinfo): Add file, line, and sec.
1404 (varinfo): New.
1405 (lookup_symbol_in_function_table): New.
1406 (lookup_symbol_in_variable_table): New.
1407 (scan_unit_for_functions): Renamed to ...
1408 (scan_unit_for_symbols): This. Handle DW_TAG_entry_point and
1409 DW_TAG_variable.
1410 (comp_unit_find_nearest_line): Updated.
1411 (comp_unit_find_line): New.
1412 (_bfd_dwarf2_find_line): New.
1413
1414 * elf-bfd.h (_bfd_elf_find_line): New.
1415 (_bfd_generic_find_line): New. Defined.
1416
1417 * elf.c (_bfd_elf_find_line): New.
1418
1419 * libbfd-in.h (_bfd_dwarf2_find_line): New.
1420 (_bfd_generic_find_line): New.
1421
1422 * bfd-in2.h: Regenerated.
1423 * libbfd.h: Likewise.
1424
1425 * libbfd.c (_bfd_generic_find_line): New.
1426
1427 * targets.c (BFD_JUMP_TABLE_SYMBOLS): Initialize _bfd_find_line
1428 with _bfd_generic_find_line.
1429 (bfd_target): Add _bfd_find_line.
1430
b42f9a05
L
14312005-06-06 H.J. Lu <hongjiu.lu@intel.com>
1432
1433 * dwarf2.c (decode_line_info): Properly set low_pc.
1434
b4f4e59f
AM
14352005-06-06 Alan Modra <amodra@bigpond.net.au>
1436
1437 * elf64-pcc.c (ppc64_elf_gc_mark_hook): For the local sym in .opd
1438 case, include addend when indexing .opd section map.
1439 (ppc64_elf_edit_opd): Add no_opd_opt param. Do nothing besides
1440 clear opd_adjust array if no_opd_opt set. Tidy code.
46de2a7c
AM
1441 Ignore zero size .opd. Check bfd_alloc return value.
1442 (ppc_stub_name): Return immediately on bfd_malloc fail.
b4f4e59f
AM
1443 * elf64-ppc.h (ppc64_elf_edit_opd): Update prototype.
1444
2ae727ad
L
14452005-06-04 H.J. Lu <hongjiu.lu@intel.com>
1446
1447 * dwarf2.c (comp_unit): Fix a typo in comment.
1448
ce71b576
NC
14492005-06-03 Jan-Benedict Glaw <jbglaw@lug-owl.de>
1450
1451 * elf32-vax.c (rtype_to_howto): Remove PARAMS.
1452 (reloc_type_lookup): Dito.
1453 (elf_vax_discard_copies): Dito.
1454 (elf_vax_instantiate_got_entries): Dito.
1455 (elf_vax_link_hash_traverse): Dito.
1456 (elf_vax_link_hash_newfunc): Dito.
1457 (elf_vax_link_hash_table_create): Dito.
1458 (elf32_vax_set_private_flags): Dito.
1459 (elf32_vax_merge_private_bfd_data): Dito.
1460 (elf32_vax_print_private_bfd_data): Dito.
1461 (elf_vax_check_relocs): Dito.
1462 (elf_vax_gc_mark_hook): Dito.
1463 (elf_vax_gc_sweep_hook): Dito.
1464 (elf_vax_size_dynamic_sections): Dito.
1465 (elf_vax_discard_copies): Dito.
1466 (elf_vax_instantiate_got_entries): Dito.
1467 (elf_vax_relocate_section): Dito.
1468 (elf_vax_finish_dynamic_symbol): Dito.
1469 (elf_vax_finish_dynamic_sections): Dito.
1470 (elf_vax_hash_table): Break-up of line isn't needed.
1471 (elf_vax_check_relocs): Remove leading whitespace
1472 (elf_vax_relocate_section): Remove redundant whitespace
1473 (elf_vax_link_hash_newfunc): Don't cast NULL.
1474 (elf_vax_link_hash_table_create): Dito.
1475 * cpu-vax.c (bfd_vax_arch) Remove a trailing space.
1476
9635fe29
AM
14772005-06-03 Alan Modra <amodra@bigpond.net.au>
1478
e1fffbe6
AM
1479 PR 568
1480 * configure.in: Bump version
1481 * configure: Regenerate.
1482 * elflink.c (elf_link_input_bfd): Use einfo linker callback to print
1483 discarded section sym refs and kill linker output.
1484 * simple.c (simple_dummy_einfo): New function.
1485 (bfd_simple_get_relocated_section_contents): Init callbacks.einfo.
1486
9635fe29
AM
1487 * elf32-i386.c (elf_i386_relocate_section): Handle zero symndx
1488 for all reloc types.
1489
e87d886e
AM
14902005-06-02 Alan Modra <amodra@bigpond.net.au>
1491
1492 * elf64-ppc.c (add_symbol_adjust): Set sym visibility to most
1493 restrictive of func code and func descr for undefined syms as well
1494 as defined.
1495
b2b09913
JB
14962005-05-31 Jim Blandy <jimb@redhat.com>
1497
1498 * Makefile.am: Regenerate dependencies with 'make dep-am'.
1499 * Makefile.in: Regenerate.
1500
8288a39e
RH
15012005-05-31 Richard Henderson <rth@redhat.com>
1502
1503 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_JSRDIRECT): New.
1504 (ALPHA_ELF_LINK_HASH_TLS_IE): Renumber to 0x80.
1505 (ALPHA_ELF_LINK_HASH_LU_PLT): Rename from ALPHA_ELF_LINK_HASH_LU_FUNC.
1506 (elf64_alpha_want_plt): Update to match.
1507 (elf64_alpha_check_relocs): Collect JSRDIRECT in gotent_flags.
1508 (elf64_alpha_relax_with_lituse): Likewise. Handle JSRDIRECT.
1509
f1c71a59
ZW
15102005-05-31 Zack Weinberg <zack@codesourcery.com>
1511
1512 * elf32-arm.c (elf32_arm_reloc_type_lookup)
1513 (elf32_arm_nabi_grok_prstatus, elf32_arm_nabi_grok_psinfo):
1514 Use ISO C90 function declaration style.
1515
653bb2de
JW
15162005-05-31 James E Wilson <wilson@specifixinc.com>
1517
1518 * elfcode.h (NAME(bfd_elf,bfd_from_remote_memory)): Check for program
1519 header PF_R flag on PT_LOAD segments.
1520
f915360b
RH
15212005-05-30 Richard Henderson <rth@redhat.com>
1522
1523 * elf64-alpha.c (elf64_alpha_relocate_section): Use dtp_base for
1524 the zero index relocs produced by elf64_alpha_relax_tls_get_addr.
1525
6ec7057a
RH
15262005-05-29 Richard Henderson <rth@redhat.com>
1527
1528 * configure.in (--enable-secureplt): New.
1529 * elf64-alpha.c (INSN_LDA, INSN_LDAH, INSN_LDQ, INSN_BR): New.
1530 (INSN_SUBQ, INSN_S4SUBQ, INSN_JMP): New.
1531 (INSN_A, INSN_AB, INSN_ABC, INSN_ABO, INSN_AD): New.
1532 (elf64_alpha_use_secureplt): New.
1533 (OLD_PLT_HEADER_SIZE, OLD_PLT_ENTRY_SIZE): New.
1534 (NEW_PLT_HEADER_SIZE, NEW_PLT_ENTRY_SIZE): New.
1535 (PLT_HEADER_SIZE, PLT_ENTRY_SIZE): Conditionalize on secureplt.
1536 (ALPHA_ELF_LINK_HASH_PLT_LOC): Remove.
1537 (struct alpha_elf_link_hash_entry): Add plt_offset.
1538 (PLT_HEADER_WORD1, PLT_HEADER_WORD2, PLT_HEADER_WORD3): Remove.
1539 (PLT_HEADER_WORD4, PLT_ENTRY_WORD1, PLT_ENTRY_WORD2): Remove.
1540 (PLT_ENTRY_WORD3): Remove.
1541 (elf64_alpha_create_dynamic_sections): If secureplt, set SEC_READONLY
1542 on .plt and create .got.plt.
1543 (elf64_alpha_output_extsym): Remove .plt frobbing for symbol values.
1544 (get_got_entry): Initialize plt_offset.
1545 (elf64_alpha_want_plt): New.
1546 (elf64_alpha_check_relocs): Use it.
1547 (elf64_alpha_adjust_dynamic_symbol): Likewise. Don't allocate
1548 plt entries here.
1549 (elf64_alpha_calc_got_offsets_for_symbol): Don't report internal
1550 error as user error.
1551 (elf64_alpha_size_plt_section_1): Allocate one plt entry per
1552 got subsection.
1553 (elf64_alpha_size_plt_section): Size .got.plt section.
1554 (elf64_alpha_size_rela_got_1): Don't allocate relocations if
1555 plt entries used.
1556 (elf64_alpha_size_dynamic_sections): Call elf64_alpha_size_plt_section.
1557 Add PLTRO DYNAMIC entry.
1558 (elf64_alpha_finish_dynamic_symbol): Generate secureplt format.
1559 (elf64_alpha_finish_dynamic_sections): Likewise.
1560
3133ddbf
DJ
15612005-05-28 David Daney <ddaney@avtrex.com>
1562
1563 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections): Move
1564 calculation of DT_RELSZ to occur after all dynamic relocations
1565 are created.
1566
36527912
AJ
15672005-05-28 Eli Zaretskii <eliz@gnu.org>
1568
1569 * configure.in: Add snprintf and vsnprintf to AC_CHECK_DECLS.
1570 * config.in, configure: Regenerate.
1571
1bc8074d 15722005-05-26 Mark Kettenis <kettenis@gnu.org>
6ec7057a 1573 Maciej W. Rozycki <macro@linux-mips.org>
1bc8074d
MR
1574
1575 * elfxx-mips.c (_bfd_mips_elf_section_processing): Warn and
1576 stop processing of options if one of invalid size is
1577 encountered.
1578 (_bfd_mips_elf_section_from_shdr): Likewise.
1579 (_bfd_mips_elf_fake_sections): Reset the type of empty special
1580 sections.
1581
75fed80d
RH
15822005-05-26 Richard Henderson <rth@redhat.com>
1583
36527912 1584 * elf64-alpha.c (struct alpha_elf_link_hash_entry): Remove
75fed80d
RH
1585 plt_old_section, plt_old_value.
1586 (elf64_alpha_adjust_dynamic_symbol): Don't set it.
1587 (elf64_alpha_size_plt_section_1): Don't use it.
1588
24639c7d
JJ
15892005-05-26 Jakub Jelinek <jakub@redhat.com>
1590
1591 * elfcode.h (elf_object_p): Fail if e_shoff != 0, e_shnum == 0 and
1592 first shdr has sh_size == 0. Fail if e_shnum is large to cause
1593 arithmetic overflow when allocating the i_shdr array.
1594 Sanity check sh_link and sh_info fields. Fix e_shstrndx sanity check.
1595
a7519a3c
RH
15962005-05-25 Richard Henderson <rth@redhat.com>
1597
1598 * elf64-alpha.c: Update all function definitions to ISO C. Remove
1599 all function prototypes; rearrange functions into def-use order.
1600
308da68f
RH
16012005-05-25 Richard Henderson <rth@redhat.com>
1602
1603 * elf64-alpha.c (elf64_alpha_merge_gots): Fix gotent iteration
1604 in the presence of deleting elements.
1605 (elf64_alpha_size_got_sections): Zero dead got section size.
1606
4ab527b0
FF
16072005-05-23 Fred Fish <fnf@specifixinc.com>
1608
1609 * dwarf2.c (struct dwarf2_debug): Add inliner_chain member.
1610 (struct funcinfo): Add caller_func, caller_file, caller_line.
1611 tag, and nesting_level members.
1612 (lookup_address_in_function_table): Change first passed parameter
1613 from "struct funcinfo *" to "struct comp_unit *".
1614 (lookup_address_in_function_table): Dereference unit to find function
1615 table.
1616 (lookup_address_in_function_table): Traverse the function list to
1617 create a chain of inlined functions back to the first non inlined
1618 function.
1619 (scan_unit_for_functions): Remember tag and nesting level. Handle
1620 DW_AT_call_file and DW_AT_call_line.
1621 (comp_unit_find_nearest_line): Adjust lookup_address_in_function_table
1622 call to pass unit pointer instead of function table pointer. For
1623 inlined functions, save pointer to the inliner chain.
1624 (_bfd_dwarf2_find_nearest_line): Initialize inliner_chain to NULL.
1625 (_bfd_dwarf2_find_inliner_info): New function that returns information
1626 from the inliner chain after a call to bfd_find_nearest_line.
1627
1628 * bfd.c (bfd_find_inliner_info): Define using BFD_SEND.
1629 * targets.c (BFD_JUMP_TABLE_SYMBOLS): Add entry for
1630 NAME##_find_inliner_info.
1631 (bfd_target): Add _bfd_find_inliner_info.
1632 * bfd-in2.h: Regenerate.
1633
1634 * libbfd-in.h (_bfd_nosymbols_find_inliner_info): Define as
1635 macro that always returns bfd_false.
1636 (_bfd_dwarf2_find_inliner_info): Declare.
1637 * libbfd.h: Regenerate.
36527912 1638
4ab527b0
FF
1639 * elf32-arm.c (elf32_arm_find_inliner_info): New function
1640 that calls _bfd_dwarf2_find_inliner_info.
1641 (bfd_elf32_find_inliner_info): Define to elf32_arm_find_inliner_info.
1642
1643 * elfxx-mips.c (_bfd_mips_elf_find_inliner_info): New function
1644 that calls _bfd_dwarf2_find_inliner_info.
1645 * elfxx-mips.h (_bfd_mips_elf_find_inliner_info): Declare.
1646 * elfn32-mips.c (bfd_elf32_find_inliner_info): Define to
1647 _bfd_mips_elf_find_inliner_info.
1648 * elf64-mips.c (bfd_elf64_find_inliner_info): Ditto.
1649 * elf32-mips.c (bfd_elf32_find_inliner_info): Ditto.
1650
1651 * elf.c (_bfd_elf_find_inliner_info): New function that calls
1652 _bfd_dwarf2_find_inliner_info.
1653 * elf-bfd.h (_bfd_elf_find_inliner_info): Declare.
1654 * elfxx-target.h (bfd_elfNN_find_inliner_info): Define to
1655 _bfd_elf_find_inliner_info.
1656
1657 * coffgen.c (coff_find_inliner_info): New function that
1658 calls _bfd_dwarf2_find_inliner_info.
1659 * libcoff-in.h (coff_find_inliner_info): Declare.
1660 * libcoff.h: Regenerate.
1661 * coff-rs6000.c (rs6000coff_vec): Add coff_find_inliner_info.
1662 (pmac_xcoff_vec) Ditto.
1663 * coff64-rs6000.c (rs6000coff64_vec): Ditto.
1664 (aix5coff64_vec): Ditto.
36527912 1665
4ab527b0
FF
1666 * aout-target.h (MY_find_inliner_info): Define as
1667 _bfd_nosymbols_find_inliner_info.
1668 * aout-tic30.c (MY_find_inliner_info): Ditto.
1669 * binary.c (binary_find_inliner_info): Ditto.
1670 * i386msdos.c (msdos_find_inliner_info): Ditto.
1671 * ihex.c (ihex_find_inliner_info): Ditto.
1672 * libaout.h (aout_32_find_inliner_info): Ditto.
1673 * libecoff.h (_bfd_ecoff_find_inliner_info): Ditto.
1674 * mach-o.c (bfd_mach_o_find_inliner_info): Ditto.
1675 * mmo.c (mmo_find_inliner_info): Ditto.
1676 * nlm-target.h (nlm_find_inliner_info): Ditto.
1677 * pef.c (bfd_pef_find_inliner_info): Ditto.
1678 * ppcboot.c (ppcboot_find_inliner_info): Ditto.
1679 * srec.c (srec_find_inliner_info): Ditto.
1680 * tekhex.c (tekhex_find_inliner_info): Ditto.
1681 * versados.c (versados_find_inliner_info): Ditto.
1682 * xsym.c (bfd_sym_find_inliner_info): Ditto.
1683
1684 * ieee.c (ieee_find_inliner_info): New function that always
1685 returns FALSE.
1686 * oasys.c (oasys_find_inliner_info): Ditto.
1687 * vms.c (vms_find_inliner_info): Ditto.
1688
9edfd1af
AM
16892005-05-24 Alan Modra <amodra@bigpond.net.au>
1690
1691 * elf32-ppc.c (ppc_elf_check_relocs): For old gcc -fPIC code
1692 force old plt layout.
1693
3241278a
RH
16942005-05-22 Richard Henderson <rth@redhat.com>
1695
1696 * elf64-alpha.c (elf64_alpha_relax_section): Ignore non-allocated
1697 sections.
1698 (elf64_alpha_check_relocs): Likewise.
1699 (elf64_alpha_relocate_section): Don't emit dynamic relocations to
1700 non-allocated sections.
1701
d6ad34f6
RH
17022005-05-22 Richard Henderson <rth@redhat.com>
1703
36527912 1704 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Relax jsr to
d6ad34f6
RH
1705 undefweak to use zero register. Call elf64_alpha_relax_got_load
1706 if not all uses removed.
1707 (elf64_alpha_relax_got_load): Relax undefweak to lda zero.
1708 (elf64_alpha_relax_section): Handle undefweak symbols.
1709 (elf64_alpha_calc_dynrel_sizes): Don't add relocs for undefweak.
1710 (elf64_alpha_size_rela_got_1): Likewise.
1711 (elf64_alpha_relocate_section): Likewise.
1712
487c4353
RH
17132005-05-22 Richard Henderson <rth@redhat.com>
1714
1715 * elf64-alpha.c (elf64_alpha_relax_section): Only operate
1716 on SEC_CODE sections.
1717
a96afa0f
DA
17182005-05-22 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
1719
1720 * som.c (try_prev_fixup): Changed type of subspace_reloc_sizep to
1721 unsigned int *.
1722 (som_write_space_strings): Change type of tmp_space and p to char *.
1723 (som_write_symbol_strings): Likewise. Also change type of comp to
1724 char *comp[4].
1725 (som_begin_writing): Change type of strings_size to unsigned int.
1726 (som_finish_writing): Likewise.
1727 (som_slurp_reloc_table): Change type of external_relocs to unsigned
1728 char *.
1729 * som.h (struct som_section_data_struct): Change type of reloc_stream
1730 field to unsigned char *.
1731
643796e3
DJ
17322005-05-20 Daniel Jacobowitz <dan@codesourcery.com>
1733
1734 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Don't eliminate
1735 copy relocations for VxWorks.
1736
4dc4a9a5
DJ
17372005-05-20 Daniel Jacobowitz <dan@codesourcery.com>
1738
1739 * bfd/elf32-ppc.c (struct ppc_elf_link_hash_entry): Add new field
1740 has_sda_refs.
1741 (ppc_elf_copy_indirect_symbol): Copy has_sda_refs.
1742 (ppc_elf_check_relocs): Set has_sda_refs.
1743 (ppc_elf_adjust_dynamic_symbol): Check has_sda_refs before eliminating
1744 copy relocations. Use has_sda_refs to place variables in .sbss.
1745 (ppc_elf_finish_dynamic_symbol): Use has_sda_refs to place variables in
1746 .sbss.
1747
dd1a320b
BW
17482005-05-20 Bob Wilson <bob.wilson@acm.org>
1749
1750 * elf32-xtensa.c (bfd_elf_xtensa_reloc): Make sure that
1751 xtensa_default_isa is initialized.
1752
28e99bb6
AM
17532005-05-20 Alan Modra <amodra@bigpond.net.au>
1754
1755 * elf32-ppc.c (allocate_dynrelocs): Correct plt offset assigned
1756 for second and subsequent list entries. Only allocate multiple
1757 glink stubs when shared or pie.
1758 (ppc_elf_finish_dynamic_symbol): Break out early when only one
1759 glink stub is needed.
1760
e3e71e27
ZW
17612005-05-19 Zack Weinberg <zack@codesourcery.com>
1762
1763 * Makefile.am: Have 'all' depend on 'info'.
1764 * Makefile.in: Regenerate.
1765
a6aa5195
AM
17662005-05-19 Alan Modra <amodra@bigpond.net.au>
1767
1768 * elf-bfd.h (struct elf_link_hash_table): Delete init_refcount and
1769 init_offset. Add init_got_refcount, init_plt_refcount,
1770 init_got_offset and init_plt_offset.
1771 * elf.c (_bfd_elf_link_hash_newfunc): Adjust for above change.
1772 (_bfd_elf_link_hash_hide_symbol): Likewise.
1773 (_bfd_elf_link_hash_table_init): Likewise.
1774 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
1775 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
1776 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Likewise.
1777 (bfd_elf_size_dynamic_sections): Likewise.
1778 * elf32-ppc.c (GLINK_PLTRESOLVE): Now 16 insns.
1779 (LWZU_0_X_12, LWZ_0_4_30, LWZ_0_X_12, LWZ_11_X_11, LWZ_11_X_30,
1780 LWZ_12_4_12, LWZ_12_8_30, LWZ_12_X_12, SUB_11_11_30): Delete.
1781 (ADDIS_12_12, BCL_20_31, LWZU_0_12, LWZ_0_12, LWZ_11_11, LWZ_11_30,
1782 LWZ_12_12, MFLR_0, MFLR_12, MTLR_0, SUB_11_11_12): Define.
1783 (struct plt_entry): New.
1784 (ppc_elf_link_hash_table_create): Set new init_plt fields.
1785 (ppc_elf_copy_indirect_symbol): Handle merge of plt plist. Don't
1786 use _bfd_elf_link_hash_copy_indirect.
1787 (update_plt_info, find_plt_ent): New functions.
1788 (ppc_elf_check_relocs): Handle R_PPC_PLTREL24 with non-zero addend
1789 and adjust for use of plt list rather than refcount.
1790 (ppc_elf_gc_sweep_hook): Likewise.
1791 (ppc_elf_tls_optimize): Likewise.
1792 (ppc_elf_adjust_dynamic_symbol): Likewise.
1793 (allocate_dynrelocs): Likewise.
1794 (ppc_elf_relax_section): Likewise.
1795 (ppc_elf_relocate_section): Likewise. Adjust R_PPC_PLTREL24 addends
1796 when performing a relocatable link.
1797 (ppc_elf_finish_dynamic_symbol): Likewise. Write .glink stubs here..
1798 (ppc_elf_finish_dynamic_sections): ..rather than here. Use new
1799 pic resolver stub.
1800
a49e53ed
AM
18012005-05-19 Alan Modra <amodra@bigpond.net.au>
1802
1803 * elf.c (assign_file_positions_for_segments): Use maximum of
1804 maxpagesize and section alignment when adjusting initial
1805 segment offset and section offsets.
1806
cb1afa5c
ZW
18072005-05-18 Zack Weinberg <zack@codesourcery.com>
1808
1809 * elf32-arm.c: Make all #ifndef OLD_ARM_ABI blocks
1810 unconditional.
1811
13792e9d
L
18122005-05-18 H.J. Lu <hongjiu.lu@intel.com>
1813
1814 * elf.c (group_signature): Undo the last change. Check if the
1815 symbol table section is correct.
1816
c19d1205
ZW
18172005-05-17 Zack Weinberg <zack@codesourcery.com>
1818
1819 * elf32-arm.c: Wherever possible, use official reloc names
1820 from AAELF.
1821 (elf32_arm_howto_table, elf32_arm_tls_gd32_howto)
1822 (elf32_arm_tls_ldo32_howto, elf32_arm_tls_ldm32_howto)
1823 (elf32_arm_tls_le32_howto, elf32_arm_tls_ie32_howto)
1824 (elf32_arm_vtinherit_howto, elf32_arm_vtentry_howto)
1825 (elf32_arm_pc11_howto, elf32_arm_thm_pc9_howto, elf32_arm_got_prel)
1826 (elf32_arm_r_howto): Replace with elf32_arm_howto_table_1,
1827 elf32_arm_howto_table_2, and elf32_arm_howto_table_3.
1828 Add many new relocations from AAELF.
1829 (elf32_arm_howto_from_type): Update to match.
1830 (elf32_arm_reloc_map): Add entries for R_ARM_THM_JUMP24,
1831 R_ARM_THM_JUMP11, R_ARM_THM_JUMP19, R_ARM_THM_JUMP8,
1832 R_ARM_THM_JUMP6, R_ARM_GNU_VTINHERIT, and R_ARM_GNU_VTENTRY.
1833 (elf32_arm_reloc_type_lookup): Use elf32_arm_howto_from_type.
1834 (elf32_arm_final_link_relocate): Add support for
1835 R_ARM_THM_JUMP24, R_ARM_THM_JUMP19, R_ARM_THM_JUMP6. Remove
1836 case entries redundant with default.
1837
1838 * reloc.c: Reorganize ARM relocations. Add Thumb
1839 assembler-internal relocations BFD_RELOC_ARM_T32_OFFSET_U8,
1840 BFD_RELOC_ARM_T32_OFFSET_IMM, BFD_RELOC_ARM_T32_IMMEDIATE.
1841 Add visible relocations BFD_RELOC_THUMB_PCREL_BRANCH7,
1842 BFD_RELOC_THUMB_BRANCH20, BFD_RELOC_THUMB_BRANCH25.
1843 Delete unused relocations BFD_RELOC_ARM_GOT12, BFD_RELOC_ARM_COPY.
1844 * bfd-in2.h, libbfd.h: Regenerate.
1845
26ae6d5e
DJ
18462005-05-17 Daniel Jacobowitz <dan@codesourcery.com>
1847
1848 * elf.c (_bfd_elf_write_object_contents): Check for non-NULL
1849 elf_shstrtab.
1850 * format.c (bfd_check_format_matches): Set output_has_begun
1851 for both_direction.
1852 * section.c (bfd_set_section_contents): Use bfd_write_p. Remove
1853 special case for both_direction.
1854
5982e3c7
NC
18552005-05-17 Nick Clifton <nickc@redhat.com>
1856
1857 * elf.c (group_signature): Check for a group section which is
1858 actually a (corrupt) symbol table section in disguise and prevent
1859 an infinite loop from occurring.
1860
fc3ab699
L
18612005-05-17 H.J. Lu <hongjiu.lu@intel.com>
1862
1863 * elfxx-ia64.c (elfNN_ia64_relax_brl): Undo the change made on
1864 2005-02-16.
1865
5e27d427
L
18662005-05-17 H.J. Lu <hongjiu.lu@intel.com>
1867
1868 * elfxx-ia64.c (elfNN_ia64_relax_br): Keep the original
1869 predicate on slot 0 only if slot 0 isn't br.
1870
75ff4589
L
18712005-05-17 H.J. Lu <hongjiu.lu@intel.com>
1872
1873 PR 797
1874 * elf32-i386.c (elf_i386_size_dynamic_sections): Also remove
1875 empty sdynbss section.
1876 * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections): Likewise.
1877
8e0ed13f
NC
18782005-05-17 Tavis Ormandy <taviso@gentoo.org>
1879
1880 * elf.c (bfd_section_from_shdr): Add sanity check when parsing
1881 dynamic sections.
1882
7e8aeb9a
AM
18832005-05-17 Alan Modra <amodra@bigpond.net.au>
1884
1885 * elf32-ppc.c (LIS_11. LIS_12): Define.
1886 (LWZU_0_X_12, LWZ_0_X_12, LWZ_12_4_12, LWZ_12_X_12): Define.
1887 (ppc_elf_finish_dynamic_sections): Provide non-pic plt call stub
1888 for --data-plt when building non-pie executables.
1889
641bd093
NC
18902005-05-17 Nick Clifton <nickc@redhat.com>
1891
10dbd1f3
NC
1892 * elf32-arm.c (elf32_arm_final_link_relocate): Gracefully handle
1893 the situation where a symbols's section is not known but a section
1894 relative R_ARM_RELATIVE reloc has to be generated for the Symbian
1895 OS.
1896
641bd093
NC
1897 * elf32-v850.c (v850_elf_relocate_section): Move code to test for
1898 the presence of a symbol table to just before the symbol table is
1899 actually used.
1900
83b6bd86
L
19012005-05-16 H.J. Lu <hongjiu.lu@intel.com>
1902
1903 PR 834
1904 * elfxx-ia64.c (elfNN_ia64_relax_br): New.
1905 (elfNN_ia64_relax_section): Use it.
1906
06084812
MK
19072005-05-14 Mark Kettenis <kettenis@gnu.org>
1908
1909 * elflink.c (bfd_elf_size_dynamic_sections): Use lbasename instead
1910 of basename.
1911
1fe44d79
AM
19122005-05-14 Alan Modra <amodra@bigpond.net.au>
1913
1914 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Set DT_PPC_GOT,
1915 not DT_PPC_GLINK.
1916 (ppc_elf_finish_dynamic_sections): Likewise.
1917
2db3311b
FF
19182005-05-13 Fred Fish <fnf@specifixinc.com>
1919
1920 * libbfd-in.h: Fix a comment typo, 'neaderst' -> 'nearest'
1921 * libbfd.h: Rebuilt.
1922
7db48a12
BW
19232005-05-13 Bob Wilson <bob.wilson@acm.org>
1924
1925 * elf32-xtensa.c (xtensa_get_property_section_name): Add missing
1926 periods in linkonce_kind values.
1927
8fe76924
L
19282005-05-12 H.J. Lu <hongjiu.lu@intel.com>
1929
1930 * elf32-i386.c (elf_i386_relocate_section): Allow R_386_GOTOFF
1931 against protected function when building executable.
1932
86b9da88
AM
19332005-05-12 Alan Modra <amodra@bigpond.net.au>
1934
1935 * elf32-ppc.c (LWZU_0_X_11): Delete.
1936 (B, LWZ_11_X_11, LWZ_11_X_30, MTCTR_11): Define.
1937 (ppc_elf_select_plt_layout): Set .got flags too. Formatting.
1938 (ppc_elf_size_dynamic_sections): Allocate space for .glink branch
1939 table.
1940 (ppc_elf_finish_dynamic_symbol): Point .plt entries into the branch
1941 table.
1942 (ppc_elf_finish_dynamic_sections): Adjust DT_PPC_GLINK value.
1943 Generate .glink branch table and updated stubs.
1944
d7128ce4
AM
19452005-05-11 Alan Modra <amodra@bigpond.net.au>
1946
1947 * reloc.c (BFD_RELOC_HI16_PCREL): Define.
1948 (BFD_RELOC_HI16_S_PCREL, BFD_RELOC_LO16_PCREL): Define.
1949 * elf32-ppc.c (GLINK_PLTRESOLVE, GLINK_ENTRY_SIZE): Define.
1950 (CROR_151515, CROR_313131): Delete.
1951 (ADDIS_11_11, ADDI_11_11, SUB_11_11_30, ADD_0_11_11, ADD_11_0_11,
1952 LWZ_0_4_30, MTCTR_0, LWZ_12_8_30, BCTR, ADDIS_11_30,
1953 LWZU_0_X_11): Define.
1954 (ppc_elf_howto_raw): Add R_PPC_REL16, R_PPC_REL16_LO, R_PPC_REL16_HI
1955 and R_PPC_REL16_HA entries.
1956 (ppc_elf_reloc_type_lookup): Convert new bfd reloc types.
1957 (ppc_elf_addr16_ha_reloc): Also handle R_PPC_REL16_HA.
1958 (struct ppc_elf_link_hash_table): Add glink, glink_pltresolve,
1959 new_plt, and old_plt.
1960 (ppc_elf_create_dynamic_sections): Create .glink section.
1961 (ppc_elf_check_relocs): Set new_plt and old_plt.
1962 (ppc_elf_select_plt_layout): New function.
1963 (ppc_elf_tls_setup): Set plt output section elf type and flags.
1964 (allocate_got): Handle differences between old and new got layout.
1965 (allocate_dynrelocs): Likewise for plt.
1966 (ppc_elf_size_dynamic_sections): Likewise. Allocate memory for
1967 .glink. Don't allocate memory for old bss .plt. Emit DT_PPC_GLINK.
1968 (ppc_elf_relax_section): Rename ppc_info to htab. Handle .glink
1969 destination of R_PPC_PLTREL24 relocs.
1970 (ppc_elf_relocate_section): Handle new relocs and changed destination
1971 of R_PPC_PLTREL24.
1972 (ppc_elf_finish_dynamic_symbol): Init new style plt and handle
1973 differences in layout.
1974 (ppc_elf_finish_dynamic_sections): Set DT_PPC_GLINK value. Don't
1975 put a blrl in new got. Write glink contents.
1976 * elf32-ppc.h (ppc_elf_select_plt_layout): Declare.
1977 * libbfd.h: Regenerate.
1978 * bfd-in2.h: Regenerate.
1979
4c9b0de6
AS
19802005-05-11 Andreas Schwab <schwab@suse.de>
1981
1982 * elf32-i386.c (elf_i386_finish_dynamic_sections): Fix signedness
1983 warning.
1984
3d2b39cf
L
19852005-05-10 H.J. Lu <hongjiu.lu@intel.com>
1986
1987 * elf.c (_bfd_elf_make_section_from_shdr): Only check debug
1988 section if SEC_ALLOC isn't set.
1989
2ba49b59
KC
19902005-05-09 Kelley Cook <kcook@gcc.gnu.org>
1991
1992 * configure.in: Replace AC_COMPILE_CHECK_SIZEOF with AC_CHECK_SIZEOF.
1993 * acinclude.m4: Don't sinclude accross.m4.
1994 * config.in, configure, Makefile.in, doc/Makefile.in: Regenerate.
1995
433817dd
AM
19962005-05-09 Alan Modra <amodra@bigpond.net.au>
1997
1998 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add has_dotsym.
1999 (ppc64_elf_add_symbol_hook): Set has_dotsym.
2000 (ppc64_elf_check_directives): Only process syms when has_dotsym.
2001 (func_desc_adjust): Hide fake function descriptors when function
2002 code entry is defined.
2003 (adjust_opd_syms): Adjust for deleted_section becoming union field.
2004
0560d0f7
AM
20052005-05-09 Alan Modra <amodra@bigpond.net.au>
2006
2007 * elfcode.h (elf_object_p): Add more sanity checks on elf header.
2008
74cc7600
DK
20092005-05-08 Dave Korn <dave.korn@artimi.com>
2010
2011 * coff-tic80.c: Undefine _CONST after system headers to prevent
2012 clash with tic80-specific definition in include/coff/tic80.h
2013
cfca085c
L
20142005-05-08 H.J. Lu <hongjiu.lu@intel.com>
2015
2016 PR 939
2017 * elflink.c (elf_link_output_extsym): Use output_bfd if
2018 h->root.u.def.section is bfd_abs_section_ptr when reporting
2019 error.
2020
7f4d3958
L
20212005-05-07 H.J. Lu <hongjiu.lu@intel.com>
2022
2023 * elf-bfd.h (elf_backend_data): Update special_sections to
2024 array of pointer to bfd_elf_special_section.
2025 * elf.c (special_sections): Likewise.
2026 * elf32-arm.c (elf32_arm_symbian_special_sections): Likewise.
2027 * elf32-m32r.c (m32r_elf_special_sections): Likewise.
2028 * elf32-m68hc11.c (elf32_m68hc11_special_sections): Likewise.
2029 * elf32-m68hc12.c (elf32_m68hc12_special_sections): Likewise.
2030 * elf32-mcore.c (mcore_elf_special_sections): Likewise.
2031 * elf32-ppc.c (ppc_elf_special_sections): Likewise.
2032 * elf32-sh64.c (sh64_elf_special_sections): Likewise.
2033 * elf32-v850.c (v850_elf_special_sections): Likewise.
2034 * elf32-xtensa.c (elf_xtensa_special_sections): Likewise.
2035 * elf64-alpha.c (elf64_alpha_special_sections): Likewise.
2036 * elf64-hppa.c (elf64_hppa_special_sections): Likewise.
2037 * elf64-ppc.c (ppc64_elf_special_sections): Likewise.
2038 * elf64-sh64.c (sh64_elf64_special_sections): Likewise.
2039 * elfxx-ia64.c (elfNN_ia64_special_sections): Likewise.
2040 * elfxx-mips.c (_bfd_mips_elf_special_sections): Likewise.
2041 * elfxx-mips.h (_bfd_mips_elf_special_sections): Likewise.
2042
2043 * elf.c (get_special_section): Updated.
2044
3b36f7e6
AM
20452005-05-07 Alan Modra <amodra@bigpond.net.au>
2046
2047 * elf-bfd.h (struct elf_backend_data): Remove got_symbol_offset.
2048 * elfxx-target.h (elf_backend_got_symbol_offset): Delete.
2049 * elflink.c (_bfd_elf_create_got_section): Use zero in place of
2050 got_symbol_offset.
2051 * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Likewise.
2052 * elf32-frv.c (_frv_create_got_section): Likewise.
2053 * elf32-i370.c (i370_elf_finish_dynamic_sections): Delete ppc code.
2054 (elf_backend_got_symbol_offset): Don't define.
2055 * elf64-ppc.c (elf_backend_got_symbol_offset): Don't define.
2056 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add got_header_size
2057 and got_gap.
2058 (ppc_elf_create_got): Tidy.
2059 (ppc_elf_create_dynamic_sections): Don't set SEC_IN_MEMORY for .plt.
2060 (ppc_elf_check_relocs): Reduce string comparisons by using elf.hgot.
2061 (ppc_elf_gc_sweep_hook): Likewise.
2062 (ppc_elf_relocate_section): Likewise.
2063 (ppc_elf_finish_dynamic_symbol): Likewise.
2064 (allocate_got): New function.
2065 (allocate_dynrelocs): Use allocate_got.
2066 (ppc_elf_size_dynamic_sections): Likewise. Delay tlsld_got allocation
2067 so that local got can refcount it. Set got_header_size.
2068 (ppc_elf_relocate_section): Use value of elf.hgot rather than hard-
2069 coded 4.
2070 (ppc_elf_finish_dynamic_sections): Likewise.
2071 (elf_backend_got_symbol_offset): Don't define.
2072 (elf_backend_got_header_size): Ditto.
2073
2e0fbf77
JW
20742005-05-05 Steve Ellcey <sje@cup.hp.com>
2075
2076 * configure.in (ACX_HEADER_STRING): New.
2077 * configure: Regenerate.
2078 * config.in: Regenerate.
2079 * sysdep.h (STRING_WITH_STRINGS): Use.
2080
6f140a15
L
20812005-05-05 H.J. Lu <hongjiu.lu@intel.com>
2082
2083 * elf.c (_bfd_elf_close_and_cleanup): Only call
2084 _bfd_dwarf2_cleanup_debug_info on bfd_object.
2085
01d9ad14
L
20862005-05-05 H.J. Lu <hongjiu.lu@intel.com>
2087
2088 * elflink.c (_bfd_elf_provide_section_bound_symbols): Use
2089 "__bss_start" instead of "_edata" as fallback.
2090
b36b76cb
L
20912005-05-05 H.J. Lu <hongjiu.lu@intel.com>
2092
2093 * bfd-in2.h: Regenerated.
2094
eac338cf
PB
20952005-05-05 Paul Brook <paul@codesourcery.com>
2096
2097 * config.bfd: Use bfd_elf32_i386_vxworks_vec for i?86-*-vxworks.
2098 * configure.in: Add bfd_elf32_i386_vxworks_vec. i386 targets need
2099 elf-vxworks.lo.
2100 * configure: Regenerate.
2101 * Makefile.am (BFD32_BACKENDS): Add elf-vxworks.lo.
2102 (BFD32_BACKENDS_CFILES): Add elf-vxworks.c.
2103 (elf32-i386.lo): Depend on elf-vxworks.h.
2104 (elf-vxworks.lo): New rule.
2105 * Makefile.in: Regenerate.
2106 * elf-bfd.h (elf_backend_data): Update type of
2107 elf_backend_emit_relocs.
2108 (_bfd_elf_link_output_relocs): Update prototype.
2109 * elflink.c (_bfd_elf_link_output_relocs): Always use
2110 bed->elf_backend_emit_relocs when outputting relocations.
2111 * elfxx-target.h (elf_backend_emit_relocs): Default to
2112 _bfd_elf_link_output_relocs.
2113 * targets.c (bfd_elf32_i386_vxworks_vec): Declare.
2114 (_bfd_target_vector): Add bfd_elf32_i386_vxworks_vec.
2115 * elf32-i386.c: Add elf32-i386-vxworks target BFD.
2116 (elf_i386_plt0_entry): Remove padding.
2117 (elf_i386_pic_plt0_entry): Ditto.
2118 (PLTRESOLVE_RELOCS_SHLIB, PLTRESOLVE_RELOCS): Define.
2119 (PLT_NON_JUMP_SLOT_RELOCS): Define.
2120 (elf_i386_link_hash_table): Add srelplt2, hgot, hplt, is_vxworks and
2121 plt0_pad_byte fields.
2122 (elf_i386_link_hash_table_create): Zero them.
2123 (elf_i386_create_dynamic_sections): Create static relocation section.
2124 (allocate_dynrelocs): Allocate space for static PLT relocations.
2125 (elf_i386_size_dynamic_sections): Save shortcuts to PLT and GOT
2126 symbols. Give PLT symbols function type. Don't strip PLT sections
d7128ce4 2127 if we have exported symbols from them.
eac338cf
PB
2128 (elf_i386_finish_dynamic_symbol): Fill in VxWorks PLT static
2129 relocation section. Don't mark _GLOBAL_OFFSET_TABLE_ as absolute on
2130 VxWorks.
2131 (elf_i386_finish_dynamic_sections): Allow different pad bytes.
2132 Add relocation for GOT location. Fill in PLT static relocations.
2133 (elf_i386_vxworks_link_hash_table_create): New function.
2134 (elf_i386_vxworks_link_output_symbol_hook): New function.
2135 * elf-vxworks.h: New file.
2136
3496cb2a
L
21372005-05-05 H.J. Lu <hongjiu.lu@intel.com>
2138
2139 * section.c (bfd_make_section_anyway_with_flags): New.
2140 (bfd_make_section_anyway): Call bfd_make_section_anyway_with_flags,
2141 (bfd_make_section_with_flags): New.
2142 (bfd_make_section): Call bfd_make_section_with_flags.
2143
2144 * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Call
2145 bfd_make_section_with_flags/bfd_make_section_anyway_with_flags
2146 instead of bfd_make_section/bfd_make_section and don't call
2147 bfd_set_section_flags.
2148 (mn10300_elf_check_relocs): Likewise.
2149 (_bfd_mn10300_elf_create_dynamic_sections): Likewise.
2150 * elf32-arm.c (create_got_section): Likewise.
2151 (bfd_elf32_arm_add_glue_sections_to_bfd): Likewise.
2152 (elf32_arm_check_relocs): Likewise.
2153 * elf32-cris.c (cris_elf_check_relocs): Likewise.
2154 * elf32-frv.c (elf32_frv_add_symbol_hook): Likewise.
2155 (_frv_create_got_section): Likewise.
2156 (elf32_frvfdpic_create_dynamic_sections): Likewise.
2157 * elf32-hppa.c (elf32_hppa_create_dynamic_sections): Likewise.
2158 (elf32_hppa_check_relocs): Likewise.
2159 * elf32-i370.c (i370_elf_create_dynamic_sections): Likewise.
2160 (i370_elf_check_relocs): Likewise.
2161 * elf32-i386.c (create_got_section): Likewise.
2162 (elf_i386_check_relocs): Likewise.
2163 * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
2164 (create_got_section): Likewise.
2165 (m32r_elf_create_dynamic_sections): Likewise.
2166 (m32r_elf_check_relocs): Likewise.
2167 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
2168 * elf32-ppc.c (ppc_elf_create_got): Likewise.
2169 (ppc_elf_create_dynamic_sections): Likewise.
2170 (ppc_elf_add_symbol_hook): Likewise.
2171 (ppc_elf_check_relocs): Likewise.
2172 * elf32-s390.c (create_got_section): Likewise.
2173 (elf_s390_check_relocs): Likewise.
2174 * elf32-sh.c (create_got_section): Likewise.
2175 (sh_elf_create_dynamic_sections): Likewise.
2176 (sh_elf_check_relocs): Likewise.
2177 * elf32-vax.c (elf_vax_check_relocs): Likewise.
2178 * elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
2179 * elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Likewise.
2180 (add_extra_plt_sections): Likewise.
2181 * elf64-alpha.c (elf64_alpha_add_symbol_hook): Likewise.
2182 (elf64_alpha_create_got_section): Likewise.
2183 (elf64_alpha_create_dynamic_sections): Likewise.
2184 (elf64_alpha_check_relocs): Likewise.
2185 * elf64-hppa.c (get_reloc_section): Likewise.
2186 (get_opd): Likewise.
2187 (get_plt): Likewise.
2188 (get_dlt): Likewise.
2189 (get_stub): Likewise.
2190 (elf64_hppa_create_dynamic_sectionso): Likewise.
2191 * elf64-mmix.c (mmix_elf_check_common_relocs): Likewise.
2192 * elf64-ppc.c (create_linkage_sections): Likewise.
2193 (ppc64_elf_check_relocs): Likewise.
2194 * elf64-s390.c (create_got_section): Likewise.
2195 (elf_s390_check_relocs): Likewise.
2196 * elf64-sh64.c (sh_elf64_check_relocs): Likewise.
2197 (sh64_elf64_create_dynamic_sections): Likewise.
2198 * elf64-x86-64.c (create_got_section): Likewise.
2199 (elf64_x86_64_check_relocs): Likewise.
2200 * elflink.c (_bfd_elf_create_got_section): Likewise.
2201 (_bfd_elf_link_create_dynamic_sections): Likewise.
2202 (elf_link_add_object_symbols): Likewise.
2203 * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Likewise.
2204 (elfNN_ia64_create_dynamic_sections): Likewise.
2205 (get_fptr): Likewise.
2206 (get_pltoff): Likewise.
2207 (get_reloc_section): Likewise.
2208 (elfNN_ia64_object_p): Likewise.
2209 * elfxx-mips.c (mips_elf_rel_dyn_section): Likewise.
2210 (mips_elf_create_compact_rel_section): Likewise.
2211 (mips_elf_create_got_section): Likewise.
2212 (_bfd_mips_elf_create_dynamic_sections): Likewise.
2213 * elfxx-sparc.c (create_got_section): Likewise.
2214 (_bfd_sparc_elf_check_relocs): Likewise.
2215
2216 * elf.c (_bfd_elf_new_section_hook): Call _bfd_elf_get_sec_type_attr
2217 on linker created sections.
2218
59fef9e7
L
22192005-05-05 H.J. Lu <hongjiu.lu@intel.com>
2220
2221 PR 882
2222 * elflink.c (_bfd_elf_link_assign_sym_version): Allow version
2223 script on executable.
2224
35330cce
NC
22252005-05-05 John Levon <levon@movementarian.org>
2226
2227 * dwarf2.c (read_abbrevs): If bfd_realloc fails, free currently
2228 allocated memory before returning.
2229 (decode_line_info): Likewise.
2230 (_bfd_dwarf2_cleanup_debug_info): New function: Frees memory
2231 allocated by functions in this file.
2232 * elf-bfd.h (_bfd_dwarf2_cleanup_debug_info): Prototype.
6f140a15 2233 * elf.c (_bfd_elf_close_and_cleanup): Call
35330cce
NC
2234 _bfd_dwarf2_cleanup_debug_info.
2235
4a2a2686
HPN
22362005-05-05 Hans-Peter Nilsson <hp@axis.com>
2237
2238 * Makefile.am (INCLUDES): Don't -D_GNU_SOURCE here.
2239 * configure.in: Call AC_GNU_SOURCE here, after AC_PROG_CC.
2240 * configure, config.in, Makefile.in: Regenerate.
2241 * sysdep.h (stpcpy): Revert last change.
2242
0baace35
HPN
22432005-05-05 Hans-Peter Nilsson <hp@axis.com>
2244
2245 * sysdep.h (stpcpy): Wrap declaration in parentheses.
2246
5a260b66
L
22472005-05-04 H.J. Lu <hongjiu.lu@intel.com>
2248
2249 * elfxx-ia64.c (ARCH_SIZE): New.
2250 (LOG_SECTION_ALIGN): Likewise.
2251 (elfNN_ia64_create_dynamic_sections): Use LOG_SECTION_ALIGN to
2252 align relocation sections.
2253 (get_fptr): Likewise.
2254 (get_reloc_section): Likewise.
2255 (elfNN_ia64_tprel_base): Likewise.
2256 (elfNN_ia64_check_relocs): Support 32bit relocations.
2257 (allocate_global_fptr_got): Likewise.
2258 (allocate_dynrel_entries): Likewise.
2259 (set_got_entry): Likewise.
2260 (set_pltoff_entry): Likewise.
2261 (elfNN_ia64_relocate_section): Likewise.
2262
22632005-05-04 H.J. Lu <hongjiu.lu@intel.com>
2264
2265 * configure.in: Add AC_CHECK_DECLS(stpcpy).
2266 * configure: Regenerate.
2267 * config.in: Likewise.
2268
2269 * sysdep.h (stpcpy): New.
2270
3e110533
NC
22712005-05-04 Nick Clifton <nickc@redhat.com>
2272
2273 * Update the address and phone number of the FSF organization in
2274 the GPL notices in the following files:
2275 aix386-core.c, aix5ppc-core.c, aout-adobe.c, aout-arm.c,
2276 aout-cris.c, aout-ns32k.c, aout-sparcle.c, aout-target.h,
2277 aout-tic30.c, aout0.c, aout32.c, aout64.c, aoutf1.h, aoutx.h,
2278 archive.c, archive64.c, archures.c, armnetbsd.c, bfd-in.h,
2279 bfd-in2.h, bfd.c, bfdio.c, bfdwin.c, binary.c, bout.c, cache.c,
2280 cf-i386lynx.c, cf-m68klynx.c, cf-sparclynx.c, cisco-core.c,
2281 coff-a29k.c, coff-alpha.c, coff-apollo.c, coff-arm.c, coff-aux.c,
2282 coff-go32.c, coff-h8300.c, coff-h8500.c, coff-i386.c, coff-i860.c,
2283 coff-i960.c, coff-ia64.c, coff-m68k.c, coff-m88k.c, coff-maxq.c,
2284 coff-mcore.c, coff-mips.c, coff-or32.c, coff-pmac.c, coff-ppc.c,
2285 coff-rs6000.c, coff-sh.c, coff-sparc.c, coff-stgo32.c,
2286 coff-svm68k.c, coff-tic30.c, coff-tic4x.c, coff-tic54x.c,
2287 coff-tic80.c, coff-u68k.c, coff-w65.c, coff-we32k.c, coff-z8k.c,
2288 coff64-rs6000.c, coffcode.h, coffgen.c, cofflink.c, coffswap.h,
2289 corefile.c, cpu-a29k.c, cpu-alpha.c, cpu-arc.c, cpu-arm.c,
2290 cpu-avr.c, cpu-cr16c.c, cpu-cris.c, cpu-crx.c, cpu-d10v.c,
2291 cpu-d30v.c, cpu-dlx.c, cpu-fr30.c, cpu-frv.c, cpu-h8300.c,
2292 cpu-h8500.c, cpu-hppa.c, cpu-i370.c, cpu-i386.c, cpu-i860.c,
2293 cpu-i960.c, cpu-ia64-opc.c, cpu-ia64.c, cpu-ip2k.c, cpu-iq2000.c,
2294 cpu-m10200.c, cpu-m10300.c, cpu-m32r.c, cpu-m68hc11.c,
2295 cpu-m68hc12.c, cpu-m68k.c, cpu-m88k.c, cpu-maxq.c, cpu-mcore.c,
2296 cpu-mips.c, cpu-mmix.c, cpu-msp430.c, cpu-ns32k.c, cpu-openrisc.c,
2297 cpu-or32.c, cpu-pdp11.c, cpu-pj.c, cpu-powerpc.c, cpu-rs6000.c,
2298 cpu-s390.c, cpu-sh.c, cpu-sparc.c, cpu-tic30.c, cpu-tic4x.c,
2299 cpu-tic54x.c, cpu-tic80.c, cpu-v850.c, cpu-vax.c, cpu-w65.c,
2300 cpu-we32k.c, cpu-xstormy16.c, cpu-xtensa.c, cpu-z8k.c, demo64.c,
2301 dwarf1.c, dwarf2.c, ecoff.c, ecofflink.c, ecoffswap.h,
2302 efi-app-ia32.c, efi-app-ia64.c, elf-bfd.h, elf-eh-frame.c,
2303 elf-hppa.h, elf-m10200.c, elf-m10300.c, elf-strtab.c, elf.c,
2304 elf32-am33lin.c, elf32-arc.c, elf32-arm.c, elf32-avr.c,
2305 elf32-cr16c.c, elf32-cris.c, elf32-crx.c, elf32-d10v.c,
2306 elf32-d30v.c, elf32-dlx.c, elf32-fr30.c, elf32-frv.c, elf32-gen.c,
2307 elf32-h8300.c, elf32-hppa.c, elf32-hppa.h, elf32-i370.c,
2308 elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
2309 elf32-iq2000.c, elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c,
2310 elf32-m68hc1x.c, elf32-m68hc1x.h, elf32-m68k.c, elf32-m88k.c,
2311 elf32-mcore.c, elf32-mips.c, elf32-msp430.c, elf32-openrisc.c,
2312 elf32-or32.c, elf32-pj.c, elf32-ppc.c, elf32-ppc.h, elf32-s390.c,
2313 elf32-sh-symbian.c, elf32-sh.c, elf32-sh64-com.c, elf32-sh64.c,
2314 elf32-sh64.h, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
2315 elf32-xstormy16.c, elf32-xtensa.c, elf32.c, elf64-alpha.c,
2316 elf64-gen.c, elf64-hppa.c, elf64-hppa.h, elf64-mips.c,
2317 elf64-mmix.c, elf64-ppc.c, elf64-ppc.h, elf64-s390.c,
2318 elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c, elf64.c, elfcode.h,
2319 elfcore.h, elflink.c, elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c,
2320 elfxx-mips.h, elfxx-sparc.c, elfxx-sparc.h, elfxx-target.h,
2321 epoc-pe-arm.c, epoc-pei-arm.c, format.c, freebsd.h, gen-aout.c,
2322 genlink.h, hash.c, host-aout.c, hp300bsd.c, hp300hpux.c,
2323 hppabsd-core.c, hpux-core.c, i386aout.c, i386bsd.c, i386dynix.c,
2324 i386freebsd.c, i386linux.c, i386lynx.c, i386mach3.c, i386msdos.c,
2325 i386netbsd.c, i386os9k.c, ieee.c, ihex.c, init.c, irix-core.c,
2326 libaout.h, libbfd-in.h, libbfd.c, libbfd.h, libcoff-in.h,
2327 libcoff.h, libecoff.h, libhppa.h, libieee.h, libnlm.h, liboasys.h,
2328 libpei.h, libxcoff.h, linker.c, lynx-core.c, m68k4knetbsd.c,
2329 m68klinux.c, m68klynx.c, m68knetbsd.c, m88kmach3.c, m88kopenbsd.c,
2330 mach-o-target.c, mach-o.c, mach-o.h, merge.c, mipsbsd.c, mmo.c,
2331 netbsd-core.c, netbsd.h, newsos3.c, nlm-target.h, nlm.c,
2332 nlm32-alpha.c, nlm32-i386.c, nlm32-ppc.c, nlm32-sparc.c, nlm32.c,
2333 nlm64.c, nlmcode.h, nlmswap.h, ns32k.h, ns32knetbsd.c, oasys.c,
2334 opncls.c, osf-core.c, pc532-mach.c, pdp11.c, pe-arm.c, pe-i386.c,
2335 pe-mcore.c, pe-mips.c, pe-ppc.c, pe-sh.c, peXXigen.c,
2336 pef-traceback.h, pef.c, pef.h, pei-arm.c, pei-i386.c, pei-mcore.c,
2337 pei-mips.c, pei-ppc.c, pei-sh.c, peicode.h, ppcboot.c,
2338 ptrace-core.c, reloc.c, reloc16.c, riscix.c, rs6000-core.c,
2339 sco5-core.c, section.c, simple.c, som.c, som.h, sparclinux.c,
2340 sparclynx.c, sparcnetbsd.c, srec.c, stab-syms.c, stabs.c, sunos.c,
2341 syms.c, sysdep.h, targets.c, tekhex.c, ticoff.h, trad-core.c,
2342 vax1knetbsd.c, vaxbsd.c, vaxnetbsd.c, versados.c, vms-gsd.c,
2343 vms-hdr.c, vms-misc.c, vms-tir.c, vms.c, vms.h, xcoff-target.h,
2344 xcofflink.c, xsym.c, xsym.h, xtensa-isa.c, xtensa-modules.c,
11d02c41 2345 hosts/alphavms.h
3e110533 2346
f652615e
L
23472005-05-04 H.J. Lu <hongjiu.lu@intel.com>
2348
2349 * bfd-in.h (_bfd_elf_provide_section_bound_symbols): New.
2350 * bfd-in2.h: Regenerated.
2351
2352 * elflink.c (bfd_elf_set_symbol): New.
2353 (_bfd_elf_provide_symbol): Call it.
2354 (_bfd_elf_provide_section_bound_symbols): New.
2355
c5e2cead
L
23562005-05-04 H.J. Lu <hongjiu.lu@intel.com>
2357
2358 * elflink.c (_bfd_elf_merge_symbol): Only skip weak definitions
2359 at the end, if a strong definition has already been seen.
2360
8423293d
AM
23612005-05-04 Alan Modra <amodra@bigpond.net.au>
2362
2363 * section.c (struct bfd_section): Replace link_order_head and
2364 link_order_tail with map_head and map_tail union.
2365 (STD_SECTION): Update.
2366 (_bfd_strip_section_from_output): Delete.
2367 * aoutx.h: Update throughout for above changes.
2368 * coff-ppc.c: Likewise.
2369 * cofflink.c: Likewise.
2370 * ecoff.c: Likewise.
2371 * elf-eh-frame.c: Likewise.
2372 * elf-m10300.c: Likewise.
2373 * elf.c: Likewise.
2374 * elf32-arm.c: Likewise.
2375 * elf32-cris.c: Likewise.
2376 * elf32-hppa.c: Likewise.
2377 * elf32-i386.c: Likewise.
2378 * elf32-m32r.c: Likewise.
2379 * elf32-m68hc1x.c: Likewise.
2380 * elf32-m68k.c: Likewise.
2381 * elf32-ppc.c: Likewise.
2382 * elf32-s390.c: Likewise.
2383 * elf32-sh.c: Likewise.
2384 * elf32-vax.c: Likewise.
2385 * elf32-xtensa.c: Likewise.
2386 * elf64-alpha.c: Likewise.
2387 * elf64-hppa.c: Likewise.
2388 * elf64-ppc.c: Likewise.
2389 * elf64-s390.c: Likewise.
2390 * elf64-sh64.c: Likewise.
2391 * elf64-x86-64.c: Likewise.
2392 * elflink.c: Likewise.
2393 * elfxx-ia64.c: Likewise.
2394 * elfxx-mips.c: Likewise.
2395 * elfxx-sparc.c: Likewise.
2396 * linker.c: Likewise.
2397 * merge.c: Likewise.
2398 * pdp11.c: Likewise.
2399 * xcofflink.c: Likewise.
2400 * elflink.c (bfd_boolean bfd_elf_size_dynsym_hash_dynstr): Split
2401 out from bfd_elf_size_dynamic_sections.
2402 * bfd-in.h (bfd_boolean bfd_elf_size_dynsym_hash_dynstr): Declare.
2403 * bfd-in2.h: Regenerate.
2404
04dd1667
AM
24052005-05-04 Alan Modra <amodra@bigpond.net.au>
2406
2407 * section.c (bfd_section_list_remove): Don't clear s->next.
2408 (bfd_section_list_append): Always init s->prev.
2409 (bfd_section_list_prepend): Define.
2410 (bfd_section_list_insert_after): Minor optimization.
2411 (bfd_section_removed_from_list): Rewrite.
2412 * elf.c (assign_section_numbers): Simplify list traversal now that
2413 bfd_section_list_remove doesn't destroy removed section next ptr.
2414 * sunos.c (sunos_add_dynamic_symbols): Likewise.
2415 * elfxx-ia64.c (elfNN_ia64_object_p): Use bfd_section_list_prepend.
2416 * xcofflink.c (_bfd_xcoff_bfd_final_link): Simplify list traversal.
2417 * bfd-in2.h: Regenerate.
2418
5daa8fe7
L
24192005-05-02 H.J. Lu <hongjiu.lu@intel.com>
2420
2421 * bfd.c (bfd): Remove section_tail and add section_last.
2422 (bfd_preserve): Likewise.
2423 (bfd_preserve_save): Likewise.
2424 (bfd_preserve_restore): Likewise.
2425 * opncls.c (_bfd_new_bfd): Likewise.
2426
2427 * coffcode.h (coff_compute_section_file_positions): Updated.
2428 (coff_compute_section_file_positions): Likewise.
2429 * elf.c (assign_section_numbers): Likewise.
2430 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
2431 * elf64-mmix.c (mmix_elf_final_link): Likewise.
2432 * elfxx-ia64.c (elfNN_ia64_object_p): Likewise.
2433 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
2434 * sunos.c (sunos_add_dynamic_symbols): Likewise.
2435 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
2436
2437 * ecoff.c (bfd_debug_section): Initialize prev.
2438
2439 * section.c (bfd_section): Add prev.
2440 (bfd_section_list_remove): Updated.
2441 (bfd_section_list_append): New.
2442 (bfd_section_list_insert_after): New.
2443 (bfd_section_list_insert_before): New.
2444 (bfd_section_list_insert): Removed.
2445 (bfd_section_removed_from_list): Updated.
2446 (STD_SECTION): Initialize prev.
2447 (bfd_section_init): Updated.
2448 (bfd_section_list_clear): Updated.
2449
2450 * bfd-in2.h: Regenerated.
2451
a31501e9
L
24522005-05-02 H.J. Lu <hongjiu.lu@intel.com>
2453
2454 * elf.c (_bfd_elf_new_section_hook): Don't call
2455 _bfd_elf_get_sec_type_attr on sections from input files.
2456
d05da6a8
L
24572005-05-02 H.J. Lu <hongjiu.lu@intel.com>
2458
2459 * merge.c (sec_merge_init): Call bfd_hash_table_init_n with
2460 hash table size 16699 instead of bfd_hash_table_init.
2461
a67b080b
PB
24622005-05-01 Paul Brook <paul@codesourcery.com>
2463
2464 * elflink.c (_bfd_elf_merge_symbol): Skip weak definitions if a strong
2465 definition has already been seen.
2466
c6596c5e
PB
24672005-05-01 Paul Brook <paul@codesourcery.com>
2468
2469 * elf32-arm.c (bfd_elf32_arm_process_before_allocation): Treat
2470 R_ARM_PLT32 the same as R_ARM_PC24.
2471 (arm_add_to_rel): Ditto.
2472
9a813b7a
DJ
24732005-04-29 Ralf Corsepius <ralf.corsepius@rtems.org>
2474
2475 * config.bfd: Add h8300*-*-rtemscoff.
2476 Switch h8300*-*-rtems* to elf.
2477
aa7eb06d
DJ
24782005-04-29 Daniel Jacobowitz <dan@codesourcery.com>
2479
2480 * aclocal.m4, Makefile.in: Regnerated.
2481
fa0d1cab
PB
24822005-04-28 Paul Brook <paul@codesourcery.com>
2483
2484 Merge changes only applied to Makefile.in.
2485 * Makefile.am (BFD32_BACKENDS): Add elfxx-sparc.lo
2486 (BFD32_BACKENDS_CFILES): Add elfxx-sparc.c
2487 (elfxx-sparc.lo): New rule.
2488 (elf32-sparc.lo): Add elfxx-sparc.h dependency.
2489 (elf64-sparc.lo): Likewise.
2490
0291d291
NC
24912005-04-28 Julian Brown <julian@codesourcery.com>
2492
2493 * elflink.c (_bfd_elf_provide_symbol): Provide symbol for weak
2494 import.
2495
26c61ae5
L
24962005-04-27 H.J. Lu <hongjiu.lu@intel.com>
2497
2498 * elf-bfd.h (bfd_elf_sym_name): Also take "asection *".
2499
2500 * elf.c (bfd_elf_sym_name): Updated.
2501 (group_signature): Likewise.
2502 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2503 * elf64-ppc.c (ppc64_elf_edit_opd): Likewise.
2504 (ppc64_elf_edit_toc): Likewise.
2505 (ppc64_elf_relocate_section): Likewise.
2506 * elfcode.h (elf_slurp_symbol_table): Likewise.
2507 * elflink.c (elf_link_input_bfd): Likewise.
2508
2509 * elfxx-ia64.c (elfNN_ia64_relocate_section): Call
2510 bfd_elf_sym_name to get local symbol name when reporting errors.
2511
8c19749a
NC
25122005-04-27 Nick Clifton <nickc@redhat.com>
2513
2514 * elflink.c (elf_link_input_bfd): Handle the case where a badly
2515 formatted input file results in a reloc which has no associated
2516 global symbol.
2517
8e5b6e16
JG
25182005-04-26 Jerome Guitton <guitton@gnat.com>
2519
2520 * bfd.m4 (BFD_NEED_DECLARATION): Restore.
2521
e459dc7b
DM
25222005-04-25 David S. Miller <davem@davemloft.net>
2523
2524 * elfxx-sparc.c (sparc_elf_append_rela_64): Add BFD64 protection.
2525 (sparc_elf_r_info_64, _bfd_sparc_elf_finish_dynamic_symbol,
2526 sparc64_finish_dyn, _bfd_sparc_elf_finish_dynamic_sections):
2527 Likewise.
2528
6d633fd2
L
25292005-04-25 H.J. Lu <hongjiu.lu@intel.com>
2530
2531 PR 858
2532 * elflink.c (elf_link_input_bfd): Make non-debugging reference
2533 to discarded section an error.
2534
d34a2b1d
JG
25352005-04-21 Jerome Guitton <guitton@gnat.com>
2536
2537 * configure.in: Replace BFD_NEED_DECLARATION checks by the
2538 corresponding AC_CHECK_DECLS.
2539 * sysdep.h: Replace NEED_DECLARATION_* checks by the corresponding
2540 HAVE_DECL_*.
2541 * bfd.m4 (BFD_NEED_DECLARATION): Remove, obsolete.
2542 * configure: Regenerate.
2543 * config.in: Ditto.
2544
ff01938b
AS
25452005-04-21 Andreas Schwab <schwab@suse.de>
2546
c2e70a82
AS
2547 * elfxx-sparc.h (struct _bfd_sparc_elf_link_hash_table): Remove
2548 unsigned from type of dynamic_interpreter.
2549 * elfxx-sparc.c (_bfd_sparc_elf_link_hash_table_create): Remove
2550 casts again.
2551
ff01938b
AS
2552 * elf.c (assign_section_numbers): Fix comment.
2553
0858d3ec
JG
25542005-04-21 Jerome Guitton <guitton@gnat.com>
2555
2556 * som.c (som_bfd_print_private_bfd_data): Add explicit cast to long
2557 for struct som_exec_auxhdr fields.
2558
7920ce38
NC
25592005-04-21 Nick Clifton <nickc@redhat.com>
2560
2561 * aout-adobe.c: Convert to ISO C and fix formatting.
2562 * aout-arm.c: Convert to ISO C and fix formatting.
2563 * aout-cris.c: Convert to ISO C and fix formatting.
2564 * aout-ns32k.c: Convert to ISO C and fix formatting.
2565 * aout-tic30.c: Convert to ISO C and fix formatting.
2566 * coffcode.h: Convert to ISO C and fix formatting.
2567 * coffswap.h: Convert to ISO C and fix formatting.
2568 * i386aout.c: Convert to ISO C and fix formatting.
2569 * libaout.h: Convert to ISO C and fix formatting.
2570 * libcoff-in.h: Convert to ISO C and fix formatting.
2571 * libcoff.h: Convert to ISO C and fix formatting.
2572 * libecoff.h: Convert to ISO C and fix formatting.
2573 * libnlm.h: Convert to ISO C and fix formatting.
2574 * libpei.h: Convert to ISO C and fix formatting.
2575 * libxcoff.h: Convert to ISO C and fix formatting.
2576 * nlm-target.h: Convert to ISO C and fix formatting.
2577 * nlm.c: Convert to ISO C and fix formatting.
2578 * nlm32-alpha.c: Convert to ISO C and fix formatting.
2579 * nlm32-i386.c: Convert to ISO C and fix formatting.
2580 * nlm32-ppc.c: Convert to ISO C and fix formatting.
2581 * nlm32-sparc.c: Convert to ISO C and fix formatting.
2582 * nlmcode.h: Convert to ISO C and fix formatting.
2583 * nlmswap.h: Convert to ISO C and fix formatting.
2584 * pe-mips.c: Convert to ISO C and fix formatting.
2585 * peXXigen.c: Convert to ISO C and fix formatting.
2586 * peicode.h: Convert to ISO C and fix formatting.
2587 * vms-gsd.c: Convert to ISO C and fix formatting.
2588 * vms-hdr.c: Convert to ISO C and fix formatting.
2589 * vms-misc.c: Convert to ISO C and fix formatting.
2590 * vms-tir.c: Convert to ISO C and fix formatting.
2591 * vms.c: Convert to ISO C and fix formatting.
2592 * vms.h: Convert to ISO C and fix formatting.
2593
2594 * coffgen.c (coff_print_symbol): Restore correct formatting of
2595 output.
2596
e8be8da4
DM
25972005-04-20 David S. Miller <davem@davemloft.net>
2598
2599 * elfxx-sparc.c (sparc_elf_r_symndx_64): Fix compiler warning.
2600 (_bfd_sparc_elf_link_hash_table_create): Likewise.
2601 (allocate_dynrelocs): Likewise.
2602
ec7b76fe
JG
26032005-04-20 Jerome Guitton <guitton@gnat.com>
2604
2605 * configure.in: Fix the check for basename declaration. Add check
2606 for declarations of ftello, ftello64, fseeko, fseeko64.
2607 * configure: Regenerate.
2608 * config.in: Ditto.
2609 * sysdep.h: If needed, declare ftello, ftello64, fseeko, fseeko64.
2610
22b75d0a
DM
26112005-04-19 David S. Miller <davem@davemloft.net>
2612
2613 * elfxx-sparc.c: New file.
2614 * elfxx-sparc.h: New file.
2615 * Makefile.in (BFD32_BACKENDS): Add elfxx-sparc.lo
2616 (BFD32_BACKENDS_CFILES): Add elfxx-sparc.c
2617 (elfxx-sparc.lo): New rule.
2618 (elf32-sparc.lo): Add elfxx-sparc.h dependency.
2619 (elf64-sparc.lo): Likewise.
2620 * configure.in (bfd_elf32_sparc_vec): Add elfxx-sparc.lo
2621 (bfd_elf64_sparc_vec): Likewise.
2622 * configure: Regenerate.
2623 * elf32-sparc.c: Remove common code now in elfxx-sparc.c
2624 * elf64-sparc.c: Likewise, also use elf64_sparc_*() naming
2625 which is more consistent with elf32-sparc.c
2626
a008ac03
DJ
26272005-04-19 Daniel Jacobowitz <dan@codesourcery.com>
2628
2629 * elfxx-mips.c (struct mips_elf_link_hash_entry): Update comment.
2630 (mips_elf_create_local_got_entry): Check h->root.forced_local.
2631
c87b5a93
AM
26322005-04-19 Alan Modra <amodra@bigpond.net.au>
2633
2634 * elf32-ppc.c (ppc_elf_check_relocs): Don't bother with
2635 dynamic relocs in non-SEC_ALLOC sections.
2636 (ppc_elf_gc_sweep_hook): Likewise.
2637 (ppc_elf_relax_section): Likewise.
2638 (ppc_elf_relocate_section): Likewise.
2639
7cefacd3
NC
26402005-04-18 Nick Clifton <nickc@redhat.com>
2641
2642 * aix5ppc-core.c (xcoff64_core_p): Fix compile time warning
2643 assigning a value to return_value.
2644
278d8f37
L
26452005-04-17 H.J. Lu <hongjiu.lu@intel.com>
2646
2647 PR 855
2648 * elf.c (_bfd_elf_copy_private_section_data): Don't copy linker
2649 created group data.
2650
20dbb49d
L
26512005-04-17 H.J. Lu <hongjiu.lu@intel.com>
2652
2653 PR 855
2654 * elf.c (setup_group): Properly handle zero group count.
2655
6a808a40
MK
26562005-04-17 Mark Kettenis <kettenis@gnu.org>
2657
2658 * som.c (hppa_som_reloc, som_mkobject, som_is_space)
2659 (som_is_subspace, compare_subspaces, som_compute_checksum)
2660 (som_build_and_write_symbol_table, som_slurp_symbol_table): New
2661 protoypes.
2662 (hppa_som_reloc, compare_syms, compare_subspaces)
2663 (som_print_symbol, som_get_section_contents)
2664 (som_set_section_contents): Remove space after 'void *'.
2665 (som_bfd_print_private_bfd_data): Use %lx to print longs.
2666 (som_bfd_merge_private_bfd_data)
2667 (som_bfd_copy_private_header_data, som_bfd_set_private_flags): New
2668 defines.
2669
33bfe774
JB
26702004-04-15 Julian Brown <julian@codesourcery.com>
2671
2672 * bfd-in.h (bfd_elf32_arm_set_target_relocs): Update prototype.
2673 * bfd-in2.h: Regenerate.
2674 * elf32-arm.c (elf32_arm_link_hash_table): New field, 'use_blx'.
2675 (elf32_arm_link_hash_table_create): Initialise fix_v4bx, use_blx.
2676 (bfd_elf32_arm_set_target_relocs): Handle use_blx.
2677 (elf32_arm_final_link_relocate): Use Thumb BLX for R_ARM_THM_PC22
2678 relocations if requested to.
2679 (allocate_dynrelocs): Don't count size of omitted Thumb stubs based on
2680 use_blx rather than symbian_p.
2681 (elf32_arm_finish_dynamic_symbol): Don't output Thumb PLT stubs if
2682 use_blx is in effect.
2683 (elf32_arm_symbian_link_hash_table_create): Enable use_blx by default
2684 for SymbianOS.
2685
745c12f8
NC
26862005-04-15 Nick Clifton <nickc@redhat.com>
2687
2688 * coffgen.c (coff_print_symbol): Use fprintf_vma to print vma
2689 values.
2690
2e8b3a61
AM
26912005-04-15 Alan Modra <amodra@bigpond.net.au>
2692
2693 PR ld/815
2694 * elflink.c (elf_smash_syms): Clear undef.next if it's not being
2695 used as a list pointer.
2696
9e9b66a9
AM
26972005-04-14 Alan Modra <amodra@bigpond.net.au>
2698
2699 * Makefile.am (NO_WERROR): Define.
2700 * warning.m4: New file
2701 * acinclude.m4: Include warning.m4.
2702 * configure.in: Invoke AM_BINUTILS_WARNINGS.
2703 * Makefile.in: Regenerate.
2704 * configure: Regenerate.
2705
8699aa54
AM
27062005-04-14 Alan Modra <amodra@bigpond.net.au>
2707
92ceba1e
AM
2708 * merge.c (sec_merge_emit): Tidy. Check for bfd_zmalloc errors.
2709 Write trailing padding.
2710
8699aa54
AM
2711 * merge.c (merge_strings): Round up section size for alignment.
2712
40937810
JJ
27132005-04-14 David S. Miller <davem@davemloft.net>
2714
2715 Add TLS support for 64-bit Sparc ELF.
2716 * elf64-sparc.c (sparc64_elf_dyn_relocs,
2717 sparc64_elf_link_hash_entry, sparc64_elf_obj_tdata): New structs.
2718 (GOT_UNKNOWN, GOT_NORMAL, GOT_TLD_GD, GOT_TLD_IE,
2719 sparc64_elf_hash_entry, sparc64_elf_tdata,
2720 sparc64_elf_local_got_tls_type): New defines.
2721 (sparc64_elf_mkobject): New function.
2722 (sparc64_elf_link_hash_table): Add members for dynamic linker
2723 sections PLT, RELPLT, DYNBSS, and RELBSS. Add tls_ldm_got
2724 uion to track TLS GOT references. Add sym_sec to cache
2725 mappings from local sym to section.
2726 (link_hash_newfunc): New function.
2727 (sparc64_elf_bfd_link_hash_table_create): Rename to
2728 sparc64_elf_link_hash_table_create for consistency.
2729 Pass link_hash_newfunc to _bfd_elf_link_hash_table_init.
2730 (sparc64_elf_create_dynamic_sections): Initialize new section
2731 members of sparc64_elf_link_hash_table. Only init srelbss
2732 if not-shared.
2733 (sparc64_elf_copy_indirect_symbol, sparc64_elf_tls_transition):
2734 New functions.
2735 (SPARC_NOP): Define.
2736 (sparc64_elf_build_plt, sparc64_elf_plt_entry_offset,
2737 sparc64_elf_plt_ptr_offset): Delete.
2738 (sparc64_plt_entry_build): New function to build PLT entries
2739 gradually instread of all at once at the end of linking.
2740 (sparc64_elf_check_relocs): Delete dynobj, sgot, and srelgot
2741 local vars. Get them from sparc64_elf_hash_table instead.
2742 Check early on if r_symndx is in bounds. Handle TLS transitions.
2743 Account for TLS GOT references and DF_STATIC_TLS, as needed.
2744 For TLS relocs, record the tls_type in either
2745 sparc64_elf_local_got_tls_type or sparc64_elf_hash_entry as
2746 appropriate. For R_SPARC_TLS_{GD,LDM}_CALL, emit a reference
2747 to the __tls_get_addr symbol. For PLT relocs, track references
2748 via h->plt.refcount. When R_SPARC_{PC10,PC22,PC_HH22,PC_HM10,
2749 PC_LM22} and h not-NULL, set h->non_got_ref. For global data
2750 symbol references, count the number of relocations needed for
2751 that symbol. For default switch case, don't error, this lets
2752 the TLS relocs not explicitly handled by this function get
2753 accepted.
2754 (sparc64_elf_gc_mark_hook, sparc64_gc_sweep_hook): New functions.
2755 (sparc64_elf_adjust_dynamic_symbol): Remove dynobj local var, get
2756 it from sparc64_elf_hash_table. Store the real PLT offset
2757 in h->plt.offset, and build PLT entries one at a time. Also
2758 get .dynbss section pointer from htab.
2759 (allocate_dynrelocs, readonly_dynrelocs,
2760 sparc64_omit_section_dynsym): New functions.
2761 (sparc64_elf_omit_section_dynsym): Use these new functions as
2762 helpers.
2763 (dtpoff_base, tpoff): New functions.
2764 (sparc64_elf_relocate_section): Kill dynobj, sgot, and splt
2765 locals, get them from sparc64_elf_hash_table. Handle TLS
2766 relocations and refcounting in main relocation loop.
2767 (sparc64_elf_finish_dynamic_symbol): Use
2768 sparc64_elf_link_hash_table. Build PLT entries as we see
2769 them. Handle TLS GOT relocations.
2770 (sparc64_elf_finish_dynamic_sections): Get sgot and dynobj
2771 from sparc64_elf_hash_table. Initialize only PLT header
2772 not all entries since we not build PLT entries one by one.
2773 (elf_backend_copy_indirect_symbol, bfd_elf64_mkobject,
2774 elf_backend_gc_mark_hook, elf_backend_gc_sweep_hook,
2775 elf_backend_can_gc_sections, elf_backend_can_refcount): Define.
2776
e75a280b
L
27772005-04-13 Daniel Jacobowitz <dan@codesourcery.com>
2778
2779 * elflink.c (elf_link_input_bfd): Update check for removed
2780 sections.
2781
ceae3e33
AM
27822005-04-12 Alan Modra <amodra@bigpond.net.au>
2783
2784 * Makefile.am: Run "make dep-am".
2785 * Makefile.in: Regenerate.
2786 * aclocal.m4: Regenerate.
2787 * libcoff.h: Regenerate.
2788
ab82c5b9
L
27892005-04-11 H.J. Lu <hongjiu.lu@intel.com>
2790
2791 * linker.c (_bfd_generic_link_output_symbols): Also check if
2792 the output section of an input section has been removed from
2793 the output file.
2794
2795 * section.c (bfd_section_list_remove): Clear the next field
2796 of the removed section.
2797 (bfd_section_removed_from_list): New.
2798 * bfd-in2.h: Regenerated.
2799
bd695bcc
JJ
28002005-04-11 David S. Miller <davem@davemloft.net>
2801
2802 * elf32-sparc.c (elf32_sparc_relocate_section,
2803 R_SPARC_TLS_LDO_{HIX22,LOX10}): When not shared, transition to
2804 R_SPARC_TLS_LE_{HIX22,LOX10}.
2805 (elf32_sparc_relocate_section, R_SPARC_TLS_{LDO,LE}_HIX22): Only
2806 xor relocation with 0xffffffff if R_SPARC_TLS_LE_HIX22.
2807 (elf32_sparc_relocate_section, R_SPARC_TLS_{LDO,LE}_LOX10): Only
2808 or 0x1c00 into relocation if R_SPARC_TLS_LE_HIX22.
2809
b5b2699c
L
28102005-04-11 H.J. Lu <hongjiu.lu@intel.com>
2811
2812 * coffcode.h (STRING_SIZE_SIZE): Updated to match libcoff-in.h.
2813
116c20d2 28142005-04-11 Nick Clifton <nickc@redhat.com>
d7128ce4 2815
116c20d2
NC
2816 * aout-target.h: Convert to ISO C.
2817 * aoutf1.h: Convert to ISO C.
2818 * aoutx.h: Convert to ISO C.
2819 * bout.c: Convert to ISO C.
2820 * dwarf1.c: Convert to ISO C.
2821 * ecoffswap.h: Convert to ISO C.
2822 * freebsd.h: Convert to ISO C.
2823 * genlink.h: Convert to ISO C.
2824 * ieee.c: Convert to ISO C.
2825 * ihex.c: Convert to ISO C.
2826 * libcoff-in.h: Convert to ISO C.
2827 * mach-o.c: Convert to ISO C.
2828 * mach-o.h: Convert to ISO C.
2829 * netbsd.h: Convert to ISO C.
2830 * ns32k.h: Convert to ISO C.
2831 * ns32knetbsd.c: Convert to ISO C.
2832 * oasys.c: Convert to ISO C.
2833 * pdp11.c: Convert to ISO C.
2834 * pef-traceback.h: Convert to ISO C.
2835 * pef.c: Convert to ISO C.
2836 * pef.h: Convert to ISO C.
2837 * riscix.c: Convert to ISO C.
2838 * som.c: Convert to ISO C.
2839 * som.h: Convert to ISO C.
2840 * srec.c: Convert to ISO C.
2841 * stabs.c: Convert to ISO C.
2842 * sunos.c: Convert to ISO C.
2843 * tekhex.c: Convert to ISO C.
2844 * versados.c: Convert to ISO C.
2845 * version.h: Convert to ISO C.
2846 * xcoff-target.h: Convert to ISO C.
2847 * xcofflink.c: Convert to ISO C.
2848 * xsym.c: Convert to ISO C.
2849 * xsym.h: Convert to ISO C.
2850
8f6277f5
PB
28512005-04-08 Paul Brook <paul@codesourcery.com>
2852
2853 * elf32-arm.c (ARM2THUMB_GLUE_SIZE): Rename...
2854 (ARM2THUMB_STATIC_GLUE_SIZE): ... to this.
2855 (ARM2THUMB_PIC_GLUE_SIZE): Define.
2856 (a2t1p_ldr_insn, a2t2p_add_pc_insn, a2t3p_bx_r12_insn): Add.
2857 (elf32_arm_to_thumb_stub): Create PIC stubs.
2858 (record_arm_to_thumb_glue): Use different stub size for relocatable
2859 images.
2860
8c1d1bb8
AM
28612005-04-05 Alan Modra <amodra@bigpond.net.au>
2862
2863 * elf64-ppc.c (dec_dynrel_count): New function split out from
2864 ppc64_elf_edit_toc, with additional code from ppc64_elf_edit_opd.
2865 (ppc64_elf_edit_toc, ppc64_elf_edit_opd): Use it.
2866 (ppc64_elf_tls_optimize): Likewise.
2867
8c101720
NC
28682005-04-05 Mark Kettenis <kettenis@gnu.org>
2869
2870 * netbsd-core.c (SPARC_WCOOKIE_OFFSET): Renamed from
2871 CORE_WCOOKIE_OFFSET.
2872 (SPARC64_WCOOKIE_OFFSET): New.
2873 (netbsd_core_file_p): Provide .wcookie section for OpenBSD/sparc64.
2874
429cc0ae
NC
28752005-04-05 Nick Clifton <nickc@redhat.com>
2876
2877 * po/rw.po: New translation: Kinyarwanda
2878 * configure.in (ALL_LINGUAS): Add rw
2879 * configure: Regenerate.
2880
cc2e31b9
RS
28812005-04-05 Richard Sandiford <rsandifo@redhat.com>
2882
2883 * elfxx-mips.c (MIPS_ELF_OPTIONS_SECTION_NAME_P): New macro.
2884 (_bfd_mips_elf_section_from_shdr): Use it to check for recognized
2885 SHT_MIPS_OPTIONS names. Allow all sections with unrecognised
2886 section flags.
2887 (_bfd_mips_elf_fake_sections): Use MIPS_ELF_OPTIONS_SECTION_NAME_P
2888 to check for SHT_MIPS_OPTIONS sections.
2889 (_bfd_mips_elf_set_section_contents): Likewise.
2890
8236346f
EC
28912005-04-04 Eric Christopher <echristo@redhat.com>
2892
2893 * elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents):
2894 Clean up gp handling code.
2895
7e4111ad
L
28962005-04-04 H.J. Lu <hongjiu.lu@intel.com>
2897
2898 * elf.c (bfd_elf_set_group_contents): Ignore linker created
d7128ce4 2899 group section.
da9f89d4
L
2900 (assign_section_numbers): Accept link_info. Check SHT_GROUP
2901 sections for relocatable files only. Remove the linker created
2902 group sections.
2903 (_bfd_elf_compute_section_file_positions): Pass link_info to
2904 assign_section_numbers.
2905
2906 * elfxx-ia64.c (elfNN_ia64_object_p): New.
2907 (elf_backend_object_p): Defined.
7e4111ad 2908
96982dc9
L
29092005-04-04 H.J. Lu <hongjiu.lu@intel.com>
2910
2911 * elf-bfd.h (elf_section_data): Use (sec) instead of sec.
2912
a13afe8e
FF
29132005-04-03 Fred Fish <fnf@specifixinc.com>
2914
2915 * dwarf2.c (struct dwarf2_debug): Add dwarf_ranges_buffer and
2916 dwarf_ranges_size members.
2917 (struct comp_unit): Add base_address member.
2918 (struct funcinfo): Replace low/high members with an arange.
2919 (arange_add): Replace incoming "unit" parameter with "abfd" and
2920 "first_arange" pointers. Reorganize/rewrite function body.
2921 (decode_line_info): Change arange_add call to pass bfd and arange
2922 pointers.
2923 (lookup_address_in_line_info_table): Use arange list instead of
2924 individual low/high members. Walk function's arange list to find
2925 lowest PC in list, to test for overlapping functions.
2926 (read_debug_ranges): New function, reads the debug_ranges section.
2927 (lookup_address_in_function_table): Use arange list instead of
2928 individual low/high members. Rewrite to find smallest range that
2929 matches.
2930 (read_rangelist): Read a given rangelist from debug_ranges.
2931 (scan_unit_for_functions): Use arange list instead of individual
2932 low/high members. Handle a DW_AT_ranges attribute.
2933 (parse_comp_unit): Use arange list instead of individual low/high
2934 members. Save comp unit base address. Handle a DW_AT_ranges
2935 attribute.
2936
2796fd96
L
29372005-04-01 H.J. Lu <hongjiu.lu@intel.com>
2938
2939 * elf.c (assign_section_numbers): Really use the kept section.
2940
01b3c8ab
L
29412005-03-31 H.J. Lu <hongjiu.lu@intel.com>
2942
2943 * elf-bfd.h (_bfd_elf_check_kept_section): New.
2944
2945 * elf.c (assign_section_numbers): When sh_link points to a
2946 discarded section, call _bfd_elf_check_kept_section to see if
2947 the kept section can be used. Otherwise reject sh_link
2948 pointing to discarded section.
2949
2950 * elflink.c (_bfd_elf_check_kept_section): New.
2951 (elf_link_input_bfd): Use it.
2952
35090471
AM
29532005-04-01 Alan Modra <amodra@bigpond.net.au>
2954
2955 * elf64-ppc.c (ppc64_elf_edit_toc): Account for dynamic relocs
2956 that we no longer need.
2957
7356fed5
AM
29582005-04-01 Alan Modra <amodra@bigpond.net.au>
2959
2960 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Return -1 on errors
2961 rather than 0.
77623a34 2962 (ppc64_elf_check_relocs): Remove unnecessary SEC_ALLOC check.
7356fed5 2963
28b13744
L
29642005-03-31 H.J. Lu <hongjiu.lu@intel.com>
2965
2966 * elf.c (assign_section_numbers): Fix a typo.
2967
c93625e2
L
29682005-03-31 H.J. Lu <hongjiu.lu@intel.com>
2969
2970 * elflink.c (elf_link_input_bfd): Remove the extra `\n' in
2971 error message.
2972 (_bfd_elf_section_already_linked): Likewise.
2973
fddc4048
JG
29742005-03-31 Jerome Guitton <guitton@gnat.com>
2975
2976 * config.in: Regenerate.
2977
2e9ebff5
JG
29782005-03-31 Jerome Guitton <guitton@gnat.com>
2979
c93625e2
L
2980 * config.in (HAVE_DECL_BASENAME): New configure macro.
2981 * configure.in: Check for basename.
2982 * configure: Regenerate.
2e9ebff5 2983
05ea83ed
JB
29842005-03-30 Julian Brown <julian@codesourcery.com>
2985
2986 * bfd-in.h (bfd_is_arm_mapping_symbol_name): Rename from
2987 bfd_elf32_is_arm_mapping_symbol_name.
2988 * bfd-in2.h: Regenerate.
2989 * cpu-arm.c (bfd_is_arm_mapping_symbol_name): Rename from
2990 bfd_elf32_is_arm_mapping_symbol_name.
2991 * elf32-arm.c (elf32_arm_is_target_special_symbol): Rename
2992 bfd_elf32_is_arm_mapping_symbol_name to bfd_is_arm_mapping_symbol_name.
2993 (arm_elf_find_function): Likewise.
2994 (elf32_arm_output_symbol_hook): Likewise.
2995
9d2da7ca
JB
29962005-03-30 Julian Brown <julian@codesourcery.com>
2997
2998 * bfd-in.h (bfd_elf32_is_arm_mapping_symbol_name): Add prototype.
2999 * bfd-in2.h: Regenerate.
3000 * elf32-arm.c (elf32_arm_is_target_special_symbol): Rename call to
3001 bfd_elf32_is_arm_mapping_symbol_name.
3002 (elf32_arm_output_symbol_hook): Likewise.
3003 (arm_elf_find_function): Likewise, and include STT_NOTYPE in test for
3004 mapping symbols.
3005 (is_arm_mapping_symbol_name): Function moved from here...
3006 * cpu-arm.c (bfd_elf32_is_arm_mapping_symbol_name): ...to here, renamed
3007 and made global.
3008
efa9bda4
AL
30092005-03-29 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
3010
3011 * configure.in: Check for ffs decl and alphabetize.
3012 * config.in: Regenerate.
3013 * configure: Regenerate.
d7128ce4 3014 * sysdep.h [NEED_DECLARATION_FFS] (ffs): Prototype and alphabetize.
efa9bda4 3015
09a9d560
FF
30162005-03-29 Fred Fish <fnf@specifixinc.com>
3017
3018 * dwarf2.c (struct comp_unit): Fix typo.
3019 (scan_unit_for_functions): Remove unused local variable "name"
3020 and dead code that set it.
3021
ba93b8ac
DJ
30222005-03-29 Daniel Jacobowitz <dan@codesourcery.com>
3023 Phil Blundell <philb@gnu.org>
3024
3025 * bfd-in2.h, libbfd.h: Regenerated.
3026 * reloc.c: Add ARM TLS relocations.
3027 * elf32-arm.c (elf32_arm_howto_table): Add dynamic TLS
3028 relocations.
3029 (elf32_arm_tls_gd32_howto, elf32_arm_tls_ldo32_howto)
3030 (elf32_arm_tls_ldm32_howto, elf32_arm_tls_le32_howto)
3031 (elf32_arm_tls_ie32_howto): New.
3032 (elf32_arm_howto_from_type): Support TLS relocations.
3033 (elf32_arm_reloc_map): Likewise.
3034 (elf32_arm_reloc_type_lookup): Likewise.
3035 (TCB_SIZE): Define.
3036 (struct elf32_arm_obj_tdata): New.
3037 (elf32_arm_tdata, elf32_arm_local_got_tls_type): Define.
3038 (elf32_arm_mkobject): New function.
3039 (struct elf32_arm_relocs_copied): Add pc_count.
3040 (elf32_arm_hash_entry, GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD)
3041 (GOT_TLS_IE): Define.
3042 (struct elf32_arm_link_hash_table): Add tls_ldm_got.
3043 (elf32_arm_link_hash_newfunc): Initialize tls_type.
3044 (elf32_arm_copy_indirect_symbol): Copy pc_count and tls_type.
3045 (elf32_arm_link_hash_table_create): Initialize tls_ldm_got.
3046 (dtpoff_base, tpoff): New functions.
3047 (elf32_arm_final_link_relocate): Handle TLS relocations.
3048 (IS_ARM_TLS_RELOC): Define.
3049 (elf32_arm_relocate_section): Warn about TLS mismatches.
3050 (elf32_arm_gc_sweep_hook): Handle TLS relocations and pc_count.
3051 (elf32_arm_check_relocs): Detect invalid symbol indexes. Handle
3052 TLS relocations and pc_count.
3053 (elf32_arm_adjust_dynamic_symbol): Check non_got_ref.
3054 (allocate_dynrelocs): Handle TLS. Bind REL32 relocs to local
3055 calls.
3056 (elf32_arm_size_dynamic_sections): Handle TLS.
3057 (elf32_arm_finish_dynamic_symbol): Likewise.
3058 (bfd_elf32_mkobject): Define.
3059
71a976dd
DJ
30602005-03-29 Daniel Jacobowitz <dan@codesourcery.com>
3061
3062 * elf32-arm.c (elf32_arm_check_relocs): Increment count for all
3063 relocation types. Don't count relocations which will use a PLT.
3064
7e7353ed
JB
30652005-03-29 Joel Brobecker <brobecker@gnat.com>
3066
3067 * elf.c (elfcore_grok_nto_status): Print tid as long.
3068 (elfcore_grok_nto_regs): Likewise.
3069
166856d7
JB
30702005-03-29 Joel Brobecker <brobecker@gnat.com>
3071
40937810 3072 * irix-core.c: Remove some unnecessary prototypes.
166856d7 3073
40f85900
JB
30742005-03-28 Joel Brobecker <brobecker@adacore.com>
3075
3076 * irix-core.c: Convert to ISO C.
3077
aa2e06ba
JB
30782005-03-28 Joel Brobecker <brobecker@adacore.com>
3079
3080 * irix-core.c (do_sections): Replace + by | in expression.
3081 (irix_core_core_file_matches_executable_p): Add ATTRIBUTE_UNUSED
3082 to unused parameters to avoid a compiler warning.
3083
832bc186
MK
30842005-03-28 Mark Kettenis <kettenis@gnu.org>
3085
3086 * netbsd-core.c: Convert to ISO C. Fix formatting.
3087
82f0cfbd
EC
30882005-03-24 Eric Christopher <echristo@redhat.com>
3089
3090 * elfxx-mips.c: Revert previous patch.
3091
d7b9976f
NC
30922005-03-24 Nick Clifton <nickc@redhat.com>
3093
3094 * targets.c (_bfd_target_vector): Only include the
3095 bfd_elf32_ia64_hpux_big_vec vector when building a 64-bit BFD with
3096 all targets enabled.
3097
074d327a
NC
30982005-03-24 James E Wilson <wilson@specifixinc.com>
3099
3100 * Makefile.am (BFD32_BACKENDS): Delete elf32-ia64.lo.
3101 (BFD64_BACKENDS): Add elf32-ia64.lo.
3102 * Makefile.in: Regenerate.
3103
cc27e1dc
EC
31042005-03-23 Eric Christopher <echristo@redhat.com>
3105
3106 * elfxx-mips.c (MIPS_ELF_READONLY_SECTION): New.
3107 (mips_elf_calculate_relocation): Use. Define DF_TEXTREL
3108 after emitting relocation.
3109 (_bfd_mips_elf_adjust_dynamic_symbol): Ditto.
3110 (_bfd_mips_elf_check_relocs): Remove code to set DF_TEXTREL
3111 and readonly_reloc.
3112
ed84e695
NC
31132005-03-23 Mike Frysinger <vapier@gentoo.org>
3114 Nick Clifton <nickc@redhat.com>
3115
3116 * config.bfd: Accept any C library to accompany a GNU Linux
3117 implementation, not just the GNU C library.
3118 * configure.in: Likewise.
3119 * configure: Regenerate.
3120
81e1b023
L
31212005-03-22 H.J. Lu <hongjiu.lu@intel.com>
3122
3123 * bfd-in.h (_bfd_elf_provide_symbol): New.
3124 * bfd-in2.h: Regenerated.
3125
3126 * elf32-ppc.c (set_linker_sym): Moved to elflink.c.
3127 (ppc_elf_set_sdata_syms): Call _bfd_elf_provide_symbol instead
3128 of set_linker_sym.
3129
3130 * elflink.c (_bfd_elf_provide_symbol): New. Moved and renamed
3131 from elf32-ppc.c.
3132
672c2d7e
HPN
31332005-03-22 Hans-Peter Nilsson <hp@axis.com>
3134
3135 * hash.c (strtab_hash_newfunc): Fix typo in allocated size.
3136
1fbc7e7a
BW
31372005-03-22 Bob Wilson <bob.wilson@acm.org>
3138
3139 * xtensa-isa.c (xtensa_opcode_lookup, xtensa_state_lookup,
3140 xtensa_sysreg_lookup_name, xtensa_interface_lookup,
3141 xtensa_funcUnit_lookup): Skip bsearch call if count is zero.
3142 (xtensa_opcode_decode): Rearrange code.
3143
c8e7bf0d
NC
31442005-03-22 Nick Clifton <nickc@redhat.com>
3145
3146 * binary.c: Convert to ISO C90 formatting.
3147 * coff-arm.c: Convert to ISO C90 formatting.
3148 * coffgen.c: Convert to ISO C90 formatting.
3149 * elf32-gen.c: Convert to ISO C90 formatting.
3150 * elf64-gen.c: Convert to ISO C90 formatting.
3151 * hash.c: Convert to ISO C90 formatting.
3152 * ieee.c: Convert to ISO C90 formatting.
3153
28a094c2
DJ
31542005-03-22 Daniel Jacobowitz <dan@codesourcery.com>
3155
3156 * elf32-arm.c (elf32_arm_final_link_relocate): Don't fail for
3157 unresolved symbols in R_ARM_NONE relocations.
3158
0945cdfd
DJ
31592005-03-22 Daniel Jacobowitz <dan@codesourcery.com>
3160
3161 * elf32-arm.c (elf32_arm_final_link_relocate): Add
3162 UNRESOLVED_RELOC_P argument. Set it appropriately.
3163 (elf32_arm_relocate_section): Update call to
3164 elf32_arm_final_link_relocate. Don't clobber RELOCATION; use
3165 unresolved_reloc instead.
3166
11d2f718
AM
31672005-03-23 Alan Modra <amodra@bigpond.net.au>
3168
3169 * elflink.c (elf_link_add_object_symbols): Set SEC_EXCLUDE on
3170 .gnu.warning.* sections.
3171
76750a2f
AM
31722005-03-22 Alan Modra <amodra@bigpond.net.au>
3173
3174 * elf32-ppc.c (elf_linker_section_pointers_t): Remove
3175 written_address_p.
3176 (ppc_elf_create_linker_section): Don't try to reuse existing section.
3177 (elf_create_pointer_linker_section): Delete info parm. Don't make
3178 h dynamic. Don't set written_address_p.
3179 (ppc_elf_check_relocs): Adjust ppc_elf_create_linker_section calls.
3180 (bfd_put_ptr): Delete.
3181 (elf_finish_pointer_linker_section): Remove output_bfd and info parms.
3182 Always write section contents. Assert global sym is def_regular.
3183 Use offset bottom bit as a written flag.
3184 (ppc_elf_relocate_section): Adjust elf_finish_pointer_linker_section
3185 calls.
3186
f85f57ad
AM
31872005-03-22 Alan Modra <amodra@bigpond.net.au>
3188
3189 * elf32-ppc.c (ppc_elf_set_sdata_syms): New function, extracted from..
3190 (ppc_elf_set_sdata_syms): ..here. Expand comment. Set .sbss start
3191 and end syms.
3192
2dc773a0
NC
31932005-03-21 Nick Clifton <nickc@redhat.com>
3194
3195 * coff-arm.c (coff_link_hash_entry): Only define for non WINCE
3196 targets.
3197 (t2a1_bx_pc_insn): Likewise.
3198 (t2a2_noop_insn): Likewise.
3199 (t2a3_b_insn): Likewise.
3200 (t2a1_push_insn): Likewise.
3201 (t2a2_ldr_insn): Likewise.
3202 (t2a3_mov_insn): Likewise.
3203 (t2a4_bx_insn): Likewise.
3204 (t2a5_pop_insn): Likewise.
3205 (t2a6_bx_insn): Likewise.
3206 (coff_arm_relocate_section): Only declare the high_address
3207 variable for non WINCE targets.
3208
644285ef
AM
32092005-03-22 Alan Modra <amodra@bigpond.net.au>
3210
3211 * elf32-ppc.c (ppc_elf_add_symbol_hook): Make htab->sbss
3212 SEC_LINKER_CREATED. Attach to dynobj.
3213 (ppc_elf_size_dynamic_sections): Strip htab->sbss if zero size.
3214
c9a2f333
AM
32152005-03-21 Alan Modra <amodra@bigpond.net.au>
3216
3217 * elf32-ppc.c (struct elf_linker_section): Remove sym_hash and
3218 sym_offset. Add name, bss_name, sym_name, sym_val.
3219 (struct ppc_elf_link_hash_table): Remove sdata and sdata2 pointers.
3220 Add sdata array of elf_linker_section_t.
3221 (ppc_elf_link_hash_table_create): Set name, sym_name, and bss_name.
3222 (enum elf_linker_section_enum): Delete.
3223 (ppc_elf_create_linker_section): Rewrite. Don't create syms here.
3224 (ppc_elf_check_relocs): Delay ppc_elf_create_linker_section until
3225 the special sections are needed. Adjust htab->sdata refs.
3226 Ensure dynobj is set in sreloc code.
3227 (ppc_elf_size_dynamic_sections): Strip sdata sections.
3228 (ppc_elf_set_sdata_syms): New function.
3229 (elf_finish_pointer_linker_section): Use 0x8000 for sym_offset.
3230 (ppc_elf_relocate_section): Adjust references to htab->sdata. Use
3231 sym_val instead of sym_hash.
3232 * elf32-ppc.h (ppc_elf_set_sdata_syms): Declare.
3233
8853c3d3
AM
32342005-03-21 Alan Modra <amodra@bigpond.net.au>
3235
3236 * elf32-ppc.c (is_ppc_elf_target): Move to linker part of file.
3237 (ppc_elf_merge_private_bfd_data): Likewise.
3238
2bb04cf2
AM
32392005-03-21 Alan Modra <amodra@bigpond.net.au>
3240
3241 * elf32-ppc.c (struct elf_linker_section): Remove rel_section.
3242 (ppc_elf_create_linker_section): Don't create rel_section.
3243 (elf_create_pointer_linker_section): Don't size relocs.
3244 (elf_finish_pointer_linker_section): Remove relative_reloc parm.
3245 Don't generate relocs.
3246 (ppc_elf_relocate_section): Adjust calls to
3247 elf_finish_pointer_linker_section.
3248
d2663f46
AM
32492005-03-21 Alan Modra <amodra@bigpond.net.au>
3250
3251 * elf32-ppc.c (is_ppc_elf_target): New function.
3252 (ppc_elf_merge_private_bfd_data): Use it rather than just testing
3253 for bfd_target_elf_flavour. Do this test before endian check.
3254 (ppc_elf_add_symbol_hook): Use is_pcc_elf_target.
3255 (ppc_elf_size_dynamic_sections): Likewise.
3256
6dc132d9
L
32572005-03-20 H.J. Lu <hongjiu.lu@intel.com>
3258
3259 * elf-bfd.h (elf_backend_data): Add int to
3260 elf_backend_section_from_shdr.
3261 (bfd_elf_section_data): Update comment for this_idx.
3262 (_bfd_elf_make_section_from_shdr): Add int.
3263 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
3264
3265 * elf.c (_bfd_elf_make_section_from_shdr): Take section index
3266 and use it to set this_idx in bfd_elf_section_data.
3267 (bfd_section_from_shdr): Pass shindex to
3268 _bfd_elf_make_section_from_shdr.
3269 (_bfd_elf_section_from_bfd_section): Use this_idx in
3270 bfd_elf_section_data to find section index.
3271
3272 * elf32-arm.c (elf32_arm_section_from_shdr): Take section
3273 index and pass it to _bfd_elf_make_section_from_shdr.
3274 * elf32-i370.c(i370_elf_section_from_shdr): Likewise.
3275 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
3276 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
3277 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
3278 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
3279 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
3280 * elf64-x86-64.c (elf64_x86_64_section_from_shdr): Likewise.
3281 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
3282 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
3283
cabd4ccc
DS
32842005-03-19 Danny Smith <dannysmith@users.sourceforge.net>
3285 Ross Ridge <rridge@csclub.uwaterloo.ca>
3286
3287 * peicode.h (pe_ILF_build_a_bfd): Strip only one prefix
3288 character in IMPORT_NAME_UNDECORATE and IMPORT_NAME_NOPREFIX
3289 cases. Add comment.
3290
7451fd89
L
32912005-03-18 H.J. Lu <hongjiu.lu@intel.com>
3292
3293 * elflink.c (elf_mark_used_section): Remove check for special
3294 sections.
3295
b4677f03
AS
32962005-03-18 Andreas Schwab <schwab@suse.de>
3297
3298 * elfxx-ia64.c (elfNN_ia64_install_value): Change type of insn
3299 from bfd_vma to ia64_insn, remove broken cast.
3300
238d258f
NC
33012005-03-18 C Jaiprakash <cjaiprakash@noida.hcltech.com>
3302
8853c3d3 3303 * elf32-m68k.c (elf_cfv4e_plt0_entry): plt entry for coldfire v4e.
238d258f
NC
3304 (elf_m68k_adjust_dynamic_symbol,elf_m68k_finish_dynamic_symbol,
3305 elf_m68k_finish_dynamic_sections): Use it.
3306
b294bdf8
MM
33072005-03-17 Paul Brook <paul@codesourcery.com>
3308 Dan Jacobowitz <dan@codesourcery.com>
3309 Mark Mitchell <mark@codesourcery.com>
3310
3311 * elf32-arm.c (elf32_arm_modify_segment_map): New function.
3312 (elf32_arm_additional_program_headers): Likewise.
3313 (elf_backend_modify_segment_map): Define.
3314 (elf_backend_additional_program_headers): Likewise.
3315 (elf32_arm_symbian_modify_segment_map): Use
3316 elf32_arm_modify_segment_map.
3317
257a4820
L
33182005-03-18 H.J. Lu <hongjiu.lu@intel.com>
3319
3320 * elflink.c (elf_mark_used_section): Check bfd_is_const_section
3321 for special sections.
3322
554220db
AM
33232005-03-18 Alan Modra <amodra@bigpond.net.au>
3324
3325 * elf-bfd.h (_bfd_elf_link_renumber_dynsyms): Delete.
3326 * elflink.c (_bfd_elf_link_renumber_dynsyms): Make static, add
3327 section_sym_count param, and return number of section symbols.
3328 (bfd_elf_size_dynamic_sections): Clear section symbol area of
3329 .dynsym contents. Don't bother calling swap_symbol_out on the
3330 first all-zero dynsym.
3331 (elf_mark_used_section): Formatting. Avoid twiddling flags in
3332 special sections like bfd_abs_section.
3333 (bfd_elf_gc_sections): Spelling fix.
3334
36868d45
NC
33352005-03-16 Fred Fish <fnf@specifixinc.com>
3336
3337 PR binutils/790
3338 * dwarf2.c (read_indirect_string): Fix apparent typo, check
3339 dwarf_str_buffer allocation, not dwarf_abbrev_buffer.
3340
57316bff
L
33412005-03-16 H.J. Lu <hongjiu.lu@intel.com>
3342
3343 * elflink.c (elf_mark_used_section): New.
3344 (bfd_elf_gc_sections): Call elf_gc_mark_section for
3345 non-relocatable link if we don't do GC.
3346
1ad12f97
NC
33472005-03-16 Nick Clifton <nickc@redhat.com>
3348 Ben Elliston <bje@au.ibm.com>
3349
569acd2c 3350 * configure.in (werror): New switch: Add -Werror to the
1ad12f97 3351 compiler command line. Enabled by default. Disable via
569acd2c 3352 --disable-werror.
1ad12f97
NC
3353 * configure: Regenerate.
3354
3b5d3310
NC
33552005-03-16 Nick Clifton <nickc@redhat.com>
3356
3357 * ecoff.c: Convert to ISO C90 formatting.
3358
25dbc73a
AM
33592005-03-16 Alan Modra <amodra@bigpond.net.au>
3360
3361 * elf32-ppc.c: Divide file into general and linker specific
3362 functions. Sort linker functions into roughly the order in which
3363 they are called by the ELF linker code.
3364
cb2d1ef2
AM
33652005-03-16 Alan Modra <amodra@bigpond.net.au>
3366
3367 * elf32-ppc.c (ppc_elf_create_linker_section): Set SEC_LINKER_CREATED
3368 on section. Correct comment, and add FIXME.
3369 (ppc_elf_additional_program_headers): Don't bump header count for
3370 interp. Test SEC_ALLOC, not SEC_LOAD, and don't test size.
3371 (ppc_elf_size_dynamic_sections): Don't strip sdata and sdata2, but
3372 do allocate memory if they need it.
3373
34723071
NC
33742005-03-15 Mikkel Krautz <krautz@gmail.com>
3375
3376 * config.bfd (x86_64-elf): Add target.
3377
729ae8d2
AM
33782005-03-15 Alan Modra <amodra@bigpond.net.au>
3379
3380 * po/es.po: Commit new Spanish translation.
3381
f0581930
L
33822005-03-14 H.J. Lu <hongjiu.lu@intel.com>
3383
3384 * elfxx-ia64.c (elfNN_ia64_relocate_section): Set symbo name
3385 for global symbol when reporting overflow.
3386
390c0e42
JJ
33872005-03-11 Jakub Jelinek <jakub@redhat.com>
3388
3389 * libbfd-in.h (_bfd_ar_spacepad): New prototype.
3390 * libbfd.h: Rebuilt.
3391 * archive.c (_bfd_ar_spacepad): New function.
3392 (_bfd_construct_extended_name_table, _bfd_write_archive_contents,
3393 bsd_write_armap, _bfd_archive_bsd_update_armap_timestamp,
3394 coff_write_armap): Use it.
3395 (bfd_ar_hdr_from_filesystem): Likewise. Fix HP-UX large
3396 uid/gid support.
3397 * archive64.c (bfd_elf64_archive_write_armap): Use _bfd_ar_spacepad.
3398
a2633f4e
MK
33992005-03-10 Mark Kettenis <kettenis@gnu.org>
3400
3401 * archive.c (_bfd_look_for_bfd_in_cache): Move declaration of
3402 has_table to the start of the function.
3403
109f7096
BE
34042005-03-10 Ben Elliston <bje@au.ibm.com>
3405
3406 * archive.c: Include hashtab.h.
3407 (struct ar_cache): Rename `arelt' to `arbfd' and remove `next'.
3408 (_bfd_look_for_bfd_in_cache): Reimplement using htab_find.
3409 (hash_file_ptr): New function.
3410 (eq_file_ptr): Likewise.
3411 (_bfd_add_bfd_to_archive_cache): Reimplement using a hash table.
3412 * libbfd-in.h: Include hashtab.h.
3413 (struct artdata): Change `cache' member type to htab_t.
3414 * libbfd.h: Rebuild.
3415
664fe1be
DJ
34162005-03-08 Daniel Jacobowitz <dan@codesourcery.com>
3417
3418 * configure.in: Bump version to 2.16.90.
3419 * configure: Regenerated.
3420
0709bb22
JJ
34212005-03-07 Jakub Jelinek <jakub@redhat.com>
3422
3423 * opncls.c (opncls_bread, opncls_bclose): Fix if pread resp.
3424 close is a function like macro in system headers.
3425
b18e2ae5
AM
34262005-03-07 Alan Modra <amodra@bigpond.net.au>
3427
3428 PR ld/778
3429 * elf32-hppa.c (elf32_hppa_create_dynamic_sections): Reinstate
3430 _GLOBAL_OFFSET_TABLE_ as a normal dynamic symbol.
3431
1f170678
AM
34322005-03-06 Alan Modra <amodra@bigpond.net.au>
3433
3434 * elf.c (elfcore_grok_win32pstatus): Warning fixes.
3435
06647dfd
AM
34362005-03-05 Alan Modra <amodra@bigpond.net.au>
3437
3438 * po/bfd.pot: Regenerate.
3439
93f3fa99
AM
34402005-03-05 Alan Modra <amodra@bigpond.net.au>
3441
3442 * elf64-ppc.c (update_plt_info): Don't mark new ABI call syms
3443 with is_func.
3444 (func_desc_adjust): Force dot-syms local in executables as well
3445 as shared libs.
3446
bbe506e8
TS
34472005-03-04 David Daney <ddaney@avtrex.com>
3448
3449 * elfxx-mips.c (mips_elf_calculate_relocation): Handle special
3450 '__gnu_local_gp' symbol used by gas -mno-shared.
3451
d27f5fa1
L
34522005-03-03 H.J. Lu <hongjiu.lu@intel.com>
3453
3454 * elf-bfd.h (elf_backend_data): Add "const char *" to
3455 elf_backend_section_from_phdr.
3456
3457 * elf.c (bfd_section_from_phdr): Pass "proc" to the
3458 elf_backend_section_from_phdr hook.
3459
0f20cc35
DJ
34602005-03-02 Daniel Jacobowitz <dan@codesourcery.com>
3461 Joseph Myers <joseph@codesourcery.com>
3462
3463 * elfxx-mips.c (struct mips_got_entry): Add tls_type.
3464 (struct mips_got_info): Add tls_gotno, tls_assigned_gotno,
3465 and tls_ldm_offset.
3466 (struct mips_elf_got_per_bfd_arg): Add global_count.
3467 (struct mips_elf_count_tls_arg): New.
3468 (struct mips_elf_hash_sort_data): Update comment for min_got_dynindx.
3469 (struct mips_elf_link_hash_entry): Add tls_type and tls_got_offset.
3470 (GOT_NORMAL, GOT_TLS_GD, GOT_TLS_LDM, GOT_TLS_IE)
3471 (GOT_TLS_OFFSET_DONE, GOT_TLS_DONE): Define.
3472 (TLS_RELOC_P): Define.
3473 (TP_OFFSET, DTP_OFFSET): Define.
3474 (dtprel_base, tprel_base): New functions.
3475 (mips_elf_link_hash_newfunc): Initialize tls_type.
3476 (mips_elf_got_entry_hash, mips_elf_got_entry_eq)
3477 (mips_elf_multi_got_entry_hash, mips_elf_multi_got_entry_eq): Handle
3478 TLS entries.
3479 (mips_tls_got_relocs, mips_elf_count_local_tls_relocs)
3480 (mips_elf_count_global_tls_entries, mips_elf_count_global_tls_relocs)
3481 (mips_elf_output_dynamic_relocation, mips_elf_initialize_tls_slots)
3482 (mips_tls_got_index): New functions.
3483 (mips_elf_local_got_index): Add new R_SYMNDX, H, and R_TYPE
3484 arguments. Pass them to mips_elf_create_local_got_entry. Use
3485 mips_tls_got_index.
3486 (mips_elf_global_got_index): Add new R_TYPE and INFO arguments.
3487 Handle TLS entries.
3488 (mips_elf_got_page, mips_elf_got16_entry): Update calls to
3489 mips_elf_create_local_got_entry.
3490 (mips_elf_create_local_got_entry): Add new R_SYMNDX, H, and R_TYPE
3491 arguments. Handle TLS entries.
3492 (mips_elf_sort_hash_table_f): Add non-TLS assertions.
3493 (mips_elf_record_local_got_symbol): Add new TLS_FLAG argument. Handle
3494 TLS entries.
3495 (mips_elf_record_global_got_symbol): Likewise.
3496 (mips_elf_make_got_per_bfd): Initialize new mips_got_info members.
3497 Count TLS entries.
3498 (mips_elf_merge_gots): Handle TLS entries when merging.
3499 (mips_elf_initialize_tls_index): New function.
3500 (mips_elf_set_global_got_offset): Handle TLS entries.
3501 (mips_elf_adjust_gp): Handle TLS.
3502 (mips_elf_multi_got): Remove redundant call to
3503 mips_elf_resolve_final_got_entries. Initialize global_count.
3504 Correct a comment. Initialize new TLS members of mips_got_info.
3505 Assign TLS GOT indexes for new GOTs.
3506 (mips_elf_create_got_section): Initialize new TLS members of
3507 mips_got_info.
3508 (mips_elf_calculate_relocation): Handle TLS relocs.
3509 (_bfd_mips_elf_check_relocs): Likewise. Update calls to changed
3510 functions.
3511 (_bfd_mips_elf_always_size_sections): Handle TLS.
3512 (_bfd_mips_elf_size_dynamic_sections): Likewise.
3513 (_bfd_mips_elf_finish_dynamic_symbol): Likewise. Update calls to
3514 changed functions.
3515 (_bfd_mips_elf_copy_indirect_symbol): Copy tls_type.
3516 (_bfd_mips_elf_hide_symbol): Handle TLS.
3517 * elfn32-mips.c (elf_mips_howto_table_rel, elf_mips_howto_table_rela)
3518 (mips_reloc_map): Add TLS relocs.
3519 * elf32-mips.c (elf_mips_howto_table_rel, mips_reloc_map): Likewise.
3520 * elf64-mips.c (mips_elf64_howto_table_rel)
3521 (mips_elf64_howto_table_rela, mips_reloc_map): Likewise.
3522 * reloc.c: Define new MIPS TLS relocations.
3523 * libbfd.h, bfd-in2.h: Regenerated.
3524
bb14f524
JB
35252005-03-02 Jan Beulich <jbeulich@novell.com>
3526
3527 * Makefile.am: Add dependency of cache.o on libiberty.h.
3528 * cache.c: Include libiberty.h.
3529 (bfd_open_file): Use unlink_if_ordinary instead of unlink.
3530
8c1acd09
ZW
35312005-03-01 Zack Weinberg <zack@codesourcery.com>
3532
3533 * elf.c (bfd_section_from_shdr <default case>): Call
3534 elf_backend_section_from_shdr hook unconditionally, and return
3535 what it returns.
3536 (bfd_section_from_phdr): Similarly, for elf_backend_section_from_phdr.
3537 * elfxx-target.h (elf_backend_section_from_shdr)
3538 (elf_backend_section_from_phdr): Default to
3539 _bfd_elf_make_section_from_shdr and _bfd_elf_make_section_from_phdr
3540 respectively.
3541
70bfecec
AM
35422005-03-01 Alan Modra <amodra@bigpond.net.au>
3543
a67a7b8b
AM
3544 * targets.h: Typo fix.
3545 * bfd-in2.h: Regenerate.
3546
70bfecec
AM
3547 * bout.c (b_out_write_object_contents): Don't use sizeof on host
3548 structs to size on-disk structures.
3549 (b_out_set_section_contents): Size the external struct, not the
3550 internal one for on-disk size.
3551 (b_out_sizeof_headers): Likewise.
3552
ceb1f1ef
AM
35532005-03-01 Alan Modra <amodra@bigpond.net.au>
3554
3555 * elf64-ppc.c (ppc64_elf_size_stubs): Override defined dot-sym
3556 entry points with the func descriptor as well as undefweak.
3557
f67e617a
NC
35582005-02-28 Ross Ridge <rridge@csclub.uwaterloo.ca>
3559
3560 * peicode.h (pe_ILF_build_a_bfd): Do not assume that an @ will be
3561 present when IMPORT_NAME_UNDOECRATE is used.
3562
af44c138
L
35632005-02-28 H.J. Lu <hongjiu.lu@intel.com>
3564
3565 PR 757
3566 * elf-bfd.h (_bfd_elf_merge_symbol): Add a pointer to unsigned
3567 int.
3568
3569 * elf32-sh-symbian.c (sh_symbian_relocate_section): Pass NULL
3570 to _bfd_elf_merge_symbol.
3571
3572 * elflink.c (_bfd_elf_merge_symbol): Use the pointer to
3573 unsigned int to return the alignment of the old common symbol
3574 in the dynamic object.
3575 (_bfd_elf_add_default_symbol): Pass NULL to
3576 _bfd_elf_merge_symbol.
3577 (elf_link_add_object_symbols): Pass &old_alignment to
3578 _bfd_elf_merge_symbol. Get the alignment of the new common
3579 symbol in the dynamic object.
3580
10adf131
BE
35812005-02-24 Ben Elliston <bje@au.ibm.com>
3582
3583 * coffcode.h (coff_sym_filepos): Remove GNU960 conditional code.
3584 * format.c (bfd_check_format_matches): Likewise.
3585 * archive.c (BFD_GNU960_ARMAG): Likewise.
3586 (bfd_generic_archive_p): Likewise.
3587 (_bfd_write_archive_contents): Likewise.
3588
60b779bf
L
35892005-02-24 H.J. Lu <hongjiu.lu@intel.com>
3590
3591 * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.95.
3592 * configure: Regenerate.
3593
1f02cbd9
JB
35942005-02-24 Julian Brown <julian@sirius.codesourcery.com>
3595
3596 * elflink.c (elf_link_add_object_symbols): Force symbols in discarded
3597 COMDAT group sections to have default visibility.
3598
f60ca5e3
AM
35992005-02-24 Alan Modra <amodra@bigpond.net.au>
3600
3601 * coffcode.h (coff_print_aux): Warning fix.
3602 * elf-m10300.c (mn10300_elf_relax_section): Use section->id
3603 instead of section pointer to identify.
3604 * coff-h8300.c (h8300_reloc16_extra_cases): Likewise. Allocate
3605 the correct size buffer for local sym mangling too.
3606 (h8300_bfd_link_add_symbols): Likewise.
3607 * elf32-sh-symbian.c (sh_symbian_process_embedded_commands): Fix
3608 warning.
3609 * elf32-sh64.c (shmedia_prepare_reloc): Use %B and %p in error message
3610 * elf32-xtensa.c (literal_value_hash): Warning fix.
3611 * versados.c (process_otr): Warning fix.
3612 (versados_canonicalize_reloc): Likewise.
3613 * vms-gsd.c (_bfd_vms_slurp_gsd): Warning fix.
3614 * vms.c (fill_section_ptr): Warning fix.
3615
9a5d8e72
L
36162005-02-23 H.J. Lu <hongjiu.lu@intel.com>
3617
3618 * coff-tic54x.c (SWAP_OUT_RELOC_EXTRA): Defined.
3619 * coff-tic80.c (SWAP_OUT_RELOC_EXTRA): Likewise.
3620
4b6c0f2f
NC
36212005-02-23 Nick Clifton <nickc@redhat.com>
3622
abc0f8d0
NC
3623 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Initialise
3624 the relvaddr field of the Elf32_crinfo structure.
3625
9b69b847
NC
3626 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Initialise
3627 variables that are passed by reference to
3628 m68hc11_get_relocation_value in case that function does not
3629 initialise them.
3630
90e868ac
NC
3631 * elf32-cr16c.c (cr16c_elf_final_link_relocate): Remove duplicated
3632 return statements and replace with a single return at the end of
3633 the function. This helps pacify the flow analysis code in gcc 4.0.
3634
4b6c0f2f
NC
3635 * elf.c (_bfd_elf_compute_section_file_positions): Initialise
3636 strtab to avoid compile time warning.
3637
c3e8c140
BE
36382005-02-23 Ben Elliston <bje@au.ibm.com>
3639
3640 * opncls.c (bfd_zalloc): Document this function.
3641
ebe372c1
L
36422005-02-21 H.J. Lu <hongjiu.lu@intel.com>
3643
3644 * coffcode.h (sec_to_styp_flags): Replaced SEC_CLINK with
3645 SEC_TIC54X_CLINK. Replace SEC_BLOCK with SEC_TIC54X_BLOCK.
3646 Replace SEC_SHARED with SEC_COFF_SHARED.
3647 (styp_to_sec_flags): Likewise.
3648
3649 * elfxx-target.h (TARGET_BIG_SYM): Remove SEC_ARCH_BIT_0.
3650 (TARGET_LITTLE_SYM): Likewise.
3651
3652 * section.c (SEC_ARCH_BIT_0): Removed.
3653 (SEC_LINK_DUPLICATES_SAME_CONTENTS): Defined with
3654 SEC_LINK_DUPLICATES_ONE_ONLY and SEC_LINK_DUPLICATES_SAME_SIZE.
3655 (SEC_SHARED): Renamed to ...
3656 (SEC_COFF_SHARED): This.
3657 (SEC_BLOCK): Renamed to ...
3658 (SEC_TIC54X_BLOCK): This.
3659 (SEC_CLINK): Renamed to ...
3660 (SEC_TIC54X_CLINK): This.
3661 (SEC_XXX): Rearranged. Move SEC_COFF_SHARED_LIBRARY,
3662 SEC_COFF_SHARED, SEC_TIC54X_BLOCK and SEC_TIC54X_CLINK to the
3663 end.
3664 * bfd-in2.h: Regenerated.
3665
26bf4e33
FF
36662005-02-21 Fred Fish <fnf@specifixinc.com>
3667
3668 * dwarf2.c (find_abstract_instance_name): Call recursively
3669 to handle a DW_AT_specification.
3670
e6daada3
TS
36712005-02-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3672
3673 * elfxx-mips.c (ecoff_swap_rpdr_out, mips_elf_output_extsym,
3674 mips_elf_create_dynamic_relocation,
3675 _bfd_mips_elf_size_dynamic_sections, _bfd_mips_elf_final_link):
3676 Remove #if 0'd code.
3677
d25604af
AM
36782005-02-21 Alan Modra <amodra@bigpond.net.au>
3679
3680 * Makefile.am: Run "make dep-am"
3681 * Makefile.in: Regenerate.
3682
fedf8d51
AM
36832005-02-21 Alan Modra <amodra@bigpond.net.au>
3684
3685 * coffgen.c (bfd_coff_get_comdat_section): Check that
3686 coff_section_data isn't NULL.
3687
f075ee0c
AM
36882005-02-21 Alan Modra <amodra@bigpond.net.au>
3689
3690 * bfd-in.h (bfd_elf_bfd_from_remote_memory): Warning fix.
3691 * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): Likewise.
3692 * coff-rs6000.c (xcoff_write_armap_big): Warning fixes. Remove
3693 useless assignments.
3694 (xcoff_write_archive_contents_big): Likewise.
3695 (_bfd_xcoff_put_ldsymbol_name): Likewise.
3696 * coff64-rs6000.c (_bfd_xcoff64_put_ldsymbol_name): Likewise.
3697 * coffgen.c (coff_write_symbols): Make "written" a bfd_vma.
3698 * cofflink.c (process_embedded_commands): Warning fixes.
3699 * cpu-arm.c: Delete unnecessary prototypes. Convert to C90.
3700 Warning fixes.
3701 * dwarf2.c: Warning fixes.
3702 * elf-bfd.h: Likewise.
3703 * elf-eh-frame.c: Likewise.
3704 * elf-strtab.c: Likewise.
3705 * elf.c: Likewise.
3706 * elf32-m68k.c: Likewise.
3707 * elf32-ppc.c: Likewise.
3708 * elf32-sh-symbian.c: Likewise.
3709 * elf32-sh.c: Delete unnecessary prototypes. Warning fixes.
3710 * elf64-sh64.c: Likewise.
3711 * peicode.h: Likewise.
3712 * elf64-mmix.c: Warning fixes.
3713 * elfcode.h: Likewise.
3714 * elfxx-mips.c: Likewise.
3715 * libbfd-in.h: Likewise.
3716 * libbfd.c: Likewise.
3717 * mach-o.c: Likewise.
3718 * merge.c: Likewise.
3719 * mmo.c: Likewise.
3720 * opncls.c: Likewise.
3721 * pef.c: Likewise.
3722 * srec.c: Likewise.
3723 * vms-hdr.c: Likewise.
3724 * vms-tir.c: Likewise.
3725 * xtensa-isa.c: Likewise.
3726 * xtensa-modules.c: Likewise.
3727 * xsym.c: Likewise.
3728 (pstrcmp): Use correct choice of string lengths. Fix return value.
3729 (bfd_sym_module_name): Correct string length.
3730 * bfd-in2.h: Regenerate.
3731 * libbfd.h: Regenerate.
3732
68320ddb
AO
37332005-02-17 Alexandre Oliva <aoliva@redhat.com>
3734
3735 * elf32-frv.c (elf32_frv_relocate_section): Remove warning from
fedf8d51 3736 uninitialized check_segment[1] in TLSMOFF case.
68320ddb
AO
3737 Reported by Alan Modra.
3738 (elf32_frv_relocate_section): Improve errors and warnings.
3739
1808e341
AM
37402005-02-17 Alan Modra <amodra@bigpond.net.au>
3741
3742 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Fix warning.
3743
5ff625e9
AM
37442005-02-16 Alan Modra <amodra@bigpond.net.au>
3745
3746 * coff-arm.c (coff_arm_is_local_label_name): Warning fix.
3747 * elf32-frv.c (frvfdpic_relocs_info_hash): Likewise.
3748 * pef.c (bfd_pef_scan): Don't ignore return value of
3749 bfd_pef_scan_start_address.
7e3102a7
AM
3750 * mach-o.c (bfd_mach_o_scan): Don't ignore return value of
3751 bfd_mach_o_scan_start_address.
3752 * elfxx-ia64.c (elfNN_ia64_relax_brl): Rewrite for 32-bit bfd_vma.
3753 * elfxx-mips.c: Remove unnecessary prototypes.
3754 (sort_dynamic_relocs_64): Abort if not BFD64.
5ff625e9 3755
92b7a70f
AM
37562005-02-16 Alan Modra <amodra@bigpond.net.au>
3757
3758 * elf64-ppc.c (ppc64_elf_edit_toc): Skip toc if size is zero.
3759 Skip toc reloc adjust if reloc_count is zero.
3760
d6f16593 37612005-02-15 Nigel Stephens <nigel@mips.com>
fedf8d51 3762 Maciej W. Rozycki <macro@mips.com>
d6f16593
MR
3763
3764 * elf32-mips.c (elf_mips16_howto_table_rel): New array for MIPS16
3765 reloc howtos. Add R_MIPS16_HI16 and R_MIPS16_LO16 relocs and
3766 R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
3767 (elf_mips16_jump_howto): Move into elf_mips16_howto_table_rel.
3768 (elf_mips16_gprel_howto): Likewise. Redefine src_mask and
3769 dst_mask.
3770 (mips16_gprel_reloc): Remove bit shuffling; call
3771 _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
3772 and _bfd_mips16_elf_reloc_shuffle() instead.
3773 (mips16_reloc_map): New reloc map for MIPS16 relocs.
3774 (bfd_elf32_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
3775 relocs.
3776 (mips_elf32_rtype_to_howto): Fetch MIPS16 howtos from
3777 elf_mips16_howto_table_rel.
3778 * elf64-mips.c (mips16_elf64_howto_table_rel): New array for
3779 MIPS16 REL reloc howtos. Add R_MIPS16_HI16 and R_MIPS16_LO16
3780 relocs and R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
3781 (elf_mips16_jump_howto): Move into mips16_elf64_howto_table_rel.
3782 (elf_mips16_gprel_howto): Likewise. Redefine src_mask and
3783 dst_mask.
3784 (mips16_elf64_howto_table_rela): New array for MIPS16 RELA
3785 reloc howtos. Add R_MIPS16_26, R_MIPS16_GPREL, R_MIPS16_HI16 and
3786 R_MIPS16_LO16 relocs and R_MIPS16_GOT16 and R_MIPS16_CALL16
3787 placeholders.
3788 (mips16_gprel_reloc): Remove bit shuffling; call
3789 _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
3790 and _bfd_mips16_elf_reloc_shuffle() instead.
3791 (mips16_reloc_map): New reloc map for MIPS16 relocs.
3792 (bfd_elf64_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
3793 relocs.
3794 (mips_elf64_rtype_to_howto): Fetch MIPS16 howtos from
3795 mips16_elf64_howto_table_rela or mips16_elf64_howto_table_rel.
3796 * elfn32-mips.c (elf_mips16_howto_table_rel): New array for MIPS16
3797 REL reloc howtos. Add R_MIPS16_HI16 and R_MIPS16_LO16 relocs and
3798 R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
3799 (elf_mips16_jump_howto): Move into elf_mips16_howto_table_rel.
3800 (elf_mips16_gprel_howto): Likewise. Redefine src_mask and
3801 dst_mask.
3802 (mips16_gprel_reloc): Remove bit shuffling; call
3803 _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
3804 and _bfd_mips16_elf_reloc_shuffle() instead.
3805 (mips16_reloc_map): New reloc map for MIPS16 relocs.
3806 (bfd_elf32_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
3807 relocs.
3808 (mips_elf_n32_rtype_to_howto): Fetch MIPS16 howtos from
3809 elf_mips16_howto_table_rela or elf_mips16_howto_table_rel.
3810 * elfxx-mips.c (_bfd_mips16_elf_reloc_unshuffle): New function to
3811 handle bit shuffling for MIPS16 relocs.
3812 (_bfd_mips16_elf_reloc_shuffle): Likewise.
3813 (_bfd_mips_elf_lo16_reloc): Use _bfd_mips16_elf_reloc_unshuffle()
3814 and _bfd_mips16_elf_reloc_shuffle().
3815 (_bfd_mips_elf_generic_reloc): Likewise.
3816 (mips_elf_calculate_relocation): Likewise. Handle R_MIPS16_HI16
3817 and R_MIPS16_LO16.
3818 (mips_elf_obtain_contents): Remove bit shuffling.
3819 (mips_elf_perform_relocation): Likewise; call
3820 _bfd_mips16_elf_reloc_unshuffle() and _bfd_mips16_elf_reloc_shuffle()
3821 instead.
3822 (_bfd_mips_elf_relocate_section): Likewise. Handle R_MIPS16_HI16
3823 and R_MIPS16_LO16.
3824 * elfxx-mips.h (_bfd_mips16_elf_reloc_unshuffle): Declare.
3825 (_bfd_mips16_elf_reloc_shuffle): Likewise.
3826 * reloc.c (BFD_RELOC_MIPS16_HI16): New reloc.
3827 (BFD_RELOC_MIPS16_HI16_S): Likewise.
3828 (BFD_RELOC_MIPS16_LO16): Likewise.
3829 * bfd-in2.h: Regenerate.
3830 * libbfd.h: Regenerate.
3831
0ca3e455
JB
38322005-02-15 Jan Beulich <jbeulich@novell.com>
3833
3834 * elfxx-ia64.c (ia64_howto_table): Correct strings for
3835 R_IA64_DTPMOD64[LM]SB.
3836
c5509b92
L
38372005-02-14 H.J. Lu <hongjiu.lu@intel.com>
3838
3839 * elfxx-ia64.c (elfNN_ia64_relax_section): Allow relax
3840 backward branch in the same section.
3841 (elfNN_ia64_relocate_section): Inform users that the input
3842 section is too big to relax br instruction when overflow
3843 happens to R_IA64_PCREL21B, R_IA64_PCREL21BI, R_IA64_PCREL21M
3844 and R_IA64_PCREL21F.
3845
5cba516c
NC
38462005-02-14 Orjan Friberg <orjanf@axis.com>
3847
3848 * elfcore.h (elf_core_file_p): Move the call to
3849 elf_backend_object_p to allow the correct machine to be set before
3850 processing the program headers.
3851
b59a68e1
NC
38522005-02-14 Nick Clifton <nickc@redhat.com>
3853
3854 PR binutils/716
3855 * peicode.h (pe_bfd_copy_private_bfd_data): Copy the large address
3856 aware flag from the input bfd to the output bfd.
3857
254f0426
MR
38582005-02-11 Maciej W. Rozycki <macro@mips.com>
3859
3860 * elf32-mips.c (_bfd_mips_elf32_gprel16_reloc): Reject
3861 R_MIPS_LITERAL relocations for external symbols.
3862 * elf64-mips.c (mips_elf64_literal_reloc): Likewise.
3863 * elfn32-mips.c (mips_elf_literal_reloc): Likewise.
3864
e91cdea7
L
38652005-02-11 H.J. Lu <hongjiu.lu@intel.com>
3866
3867 * bfd-in2.h: Rebuilt.
3868
67687978
PB
38692005-02-11 Paul Brook <paul@codesourcery.com>
3870
3871 * elf-bfd.h (struct elf_link_hash_table): Add
3872 is_relocatable_executable.
3873 * elf.c (_bfd_elf_link_hash_table_init): Initialize it.
3874 * elflink.c (bfd_elf_link_record_dynamic_symbol): Create local dynamic
3875 symbols in relocatable executables.
3876 (bfd_elf_record_link_assignment): Create dynamic section symbols in
3877 relocatable executables.
3878 (_bfd_elf_link_renumber_dynsyms): Ditto.
3879 (bfd_elf_final_link): Ditto.
3880 * elf32-arm.c (elf32_arm_final_link_relocate): Copy absolute
3881 relocations into relocatable executables.
3882 (elf32_arm_check_relocs): Crate dynamic sections for relocatable
3883 executables. Also copy absolute relocations.
3884 (elf32_arm_adjust_dynamic_symbol): Don't create copy relocations
3885 in relocatable executables.
3886 (allocate_dynrelocs): Copy relocations for relocatable executables.
3887 Output dynamic symbols for symbols defined in linker scripts.
3888
ca724bf2
NC
38892005-02-11 Nick Clifton <nickc@redhat.com>
3890
4b74b983
NC
3891 * libbfd.c (read_signed_leb128): Use an unsigned type for 'shift'
3892 to avoid a compile time warning.
3893
ca724bf2
NC
3894 * coff-alpha.c (alpha_adjust_reloc_in): Remove redundant test from
3895 BFD_ASSERT.
3896
3e25964f
NC
3897 * coff-tic4x.c (coff_rtype_to_howto): Move definition before
3898 inclusion of coffcode.h so that it is actually picked up.
3899
cb7a88a4
NC
3900 * coffcode.h (coff_std_swap_table): Add an unused attribute in
3901 case it is not used.
3902
596c83ec
NC
3903 * elf32-ip2k.c (ip2k_call_opcode, IS_CALL_OPCODE): Remove unused
3904 structure and macro.
3905
6c408f53
NC
3906 * elf32-iq2000.c (iq2000_reloc_map): Remove unused structure and
3907 array.
3908
d5b2f13b
NC
3909 * elf32-m32r.c (m32r_reloc_map_old): Use #ifdef USE_M32R_OLD_RELOC
3910 to protect the declaration of this array.
3911
169a6afd
NC
3912 * xsym.c (bfd_sym_parse_contained_variables_table_entry_v32):
3913 Avoid call to memcpy with a size of 0.
3914
2917689a
AM
39152005-02-12 Alan Modra <amodra@bigpond.net.au>
3916
3917 * elf64-ppc.c (toc_adjusting_stub_needed): Return true for
3918 old-style branches to undefined dot-symbols which will be
3919 satisfied by a plt call.
3920
40d16e0b
AM
39212005-02-11 Alan Modra <amodra@bigpond.net.au>
3922
3923 * elf64-ppc.c (move_plt_plist): New function, extracted from..
3924 (ppc64_elf_copy_indirect_symbol): ..here.
3925 (func_desc_adjust): Use move_plt_plist.
3926
e37c699c
PB
39272005-02-10 Paul Brook <paul@codesourcery.com>
3928
3929 * elf32-arm.c (elf32_arm_final_link_relocate): Handle R_ARM_THM_PC9.
3930
6fa3860b
PB
39312005-02-10 Paul Brook <paul@codesourcery.com>
3932
3933 * elflink.c (bfd_elf_record_link_assignment): Make hidden and internal
3934 symbols local.
3935 (elf_link_renumber_hash_table_dynsyms): Ignore local symbols.
3936 (elf_link_renumber_local_hash_table_dynsyms): New function.
3937 (_bfd_elf_link_renumber_dynsyms): Number local dynamic symbols.
3938
d457dcf6
JJ
39392005-02-10 Jakub Jelinek <jakub@redhat.com>
3940
3941 * bfd-in.h (BFD_LINKER_CREATED): Define.
3942 * bfd-in2.h: Rebuilt.
3943 * elflink.c (bfd_elf_size_dynamic_sections): Disregard
3944 BFD_LINKER_CREATED bfds when determining input bfds without
3945 .note.GNU-stack section.
3946
7f05722e
MR
39472005-02-10 Maciej W. Rozycki <macro@mips.com>
3948
3949 * elf64-mips.c (mips16_gprel_reloc): Update a comment.
3950 * elfn32-mips.c (mips16_gprel_reloc): Keep R_MIPS16_GPREL
3951 relocations against external symbols unchanged.
3952
ccf5f610
PB
39532005-02-08 Paul Brook <paul@codesourcery.com>
3954
3955 * elflink.c (elf_link_input_bfd): Ignore symbols from null input
3956 sections.
3957
370a0e1b
HPN
39582005-02-08 Hans-Peter Nilsson <hp@axis.com>
3959
3960 * elflink.c (elf_link_add_object_symbols): Don't add "warning: "
3961 prefix here.
3962
99277196
MR
39632005-02-07 Maciej W. Rozycki <macro@mips.com>
3964
3965 * elf64-mips.c: Fix formatting throughout.
3966
6422fbef
MR
39672005-02-07 Maciej W. Rozycki <macro@mips.com>
3968
3969 * elfn32-mips.c (elf_mips_howto_table_rela): Fix a comment typo.
3970
303e4c21
AO
39712005-02-07 Alexandre Oliva <aoliva@redhat.com>
3972
3973 * elf32-frv.c (FRVFDPIC_SYM_LOCAL): Remove special handling for
3974 *ABS*/*UND* sections.
3975 (elf32_frv_relocate_section): Move zero-addend-required error...
3976 (_frv_emit_got_relocs_plt_entries): ... here. Report error for
3977 missing needed TLS section.
3978
c3864421
HPN
39792005-02-07 Hans-Peter Nilsson <hp@axis.com>
3980
3981 * aoutx.h (NAME(aout,find_nearest_line)): Correct case for N_SO
3982 being the last symbol.
9f400ee9
HPN
3983 (aout_link_add_symbols): Just return TRUE if a warning
3984 symbol was last.
c3864421 3985
765f2ef6
MR
39862005-02-07 Maciej W. Rozycki <macro@mips.com>
3987
3988 * elf32-mips.c (mips_elf_gprel32_reloc): Reject
3989 R_MIPS_GPREL32 relocations against external symbols.
3990 * elf64-mips.c (mips_elf64_gprel32_reloc): Replace an incorrect
3991 comment.
3992
1b3a8575
AM
39932005-02-07 Alan Modra <amodra@bigpond.net.au>
3994
3995 * elf-bfd.h (elf_string_from_elf_strtab): Delete macro.
3996 * elf.c (bfd_elf_string_from_elf_section): Expand occurrence of
3997 elf_string_from_elf_strtab.
3998 (_bfd_elf_setup_group_pointers, bfd_section_from_shdr): Likewise.
3999 (bfd_section_from_shdr): For SHT_SYMTAB, load SHT_SYMTAB_SHNDX too
4000 if it exists. Don't do the reverse for SHT_SYMTAB_SHNDX. For
4001 SHT_STRTAB, check whether the strtab is for symtab or dynsymtab by
4002 looking at cached symtab info first, before iterating over headers.
4003 For SHT_REL and SHT_RELA, load dynsymtab if needed.
4004 * elfcode.h (elf_object_p): Don't load section header stringtab
4005 specially.
4006
90f487df
L
40072005-02-06 H.J. Lu <hongjiu.lu@intel.com>
4008
4009 * elf32-i386.c (elf_i386_relocate_section): Disallow R_386_GOTOFF
4010 against protected function when building shared library.
4011
4012 PR 584
4013 * elf64-x86-64.c (is_32bit_relative_branch): New.
4014 (elf64_x86_64_relocate_section): Alllow R_X86_64_PC32 on a
4015 protected function symbol when building shared library for
4016 32bit relative branch instruction.
4017
c4f68ce3
AM
40182005-02-06 Alan Modra <amodra@bigpond.net.au>
4019
4020 * elf64-ppc.c (add_symbol_adjust): Don't create fake descriptor
4021 syms when doing a relocatable link.
4022 (ppc64_elf_gc_mark_hook): Check that syms are defined before looking
4023 at u.def.section.
4024 (ppc64_elf_tls_setup): Likewise.
4025 (ppc64_elf_edit_opd): Don't use an undefined func desc sym.
4026
908b32fc
AM
40272005-02-04 Alan Modra <amodra@bigpond.net.au>
4028
4029 * elf64-ppc.c (struct ppc_link_hash_entry): Add "fake".
4030 (link_hash_newfunc): Clear all locals using memset.
4031 (make_fdh): Remove flags param. Always create fake func desc
4032 weak. Link the descriptor with the code entry sym.
4033 (ppc64_elf_archive_symbol_lookup): Don't return fake syms.
4034 (add_symbol_adjust): Adjust make_fdh call.
4035 (func_desc_adjust): Likewise. Twiddle any pre-existing fake
4036 descriptor to strong undefined if code entry is strong.
4037
4ea42fb7
AM
40382005-02-04 Alan Modra <amodra@bigpond.net.au>
4039
4040 * elflink.c (bfd_elf_record_link_assignment): Do "provide" symbol
4041 lookup here. Set to new before calling bfd_link_repair_undef_list.
4042 (elf_smash_syms): Check that u.undef.weak isn't the not_needed bfd.
4043
10d86c8a
AM
40442005-02-03 Alan Modra <amodra@bigpond.net.au>
4045
4046 * linker.c (_bfd_link_hash_newfunc): Set all local fields.
4047
11f25ea6
AM
40482005-02-03 Alan Modra <amodra@bigpond.net.au>
4049
4050 * linker.c (_bfd_generic_link_add_one_symbol): Set u.undef.weak.
4051 * elflink.c (elf_smash_syms): Restore symbols that were undefweak
4052 before the as-needed lib was loaded. Abort on unexpected refs.
4053
4f40114d
AM
40542005-02-02 Alan Modra <amodra@bigpond.net.au>
4055
ec13b3bb
AM
4056 * elflink.c (elf_smash_syms): Expand comments.
4057 (elf_link_add_object_symbols): Only call elf_smash_syms for
4058 as-needed dynamic objects.
4059
4f40114d
AM
4060 * elfxx-ia64.c (elfNN_ia64_new_elf_hash_entry): Don't clear
4061 everything, just the field specific to ia64.
336549c1 4062 * elf64-hppa.c (elf64_hppa_new_dyn_hash_entry): Likewise.
4f40114d 4063
bb700d78
AM
40642005-02-01 Alan Modra <amodra@bigpond.net.au>
4065
4066 * elf64-ppc.c (func_desc_adjust): Move code creating func desc sym to..
4067 (make_fdh): ..here. New function. Don't set BSF_OBJECT for
4068 undefined syms.
4069 (struct add_symbol_adjust_data): New.
4070 (add_symbol_adjust): Make an undefweak func desc for old ABI
4071 objects to link with --as-needed shared libs. Return fail status.
4072 Don't adjust old ABI func entry sym to weak if func desc syms
4073 isn't defined.
4074 (ppc64_elf_check_directives): Adjust call to add_symbol_adjust,
4075 and return status.
4076
1ffd1c2f
HPN
40772005-02-01 Hans-Peter Nilsson <hp@axis.com>
4078
4079 * cpu-cris.c (get_compatible): Rearrange disabled code and comment
4080 for clarity.
4081
77cfaee6
AM
40822005-02-01 Alan Modra <amodra@bigpond.net.au>
4083
4084 * elf64-ppc.c (ppc64_elf_check_directives): Move undefs list fixup..
4085 * linker.c (bfd_link_repair_undef_list): ..to new function, but don't
4086 remove anything but new and undefweak.
4087 * elflink.c (_bfd_elf_link_create_dynamic_sections): Override any
4088 existing _DYNAMIC.
4089 (_bfd_elf_create_dynamic_sections): Formatting.
4090 (bfd_elf_record_link_assignment): Call bfd_link_repair_undef_list.
4091 (_bfd_elf_merge_symbol): Don't handle as-needed syms here.
4092 (struct elf_smash_data): New.
4093 (elf_smash_syms): New function.
4094 (elf_link_add_object_symbols): Call elf_smash_syms. Don't add
4095 unneeded dynamic objects to loaded list.
4096 (elf_link_output_extsym): Don't handle as-needed here. Strip
4097 bfd_link_hash_new symbols.
4098 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
4099 delref when dynindx is already -1.
4100 * elf64-alpha.c (elf64_alpha_output_extsym): Strip bfd_link_hash_new
4101 symbols.
4102 * elfxx-mips.c (mips_elf_output_extsym): Likewise.
4103
b15c48d1
BE
41042005-02-01 Ben Elliston <bje@au.ibm.com>
4105
4106 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Redefine.
4107
0983f4eb 41082005-02-01 Ben Elliston <bje@au.ibm.com>
0e71e495
BE
4109
4110 * aout-arm.c, aout-target.h, aoutx.h, archive.c, armnetbsd.c,
4111 bfd-in.h, bfdio.c, coff-alpha.c, coff-arm.c, coff-h8300.c,
4112 coff-i860.c, coff-mcore.c, coff-or32.c, coff-ppc.c, coff-sh.c,
4113 coff-sparc.c, coffcode.h, coffgen.c, cofflink.c, cpu-cris.c,
4114 cpu-h8500.c, cpu-ns32k.c, ecoff.c, ecofflink.c, elf.c,
4115 elf32-dlx.c, elf32-fr30.c, elf32-frv.c, elf32-hppa.c,
4116 elf32-i860.c, elf32-ip2k.c, elf32-m32r.c, elf32-sh.c,
4117 elf32-v850.c, elf64-mips.c, elf64-sparc.c, elflink.c,
4118 i386aout.c, i386msdos.c, i386os9k.c, ieee.c, mach-o.c,
4119 nlm32-sparc.c, oasys.c, opncls.c, pdp11.c, pe-mips.c, peXXigen.c,
4120 pef.c, peicode.h, reloc.c, riscix.c, section.c, simple.c, som.c,
11d02c41 4121 sparclynx.c, targets.c, vms-misc.c, vms-tir.c, xsym.c,
0e71e495
BE
4122 hosts/delta68.h, hosts/vaxbsd.h: Remove #if 0'd code
4123 throughout. Similarly, collapse #if 1'd code.
4124
41252005-02-01 Ben Elliston <bje@au.ibm.com>
4126
0983f4eb
BE
4127 * elf-bfd.h (bfd_elf_discard_group): Remove.
4128 * elf.c (bfd_elf_discard_group): Likewise.
4129 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Remove macro.
4130
8c946ed5
RS
41312005-01-31 Richard Sandiford <rsandifo@redhat.com>
4132
4133 * elf-bfd.h (elf_backend_data): Add elf_backend_eh_frame_address_size.
4134 (_bfd_elf_eh_frame_address_size): Declare.
4135 * elfxx-target.h (elf_backend_eh_frame_address_size): Define a default.
4136 (elfNN_bed): Initialize elf_backend_eh_frame_address_size.
4137 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Declare.
4138 (elf_backend_eh_frame_address_size): Define.
4139 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): New function.
4140 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Get the address
4141 size from the new backend hook.
4142 (_bfd_elf_write_section_eh_frame): Likewise.
4143 (_bfd_elf_eh_frame_address_size): New function.
4144
c46f8c51
AC
41452005-01-31 Andrew Cagney <cagney@gnu.org>
4146
4147 * configure: Regenerate to track ../gettext.m4.
4148
5cd3778d
MM
41492005-01-31 Mark Mitchell <mark@codesourcery.com>
4150
4151 * elf32-arm.c (elf32_arm_symbian_special_sections): Do not set
4152 SHF_WRITE for .init_array, .fini_array, and .preinit_array.
ec13b3bb 4153
d6486796
NC
41542005-01-31 Nick Clifton <nickc@redhat.com>
4155
4156 * confg.bfd: Make targets scheduled for obsoletion (m68k-lynxos,
4157 sparc-lynxos, vax-vms) be obsolete.
4158
b1342370
DJ
41592005-01-28 Daniel Jacobowitz <dan@codesourcery.com>
4160
4161 * elf-bfd.h (struct elf_backend_data): Add minpagesize.
4162 * elf32-arm.c (ELF_MINPAGESIZE): Define.
4163 * elf32-ppc.c (ELF_MINPAGESIZE): Define.
4164 * elfcode.h (elf_object_p): Use minpagesize instead of
4165 maxpagesize.
4166 * elfxx-target.h (ELF_MINPAGESIZE): Default to ELF_MAXPAGESIZE.
4167 (elfNN_bed): Include ELF_MINPAGESIZE.
4168
319850b4
JB
41692005-01-28 Julian Brown <julian@codesourcery.com>
4170
4171 * bin-in.h (bfd_elf32_arm_set_target_relocs): Update prototype.
4172 * bin-in2.h (bfd_elf32_arm_set_target_relocs): Update prototype.
4173 * elf32-arm.c (elf32_arm_link_hash_table): Add fix_v4bx flag.
4174 (bfd_elf32_arm_set_target_relocs): Add formal parameter fix_v4bx for
ec13b3bb 4175 passing flag value from ld. Set flag value in global hash table entry.
319850b4 4176 (elf32_arm_final_link_relocate): Add code to implement R_ARM_V4BX
ec13b3bb 4177 relocation.
319850b4 4178
a53bf506
AC
41792005-01-27 Andrew Cagney <cagney@gnu.org>
4180
4181 * configure: Regenerate to track ../gettext.m4 change.
4182
dc4c9c19
MM
41832005-01-25 Mark Mitchell <mark@codesourcery.com>
4184
4185 * elf32-arm.c (elf_backend_default_use_rela_p): Define to zero for
ec13b3bb 4186 SymbianOS.
dc4c9c19 4187
90219bd0
AO
41882005-01-25 Alexandre Oliva <aoliva@redhat.com>
4189
4190 2004-12-10 Alexandre Oliva <aoliva@redhat.com>
4191 * elf32-frv.c (elf32_frv_relocate_section): Force local binding
4192 for TLSMOFF.
4193 * reloc.c: Add R_FRV_TLSMOFF.
4194 * elf32-frv.c (elf32_frv_howto_table): Likewise.
4195 (frv_reloc_map, frv_reloc_type_lookup): Map it.
4196 (elf32_frv_relocate_section): Handle it.
4197 (elf32_frv_check_relocs): Likewise.
4198 * libbfd.h, bfd-in2.h: Rebuilt.
4199 2004-11-26 Alexandre Oliva <aoliva@redhat.com>
4200 * elf32-frv.c (_frvfdpic_emit_got_relocs_plt_entries): Don't crash
4201 when given an undefweak TLS symbol. Fix constant TLS PLT entries
4202 such that they return the constant in gr9.
4203 (_frvfdpic_relax_tls_entries): Don't crash for undefweak TLS
4204 symbols.
4205 (_frvfdpic_size_got_plt): Set _cooked_size of dynamic sections.
4206 too, such that they shrink on relaxation.
4207 (elf32_frvfdpic_finish_dynamic_sections): Check __ROFIXUP_END__ as
4208 marking the position right past the _GLOBAL_OFFSET_TABLE_ value.
4209 (_frvfdpic_assign_plt_entries): Shrink constant TLS PLT entries
4210 if we can guarantee the use of 16-bit constants.
4211 2004-11-10 Alexandre Oliva <aoliva@redhat.com>
4212 Introduce TLS support for FR-V FDPIC.
4213 * reloc.c: Add TLS relocations.
4214 * elf32-frv.c (elf32_frv_howto_table): Add TLS relocations.
4215 (elf32_frv_rel_tlsdesc_value_howto): New.
4216 (elf32_frv_rel_tlsoff_howto): New.
4217 (frv_reloc_map): Add new mappings.
4218 (struct frvfdpic_elf_link_hash_table): Add pointer to summary
4219 reloc information.
4220 (frvfdpic_dynamic_got_plt_info): New.
4221 (frvfdpic_plt_tls_ret_offset): New.
4222 (ELF_DYNAMIC_INTERPRETER, DEFAULT_STACK_SIZE): Move earlier.
4223 (struct _frvfdpic_dynamic_got_info): Likewise. Add TLS members.
4224 (struct _frvfdpic_dynamic_got_plt_info): Likewise.
4225 (FRVFDPIC_SYM_LOCAL): Regard symbols defined in the absolute
4226 section as local.
4227 (struct frvfdpic_relocs_info): Add TLS fields.
4228 (frvfdpic_relocs_info_hash): Warning clean up.
4229 (frvfdpic_relocs_info_find): Initialize tlsplt_entry.
4230 (frvfdpic_pic_merge_early_relocs_info): Merge TLS fields.
4231 (FRVFDPIC_TLS_BIAS): Define.
4232 (tls_biased_base): New.
4233 (_frvfdpic_emit_got_relocs_plt_entries): Deal with TLS
4234 relocations.
4235 (frv_reloc_type_lookup): Likewise.
4236 (frvfdpic_info_to_howto_rel): Likewise.
4237 (elf32_frv_relocate_section): Likewise.
4238 (_frv_create_got_section): Create the PLT section here.
4239 (elf32_frvfdpic_create_dynamic_sections): Not here.
4240 (_frvfdpic_count_nontls_entries): Move out of...
4241 (_frvfdpic_count_got_plt_entries): ... here.
4242 (_frvfdpic_count_tls_entries): Likewise. Add TLS support.
4243 (_frvfdpic_count_relocs_fixups): Likewise. Add relaxation
4244 support.
4245 (_frvfdpic_relax_tls_entries): New.
4246 (_frvfdpic_compute_got_alloc_data): Add TLS support.
4247 (_frvfdpic_get_tlsdesc_entry): New.
4248 (_frvfdpic_assign_got_entries): Add TLS support.
4249 (_frvfdpic_assign_plt_entries): Likewise.
4250 (_frvfdpic_reset_got_plt_entries): New.
4251 (_frvfdpic_size_got_plt): Move out of...
4252 (elf32_frvfdpic_size_dynamic_sections): ... here.
4253 (_frvfdpic_relax_got_plt_entries): New.
4254 (elf32_frvfdpic_relax_section): New.
4255 (elf32_frvfdpic_finish_dynamic_sections): Add TLS sanity check.
4256 (elf32_frv_check_relocs): Add TLS support.
4257 (bfd_elf32_bfd_relax_section): Define for FDPIC.
4258 * libbfd.h, bfd-in2.h: Rebuilt.
4259
8615f3f2
AM
42602005-01-25 Alan Modra <amodra@bigpond.net.au>
4261
4262 * elf.c (_bfd_elf_get_dynamic_reloc_upper_bound): Only include
4263 loadable reloc sections.
4264 (_bfd_elf_canonicalize_dynamic_reloc): Likewise.
4265 (_bfd_elf_get_synthetic_symtab): Return 0 if no dynamic syms.
4266
7e9f0867
AM
42672005-01-25 Alan Modra <amodra@bigpond.net.au>
4268
4269 * elflink.c (elf_link_add_object_symbols): Don't create link dynamic
4270 sections immediately when linking shared libs. Instead, wait until
4271 we know a lib is needed.
4272 (_bfd_elf_link_create_dynstrtab): Extract from..
4273 (_bfd_elf_link_create_dynamic_sections_): ..here.
4274 (elf_add_dt_needed_tag): Call _bfd_elf_link_create_dynstrtab and
4275 _bfd_elf_link_create_dynamic_sections. Add abfd param. Allow
4276 for non-existent .dynamic.
4277 (elf_link_output_extsym): Don't complain about undefined symbols
4278 in as-needed dynamic libs that aren't actually linked.
4279
45181ed1
AC
42802005-01-24 Andrew Cagney <cagney@gnu.org>
4281
4282 * configure: Regenerate, ../gettext.m4 was updated.
4283
753e3eb6
BE
42842005-01-21 Ben Elliston <bje@au.ibm.com>
4285
4286 * aout-encap.c: Remove unused file.
4287
1c16dfa5
L
42882005-01-19 H.J. Lu <hongjiu.lu@intel.com>
4289
4290 PR 679
4291 * elflink.c (_bfd_elf_dynamic_symbol_p): Only protected
4292 non-function symbols are local.
4293 (_bfd_elf_symbol_refs_local_p): Likewise.
4294
1449d79b
AM
42952005-01-18 Alan Modra <amodra@bigpond.net.au>
4296
4297 * bfd.c (bfd_link_just_syms): Add abfd param.
4298 * bfd-in2.h: Regenerate.
4299
dcf507a6
RS
43002005-01-17 Richard Sandiford <rsandifo@redhat.com>
4301
4302 * elf-eh-frame.c (skip_cfa_op, skip_non_nops): New functions.
4303 (_bfd_elf_discard_section_eh_frame): Use them to interpret the CFA
4304 instructions. If the amount of padding is known, reduce the size
4305 of the CIE or FDE by that amount.
4306
2c42be65
RS
43072005-01-17 Richard Sandiford <rsandifo@redhat.com>
4308
4309 * elf-bfd.h (struct cie): Use bfd_vmas for code_align, ra_column and
4310 augmentation_size. Use bfd_signed_vmas for data_align.
4311 * elf-eh-frame.c (read_uleb128, read_sleb128): Delete in favor of...
4312 (read_byte, skip_leb128, read_uleb128, read_sleb128): ...these new
4313 functions. Don't read past the end of the enclosing CIE or FDE.
4314 (skip_bytes): New utility function.
4315 (_bfd_elf_discard_section_eh_frame): Use new functions, adding more
4316 sanity checking.
4317 (_bfd_elf_write_section_eh_frame): Use new functions.
4318
acfe5567
RS
43192005-01-17 Richard Sandiford <rsandifo@redhat.com>
4320
4321 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use an
4322 assert-style REQUIRE() macro to handle sanity checks.
4323
c0c28ab8
L
43242005-01-17 H.J. Lu <hongjiu.lu@intel.com>
4325
4326 * dwarf2.c (dwarf2_debug): Move info_ptr_unit to ...
4327 (comp_unit): Here.
4328 (read_unsigned_leb128): Removed.
4329 (read_signed_leb128): Removed.
4330 (find_abstract_instance_name): Updated.
4331 (parse_comp_unit): Accept info_ptr_unit.
4332 (_bfd_dwarf2_find_nearest_line): Set info_ptr_unit for each
4333 comp unit and pass it to parse_comp_unit.
4334
4335 * elf-eh-frame.c (read_unsigned_leb128): Moved to ...
4336 (read_signed_leb128): Moved to ...
4337 * libbfd.c: Here.
4338
4339 * libbfd-in.h (read_unsigned_leb128): New prototype.
4340 (read_signed_leb128): Likewise.
4341 * libbfd.h: Regenerated.
4342
e38bc3b5
NC
43432005-01-17 Andrew Stubbs <andrew.stubbs@st.com>
4344 Nick Clifton <nickc@redhat.com>
4345
4346 * cpu-sh.c (bfd_to_arch_table): Change arch_sh1_up to arch_sh_up,
4347 arch__sh4_nofp_up to arch_sh4_nofpu_up and arch_sh4a_nofp_up to
4348 arch_sh4a_nofpu_up in order to match the external names and make the
4349 testsuite's job easier.
4350 * archuires.c: Rename bfd_mach_sh2a_fake? to more meaningful
4351 names.
4352 * bfd-in2.h: Regenerate.
4353
8fb84ecc
AC
43542005-01-15 Andrew Cagney <cagney@gnu.org>
4355
4356 * bfd.m4: New file.
4357 * acinclude.m4: Move BFD_NEED_DECLARATION,
4358 BFD_HAVE_SYS_PROCFS_TYPE and BFD_HAVE_SYS_PROCFS_TYPE_MEMBER to
4359 the new file bfd.m4. Include ../bfd/bfd.m4.
4360 * configure: Re-generate.
8615f3f2 4361
b4a38de6
AM
43622005-01-12 Alan Modra <amodra@bigpond.net.au>
4363
4364 * elf32-ppc.c (ppc_elf_howto_raw): Delete RELAX32* entries.
4365 (ppc_elf_relax_section): Use PLT variants of RELAX32 relocs for
4366 reaching PLT.
4367 (ppc_elf_relocate_section): Handle R_PPC_RELAX32_PLT and
4368 R_PPC_RELAX32PC_PLT.
4369
3eb128b2
AM
43702005-01-11 Alan Modra <amodra@bigpond.net.au>
4371
4372 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Follow indirect and warning
4373 symbols.
4374 * elf32-arm.c (elf32_arm_gc_sweep_hook): Likewise.
4375 * elf32-cris.c (cris_elf_gc_sweep_hook): Likewise.
4376 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Likewise.
4377 * elf32-i386.c (elf_i386_gc_sweep_hook): Likewise.
4378 * elf32-m32r.c (m32r_elf_gc_sweep_hook): Likewise.
4379 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Likewise.
4380 * elf32-ppc.c (ppc_elf_gc_sweep_hook): Likewise.
4381 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
4382 * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
4383 * elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise.
4384 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
4385 * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Likewise.
4386 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
4387 * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
4388
264a1fe0
AM
43892005-01-11 Alan Modra <amodra@bigpond.net.au>
4390
4391 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Correct
4392 .dynsbss flags.
4393
5c4504f7
NC
43942005-01-10 Inderpreet Singh <inderpreetb@noida.hcltech.com>
4395
4396 * archures.c: Define bfd_mach_maxq10 and bfd_mach_maxq20.
4397 * bfd-in2.h: Regenerate.
4398 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags): Add code
4399 to support these new machine values.
4400 * cpu-maxq.c (bfd_maxq10_arch): New architecture definition for
4401 the maxq10.
4402 (bfd_maxq_arch): Update values for the maxq20.
4403
669460c7
EB
44042005-01-10 Eric Botcazou <ebotcazou@libertysurf.fr>
4405
4406 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): When linking a
4407 non-shared object, do not reserve space in .plt and .rela.plt for
4408 regular symbols neither defined nor referenced in shared objects.
4409
a51a7930
EB
44102005-01-09 Eric Botcazou <ebotcazou@libertysurf.fr>
4411
01aac484
EB
4412 * elf32-sparc.c (elf32_sparc_link_hash_table_create): Use bfd_zmalloc
4413 to zero the structure.
4414 (create_got_section): Use BFD_ASSERT instead of abort.
a51a7930
EB
4415 * elf64-sparc.c (struct sparc64_elf_link_hash_table): New 'sgot' and
4416 'srelgot' fields.
4417 (create_got_section): New function.
4418 (sparc64_elf_create_dynamic_sections): Likewise.
4419 (sparc64_elf_check_relocs): Invoke create_got_section instead of
4420 _bfd_elf_create_got_section. Use the sgot and srelgot shortcuts.
4421 (sparc64_elf_size_dynamic_sections): Use the srelgot shortcut.
4422 (sparc64_elf_relocate_section): Use the sgot and srelgot shortcuts.
4423 (sparc64_elf_finish_dynamic_symbol): Likewise.
4424 (sparc64_elf_finish_dynamic_sections): Use the sgot shortcut.
4425 (elf_backend_create_dynamic_sections): Define to
4426 sparc64_elf_create_dynamic_sections.
4427
151e5294
EB
44282005-01-09 Eric Botcazou <ebotcazou@libertysurf.fr>
4429
4430 * elf32-sparc.c (elf32_sparc_omit_section_dynsym): New function.
4431 (elf_backend_omit_section_dynsym): Define to it.
4432 * elf64-sparc.c (sparc64_elf_omit_section_dynsym): New function.
4433 (elf_backend_omit_section_dynsym): Define to it.
4434
6f79b219
JJ
44352005-01-07 Jakub Jelinek <jakub@redhat.com>
4436
4437 * bfd/elf.c (INCLUDE_SECTION_IN_SEGMENT): Don't put empty sections into
4438 PT_DYNAMIC segment, unless .dynamic.
4439
4e7fd91e
PB
44402005-01-06 Paul Brook <paul@codesourcery.com>
4441
4442 * config.bfd: Add entry for arm-*-vxworks and arm-*-windiss.
4443 * configure.in: Add bfd_elf32_{big,little}arm_vxworks_vec.
4444 * configure: Regenerate.
4445 * elf32-arm.c: Add VxWorks target bfd.
4446 (USE_REL): Remove.
4447 (elf32_arm_link_hash_table): Add use_rel.
4448 (elf32_arm_link_hash_table_create, elf32_arm_final_link_relocate,
4449 elf32_arm_relocate_section): Replace USE_REL with runtime check.
4450 Correct offset calculation for RELA case.
4451 (elf_backend_may_use_rel_p, elf_backend_may_use_rela_p,
4452 elf_backend_default_use_rela_p, elf_backend_rela_normal): Define.
4453 (elf32_arm_vxworks_link_hash_table_create): New function.
4454 * targets.c (bfd_elf32_bigarm_vxworks_vec): Add declaration.
4455 (bfd_elf32_littlearm_vxworks_vec): Ditto.
4456 (_bfd_target_vector): Add bfd_elf32_{big,little}arm_vxworks_vec.
4457
4c52953f
AM
44582005-01-06 Alan Modra <amodra@bigpond.net.au>
4459
4460 * elf64-ppc.c (struct ppc_link_hash_table): Add no_multi_toc and
4461 multi_toc_needed.
4462 (has_toc_reloc, makes_toc_func_call, call_check_in_progress): Define.
4463 (ppc64_elf_check_relocs): Update references to has_gp_reloc.
4464 (ppc64_elf_setup_section_lists): Add no_multi_toc parm, set htab bit.
4465 (ppc64_elf_next_toc_section): Heed no_multi_toc.
4466 (ppc64_elf_reinit_toc): Set multi_toc_needed.
4467 (toc_adjusting_stub_needed): Rewrite.
4468 (ppc64_elf_next_input_section): Use multi_toc_needed to shortcut
4469 toc tests. Adjust for toc_adjusting_stub_needed changes.
4470 (ppc64_elf_size_stubs): Update references to has_gp_reloc.
4471 * elf64-ppc.h (ppc64_elf_setup_section_lists): Update prototype.
4472 * section.c: Expand comment on backend bits.
4473 * bfd-in2.h: Regenerate.
4474 * libbfd.h: Regenerate.
4475
f03d65b4
AM
44762005-01-06 Alan Modra <amodra@bigpond.net.au>
4477
4478 * elf64-ppc.c (ppc64_elf_size_stubs): When determining need for
4479 toc adjusting stub, do not test source section flags.
4480
8af139b3
EB
44812005-01-05 Eric Botcazou <ebotcazou@libertysurf.fr>
4482
4483 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
4484 from STABS debugging sections again.
4485
06f22d7e
FF
44862005-01-05 Fred Fish <fnf@specifixinc.com>
4487
4488 * dwarf2.c (struct dwarf2_debug): Add info_ptr_unit member.
4489 (find_abstract_instance_name): New function.
4490 (scan_unit_for_functions): Handle DW_TAG_inlined_subroutine.
4491 (scan_unit_for_functions): Handle DW_AT_abstract_origin.
4492 (_bfd_dwarf2_find_nearest_line): Initialize info_ptr_unit.
4493
83a358aa
PB
44942004-12-31 Paul Brook <paul@copdesourcery.com>
4495
4496 * elf32-arm.c (elf32_arm_symbian_plt_entry): Fix comment typo.
4497
b996922c
AM
44982004-12-31 Alan Modra <amodra@bigpond.net.au>
4499
4500 * reloc.c (BFD_RELOC_AVR_LDI, BFD_RELOC_AVR_6, BFD_RELOC_AVR_6_ADIW):
4501 Commit missing changes from 2004-12-22.
4502 * bfd-in2.h: Regenerate.
4503
17a83432
TL
45042004-12-23 Tomer Levi <Tomer.Levi@nsc.com>
4505
4506 * elf32-crx.c (elf32_crx_relax_section): Support 'bcop' relaxation.
4507
d69f560c
KW
45082004-12-21 Kris Warkentin <kewarken@qnx.com>
4509
4510 * elf.c (elfcore_grok_nto_gregs): Change name to elfcore_grok_nto_regs.
4511 Add 'base' argument for constructing register sections. Reformat.
4512 (elfcore_grok_nto_note): Call elfcore_grok_nto_regs for both
4513 gp and fp regs. Reformat.
4c52953f 4514
750bce0e
NC
45152004-12-22 Klaus Rudolph <lts-rudolph@gmx.de>
4516
4517 * reloc.c: Add new relocs R_AVR_LDI, R_AVR_6, R_AVR_6_ADIW.
4518 * bfd-in2.h: Regenerate.
4519 * elf32-avr.c (elf_avr_nowto_table): Add the new relocs.
4520 (avr_reloc_map): Likewise.
4521 (avr_final_link_relocate): Likewise.
4522
a5db907e
AM
45232004-12-22 Alan Modra <amodra@bigpond.net.au>
4524
4525 * elflink.c (_bfd_elf_merge_symbol): Treat old definitions from
4526 as-needed dynamic libs as undefined.
4527 (elf_link_add_object_symbols): Remove DYN_AS_NEEDED from as-needed
4528 libs when finding they are needed.
4529
8860955f
AM
45302004-12-20 Alan Modra <amodra@bigpond.net.au>
4531
4532 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add opd_relocs.
4533 (opd_entry_value): Use opd_relocs if available.
4534 (ppc64_elf_relocate_section): Don't set reloc_done. Instead
4535 copy .opd relocations to opd_relocs.
4536 (ppc64_elf_edit_toc): Set rel_hdr.sh_size after editing relocs.
4537
1e50d24d
RS
45382004-12-16 Richard Sandiford <rsandifo@redhat.com>
4539
4540 * reloc.c (BFD_RELOC_V850_LO16_SPLIT_OFFSET): New bfd_reloc_code_type.
4541 * elf32-v850.c (v850_elf_howto_table): Add entry for
4542 R_V850_LO16_SPLIT_OFFSET.
4543 (v850_elf_reloc_map): Map it to BFD_RELOC_V850_LO16_SPLIT_OFFSET.
4544 (v850_elf_perform_lo16_relocation): New function, extracted from...
4545 (v850_elf_perform_relocation): ...here. Use it to handle
4546 R_V850_LO16_SPLIT_OFFSET.
4547 (v850_elf_check_relocs, v850_elf_final_link_relocate): Handle
4548 R_V850_LO16_SPLIT_OFFSET.
4549 * libbfd.h, bfd-in2.h: Regenerate.
4550
2fbd2a87
NC
45512004-12-14 P.J. Darcy <darcypj@us.ibm.com>
4552
4553 * config.bfd: Add s390x-ibm-tpf support.
4554
06302770
TL
45552004-12-14 Tomer Levi <Tomer.Levi@nsc.com>
4556
8860955f 4557 * elf32-crx.c (elf32_crx_relax_delete_bytes): Add 'struct bfd_link_info *'
06302770
TL
4558 to prototype, to make hash info available.
4559 Prevent wrapped symbols from being adjusted twice.
4560
c314987d
RS
45612004-12-14 Richard Sandiford <rsandifo@redhat.com>
4562
4563 * elfxx-mips.c (mips_elf_calculate_relocation): Don't report an
4564 overflow for calls to undefined weak symbols.
4565
5c799c07
AM
45662004-12-11 Alan Modra <amodra@bigpond.net.au>
4567
4568 * elfcode.h (elf_slurp_symbol_table): Use bfd_elf_sym_name so that
4569 canonical sections syms have a name.
4570
645ea6a9
AM
45712004-12-11 Alan Modra <amodra@bigpond.net.au>
4572
4573 * elf64-ppc.c (opd_entry_value): Don't use cached relocs if they
4574 have been adjusted for output.
4575 (ppc64_elf_relocate_section): Mark sections with reloc_done.
4576
0e2cfdce
AM
45772004-12-10 Alan Modra <amodra@bigpond.net.au>
4578
be8dd2ca
AM
4579 * elf.c (bfd_elf_sym_name): Rename from bfd_elf_local_sym_name and
4580 add symtab_hdr param.
0e2cfdce
AM
4581 (group_signature): Update calls.
4582 * elf-bfd.h (bfd_elf_sym_name): Update.
4583 * elf32-ppc.c (ppc_elf_relocate_section): Update.
8860955f
AM
4584 * elf64-ppc.c (ppc64_elf_edit_opd, ppc64_elf_edit_toc): Update.
4585 (ppc64_elf_relocate_section): Update.
0e2cfdce
AM
4586 * elflink.c (elf_link_input_bfd): Update.
4587
138f35cc
JJ
45882004-12-10 Jakub Jelinek <jakub@redhat.com>
4589
4590 * elf.c (bfd_elf_local_sym_name): Avoid crashes with invalid
4591 st_shndx on STT_SECTION sections.
4592
f9cfae62
DJ
45932004-12-09 Daniel Jacobowitz <dan@codesourcery.com>
4594
4595 * elfcode.h (elf_slurp_reloc_table_from_section): Don't canonicalize
4596 ELF section symbols.
4597
0d2e43ed
ILT
45982004-12-09 Ian Lance Taylor <ian@wasabisystems.com>
4599
1367d393
ILT
4600 * elfxx-mips.c (mips_elf_calculate_relocation): For R_MIPS_JALR,
4601 return a real value, unless it is a PLT symbol.
4602 (mips_elf_perform_relocation): On the RM9000, turn a jal into a
4603 bal if possible.
4604
74f79d8d
ILT
4605 * elfn32-mips.c (elf_mips_howto_table_rela): Change dst_mask of
4606 R_MIPS_JALR entry to 0.
4607
0d2e43ed
ILT
4608 * archures.c: Define bfd_mach_mips9000.
4609 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_9000.
4610 (mips_set_isa_flags): Handle bfd_mach_mips9000.
4611 * cpu-mips.c (I_mips9000): Define.
4612 (arch_info_struct): Add case for bfd_mach_mips9000.
4613 * aoutx.h (NAME(aout,machine_type)): Handle bfd_mach_mips9000.
4614 * bfd-in2.h: Regenerate.
4615
728b2f21
ILT
46162004-12-08 Ian Lance Taylor <ian@wasabisystems.com>
4617
4618 * elfxx-mips.c (mips_elf_calculate_relocation): Test for R_MIPS_26
4619 overflow.
4620
45ab555d
BE
46212004-12-07 Ben Elliston <bje@gnu.org>
4622
4623 * netbsd-core.c (netbsd_core_file_p): Make `i' unsigned.
4624
1511ddaf
DJ
46252004-12-06 Daniel Jacobowitz <dan@debian.org>
4626
4627 Suggested by Fergal Daly <fergal@esatclear.ie>:
4628 * simple.c (simple_dummy_multiple_definition): New function.
4629 (bfd_simple_get_relocated_section_contents): Use it.
4630
46312004-12-03 Jan Beulich <jbeulich@novell.com>
57426232
JB
4632
4633 * elf.c (elf_find_function): Don't use the last file symbol ever,
4634 seen, but the last one seen prior to the symbol being reported.
4635 Don't report a filename at all for global symbols when that might
4636 be ambiguous/wrong.
4637
94a3258f
PB
46382004-12-01 Paul Brook <paul@codesourcery.com>
4639
4640 * elf32-arm.c (elf32_arm_copy_private_bfd_data): Set EI_OSABI.
4641 (elf32_arm_post_process_headers): Set EI_OSABI depending on ABI
4642 version.
4643
529fcb95
PB
46442004-12-01 Paul Brook <paul@codesourcery.com>
4645
4646 * elflink.c (elf_link_add_object_symbols): Make symbols from discarded
4647 sections undefined.
4648
dea514f5
PB
46492004-11-30 Paul Brook <paul@codesourcery.com>
4650
4651 * elf32-arm.c (struct elf32_arm_link_hash_table): Remove
4652 no_pipeline_knowledge
4653 (elf32_arm_link_hash_table_create): Ditto.
4654 (bfd_elf32_arm_process_before_allocation): Ditto.
4655 (elf32_arm_final_link_relocate): Ditto. Remove oabi relocation
4656 handling.
4657 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update
4658 prototype.
4659 * bfd-in2.h: Regenerate.
4660
edfc032f
AM
46612004-11-30 Randolph Chung <tausq@debian.org>
4662
4663 * elf32-hppa.c (elf32_hppa_grok_prstatus): New function.
4664 (elf32_hppa_grok_psinfo): New function.
4665 (elf_backend_grok_prstatus): Define.
4666 (elf_backend_grok_psinfo): Define.
4667
0be9069d
L
46682004-11-24 H.J. Lu <hongjiu.lu@intel.com>
4669
4670 PR 574:
4671 * elfcode.h (elf_slurp_symbol_table): Handle STT_TLS.
4672
47cc2cf5
PB
46732004-11-24 Paul Brook <paul@codesourcery.com>
4674
4675 * elf.c (assign_section_numbers): Number SHT_GROUP sections first.
4676
0beaef2b
PB
46772004-11-24 Paul Brook <paul@codesourcery.com>
4678
4679 * elf32-arm.c (elf32_arm_swap_symbol_in): New function.
4680 (elf32_arm_swap_symbol_out): New function.
4681 (elf32_arm_size_info): Add.
4682 (elf_backend_size_info): Define.
4683
3dd2fcf0
DA
46842004-11-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
4685
4686 * hpux-core.c (hpux_core_core_file_p): Use offsetof macro in calls to
4687 make_bfd_asection.
4688
de52dba4
AM
46892004-11-19 Alan Modra <amodra@bigpond.net.au>
4690
4691 * elf32-arm.c (elf32_arm_finish_dynamic_sections): Warning fix.
4692 * elf32-iq2000.c (iq2000_reloc_type_lookup): C90 function decl.
4693 * nlmcode.h (nlm_write_object_contents): Warning fix.
4694
288f74fa
BW
46952004-11-18 Bob Wilson <bob.wilson@acm.org>
4696
4697 * elf32-xtensa.c (ebb_propose_action): Fix argument order.
4698
b7693d02
DJ
46992004-11-17 Daniel Jacobowitz <dan@codesourcery.com>
4700
4701 * elf32-arm.c (PLT_THUMB_STUB_SIZE): Define.
4702 (elf32_arm_plt_thumb_stub): New.
4703 (struct elf32_arm_link_hash_entry): Add plt_thumb_refcount
4704 and plt_got_offset.
4705 (elf32_arm_link_hash_traverse): Fix typo.
4706 (elf32_arm_link_hash_table): Add obfd.
4707 (elf32_arm_link_hash_newfunc): Initialize new fields.
4708 (elf32_arm_copy_indirect_symbol): Copy plt_thumb_refcount.
4709 (elf32_arm_link_hash_table_create): Initialize obfd.
4710 (record_arm_to_thumb_glue): Mark the glue as a local ARM function.
4711 (record_thumb_to_arm_glue): Mark the glue as a local Thumb function.
4712 (bfd_elf32_arm_get_bfd_for_interworking): Verify that the
4713 interworking BFD is not dynamic.
4714 (bfd_elf32_arm_process_before_allocation): Handle R_ARM_PLT32. Do
4715 not emit glue for PLT references.
4716 (elf32_arm_final_link_relocate): Handle Thumb functions. Do not
4717 emit glue for PLT references. Support the Thumb PLT prefix.
4718 (elf32_arm_gc_sweep_hook): Handle R_ARM_THM_PC22 and
4719 plt_thumb_refcount.
4720 (elf32_arm_check_relocs): Likewise.
4721 (elf32_arm_adjust_dynamic_symbol): Handle Thumb functions and
4722 plt_thumb_refcount.
4723 (allocate_dynrelocs): Handle Thumb PLT references.
4724 (elf32_arm_finish_dynamic_symbol): Likewise.
4725 (elf32_arm_symbol_processing): New function.
4726 (elf_backend_symbol_processing): Define.
4727
353057a5
RS
47282004-11-16 Richard Sandiford <rsandifo@redhat.com>
4729
4730 * elf-bfd.h (eh_cie_fde): Add new fields: add_augmentation_size and
4731 add_fde_encoding. Remove need_relative.
4732 * elf-eh-frame.c (extra_augmentation_string_bytes)
4733 (extra_augmentation_data_bytes, size_of_output_cie_fde): New functions.
4734 (_bfd_elf_discard_section_eh_frame): Consider changing the FDE encoding
4735 in cases where the CIE has no existing 'R' augmentation. Use
4736 size_of_output_cie_fde when assigning offsets. Use the final offset
4737 as the new section size.
4738 (_bfd_elf_eh_frame_section_offset): Remove need_relative handling.
4739 Account for any extra augmentation bytes in the returned offset.
4740 (_bfd_elf_write_section_eh_frame): Rework so that the entries are
4741 moved before being modified. Pad growing entries with DW_CFA_nops.
4742 Add 'z' and 'R' augmentations as directed by add_augmentation_size
4743 and add_fde_encoding.
4744
b32d3aa2
MM
47452004-11-15 Mark Mitchell <mark@codesourcery.com>
4746
4747 * elf32-arm.c (elf32_arm_relocate_section): Use
4748 arm_real_reloc_type.
4749
5d41f0b6
RS
47502004-11-16 Richard Sandiford <rsandifo@redhat.com>
4751
4752 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Return early
4753 for discard relocations; don't add an R_MIPS_NONE to the main body
4754 of .rel.dyn.
4755
fc0e6df6
PB
47562004-11-04 Paul Brook <paul@codesourcery.com>
4757
4758 * elf-bfd.h (_bfd_elf_slurp_version_tables): Update prototype.
4759 * elf.c (_bfd_elf_print_private_bfd_data): Pass extra argument.
4760 (_bfd_elf_slurp_version_tables): Add extra argument. Create extra
4761 default version definition for unversioned symbols.
4762 * elfcode.h (elf_slurp_symbol_table): Pass extra argument.
4763 * elflink.c (elf_link_add_object_symbols): Pass extra argument to
4764 _bfd_elf_slurp_version_tables. Set default version for unversioned
4765 imported symbols.
4766
b23e50e2
PB
47672004-11-15 Paul Brook <paul@codesourcery.com>
4768
4769 * elflink.c (elf_link_add_object_symbols): Don't assume version
4770 indices are consecutive.
4771
f4a6705c
RS
47722004-11-14 Richard Sandiford <rsandifo@redhat.com>
4773
4774 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Deal with
4775 composite relocations against the personality data.
4776
ee06dc07
PB
47772004-11-13 Paul Brook <paul@codesourcery.com>
4778
4779 * bfd/elf32-arm.c (elf32_arm_final_link_relocate): Resolve
4780 R_ARM_PREL31 relocations to PLT entries.
4781 (elf32_arm_relocate_section, elf32_arm_gc_sweep_hook): Ditto.
4782 (elf32_arm_check_relocs): Ditto.
4783
a1ace8d8
BW
47842004-11-12 Bob Wilson <bob.wilson@acm.org>
4785
4786 * xtensa-isa.c (xtensa_interface_class_id): New.
4787
e4115460
BW
47882004-11-11 Bob Wilson <bob.wilson@acm.org>
4789
4790 * elf32-xtensa.c (property_table_compare): Remove assertion about
4791 entries with the same address and non-zero size.
4792 (xtensa_read_table_entries): Report such entries as errors.
4793
6366ff1e
MM
47942004-11-11 Mark Mitchell <mark@codesourcery.com>
4795
4796 * elf32-arm.c (elf32_arm_final_link_relocate): Correct logic for
4797 R_ARM_RELATIVE on Symbian OS.
4798
b34af79c
MM
47992004-11-09 Mark Mitchell <mark@codesourcery.com>
4800
e6dc21b6
MM
4801 * som.c (som_bfd_print_private_bfd_data): New function.
4802 (som_object_setup): Save the auxiliary header. Don't assume that
4803 zero is an invalid entry point for a shared library.
4804 (som_object_p): Allocate the auxiliary header on the heap.
4805
b34af79c
MM
4806 * elf32-arm.c (elf32_arm_begin_write_processing): Do not use a K&R
4807 declaration.
4808 (elf32_arm_symbian_modify_segment_map): Likewise.
4809
08d1f311
DJ
48102004-11-09 Daniel Jacobowitz <dan@debian.org>
4811
4812 From David Poole <daveml@mbuf.com>:
4813 * elf32-arm.c (elf32_arm_readonly_dynrelocs): New function.
4814 (elf32_arm_size_dynamic_sections): Call it.
4815
0306b3bf
AM
48162004-11-09 Alan Modra <amodra@bigpond.net.au>
4817
4818 * Makefile.am (SOURCE_HFILES): Remove elf32-arm.h.
4819 (ALL_MACHINES_CFILES): Fix typo.
4820 * Makefile.in: Regenerate.
4821 * po/SRC-POTFILES.in: Regenerate.
4822
a16385dc
MM
48232004-11-08 Mark Mitchell <mark@codesourcery.com>
4824
4825 * elf32-arm.c (elf32_arm_final_link_relocate): When generating an
4826 R_ARM_RELATIVE relocation for Symbian OS, mention the section
4827 symbol in the relocation.
4828
0306b3bf
AM
48292004-11-08 Inderpreet Singh <inderpreetb@nioda.hcltech.com>
4830 Vineet Sharma <vineets@noida.hcltech.com>
7499d566
NC
4831
4832 * coff-maxq.c: New File.
0306b3bf
AM
4833 * cpu-maxq.c: New File.
4834 * coffcode.h: Likewise.
4835 * config.bfd: Likewise.
4836 * configure.in (maxqcoff_vec): New target vector.
7499d566
NC
4837 * Makefile.am: Add support for maxq target.
4838 * configure.in: Likewise.
0306b3bf
AM
4839 * archures.c:. Likewise.
4840 * targets.c: Likewise.
4841 * bfd_in2.h : Regenerated.
7499d566
NC
4842 * Makefile.in: Regenerated.
4843 * configure: Regenerated.
4844 * doc/Makefile.in: Regenerated.
4845
977cdf5a
NC
48462004-11-08 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
4847
4848 * coff-i386.c (coff_i386_reloc): Fix weak symbols.
4849 * cofflink.c (_bfd_coff_link_input_bfd): Don't process
4850 C_NT_WEAK aux entries.
4851 (_bfd_coff_generic_relocate_section): Handle undefined
4852 aliases.
4853
9dfe8738
AS
48542004-11-07 Andreas Schwab <schwab@suse.de>
4855
4856 * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Use
4857 SYMBOL_CALLS_LOCAL and check for undefweak symbols with
4858 non-default visibility.
4859
c3c76620
MM
48602004-11-01 Mark Mitchell <mark@codesourcery.com>
4861
4862 * elf32-arm.c (elf32_arm_symbian_begin_write_processing): Clear
0306b3bf 4863 D_PAGED.
c3c76620
MM
4864 (elf32_arm_symbian_modify_segment_map): Don't
4865 reset includes_filehdr and includes_phdrs here.
4866
7f266840
DJ
48672004-11-04 Daniel Jacobowitz <dan@debian.org>
4868
4869 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Replace
4870 elfarm-nabi with elf32-arm. Remove elfarm-oabi.
4871 (elf32-arm.lo): Replace elfarm-nabi.lo rule. Remove elf32-arm.h
4872 dependency.
4873 * config.bfd: Move arm-*-oabi* and thumb-*-oabi* from obsolete list
4874 to a new removed list. Remove normal configuration stanzas.
4875 * configure.in: (bfd_elf32_bigarm_vec, bfd_elf32_bigarm_symbian_vec)
4876 (bfd_elf32_littlearm_symbian_vec, bfd_elf32_littlearm_vec): Replace
4877 elfarm-nabi.lo with elf32-arm.lo.
4878 (bfd_elf32_bigarm_oabi_vec, bfd_elf32_littlearm_oabi_vec): Remove.
4879 * elf32-arm.c: Renamed from elfarm-nabi.c. Inline elf32-arm.h.
4880 * elf32-arm.h: Remove.
4881 * elfarm-oabi.c: Remove.
4882 * targets.c (_bfd_target_vector): Remove bfd_elf32_bigarm_oabi_vec
4883 and bfd_elf32_littlearm_oabi_vec.
4884 * aclocal.m4, Makefile.in, configure, doc/Makefile.in: Regenerated.
4885
bac23f82
HPN
48862004-11-04 Hans-Peter Nilsson <hp@axis.com>
4887
4888 * config.bfd: Support crisv32-*-* like cris-*-*.
4889 * archures.c (bfd_mach_cris_v0_v10, bfd_mach_cris_v32)
4890 (bfd_mach_cris_v10_v32): New macros.
4891 * cpu-cris.c: Tweak formatting.
4892 (get_compatible): New function.
4893 (N): New macro.
4894 (bfd_cris_arch_compat_v10_v32, bfd_cris_arch_v32): New
4895 bfd_arch_info_type:s.
4896 (bfd_cris_arch): Use bfd_mach_cris_v0_v10 for member mach,
4897 get_compatible for member compatible and link bfd_cris_arch_v32 as
4898 next.
4899 * elf32-cris.c (cris_elf_pcrel_reloc)
4900 (cris_elf_set_mach_from_flags): New functions.
4901 (cris_elf_howto_table) <R_CRIS_8_PCREL, R_CRIS_16_PCREL>
4902 <R_CRIS_32_PCREL>: Use cris_elf_pcrel_reloc.
4903 (cris_elf_grok_prstatus, cris_elf_grok_psinfo): Give correct
4904 numbers for bfd_mach_cris_v32.
4905 (PLT_ENTRY_SIZE_V32): New macro.
4906 (elf_cris_plt0_entry): Drop last comma in initializer.
4907 (elf_cris_plt0_entry_v32, elf_cris_plt_entry_v32)
4908 (elf_cris_pic_plt0_entry_v32, elf_cris_pic_plt_entry_v32): New
4909 PLT initializers.
4910 (cris_elf_relocate_section): Change all "%B(%A)" messages to
4911 "%B, section %A".
4912 (elf_cris_finish_dynamic_symbol): Do V32-specific PLT entries.
4913 (elf_cris_finish_dynamic_sections): Similar.
4914 (elf_cris_adjust_dynamic_symbol): Similar.
4915 (cris_elf_check_relocs): Change all "%B(%A)" messages to "%B,
4916 section %A".
4917 <switch with PIC relocs>: Emit error and return FALSE for
4918 bfd_mach_cris_v10_v32.
4919 <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
4920 Emit warning when generating textrel reloc.
4921 (cris_elf_object_p): Call cris_elf_set_mach_from_flags.
4922 (cris_elf_final_write_processing): Set flags according to mach.
4923 (cris_elf_print_private_bfd_data): Display
4924 EF_CRIS_VARIANT_COMMON_V10_V32 and EF_CRIS_VARIANT_V32.
4925 (cris_elf_merge_private_bfd_data): Drop variables old_flags,
4926 new_flags. Don't call cris_elf_final_write_processing. Don't
4927 look at the actual elf header flags at all; use
4928 bfd_get_symbol_leading_char to check ibfd, obfd. Trap difference
4929 in bfd_get_mach for ibfd and obfd and handle merging of compatible
4930 objects.
4931 (bfd_elf32_bfd_copy_private_bfd_data): Define.
4932 * reloc.c (BFD_RELOC_CRIS_SIGNED_8, BFD_RELOC_CRIS_UNSIGNED_8)
4933 (BFD_RELOC_CRIS_SIGNED_16, BFD_RELOC_CRIS_UNSIGNED_16)
4934 (BFD_RELOC_CRIS_LAPCQ_OFFSET): New relocs.
4935 * bfd-in2.h, libbfd.h: Regenerate.
4936
c5614fa4
AM
49372004-11-04 Alan Modra <amodra@bigpond.net.au>
4938
4939 * elf64-ppc.h (ppc64_elf_edit_toc): Declare.
4940 * elf64-ppc.c (struct ppc_link_hash_entry <adjust_done>): Update
4941 comment.
4942 (struct adjust_toc_info): New.
4943 (adjust_toc_syms, ppc64_elf_edit_toc): New functions.
4944
0ebdbb83
BW
49452004-11-03 Bob Wilson <bob.wilson@acm.org>
4946
4947 * elf.c (assign_file_positions_for_segments): Set next_file_pos even
4948 if there are no segments.
4949
675b2ace
DJ
49502004-11-02 Daniel Jacobowitz <dan@debian.org>
4951
4952 * config.bfd: Mark arm-*-oabi and thumb-*-oabi as obsolete.
4953
58852c27
NC
49542004-11-02 Nick Clifton <nickc@redhat.com>
4955
4956 * elf32-iq2000.c: Convert to ISO C90 formatting.
4957
e6857c0c
HPN
49582004-11-02 Hans-Peter Nilsson <hp@axis.com>
4959
20288ed6 4960 * elflink.c (_bfd_elf_create_got_section): Hide _GLOBAL_OFFSET_TABLE_.
e6857c0c 4961
bf718458
L
49622004-10-28 H.J. Lu <hongjiu.lu@intel.com>
4963
4964 * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle weak
4965 undefined symbols for R_IA64_SECREL32MSB, R_IA64_SECREL32LSB,
4966 R_IA64_SECREL64MSB and R_IA64_SECREL64LSB.
4967
044ad7e3
KK
49682004-10-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4969
4970 * elf32-sh.c (tpoff): Take alignment into account.
4971
d5cb4bb8
NC
49722004-10-28 Nick Clifton <nickc@redhat.com>
4973
4974 * elf32-iq2000.c (iq2000_elf_relocate_section): Do nothing when
0d48eab6 4975 performing a relocatable link.
d5cb4bb8
NC
4976 (iq2000_elf_object_p): Do not set elf_bad_symtab. This is only
4977 for MIPS ports under Irix.
4978
5b5bb741
PB
49792004-10-27 Richard Earnshaw <rearnsha@arm.com>
4980
4981 * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Handle
4982 R_ARM_CALL and R_ARM_JUMP24 as aliases of R_ARM_PC24.
4983 (elf32_arm_final_link_relocate): Ditto.
4984 (arm_add_to_rel, elf32_arm_relocate_section): Ditto.
4985 (elf32_arm_gc_sweep_hook, elf32_arm_check_relocs): Ditto
4986 (elf32_arm_adjust_dynamic_symbol): Ditto.
4987 * elfarm-nabi.c (elf32_arm_howto_table): Add R_ARM_CALL and
4988 R_ARM_JUMP32. Move R_ARM_R{REL32,ABS32,PC24,BASE}...
4989 (elf32_arm_r_howto): ... To here.
4990 (elf32_arm_howto_from_type): Use elf32_arm_r_howto.
4991
97ecf322
L
49922004-10-26 H.J. Lu <hongjiu.lu@intel.com>
4993
4994 PR 475
4995 * elfxx-ia64.c (elfNN_ia64_relocate_section): Correct
4996 R_IA64_SECREL32MSB, R_IA64_SECREL32LSB, R_IA64_SECREL64MSB
4997 and R_IA64_SECREL64LSB.
4998
3e3b46e5
PB
49992004-10-26 Paul Brook <paul@codesourcery.com>
5000
5001 * elflink.c (elf_finalize_dynstr): Skip shared aux structure.
5002 (bfd_elf_size_dynamic_sections): Create default version definition.
5003 (elf_link_output_extsym): Adjust for default symbol version.
5004
aa69fe43
HPN
50052004-10-24 Hans-Peter Nilsson <hp@bitrange.com>
5006
278b4623
HPN
5007 * mmo.c: Adjust to ISO C.
5008
aa69fe43
HPN
5009 * mmo.c (mmo_write_section_description): New function broken out
5010 of mmo_internal_write_section.
5011 (mmo_internal_write_section): For each of .text and .data, call
5012 mmo_write_section_description before outputting contents if it has
5013 nontrivially deducible vma or contents.
5014 (mmo_has_leading_or_trailing_zero_tetra_p): New function.
5015 (mmo_canonicalize_symtab): Adjust absolute symbols to .data
5016 symbols if found within the .data address range.
5017
ed040321
DJ
50182004-10-24 Daniel Jacobowitz <dan@debian.org>
5019
5020 * opncls.c (bfd_close): Return TRUE for BFD_IN_MEMORY.
5021
830866af
HPN
50222004-10-24 Hans-Peter Nilsson <hp@bitrange.com>
5023
5024 * mmo.c (File Layout): Correct place of misplaced blurb about
5025 special data.
5026
5f417ca3
MK
50272004-10-22 Mark Kettenis <kettenis@gnu.org>
5028
5029 * config.bfd: Add mips64*-*-openbsd.
5030
823fc61f
BW
50312004-10-21 Bob Wilson <bob.wilson@acm.org>
5032
5033 * elf32-xtensa.c (ebb_propose_action): Put declarations before
5034 statements.
5035
8697aafb
L
50362004-10-21 H.J. Lu <hongjiu.lu@intel.com>
5037
5038 * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.94.
5039 * configure: Regenerate.
5040
dfeffb9f
L
50412004-10-21 H.J. Lu <hongjiu.lu@intel.com>
5042
5043 PR 463
5044 * aoutx.h (aout_link_input_section_std): Pass proper hash entry
5045 to linker reloc_overflow callback.
5046 (aout_link_input_section_ext): Likewise.
5047 (aout_link_reloc_link_order): Likewise.
5048 * coff-a29k.c (coff_a29k_relocate_section): Likewise.
5049 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents):
5050 Likewise.
5051 (alpha_relocate_section): Likewise.
5052 * coff-arm.c (coff_arm_relocate_section): Likewise.
5053 * coff-h8300.c (h8300_reloc16_extra_cases): Likewise.
5054 * coff-h8500.c (extra_case): Likewise.
5055 * coff-i960.c (coff_i960_relocate_section): Likewise.
5056 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
5057 * coff-mips.c (mips_relocate_section): Likewise.
5058 * coff-or32.c (coff_or32_relocate_section): Likewise.
5059 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
5060 * coff-rs6000.c (xcoff_ppc_relocate_section): Likewise.
5061 * coff-sh.c (sh_relocate_section): Likewise.
5062 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
5063 * coff-w65.c (w65_reloc16_extra_cases): Likewise.
5064 * coff-z8k.c (extra_case): Likewise.
5065 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Likewise.
5066 * cofflink.c (_bfd_coff_reloc_link_order): Likewise.
5067 (_bfd_coff_generic_relocate_section): Likewise.
5068 * ecoff.c (ecoff_reloc_link_order): Likewise.
5069 * elf-hppa.h (elf_hppa_relocate_section): Likewise.
5070 * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
5071 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
5072 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
5073 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
5074 * elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise.
5075 * elf32-cris.c (cris_elf_relocate_section): Likewise.
5076 * elf32-crx.c (elf32_crx_relocate_section): Likewise.
5077 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
5078 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
5079 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
5080 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
5081 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
5082 * elf32-i370.c (i370_elf_relocate_section): Likewise.
5083 * elf32-i386.c (elf_i386_relocate_section): Likewise.
5084 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
5085 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
5086 * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
5087 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
5088 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
5089 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
5090 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
5091 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
5092 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
5093 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
5094 * elf32-s390.c (elf_s390_relocate_section): Likewise.
5095 * elf32-sh.c (sh_elf_relocate_section): Likewise.
5096 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
5097 * elf32-v850.c (v850_elf_relocate_section): Likewise.
5098 * elf32-vax.c (elf_vax_relocate_section): Likewise.
5099 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
5100 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
5101 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
5102 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
5103 * elf64-s390.c (elf_s390_relocate_section): Likewise.
5104 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
5105 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
5106 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
5107 * elflink.c (elf_reloc_link_order): Likewise.
5108 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
5109 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
5110 (_bfd_elf_mips_get_relocated_section_contents): Likewise.
5111 * linker.c (_bfd_generic_reloc_link_order): Likewise.
5112 * pdp11.c (pdp11_aout_link_input_section): Likewise.
5113 (aout_link_reloc_link_order): Likewise.
5114 * reloc.c (bfd_generic_get_relocated_section_contents):
5115 Likewise.
5116 * xcofflink.c (xcoff_reloc_link_order): Likewise.
5117 * simple.c (simple_dummy_reloc_overflow): Updated.
5118
1715e0e3
AS
51192004-10-20 Andreas Schwab <schwab@suse.de>
5120
5121 * elf32-m68k.c (elf_m68k_plt_sym_val): New function.
5122 (elf_backend_plt_sym_val): Define.
5123
db3d41a8
DS
51242004-10-19 Danny Smith <dannysmith@users.sourceforege.net>
5125
5126 * config.bfd: Set targ_underscore=yes for PE COFF targets
5127
4b85d634
AM
51282004-10-19 Alan Modra <amodra@bigpond.net.au>
5129
5130 * elf64-ppc.c (opd_entry_value): Handle --just-symbols objects.
5131 (ppc64_elf_edit_opd): Likewise.
5132
6df4d94c
MM
51332004-10-18 Mark Mitchell <mark@codesourcery.com>
5134
5135 * elfarm-nabi.c (ELF_DYNAMIC_SEC_FLAGS): Add comment.
5136 * elflink.c (_bfd_elf_create_dynamic_sections): For a loaded PLT,
5137 set SEC_ALLOC and SEC_LOAD.
5138
00d962d1
NC
51392004-10-18 Nick Clifton <nickc@redhat.com>
5140
5141 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Compute
5142 'name' for relocs against both local and global symbols.
5143
b58f81ae
DJ
51442004-10-16 Daniel Jacobowitz <dan@debian.org>
5145
5146 * bfd-in2.h: Regenerate.
5147 * bfd.c (struct bfd): Add no_export.
5148 * elflink.c (elf_link_add_object_symbols): Handle no_export.
5149
7d3f158f
AM
51502004-10-15 Alan Modra <amodra@bigpond.net.au>
5151
5152 * config.bfd: Whitespace cleanup.
5153 * Makefile.am: Run "make dep-am"
5154 * Makefile.in: Regenerate.
5155
6d2cd210
JJ
51562004-10-15 Jakub Jelinek <jakub@redhat.com>
5157
5158 * elflink.c (struct already_linked_section): Removed.
5159 (try_match_symbols_in_sections, already_linked): Removed.
5160 (_bfd_elf_section_already_linked): Skip ^\.gnu\.linkonce\.[^.]*\.
5161 prefix of section names when finding already_linked_table
5162 chain. Compare section names. Instead of calling already_linked,
5163 do it inline and only for sections in the same already_linked_list.
5164
92e4ec35
AM
51652004-10-15 Alan Modra <amodra@bigpond.net.au>
5166
5167 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Add "info"
5168 parameter. If called after _bfd_elf_write_section_eh_frame,
5169 don't allow a -2 return unless need_* bit is already set, and
5170 handle offsets adjusted for output_offset.
5171 * elf-bfd.h (_bfd_elf_eh_frame_section_offset): Update prototype.
5172 * elf.c (_bfd_elf_section_offset): Update call.
5173
7bf6dede
L
51742004-10-13 H.J. Lu <hongjiu.lu@intel.com>
5175
5176 PR 440
5177 * coffcode.h (coff_compute_section_file_positions): Cast to
5178 bfd_vma when computing page alignment.
5179
c0042f5d
MM
51802004-10-13 Mark Mitchell <mark@codesourcery.com>
5181
5182 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Use file
5183 offsets, not VMAs, for DT_VERSYM, DT_VERDEF, DT_VERNEED.
5184
2a1b9a48
MM
51852004-10-12 Mark Mitchell <mark@codesourcery.com>
5186
5187 * elf32-arm.h (elf32_arm_finish_dynamic_symbol): Make .rel.plt
5188 relocations use a virtual address, not a section offset.
5189
b08b5071
BW
51902004-10-12 Bob Wilson <bob.wilson@acm.org>
5191
5192 * elf32-xtensa.c (elf_xtensa_get_private_bfd_flags): Delete.
5193 (narrow_instruction, widen_instruction): Remove unnecessary calls to
5194 xtensa_format_encode.
5195 (ebb_propose_action): Inline call to ebb_add_proposed_action.
5196 (ebb_add_proposed_action): Delete.
5197
7fa3d080
BW
51982004-10-12 Bob Wilson <bob.wilson@acm.org>
5199
5200 * elf32-xtensa.c: Use ISO C90 formatting.
5201
3656d5e3
PB
52022004-10-12 Paul Brook <paul@codesourcery.com>
5203
5204 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Rephrase error
5205 message.
5206
8cb51566
PB
52072004-10-12 Paul Brook <paul@codesourcery.com>
5208
5209 * elf32-arm.h: Support EABI version 4 objects.
5210
1abc8597
AM
52112004-10-12 Alan Modra <amodra@bigpond.net.au>
5212
5213 PR 325
5214 * cpu-i386.c (bfd_x86_64_arch_intel_syntax): Place last in chain.
5215 Don't mark as default.
5216 (bfd_x86_64_arch): Don't mark as default.
5217
9e66c942
AM
52182004-10-12 Alan Modra <amodra@bigpond.net.au>
5219
5220 * elflink.c (enum action_discarded): New.
5221 (elf_section_complain_discarded): Delete.
5222 (elf_action_discarded): New function subsuming the above and also
5223 controlling reloc behaviour.
1abc8597 5224 (elf_link_input_bfd): Use it.
9e66c942 5225
7f1204bb
JJ
52262004-10-11 Jakub Jelinek <jakub@redhat.com>
5227
5228 * elf.c (bfd_section_from_shdr): Handle SHT_GNU_LIBLIST.
5229 (special_sections): Add .gnu.liblist and .gnu.conflict.
5230 (assign_section_numbers): Handle SHT_GNU_LIBLIST.
5231
87e5235d
AM
52322004-10-11 Alan Modra <amodra@bigpond.net.au>
5233
5234 PR 233
5235 * elflink.c (elf_link_input_bfd): Try harder to support
5236 relocations against symbols in removed linkonce sections.
5237
2ad770c3
AM
52382004-10-11 Alan Modra <amodra@bigpond.net.au>
5239
029446c4
AM
5240 * elflink.c (elf_link_input_bfd): Revert PR 354 change.
5241
2ad770c3
AM
5242 PR 354
5243 * elflink.c (elf_link_input_bfd): Check that relocs in SEC_ALLOC
5244 sections do not reference symbols in non-SEC_ALLOC sections.
5245
1da212d6
AM
52462004-10-11 Alan Modra <amodra@bigpond.net.au>
5247
5248 PR 437
5249 * elflink.c (elf_link_sort_relocs): Don't bomb on unusual sections.
5250 (_bfd_elf_link_omit_section_dynsym): Formatting.
5251
f12123c0
AM
52522004-10-10 Alan Modra <amodra@bigpond.net.au>
5253
5254 * libbfd-in.h (BFD_ASSERT, BFD_FAIL): Wrap macro body in do while.
5255 * libbfd.h: Regnerate.
5256 * elf32-cris.c: Add missing semicolon to BFD_ASSERTs.
5257 * elf32-frv.c: Likewise.
5258 * elf32-m32r.c: Likewise.
5259 * elf32-ppc.c: Likewise.
5260 * elf64-hppa.c: Likewise.
5261 * elfxx-ia64.c: Likewise.
5262 * opncls.c: Likewise.
5263
fda3ecf2
AM
52642004-10-10 Alan Modra <amodra@bigpond.net.au>
5265
3472e2e9
AM
5266 * elf-bfd.h (struct eh_frame_hdr_info): Add offsets_adjusted.
5267 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Adjust
5268 offsets stored in struct eh_cie_fde entries before doing other
5269 work.
5270
fda3ecf2
AM
5271 * elf-bfd.h (struct eh_cie_fde): Add cie_inf, remove sec.
5272 (struct eh_frame_hdr_info): Add last_cie_inf, remove last_cie_offset.
5273 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Delete code
5274 setting offsets for removed CIEs. Don't set "sec", instead set
5275 cie_inf for FDEs. Keep a pointer to last struct eh_cie_fde for a
5276 CIE in hdr_info. Only set make_relative and make_lsda_relative
5277 for CIEs. Use pointers rather than array indices.
5278 (_bfd_elf_eh_frame_section_offset): Test/set make_relative,
5279 make_lsda_relative, need_* on cie_inf for FDEs.
5280 (_bfd_elf_write_section_eh_frame): Adjust offset and new_offset for
5281 section output_offset. Delete cie_offset, instead use cie_inf
5282 pointer to CIE entry. Use need_relative and need_lsda_relative on
5283 CIE entry for FDEs. Use pointers rather than array indices.
5284
7db6994f
AM
52852004-10-09 Alan Modra <amodra@bigpond.net.au>
5286
5287 * coff-rs6000.c (rs6000coff_vec): Add initializer for
5288 bfd_is_target_special_symbol.
5289 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
5290 * som.c (som_bfd_is_target_special_symbol): Define.
5291
3c9458e9
NC
52922004-10-08 Nick Clifton <nickc@redhat.com>
5293
5294 * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.93.
5295 * configure: Regenerate.
5296 * bfd-in2.h: Regenerate.
5297 * syms.c (bfd_is_target_special_symbol): New interface function.
5298 Returns true when a symbol should be considered to be special.
7db6994f 5299 * targets.c (bfd_target): Include bfd_is_target_special_symbol in
3c9458e9
NC
5300 the symbol jump table.
5301 * elf32-arm.h (elf32_arm_is_target_special_symbol): New function.
5302 Return true iff the symbol is a mapping symbol.
5303 (bfd_elf32_bfd_is_target_special_symbol): Define.
5304 * elfxx-target.h: Provide a default definition for
5305 bfd_is_target_special_symbol.
5306 * aout-target.h: Likewise.
5307 * aout-tic30.c: Likewise.
873d03ee 5308 * binary.c: Likewise.
3c9458e9
NC
5309 * coffcode.h: Likewise.
5310 * i386msdos.c: Likewise.
5311 * ieee.c: Likewise.
873d03ee 5312 * ihex.c: Likewise.
3c9458e9
NC
5313 * libaout.h: Likewise.
5314 * libbfd-in.h: Likewise
5315 * libecoff.h: Likewise.
5316 * mach-o.c: Likewise.
5317 * mmo.c: Likewise.
5318 * nlm-target.h: Likewise.
5319 * oasys.c: Likewise.
5320 * pef.c: Likewise.
5321 * ppcboot.c: Likewise.
5322 * srec.c: Likewise.
5323 * tekhex.c: Likewise.
5324 * versados.c: Likewise.
5325 * vms.c: Likewise.
5326 * xcoff-target.h: Likewise.
5327 * xsym.c: Likewise.
5328 * libbfd.h: Regenerate.
5329
d2b2c203
DJ
53302004-10-08 Daniel Jacobowitz <dan@debian.org>
5331
5332 * config.bfd: Include 64-bit support for i[3-7]86-*-solaris2*.
5333 * elf64-x86-64.c (elf64_x86_64_section_from_shdr): New function.
5334 (elf_backend_section_from_shdr): Define.
5335
864274b0
AM
53362004-10-08 Alan Modra <amodra@bigpond.net.au>
5337
5338 * syms.c (bfd_is_local_label): Return false for file symbols.
5339
43cd72b9 53402004-10-07 Bob Wilson <bob.wilson@acm.org>
85a5ac80 5341 David Heine <dlheine@tensilica.com>
43cd72b9
BW
5342
5343 * elf32-xtensa.c (elf32xtensa_size_opt): New global variable.
5344 (xtensa_default_isa): Global variable moved here from xtensa-isa.c.
5345 (elf32xtensa_no_literal_movement): New global variable.
5346 (elf_howto_table): Add entries for new relocations.
5347 (elf_xtensa_reloc_type_lookup): Handle new relocations.
5348 (property_table_compare): When addresses are equal, compare sizes and
5349 various property flags.
5350 (property_table_matches): New.
5351 (xtensa_read_table_entries): Extend to read new property tables. Add
5352 output_addr parameter to indicate that output addresses should be used.
5353 Use bfd_get_section_limit.
5354 (elf_xtensa_find_property_entry): New.
5355 (elf_xtensa_in_literal_pool): Use elf_xtensa_find_property_entry.
5356 (elf_xtensa_check_relocs): Handle new relocations.
5357 (elf_xtensa_do_reloc): Use bfd_get_section_limit. Handle new
5358 relocations. Use new xtensa-isa.h functions.
5359 (build_encoding_error_message): Remove encode_result parameter. Add
5360 new target_address parameter used to detect alignment errors.
5361 (elf_xtensa_relocate_section): Use bfd_get_section_limit. Clean up
5362 error handling. Use new is_operand_relocation function.
5363 (elf_xtensa_combine_prop_entries, elf_xtensa_merge_private_bfd_data):
5364 Use underbar macro for error messages. Formatting.
5365 (get_const16_opcode): New.
5366 (get_l32r_opcode): Add a separate flag for initialization.
5367 (get_relocation_opnd): Operand number is no longer explicit in the
5368 relocation. Change to decode the opcode and analyze its operands.
5369 (get_relocation_slot): New.
5370 (get_relocation_opcode): Add bfd parameter. Use bfd_get_section_limit.
5371 Use new xtensa-isa.h functions to handle multislot instructions.
5372 (is_l32r_relocation): Add bfd parameter. Use is_operand_relocation.
5373 (get_asm_simplify_size, is_alt_relocation, is_operand_relocation,
5374 insn_decode_len, insn_decode_opcode, check_branch_target_aligned,
5375 check_loop_aligned, check_branch_target_aligned_address, narrowable,
5376 widenable, narrow_instruction, widen_instruction, op_single_fmt_table,
5377 get_single_format, init_op_single_format_table): New.
5378 (elf_xtensa_do_asm_simplify): Add error_message parameter and use it
5379 instead of calling _bfd_error_handler. Use new xtensa-isa.h functions.
5380 (contract_asm_expansion): Add error_message parameter and pass it to
5381 elf_xtensa_do_asm_simplify. Replace use of R_XTENSA_OP0 relocation
5382 with R_XTENSA_SLOT0_OP.
5383 (get_expanded_call_opcode): Extend to handle either L32R or CONST16
5384 instructions. Use new xtensa-isa.h functions.
5385 (r_reloc struct): Add new virtual_offset field.
5386 (r_reloc_init): Add contents and content_length parameters. Set
5387 virtual_offset field to zero. Add contents to target_offset field for
5388 partial_inplace relocations.
5389 (r_reloc_is_defined): Check for null.
5390 (print_r_reloc): New debug function.
5391 (source_reloc struct): Replace xtensa_operand field with pair of the
5392 opcode and the operand position. Add is_abs_literal field.
5393 (init_source_reloc): Specify operand by opcode/position pair. Set
5394 is_abs_literal field.
5395 (source_reloc_compare): When target_offsets are equal, compare other
5396 fields to make sorting predictable.
5397 (literal_value struct): Add is_abs_literal field.
5398 (value_map_hash_table struct): Add has_last_loc and last_loc fields.
5399 (init_literal_value): New.
5400 (is_same_value): Replace with ...
5401 (literal_value_equal): ... this function. Add comparisons of
5402 virtual_offset and is_abs_literal fields.
5403 (value_map_hash_table_init): Use bfd_zmalloc. Check for allocation
5404 failure. Initialize has_last_loc field.
5405 (value_map_hash_table_delete): New.
5406 (hash_literal_value): Rename to ...
5407 (literal_value_hash): ... this. Include is_abs_literal flag and
5408 virtual_offset field in the hash value.
5409 (get_cached_value): Rename to ...
5410 (value_map_get_cached_value): ... this. Update calls to
5411 literal_value_hash and literal_value_equal.
5412 (add_value_map): Check for allocation failure. Update calls to
5413 value_map_get_cached_value and literal_value_hash.
5414 (text_action, text_action_list, text_action_t): New types.
5415 (find_fill_action, compute_removed_action_diff, adjust_fill_action,
5416 text_action_add, text_action_add_literal, offset_with_removed_text,
5417 offset_with_removed_text_before_fill, find_insn_action,
5418 print_action_list, print_removed_literals): New.
5419 (offset_with_removed_literals): Delete.
5420 (xtensa_relax_info struct): Add is_relaxable_asm_section, action_list,
5421 fix_array, fix_array_count, allocated_relocs, relocs_count, and
5422 allocated_relocs_count fields.
5423 (init_xtensa_relax_info): Initialize new fields.
5424 (reloc_bfd_fix struct): Add new translated field.
5425 (reloc_bfd_fix_init): Add translated parameter and use it to set the
5426 translated field.
5427 (fix_compare, cache_fix_array): New.
5428 (get_bfd_fix): Remove fix_list parameter and get all relax_info for the
5429 section via get_xtensa_relax_info. Use cache_fix_array to set up
5430 sorted fix_array and use bsearch instead of linear search.
5431 (section_cache_t): New struct.
5432 (init_section_cache, section_cache_section, clear_section_cache): New.
5433 (ebb_t, ebb_target_enum, proposed_action, ebb_constraint): New types.
5434 (init_ebb_constraint, free_ebb_constraint, init_ebb, extend_ebb_bounds,
5435 extend_ebb_bounds_forward, extend_ebb_bounds_backward,
5436 insn_block_decodable_len, ebb_propose_action, ebb_add_proposed_action):
5437 New.
5438 (retrieve_contents): Use bfd_get_section_limit.
5439 (elf_xtensa_relax_section): Add relocations_analyzed flag. Update call
5440 to compute_removed_literals. Free value_map_hash_table when no longer
5441 needed.
5442 (analyze_relocations): Check is_relaxable_asm_section flag. Call
5443 compute_text_actions for all sections.
5444 (find_relaxable_sections): Mark sections as relaxable if they contain
5445 ASM_EXPAND relocations that can be optimized. Adjust r_reloc_init
5446 call. Increment relax_info src_count field only for appropriate
5447 relocation types. Remove is_literal_section check.
5448 (collect_source_relocs): Use bfd_get_section_limit. Adjust calls to
5449 r_reloc_init and find_associated_l32r_irel. Check
5450 is_relaxable_asm_section flag. Handle L32R instructions with absolute
5451 literals. Pass is_abs_literal flag to init_source_reloc.
5452 (is_resolvable_asm_expansion): Use bfd_get_section_limit. Check for
5453 CONST16 instructions. Adjust calls to r_reloc_init and
fda3ecf2 5454 pcrel_reloc_fits. Handle weak symbols conservatively.
43cd72b9
BW
5455 (find_associated_l32r_irel): Add bfd parameter and pass it to
5456 is_l32r_relocation.
5457 (compute_text_actions, compute_ebb_proposed_actions,
5458 compute_ebb_actions, check_section_ebb_pcrels_fit,
5459 check_section_ebb_reduces, text_action_add_proposed,
5460 compute_fill_extra_space): New.
5461 (remove_literals): Replace with ...
5462 (compute_removed_literals): ... this function. Call
5463 init_section_cache. Use bfd_get_section_limit. Sort internal_relocs.
5464 Call xtensa_read_table_entries to get the property table. Skip
5465 relocations other than R_XTENSA_32 and R_XTENSA_PLT. Use new
5466 is_removable_literal, remove_dead_literal, and
fda3ecf2 5467 identify_literal_placement functions.
43cd72b9
BW
5468 (get_irel_at_offset): Rewrite to use bsearch on sorted relocations
5469 instead of linear search.
5470 (is_removable_literal, remove_dead_literal,
5471 identify_literal_placement): New.
5472 (relocations_reach): Update check for literal not referenced by any
5473 PC-relative relocations. Adjust call to pcrel_reloc_fits.
5474 (coalesce_shared_literal, move_shared_literal): New.
5475 (relax_section): Use bfd_get_section_limit. Call
5476 translate_section_fixes. Update calls to r_reloc_init and
5477 offset_with_removed_text. Check new is_relaxable_asm_section flag.
5478 Add call to pin_internal_relocs. Add special handling for
5479 R_XTENSA_ASM_SIMPLIFY and R_XTENSA_DIFF* relocs. Use virtual_offset
5480 info to calculate new addend_displacement variable. Replace code for
5481 deleting literals with more general code to perform the actions
5482 determined by the action_list for the section.
5483 (translate_section_fixes, translate_reloc_bfd_fix): New.
5484 (translate_reloc): Check new is_relaxable_asm_section flag. Call
5485 find_removed_literal only if is_operand_relocation. Update call to
5486 offset_with_removed_text. Use new target_offset and removed_bytes
5487 variables.
5488 (move_literal): New.
5489 (relax_property_section): Use bfd_get_section_limit. Set new
5490 is_full_prop_section flag and handle new property tables. Update calls
5491 to r_reloc_init and offset_with_removed_text. Check
5492 is_relaxable_asm_section flag. Handle expansion of zero-sized
5493 unreachable entries, with use of offset_with_removed_text_before_fill.
5494 For relocatable links, combine entries only for literal tables.
5495 (relax_section_symbols): Check is_relaxable_asm_section flag. Update
5496 calls to offset_with_removed_text. Translate st_size field for
5497 function symbols.
5498 (do_fix_for_relocatable_link): Change to return bfd_boolean to indicate
5499 failure. Add contents parameter. Update call to get_bfd_fix. Update
5500 call to r_reloc_init. Call _bfd_error_handler and return FALSE for
5501 R_XTENSA_ASM_EXPAND relocs.
5502 (do_fix_for_final_link): Add input_bfd and contents parameters. Update
5503 call to get_bfd_fix. Include offset from contents for partial_inplace
5504 relocations.
5505 (is_reloc_sym_weak): New.
5506 (pcrel_reloc_fits): Use new xtensa-isa.h functions.
5507 (prop_sec_len): New.
5508 (xtensa_is_property_section): Handle new property sections.
5509 (is_literal_section): Delete.
5510 (internal_reloc_compare): When r_offset matches, compare r_info and
5511 r_addend to make sorting predictable.
5512 (internal_reloc_matches): New.
5513 (xtensa_get_property_section_name): Handle new property sections.
5514 (xtensa_get_property_predef_flags): New.
5515 (xtensa_callback_required_dependence): Use bfd_get_section_limit.
5516 Update calls to xtensa_isa_init, is_l32r_relocation, and r_reloc_init.
5517 * xtensa-isa.c (xtensa_default_isa): Moved to elf32-xtensa.c.
5518 (xtisa_errno, xtisa_error_msg): New variables.
5519 (xtensa_isa_errno, xtensa_isa_error_msg): New.
5520 (xtensa_insnbuf_alloc): Add error handling.
5521 (xtensa_insnbuf_to_chars): Add num_chars parameter. Update to
5522 use xtensa_format_decode. Add error handling.
5523 (xtensa_insnbuf_from_chars): Add num_chars parameter. Decode the
5524 instruction length to find the number of bytes to copy.
5525 (xtensa_isa_init): Add error handling. Replace calls to
5526 xtensa_load_isa and xtensa_extend_isa with code to initialize lookup
5527 tables in the xtensa_modules structure.
5528 (xtensa_check_isa_config, xtensa_add_isa, xtensa_load_isa,
5529 xtensa_extend_isa): Delete.
5530 (xtensa_isa_free): Change to only free lookup tables.
5531 (opname_lookup_compare): Replace with ...
5532 (xtensa_isa_name_compare): ... this function. Use strcasecmp.
5533 (xtensa_insn_maxlength): Rename to ...
5534 (xtensa_isa_maxlength): ... this.
5535 (xtensa_insn_length): Delete.
5536 (xtensa_insn_length_from_first_byte): Replace with ...
5537 (xtensa_isa_length_from_chars): ... this function.
5538 (xtensa_num_opcodes): Rename to ...
5539 (xtensa_isa_num_opcodes): ... this.
5540 (xtensa_isa_num_pipe_stages, xtensa_isa_num_formats,
5541 xtensa_isa_num_regfiles, xtensa_isa_num_stages,
5542 xtensa_isa_num_sysregs, xtensa_isa_num_interfaces,
5543 xtensa_isa_num_funcUnits, xtensa_format_name, xtensa_format_lookup,
5544 xtensa_format_decode, xtensa_format_encode, xtensa_format_length,
5545 xtensa_format_num_slots, xtensa_format_slot_nop_opcode,
5546 xtensa_format_get_slot, xtensa_format_set_slot): New functions.
5547 (xtensa_opcode_lookup): Add error handling.
5548 (xtensa_decode_insn): Replace with ...
5549 (xtensa_opcode_decode): ... this function, with new format and
5550 slot parameters. Add error handling.
5551 (xtensa_encode_insn): Replace with ...
5552 (xtensa_opcode_encode): ... this function, which does the encoding via
5553 one of the entries in the "encode_fns" array. Add error handling.
5554 (xtensa_opcode_name): Add error handling.
5555 (xtensa_opcode_is_branch, xtensa_opcode_is_jump, xtensa_opcode_is_loop,
5556 xtensa_opcode_is_call): New.
5557 (xtensa_num_operands): Replace with ...
5558 (xtensa_opcode_num_operands): ... this function. Add error handling.
5559 (xtensa_opcode_num_stateOperands,
5560 xtensa_opcode_num_interfaceOperands, xtensa_opcode_num_funcUnit_uses,
5561 xtensa_opcode_funcUnit_use, xtensa_operand_name,
5562 xtensa_operand_is_visible): New.
5563 (xtensa_get_operand, xtensa_operand_kind): Delete.
5564 (xtensa_operand_inout): Add error handling and special-case for
5565 "sout" operands.
5566 (xtensa_operand_get_field, xtensa_operand_set_field): Rewritten to
5567 operate on one slot of an instruction. Added error handling.
5568 (xtensa_operand_encode): Handle default operands with no encoding
5569 functions. Check for success by comparing against decoded value.
5570 Add error handling.
5571 (xtensa_operand_decode): Handle default operands. Return decoded value
5572 through argument pointer. Add error handling.
5573 (xtensa_operand_is_register, xtensa_operand_regfile,
5574 xtensa_operand_num_regs, xtensa_operand_is_known_reg): New.
5575 (xtensa_operand_isPCRelative): Rename to ...
5576 (xtensa_operand_is_PCrelative): ... this. Add error handling.
5577 (xtensa_operand_do_reloc, xtensa_operand_undo_reloc): Return value
5578 through argument pointer. Add error handling.
5579 (xtensa_stateOperand_state, xtensa_stateOperand_inout,
5580 xtensa_interfaceOperand_interface, xtensa_regfile_lookup,
5581 xtensa_regfile_lookup_shortname, xtensa_regfile_name,
5582 xtensa_regfile_shortname, xtensa_regfile_view_parent,
5583 xtensa_regfile_num_bits, xtensa_regfile_num_entries,
5584 xtensa_state_lookup, xtensa_state_name, xtensa_state_num_bits,
5585 xtensa_state_is_exported, xtensa_sysreg_lookup,
5586 xtensa_sysreg_lookup_name, xtensa_sysreg_name, xtensa_sysreg_number,
5587 xtensa_sysreg_is_user, xtensa_interface_lookup, xtensa_interface_name,
5588 xtensa_interface_num_bits, xtensa_interface_inout,
5589 xtensa_interface_has_side_effect, xtensa_funcUnit_lookup,
5590 xtensa_funcUnit_name, xtensa_funcUnit_num_copies): New.
5591 * xtensa-modules.c: Rewrite to use new data structures.
5592 * reloc.c (BFD_RELOC_XTENSA_DIFF8, BFD_RELOC_XTENSA_DIFF16,
5593 BFD_RELOC_XTENSA_DIFF32, BFD_RELOC_XTENSA_SLOT0_OP,
5594 BFD_RELOC_XTENSA_SLOT1_OP, BFD_RELOC_XTENSA_SLOT2_OP,
5595 BFD_RELOC_XTENSA_SLOT3_OP, BFD_RELOC_XTENSA_SLOT4_OP,
5596 BFD_RELOC_XTENSA_SLOT5_OP, BFD_RELOC_XTENSA_SLOT6_OP,
5597 BFD_RELOC_XTENSA_SLOT7_OP, BFD_RELOC_XTENSA_SLOT8_OP,
5598 BFD_RELOC_XTENSA_SLOT9_OP, BFD_RELOC_XTENSA_SLOT10_OP,
5599 BFD_RELOC_XTENSA_SLOT11_OP, BFD_RELOC_XTENSA_SLOT12_OP,
5600 BFD_RELOC_XTENSA_SLOT13_OP, BFD_RELOC_XTENSA_SLOT14_OP,
5601 BFD_RELOC_XTENSA_SLOT0_ALT, BFD_RELOC_XTENSA_SLOT1_ALT,
5602 BFD_RELOC_XTENSA_SLOT2_ALT, BFD_RELOC_XTENSA_SLOT3_ALT,
5603 BFD_RELOC_XTENSA_SLOT4_ALT, BFD_RELOC_XTENSA_SLOT5_ALT,
5604 BFD_RELOC_XTENSA_SLOT6_ALT, BFD_RELOC_XTENSA_SLOT7_ALT,
5605 BFD_RELOC_XTENSA_SLOT8_ALT, BFD_RELOC_XTENSA_SLOT9_ALT,
5606 BFD_RELOC_XTENSA_SLOT10_ALT, BFD_RELOC_XTENSA_SLOT11_ALT,
5607 BFD_RELOC_XTENSA_SLOT12_ALT, BFD_RELOC_XTENSA_SLOT13_ALT,
5608 BFD_RELOC_XTENSA_SLOT14_ALT): Add new relocations.
5609 * Makefile.am (xtensa-isa.lo, xtensa-modules.lo): Update dependencies.
5610 * Makefile.in: Regenerate.
5611 * bfd-in2.h: Likewise.
5612 * libbfd.h: Likewise.
5613
99022dfb
RS
56142004-10-07 Richard Sandiford <rsandifo@redhat.com>
5615
5616 * elf64-mips.c (mips_elf64_write_rel): Use STN_UNDEF for relocs
5617 against the absolute section.
5618 (mips_elf64_write_rela): Likewise.
5619
b67ae299
NC
56202004-10-07 Jan Beulich <jbeulich@novell.com>
5621
5622 * elf.c (elf_find_function): Don't generally check for matching
5623 section, just for non-file symbols. Remove redunant comparison
5624 for the latter.
5625 * elf32-arm.h (arm_elf_find_function): Likewise.
5626
8fdd7217
NC
56272004-10-07 Jeff Baker <jbaker@qnx.com>
5628
5629 * elflink.c (_bfd_elf_add_dynamic_entry): Add code to warn if
5630 adding a DT_TEXTREL to a shared object and --warn-shared-textrel
5631 was specified.
5632
073a2dc3
RM
56332004-10-04 Roland McGrath <roland@redhat.com>
5634
5635 * hash.c (bfd_hash_set_default_size): Use const for table.
5636 Use size_t instead of int for variable compared to sizeof results.
5637
7785be14
AM
56382004-10-05 Alan Modra <amodra@bigpond.net.au>
5639
5640 PR 425
5641 * syms.c (_bfd_stab_section_find_nearest_line): Ignore R_*_NONE relocs.
5642
40a18ebd
NC
56432004-10-01 Paul Brook <paul@codesourcery.com>
5644
5645 * elf32-arm.h (elf32_arm_fake_sections,
5646 is_arm_elf_unwind_section_name, elf32_arm_section_from_shdr): New
5647 functions.
5648 (elf_backend_fake_sections, elf_backend_section_from_shdr): Define.
5649
8935b81f
AM
56502004-10-01 Alan Modra <amodra@bigpond.net.au>
5651
5652 * elf-bfd.h (struct eh_cie_fde): Add need_relative and
5653 need_lsda_relative.
5654 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Set
5655 need_relative or need_lsda_relative if we are processing an
5656 offset for a reloc on a FDE initial loc or LSDA field
5657 respectively.
5658 (_bfd_elf_write_section_eh_frame): Test need_relative and
5659 need_lsda_relative in place of corresponding make_* field
5660 when deciding to use pc-relative encodings.
5661
eeac373a
PB
56622004-09-30 Paul Brook <paul@codesourcery.com>
5663
5664 * elf32-arm.h (bfd_elf32_arm_set_target_relocs): Handle "abs"
5665 target2 relocation type.
5666
7479dfd4
L
56672004-09-30 H.J. Lu <hongjiu.lu@intel.com>
5668
5669 PR 414
5670 * elflink.c (_bfd_elf_merge_symbol): Check TLS symbol.
5671
0dd132b6
NC
56722004-09-30 Paul Brook <paul@codesourcery.com>
5673
5674 * reloc.c: Add BFD_RELOC_ARM_SMI.
5675 * bfd-in2.h: Regenerate.
5676 * libbfd.h: Ditto.
5677
1ba54ee0
AM
56782004-09-24 Alan Modra <amodra@bigpond.net.au>
5679
5680 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Add output section
5681 vma and output offset to address.
5682 * simple.c (simple_save_output_info): Only set output section
5683 and offset for debug sections, or those not already set up by
5684 the linker.
5685 (bfd_simple_get_relocated_section_contents): Update comment.
5686
5efb6261
AM
56872004-09-24 Alan Modra <amodra@bigpond.net.au>
5688
5689 * elf.c (IS_LOADED): Delete.
5690 (assign_file_positions_for_segments): Just test SEC_LOAD instead.
5691 Restore SEC_HAS_CONTENTS test to the one place it was used prior
5692 to 2004-09-22.
5693
fca870e4
AM
56942004-09-23 Alan Modra <amodra@bigpond.net.au>
5695
5696 PR gas/396
5697 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
5698 bfd_mach_sparc_sparclet and bfd_mach_sparc_sparclite. Remove
5699 redundant assignment of EM_SPARC.
5700
c86696a3
BF
57012004-09-22 Brian Ford <ford@vss.fsi.com>
5702
5703 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
5704 alignment for .rdata sections so sse[2] code works with gcc >= 3.3.3
5705 constants.
5706 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
5707
73adb214
AM
57082004-09-22 Alan Modra <amodra@bigpond.net.au>
5709
5710 * elf32-ppc.c (ppc_elf_modify_segment_map): Delete.
5711 (elf_backend_modify_segment_map): Don't define.
5712
b301b248
AM
57132004-09-22 Alan Modra <amodra@bigpond.net.au>
5714
5715 * elf.c (IS_LOADED): Define.
5716 (assign_file_positions_for_segments): Don't round up file offset of
5717 PT_LOAD segments containing no SEC_LOAD sections, instead round down.
5718 Delete code handling link script adjustment of lma. Do the adjust
5719 in later code handling similar ajustments. Remove dead code error
5720 check. Warn if section lma would require a negative offset
5721 adjustment. Tweak lma adjustment to use p_filesz rather than p_memsz.
5722 Use p_vaddr + p_memsz inside section loop in place of voff. Don't
5723 update voff in section loop. Change voff in segment loop to be an
5724 adjustment on top of "off". Set sec->filepos and update "off" later.
5725 Test for loadable sections consistently using IS_LOADED. Similarly,
073a2dc3 5726 test for alloc-only sections other than .tbss consistently.
b301b248
AM
5727 Don't bother checking SEC_ALLOC in PT_LOAD segments. Remove FIXME.
5728 Tidy PT_NOTE handling. Use %B and %A in error messages.
5729 (assign_file_positions_except_relocs): Use %B in error message.
5730
3f85e526
L
57312004-09-17 H.J. Lu <hongjiu.lu@intel.com>
5732
5733 * Makefile.am (AUTOMAKE_OPTIONS): Require 1.9.
5734 (CONFIG_STATUS_DEPENDENCIES): New.
5735 (Makefile): Removed.
5736 (config.status): Likewise.
5737 * Makefile.in: Regenerated.
5738
eb043451
PB
57392004-09-17 Paul Brook <paul@codesourcery.com>
5740
5741 * bfd-in.h (bfd_elf32_arm_set_target_relocs): Add prototype.
5742 (bfd_elf32_arm_process_before_allocation): Update prototype.
5743 * bfd-in2.h: Regenerate.
5744 * bfd/elf32-arm.h (elf32_arm_link_hash_table): Add target2_reloc.
5745 (elf32_arm_link_hash_table_create): Set it.
5746 (bfd_elf32_arm_process_before_allocation): Remove target1_is_rel.
5747 (bfd_elf32_arm_set_target_relocs): New function.
5748 (arm_real_reloc_type): New function.
5749 (elf32_arm_final_link_relocate): Use it. Handle R_ARM_PREL31 and
5750 R_ARM_GOT_PREL. Remove R_ARM_TARGET1.
5751 (elf32_arm_gc_sweep_hook): Ditto.
5752 (elf32_arm_check_relocs): Ditto.
5753 (elf32_arm_relocate_section): Handle R_ARM_GOT_PREL.
5754 * elfarm-nabi.c (elf32_arm_howto_table): Add R_ARM_PREL31 and
5755 R_ARM_GOT_TARGET2.
5756 (elf32_arm_got_prel): New variable.
5757 (elf32_arm_howto_from_type): New function.
5758 (elf32_arm_info_to_howto): Use it.
5759 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_PREL31 and
5760 BFD_RELOC_ARM_TARGET2.
5761 * libbfd.h: Regenerate.
5762 * reloc.c: Add BFD_RELOC_ARM_TARGET2 and BFD_RELOC_ARM_PREL31.
5763
f6e332e6
AM
57642004-09-17 Alan Modra <amodra@bigpond.net.au>
5765
5766 * ecoff.c: Update u.undef.next refs.
5767 * elf64-ppc.c: Likewise.
5768 * elflink.c: Likewise.
5769 * linker.c: Likewise.
5770 * xcofflink.c: Likewise.
5771
5772 * elf-bfd.h (struct elf_link_hash_entry): Rearrange. Add FIXME to
5773 dynamic_def. Combine weakdef and elf_hash_value. Move vtable
5774 fields to indirect struct.
5775 * elf-m10300.c: Update u.weakdef refs.
5776 * elf32-arm.h: Likewise.
5777 * elf32-cris.c: Likewise.
5778 * elf32-frv.c: Likewise.
5779 * elf32-hppa.c: Likewise.
5780 * elf32-i370.c: Likewise.
5781 * elf32-i386.c: Likewise.
5782 * elf32-m32r.c: Likewise.
5783 * elf32-m68k.c: Likewise.
5784 * elf32-ppc.c: Likewise.
5785 * elf32-s390.c: Likewise.
5786 * elf32-sh.c: Likewise.
5787 * elf32-sparc.c: Likewise.
5788 * elf32-vax.c: Likewise.
5789 * elf32-xtensa.c: Likewise.
5790 * elf64-alpha.c: Likewise.
5791 * elf64-hppa.c: Likewise.
5792 * elf64-ppc.c: Likewise.
5793 * elf64-s390.c: Likewise.
5794 * elf64-sh64.c: Likewise.
5795 * elf64-sparc.c: Likewise.
5796 * elf64-x86-64.c: Likewise.
5797 * elfxx-ia64.c: Likewise.
5798 * elfxx-mips.c: Likewise.
5799 * elflink.c: Likewise. Also u.elf_hash_value.
5800 (elf_gc_propagate_vtable_entries_used): Update for h->vtable
5801 indirection.
5802 (elf_gc_smash_unused_vtentry_relocs): Likewise.
5803 (bfd_elf_gc_record_vtinherit): Alloc vtable.
5804 (bfd_elf_gc_record_vtentry): Likewise.
5805 * elf.c (_bfd_elf_link_hash_newfunc): Use memset.
5806
90c0a373
AM
58072004-09-17 Alan Modra <amodra@bigpond.net.au>
5808
5809 * Makefile.am: Run "make dep-am".
5810 * Makefile.in: Regenerate.
5811 * bfd-in2.h: Regenerate.
5812 * po/SRC-POTFILES.in: Regenerate.
5813 * po/bfd.pot: Regenerate.
5814
f5385ebf
AM
58152004-09-16 Alan Modra <amodra@bigpond.net.au>
5816
5817 * elf-bfd.h (struct elf_link_hash_entry): Replace elf_link_hash_flags
5818 with bitfields. Make "type" and "other" bitfields too.
5819 (ELF_LINK_HASH_REF_REGULAR, ELF_LINK_HASH_DEF_REGULAR,
5820 ELF_LINK_HASH_REF_DYNAMIC, ELF_LINK_HASH_DEF_DYNAMIC,
5821 ELF_LINK_HASH_REF_REGULAR_NONWEAK, ELF_LINK_HASH_DYNAMIC_ADJUSTED,
5822 ELF_LINK_HASH_NEEDS_COPY, ELF_LINK_HASH_NEEDS_PLT, ELF_LINK_NON_ELF,
5823 ELF_LINK_HIDDEN, ELF_LINK_FORCED_LOCAL, ELF_LINK_HASH_MARK,
5824 ELF_LINK_NON_GOT_REF, ELF_LINK_DYNAMIC_DEF, ELF_LINK_DYNAMIC_WEAK,
5825 ELF_LINK_POINTER_EQUALITY_NEEDED): Delete.
5826 (ELF_COMMON_DEF_P, WILL_CALL_FINISH_DYNAMIC_SYMBOL): Update.
5827 * elf-hppa.h: Update all uses of elf_link_hash_flags.
5828 * elf-m10300.c: Likewise.
5829 * elf.c: Likewise.
5830 * elf32-arm.h: Likewise.
5831 * elf32-cris.c: Likewise.
5832 * elf32-frv.c: Likewise.
5833 * elf32-hppa.c: Likewise.
5834 * elf32-i370.c: Likewise.
5835 * elf32-i386.c: Likewise.
5836 * elf32-m32r.c: Likewise.
5837 * elf32-m68k.c: Likewise.
5838 * elf32-ppc.c: Likewise.
5839 * elf32-s390.c: Likewise.
5840 * elf32-sh-symbian.c: Likewise.
5841 * elf32-sh.c: Likewise.
5842 * elf32-sh64.c: Likewise.
5843 * elf32-sparc.c: Likewise.
5844 * elf32-vax.c: Likewise.
5845 * elf32-xtensa.c: Likewise.
5846 * elf64-alpha.c: Likewise.
5847 * elf64-hppa.c: Likewise.
5848 * elf64-ppc.c: Likewise.
5849 * elf64-s390.c: Likewise.
5850 * elf64-sh64.c: Likewise.
5851 * elf64-sparc.c: Likewise.
5852 * elf64-x86-64.c: Likewise.
5853 * elflink.c: Likewise.
5854 * elfxx-ia64.c: Likewise.
5855 * elfxx-mips.c: Likewise.
5856 * configure.in (AM_INIT_AUTOMAKE): Set version to 2.15.92.
5857 * configure: Regenerate.
5858 * aclocal.m4: Regenerate.
5859
b6ee372a
AM
58602004-09-16 Alan Modra <amodra@bigpond.net.au>
5861
5862 * elf32-arm.h (elf32_arm_gc_sweep_hook): Add #ifndef OLD_ARM_ABI
5863 around uses of R_ARM_TARGET1.
5864 (elf32_arm_check_relocs): Likewise.
5865
9c504268
PB
58662004-09-13 Paul Brook <paul@codesourcery.com>
5867
5868 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update
5869 prototype.
5870 * bfd-in2.h: Regenerate.
5871 * libbfd.h: Regenerate.
5872 * elf32-arm.h (elf32_arm_link_hash_table): Add target1_is_rel.
5873 (elf32_arm_link_hash_table_create): Set target1_is_rel.
5874 (bfd_elf32_arm_process_before_allocation): Ditto.
5875 (elf32_arm_final_link_relocate): Handle R_ARM_TARGET1.
5876 (elf32_arm_gc_sweep_hook, elf32_arm_check_relocs): Ditto.
5877 * elfarm-nabi.c (elf32_arm_howto_table): Rename RELABS to TARGET1.
5878 * reloc.c: Ditto.
5879
94ea025a
JB
58802004-09-10 Joel Brobecker <brobecker@gnat.com>
5881
5882 * hpux-core.c (thread_section_p): New function.
5883 (hpux_core_core_file_p): Fix computation of offset in call
5884 to bfd_seek. Create a ".reg" section from an arbitrary
5885 ".reg/<id>" section if none was created after having read
5886 all sections.
5887
24443139
AS
58882004-09-11 Andreas Schwab <schwab@suse.de>
5889
5890 * acinclude.m4: Fix spelling of ACX_NONCANONICAL_*.
5891 * aclocal.m4: Rebuild.
5892 * configure: Rebuild.
5893
f4eae89c
JB
58942004-09-10 Joel Brobecker <brobecker@gnat.com>
5895
5896 * section.c (bfd_sections_find_if): Fix parameter name in
5897 comment to match code.
5898
e0638f70
AM
58992004-09-10 Alan Modra <amodra@bigpond.net.au>
5900
5901 * elf.c (assign_file_positions_except_relocs): Assign relocs
5902 stored in a bfd section.
5903
5e0f5ae3
HPN
59042004-09-08 Hans-Peter Nilsson <hp@axis.com>
5905
5906 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Reset
5907 h->gotplt_refcount to 0, not -1.
5908
ada1953e
HPN
59092004-09-07 Hans-Peter Nilsson <hp@axis.com>
5910
5911 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOTPLT,
5912 case R_CRIS_32_GOTPLT>: For internal error message, handle NULL
5913 symname.
5914 (cris_elf_check_relocs) <case R_CRIS_32_PLT_PCREL>: Don't try to
5915 handle symbol visibility here.
5916
ee75fd95
AM
59172004-09-07 Alan Modra <amodra@bigpond.net.au>
5918
5919 * elf64-ppc.c (struct ppc_link_hash_table): Add stub_globals.
5920 (is_ppc64_elf_target): Rename from is_ppc64_target. Update all
5921 callers.
5922 (ppc_stub_name): Remove trailing "+0" on stub name.
5923 (create_linkage_sections): Create relocations for
5924 branch lookup table when --emit-relocs as well as when --shared.
5925 (ppc_build_one_stub): Emit relocs for long branch stubs. Adjust
5926 relbrlt test. For --emit-stub-syms, always output a sym even when
5927 one already exists on a plt call stub. Put stub type in the stub
5928 symbol name.
5929 (ppc_size_one_stub): Size long branch stub relocs. Adjust relbrlt
5930 test.
5931 (ppc64_elf_size_stubs): Count global sym stubs added. Zero
5932 reloc_count in stub sections. Adjust relbrlt test.
5933 (ppc64_elf_build_stubs): Adjust relbrlt test. Tweak stats output.
5934 * elflink.c (bfd_elf_size_dynamic_sections): Fix comment typo.
5935 (elf_link_input_bfd): Ignore symbol index zero relocs when checking
5936 for relocs against discarded symbols. Fix comments.
5937
229fcec5
MM
59382004-09-06 Mark Mitchell <mark@codesourcery.com>
5939
5940 * elf-bfd.h (_bfd_elf_make_dynamic_segment): Declare it.
5941 * elf.c (_bfd_elf_make_dynamic_segment): New function, split out
5942 from ...
5943 (map_sections_to_segments): ... here. Use it. Assign a file
5944 position to the .dynamic section if it is not loadable, but part
5945 of the PT_DYNAMIC segment.
5946 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Use file
5947 offsets, not VMAs, for the BPABI. Do not fill in the header in
5948 the .got.plt section for the BPABI.
5949 * elfarm-nabi.c (elf32_arm_symbian_modify_segment_map): Add a
5950 PT_DYNAMIC segment.
5951 (elf_backend_want_got_plt): Define to zero for Symbian OS.
073a2dc3 5952
9a0789ec
NC
59532004-09-06 Nick Clifton <nickc@redhat.com>
5954
5955 * elflink.c (elf_link_add_object_symbols): Set the error code to
5956 bfd_error_wrong_format when the input format does not match the
5957 output format.
5958
7b53ace3
AM
59592004-09-06 Alan Modra <amodra@bigpond.net.au>
5960
5961 * elf64-ppc.c (is_ppc64_target): New function, extracted from..
5962 (ppc64_elf_check_directives): ..here.
5963 (ppc64_elf_size_dynamic_sections): Use it here to check bfd type
5964 before accessing ppc64_elf_tdata.
5965 (ppc64_elf_finish_dynamic_sections): And here too.
5966
3e540f25
AM
59672004-09-04 Alan Modra <amodra@bigpond.net.au>
5968
5969 * bfd.c (_bfd_default_error_handler): Correct loop exit.
5970
e5a52504
MM
59712004-09-03 Mark Mitchell <mark@codesourcery.com>
5972
5973 * config.bfd (arm*-*-symbianelf*): Use OS-specific target vectors.
5974 * configure.in (bfd_elf32_bigarm_symbian_vec): Add it.
5975 (bfd_elf32_littlearm_symbian_vec): Likewise.
5976 * configure: Regenerated.
5977 * elf-bfd.h (elf_backend_data): Add dynamic_sec_flags.
5978 * elf32-arm.h (PLT_HEADER_SIZE): Do not define.
5979 (PLT_ENTRY_SIZE): Likewise.
5980 (bfd_vma_elf32_arm_symbian_plt_entry): New
5981 variable.
5982 (elf32_arm_link_hash_table): Add plt_header_size, plt_entry_size,
5983 and symbian_p.
5984 (create_got_section): Don't create sections when generating BPABI
5985 objects.
5986 (elf32_arm_create_dynamic_sections): Tidy.
5987 (elf32_arm_link_hash_table_create): Set plt_header_size,
5988 plt_entry_size, and symbian_p.
5989 (elf32_arm_check_relocs): Do not mark .rel.dyn as loadable when
5990 generating BPABI objects.
5991 (allocate_dynrelocs): Use htab->plt_header_size, not
5992 PLT_HEADER_SIZE. Do not add to .got.plt when
5993 generating BPABI objects.
5994 (elf32_arm_finish_dynamic_symbol): Generate Symbian OS PLTs.
5995 * elfarm-nabi.c: Add SymbianOS target vectors.
5996 * elflink.c (_bfd_elf_create_got_section): Use dynamic_sec_flags.
5997 (_bfd_elf_link_create_dynamic_sections): Likewise.
5998 * elfxx-target.h (ELF_DYNAMIC_SEC_FLAGS): New macro.
5999 (elfNN_bed): Use it.
6000 * targets.c (bfd_elf32_bigarm_symbian_vec): New variable.
6001 (bfd_elf32_littlearm_symbian_vec): Likewise.
6002 (_bfd_target_vector): Add them.
6003
6e3b6835
NC
60042004-09-03 Nick Clifton <nickc@redhat.com>
6005
6006 PR 360
6007 * coffcode.h (handle_COMDAT): Replace abort with an warning
6008 message and allow the scan to continue.
6009
595da8c5
AM
60102004-09-02 Alan Modra <amodra@bigpond.net.au>
6011
6012 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Use static_syms passed
6013 in when reading relocs, not our sorted syms. Remove unnecessary
6014 var.
6015
6723a9f4
EB
60162004-08-31 Eric Botcazou <ebotcazou@libertysurf.fr>
6017
6018 * elf.c (special_sections): Add .gnu.linkonce.b modelled on .bss.
6019
5464f5a1
NN
60202004-08-30 Nathanael Nerode <neroden@gcc.gnu.org>
6021
6022 * acinclude.m4: Require AC_CANONICAL_TARGET, not AC_CANONICAL_SYSTEM.
6023 Include ../config/acx.m4 and use ACX_NONCANONICAL_* where appropriate;
6024 replace uses of *_alias with *_noncanonical.
6025 * aclocal.m4: Rebuild with aclocal 1.4p6.
6026 * Makefile.in: Rebuild with automake 1.4p6.
6027 * doc/Makefile.in: Rebuild with automake 1.4p6.
6028 * configure.in: Autoupdate with autoupdate 2.59.
6029 * config.in: Regenerate with autoheader 2.59.
6030 * configure: Regnerate with autoconf 2.59.
6031
a7535cf3
AM
60322004-08-28 Alan Modra <amodra@bigpond.net.au>
6033
6034 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Copy input
6035 symbol pointer arrays before modifying.
6036
c9727e01
AM
60372004-08-28 Alan Modra <amodra@bigpond.net.au>
6038
b91e2ae2 6039 * bfd.c (bfd_get_synthetic_symtab): Pass counts and both symbol tables.
c9727e01
AM
6040 * elf-bfd.h (_bfd_elf_get_synthetic_symtab): Adjust.
6041 * elf.c (_bfd_elf_get_synthetic_symtab): Adjust.
6042 * libbfd-in.h (_bfd_nodynamic_get_synthetic_symtab): Adjust.
b91e2ae2
AM
6043 * targets.c (struct bfd_target <_bfd_get_synthetic_symtab>): Adjust.
6044 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't read symbols.
6045 Use both symbol tables on non-relocatable objects. Use a common
6046 error exit. Fix "mid" warning.
c9727e01
AM
6047 * libbfd.h: Regenerate.
6048 * bfd-in2.h: Regenerate.
6049
699733f6
AM
60502004-08-28 Alan Modra <amodra@bigpond.net.au>
6051
6052 * elf64-ppc.c (ppc64_elf_branch_reloc): Check .opd is in a regular
6053 object file.
6054 (struct sfpr_def_parms): Save some space.
6055 (sfpr_define): Here too.
6056
6057 * elf64-ppc.c (compare_symbols): Put section syms first.
6058 (sym_exists_at): New function.
6059 (ppc64_elf_get_synthetic_symtab): Use relocs to find code entry
6060 points only for relocatable files. Use .opd section contents
6061 otherwise. Generally clean up the code.
6062
deb0e272
AM
60632004-08-27 Alan Modra <amodra@bigpond.net.au>
6064
6065 * elf64-ppc.c (STD_R0_0R1, STD_R0_0R12, LD_R0_0R1, LD_R0_0R12,
6066 LI_R12_0, STVX_VR0_R12_R0, LVX_VR0_R12_R0, MTLR_R0, SFPR_MAX): Define.
6067 (struct sfpr_def_parms): New.
6068 (sfpr_define): New function.
6069 (savegpr0, savegpr0_tail, restgpr0, restgpr0_tail): New functions.
6070 (savegpr1, savegpr1_tail, restgpr1, restgpr1_tail): New functions.
6071 (savefpr, savefpr0_tail, restfpr, restfpr0_tail): New functions.
6072 (savefpr1_tail, restfpr1_tail): New functions.
6073 (savevr, savevr_tail, restvr, restvr_tail): New functions.
6074 (MIN_SAVE_FPR, MAX_SAVE_FPR): Don't define.
6075 (ppc64_elf_func_desc_adjust): Use sfpr_define in place of existing
6076 code. Define all ABI mandated _save and _rest functions.
6077
85a84e7a
PB
60782004-08-26 Paul Brook <paul@codesourcery.com>
6079
deb0e272 6080 * elf32-arm.h (INTERWORK_FLAG): Return true for EABIv3 objects.
85a84e7a 6081
688c58f3
AM
60822004-08-26 Alan Modra <amodra@bigpond.net.au>
6083
6084 * elf32-m32r.c (m32r_elf_relocate_section): Don't compare with
6085 TRUE or FALSE.
6086
3e95eabc
AM
60872004-08-26 Alan Modra <amodra@bigpond.net.au>
6088
6089 * elf32-i386.c (elf_i386_relocate_section): Tweak last change so
6090 that pcrel correction is applied for R_386_PC32.
6091
f855931b
AM
60922004-08-25 Alan Modra <amodra@bigpond.net.au>
6093
6094 * elf32-i386.c (elf_i386_relocate_section): Zero section contents
6095 for R_386_32 and R_386_PC32 relocs against symbols defined in
6096 discarded sections.
6097
b18c562e
NC
60982004-08-25 Dmitry Diky <diwil@spec.ru>
6099
6100 * reloc.c (BFD_RELOC_MSP430_2X_PCREL,BFD_RELOC_MSP430_RL_PCREL):
6101 Add new relocations.
6102 * bfd-in2.h: Regenerate.
f855931b 6103 * libbfd.h: Regenerate.
b18c562e
NC
6104 * elf32-msp430.c: Clean-up code.
6105 (elf_msp430_howto_table): Add new relocation entries.
6106 (bfd_elf32_bfd_reloc_type_lookup): New relocation handlers.
6107 (msp430_elf_relax_section): New function.
6108 (msp430_elf_relax_delete_bytes): New function.
6109 (msp430_elf_symbol_address_p): New function.
6110
af705ba8
NC
61112004-08-24 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
6112
6113 * elf32-m32r.c (m32r_elf_relocate_section): Handle
6114 R_M32R_SDA16_RELA in the same way as R_M32R_SDA16.
6115
ea5158d8
DJ
61162004-08-20 Daniel Jacobowitz <dan@debian.org>
6117
6118 * elflink.c (_bfd_elf_section_already_linked): Handle
6119 SEC_LINK_DUPLICATES_SAME_CONTENTS.
6120
49d934f1
MM
61212004-08-19 Mark Mitchell <mark@codesourcery.com>
6122
6123 * config.bfd (arm*-*-symbianelf*): New target.
6124 (arm*-*-eabi*): Likewise.
6125
039b3fef
AM
61262004-08-19 Alan Modra <amodra@bigpond.net.au>
6127
6128 * elf64-ppc.c (ppc_get_stub_entry): Change third param to a
6129 "struct ppc_link_hash_entry *".
6130 (ppc64_elf_relocate_section): Ditto for type of h. Introduce h_elf
6131 to satisfy RELOC_FOR_GLOBAL_SYMBOL.
6132
3f764659
JJ
61332004-08-19 Jakub Jelinek <jakub@redhat.com>
6134
6135 * elf64-ppc.c (ppc64_elf_edit_opd): Support 16 byte long .opd
6136 entries (where fd_aux overlaps next entry's fd_func).
6137 Add non_overlapping argument, use it.
6138 (ppc64_elf_check_relocs, ppc64_elf_gc_mark_hook, adjust_opd_syms,
6139 ppc64_elf_size_stubs, ppc64_elf_relocate_section,
6140 ppc64_elf_output_symbol_hook): Use address / 8 instead of address / 24
6141 as indexes into opd_sym_map/opd_adjust array.
6142 * elf64-ppc.h (ppc64_elf_edit_opd): Adjust prototype.
6143
c09bdfe5
AM
61442004-08-18 Alan Modra <amodra@bigpond.net.au>
6145
6146 * elf64-ppc.c (func_desc_adjust): Give undefined dot-symbols a value
6147 if we can look up their function descriptor in a regular file.
6148
271d0fc3
NC
61492004-08-18 Nick Clifton <nickc@redhat.com>
6150
6151 PR 324
6152 * cofflink.c (coff_link_add_symbols): Check that the comdat
6153 pointer in the coff_section_data structure has been initialised
6154 before using it.
6155
a010d60f
AM
61562004-08-18 Alan Modra <amodra@bigpond.net.au>
6157
6158 PR 338
6159 * elflink.c (bfd_elf_record_link_assignment): Add comment about
6160 changing bfd_link_hash_undefined to bfd_link_hash_new.
6161
90e3cdf2
JJ
61622004-08-17 Jakub Jelinek <jakub@redhat.com>
6163
6164 * elfxx-target.h (bfd_elfNN_get_synthetic_symtab): Only define
6165 if not yet defined.
6166 * elf64-ppc.c (bfd_elf64_get_synthetic_symtab): Define.
6167 (synthetic_opd, synthetic_relocatable): New variables.
6168 (compare_symbols, compare_relocs): New helper routines.
6169 (ppc64_elf_get_synthetic_symtab): New function.
6170 * bfd.c (bfd_get_synthetic_symtab): Rename dynsyms argument
6171 to relsyms.
6172 * bfd-in2.h: Regenerated.
6173 * elf.c (_bfd_elf_get_synthetic_symtab): Rename dynsyms argument
6174 to relsyms. Return 0 if abfd is relocatable.
6175
7c2c8505
AM
61762004-08-17 Alan Modra <amodra@bigpond.net.au>
6177
6178 * elflink.h (elf_gc_sweep): Keep non-alloc, non-load sections.
6179
0367ecfb
NC
61802004-08-17 Nick Clifton <nickc@redhat.com>
6181
6182 * (is_arm_mapping_symbol_name): New function - return true
6183 when a symbol name matches the requirements for an ARM mapping
6184 symbol name.
6185 (arm_elf_find_function): New function based on
6186 elf_find_function in elf.c but skipping ARM mapping symbols
6187 and including thumb function symbols.
6188 (elf32_arm_find_nearest_line): Use arm_elf_find_function.
6189 (elf32_arm_output_symbol_hook): Use is_arm_mapping_symbol_name.
6190
2441e016
AM
61912004-08-17 Alan Modra <amodra@bigpond.net.au>
6192
6193 * elf64-ppc.c (ppc64_elf_branch_reloc): New function.
6194 (ppc64_elf_howto_raw): Use ppc64_elf_branch_reloc.
6195 (ppc64_elf_brtaken_reloc): Here too.
6196
35b0ce59
AM
61972004-08-17 Alan Modra <amodra@bigpond.net.au>
6198
6199 * elf64-ppc.c (add_symbol_adjust): Correct mismatched function
6200 symbol visibility.
6201 (ppc64_elf_check_directives): Check that we have the right hash
6202 table before proceeding.
6203
81688140
AM
62042004-08-17 Alan Modra <amodra@bigpond.net.au>
6205
6206 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add "deleted_section".
6207 (adjust_opd_syms): Attach opd syms for deleted entries to one of
6208 the sections that will be discarded.
6209
327c1315
AM
62102004-08-16 Alan Modra <amodra@bigpond.net.au>
6211
6212 * elflink.c (elf_section_complain_discarded): Ignore .fixup.
6213
45fc9e4a
AM
62142004-08-16 Alan Modra <amodra@bigpond.net.au>
6215
6216 * bfd.c (_bfd_default_error_handler): Account for doubled '%' in
6217 free space available.
6218
9dadfa79
AM
62192004-08-16 Alan Modra <amodra@bigpond.net.au>
6220
6221 * pdp11.c (struct pdp11_aout_reloc_external): Delete. Replace
f89c4dec 6222 occurrences with bfd_byte * thoughout file.
9dadfa79
AM
6223
6224 * coff-rs6000.c (do_shared_object_padding): Warning fix.
6225 (xcoff_write_armap_big): Likewise.
6226 (xcoff_write_archive_contents_old): Likewise.
6227 (xcoff_write_archive_contents_big): Likewise.
6228
6229 * elf64-mmix.c (mmix_elf_get_section_contents): Delete declaration.
6230
57e8b36a
NC
62312004-08-13 Nick Clifton <nickc@redhat.com>
6232
6233 * elf32-arm.h: Convert to ISO C90.
6234
a005f94e
AM
62352004-08-13 Alan Modra <amodra@bigpond.net.au>
6236
6237 PR 293
6238 * elf32-hppa.c (elf32_hppa_hide_symbol): Use init_refcount to
6239 zero the plt field.
6240
d003868e
AM
62412004-08-13 Alan Modra <amodra@bigpond.net.au>
6242
6243 * bfd.c (_bfd_default_error_handler): Handle %A and %B.
6244 (bfd_archive_filename, bfd_get_section_ident): Delete.
6245 * ecofflink.c (bfd_ecoff_debug_accumulate_other): Don't call
6246 bfd_archive_filename.
6247 * elflink.c (elf_link_input_bfd): Don't use callbacks->error_handler
6248 to warn about symbols in discarded sections. Use _bfd_error_handler.
6249 * aout-adobe.c (aout_adobe_callback): See below.
6250 * aout-cris.c (swap_ext_reloc_in): ..
6251 * coff-arm.c (find_thumb_glue, find_arm_glue,
6252 coff_arm_relocate_section, bfd_arm_process_before_allocation,
6253 coff_arm_merge_private_bfd_data, _bfd_coff_arm_set_private_flags,
6254 coff_arm_copy_private_bfd_data): ..
6255 * coff-i860.c (i860_reloc_processing): ..
6256 * coff-mcore.c (mcore_coff_unsupported_reloc,
6257 coff_mcore_relocate_section): ..
6258 * coff-ppc.c (coff_ppc_relocate_section): ..
6259 * coff-rs6000.c (xcoff_create_csect_from_smclas
6260 * coff-sh.c (sh_relax_section, sh_relax_delete_bytes,
6261 sh_swap_insns, sh_relocate_section): ..
6262 * coff-tic54x.c (tic54x_reloc_processing): ..
6263 * coff-tic80.c (coff_tic80_relocate_section): ..
6264 * coff64-rs6000.c (xcoff64_create_csect_from_smclas): ..
6265 * coffcode.h (styp_to_sec_flags, coff_slurp_line_table,
6266 coff_slurp_symbol_table, coff_classify_symbol,
6267 coff_slurp_reloc_table): ..
6268 * coffgen.c (_bfd_coff_read_string_table): ..
6269 * cofflink.c (coff_link_add_symbols, _bfd_coff_link_input_bfd,
6270 _bfd_coff_generic_relocate_section): ..
6271 * cpu-arm.c (bfd_arm_merge_machines): ..
6272 * cpu-sh.c (sh_merge_bfd_arch): ..
6273 * elf-hppa.h (elf_hppa_relocate_section): ..
6274 * elf.c (bfd_elf_string_from_elf_section, setup_group,
6275 _bfd_elf_setup_group_pointers, bfd_section_from_shdr,
6276 assign_section_numbers, _bfd_elf_symbol_from_bfd_symbol,
6277 copy_private_bfd_data, _bfd_elf_validate_reloc): ..
6278 * elf32-arm.h (find_thumb_glue, find_arm_glue,
6279 bfd_elf32_arm_process_before_allocation, elf32_thumb_to_arm_stub,
6280 elf32_arm_to_thumb_stub, elf32_arm_final_link_relocate,
6281 elf32_arm_relocate_section, elf32_arm_set_private_flags,
6282 elf32_arm_copy_private_bfd_data, elf32_arm_merge_private_bfd_data): ..
6283 * elf32-cris.c (cris_elf_relocate_section, cris_elf_check_relocs,
6284 cris_elf_merge_private_bfd_data
6285 * elf32-frv.c (elf32_frv_relocate_section, elf32_frv_check_relocs): ..
6286 * elf32-gen.c (elf32_generic_link_add_symbols): ..
6287 * elf32-hppa.c (hppa_add_stub, hppa_build_one_stub,
6288 elf32_hppa_check_relocs, get_local_syms, final_link_relocate,
6289 elf32_hppa_relocate_section): ..
6290 * elf32-i370.c (i370_elf_merge_private_bfd_data,
6291 i370_elf_check_relocs, i370_elf_relocate_section): ..
6292 * elf32-i386.c (elf_i386_info_to_howto_rel, elf_i386_check_relocs,
6293 elf_i386_relocate_section): ..
6294 * elf32-m32r.c (m32r_elf_relocate_section,
6295 m32r_elf_merge_private_bfd_data): ..
6296 * elf32-m68hc1x.c (m68hc12_add_stub,
6297 _bfd_m68hc11_elf_merge_private_bfd_data): ..
6298 * elf32-m68k.c (elf_m68k_relocate_section): ..
6299 * elf32-mcore.c (mcore_elf_unsupported_reloc,
6300 mcore_elf_relocate_section): ..
6301 * elf32-ppc.c (ppc_elf_merge_private_bfd_data, bad_shared_reloc,
6302 ppc_elf_check_relocs, ppc_elf_relocate_section,
6303 ppc_elf_begin_write_processing): ..
6304 * elf32-s390.c (elf_s390_check_relocs, invalid_tls_insn,
6305 elf_s390_relocate_section): ..
6306 * elf32-sh-symbian.c (sh_symbian_import_as,
6307 sh_symbian_process_embedded_commands,
6308 sh_symbian_relocate_section): ..
6309 * elf32-sh.c (sh_elf_relax_section, sh_elf_relax_delete_bytes,
6310 sh_elf_swap_insns, sh_elf_relocate_section, sh_elf_check_relocs,
6311 sh_elf_merge_private_data): ..
6312 * elf32-sparc.c (elf32_sparc_check_relocs,
6313 elf32_sparc_relocate_section,
6314 elf32_sparc_merge_private_bfd_data): ..
6315 * elf32-v850.c (v850_elf_check_relocs,
6316 v850_elf_merge_private_bfd_data): ..
6317 * elf32-xtensa.c (elf_xtensa_check_relocs,
6318 elf_xtensa_relocate_section, elf_xtensa_merge_private_bfd_data): ..
6319 * elf64-alpha.c (elf64_alpha_relax_with_lituse,
6320 elf64_alpha_relax_got_load, elf64_alpha_size_got_sections,
6321 elf64_alpha_relocate_section_r, elf64_alpha_relocate_section): ..
6322 * elf64-gen.c (elf64_generic_link_add_symbols): ..
6323 * elf64-ppc.c (ppc64_elf_merge_private_bfd_data, ppc_add_stub,
6324 ppc64_elf_check_relocs, ppc64_elf_edit_opd,
6325 ppc64_elf_relocate_section): ..
6326 * elf64-s390.c (elf_s390_check_relocs, invalid_tls_insn,
6327 elf_s390_relocate_section): ..
6328 * elf64-sh64.c (sh_elf64_relocate_section): ..
6329 * elf64-sparc.c (sparc64_elf_check_relocs,
6330 sparc64_elf_add_symbol_hook, sparc64_elf_relocate_section,
6331 sparc64_elf_merge_private_bfd_data): ..
6332 * elf64-x86-64.c (elf64_x86_64_check_relocs,
6333 elf64_x86_64_relocate_section): ..
6334 * elflink.c (_bfd_elf_add_default_symbol,
6335 _bfd_elf_link_assign_sym_version, elf_link_read_relocs_from_section,
6336 _bfd_elf_link_output_relocs, elf_link_add_object_symbols,
6337 bfd_elf_size_dynamic_sections, elf_link_output_extsym,
6338 elf_get_linked_section_vma, elf_fixup_link_order,
6339 bfd_elf_final_link, bfd_elf_gc_record_vtinherit,
6340 bfd_elf_gc_record_vtinherit, _bfd_elf_section_already_linked): ..
6341 * elfxx-ia64.c (elfNN_ia64_relax_section,
6342 elfNN_ia64_relocate_section, elfNN_ia64_merge_private_bfd_data): ..
6343 * elfxx-mips.c (mips_elf_perform_relocation,
6344 _bfd_mips_elf_check_relocs,
6345 _bfd_mips_elf_merge_private_bfd_data): ..
6346 * ieee.c (ieee_slurp_external_symbols): ..
6347 * ihex.c (ihex_bad_byte, ihex_scan, ihex_read_section): ..
6348 * libbfd.c (_bfd_generic_verify_endian_match): ..
6349 * linker.c (_bfd_generic_link_add_one_symbol,
6350 _bfd_generic_section_already_linked): ..
6351 * pdp11.c (translate_to_native_sym_flags): ..
6352 * pe-mips.c (coff_pe_mips_relocate_section): ..
6353 * peicode.h (pe_ILF_build_a_bfd): ..
6354 * srec.c (srec_bad_byte): ..
6355 * stabs.c (_bfd_link_section_stabs): ..
6356 * xcofflink.c (xcoff_link_add_symbols, xcoff_link_input_bfd): ..
6357 Replace all uses of bfd_archive_filename and bfd_get_section_ident
6358 with corresponding %B and %A in _bfd_error_handler format string.
6359 Replace occurrences of "fprintf (stderr," with _bfd_error_handler
6360 calls to use %A and %B. Fix "against symbol .. from section" and
6361 similar error messages. Combine multiple _bfd_error_handler calls
6362 where they were separated due to bfd_archive_filename deficiencies.
6363 * bfd-in2.h: Regenerate.
6364
6ba842b6
L
63652004-08-12 H.J. Lu <hongjiu.lu@intel.com>
6366
6367 * elf32-i386.c (elf_i386_relocate_section): Report unrecognized
6368 relocation.
6369
99877b66
AM
63702004-08-10 Alan Modra <amodra@bigpond.net.au>
6371
6372 * elf64-ppc.c (struct ppc_link_hash_entry): Add was_undefined.
6373 (struct ppc_link_hash_table): Remove no_multi_toc, multi_toc_needed.
6374 Make emit_stub_syms, stub_error and has_14bit_branch bit-fields.
6375 Add twiddled_syms.
6376 (link_hash_newfunc): Init was_undefined.
6377 (add_symbol_adjust): Don't set undefined dot symbols to defweak;
6378 Use undefweak instead.
6379 (ppc64_elf_check_directives): Fix undefs chain.
6380 (ppc64_elf_next_toc_section): Remove no_multi_toc and multi_toc_needed
6381 references.
6382 (ppc64_elf_size_stubs): Adjust for add_symbol_adjust change.
6383 (undo_symbol_twiddle, ppc64_elf_restore_symbols): New functions.
6384 * elf64-ppc.h (ppc64_elf_restore_symbols): Declare.
6385
ba3bee0b
JJ
63862004-08-09 Jakub Jelinek <jakub@redhat.com>
6387
6388 * elf64-x86-64.c (elf64_x86_64_relocate_section): For -fno-pic
6389 error, test input_section flags rather than sec.
6390
8387904d
AM
63912004-08-09 Alan Modra <amodra@bigpond.net.au>
6392
6393 * elf-bfd.h (struct elf_backend_data): Add
6394 elf_backend_archive_symbol_lookup.
6395 (_bfd_elf_archive_symbol_lookup): Declare.
6396 * elflink.c (_bfd_elf_archive_symbol_lookup): New function..
6397 (elf_link_add_archive_symbols): ..extracted from here. Call the
6398 backend version.
6399 * elfxx-target.h (elf_backend_archive_symbol_lookup): Provide default.
6400 (elfNN_bed): Init new field.
6401 * elf64-ppc.c (elf_backend_check_directives): Define.
6402 (elf_backend_archive_symbol_lookup): Define.
6403 (struct ppc_link_hash_table): Add tls_get_add_fd. Make tls_get_add
6404 a ppc_link_hash_entry pointer.
6405 (get_fdh): Move.
6406 (ppc64_elf_archive_symbol_lookup, opd_entry_value): New functions.
6407 (add_symbol_adjust, ppc64_elf_check_directives): New functions.
6408 (ppc64_elf_check_relocs, ppc64_elf_gc_mark_hook, func_desc_adjust,
6409 ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup,
6410 ppc64_elf_tls_optimize, allocate_dynrelocs, ppc_type_of_stub,
6411 ppc_build_one_stub, ppc64_elf_size_stubs, ppc64_elf_relocate_section,
6412 ppc64_elf_finish_dynamic_symbol): Handle branch relocs to function
6413 descriptor symbols.
6414
b25116a9
AM
64152004-08-09 Alan Modra <amodra@bigpond.net.au>
6416
8843416a
AM
6417 * elf64-ppc.c (struct ppc_link_hash_entry): Expand adjust_done comment.
6418 (ppc64_elf_add_symbol_hook): Test for NULL section.
6419 (get_sym_h): Formatting.
6420 (ppc64_elf_size_stubs): Include reloc addend in value stored as
6421 stub target_value.
6422
b25116a9
AM
6423 * elf64-ppc.c (ppc64_elf_relocate_section): Combine handling of
6424 long branch stubs with code handling plt and r2off branch stubs.
6425
ccfa59ea
AM
64262004-08-09 Alan Modra <amodra@bigpond.net.au>
6427
6428 * elf-bfd.h (_bfd_elf_gc_mark): Declare.
6429 * elflink.c (elf_link_input_bfd): Formatting.
6430 (_bfd_elf_gc_mark): Rename from elf_gc_mark and make global. Adjust
6431 all callers.
6432 * elf64-ppc.c (struct ppc_link_hash_entry): Remove is_entry.
6433 (link_hash_newfunc): Don't set it.
6434 (ppc64_elf_copy_indirect_symbol): Nor copy it.
6435 (ppc64_elf_mark_entry_syms): Delete.
6436 (ppc64_elf_gc_mark_hook): Mark entry syms here. Also mark opd
6437 sections. Use get_opd_info.
6438 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Delete.
6439
4025353c
AM
64402004-08-09 Alan Modra <amodra@bigpond.net.au>
6441
4f800a42
AM
6442 * elf64-ppc.c (adjust_opd_syms): Fix merge error.
6443
06da1e8e
AM
6444 * elf64-ppc.c (struct ppc_link_hash_table): Remove have_undefweak.
6445 (func_desc_adjust): Don't set have_undefweak.
6446 (ppc64_elf_func_desc_adjust): Don't add an extr nop to sfpr.
6447 (ppc64_elf_relocate_section): NOP out calls to undefweak functions.
6448
34814b9f
AM
6449 * elf64-ppc.c (struct ppc_link_hash_entry): Make "oh" a
6450 "struct ppc_link_hash_entry *". Adjust all references.
6451 (ppc64_elf_hide_symbol): Correct a comment.
6452
4025353c
AM
6453 * elf64-ppc.c (get_opd_info): New function.
6454 (adjust_opd_syms): Use get_opd_info. Define removed symbols as zero.
6455 (ppc64_elf_edit_opd): Use get_opd_info. Check that sym has a dot
6456 before calling get_fdh. Test fdh rather than h before dereferencing
6457 fdh. Mark removed symbols in opd_adjust.
6458 (ppc64_elf_tls_optimize): Don't bother with opd adjustment here.
6459 (ppc64_elf_relocate_section): Use get_opd_info, and handle removed
6460 opd symbols.
6461 (ppc64_elf_output_symbol_hook): Likewise.
6462
db6579d4
PB
64632004-08-06 Paul Brook <paul@codesourcery.com>
6464
6465 * elfarm-nabi.c (elf32_arm_howto_table): Add new EABI relocations.
6466 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_RELABS32,
6467 BFD_RELOC_ARM_ROSEGREL32 and BFD_RELOC_ARM_SBREL32.
6468 * reloc.c: Add BFD_RELOC_ARM_RELABS32, BFD_RELOC_ARM_ROSEGREL32
6469 and BFD_RELOC_ARM_SBREL32.
6470 * bfd-in2.h, bbfd.h: Regenerate.
6471
a4d0f181
TS
64722004-08-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6473
6474 * elfxx-mips.c (mips_elf_calculate_relocation): Test only for
6475 the dynamic link symbol actually in use.
6476
83774818
SC
64772004-08-01 Stephane Carrez <stcarrez@nerim.fr>
6478
6479 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Handle bfd_link_hash_new
6480
a4d0f181 64812004-07-31 Joel Brobecker <brobecker@gnat.com>
00b4930b
TS
6482 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6483
6484 * elfxx-mips.c (_bfd_mips_elf_symbol_processing): Handle
6485 SHN_MIPS_TEXT and SHN_MIPS_DATA.
6486
185d09ad
L
64872004-07-30 H.J. Lu <hongjiu.lu@intel.com>
6488 Nick Clifton <nickc@redhat.com>
6489
6490 PR 290
6491 * bfd.c (_bfd_default_error_handler): Make it global.
6492
6493 * elf-bfd.h (elf_backend_data): Add link_order_error_handler.
6494
6495 * elf.c (assign_section_numbers): Cope gracefully with sections
6496 which have SHF_LINK_ORDER set but no sh_link set up.
6497 * elflink.c (elf_get_linked_section_vma): Likewise.
6498
6499 * elfxx-ia64.c (elf_backend_link_order_error_handler): New. Set
6500 it to NULL.
6501
6502 * elfxx-target.h (elf_backend_link_order_error_handler): New.
6503 Set it to _bfd_default_error_handler.
6504 (elfNN_bed): Add elf_backend_link_order_error_handler.
6505
6506 * libbfd-in.h (_bfd_default_error_handler): New.
6507
6508 * libbfd.h: Regenerated.
6509
7946e94a
JJ
65102004-07-30 Jakub Jelinek <jakub@redhat.com>
6511
6512 * archures.c (bfd_mach_sparc_64bit_p): Define.
6513 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Use it.
6514 * bfd-in2.h: Rebuilt.
6515
1d70c7fb
AO
65162004-07-29 Alexandre Oliva <aoliva@redhat.com>
6517
6518 Introduce SH2a support.
6519 2004-02-18 Corinna Vinschen <vinschen@redhat.com>
6520 * archures.c (bfd_mach_sh2a_nofpu): New.
6521 * bfd-in2.h: Rebuilt.
6522 * cpu-sh.c (SH2A_NOFPU_NEXT): New.
6523 (arch_info_struct): Add sh2a_nofpu.
6524 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle sh2a_nofpu.
6525 2003-12-29 DJ Delorie <dj@redhat.com>
6526 * reloc.c: Add relocs for sh2a.
6527 * bfd-in2.h: Regenerate.
6528 * libbfd.hh: Regenerate.
6529 2003-12-01 Michael Snyder <msnyder@redhat.com>
6530 * archures.c (bfd_mach_sh2a): New.
6531 * bfd-in2.h: Rebuilt.
6532 * cpu-sh.c (SH_NEXT, SH2_NEXT, etc.): Change defines to enums.
6533 (SH2A_NEXT): New.
6534 (arch_info_struct): Add sh2a.
6535 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle sh2a.
6536
404ed0cf
DA
65372004-07-28 Nick Clifton <nickc@redhat.com>
6538 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
6539
6540 PR 273
6541 * som.c (setup_sections): Improve estimation of space sizes in
6542 relocatable objects.
6543
225247f0
JT
65442004-07-27 Jason Thorpe <thorpej@wasabisystems.com>
6545 * config.bfd (hppa*-*-netbsd*): Set targ_defvec to
6546 bfd_elf32_hppa_nbsd_vec. Add bfd_elf32_hppa_linux_vec
6547 to targ_selvecs.
6548 * configure.in (bfd_elf32_hppa_nbsd_vec): Add case.
6549 * configure: Regenerate.
6550 * elf32-hppa.c (elf32_hppa_object_p): Add "elf32-hppa-netbsd"
6551 case that accepts OSABI=NetBSD and OSABI=SysV.
6552 (elf32_hppa_set_gp): For "elf32-hppa-netbsd", set the GP to
6553 the base of .got or .data (if .got does not exist).
6554 (elf32_hppa_post_process_headers): For elf32-hppa-netbsd,
6555 set OSABI=NetBSD.
6556 (TARGET_BIG_SYM): Add bfd_elf32_hppa_nbsd_vec case.
6557 (TARGET_BIG_NAME): Add "elf32-hppa-netbsd" case.
6558 * targets.c (bfd_elf32_hppa_nbsd_vec): Add extern declaration.
6559 (_bfd_target_vector): Add bfd_elf32_hppa_nbsd_vec.
6560
3d7f7666
L
65612004-07-27 H.J. Lu <hongjiu.lu@intel.com>
6562
6563 PR 161/251
6564 * elf-bfd.h (bfd_elf_section_data): Add sec_group.
6565 (elf_sec_group): Defined.
6566 (bfd_elf_match_symbols_in_sections): New prototype.
6567 (_bfd_elf_setup_group_pointers): Likewise.
6568
6569 * elf.c (bfd_elf_discard_group): Abort.
6570 (bfd_elf_set_group_contents): Also include relocation sections.
6571 Remove zero-fill for ld -r.
6572 (_bfd_elf_setup_group_pointers): New function.
6573 (elf_sort_elf_symbol): Likewise.
6574 (elf_sym_name_compare): Likewise.
6575 (bfd_elf_match_symbols_in_sections): Likewise.
6576
6577 * elfcode.h (elf_object_p): Call _bfd_elf_setup_group_pointers.
6578
6579 * elflink.c (match_group_member): New.
6580 (elf_link_input_bfd): Check group member for discarded section.
6581 (try_match_symbols_in_sections): New function.
6582 (already_linked): Likewise.
6583 (_bfd_elf_section_already_linked): Support mixing comdat group
6584 and linkonce section.
6585
6586 * libbfd-in.h (bfd_section_already_linked_table_traverse): New.
6587 * linker.c (bfd_section_already_linked_table_traverse): New.
6588
6589 * libbfd.h: Regenerated.
6590
670ec21d
NC
65912004-07-27 Tomer Levi <Tomer.Levi@nsc.com>
6592
6593 * reloc.c: Add BFD_RELOC_CRX_SWITCH8, BFD_RELOC_CRX_SWITCH16,
6594 BFD_RELOC_CRX_SWITCH32.
6595 * bfd-in2.h: Regenerate.
6cd7f07e 6596 * libbfd.h: Regenerate.
670ec21d
NC
6597 * elf32-crx.c: Support relocation/relaxation of
6598 BFD_RELOC_CRX_SWITCH* types.
6599
2c66dc6c
AM
66002004-07-27 Alan Modra <amodra@bigpond.net.au>
6601
6602 * elf64-ppc.c: Correct "Linker stubs" comment.
6603
38ce5b11
L
66042004-07-26 H.J. Lu <hongjiu.lu@intel.com>
6605
6606 * elf-bfd.h (bfd_elf_section_data): Add a pointer for the
6607 linked-to section.
6608 (elf_linked_to_section): New.
6609
6610 * elf.c (assign_section_numbers): Set up sh_link for
6611 SHF_LINK_ORDER.
6612
6613 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set sh_info
6614 to sh_link for SHT_IA_64_UNWIND sections.
6615
65da361f
L
66162004-07-22 H.J. Lu <hongjiu.lu@intel.com>
6617
6618 * elflink.c (elf_fixup_link_order): Add _() to error message.
6619
08ccf96b
L
66202004-07-22 H.J. Lu <hongjiu.lu@intel.com>
6621
6622 * elflink.c (elf_fixup_link_order): Issue a warning and flag
6623 an error if failed.
6624
082b7297
L
66252004-07-21 H.J. Lu <hongjiu.lu@intel.com>
6626
6627 * aout-adobe.c (aout_32_section_already_linked): Defined.
6628 * aout-target.h (MY_section_already_linked): Likewise.
6629 * aout-tic30.c (MY_section_already_linked): Likewise.
6630 * binary.c (binary_section_already_linked): Likewise.
6631 * bout.c (b_out_section_already_linked): Likewise.
6632 * coff-alpha.c (_bfd_ecoff_section_already_linked): Likewise.
6633 * coff-mips.c (_bfd_ecoff_section_already_linked): Likewise.
6634 * coffcode.h (coff_section_already_linked): Likewise.
6635 * i386msdos.c (msdos_section_already_linked): Likewise.
6636 * i386os9k.c (os9k_section_already_linked): Likewise.
6637 * ieee.c (ieee_section_already_linked): Likewise.
6638 * ihex.c (ihex_section_already_linked): Likewise.
6639 * mach-o.c (bfd_mach_o_section_already_linked): Likewise.
6640 * mmo.c (mmo_section_already_linked): Likewise.
6641 * nlm-target.h (nlm_section_already_linked): Likewise.
6642 * oasys.c (oasys_section_already_linked): Likewise.
6643 * pef.c (bfd_pef_section_already_linked): Likewise.
6644 * ppcboot.c (ppcboot_section_already_linked): Likewise.
6645 * som.c (som_bfd_discard_group): Likewise.
6646 * srec.c (srec_section_already_linked): Likewise.
6647 * tekhex.c (tekhex_section_already_linked): Likewise.
6648 * versados.c (versados_section_already_linked): Likewise.
6649 * vms.c (vms_section_already_linked): Likewise.
6650 * coff-target.h (_bfd_xcoff_section_already_linked): Likewise.
6651 * xsym.c (bfd_sym_section_already_linked): Likewise.
6652
6653 * bfd-in.h (bfd_section_already_linked_table_init): New.
6654 (bfd_section_already_linked_table_free): Likewise.
6655
6656 * coff-rs6000.c (rs6000coff_vec): Add
6657 _bfd_generic_section_already_linked.
6658 (pmac_xcoff_vec): Likewise.
6659 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
6660 (aix5coff64_vec): Likewise.
6661
6662 * elf-bfd.h (_bfd_elf_section_already_linked): New prototype.
6663 * elflink.c (_bfd_elf_section_already_linked): New function.
6664
6665 * elfxx-target.h (bfd_elfNN_section_already_linked): Defined.
6666
6667 * libbfd-in.h (_bfd_nolink_section_already_linked): Defined.
6668 (_bfd_generic_section_already_linked): New.
6669 (bfd_section_already_linked_hash_entry): Likewise.
6670 (bfd_section_already_linked): Likewise.
6671 (bfd_section_already_linked_table_lookup): Likewise.
6672 (bfd_section_already_linked_table_insert): Likewise.
6673
6674 * linker.c (bfd_section_already_linked): New.
6675 (_bfd_section_already_linked_table): Likewise.
6676 (bfd_section_already_linked_table_lookup): Likewise.
6677 (bfd_section_already_linked_table_insert): Likewise.
6678 (already_linked_newfunc): Likewise.
6679 (bfd_section_already_linked_table_init): Likewise.
6680 (bfd_section_already_linked_table_free): Likewise.
6681 (_bfd_generic_section_already_linked): Likewise.
6682
6683 * section.c (bfd_section): Remove comdat.
6684 (bfd_comdat_info): Moved to ...
6685 * bfd-in.h (coff_comdat_info): Here.
6686 (bfd_coff_get_comdat_section): New.
6687 * coffgen.c (bfd_coff_get_comdat_section): Likewise.
6688 * libcoff-in.h (coff_section_tdata): Add comdat.
6689 * coffcode.h (handle_COMDAT): Updated.
6690 * cofflink.c (coff_link_add_symbols): Likewise.
6691 * ecoff.c (bfd_debug_section): Likewise.
6692
6693 * targets.c (bfd_target): Add _section_already_linked.
6694 (BFD_JUMP_TABLE_LINK): Updated.
6695
6696 * bfd-in2.h: Regenerated.
6697 * libbfd.h: Likewise.
6698 * libcoff.h: Likewise.
6699
0b52efa6
PB
67002003-07-21 Paul Brook <paul@codesourcery.com>
6701
6702 * elflink.c (elf_get_linked_section_vma, compare_link_order,
6703 elf_fixup_link_order): New functions.
6704 (bfd_elf_final_link): Call elf_fixup_link_order.
6705
7e2294f9
AO
67062004-07-21 Alexandre Oliva <aoliva@redhat.com>
6707
6708 * elf-bfd.h (ELF_COMMON_DEF_P): New.
6709 * elflink.c (_bfd_elf_symbol_refs_local_p): Use it to handle
6710 common definitions.
6711 * elf-m10300.c: Use SYMBOL_REFERENCES_LOCAL instead of
6712 _bfd_elf_symbol_refs_local_p.
6713 * elf32-frv.c (FRVFDPIC_SYM_LOCAL): Remove hack for common
6714 symbols.
6715
e56f61be
L
67162004-07-19 H.J. Lu <hongjiu.lu@intel.com>
6717
6718 * bfd-in.h (dynamic_lib_link_class): Add DYN_NO_ADD_NEEDED and
6719 DYN_NO_NEEDED.
6720 (bfd_elf_get_dyn_lib_class): New prototype.
6721 * elf.c (bfd_elf_get_dyn_lib_class): New function.
6722
6723 * elflink.c (elf_link_add_object_symbols): Check DYN_AS_NEEDED,
6724 DYN_DT_NEEDED and DYN_NO_NEEDED bits to see if a DT_NEEDED
6725 entry is needed. Issue an error if a DT_NEEDED entry is needed
6726 for a file marked DYN_NO_NEEDED.
6727 (elf_link_check_versioned_symbol): Check the DYN_DT_NEEDED bit
6728 for DT_NEEDED tags.
6729
6730 * bfd-in2.h: Regenerated.
6731
27b56da8
DA
67322004-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
6733
6734 * elflink.c (elf_section_complain_discarded): Don't complain in
6735 .PARISC.unwind.
6736
bbb268c3
JW
67372004-07-10 James E Wilson <wilson@specifixinc.com>
6738
6739 * elfxx-ia64.c (elfNN_ia64_relax_ldxmov): Remove abfd parameter.
6740 (elfNN_ia64_install_value, elfNN_ia64_relax_brl): Likewise.
6741 (elfNN_ia64_relax_section, elfNN_ia64_relocate_section,
6742 elfNN_ia64_finish_dynamic_symbol, elfNN_ia64_finish_dynamic_sections):
6743 Fix callers.
6744 (elfNN_ia64_relax_brl): Change bfd_get_64 to bfd_getl64. Change
6745 bfd_put_64 to bfd_putl64.
6746 (elfNN_ia64_relax_ldxmov, elfNN_ia64_install_value): Likewise.
2c66dc6c 6747
e525914f
L
67482004-07-09 H.J. Lu <hongjiu.lu@intel.com>
6749
6750 PR 240
6751 * elfxx-ia64.c (elfNN_ia64_relax_section): Only warn br in
6752 .init/.fini sections when trying to relax it.
6753
b1a6d0b1
NC
67542004-07-09 Jie Zhang <zhangjie@magima.com.cn>
6755
6756 * elf.c (assign_file_positions_for_segments): Make sure the
6757 .dynamic section is the first section in the PT_DYNAMIC segment.
6758
1a320fbb
NC
67592004-07-09 Nick Clifton <nickc@redhat.com>
6760
6761 * config.bfd: Change sh-sybmian-elf to sh-*-symbianelf.
6762 * elf32-sh-symbian.c: Rename the sh_find_elf_flags and
6763 sh_elf_get_flags_from_mach functions so that they do not conflict
6764 when this target is built with other sh-elf targets.
6765 * elf32-sh.c (sh_elf_get_flags_from_mach): Remove bogus
6766 suppression of this function.
6767 (sh_elf_find_flags): Likewise.
6768
1fe1f39c
NC
67692004-07-07 Tomer Levi <Tomer.Levi@nsc.com>
6770
6771 * Makefile.am (ALL_MACHINES): Add cpu-crx.lo.
6772 (ALL_MACHINES_CFILES): Add cpu-crx.c.
6773 (BFD32_BACKENDS): Add elf32-crx.lo.
6774 (BFD32_BACKENDS_CFILES): Add elf32-crx.c.
6775 (cpu-crx.lo): New target.
6776 (elf32-crx.lo): New target.
6777 * Makefile.in: Regenerate.
6778 * archures.c (bfd_architecture): Add bfd_{arch,mach}_crx.
6779 (bfd_archures_list): Add bfd_crx_arch.
6780 * bfd-in2.h: Regenerate.
6781 * config.bfd: Handle crx-*-elf*, crx*.
6782 * configure.in: Handle bfd_elf32_crx_vec.
6783 * configure: Regenerate.
6784 * cpu-crx.c: New file.
6785 * elf32-crx.c: Likewise.
6786 * libbfd.h: Regenerate.
6787 * reloc.c: Add BFD_RELOC_CRX_REL4, BFD_RELOC_CRX_REL8,
6788 BFD_RELOC_CRX_REL8_CMP, BFD_RELOC_CRX_REL16, BFD_RELOC_CRX_REL24,
6789 BFD_RELOC_CRX_REL32, BFD_RELOC_CRX_REGREL12, BFD_RELOC_CRX_REGREL22,
6790 BFD_RELOC_CRX_REGREL28, BFD_RELOC_CRX_REGREL32, BFD_RELOC_CRX_ABS16,
6791 BFD_RELOC_CRX_ABS32, BFD_RELOC_CRX_NUM8, BFD_RELOC_CRX_NUM16,
6792 BFD_RELOC_CRX_NUM32, BFD_RELOC_CRX_IMM16 and BFD_RELOC_CRX_IMM32
6793 * targets.c (bfd_elf32_crx_vec): Declare.
6794 (bfd_target_vector): Add bfd_elf32_crx_vec.
6795
85fbca6a
NC
67962004-07-06 Nick Clifton <nickc@redhat.com>
6797
6798 * config.bfd: Add sh-symbian-elf target.
6799 * configure.in: Add bfd_elf32_shl_symbian_vec.
6800 * configure: Regenerate.
6801 * elf-bfd.h (struct elf_backend_data): Add new field
6802 'check_directives'.
1fe1f39c 6803 * elflink.c (elf_link_add_object_symbols): Invoke the
85fbca6a 6804 check_directives function, if defined.
1fe1f39c 6805 * elfxx-target.h: Provide a default, NULL definition for
85fbca6a 6806 check_directives.
1fe1f39c
NC
6807 * targets.c: Add bfd_elf32_shl_symbian_vec.
6808 * elf32-sh.c (sh_elf_swap_insns): Protect against unnecessary
85fbca6a 6809 definition.
1fe1f39c 6810 (elf32_shlin_grok_prstatus, elf32_shlib_grok_psinfo,
85fbca6a 6811 * sh_elf_get_flags_from_mach, sh_elf_find_flags): Likewise.
1fe1f39c 6812 (TARGET_BIG_SYM, TARGET_LITTLE_SYM): Only define if they have
85fbca6a 6813 not already been defined.
1fe1f39c
NC
6814 * elf32-sh64.c: Use SH_TARGET_ALREADY_DEFINED.
6815 * sh-symbian.c: New file. Provide functions to support the
85fbca6a
NC
6816 * sh-symbian-elf target.
6817 * Makefile.am: Add elf32-sh-symbian.c
6818 * Makefile.in: Regenerate.
1fe1f39c 6819
871ec896
JR
68202004-07-05 Andrew Stubbs <andrew.stubbs@superh.com>
6821
1fe1f39c
NC
6822 * elf32-sh.c: Include ../opcodes/sh-opc.h.
6823 * Makefile.am: Ran make dep-am.
6824 * Makefile.in: Ran make dep-in.
871ec896 6825
c87db184
CF
68262004-07-03 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
6827
6828 * cofflink.c (_bfd_coff_generic_relocate_section): Resolve PE weak
6829 externals properly.
6830
06f2f6af
MS
68312004-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
6832
6833 * config.bfd: Add want64 to configuration target s390-*-linux*.
6834
b602c853
L
68352004-07-01 H.J. Lu <hongjiu.lu@intel.com>
6836
6837 * bfd.c (bfd_get_section_ident): New.
6838
6839 * elflink.c (elf_link_read_relocs_from_section): Call
6840 bfd_get_section_ident to identify the section when reporting
6841 error.
6842 (_bfd_elf_link_output_relocs): Likewise.
6843 (elf_link_output_extsym): Likewise.
6844 (elf_link_input_bfd): Likewise.
6845 (bfd_elf_gc_record_vtinherit): Likewise.
6846
6847 * bfd-in2.h: Regenerated.
6848
7a2a6943
NC
68492004-07-01 Jie Zhang <zhangjie@magima.com.cn>
6850 Nick Clifton <nickc@redhat.com>
6851
6852 PR 204
6853 * elfxx-mips.c (_bfd_mips_elf_final_link): Pass the correct number
6854 of section symbols to mips_elf_sort_hash_table ().
6855
cdd3575c
AM
68562004-07-01 Alan Modra <amodra@bigpond.net.au>
6857
6858 * elflink.c (elf_section_ignore_discarded_relocs): Revert last
6859 change. Comment.
6860 (elf_section_complain_discarded): New function. Handle
6861 .gcc_except_table too.
6862 (elf_link_input_bfd): Rewrite handling of relocs against symbols
6863 in discarded sections.
6864 * elf-bfd.h (elf_discarded_section): Protect macro arg.
6865
21a8f7fa
JW
68662004-06-30 James E Wilson <wilson@specifixinc.com>
6867
6868 * elfxx-ia64.c (elfNN_ia64_check_relocs): New local pltoff. Initialize
6869 to NULL. Call get_pltoff if NULL and NEED_PLTOFF is true.
6870
2de26f35
L
68712004-06-30 H.J. Lu <hongjiu.lu@intel.com>
6872
6873 PR 233
6874 * elflink.c (elf_link_input_bfd): Issue an error for non-debug
6875 local references to discarded sections and report their
6876 locations.
6877
72d7a15c
AM
68782004-06-30 Alan Modra <amodra@bigpond.net.au>
6879
6880 * elflink.c (elf_section_ignore_discarded_relocs): Don't test
6881 sec_info_type, test section name instead.
6882
e7f0a167
L
68832004-06-29 H.J. Lu <hongjiu.lu@intel.com>
6884
6885 PR 240
6886 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't relax branch
6887 in .init/.fini sections.
6888
bff5f93a
BW
68892004-06-29 Bob Wilson <bob.wilson@acm.org>
6890
6891 * elf32-xtensa.c (elf_xtensa_relocate_section): Use
6892 bfd_get_section_limit.
6893
b54d4b07
BW
68942004-06-29 Bob Wilson <bob.wilson@acm.org>
6895
6896 * elf32-xtensa.c (elf_xtensa_combine_prop_entries): Don't change the
6897 output section size.
6898
e87a64e1
AM
68992004-06-29 Alan Modra <amodra@bigpond.net.au>
6900
1a23a9e6
AM
6901 * elf64-mmix.c (mmix_set_relaxable_size): Save original size in
6902 rawsize.
6903 (mmix_elf_perform_relocation): Adjust for above change.
6904 (mmix_elf_relocate_section): Likewise.
6905 (mmix_elf_relax_section): Likewise. Use output_section->rawsize.
6906 (mmix_elf_get_section_contents): Delete.
6907 (bfd_elf64_get_section_contents): Delete.
6908 (mmix_elf_relocate_section): Zero stub area.
6909 * linker.c (default_indirect_link_order): Alloc max of section size
6910 and rawsize.
6911 * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
6912 * section.c (bfd_malloc_and_get_section): Likewise.
6913 (struct bfd_section): Update rawsize comment.
6914 * bfd-in2.h: Regenerate.
6915
e87a64e1
AM
6916 * reloc16.c (bfd_coff_reloc16_relax_section): Set rawsize.
6917
07515404
AM
69182004-06-29 Alan Modra <amodra@bigpond.net.au>
6919
6920 * bfd-in.h (bfd_get_section_limit): Define.
1fe1f39c 6921 * reloc.c (bfd_perform_relocation, bfd_install_relocation)
07515404
AM
6922 (_bfd_final_link_relocate): Use bfd_get_section_limit.
6923 * aout-tic30.c (tic30_aout_final_link_relocate): Likewise.
6924 * coff-arm.c (coff_arm_relocate_section): Likewise.
6925 * coff-mips.c (mips_refhi_reloc, mips_gprel_reloc): Likewise.
6926 * cpu-ns32k.c (do_ns32k_reloc): Likewise.
6927 (bfd_ns32k_final_link_relocate): Likewise.
6928 * elf32-d30v.c (bfd_elf_d30v_reloc, bfd_elf_d30v_reloc_21): Likwise.
6929 * elf32-dlx.c (_bfd_dlx_elf_hi16_reloc): Likewise.
1fe1f39c 6930 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc)
07515404 6931 (i860_howto_highadj_reloc, i860_howto_splitn_reloc): Likewise.
1fe1f39c 6932 * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc, m32r_elf_hi16_reloc)
07515404
AM
6933 (m32r_elf_generic_reloc, m32r_elf_relocate_section): Likewise.
6934 * elf32-m68hc1x.c (m68hc11_elf_special_reloc): Likewise.
6935 * elf32-mips.c (gprel32_with_gp, mips16_gprel_reloc): Likewise.
6936 * elf32-or32.c (or32_elf_consth_reloc): Likewise.
6937 * elf32-ppc.c (ppc_elf_addr16_ha_reloc): Likewise.
6938 * elf32-s390.c (s390_elf_ldisp_reloc): Likewise.
6939 * elf32-sh.c (sh_elf_reloc_loop): Likewise.
6940 * elf32-sparc.c (sparc_elf_wdisp16_reloc): Likewise.
6941 (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc): Likwise.
6942 * elf32-v850.c (v850_elf_reloc): Likewise.
6943 * elf32-xstormy16.c (xstormy16_elf_24_reloc): Likewise.
6944 * elf32-xtensa.c (bfd_elf_xtensa_reloc): Likewise.
6945 * elf64-alpha.c (elf64_alpha_reloc_gpdisp): Likewise.
6946 * elf64-mips.c (mips_elf64_gprel32_reloc)
6947 (mips16_gprel_reloc): Likewise.
6948 * elf64-mmix.c (mmix_elf_reloc): Likewise.
6949 * elf64-s390.c (s390_elf_ldisp_reloc): Likewise.
6950 * elf64-sparc.c (init_insn_reloc): Likewise.
6951 * elfn32-mips.c (gprel32_with_gp, mips16_gprel_reloc): Likewise.
1fe1f39c
NC
6952 * elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp)
6953 (_bfd_mips_elf_hi16_reloc, _bfd_mips_elf_lo16_reloc)
07515404
AM
6954 (_bfd_mips_elf_generic_reloc): Likewise.
6955 * bfd-in2.h: Regenerate.
6956
3722b82f
AM
69572004-06-28 Alan Modra <amodra@bigpond.net.au>
6958
6959 * bfd-in.h (struct stab_info): Move from stabs.c.
6960 * stabs.c (struct stab_link_includes_table): Delete.
6961 (stab_link_includes_lookup): Delete.
6962 (_bfd_write_section_stabs, _bfd_write_stab_strings): Remove one
6963 level of indirection from sinfo parm.
6964 (_bfd_link_section_stabs): Likewise. Set SEC_LINKER_CREATED on
6965 stabstr section. Adjust hash table accesses.
6966 * coff-ppc.c (ppc_bfd_coff_final_link): Do include rawsize in contents
6967 alloc. Adjust stab_info test.
6968 * cofflink.c (_bfd_coff_link_hash_table_init): Clear stab_info.
6969 (_bfd_coff_final_link): Adjust stab_info test.
6970 (_bfd_coff_link_input_bfd): Ignore SEC_LINKER_CREATED sections.
6971 * elf-bfd.h (struct elf_link_hash_table): Include struct stab_info
6972 in place.
6973 * libcoff-in.h (struct coff_link_hash_table): Likewise.
6974 * elf.c (_bfd_elf_link_hash_table_init): Clear stab_info.
6975 * elflink.c (bfd_elf_final_link): Don't attempt to link linker created
6976 stabstr section. Adjust stab_info test.
6977 * libbfd-in.h (_bfd_link_section_stabs, _bfd_write_section_stabs)
6978 (_bfd_write_stab_strings): Adjust prototypes.
6979 * libbfd.h: Regenerate.
6980 * libcoff.h: Regenerate.
6981 * bfd-in2.h: Regenerate.
6982
727e493d
MK
69832004-06-27 Mark Kettenis <kettenis@gnu.org>
6984
6985 From Miod Vallat <miod@online.fr>:
6986 * aoutx.h (NAME(aout,machine_type)): Handle bfd_arch_m88k.
6987
146ccdbb
AO
69882004-06-26 Alexandre Oliva <aoliva@redhat.com>
6989
6990 * elf-m10300.c (struct elf_mn10300_pcrel_relocs_copied): Delete.
6991 (struct elf32_mn10300_link_hash_entry): Remove
6992 pcrel_relocs_copied.
6993 (mn10300_elf_check_relocs): Only reserve dynamic relocations for
6994 R_MN10300_32. Don't adjust pcrel_relocs_copied.
6995 (mn10300_elf_final_link_relocate): Fail for direct, pc-relative
6996 and gotoff relocations if the symbol doesn't bind locally. Use
6997 _bfd_elf_symbol_refs_local_p to test. Don't create dynamic
6998 relocation for PCREL32.
6999 (mn10300_elf_relocate_section): Use _bfd_elf_symbol_refs_local_p
7000 to test whether a symbol binds locally.
7001 (elf32_mn10300_link_hash_newfunc): Don't initialize
7002 pcrel_relocs_copied.
7003 (_bfd_mn10300_elf_discard_copies): Delete.
7004 (_bfd_mn10300_elf_size_dynamic_sections): Don't call it.
7005
a5fd0812
MK
70062004-06-26 Mark Kettenis <kettenis@gnu.org>
7007
7008 * config.bfd: Replace m88k-*-openbsd* with m88*-*-openbsd*.
7009
22bfad37
JB
70102004-06-25 Joel Brobecker <brobecker@gnat.com>
7011
7012 * som.c (som_set_reloc_info): Correct small typo.
7013
097f809a
NC
70142004-06-25 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
7015
7016 * elf32-m32r.c (m32r_elf_howto_table): Support R_M32R_GOTOFF.
7017 (m32r_elf_relocate_section): Changed for R_M32R_GOTOFF.
7018 (m32r_elf_gcsweep_hook): Likewise.
7019 (m32r_elf_check_relocs): Likewise.
7020 (m32r_elf_howto_table): Added R_M32R_GOTOFF_HI_ULO,
7021 R_M32R_GOTOFF_HI_SLO and R_M32R_GOTOFF_LO.
7022 * reloc.c: Added BFD_RELOC_M32R_GOTOFF_HI_ULO,
7023 BFD_RELOC_M32R_GOTOFF_HI_SLO and BFD_RELOC_M32R_GOTOFF_LO.
f9f2cf5d
NC
7024 * bfd-in2.h: Regenerated.
7025 * libbfd.h: Regenerated.
097f809a 7026
6610a52d
L
70272004-06-24 H.J. Lu <hongjiu.lu@intel.com>
7028
7029 * elf64-x86-64.c (elf64_x86_64_check_relocs): Warn overflow
7030 relocation symbol.
7031 (elf64_x86_64_relocate_section): Issue an error for
7032 R_X86_64_PC8, R_X86_64_PC16 and R_X86_64_PC32 relocations
7033 against global symbols when building shared library.
7034
eea6121a
AM
70352004-06-24 Alan Modra <amodra@bigpond.net.au>
7036
7037 * section.c (struct sec): Rename "_cooked_size" to "size".
7038 Rename "_raw_size" to "rawsize".
7039 (STD_SECTION): Adjust comments.
7040 (bfd_set_section_size, bfd_get_section_contents): Use size.
7041 (bfd_malloc_and_get_section): New function.
7042 * bfd-in.h (bfd_section_size, bfd_get_section_size): Use size.
7043 * coff-sh.c (sh_relax_section): Alloc coff_section_data struct early.
7044 Correctly free reloc and contents memory.
7045 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Delete FIXME
7046 and fake CIE now that we can shink section size to zero.
7047 (_bfd_elf_write_section_eh_frame): Likewise..
7048 * elf32-ppc.c (ppc_elf_relax_section): Delay reading section contents.
7049 * elf-m10300.c (mn10300_elf_final_link_relocate): Don't use
7050 _bfd_stab_section_offset. Use _bfd_elf_section_offset.
7051 * stabs.c (_bfd_stab_section_offset_): Remove unused args and
7052 unneeded indirection.
7053 * elf.c (_bfd_elf_section_offset): .. and update call.
7054 * libbfd-in.h (_bfd_stab_section_offset): Update prototype.
7055 * libbfd.h: Regenerate.
7056 * bfd-in2.h: Regenerate.
7057
7058 Replace occurrences of "_raw_size" and "_cooked_size" in most places
7059 with "size". Set new "rawsize" for stabs, eh_frame, and SEC_MERGE
7060 sections. Use "rawsize", if non-zero, for bfd_get_section_contents
7061 calls if the section might be a stabs, eh_frame, or SEC_MERGE section.
7062 Similarly use "rawsize", if non-zero, in reloc functions to validate
7063 reloc addresses. Use new bfd_malloc_and_get_section in most places
7064 where bfd_get_section_contents was called. Expand all occurrences of
7065 bfd_section_size and bfd_get_section_size. Rename "raw_size" var in
7066 grok_prstatus and similar functions to "size".
7067 * aix386-core.c (aix386_core_file_p): ..
7068 * aix5ppc-core.c (xcoff64_core_p): ..
7069 * aout-adobe.c (aout_adobe_callback, aout_adobe_write_object_contents,
7070 aout_adobe_set_section_contents): ..
7071 * aout-target.h (callback): ..
7072 * aout-tic30.c (tic30_aout_callback, tic30_aout_final_link_relocate,
7073 MY_bfd_final_link): ..
7074 * aoutf1.h (sunos4_core_file_p): ..
7075 * aoutx.h (some_aout_object_p, adjust_o_magic, adjust_z_magic,
7076 adjust_n_magic, adjust_sizes_and_vmas, translate_from_native_sym_flags,
7077 final_link, aout_link_input_section): ..
7078 * binary.c (binary_object_p, binary_canonicalize_symtab,
7079 binary_set_section_contents): ..
7080 * bout.c (b_out_callback, b_out_write_object_contents,
7081 b_out_set_section_contents, b_out_bfd_relax_section,
7082 b_out_bfd_get_relocated_section_contents): ..
7083 * cisco-core.c (cisco_core_file_validate): ..
7084 * coff-alpha.c (alpha_ecoff_object_p,
7085 alpha_ecoff_get_relocated_section_conten, alpha_relocate_section): ..
7086 * coff-arm.c (coff_arm_relocate_section,
7087 bfd_arm_allocate_interworking_sections): ..
7088 * coff-h8300.c (h8300_reloc16_extra_cases,
7089 h8300_bfd_link_add_symbols): ..
7090 * coff-mips.c (mips_refhi_reloc, mips_gprel_reloc): ..
7091 * coff-ppc.c (coff_ppc_relocate_section, ppc_allocate_toc_section,
7092 ppc_bfd_coff_final_link): ..
7093 * coff-rs6000.c (xcoff_reloc_type_br, xcoff_ppc_relocate_section): ..
7094 * coff-sh.c (sh_relax_section, sh_relax_delete_bytes,
7095 sh_align_loads, sh_coff_get_relocated_section_contents): ..
7096 * coff64-rs6000.c (xcoff64_write_object_contents,
7097 xcoff64_reloc_type_br, xcoff64_ppc_relocate_section): ..
7098 * coffcode.h (coff_compute_section_file_positions,
7099 coff_write_object_contents): ..
7100 * coffgen.c (make_a_section_from_file, coff_write_symbols,
7101 coff_section_symbol, build_debug_section): ..
7102 * cofflink.c (coff_link_add_symbols, _bfd_coff_final_link,
7103 process_embedded_commands, _bfd_coff_link_input_bfd,
7104 _bfd_coff_write_global_sym): ..
7105 * cpu-arm.c (bfd_arm_update_notes, bfd_arm_get_mach_from_notes): ..
7106 * cpu-ns32k.c (do_ns32k_reloc, _bfd_ns32k_final_link_relocate): ..
7107 * dwarf1.c (parse_line_table, _bfd_dwarf1_find_nearest_line): ..
7108 * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
7109 _bfd_dwarf2_find_nearest_line): ..
7110 * ecoff.c (bfd_debug_section, ecoff_set_symbol_info,
7111 ecoff_compute_section_file_positions,
7112 _bfd_ecoff_write_object_contents, ecoff_indirect_link_order): ..
7113 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame,
7114 _bfd_elf_discard_section_eh_frame_hdr,
7115 _bfd_elf_maybe_strip_eh_frame_hdr, _bfd_elf_eh_frame_section_offset,
7116 _bfd_elf_write_section_eh_frame,
7117 _bfd_elf_write_section_eh_frame_hdr): ..
7118 * elf-hppa.h (elf_hppa_sort_unwind): ..
7119 * elf-m10200.c (mn10200_elf_relax_section,
7120 mn10200_elf_relax_delete_bytes,
7121 mn10200_elf_get_relocated_section_contents): ..
7122 * elf-m10300.c (_bfd_mn10300_elf_create_got_section,
7123 mn10300_elf_check_relocs, mn10300_elf_relax_section,
7124 mn10300_elf_relax_delete_bytes,
7125 mn10300_elf_get_relocated_section_contents,
7126 _bfd_mn10300_elf_adjust_dynamic_symbol,
7127 _bfd_mn10300_elf_discard_copies,
7128 _bfd_mn10300_elf_size_dynamic_sections,
7129 _bfd_mn10300_elf_finish_dynamic_sections): ..
7130 * elf.c (_bfd_elf_print_private_bfd_data, bfd_elf_get_bfd_needed_list,
7131 _bfd_elf_make_section_from_phdr, elf_fake_sections,
7132 bfd_elf_set_group_contents, map_sections_to_segments,
7133 elf_sort_sections, assign_file_positions_for_segments,
7134 SECTION_SIZE, copy_private_bfd_data,
7135 _bfd_elf_get_dynamic_reloc_upper_bound,
7136 _bfd_elf_canonicalize_dynamic_reloc, elfcore_maybe_make_sect,
7137 _bfd_elfcore_make_pseudosection, elfcore_grok_prstatus,
7138 elfcore_grok_lwpstatus, elfcore_grok_win32pstatus,
7139 elfcore_grok_note, elfcore_grok_nto_status, elfcore_grok_nto_gregs,
7140 _bfd_elf_rel_local_sym, _bfd_elf_get_synthetic_symtab): ..
7141 * elf32-arm.h (bfd_elf32_arm_allocate_interworking_sect,
7142 bfd_elf32_arm_process_before_allocation,
7143 elf32_arm_adjust_dynamic_symbol, allocate_dynrelocs,
7144 elf32_arm_size_dynamic_sections, elf32_arm_finish_dynamic_sections,
7145 elf32_arm_write_section): ..
7146 * elf32-cris.c (cris_elf_grok_prstatus,
7147 elf_cris_finish_dynamic_sections, cris_elf_gc_sweep_hook,
7148 elf_cris_adjust_gotplt_to_got, elf_cris_adjust_dynamic_symbol,
7149 cris_elf_check_relocs, elf_cris_size_dynamic_sections,
7150 elf_cris_discard_excess_dso_dynamics,
7151 elf_cris_discard_excess_program_dynamics): ..
7152 * elf32-d30v.c (bfd_elf_d30v_reloc, bfd_elf_d30v_reloc_21): ..
7153 * elf32-dlx.c (_bfd_dlx_elf_hi16_reloc): ..
7154 * elf32-frv.c (_frvfdpic_add_dyn_reloc, _frvfdpic_add_rofixup,
7155 _frv_create_got_section, _frvfdpic_assign_plt_entries,
7156 elf32_frvfdpic_size_dynamic_sections,
7157 elf32_frvfdpic_modify_segment_map,
7158 elf32_frvfdpic_finish_dynamic_sections): ..
7159 * elf32-h8300.c (elf32_h8_relax_section, elf32_h8_relax_delete_bytes,
7160 elf32_h8_get_relocated_section_contents): ..
7161 * elf32-hppa.c (hppa_build_one_stub, hppa_size_one_stub,
7162 elf32_hppa_adjust_dynamic_symbol, allocate_plt_static,
7163 allocate_dynrelocs, elf32_hppa_size_dynamic_sections, group_sections,
7164 elf32_hppa_size_stubs, elf32_hppa_set_gp, elf32_hppa_build_stubs,
7165 elf32_hppa_finish_dynamic_sections): ..
7166 * elf32-i370.c (i370_elf_adjust_dynamic_symbol,
7167 i370_elf_size_dynamic_sections, i370_elf_check_relocs,
7168 i370_elf_finish_dynamic_sections): ..
7169 * elf32-i386.c (elf_i386_grok_prstatus, elf_i386_adjust_dynamic_symbol,
7170 allocate_dynrelocs, elf_i386_size_dynamic_sections,
7171 elf_i386_relocate_section, elf_i386_finish_dynamic_sections): ..
7172 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc,
7173 i860_howto_highadj_reloc, i860_howto_splitn_reloc): ..
7174 * elf32-ip2k.c (ip2k_is_switch_table_128,
7175 ip2k_relax_switch_table_128, ip2k_is_switch_table_256,
7176 ip2k_relax_switch_table_256, ip2k_elf_relax_section,
7177 adjust_all_relocations, ip2k_elf_relax_delete_bytes): ..
7178 * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc, m32r_elf_hi16_reloc,
7179 m32r_elf_generic_reloc, m32r_elf_adjust_dynamic_symbol,
7180 allocate_dynrelocs, m32r_elf_size_dynamic_sections,
7181 m32r_elf_relocate_section, m32r_elf_finish_dynamic_sections,
7182 m32r_elf_relax_section, m32r_elf_relax_delete_bytes,
7183 m32r_elf_get_relocated_section_contents): ..
7184 * elf32-m68hc11.c (m68hc11_elf_build_one_stub,
7185 m68hc11_elf_size_one_stub, m68hc11_elf_relax_section,
7186 m68hc11_elf_relax_delete_bytes): ..
7187 * elf32-m68hc12.c (m68hc12_elf_build_one_stub,
7188 m68hc12_elf_size_one_stub): ..
7189 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs,
7190 elf32_m68hc11_build_stubs, m68hc11_elf_special_reloc): ..
7191 * elf32-m68k.c (elf_m68k_check_relocs, elf_m68k_gc_sweep_hook,
7192 elf_m68k_adjust_dynamic_symbol, elf_m68k_size_dynamic_sections,
7193 elf_m68k_discard_copies, elf_m68k_finish_dynamic_sections): ..
7194 * elf32-mips.c (gprel32_with_gp, mips16_gprel_reloc,
7195 elf32_mips_grok_prstatus): ..
7196 * elf32-or32.c (or32_elf_consth_reloc): ..
7197 * elf32-ppc.c (ppc_elf_relax_section, ppc_elf_addr16_ha_reloc,
7198 elf_create_pointer_linker_section, ppc_elf_create_linker_section,
7199 ppc_elf_additional_program_headers, ppc_elf_adjust_dynamic_symbol,
7200 allocate_dynrelocs, ppc_elf_size_dynamic_sections,
7201 ppc_elf_finish_dynamic_sections, ppc_elf_grok_prstatus,
7202 ppc_elf_final_write_processing): ..
7203 * elf32-s390.c (s390_elf_ldisp_reloc, elf_s390_adjust_dynamic_symbol,
7204 allocate_dynrelocs, elf_s390_size_dynamic_sections,
7205 elf_s390_finish_dynamic_sections, elf_s390_grok_prstatus): ..
7206 * elf32-sh.c (sh_elf_reloc_loop, sh_elf_relax_section,
7207 sh_elf_relax_delete_bytes, sh_elf_align_loads,
7208 sh_elf_adjust_dynamic_symbol, allocate_dynrelocs,
7209 sh_elf_size_dynamic_sections, sh_elf_get_relocated_section_contents,
7210 sh_elf_finish_dynamic_sections, elf32_shlin_grok_prstatus): ..
7211 * elf32-sh64-com.c (sh64_address_in_cranges,
7212 sh64_get_contents_type): ..
7213 * elf32-sh64.c (sh64_find_section_for_address,
7214 sh64_elf_final_write_processing): ..
7215 * elf32-sparc.c (sparc_elf_wdisp16_reloc, sparc_elf_hix22_reloc,
7216 sparc_elf_lox10_reloc, elf32_sparc_adjust_dynamic_symbol,
7217 allocate_dynrelocs, elf32_sparc_size_dynamic_sections,
7218 elf32_sparc_relocate_section, elf32_sparc_finish_dynamic_sections): ..
7219 * elf32-v850.c (v850_elf_reloc, v850_elf_relax_section): ..
7220 * elf32-vax.c (elf_vax_check_relocs, elf_vax_adjust_dynamic_symbol,
7221 elf_vax_size_dynamic_sections, elf_vax_discard_copies,
7222 elf_vax_instantiate_got_entries, elf_vax_relocate_section,
7223 elf_vax_finish_dynamic_sections): ..
7224 * elf32-xstormy16.c (xstormy16_elf_24_reloc,
7225 xstormy16_elf_check_relocs, xstormy16_relax_plt_check,
7226 xstormy16_elf_relax_section, xstormy16_elf_always_size_sections,
7227 xstormy16_elf_finish_dynamic_sections): ..
7228 * elf32-xtensa.c (xtensa_read_table_entries,
7229 elf_xtensa_allocate_got_size, elf_xtensa_allocate_local_got_size,
7230 elf_xtensa_size_dynamic_sections, elf_xtensa_do_reloc,
7231 bfd_elf_xtensa_reloc, elf_xtensa_relocate_section,
7232 elf_xtensa_combine_prop_entries, elf_xtensa_finish_dynamic_sections,
7233 elf_xtensa_discard_info_for_section, elf_xtensa_grok_prstatus,
7234 get_relocation_opcode, retrieve_contents, find_relaxable_sections,
7235 collect_source_relocs, is_resolvable_asm_expansion, remove_literals,
7236 relax_section, shrink_dynamic_reloc_sections, relax_property_section,
7237 xtensa_callback_required_dependence): ..
7238 * elf64-alpha.c (elf64_alpha_reloc_gpdisp, elf64_alpha_relax_section,
7239 elf64_alpha_check_relocs, elf64_alpha_adjust_dynamic_symbol,
7240 elf64_alpha_calc_got_offsets_for_symbol, elf64_alpha_calc_got_offsets,
7241 elf64_alpha_size_plt_section, elf64_alpha_size_plt_section_1,
7242 elf64_alpha_always_size_sections, elf64_alpha_calc_dynrel_sizes,
7243 elf64_alpha_size_rela_got_section, elf64_alpha_size_rela_got_1,
7244 elf64_alpha_size_dynamic_sections, elf64_alpha_emit_dynrel,
7245 elf64_alpha_finish_dynamic_sections, elf64_alpha_final_link): ..
7246 * elf64-hppa.c (allocate_dynrel_entries,
7247 elf64_hppa_size_dynamic_sections,
7248 elf64_hppa_finish_dynamic_sections): ..
7249 * elf64-mips.c (mips_elf64_gprel32_reloc, mips16_gprel_reloc,
7250 mips_elf64_canonicalize_dynamic_reloc, mips_elf64_slurp_reloc_table,
7251 elf64_mips_grok_prstatus): ..
7252 * elf64-mmix.c (mmix_elf_perform_relocation, mmix_elf_reloc,
7253 mmix_elf_relocate_section, mmix_elf_final_link,
7254 mmix_set_relaxable_size, _bfd_mmix_after_linker_allocation,
7255 mmix_elf_relax_section, mmix_elf_get_section_contents): ..
7256 * elf64-ppc.c (ppc64_elf_object_p, ppc64_elf_grok_prstatus,
7257 ppc64_elf_check_relocs, ppc64_elf_func_desc_adjust,
7258 ppc64_elf_adjust_dynamic_symbol, ppc64_elf_edit_opd,
7259 allocate_dynrelocs, ppc64_elf_size_dynamic_sections,
7260 ppc_build_one_stub, ppc_size_one_stub, ppc64_elf_next_toc_section,
7261 toc_adjusting_stub_needed, group_sections, ppc64_elf_size_stubs,
7262 ppc64_elf_build_stubs, ppc64_elf_relocate_section,
7263 ppc64_elf_finish_dynamic_sections): ..
7264 * elf64-s390.c (s390_elf_ldisp_reloc, elf_s390_adjust_dynamic_symbol,
7265 allocate_dynrelocs, elf_s390_size_dynamic_sections,
7266 elf_s390_finish_dynamic_sections): ..
7267 * elf64-sh64.c (sh_elf64_get_relocated_section_contents,
7268 sh_elf64_check_relocs, sh64_elf64_adjust_dynamic_symbol,
7269 sh64_elf64_discard_copies, sh64_elf64_size_dynamic_sections,
7270 sh64_elf64_finish_dynamic_sections): ..
7271 * elf64-sparc.c (sparc64_elf_slurp_reloc_table, init_insn_reloc,
7272 sparc64_elf_check_relocs, sparc64_elf_adjust_dynamic_symbol,
7273 sparc64_elf_size_dynamic_sections, sparc64_elf_relocate_section,
7274 sparc64_elf_finish_dynamic_symbol,
7275 sparc64_elf_finish_dynamic_sections): ..
7276 * elf64-x86-64.c (elf64_x86_64_grok_prstatus,
7277 elf64_x86_64_adjust_dynamic_symbol, allocate_dynrelocs,
7278 elf64_x86_64_size_dynamic_sections, elf64_x86_64_relocate_section,
7279 elf64_x86_64_finish_dynamic_sections): ..
7280 * elfarm-nabi.c (elf32_arm_nabi_grok_prstatus): ..
7281 * elfcode.h (elf_slurp_reloc_table): ..
7282 * elflink.c (_bfd_elf_create_got_section, elf_add_dt_needed_tag,
7283 elf_finalize_dynstr, elf_link_add_object_symbols,
7284 bfd_elf_size_dynamic_sections, elf_link_sort_relocs,
7285 elf_link_input_bfd, bfd_elf_final_link, bfd_elf_discard_info): ..
7286 * elfn32-mips.c (gprel32_with_gp, mips16_gprel_reloc,
7287 elf32_mips_grok_prstatus): ..
7288 * elfxx-ia64.c (elfNN_ia64_relax_section, allocate_dynrel_entries,
7289 elfNN_ia64_size_dynamic_sections, elfNN_ia64_install_dyn_reloc,
7290 elfNN_ia64_choose_gp, elfNN_ia64_final_link,
7291 elfNN_ia64_finish_dynamic_sections): ..
7292 * elfxx-mips.c (mips_elf_create_procedure_table,
7293 mips_elf_check_mips16_stubs, _bfd_mips_elf_gprel16_with_gp,
7294 _bfd_mips_elf_hi16_reloc, _bfd_mips_elf_generic_reloc,
7295 mips_elf_global_got_index, mips_elf_multi_got,
7296 mips_elf_create_compact_rel_section, mips_elf_calculate_relocation,
7297 mips_elf_allocate_dynamic_relocations,
7298 mips_elf_create_dynamic_relocation, _bfd_mips_elf_fake_sections,
7299 _bfd_mips_relax_section, _bfd_mips_elf_adjust_dynamic_symbol,
7300 _bfd_mips_elf_always_size_sections,
7301 _bfd_mips_elf_size_dynamic_sections,
7302 _bfd_mips_elf_finish_dynamic_symbol,
7303 _bfd_mips_elf_finish_dynamic_sections,
7304 _bfd_mips_elf_modify_segment_map, _bfd_mips_elf_discard_info,
7305 _bfd_mips_elf_write_section, _bfd_mips_elf_set_section_contents,
7306 _bfd_elf_mips_get_relocated_section_contents,
7307 _bfd_mips_elf_final_link, _bfd_mips_elf_merge_private_bfd_data): ..
7308 * hp300hpux.c (callback): ..
7309 * hppabsd-core.c (make_bfd_asection): ..
7310 * hpux-core.c (make_bfd_asection): ..
7311 * i386linux.c (linux_link_create_dynamic_sections,
7312 bfd_i386linux_size_dynamic_sections, linux_finish_dynamic_link): ..
7313 * i386msdos.c (msdos_write_object_contents): ..
7314 * i386os9k.c (os9k_callback, os9k_write_object_contents,
7315 os9k_set_section_contents): ..
7316 * ieee.c (parse_expression, ieee_slurp_external_symbols,
7317 ieee_slurp_sections, ieee_slurp_debug, ieee_slurp_section_data,
7318 ieee_write_section_part, do_with_relocs, do_as_repeat,
7319 do_without_relocs, ieee_write_debug_part, init_for_output,
7320 ieee_set_section_contents): ..
7321 * ihex.c (ihex_scan, ihex_read_section, ihex_get_section_contents): ..
7322 * irix-core.c (do_sections, make_bfd_asection): ..
7323 * libaout.h (aout_section_merge_with_text_p): ..
7324 * libbfd.c (_bfd_generic_get_section_contents,
7325 _bfd_generic_get_section_contents_in_window): ..
7326 * linker.c (default_indirect_link_order): ..
7327 * lynx-core.c (make_bfd_asection): ..
7328 * m68klinux.c (linux_link_create_dynamic_sections,
7329 bfd_m68klinux_size_dynamic_sections, linux_finish_dynamic_link): ..
7330 * mach-o.c (bfd_mach_o_make_bfd_section,
7331 bfd_mach_o_scan_read_dylinker, bfd_mach_o_scan_read_dylib,
7332 bfd_mach_o_scan_read_thread, bfd_mach_o_scan_read_symtab,
7333 bfd_mach_o_scan_read_segment): ..
7334 * merge.c (_bfd_add_merge_section, record_section, merge_strings,
7335 _bfd_merge_sections): ..
7336 * mmo.c (mmo_find_sec_w_addr, mmo_get_spec_section, mmo_get_loc,
7337 mmo_map_set_sizes, mmo_canonicalize_symtab,
7338 mmo_internal_write_section, mmo_write_object_contents): ..
7339 * netbsd-core.c (netbsd_core_file_p): ..
7340 * nlm32-alpha.c (nlm_alpha_read_reloc, nlm_alpha_write_import,
7341 nlm_alpha_set_public_section): ..
7342 * nlm32-ppc.c (nlm_powerpc_read_reloc, nlm_powerpc_write_reloc): ..
7343 * nlm32-sparc.c (nlm_sparc_write_import): ..
7344 * nlmcode.h (add_bfd_section, nlm_swap_auxiliary_headers_in,
7345 nlm_compute_section_file_positions): ..
7346 * oasys.c (oasys_object_p, oasys_slurp_section_data,
7347 oasys_write_sections, oasys_write_data, oasys_set_section_contents): ..
7348 * opncls.c (get_debug_link_info): ..
7349 * osf-core.c (make_bfd_asection): ..
7350 * pdp11.c (some_aout_object_p, adjust_o_magic, adjust_z_magic,
7351 adjust_n_magic, adjust_sizes_and_vmas, squirt_out_relocs,
7352 final_link, aout_link_input_section): ..
7353 * peXXigen.c (_bfd_XXi_swap_sym_in, _bfd_XXi_swap_aouthdr_out,
7354 pe_print_idata, pe_print_edata, pe_print_pdata, pe_print_reloc): ..
7355 * pef.c (bfd_pef_make_bfd_section, bfd_pef_print_loader_section,
7356 bfd_pef_scan_start_address, bfd_pef_parse_symbols): ..
7357 * ppcboot.c (ppcboot_object_p, ppcboot_canonicalize_symtab): ..
7358 * ptrace-core.c (ptrace_unix_core_file_p): ..
7359 * reloc.c (bfd_perform_relocation, bfd_install_relocation,
7360 _bfd_final_link_relocate, bfd_generic_relax_section,
7361 bfd_generic_get_relocated_section_contents): ..
7362 * reloc16.c (bfd_coff_reloc16_relax_section,
7363 bfd_coff_reloc16_get_relocated_section_c): ..
7364 * riscix.c (riscix_some_aout_object_p): ..
7365 * rs6000-core.c (read_hdr, make_bfd_asection): ..
7366 * sco5-core.c (make_bfd_asection): ..
7367 * simple.c (bfd_simple_get_relocated_section_contents): ..
7368 * som.c (som_object_setup, setup_sections, som_prep_headers,
7369 som_write_fixups, som_begin_writing, bfd_section_from_som_symbol,
7370 som_set_reloc_info, som_get_section_contents,
7371 som_bfd_link_split_section): ..
7372 * sparclinux.c (linux_link_create_dynamic_sections,
7373 bfd_sparclinux_size_dynamic_sections, linux_finish_dynamic_link): ..
7374 * srec.c (srec_scan, srec_read_section, srec_get_section_contents): ..
7375 * stabs.c (_bfd_link_section_stabs, _bfd_discard_section_stabs,
7376 _bfd_write_stab_strings, _bfd_stab_section_offset): ..
7377 * sunos.c (sunos_read_dynamic_info, sunos_create_dynamic_sections,
7378 bfd_sunos_size_dynamic_sections, sunos_scan_std_relocs,
7379 sunos_scan_ext_relocs, sunos_scan_dynamic_symbol,
7380 sunos_write_dynamic_symbol, sunos_check_dynamic_reloc,
7381 sunos_finish_dynamic_link): ..
7382 * syms.c (_bfd_stab_section_find_nearest_line): ..
7383 * tekhex.c (first_phase, tekhex_set_section_contents,
7384 tekhex_write_object_contents): ..
7385 * trad-core.c (trad_unix_core_file_p): ..
7386 * versados.c (process_esd, process_otr, process_otr): ..
7387 * vms-gsd.c (_bfd_vms_slurp_gsd, _bfd_vms_write_gsd): ..
7388 * vms-misc.c (add_new_contents): ..
7389 * vms-tir.c (check_section, new_section, _bfd_vms_write_tir): ..
7390 * vms.c (vms_set_section_contents): ..
7391 * xcofflink.c (xcoff_get_section_contents, xcoff_link_add_symbols,
7392 xcoff_sweep, bfd_xcoff_size_dynamic_sections, xcoff_build_ldsyms,
7393 _bfd_xcoff_bfd_final_link, xcoff_link_input_bfd): ..
7394 * xsym.c (bfd_sym_scan): .. See above.
7395
bf8b15af
L
73962004-06-21 H.J. Lu <hongjiu.lu@intel.com>
7397
7398 * elfxx-ia64.c (elfNN_ia64_relax_section): Add addend when
7399 calling _bfd_merged_section_offset only for section symbols.
7400
d1c6de6f
AM
74012004-06-22 Alan Modra <amodra@bigpond.net.au>
7402
7403 * elf32-ppc.c (ppc_elf_relax_section): Implement reference code
7404 for handling SEC_MERGE symbols in relax_section.
7405
aa02cc63
AO
74062004-06-21 Alexandre Oliva <aoliva@redhat.com>
7407
7408 2003-05-15 Richard Sandiford <rsandifo@redhat.com>
7409 * cpu-h8300.c (compatible): Allow h8300s and h8300sx code to be
7410 linked together. Mark the result as h8300sx code.
7411
aee6f5b4
AO
74122004-06-21 Alexandre Oliva <aoliva@redhat.com>
7413
7414 * elf-bfd.h (struct elf_backend_data): Added
7415 elf_backend_omit_section_dynsym.
7416 (_bfd_elf_link_omit_section_dynsym): Declare.
7417 * elf32-frv.c (_frvfdpic_link_omit_section_dynsym): New.
7418 (elf_backend_omit_section_dynsym): Use it for frvfdpic.
7419 * elflink.c (_bfd_elf_link_omit_section_dynsym): Split out of...
7420 (_bfd_elf_link_renumber_dynsyms): ... this function.
7421 * elfxx-target.h (elf_backend_omit_section_dynsym): Default to
7422 _bfd_elf_link_omit_section_dynsym).
7423 (elfNN_bed): Added elf_backend_omit_section_dynsym.
7424
05576f10
NC
74252004-06-21 Nick Clifton <nickc@redhat.com>
7426
7427 * coffcode.h (styp_to_sec_flags): Ignore IMAGE_SCN_MEM_NOT_PAGED
7428 flags.
7429
02d5a37b
JG
74302004-06-17 Jerome Guitton <guitton@gnat.com>
7431
7432 * bfd-in.h (bfd_cache_close_all): New function declaration.
7433 * bfd-in2.h: Regenerate.
7434 * cache.c (bfd_cache_close_all): New function definition.
7435
d2bef492
MK
74362004-06-16 Mark Kettenis <kettenis@gnu.org>
7437
7438 * configure.in: Don't set COREFILE to trad-core.lo for FreeBSD
7439 4.10 and beyond.
7440 * configure: Regenerate.
7441
8528d62e
DJ
74422004-06-16 Daniel Jacobowitz <dan@debian.org>
7443
7444 * elf32-ppc.c (ppc_elf_create_linker_section): Create symbols in
7445 the pre-existing section.
7446
911d08a7
AM
74472004-06-15 Alan Modra <amodra@bigpond.net.au>
7448
7449 * section.c (struct sec): Remove usused flags. Reorganize a little.
7450 (bfd_get_section_size_before_reloc): Delete.
7451 (bfd_get_section_size_after_reloc): Delete.
7452 (STD_SECTION): Update.
7453 (bfd_get_section_size_now): Delete.
7454 (bfd_set_section_contents): Don't referece reloc_done.
7455 (bfd_get_section_contents): Remove reloc_done comment.
7456 * bout.c (b_out_bfd_get_relocated_section_contents): Don't set
7457 reloc_done.
7458 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Likewise.
7459 * ecoff.c (bfd_debug_section): Update initializer.
7460 * elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents): Ditto.
7461 * reloc.c (bfd_generic_get_relocated_section_contents): Likewise.
7462 * bfd-in.h (bfd_section_size): Expand.
7463 (bfd_get_section_size): New macro.
7464 * bfd-in2.h: Regenerate.
7465 * coff64-rs6000.c (xcoff64_write_object_contents): Replace
7466 bfd_get_section_size_before_reloc with bfd_get_section_size.
7467 * coffcode.h (coff_write_object_contents): Likewise.
7468 * coffgen.c (build_debug_section): Likewise.
7469 * dwarf1.c (parse_line_table): Likewise.
7470 (_bfd_dwarf1_find_nearest_line): Likewise.
7471 * ecoff.c (_bfd_ecoff_write_object_contents): Likewise.
7472 * i386msdos.c (msdos_write_object_contents): Likewise.
7473 * pdp11.c (squirt_out_relocs): Likewise.
7474 * elf32-sh64.c (sh64_find_section_for_address): Remove comment.
7475 * elf64-mmix.c (mmix_elf_final_link): Update comment.
7476
092dcd75
CD
74772004-06-14 Chris Demetriou <cgd@broadcom.com>
7478
7479 * elf32-mips.c (elf_mips_gnu_pcrel32): Add (undoing 2004-04-24
7480 removal) with updated comment.
7481 (bfd_elf32_bfd_reloc_type_lookup): Add back case for
7482 BFD_RELOC_32_PCREL.
7483 (mips_elf32_rtype_to_howto): Add back case for R_MIPS_PC32.
7484 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
7485
3ffa5234
AM
74862004-06-12 Alan Modra <amodra@bigpond.net.au>
7487
7488 * elf64-x86-64.c (elf64_x86_64_relocate_section): Ignore reloc
7489 overflow on branches to undefweaks.
7490
e9edc808
MR
74912004-06-11 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
7492
7493 * coff-alpha.c (alpha_relocate_section): Set used_by_bfd directly
7494 as ecoff_section_data() does not return a valid lvalue.
7495
a873f25a
AO
74962004-06-09 Alexandre Oliva <aoliva@redhat.com>
7497
a9b881be
AO
7498 * elflink.c (elf_sort_symbol): Compare section id, not pointers.
7499 (elf_link_add_object_symbols): Likewise.
7500
a873f25a
AO
7501 * elf-m10300.c (_bfd_mn10300_elf_reloc_type_class): New.
7502 (elf_backend_reloc_type_class): New.
7503
eef0f186
MK
75042004-06-08 Mark Kettenis <kettenis@gnu.org>
7505
7506 * configure.in (hppa*-*-netbsd*, hppa*-*-openbsd): Set COREFILE to
7507 netbsd-core.lo.
7508 * configure: Regenerate.
7509
822392ce
DJ
75102004-06-07 Daniel Jacobowitz <dan@debian.org>
7511
7512 From: Albert Chin-A-Young <china@thewrittenword.com>
7513 * bfd/elf-bfd.h (struct eh_cie_fde): Convert unsigned char bitfields
7514 to unsigned int.
7515
9f2e92c5
L
75162004-05-29 H.J. Lu <hongjiu.lu@intel.com>
7517
7518 * elfxx-ia64.c (elfNN_ia64_relax_section): Undo the last
7519 change.
7520
dd90f1b2
DD
75212004-05-28 DJ Delorie <dj@redhat.com>
7522
7523 * elf-m10300.c (mn10300_elf_relax_section): Preserve reloc addend
7524 for linking, but otherwise adjust reloc for merged sections.
7525
5dd23ec1
L
75262004-05-28 H.J. Lu <hongjiu.lu@intel.com>
7527
7528 * elfxx-ia64.c (elfNN_ia64_relax_section): Properly call
7529 _bfd_merged_section_offset for local symbols.
7530
f6f9408f
JR
75312004-05-28 Andrew Stubbs <andrew.stubbs@superh.com>
7532
7533 * Makefile.am: Regenerate dependencies.
7534 * Makefile.in: Regenerate.
7535 * archures.c: Add bfd_mach_sh3_nommu .
7536 * bfd-in2.h: Regenerate.
7537 * cpu-sh.c: Add sh3-nommu architecture.
7538 (bfd_to_arch_table): Create new table.
7539 (sh_get_arch_from_bfd_mach): Create new function.
7540 (sh_get_arch_up_from_bfd_mach): Create new function.
7541 (sh_merge_bfd_arch): Create new function.
7542 * elf32-sh.c (sh_ef_bfd_table): Add table.
7543 (sh_elf_check_relocs): Replace switch statement with
7544 use of sh_ef_bfd_table .
7545 (sh_elf_get_flags_from_mach): Add new function.
7546 (sh_find_elf_flags): Likewise.
7547 (sh_elf_copy_private_data): Replace most of non-elf contents
7548 with a call to sh_merge_bfd_arch() .
7549
d866f350
MC
75502004-05-27 Michael Chastain <mec.gnu@mindspring.com>
7551
7552 * Makefile.am (bfdver.h): Use explicit filename, not $< .
7553 * Makefile.in: Regenerate.
7554
1055df0f
AO
75552004-05-27 Alexandre Oliva <aoliva@redhat.com>
7556
7557 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Avoid
7558 custom calling conventions for dynamic symbols.
7559 (mn10300_elf_relax_section): Avoid relaxing a function as a local
7560 symbol if it's an alias to a global one.
7561
b3096250
L
75622004-05-26 H.J. Lu <hongjiu.lu@intel.com>
7563
7564 * elf.c (_bfd_elf_make_section_from_shdr): Undo the last
7565 change.
7566
9bb351fd
AO
75672004-05-27 Alexandre Oliva <aoliva@redhat.com>
7568
7569 * elf-m10300.c (mn10300_elf_relax_section): Don't test isym within
7570 loop over hashes.
7571
e49f5022
AM
75722004-05-26 Alan Modra <amodra@bigpond.net.au>
7573
7574 * elf.c (_bfd_elf_make_section_from_shdr): Don't set SEC_EXCLUDE
7575 for SHT_GROUP sections.
7576
57ceae94
AM
75772004-05-25 Alan Modra <amodra@bigpond.net.au>
7578
7579 * elflink.c (elf_link_add_object_symbols): Don't set up merge
7580 section data here..
7581 * elf.c (_bfd_elf_merge_sections): .. Do it here instead.
7582 * merge.c: Formatting. Remove unnecessary casts. Expand
7583 bfd_get_section_alignment macro.
7584 (struct sec_merge_sec_info): Rename "first" to "first_str". Update
7585 use throughout file.
7586 (_bfd_add_merge_section): Rename from _bfd_merge_section. Update
7587 comment. Abort on dynamic or non-SEC_MERGE input. Don't test
7588 section name to determine sinfo group, instead test output section
7589 and alignment.
7590 (_bfd_merge_sections): Add struct bfd_link_info param. Call
7591 _bfd_strip_section_from_output rather than just twiddling flags.
7592 * libbfd-in.h (_bfd_add_merge_section): Rename, update comment.
7593 (_bfd_merge_sections): Update prototype.
7594 * libbfd.h: Regenerate.
7595
c6f8758f 75962004-05-24 Mark Kettenis <kettenis@gnu.org>
d34436e8
MK
7597
7598 * netbsd-core.c: Correctly indent section that sets architecture
7599 from machine ID.
7600
c6f8758f
NC
7601 From Miod Vallat <miod@online.fr>:
7602 * m88kopenbsd.c: New file.
7603 * targets.c (m88k_openbsd_vec): New.
7604 * config.bfd: Add m88k-*-openbsd*.
7605 * configure.in (m88k-*-openbsd*): Set COREFILE to netbsd-core.lo.
7606 (m88kopenbsd_vec): New.
7607 * configure: Regenerate.
7608 * Makefile.am (BFD32_BACKENDS): Add m88kopenbsd.lo.
7609 (BFD32_BACKENDS_CFILES): Add m88kopenbsd.c.
7610 Run "make dep-am".
7611 * Makefile.in: Regenerate.
7612 * po/SRC-POTFILES.in: Regenerate.
7613
7d7e6bc4
NC
76142004-05-24 Nick Clifton <nickc@redhat.com>
7615
7616 * hash.c: Remove bogus node "Changing the default Hash Table Size"
7617 introduced by hash table size patch.
7618
bc286f95
BE
76192004-05-22 Ben Elliston <bje@au.ibm.com>
7620
7621 * configure.in (is_release): Remove.
7622 (bfd_version_date, bfd_version, bfd_version_string): Likewise.
7623 (AC_OUTPUT): Don't output bfdver.h from version.h.
7624 * configure: Regenerate.
7625 * Makefile.am (RELEASE): New variable.
7626 (bfdver.h): New target.
7627 * Makefile.in: Regenerate.
7628 * doc/Makefile.in: Likewise.
7629
8b89a4eb
BE
76302004-05-22 Ben Elliston <bje@au.ibm.com>
7631
7632 * Makefile.am (config.status): Don't depend on version.h.
7633 * Makefile.in: Regenerate.
7634
753731ee
AM
76352004-05-22 Alan Modra <amodra@bigpond.net.au>
7636
7637 * merge.c (_bfd_merged_section_offset): Remove "addend" param.
7638 * libbfd-in.h (_bfd_merged_section_offset): Adjust prototype.
7639 * libbfd.h: Regenerate.
7640 * elf.c (_bfd_elf_rela_local_sym): Adjust call.
7641 (_bfd_elf_rel_local_sym): Likewise.
7642 * elflink.c (_bfd_elf_link_sec_merge_syms): Likewise.
7643 (elf_link_input_bfd): Likewise.
7644 * elf32-ppc.c (ppc_elf_relax_section): Likewise.
7645 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
7646 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
7647 (elfNN_ia64_relocate_section): Likewise.
7648
2d643429
NC
76492004-05-21 Andy Chittenden <achittenden@bluearc.com>
7650
7651 * hash.c (bfd_default_hash_table_size): New variable.
7652 (bfd_hash_table_init): Use new variable instead of DEFAULT_SIZE.
7653 (bfd_hash_set_default_size): New function. Set the default size
7654 to a selected prime number close to the argument. Document new
7655 function.
7656 * bfd-in.h: Add prototype for bfd_hash_set_default_size.
7657 * bfd-in2.h: Regenerate.
7658 * Makefile.am (hash.lo): Add dependency upon libiberty.h.
7659 * Makefile.in: Regenerate.
7660
8377c19c
MK
76612004-05-21 Mark Kettenis <kettenis@gnu.org>
7662
7663 * libaout.h (machine_type): Add M_88K_OPENBSD and M_HPPA_OPENBSD.
7664 * netbsd-core.c (netbsd_core_file_p): Set architecture for alpha,
7665 arm, m68k, m88k and hppa core files.
7666
69fd4758
NC
76672004-05-21 Nick Clifton <nickc@redhat.com>
7668
7669 * bfdio.c (bfd_bread): Do not use iovec if it is NULL.
7670 (bfd_bwrite): Likewise.
7671 (bfd_tell): Likewise.
7672 (bfd_flush): Likewise.
7673 (bfd_stat): Likewise.
7674 (bfd_seek): Likewise.
7675 (bfd_get_mtime): Likewise.
7676 (bfd_get_size): Likewise.
7677
cd917290
BE
76782004-05-19 Ben Elliston <bje@au.ibm.com>
7679
7680 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Comment correction.
7681
1b09e940
NC
76822004-05-19 Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
7683
7684 * archive.c (_bfd_get_elt_at_filepos): Cope with a nested archives.
7685 (bfd_generic_openr_next_archived_file): Likewise.
7686
096c35a7
BW
76872004-05-17 Bob Wilson <bob.wilson@acm.org>
7688
7689 * elf32-xtensa.c (xtensa_get_property_section_name): Determine linkonce
7690 section names by inserting a new substring after .gnu.linkonce, except
7691 for .gnu.linkonce.t.* where the "t." is replaced.
7692
eea6121a 76932004-05-17 Adam Nemet <anemet@lnxw.com>
b2d65c0b
NC
7694
7695 * config.bfd (sparc-*-lynxos* case): Add to obsolete list.
7696 (m68-*-lynxos* case): Likewise.
7697 (powerpc-*-lyxnos* case): New case.
7698 (i[3-7]86-*-lynxos* case): Update to LynxOS 4.0 ELF.
7699
80fccad2
BW
77002004-05-17 David Heine <dlheine@tensilica.com>
7701
7702 * aout-target.h (MY_bfd_copy_private_header_data): Define.
7703 * aout-tic30.c (MY_bfd_copy_private_header_data): Define.
7704 * bfd.c (bfd_copy_private_header_data): Define.
7705 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Add entries for new
7706 interface.
7707 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
7708 * coffcode.h (coff_bfd_copy_private_header_data): Define.
7709 * elf-bfd.h (_bfd_elf_copy_private_header_data): Declare.
7710 * elf.c (_bfd_elf_copy_private_section_data): Remove code to set up
7711 segments by calling copy_private_bfd_data.
7712 (_bfd_elf_copy_private_header_data): Define.
7713 * elfxx-target.h (bfd_elfNN_bfd_copy_private_header_data): Define.
7714 * libbfd-in.h (_bfd_generic_bfd_copy_private_header_data): Define.
7715 * libecoff.h (_bfd_ecoff_bfd_copy_private_header_data): Define.
7716 * mach-o.c (bfd_mach_o_bfd_copy_private_header_data): Define.
7717 * mmo.c (mmo_bfd_copy_private_header_data): Define.
7718 * ppcboot.c (ppcboot_bfd_copy_private_header_data): Define.
7719 * som.c (som_bfd_copy_private_header_data): Define.
7720 * targets.c (BFD_JUMP_TABLE_COPY): Add _bfd_copy_private_header_data.
7721 * vms.c (vms_bfd_copy_private_header_data): Define.
7722 * bfd-in2.h: Regenerate.
7723 * libbfd.h: Regenerate.
7724
c5ae1840
TS
77252004-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7726
7727 * elfxx-mips.c (MINUS_TWO): Define.
7728 (mips_elf_higher, mips_elf_highest,
7729 mips_elf_create_dynamic_relocation): Use MINUS_ONE and MINUS_TWO for
7730 some bfd_vma values.
7731 (_bfd_mips_elf_finish_dynamic_symbol): Likewise. Code cleanup.
7732
a99cf92b
DA
77332004-05-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
7734
7735 * som.c (log2): Rename to exact_log2. Adjust all callers.
7736
0da76f83
NC
77372004-05-13 Paul Brook <paul@codesourcery.com>
7738
c273895f 7739 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Handle
336b9722
NC
7740 dwarf3 format CIE entries. Remove comment about the size of the
7741 ra_column field. It is now correctly deduced.
0da76f83 7742
4b363073
NC
77432004-05-13 Joel Sherrill <joel@oarcorp.com>
7744
7745 * config.bfd (or32-*-rtems*): Switch to elf.
7746
9598fbe5
NC
77472004-05-13 Nick Clifton <nickc@redhat.com>
7748
7749 * po/fr.po: Updated French translation.
7750
8c37241b
JJ
77512004-05-11 Jakub Jelinek <jakub@redhat.com>
7752
0306b3bf 7753 * elflink.c (bfd_elf_final_link): Don't output STT_SECTION symbol
8c37241b
JJ
7754 into .dynsym if elf_section_data (sec)->dynindx <= 0.
7755 Adjust counting of last_local.
7756 (_bfd_elf_link_renumber_dynsyms): Don't assign dynindx to sections
7757 other than SHT_PROGBITS/SHT_NOBITS and neither for .got/.got.plt/.plt
7758 created by the linker nor !SHF_ALLOC.
7759
7760 * elf32-i386.c (elf_i386_finish_dynamic_sections): Point
7761 DT_PLTGOT to the start of the .got.plt section instead of the
7762 .got output section. Set sh_entsize for .got section in addition
7763 to .got.plt.
7764 (elf_i386_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_
7765 is at sgot->output_section->vma.
7766 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Point
7767 DT_PLTGOT to the start of the .got.plt section instead of the
7768 .got output section.
7769 (elf64_x86_64_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_
7770 is at sgot->output_section->vma. Set sh_entsize for .got section
7771 in addition to .got.plt.
7772 * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_RELRO.
7773 (bfd_section_from_phdr): Likewise.
7774 (map_sections_to_segments): Likewise.
7775 (assign_file_positions_for_segments): Likewise.
7776 (get_program_header_size): Likewise.
7777 * elflink.c (bfd_elf_size_dynamic_sections): Set
7778 elf_tdata (output_bfd)->relro from info->relro.
7779 * elf-bfd.h (struct elf_obj_tdata): Add relro field.
7780
3f980e41
AO
77812004-05-08 Alexandre Oliva <aoliva@redhat.com>
7782
7783 * elf32-frv.c (_frvfdpic_add_dyn_reloc): Don't warn when we get
7784 a zero symndx for which we hadn't accounted a dynamic relocation.
7785 (_frvfdpic_add_rofixup): Likewise.
7786
d70270c5 77872004-05-07 Brian Ford <ford@vss.fsi.com>
eea6121a 7788 DJ Delorie <dj@redhat.com>
d70270c5
BF
7789
7790 * coffcode.h (coff_write_object_contents) [COFF_IMAGE_WITH_PE]:
7791 Propagate IMAGE_FILE_LARGE_ADDRESS_AWARE.
7792 * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Recognize
7793 IMAGE_FILE_LARGE_ADDRESS_AWARE. Use PE defines.
7794
7e9f3bd6
AO
77952004-05-07 Alexandre Oliva <aoliva@redhat.com>
7796
7797 * elf32-frv.c (elf32_frvfdpic_modify_segment_map): Return
7798 immediately if there's no link info.
7799 (elf32_frvfdpic_copy_private_bfd_data): New.
7800 (bfd_elf32_bfd_copy_private_bfd_data): Use it for frvfdpic.
7801
eb61d2d6
ZW
78022004-05-06 Zack Weinberg <zack@codesourcery.com>
7803
7804 * dwarf2.c (add_line_info): Also set info->filename to NULL if
7805 filename argument is null; do not call strlen on a null pointer.
7806
ecb2d096
DJ
78072004-05-06 Daniel Jacobowitz <drow@mvista.com>
7808
7809 * elf32-arm.h (elf32_arm_relocate_section): Remove R_ARM_PLT32
7810 special case.
7811
43850d5b
AO
78122004-05-05 Alexandre Oliva <aoliva@redhat.com>
7813
7814 * configure.in (bfd_elf32_frvfdpic_vec): New.
7815 * configure: Rebuilt.
7816 * targets.c (bfd_elf32_frvfdpic_vec): New.
7817 * config.bfd: Enable it on frv-*-elf and frv-*-*linux*, as default
7818 on the latter.
7819 * elf32-frv.c: Prefix all identifiers added for FDPIC support with
7820 frvfdpic instead of frv. Rearrange elf-target macros such that
7821 the FDPIC-specific ones are only defined for this new target
7822 vector.
7823 (bfd_elf32_frvfdpic_vec): Declare.
7824 (IS_FDPIC): New.
7825 (elf32_frv_relocate_section): Use it to enable segment checking
7826 and to control rofixup emission. Add output section vma to
7827 applied relocation in non-LOAD non-ALLOC sections. Use
7828 _bfd_error_handler for errors.
7829 (_frv_create_got_section): Create .rel.got and .rofixup only in
7830 FDPIC. Create non-dynamic _gp at .got+2048 in non-FDPIC, like the
7831 linker script.
7832 (elf32_frvfdpic_size_dynamic_sections): Assume FDPIC.
7833 (elf32_frvfdpic_modify_segment_map): Likewise.
7834 (elf32_frv_finish_dynamic_sections): New, do-nothing.
7835 (elf32_frvfdpic_finish_dynamic_sections): Assume FDPIC. Improve
7836 error message if we miscompute the rofixup size.
7837 (frvfdpic_elf_use_relative_eh_frame): Assume FDPIC.
7838 (frvfdpic_elf_encode_eh_address): Likewise.
7839 (elf32_frv_check_relocs): Reject FDPIC-only relocs in non-FDPIC.
7840 Record relocs only in FDPIC. Make sure _gp is defined for GPREL
7841 relocs. Reject unknown relocation types.
7842 (elf32_frv_object_p): Make sure target vector matches FDPIC bits.
7843 (frv_elf_merge_private_bfd_data): Likewise.
7844 (ELF_MAXPAGESIZE): Revert to 0x1000 for elf32-frv; keep it as
7845 0x4000 for newly-added elf32-frvfdpic.
7846
06fc8a8c
NC
78472004-05-05 Nick Clifton <nickc@redhat.com>
7848
7849 PR/136
7850 * cache.c (bfd_cache_lookup_worker): Call abort() rather than
7851 returning NULL as most users of this function do not check its
7852 return value.
33216455
NC
7853 * hppabsd-core.c (hppabsd_core_core_file_p): Do not check result
7854 of bfd_cache_lookup().
7855 * sco5-core.c (sco5_core_file_p): Likewise.
7856 * trad-core.c (trad_unix_core_file_p): Likewise.
06fc8a8c
NC
7857
78582004-05-05 Nick Clifton <nickc@redhat.com>
7859
7860 * cache.c (bfd_cache_lookup): Improve formatting.
7861 * archive.c: Fix formatting.
7862
6b6e92f4
NC
78632004-05-05 Peter Barada <peter@the-baradas.com>
7864
7865 * bfd_archures.c(bfd_architecture): Add 521x,5249,547x,548x.
7866 * cpu-m68k.c(bfd_m68k_arch): Likewise.
7867 * bfd-in2.h(bfd_architecture): Regenerate.
7868
6a8d1586
AM
78692004-05-03 Alan Modra <amodra@bigpond.net.au>
7870
7871 * elf.c (_bfd_elf_rela_local_sym): Set kept_section for excluded
7872 SEC_MERGE sections.
7873 * elflink.c (elf_link_input_bfd): Adjust output reloc index for
7874 those against discarded link-once and SEC_MERGE section symbols.
7875
fafe6678
L
78762004-05-02 H.J. Lu <hongjiu.lu@intel.com>
7877
7878 * section.c (bfd_get_section_by_name_if): New.
7879 * bfd-in2.h: Regenerated.
7880
ad7b9a36
AM
78812004-05-02 Alan Modra <amodra@bigpond.net.au>
7882
7883 * som.c (som_bfd_is_group_section): Define.
7884
73499ab8
AM
78852004-05-01 Alan Modra <amodra@bigpond.net.au>
7886
7887 * section.c (bfd_make_section_anyway): Copy the whole
7888 bfd_hash_entry, not just "next" from existing entry.
7889
45c5e9ed
L
78902004-04-30 H.J. Lu <hongjiu.lu@intel.com>
7891
7892 * elf.c (bfd_section_from_shdr): Maintain the section order in
7893 a section group.
7894 (special_sections): Add ".note.GNU-stack".
7895 (elf_fake_sections): Handle section group for relocatable
7896 link..
7897
bc87dd2e
L
78982004-04-30 H.J. Lu <hongjiu.lu@intel.com>
7899
7900 * section.c (bfd_sections_find_if): New.
7901 * bfd-in2.h: Regenerated.
7902
72adc230
AM
79032004-04-30 Alan Modra <amodra@bigpond.net.au>
7904
7905 * section.c (bfd_make_section_anyway): Add all sections to hash tab.
7906
7907 * elf-bfd.h (bfd_elf_is_group_section): Declare.
7908 * elf.c (bfd_elf_is_group_section): New function.
7909 * elfxx-target.h (bfd_elfNN_bfd_is_group_section
7910 * section.c (bfd_generic_is_group_section): New function.
7911 * targets.c (struct bfd_target): Add _bfd_is_group_section field.
7912 (BFD_JUMP_TABLE_LINK): Adjust.
7913 * aout-adobe.c (aout_32_bfd_is_group_section): Define.
7914 * aout-target.h (MY_bfd_is_group_section): Define.
7915 * aout-tic30.c (MY_bfd_is_group_section): Define.
7916 * bfd.c (bfd_is_group_section): Define.
7917 * binary.c (binary_bfd_is_group_section): Define.
7918 * bout.c (b_out_bfd_is_group_section): Define.
7919 * coff-alpha.c (_bfd_ecoff_bfd_is_group_section): Define.
7920 * coff-mips.c (_bfd_ecoff_bfd_is_group_section): Define.
7921 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Adjust.
7922 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Adjust.
7923 * coffcode.h (coff_bfd_is_group_section): Define.
7924 * i386msdos.c (msdos_bfd_is_group_section): Define.
7925 * i386os9k.c (os9k_bfd_is_group_section): Define.
7926 * ieee.c (ieee_bfd_is_group_section): Define.
7927 * ihex.c (ihex_bfd_is_group_section): Define.
7928 * libbfd-in.h (_bfd_nolink_bfd_is_group_section): Define.
7929 * mach-o.c (bfd_mach_o_bfd_is_group_section): Define.
7930 * mmo.c (mmo_bfd_is_group_section): Define.
7931 * nlm-target.h (nlm_bfd_is_group_section): Define.
7932 * oasys.c (oasys_bfd_is_group_section): Define.
7933 * pef.c (bfd_pef_bfd_is_group_section): Define.
7934 * ppcboot.c (ppcboot_bfd_is_group_section): Define.
7935 * srec.c (srec_bfd_is_group_section): Define.
7936 * tekhex.c (tekhex_bfd_is_group_section): Define.
7937 * versados.c (versados_bfd_is_group_section): Define.
7938 * vms.c (vms_bfd_is_group_section): Define.
7939 * xsym.c (bfd_sym_bfd_is_group_section): Define.
7940 * bfd-in2.h: Regenerate.
7941 * libbfd.h: Regenerate.
7942
20f0a1ad
AM
79432004-04-30 Alan Modra <amodra@bigpond.net.au>
7944
7945 * elflink.c (elf_gc_mark): Follow indirect and warning syms.
7946
f7458fc9 79472004-04-30 Hans-Peter Nilsson <hp@axis.com>
7dfb3b6b
HPN
7948
7949 * configure.in: Update version to 2.15.91.
7950 * configure: Regenerate.
7951
8a7140c3
NC
79522004-04-29 Brian Ford <ford@vss.fsi.com>
7953
7954 * bfd.c (bfd_get_sign_extend_vma): Add pe[i]-i386 case to DJGPP hack.
7955 * coffcode.h (DOT_DEBUG, GNU_LINKONCE_WI): Define.
7956 [!COFF_WITH_PE] (sec_to_styp_flags, styp_to_sec_flags): Use them.
7957 (coff_compute_section_file_positions) [RS6000COFF_C]: Likewise.
7958 [COFF_WITH_PE] (sec_to_styp_flags): Handle DWARF 2/3 .debug* and
7959 .gnu.linkonce.wi. sections.
7960 * pe-i386.c (COFF_SUPPORT_GNU_LINKONCE): Define.
7961 (COFF_SECTION_ALIGNMENT_ENTRIES): Add entries for .debug and
7962 .gnu.linkonce.wi..
7963 * pei-i386.c (COFF_SUPPORT_GNU_LINKONCE): Likewise.
7964 (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
7965
3e722fb5
CD
79662004-04-28 Chris Demetriou <cgd@broadcom.com>
7967
7968 * reloc.c: Remove BFD_RELOC_PCREL_HI16_S and BFD_RELOC_PCREL_LO16.
7969 * bfd-in2.h: Regenerate.
7970 * libbfd.h: Likewise.
7971
351e2b5a
DA
79722004-04-28 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
7973
7974 * som.c (struct som_misc_symbol_info): Add is_comdat, is_common and
7975 dup_common fields.
7976 (setup_sections): Use som_subspace_dictionary_record struct instead
7977 subspace_dictionary_record. Set SEC_LINK_ONCE if subspace is
7978 is_comdat, is_common or dup_common.
7979 (som_prep_headers): Use som_subspace_dictionary_record struct. Set
7980 is_comdat, is_common and dup_common in section subspace_dict from
7981 copy_data.
7982 (som_begin_writing): Use som_subspace_dictionary_record struct.
7983 (som_finish_writing): Likewise.
7984 (som_bfd_derive_misc_symbol_info): Add support to set is_comdat,
7985 is_common and dup_common flags in info for symbol. Add comment
7986 regarding linker support for these fields. Slightly reorganize
7987 function.
7988 (som_build_and_write_symbol_table): Set is_comdat, is_common and
7989 dup_common fields in symbol table from symbol info.
7990 (bfd_som_set_subsection_attributes): Add comdat, common and dup_common
7991 arguments. Set corresponding fields in copy_data. Change all callers.
7992 (som_bfd_ar_write_symbol_stuff): Set dup_common flag in library
7993 symbol table.
7994 (som_vec): Add SEC_LINK_ONCE to applicable section flags.
7995 * som.h (som_subspace_dictionary_record): Define.
7996 (som_copyable_section_data_struct): Add is_comdat, is_common and
7997 dup_common fields.
7998 (som_section_data_struct): Use som_subspace_dictionary_record struct
7999 instead of subspace_dictionary_record.
8000 (bfd_boolean bfd_som_set_subsection_attributes): Adjust prototype.
8001
3ba3bc8c
BW
80022004-04-27 Bob Wilson <bob.wilson@acm.org>
8003
8004 * elf32-xtensa.c (xtensa_read_table_entries): Use section _cooked_size
8005 if set. Check reloc_done flag before applying relocations. Use
8006 output addresses, both when applying relocations and when comparing
8007 against the specified section.
8008 (elf_xtensa_relocate_section): Use output address to check if dynamic
8009 reloc is in a literal pool. Set section's reloc_done flag.
8010
beb8df56
L
80112004-04-27 H.J. Lu <hongjiu.lu@intel.com>
8012
8013 * elf32-sh64.c (elf_backend_section_flags): New. Defined.
8014 (sh64_elf_set_mach_from_flags): Remove the kludge for .cranges
8015 section.
8016 (sh64_elf_section_flags): New. Set SEC_DEBUGGING for .cranges
8017 section.
8018
1829f4b2
AM
80192004-04-27 Alan Modra <amodra@bigpond.net.au>
8020
8021 * elf64-alpha.c (elf64_alpha_read_ecoff_info): Don't assign
8022 structure field removed in 2004-04-24 patch.
8023 * elf64-sparc.c (sparc64_elf_plt_sym_val): Warning fix.
8024
8025 * elf-bfd.h (struct elf_backend_data <elf_backend_section_flags>):
8026 Constify hdr arg.
8027 * elf32-arm.h (elf32_arm_section_flags): Likewise.
8028 * elf64-alpha.c (elf64_alpha_section_flags): Likewise.
8029 * elfxx-ia64.c (elfNN_ia64_section_flags): Likewise.
8030 * elf.c (_bfd_elf_make_section_from_shdr): Set the bfd_section
8031 field before calling elf_backend_section_flags.
8032
4030e8f6
CD
80332004-04-24 Chris Demetriou <cgd@broadcom.com>
8034
8035 * elf32-mips.c (elf_mips_gnu_rel_hi16, elf_mips_gnu_rel_lo16)
8036 (elf_mips_gnu_pcrel64, elf_mips_gnu_pcrel32): Remove.
8037 (bfd_elf32_bfd_reloc_type_lookup): Remove cases for
8038 BFD_RELOC_PCREL_HI16_S, BFD_RELOC_PCREL_LO16, BFD_RELOC_64_PCREL,
8039 and BFD_RELOC_32_PCREL.
8040 (mips_elf32_rtype_to_howto): Remove cases for R_MIPS_GNU_REL_HI16,
8041 R_MIPS_GNU_REL_LO16, R_MIPS_PC64, R_MIPS_PC32.
8042 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
8043 (_bfd_mips_elf_lo16_reloc): Remove handling for R_MIPS_GNU_REL_HI16.
8044 (mips_elf_next_relocation): Move comment about matching HI/LO
8045 relocations to...
8046 (_bfd_mips_elf_relocate_section): Here. Remove handling for
8047 R_MIPS_GNU_REL_HI16.
8048
3e27568f
CD
80492004-04-23 Chris Demetriou <cgd@broadcom.com>
8050
8051 * coff-mips.c (mips_relhi_reloc, mips_rello_reloc)
8052 (mips_switch_reloc, mips_read_relocs, mips_relax_section)
8053 (mips_relax_pcrel16, PCREL16_EXPANSION_ADJUSTMENT): Remove.
8054 (mips_relocate_hi): Remove now-unused 'adjust' and 'pcrel' arguments,
8055 and update comments to reflect current usage.
8056 (mips_howto_table): Remove entries for MIPS_R_RELHI, MIPS_R_RELLO,
8057 and MIPS_R_SWITCH, as well as several empty entries. Update comment
8058 for MIPS_R_PCREL16.
8059 (mips_ecoff_swap_reloc_in, mips_ecoff_swap_reloc_out)
8060 (mips_adjust_reloc_out, mips_bfd_reloc_type_lookup): Remove support
8061 for MIPS_R_SWITCH, MIPS_R_RELLO, and MIPS_R_RELHI relocations.
8062 (mips_adjust_reloc_in): Likewise, adjust maximum accepted relocation
8063 type number to be MIPS_R_PCREL16.
8064 (mips_relocate_section): Remove support for link-time relaxation
8065 of branches used by embedded-PIC. Remove support for MIPS_R_SWITCH,
8066 MIPS_R_RELLO, and MIPS_R_RELHI relocations.
8067 (_bfd_ecoff_bfd_relax_section): Redefine to bfd_generic_relax_section.
8068 * ecoff.c (ecoff_indirect_link_order): Remove support for link-time
8069 relaxation of branches used by embedded-PIC.
8070 * ecofflink.c (bfd_ecoff_debug_accumulate): Likewise.
8071 * libecoff.h (struct ecoff_section_tdata): Remove embedded-PIC
8072 related members, update comment.
8073 * pe-mips.c: Remove disabled (commented-out and #if 0'd)
8074 code related to embedded-PIC.
8075 * elfxx-mips.c (_bfd_mips_elf_read_ecoff_info): Remove
8076 initialization of now-removed 'adjust' member of
8077 'struct ecoff_debug_info'.
8078
b32de0bc 80792004-04-23 Chris Demetriou <cgd@broadcom.com>
8472310d
CD
8080
8081 * elfxx-mips.c (mips_elf_get_global_gotsym_index): Remove.
8082
955af222
PB
80832004-04-21 Philip Blundell <pb@nexus.co.uk>
8084
8085 * elf32-arm.h (elf32_arm_check_relocs): Don't output REL32
8086 relocs for locally defined symbols during -shared final link.
8087 (elf32_arm_final_link_relocate): Likewise.
8088
47a9f7b3
JJ
80892004-04-22 Jakub Jelinek <jakub@redhat.com>
8090
8091 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Copy also
8092 ELF_LINK_POINTER_EQUALITY_NEEDED.
8093 (elf64_x86_64_check_relocs): Set ELF_LINK_POINTER_EQUALITY_NEEDED
8094 if r_type is not R_X86_64_PC32.
8095 (elf64_x86_64_finish_dynamic_symbol): If
8096 ELF_LINK_POINTER_EQUALITY_NEEDED is not set, clear st_value of
8097 SHN_UNDEF symbols.
8098
1f1799d5
KK
80992004-04-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
8100
8101 * elf32-sh.c (sh_elf_plt_sym_val): New function.
8102 (elf_backend_plt_sym_val): Define.
8103
0fdea5ce
AC
81042004-04-22 Andrew Cagney <cagney@redhat.com>
8105
8106 * opncls.c (bfd_alloc): Fix type of "wanted" in doco.
8107
5198ba8b
DA
81082004-04-22 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
8109
eb61d2d6 8110 * hpux-core.c (hpux_core_core_file_p): Add cast in call to
5198ba8b
DA
8111 make_bfd_asection.
8112 * som.c (som_set_section_contents): Constantify second argument.
8113 (hppa_som_gen_reloc_type): Abort for unsupported selectors.
8114 (som_object_setup): Rework to avoid warning.
8115 (setup_sections, som_write_fixups, bfd_section_from_som_symbol):
8116 Likewise.
8117
fe2e161a
AC
81182004-04-22 Andrew Cagney <cagney@redhat.com>
8119
8120 * cache.c (bfd_cache_close): Check for a previously closed file.
8121
4c45e5c9
JJ
81222004-04-22 Jakub Jelinek <jakub@redhat.com>
8123
8124 * bfd.c (bfd_get_synthetic_symtab): Define.
8125 * targets.c (BFD_JUMP_TABLE_DYNAMIC): Add
8126 NAME##_get_synthetic_symtab.
8127 (struct bfd_target): Add _bfd_get_synthetic_symtab.
8128 * libbfd-in.h (_bfd_nodynamic_get_synthetic_symtab): Define.
8129 * elf-bfd.h (struct elf_backend_data): Add plt_sym_val and
8130 relplt_name fields.
8131 (_bfd_elf_get_synthetic_symtab): New prototype.
8132 * elfcode.h (elf_get_synthetic_symtab): Define.
8133 * elf.c (_bfd_elf_get_synthetic_symtab): New function.
8134 * elfxx-target.h (bfd_elfNN_get_synthetic_symtab): Define.
8135 (elf_backend_plt_sym_val, elf_backend_relplt_name): Define.
8136 (elfNN_bed): Add elf_backend_plt_sym_val and elf_backend_relplt_name.
8137 * bfd-in2.h: Rebuilt.
8138 * libbfd.h: Rebuilt.
8139 * elf32-i386.c (elf_i386_plt_sym_val): New function.
8140 (elf_backend_plt_sym_val): Define.
8141 * elf64-x86-64.c (elf64_x86_64_plt_sym_val): New function.
8142 (elf_backend_plt_sym_val): Define.
8143 * elf32-s390.c (elf_s390_plt_sym_val): New function.
8144 (elf_backend_plt_sym_val): Define.
8145 * elf64-s390.c (elf_s390_plt_sym_val): New function.
8146 (elf_backend_plt_sym_val): Define.
8147 * elf32-sparc (elf32_sparc_plt_sym_val): New function.
8148 (elf_backend_plt_sym_val): Define.
8149 * elf64-sparc.c (sparc64_elf_plt_sym_val): New function.
8150 (elf_backend_plt_sym_val): Define.
8151 * elf32-ppc.c (ppc_elf_plt_sym_val): New function.
8152 (elf_backend_plt_sym_val): Define.
8153 * aout-target.h (MY_get_synthetic_symtab): Define.
8154 * aout-tic30.c (MY_get_synthetic_symtab): Define.
8155 * coff-rs6000.c (rs6000coff_vec): Add
8156 _bfd_nodynamic_get_synthetic_symtab.
8157 (pmac_xcoff_vec): Likewise.
8158 * coff64-rs6000.c (rs6000coff64_vec): Add
8159 _bfd_nodynamic_get_synthetic_symtab.
8160 (aix5coff64_vec): Likewise.
8161 * sunos.c (MY_get_synthetic_symtab): Define.
8162 * vms.c (vms_get_synthetic_symtab): Define.
8163
d2f7ecac
NC
81642004-04-22 Nick Clifton <nickc@redhat.com>
8165
8166 * bfd.c (bfd_archive_filename): Return NULL on NULL input.
8167
fd99574b
NC
81682004-04-22 Peter Barada <peter@the-baradas.com>
8169
8170 * archures.c: Add bfd_mach_mcfv4e to bfd_architecture.
8171 * bfd2-in.h: Regenerate.
8172 * cpu-m68k.c: Add 'm68k:mcfv4e' to arch_info_struct[].
8173
23867d67
CD
81742004-04-21 Chris Demetriou <cgd@broadcom.com>
8175
8176 * coff-mips.c (bfd_mips_ecoff_create_embedded_relocs): Remove.
8177 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Remove.
8178 * bfd-in.h (bfd_mips_ecoff_create_embedded_relocs)
8179 (bfd_mips_elf32_create_embedded_relocs): Remove prototypes
8180 * bfd-in2.h: Regenerate.
8181
2c8c90bc
BW
81822004-04-21 Bob Wilson <bob.wilson@acm.org>
8183
8184 * elf32-xtensa.c (is_same_value): Add final_static_link argument and
8185 require relocations against a weak symbol to reference the same
8186 symbol hash entry if not a final, static link.
8187 (get_cached_value, add_value_map): Add final_static_link argument.
8188 (remove_literals): Pass final_static_link argument as needed.
8189
40838a72
AC
81902004-04-21 Andrew Cagney <cagney@redhat.com>
8191
8192 * opncls.c (_bfd_new_bfd_contained_in): Copy "iovec".
8193 (struct opncls, opncls_btell, opncls_bseek, opncls_bread)
8194 (opncls_bwrite, opncls_bclose, opncls_bflush)
8195 (opncls_bstat, opncls_iovec, bfd_openr_iovec): Implement a
8196 bfd iovec that uses function callbacks.
8197 (bfd_close): Use the iovec's bclose.
8198 * cache.c (cache_btell, cache_bseek, cache_bread, cache_bwrite)
8199 (cache_bclose, cache_bflush, cache_bstat)
8200 (cache_iovec): New functions and global variable, implement a
8201 cache "iovec", where applicable set bfd_error.
8202 (bfd_cache_init, bfd_cache_close): Set/test the bfd's iovec.
8203 * bfdio.c (struct bfd_iovec): Define.
8204 (real_read): Delete function.
8205 (bfd_bread, bfd_bread, bfd_bwrite, bfd_tell, bfd_flush, bfd_stat)
8206 (bfd_seek, bfd_get_mtime, bfd_get_size): Use the bfd's "iovec",
8207 assume that bread and bwrite set bfd_error.
8208 * bfd.c (struct bfd): Add "iovec", update comments.
8209 * bfd-in2.h, libbfd.h: Re-generate.
8210
7f919c84
AC
82112004-04-21 Andrew Cagney <cagney@redhat.com>
8212
8213 * libaout.h (enum machine_type): Add M_POWERPC_NETBSD.
8214
715df9b8
EB
82152004-04-21 Eric Botcazou <ebotcazou@act-europe.fr>
8216
8217 * elflink.c (elf_gc_mark_dynamic_ref_symbol): New function.
8218 (bfd_elf_gc_sections): Fail if a shared object is being created.
8219 Do not fail if dynamic sections have been created. Instead call
8220 elf_gc_mark_dynamic_ref_symbol to mark sections that contain
8221 dynamically referenced symbols. Do not mark the whole graph
8222 rooted at .eh_frame, only the section proper.
8223
6482c264
NC
82242004-04-20 DJ Delorie <dj@redhat.com>
8225
8226 * reloc.c: Add BFD_RELOC_32_SECREL.
8227 * bfd-in2.h: Regenerate.
8228 * libbfd.h: Likewise.
8229 * coff-i386.c (howto_table) [COFF_WITH_PE]: Add R_SECREL32.
8230 (coff_i386_rtype_to_howto) [COFF_WITH_PE]: Handle it.
8231 (coff_i386_reloc_type_lookup) [COFF_WITH_PE]: Likewise.
8232
4dc570c2
JJ
82332004-04-19 Jakub Jelinek <jakub@redhat.com>
8234
8235 * elf32-sparc.c (elf32_sparc_relocate_section): Handle
8236 relocs against hidden/protected undefweak symbols properly.
8237 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
8238
0b60d5d3
MK
82392004-04-18 Mark Kettenis <kettenis@gnu.org>
8240
8241 * libaout.h (enum machine_type): Add M_POWERPC_NETBSD.
8242 * netbsd-core.c (netbsd_core_file_p): Set architecture for PowerPC
8243 core files.
8244
d48bdb99
AM
82452004-04-17 Brian Ford <ford@vss.fsi.com>
8246
8247 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Use the first non-zero
8248 filepos for the SizeOfHeaders field.
8249 (_bfd_XXi_swap_scnhdr_out): Correct section flags lossage on reloc
8250 overflow.
8251 (_bfd_XXi_swap_sym_in): Remove redundant section flags assignment.
8252
57a1784e
AM
82532004-04-16 Alan Modra <amodra@bigpond.net.au>
8254
8255 * simple.c (bfd_simple_get_relocated_section_contents): Don't
8256 change reloc_done. Set and restore _cooked_size.
8257 (RETURN): Delete.
8258
d1ad3f6f
MK
82592004-04-15 Mark Kettenis <kettenis@gnu.org>
8260
8261 * netbsd-core.c (netbsd_core_file_p): Set architecture for VAX
8262 core files.
8263
3d1bca9d
NC
82642004-04-15 Nick Clifton <nickc@redhat.com>
8265
8266 * bfd.c (bfd_archive_filename): Catch NULL bfd pointers.
8267
019b892f
AM
82682004-04-15 Alan Modra <amodra@bigpond.net.au>
8269
8270 * elf64-sparc.c (sparc64_elf_check_relocs): Fix thinko last change.
8271
15b43f48
AM
82722004-04-15 H.J. Lu <hongjiu.lu@intel.com>
8273
8274 * elflink.c (_bfd_elf_merge_symbol): Treat weak as strong only
8275 when it is a definition.
8276
6de00a78
AM
82772004-04-14 Alan Modra <amodra@bigpond.net.au>
8278
8279 * elf32-sparc.c (elf32_sparc_relocate_section): Don't abort
8280 when statically linking PIC code.
8281 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
8282
279500de
TS
82832004-04-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8284
8285 * config.bfd: Remove mips*-*-mach3* and mips*-dec-mach3* targets.
8286 * configure.in: Remove mips-dec-bsd*, mips-dec-mach3*, mips-*-mach3*
8287 targets amd aout_mips_big_vec, aout_mips_little_vec target vectors.
8288 * configure: Regenerate.
8289
ccf2f652
RS
82902004-04-08 Richard Sandiford <rsandifo@redhat.com>
8291
8292 * elflink.c: Include libiberty.h.
8293 * Makefile.am (elflink.lo): Depend on libiberty.h.
8294 * Makefile.in: Regenerate.
8295
ca07892d
DJ
82962004-04-06 Daniel Jacobowitz <drow@mvista.com>
8297
8298 * elfxx-mips.c (MIPS_ELF_STUB_SECTION_NAME): Always use
8299 ".MIPS.stubs".
8300
a5a58ba4
L
83012004-04-05 H.J. Lu <hongjiu.lu@intel.com>
8302
8303 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Always
8304 reserve the memory for dynamic linker
8305
24d18d30
MK
83062004-04-05 Mark Kettenis <kettenis@gnu.org>
8307
8308 * netbsd-core.c (CORE_WCOOKIE_OFFSET): New define.
8309 (netbsd_core_file_p): Create a .wcookie section for OpenBSD/sparc.
8310
a4d7b4b5
L
83112004-04-02 H.J. Lu <hongjiu.lu@intel.com>
8312
8313 * elf32-cr16c.c (elf32_cr16c_relocate_section): Use
8314 RELOC_FOR_GLOBAL_SYMBOL.
8315 (elf32_cr16c_add_symbol_hook): Remove const from Elf_Internal_Sym.
8316
1f433d93
L
83172004-04-02 H.J. Lu <hongjiu.lu@intel.com>
8318
8319 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
8320 R_ARM_ALU* only if OLD_ARM_ABI is not defined.
8321
e489d0ae
PB
83222004-04-01 Paul Brook <paul@codesourcery.com>
8323
8324 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update.
8325 * elf32-arm.h (struct elf32_elf_section_map): New.
8326 (struct _arm_elf_section_data): New.
8327 (elf32_arm_section_data): Define.
8328 (struct elf32_arm_link_hash_table): Add byteswap_code.
8329 (elf32_arm_link_hash_table_create): Initialize byteswap_code.
8330 (bfd_elf32_arm_process_before_allocation): Add byteswap_code.
8331 (elf32_arm_post_process_headers): Set EF_ARM_BE8.
8332 (elf32_arm_output_symbol_hook, elf32_arm_new_section_hook,
8333 elf32_arm_compare_mapping, elf32_arm_write_section): New functions.
8334 (bfd_elf32_new_section_hook, elf_backend_write_section,
8335 elf_backend_link_output_symbol_hook): Define.
8336
66a695f0
NC
83372004-04-01 Andy Chittenden <achittenden@bluearc.com>
8338
8339 * stabs.c (struct stab_link_includes_totals): Add field 'symb'
8340 that keeps the characters in a B_INCL..B_EINCL range.
8341 (_bfd_link_section_stabs): When computing the sum of the
8342 characters in a B_INCL..B_EINCL range also keep a copy of those
8343 characters. Use this information to distinguish between
8344 include sections that have the same sum and the same length
8345 but which are nevertheless unique.
8346
8375c36b
PB
83472004-03-31 Paul Brook <paul@codesourcery.com>
8348
8349 * elf32-arm.h (elf32_arm_final_link_relocate): Add R_ARM_ALU*.
8350 * elfarm-nabi.c (elf32_arm_howto_table): Ditto.
8351
a56b48eb
NC
83522004-03-31 Andy Chittenden <achittenden@bluearc.com>
8353
8354 * stabs.c (struct stab_link_includes_totals): Rename field 'total'
8355 to 'sum_chars' and add field 'num_chars'.
8356 (_bfd_link_section_stabs): When computing the sum of the
8357 characters in a B_INCL..B_EINCL range also keep a count of the
8358 number of characters. Use this information to help distinguish
8359 between include sections when have the same sum but which
8360 nevertheless are still unique.
8361
1fbc7e7a 83622004-03-31 Mattias Engdegård <mattias@virtutech.se>
3d456464
NC
8363
8364 * stabs.c (_bfd_link_section_stabs): Do not skip N_EXCL stabs.
8365
0949843d 83662004-03-30 Galit Heller <Galit.Heller@nsc.com>
eb61d2d6 8367 Tomer Levi <Tomer.Levi@nsc.com>
0949843d
NC
8368
8369 * Makefile.am (ALL_MACHINES): Add cpu-cr16c.lo.
8370 (ALL_MACHINES_CFILES): Add cpu-cr16c.c.
8371 (BFD32_BACKENDS): Add elf32-cr16c.lo.
8372 (BFD32_BACKENDS_CFILES): Add elf32-cr16c.c.
8373 (cpu-cr16c.lo): New target.
8374 (elf32-cr16c.lo): Likewise.
8375 * Makefile.in: Regenerate.
8376 * archures.c (bfd_architecture): Add bfd_{arch,mach}_cr16c.
8377 (bfd_archures_list): Add bfd_cr16c_arch.
8378 * config.bfd: Handle cr16c-*-elf*.
8379 * configure.in: Handle bfd_elf32_cr16c_vec.
8380 * configure: Regenerate.
8381 * reloc.c: Add BFD_RELOC_16C_NUM08, BFD_RELOC_16C_NUM08_C,
8382 BFD_RELOC_16C_NUM16, BFD_RELOC_16C_NUM16_C,
8383 BFD_RELOC_16C_NUM32, BFD_RELOC_16C_NUM32_C,
8384 BFD_RELOC_16C_DISP04, BFD_RELOC_16C_DISP04_C,
8385 BFD_RELOC_16C_DISP08, BFD_RELOC_16C_DISP08_C,
8386 BFD_RELOC_16C_DISP16, BFD_RELOC_16C_DISP16_C,
8387 BFD_RELOC_16C_DISP24, BFD_RELOC_16C_DISP24_C,
8388 BFD_RELOC_16C_DISP24a, BFD_RELOC_16C_DISP24a_C,
8389 BFD_RELOC_16C_REG04, BFD_RELOC_16C_REG04_C,
8390 BFD_RELOC_16C_REG04a, BFD_RELOC_16C_REG04a_C,
8391 BFD_RELOC_16C_REG14, BFD_RELOC_16C_REG14_C,
8392 BFD_RELOC_16C_REG16, BFD_RELOC_16C_REG16_C,
8393 BFD_RELOC_16C_REG20, BFD_RELOC_16C_REG20_C,
8394 BFD_RELOC_16C_ABS20, BFD_RELOC_16C_ABS20_C,
8395 BFD_RELOC_16C_ABS24, BFD_RELOC_16C_ABS24_C,
8396 BFD_RELOC_16C_IMM04, BFD_RELOC_16C_IMM04_C,
8397 BFD_RELOC_16C_IMM16, BFD_RELOC_16C_IMM16_C,
8398 BFD_RELOC_16C_IMM20, BFD_RELOC_16C_IMM20_C,
8399 BFD_RELOC_16C_IMM24, BFD_RELOC_16C_IMM24_C,
8400 BFD_RELOC_16C_IMM32, BFD_RELOC_16C_IMM32_C.
8401 * targets.c (bfd_elf32_cr16c_vec): Declare.
8402 (bfd_target_vector): Add bfd_elf32_cr16c_vec.
8403 * cpu-cr16c.c: New file.
8404 * elf32-cr16c.c: Likewise.
8405 * libbfd.h: Regenerate.
8406 * bfd-in2.h: Likewise.
8407
baaff79e
JJ
84082004-03-30 Jakub Jelinek <jakub@redhat.com>
8409
8410 * elf.c (map_sections_to_segments): Fix handling of .tbss.
8411
c152c796
AM
84122004-03-27 Alan Modra <amodra@bigpond.net.au>
8413
8414 * Makefile.am: Remove all mention of elflink.h.
8415 * Makefile.in: Regenerate.
8416 * bfd-in.h (bfd_elf_discard_info): Declare.
8417 (bfd_elf32_discard_info, bfd_elf64_discard_info): Delete.
8418 * bfd-in2.h: Regenerate.
8419 * elf-bfd.h (bfd_elf32_print_symbol, bfd_elf64_print_symbol,
8420 bfd_elf32_link_record_dynamic_symbol,
8421 bfd_elf64_link_record_dynamic_symbol,
8422 _bfd_elf_link_record_dynamic_symbol, bfd_elf32_bfd_final_link,
8423 bfd_elf64_bfd_final_link, elf_link_record_local_dynamic_symbol,
8424 _bfd_elf32_link_record_local_dynamic_symbol,
8425 _bfd_elf64_link_record_local_dynamic_symbol,
8426 _bfd_elf32_gc_sections, _bfd_elf32_gc_common_finalize_got_offsets,
8427 _bfd_elf32_gc_common_final_link, _bfd_elf64_gc_common_final_link,
8428 _bfd_elf32_gc_record_vtinherit, _bfd_elf32_gc_record_vtentry,
8429 _bfd_elf64_gc_sections, _bfd_elf64_gc_common_finalize_got_offsets,
8430 _bfd_elf64_gc_record_vtinherit, _bfd_elf64_gc_record_vtentry,
8431 _bfd_elf32_reloc_symbol_deleted_p,
8432 _bfd_elf64_reloc_symbol_deleted_p): Delete.
8433 (bfd_elf_link_record_dynamic_symbol,
8434 bfd_elf_link_record_local_dynamic_symbol,
8435 bfd_elf_final_link, bfd_elf_gc_sections,
8436 bfd_elf_gc_record_vtinherit, bfd_elf_gc_record_vtentry,
8437 bfd_elf_gc_common_finalize_got_offsets, bfd_elf_gc_common_final_link,
8438 bfd_elf_reloc_symbol_deleted_p): Declare.
8439 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
8440 * elf32-arm.h: Update for changed function names. Remove local
8441 WILL_CALL_FINISH_DYNAMIC_SECTION define.
8442 * elf-hppa.h, elf-m10300.c, elf32-cris.c, elf32-d10v.c, elf32-dlx.c,
8443 * elf32-fr30.c, elf32-frv.c, elf32-h8300.c, elf32-hppa.c, elf32-i386.c,
8444 * elf32-iq2000.c, elf32-m32r.c, elf32-m68hc1x.c, elf32-m68k.c,
8445 * elf32-mcore.c, elf32-openrisc.c, elf32-ppc.c, elf32-s390.c,
8446 * elf32-sh.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
8447 * elf32-xstormy16.c, elf32-xtensa.c, elf64-alpha.c, elf64-hppa.c,
8448 * elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c, elf64-sparc.c,
8449 * elf64-x86-64.c, elfxx-ia64.c, elfxx-mips.c, elfxx-target.h: Likewise.
8450 * elfxx-target.h (bfd_elfNN_bfd_final_link): Define.
8451 (bfd_elfNN_print_symbol): Define.
8452 * elfcode.h: Don't include elflink.h.
8453 (elf_bfd_discard_info, elf_reloc_symbol_deleted_p,
8454 elf_link_record_dynamic_symbol, elf_bfd_final_link, elf_gc_sections,
8455 elf_gc_common_finalize_got_offsets, elf_gc_common_final_link,
8456 elf_gc_record_vtinherit, elf_gc_record_vtentry,
8457 elf_link_record_local_dynamic_symbol): Don't define.
8458 * elflink.c: Update for changed function names. Move elflink.h
8459 code here.
8460 * elflink.h: Delete file.
8461 * po/SRC-POTFILES.in: Regenerate.
8462 * po/bfd.pot: Regenerate.
8463
6a9cae7f
AM
84642004-03-27 Alan Modra <amodra@bigpond.net.au>
8465
8466 * elf64-mmix.c (mmix_elf_relocate_section): Restore code setting
8467 "name" for global syms accidentally removed in 2004-03-20 change.
8468
140f6c8e
AM
84692004-03-27 Alan Modra <amodra@bigpond.net.au>
8470
8471 * elf-bfd.h (struct elf_reloc_cookie): Add r_sym_shift field.
8472 * elflink.h: Replace all occurrences of sizeof (Elf_External_*)
8473 where Elf_External_* is different for 64 and 32 bit, with
8474 corresponding elf_size_info field.
8475 (struct elf_final_link_info): Use "bfd_byte *" instead
8476 of "Elf_External_Sym *" for external_syms and symbuf.
8477 (elf_link_adjust_relocs): Set up r_type_mask and r_sym_shift local
8478 vars and use instead of ELF_R_INFO and ELF_R_TYPE macros.
8479 (struct elf_link_sort_rela): Add "sym_mask" alias for "offset".
8480 (elf_link_sort_cmp1): Use sym_mask field instead of ELF_R_SYM.
8481 (elf_link_sort_cmp2): Adjust.
8482 (elf_link_sort_relocs): Set up r_sym_mask local var instead of
8483 using ELF_R_SYM macro. Set u.sym_mask.
8484 (elf_bfd_final_link): Call _bfd_elf_stringtab_init instead of macro
8485 version, elf_stringtab_init. Ditto for bfd_section_from_elf_index
8486 vs. section_from_elf_index. Adjust Elf_External_Sym pointer
8487 arithmetic. Pass bed to elf_link_flush_output_syms. Adjust
8488 Elf_External_Dyn pointer arithmentic. Use bed swap_dyn_in and
8489 swap_syn_out functions. Rearrange dyn swap in/out switch.
8490 (elf_link_output_sym): Adjust Elf_External_Sym pointer arithmentic.
8491 Pass bed to elf_link_flush_output_syms. Use bed swap_symbol_out.
8492 (elf_link_flush_output_syms): Add elf_backend_data arg.
8493 (elf_link_check_versioned_symbol): Likewise.
8494 (elf_link_output_extsym): Pass bed to elf_link_check_versioned_symbol.
8495 Adjust Elf_External_Sym pointer arithmetic. Use bed swap_symbol_out.
8496 (elf_link_input_bfd): Use bfd_section_from_elf_index. Set up
8497 r_type_mask and r_sym_shift local vars and use instead of ELF_R_SYM,
8498 ELF_R_TYPE and ELF_R_INFO macros.
8499 (elf_reloc_link_order): Select ELF32_R_INFO or ELF64_R_INFO invocation
8500 based on size rather than using ELF_R_INFO.
8501 (elf_gc_mark): Set up r_sym_shift local var and use instead of
8502 ELF_R_SYM macro.
8503 (struct alloc_got_off_arg): New.
8504 (elf_gc_common_finalize_got_offsets): Use elf_size_info instead of
8505 ARCH_SIZE. Pass get entry size down to elf_gc_allocate_got_offsets.
8506 (elf_gc_allocate_got_offsets): Adjust.
8507 (elf_reloc_symbol_deleted_p): Usee cookie.r_sym_shift instead of
8508 ELF_R_SYM. Use bfd_section_from_elf_index.
8509 (elf_bfd_discard_info): Set cookie.r_sym_shift.
8510 * elfcode.h (elf_stringtab_init, section_from_elf_index): Delete.
8511 (elf_slurp_symbol_table): Use bfd_section_from_elf_index.
8512
14bde378
SS
85132004-03-26 Stan Shebs <shebs@apple.com>
8514
8515 Remove MPW support, no longer used.
8516 * config.bfd (powerpc-*-mpw*): Remove configuration.
8517 * mpw-config.in, mpw-make.sed: Remove files.
8518 * ecoffswap.h [MPW_C]: Remove MPW-C-friendly version of code.
8519
555cd476
AM
85202004-03-26 Alan Modra <amodra@bigpond.net.au>
8521
8522 * elf64-ppc.c (elf_backend_add_symbol_hook): Define.
8523 (ppc64_elf_add_symbol_hook): New function.
8524 * elf-bfd.h (struct elf_backend_data <elf_add_symbol_hook>): Remove
8525 const from Elf_Internal_Sym param.
8526 * elflink.c (elf_link_add_object_symbols): Adjust.
8527 * elf-hppa.h (elf_hppa_add_symbol_hook): Adjust.
8528 * elf32-frv.c (elf32_frv_add_symbol_hook): Adjust.
8529 * elf32-i370.c (elf_backend_add_symbol_hook): Adjust.
8530 * elf32-m32r.c (m32r_elf_add_symbol_hook): Adjust.
8531 * elf32-m68hc1x.c (elf32_m68hc11_add_symbol_hook): Adjust.
8532 * elf32-m68hc1x.h (elf32_m68hc11_add_symbol_hook): Adjust.
8533 * elf32-ppc.c (ppc_elf_add_symbol_hook): Adjust.
8534 * elf32-sh64.c (sh64_elf_add_symbol_hook): Adjust.
8535 * elf32-v850.c (v850_elf_add_symbol_hook): Adjust.
8536 * elf64-alpha.c (elf64_alpha_add_symbol_hook): Adjust.
8537 * elf64-mmix.c (mmix_elf_add_symbol_hook): Adjust.
8538 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Adjust.
8539 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Adjust.
8540 * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Adjust.
8541 * elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Adjust.
8542 * elfxx-mips.h (_bfd_mips_elf_add_symbol_hook): Adjust.
8543
4ad4eba5
AM
85442004-03-26 Alan Modra <amodra@bigpond.net.au>
8545
8546 * elfxx-target.h (bfd_elfNN_bfd_link_add_symbols): Define.
8547 * elf-bfd.h (_bfd_elf_link_add_archive_symbols): Delete.
8548 (_bfd_elf_sort_symbol, _bfd_elf_add_dt_needed_tag): Delete.
8549 (_bfd_elf_finalize_dynstr, bfd_elf32_bfd_link_add_symbols): Delete.
8550 (bfd_elf64_bfd_link_add_symbols): Delete.
8551 (bfd_elf_link_add_symbols): Declare.
8552 * elfcode.h (elf_bfd_link_add_symbols): Delete.
8553 * elflink.c: Include safe-ctype.h.
8554 (elf_add_dt_needed_tag): Rename from _bfd_elf_add_dt_needed_tag,
8555 make static.
8556 (elf_sort_symbol): Rename from _bfd_elf_sort_symbol, make static.
8557 (elf_finalize_dynstr): Rename from _bfd_elf_finalize_dynstr, make
8558 static.
8559 (elf_link_add_archive_symbols): Rename from
8560 _bfd_elf_link_add_archive_symbols, make static.
8561 (elf_link_add_object_symbols): New function. Corresponding
8562 elflink.h function converted to use elf_size_info.
8563 (bfd_elf_link_add_symbols): Likewise.
8564 (bfd_elf_size_dynamic_sections): Adjust.
8565 * elflink.h (elf_bfd_link_add_symbols): Delete.
8566 (elf_link_add_object_symbols): Delete.
8567 * elf32-gen.c (elf32_generic_link_add_symbols): Call
8568 bfd_elf_link_add_symbols.
8569 * elf64-gen.c (elf64_generic_link_add_symbols): Likewise.
8570
5a580b3a
AM
85712004-03-25 Alan Modra <amodra@bigpond.net.au>
8572
8573 * elflink.h (elf_link_add_object_symbols): Add DT_NEEDED for as-needed
8574 and chained shared libs only if dynsym. Clear dynsym on forced-local.
c152c796 8575
5a580b3a
AM
8576 * elf-bfd.h (_bfd_elf_add_dynamic_entry): Declare.
8577 (bfd_elf32_add_dynamic_entry, bfd_elf64_add_dynamic_entry): Delete.
8578 (_bfd_elf_add_dt_needed_tag): Declare.
8579 (_bfd_elf_sort_symbol): Declare.
8580 (_bfd_elf_finalize_dynstr): Declare.
8581 (RELOC_FOR_GLOBAL_SYM): Formatting.
8582 * elfcode.h (elf_add_dynamic_entry): Delete.
8583 * elflink.c (_bfd_elf_add_dynamic_entry): New function. Corresponding
8584 elflink.h function converted to use elf_size_info.
8585 (_bfd_elf_add_dt_needed_tag): Likewise.
8586 (_bfd_elf_sort_symbol): Likewise.
8587 (_bfd_elf_finalize_dynstr): Likewise.
8588 (compute_bucket_count): Likewise.
8589 (bfd_elf_size_dynamic_sections): Likewise. Check result of
8590 _bfd_elf_strtab_add before calling _bfd_elf_strtab_addref.
8591 (elf_adjust_dynstr_offsets, elf_collect_hash_codes): Moved from..
8592 * elflink.h: ..here.
8593 (sort_symbol, add_dt_needed_tag): Delete.
8594 (elf_add_dynamic_entry, elf_finalize_dynstr): Delete.
8595 (compute_bucket_count, NAME(bfd_elf,size_dynamic_sections)): Delete.
8596 Update all users.
8597 * elf32-arm.h (add_dynamic_entry): Update. Remove casts.
8598 * elf32-cris.c (add_dynamic_entry): Likewise.
8599 * elf32-hppa.c (add_dynamic_entry): Likewise.
8600 * elf32-i370.c (add_dynamic_entry): Likewise.
8601 * elf32-i386.c (add_dynamic_entry): Likewise.
8602 * elf32-m32r.c (add_dynamic_entry): Likewise.
8603 * elf32-m68k.c (add_dynamic_entry): Likewise.
8604 * elf32-ppc.c (add_dynamic_entry): Likewise.
8605 * elf32-s390.c (add_dynamic_entry): Likewise.
8606 * elf32-sh.c (add_dynamic_entry): Likewise.
8607 * elf32-sparc.c (add_dynamic_entry): Likewise.
8608 * elf32-vax.c (add_dynamic_entry): Likewise.
8609 * elf32-xtensa.c (add_dynamic_entry): Likewise.
8610 * elf64-alpha.c (add_dynamic_entry): Likewise.
8611 * elf64-hppa.c (add_dynamic_entry): Likewise.
8612 * elf64-ppc.c (add_dynamic_entry): Likewise.
8613 * elf64-s390.c (add_dynamic_entry): Likewise.
8614 * elf64-sparc.c (add_dynamic_entry): Likewise.
8615 * elf64-x86-64.c (add_dynamic_entry): Likewise.
8616 * elfxx-ia64.c (add_dynamic_entry): Likewise.
8617 * elfxx-mips.c (MIPS_ELF_ADD_DYNAMIC_ENTRY): Likewise.
8618 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
8619 * elf32-frv.c (elf32_frv_size_dynamic_sections): Likewise.
8620 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
8621
d507cf36
PB
86222004-03-23 Paul Brook <paul@codesourcery.com>
8623
8624 * elf32-arm.h (arm_print_private_bfd_data): Add EABI v3.
8625
88d65ad6
BW
86262004-03-22 Bob Wilson <bob.wilson@acm.org>
8627
8628 * elf32-xtensa.c (elf_xtensa_check_relocs): Remove code to read
8629 literal tables and check for relocs outside of literal pools.
8630 (elf_xtensa_make_sym_local): Don't clear ELF_LINK_NON_GOT_REF flag.
8631 (elf_xtensa_fix_refcounts): Don't check ELF_LINK_NON_GOT_REF or
8632 set DF_TEXTREL.
8633 (elf_xtensa_size_dynamic_sections): Don't add DT_TEXTREL entry.
8634 (elf_xtensa_relocate_section): Read literal tables and check for
8635 dynamic relocations in read-only sections and not in literal pools.
c152c796 8636
b9cf773d
AM
86372004-03-23 Alan Modra <amodra@bigpond.net.au>
8638
8639 PR 51.
8640 * linker.c (bfd_wrapped_link_hash_lookup): Handle info->wrap_char.
8641
e4a2175c
HPN
86422004-03-22 Hans-Peter Nilsson <hp@axis.com>
8643
8644 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOTPLT,
8645 R_CRIS_16_GOTPLT>: Also error if there's no PLT for a symbol
8646 not defined by the executable, or defined in a DSO.
8647 <eliding run-time relocation of .got>: Initialize GOT entry for a
8648 function symbol or ELF_LINK_HASH_NEEDS_PLT statically in an
8649 executable.
8650 (cris_elf_gc_sweep_hook): Improve fallthrough marking.
8651 (elf_cris_try_fold_plt_to_got): Improve head comment. Do not fold
8652 a PLT reloc to GOT for an executable.
8653 (elf_cris_adjust_dynamic_symbol): Only fold a .got.plt entry with
b9cf773d 8654 .got for a DSO and explain why.
e4a2175c
HPN
8655 (elf_cris_discard_excess_program_dynamics): Also lose GOT-relocs
8656 and unreferenced symbols for which a PLT is defined. Adjust
8657 dynamic-symbol pruning correspondingly, to make sure we don't lose
8658 a dynamic symbol also defined by a DSO.
8659
b2a8e766
AM
86602004-03-22 Alan Modra <amodra@bigpond.net.au>
8661
8662 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Add input_bfd, input_section
8663 and rel args. Group input and output args. Wrap to 80 columns.
8664 * elf-m10200.c, elf-m10300.c, elf32-arm.h, elf32-avr.c,
8665 elf32-cris.c, elf32-d10v.c, elf32-fr30.c, elf32-h8300.c,
8666 elf32-hppa.c, elf32-i386.c, elf32-i860.c, elf32-ip2k.c,
8667 elf32-iq2000.c, elf32-m68hc1x.c, elf32-m68k.c, elf32-mcore.c,
8668 elf32-msp430.c, elf32-openrisc.c, elf32-ppc.c, elf32-s390.c,
8669 elf32-sparc.c, elf32-v850.c, elf32-vax.c, elf32-xstormy16.c,
8670 elf32-xtensa.c, elf64-alpha.c, elf64-mmix.c, elf64-ppc.c,
8671 elf64-s390.c, elf64-sparc.c, elf64-x86-64.c, elfxx-ia64.c: Update
8672 RELOC_FOR_GLOBAL_SYMBOL invocation.
8673
59c2e50f
L
86742004-03-20 H.J. Lu <hongjiu.lu@intel.com>
8675
8676 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Report error if
8677 unresolved symbols in objects aren't allowed.
8678
8679 * elf-hppa.h (elf_hppa_relocate_section): Properly handle
8680 unresolved symbols.
8681 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
8682 (elf_hppa_unmark_useless_dynamic_symbols):
8683 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
8684 * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
8685 (elf32_hppa_relocate_section): Likewise.
8686 * elf32-i370.c (i370_elf_relocate_section): Likewise.
8687 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
8688 * elf32-sh.c (sh_elf_relocate_section): Likewise.
8689 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
8690 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
8691
8692 * elf-m10200.c (mn10200_elf_relocate_section): Use
8693 RELOC_FOR_GLOBAL_SYMBOL.
8694 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
8695 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
8696 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
8697 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
8698 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
8699 * elf32-m68hc1x.c (m68hc11_get_relocation_value): Likewise.
8700 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
8701 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
8702 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
8703 * elf32-v850.c (v850_elf_relocate_section): Likewise.
8704 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
8705 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
8706
9992270f
DA
87072004-03-19 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
8708
36751eee
DA
8709 * elf32-hppa.c (elf32_hppa_check_relocs): Handle R_PARISC_PCREL32.
8710 (final_link_relocate): Likewise.
9992270f
DA
8711 * elf-hppa.h (elf_hppa_reloc_final_type): Handle selectors for
8712 R_PARISC_PCREL32 and R_PARISC_PCREL64 relocations.
8713
05864e2a
AM
87142004-03-19 Alan Modra <amodra@bigpond.net.au>
8715
8716 * Makefile.am: Run "make dep-am".
8717 * Makefile.in: Regenerate.
8718 * aclocal.m4: Regenerate.
8719 * config.in: Regenerate.
8720 * po/bfd.pot: Regenerate.
8721
f218a464 87222004-03-19 Alan Modra <amodra@bigpond.net.au>
0f8a2703
AM
8723 H.J. Lu <hongjiu.lu@intel.com>
8724
8725 * elflink.c (_bfd_elf_merge_symbol): Revert last change. Move
8726 type and size change code to where it was previously. Remove
8727 dt_needed param. Treat old weak syms as strong if new sym is
8728 from a shared lib, even when old sym is from another shared
8729 lib. Remove unnecessary tests of oldweak and newweak. Correct
8730 comments.
8731 (_bfd_elf_add_default_symbol): Remove dt_needed param. Update
8732 _bfd_elf_merge_symbol calls.
8733 * elflink.h (elf_link_add_object_symbols): Update calls. Remove
8734 dt_needed local var. Update comments.
8735 * elf-bfd.h (_bfd_elf_merge_symbol): Update prototype.
8736 (_bfd_elf_add_default_symbol): Likewise.
f218a464
AM
8737
8738 * elflink.c (_bfd_elf_merge_symbol): Reinstate code to handle
8739 strong syms in one shared object overriding weak syms in another.
8740
79349b09
AM
87412004-03-18 Alan Modra <amodra@bigpond.net.au>
8742
4a43e768
AM
8743 * elf-bfd.h (struct elf_obj_tdata): Delete dt_soname field. Add
8744 dyn_lib_class field. Rearrange for better packing.
8745 (elf_dt_soname): Delete.
8746 (elf_dyn_lib_class): Define.
8747 * elf.c (bfd_elf_set_dt_needed_name): Update comment.
8748 (bfd_elf_set_dt_needed_soname): Delete.
8749 (bfd_elf_set_dyn_lib_class): New function.
8750 * elflink.h (add_dt_needed_tag): New function. Split out from..
8751 (elf_link_add_object_symbols): ..here. Rename "name" to "soname".
8752 Use elf_dyn_lib_class to set dt_needed and add_needed. Move fallback
8753 initialization of soname.
8754 (elf_link_check_versioned_symbol): Test elf_dyn_lib_class instead of
8755 elf_dt_soname.
8756 * bfd-in.h (enum dynamic_lib_link_class): New.
8757 (bfd_elf_set_dt_needed_soname): Delete.
8758 (bfd_elf_set_dyn_lib_class): Declare.
8759 * bfd-in2.h: Regenerate.
8760
79349b09
AM
8761 * elflink.c (_bfd_elf_merge_symbol): Rewrite weak symbol handling.
8762 (_bfd_elf_add_default_symbol): Remove indirect BFD_ASSERTs.
8763 * elflink.h (elf_link_add_object_symbols): Don't clear dt_needed in
8764 symbol loop. Instead use add_needed to flag tag as written.
8765
d13d89fa
NS
87662004-03-17 Nathan Sidwell <nathan@codesourcery.com>
8767
8768 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Correct
8769 logic for null_input_bfd detection.
8770
9183ed4b
AM
87712004-03-17 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
8772
8773 * config.bfd: Switch sh-*-rtems* to ELF. Add sh-*-rtemscoff*.
8774
021d7868
MK
87752004-03-16 Mark Kettenis <kettenis@gnu.org>
8776
8777 * netbsd-core.c (netbsd_core_file_p) [CORE_FPU_OFFSET]: Remove
8778 code.
8779
51992aec
AM
87802004-03-16 Alan Modra <amodra@bigpond.net.au>
8781
8782 * elflink.c (elf_link_read_relocs_from_section): Don't use
8783 NUM_SHDR_ENTRIES in end of reloc calc. Move NULL shdr check..
8784 (_bfd_elf_link_read_relocs): ..to here.
8785 * elf32-ppc.c (ppc_elf_relax_section): Formatting.
8786
ccba357f
AM
87872004-03-16 Alan Modra <amodra@bigpond.net.au>
8788
8789 * configure.in (HOST_64BIT_TYPE, HOST_U_64BIT_TYPE): Don't override
8790 values selected in configure.host. Require both to be defined
8791 before setting BFD_HOST_64_BIT_DEFINED. Protect assignment to
8792 corresponding BFD_HOST vars with quotes.
8793 <${host64}-${target64}-${want64} in *true*>: Don't exempt gcc;
8794 Always require BFD_HOST_64_BIT_DEFINED.
8795 <file_ptr type>: Find off_t size before emitting message. Combine
8796 off_t and ftello64 conditional.
8797 * configure: Regenerate.
8798
41978308
AM
87992004-03-16 Alan Modra <amodra@bigpond.net.au>
8800
8801 * elf32-m32r.c (m32r_elf_create_dynamic_sections): Fix pointer
8802 aliasing warning. Remove trailing whitespace throughout file.
8803
d63b5ed9
DA
88042004-03-15 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
8805
8806 * elf-hppa.h (elf_hppa_relocate_section): Pass input_bfd instead of
8807 input_section in calls to get_dyn_name.
8808 * elf64-hppa.c (get_dyn_name): Change type of first argument to "bfd *". Use section id of first section in input BFD to build dynamic name for
8809 local symbols.
8810 (elf64_hppa_check_relocs): Pass abfd in call to get_dyn_name.
8811
8ce8c090
AM
88122004-03-15 Alan Modra <amodra@bigpond.net.au>
8813
8814 * bfd-in.h (bfd_int64_t, bfd_uint64_t): New types.
8815 (BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Don't define here.
8816 (bfd_getb64, bfd_getl64, bfd_get_bits): Return bfd_uint64_t.
8817 (bfd_getb_signed_64, bfd_getl_signed_64): Return bfd_int64_t.
8818 (bfd_putb64, bfd_putl64, bfd_put_bits): Accept bfd_uint64_t.
8819 * configure.in (HOST_U_64BIT_TYPE): Set when sizeof long is 8.
8820 (BFD_HOST_64_BIT_DEFINED, BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Set
8821 when using long.
8822 * libbfd.c (EIGHT_GAZILLION, COERCE64): Use bfd_int64_t.
8823 (bfd_getb64): Return bfd_uint64_t. Enable when BFD_HOST_64_BIT.
8824 (bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
8825 (bfd_putb64): Accept bfd_uint64_t. Enable when BFD_HOST_64_BIT.
8826 (bfd_putl64, bfd_put_bits, bfd_get_bits): Likewise.
8827 * dwarf2.c (struct attribute): Use bfd_int64_t and bfd_uint64_t.
8828 (read_8_bytes, read_indirect_string, read_address): Likewise.
8829 (read_abbrevs, parse_comp_unit): Likewise.
8830 * targets.c (struct bfd_target): Likewise.
8831 * aix386-core.c (NO_GET64, NO_PUT64, NO_GETS64): Define and use.
8832 * hppabsd-core.c: Likewise. Formatting.
8833 * hpux-core.c: Likewise.
8834 * irix-core.c: Likewise.
8835 * netbsd-core.c: Likewise.
8836 * osf-core.c: Likewise.
8837 * ptrace-core.c: Likewise.
8838 * sco5-core.c: Likewise.
8839 * trad-core.c: Likewise.
8840 * configure: Regenerate.
8841 * bfd-in2.h: Regenerate.
8842
edeb6e24
AM
88432004-03-15 Alan Modra <amodra@bigpond.net.au>
8844
8845 * bfd-in.h (bfd_getb64, bfd_getl64): Replace bfd_byte* with void*.
8846 (bfd_getb32, bfd_getl32, bfd_getb16, bfd_getl16): Likewise.
8847 (bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
8848 (bfd_getb_signed_32, bfd_getl_signed_32): Likewise.
8849 (bfd_getb_signed_16, bfd_getl_signed_16): Likewise.
8850 (bfd_putb64, bfd_putl64, bfd_putb32, bfd_putl32): Likewise.
8851 (bfd_putb16, bfd_putl16, bfd_get_bits, bfd_put_bits): Likewise.
8852 * libbfd.c: Likewise in function definitions.
8853 (bfd_put_8): Mask with 0xff rather than casting to char.
8854 (bfd_putb16, bfd_putl16, bfd_putb32, bfd_putl32): Likewise.
8855 (bfd_putb64, bfd_putl64, bfd_put_bits): Likewise.
8856 (H_PUT_64, H_PUT_32, H_PUT_16, H_PUT_8): Remove casts, simplify.
8857 (H_PUT_S64, H_PUT_S32, H_PUT_S16, H_PUT_S8): Likewise.
8858 (H_GET_64, H_GET_32, H_GET_16, H_GET_8): Likewise.
8859 (H_GET_S64, H_GET_S32, H_GET_S16, H_GET_S8): Likewise.
8860 * libaout.h (H_PUT_64 H_PUT_32, H_PUT_16): Remove casts, simplify.
8861 (H_PUT_S64, H_PUT_S32, H_PUT_S16): Likewise.
8862 (H_GET_64, H_GET_32, H_GET_16): Likewise.
8863 (H_GET_S64, H_GET_S32, H_GET_S16): Likewise.
8864 * archive.c (do_slurp_coff_armap): Update swap prototype.
8865 * coff-tic54x.c (tic54x_getl32): Replace bfd_byte* with void*.
8866 (tic54x_getl_signed_32): Likewise.
8867 (tic54x_putl32): Likewise. Mask with 0xff rather than casting to char.
8868 * mach-o.c (bfd_mach_o_read_header): Update get32 prototype.
8869 * pdp11.c (bfd_getp32): Make static, replace bfd_byte* with void*.
8870 (bfd_getp_signed_32, bfd_putp32): Likewise.
8871 * targets.c (struct bfd_target): Use void* in place of bfd_byte* for
8872 bfd_getx64, bfd_getx_signed_64, bfd_putx64, bfd_getx32,
8873 bfd_getx_signed_32, bfd_putx32, bfd_getx16, bfd_getx_signed_16,
8874 bfd_putx16, bfd_h_getx64, bfd_h_getx_signed_64, bfd_h_putx64,
8875 bfd_h_getx32, bfd_h_getx_signed_32, bfd_h_putx32, bfd_h_getx16,
8876 bfd_h_getx_signed_16, bfd_h_putx16.
8877 * aix386-core.c (NO_GET, NO_GETS, NO_PUT): Update prototypes.
8878 * hppabsd-core.c: Similarly. Rename NO_SIGNED_GET to NO_GETS.
8879 * hpux-core.c: Likewise.
8880 * irix-core.c: Likewise.
8881 * netbsd-core.c: Likewise.
8882 * osf-core.c: Likewise.
8883 * ptrace-core.c: Likewise.
8884 * sco5-core.c: Likewise.
8885 * trad-core.c: Likewise.
8886 * bfd-in2.h: Regenerate.
8887
c1b954e2
AM
88882004-03-15 Matt Thomas <matt@3am-software.com>
8889
8890 * config.bfd: Add x86-64 vector to NetBSD/i386 if 64bit BFD is
8891 selected.
8892
85cfd8d3
MK
88932004-03-13 Mark Kettenis <kettenis@gnu.org>
8894
8895 * config.bfd: Add x86_64-*-openbsd*.
8896 * configure.in (x86_64-*-openbsd*): Set COREFILE to
8897 netbsd-core.lo.
8898 * configure: Regenerate.
8899
d1f161ea
NC
89002004-03-12 Nick Clifton <nickc@redhat.com>
8901 Dave Murphy <wintermute2k4@ntlworld.com>
c1b954e2 8902
d1f161ea
NC
8903 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Skip most checks
8904 if the input bfd does not contain any code.
8905
8b6f2683
JW
89062004-03-09 Steve Ellcey <sje@cup.hp.com>
8907
8908 * elfxx-ia64.c (plt_full_entry): Change ld8 to ld8.acq.
8909
79cda7cf
FF
89102004-03-05 Fred Fish <fnf@redhat.com>
8911
8912 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Just force
8913 mips16 symbols to be even rather than testing first for even/odd.
8914 (_bfd_mips_elf_link_output_symbol_hook): Ditto.
8915
e5caec89
NS
89162004-03-05 Nathan Sidwell <nathan@codesourcery.com>
8917
8918 * elf.c (map_sections_to_segments): Ignore .tbss sections for
8919 layout purposes.
8920
02bb6eae
AO
89212004-03-03 Alexandre Oliva <aoliva@redhat.com>
8922
8923 * elflink.c (bfd_elf_record_link_assignment): Mark undefweak and
8924 undefined symbols as hash_new.
8925
ae51a426
JR
89262003-03-03 Andrew Stubbs <andrew.stubbs@superh.com>
8927
8928 * archures.c: Add bfd_mach_sh4_nommu_nofpu.
8929 * cpu-sh.c: Ditto.
8930 * elf32-sh.c: Ditto.
8931 * bfd-in2.h: Regenerate.
8932
3b712a1a
AO
89332004-03-02 Alexandre Oliva <aoliva@redhat.com>
8934
8935 * elf32-frv.c (struct frv_pic_relocs_info): Added fixups and
8936 dynrelocs.
8937 (_frv_count_got_plt_entries): Initialize them.
8938 (frv_pic_relocs_info_find): Add insert argument. Adjust all
8939 callers.
8940 (frv_pic_relocs_info_for_global): Likewise.
8941 (frv_pic_relocs_info_for_local): Likewise.
8942 (frv_pic_merge_early_relocs_info): New.
8943 (_frv_resolve_final_relocs_info): Use it in case one entry maps to
8944 another.
8945 (_frv_add_dyn_reloc): Add entry argument. Adjust all callers.
8946 Check that we don't exceed the allocated count for entry.
8947 (_frv_add_rofixup): Likewise.
8948 (_frv_emit_got_relocs_plt_entries): Adjust for coding standards.
8949 (elf32_frv_finish_dynamic_sections): Improve error message in case
8950 we emit too few rofixup entries.
8951
676a64f4
RS
89522004-03-01 Richard Sandiford <rsandifo@redhat.com>
8953
8954 * archures.c (bfd_mach_fr450): New.
8955 * bfd-in2.h: Regenerate.
8956 * cpu-frv.c (arch_info_450): New bfd_arch_info_type.
8957 (arch_info_500): Link to it.
8958 * elf32-frv.c (elf32_frv_machine, frv_elf_merge_private_bfd_data)
8959 (frv_elf_print_private_bfd_data): Handle fr405 and fr450 header flags.
8960 (frv_elf_arch_extension_p): New function.
8961 (frv_elf_merge_private_bfd_data): Use it.
8962
0ad989f9
L
89632004-02-28 H.J. Lu <hongjiu.lu@intel.com>
8964
8965 * elf-bfd.h (_bfd_elf_link_add_archive_symbols): New prototype.
8966
8967 * elflink.h (is_global_data_symbol_definition): Moved to
8968 elflink.c.
8969 (elf_link_is_defined_archive_symbol): Likewise.
8970 (elf_link_add_archive_symbols): Likewise. Renamed to
8971 _bfd_elf_link_add_archive_symbols.
8972
8973 * elflink.c (elf_link_is_defined_archive_symbol): Get the size
8974 of ELF symbol table entry from backend.
8975 (_bfd_elf_link_add_archive_symbols): Call bfd_link_add_symbols
8976 instead of elf_link_add_object_symbols.
8977
ec3391e7
AO
89782004-02-27 Alexandre Oliva <aoliva@redhat.com>
8979
8980 * elf-bfd.h (struct elf_backend_data): Added
8981 elf_backend_can_make_relative_eh_frame,
8982 elf_backend_can_make_lsda_relative_eh_frame and
8983 elf_backend_encode_eh_address.
8984 (_bfd_elf_encode_eh_address): Declare.
8985 (_bfd_elf_can_make_relative): Declare.
8986 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use new
8987 hooks to decide whether to attempt to make_relative and
8988 make_lsda_relative.
8989 (_bfd_elf_write_section_eh_frame_hdr): Call encode_eh_address.
8990 (_bfd_elf_can_make_relative): New.
8991 (_bfd_elf_encode_eh_address): New.
8992 * elf32-frv.c (frv_elf_use_relative_eh_frame): New.
8993 (frv_elf_encode_eh_address): New.
8994 (elf_backend_can_make_relative_eh_frame): Define.
8995 (elf_backend_can_make_lsda_relative_eh_frame): Define.
8996 (elf_backend_encode_eh_address): Define.
8997 * elfxx-target.h
8998 (elf_backend_can_make_relative_eh_frame): Define.
8999 (elf_backend_can_make_lsda_relative_eh_frame): Define.
9000 (elf_backend_encode_eh_address): Define.
9001 (elfNN_bed): Add them.
9002
e6deed0a
AO
90032004-02-27 Alexandre Oliva <aoliva@redhat.com>
9004
9005 * elf32-frv.c (elf32_frv_howto_table) <R_FRV_LABEL16>: Set
9006 complain_on_overflow to signed.
9007
b60d7a1a
L
90082004-02-27 H.J. Lu <hongjiu.lu@intel.com>
9009
9010 * elflink.h (sort_symbol): New.
9011 (elf_link_add_object_symbols): Use a sorted symbol array for
9012 weakdef.
9013
1c3ff0f2
MS
90142004-02-27 Jakub Jelinek <jakub@redhat.com>
9015
9016 * elf32-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
9017 for pc relative relocs.
9018 (elf_s390_relocate_section): Likewise.
9019 * elf64-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
9020 for pc relative relocs.
9021 (elf_s390_relocate_section): Likewise.
9022
de9811af
L
90232004-02-26 H.J. Lu <hongjiu.lu@intel.com>
9024
9025 * elfxx-ia64.c (elfNN_ia64_check_relocs): Fix call to
9026 count_dyn_reloc.
9027
ac33696c
L
90282004-02-25 H.J. Lu <hongjiu.lu@intel.com>
9029
9030 * elfxx-ia64.c (elfNN_ia64_dyn_reloc_entry): Add the reltext.
9031 field to track if a relocation is against readonly section.
9032 (count_dyn_reloc): Take a new argument for rent->reltext.
9033 (elfNN_ia64_check_relocs): Adjust call to count_dyn_reloc.
9034 (get_reloc_section): Don't set ia64_info->reltext here.
9035 (allocate_dynrel_entries): Set ia64_info->reltext here.
9036
072c8903
AO
90372004-02-24 Alexandre Oliva <aoliva@redhat.com>
9038
9039 * elf32-frv.c (FRV_SYM_LOCAL): Weak undefined doesn't imply local.
9040 (_frv_emit_got_relocs_plt_entries): Decay relocation to protected
9041 function's descriptor to symbol+offset, and map local undefweak
9042 symbol to NULL function descriptor.
9043 (elf32_frv_relocate_section): Likewise.
9044
aca305d9
NC
90452004-02-23 Mark Kettenis <kettenis@gnu.org>
9046
9047 * libaout.h (enum machine_type): Add M_SPARC64_NETBSD and
9048 M_X86_64_NETBSD.
9049 * netbsd-core.c (M_SPARC64_OPENBSD): Define.
9050 (netbsd_core_file_p): Set architecture from machine ID for
9051 selected machines.
9052
646411fb
JJ
90532004-02-23 Jakub Jelinek <jakub@redhat.com>
9054
9055 * elflink.h (size_dynamic_sections): If not adding DT_FLAGS and
9056 DF_BIND_NOW is set in info->flags, create DT_BIND_NOW dynamic entry.
9057
1de1a317
L
90582004-02-21 H.J. Lu <hongjiu.lu@intel.com>
9059
9060 * elflink.c (_bfd_elf_merge_symbol): Properly handle undefined
9061 symbols with non-default visibility.
9062
3c9d0484
DS
90632004-02-21 Danny Smith <daanysmith@users.sourceforge.net>
9064
9065 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Clear
9066 IMAGE_SCN_MEM_WRITE on known sections only.
9067
a876ecf9
JJ
90682004-02-20 Jakub Jelinek <jakub@redhat.com>
9069
9070 * elf32-ppc.c (allocate_dynrelocs): Create dynsym for undef weak
9071 symbols used in PIE relocs.
9072
a8a6d7ce
JJ
90732004-02-19 Jakub Jelinek <jakub@redhat.com>
9074
9075 * elf32-sparc.c (elf32_sparc_finish_dynamic_sections): Clear
9076 .plt sh_entsize.
9077
d080fcd2
DJ
90782004-02-18 Daniel Jacobowitz <drow@mvista.com>
9079
9080 * configure.in: Update version to 2.15.90.
9081 * configure: Regenerate.
9082
d25aed71 90832004-02-17 Daniel Jacobowitz <drow@mvista.com>
c1b954e2 9084 Richard Sandiford <rsandifo@redhat.com>
d25aed71
RS
9085
9086 * elfxx-mips.c (mips_elf_calculate_relocation): Use
9087 _bfd_elf_symbol_refs_local_p to decide whether to decay
9088 a GOT_PAGE/GOT_OFST pair to GOT_DISP/addend.
9089 (_bfd_mips_elf_check_relocs): Add a global GOT entry for GOT_PAGE
9090 relocs if the symbol wasn't defined by a regular object file.
9091 Don't check the symbol's dynindx.
9092
d7ce59e3
AC
90932004-02-16 Andrew Cagney <cagney@redhat.com>
9094
9095 * bfd-in.h (file_ptr, ufile_ptr): Configure type using
9096 @bfd_file_ptr@.
9097 * bfd-in2.h: Re-generate.
9098
ca0b7686
AC
90992004-02-14 Andrew Cagney <cagney@redhat.com>
9100
9101 * configure.host (HDEFINES): When hppa*-*-hpux*, define
9102 _LARGEFILE64_SOURCE.
9103
340b6d91
AC
91042004-02-13 Andrew Cagney <cagney@redhat.com>
9105
9106 * elf.c (vma_page_aligned_bias): New function.
9107 (assign_file_positions_except_relocs)
9108 (assign_file_positions_for_segments): Replace broken modulo
9109 arithmetic with call to vma_page_aligned_bias.
9110
1012372a
AC
91112004-02-11 Andrew Cagney <cagney@redhat.com>
9112
7c192733
AC
9113 * bfd-in.h: Update copyright.
9114 (bfd_tell): Change return type to file_ptr.
9115 * bfd-in2.h: Re-generate.
9116 * cache.c: Update copyright.
9117 (bfd_cache_lookup_worker): Use real_fseek, do not cast offset
9118 parameter.
9119 (close_one): Use real_ftell.
9120 * bfdio.c: Update copyright.
9121 (real_ftell, real_fseek): New functions.
9122 (bfd_tell): Use real_fseek and real_ftell, change return type to
9123 file_ptr.
9124 (bfd_seek): Use real_ftell and real_fseek, change type of
9125 file_position to a file_ptr.
9126 * libbfd-in.h: Update copyright.
9127 (real_ftell, real_fseek): Declare.
9128 * libbfd.h: Re-generate.
9129
1012372a
AC
9130 * configure.in (AC_CHECK_FUNCS): Check for ftello, ftello64,
9131 fseeko and fseeko64. Determine bfd_file_ptr.
9132 * configure: Re-generate.
c1ea0c09 9133 * config.in: Re-generate.
c1b954e2 9134
3255318a
NC
91352004-02-09 Anil Paranjpe <anilp1@KPITCummins.com>
9136
9137 * coff-h8300.c: Added comments about relaxation for ldc.w and stc.w.
9138 * elf32-h8300.c: Likewise.
9139
0d5f9994
NC
91402004-02-09 Christian Vogel <vogelchr@vogel.cx>
9141 Nick Clifton <nickc@redhat.com>
9142
9143 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Catch
9144 GOT entries with no associated GOT subsection.
9145
174fd7f9
RS
91462004-02-09 Richard Sandiford <rsandifo@redhat.com>
9147
9148 * bfd-elf.h (elf_backend_name_local_section_symbols): New hook.
9149 * elf.c (swap_out_syms): Use it to decide whether local section
9150 symbols should be named.
9151 * elfxx-target.h (elf_backend_name_local_section_symbols): New macro.
9152 * elfxx-mips.h (_bfd_mips_elf_name_local_section_symbols): Declare.
9153 (elf_backend_name_local_section_symbols): Define.
9154 * elfxx-mips.c (_bfd_mips_elf_name_local_section_symbols): New.
9155
03609792
L
91562004-01-30 H.J. Lu <hongjiu.lu@intel.com>
9157
9158 * elfxx-ia64.c (elfNN_ia64_relax_brl): New function.
9159 (elfNN_ia64_relax_section): Optimize brl to br during the relax
9160 finalize pass.
9161
ea01195e
AO
91622004-01-30 Alexandre Oliva <aoliva@redhat.com>
9163
9164 * elf32-frv.c (elf32_frv_always_size_sections): Initialize pointer
9165 to bfd_link_hash_entry passed by reference to
9166 _bfd_generic_link_add_one_symbol.
9167
838e70c5
L
91682004-01-25 H.J. Lu <hongjiu.lu@intel.com>
9169
9170 * elfxx-ia64.c (elfNN_ia64_relocate_section): Disallow imm
9171 relocations against dynamic symbols.
9172
4f199be3
DJ
91732004-01-23 Daniel Jacobowitz <drow@mvista.com>
9174
9175 * elf32-arm.h (elf32_arm_check_relocs): Revert part of 2004-01-13
9176 change.
9177
28d39d1a
NC
91782004-01-21 Tom Rix <tcrix@worldnet.att.net>
9179
9180 * reloc.c: New 5 bit reloc, BFD_RELOC_M68HC12_5B, for m68hc12 movb/movw.
9181 * bfd-in2.h, libbfd.h: Rebuilt.
9182
66bed356
DS
91832004-01-20 Danny Smith <dannysmith@users.sourceforge.net>
9184
9185 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Don't remove
9186 IMAGE_SCN_MEM_WRITE flag from .text section if WP_TEXT
9187 flag has been cleared.
9188
7e89635a
KH
91892004-01-19 Kazu Hirata <kazu@cs.umass.edu>
9190
9191 * coff-h8300.c: Add and adjust comments about relaxation.
9192 * elf32-h8300.c: Likewise.
9193
e804e836
KH
91942004-01-16 Kazu Hirata <kazu@cs.umass.edu>
9195
9196 * coff-h8300.c: Fix comment typos.
9197 * elf32-h8300.c: Likewise.
9198
630a7b0a
KH
91992004-01-16 Kazu Hirata <kazu@cs.umass.edu>
9200
9201 * coff-h8300.c: Add comments about relaxation.
9202 * elf32-h8300.c: Likewise.
9203
f8b73030
MR
92042004-01-14 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
9205
9206 * acinclude.m4: Quote names of macros to be defined by AC_DEFUN
9207 throughout.
9208 * aclocal.m4: Regenerate.
9209 * configure: Regenerate.
9210
32159579
ILT
92112004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
9212
9213 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Call
9214 mips_elf64_rtype_to_howto instead of using howto_table.
9215
c84cd8ee
DJ
92162004-01-13 Daniel Jacobowitz <drow@mvista.com>
9217
9218 * elf32-arm.h (elf32_arm_final_link_relocate): Check that we created
9219 the .plt section.
9220 (elf32_arm_check_relocs): Don't increment the PLT refcount for
9221 relocs which would not use the PLT.
9222
680a3378
AM
92232004-01-13 Alan Modra <amodra@bigpond.net.au>
9224
9225 * elf64-ppc.c (ppc64_elf_check_relocs): Ignore !SEC_ALLOC relocs.
9226 (ppc64_elf_gc_sweep_hook): Likewise.
9227 (ppc64_elf_size_dynamic_sections): Test for .plt directly.
9228
faca21e5
NC
92292004-01-12 Anil Paranjpe <anilp1@KPITCummins.com>
9230
9231 Adds linker relaxation support for bit manipulation insns like
680a3378 9232 band, bclr, biand, bild, bior, bist, bixor, bld, bnot, bor, bset,
faca21e5 9233 bst, btst, bxor.
680a3378 9234 * elf32-h8300.c: Opcode for bit manipulation insn is checked in
faca21e5 9235 elf32_h8_relax_section function while relxation for aa:16 and aa:32.
680a3378 9236 * coff-h8300.c: Opcode for bit manipulation insn is checked in
faca21e5
NC
9237 h8300_reloc16_extra_cases function while relxation for aa:16 and aa:32.
9238
818a27ac
AM
92392004-01-12 Alan Modra <amodra@bigpond.net.au>
9240
9241 * dwarf2.c: Convert to C90, remove unneeded casts and prototypes.
9242
96ef1419
KH
92432004-01-11 Kazu Hirata <kazu@cs.umass.edu>
9244
9245 * elf32-h8300.c: Fix formatting.
9246
babfd660
KH
92472004-01-11 Kazu Hirata <kazu@cs.umass.edu>
9248
9249 * elf32-cris.c (cris_elf_gc_sweep_hook): Return early if no
9250 dynamic object is present. Declare r_symndx and h in an inner
9251 scope.
9252 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
9253
7359ea65
DJ
92542004-01-09 Daniel Jacobowitz <drow@mvista.com>
9255
9256 * elf32-arm.h (struct elf32_arm_relocs_copied): Remove pc_count.
9257 (elf32_arm_copy_indirect_symbol): Don't copy pc_count.
9258 (elf32_arm_final_link_relocate): Handle PLT32 and PC24 relocs
9259 identically. Do not emit PC24 relocations for shared libraries.
9260 (elf32_arm_gc_sweep_hook): Handle PLT32 and PC24 relocs
9261 identically. Don't adjust pc_count.
9262 (elf32_arm_check_relocs): Handle PLT32 and PC24 relocs identically.
9263 Set ELF_LINK_HASH_NEEDS_PLT for both. Don't adjust pc_count; don't
9264 adjust count for branch relocations.
9265 (allocate_dynrelocs): Correct typo in call to
9266 WILL_CALL_FINISH_DYNAMIC_SYMBOL. Never allocate space for
9267 PC24 or PLT32 relocs when linking.
9268
44e88952
NC
92692004-01-09 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
9270
9271 * coff-arm.c (aoutarm_std_reloc_howto): [ARM_WINCE] Synchronize ARM_26D
9272 relocation howto with ARM_26 one for consistency.
9273 (coff_arm_relocate_section): Set partial_inplace for ARM_26 relocations
9274 that will be converted to ARM_26D ones, since we always want 'done'
9275 relocations to be reflected in section's data.
9276 (coff_arm_relocate_section): [ARM_WINCE] Quick fix for BL instruction
9277 offset.
9278 (_bfd_final_link_relocate): Do not modify "inplace" data, if not
9279 requested.
9280
1e7fef1d
NC
92812004-01-08 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
9282
9283 * coff-arm.c (coff_arm_relocate_section): Do not alter relocs that
9284 are not partial_inplace during a relocatable link.
9285
4f075348
KH
92862004-01-08 Kazu Hirata <kazu@cs.umass.edu>
9287
babfd660 9288 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Return early
4f075348
KH
9289 if no dynamic object is present. Declare r_symndx and h in an
9290 inner scope.
9291
de0d9f33
L
92922004-01-07 H.J. Lu <hongjiu.lu@intel.com>
9293
9294 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't install
9295 trampoline if it is known out of range.
9296
51532845
AO
92972004-01-06 Alexandre Oliva <aoliva@redhat.com>
9298
9299 2003-12-17 Alexandre Oliva <aoliva@redhat.com>
9300 * elf32-frv.c (_frv_osec_readonly_p): New.
9301 (_frv_emit_got_relocs_plt_entries): Don't emit rofixup for
9302 undefweak symbol.
9303 (_frv_count_got_plt_entries): Adjust expected count accordingly.
9304 (elf32_frv_relocate_section): Likewise. Error out if attempting
9305 to emit rofixups or dynamic relocs in read-only segments. Use
9306 _bfd_elf_section_offset to adjust r_offsets in rofixups and
9307 dynamic relocations.
9308 2003-12-12 Alexandre Oliva <aoliva@redhat.com>
9309 * elf32-frv.c (elf32_frv_relocate_section): Compute dynamic
9310 relocations or fixups involving merged sections correctly. Avoid
9311 crash when undefined symbol is referenced by R_FRV_32 or
9312 R_FRV_FUNCDESC_VALUE.
9313 2003-12-02 Alexandre Oliva <aoliva@redhat.com>
9314 * elf32-frv.c (elf32_frv_relocate_section): Add output_offset of
9315 input section holding local symbol to addend of R_FRV_32 or
9316 R_FRV_FUNCDESC_VALUE dynamic relocation.
9317 2003-11-27 Alexandre Oliva <aoliva@redhat.com>
9318 * elf32-frv.c (elf32_frv_modify_segment_map): Add link info arg.
9319 (elf32_frv_always_size_sections): Don't store pointer to
9320 __stacksize symbol in sec_info.
9321 (elf32_frv_modify_segment_map): Look it up here.
9322 2003-11-26 Alexandre Oliva <aoliva@redhat.com>
9323 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Emit the address
9324 of the lazy PLT entry, not only its offset, as the low word of a
9325 function descriptor.
9326 2003-11-10 Alexandre Oliva <aoliva@redhat.com>
9327 * elf32-frv.c (elf32_frv_always_size_sections): Define __stacksize
9328 if a hash table entry already exists but is not a definition.
9329 2003-11-05 Alexandre Oliva <aoliva@redhat.com>
9330 * elf32-frv.c (frv_elf_link_hash_table_create): Use bfd_zalloc.
9331 (_frv_add_rofixup): Don't inline.
9332 (_frv_emit_got_relocs_plt_entries): Use NULL as funcdesc address
9333 for undefweak symbols.
9334 (elf32_frv_relocate_section): Avoid crash while computing
9335 relocation when linking with shared library. Only emit rofixups
9336 and dynamic relocations for alloc&load sections. Mark binaries
9337 with inter-segment relocations for relocation as a unit.
9338 (_frv_create_got_section): Rename .rofixup.got to .rofixup.
9339 (DEFAULT_STACK_SIZE): New.
9340 (_frv_count_got_plt_entries): Fix thinko in deciding whether to
9341 emit rofixups or dynamic relocs when linking dynamic non-PIE
9342 executables.
9343 (elf32_frv_size_dynamic_sections): Generate rofixup on PIEs and
9344 shared libs too. Reserve the last entry for the GOT pointer.
9345 (elf32_frv_finish_dynamic_sections): Emit it.
9346 (elf32_frv_always_size_sections): New.
9347 (elf32_frv_modify_segment_map): New.
9348 (elf32_frv_check_relocs): Reserve relocs32 space only in ALLOC
9349 sections.
9350 (frv_elf_merge_private_bfd_data): Clear PIC bit if FDPIC is set.
9351 (frv_elf_print_private_bfd_data): Handle FDPIC and LIBPIC.
9352 (elf_backend_always_size_sections): New.
9353 (elf_backend_modify_segment_map): New.
9354 2003-10-31 Alexandre Oliva <aoliva@redhat.com>
9355 * config.bfd: Added frv-*-*linux*.
9356 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Use idx 0 for
9357 ABS section, instead of crashing.
9358 (elf32_frv_relocate_section): Don't crash before warning about
9359 different segments in non-PIC relocation.
9360 2003-10-17 Alexandre Oliva <aoliva@redhat.com>
9361 * elf32-frv.c (elf32_frv_relocate_section): Don't warn on LABEL24
9362 relocs to undefweak symbols.
9363 (elf32_frv_relocate_section): Ditto for undefined symbols.
9364 2003-10-06 Alexandre Oliva <aoliva@redhat.com>
9365 * elf32-frv.c (elf32_frv_create_dynamic_sections): Make sure
9366 gotfixup section was created.
9367 2003-09-30 Alexandre Oliva <aoliva@redhat.com>
9368 * elf32-frv.c (elf32_frv_howto_table): Change GOT12,
9369 FUNCDESC_GOT12, GOTOFF12 and FUNCDESC_GOTOFF12 to
9370 complain_overflow_signed.
9371 * elf32-frv.c (_frv_add_rofixup): Do not error out if contents
9372 have not been allocated.
9373 (_frv_emit_got_relocs_plt_entries): Return non-void. Assert
9374 privfd only if dynamic sections were created.
9375 (elf32_frv_relocate_section): Compute gprel_segment, and use it
9376 for GPREL relocs. When linking relocatable FDPIC executables,
9377 emit warnings for relocations that would be illegal on PIE or
9378 shared libraries. Emit rofixup for R_FRV_32 only if input object
9379 is not FDPIC.
9380 (_frv_create_got_section): Define _gp symbol in the rofixup
9381 section.
9382 (elf32_frv_finish_dynamic_sections): If rofixups needed but
9383 dynamic sections missing, error out requesting -melf32frvfd.
9384 2003-09-19 Alexandre Oliva <aoliva@redhat.com>
9385 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Rearrange
9386 computation of addends from section and global or local symbol
9387 value. Change return type to bfd_boolean, and return a failure if
9388 a dynamic FUNCDESC or FUNCDESC_VALUE relocation that requires a
9389 nonzero addend is required.
9390 (elf32_frv_relocate_section): Likewise. Print error for
9391 unsupported nonzero addends.
9392 2003-09-18 Alexandre Oliva <aoliva@redhat.com>
9393 * elf32-frv.c (FRV_SYM_LOCAL): In the absence of dynamic sections,
9394 force everything local.
9395 (_frv_emit_got_relocs_plt_entries): Cope with NULL sec.
9396 * elf32-frv.c (struct frv_elf_link_hash_table): Added sgotfixup.
9397 (frv_gotfixup_section): New.
9398 (FRV_SYM_LOCAL): Accept undefweak and local common symbols.
9399 (struct frv_pic_relocs_info): Split relocs into relocs32, relocsfd
9400 and relocsfdv.
9401 (_frv_add_rofixup): New.
9402 (_frv_emit_got_relocs_plt_entries): Generate fixups for non-PIE
9403 fdpic executables. Use FRV_SYM_LOCAL more widely to simplify and
9404 improve some ugly conditions.
9405 (elf32_frv_relocate_section): Likewise. Reject inter-segment
9406 relocations in fdpic.
9407 (_frv_create_got_section): Create .rofixup.got section.
9408 (struct _frv_dynamic_got_info): Added fixups.
9409 (_frv_count_got_plt_entries): Account in-GOT relocations into
9410 relocs32, relocsfd and relocsfdv. Account them into relocs or
9411 fixups, as appropriate.
9412 (elf32_frv_size_dynamic_sections): Size rofixup section. Simplify
9413 sizing of gotrel.
9414 (elf32_frv_finish_dynamic_sections): Verify that the right number
9415 of relocations and fixups was generated.
9416 (elf32_frv_check_relocs): Compute relocs32, relocsfd and
9417 relocsfdv.
9418 * elf32-frv.c (FRV_SYM_LOCAL): New macro, used instead of
9419 SYMBOL_CALLS_LOCAL and SYMBOL_REFERENCES_LOCAL.
9420 (FRV_FUNCDESC_LOCAL): New macro, used to decide whether a function
9421 descriptor of a (formerly-)global symbol is local.
9422 (struct frv_pic_relocs_info): Adjust comments.
9423 (_frv_emit_got_relocs_plt_entries): Adjust.
9424 (elf32_frv_relocate_section): Likewise.
9425 (_frv_count_got_plt_entries): Likewise.
9426 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Don't add global
9427 symbol's value to addend in the common preamble. Decay dynamic
9428 symbols to section+offset if they bind or call locally, for GOT
9429 and FUNCDESC_VALUE, respectively.
9430 (elf32_frv_relocate_section): Likewise.
9431 (elf32_frv_check_relocs): Don't register as dynamic symbols of
9432 internal or hidden visibility.
9433 2003-09-17 Alexandre Oliva <aoliva@redhat.com>
9434 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Get addend as
9435 argument, so as to not call _bfd_elf_rel_local_sym to compute it.
9436 (elf32_frv_relocate_section): Pass relocation addend in. Use
9437 original relocation addend to look up the got relocs/plt entries
9438 table. Do not call _bfd_elf_rel_local_sym. Don't error out when
9439 processing relocations that reference .scommon symbols.
9440 2003-09-15 Alexandre Oliva <aoliva@redhat.com>
9441 Introduce support for dynamic linking.
9442 * elf32-frv.c (R_FRV_FUNCDESC_VALUE): Mark it as 64 bits.
9443 (elf32_frv_rel_32_howto, elf32_frv_rel_funcdesc_howto,
9444 elf32_frv_rel_funcdesc_value_howto): New REL descriptors.
9445 (frv_reloc_type_lookup): Return REL howtos for executables and
9446 dynamic libraries.
9447 (frv_info_to_howto_rel): New.
9448 (struct frv_elf_link_hash_table): New.
9449 (frv_hash_table, frv_got_section, frv_gotrel_section,
9450 frv_plt_section, frv_pltrel_section, frv_relocs_info,
9451 frv_got_initial_offset, frv_plt_initial_offset): New macros.
9452 (frv_elf_link_hash_table_create): New.
9453 (struct frv_pic_relocs_info): New.
9454 (frv_pic_relocs_info_hash, frv_pic_relocs_info_eq): New.
9455 (frv_pic_relocs_info_find): New.
9456 (frv_pic_relocs_info_for_global, frv_pic_relocs_info_for_local):
9457 New.
9458 (FRV_LZPLT_BLOCK_SIZE, FRV_LZPLT_RESOLVE_LOC): New.
9459 (_frv_add_dyn_reloc, _frv_osec_to_segment): New.
9460 (_frv_emit_got_relocs_plt_entries): New.
9461 (elf32_frv_relocate_section): Add support for dynamic linking.
9462 Handle new relocations.
9463 (_frv_create_got_section): New.
9464 (elf32_frv_create_dynamic_sections): New.
9465 (ELF_DYNAMIC_INTERPRETER): New.
9466 (struct _frv_dynamic_got_info): New.
9467 (_frv_count_got_plt_entries): New.
9468 (struct _frv_dynamic_got_plt_info): New.
9469 (_frv_compute_got_alloc_data): New.
9470 (_frv_get_got_entry, _frv_get_fd_entry): New.
9471 (_frv_assign_got_entries, _frv_assign_plt_entries): New.
9472 (_frv_resolve_final_relocs_info): New.
9473 (elf32_frv_size_dynamic_sections): New.
9474 (elf32_frv_finish_dynamic_sections): New.
9475 (elf32_frv_adjust_dynamic_symbol): New.
9476 (elf32_frv_finish_dynamic_symbol): New.
9477 (elf32_frv_check_relocs): Handle new relocs. Explain how the
9478 whole thing works.
9479 (elf_info_to_howto_rel): Define.
9480 (bfd_elf32_bfd_link_hash_table_create): Define.
9481 (elf_backend_create_dynamic_sections): Define.
9482 (elf_backend_adjust_dynamic_symbol): Define.
9483 (elf_backend_size_dynamic_sections): Define.
9484 (elf_backend_finish_dynamic_symbol): Define.
9485 (elf_backend_finish_dynamic_sections): Define.
9486 (elf_backend_want_got_sym): Define.
9487 (elf_backend_got_header_size): Define.
9488 (elf_backend_want_got_plt): Define.
9489 (elf_backend_plt_readonly): Define.
9490 (elf_backend_want_plt_sym): Define.
9491 (elf_backend_plt_header_size): Define.
9492 (elf_backend_may_use_rel_p): Define.
9493 (elf_backend_may_use_rela_p): Define.
9494 (elf_backend_default_use_rela_p): Define.
9495 2003-08-08 Alexandre Oliva <aoliva@redhat.com>
9496 * elf32-frv.c (R_FRV_FUNCDESC_VALUE, R_FRV_FUNCDESC_GOTOFF12,
9497 R_FRV_FUNCDESC_GOTOFFHI, R_FRV_FUNCDESC_GOTOFFLO, R_FRV_GOTOFF12,
9498 R_FRV_GOTOFFHI, R_FRV_GOTOFFLO): New.
9499 (frv_reloc_map): Map the corresponding BFD relocs to them.
9500 (frv_reloc_type_lookup): ... and back to BFD relocs.
9501 * reloc.c: New relocs.
9502 * bfd-in2.h, libbfd.h: Rebuilt.
9503 2003-08-04 Alexandre Oliva <aoliva@redhat.com>
9504 * elf32-frv.c (R_FRV_GOT12, R_FRV_GOTHI, R_FRV_GOTLO,
9505 R_FRV_FUNCDESC, R_FRV_FUNCDESC_GOT12, R_FRV_FUNCDESC_GOTHI,
9506 R_FRV_FUNCDESC_GOTLO): New.
9507 (frv_reloc_map): Map the corresponding BFD relocs to them.
9508 (frv_reloc_type_lookup): ... and back to BFD relocs.
9509 * reloc.c: New relocs.
9510 * bfd-in2.h, libbfd.h: Rebuilt.
9511
4301eeb1
MR
95122004-01-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
9513
9514 * elf32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
9515 targets to support pages of up to 64kB.
9516 (elf32_bed): Redefine to get a separate backend data structure for
9517 traditional targets.
9518 * elf64-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
9519 targets to support pages of up to 64kB.
9520 (elf64_bed): Redefine to get a separate backend data structure for
9521 traditional targets.
9522 * elfn32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
9523 targets to support pages of up to 64kB.
9524 (elf32_bed): Redefine to get a separate backend data structure for
9525 traditional targets.
9526
0647ed71
MK
95272004-01-04 Mark Kettenis <kettenis@gnu.org>
9528
9529 * elf32-sparc.c (elf32_sparc_grok_psinfo): New function.
9530
61adc1a4
NC
95312004-01-02 Mark Kettenis <kettenis@gnu.org>
9532
9533 * elf32-i386.c (elf_i386_grok_prstatus): Add support for FreeBSD.
9534 (elf_i386_grok_psinfo): Likewise.
9535
b50c15dc
NC
95362004-01-02 Bernardo Innocenti <bernie@develer.com>
9537
9538 * config.bfd: Add m68k-uClinux target.
9539
2627de83
AM
95402004-01-01 Grant Edwards <grante@visi.com>
9541
9542 * elflink.h (elf_gc_sections): Warn when gc-sections option is ignored.
9543 * elf32-h8300.c (elf32_h8_gc_mark_hook): New function.
9544 (elf32_h8_gc_sweep_hook): New function.
9545 (elf_backend_gc_mark_hook): Define.
9546 (elf_backend_gc_sweep_hook): Define.
9547 (elf_backend_can_gc_sections): Define.
9548
c9e214e5 9549For older changes see ChangeLog-0203
56882138
AM
9550\f
9551Local Variables:
9552mode: change-log
9553left-margin: 8
9554fill-column: 74
9555version-control: never
9556End:
This page took 0.736076 seconds and 4 git commands to generate.