diff options
author | Lubomir Rintel <lkundrak@v3.sk> | 2019-04-29 17:32:02 +0200 |
---|---|---|
committer | James Cameron <quozl@laptop.org> | 2020-03-12 14:17:55 +1100 |
commit | 5be334a549c937970ebc47a992763e942cb772ab (patch) | |
tree | 5f65491892f100aa451ad38ea8b9fbc5554902ad | |
parent | d41480ce47dd60e5eb4aba1e0d812b84cc6b55fd (diff) | |
download | openfirmware-5be334a549c937970ebc47a992763e942cb772ab.tar.gz |
memtest86: get rid of duplicate symbols
There's no such thing as extern inline; perhaps just a typo. But now it
causes the build to fail.
make[1]: Entering directory 'clients/memtest86'
...
ld -shared -Bsymbolic -T memtest_shared.lds -o memtest_shared head.o \
reloc.o main.o test.o init.o lib.o patn.o screen_buffer.o config.o \
memsize.o random.o olpc.o lfbega.o
ld: lib.o: in function `__inb':
lib.c:(.text+0x0): multiple definition of `__inb'; init.o:init.c:(.text+0x0): first defined here
ld: lib.o: in function `__inbc':
lib.c:(.text+0x6): multiple definition of `__inbc'; init.o:init.c:(.text+0x6): first defined here
ld: lib.o: in function `__inb_p':
...
-rw-r--r-- | clients/memtest86/io.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clients/memtest86/io.h b/clients/memtest86/io.h index 4fda2dea..a38f92e6 100644 --- a/clients/memtest86/io.h +++ b/clients/memtest86/io.h @@ -31,7 +31,7 @@ */ #define __OUT1(s,x) \ -extern inline void __out##s(unsigned x value, unsigned short port) { +static inline void __out##s(unsigned x value, unsigned short port) { #define __OUT2(s,s1,s2) \ __asm__ __volatile__ ("out" #s " %" s1 "0,%" s2 "1" @@ -43,7 +43,7 @@ __OUT1(s##_p,x) __OUT2(s,s1,"w") : : "a" (value), "d" (port)); SLOW_DOWN_IO; } \ __OUT1(s##c_p,x) __OUT2(s,s1,"") : : "a" (value), "id" (port)); SLOW_DOWN_IO; } #define __IN1(s) \ -extern inline RETURN_TYPE __in##s(unsigned short port) { RETURN_TYPE _v; +static inline RETURN_TYPE __in##s(unsigned short port) { RETURN_TYPE _v; #define __IN2(s,s1,s2) \ __asm__ __volatile__ ("in" #s " %" s2 "1,%" s1 "0" @@ -55,7 +55,7 @@ __IN1(s##_p) __IN2(s,s1,"w") : "=a" (_v) : "d" (port) ,##i ); SLOW_DOWN_IO; retu __IN1(s##c_p) __IN2(s,s1,"") : "=a" (_v) : "id" (port) ,##i ); SLOW_DOWN_IO; return _v; } #define __OUTS(s) \ -extern inline void outs##s(unsigned short port, const void * addr, unsigned long count) \ +static inline void outs##s(unsigned short port, const void * addr, unsigned long count) \ { __asm__ __volatile__ ("cld ; rep ; outs" #s \ : "=S" (addr), "=c" (count) : "d" (port),"0" (addr),"1" (count)); } |