Initialize use_mmap
[binutils-gdb.git] / ld / ChangeLog
1 2015-02-10 H.J. Lu <hongjiu.lu@intel.com>
2
3 * plugin.c (plugin_maybe_claim): Initialize use_mmap.
4
5 2015-02-10 H.J. Lu <hongjiu.lu@intel.com>
6
7 * plugin.c (plugin_input_file_t): Add use_mmap.
8 (plugin_pagesize): New.
9 (get_view): Use plugin_pagesize. Set use_mmap if mmap is used.
10 (plugin_load_plugins): Initialize plugin_pagesize.
11 (plugin_maybe_claim): Unmap the buffer if plugin didn't claim the
12 file.
13
14 2015-02-10 H.J. Lu <hongjiu.lu@intel.com>
15
16 * plugin.c (get_view): Align offset passed to mmap.
17
18 2015-02-08 H.J. Lu <hongjiu.lu@intel.com>
19
20 * ldfile.c (ldfile_try_open_bfd): Don't call bfd_check_format
21 if plugin isn't active or there is no thing more to claim.
22
23 2015-02-08 H.J. Lu <hongjiu.lu@intel.com>
24
25 * plugin.c (plugin_maybe_claim): Check format against bfd_object
26 directly.
27
28 2015-02-07 H.J. Lu <hongjiu.lu@intel.com>
29
30 * plugin.c (plugin_maybe_claim): Replace entry->the_bfd with
31 ibfd.
32
33 2015-02-07 H.J. Lu <hongjiu.lu@intel.com>
34
35 * plugin.c: Include "libbfd.h".
36 (plugin_strdup): New.
37 (plugin_maybe_claim): Remove the argument of pointer to struct
38 ld_plugin_input_file. Open and handle input entry.
39 * plugin.h (plugin_maybe_claim): Updated.
40 * ldfile.c (ldfile_try_open_bfd): Call plugin_maybe_claim directly
41 without passing a pointer to struct ld_plugin_input_file.
42 * ldmain.c: Don't include "libbfd.h".
43 (add_archive_element): Call plugin_maybe_claim directly without
44 passing a pointer to struct ld_plugin_input_file.
45
46 2015-02-06 H.J. Lu <hongjiu.lu@intel.com>
47
48 * ld.texinfo: Document -z text, -z notext and -z textoff.
49 * emultempl/elf32.em (gld${EMULATION_NAME}_list_options): Add
50 -z text, -z notext and -z textoff.
51
52 2015-02-06 H.J. Lu <hongjiu.lu@intel.com>
53
54 * configure.ac: Add AC_FUNC_MMAP.
55 * config.in: Regenerated.
56 * configure: Likewise.
57 * plugin.c: Include <sys/mman.h>.
58 (MAP_FAILED): New. Defined if not defined.
59 (PROT_READ): Likewise.
60 (MAP_PRIVATE): Likewise.
61 (view_buffer_t): New.
62 (plugin_input_file_t): Add view_buffer.
63 (get_view): Try mmap and cache the view buffer.
64 (plugin_maybe_claim): Initialize view_buffer.
65
66 2015-02-05 H.J. Lu <hongjiu.lu@intel.com>
67
68 * plugin.c (release_input_file): Set fd to -1 after closing it.
69 (plugin_maybe_claim): Close fd only if fd != -1.
70
71 2015-02-05 H.J. Lu <hongjiu.lu@intel.com>
72
73 PR ld/17878
74 * plugin.c: Include <errno.h>.
75 (errno): New. Declare if needed.
76 (plugin_input_file_t): New.
77 (get_input_file): Implemented.
78 (get_view): Likewise.
79 (release_input_file): Likewise.
80 (add_symbols): Updated.
81 (get_symbols): Likewise.
82 (plugin_maybe_claim): Allocate a plugin_input_file_t. Close fd
83 only for a bfd_object input.
84
85 2015-02-02 Alan Modra <amodra@gmail.com>
86
87 * emultempl/ppc64elf.em (toc_section_name): New var.
88 (ppc_after_open): Set it.
89 (ppc_before_allocation): Use it.
90 (gld${EMULATION_NAME}_after_allocation): Here too.
91
92 2015-01-29 H.J. Lu <hongjiu.lu@intel.com>
93
94 * ldfile.c (ldfile_try_open_bfd): Replace plugin_active_plugins_p()
95 with link_info.lto_plugin_active.
96 * ldlang.c (lang_process): Likewise.
97 * ldmain.c (add_archive_element): Likewise.
98 * plugin.c (plugin_active_plugins_p): Removed.
99 * plugin.h (plugin_active_plugins_p): Likewise.
100
101 2015-01-28 H.J. Lu <hongjiu.lu@intel.com>
102
103 * plugin.h (plugin_get_ir_dummy_bfd): Removed. Move comments to
104 ...
105 * plugin.c (plugin_get_ir_dummy_bfd): Here. Make it static.
106
107 2015-01-28 H.J. Lu <hongjiu.lu@intel.com>
108
109 PR ld/17878
110 * plugin.c (tv_header_tags(): Add LDPT_GET_VIEW.
111 (get_view): New function.
112 (set_tv_header): Handle LDPT_GET_VIEW.
113 * testplug.c (tag_names): Add LDPT_GET_VIEW.
114 (tv_get_view): New.
115 (dump_tv_tag): Handle LDPT_GET_VIEW.
116 (parse_tv_tag): Likewise.
117
118 2015-01-28 Alan Modra <amodra@gmail.com>
119
120 * emulparams/elf64ppc.sh (INITIAL_READWRITE_SECTIONS): Define.
121 * emultempl/ppc64elf.em (params): Init new field.
122 (ppc_after_open): New function.
123 (LDEMUL_AFTER_OPEN): Define.
124 * ldlang.c (lang_final): Whitespace fix.
125
126 2015-01-28 James Bowman <james.bowman@ftdichip.com>
127
128 * Makefile.am: Add FT32 files.
129 * configure.tgt: Handle FT32 target.
130 * emulparams/elf32ft32.sh: New file.
131 * scripttempl/ft32.sc: New file.
132 * Makefile.in: Regenerate.
133
134 2015-01-28 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
135
136 PR 4643
137 * ldexp.c (fold_name): Fold LENGTH only after
138 lang_first_phase_enum.
139 * ldgram.y (memory_spec): Don't evaluate ORIGIN and LENGTH
140 rightaway.
141 * ldlang.h (struct memory_region_struct): Add origin_exp and
142 length_exp fields.
143 * ldlang.c (lang_do_memory_regions): New.
144 (lang_memory_region_lookup): Initialize origin_exp and
145 length_exp fields.
146 (lang_process): Call lang_do_memory_regions.
147
148 2015-01-20 Andrew Burgess <andrew.burgess@embecosm.com>
149
150 * ldlang.c (print_assignment): Only evaluate the expression for a
151 PROVIDE'd assignment when the destination is being defined.
152 Display a special message for PROVIDE'd symbols that are not being
153 provided.
154
155 2015-01-20 Alan Modra <amodra@gmail.com>
156
157 * emulparams/elf64ppc.sh (OTHER_SDATA_SECTIONS): Use in place of..
158 (OTHER_BSS_SYMBOLS): ..this.
159 (OTHER_PLT_RELOC_SECTIONS): Don't define.
160 (OTHER_GOT_RELOC_SECTIONS): Add rela.toc1 and rela.tocbss.
161 (OTHER_READWRITE_SECTIONS): Don't define. Move .toc1 to..
162 (OTHER_RELRO_SECTIONS_2): ..here.
163 * scripttempl/elf.sc: Move SBSS too when DATA_SDATA.
164
165 2015-01-20 Alan Modra <amodra@gmail.com>
166
167 * emulparams/elf64ppc.sh (BSS_PLT): Don't define.
168 (OTHER_READWRITE_SECTIONS): Move .branch_lt to..
169 (OTHER_RELRO_SECTIONS_2): ..here.
170 (DATA_GOT, SEPARATE_GOTPLT, DATA_SDATA, DATA_PLT,
171 PLT_BEFORE_GOT): Define.
172 * scripttempl/elf.sc: Handle DATA_SDATA and DATA_GOT/DATA_PLT/
173 PLT_BEFORE_GOT combination.
174 (DATA_GOT, SDATA_GOT): Don't define if either is already defined.
175
176 2015-01-20 Alan Modra <amodra@gmail.com>
177
178 * emulparams/elf64ppc.sh (OTHER_READWRITE_SECTIONS): Move .opd to..
179 (OTHER_RELRO_SECTIONS_2): ..here, new define.
180 * scripttempl/elf.sc: Add OTHER_RELRO_SECTIONS_2.
181
182 2015-01-19 Alan Modra <amodra@gmail.com>
183
184 PR ld/17615
185 * ldlang.c (lang_process): Run lang_common before lang_gc_sections.
186
187 2015-01-14 Jiong Wang <jiong.wang@arm.com>
188
189 * ld-arm/elf32-reject.s: New testcase.
190 * ld-arm/elf32-reject.d: Likewise.
191 * ld-arm/elf32-reject-pie.s: Likewise.
192 * ld-arm/elf32-reject-pie.d: Likewise.
193 * ld-arm/arm-elf.exp: Run new testcases.
194 * ld-arm/ifunc-7.s: Delete f2/f4 test items.
195 * ld-arm/ifunc-7.rd: Likewise.
196 * ld-arm/ifunc-7.gd: Likewise.
197 * ld-arm/ifunc-7.dd: Likewise.
198 * ld-arm/ifunc-8.s: Likewise.
199 * ld-arm/ifunc-8.rd: Likewise.
200 * ld-arm/ifunc-8.gd: Likewise.
201 * ld-arm/ifunc-8.dd: Likewise.
202
203 2015-01-01 Alan Modra <amodra@gmail.com>
204
205 * ldver.c (ldversion): Just print current year.
206
207 2015-01-01 Alan Modra <amodra@gmail.com>
208
209 Update year range in copyright notice of all files.
210
211 For older changes see ChangeLog-2014
212 \f
213 Copyright (C) 2015 Free Software Foundation, Inc.
214
215 Copying and distribution of this file, with or without modification,
216 are permitted in any medium without royalty provided the copyright
217 notice and this notice are preserved.
218
219 Local Variables:
220 mode: change-log
221 left-margin: 8
222 fill-column: 74
223 version-control: never
224 End: