Commit Graph

25 Commits

Author SHA1 Message Date
Hans-Peter Nilsson 6a33aff473 * ldexp.c (fold_name) <case DEFINED>: Set section of result to
abs_output_section.
2003-10-08 12:40:26 +00:00
Alan Modra 1579bae1cd Convert to C90 2003-06-28 05:28:54 +00:00
Alan Modra 1049f94e8e Correct spelling of "relocatable". 2003-06-25 06:40:27 +00:00
Alan Modra b34976b65a s/boolean/bfd_boolean/ s/true/TRUE/ s/false/FALSE/. Simplify
comparisons of bfd_boolean vars with TRUE/FALSE.  Formatting.
2002-11-30 08:39:46 +00:00
Daniel Jacobowitz df2a731323 * emultempl/aix.em: Use include <> for generated headers.
* emultempl/beos.em: Likewise.
	* emultempl/elf32.em: Likewise.
	* emultempl/pe.em: Likewise.
	* ldctor.c: Likewise.
	* ldexp.c: Likewise.
	* ldfile.c: Likewise.
	* ldlang.c: Likewise.
	* ldlex.c: Likewise.
	* ldlex.l: Likewise.
	* ldmain.c: Likewise.
	* ldmisc.c: Likewise.
	* ldwrite.c: Likewise.
	* lexsup.c: Likewise.
	* mri.c: Likewise.
	* pe-dll.c: Likewise.
2002-10-30 03:57:39 +00:00
Alan Modra 0ae1cf52b2 * ldexp.c (fold_unary): New. Split out from exp_fold_tree.
(fold_binary): Correct abs - non-abs case.
	(fold_trinary): New.  Split out from exp_fold_tree.
2002-09-25 02:42:13 +00:00
Nick Clifton 67010b4679 Add EXTERN references to __ctbpm __gp and __ep.
Define TEMPLATE_NAME.
Revert bogus change to ldexp.c
2002-09-02 17:03:30 +00:00
Nick Clifton 3e369e968e Fix PROVIDE 2002-09-02 14:46:56 +00:00
Alan Modra c553bb910d * emulparams/elf32_dlx.sh (TARGET_PAGE_SIZE): Set to 1.
(MAXPAGESIZE): Set to 1.

	* ld.h (ALIGN_N): Delete.
	* ldexp.h (align_n): Declare.
	* ldexp.c (align_n): New function.
	(fold_binary): Use align_n instead of ALIGN_N.
	(exp_fold_tree): Likewise.
	* ldlang.c (lang_size_sections_1): Likewise.
	(lang_one_common): Likewise.
2002-08-13 02:08:26 +00:00
Alan Modra 4da711b140 * ldexp.c: Replace CONST with const.
* ldfile.c: Likewise.
	* ldfile.h: Likewise.
	* ldlex.l: Likewise.
	* mri.c: Likewise.
	* pe-dll.h: Likewise.
2002-06-08 07:39:45 +00:00
Kazu Hirata b7a26f91f4 * ld.h: Fix formatting.
* ldexp.c: Likewise.
	* ldfile.c: Likewise.
	* ldlang.c: Likewise.
	* ldmain.c: Likewise.
	* lexsup.c: Likewise.
	* pe-dll.c: Likewise.
2002-05-03 13:48:55 +00:00
Richard Sandiford 7b17f854f7 * ldlang.c (print_assignment): Update print_dot for assignments to ".".
* ldexp.c (exp_print_token): Add "infix_p" argument.
	(exp_print_tree): Update accordingly.
2002-04-30 09:21:27 +00:00
Jakub Jelinek 50e60fb578 * ldexp.c (fold_binary) [DATA_SEGMENT_ALIGN]: If common page size
is smaller than maximum, round dot up to common page boundary.
2002-04-03 10:25:41 +00:00
Alan Modra 2c382fb6f5 Support arbitrary length fill patterns.
* ldexp.h (etree_value_type): Add "str" field.
	(union etree_union): Add "str" to "value" struct.
	(exp_bigintop): Declare.
	(exp_get_fill): Declare.
	* ldexp.c: Include "safe-ctype.h".
	(exp_intop): Set value.str to NULL.
	(exp_bigintop): New function.
	(new_rel): Pass in "str", and set new.str from it.
	(new_rel_from_section): Set new.str to NULL.
	(fold_name): Adjust calls to new_rel.
	(exp_fold_tree): Likewise.
	(exp_get_fill): New function.
	* ldgram.y (struct big_int bigint, fill_type *fill): New.
	(INT): Returns a "bigint".  Adjust all code handling INTs.
	(fill_opt): Returns a "fill".
	(fill_exp): Split out of fill_opt, use for FILL.
	* ldlang.h (struct _fill_type): New.
	(fill_type): Move typedef to ldexp.h.
	(lang_output_section_statement_type): "fill" is now a pointer.
	(lang_fill_statement_type): Likewise.
	(lang_padding_statement_type): Likewise.
	(lang_add_fill): Now takes a "fill_type *" param.
	(lang_leave_output_section_statement): Likewise.
	(lang_do_assignments): Likewise.
	(lang_size_sections): Likewise.
	(lang_leave_overlay_section): Likewise.
	(lang_leave_overlay): Likewise.
	* ldlang.c: Include ldgram.h after ldexp.h.
	(lang_output_section_statement_lookup): Adjust for fill_type change.
	(print_fill_statement): Likewise.
	(print_padding_statement): Likewise.
	(insert_pad): Now takes a "fill_type *" arg.
	(size_input_section): Likewise.
	(lang_size_sections_1): Likewise.
	(lang_size_sections): Likewise.
	(lang_do_assignments): Likewise.
	(lang_add_fill): Likewise.
	(lang_leave_output_section_statement): Likewise.
	(lang_leave_overlay_section): Likewise.
	(lang_leave_overlay): Likewise.
	Adjust all callers of the above function.
	* ldlex.l: Include ldgram.h after ldexp.h.  Allow hex numbers
	starting with "0X" as well as "0x".  Return bigint.str for hex
	numbers starting with "0x" or "0X", zero bigint.str otherwise.
	Always use base 16 for numbers starting with "$".
	* ldmain.c: Include ldgram.h after ldexp.h.
	* ldwrite.c (build_link_order): Use bfd_data_link_order in place
	of bfd_fill_link_order.
	* pe-dll.c: Adjust lang_do_assignments calls.
	* emultempl/elf32.em: Likewise.
	* emultempl/hppaelf.em: Likewise.
	* emultempl/ppc64elf.em: Likewise.
	* emultempl/beos.em: Include ldgram.h after ldexp.h, adjust
	lang_add_assignment call.
	* emultempl/pe.em: Likewise.
