This is the mail archive of the 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: Help needed: File reading problems in gas?

Hi Johann,

> conftest.s: Assembler messages:
> conftest.s: Error: can't open   for reading: No such file or directory
> It works if
> - remove the "&& ld..." part of ac_try
> - the content of ac_try is executed directly (without eval)

> Any ideas?

This appears to be a weird shell scripting problem.  The error message
is happening because gas is being passed a command line that includes a
single space as an argument.  I added this patch to as.c:

diff --git a/gas/as.c b/gas/as.c
index 83a572b..80a8a01 100644
--- a/gas/as.c
+++ b/gas/as.c
@@ -1168,6 +1168,7 @@ perform_an_assembly_pass (int argc, char ** argv)
        {                       /* Is it a file-name argument?  */
          PROGRESS (1);
+         fprintf (stderr, "ARG %d ARGV %p *ARGV %s %d\n", argc + 1, argv, * argv, ** argv);
          /* argv->"" if stdin desired, else->filename.  */
          read_a_source_file (*argv);

and the output shows:

ARG 2 ARGV 0x122b8c8 *ARGV conftest.s 99
ARG 1 ARGV 0x122b8d0 *ARGV   32

So this is not an assembler problem.  Poor old gas is being asked to assemble a
non-existent file.


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