This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] Add reference to implicit use in _bfd_elf_is_local_label_name.
Hi Jim,
> Clarify the comments to include the info that Nick gave me, which I think
> should be mentioned in the sources.
>
> Comments?
> /* This is the special character used to indicate a fake symbol. Must be
> - present in FAKE_LABEL_NAME. */
> + present in FAKE_LABEL_NAME. See also _bfd_elf_is_local_label_name in
> + bfd/elf.c which implicitly uses this value. This can only be safely changed
> + if FAKE_LABEL_NAME starts with ".L". */
Hmmm - I think that it would also be worth mentioning that the FAKE_LABEL_CHAR
can appear anywhere in the name, not just at the start. This is implied by
the current comment, but I think that it would be worthwhile mentioning it
explicitly. How about:
/* This is a special character that is used to indicate a fake label.
It must be present in FAKE_LABEL_NAME, although it does not have to
be the first character. It must not be a character that would be
found in a valid symbol name.
Also be aware that the function _bfd_elf_is_local_label_name in
bfd/elf.c has an implicit assumption that FAKE_LABEL_CHAR is '\001'.
If this is not the case then FAKE_LABEL_NAME must start with ".L" in
order for the function to continue working. */
Cheers
Nick