* config/tc-mips.c (md_begin): Don't set SEC_ALLOC or SEC_LOAD for
authorIan Lance Taylor <ian@airs.com>
Mon, 20 Jan 1997 19:27:11 +0000 (19:27 +0000)
committerIan Lance Taylor <ian@airs.com>
Mon, 20 Jan 1997 19:27:11 +0000 (19:27 +0000)
the .reginfo or .MIPS.options section if configured for an
embedded target.

gas/ChangeLog
gas/config/tc-mips.c

index 2d2018bb166ac4083834866256ca38c962d06dc9..aea449753c4ab3ac4b68cd867e4a1171ee274ccd 100644 (file)
@@ -12,6 +12,10 @@ Mon Jan 20 10:39:36 1997  J.T. Conklin  <jtc@cygnus.com>
 
 Mon Jan 20 12:42:06 1997  Ian Lance Taylor  <ian@cygnus.com>
 
+       * 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.
+
        * config/tc-mips.c (md_begin): Don't set interlocks for
        mips_4650.
 
index 1160d137d43919c3ff18face4c5859ec17a9d35c..961c4349f56da0f16c2f2269860f36ddfae29a77 100644 (file)
@@ -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
This page took 0.034507 seconds and 4 git commands to generate.