3 * emultempl/elf32.em (parse_args): Handle -z nocopyreloc.
4 * NEWS: Mention -z nocopyreloc.
5 * ld.texinfo (Options): Describe nocopyreloc.
9 * configure: Regenerate.
13 * ldver.h (ld_program_version): Remove declaration.
14 * lexsup.c (parse_args): Move printing of copyright message..
15 * ldver.c (ldversion): .. to here.
16 Use BFD_VERSION_STRING in place of BFD_VERSION.
17 (ld_program_version): Remove.
18 * Makefile.am (Makefile): Depend on bfd/configure.in.
20 * Makefile.in: Regenerate.
24 * Makefile.am: Update dependencies with "make dep-am".
25 * Makefile.in: Regenerate.
29 * ldlang.c (lang_common): Conditionally inhibit Common allocation.
30 * lexsup.c: Add --no-define-common commandline option.
31 * ldgram.y: Add INHIBIT_COMMON_ALLOCATION script command.
33 * ld.h: Add command_line.inhibit_common_definition.
34 * ldmain.c (main): Initialize.
35 * ld.texinfo: Document.
39 * ldmisc.c (USE_STDARG): Remove.
40 (info_msg): Define using VPARAMS, VA_OPEN, VA_FIXEDARG, VA_CLOSE.
45 * ldmisc.h: Remove #ifdef ANSI_PROTOTYPES and non-ansi
46 declarations. Update copyright.
50 * pe-dll.c: Remove obsoleted declaration of
51 pe_get_data_import_dll_name.
52 (pe_create_import_fixup): Fix thinko.
54 * ld.texinfo(enable-auto-import): Clarify the explanation.
58 * pe-dll.c (pe_create_import_fixup): Revert previous patch.
59 * emultemp/pe.em (pe_data_import_dll): Move definition outside of
60 DLL_SUPPORT controlled code.
64 * emultempl/pe.em(pe_data_import_dll): Make static.
65 (pe_get_data_import_dll_name): New accessor function.
66 * pe-dll.c(pe_create_import_fixup): call
67 pe_get_data_import_dll_name() from pe.em, instead of
68 directly accessing pe_data_import_dll variable from pe.em.
72 * deffilep.y: Include "safe-ctype.h" instead of <ctype.h>.
73 (def_file_add_directive): Use ISSPACE instead of isspace.
74 (def_lex): Use ISDIGIT/ISXDIGIT/ISALPHA/ISALNUM instead of
75 isdigit/isxdigit/isalpha/isalnum.
76 * emultempl/aix.em: Include "safe-ctype.h" instead of <ctype.h>.
77 (gld${EMULATION_NAME}_read_file): Use ISSPACE instead of isspace.
78 * emultempl/elf32.em: Include "safe-ctype.h" instead of <ctype.h>.
79 (gld${EMULATION_NAME}_place_orphan): Use ISALNUM instead of
81 * emultempl/gld960c.em: Include "safe-ctype.h" instead of <ctype.h>.
82 (gld960_set_output_arch): Use ISUPPER/TOLOWER instead of
84 * emultempl/sunos.em: Include "safe-ctype.h" instead of <ctype.h>.
85 (gld${EMULATION_NAME}_search_dir): Use ISDIGIT instead of isdigit.
86 * ldctor.c: Include "safe-ctype.h" instead of <ctype.h>.
87 (ctor_prio): Use ISDIGIT instead of isdigit.
88 * ldfile.c: Include "safe-ctype.h" instead of <ctype.h>.
89 (ldfile_open_file_search): Use ISALPHA instead of isalpha.
90 (ldfile_add_arch): Use ISUPPER/TOLOWER instead of
92 * ldlang.c: Include "safe-ctype.h" instead of <ctype.h>.
93 (stricpy): Use TOLOWER instead of isupper/tolower.
94 (lang_leave_overlay_section): Use ISALNUM instead of isalnum.
95 * ldlex.l: Include "safe-ctype.h" instead of <ctype.h>.
96 (lex_warn_invalid): Use ISPRINT instead of isprint.
97 * ldmain.c: Include "safe-ctype.h" instead of <ctype.h>.
98 (main): For gettext, also set the LC_CTYPE locate facet.
99 (add_keepsyms_file): Use ISSPACE instead of isspace.
100 * lexsup.c: Include "safe-ctype.h" instead of <ctype.h>.
101 (is_num, parse_args): Use ISDIGIT instead of isdigit.
102 * mpw-elfmips.c: Include "safe-ctype.h" instead of <ctype.h>.
103 (gldelf32ebmip_place_orphan): Use ISALNUM instead of isalnum.
104 * mpw-eppcmac.c: Include "safe-ctype.h" instead of <ctype.h>.
105 (gldppcmacos_read_file): Use ISSPACE instead of isspace.
106 * pe-dll.c: Include "safe-ctype.h" instead of <ctype.h>.
107 (quoteput): Use ISSPACE instead of isspace.
108 (pe_dll_generate_implib, pe_process_import_defs): Use ISALNUM
113 * deffilep.y (def_stash_module): Constify "name" param.
115 * pe-dll.c: Replace CONST with const throughout.
116 (quick_symbol): Constify "n1", "n2", "n3" params.
117 (make_singleton_name_thunk): Constify "import" param. Make
118 "buffer_len" a size_t.
119 (make_import_fixup_entry): Constify "name", "fixup_name",
120 "dll_symname" params.
121 (pe_get16): Cast args of bfd_seek. Replace bfd_read with bfd_bread.
122 (pe_get32): Likewise.
123 (pe_implied_import_dll): Likewise.
125 * emultempl/beos.em (sort_by_file_name): Constify "ra", "rb".
126 (sort_by_section_name): Likewise.
128 * emultempl/pe.em: Move defines for arm_epoc_pe before bfd.h included.
129 (make_import_fixup): Cast printf arg, rel->address to long rather
131 (gld_${EMULATION_NAME}_after_open): Don't compare NULL against int.
135 * ldmain.c (main): Rename BufferSize to ld_bufsz because HPUX
136 defines BufferSize. Increase buffer size by one.
140 * pe-dll.c (pe_walk_relocs_of_symbol): Fix memory leak.
144 * configure.tgt: Add arm-openbsd target.
148 * Makefile.am (ALL_EMULATIONS): Move eelf64ppc.o and
150 (ALL_64_EMULATIONS): Here.
151 * Makefile.in: Regenerated.
155 * emultempl/pe.em(make_import_fixup): change signature to
156 take asection as well as arelec; we need this for proper
157 error reporting. Only call pe_create_import_fixup() if
158 there is no attempt to add a constant addend to the reloc;
159 otherwise, report error condition.
160 * pe-dll.c(pe_walk_relocs_of_symbol): change signature,
161 since final argument is a pointer to make_import_fixup().
162 Change call to cb() to match make_import_fixup() signature.
163 (make_import_fixup_mark): make buffer_len unsigned.
164 * pe-dll.h: change signature of pe_walk_relocs_of_symbol.
168 * ld.texinfo: add verbose documentation for auto-import
169 direct-addressing workaround, to compliment the terse
174 * scripttempl/v850.sc: Add gcc_except_table sections.
178 * emulparams/h8300helf.sh: Move stack to a much higher memory address.
179 * emulparams/h8300self.sh: Similarly.
183 * ld.texinfo (Options, --stack): Correct default value for stack
188 * emultempl/aix.em : Handle import file XMC_XO and syscall symbols.
192 * emultempl/beos.em: Declare prototypes for comparions functions,
197 * emultempl/aix.em: Add missing prototype.
198 * emultempl/lnk960.em: Likewise.
199 * emultempl/vanilla.em: Likewise.
200 * emultempl/armcoff.em: Likewise.
201 * emultempl/armelf_oabi.em: Likewise.
202 * emultempl/beos.em: Likewise.
203 * emultempl/gld960c.em: Likewise.
204 * emultempl/gld960.em: Likewise.
206 * emulparams/elf64alpha.sh (PARSE_AND_LIST_PROLOGUE): Add parameter
207 for prototype declaration.
212 * ldmain.c (get_emulation): Add support for -mips32 and -mips64.
216 * emultempl/pe.em: Add missing prototypes.
217 (gld_${EMULATION_NAME}_after_open): Remove extra args to
218 pe_find_data_imports.
219 (pr_sym): Add unused attribute.
223 * configure.tgt (i[3456]86-*-rtems*, m68*-*-rtems*): Change
224 default from coff to elf.
228 * emulparams/h8300helf.sh: Resync with h8300elf.sh. Update
230 * emulparams/h8300self.sh: Similarly.
234 * Makefile.am (ALL_EMULATIONS): Add eh8300elf.o, eh8300elf.o and
236 (eh8300elf.c, eh8300helf.c, eh8300self.c): New targets.
237 * configure.tgt (h8300-*-elf*): New case.
238 * emulparams/h8300elf.sh, emulparams/h8300helf.sh: New files.
239 * emulparams/h8300self.sh: New file.
240 * Makefile.in: Regenerated.
244 * ldmain.c (main): Rename BSIZE to BufferSize to avoid collision
250 * Makefile.am (ALL_EMULATIONS): Add eelf64ppc.o and eelf64lppc.o.
251 (eelf64ppc.c, eelf64lppc.c): Add make targets.
253 * Makefile.in: Regenerate.
254 * configure.tgt: Add powerpc64 support. Move pdp11, pjl, pj
255 entries to correct alphabetical position.
256 * emulparams/elf64ppc.sh: New.
257 * emulparams/elf64lppc.sh: New.
261 * ldmain.c (main): Declare BSIZE as static.
265 * emultempl/elf32.em (place_orphan): Place orphan .rel* sections
266 into .rel.dyn resp. .rela.dyn if combreloc.
267 (get_script): If .x linker script is equal to .xn, only put it
268 once into the binary.
269 Add .xc and .xsc scripts.
270 (parse_args): Handle -z combreloc and -z nocombreloc.
271 * scripttempl/elf.sc (.rela.sbss): Fix a typo.
272 For .xc and .xsc scripts put all .rel* or .rela* input sections
273 but .rel*.plt and PLT-like sections into .rel.dyn resp. .rela.dyn.
274 * genscripts.sh (GENERATE_COMBRELOC_SCRIPT): Set if SCRIPT_NAME
276 Strip trailing whitespace from script.
277 Generate .xc and .xsc scripts if requested.
278 * ldmain.c (main): Initialize link_info.combreloc and
279 link_info.spare_dynamic_tags.
280 * lexsup.c (OPTION_SPARE_DYNAMIC_TAGS): Define.
281 (ld_options): Add --spare-dynamic-tags option.
282 (parse_args): Likewise.
283 * ld.texinfo: Document -z combreloc and -z nocombreloc.
284 * ldint.texinfo: Document .xc and .xsc linker scripts.
285 * NEWS: Add notes about -z combreloc and SHF_MERGE.
289 * emulparams/elf32fr30.sh: Add a newline.
293 * deffilep.y: Add missing prototypes.
294 * pe-dll.c: Likewise.
298 * ldlang.c (insert_pad): Fix typos in last patch.
300 * ldlang.c: When traversing lang_statement_union_type lists,
301 consistently use "header.next" rather than "next".
302 * mpw-eppcmac.c: Likewise.
303 * emultempl/beos.em: Likewise.
304 * emultempl/hppaelf.em: Likewise.
305 * emultempl/pe.em: Likewise.
306 * ldlang.h (union lang_statement_union): Remove "next" field.
308 * ldlang.c (insert_pad): Use offsetof macro.
309 (lang_size_sections): Always neuter padding statements.
310 * emultempl/hppaelf.em (hppaelf_delete_padding_statements): Delete.
312 * pe-dll.c (pe_dll_fill_sections): Correct type of "relax" param
313 passed to lang_size_sections.
314 (pe_exe_fill_sections): Likewise.
315 * emultempl/pe.em (output_prev_sec_find): Copied from elf32.em.
316 (gld_${EMULATION_NAME}_place_orphan): Merge from elf32.em.
320 * emultempl/aix.em: Formatting fixes.
324 * ldlang.c (insert_pad): Make use of an existing pad statement if
325 available. Move code calculating alignment, adjusting section
326 alignment power, and adjusting dot to ..
327 (size_input_section): .. here. Remove unused relax param.
328 (lang_size_sections): Change boolean `relax' param to boolean *.
329 Adjust call to size_input_section. Make use of insert_pad to
330 place pad after the assignment statement. If relaxing, zap
332 (reset_memory_regions): Reset output_bfd section sizes too.
333 (relax_again): Move to..
334 (lang_process): ..here. Adjust call to lang_size_sections, and
335 remove duplicated code.
336 * ldlang.h (lang_size_sections): Change `relax' param to boolean *.
340 * ld.texinfo: Document that fill values now use the four least
342 * emulparams/elf32fr30.sh (NOP): Update.
343 * emulparams/elf32mcore.sh: Likewise.
344 * emulparams/elf64_s390.sh: Likewise.
345 * emulparams/elf_i386.sh: Likewise.
346 * emulparams/elf_i386_be.sh: Likewise.
347 * emulparams/elf_i386_chaos.sh: Likewise.
348 * emulparams/elf_i386_ldso.sh: Likewise.
349 * emulparams/elf_s390.sh: Likewise.
350 * emulparams/elf_x86_64.sh: Likewise.
351 * emulparams/i386moss.sh: Likewise.
352 * emulparams/i386nw.sh: Likewise.
353 * emulparams/m68kelf.sh: Likewise.
354 * scripttempl/elf.sc: Update NOP comment.
355 * scripttempl/elfi370.sc: Likewise.
356 * scripttempl/elfm68hc11.sc: Likewise.
357 * scripttempl/elfm68hc12.sc: Likewise.
358 * scripttempl/nw.sc: Likewise.
362 * ldgram.y (saved_script_handle): Initialize to NULL.
363 * ldmain.c (main): Change check on saved_script_handle.
367 * emultempl/elf32.em: Formatting fixes.
368 (output_prev_sec_find): Test for bfd_ind_section too; do so by
369 looking at sec->owner.
370 (output_rel_find): Move function inside LDEMUL_PLACE_ORPHAN test.
371 (gld${EMULATION_NAME}_place_orphan): Add a few comments. Remove
372 unused code, and reorganize orphan section placement code.
374 * ldlang.c (wild_doit): Rename to lang_add_section.
375 * ldlang.h: Here too.
376 * mpw-elfmips.c: And here.
377 * emultempl/beos.em: And here.
378 * emultempl/elf32.em: And here.
379 * emultempl/hppaelf.em: And here.
380 * emultempl/pe.em: And here.
384 * emultempl/needrelax.em: New file.
385 * emulparams/elf64_ia64.sh (EXTRA_EM_FILE): Reference it.
386 * Makefile.am (eelf64_ia64.c): Depend on it.
387 * Makefile.in: Rebuild.
391 * emultempl/elf32.em: For SEC_EXCLUDE sections, ensure that
392 output_section is set non-NULL.
394 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Return
395 `true' for SEC_EXCLUDE sections so that the generic code doesn't
396 needlessly create an output_section_statement. Treat a correctly
397 named output_section_statement with NULL bfd_section as compatible.
401 * emultempl/generic.em: Support EXTRA_EM_FILE.
402 (ld_${EMULATION_NAME}_emulation): Support emulation parameters
403 LDEMUL_BEFORE_PARSE, LDEMUL_SYSLIB, LDEMUL_HLL,
404 LDEMUL_AFTER_PARSE, LDEMUL_AFTER_OPEN, LDEMUL_AFTER_ALLOCATION,
405 LDEMUL_SET_OUTPUT_ARCH, LDEMUL_CHOOSE_TARGET,
406 LDEMUL_BEFORE_ALLOCATION, LDEMUL_GET_SCRIPT, LDEMUL_FINISH,
407 LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS,
408 LDEMUL_OPEN_DYNAMIC_ARCHIVE, LDEMUL_PLACE_ORPHAN,
409 LDEMUL_SET_SYMBOLS, LDEMUL_PARSE_ARGS, LDEMUL_UNRECOGNIZED_FILE,
410 LDEMUL_LIST_OPTIONS, LDEMUL_RECOGNIZED_FILE,
411 LDEMUL_FIND_POTENTIAL_LIBRARIES.
415 * scripttempl/elf.sc, scripttempl/elfd30v.sc,
416 scripttempl/elfm68hc11.sc, scripttempl/elfm68hc12.sc,
417 scripttempl/v850.sc: Keep .jcr data.
423 * ldgram.y (had_script): Change name to saved_script_handle.
424 Change type to file handle.
425 * ld.h (had_script): Rename and retype.
426 * ldfile.c (ldfile_open_command_file): Save the file handle
427 used in saved_script_handle.
428 * lexsup.c (parse_args): Do not allow -c option to alter
430 * ldmain.c (main): Print out the linker script used if
431 --verbose is given. Check saved_script_handle to obtain the
432 external linker script used, or if NULL, dump the builtin
434 * ld.texinfo: Document that --verbose now dumps the linker
435 script used, regardless of whether it was an internal or an
440 * configure.in: Add -Wstrict-prototypes and -Wmissing-prototypes
442 * configure: Regenerate.
446 * emultempl/elf32.em (output_prev_sec_find): Add missing prototype.
448 * scripttempl/elf.sc: Move non-text .dynamic section before
449 .plt/.got/.sdata* group.
450 (OTHER_GOT_SECTIONS): Move to immediately after .got.
451 (OTHER_SDATA_SECTIONS): Add.
452 * emulparams/criself.sh: Use OTHER_SDATA_SECTIONS rather than
454 * emulparams/crislinux.sh: Likewise.
455 * emulparams/elf32b4300.sh: Likewise.
456 * emulparams/elf32bmip.sh: Likewise.
457 * emulparams/elf32bmipn32.sh: Likewise.
458 * emulparams/elf32bsmip.sh: Likewise.
459 * emulparams/elf32btsmip.sh: Likewise.
460 * emulparams/elf32ebmip.sh: Likewise.
461 * emulparams/elf32elmip.sh: Likewise.
462 * emulparams/elf32l4300.sh: Likewise.
463 * emulparams/elf32lmip.sh: Likewise.
464 * emulparams/elf32lsmip.sh: Likewise.
465 * emulparams/elf32ltsmip.sh: Likewise.
466 * emulparams/elf64bmip.sh: Likewise.
467 * emulparams/elf64btsmip.sh: Likewise.
468 * emulparams/elf64ltsmip.sh: Likewise.
472 * genscripts.sh: Source the emulparams script before each output
473 script is generated so that variables like `RELOCATING' may affect
474 variables defined in the emulparams script.
478 * emultempl/aix.em: ldexp.h,ldlang.h,ldfile.h,ldemul.h go in this
481 * emultempl/beos.em (sort_sections): Modify for 2001-08-03 change,
482 ie. iterate over wild_statement.section_list.
483 (gld${EMULATION_NAME}_place_orphan): Likewise.
487 * scripttempl/elfm68hc12.sc (FINISH_CODE, FINISH_RELOC): New to handle
488 .fini[0-4] sections used by _exit
489 (CTOR, DTOR): Export ctor/dtor symbols; move them to ROM.
490 (*.text,*.data,*.bss): Take into account .text.*, .data.*, .bss.*.
491 * scripttempl/elfm68hc11.sc: Likewise.
495 * emultempl/beos.em (init): Add the missing initialization.
499 * ld.texinfo (Input Section Basics): Clarify ordering of output
501 * ldlang.c (callback_t): Add wildcard_list param.
502 (walk_wild_section): Remove "section" param. Rewrite for
503 lang_wild_statement_type change. Remove unique_section_p test.
504 (walk_wild_file): Remove "section" param.
505 (walk_wild): Remove "section" and "file" params.
506 (lang_gc_wild): Likewise.
507 (wild): Likewise. Modify for lang_wild_statement_type change.
508 (wild_sort): Likewise. Add "sec" param.
509 (gc_section_callback): Likewise.
510 (output_section_callback): Likewise. Do unique_section_p test.
511 (map_input_to_output_sections): Modify call to wild.
512 (lang_gc_sections_1): Likewise.
513 (print_wild_statement): Modify for lang_wild_statement_type
515 (lang_add_wild): Replace filename, filenames_sorted param with
516 filespec. Replace section_name, sections_sorted,
517 exclude_filename_list with section_list.
518 * ldlang.h (lang_add_wild): Here too.
519 (lang_wild_statement_type): Replace section_name, sections_sorted,
520 and exclude_filename_list with section_list.
521 * ldgram.y (current_file): Delete.
522 (%union): Add wildcard_list.
523 (file_NAME_list): Set type to wildcard_list. Build a linked list
524 rather than calling lang_add_wild for each entry.
525 (input_section_spec_no_keep): Call lang_add_wild here instead.
526 * ld.h (struct wildcard_list): Declare.
527 * mri.c (mri_draw_tree): Modify to suit new lang_add_wild.
531 * ldmain.c (main): initialize link_info.pei386_auto_import
532 * pe-dll.c: new tables for auto-export filtering
533 (auto_export): change API, pass abfd for contextual filtering.
534 Loop thru tables of excluded symbols instead of comparing
539 * pe-dll.c: new variable pe_dll_enable_extra_debug. New
540 static variable current_sec (static struct sec *). Add
541 forward declaration for add_bfd_to_link.
542 (process_def_file): Don't export undefined symbols. Do not
543 export symbols starting with "_imp__". Call auto_export()
545 (pe_walk_relocs_of_symbol): New function.
546 (generate_reloc): add optional extra debugging
547 (pe_dll_generate_def_file): eliminate extraneous initial blank
549 (make_one): enlarge symtab to make room for __nm__ symbols
550 (DATA auto-import support).
551 (make_singleton_name_thunk): New function.
552 (make_import_fixup_mark): New function.
553 (make_import_fixup_entry): New function.
554 (pe_create_import_fixup): New function.
555 (add_bfd_to_link): Specify that 'name' argument is a CONST
557 * pe-dll.h: declare new variable pe_dll_extra_pe_debug;
558 declare new functions pe_walk_relocs_of_symbol and
559 pe_create_import_fixup.
560 * emultempl/pe.em: add new options --enable-auto-import,
561 --disable-auto-import, and --enable-extra-pe-debug.
562 (make_import_fixup): New function.
563 (pe_find_data_imports): New function.
564 (pr_sym): New function.
565 (gld_${EMULATION_NAME}_after_open): Add optional extra pe
566 debugging. Call pe_find_data_imports. Mark .idata as DATA, not
571 * ld.texinfo: add additional documentation for
572 --export-all-symbols. Document --out-implib,
573 --enable-auto-image-base, --disable-auto-image-base,
574 --dll-search-prefix, --enable-auto-import, and
575 --disable-auto-import.
576 * ldint.texinfo: Add detailed documentation on auto-import
581 * ld.texinfo (Simple Assignments): Fix computation in SECTIONS
586 * Makefile.am: Update dependencies with "make dep-am".
587 * Makefile.in: Regenerate
591 * ldcref.c (check_section_sym_xref): New function.
592 (check_nocrossrefs): Call it.
593 (check_nocrossref): Interate over h->refs here instead of..
594 (check_refs): ..here. Pass in the symbol name, section, and bfd
595 rather than hash_entry pointers.
596 (struct check_refs_info): Keep symbol name rather than hash entry.
598 (check_reloc_refs): Tweak for above changes in check_refs_info.
599 Only report references to section syms when symname is NULL to
600 prevent duplicate messages for the same reloc.
604 * ldexp.c (exp_print_tree): Use stderr if config.map_file is not
605 available. Do not print NULL trees.
606 (exp_print_token): Print unknown tokens with values > 126 as
607 decimal values not ASCII characters.
609 * ldlang.c (lang_leave_overlay): If a region is specified assign
610 it to all sections inside the overlay unless they have been
611 assigned to the own, non-default, memory region.
613 * README: Add header for consistency with other README files.
617 * emultempl/elf32.em (output_prev_sec_find): Never return
618 bfd_abs_section_ptr, bfd_com_section_ptr nor
623 * Makefile.am (em32relf.c): Change dependency from generic.em to
625 * Makefile.in: Regenerate.
629 * configure.tgt (i386-*-netbsdelf*): New target.
630 (i386-*-netbsd*): Set targ_extra_emuls to `elf_i386'
634 * emultempl/elf32.em (output_prev_sec_find): New.
635 (place_orphan): Use it.
639 * ldmain.c (main): Fix typos in the last change.
643 * ldmain.c (main): Disallow -F and -f without -shared.
647 * emultempl/pe.em (after_open): Check for the output_bfd not
648 having any coff_data structure allocated to it.
652 * emultempl/elf32.em: Do not assuming that contents of the buffer
653 returned from basename function will remain unchanged accross other
658 * scripttempl/elf.sc (DYNAMIC_PAD): Revert the change made on
659 2001-07-03. It creates dynamic entries even for static binaries.
663 * scripttempl/elf.sc (DYNAMIC_PAD): New variable.
664 (DYNAMIC): Use it to reserve few dynamic entries for
669 * emulparams/hppa64linux.sh: New file.
670 * configure.tgt: hppa*64*-*-linux* uses hppa64linux.sh
671 * Makefile.am (ALL_64_EMULATIONS): Add ehppa64linux.o
672 (ehppa64linux.c): Add rule to make it.
674 * Makefile.in: Regenerate.
678 * ld.texinfo (Options, -r): Mention restrictions when using
679 different object formats.
683 * ldlang.c (lang_check): Emit fatal error if relocatable link
684 between different object flavours with relocations in input.
688 * ld.texinfo (-E, --export-dynamic): Mention --version-script.
689 (--version-script): Mention the language support.
693 * ldlang.c (lang_check): Revert the change mode on 2001-06-15.
697 * Makefile.am (ld.1): Remove the prefix `$(srcdir)/'.
698 (diststuff): Add $(MANS).
699 * Makefile.in: Regenerated.
705 * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation):
706 Update for API change in bfd_elf${ELFSIZE}_size_dynamic_sections.
707 * mpw-elfmips.c (gldelf32ebmip_before_allocation): Ditto.
708 * ld.h (args_type): Remove member export_dynamic. All users
709 changed to use struct bfd_link_info member.
711 * Makefile.am (ecriself.c, ed10velf.c, ei386moss.c): Depend on
712 $(srcdir)/emultempl/elf32.em, not $(srcdir)/emultempl/generic.em.
713 * Makefile.in: Regenerate.
717 * ldlang.c (init_os): Add the newline to the einfo call.
718 (lang_check): Likewise.
719 (lang_do_version_exports_section): Likewise.
723 * lexsup.c (parse_args); Save optind to report unrecognized
728 * ldlang.c (lang_check): Emit fatal error if relocatable link
729 between different object flavours.
731 * lexsup.c (parse_args) <case OPTION_EXPORT_DYNAMIC, case 'E'>:
732 Set new link_info member export_dynamic.
733 * ldmain.c (main): Initialize new link_info member export_dynamic.
737 * ldlang.c (walk_wild): Only call walk_wild_file if
738 lookup_name returns something.
739 (lookup_name): If load_symbols fails, return NULL.
740 (load_symbols): Change to a boolean function.
741 (open_input_bfds): If load_symbols fails then do not make the
746 * ldlang.c (record_bfd_errors): Remove.
748 * emultempl/aix.em: Fix copyright dates.
752 * elf_x86_64.sh (NONPAGED_TEXT_START_ADDR): Increase.
753 (TEXT_START_ADDR): Likewise.
757 * configure.host: Set HOSTING_CRT0/HOSTING_LIBS correctly for s/390.
761 * emultempl/pe.em (init): Reduce default stack reserve to 0x200000.
765 * ldlang.c (open_input_bfds): Don't change the bfd error
766 handler whilst loading symbols.
770 * configure.tgt: Remove i370-mvs architecture, it is not currently
775 * emulparams/ppcmacos.sh: Add SYSCALL_MASK and SYMBOL_MODE_MASK
776 like emulparams/aixppc.sh.
780 * emultempl/beos.em (gld${EMULATION_NAME}_before_parse): Move
781 setting of output_filename after bfd_scan_arch.
782 * emultempl/pe.em: Likewise.
786 * emulparams/aixrs6.sh: Add SYSCALL_MASK and SYMBOL_MODE_MASK
787 like emulparams/aixppc.sh.
789 * emultempl/aix.em (sc): Use ${srcdir}/emultempl/ostring.sed
790 instead of ${srcdir}/emultempl/stringify.sed.
794 * emulparams/elf64_aix.sh: Change settings to match IBM linker
799 * configure.host: Replace linuxoldld with linux*oldld.
800 * configure.tgt: Likewise.
804 * emultempl/stringify.sed: Removed again.
808 * emultempl/aix.em (OUTPUT_ARCH): Defined.
809 (gld${EMULATION_NAME}_before_parse): Initialize
810 ldfile_output_architecture, ldfile_output_machine and
811 ldfile_output_machine_name from ${OUTPUT_ARCH} if possible.
812 * emultempl/beos.em: Likewise.
813 * emultempl/elf32.em: Likewise.
814 * emultempl/linux.em: Likewise.
815 * emultempl/mipsecoff.em: Likewise.
816 * emultempl/pe.em: Likewise.
817 * emultempl/sunos.em: Likewise.
821 * emultempl/aix.em : (gld${EMULATION_NAME}_read_file)
822 udate import file format.
823 (change_symbol_mode) New, same
824 (is_syscall) New, same
825 * emulparams/aixppc.sh : add SYSCALL_MASK and SYMBOL_MODE_MASK
826 * emulparams/aixppc64.sh : same
827 * emulparams/aixrs6.sh : same
828 * emulparams/ppcmacos.sh : same
829 * emultempl/aix.em : use strtoull to parse options
830 * Makefile.am : add eaixppc64 emulation for xcoff64
832 * configure.tgt : same
834 * scripttempl/aix.sc : default text section offset to 0x10000000
835 default data section offset to 0x20000000
836 add .sv3264 and .sv64 pseudo sections
837 loader and debug sections use the currect section offset.
839 * emultempl/aix.em : Add xcoff64 support
840 Add -binitfini support
841 (gld${EMULATION_NAME}_before_parse) -binitfini
842 (gld${EMULATION_NAME}_parse_args) same
843 (gld${EMULATION_NAME}_before_allocation) format change for special
846 * emulparams/aixppc64.sh : New file for xcoff64 support
850 * emultempl/elf32.em (ELF_INTERPRETER_SET_DEFAULT): Use this new
851 variable to avoid non-portable shell construct.
855 * ldmain.c (get_emulation): Add -mips5 command line argument.
859 * emulparams/elf_i386_ldso.sh: New, copied from elf_i386.sh.
860 (ELF_INTERPRETER_NAME): Define it.
861 * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Use
863 * configure.tgt (targ_emul, targ_extra_emuls)
864 [i[3456]86-*-solaris2*, i[3456]86-*-solaris*]: Use elf_i386_ldso
865 as primary, elf_i386 as extra.
866 * Makefile.am (ALL_EMULATIONS): Added eelf_i386_ldso.o.
867 (eelf_i386_ldso.c): New rule.
868 * Makefile.in: Rebuilt.
872 * lexsup.c (ld_options): Allow -I to be an alias for
873 --dynamic-linker. This is for Solaris compatability.
874 * ld.texinfo: Document that -I can be used.
879 * ldlang.c (wild_doit): Use linker_has_input to reliably determine
880 whether an input section is the first one assigned to an output
882 Assorted formatting fixes.
886 * Makefile.am (ld.dvi): Search bfd/doc for texinfo files.
887 * Makefile.in: Ditto.
891 * emulparams/elf64_ia64.sh (OTHER_READONLY_SECTIONS): Put
892 .gnu.linkonce.ia64unw{,i} sections into corresponding .IA_64.unwind*
894 * emulparams/elf64_aix.sh (OTHER_READONLY_SECTIONS): Likewise.
898 * ldlang.c (lang_process): Call bfd_merge_sections.
902 * ldgram.y: Fix typo.
906 * emultempl/elf32.em: Include "libiberty.h".
907 (gld${EMULATION_NAME}_vercheck): Call basename () to get the
908 basename of the bfd filename.
909 (gld${EMULATION_NAME}_stat_needed): Likewise.
910 (gld${EMULATION_NAME}_try_needed): Likewise.
911 (gld${EMULATION_NAME}_open_dynamic_archive): Likewise.
915 * emultempl/pe.em: Include <ctype.h>.
919 * emulparams/elf32openrisc.sh: New file.
921 * Makefile.am: Add OpenRISC target.
922 * Makefile.in: Regenerated.
924 * configure.tgt: Add openrisc-*-* mapping.
928 * emultempl/aix.em: Replace buystring with xstrdup.
929 * emultempl/beos.em: Replace buystring with xstrdup.
933 * ldfile.c: Include "libiberty.h".
936 * ldmisc.c (buystring): Removed.
937 * ldmisc.h: Likewise.
939 * ldfile.c: Replace buystring with xstrdup.
940 * ldlang.c: Likewise.
942 * ldmain.c: Likewise.
943 * ldmisc.c: Likewise.
944 * lexsup.c: Likewise.
945 * mpw-eppcmac.c: Likewise.
949 * emulparms/elf_x86_64.sh (MAXPAGESIZE): Fix value.
953 * ldlang.c (load_symbols): Give emulation a chance
954 to process unrecognized file before fatal error is
959 * configure.tgt: Add arm-vxworks target.
960 * scripttempl/armcoff.sc: Support .text or .data as a section name
966 * ld.texinfo: Document --fatal-warnings.
969 * ldmisc.c (vfinfo): Set flag to inhibit making executable if
970 warnings have been turned into errors.
971 * lexsup.c (OPTION_WARN_FATAL): Define.
972 (ld_options): Entry for --fatal-warnings.
973 (parse_args): Handle OPTION_WARN_FATAL.
974 * ld.h (ld_config_type): Add fatal_warnings field.
978 * ldmain.c (main): Default to discard_sec_merge.
979 * lexsup.c (OPTION_DISCARD_NONE): Define.
980 (ld_options): Add --discard-none.
981 (parse_args): Handle OPTION_DISCARD_NONE.
982 * ldlang.c (wild_doit): SEC_MERGE should be set in the output
983 section only if SEC_MERGE and SEC_STRINGS flags and entsize of
984 all its input sections match.
988 * Makefile.am (ALL_EMULATIONS): Add eelf32ltsmip.o.
989 (ALL_64_EMULATIONS): Add eelf64btsmip.o and eelf64ltsmip.o.
990 (eelf32ltsmip.c): New target.
991 (eelf64btsmip.c): Likewise.
992 (eelf64ltsmip.c): Likewise.
993 * Makefile.in: Regenerated.
995 * configure.tgt (mips*el-*-linux-gnu): Uses traditional MIPS
997 (mips*-*-linux-gnu*): Likewise.
999 * emulparams/elf32ltsmip.sh: New. Traditional little endian
1001 * emulparams/elf64btsmip.sh: New. Traditional 64bit big endian
1003 * emulparams/elf64ltsmip.sh: New. Traditional 64bit little
1008 * emulparams/criself.sh (EXECUTABLE_SYMBOLS): Cannot provide
1009 correct value of __Stext here.
1010 (TEXT_START_SYMBOLS): Define; always define __Stext, to start of
1013 * emulparams/crislinux.sh: Remove FIXME.
1017 * emulparams/hppalinux.sh (MAXPAGESIZE): Set to 64k.
1018 (TEXT_START_ADDR, TARGET_PAGE_SIZE): Likewise.
1022 * configure.tgt (cris-*-*): Change default emulation to criself.
1023 (cris-*-*aout*): New rule.
1027 * emulparams/hppalinux.sh (MAXPAGESIZE): Set to 0x4000.
1028 (TEXT_START_ADDR, TARGET_PAGE_SIZE): Ditto.
1032 * ld.texinfo (Overview): Fix syntax in texi code.
1036 * ld.texinfo: Put @c man indications to generate the ld man page.
1037 When generating man, define all the variables. Define SEEALSO
1038 and SYNOPSIS. Re-organize some lines to avoid the cross references.
1039 * Makefile.am (MANCONF, TEXI2POD, POD2MAN): New variables.
1040 (ld.1): Generate from ld.texinfo.
1041 * Makefile.in: Regenerate.
1045 * scripttempl/i386go32.sc: Support the GCC flags '-ffunction-sections'
1046 and '-fdata-sections'. Set the VMA of STABS sections to zero.
1050 * emultmpl/elf32.em (gld${EMULATION_NAME}_search_needed): If NAME
1051 is an absolute path look only for this file and not along the path.
1055 * emultempl/elf32.em (OPTION_GROUP): New macro.
1056 Add new option Bgroup to longopts.
1057 (gld*_parse_args): Handle GROUP_OPTION and recognize -z defs.
1058 (gld*_list_options): Add -Bgroup and -z defs.
1059 * ld.1: Document -Bgroup and -z defs.
1060 * ld.texinfo: Likewise.
1064 * scripttempl/elfd10v.sc (.rodata,.rodata1,.data1,.sdata): Deal
1065 with sections created by -fdata-sections.
1066 (.dynbss,.bss): Ditto.
1070 * emultempl/m68kelf.em (m68k_elf_after_allocation): Call
1071 after_allocation_default, not gld..._before_allocation.
1075 * configure.in (BFD_VERSION): New.
1076 (AM_INIT_AUTOMAKE): Use $BFD_VERSION.
1077 * configure: Regenerate.
1078 * Makefile.am: Run "make dep-am"
1079 * Makefile.in: Regenerate.
1083 * emulparams/elf64_aix.sh: Add additional read-only sections;
1084 uncomment lines which are now required.
1088 * ldlang.c (open_input_bfds): Set the bfd error handler so
1089 that problems can be caught whilst loading symbols.
1090 (record_bfd_errors): New function: Report BFD errors and mark
1091 the executable output as being invalid.
1095 * configure.host: Add configuration for ia64-*-aix*.
1096 * Makefile.am (ALL_64_EMULATIONS): Add emulation for ia64-*-aix*.
1097 Add dependencies for eelf64_aix.c.
1098 * Makefile.in: Regenerate.
1099 * configure.tgt: Add ia64-*-aix* mapping.
1100 * emulparams/elf64_aix.sh: Add settings for elf64 on aix5.
1101 * testsuite/ld-bootstrap/bootstrap.exp: Exclude ia64 flavor from
1106 * ldfile.c (ldfile_open_file): Set entry->search_dirs_flag to
1107 false if we found the file.
1111 * configure.tgt: Add FreeBSD/Alpha, FreeBSD/x86-64, FreeBSD/ia64,
1112 FreeBSD/PowerPC, FreeBSD/arm, and FreeBSD/sparc64 entries.
1116 * Makefile.am: Add PDP-11 target.
1117 * configure.tgt: Likewise.
1118 * emulparams/pdp11.sh: New file.
1122 * configure.host: Add a generic FreeBSD configuration entry such that
1123 all [modern] FreeBSD systems on all platforms will look the same.
1127 * configure.tgt: Remove mention of earmelf_linux26.
1131 * emulparams/elf64_ia64.sh (OTHER_GOT_SYMBOLS): Remove.
1135 * ldexp.h (node_type): Add etree_provided.
1136 * ldexp.c (exp_fold_tree): Handle etree_provided. Set the node
1137 type to etree_provided if defined by PROVIDE. Allow updating
1139 (exp_print_tree): Handle etree_provided.
1140 * mpw-elfmips.c (gldelf32ebmip_find_exp_assignment): Handle
1145 * emulparams/elf64_ia64.sh (OTHER_READONLY_SECTIONS): Add
1146 .IA_64.unwind.* pattern to unwind table section and
1147 .IA_64.unwind_info* pattern to unwind info section.
1151 * Makefile.am: Add linux target for S/390.
1152 * Makefile.in: Likewise.
1153 * configure.host: Likewise.
1154 * configure.tgt: Likewise.
1155 * emulparams/elf64_s390.sh: New file.
1156 * emulparams/elf_s390.sh: New file.
1160 * configure.tgt (sparc64-*-linux-gnu*): Add elf32_sparc into
1162 (sparc-*-linux-gnu*): Add elf64_sparc into targ_extra_libpath.
1166 * Makefile.am: Remove mention of earmelf_linux26.
1167 * Makefile.in: Regenerate.
1171 * emulparams/armelf_linux.sh (TEXT_START_ADDR): Set to 0x8000.
1172 * emulparams/armelf_linux26.sh: Delete.
1173 * configure.tgt: Remove mention of armelf_linux26 emulation.
1177 * ld.1: Replace occurances of -oformat with --oformat.
1181 * ldlang.c (lang_leave_overlay): Don't set lma_region when
1182 load_base is specified.
1186 * emultempl/elf32.em: Correct spelling in comments and listed
1191 * ldlang.c (lang_leave_overlay): Only set lma_region from the
1192 default for the first section of a group of overlay sections.
1196 * Makefile.am (GENSCRIPTS): Pass exec_prefix.
1197 * Makefile.in: Regenerate.
1198 * genscripts.sh: Use exec_prefix parameter to specify tool lib.
1199 Check for null tool_dir.
1203 * emulparams/elf64_ia64.sh (OTHER_READONLY_SECTIONS): Add IA_64.unwind
1204 and IA_64.unwind.info.
1208 * ldlang.c (lang_check): Merge the private data only if the
1209 input file has contents.
1213 * emulparams/hppalinux.sh (OUTPUT_FORMAT): Set to elf32-hppa-linux.
1215 * emultempl/hppaelf.em (hppaelf_after_parse): New function,
1216 enabling search for libmilli. On a relocatable link, make .text
1218 (LDEMUL_AFTER_PARSE): Define.
1219 (hppaelf_finish): Correct spelling of relocatable in comments.
1221 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Don't
1222 rummage through the script for sections on the unique list.
1223 Correct length of strncmp for ".note".
1224 (gld${EMULATION_NAME}_check_needed): Rearrange function.
1226 * ldlang.c (unique_section_list): New var.
1227 (unique_section_p): New function.
1228 (walk_wild_section): Don't match sections on unique_section_list.
1229 (lang_add_unique): New function.
1230 Correct spelling of relocatable in comments.
1232 * ldlang.h (struct unique_sections): Declare.
1233 (unique_section_list): Declare.
1234 (unique_section_p): Declare.
1235 (lang_add_unique): Declare.
1237 * lexsup.c (ld_options): Allow --unique to take an optional arg.
1238 (parse_args [OPTION_UNIQUE]): Call lang_add_unique.
1240 * ld.texinfo (--unique): Update.
1244 * lexsup.c (parse_args): Remove spurious white space.
1248 * lexsup.c (parse_args): Update copyright date.
1252 * configure.host: Set HOSTING_LIBS appropriately for ix86-cygwin.
1256 * scripttempl/h8300.sc: Fix formatting. Fix a comment typo.
1257 * scripttempl/h8300h.sc: Fix formatting.
1258 * scripttempl/h8300s.sc: Likewise.
1259 * scripttempl/h8500.sc: Likewise.
1260 * scripttempl/h8500b.sc: Likewise.
1261 * scripttempl/h8500c.sc: Likewise.
1262 * scripttempl/h8500m.sc: Likewise.
1263 * scripttempl/h8500s.sc: Likewise.
1267 * emultempl/elf32.em: Only perform Linux ld hints processing when
1272 * ld.texinfo (Bug Reporting): Update email address for reports.
1276 * lexsup.c (parse_args): Set opterr to 0 and detect unparsed long
1277 options by checking for a return value of '?' not -1.
1281 * lexsup.c (struct ld_option): Add new enum value:
1283 (ld_options[]): Change -omagic, -output and -oformat options
1284 to be EXACTLY_TWO_DASHES.
1285 (OUTPUT_COUNT): Use ARRAY_SIZE.
1286 (parse_args): Change parameter 'argc' to unsigned.
1287 Place EXACTLY_TWO_DASHES options into new really_longopts
1289 If getopt_long_only fails, try calling getopt_long using the
1290 really_longopts array.
1291 (help): Print a double dash for both EXACTLY_TWO_DASHES and
1294 * ldlex.h: Fix prototype of parse_args.
1296 * ld.texinfo: Document that long options starting with 'o'
1297 must be preceeded by two dashes. Change example of a single
1298 dashed long option from -oformat to -trace-symbol.
1302 * emultempl/pe.em (OPTION_NO_DEFAULT_EXCLUDES): Define.
1303 (longopts[]): New --no-default-excludes option.
1304 (gld_${EMULATION_NAME}_list_options): Document.
1305 (gld_${EMULATION_NAME}_parse_args): Handle.
1309 * ldlang.c (new_stat): Revert the last beautification with "innocent"
1310 whitespace, it breaks the K&R C preprocessor.
1314 * ld.texinfo: Add notes about --whole-archive and gcc.
1318 * lexsup.c (OPTION_ALLOW_SHLIB_UNDEFINED): Define.
1319 (ld_options): Entry for --allow-shlib-undefined.
1320 (parse_args): Handle OPTION_ALLOW_SHLIB_UNDEFINED.
1321 * ldmain.c (main): Initialize link_info.allow_shlib_undefined
1323 * ld.texinfo: Document new command line switch.
1327 * emulparams/elf32ppc.sh (OTHER_READWRITE_SECTIONS):
1328 .fixup is actually read/write.
1329 * emulparams/elf32lppc.sh (OTHER_READWRITE_SECTIONS): Likewise.
1330 * emulparams/elf32ppcsim.sh (OTHER_READWRITE_SECTIONS): Likewise.
1331 * emulparams/elf32lppcsim.sh (OTHER_READWRITE_SECTIONS): Likewise.
1335 * NEWS: Add note about x86_64 architecture.
1339 * scripttempl/i386go32.sc: Use PROVIDE with _etext, _edata, _end.
1340 Set DWARF2 sections to a VMA of zero.
1344 * configure.tgt (arm-*-rtems*, a29k-*rtems*, h8300-*-rtems*):
1346 (sparc*-*-rtemself*, sparc*-*-rtemsaout*): New targets.
1347 (sparc*-*-rtems*): Switched from a.out to ELF.
1351 * Makefile.am (ALL_EMULATIONS): Add eelf_x86_64.o
1352 (eelf_x86_64.c): New.
1353 * Makefile.in: Regenerate.
1354 * configure.tgt: Add support for x86_64-*-linux-gnu*.
1355 * emulparams/elf_x86_64.sh: New.
1359 * emulparams/crislinux.sh (ENTRY): Change back to _start.
1360 (TEXT_START_SYMBOLS): Remove conditional setting of __start.
1362 * scripttempl/crisaout.sc: Change all RELOCATING not related to
1363 merging non-a.out sections into CONSTRUCTING.
1367 * ld.1 (COPYING): Mention that the GNU Free Documentation
1368 License is present in the sources, but not the output, and
1369 also available from the GNU website.
1370 (GNU Free Documentation License): Comment out this section.
1374 * emulparams/elf64alpha.sh (ENTRY): Remove leading underscore as ELF
1379 * ld.1: Remove old date so it does not give the impression the manpage
1384 * configure.tgt (xscale-coff): Add target.
1385 (xscale-elf): Add target.
1389 * ldmain.c (main): Remove redundant init of config.make_executable
1394 * emulparams/elf64alpha.sh (MAXPAGESIZE): Typo -- 64k, not 1M.
1398 * scripttempl/h8300.sc: Fix formatting.
1399 * scripttempl/h8300h.sc: Likewise.
1400 * scripttempl/h8300s.sc: Likewise.
1404 * scripttempl/elf32avr.sc: Fix bug in .eeprom segment.
1408 * emultempl/pe.em: Define ___start_SECNAME and ___stop_SECNAME
1409 around orphan sections whose names can be represented in C.
1413 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): New local
1414 hold_sdata. If SEC_SMALL_DATA set, set place to hold_sdata.
1418 * ld.texinfo: Add GNU Free Documentation License.
1419 * ldint.texinfo: Add GNU Free Documentation License.
1420 * ld.1: Add GNU Free Documentation License.
1424 * ldlex.l (yy_create_string_buffer): Init yy_is_our_buffer,
1425 yy_is_interactive, yy_at_bol, and yy_fill_buffer.
1427 * Makefile.am (DISTCLEANFILES): Add stringify.sed.
1428 Move 2000-11-02 Makefile.in changes to this file.
1429 * Makefile.in: Regenerate.
1433 * scripttempl/h8300.sc: Use ${CONSTRUCTING...} to enclose
1434 constructors and destructors.
1435 * scripttempl/h8300h.sc: Ditto.
1436 * scripttempl/h8300s.sc: Ditto.
1437 * scripttempl/h8500.sc: Ditto.
1438 * scripttempl/h8500b.sc: Ditto.
1439 * scripttempl/h8500c.sc: Ditto.
1440 * scripttempl/h8500m.sc: Ditto.
1441 * scripttempl/h8500s.sc: Ditto.
1442 * scripttempl/v850.sc: Ditto.
1443 * scripttempl/w65.sc: Ditto.
1444 * scripttempl/z8000.sc: Ditto.
1448 * Makefile.in (e_i386_chaos.c): New rule.
1449 (ALL_EMULATIONS): Added e_i386_chaos.o.
1450 * emulparams/elf_i386_chaos.sh: New file.
1451 * configure.tgt: Recognise i[3456]86-chaosdev-storm-chaos.
1455 * emulparams/elf64_sparc.sh (TEXT_START_ADDR,
1456 NONPAGED_TEXT_START_ADDR): Set to 4GB for Solaris targets.
1457 Fix sed invocation, so that it coped with '/' in Solaris 64bit
1458 library path suffix.
1463 * scripttempl/crisaout.sc (.text, .data): Pad, with ALIGN (32),
1464 for consecutive sections.
1468 * lexsup.c: New option OPTION_TARGET_HELP. Prints all target specific
1470 * ld.texinfo: Added notes about this new option.
1474 * emultempl/pe.em (_after_open): Add tests of return values from
1475 bfd functions. Emit appropriate error messages if necessary.
1479 * emultempl/pe.em (_after_open): Delete 'is2' and 'nsyms'
1480 local variables - they are not used, but leave in the call to
1481 bfd_canonicalize_symtab.
1482 (_open_dynamic_archive): Add #ifdef DLL_SUPPORT around use of
1483 pe_dll_search_prefix.
1487 * emultempl/pe.em (pe_dll_search_prefix): New variable,
1488 (longopts): New --dll-search-prefix option.
1489 (gld_${EMULATION_NAME}_list_options): Document.
1490 (gld_${EMULATION_NAME}_parse_args): Handle.
1491 (gld_${EMULATION_NAME}_open_dynamic_archive): When linking
1492 dynamically, search for a dll named '<prefix><basename>.dll'
1493 in preference to 'lib<basename>.dll' if --dll-search-prefix
1498 * ldlang.c (section_already_linked): Set kept_section instead of
1503 * deffile.h: Fix formatting.
1504 * lexsup.c: Likewise.
1509 * pe-dll.c (make_one): Do not generate code thunk for DATA
1511 (process_def_file): deduce DATA flag for auto-export sumbols.
1515 * ld.h: Fix formatting.
1516 * ldcref.c: Likewise.
1517 * ldctor.h: Likewise.
1518 * ldemul.c: Likewise.
1519 * ldemul.h: Likewise.
1520 * ldexp.c: Likewise.
1521 * ldexp.h: Likewise.
1522 * ldfile.c: Likewise.
1523 * ldfile.h: Likewise.
1524 * ldlang.c: Likewise.
1525 * ldlang.h: Likewise.
1526 * ldmain.c: Likewise.
1527 * pe-dll.c: Likewise.
1529 * pe-dll.c: Revert some formatting fixes.
1533 * pe-dll.c: Fix formatting.
1537 * ldlang.c: Fix formatting.
1541 * pe-dll.c (fill_edata): initialize entire block
1542 (make_one): fill in correct section.
1546 * ldexp.c: Fix formatting.
1550 * emultempl/pe.em (gld_*_after_open): detect case where there two
1551 import libraries for same dll; rename one to ensure proper link
1554 * pe-dll.c (process_def_file): compare ordinals to -1, not 0; fix
1556 (generate_edata): fix typo
1560 * scripttempl/crisaout.sc (ENTRY): Now __start.
1561 (.text): Add default setting for __start.
1562 Remove CONSTRUCTORS handling.
1563 (/DISCARD/): Add .gnu.warning.*.
1564 * emulparams/crislinux.sh (ENTRY): Now __start.
1565 (TEXT_START_SYMBOLS): New; provide __Stext and __start default.
1566 * emulparams/criself.sh (OUTPUT_FORMAT): Now elf32-us-cris.
1567 (ENTRY): Now __start.
1568 (INITIAL_READONLY_SECTIONS): Add KEEP for .startup.
1569 (EXECUTABLE_SYMBOLS): Add default setting for __start.
1573 * deffile.h: Fix formatting.
1575 * ldcref.c: Likewise.
1576 * ldctor.c: Likewise.
1577 * ldctor.h: Likewise.
1578 * ldemul.c: Likewise.
1579 * ldemul.h: Likewise.
1580 * ldexp.c: Likewise.
1581 * ldexp.h: Likewise.
1582 * ldfile.c: Likewise.
1583 * ldfile.h: Likewise.
1584 * ldlang.c: Likewise.
1585 * ldlang.h: Likewise.
1586 * lexsup.c: Likewise.
1588 * pe-dll.c: Likewise.
1592 * pe-dll.c (process_def_file): Uninitialized data wasn't
1593 exported with --export-all-symbols switch.
1597 * pe-dll.c (fill_edata): rearrange the data so that ordinals and
1598 noname work properly.
1602 * ld.texinfo (HPPA ELF32): New section.
1604 * emultempl/hppaelf.em (group_size): New.
1605 (hppaelf_finish): Pass group_size to elf32_hppa_size_stubs.
1606 (PARSE_AND_LIST_PROLOGUE): Add OPTION_STUBGROUP_SIZE.
1607 (PARSE_AND_LIST_LONGOPTS): Add --stub-group-size. Duplicate
1608 options to prevent abbreviations matching.
1609 (PARSE_AND_LIST_OPTIONS): Describe the above. Reformat.
1610 (PARSE_AND_LIST_ARGS_CASES): Handle it.
1614 * emultempl/m68kelf.em: Conditionalise the embedded relocs feature
1615 on the m68*-*-elf target. Make it support COFF input objects.
1619 * ldmain.c: Fix formatting.
1620 * ldmisc.c: Likewise.
1621 * ldver.c: Likewise.
1622 * ldwrite.c: Likewise.
1626 * ldwrite.c (clone_section): Silence gcc warnings.
1630 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Handle
1631 out of memory failure.
1633 * ldwrite.c (ldwrite): Remove unnecessary einfo arg.
1634 (clone_section): Handle out of memory failures. Rename var to
1635 avoid c++ reserved word.
1639 * emultempl/hppaelf.em (hppaelf_add_stub_section): Rename
1640 stub_name param to stub_sec_name.
1641 (hppaelf_finish): Modify call to elf32_hppa_size_stubs.
1645 * emultempl/m68kelf.em: New file.
1646 * emulparams/m68kelf.sh (EXTRA_EM_FILE): Use it.
1647 * Makefile.am (em68kelf.c): Add dependency on m68kelf.em.
1648 * Makefile.in: Regenerate.
1652 * emulparams/hppalinux.sh (DATA_START_SYMBOLS): Provide $global$
1657 * ldmain.c (multiple_definition): Disable relaxation if
1658 multiple symbol definitions are encountered - otherwise the
1659 linker could abort with an assertion failure.
1663 * mri.c: Fix formatting.
1667 * configure.in (AC_ISC_POSIX): Put after AC_CANONICAL_SYSTEM.
1668 * configure: Rebuild.
1672 * Makefile.am (lexsup.o): Also depend on $(INCDIR)/demangle.h.
1673 * Makefile.in: Rebuild.
1677 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Fix
1678 broken list handling. Create __start_SECNAME and __stop_SECNAME
1679 when no place-holder. Add some comments. Test both SEC_CODE and
1680 SEC_READONLY for hold_text to prevent .rodata orphan poisoning.
1681 Handle case where no output section statement created.
1685 * configure.tgt (sh-*-linux*): Added.
1686 * Makefile.am: Added eshelf_linux and eshlelf_linux.
1687 * Makefile.in: Rebuilt.
1688 * emulparams/shelf_linux.sh: New file.
1689 * emulparams/shlelf_linux.sh: New file.
1693 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Don't
1694 try shuffling sections when the orphan happens to be the place
1695 holder. Keep count of unique section names generated so we speed
1696 the search for a new name.
1700 * configure: Rebuilt with new libtool.m4.
1704 * Makefile.in: Regenerate.
1705 * aclocal.m4: Regenerate.
1706 * configure: Regenerate.
1707 * config.in: Regenerate.
1708 * po/ld.pot: Regenerate.
1710 * ldint.texinfo: Remove CVS revision marker - it foils local
1713 * emultempl/ticoff.em: Remove extraneous comma.
1717 * emultempl/hppaelf.em (hppaelf_add_stub_section): Add SEC_RELOC
1718 to stub section flags.
1719 (hppa_for_each_input_file_wrapper): New.
1720 (hppa_lang_for_each_input_file): New.
1721 (lang_for_each_input_file): Define to call above.
1722 (multi_subspace): New.
1723 (hppaelf_finish): Pass multi_subspace to elf32_hppa_size_stubs.
1724 (PARSE_AND_LIST_PROLOGUE): Define.
1725 (PARSE_AND_LIST_LONGOPTS): Define.
1726 (PARSE_AND_LIST_OPTIONS): Define.
1727 (PARSE_AND_LIST_ARGS_CASES): Define.
1728 (hppaelf_finish): Call elf32_hppa_set_gp.
1729 (hppaelf_set_output_arch): Remove.
1730 (LDEMUL_SET_OUTPUT_ARCH): Remove.
1732 * emulparams/hppalinux.sh (ELFSIZE): Define.
1734 (OTHER_READONLY_SECTIONS): Define.
1736 (GENERATE_SHLIB_SCRIPT): Define.
1738 * ldlang.c: Add missing prototypes, and tidy others. Change CONST
1739 to const throughout. Change `void *' to `PTR' throughout.
1740 (lang_memory_default): Function is local to file, add `static'.
1742 * Makefile.am (ehppaelf.c): Depend on emultempl/elf32.em.
1743 (ehppalinux.c): Likewise.
1744 (earmelf.c): Likewise.
1745 (earmelf_linux.c): Likewise.
1746 (earmelf_linux26.c): Likewise.
1747 * Makefile.in: Regenerate.
1749 * ld.h (ld_config_type): Add unique_orphan_sections.
1750 * lexsup.c (OPTION_UNIQUE): Define.
1751 (ld_options): Add "--unique".
1752 (parse_args): Handle it.
1753 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Don't
1754 search for an existing output section if unique_orphan_sections is
1755 set. Make use of bfd_get_unique_section_name rather than
1756 duplicating code here.
1757 * ld.texinfo: Describe --unique.
1759 * lexsup.c (ld_options): Make split-by-reloc arg optional. Add
1760 optional arg to split-by-file.
1761 (parse_args): Handle them.
1762 * ld.texinfo: Update description of these options.
1763 * ldwrite.c (clone_section): Pass in the section name. Replace
1764 local code with bfd_get_unique_section_name.
1765 (split_sections): Tidy code and comments. Use a list traversal
1766 more appropriate to the list construction. Handle cooked section
1767 sizes. Split when split_by_reloc reached rather than exceeded.
1768 Track section size and split when split_by_file reached. Fix
1769 link_order_tail (even though it's not used).
1770 (ldwrite): Modify condition for calling split_sections to suit
1771 changed split_by_reloc and split_by_file.
1772 * ldmain.c (main): Init config.split_by_reloc and
1773 config.split_by_file to -1.
1774 * ld.h (ld_config_type): Change split_by_reloc to unsigned.
1775 Change split_by_file to bfd_size_type.
1779 * configure.in: Increase version number to 2.10.91.
1780 * NEWS: Mention new ability to support removal of duplicate DWARF2
1782 * configure: Regenerate.
1783 * aclocal.m4: Regenerate.
1784 * config.in: Regenerate.
1788 * scripttempl/elf.sc: Add .gnu.linkonce.wi.* to .debug_info
1790 * scripttempl/elf32avr.sc: Ditto.
1791 * scripttempl/elfd10v.sc: Ditto.
1792 * scripttempl/elfd30v.sc: Ditto.
1793 * scripttempl/elfi370.sc: Ditto.
1794 * scripttempl/elfm68hc11.sc: Ditto.
1795 * scripttempl/elfm68hc12.sc: Ditto.
1796 * scripttempl/elfi386beos.sc: Ditto.
1797 * scripttempl/v850.sc: Ditto.
1801 * acinclude.m4: Include libtool and gettext macros from the
1803 * aclocal.m4, configure: Rebuilt.
1807 * ldlang.c (open_output): When choosing the target for a
1808 particular endianness, do nothing if the target is not
1813 * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Don't
1814 check -rpath nor LD_RUN_PATH for cross link.
1815 * ld.texinfo: Document the change.
1819 * NEWS: Mention support for CRIS.
1823 * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Get
1824 the current runpath list from bfd_elf_get_runpath_list ()
1829 * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Search
1830 the DT_RPATH/DT_RUNPATH entries for DT_NEEDED after
1831 LD_LIBRARY_PATH for native linker. Display the needed DSO if
1832 trace_file_tries is non-zero.
1833 (gld${EMULATION_NAME}_try_needed): Report the needed DSO found
1834 if trace_file_tries is non-zero.
1836 * ld.texinfo: Document the usage of DT_RPATH/DT_RUNPATH.
1841 * NEWS: Mention i860 support.
1845 * scripttempl/elf.sc: Fix last change to use correct comment
1850 * scripttempl/elf.sc: Add a comment giving the correspondence
1851 between sections, per-datum sections, and linkonce sections. Make
1852 the comment true even for .bss, .sdata, .sdata2, .sbss, and
1857 * emulparams/elf32_i860.sh: New file.
1858 * configure.tgt: Recognize new target i860-stardent-{sysv4*|elf*}.
1859 * Makefile.am (ALL_EMULATIONS): Add eelf32_i860.o.
1860 (eelf32_i860.c): New rule.
1861 * Makefile.in: Regenerate.
1865 * emulparams/mipspe.sh (ENTRY): Add definition.
1869 * emultempl/elf32.em (_after_close): Refer to -rpath not --rpath
1874 * scripttempl/elfm68hc11.sc: Define __bss_size symbol to indicate
1875 the final size of .bss section.
1876 * scripttempl/elfm68hc12.sc: Likewise.
1880 * emultempl/elf32.em (gld_${EMULATION_NAME}_parse_args): Rename to
1881 gld${EMULATION_NAME}_parse_args for consistency. Combine
1882 lastoptind and prevoptind vars, and keep track of last optind.
1883 (gld_${EMULATION_NAME}_list_options): Rename to
1884 gld${EMULATION_NAME}_list_options.
1888 * configure.tgt: Select targ_emul=elf_i386 for Unixware 7
1889 (i586-sco-sysv5uw7.1.0).
1893 * emulparams/elf64alpha.sh (PARSE_AND_LIST_ARGS): Removed.
1894 (PARSE_AND_LIST_PROLOGUE): New.
1895 (PARSE_AND_LIST_LONGOPTS): Likewise.
1896 (PARSE_AND_LIST_OPTIONS): Likewise.
1897 (PARSE_AND_LIST_ARGS_CASES): Likewise.
1898 (PARSE_AND_LIST_EPILOGUE): Likewise.
1902 * emultempl/armelf.em: Elide functions common to elf32.em,
1903 ie. most of the file.
1904 (arm_elf_after_open): New. Do arm specific things then call
1905 gld${EMULATION_NAME}_after_open.
1906 (arm_elf_before_allocation): New. Call
1907 gld${EMULATION_NAME}_before_allocation then do arm specifics.
1908 (PARSE_AND_LIST_PROLOGUE): Define.
1909 (PARSE_AND_LIST_SHORTOPTS): Define.
1910 (PARSE_AND_LIST_LONGOPTS): Define.
1911 (PARSE_AND_LIST_OPTIONS): Define.
1912 (PARSE_AND_LIST_ARGS_CASES): Define.
1913 (LDEMUL_AFTER_OPEN): Define.
1914 (LDEMUL_BEFORE_ALLOCATION): Define.
1915 (LDEMUL_BEFORE_PARSE): Define.
1916 (LDEMUL_FINISH): Define.
1918 * emultempl/hppaelf.em: Similarly zap most of this file.
1919 (hppaelf_add_stub_section): Prototype.
1920 (hppaelf_layaout_sections_again): Prototype.
1921 (hook_in_stub): Prototype.
1922 (LDEMUL_SET_OUTPUT_ARCH): Define.
1923 (LDEMUL_FINISH): Define.
1924 (LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS): Define.
1926 * emulparams/armelf.sh (TEMPLATE_NAME): Use elf32.
1927 (EXTRA_EM_FILE): New.
1928 * emulparams/armelf_linux.sh: Likewise.
1929 * emulparams/armelf_linux26.sh: Likewise.
1930 * emulparams/hppalinux.sh: Likewise.
1931 * emulparams/hppaelf.sh: Likewise.
1934 * emultempl/elf32.em: Fix formatting.
1935 (EXTRA_EM_FILE): Source it.
1936 (LDEMUL_BEFORE_PARSE, LDEMUL_SYSLIB, LDEMUL_HLL,
1937 LDEMUL_AFTER_PARSE, LDEMUL_AFTER_OPEN, LDEMUL_AFTER_ALLOCATION,
1938 LDEMUL_SET_OUTPUT_ARCH, LDEMUL_CHOOSE_TARGET,
1939 LDEMUL_BEFORE_ALLOCATION, LDEMUL_GET_SCRIPT, LDEMUL_FINISH,
1940 LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS,
1941 LDEMUL_OPEN_DYNAMIC_ARCHIVE, LDEMUL_PLACE_ORPHAN,
1942 LDEMUL_SET_SYMBOLS, LDEMUL_PARSE_ARGS, LDEMUL_UNRECOGNIZED_FILE,
1943 LDEMUL_LIST_OPTIONS, LDEMUL_RECOGNIZED_FILE,
1944 LDEMUL_FIND_POTENTIAL_LIBRARIES): New shell vars. Add code to
1945 allow functions in this file to be overridden.
1946 (PARSE_AND_LIST_SHORTOPTS): Handle it.
1948 * emultempl/m68kcoff.em: Include ldfile.h before ldemul.h.
1950 * emultempl/elf32.em: Reorganize file.
1954 * emulparams/elf64alpha.sh: Implement "-taso" emulation
1955 specific option to fit 64-bit executable in the lower
1956 31-bit address range. This is done by changing start
1957 address of .interp (the very first section of executable)
1958 and then setting EF_ALPHA_32BIT elf header flag.
1962 * emultempl/m68kcoff.em: New file.
1963 * emulparams/m68kcoff.sh (TEMPLATE_NAME): Use m68kcoff template.
1964 * Makefile.am (em68kcoff.c): Depend on m68kcoff.em rather than
1966 * Makefile.in: Regenerate.
1970 * emultempl/elf32.em (longopts): Duplicate "disable-new-dtags"
1971 and "disable-new-dtags" to stop getopt from treating -d/-e as
1972 abbreviations for these options.
1976 * ld.texinfo: Add documentation for --disable-new-dtags and
1979 * ldmain.c (main): Initialize link_info.new_dtags to false.
1981 * emultempl/elf32.em (gld_${EMULATION_NAME}_parse_args): Add
1982 --disable-new-dtags and --enable-new-dtags.
1983 (gld_${EMULATION_NAME}_list_options): Likewise.
1987 * lexsup.c: Add optional style to demangle switch
1988 * ld.texinfo: Document optional style to demangle switch.
1992 * Makefile.am (ALL_EMULATIONS): Add ecrisaout.o, ecriself.o,
1994 (ecrisaout.c, ecriself.c, ecrislinux.c): New rules.
1995 Regenerate dependencies.
1996 * Makefile.in: Rebuild.
1997 * configure.tgt (cris-*-*): New target.
1998 * emulparams/crisaout.sh, emulparams/criself.sh,
1999 emulparams/crislinux.sh, scripttempl/crisaout.sc: New files.
2000 * po/POTFILES.in, po/ld.pot: Regenerate.
2004 * emultempl/elf32.em (gld_${EMULATION_NAME}_list_options):
2005 Print out ignored -z options.
2009 * emulparams/elf32mcore.sh (PARSE_AND_LIST_ARGS): Removed.
2010 (PARSE_AND_LIST_PROLOGUE): New.
2011 (PARSE_AND_LIST_LONGOPTS): Likewise.
2012 (PARSE_AND_LIST_OPTIONS): Likewise.
2013 (PARSE_AND_LIST_ARGS_CASES): Likewise.
2015 * ldmain.c (main): Clear link_info.flags and link_info.flags_1.
2017 * lexsup.c (ld_options): Comment out 'z'.
2018 (parse_args): Likewise.
2020 * emultempl/elf32.em: Include "elf/common.h".
2021 (gld_${EMULATION_NAME}_parse_args): Defined. Handle some -z
2023 (gld_${EMULATION_NAME}_list_options): Likewise.
2025 * ld.texinfo: Add documentation for the recognized -z options.
2029 * emultempl/elf32.em (gld${EMULATION_NAME}_try_needed): Call
2030 bfd_elf_set_dt_needed_soname ().
2034 * pe-dll.c (pe_dll_id_target): check object target name also
2038 * scripttempl/elf.sc (.init): Only do ${INIT_START} and
2039 ${INIT_END} if relocating.
2040 (.fini): Likewise ${FINI_START} and ${FINI_END}.
2044 * emultempl/pe.em (gld_*_open_dynamic_archive): New search
2045 order for dynamic library '-lfoo' on pei386: libfoo.dll.a,
2046 foo.dll.a, libfoo.a, libfoo.dll, foo.dll. This fixes compatibility
2047 errors introduced by the old dynamic lib search order.
2051 * pe-dll.c (process_def_file): auto-export data items also
2052 (pe_process_import_defs): also see if _imp_ form needed
2056 * pe-dll.c (make_one): fix a typo in the __imp_ name decoration
2057 for dll import libraries
2061 * scripttempl/i386go32.sc: Support the g++ attribute init_priority in
2062 gcc 2.95.2 and later.
2066 * ldfile.c (ldfile_try_open_bfd): Output '\n' after an error
2071 * ldemul.h (struct lang_input_statement_struct): Remove forward
2073 (struct search_dirs): Likewise.
2074 * ldfile.h (struct lang_input_statement_struct): Likewise.
2075 Protect file from multiple inclusion.
2076 * ldlang.h (LANG_FOR_EACH_INPUT_STATEMENT): Move file_chain
2077 declaration from macro to file scope.
2079 * ldemul.c: ldexp.h,ldlang.h,ldfile.h,ldemul.h go in this order.
2080 * ldgram.y: Likewise here.
2081 * ldlang.c: And here.
2082 * ldmain.c: And here.
2083 * mpw-elfmips.c: And here.
2084 * mpw-eppcmac.c: And here.
2085 * emultempl/aix.em: And here.
2086 * emultempl/armcoff.em: And here.
2087 * emultempl/armelf.em: And here.
2088 * emultempl/armelf_oabi.em: And here.
2089 * emultempl/beos.em: And here.
2090 * emultempl/elf32.em: And here.
2091 * emultempl/hppaelf.em: And here.
2092 * emultempl/linux.em: And here.
2093 * emultempl/lnk960.em: And here.
2094 * emultempl/pe.em: And here.
2095 * emultempl/sunos.em: And here.
2096 * mpw-esh.c: And here. Include ldexp.h and ldlang.h too.
2097 * mpw-idtmips.c: Ditto.
2098 * emultempl/generic.em: Ditto.
2099 * emultempl/gld960.em: Ditto.
2100 * emultempl/gld960c.em: Ditto.
2101 * emultempl/mipsecoff.em: Ditto.
2102 * emultempl/ticoff.em: Ditto.
2103 * emultempl/vanilla.em: Ditto.
2105 * pe-dll.c: Include ldfile.h
2106 * ldver.c: Include ldexp.h, ldlang.h, ldfile.h
2108 * mpw-elfmips.c: (gldelf32ebmip_before_allocation): Add missing
2109 arguments to bfd_elf32_size_dynamic_sections call.
2110 (gldelf32ebmip_place_orphan): Add missing arguments to
2111 lang_leave_output_section_statement call.
2115 * emultempl/pe.em (pe_enable_stdcall_fixup): Protect with
2117 (strhash): Likewise.
2118 (compute_dll_image_base): Likewise.
2119 (pe_undef_found_sym): Likewise.
2120 (pe_undef_cdecl_match): Likewise.
2121 (gld_${EMULATION_NAME}_open_dynamic_archive): Mark the
2122 argument "arch" with ATTRIBUTE_UNUSED.
2126 * configure.tgt: Remove extraneous hppa*-*-linux-gnu*.
2129 * ldwrite.c (SSIZE): Remove to cure macro redefinition warning.
2133 Changes to create multiple linker stubs, positioned immediately
2134 before the section where they are required.
2135 * emultempl/hppaelf.em: Include elf32-hppa.h.
2136 (stub_sec, file_chain): Delete.
2137 (hppaelf_create_output_section_statements): Don't make a stub
2139 (hook_stub_info): New struct.
2140 (hook_in_stub): New function.
2141 (hppaelf_add_stub_section): New function.
2142 (hppaelf_finish): Do nothing for relocateable links. Modify the
2143 call to elf32_hppa_size_stubs. Move code for updating section
2145 (hppaelf_layaout_sections_again): ..to here, a new function.
2147 * emultempl/hppaelf.em (hppaelf_delete_padding_statements): Fix
2148 broken list handling. Pass in a pointer to the list.
2149 (hppaelf_finish): Update call to hppaelf_delete_padding_statements
2151 (hppaelf_before_parse): Prototype.
2152 (hppaelf_set_output_arch): Prototype.
2153 (hppaelf_create_output_section_statements): Prototype.
2154 (hppaelf_delete_padding_statements): Prototype.
2155 (hppaelf_finish): Prototype.
2158 * emultempl/hppaelf.em: Include ctype.h.
2159 (struct orphan_save): New.
2160 (gld${EMULATION_NAME}_place_orphan): New.
2161 (output_rel_find): New.
2162 (hppaelf_get_script): Update from elf32.em.
2163 (ld_hppaelf_emulation): Rename to ld_${EMULATION_NAME}_emulation.
2164 Change emulation_name field to "${EMULATION_NAME}". Add
2165 gld${EMULATION_NAME}_place_orphan.
2167 * Makefile.am (ALL_EMULATIONS): Reinstate ehppaelf.o, add
2168 ehppalinux.o, sort it. Regenerate dependencies.
2169 (ehppalinux.c): Depend on hppaelf.em
2170 * Makefile.in: Regenerate.
2172 * configure.tgt: targ_emul=hppalinux for hppa*linux
2174 * emulparams/hppalinux.sh: New.
2175 * emulparams/hppaelf.sh (TARGET_PAGE_SIZE): Write in hex.
2179 * lexsup.c (parse_args): Copy section name.
2183 * emultempl/pe.em: institute the following search order for
2184 dynamic libraries on pei386: libfoo.dll.a, foo.dll.a (import
2185 libs), libfoo.dll, foo.dll (link direct to dll). Fall back to
2186 static lib (libfoo.a) if none of the above are found.
2190 * emultempl/pe.em (pe_enable_auto_image_base): New variable.
2191 (longopts): New --{enable,disable}-auto-image-base options.
2192 (gld_${EMULATION_NAME}_list_options): Document.
2193 (gld_${EMULATION_NAME}_parse): Handle.
2194 (strhash): New static function.
2195 (compute_dll_image_base): New static function.
2196 (gld_${EMULATION_NAME}_set_symbols): Use.
2204 * configure.tgt: Add traditional mips (mips*-*-sysv4*) target.
2205 * emulparams/elf32btsmip.sh: New file.
2206 * Makefile.am: Add traditional mips target.
2207 * Makefile.in: Rebuild.
2211 * Makefile.am (EXTRA_ld_new_SOURCES): Set to deffilep.y for
2212 automake to use YLWRAP.
2213 * Makefile.in: Rebuild.
2217 * Makefile.am (DEP): Fix 2000-06-22. grep after running dep.sed
2218 (CLEANFILES): Add DEPA.
2219 * Makefile.in: Regenerate.
2221 2000-06-30 Timothy Wall <twall@ppc>
2223 * scripttempl/tic54xcoff.sc: PAGE N is not implemented, so encode
2224 the page in the upper octet of the address.
2228 * emulparams/avrmega161.sh (ARCH): Change to avr:5.
2232 * NEWS: arm-elf does --gc-sections too.
2236 * Makefile.am (DEP): grep for leading `/' in DEP1, and fail if we
2238 * Makefile.in: Regenerate.
2242 * Makefile.am: Rebuild dependency.
2243 * Makefile.in: Rebuild.
2247 * Makefile.am: Rebuild dependency.
2248 * Makefile.in: Rebuild.
2252 * scripttempl/tic54xcoff.sc: New.
2253 * ldlang.c (wild_doit): Propagate SEC_BLOCK flag.
2254 * gen-doc.texi: Add flag for TI COFF.
2255 * ld.texinfo: Add documentation for TI COFF handling switches.
2256 * emultempl/ticoff.em: New. TI COFF handling.
2257 * configure.tgt: Add tic54x target.
2258 * Makefile.am: Add tic54x target.
2259 * Makefile.in: Ditto.
2263 * ldmain.c (set_scripts_dir): Correct pointer comparison when
2264 checking for backslashes.
2268 * NEWS: Move entries not in 2.10 above "Changes in version 2.10".
2272 * NEWS: Update list of targets supporting --gc-sections.
2274 * scripttempl/elf.sc: KEEP .eh_frame contents.
2275 * scripttempl/elfd30v.sc: Same here.
2279 * Makefile.am (ALL_EMULATIONS): Added new emulation for m68hc12
2281 * Makefile.in: Rebuild.
2282 * configure.tgt: Recognize m68hc12 and m68hc11.
2283 * scripttempl/elfm68hc12.sc: New file.
2284 * emulparams/m68hc12elfb: New emulation.
2285 * emulparams/m68hc12elf: New emulation.
2286 * emulparams/m68hc11elfb.sh: New file. User configurable emulation
2287 (includes a memory.x script to define the ROM and RAM banks).
2288 * scripttempl/elfm68hc11.sc, emulparams/m68hc11elf.sh:
2289 New configuration files for support of Motorola 68hc11
2293 * ldmain.c (main): Only change SEC_READONLY for final link.
2297 * configure: Regenerate.
2301 * configure.in (VERSION): Update to show this is the CVS mainline.
2305 * emultempl/mipsecoff.em (gld{EMULATION_NAME}_after_open): Require all
2306 input objects to be ECOFF.
2307 (check_sections): einfo takes %B, not %P, to print a BFD name.
2311 * ldgram.y (vers_defns): Handle 'extern "C++" { ... }' in
2314 * ldlex.l (V_IDENTIFIER): Accept `::' in symbols.
2318 * emulparams/avr1200.sh (STACK): Define as 0.
2319 * emulparams/avr23xx.sh (STACK): Define as last internal SRAM address.
2320 * emulparams/avr4433.sh (STACK): Likewise.
2321 * emulparams/avr44x4.sh (STACK): Likewise.
2322 * emulparams/avr85xx.sh (STACK): Likewise.
2323 * emulparams/avrmega103.sh (STACK): Likewise.
2324 * emulparams/avrmega161.sh (STACK): Likewise.
2325 * emulparams/avrmega603.sh (STACK): Likewise.
2326 * scripttempl/elf32avr.sc (__data_start): Define for gcrt1.
2327 (__stack): Define from ${STACK} for main().
2331 * Makefile.am: Update dependencies with "make dep-am"
2332 * Makefile.in: Regenerate.
2336 * ldmain.c: Include filenames.h.
2337 (set_scripts_dir): Support backslashes in program name.
2341 * ldmain.c (main): When deciding if ".text" section should be
2342 read-only, don't forget to reset SEC_READONLY because it
2343 could be already set.
2347 * ld.1: Add documentation for new command line option:
2348 --section-start <sectionname>=<sectionorg>
2349 This is a generic version of -Ttext etc. which accepts
2350 any section name as a parameter instead of just text/data/
2352 * ld.texinfo: More docs.
2354 * lexsup.c: (parse_args): Recognize new command line option.
2355 (ld_options): Add new option.
2359 * lexsup.c (parse_args): `i' == `r', not `q'.
2363 * configure.tgt (hppa*64*-*-*): Enable PA64 target.
2368 Add support for '-q' == '--emit-relocs' switch.
2369 * ldmain.c (main): Default to false.
2370 * lexsup.c (parse_args): Turn on emitrelocations flag if set.
2371 * NEWS: Describe the emitrelocations switch.
2372 * ld.texinfo: Describe the emitrelocations switch.
2376 * emultempl/pe.em (_open_dynamic_archive): New function: Search
2377 the library path for "foo.dll" and "libfoo.dll" dynamic libraries
2378 before searching for 'libfoo.a' in response to a '-Bdynamic -lfoo'
2383 * lexsup.c (parse_args): Update the year in the copyright notice.
2387 * ld.h (gettext, dgettext, dcgettext, textdomain, bindtextdomain):
2388 Replace defines with those from intl/libgettext.h to quieten gcc
2393 * ldlang.c (open_input_bfds): Don't load the same file within
2394 a group again if the whole archive has been loaded already.
2399 * lexsup.c (set_section_start): Use bfd_scan_vma rather than
2404 * configure.host (ia64-*-linux-gnu*): Change gcc to ${CC}.
2406 * configure.host: Added HOSTING_CRT0, HOSTING_LIBS for
2407 host "ia64-*-linux-gnu*".
2411 * ld.h: Correctly check GCC version.
2415 * Makefile.am: Add PA64 support. Add missing dependencies for
2417 * Makefile.in: Rebuilt.
2418 * configure.tgt: Add PA64 support (currently disabled).
2422 * emultempl/elf32.em (gld${EMULATION_NAME}_place_section): Delete.
2423 (output_rel_find): New function.
2424 (hold_section, hold_use): Delete.
2425 (hold_text, hold_rodata, hold_data, hold_bss, hold_rel,
2426 hold_interp): Make local to place_orphan.
2427 (gld${EMULATION_NAME}_place_orphan): Use lang_output_section_find
2428 rather than place_section to find possible previous use of orphan.
2429 Similarly find the place-holder output sections. Use returned
2430 value from lang_enter_output_section_statement rather than calling
2431 lang_output_section_statement_lookup.
2432 * emultempl/armelf.em: Same here.
2433 * emultempl/pe.em: Similar to above, but no need for output_rel_find.
2435 * ldlang.c (lang_enter_output_section_statement): Return output
2437 * ldlang.h (lang_enter_output_section_statement): Change
2440 * ldlang.h (lang_output_section_statement): Export it.
2441 * ldlang.c (lang_output_section_statement): Ditto.
2445 * ld.texinfo (Output Section Data): Add note that section data
2446 commands cannot appear outside of section directives.
2450 * configure.tgt: Add NetBSD/sparc ELF, and NetBSD/sparc64 support.
2455 * Makefile.am (ALL_64_EMULATIONS): Add eelf64_ia64.o.
2456 (eelf64_ia64.c): New rule.
2457 * Makefile.in: Rebuild.
2458 * configure.tgt (ia64-*-elf*, ia64-*-linux*): New targets.
2459 * emulparams/elf64_ia64.sh: New file.
2463 * scripttempl/elfd30v.sc: Place .gcc_except_table.
2467 * dep-in.sed: Match space at start of file name, not at end.
2471 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Call
2472 lang_leave_output_section_statement () after calling
2473 lang_enter_output_section_statement ().
2474 * emultempl/armelf.em: Likewise.
2478 * emultempl/elf32.em (struct orphan_save): Add section field.
2479 (gld${EMULATION_NAME}_place_orphan): Use above to keep sections in
2480 better order, and place first orphan section as we did before the
2481 2000-04-12 patch. Ignore ~SEC_ALLOC sections when choosing place.
2482 Don't call make_bfd_section here, let wild_doit do the job for us.
2483 Don't build a statement list when we'll only throw it away.
2484 * emultempl/armelf.em: Ditto.
2485 * emultempl/pe.em: Similarly.
2489 * scripttempl/elfppc.sc: Remove.
2490 * emulparams/elf32ppc.sh: Use elf.sc.
2491 * emulparams/elf32lppc.sh: Use elf.sc.
2492 * emulparams/elf32ppclinux.sh: Use elf.sc.
2493 * emulparams/elf32ppcsim.sh: New file.
2494 * emulparams/elf32lppcsim.sh: New file.
2495 * Makefile.am: Update dependencies. Add elf32ppcsim ad elf32lppcsim.
2496 (ALL_EMULATIONS): Add elf32ppcsim ad elf32lppcsim.
2497 * Makefile.in: Regenerate.
2498 * configure.tgt (powerpc-*): Add elf32ppcsim and elf32lppcsim.
2502 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Process
2503 ~SEC_ALLOC sections too. Init start address of debug sections.
2504 * emultempl/armelf.em (gld${EMULATION_NAME}_place_orphan): Ditto.
2505 * emultempl/pe.em (gld${EMULATION_NAME}_place_orphan): Ditto.
2506 Also set all relocateable section start addresses.
2510 * scripttempl/elf.sc: Add support for .sbss2 and .sdata2 sections.
2511 Add new BSS_PLT variable for when .plt need not be contained in
2512 the file. Move _etext so that it is also after .fini, and provide
2513 both etext and _etext with a leading underscore. Mark the start
2518 * emultempl/elf32.em (struct orphan_save): New.
2519 (hold_text, hold_rodata, hold_data, hold_bss, hold_rel,
2520 hold_interp): Make them struct orphan_save.
2521 (gld${EMULATION_NAME}_place_section): Modify for new hold_*.
2522 (gld${EMULATION_NAME}_place_orphan): Add new orphan sections to
2523 the end of the relevant section list. Also add associated section
2524 statements to the end of any previous orphan statements.
2525 * emultempl/armelf.em: Similarly.
2526 * emultempl/pe.em: Similarly.
2530 * ld.texinfo (Simple Example): Remove extraneous paragraph.
2534 * configure.in (WARN_CFLAGS): Set to -W -Wall by default. Add
2535 --enable-build-warnings option.
2536 * Makefile.am (AM_CFLAGS, WARN_CFLAGS): Add definitions.
2537 * Makefile.in, configure: Re-generate.
2541 * po/ld.pot: Regenerate.
2543 * lexsup.c (help): Restore translated part of bug string.
2545 * Makefile.am (MKDEP): Use gcc -MM rather than mkdep.
2546 (DEP): Quote when passing vars to sub-make. Add warning message
2548 (DEP1): Rewrite for "gcc -MM".
2549 (CLEANFILES): Add DEP2.
2550 Update dependencies.
2551 * Makefile.in: Regenerate.
2555 * ld.h: #include "bin-bugs.h"
2556 * lexsup.c (help): Use REPORT_BUGS_TO.
2560 * configure.tgt (avr-*-*): New target support.
2561 * Makefile.am: Likewise.
2562 * scripttempl/elf32avr.sc: New script file.
2563 * emulparams/avr1200.sh: New file.
2564 * emulparams/avr23xx.sh: New file.
2565 * emulparams/avr4433.sh New file.
2566 * emulparams/avr44x4.sh New file.
2567 * emulparams/avr85xx.sh New file.
2568 * emulparams/avrmega103.sh New file.
2569 * emulparams/avrmega161.sh New file.
2570 * emulparams/avrmega603.sh New file.
2571 * Makefile.in: Regenerate.
2575 * Makefile.am (check-DEJAGNU): Also unset LANG.
2576 * Makefile.in: Rebuild.
2580 * ldfile.c (ldfile_try_open_bfd): Don't crash if we see an empty
2585 * emulparams/elf32mcore.sh: Include "getopt.h".
2589 * configure.tgt: Remove *-*-aout, *-*-coff, and *-*-netware.
2593 * emulparams/mipspe.sh: Add SUBSYSTEM and INITIAL_SYMBOL_CHAR.
2594 * emulparams/shpe.sh: Likewise.
2598 * pe-dll.c: Remove unused variables and add ATTRIBUTE_UNUSED
2599 to unused parameters.
2601 * emultempl/pe.em: Add "#ifdef DLL_SUPPORT" around static
2602 functions only used by DLL code.
2603 (_place_orphan): Initialise 'dollar'.
2607 * ldmain.c (undefined_symbol): Take one more arg, fatal, to
2608 indicate if the undefined symbol is a fatal error or not.
2609 Don't delete the output file if "fatal" is false.
2613 * Makefile.am (check-DEJAGNU): Also pass LIBS="$(LIBS)".
2614 Set LC_COLLATE and LC_ALL to null and export them. It is for
2615 sort which expects the C locale.
2616 Add $(LIBS) to all $(HOSTING_LIBS).
2617 * Makefile.in: Rebuild.
2621 * emultempl/{aix.em, armcoff.em, armelf.em, armelf_oabi.em,
2622 beos.em, elf32.em, generic.em, gld960.em, gld960c.em, hppaelf.em,
2623 linux.em, lnk960.em, mipsecoff.em, sunos.em, vanilla.em}
2624 (ld_emulation_xfer_struct): Add missing NULL initialiser for
2625 find_potential_libraries.
2629 * ldgram.y (exclude_name_list): Don't require a comma to separate
2630 list entries; the lexer considers commas to be valid part of a
2631 filename, so in something like `foo, bar' the comma is considered
2632 part of the first filename, `foo,'.
2633 * ld.texinfo: Update section on EXCLUDE_FILE lists.
2637 * configure.host: Added HOSTING_CRT0, HOSTING_LIBS for
2638 host "i[3456]86-*-freebsdelf*".
2642 * scripttempl/i386go32.sc: Move misplaced semicolons.
2646 * Makefile.am (ALL_EMULATIONS): Remove ehppaelf.o.
2647 (ALL_64_EMULATIONS): Remove eelf64hppa.o.
2648 (eelf64hppa.c, ehppaelf.c): Remove targets.
2649 * Makefile.in: Rebuild.
2653 * configure.tgt (targ_extra_ofiles): Enable elf64_sparc on
2654 GNU/Linux/sparc, but keep the default as 32.
2656 * configure.tgt: Enable elf64_sparc on Solaris7+/sparc. And make
2657 it default if sparcv9 or sparc64.
2661 * Makefile.am: Add rules to build emipspe.o and earmpe.o.
2662 * Makefile.in: Regenerate.
2663 * configure.tgt: Add targets for arm-wince, sh-pe and mips-pe.
2665 * ldemul.h (ld_emulation_xfer_struct): Add new field:
2666 find_potential_libraries.
2667 * ldemul.c (ldemul_find_potential_libraries): New function.
2669 * ldfile.c (ldfile_open_file_search): Allow function to be
2671 (ldfile_open_file): Call ldemul_find_potential_libraries.
2672 * ldfile.h: Add prototype for ldfile_open_file_search.
2674 * pe-dll.c: Add support for ARM, MIPS and SH targets.
2676 * emulparams/mipspe.sh: New file. Parameters for mips-pe target.
2677 * emulparams/shpe.sh: New file. Parameters for sh-pe target.
2679 * emultempl/pe.em: Add support for ARM, MIPS and SH DLLs.
2680 (gld_X_find_potential_libraries): New function. Search for
2681 libraries called "*.lib".
2683 * scripttempl/pe.sc: Add .pdata section.
2687 * scripttempl/elfd10v.sc: Remove dynamic linking hooks.
2688 Add and use memory regions.
2692 * emulparams/elf32i370.sh, scripttempl/elfi370.sc: New.
2694 * Makefile.am: Add support for Linux/IBM 370.
2695 * configure.tgt: Likewise.
2697 * Makefile.in: Regenerate.
2701 * ldlang.c (print_input_section, print_data_statement,
2702 print_reloc_statement, print_padding_statement, insert_pad,
2703 size_input_section, lang_check_section_addresses,
2704 lang_size_sections, lang_do_assignments, lang_set_startof,
2705 lang_one_common): Change `opb' to unsigned.
2706 (lang_do_assignments): Also change `size' to unsigned.
2710 * scripttempl/elf.sc: Place OTHER_PLT_RELOC_SECTION.
2714 * mri.c (mri_draw_tree): Add default LMA region argument to call
2715 to lang_leave_output_section_statement.
2716 * ldlang.h: Update prototypes with LMA region arguments.
2717 * ldlang.c (lang_size_sections): Encapsulate region bounds
2718 checking in os_check_region call.
2719 (os_check_region): New function.
2720 (lang_output_section_statement_lookup): Initialize lma_region.
2721 (lang_leave_output_section_statement): Add LMA region argument.
2722 (lang_leave_overlay): Ditto.
2723 * ldgram.y: Handle LMA region syntax.
2724 * ld.texinfo (Output Section Description): Describe LMA region usage.
2725 * emultempl/armelf.em (gld$place_orphan): Add default value for
2726 lma region in call to lang_leave_output_section_statement.
2727 * emultempl/elf32.em (gld$place_orphan): Add default value for
2728 lma region in call to lang_leave_output_section_statement.
2729 * emultempl/pe.em (gld$place_orphan): Add default value for
2730 lma region in call to lang_leave_output_section_statement.
2735 * ldlang.c (lang_check_section_addresses): Use bytes instead of
2736 octets when calculating section end addresses.
2740 * ldlang.c (lang_size_sections): Fix typo in ALIGN_N invocation.
2744 * ldexp.c (fold_name): Make SIZEOF operator return byte count, not
2746 * ldlang.c (print_input_section, print_data_statement,
2747 print_reloc_statement, print_padding_statement): Print target
2748 address values and section sizes as bytes, not octets.
2749 (insert_pad) Calculate padding size in octets, and adjust "dot"
2751 (size_input_section) Always adjust "dot" by bytes, not octets.
2752 (lang_check_section_addresses, lang_do_assignments) Adjust
2753 "dot" by bytes, not octets. Use the larger of the directive size
2754 or octets_per_byte for the number of octets actually allocated in
2756 (lang_set_startof) Make sure STARTOF returns a target address.
2757 (lang_one_common) Record size changes in octets.
2758 (lang_abs_symbol_at_end_of) Section end symbol's value is
2759 recorded in target bytes.
2760 * ld.texinfo: Updated description of BYTE, SHORT, LONG, etc.
2761 to be clear about behavior when an octet is smaller than one byte.
2765 * ldcref.c (output_cref): Don't pass message strings to printf
2769 * ldmisc.c (vfinfo): Same here.
2774 * emultempl/{armcoff.em,armelf.em,armelf_oabi.em,beos.em,
2775 generic.em,gld960.em,gld960c.em,hppaelf.em,linux.em,lnk960.em,
2776 mipsecoff.em,sunos.em,vanilla.em} (ld_emulation_xfer_struct):
2777 Add missing NULL initialisers, and comments.
2779 * testsuite/ld-srec/sr3.cc (__rethrow): New.
2783 * ldlang.c (lang_size_sections): Fix typo in comment.
2787 * ldlang.c (lang_size_sections): Also update the current
2788 address of a region if the SEC_NEVER_LOAD bit is not set.
2792 * configure.tgt (arm*-*-conix*): New target.
2796 * ld.texinfo (Options): Remind users to preceed linker command
2797 line switches with -Wl, (or whatever is appropriate) if it is
2798 being invoked by a comnpiler driver program.
2799 Fix description of the behaviour of the -n command line switch.
2803 * ld.h (wildcard_spec): Change exclude_name to exclude_name_list.
2805 * ld.texinfo (EXCLUDE_FILE): Update documentation.
2806 * ldgram.y (wildcard_spec): Support a list of excluded_files.
2807 (exclude_name_list): New.
2808 ldlang.c (walk_wild_section): Support list of excluded files.
2809 (print_wild_statement): Likewise.
2810 (lang_add_wild): Likewise.
2811 * ldlang.h (lang_wild_statement_type): Likewise.
2812 * scripttempl/elf.sc (OTHER_EXCLUDE_FILES): Support.
2816 * pe-dll.c (pe_dll_warn_dup_exports): New variable.
2817 (process_def_file): Use.
2818 (pe_dll_compat_implib): New variable.
2821 * pe-dll.h: Add exports of pe_dll_warn_dup_exports and
2822 pe_dll_compat_implib.
2824 * emultempl/pe.em (longopts): Add warn-duplicate-exports and
2825 compat-implib options.
2826 (gld_${EMULATION_NAME}_list_options): List new options.
2827 (gld_${EMULATION_NAME}_parse_args): Handle.
2829 * pe-dll.c (pe_dll_generate_implib): Use the correct name for output
2832 * deffilep.y (opt_name): Allow "." in name.
2834 For older changes see ChangeLog-9899
2840 version-control: never