Approved by nickc@redhat.com:
[deliverable/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
4ab527b0
FF
12005-05-23 Fred Fish <fnf@specifixinc.com>
2
3 * dwarf2.c (struct dwarf2_debug): Add inliner_chain member.
4 (struct funcinfo): Add caller_func, caller_file, caller_line.
5 tag, and nesting_level members.
6 (lookup_address_in_function_table): Change first passed parameter
7 from "struct funcinfo *" to "struct comp_unit *".
8 (lookup_address_in_function_table): Dereference unit to find function
9 table.
10 (lookup_address_in_function_table): Traverse the function list to
11 create a chain of inlined functions back to the first non inlined
12 function.
13 (scan_unit_for_functions): Remember tag and nesting level. Handle
14 DW_AT_call_file and DW_AT_call_line.
15 (comp_unit_find_nearest_line): Adjust lookup_address_in_function_table
16 call to pass unit pointer instead of function table pointer. For
17 inlined functions, save pointer to the inliner chain.
18 (_bfd_dwarf2_find_nearest_line): Initialize inliner_chain to NULL.
19 (_bfd_dwarf2_find_inliner_info): New function that returns information
20 from the inliner chain after a call to bfd_find_nearest_line.
21
22 * bfd.c (bfd_find_inliner_info): Define using BFD_SEND.
23 * targets.c (BFD_JUMP_TABLE_SYMBOLS): Add entry for
24 NAME##_find_inliner_info.
25 (bfd_target): Add _bfd_find_inliner_info.
26 * bfd-in2.h: Regenerate.
27
28 * libbfd-in.h (_bfd_nosymbols_find_inliner_info): Define as
29 macro that always returns bfd_false.
30 (_bfd_dwarf2_find_inliner_info): Declare.
31 * libbfd.h: Regenerate.
32
33 * elf32-arm.c (elf32_arm_find_inliner_info): New function
34 that calls _bfd_dwarf2_find_inliner_info.
35 (bfd_elf32_find_inliner_info): Define to elf32_arm_find_inliner_info.
36
37 * elfxx-mips.c (_bfd_mips_elf_find_inliner_info): New function
38 that calls _bfd_dwarf2_find_inliner_info.
39 * elfxx-mips.h (_bfd_mips_elf_find_inliner_info): Declare.
40 * elfn32-mips.c (bfd_elf32_find_inliner_info): Define to
41 _bfd_mips_elf_find_inliner_info.
42 * elf64-mips.c (bfd_elf64_find_inliner_info): Ditto.
43 * elf32-mips.c (bfd_elf32_find_inliner_info): Ditto.
44
45 * elf.c (_bfd_elf_find_inliner_info): New function that calls
46 _bfd_dwarf2_find_inliner_info.
47 * elf-bfd.h (_bfd_elf_find_inliner_info): Declare.
48 * elfxx-target.h (bfd_elfNN_find_inliner_info): Define to
49 _bfd_elf_find_inliner_info.
50
51 * coffgen.c (coff_find_inliner_info): New function that
52 calls _bfd_dwarf2_find_inliner_info.
53 * libcoff-in.h (coff_find_inliner_info): Declare.
54 * libcoff.h: Regenerate.
55 * coff-rs6000.c (rs6000coff_vec): Add coff_find_inliner_info.
56 (pmac_xcoff_vec) Ditto.
57 * coff64-rs6000.c (rs6000coff64_vec): Ditto.
58 (aix5coff64_vec): Ditto.
59
60 * aout-target.h (MY_find_inliner_info): Define as
61 _bfd_nosymbols_find_inliner_info.
62 * aout-tic30.c (MY_find_inliner_info): Ditto.
63 * binary.c (binary_find_inliner_info): Ditto.
64 * i386msdos.c (msdos_find_inliner_info): Ditto.
65 * ihex.c (ihex_find_inliner_info): Ditto.
66 * libaout.h (aout_32_find_inliner_info): Ditto.
67 * libecoff.h (_bfd_ecoff_find_inliner_info): Ditto.
68 * mach-o.c (bfd_mach_o_find_inliner_info): Ditto.
69 * mmo.c (mmo_find_inliner_info): Ditto.
70 * nlm-target.h (nlm_find_inliner_info): Ditto.
71 * pef.c (bfd_pef_find_inliner_info): Ditto.
72 * ppcboot.c (ppcboot_find_inliner_info): Ditto.
73 * srec.c (srec_find_inliner_info): Ditto.
74 * tekhex.c (tekhex_find_inliner_info): Ditto.
75 * versados.c (versados_find_inliner_info): Ditto.
76 * xsym.c (bfd_sym_find_inliner_info): Ditto.
77
78 * ieee.c (ieee_find_inliner_info): New function that always
79 returns FALSE.
80 * oasys.c (oasys_find_inliner_info): Ditto.
81 * vms.c (vms_find_inliner_info): Ditto.
82
9edfd1af
AM
832005-05-24 Alan Modra <amodra@bigpond.net.au>
84
85 * elf32-ppc.c (ppc_elf_check_relocs): For old gcc -fPIC code
86 force old plt layout.
87
3241278a
RH
882005-05-22 Richard Henderson <rth@redhat.com>
89
90 * elf64-alpha.c (elf64_alpha_relax_section): Ignore non-allocated
91 sections.
92 (elf64_alpha_check_relocs): Likewise.
93 (elf64_alpha_relocate_section): Don't emit dynamic relocations to
94 non-allocated sections.
95
d6ad34f6
RH
962005-05-22 Richard Henderson <rth@redhat.com>
97
98 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Relax jsr to
99 undefweak to use zero register. Call elf64_alpha_relax_got_load
100 if not all uses removed.
101 (elf64_alpha_relax_got_load): Relax undefweak to lda zero.
102 (elf64_alpha_relax_section): Handle undefweak symbols.
103 (elf64_alpha_calc_dynrel_sizes): Don't add relocs for undefweak.
104 (elf64_alpha_size_rela_got_1): Likewise.
105 (elf64_alpha_relocate_section): Likewise.
106
487c4353
RH
1072005-05-22 Richard Henderson <rth@redhat.com>
108
109 * elf64-alpha.c (elf64_alpha_relax_section): Only operate
110 on SEC_CODE sections.
111
a96afa0f
DA
1122005-05-22 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
113
114 * som.c (try_prev_fixup): Changed type of subspace_reloc_sizep to
115 unsigned int *.
116 (som_write_space_strings): Change type of tmp_space and p to char *.
117 (som_write_symbol_strings): Likewise. Also change type of comp to
118 char *comp[4].
119 (som_begin_writing): Change type of strings_size to unsigned int.
120 (som_finish_writing): Likewise.
121 (som_slurp_reloc_table): Change type of external_relocs to unsigned
122 char *.
123 * som.h (struct som_section_data_struct): Change type of reloc_stream
124 field to unsigned char *.
125
643796e3
DJ
1262005-05-20 Daniel Jacobowitz <dan@codesourcery.com>
127
128 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Don't eliminate
129 copy relocations for VxWorks.
130
4dc4a9a5
DJ
1312005-05-20 Daniel Jacobowitz <dan@codesourcery.com>
132
133 * bfd/elf32-ppc.c (struct ppc_elf_link_hash_entry): Add new field
134 has_sda_refs.
135 (ppc_elf_copy_indirect_symbol): Copy has_sda_refs.
136 (ppc_elf_check_relocs): Set has_sda_refs.
137 (ppc_elf_adjust_dynamic_symbol): Check has_sda_refs before eliminating
138 copy relocations. Use has_sda_refs to place variables in .sbss.
139 (ppc_elf_finish_dynamic_symbol): Use has_sda_refs to place variables in
140 .sbss.
141
dd1a320b
BW
1422005-05-20 Bob Wilson <bob.wilson@acm.org>
143
144 * elf32-xtensa.c (bfd_elf_xtensa_reloc): Make sure that
145 xtensa_default_isa is initialized.
146
28e99bb6
AM
1472005-05-20 Alan Modra <amodra@bigpond.net.au>
148
149 * elf32-ppc.c (allocate_dynrelocs): Correct plt offset assigned
150 for second and subsequent list entries. Only allocate multiple
151 glink stubs when shared or pie.
152 (ppc_elf_finish_dynamic_symbol): Break out early when only one
153 glink stub is needed.
154
e3e71e27
ZW
1552005-05-19 Zack Weinberg <zack@codesourcery.com>
156
157 * Makefile.am: Have 'all' depend on 'info'.
158 * Makefile.in: Regenerate.
159
a6aa5195
AM
1602005-05-19 Alan Modra <amodra@bigpond.net.au>
161
162 * elf-bfd.h (struct elf_link_hash_table): Delete init_refcount and
163 init_offset. Add init_got_refcount, init_plt_refcount,
164 init_got_offset and init_plt_offset.
165 * elf.c (_bfd_elf_link_hash_newfunc): Adjust for above change.
166 (_bfd_elf_link_hash_hide_symbol): Likewise.
167 (_bfd_elf_link_hash_table_init): Likewise.
168 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
169 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
170 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Likewise.
171 (bfd_elf_size_dynamic_sections): Likewise.
172 * elf32-ppc.c (GLINK_PLTRESOLVE): Now 16 insns.
173 (LWZU_0_X_12, LWZ_0_4_30, LWZ_0_X_12, LWZ_11_X_11, LWZ_11_X_30,
174 LWZ_12_4_12, LWZ_12_8_30, LWZ_12_X_12, SUB_11_11_30): Delete.
175 (ADDIS_12_12, BCL_20_31, LWZU_0_12, LWZ_0_12, LWZ_11_11, LWZ_11_30,
176 LWZ_12_12, MFLR_0, MFLR_12, MTLR_0, SUB_11_11_12): Define.
177 (struct plt_entry): New.
178 (ppc_elf_link_hash_table_create): Set new init_plt fields.
179 (ppc_elf_copy_indirect_symbol): Handle merge of plt plist. Don't
180 use _bfd_elf_link_hash_copy_indirect.
181 (update_plt_info, find_plt_ent): New functions.
182 (ppc_elf_check_relocs): Handle R_PPC_PLTREL24 with non-zero addend
183 and adjust for use of plt list rather than refcount.
184 (ppc_elf_gc_sweep_hook): Likewise.
185 (ppc_elf_tls_optimize): Likewise.
186 (ppc_elf_adjust_dynamic_symbol): Likewise.
187 (allocate_dynrelocs): Likewise.
188 (ppc_elf_relax_section): Likewise.
189 (ppc_elf_relocate_section): Likewise. Adjust R_PPC_PLTREL24 addends
190 when performing a relocatable link.
191 (ppc_elf_finish_dynamic_symbol): Likewise. Write .glink stubs here..
192 (ppc_elf_finish_dynamic_sections): ..rather than here. Use new
193 pic resolver stub.
194
a49e53ed
AM
1952005-05-19 Alan Modra <amodra@bigpond.net.au>
196
197 * elf.c (assign_file_positions_for_segments): Use maximum of
198 maxpagesize and section alignment when adjusting initial
199 segment offset and section offsets.
200
cb1afa5c
ZW
2012005-05-18 Zack Weinberg <zack@codesourcery.com>
202
203 * elf32-arm.c: Make all #ifndef OLD_ARM_ABI blocks
204 unconditional.
205
13792e9d
L
2062005-05-18 H.J. Lu <hongjiu.lu@intel.com>
207
208 * elf.c (group_signature): Undo the last change. Check if the
209 symbol table section is correct.
210
c19d1205
ZW
2112005-05-17 Zack Weinberg <zack@codesourcery.com>
212
213 * elf32-arm.c: Wherever possible, use official reloc names
214 from AAELF.
215 (elf32_arm_howto_table, elf32_arm_tls_gd32_howto)
216 (elf32_arm_tls_ldo32_howto, elf32_arm_tls_ldm32_howto)
217 (elf32_arm_tls_le32_howto, elf32_arm_tls_ie32_howto)
218 (elf32_arm_vtinherit_howto, elf32_arm_vtentry_howto)
219 (elf32_arm_pc11_howto, elf32_arm_thm_pc9_howto, elf32_arm_got_prel)
220 (elf32_arm_r_howto): Replace with elf32_arm_howto_table_1,
221 elf32_arm_howto_table_2, and elf32_arm_howto_table_3.
222 Add many new relocations from AAELF.
223 (elf32_arm_howto_from_type): Update to match.
224 (elf32_arm_reloc_map): Add entries for R_ARM_THM_JUMP24,
225 R_ARM_THM_JUMP11, R_ARM_THM_JUMP19, R_ARM_THM_JUMP8,
226 R_ARM_THM_JUMP6, R_ARM_GNU_VTINHERIT, and R_ARM_GNU_VTENTRY.
227 (elf32_arm_reloc_type_lookup): Use elf32_arm_howto_from_type.
228 (elf32_arm_final_link_relocate): Add support for
229 R_ARM_THM_JUMP24, R_ARM_THM_JUMP19, R_ARM_THM_JUMP6. Remove
230 case entries redundant with default.
231
232 * reloc.c: Reorganize ARM relocations. Add Thumb
233 assembler-internal relocations BFD_RELOC_ARM_T32_OFFSET_U8,
234 BFD_RELOC_ARM_T32_OFFSET_IMM, BFD_RELOC_ARM_T32_IMMEDIATE.
235 Add visible relocations BFD_RELOC_THUMB_PCREL_BRANCH7,
236 BFD_RELOC_THUMB_BRANCH20, BFD_RELOC_THUMB_BRANCH25.
237 Delete unused relocations BFD_RELOC_ARM_GOT12, BFD_RELOC_ARM_COPY.
238 * bfd-in2.h, libbfd.h: Regenerate.
239
26ae6d5e
DJ
2402005-05-17 Daniel Jacobowitz <dan@codesourcery.com>
241
242 * elf.c (_bfd_elf_write_object_contents): Check for non-NULL
243 elf_shstrtab.
244 * format.c (bfd_check_format_matches): Set output_has_begun
245 for both_direction.
246 * section.c (bfd_set_section_contents): Use bfd_write_p. Remove
247 special case for both_direction.
248
5982e3c7
NC
2492005-05-17 Nick Clifton <nickc@redhat.com>
250
251 * elf.c (group_signature): Check for a group section which is
252 actually a (corrupt) symbol table section in disguise and prevent
253 an infinite loop from occurring.
254
fc3ab699
L
2552005-05-17 H.J. Lu <hongjiu.lu@intel.com>
256
257 * elfxx-ia64.c (elfNN_ia64_relax_brl): Undo the change made on
258 2005-02-16.
259
5e27d427
L
2602005-05-17 H.J. Lu <hongjiu.lu@intel.com>
261
262 * elfxx-ia64.c (elfNN_ia64_relax_br): Keep the original
263 predicate on slot 0 only if slot 0 isn't br.
264
75ff4589
L
2652005-05-17 H.J. Lu <hongjiu.lu@intel.com>
266
267 PR 797
268 * elf32-i386.c (elf_i386_size_dynamic_sections): Also remove
269 empty sdynbss section.
270 * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections): Likewise.
271
8e0ed13f
NC
2722005-05-17 Tavis Ormandy <taviso@gentoo.org>
273
274 * elf.c (bfd_section_from_shdr): Add sanity check when parsing
275 dynamic sections.
276
7e8aeb9a
AM
2772005-05-17 Alan Modra <amodra@bigpond.net.au>
278
279 * elf32-ppc.c (LIS_11. LIS_12): Define.
280 (LWZU_0_X_12, LWZ_0_X_12, LWZ_12_4_12, LWZ_12_X_12): Define.
281 (ppc_elf_finish_dynamic_sections): Provide non-pic plt call stub
282 for --data-plt when building non-pie executables.
283
641bd093
NC
2842005-05-17 Nick Clifton <nickc@redhat.com>
285
10dbd1f3
NC
286 * elf32-arm.c (elf32_arm_final_link_relocate): Gracefully handle
287 the situation where a symbols's section is not known but a section
288 relative R_ARM_RELATIVE reloc has to be generated for the Symbian
289 OS.
290
641bd093
NC
291 * elf32-v850.c (v850_elf_relocate_section): Move code to test for
292 the presence of a symbol table to just before the symbol table is
293 actually used.
294
83b6bd86
L
2952005-05-16 H.J. Lu <hongjiu.lu@intel.com>
296
297 PR 834
298 * elfxx-ia64.c (elfNN_ia64_relax_br): New.
299 (elfNN_ia64_relax_section): Use it.
300
06084812
MK
3012005-05-14 Mark Kettenis <kettenis@gnu.org>
302
303 * elflink.c (bfd_elf_size_dynamic_sections): Use lbasename instead
304 of basename.
305
1fe44d79
AM
3062005-05-14 Alan Modra <amodra@bigpond.net.au>
307
308 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Set DT_PPC_GOT,
309 not DT_PPC_GLINK.
310 (ppc_elf_finish_dynamic_sections): Likewise.
311
2db3311b
FF
3122005-05-13 Fred Fish <fnf@specifixinc.com>
313
314 * libbfd-in.h: Fix a comment typo, 'neaderst' -> 'nearest'
315 * libbfd.h: Rebuilt.
316
7db48a12
BW
3172005-05-13 Bob Wilson <bob.wilson@acm.org>
318
319 * elf32-xtensa.c (xtensa_get_property_section_name): Add missing
320 periods in linkonce_kind values.
321
8fe76924
L
3222005-05-12 H.J. Lu <hongjiu.lu@intel.com>
323
324 * elf32-i386.c (elf_i386_relocate_section): Allow R_386_GOTOFF
325 against protected function when building executable.
326
86b9da88
AM
3272005-05-12 Alan Modra <amodra@bigpond.net.au>
328
329 * elf32-ppc.c (LWZU_0_X_11): Delete.
330 (B, LWZ_11_X_11, LWZ_11_X_30, MTCTR_11): Define.
331 (ppc_elf_select_plt_layout): Set .got flags too. Formatting.
332 (ppc_elf_size_dynamic_sections): Allocate space for .glink branch
333 table.
334 (ppc_elf_finish_dynamic_symbol): Point .plt entries into the branch
335 table.
336 (ppc_elf_finish_dynamic_sections): Adjust DT_PPC_GLINK value.
337 Generate .glink branch table and updated stubs.
338
d7128ce4
AM
3392005-05-11 Alan Modra <amodra@bigpond.net.au>
340
341 * reloc.c (BFD_RELOC_HI16_PCREL): Define.
342 (BFD_RELOC_HI16_S_PCREL, BFD_RELOC_LO16_PCREL): Define.
343 * elf32-ppc.c (GLINK_PLTRESOLVE, GLINK_ENTRY_SIZE): Define.
344 (CROR_151515, CROR_313131): Delete.
345 (ADDIS_11_11, ADDI_11_11, SUB_11_11_30, ADD_0_11_11, ADD_11_0_11,
346 LWZ_0_4_30, MTCTR_0, LWZ_12_8_30, BCTR, ADDIS_11_30,
347 LWZU_0_X_11): Define.
348 (ppc_elf_howto_raw): Add R_PPC_REL16, R_PPC_REL16_LO, R_PPC_REL16_HI
349 and R_PPC_REL16_HA entries.
350 (ppc_elf_reloc_type_lookup): Convert new bfd reloc types.
351 (ppc_elf_addr16_ha_reloc): Also handle R_PPC_REL16_HA.
352 (struct ppc_elf_link_hash_table): Add glink, glink_pltresolve,
353 new_plt, and old_plt.
354 (ppc_elf_create_dynamic_sections): Create .glink section.
355 (ppc_elf_check_relocs): Set new_plt and old_plt.
356 (ppc_elf_select_plt_layout): New function.
357 (ppc_elf_tls_setup): Set plt output section elf type and flags.
358 (allocate_got): Handle differences between old and new got layout.
359 (allocate_dynrelocs): Likewise for plt.
360 (ppc_elf_size_dynamic_sections): Likewise. Allocate memory for
361 .glink. Don't allocate memory for old bss .plt. Emit DT_PPC_GLINK.
362 (ppc_elf_relax_section): Rename ppc_info to htab. Handle .glink
363 destination of R_PPC_PLTREL24 relocs.
364 (ppc_elf_relocate_section): Handle new relocs and changed destination
365 of R_PPC_PLTREL24.
366 (ppc_elf_finish_dynamic_symbol): Init new style plt and handle
367 differences in layout.
368 (ppc_elf_finish_dynamic_sections): Set DT_PPC_GLINK value. Don't
369 put a blrl in new got. Write glink contents.
370 * elf32-ppc.h (ppc_elf_select_plt_layout): Declare.
371 * libbfd.h: Regenerate.
372 * bfd-in2.h: Regenerate.
373
4c9b0de6
AS
3742005-05-11 Andreas Schwab <schwab@suse.de>
375
376 * elf32-i386.c (elf_i386_finish_dynamic_sections): Fix signedness
377 warning.
378
3d2b39cf
L
3792005-05-10 H.J. Lu <hongjiu.lu@intel.com>
380
381 * elf.c (_bfd_elf_make_section_from_shdr): Only check debug
382 section if SEC_ALLOC isn't set.
383
2ba49b59
KC
3842005-05-09 Kelley Cook <kcook@gcc.gnu.org>
385
386 * configure.in: Replace AC_COMPILE_CHECK_SIZEOF with AC_CHECK_SIZEOF.
387 * acinclude.m4: Don't sinclude accross.m4.
388 * config.in, configure, Makefile.in, doc/Makefile.in: Regenerate.
389
433817dd
AM
3902005-05-09 Alan Modra <amodra@bigpond.net.au>
391
392 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add has_dotsym.
393 (ppc64_elf_add_symbol_hook): Set has_dotsym.
394 (ppc64_elf_check_directives): Only process syms when has_dotsym.
395 (func_desc_adjust): Hide fake function descriptors when function
396 code entry is defined.
397 (adjust_opd_syms): Adjust for deleted_section becoming union field.
398
0560d0f7
AM
3992005-05-09 Alan Modra <amodra@bigpond.net.au>
400
401 * elfcode.h (elf_object_p): Add more sanity checks on elf header.
402
74cc7600
DK
4032005-05-08 Dave Korn <dave.korn@artimi.com>
404
405 * coff-tic80.c: Undefine _CONST after system headers to prevent
406 clash with tic80-specific definition in include/coff/tic80.h
407
cfca085c
L
4082005-05-08 H.J. Lu <hongjiu.lu@intel.com>
409
410 PR 939
411 * elflink.c (elf_link_output_extsym): Use output_bfd if
412 h->root.u.def.section is bfd_abs_section_ptr when reporting
413 error.
414
7f4d3958
L
4152005-05-07 H.J. Lu <hongjiu.lu@intel.com>
416
417 * elf-bfd.h (elf_backend_data): Update special_sections to
418 array of pointer to bfd_elf_special_section.
419 * elf.c (special_sections): Likewise.
420 * elf32-arm.c (elf32_arm_symbian_special_sections): Likewise.
421 * elf32-m32r.c (m32r_elf_special_sections): Likewise.
422 * elf32-m68hc11.c (elf32_m68hc11_special_sections): Likewise.
423 * elf32-m68hc12.c (elf32_m68hc12_special_sections): Likewise.
424 * elf32-mcore.c (mcore_elf_special_sections): Likewise.
425 * elf32-ppc.c (ppc_elf_special_sections): Likewise.
426 * elf32-sh64.c (sh64_elf_special_sections): Likewise.
427 * elf32-v850.c (v850_elf_special_sections): Likewise.
428 * elf32-xtensa.c (elf_xtensa_special_sections): Likewise.
429 * elf64-alpha.c (elf64_alpha_special_sections): Likewise.
430 * elf64-hppa.c (elf64_hppa_special_sections): Likewise.
431 * elf64-ppc.c (ppc64_elf_special_sections): Likewise.
432 * elf64-sh64.c (sh64_elf64_special_sections): Likewise.
433 * elfxx-ia64.c (elfNN_ia64_special_sections): Likewise.
434 * elfxx-mips.c (_bfd_mips_elf_special_sections): Likewise.
435 * elfxx-mips.h (_bfd_mips_elf_special_sections): Likewise.
436
437 * elf.c (get_special_section): Updated.
438
3b36f7e6
AM
4392005-05-07 Alan Modra <amodra@bigpond.net.au>
440
441 * elf-bfd.h (struct elf_backend_data): Remove got_symbol_offset.
442 * elfxx-target.h (elf_backend_got_symbol_offset): Delete.
443 * elflink.c (_bfd_elf_create_got_section): Use zero in place of
444 got_symbol_offset.
445 * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Likewise.
446 * elf32-frv.c (_frv_create_got_section): Likewise.
447 * elf32-i370.c (i370_elf_finish_dynamic_sections): Delete ppc code.
448 (elf_backend_got_symbol_offset): Don't define.
449 * elf64-ppc.c (elf_backend_got_symbol_offset): Don't define.
450 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add got_header_size
451 and got_gap.
452 (ppc_elf_create_got): Tidy.
453 (ppc_elf_create_dynamic_sections): Don't set SEC_IN_MEMORY for .plt.
454 (ppc_elf_check_relocs): Reduce string comparisons by using elf.hgot.
455 (ppc_elf_gc_sweep_hook): Likewise.
456 (ppc_elf_relocate_section): Likewise.
457 (ppc_elf_finish_dynamic_symbol): Likewise.
458 (allocate_got): New function.
459 (allocate_dynrelocs): Use allocate_got.
460 (ppc_elf_size_dynamic_sections): Likewise. Delay tlsld_got allocation
461 so that local got can refcount it. Set got_header_size.
462 (ppc_elf_relocate_section): Use value of elf.hgot rather than hard-
463 coded 4.
464 (ppc_elf_finish_dynamic_sections): Likewise.
465 (elf_backend_got_symbol_offset): Don't define.
466 (elf_backend_got_header_size): Ditto.
467
2e0fbf77
JW
4682005-05-05 Steve Ellcey <sje@cup.hp.com>
469
470 * configure.in (ACX_HEADER_STRING): New.
471 * configure: Regenerate.
472 * config.in: Regenerate.
473 * sysdep.h (STRING_WITH_STRINGS): Use.
474
6f140a15
L
4752005-05-05 H.J. Lu <hongjiu.lu@intel.com>
476
477 * elf.c (_bfd_elf_close_and_cleanup): Only call
478 _bfd_dwarf2_cleanup_debug_info on bfd_object.
479
01d9ad14
L
4802005-05-05 H.J. Lu <hongjiu.lu@intel.com>
481
482 * elflink.c (_bfd_elf_provide_section_bound_symbols): Use
483 "__bss_start" instead of "_edata" as fallback.
484
b36b76cb
L
4852005-05-05 H.J. Lu <hongjiu.lu@intel.com>
486
487 * bfd-in2.h: Regenerated.
488
eac338cf
PB
4892005-05-05 Paul Brook <paul@codesourcery.com>
490
491 * config.bfd: Use bfd_elf32_i386_vxworks_vec for i?86-*-vxworks.
492 * configure.in: Add bfd_elf32_i386_vxworks_vec. i386 targets need
493 elf-vxworks.lo.
494 * configure: Regenerate.
495 * Makefile.am (BFD32_BACKENDS): Add elf-vxworks.lo.
496 (BFD32_BACKENDS_CFILES): Add elf-vxworks.c.
497 (elf32-i386.lo): Depend on elf-vxworks.h.
498 (elf-vxworks.lo): New rule.
499 * Makefile.in: Regenerate.
500 * elf-bfd.h (elf_backend_data): Update type of
501 elf_backend_emit_relocs.
502 (_bfd_elf_link_output_relocs): Update prototype.
503 * elflink.c (_bfd_elf_link_output_relocs): Always use
504 bed->elf_backend_emit_relocs when outputting relocations.
505 * elfxx-target.h (elf_backend_emit_relocs): Default to
506 _bfd_elf_link_output_relocs.
507 * targets.c (bfd_elf32_i386_vxworks_vec): Declare.
508 (_bfd_target_vector): Add bfd_elf32_i386_vxworks_vec.
509 * elf32-i386.c: Add elf32-i386-vxworks target BFD.
510 (elf_i386_plt0_entry): Remove padding.
511 (elf_i386_pic_plt0_entry): Ditto.
512 (PLTRESOLVE_RELOCS_SHLIB, PLTRESOLVE_RELOCS): Define.
513 (PLT_NON_JUMP_SLOT_RELOCS): Define.
514 (elf_i386_link_hash_table): Add srelplt2, hgot, hplt, is_vxworks and
515 plt0_pad_byte fields.
516 (elf_i386_link_hash_table_create): Zero them.
517 (elf_i386_create_dynamic_sections): Create static relocation section.
518 (allocate_dynrelocs): Allocate space for static PLT relocations.
519 (elf_i386_size_dynamic_sections): Save shortcuts to PLT and GOT
520 symbols. Give PLT symbols function type. Don't strip PLT sections
d7128ce4 521 if we have exported symbols from them.
eac338cf
PB
522 (elf_i386_finish_dynamic_symbol): Fill in VxWorks PLT static
523 relocation section. Don't mark _GLOBAL_OFFSET_TABLE_ as absolute on
524 VxWorks.
525 (elf_i386_finish_dynamic_sections): Allow different pad bytes.
526 Add relocation for GOT location. Fill in PLT static relocations.
527 (elf_i386_vxworks_link_hash_table_create): New function.
528 (elf_i386_vxworks_link_output_symbol_hook): New function.
529 * elf-vxworks.h: New file.
530
3496cb2a
L
5312005-05-05 H.J. Lu <hongjiu.lu@intel.com>
532
533 * section.c (bfd_make_section_anyway_with_flags): New.
534 (bfd_make_section_anyway): Call bfd_make_section_anyway_with_flags,
535 (bfd_make_section_with_flags): New.
536 (bfd_make_section): Call bfd_make_section_with_flags.
537
538 * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Call
539 bfd_make_section_with_flags/bfd_make_section_anyway_with_flags
540 instead of bfd_make_section/bfd_make_section and don't call
541 bfd_set_section_flags.
542 (mn10300_elf_check_relocs): Likewise.
543 (_bfd_mn10300_elf_create_dynamic_sections): Likewise.
544 * elf32-arm.c (create_got_section): Likewise.
545 (bfd_elf32_arm_add_glue_sections_to_bfd): Likewise.
546 (elf32_arm_check_relocs): Likewise.
547 * elf32-cris.c (cris_elf_check_relocs): Likewise.
548 * elf32-frv.c (elf32_frv_add_symbol_hook): Likewise.
549 (_frv_create_got_section): Likewise.
550 (elf32_frvfdpic_create_dynamic_sections): Likewise.
551 * elf32-hppa.c (elf32_hppa_create_dynamic_sections): Likewise.
552 (elf32_hppa_check_relocs): Likewise.
553 * elf32-i370.c (i370_elf_create_dynamic_sections): Likewise.
554 (i370_elf_check_relocs): Likewise.
555 * elf32-i386.c (create_got_section): Likewise.
556 (elf_i386_check_relocs): Likewise.
557 * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
558 (create_got_section): Likewise.
559 (m32r_elf_create_dynamic_sections): Likewise.
560 (m32r_elf_check_relocs): Likewise.
561 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
562 * elf32-ppc.c (ppc_elf_create_got): Likewise.
563 (ppc_elf_create_dynamic_sections): Likewise.
564 (ppc_elf_add_symbol_hook): Likewise.
565 (ppc_elf_check_relocs): Likewise.
566 * elf32-s390.c (create_got_section): Likewise.
567 (elf_s390_check_relocs): Likewise.
568 * elf32-sh.c (create_got_section): Likewise.
569 (sh_elf_create_dynamic_sections): Likewise.
570 (sh_elf_check_relocs): Likewise.
571 * elf32-vax.c (elf_vax_check_relocs): Likewise.
572 * elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
573 * elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Likewise.
574 (add_extra_plt_sections): Likewise.
575 * elf64-alpha.c (elf64_alpha_add_symbol_hook): Likewise.
576 (elf64_alpha_create_got_section): Likewise.
577 (elf64_alpha_create_dynamic_sections): Likewise.
578 (elf64_alpha_check_relocs): Likewise.
579 * elf64-hppa.c (get_reloc_section): Likewise.
580 (get_opd): Likewise.
581 (get_plt): Likewise.
582 (get_dlt): Likewise.
583 (get_stub): Likewise.
584 (elf64_hppa_create_dynamic_sectionso): Likewise.
585 * elf64-mmix.c (mmix_elf_check_common_relocs): Likewise.
586 * elf64-ppc.c (create_linkage_sections): Likewise.
587 (ppc64_elf_check_relocs): Likewise.
588 * elf64-s390.c (create_got_section): Likewise.
589 (elf_s390_check_relocs): Likewise.
590 * elf64-sh64.c (sh_elf64_check_relocs): Likewise.
591 (sh64_elf64_create_dynamic_sections): Likewise.
592 * elf64-x86-64.c (create_got_section): Likewise.
593 (elf64_x86_64_check_relocs): Likewise.
594 * elflink.c (_bfd_elf_create_got_section): Likewise.
595 (_bfd_elf_link_create_dynamic_sections): Likewise.
596 (elf_link_add_object_symbols): Likewise.
597 * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Likewise.
598 (elfNN_ia64_create_dynamic_sections): Likewise.
599 (get_fptr): Likewise.
600 (get_pltoff): Likewise.
601 (get_reloc_section): Likewise.
602 (elfNN_ia64_object_p): Likewise.
603 * elfxx-mips.c (mips_elf_rel_dyn_section): Likewise.
604 (mips_elf_create_compact_rel_section): Likewise.
605 (mips_elf_create_got_section): Likewise.
606 (_bfd_mips_elf_create_dynamic_sections): Likewise.
607 * elfxx-sparc.c (create_got_section): Likewise.
608 (_bfd_sparc_elf_check_relocs): Likewise.
609
610 * elf.c (_bfd_elf_new_section_hook): Call _bfd_elf_get_sec_type_attr
611 on linker created sections.
612
59fef9e7
L
6132005-05-05 H.J. Lu <hongjiu.lu@intel.com>
614
615 PR 882
616 * elflink.c (_bfd_elf_link_assign_sym_version): Allow version
617 script on executable.
618
35330cce
NC
6192005-05-05 John Levon <levon@movementarian.org>
620
621 * dwarf2.c (read_abbrevs): If bfd_realloc fails, free currently
622 allocated memory before returning.
623 (decode_line_info): Likewise.
624 (_bfd_dwarf2_cleanup_debug_info): New function: Frees memory
625 allocated by functions in this file.
626 * elf-bfd.h (_bfd_dwarf2_cleanup_debug_info): Prototype.
6f140a15 627 * elf.c (_bfd_elf_close_and_cleanup): Call
35330cce
NC
628 _bfd_dwarf2_cleanup_debug_info.
629
4a2a2686
HPN
6302005-05-05 Hans-Peter Nilsson <hp@axis.com>
631
632 * Makefile.am (INCLUDES): Don't -D_GNU_SOURCE here.
633 * configure.in: Call AC_GNU_SOURCE here, after AC_PROG_CC.
634 * configure, config.in, Makefile.in: Regenerate.
635 * sysdep.h (stpcpy): Revert last change.
636
0baace35
HPN
6372005-05-05 Hans-Peter Nilsson <hp@axis.com>
638
639 * sysdep.h (stpcpy): Wrap declaration in parentheses.
640
5a260b66
L
6412005-05-04 H.J. Lu <hongjiu.lu@intel.com>
642
643 * elfxx-ia64.c (ARCH_SIZE): New.
644 (LOG_SECTION_ALIGN): Likewise.
645 (elfNN_ia64_create_dynamic_sections): Use LOG_SECTION_ALIGN to
646 align relocation sections.
647 (get_fptr): Likewise.
648 (get_reloc_section): Likewise.
649 (elfNN_ia64_tprel_base): Likewise.
650 (elfNN_ia64_check_relocs): Support 32bit relocations.
651 (allocate_global_fptr_got): Likewise.
652 (allocate_dynrel_entries): Likewise.
653 (set_got_entry): Likewise.
654 (set_pltoff_entry): Likewise.
655 (elfNN_ia64_relocate_section): Likewise.
656
6572005-05-04 H.J. Lu <hongjiu.lu@intel.com>
658
659 * configure.in: Add AC_CHECK_DECLS(stpcpy).
660 * configure: Regenerate.
661 * config.in: Likewise.
662
663 * sysdep.h (stpcpy): New.
664
3e110533
NC
6652005-05-04 Nick Clifton <nickc@redhat.com>
666
667 * Update the address and phone number of the FSF organization in
668 the GPL notices in the following files:
669 aix386-core.c, aix5ppc-core.c, aout-adobe.c, aout-arm.c,
670 aout-cris.c, aout-ns32k.c, aout-sparcle.c, aout-target.h,
671 aout-tic30.c, aout0.c, aout32.c, aout64.c, aoutf1.h, aoutx.h,
672 archive.c, archive64.c, archures.c, armnetbsd.c, bfd-in.h,
673 bfd-in2.h, bfd.c, bfdio.c, bfdwin.c, binary.c, bout.c, cache.c,
674 cf-i386lynx.c, cf-m68klynx.c, cf-sparclynx.c, cisco-core.c,
675 coff-a29k.c, coff-alpha.c, coff-apollo.c, coff-arm.c, coff-aux.c,
676 coff-go32.c, coff-h8300.c, coff-h8500.c, coff-i386.c, coff-i860.c,
677 coff-i960.c, coff-ia64.c, coff-m68k.c, coff-m88k.c, coff-maxq.c,
678 coff-mcore.c, coff-mips.c, coff-or32.c, coff-pmac.c, coff-ppc.c,
679 coff-rs6000.c, coff-sh.c, coff-sparc.c, coff-stgo32.c,
680 coff-svm68k.c, coff-tic30.c, coff-tic4x.c, coff-tic54x.c,
681 coff-tic80.c, coff-u68k.c, coff-w65.c, coff-we32k.c, coff-z8k.c,
682 coff64-rs6000.c, coffcode.h, coffgen.c, cofflink.c, coffswap.h,
683 corefile.c, cpu-a29k.c, cpu-alpha.c, cpu-arc.c, cpu-arm.c,
684 cpu-avr.c, cpu-cr16c.c, cpu-cris.c, cpu-crx.c, cpu-d10v.c,
685 cpu-d30v.c, cpu-dlx.c, cpu-fr30.c, cpu-frv.c, cpu-h8300.c,
686 cpu-h8500.c, cpu-hppa.c, cpu-i370.c, cpu-i386.c, cpu-i860.c,
687 cpu-i960.c, cpu-ia64-opc.c, cpu-ia64.c, cpu-ip2k.c, cpu-iq2000.c,
688 cpu-m10200.c, cpu-m10300.c, cpu-m32r.c, cpu-m68hc11.c,
689 cpu-m68hc12.c, cpu-m68k.c, cpu-m88k.c, cpu-maxq.c, cpu-mcore.c,
690 cpu-mips.c, cpu-mmix.c, cpu-msp430.c, cpu-ns32k.c, cpu-openrisc.c,
691 cpu-or32.c, cpu-pdp11.c, cpu-pj.c, cpu-powerpc.c, cpu-rs6000.c,
692 cpu-s390.c, cpu-sh.c, cpu-sparc.c, cpu-tic30.c, cpu-tic4x.c,
693 cpu-tic54x.c, cpu-tic80.c, cpu-v850.c, cpu-vax.c, cpu-w65.c,
694 cpu-we32k.c, cpu-xstormy16.c, cpu-xtensa.c, cpu-z8k.c, demo64.c,
695 dwarf1.c, dwarf2.c, ecoff.c, ecofflink.c, ecoffswap.h,
696 efi-app-ia32.c, efi-app-ia64.c, elf-bfd.h, elf-eh-frame.c,
697 elf-hppa.h, elf-m10200.c, elf-m10300.c, elf-strtab.c, elf.c,
698 elf32-am33lin.c, elf32-arc.c, elf32-arm.c, elf32-avr.c,
699 elf32-cr16c.c, elf32-cris.c, elf32-crx.c, elf32-d10v.c,
700 elf32-d30v.c, elf32-dlx.c, elf32-fr30.c, elf32-frv.c, elf32-gen.c,
701 elf32-h8300.c, elf32-hppa.c, elf32-hppa.h, elf32-i370.c,
702 elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
703 elf32-iq2000.c, elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c,
704 elf32-m68hc1x.c, elf32-m68hc1x.h, elf32-m68k.c, elf32-m88k.c,
705 elf32-mcore.c, elf32-mips.c, elf32-msp430.c, elf32-openrisc.c,
706 elf32-or32.c, elf32-pj.c, elf32-ppc.c, elf32-ppc.h, elf32-s390.c,
707 elf32-sh-symbian.c, elf32-sh.c, elf32-sh64-com.c, elf32-sh64.c,
708 elf32-sh64.h, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
709 elf32-xstormy16.c, elf32-xtensa.c, elf32.c, elf64-alpha.c,
710 elf64-gen.c, elf64-hppa.c, elf64-hppa.h, elf64-mips.c,
711 elf64-mmix.c, elf64-ppc.c, elf64-ppc.h, elf64-s390.c,
712 elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c, elf64.c, elfcode.h,
713 elfcore.h, elflink.c, elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c,
714 elfxx-mips.h, elfxx-sparc.c, elfxx-sparc.h, elfxx-target.h,
715 epoc-pe-arm.c, epoc-pei-arm.c, format.c, freebsd.h, gen-aout.c,
716 genlink.h, hash.c, host-aout.c, hp300bsd.c, hp300hpux.c,
717 hppabsd-core.c, hpux-core.c, i386aout.c, i386bsd.c, i386dynix.c,
718 i386freebsd.c, i386linux.c, i386lynx.c, i386mach3.c, i386msdos.c,
719 i386netbsd.c, i386os9k.c, ieee.c, ihex.c, init.c, irix-core.c,
720 libaout.h, libbfd-in.h, libbfd.c, libbfd.h, libcoff-in.h,
721 libcoff.h, libecoff.h, libhppa.h, libieee.h, libnlm.h, liboasys.h,
722 libpei.h, libxcoff.h, linker.c, lynx-core.c, m68k4knetbsd.c,
723 m68klinux.c, m68klynx.c, m68knetbsd.c, m88kmach3.c, m88kopenbsd.c,
724 mach-o-target.c, mach-o.c, mach-o.h, merge.c, mipsbsd.c, mmo.c,
725 netbsd-core.c, netbsd.h, newsos3.c, nlm-target.h, nlm.c,
726 nlm32-alpha.c, nlm32-i386.c, nlm32-ppc.c, nlm32-sparc.c, nlm32.c,
727 nlm64.c, nlmcode.h, nlmswap.h, ns32k.h, ns32knetbsd.c, oasys.c,
728 opncls.c, osf-core.c, pc532-mach.c, pdp11.c, pe-arm.c, pe-i386.c,
729 pe-mcore.c, pe-mips.c, pe-ppc.c, pe-sh.c, peXXigen.c,
730 pef-traceback.h, pef.c, pef.h, pei-arm.c, pei-i386.c, pei-mcore.c,
731 pei-mips.c, pei-ppc.c, pei-sh.c, peicode.h, ppcboot.c,
732 ptrace-core.c, reloc.c, reloc16.c, riscix.c, rs6000-core.c,
733 sco5-core.c, section.c, simple.c, som.c, som.h, sparclinux.c,
734 sparclynx.c, sparcnetbsd.c, srec.c, stab-syms.c, stabs.c, sunos.c,
735 syms.c, sysdep.h, targets.c, tekhex.c, ticoff.h, trad-core.c,
736 vax1knetbsd.c, vaxbsd.c, vaxnetbsd.c, versados.c, vms-gsd.c,
737 vms-hdr.c, vms-misc.c, vms-tir.c, vms.c, vms.h, xcoff-target.h,
738 xcofflink.c, xsym.c, xsym.h, xtensa-isa.c, xtensa-modules.c,
11d02c41 739 hosts/alphavms.h
3e110533 740
f652615e
L
7412005-05-04 H.J. Lu <hongjiu.lu@intel.com>
742
743 * bfd-in.h (_bfd_elf_provide_section_bound_symbols): New.
744 * bfd-in2.h: Regenerated.
745
746 * elflink.c (bfd_elf_set_symbol): New.
747 (_bfd_elf_provide_symbol): Call it.
748 (_bfd_elf_provide_section_bound_symbols): New.
749
c5e2cead
L
7502005-05-04 H.J. Lu <hongjiu.lu@intel.com>
751
752 * elflink.c (_bfd_elf_merge_symbol): Only skip weak definitions
753 at the end, if a strong definition has already been seen.
754
8423293d
AM
7552005-05-04 Alan Modra <amodra@bigpond.net.au>
756
757 * section.c (struct bfd_section): Replace link_order_head and
758 link_order_tail with map_head and map_tail union.
759 (STD_SECTION): Update.
760 (_bfd_strip_section_from_output): Delete.
761 * aoutx.h: Update throughout for above changes.
762 * coff-ppc.c: Likewise.
763 * cofflink.c: Likewise.
764 * ecoff.c: Likewise.
765 * elf-eh-frame.c: Likewise.
766 * elf-m10300.c: Likewise.
767 * elf.c: Likewise.
768 * elf32-arm.c: Likewise.
769 * elf32-cris.c: Likewise.
770 * elf32-hppa.c: Likewise.
771 * elf32-i386.c: Likewise.
772 * elf32-m32r.c: Likewise.
773 * elf32-m68hc1x.c: Likewise.
774 * elf32-m68k.c: Likewise.
775 * elf32-ppc.c: Likewise.
776 * elf32-s390.c: Likewise.
777 * elf32-sh.c: Likewise.
778 * elf32-vax.c: Likewise.
779 * elf32-xtensa.c: Likewise.
780 * elf64-alpha.c: Likewise.
781 * elf64-hppa.c: Likewise.
782 * elf64-ppc.c: Likewise.
783 * elf64-s390.c: Likewise.
784 * elf64-sh64.c: Likewise.
785 * elf64-x86-64.c: Likewise.
786 * elflink.c: Likewise.
787 * elfxx-ia64.c: Likewise.
788 * elfxx-mips.c: Likewise.
789 * elfxx-sparc.c: Likewise.
790 * linker.c: Likewise.
791 * merge.c: Likewise.
792 * pdp11.c: Likewise.
793 * xcofflink.c: Likewise.
794 * elflink.c (bfd_boolean bfd_elf_size_dynsym_hash_dynstr): Split
795 out from bfd_elf_size_dynamic_sections.
796 * bfd-in.h (bfd_boolean bfd_elf_size_dynsym_hash_dynstr): Declare.
797 * bfd-in2.h: Regenerate.
798
04dd1667
AM
7992005-05-04 Alan Modra <amodra@bigpond.net.au>
800
801 * section.c (bfd_section_list_remove): Don't clear s->next.
802 (bfd_section_list_append): Always init s->prev.
803 (bfd_section_list_prepend): Define.
804 (bfd_section_list_insert_after): Minor optimization.
805 (bfd_section_removed_from_list): Rewrite.
806 * elf.c (assign_section_numbers): Simplify list traversal now that
807 bfd_section_list_remove doesn't destroy removed section next ptr.
808 * sunos.c (sunos_add_dynamic_symbols): Likewise.
809 * elfxx-ia64.c (elfNN_ia64_object_p): Use bfd_section_list_prepend.
810 * xcofflink.c (_bfd_xcoff_bfd_final_link): Simplify list traversal.
811 * bfd-in2.h: Regenerate.
812
5daa8fe7
L
8132005-05-02 H.J. Lu <hongjiu.lu@intel.com>
814
815 * bfd.c (bfd): Remove section_tail and add section_last.
816 (bfd_preserve): Likewise.
817 (bfd_preserve_save): Likewise.
818 (bfd_preserve_restore): Likewise.
819 * opncls.c (_bfd_new_bfd): Likewise.
820
821 * coffcode.h (coff_compute_section_file_positions): Updated.
822 (coff_compute_section_file_positions): Likewise.
823 * elf.c (assign_section_numbers): Likewise.
824 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
825 * elf64-mmix.c (mmix_elf_final_link): Likewise.
826 * elfxx-ia64.c (elfNN_ia64_object_p): Likewise.
827 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
828 * sunos.c (sunos_add_dynamic_symbols): Likewise.
829 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
830
831 * ecoff.c (bfd_debug_section): Initialize prev.
832
833 * section.c (bfd_section): Add prev.
834 (bfd_section_list_remove): Updated.
835 (bfd_section_list_append): New.
836 (bfd_section_list_insert_after): New.
837 (bfd_section_list_insert_before): New.
838 (bfd_section_list_insert): Removed.
839 (bfd_section_removed_from_list): Updated.
840 (STD_SECTION): Initialize prev.
841 (bfd_section_init): Updated.
842 (bfd_section_list_clear): Updated.
843
844 * bfd-in2.h: Regenerated.
845
a31501e9
L
8462005-05-02 H.J. Lu <hongjiu.lu@intel.com>
847
848 * elf.c (_bfd_elf_new_section_hook): Don't call
849 _bfd_elf_get_sec_type_attr on sections from input files.
850
d05da6a8
L
8512005-05-02 H.J. Lu <hongjiu.lu@intel.com>
852
853 * merge.c (sec_merge_init): Call bfd_hash_table_init_n with
854 hash table size 16699 instead of bfd_hash_table_init.
855
a67b080b
PB
8562005-05-01 Paul Brook <paul@codesourcery.com>
857
858 * elflink.c (_bfd_elf_merge_symbol): Skip weak definitions if a strong
859 definition has already been seen.
860
c6596c5e
PB
8612005-05-01 Paul Brook <paul@codesourcery.com>
862
863 * elf32-arm.c (bfd_elf32_arm_process_before_allocation): Treat
864 R_ARM_PLT32 the same as R_ARM_PC24.
865 (arm_add_to_rel): Ditto.
866
9a813b7a
DJ
8672005-04-29 Ralf Corsepius <ralf.corsepius@rtems.org>
868
869 * config.bfd: Add h8300*-*-rtemscoff.
870 Switch h8300*-*-rtems* to elf.
871
aa7eb06d
DJ
8722005-04-29 Daniel Jacobowitz <dan@codesourcery.com>
873
874 * aclocal.m4, Makefile.in: Regnerated.
875
fa0d1cab
PB
8762005-04-28 Paul Brook <paul@codesourcery.com>
877
878 Merge changes only applied to Makefile.in.
879 * Makefile.am (BFD32_BACKENDS): Add elfxx-sparc.lo
880 (BFD32_BACKENDS_CFILES): Add elfxx-sparc.c
881 (elfxx-sparc.lo): New rule.
882 (elf32-sparc.lo): Add elfxx-sparc.h dependency.
883 (elf64-sparc.lo): Likewise.
884
0291d291
NC
8852005-04-28 Julian Brown <julian@codesourcery.com>
886
887 * elflink.c (_bfd_elf_provide_symbol): Provide symbol for weak
888 import.
889
26c61ae5
L
8902005-04-27 H.J. Lu <hongjiu.lu@intel.com>
891
892 * elf-bfd.h (bfd_elf_sym_name): Also take "asection *".
893
894 * elf.c (bfd_elf_sym_name): Updated.
895 (group_signature): Likewise.
896 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
897 * elf64-ppc.c (ppc64_elf_edit_opd): Likewise.
898 (ppc64_elf_edit_toc): Likewise.
899 (ppc64_elf_relocate_section): Likewise.
900 * elfcode.h (elf_slurp_symbol_table): Likewise.
901 * elflink.c (elf_link_input_bfd): Likewise.
902
903 * elfxx-ia64.c (elfNN_ia64_relocate_section): Call
904 bfd_elf_sym_name to get local symbol name when reporting errors.
905
8c19749a
NC
9062005-04-27 Nick Clifton <nickc@redhat.com>
907
908 * elflink.c (elf_link_input_bfd): Handle the case where a badly
909 formatted input file results in a reloc which has no associated
910 global symbol.
911
8e5b6e16
JG
9122005-04-26 Jerome Guitton <guitton@gnat.com>
913
914 * bfd.m4 (BFD_NEED_DECLARATION): Restore.
915
e459dc7b
DM
9162005-04-25 David S. Miller <davem@davemloft.net>
917
918 * elfxx-sparc.c (sparc_elf_append_rela_64): Add BFD64 protection.
919 (sparc_elf_r_info_64, _bfd_sparc_elf_finish_dynamic_symbol,
920 sparc64_finish_dyn, _bfd_sparc_elf_finish_dynamic_sections):
921 Likewise.
922
6d633fd2
L
9232005-04-25 H.J. Lu <hongjiu.lu@intel.com>
924
925 PR 858
926 * elflink.c (elf_link_input_bfd): Make non-debugging reference
927 to discarded section an error.
928
d34a2b1d
JG
9292005-04-21 Jerome Guitton <guitton@gnat.com>
930
931 * configure.in: Replace BFD_NEED_DECLARATION checks by the
932 corresponding AC_CHECK_DECLS.
933 * sysdep.h: Replace NEED_DECLARATION_* checks by the corresponding
934 HAVE_DECL_*.
935 * bfd.m4 (BFD_NEED_DECLARATION): Remove, obsolete.
936 * configure: Regenerate.
937 * config.in: Ditto.
938
ff01938b
AS
9392005-04-21 Andreas Schwab <schwab@suse.de>
940
c2e70a82
AS
941 * elfxx-sparc.h (struct _bfd_sparc_elf_link_hash_table): Remove
942 unsigned from type of dynamic_interpreter.
943 * elfxx-sparc.c (_bfd_sparc_elf_link_hash_table_create): Remove
944 casts again.
945
ff01938b
AS
946 * elf.c (assign_section_numbers): Fix comment.
947
0858d3ec
JG
9482005-04-21 Jerome Guitton <guitton@gnat.com>
949
950 * som.c (som_bfd_print_private_bfd_data): Add explicit cast to long
951 for struct som_exec_auxhdr fields.
952
7920ce38
NC
9532005-04-21 Nick Clifton <nickc@redhat.com>
954
955 * aout-adobe.c: Convert to ISO C and fix formatting.
956 * aout-arm.c: Convert to ISO C and fix formatting.
957 * aout-cris.c: Convert to ISO C and fix formatting.
958 * aout-ns32k.c: Convert to ISO C and fix formatting.
959 * aout-tic30.c: Convert to ISO C and fix formatting.
960 * coffcode.h: Convert to ISO C and fix formatting.
961 * coffswap.h: Convert to ISO C and fix formatting.
962 * i386aout.c: Convert to ISO C and fix formatting.
963 * libaout.h: Convert to ISO C and fix formatting.
964 * libcoff-in.h: Convert to ISO C and fix formatting.
965 * libcoff.h: Convert to ISO C and fix formatting.
966 * libecoff.h: Convert to ISO C and fix formatting.
967 * libnlm.h: Convert to ISO C and fix formatting.
968 * libpei.h: Convert to ISO C and fix formatting.
969 * libxcoff.h: Convert to ISO C and fix formatting.
970 * nlm-target.h: Convert to ISO C and fix formatting.
971 * nlm.c: Convert to ISO C and fix formatting.
972 * nlm32-alpha.c: Convert to ISO C and fix formatting.
973 * nlm32-i386.c: Convert to ISO C and fix formatting.
974 * nlm32-ppc.c: Convert to ISO C and fix formatting.
975 * nlm32-sparc.c: Convert to ISO C and fix formatting.
976 * nlmcode.h: Convert to ISO C and fix formatting.
977 * nlmswap.h: Convert to ISO C and fix formatting.
978 * pe-mips.c: Convert to ISO C and fix formatting.
979 * peXXigen.c: Convert to ISO C and fix formatting.
980 * peicode.h: Convert to ISO C and fix formatting.
981 * vms-gsd.c: Convert to ISO C and fix formatting.
982 * vms-hdr.c: Convert to ISO C and fix formatting.
983 * vms-misc.c: Convert to ISO C and fix formatting.
984 * vms-tir.c: Convert to ISO C and fix formatting.
985 * vms.c: Convert to ISO C and fix formatting.
986 * vms.h: Convert to ISO C and fix formatting.
987
988 * coffgen.c (coff_print_symbol): Restore correct formatting of
989 output.
990
e8be8da4
DM
9912005-04-20 David S. Miller <davem@davemloft.net>
992
993 * elfxx-sparc.c (sparc_elf_r_symndx_64): Fix compiler warning.
994 (_bfd_sparc_elf_link_hash_table_create): Likewise.
995 (allocate_dynrelocs): Likewise.
996
ec7b76fe
JG
9972005-04-20 Jerome Guitton <guitton@gnat.com>
998
999 * configure.in: Fix the check for basename declaration. Add check
1000 for declarations of ftello, ftello64, fseeko, fseeko64.
1001 * configure: Regenerate.
1002 * config.in: Ditto.
1003 * sysdep.h: If needed, declare ftello, ftello64, fseeko, fseeko64.
1004
22b75d0a
DM
10052005-04-19 David S. Miller <davem@davemloft.net>
1006
1007 * elfxx-sparc.c: New file.
1008 * elfxx-sparc.h: New file.
1009 * Makefile.in (BFD32_BACKENDS): Add elfxx-sparc.lo
1010 (BFD32_BACKENDS_CFILES): Add elfxx-sparc.c
1011 (elfxx-sparc.lo): New rule.
1012 (elf32-sparc.lo): Add elfxx-sparc.h dependency.
1013 (elf64-sparc.lo): Likewise.
1014 * configure.in (bfd_elf32_sparc_vec): Add elfxx-sparc.lo
1015 (bfd_elf64_sparc_vec): Likewise.
1016 * configure: Regenerate.
1017 * elf32-sparc.c: Remove common code now in elfxx-sparc.c
1018 * elf64-sparc.c: Likewise, also use elf64_sparc_*() naming
1019 which is more consistent with elf32-sparc.c
1020
a008ac03
DJ
10212005-04-19 Daniel Jacobowitz <dan@codesourcery.com>
1022
1023 * elfxx-mips.c (struct mips_elf_link_hash_entry): Update comment.
1024 (mips_elf_create_local_got_entry): Check h->root.forced_local.
1025
c87b5a93
AM
10262005-04-19 Alan Modra <amodra@bigpond.net.au>
1027
1028 * elf32-ppc.c (ppc_elf_check_relocs): Don't bother with
1029 dynamic relocs in non-SEC_ALLOC sections.
1030 (ppc_elf_gc_sweep_hook): Likewise.
1031 (ppc_elf_relax_section): Likewise.
1032 (ppc_elf_relocate_section): Likewise.
1033
7cefacd3
NC
10342005-04-18 Nick Clifton <nickc@redhat.com>
1035
1036 * aix5ppc-core.c (xcoff64_core_p): Fix compile time warning
1037 assigning a value to return_value.
1038
278d8f37
L
10392005-04-17 H.J. Lu <hongjiu.lu@intel.com>
1040
1041 PR 855
1042 * elf.c (_bfd_elf_copy_private_section_data): Don't copy linker
1043 created group data.
1044
20dbb49d
L
10452005-04-17 H.J. Lu <hongjiu.lu@intel.com>
1046
1047 PR 855
1048 * elf.c (setup_group): Properly handle zero group count.
1049
6a808a40
MK
10502005-04-17 Mark Kettenis <kettenis@gnu.org>
1051
1052 * som.c (hppa_som_reloc, som_mkobject, som_is_space)
1053 (som_is_subspace, compare_subspaces, som_compute_checksum)
1054 (som_build_and_write_symbol_table, som_slurp_symbol_table): New
1055 protoypes.
1056 (hppa_som_reloc, compare_syms, compare_subspaces)
1057 (som_print_symbol, som_get_section_contents)
1058 (som_set_section_contents): Remove space after 'void *'.
1059 (som_bfd_print_private_bfd_data): Use %lx to print longs.
1060 (som_bfd_merge_private_bfd_data)
1061 (som_bfd_copy_private_header_data, som_bfd_set_private_flags): New
1062 defines.
1063
33bfe774
JB
10642004-04-15 Julian Brown <julian@codesourcery.com>
1065
1066 * bfd-in.h (bfd_elf32_arm_set_target_relocs): Update prototype.
1067 * bfd-in2.h: Regenerate.
1068 * elf32-arm.c (elf32_arm_link_hash_table): New field, 'use_blx'.
1069 (elf32_arm_link_hash_table_create): Initialise fix_v4bx, use_blx.
1070 (bfd_elf32_arm_set_target_relocs): Handle use_blx.
1071 (elf32_arm_final_link_relocate): Use Thumb BLX for R_ARM_THM_PC22
1072 relocations if requested to.
1073 (allocate_dynrelocs): Don't count size of omitted Thumb stubs based on
1074 use_blx rather than symbian_p.
1075 (elf32_arm_finish_dynamic_symbol): Don't output Thumb PLT stubs if
1076 use_blx is in effect.
1077 (elf32_arm_symbian_link_hash_table_create): Enable use_blx by default
1078 for SymbianOS.
1079
745c12f8
NC
10802005-04-15 Nick Clifton <nickc@redhat.com>
1081
1082 * coffgen.c (coff_print_symbol): Use fprintf_vma to print vma
1083 values.
1084
2e8b3a61
AM
10852005-04-15 Alan Modra <amodra@bigpond.net.au>
1086
1087 PR ld/815
1088 * elflink.c (elf_smash_syms): Clear undef.next if it's not being
1089 used as a list pointer.
1090
9e9b66a9
AM
10912005-04-14 Alan Modra <amodra@bigpond.net.au>
1092
1093 * Makefile.am (NO_WERROR): Define.
1094 * warning.m4: New file
1095 * acinclude.m4: Include warning.m4.
1096 * configure.in: Invoke AM_BINUTILS_WARNINGS.
1097 * Makefile.in: Regenerate.
1098 * configure: Regenerate.
1099
8699aa54
AM
11002005-04-14 Alan Modra <amodra@bigpond.net.au>
1101
92ceba1e
AM
1102 * merge.c (sec_merge_emit): Tidy. Check for bfd_zmalloc errors.
1103 Write trailing padding.
1104
8699aa54
AM
1105 * merge.c (merge_strings): Round up section size for alignment.
1106
40937810
JJ
11072005-04-14 David S. Miller <davem@davemloft.net>
1108
1109 Add TLS support for 64-bit Sparc ELF.
1110 * elf64-sparc.c (sparc64_elf_dyn_relocs,
1111 sparc64_elf_link_hash_entry, sparc64_elf_obj_tdata): New structs.
1112 (GOT_UNKNOWN, GOT_NORMAL, GOT_TLD_GD, GOT_TLD_IE,
1113 sparc64_elf_hash_entry, sparc64_elf_tdata,
1114 sparc64_elf_local_got_tls_type): New defines.
1115 (sparc64_elf_mkobject): New function.
1116 (sparc64_elf_link_hash_table): Add members for dynamic linker
1117 sections PLT, RELPLT, DYNBSS, and RELBSS. Add tls_ldm_got
1118 uion to track TLS GOT references. Add sym_sec to cache
1119 mappings from local sym to section.
1120 (link_hash_newfunc): New function.
1121 (sparc64_elf_bfd_link_hash_table_create): Rename to
1122 sparc64_elf_link_hash_table_create for consistency.
1123 Pass link_hash_newfunc to _bfd_elf_link_hash_table_init.
1124 (sparc64_elf_create_dynamic_sections): Initialize new section
1125 members of sparc64_elf_link_hash_table. Only init srelbss
1126 if not-shared.
1127 (sparc64_elf_copy_indirect_symbol, sparc64_elf_tls_transition):
1128 New functions.
1129 (SPARC_NOP): Define.
1130 (sparc64_elf_build_plt, sparc64_elf_plt_entry_offset,
1131 sparc64_elf_plt_ptr_offset): Delete.
1132 (sparc64_plt_entry_build): New function to build PLT entries
1133 gradually instread of all at once at the end of linking.
1134 (sparc64_elf_check_relocs): Delete dynobj, sgot, and srelgot
1135 local vars. Get them from sparc64_elf_hash_table instead.
1136 Check early on if r_symndx is in bounds. Handle TLS transitions.
1137 Account for TLS GOT references and DF_STATIC_TLS, as needed.
1138 For TLS relocs, record the tls_type in either
1139 sparc64_elf_local_got_tls_type or sparc64_elf_hash_entry as
1140 appropriate. For R_SPARC_TLS_{GD,LDM}_CALL, emit a reference
1141 to the __tls_get_addr symbol. For PLT relocs, track references
1142 via h->plt.refcount. When R_SPARC_{PC10,PC22,PC_HH22,PC_HM10,
1143 PC_LM22} and h not-NULL, set h->non_got_ref. For global data
1144 symbol references, count the number of relocations needed for
1145 that symbol. For default switch case, don't error, this lets
1146 the TLS relocs not explicitly handled by this function get
1147 accepted.
1148 (sparc64_elf_gc_mark_hook, sparc64_gc_sweep_hook): New functions.
1149 (sparc64_elf_adjust_dynamic_symbol): Remove dynobj local var, get
1150 it from sparc64_elf_hash_table. Store the real PLT offset
1151 in h->plt.offset, and build PLT entries one at a time. Also
1152 get .dynbss section pointer from htab.
1153 (allocate_dynrelocs, readonly_dynrelocs,
1154 sparc64_omit_section_dynsym): New functions.
1155 (sparc64_elf_omit_section_dynsym): Use these new functions as
1156 helpers.
1157 (dtpoff_base, tpoff): New functions.
1158 (sparc64_elf_relocate_section): Kill dynobj, sgot, and splt
1159 locals, get them from sparc64_elf_hash_table. Handle TLS
1160 relocations and refcounting in main relocation loop.
1161 (sparc64_elf_finish_dynamic_symbol): Use
1162 sparc64_elf_link_hash_table. Build PLT entries as we see
1163 them. Handle TLS GOT relocations.
1164 (sparc64_elf_finish_dynamic_sections): Get sgot and dynobj
1165 from sparc64_elf_hash_table. Initialize only PLT header
1166 not all entries since we not build PLT entries one by one.
1167 (elf_backend_copy_indirect_symbol, bfd_elf64_mkobject,
1168 elf_backend_gc_mark_hook, elf_backend_gc_sweep_hook,
1169 elf_backend_can_gc_sections, elf_backend_can_refcount): Define.
1170
e75a280b
L
11712005-04-13 Daniel Jacobowitz <dan@codesourcery.com>
1172
1173 * elflink.c (elf_link_input_bfd): Update check for removed
1174 sections.
1175
ceae3e33
AM
11762005-04-12 Alan Modra <amodra@bigpond.net.au>
1177
1178 * Makefile.am: Run "make dep-am".
1179 * Makefile.in: Regenerate.
1180 * aclocal.m4: Regenerate.
1181 * libcoff.h: Regenerate.
1182
ab82c5b9
L
11832005-04-11 H.J. Lu <hongjiu.lu@intel.com>
1184
1185 * linker.c (_bfd_generic_link_output_symbols): Also check if
1186 the output section of an input section has been removed from
1187 the output file.
1188
1189 * section.c (bfd_section_list_remove): Clear the next field
1190 of the removed section.
1191 (bfd_section_removed_from_list): New.
1192 * bfd-in2.h: Regenerated.
1193
bd695bcc
JJ
11942005-04-11 David S. Miller <davem@davemloft.net>
1195
1196 * elf32-sparc.c (elf32_sparc_relocate_section,
1197 R_SPARC_TLS_LDO_{HIX22,LOX10}): When not shared, transition to
1198 R_SPARC_TLS_LE_{HIX22,LOX10}.
1199 (elf32_sparc_relocate_section, R_SPARC_TLS_{LDO,LE}_HIX22): Only
1200 xor relocation with 0xffffffff if R_SPARC_TLS_LE_HIX22.
1201 (elf32_sparc_relocate_section, R_SPARC_TLS_{LDO,LE}_LOX10): Only
1202 or 0x1c00 into relocation if R_SPARC_TLS_LE_HIX22.
1203
b5b2699c
L
12042005-04-11 H.J. Lu <hongjiu.lu@intel.com>
1205
1206 * coffcode.h (STRING_SIZE_SIZE): Updated to match libcoff-in.h.
1207
116c20d2 12082005-04-11 Nick Clifton <nickc@redhat.com>
d7128ce4 1209
116c20d2
NC
1210 * aout-target.h: Convert to ISO C.
1211 * aoutf1.h: Convert to ISO C.
1212 * aoutx.h: Convert to ISO C.
1213 * bout.c: Convert to ISO C.
1214 * dwarf1.c: Convert to ISO C.
1215 * ecoffswap.h: Convert to ISO C.
1216 * freebsd.h: Convert to ISO C.
1217 * genlink.h: Convert to ISO C.
1218 * ieee.c: Convert to ISO C.
1219 * ihex.c: Convert to ISO C.
1220 * libcoff-in.h: Convert to ISO C.
1221 * mach-o.c: Convert to ISO C.
1222 * mach-o.h: Convert to ISO C.
1223 * netbsd.h: Convert to ISO C.
1224 * ns32k.h: Convert to ISO C.
1225 * ns32knetbsd.c: Convert to ISO C.
1226 * oasys.c: Convert to ISO C.
1227 * pdp11.c: Convert to ISO C.
1228 * pef-traceback.h: Convert to ISO C.
1229 * pef.c: Convert to ISO C.
1230 * pef.h: Convert to ISO C.
1231 * riscix.c: Convert to ISO C.
1232 * som.c: Convert to ISO C.
1233 * som.h: Convert to ISO C.
1234 * srec.c: Convert to ISO C.
1235 * stabs.c: Convert to ISO C.
1236 * sunos.c: Convert to ISO C.
1237 * tekhex.c: Convert to ISO C.
1238 * versados.c: Convert to ISO C.
1239 * version.h: Convert to ISO C.
1240 * xcoff-target.h: Convert to ISO C.
1241 * xcofflink.c: Convert to ISO C.
1242 * xsym.c: Convert to ISO C.
1243 * xsym.h: Convert to ISO C.
1244
8f6277f5
PB
12452005-04-08 Paul Brook <paul@codesourcery.com>
1246
1247 * elf32-arm.c (ARM2THUMB_GLUE_SIZE): Rename...
1248 (ARM2THUMB_STATIC_GLUE_SIZE): ... to this.
1249 (ARM2THUMB_PIC_GLUE_SIZE): Define.
1250 (a2t1p_ldr_insn, a2t2p_add_pc_insn, a2t3p_bx_r12_insn): Add.
1251 (elf32_arm_to_thumb_stub): Create PIC stubs.
1252 (record_arm_to_thumb_glue): Use different stub size for relocatable
1253 images.
1254
8c1d1bb8
AM
12552005-04-05 Alan Modra <amodra@bigpond.net.au>
1256
1257 * elf64-ppc.c (dec_dynrel_count): New function split out from
1258 ppc64_elf_edit_toc, with additional code from ppc64_elf_edit_opd.
1259 (ppc64_elf_edit_toc, ppc64_elf_edit_opd): Use it.
1260 (ppc64_elf_tls_optimize): Likewise.
1261
8c101720
NC
12622005-04-05 Mark Kettenis <kettenis@gnu.org>
1263
1264 * netbsd-core.c (SPARC_WCOOKIE_OFFSET): Renamed from
1265 CORE_WCOOKIE_OFFSET.
1266 (SPARC64_WCOOKIE_OFFSET): New.
1267 (netbsd_core_file_p): Provide .wcookie section for OpenBSD/sparc64.
1268
429cc0ae
NC
12692005-04-05 Nick Clifton <nickc@redhat.com>
1270
1271 * po/rw.po: New translation: Kinyarwanda
1272 * configure.in (ALL_LINGUAS): Add rw
1273 * configure: Regenerate.
1274
cc2e31b9
RS
12752005-04-05 Richard Sandiford <rsandifo@redhat.com>
1276
1277 * elfxx-mips.c (MIPS_ELF_OPTIONS_SECTION_NAME_P): New macro.
1278 (_bfd_mips_elf_section_from_shdr): Use it to check for recognized
1279 SHT_MIPS_OPTIONS names. Allow all sections with unrecognised
1280 section flags.
1281 (_bfd_mips_elf_fake_sections): Use MIPS_ELF_OPTIONS_SECTION_NAME_P
1282 to check for SHT_MIPS_OPTIONS sections.
1283 (_bfd_mips_elf_set_section_contents): Likewise.
1284
8236346f
EC
12852005-04-04 Eric Christopher <echristo@redhat.com>
1286
1287 * elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents):
1288 Clean up gp handling code.
1289
7e4111ad
L
12902005-04-04 H.J. Lu <hongjiu.lu@intel.com>
1291
1292 * elf.c (bfd_elf_set_group_contents): Ignore linker created
d7128ce4 1293 group section.
da9f89d4
L
1294 (assign_section_numbers): Accept link_info. Check SHT_GROUP
1295 sections for relocatable files only. Remove the linker created
1296 group sections.
1297 (_bfd_elf_compute_section_file_positions): Pass link_info to
1298 assign_section_numbers.
1299
1300 * elfxx-ia64.c (elfNN_ia64_object_p): New.
1301 (elf_backend_object_p): Defined.
7e4111ad 1302
96982dc9
L
13032005-04-04 H.J. Lu <hongjiu.lu@intel.com>
1304
1305 * elf-bfd.h (elf_section_data): Use (sec) instead of sec.
1306
a13afe8e
FF
13072005-04-03 Fred Fish <fnf@specifixinc.com>
1308
1309 * dwarf2.c (struct dwarf2_debug): Add dwarf_ranges_buffer and
1310 dwarf_ranges_size members.
1311 (struct comp_unit): Add base_address member.
1312 (struct funcinfo): Replace low/high members with an arange.
1313 (arange_add): Replace incoming "unit" parameter with "abfd" and
1314 "first_arange" pointers. Reorganize/rewrite function body.
1315 (decode_line_info): Change arange_add call to pass bfd and arange
1316 pointers.
1317 (lookup_address_in_line_info_table): Use arange list instead of
1318 individual low/high members. Walk function's arange list to find
1319 lowest PC in list, to test for overlapping functions.
1320 (read_debug_ranges): New function, reads the debug_ranges section.
1321 (lookup_address_in_function_table): Use arange list instead of
1322 individual low/high members. Rewrite to find smallest range that
1323 matches.
1324 (read_rangelist): Read a given rangelist from debug_ranges.
1325 (scan_unit_for_functions): Use arange list instead of individual
1326 low/high members. Handle a DW_AT_ranges attribute.
1327 (parse_comp_unit): Use arange list instead of individual low/high
1328 members. Save comp unit base address. Handle a DW_AT_ranges
1329 attribute.
1330
2796fd96
L
13312005-04-01 H.J. Lu <hongjiu.lu@intel.com>
1332
1333 * elf.c (assign_section_numbers): Really use the kept section.
1334
01b3c8ab
L
13352005-03-31 H.J. Lu <hongjiu.lu@intel.com>
1336
1337 * elf-bfd.h (_bfd_elf_check_kept_section): New.
1338
1339 * elf.c (assign_section_numbers): When sh_link points to a
1340 discarded section, call _bfd_elf_check_kept_section to see if
1341 the kept section can be used. Otherwise reject sh_link
1342 pointing to discarded section.
1343
1344 * elflink.c (_bfd_elf_check_kept_section): New.
1345 (elf_link_input_bfd): Use it.
1346
35090471
AM
13472005-04-01 Alan Modra <amodra@bigpond.net.au>
1348
1349 * elf64-ppc.c (ppc64_elf_edit_toc): Account for dynamic relocs
1350 that we no longer need.
1351
7356fed5
AM
13522005-04-01 Alan Modra <amodra@bigpond.net.au>
1353
1354 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Return -1 on errors
1355 rather than 0.
77623a34 1356 (ppc64_elf_check_relocs): Remove unnecessary SEC_ALLOC check.
7356fed5 1357
28b13744
L
13582005-03-31 H.J. Lu <hongjiu.lu@intel.com>
1359
1360 * elf.c (assign_section_numbers): Fix a typo.
1361
c93625e2
L
13622005-03-31 H.J. Lu <hongjiu.lu@intel.com>
1363
1364 * elflink.c (elf_link_input_bfd): Remove the extra `\n' in
1365 error message.
1366 (_bfd_elf_section_already_linked): Likewise.
1367
fddc4048
JG
13682005-03-31 Jerome Guitton <guitton@gnat.com>
1369
1370 * config.in: Regenerate.
1371
2e9ebff5
JG
13722005-03-31 Jerome Guitton <guitton@gnat.com>
1373
c93625e2
L
1374 * config.in (HAVE_DECL_BASENAME): New configure macro.
1375 * configure.in: Check for basename.
1376 * configure: Regenerate.
2e9ebff5 1377
05ea83ed
JB
13782005-03-30 Julian Brown <julian@codesourcery.com>
1379
1380 * bfd-in.h (bfd_is_arm_mapping_symbol_name): Rename from
1381 bfd_elf32_is_arm_mapping_symbol_name.
1382 * bfd-in2.h: Regenerate.
1383 * cpu-arm.c (bfd_is_arm_mapping_symbol_name): Rename from
1384 bfd_elf32_is_arm_mapping_symbol_name.
1385 * elf32-arm.c (elf32_arm_is_target_special_symbol): Rename
1386 bfd_elf32_is_arm_mapping_symbol_name to bfd_is_arm_mapping_symbol_name.
1387 (arm_elf_find_function): Likewise.
1388 (elf32_arm_output_symbol_hook): Likewise.
1389
9d2da7ca
JB
13902005-03-30 Julian Brown <julian@codesourcery.com>
1391
1392 * bfd-in.h (bfd_elf32_is_arm_mapping_symbol_name): Add prototype.
1393 * bfd-in2.h: Regenerate.
1394 * elf32-arm.c (elf32_arm_is_target_special_symbol): Rename call to
1395 bfd_elf32_is_arm_mapping_symbol_name.
1396 (elf32_arm_output_symbol_hook): Likewise.
1397 (arm_elf_find_function): Likewise, and include STT_NOTYPE in test for
1398 mapping symbols.
1399 (is_arm_mapping_symbol_name): Function moved from here...
1400 * cpu-arm.c (bfd_elf32_is_arm_mapping_symbol_name): ...to here, renamed
1401 and made global.
1402
efa9bda4
AL
14032005-03-29 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
1404
1405 * configure.in: Check for ffs decl and alphabetize.
1406 * config.in: Regenerate.
1407 * configure: Regenerate.
d7128ce4 1408 * sysdep.h [NEED_DECLARATION_FFS] (ffs): Prototype and alphabetize.
efa9bda4 1409
09a9d560
FF
14102005-03-29 Fred Fish <fnf@specifixinc.com>
1411
1412 * dwarf2.c (struct comp_unit): Fix typo.
1413 (scan_unit_for_functions): Remove unused local variable "name"
1414 and dead code that set it.
1415
ba93b8ac
DJ
14162005-03-29 Daniel Jacobowitz <dan@codesourcery.com>
1417 Phil Blundell <philb@gnu.org>
1418
1419 * bfd-in2.h, libbfd.h: Regenerated.
1420 * reloc.c: Add ARM TLS relocations.
1421 * elf32-arm.c (elf32_arm_howto_table): Add dynamic TLS
1422 relocations.
1423 (elf32_arm_tls_gd32_howto, elf32_arm_tls_ldo32_howto)
1424 (elf32_arm_tls_ldm32_howto, elf32_arm_tls_le32_howto)
1425 (elf32_arm_tls_ie32_howto): New.
1426 (elf32_arm_howto_from_type): Support TLS relocations.
1427 (elf32_arm_reloc_map): Likewise.
1428 (elf32_arm_reloc_type_lookup): Likewise.
1429 (TCB_SIZE): Define.
1430 (struct elf32_arm_obj_tdata): New.
1431 (elf32_arm_tdata, elf32_arm_local_got_tls_type): Define.
1432 (elf32_arm_mkobject): New function.
1433 (struct elf32_arm_relocs_copied): Add pc_count.
1434 (elf32_arm_hash_entry, GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD)
1435 (GOT_TLS_IE): Define.
1436 (struct elf32_arm_link_hash_table): Add tls_ldm_got.
1437 (elf32_arm_link_hash_newfunc): Initialize tls_type.
1438 (elf32_arm_copy_indirect_symbol): Copy pc_count and tls_type.
1439 (elf32_arm_link_hash_table_create): Initialize tls_ldm_got.
1440 (dtpoff_base, tpoff): New functions.
1441 (elf32_arm_final_link_relocate): Handle TLS relocations.
1442 (IS_ARM_TLS_RELOC): Define.
1443 (elf32_arm_relocate_section): Warn about TLS mismatches.
1444 (elf32_arm_gc_sweep_hook): Handle TLS relocations and pc_count.
1445 (elf32_arm_check_relocs): Detect invalid symbol indexes. Handle
1446 TLS relocations and pc_count.
1447 (elf32_arm_adjust_dynamic_symbol): Check non_got_ref.
1448 (allocate_dynrelocs): Handle TLS. Bind REL32 relocs to local
1449 calls.
1450 (elf32_arm_size_dynamic_sections): Handle TLS.
1451 (elf32_arm_finish_dynamic_symbol): Likewise.
1452 (bfd_elf32_mkobject): Define.
1453
71a976dd
DJ
14542005-03-29 Daniel Jacobowitz <dan@codesourcery.com>
1455
1456 * elf32-arm.c (elf32_arm_check_relocs): Increment count for all
1457 relocation types. Don't count relocations which will use a PLT.
1458
7e7353ed
JB
14592005-03-29 Joel Brobecker <brobecker@gnat.com>
1460
1461 * elf.c (elfcore_grok_nto_status): Print tid as long.
1462 (elfcore_grok_nto_regs): Likewise.
1463
166856d7
JB
14642005-03-29 Joel Brobecker <brobecker@gnat.com>
1465
40937810 1466 * irix-core.c: Remove some unnecessary prototypes.
166856d7 1467
40f85900
JB
14682005-03-28 Joel Brobecker <brobecker@adacore.com>
1469
1470 * irix-core.c: Convert to ISO C.
1471
aa2e06ba
JB
14722005-03-28 Joel Brobecker <brobecker@adacore.com>
1473
1474 * irix-core.c (do_sections): Replace + by | in expression.
1475 (irix_core_core_file_matches_executable_p): Add ATTRIBUTE_UNUSED
1476 to unused parameters to avoid a compiler warning.
1477
832bc186
MK
14782005-03-28 Mark Kettenis <kettenis@gnu.org>
1479
1480 * netbsd-core.c: Convert to ISO C. Fix formatting.
1481
82f0cfbd
EC
14822005-03-24 Eric Christopher <echristo@redhat.com>
1483
1484 * elfxx-mips.c: Revert previous patch.
1485
d7b9976f
NC
14862005-03-24 Nick Clifton <nickc@redhat.com>
1487
1488 * targets.c (_bfd_target_vector): Only include the
1489 bfd_elf32_ia64_hpux_big_vec vector when building a 64-bit BFD with
1490 all targets enabled.
1491
074d327a
NC
14922005-03-24 James E Wilson <wilson@specifixinc.com>
1493
1494 * Makefile.am (BFD32_BACKENDS): Delete elf32-ia64.lo.
1495 (BFD64_BACKENDS): Add elf32-ia64.lo.
1496 * Makefile.in: Regenerate.
1497
cc27e1dc
EC
14982005-03-23 Eric Christopher <echristo@redhat.com>
1499
1500 * elfxx-mips.c (MIPS_ELF_READONLY_SECTION): New.
1501 (mips_elf_calculate_relocation): Use. Define DF_TEXTREL
1502 after emitting relocation.
1503 (_bfd_mips_elf_adjust_dynamic_symbol): Ditto.
1504 (_bfd_mips_elf_check_relocs): Remove code to set DF_TEXTREL
1505 and readonly_reloc.
1506
ed84e695
NC
15072005-03-23 Mike Frysinger <vapier@gentoo.org>
1508 Nick Clifton <nickc@redhat.com>
1509
1510 * config.bfd: Accept any C library to accompany a GNU Linux
1511 implementation, not just the GNU C library.
1512 * configure.in: Likewise.
1513 * configure: Regenerate.
1514
81e1b023
L
15152005-03-22 H.J. Lu <hongjiu.lu@intel.com>
1516
1517 * bfd-in.h (_bfd_elf_provide_symbol): New.
1518 * bfd-in2.h: Regenerated.
1519
1520 * elf32-ppc.c (set_linker_sym): Moved to elflink.c.
1521 (ppc_elf_set_sdata_syms): Call _bfd_elf_provide_symbol instead
1522 of set_linker_sym.
1523
1524 * elflink.c (_bfd_elf_provide_symbol): New. Moved and renamed
1525 from elf32-ppc.c.
1526
672c2d7e
HPN
15272005-03-22 Hans-Peter Nilsson <hp@axis.com>
1528
1529 * hash.c (strtab_hash_newfunc): Fix typo in allocated size.
1530
1fbc7e7a
BW
15312005-03-22 Bob Wilson <bob.wilson@acm.org>
1532
1533 * xtensa-isa.c (xtensa_opcode_lookup, xtensa_state_lookup,
1534 xtensa_sysreg_lookup_name, xtensa_interface_lookup,
1535 xtensa_funcUnit_lookup): Skip bsearch call if count is zero.
1536 (xtensa_opcode_decode): Rearrange code.
1537
c8e7bf0d
NC
15382005-03-22 Nick Clifton <nickc@redhat.com>
1539
1540 * binary.c: Convert to ISO C90 formatting.
1541 * coff-arm.c: Convert to ISO C90 formatting.
1542 * coffgen.c: Convert to ISO C90 formatting.
1543 * elf32-gen.c: Convert to ISO C90 formatting.
1544 * elf64-gen.c: Convert to ISO C90 formatting.
1545 * hash.c: Convert to ISO C90 formatting.
1546 * ieee.c: Convert to ISO C90 formatting.
1547
28a094c2
DJ
15482005-03-22 Daniel Jacobowitz <dan@codesourcery.com>
1549
1550 * elf32-arm.c (elf32_arm_final_link_relocate): Don't fail for
1551 unresolved symbols in R_ARM_NONE relocations.
1552
0945cdfd
DJ
15532005-03-22 Daniel Jacobowitz <dan@codesourcery.com>
1554
1555 * elf32-arm.c (elf32_arm_final_link_relocate): Add
1556 UNRESOLVED_RELOC_P argument. Set it appropriately.
1557 (elf32_arm_relocate_section): Update call to
1558 elf32_arm_final_link_relocate. Don't clobber RELOCATION; use
1559 unresolved_reloc instead.
1560
11d2f718
AM
15612005-03-23 Alan Modra <amodra@bigpond.net.au>
1562
1563 * elflink.c (elf_link_add_object_symbols): Set SEC_EXCLUDE on
1564 .gnu.warning.* sections.
1565
76750a2f
AM
15662005-03-22 Alan Modra <amodra@bigpond.net.au>
1567
1568 * elf32-ppc.c (elf_linker_section_pointers_t): Remove
1569 written_address_p.
1570 (ppc_elf_create_linker_section): Don't try to reuse existing section.
1571 (elf_create_pointer_linker_section): Delete info parm. Don't make
1572 h dynamic. Don't set written_address_p.
1573 (ppc_elf_check_relocs): Adjust ppc_elf_create_linker_section calls.
1574 (bfd_put_ptr): Delete.
1575 (elf_finish_pointer_linker_section): Remove output_bfd and info parms.
1576 Always write section contents. Assert global sym is def_regular.
1577 Use offset bottom bit as a written flag.
1578 (ppc_elf_relocate_section): Adjust elf_finish_pointer_linker_section
1579 calls.
1580
f85f57ad
AM
15812005-03-22 Alan Modra <amodra@bigpond.net.au>
1582
1583 * elf32-ppc.c (ppc_elf_set_sdata_syms): New function, extracted from..
1584 (ppc_elf_set_sdata_syms): ..here. Expand comment. Set .sbss start
1585 and end syms.
1586
2dc773a0
NC
15872005-03-21 Nick Clifton <nickc@redhat.com>
1588
1589 * coff-arm.c (coff_link_hash_entry): Only define for non WINCE
1590 targets.
1591 (t2a1_bx_pc_insn): Likewise.
1592 (t2a2_noop_insn): Likewise.
1593 (t2a3_b_insn): Likewise.
1594 (t2a1_push_insn): Likewise.
1595 (t2a2_ldr_insn): Likewise.
1596 (t2a3_mov_insn): Likewise.
1597 (t2a4_bx_insn): Likewise.
1598 (t2a5_pop_insn): Likewise.
1599 (t2a6_bx_insn): Likewise.
1600 (coff_arm_relocate_section): Only declare the high_address
1601 variable for non WINCE targets.
1602
644285ef
AM
16032005-03-22 Alan Modra <amodra@bigpond.net.au>
1604
1605 * elf32-ppc.c (ppc_elf_add_symbol_hook): Make htab->sbss
1606 SEC_LINKER_CREATED. Attach to dynobj.
1607 (ppc_elf_size_dynamic_sections): Strip htab->sbss if zero size.
1608
c9a2f333
AM
16092005-03-21 Alan Modra <amodra@bigpond.net.au>
1610
1611 * elf32-ppc.c (struct elf_linker_section): Remove sym_hash and
1612 sym_offset. Add name, bss_name, sym_name, sym_val.
1613 (struct ppc_elf_link_hash_table): Remove sdata and sdata2 pointers.
1614 Add sdata array of elf_linker_section_t.
1615 (ppc_elf_link_hash_table_create): Set name, sym_name, and bss_name.
1616 (enum elf_linker_section_enum): Delete.
1617 (ppc_elf_create_linker_section): Rewrite. Don't create syms here.
1618 (ppc_elf_check_relocs): Delay ppc_elf_create_linker_section until
1619 the special sections are needed. Adjust htab->sdata refs.
1620 Ensure dynobj is set in sreloc code.
1621 (ppc_elf_size_dynamic_sections): Strip sdata sections.
1622 (ppc_elf_set_sdata_syms): New function.
1623 (elf_finish_pointer_linker_section): Use 0x8000 for sym_offset.
1624 (ppc_elf_relocate_section): Adjust references to htab->sdata. Use
1625 sym_val instead of sym_hash.
1626 * elf32-ppc.h (ppc_elf_set_sdata_syms): Declare.
1627
8853c3d3
AM
16282005-03-21 Alan Modra <amodra@bigpond.net.au>
1629
1630 * elf32-ppc.c (is_ppc_elf_target): Move to linker part of file.
1631 (ppc_elf_merge_private_bfd_data): Likewise.
1632
2bb04cf2
AM
16332005-03-21 Alan Modra <amodra@bigpond.net.au>
1634
1635 * elf32-ppc.c (struct elf_linker_section): Remove rel_section.
1636 (ppc_elf_create_linker_section): Don't create rel_section.
1637 (elf_create_pointer_linker_section): Don't size relocs.
1638 (elf_finish_pointer_linker_section): Remove relative_reloc parm.
1639 Don't generate relocs.
1640 (ppc_elf_relocate_section): Adjust calls to
1641 elf_finish_pointer_linker_section.
1642
d2663f46
AM
16432005-03-21 Alan Modra <amodra@bigpond.net.au>
1644
1645 * elf32-ppc.c (is_ppc_elf_target): New function.
1646 (ppc_elf_merge_private_bfd_data): Use it rather than just testing
1647 for bfd_target_elf_flavour. Do this test before endian check.
1648 (ppc_elf_add_symbol_hook): Use is_pcc_elf_target.
1649 (ppc_elf_size_dynamic_sections): Likewise.
1650
6dc132d9
L
16512005-03-20 H.J. Lu <hongjiu.lu@intel.com>
1652
1653 * elf-bfd.h (elf_backend_data): Add int to
1654 elf_backend_section_from_shdr.
1655 (bfd_elf_section_data): Update comment for this_idx.
1656 (_bfd_elf_make_section_from_shdr): Add int.
1657 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
1658
1659 * elf.c (_bfd_elf_make_section_from_shdr): Take section index
1660 and use it to set this_idx in bfd_elf_section_data.
1661 (bfd_section_from_shdr): Pass shindex to
1662 _bfd_elf_make_section_from_shdr.
1663 (_bfd_elf_section_from_bfd_section): Use this_idx in
1664 bfd_elf_section_data to find section index.
1665
1666 * elf32-arm.c (elf32_arm_section_from_shdr): Take section
1667 index and pass it to _bfd_elf_make_section_from_shdr.
1668 * elf32-i370.c(i370_elf_section_from_shdr): Likewise.
1669 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
1670 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
1671 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
1672 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
1673 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
1674 * elf64-x86-64.c (elf64_x86_64_section_from_shdr): Likewise.
1675 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
1676 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
1677
cabd4ccc
DS
16782005-03-19 Danny Smith <dannysmith@users.sourceforge.net>
1679 Ross Ridge <rridge@csclub.uwaterloo.ca>
1680
1681 * peicode.h (pe_ILF_build_a_bfd): Strip only one prefix
1682 character in IMPORT_NAME_UNDECORATE and IMPORT_NAME_NOPREFIX
1683 cases. Add comment.
1684
7451fd89
L
16852005-03-18 H.J. Lu <hongjiu.lu@intel.com>
1686
1687 * elflink.c (elf_mark_used_section): Remove check for special
1688 sections.
1689
b4677f03
AS
16902005-03-18 Andreas Schwab <schwab@suse.de>
1691
1692 * elfxx-ia64.c (elfNN_ia64_install_value): Change type of insn
1693 from bfd_vma to ia64_insn, remove broken cast.
1694
238d258f
NC
16952005-03-18 C Jaiprakash <cjaiprakash@noida.hcltech.com>
1696
8853c3d3 1697 * elf32-m68k.c (elf_cfv4e_plt0_entry): plt entry for coldfire v4e.
238d258f
NC
1698 (elf_m68k_adjust_dynamic_symbol,elf_m68k_finish_dynamic_symbol,
1699 elf_m68k_finish_dynamic_sections): Use it.
1700
b294bdf8
MM
17012005-03-17 Paul Brook <paul@codesourcery.com>
1702 Dan Jacobowitz <dan@codesourcery.com>
1703 Mark Mitchell <mark@codesourcery.com>
1704
1705 * elf32-arm.c (elf32_arm_modify_segment_map): New function.
1706 (elf32_arm_additional_program_headers): Likewise.
1707 (elf_backend_modify_segment_map): Define.
1708 (elf_backend_additional_program_headers): Likewise.
1709 (elf32_arm_symbian_modify_segment_map): Use
1710 elf32_arm_modify_segment_map.
1711
257a4820
L
17122005-03-18 H.J. Lu <hongjiu.lu@intel.com>
1713
1714 * elflink.c (elf_mark_used_section): Check bfd_is_const_section
1715 for special sections.
1716
554220db
AM
17172005-03-18 Alan Modra <amodra@bigpond.net.au>
1718
1719 * elf-bfd.h (_bfd_elf_link_renumber_dynsyms): Delete.
1720 * elflink.c (_bfd_elf_link_renumber_dynsyms): Make static, add
1721 section_sym_count param, and return number of section symbols.
1722 (bfd_elf_size_dynamic_sections): Clear section symbol area of
1723 .dynsym contents. Don't bother calling swap_symbol_out on the
1724 first all-zero dynsym.
1725 (elf_mark_used_section): Formatting. Avoid twiddling flags in
1726 special sections like bfd_abs_section.
1727 (bfd_elf_gc_sections): Spelling fix.
1728
36868d45
NC
17292005-03-16 Fred Fish <fnf@specifixinc.com>
1730
1731 PR binutils/790
1732 * dwarf2.c (read_indirect_string): Fix apparent typo, check
1733 dwarf_str_buffer allocation, not dwarf_abbrev_buffer.
1734
57316bff
L
17352005-03-16 H.J. Lu <hongjiu.lu@intel.com>
1736
1737 * elflink.c (elf_mark_used_section): New.
1738 (bfd_elf_gc_sections): Call elf_gc_mark_section for
1739 non-relocatable link if we don't do GC.
1740
1ad12f97
NC
17412005-03-16 Nick Clifton <nickc@redhat.com>
1742 Ben Elliston <bje@au.ibm.com>
1743
569acd2c 1744 * configure.in (werror): New switch: Add -Werror to the
1ad12f97 1745 compiler command line. Enabled by default. Disable via
569acd2c 1746 --disable-werror.
1ad12f97
NC
1747 * configure: Regenerate.
1748
3b5d3310
NC
17492005-03-16 Nick Clifton <nickc@redhat.com>
1750
1751 * ecoff.c: Convert to ISO C90 formatting.
1752
25dbc73a
AM
17532005-03-16 Alan Modra <amodra@bigpond.net.au>
1754
1755 * elf32-ppc.c: Divide file into general and linker specific
1756 functions. Sort linker functions into roughly the order in which
1757 they are called by the ELF linker code.
1758
cb2d1ef2
AM
17592005-03-16 Alan Modra <amodra@bigpond.net.au>
1760
1761 * elf32-ppc.c (ppc_elf_create_linker_section): Set SEC_LINKER_CREATED
1762 on section. Correct comment, and add FIXME.
1763 (ppc_elf_additional_program_headers): Don't bump header count for
1764 interp. Test SEC_ALLOC, not SEC_LOAD, and don't test size.
1765 (ppc_elf_size_dynamic_sections): Don't strip sdata and sdata2, but
1766 do allocate memory if they need it.
1767
34723071
NC
17682005-03-15 Mikkel Krautz <krautz@gmail.com>
1769
1770 * config.bfd (x86_64-elf): Add target.
1771
729ae8d2
AM
17722005-03-15 Alan Modra <amodra@bigpond.net.au>
1773
1774 * po/es.po: Commit new Spanish translation.
1775
f0581930
L
17762005-03-14 H.J. Lu <hongjiu.lu@intel.com>
1777
1778 * elfxx-ia64.c (elfNN_ia64_relocate_section): Set symbo name
1779 for global symbol when reporting overflow.
1780
390c0e42
JJ
17812005-03-11 Jakub Jelinek <jakub@redhat.com>
1782
1783 * libbfd-in.h (_bfd_ar_spacepad): New prototype.
1784 * libbfd.h: Rebuilt.
1785 * archive.c (_bfd_ar_spacepad): New function.
1786 (_bfd_construct_extended_name_table, _bfd_write_archive_contents,
1787 bsd_write_armap, _bfd_archive_bsd_update_armap_timestamp,
1788 coff_write_armap): Use it.
1789 (bfd_ar_hdr_from_filesystem): Likewise. Fix HP-UX large
1790 uid/gid support.
1791 * archive64.c (bfd_elf64_archive_write_armap): Use _bfd_ar_spacepad.
1792
a2633f4e
MK
17932005-03-10 Mark Kettenis <kettenis@gnu.org>
1794
1795 * archive.c (_bfd_look_for_bfd_in_cache): Move declaration of
1796 has_table to the start of the function.
1797
109f7096
BE
17982005-03-10 Ben Elliston <bje@au.ibm.com>
1799
1800 * archive.c: Include hashtab.h.
1801 (struct ar_cache): Rename `arelt' to `arbfd' and remove `next'.
1802 (_bfd_look_for_bfd_in_cache): Reimplement using htab_find.
1803 (hash_file_ptr): New function.
1804 (eq_file_ptr): Likewise.
1805 (_bfd_add_bfd_to_archive_cache): Reimplement using a hash table.
1806 * libbfd-in.h: Include hashtab.h.
1807 (struct artdata): Change `cache' member type to htab_t.
1808 * libbfd.h: Rebuild.
1809
664fe1be
DJ
18102005-03-08 Daniel Jacobowitz <dan@codesourcery.com>
1811
1812 * configure.in: Bump version to 2.16.90.
1813 * configure: Regenerated.
1814
0709bb22
JJ
18152005-03-07 Jakub Jelinek <jakub@redhat.com>
1816
1817 * opncls.c (opncls_bread, opncls_bclose): Fix if pread resp.
1818 close is a function like macro in system headers.
1819
b18e2ae5
AM
18202005-03-07 Alan Modra <amodra@bigpond.net.au>
1821
1822 PR ld/778
1823 * elf32-hppa.c (elf32_hppa_create_dynamic_sections): Reinstate
1824 _GLOBAL_OFFSET_TABLE_ as a normal dynamic symbol.
1825
1f170678
AM
18262005-03-06 Alan Modra <amodra@bigpond.net.au>
1827
1828 * elf.c (elfcore_grok_win32pstatus): Warning fixes.
1829
06647dfd
AM
18302005-03-05 Alan Modra <amodra@bigpond.net.au>
1831
1832 * po/bfd.pot: Regenerate.
1833
93f3fa99
AM
18342005-03-05 Alan Modra <amodra@bigpond.net.au>
1835
1836 * elf64-ppc.c (update_plt_info): Don't mark new ABI call syms
1837 with is_func.
1838 (func_desc_adjust): Force dot-syms local in executables as well
1839 as shared libs.
1840
bbe506e8
TS
18412005-03-04 David Daney <ddaney@avtrex.com>
1842
1843 * elfxx-mips.c (mips_elf_calculate_relocation): Handle special
1844 '__gnu_local_gp' symbol used by gas -mno-shared.
1845
d27f5fa1
L
18462005-03-03 H.J. Lu <hongjiu.lu@intel.com>
1847
1848 * elf-bfd.h (elf_backend_data): Add "const char *" to
1849 elf_backend_section_from_phdr.
1850
1851 * elf.c (bfd_section_from_phdr): Pass "proc" to the
1852 elf_backend_section_from_phdr hook.
1853
0f20cc35
DJ
18542005-03-02 Daniel Jacobowitz <dan@codesourcery.com>
1855 Joseph Myers <joseph@codesourcery.com>
1856
1857 * elfxx-mips.c (struct mips_got_entry): Add tls_type.
1858 (struct mips_got_info): Add tls_gotno, tls_assigned_gotno,
1859 and tls_ldm_offset.
1860 (struct mips_elf_got_per_bfd_arg): Add global_count.
1861 (struct mips_elf_count_tls_arg): New.
1862 (struct mips_elf_hash_sort_data): Update comment for min_got_dynindx.
1863 (struct mips_elf_link_hash_entry): Add tls_type and tls_got_offset.
1864 (GOT_NORMAL, GOT_TLS_GD, GOT_TLS_LDM, GOT_TLS_IE)
1865 (GOT_TLS_OFFSET_DONE, GOT_TLS_DONE): Define.
1866 (TLS_RELOC_P): Define.
1867 (TP_OFFSET, DTP_OFFSET): Define.
1868 (dtprel_base, tprel_base): New functions.
1869 (mips_elf_link_hash_newfunc): Initialize tls_type.
1870 (mips_elf_got_entry_hash, mips_elf_got_entry_eq)
1871 (mips_elf_multi_got_entry_hash, mips_elf_multi_got_entry_eq): Handle
1872 TLS entries.
1873 (mips_tls_got_relocs, mips_elf_count_local_tls_relocs)
1874 (mips_elf_count_global_tls_entries, mips_elf_count_global_tls_relocs)
1875 (mips_elf_output_dynamic_relocation, mips_elf_initialize_tls_slots)
1876 (mips_tls_got_index): New functions.
1877 (mips_elf_local_got_index): Add new R_SYMNDX, H, and R_TYPE
1878 arguments. Pass them to mips_elf_create_local_got_entry. Use
1879 mips_tls_got_index.
1880 (mips_elf_global_got_index): Add new R_TYPE and INFO arguments.
1881 Handle TLS entries.
1882 (mips_elf_got_page, mips_elf_got16_entry): Update calls to
1883 mips_elf_create_local_got_entry.
1884 (mips_elf_create_local_got_entry): Add new R_SYMNDX, H, and R_TYPE
1885 arguments. Handle TLS entries.
1886 (mips_elf_sort_hash_table_f): Add non-TLS assertions.
1887 (mips_elf_record_local_got_symbol): Add new TLS_FLAG argument. Handle
1888 TLS entries.
1889 (mips_elf_record_global_got_symbol): Likewise.
1890 (mips_elf_make_got_per_bfd): Initialize new mips_got_info members.
1891 Count TLS entries.
1892 (mips_elf_merge_gots): Handle TLS entries when merging.
1893 (mips_elf_initialize_tls_index): New function.
1894 (mips_elf_set_global_got_offset): Handle TLS entries.
1895 (mips_elf_adjust_gp): Handle TLS.
1896 (mips_elf_multi_got): Remove redundant call to
1897 mips_elf_resolve_final_got_entries. Initialize global_count.
1898 Correct a comment. Initialize new TLS members of mips_got_info.
1899 Assign TLS GOT indexes for new GOTs.
1900 (mips_elf_create_got_section): Initialize new TLS members of
1901 mips_got_info.
1902 (mips_elf_calculate_relocation): Handle TLS relocs.
1903 (_bfd_mips_elf_check_relocs): Likewise. Update calls to changed
1904 functions.
1905 (_bfd_mips_elf_always_size_sections): Handle TLS.
1906 (_bfd_mips_elf_size_dynamic_sections): Likewise.
1907 (_bfd_mips_elf_finish_dynamic_symbol): Likewise. Update calls to
1908 changed functions.
1909 (_bfd_mips_elf_copy_indirect_symbol): Copy tls_type.
1910 (_bfd_mips_elf_hide_symbol): Handle TLS.
1911 * elfn32-mips.c (elf_mips_howto_table_rel, elf_mips_howto_table_rela)
1912 (mips_reloc_map): Add TLS relocs.
1913 * elf32-mips.c (elf_mips_howto_table_rel, mips_reloc_map): Likewise.
1914 * elf64-mips.c (mips_elf64_howto_table_rel)
1915 (mips_elf64_howto_table_rela, mips_reloc_map): Likewise.
1916 * reloc.c: Define new MIPS TLS relocations.
1917 * libbfd.h, bfd-in2.h: Regenerated.
1918
bb14f524
JB
19192005-03-02 Jan Beulich <jbeulich@novell.com>
1920
1921 * Makefile.am: Add dependency of cache.o on libiberty.h.
1922 * cache.c: Include libiberty.h.
1923 (bfd_open_file): Use unlink_if_ordinary instead of unlink.
1924
8c1acd09
ZW
19252005-03-01 Zack Weinberg <zack@codesourcery.com>
1926
1927 * elf.c (bfd_section_from_shdr <default case>): Call
1928 elf_backend_section_from_shdr hook unconditionally, and return
1929 what it returns.
1930 (bfd_section_from_phdr): Similarly, for elf_backend_section_from_phdr.
1931 * elfxx-target.h (elf_backend_section_from_shdr)
1932 (elf_backend_section_from_phdr): Default to
1933 _bfd_elf_make_section_from_shdr and _bfd_elf_make_section_from_phdr
1934 respectively.
1935
70bfecec
AM
19362005-03-01 Alan Modra <amodra@bigpond.net.au>
1937
a67a7b8b
AM
1938 * targets.h: Typo fix.
1939 * bfd-in2.h: Regenerate.
1940
70bfecec
AM
1941 * bout.c (b_out_write_object_contents): Don't use sizeof on host
1942 structs to size on-disk structures.
1943 (b_out_set_section_contents): Size the external struct, not the
1944 internal one for on-disk size.
1945 (b_out_sizeof_headers): Likewise.
1946
ceb1f1ef
AM
19472005-03-01 Alan Modra <amodra@bigpond.net.au>
1948
1949 * elf64-ppc.c (ppc64_elf_size_stubs): Override defined dot-sym
1950 entry points with the func descriptor as well as undefweak.
1951
f67e617a
NC
19522005-02-28 Ross Ridge <rridge@csclub.uwaterloo.ca>
1953
1954 * peicode.h (pe_ILF_build_a_bfd): Do not assume that an @ will be
1955 present when IMPORT_NAME_UNDOECRATE is used.
1956
af44c138
L
19572005-02-28 H.J. Lu <hongjiu.lu@intel.com>
1958
1959 PR 757
1960 * elf-bfd.h (_bfd_elf_merge_symbol): Add a pointer to unsigned
1961 int.
1962
1963 * elf32-sh-symbian.c (sh_symbian_relocate_section): Pass NULL
1964 to _bfd_elf_merge_symbol.
1965
1966 * elflink.c (_bfd_elf_merge_symbol): Use the pointer to
1967 unsigned int to return the alignment of the old common symbol
1968 in the dynamic object.
1969 (_bfd_elf_add_default_symbol): Pass NULL to
1970 _bfd_elf_merge_symbol.
1971 (elf_link_add_object_symbols): Pass &old_alignment to
1972 _bfd_elf_merge_symbol. Get the alignment of the new common
1973 symbol in the dynamic object.
1974
10adf131
BE
19752005-02-24 Ben Elliston <bje@au.ibm.com>
1976
1977 * coffcode.h (coff_sym_filepos): Remove GNU960 conditional code.
1978 * format.c (bfd_check_format_matches): Likewise.
1979 * archive.c (BFD_GNU960_ARMAG): Likewise.
1980 (bfd_generic_archive_p): Likewise.
1981 (_bfd_write_archive_contents): Likewise.
1982
60b779bf
L
19832005-02-24 H.J. Lu <hongjiu.lu@intel.com>
1984
1985 * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.95.
1986 * configure: Regenerate.
1987
1f02cbd9
JB
19882005-02-24 Julian Brown <julian@sirius.codesourcery.com>
1989
1990 * elflink.c (elf_link_add_object_symbols): Force symbols in discarded
1991 COMDAT group sections to have default visibility.
1992
f60ca5e3
AM
19932005-02-24 Alan Modra <amodra@bigpond.net.au>
1994
1995 * coffcode.h (coff_print_aux): Warning fix.
1996 * elf-m10300.c (mn10300_elf_relax_section): Use section->id
1997 instead of section pointer to identify.
1998 * coff-h8300.c (h8300_reloc16_extra_cases): Likewise. Allocate
1999 the correct size buffer for local sym mangling too.
2000 (h8300_bfd_link_add_symbols): Likewise.
2001 * elf32-sh-symbian.c (sh_symbian_process_embedded_commands): Fix
2002 warning.
2003 * elf32-sh64.c (shmedia_prepare_reloc): Use %B and %p in error message
2004 * elf32-xtensa.c (literal_value_hash): Warning fix.
2005 * versados.c (process_otr): Warning fix.
2006 (versados_canonicalize_reloc): Likewise.
2007 * vms-gsd.c (_bfd_vms_slurp_gsd): Warning fix.
2008 * vms.c (fill_section_ptr): Warning fix.
2009
9a5d8e72
L
20102005-02-23 H.J. Lu <hongjiu.lu@intel.com>
2011
2012 * coff-tic54x.c (SWAP_OUT_RELOC_EXTRA): Defined.
2013 * coff-tic80.c (SWAP_OUT_RELOC_EXTRA): Likewise.
2014
4b6c0f2f
NC
20152005-02-23 Nick Clifton <nickc@redhat.com>
2016
abc0f8d0
NC
2017 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Initialise
2018 the relvaddr field of the Elf32_crinfo structure.
2019
9b69b847
NC
2020 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Initialise
2021 variables that are passed by reference to
2022 m68hc11_get_relocation_value in case that function does not
2023 initialise them.
2024
90e868ac
NC
2025 * elf32-cr16c.c (cr16c_elf_final_link_relocate): Remove duplicated
2026 return statements and replace with a single return at the end of
2027 the function. This helps pacify the flow analysis code in gcc 4.0.
2028
4b6c0f2f
NC
2029 * elf.c (_bfd_elf_compute_section_file_positions): Initialise
2030 strtab to avoid compile time warning.
2031
c3e8c140
BE
20322005-02-23 Ben Elliston <bje@au.ibm.com>
2033
2034 * opncls.c (bfd_zalloc): Document this function.
2035
ebe372c1
L
20362005-02-21 H.J. Lu <hongjiu.lu@intel.com>
2037
2038 * coffcode.h (sec_to_styp_flags): Replaced SEC_CLINK with
2039 SEC_TIC54X_CLINK. Replace SEC_BLOCK with SEC_TIC54X_BLOCK.
2040 Replace SEC_SHARED with SEC_COFF_SHARED.
2041 (styp_to_sec_flags): Likewise.
2042
2043 * elfxx-target.h (TARGET_BIG_SYM): Remove SEC_ARCH_BIT_0.
2044 (TARGET_LITTLE_SYM): Likewise.
2045
2046 * section.c (SEC_ARCH_BIT_0): Removed.
2047 (SEC_LINK_DUPLICATES_SAME_CONTENTS): Defined with
2048 SEC_LINK_DUPLICATES_ONE_ONLY and SEC_LINK_DUPLICATES_SAME_SIZE.
2049 (SEC_SHARED): Renamed to ...
2050 (SEC_COFF_SHARED): This.
2051 (SEC_BLOCK): Renamed to ...
2052 (SEC_TIC54X_BLOCK): This.
2053 (SEC_CLINK): Renamed to ...
2054 (SEC_TIC54X_CLINK): This.
2055 (SEC_XXX): Rearranged. Move SEC_COFF_SHARED_LIBRARY,
2056 SEC_COFF_SHARED, SEC_TIC54X_BLOCK and SEC_TIC54X_CLINK to the
2057 end.
2058 * bfd-in2.h: Regenerated.
2059
26bf4e33
FF
20602005-02-21 Fred Fish <fnf@specifixinc.com>
2061
2062 * dwarf2.c (find_abstract_instance_name): Call recursively
2063 to handle a DW_AT_specification.
2064
e6daada3
TS
20652005-02-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2066
2067 * elfxx-mips.c (ecoff_swap_rpdr_out, mips_elf_output_extsym,
2068 mips_elf_create_dynamic_relocation,
2069 _bfd_mips_elf_size_dynamic_sections, _bfd_mips_elf_final_link):
2070 Remove #if 0'd code.
2071
d25604af
AM
20722005-02-21 Alan Modra <amodra@bigpond.net.au>
2073
2074 * Makefile.am: Run "make dep-am"
2075 * Makefile.in: Regenerate.
2076
fedf8d51
AM
20772005-02-21 Alan Modra <amodra@bigpond.net.au>
2078
2079 * coffgen.c (bfd_coff_get_comdat_section): Check that
2080 coff_section_data isn't NULL.
2081
f075ee0c
AM
20822005-02-21 Alan Modra <amodra@bigpond.net.au>
2083
2084 * bfd-in.h (bfd_elf_bfd_from_remote_memory): Warning fix.
2085 * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): Likewise.
2086 * coff-rs6000.c (xcoff_write_armap_big): Warning fixes. Remove
2087 useless assignments.
2088 (xcoff_write_archive_contents_big): Likewise.
2089 (_bfd_xcoff_put_ldsymbol_name): Likewise.
2090 * coff64-rs6000.c (_bfd_xcoff64_put_ldsymbol_name): Likewise.
2091 * coffgen.c (coff_write_symbols): Make "written" a bfd_vma.
2092 * cofflink.c (process_embedded_commands): Warning fixes.
2093 * cpu-arm.c: Delete unnecessary prototypes. Convert to C90.
2094 Warning fixes.
2095 * dwarf2.c: Warning fixes.
2096 * elf-bfd.h: Likewise.
2097 * elf-eh-frame.c: Likewise.
2098 * elf-strtab.c: Likewise.
2099 * elf.c: Likewise.
2100 * elf32-m68k.c: Likewise.
2101 * elf32-ppc.c: Likewise.
2102 * elf32-sh-symbian.c: Likewise.
2103 * elf32-sh.c: Delete unnecessary prototypes. Warning fixes.
2104 * elf64-sh64.c: Likewise.
2105 * peicode.h: Likewise.
2106 * elf64-mmix.c: Warning fixes.
2107 * elfcode.h: Likewise.
2108 * elfxx-mips.c: Likewise.
2109 * libbfd-in.h: Likewise.
2110 * libbfd.c: Likewise.
2111 * mach-o.c: Likewise.
2112 * merge.c: Likewise.
2113 * mmo.c: Likewise.
2114 * opncls.c: Likewise.
2115 * pef.c: Likewise.
2116 * srec.c: Likewise.
2117 * vms-hdr.c: Likewise.
2118 * vms-tir.c: Likewise.
2119 * xtensa-isa.c: Likewise.
2120 * xtensa-modules.c: Likewise.
2121 * xsym.c: Likewise.
2122 (pstrcmp): Use correct choice of string lengths. Fix return value.
2123 (bfd_sym_module_name): Correct string length.
2124 * bfd-in2.h: Regenerate.
2125 * libbfd.h: Regenerate.
2126
68320ddb
AO
21272005-02-17 Alexandre Oliva <aoliva@redhat.com>
2128
2129 * elf32-frv.c (elf32_frv_relocate_section): Remove warning from
fedf8d51 2130 uninitialized check_segment[1] in TLSMOFF case.
68320ddb
AO
2131 Reported by Alan Modra.
2132 (elf32_frv_relocate_section): Improve errors and warnings.
2133
1808e341
AM
21342005-02-17 Alan Modra <amodra@bigpond.net.au>
2135
2136 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Fix warning.
2137
5ff625e9
AM
21382005-02-16 Alan Modra <amodra@bigpond.net.au>
2139
2140 * coff-arm.c (coff_arm_is_local_label_name): Warning fix.
2141 * elf32-frv.c (frvfdpic_relocs_info_hash): Likewise.
2142 * pef.c (bfd_pef_scan): Don't ignore return value of
2143 bfd_pef_scan_start_address.
7e3102a7
AM
2144 * mach-o.c (bfd_mach_o_scan): Don't ignore return value of
2145 bfd_mach_o_scan_start_address.
2146 * elfxx-ia64.c (elfNN_ia64_relax_brl): Rewrite for 32-bit bfd_vma.
2147 * elfxx-mips.c: Remove unnecessary prototypes.
2148 (sort_dynamic_relocs_64): Abort if not BFD64.
5ff625e9 2149
92b7a70f
AM
21502005-02-16 Alan Modra <amodra@bigpond.net.au>
2151
2152 * elf64-ppc.c (ppc64_elf_edit_toc): Skip toc if size is zero.
2153 Skip toc reloc adjust if reloc_count is zero.
2154
d6f16593 21552005-02-15 Nigel Stephens <nigel@mips.com>
fedf8d51 2156 Maciej W. Rozycki <macro@mips.com>
d6f16593
MR
2157
2158 * elf32-mips.c (elf_mips16_howto_table_rel): New array for MIPS16
2159 reloc howtos. Add R_MIPS16_HI16 and R_MIPS16_LO16 relocs and
2160 R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
2161 (elf_mips16_jump_howto): Move into elf_mips16_howto_table_rel.
2162 (elf_mips16_gprel_howto): Likewise. Redefine src_mask and
2163 dst_mask.
2164 (mips16_gprel_reloc): Remove bit shuffling; call
2165 _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
2166 and _bfd_mips16_elf_reloc_shuffle() instead.
2167 (mips16_reloc_map): New reloc map for MIPS16 relocs.
2168 (bfd_elf32_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
2169 relocs.
2170 (mips_elf32_rtype_to_howto): Fetch MIPS16 howtos from
2171 elf_mips16_howto_table_rel.
2172 * elf64-mips.c (mips16_elf64_howto_table_rel): New array for
2173 MIPS16 REL reloc howtos. Add R_MIPS16_HI16 and R_MIPS16_LO16
2174 relocs and R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
2175 (elf_mips16_jump_howto): Move into mips16_elf64_howto_table_rel.
2176 (elf_mips16_gprel_howto): Likewise. Redefine src_mask and
2177 dst_mask.
2178 (mips16_elf64_howto_table_rela): New array for MIPS16 RELA
2179 reloc howtos. Add R_MIPS16_26, R_MIPS16_GPREL, R_MIPS16_HI16 and
2180 R_MIPS16_LO16 relocs and R_MIPS16_GOT16 and R_MIPS16_CALL16
2181 placeholders.
2182 (mips16_gprel_reloc): Remove bit shuffling; call
2183 _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
2184 and _bfd_mips16_elf_reloc_shuffle() instead.
2185 (mips16_reloc_map): New reloc map for MIPS16 relocs.
2186 (bfd_elf64_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
2187 relocs.
2188 (mips_elf64_rtype_to_howto): Fetch MIPS16 howtos from
2189 mips16_elf64_howto_table_rela or mips16_elf64_howto_table_rel.
2190 * elfn32-mips.c (elf_mips16_howto_table_rel): New array for MIPS16
2191 REL reloc howtos. Add R_MIPS16_HI16 and R_MIPS16_LO16 relocs and
2192 R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
2193 (elf_mips16_jump_howto): Move into elf_mips16_howto_table_rel.
2194 (elf_mips16_gprel_howto): Likewise. Redefine src_mask and
2195 dst_mask.
2196 (mips16_gprel_reloc): Remove bit shuffling; call
2197 _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
2198 and _bfd_mips16_elf_reloc_shuffle() instead.
2199 (mips16_reloc_map): New reloc map for MIPS16 relocs.
2200 (bfd_elf32_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
2201 relocs.
2202 (mips_elf_n32_rtype_to_howto): Fetch MIPS16 howtos from
2203 elf_mips16_howto_table_rela or elf_mips16_howto_table_rel.
2204 * elfxx-mips.c (_bfd_mips16_elf_reloc_unshuffle): New function to
2205 handle bit shuffling for MIPS16 relocs.
2206 (_bfd_mips16_elf_reloc_shuffle): Likewise.
2207 (_bfd_mips_elf_lo16_reloc): Use _bfd_mips16_elf_reloc_unshuffle()
2208 and _bfd_mips16_elf_reloc_shuffle().
2209 (_bfd_mips_elf_generic_reloc): Likewise.
2210 (mips_elf_calculate_relocation): Likewise. Handle R_MIPS16_HI16
2211 and R_MIPS16_LO16.
2212 (mips_elf_obtain_contents): Remove bit shuffling.
2213 (mips_elf_perform_relocation): Likewise; call
2214 _bfd_mips16_elf_reloc_unshuffle() and _bfd_mips16_elf_reloc_shuffle()
2215 instead.
2216 (_bfd_mips_elf_relocate_section): Likewise. Handle R_MIPS16_HI16
2217 and R_MIPS16_LO16.
2218 * elfxx-mips.h (_bfd_mips16_elf_reloc_unshuffle): Declare.
2219 (_bfd_mips16_elf_reloc_shuffle): Likewise.
2220 * reloc.c (BFD_RELOC_MIPS16_HI16): New reloc.
2221 (BFD_RELOC_MIPS16_HI16_S): Likewise.
2222 (BFD_RELOC_MIPS16_LO16): Likewise.
2223 * bfd-in2.h: Regenerate.
2224 * libbfd.h: Regenerate.
2225
0ca3e455
JB
22262005-02-15 Jan Beulich <jbeulich@novell.com>
2227
2228 * elfxx-ia64.c (ia64_howto_table): Correct strings for
2229 R_IA64_DTPMOD64[LM]SB.
2230
c5509b92
L
22312005-02-14 H.J. Lu <hongjiu.lu@intel.com>
2232
2233 * elfxx-ia64.c (elfNN_ia64_relax_section): Allow relax
2234 backward branch in the same section.
2235 (elfNN_ia64_relocate_section): Inform users that the input
2236 section is too big to relax br instruction when overflow
2237 happens to R_IA64_PCREL21B, R_IA64_PCREL21BI, R_IA64_PCREL21M
2238 and R_IA64_PCREL21F.
2239
5cba516c
NC
22402005-02-14 Orjan Friberg <orjanf@axis.com>
2241
2242 * elfcore.h (elf_core_file_p): Move the call to
2243 elf_backend_object_p to allow the correct machine to be set before
2244 processing the program headers.
2245
b59a68e1
NC
22462005-02-14 Nick Clifton <nickc@redhat.com>
2247
2248 PR binutils/716
2249 * peicode.h (pe_bfd_copy_private_bfd_data): Copy the large address
2250 aware flag from the input bfd to the output bfd.
2251
254f0426
MR
22522005-02-11 Maciej W. Rozycki <macro@mips.com>
2253
2254 * elf32-mips.c (_bfd_mips_elf32_gprel16_reloc): Reject
2255 R_MIPS_LITERAL relocations for external symbols.
2256 * elf64-mips.c (mips_elf64_literal_reloc): Likewise.
2257 * elfn32-mips.c (mips_elf_literal_reloc): Likewise.
2258
e91cdea7
L
22592005-02-11 H.J. Lu <hongjiu.lu@intel.com>
2260
2261 * bfd-in2.h: Rebuilt.
2262
67687978
PB
22632005-02-11 Paul Brook <paul@codesourcery.com>
2264
2265 * elf-bfd.h (struct elf_link_hash_table): Add
2266 is_relocatable_executable.
2267 * elf.c (_bfd_elf_link_hash_table_init): Initialize it.
2268 * elflink.c (bfd_elf_link_record_dynamic_symbol): Create local dynamic
2269 symbols in relocatable executables.
2270 (bfd_elf_record_link_assignment): Create dynamic section symbols in
2271 relocatable executables.
2272 (_bfd_elf_link_renumber_dynsyms): Ditto.
2273 (bfd_elf_final_link): Ditto.
2274 * elf32-arm.c (elf32_arm_final_link_relocate): Copy absolute
2275 relocations into relocatable executables.
2276 (elf32_arm_check_relocs): Crate dynamic sections for relocatable
2277 executables. Also copy absolute relocations.
2278 (elf32_arm_adjust_dynamic_symbol): Don't create copy relocations
2279 in relocatable executables.
2280 (allocate_dynrelocs): Copy relocations for relocatable executables.
2281 Output dynamic symbols for symbols defined in linker scripts.
2282
ca724bf2
NC
22832005-02-11 Nick Clifton <nickc@redhat.com>
2284
4b74b983
NC
2285 * libbfd.c (read_signed_leb128): Use an unsigned type for 'shift'
2286 to avoid a compile time warning.
2287
ca724bf2
NC
2288 * coff-alpha.c (alpha_adjust_reloc_in): Remove redundant test from
2289 BFD_ASSERT.
2290
3e25964f
NC
2291 * coff-tic4x.c (coff_rtype_to_howto): Move definition before
2292 inclusion of coffcode.h so that it is actually picked up.
2293
cb7a88a4
NC
2294 * coffcode.h (coff_std_swap_table): Add an unused attribute in
2295 case it is not used.
2296
596c83ec
NC
2297 * elf32-ip2k.c (ip2k_call_opcode, IS_CALL_OPCODE): Remove unused
2298 structure and macro.
2299
6c408f53
NC
2300 * elf32-iq2000.c (iq2000_reloc_map): Remove unused structure and
2301 array.
2302
d5b2f13b
NC
2303 * elf32-m32r.c (m32r_reloc_map_old): Use #ifdef USE_M32R_OLD_RELOC
2304 to protect the declaration of this array.
2305
169a6afd
NC
2306 * xsym.c (bfd_sym_parse_contained_variables_table_entry_v32):
2307 Avoid call to memcpy with a size of 0.
2308
2917689a
AM
23092005-02-12 Alan Modra <amodra@bigpond.net.au>
2310
2311 * elf64-ppc.c (toc_adjusting_stub_needed): Return true for
2312 old-style branches to undefined dot-symbols which will be
2313 satisfied by a plt call.
2314
40d16e0b
AM
23152005-02-11 Alan Modra <amodra@bigpond.net.au>
2316
2317 * elf64-ppc.c (move_plt_plist): New function, extracted from..
2318 (ppc64_elf_copy_indirect_symbol): ..here.
2319 (func_desc_adjust): Use move_plt_plist.
2320
e37c699c
PB
23212005-02-10 Paul Brook <paul@codesourcery.com>
2322
2323 * elf32-arm.c (elf32_arm_final_link_relocate): Handle R_ARM_THM_PC9.
2324
6fa3860b
PB
23252005-02-10 Paul Brook <paul@codesourcery.com>
2326
2327 * elflink.c (bfd_elf_record_link_assignment): Make hidden and internal
2328 symbols local.
2329 (elf_link_renumber_hash_table_dynsyms): Ignore local symbols.
2330 (elf_link_renumber_local_hash_table_dynsyms): New function.
2331 (_bfd_elf_link_renumber_dynsyms): Number local dynamic symbols.
2332
d457dcf6
JJ
23332005-02-10 Jakub Jelinek <jakub@redhat.com>
2334
2335 * bfd-in.h (BFD_LINKER_CREATED): Define.
2336 * bfd-in2.h: Rebuilt.
2337 * elflink.c (bfd_elf_size_dynamic_sections): Disregard
2338 BFD_LINKER_CREATED bfds when determining input bfds without
2339 .note.GNU-stack section.
2340
7f05722e
MR
23412005-02-10 Maciej W. Rozycki <macro@mips.com>
2342
2343 * elf64-mips.c (mips16_gprel_reloc): Update a comment.
2344 * elfn32-mips.c (mips16_gprel_reloc): Keep R_MIPS16_GPREL
2345 relocations against external symbols unchanged.
2346
ccf5f610
PB
23472005-02-08 Paul Brook <paul@codesourcery.com>
2348
2349 * elflink.c (elf_link_input_bfd): Ignore symbols from null input
2350 sections.
2351
370a0e1b
HPN
23522005-02-08 Hans-Peter Nilsson <hp@axis.com>
2353
2354 * elflink.c (elf_link_add_object_symbols): Don't add "warning: "
2355 prefix here.
2356
99277196
MR
23572005-02-07 Maciej W. Rozycki <macro@mips.com>
2358
2359 * elf64-mips.c: Fix formatting throughout.
2360
6422fbef
MR
23612005-02-07 Maciej W. Rozycki <macro@mips.com>
2362
2363 * elfn32-mips.c (elf_mips_howto_table_rela): Fix a comment typo.
2364
303e4c21
AO
23652005-02-07 Alexandre Oliva <aoliva@redhat.com>
2366
2367 * elf32-frv.c (FRVFDPIC_SYM_LOCAL): Remove special handling for
2368 *ABS*/*UND* sections.
2369 (elf32_frv_relocate_section): Move zero-addend-required error...
2370 (_frv_emit_got_relocs_plt_entries): ... here. Report error for
2371 missing needed TLS section.
2372
c3864421
HPN
23732005-02-07 Hans-Peter Nilsson <hp@axis.com>
2374
2375 * aoutx.h (NAME(aout,find_nearest_line)): Correct case for N_SO
2376 being the last symbol.
9f400ee9
HPN
2377 (aout_link_add_symbols): Just return TRUE if a warning
2378 symbol was last.
c3864421 2379
765f2ef6
MR
23802005-02-07 Maciej W. Rozycki <macro@mips.com>
2381
2382 * elf32-mips.c (mips_elf_gprel32_reloc): Reject
2383 R_MIPS_GPREL32 relocations against external symbols.
2384 * elf64-mips.c (mips_elf64_gprel32_reloc): Replace an incorrect
2385 comment.
2386
1b3a8575
AM
23872005-02-07 Alan Modra <amodra@bigpond.net.au>
2388
2389 * elf-bfd.h (elf_string_from_elf_strtab): Delete macro.
2390 * elf.c (bfd_elf_string_from_elf_section): Expand occurrence of
2391 elf_string_from_elf_strtab.
2392 (_bfd_elf_setup_group_pointers, bfd_section_from_shdr): Likewise.
2393 (bfd_section_from_shdr): For SHT_SYMTAB, load SHT_SYMTAB_SHNDX too
2394 if it exists. Don't do the reverse for SHT_SYMTAB_SHNDX. For
2395 SHT_STRTAB, check whether the strtab is for symtab or dynsymtab by
2396 looking at cached symtab info first, before iterating over headers.
2397 For SHT_REL and SHT_RELA, load dynsymtab if needed.
2398 * elfcode.h (elf_object_p): Don't load section header stringtab
2399 specially.
2400
90f487df
L
24012005-02-06 H.J. Lu <hongjiu.lu@intel.com>
2402
2403 * elf32-i386.c (elf_i386_relocate_section): Disallow R_386_GOTOFF
2404 against protected function when building shared library.
2405
2406 PR 584
2407 * elf64-x86-64.c (is_32bit_relative_branch): New.
2408 (elf64_x86_64_relocate_section): Alllow R_X86_64_PC32 on a
2409 protected function symbol when building shared library for
2410 32bit relative branch instruction.
2411
c4f68ce3
AM
24122005-02-06 Alan Modra <amodra@bigpond.net.au>
2413
2414 * elf64-ppc.c (add_symbol_adjust): Don't create fake descriptor
2415 syms when doing a relocatable link.
2416 (ppc64_elf_gc_mark_hook): Check that syms are defined before looking
2417 at u.def.section.
2418 (ppc64_elf_tls_setup): Likewise.
2419 (ppc64_elf_edit_opd): Don't use an undefined func desc sym.
2420
908b32fc
AM
24212005-02-04 Alan Modra <amodra@bigpond.net.au>
2422
2423 * elf64-ppc.c (struct ppc_link_hash_entry): Add "fake".
2424 (link_hash_newfunc): Clear all locals using memset.
2425 (make_fdh): Remove flags param. Always create fake func desc
2426 weak. Link the descriptor with the code entry sym.
2427 (ppc64_elf_archive_symbol_lookup): Don't return fake syms.
2428 (add_symbol_adjust): Adjust make_fdh call.
2429 (func_desc_adjust): Likewise. Twiddle any pre-existing fake
2430 descriptor to strong undefined if code entry is strong.
2431
4ea42fb7
AM
24322005-02-04 Alan Modra <amodra@bigpond.net.au>
2433
2434 * elflink.c (bfd_elf_record_link_assignment): Do "provide" symbol
2435 lookup here. Set to new before calling bfd_link_repair_undef_list.
2436 (elf_smash_syms): Check that u.undef.weak isn't the not_needed bfd.
2437
10d86c8a
AM
24382005-02-03 Alan Modra <amodra@bigpond.net.au>
2439
2440 * linker.c (_bfd_link_hash_newfunc): Set all local fields.
2441
11f25ea6
AM
24422005-02-03 Alan Modra <amodra@bigpond.net.au>
2443
2444 * linker.c (_bfd_generic_link_add_one_symbol): Set u.undef.weak.
2445 * elflink.c (elf_smash_syms): Restore symbols that were undefweak
2446 before the as-needed lib was loaded. Abort on unexpected refs.
2447
4f40114d
AM
24482005-02-02 Alan Modra <amodra@bigpond.net.au>
2449
ec13b3bb
AM
2450 * elflink.c (elf_smash_syms): Expand comments.
2451 (elf_link_add_object_symbols): Only call elf_smash_syms for
2452 as-needed dynamic objects.
2453
4f40114d
AM
2454 * elfxx-ia64.c (elfNN_ia64_new_elf_hash_entry): Don't clear
2455 everything, just the field specific to ia64.
336549c1 2456 * elf64-hppa.c (elf64_hppa_new_dyn_hash_entry): Likewise.
4f40114d 2457
bb700d78
AM
24582005-02-01 Alan Modra <amodra@bigpond.net.au>
2459
2460 * elf64-ppc.c (func_desc_adjust): Move code creating func desc sym to..
2461 (make_fdh): ..here. New function. Don't set BSF_OBJECT for
2462 undefined syms.
2463 (struct add_symbol_adjust_data): New.
2464 (add_symbol_adjust): Make an undefweak func desc for old ABI
2465 objects to link with --as-needed shared libs. Return fail status.
2466 Don't adjust old ABI func entry sym to weak if func desc syms
2467 isn't defined.
2468 (ppc64_elf_check_directives): Adjust call to add_symbol_adjust,
2469 and return status.
2470
1ffd1c2f
HPN
24712005-02-01 Hans-Peter Nilsson <hp@axis.com>
2472
2473 * cpu-cris.c (get_compatible): Rearrange disabled code and comment
2474 for clarity.
2475
77cfaee6
AM
24762005-02-01 Alan Modra <amodra@bigpond.net.au>
2477
2478 * elf64-ppc.c (ppc64_elf_check_directives): Move undefs list fixup..
2479 * linker.c (bfd_link_repair_undef_list): ..to new function, but don't
2480 remove anything but new and undefweak.
2481 * elflink.c (_bfd_elf_link_create_dynamic_sections): Override any
2482 existing _DYNAMIC.
2483 (_bfd_elf_create_dynamic_sections): Formatting.
2484 (bfd_elf_record_link_assignment): Call bfd_link_repair_undef_list.
2485 (_bfd_elf_merge_symbol): Don't handle as-needed syms here.
2486 (struct elf_smash_data): New.
2487 (elf_smash_syms): New function.
2488 (elf_link_add_object_symbols): Call elf_smash_syms. Don't add
2489 unneeded dynamic objects to loaded list.
2490 (elf_link_output_extsym): Don't handle as-needed here. Strip
2491 bfd_link_hash_new symbols.
2492 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
2493 delref when dynindx is already -1.
2494 * elf64-alpha.c (elf64_alpha_output_extsym): Strip bfd_link_hash_new
2495 symbols.
2496 * elfxx-mips.c (mips_elf_output_extsym): Likewise.
2497
b15c48d1
BE
24982005-02-01 Ben Elliston <bje@au.ibm.com>
2499
2500 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Redefine.
2501
0983f4eb 25022005-02-01 Ben Elliston <bje@au.ibm.com>
0e71e495
BE
2503
2504 * aout-arm.c, aout-target.h, aoutx.h, archive.c, armnetbsd.c,
2505 bfd-in.h, bfdio.c, coff-alpha.c, coff-arm.c, coff-h8300.c,
2506 coff-i860.c, coff-mcore.c, coff-or32.c, coff-ppc.c, coff-sh.c,
2507 coff-sparc.c, coffcode.h, coffgen.c, cofflink.c, cpu-cris.c,
2508 cpu-h8500.c, cpu-ns32k.c, ecoff.c, ecofflink.c, elf.c,
2509 elf32-dlx.c, elf32-fr30.c, elf32-frv.c, elf32-hppa.c,
2510 elf32-i860.c, elf32-ip2k.c, elf32-m32r.c, elf32-sh.c,
2511 elf32-v850.c, elf64-mips.c, elf64-sparc.c, elflink.c,
2512 i386aout.c, i386msdos.c, i386os9k.c, ieee.c, mach-o.c,
2513 nlm32-sparc.c, oasys.c, opncls.c, pdp11.c, pe-mips.c, peXXigen.c,
2514 pef.c, peicode.h, reloc.c, riscix.c, section.c, simple.c, som.c,
11d02c41 2515 sparclynx.c, targets.c, vms-misc.c, vms-tir.c, xsym.c,
0e71e495
BE
2516 hosts/delta68.h, hosts/vaxbsd.h: Remove #if 0'd code
2517 throughout. Similarly, collapse #if 1'd code.
2518
25192005-02-01 Ben Elliston <bje@au.ibm.com>
2520
0983f4eb
BE
2521 * elf-bfd.h (bfd_elf_discard_group): Remove.
2522 * elf.c (bfd_elf_discard_group): Likewise.
2523 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Remove macro.
2524
8c946ed5
RS
25252005-01-31 Richard Sandiford <rsandifo@redhat.com>
2526
2527 * elf-bfd.h (elf_backend_data): Add elf_backend_eh_frame_address_size.
2528 (_bfd_elf_eh_frame_address_size): Declare.
2529 * elfxx-target.h (elf_backend_eh_frame_address_size): Define a default.
2530 (elfNN_bed): Initialize elf_backend_eh_frame_address_size.
2531 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Declare.
2532 (elf_backend_eh_frame_address_size): Define.
2533 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): New function.
2534 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Get the address
2535 size from the new backend hook.
2536 (_bfd_elf_write_section_eh_frame): Likewise.
2537 (_bfd_elf_eh_frame_address_size): New function.
2538
c46f8c51
AC
25392005-01-31 Andrew Cagney <cagney@gnu.org>
2540
2541 * configure: Regenerate to track ../gettext.m4.
2542
5cd3778d
MM
25432005-01-31 Mark Mitchell <mark@codesourcery.com>
2544
2545 * elf32-arm.c (elf32_arm_symbian_special_sections): Do not set
2546 SHF_WRITE for .init_array, .fini_array, and .preinit_array.
ec13b3bb 2547
d6486796
NC
25482005-01-31 Nick Clifton <nickc@redhat.com>
2549
2550 * confg.bfd: Make targets scheduled for obsoletion (m68k-lynxos,
2551 sparc-lynxos, vax-vms) be obsolete.
2552
b1342370
DJ
25532005-01-28 Daniel Jacobowitz <dan@codesourcery.com>
2554
2555 * elf-bfd.h (struct elf_backend_data): Add minpagesize.
2556 * elf32-arm.c (ELF_MINPAGESIZE): Define.
2557 * elf32-ppc.c (ELF_MINPAGESIZE): Define.
2558 * elfcode.h (elf_object_p): Use minpagesize instead of
2559 maxpagesize.
2560 * elfxx-target.h (ELF_MINPAGESIZE): Default to ELF_MAXPAGESIZE.
2561 (elfNN_bed): Include ELF_MINPAGESIZE.
2562
319850b4
JB
25632005-01-28 Julian Brown <julian@codesourcery.com>
2564
2565 * bin-in.h (bfd_elf32_arm_set_target_relocs): Update prototype.
2566 * bin-in2.h (bfd_elf32_arm_set_target_relocs): Update prototype.
2567 * elf32-arm.c (elf32_arm_link_hash_table): Add fix_v4bx flag.
2568 (bfd_elf32_arm_set_target_relocs): Add formal parameter fix_v4bx for
ec13b3bb 2569 passing flag value from ld. Set flag value in global hash table entry.
319850b4 2570 (elf32_arm_final_link_relocate): Add code to implement R_ARM_V4BX
ec13b3bb 2571 relocation.
319850b4 2572
a53bf506
AC
25732005-01-27 Andrew Cagney <cagney@gnu.org>
2574
2575 * configure: Regenerate to track ../gettext.m4 change.
2576
dc4c9c19
MM
25772005-01-25 Mark Mitchell <mark@codesourcery.com>
2578
2579 * elf32-arm.c (elf_backend_default_use_rela_p): Define to zero for
ec13b3bb 2580 SymbianOS.
dc4c9c19 2581
90219bd0
AO
25822005-01-25 Alexandre Oliva <aoliva@redhat.com>
2583
2584 2004-12-10 Alexandre Oliva <aoliva@redhat.com>
2585 * elf32-frv.c (elf32_frv_relocate_section): Force local binding
2586 for TLSMOFF.
2587 * reloc.c: Add R_FRV_TLSMOFF.
2588 * elf32-frv.c (elf32_frv_howto_table): Likewise.
2589 (frv_reloc_map, frv_reloc_type_lookup): Map it.
2590 (elf32_frv_relocate_section): Handle it.
2591 (elf32_frv_check_relocs): Likewise.
2592 * libbfd.h, bfd-in2.h: Rebuilt.
2593 2004-11-26 Alexandre Oliva <aoliva@redhat.com>
2594 * elf32-frv.c (_frvfdpic_emit_got_relocs_plt_entries): Don't crash
2595 when given an undefweak TLS symbol. Fix constant TLS PLT entries
2596 such that they return the constant in gr9.
2597 (_frvfdpic_relax_tls_entries): Don't crash for undefweak TLS
2598 symbols.
2599 (_frvfdpic_size_got_plt): Set _cooked_size of dynamic sections.
2600 too, such that they shrink on relaxation.
2601 (elf32_frvfdpic_finish_dynamic_sections): Check __ROFIXUP_END__ as
2602 marking the position right past the _GLOBAL_OFFSET_TABLE_ value.
2603 (_frvfdpic_assign_plt_entries): Shrink constant TLS PLT entries
2604 if we can guarantee the use of 16-bit constants.
2605 2004-11-10 Alexandre Oliva <aoliva@redhat.com>
2606 Introduce TLS support for FR-V FDPIC.
2607 * reloc.c: Add TLS relocations.
2608 * elf32-frv.c (elf32_frv_howto_table): Add TLS relocations.
2609 (elf32_frv_rel_tlsdesc_value_howto): New.
2610 (elf32_frv_rel_tlsoff_howto): New.
2611 (frv_reloc_map): Add new mappings.
2612 (struct frvfdpic_elf_link_hash_table): Add pointer to summary
2613 reloc information.
2614 (frvfdpic_dynamic_got_plt_info): New.
2615 (frvfdpic_plt_tls_ret_offset): New.
2616 (ELF_DYNAMIC_INTERPRETER, DEFAULT_STACK_SIZE): Move earlier.
2617 (struct _frvfdpic_dynamic_got_info): Likewise. Add TLS members.
2618 (struct _frvfdpic_dynamic_got_plt_info): Likewise.
2619 (FRVFDPIC_SYM_LOCAL): Regard symbols defined in the absolute
2620 section as local.
2621 (struct frvfdpic_relocs_info): Add TLS fields.
2622 (frvfdpic_relocs_info_hash): Warning clean up.
2623 (frvfdpic_relocs_info_find): Initialize tlsplt_entry.
2624 (frvfdpic_pic_merge_early_relocs_info): Merge TLS fields.
2625 (FRVFDPIC_TLS_BIAS): Define.
2626 (tls_biased_base): New.
2627 (_frvfdpic_emit_got_relocs_plt_entries): Deal with TLS
2628 relocations.
2629 (frv_reloc_type_lookup): Likewise.
2630 (frvfdpic_info_to_howto_rel): Likewise.
2631 (elf32_frv_relocate_section): Likewise.
2632 (_frv_create_got_section): Create the PLT section here.
2633 (elf32_frvfdpic_create_dynamic_sections): Not here.
2634 (_frvfdpic_count_nontls_entries): Move out of...
2635 (_frvfdpic_count_got_plt_entries): ... here.
2636 (_frvfdpic_count_tls_entries): Likewise. Add TLS support.
2637 (_frvfdpic_count_relocs_fixups): Likewise. Add relaxation
2638 support.
2639 (_frvfdpic_relax_tls_entries): New.
2640 (_frvfdpic_compute_got_alloc_data): Add TLS support.
2641 (_frvfdpic_get_tlsdesc_entry): New.
2642 (_frvfdpic_assign_got_entries): Add TLS support.
2643 (_frvfdpic_assign_plt_entries): Likewise.
2644 (_frvfdpic_reset_got_plt_entries): New.
2645 (_frvfdpic_size_got_plt): Move out of...
2646 (elf32_frvfdpic_size_dynamic_sections): ... here.
2647 (_frvfdpic_relax_got_plt_entries): New.
2648 (elf32_frvfdpic_relax_section): New.
2649 (elf32_frvfdpic_finish_dynamic_sections): Add TLS sanity check.
2650 (elf32_frv_check_relocs): Add TLS support.
2651 (bfd_elf32_bfd_relax_section): Define for FDPIC.
2652 * libbfd.h, bfd-in2.h: Rebuilt.
2653
8615f3f2
AM
26542005-01-25 Alan Modra <amodra@bigpond.net.au>
2655
2656 * elf.c (_bfd_elf_get_dynamic_reloc_upper_bound): Only include
2657 loadable reloc sections.
2658 (_bfd_elf_canonicalize_dynamic_reloc): Likewise.
2659 (_bfd_elf_get_synthetic_symtab): Return 0 if no dynamic syms.
2660
7e9f0867
AM
26612005-01-25 Alan Modra <amodra@bigpond.net.au>
2662
2663 * elflink.c (elf_link_add_object_symbols): Don't create link dynamic
2664 sections immediately when linking shared libs. Instead, wait until
2665 we know a lib is needed.
2666 (_bfd_elf_link_create_dynstrtab): Extract from..
2667 (_bfd_elf_link_create_dynamic_sections_): ..here.
2668 (elf_add_dt_needed_tag): Call _bfd_elf_link_create_dynstrtab and
2669 _bfd_elf_link_create_dynamic_sections. Add abfd param. Allow
2670 for non-existent .dynamic.
2671 (elf_link_output_extsym): Don't complain about undefined symbols
2672 in as-needed dynamic libs that aren't actually linked.
2673
45181ed1
AC
26742005-01-24 Andrew Cagney <cagney@gnu.org>
2675
2676 * configure: Regenerate, ../gettext.m4 was updated.
2677
753e3eb6
BE
26782005-01-21 Ben Elliston <bje@au.ibm.com>
2679
2680 * aout-encap.c: Remove unused file.
2681
1c16dfa5
L
26822005-01-19 H.J. Lu <hongjiu.lu@intel.com>
2683
2684 PR 679
2685 * elflink.c (_bfd_elf_dynamic_symbol_p): Only protected
2686 non-function symbols are local.
2687 (_bfd_elf_symbol_refs_local_p): Likewise.
2688
1449d79b
AM
26892005-01-18 Alan Modra <amodra@bigpond.net.au>
2690
2691 * bfd.c (bfd_link_just_syms): Add abfd param.
2692 * bfd-in2.h: Regenerate.
2693
dcf507a6
RS
26942005-01-17 Richard Sandiford <rsandifo@redhat.com>
2695
2696 * elf-eh-frame.c (skip_cfa_op, skip_non_nops): New functions.
2697 (_bfd_elf_discard_section_eh_frame): Use them to interpret the CFA
2698 instructions. If the amount of padding is known, reduce the size
2699 of the CIE or FDE by that amount.
2700
2c42be65
RS
27012005-01-17 Richard Sandiford <rsandifo@redhat.com>
2702
2703 * elf-bfd.h (struct cie): Use bfd_vmas for code_align, ra_column and
2704 augmentation_size. Use bfd_signed_vmas for data_align.
2705 * elf-eh-frame.c (read_uleb128, read_sleb128): Delete in favor of...
2706 (read_byte, skip_leb128, read_uleb128, read_sleb128): ...these new
2707 functions. Don't read past the end of the enclosing CIE or FDE.
2708 (skip_bytes): New utility function.
2709 (_bfd_elf_discard_section_eh_frame): Use new functions, adding more
2710 sanity checking.
2711 (_bfd_elf_write_section_eh_frame): Use new functions.
2712
acfe5567
RS
27132005-01-17 Richard Sandiford <rsandifo@redhat.com>
2714
2715 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use an
2716 assert-style REQUIRE() macro to handle sanity checks.
2717
c0c28ab8
L
27182005-01-17 H.J. Lu <hongjiu.lu@intel.com>
2719
2720 * dwarf2.c (dwarf2_debug): Move info_ptr_unit to ...
2721 (comp_unit): Here.
2722 (read_unsigned_leb128): Removed.
2723 (read_signed_leb128): Removed.
2724 (find_abstract_instance_name): Updated.
2725 (parse_comp_unit): Accept info_ptr_unit.
2726 (_bfd_dwarf2_find_nearest_line): Set info_ptr_unit for each
2727 comp unit and pass it to parse_comp_unit.
2728
2729 * elf-eh-frame.c (read_unsigned_leb128): Moved to ...
2730 (read_signed_leb128): Moved to ...
2731 * libbfd.c: Here.
2732
2733 * libbfd-in.h (read_unsigned_leb128): New prototype.
2734 (read_signed_leb128): Likewise.
2735 * libbfd.h: Regenerated.
2736
e38bc3b5
NC
27372005-01-17 Andrew Stubbs <andrew.stubbs@st.com>
2738 Nick Clifton <nickc@redhat.com>
2739
2740 * cpu-sh.c (bfd_to_arch_table): Change arch_sh1_up to arch_sh_up,
2741 arch__sh4_nofp_up to arch_sh4_nofpu_up and arch_sh4a_nofp_up to
2742 arch_sh4a_nofpu_up in order to match the external names and make the
2743 testsuite's job easier.
2744 * archuires.c: Rename bfd_mach_sh2a_fake? to more meaningful
2745 names.
2746 * bfd-in2.h: Regenerate.
2747
8fb84ecc
AC
27482005-01-15 Andrew Cagney <cagney@gnu.org>
2749
2750 * bfd.m4: New file.
2751 * acinclude.m4: Move BFD_NEED_DECLARATION,
2752 BFD_HAVE_SYS_PROCFS_TYPE and BFD_HAVE_SYS_PROCFS_TYPE_MEMBER to
2753 the new file bfd.m4. Include ../bfd/bfd.m4.
2754 * configure: Re-generate.
8615f3f2 2755
b4a38de6
AM
27562005-01-12 Alan Modra <amodra@bigpond.net.au>
2757
2758 * elf32-ppc.c (ppc_elf_howto_raw): Delete RELAX32* entries.
2759 (ppc_elf_relax_section): Use PLT variants of RELAX32 relocs for
2760 reaching PLT.
2761 (ppc_elf_relocate_section): Handle R_PPC_RELAX32_PLT and
2762 R_PPC_RELAX32PC_PLT.
2763
3eb128b2
AM
27642005-01-11 Alan Modra <amodra@bigpond.net.au>
2765
2766 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Follow indirect and warning
2767 symbols.
2768 * elf32-arm.c (elf32_arm_gc_sweep_hook): Likewise.
2769 * elf32-cris.c (cris_elf_gc_sweep_hook): Likewise.
2770 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Likewise.
2771 * elf32-i386.c (elf_i386_gc_sweep_hook): Likewise.
2772 * elf32-m32r.c (m32r_elf_gc_sweep_hook): Likewise.
2773 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Likewise.
2774 * elf32-ppc.c (ppc_elf_gc_sweep_hook): Likewise.
2775 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
2776 * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
2777 * elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise.
2778 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
2779 * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Likewise.
2780 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
2781 * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
2782
264a1fe0
AM
27832005-01-11 Alan Modra <amodra@bigpond.net.au>
2784
2785 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Correct
2786 .dynsbss flags.
2787
5c4504f7
NC
27882005-01-10 Inderpreet Singh <inderpreetb@noida.hcltech.com>
2789
2790 * archures.c: Define bfd_mach_maxq10 and bfd_mach_maxq20.
2791 * bfd-in2.h: Regenerate.
2792 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags): Add code
2793 to support these new machine values.
2794 * cpu-maxq.c (bfd_maxq10_arch): New architecture definition for
2795 the maxq10.
2796 (bfd_maxq_arch): Update values for the maxq20.
2797
669460c7
EB
27982005-01-10 Eric Botcazou <ebotcazou@libertysurf.fr>
2799
2800 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): When linking a
2801 non-shared object, do not reserve space in .plt and .rela.plt for
2802 regular symbols neither defined nor referenced in shared objects.
2803
a51a7930
EB
28042005-01-09 Eric Botcazou <ebotcazou@libertysurf.fr>
2805
01aac484
EB
2806 * elf32-sparc.c (elf32_sparc_link_hash_table_create): Use bfd_zmalloc
2807 to zero the structure.
2808 (create_got_section): Use BFD_ASSERT instead of abort.
a51a7930
EB
2809 * elf64-sparc.c (struct sparc64_elf_link_hash_table): New 'sgot' and
2810 'srelgot' fields.
2811 (create_got_section): New function.
2812 (sparc64_elf_create_dynamic_sections): Likewise.
2813 (sparc64_elf_check_relocs): Invoke create_got_section instead of
2814 _bfd_elf_create_got_section. Use the sgot and srelgot shortcuts.
2815 (sparc64_elf_size_dynamic_sections): Use the srelgot shortcut.
2816 (sparc64_elf_relocate_section): Use the sgot and srelgot shortcuts.
2817 (sparc64_elf_finish_dynamic_symbol): Likewise.
2818 (sparc64_elf_finish_dynamic_sections): Use the sgot shortcut.
2819 (elf_backend_create_dynamic_sections): Define to
2820 sparc64_elf_create_dynamic_sections.
2821
151e5294
EB
28222005-01-09 Eric Botcazou <ebotcazou@libertysurf.fr>
2823
2824 * elf32-sparc.c (elf32_sparc_omit_section_dynsym): New function.
2825 (elf_backend_omit_section_dynsym): Define to it.
2826 * elf64-sparc.c (sparc64_elf_omit_section_dynsym): New function.
2827 (elf_backend_omit_section_dynsym): Define to it.
2828
6f79b219
JJ
28292005-01-07 Jakub Jelinek <jakub@redhat.com>
2830
2831 * bfd/elf.c (INCLUDE_SECTION_IN_SEGMENT): Don't put empty sections into
2832 PT_DYNAMIC segment, unless .dynamic.
2833
4e7fd91e
PB
28342005-01-06 Paul Brook <paul@codesourcery.com>
2835
2836 * config.bfd: Add entry for arm-*-vxworks and arm-*-windiss.
2837 * configure.in: Add bfd_elf32_{big,little}arm_vxworks_vec.
2838 * configure: Regenerate.
2839 * elf32-arm.c: Add VxWorks target bfd.
2840 (USE_REL): Remove.
2841 (elf32_arm_link_hash_table): Add use_rel.
2842 (elf32_arm_link_hash_table_create, elf32_arm_final_link_relocate,
2843 elf32_arm_relocate_section): Replace USE_REL with runtime check.
2844 Correct offset calculation for RELA case.
2845 (elf_backend_may_use_rel_p, elf_backend_may_use_rela_p,
2846 elf_backend_default_use_rela_p, elf_backend_rela_normal): Define.
2847 (elf32_arm_vxworks_link_hash_table_create): New function.
2848 * targets.c (bfd_elf32_bigarm_vxworks_vec): Add declaration.
2849 (bfd_elf32_littlearm_vxworks_vec): Ditto.
2850 (_bfd_target_vector): Add bfd_elf32_{big,little}arm_vxworks_vec.
2851
4c52953f
AM
28522005-01-06 Alan Modra <amodra@bigpond.net.au>
2853
2854 * elf64-ppc.c (struct ppc_link_hash_table): Add no_multi_toc and
2855 multi_toc_needed.
2856 (has_toc_reloc, makes_toc_func_call, call_check_in_progress): Define.
2857 (ppc64_elf_check_relocs): Update references to has_gp_reloc.
2858 (ppc64_elf_setup_section_lists): Add no_multi_toc parm, set htab bit.
2859 (ppc64_elf_next_toc_section): Heed no_multi_toc.
2860 (ppc64_elf_reinit_toc): Set multi_toc_needed.
2861 (toc_adjusting_stub_needed): Rewrite.
2862 (ppc64_elf_next_input_section): Use multi_toc_needed to shortcut
2863 toc tests. Adjust for toc_adjusting_stub_needed changes.
2864 (ppc64_elf_size_stubs): Update references to has_gp_reloc.
2865 * elf64-ppc.h (ppc64_elf_setup_section_lists): Update prototype.
2866 * section.c: Expand comment on backend bits.
2867 * bfd-in2.h: Regenerate.
2868 * libbfd.h: Regenerate.
2869
f03d65b4
AM
28702005-01-06 Alan Modra <amodra@bigpond.net.au>
2871
2872 * elf64-ppc.c (ppc64_elf_size_stubs): When determining need for
2873 toc adjusting stub, do not test source section flags.
2874
8af139b3
EB
28752005-01-05 Eric Botcazou <ebotcazou@libertysurf.fr>
2876
2877 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
2878 from STABS debugging sections again.
2879
06f22d7e
FF
28802005-01-05 Fred Fish <fnf@specifixinc.com>
2881
2882 * dwarf2.c (struct dwarf2_debug): Add info_ptr_unit member.
2883 (find_abstract_instance_name): New function.
2884 (scan_unit_for_functions): Handle DW_TAG_inlined_subroutine.
2885 (scan_unit_for_functions): Handle DW_AT_abstract_origin.
2886 (_bfd_dwarf2_find_nearest_line): Initialize info_ptr_unit.
2887
83a358aa
PB
28882004-12-31 Paul Brook <paul@copdesourcery.com>
2889
2890 * elf32-arm.c (elf32_arm_symbian_plt_entry): Fix comment typo.
2891
b996922c
AM
28922004-12-31 Alan Modra <amodra@bigpond.net.au>
2893
2894 * reloc.c (BFD_RELOC_AVR_LDI, BFD_RELOC_AVR_6, BFD_RELOC_AVR_6_ADIW):
2895 Commit missing changes from 2004-12-22.
2896 * bfd-in2.h: Regenerate.
2897
17a83432
TL
28982004-12-23 Tomer Levi <Tomer.Levi@nsc.com>
2899
2900 * elf32-crx.c (elf32_crx_relax_section): Support 'bcop' relaxation.
2901
d69f560c
KW
29022004-12-21 Kris Warkentin <kewarken@qnx.com>
2903
2904 * elf.c (elfcore_grok_nto_gregs): Change name to elfcore_grok_nto_regs.
2905 Add 'base' argument for constructing register sections. Reformat.
2906 (elfcore_grok_nto_note): Call elfcore_grok_nto_regs for both
2907 gp and fp regs. Reformat.
4c52953f 2908
750bce0e
NC
29092004-12-22 Klaus Rudolph <lts-rudolph@gmx.de>
2910
2911 * reloc.c: Add new relocs R_AVR_LDI, R_AVR_6, R_AVR_6_ADIW.
2912 * bfd-in2.h: Regenerate.
2913 * elf32-avr.c (elf_avr_nowto_table): Add the new relocs.
2914 (avr_reloc_map): Likewise.
2915 (avr_final_link_relocate): Likewise.
2916
a5db907e
AM
29172004-12-22 Alan Modra <amodra@bigpond.net.au>
2918
2919 * elflink.c (_bfd_elf_merge_symbol): Treat old definitions from
2920 as-needed dynamic libs as undefined.
2921 (elf_link_add_object_symbols): Remove DYN_AS_NEEDED from as-needed
2922 libs when finding they are needed.
2923
8860955f
AM
29242004-12-20 Alan Modra <amodra@bigpond.net.au>
2925
2926 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add opd_relocs.
2927 (opd_entry_value): Use opd_relocs if available.
2928 (ppc64_elf_relocate_section): Don't set reloc_done. Instead
2929 copy .opd relocations to opd_relocs.
2930 (ppc64_elf_edit_toc): Set rel_hdr.sh_size after editing relocs.
2931
1e50d24d
RS
29322004-12-16 Richard Sandiford <rsandifo@redhat.com>
2933
2934 * reloc.c (BFD_RELOC_V850_LO16_SPLIT_OFFSET): New bfd_reloc_code_type.
2935 * elf32-v850.c (v850_elf_howto_table): Add entry for
2936 R_V850_LO16_SPLIT_OFFSET.
2937 (v850_elf_reloc_map): Map it to BFD_RELOC_V850_LO16_SPLIT_OFFSET.
2938 (v850_elf_perform_lo16_relocation): New function, extracted from...
2939 (v850_elf_perform_relocation): ...here. Use it to handle
2940 R_V850_LO16_SPLIT_OFFSET.
2941 (v850_elf_check_relocs, v850_elf_final_link_relocate): Handle
2942 R_V850_LO16_SPLIT_OFFSET.
2943 * libbfd.h, bfd-in2.h: Regenerate.
2944
2fbd2a87
NC
29452004-12-14 P.J. Darcy <darcypj@us.ibm.com>
2946
2947 * config.bfd: Add s390x-ibm-tpf support.
2948
06302770
TL
29492004-12-14 Tomer Levi <Tomer.Levi@nsc.com>
2950
8860955f 2951 * elf32-crx.c (elf32_crx_relax_delete_bytes): Add 'struct bfd_link_info *'
06302770
TL
2952 to prototype, to make hash info available.
2953 Prevent wrapped symbols from being adjusted twice.
2954
c314987d
RS
29552004-12-14 Richard Sandiford <rsandifo@redhat.com>
2956
2957 * elfxx-mips.c (mips_elf_calculate_relocation): Don't report an
2958 overflow for calls to undefined weak symbols.
2959
5c799c07
AM
29602004-12-11 Alan Modra <amodra@bigpond.net.au>
2961
2962 * elfcode.h (elf_slurp_symbol_table): Use bfd_elf_sym_name so that
2963 canonical sections syms have a name.
2964
645ea6a9
AM
29652004-12-11 Alan Modra <amodra@bigpond.net.au>
2966
2967 * elf64-ppc.c (opd_entry_value): Don't use cached relocs if they
2968 have been adjusted for output.
2969 (ppc64_elf_relocate_section): Mark sections with reloc_done.
2970
0e2cfdce
AM
29712004-12-10 Alan Modra <amodra@bigpond.net.au>
2972
be8dd2ca
AM
2973 * elf.c (bfd_elf_sym_name): Rename from bfd_elf_local_sym_name and
2974 add symtab_hdr param.
0e2cfdce
AM
2975 (group_signature): Update calls.
2976 * elf-bfd.h (bfd_elf_sym_name): Update.
2977 * elf32-ppc.c (ppc_elf_relocate_section): Update.
8860955f
AM
2978 * elf64-ppc.c (ppc64_elf_edit_opd, ppc64_elf_edit_toc): Update.
2979 (ppc64_elf_relocate_section): Update.
0e2cfdce
AM
2980 * elflink.c (elf_link_input_bfd): Update.
2981
138f35cc
JJ
29822004-12-10 Jakub Jelinek <jakub@redhat.com>
2983
2984 * elf.c (bfd_elf_local_sym_name): Avoid crashes with invalid
2985 st_shndx on STT_SECTION sections.
2986
f9cfae62
DJ
29872004-12-09 Daniel Jacobowitz <dan@codesourcery.com>
2988
2989 * elfcode.h (elf_slurp_reloc_table_from_section): Don't canonicalize
2990 ELF section symbols.
2991
0d2e43ed
ILT
29922004-12-09 Ian Lance Taylor <ian@wasabisystems.com>
2993
1367d393
ILT
2994 * elfxx-mips.c (mips_elf_calculate_relocation): For R_MIPS_JALR,
2995 return a real value, unless it is a PLT symbol.
2996 (mips_elf_perform_relocation): On the RM9000, turn a jal into a
2997 bal if possible.
2998
74f79d8d
ILT
2999 * elfn32-mips.c (elf_mips_howto_table_rela): Change dst_mask of
3000 R_MIPS_JALR entry to 0.
3001
0d2e43ed
ILT
3002 * archures.c: Define bfd_mach_mips9000.
3003 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_9000.
3004 (mips_set_isa_flags): Handle bfd_mach_mips9000.
3005 * cpu-mips.c (I_mips9000): Define.
3006 (arch_info_struct): Add case for bfd_mach_mips9000.
3007 * aoutx.h (NAME(aout,machine_type)): Handle bfd_mach_mips9000.
3008 * bfd-in2.h: Regenerate.
3009
728b2f21
ILT
30102004-12-08 Ian Lance Taylor <ian@wasabisystems.com>
3011
3012 * elfxx-mips.c (mips_elf_calculate_relocation): Test for R_MIPS_26
3013 overflow.
3014
45ab555d
BE
30152004-12-07 Ben Elliston <bje@gnu.org>
3016
3017 * netbsd-core.c (netbsd_core_file_p): Make `i' unsigned.
3018
1511ddaf
DJ
30192004-12-06 Daniel Jacobowitz <dan@debian.org>
3020
3021 Suggested by Fergal Daly <fergal@esatclear.ie>:
3022 * simple.c (simple_dummy_multiple_definition): New function.
3023 (bfd_simple_get_relocated_section_contents): Use it.
3024
30252004-12-03 Jan Beulich <jbeulich@novell.com>
57426232
JB
3026
3027 * elf.c (elf_find_function): Don't use the last file symbol ever,
3028 seen, but the last one seen prior to the symbol being reported.
3029 Don't report a filename at all for global symbols when that might
3030 be ambiguous/wrong.
3031
94a3258f
PB
30322004-12-01 Paul Brook <paul@codesourcery.com>
3033
3034 * elf32-arm.c (elf32_arm_copy_private_bfd_data): Set EI_OSABI.
3035 (elf32_arm_post_process_headers): Set EI_OSABI depending on ABI
3036 version.
3037
529fcb95
PB
30382004-12-01 Paul Brook <paul@codesourcery.com>
3039
3040 * elflink.c (elf_link_add_object_symbols): Make symbols from discarded
3041 sections undefined.
3042
dea514f5
PB
30432004-11-30 Paul Brook <paul@codesourcery.com>
3044
3045 * elf32-arm.c (struct elf32_arm_link_hash_table): Remove
3046 no_pipeline_knowledge
3047 (elf32_arm_link_hash_table_create): Ditto.
3048 (bfd_elf32_arm_process_before_allocation): Ditto.
3049 (elf32_arm_final_link_relocate): Ditto. Remove oabi relocation
3050 handling.
3051 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update
3052 prototype.
3053 * bfd-in2.h: Regenerate.
3054
edfc032f
AM
30552004-11-30 Randolph Chung <tausq@debian.org>
3056
3057 * elf32-hppa.c (elf32_hppa_grok_prstatus): New function.
3058 (elf32_hppa_grok_psinfo): New function.
3059 (elf_backend_grok_prstatus): Define.
3060 (elf_backend_grok_psinfo): Define.
3061
0be9069d
L
30622004-11-24 H.J. Lu <hongjiu.lu@intel.com>
3063
3064 PR 574:
3065 * elfcode.h (elf_slurp_symbol_table): Handle STT_TLS.
3066
47cc2cf5
PB
30672004-11-24 Paul Brook <paul@codesourcery.com>
3068
3069 * elf.c (assign_section_numbers): Number SHT_GROUP sections first.
3070
0beaef2b
PB
30712004-11-24 Paul Brook <paul@codesourcery.com>
3072
3073 * elf32-arm.c (elf32_arm_swap_symbol_in): New function.
3074 (elf32_arm_swap_symbol_out): New function.
3075 (elf32_arm_size_info): Add.
3076 (elf_backend_size_info): Define.
3077
3dd2fcf0
DA
30782004-11-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
3079
3080 * hpux-core.c (hpux_core_core_file_p): Use offsetof macro in calls to
3081 make_bfd_asection.
3082
de52dba4
AM
30832004-11-19 Alan Modra <amodra@bigpond.net.au>
3084
3085 * elf32-arm.c (elf32_arm_finish_dynamic_sections): Warning fix.
3086 * elf32-iq2000.c (iq2000_reloc_type_lookup): C90 function decl.
3087 * nlmcode.h (nlm_write_object_contents): Warning fix.
3088
288f74fa
BW
30892004-11-18 Bob Wilson <bob.wilson@acm.org>
3090
3091 * elf32-xtensa.c (ebb_propose_action): Fix argument order.
3092
b7693d02
DJ
30932004-11-17 Daniel Jacobowitz <dan@codesourcery.com>
3094
3095 * elf32-arm.c (PLT_THUMB_STUB_SIZE): Define.
3096 (elf32_arm_plt_thumb_stub): New.
3097 (struct elf32_arm_link_hash_entry): Add plt_thumb_refcount
3098 and plt_got_offset.
3099 (elf32_arm_link_hash_traverse): Fix typo.
3100 (elf32_arm_link_hash_table): Add obfd.
3101 (elf32_arm_link_hash_newfunc): Initialize new fields.
3102 (elf32_arm_copy_indirect_symbol): Copy plt_thumb_refcount.
3103 (elf32_arm_link_hash_table_create): Initialize obfd.
3104 (record_arm_to_thumb_glue): Mark the glue as a local ARM function.
3105 (record_thumb_to_arm_glue): Mark the glue as a local Thumb function.
3106 (bfd_elf32_arm_get_bfd_for_interworking): Verify that the
3107 interworking BFD is not dynamic.
3108 (bfd_elf32_arm_process_before_allocation): Handle R_ARM_PLT32. Do
3109 not emit glue for PLT references.
3110 (elf32_arm_final_link_relocate): Handle Thumb functions. Do not
3111 emit glue for PLT references. Support the Thumb PLT prefix.
3112 (elf32_arm_gc_sweep_hook): Handle R_ARM_THM_PC22 and
3113 plt_thumb_refcount.
3114 (elf32_arm_check_relocs): Likewise.
3115 (elf32_arm_adjust_dynamic_symbol): Handle Thumb functions and
3116 plt_thumb_refcount.
3117 (allocate_dynrelocs): Handle Thumb PLT references.
3118 (elf32_arm_finish_dynamic_symbol): Likewise.
3119 (elf32_arm_symbol_processing): New function.
3120 (elf_backend_symbol_processing): Define.
3121
353057a5
RS
31222004-11-16 Richard Sandiford <rsandifo@redhat.com>
3123
3124 * elf-bfd.h (eh_cie_fde): Add new fields: add_augmentation_size and
3125 add_fde_encoding. Remove need_relative.
3126 * elf-eh-frame.c (extra_augmentation_string_bytes)
3127 (extra_augmentation_data_bytes, size_of_output_cie_fde): New functions.
3128 (_bfd_elf_discard_section_eh_frame): Consider changing the FDE encoding
3129 in cases where the CIE has no existing 'R' augmentation. Use
3130 size_of_output_cie_fde when assigning offsets. Use the final offset
3131 as the new section size.
3132 (_bfd_elf_eh_frame_section_offset): Remove need_relative handling.
3133 Account for any extra augmentation bytes in the returned offset.
3134 (_bfd_elf_write_section_eh_frame): Rework so that the entries are
3135 moved before being modified. Pad growing entries with DW_CFA_nops.
3136 Add 'z' and 'R' augmentations as directed by add_augmentation_size
3137 and add_fde_encoding.
3138
b32d3aa2
MM
31392004-11-15 Mark Mitchell <mark@codesourcery.com>
3140
3141 * elf32-arm.c (elf32_arm_relocate_section): Use
3142 arm_real_reloc_type.
3143
5d41f0b6
RS
31442004-11-16 Richard Sandiford <rsandifo@redhat.com>
3145
3146 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Return early
3147 for discard relocations; don't add an R_MIPS_NONE to the main body
3148 of .rel.dyn.
3149
fc0e6df6
PB
31502004-11-04 Paul Brook <paul@codesourcery.com>
3151
3152 * elf-bfd.h (_bfd_elf_slurp_version_tables): Update prototype.
3153 * elf.c (_bfd_elf_print_private_bfd_data): Pass extra argument.
3154 (_bfd_elf_slurp_version_tables): Add extra argument. Create extra
3155 default version definition for unversioned symbols.
3156 * elfcode.h (elf_slurp_symbol_table): Pass extra argument.
3157 * elflink.c (elf_link_add_object_symbols): Pass extra argument to
3158 _bfd_elf_slurp_version_tables. Set default version for unversioned
3159 imported symbols.
3160
b23e50e2
PB
31612004-11-15 Paul Brook <paul@codesourcery.com>
3162
3163 * elflink.c (elf_link_add_object_symbols): Don't assume version
3164 indices are consecutive.
3165
f4a6705c
RS
31662004-11-14 Richard Sandiford <rsandifo@redhat.com>
3167
3168 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Deal with
3169 composite relocations against the personality data.
3170
ee06dc07
PB
31712004-11-13 Paul Brook <paul@codesourcery.com>
3172
3173 * bfd/elf32-arm.c (elf32_arm_final_link_relocate): Resolve
3174 R_ARM_PREL31 relocations to PLT entries.
3175 (elf32_arm_relocate_section, elf32_arm_gc_sweep_hook): Ditto.
3176 (elf32_arm_check_relocs): Ditto.
3177
a1ace8d8
BW
31782004-11-12 Bob Wilson <bob.wilson@acm.org>
3179
3180 * xtensa-isa.c (xtensa_interface_class_id): New.
3181
e4115460
BW
31822004-11-11 Bob Wilson <bob.wilson@acm.org>
3183
3184 * elf32-xtensa.c (property_table_compare): Remove assertion about
3185 entries with the same address and non-zero size.
3186 (xtensa_read_table_entries): Report such entries as errors.
3187
6366ff1e
MM
31882004-11-11 Mark Mitchell <mark@codesourcery.com>
3189
3190 * elf32-arm.c (elf32_arm_final_link_relocate): Correct logic for
3191 R_ARM_RELATIVE on Symbian OS.
3192
b34af79c
MM
31932004-11-09 Mark Mitchell <mark@codesourcery.com>
3194
e6dc21b6
MM
3195 * som.c (som_bfd_print_private_bfd_data): New function.
3196 (som_object_setup): Save the auxiliary header. Don't assume that
3197 zero is an invalid entry point for a shared library.
3198 (som_object_p): Allocate the auxiliary header on the heap.
3199
b34af79c
MM
3200 * elf32-arm.c (elf32_arm_begin_write_processing): Do not use a K&R
3201 declaration.
3202 (elf32_arm_symbian_modify_segment_map): Likewise.
3203
08d1f311
DJ
32042004-11-09 Daniel Jacobowitz <dan@debian.org>
3205
3206 From David Poole <daveml@mbuf.com>:
3207 * elf32-arm.c (elf32_arm_readonly_dynrelocs): New function.
3208 (elf32_arm_size_dynamic_sections): Call it.
3209
0306b3bf
AM
32102004-11-09 Alan Modra <amodra@bigpond.net.au>
3211
3212 * Makefile.am (SOURCE_HFILES): Remove elf32-arm.h.
3213 (ALL_MACHINES_CFILES): Fix typo.
3214 * Makefile.in: Regenerate.
3215 * po/SRC-POTFILES.in: Regenerate.
3216
a16385dc
MM
32172004-11-08 Mark Mitchell <mark@codesourcery.com>
3218
3219 * elf32-arm.c (elf32_arm_final_link_relocate): When generating an
3220 R_ARM_RELATIVE relocation for Symbian OS, mention the section
3221 symbol in the relocation.
3222
0306b3bf
AM
32232004-11-08 Inderpreet Singh <inderpreetb@nioda.hcltech.com>
3224 Vineet Sharma <vineets@noida.hcltech.com>
7499d566
NC
3225
3226 * coff-maxq.c: New File.
0306b3bf
AM
3227 * cpu-maxq.c: New File.
3228 * coffcode.h: Likewise.
3229 * config.bfd: Likewise.
3230 * configure.in (maxqcoff_vec): New target vector.
7499d566
NC
3231 * Makefile.am: Add support for maxq target.
3232 * configure.in: Likewise.
0306b3bf
AM
3233 * archures.c:. Likewise.
3234 * targets.c: Likewise.
3235 * bfd_in2.h : Regenerated.
7499d566
NC
3236 * Makefile.in: Regenerated.
3237 * configure: Regenerated.
3238 * doc/Makefile.in: Regenerated.
3239
977cdf5a
NC
32402004-11-08 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
3241
3242 * coff-i386.c (coff_i386_reloc): Fix weak symbols.
3243 * cofflink.c (_bfd_coff_link_input_bfd): Don't process
3244 C_NT_WEAK aux entries.
3245 (_bfd_coff_generic_relocate_section): Handle undefined
3246 aliases.
3247
9dfe8738
AS
32482004-11-07 Andreas Schwab <schwab@suse.de>
3249
3250 * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Use
3251 SYMBOL_CALLS_LOCAL and check for undefweak symbols with
3252 non-default visibility.
3253
c3c76620
MM
32542004-11-01 Mark Mitchell <mark@codesourcery.com>
3255
3256 * elf32-arm.c (elf32_arm_symbian_begin_write_processing): Clear
0306b3bf 3257 D_PAGED.
c3c76620
MM
3258 (elf32_arm_symbian_modify_segment_map): Don't
3259 reset includes_filehdr and includes_phdrs here.
3260
7f266840
DJ
32612004-11-04 Daniel Jacobowitz <dan@debian.org>
3262
3263 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Replace
3264 elfarm-nabi with elf32-arm. Remove elfarm-oabi.
3265 (elf32-arm.lo): Replace elfarm-nabi.lo rule. Remove elf32-arm.h
3266 dependency.
3267 * config.bfd: Move arm-*-oabi* and thumb-*-oabi* from obsolete list
3268 to a new removed list. Remove normal configuration stanzas.
3269 * configure.in: (bfd_elf32_bigarm_vec, bfd_elf32_bigarm_symbian_vec)
3270 (bfd_elf32_littlearm_symbian_vec, bfd_elf32_littlearm_vec): Replace
3271 elfarm-nabi.lo with elf32-arm.lo.
3272 (bfd_elf32_bigarm_oabi_vec, bfd_elf32_littlearm_oabi_vec): Remove.
3273 * elf32-arm.c: Renamed from elfarm-nabi.c. Inline elf32-arm.h.
3274 * elf32-arm.h: Remove.
3275 * elfarm-oabi.c: Remove.
3276 * targets.c (_bfd_target_vector): Remove bfd_elf32_bigarm_oabi_vec
3277 and bfd_elf32_littlearm_oabi_vec.
3278 * aclocal.m4, Makefile.in, configure, doc/Makefile.in: Regenerated.
3279
bac23f82
HPN
32802004-11-04 Hans-Peter Nilsson <hp@axis.com>
3281
3282 * config.bfd: Support crisv32-*-* like cris-*-*.
3283 * archures.c (bfd_mach_cris_v0_v10, bfd_mach_cris_v32)
3284 (bfd_mach_cris_v10_v32): New macros.
3285 * cpu-cris.c: Tweak formatting.
3286 (get_compatible): New function.
3287 (N): New macro.
3288 (bfd_cris_arch_compat_v10_v32, bfd_cris_arch_v32): New
3289 bfd_arch_info_type:s.
3290 (bfd_cris_arch): Use bfd_mach_cris_v0_v10 for member mach,
3291 get_compatible for member compatible and link bfd_cris_arch_v32 as
3292 next.
3293 * elf32-cris.c (cris_elf_pcrel_reloc)
3294 (cris_elf_set_mach_from_flags): New functions.
3295 (cris_elf_howto_table) <R_CRIS_8_PCREL, R_CRIS_16_PCREL>
3296 <R_CRIS_32_PCREL>: Use cris_elf_pcrel_reloc.
3297 (cris_elf_grok_prstatus, cris_elf_grok_psinfo): Give correct
3298 numbers for bfd_mach_cris_v32.
3299 (PLT_ENTRY_SIZE_V32): New macro.
3300 (elf_cris_plt0_entry): Drop last comma in initializer.
3301 (elf_cris_plt0_entry_v32, elf_cris_plt_entry_v32)
3302 (elf_cris_pic_plt0_entry_v32, elf_cris_pic_plt_entry_v32): New
3303 PLT initializers.
3304 (cris_elf_relocate_section): Change all "%B(%A)" messages to
3305 "%B, section %A".
3306 (elf_cris_finish_dynamic_symbol): Do V32-specific PLT entries.
3307 (elf_cris_finish_dynamic_sections): Similar.
3308 (elf_cris_adjust_dynamic_symbol): Similar.
3309 (cris_elf_check_relocs): Change all "%B(%A)" messages to "%B,
3310 section %A".
3311 <switch with PIC relocs>: Emit error and return FALSE for
3312 bfd_mach_cris_v10_v32.
3313 <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
3314 Emit warning when generating textrel reloc.
3315 (cris_elf_object_p): Call cris_elf_set_mach_from_flags.
3316 (cris_elf_final_write_processing): Set flags according to mach.
3317 (cris_elf_print_private_bfd_data): Display
3318 EF_CRIS_VARIANT_COMMON_V10_V32 and EF_CRIS_VARIANT_V32.
3319 (cris_elf_merge_private_bfd_data): Drop variables old_flags,
3320 new_flags. Don't call cris_elf_final_write_processing. Don't
3321 look at the actual elf header flags at all; use
3322 bfd_get_symbol_leading_char to check ibfd, obfd. Trap difference
3323 in bfd_get_mach for ibfd and obfd and handle merging of compatible
3324 objects.
3325 (bfd_elf32_bfd_copy_private_bfd_data): Define.
3326 * reloc.c (BFD_RELOC_CRIS_SIGNED_8, BFD_RELOC_CRIS_UNSIGNED_8)
3327 (BFD_RELOC_CRIS_SIGNED_16, BFD_RELOC_CRIS_UNSIGNED_16)
3328 (BFD_RELOC_CRIS_LAPCQ_OFFSET): New relocs.
3329 * bfd-in2.h, libbfd.h: Regenerate.
3330
c5614fa4
AM
33312004-11-04 Alan Modra <amodra@bigpond.net.au>
3332
3333 * elf64-ppc.h (ppc64_elf_edit_toc): Declare.
3334 * elf64-ppc.c (struct ppc_link_hash_entry <adjust_done>): Update
3335 comment.
3336 (struct adjust_toc_info): New.
3337 (adjust_toc_syms, ppc64_elf_edit_toc): New functions.
3338
0ebdbb83
BW
33392004-11-03 Bob Wilson <bob.wilson@acm.org>
3340
3341 * elf.c (assign_file_positions_for_segments): Set next_file_pos even
3342 if there are no segments.
3343
675b2ace
DJ
33442004-11-02 Daniel Jacobowitz <dan@debian.org>
3345
3346 * config.bfd: Mark arm-*-oabi and thumb-*-oabi as obsolete.
3347
58852c27
NC
33482004-11-02 Nick Clifton <nickc@redhat.com>
3349
3350 * elf32-iq2000.c: Convert to ISO C90 formatting.
3351
e6857c0c
HPN
33522004-11-02 Hans-Peter Nilsson <hp@axis.com>
3353
20288ed6 3354 * elflink.c (_bfd_elf_create_got_section): Hide _GLOBAL_OFFSET_TABLE_.
e6857c0c 3355
bf718458
L
33562004-10-28 H.J. Lu <hongjiu.lu@intel.com>
3357
3358 * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle weak
3359 undefined symbols for R_IA64_SECREL32MSB, R_IA64_SECREL32LSB,
3360 R_IA64_SECREL64MSB and R_IA64_SECREL64LSB.
3361
044ad7e3
KK
33622004-10-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3363
3364 * elf32-sh.c (tpoff): Take alignment into account.
3365
d5cb4bb8
NC
33662004-10-28 Nick Clifton <nickc@redhat.com>
3367
3368 * elf32-iq2000.c (iq2000_elf_relocate_section): Do nothing when
0d48eab6 3369 performing a relocatable link.
d5cb4bb8
NC
3370 (iq2000_elf_object_p): Do not set elf_bad_symtab. This is only
3371 for MIPS ports under Irix.
3372
5b5bb741
PB
33732004-10-27 Richard Earnshaw <rearnsha@arm.com>
3374
3375 * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Handle
3376 R_ARM_CALL and R_ARM_JUMP24 as aliases of R_ARM_PC24.
3377 (elf32_arm_final_link_relocate): Ditto.
3378 (arm_add_to_rel, elf32_arm_relocate_section): Ditto.
3379 (elf32_arm_gc_sweep_hook, elf32_arm_check_relocs): Ditto
3380 (elf32_arm_adjust_dynamic_symbol): Ditto.
3381 * elfarm-nabi.c (elf32_arm_howto_table): Add R_ARM_CALL and
3382 R_ARM_JUMP32. Move R_ARM_R{REL32,ABS32,PC24,BASE}...
3383 (elf32_arm_r_howto): ... To here.
3384 (elf32_arm_howto_from_type): Use elf32_arm_r_howto.
3385
97ecf322
L
33862004-10-26 H.J. Lu <hongjiu.lu@intel.com>
3387
3388 PR 475
3389 * elfxx-ia64.c (elfNN_ia64_relocate_section): Correct
3390 R_IA64_SECREL32MSB, R_IA64_SECREL32LSB, R_IA64_SECREL64MSB
3391 and R_IA64_SECREL64LSB.
3392
3e3b46e5
PB
33932004-10-26 Paul Brook <paul@codesourcery.com>
3394
3395 * elflink.c (elf_finalize_dynstr): Skip shared aux structure.
3396 (bfd_elf_size_dynamic_sections): Create default version definition.
3397 (elf_link_output_extsym): Adjust for default symbol version.
3398
aa69fe43
HPN
33992004-10-24 Hans-Peter Nilsson <hp@bitrange.com>
3400
278b4623
HPN
3401 * mmo.c: Adjust to ISO C.
3402
aa69fe43
HPN
3403 * mmo.c (mmo_write_section_description): New function broken out
3404 of mmo_internal_write_section.
3405 (mmo_internal_write_section): For each of .text and .data, call
3406 mmo_write_section_description before outputting contents if it has
3407 nontrivially deducible vma or contents.
3408 (mmo_has_leading_or_trailing_zero_tetra_p): New function.
3409 (mmo_canonicalize_symtab): Adjust absolute symbols to .data
3410 symbols if found within the .data address range.
3411
ed040321
DJ
34122004-10-24 Daniel Jacobowitz <dan@debian.org>
3413
3414 * opncls.c (bfd_close): Return TRUE for BFD_IN_MEMORY.
3415
830866af
HPN
34162004-10-24 Hans-Peter Nilsson <hp@bitrange.com>
3417
3418 * mmo.c (File Layout): Correct place of misplaced blurb about
3419 special data.
3420
5f417ca3
MK
34212004-10-22 Mark Kettenis <kettenis@gnu.org>
3422
3423 * config.bfd: Add mips64*-*-openbsd.
3424
823fc61f
BW
34252004-10-21 Bob Wilson <bob.wilson@acm.org>
3426
3427 * elf32-xtensa.c (ebb_propose_action): Put declarations before
3428 statements.
3429
8697aafb
L
34302004-10-21 H.J. Lu <hongjiu.lu@intel.com>
3431
3432 * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.94.
3433 * configure: Regenerate.
3434
dfeffb9f
L
34352004-10-21 H.J. Lu <hongjiu.lu@intel.com>
3436
3437 PR 463
3438 * aoutx.h (aout_link_input_section_std): Pass proper hash entry
3439 to linker reloc_overflow callback.
3440 (aout_link_input_section_ext): Likewise.
3441 (aout_link_reloc_link_order): Likewise.
3442 * coff-a29k.c (coff_a29k_relocate_section): Likewise.
3443 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents):
3444 Likewise.
3445 (alpha_relocate_section): Likewise.
3446 * coff-arm.c (coff_arm_relocate_section): Likewise.
3447 * coff-h8300.c (h8300_reloc16_extra_cases): Likewise.
3448 * coff-h8500.c (extra_case): Likewise.
3449 * coff-i960.c (coff_i960_relocate_section): Likewise.
3450 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
3451 * coff-mips.c (mips_relocate_section): Likewise.
3452 * coff-or32.c (coff_or32_relocate_section): Likewise.
3453 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
3454 * coff-rs6000.c (xcoff_ppc_relocate_section): Likewise.
3455 * coff-sh.c (sh_relocate_section): Likewise.
3456 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
3457 * coff-w65.c (w65_reloc16_extra_cases): Likewise.
3458 * coff-z8k.c (extra_case): Likewise.
3459 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Likewise.
3460 * cofflink.c (_bfd_coff_reloc_link_order): Likewise.
3461 (_bfd_coff_generic_relocate_section): Likewise.
3462 * ecoff.c (ecoff_reloc_link_order): Likewise.
3463 * elf-hppa.h (elf_hppa_relocate_section): Likewise.
3464 * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
3465 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
3466 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
3467 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
3468 * elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise.
3469 * elf32-cris.c (cris_elf_relocate_section): Likewise.
3470 * elf32-crx.c (elf32_crx_relocate_section): Likewise.
3471 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
3472 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
3473 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
3474 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
3475 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
3476 * elf32-i370.c (i370_elf_relocate_section): Likewise.
3477 * elf32-i386.c (elf_i386_relocate_section): Likewise.
3478 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
3479 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
3480 * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
3481 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
3482 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
3483 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
3484 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
3485 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
3486 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
3487 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
3488 * elf32-s390.c (elf_s390_relocate_section): Likewise.
3489 * elf32-sh.c (sh_elf_relocate_section): Likewise.
3490 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
3491 * elf32-v850.c (v850_elf_relocate_section): Likewise.
3492 * elf32-vax.c (elf_vax_relocate_section): Likewise.
3493 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
3494 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
3495 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
3496 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
3497 * elf64-s390.c (elf_s390_relocate_section): Likewise.
3498 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
3499 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
3500 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
3501 * elflink.c (elf_reloc_link_order): Likewise.
3502 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
3503 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
3504 (_bfd_elf_mips_get_relocated_section_contents): Likewise.
3505 * linker.c (_bfd_generic_reloc_link_order): Likewise.
3506 * pdp11.c (pdp11_aout_link_input_section): Likewise.
3507 (aout_link_reloc_link_order): Likewise.
3508 * reloc.c (bfd_generic_get_relocated_section_contents):
3509 Likewise.
3510 * xcofflink.c (xcoff_reloc_link_order): Likewise.
3511 * simple.c (simple_dummy_reloc_overflow): Updated.
3512
1715e0e3
AS
35132004-10-20 Andreas Schwab <schwab@suse.de>
3514
3515 * elf32-m68k.c (elf_m68k_plt_sym_val): New function.
3516 (elf_backend_plt_sym_val): Define.
3517
db3d41a8
DS
35182004-10-19 Danny Smith <dannysmith@users.sourceforege.net>
3519
3520 * config.bfd: Set targ_underscore=yes for PE COFF targets
3521
4b85d634
AM
35222004-10-19 Alan Modra <amodra@bigpond.net.au>
3523
3524 * elf64-ppc.c (opd_entry_value): Handle --just-symbols objects.
3525 (ppc64_elf_edit_opd): Likewise.
3526
6df4d94c
MM
35272004-10-18 Mark Mitchell <mark@codesourcery.com>
3528
3529 * elfarm-nabi.c (ELF_DYNAMIC_SEC_FLAGS): Add comment.
3530 * elflink.c (_bfd_elf_create_dynamic_sections): For a loaded PLT,
3531 set SEC_ALLOC and SEC_LOAD.
3532
00d962d1
NC
35332004-10-18 Nick Clifton <nickc@redhat.com>
3534
3535 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Compute
3536 'name' for relocs against both local and global symbols.
3537
b58f81ae
DJ
35382004-10-16 Daniel Jacobowitz <dan@debian.org>
3539
3540 * bfd-in2.h: Regenerate.
3541 * bfd.c (struct bfd): Add no_export.
3542 * elflink.c (elf_link_add_object_symbols): Handle no_export.
3543
7d3f158f
AM
35442004-10-15 Alan Modra <amodra@bigpond.net.au>
3545
3546 * config.bfd: Whitespace cleanup.
3547 * Makefile.am: Run "make dep-am"
3548 * Makefile.in: Regenerate.
3549
6d2cd210
JJ
35502004-10-15 Jakub Jelinek <jakub@redhat.com>
3551
3552 * elflink.c (struct already_linked_section): Removed.
3553 (try_match_symbols_in_sections, already_linked): Removed.
3554 (_bfd_elf_section_already_linked): Skip ^\.gnu\.linkonce\.[^.]*\.
3555 prefix of section names when finding already_linked_table
3556 chain. Compare section names. Instead of calling already_linked,
3557 do it inline and only for sections in the same already_linked_list.
3558
92e4ec35
AM
35592004-10-15 Alan Modra <amodra@bigpond.net.au>
3560
3561 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Add "info"
3562 parameter. If called after _bfd_elf_write_section_eh_frame,
3563 don't allow a -2 return unless need_* bit is already set, and
3564 handle offsets adjusted for output_offset.
3565 * elf-bfd.h (_bfd_elf_eh_frame_section_offset): Update prototype.
3566 * elf.c (_bfd_elf_section_offset): Update call.
3567
7bf6dede
L
35682004-10-13 H.J. Lu <hongjiu.lu@intel.com>
3569
3570 PR 440
3571 * coffcode.h (coff_compute_section_file_positions): Cast to
3572 bfd_vma when computing page alignment.
3573
c0042f5d
MM
35742004-10-13 Mark Mitchell <mark@codesourcery.com>
3575
3576 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Use file
3577 offsets, not VMAs, for DT_VERSYM, DT_VERDEF, DT_VERNEED.
3578
2a1b9a48
MM
35792004-10-12 Mark Mitchell <mark@codesourcery.com>
3580
3581 * elf32-arm.h (elf32_arm_finish_dynamic_symbol): Make .rel.plt
3582 relocations use a virtual address, not a section offset.
3583
b08b5071
BW
35842004-10-12 Bob Wilson <bob.wilson@acm.org>
3585
3586 * elf32-xtensa.c (elf_xtensa_get_private_bfd_flags): Delete.
3587 (narrow_instruction, widen_instruction): Remove unnecessary calls to
3588 xtensa_format_encode.
3589 (ebb_propose_action): Inline call to ebb_add_proposed_action.
3590 (ebb_add_proposed_action): Delete.
3591
7fa3d080
BW
35922004-10-12 Bob Wilson <bob.wilson@acm.org>
3593
3594 * elf32-xtensa.c: Use ISO C90 formatting.
3595
3656d5e3
PB
35962004-10-12 Paul Brook <paul@codesourcery.com>
3597
3598 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Rephrase error
3599 message.
3600
8cb51566
PB
36012004-10-12 Paul Brook <paul@codesourcery.com>
3602
3603 * elf32-arm.h: Support EABI version 4 objects.
3604
1abc8597
AM
36052004-10-12 Alan Modra <amodra@bigpond.net.au>
3606
3607 PR 325
3608 * cpu-i386.c (bfd_x86_64_arch_intel_syntax): Place last in chain.
3609 Don't mark as default.
3610 (bfd_x86_64_arch): Don't mark as default.
3611
9e66c942
AM
36122004-10-12 Alan Modra <amodra@bigpond.net.au>
3613
3614 * elflink.c (enum action_discarded): New.
3615 (elf_section_complain_discarded): Delete.
3616 (elf_action_discarded): New function subsuming the above and also
3617 controlling reloc behaviour.
1abc8597 3618 (elf_link_input_bfd): Use it.
9e66c942 3619
7f1204bb
JJ
36202004-10-11 Jakub Jelinek <jakub@redhat.com>
3621
3622 * elf.c (bfd_section_from_shdr): Handle SHT_GNU_LIBLIST.
3623 (special_sections): Add .gnu.liblist and .gnu.conflict.
3624 (assign_section_numbers): Handle SHT_GNU_LIBLIST.
3625
87e5235d
AM
36262004-10-11 Alan Modra <amodra@bigpond.net.au>
3627
3628 PR 233
3629 * elflink.c (elf_link_input_bfd): Try harder to support
3630 relocations against symbols in removed linkonce sections.
3631
2ad770c3
AM
36322004-10-11 Alan Modra <amodra@bigpond.net.au>
3633
029446c4
AM
3634 * elflink.c (elf_link_input_bfd): Revert PR 354 change.
3635
2ad770c3
AM
3636 PR 354
3637 * elflink.c (elf_link_input_bfd): Check that relocs in SEC_ALLOC
3638 sections do not reference symbols in non-SEC_ALLOC sections.
3639
1da212d6
AM
36402004-10-11 Alan Modra <amodra@bigpond.net.au>
3641
3642 PR 437
3643 * elflink.c (elf_link_sort_relocs): Don't bomb on unusual sections.
3644 (_bfd_elf_link_omit_section_dynsym): Formatting.
3645
f12123c0
AM
36462004-10-10 Alan Modra <amodra@bigpond.net.au>
3647
3648 * libbfd-in.h (BFD_ASSERT, BFD_FAIL): Wrap macro body in do while.
3649 * libbfd.h: Regnerate.
3650 * elf32-cris.c: Add missing semicolon to BFD_ASSERTs.
3651 * elf32-frv.c: Likewise.
3652 * elf32-m32r.c: Likewise.
3653 * elf32-ppc.c: Likewise.
3654 * elf64-hppa.c: Likewise.
3655 * elfxx-ia64.c: Likewise.
3656 * opncls.c: Likewise.
3657
fda3ecf2
AM
36582004-10-10 Alan Modra <amodra@bigpond.net.au>
3659
3472e2e9
AM
3660 * elf-bfd.h (struct eh_frame_hdr_info): Add offsets_adjusted.
3661 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Adjust
3662 offsets stored in struct eh_cie_fde entries before doing other
3663 work.
3664
fda3ecf2
AM
3665 * elf-bfd.h (struct eh_cie_fde): Add cie_inf, remove sec.
3666 (struct eh_frame_hdr_info): Add last_cie_inf, remove last_cie_offset.
3667 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Delete code
3668 setting offsets for removed CIEs. Don't set "sec", instead set
3669 cie_inf for FDEs. Keep a pointer to last struct eh_cie_fde for a
3670 CIE in hdr_info. Only set make_relative and make_lsda_relative
3671 for CIEs. Use pointers rather than array indices.
3672 (_bfd_elf_eh_frame_section_offset): Test/set make_relative,
3673 make_lsda_relative, need_* on cie_inf for FDEs.
3674 (_bfd_elf_write_section_eh_frame): Adjust offset and new_offset for
3675 section output_offset. Delete cie_offset, instead use cie_inf
3676 pointer to CIE entry. Use need_relative and need_lsda_relative on
3677 CIE entry for FDEs. Use pointers rather than array indices.
3678
7db6994f
AM
36792004-10-09 Alan Modra <amodra@bigpond.net.au>
3680
3681 * coff-rs6000.c (rs6000coff_vec): Add initializer for
3682 bfd_is_target_special_symbol.
3683 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
3684 * som.c (som_bfd_is_target_special_symbol): Define.
3685
3c9458e9
NC
36862004-10-08 Nick Clifton <nickc@redhat.com>
3687
3688 * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.93.
3689 * configure: Regenerate.
3690 * bfd-in2.h: Regenerate.
3691 * syms.c (bfd_is_target_special_symbol): New interface function.
3692 Returns true when a symbol should be considered to be special.
7db6994f 3693 * targets.c (bfd_target): Include bfd_is_target_special_symbol in
3c9458e9
NC
3694 the symbol jump table.
3695 * elf32-arm.h (elf32_arm_is_target_special_symbol): New function.
3696 Return true iff the symbol is a mapping symbol.
3697 (bfd_elf32_bfd_is_target_special_symbol): Define.
3698 * elfxx-target.h: Provide a default definition for
3699 bfd_is_target_special_symbol.
3700 * aout-target.h: Likewise.
3701 * aout-tic30.c: Likewise.
873d03ee 3702 * binary.c: Likewise.
3c9458e9
NC
3703 * coffcode.h: Likewise.
3704 * i386msdos.c: Likewise.
3705 * ieee.c: Likewise.
873d03ee 3706 * ihex.c: Likewise.
3c9458e9
NC
3707 * libaout.h: Likewise.
3708 * libbfd-in.h: Likewise
3709 * libecoff.h: Likewise.
3710 * mach-o.c: Likewise.
3711 * mmo.c: Likewise.
3712 * nlm-target.h: Likewise.
3713 * oasys.c: Likewise.
3714 * pef.c: Likewise.
3715 * ppcboot.c: Likewise.
3716 * srec.c: Likewise.
3717 * tekhex.c: Likewise.
3718 * versados.c: Likewise.
3719 * vms.c: Likewise.
3720 * xcoff-target.h: Likewise.
3721 * xsym.c: Likewise.
3722 * libbfd.h: Regenerate.
3723
d2b2c203
DJ
37242004-10-08 Daniel Jacobowitz <dan@debian.org>
3725
3726 * config.bfd: Include 64-bit support for i[3-7]86-*-solaris2*.
3727 * elf64-x86-64.c (elf64_x86_64_section_from_shdr): New function.
3728 (elf_backend_section_from_shdr): Define.
3729
864274b0
AM
37302004-10-08 Alan Modra <amodra@bigpond.net.au>
3731
3732 * syms.c (bfd_is_local_label): Return false for file symbols.
3733
43cd72b9 37342004-10-07 Bob Wilson <bob.wilson@acm.org>
85a5ac80 3735 David Heine <dlheine@tensilica.com>
43cd72b9
BW
3736
3737 * elf32-xtensa.c (elf32xtensa_size_opt): New global variable.
3738 (xtensa_default_isa): Global variable moved here from xtensa-isa.c.
3739 (elf32xtensa_no_literal_movement): New global variable.
3740 (elf_howto_table): Add entries for new relocations.
3741 (elf_xtensa_reloc_type_lookup): Handle new relocations.
3742 (property_table_compare): When addresses are equal, compare sizes and
3743 various property flags.
3744 (property_table_matches): New.
3745 (xtensa_read_table_entries): Extend to read new property tables. Add
3746 output_addr parameter to indicate that output addresses should be used.
3747 Use bfd_get_section_limit.
3748 (elf_xtensa_find_property_entry): New.
3749 (elf_xtensa_in_literal_pool): Use elf_xtensa_find_property_entry.
3750 (elf_xtensa_check_relocs): Handle new relocations.
3751 (elf_xtensa_do_reloc): Use bfd_get_section_limit. Handle new
3752 relocations. Use new xtensa-isa.h functions.
3753 (build_encoding_error_message): Remove encode_result parameter. Add
3754 new target_address parameter used to detect alignment errors.
3755 (elf_xtensa_relocate_section): Use bfd_get_section_limit. Clean up
3756 error handling. Use new is_operand_relocation function.
3757 (elf_xtensa_combine_prop_entries, elf_xtensa_merge_private_bfd_data):
3758 Use underbar macro for error messages. Formatting.
3759 (get_const16_opcode): New.
3760 (get_l32r_opcode): Add a separate flag for initialization.
3761 (get_relocation_opnd): Operand number is no longer explicit in the
3762 relocation. Change to decode the opcode and analyze its operands.
3763 (get_relocation_slot): New.
3764 (get_relocation_opcode): Add bfd parameter. Use bfd_get_section_limit.
3765 Use new xtensa-isa.h functions to handle multislot instructions.
3766 (is_l32r_relocation): Add bfd parameter. Use is_operand_relocation.
3767 (get_asm_simplify_size, is_alt_relocation, is_operand_relocation,
3768 insn_decode_len, insn_decode_opcode, check_branch_target_aligned,
3769 check_loop_aligned, check_branch_target_aligned_address, narrowable,
3770 widenable, narrow_instruction, widen_instruction, op_single_fmt_table,
3771 get_single_format, init_op_single_format_table): New.
3772 (elf_xtensa_do_asm_simplify): Add error_message parameter and use it
3773 instead of calling _bfd_error_handler. Use new xtensa-isa.h functions.
3774 (contract_asm_expansion): Add error_message parameter and pass it to
3775 elf_xtensa_do_asm_simplify. Replace use of R_XTENSA_OP0 relocation
3776 with R_XTENSA_SLOT0_OP.
3777 (get_expanded_call_opcode): Extend to handle either L32R or CONST16
3778 instructions. Use new xtensa-isa.h functions.
3779 (r_reloc struct): Add new virtual_offset field.
3780 (r_reloc_init): Add contents and content_length parameters. Set
3781 virtual_offset field to zero. Add contents to target_offset field for
3782 partial_inplace relocations.
3783 (r_reloc_is_defined): Check for null.
3784 (print_r_reloc): New debug function.
3785 (source_reloc struct): Replace xtensa_operand field with pair of the
3786 opcode and the operand position. Add is_abs_literal field.
3787 (init_source_reloc): Specify operand by opcode/position pair. Set
3788 is_abs_literal field.
3789 (source_reloc_compare): When target_offsets are equal, compare other
3790 fields to make sorting predictable.
3791 (literal_value struct): Add is_abs_literal field.
3792 (value_map_hash_table struct): Add has_last_loc and last_loc fields.
3793 (init_literal_value): New.
3794 (is_same_value): Replace with ...
3795 (literal_value_equal): ... this function. Add comparisons of
3796 virtual_offset and is_abs_literal fields.
3797 (value_map_hash_table_init): Use bfd_zmalloc. Check for allocation
3798 failure. Initialize has_last_loc field.
3799 (value_map_hash_table_delete): New.
3800 (hash_literal_value): Rename to ...
3801 (literal_value_hash): ... this. Include is_abs_literal flag and
3802 virtual_offset field in the hash value.
3803 (get_cached_value): Rename to ...
3804 (value_map_get_cached_value): ... this. Update calls to
3805 literal_value_hash and literal_value_equal.
3806 (add_value_map): Check for allocation failure. Update calls to
3807 value_map_get_cached_value and literal_value_hash.
3808 (text_action, text_action_list, text_action_t): New types.
3809 (find_fill_action, compute_removed_action_diff, adjust_fill_action,
3810 text_action_add, text_action_add_literal, offset_with_removed_text,
3811 offset_with_removed_text_before_fill, find_insn_action,
3812 print_action_list, print_removed_literals): New.
3813 (offset_with_removed_literals): Delete.
3814 (xtensa_relax_info struct): Add is_relaxable_asm_section, action_list,
3815 fix_array, fix_array_count, allocated_relocs, relocs_count, and
3816 allocated_relocs_count fields.
3817 (init_xtensa_relax_info): Initialize new fields.
3818 (reloc_bfd_fix struct): Add new translated field.
3819 (reloc_bfd_fix_init): Add translated parameter and use it to set the
3820 translated field.
3821 (fix_compare, cache_fix_array): New.
3822 (get_bfd_fix): Remove fix_list parameter and get all relax_info for the
3823 section via get_xtensa_relax_info. Use cache_fix_array to set up
3824 sorted fix_array and use bsearch instead of linear search.
3825 (section_cache_t): New struct.
3826 (init_section_cache, section_cache_section, clear_section_cache): New.
3827 (ebb_t, ebb_target_enum, proposed_action, ebb_constraint): New types.
3828 (init_ebb_constraint, free_ebb_constraint, init_ebb, extend_ebb_bounds,
3829 extend_ebb_bounds_forward, extend_ebb_bounds_backward,
3830 insn_block_decodable_len, ebb_propose_action, ebb_add_proposed_action):
3831 New.
3832 (retrieve_contents): Use bfd_get_section_limit.
3833 (elf_xtensa_relax_section): Add relocations_analyzed flag. Update call
3834 to compute_removed_literals. Free value_map_hash_table when no longer
3835 needed.
3836 (analyze_relocations): Check is_relaxable_asm_section flag. Call
3837 compute_text_actions for all sections.
3838 (find_relaxable_sections): Mark sections as relaxable if they contain
3839 ASM_EXPAND relocations that can be optimized. Adjust r_reloc_init
3840 call. Increment relax_info src_count field only for appropriate
3841 relocation types. Remove is_literal_section check.
3842 (collect_source_relocs): Use bfd_get_section_limit. Adjust calls to
3843 r_reloc_init and find_associated_l32r_irel. Check
3844 is_relaxable_asm_section flag. Handle L32R instructions with absolute
3845 literals. Pass is_abs_literal flag to init_source_reloc.
3846 (is_resolvable_asm_expansion): Use bfd_get_section_limit. Check for
3847 CONST16 instructions. Adjust calls to r_reloc_init and
fda3ecf2 3848 pcrel_reloc_fits. Handle weak symbols conservatively.
43cd72b9
BW
3849 (find_associated_l32r_irel): Add bfd parameter and pass it to
3850 is_l32r_relocation.
3851 (compute_text_actions, compute_ebb_proposed_actions,
3852 compute_ebb_actions, check_section_ebb_pcrels_fit,
3853 check_section_ebb_reduces, text_action_add_proposed,
3854 compute_fill_extra_space): New.
3855 (remove_literals): Replace with ...
3856 (compute_removed_literals): ... this function. Call
3857 init_section_cache. Use bfd_get_section_limit. Sort internal_relocs.
3858 Call xtensa_read_table_entries to get the property table. Skip
3859 relocations other than R_XTENSA_32 and R_XTENSA_PLT. Use new
3860 is_removable_literal, remove_dead_literal, and
fda3ecf2 3861 identify_literal_placement functions.
43cd72b9
BW
3862 (get_irel_at_offset): Rewrite to use bsearch on sorted relocations
3863 instead of linear search.
3864 (is_removable_literal, remove_dead_literal,
3865 identify_literal_placement): New.
3866 (relocations_reach): Update check for literal not referenced by any
3867 PC-relative relocations. Adjust call to pcrel_reloc_fits.
3868 (coalesce_shared_literal, move_shared_literal): New.
3869 (relax_section): Use bfd_get_section_limit. Call
3870 translate_section_fixes. Update calls to r_reloc_init and
3871 offset_with_removed_text. Check new is_relaxable_asm_section flag.
3872 Add call to pin_internal_relocs. Add special handling for
3873 R_XTENSA_ASM_SIMPLIFY and R_XTENSA_DIFF* relocs. Use virtual_offset
3874 info to calculate new addend_displacement variable. Replace code for
3875 deleting literals with more general code to perform the actions
3876 determined by the action_list for the section.
3877 (translate_section_fixes, translate_reloc_bfd_fix): New.
3878 (translate_reloc): Check new is_relaxable_asm_section flag. Call
3879 find_removed_literal only if is_operand_relocation. Update call to
3880 offset_with_removed_text. Use new target_offset and removed_bytes
3881 variables.
3882 (move_literal): New.
3883 (relax_property_section): Use bfd_get_section_limit. Set new
3884 is_full_prop_section flag and handle new property tables. Update calls
3885 to r_reloc_init and offset_with_removed_text. Check
3886 is_relaxable_asm_section flag. Handle expansion of zero-sized
3887 unreachable entries, with use of offset_with_removed_text_before_fill.
3888 For relocatable links, combine entries only for literal tables.
3889 (relax_section_symbols): Check is_relaxable_asm_section flag. Update
3890 calls to offset_with_removed_text. Translate st_size field for
3891 function symbols.
3892 (do_fix_for_relocatable_link): Change to return bfd_boolean to indicate
3893 failure. Add contents parameter. Update call to get_bfd_fix. Update
3894 call to r_reloc_init. Call _bfd_error_handler and return FALSE for
3895 R_XTENSA_ASM_EXPAND relocs.
3896 (do_fix_for_final_link): Add input_bfd and contents parameters. Update
3897 call to get_bfd_fix. Include offset from contents for partial_inplace
3898 relocations.
3899 (is_reloc_sym_weak): New.
3900 (pcrel_reloc_fits): Use new xtensa-isa.h functions.
3901 (prop_sec_len): New.
3902 (xtensa_is_property_section): Handle new property sections.
3903 (is_literal_section): Delete.
3904 (internal_reloc_compare): When r_offset matches, compare r_info and
3905 r_addend to make sorting predictable.
3906 (internal_reloc_matches): New.
3907 (xtensa_get_property_section_name): Handle new property sections.
3908 (xtensa_get_property_predef_flags): New.
3909 (xtensa_callback_required_dependence): Use bfd_get_section_limit.
3910 Update calls to xtensa_isa_init, is_l32r_relocation, and r_reloc_init.
3911 * xtensa-isa.c (xtensa_default_isa): Moved to elf32-xtensa.c.
3912 (xtisa_errno, xtisa_error_msg): New variables.
3913 (xtensa_isa_errno, xtensa_isa_error_msg): New.
3914 (xtensa_insnbuf_alloc): Add error handling.
3915 (xtensa_insnbuf_to_chars): Add num_chars parameter. Update to
3916 use xtensa_format_decode. Add error handling.
3917 (xtensa_insnbuf_from_chars): Add num_chars parameter. Decode the
3918 instruction length to find the number of bytes to copy.
3919 (xtensa_isa_init): Add error handling. Replace calls to
3920 xtensa_load_isa and xtensa_extend_isa with code to initialize lookup
3921 tables in the xtensa_modules structure.
3922 (xtensa_check_isa_config, xtensa_add_isa, xtensa_load_isa,
3923 xtensa_extend_isa): Delete.
3924 (xtensa_isa_free): Change to only free lookup tables.
3925 (opname_lookup_compare): Replace with ...
3926 (xtensa_isa_name_compare): ... this function. Use strcasecmp.
3927 (xtensa_insn_maxlength): Rename to ...
3928 (xtensa_isa_maxlength): ... this.
3929 (xtensa_insn_length): Delete.
3930 (xtensa_insn_length_from_first_byte): Replace with ...
3931 (xtensa_isa_length_from_chars): ... this function.
3932 (xtensa_num_opcodes): Rename to ...
3933 (xtensa_isa_num_opcodes): ... this.
3934 (xtensa_isa_num_pipe_stages, xtensa_isa_num_formats,
3935 xtensa_isa_num_regfiles, xtensa_isa_num_stages,
3936 xtensa_isa_num_sysregs, xtensa_isa_num_interfaces,
3937 xtensa_isa_num_funcUnits, xtensa_format_name, xtensa_format_lookup,
3938 xtensa_format_decode, xtensa_format_encode, xtensa_format_length,
3939 xtensa_format_num_slots, xtensa_format_slot_nop_opcode,
3940 xtensa_format_get_slot, xtensa_format_set_slot): New functions.
3941 (xtensa_opcode_lookup): Add error handling.
3942 (xtensa_decode_insn): Replace with ...
3943 (xtensa_opcode_decode): ... this function, with new format and
3944 slot parameters. Add error handling.
3945 (xtensa_encode_insn): Replace with ...
3946 (xtensa_opcode_encode): ... this function, which does the encoding via
3947 one of the entries in the "encode_fns" array. Add error handling.
3948 (xtensa_opcode_name): Add error handling.
3949 (xtensa_opcode_is_branch, xtensa_opcode_is_jump, xtensa_opcode_is_loop,
3950 xtensa_opcode_is_call): New.
3951 (xtensa_num_operands): Replace with ...
3952 (xtensa_opcode_num_operands): ... this function. Add error handling.
3953 (xtensa_opcode_num_stateOperands,
3954 xtensa_opcode_num_interfaceOperands, xtensa_opcode_num_funcUnit_uses,
3955 xtensa_opcode_funcUnit_use, xtensa_operand_name,
3956 xtensa_operand_is_visible): New.
3957 (xtensa_get_operand, xtensa_operand_kind): Delete.
3958 (xtensa_operand_inout): Add error handling and special-case for
3959 "sout" operands.
3960 (xtensa_operand_get_field, xtensa_operand_set_field): Rewritten to
3961 operate on one slot of an instruction. Added error handling.
3962 (xtensa_operand_encode): Handle default operands with no encoding
3963 functions. Check for success by comparing against decoded value.
3964 Add error handling.
3965 (xtensa_operand_decode): Handle default operands. Return decoded value
3966 through argument pointer. Add error handling.
3967 (xtensa_operand_is_register, xtensa_operand_regfile,
3968 xtensa_operand_num_regs, xtensa_operand_is_known_reg): New.
3969 (xtensa_operand_isPCRelative): Rename to ...
3970 (xtensa_operand_is_PCrelative): ... this. Add error handling.
3971 (xtensa_operand_do_reloc, xtensa_operand_undo_reloc): Return value
3972 through argument pointer. Add error handling.
3973 (xtensa_stateOperand_state, xtensa_stateOperand_inout,
3974 xtensa_interfaceOperand_interface, xtensa_regfile_lookup,
3975 xtensa_regfile_lookup_shortname, xtensa_regfile_name,
3976 xtensa_regfile_shortname, xtensa_regfile_view_parent,
3977 xtensa_regfile_num_bits, xtensa_regfile_num_entries,
3978 xtensa_state_lookup, xtensa_state_name, xtensa_state_num_bits,
3979 xtensa_state_is_exported, xtensa_sysreg_lookup,
3980 xtensa_sysreg_lookup_name, xtensa_sysreg_name, xtensa_sysreg_number,
3981 xtensa_sysreg_is_user, xtensa_interface_lookup, xtensa_interface_name,
3982 xtensa_interface_num_bits, xtensa_interface_inout,
3983 xtensa_interface_has_side_effect, xtensa_funcUnit_lookup,
3984 xtensa_funcUnit_name, xtensa_funcUnit_num_copies): New.
3985 * xtensa-modules.c: Rewrite to use new data structures.
3986 * reloc.c (BFD_RELOC_XTENSA_DIFF8, BFD_RELOC_XTENSA_DIFF16,
3987 BFD_RELOC_XTENSA_DIFF32, BFD_RELOC_XTENSA_SLOT0_OP,
3988 BFD_RELOC_XTENSA_SLOT1_OP, BFD_RELOC_XTENSA_SLOT2_OP,
3989 BFD_RELOC_XTENSA_SLOT3_OP, BFD_RELOC_XTENSA_SLOT4_OP,
3990 BFD_RELOC_XTENSA_SLOT5_OP, BFD_RELOC_XTENSA_SLOT6_OP,
3991 BFD_RELOC_XTENSA_SLOT7_OP, BFD_RELOC_XTENSA_SLOT8_OP,
3992 BFD_RELOC_XTENSA_SLOT9_OP, BFD_RELOC_XTENSA_SLOT10_OP,
3993 BFD_RELOC_XTENSA_SLOT11_OP, BFD_RELOC_XTENSA_SLOT12_OP,
3994 BFD_RELOC_XTENSA_SLOT13_OP, BFD_RELOC_XTENSA_SLOT14_OP,
3995 BFD_RELOC_XTENSA_SLOT0_ALT, BFD_RELOC_XTENSA_SLOT1_ALT,
3996 BFD_RELOC_XTENSA_SLOT2_ALT, BFD_RELOC_XTENSA_SLOT3_ALT,
3997 BFD_RELOC_XTENSA_SLOT4_ALT, BFD_RELOC_XTENSA_SLOT5_ALT,
3998 BFD_RELOC_XTENSA_SLOT6_ALT, BFD_RELOC_XTENSA_SLOT7_ALT,
3999 BFD_RELOC_XTENSA_SLOT8_ALT, BFD_RELOC_XTENSA_SLOT9_ALT,
4000 BFD_RELOC_XTENSA_SLOT10_ALT, BFD_RELOC_XTENSA_SLOT11_ALT,
4001 BFD_RELOC_XTENSA_SLOT12_ALT, BFD_RELOC_XTENSA_SLOT13_ALT,
4002 BFD_RELOC_XTENSA_SLOT14_ALT): Add new relocations.
4003 * Makefile.am (xtensa-isa.lo, xtensa-modules.lo): Update dependencies.
4004 * Makefile.in: Regenerate.
4005 * bfd-in2.h: Likewise.
4006 * libbfd.h: Likewise.
4007
99022dfb
RS
40082004-10-07 Richard Sandiford <rsandifo@redhat.com>
4009
4010 * elf64-mips.c (mips_elf64_write_rel): Use STN_UNDEF for relocs
4011 against the absolute section.
4012 (mips_elf64_write_rela): Likewise.
4013
b67ae299
NC
40142004-10-07 Jan Beulich <jbeulich@novell.com>
4015
4016 * elf.c (elf_find_function): Don't generally check for matching
4017 section, just for non-file symbols. Remove redunant comparison
4018 for the latter.
4019 * elf32-arm.h (arm_elf_find_function): Likewise.
4020
8fdd7217
NC
40212004-10-07 Jeff Baker <jbaker@qnx.com>
4022
4023 * elflink.c (_bfd_elf_add_dynamic_entry): Add code to warn if
4024 adding a DT_TEXTREL to a shared object and --warn-shared-textrel
4025 was specified.
4026
073a2dc3
RM
40272004-10-04 Roland McGrath <roland@redhat.com>
4028
4029 * hash.c (bfd_hash_set_default_size): Use const for table.
4030 Use size_t instead of int for variable compared to sizeof results.
4031
7785be14
AM
40322004-10-05 Alan Modra <amodra@bigpond.net.au>
4033
4034 PR 425
4035 * syms.c (_bfd_stab_section_find_nearest_line): Ignore R_*_NONE relocs.
4036
40a18ebd
NC
40372004-10-01 Paul Brook <paul@codesourcery.com>
4038
4039 * elf32-arm.h (elf32_arm_fake_sections,
4040 is_arm_elf_unwind_section_name, elf32_arm_section_from_shdr): New
4041 functions.
4042 (elf_backend_fake_sections, elf_backend_section_from_shdr): Define.
4043
8935b81f
AM
40442004-10-01 Alan Modra <amodra@bigpond.net.au>
4045
4046 * elf-bfd.h (struct eh_cie_fde): Add need_relative and
4047 need_lsda_relative.
4048 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Set
4049 need_relative or need_lsda_relative if we are processing an
4050 offset for a reloc on a FDE initial loc or LSDA field
4051 respectively.
4052 (_bfd_elf_write_section_eh_frame): Test need_relative and
4053 need_lsda_relative in place of corresponding make_* field
4054 when deciding to use pc-relative encodings.
4055
eeac373a
PB
40562004-09-30 Paul Brook <paul@codesourcery.com>
4057
4058 * elf32-arm.h (bfd_elf32_arm_set_target_relocs): Handle "abs"
4059 target2 relocation type.
4060
7479dfd4
L
40612004-09-30 H.J. Lu <hongjiu.lu@intel.com>
4062
4063 PR 414
4064 * elflink.c (_bfd_elf_merge_symbol): Check TLS symbol.
4065
0dd132b6
NC
40662004-09-30 Paul Brook <paul@codesourcery.com>
4067
4068 * reloc.c: Add BFD_RELOC_ARM_SMI.
4069 * bfd-in2.h: Regenerate.
4070 * libbfd.h: Ditto.
4071
1ba54ee0
AM
40722004-09-24 Alan Modra <amodra@bigpond.net.au>
4073
4074 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Add output section
4075 vma and output offset to address.
4076 * simple.c (simple_save_output_info): Only set output section
4077 and offset for debug sections, or those not already set up by
4078 the linker.
4079 (bfd_simple_get_relocated_section_contents): Update comment.
4080
5efb6261
AM
40812004-09-24 Alan Modra <amodra@bigpond.net.au>
4082
4083 * elf.c (IS_LOADED): Delete.
4084 (assign_file_positions_for_segments): Just test SEC_LOAD instead.
4085 Restore SEC_HAS_CONTENTS test to the one place it was used prior
4086 to 2004-09-22.
4087
fca870e4
AM
40882004-09-23 Alan Modra <amodra@bigpond.net.au>
4089
4090 PR gas/396
4091 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
4092 bfd_mach_sparc_sparclet and bfd_mach_sparc_sparclite. Remove
4093 redundant assignment of EM_SPARC.
4094
c86696a3
BF
40952004-09-22 Brian Ford <ford@vss.fsi.com>
4096
4097 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
4098 alignment for .rdata sections so sse[2] code works with gcc >= 3.3.3
4099 constants.
4100 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
4101
73adb214
AM
41022004-09-22 Alan Modra <amodra@bigpond.net.au>
4103
4104 * elf32-ppc.c (ppc_elf_modify_segment_map): Delete.
4105 (elf_backend_modify_segment_map): Don't define.
4106
b301b248
AM
41072004-09-22 Alan Modra <amodra@bigpond.net.au>
4108
4109 * elf.c (IS_LOADED): Define.
4110 (assign_file_positions_for_segments): Don't round up file offset of
4111 PT_LOAD segments containing no SEC_LOAD sections, instead round down.
4112 Delete code handling link script adjustment of lma. Do the adjust
4113 in later code handling similar ajustments. Remove dead code error
4114 check. Warn if section lma would require a negative offset
4115 adjustment. Tweak lma adjustment to use p_filesz rather than p_memsz.
4116 Use p_vaddr + p_memsz inside section loop in place of voff. Don't
4117 update voff in section loop. Change voff in segment loop to be an
4118 adjustment on top of "off". Set sec->filepos and update "off" later.
4119 Test for loadable sections consistently using IS_LOADED. Similarly,
073a2dc3 4120 test for alloc-only sections other than .tbss consistently.
b301b248
AM
4121 Don't bother checking SEC_ALLOC in PT_LOAD segments. Remove FIXME.
4122 Tidy PT_NOTE handling. Use %B and %A in error messages.
4123 (assign_file_positions_except_relocs): Use %B in error message.
4124
3f85e526
L
41252004-09-17 H.J. Lu <hongjiu.lu@intel.com>
4126
4127 * Makefile.am (AUTOMAKE_OPTIONS): Require 1.9.
4128 (CONFIG_STATUS_DEPENDENCIES): New.
4129 (Makefile): Removed.
4130 (config.status): Likewise.
4131 * Makefile.in: Regenerated.
4132
eb043451
PB
41332004-09-17 Paul Brook <paul@codesourcery.com>
4134
4135 * bfd-in.h (bfd_elf32_arm_set_target_relocs): Add prototype.
4136 (bfd_elf32_arm_process_before_allocation): Update prototype.
4137 * bfd-in2.h: Regenerate.
4138 * bfd/elf32-arm.h (elf32_arm_link_hash_table): Add target2_reloc.
4139 (elf32_arm_link_hash_table_create): Set it.
4140 (bfd_elf32_arm_process_before_allocation): Remove target1_is_rel.
4141 (bfd_elf32_arm_set_target_relocs): New function.
4142 (arm_real_reloc_type): New function.
4143 (elf32_arm_final_link_relocate): Use it. Handle R_ARM_PREL31 and
4144 R_ARM_GOT_PREL. Remove R_ARM_TARGET1.
4145 (elf32_arm_gc_sweep_hook): Ditto.
4146 (elf32_arm_check_relocs): Ditto.
4147 (elf32_arm_relocate_section): Handle R_ARM_GOT_PREL.
4148 * elfarm-nabi.c (elf32_arm_howto_table): Add R_ARM_PREL31 and
4149 R_ARM_GOT_TARGET2.
4150 (elf32_arm_got_prel): New variable.
4151 (elf32_arm_howto_from_type): New function.
4152 (elf32_arm_info_to_howto): Use it.
4153 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_PREL31 and
4154 BFD_RELOC_ARM_TARGET2.
4155 * libbfd.h: Regenerate.
4156 * reloc.c: Add BFD_RELOC_ARM_TARGET2 and BFD_RELOC_ARM_PREL31.
4157
f6e332e6
AM
41582004-09-17 Alan Modra <amodra@bigpond.net.au>
4159
4160 * ecoff.c: Update u.undef.next refs.
4161 * elf64-ppc.c: Likewise.
4162 * elflink.c: Likewise.
4163 * linker.c: Likewise.
4164 * xcofflink.c: Likewise.
4165
4166 * elf-bfd.h (struct elf_link_hash_entry): Rearrange. Add FIXME to
4167 dynamic_def. Combine weakdef and elf_hash_value. Move vtable
4168 fields to indirect struct.
4169 * elf-m10300.c: Update u.weakdef refs.
4170 * elf32-arm.h: Likewise.
4171 * elf32-cris.c: Likewise.
4172 * elf32-frv.c: Likewise.
4173 * elf32-hppa.c: Likewise.
4174 * elf32-i370.c: Likewise.
4175 * elf32-i386.c: Likewise.
4176 * elf32-m32r.c: Likewise.
4177 * elf32-m68k.c: Likewise.
4178 * elf32-ppc.c: Likewise.
4179 * elf32-s390.c: Likewise.
4180 * elf32-sh.c: Likewise.
4181 * elf32-sparc.c: Likewise.
4182 * elf32-vax.c: Likewise.
4183 * elf32-xtensa.c: Likewise.
4184 * elf64-alpha.c: Likewise.
4185 * elf64-hppa.c: Likewise.
4186 * elf64-ppc.c: Likewise.
4187 * elf64-s390.c: Likewise.
4188 * elf64-sh64.c: Likewise.
4189 * elf64-sparc.c: Likewise.
4190 * elf64-x86-64.c: Likewise.
4191 * elfxx-ia64.c: Likewise.
4192 * elfxx-mips.c: Likewise.
4193 * elflink.c: Likewise. Also u.elf_hash_value.
4194 (elf_gc_propagate_vtable_entries_used): Update for h->vtable
4195 indirection.
4196 (elf_gc_smash_unused_vtentry_relocs): Likewise.
4197 (bfd_elf_gc_record_vtinherit): Alloc vtable.
4198 (bfd_elf_gc_record_vtentry): Likewise.
4199 * elf.c (_bfd_elf_link_hash_newfunc): Use memset.
4200
90c0a373
AM
42012004-09-17 Alan Modra <amodra@bigpond.net.au>
4202
4203 * Makefile.am: Run "make dep-am".
4204 * Makefile.in: Regenerate.
4205 * bfd-in2.h: Regenerate.
4206 * po/SRC-POTFILES.in: Regenerate.
4207 * po/bfd.pot: Regenerate.
4208
f5385ebf
AM
42092004-09-16 Alan Modra <amodra@bigpond.net.au>
4210
4211 * elf-bfd.h (struct elf_link_hash_entry): Replace elf_link_hash_flags
4212 with bitfields. Make "type" and "other" bitfields too.
4213 (ELF_LINK_HASH_REF_REGULAR, ELF_LINK_HASH_DEF_REGULAR,
4214 ELF_LINK_HASH_REF_DYNAMIC, ELF_LINK_HASH_DEF_DYNAMIC,
4215 ELF_LINK_HASH_REF_REGULAR_NONWEAK, ELF_LINK_HASH_DYNAMIC_ADJUSTED,
4216 ELF_LINK_HASH_NEEDS_COPY, ELF_LINK_HASH_NEEDS_PLT, ELF_LINK_NON_ELF,
4217 ELF_LINK_HIDDEN, ELF_LINK_FORCED_LOCAL, ELF_LINK_HASH_MARK,
4218 ELF_LINK_NON_GOT_REF, ELF_LINK_DYNAMIC_DEF, ELF_LINK_DYNAMIC_WEAK,
4219 ELF_LINK_POINTER_EQUALITY_NEEDED): Delete.
4220 (ELF_COMMON_DEF_P, WILL_CALL_FINISH_DYNAMIC_SYMBOL): Update.
4221 * elf-hppa.h: Update all uses of elf_link_hash_flags.
4222 * elf-m10300.c: Likewise.
4223 * elf.c: Likewise.
4224 * elf32-arm.h: Likewise.
4225 * elf32-cris.c: Likewise.
4226 * elf32-frv.c: Likewise.
4227 * elf32-hppa.c: Likewise.
4228 * elf32-i370.c: Likewise.
4229 * elf32-i386.c: Likewise.
4230 * elf32-m32r.c: Likewise.
4231 * elf32-m68k.c: Likewise.
4232 * elf32-ppc.c: Likewise.
4233 * elf32-s390.c: Likewise.
4234 * elf32-sh-symbian.c: Likewise.
4235 * elf32-sh.c: Likewise.
4236 * elf32-sh64.c: Likewise.
4237 * elf32-sparc.c: Likewise.
4238 * elf32-vax.c: Likewise.
4239 * elf32-xtensa.c: Likewise.
4240 * elf64-alpha.c: Likewise.
4241 * elf64-hppa.c: Likewise.
4242 * elf64-ppc.c: Likewise.
4243 * elf64-s390.c: Likewise.
4244 * elf64-sh64.c: Likewise.
4245 * elf64-sparc.c: Likewise.
4246 * elf64-x86-64.c: Likewise.
4247 * elflink.c: Likewise.
4248 * elfxx-ia64.c: Likewise.
4249 * elfxx-mips.c: Likewise.
4250 * configure.in (AM_INIT_AUTOMAKE): Set version to 2.15.92.
4251 * configure: Regenerate.
4252 * aclocal.m4: Regenerate.
4253
b6ee372a
AM
42542004-09-16 Alan Modra <amodra@bigpond.net.au>
4255
4256 * elf32-arm.h (elf32_arm_gc_sweep_hook): Add #ifndef OLD_ARM_ABI
4257 around uses of R_ARM_TARGET1.
4258 (elf32_arm_check_relocs): Likewise.
4259
9c504268
PB
42602004-09-13 Paul Brook <paul@codesourcery.com>
4261
4262 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update
4263 prototype.
4264 * bfd-in2.h: Regenerate.
4265 * libbfd.h: Regenerate.
4266 * elf32-arm.h (elf32_arm_link_hash_table): Add target1_is_rel.
4267 (elf32_arm_link_hash_table_create): Set target1_is_rel.
4268 (bfd_elf32_arm_process_before_allocation): Ditto.
4269 (elf32_arm_final_link_relocate): Handle R_ARM_TARGET1.
4270 (elf32_arm_gc_sweep_hook, elf32_arm_check_relocs): Ditto.
4271 * elfarm-nabi.c (elf32_arm_howto_table): Rename RELABS to TARGET1.
4272 * reloc.c: Ditto.
4273
94ea025a
JB
42742004-09-10 Joel Brobecker <brobecker@gnat.com>
4275
4276 * hpux-core.c (thread_section_p): New function.
4277 (hpux_core_core_file_p): Fix computation of offset in call
4278 to bfd_seek. Create a ".reg" section from an arbitrary
4279 ".reg/<id>" section if none was created after having read
4280 all sections.
4281
24443139
AS
42822004-09-11 Andreas Schwab <schwab@suse.de>
4283
4284 * acinclude.m4: Fix spelling of ACX_NONCANONICAL_*.
4285 * aclocal.m4: Rebuild.
4286 * configure: Rebuild.
4287
f4eae89c
JB
42882004-09-10 Joel Brobecker <brobecker@gnat.com>
4289
4290 * section.c (bfd_sections_find_if): Fix parameter name in
4291 comment to match code.
4292
e0638f70
AM
42932004-09-10 Alan Modra <amodra@bigpond.net.au>
4294
4295 * elf.c (assign_file_positions_except_relocs): Assign relocs
4296 stored in a bfd section.
4297
5e0f5ae3
HPN
42982004-09-08 Hans-Peter Nilsson <hp@axis.com>
4299
4300 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Reset
4301 h->gotplt_refcount to 0, not -1.
4302
ada1953e
HPN
43032004-09-07 Hans-Peter Nilsson <hp@axis.com>
4304
4305 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOTPLT,
4306 case R_CRIS_32_GOTPLT>: For internal error message, handle NULL
4307 symname.
4308 (cris_elf_check_relocs) <case R_CRIS_32_PLT_PCREL>: Don't try to
4309 handle symbol visibility here.
4310
ee75fd95
AM
43112004-09-07 Alan Modra <amodra@bigpond.net.au>
4312
4313 * elf64-ppc.c (struct ppc_link_hash_table): Add stub_globals.
4314 (is_ppc64_elf_target): Rename from is_ppc64_target. Update all
4315 callers.
4316 (ppc_stub_name): Remove trailing "+0" on stub name.
4317 (create_linkage_sections): Create relocations for
4318 branch lookup table when --emit-relocs as well as when --shared.
4319 (ppc_build_one_stub): Emit relocs for long branch stubs. Adjust
4320 relbrlt test. For --emit-stub-syms, always output a sym even when
4321 one already exists on a plt call stub. Put stub type in the stub
4322 symbol name.
4323 (ppc_size_one_stub): Size long branch stub relocs. Adjust relbrlt
4324 test.
4325 (ppc64_elf_size_stubs): Count global sym stubs added. Zero
4326 reloc_count in stub sections. Adjust relbrlt test.
4327 (ppc64_elf_build_stubs): Adjust relbrlt test. Tweak stats output.
4328 * elflink.c (bfd_elf_size_dynamic_sections): Fix comment typo.
4329 (elf_link_input_bfd): Ignore symbol index zero relocs when checking
4330 for relocs against discarded symbols. Fix comments.
4331
229fcec5
MM
43322004-09-06 Mark Mitchell <mark@codesourcery.com>
4333
4334 * elf-bfd.h (_bfd_elf_make_dynamic_segment): Declare it.
4335 * elf.c (_bfd_elf_make_dynamic_segment): New function, split out
4336 from ...
4337 (map_sections_to_segments): ... here. Use it. Assign a file
4338 position to the .dynamic section if it is not loadable, but part
4339 of the PT_DYNAMIC segment.
4340 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Use file
4341 offsets, not VMAs, for the BPABI. Do not fill in the header in
4342 the .got.plt section for the BPABI.
4343 * elfarm-nabi.c (elf32_arm_symbian_modify_segment_map): Add a
4344 PT_DYNAMIC segment.
4345 (elf_backend_want_got_plt): Define to zero for Symbian OS.
073a2dc3 4346
9a0789ec
NC
43472004-09-06 Nick Clifton <nickc@redhat.com>
4348
4349 * elflink.c (elf_link_add_object_symbols): Set the error code to
4350 bfd_error_wrong_format when the input format does not match the
4351 output format.
4352
7b53ace3
AM
43532004-09-06 Alan Modra <amodra@bigpond.net.au>
4354
4355 * elf64-ppc.c (is_ppc64_target): New function, extracted from..
4356 (ppc64_elf_check_directives): ..here.
4357 (ppc64_elf_size_dynamic_sections): Use it here to check bfd type
4358 before accessing ppc64_elf_tdata.
4359 (ppc64_elf_finish_dynamic_sections): And here too.
4360
3e540f25
AM
43612004-09-04 Alan Modra <amodra@bigpond.net.au>
4362
4363 * bfd.c (_bfd_default_error_handler): Correct loop exit.
4364
e5a52504
MM
43652004-09-03 Mark Mitchell <mark@codesourcery.com>
4366
4367 * config.bfd (arm*-*-symbianelf*): Use OS-specific target vectors.
4368 * configure.in (bfd_elf32_bigarm_symbian_vec): Add it.
4369 (bfd_elf32_littlearm_symbian_vec): Likewise.
4370 * configure: Regenerated.
4371 * elf-bfd.h (elf_backend_data): Add dynamic_sec_flags.
4372 * elf32-arm.h (PLT_HEADER_SIZE): Do not define.
4373 (PLT_ENTRY_SIZE): Likewise.
4374 (bfd_vma_elf32_arm_symbian_plt_entry): New
4375 variable.
4376 (elf32_arm_link_hash_table): Add plt_header_size, plt_entry_size,
4377 and symbian_p.
4378 (create_got_section): Don't create sections when generating BPABI
4379 objects.
4380 (elf32_arm_create_dynamic_sections): Tidy.
4381 (elf32_arm_link_hash_table_create): Set plt_header_size,
4382 plt_entry_size, and symbian_p.
4383 (elf32_arm_check_relocs): Do not mark .rel.dyn as loadable when
4384 generating BPABI objects.
4385 (allocate_dynrelocs): Use htab->plt_header_size, not
4386 PLT_HEADER_SIZE. Do not add to .got.plt when
4387 generating BPABI objects.
4388 (elf32_arm_finish_dynamic_symbol): Generate Symbian OS PLTs.
4389 * elfarm-nabi.c: Add SymbianOS target vectors.
4390 * elflink.c (_bfd_elf_create_got_section): Use dynamic_sec_flags.
4391 (_bfd_elf_link_create_dynamic_sections): Likewise.
4392 * elfxx-target.h (ELF_DYNAMIC_SEC_FLAGS): New macro.
4393 (elfNN_bed): Use it.
4394 * targets.c (bfd_elf32_bigarm_symbian_vec): New variable.
4395 (bfd_elf32_littlearm_symbian_vec): Likewise.
4396 (_bfd_target_vector): Add them.
4397
6e3b6835
NC
43982004-09-03 Nick Clifton <nickc@redhat.com>
4399
4400 PR 360
4401 * coffcode.h (handle_COMDAT): Replace abort with an warning
4402 message and allow the scan to continue.
4403
595da8c5
AM
44042004-09-02 Alan Modra <amodra@bigpond.net.au>
4405
4406 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Use static_syms passed
4407 in when reading relocs, not our sorted syms. Remove unnecessary
4408 var.
4409
6723a9f4
EB
44102004-08-31 Eric Botcazou <ebotcazou@libertysurf.fr>
4411
4412 * elf.c (special_sections): Add .gnu.linkonce.b modelled on .bss.
4413
5464f5a1
NN
44142004-08-30 Nathanael Nerode <neroden@gcc.gnu.org>
4415
4416 * acinclude.m4: Require AC_CANONICAL_TARGET, not AC_CANONICAL_SYSTEM.
4417 Include ../config/acx.m4 and use ACX_NONCANONICAL_* where appropriate;
4418 replace uses of *_alias with *_noncanonical.
4419 * aclocal.m4: Rebuild with aclocal 1.4p6.
4420 * Makefile.in: Rebuild with automake 1.4p6.
4421 * doc/Makefile.in: Rebuild with automake 1.4p6.
4422 * configure.in: Autoupdate with autoupdate 2.59.
4423 * config.in: Regenerate with autoheader 2.59.
4424 * configure: Regnerate with autoconf 2.59.
4425
a7535cf3
AM
44262004-08-28 Alan Modra <amodra@bigpond.net.au>
4427
4428 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Copy input
4429 symbol pointer arrays before modifying.
4430
c9727e01
AM
44312004-08-28 Alan Modra <amodra@bigpond.net.au>
4432
b91e2ae2 4433 * bfd.c (bfd_get_synthetic_symtab): Pass counts and both symbol tables.
c9727e01
AM
4434 * elf-bfd.h (_bfd_elf_get_synthetic_symtab): Adjust.
4435 * elf.c (_bfd_elf_get_synthetic_symtab): Adjust.
4436 * libbfd-in.h (_bfd_nodynamic_get_synthetic_symtab): Adjust.
b91e2ae2
AM
4437 * targets.c (struct bfd_target <_bfd_get_synthetic_symtab>): Adjust.
4438 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't read symbols.
4439 Use both symbol tables on non-relocatable objects. Use a common
4440 error exit. Fix "mid" warning.
c9727e01
AM
4441 * libbfd.h: Regenerate.
4442 * bfd-in2.h: Regenerate.
4443
699733f6
AM
44442004-08-28 Alan Modra <amodra@bigpond.net.au>
4445
4446 * elf64-ppc.c (ppc64_elf_branch_reloc): Check .opd is in a regular
4447 object file.
4448 (struct sfpr_def_parms): Save some space.
4449 (sfpr_define): Here too.
4450
4451 * elf64-ppc.c (compare_symbols): Put section syms first.
4452 (sym_exists_at): New function.
4453 (ppc64_elf_get_synthetic_symtab): Use relocs to find code entry
4454 points only for relocatable files. Use .opd section contents
4455 otherwise. Generally clean up the code.
4456
deb0e272
AM
44572004-08-27 Alan Modra <amodra@bigpond.net.au>
4458
4459 * elf64-ppc.c (STD_R0_0R1, STD_R0_0R12, LD_R0_0R1, LD_R0_0R12,
4460 LI_R12_0, STVX_VR0_R12_R0, LVX_VR0_R12_R0, MTLR_R0, SFPR_MAX): Define.
4461 (struct sfpr_def_parms): New.
4462 (sfpr_define): New function.
4463 (savegpr0, savegpr0_tail, restgpr0, restgpr0_tail): New functions.
4464 (savegpr1, savegpr1_tail, restgpr1, restgpr1_tail): New functions.
4465 (savefpr, savefpr0_tail, restfpr, restfpr0_tail): New functions.
4466 (savefpr1_tail, restfpr1_tail): New functions.
4467 (savevr, savevr_tail, restvr, restvr_tail): New functions.
4468 (MIN_SAVE_FPR, MAX_SAVE_FPR): Don't define.
4469 (ppc64_elf_func_desc_adjust): Use sfpr_define in place of existing
4470 code. Define all ABI mandated _save and _rest functions.
4471
85a84e7a
PB
44722004-08-26 Paul Brook <paul@codesourcery.com>
4473
deb0e272 4474 * elf32-arm.h (INTERWORK_FLAG): Return true for EABIv3 objects.
85a84e7a 4475
688c58f3
AM
44762004-08-26 Alan Modra <amodra@bigpond.net.au>
4477
4478 * elf32-m32r.c (m32r_elf_relocate_section): Don't compare with
4479 TRUE or FALSE.
4480
3e95eabc
AM
44812004-08-26 Alan Modra <amodra@bigpond.net.au>
4482
4483 * elf32-i386.c (elf_i386_relocate_section): Tweak last change so
4484 that pcrel correction is applied for R_386_PC32.
4485
f855931b
AM
44862004-08-25 Alan Modra <amodra@bigpond.net.au>
4487
4488 * elf32-i386.c (elf_i386_relocate_section): Zero section contents
4489 for R_386_32 and R_386_PC32 relocs against symbols defined in
4490 discarded sections.
4491
b18c562e
NC
44922004-08-25 Dmitry Diky <diwil@spec.ru>
4493
4494 * reloc.c (BFD_RELOC_MSP430_2X_PCREL,BFD_RELOC_MSP430_RL_PCREL):
4495 Add new relocations.
4496 * bfd-in2.h: Regenerate.
f855931b 4497 * libbfd.h: Regenerate.
b18c562e
NC
4498 * elf32-msp430.c: Clean-up code.
4499 (elf_msp430_howto_table): Add new relocation entries.
4500 (bfd_elf32_bfd_reloc_type_lookup): New relocation handlers.
4501 (msp430_elf_relax_section): New function.
4502 (msp430_elf_relax_delete_bytes): New function.
4503 (msp430_elf_symbol_address_p): New function.
4504
af705ba8
NC
45052004-08-24 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
4506
4507 * elf32-m32r.c (m32r_elf_relocate_section): Handle
4508 R_M32R_SDA16_RELA in the same way as R_M32R_SDA16.
4509
ea5158d8
DJ
45102004-08-20 Daniel Jacobowitz <dan@debian.org>
4511
4512 * elflink.c (_bfd_elf_section_already_linked): Handle
4513 SEC_LINK_DUPLICATES_SAME_CONTENTS.
4514
49d934f1
MM
45152004-08-19 Mark Mitchell <mark@codesourcery.com>
4516
4517 * config.bfd (arm*-*-symbianelf*): New target.
4518 (arm*-*-eabi*): Likewise.
4519
039b3fef
AM
45202004-08-19 Alan Modra <amodra@bigpond.net.au>
4521
4522 * elf64-ppc.c (ppc_get_stub_entry): Change third param to a
4523 "struct ppc_link_hash_entry *".
4524 (ppc64_elf_relocate_section): Ditto for type of h. Introduce h_elf
4525 to satisfy RELOC_FOR_GLOBAL_SYMBOL.
4526
3f764659
JJ
45272004-08-19 Jakub Jelinek <jakub@redhat.com>
4528
4529 * elf64-ppc.c (ppc64_elf_edit_opd): Support 16 byte long .opd
4530 entries (where fd_aux overlaps next entry's fd_func).
4531 Add non_overlapping argument, use it.
4532 (ppc64_elf_check_relocs, ppc64_elf_gc_mark_hook, adjust_opd_syms,
4533 ppc64_elf_size_stubs, ppc64_elf_relocate_section,
4534 ppc64_elf_output_symbol_hook): Use address / 8 instead of address / 24
4535 as indexes into opd_sym_map/opd_adjust array.
4536 * elf64-ppc.h (ppc64_elf_edit_opd): Adjust prototype.
4537
c09bdfe5
AM
45382004-08-18 Alan Modra <amodra@bigpond.net.au>
4539
4540 * elf64-ppc.c (func_desc_adjust): Give undefined dot-symbols a value
4541 if we can look up their function descriptor in a regular file.
4542
271d0fc3
NC
45432004-08-18 Nick Clifton <nickc@redhat.com>
4544
4545 PR 324
4546 * cofflink.c (coff_link_add_symbols): Check that the comdat
4547 pointer in the coff_section_data structure has been initialised
4548 before using it.
4549
a010d60f
AM
45502004-08-18 Alan Modra <amodra@bigpond.net.au>
4551
4552 PR 338
4553 * elflink.c (bfd_elf_record_link_assignment): Add comment about
4554 changing bfd_link_hash_undefined to bfd_link_hash_new.
4555
90e3cdf2
JJ
45562004-08-17 Jakub Jelinek <jakub@redhat.com>
4557
4558 * elfxx-target.h (bfd_elfNN_get_synthetic_symtab): Only define
4559 if not yet defined.
4560 * elf64-ppc.c (bfd_elf64_get_synthetic_symtab): Define.
4561 (synthetic_opd, synthetic_relocatable): New variables.
4562 (compare_symbols, compare_relocs): New helper routines.
4563 (ppc64_elf_get_synthetic_symtab): New function.
4564 * bfd.c (bfd_get_synthetic_symtab): Rename dynsyms argument
4565 to relsyms.
4566 * bfd-in2.h: Regenerated.
4567 * elf.c (_bfd_elf_get_synthetic_symtab): Rename dynsyms argument
4568 to relsyms. Return 0 if abfd is relocatable.
4569
7c2c8505
AM
45702004-08-17 Alan Modra <amodra@bigpond.net.au>
4571
4572 * elflink.h (elf_gc_sweep): Keep non-alloc, non-load sections.
4573
0367ecfb
NC
45742004-08-17 Nick Clifton <nickc@redhat.com>
4575
4576 * (is_arm_mapping_symbol_name): New function - return true
4577 when a symbol name matches the requirements for an ARM mapping
4578 symbol name.
4579 (arm_elf_find_function): New function based on
4580 elf_find_function in elf.c but skipping ARM mapping symbols
4581 and including thumb function symbols.
4582 (elf32_arm_find_nearest_line): Use arm_elf_find_function.
4583 (elf32_arm_output_symbol_hook): Use is_arm_mapping_symbol_name.
4584
2441e016
AM
45852004-08-17 Alan Modra <amodra@bigpond.net.au>
4586
4587 * elf64-ppc.c (ppc64_elf_branch_reloc): New function.
4588 (ppc64_elf_howto_raw): Use ppc64_elf_branch_reloc.
4589 (ppc64_elf_brtaken_reloc): Here too.
4590
35b0ce59
AM
45912004-08-17 Alan Modra <amodra@bigpond.net.au>
4592
4593 * elf64-ppc.c (add_symbol_adjust): Correct mismatched function
4594 symbol visibility.
4595 (ppc64_elf_check_directives): Check that we have the right hash
4596 table before proceeding.
4597
81688140
AM
45982004-08-17 Alan Modra <amodra@bigpond.net.au>
4599
4600 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add "deleted_section".
4601 (adjust_opd_syms): Attach opd syms for deleted entries to one of
4602 the sections that will be discarded.
4603
327c1315
AM
46042004-08-16 Alan Modra <amodra@bigpond.net.au>
4605
4606 * elflink.c (elf_section_complain_discarded): Ignore .fixup.
4607
45fc9e4a
AM
46082004-08-16 Alan Modra <amodra@bigpond.net.au>
4609
4610 * bfd.c (_bfd_default_error_handler): Account for doubled '%' in
4611 free space available.
4612
9dadfa79
AM
46132004-08-16 Alan Modra <amodra@bigpond.net.au>
4614
4615 * pdp11.c (struct pdp11_aout_reloc_external): Delete. Replace
f89c4dec 4616 occurrences with bfd_byte * thoughout file.
9dadfa79
AM
4617
4618 * coff-rs6000.c (do_shared_object_padding): Warning fix.
4619 (xcoff_write_armap_big): Likewise.
4620 (xcoff_write_archive_contents_old): Likewise.
4621 (xcoff_write_archive_contents_big): Likewise.
4622
4623 * elf64-mmix.c (mmix_elf_get_section_contents): Delete declaration.
4624
57e8b36a
NC
46252004-08-13 Nick Clifton <nickc@redhat.com>
4626
4627 * elf32-arm.h: Convert to ISO C90.
4628
a005f94e
AM
46292004-08-13 Alan Modra <amodra@bigpond.net.au>
4630
4631 PR 293
4632 * elf32-hppa.c (elf32_hppa_hide_symbol): Use init_refcount to
4633 zero the plt field.
4634
d003868e
AM
46352004-08-13 Alan Modra <amodra@bigpond.net.au>
4636
4637 * bfd.c (_bfd_default_error_handler): Handle %A and %B.
4638 (bfd_archive_filename, bfd_get_section_ident): Delete.
4639 * ecofflink.c (bfd_ecoff_debug_accumulate_other): Don't call
4640 bfd_archive_filename.
4641 * elflink.c (elf_link_input_bfd): Don't use callbacks->error_handler
4642 to warn about symbols in discarded sections. Use _bfd_error_handler.
4643 * aout-adobe.c (aout_adobe_callback): See below.
4644 * aout-cris.c (swap_ext_reloc_in): ..
4645 * coff-arm.c (find_thumb_glue, find_arm_glue,
4646 coff_arm_relocate_section, bfd_arm_process_before_allocation,
4647 coff_arm_merge_private_bfd_data, _bfd_coff_arm_set_private_flags,
4648 coff_arm_copy_private_bfd_data): ..
4649 * coff-i860.c (i860_reloc_processing): ..
4650 * coff-mcore.c (mcore_coff_unsupported_reloc,
4651 coff_mcore_relocate_section): ..
4652 * coff-ppc.c (coff_ppc_relocate_section): ..
4653 * coff-rs6000.c (xcoff_create_csect_from_smclas
4654 * coff-sh.c (sh_relax_section, sh_relax_delete_bytes,
4655 sh_swap_insns, sh_relocate_section): ..
4656 * coff-tic54x.c (tic54x_reloc_processing): ..
4657 * coff-tic80.c (coff_tic80_relocate_section): ..
4658 * coff64-rs6000.c (xcoff64_create_csect_from_smclas): ..
4659 * coffcode.h (styp_to_sec_flags, coff_slurp_line_table,
4660 coff_slurp_symbol_table, coff_classify_symbol,
4661 coff_slurp_reloc_table): ..
4662 * coffgen.c (_bfd_coff_read_string_table): ..
4663 * cofflink.c (coff_link_add_symbols, _bfd_coff_link_input_bfd,
4664 _bfd_coff_generic_relocate_section): ..
4665 * cpu-arm.c (bfd_arm_merge_machines): ..
4666 * cpu-sh.c (sh_merge_bfd_arch): ..
4667 * elf-hppa.h (elf_hppa_relocate_section): ..
4668 * elf.c (bfd_elf_string_from_elf_section, setup_group,
4669 _bfd_elf_setup_group_pointers, bfd_section_from_shdr,
4670 assign_section_numbers, _bfd_elf_symbol_from_bfd_symbol,
4671 copy_private_bfd_data, _bfd_elf_validate_reloc): ..
4672 * elf32-arm.h (find_thumb_glue, find_arm_glue,
4673 bfd_elf32_arm_process_before_allocation, elf32_thumb_to_arm_stub,
4674 elf32_arm_to_thumb_stub, elf32_arm_final_link_relocate,
4675 elf32_arm_relocate_section, elf32_arm_set_private_flags,
4676 elf32_arm_copy_private_bfd_data, elf32_arm_merge_private_bfd_data): ..
4677 * elf32-cris.c (cris_elf_relocate_section, cris_elf_check_relocs,
4678 cris_elf_merge_private_bfd_data
4679 * elf32-frv.c (elf32_frv_relocate_section, elf32_frv_check_relocs): ..
4680 * elf32-gen.c (elf32_generic_link_add_symbols): ..
4681 * elf32-hppa.c (hppa_add_stub, hppa_build_one_stub,
4682 elf32_hppa_check_relocs, get_local_syms, final_link_relocate,
4683 elf32_hppa_relocate_section): ..
4684 * elf32-i370.c (i370_elf_merge_private_bfd_data,
4685 i370_elf_check_relocs, i370_elf_relocate_section): ..
4686 * elf32-i386.c (elf_i386_info_to_howto_rel, elf_i386_check_relocs,
4687 elf_i386_relocate_section): ..
4688 * elf32-m32r.c (m32r_elf_relocate_section,
4689 m32r_elf_merge_private_bfd_data): ..
4690 * elf32-m68hc1x.c (m68hc12_add_stub,
4691 _bfd_m68hc11_elf_merge_private_bfd_data): ..
4692 * elf32-m68k.c (elf_m68k_relocate_section): ..
4693 * elf32-mcore.c (mcore_elf_unsupported_reloc,
4694 mcore_elf_relocate_section): ..
4695 * elf32-ppc.c (ppc_elf_merge_private_bfd_data, bad_shared_reloc,
4696 ppc_elf_check_relocs, ppc_elf_relocate_section,
4697 ppc_elf_begin_write_processing): ..
4698 * elf32-s390.c (elf_s390_check_relocs, invalid_tls_insn,
4699 elf_s390_relocate_section): ..
4700 * elf32-sh-symbian.c (sh_symbian_import_as,
4701 sh_symbian_process_embedded_commands,
4702 sh_symbian_relocate_section): ..
4703 * elf32-sh.c (sh_elf_relax_section, sh_elf_relax_delete_bytes,
4704 sh_elf_swap_insns, sh_elf_relocate_section, sh_elf_check_relocs,
4705 sh_elf_merge_private_data): ..
4706 * elf32-sparc.c (elf32_sparc_check_relocs,
4707 elf32_sparc_relocate_section,
4708 elf32_sparc_merge_private_bfd_data): ..
4709 * elf32-v850.c (v850_elf_check_relocs,
4710 v850_elf_merge_private_bfd_data): ..
4711 * elf32-xtensa.c (elf_xtensa_check_relocs,
4712 elf_xtensa_relocate_section, elf_xtensa_merge_private_bfd_data): ..
4713 * elf64-alpha.c (elf64_alpha_relax_with_lituse,
4714 elf64_alpha_relax_got_load, elf64_alpha_size_got_sections,
4715 elf64_alpha_relocate_section_r, elf64_alpha_relocate_section): ..
4716 * elf64-gen.c (elf64_generic_link_add_symbols): ..
4717 * elf64-ppc.c (ppc64_elf_merge_private_bfd_data, ppc_add_stub,
4718 ppc64_elf_check_relocs, ppc64_elf_edit_opd,
4719 ppc64_elf_relocate_section): ..
4720 * elf64-s390.c (elf_s390_check_relocs, invalid_tls_insn,
4721 elf_s390_relocate_section): ..
4722 * elf64-sh64.c (sh_elf64_relocate_section): ..
4723 * elf64-sparc.c (sparc64_elf_check_relocs,
4724 sparc64_elf_add_symbol_hook, sparc64_elf_relocate_section,
4725 sparc64_elf_merge_private_bfd_data): ..
4726 * elf64-x86-64.c (elf64_x86_64_check_relocs,
4727 elf64_x86_64_relocate_section): ..
4728 * elflink.c (_bfd_elf_add_default_symbol,
4729 _bfd_elf_link_assign_sym_version, elf_link_read_relocs_from_section,
4730 _bfd_elf_link_output_relocs, elf_link_add_object_symbols,
4731 bfd_elf_size_dynamic_sections, elf_link_output_extsym,
4732 elf_get_linked_section_vma, elf_fixup_link_order,
4733 bfd_elf_final_link, bfd_elf_gc_record_vtinherit,
4734 bfd_elf_gc_record_vtinherit, _bfd_elf_section_already_linked): ..
4735 * elfxx-ia64.c (elfNN_ia64_relax_section,
4736 elfNN_ia64_relocate_section, elfNN_ia64_merge_private_bfd_data): ..
4737 * elfxx-mips.c (mips_elf_perform_relocation,
4738 _bfd_mips_elf_check_relocs,
4739 _bfd_mips_elf_merge_private_bfd_data): ..
4740 * ieee.c (ieee_slurp_external_symbols): ..
4741 * ihex.c (ihex_bad_byte, ihex_scan, ihex_read_section): ..
4742 * libbfd.c (_bfd_generic_verify_endian_match): ..
4743 * linker.c (_bfd_generic_link_add_one_symbol,
4744 _bfd_generic_section_already_linked): ..
4745 * pdp11.c (translate_to_native_sym_flags): ..
4746 * pe-mips.c (coff_pe_mips_relocate_section): ..
4747 * peicode.h (pe_ILF_build_a_bfd): ..
4748 * srec.c (srec_bad_byte): ..
4749 * stabs.c (_bfd_link_section_stabs): ..
4750 * xcofflink.c (xcoff_link_add_symbols, xcoff_link_input_bfd): ..
4751 Replace all uses of bfd_archive_filename and bfd_get_section_ident
4752 with corresponding %B and %A in _bfd_error_handler format string.
4753 Replace occurrences of "fprintf (stderr," with _bfd_error_handler
4754 calls to use %A and %B. Fix "against symbol .. from section" and
4755 similar error messages. Combine multiple _bfd_error_handler calls
4756 where they were separated due to bfd_archive_filename deficiencies.
4757 * bfd-in2.h: Regenerate.
4758
6ba842b6
L
47592004-08-12 H.J. Lu <hongjiu.lu@intel.com>
4760
4761 * elf32-i386.c (elf_i386_relocate_section): Report unrecognized
4762 relocation.
4763
99877b66
AM
47642004-08-10 Alan Modra <amodra@bigpond.net.au>
4765
4766 * elf64-ppc.c (struct ppc_link_hash_entry): Add was_undefined.
4767 (struct ppc_link_hash_table): Remove no_multi_toc, multi_toc_needed.
4768 Make emit_stub_syms, stub_error and has_14bit_branch bit-fields.
4769 Add twiddled_syms.
4770 (link_hash_newfunc): Init was_undefined.
4771 (add_symbol_adjust): Don't set undefined dot symbols to defweak;
4772 Use undefweak instead.
4773 (ppc64_elf_check_directives): Fix undefs chain.
4774 (ppc64_elf_next_toc_section): Remove no_multi_toc and multi_toc_needed
4775 references.
4776 (ppc64_elf_size_stubs): Adjust for add_symbol_adjust change.
4777 (undo_symbol_twiddle, ppc64_elf_restore_symbols): New functions.
4778 * elf64-ppc.h (ppc64_elf_restore_symbols): Declare.
4779
ba3bee0b
JJ
47802004-08-09 Jakub Jelinek <jakub@redhat.com>
4781
4782 * elf64-x86-64.c (elf64_x86_64_relocate_section): For -fno-pic
4783 error, test input_section flags rather than sec.
4784
8387904d
AM
47852004-08-09 Alan Modra <amodra@bigpond.net.au>
4786
4787 * elf-bfd.h (struct elf_backend_data): Add
4788 elf_backend_archive_symbol_lookup.
4789 (_bfd_elf_archive_symbol_lookup): Declare.
4790 * elflink.c (_bfd_elf_archive_symbol_lookup): New function..
4791 (elf_link_add_archive_symbols): ..extracted from here. Call the
4792 backend version.
4793 * elfxx-target.h (elf_backend_archive_symbol_lookup): Provide default.
4794 (elfNN_bed): Init new field.
4795 * elf64-ppc.c (elf_backend_check_directives): Define.
4796 (elf_backend_archive_symbol_lookup): Define.
4797 (struct ppc_link_hash_table): Add tls_get_add_fd. Make tls_get_add
4798 a ppc_link_hash_entry pointer.
4799 (get_fdh): Move.
4800 (ppc64_elf_archive_symbol_lookup, opd_entry_value): New functions.
4801 (add_symbol_adjust, ppc64_elf_check_directives): New functions.
4802 (ppc64_elf_check_relocs, ppc64_elf_gc_mark_hook, func_desc_adjust,
4803 ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup,
4804 ppc64_elf_tls_optimize, allocate_dynrelocs, ppc_type_of_stub,
4805 ppc_build_one_stub, ppc64_elf_size_stubs, ppc64_elf_relocate_section,
4806 ppc64_elf_finish_dynamic_symbol): Handle branch relocs to function
4807 descriptor symbols.
4808
b25116a9
AM
48092004-08-09 Alan Modra <amodra@bigpond.net.au>
4810
8843416a
AM
4811 * elf64-ppc.c (struct ppc_link_hash_entry): Expand adjust_done comment.
4812 (ppc64_elf_add_symbol_hook): Test for NULL section.
4813 (get_sym_h): Formatting.
4814 (ppc64_elf_size_stubs): Include reloc addend in value stored as
4815 stub target_value.
4816
b25116a9
AM
4817 * elf64-ppc.c (ppc64_elf_relocate_section): Combine handling of
4818 long branch stubs with code handling plt and r2off branch stubs.
4819
ccfa59ea
AM
48202004-08-09 Alan Modra <amodra@bigpond.net.au>
4821
4822 * elf-bfd.h (_bfd_elf_gc_mark): Declare.
4823 * elflink.c (elf_link_input_bfd): Formatting.
4824 (_bfd_elf_gc_mark): Rename from elf_gc_mark and make global. Adjust
4825 all callers.
4826 * elf64-ppc.c (struct ppc_link_hash_entry): Remove is_entry.
4827 (link_hash_newfunc): Don't set it.
4828 (ppc64_elf_copy_indirect_symbol): Nor copy it.
4829 (ppc64_elf_mark_entry_syms): Delete.
4830 (ppc64_elf_gc_mark_hook): Mark entry syms here. Also mark opd
4831 sections. Use get_opd_info.
4832 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Delete.
4833
4025353c
AM
48342004-08-09 Alan Modra <amodra@bigpond.net.au>
4835
4f800a42
AM
4836 * elf64-ppc.c (adjust_opd_syms): Fix merge error.
4837
06da1e8e
AM
4838 * elf64-ppc.c (struct ppc_link_hash_table): Remove have_undefweak.
4839 (func_desc_adjust): Don't set have_undefweak.
4840 (ppc64_elf_func_desc_adjust): Don't add an extr nop to sfpr.
4841 (ppc64_elf_relocate_section): NOP out calls to undefweak functions.
4842
34814b9f
AM
4843 * elf64-ppc.c (struct ppc_link_hash_entry): Make "oh" a
4844 "struct ppc_link_hash_entry *". Adjust all references.
4845 (ppc64_elf_hide_symbol): Correct a comment.
4846
4025353c
AM
4847 * elf64-ppc.c (get_opd_info): New function.
4848 (adjust_opd_syms): Use get_opd_info. Define removed symbols as zero.
4849 (ppc64_elf_edit_opd): Use get_opd_info. Check that sym has a dot
4850 before calling get_fdh. Test fdh rather than h before dereferencing
4851 fdh. Mark removed symbols in opd_adjust.
4852 (ppc64_elf_tls_optimize): Don't bother with opd adjustment here.
4853 (ppc64_elf_relocate_section): Use get_opd_info, and handle removed
4854 opd symbols.
4855 (ppc64_elf_output_symbol_hook): Likewise.
4856
db6579d4
PB
48572004-08-06 Paul Brook <paul@codesourcery.com>
4858
4859 * elfarm-nabi.c (elf32_arm_howto_table): Add new EABI relocations.
4860 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_RELABS32,
4861 BFD_RELOC_ARM_ROSEGREL32 and BFD_RELOC_ARM_SBREL32.
4862 * reloc.c: Add BFD_RELOC_ARM_RELABS32, BFD_RELOC_ARM_ROSEGREL32
4863 and BFD_RELOC_ARM_SBREL32.
4864 * bfd-in2.h, bbfd.h: Regenerate.
4865
a4d0f181
TS
48662004-08-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4867
4868 * elfxx-mips.c (mips_elf_calculate_relocation): Test only for
4869 the dynamic link symbol actually in use.
4870
83774818
SC
48712004-08-01 Stephane Carrez <stcarrez@nerim.fr>
4872
4873 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Handle bfd_link_hash_new
4874
a4d0f181 48752004-07-31 Joel Brobecker <brobecker@gnat.com>
00b4930b
TS
4876 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4877
4878 * elfxx-mips.c (_bfd_mips_elf_symbol_processing): Handle
4879 SHN_MIPS_TEXT and SHN_MIPS_DATA.
4880
185d09ad
L
48812004-07-30 H.J. Lu <hongjiu.lu@intel.com>
4882 Nick Clifton <nickc@redhat.com>
4883
4884 PR 290
4885 * bfd.c (_bfd_default_error_handler): Make it global.
4886
4887 * elf-bfd.h (elf_backend_data): Add link_order_error_handler.
4888
4889 * elf.c (assign_section_numbers): Cope gracefully with sections
4890 which have SHF_LINK_ORDER set but no sh_link set up.
4891 * elflink.c (elf_get_linked_section_vma): Likewise.
4892
4893 * elfxx-ia64.c (elf_backend_link_order_error_handler): New. Set
4894 it to NULL.
4895
4896 * elfxx-target.h (elf_backend_link_order_error_handler): New.
4897 Set it to _bfd_default_error_handler.
4898 (elfNN_bed): Add elf_backend_link_order_error_handler.
4899
4900 * libbfd-in.h (_bfd_default_error_handler): New.
4901
4902 * libbfd.h: Regenerated.
4903
7946e94a
JJ
49042004-07-30 Jakub Jelinek <jakub@redhat.com>
4905
4906 * archures.c (bfd_mach_sparc_64bit_p): Define.
4907 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Use it.
4908 * bfd-in2.h: Rebuilt.
4909
1d70c7fb
AO
49102004-07-29 Alexandre Oliva <aoliva@redhat.com>
4911
4912 Introduce SH2a support.
4913 2004-02-18 Corinna Vinschen <vinschen@redhat.com>
4914 * archures.c (bfd_mach_sh2a_nofpu): New.
4915 * bfd-in2.h: Rebuilt.
4916 * cpu-sh.c (SH2A_NOFPU_NEXT): New.
4917 (arch_info_struct): Add sh2a_nofpu.
4918 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle sh2a_nofpu.
4919 2003-12-29 DJ Delorie <dj@redhat.com>
4920 * reloc.c: Add relocs for sh2a.
4921 * bfd-in2.h: Regenerate.
4922 * libbfd.hh: Regenerate.
4923 2003-12-01 Michael Snyder <msnyder@redhat.com>
4924 * archures.c (bfd_mach_sh2a): New.
4925 * bfd-in2.h: Rebuilt.
4926 * cpu-sh.c (SH_NEXT, SH2_NEXT, etc.): Change defines to enums.
4927 (SH2A_NEXT): New.
4928 (arch_info_struct): Add sh2a.
4929 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle sh2a.
4930
404ed0cf
DA
49312004-07-28 Nick Clifton <nickc@redhat.com>
4932 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
4933
4934 PR 273
4935 * som.c (setup_sections): Improve estimation of space sizes in
4936 relocatable objects.
4937
225247f0
JT
49382004-07-27 Jason Thorpe <thorpej@wasabisystems.com>
4939 * config.bfd (hppa*-*-netbsd*): Set targ_defvec to
4940 bfd_elf32_hppa_nbsd_vec. Add bfd_elf32_hppa_linux_vec
4941 to targ_selvecs.
4942 * configure.in (bfd_elf32_hppa_nbsd_vec): Add case.
4943 * configure: Regenerate.
4944 * elf32-hppa.c (elf32_hppa_object_p): Add "elf32-hppa-netbsd"
4945 case that accepts OSABI=NetBSD and OSABI=SysV.
4946 (elf32_hppa_set_gp): For "elf32-hppa-netbsd", set the GP to
4947 the base of .got or .data (if .got does not exist).
4948 (elf32_hppa_post_process_headers): For elf32-hppa-netbsd,
4949 set OSABI=NetBSD.
4950 (TARGET_BIG_SYM): Add bfd_elf32_hppa_nbsd_vec case.
4951 (TARGET_BIG_NAME): Add "elf32-hppa-netbsd" case.
4952 * targets.c (bfd_elf32_hppa_nbsd_vec): Add extern declaration.
4953 (_bfd_target_vector): Add bfd_elf32_hppa_nbsd_vec.
4954
3d7f7666
L
49552004-07-27 H.J. Lu <hongjiu.lu@intel.com>
4956
4957 PR 161/251
4958 * elf-bfd.h (bfd_elf_section_data): Add sec_group.
4959 (elf_sec_group): Defined.
4960 (bfd_elf_match_symbols_in_sections): New prototype.
4961 (_bfd_elf_setup_group_pointers): Likewise.
4962
4963 * elf.c (bfd_elf_discard_group): Abort.
4964 (bfd_elf_set_group_contents): Also include relocation sections.
4965 Remove zero-fill for ld -r.
4966 (_bfd_elf_setup_group_pointers): New function.
4967 (elf_sort_elf_symbol): Likewise.
4968 (elf_sym_name_compare): Likewise.
4969 (bfd_elf_match_symbols_in_sections): Likewise.
4970
4971 * elfcode.h (elf_object_p): Call _bfd_elf_setup_group_pointers.
4972
4973 * elflink.c (match_group_member): New.
4974 (elf_link_input_bfd): Check group member for discarded section.
4975 (try_match_symbols_in_sections): New function.
4976 (already_linked): Likewise.
4977 (_bfd_elf_section_already_linked): Support mixing comdat group
4978 and linkonce section.
4979
4980 * libbfd-in.h (bfd_section_already_linked_table_traverse): New.
4981 * linker.c (bfd_section_already_linked_table_traverse): New.
4982
4983 * libbfd.h: Regenerated.
4984
670ec21d
NC
49852004-07-27 Tomer Levi <Tomer.Levi@nsc.com>
4986
4987 * reloc.c: Add BFD_RELOC_CRX_SWITCH8, BFD_RELOC_CRX_SWITCH16,
4988 BFD_RELOC_CRX_SWITCH32.
4989 * bfd-in2.h: Regenerate.
6cd7f07e 4990 * libbfd.h: Regenerate.
670ec21d
NC
4991 * elf32-crx.c: Support relocation/relaxation of
4992 BFD_RELOC_CRX_SWITCH* types.
4993
2c66dc6c
AM
49942004-07-27 Alan Modra <amodra@bigpond.net.au>
4995
4996 * elf64-ppc.c: Correct "Linker stubs" comment.
4997
38ce5b11
L
49982004-07-26 H.J. Lu <hongjiu.lu@intel.com>
4999
5000 * elf-bfd.h (bfd_elf_section_data): Add a pointer for the
5001 linked-to section.
5002 (elf_linked_to_section): New.
5003
5004 * elf.c (assign_section_numbers): Set up sh_link for
5005 SHF_LINK_ORDER.
5006
5007 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set sh_info
5008 to sh_link for SHT_IA_64_UNWIND sections.
5009
65da361f
L
50102004-07-22 H.J. Lu <hongjiu.lu@intel.com>
5011
5012 * elflink.c (elf_fixup_link_order): Add _() to error message.
5013
08ccf96b
L
50142004-07-22 H.J. Lu <hongjiu.lu@intel.com>
5015
5016 * elflink.c (elf_fixup_link_order): Issue a warning and flag
5017 an error if failed.
5018
082b7297
L
50192004-07-21 H.J. Lu <hongjiu.lu@intel.com>
5020
5021 * aout-adobe.c (aout_32_section_already_linked): Defined.
5022 * aout-target.h (MY_section_already_linked): Likewise.
5023 * aout-tic30.c (MY_section_already_linked): Likewise.
5024 * binary.c (binary_section_already_linked): Likewise.
5025 * bout.c (b_out_section_already_linked): Likewise.
5026 * coff-alpha.c (_bfd_ecoff_section_already_linked): Likewise.
5027 * coff-mips.c (_bfd_ecoff_section_already_linked): Likewise.
5028 * coffcode.h (coff_section_already_linked): Likewise.
5029 * i386msdos.c (msdos_section_already_linked): Likewise.
5030 * i386os9k.c (os9k_section_already_linked): Likewise.
5031 * ieee.c (ieee_section_already_linked): Likewise.
5032 * ihex.c (ihex_section_already_linked): Likewise.
5033 * mach-o.c (bfd_mach_o_section_already_linked): Likewise.
5034 * mmo.c (mmo_section_already_linked): Likewise.
5035 * nlm-target.h (nlm_section_already_linked): Likewise.
5036 * oasys.c (oasys_section_already_linked): Likewise.
5037 * pef.c (bfd_pef_section_already_linked): Likewise.
5038 * ppcboot.c (ppcboot_section_already_linked): Likewise.
5039 * som.c (som_bfd_discard_group): Likewise.
5040 * srec.c (srec_section_already_linked): Likewise.
5041 * tekhex.c (tekhex_section_already_linked): Likewise.
5042 * versados.c (versados_section_already_linked): Likewise.
5043 * vms.c (vms_section_already_linked): Likewise.
5044 * coff-target.h (_bfd_xcoff_section_already_linked): Likewise.
5045 * xsym.c (bfd_sym_section_already_linked): Likewise.
5046
5047 * bfd-in.h (bfd_section_already_linked_table_init): New.
5048 (bfd_section_already_linked_table_free): Likewise.
5049
5050 * coff-rs6000.c (rs6000coff_vec): Add
5051 _bfd_generic_section_already_linked.
5052 (pmac_xcoff_vec): Likewise.
5053 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
5054 (aix5coff64_vec): Likewise.
5055
5056 * elf-bfd.h (_bfd_elf_section_already_linked): New prototype.
5057 * elflink.c (_bfd_elf_section_already_linked): New function.
5058
5059 * elfxx-target.h (bfd_elfNN_section_already_linked): Defined.
5060
5061 * libbfd-in.h (_bfd_nolink_section_already_linked): Defined.
5062 (_bfd_generic_section_already_linked): New.
5063 (bfd_section_already_linked_hash_entry): Likewise.
5064 (bfd_section_already_linked): Likewise.
5065 (bfd_section_already_linked_table_lookup): Likewise.
5066 (bfd_section_already_linked_table_insert): Likewise.
5067
5068 * linker.c (bfd_section_already_linked): New.
5069 (_bfd_section_already_linked_table): Likewise.
5070 (bfd_section_already_linked_table_lookup): Likewise.
5071 (bfd_section_already_linked_table_insert): Likewise.
5072 (already_linked_newfunc): Likewise.
5073 (bfd_section_already_linked_table_init): Likewise.
5074 (bfd_section_already_linked_table_free): Likewise.
5075 (_bfd_generic_section_already_linked): Likewise.
5076
5077 * section.c (bfd_section): Remove comdat.
5078 (bfd_comdat_info): Moved to ...
5079 * bfd-in.h (coff_comdat_info): Here.
5080 (bfd_coff_get_comdat_section): New.
5081 * coffgen.c (bfd_coff_get_comdat_section): Likewise.
5082 * libcoff-in.h (coff_section_tdata): Add comdat.
5083 * coffcode.h (handle_COMDAT): Updated.
5084 * cofflink.c (coff_link_add_symbols): Likewise.
5085 * ecoff.c (bfd_debug_section): Likewise.
5086
5087 * targets.c (bfd_target): Add _section_already_linked.
5088 (BFD_JUMP_TABLE_LINK): Updated.
5089
5090 * bfd-in2.h: Regenerated.
5091 * libbfd.h: Likewise.
5092 * libcoff.h: Likewise.
5093
0b52efa6
PB
50942003-07-21 Paul Brook <paul@codesourcery.com>
5095
5096 * elflink.c (elf_get_linked_section_vma, compare_link_order,
5097 elf_fixup_link_order): New functions.
5098 (bfd_elf_final_link): Call elf_fixup_link_order.
5099
7e2294f9
AO
51002004-07-21 Alexandre Oliva <aoliva@redhat.com>
5101
5102 * elf-bfd.h (ELF_COMMON_DEF_P): New.
5103 * elflink.c (_bfd_elf_symbol_refs_local_p): Use it to handle
5104 common definitions.
5105 * elf-m10300.c: Use SYMBOL_REFERENCES_LOCAL instead of
5106 _bfd_elf_symbol_refs_local_p.
5107 * elf32-frv.c (FRVFDPIC_SYM_LOCAL): Remove hack for common
5108 symbols.
5109
e56f61be
L
51102004-07-19 H.J. Lu <hongjiu.lu@intel.com>
5111
5112 * bfd-in.h (dynamic_lib_link_class): Add DYN_NO_ADD_NEEDED and
5113 DYN_NO_NEEDED.
5114 (bfd_elf_get_dyn_lib_class): New prototype.
5115 * elf.c (bfd_elf_get_dyn_lib_class): New function.
5116
5117 * elflink.c (elf_link_add_object_symbols): Check DYN_AS_NEEDED,
5118 DYN_DT_NEEDED and DYN_NO_NEEDED bits to see if a DT_NEEDED
5119 entry is needed. Issue an error if a DT_NEEDED entry is needed
5120 for a file marked DYN_NO_NEEDED.
5121 (elf_link_check_versioned_symbol): Check the DYN_DT_NEEDED bit
5122 for DT_NEEDED tags.
5123
5124 * bfd-in2.h: Regenerated.
5125
27b56da8
DA
51262004-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
5127
5128 * elflink.c (elf_section_complain_discarded): Don't complain in
5129 .PARISC.unwind.
5130
bbb268c3
JW
51312004-07-10 James E Wilson <wilson@specifixinc.com>
5132
5133 * elfxx-ia64.c (elfNN_ia64_relax_ldxmov): Remove abfd parameter.
5134 (elfNN_ia64_install_value, elfNN_ia64_relax_brl): Likewise.
5135 (elfNN_ia64_relax_section, elfNN_ia64_relocate_section,
5136 elfNN_ia64_finish_dynamic_symbol, elfNN_ia64_finish_dynamic_sections):
5137 Fix callers.
5138 (elfNN_ia64_relax_brl): Change bfd_get_64 to bfd_getl64. Change
5139 bfd_put_64 to bfd_putl64.
5140 (elfNN_ia64_relax_ldxmov, elfNN_ia64_install_value): Likewise.
2c66dc6c 5141
e525914f
L
51422004-07-09 H.J. Lu <hongjiu.lu@intel.com>
5143
5144 PR 240
5145 * elfxx-ia64.c (elfNN_ia64_relax_section): Only warn br in
5146 .init/.fini sections when trying to relax it.
5147
b1a6d0b1
NC
51482004-07-09 Jie Zhang <zhangjie@magima.com.cn>
5149
5150 * elf.c (assign_file_positions_for_segments): Make sure the
5151 .dynamic section is the first section in the PT_DYNAMIC segment.
5152
1a320fbb
NC
51532004-07-09 Nick Clifton <nickc@redhat.com>
5154
5155 * config.bfd: Change sh-sybmian-elf to sh-*-symbianelf.
5156 * elf32-sh-symbian.c: Rename the sh_find_elf_flags and
5157 sh_elf_get_flags_from_mach functions so that they do not conflict
5158 when this target is built with other sh-elf targets.
5159 * elf32-sh.c (sh_elf_get_flags_from_mach): Remove bogus
5160 suppression of this function.
5161 (sh_elf_find_flags): Likewise.
5162
1fe1f39c
NC
51632004-07-07 Tomer Levi <Tomer.Levi@nsc.com>
5164
5165 * Makefile.am (ALL_MACHINES): Add cpu-crx.lo.
5166 (ALL_MACHINES_CFILES): Add cpu-crx.c.
5167 (BFD32_BACKENDS): Add elf32-crx.lo.
5168 (BFD32_BACKENDS_CFILES): Add elf32-crx.c.
5169 (cpu-crx.lo): New target.
5170 (elf32-crx.lo): New target.
5171 * Makefile.in: Regenerate.
5172 * archures.c (bfd_architecture): Add bfd_{arch,mach}_crx.
5173 (bfd_archures_list): Add bfd_crx_arch.
5174 * bfd-in2.h: Regenerate.
5175 * config.bfd: Handle crx-*-elf*, crx*.
5176 * configure.in: Handle bfd_elf32_crx_vec.
5177 * configure: Regenerate.
5178 * cpu-crx.c: New file.
5179 * elf32-crx.c: Likewise.
5180 * libbfd.h: Regenerate.
5181 * reloc.c: Add BFD_RELOC_CRX_REL4, BFD_RELOC_CRX_REL8,
5182 BFD_RELOC_CRX_REL8_CMP, BFD_RELOC_CRX_REL16, BFD_RELOC_CRX_REL24,
5183 BFD_RELOC_CRX_REL32, BFD_RELOC_CRX_REGREL12, BFD_RELOC_CRX_REGREL22,
5184 BFD_RELOC_CRX_REGREL28, BFD_RELOC_CRX_REGREL32, BFD_RELOC_CRX_ABS16,
5185 BFD_RELOC_CRX_ABS32, BFD_RELOC_CRX_NUM8, BFD_RELOC_CRX_NUM16,
5186 BFD_RELOC_CRX_NUM32, BFD_RELOC_CRX_IMM16 and BFD_RELOC_CRX_IMM32
5187 * targets.c (bfd_elf32_crx_vec): Declare.
5188 (bfd_target_vector): Add bfd_elf32_crx_vec.
5189
85fbca6a
NC
51902004-07-06 Nick Clifton <nickc@redhat.com>
5191
5192 * config.bfd: Add sh-symbian-elf target.
5193 * configure.in: Add bfd_elf32_shl_symbian_vec.
5194 * configure: Regenerate.
5195 * elf-bfd.h (struct elf_backend_data): Add new field
5196 'check_directives'.
1fe1f39c 5197 * elflink.c (elf_link_add_object_symbols): Invoke the
85fbca6a 5198 check_directives function, if defined.
1fe1f39c 5199 * elfxx-target.h: Provide a default, NULL definition for
85fbca6a 5200 check_directives.
1fe1f39c
NC
5201 * targets.c: Add bfd_elf32_shl_symbian_vec.
5202 * elf32-sh.c (sh_elf_swap_insns): Protect against unnecessary
85fbca6a 5203 definition.
1fe1f39c 5204 (elf32_shlin_grok_prstatus, elf32_shlib_grok_psinfo,
85fbca6a 5205 * sh_elf_get_flags_from_mach, sh_elf_find_flags): Likewise.
1fe1f39c 5206 (TARGET_BIG_SYM, TARGET_LITTLE_SYM): Only define if they have
85fbca6a 5207 not already been defined.
1fe1f39c
NC
5208 * elf32-sh64.c: Use SH_TARGET_ALREADY_DEFINED.
5209 * sh-symbian.c: New file. Provide functions to support the
85fbca6a
NC
5210 * sh-symbian-elf target.
5211 * Makefile.am: Add elf32-sh-symbian.c
5212 * Makefile.in: Regenerate.
1fe1f39c 5213
871ec896
JR
52142004-07-05 Andrew Stubbs <andrew.stubbs@superh.com>
5215
1fe1f39c
NC
5216 * elf32-sh.c: Include ../opcodes/sh-opc.h.
5217 * Makefile.am: Ran make dep-am.
5218 * Makefile.in: Ran make dep-in.
871ec896 5219
c87db184
CF
52202004-07-03 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
5221
5222 * cofflink.c (_bfd_coff_generic_relocate_section): Resolve PE weak
5223 externals properly.
5224
06f2f6af
MS
52252004-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
5226
5227 * config.bfd: Add want64 to configuration target s390-*-linux*.
5228
b602c853
L
52292004-07-01 H.J. Lu <hongjiu.lu@intel.com>
5230
5231 * bfd.c (bfd_get_section_ident): New.
5232
5233 * elflink.c (elf_link_read_relocs_from_section): Call
5234 bfd_get_section_ident to identify the section when reporting
5235 error.
5236 (_bfd_elf_link_output_relocs): Likewise.
5237 (elf_link_output_extsym): Likewise.
5238 (elf_link_input_bfd): Likewise.
5239 (bfd_elf_gc_record_vtinherit): Likewise.
5240
5241 * bfd-in2.h: Regenerated.
5242
7a2a6943
NC
52432004-07-01 Jie Zhang <zhangjie@magima.com.cn>
5244 Nick Clifton <nickc@redhat.com>
5245
5246 PR 204
5247 * elfxx-mips.c (_bfd_mips_elf_final_link): Pass the correct number
5248 of section symbols to mips_elf_sort_hash_table ().
5249
cdd3575c
AM
52502004-07-01 Alan Modra <amodra@bigpond.net.au>
5251
5252 * elflink.c (elf_section_ignore_discarded_relocs): Revert last
5253 change. Comment.
5254 (elf_section_complain_discarded): New function. Handle
5255 .gcc_except_table too.
5256 (elf_link_input_bfd): Rewrite handling of relocs against symbols
5257 in discarded sections.
5258 * elf-bfd.h (elf_discarded_section): Protect macro arg.
5259
21a8f7fa
JW
52602004-06-30 James E Wilson <wilson@specifixinc.com>
5261
5262 * elfxx-ia64.c (elfNN_ia64_check_relocs): New local pltoff. Initialize
5263 to NULL. Call get_pltoff if NULL and NEED_PLTOFF is true.
5264
2de26f35
L
52652004-06-30 H.J. Lu <hongjiu.lu@intel.com>
5266
5267 PR 233
5268 * elflink.c (elf_link_input_bfd): Issue an error for non-debug
5269 local references to discarded sections and report their
5270 locations.
5271
72d7a15c
AM
52722004-06-30 Alan Modra <amodra@bigpond.net.au>
5273
5274 * elflink.c (elf_section_ignore_discarded_relocs): Don't test
5275 sec_info_type, test section name instead.
5276
e7f0a167
L
52772004-06-29 H.J. Lu <hongjiu.lu@intel.com>
5278
5279 PR 240
5280 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't relax branch
5281 in .init/.fini sections.
5282
bff5f93a
BW
52832004-06-29 Bob Wilson <bob.wilson@acm.org>
5284
5285 * elf32-xtensa.c (elf_xtensa_relocate_section): Use
5286 bfd_get_section_limit.
5287
b54d4b07
BW
52882004-06-29 Bob Wilson <bob.wilson@acm.org>
5289
5290 * elf32-xtensa.c (elf_xtensa_combine_prop_entries): Don't change the
5291 output section size.
5292
e87a64e1
AM
52932004-06-29 Alan Modra <amodra@bigpond.net.au>
5294
1a23a9e6
AM
5295 * elf64-mmix.c (mmix_set_relaxable_size): Save original size in
5296 rawsize.
5297 (mmix_elf_perform_relocation): Adjust for above change.
5298 (mmix_elf_relocate_section): Likewise.
5299 (mmix_elf_relax_section): Likewise. Use output_section->rawsize.
5300 (mmix_elf_get_section_contents): Delete.
5301 (bfd_elf64_get_section_contents): Delete.
5302 (mmix_elf_relocate_section): Zero stub area.
5303 * linker.c (default_indirect_link_order): Alloc max of section size
5304 and rawsize.
5305 * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
5306 * section.c (bfd_malloc_and_get_section): Likewise.
5307 (struct bfd_section): Update rawsize comment.
5308 * bfd-in2.h: Regenerate.
5309
e87a64e1
AM
5310 * reloc16.c (bfd_coff_reloc16_relax_section): Set rawsize.
5311
07515404
AM
53122004-06-29 Alan Modra <amodra@bigpond.net.au>
5313
5314 * bfd-in.h (bfd_get_section_limit): Define.
1fe1f39c 5315 * reloc.c (bfd_perform_relocation, bfd_install_relocation)
07515404
AM
5316 (_bfd_final_link_relocate): Use bfd_get_section_limit.
5317 * aout-tic30.c (tic30_aout_final_link_relocate): Likewise.
5318 * coff-arm.c (coff_arm_relocate_section): Likewise.
5319 * coff-mips.c (mips_refhi_reloc, mips_gprel_reloc): Likewise.
5320 * cpu-ns32k.c (do_ns32k_reloc): Likewise.
5321 (bfd_ns32k_final_link_relocate): Likewise.
5322 * elf32-d30v.c (bfd_elf_d30v_reloc, bfd_elf_d30v_reloc_21): Likwise.
5323 * elf32-dlx.c (_bfd_dlx_elf_hi16_reloc): Likewise.
1fe1f39c 5324 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc)
07515404 5325 (i860_howto_highadj_reloc, i860_howto_splitn_reloc): Likewise.
1fe1f39c 5326 * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc, m32r_elf_hi16_reloc)
07515404
AM
5327 (m32r_elf_generic_reloc, m32r_elf_relocate_section): Likewise.
5328 * elf32-m68hc1x.c (m68hc11_elf_special_reloc): Likewise.
5329 * elf32-mips.c (gprel32_with_gp, mips16_gprel_reloc): Likewise.
5330 * elf32-or32.c (or32_elf_consth_reloc): Likewise.
5331 * elf32-ppc.c (ppc_elf_addr16_ha_reloc): Likewise.
5332 * elf32-s390.c (s390_elf_ldisp_reloc): Likewise.
5333 * elf32-sh.c (sh_elf_reloc_loop): Likewise.
5334 * elf32-sparc.c (sparc_elf_wdisp16_reloc): Likewise.
5335 (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc): Likwise.
5336 * elf32-v850.c (v850_elf_reloc): Likewise.
5337 * elf32-xstormy16.c (xstormy16_elf_24_reloc): Likewise.
5338 * elf32-xtensa.c (bfd_elf_xtensa_reloc): Likewise.
5339 * elf64-alpha.c (elf64_alpha_reloc_gpdisp): Likewise.
5340 * elf64-mips.c (mips_elf64_gprel32_reloc)
5341 (mips16_gprel_reloc): Likewise.
5342 * elf64-mmix.c (mmix_elf_reloc): Likewise.
5343 * elf64-s390.c (s390_elf_ldisp_reloc): Likewise.
5344 * elf64-sparc.c (init_insn_reloc): Likewise.
5345 * elfn32-mips.c (gprel32_with_gp, mips16_gprel_reloc): Likewise.
1fe1f39c
NC
5346 * elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp)
5347 (_bfd_mips_elf_hi16_reloc, _bfd_mips_elf_lo16_reloc)
07515404
AM
5348 (_bfd_mips_elf_generic_reloc): Likewise.
5349 * bfd-in2.h: Regenerate.
5350
3722b82f
AM
53512004-06-28 Alan Modra <amodra@bigpond.net.au>
5352
5353 * bfd-in.h (struct stab_info): Move from stabs.c.
5354 * stabs.c (struct stab_link_includes_table): Delete.
5355 (stab_link_includes_lookup): Delete.
5356 (_bfd_write_section_stabs, _bfd_write_stab_strings): Remove one
5357 level of indirection from sinfo parm.
5358 (_bfd_link_section_stabs): Likewise. Set SEC_LINKER_CREATED on
5359 stabstr section. Adjust hash table accesses.
5360 * coff-ppc.c (ppc_bfd_coff_final_link): Do include rawsize in contents
5361 alloc. Adjust stab_info test.
5362 * cofflink.c (_bfd_coff_link_hash_table_init): Clear stab_info.
5363 (_bfd_coff_final_link): Adjust stab_info test.
5364 (_bfd_coff_link_input_bfd): Ignore SEC_LINKER_CREATED sections.
5365 * elf-bfd.h (struct elf_link_hash_table): Include struct stab_info
5366 in place.
5367 * libcoff-in.h (struct coff_link_hash_table): Likewise.
5368 * elf.c (_bfd_elf_link_hash_table_init): Clear stab_info.
5369 * elflink.c (bfd_elf_final_link): Don't attempt to link linker created
5370 stabstr section. Adjust stab_info test.
5371 * libbfd-in.h (_bfd_link_section_stabs, _bfd_write_section_stabs)
5372 (_bfd_write_stab_strings): Adjust prototypes.
5373 * libbfd.h: Regenerate.
5374 * libcoff.h: Regenerate.
5375 * bfd-in2.h: Regenerate.
5376
727e493d
MK
53772004-06-27 Mark Kettenis <kettenis@gnu.org>
5378
5379 From Miod Vallat <miod@online.fr>:
5380 * aoutx.h (NAME(aout,machine_type)): Handle bfd_arch_m88k.
5381
146ccdbb
AO
53822004-06-26 Alexandre Oliva <aoliva@redhat.com>
5383
5384 * elf-m10300.c (struct elf_mn10300_pcrel_relocs_copied): Delete.
5385 (struct elf32_mn10300_link_hash_entry): Remove
5386 pcrel_relocs_copied.
5387 (mn10300_elf_check_relocs): Only reserve dynamic relocations for
5388 R_MN10300_32. Don't adjust pcrel_relocs_copied.
5389 (mn10300_elf_final_link_relocate): Fail for direct, pc-relative
5390 and gotoff relocations if the symbol doesn't bind locally. Use
5391 _bfd_elf_symbol_refs_local_p to test. Don't create dynamic
5392 relocation for PCREL32.
5393 (mn10300_elf_relocate_section): Use _bfd_elf_symbol_refs_local_p
5394 to test whether a symbol binds locally.
5395 (elf32_mn10300_link_hash_newfunc): Don't initialize
5396 pcrel_relocs_copied.
5397 (_bfd_mn10300_elf_discard_copies): Delete.
5398 (_bfd_mn10300_elf_size_dynamic_sections): Don't call it.
5399
a5fd0812
MK
54002004-06-26 Mark Kettenis <kettenis@gnu.org>
5401
5402 * config.bfd: Replace m88k-*-openbsd* with m88*-*-openbsd*.
5403
22bfad37
JB
54042004-06-25 Joel Brobecker <brobecker@gnat.com>
5405
5406 * som.c (som_set_reloc_info): Correct small typo.
5407
097f809a
NC
54082004-06-25 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
5409
5410 * elf32-m32r.c (m32r_elf_howto_table): Support R_M32R_GOTOFF.
5411 (m32r_elf_relocate_section): Changed for R_M32R_GOTOFF.
5412 (m32r_elf_gcsweep_hook): Likewise.
5413 (m32r_elf_check_relocs): Likewise.
5414 (m32r_elf_howto_table): Added R_M32R_GOTOFF_HI_ULO,
5415 R_M32R_GOTOFF_HI_SLO and R_M32R_GOTOFF_LO.
5416 * reloc.c: Added BFD_RELOC_M32R_GOTOFF_HI_ULO,
5417 BFD_RELOC_M32R_GOTOFF_HI_SLO and BFD_RELOC_M32R_GOTOFF_LO.
f9f2cf5d
NC
5418 * bfd-in2.h: Regenerated.
5419 * libbfd.h: Regenerated.
097f809a 5420
6610a52d
L
54212004-06-24 H.J. Lu <hongjiu.lu@intel.com>
5422
5423 * elf64-x86-64.c (elf64_x86_64_check_relocs): Warn overflow
5424 relocation symbol.
5425 (elf64_x86_64_relocate_section): Issue an error for
5426 R_X86_64_PC8, R_X86_64_PC16 and R_X86_64_PC32 relocations
5427 against global symbols when building shared library.
5428
eea6121a
AM
54292004-06-24 Alan Modra <amodra@bigpond.net.au>
5430
5431 * section.c (struct sec): Rename "_cooked_size" to "size".
5432 Rename "_raw_size" to "rawsize".
5433 (STD_SECTION): Adjust comments.
5434 (bfd_set_section_size, bfd_get_section_contents): Use size.
5435 (bfd_malloc_and_get_section): New function.
5436 * bfd-in.h (bfd_section_size, bfd_get_section_size): Use size.
5437 * coff-sh.c (sh_relax_section): Alloc coff_section_data struct early.
5438 Correctly free reloc and contents memory.
5439 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Delete FIXME
5440 and fake CIE now that we can shink section size to zero.
5441 (_bfd_elf_write_section_eh_frame): Likewise..
5442 * elf32-ppc.c (ppc_elf_relax_section): Delay reading section contents.
5443 * elf-m10300.c (mn10300_elf_final_link_relocate): Don't use
5444 _bfd_stab_section_offset. Use _bfd_elf_section_offset.
5445 * stabs.c (_bfd_stab_section_offset_): Remove unused args and
5446 unneeded indirection.
5447 * elf.c (_bfd_elf_section_offset): .. and update call.
5448 * libbfd-in.h (_bfd_stab_section_offset): Update prototype.
5449 * libbfd.h: Regenerate.
5450 * bfd-in2.h: Regenerate.
5451
5452 Replace occurrences of "_raw_size" and "_cooked_size" in most places
5453 with "size". Set new "rawsize" for stabs, eh_frame, and SEC_MERGE
5454 sections. Use "rawsize", if non-zero, for bfd_get_section_contents
5455 calls if the section might be a stabs, eh_frame, or SEC_MERGE section.
5456 Similarly use "rawsize", if non-zero, in reloc functions to validate
5457 reloc addresses. Use new bfd_malloc_and_get_section in most places
5458 where bfd_get_section_contents was called. Expand all occurrences of
5459 bfd_section_size and bfd_get_section_size. Rename "raw_size" var in
5460 grok_prstatus and similar functions to "size".
5461 * aix386-core.c (aix386_core_file_p): ..
5462 * aix5ppc-core.c (xcoff64_core_p): ..
5463 * aout-adobe.c (aout_adobe_callback, aout_adobe_write_object_contents,
5464 aout_adobe_set_section_contents): ..
5465 * aout-target.h (callback): ..
5466 * aout-tic30.c (tic30_aout_callback, tic30_aout_final_link_relocate,
5467 MY_bfd_final_link): ..
5468 * aoutf1.h (sunos4_core_file_p): ..
5469 * aoutx.h (some_aout_object_p, adjust_o_magic, adjust_z_magic,
5470 adjust_n_magic, adjust_sizes_and_vmas, translate_from_native_sym_flags,
5471 final_link, aout_link_input_section): ..
5472 * binary.c (binary_object_p, binary_canonicalize_symtab,
5473 binary_set_section_contents): ..
5474 * bout.c (b_out_callback, b_out_write_object_contents,
5475 b_out_set_section_contents, b_out_bfd_relax_section,
5476 b_out_bfd_get_relocated_section_contents): ..
5477 * cisco-core.c (cisco_core_file_validate): ..
5478 * coff-alpha.c (alpha_ecoff_object_p,
5479 alpha_ecoff_get_relocated_section_conten, alpha_relocate_section): ..
5480 * coff-arm.c (coff_arm_relocate_section,
5481 bfd_arm_allocate_interworking_sections): ..
5482 * coff-h8300.c (h8300_reloc16_extra_cases,
5483 h8300_bfd_link_add_symbols): ..
5484 * coff-mips.c (mips_refhi_reloc, mips_gprel_reloc): ..
5485 * coff-ppc.c (coff_ppc_relocate_section, ppc_allocate_toc_section,
5486 ppc_bfd_coff_final_link): ..
5487 * coff-rs6000.c (xcoff_reloc_type_br, xcoff_ppc_relocate_section): ..
5488 * coff-sh.c (sh_relax_section, sh_relax_delete_bytes,
5489 sh_align_loads, sh_coff_get_relocated_section_contents): ..
5490 * coff64-rs6000.c (xcoff64_write_object_contents,
5491 xcoff64_reloc_type_br, xcoff64_ppc_relocate_section): ..
5492 * coffcode.h (coff_compute_section_file_positions,
5493 coff_write_object_contents): ..
5494 * coffgen.c (make_a_section_from_file, coff_write_symbols,
5495 coff_section_symbol, build_debug_section): ..
5496 * cofflink.c (coff_link_add_symbols, _bfd_coff_final_link,
5497 process_embedded_commands, _bfd_coff_link_input_bfd,
5498 _bfd_coff_write_global_sym): ..
5499 * cpu-arm.c (bfd_arm_update_notes, bfd_arm_get_mach_from_notes): ..
5500 * cpu-ns32k.c (do_ns32k_reloc, _bfd_ns32k_final_link_relocate): ..
5501 * dwarf1.c (parse_line_table, _bfd_dwarf1_find_nearest_line): ..
5502 * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
5503 _bfd_dwarf2_find_nearest_line): ..
5504 * ecoff.c (bfd_debug_section, ecoff_set_symbol_info,
5505 ecoff_compute_section_file_positions,
5506 _bfd_ecoff_write_object_contents, ecoff_indirect_link_order): ..
5507 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame,
5508 _bfd_elf_discard_section_eh_frame_hdr,
5509 _bfd_elf_maybe_strip_eh_frame_hdr, _bfd_elf_eh_frame_section_offset,
5510 _bfd_elf_write_section_eh_frame,
5511 _bfd_elf_write_section_eh_frame_hdr): ..
5512 * elf-hppa.h (elf_hppa_sort_unwind): ..
5513 * elf-m10200.c (mn10200_elf_relax_section,
5514 mn10200_elf_relax_delete_bytes,
5515 mn10200_elf_get_relocated_section_contents): ..
5516 * elf-m10300.c (_bfd_mn10300_elf_create_got_section,
5517 mn10300_elf_check_relocs, mn10300_elf_relax_section,
5518 mn10300_elf_relax_delete_bytes,
5519 mn10300_elf_get_relocated_section_contents,
5520 _bfd_mn10300_elf_adjust_dynamic_symbol,
5521 _bfd_mn10300_elf_discard_copies,
5522 _bfd_mn10300_elf_size_dynamic_sections,
5523 _bfd_mn10300_elf_finish_dynamic_sections): ..
5524 * elf.c (_bfd_elf_print_private_bfd_data, bfd_elf_get_bfd_needed_list,
5525 _bfd_elf_make_section_from_phdr, elf_fake_sections,
5526 bfd_elf_set_group_contents, map_sections_to_segments,
5527 elf_sort_sections, assign_file_positions_for_segments,
5528 SECTION_SIZE, copy_private_bfd_data,
5529 _bfd_elf_get_dynamic_reloc_upper_bound,
5530 _bfd_elf_canonicalize_dynamic_reloc, elfcore_maybe_make_sect,
5531 _bfd_elfcore_make_pseudosection, elfcore_grok_prstatus,
5532 elfcore_grok_lwpstatus, elfcore_grok_win32pstatus,
5533 elfcore_grok_note, elfcore_grok_nto_status, elfcore_grok_nto_gregs,
5534 _bfd_elf_rel_local_sym, _bfd_elf_get_synthetic_symtab): ..
5535 * elf32-arm.h (bfd_elf32_arm_allocate_interworking_sect,
5536 bfd_elf32_arm_process_before_allocation,
5537 elf32_arm_adjust_dynamic_symbol, allocate_dynrelocs,
5538 elf32_arm_size_dynamic_sections, elf32_arm_finish_dynamic_sections,
5539 elf32_arm_write_section): ..
5540 * elf32-cris.c (cris_elf_grok_prstatus,
5541 elf_cris_finish_dynamic_sections, cris_elf_gc_sweep_hook,
5542 elf_cris_adjust_gotplt_to_got, elf_cris_adjust_dynamic_symbol,
5543 cris_elf_check_relocs, elf_cris_size_dynamic_sections,
5544 elf_cris_discard_excess_dso_dynamics,
5545 elf_cris_discard_excess_program_dynamics): ..
5546 * elf32-d30v.c (bfd_elf_d30v_reloc, bfd_elf_d30v_reloc_21): ..
5547 * elf32-dlx.c (_bfd_dlx_elf_hi16_reloc): ..
5548 * elf32-frv.c (_frvfdpic_add_dyn_reloc, _frvfdpic_add_rofixup,
5549 _frv_create_got_section, _frvfdpic_assign_plt_entries,
5550 elf32_frvfdpic_size_dynamic_sections,
5551 elf32_frvfdpic_modify_segment_map,
5552 elf32_frvfdpic_finish_dynamic_sections): ..
5553 * elf32-h8300.c (elf32_h8_relax_section, elf32_h8_relax_delete_bytes,
5554 elf32_h8_get_relocated_section_contents): ..
5555 * elf32-hppa.c (hppa_build_one_stub, hppa_size_one_stub,
5556 elf32_hppa_adjust_dynamic_symbol, allocate_plt_static,
5557 allocate_dynrelocs, elf32_hppa_size_dynamic_sections, group_sections,
5558 elf32_hppa_size_stubs, elf32_hppa_set_gp, elf32_hppa_build_stubs,
5559 elf32_hppa_finish_dynamic_sections): ..
5560 * elf32-i370.c (i370_elf_adjust_dynamic_symbol,
5561 i370_elf_size_dynamic_sections, i370_elf_check_relocs,
5562 i370_elf_finish_dynamic_sections): ..
5563 * elf32-i386.c (elf_i386_grok_prstatus, elf_i386_adjust_dynamic_symbol,
5564 allocate_dynrelocs, elf_i386_size_dynamic_sections,
5565 elf_i386_relocate_section, elf_i386_finish_dynamic_sections): ..
5566 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc,
5567 i860_howto_highadj_reloc, i860_howto_splitn_reloc): ..
5568 * elf32-ip2k.c (ip2k_is_switch_table_128,
5569 ip2k_relax_switch_table_128, ip2k_is_switch_table_256,
5570 ip2k_relax_switch_table_256, ip2k_elf_relax_section,
5571 adjust_all_relocations, ip2k_elf_relax_delete_bytes): ..
5572 * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc, m32r_elf_hi16_reloc,
5573 m32r_elf_generic_reloc, m32r_elf_adjust_dynamic_symbol,
5574 allocate_dynrelocs, m32r_elf_size_dynamic_sections,
5575 m32r_elf_relocate_section, m32r_elf_finish_dynamic_sections,
5576 m32r_elf_relax_section, m32r_elf_relax_delete_bytes,
5577 m32r_elf_get_relocated_section_contents): ..
5578 * elf32-m68hc11.c (m68hc11_elf_build_one_stub,
5579 m68hc11_elf_size_one_stub, m68hc11_elf_relax_section,
5580 m68hc11_elf_relax_delete_bytes): ..
5581 * elf32-m68hc12.c (m68hc12_elf_build_one_stub,
5582 m68hc12_elf_size_one_stub): ..
5583 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs,
5584 elf32_m68hc11_build_stubs, m68hc11_elf_special_reloc): ..
5585 * elf32-m68k.c (elf_m68k_check_relocs, elf_m68k_gc_sweep_hook,
5586 elf_m68k_adjust_dynamic_symbol, elf_m68k_size_dynamic_sections,
5587 elf_m68k_discard_copies, elf_m68k_finish_dynamic_sections): ..
5588 * elf32-mips.c (gprel32_with_gp, mips16_gprel_reloc,
5589 elf32_mips_grok_prstatus): ..
5590 * elf32-or32.c (or32_elf_consth_reloc): ..
5591 * elf32-ppc.c (ppc_elf_relax_section, ppc_elf_addr16_ha_reloc,
5592 elf_create_pointer_linker_section, ppc_elf_create_linker_section,
5593 ppc_elf_additional_program_headers, ppc_elf_adjust_dynamic_symbol,
5594 allocate_dynrelocs, ppc_elf_size_dynamic_sections,
5595 ppc_elf_finish_dynamic_sections, ppc_elf_grok_prstatus,
5596 ppc_elf_final_write_processing): ..
5597 * elf32-s390.c (s390_elf_ldisp_reloc, elf_s390_adjust_dynamic_symbol,
5598 allocate_dynrelocs, elf_s390_size_dynamic_sections,
5599 elf_s390_finish_dynamic_sections, elf_s390_grok_prstatus): ..
5600 * elf32-sh.c (sh_elf_reloc_loop, sh_elf_relax_section,
5601 sh_elf_relax_delete_bytes, sh_elf_align_loads,
5602 sh_elf_adjust_dynamic_symbol, allocate_dynrelocs,
5603 sh_elf_size_dynamic_sections, sh_elf_get_relocated_section_contents,
5604 sh_elf_finish_dynamic_sections, elf32_shlin_grok_prstatus): ..
5605 * elf32-sh64-com.c (sh64_address_in_cranges,
5606 sh64_get_contents_type): ..
5607 * elf32-sh64.c (sh64_find_section_for_address,
5608 sh64_elf_final_write_processing): ..
5609 * elf32-sparc.c (sparc_elf_wdisp16_reloc, sparc_elf_hix22_reloc,
5610 sparc_elf_lox10_reloc, elf32_sparc_adjust_dynamic_symbol,
5611 allocate_dynrelocs, elf32_sparc_size_dynamic_sections,
5612 elf32_sparc_relocate_section, elf32_sparc_finish_dynamic_sections): ..
5613 * elf32-v850.c (v850_elf_reloc, v850_elf_relax_section): ..
5614 * elf32-vax.c (elf_vax_check_relocs, elf_vax_adjust_dynamic_symbol,
5615 elf_vax_size_dynamic_sections, elf_vax_discard_copies,
5616 elf_vax_instantiate_got_entries, elf_vax_relocate_section,
5617 elf_vax_finish_dynamic_sections): ..
5618 * elf32-xstormy16.c (xstormy16_elf_24_reloc,
5619 xstormy16_elf_check_relocs, xstormy16_relax_plt_check,
5620 xstormy16_elf_relax_section, xstormy16_elf_always_size_sections,
5621 xstormy16_elf_finish_dynamic_sections): ..
5622 * elf32-xtensa.c (xtensa_read_table_entries,
5623 elf_xtensa_allocate_got_size, elf_xtensa_allocate_local_got_size,
5624 elf_xtensa_size_dynamic_sections, elf_xtensa_do_reloc,
5625 bfd_elf_xtensa_reloc, elf_xtensa_relocate_section,
5626 elf_xtensa_combine_prop_entries, elf_xtensa_finish_dynamic_sections,
5627 elf_xtensa_discard_info_for_section, elf_xtensa_grok_prstatus,
5628 get_relocation_opcode, retrieve_contents, find_relaxable_sections,
5629 collect_source_relocs, is_resolvable_asm_expansion, remove_literals,
5630 relax_section, shrink_dynamic_reloc_sections, relax_property_section,
5631 xtensa_callback_required_dependence): ..
5632 * elf64-alpha.c (elf64_alpha_reloc_gpdisp, elf64_alpha_relax_section,
5633 elf64_alpha_check_relocs, elf64_alpha_adjust_dynamic_symbol,
5634 elf64_alpha_calc_got_offsets_for_symbol, elf64_alpha_calc_got_offsets,
5635 elf64_alpha_size_plt_section, elf64_alpha_size_plt_section_1,
5636 elf64_alpha_always_size_sections, elf64_alpha_calc_dynrel_sizes,
5637 elf64_alpha_size_rela_got_section, elf64_alpha_size_rela_got_1,
5638 elf64_alpha_size_dynamic_sections, elf64_alpha_emit_dynrel,
5639 elf64_alpha_finish_dynamic_sections, elf64_alpha_final_link): ..
5640 * elf64-hppa.c (allocate_dynrel_entries,
5641 elf64_hppa_size_dynamic_sections,
5642 elf64_hppa_finish_dynamic_sections): ..
5643 * elf64-mips.c (mips_elf64_gprel32_reloc, mips16_gprel_reloc,
5644 mips_elf64_canonicalize_dynamic_reloc, mips_elf64_slurp_reloc_table,
5645 elf64_mips_grok_prstatus): ..
5646 * elf64-mmix.c (mmix_elf_perform_relocation, mmix_elf_reloc,
5647 mmix_elf_relocate_section, mmix_elf_final_link,
5648 mmix_set_relaxable_size, _bfd_mmix_after_linker_allocation,
5649 mmix_elf_relax_section, mmix_elf_get_section_contents): ..
5650 * elf64-ppc.c (ppc64_elf_object_p, ppc64_elf_grok_prstatus,
5651 ppc64_elf_check_relocs, ppc64_elf_func_desc_adjust,
5652 ppc64_elf_adjust_dynamic_symbol, ppc64_elf_edit_opd,
5653 allocate_dynrelocs, ppc64_elf_size_dynamic_sections,
5654 ppc_build_one_stub, ppc_size_one_stub, ppc64_elf_next_toc_section,
5655 toc_adjusting_stub_needed, group_sections, ppc64_elf_size_stubs,
5656 ppc64_elf_build_stubs, ppc64_elf_relocate_section,
5657 ppc64_elf_finish_dynamic_sections): ..
5658 * elf64-s390.c (s390_elf_ldisp_reloc, elf_s390_adjust_dynamic_symbol,
5659 allocate_dynrelocs, elf_s390_size_dynamic_sections,
5660 elf_s390_finish_dynamic_sections): ..
5661 * elf64-sh64.c (sh_elf64_get_relocated_section_contents,
5662 sh_elf64_check_relocs, sh64_elf64_adjust_dynamic_symbol,
5663 sh64_elf64_discard_copies, sh64_elf64_size_dynamic_sections,
5664 sh64_elf64_finish_dynamic_sections): ..
5665 * elf64-sparc.c (sparc64_elf_slurp_reloc_table, init_insn_reloc,
5666 sparc64_elf_check_relocs, sparc64_elf_adjust_dynamic_symbol,
5667 sparc64_elf_size_dynamic_sections, sparc64_elf_relocate_section,
5668 sparc64_elf_finish_dynamic_symbol,
5669 sparc64_elf_finish_dynamic_sections): ..
5670 * elf64-x86-64.c (elf64_x86_64_grok_prstatus,
5671 elf64_x86_64_adjust_dynamic_symbol, allocate_dynrelocs,
5672 elf64_x86_64_size_dynamic_sections, elf64_x86_64_relocate_section,
5673 elf64_x86_64_finish_dynamic_sections): ..
5674 * elfarm-nabi.c (elf32_arm_nabi_grok_prstatus): ..
5675 * elfcode.h (elf_slurp_reloc_table): ..
5676 * elflink.c (_bfd_elf_create_got_section, elf_add_dt_needed_tag,
5677 elf_finalize_dynstr, elf_link_add_object_symbols,
5678 bfd_elf_size_dynamic_sections, elf_link_sort_relocs,
5679 elf_link_input_bfd, bfd_elf_final_link, bfd_elf_discard_info): ..
5680 * elfn32-mips.c (gprel32_with_gp, mips16_gprel_reloc,
5681 elf32_mips_grok_prstatus): ..
5682 * elfxx-ia64.c (elfNN_ia64_relax_section, allocate_dynrel_entries,
5683 elfNN_ia64_size_dynamic_sections, elfNN_ia64_install_dyn_reloc,
5684 elfNN_ia64_choose_gp, elfNN_ia64_final_link,
5685 elfNN_ia64_finish_dynamic_sections): ..
5686 * elfxx-mips.c (mips_elf_create_procedure_table,
5687 mips_elf_check_mips16_stubs, _bfd_mips_elf_gprel16_with_gp,
5688 _bfd_mips_elf_hi16_reloc, _bfd_mips_elf_generic_reloc,
5689 mips_elf_global_got_index, mips_elf_multi_got,
5690 mips_elf_create_compact_rel_section, mips_elf_calculate_relocation,
5691 mips_elf_allocate_dynamic_relocations,
5692 mips_elf_create_dynamic_relocation, _bfd_mips_elf_fake_sections,
5693 _bfd_mips_relax_section, _bfd_mips_elf_adjust_dynamic_symbol,
5694 _bfd_mips_elf_always_size_sections,
5695 _bfd_mips_elf_size_dynamic_sections,
5696 _bfd_mips_elf_finish_dynamic_symbol,
5697 _bfd_mips_elf_finish_dynamic_sections,
5698 _bfd_mips_elf_modify_segment_map, _bfd_mips_elf_discard_info,
5699 _bfd_mips_elf_write_section, _bfd_mips_elf_set_section_contents,
5700 _bfd_elf_mips_get_relocated_section_contents,
5701 _bfd_mips_elf_final_link, _bfd_mips_elf_merge_private_bfd_data): ..
5702 * hp300hpux.c (callback): ..
5703 * hppabsd-core.c (make_bfd_asection): ..
5704 * hpux-core.c (make_bfd_asection): ..
5705 * i386linux.c (linux_link_create_dynamic_sections,
5706 bfd_i386linux_size_dynamic_sections, linux_finish_dynamic_link): ..
5707 * i386msdos.c (msdos_write_object_contents): ..
5708 * i386os9k.c (os9k_callback, os9k_write_object_contents,
5709 os9k_set_section_contents): ..
5710 * ieee.c (parse_expression, ieee_slurp_external_symbols,
5711 ieee_slurp_sections, ieee_slurp_debug, ieee_slurp_section_data,
5712 ieee_write_section_part, do_with_relocs, do_as_repeat,
5713 do_without_relocs, ieee_write_debug_part, init_for_output,
5714 ieee_set_section_contents): ..
5715 * ihex.c (ihex_scan, ihex_read_section, ihex_get_section_contents): ..
5716 * irix-core.c (do_sections, make_bfd_asection): ..
5717 * libaout.h (aout_section_merge_with_text_p): ..
5718 * libbfd.c (_bfd_generic_get_section_contents,
5719 _bfd_generic_get_section_contents_in_window): ..
5720 * linker.c (default_indirect_link_order): ..
5721 * lynx-core.c (make_bfd_asection): ..
5722 * m68klinux.c (linux_link_create_dynamic_sections,
5723 bfd_m68klinux_size_dynamic_sections, linux_finish_dynamic_link): ..
5724 * mach-o.c (bfd_mach_o_make_bfd_section,
5725 bfd_mach_o_scan_read_dylinker, bfd_mach_o_scan_read_dylib,
5726 bfd_mach_o_scan_read_thread, bfd_mach_o_scan_read_symtab,
5727 bfd_mach_o_scan_read_segment): ..
5728 * merge.c (_bfd_add_merge_section, record_section, merge_strings,
5729 _bfd_merge_sections): ..
5730 * mmo.c (mmo_find_sec_w_addr, mmo_get_spec_section, mmo_get_loc,
5731 mmo_map_set_sizes, mmo_canonicalize_symtab,
5732 mmo_internal_write_section, mmo_write_object_contents): ..
5733 * netbsd-core.c (netbsd_core_file_p): ..
5734 * nlm32-alpha.c (nlm_alpha_read_reloc, nlm_alpha_write_import,
5735 nlm_alpha_set_public_section): ..
5736 * nlm32-ppc.c (nlm_powerpc_read_reloc, nlm_powerpc_write_reloc): ..
5737 * nlm32-sparc.c (nlm_sparc_write_import): ..
5738 * nlmcode.h (add_bfd_section, nlm_swap_auxiliary_headers_in,
5739 nlm_compute_section_file_positions): ..
5740 * oasys.c (oasys_object_p, oasys_slurp_section_data,
5741 oasys_write_sections, oasys_write_data, oasys_set_section_contents): ..
5742 * opncls.c (get_debug_link_info): ..
5743 * osf-core.c (make_bfd_asection): ..
5744 * pdp11.c (some_aout_object_p, adjust_o_magic, adjust_z_magic,
5745 adjust_n_magic, adjust_sizes_and_vmas, squirt_out_relocs,
5746 final_link, aout_link_input_section): ..
5747 * peXXigen.c (_bfd_XXi_swap_sym_in, _bfd_XXi_swap_aouthdr_out,
5748 pe_print_idata, pe_print_edata, pe_print_pdata, pe_print_reloc): ..
5749 * pef.c (bfd_pef_make_bfd_section, bfd_pef_print_loader_section,
5750 bfd_pef_scan_start_address, bfd_pef_parse_symbols): ..
5751 * ppcboot.c (ppcboot_object_p, ppcboot_canonicalize_symtab): ..
5752 * ptrace-core.c (ptrace_unix_core_file_p): ..
5753 * reloc.c (bfd_perform_relocation, bfd_install_relocation,
5754 _bfd_final_link_relocate, bfd_generic_relax_section,
5755 bfd_generic_get_relocated_section_contents): ..
5756 * reloc16.c (bfd_coff_reloc16_relax_section,
5757 bfd_coff_reloc16_get_relocated_section_c): ..
5758 * riscix.c (riscix_some_aout_object_p): ..
5759 * rs6000-core.c (read_hdr, make_bfd_asection): ..
5760 * sco5-core.c (make_bfd_asection): ..
5761 * simple.c (bfd_simple_get_relocated_section_contents): ..
5762 * som.c (som_object_setup, setup_sections, som_prep_headers,
5763 som_write_fixups, som_begin_writing, bfd_section_from_som_symbol,
5764 som_set_reloc_info, som_get_section_contents,
5765 som_bfd_link_split_section): ..
5766 * sparclinux.c (linux_link_create_dynamic_sections,
5767 bfd_sparclinux_size_dynamic_sections, linux_finish_dynamic_link): ..
5768 * srec.c (srec_scan, srec_read_section, srec_get_section_contents): ..
5769 * stabs.c (_bfd_link_section_stabs, _bfd_discard_section_stabs,
5770 _bfd_write_stab_strings, _bfd_stab_section_offset): ..
5771 * sunos.c (sunos_read_dynamic_info, sunos_create_dynamic_sections,
5772 bfd_sunos_size_dynamic_sections, sunos_scan_std_relocs,
5773 sunos_scan_ext_relocs, sunos_scan_dynamic_symbol,
5774 sunos_write_dynamic_symbol, sunos_check_dynamic_reloc,
5775 sunos_finish_dynamic_link): ..
5776 * syms.c (_bfd_stab_section_find_nearest_line): ..
5777 * tekhex.c (first_phase, tekhex_set_section_contents,
5778 tekhex_write_object_contents): ..
5779 * trad-core.c (trad_unix_core_file_p): ..
5780 * versados.c (process_esd, process_otr, process_otr): ..
5781 * vms-gsd.c (_bfd_vms_slurp_gsd, _bfd_vms_write_gsd): ..
5782 * vms-misc.c (add_new_contents): ..
5783 * vms-tir.c (check_section, new_section, _bfd_vms_write_tir): ..
5784 * vms.c (vms_set_section_contents): ..
5785 * xcofflink.c (xcoff_get_section_contents, xcoff_link_add_symbols,
5786 xcoff_sweep, bfd_xcoff_size_dynamic_sections, xcoff_build_ldsyms,
5787 _bfd_xcoff_bfd_final_link, xcoff_link_input_bfd): ..
5788 * xsym.c (bfd_sym_scan): .. See above.
5789
bf8b15af
L
57902004-06-21 H.J. Lu <hongjiu.lu@intel.com>
5791
5792 * elfxx-ia64.c (elfNN_ia64_relax_section): Add addend when
5793 calling _bfd_merged_section_offset only for section symbols.
5794
d1c6de6f
AM
57952004-06-22 Alan Modra <amodra@bigpond.net.au>
5796
5797 * elf32-ppc.c (ppc_elf_relax_section): Implement reference code
5798 for handling SEC_MERGE symbols in relax_section.
5799
aa02cc63
AO
58002004-06-21 Alexandre Oliva <aoliva@redhat.com>
5801
5802 2003-05-15 Richard Sandiford <rsandifo@redhat.com>
5803 * cpu-h8300.c (compatible): Allow h8300s and h8300sx code to be
5804 linked together. Mark the result as h8300sx code.
5805
aee6f5b4
AO
58062004-06-21 Alexandre Oliva <aoliva@redhat.com>
5807
5808 * elf-bfd.h (struct elf_backend_data): Added
5809 elf_backend_omit_section_dynsym.
5810 (_bfd_elf_link_omit_section_dynsym): Declare.
5811 * elf32-frv.c (_frvfdpic_link_omit_section_dynsym): New.
5812 (elf_backend_omit_section_dynsym): Use it for frvfdpic.
5813 * elflink.c (_bfd_elf_link_omit_section_dynsym): Split out of...
5814 (_bfd_elf_link_renumber_dynsyms): ... this function.
5815 * elfxx-target.h (elf_backend_omit_section_dynsym): Default to
5816 _bfd_elf_link_omit_section_dynsym).
5817 (elfNN_bed): Added elf_backend_omit_section_dynsym.
5818
05576f10
NC
58192004-06-21 Nick Clifton <nickc@redhat.com>
5820
5821 * coffcode.h (styp_to_sec_flags): Ignore IMAGE_SCN_MEM_NOT_PAGED
5822 flags.
5823
02d5a37b
JG
58242004-06-17 Jerome Guitton <guitton@gnat.com>
5825
5826 * bfd-in.h (bfd_cache_close_all): New function declaration.
5827 * bfd-in2.h: Regenerate.
5828 * cache.c (bfd_cache_close_all): New function definition.
5829
d2bef492
MK
58302004-06-16 Mark Kettenis <kettenis@gnu.org>
5831
5832 * configure.in: Don't set COREFILE to trad-core.lo for FreeBSD
5833 4.10 and beyond.
5834 * configure: Regenerate.
5835
8528d62e
DJ
58362004-06-16 Daniel Jacobowitz <dan@debian.org>
5837
5838 * elf32-ppc.c (ppc_elf_create_linker_section): Create symbols in
5839 the pre-existing section.
5840
911d08a7
AM
58412004-06-15 Alan Modra <amodra@bigpond.net.au>
5842
5843 * section.c (struct sec): Remove usused flags. Reorganize a little.
5844 (bfd_get_section_size_before_reloc): Delete.
5845 (bfd_get_section_size_after_reloc): Delete.
5846 (STD_SECTION): Update.
5847 (bfd_get_section_size_now): Delete.
5848 (bfd_set_section_contents): Don't referece reloc_done.
5849 (bfd_get_section_contents): Remove reloc_done comment.
5850 * bout.c (b_out_bfd_get_relocated_section_contents): Don't set
5851 reloc_done.
5852 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Likewise.
5853 * ecoff.c (bfd_debug_section): Update initializer.
5854 * elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents): Ditto.
5855 * reloc.c (bfd_generic_get_relocated_section_contents): Likewise.
5856 * bfd-in.h (bfd_section_size): Expand.
5857 (bfd_get_section_size): New macro.
5858 * bfd-in2.h: Regenerate.
5859 * coff64-rs6000.c (xcoff64_write_object_contents): Replace
5860 bfd_get_section_size_before_reloc with bfd_get_section_size.
5861 * coffcode.h (coff_write_object_contents): Likewise.
5862 * coffgen.c (build_debug_section): Likewise.
5863 * dwarf1.c (parse_line_table): Likewise.
5864 (_bfd_dwarf1_find_nearest_line): Likewise.
5865 * ecoff.c (_bfd_ecoff_write_object_contents): Likewise.
5866 * i386msdos.c (msdos_write_object_contents): Likewise.
5867 * pdp11.c (squirt_out_relocs): Likewise.
5868 * elf32-sh64.c (sh64_find_section_for_address): Remove comment.
5869 * elf64-mmix.c (mmix_elf_final_link): Update comment.
5870
092dcd75
CD
58712004-06-14 Chris Demetriou <cgd@broadcom.com>
5872
5873 * elf32-mips.c (elf_mips_gnu_pcrel32): Add (undoing 2004-04-24
5874 removal) with updated comment.
5875 (bfd_elf32_bfd_reloc_type_lookup): Add back case for
5876 BFD_RELOC_32_PCREL.
5877 (mips_elf32_rtype_to_howto): Add back case for R_MIPS_PC32.
5878 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
5879
3ffa5234
AM
58802004-06-12 Alan Modra <amodra@bigpond.net.au>
5881
5882 * elf64-x86-64.c (elf64_x86_64_relocate_section): Ignore reloc
5883 overflow on branches to undefweaks.
5884
e9edc808
MR
58852004-06-11 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
5886
5887 * coff-alpha.c (alpha_relocate_section): Set used_by_bfd directly
5888 as ecoff_section_data() does not return a valid lvalue.
5889
a873f25a
AO
58902004-06-09 Alexandre Oliva <aoliva@redhat.com>
5891
a9b881be
AO
5892 * elflink.c (elf_sort_symbol): Compare section id, not pointers.
5893 (elf_link_add_object_symbols): Likewise.
5894
a873f25a
AO
5895 * elf-m10300.c (_bfd_mn10300_elf_reloc_type_class): New.
5896 (elf_backend_reloc_type_class): New.
5897
eef0f186
MK
58982004-06-08 Mark Kettenis <kettenis@gnu.org>
5899
5900 * configure.in (hppa*-*-netbsd*, hppa*-*-openbsd): Set COREFILE to
5901 netbsd-core.lo.
5902 * configure: Regenerate.
5903
822392ce
DJ
59042004-06-07 Daniel Jacobowitz <dan@debian.org>
5905
5906 From: Albert Chin-A-Young <china@thewrittenword.com>
5907 * bfd/elf-bfd.h (struct eh_cie_fde): Convert unsigned char bitfields
5908 to unsigned int.
5909
9f2e92c5
L
59102004-05-29 H.J. Lu <hongjiu.lu@intel.com>
5911
5912 * elfxx-ia64.c (elfNN_ia64_relax_section): Undo the last
5913 change.
5914
dd90f1b2
DD
59152004-05-28 DJ Delorie <dj@redhat.com>
5916
5917 * elf-m10300.c (mn10300_elf_relax_section): Preserve reloc addend
5918 for linking, but otherwise adjust reloc for merged sections.
5919
5dd23ec1
L
59202004-05-28 H.J. Lu <hongjiu.lu@intel.com>
5921
5922 * elfxx-ia64.c (elfNN_ia64_relax_section): Properly call
5923 _bfd_merged_section_offset for local symbols.
5924
f6f9408f
JR
59252004-05-28 Andrew Stubbs <andrew.stubbs@superh.com>
5926
5927 * Makefile.am: Regenerate dependencies.
5928 * Makefile.in: Regenerate.
5929 * archures.c: Add bfd_mach_sh3_nommu .
5930 * bfd-in2.h: Regenerate.
5931 * cpu-sh.c: Add sh3-nommu architecture.
5932 (bfd_to_arch_table): Create new table.
5933 (sh_get_arch_from_bfd_mach): Create new function.
5934 (sh_get_arch_up_from_bfd_mach): Create new function.
5935 (sh_merge_bfd_arch): Create new function.
5936 * elf32-sh.c (sh_ef_bfd_table): Add table.
5937 (sh_elf_check_relocs): Replace switch statement with
5938 use of sh_ef_bfd_table .
5939 (sh_elf_get_flags_from_mach): Add new function.
5940 (sh_find_elf_flags): Likewise.
5941 (sh_elf_copy_private_data): Replace most of non-elf contents
5942 with a call to sh_merge_bfd_arch() .
5943
d866f350
MC
59442004-05-27 Michael Chastain <mec.gnu@mindspring.com>
5945
5946 * Makefile.am (bfdver.h): Use explicit filename, not $< .
5947 * Makefile.in: Regenerate.
5948
1055df0f
AO
59492004-05-27 Alexandre Oliva <aoliva@redhat.com>
5950
5951 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Avoid
5952 custom calling conventions for dynamic symbols.
5953 (mn10300_elf_relax_section): Avoid relaxing a function as a local
5954 symbol if it's an alias to a global one.
5955
b3096250
L
59562004-05-26 H.J. Lu <hongjiu.lu@intel.com>
5957
5958 * elf.c (_bfd_elf_make_section_from_shdr): Undo the last
5959 change.
5960
9bb351fd
AO
59612004-05-27 Alexandre Oliva <aoliva@redhat.com>
5962
5963 * elf-m10300.c (mn10300_elf_relax_section): Don't test isym within
5964 loop over hashes.
5965
e49f5022
AM
59662004-05-26 Alan Modra <amodra@bigpond.net.au>
5967
5968 * elf.c (_bfd_elf_make_section_from_shdr): Don't set SEC_EXCLUDE
5969 for SHT_GROUP sections.
5970
57ceae94
AM
59712004-05-25 Alan Modra <amodra@bigpond.net.au>
5972
5973 * elflink.c (elf_link_add_object_symbols): Don't set up merge
5974 section data here..
5975 * elf.c (_bfd_elf_merge_sections): .. Do it here instead.
5976 * merge.c: Formatting. Remove unnecessary casts. Expand
5977 bfd_get_section_alignment macro.
5978 (struct sec_merge_sec_info): Rename "first" to "first_str". Update
5979 use throughout file.
5980 (_bfd_add_merge_section): Rename from _bfd_merge_section. Update
5981 comment. Abort on dynamic or non-SEC_MERGE input. Don't test
5982 section name to determine sinfo group, instead test output section
5983 and alignment.
5984 (_bfd_merge_sections): Add struct bfd_link_info param. Call
5985 _bfd_strip_section_from_output rather than just twiddling flags.
5986 * libbfd-in.h (_bfd_add_merge_section): Rename, update comment.
5987 (_bfd_merge_sections): Update prototype.
5988 * libbfd.h: Regenerate.
5989
c6f8758f 59902004-05-24 Mark Kettenis <kettenis@gnu.org>
d34436e8
MK
5991
5992 * netbsd-core.c: Correctly indent section that sets architecture
5993 from machine ID.
5994
c6f8758f
NC
5995 From Miod Vallat <miod@online.fr>:
5996 * m88kopenbsd.c: New file.
5997 * targets.c (m88k_openbsd_vec): New.
5998 * config.bfd: Add m88k-*-openbsd*.
5999 * configure.in (m88k-*-openbsd*): Set COREFILE to netbsd-core.lo.
6000 (m88kopenbsd_vec): New.
6001 * configure: Regenerate.
6002 * Makefile.am (BFD32_BACKENDS): Add m88kopenbsd.lo.
6003 (BFD32_BACKENDS_CFILES): Add m88kopenbsd.c.
6004 Run "make dep-am".
6005 * Makefile.in: Regenerate.
6006 * po/SRC-POTFILES.in: Regenerate.
6007
7d7e6bc4
NC
60082004-05-24 Nick Clifton <nickc@redhat.com>
6009
6010 * hash.c: Remove bogus node "Changing the default Hash Table Size"
6011 introduced by hash table size patch.
6012
bc286f95
BE
60132004-05-22 Ben Elliston <bje@au.ibm.com>
6014
6015 * configure.in (is_release): Remove.
6016 (bfd_version_date, bfd_version, bfd_version_string): Likewise.
6017 (AC_OUTPUT): Don't output bfdver.h from version.h.
6018 * configure: Regenerate.
6019 * Makefile.am (RELEASE): New variable.
6020 (bfdver.h): New target.
6021 * Makefile.in: Regenerate.
6022 * doc/Makefile.in: Likewise.
6023
8b89a4eb
BE
60242004-05-22 Ben Elliston <bje@au.ibm.com>
6025
6026 * Makefile.am (config.status): Don't depend on version.h.
6027 * Makefile.in: Regenerate.
6028
753731ee
AM
60292004-05-22 Alan Modra <amodra@bigpond.net.au>
6030
6031 * merge.c (_bfd_merged_section_offset): Remove "addend" param.
6032 * libbfd-in.h (_bfd_merged_section_offset): Adjust prototype.
6033 * libbfd.h: Regenerate.
6034 * elf.c (_bfd_elf_rela_local_sym): Adjust call.
6035 (_bfd_elf_rel_local_sym): Likewise.
6036 * elflink.c (_bfd_elf_link_sec_merge_syms): Likewise.
6037 (elf_link_input_bfd): Likewise.
6038 * elf32-ppc.c (ppc_elf_relax_section): Likewise.
6039 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
6040 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
6041 (elfNN_ia64_relocate_section): Likewise.
6042
2d643429
NC
60432004-05-21 Andy Chittenden <achittenden@bluearc.com>
6044
6045 * hash.c (bfd_default_hash_table_size): New variable.
6046 (bfd_hash_table_init): Use new variable instead of DEFAULT_SIZE.
6047 (bfd_hash_set_default_size): New function. Set the default size
6048 to a selected prime number close to the argument. Document new
6049 function.
6050 * bfd-in.h: Add prototype for bfd_hash_set_default_size.
6051 * bfd-in2.h: Regenerate.
6052 * Makefile.am (hash.lo): Add dependency upon libiberty.h.
6053 * Makefile.in: Regenerate.
6054
8377c19c
MK
60552004-05-21 Mark Kettenis <kettenis@gnu.org>
6056
6057 * libaout.h (machine_type): Add M_88K_OPENBSD and M_HPPA_OPENBSD.
6058 * netbsd-core.c (netbsd_core_file_p): Set architecture for alpha,
6059 arm, m68k, m88k and hppa core files.
6060
69fd4758
NC
60612004-05-21 Nick Clifton <nickc@redhat.com>
6062
6063 * bfdio.c (bfd_bread): Do not use iovec if it is NULL.
6064 (bfd_bwrite): Likewise.
6065 (bfd_tell): Likewise.
6066 (bfd_flush): Likewise.
6067 (bfd_stat): Likewise.
6068 (bfd_seek): Likewise.
6069 (bfd_get_mtime): Likewise.
6070 (bfd_get_size): Likewise.
6071
cd917290
BE
60722004-05-19 Ben Elliston <bje@au.ibm.com>
6073
6074 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Comment correction.
6075
1b09e940
NC
60762004-05-19 Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
6077
6078 * archive.c (_bfd_get_elt_at_filepos): Cope with a nested archives.
6079 (bfd_generic_openr_next_archived_file): Likewise.
6080
096c35a7
BW
60812004-05-17 Bob Wilson <bob.wilson@acm.org>
6082
6083 * elf32-xtensa.c (xtensa_get_property_section_name): Determine linkonce
6084 section names by inserting a new substring after .gnu.linkonce, except
6085 for .gnu.linkonce.t.* where the "t." is replaced.
6086
eea6121a 60872004-05-17 Adam Nemet <anemet@lnxw.com>
b2d65c0b
NC
6088
6089 * config.bfd (sparc-*-lynxos* case): Add to obsolete list.
6090 (m68-*-lynxos* case): Likewise.
6091 (powerpc-*-lyxnos* case): New case.
6092 (i[3-7]86-*-lynxos* case): Update to LynxOS 4.0 ELF.
6093
80fccad2
BW
60942004-05-17 David Heine <dlheine@tensilica.com>
6095
6096 * aout-target.h (MY_bfd_copy_private_header_data): Define.
6097 * aout-tic30.c (MY_bfd_copy_private_header_data): Define.
6098 * bfd.c (bfd_copy_private_header_data): Define.
6099 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Add entries for new
6100 interface.
6101 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
6102 * coffcode.h (coff_bfd_copy_private_header_data): Define.
6103 * elf-bfd.h (_bfd_elf_copy_private_header_data): Declare.
6104 * elf.c (_bfd_elf_copy_private_section_data): Remove code to set up
6105 segments by calling copy_private_bfd_data.
6106 (_bfd_elf_copy_private_header_data): Define.
6107 * elfxx-target.h (bfd_elfNN_bfd_copy_private_header_data): Define.
6108 * libbfd-in.h (_bfd_generic_bfd_copy_private_header_data): Define.
6109 * libecoff.h (_bfd_ecoff_bfd_copy_private_header_data): Define.
6110 * mach-o.c (bfd_mach_o_bfd_copy_private_header_data): Define.
6111 * mmo.c (mmo_bfd_copy_private_header_data): Define.
6112 * ppcboot.c (ppcboot_bfd_copy_private_header_data): Define.
6113 * som.c (som_bfd_copy_private_header_data): Define.
6114 * targets.c (BFD_JUMP_TABLE_COPY): Add _bfd_copy_private_header_data.
6115 * vms.c (vms_bfd_copy_private_header_data): Define.
6116 * bfd-in2.h: Regenerate.
6117 * libbfd.h: Regenerate.
6118
c5ae1840
TS
61192004-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6120
6121 * elfxx-mips.c (MINUS_TWO): Define.
6122 (mips_elf_higher, mips_elf_highest,
6123 mips_elf_create_dynamic_relocation): Use MINUS_ONE and MINUS_TWO for
6124 some bfd_vma values.
6125 (_bfd_mips_elf_finish_dynamic_symbol): Likewise. Code cleanup.
6126
a99cf92b
DA
61272004-05-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
6128
6129 * som.c (log2): Rename to exact_log2. Adjust all callers.
6130
0da76f83
NC
61312004-05-13 Paul Brook <paul@codesourcery.com>
6132
c273895f 6133 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Handle
336b9722
NC
6134 dwarf3 format CIE entries. Remove comment about the size of the
6135 ra_column field. It is now correctly deduced.
0da76f83 6136
4b363073
NC
61372004-05-13 Joel Sherrill <joel@oarcorp.com>
6138
6139 * config.bfd (or32-*-rtems*): Switch to elf.
6140
9598fbe5
NC
61412004-05-13 Nick Clifton <nickc@redhat.com>
6142
6143 * po/fr.po: Updated French translation.
6144
8c37241b
JJ
61452004-05-11 Jakub Jelinek <jakub@redhat.com>
6146
0306b3bf 6147 * elflink.c (bfd_elf_final_link): Don't output STT_SECTION symbol
8c37241b
JJ
6148 into .dynsym if elf_section_data (sec)->dynindx <= 0.
6149 Adjust counting of last_local.
6150 (_bfd_elf_link_renumber_dynsyms): Don't assign dynindx to sections
6151 other than SHT_PROGBITS/SHT_NOBITS and neither for .got/.got.plt/.plt
6152 created by the linker nor !SHF_ALLOC.
6153
6154 * elf32-i386.c (elf_i386_finish_dynamic_sections): Point
6155 DT_PLTGOT to the start of the .got.plt section instead of the
6156 .got output section. Set sh_entsize for .got section in addition
6157 to .got.plt.
6158 (elf_i386_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_
6159 is at sgot->output_section->vma.
6160 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Point
6161 DT_PLTGOT to the start of the .got.plt section instead of the
6162 .got output section.
6163 (elf64_x86_64_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_
6164 is at sgot->output_section->vma. Set sh_entsize for .got section
6165 in addition to .got.plt.
6166 * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_RELRO.
6167 (bfd_section_from_phdr): Likewise.
6168 (map_sections_to_segments): Likewise.
6169 (assign_file_positions_for_segments): Likewise.
6170 (get_program_header_size): Likewise.
6171 * elflink.c (bfd_elf_size_dynamic_sections): Set
6172 elf_tdata (output_bfd)->relro from info->relro.
6173 * elf-bfd.h (struct elf_obj_tdata): Add relro field.
6174
3f980e41
AO
61752004-05-08 Alexandre Oliva <aoliva@redhat.com>
6176
6177 * elf32-frv.c (_frvfdpic_add_dyn_reloc): Don't warn when we get
6178 a zero symndx for which we hadn't accounted a dynamic relocation.
6179 (_frvfdpic_add_rofixup): Likewise.
6180
d70270c5 61812004-05-07 Brian Ford <ford@vss.fsi.com>
eea6121a 6182 DJ Delorie <dj@redhat.com>
d70270c5
BF
6183
6184 * coffcode.h (coff_write_object_contents) [COFF_IMAGE_WITH_PE]:
6185 Propagate IMAGE_FILE_LARGE_ADDRESS_AWARE.
6186 * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Recognize
6187 IMAGE_FILE_LARGE_ADDRESS_AWARE. Use PE defines.
6188
7e9f3bd6
AO
61892004-05-07 Alexandre Oliva <aoliva@redhat.com>
6190
6191 * elf32-frv.c (elf32_frvfdpic_modify_segment_map): Return
6192 immediately if there's no link info.
6193 (elf32_frvfdpic_copy_private_bfd_data): New.
6194 (bfd_elf32_bfd_copy_private_bfd_data): Use it for frvfdpic.
6195
eb61d2d6
ZW
61962004-05-06 Zack Weinberg <zack@codesourcery.com>
6197
6198 * dwarf2.c (add_line_info): Also set info->filename to NULL if
6199 filename argument is null; do not call strlen on a null pointer.
6200
ecb2d096
DJ
62012004-05-06 Daniel Jacobowitz <drow@mvista.com>
6202
6203 * elf32-arm.h (elf32_arm_relocate_section): Remove R_ARM_PLT32
6204 special case.
6205
43850d5b
AO
62062004-05-05 Alexandre Oliva <aoliva@redhat.com>
6207
6208 * configure.in (bfd_elf32_frvfdpic_vec): New.
6209 * configure: Rebuilt.
6210 * targets.c (bfd_elf32_frvfdpic_vec): New.
6211 * config.bfd: Enable it on frv-*-elf and frv-*-*linux*, as default
6212 on the latter.
6213 * elf32-frv.c: Prefix all identifiers added for FDPIC support with
6214 frvfdpic instead of frv. Rearrange elf-target macros such that
6215 the FDPIC-specific ones are only defined for this new target
6216 vector.
6217 (bfd_elf32_frvfdpic_vec): Declare.
6218 (IS_FDPIC): New.
6219 (elf32_frv_relocate_section): Use it to enable segment checking
6220 and to control rofixup emission. Add output section vma to
6221 applied relocation in non-LOAD non-ALLOC sections. Use
6222 _bfd_error_handler for errors.
6223 (_frv_create_got_section): Create .rel.got and .rofixup only in
6224 FDPIC. Create non-dynamic _gp at .got+2048 in non-FDPIC, like the
6225 linker script.
6226 (elf32_frvfdpic_size_dynamic_sections): Assume FDPIC.
6227 (elf32_frvfdpic_modify_segment_map): Likewise.
6228 (elf32_frv_finish_dynamic_sections): New, do-nothing.
6229 (elf32_frvfdpic_finish_dynamic_sections): Assume FDPIC. Improve
6230 error message if we miscompute the rofixup size.
6231 (frvfdpic_elf_use_relative_eh_frame): Assume FDPIC.
6232 (frvfdpic_elf_encode_eh_address): Likewise.
6233 (elf32_frv_check_relocs): Reject FDPIC-only relocs in non-FDPIC.
6234 Record relocs only in FDPIC. Make sure _gp is defined for GPREL
6235 relocs. Reject unknown relocation types.
6236 (elf32_frv_object_p): Make sure target vector matches FDPIC bits.
6237 (frv_elf_merge_private_bfd_data): Likewise.
6238 (ELF_MAXPAGESIZE): Revert to 0x1000 for elf32-frv; keep it as
6239 0x4000 for newly-added elf32-frvfdpic.
6240
06fc8a8c
NC
62412004-05-05 Nick Clifton <nickc@redhat.com>
6242
6243 PR/136
6244 * cache.c (bfd_cache_lookup_worker): Call abort() rather than
6245 returning NULL as most users of this function do not check its
6246 return value.
33216455
NC
6247 * hppabsd-core.c (hppabsd_core_core_file_p): Do not check result
6248 of bfd_cache_lookup().
6249 * sco5-core.c (sco5_core_file_p): Likewise.
6250 * trad-core.c (trad_unix_core_file_p): Likewise.
06fc8a8c
NC
6251
62522004-05-05 Nick Clifton <nickc@redhat.com>
6253
6254 * cache.c (bfd_cache_lookup): Improve formatting.
6255 * archive.c: Fix formatting.
6256
6b6e92f4
NC
62572004-05-05 Peter Barada <peter@the-baradas.com>
6258
6259 * bfd_archures.c(bfd_architecture): Add 521x,5249,547x,548x.
6260 * cpu-m68k.c(bfd_m68k_arch): Likewise.
6261 * bfd-in2.h(bfd_architecture): Regenerate.
6262
6a8d1586
AM
62632004-05-03 Alan Modra <amodra@bigpond.net.au>
6264
6265 * elf.c (_bfd_elf_rela_local_sym): Set kept_section for excluded
6266 SEC_MERGE sections.
6267 * elflink.c (elf_link_input_bfd): Adjust output reloc index for
6268 those against discarded link-once and SEC_MERGE section symbols.
6269
fafe6678
L
62702004-05-02 H.J. Lu <hongjiu.lu@intel.com>
6271
6272 * section.c (bfd_get_section_by_name_if): New.
6273 * bfd-in2.h: Regenerated.
6274
ad7b9a36
AM
62752004-05-02 Alan Modra <amodra@bigpond.net.au>
6276
6277 * som.c (som_bfd_is_group_section): Define.
6278
73499ab8
AM
62792004-05-01 Alan Modra <amodra@bigpond.net.au>
6280
6281 * section.c (bfd_make_section_anyway): Copy the whole
6282 bfd_hash_entry, not just "next" from existing entry.
6283
45c5e9ed
L
62842004-04-30 H.J. Lu <hongjiu.lu@intel.com>
6285
6286 * elf.c (bfd_section_from_shdr): Maintain the section order in
6287 a section group.
6288 (special_sections): Add ".note.GNU-stack".
6289 (elf_fake_sections): Handle section group for relocatable
6290 link..
6291
bc87dd2e
L
62922004-04-30 H.J. Lu <hongjiu.lu@intel.com>
6293
6294 * section.c (bfd_sections_find_if): New.
6295 * bfd-in2.h: Regenerated.
6296
72adc230
AM
62972004-04-30 Alan Modra <amodra@bigpond.net.au>
6298
6299 * section.c (bfd_make_section_anyway): Add all sections to hash tab.
6300
6301 * elf-bfd.h (bfd_elf_is_group_section): Declare.
6302 * elf.c (bfd_elf_is_group_section): New function.
6303 * elfxx-target.h (bfd_elfNN_bfd_is_group_section
6304 * section.c (bfd_generic_is_group_section): New function.
6305 * targets.c (struct bfd_target): Add _bfd_is_group_section field.
6306 (BFD_JUMP_TABLE_LINK): Adjust.
6307 * aout-adobe.c (aout_32_bfd_is_group_section): Define.
6308 * aout-target.h (MY_bfd_is_group_section): Define.
6309 * aout-tic30.c (MY_bfd_is_group_section): Define.
6310 * bfd.c (bfd_is_group_section): Define.
6311 * binary.c (binary_bfd_is_group_section): Define.
6312 * bout.c (b_out_bfd_is_group_section): Define.
6313 * coff-alpha.c (_bfd_ecoff_bfd_is_group_section): Define.
6314 * coff-mips.c (_bfd_ecoff_bfd_is_group_section): Define.
6315 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Adjust.
6316 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Adjust.
6317 * coffcode.h (coff_bfd_is_group_section): Define.
6318 * i386msdos.c (msdos_bfd_is_group_section): Define.
6319 * i386os9k.c (os9k_bfd_is_group_section): Define.
6320 * ieee.c (ieee_bfd_is_group_section): Define.
6321 * ihex.c (ihex_bfd_is_group_section): Define.
6322 * libbfd-in.h (_bfd_nolink_bfd_is_group_section): Define.
6323 * mach-o.c (bfd_mach_o_bfd_is_group_section): Define.
6324 * mmo.c (mmo_bfd_is_group_section): Define.
6325 * nlm-target.h (nlm_bfd_is_group_section): Define.
6326 * oasys.c (oasys_bfd_is_group_section): Define.
6327 * pef.c (bfd_pef_bfd_is_group_section): Define.
6328 * ppcboot.c (ppcboot_bfd_is_group_section): Define.
6329 * srec.c (srec_bfd_is_group_section): Define.
6330 * tekhex.c (tekhex_bfd_is_group_section): Define.
6331 * versados.c (versados_bfd_is_group_section): Define.
6332 * vms.c (vms_bfd_is_group_section): Define.
6333 * xsym.c (bfd_sym_bfd_is_group_section): Define.
6334 * bfd-in2.h: Regenerate.
6335 * libbfd.h: Regenerate.
6336
20f0a1ad
AM
63372004-04-30 Alan Modra <amodra@bigpond.net.au>
6338
6339 * elflink.c (elf_gc_mark): Follow indirect and warning syms.
6340
f7458fc9 63412004-04-30 Hans-Peter Nilsson <hp@axis.com>
7dfb3b6b
HPN
6342
6343 * configure.in: Update version to 2.15.91.
6344 * configure: Regenerate.
6345
8a7140c3
NC
63462004-04-29 Brian Ford <ford@vss.fsi.com>
6347
6348 * bfd.c (bfd_get_sign_extend_vma): Add pe[i]-i386 case to DJGPP hack.
6349 * coffcode.h (DOT_DEBUG, GNU_LINKONCE_WI): Define.
6350 [!COFF_WITH_PE] (sec_to_styp_flags, styp_to_sec_flags): Use them.
6351 (coff_compute_section_file_positions) [RS6000COFF_C]: Likewise.
6352 [COFF_WITH_PE] (sec_to_styp_flags): Handle DWARF 2/3 .debug* and
6353 .gnu.linkonce.wi. sections.
6354 * pe-i386.c (COFF_SUPPORT_GNU_LINKONCE): Define.
6355 (COFF_SECTION_ALIGNMENT_ENTRIES): Add entries for .debug and
6356 .gnu.linkonce.wi..
6357 * pei-i386.c (COFF_SUPPORT_GNU_LINKONCE): Likewise.
6358 (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
6359
3e722fb5
CD
63602004-04-28 Chris Demetriou <cgd@broadcom.com>
6361
6362 * reloc.c: Remove BFD_RELOC_PCREL_HI16_S and BFD_RELOC_PCREL_LO16.
6363 * bfd-in2.h: Regenerate.
6364 * libbfd.h: Likewise.
6365
351e2b5a
DA
63662004-04-28 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
6367
6368 * som.c (struct som_misc_symbol_info): Add is_comdat, is_common and
6369 dup_common fields.
6370 (setup_sections): Use som_subspace_dictionary_record struct instead
6371 subspace_dictionary_record. Set SEC_LINK_ONCE if subspace is
6372 is_comdat, is_common or dup_common.
6373 (som_prep_headers): Use som_subspace_dictionary_record struct. Set
6374 is_comdat, is_common and dup_common in section subspace_dict from
6375 copy_data.
6376 (som_begin_writing): Use som_subspace_dictionary_record struct.
6377 (som_finish_writing): Likewise.
6378 (som_bfd_derive_misc_symbol_info): Add support to set is_comdat,
6379 is_common and dup_common flags in info for symbol. Add comment
6380 regarding linker support for these fields. Slightly reorganize
6381 function.
6382 (som_build_and_write_symbol_table): Set is_comdat, is_common and
6383 dup_common fields in symbol table from symbol info.
6384 (bfd_som_set_subsection_attributes): Add comdat, common and dup_common
6385 arguments. Set corresponding fields in copy_data. Change all callers.
6386 (som_bfd_ar_write_symbol_stuff): Set dup_common flag in library
6387 symbol table.
6388 (som_vec): Add SEC_LINK_ONCE to applicable section flags.
6389 * som.h (som_subspace_dictionary_record): Define.
6390 (som_copyable_section_data_struct): Add is_comdat, is_common and
6391 dup_common fields.
6392 (som_section_data_struct): Use som_subspace_dictionary_record struct
6393 instead of subspace_dictionary_record.
6394 (bfd_boolean bfd_som_set_subsection_attributes): Adjust prototype.
6395
3ba3bc8c
BW
63962004-04-27 Bob Wilson <bob.wilson@acm.org>
6397
6398 * elf32-xtensa.c (xtensa_read_table_entries): Use section _cooked_size
6399 if set. Check reloc_done flag before applying relocations. Use
6400 output addresses, both when applying relocations and when comparing
6401 against the specified section.
6402 (elf_xtensa_relocate_section): Use output address to check if dynamic
6403 reloc is in a literal pool. Set section's reloc_done flag.
6404
beb8df56
L
64052004-04-27 H.J. Lu <hongjiu.lu@intel.com>
6406
6407 * elf32-sh64.c (elf_backend_section_flags): New. Defined.
6408 (sh64_elf_set_mach_from_flags): Remove the kludge for .cranges
6409 section.
6410 (sh64_elf_section_flags): New. Set SEC_DEBUGGING for .cranges
6411 section.
6412
1829f4b2
AM
64132004-04-27 Alan Modra <amodra@bigpond.net.au>
6414
6415 * elf64-alpha.c (elf64_alpha_read_ecoff_info): Don't assign
6416 structure field removed in 2004-04-24 patch.
6417 * elf64-sparc.c (sparc64_elf_plt_sym_val): Warning fix.
6418
6419 * elf-bfd.h (struct elf_backend_data <elf_backend_section_flags>):
6420 Constify hdr arg.
6421 * elf32-arm.h (elf32_arm_section_flags): Likewise.
6422 * elf64-alpha.c (elf64_alpha_section_flags): Likewise.
6423 * elfxx-ia64.c (elfNN_ia64_section_flags): Likewise.
6424 * elf.c (_bfd_elf_make_section_from_shdr): Set the bfd_section
6425 field before calling elf_backend_section_flags.
6426
4030e8f6
CD
64272004-04-24 Chris Demetriou <cgd@broadcom.com>
6428
6429 * elf32-mips.c (elf_mips_gnu_rel_hi16, elf_mips_gnu_rel_lo16)
6430 (elf_mips_gnu_pcrel64, elf_mips_gnu_pcrel32): Remove.
6431 (bfd_elf32_bfd_reloc_type_lookup): Remove cases for
6432 BFD_RELOC_PCREL_HI16_S, BFD_RELOC_PCREL_LO16, BFD_RELOC_64_PCREL,
6433 and BFD_RELOC_32_PCREL.
6434 (mips_elf32_rtype_to_howto): Remove cases for R_MIPS_GNU_REL_HI16,
6435 R_MIPS_GNU_REL_LO16, R_MIPS_PC64, R_MIPS_PC32.
6436 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
6437 (_bfd_mips_elf_lo16_reloc): Remove handling for R_MIPS_GNU_REL_HI16.
6438 (mips_elf_next_relocation): Move comment about matching HI/LO
6439 relocations to...
6440 (_bfd_mips_elf_relocate_section): Here. Remove handling for
6441 R_MIPS_GNU_REL_HI16.
6442
3e27568f
CD
64432004-04-23 Chris Demetriou <cgd@broadcom.com>
6444
6445 * coff-mips.c (mips_relhi_reloc, mips_rello_reloc)
6446 (mips_switch_reloc, mips_read_relocs, mips_relax_section)
6447 (mips_relax_pcrel16, PCREL16_EXPANSION_ADJUSTMENT): Remove.
6448 (mips_relocate_hi): Remove now-unused 'adjust' and 'pcrel' arguments,
6449 and update comments to reflect current usage.
6450 (mips_howto_table): Remove entries for MIPS_R_RELHI, MIPS_R_RELLO,
6451 and MIPS_R_SWITCH, as well as several empty entries. Update comment
6452 for MIPS_R_PCREL16.
6453 (mips_ecoff_swap_reloc_in, mips_ecoff_swap_reloc_out)
6454 (mips_adjust_reloc_out, mips_bfd_reloc_type_lookup): Remove support
6455 for MIPS_R_SWITCH, MIPS_R_RELLO, and MIPS_R_RELHI relocations.
6456 (mips_adjust_reloc_in): Likewise, adjust maximum accepted relocation
6457 type number to be MIPS_R_PCREL16.
6458 (mips_relocate_section): Remove support for link-time relaxation
6459 of branches used by embedded-PIC. Remove support for MIPS_R_SWITCH,
6460 MIPS_R_RELLO, and MIPS_R_RELHI relocations.
6461 (_bfd_ecoff_bfd_relax_section): Redefine to bfd_generic_relax_section.
6462 * ecoff.c (ecoff_indirect_link_order): Remove support for link-time
6463 relaxation of branches used by embedded-PIC.
6464 * ecofflink.c (bfd_ecoff_debug_accumulate): Likewise.
6465 * libecoff.h (struct ecoff_section_tdata): Remove embedded-PIC
6466 related members, update comment.
6467 * pe-mips.c: Remove disabled (commented-out and #if 0'd)
6468 code related to embedded-PIC.
6469 * elfxx-mips.c (_bfd_mips_elf_read_ecoff_info): Remove
6470 initialization of now-removed 'adjust' member of
6471 'struct ecoff_debug_info'.
6472
b32de0bc 64732004-04-23 Chris Demetriou <cgd@broadcom.com>
8472310d
CD
6474
6475 * elfxx-mips.c (mips_elf_get_global_gotsym_index): Remove.
6476
955af222
PB
64772004-04-21 Philip Blundell <pb@nexus.co.uk>
6478
6479 * elf32-arm.h (elf32_arm_check_relocs): Don't output REL32
6480 relocs for locally defined symbols during -shared final link.
6481 (elf32_arm_final_link_relocate): Likewise.
6482
47a9f7b3
JJ
64832004-04-22 Jakub Jelinek <jakub@redhat.com>
6484
6485 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Copy also
6486 ELF_LINK_POINTER_EQUALITY_NEEDED.
6487 (elf64_x86_64_check_relocs): Set ELF_LINK_POINTER_EQUALITY_NEEDED
6488 if r_type is not R_X86_64_PC32.
6489 (elf64_x86_64_finish_dynamic_symbol): If
6490 ELF_LINK_POINTER_EQUALITY_NEEDED is not set, clear st_value of
6491 SHN_UNDEF symbols.
6492
1f1799d5
KK
64932004-04-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6494
6495 * elf32-sh.c (sh_elf_plt_sym_val): New function.
6496 (elf_backend_plt_sym_val): Define.
6497
0fdea5ce
AC
64982004-04-22 Andrew Cagney <cagney@redhat.com>
6499
6500 * opncls.c (bfd_alloc): Fix type of "wanted" in doco.
6501
5198ba8b
DA
65022004-04-22 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
6503
eb61d2d6 6504 * hpux-core.c (hpux_core_core_file_p): Add cast in call to
5198ba8b
DA
6505 make_bfd_asection.
6506 * som.c (som_set_section_contents): Constantify second argument.
6507 (hppa_som_gen_reloc_type): Abort for unsupported selectors.
6508 (som_object_setup): Rework to avoid warning.
6509 (setup_sections, som_write_fixups, bfd_section_from_som_symbol):
6510 Likewise.
6511
fe2e161a
AC
65122004-04-22 Andrew Cagney <cagney@redhat.com>
6513
6514 * cache.c (bfd_cache_close): Check for a previously closed file.
6515
4c45e5c9
JJ
65162004-04-22 Jakub Jelinek <jakub@redhat.com>
6517
6518 * bfd.c (bfd_get_synthetic_symtab): Define.
6519 * targets.c (BFD_JUMP_TABLE_DYNAMIC): Add
6520 NAME##_get_synthetic_symtab.
6521 (struct bfd_target): Add _bfd_get_synthetic_symtab.
6522 * libbfd-in.h (_bfd_nodynamic_get_synthetic_symtab): Define.
6523 * elf-bfd.h (struct elf_backend_data): Add plt_sym_val and
6524 relplt_name fields.
6525 (_bfd_elf_get_synthetic_symtab): New prototype.
6526 * elfcode.h (elf_get_synthetic_symtab): Define.
6527 * elf.c (_bfd_elf_get_synthetic_symtab): New function.
6528 * elfxx-target.h (bfd_elfNN_get_synthetic_symtab): Define.
6529 (elf_backend_plt_sym_val, elf_backend_relplt_name): Define.
6530 (elfNN_bed): Add elf_backend_plt_sym_val and elf_backend_relplt_name.
6531 * bfd-in2.h: Rebuilt.
6532 * libbfd.h: Rebuilt.
6533 * elf32-i386.c (elf_i386_plt_sym_val): New function.
6534 (elf_backend_plt_sym_val): Define.
6535 * elf64-x86-64.c (elf64_x86_64_plt_sym_val): New function.
6536 (elf_backend_plt_sym_val): Define.
6537 * elf32-s390.c (elf_s390_plt_sym_val): New function.
6538 (elf_backend_plt_sym_val): Define.
6539 * elf64-s390.c (elf_s390_plt_sym_val): New function.
6540 (elf_backend_plt_sym_val): Define.
6541 * elf32-sparc (elf32_sparc_plt_sym_val): New function.
6542 (elf_backend_plt_sym_val): Define.
6543 * elf64-sparc.c (sparc64_elf_plt_sym_val): New function.
6544 (elf_backend_plt_sym_val): Define.
6545 * elf32-ppc.c (ppc_elf_plt_sym_val): New function.
6546 (elf_backend_plt_sym_val): Define.
6547 * aout-target.h (MY_get_synthetic_symtab): Define.
6548 * aout-tic30.c (MY_get_synthetic_symtab): Define.
6549 * coff-rs6000.c (rs6000coff_vec): Add
6550 _bfd_nodynamic_get_synthetic_symtab.
6551 (pmac_xcoff_vec): Likewise.
6552 * coff64-rs6000.c (rs6000coff64_vec): Add
6553 _bfd_nodynamic_get_synthetic_symtab.
6554 (aix5coff64_vec): Likewise.
6555 * sunos.c (MY_get_synthetic_symtab): Define.
6556 * vms.c (vms_get_synthetic_symtab): Define.
6557
d2f7ecac
NC
65582004-04-22 Nick Clifton <nickc@redhat.com>
6559
6560 * bfd.c (bfd_archive_filename): Return NULL on NULL input.
6561
fd99574b
NC
65622004-04-22 Peter Barada <peter@the-baradas.com>
6563
6564 * archures.c: Add bfd_mach_mcfv4e to bfd_architecture.
6565 * bfd2-in.h: Regenerate.
6566 * cpu-m68k.c: Add 'm68k:mcfv4e' to arch_info_struct[].
6567
23867d67
CD
65682004-04-21 Chris Demetriou <cgd@broadcom.com>
6569
6570 * coff-mips.c (bfd_mips_ecoff_create_embedded_relocs): Remove.
6571 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Remove.
6572 * bfd-in.h (bfd_mips_ecoff_create_embedded_relocs)
6573 (bfd_mips_elf32_create_embedded_relocs): Remove prototypes
6574 * bfd-in2.h: Regenerate.
6575
2c8c90bc
BW
65762004-04-21 Bob Wilson <bob.wilson@acm.org>
6577
6578 * elf32-xtensa.c (is_same_value): Add final_static_link argument and
6579 require relocations against a weak symbol to reference the same
6580 symbol hash entry if not a final, static link.
6581 (get_cached_value, add_value_map): Add final_static_link argument.
6582 (remove_literals): Pass final_static_link argument as needed.
6583
40838a72
AC
65842004-04-21 Andrew Cagney <cagney@redhat.com>
6585
6586 * opncls.c (_bfd_new_bfd_contained_in): Copy "iovec".
6587 (struct opncls, opncls_btell, opncls_bseek, opncls_bread)
6588 (opncls_bwrite, opncls_bclose, opncls_bflush)
6589 (opncls_bstat, opncls_iovec, bfd_openr_iovec): Implement a
6590 bfd iovec that uses function callbacks.
6591 (bfd_close): Use the iovec's bclose.
6592 * cache.c (cache_btell, cache_bseek, cache_bread, cache_bwrite)
6593 (cache_bclose, cache_bflush, cache_bstat)
6594 (cache_iovec): New functions and global variable, implement a
6595 cache "iovec", where applicable set bfd_error.
6596 (bfd_cache_init, bfd_cache_close): Set/test the bfd's iovec.
6597 * bfdio.c (struct bfd_iovec): Define.
6598 (real_read): Delete function.
6599 (bfd_bread, bfd_bread, bfd_bwrite, bfd_tell, bfd_flush, bfd_stat)
6600 (bfd_seek, bfd_get_mtime, bfd_get_size): Use the bfd's "iovec",
6601 assume that bread and bwrite set bfd_error.
6602 * bfd.c (struct bfd): Add "iovec", update comments.
6603 * bfd-in2.h, libbfd.h: Re-generate.
6604
7f919c84
AC
66052004-04-21 Andrew Cagney <cagney@redhat.com>
6606
6607 * libaout.h (enum machine_type): Add M_POWERPC_NETBSD.
6608
715df9b8
EB
66092004-04-21 Eric Botcazou <ebotcazou@act-europe.fr>
6610
6611 * elflink.c (elf_gc_mark_dynamic_ref_symbol): New function.
6612 (bfd_elf_gc_sections): Fail if a shared object is being created.
6613 Do not fail if dynamic sections have been created. Instead call
6614 elf_gc_mark_dynamic_ref_symbol to mark sections that contain
6615 dynamically referenced symbols. Do not mark the whole graph
6616 rooted at .eh_frame, only the section proper.
6617
6482c264
NC
66182004-04-20 DJ Delorie <dj@redhat.com>
6619
6620 * reloc.c: Add BFD_RELOC_32_SECREL.
6621 * bfd-in2.h: Regenerate.
6622 * libbfd.h: Likewise.
6623 * coff-i386.c (howto_table) [COFF_WITH_PE]: Add R_SECREL32.
6624 (coff_i386_rtype_to_howto) [COFF_WITH_PE]: Handle it.
6625 (coff_i386_reloc_type_lookup) [COFF_WITH_PE]: Likewise.
6626
4dc570c2
JJ
66272004-04-19 Jakub Jelinek <jakub@redhat.com>
6628
6629 * elf32-sparc.c (elf32_sparc_relocate_section): Handle
6630 relocs against hidden/protected undefweak symbols properly.
6631 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
6632
0b60d5d3
MK
66332004-04-18 Mark Kettenis <kettenis@gnu.org>
6634
6635 * libaout.h (enum machine_type): Add M_POWERPC_NETBSD.
6636 * netbsd-core.c (netbsd_core_file_p): Set architecture for PowerPC
6637 core files.
6638
d48bdb99
AM
66392004-04-17 Brian Ford <ford@vss.fsi.com>
6640
6641 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Use the first non-zero
6642 filepos for the SizeOfHeaders field.
6643 (_bfd_XXi_swap_scnhdr_out): Correct section flags lossage on reloc
6644 overflow.
6645 (_bfd_XXi_swap_sym_in): Remove redundant section flags assignment.
6646
57a1784e
AM
66472004-04-16 Alan Modra <amodra@bigpond.net.au>
6648
6649 * simple.c (bfd_simple_get_relocated_section_contents): Don't
6650 change reloc_done. Set and restore _cooked_size.
6651 (RETURN): Delete.
6652
d1ad3f6f
MK
66532004-04-15 Mark Kettenis <kettenis@gnu.org>
6654
6655 * netbsd-core.c (netbsd_core_file_p): Set architecture for VAX
6656 core files.
6657
3d1bca9d
NC
66582004-04-15 Nick Clifton <nickc@redhat.com>
6659
6660 * bfd.c (bfd_archive_filename): Catch NULL bfd pointers.
6661
019b892f
AM
66622004-04-15 Alan Modra <amodra@bigpond.net.au>
6663
6664 * elf64-sparc.c (sparc64_elf_check_relocs): Fix thinko last change.
6665
15b43f48
AM
66662004-04-15 H.J. Lu <hongjiu.lu@intel.com>
6667
6668 * elflink.c (_bfd_elf_merge_symbol): Treat weak as strong only
6669 when it is a definition.
6670
6de00a78
AM
66712004-04-14 Alan Modra <amodra@bigpond.net.au>
6672
6673 * elf32-sparc.c (elf32_sparc_relocate_section): Don't abort
6674 when statically linking PIC code.
6675 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
6676
279500de
TS
66772004-04-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6678
6679 * config.bfd: Remove mips*-*-mach3* and mips*-dec-mach3* targets.
6680 * configure.in: Remove mips-dec-bsd*, mips-dec-mach3*, mips-*-mach3*
6681 targets amd aout_mips_big_vec, aout_mips_little_vec target vectors.
6682 * configure: Regenerate.
6683
ccf2f652
RS
66842004-04-08 Richard Sandiford <rsandifo@redhat.com>
6685
6686 * elflink.c: Include libiberty.h.
6687 * Makefile.am (elflink.lo): Depend on libiberty.h.
6688 * Makefile.in: Regenerate.
6689
ca07892d
DJ
66902004-04-06 Daniel Jacobowitz <drow@mvista.com>
6691
6692 * elfxx-mips.c (MIPS_ELF_STUB_SECTION_NAME): Always use
6693 ".MIPS.stubs".
6694
a5a58ba4
L
66952004-04-05 H.J. Lu <hongjiu.lu@intel.com>
6696
6697 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Always
6698 reserve the memory for dynamic linker
6699
24d18d30
MK
67002004-04-05 Mark Kettenis <kettenis@gnu.org>
6701
6702 * netbsd-core.c (CORE_WCOOKIE_OFFSET): New define.
6703 (netbsd_core_file_p): Create a .wcookie section for OpenBSD/sparc.
6704
a4d7b4b5
L
67052004-04-02 H.J. Lu <hongjiu.lu@intel.com>
6706
6707 * elf32-cr16c.c (elf32_cr16c_relocate_section): Use
6708 RELOC_FOR_GLOBAL_SYMBOL.
6709 (elf32_cr16c_add_symbol_hook): Remove const from Elf_Internal_Sym.
6710
1f433d93
L
67112004-04-02 H.J. Lu <hongjiu.lu@intel.com>
6712
6713 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
6714 R_ARM_ALU* only if OLD_ARM_ABI is not defined.
6715
e489d0ae
PB
67162004-04-01 Paul Brook <paul@codesourcery.com>
6717
6718 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update.
6719 * elf32-arm.h (struct elf32_elf_section_map): New.
6720 (struct _arm_elf_section_data): New.
6721 (elf32_arm_section_data): Define.
6722 (struct elf32_arm_link_hash_table): Add byteswap_code.
6723 (elf32_arm_link_hash_table_create): Initialize byteswap_code.
6724 (bfd_elf32_arm_process_before_allocation): Add byteswap_code.
6725 (elf32_arm_post_process_headers): Set EF_ARM_BE8.
6726 (elf32_arm_output_symbol_hook, elf32_arm_new_section_hook,
6727 elf32_arm_compare_mapping, elf32_arm_write_section): New functions.
6728 (bfd_elf32_new_section_hook, elf_backend_write_section,
6729 elf_backend_link_output_symbol_hook): Define.
6730
66a695f0
NC
67312004-04-01 Andy Chittenden <achittenden@bluearc.com>
6732
6733 * stabs.c (struct stab_link_includes_totals): Add field 'symb'
6734 that keeps the characters in a B_INCL..B_EINCL range.
6735 (_bfd_link_section_stabs): When computing the sum of the
6736 characters in a B_INCL..B_EINCL range also keep a copy of those
6737 characters. Use this information to distinguish between
6738 include sections that have the same sum and the same length
6739 but which are nevertheless unique.
6740
8375c36b
PB
67412004-03-31 Paul Brook <paul@codesourcery.com>
6742
6743 * elf32-arm.h (elf32_arm_final_link_relocate): Add R_ARM_ALU*.
6744 * elfarm-nabi.c (elf32_arm_howto_table): Ditto.
6745
a56b48eb
NC
67462004-03-31 Andy Chittenden <achittenden@bluearc.com>
6747
6748 * stabs.c (struct stab_link_includes_totals): Rename field 'total'
6749 to 'sum_chars' and add field 'num_chars'.
6750 (_bfd_link_section_stabs): When computing the sum of the
6751 characters in a B_INCL..B_EINCL range also keep a count of the
6752 number of characters. Use this information to help distinguish
6753 between include sections when have the same sum but which
6754 nevertheless are still unique.
6755
1fbc7e7a 67562004-03-31 Mattias Engdegård <mattias@virtutech.se>
3d456464
NC
6757
6758 * stabs.c (_bfd_link_section_stabs): Do not skip N_EXCL stabs.
6759
0949843d 67602004-03-30 Galit Heller <Galit.Heller@nsc.com>
eb61d2d6 6761 Tomer Levi <Tomer.Levi@nsc.com>
0949843d
NC
6762
6763 * Makefile.am (ALL_MACHINES): Add cpu-cr16c.lo.
6764 (ALL_MACHINES_CFILES): Add cpu-cr16c.c.
6765 (BFD32_BACKENDS): Add elf32-cr16c.lo.
6766 (BFD32_BACKENDS_CFILES): Add elf32-cr16c.c.
6767 (cpu-cr16c.lo): New target.
6768 (elf32-cr16c.lo): Likewise.
6769 * Makefile.in: Regenerate.
6770 * archures.c (bfd_architecture): Add bfd_{arch,mach}_cr16c.
6771 (bfd_archures_list): Add bfd_cr16c_arch.
6772 * config.bfd: Handle cr16c-*-elf*.
6773 * configure.in: Handle bfd_elf32_cr16c_vec.
6774 * configure: Regenerate.
6775 * reloc.c: Add BFD_RELOC_16C_NUM08, BFD_RELOC_16C_NUM08_C,
6776 BFD_RELOC_16C_NUM16, BFD_RELOC_16C_NUM16_C,
6777 BFD_RELOC_16C_NUM32, BFD_RELOC_16C_NUM32_C,
6778 BFD_RELOC_16C_DISP04, BFD_RELOC_16C_DISP04_C,
6779 BFD_RELOC_16C_DISP08, BFD_RELOC_16C_DISP08_C,
6780 BFD_RELOC_16C_DISP16, BFD_RELOC_16C_DISP16_C,
6781 BFD_RELOC_16C_DISP24, BFD_RELOC_16C_DISP24_C,
6782 BFD_RELOC_16C_DISP24a, BFD_RELOC_16C_DISP24a_C,
6783 BFD_RELOC_16C_REG04, BFD_RELOC_16C_REG04_C,
6784 BFD_RELOC_16C_REG04a, BFD_RELOC_16C_REG04a_C,
6785 BFD_RELOC_16C_REG14, BFD_RELOC_16C_REG14_C,
6786 BFD_RELOC_16C_REG16, BFD_RELOC_16C_REG16_C,
6787 BFD_RELOC_16C_REG20, BFD_RELOC_16C_REG20_C,
6788 BFD_RELOC_16C_ABS20, BFD_RELOC_16C_ABS20_C,
6789 BFD_RELOC_16C_ABS24, BFD_RELOC_16C_ABS24_C,
6790 BFD_RELOC_16C_IMM04, BFD_RELOC_16C_IMM04_C,
6791 BFD_RELOC_16C_IMM16, BFD_RELOC_16C_IMM16_C,
6792 BFD_RELOC_16C_IMM20, BFD_RELOC_16C_IMM20_C,
6793 BFD_RELOC_16C_IMM24, BFD_RELOC_16C_IMM24_C,
6794 BFD_RELOC_16C_IMM32, BFD_RELOC_16C_IMM32_C.
6795 * targets.c (bfd_elf32_cr16c_vec): Declare.
6796 (bfd_target_vector): Add bfd_elf32_cr16c_vec.
6797 * cpu-cr16c.c: New file.
6798 * elf32-cr16c.c: Likewise.
6799 * libbfd.h: Regenerate.
6800 * bfd-in2.h: Likewise.
6801
baaff79e
JJ
68022004-03-30 Jakub Jelinek <jakub@redhat.com>
6803
6804 * elf.c (map_sections_to_segments): Fix handling of .tbss.
6805
c152c796
AM
68062004-03-27 Alan Modra <amodra@bigpond.net.au>
6807
6808 * Makefile.am: Remove all mention of elflink.h.
6809 * Makefile.in: Regenerate.
6810 * bfd-in.h (bfd_elf_discard_info): Declare.
6811 (bfd_elf32_discard_info, bfd_elf64_discard_info): Delete.
6812 * bfd-in2.h: Regenerate.
6813 * elf-bfd.h (bfd_elf32_print_symbol, bfd_elf64_print_symbol,
6814 bfd_elf32_link_record_dynamic_symbol,
6815 bfd_elf64_link_record_dynamic_symbol,
6816 _bfd_elf_link_record_dynamic_symbol, bfd_elf32_bfd_final_link,
6817 bfd_elf64_bfd_final_link, elf_link_record_local_dynamic_symbol,
6818 _bfd_elf32_link_record_local_dynamic_symbol,
6819 _bfd_elf64_link_record_local_dynamic_symbol,
6820 _bfd_elf32_gc_sections, _bfd_elf32_gc_common_finalize_got_offsets,
6821 _bfd_elf32_gc_common_final_link, _bfd_elf64_gc_common_final_link,
6822 _bfd_elf32_gc_record_vtinherit, _bfd_elf32_gc_record_vtentry,
6823 _bfd_elf64_gc_sections, _bfd_elf64_gc_common_finalize_got_offsets,
6824 _bfd_elf64_gc_record_vtinherit, _bfd_elf64_gc_record_vtentry,
6825 _bfd_elf32_reloc_symbol_deleted_p,
6826 _bfd_elf64_reloc_symbol_deleted_p): Delete.
6827 (bfd_elf_link_record_dynamic_symbol,
6828 bfd_elf_link_record_local_dynamic_symbol,
6829 bfd_elf_final_link, bfd_elf_gc_sections,
6830 bfd_elf_gc_record_vtinherit, bfd_elf_gc_record_vtentry,
6831 bfd_elf_gc_common_finalize_got_offsets, bfd_elf_gc_common_final_link,
6832 bfd_elf_reloc_symbol_deleted_p): Declare.
6833 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
6834 * elf32-arm.h: Update for changed function names. Remove local
6835 WILL_CALL_FINISH_DYNAMIC_SECTION define.
6836 * elf-hppa.h, elf-m10300.c, elf32-cris.c, elf32-d10v.c, elf32-dlx.c,
6837 * elf32-fr30.c, elf32-frv.c, elf32-h8300.c, elf32-hppa.c, elf32-i386.c,
6838 * elf32-iq2000.c, elf32-m32r.c, elf32-m68hc1x.c, elf32-m68k.c,
6839 * elf32-mcore.c, elf32-openrisc.c, elf32-ppc.c, elf32-s390.c,
6840 * elf32-sh.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
6841 * elf32-xstormy16.c, elf32-xtensa.c, elf64-alpha.c, elf64-hppa.c,
6842 * elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c, elf64-sparc.c,
6843 * elf64-x86-64.c, elfxx-ia64.c, elfxx-mips.c, elfxx-target.h: Likewise.
6844 * elfxx-target.h (bfd_elfNN_bfd_final_link): Define.
6845 (bfd_elfNN_print_symbol): Define.
6846 * elfcode.h: Don't include elflink.h.
6847 (elf_bfd_discard_info, elf_reloc_symbol_deleted_p,
6848 elf_link_record_dynamic_symbol, elf_bfd_final_link, elf_gc_sections,
6849 elf_gc_common_finalize_got_offsets, elf_gc_common_final_link,
6850 elf_gc_record_vtinherit, elf_gc_record_vtentry,
6851 elf_link_record_local_dynamic_symbol): Don't define.
6852 * elflink.c: Update for changed function names. Move elflink.h
6853 code here.
6854 * elflink.h: Delete file.
6855 * po/SRC-POTFILES.in: Regenerate.
6856 * po/bfd.pot: Regenerate.
6857
6a9cae7f
AM
68582004-03-27 Alan Modra <amodra@bigpond.net.au>
6859
6860 * elf64-mmix.c (mmix_elf_relocate_section): Restore code setting
6861 "name" for global syms accidentally removed in 2004-03-20 change.
6862
140f6c8e
AM
68632004-03-27 Alan Modra <amodra@bigpond.net.au>
6864
6865 * elf-bfd.h (struct elf_reloc_cookie): Add r_sym_shift field.
6866 * elflink.h: Replace all occurrences of sizeof (Elf_External_*)
6867 where Elf_External_* is different for 64 and 32 bit, with
6868 corresponding elf_size_info field.
6869 (struct elf_final_link_info): Use "bfd_byte *" instead
6870 of "Elf_External_Sym *" for external_syms and symbuf.
6871 (elf_link_adjust_relocs): Set up r_type_mask and r_sym_shift local
6872 vars and use instead of ELF_R_INFO and ELF_R_TYPE macros.
6873 (struct elf_link_sort_rela): Add "sym_mask" alias for "offset".
6874 (elf_link_sort_cmp1): Use sym_mask field instead of ELF_R_SYM.
6875 (elf_link_sort_cmp2): Adjust.
6876 (elf_link_sort_relocs): Set up r_sym_mask local var instead of
6877 using ELF_R_SYM macro. Set u.sym_mask.
6878 (elf_bfd_final_link): Call _bfd_elf_stringtab_init instead of macro
6879 version, elf_stringtab_init. Ditto for bfd_section_from_elf_index
6880 vs. section_from_elf_index. Adjust Elf_External_Sym pointer
6881 arithmetic. Pass bed to elf_link_flush_output_syms. Adjust
6882 Elf_External_Dyn pointer arithmentic. Use bed swap_dyn_in and
6883 swap_syn_out functions. Rearrange dyn swap in/out switch.
6884 (elf_link_output_sym): Adjust Elf_External_Sym pointer arithmentic.
6885 Pass bed to elf_link_flush_output_syms. Use bed swap_symbol_out.
6886 (elf_link_flush_output_syms): Add elf_backend_data arg.
6887 (elf_link_check_versioned_symbol): Likewise.
6888 (elf_link_output_extsym): Pass bed to elf_link_check_versioned_symbol.
6889 Adjust Elf_External_Sym pointer arithmetic. Use bed swap_symbol_out.
6890 (elf_link_input_bfd): Use bfd_section_from_elf_index. Set up
6891 r_type_mask and r_sym_shift local vars and use instead of ELF_R_SYM,
6892 ELF_R_TYPE and ELF_R_INFO macros.
6893 (elf_reloc_link_order): Select ELF32_R_INFO or ELF64_R_INFO invocation
6894 based on size rather than using ELF_R_INFO.
6895 (elf_gc_mark): Set up r_sym_shift local var and use instead of
6896 ELF_R_SYM macro.
6897 (struct alloc_got_off_arg): New.
6898 (elf_gc_common_finalize_got_offsets): Use elf_size_info instead of
6899 ARCH_SIZE. Pass get entry size down to elf_gc_allocate_got_offsets.
6900 (elf_gc_allocate_got_offsets): Adjust.
6901 (elf_reloc_symbol_deleted_p): Usee cookie.r_sym_shift instead of
6902 ELF_R_SYM. Use bfd_section_from_elf_index.
6903 (elf_bfd_discard_info): Set cookie.r_sym_shift.
6904 * elfcode.h (elf_stringtab_init, section_from_elf_index): Delete.
6905 (elf_slurp_symbol_table): Use bfd_section_from_elf_index.
6906
14bde378
SS
69072004-03-26 Stan Shebs <shebs@apple.com>
6908
6909 Remove MPW support, no longer used.
6910 * config.bfd (powerpc-*-mpw*): Remove configuration.
6911 * mpw-config.in, mpw-make.sed: Remove files.
6912 * ecoffswap.h [MPW_C]: Remove MPW-C-friendly version of code.
6913
555cd476
AM
69142004-03-26 Alan Modra <amodra@bigpond.net.au>
6915
6916 * elf64-ppc.c (elf_backend_add_symbol_hook): Define.
6917 (ppc64_elf_add_symbol_hook): New function.
6918 * elf-bfd.h (struct elf_backend_data <elf_add_symbol_hook>): Remove
6919 const from Elf_Internal_Sym param.
6920 * elflink.c (elf_link_add_object_symbols): Adjust.
6921 * elf-hppa.h (elf_hppa_add_symbol_hook): Adjust.
6922 * elf32-frv.c (elf32_frv_add_symbol_hook): Adjust.
6923 * elf32-i370.c (elf_backend_add_symbol_hook): Adjust.
6924 * elf32-m32r.c (m32r_elf_add_symbol_hook): Adjust.
6925 * elf32-m68hc1x.c (elf32_m68hc11_add_symbol_hook): Adjust.
6926 * elf32-m68hc1x.h (elf32_m68hc11_add_symbol_hook): Adjust.
6927 * elf32-ppc.c (ppc_elf_add_symbol_hook): Adjust.
6928 * elf32-sh64.c (sh64_elf_add_symbol_hook): Adjust.
6929 * elf32-v850.c (v850_elf_add_symbol_hook): Adjust.
6930 * elf64-alpha.c (elf64_alpha_add_symbol_hook): Adjust.
6931 * elf64-mmix.c (mmix_elf_add_symbol_hook): Adjust.
6932 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Adjust.
6933 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Adjust.
6934 * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Adjust.
6935 * elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Adjust.
6936 * elfxx-mips.h (_bfd_mips_elf_add_symbol_hook): Adjust.
6937
4ad4eba5
AM
69382004-03-26 Alan Modra <amodra@bigpond.net.au>
6939
6940 * elfxx-target.h (bfd_elfNN_bfd_link_add_symbols): Define.
6941 * elf-bfd.h (_bfd_elf_link_add_archive_symbols): Delete.
6942 (_bfd_elf_sort_symbol, _bfd_elf_add_dt_needed_tag): Delete.
6943 (_bfd_elf_finalize_dynstr, bfd_elf32_bfd_link_add_symbols): Delete.
6944 (bfd_elf64_bfd_link_add_symbols): Delete.
6945 (bfd_elf_link_add_symbols): Declare.
6946 * elfcode.h (elf_bfd_link_add_symbols): Delete.
6947 * elflink.c: Include safe-ctype.h.
6948 (elf_add_dt_needed_tag): Rename from _bfd_elf_add_dt_needed_tag,
6949 make static.
6950 (elf_sort_symbol): Rename from _bfd_elf_sort_symbol, make static.
6951 (elf_finalize_dynstr): Rename from _bfd_elf_finalize_dynstr, make
6952 static.
6953 (elf_link_add_archive_symbols): Rename from
6954 _bfd_elf_link_add_archive_symbols, make static.
6955 (elf_link_add_object_symbols): New function. Corresponding
6956 elflink.h function converted to use elf_size_info.
6957 (bfd_elf_link_add_symbols): Likewise.
6958 (bfd_elf_size_dynamic_sections): Adjust.
6959 * elflink.h (elf_bfd_link_add_symbols): Delete.
6960 (elf_link_add_object_symbols): Delete.
6961 * elf32-gen.c (elf32_generic_link_add_symbols): Call
6962 bfd_elf_link_add_symbols.
6963 * elf64-gen.c (elf64_generic_link_add_symbols): Likewise.
6964
5a580b3a
AM
69652004-03-25 Alan Modra <amodra@bigpond.net.au>
6966
6967 * elflink.h (elf_link_add_object_symbols): Add DT_NEEDED for as-needed
6968 and chained shared libs only if dynsym. Clear dynsym on forced-local.
c152c796 6969
5a580b3a
AM
6970 * elf-bfd.h (_bfd_elf_add_dynamic_entry): Declare.
6971 (bfd_elf32_add_dynamic_entry, bfd_elf64_add_dynamic_entry): Delete.
6972 (_bfd_elf_add_dt_needed_tag): Declare.
6973 (_bfd_elf_sort_symbol): Declare.
6974 (_bfd_elf_finalize_dynstr): Declare.
6975 (RELOC_FOR_GLOBAL_SYM): Formatting.
6976 * elfcode.h (elf_add_dynamic_entry): Delete.
6977 * elflink.c (_bfd_elf_add_dynamic_entry): New function. Corresponding
6978 elflink.h function converted to use elf_size_info.
6979 (_bfd_elf_add_dt_needed_tag): Likewise.
6980 (_bfd_elf_sort_symbol): Likewise.
6981 (_bfd_elf_finalize_dynstr): Likewise.
6982 (compute_bucket_count): Likewise.
6983 (bfd_elf_size_dynamic_sections): Likewise. Check result of
6984 _bfd_elf_strtab_add before calling _bfd_elf_strtab_addref.
6985 (elf_adjust_dynstr_offsets, elf_collect_hash_codes): Moved from..
6986 * elflink.h: ..here.
6987 (sort_symbol, add_dt_needed_tag): Delete.
6988 (elf_add_dynamic_entry, elf_finalize_dynstr): Delete.
6989 (compute_bucket_count, NAME(bfd_elf,size_dynamic_sections)): Delete.
6990 Update all users.
6991 * elf32-arm.h (add_dynamic_entry): Update. Remove casts.
6992 * elf32-cris.c (add_dynamic_entry): Likewise.
6993 * elf32-hppa.c (add_dynamic_entry): Likewise.
6994 * elf32-i370.c (add_dynamic_entry): Likewise.
6995 * elf32-i386.c (add_dynamic_entry): Likewise.
6996 * elf32-m32r.c (add_dynamic_entry): Likewise.
6997 * elf32-m68k.c (add_dynamic_entry): Likewise.
6998 * elf32-ppc.c (add_dynamic_entry): Likewise.
6999 * elf32-s390.c (add_dynamic_entry): Likewise.
7000 * elf32-sh.c (add_dynamic_entry): Likewise.
7001 * elf32-sparc.c (add_dynamic_entry): Likewise.
7002 * elf32-vax.c (add_dynamic_entry): Likewise.
7003 * elf32-xtensa.c (add_dynamic_entry): Likewise.
7004 * elf64-alpha.c (add_dynamic_entry): Likewise.
7005 * elf64-hppa.c (add_dynamic_entry): Likewise.
7006 * elf64-ppc.c (add_dynamic_entry): Likewise.
7007 * elf64-s390.c (add_dynamic_entry): Likewise.
7008 * elf64-sparc.c (add_dynamic_entry): Likewise.
7009 * elf64-x86-64.c (add_dynamic_entry): Likewise.
7010 * elfxx-ia64.c (add_dynamic_entry): Likewise.
7011 * elfxx-mips.c (MIPS_ELF_ADD_DYNAMIC_ENTRY): Likewise.
7012 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
7013 * elf32-frv.c (elf32_frv_size_dynamic_sections): Likewise.
7014 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
7015
d507cf36
PB
70162004-03-23 Paul Brook <paul@codesourcery.com>
7017
7018 * elf32-arm.h (arm_print_private_bfd_data): Add EABI v3.
7019
88d65ad6
BW
70202004-03-22 Bob Wilson <bob.wilson@acm.org>
7021
7022 * elf32-xtensa.c (elf_xtensa_check_relocs): Remove code to read
7023 literal tables and check for relocs outside of literal pools.
7024 (elf_xtensa_make_sym_local): Don't clear ELF_LINK_NON_GOT_REF flag.
7025 (elf_xtensa_fix_refcounts): Don't check ELF_LINK_NON_GOT_REF or
7026 set DF_TEXTREL.
7027 (elf_xtensa_size_dynamic_sections): Don't add DT_TEXTREL entry.
7028 (elf_xtensa_relocate_section): Read literal tables and check for
7029 dynamic relocations in read-only sections and not in literal pools.
c152c796 7030
b9cf773d
AM
70312004-03-23 Alan Modra <amodra@bigpond.net.au>
7032
7033 PR 51.
7034 * linker.c (bfd_wrapped_link_hash_lookup): Handle info->wrap_char.
7035
e4a2175c
HPN
70362004-03-22 Hans-Peter Nilsson <hp@axis.com>
7037
7038 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOTPLT,
7039 R_CRIS_16_GOTPLT>: Also error if there's no PLT for a symbol
7040 not defined by the executable, or defined in a DSO.
7041 <eliding run-time relocation of .got>: Initialize GOT entry for a
7042 function symbol or ELF_LINK_HASH_NEEDS_PLT statically in an
7043 executable.
7044 (cris_elf_gc_sweep_hook): Improve fallthrough marking.
7045 (elf_cris_try_fold_plt_to_got): Improve head comment. Do not fold
7046 a PLT reloc to GOT for an executable.
7047 (elf_cris_adjust_dynamic_symbol): Only fold a .got.plt entry with
b9cf773d 7048 .got for a DSO and explain why.
e4a2175c
HPN
7049 (elf_cris_discard_excess_program_dynamics): Also lose GOT-relocs
7050 and unreferenced symbols for which a PLT is defined. Adjust
7051 dynamic-symbol pruning correspondingly, to make sure we don't lose
7052 a dynamic symbol also defined by a DSO.
7053
b2a8e766
AM
70542004-03-22 Alan Modra <amodra@bigpond.net.au>
7055
7056 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Add input_bfd, input_section
7057 and rel args. Group input and output args. Wrap to 80 columns.
7058 * elf-m10200.c, elf-m10300.c, elf32-arm.h, elf32-avr.c,
7059 elf32-cris.c, elf32-d10v.c, elf32-fr30.c, elf32-h8300.c,
7060 elf32-hppa.c, elf32-i386.c, elf32-i860.c, elf32-ip2k.c,
7061 elf32-iq2000.c, elf32-m68hc1x.c, elf32-m68k.c, elf32-mcore.c,
7062 elf32-msp430.c, elf32-openrisc.c, elf32-ppc.c, elf32-s390.c,
7063 elf32-sparc.c, elf32-v850.c, elf32-vax.c, elf32-xstormy16.c,
7064 elf32-xtensa.c, elf64-alpha.c, elf64-mmix.c, elf64-ppc.c,
7065 elf64-s390.c, elf64-sparc.c, elf64-x86-64.c, elfxx-ia64.c: Update
7066 RELOC_FOR_GLOBAL_SYMBOL invocation.
7067
59c2e50f
L
70682004-03-20 H.J. Lu <hongjiu.lu@intel.com>
7069
7070 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Report error if
7071 unresolved symbols in objects aren't allowed.
7072
7073 * elf-hppa.h (elf_hppa_relocate_section): Properly handle
7074 unresolved symbols.
7075 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
7076 (elf_hppa_unmark_useless_dynamic_symbols):
7077 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
7078 * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
7079 (elf32_hppa_relocate_section): Likewise.
7080 * elf32-i370.c (i370_elf_relocate_section): Likewise.
7081 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
7082 * elf32-sh.c (sh_elf_relocate_section): Likewise.
7083 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
7084 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
7085
7086 * elf-m10200.c (mn10200_elf_relocate_section): Use
7087 RELOC_FOR_GLOBAL_SYMBOL.
7088 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
7089 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
7090 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
7091 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
7092 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
7093 * elf32-m68hc1x.c (m68hc11_get_relocation_value): Likewise.
7094 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
7095 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
7096 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
7097 * elf32-v850.c (v850_elf_relocate_section): Likewise.
7098 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
7099 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
7100
9992270f
DA
71012004-03-19 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
7102
36751eee
DA
7103 * elf32-hppa.c (elf32_hppa_check_relocs): Handle R_PARISC_PCREL32.
7104 (final_link_relocate): Likewise.
9992270f
DA
7105 * elf-hppa.h (elf_hppa_reloc_final_type): Handle selectors for
7106 R_PARISC_PCREL32 and R_PARISC_PCREL64 relocations.
7107
05864e2a
AM
71082004-03-19 Alan Modra <amodra@bigpond.net.au>
7109
7110 * Makefile.am: Run "make dep-am".
7111 * Makefile.in: Regenerate.
7112 * aclocal.m4: Regenerate.
7113 * config.in: Regenerate.
7114 * po/bfd.pot: Regenerate.
7115
f218a464 71162004-03-19 Alan Modra <amodra@bigpond.net.au>
0f8a2703
AM
7117 H.J. Lu <hongjiu.lu@intel.com>
7118
7119 * elflink.c (_bfd_elf_merge_symbol): Revert last change. Move
7120 type and size change code to where it was previously. Remove
7121 dt_needed param. Treat old weak syms as strong if new sym is
7122 from a shared lib, even when old sym is from another shared
7123 lib. Remove unnecessary tests of oldweak and newweak. Correct
7124 comments.
7125 (_bfd_elf_add_default_symbol): Remove dt_needed param. Update
7126 _bfd_elf_merge_symbol calls.
7127 * elflink.h (elf_link_add_object_symbols): Update calls. Remove
7128 dt_needed local var. Update comments.
7129 * elf-bfd.h (_bfd_elf_merge_symbol): Update prototype.
7130 (_bfd_elf_add_default_symbol): Likewise.
f218a464
AM
7131
7132 * elflink.c (_bfd_elf_merge_symbol): Reinstate code to handle
7133 strong syms in one shared object overriding weak syms in another.
7134
79349b09
AM
71352004-03-18 Alan Modra <amodra@bigpond.net.au>
7136
4a43e768
AM
7137 * elf-bfd.h (struct elf_obj_tdata): Delete dt_soname field. Add
7138 dyn_lib_class field. Rearrange for better packing.
7139 (elf_dt_soname): Delete.
7140 (elf_dyn_lib_class): Define.
7141 * elf.c (bfd_elf_set_dt_needed_name): Update comment.
7142 (bfd_elf_set_dt_needed_soname): Delete.
7143 (bfd_elf_set_dyn_lib_class): New function.
7144 * elflink.h (add_dt_needed_tag): New function. Split out from..
7145 (elf_link_add_object_symbols): ..here. Rename "name" to "soname".
7146 Use elf_dyn_lib_class to set dt_needed and add_needed. Move fallback
7147 initialization of soname.
7148 (elf_link_check_versioned_symbol): Test elf_dyn_lib_class instead of
7149 elf_dt_soname.
7150 * bfd-in.h (enum dynamic_lib_link_class): New.
7151 (bfd_elf_set_dt_needed_soname): Delete.
7152 (bfd_elf_set_dyn_lib_class): Declare.
7153 * bfd-in2.h: Regenerate.
7154
79349b09
AM
7155 * elflink.c (_bfd_elf_merge_symbol): Rewrite weak symbol handling.
7156 (_bfd_elf_add_default_symbol): Remove indirect BFD_ASSERTs.
7157 * elflink.h (elf_link_add_object_symbols): Don't clear dt_needed in
7158 symbol loop. Instead use add_needed to flag tag as written.
7159
d13d89fa
NS
71602004-03-17 Nathan Sidwell <nathan@codesourcery.com>
7161
7162 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Correct
7163 logic for null_input_bfd detection.
7164
9183ed4b
AM
71652004-03-17 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
7166
7167 * config.bfd: Switch sh-*-rtems* to ELF. Add sh-*-rtemscoff*.
7168
021d7868
MK
71692004-03-16 Mark Kettenis <kettenis@gnu.org>
7170
7171 * netbsd-core.c (netbsd_core_file_p) [CORE_FPU_OFFSET]: Remove
7172 code.
7173
51992aec
AM
71742004-03-16 Alan Modra <amodra@bigpond.net.au>
7175
7176 * elflink.c (elf_link_read_relocs_from_section): Don't use
7177 NUM_SHDR_ENTRIES in end of reloc calc. Move NULL shdr check..
7178 (_bfd_elf_link_read_relocs): ..to here.
7179 * elf32-ppc.c (ppc_elf_relax_section): Formatting.
7180
ccba357f
AM
71812004-03-16 Alan Modra <amodra@bigpond.net.au>
7182
7183 * configure.in (HOST_64BIT_TYPE, HOST_U_64BIT_TYPE): Don't override
7184 values selected in configure.host. Require both to be defined
7185 before setting BFD_HOST_64_BIT_DEFINED. Protect assignment to
7186 corresponding BFD_HOST vars with quotes.
7187 <${host64}-${target64}-${want64} in *true*>: Don't exempt gcc;
7188 Always require BFD_HOST_64_BIT_DEFINED.
7189 <file_ptr type>: Find off_t size before emitting message. Combine
7190 off_t and ftello64 conditional.
7191 * configure: Regenerate.
7192
41978308
AM
71932004-03-16 Alan Modra <amodra@bigpond.net.au>
7194
7195 * elf32-m32r.c (m32r_elf_create_dynamic_sections): Fix pointer
7196 aliasing warning. Remove trailing whitespace throughout file.
7197
d63b5ed9
DA
71982004-03-15 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
7199
7200 * elf-hppa.h (elf_hppa_relocate_section): Pass input_bfd instead of
7201 input_section in calls to get_dyn_name.
7202 * 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
7203 local symbols.
7204 (elf64_hppa_check_relocs): Pass abfd in call to get_dyn_name.
7205
8ce8c090
AM
72062004-03-15 Alan Modra <amodra@bigpond.net.au>
7207
7208 * bfd-in.h (bfd_int64_t, bfd_uint64_t): New types.
7209 (BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Don't define here.
7210 (bfd_getb64, bfd_getl64, bfd_get_bits): Return bfd_uint64_t.
7211 (bfd_getb_signed_64, bfd_getl_signed_64): Return bfd_int64_t.
7212 (bfd_putb64, bfd_putl64, bfd_put_bits): Accept bfd_uint64_t.
7213 * configure.in (HOST_U_64BIT_TYPE): Set when sizeof long is 8.
7214 (BFD_HOST_64_BIT_DEFINED, BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Set
7215 when using long.
7216 * libbfd.c (EIGHT_GAZILLION, COERCE64): Use bfd_int64_t.
7217 (bfd_getb64): Return bfd_uint64_t. Enable when BFD_HOST_64_BIT.
7218 (bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
7219 (bfd_putb64): Accept bfd_uint64_t. Enable when BFD_HOST_64_BIT.
7220 (bfd_putl64, bfd_put_bits, bfd_get_bits): Likewise.
7221 * dwarf2.c (struct attribute): Use bfd_int64_t and bfd_uint64_t.
7222 (read_8_bytes, read_indirect_string, read_address): Likewise.
7223 (read_abbrevs, parse_comp_unit): Likewise.
7224 * targets.c (struct bfd_target): Likewise.
7225 * aix386-core.c (NO_GET64, NO_PUT64, NO_GETS64): Define and use.
7226 * hppabsd-core.c: Likewise. Formatting.
7227 * hpux-core.c: Likewise.
7228 * irix-core.c: Likewise.
7229 * netbsd-core.c: Likewise.
7230 * osf-core.c: Likewise.
7231 * ptrace-core.c: Likewise.
7232 * sco5-core.c: Likewise.
7233 * trad-core.c: Likewise.
7234 * configure: Regenerate.
7235 * bfd-in2.h: Regenerate.
7236
edeb6e24
AM
72372004-03-15 Alan Modra <amodra@bigpond.net.au>
7238
7239 * bfd-in.h (bfd_getb64, bfd_getl64): Replace bfd_byte* with void*.
7240 (bfd_getb32, bfd_getl32, bfd_getb16, bfd_getl16): Likewise.
7241 (bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
7242 (bfd_getb_signed_32, bfd_getl_signed_32): Likewise.
7243 (bfd_getb_signed_16, bfd_getl_signed_16): Likewise.
7244 (bfd_putb64, bfd_putl64, bfd_putb32, bfd_putl32): Likewise.
7245 (bfd_putb16, bfd_putl16, bfd_get_bits, bfd_put_bits): Likewise.
7246 * libbfd.c: Likewise in function definitions.
7247 (bfd_put_8): Mask with 0xff rather than casting to char.
7248 (bfd_putb16, bfd_putl16, bfd_putb32, bfd_putl32): Likewise.
7249 (bfd_putb64, bfd_putl64, bfd_put_bits): Likewise.
7250 (H_PUT_64, H_PUT_32, H_PUT_16, H_PUT_8): Remove casts, simplify.
7251 (H_PUT_S64, H_PUT_S32, H_PUT_S16, H_PUT_S8): Likewise.
7252 (H_GET_64, H_GET_32, H_GET_16, H_GET_8): Likewise.
7253 (H_GET_S64, H_GET_S32, H_GET_S16, H_GET_S8): Likewise.
7254 * libaout.h (H_PUT_64 H_PUT_32, H_PUT_16): Remove casts, simplify.
7255 (H_PUT_S64, H_PUT_S32, H_PUT_S16): Likewise.
7256 (H_GET_64, H_GET_32, H_GET_16): Likewise.
7257 (H_GET_S64, H_GET_S32, H_GET_S16): Likewise.
7258 * archive.c (do_slurp_coff_armap): Update swap prototype.
7259 * coff-tic54x.c (tic54x_getl32): Replace bfd_byte* with void*.
7260 (tic54x_getl_signed_32): Likewise.
7261 (tic54x_putl32): Likewise. Mask with 0xff rather than casting to char.
7262 * mach-o.c (bfd_mach_o_read_header): Update get32 prototype.
7263 * pdp11.c (bfd_getp32): Make static, replace bfd_byte* with void*.
7264 (bfd_getp_signed_32, bfd_putp32): Likewise.
7265 * targets.c (struct bfd_target): Use void* in place of bfd_byte* for
7266 bfd_getx64, bfd_getx_signed_64, bfd_putx64, bfd_getx32,
7267 bfd_getx_signed_32, bfd_putx32, bfd_getx16, bfd_getx_signed_16,
7268 bfd_putx16, bfd_h_getx64, bfd_h_getx_signed_64, bfd_h_putx64,
7269 bfd_h_getx32, bfd_h_getx_signed_32, bfd_h_putx32, bfd_h_getx16,
7270 bfd_h_getx_signed_16, bfd_h_putx16.
7271 * aix386-core.c (NO_GET, NO_GETS, NO_PUT): Update prototypes.
7272 * hppabsd-core.c: Similarly. Rename NO_SIGNED_GET to NO_GETS.
7273 * hpux-core.c: Likewise.
7274 * irix-core.c: Likewise.
7275 * netbsd-core.c: Likewise.
7276 * osf-core.c: Likewise.
7277 * ptrace-core.c: Likewise.
7278 * sco5-core.c: Likewise.
7279 * trad-core.c: Likewise.
7280 * bfd-in2.h: Regenerate.
7281
c1b954e2
AM
72822004-03-15 Matt Thomas <matt@3am-software.com>
7283
7284 * config.bfd: Add x86-64 vector to NetBSD/i386 if 64bit BFD is
7285 selected.
7286
85cfd8d3
MK
72872004-03-13 Mark Kettenis <kettenis@gnu.org>
7288
7289 * config.bfd: Add x86_64-*-openbsd*.
7290 * configure.in (x86_64-*-openbsd*): Set COREFILE to
7291 netbsd-core.lo.
7292 * configure: Regenerate.
7293
d1f161ea
NC
72942004-03-12 Nick Clifton <nickc@redhat.com>
7295 Dave Murphy <wintermute2k4@ntlworld.com>
c1b954e2 7296
d1f161ea
NC
7297 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Skip most checks
7298 if the input bfd does not contain any code.
7299
8b6f2683
JW
73002004-03-09 Steve Ellcey <sje@cup.hp.com>
7301
7302 * elfxx-ia64.c (plt_full_entry): Change ld8 to ld8.acq.
7303
79cda7cf
FF
73042004-03-05 Fred Fish <fnf@redhat.com>
7305
7306 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Just force
7307 mips16 symbols to be even rather than testing first for even/odd.
7308 (_bfd_mips_elf_link_output_symbol_hook): Ditto.
7309
e5caec89
NS
73102004-03-05 Nathan Sidwell <nathan@codesourcery.com>
7311
7312 * elf.c (map_sections_to_segments): Ignore .tbss sections for
7313 layout purposes.
7314
02bb6eae
AO
73152004-03-03 Alexandre Oliva <aoliva@redhat.com>
7316
7317 * elflink.c (bfd_elf_record_link_assignment): Mark undefweak and
7318 undefined symbols as hash_new.
7319
ae51a426
JR
73202003-03-03 Andrew Stubbs <andrew.stubbs@superh.com>
7321
7322 * archures.c: Add bfd_mach_sh4_nommu_nofpu.
7323 * cpu-sh.c: Ditto.
7324 * elf32-sh.c: Ditto.
7325 * bfd-in2.h: Regenerate.
7326
3b712a1a
AO
73272004-03-02 Alexandre Oliva <aoliva@redhat.com>
7328
7329 * elf32-frv.c (struct frv_pic_relocs_info): Added fixups and
7330 dynrelocs.
7331 (_frv_count_got_plt_entries): Initialize them.
7332 (frv_pic_relocs_info_find): Add insert argument. Adjust all
7333 callers.
7334 (frv_pic_relocs_info_for_global): Likewise.
7335 (frv_pic_relocs_info_for_local): Likewise.
7336 (frv_pic_merge_early_relocs_info): New.
7337 (_frv_resolve_final_relocs_info): Use it in case one entry maps to
7338 another.
7339 (_frv_add_dyn_reloc): Add entry argument. Adjust all callers.
7340 Check that we don't exceed the allocated count for entry.
7341 (_frv_add_rofixup): Likewise.
7342 (_frv_emit_got_relocs_plt_entries): Adjust for coding standards.
7343 (elf32_frv_finish_dynamic_sections): Improve error message in case
7344 we emit too few rofixup entries.
7345
676a64f4
RS
73462004-03-01 Richard Sandiford <rsandifo@redhat.com>
7347
7348 * archures.c (bfd_mach_fr450): New.
7349 * bfd-in2.h: Regenerate.
7350 * cpu-frv.c (arch_info_450): New bfd_arch_info_type.
7351 (arch_info_500): Link to it.
7352 * elf32-frv.c (elf32_frv_machine, frv_elf_merge_private_bfd_data)
7353 (frv_elf_print_private_bfd_data): Handle fr405 and fr450 header flags.
7354 (frv_elf_arch_extension_p): New function.
7355 (frv_elf_merge_private_bfd_data): Use it.
7356
0ad989f9
L
73572004-02-28 H.J. Lu <hongjiu.lu@intel.com>
7358
7359 * elf-bfd.h (_bfd_elf_link_add_archive_symbols): New prototype.
7360
7361 * elflink.h (is_global_data_symbol_definition): Moved to
7362 elflink.c.
7363 (elf_link_is_defined_archive_symbol): Likewise.
7364 (elf_link_add_archive_symbols): Likewise. Renamed to
7365 _bfd_elf_link_add_archive_symbols.
7366
7367 * elflink.c (elf_link_is_defined_archive_symbol): Get the size
7368 of ELF symbol table entry from backend.
7369 (_bfd_elf_link_add_archive_symbols): Call bfd_link_add_symbols
7370 instead of elf_link_add_object_symbols.
7371
ec3391e7
AO
73722004-02-27 Alexandre Oliva <aoliva@redhat.com>
7373
7374 * elf-bfd.h (struct elf_backend_data): Added
7375 elf_backend_can_make_relative_eh_frame,
7376 elf_backend_can_make_lsda_relative_eh_frame and
7377 elf_backend_encode_eh_address.
7378 (_bfd_elf_encode_eh_address): Declare.
7379 (_bfd_elf_can_make_relative): Declare.
7380 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use new
7381 hooks to decide whether to attempt to make_relative and
7382 make_lsda_relative.
7383 (_bfd_elf_write_section_eh_frame_hdr): Call encode_eh_address.
7384 (_bfd_elf_can_make_relative): New.
7385 (_bfd_elf_encode_eh_address): New.
7386 * elf32-frv.c (frv_elf_use_relative_eh_frame): New.
7387 (frv_elf_encode_eh_address): New.
7388 (elf_backend_can_make_relative_eh_frame): Define.
7389 (elf_backend_can_make_lsda_relative_eh_frame): Define.
7390 (elf_backend_encode_eh_address): Define.
7391 * elfxx-target.h
7392 (elf_backend_can_make_relative_eh_frame): Define.
7393 (elf_backend_can_make_lsda_relative_eh_frame): Define.
7394 (elf_backend_encode_eh_address): Define.
7395 (elfNN_bed): Add them.
7396
e6deed0a
AO
73972004-02-27 Alexandre Oliva <aoliva@redhat.com>
7398
7399 * elf32-frv.c (elf32_frv_howto_table) <R_FRV_LABEL16>: Set
7400 complain_on_overflow to signed.
7401
b60d7a1a
L
74022004-02-27 H.J. Lu <hongjiu.lu@intel.com>
7403
7404 * elflink.h (sort_symbol): New.
7405 (elf_link_add_object_symbols): Use a sorted symbol array for
7406 weakdef.
7407
1c3ff0f2
MS
74082004-02-27 Jakub Jelinek <jakub@redhat.com>
7409
7410 * elf32-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
7411 for pc relative relocs.
7412 (elf_s390_relocate_section): Likewise.
7413 * elf64-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
7414 for pc relative relocs.
7415 (elf_s390_relocate_section): Likewise.
7416
de9811af
L
74172004-02-26 H.J. Lu <hongjiu.lu@intel.com>
7418
7419 * elfxx-ia64.c (elfNN_ia64_check_relocs): Fix call to
7420 count_dyn_reloc.
7421
ac33696c
L
74222004-02-25 H.J. Lu <hongjiu.lu@intel.com>
7423
7424 * elfxx-ia64.c (elfNN_ia64_dyn_reloc_entry): Add the reltext.
7425 field to track if a relocation is against readonly section.
7426 (count_dyn_reloc): Take a new argument for rent->reltext.
7427 (elfNN_ia64_check_relocs): Adjust call to count_dyn_reloc.
7428 (get_reloc_section): Don't set ia64_info->reltext here.
7429 (allocate_dynrel_entries): Set ia64_info->reltext here.
7430
072c8903
AO
74312004-02-24 Alexandre Oliva <aoliva@redhat.com>
7432
7433 * elf32-frv.c (FRV_SYM_LOCAL): Weak undefined doesn't imply local.
7434 (_frv_emit_got_relocs_plt_entries): Decay relocation to protected
7435 function's descriptor to symbol+offset, and map local undefweak
7436 symbol to NULL function descriptor.
7437 (elf32_frv_relocate_section): Likewise.
7438
aca305d9
NC
74392004-02-23 Mark Kettenis <kettenis@gnu.org>
7440
7441 * libaout.h (enum machine_type): Add M_SPARC64_NETBSD and
7442 M_X86_64_NETBSD.
7443 * netbsd-core.c (M_SPARC64_OPENBSD): Define.
7444 (netbsd_core_file_p): Set architecture from machine ID for
7445 selected machines.
7446
646411fb
JJ
74472004-02-23 Jakub Jelinek <jakub@redhat.com>
7448
7449 * elflink.h (size_dynamic_sections): If not adding DT_FLAGS and
7450 DF_BIND_NOW is set in info->flags, create DT_BIND_NOW dynamic entry.
7451
1de1a317
L
74522004-02-21 H.J. Lu <hongjiu.lu@intel.com>
7453
7454 * elflink.c (_bfd_elf_merge_symbol): Properly handle undefined
7455 symbols with non-default visibility.
7456
3c9d0484
DS
74572004-02-21 Danny Smith <daanysmith@users.sourceforge.net>
7458
7459 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Clear
7460 IMAGE_SCN_MEM_WRITE on known sections only.
7461
a876ecf9
JJ
74622004-02-20 Jakub Jelinek <jakub@redhat.com>
7463
7464 * elf32-ppc.c (allocate_dynrelocs): Create dynsym for undef weak
7465 symbols used in PIE relocs.
7466
a8a6d7ce
JJ
74672004-02-19 Jakub Jelinek <jakub@redhat.com>
7468
7469 * elf32-sparc.c (elf32_sparc_finish_dynamic_sections): Clear
7470 .plt sh_entsize.
7471
d080fcd2
DJ
74722004-02-18 Daniel Jacobowitz <drow@mvista.com>
7473
7474 * configure.in: Update version to 2.15.90.
7475 * configure: Regenerate.
7476
d25aed71 74772004-02-17 Daniel Jacobowitz <drow@mvista.com>
c1b954e2 7478 Richard Sandiford <rsandifo@redhat.com>
d25aed71
RS
7479
7480 * elfxx-mips.c (mips_elf_calculate_relocation): Use
7481 _bfd_elf_symbol_refs_local_p to decide whether to decay
7482 a GOT_PAGE/GOT_OFST pair to GOT_DISP/addend.
7483 (_bfd_mips_elf_check_relocs): Add a global GOT entry for GOT_PAGE
7484 relocs if the symbol wasn't defined by a regular object file.
7485 Don't check the symbol's dynindx.
7486
d7ce59e3
AC
74872004-02-16 Andrew Cagney <cagney@redhat.com>
7488
7489 * bfd-in.h (file_ptr, ufile_ptr): Configure type using
7490 @bfd_file_ptr@.
7491 * bfd-in2.h: Re-generate.
7492
ca0b7686
AC
74932004-02-14 Andrew Cagney <cagney@redhat.com>
7494
7495 * configure.host (HDEFINES): When hppa*-*-hpux*, define
7496 _LARGEFILE64_SOURCE.
7497
340b6d91
AC
74982004-02-13 Andrew Cagney <cagney@redhat.com>
7499
7500 * elf.c (vma_page_aligned_bias): New function.
7501 (assign_file_positions_except_relocs)
7502 (assign_file_positions_for_segments): Replace broken modulo
7503 arithmetic with call to vma_page_aligned_bias.
7504
1012372a
AC
75052004-02-11 Andrew Cagney <cagney@redhat.com>
7506
7c192733
AC
7507 * bfd-in.h: Update copyright.
7508 (bfd_tell): Change return type to file_ptr.
7509 * bfd-in2.h: Re-generate.
7510 * cache.c: Update copyright.
7511 (bfd_cache_lookup_worker): Use real_fseek, do not cast offset
7512 parameter.
7513 (close_one): Use real_ftell.
7514 * bfdio.c: Update copyright.
7515 (real_ftell, real_fseek): New functions.
7516 (bfd_tell): Use real_fseek and real_ftell, change return type to
7517 file_ptr.
7518 (bfd_seek): Use real_ftell and real_fseek, change type of
7519 file_position to a file_ptr.
7520 * libbfd-in.h: Update copyright.
7521 (real_ftell, real_fseek): Declare.
7522 * libbfd.h: Re-generate.
7523
1012372a
AC
7524 * configure.in (AC_CHECK_FUNCS): Check for ftello, ftello64,
7525 fseeko and fseeko64. Determine bfd_file_ptr.
7526 * configure: Re-generate.
c1ea0c09 7527 * config.in: Re-generate.
c1b954e2 7528
3255318a
NC
75292004-02-09 Anil Paranjpe <anilp1@KPITCummins.com>
7530
7531 * coff-h8300.c: Added comments about relaxation for ldc.w and stc.w.
7532 * elf32-h8300.c: Likewise.
7533
0d5f9994
NC
75342004-02-09 Christian Vogel <vogelchr@vogel.cx>
7535 Nick Clifton <nickc@redhat.com>
7536
7537 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Catch
7538 GOT entries with no associated GOT subsection.
7539
174fd7f9
RS
75402004-02-09 Richard Sandiford <rsandifo@redhat.com>
7541
7542 * bfd-elf.h (elf_backend_name_local_section_symbols): New hook.
7543 * elf.c (swap_out_syms): Use it to decide whether local section
7544 symbols should be named.
7545 * elfxx-target.h (elf_backend_name_local_section_symbols): New macro.
7546 * elfxx-mips.h (_bfd_mips_elf_name_local_section_symbols): Declare.
7547 (elf_backend_name_local_section_symbols): Define.
7548 * elfxx-mips.c (_bfd_mips_elf_name_local_section_symbols): New.
7549
03609792
L
75502004-01-30 H.J. Lu <hongjiu.lu@intel.com>
7551
7552 * elfxx-ia64.c (elfNN_ia64_relax_brl): New function.
7553 (elfNN_ia64_relax_section): Optimize brl to br during the relax
7554 finalize pass.
7555
ea01195e
AO
75562004-01-30 Alexandre Oliva <aoliva@redhat.com>
7557
7558 * elf32-frv.c (elf32_frv_always_size_sections): Initialize pointer
7559 to bfd_link_hash_entry passed by reference to
7560 _bfd_generic_link_add_one_symbol.
7561
838e70c5
L
75622004-01-25 H.J. Lu <hongjiu.lu@intel.com>
7563
7564 * elfxx-ia64.c (elfNN_ia64_relocate_section): Disallow imm
7565 relocations against dynamic symbols.
7566
4f199be3
DJ
75672004-01-23 Daniel Jacobowitz <drow@mvista.com>
7568
7569 * elf32-arm.h (elf32_arm_check_relocs): Revert part of 2004-01-13
7570 change.
7571
28d39d1a
NC
75722004-01-21 Tom Rix <tcrix@worldnet.att.net>
7573
7574 * reloc.c: New 5 bit reloc, BFD_RELOC_M68HC12_5B, for m68hc12 movb/movw.
7575 * bfd-in2.h, libbfd.h: Rebuilt.
7576
66bed356
DS
75772004-01-20 Danny Smith <dannysmith@users.sourceforge.net>
7578
7579 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Don't remove
7580 IMAGE_SCN_MEM_WRITE flag from .text section if WP_TEXT
7581 flag has been cleared.
7582
7e89635a
KH
75832004-01-19 Kazu Hirata <kazu@cs.umass.edu>
7584
7585 * coff-h8300.c: Add and adjust comments about relaxation.
7586 * elf32-h8300.c: Likewise.
7587
e804e836
KH
75882004-01-16 Kazu Hirata <kazu@cs.umass.edu>
7589
7590 * coff-h8300.c: Fix comment typos.
7591 * elf32-h8300.c: Likewise.
7592
630a7b0a
KH
75932004-01-16 Kazu Hirata <kazu@cs.umass.edu>
7594
7595 * coff-h8300.c: Add comments about relaxation.
7596 * elf32-h8300.c: Likewise.
7597
f8b73030
MR
75982004-01-14 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
7599
7600 * acinclude.m4: Quote names of macros to be defined by AC_DEFUN
7601 throughout.
7602 * aclocal.m4: Regenerate.
7603 * configure: Regenerate.
7604
32159579
ILT
76052004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
7606
7607 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Call
7608 mips_elf64_rtype_to_howto instead of using howto_table.
7609
c84cd8ee
DJ
76102004-01-13 Daniel Jacobowitz <drow@mvista.com>
7611
7612 * elf32-arm.h (elf32_arm_final_link_relocate): Check that we created
7613 the .plt section.
7614 (elf32_arm_check_relocs): Don't increment the PLT refcount for
7615 relocs which would not use the PLT.
7616
680a3378
AM
76172004-01-13 Alan Modra <amodra@bigpond.net.au>
7618
7619 * elf64-ppc.c (ppc64_elf_check_relocs): Ignore !SEC_ALLOC relocs.
7620 (ppc64_elf_gc_sweep_hook): Likewise.
7621 (ppc64_elf_size_dynamic_sections): Test for .plt directly.
7622
faca21e5
NC
76232004-01-12 Anil Paranjpe <anilp1@KPITCummins.com>
7624
7625 Adds linker relaxation support for bit manipulation insns like
680a3378 7626 band, bclr, biand, bild, bior, bist, bixor, bld, bnot, bor, bset,
faca21e5 7627 bst, btst, bxor.
680a3378 7628 * elf32-h8300.c: Opcode for bit manipulation insn is checked in
faca21e5 7629 elf32_h8_relax_section function while relxation for aa:16 and aa:32.
680a3378 7630 * coff-h8300.c: Opcode for bit manipulation insn is checked in
faca21e5
NC
7631 h8300_reloc16_extra_cases function while relxation for aa:16 and aa:32.
7632
818a27ac
AM
76332004-01-12 Alan Modra <amodra@bigpond.net.au>
7634
7635 * dwarf2.c: Convert to C90, remove unneeded casts and prototypes.
7636
96ef1419
KH
76372004-01-11 Kazu Hirata <kazu@cs.umass.edu>
7638
7639 * elf32-h8300.c: Fix formatting.
7640
babfd660
KH
76412004-01-11 Kazu Hirata <kazu@cs.umass.edu>
7642
7643 * elf32-cris.c (cris_elf_gc_sweep_hook): Return early if no
7644 dynamic object is present. Declare r_symndx and h in an inner
7645 scope.
7646 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
7647
7359ea65
DJ
76482004-01-09 Daniel Jacobowitz <drow@mvista.com>
7649
7650 * elf32-arm.h (struct elf32_arm_relocs_copied): Remove pc_count.
7651 (elf32_arm_copy_indirect_symbol): Don't copy pc_count.
7652 (elf32_arm_final_link_relocate): Handle PLT32 and PC24 relocs
7653 identically. Do not emit PC24 relocations for shared libraries.
7654 (elf32_arm_gc_sweep_hook): Handle PLT32 and PC24 relocs
7655 identically. Don't adjust pc_count.
7656 (elf32_arm_check_relocs): Handle PLT32 and PC24 relocs identically.
7657 Set ELF_LINK_HASH_NEEDS_PLT for both. Don't adjust pc_count; don't
7658 adjust count for branch relocations.
7659 (allocate_dynrelocs): Correct typo in call to
7660 WILL_CALL_FINISH_DYNAMIC_SYMBOL. Never allocate space for
7661 PC24 or PLT32 relocs when linking.
7662
44e88952
NC
76632004-01-09 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
7664
7665 * coff-arm.c (aoutarm_std_reloc_howto): [ARM_WINCE] Synchronize ARM_26D
7666 relocation howto with ARM_26 one for consistency.
7667 (coff_arm_relocate_section): Set partial_inplace for ARM_26 relocations
7668 that will be converted to ARM_26D ones, since we always want 'done'
7669 relocations to be reflected in section's data.
7670 (coff_arm_relocate_section): [ARM_WINCE] Quick fix for BL instruction
7671 offset.
7672 (_bfd_final_link_relocate): Do not modify "inplace" data, if not
7673 requested.
7674
1e7fef1d
NC
76752004-01-08 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
7676
7677 * coff-arm.c (coff_arm_relocate_section): Do not alter relocs that
7678 are not partial_inplace during a relocatable link.
7679
4f075348
KH
76802004-01-08 Kazu Hirata <kazu@cs.umass.edu>
7681
babfd660 7682 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Return early
4f075348
KH
7683 if no dynamic object is present. Declare r_symndx and h in an
7684 inner scope.
7685
de0d9f33
L
76862004-01-07 H.J. Lu <hongjiu.lu@intel.com>
7687
7688 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't install
7689 trampoline if it is known out of range.
7690
51532845
AO
76912004-01-06 Alexandre Oliva <aoliva@redhat.com>
7692
7693 2003-12-17 Alexandre Oliva <aoliva@redhat.com>
7694 * elf32-frv.c (_frv_osec_readonly_p): New.
7695 (_frv_emit_got_relocs_plt_entries): Don't emit rofixup for
7696 undefweak symbol.
7697 (_frv_count_got_plt_entries): Adjust expected count accordingly.
7698 (elf32_frv_relocate_section): Likewise. Error out if attempting
7699 to emit rofixups or dynamic relocs in read-only segments. Use
7700 _bfd_elf_section_offset to adjust r_offsets in rofixups and
7701 dynamic relocations.
7702 2003-12-12 Alexandre Oliva <aoliva@redhat.com>
7703 * elf32-frv.c (elf32_frv_relocate_section): Compute dynamic
7704 relocations or fixups involving merged sections correctly. Avoid
7705 crash when undefined symbol is referenced by R_FRV_32 or
7706 R_FRV_FUNCDESC_VALUE.
7707 2003-12-02 Alexandre Oliva <aoliva@redhat.com>
7708 * elf32-frv.c (elf32_frv_relocate_section): Add output_offset of
7709 input section holding local symbol to addend of R_FRV_32 or
7710 R_FRV_FUNCDESC_VALUE dynamic relocation.
7711 2003-11-27 Alexandre Oliva <aoliva@redhat.com>
7712 * elf32-frv.c (elf32_frv_modify_segment_map): Add link info arg.
7713 (elf32_frv_always_size_sections): Don't store pointer to
7714 __stacksize symbol in sec_info.
7715 (elf32_frv_modify_segment_map): Look it up here.
7716 2003-11-26 Alexandre Oliva <aoliva@redhat.com>
7717 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Emit the address
7718 of the lazy PLT entry, not only its offset, as the low word of a
7719 function descriptor.
7720 2003-11-10 Alexandre Oliva <aoliva@redhat.com>
7721 * elf32-frv.c (elf32_frv_always_size_sections): Define __stacksize
7722 if a hash table entry already exists but is not a definition.
7723 2003-11-05 Alexandre Oliva <aoliva@redhat.com>
7724 * elf32-frv.c (frv_elf_link_hash_table_create): Use bfd_zalloc.
7725 (_frv_add_rofixup): Don't inline.
7726 (_frv_emit_got_relocs_plt_entries): Use NULL as funcdesc address
7727 for undefweak symbols.
7728 (elf32_frv_relocate_section): Avoid crash while computing
7729 relocation when linking with shared library. Only emit rofixups
7730 and dynamic relocations for alloc&load sections. Mark binaries
7731 with inter-segment relocations for relocation as a unit.
7732 (_frv_create_got_section): Rename .rofixup.got to .rofixup.
7733 (DEFAULT_STACK_SIZE): New.
7734 (_frv_count_got_plt_entries): Fix thinko in deciding whether to
7735 emit rofixups or dynamic relocs when linking dynamic non-PIE
7736 executables.
7737 (elf32_frv_size_dynamic_sections): Generate rofixup on PIEs and
7738 shared libs too. Reserve the last entry for the GOT pointer.
7739 (elf32_frv_finish_dynamic_sections): Emit it.
7740 (elf32_frv_always_size_sections): New.
7741 (elf32_frv_modify_segment_map): New.
7742 (elf32_frv_check_relocs): Reserve relocs32 space only in ALLOC
7743 sections.
7744 (frv_elf_merge_private_bfd_data): Clear PIC bit if FDPIC is set.
7745 (frv_elf_print_private_bfd_data): Handle FDPIC and LIBPIC.
7746 (elf_backend_always_size_sections): New.
7747 (elf_backend_modify_segment_map): New.
7748 2003-10-31 Alexandre Oliva <aoliva@redhat.com>
7749 * config.bfd: Added frv-*-*linux*.
7750 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Use idx 0 for
7751 ABS section, instead of crashing.
7752 (elf32_frv_relocate_section): Don't crash before warning about
7753 different segments in non-PIC relocation.
7754 2003-10-17 Alexandre Oliva <aoliva@redhat.com>
7755 * elf32-frv.c (elf32_frv_relocate_section): Don't warn on LABEL24
7756 relocs to undefweak symbols.
7757 (elf32_frv_relocate_section): Ditto for undefined symbols.
7758 2003-10-06 Alexandre Oliva <aoliva@redhat.com>
7759 * elf32-frv.c (elf32_frv_create_dynamic_sections): Make sure
7760 gotfixup section was created.
7761 2003-09-30 Alexandre Oliva <aoliva@redhat.com>
7762 * elf32-frv.c (elf32_frv_howto_table): Change GOT12,
7763 FUNCDESC_GOT12, GOTOFF12 and FUNCDESC_GOTOFF12 to
7764 complain_overflow_signed.
7765 * elf32-frv.c (_frv_add_rofixup): Do not error out if contents
7766 have not been allocated.
7767 (_frv_emit_got_relocs_plt_entries): Return non-void. Assert
7768 privfd only if dynamic sections were created.
7769 (elf32_frv_relocate_section): Compute gprel_segment, and use it
7770 for GPREL relocs. When linking relocatable FDPIC executables,
7771 emit warnings for relocations that would be illegal on PIE or
7772 shared libraries. Emit rofixup for R_FRV_32 only if input object
7773 is not FDPIC.
7774 (_frv_create_got_section): Define _gp symbol in the rofixup
7775 section.
7776 (elf32_frv_finish_dynamic_sections): If rofixups needed but
7777 dynamic sections missing, error out requesting -melf32frvfd.
7778 2003-09-19 Alexandre Oliva <aoliva@redhat.com>
7779 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Rearrange
7780 computation of addends from section and global or local symbol
7781 value. Change return type to bfd_boolean, and return a failure if
7782 a dynamic FUNCDESC or FUNCDESC_VALUE relocation that requires a
7783 nonzero addend is required.
7784 (elf32_frv_relocate_section): Likewise. Print error for
7785 unsupported nonzero addends.
7786 2003-09-18 Alexandre Oliva <aoliva@redhat.com>
7787 * elf32-frv.c (FRV_SYM_LOCAL): In the absence of dynamic sections,
7788 force everything local.
7789 (_frv_emit_got_relocs_plt_entries): Cope with NULL sec.
7790 * elf32-frv.c (struct frv_elf_link_hash_table): Added sgotfixup.
7791 (frv_gotfixup_section): New.
7792 (FRV_SYM_LOCAL): Accept undefweak and local common symbols.
7793 (struct frv_pic_relocs_info): Split relocs into relocs32, relocsfd
7794 and relocsfdv.
7795 (_frv_add_rofixup): New.
7796 (_frv_emit_got_relocs_plt_entries): Generate fixups for non-PIE
7797 fdpic executables. Use FRV_SYM_LOCAL more widely to simplify and
7798 improve some ugly conditions.
7799 (elf32_frv_relocate_section): Likewise. Reject inter-segment
7800 relocations in fdpic.
7801 (_frv_create_got_section): Create .rofixup.got section.
7802 (struct _frv_dynamic_got_info): Added fixups.
7803 (_frv_count_got_plt_entries): Account in-GOT relocations into
7804 relocs32, relocsfd and relocsfdv. Account them into relocs or
7805 fixups, as appropriate.
7806 (elf32_frv_size_dynamic_sections): Size rofixup section. Simplify
7807 sizing of gotrel.
7808 (elf32_frv_finish_dynamic_sections): Verify that the right number
7809 of relocations and fixups was generated.
7810 (elf32_frv_check_relocs): Compute relocs32, relocsfd and
7811 relocsfdv.
7812 * elf32-frv.c (FRV_SYM_LOCAL): New macro, used instead of
7813 SYMBOL_CALLS_LOCAL and SYMBOL_REFERENCES_LOCAL.
7814 (FRV_FUNCDESC_LOCAL): New macro, used to decide whether a function
7815 descriptor of a (formerly-)global symbol is local.
7816 (struct frv_pic_relocs_info): Adjust comments.
7817 (_frv_emit_got_relocs_plt_entries): Adjust.
7818 (elf32_frv_relocate_section): Likewise.
7819 (_frv_count_got_plt_entries): Likewise.
7820 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Don't add global
7821 symbol's value to addend in the common preamble. Decay dynamic
7822 symbols to section+offset if they bind or call locally, for GOT
7823 and FUNCDESC_VALUE, respectively.
7824 (elf32_frv_relocate_section): Likewise.
7825 (elf32_frv_check_relocs): Don't register as dynamic symbols of
7826 internal or hidden visibility.
7827 2003-09-17 Alexandre Oliva <aoliva@redhat.com>
7828 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Get addend as
7829 argument, so as to not call _bfd_elf_rel_local_sym to compute it.
7830 (elf32_frv_relocate_section): Pass relocation addend in. Use
7831 original relocation addend to look up the got relocs/plt entries
7832 table. Do not call _bfd_elf_rel_local_sym. Don't error out when
7833 processing relocations that reference .scommon symbols.
7834 2003-09-15 Alexandre Oliva <aoliva@redhat.com>
7835 Introduce support for dynamic linking.
7836 * elf32-frv.c (R_FRV_FUNCDESC_VALUE): Mark it as 64 bits.
7837 (elf32_frv_rel_32_howto, elf32_frv_rel_funcdesc_howto,
7838 elf32_frv_rel_funcdesc_value_howto): New REL descriptors.
7839 (frv_reloc_type_lookup): Return REL howtos for executables and
7840 dynamic libraries.
7841 (frv_info_to_howto_rel): New.
7842 (struct frv_elf_link_hash_table): New.
7843 (frv_hash_table, frv_got_section, frv_gotrel_section,
7844 frv_plt_section, frv_pltrel_section, frv_relocs_info,
7845 frv_got_initial_offset, frv_plt_initial_offset): New macros.
7846 (frv_elf_link_hash_table_create): New.
7847 (struct frv_pic_relocs_info): New.
7848 (frv_pic_relocs_info_hash, frv_pic_relocs_info_eq): New.
7849 (frv_pic_relocs_info_find): New.
7850 (frv_pic_relocs_info_for_global, frv_pic_relocs_info_for_local):
7851 New.
7852 (FRV_LZPLT_BLOCK_SIZE, FRV_LZPLT_RESOLVE_LOC): New.
7853 (_frv_add_dyn_reloc, _frv_osec_to_segment): New.
7854 (_frv_emit_got_relocs_plt_entries): New.
7855 (elf32_frv_relocate_section): Add support for dynamic linking.
7856 Handle new relocations.
7857 (_frv_create_got_section): New.
7858 (elf32_frv_create_dynamic_sections): New.
7859 (ELF_DYNAMIC_INTERPRETER): New.
7860 (struct _frv_dynamic_got_info): New.
7861 (_frv_count_got_plt_entries): New.
7862 (struct _frv_dynamic_got_plt_info): New.
7863 (_frv_compute_got_alloc_data): New.
7864 (_frv_get_got_entry, _frv_get_fd_entry): New.
7865 (_frv_assign_got_entries, _frv_assign_plt_entries): New.
7866 (_frv_resolve_final_relocs_info): New.
7867 (elf32_frv_size_dynamic_sections): New.
7868 (elf32_frv_finish_dynamic_sections): New.
7869 (elf32_frv_adjust_dynamic_symbol): New.
7870 (elf32_frv_finish_dynamic_symbol): New.
7871 (elf32_frv_check_relocs): Handle new relocs. Explain how the
7872 whole thing works.
7873 (elf_info_to_howto_rel): Define.
7874 (bfd_elf32_bfd_link_hash_table_create): Define.
7875 (elf_backend_create_dynamic_sections): Define.
7876 (elf_backend_adjust_dynamic_symbol): Define.
7877 (elf_backend_size_dynamic_sections): Define.
7878 (elf_backend_finish_dynamic_symbol): Define.
7879 (elf_backend_finish_dynamic_sections): Define.
7880 (elf_backend_want_got_sym): Define.
7881 (elf_backend_got_header_size): Define.
7882 (elf_backend_want_got_plt): Define.
7883 (elf_backend_plt_readonly): Define.
7884 (elf_backend_want_plt_sym): Define.
7885 (elf_backend_plt_header_size): Define.
7886 (elf_backend_may_use_rel_p): Define.
7887 (elf_backend_may_use_rela_p): Define.
7888 (elf_backend_default_use_rela_p): Define.
7889 2003-08-08 Alexandre Oliva <aoliva@redhat.com>
7890 * elf32-frv.c (R_FRV_FUNCDESC_VALUE, R_FRV_FUNCDESC_GOTOFF12,
7891 R_FRV_FUNCDESC_GOTOFFHI, R_FRV_FUNCDESC_GOTOFFLO, R_FRV_GOTOFF12,
7892 R_FRV_GOTOFFHI, R_FRV_GOTOFFLO): New.
7893 (frv_reloc_map): Map the corresponding BFD relocs to them.
7894 (frv_reloc_type_lookup): ... and back to BFD relocs.
7895 * reloc.c: New relocs.
7896 * bfd-in2.h, libbfd.h: Rebuilt.
7897 2003-08-04 Alexandre Oliva <aoliva@redhat.com>
7898 * elf32-frv.c (R_FRV_GOT12, R_FRV_GOTHI, R_FRV_GOTLO,
7899 R_FRV_FUNCDESC, R_FRV_FUNCDESC_GOT12, R_FRV_FUNCDESC_GOTHI,
7900 R_FRV_FUNCDESC_GOTLO): New.
7901 (frv_reloc_map): Map the corresponding BFD relocs to them.
7902 (frv_reloc_type_lookup): ... and back to BFD relocs.
7903 * reloc.c: New relocs.
7904 * bfd-in2.h, libbfd.h: Rebuilt.
7905
4301eeb1
MR
79062004-01-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
7907
7908 * elf32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
7909 targets to support pages of up to 64kB.
7910 (elf32_bed): Redefine to get a separate backend data structure for
7911 traditional targets.
7912 * elf64-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
7913 targets to support pages of up to 64kB.
7914 (elf64_bed): Redefine to get a separate backend data structure for
7915 traditional targets.
7916 * elfn32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
7917 targets to support pages of up to 64kB.
7918 (elf32_bed): Redefine to get a separate backend data structure for
7919 traditional targets.
7920
0647ed71
MK
79212004-01-04 Mark Kettenis <kettenis@gnu.org>
7922
7923 * elf32-sparc.c (elf32_sparc_grok_psinfo): New function.
7924
61adc1a4
NC
79252004-01-02 Mark Kettenis <kettenis@gnu.org>
7926
7927 * elf32-i386.c (elf_i386_grok_prstatus): Add support for FreeBSD.
7928 (elf_i386_grok_psinfo): Likewise.
7929
b50c15dc
NC
79302004-01-02 Bernardo Innocenti <bernie@develer.com>
7931
7932 * config.bfd: Add m68k-uClinux target.
7933
2627de83
AM
79342004-01-01 Grant Edwards <grante@visi.com>
7935
7936 * elflink.h (elf_gc_sections): Warn when gc-sections option is ignored.
7937 * elf32-h8300.c (elf32_h8_gc_mark_hook): New function.
7938 (elf32_h8_gc_sweep_hook): New function.
7939 (elf_backend_gc_mark_hook): Define.
7940 (elf_backend_gc_sweep_hook): Define.
7941 (elf_backend_can_gc_sections): Define.
7942
c9e214e5 7943For older changes see ChangeLog-0203
56882138
AM
7944\f
7945Local Variables:
7946mode: change-log
7947left-margin: 8
7948fill-column: 74
7949version-control: never
7950End:
This page took 0.621935 seconds and 4 git commands to generate.