Indeed, its the bootstrapping…
Lets take a look at the top of the file that defines the Kernel module:
https://github.com/elixir-lang/elixir/blob/v1.12.2/lib/elixir/lib/kernel.ex#L4-L7
As you can see it indeed starts with importing the Kernel module, except all those macros and function it uses later on.
Then it imports the :elixir_bootstrap module, which again contains the actual defintion of, eg. defmacro in erlang.
https://github.com/elixir-lang/elixir/blob/v1.12.2/lib/elixir/src/elixir_bootstrap.erl#L17-L19
or the define function called in the Kernel.defmacro implementation:
https://github.com/elixir-lang/elixir/blob/v1.12.2/lib/elixir/src/elixir_bootstrap.erl#L38-L44






















