bug-binutils
[Top][All Lists]
Advanced

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

[Bug binutils/2768] readelf and segmented addresses in DWARF2/3 aranges


From: stephane dot chauveau at philips dot com
Subject: [Bug binutils/2768] readelf and segmented addresses in DWARF2/3 aranges
Date: 15 Jun 2006 09:21:11 -0000

------- Additional Comments From stephane dot chauveau at philips dot com  
2006-06-15 09:21 -------
A few more remarks:

(1) Because of the alignment constraints, it is probably safe to assume that the
total size of each address (including the segment) will be a power of two.  
Readelf should be safe if it covers the total address sizes of 2, 4 & 8. 
The case address_size=2 and segment_size=2 is a likely to happen since DSPs with
16bit addresses and complex memory features (paging, PROG/DATA, ...) are quite
common. I do not have any samples yet. 

(2) The DWARF specs do not specify how the segments is encoded in the address so
readelf should simply dump the overall value.

(3) The cases such as address_size=4 & segment_size=4 are problematic when
readelf is built without 64bit support. 
The functions get_byte_little_endian() and get_byte_big_endian() are only
providing 4 of the required 8 bytes. 
Displaying only part of the values is a minor issue.
What is more problematic is that the detection of the end marker (2 times ZERO)
could be incorrect.   

A simple way to have a very generic implementation could be to process the
address & length not using get_byte() but using two new functions:
   - one to dump an arbitrary sequence of bytes as a little or big endian
hexadecimal number. 
   - one to test if a sequence of bytes is only composed of zeros.
    


-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=2768

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.




reply via email to

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