Summary: | Incorrect 16-bit relocations in ELF | ||
---|---|---|---|
Product: | binutils | Reporter: | Markus Gyger <markus+sw> |
Component: | gas | Assignee: | unassigned |
Status: | NEW --- | ||
Severity: | normal | CC: | bug-binutils |
Priority: | P2 | ||
Version: | 2.17 | ||
Target Milestone: | --- | ||
Host: | i386-pc-solaris2.10 | Target: | h8300-elf |
Build: | i386-pc-solaris2.10 | Last reconfirmed: | |
Attachments: | Assembler example to show incorrect 16-bit ELF relocation |
Description
Markus Gyger
2006-08-25 15:28:16 UTC
Created attachment 1250 [details]
Assembler example to show incorrect 16-bit ELF relocation
This is a gas problem. gas is generating R_H8_DIR16 for the .word expression, which is wrong. The expression needs a 16 bit pc-relative reloc instead, or gas should be resolving the "label-." expression itself. It doesn't resolve the expression because h8300 sets linkrelax and there is no logic to detect that the expression is pc-relative and does not cross a region that could change size. |