RE: [PATCH] mips: Avoid a form of the .type directive that is not supported by LLVM's Integrated Assembler

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

 



Hi Maceij,

> Hi Daniel,
> Please try to fit your patch summary (subject) in 75 characters to avoid
> line wrapping in GIT.

Ok, I'll fix this in my next version.

> > The target independent parts of the LLVM Lexer considers 'fault@function'
> > to be a single token representing the 'fault' symbol with a 'function'
> > modifier. However, this is not the case in the .type directive where
> > 'function' refers to STT_FUNC from the ELF standard.
> 
>  If LLVM strives to be GNU toolchain compatible, then this looks like a
> bug in their scanner as generic ELF support in GAS (gas/config/obj-elf.c)
> has this, in `obj_elf_type':
> 
>   if (*input_line_pointer == ',')
>     ++input_line_pointer;
> 
> so the comma is entirely optional.  I realise this is undocumented, but
> there you go.  It must have been there since forever.

It's not just about the comma, the problem arises when there's nothing separating the symbol from the '@function'.
Adding a single whitespace is also sufficient to avoid the problem but we chose to add the comma as well.

> > This is the only example of this form of '.type' that we are aware of in
> > MIPS source so we'd prefer to make this small source change rather than
> > complicate the target independent parts of LLVM's assembly lexer with
> > directive and/or target specific exceptions to the lexing rules.
> 
>  So this has nothing to do with the MIPS target really.

I suppose it depends how you view it. You're correct that the underlying issue is probably relevant to more targets than just MIPS.
>From my perspective this is a MIPS thing since my goal is to get the MIPS Integrated Assembler to a good enough state to be
able to make it our default assembler and on this occasion we're making a small change to MIPS-specific kernel sources to make
that easier.

I'll rewrite the last paragraph anyway though.

>  As to the change itself I agree it seems rather pointless to have this
> single oddity, which I suspect has been a finger slip which has only
> survived because GAS is happy to accept this form.  So:
> 
> Reviewed-by: Maciej W. Rozycki <macro@xxxxxxxxxx>
> 
> although please make the same change to arch/mips/kernel/r2300_fpu.S (the
> same patch should apply there cleanly) for consistency and resend with the
> last paragraph rewritten so as not to confuse people this has anything to
> do with our target.
> 
>  For the record this was introduced with commit 0ae8dceaebe3 ("Merge with
> 2.3.10.").

Ok

>   Maciej




[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux