coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Compiling Coreutils with masm=intel


From: Arsen Arsenović
Subject: Re: Compiling Coreutils with masm=intel
Date: Thu, 14 Sep 2023 16:30:10 +0200

Jay <siber222000@gmail.com> writes:

> Hello, thank you for your reply.
>
> I am currently writing an assembly rewriting tool, and with information
> gathered throughout my toolchain, Intel syntax, at least for my purpose,
> provides many intuitive ways to rewrite the assembly. Therefore, I was
> hoping to remain consistent with the Intel syntax as I wish to generate an
> assembly file of Coreutils and reassemble it using my tool.
>
> When you mention
>> Coreutils (and gnulib) could work around them, but I'm not sure
>> that's useful.
>
> Would it be possible if you could let me know the workaround? If it is
> impossible to use the Intel syntax, then I will probably need to work on
> porting my tool over to AT&T, but I would like to keep many options open if
> possible.

[entire email cited above as the ML was dropped from CC, with previous
 emails dropped]

Hi,

Please keep the mailing list in CC, as it is useful to archive
discussion (this usually involves using Reply All or such in your mail
client).

> When you mention
>> Coreutils (and gnulib) could work around them, but I'm not sure
>> that's useful.
>
> Would it be possible if you could let me know the workaround? If it is
> impossible to use the Intel syntax, then I will probably need to work on
> porting my tool over to AT&T, but I would like to keep many options open if
> possible.

No problem.  The bug report you found mentions this issue, which is that
global symbols with names that match up with instruction mnemonics in
Intel syntax confuse the assembler.  The workaround would be to rename
those (e.g. 'or' in src/test.c), but that would confuse developers and
break API.  I'm more partial to the patch proposed in that PR (comment
23), which would add quoting to some pieces of ASM output.  I'm not sure
if it fixes this case, though, and I don't have time to test it now.  If
you do test it, please post feedback on the PR.

Note that -masm=intel is not very widely used, so YMMV.

Good luck, thank you for your interest, have a lovely day :-)
-- 
Arsen Arsenović

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]