3 * ldgram.y (DATA_SEGMENT_RELRO_END): Add one argument.
4 * scripttempl/elf.sc (DATA_SEGMENT_RELRO_END): Add 0 as first
6 (DATA_SEGMENT_RELRO_GOTPLT_END): Pass $SEPARATE_GOTPLT as first
7 and . as second argument.
8 (GOTPLT): Move $DATA_SEGMENT_RELRO_GOTPLT_END before the section.
9 * ldexp.c (fold_unary): Remove DATA_SEGMENT_RELRO_END handling here.
10 (fold_binary): Add it here. Insert padding to make relro_end
11 COMMONPAGESIZE bytes aligned. For DATA_SEGMENT_ALIGN in
12 exp_dataseg_relro_adjust phase just use previously computed
14 * ldlang.c (lang_size_sections): Set exp_data_seg.base for
15 relro_adjust here. Call lang_size_sections_1 once more if there
16 was too big padding at DATA_SEGMENT_RELRO_END.
17 * ld.texinfo (DATA_SEGMENT_RELRO_END): Add documentation.
21 * emulparams/armelf.sh: Add unwinding table sections.
25 * emultempl/pe.em (gld_${EMULATION_NAME}_set_symbols): Generate
26 correct base address for position independant executables.
27 * pe-dll.c (pe_dll_fill_sections): Don't mark position independant
32 * ld.texinfo: Document --target2=abs.
33 * emulparms/armsymbian.sh (TARGET2_TYPE): Set.
37 * scripttempl/xstormy16.sc: Only perform the assignments to the
38 ROM region when not performing a relocatable link. The ROM region
39 does not start at address 0, but the sections will.
40 * Makefile.am: Fix linker script dependency for the generation of
42 * Makefile.in: Regenerate.
46 * emulparams/arm_epoc_pe.sh, emulparams/armpe.sh, emulparams/i386pe.sh,
47 emulparams/i386pe_posix.sh, emulparams/mcorepe.sh,
48 emulparams/mipspe.sh, emulparams/ppcpe.sh, scripttempl/pe.sc: Define
50 * scripttempl/pe.sc: Make the virtual address and file offset synced if
51 the alignment is lower than the target page size.
55 * emultempl/pe.em (gld_${EMULATION_NAME}_unrecognized_file): Allow
56 def_file_parse to handle pe_def_file if NULL and prevent crash with
61 * emultempl/ppc64elf.em (gld${EMULATION_NAME}_finish): Enable
62 --emit-stub-syms automatically when --emit-relocs.
66 * scripttempl/elf.sc: Keep .preinit_array, .init_array and
71 * ldexp.c (fold_binary) [DATA_SEGMENT_ALIGN]: Adjust data segment
72 base so that relro end is suitably aligned.
76 * ld.texinfo: Rename arm-specific section. Document --target*
77 * emulparams/armelf_fbsd.sh: Set TARGET2_TYPE.
78 * emulparams/armelf_linux.sh: Ditto.
79 * emulparams/armelf_nbsd.sh: Ditto.
80 * emultempl/armelf.em: Set default for TARGET2_TYPE.
81 (target2_type): New variable.
82 (arm_elf_before_allocation): Don't pass target1_type.
83 (arm_elf_create_output_section_statements): New function.
84 (PARSE_AND_LIST_PROLOGUE): Add OPTION_TARGET2.
85 (PARSE_AND_LIST_LONGOPTS, PARSE_AND_LIST_OPTIONS): Add --target=.
86 (PARSE_AND_LIST_ARGS_CASES): Handle OPTION_TARGET2.
87 (LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS): Set.
88 * emultempl/armelf_oabi.em (_before_allocation): Remove extra
89 argument to bfd_elf32_arm_process_before_allocation.
93 * ldexp.c (fold_name): Update u.undef.next refs.
94 * emultempl/pe.em: Likewise.
95 * emultempl/sunos.em: Likewise.
99 * Makefile.am: Run "make dep-am".
100 * Makefile.in: Regenerate.
101 * config.in: Regenerate.
102 * configure: Regenerate.
103 * aclocal.m4: Regenerate.
104 * po/ld.pot: Regenerate.
108 * scripttempl/elf32crx.sc (.init): Add KEEP for section's *personality*.
114 * emultempl/armelf_oabi.em (before_allocation): Add extra zero param
115 to bfd_elf32_arm_process_before_allocation call.
119 * emulparams/armsymbian.sh: Set TARGET1_IS_REL.
120 * emultempl/armelf.em: Use TARGET1_IS_REL. Add --target1-{rel,abs}.
124 * configure: Regenerated with autconfig 2.13.
128 * ldexp.c (fold_binary) [DATA_SEGMENT_ALIGN]: Apply data segment
129 alignment before adjusting DATA_SEGMENT_RELRO_END.
133 * emulparams/armsymbian.sh: Use armbpabi script.
134 * scripttempl/armbpabi.sc: New script.
138 * Makefile.am (ALL_EMULATIONS): Add earmsymbian.o.
139 (earmsymbian.c): New target.
140 * configure.tgt: Use armsymbian emulation for arm*-*-symbianelf*.
141 * Makefile.in: Regenerated.
142 * aclocal.m4: Likewise.
143 * configure: Likewise.
144 * emulparams/armsymbian.sh: New file.
148 * scripttempl/elf32crx.sc: Edit file with comments.
149 (.init): Add new section.
151 (.ctor): Control the linkage order.
156 * emultempl/pe.em (after_open): Do not assume that either bfd is
161 * ldlang.c (lang_init): Don't compare with TRUE.
165 * emulparams/msp430all.sh: Fix RAM sizes for all targets.
166 * scripttempl/elf32msp430.sc: Add .profiler section definition.
170 * ldlang.c (wildcardp): Defined as a macro with strpbrk.
174 * configure.tgt (arm*-*-symbianelf*): New target.
175 (arm*-*-eabi*): Likewise.
179 * emultempl/ppc64elf.em (non_overlapping_opd): New variable.
180 (ppc_before_allocation): Pass it to ppc64_elf_edit_opd).
181 (OPTION_NON_OVERLAPPING_OPD): Define.
182 (PARSE_AND_LIST_OPTIONS, PARSE_AND_LIST_ARGS_CASES): Add
183 --non-overlapping-opd option.
188 * ldexp.c (fold_name): Don't call bfd_link_add_undef if the symbol
189 was already on the undefs list.
193 * emultempl/ppc64elf.em (gld${EMULATION_NAME}_new_vers_pattern): Dot
194 prefix the symbol field too.
198 * ldmain.c (link_callbacks): Remove "error_handler".
199 * ldmisc.c: Include elf-bfd.h.
200 (vfinfo): Sort comment. Handle %A. Use %A instead of
201 bfd_get_section_indent.
202 (error_handler): Delete.
203 * ldmisc.h (error_handler): Delete declaration.
207 * emultempl/ppc64elf.em (gld${EMULATION_NAME}_finish): Call
208 ppc64_elf_restore_symbols.
212 * emultempl/ppc64elf.em (gld${EMULATION_NAME}_finish): Error if
213 .toc is too large on relocatable linking.
217 * emultempl/ppc64elf.em (ppc_after_open): Delete.
218 (LDEMUL_AFTER_OPEN): Don't define.
222 * ld.texinfo (Top): Document specific options of 68HC11 and 68HC12.
226 * scripttempl/elfm68hc12.sc: Align text, rodata and data section
231 * emulparams/hppanbsd.sh (OUTPUT_FORMAT): Set to "elf32-hppa-netbsd".
235 * Makefile.am: Add new subtargets: msp430x1610, msp430x1611,
236 msp430x1612, msp430x415, msp430x417, msp430xG437, msp430xG438,
238 * configure.tgt: Likewise.
239 * emulparams/msp430all.sh: Likewise.
240 * Makefile.in: Regenerate.
244 * emultempl/elf32.em (_place_orphan): Use an already existing
245 section name if that section does not have any flags set.
249 * ldlang.c (already_linked_hash_entry): Removed.
250 (already_linked): Likewise.
251 (already_linked_table): Likewise.
252 (section_already_linked): Call bfd_section_already_linked.
253 (lang_process): Replace already_linked_table_init with
254 bfd_section_already_linked_table_init and check return. Replace
255 already_linked_table_free with bfd_section_already_linked_table_free.
259 * ldlang.c (init_os): Make sure that the newly allocated userdata
260 structure is zeroed out.
264 * NEWS: Mention the new --add-needed/--no-add-needed and
265 --as-needed/--no-as-needed options.
269 * emultempl/elf32.em (gld${EMULATION_NAME}_load_symbols): Also
270 check the add_needed field.
271 (dt_needed): New struct.
272 (gld${EMULATION_NAME}_try_needed): Change the first argument
273 to a pointer to struct dt_needed. Check the DYN_NO_ADD_NEEDED
274 bit in the file where the DT_NEEDED entry comes from.
275 (gld${EMULATION_NAME}_search_needed): Change the second
276 argument to a pointer to struct dt_needed.
277 (gld${EMULATION_NAME}_check_ld_so_conf): Updated.
278 (gld${EMULATION_NAME}_after_open): Likewise.
280 * ld.texinfo: Add --add-needed document.
281 * ldlang.c (new_afile): Set p->add_needed.
282 * ldlang.h (lang_input_statement_type): Add add_needed field.
283 * ldmain.h (add_needed): Declare.
284 * ldmain.c (add_needed): New global var.
285 * lexsup.c (option_values): Add OPTION_ADD_NEEDED and
286 OPTION_NO_ADD_NEEDED.
287 (ld_options): Likewise.
288 (parse_args): Handle them.
292 * emultempl/pe.em (make_import_fixup): Use bfd_get_32 to correct
293 for endian-ness of extracted addend.
297 * pe-dll.c (auto_export): Filter on just the import prefix,
298 "_imp_", not "_imp__".
302 * configure.tgt: Change sh-sybmian-elf to sh-*-symbianelf.
306 * Makefile.am (ALL_EMULATIONS): Add eelf32crx.o.
307 (eelf32crx.c): New target.
308 * Makefile.in: Regenerate.
309 * configure.tgt: Handle crx-*-elf*.
310 * emulparams/elf32crx.sh: New file.
311 * emultempl/crxelf.em: New file.
312 * scripttempl/elf32crx.sc: New file.
313 * NEWS: Mention new target.
317 * Makefile.am: Add eshlsymbian.c.
318 * Makefile.in: Regenerate.
319 * configure.tgt: Add sh*-symbian-elf target.
320 * emulparams/shlsymbian.sh: New file. Configure the
321 sh-symbian-elf linker scripts.
322 * scripttemp/elf32sh-symbian.sc: New file. Linker script
323 template for the sh-symbian-elf target.
327 * emulparams/hppa64linux.sh: Define PLT_BEFORE_GOT.
328 * emulparams/hppalinux.sh: Likewise.
329 * scripttempl/elf.sc: Place .plt just before .got when .plt is in
330 data segment and PLT_BEFORE_GOT is defined.
334 * ld.texinfo (WIN32): Document PE weak symbols.
338 * emulparams/shlelf32_linux.sh (COMMONPAGESIZE): Set to 4KB.
342 * ldmisc.c (vfinfo): Call bfd_get_section_ident to identify
347 * ldlang.c (lang_reset_memory_regions): Save last relax pass section
352 * ldlang.c (print_output_section_statement): Don't print size before
354 (IGNORE_SECTION): Remove bfd arg. Update all callers.
356 * ldexp.c (fold_name): .. See below.
357 * ldlang.c (section_already_linked, print_output_section_statement,
358 print_input_section, insert_pad, size_input_section,
359 lang_check_section_addresses, lang_size_sections_1,
360 lang_size_sections, lang_do_assignments_1, lang_set_startof,
361 lang_one_common, lang_reset_memory_regions, lang_process,
362 lang_abs_symbol_at_end_of, lang_do_version_exports_section): ..
363 * ldwrite.c (build_link_order, clone_section, ds, split_sections): ..
364 * pe-dll.c (process_def_file, generate_reloc): ..
365 * emultempl/elf32.em (gld${EMULATION_NAME}_find_statement_assignment,
366 gld${EMULATION_NAME}_before_allocation): ..
367 * emultempl/mmix-elfnmmo.em (mmix_after_allocation): ..
368 * emultempl/sh64elf.em (sh64_elf_${EMULATION_NAME}_before_allocation,
369 sh64_elf_${EMULATION_NAME}_after_allocation): ..
370 * emultempl/sunos.em (gld${EMULATION_NAME}_before_allocation): ..
371 * emultempl/xtensaelf.em (ld_assign_relative_paged_dot,
372 ld_local_file_relocations_fit, ld_xtensa_insert_page_offsets): Use
373 "size" instead of "_raw_size" and "_cooked_size". Expand
374 bfd_section_size macro invocations.
378 * ld/scripttemp/pe.sc (.CRT): Define ___crt_xc_start__,
379 ___crt_xc_end__, ___crt_xi_start__, ___crt_xi_end__, ___crt_xl_start__,
380 ___crt_xp_start__, ___crt_xp_end__, ___crt_xt_start__ and
382 (.tls): Define ___tls_start__ and ___tls_end__.
386 * emulparams/elf32frvfd.sh (GENERATE_PIE_SCRIPT): Set to yes.
390 * configure.in: Set EXTRA_SHLIB_EXTENSION to .a for LynxOS.
391 * configure: Regenerate.
395 * scripttempl/elf.sc: Readd KEEP and .gcc_except_table.* to
396 .gcc_except_table output sections lost accidentally with
401 * ldwrite.c (build_link_order): Use bfd_get_section_size
402 instead of bfd_get_section_size_before_reloc or _raw_size.
403 * pe-dll.c (process_def_file): Likewise.
408 * ldlang.c (lang_finish): Don't free lang_definedness_table.
412 * ldlang.c (gc_section_callback): Move SEC_EXCLUDE twiddles..
413 (lang_gc_sections): .. to a LANG_FOR_EACH_INPUT_STATEMENT loop here.
417 * testsuite/ld-sh/arch/arch.exp: New test script.
418 * testsuite/ld-sh/arch/arch_expected.txt: New file.
419 * testsuite/ld-sh/arch/sh.s: New file.
420 * testsuite/ld-sh/arch/sh2.s: New file.
421 * testsuite/ld-sh/arch/sh-dsp.s: New file.
422 * testsuite/ld-sh/arch/sh2e.s: New file.
423 * testsuite/ld-sh/arch/sh3-nommu.s: New file.
424 * testsuite/ld-sh/arch/sh3.s: New file.
425 * testsuite/ld-sh/arch/sh3-dsp.s: New file.
426 * testsuite/ld-sh/arch/sh3e.s: New file.
427 * testsuite/ld-sh/arch/sh4-nommu-nofpu.s: New file.
428 * testsuite/ld-sh/arch/sh4-nofpu.s: New file.
429 * testsuite/ld-sh/arch/sh4.s: New file.
430 * testsuite/ld-sh/arch/sh4a-nofpu.s: New file.
431 * testsuite/ld-sh/arch/sh4al-dsp.s: New file.
432 * testsuite/ld-sh/arch/sh4a.s: New file.
436 * ldlang.c: Formatting. Wrap long lines, expand bfd_get_section_flags
438 * lexsup.c: Formatting. Wrap long lines.
439 * ldwrite.c: Update copyright date.
441 * ldlang.c (lang_add_section): Don't twidlle SEC_EXCLUDE here.
442 (output_section_callback): Nor SEC_KEEP here.
443 (gc_section_callback): Twiddle SEC_EXCLUDE here.
444 (lang_gc_wild): Delete. Fold into..
445 (lang_gc_sections_1): ..here. Only call bfd_gc_sections when garbage
447 (lang_process): Always call lang_gc_sections.
448 (lang_place_orphans): Handle SEC_EXCLUDE sections.
449 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Remove
454 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Clear
455 SEC_EXCLUDE on non-SEC_DEBUGGING sections for relocatable link.
456 * ldlang.c (lang_add_section): Likewise.
460 * ldlang.c (lang_add_section): Set SEC_EXCLUDE for SEC_GROUP
461 sections when doing a final link. Clear SEC_EXCLUDE when doing
462 a relocable link, except for SEC_DEBUGGING sections.
463 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Use the
464 same condition here to drop SEC_EXCLUDE orphan sections.
468 * ldlang.c (lang_process): Call bfd_merge_sections later, and
469 only when not a relocatable link.
470 (print_input_section): Handle SEC_EXCLUDE sections.
471 (size_input_section): Don't update dot on SEC_EXCLUDE sections.
472 (lang_do_assignments_1): Likewise.
473 * ldwrite.c (build_link_order): Ignore SEC_EXCLUDE input sections.
474 * emultempl/armelf.em (arm_elf_set_bfd_for_interworking): Likewise.
475 * emultempl/hppaelf.em (build_section_lists): Likewise.
476 * emultempl/ppc64elf.em (build_toc_list): Likewise.
477 (build_section_lists): Likewise.
481 * ld.texinfo (Options): Fix typo in last change.
485 * ld.h (ld_config_type): Add new field: hash_table_size.
486 * ldmain.c: Initialise the new field to zero. If it is non-zero
487 after parsing the linker's command line call
488 bfd_hash_set_default_size.
489 * lexsup.c (option_values): Add OPTION_HASH_SIZE.
490 (ld_options): Add hash-size.
491 (parse_args): Parse --hash-size option. Allow
492 --reduce-memory-overheads to set the default hash table size as
494 * ld.texinfo: Document the new switch. Also mention that
495 --reduce-memory-overheads can affect the hash table size.
496 * NEWS: Mention the new feature.
500 * NEWS: Mention new linker map file generation and the
501 --reduce-memory-overheads option.
502 * ld.texinfo: Document --reduce-memory-overheads option.
503 * ld.h (map_symbol_def): New struct.
504 (struct user_section_struct, section_userdata_type): Rename to:
505 (struct lean_user_section_struct, lean_section_userdata_type).
506 (struct fat_user_section_struct, fat_section_userdata_type): New.
507 (SECTION_USERDATA_SIZE): Define.
508 (args_type): New member reduce_memory_overheads.
509 * ldlang.c (map_obstack): New static variable.
510 (init_map_userdata, print_all_symbols, sort_def_symbol): New functions.
511 (lang_map): Unless command_line.reduce_memory_overheads is set,
512 initialize lists of defined symbols for each section.
513 (print_input_section): Unless command_line.reduce_memory_overheads
514 is set, use print_all_symbols.
515 (init_os): Use lean_section_userdata_type / SECTION_USERDATA_SIZE.
516 * ldmain.c (main): Initialize command_line.reduce_memory_overheads.
517 * lexsup.c (enum option_values): Add OPTION_REDUCE_MEMORY_OVERHEADS.
518 (ld_options): Add entry for --reduce-memory-overheads.
519 (parse_args): Handle OPTION_REDUCE_MEMORY_OVERHEADS.
523 * ldgram.y (sect_constraint): New.
524 (ONLY_IF_RO, ONLY_IF_RW): New tokens.
525 (section): Add sect_constraint. Pass additional argument
526 to lang_enter_output_section_statement.
527 * mri.c (mri_draw_tree): Pass additional argument to
528 lang_enter_output_section_statement.
529 * emultempl/pe.em (place_orphan): Likewise.
530 (output_prev_sec_find): Disregard output section statements with
532 * emultempl/mmo.em (output_prev_sec_find): Likewise.
533 (mmo_place_orphan): Pass additional argument to
534 lang_enter_output_section_statement.
535 * emultempl/elf32.em (output_prev_sec_find): Disregard output section
536 statements with constraint == -1.
537 (place_orphan): Pass additional argument to
538 lang_enter_output_section_statement.
539 * ldlang.c (lang_enter_overlay_section): Likewise.
540 (lang_output_section_find_1): New.
541 (lang_output_section_find): Use it.
542 (lang_output_section_statement_lookup_1): New.
543 (lang_output_section_statement_lookup): Use it.
544 (check_section_callback, check_input_sections): New.
545 (map_input_to_output_sections): Check if all input sections
546 are readonly if ONLY_IF_RO or ONLY_IF_RW was seen.
547 (strip_excluded_output_sections): Disregard output section statements
548 with constraint == -1.
549 (lang_record_phdrs): Likewise.
550 (lang_enter_output_section_statement): Add constraint argument.
551 Use lang_output_section_statement_lookup_1.
552 * ldlang.h (lang_output_section_statement_type): Add constraint
553 and all_input_readonly fields.
554 (lang_enter_output_section_statement): Adjust prototype.
555 * ldlex.l (ONLY_IF_RO, ONLY_IF_RW): New tokens.
556 * scripttempl/elf.sc (.eh_frame, .gcc_except_table): Move into text
557 segment if all input sections are readonly.
561 * scripttempl/i386lynx.sc: Remove file.
565 * ld.texinfo (Output Section Address): Correct subsection name.
569 * configure.tgt (powerpc-*-lynxos* case): New case.
570 * configure.host (i[3-7]86-*-lynxos* case): Remove case.
571 * emulparams/ppclynx.sh: New file.
572 * emulparams/i386lynx.sh (SCRIPT_NAME): Update to LynxOS 4.0.
573 * Makefile.am (ALL_EMULATIONS): Add eppclynx.o
574 (ei386lynx.c): Update rule to LynxOS 4.0 ELF.
575 (eppclynx.c): New rule.
576 * Makefile.in: Regenerate.
580 * configure.tgt (or32-*-rtems*): Switch to elf and
581 support versioned targets.
585 * po/fr.po: Updated French translation.
589 * genscripts.sh: Generate -z combreloc -z now -z relro scripts
590 for binaries, -shared and -pie.
591 * emulparams/elf_i386.sh (SEPARATE_GOTPLT): Set.
592 * emulparams/elf_x86_64.sh (SEPARATE_GOTPLT): Set.
593 * emulparams/elf32ppc.sh (OTHER_READWRITE_SECTIONS): Rename to...
594 (OTHER_RELRO_SECTIONS): ... this.
595 * ldlex.l (DATA_SEGMENT_RELRO_END): Add.
596 * emultempl/elf32.em (gld${EMULATION_NAME}_handle_option): Handle
597 -z relro and -z norelro.
598 (gld${EMULATION_NAME}_list_options): Add it to usage.
599 (gld${EMULATION_NAME}_get_script): Return -z combreloc -z now
600 -z relro scripts when appropriate.
601 * scripttempl/elf.sc: Unset SEPARATE_GOTPLT if RELRO_NOW is set.
602 Create separate .got.plt section if SEPARATE_GOTPLT.
603 Move sections which are only written during relocation handling
604 to the beginning of RW segment. If NO_SMALL_DATA, move .got
605 before .data. Add DATA_SEGMENT_RELRO_END directive.
606 Include OTHER_RELRO_SECTIONS.
607 * ldgram.y (DATA_SEGMENT_RELRO_END): Add.
608 * ldexp.c (exp_print_token): Handle DATA_SEGMENT_RELRO_END.
609 (fold_unary): Likewise.
610 (fold_binary): Handle -z relro.
611 * ldexp.h (struct exp_data_seg): Add exp_dataseg_relro_seen and
612 exp_dataseg_relro_adjust phases. Add relro_end field.
613 * ldmain.c (main): Initialize link_info.relro to FALSE.
614 * ldlang.c (lang_size_sections): Handle -z relro.
618 * scripttempl/avr.sc: Do not set LMA for "eeprom" section.
622 * ldlang.c (print_padding_statement): Cast size_t to bfd_vma
623 before printing it with %W.
628 * emultempl/pe.em (real_flags): New static.
629 (OPTION_LARGE_ADDRESS_AWARE): New define.
630 (gld${EMULATION_NAME}_add_options): Add --large-address-aware option.
631 (gld_${EMULATION_NAME}_list_options): Likewise.
632 (gld${EMULATION_NAME}_handle_option): Likewise.
633 (gld_${EMULATION_NAME}_after_open): Pass real_flags to PE private data.
634 * ld.texinfo: Document it.
639 * NEWS: Mention DWARF 2 support for i386pe.
643 * emulparams/elf32frvfd.sh (OUTPUT_FORMAT): Switch to new
648 * ldlang.c (unique_section_p): Pass section parm, return true on
650 (output_section_callback): Adjust.
651 * ldlang.h (unique_section_p): Update prototype.
652 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Adjust.
656 * ld.texinfo (--gc-sections): Remove restriction for
661 * scripttempl/pe.sc: Handle .debug* and .gnu.linkonce.wi.* sections
662 for DWARF 2/3. Update stab section's syntax.
666 * pe-dll.c: Revert changes accidentally committed 2004-03-08.
667 (fill_edata): Correct pointer arithmetic.
671 * ld.texinfo: Remove MIPS --embedded-relocs documentation.
672 * emulparams/elf32bmip.sh (EXTRA_EM_FILE): Remove definition.
673 * emulparams/mipsidt.sh (TEMPLATE_NAME): Use generic.em.
674 (EXTRA_EM_FILE): Use mipsecoff.em
675 * emulparams/mipsidtl.sh (TEMPLATE_NAME): Use generic.em.
676 (EXTRA_EM_FILE): Use mipsecoff.em
677 * emultempl/mipsecoff.em: Restructure to be included as an
678 extra emulation file.
679 (check_sections, gld${EMULATION_NAME}_after_open)
680 (gld${EMULATION_NAME}_after_allocation)
681 (gld${EMULATION_NAME}_get_script)
682 (ld_${EMULATION_NAME}_emulation): Remove
683 (gld${EMULATION_NAME}_before_parse): Rename to...
684 (mipsecoff_before_parse): This.
685 (LDEMUL_BEFORE_PARSE): Define.
686 * emultempl/mipself.em: Remove file.
687 * scripttempl/mips.sc (.rel.sdata): Do not include in output.
688 (__runtime_reloc_start, __runtime_reloc_stop): Stop providing
690 * Makefile.am: Remove dependencies on emultempl/mipself.em.
691 * Makefile.in: Regenerate.
695 * ld.texinfo (synthesizing on H8/300): Information about linker
696 relaxation support for bit manipulation instructions and system
697 control instructions is added.
701 * NEWS: Mention change in DEFINED semantics.
705 * scripttempl/elf.sc (.text): Add KEEP for .text.*personality*.
706 (.data): Add KEEP for .gnu.linkonce.d.*personality*.
707 (.gcc_except_table): Add KEEP for self and accept .gcc_except_table.*.
711 * ld.texinfo (Simple Example): Add missing punctuation.
715 * NEWS: Note that MIPS --embedded-relocs option is deprecated.
719 * ldlang.c (lang_do_assignments_1): Handle .tbss output section
724 * scriptempl/pe.sc: Put numbered .ctors.* after .ctors
725 with default priority. Likewise for dtors.
729 * configure.host: Remove mips*-dec-bsd* target.
730 * configure.tgt: Likewise.
734 * emulparams/elf32bsmip.sh (EXTRA_EM_FILE): Define to irix.
735 * emulparams/elf64bmip.sh (EXTRA_EM_FILE): Likewise.
736 * emulparams/elf32bmipn32.sh (EXTRA_EM_FILE): Likewise.
737 * emultempl/irix.em: New file.
738 * Makefile.am (eelf32bsmip.c, eelf32bmipn32.c, eelf64bmip.c): Update
740 * Makefile.in: Regenerate.
744 * emultempl/armelf.em (byteswap_code): Add.
745 (arm_elf_before_allocation): Pass extra parameter.
746 (PARSE_AND_LIST_PROLOGUE): Add OPTION_BE8.
747 (PARSE_AND_LIST_LONGOPTS, PARSE_AND_LIST_OPTIONS): Add be8.
748 (PARSE_AND_LIST_ARGS_CASES): Handle OPTION_BE8.
749 * emultempl/armelf_oabi.em: Pass extra parameter.
750 * ld.texinfo: Document --be8.
754 Remove long-obsolete MPW support.
755 * mpw-config.in, mpw-make.sed, mac-ld.r: Remove files.
756 * Makefile.am (mpw): Remove file-presynthesizing actions.
757 * Makefile.in: Likewise.
758 * ldfile.c (slash): Remove MPW case.
759 * ldlex.l [MPW]: Remove unused definition.
763 * Makefile.am (ALL_EMULATIONS): Add eelf32cr16c.o.
764 (eelf32cr16c.c): New target.
765 * Makefile.in: Regenerate.
766 * configure.tgt: Handle cr16c-*-elf*.
767 * emulparams/elf32cr16c.sh: New file.
768 * scripttempl/elfcr16c.sc: Likewise
769 * NEWS: Mention support for new target.
773 * po/sv.po: Updated Swedish translation.
777 * emultempl/elf32.em: Update new bfd_elf_discard_info name.
778 * emultempl/hppaelf.em: Likewise.
779 * emultempl/ppc64elf.em: Likewise.
780 * emultempl/sh64elf.em: Likewise.
784 * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Update
785 size_dynamic_sections call.
790 * emultempl/ppc64elf.em (ppc_create_output_section_statements): Set
795 * lexsup.c (parse_args): Don't set unresolved_syms_in_objects
796 or unresolved_syms_in_shared_libs for -Bdynamic and -Bstatic.
800 * emulparams/elf32frvfd.sh (MAXPAGESIZE): Change to 16Kb.
804 * config.in: Regenerate.
805 * po/ld.pot: Regenerate.
809 * ld.texinfo: Add --as-needed doco.
810 * ldmain.c (as_needed): New global var.
811 * ldmain.h (as_needed): Declare.
812 * lexsup.c (option_values): Add OPTION_AS_NEEDED and
814 (ld_options): Likewise.
815 (parse_args): Handle them.
816 * ldlang.h (lang_input_statement_type): Add as_needed field.
817 * ldlang.c (new_afile): Set p->as_needed.
818 * emultempl/elf32.em (gld${EMULATION_NAME}_load_symbols): New function.
819 (gld${EMULATION_NAME}_try_needed): Use bfd_elf_set_dyn_lib_class.
820 (ld_${EMULATION_NAME}_emulation): Set LDEMUL_RECOGNIZED_FILE entry.
822 * ldlang.c (open_input_bfds): Remove useless cast.
823 (lang_do_assignments_1): Likewise.
824 (lang_for_each_input_section): Delete.
828 * configure.tgt: Switch sh-*-rtems* to ELF. Add sh-*-rtemscoff*.
832 * pe-dll.c (pe_dll_generate_implib): Skip sections marked as
833 private when building implib.
837 * ldlang.c (lang_add_section): Don't force SEC_LOAD on
839 (IGNORE_SECTION): Ignore .tbss sections too.
840 (lang_size_sections_1): .tbss sections do not advance dot.
844 * ld.texinfo (Options): Fix example for --wrap.
848 * pe-dll.c (fill_edata): Check that exported_symbol_sections is
853 * ldlang.c (lang_check): Use %P, not %E, in error message.
857 * ldlang.h (struct lang_output_section_state): Change processed
859 * ldexp.c (check, invalid): Remove.
860 (fold_name): Move valid_p assignments. Create undefined symbol
861 when needed. Directly exampine section's processd flag.
862 * ldlang.c (lang_output_section_statement_lookup): Adjust
863 processed field init.
864 (lang_size_sections_1): Allow LOADADDR when determining section's
865 VMA. Adjust error message. Fold data statement's expr.
866 (lang_size_sections): Correctly increment lang_statement_iteration.
870 * ldexp.c (fold_tree): Follow indirect symbols.
874 * ldgram.y (exp): Add two operand ALIGN.
875 * ldexp.c (fold_binary): Add ALIGN_K case.
876 * ld.texinfo (ALIGN): Document two operand version.
880 * ldlang.c (map_input_to_output_sections): Initialize sections
881 mentioned in a data statement expression.
882 (lang_do_assignments_1): Add data statement's expression's
887 * ldgram.y (statement_anywhere): Add assert rule.
888 * ldlang.c (exp_init_os): Add assert case.
892 * ldmain.c (remove_output): Call bfd_cache_close.
896 * emulparams/elf32bmipn32-defs.sh (OTHER_SECTIONS): Discard
897 .MIPS.content* and .MIPS.events* sections.
901 * emulparams/armelf.sh, emulparams/armelf_linux.sh: Move
902 .note.gnu.arm.ident to after allocated sections. Mark its
907 * emulparams/armelf_linux.sh (COMMONPAGESIZE): Set to 4KB.
908 * emulparams/elf32bmip.sh (COMMONPAGESIZE): Likewise.
909 * emulparams/elf32bmipn32.sh (COMMONPAGESIZE): Likewise.
910 * emulparams/elf32btsmipn32.sh (COMMONPAGESIZE): Likewise.
911 * emulparams/shlelf_linux.sh (COMMONPAGESIZE): Likewise.
915 * emultempl/pe.em (_after_open): Fix typo in previous delta.
919 * emultempl/pe.em (_after_open): Fix thinko in 2003-12-18 patch.
923 * genscripts.sh: Fix typo.
925 * genscripts.sh: Apply $LIBPATH_SUFFIX to $tool_lib and $libdir too.
929 * emulparams/elf64_ia64.sh: Put .rela.opd into
930 OTHER_GOT_RELOC_SECTIONS instead of OTHER_PLT_RELOC_SECTIONS.
934 * pe-dll.c (pe_create_import_fixup): Clear WP_TEXT flag.
935 * ld.texinfo (--omagic): Note that writable text section
936 does not conform to published PE-COFF specs.
937 (--enable-auto-import): Likewise.
941 * emulparams/elf32ppc.sh (COMMONPAGESIZE): Define.
945 * ldlang.c (lang_get_regions): Add extra parameter 'have_vma'
946 which if true will prevent the LMA region being used as a
947 replacement for a default VMA region.
948 (lang_leave_output_section_statement): Pass extra parameter.
949 (lang_leave_overlay): Likewise.
950 * ld.texinfo (Output Section LMA): Document that the LMA
951 region can be set to the VMA region if no VMA has been set.
952 * ldlang.h (struct lang_output_section_phdr_list): Create a
953 typedef for this type. Minor formatting fixes.
957 * ldlang.c (lang_size_sections_1): If dot is advanced, then
958 assume that the section should be allocated.
962 * ldlang.c (IGNORE_SECTION): Don't ignore SEC_ALLOC && !SEC_LOAD
963 sections. Do ignore SEC_NEVER_LOAD sections.
964 (lang_size_sections_1): Remove test made redundant with the above.
968 * emultempl/ppc64elf.em (ppc_before_allocation): Clear cached
974 * emulparams/elf32frvfd.sh (EMBEDDED): Clear.
976 * emulparams/elf32frvfd.sh (STACK_ADDR): Unset.
977 (MAXPAGESIZE): Set to 64Kb.
978 (OTHER_READONLY_SECTIONS): Define __ROFIXUP_LIST__ and
979 __ROFIXUP_END__. Don't map .rofixup.got any more.
980 * emulparams/elf32frv.sh (NOP): Set.
982 * configure.tgt: Add frv-*-*linux*.
984 * Makefile.am (ALL_EMULATIONS): Added eelf32frvfd.o.
985 (eelf32frvfd.c): New.
986 * configure.tgt <frv-*-*>: Added it to targ_extra_emuls.
987 * emulparams/elf32frv.sh: Reverted previous two patches.
988 * emulparams/elf32frvfd.sh: New.
989 * Makefile.in: Rebuilt.
991 * emulparams/elf32frv.sh (OTHER_READONLY_SECTIONS): Added
992 .rofixup.got to .rofixup.
994 * emulparams/elf32frv.sh (MAXPAGESIZE): Make it 256KiB, not 256B.
995 (TEMPLATE_NAME, GENERATE_SHLIB_SCRIPT): Set.
999 * emulparams/elf_s390.sh (NO_SMALL_DATA): Set to yes.
1000 * emulparams/elf64_s390.sh (NO_SMALL_DATA): Set to yes.
1004 * ldexp.c (align_n): Make static.
1005 * ldexp.h (align_n): Delete declaration.
1006 * ldlang.h (lang_enter_output_section_statement): Remove
1008 * ldlang.c (lang_enter_output_section_statement): Likewise.
1009 (TO_ADDR, TO_SIZE): Define.
1010 (opb_shift): New var.
1011 (init_opb): New function.
1012 (print_input_section): Call init_opb and use TO_ADDR.
1013 (print_data_statement, print_reloc_statement): Likewise.
1014 (print_padding_statement): Likewise.
1015 (size_input_section): Use TO_SIZE and TO_ADDR, and global opb_shift.
1016 (lang_check_section_addresses): Likewise.
1017 (lang_size_sections_1): Likewise.
1018 (lang_do_assignments_1): Likewise.
1019 (lang_set_startof): Likewise.
1020 (lang_one_common): Likewise. Combine power_of_two and opb_shift align.
1021 (lang_process): Call init_opb.
1022 (lang_abs_symbol_at_end_of): Use TO_ADDR and global opb_shift.
1023 (lang_enter_overlay_section): Adjust
1024 lang_enter_output_section_statement call.
1025 * ldgram.y: Likewise.
1026 * mri.c (mri_draw_tree): Likewise.
1027 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Likewise.
1028 * emultempl/mmo.em (mmo_place_orphan): Likewise.
1029 * emultempl/pe.em (gld${EMULATION_NAME}_place_orphan): Likewise.
1031 * ldfile.c (ldfile_set_output_arch): Add defarch param.
1032 * ldfile.h (ldfile_set_output_arch): Ditto.
1033 * emultempl/aix.em (gld${EMULATION_NAME}_before_parse): Use
1034 ldfile_set_output_arch.
1035 * emultempl/beos.em (gld${EMULATION_NAME}_before_parse): Ditto.
1036 * emultempl/elf32.em (gld${EMULATION_NAME}_before_parse): Ditto.
1037 * emultempl/linux.em (gld${EMULATION_NAME}_before_parse): Ditto.
1038 * emultempl/mipsecoff.em (gld${EMULATION_NAME}_before_parse): Ditto.
1039 * emultempl/pe.em (gld${EMULATION_NAME}_before_parse): Ditto.
1040 * emultempl/sunos.em (gld${EMULATION_NAME}_before_parse): Ditto.
1041 * ldgram.y: Adjust ldfile_set_output_arch call.
1042 * emultempl/armcoff.em (gld${EMULATION_NAME}_before_parse): Ditto.
1043 * emultempl/armelf.em (gld${EMULATION_NAME}_before_parse): Ditto.
1044 * emultempl/armelf_oabi.em (gld${EMULATION_NAME}_before_parse): Ditto.
1045 * emultempl/generic.em (gld${EMULATION_NAME}_before_parse): Ditto.
1046 * emultempl/gld960c.em (gld960_set_output_arch): Ditto.
1047 * emultempl/m68kcoff.em (gld${EMULATION_NAME}_before_parse): Ditto.
1048 * emultempl/ticoff.em (gld${EMULATION_NAME}_before_parse): Ditto.
1052 * configure.tgt: Add m68k-uClinux target.
1054 For older changes see ChangeLog-0203
1060 version-control: never