You are right that the executable file has several sections or segments: not all of them, however, are code.
Typically, a single segment is used for code - in ELF and PE, usually called .text. There are additional options for storing dynamic link data, hard-coded strings, read-only data, global variables, etc.
To see it yourself, not Wiki and Google, try:
Windows: , DUMPBIN.EXE, . , Dependency Walker ( ). PE PE32 + ( 64-)
Linux: objdump -x readelf ( , ) ELF.
Mac: otool -l, ( ) Mach-O.
, , , .
, ,