diff options
author | Alan Modra <amodra@gmail.com> | 2008-01-25 12:03:37 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2008-01-25 12:03:37 +0000 |
commit | 53d25da64b00c1cf7f10d04785d66fa003f8bfc9 (patch) | |
tree | b1bad03e3da788202674fed0b1233f865cbad54d /ld/ldlang.h | |
parent | 5ca3b13d654923e893cb2661700bc06e7af32a49 (diff) | |
download | gdb-53d25da64b00c1cf7f10d04785d66fa003f8bfc9.zip gdb-53d25da64b00c1cf7f10d04785d66fa003f8bfc9.tar.gz gdb-53d25da64b00c1cf7f10d04785d66fa003f8bfc9.tar.bz2 |
ld/
* ld.texinfo (INSERT): Describe.
* ldgram.y (ldgram_in_script, ldgram_had_equals): Delete.
(INSERT_K, AFTER, BEFORE): Add as tokens.
(ifile_p1): Handle INSERT statements.
(saved_script_handle, force_make_executable): Move to..
* ldmain.c: ..here.
(previous_script_handle): New global var.
* ldmain.h (saved_script_handle, force_make_executable): Declare.
(previous_script_handle): Likewise.
* ldlex.l (INSERT_K, AFTER, BEFORE): Add tokens.
* lexsup.c (parge_args <-T>): Set previous_script_handle.
* ldlang.c (lang_for_each_statement_worker): Handle insert statement.
(map_input_to_output_sections, print_statement): Likewise.
(lang_size_sections_1, lang_do_assignments_1): Likewise.
(insert_os_after): New function, extracted from..
(lang_insert_orphan): ..here.
(process_insert_statements): New function.
(lang_process): Call it.
(lang_add_insert): New function.
* ldlang.h (lang_insert_statement_enum): New.
(lang_insert_statement_type): New.
(lang_statement_union_type): Add insert_statement.
(lang_add_insert): Declare.
ld/testsuite/
* ld-spu/ovl.lnk: Delete overlay.
* ld-spu/ovl1.lnk: New file.
* ld-spu/ovl2.lnk: New file.
* ld-spu/ovl.d: Update.
* ld-spu/ovl2.d: Update.
Diffstat (limited to 'ld/ldlang.h')
-rw-r--r-- | ld/ldlang.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/ld/ldlang.h b/ld/ldlang.h index d0d2cf0..6de4267 100644 --- a/ld/ldlang.h +++ b/ld/ldlang.h @@ -79,6 +79,7 @@ typedef struct lang_statement_header_struct lang_output_statement_enum, lang_padding_statement_enum, lang_group_statement_enum, + lang_insert_statement_enum, lang_constructors_statement_enum } type; } lang_statement_header_type; @@ -352,6 +353,13 @@ typedef struct lang_statement_list_type children; } lang_group_statement_type; +typedef struct +{ + lang_statement_header_type header; + const char *where; + bfd_boolean is_before; +} lang_insert_statement_type; + typedef union lang_statement_union { lang_statement_header_type header; @@ -370,6 +378,7 @@ typedef union lang_statement_union lang_fill_statement_type fill_statement; lang_padding_statement_type padding_statement; lang_group_statement_type group_statement; + lang_insert_statement_type insert_statement; } lang_statement_union_type; /* This structure holds information about a program header, from the @@ -565,6 +574,8 @@ extern void lang_size_sections (bfd_boolean *, bfd_boolean); extern void one_lang_size_sections_pass (bfd_boolean *, bfd_boolean); +extern void lang_add_insert + (const char *, int); extern void lang_enter_group (void); extern void lang_leave_group |