Sponsored Content
The Lounge What is on Your Mind? Can anybody learn how to code? Post 302905196 by wisecracker on Tuesday 10th of June 2014 08:18:30 AM
Old 06-10-2014
_Speaking_ as a complete amateur I would say anyone can do simple coding.

But if you intend to learn coding then shell scripting is a good place to start as there is a utility for just about everything you would want to do.

It is easy to get into bad coding habits but seriously difficult to get out of them.

You do not need a doctorship in mathematics but a good approach to working out your logical intentions is a must.

To learn, (I started shell scripting in Jan 2013), I jumped in at the deep end with a project I was interested in.

Hitting hurdles was great especially trying to solve them, and, although I always solved them the big guns on here voluntarily provided often much better solutions of which I have been grateful.

If you show you have had a go at any piece of code and come up against a problem _we_ will help solve them, preferably giving you hints rather than actual solutions as you learn that way.

I have learnt a few languages over the years but shell scripting is now my language of choice.

Good luck...
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Where to Learn About HP-UX

can someone give me the link to any site that deals on HP-UX system administration?? Please do not refer me to buy or borrow any books, i just need a free site to learn some quick info from (1 Reply)
Discussion started by: TRUEST
1 Replies

2. UNIX for Dummies Questions & Answers

I want to learn!

Hiya, yes im new to all of this! But want to learn how to use Unix etc, iv been thinking about doin a course but desided im better off learning by my self with help from the people who really no what there doin...you guys! I can install Linux, like redhat, mandrake, susie server edition and so... (5 Replies)
Discussion started by: epic.admin
5 Replies

3. Programming

Learn C or C++

Hi, Apologies if this question has been asked before. I would like to know which language is better to learn in terms of programming in unix? is C dying out and being replaced by C++ or is it a combination of the 2 or just mainly C? Thanks C19 (2 Replies)
Discussion started by: c19h28O2
2 Replies

4. UNIX for Dummies Questions & Answers

How to learn UNIX?

Hey everybody, I am a 25 year old web programmer in Malaysia. I am not hapy with my line of work and I want to do something more. I know asp.net,asp,php and jsp.But they dont really land me in a good promising job wich I realy love. I am more interested in Oracle DBMS. now to be a DBA in Oracle... (7 Replies)
Discussion started by: shounak
7 Replies

5. UNIX for Dummies Questions & Answers

I Want to Learn HP-UX!

What's the best free system to learn HP-UX on? The closest system, hardware requirements and installation instructions. I'm a newbie but determined. Any tips would be great. (6 Replies)
Discussion started by: networkguy
6 Replies

6. Red Hat

Want to learn RedHat

I Want to learn Red hat Linux at free of cost, can any one help me, I am zero in unix. (7 Replies)
Discussion started by: Mustaq
7 Replies

7. UNIX for Dummies Questions & Answers

Best way to learn UNIX

Hi, I am the ultimate noob when it comes to UNIX. Apart from a few basic thing like ls -l and mkdir (and that really is about as good as it gets) I know absolutely nothing about UNIX and I want to learn it and get better! I'm sure like with most things, just getting stuck in and trying... (3 Replies)
Discussion started by: thebdj
3 Replies

8. UNIX for Dummies Questions & Answers

Want to learn

Hi I know only basics of UNIX and i want to know that how can i become a good troubleshooter in unix adminstartion or shell scripting.... i am just a newbie to Unix ..i do not have programming skills as well. Your suggestions are welecomed. (1 Reply)
Discussion started by: nattynitin
1 Replies

9. What is on Your Mind?

You too can learn how to code in a day! ;oO

I am not passing a comment, just waiting to read yours... ;oD Decoded: learn to write computer code in a day - Telegraph Decoded | Technology made human | On Demand, Enterprise, Masterclass (6 Replies)
Discussion started by: wisecracker
6 Replies
reloc(4)						     Kernel Interfaces Manual							  reloc(4)

