diff options
author | Mark Scott <nasm@mscott.cx> | 2015-11-03 01:13:30 +0300 |
---|---|---|
committer | Cyrill Gorcunov <gorcunov@gmail.com> | 2015-11-03 01:14:14 +0300 |
commit | be8a5c8f2dbde47719796209a796cd7ccea32e54 (patch) | |
tree | 49a3adbb0bb9b829e756db4e624317096e390e5d | |
parent | 6377180e0873731f60a18fe5a61065f9c7795603 (diff) | |
download | nasm-be8a5c8f2dbde47719796209a796cd7ccea32e54.tar.gz |
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>
-rw-r--r-- | output/outelf32.c | 2 | ||||
-rw-r--r-- | output/outelf64.c | 2 | ||||
-rw-r--r-- | output/outelfx32.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/output/outelf32.c b/output/outelf32.c index e810198c..4489d401 100644 --- a/output/outelf32.c +++ b/output/outelf32.c @@ -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); diff --git a/output/outelf64.c b/output/outelf64.c index 19bd8459..41243b1e 100644 --- a/output/outelf64.c +++ b/output/outelf64.c @@ -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); diff --git a/output/outelfx32.c b/output/outelfx32.c index a9b6957a..3eeb224f 100644 --- a/output/outelfx32.c +++ b/output/outelfx32.c @@ -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); |