public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* How to inform `as` not to do linking after compiling?
@ 2008-10-22  4:48 Pan ruochen
  2008-10-22  5:24 ` Eric Christopher
  0 siblings, 1 reply; 7+ messages in thread
From: Pan ruochen @ 2008-10-22  4:48 UTC (permalink / raw)
  To: binutils

Hi All,

$cp -f 001.s 002.s
$mips-elf-as -O0 -G 0 -mips32r2 -EL 001.s 002.s
002.s: Assembler messages:
002.s:1: Error: symbol `_Init' is already defined

It seems that `as` invoke `ld` to link the object files after comipling?
So how can I inform `as` not to do linking after compiling?

Best Regards
---------------
PRC
Oct 22, 2008

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: How to inform `as` not to do linking after compiling?
  2008-10-22  4:48 How to inform `as` not to do linking after compiling? Pan ruochen
@ 2008-10-22  5:24 ` Eric Christopher
  2008-10-22  7:01   ` Pan ruochen
  0 siblings, 1 reply; 7+ messages in thread
From: Eric Christopher @ 2008-10-22  5:24 UTC (permalink / raw)
  To: Pan ruochen; +Cc: binutils


On Oct 21, 2008, at 9:48 PM, Pan ruochen wrote:

> Hi All,
>
> $cp -f 001.s 002.s
> $mips-elf-as -O0 -G 0 -mips32r2 -EL 001.s 002.s
> 002.s: Assembler messages:
> 002.s:1: Error: symbol `_Init' is already defined
>
> It seems that `as` invoke `ld` to link the object files after  
> comipling?
> So how can I inform `as` not to do linking after compiling?

It is not invoking ld after assembling.

Please read this:

http://sourceware.org/binutils/docs-2.18/as/Input-Files.html#Input-Files

-eric

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: How to inform `as` not to do linking after compiling?
  2008-10-22  5:24 ` Eric Christopher
@ 2008-10-22  7:01   ` Pan ruochen
  2008-10-22  7:37     ` Eric Christopher
  0 siblings, 1 reply; 7+ messages in thread
From: Pan ruochen @ 2008-10-22  7:01 UTC (permalink / raw)
  To: Eric Christopher; +Cc: binutils

> It is not invoking ld after assembling.
>
> Please read this:
>
> http://sourceware.org/binutils/docs-2.18/as/Input-Files.html#Input-Files
>
> -eric
>

So what do the error messages mean here?


PRC

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: How to inform `as` not to do linking after compiling?
  2008-10-22  7:01   ` Pan ruochen
@ 2008-10-22  7:37     ` Eric Christopher
  2008-10-22  7:55       ` Pan ruochen
  0 siblings, 1 reply; 7+ messages in thread
From: Eric Christopher @ 2008-10-22  7:37 UTC (permalink / raw)
  To: Pan ruochen; +Cc: binutils


On Oct 22, 2008, at 12:00 AM, Pan ruochen wrote:

>> It is not invoking ld after assembling.
>>
>> Please read this:
>>
>> http://sourceware.org/binutils/docs-2.18/as/Input-Files.html#Input-Files
>>
>> -eric
>>
>
> So what do the error messages mean here?

It means that you have duplicate symbols between the two files.

-eric

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: How to inform `as` not to do linking after compiling?
  2008-10-22  7:37     ` Eric Christopher
@ 2008-10-22  7:55       ` Pan ruochen
  2008-10-22  7:59         ` Eric Christopher
  0 siblings, 1 reply; 7+ messages in thread
From: Pan ruochen @ 2008-10-22  7:55 UTC (permalink / raw)
  To: Eric Christopher; +Cc: binutils

> It means that you have duplicate symbols between the two files.
>
> -eric
>

So, if `as` deals with more than one input files, it will combine the
assembly results of each input file to one output object file?

PRC

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: How to inform `as` not to do linking after compiling?
  2008-10-22  7:55       ` Pan ruochen
@ 2008-10-22  7:59         ` Eric Christopher
  2008-10-23  3:32           ` Pan ruochen
  0 siblings, 1 reply; 7+ messages in thread
From: Eric Christopher @ 2008-10-22  7:59 UTC (permalink / raw)
  To: Pan ruochen; +Cc: binutils


On Oct 22, 2008, at 12:55 AM, Pan ruochen wrote:

>> It means that you have duplicate symbols between the two files.
>>
>> -eric
>>
>
> So, if `as` deals with more than one input files, it will combine the
> assembly results of each input file to one output object file?

No, it will concatenate the source files as it says on the page I sent  
you.

-eric

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: How to inform `as` not to do linking after compiling?
  2008-10-22  7:59         ` Eric Christopher
@ 2008-10-23  3:32           ` Pan ruochen
  0 siblings, 0 replies; 7+ messages in thread
From: Pan ruochen @ 2008-10-23  3:32 UTC (permalink / raw)
  To: Eric Christopher; +Cc: binutils

> No, it will concatenate the source files as it says on the page I sent you.
>
> -eric
>

I get it. I misunderstood the behaviors of `as`. I thought it worked
like `gcc` to output one object file respectly for one input file if
it did with multiple input files.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-10-23  3:32 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-22  4:48 How to inform `as` not to do linking after compiling? Pan ruochen
2008-10-22  5:24 ` Eric Christopher
2008-10-22  7:01   ` Pan ruochen
2008-10-22  7:37     ` Eric Christopher
2008-10-22  7:55       ` Pan ruochen
2008-10-22  7:59         ` Eric Christopher
2008-10-23  3:32           ` Pan ruochen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).