NAME
reloc - Relocation information for an object file SYNOPSIS
#include <reloc.h> DESCRIPTION
Object files have one relocation entry for each relocatable reference in the text or data. If relocation information is present, it will be in the following format. struct reloc { long r_vaddr ; /* (virtual) address of reference */ unsigned r_symndx ; /* index into symbol table */ unsigned r_type:8 ; /* relocation type */ unsigned r_extern:1 ; /* if 1 symndx is an index into the external table the external table, else symndx is a section # */ unsigned r_offset;6 ; /* for R_OP_STORE, quad based LE bit offset */ unsigned r_reserved;11; /* Must be zero */ unsigned r_size;6 ; /* R_OP_STORE, bit size */ } ; /* Relocation types */ #define R_ABS 0 #define R_REFLONG 1 #define R_REFQUAD 2 #define R_GPREL32 3 #define R_LITERAL 4 #define R_LITUSE 5 #define R_GPDISP 6 #define R_BRADDR 7 #define R_HINT 8 #define R_SREL16 9 /* self relative 16 bit offset */ #define R_SREL32 10 /* self relative 32 bit offset */ #define R_SREL64 11 /* self relative 64-bit offset */ #define R_OP_PUSH 12 /* stack[++tos] = relocate(vaddr) */ #define R_OP_STORE 13 /* vaddr(r_offset:r_size = stack[tos--] */ #define R_OP_PSUB 14 /* stack[tos] = stack[tos] - relocate(vaddr) */ #define R_OP_PRSHIFT 15 /* stack[tos] = stack[tos] >> relocate(vaddr) */ #define R_GPVALUE 16 /* Section numbers */ #define R_SN_NULL 0 #define R_SN_TEXT 1 #define R_SN_RDATA 2 #define R_SN_DATA 3 #define R_SN_SDATA 4 #define R_SN_SBSS 5 #define R_SN_BSS 6 #define R_SN_INIT 7 #define R_SN_LIT8 8 #define R_SN_LIT4 9 #define R_SN_XDATA 10 #define R_SN_PDATE 11 #define R_SN_FINI 12 #define R_SN_LITA 13 #define R_SN_ABS 14 The link editor (ld) reads each input section and performs relocation. The relocation entries direct how references found within the input section are treated. If r_extern is zero then it is a local relocation entry and then r_symndx is a section number (R_SN_*). For these entries the starting address for the section referenced by the section number is used in place of an external symbol table entry's value. For every external relocation (except R_ABS) a signed constant is added to the symbol's virtual address that the relocation entry refers to. This constant is assembled at the address being relocated. R_ABS A relocation has already been performed. R_REFLONG A 32-bit reference to the symbol's virtual address. R_REFQUAD A 64-bit reference to the symbol's virtual address. R_GPREL32 A 32-bit displacement from the global pointer to the symbol's virtual address. R_LITERAL A reference to a literal in the literal address pool as an offset from the global pointer. R_LITUSE Identifies usage of a lteral address previously loaded into a register. The r_symndx field identifies the specific usage of the register. See the Assembly Language Programmer's Guide for more information. R_GPDISP Identifies an lda/ldah instruction pair that is used to initialize a procedure's global-pointer register. The r_symndx contains a byte offset, which, when added to the r_vaddr field results in the address of the other instruction of the pair. R_BRADDR A 21-bit branch reference to the symbol's virtual address. R_HINT A 14-bit jsr hint reference to the symbol's virtual address. R_SREL16 A 16-bit self-relative reference to the symbol's virtual address. R_SREL32 A 32-bit self-relative reference to the symbols's virtual address. R_SREL64 A 64-bit self-relative reference to the symbol's virtual address. R_OP_PUSH Push symbol's virtual address on relocation expression stack. R_OP_STORE Pop value from the relocation expression stack and store at the symbol's virtual address. The r_size field determines the number of bits stored. The r_offset field designates the bit offset from the symbol to the target. R_OP_PSUB Pop value from the relocation expression stack and subtract the symbol's virtual address. The result is pushed on the relocation expression stack. R_OP_PRSHIFT Pop value from the relocation expression stack and shift right by the symbol's value. The result is pushed on the reloca- tion stack. R_GPVALUE Specifies a new gp value is to be used starting with the address specified by the r_vaddr field. The gp value is the sum of the optional header's gp_value field and the r_symndx field. The r_extern field must be zero. RELATED INFORMATION
as(1), ld(1), a.out(4), syms(4), scnhdr(4). Assembly Language Programmer's Guide delim off reloc(4)
All times are GMT -4. The time now is 08:44 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy