I first generate an assembly code from the code, gcc -S -masm=intel a.c -o
a.s, then I modified the assembly code file a.s. Then I use gcc -c a.s -o
a.o. And next I used ld -lc a.o to generate a.out.

Praxal Shah <[email protected]>于2014年3月21日星期五写道:

> How are you creating a.out?
> why this assembly code come into picture?
> On 22-Mar-2014 1:34 AM, "Zhongyuan Ni" 
> <[email protected]<javascript:_e(%7B%7D,'cvml','[email protected]');>>
> wrote:
>
>> I want to modify the assembly code generated by gcc -S a.c. So u mean I
>> should also add this flag when generating the assembly code?
>>
>> Praxal Shah 
>> <[email protected]<javascript:_e(%7B%7D,'cvml','[email protected]');>
>> >于2014年3月21日星期五写道:
>>
>>> Compile your source code using static flag.
>>> Eg. gcc a.c -o a.out --static
>>> This will solve problem
>>> On 22-Mar-2014 1:27 AM, "Zhongyuan Ni" <[email protected]> wrote:
>>>
>>>> Hello,
>>>>
>>>> When we were trying to build the assembly test case Gem5 by using this
>>>> command:
>>>>
>>>> ./build/X86/gem5.fast configs/example/se.py -c a.out
>>>>
>>>> the following error popped up:
>>>>
>>>> fatal: Object file is a dynamic executable however only static
>>>> executables are supported!
>>>>
>>>> Any one knows why this happens?
>>>>
>>>> Thanks.
>>>>
>>>> _______________________________________________
>>>> gem5-users mailing list
>>>> [email protected]
>>>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>>>>
>>>
>> _______________________________________________
>> gem5-users mailing list
>> [email protected] <javascript:_e(%7B%7D,'cvml','[email protected]');>
>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>>
>
_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to