objcopy/strip: Add option --remove-relocations=SECTIONPATTERN
[deliverable/binutils-gdb.git] / binutils / ChangeLog
1 2016-07-14 Andrew Burgess <andrew.burgess@embecosm.com>
2
3 * doc/binutils.texi (objcopy): Document 'remove-relocations'.
4 (strip): Likewise.
5 * objcopy.c (SECTION_CONTEXT_REMOVE_RELOCS): Define.
6 (enum command_line_switch): Add 'OPTION_REMOVE_RELOCS'.
7 (struct option strip_options): Add 'remove-relocations'.
8 (struct option copy_options): Likewise.
9 (copy_usage): Likewise.
10 (strip_usage): Likewise.
11 (handle_remove_relocations_option): New function.
12 (discard_relocations): New function.
13 (handle_remove_section_option): New function.
14 (copy_relocations_in_section): Use discard_relocations.
15 (strip_main): Use handle_remove_section_option for
16 'remove-section', and handle 'remove-relocations' option.
17 (copy_main): Likewise.
18 * testsuite/binutils-all/objcopy.exp: Run new tests.
19 * testsuite/binutils-all/remove-relocs-01.d: New file.
20 * testsuite/binutils-all/remove-relocs-01.s: New file.
21 * testsuite/binutils-all/remove-relocs-02.d: New file.
22 * testsuite/binutils-all/remove-relocs-03.d: New file.
23 * testsuite/binutils-all/remove-relocs-04.d: New file.
24 * testsuite/binutils-all/remove-relocs-05.d: New file.
25 * testsuite/binutils-all/remove-relocs-06.d: New file.
26 * NEWS: Mention new option.
27
28 2016-07-14 Andrew Burgess <andrew.burgess@embecosm.com>
29
30 * objcopy.c (find_section_list): Handle section patterns starting
31 with '!' being a non-matching pattern.
32 * doc/binutils.texi (objcopy): Give example of using '!' with
33 --remove-section and --only-section.
34 (strip): Give example of using '!' with --remove-section.
35 * testsuite/binutils-all/data-sections.s: New file.
36 * testsuite/binutils-all/only-section-01.d: New file.
37 * testsuite/binutils-all/remove-section-01.d: New file.
38 * testsuite/binutils-all/objcopy.exp: Run new tests.
39 * NEWS: Mention new feature.
40
41 2016-07-09 Alan Modra <amodra@gmail.com>
42
43 PR binutils/20337
44 * objdump.c (compare_symbols): For ELF, sort same value/type
45 symbols according to size.
46
47 2016-07-05 Andre Vieria <andre.simoesdiasvieira@arm.com>
48
49 * objdump.c (dump_section_header): Rename SEC_ELF_NOREAD
50 to SEC_ELF_NOREAD.
51 * readelf.c (get_elf_section_flags): Rename ARM_NOREAD to
52 ARM_PURECODE and SHF_ARM_NOREAD to SHF_ARM_PURECODE.
53 (process_section_headers): Rename noread to purecode.
54
55 * section.c (SEC_ELF_NOREAD): Rename to ...
56 (SEC_ELF_PURECODE): ... this.
57
58 2016-07-01 Nick Clifton <nickc@redhat.com>
59
60 * prdbg.c (pr_enum_type): Use a buffer big enough to hold an
61 extremely large decimal value.
62 (pr_range_type): Likewise.
63 (pr_array_type): Likewise.
64 (pr_struct_field): Likewise.
65 (pr_class_baseclass): Likewise.
66 (pr_class_method_variant): Likewise.
67 (pr_tag_type): Likewise.
68 (pr_int_constant): Likewise.
69 (pr_typed_constant): Likewise.
70 (pr_variable): Likewise.
71 (pr_function_parameter): Likewise.
72 (pr_start_block): Likewise.
73 (pr_lineno): Likewise.
74 (pr_end_block): Likewise.
75 (tg_enum_type): Likewise.
76 (tg_int_constant): Likewise.
77 (tg_typed_constant): Likewise.
78 (tg_start_block): Likewise.
79
80 2016-07-01 Nick Clifton <nickc@redhat.com>
81
82 * testsuite/binutils-all/objcopy.exp
83 (objcopy_test_without_global_symbol): Expect this test to fail on
84 the AArch64 and ARM targets, since they preserve their mapping
85 symbols.
86
87 2016-07-01 Tristan Gingold <gingold@adacore.com>
88
89 * NEWS: Add marker for 2.27.
90
91 2016-07-30 Tristan Gingold <gingold@adacore.com>
92
93 * doc/binutils.texi (objdump): Fix mis-placement.
94
95 2016-06-28 Nick Clifton <nickc@redhat.com>
96
97 * testsuite/binutils-all/ar.exp: Relax previous restriction on
98 Alpha targets. Allow ELF based Alpha targets.
99
100 2016-06-28 Maciej W. Rozycki <macro@imgtec.com>
101
102 * testsuite/binutils-all/ar.exp: Use `supports_gnu_unique' with
103 the `unique_symbol' test.
104
105 2016-06-28 Alan Modra <amodra@gmail.com>
106
107 PR 20304
108 * objdump.c (objdump_print_symname): Don't attempt to retrieve
109 version info from synthetic symbols.
110
111 2016-06-24 Alan Modra <amodra@gmail.com>
112
113 * objcopy.c (find_section_rename): Forward declare. Remove
114 ibfd and sec_ptr param. Add old_name param. Allow for NULL
115 returned_flags. Move read of section name and flags to..
116 (setup_section): ..here. Update find_section_rename call.
117 (filter_symbols): Rename section symbols for renamed sections.
118 (copy_object): Call filter_symbols when renamed sections.
119 * testsuite/lib/binutils-common.exp (is_bad_symtab): New.
120 * testsuite/binutils-all/update-section.exp: Revert 96037eb0
121 mips xfail.
122 * testsuite/binutils-all/objcopy.exp (copy_executable): Use
123 is_bad_symtab.
124 (localize-hidden-1): xfail if is_bad_symtab.
125 * testsuite/binutils-all/readelf.exp: Use is_bad_symtab to select
126 between mips/tmips.
127
128 2016-06-24 Alan Modra <amodra@gmail.com>
129
130 * objdump.c (struct print_file_list): Add "max_printed".
131 (try_print_file_open): Init new field.
132 (show_line): Don't show 5 context lines when redisplaying source.
133
134 2016-06-22 Nick Clifton <nickc@redhat.com>
135
136 * testsuite/binutils-all/ar.exp: Skip tests for Alpha target.
137 Skip bfdtest1 tests for tic30 target.
138 * testsuite/binutils-all/arm/objdump.exp: Skip for aout arm
139 target.
140 * testsuite/binutils-all/compress.exp: Expect some tests to fail
141 on the nds32.
142 * testsuite/binutils-all/copy-3.d: Skip for go32 targets.
143 * testsuite/binutils-all/copy-4.d: Skip for AIX and linuxecoff
144 targets.
145 * testsuite/binutils-all/nm.exp: Treat beos based targets as ELF
146 targets.
147 * testsuite/binutils-all/objcopy.exp: Only run reverse bytes tests
148 if the bintest.o file was created. Use the
149 get_standard_section_names proc to get the name of the data
150 section.
151 * testsuite/binutils-all/objdump.exp: Update regexps to allow for
152 RX section names.
153 * testsuite/binutils-all/readelf.exp: Use
154 get_standard_section_names proc to get the name of the data
155 section.
156 * testsuite/binutils-all/readelf.r: Allow for non standard text
157 section names.
158 * testsuite/binutils-all/readelf.s: Update regexps for tilepro.
159 * testsuite/binutils-all/size.exp: Allow for non standard section
160 names.
161 * testsuite/binutils-all/update-section.exp: Expect comapre 1vs4
162 to fail on mips targets.
163 * testsuite/lib/utils-lib.exp (default_binutils_run): Use
164 get_standard_section_names proc.
165 (run_dump_test): Likewise.
166 (proc get_standard_section_names): New proc.
167
168 2016-06-22 Nick Clifton <nickc@redhat.com>
169
170 * readelf.c (dynamic_section_mips_val): Increase size of timebuf.
171 (process_mips_specific): Likewise.
172 (process_gnu_liblist): Likewise.
173
174 2016-06-21 Graham Markall <graham.markall@embecosm.com>
175
176 * readelf.c (decode_ARC_machine_flags): Remove E_ARC_MACH_NPS400
177 case.
178
179 2016-06-15 Nick Clifton <nickc@redhat.com>
180
181 * readelf.c (is_24bit_abs_reloc): Add support for R_FT32_20
182 reloc.
183
184 2016-06-14 John Baldwin <jhb@FreeBSD.org>
185
186 * objcopy.c (do_elf_stt_common): Use correct type.
187
188 2016-06-14 Alan Modra <amodra@gmail.com>
189
190 * ar.c: Expand uses of bfd_my_archive.
191 * size.c: Likewise.
192
193 2016-06-14 Alan Modra <amodra@gmail.com>
194
195 PR ld/20241
196 * bucomm.c (bfd_get_archive_filename): Return file name within thin
197 archive.
198
199 2016-06-02 Nick Clifton <nickc@redhat.com>
200
201 PR 20089
202 * objcopy.c (group_signature): Fail if the input symbol table has
203 not been loaded, or if the sh_info field of the group header is 0.
204
205 * dwarf.c (display_debug_frames): Do not display any
206 interpretation if the block consists solely of DW__CFA_NOPs.
207
208 2016-05-31 Alan Modra <amodra@gmail.com>
209
210 * objcopy.c: Formatting, whitespace throughout.
211 (copy_main): Init newsym->othersym.
212 (parse_symflags): Make len a size_t. Adjust uses.
213
214 2016-05-25 H.J. Lu <hongjiu.lu@intel.com>
215
216 PR binutils/14625
217 * NEWS: Mention --enable-64-bit-archive.
218
219 2016-05-18 Nick Clifton <nickc@redhat.com>
220
221 PR 20096
222 * objcopy.c (copy_relocations_in_section): Also check for the
223 symbol pointed to by sym_ptr_ptr being NULL.
224
225 2016-05-18 Maciej W. Rozycki <macro@imgtec.com>
226
227 * testsuite/binutils-all/mips/mixed-mips16-micromips.d: New test.
228 * testsuite/binutils-all/mips/mixed-mips16-micromips.s: New test
229 source.
230 * testsuite/binutils-all/mips/mips.exp: Run the new test.
231
232 2016-05-18 Nick Clifton <nickc@redhat.com>
233
234 * po/sv.po: Updated Swedish translation.
235
236 2016-05-18 Maciej W. Rozycki <macro@imgtec.com>
237
238 * readelf.c (dynamic_section_mips_val) <DT_MIPS_RLD_VERSION>
239 <DT_MIPS_LOCAL_GOTNO, DT_MIPS_CONFLICTNO, DT_MIPS_LIBLISTNO>
240 <DT_MIPS_SYMTABNO, DT_MIPS_UNREFEXTNO, DT_MIPS_HIPAGENO>
241 <DT_MIPS_DELTA_CLASS_NO, DT_MIPS_DELTA_INSTANCE_NO>
242 <DT_MIPS_DELTA_RELOC_NO, DT_MIPS_DELTA_SYM_NO>
243 <DT_MIPS_DELTA_CLASSSYM_NO, DT_MIPS_COMPACT_SIZE>: Use the
244 `d_val' rather than `d_ptr' member of the dynamic entry.
245
246 2016-05-17 Maciej W. Rozycki <macro@imgtec.com>
247
248 * testsuite/lib/binutils-common.exp (supports_gnu_unique): New
249 procedure.
250 * testsuite/binutils-all/objcopy.exp: Use `supports_gnu_unique'
251 with the `strip-10' test.
252
253 2016-05-16 Maciej W. Rozycki <macro@imgtec.com>
254
255 * testsuite/binutils-all/objcopy.exp: Don't skip the `strip-10'
256 test for the V850.
257
258 2016-05-11 Andrew Bennett <andrew.bennett@imgtec.com>
259
260 * readelf.c (print_mips_ases): Add DSPR3.
261
262 2016-05-10 Thomas Preud'homme <thomas.preudhomme@arm.com>
263
264 * readelf.c (display_arm_attribute): Add output for Tag_DSP_extension.
265 (arm_attr_public_tags): Define DSP_extension attribute.
266
267 2016-05-10 Andrew Burgess <andrew.burgess@embecosm.com>
268
269 * doc/binutils.texi (nm): Update description of --size-sort.
270
271 2016-05-09 Nick Clifton <nickc@redhat.com>
272
273 PR binutils/20063
274 * readelf.c (get_32bit_section_headers): Warn if an out of range
275 sh_link or sh_info field is encountered.
276 (get_64bit_section_headers): Likewise.
277
278 2016-05-04 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
279
280 * testsuite/lib/binutils-common.exp (is_elf_format): Add avr-*-*.
281
282 2016-05-03 Nick Clifton <nickc@redhat.com>
283
284 * po/sv.po: Updated Swedish translation.
285
286 2016-04-29 Pitchumani Sivanupandi <pitchumani.s@atmel.com>
287
288 * readelf.c (is_32bit_pcrel_reloc): Return true if reloc is 32-bit
289 PC relocation for AVR target.
290 (is_none_reloc): Return true if reloc is any of AVR diff
291 relocations.
292
293 2016-04-29 Nick Clifton <nickc@redhat.com>
294
295 PR 19938
296 * readelf.c (get_solaris_segment_type): New function.
297 (get_segment_type): Call it.
298
299 2016-04-28 Nick Clifton <nickc@redhat.com>
300
301 * po/zh_CN.po: Updated Chinese (simplified) translation.
302
303 2016-04-28 Nick Clifton <nickc@redhat.com>
304
305 PR target/19722
306 * testsuite/binutils-all/aarch64/illegal.s: New test.
307 * testsuite/binutils-all/aarch64/illegal.d: New test driver.
308
309 2016-04-20 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
310
311 * resres.c: Likewise.
312
313 2016-04-15 H.J. Lu <hongjiu.lu@intel.com>
314
315 * Makefile.in: Regenerated with automake 1.11.6.
316 * aclocal.m4: Likewise.
317 * doc/Makefile.in: Likewise.
318
319 2016-04-14 Nick Clifton <nickc@redhat.com>
320
321 PR target/19938
322 * testsuite/binutils-all/i386/compressed-1b.d: Allow for the
323 string sections possibly having the SHF_STRINGS flag bit set.
324 * testsuite/binutils-all/i386/compressed-1c.d: Likewise.
325 * testsuite/binutils-all/readelf.s: Likewise.
326 * testsuite/binutils-all/readelf.s-64: Likewise.
327 * testsuite/binutils-all/x86-64/compressed-1b.d: Likewise.
328 * testsuite/binutils-all/x86-64/compressed-1c.d: Likewise.
329
330 2016-04-13 Nick Clifton <nickc@redhat.com>
331
332 PR target/19938
333 * readelf.c (get_solaris_section_type): New function: Returns the
334 name of Solaris specific section types.
335 (get_solaris_dynamic_type): New function: Return the name of
336 Solaris specific dynamic types.
337 (get_dynamic_type): Use get_solaris_dynamic_type.
338 (get_section_type_name): Use get_solaris_section_type.
339 (get_solaris_symbol_visibility): New function: Returns Solaris
340 specific symbol visibilities.
341 (print_dynamic_symbol): Use get_solaris_symbol_visibility.
342 (process_symbol_table): Likewise.
343
344 2016-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
345
346 * dwarf.h (init_dwarf_regnames_s390): Declare.
347 * dwarf.c (dwarf_regnames_s390): New.
348 (init_dwarf_regnames_s390): New.
349 (init_dwarf_regnames): Call it.
350 * objdump.c (dump_dwarf): Likewise.
351
352 2016-04-11 Maciej W. Rozycki <macro@imgtec.com>
353
354 * testsuite/binutils-all/mips/mips16-undecoded.d: New test.
355 * testsuite/binutils-all/mips/mips16-undecoded.s: New test
356 source.
357 * testsuite/binutils-all/mips/mips.exp: Run the new test.
358
359 2016-04-04 Nick Clifton <nickc@redhat.com>
360
361 PR 19872
362 * dwarf.c (display_debug_aranges): Skip warning about unrecognised
363 version number if the version is zero.
364
365 2016-03-29 Alan Modra <amodra@gmail.com>
366
367 * readelf.c (get_data): Use BFD_VMA_FMT to print bfd_size_type vars.
368 (get_dynamic_data): Likewise.
369
370 2016-03-22 Nick Clifton <nickc@redhat.com>
371
372 PR 19851
373 * dwarf.c (SAFE_BYTE_GET): Replace local dynamic array allocation
374 with run time size check.
375
376 * configure: Regenerate.
377
378 2016-03-21 Andrew Burgess <andrew.burgess@embecosm.com>
379
380 * readelf.c (decode_ARC_machine_flags): Handle nps400.
381
382 2016-03-21 Andrew Burgess <andrew.burgess@embecosm.com>
383
384 * readelf.c (get_machine_flags): Move arc processing into...
385 (decode_ARC_machine_flags): ... new function. Remove use of
386 EF_ARC_CPU_GENERIC, change default case from "generic arc" to
387 "unknown arc". Merged ABI printing between two machine types.
388
389 2016-03-21 Andrew Burgess <andrew.burgess@embecosm.com>
390
391 * testsuite/binutils-all/objdump.exp (cpus_expected): Add ARC700
392 to the architecture list.
393
394 2016-03-21 Nick Clifton <nickc@redhat.com>
395
396 * dlltool.c: Replace use of alloca with call to xmalloc.
397 * dllwrap.c: Likewise.
398 * nlmconv.c: Likewise.
399 * objdump.c: Likewise.
400 * resrc.c: Likewise.
401 * winduni.c: Likewise.
402 * configure: Regenerate.
403
404 2016-03-07 Nick Clifton <nickc@redhat.com>
405
406 PR binutils/19775
407 * testsuite/binutils-all/ar.exp (proc empty_archive): New proc.
408 Run the new proc.
409 * testsuite/binutils-all/empty: New, empty, file.
410
411 2016-03-04 Matthew Wahab <matthew.wahab@arm.com>
412
413 * readelf.c (arm_attry_tag_FP_arch): Add "NEON for ARMv8.1".
414
415 2016-02-26 H.J. Lu <hongjiu.lu@intel.com>
416
417 PR ld/19645
418 * NEWS: Mention --elf-stt-common= for objcopy.
419 * doc/binutils.texi: Document --elf-stt-common= for objcopy.
420 * objcopy.c (do_elf_stt_common): New.
421 (command_line_switch): Add OPTION_ELF_STT_COMMON.
422 (copy_options): Add --elf-stt-common=.
423 (copy_usage): Add --elf-stt-common=.
424 (copy_object): Also check do_elf_stt_common for ELF targets.
425 (copy_file): Handle do_elf_stt_common.
426 (copy_main): Handle OPTION_ELF_STT_COMMON.
427 * readelf.c (apply_relocations): Support STT_COMMON.
428 * testsuite/binutils-all/common-1.s: New file.
429 * testsuite/binutils-all/common-1a.d: Likewise.
430 * testsuite/binutils-all/common-1b.d: Likewise.
431 * testsuite/binutils-all/common-1c.d: Likewise.
432 * testsuite/binutils-all/common-1d.d: Likewise.
433 * testsuite/binutils-all/common-1e.d: Likewise.
434 * testsuite/binutils-all/common-1f.d: Likewise.
435 * testsuite/binutils-all/common-2.s: Likewise.
436 * testsuite/binutils-all/common-2a.d: Likewise.
437 * testsuite/binutils-all/common-2b.d: Likewise.
438 * testsuite/binutils-all/common-2c.d: Likewise.
439 * testsuite/binutils-all/common-2d.d: Likewise.
440 * testsuite/binutils-all/common-2e.d: Likewise.
441 * testsuite/binutils-all/common-2f.d: Likewise.
442 * testsuite/binutils-all/objcopy.exp
443 (objcopy_test_elf_common_symbols): New proc.
444 Run objcopy_test_elf_common_symbols for ELF targets
445
446 2016-02-16 H.J. Lu <hongjiu.lu@intel.com>
447
448 PR binutils/19647
449 * readelf.c (get_section_type_name): Add a missing break.
450
451 2016-02-16 Claudiu Zissulescu <claziss@synopsys.com>
452
453 * readelf.c (is_32bit_pcrel_reloc): Add R_ARC_32_PCREL.
454
455 2016-02-15 Nick Clifton <nickc@redhat.com>
456
457 * readelf.c (get_section_type_name): Add hex prefix to offsets
458 printed for LOPROC and LOOS values. Ensure that a result is
459 always returned for the V850 target, even when an unrecognised
460 processor specific value is encountered.
461 (process_section_headers): Display key values in the order in
462 which they appear to the user. Add the "C (compressed)" value to
463 the list.
464
465 2016-02-12 H.J. Lu <hongjiu.lu@intel.com>
466
467 * doc/binutils.texi: Fix a typo.
468
469 2016-02-05 Cupertino Miranda <Cupertino.Miranda@synopsys.com>
470
471 * testsuite/binutils-all/objdump.exp: Update expected default
472 architecture value for ARC binaries.
473
474 2016-02-02 H.J. Lu <hongjiu.lu@intel.com>
475
476 PR binutils/19547
477 * testsuite/binutils-all/objcopy.exp
478 (objcopy_test_without_global_symbol): New proc.
479 Run objcopy_test_without_global_symbol.
480 * testsuite/binutils-all/pr19547.c: New file.
481
482 2016-01-28 H.J. Lu <hongjiu.lu@intel.com>
483
484 PR binutils/19523
485 * Makefile.am (check-DEJAGNU): Pass CC and CC_FOR_BUILD to
486 runtest.
487 * Makefile.in: Regenerated.
488 * testsuite/binutils-all/compress.exp (test_gnu_debuglink): New
489 proc.
490 Run test_gnu_debuglink for native ELF build.
491
492 2016-01-20 Nick Clifton <nickc@redhat.com>
493
494 PR 19495
495 * testsuite/binutils-all/dlltool.exp: Fix tests for targets which
496 do not support inserting leading underscores.
497
498 2016-01-20 Mickael Guene <mickael.guene@st.com>
499
500 * readelf.c (get_elf_section_flags): Display y letter for section
501 with SHF_ARM_NOREAD section flag in readelf section output.
502 (process_section_headers): Add y letter in readelf section output
503 key mapping for ARM architecture.
504 * objdump.c (dump_section_header): Display NOREAD attributes as
505 well.
506 * doc/binutils.texi (objdump): Note that it is correct for
507 sections to have both the READONLY and NOREAD attributes.
508
509 2016-01-19 John Baldwin <jhb@FreeBSD.org>
510
511 * readelf.c (get_freebsd_elfcore_note_type): Remove unused variable.
512
513 2016-01-19 John Baldwin <jhb@FreeBSD.org>
514
515 * readelf.c (get_freebsd_elfcore_note_type): New
516 (process_note): Add support for FreeBSD core notes.
517
518 2016-01-18 Miranda Cupertino <Cupertino.Miranda@synopsys.com>
519 Zissulescu Claudiu <Claudiu.Zissulescu@synopsys.com>
520
521 * readelf.c (get_machine_flags): Add support for newer ARC ELF
522 header flags.
523
524 2016-01-18 Alan Modra <amodra@gmail.com>
525
526 * configure: Regenerate.
527
528 2016-01-17 Alan Modra <amodra@gmail.com>
529
530 * configure: Regenerate.
531
532 2016-01-17 Alan Modra <amodra@gmail.com>
533
534 * testsuite/lib/binutils-common.exp (is_elf_format): Return true
535 for m68hc11/12 and xgate triples.
536
537 2016-01-17 Alan Modra <amodra@gmail.com>
538
539 * readelf.c (is_32bit_abs_reloc): Add R_M68HC11_32.
540
541 2016-01-01 Alan Modra <amodra@gmail.com>
542
543 Update year range in copyright notice of all files.
544
545 For older changes see ChangeLog-2015 and testsuite/ChangeLog-1215
546 \f
547 Copyright (C) 2016 Free Software Foundation, Inc.
548
549 Copying and distribution of this file, with or without modification,
550 are permitted in any medium without royalty provided the copyright
551 notice and this notice are preserved.
552
553 Local Variables:
554 mode: change-log
555 left-margin: 8
556 fill-column: 74
557 version-control: never
558 End:
This page took 0.055391 seconds and 4 git commands to generate.