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