1 // expression.cc -- expressions in linker scripts for gold
3 // Copyright 2006, 2007, 2008 Free Software Foundation, Inc.
4 // Written by Ian Lance Taylor <iant@google.com>.
6 // This file is part of gold.
8 // This program is free software; you can redistribute it and/or modify
9 // it under the terms of the GNU General Public License as published by
10 // the Free Software Foundation; either version 3 of the License, or
11 // (at your option) any later version.
13 // This program is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 // GNU General Public License for more details.
18 // You should have received a copy of the GNU General Public License
19 // along with this program; if not, write to the Free Software
20 // Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
21 // MA 02110-1301, USA.
28 #include "parameters.h"
38 // This file holds the code which handles linker expressions.
40 // The dot symbol, which linker scripts refer to simply as ".",
41 // requires special treatment. The dot symbol is set several times,
42 // section addresses will refer to it, output sections will change it,
43 // and it can be set based on the value of other symbols. We simplify
44 // the handling by prohibiting setting the dot symbol to the value of
45 // a non-absolute symbol.
47 // When evaluating the value of an expression, we pass in a pointer to
48 // this struct, so that the expression evaluation can find the
49 // information it needs.
51 struct Expression::Expression_eval_info
54 const Symbol_table
* symtab
;
55 // The layout--we use this to get section information.
57 // Whether expressions can refer to the dot symbol. The dot symbol
58 // is only available within a SECTIONS clause.
59 bool is_dot_available
;
60 // The current value of the dot symbol.
62 // The section in which the dot symbol is defined; this is NULL if
64 Output_section
* dot_section
;
65 // Points to where the section of the result should be stored.
66 Output_section
** result_section_pointer
;
69 // Evaluate an expression.
72 Expression::eval(const Symbol_table
* symtab
, const Layout
* layout
)
74 Output_section
* dummy
;
75 return this->eval_maybe_dot(symtab
, layout
, false, 0, NULL
, &dummy
);
78 // Evaluate an expression which may refer to the dot symbol.
81 Expression::eval_with_dot(const Symbol_table
* symtab
, const Layout
* layout
,
82 uint64_t dot_value
, Output_section
* dot_section
,
83 Output_section
** result_section_pointer
)
85 return this->eval_maybe_dot(symtab
, layout
, true, dot_value
, dot_section
,
86 result_section_pointer
);
89 // Evaluate an expression which may or may not refer to the dot
93 Expression::eval_maybe_dot(const Symbol_table
* symtab
, const Layout
* layout
,
94 bool is_dot_available
, uint64_t dot_value
,
95 Output_section
* dot_section
,
96 Output_section
** result_section_pointer
)
98 Expression_eval_info eei
;
101 eei
.is_dot_available
= is_dot_available
;
102 eei
.dot_value
= dot_value
;
103 eei
.dot_section
= dot_section
;
105 // We assume the value is absolute, and only set this to a section
106 // if we find a section relative reference.
107 *result_section_pointer
= NULL
;
108 eei
.result_section_pointer
= result_section_pointer
;
110 return this->value(&eei
);
115 class Integer_expression
: public Expression
118 Integer_expression(uint64_t val
)
123 value(const Expression_eval_info
*)
124 { return this->val_
; }
128 { fprintf(f
, "0x%llx", static_cast<unsigned long long>(this->val_
)); }
134 extern "C" Expression
*
135 script_exp_integer(uint64_t val
)
137 return new Integer_expression(val
);
140 // An expression whose value is the value of a symbol.
142 class Symbol_expression
: public Expression
145 Symbol_expression(const char* name
, size_t length
)
146 : name_(name
, length
)
150 value(const Expression_eval_info
*);
154 { fprintf(f
, "%s", this->name_
.c_str()); }
161 Symbol_expression::value(const Expression_eval_info
* eei
)
163 Symbol
* sym
= eei
->symtab
->lookup(this->name_
.c_str());
164 if (sym
== NULL
|| !sym
->is_defined())
166 gold_error(_("undefined symbol '%s' referenced in expression"),
167 this->name_
.c_str());
171 *eei
->result_section_pointer
= sym
->output_section();
173 if (parameters
->get_size() == 32)
174 return eei
->symtab
->get_sized_symbol
<32>(sym
)->value();
175 else if (parameters
->get_size() == 64)
176 return eei
->symtab
->get_sized_symbol
<64>(sym
)->value();
181 // An expression whose value is the value of the special symbol ".".
182 // This is only valid within a SECTIONS clause.
184 class Dot_expression
: public Expression
191 value(const Expression_eval_info
*);
199 Dot_expression::value(const Expression_eval_info
* eei
)
201 if (!eei
->is_dot_available
)
203 gold_error(_("invalid reference to dot symbol outside of "
207 *eei
->result_section_pointer
= eei
->dot_section
;
208 return eei
->dot_value
;
211 // A string. This is either the name of a symbol, or ".".
213 extern "C" Expression
*
214 script_exp_string(const char* name
, size_t length
)
216 if (length
== 1 && name
[0] == '.')
217 return new Dot_expression();
219 return new Symbol_expression(name
, length
);
222 // A unary expression.
224 class Unary_expression
: public Expression
227 Unary_expression(Expression
* arg
)
232 { delete this->arg_
; }
236 arg_value(const Expression_eval_info
* eei
,
237 Output_section
** arg_section_pointer
) const
239 return this->arg_
->eval_maybe_dot(eei
->symtab
, eei
->layout
,
240 eei
->is_dot_available
,
243 arg_section_pointer
);
247 arg_print(FILE* f
) const
248 { this->arg_
->print(f
); }
254 // Handle unary operators. We use a preprocessor macro as a hack to
255 // capture the C operator.
257 #define UNARY_EXPRESSION(NAME, OPERATOR) \
258 class Unary_ ## NAME : public Unary_expression \
261 Unary_ ## NAME(Expression* arg) \
262 : Unary_expression(arg) \
266 value(const Expression_eval_info* eei) \
268 Output_section* arg_section; \
269 uint64_t ret = OPERATOR this->arg_value(eei, &arg_section); \
270 if (arg_section != NULL && parameters->output_is_object()) \
271 gold_warning(_("unary " #NAME " applied to section " \
272 "relative value")); \
277 print(FILE* f) const \
279 fprintf(f, "(%s ", #OPERATOR); \
280 this->arg_print(f); \
285 extern "C" Expression* \
286 script_exp_unary_ ## NAME(Expression* arg) \
288 return new Unary_ ## NAME(arg); \
291 UNARY_EXPRESSION(minus
, -)
292 UNARY_EXPRESSION(logical_not
, !)
293 UNARY_EXPRESSION(bitwise_not
, ~)
295 // A binary expression.
297 class Binary_expression
: public Expression
300 Binary_expression(Expression
* left
, Expression
* right
)
301 : left_(left
), right_(right
)
312 left_value(const Expression_eval_info
* eei
,
313 Output_section
** section_pointer
) const
315 return this->left_
->eval_maybe_dot(eei
->symtab
, eei
->layout
,
316 eei
->is_dot_available
,
323 right_value(const Expression_eval_info
* eei
,
324 Output_section
** section_pointer
) const
326 return this->right_
->eval_maybe_dot(eei
->symtab
, eei
->layout
,
327 eei
->is_dot_available
,
334 left_print(FILE* f
) const
335 { this->left_
->print(f
); }
338 right_print(FILE* f
) const
339 { this->right_
->print(f
); }
341 // This is a call to function FUNCTION_NAME. Print it. This is for
344 print_function(FILE* f
, const char *function_name
) const
346 fprintf(f
, "%s(", function_name
);
349 this->right_print(f
);
358 // Handle binary operators. We use a preprocessor macro as a hack to
359 // capture the C operator. KEEP_LEFT means that if the left operand
360 // is section relative and the right operand is not, the result uses
361 // the same section as the left operand. KEEP_RIGHT is the same with
362 // left and right swapped. IS_DIV means that we need to give an error
363 // if the right operand is zero. WARN means that we should warn if
364 // used on section relative values in a relocatable link. We always
365 // warn if used on values in different sections in a relocatable link.
367 #define BINARY_EXPRESSION(NAME, OPERATOR, KEEP_LEFT, KEEP_RIGHT, IS_DIV, WARN) \
368 class Binary_ ## NAME : public Binary_expression \
371 Binary_ ## NAME(Expression* left, Expression* right) \
372 : Binary_expression(left, right) \
376 value(const Expression_eval_info* eei) \
378 Output_section* left_section; \
379 uint64_t left = this->left_value(eei, &left_section); \
380 Output_section* right_section; \
381 uint64_t right = this->right_value(eei, &right_section); \
382 if (KEEP_RIGHT && left_section == NULL && right_section != NULL) \
383 *eei->result_section_pointer = right_section; \
385 && left_section != NULL \
386 && right_section == NULL) \
387 *eei->result_section_pointer = left_section; \
388 else if ((WARN || left_section != right_section) \
389 && (left_section != NULL || right_section != NULL) \
390 && parameters->output_is_object()) \
391 gold_warning(_("binary " #NAME " applied to section " \
392 "relative value")); \
393 if (IS_DIV && right == 0) \
395 gold_error(_(#NAME " by zero")); \
398 return left OPERATOR right; \
402 print(FILE* f) const \
405 this->left_print(f); \
406 fprintf(f, " %s ", #OPERATOR); \
407 this->right_print(f); \
412 extern "C" Expression* \
413 script_exp_binary_ ## NAME(Expression* left, Expression* right) \
415 return new Binary_ ## NAME(left, right); \
418 BINARY_EXPRESSION(mult
, *, false, false, false, true)
419 BINARY_EXPRESSION(div
, /, false, false, true, true)
420 BINARY_EXPRESSION(mod
, %, false, false, true, true)
421 BINARY_EXPRESSION(add
, +, true, true, false, true)
422 BINARY_EXPRESSION(sub
, -, true, false, false, false)
423 BINARY_EXPRESSION(lshift
, <<, false, false, false, true)
424 BINARY_EXPRESSION(rshift
, >>, false, false, false, true)
425 BINARY_EXPRESSION(eq
, ==, false, false, false, false)
426 BINARY_EXPRESSION(ne
, !=, false, false, false, false)
427 BINARY_EXPRESSION(le
, <=, false, false, false, false)
428 BINARY_EXPRESSION(ge
, >=, false, false, false, false)
429 BINARY_EXPRESSION(lt
, <, false, false, false, false)
430 BINARY_EXPRESSION(gt
, >, false, false, false, false)
431 BINARY_EXPRESSION(bitwise_and
, &, true, true, false, true)
432 BINARY_EXPRESSION(bitwise_xor
, ^, true, true, false, true)
433 BINARY_EXPRESSION(bitwise_or
, |, true, true, false, true)
434 BINARY_EXPRESSION(logical_and
, &&, false, false, false, true)
435 BINARY_EXPRESSION(logical_or
, ||, false, false, false, true)
437 // A trinary expression.
439 class Trinary_expression
: public Expression
442 Trinary_expression(Expression
* arg1
, Expression
* arg2
, Expression
* arg3
)
443 : arg1_(arg1
), arg2_(arg2
), arg3_(arg3
)
446 ~Trinary_expression()
455 arg1_value(const Expression_eval_info
* eei
,
456 Output_section
** section_pointer
) const
458 return this->arg1_
->eval_maybe_dot(eei
->symtab
, eei
->layout
,
459 eei
->is_dot_available
,
466 arg2_value(const Expression_eval_info
* eei
,
467 Output_section
** section_pointer
) const
469 return this->arg1_
->eval_maybe_dot(eei
->symtab
, eei
->layout
,
470 eei
->is_dot_available
,
477 arg3_value(const Expression_eval_info
* eei
,
478 Output_section
** section_pointer
) const
480 return this->arg1_
->eval_maybe_dot(eei
->symtab
, eei
->layout
,
481 eei
->is_dot_available
,
488 arg1_print(FILE* f
) const
489 { this->arg1_
->print(f
); }
492 arg2_print(FILE* f
) const
493 { this->arg2_
->print(f
); }
496 arg3_print(FILE* f
) const
497 { this->arg3_
->print(f
); }
505 // The conditional operator.
507 class Trinary_cond
: public Trinary_expression
510 Trinary_cond(Expression
* arg1
, Expression
* arg2
, Expression
* arg3
)
511 : Trinary_expression(arg1
, arg2
, arg3
)
515 value(const Expression_eval_info
* eei
)
517 Output_section
* arg1_section
;
518 uint64_t arg1
= this->arg1_value(eei
, &arg1_section
);
520 ? this->arg2_value(eei
, eei
->result_section_pointer
)
521 : this->arg3_value(eei
, eei
->result_section_pointer
));
537 extern "C" Expression
*
538 script_exp_trinary_cond(Expression
* arg1
, Expression
* arg2
, Expression
* arg3
)
540 return new Trinary_cond(arg1
, arg2
, arg3
);
545 class Max_expression
: public Binary_expression
548 Max_expression(Expression
* left
, Expression
* right
)
549 : Binary_expression(left
, right
)
553 value(const Expression_eval_info
* eei
)
555 Output_section
* left_section
;
556 uint64_t left
= this->left_value(eei
, &left_section
);
557 Output_section
* right_section
;
558 uint64_t right
= this->right_value(eei
, &right_section
);
559 if (left_section
== right_section
)
560 *eei
->result_section_pointer
= left_section
;
561 else if ((left_section
!= NULL
|| right_section
!= NULL
)
562 && parameters
->output_is_object())
563 gold_warning(_("max applied to section relative value"));
564 return std::max(left
, right
);
569 { this->print_function(f
, "MAX"); }
572 extern "C" Expression
*
573 script_exp_function_max(Expression
* left
, Expression
* right
)
575 return new Max_expression(left
, right
);
580 class Min_expression
: public Binary_expression
583 Min_expression(Expression
* left
, Expression
* right
)
584 : Binary_expression(left
, right
)
588 value(const Expression_eval_info
* eei
)
590 Output_section
* left_section
;
591 uint64_t left
= this->left_value(eei
, &left_section
);
592 Output_section
* right_section
;
593 uint64_t right
= this->right_value(eei
, &right_section
);
594 if (left_section
== right_section
)
595 *eei
->result_section_pointer
= left_section
;
596 else if ((left_section
!= NULL
|| right_section
!= NULL
)
597 && parameters
->output_is_object())
598 gold_warning(_("min applied to section relative value"));
599 return std::min(left
, right
);
604 { this->print_function(f
, "MIN"); }
607 extern "C" Expression
*
608 script_exp_function_min(Expression
* left
, Expression
* right
)
610 return new Min_expression(left
, right
);
613 // Class Section_expression. This is a parent class used for
614 // functions which take the name of an output section.
616 class Section_expression
: public Expression
619 Section_expression(const char* section_name
, size_t section_name_len
)
620 : section_name_(section_name
, section_name_len
)
624 value(const Expression_eval_info
*);
628 { fprintf(f
, "%s(%s)", this->function_name(), this->section_name_
.c_str()); }
631 // The child class must implement this.
633 value_from_output_section(const Expression_eval_info
*,
634 Output_section
*) = 0;
636 // The child class must implement this.
638 function_name() const = 0;
641 std::string section_name_
;
645 Section_expression::value(const Expression_eval_info
* eei
)
647 const char* section_name
= this->section_name_
.c_str();
648 Output_section
* os
= eei
->layout
->find_output_section(section_name
);
651 gold_error("%s called on nonexistent output section '%s'",
652 this->function_name(), section_name
);
656 return this->value_from_output_section(eei
, os
);
659 // ABSOLUTE function.
661 class Absolute_expression
: public Unary_expression
664 Absolute_expression(Expression
* arg
)
665 : Unary_expression(arg
)
669 value(const Expression_eval_info
* eei
)
671 Output_section
* dummy
;
672 uint64_t ret
= this->arg_value(eei
, &dummy
);
673 // Force the value to be absolute.
674 *eei
->result_section_pointer
= NULL
;
681 fprintf(f
, "ABSOLUTE(");
687 extern "C" Expression
*
688 script_exp_function_absolute(Expression
* arg
)
690 return new Absolute_expression(arg
);
695 class Align_expression
: public Binary_expression
698 Align_expression(Expression
* left
, Expression
* right
)
699 : Binary_expression(left
, right
)
703 value(const Expression_eval_info
* eei
)
705 Output_section
* align_section
;
706 uint64_t align
= this->right_value(eei
, &align_section
);
707 if (align_section
!= NULL
708 && parameters
->output_is_object())
709 gold_warning(_("aligning to section relative value"));
711 uint64_t value
= this->left_value(eei
, eei
->result_section_pointer
);
714 return ((value
+ align
- 1) / align
) * align
;
719 { this->print_function(f
, "ALIGN"); }
722 extern "C" Expression
*
723 script_exp_function_align(Expression
* left
, Expression
* right
)
725 return new Align_expression(left
, right
);
730 class Assert_expression
: public Unary_expression
733 Assert_expression(Expression
* arg
, const char* message
, size_t length
)
734 : Unary_expression(arg
), message_(message
, length
)
738 value(const Expression_eval_info
* eei
)
740 uint64_t value
= this->arg_value(eei
, eei
->result_section_pointer
);
742 gold_error("%s", this->message_
.c_str());
749 fprintf(f
, "ASSERT(");
751 fprintf(f
, ", %s)", this->message_
.c_str());
755 std::string message_
;
758 extern "C" Expression
*
759 script_exp_function_assert(Expression
* expr
, const char* message
,
762 return new Assert_expression(expr
, message
, length
);
767 class Addr_expression
: public Section_expression
770 Addr_expression(const char* section_name
, size_t section_name_len
)
771 : Section_expression(section_name
, section_name_len
)
776 value_from_output_section(const Expression_eval_info
* eei
,
779 *eei
->result_section_pointer
= os
;
780 return os
->address();
784 function_name() const
788 extern "C" Expression
*
789 script_exp_function_addr(const char* section_name
, size_t section_name_len
)
791 return new Addr_expression(section_name
, section_name_len
);
796 class Alignof_expression
: public Section_expression
799 Alignof_expression(const char* section_name
, size_t section_name_len
)
800 : Section_expression(section_name
, section_name_len
)
805 value_from_output_section(const Expression_eval_info
*,
807 { return os
->addralign(); }
810 function_name() const
811 { return "ALIGNOF"; }
814 extern "C" Expression
*
815 script_exp_function_alignof(const char* section_name
, size_t section_name_len
)
817 return new Alignof_expression(section_name
, section_name_len
);
820 // CONSTANT. It would be nice if we could simply evaluate this
821 // immediately and return an Integer_expression, but unfortunately we
822 // don't know the target.
824 class Constant_expression
: public Expression
827 Constant_expression(const char* name
, size_t length
);
830 value(const Expression_eval_info
*);
833 print(FILE* f
) const;
836 enum Constant_function
838 CONSTANT_MAXPAGESIZE
,
839 CONSTANT_COMMONPAGESIZE
842 Constant_function function_
;
845 Constant_expression::Constant_expression(const char* name
, size_t length
)
847 if (length
== 11 && strncmp(name
, "MAXPAGESIZE", length
) == 0)
848 this->function_
= CONSTANT_MAXPAGESIZE
;
849 else if (length
== 14 && strncmp(name
, "COMMONPAGESIZE", length
) == 0)
850 this->function_
= CONSTANT_COMMONPAGESIZE
;
853 std::string
s(name
, length
);
854 gold_error(_("unknown constant %s"), s
.c_str());
855 this->function_
= CONSTANT_MAXPAGESIZE
;
860 Constant_expression::value(const Expression_eval_info
*)
862 switch (this->function_
)
864 case CONSTANT_MAXPAGESIZE
:
865 return parameters
->target()->abi_pagesize();
866 case CONSTANT_COMMONPAGESIZE
:
867 return parameters
->target()->common_pagesize();
874 Constant_expression::print(FILE* f
) const
877 switch (this->function_
)
879 case CONSTANT_MAXPAGESIZE
:
880 name
= "MAXPAGESIZE";
882 case CONSTANT_COMMONPAGESIZE
:
883 name
= "COMMONPAGESIZE";
888 fprintf(f
, "CONSTANT(%s)", name
);
891 extern "C" Expression
*
892 script_exp_function_constant(const char* name
, size_t length
)
894 return new Constant_expression(name
, length
);
897 // DATA_SEGMENT_ALIGN. FIXME: we don't implement this; we always fall
898 // back to the general case.
900 extern "C" Expression
*
901 script_exp_function_data_segment_align(Expression
* left
, Expression
*)
903 Expression
* e1
= script_exp_function_align(script_exp_string(".", 1), left
);
904 Expression
* e2
= script_exp_binary_sub(left
, script_exp_integer(1));
905 Expression
* e3
= script_exp_binary_bitwise_and(script_exp_string(".", 1),
907 return script_exp_binary_add(e1
, e3
);
910 // DATA_SEGMENT_RELRO. FIXME: This is not implemented.
912 extern "C" Expression
*
913 script_exp_function_data_segment_relro_end(Expression
*, Expression
* right
)
918 // DATA_SEGMENT_END. FIXME: This is not implemented.
920 extern "C" Expression
*
921 script_exp_function_data_segment_end(Expression
* val
)
928 class Defined_expression
: public Expression
931 Defined_expression(const char* symbol_name
, size_t symbol_name_len
)
932 : symbol_name_(symbol_name
, symbol_name_len
)
936 value(const Expression_eval_info
* eei
)
938 Symbol
* sym
= eei
->symtab
->lookup(this->symbol_name_
.c_str());
939 return sym
!= NULL
&& sym
->is_defined();
944 { fprintf(f
, "DEFINED(%s)", this->symbol_name_
.c_str()); }
947 std::string symbol_name_
;
950 extern "C" Expression
*
951 script_exp_function_defined(const char* symbol_name
, size_t symbol_name_len
)
953 return new Defined_expression(symbol_name
, symbol_name_len
);
958 class Loadaddr_expression
: public Section_expression
961 Loadaddr_expression(const char* section_name
, size_t section_name_len
)
962 : Section_expression(section_name
, section_name_len
)
967 value_from_output_section(const Expression_eval_info
* eei
,
970 if (os
->has_load_address())
971 return os
->load_address();
974 *eei
->result_section_pointer
= os
;
975 return os
->address();
980 function_name() const
981 { return "LOADADDR"; }
984 extern "C" Expression
*
985 script_exp_function_loadaddr(const char* section_name
, size_t section_name_len
)
987 return new Loadaddr_expression(section_name
, section_name_len
);
992 class Sizeof_expression
: public Section_expression
995 Sizeof_expression(const char* section_name
, size_t section_name_len
)
996 : Section_expression(section_name
, section_name_len
)
1001 value_from_output_section(const Expression_eval_info
*,
1004 // We can not use data_size here, as the size of the section may
1005 // not have been finalized. Instead we get whatever the current
1006 // size is. This will work correctly for backward references in
1008 return os
->current_data_size();
1012 function_name() const
1013 { return "SIZEOF"; }
1016 extern "C" Expression
*
1017 script_exp_function_sizeof(const char* section_name
, size_t section_name_len
)
1019 return new Sizeof_expression(section_name
, section_name_len
);
1024 class Sizeof_headers_expression
: public Expression
1027 Sizeof_headers_expression()
1031 value(const Expression_eval_info
*);
1034 print(FILE* f
) const
1035 { fprintf(f
, "SIZEOF_HEADERS"); }
1039 Sizeof_headers_expression::value(const Expression_eval_info
* eei
)
1041 unsigned int ehdr_size
;
1042 unsigned int phdr_size
;
1043 if (parameters
->get_size() == 32)
1045 ehdr_size
= elfcpp::Elf_sizes
<32>::ehdr_size
;
1046 phdr_size
= elfcpp::Elf_sizes
<32>::phdr_size
;
1048 else if (parameters
->get_size() == 64)
1050 ehdr_size
= elfcpp::Elf_sizes
<64>::ehdr_size
;
1051 phdr_size
= elfcpp::Elf_sizes
<64>::phdr_size
;
1056 return ehdr_size
+ phdr_size
* eei
->layout
->expected_segment_count();
1059 extern "C" Expression
*
1060 script_exp_function_sizeof_headers()
1062 return new Sizeof_headers_expression();
1065 // In the GNU linker SEGMENT_START basically returns the value for
1066 // -Ttext, -Tdata, or -Tbss. We could implement this by copying the
1067 // values from General_options to Parameters. But I doubt that
1068 // anybody actually uses it. The point of it for the GNU linker was
1069 // because -Ttext set the address of the .text section rather than the
1070 // text segment. In gold -Ttext sets the text segment address anyhow.
1072 extern "C" Expression
*
1073 script_exp_function_segment_start(const char*, size_t, Expression
*)
1075 gold_fatal(_("SEGMENT_START not implemented"));
1078 // Functions for memory regions. These can not be implemented unless
1079 // and until we implement memory regions.
1081 extern "C" Expression
*
1082 script_exp_function_origin(const char*, size_t)
1084 gold_fatal(_("ORIGIN not implemented"));
1087 extern "C" Expression
*
1088 script_exp_function_length(const char*, size_t)
1090 gold_fatal(_("LENGTH not implemented"));
1093 } // End namespace gold.