This question already has an answer here:
I am working with AT89S51 microcontroller and using keil to write program in C. It produced a hex file of size about 4875 bytes but flash memory on the microcontroller is only 4kbytes.
I programmed the flash successfully and the program is also working fine.
I am glad its working but I want to know why is it working since there is no enough space on flash to program my code on the microcontroller.
Let me know if you need any additional info.