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