UPX Packer Internals
Basically
It will take an executable, compress it, and pack the compressed code into another section of the executable. At runtime, it will uncompress the previously compressed code and execute it. In addition, UPX also obfuscates the actual code.
UPX packed executable extracts the packed code, runs it, and terminates its process without serializing anything to disk. The program representation on disk never changes.
__TEXT contains program code usually. __LINKEDIT contains information used by the linker.