Skip to content

Instantly share code, notes, and snippets.

View przem360's full-sized avatar

Przemysław Wolski przem360

View GitHub Profile
@przem360
przem360 / c_nostd.txt
Created March 22, 2025 10:03 — forked from tcoppex/c_nostd.txt
Writing C software without the standard library [Linux Edition] - Franc[e]sco's Gopherspace
###################################################################
Writing C software without the standard library
Linux Edition
###################################################################
There are many tutorials on the web that explain how to build a
simple hello world in C without the libc on AMD64, but most of them
stop there.
I will provide a more complete explanation that will allow you to
build yourself a little framework to write more complex programs.

Traveling from and to the airport

This is probably the most important part of every trip. In order not to ruin your first day and to make it to the return flight, you have to deal with public transport. You have accommodation in the old town, i.e. in the center of Gdańsk.

1.1 First problem - Gdańsk has two central stations

"Gdańsk Główny" translates to English as "Main Gdańsk / Central Gdańsk", there is also Gdańsk Śródmieście, translated to English the same way and these are two different stations. Your destination station is "Gdańsk Główny". That is the penultimate (last-but-one) train station. If you miss it and get off by mistake at the last station "Gdańsk Śródmieście", nothing is lost, in fact you can walk from the "Śródmieście" station to the main Gdańsk in 15 - 20 minutes. But remember to buy a ticket to the "Gdańsk Główny" station on the train.