LD: 0711-356 WARNING: The .text section may not be aligned properly.
search cancel

LD: 0711-356 WARNING: The .text section may not be aligned properly.

book

Article ID: 50451

calendar_today

Updated On:

Products

Easytrieve Report Generator

Issue/Introduction

The 'ld: 0711-356 WARNING: The .text section may not be aligned' message has to do with the way the ld linker builds executable files.

 

Environment

Easytrieve Report Generator, AIX environment

Resolution

A UNIX executable consists of a .text, .loader, and a .data section.

Easytrieve for AIX uses a ld switch of -H32, which aligns each section on a 32-byte boundary.

This is a valid alignment in most cases, but on some systems we have seen the message.

The solution is to pass an -H0 switch to the linker. To do this, you can compile your program using this syntax:

ezt -v -W l,-H0 -o testezt testezt.ezt

Since the -W l,-H0 part of this syntax will be used every time, you can include it in the EZTOPTS environment variable, which contains switches sent to the ezt program. You can do this adding the following line to your bldezt.profile:

export EZTOPTS="-W l,-H0"

Then, after a logoff and logon, you should be able to compile, by using the standard or your desired syntax.