This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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]

Re: [PATCH] microblaze: microblaze.md: Use 'SI' instead of 'VOID' for operand 1 of 'call_value_intern'


On 10/22/2014 09:34 AM, Chen Gang wrote:
> 
>>>
>>> Yes, if you want to test on a target, you will need a target.  You can either have a simulator (see binutils and sim/* for an example of how to write one) or target hardware in some form.
>>>

After tried 'sim', I found the root cause is microblaze sim does not
support '--sysroot', which is the environments for shared libraries and
system calls (need load microblaze kernel).

 - microblaze can successfully execute simple programs which has no
   glibc and no system call.

 - In upstream master branch of binutils, for microblaze sim, it has no
   related testsuite for sim in binutils, neither support '--sysroot',
   neither support function stack, startup parameters, and environments.

 - After hard code the default stack in sim, it can start the '-static'
   program with glibc, but stop at uname() which will use system call.

So I want to consult: at present, can we let microblaze sim run 'normal'
programs (have glibc, and use system call)?


If it does not support, I have to rewind to qemu. If it really happens,
it seems I can not finish "gcc testsuite with target" within this month.
(although I have several excuses) :-(

Thanks.

> 
> I will continue sim, and should try to finish within 2014-10-31. Sorry,
> my other things which related open source maybe be delayed (maybe can
> not finish within this month, if happens, need finish within next month).
> 
>>
>> After trying sim, for me, it is really useful way for test, although I
>> also met issues:
>>
>> For a hello world C program, microblaze gcc succeeded building, gdb can
>> load and display the source code, and disassembe code successfully, but
>> sim reported failure, the related issue is below:
>>
>>   [root@localhost test]# /upstream/release/bin/microblaze-gchen-linux-run ./test
>>   Loading section .interp, size 0xd vma 0x100000f4
>>   Loading section .note.ABI-tag, size 0x20 vma 0x10000104
>>   Loading section .hash, size 0x24 vma 0x10000124
>>   Loading section .dynsym, size 0x40 vma 0x10000148
>>   Loading section .dynstr, size 0x3c vma 0x10000188
>>   Loading section .gnu.version, size 0x8 vma 0x100001c4
>>   Loading section .gnu.version_r, size 0x20 vma 0x100001cc
>>   Loading section .rela.dyn, size 0x24 vma 0x100001ec
>>   Loading section .rela.plt, size 0x24 vma 0x10000210
>>   Loading section .init, size 0x58 vma 0x10000234
>>   Loading section .plt, size 0x44 vma 0x1000028c
>>   Loading section .text, size 0x3d0 vma 0x100002d0
>>   Loading section .fini, size 0x34 vma 0x100006a0
>>   Loading section .rodata, size 0x12 vma 0x100006d4
>>   Loading section .eh_frame, size 0x4 vma 0x100006e8
>>   Loading section .ctors, size 0x8 vma 0x100016ec
>>   Loading section .dtors, size 0x8 vma 0x100016f4
>>   Loading section .jcr, size 0x4 vma 0x100016fc
>>   Loading section .dynamic, size 0xd0 vma 0x10001700
>>   Loading section .got, size 0xc vma 0x100017d0
>>   Loading section .got.plt, size 0x18 vma 0x100017dc
>>   Loading section .data, size 0x10 vma 0x100017f4
>>   Start address 0x100002d0
>>   Transfer rate: 14424 bits in <1 sec.
>>   ERROR: Unknown opcode
>>   program stopped with signal 4.
>>
>> For me, I guess it is sim's issue, and I shall try to fix it in the next
>> month, so sorry, I can not finish emulator for microblaze within this
>> month. :-(
>>
>>
>> Welcome any ideas, suggestions or completions.
>>
>> Thanks.
>>
> 


-- 
Chen Gang

Open share and attitude like air water and life which God blessed


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