- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Determining Subspace for Symbols
Operating System - HP-UX
1823970
Members
3874
Online
109667
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2002 02:57 PM
02-25-2002 02:57 PM
Determining Subspace for Symbols
Hopefully, someone can clear this one up for me...it's driving me nuts! And hopefully, this post won't be too rambling, but it covers a lot of ground rather quickly without filling in all the territory.
I've read fairly thoroughly The 32-bit PA-RISC Run-time Architecture Document for both HP-UX 10.20 and 11.00, as well as the man entry for a.out and one thing still seems unclear to me.
According to the documentation for Symbol tables, if you have a Symbol where the symbol_type is ENTRY or CODE and the symbol_scope is UNIVERSAL, then the following should be true:
1. symbol_info should contain an index of the subspace that contains this Symbol
2. symbol_value is a byte offset within a space to an entry point (in other words, to the first executable instruction).
I have two examples below of the symbol_dictionary_record for the "main" Symbol from two separate programs. The first (type: CODE, scope: UNIVERSAL) seems to match with the docs just fine. The second (type: ENTRY, scope: UNIVERSAL), however, does not.
Example 1 (hex values):
Symbol Info = 000002
Symbol Value= 00002793
Example 2 (hex values):
Symbol Info = 00F224
Symbol Value= 0000F203
For example #1, I can verify that the Symbol belongs to Subspace #2 ($CODE$ in this case, which is in the $TEXT$ space) and its offset in the file is 2790 (the low-order 2 bits of Symbol Value get masked and hence the difference) bytes from the start of the $TEXT$ space.
For example #2, though, there aren't F224 Subspaces in the file. There are 24 spaces, but the appropriate Subspace ($CODE) is again at Subspace #2. The value F224 is, however, exactly the correct offset value to the first executable line of main from the start of the $TEXT$ space.
Looking at the Symbol Table output from nm, that util seems to understand that in example #1, the symbol_value/code offset is 2790 while for example #2 it's F224.
Here's the complete Symbol Table dictionary entry for example #2 (in hex):
06 30 0D 41 00 00 00 10 00 00 00 00 40 00 F2 24 00 00 F2 03
To save you some time, here are the binary breakouts for the first and 4th words above, with spaces appropriate to the symbol_dictionary_record structure (again, for HP-UX 11.0):
06300D41 =
0 0 000110 0011 000 0 0 0 0 0 11 0101000001
4000F224 =
0 1 0 00000 000000001111001000100100
What am I missing? Or, to put it another way, given the above Symbol Table info for example #2, how does one figure out to what Subspace that Symbol belongs and why is the symbol_value not a correct offset?
Here are additional details of the system I'm on:
PA-RISC Version : 2.0
System name : HP-UX
Version : A
Release : B.11.00
Machine : 9000/785
Thanks!
Bill Rayl
Source Retrieval
I've read fairly thoroughly The 32-bit PA-RISC Run-time Architecture Document for both HP-UX 10.20 and 11.00, as well as the man entry for a.out and one thing still seems unclear to me.
According to the documentation for Symbol tables, if you have a Symbol where the symbol_type is ENTRY or CODE and the symbol_scope is UNIVERSAL, then the following should be true:
1. symbol_info should contain an index of the subspace that contains this Symbol
2. symbol_value is a byte offset within a space to an entry point (in other words, to the first executable instruction).
I have two examples below of the symbol_dictionary_record for the "main" Symbol from two separate programs. The first (type: CODE, scope: UNIVERSAL) seems to match with the docs just fine. The second (type: ENTRY, scope: UNIVERSAL), however, does not.
Example 1 (hex values):
Symbol Info = 000002
Symbol Value= 00002793
Example 2 (hex values):
Symbol Info = 00F224
Symbol Value= 0000F203
For example #1, I can verify that the Symbol belongs to Subspace #2 ($CODE$ in this case, which is in the $TEXT$ space) and its offset in the file is 2790 (the low-order 2 bits of Symbol Value get masked and hence the difference) bytes from the start of the $TEXT$ space.
For example #2, though, there aren't F224 Subspaces in the file. There are 24 spaces, but the appropriate Subspace ($CODE) is again at Subspace #2. The value F224 is, however, exactly the correct offset value to the first executable line of main from the start of the $TEXT$ space.
Looking at the Symbol Table output from nm, that util seems to understand that in example #1, the symbol_value/code offset is 2790 while for example #2 it's F224.
Here's the complete Symbol Table dictionary entry for example #2 (in hex):
06 30 0D 41 00 00 00 10 00 00 00 00 40 00 F2 24 00 00 F2 03
To save you some time, here are the binary breakouts for the first and 4th words above, with spaces appropriate to the symbol_dictionary_record structure (again, for HP-UX 11.0):
06300D41 =
0 0 000110 0011 000 0 0 0 0 0 11 0101000001
4000F224 =
0 1 0 00000 000000001111001000100100
What am I missing? Or, to put it another way, given the above Symbol Table info for example #2, how does one figure out to what Subspace that Symbol belongs and why is the symbol_value not a correct offset?
Here are additional details of the system I'm on:
PA-RISC Version : 2.0
System name : HP-UX
Version : A
Release : B.11.00
Machine : 9000/785
Thanks!
Bill Rayl
Source Retrieval
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2002 09:13 AM
02-26-2002 09:13 AM
Re: Determining Subspace for Symbols
Wouldn't you know it...an extra day of pouring over the executables and Symbol Tables and I figured out what my problem is.
It seems there are TWO entries in the Symbol Table dictionary for certain items, including "main". One is of type Entry (which can't be traced back to a Subspace) and the other is type Code...and that's the one I need to be looking at.
Thanks!
Bill Rayl
Source Retrieval
It seems there are TWO entries in the Symbol Table dictionary for certain items, including "main". One is of type Entry (which can't be traced back to a Subspace) and the other is type Code...and that's the one I need to be looking at.
Thanks!
Bill Rayl
Source Retrieval
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Learn About
News and Events
Support
© Copyright 2025 Hewlett Packard Enterprise Development LP