out: elf,stabs -- Fix @n_value attribute for HdrSym entry

Each stabs entry is 12 bytes in size, for some reason we've
been pasing wrong attribute here in @n_value.

Signed-off-by: Mark Scott <nasm@mscott.cx>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
This commit is contained in:
Mark Scott 2015-11-03 01:13:30 +03:00 committed by Cyrill Gorcunov
parent 6377180e08
commit be8a5c8f2d
3 changed files with 3 additions and 3 deletions

View File

@ -1595,7 +1595,7 @@ static void stabs32_generate(void)
* the source-file, the n_desc field should be set to the number
* of remaining stabs
*/
WRITE_STAB(sptr, fileidx[0], 0, 0, 0, strlen(allfiles[0] + 12));
WRITE_STAB(sptr, fileidx[0], 0, 0, 0, stabstrlen);
/* this is the stab for the main source file */
WRITE_STAB(sptr, fileidx[mainfileindex], N_SO, 0, 0, 0);

View File

@ -1682,7 +1682,7 @@ static void stabs64_generate(void)
* the source-file, the n_desc field should be set to the number
* of remaining stabs
*/
WRITE_STAB(sptr, fileidx[0], 0, 0, 0, strlen(allfiles[0] + 12));
WRITE_STAB(sptr, fileidx[0], 0, 0, 0, stabstrlen);
/* this is the stab for the main source file */
WRITE_STAB(sptr, fileidx[mainfileindex], N_SO, 0, 0, 0);

View File

@ -1641,7 +1641,7 @@ static void stabsx32_generate(void)
* the source-file, the n_desc field should be set to the number
* of remaining stabs
*/
WRITE_STAB(sptr, fileidx[0], 0, 0, 0, strlen(allfiles[0] + 12));
WRITE_STAB(sptr, fileidx[0], 0, 0, 0, stabstrlen);
/* this is the stab for the main source file */
WRITE_STAB(sptr, fileidx[mainfileindex], N_SO, 0, 0, 0);