12 Jul 2011 17:39
[microblaze-linux] Linker bug with -O2 on sqlite
Hi all,
I mentioned this bug to John some time back, but here's a complete
report. I'm using the stock xldk 2.0 big-endian release
(git://git.xilinx.com/xldk/microblaze_v2.0.git) from earlier this year.
Symptoms:
* running sqlite3 produces segmentation fault. With LD_DEBUG=all,
the last lines are e.g.:
143: relocation processing: /tmp/libsqlite3.so.0.8.6
Segmentation fault
To reproduce:
* download and unpack
http://www.sqlite.org/sqlite-autoconf-3070701.tar.gz
* ./configure --prefix=/usr CC=microblaze-unknown-linux-gnu-gcc
LD=microblaze-unknown-linux-gnu-ld CFLAGS="-O0 -mxl-barrel-shift
-mno-xl-soft-mul -mno-xl-soft-div -msmall-divides -mxl-multiply-high
-mxl-pattern-compare -mcpu=v8.00.b" --build=x86_64-linux-gnu
--host=microblaze-unknown-linux-gnu
* make
* run ./sqlite3 on the board. If it gets to a "sqlite>" prompt
without segfaulting, it worked.
To generate a working build:
* replace -O2 with -O0 in the ./configure step. (-O1 fails too.)
(Continue reading)
RSS Feed