Skip to contentSkip to conversation

unresoved symbol __ffs

DISCUSSION Robert Lippmann 3 participants 4 messages Jul 2, 2004 – Jul 6, 2004 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

hi all,

haven't seen this covered before, but when i try to use recent snapshots (late june-ish), i get this unresolved symbol when building a 2.4.26 kernel using linux-mips. i assume it's because the compiler
sets --disable-builtins when compiling. it occurs in cfi_cmdset_0001.c oddly, the file compiles without warnings. oh, and i'm using gcc 3.3.2

i've tried #define __ffs ffs, but even that doesn't seem to work.

any ideas?

#1 lore raw
Quoted 7 lines · Robert Lippmann

hi all,

haven't seen this covered before, but when i try to use recent snapshots (late june-ish), i get this unresolved symbol when building a 2.4.26 kernel using linux-mips. i assume it's because the compiler
sets --disable-builtins when compiling. it occurs in cfi_cmdset_0001.c oddly, the file compiles without warnings. oh, and i'm using gcc 3.3.2

__ffs should be defined in linux/asm/bitops.h. It is defined for MIPS as follows in 2.6.7:

/*
* __ffs - find first bit in word.
* @word: The word to search
*
* Undefined if no bit exists, so code should check against 0 first. */
static inline unsigned long __ffs(unsigned long word)

{
        return ffz(~word);
}
Quoted 1 line

i've tried #define __ffs ffs, but even that doesn't seem to work.

It's qite odd that it didn't compile, bit even if it did __ffs and ffs aren't equivalent.

Nicolas

#2 lore raw
Quoted 12 lines · Nicolas Pitre
Quoted 7 lines · Robert Lippmann

hi all,

haven't seen this covered before, but when i try to use recent snapshots (late june-ish), i get this unresolved symbol when building a 2.4.26 kernel using linux-mips. i assume it's because the compiler sets --disable-builtins when compiling. it occurs in cfi_cmdset_0001.c oddly, the file compiles without warnings. oh, and i'm using gcc 3.3.2

__ffs should be defined in linux/asm/bitops.h. It is defined for MIPS as follows in 2.6.7:

but in 2.4.x kernels, it is defined as ffs (without leading underscores), so maybe the code should be adapted to fit 2.6 and 2.4 kernels.

greets dkey

#3 lore raw
Quoted 10 lines · dkey
Quoted 9 lines · Nicolas Pitre
Quoted 7 lines · Robert Lippmann

hi all,

haven't seen this covered before, but when i try to use recent snapshots (late june-ish), i get this unresolved symbol when building a 2.4.26 kernel using linux-mips. i assume it's because the compiler sets --disable-builtins when compiling. it occurs in cfi_cmdset_0001.c oddly, the file compiles without warnings. oh, and i'm using gcc 3.3.2

Quoted 5 lines
Quoted 3 lines

__ffs should be defined in linux/asm/bitops.h. It is defined for MIPS as follows in 2.6.7:

but in 2.4.x kernels, it is defined as ffs (without leading underscores), so

Did you read my previous mail?

	ffs() != __ffs()

Nicolas