This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH] Add reference to implicit use in _bfd_elf_is_local_label_name.
- From: Jim Wilson <jimw at sifive dot com>
- To: binutils at sourceware dot org
- Cc: Jim Wilson <jimw at sifive dot com>
- Date: Fri, 24 Nov 2017 09:33:24 -0800
- Subject: [PATCH] Add reference to implicit use in _bfd_elf_is_local_label_name.
- Authentication-results: sourceware.org; auth=none
- References: <71a32882-7690-bf3e-b27b-8376e12320bf@redhat.com>
As discussed, adding Nick's rewritten FAKE_LABEL_CHAR comment. Committed.
gas/
* write.h (FAKE_LABEL_CHAR): Expand comment.
---
gas/write.h | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/gas/write.h b/gas/write.h
index 4157bc971c..d2c6af6824 100644
--- a/gas/write.h
+++ b/gas/write.h
@@ -27,8 +27,15 @@
#define FAKE_LABEL_NAME "L0\001"
#endif
-/* This is the special character used to indicate a fake symbol. Must be
- present in FAKE_LABEL_NAME. */
+/* 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. */
#ifndef FAKE_LABEL_CHAR
#define FAKE_LABEL_CHAR '\001'
#endif
--
2.14.1