The line number section you already emit looks like:
(0..3) SECREL relocation to function
(4..5) Section index of function
(6..7) Padding
(8..11) Code Size
The “Padding” field is actually a flags field, with one flag defined: bit 0 of that field should be set if there is column info in this line number subsection.
The actual column info is emitted as part of the same chunks that contain the line numbers for a given file name. Each chunk looks like:
(0..3) Offset of file in the file name table
(4..7) Count of line numbers (n)
(8..11) Size of chunk
(12..12+8*n) Line number records
(12+8*n..12+8*n+4*n) Column records (if column info flag was set)
Each column info record looks like:
(0..1) Start Column
(2..3) End Column
Note that the chunk includes all of the line number records before any of the column records.
-Dave
The line number section you already emit looks like:
(0..3) SECREL relocation to function
(4..5) Section index of function
(6..7) Padding
(8..11) Code Size
The “Padding” field is actually a flags field, with one flag defined: bit 0 of that field should be set if there is column info in this line number subsection.
The actual column info is emitted as part of the same chunks that contain the line numbers for a given file name. Each chunk looks like:
(0..3) Offset of file in the file name table
(4..7) Count of line numbers (n)
(8..11) Size of chunk
(12..12+8*n) Line number records
(12+8*n..12+8*n+4*n) Column records (if column info flag was set)
Each column info record looks like:
(0..1) Start Column
(2..3) End Column
Note that the chunk includes all of the line number records before any of the column records.