Sponsored Content
Full Discussion: gcc linker address
Top Forums Programming gcc linker address Post 302489685 by Praveen_218 on Friday 21st of January 2011 09:10:17 AM
Old 01-21-2011
I, however, really couldn't figure out this 0x08048000 location in the realelf output of your example???

Mine on a Linux machine, an executable gave me main's location as follows:

000000000040069a 82 FUNC GLOBAL DEFAULT 12 main

However, this is a 64 bit address; so do we assume that main, in any elf binary over 64-bit x86 architecture, would have an start address as 000000000040069a; where as in a 32-bi the same was at 0x08048000.

Shoul'd the same been 0x0000000008048000 over a 64-bit system????
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Linker (ld)

hai I have installed Linux 7.0 on my system and i have an doubt the linker i ran simple hello.c program with gcc compiler gcc -c hello.c i want linker to produce the output so i put on the command line as ld first.o -lc but it is not running ver properly but there is an... (1 Reply)
Discussion started by: rajashekaran
1 Replies

2. Linux

G++ Linker Error

Hi All, I m new to this group. I m facing one problem during my linking of CPP code at Linux env. after compliation i m getting error "undefined reference to ....." Please anyone help me to resolve this error. Regards, ASR make: Leaving directory /fwk' echo g++ -o server ... (1 Reply)
Discussion started by: ASRRAJ
1 Replies

3. Programming

XWindows programming + gcc linker options

Im trying to compile some code that involves using X-Windows based functions (XDisplayName() and XOpenDisplay() ), however each time I run the compiler, Im getting a problem with the linker. The linker says that both XDisplayName() and XOpenDisplay() are unresolved text symbols. Is there a... (1 Reply)
Discussion started by: JamesGoh
1 Replies

4. Solaris

Installing gcc - recieve error message gcc : cannot execute

AIM- Install Oracle 11g on Solaris using VMWare Steps 1.Logged on as root 2.Created subfolders à /usr/local/bin & /usr/local/bin/gcc 3.Downloaded gcc & libiconv & unzipped them on my harddrive & burnt them on CD 4.Copied files from CD to /usr/local/bin/gcc 5.Terminal (root) à pkgadd -d... (8 Replies)
Discussion started by: Ackers
8 Replies

5. Solaris

gcc & linker question (Solaris 10)

Hi, I'm confused about the GCC & Linking process could somebody please briefly explain? I have GCC 3.4.6 installed from SunFreeware. Reading the narrative alongside the package states "It was compiled to use the SUN assembler and loader usually in /usr/ccs/bin if the SUNW developer packages... (1 Reply)
Discussion started by: Celtic_Monkey
1 Replies

6. HP-UX

Hp-ux linker option -c

Hi, The necessary symbols in a shared library can be exported to the application using linker option --version-script in Linux. The same can be done in Hp-ux using linker option +e. This can also be done by listing all the global symbols with +e in a file with linker option ld -c filename in... (0 Replies)
Discussion started by: roopa_v
0 Replies

7. Programming

GCC: Choose my own linker

Hi, I do not use the default linker, and instead us another one and pass this argument -Wl,--dynamic-linker=<path to linker> to gcc when compiling. However, what happens if the linker is not under /lib and /lib64 and I am not able to create a symlink to the linker in /lib or /lib64 due to no... (2 Replies)
Discussion started by: Shompis
2 Replies

8. Programming

AIX linker oddities...what is going on?

I've tried to figure out what the linker is smoking in AIX to no avail...so I'm trying to find a little information to see why it's being inconsistent. I have the following code in a shared library, it doesn't do anything useful, it's just there to exercise functions in a few system libraries: ... (11 Replies)
Discussion started by: DreamWarrior
11 Replies

9. Solaris

runtime linker errors

Hey guys I have a solaris 10 OS, with a zone configured. In that zone, I am trying to install an Oracle Client. However, when I run the oracle installer, I get the following error: ld.so.1: java: fatal: libexpat.so.0: open failed: No such file or directory ld.so.1: java: fatal:... (2 Replies)
Discussion started by: goodvikings
2 Replies

10. Programming

Gcc linker search path order

I have a build where I wish to link against and load a specific version of a library and a different version of the same library is installed on the system. I'm using a -L option to point to the version that I wish to link against but gcc still seems to choose the installed version. Is there a way... (4 Replies)
Discussion started by: Richard Johnson
4 Replies
AOUT(4) 						   BSD Kernel Interfaces Manual 						   AOUT(4)

NAME
aout -- kernel support for executing binary files in legacy a.out format SYNOPSIS
kldload a.out DESCRIPTION
The a.out(5) executable format was used before the release of FreeBSD 3.0. Since i386 was the only supported architecture at that time, a.out(5) executables can only be activated on platforms that support execution of i386 code, such as i386 and amd64. To add kernel support for old syscalls and old syscall invocation methods, place the following options in the kernel configuration file: options COMPAT_43 options COMPAT_FREEBSD32 The COMPAT_FREEBSD32 option is only required on 64-bit CPU architectures. The aout.ko module needs to be loaded with the kldload(8) utility in order to support the a.out(5) image activator: kldload aout Alternatively, to load the module at boot time, place the following line in loader.conf(5): aout_load="YES" The a.out(5) format was mainstream quite a long time ago. Reasonable default settings and security requirements of modern operating systems today contradict the default environment of that time and require adjustments of the system to mimic natural environment for old binaries. The following sysctl(8) tunables are useful for this: security.bsd.map_at_zero Set to 1 to allow mapping of process pages at address 0. Some very old ZMAGIC executable images require text mapping at address 0. kern.pid_max Old versions of FreeBSD used signed 16-bit type for pid_t. Current kernels use 32-bit type for pid_t, and allow process id's up to 99999. Such values cannot be represented by old pid_t, mostly causing issues for processes using wait(2) syscalls, for example shells. Set the sysctl to 30000 to work around the problem. kern.elf32.read_exec Set to 1 to force any accessible memory mapping performed by 32-bit process to allow execution, see mmap(2). Old i386 CPUs did not have a bit in PTE which disallowed execution from the page, so many old programs did not specify PROT_EXEC even for mapping of executable code. The sysctl forces PROT_EXEC if mapping has any access allowed at all. The setting is only needed if the host architecture allows non-executable mappings. SEE ALSO
execve(2), a.out(5), elf(5), sysctl(8) HISTORY
The a.out(5) executable format was used on ancient AT&T UNIX and served as the main executable format for FreeBSD from the beginning up to FreeBSD 2.2.9. In FreeBSD 3.0 it was superseded by elf(5). AUTHORS
The aout manual page was written by Konstantin Belousov <kib@FreeBSD.org>. BUGS
On 64bit architectures, not all wrappers for older syscalls are implemented. BSD
August 14, 2012 BSD
All times are GMT -4. The time now is 06:50 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy