]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - bfd/ChangeLog
* elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Add input_bfd, input_section
[thirdparty/binutils-gdb.git] / bfd / ChangeLog
1 2004-03-22 Alan Modra <amodra@bigpond.net.au>
2
3 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Add input_bfd, input_section
4 and rel args. Group input and output args. Wrap to 80 columns.
5 * elf-m10200.c, elf-m10300.c, elf32-arm.h, elf32-avr.c,
6 elf32-cris.c, elf32-d10v.c, elf32-fr30.c, elf32-h8300.c,
7 elf32-hppa.c, elf32-i386.c, elf32-i860.c, elf32-ip2k.c,
8 elf32-iq2000.c, elf32-m68hc1x.c, elf32-m68k.c, elf32-mcore.c,
9 elf32-msp430.c, elf32-openrisc.c, elf32-ppc.c, elf32-s390.c,
10 elf32-sparc.c, elf32-v850.c, elf32-vax.c, elf32-xstormy16.c,
11 elf32-xtensa.c, elf64-alpha.c, elf64-mmix.c, elf64-ppc.c,
12 elf64-s390.c, elf64-sparc.c, elf64-x86-64.c, elfxx-ia64.c: Update
13 RELOC_FOR_GLOBAL_SYMBOL invocation.
14
15 2004-03-20 H.J. Lu <hongjiu.lu@intel.com>
16
17 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Report error if
18 unresolved symbols in objects aren't allowed.
19
20 * elf-hppa.h (elf_hppa_relocate_section): Properly handle
21 unresolved symbols.
22 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
23 (elf_hppa_unmark_useless_dynamic_symbols):
24 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
25 * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
26 (elf32_hppa_relocate_section): Likewise.
27 * elf32-i370.c (i370_elf_relocate_section): Likewise.
28 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
29 * elf32-sh.c (sh_elf_relocate_section): Likewise.
30 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
31 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
32
33 * elf-m10200.c (mn10200_elf_relocate_section): Use
34 RELOC_FOR_GLOBAL_SYMBOL.
35 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
36 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
37 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
38 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
39 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
40 * elf32-m68hc1x.c (m68hc11_get_relocation_value): Likewise.
41 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
42 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
43 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
44 * elf32-v850.c (v850_elf_relocate_section): Likewise.
45 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
46 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
47
48 2004-03-19 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
49
50 * elf32-hppa.c (elf32_hppa_check_relocs): Handle R_PARISC_PCREL32.
51 (final_link_relocate): Likewise.
52 * elf-hppa.h (elf_hppa_reloc_final_type): Handle selectors for
53 R_PARISC_PCREL32 and R_PARISC_PCREL64 relocations.
54
55 2004-03-19 Alan Modra <amodra@bigpond.net.au>
56
57 * Makefile.am: Run "make dep-am".
58 * Makefile.in: Regenerate.
59 * aclocal.m4: Regenerate.
60 * config.in: Regenerate.
61 * po/bfd.pot: Regenerate.
62
63 2004-03-19 Alan Modra <amodra@bigpond.net.au>
64 H.J. Lu <hongjiu.lu@intel.com>
65
66 * elflink.c (_bfd_elf_merge_symbol): Revert last change. Move
67 type and size change code to where it was previously. Remove
68 dt_needed param. Treat old weak syms as strong if new sym is
69 from a shared lib, even when old sym is from another shared
70 lib. Remove unnecessary tests of oldweak and newweak. Correct
71 comments.
72 (_bfd_elf_add_default_symbol): Remove dt_needed param. Update
73 _bfd_elf_merge_symbol calls.
74 * elflink.h (elf_link_add_object_symbols): Update calls. Remove
75 dt_needed local var. Update comments.
76 * elf-bfd.h (_bfd_elf_merge_symbol): Update prototype.
77 (_bfd_elf_add_default_symbol): Likewise.
78
79 * elflink.c (_bfd_elf_merge_symbol): Reinstate code to handle
80 strong syms in one shared object overriding weak syms in another.
81
82 2004-03-18 Alan Modra <amodra@bigpond.net.au>
83
84 * elf-bfd.h (struct elf_obj_tdata): Delete dt_soname field. Add
85 dyn_lib_class field. Rearrange for better packing.
86 (elf_dt_soname): Delete.
87 (elf_dyn_lib_class): Define.
88 * elf.c (bfd_elf_set_dt_needed_name): Update comment.
89 (bfd_elf_set_dt_needed_soname): Delete.
90 (bfd_elf_set_dyn_lib_class): New function.
91 * elflink.h (add_dt_needed_tag): New function. Split out from..
92 (elf_link_add_object_symbols): ..here. Rename "name" to "soname".
93 Use elf_dyn_lib_class to set dt_needed and add_needed. Move fallback
94 initialization of soname.
95 (elf_link_check_versioned_symbol): Test elf_dyn_lib_class instead of
96 elf_dt_soname.
97 * bfd-in.h (enum dynamic_lib_link_class): New.
98 (bfd_elf_set_dt_needed_soname): Delete.
99 (bfd_elf_set_dyn_lib_class): Declare.
100 * bfd-in2.h: Regenerate.
101
102 * elflink.c (_bfd_elf_merge_symbol): Rewrite weak symbol handling.
103 (_bfd_elf_add_default_symbol): Remove indirect BFD_ASSERTs.
104 * elflink.h (elf_link_add_object_symbols): Don't clear dt_needed in
105 symbol loop. Instead use add_needed to flag tag as written.
106
107 2004-03-17 Nathan Sidwell <nathan@codesourcery.com>
108
109 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Correct
110 logic for null_input_bfd detection.
111
112 2004-03-17 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
113
114 * config.bfd: Switch sh-*-rtems* to ELF. Add sh-*-rtemscoff*.
115
116 2004-03-16 Mark Kettenis <kettenis@gnu.org>
117
118 * netbsd-core.c (netbsd_core_file_p) [CORE_FPU_OFFSET]: Remove
119 code.
120
121 2004-03-16 Alan Modra <amodra@bigpond.net.au>
122
123 * elflink.c (elf_link_read_relocs_from_section): Don't use
124 NUM_SHDR_ENTRIES in end of reloc calc. Move NULL shdr check..
125 (_bfd_elf_link_read_relocs): ..to here.
126 * elf32-ppc.c (ppc_elf_relax_section): Formatting.
127
128 2004-03-16 Alan Modra <amodra@bigpond.net.au>
129
130 * configure.in (HOST_64BIT_TYPE, HOST_U_64BIT_TYPE): Don't override
131 values selected in configure.host. Require both to be defined
132 before setting BFD_HOST_64_BIT_DEFINED. Protect assignment to
133 corresponding BFD_HOST vars with quotes.
134 <${host64}-${target64}-${want64} in *true*>: Don't exempt gcc;
135 Always require BFD_HOST_64_BIT_DEFINED.
136 <file_ptr type>: Find off_t size before emitting message. Combine
137 off_t and ftello64 conditional.
138 * configure: Regenerate.
139
140 2004-03-16 Alan Modra <amodra@bigpond.net.au>
141
142 * elf32-m32r.c (m32r_elf_create_dynamic_sections): Fix pointer
143 aliasing warning. Remove trailing whitespace throughout file.
144
145 2004-03-15 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
146
147 * elf-hppa.h (elf_hppa_relocate_section): Pass input_bfd instead of
148 input_section in calls to get_dyn_name.
149 * 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
150 local symbols.
151 (elf64_hppa_check_relocs): Pass abfd in call to get_dyn_name.
152
153 2004-03-15 Alan Modra <amodra@bigpond.net.au>
154
155 * bfd-in.h (bfd_int64_t, bfd_uint64_t): New types.
156 (BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Don't define here.
157 (bfd_getb64, bfd_getl64, bfd_get_bits): Return bfd_uint64_t.
158 (bfd_getb_signed_64, bfd_getl_signed_64): Return bfd_int64_t.
159 (bfd_putb64, bfd_putl64, bfd_put_bits): Accept bfd_uint64_t.
160 * configure.in (HOST_U_64BIT_TYPE): Set when sizeof long is 8.
161 (BFD_HOST_64_BIT_DEFINED, BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Set
162 when using long.
163 * libbfd.c (EIGHT_GAZILLION, COERCE64): Use bfd_int64_t.
164 (bfd_getb64): Return bfd_uint64_t. Enable when BFD_HOST_64_BIT.
165 (bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
166 (bfd_putb64): Accept bfd_uint64_t. Enable when BFD_HOST_64_BIT.
167 (bfd_putl64, bfd_put_bits, bfd_get_bits): Likewise.
168 * dwarf2.c (struct attribute): Use bfd_int64_t and bfd_uint64_t.
169 (read_8_bytes, read_indirect_string, read_address): Likewise.
170 (read_abbrevs, parse_comp_unit): Likewise.
171 * targets.c (struct bfd_target): Likewise.
172 * aix386-core.c (NO_GET64, NO_PUT64, NO_GETS64): Define and use.
173 * hppabsd-core.c: Likewise. Formatting.
174 * hpux-core.c: Likewise.
175 * irix-core.c: Likewise.
176 * netbsd-core.c: Likewise.
177 * osf-core.c: Likewise.
178 * ptrace-core.c: Likewise.
179 * sco5-core.c: Likewise.
180 * trad-core.c: Likewise.
181 * configure: Regenerate.
182 * bfd-in2.h: Regenerate.
183
184 2004-03-15 Alan Modra <amodra@bigpond.net.au>
185
186 * bfd-in.h (bfd_getb64, bfd_getl64): Replace bfd_byte* with void*.
187 (bfd_getb32, bfd_getl32, bfd_getb16, bfd_getl16): Likewise.
188 (bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
189 (bfd_getb_signed_32, bfd_getl_signed_32): Likewise.
190 (bfd_getb_signed_16, bfd_getl_signed_16): Likewise.
191 (bfd_putb64, bfd_putl64, bfd_putb32, bfd_putl32): Likewise.
192 (bfd_putb16, bfd_putl16, bfd_get_bits, bfd_put_bits): Likewise.
193 * libbfd.c: Likewise in function definitions.
194 (bfd_put_8): Mask with 0xff rather than casting to char.
195 (bfd_putb16, bfd_putl16, bfd_putb32, bfd_putl32): Likewise.
196 (bfd_putb64, bfd_putl64, bfd_put_bits): Likewise.
197 (H_PUT_64, H_PUT_32, H_PUT_16, H_PUT_8): Remove casts, simplify.
198 (H_PUT_S64, H_PUT_S32, H_PUT_S16, H_PUT_S8): Likewise.
199 (H_GET_64, H_GET_32, H_GET_16, H_GET_8): Likewise.
200 (H_GET_S64, H_GET_S32, H_GET_S16, H_GET_S8): Likewise.
201 * libaout.h (H_PUT_64 H_PUT_32, H_PUT_16): Remove casts, simplify.
202 (H_PUT_S64, H_PUT_S32, H_PUT_S16): Likewise.
203 (H_GET_64, H_GET_32, H_GET_16): Likewise.
204 (H_GET_S64, H_GET_S32, H_GET_S16): Likewise.
205 * archive.c (do_slurp_coff_armap): Update swap prototype.
206 * coff-tic54x.c (tic54x_getl32): Replace bfd_byte* with void*.
207 (tic54x_getl_signed_32): Likewise.
208 (tic54x_putl32): Likewise. Mask with 0xff rather than casting to char.
209 * mach-o.c (bfd_mach_o_read_header): Update get32 prototype.
210 * pdp11.c (bfd_getp32): Make static, replace bfd_byte* with void*.
211 (bfd_getp_signed_32, bfd_putp32): Likewise.
212 * targets.c (struct bfd_target): Use void* in place of bfd_byte* for
213 bfd_getx64, bfd_getx_signed_64, bfd_putx64, bfd_getx32,
214 bfd_getx_signed_32, bfd_putx32, bfd_getx16, bfd_getx_signed_16,
215 bfd_putx16, bfd_h_getx64, bfd_h_getx_signed_64, bfd_h_putx64,
216 bfd_h_getx32, bfd_h_getx_signed_32, bfd_h_putx32, bfd_h_getx16,
217 bfd_h_getx_signed_16, bfd_h_putx16.
218 * aix386-core.c (NO_GET, NO_GETS, NO_PUT): Update prototypes.
219 * hppabsd-core.c: Similarly. Rename NO_SIGNED_GET to NO_GETS.
220 * hpux-core.c: Likewise.
221 * irix-core.c: Likewise.
222 * netbsd-core.c: Likewise.
223 * osf-core.c: Likewise.
224 * ptrace-core.c: Likewise.
225 * sco5-core.c: Likewise.
226 * trad-core.c: Likewise.
227 * bfd-in2.h: Regenerate.
228
229 2004-03-15 Matt Thomas <matt@3am-software.com>
230
231 * config.bfd: Add x86-64 vector to NetBSD/i386 if 64bit BFD is
232 selected.
233
234 2004-03-13 Mark Kettenis <kettenis@gnu.org>
235
236 * config.bfd: Add x86_64-*-openbsd*.
237 * configure.in (x86_64-*-openbsd*): Set COREFILE to
238 netbsd-core.lo.
239 * configure: Regenerate.
240
241 2004-03-12 Nick Clifton <nickc@redhat.com>
242 Dave Murphy <wintermute2k4@ntlworld.com>
243
244 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Skip most checks
245 if the input bfd does not contain any code.
246
247 2004-03-09 Steve Ellcey <sje@cup.hp.com>
248
249 * elfxx-ia64.c (plt_full_entry): Change ld8 to ld8.acq.
250
251 2004-03-05 Fred Fish <fnf@redhat.com>
252
253 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Just force
254 mips16 symbols to be even rather than testing first for even/odd.
255 (_bfd_mips_elf_link_output_symbol_hook): Ditto.
256
257 2004-03-05 Nathan Sidwell <nathan@codesourcery.com>
258
259 * elf.c (map_sections_to_segments): Ignore .tbss sections for
260 layout purposes.
261
262 2004-03-03 Alexandre Oliva <aoliva@redhat.com>
263
264 * elflink.c (bfd_elf_record_link_assignment): Mark undefweak and
265 undefined symbols as hash_new.
266
267 2003-03-03 Andrew Stubbs <andrew.stubbs@superh.com>
268
269 * archures.c: Add bfd_mach_sh4_nommu_nofpu.
270 * cpu-sh.c: Ditto.
271 * elf32-sh.c: Ditto.
272 * bfd-in2.h: Regenerate.
273
274 2004-03-02 Alexandre Oliva <aoliva@redhat.com>
275
276 * elf32-frv.c (struct frv_pic_relocs_info): Added fixups and
277 dynrelocs.
278 (_frv_count_got_plt_entries): Initialize them.
279 (frv_pic_relocs_info_find): Add insert argument. Adjust all
280 callers.
281 (frv_pic_relocs_info_for_global): Likewise.
282 (frv_pic_relocs_info_for_local): Likewise.
283 (frv_pic_merge_early_relocs_info): New.
284 (_frv_resolve_final_relocs_info): Use it in case one entry maps to
285 another.
286 (_frv_add_dyn_reloc): Add entry argument. Adjust all callers.
287 Check that we don't exceed the allocated count for entry.
288 (_frv_add_rofixup): Likewise.
289 (_frv_emit_got_relocs_plt_entries): Adjust for coding standards.
290 (elf32_frv_finish_dynamic_sections): Improve error message in case
291 we emit too few rofixup entries.
292
293 2004-03-01 Richard Sandiford <rsandifo@redhat.com>
294
295 * archures.c (bfd_mach_fr450): New.
296 * bfd-in2.h: Regenerate.
297 * cpu-frv.c (arch_info_450): New bfd_arch_info_type.
298 (arch_info_500): Link to it.
299 * elf32-frv.c (elf32_frv_machine, frv_elf_merge_private_bfd_data)
300 (frv_elf_print_private_bfd_data): Handle fr405 and fr450 header flags.
301 (frv_elf_arch_extension_p): New function.
302 (frv_elf_merge_private_bfd_data): Use it.
303
304 2004-02-28 H.J. Lu <hongjiu.lu@intel.com>
305
306 * elf-bfd.h (_bfd_elf_link_add_archive_symbols): New prototype.
307
308 * elflink.h (is_global_data_symbol_definition): Moved to
309 elflink.c.
310 (elf_link_is_defined_archive_symbol): Likewise.
311 (elf_link_add_archive_symbols): Likewise. Renamed to
312 _bfd_elf_link_add_archive_symbols.
313
314 * elflink.c (elf_link_is_defined_archive_symbol): Get the size
315 of ELF symbol table entry from backend.
316 (_bfd_elf_link_add_archive_symbols): Call bfd_link_add_symbols
317 instead of elf_link_add_object_symbols.
318
319 2004-02-27 Alexandre Oliva <aoliva@redhat.com>
320
321 * elf-bfd.h (struct elf_backend_data): Added
322 elf_backend_can_make_relative_eh_frame,
323 elf_backend_can_make_lsda_relative_eh_frame and
324 elf_backend_encode_eh_address.
325 (_bfd_elf_encode_eh_address): Declare.
326 (_bfd_elf_can_make_relative): Declare.
327 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use new
328 hooks to decide whether to attempt to make_relative and
329 make_lsda_relative.
330 (_bfd_elf_write_section_eh_frame_hdr): Call encode_eh_address.
331 (_bfd_elf_can_make_relative): New.
332 (_bfd_elf_encode_eh_address): New.
333 * elf32-frv.c (frv_elf_use_relative_eh_frame): New.
334 (frv_elf_encode_eh_address): New.
335 (elf_backend_can_make_relative_eh_frame): Define.
336 (elf_backend_can_make_lsda_relative_eh_frame): Define.
337 (elf_backend_encode_eh_address): Define.
338 * elfxx-target.h
339 (elf_backend_can_make_relative_eh_frame): Define.
340 (elf_backend_can_make_lsda_relative_eh_frame): Define.
341 (elf_backend_encode_eh_address): Define.
342 (elfNN_bed): Add them.
343
344 2004-02-27 Alexandre Oliva <aoliva@redhat.com>
345
346 * elf32-frv.c (elf32_frv_howto_table) <R_FRV_LABEL16>: Set
347 complain_on_overflow to signed.
348
349 2004-02-27 H.J. Lu <hongjiu.lu@intel.com>
350
351 * elflink.h (sort_symbol): New.
352 (elf_link_add_object_symbols): Use a sorted symbol array for
353 weakdef.
354
355 2004-02-27 Jakub Jelinek <jakub@redhat.com>
356
357 * elf32-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
358 for pc relative relocs.
359 (elf_s390_relocate_section): Likewise.
360 * elf64-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
361 for pc relative relocs.
362 (elf_s390_relocate_section): Likewise.
363
364 2004-02-26 H.J. Lu <hongjiu.lu@intel.com>
365
366 * elfxx-ia64.c (elfNN_ia64_check_relocs): Fix call to
367 count_dyn_reloc.
368
369 2004-02-25 H.J. Lu <hongjiu.lu@intel.com>
370
371 * elfxx-ia64.c (elfNN_ia64_dyn_reloc_entry): Add the reltext.
372 field to track if a relocation is against readonly section.
373 (count_dyn_reloc): Take a new argument for rent->reltext.
374 (elfNN_ia64_check_relocs): Adjust call to count_dyn_reloc.
375 (get_reloc_section): Don't set ia64_info->reltext here.
376 (allocate_dynrel_entries): Set ia64_info->reltext here.
377
378 2004-02-24 Alexandre Oliva <aoliva@redhat.com>
379
380 * elf32-frv.c (FRV_SYM_LOCAL): Weak undefined doesn't imply local.
381 (_frv_emit_got_relocs_plt_entries): Decay relocation to protected
382 function's descriptor to symbol+offset, and map local undefweak
383 symbol to NULL function descriptor.
384 (elf32_frv_relocate_section): Likewise.
385
386 2004-02-23 Mark Kettenis <kettenis@gnu.org>
387
388 * libaout.h (enum machine_type): Add M_SPARC64_NETBSD and
389 M_X86_64_NETBSD.
390 * netbsd-core.c (M_SPARC64_OPENBSD): Define.
391 (netbsd_core_file_p): Set architecture from machine ID for
392 selected machines.
393
394 2004-02-23 Jakub Jelinek <jakub@redhat.com>
395
396 * elflink.h (size_dynamic_sections): If not adding DT_FLAGS and
397 DF_BIND_NOW is set in info->flags, create DT_BIND_NOW dynamic entry.
398
399 2004-02-21 H.J. Lu <hongjiu.lu@intel.com>
400
401 * elflink.c (_bfd_elf_merge_symbol): Properly handle undefined
402 symbols with non-default visibility.
403
404 2004-02-21 Danny Smith <daanysmith@users.sourceforge.net>
405
406 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Clear
407 IMAGE_SCN_MEM_WRITE on known sections only.
408
409 2004-02-20 Jakub Jelinek <jakub@redhat.com>
410
411 * elf32-ppc.c (allocate_dynrelocs): Create dynsym for undef weak
412 symbols used in PIE relocs.
413
414 2004-02-19 Jakub Jelinek <jakub@redhat.com>
415
416 * elf32-sparc.c (elf32_sparc_finish_dynamic_sections): Clear
417 .plt sh_entsize.
418
419 2004-02-18 Daniel Jacobowitz <drow@mvista.com>
420
421 * configure.in: Update version to 2.15.90.
422 * configure: Regenerate.
423
424 2004-02-17 Daniel Jacobowitz <drow@mvista.com>
425 Richard Sandiford <rsandifo@redhat.com>
426
427 * elfxx-mips.c (mips_elf_calculate_relocation): Use
428 _bfd_elf_symbol_refs_local_p to decide whether to decay
429 a GOT_PAGE/GOT_OFST pair to GOT_DISP/addend.
430 (_bfd_mips_elf_check_relocs): Add a global GOT entry for GOT_PAGE
431 relocs if the symbol wasn't defined by a regular object file.
432 Don't check the symbol's dynindx.
433
434 2004-02-16 Andrew Cagney <cagney@redhat.com>
435
436 * bfd-in.h (file_ptr, ufile_ptr): Configure type using
437 @bfd_file_ptr@.
438 * bfd-in2.h: Re-generate.
439
440 2004-02-14 Andrew Cagney <cagney@redhat.com>
441
442 * configure.host (HDEFINES): When hppa*-*-hpux*, define
443 _LARGEFILE64_SOURCE.
444
445 2004-02-13 Andrew Cagney <cagney@redhat.com>
446
447 * elf.c (vma_page_aligned_bias): New function.
448 (assign_file_positions_except_relocs)
449 (assign_file_positions_for_segments): Replace broken modulo
450 arithmetic with call to vma_page_aligned_bias.
451
452 2004-02-11 Andrew Cagney <cagney@redhat.com>
453
454 * bfd-in.h: Update copyright.
455 (bfd_tell): Change return type to file_ptr.
456 * bfd-in2.h: Re-generate.
457 * cache.c: Update copyright.
458 (bfd_cache_lookup_worker): Use real_fseek, do not cast offset
459 parameter.
460 (close_one): Use real_ftell.
461 * bfdio.c: Update copyright.
462 (real_ftell, real_fseek): New functions.
463 (bfd_tell): Use real_fseek and real_ftell, change return type to
464 file_ptr.
465 (bfd_seek): Use real_ftell and real_fseek, change type of
466 file_position to a file_ptr.
467 * libbfd-in.h: Update copyright.
468 (real_ftell, real_fseek): Declare.
469 * libbfd.h: Re-generate.
470
471 * configure.in (AC_CHECK_FUNCS): Check for ftello, ftello64,
472 fseeko and fseeko64. Determine bfd_file_ptr.
473 * configure: Re-generate.
474 * config.in: Re-generate.
475
476 2004-02-09 Anil Paranjpe <anilp1@KPITCummins.com>
477
478 * coff-h8300.c: Added comments about relaxation for ldc.w and stc.w.
479 * elf32-h8300.c: Likewise.
480
481 2004-02-09 Christian Vogel <vogelchr@vogel.cx>
482 Nick Clifton <nickc@redhat.com>
483
484 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Catch
485 GOT entries with no associated GOT subsection.
486
487 2004-02-09 Richard Sandiford <rsandifo@redhat.com>
488
489 * bfd-elf.h (elf_backend_name_local_section_symbols): New hook.
490 * elf.c (swap_out_syms): Use it to decide whether local section
491 symbols should be named.
492 * elfxx-target.h (elf_backend_name_local_section_symbols): New macro.
493 * elfxx-mips.h (_bfd_mips_elf_name_local_section_symbols): Declare.
494 (elf_backend_name_local_section_symbols): Define.
495 * elfxx-mips.c (_bfd_mips_elf_name_local_section_symbols): New.
496
497 2004-01-30 H.J. Lu <hongjiu.lu@intel.com>
498
499 * elfxx-ia64.c (elfNN_ia64_relax_brl): New function.
500 (elfNN_ia64_relax_section): Optimize brl to br during the relax
501 finalize pass.
502
503 2004-01-30 Alexandre Oliva <aoliva@redhat.com>
504
505 * elf32-frv.c (elf32_frv_always_size_sections): Initialize pointer
506 to bfd_link_hash_entry passed by reference to
507 _bfd_generic_link_add_one_symbol.
508
509 2004-01-25 H.J. Lu <hongjiu.lu@intel.com>
510
511 * elfxx-ia64.c (elfNN_ia64_relocate_section): Disallow imm
512 relocations against dynamic symbols.
513
514 2004-01-23 Daniel Jacobowitz <drow@mvista.com>
515
516 * elf32-arm.h (elf32_arm_check_relocs): Revert part of 2004-01-13
517 change.
518
519 2004-01-21 Tom Rix <tcrix@worldnet.att.net>
520
521 * reloc.c: New 5 bit reloc, BFD_RELOC_M68HC12_5B, for m68hc12 movb/movw.
522 * bfd-in2.h, libbfd.h: Rebuilt.
523
524 2004-01-20 Danny Smith <dannysmith@users.sourceforge.net>
525
526 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Don't remove
527 IMAGE_SCN_MEM_WRITE flag from .text section if WP_TEXT
528 flag has been cleared.
529
530 2004-01-19 Kazu Hirata <kazu@cs.umass.edu>
531
532 * coff-h8300.c: Add and adjust comments about relaxation.
533 * elf32-h8300.c: Likewise.
534
535 2004-01-16 Kazu Hirata <kazu@cs.umass.edu>
536
537 * coff-h8300.c: Fix comment typos.
538 * elf32-h8300.c: Likewise.
539
540 2004-01-16 Kazu Hirata <kazu@cs.umass.edu>
541
542 * coff-h8300.c: Add comments about relaxation.
543 * elf32-h8300.c: Likewise.
544
545 2004-01-14 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
546
547 * acinclude.m4: Quote names of macros to be defined by AC_DEFUN
548 throughout.
549 * aclocal.m4: Regenerate.
550 * configure: Regenerate.
551
552 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
553
554 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Call
555 mips_elf64_rtype_to_howto instead of using howto_table.
556
557 2004-01-13 Daniel Jacobowitz <drow@mvista.com>
558
559 * elf32-arm.h (elf32_arm_final_link_relocate): Check that we created
560 the .plt section.
561 (elf32_arm_check_relocs): Don't increment the PLT refcount for
562 relocs which would not use the PLT.
563
564 2004-01-13 Alan Modra <amodra@bigpond.net.au>
565
566 * elf64-ppc.c (ppc64_elf_check_relocs): Ignore !SEC_ALLOC relocs.
567 (ppc64_elf_gc_sweep_hook): Likewise.
568 (ppc64_elf_size_dynamic_sections): Test for .plt directly.
569
570 2004-01-12 Anil Paranjpe <anilp1@KPITCummins.com>
571
572 Adds linker relaxation support for bit manipulation insns like
573 band, bclr, biand, bild, bior, bist, bixor, bld, bnot, bor, bset,
574 bst, btst, bxor.
575 * elf32-h8300.c: Opcode for bit manipulation insn is checked in
576 elf32_h8_relax_section function while relxation for aa:16 and aa:32.
577 * coff-h8300.c: Opcode for bit manipulation insn is checked in
578 h8300_reloc16_extra_cases function while relxation for aa:16 and aa:32.
579
580 2004-01-12 Alan Modra <amodra@bigpond.net.au>
581
582 * dwarf2.c: Convert to C90, remove unneeded casts and prototypes.
583
584 2004-01-11 Kazu Hirata <kazu@cs.umass.edu>
585
586 * elf32-h8300.c: Fix formatting.
587
588 2004-01-11 Kazu Hirata <kazu@cs.umass.edu>
589
590 * elf32-cris.c (cris_elf_gc_sweep_hook): Return early if no
591 dynamic object is present. Declare r_symndx and h in an inner
592 scope.
593 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
594
595 2004-01-09 Daniel Jacobowitz <drow@mvista.com>
596
597 * elf32-arm.h (struct elf32_arm_relocs_copied): Remove pc_count.
598 (elf32_arm_copy_indirect_symbol): Don't copy pc_count.
599 (elf32_arm_final_link_relocate): Handle PLT32 and PC24 relocs
600 identically. Do not emit PC24 relocations for shared libraries.
601 (elf32_arm_gc_sweep_hook): Handle PLT32 and PC24 relocs
602 identically. Don't adjust pc_count.
603 (elf32_arm_check_relocs): Handle PLT32 and PC24 relocs identically.
604 Set ELF_LINK_HASH_NEEDS_PLT for both. Don't adjust pc_count; don't
605 adjust count for branch relocations.
606 (allocate_dynrelocs): Correct typo in call to
607 WILL_CALL_FINISH_DYNAMIC_SYMBOL. Never allocate space for
608 PC24 or PLT32 relocs when linking.
609
610 2004-01-09 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
611
612 * coff-arm.c (aoutarm_std_reloc_howto): [ARM_WINCE] Synchronize ARM_26D
613 relocation howto with ARM_26 one for consistency.
614 (coff_arm_relocate_section): Set partial_inplace for ARM_26 relocations
615 that will be converted to ARM_26D ones, since we always want 'done'
616 relocations to be reflected in section's data.
617 (coff_arm_relocate_section): [ARM_WINCE] Quick fix for BL instruction
618 offset.
619 (_bfd_final_link_relocate): Do not modify "inplace" data, if not
620 requested.
621
622 2004-01-08 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
623
624 * coff-arm.c (coff_arm_relocate_section): Do not alter relocs that
625 are not partial_inplace during a relocatable link.
626
627 2004-01-08 Kazu Hirata <kazu@cs.umass.edu>
628
629 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Return early
630 if no dynamic object is present. Declare r_symndx and h in an
631 inner scope.
632
633 2004-01-07 H.J. Lu <hongjiu.lu@intel.com>
634
635 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't install
636 trampoline if it is known out of range.
637
638 2004-01-06 Alexandre Oliva <aoliva@redhat.com>
639
640 2003-12-17 Alexandre Oliva <aoliva@redhat.com>
641 * elf32-frv.c (_frv_osec_readonly_p): New.
642 (_frv_emit_got_relocs_plt_entries): Don't emit rofixup for
643 undefweak symbol.
644 (_frv_count_got_plt_entries): Adjust expected count accordingly.
645 (elf32_frv_relocate_section): Likewise. Error out if attempting
646 to emit rofixups or dynamic relocs in read-only segments. Use
647 _bfd_elf_section_offset to adjust r_offsets in rofixups and
648 dynamic relocations.
649 2003-12-12 Alexandre Oliva <aoliva@redhat.com>
650 * elf32-frv.c (elf32_frv_relocate_section): Compute dynamic
651 relocations or fixups involving merged sections correctly. Avoid
652 crash when undefined symbol is referenced by R_FRV_32 or
653 R_FRV_FUNCDESC_VALUE.
654 2003-12-02 Alexandre Oliva <aoliva@redhat.com>
655 * elf32-frv.c (elf32_frv_relocate_section): Add output_offset of
656 input section holding local symbol to addend of R_FRV_32 or
657 R_FRV_FUNCDESC_VALUE dynamic relocation.
658 2003-11-27 Alexandre Oliva <aoliva@redhat.com>
659 * elf32-frv.c (elf32_frv_modify_segment_map): Add link info arg.
660 (elf32_frv_always_size_sections): Don't store pointer to
661 __stacksize symbol in sec_info.
662 (elf32_frv_modify_segment_map): Look it up here.
663 2003-11-26 Alexandre Oliva <aoliva@redhat.com>
664 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Emit the address
665 of the lazy PLT entry, not only its offset, as the low word of a
666 function descriptor.
667 2003-11-10 Alexandre Oliva <aoliva@redhat.com>
668 * elf32-frv.c (elf32_frv_always_size_sections): Define __stacksize
669 if a hash table entry already exists but is not a definition.
670 2003-11-05 Alexandre Oliva <aoliva@redhat.com>
671 * elf32-frv.c (frv_elf_link_hash_table_create): Use bfd_zalloc.
672 (_frv_add_rofixup): Don't inline.
673 (_frv_emit_got_relocs_plt_entries): Use NULL as funcdesc address
674 for undefweak symbols.
675 (elf32_frv_relocate_section): Avoid crash while computing
676 relocation when linking with shared library. Only emit rofixups
677 and dynamic relocations for alloc&load sections. Mark binaries
678 with inter-segment relocations for relocation as a unit.
679 (_frv_create_got_section): Rename .rofixup.got to .rofixup.
680 (DEFAULT_STACK_SIZE): New.
681 (_frv_count_got_plt_entries): Fix thinko in deciding whether to
682 emit rofixups or dynamic relocs when linking dynamic non-PIE
683 executables.
684 (elf32_frv_size_dynamic_sections): Generate rofixup on PIEs and
685 shared libs too. Reserve the last entry for the GOT pointer.
686 (elf32_frv_finish_dynamic_sections): Emit it.
687 (elf32_frv_always_size_sections): New.
688 (elf32_frv_modify_segment_map): New.
689 (elf32_frv_check_relocs): Reserve relocs32 space only in ALLOC
690 sections.
691 (frv_elf_merge_private_bfd_data): Clear PIC bit if FDPIC is set.
692 (frv_elf_print_private_bfd_data): Handle FDPIC and LIBPIC.
693 (elf_backend_always_size_sections): New.
694 (elf_backend_modify_segment_map): New.
695 2003-10-31 Alexandre Oliva <aoliva@redhat.com>
696 * config.bfd: Added frv-*-*linux*.
697 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Use idx 0 for
698 ABS section, instead of crashing.
699 (elf32_frv_relocate_section): Don't crash before warning about
700 different segments in non-PIC relocation.
701 2003-10-17 Alexandre Oliva <aoliva@redhat.com>
702 * elf32-frv.c (elf32_frv_relocate_section): Don't warn on LABEL24
703 relocs to undefweak symbols.
704 (elf32_frv_relocate_section): Ditto for undefined symbols.
705 2003-10-06 Alexandre Oliva <aoliva@redhat.com>
706 * elf32-frv.c (elf32_frv_create_dynamic_sections): Make sure
707 gotfixup section was created.
708 2003-09-30 Alexandre Oliva <aoliva@redhat.com>
709 * elf32-frv.c (elf32_frv_howto_table): Change GOT12,
710 FUNCDESC_GOT12, GOTOFF12 and FUNCDESC_GOTOFF12 to
711 complain_overflow_signed.
712 * elf32-frv.c (_frv_add_rofixup): Do not error out if contents
713 have not been allocated.
714 (_frv_emit_got_relocs_plt_entries): Return non-void. Assert
715 privfd only if dynamic sections were created.
716 (elf32_frv_relocate_section): Compute gprel_segment, and use it
717 for GPREL relocs. When linking relocatable FDPIC executables,
718 emit warnings for relocations that would be illegal on PIE or
719 shared libraries. Emit rofixup for R_FRV_32 only if input object
720 is not FDPIC.
721 (_frv_create_got_section): Define _gp symbol in the rofixup
722 section.
723 (elf32_frv_finish_dynamic_sections): If rofixups needed but
724 dynamic sections missing, error out requesting -melf32frvfd.
725 2003-09-19 Alexandre Oliva <aoliva@redhat.com>
726 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Rearrange
727 computation of addends from section and global or local symbol
728 value. Change return type to bfd_boolean, and return a failure if
729 a dynamic FUNCDESC or FUNCDESC_VALUE relocation that requires a
730 nonzero addend is required.
731 (elf32_frv_relocate_section): Likewise. Print error for
732 unsupported nonzero addends.
733 2003-09-18 Alexandre Oliva <aoliva@redhat.com>
734 * elf32-frv.c (FRV_SYM_LOCAL): In the absence of dynamic sections,
735 force everything local.
736 (_frv_emit_got_relocs_plt_entries): Cope with NULL sec.
737 * elf32-frv.c (struct frv_elf_link_hash_table): Added sgotfixup.
738 (frv_gotfixup_section): New.
739 (FRV_SYM_LOCAL): Accept undefweak and local common symbols.
740 (struct frv_pic_relocs_info): Split relocs into relocs32, relocsfd
741 and relocsfdv.
742 (_frv_add_rofixup): New.
743 (_frv_emit_got_relocs_plt_entries): Generate fixups for non-PIE
744 fdpic executables. Use FRV_SYM_LOCAL more widely to simplify and
745 improve some ugly conditions.
746 (elf32_frv_relocate_section): Likewise. Reject inter-segment
747 relocations in fdpic.
748 (_frv_create_got_section): Create .rofixup.got section.
749 (struct _frv_dynamic_got_info): Added fixups.
750 (_frv_count_got_plt_entries): Account in-GOT relocations into
751 relocs32, relocsfd and relocsfdv. Account them into relocs or
752 fixups, as appropriate.
753 (elf32_frv_size_dynamic_sections): Size rofixup section. Simplify
754 sizing of gotrel.
755 (elf32_frv_finish_dynamic_sections): Verify that the right number
756 of relocations and fixups was generated.
757 (elf32_frv_check_relocs): Compute relocs32, relocsfd and
758 relocsfdv.
759 * elf32-frv.c (FRV_SYM_LOCAL): New macro, used instead of
760 SYMBOL_CALLS_LOCAL and SYMBOL_REFERENCES_LOCAL.
761 (FRV_FUNCDESC_LOCAL): New macro, used to decide whether a function
762 descriptor of a (formerly-)global symbol is local.
763 (struct frv_pic_relocs_info): Adjust comments.
764 (_frv_emit_got_relocs_plt_entries): Adjust.
765 (elf32_frv_relocate_section): Likewise.
766 (_frv_count_got_plt_entries): Likewise.
767 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Don't add global
768 symbol's value to addend in the common preamble. Decay dynamic
769 symbols to section+offset if they bind or call locally, for GOT
770 and FUNCDESC_VALUE, respectively.
771 (elf32_frv_relocate_section): Likewise.
772 (elf32_frv_check_relocs): Don't register as dynamic symbols of
773 internal or hidden visibility.
774 2003-09-17 Alexandre Oliva <aoliva@redhat.com>
775 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Get addend as
776 argument, so as to not call _bfd_elf_rel_local_sym to compute it.
777 (elf32_frv_relocate_section): Pass relocation addend in. Use
778 original relocation addend to look up the got relocs/plt entries
779 table. Do not call _bfd_elf_rel_local_sym. Don't error out when
780 processing relocations that reference .scommon symbols.
781 2003-09-15 Alexandre Oliva <aoliva@redhat.com>
782 Introduce support for dynamic linking.
783 * elf32-frv.c (R_FRV_FUNCDESC_VALUE): Mark it as 64 bits.
784 (elf32_frv_rel_32_howto, elf32_frv_rel_funcdesc_howto,
785 elf32_frv_rel_funcdesc_value_howto): New REL descriptors.
786 (frv_reloc_type_lookup): Return REL howtos for executables and
787 dynamic libraries.
788 (frv_info_to_howto_rel): New.
789 (struct frv_elf_link_hash_table): New.
790 (frv_hash_table, frv_got_section, frv_gotrel_section,
791 frv_plt_section, frv_pltrel_section, frv_relocs_info,
792 frv_got_initial_offset, frv_plt_initial_offset): New macros.
793 (frv_elf_link_hash_table_create): New.
794 (struct frv_pic_relocs_info): New.
795 (frv_pic_relocs_info_hash, frv_pic_relocs_info_eq): New.
796 (frv_pic_relocs_info_find): New.
797 (frv_pic_relocs_info_for_global, frv_pic_relocs_info_for_local):
798 New.
799 (FRV_LZPLT_BLOCK_SIZE, FRV_LZPLT_RESOLVE_LOC): New.
800 (_frv_add_dyn_reloc, _frv_osec_to_segment): New.
801 (_frv_emit_got_relocs_plt_entries): New.
802 (elf32_frv_relocate_section): Add support for dynamic linking.
803 Handle new relocations.
804 (_frv_create_got_section): New.
805 (elf32_frv_create_dynamic_sections): New.
806 (ELF_DYNAMIC_INTERPRETER): New.
807 (struct _frv_dynamic_got_info): New.
808 (_frv_count_got_plt_entries): New.
809 (struct _frv_dynamic_got_plt_info): New.
810 (_frv_compute_got_alloc_data): New.
811 (_frv_get_got_entry, _frv_get_fd_entry): New.
812 (_frv_assign_got_entries, _frv_assign_plt_entries): New.
813 (_frv_resolve_final_relocs_info): New.
814 (elf32_frv_size_dynamic_sections): New.
815 (elf32_frv_finish_dynamic_sections): New.
816 (elf32_frv_adjust_dynamic_symbol): New.
817 (elf32_frv_finish_dynamic_symbol): New.
818 (elf32_frv_check_relocs): Handle new relocs. Explain how the
819 whole thing works.
820 (elf_info_to_howto_rel): Define.
821 (bfd_elf32_bfd_link_hash_table_create): Define.
822 (elf_backend_create_dynamic_sections): Define.
823 (elf_backend_adjust_dynamic_symbol): Define.
824 (elf_backend_size_dynamic_sections): Define.
825 (elf_backend_finish_dynamic_symbol): Define.
826 (elf_backend_finish_dynamic_sections): Define.
827 (elf_backend_want_got_sym): Define.
828 (elf_backend_got_header_size): Define.
829 (elf_backend_want_got_plt): Define.
830 (elf_backend_plt_readonly): Define.
831 (elf_backend_want_plt_sym): Define.
832 (elf_backend_plt_header_size): Define.
833 (elf_backend_may_use_rel_p): Define.
834 (elf_backend_may_use_rela_p): Define.
835 (elf_backend_default_use_rela_p): Define.
836 2003-08-08 Alexandre Oliva <aoliva@redhat.com>
837 * elf32-frv.c (R_FRV_FUNCDESC_VALUE, R_FRV_FUNCDESC_GOTOFF12,
838 R_FRV_FUNCDESC_GOTOFFHI, R_FRV_FUNCDESC_GOTOFFLO, R_FRV_GOTOFF12,
839 R_FRV_GOTOFFHI, R_FRV_GOTOFFLO): New.
840 (frv_reloc_map): Map the corresponding BFD relocs to them.
841 (frv_reloc_type_lookup): ... and back to BFD relocs.
842 * reloc.c: New relocs.
843 * bfd-in2.h, libbfd.h: Rebuilt.
844 2003-08-04 Alexandre Oliva <aoliva@redhat.com>
845 * elf32-frv.c (R_FRV_GOT12, R_FRV_GOTHI, R_FRV_GOTLO,
846 R_FRV_FUNCDESC, R_FRV_FUNCDESC_GOT12, R_FRV_FUNCDESC_GOTHI,
847 R_FRV_FUNCDESC_GOTLO): New.
848 (frv_reloc_map): Map the corresponding BFD relocs to them.
849 (frv_reloc_type_lookup): ... and back to BFD relocs.
850 * reloc.c: New relocs.
851 * bfd-in2.h, libbfd.h: Rebuilt.
852
853 2004-01-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
854
855 * elf32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
856 targets to support pages of up to 64kB.
857 (elf32_bed): Redefine to get a separate backend data structure for
858 traditional targets.
859 * elf64-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
860 targets to support pages of up to 64kB.
861 (elf64_bed): Redefine to get a separate backend data structure for
862 traditional targets.
863 * elfn32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
864 targets to support pages of up to 64kB.
865 (elf32_bed): Redefine to get a separate backend data structure for
866 traditional targets.
867
868 2004-01-04 Mark Kettenis <kettenis@gnu.org>
869
870 * elf32-sparc.c (elf32_sparc_grok_psinfo): New function.
871
872 2004-01-02 Mark Kettenis <kettenis@gnu.org>
873
874 * elf32-i386.c (elf_i386_grok_prstatus): Add support for FreeBSD.
875 (elf_i386_grok_psinfo): Likewise.
876
877 2004-01-02 Bernardo Innocenti <bernie@develer.com>
878
879 * config.bfd: Add m68k-uClinux target.
880
881 2004-01-01 Grant Edwards <grante@visi.com>
882
883 * elflink.h (elf_gc_sections): Warn when gc-sections option is ignored.
884 * elf32-h8300.c (elf32_h8_gc_mark_hook): New function.
885 (elf32_h8_gc_sweep_hook): New function.
886 (elf_backend_gc_mark_hook): Define.
887 (elf_backend_gc_sweep_hook): Define.
888 (elf_backend_can_gc_sections): Define.
889
890 For older changes see ChangeLog-0203
891 \f
892 Local Variables:
893 mode: change-log
894 left-margin: 8
895 fill-column: 74
896 version-control: never
897 End: