Regarding etext and end used in cstart

60 views
Skip to first unread message

Zhao Leo

unread,
Aug 17, 2023, 11:26:29 AM8/17/23
to minix3
Hello guys, 

I am reviewing minix3 source code recently and I am stuck on this. 

In cstart, I could see these two are defined as extern and they are mainly used for find the end of kernal address. I can also find they are defined in asm and linked to end.a library. What I didnt find is it seems the libary was nevered used by the kernel??? (I tried to grep the library's name "end.a"). Can someone help me with this? 

Thanks.

Snipaste_2023-08-17_22-50-18.png

Justin Handville

unread,
Aug 28, 2023, 8:27:28 PM8/28/23
to minix3

Vishal Oza

unread,
Aug 28, 2023, 8:51:29 PM8/28/23
to min...@googlegroups.com
I would not be sure but looking at the code I think this might have been code to ensure NetBSD compatatity.

--
You received this message because you are subscribed to the Google Groups "minix3" group.
To unsubscribe from this group and stop receiving emails from it, send an email to minix3+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/minix3/c731fe7c-6d4a-4eec-914d-ecdddb2c4639n%40googlegroups.com.

Justin Handville

unread,
Aug 28, 2023, 10:41:19 PM8/28/23
to minix3
That was the closest thing I could find. The version of cstart that references those variables looks like the old text book source code. ACK (the Amsterdam Compiler Kit) that was used to compile the book source defines these symbols. More or less, it's about the same thing...

Zhao Leo

unread,
Aug 29, 2023, 10:09:03 PM8/29/23
to minix3
Thanks Justin, I am learning Minix3 book so I am reviewing version 3.1.0 code, not the latest 3.3.0. In 3.1.0 code it doesnt have that linker script. If its defined somewhere, i should at least be able to find the text by grep but its not defined at all... 

Justin Handville

unread,
Aug 29, 2023, 10:17:51 PM8/29/23
to minix3
Yeah... it's in the compiler. If you want to find it, download the Amsterdam Compiler Kit (ACK) from here and grep it. The book source was compiled using this compiler, and it defined these values, IIRC.

https://github.com/davidgiven/ack

Zhao Leo

unread,
Aug 30, 2023, 6:06:34 AM8/30/23
to minix3
thanks a lot for the help!
Reply all
Reply to author
Forward
0 new messages