[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pcc-list
Subject:    Re: pcc unusable on Darwin (i386)?
From:       Gregory McGarry <greg () bitlynx ! com>
Date:       2008-05-06 5:00:47
Message-ID: 4E1FC065-743F-4915-945D-83C50A8149A6 () bitlynx ! com
[Download RAW message or body]



> for a hello world programme, gcc and pcc issue quite differing  
> assembly:
>
> gcc begins with
> |         .cstring
> | LC0:
> |         .ascii "Hello, World!\12\0"
> |         .text
>
> pcc begins with
> |         .section .rodata
> | .L95:
> |         .ascii "Hello, World!\n\0"
> |         .text

This change was re-introduced when the target-specific section  
handling was rototilled.  It doesn't make any difference anyway.

> Besides that, this seems to be making trouble:
> pcc:
> |         addl $_GLOBAL_OFFSET_TABLE_+[.-.LW1], %ebx
> gcc:
> |         leal    LC0-"L00000000001$pb"(%ebx), %eax
> |         call    L_printf$stub
> |         .section  
> __IMPORT,__jump_table,symbol_stubs,self_modifying_code 
> +pure_instructions,5
> | L_printf$stub:
> |         .indirect_symbol _printf

This is just one of the problems running the i386 target on a non-elf  
operating system.  Once the leading-underscore problem is fixed on  
i386, the mach-o PIC code can be brought over from the powerpc target.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic