Bug 444367 - Unexpected relocation to be applied on FORM_SEC_OFFSET
Summary: Unexpected relocation to be applied on FORM_SEC_OFFSET
Status: RESOLVED FIXED
Alias: None
Product: TCF
Classification: Tools
Component: Agent (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 critical (vote)
Target Milestone: 1.3   Edit
Assignee: Project Inbox CLA
QA Contact: Eugene Tarassov CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-17 10:20 EDT by xavier pouyollon CLA
Modified: 2015-06-16 03:17 EDT (History)
0 users

See Also:


Attachments
cpp_demo.out compiled with -gdwarf-3 flag. (111.74 KB, application/octet-stream)
2014-09-17 10:20 EDT, xavier pouyollon CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description xavier pouyollon CLA 2014-09-17 10:20:55 EDT
Created attachment 247154 [details]
cpp_demo.out compiled with -gdwarf-3 flag.

Hi,

We have switched the VxWorks C++ generation on dwarf-3 and discovered the following issue on the attached cpp_demo.out:

 <2><1f90>: Abbrev Number: 50 (DW_TAG_lexical_block)
    <1f91>   DW_AT_ranges      : 0x60

The TCF debugger was getting 0x0 for the AT_ranges.

objdump -r cpp_demo.out:
00001f91 UNKNOWN           .debug_ranges+0x00000060

Once I apply the relocation, I can see my C++ variables.

I'm a little worried that we would apply relocation when reading FORM_SEC_OFFSET. Would there other places where we should do that in dwarfio.c ?

Here is a proposal patch:
https://git.eclipse.org/r/#/c/33500/
Comment 1 Eugene Tarassov CLA 2014-09-17 13:02:18 EDT
Yes, DWARF spec allows relocatable FORM_SEC_OFFSET.
Looks good, submitted.
Thanks!