mirror of
https://github.com/netwide-assembler/nasm.git
synced 2024-11-21 03:14:19 +08:00
BR 3392417: always end the DWARF .debug_abbrev section with a null
The DWARF spec specifies that the .debug_abbrev section always should end with a null byte. Existing tools don't seem to care, but some issue a warning, and it is invalid according to spec. Reported-by: Darren Sylvain <sylvaindarren@gmail.com> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
This commit is contained in:
parent
f91dc2033d
commit
e4303ee7f1
@ -3138,6 +3138,8 @@ static void dwarf_generate(void)
|
||||
saa_write8(pabbrev,DW_AT_frame_base);
|
||||
saa_write8(pabbrev,DW_FORM_data4);
|
||||
saa_write16(pabbrev,0); /* end of entry */
|
||||
/* Terminal zero entry */
|
||||
saa_write8(paddrev,0);
|
||||
abbrevlen = saalen = pabbrev->datalen;
|
||||
abbrevbuf = pbuf = nasm_malloc(saalen);
|
||||
saa_rnbytes(pabbrev, pbuf, saalen);
|
||||
|
@ -2046,6 +2046,8 @@ static void macho_dbg_generate(void)
|
||||
|
||||
saa_write16(p_abbrev, DW_END_default);
|
||||
|
||||
saa_write8(p_abbrev, 0); /* Terminal zero entry */
|
||||
|
||||
saa_len = p_abbrev->datalen;
|
||||
|
||||
p_buf = nasm_malloc(saa_len);
|
||||
|
Loading…
Reference in New Issue
Block a user