This is an archive of the discontinued LLVM Phabricator instance.

[ELF] - Linkerscript: support MIN and MAX.
ClosedPublic

Authored by grimar on Mar 21 2018, 6:54 AM.

Details

Summary

Sample from the spec (https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/4/html/Using_ld_the_GNU_Linker/sections.html)
uses MAX command that we do not support currently:

. = 0x1000 + MAX (SIZEOF (.text0), SIZEOF (.text1));

This patch implements support for MIN and MAX.

Diff Detail

Event Timeline

grimar created this revision.Mar 21 2018, 6:54 AM

The implementation looks fine, but is anything using it?

espindola accepted this revision.Mar 26 2018, 6:36 PM

I see that this is for convenience in PR36768.

LGTM since it is trivial.

This revision is now accepted and ready to land.Mar 26 2018, 6:36 PM
ruiu accepted this revision.Mar 26 2018, 6:39 PM

LGTM

I'm fine with this too.

This revision was automatically updated to reflect the committed changes.