diff options
Diffstat (limited to 'gcc/go/go-backend.c')
-rw-r--r-- | gcc/go/go-backend.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/go/go-backend.c b/gcc/go/go-backend.c index 5ecc99b..60a97db 100644 --- a/gcc/go/go-backend.c +++ b/gcc/go/go-backend.c @@ -24,6 +24,7 @@ along with GCC; see the file COPYING3. If not see #include "rtl.h" #include "tree.h" #include "tm_p.h" +#include "output.h" #include "target.h" #include "go-c.h" @@ -91,3 +92,21 @@ go_imported_unsafe (void) /* Let the backend know that the options have changed. */ targetm.override_options_after_change (); } + +/* This is called by the Go frontend proper to add data to the + .go_export section. */ + +void +go_write_export_data (const char *bytes, unsigned int size) +{ + static section* sec; + + if (sec == NULL) + { + gcc_assert (targetm.have_named_sections); + sec = get_section (".go_export", SECTION_DEBUG, NULL); + } + + switch_to_section (sec); + assemble_string (bytes, size); +} |