diff options
author | ed <ed@FreeBSD.org> | 2012-01-05 10:32:53 +0000 |
---|---|---|
committer | ed <ed@FreeBSD.org> | 2012-01-05 10:32:53 +0000 |
commit | 064404aac96133ca2cd46ae6156b2369418f8c0a (patch) | |
tree | efeb000c789a1ea2797b930535c0d37dfa848a9c /lib | |
parent | 3bad498373ab9cd361987063fc05a1a8255840b4 (diff) | |
download | FreeBSD-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')
-rw-r--r-- | lib/libc/i386/string/strchr.S | 2 | ||||
-rw-r--r-- | lib/libc/i386/string/strrchr.S | 2 | ||||
-rw-r--r-- | lib/libc/mips/string/strchr.S | 2 | ||||
-rw-r--r-- | lib/libc/mips/string/strrchr.S | 2 | ||||
-rw-r--r-- | lib/libc/string/strchr.c | 2 | ||||
-rw-r--r-- | lib/libc/string/strrchr.c | 2 |
6 files changed, 6 insertions, 6 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 diff --git a/lib/libc/mips/string/strchr.S b/lib/libc/mips/string/strchr.S index 9a9f8dc..198366f 100644 --- a/lib/libc/mips/string/strchr.S +++ b/lib/libc/mips/string/strchr.S @@ -58,4 +58,4 @@ fnd: j ra END(strchr) -STRONG_ALIAS(index, strchr) +WEAK_ALIAS(index, strchr) diff --git a/lib/libc/mips/string/strrchr.S b/lib/libc/mips/string/strrchr.S index a742b35..5a88a42 100644 --- a/lib/libc/mips/string/strrchr.S +++ b/lib/libc/mips/string/strrchr.S @@ -56,4 +56,4 @@ LEAF(strrchr) j ra END(strrchr) -STRONG_ALIAS(rindex, strrchr) +WEAK_ALIAS(rindex, strrchr) diff --git a/lib/libc/string/strchr.c b/lib/libc/string/strchr.c index 481cb20..1245f13 100644 --- a/lib/libc/string/strchr.c +++ b/lib/libc/string/strchr.c @@ -51,4 +51,4 @@ strchr(const char *p, int ch) /* NOTREACHED */ } -__strong_reference(strchr, index); +__weak_reference(strchr, index); diff --git a/lib/libc/string/strrchr.c b/lib/libc/string/strrchr.c index 160c4b5..be9f978 100644 --- a/lib/libc/string/strrchr.c +++ b/lib/libc/string/strrchr.c @@ -52,4 +52,4 @@ strrchr(const char *p, int ch) /* NOTREACHED */ } -__strong_reference(strrchr, rindex); +__weak_reference(strrchr, rindex); |