public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Including files through command line options
@ 2005-05-13 21:32 Ravi Ramaseshan
  2005-05-14 20:46 ` Nick Clifton
  0 siblings, 1 reply; 2+ messages in thread
From: Ravi Ramaseshan @ 2005-05-13 21:32 UTC (permalink / raw)
  To: binutils

Hello,

Based on a command line option, I want to make GAS include certain
assembly source files (let's assume that I know where the file is for
now).

I've tried setting a flag in md_parse_option, reading that flag in
md_begin and then based on that flag called read_a_source_file on the
file which I wanted to include.

Could anyone advise me if this is the acceptable way of achieving my
objective or if there is a cleaner way of doing this.

Regards,
-- 
Ravi Ramaseshan
http://www.geocities.com/ramaseshan_ravi/

" All man's miseries derive from not being able to sit in a room alone. "
- Blaise Pascal

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

* Re: Including files through command line options
  2005-05-13 21:32 Including files through command line options Ravi Ramaseshan
@ 2005-05-14 20:46 ` Nick Clifton
  0 siblings, 0 replies; 2+ messages in thread
From: Nick Clifton @ 2005-05-14 20:46 UTC (permalink / raw)
  To: Ravi Ramaseshan; +Cc: binutils

Hi Ravi,

> Based on a command line option, I want to make GAS include certain
> assembly source files (let's assume that I know where the file is for
> now).
> 
> I've tried setting a flag in md_parse_option, reading that flag in
> md_begin and then based on that flag called read_a_source_file on the
> file which I wanted to include.
> 
> Could anyone advise me if this is the acceptable way of achieving my
> objective or if there is a cleaner way of doing this.

It is an acceptable way of achieving your goal.  Presumably you are only 
modifying files specific to the target you are working on, so there is 
no chance that if there was a bug in your code it would affect other 
targets.

As for cleaner ways of achieving your objective I would definitely 
recommend that you consider using the "gcc" program instead.  Gcc is 
quite capable of taking assembler source files which include C 
preprocessor commands, including the #include directive, processing it 
and then passing it on to GAS.  ie GCC and C preprocessor can already do 
exactly what you want, so why bother reinventing the wheel ?

Cheers
   Nick


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

end of thread, other threads:[~2005-05-14 19:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-13 21:32 Including files through command line options Ravi Ramaseshan
2005-05-14 20:46 ` Nick Clifton

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).