Hello everyone,
I'm pretty new to OS development, and as such, I've a problem.
After doing the basic stuff (bare bones, meaty skeleton, etc) and basing my own OS on it, I decided to try and call the global constructors, because it isn't much work to do so.
However, trying to do this as described in the meaty skeleton wiki page, my linker refuses to link, saying that there are multiple definitions of _init and _ fini.
I've searched the forums, google and the wiki for over a day now, and I found nothing that solved my problem.
If any of you guys could help me out with this, I would greatly appreciate it.
Some information about my setup:
Linux: Kali linux x64 version 1.1.0a (latest release at this time).
GCC version: 4.8.2 (ofcourse builded as an cross-compiler).
Binutils version: 2.24.
A link to my OS github page (is easier then pasting files here).
If you need any more information, please let me know.
Dennis
Calling global constructors, linking problem
-
- Posts: 15
- Joined: Sun Aug 09, 2015 7:23 pm
- Libera.chat IRC: Dennisbonke
Calling global constructors, linking problem
Hi, I'm Dennis, the resident port maintainer of Managarm!
Happy to help or answer questions, porting software is my speciality but I'll try everything.
Please correct my English as I'm not a native speaker of it.
Happy to help or answer questions, porting software is my speciality but I'll try everything.
Please correct my English as I'm not a native speaker of it.
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: Calling global constructors, linking problem
If it says there's duplicate, why would there not be a duplicate?
Code: Select all
$(LD) $(LDFLAGS) -o $(PROGRAM) $(CRTI_OBJ) \
(...)
kernel32/arch/*.o \
(...)
$(CRTN_OBJ)
-
- Posts: 15
- Joined: Sun Aug 09, 2015 7:23 pm
- Libera.chat IRC: Dennisbonke
Re: Calling global constructors, linking problem
I'm stupid, thanks for you reply!
Hi, I'm Dennis, the resident port maintainer of Managarm!
Happy to help or answer questions, porting software is my speciality but I'll try everything.
Please correct my English as I'm not a native speaker of it.
Happy to help or answer questions, porting software is my speciality but I'll try everything.
Please correct my English as I'm not a native speaker of it.