It looks like a lot of swiss cheese. My trunk was the same way when I got my car.
When I had access to exposed frame rails, I cleaned them out as best I could, applied a metal treatment (something with phosphoric acid), and brushed on a couple of coats of 2 part epoxy paint.