I know the stack pointer can be used to find stack allocated objects, but how does the cpu find global/static objects? From what I could tell from the disassembly, it uses absolute/immediate addressing, where the lea instruction is fed a hard coded value, but wouldn't that break because of aslr?
The CPU is not finding anything. It just executes the machine code instructions. The CPU does not know anything about any objects and their storage duration.
The linker is placing the correct addresses in the executable. Executables also often contain relocation tables and, before execution, the bytes in the memory that contain addresses in machine code are set to the correct values by the operating system.
but wouldn't that break because of ASLR?
That's the role of the relocation tables. They contain all the addresses that have to be amended.