diff options
author | Ian Lance Taylor <ian@airs.com> | 1997-01-20 19:27:11 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1997-01-20 19:27:11 +0000 |
commit | b3a64736a1e5dfd8a2f09de279069ae56d61b7bc (patch) | |
tree | dc4e93fbaf7196f53a27c2c38c19b505f0589fc0 /gas/config/tc-mips.c | |
parent | 0ce48081b226ccb320b6f8c8c83656ad4a35a5d8 (diff) | |
download | gdb-b3a64736a1e5dfd8a2f09de279069ae56d61b7bc.zip gdb-b3a64736a1e5dfd8a2f09de279069ae56d61b7bc.tar.gz gdb-b3a64736a1e5dfd8a2f09de279069ae56d61b7bc.tar.bz2 |
* config/tc-mips.c (md_begin): Don't set SEC_ALLOC or SEC_LOAD for
the .reginfo or .MIPS.options section if configured for an
embedded target.
Diffstat (limited to 'gas/config/tc-mips.c')
-rw-r--r-- | gas/config/tc-mips.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c index 1160d13..961c434 100644 --- a/gas/config/tc-mips.c +++ b/gas/config/tc-mips.c @@ -943,20 +943,25 @@ md_begin () { segT seg; subsegT subseg; + flagword flags; segT sec; seg = now_seg; subseg = now_subseg; + /* The ABI says this section should be loaded so that the + running program can access it. However, we don't load it + if we are configured for an embedded target */ + flags = SEC_READONLY | SEC_DATA; + if (strcmp (TARGET_OS, "elf") != 0) + flags |= SEC_ALLOC | SEC_LOAD; + if (! mips_64) { sec = subseg_new (".reginfo", (subsegT) 0); - /* The ABI says this section should be loaded so that the - running program can access it. */ - (void) bfd_set_section_flags (stdoutput, sec, - (SEC_ALLOC | SEC_LOAD - | SEC_READONLY | SEC_DATA)); + + (void) bfd_set_section_flags (stdoutput, sec, flags); (void) bfd_set_section_alignment (stdoutput, sec, 2); #ifdef OBJ_ELF @@ -968,9 +973,7 @@ md_begin () /* The 64-bit ABI uses a .MIPS.options section rather than .reginfo section. */ sec = subseg_new (".MIPS.options", (subsegT) 0); - (void) bfd_set_section_flags (stdoutput, sec, - (SEC_ALLOC | SEC_LOAD - | SEC_READONLY | SEC_DATA)); + (void) bfd_set_section_flags (stdoutput, sec, flags); (void) bfd_set_section_alignment (stdoutput, sec, 3); #ifdef OBJ_ELF |