j
: Next unread message k
: Previous unread message j a
: Jump to all threads
j l
: Jump to MailingList overview
Trying to compile OpenBIOS for SPARC32 on a SPARC machine, I get a SIGBUS within forthstrap, more precisely accessing reloc_table in load_dictionary. This table is not aligned because the dictionnary head as a size which is not a multiple of 4.
This is due to the file QEMU,tcx.bin which is being encoded, and which has a size which is not a multiple of 4. Fix that by adding some padding after the encoded data. --- kernel/bootstrap.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/kernel/bootstrap.c b/kernel/bootstrap.c index 546ffee..7f4458e 100644 --- a/kernel/bootstrap.c +++ b/kernel/bootstrap.c @@ -1008,6 +1008,7 @@ encode_file( const char *name ) PUSH( pointer2cell(dict + dicthead) ); PUSH( size ); dicthead += size; + paddict(sizeof(cell)); }
On 08/12/13 10:53, Aurelien Jarno wrote:
Trying to compile OpenBIOS for SPARC32 on a SPARC machine, I get a SIGBUS within forthstrap, more precisely accessing reloc_table in load_dictionary. This table is not aligned because the dictionnary head as a size which is not a multiple of 4.
This is due to the file QEMU,tcx.bin which is being encoded, and which has a size which is not a multiple of 4. Fix that by adding some padding after the encoded data.
kernel/bootstrap.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/kernel/bootstrap.c b/kernel/bootstrap.c index 546ffee..7f4458e 100644 --- a/kernel/bootstrap.c +++ b/kernel/bootstrap.c @@ -1008,6 +1008,7 @@ encode_file( const char *name ) PUSH( pointer2cell(dict + dicthead) ); PUSH( size ); dicthead += size;
- paddict(sizeof(cell)); }
Hi Aurelien,
This patch looks good to me - if you can resubmit with a SOB line then I'm happy to apply it.
ATB,
Mark.
On Sun, Dec 08, 2013 at 11:51:13AM +0000, Mark Cave-Ayland wrote:
On 08/12/13 10:53, Aurelien Jarno wrote:
Trying to compile OpenBIOS for SPARC32 on a SPARC machine, I get a SIGBUS within forthstrap, more precisely accessing reloc_table in load_dictionary. This table is not aligned because the dictionnary head as a size which is not a multiple of 4.
This is due to the file QEMU,tcx.bin which is being encoded, and which has a size which is not a multiple of 4. Fix that by adding some padding after the encoded data.
kernel/bootstrap.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/kernel/bootstrap.c b/kernel/bootstrap.c index 546ffee..7f4458e 100644 --- a/kernel/bootstrap.c +++ b/kernel/bootstrap.c @@ -1008,6 +1008,7 @@ encode_file( const char *name ) PUSH( pointer2cell(dict + dicthead) ); PUSH( size ); dicthead += size;
- paddict(sizeof(cell));
}
Hi Aurelien,
This patch looks good to me - if you can resubmit with a SOB line then I'm happy to apply it.
Thanks I have just send it.
Best regards, Aurelien
On 08/12/13 12:26, Aurelien Jarno wrote:
On Sun, Dec 08, 2013 at 11:51:13AM +0000, Mark Cave-Ayland wrote:
On 08/12/13 10:53, Aurelien Jarno wrote:
Trying to compile OpenBIOS for SPARC32 on a SPARC machine, I get a SIGBUS within forthstrap, more precisely accessing reloc_table in load_dictionary. This table is not aligned because the dictionnary head as a size which is not a multiple of 4.
This is due to the file QEMU,tcx.bin which is being encoded, and which has a size which is not a multiple of 4. Fix that by adding some padding after the encoded data.
kernel/bootstrap.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/kernel/bootstrap.c b/kernel/bootstrap.c index 546ffee..7f4458e 100644 --- a/kernel/bootstrap.c +++ b/kernel/bootstrap.c @@ -1008,6 +1008,7 @@ encode_file( const char *name ) PUSH( pointer2cell(dict + dicthead) ); PUSH( size ); dicthead += size;
- paddict(sizeof(cell)); }
Hi Aurelien,
This patch looks good to me - if you can resubmit with a SOB line then I'm happy to apply it.
Thanks I have just send it.
Best regards, Aurelien
Hi Aurelien,
Looks good to me - applied to SVN trunk. Thanks a lot!
ATB,
Mark.