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]

Re: Commit: _bfd_is_local_label_name: Include assembler local labels


On Tue, Apr 7, 2015 at 3:22 AM, Nick Clifton <nickc@redhat.com> wrote:
> Hi Guys,
>
>   I am checking in the patch below to update _bfd_is_local_label_name so
>   that it includes assembler generated local labels.
>
> Cheers
>   Nick
>
> bfd/ChangeLog
> 2015-04-07  Nick Clifton  <nickc@redhat.com>
>
>         * elf.c (_bfd_elf_is_local_label_name): Treat assembler generated
>         local labels as local.
>
> diff --git a/bfd/elf.c b/bfd/elf.c
> index cbc0c91..bb5f1c6 100644
> --- a/bfd/elf.c
> +++ b/bfd/elf.c
> @@ -7743,6 +7743,10 @@ _bfd_elf_is_local_label_name (bfd *abfd ATTRIBUTE_UNUSED,
>    if (name[0] == '_' && name[1] == '.' && name[2] == 'L' && name[3] == '_')
>      return TRUE;
>
> +  /* Treat assembler generated local labels as local.  */
> +  if (name[0] == 'L' && name[strlen (name) - 1] < 32)
> +    return TRUE;
> +
>    return FALSE;
>  }
>

Do you have a testcase for this?  I thought assembler generated local label
on ELF targets started with ".L", not "L".

-- 
H.J.


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