From: nasm-bot f. M. S. <na...@ms...> - 2015-11-02 22:18:22
|
Commit-ID: be8a5c8f2dbde47719796209a796cd7ccea32e54 Gitweb: http://repo.or.cz/w/nasm.git?a=commitdiff;h=be8a5c8f2dbde47719796209a796cd7ccea32e54 Author: Mark Scott <na...@ms...> AuthorDate: Tue, 3 Nov 2015 01:13:30 +0300 Committer: Cyrill Gorcunov <gor...@gm...> CommitDate: Tue, 3 Nov 2015 01:14:14 +0300 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 <na...@ms...> Signed-off-by: Cyrill Gorcunov <gor...@gm...> --- output/outelf32.c | 2 +- output/outelf64.c | 2 +- output/outelfx32.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/output/outelf32.c b/output/outelf32.c index e810198..4489d40 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 19bd845..41243b1 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 a9b6957..3eeb224 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); |