bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AS reloc bug


From: Mikulas Patocka
Subject: AS reloc bug
Date: Fri, 15 Aug 2003 20:46:54 +0200 (CEST)

Hi

There's bug in relocating in current as.

$ as
call a-b
a:
b:
$ objdump --disassemble

a.out:     file format elf32-i386

Disassembly of section .text:

00000000 <a-0x5>:
   0:   e8 fb ff ff ff          call   0 <a-0x5>
$ objdump --reloc

a.out:     file format elf32-i386

$

a-b is an absolute expression and call needs relative offset, so it should
generate R_386_PC32 reloc on offset 1 --- but it doesn't.

When I write "call 0", the reloc is generated, but with "call a-b" it
isn't.

I send a patch that solves this problem. I am not sure if patch is
correct, it needs some to be checked by someone who understands it.

Mikulas

Attachment: reloc-patch
Description: reloc patch


reply via email to

[Prev in Thread] Current Thread [Next in Thread]