This is the mail archive of the binutils@sourceware.org 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]

Assembler listing bug


Using i686 "as" version 2.27.0 with "g++" version 6.2.0.

If a source file contains any inline assembler, the -al option intersperses
high-level code into the listing, even though -ah isn't specified. It does
this even if -g isn't specified on the compiler command line. It seems to
insert the entire file containing the inline assembler from line 1 up to the
lines containing the inline assembler.

Furthermore, instead of interspersing the asm construct from the C/C++
source with the actual assembly source fed into the assembler, the former
replaces the latter, so you don't get to see the actual registers chosen by
the compiler, only the quoted strings with placeholders. And the individual
instructions no longer line up with the individual addresses and hex opcodes
unless only one instruction is generated.

If -al is specified without -ah, then no source code from any C/C++ file
should appear in the assembler listing, ever. I'm not even sure how the
assembler finds included source code, since, with no -g compiler option, I
don't see any .file directive for the included file.

I've attached a fragment of a listing, although I'm not sure attachments are
supported.

-- 

Ciao,               Paul D. DeRocco
Paul                mailto:pderocco@ix.netcom.com

Attachment: foo.txt
Description: Text document


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