ESP8266 "rom" boot code is overwritten when upgrade firmware?
The bootloader and the basic peripheral library is in ROM on the ESP8266 chip itself. What you write to using esptool is the external flash chip. Due to the way the content of this flash chip is loaded into RAM (either 'permanently' or only cached) this ROM image is split into segments. (There can be more segments than these two, for instance for data.)

Side note: this blogpost by me has an overview of the various ESP8266 modules.