2002-02-15 02:11:05 +00:00
Jakub Jelinek 2d20f7bf67 * ldlex.l (DATA_SEGMENT_ALIGN, DATA_SEGMENT_END): New tokens.
* ldgram.y (DATA_SEGMENT_ALIGN, DATA_SEGMENT_END): New tokens.
	(exp): Add DATA_SEGMENT_ALIGN (exp, exp) and DATA_SEGMENT_END (exp).
	* ldexp.c (exp_data_seg): New variable.
	(exp_print_token): Handle DATA_SEGMENT_ALIGN and DATA_SEGMENT_END.
	(fold_binary): Handle DATA_SEGMENT_ALIGN.
	(exp_fold_tree): Handle DATA_SEGMENT_END.
	Pass allocation_done when recursing instead of hardcoding
	lang_allocating_phase_enum.
	* ldexp.h (exp_data_seg): New.
	* ldlang.c (lang_size_sections_1): Renamed from lang_size_sections.
	(lang_size_sections): New.
	* ld.texinfo (DATA_SEGMENT_ALIGN, DATA_SEGMENT_END): Document.
	* scripttempl/elf.sc: Use DATA_SEGMENT_ALIGN and DATA_SEGMENT_END
	if COMMONPAGESIZE is defined.
	* emulparams/elf_i386.sh (COMMONPAGESIZE): Set to 4K.
	* emulparams/elf32_sparc.sh (COMMONPAGESIZE): Set to 8K.
	* emulparams/elf64_sparc.sh (COMMONPAGESIZE): Set to 8K.
	* emulparams/elf64alpha.sh (COMMONPAGESIZE): Set to 8K.
	* emulparams/elf64_ia64.sh (COMMONPAGESIZE): Set to 16K for shared
	libraries only.
2002-02-12 14:50:08 +00:00
Alan Modra 7cecdbff28 * ldexp.c (exp_print_token): Correct "table" entry for RSHIFT. 2001-12-04 00:10:40 +00:00
Nick Clifton c7d701b094 Use stderr if config.map_file is not available. Do not print NULL trees. 2001-07-19 16:41:00 +00:00
Nick Clifton a2b64bede3 Fixtypos in ChangeLogs, fix copyright dates in files 2001-03-13 06:14:29 +00:00
H.J. Lu b46a87b160 2001-02-13 H.J. Lu <hjl@gnu.org>
* ldexp.h (node_type): Add etree_provided.
	* ldexp.c (exp_fold_tree): Handle etree_provided. Set the node
	type to etree_provided if defined by PROVIDE. Allow updating
	for etree_provided.
	(exp_print_tree): Handle etree_provided.
	* mpw-elfmips.c (gldelf32ebmip_find_exp_assignment): Handle
	etree_provided.
2001-02-13 22:23:33 +00:00
Kazu Hirata 89cdebba13 2000-10-09 Kazu Hirata <kazu@hxi.com>
* ldcref.c: Fix formatting.
	* ldctor.h: Likewise.
	* ldemul.c: Likewise.
	* ldemul.h: Likewise.
	* ldexp.c: Likewise.
	* ldexp.h: Likewise.
	* ldfile.c: Likewise.
	* ldfile.h: Likewise.
	* ld.h: Likewise.
	* ldlang.c: Likewise.
	* ldlang.h: Likewise.
	* ldmain.c: Likewise.
2000-10-09 15:09:17 +00:00
Kazu Hirata 8c95a62eae 2000-10-03 Kazu Hirata <kazu@hxi.com>
* ldexp.c: Fix formatting.
2000-10-03 07:31:55 +00:00
Kazu Hirata 4de2d33d1b 2000-09-29 Kazu Hirata <kazu@hxi.com>
* ldcref.c: Fix formatting.
	* ldctor.c: Likewise.
	* ldemul.c: Likewise.
	* ldexp.c: Likewise.
	* ldfile.c: Likewise.
	* ldlang.c: Likewise.
2000-09-29 11:18:18 +00:00
Timothy Wall 4cbfc3ac19 Add octets vs bytes functionality to LD. 2000-02-03 18:24:46 +00:00
Ian Lance Taylor 87f2a3464b * Many files: Changes to avoid gcc warnings: Add ATTRIBUTE_UNUSED
as appropriate.  Fill in structure initializations.
1999-07-11 20:09:04 +00:00
Richard Henderson 252b5132c7 19990502 sourceware import 1999-05-03 07:29:11 +00:00