Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

output/elf: Don't set data symbol type/size in ABS sections #36

Merged
merged 1 commit into from Nov 7, 2022

Conversation

rygorous
Copy link

I'm dealing with a FreeBSD-derived embedded target that ends up
showing such symbols (which is mainly NASM struct definitions)
in backtraces after calling NULL function pointers, since these
symbols are technically covering bytes around address zero.

Needless to say, this is extremely confusing and generates
nonsensical bug reports. (Essentially, random unrelated crashes
get cross-referenced to a random ASM struct, whatever the linker
picked for address 0).

These symbols are already a bit strange to begin with (they're
purely an artifact of how NASM happens to implement structs),
leaving their sizes at 0 seems reasonable.

Signed-off-by: Fabian Giesen fabian.giesen@epicgames.com

I'm dealing with a FreeBSD-derived embedded target that ends up
showing such symbols (which is mainly NASM struct definitions)
in backtraces after calling NULL function pointers, since these
symbols _are_ technically covering bytes around address zero.

Needless to say, this is extremely confusing and generates
nonsensical bug reports. (Essentially, random unrelated crashes
get cross-referenced to a random ASM struct, whatever the linker
picked for address 0).

These symbols are already a bit strange to begin with (they're
purely an artifact of how NASM happens to implement structs),
leaving their sizes at 0 seems reasonable.

Signed-off-by: Fabian Giesen <fabian.giesen@epicgames.com>
@hpax hpax merged commit 0582a32 into netwide-assembler:master Nov 7, 2022
@hpax
Copy link
Member

hpax commented Nov 7, 2022

Merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants