From 3802b2dd6b937e2904b6e2de087e224437eab493 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Mon, 4 Feb 2008 06:45:50 +0000 Subject: Implement SIZEOF_HEADERS, section constraints, other minor linker script items. --- gold/script-c.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'gold/script-c.h') diff --git a/gold/script-c.h b/gold/script-c.h index 496e18b..26dc556 100644 --- a/gold/script-c.h +++ b/gold/script-c.h @@ -61,6 +61,21 @@ typedef Expression* Expression_ptr; typedef void* Expression_ptr; #endif +/* A constraint for whether to use a particular output section + definition. */ + +enum Section_constraint +{ + /* No constraint. */ + CONSTRAINT_NONE, + /* Only if all input sections are read-only. */ + CONSTRAINT_ONLY_IF_RO, + /* Only if at least input section is writable. */ + CONSTRAINT_ONLY_IF_RW, + /* Special constraint. */ + CONSTRAINT_SPECIAL +}; + /* The information we store for an output section header in the bison parser. */ @@ -75,6 +90,8 @@ struct Parser_output_section_header /* The input section alignment, from the SUBALIGN specifier. This may be NULL. */ Expression_ptr subalign; + /* A constraint on this output section. */ + enum Section_constraint constraint; }; /* The information we store for an output section trailer in the bison @@ -204,6 +221,11 @@ script_set_entry(void* closure, const char*, size_t); extern void script_parse_option(void* closure, const char*, size_t); +/* Called by the bison parser to handle SEARCH_DIR. */ + +extern void +script_add_search_dir(void* closure, const char*, size_t); + /* Called by the bison parser to push the lexer into expression mode. */ -- cgit v1.1