summaryrefslogtreecommitdiffstats
path: root/lib/libc/i386/string
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2012-01-05 10:32:53 +0000
committered <ed@FreeBSD.org>2012-01-05 10:32:53 +0000
commit064404aac96133ca2cd46ae6156b2369418f8c0a (patch)
treeefeb000c789a1ea2797b930535c0d37dfa848a9c /lib/libc/i386/string
parent3bad498373ab9cd361987063fc05a1a8255840b4 (diff)
downloadFreeBSD-src-064404aac96133ca2cd46ae6156b2369418f8c0a.zip
FreeBSD-src-064404aac96133ca2cd46ae6156b2369418f8c0a.tar.gz
Change index() and rindex() to a weak alias.
This allows people to still write statically linked applications that call strchr() or strrchr() and have a local variable or function called index. Discussed with: bde@
Diffstat (limited to 'lib/libc/i386/string')
-rw-r--r--lib/libc/i386/string/strchr.S2
-rw-r--r--lib/libc/i386/string/strrchr.S2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/i386/string/strchr.S b/lib/libc/i386/string/strchr.S
index 4162da2..57fc6dd 100644
--- a/lib/libc/i386/string/strchr.S
+++ b/lib/libc/i386/string/strchr.S
@@ -63,6 +63,6 @@ L2:
ret
END(strchr)
-STRONG_ALIAS(index, strchr)
+WEAK_ALIAS(index, strchr)
.section .note.GNU-stack,"",%progbits
diff --git a/lib/libc/i386/string/strrchr.S b/lib/libc/i386/string/strrchr.S
index a07ecd8..29942c4 100644
--- a/lib/libc/i386/string/strrchr.S
+++ b/lib/libc/i386/string/strrchr.S
@@ -64,6 +64,6 @@ L2:
ret
END(strrchr)
-STRONG_ALIAS(rindex, strrchr)
+WEAK_ALIAS(rindex, strrchr)
.section .note.GNU-stack,"",%progbits
OpenPOWER on IntegriCloud