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