This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils 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: Gas vs irregular files


--- Nick Clifton wrote:
> Hi Etienne,
> 
> >   Not speaking about Gas, but still in binutils, once I did:
> > objdump -D -m i8086 -b binary /dev/hda | less
> >  And it did not work because /dev/hda is not a file.
> >  I do not know if it has been fixed,
> 
> It has not been fixed.
> 
> I am not at all convinced of the usefulness of being able to do
> something like this.  Objdump is intended to be a tool to help display
> the contents of binary files.  It is not supposed to be able to
> interpret block devices, or directories, or any of the other kinds of
> special files that you can get.
> 
> Since you have already pointed out a workaround for the lack of this
> feature (copying the device contents into an ordinary file) is there
> really any need to change objdump ?

  Hi Nick,

  I did not complain when I have first seen this behaviour, so I do not
 think it is _that_ important - just there was a discussion about GAS
 and the usual UNIX way to "open and if error, check why" - so I added
 another non obvious but possible (or clever) use of a device instead
 of a file.

 The usual UNIX behaviour reduces the number of temporary files created,
 so that a script does not have to detect where to create them (/tmp,
 $TMP, ~/tmp, $PWD, /tmp/$USER/ ...), check if these temporary file
 already exists and/or can be overwritten, and to delete them after use.

  I simply think that if GAS is fixed (someone said that you could
 not use /dev/null as input to check if it accept some command line
 options) it would be a good idea to fix objdump also, as a low
 priority task (the use of /dev/null to check valid options could be
 another reason).
 While reading the manual, I see that you cannot use "-" as a filename
 for standard input, so that you can pipe the output of another
 command (not only GAS/LD but for instance some software to read
 FLASH/EEPROM). That is another "non usual" behaviour which could be
 fixed if someone has the time for that.

  Cheers,
  Etienne.

_________________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com


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