Fix alignment issue in data section

This commit is contained in:
Stephen Caudle
2011-11-07 23:23:16 -05:00
parent 42e531c7c4
commit 4c18313da6
3 changed files with 15 additions and 0 deletions

View File

@@ -32,7 +32,9 @@ SECTIONS
.text : {
*(.vectors) /* Vector table */
*(.text*) /* Program code */
. = ALIGN(4);
*(.rodata*) /* Read-only data */
. = ALIGN(4);
_etext = .;
} >rom
@@ -41,12 +43,14 @@ SECTIONS
.data : {
_data = .;
*(.data*) /* Read-write initialized data */
. = ALIGN(4);
_edata = .;
} >ram AT >rom
.bss : {
*(.bss*) /* Read-write zero initialized data */
*(COMMON)
. = ALIGN(4);
_ebss = .;
} >ram AT >rom
@@ -56,6 +60,7 @@ SECTIONS
*/
/DISCARD/ : { *(.eh_frame) }
. = ALIGN(4);
end = .;
}

View File

@@ -32,7 +32,9 @@ SECTIONS
.text : {
*(.vectors) /* Vector table */
*(.text*) /* Program code */
. = ALIGN(4);
*(.rodata*) /* Read-only data */
. = ALIGN(4);
_etext = .;
} >rom
@@ -41,12 +43,14 @@ SECTIONS
.data : {
_data = .;
*(.data*) /* Read-write initialized data */
. = ALIGN(4);
_edata = .;
} >ram AT >rom
.bss : {
*(.bss*) /* Read-write zero initialized data */
*(COMMON)
. = ALIGN(4);
_ebss = .;
} >ram AT >rom
@@ -56,6 +60,7 @@ SECTIONS
*/
/DISCARD/ : { *(.eh_frame) }
. = ALIGN(4);
end = .;
}

View File

@@ -32,7 +32,9 @@ SECTIONS
.text : {
*(.vectors) /* Vector table */
*(.text*) /* Program code */
. = ALIGN(4);
*(.rodata*) /* Read-only data */
. = ALIGN(4);
_etext = .;
} >rom
@@ -41,12 +43,14 @@ SECTIONS
.data : {
_data = .;
*(.data*) /* Read-write initialized data */
. = ALIGN(4);
_edata = .;
} >ram AT >rom
.bss : {
*(.bss*) /* Read-write zero initialized data */
*(COMMON)
. = ALIGN(4);
_ebss = .;
} >ram AT >rom
@@ -56,6 +60,7 @@ SECTIONS
*/
/DISCARD/ : { *(.eh_frame) }
. = ALIGN(4);
end = .;
}