Comments (15)
I think I've finally got it - I installed focal in a VM, and it seems to work now!
from 123elf.
I can confirm that works for me. It's nice seeing 123 greater than 80x25!
from 123elf.
Hmm -- I think it wants the static version, maybe it's lib32ncurses-dev
?
I'll try to get better build instructions for Ubuntu this weekend, I was mostly using Fedora while hacking on this!
from 123elf.
I had to # apt install libncurses5-dev:i386
on Ubuntu 20.04.
I've not yet built the binary due to linking errors, but I got further with adding -fno-stack-protector /lib32/libc_nonshared.a
to CFLAGS. The latter fixed undefined reference to __libc_csu_fini
(not sure if it's the correct way of doing this) and the former undefined reference to `__stack_chk_fail_local'
I'm now stuck on
cc -m32 -ggdb3 -O0 -Wno-multichar -fno-stack-protector /lib32/libc_nonshared.a -B. -Wl,-b,coff-i386 123.o dl_init.o main.o forceplt.o wrappers.o patch.o -lncurses -o 123
./ld: 123.o:nrcreate.c:(.text+0xb60b4): undefined reference to `close_range'
./ld: 123.o:nrcreate.c:(.text+0xb61ce): undefined reference to `close_range'
./ld: 123.o:nrfixup.c:(.text+0xb6ca5): undefined reference to `close_range'
./ld: 123.o:nrfixup.c:(.text+0xb6e52): undefined reference to `close_range'
./ld: forceplt.o: in function `__require_ref':
(.text+0x5b): undefined reference to `close_range'
./ld: (.text+0xec): undefined reference to `fstat'
./ld: (.text+0x209): undefined reference to `mknod'
./ld: (.text+0x358): undefined reference to `stat'
./ld: wrappers.o: in function `__unix_stat':
/home/steve/sandbox/123elf/wrappers.c:134: undefined reference to `stat'
./ld: wrappers.o: in function `__unix_fstat':
/home/steve/sandbox/123elf/wrappers.c:148: undefined reference to `fstat'
collect2: error: ld returned 1 exit status
make: *** [<builtin>: 123] Error 1
from 123elf.
Hmm, okay - can you try running this manually to see if it works:
cc forceplt.o -lc -m32 -ggdb3 -O0 -Wno-multichar -fno-stack-protector -B. -Wl,-b,coff-i386 -no-pie 123.o dl_init.o main.o wrappers.o patch.o -lncurses -o 123
It must be a link order issue!
from 123elf.
Building binutils
with --enable-tui
didn't help
from 123elf.
maybe it's
lib32ncurses-dev
thanks, after installing I get new error
$ make
cc -m32 -ggdb3 -O0 -Wno-multichar -m32 -ggdb3 -O0 -Wno-multichar -B. -Wl,-b,coff-i386 coffsyrup.c -lncurses -o coffsyrup
./ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib32/Scrt1.o: in function `_start':
(.text+0x1c): undefined reference to `__libc_csu_fini'
./ld: (.text+0x23): undefined reference to `__libc_csu_init'
./ld: /tmp/cckQdK5o.o: in function `main':
/home/user/123/123elf/coffsyrup.c:382: undefined reference to `__stack_chk_fail_local'
./ld: coffsyrup: hidden symbol `__stack_chk_fail_local' isn't defined
./ld: final link failed: bad value
collect2: error: ld returned 1 exit status
make: *** [<builtin>: coffsyrup] Error 1
from 123elf.
yep, added -fno-stack-protector /lib32/libc_nonshared.a
to CFLAGS
and stuck on
$ make
cc -m32 -ggdb3 -O0 -Wno-multichar -fno-stack-protector /lib32/libc_nonshared.a -B. -Wl,-b,coff-i386 123.o dl_init.o main.o forceplt.o wrappers.o patch.o -lpanel -lncurses -dynamic-linker /usr/lib32/ld-linux.so.2 -o 123
./ld: 123.o:nrcreate.c:(.text+0xb60b4): undefined reference to `close_range'
./ld: 123.o:nrcreate.c:(.text+0xb61ce): undefined reference to `close_range'
./ld: 123.o:nrfixup.c:(.text+0xb6ca5): undefined reference to `close_range'
./ld: 123.o:nrfixup.c:(.text+0xb6e52): undefined reference to `close_range'
./ld: forceplt.o: in function `__require_ref':
(.text+0x5b): undefined reference to `close_range'
./ld: (.text+0xec): undefined reference to `fstat'
./ld: (.text+0x209): undefined reference to `mknod'
./ld: (.text+0x358): undefined reference to `stat'
./ld: wrappers.o: in function `__unix_stat':
/home/user/123/123elf/wrappers.c:134: undefined reference to `stat'
./ld: wrappers.o: in function `__unix_fstat':
/home/user/123/123elf/wrappers.c:148: undefined reference to `fstat'
collect2: error: ld returned 1 exit status
make: *** [<builtin>: 123] Error 1
from 123elf.
Oops - that looks like a bug, close_range
should be a localized. Let me quickly push that change and see if that fixes it.
from 123elf.
That fixes close_range
from 123elf.
Hmm, I think I just need to add stat
, mknod
and fstat
to forceplt.s
-- can you see if that does anything? (Note: you might need to make clean after changing it)
Nevermind, they're already in there - very confusing! It might take me a few hours before I can get to my Ubuntu machine and repro, sorry!
from 123elf.
Okay, I think I've found the problem -- give me five minutes to commit something.
from 123elf.
It might work now -- although I'm still confused about how a few things work, can you see if it makes any progress?
from 123elf.
Not quite yet...
cc -lc -m32 -ggdb3 -O0 -Wno-multichar -fno-stack-protector -B. -Wl,-b,coff-i386 -no-pie 123.o dl_init.o main.o forceplt.o wrappers.o patch.o -lncurses -o 123
./ld: 123.o: warning: the use of `tempnam' is dangerous, better use `mkstemp'
./ld: 123.o:time_comm.c:(.text+0xdf104): warning: the use of `tmpnam' is dangerous, better use `mkstemp'
./ld: 123.o: warning: gtty is not implemented and will always fail
./ld: 123.o: warning: stty is not implemented and will always fail
./ld: 123.o:crt1.s:(.data+0x1f684): multiple definition of `sys_errlist'
./ld: 123.o:crt1.s:(.data+0x1f8c0): multiple definition of `sys_nerr'
./ld: forceplt.o: in function `__require_ref':
(.text+0xe7): undefined reference to `fstat'
./ld: (.text+0x204): undefined reference to `mknod'
./ld: (.text+0x353): undefined reference to `stat'
./ld: wrappers.o: in function `__unix_stat':
/home/steve/sandbox/123elf/wrappers.c:126: undefined reference to `stat'
./ld: wrappers.o: in function `__unix_fstat':
/home/steve/sandbox/123elf/wrappers.c:138: undefined reference to `fstat'
collect2: error: ld returned 1 exit status
make: *** [<builtin>: 123] Error 1
from 123elf.
same here
cc -lc -m32 -ggdb3 -O0 -Wno-multichar -fno-stack-protector -B. -Wl,-b,coff-i386 -no-pie 123.o dl_init.o main.o forceplt.o wrappers.o patch.o -lncurses -o 123
./ld: 123.o: warning: the use of `tempnam' is dangerous, better use `mkstemp'
./ld: 123.o:time_comm.c:(.text+0xdf104): warning: the use of `tmpnam' is dangerous, better use `mkstemp'
./ld: 123.o: warning: gtty is not implemented and will always fail
./ld: 123.o: warning: stty is not implemented and will always fail
./ld: 123.o:crt1.s:(.data+0x1f684): multiple definition of `sys_errlist'
./ld: 123.o:crt1.s:(.data+0x1f8c0): multiple definition of `sys_nerr'
./ld: forceplt.o: in function `__require_ref':
(.text+0xe7): undefined reference to `fstat'
./ld: (.text+0x204): undefined reference to `mknod'
./ld: (.text+0x353): undefined reference to `stat'
./ld: wrappers.o: in function `__unix_stat':
/home/user/123/123elf/wrappers.c:126: undefined reference to `stat'
./ld: wrappers.o: in function `__unix_fstat':
/home/user/123/123elf/wrappers.c:138: undefined reference to `fstat'
collect2: error: ld returned 1 exit status
make: *** [<builtin>: 123] Error 1
from 123elf.
Related Issues (20)
- Investigate SIGWINCH handler HOT 4
- Macro / step not visible HOT 6
- BREAK Function & NUM Indicator are Disabled HOT 3
- Exploitable Stack Overflow HOT 6
- Add LICENSE HOT 3
- Segmentation fault (core dumped) HOT 5
- 'Ctrl-Z' Forces Exit to terminal losing all data HOT 6
- Exiting graph display from within a macro HOT 3
- Adding a Data Legend can mess up the graph display. HOT 1
- Math Error HOT 9
- Wiki: How to enter a formula that starts with a cell reference? HOT 2
- lotus123r3_1.0-4bionic_i386.deb does not install on 32bit system HOT 1
- Installation gets errors while extracting files HOT 6
- PIC files? HOT 4
- Appreciation; signal handling issues; typo in linux/unix flags translation? HOT 8
- Function status missing range name HOT 5
- Not a source port?
- Linux Debian 12 Bookworm Launched
- Make /File Import use a larger buffer
- Not working in fbterm HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from 123elf.