This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[v850] increase minimum alignment


This ensures that word data is word-aligned.  Ok?

	* config/tc-v850.c (do_v850_seg): Set alignment to 32 bits.

	* emulparams/v850.sh (SBSS_START_ADDR): Define to 4-byte align.
	* scripttempl/v850.sc (.sbss): Use it.

diff --git a/gas/config/tc-v850.c b/gas/config/tc-v850.c
index c48c011..91404b2 100644
--- a/gas/config/tc-v850.c
+++ b/gas/config/tc-v850.c
@@ -229,6 +229,7 @@ do_v850_seg (int i, subsegT sub)
       bfd_set_section_flags (stdoutput, seg->s, seg->flags);
       if ((seg->flags & SEC_LOAD) == 0)
 	seg_info (seg->s)->bss = 1;
+      bfd_set_section_alignment (stdoutput, seg->s, 2);
     }
 }
 
diff --git a/ld/emulparams/v850.sh b/ld/emulparams/v850.sh
index 96cdc68..c9e4984 100644
--- a/ld/emulparams/v850.sh
+++ b/ld/emulparams/v850.sh
@@ -5,6 +5,7 @@ TEXT_START_ADDR=0x100000
 ZDATA_START_ADDR=0x160
 ROZDATA_START_ADDR="ALIGN (4)"
 SDATA_START_ADDR="ALIGN (4)"
+SBSS_START_ADDR="ALIGN (4)"
 ROSDATA_START_ADDR="ALIGN (4)"
 TDATA_START_ADDR="ALIGN (4)"
 CALL_TABLE_START_ADDR="ALIGN (4)"
diff --git a/ld/scripttempl/v850.sc b/ld/scripttempl/v850.sc
index d8a873e..f490e66 100644
--- a/ld/scripttempl/v850.sc
+++ b/ld/scripttempl/v850.sc
@@ -171,7 +171,7 @@ SECTIONS
      code to initialise all the zero-data sections by simply taking the
      value of '_edata' and zeroing until it reaches '_end'.  */
      
-  .sbss :
+  .sbss ${SBSS_START_ADDR} :
   {
 	${RELOCATING+__sbss_start = .;}
 	*(.sbss)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]