LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-07-2005, 04:01 AM   #1
snowing
LQ Newbie
 
Registered: Jul 2005
Posts: 26

Rep: Reputation: 15
Have you seen such asm code?


I read the source code in glibc, and some codes in sysdeps/ia64/dl_machine.h frustrates me. In this file I saw the following codes:
#define RTLD_START asm ( \
".text\n" \
" .global _start#\n" \
" .proc _start#\n" \
"_start:\n" \
"0: { .mii\n" \
" .prologue\n" \
" .save rp, r0\n" \
" .body\n" \
" .prologue\n" \
" .save ar.pfs, r32\n" \
" alloc loc0 = ar.pfs, 0, 3, 4, 0\n" \
" .body\n" \
" mov r2 = ip\n" \
" addl r3 = @gprel(0b), r0\n" \
" ;;\n" \
" }\n"
................................................
I can't catch the point of the codes. I have never seen such asm codes before,whether intel style or at&t style. Could you please give me some direction?
 
Old 07-07-2005, 04:26 AM   #2
Marius2
Member
 
Registered: Jan 2004
Location: Munich
Distribution: SuSE 9.2, 10.2, 10.3, knoppix
Posts: 276

Rep: Reputation: 31
Hm, inquiring google for
addl r3 = @gprel
(http://www.google.de/search?hl=de&ie...D+@gprel&meta=)
seems to point to the Itanium, as in here:
http://neumann.cem.msu.edu/docs/icc/asm_ug.pdf

HTH
 
Old 07-07-2005, 05:13 AM   #3
snowing
LQ Newbie
 
Registered: Jul 2005
Posts: 26

Original Poster
Rep: Reputation: 15
yeah, thank you.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
asm Question Whiteghost Programming 2 09-03-2005 09:26 AM
User Preferences: Use HTML code instead of vB code? (vB code is overrated) stefanlasiewski LQ Suggestions & Feedback 5 07-26-2005 01:37 AM
Linux 32 ASM introuble Programming 2 05-10-2005 06:56 AM
asm/uaccess.h eltn Programming 2 10-22-2004 06:14 PM
Using asm code in C program. grub Programming 2 04-03-2003 11:00 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:45 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration