Thread View: gnu.g++.bug
1 messages
1 total messages
Started by James Clark
Thu, 11 May 1989 10:16
fix for sparc alignment problems
Author: James Clark
Date: Thu, 11 May 1989 10:16
Date: Thu, 11 May 1989 10:16
41 lines
1453 bytes
1453 bytes
Here are the patches needed to newld.c to make it align doubles
properly on the sparc (these are straight from the old ld.c):
*** newld.c.distrib Thu May 11 10:33:27 1989
--- newld.c Thu May 11 11:06:28 1989
***************
*** 2838,2843 ****
--- 2838,2847 ----
outheader.a_text = text_size;
+ #ifdef sparc
+ data_size = (data_size + sizeof(double) - 1) & ~(sizeof(double)-1);
+ #endif
+
/* Make the data segment address start in memory on a suitable boundary. */
if (! Tdata_flag_specified)
***************
*** 2926,2931 ****
--- 2930,2946 ----
com = (com + sizeof (int) - 1) & (- sizeof (int));
sp->value = data_start + data_size + bss_size;
+ #ifdef sparc
+ /* Make common space aligned. */
+ if (com > 4)
+ {
+ int off = 0;
+
+ off = sp->value & (sizeof (double) - 1);
+ sp->value += off;
+ com += off;
+ }
+ #endif
sp->defined = N_BSS | N_EXT;
bss_size += com;
if (write_map)
James Clark
jjc@jclark.uucp
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads