1 2004-01-12 Anil Paranjpe <anilp1@KPITCummins.com>
3 Adds linker relaxation support for bit manipulation insns like
4 band, bclr, biand, bild, bior, bist, bixor, bld, bnot, bor, bset,
6 * elf32-h8300.c : Opcode for bit manipulation insn is checked in
7 elf32_h8_relax_section function while relxation for aa:16 and aa:32.
8 * coff-h8300.c : Opcode for bit manipulation insn is checked in
9 h8300_reloc16_extra_cases function while relxation for aa:16 and aa:32.
11 2004-01-12 Alan Modra <amodra@bigpond.net.au>
13 * dwarf2.c: Convert to C90, remove unneeded casts and prototypes.
15 2004-01-11 Kazu Hirata <kazu@cs.umass.edu>
17 * elf32-h8300.c: Fix formatting.
19 2004-01-11 Kazu Hirata <kazu@cs.umass.edu>
21 * elf32-cris.c (cris_elf_gc_sweep_hook): Return early if no
22 dynamic object is present. Declare r_symndx and h in an inner
24 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
26 2004-01-09 Daniel Jacobowitz <drow@mvista.com>
28 * elf32-arm.h (struct elf32_arm_relocs_copied): Remove pc_count.
29 (elf32_arm_copy_indirect_symbol): Don't copy pc_count.
30 (elf32_arm_final_link_relocate): Handle PLT32 and PC24 relocs
31 identically. Do not emit PC24 relocations for shared libraries.
32 (elf32_arm_gc_sweep_hook): Handle PLT32 and PC24 relocs
33 identically. Don't adjust pc_count.
34 (elf32_arm_check_relocs): Handle PLT32 and PC24 relocs identically.
35 Set ELF_LINK_HASH_NEEDS_PLT for both. Don't adjust pc_count; don't
36 adjust count for branch relocations.
37 (allocate_dynrelocs): Correct typo in call to
38 WILL_CALL_FINISH_DYNAMIC_SYMBOL. Never allocate space for
39 PC24 or PLT32 relocs when linking.
41 2004-01-09 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
43 * coff-arm.c (aoutarm_std_reloc_howto): [ARM_WINCE] Synchronize ARM_26D
44 relocation howto with ARM_26 one for consistency.
45 (coff_arm_relocate_section): Set partial_inplace for ARM_26 relocations
46 that will be converted to ARM_26D ones, since we always want 'done'
47 relocations to be reflected in section's data.
48 (coff_arm_relocate_section): [ARM_WINCE] Quick fix for BL instruction
50 (_bfd_final_link_relocate): Do not modify "inplace" data, if not
53 2004-01-08 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
55 * coff-arm.c (coff_arm_relocate_section): Do not alter relocs that
56 are not partial_inplace during a relocatable link.
58 2004-01-08 Kazu Hirata <kazu@cs.umass.edu>
60 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Return early
61 if no dynamic object is present. Declare r_symndx and h in an
64 2004-01-07 H.J. Lu <hongjiu.lu@intel.com>
66 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't install
67 trampoline if it is known out of range.
69 2004-01-06 Alexandre Oliva <aoliva@redhat.com>
71 2003-12-17 Alexandre Oliva <aoliva@redhat.com>
72 * elf32-frv.c (_frv_osec_readonly_p): New.
73 (_frv_emit_got_relocs_plt_entries): Don't emit rofixup for
75 (_frv_count_got_plt_entries): Adjust expected count accordingly.
76 (elf32_frv_relocate_section): Likewise. Error out if attempting
77 to emit rofixups or dynamic relocs in read-only segments. Use
78 _bfd_elf_section_offset to adjust r_offsets in rofixups and
80 2003-12-12 Alexandre Oliva <aoliva@redhat.com>
81 * elf32-frv.c (elf32_frv_relocate_section): Compute dynamic
82 relocations or fixups involving merged sections correctly. Avoid
83 crash when undefined symbol is referenced by R_FRV_32 or
85 2003-12-02 Alexandre Oliva <aoliva@redhat.com>
86 * elf32-frv.c (elf32_frv_relocate_section): Add output_offset of
87 input section holding local symbol to addend of R_FRV_32 or
88 R_FRV_FUNCDESC_VALUE dynamic relocation.
89 2003-11-27 Alexandre Oliva <aoliva@redhat.com>
90 * elf32-frv.c (elf32_frv_modify_segment_map): Add link info arg.
91 (elf32_frv_always_size_sections): Don't store pointer to
92 __stacksize symbol in sec_info.
93 (elf32_frv_modify_segment_map): Look it up here.
94 2003-11-26 Alexandre Oliva <aoliva@redhat.com>
95 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Emit the address
96 of the lazy PLT entry, not only its offset, as the low word of a
98 2003-11-10 Alexandre Oliva <aoliva@redhat.com>
99 * elf32-frv.c (elf32_frv_always_size_sections): Define __stacksize
100 if a hash table entry already exists but is not a definition.
101 2003-11-05 Alexandre Oliva <aoliva@redhat.com>
102 * elf32-frv.c (frv_elf_link_hash_table_create): Use bfd_zalloc.
103 (_frv_add_rofixup): Don't inline.
104 (_frv_emit_got_relocs_plt_entries): Use NULL as funcdesc address
105 for undefweak symbols.
106 (elf32_frv_relocate_section): Avoid crash while computing
107 relocation when linking with shared library. Only emit rofixups
108 and dynamic relocations for alloc&load sections. Mark binaries
109 with inter-segment relocations for relocation as a unit.
110 (_frv_create_got_section): Rename .rofixup.got to .rofixup.
111 (DEFAULT_STACK_SIZE): New.
112 (_frv_count_got_plt_entries): Fix thinko in deciding whether to
113 emit rofixups or dynamic relocs when linking dynamic non-PIE
115 (elf32_frv_size_dynamic_sections): Generate rofixup on PIEs and
116 shared libs too. Reserve the last entry for the GOT pointer.
117 (elf32_frv_finish_dynamic_sections): Emit it.
118 (elf32_frv_always_size_sections): New.
119 (elf32_frv_modify_segment_map): New.
120 (elf32_frv_check_relocs): Reserve relocs32 space only in ALLOC
122 (frv_elf_merge_private_bfd_data): Clear PIC bit if FDPIC is set.
123 (frv_elf_print_private_bfd_data): Handle FDPIC and LIBPIC.
124 (elf_backend_always_size_sections): New.
125 (elf_backend_modify_segment_map): New.
126 2003-10-31 Alexandre Oliva <aoliva@redhat.com>
127 * config.bfd: Added frv-*-*linux*.
128 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Use idx 0 for
129 ABS section, instead of crashing.
130 (elf32_frv_relocate_section): Don't crash before warning about
131 different segments in non-PIC relocation.
132 2003-10-17 Alexandre Oliva <aoliva@redhat.com>
133 * elf32-frv.c (elf32_frv_relocate_section): Don't warn on LABEL24
134 relocs to undefweak symbols.
135 (elf32_frv_relocate_section): Ditto for undefined symbols.
136 2003-10-06 Alexandre Oliva <aoliva@redhat.com>
137 * elf32-frv.c (elf32_frv_create_dynamic_sections): Make sure
138 gotfixup section was created.
139 2003-09-30 Alexandre Oliva <aoliva@redhat.com>
140 * elf32-frv.c (elf32_frv_howto_table): Change GOT12,
141 FUNCDESC_GOT12, GOTOFF12 and FUNCDESC_GOTOFF12 to
142 complain_overflow_signed.
143 * elf32-frv.c (_frv_add_rofixup): Do not error out if contents
144 have not been allocated.
145 (_frv_emit_got_relocs_plt_entries): Return non-void. Assert
146 privfd only if dynamic sections were created.
147 (elf32_frv_relocate_section): Compute gprel_segment, and use it
148 for GPREL relocs. When linking relocatable FDPIC executables,
149 emit warnings for relocations that would be illegal on PIE or
150 shared libraries. Emit rofixup for R_FRV_32 only if input object
152 (_frv_create_got_section): Define _gp symbol in the rofixup
154 (elf32_frv_finish_dynamic_sections): If rofixups needed but
155 dynamic sections missing, error out requesting -melf32frvfd.
156 2003-09-19 Alexandre Oliva <aoliva@redhat.com>
157 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Rearrange
158 computation of addends from section and global or local symbol
159 value. Change return type to bfd_boolean, and return a failure if
160 a dynamic FUNCDESC or FUNCDESC_VALUE relocation that requires a
161 nonzero addend is required.
162 (elf32_frv_relocate_section): Likewise. Print error for
163 unsupported nonzero addends.
164 2003-09-18 Alexandre Oliva <aoliva@redhat.com>
165 * elf32-frv.c (FRV_SYM_LOCAL): In the absence of dynamic sections,
166 force everything local.
167 (_frv_emit_got_relocs_plt_entries): Cope with NULL sec.
168 * elf32-frv.c (struct frv_elf_link_hash_table): Added sgotfixup.
169 (frv_gotfixup_section): New.
170 (FRV_SYM_LOCAL): Accept undefweak and local common symbols.
171 (struct frv_pic_relocs_info): Split relocs into relocs32, relocsfd
173 (_frv_add_rofixup): New.
174 (_frv_emit_got_relocs_plt_entries): Generate fixups for non-PIE
175 fdpic executables. Use FRV_SYM_LOCAL more widely to simplify and
176 improve some ugly conditions.
177 (elf32_frv_relocate_section): Likewise. Reject inter-segment
178 relocations in fdpic.
179 (_frv_create_got_section): Create .rofixup.got section.
180 (struct _frv_dynamic_got_info): Added fixups.
181 (_frv_count_got_plt_entries): Account in-GOT relocations into
182 relocs32, relocsfd and relocsfdv. Account them into relocs or
183 fixups, as appropriate.
184 (elf32_frv_size_dynamic_sections): Size rofixup section. Simplify
186 (elf32_frv_finish_dynamic_sections): Verify that the right number
187 of relocations and fixups was generated.
188 (elf32_frv_check_relocs): Compute relocs32, relocsfd and
190 * elf32-frv.c (FRV_SYM_LOCAL): New macro, used instead of
191 SYMBOL_CALLS_LOCAL and SYMBOL_REFERENCES_LOCAL.
192 (FRV_FUNCDESC_LOCAL): New macro, used to decide whether a function
193 descriptor of a (formerly-)global symbol is local.
194 (struct frv_pic_relocs_info): Adjust comments.
195 (_frv_emit_got_relocs_plt_entries): Adjust.
196 (elf32_frv_relocate_section): Likewise.
197 (_frv_count_got_plt_entries): Likewise.
198 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Don't add global
199 symbol's value to addend in the common preamble. Decay dynamic
200 symbols to section+offset if they bind or call locally, for GOT
201 and FUNCDESC_VALUE, respectively.
202 (elf32_frv_relocate_section): Likewise.
203 (elf32_frv_check_relocs): Don't register as dynamic symbols of
204 internal or hidden visibility.
205 2003-09-17 Alexandre Oliva <aoliva@redhat.com>
206 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Get addend as
207 argument, so as to not call _bfd_elf_rel_local_sym to compute it.
208 (elf32_frv_relocate_section): Pass relocation addend in. Use
209 original relocation addend to look up the got relocs/plt entries
210 table. Do not call _bfd_elf_rel_local_sym. Don't error out when
211 processing relocations that reference .scommon symbols.
212 2003-09-15 Alexandre Oliva <aoliva@redhat.com>
213 Introduce support for dynamic linking.
214 * elf32-frv.c (R_FRV_FUNCDESC_VALUE): Mark it as 64 bits.
215 (elf32_frv_rel_32_howto, elf32_frv_rel_funcdesc_howto,
216 elf32_frv_rel_funcdesc_value_howto): New REL descriptors.
217 (frv_reloc_type_lookup): Return REL howtos for executables and
219 (frv_info_to_howto_rel): New.
220 (struct frv_elf_link_hash_table): New.
221 (frv_hash_table, frv_got_section, frv_gotrel_section,
222 frv_plt_section, frv_pltrel_section, frv_relocs_info,
223 frv_got_initial_offset, frv_plt_initial_offset): New macros.
224 (frv_elf_link_hash_table_create): New.
225 (struct frv_pic_relocs_info): New.
226 (frv_pic_relocs_info_hash, frv_pic_relocs_info_eq): New.
227 (frv_pic_relocs_info_find): New.
228 (frv_pic_relocs_info_for_global, frv_pic_relocs_info_for_local):
230 (FRV_LZPLT_BLOCK_SIZE, FRV_LZPLT_RESOLVE_LOC): New.
231 (_frv_add_dyn_reloc, _frv_osec_to_segment): New.
232 (_frv_emit_got_relocs_plt_entries): New.
233 (elf32_frv_relocate_section): Add support for dynamic linking.
234 Handle new relocations.
235 (_frv_create_got_section): New.
236 (elf32_frv_create_dynamic_sections): New.
237 (ELF_DYNAMIC_INTERPRETER): New.
238 (struct _frv_dynamic_got_info): New.
239 (_frv_count_got_plt_entries): New.
240 (struct _frv_dynamic_got_plt_info): New.
241 (_frv_compute_got_alloc_data): New.
242 (_frv_get_got_entry, _frv_get_fd_entry): New.
243 (_frv_assign_got_entries, _frv_assign_plt_entries): New.
244 (_frv_resolve_final_relocs_info): New.
245 (elf32_frv_size_dynamic_sections): New.
246 (elf32_frv_finish_dynamic_sections): New.
247 (elf32_frv_adjust_dynamic_symbol): New.
248 (elf32_frv_finish_dynamic_symbol): New.
249 (elf32_frv_check_relocs): Handle new relocs. Explain how the
251 (elf_info_to_howto_rel): Define.
252 (bfd_elf32_bfd_link_hash_table_create): Define.
253 (elf_backend_create_dynamic_sections): Define.
254 (elf_backend_adjust_dynamic_symbol): Define.
255 (elf_backend_size_dynamic_sections): Define.
256 (elf_backend_finish_dynamic_symbol): Define.
257 (elf_backend_finish_dynamic_sections): Define.
258 (elf_backend_want_got_sym): Define.
259 (elf_backend_got_header_size): Define.
260 (elf_backend_want_got_plt): Define.
261 (elf_backend_plt_readonly): Define.
262 (elf_backend_want_plt_sym): Define.
263 (elf_backend_plt_header_size): Define.
264 (elf_backend_may_use_rel_p): Define.
265 (elf_backend_may_use_rela_p): Define.
266 (elf_backend_default_use_rela_p): Define.
267 2003-08-08 Alexandre Oliva <aoliva@redhat.com>
268 * elf32-frv.c (R_FRV_FUNCDESC_VALUE, R_FRV_FUNCDESC_GOTOFF12,
269 R_FRV_FUNCDESC_GOTOFFHI, R_FRV_FUNCDESC_GOTOFFLO, R_FRV_GOTOFF12,
270 R_FRV_GOTOFFHI, R_FRV_GOTOFFLO): New.
271 (frv_reloc_map): Map the corresponding BFD relocs to them.
272 (frv_reloc_type_lookup): ... and back to BFD relocs.
273 * reloc.c: New relocs.
274 * bfd-in2.h, libbfd.h: Rebuilt.
275 2003-08-04 Alexandre Oliva <aoliva@redhat.com>
276 * elf32-frv.c (R_FRV_GOT12, R_FRV_GOTHI, R_FRV_GOTLO,
277 R_FRV_FUNCDESC, R_FRV_FUNCDESC_GOT12, R_FRV_FUNCDESC_GOTHI,
278 R_FRV_FUNCDESC_GOTLO): New.
279 (frv_reloc_map): Map the corresponding BFD relocs to them.
280 (frv_reloc_type_lookup): ... and back to BFD relocs.
281 * reloc.c: New relocs.
282 * bfd-in2.h, libbfd.h: Rebuilt.
284 2004-01-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
286 * elf32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
287 targets to support pages of up to 64kB.
288 (elf32_bed): Redefine to get a separate backend data structure for
290 * elf64-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
291 targets to support pages of up to 64kB.
292 (elf64_bed): Redefine to get a separate backend data structure for
294 * elfn32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
295 targets to support pages of up to 64kB.
296 (elf32_bed): Redefine to get a separate backend data structure for
299 2004-01-04 Mark Kettenis <kettenis@gnu.org>
301 * elf32-sparc.c (elf32_sparc_grok_psinfo): New function.
303 2004-01-02 Mark Kettenis <kettenis@gnu.org>
305 * elf32-i386.c (elf_i386_grok_prstatus): Add support for FreeBSD.
306 (elf_i386_grok_psinfo): Likewise.
308 2004-01-02 Bernardo Innocenti <bernie@develer.com>
310 * config.bfd: Add m68k-uClinux target.
312 2004-01-01 Grant Edwards <grante@visi.com>
314 * elflink.h (elf_gc_sections): Warn when gc-sections option is ignored.
315 * elf32-h8300.c (elf32_h8_gc_mark_hook): New function.
316 (elf32_h8_gc_sweep_hook): New function.
317 (elf_backend_gc_mark_hook): Define.
318 (elf_backend_gc_sweep_hook): Define.
319 (elf_backend_can_gc_sections): Define.
321 For older changes see ChangeLog-0203
327 version-control: never