diff options
author | Alan Modra <amodra@gmail.com> | 2005-05-11 14:10:10 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2005-05-11 14:10:10 +0000 |
commit | 0cf7d72c50cd48896b66849604286cc73d838161 (patch) | |
tree | c09ffd5807fa80c56cfabc90e29b928e9a7b4032 /ld/ldlang.c | |
parent | d7128ce4b13e32a44861403299d9541ed9b8827d (diff) | |
download | gdb-0cf7d72c50cd48896b66849604286cc73d838161.zip gdb-0cf7d72c50cd48896b66849604286cc73d838161.tar.gz gdb-0cf7d72c50cd48896b66849604286cc73d838161.tar.bz2 |
* ldgram.y: Add SPECIAL token.
(sect_constraint): Handle SPECIAL.
* ldlang.c (lang_output_section_find_1): Don't match SPECIAL.
(map_input_to_output_sections): Likewise.
* ldlex.l (SPECIAL): Define.
* emulparams/elf32ppc.sh (DATA_GOT, SDATA_GOT, SEPARATE_GOTPLT,
GOT, PLT, GOTPLT): Define.
* emultempl/ppc32elf.em (old_plt, old_got): New static vars.
(ppc_after_open): New function.
(PARSE_AND_LIST_PROLOGUE): Define OPTION_OLD_LPT and OPTION_OLD_GOT.
(PARSE_AND_LIST_LONGOPTS): Add "bss-plt" and "sdata-got".
(PARSE_AND_LIST_OPTIONS): Document them.
(PARSE_AND_LIST_ARGS_CASES): Handle them.
(LDEMUL_AFTER_OPEN): Define.
* scripttempl/elf.sc (PLT): Don't override existing define.
(DATA_GOT, SDATA_GOT): Define and use to enable alternate got
placement rather than using NO_SMALL_DATA. Emit GOTPLT for RELRO_NOW.
Diffstat (limited to 'ld/ldlang.c')
-rw-r--r-- | ld/ldlang.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ld/ldlang.c b/ld/ldlang.c index 453b7ac..c7310d7 100644 --- a/ld/ldlang.c +++ b/ld/ldlang.c @@ -991,7 +991,9 @@ lang_output_section_find_1 (const char *const name, int constraint) { if (strcmp (name, lookup->name) == 0 && lookup->constraint != -1 - && (constraint == 0 || constraint == lookup->constraint)) + && (constraint == 0 + || (constraint == lookup->constraint + && constraint != SPECIAL))) return lookup; } return NULL; @@ -2951,7 +2953,8 @@ map_input_to_output_sections case lang_output_section_statement_enum: if (s->output_section_statement.constraint) { - if (s->output_section_statement.constraint == -1) + if (s->output_section_statement.constraint != ONLY_IF_RW + && s->output_section_statement.constraint != ONLY_IF_RO) break; s->output_section_statement.all_input_readonly = TRUE; check_input_sections (s->output_section_statement.children.head, |