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