[llvm] [X86AsmBackend] Check fixup value overflow (PR #176827)

Alexander Kornienko via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 2 06:46:19 PST 2026


alexfh wrote:

Apparently, this is coming from a different part of the code (https://github.com/coreboot/seabios/blob/master/src/pnpbios.c#L70). A reduced test case looks like this:
```
$ cat /tmp/q.c
extern int X;

unsigned short f(void) { return (unsigned)&X - 0xf0000; }

$ clang -cc1 -triple i386-grtev4-linux-code16 -Os -emit-obj -mrelocation-model static -fcolor-diagnostics  -o /dev/null q.c
error: value of -983040 is too large for field of 2 bytes
1 error generated.
```

https://github.com/llvm/llvm-project/pull/176827


More information about the llvm-commits mailing list